{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "One appointment, written into the invitee's own repo and linked back to the host's meeting type. The invitee owns the record (and may cancel it); the host aggregates bookings through the back-link index on `eventType.uri`.",
      "key": "tid",
      "record": {
        "properties": {
          "contact": {
            "description": "Optional free-text contact the invitee chose to share, e.g. an email address.",
            "maxLength": 300,
            "type": "string"
          },
          "createdAt": {
            "description": "When the booking was created.",
            "format": "datetime",
            "type": "string"
          },
          "endAt": {
            "description": "Appointment end instant (UTC); startAt + the event type's duration.",
            "format": "datetime",
            "type": "string"
          },
          "eventType": {
            "description": "Strong link to the booked meeting type. Its author is the host.",
            "properties": {
              "cid": {
                "description": "Optional CID of the event type record version.",
                "format": "cid",
                "type": "string"
              },
              "uri": {
                "description": "The event type record's at-uri.",
                "format": "at-uri",
                "type": "string"
              }
            },
            "required": [
              "uri"
            ],
            "type": "object"
          },
          "host": {
            "description": "DID of the host who owns the event type.",
            "format": "did",
            "type": "string"
          },
          "inviteeName": {
            "description": "Optional name the invitee gave the host.",
            "maxLength": 200,
            "type": "string"
          },
          "note": {
            "description": "Optional message from the invitee.",
            "maxLength": 500,
            "type": "string"
          },
          "startAt": {
            "description": "Appointment start instant (UTC).",
            "format": "datetime",
            "type": "string"
          },
          "status": {
            "description": "Current state of the appointment; only 'confirmed' bookings occupy a slot.",
            "knownValues": [
              "confirmed",
              "cancelled"
            ],
            "type": "string"
          }
        },
        "required": [
          "eventType",
          "host",
          "startAt",
          "endAt",
          "status",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "boo.sky.convene.booking",
  "lexicon": 1
}
