social.colibri.beta.community.defs

colibri.social

Documentation

applicationView object

A pending request to join a community that requires approval.

Properties

createdAt string datetime Required

When the application was made.

dismissed boolean Required

Whether a moderator has hidden this from the active queue.

View raw schema
{
  "type": "object",
  "required": [
    "actor",
    "createdAt",
    "dismissed"
  ],
  "properties": {
    "actor": {
      "ref": "social.colibri.beta.actor.defs#profileView",
      "type": "ref",
      "description": "The applicant."
    },
    "createdAt": {
      "type": "string",
      "format": "datetime",
      "description": "When the application was made."
    },
    "dismissed": {
      "type": "boolean",
      "description": "Whether a moderator has hidden this from the active queue."
    }
  },
  "description": "A pending request to join a community that requires approval."
}
bannedActorView object

A member who is currently banned from a community. Derived from the moderation log, which records bans and unbans as separate entries.

Properties

bannedAt string datetime Required

When the ban took effect.

bannedBy string did Required

Which moderator banned them.

reason string Optional

Why they were banned.

maxLength: 512 bytes
View raw schema
{
  "type": "object",
  "required": [
    "actor",
    "bannedBy",
    "bannedAt"
  ],
  "properties": {
    "actor": {
      "ref": "social.colibri.beta.actor.defs#profileView",
      "type": "ref",
      "description": "The banned member."
    },
    "reason": {
      "type": "string",
      "maxLength": 512,
      "description": "Why they were banned."
    },
    "bannedAt": {
      "type": "string",
      "format": "datetime",
      "description": "When the ban took effect."
    },
    "bannedBy": {
      "type": "string",
      "format": "did",
      "description": "Which moderator banned them."
    }
  },
  "description": "A member who is currently banned from a community. Derived from the moderation log, which records bans and unbans as separate entries."
}
categoryView object

A category and the channels in it.

Properties

channels array of ref#channelView Required

Channels in display order.

name string Required

The category's name.

rkey string record-key Required

The category's record key.

View raw schema
{
  "type": "object",
  "required": [
    "rkey",
    "name",
    "channels"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "The category's name."
    },
    "rkey": {
      "type": "string",
      "format": "record-key",
      "description": "The category's record key."
    },
    "channels": {
      "type": "array",
      "items": {
        "ref": "#channelView",
        "type": "ref"
      },
      "description": "Channels in display order."
    }
  },
  "description": "A category and the channels in it."
}
channelView object

A channel as the AppView serves it. The channel's identity is its space.

Properties

allowedMembers array of stringdid Optional

Members allowed to post.

allowedRoles array of stringrecord-key Optional

Roles allowed to post.

category string record-key Optional

The category this channel is listed under.

description string Optional

The channel's topic.

linkEmbeds boolean Optional

Whether link previews are shown here.

migratedFrom string at-uri Optional

The legacy channel whose history is served alongside this one.

name string Required

The channel's name.

ownerOnly boolean Optional

Whether only admins may post.

private boolean Optional

Whether the channel restricts who may read it, rather than only who may post.

space string space-ref Required

The channel's space, which is its identity.

type string Required

The channel's space type.

Known values: social.colibri.beta.channel.text, social.colibri.beta.channel.voice
visibleToMembers array of stringdid Optional

Members that may read this channel beyond visibleToRoles.

visibleToRoles array of stringrecord-key Optional

Roles that may read this channel. Empty means every member may.

View raw schema
{
  "type": "object",
  "required": [
    "space",
    "type",
    "name",
    "viewer"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "The channel's name."
    },
    "type": {
      "type": "string",
      "description": "The channel's space type.",
      "knownValues": [
        "social.colibri.beta.channel.text",
        "social.colibri.beta.channel.voice"
      ]
    },
    "space": {
      "type": "string",
      "format": "space-ref",
      "description": "The channel's space, which is its identity."
    },
    "viewer": {
      "ref": "#channelViewerState",
      "type": "ref",
      "description": "The requesting user's access to this channel."
    },
    "private": {
      "type": "boolean",
      "description": "Whether the channel restricts who may read it, rather than only who may post."
    },
    "category": {
      "type": "string",
      "format": "record-key",
      "description": "The category this channel is listed under."
    },
    "ownerOnly": {
      "type": "boolean",
      "description": "Whether only admins may post."
    },
    "linkEmbeds": {
      "type": "boolean",
      "description": "Whether link previews are shown here."
    },
    "description": {
      "type": "string",
      "description": "The channel's topic."
    },
    "allowedRoles": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "record-key",
        "description": "A role."
      },
      "description": "Roles allowed to post."
    },
    "migratedFrom": {
      "type": "string",
      "format": "at-uri",
      "description": "The legacy channel whose history is served alongside this one."
    },
    "allowedMembers": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "did",
        "description": "A member."
      },
      "description": "Members allowed to post."
    },
    "visibleToRoles": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "record-key",
        "description": "A role."
      },
      "description": "Roles that may read this channel. Empty means every member may."
    },
    "visibleToMembers": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "did",
        "description": "A member."
      },
      "description": "Members that may read this channel beyond visibleToRoles."
    }
  },
  "description": "A channel as the AppView serves it. The channel's identity is its space."
}
channelViewerState object

The requesting user's access to a channel.

Properties

canPost boolean Required

Whether the user may post in this channel.

canRead boolean Required

Whether the user may read this channel.

permissions array of string Optional

Effective permissions in this channel, after per-channel role overrides.

View raw schema
{
  "type": "object",
  "required": [
    "canRead",
    "canPost"
  ],
  "properties": {
    "canPost": {
      "type": "boolean",
      "description": "Whether the user may post in this channel."
    },
    "canRead": {
      "type": "boolean",
      "description": "Whether the user may read this channel."
    },
    "permissions": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "A permission identifier."
      },
      "description": "Effective permissions in this channel, after per-channel role overrides."
    }
  },
  "description": "The requesting user's access to a channel."
}
communityView object

A community as the AppView serves it.

Properties

banner string uri Optional

URL of the community's banner, served by this AppView's blob proxy.

description string Optional

The community's description.

did string did Required

The community's DID, which is the authority for all of its spaces.

handle string handle Required

The community's handle.

labelers array of stringdid Optional

DIDs whose labels this community honours.

linkEmbeds boolean Required

Whether link previews are shown by default.

managingApp string did Required

The AppView that manages this community's spaces. When it is not the AppView that served this view, the client must talk to that AppView for this community's reads, writes, events and voice.

memberCount integer Optional

Number of admitted members.

migratedFrom string at-uri Optional

The repo-backed community this one replaces, if any.

name string Required

The community's name.

picture string uri Optional

URL of the community's icon, served by this AppView's blob proxy.

requiresApprovalToJoin boolean Required

Whether joining produces an application to approve.

viewer ref #viewerState Required

The requesting user's relationship to this community.

View raw schema
{
  "type": "object",
  "required": [
    "did",
    "handle",
    "name",
    "managingApp",
    "requiresApprovalToJoin",
    "linkEmbeds",
    "viewer"
  ],
  "properties": {
    "did": {
      "type": "string",
      "format": "did",
      "description": "The community's DID, which is the authority for all of its spaces."
    },
    "name": {
      "type": "string",
      "description": "The community's name."
    },
    "banner": {
      "type": "string",
      "format": "uri",
      "description": "URL of the community's banner, served by this AppView's blob proxy."
    },
    "handle": {
      "type": "string",
      "format": "handle",
      "description": "The community's handle."
    },
    "viewer": {
      "ref": "#viewerState",
      "type": "ref",
      "description": "The requesting user's relationship to this community."
    },
    "picture": {
      "type": "string",
      "format": "uri",
      "description": "URL of the community's icon, served by this AppView's blob proxy."
    },
    "labelers": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "did",
        "description": "A labeler."
      },
      "description": "DIDs whose labels this community honours."
    },
    "linkEmbeds": {
      "type": "boolean",
      "description": "Whether link previews are shown by default."
    },
    "description": {
      "type": "string",
      "description": "The community's description."
    },
    "managingApp": {
      "type": "string",
      "format": "did",
      "description": "The AppView that manages this community's spaces. When it is not the AppView that served this view, the client must talk to that AppView for this community's reads, writes, events and voice."
    },
    "memberCount": {
      "type": "integer",
      "description": "Number of admitted members."
    },
    "migratedFrom": {
      "type": "string",
      "format": "at-uri",
      "description": "The repo-backed community this one replaces, if any."
    },
    "requiresApprovalToJoin": {
      "type": "boolean",
      "description": "Whether joining produces an application to approve."
    }
  },
  "description": "A community as the AppView serves it."
}
invitationView object

An invitation code.

Properties

active boolean Required

Whether it can still be redeemed.

code string Required

The invitation code.

createdAt string datetime Required

When it was created.

createdBy string did Required

Who created it.

expiresAt string datetime Optional

When it stops being redeemable, if ever.

maxUses integer Optional

How many times it may be redeemed, if limited.

uses integer Optional

How many times it has been redeemed.

View raw schema
{
  "type": "object",
  "required": [
    "code",
    "createdBy",
    "active",
    "createdAt"
  ],
  "properties": {
    "code": {
      "type": "string",
      "description": "The invitation code."
    },
    "uses": {
      "type": "integer",
      "description": "How many times it has been redeemed."
    },
    "active": {
      "type": "boolean",
      "description": "Whether it can still be redeemed."
    },
    "maxUses": {
      "type": "integer",
      "description": "How many times it may be redeemed, if limited."
    },
    "createdAt": {
      "type": "string",
      "format": "datetime",
      "description": "When it was created."
    },
    "createdBy": {
      "type": "string",
      "format": "did",
      "description": "Who created it."
    },
    "expiresAt": {
      "type": "string",
      "format": "datetime",
      "description": "When it stops being redeemable, if ever."
    }
  },
  "description": "An invitation code."
}
labelView object

A label applied to a record.

Properties

createdAt string datetime Required

When it was applied.

reason string Optional

Human-readable reason.

maxLength: 512 bytes
scope array of stringuri Optional

What the label narrows to.

src string did Required

The labeler that applied it.

val string Required

The label value.

View raw schema
{
  "type": "object",
  "required": [
    "src",
    "val",
    "createdAt"
  ],
  "properties": {
    "src": {
      "type": "string",
      "format": "did",
      "description": "The labeler that applied it."
    },
    "val": {
      "type": "string",
      "description": "The label value."
    },
    "scope": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uri",
        "description": "A URI within the labelled record."
      },
      "description": "What the label narrows to."
    },
    "reason": {
      "type": "string",
      "maxLength": 512,
      "description": "Human-readable reason."
    },
    "createdAt": {
      "type": "string",
      "format": "datetime",
      "description": "When it was applied."
    }
  },
  "description": "A label applied to a record."
}
legacyCommunityView object

A repo-backed community that has not been migrated onto spaces yet, as read live from its own public repo. This is not an indexed view: the AppView holds nothing about a community until it is migrated.

Properties

channelCount integer Optional

How many channel records the legacy repo holds. Migration recreates one space per channel.

description string Optional

The community's description.

did string did Required

The legacy community's DID, which becomes the authority for its spaces once migrated.

handle string handle Optional

The community's handle, when its DID document still resolves one.

memberCount integer Optional

How many member records the legacy repo holds.

name string Required

The community's name.

viewerIsAdmin boolean Optional

Whether the requesting user may migrate this community. Only an administrator of the legacy community can.

View raw schema
{
  "type": "object",
  "required": [
    "did",
    "name"
  ],
  "properties": {
    "did": {
      "type": "string",
      "format": "did",
      "description": "The legacy community's DID, which becomes the authority for its spaces once migrated."
    },
    "name": {
      "type": "string",
      "description": "The community's name."
    },
    "handle": {
      "type": "string",
      "format": "handle",
      "description": "The community's handle, when its DID document still resolves one."
    },
    "description": {
      "type": "string",
      "description": "The community's description."
    },
    "memberCount": {
      "type": "integer",
      "description": "How many member records the legacy repo holds."
    },
    "channelCount": {
      "type": "integer",
      "description": "How many channel records the legacy repo holds. Migration recreates one space per channel."
    },
    "viewerIsAdmin": {
      "type": "boolean",
      "description": "Whether the requesting user may migrate this community. Only an administrator of the legacy community can."
    }
  },
  "description": "A repo-backed community that has not been migrated onto spaces yet, as read live from its own public repo. This is not an indexed view: the AppView holds nothing about a community until it is migrated."
}
memberView object

An admitted community member.

Properties

joinedAt string datetime Required

When the member was admitted.

nickname string Optional

Per-community display name override.

maxLength: 32 bytes
roles array of stringrecord-key Required

Roles held, highest first.

View raw schema
{
  "type": "object",
  "required": [
    "actor",
    "roles",
    "joinedAt"
  ],
  "properties": {
    "actor": {
      "ref": "social.colibri.beta.actor.defs#profileView",
      "type": "ref",
      "description": "The member."
    },
    "roles": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "record-key",
        "description": "A role."
      },
      "description": "Roles held, highest first."
    },
    "joinedAt": {
      "type": "string",
      "format": "datetime",
      "description": "When the member was admitted."
    },
    "nickname": {
      "type": "string",
      "maxLength": 32,
      "description": "Per-community display name override."
    }
  },
  "description": "An admitted community member."
}
moderationView object

An entry in a community's moderation log.

Properties

action string Required

The action taken.

Known values: ban, unban, kick
createdAt string datetime Required

When it was taken.

createdBy string did Required

Which moderator took it.

reason string Optional

Human-readable reason.

maxLength: 512 bytes
rkey string record-key Required

The log entry's record key.

View raw schema
{
  "type": "object",
  "required": [
    "rkey",
    "action",
    "subject",
    "createdBy",
    "createdAt"
  ],
  "properties": {
    "rkey": {
      "type": "string",
      "format": "record-key",
      "description": "The log entry's record key."
    },
    "action": {
      "type": "string",
      "description": "The action taken.",
      "knownValues": [
        "ban",
        "unban",
        "kick"
      ]
    },
    "reason": {
      "type": "string",
      "maxLength": 512,
      "description": "Human-readable reason."
    },
    "subject": {
      "ref": "social.colibri.beta.actor.defs#profileView",
      "type": "ref",
      "description": "Who it was taken against."
    },
    "createdAt": {
      "type": "string",
      "format": "datetime",
      "description": "When it was taken."
    },
    "createdBy": {
      "type": "string",
      "format": "did",
      "description": "Which moderator took it."
    }
  },
  "description": "An entry in a community's moderation log."
}
roleChannelOverride object

Allow and deny lists scoped to one channel.

Properties

allow array of string Optional

Permissions granted here.

channel string record-key Required

The channel's space key.

deny array of string Optional

Permissions denied here.

View raw schema
{
  "type": "object",
  "required": [
    "channel"
  ],
  "properties": {
    "deny": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "A permission identifier."
      },
      "description": "Permissions denied here."
    },
    "allow": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "A permission identifier."
      },
      "description": "Permissions granted here."
    },
    "channel": {
      "type": "string",
      "format": "record-key",
      "description": "The channel's space key."
    }
  },
  "description": "Allow and deny lists scoped to one channel."
}
roleView object

A role.

Properties

color string Optional

Hex colour as #rrggbb.

maxLength: 7 bytes
hoisted boolean Optional

Whether holders are listed separately.

memberCount integer Optional

Number of members holding this role.

mentionable boolean Optional

Whether @role mentions resolve to this role.

name string Required

Display name.

permissions array of string Required

Permissions granted.

position integer Required

Hierarchy position. Higher outranks lower.

protected boolean Optional

Whether the role is exempt from modification and deletion.

rkey string record-key Required

The role's record key.

View raw schema
{
  "type": "object",
  "required": [
    "rkey",
    "name",
    "permissions",
    "position"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "Display name."
    },
    "rkey": {
      "type": "string",
      "format": "record-key",
      "description": "The role's record key."
    },
    "color": {
      "type": "string",
      "maxLength": 7,
      "description": "Hex colour as #rrggbb."
    },
    "hoisted": {
      "type": "boolean",
      "description": "Whether holders are listed separately."
    },
    "position": {
      "type": "integer",
      "description": "Hierarchy position. Higher outranks lower."
    },
    "protected": {
      "type": "boolean",
      "description": "Whether the role is exempt from modification and deletion."
    },
    "memberCount": {
      "type": "integer",
      "description": "Number of members holding this role."
    },
    "mentionable": {
      "type": "boolean",
      "description": "Whether @role mentions resolve to this role."
    },
    "permissions": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "A permission identifier."
      },
      "description": "Permissions granted."
    },
    "channelOverrides": {
      "type": "array",
      "items": {
        "ref": "#roleChannelOverride",
        "type": "ref"
      },
      "description": "Per-channel overrides."
    }
  },
  "description": "A role."
}
viewerState object

The requesting user's relationship to a community.

Properties

applicationPending boolean Optional

Whether the user has an unapproved application.

isBanned boolean Optional

Whether the user is banned.

isMember boolean Required

Whether the user holds a member record.

isOwner boolean Optional

Whether the user holds a protected role.

permissions array of string Optional

Effective community-wide permissions.

roles array of stringrecord-key Optional

Roles the user holds.

View raw schema
{
  "type": "object",
  "required": [
    "isMember"
  ],
  "properties": {
    "roles": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "record-key",
        "description": "A role the user holds."
      },
      "description": "Roles the user holds."
    },
    "isOwner": {
      "type": "boolean",
      "description": "Whether the user holds a protected role."
    },
    "isBanned": {
      "type": "boolean",
      "description": "Whether the user is banned."
    },
    "isMember": {
      "type": "boolean",
      "description": "Whether the user holds a member record."
    },
    "permissions": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "A permission identifier."
      },
      "description": "Effective community-wide permissions."
    },
    "applicationPending": {
      "type": "boolean",
      "description": "Whether the user has an unapproved application."
    }
  },
  "description": "The requesting user's relationship to a community."
}

Lexicon Garden

@