social.colibri.beta.role.update

Updates a role's settings.

Repository @colibri.social did:plc:mprdjqjluoswa7awzggaggj3 namespace authority
Details · procedure
Kindprocedure
Authorityrole.beta.colibri.social
Indexed
cid bafyreig7x23r26r7dfrfe77cqarscvqsv6e7pmxar5m36qy5jpnb7vvxea

Checks

Valid
  • unlimited-string defs.main.input.schema.properties.permissions.itemsNo maxLength, maxGraphemes or format limits this string.
JSONDownload
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Updates a role's settings.",
      "errors": [
        {
          "description": "The request is missing, malformed, or unverifiable service auth.",
          "name": "AuthRequired"
        },
        {
          "description": "The caller lacks the role.manage permission.",
          "name": "Forbidden"
        },
        {
          "description": "No community exists at the given DID.",
          "name": "CommunityNotFound"
        },
        {
          "description": "No role exists at the given record key.",
          "name": "RoleNotFound"
        },
        {
          "description": "The role is marked protected and cannot be modified.",
          "name": "RoleProtected"
        },
        {
          "description": "The change would place the role at or above the caller's highest role position, or grants a permission the caller does not hold.",
          "name": "RoleHierarchy"
        },
        {
          "description": "The AppView cannot act as the community because its stored credentials are missing or unusable.",
          "name": "CredentialsUnavailable"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "badge": {
              "description": "An icon badge. Image badges are set with social.colibri.beta.role.putBadgeImage. Takes precedence over removeBadge.",
              "ref": "social.colibri.beta.community.defs#roleIconBadge",
              "type": "ref"
            },
            "channelOverrides": {
              "description": "Per-channel overrides.",
              "items": {
                "description": "A per-channel permission override.",
                "ref": "social.colibri.beta.community.defs#roleChannelOverride",
                "type": "ref"
              },
              "type": "array"
            },
            "color": {
              "description": "Hex colour as #rrggbb.",
              "maxLength": 7,
              "type": "string"
            },
            "community": {
              "description": "The community the role belongs to.",
              "format": "did",
              "type": "string"
            },
            "emojiBadge": {
              "description": "An emoji badge. Cannot be combined with badge. Takes precedence over removeBadge.",
              "ref": "social.colibri.beta.community.defs#roleEmojiBadge",
              "type": "ref"
            },
            "hoisted": {
              "description": "Whether holders are listed separately in the member list.",
              "type": "boolean"
            },
            "mentionable": {
              "description": "Whether @role mentions resolve to this role.",
              "type": "boolean"
            },
            "name": {
              "description": "Display name.",
              "maxLength": 32,
              "minLength": 1,
              "type": "string"
            },
            "permissions": {
              "description": "Permissions granted by this role.",
              "items": {
                "description": "A namespaced permission identifier.",
                "type": "string"
              },
              "type": "array"
            },
            "position": {
              "description": "Hierarchy position. Higher outranks lower.",
              "type": "integer"
            },
            "removeBadge": {
              "description": "Removes the role's badge, whichever kind it is. Ignored when badge or emojiBadge is also given.",
              "type": "boolean"
            },
            "role": {
              "description": "The role's record key.",
              "format": "record-key",
              "type": "string"
            }
          },
          "required": [
            "community",
            "role"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "role": {
              "description": "The updated role.",
              "ref": "social.colibri.beta.community.defs#roleView",
              "type": "ref"
            }
          },
          "required": [
            "role"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "social.colibri.beta.role.update",
  "lexicon": 1
}