{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A staff role, keyed by the subject DID. Written only by the root account into the staff space.",
      "key": "any",
      "record": {
        "properties": {
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "grantedBy": {
            "format": "did",
            "type": "string"
          },
          "grants": {
            "description": "Extra powers a moderator holds. Admins have them all.",
            "items": {
              "knownValues": [
                "flags",
                "flagGroups"
              ],
              "maxLength": 32,
              "type": "string"
            },
            "maxLength": 8,
            "type": "array"
          },
          "note": {
            "maxGraphemes": 300,
            "maxLength": 3000,
            "type": "string"
          },
          "role": {
            "knownValues": [
              "admin",
              "moderator"
            ],
            "maxLength": 32,
            "type": "string"
          },
          "subject": {
            "format": "did",
            "type": "string"
          }
        },
        "required": [
          "subject",
          "role",
          "grantedBy",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "computer.localnetwork.staff.role",
  "lexicon": 1
}
