{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aisle-wedding/json-schema/aisle-wedding-event-schema.json",
  "title": "Event",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aisle-wedding-openapi.json#/components/schemas/Event",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^evt_.+$"
    },
    "name": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "enum": [
        "welcome_dinner",
        "ceremony",
        "reception",
        "brunch",
        "rehearsal",
        "cocktail_hour",
        "after_party",
        "activity",
        "other"
      ]
    },
    "starts_at": {
      "type": "string",
      "format": "date-time",
      "description": "An instant, not a wall clock. Format it in the wedding's `timezone` from `GET /wedding`, never in the reader's zone."
    },
    "ends_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "An instant, not a wall clock. Format it in the wedding's `timezone` from `GET /wedding`, never in the reader's zone."
    },
    "all_day": {
      "type": "boolean",
      "description": "True for an all-day item, such as a travel day: it has a day and no time. `starts_at` is then the start of its first day in the wedding's `timezone` and `ends_at`, when set, the start of its last day; show the days, never midnight. On a write, any time sent with the days is dropped. Defaults to false."
    },
    "venue": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "address": {
          "type": [
            "string",
            "null"
          ]
        },
        "latitude": {
          "type": [
            "string",
            "null"
          ]
        },
        "longitude": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "images": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "dress_code_id": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^drc_.+$"
    },
    "meal_selection": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "deadline": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "An instant, not a wall clock. Format it in the wedding's `timezone` from `GET /wedding`, never in the reader's zone."
        },
        "options": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "dietary_tags": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "id",
              "name"
            ]
          }
        }
      }
    },
    "ticket": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "required": {
          "type": "boolean"
        },
        "price": {
          "type": [
            "string",
            "null"
          ]
        },
        "pay_later": {
          "type": "boolean",
          "description": "When true, an attending reply is recorded before the ticket is paid and the ticket stays owed. When false, an attending reply to a ticketed event waits for a completed ticket payment."
        }
      }
    },
    "rsvp": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "asks_separately": {
          "type": "boolean"
        },
        "options": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "id": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "counts_as": {
                "type": "string",
                "enum": [
                  "attending",
                  "maybe",
                  "declined"
                ]
              }
            },
            "required": [
              "id",
              "label",
              "counts_as"
            ]
          }
        }
      }
    },
    "visibility": {
      "type": "string",
      "enum": [
        "public",
        "invite_only",
        "internal"
      ]
    },
    "audience_tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "audience_property_ids": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^prp_.+$"
      }
    },
    "transport_note": {
      "type": [
        "string",
        "null"
      ]
    },
    "transport_legs": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "location": {
            "type": "string"
          },
          "time": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "An instant, not a wall clock. Format it in the wedding's `timezone` from `GET /wedding`, never in the reader's zone."
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "audience_tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "audience_properties": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^prp_.+$"
            }
          },
          "audience_undecided": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "location",
          "time",
          "note",
          "audience_tags",
          "audience_properties"
        ]
      }
    },
    "sort_order": {
      "type": "integer"
    },
    "seating_not_required": {
      "type": "boolean"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  },
  "required": [
    "id",
    "name",
    "type",
    "starts_at",
    "ends_at",
    "all_day",
    "venue",
    "description",
    "images",
    "dress_code_id",
    "meal_selection",
    "ticket",
    "rsvp",
    "visibility",
    "audience_tags",
    "audience_property_ids",
    "transport_note",
    "transport_legs",
    "sort_order",
    "seating_not_required",
    "created_at",
    "updated_at"
  ]
}