{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A share set staged by the photographer, each share wrapped only to its own manager. Deleted once every manager has adopted. The record key is the entity id in hex.",
      "key": "any",
      "record": {
        "properties": {
          "faces": {
            "items": {
              "ref": "#stagedFace",
              "type": "ref"
            },
            "maxLength": 2,
            "minLength": 1,
            "type": "array"
          },
          "photographer": {
            "description": "Who took the photo, when the stager is not the photographer: a manager re-issuing shares to a new manager list (decision 9). Adopters honour it only from a current manager, and wrap the photographer's copy of each share to them.",
            "format": "did",
            "type": "string"
          },
          "photographerKey": {
            "description": "The whole slice key wrapped to the photographer, so they see their own photo's faces before the managers adopt and can re-stage a face a departed manager stranded. Deleted with the staged set.",
            "maxLength": 1280,
            "minLength": 1,
            "type": "bytes"
          },
          "previews": {
            "description": "The whole slice key wrapped to each manager personally, so a manager who approves every tag can see the face before deciding. Deleted with the staged set.",
            "items": {
              "ref": "#previewWrap",
              "type": "ref"
            },
            "maxLength": 128,
            "type": "array"
          },
          "sliceBinding": {
            "description": "The slice binding: entity id (16) ‖ payload context (16) ‖ SHA-256 of the plaintext base (32).",
            "maxLength": 64,
            "minLength": 64,
            "type": "bytes"
          }
        },
        "required": [
          "sliceBinding",
          "faces"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "previewWrap": {
      "properties": {
        "managerId": {
          "format": "did",
          "type": "string"
        },
        "profileId": {
          "maxLength": 32,
          "minLength": 32,
          "type": "bytes"
        },
        "wrap": {
          "maxLength": 1280,
          "minLength": 1,
          "type": "bytes"
        }
      },
      "required": [
        "profileId",
        "managerId",
        "wrap"
      ],
      "type": "object"
    },
    "stagedFace": {
      "properties": {
        "generation": {
          "maximum": 4294967295,
          "minimum": 0,
          "type": "integer"
        },
        "profileId": {
          "description": "The profile's id: the SHA-256 of its generation-0 manager list.",
          "maxLength": 32,
          "minLength": 32,
          "type": "bytes"
        },
        "shares": {
          "items": {
            "ref": "#stagedShare",
            "type": "ref"
          },
          "maxLength": 64,
          "minLength": 1,
          "type": "array"
        }
      },
      "required": [
        "profileId",
        "generation",
        "shares"
      ],
      "type": "object"
    },
    "stagedShare": {
      "properties": {
        "managerId": {
          "format": "did",
          "type": "string"
        },
        "transportWrap": {
          "maxLength": 1280,
          "minLength": 1,
          "type": "bytes"
        }
      },
      "required": [
        "managerId",
        "transportWrap"
      ],
      "type": "object"
    }
  },
  "id": "app.brightblur.face.stagedShares",
  "lexicon": 1
}
