{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/acculynx/json-schema/acculynx-calendar-search-event-collection-schema.json",
  "title": "calendarSearchEventCollection",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/acculynx-calendar-api-openapi.yml#/components/schemas/calendarSearchEventCollection",
  "allOf": [
    {
      "$ref": "#/$defs/baseCollection"
    },
    {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/calendarSearchEvent"
          }
        }
      }
    }
  ],
  "$defs": {
    "baseCollection": {
      "type": "object",
      "properties": {
        "count": {
          "type": "integer",
          "description": "The total number of items matching the current query."
        },
        "pageSize": {
          "type": "integer",
          "description": "The requested or default page size."
        },
        "pageStartIndex": {
          "type": "integer",
          "description": "The requested or default index of the first element to return."
        }
      }
    },
    "calendarSearchEvent": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "The unique GUID of the calendar event."
        },
        "eventType": {
          "type": "string",
          "enum": [
            "All",
            "Personal",
            "InitialAppointment",
            "MaterialDelivery",
            "CrewLabor"
          ]
        },
        "title": {
          "type": "string",
          "description": "The name of the calendar event."
        },
        "attendees": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/companyUserLink"
          }
        },
        "job": {
          "$ref": "#/$defs/jobLink"
        },
        "allDay": {
          "type": "boolean",
          "description": "Whether the event is an all day event."
        },
        "start": {
          "type": "string",
          "format": "date-time",
          "description": "The start date/time of the event."
        },
        "end": {
          "type": "string",
          "format": "date-time",
          "description": "The end date/time of the event."
        },
        "jobName": {
          "type": "string",
          "description": "The name of the job associated with the event, if any.\\"
        },
        "location": {
          "type": "string",
          "description": "The address where the appointment is to take place."
        },
        "sharedWithCustomerPortal": {
          "type": "boolean",
          "description": "Indicates if the event is shared with the customer portal."
        },
        "_link": {
          "type": "string",
          "description": "The URI of the this calendar event."
        }
      }
    },
    "companyUserLink": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The unique GUID of the AccuLynx User.",
          "format": "uuid"
        },
        "_link": {
          "type": "string",
          "description": "The unique URI of the AccuLynx User."
        }
      },
      "description": ""
    },
    "jobLink": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "The job's unique ID."
        },
        "_link": {
          "type": "string",
          "description": "The URI of this Job."
        }
      }
    }
  }
}