Schema for Caesar Event Metadata

From EventMetadata.schema.yaml (caesar/EventMetadata.schema)

---
$id: https://skeleton.botmd.io/caesar/EventMetadata.schema
$schema: http://json-schema.org/draft-07/schema

title: Event Metadata
description: Metadata for the event. Usually populated by the provider.

type: object
additionalProperties: false
required: []

properties:
  acuity:
    title: Acuity
    description: Event metadata for Acuity.

    $ref: "#/definitions/Acuity"
  #end acuity

  calendly:
    title: Calendly
    description: Event metadata for Calendly. Calendly events are determined by `scheduled_event/invitee` combination.

    $ref: "#/definitions/Calendly"
  #end calendly

  cleo:
    title: Cleo
    description: Event metadata for Cleo.

    $ref: "#/definitions/Cleo"

  google_calendar:
    title: Google Calendar
    description: Event metadata for Google Calendar.

    $ref: "#/definitions/Google Calendar"
  #end google_calendar

  hummingbird:
    title: HummingBird
    description: Event metadata for HummingBird.

    $ref: "#/definitions/HummingBird"

  icalendar:
    title: Google Calendar
    description: Event metadata for iCalendar.

    $ref: "#/definitions/iCalendar"
  #end icalendar

  mandaya:
    title: Mandaya
    description: Event metadata for Mandaya.

    $ref: "#/definitions/Mandaya"

  additional_data:
    title: Additional Data
    description: Additional data that may be provided as part of the event payload stored here as key-value pairs.

    type: array
    minItems: 1
    item:
      type: object
      additionalProperties: false
      required: [key, value]

      properties:
        key:
          title: Key
          description: Key for the additional data entry.
          type: string
          minLength: 1

        value:
          title: Value
          description: Value for the additional data entry.
          type: string
          minLength: 1
      #end properties
    #end item
  #end additional_data

  qa_parser:
    title: QA Parser
    description: Data extracted by the `QAParserMixin`.

    $ref: "#/definitions/QAParser"
  #end qa_parser
#end properties

definitions:
  Acuity:
    type: object
    additionalProperties: false
    required: [scheduled_event, webhook_payload]

    properties:
      scheduled_event:
        title: Scheduled Event
        description: The `scheduled_event` object from Acuity.
        type: object
        required: []
        additionalProperties: true

      webhook_payload:
        title: Webhook Payload
        description: The most recent webhook payload for this event.

        type: object
        required: []
        additionalProperties: true
    #end properties
  #end Acuity

  Calendly:
    type: object
    additionalProperties: false
    required: [scheduled_event, webhook_payload]

    properties:
      scheduled_event:
        title: Scheduled Event
        description: The `scheduled_event` object from Calendly.
        type: object
        required: []
        additionalProperties: true

      webhook_payload:
        title: Webhook Payload
        description: The most recent webhook payload for this event.

        type: object
        required: []
        additionalProperties: true
    #end properties
  #end Calendly

  Cleo:
    type: object
    additionalProperties: false
    required: [webhook_payloads]

    properties:
      webhook_payloads:
        title: Webhook Payloads
        description: The webhook payloads for this event.

        type: array
        item:
          type: object
          additionalProperties: true
          required: []

  Google Calendar:
    type: object
    additionalProperties: true
    required: [event_resource]

    properties:
      event_resource:
        title: Event Resource
        description: The event resource object returned from Google Calendar. See https://developers.google.com/calendar/api/v3/reference/events#resource
        type: object
        required: [etag, id]
        additionalProperties: true
    #end properties
  #end Google Calendar

  HummingBird:
    type: object
    additionalProperties: false
    required: [scheduled_event, webhook_payloads]

    properties:
      scheduled_event:
        title: Scheduled Event
        description: The `scheduled_event` object from HummingBird.
        type: object
        required: []
        additionalProperties: true

      webhook_payloads:
        title: Webhook Payloads
        description: All webhook payloads received for this event.

        type: array
        item:
          type: object
          additionalProperties: true
          required: []

  iCalendar:
    type: object
    additionalProperties: true
    required: [ical_string]

    properties:
      ical_string:
        title: iCal String
        description: The event in iCal format.

        type: string
        minLength: 1
      #end ical_string

      etag:
        title: ETag
        description: Hash digest of content to detect changes. We currently use SHA-256.
        type: string
        minLength: 1
    #end properties
  #end iCalendar

  Mandaya:
    type: object
    additionalProperties: false
    required: [webhook_payloads]

    properties:
      webhook_payloads:
        title: Webhook Payloads
        description: The webhook payloads for this event.

        type: array
        item:
          type: object
          additionalProperties: true
          required: []

  QAParser:
    type: object
    additionalProperties: false
    required: [extracted_data, qa_pairs]

    properties:
      extracted_data:
        title: Extracted Data
        description: Normalized data extracted by the `QAParserMixin`.

        type: object
        additionalProperties: true

      qa_pairs:
        title: QA Pairs
        description: QA Pairs generated by the provider.

        type: array
        item:
          type: object
          additionalProperties: false
          required: [question, answer]

          properties:
            question:
              title: Question
              description: Question
              type: string
              minLength: 1

            answer:
              title: Answer
              description: Answer to the question.
              type: object
              additionalProperties: false
              properties:
                type:
                  title: Type
                  description: Type of the answer.
                  type: string
                  minLength: 1
                value:
                  title: Value
                  description: Value for the answer.
                  type: string
                  minLength: 1
#end definitions

[Main Page] [Schema Documentation] [Examples]