fyi. opensocial. defs
Shared definitions
- Kind
- Shared definitions
- Part of
- The reference host
- Record
at://did:plc:2gqnilpksz2e7faj3bwvo6qc/com.atproto.lexicon.schema/fyi.opensocial.defs- In the spec
org., the spec's lexicon of the same name. It may differ from this one.atgrp. defs
#accessConfig object
Contents of an access record.
| Field | Type | Description |
|---|---|---|
grants (required) | array of
| |
public | boolean
| |
writableBy | array of
| Who may write into the space in their own name, when not every member whose roles grant read: role ids, or 'public' for anyone signed in. Absent or empty is every such member. |
#accountRef object
An account, by its DID.
| Field | Type | Description |
|---|---|---|
did (required) | string (did) |
#accountSubject object
An account, as a moderation subject.
| Field | Type | Description |
|---|---|---|
did (required) | string (did) |
#action string
What a holder of a role may do, as the host's methods ask: each is answered by the scope that grants it in the role's grant.
string
- knownValues:
mod.read,mod.resolve,label,takedown,invite,admit,eject,role.assign,space.create,space.configure,space.delete,group.configure - maxLength:
64
#actorView object
A person, as a view names them: their DID, and the handle their DID document names, when it can be read.
| Field | Type | Description |
|---|---|---|
canCreateGroup | boolean | Only on the caller's own view, from getActor: whether this host lets them start a group (createGroup). |
did (required) | string (did) | |
handle | string (handle) | The handle their DID document names; missing when it names none or cannot be read. |
#audience object
Who may read or write a space: a role, by its id, or everyone signed in.
| Field | Type | Description |
|---|---|---|
role (required) | string
| A role id, or public for anyone signed in. |
#collectionRef object
A collection of records, by its NSID, or * for any.
| Field | Type | Description |
|---|---|---|
collection (required) | string
|
#ejectEvent object
The subject's membership was deleted.
No fields.
#groupGrant object
Scopes a role is granted across the group, and the roles its holders may assign.
| Field | Type | Description |
|---|---|---|
assignable (required) | array of fyi.
| Roles holders may grant or revoke, and whose holders they may eject. |
role (required) | fyi. | |
scopes (required) | array of string
| OAuth scopes, one per item. May include permission sets. `repo:` scopes are the public-repo collections holders may write as the group. |
#groupRule object
| Field | Type | Description |
|---|---|---|
createdAt | string (datetime) | |
rkey (required) | string (record-key) | |
text | string
| |
title (required) | string
|
#groupView object
A group as a list shows it. To a caller not signed in, only its did and handle.
| Field | Type | Description |
|---|---|---|
address | string | The group's address here: one label under this host's handle domain, set when the group is made or arrives. Its handle, until the group takes one of its own. |
avatar | string | CID of the avatar blob; the host serves it at /img/{did}/{cid}, to whoever may see the profile. |
banner | string | CID of the banner blob; the host serves it at /img/{did}/{cid}, to whoever may see the profile. |
createdAt | string (datetime) | When the group was started on this host. |
deactivated | boolean | Set while a steward has the group switched off. Its spaces cannot be read until one of the stewards who could switch it off switches it back on. |
description | string | |
did (required) | string (did) | |
displayName | string | |
handle (required) | string (handle) | |
joinPolicy | string | How new members get in, as the profile states it. |
languages | array of
| The languages it uses, as BCP 47 tags: en, pl, sl. |
location | union of community., community., community., community. | Where it meets, if it meets somewhere: a town or city is enough. |
members | string (space-ref) | |
meta | string (space-ref) | |
online | boolean | It meets online, as well as or instead of somewhere. |
rules | array of | |
topics | array of
| What it's about, a few words each, as the group puts it: climbing, choir, renters' union. |
url | string (uri) | The group's own site, if it keeps one. |
#groupViewBasic object
| Field | Type | Description |
|---|---|---|
address | string | The group's address here: one label under this host's handle domain, set when the group is made or arrives. Its handle, until the group takes one of its own. |
avatar | string | CID of the group's picture. |
did (required) | string (did) | |
displayName | string | |
handle (required) | string (handle) | |
memberCount | integer
| How many people are in it. Only to its members. |
sampleMembers | array of
| A few of its members, each as they are in the group, to show their faces. Only to its members. |
url | string (uri) | The group's own site, if not at its handle. |
#groupViewDetailed object
A group in full, as the viewer may see it. Profile fields and rules are present only when the viewer may read the meta space.
| Field | Type | Description |
|---|---|---|
address | string | The group's address here: one label under this host's handle domain, set when the group is made or arrives. Its handle, until the group takes one of its own. |
avatar | string | CID of the avatar blob; the host serves it at /img/{did}/{cid}, to whoever may see the profile. |
banner | string | CID of the banner blob; the host serves it at /img/{did}/{cid}, to whoever may see the profile. |
deactivated | boolean | Set while a steward has the group switched off. Its spaces cannot be read until one of the stewards who could switch it off switches it back on. |
description | string | |
did (required) | string (did) | |
displayName | string | |
handle (required) | string (handle) | |
joinPolicy | string | How new members get in, as the profile states it. |
languages | array of
| The languages it uses, as BCP 47 tags: en, pl, sl. |
links | array of
| Where else the group is, as its profile lists them. |
location | union of community., community., community., community. | Where it meets, if it meets somewhere: a town or city is enough. |
memberCount | integer
| How many are in it. Present only when the viewer may read the members space, whose members listMembers gives a page at a time. |
members | string (space-ref) | |
meta | string (space-ref) | |
online | boolean | It meets online, as well as or instead of somewhere. |
rules | array of | In the order they are presented. Absent when the meta space is closed to the viewer. |
topics | array of
| What it's about, a few words each, as the group puts it: climbing, choir, renters' union. |
url | string (uri) | The group's own site, if it keeps one. |
viewer | |
#inviteView object
| Field | Type | Description |
|---|---|---|
actor | | Whom it invites, with their handle where it can be read: on listInvites. |
createdAt (required) | string (datetime) | |
expiresAt | string (datetime) | |
invitee (required) | string (did) | |
message | string | |
uri (required) | string (at-uri) |
#joinPolicy string
open admits anyone; approval queues a join request; invite requires an invitation. An invitation admits its recipient under any policy.
string
- knownValues:
open,approval,invite
#joinRequest object
A request to join, waiting in the host.
| Field | Type | Description |
|---|---|---|
actor | | Who is asking, as a view names them. |
createdAt (required) | string (datetime) | |
member (required) | string (did) | |
message | string
|
#labelerPolicies object
| Field | Type | Description |
|---|---|---|
labelValueDefinitions | array of com. | Its own label values, defined. |
labelValues (required) | array of com. | The label values it applies. |
#labelEvent object
A label record was written or deleted.
| Field | Type | Description |
|---|---|---|
deleted | boolean
| |
uri (required) | string (at-uri) | The label record. |
val (required) | string
|
#languageRef object
A language the group uses.
| Field | Type | Description |
|---|---|---|
language (required) | string (language) |
#link object
A place on the web where the group is: its site, a chat, a calendar.
| Field | Type | Description |
|---|---|---|
title | string
| What it is, as the group puts it. |
url (required) | string (uri)
| An http or https address. |
#memberView object
| Field | Type | Description |
|---|---|---|
actor (required) | | |
roles (required) | array of |
#moderationEvent object
One event in the host's private moderation history.
| Field | Type | Description |
|---|---|---|
createdAt (required) | string (datetime) | |
createdBy | string (did) | Hosts may withhold this to protect reporters and moderators. |
event (required) | union of fyi., fyi., fyi., fyi. | |
id (required) | string
|
#recordSubject object
A record, as a moderation subject.
| Field | Type | Description |
|---|---|---|
cid | string (cid) | A specific version. Omit for the record as a whole. |
uri (required) | string (at-uri) | A record in one of the group's spaces. |
#reportEvent object
Someone reported the subject.
| Field | Type | Description |
|---|---|---|
reason | string
| |
reasonType (required) | com. | |
rule | string (at-uri) | A rule in the group's meta space. |
#roleBinding object
What one role may do, as the host reads its grant.
| Field | Type | Description |
|---|---|---|
actions (required) | array of | |
assignable (required) | array of | |
repoCollections | array of | The public-repo collections holders may write as the group; `*` for any. |
role (required) | string
| |
scopes | array of | The role's grant as the permissions record has it. |
#roleId string
The rkey of a role record in the group's members space.
string (record-key)
- maxLength:
512
#roleRef object
A role, by its id: the record key of a fyi.opensocial.role record.
| Field | Type | Description |
|---|---|---|
role (required) | string
|
#roleView object
| Field | Type | Description |
|---|---|---|
bot | boolean | People with this role are bots. |
default | boolean | Granted to members who join through requestJoin. |
description | string | |
key (required) | string | The role id: its record key. |
name | string |
#scopeRef object
An OAuth scope, as a permission or permission set is written.
| Field | Type | Description |
|---|---|---|
scope (required) | string
|
#spaceGrant object
Scopes a role is granted in one space.
| Field | Type | Description |
|---|---|---|
role (required) | string (record-key)
| A role id: the record key of a fyi.opensocial.role record. |
scopes (required) | array of string
| OAuth scopes, one per item: space scopes, read against this space. One granting read lets the role read the space; one naming collections lets it write those as the group here. |
#spaceView object
| Field | Type | Description |
|---|---|---|
grants | array of | The scopes each role is granted there, when the viewer may read the space. |
name | string | |
people | array of | For chosen people: who they are, when the viewer is one of them. Only they read it or write in it. |
public | boolean | Whether anyone signed in may read it, when the viewer may read the space. |
spaceType (required) | string (nsid) | |
uri (required) | string (space-ref) | |
writableBy | array of | Who may write there in their own name, when the viewer may read the space. Absent is every member whose roles grant read. |
#statusEvent object
A moderator set the subject's status, optionally with a note.
| Field | Type | Description |
|---|---|---|
note | string
| |
status (required) | fyi. |
#subjectStatus string
Where a subject stands in the moderation queue.
string
- enum:
open,escalated,resolved
#subjectView object
| Field | Type | Description |
|---|---|---|
createdAt (required) | string (datetime) | |
reportCount (required) | integer
| |
status (required) | fyi. | |
subject (required) | union of fyi., fyi. | |
updatedAt (required) | string (datetime) |
#topicRef object
A topic the group is about.
| Field | Type | Description |
|---|---|---|
topic (required) | string
|
#viewerState object
The requesting account's standing in the group. Only present for authed requests.
| Field | Type | Description |
|---|---|---|
accepted | boolean | For a member: whether their own acceptance is in the members space. |
actions (required) | array of fyi. | The union of actions across the viewer's roles: what the host would let them do. |
member (required) | boolean | |
request | | The viewer's own pending request to join, when they are not a member and have one. |
roles (required) | array of |
The schema as published
{
"defs": {
"accessConfig": {
"description": "Contents of an access record.",
"properties": {
"grants": {
"items": {
"ref": "#spaceGrant",
"type": "ref"
},
"maxLength": 100,
"type": "array"
},
"public": {
"default": false,
"type": "boolean"
},
"writableBy": {
"description": "Who may write into the space in their own name, when not every member whose roles grant read: role ids, or 'public' for anyone signed in. Absent or empty is every such member.",
"items": {
"ref": "#audience",
"type": "ref"
},
"maxLength": 50,
"type": "array"
}
},
"required": [
"grants"
],
"type": "object"
},
"accountRef": {
"description": "An account, by its DID.",
"properties": {
"did": {
"format": "did",
"type": "string"
}
},
"required": [
"did"
],
"type": "object"
},
"accountSubject": {
"description": "An account, as a moderation subject.",
"properties": {
"did": {
"format": "did",
"type": "string"
}
},
"required": [
"did"
],
"type": "object"
},
"action": {
"description": "What a holder of a role may do, as the host's methods ask: each is answered by the scope that grants it in the role's grant.",
"knownValues": [
"mod.read",
"mod.resolve",
"label",
"takedown",
"invite",
"admit",
"eject",
"role.assign",
"space.create",
"space.configure",
"space.delete",
"group.configure"
],
"maxLength": 64,
"type": "string"
},
"actorView": {
"description": "A person, as a view names them: their DID, and the handle their DID document names, when it can be read.",
"properties": {
"canCreateGroup": {
"description": "Only on the caller's own view, from getActor: whether this host lets them start a group (createGroup).",
"type": "boolean"
},
"did": {
"format": "did",
"type": "string"
},
"handle": {
"description": "The handle their DID document names; missing when it names none or cannot be read.",
"format": "handle",
"type": "string"
}
},
"required": [
"did"
],
"type": "object"
},
"audience": {
"description": "Who may read or write a space: a role, by its id, or everyone signed in.",
"properties": {
"role": {
"description": "A role id, or public for anyone signed in.",
"knownValues": [
"public"
],
"maxLength": 64,
"type": "string"
}
},
"required": [
"role"
],
"type": "object"
},
"collectionRef": {
"description": "A collection of records, by its NSID, or * for any.",
"properties": {
"collection": {
"maxLength": 317,
"type": "string"
}
},
"required": [
"collection"
],
"type": "object"
},
"ejectEvent": {
"description": "The subject's membership was deleted.",
"properties": {},
"type": "object"
},
"groupGrant": {
"description": "Scopes a role is granted across the group, and the roles its holders may assign.",
"properties": {
"assignable": {
"description": "Roles holders may grant or revoke, and whose holders they may eject.",
"items": {
"ref": "fyi.opensocial.defs#roleId",
"type": "ref"
},
"maxLength": 100,
"type": "array"
},
"role": {
"ref": "fyi.opensocial.defs#roleId",
"type": "ref"
},
"scopes": {
"description": "OAuth scopes, one per item. May include permission sets. `repo:` scopes are the public-repo collections holders may write as the group.",
"items": {
"maxLength": 2000,
"minLength": 1,
"type": "string"
},
"maxLength": 100,
"type": "array"
}
},
"required": [
"role",
"scopes",
"assignable"
],
"type": "object"
},
"groupRule": {
"properties": {
"createdAt": {
"format": "datetime",
"type": "string"
},
"rkey": {
"format": "record-key",
"type": "string"
},
"text": {
"maxGraphemes": 2000,
"maxLength": 20000,
"type": "string"
},
"title": {
"maxGraphemes": 100,
"maxLength": 1000,
"type": "string"
}
},
"required": [
"rkey",
"title"
],
"type": "object"
},
"groupView": {
"description": "A group as a list shows it. To a caller not signed in, only its did and handle.",
"properties": {
"address": {
"description": "The group's address here: one label under this host's handle domain, set when the group is made or arrives. Its handle, until the group takes one of its own.",
"type": "string"
},
"avatar": {
"description": "CID of the avatar blob; the host serves it at /img/{did}/{cid}, to whoever may see the profile.",
"type": "string"
},
"banner": {
"description": "CID of the banner blob; the host serves it at /img/{did}/{cid}, to whoever may see the profile.",
"type": "string"
},
"createdAt": {
"description": "When the group was started on this host.",
"format": "datetime",
"type": "string"
},
"deactivated": {
"description": "Set while a steward has the group switched off. Its spaces cannot be read until one of the stewards who could switch it off switches it back on.",
"type": "boolean"
},
"description": {
"type": "string"
},
"did": {
"format": "did",
"type": "string"
},
"displayName": {
"type": "string"
},
"handle": {
"format": "handle",
"type": "string"
},
"joinPolicy": {
"description": "How new members get in, as the profile states it.",
"type": "string"
},
"languages": {
"description": "The languages it uses, as BCP 47 tags: en, pl, sl.",
"items": {
"ref": "#languageRef",
"type": "ref"
},
"maxLength": 5,
"type": "array"
},
"location": {
"description": "Where it meets, if it meets somewhere: a town or city is enough.",
"refs": [
"community.lexicon.location.address",
"community.lexicon.location.geo",
"community.lexicon.location.fsq",
"community.lexicon.location.hthree"
],
"type": "union"
},
"members": {
"format": "space-ref",
"type": "string"
},
"meta": {
"format": "space-ref",
"type": "string"
},
"online": {
"description": "It meets online, as well as or instead of somewhere.",
"type": "boolean"
},
"rules": {
"items": {
"ref": "#groupRule",
"type": "ref"
},
"type": "array"
},
"topics": {
"description": "What it's about, a few words each, as the group puts it: climbing, choir, renters' union.",
"items": {
"ref": "#topicRef",
"type": "ref"
},
"maxLength": 10,
"type": "array"
},
"url": {
"description": "The group's own site, if it keeps one.",
"format": "uri",
"type": "string"
}
},
"required": [
"did",
"handle"
],
"type": "object"
},
"groupViewBasic": {
"properties": {
"address": {
"description": "The group's address here: one label under this host's handle domain, set when the group is made or arrives. Its handle, until the group takes one of its own.",
"type": "string"
},
"avatar": {
"description": "CID of the group's picture.",
"type": "string"
},
"did": {
"format": "did",
"type": "string"
},
"displayName": {
"type": "string"
},
"handle": {
"format": "handle",
"type": "string"
},
"memberCount": {
"description": "How many people are in it. Only to its members.",
"minimum": 0,
"type": "integer"
},
"sampleMembers": {
"description": "A few of its members, each as they are in the group, to show their faces. Only to its members.",
"items": {
"ref": "#actorView",
"type": "ref"
},
"maxLength": 5,
"type": "array"
},
"url": {
"description": "The group's own site, if not at its handle.",
"format": "uri",
"type": "string"
}
},
"required": [
"did",
"handle"
],
"type": "object"
},
"groupViewDetailed": {
"description": "A group in full, as the viewer may see it. Profile fields and rules are present only when the viewer may read the meta space.",
"properties": {
"address": {
"description": "The group's address here: one label under this host's handle domain, set when the group is made or arrives. Its handle, until the group takes one of its own.",
"type": "string"
},
"avatar": {
"description": "CID of the avatar blob; the host serves it at /img/{did}/{cid}, to whoever may see the profile.",
"type": "string"
},
"banner": {
"description": "CID of the banner blob; the host serves it at /img/{did}/{cid}, to whoever may see the profile.",
"type": "string"
},
"deactivated": {
"description": "Set while a steward has the group switched off. Its spaces cannot be read until one of the stewards who could switch it off switches it back on.",
"type": "boolean"
},
"description": {
"type": "string"
},
"did": {
"format": "did",
"type": "string"
},
"displayName": {
"type": "string"
},
"handle": {
"format": "handle",
"type": "string"
},
"joinPolicy": {
"description": "How new members get in, as the profile states it.",
"type": "string"
},
"languages": {
"description": "The languages it uses, as BCP 47 tags: en, pl, sl.",
"items": {
"ref": "#languageRef",
"type": "ref"
},
"maxLength": 5,
"type": "array"
},
"links": {
"description": "Where else the group is, as its profile lists them.",
"items": {
"ref": "#link",
"type": "ref"
},
"maxLength": 5,
"type": "array"
},
"location": {
"description": "Where it meets, if it meets somewhere: a town or city is enough.",
"refs": [
"community.lexicon.location.address",
"community.lexicon.location.geo",
"community.lexicon.location.fsq",
"community.lexicon.location.hthree"
],
"type": "union"
},
"memberCount": {
"description": "How many are in it. Present only when the viewer may read the members space, whose members listMembers gives a page at a time.",
"minimum": 0,
"type": "integer"
},
"members": {
"format": "space-ref",
"type": "string"
},
"meta": {
"format": "space-ref",
"type": "string"
},
"online": {
"description": "It meets online, as well as or instead of somewhere.",
"type": "boolean"
},
"rules": {
"description": "In the order they are presented. Absent when the meta space is closed to the viewer.",
"items": {
"ref": "#groupRule",
"type": "ref"
},
"type": "array"
},
"topics": {
"description": "What it's about, a few words each, as the group puts it: climbing, choir, renters' union.",
"items": {
"ref": "#topicRef",
"type": "ref"
},
"maxLength": 10,
"type": "array"
},
"url": {
"description": "The group's own site, if it keeps one.",
"format": "uri",
"type": "string"
},
"viewer": {
"ref": "#viewerState",
"type": "ref"
}
},
"required": [
"did",
"handle"
],
"type": "object"
},
"inviteView": {
"properties": {
"actor": {
"description": "Whom it invites, with their handle where it can be read: on listInvites.",
"ref": "#actorView",
"type": "ref"
},
"createdAt": {
"format": "datetime",
"type": "string"
},
"expiresAt": {
"format": "datetime",
"type": "string"
},
"invitee": {
"format": "did",
"type": "string"
},
"message": {
"type": "string"
},
"uri": {
"format": "at-uri",
"type": "string"
}
},
"required": [
"uri",
"invitee",
"createdAt"
],
"type": "object"
},
"joinPolicy": {
"description": "open admits anyone; approval queues a join request; invite requires an invitation. An invitation admits its recipient under any policy.",
"knownValues": [
"open",
"approval",
"invite"
],
"type": "string"
},
"joinRequest": {
"description": "A request to join, waiting in the host.",
"properties": {
"actor": {
"description": "Who is asking, as a view names them.",
"ref": "#actorView",
"type": "ref"
},
"createdAt": {
"format": "datetime",
"type": "string"
},
"member": {
"format": "did",
"type": "string"
},
"message": {
"maxGraphemes": 2000,
"maxLength": 20000,
"type": "string"
}
},
"required": [
"member",
"createdAt"
],
"type": "object"
},
"labelEvent": {
"description": "A label record was written or deleted.",
"properties": {
"deleted": {
"default": false,
"type": "boolean"
},
"uri": {
"description": "The label record.",
"format": "at-uri",
"type": "string"
},
"val": {
"maxLength": 128,
"minLength": 1,
"type": "string"
}
},
"required": [
"uri",
"val"
],
"type": "object"
},
"labelerPolicies": {
"properties": {
"labelValueDefinitions": {
"description": "Its own label values, defined.",
"items": {
"ref": "com.atproto.label.defs#labelValueDefinition",
"type": "ref"
},
"type": "array"
},
"labelValues": {
"description": "The label values it applies.",
"items": {
"ref": "com.atproto.label.defs#labelValue",
"type": "ref"
},
"type": "array"
}
},
"required": [
"labelValues"
],
"type": "object"
},
"languageRef": {
"description": "A language the group uses.",
"properties": {
"language": {
"format": "language",
"type": "string"
}
},
"required": [
"language"
],
"type": "object"
},
"link": {
"description": "A place on the web where the group is: its site, a chat, a calendar.",
"properties": {
"title": {
"description": "What it is, as the group puts it.",
"maxGraphemes": 64,
"maxLength": 640,
"type": "string"
},
"url": {
"description": "An http or https address.",
"format": "uri",
"maxLength": 2048,
"type": "string"
}
},
"required": [
"url"
],
"type": "object"
},
"memberView": {
"properties": {
"actor": {
"ref": "#actorView",
"type": "ref"
},
"roles": {
"items": {
"ref": "#roleRef",
"type": "ref"
},
"type": "array"
}
},
"required": [
"actor",
"roles"
],
"type": "object"
},
"moderationEvent": {
"description": "One event in the host's private moderation history.",
"properties": {
"createdAt": {
"format": "datetime",
"type": "string"
},
"createdBy": {
"description": "Hosts may withhold this to protect reporters and moderators.",
"format": "did",
"type": "string"
},
"event": {
"refs": [
"fyi.opensocial.defs#reportEvent",
"fyi.opensocial.defs#statusEvent",
"fyi.opensocial.defs#labelEvent",
"fyi.opensocial.defs#ejectEvent"
],
"type": "union"
},
"id": {
"maxLength": 512,
"minLength": 1,
"type": "string"
}
},
"required": [
"id",
"createdAt",
"event"
],
"type": "object"
},
"recordSubject": {
"description": "A record, as a moderation subject.",
"properties": {
"cid": {
"description": "A specific version. Omit for the record as a whole.",
"format": "cid",
"type": "string"
},
"uri": {
"description": "A record in one of the group's spaces.",
"format": "at-uri",
"type": "string"
}
},
"required": [
"uri"
],
"type": "object"
},
"reportEvent": {
"description": "Someone reported the subject.",
"properties": {
"reason": {
"maxGraphemes": 2000,
"maxLength": 20000,
"type": "string"
},
"reasonType": {
"ref": "com.atproto.moderation.defs#reasonType",
"type": "ref"
},
"rule": {
"description": "A rule in the group's meta space.",
"format": "at-uri",
"type": "string"
}
},
"required": [
"reasonType"
],
"type": "object"
},
"roleBinding": {
"description": "What one role may do, as the host reads its grant.",
"properties": {
"actions": {
"items": {
"ref": "#action",
"type": "ref"
},
"type": "array"
},
"assignable": {
"items": {
"ref": "#roleRef",
"type": "ref"
},
"type": "array"
},
"repoCollections": {
"description": "The public-repo collections holders may write as the group; `*` for any.",
"items": {
"ref": "#collectionRef",
"type": "ref"
},
"type": "array"
},
"role": {
"maxLength": 64,
"type": "string"
},
"scopes": {
"description": "The role's grant as the permissions record has it.",
"items": {
"ref": "#scopeRef",
"type": "ref"
},
"type": "array"
}
},
"required": [
"role",
"actions",
"assignable"
],
"type": "object"
},
"roleId": {
"description": "The rkey of a role record in the group's members space.",
"format": "record-key",
"maxLength": 512,
"type": "string"
},
"roleRef": {
"description": "A role, by its id: the record key of a fyi.opensocial.role record.",
"properties": {
"role": {
"maxLength": 64,
"type": "string"
}
},
"required": [
"role"
],
"type": "object"
},
"roleView": {
"properties": {
"bot": {
"description": "People with this role are bots.",
"type": "boolean"
},
"default": {
"description": "Granted to members who join through requestJoin.",
"type": "boolean"
},
"description": {
"type": "string"
},
"key": {
"description": "The role id: its record key.",
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"key"
],
"type": "object"
},
"scopeRef": {
"description": "An OAuth scope, as a permission or permission set is written.",
"properties": {
"scope": {
"maxLength": 400,
"type": "string"
}
},
"required": [
"scope"
],
"type": "object"
},
"spaceGrant": {
"description": "Scopes a role is granted in one space.",
"properties": {
"role": {
"description": "A role id: the record key of a fyi.opensocial.role record.",
"format": "record-key",
"maxLength": 512,
"type": "string"
},
"scopes": {
"description": "OAuth scopes, one per item: space scopes, read against this space. One granting read lets the role read the space; one naming collections lets it write those as the group here.",
"items": {
"maxLength": 2000,
"minLength": 1,
"type": "string"
},
"maxLength": 100,
"type": "array"
}
},
"required": [
"role",
"scopes"
],
"type": "object"
},
"spaceView": {
"properties": {
"grants": {
"description": "The scopes each role is granted there, when the viewer may read the space.",
"items": {
"ref": "#spaceGrant",
"type": "ref"
},
"type": "array"
},
"name": {
"type": "string"
},
"people": {
"description": "For chosen people: who they are, when the viewer is one of them. Only they read it or write in it.",
"items": {
"ref": "#accountRef",
"type": "ref"
},
"type": "array"
},
"public": {
"description": "Whether anyone signed in may read it, when the viewer may read the space.",
"type": "boolean"
},
"spaceType": {
"format": "nsid",
"type": "string"
},
"uri": {
"format": "space-ref",
"type": "string"
},
"writableBy": {
"description": "Who may write there in their own name, when the viewer may read the space. Absent is every member whose roles grant read.",
"items": {
"ref": "#audience",
"type": "ref"
},
"type": "array"
}
},
"required": [
"uri",
"spaceType"
],
"type": "object"
},
"statusEvent": {
"description": "A moderator set the subject's status, optionally with a note.",
"properties": {
"note": {
"maxGraphemes": 2000,
"maxLength": 20000,
"type": "string"
},
"status": {
"ref": "fyi.opensocial.defs#subjectStatus",
"type": "ref"
}
},
"required": [
"status"
],
"type": "object"
},
"subjectStatus": {
"description": "Where a subject stands in the moderation queue.",
"enum": [
"open",
"escalated",
"resolved"
],
"type": "string"
},
"subjectView": {
"properties": {
"createdAt": {
"format": "datetime",
"type": "string"
},
"reportCount": {
"minimum": 0,
"type": "integer"
},
"status": {
"ref": "fyi.opensocial.defs#subjectStatus",
"type": "ref"
},
"subject": {
"refs": [
"fyi.opensocial.defs#accountSubject",
"fyi.opensocial.defs#recordSubject"
],
"type": "union"
},
"updatedAt": {
"format": "datetime",
"type": "string"
}
},
"required": [
"subject",
"status",
"createdAt",
"updatedAt",
"reportCount"
],
"type": "object"
},
"topicRef": {
"description": "A topic the group is about.",
"properties": {
"topic": {
"maxGraphemes": 64,
"maxLength": 640,
"type": "string"
}
},
"required": [
"topic"
],
"type": "object"
},
"viewerState": {
"description": "The requesting account's standing in the group. Only present for authed requests.",
"properties": {
"accepted": {
"description": "For a member: whether their own acceptance is in the members space.",
"type": "boolean"
},
"actions": {
"description": "The union of actions across the viewer's roles: what the host would let them do.",
"items": {
"ref": "fyi.opensocial.defs#action",
"type": "ref"
},
"type": "array"
},
"member": {
"type": "boolean"
},
"request": {
"description": "The viewer's own pending request to join, when they are not a member and have one.",
"ref": "#joinRequest",
"type": "ref"
},
"roles": {
"items": {
"ref": "#roleRef",
"type": "ref"
},
"type": "array"
}
},
"required": [
"member",
"roles",
"actions"
],
"type": "object"
}
},
"id": "fyi.opensocial.defs",
"lexicon": 1
}