{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/asap-cool/json-schema/asap-cool-event-view-schema.json",
  "title": "EventView",
  "description": "A native event, on the wire.\n\nA private event seen by someone other than its owner comes back as a busy\nslot: `busy = true`, and every detail (`title`, `body`, `location`,\n`conference_url`, `target`, `contact_id`, attendees) is `null` or empty.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/asap-cool-calendar-api-openapi.yml#/components/schemas/EventView",
  "type": "object",
  "required": [
    "id",
    "kind",
    "status",
    "visibility",
    "busy",
    "all_day",
    "starts_at",
    "ends_at",
    "tz",
    "sequence",
    "exceptions",
    "attendees",
    "created_at",
    "updated_at"
  ],
  "properties": {
    "all_day": {
      "type": "boolean",
      "description": "Whether it spans whole days."
    },
    "attendees": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AttendeeView"
      },
      "description": "Invited people."
    },
    "body": {
      "type": [
        "string",
        "null"
      ],
      "description": "Notes."
    },
    "busy": {
      "type": "boolean",
      "description": "Whether the caller only sees a busy slot."
    },
    "conference_url": {
      "type": [
        "string",
        "null"
      ],
      "description": "Video-call link."
    },
    "contact_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "Contact derived from the target."
    },
    "created_at": {
      "type": "string",
      "description": "Creation timestamp (RFC3339)."
    },
    "ends_at": {
      "type": "string",
      "description": "End of the (first) occurrence (RFC3339)."
    },
    "exceptions": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ExceptionView"
      },
      "description": "Edited or cancelled occurrences."
    },
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Stable identifier."
    },
    "kind": {
      "type": "string",
      "description": "`meeting`, `focus` or `personal`."
    },
    "location": {
      "type": [
        "string",
        "null"
      ],
      "description": "Where."
    },
    "owner_user_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "Owner, `null` for an org-level event."
    },
    "reminder_minutes": {
      "type": [
        "integer",
        "null"
      ],
      "format": "int32",
      "description": "Minutes before each occurrence the owner is reminded (in-app and Web\nPush), `null` for no reminder."
    },
    "rrule": {
      "type": [
        "string",
        "null"
      ],
      "description": "RRULE, `null` for a one-off."
    },
    "sequence": {
      "type": "integer",
      "format": "int32",
      "description": "RFC 5545 SEQUENCE."
    },
    "starts_at": {
      "type": "string",
      "description": "Start of the (first) occurrence (RFC3339)."
    },
    "status": {
      "type": "string",
      "description": "`confirmed`, `tentative` or `cancelled`."
    },
    "target": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "$ref": "#/$defs/EventTargetView",
          "description": "Attached object."
        }
      ]
    },
    "title": {
      "type": [
        "string",
        "null"
      ],
      "description": "Title."
    },
    "tz": {
      "type": "string",
      "description": "IANA zone."
    },
    "updated_at": {
      "type": "string",
      "description": "Last write timestamp (RFC3339)."
    },
    "visibility": {
      "type": "string",
      "description": "`org` or `private`."
    }
  },
  "$defs": {
    "AttendeeView": {
      "type": "object",
      "description": "An attendee, on the wire.",
      "required": [
        "id",
        "email",
        "response"
      ],
      "properties": {
        "contact_id": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid",
          "description": "Matching contact."
        },
        "display_name": {
          "type": [
            "string",
            "null"
          ],
          "description": "Display name."
        },
        "email": {
          "type": "string",
          "description": "Address."
        },
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "Stable identifier."
        },
        "invited_at": {
          "type": [
            "string",
            "null"
          ],
          "description": "When the last invitation went out (RFC3339)."
        },
        "responded_at": {
          "type": [
            "string",
            "null"
          ],
          "description": "When they answered (RFC3339)."
        },
        "response": {
          "type": "string",
          "description": "`needs_action`, `accepted`, `declined` or `tentative`."
        }
      }
    },
    "EventTargetView": {
      "type": "object",
      "description": "The object an event is attached to, on the wire.",
      "required": [
        "kind",
        "id"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "Id of the object in its own schema."
        },
        "kind": {
          "type": "string",
          "description": "`contact`, `deal`, `invoice_document` or `envelope`."
        }
      }
    },
    "ExceptionView": {
      "type": "object",
      "description": "An edited or cancelled occurrence of a series.",
      "required": [
        "original_start",
        "cancelled"
      ],
      "properties": {
        "cancelled": {
          "type": "boolean",
          "description": "Whether it is cancelled."
        },
        "ends_at": {
          "type": [
            "string",
            "null"
          ],
          "description": "Moved end (RFC3339)."
        },
        "location": {
          "type": [
            "string",
            "null"
          ],
          "description": "Overridden location."
        },
        "original_start": {
          "type": "string",
          "description": "The occurrence's identity: the start the rule produced (RFC3339)."
        },
        "starts_at": {
          "type": [
            "string",
            "null"
          ],
          "description": "Moved start (RFC3339)."
        },
        "title": {
          "type": [
            "string",
            "null"
          ],
          "description": "Overridden title."
        }
      }
    }
  }
}