{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A community-side member record granting a user roles within the community. Lives on the community repo and is written when an admission is finalized.",
      "key": "tid",
      "record": {
        "properties": {
          "$type": {
            "description": "The type of the record.",
            "format": "nsid",
            "type": "string"
          },
          "fromMembership": {
            "description": "Optional AT-URI of the user's `social.colibri.membership` declaration this admission was based on.",
            "format": "at-uri",
            "type": "string"
          },
          "joinedAt": {
            "format": "datetime",
            "type": "string"
          },
          "nickname": {
            "description": "Optional per-community display-name override for this member.",
            "maxLength": 32,
            "type": "string"
          },
          "roles": {
            "description": "Role record-keys assigned to this member on the same community repo.",
            "items": {
              "format": "record-key",
              "type": "string"
            },
            "type": "array"
          },
          "subject": {
            "description": "DID of the admitted user.",
            "format": "did",
            "type": "string"
          }
        },
        "required": [
          "subject",
          "joinedAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "social.colibri.member",
  "lexicon": 1,
  "revision": 1
}
