{
"id": "social.colibri.beta.community.setMemberRoles",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"community",
"subject",
"roles"
],
"properties": {
"roles": {
"type": "array",
"items": {
"type": "string",
"format": "record-key",
"description": "A role."
},
"description": "The complete new set of roles the member should hold."
},
"subject": {
"type": "string",
"format": "did",
"description": "The member whose roles are being set."
},
"community": {
"type": "string",
"format": "did",
"description": "The community the member belongs to."
}
}
},
"encoding": "application/json"
},
"errors": [
{
"name": "AuthRequired",
"description": "The request is missing, malformed, or unverifiable service auth."
},
{
"name": "Forbidden",
"description": "The requesting user lacks the role.manage permission."
},
{
"name": "CommunityNotFound",
"description": "No community exists with that DID."
},
{
"name": "MemberNotFound",
"description": "The subject does not hold a member record in this community."
},
{
"name": "RoleNotFound",
"description": "One of the requested roles does not exist."
},
{
"name": "RoleHierarchy",
"description": "The requesting user cannot grant or revoke a role at or above their own highest position."
},
{
"name": "CredentialsUnavailable",
"description": "The AppView's stored credentials for this community are missing or unusable."
}
],
"output": {
"schema": {
"type": "object",
"required": [
"member"
],
"properties": {
"member": {
"ref": "social.colibri.beta.community.defs#memberView",
"type": "ref",
"description": "The updated member."
}
}
},
"encoding": "application/json"
},
"description": "Sets the complete set of roles a member holds."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}