{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/comingup-today/json-schema/comingup-today-ok-envelope-calendar-events-schema.json",
  "title": "OkEnvelopeCalendarEvents",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/comingup-today-calendars-api-openapi.yml#/components/schemas/OkEnvelopeCalendarEvents",
  "type": "object",
  "properties": {
    "data": {
      "$ref": "#/$defs/CalendarEventsResponseData"
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false,
  "$defs": {
    "CalendarEventsBucket": {
      "type": "object",
      "properties": {
        "calendarId": {
          "type": "string"
        },
        "provider": {
          "type": "string",
          "minLength": 1
        },
        "events": {
          "$ref": "#/$defs/CalendarProviderEventsPayload"
        }
      },
      "required": [
        "calendarId",
        "provider",
        "events"
      ],
      "additionalProperties": false
    },
    "CalendarEventsResponseData": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CalendarEventsBucket"
          }
        }
      },
      "required": [
        "items"
      ],
      "additionalProperties": {}
    },
    "CalendarProviderAllDayEvent": {
      "type": "object",
      "properties": {
        "id": {
          "type": [
            "string",
            "null"
          ]
        },
        "iCalUID": {
          "type": [
            "string",
            "null"
          ]
        },
        "summary": {
          "type": [
            "string",
            "null"
          ]
        },
        "location": {
          "type": [
            "string",
            "null"
          ]
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        },
        "htmlLink": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "attendees": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CalendarProviderEventPerson"
          }
        },
        "start": {
          "$ref": "#/$defs/CalendarProviderEventAllDayPoint"
        },
        "end": {
          "$ref": "#/$defs/CalendarProviderEventAllDayPoint"
        }
      },
      "required": [
        "start",
        "end"
      ],
      "additionalProperties": false
    },
    "CalendarProviderEvent": {
      "anyOf": [
        {
          "$ref": "#/$defs/CalendarProviderTimedEvent"
        },
        {
          "$ref": "#/$defs/CalendarProviderAllDayEvent"
        }
      ]
    },
    "CalendarProviderEventAllDayPoint": {
      "type": "object",
      "properties": {
        "date": {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
        }
      },
      "required": [
        "date"
      ],
      "additionalProperties": false
    },
    "CalendarProviderEventPerson": {
      "type": "object",
      "properties": {
        "displayName": {
          "type": [
            "string",
            "null"
          ]
        },
        "email": {
          "type": [
            "string",
            "null"
          ],
          "format": "email"
        },
        "responseStatus": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "CalendarProviderEventTimedPoint": {
      "type": "object",
      "properties": {
        "dateTime": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "dateTime"
      ],
      "additionalProperties": false
    },
    "CalendarProviderEventsPayload": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CalendarProviderEvent"
          }
        }
      },
      "required": [
        "items"
      ],
      "additionalProperties": {}
    },
    "CalendarProviderTimedEvent": {
      "type": "object",
      "properties": {
        "id": {
          "type": [
            "string",
            "null"
          ]
        },
        "iCalUID": {
          "type": [
            "string",
            "null"
          ]
        },
        "summary": {
          "type": [
            "string",
            "null"
          ]
        },
        "location": {
          "type": [
            "string",
            "null"
          ]
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        },
        "htmlLink": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "attendees": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CalendarProviderEventPerson"
          }
        },
        "start": {
          "$ref": "#/$defs/CalendarProviderEventTimedPoint"
        },
        "end": {
          "$ref": "#/$defs/CalendarProviderEventTimedPoint"
        }
      },
      "required": [
        "start",
        "end"
      ],
      "additionalProperties": false
    }
  }
}