{
"id": "social.colibri.beta.community.defs",
"defs": {
"roleView": {
"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."
},
"labelView": {
"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."
},
"memberView": {
"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."
},
"channelView": {
"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."
},
"viewerState": {
"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."
},
"categoryView": {
"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."
},
"communityView": {
"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": {
"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."
},
"moderationView": {
"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."
},
"applicationView": {
"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": {
"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."
},
"channelViewerState": {
"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."
},
"roleChannelOverride": {
"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."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}