{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Public webhook metadata stored in the user's PDS. Links to a private io.atcr.hold.webhook record on the hold where URL and secret are stored. Part of a two-record split: this record is visible via ATProto (Jetstream), the hold record is not.",
      "key": "tid",
      "record": {
        "properties": {
          "createdAt": {
            "description": "RFC3339 timestamp of when the webhook was created",
            "format": "datetime",
            "type": "string"
          },
          "holdDid": {
            "description": "DID of the hold where the webhook is configured",
            "format": "did",
            "type": "string"
          },
          "privateCid": {
            "description": "CID of the corresponding io.atcr.hold.webhook record on the hold",
            "maxLength": 128,
            "type": "string"
          },
          "triggers": {
            "description": "Bitmask of trigger events: 0x01=scan:first, 0x02=scan:all, 0x04=scan:changed",
            "minimum": 0,
            "type": "integer"
          },
          "updatedAt": {
            "description": "RFC3339 timestamp of when the webhook was last updated",
            "format": "datetime",
            "type": "string"
          }
        },
        "required": [
          "holdDid",
          "triggers",
          "privateCid",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "io.atcr.sailor.webhook",
  "lexicon": 1
}
