{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Mirror of one account's role in one home; rkey <homeId>-<did>. The Service Agent Node database is authoritative; this record exists so the registry can be rebuilt from the sphere.",
      "key": "any",
      "record": {
        "properties": {
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "did": {
            "format": "did",
            "type": "string"
          },
          "home": {
            "format": "tid",
            "type": "string"
          },
          "parentSlot": {
            "description": "Present when role is parent.",
            "maximum": 2,
            "minimum": 1,
            "type": "integer"
          },
          "role": {
            "knownValues": [
              "rootAdmin",
              "mainAdmin",
              "member",
              "parent"
            ],
            "type": "string"
          },
          "status": {
            "knownValues": [
              "active",
              "removed",
              "left"
            ],
            "type": "string"
          },
          "updatedAt": {
            "format": "datetime",
            "type": "string"
          }
        },
        "required": [
          "home",
          "did",
          "role",
          "status",
          "createdAt",
          "updatedAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "ai.newnal.illi.service.homeLink",
  "lexicon": 1
}
