openapi: 3.1.0
info:
  title: Live Audio Events Webhooks
  version: 1.0.0

tags:
  - name: Live Audio
    description: ""
  - name: Live Transcripts
    description: ""
  - name: Company
    description: ""
  - name: Event
    description: ""
  - name: Reports
    description: ""
  - name: Slides
    description: ""
  - name: Transcript
    description: ""
  - name: Audio
    description: ""
  - name: Summary - Events
    description: ""
  - name: Summary - Reports
    description: ""
  - name: Summary - Slides
    description: ""
  - name: Summary - Transcripts
    description: ""

webhooks:
  ###############################################
  # 1) Company
  ###############################################
  company.created:
    post:
      summary: Company created
      description: HTTP POST webhook triggered when a company is created.
      operationId: companyCreatedEvent
      parameters:
        - $ref: "#/components/parameters/WebhookId"
        - $ref: "#/components/parameters/WebhookTimestamp"
        - $ref: "#/components/parameters/WebhookSignature"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CompanyCreatedEvent"
      responses:
        "200":
          description: Webhook received successfully
      tags:
        - Company
  company.updated:
    post:
      summary: Company updated
      description: HTTP POST webhook triggered when a company is updated.
      operationId: companyUpdatedEvent
      parameters:
        - $ref: "#/components/parameters/WebhookId"
        - $ref: "#/components/parameters/WebhookTimestamp"
        - $ref: "#/components/parameters/WebhookSignature"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CompanyUpdatedEvent"
      responses:
        "200":
          description: Webhook received successfully
      tags:
        - Company

  company.deleted:
    post:
      summary: Company deleted
      description: HTTP POST webhook triggered when a company is deleted.
      operationId: companyDeletedEvent
      parameters:
        - $ref: "#/components/parameters/WebhookId"
        - $ref: "#/components/parameters/WebhookTimestamp"
        - $ref: "#/components/parameters/WebhookSignature"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CompanyDeletedEvent"
      responses:
        "200":
          description: Webhook received successfully
      tags:
        - Company

  ###############################################
  # 2) Event
  ###############################################
  event.created:
    post:
      summary: Event created
      description: HTTP POST webhook triggered when an event is created.
      operationId: eventCreatedEvent
      parameters:
        - $ref: "#/components/parameters/WebhookId"
        - $ref: "#/components/parameters/WebhookTimestamp"
        - $ref: "#/components/parameters/WebhookSignature"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/EventCreatedEvent"
      responses:
        "200":
          description: Webhook received successfully
      tags:
        - Event
  event.updated:
    post:
      summary: Event updated
      description: HTTP POST webhook triggered when an event is updated.
      operationId: eventUpdatedEvent
      parameters:
        - $ref: "#/components/parameters/WebhookId"
        - $ref: "#/components/parameters/WebhookTimestamp"
        - $ref: "#/components/parameters/WebhookSignature"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/EventUpdatedEvent"
      responses:
        "200":
          description: Webhook received successfully
      tags:
        - Event
  event.deleted:
    post:
      summary: Event deleted
      description: HTTP POST webhook triggered when an event is deleted.
      operationId: eventDeletedEvent
      parameters:
        - $ref: "#/components/parameters/WebhookId"
        - $ref: "#/components/parameters/WebhookTimestamp"
        - $ref: "#/components/parameters/WebhookSignature"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/EventDeletedEvent"
      responses:
        "200":
          description: Webhook received successfully
      tags:
        - Event

  ################################################
  # 3) Audio
  ################################################
  audio.created:
    post:
      summary: Audio created
      description: HTTP POST webhook triggered when an audio is created.
      operationId: audioCreatedEvent
      parameters:
        - $ref: "#/components/parameters/WebhookId"
        - $ref: "#/components/parameters/WebhookTimestamp"
        - $ref: "#/components/parameters/WebhookSignature"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AudioCreatedEvent"
      responses:
        "200":
          description: Webhook received successfully
      tags:
        - Audio

  audio.updated:
    post:
      summary: Audio updated
      description: HTTP POST webhook triggered when an audio is updated.
      operationId: audioUpdatedEvent
      parameters:
        - $ref: "#/components/parameters/WebhookId"
        - $ref: "#/components/parameters/WebhookTimestamp"
        - $ref: "#/components/parameters/WebhookSignature"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AudioUpdatedEvent"
      responses:
        "200":
          description: Webhook received successfully
      tags:
        - Audio

  audio.deleted:
    post:
      summary: Audio deleted
      description: HTTP POST webhook triggered when an audio is deleted.
      operationId: audioDeletedEvent
      parameters:
        - $ref: "#/components/parameters/WebhookId"
        - $ref: "#/components/parameters/WebhookTimestamp"
        - $ref: "#/components/parameters/WebhookSignature"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AudioDeletedEvent"
      responses:
        "200":
          description: Webhook received successfully
      tags:
        - Audio

  ###############################################
  # 4) Reports
  ###############################################
  documents.report.created:
    post:
      summary: Report created
      description: HTTP POST webhook triggered when a report is created.
      operationId: reportCreatedEvent
      parameters:
        - $ref: "#/components/parameters/WebhookId"
        - $ref: "#/components/parameters/WebhookTimestamp"
        - $ref: "#/components/parameters/WebhookSignature"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ReportCreatedEvent"
      responses:
        "200":
          description: Webhook received successfully
      tags:
        - Reports

  documents.report.updated:
    post:
      summary: Report updated
      description: HTTP POST webhook triggered when a report is updated.
      operationId: reportUpdatedEvent
      parameters:
        - $ref: "#/components/parameters/WebhookId"
        - $ref: "#/components/parameters/WebhookTimestamp"
        - $ref: "#/components/parameters/WebhookSignature"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ReportUpdatedEvent"
      responses:
        "200":
          description: Webhook received successfully
      tags:
        - Reports

  documents.report.deleted:
    post:
      summary: Report deleted
      description: HTTP POST webhook triggered when a report is deleted.
      operationId: reportDeletedEvent
      parameters:
        - $ref: "#/components/parameters/WebhookId"
        - $ref: "#/components/parameters/WebhookTimestamp"
        - $ref: "#/components/parameters/WebhookSignature"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ReportDeletedEvent"
      responses:
        "200":
          description: Webhook received successfully
      tags:
        - Reports

  ###############################################
  # 5) Slides
  ###############################################
  documents.slides.created:
    post:
      summary: Slides created
      description: HTTP POST webhook triggered when a slide deck is created.
      operationId: slidesCreatedEvent
      parameters:
        - $ref: "#/components/parameters/WebhookId"
        - $ref: "#/components/parameters/WebhookTimestamp"
        - $ref: "#/components/parameters/WebhookSignature"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SlidesCreatedEvent"
      responses:
        "200":
          description: Webhook received successfully
      tags:
        - Slides

  documents.slides.updated:
    post:
      summary: Slides updated
      description: HTTP POST webhook triggered when a slide deck is updated.
      operationId: slidesUpdatedEvent
      parameters:
        - $ref: "#/components/parameters/WebhookId"
        - $ref: "#/components/parameters/WebhookTimestamp"
        - $ref: "#/components/parameters/WebhookSignature"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SlidesUpdatedEvent"
      responses:
        "200":
          description: Webhook received successfully
      tags:
        - Slides

  documents.slides.deleted:
    post:
      summary: Slides deleted
      description: HTTP POST webhook triggered when a slides decks is deleted.
      operationId: slidesDeletedEvent
      parameters:
        - $ref: "#/components/parameters/WebhookId"
        - $ref: "#/components/parameters/WebhookTimestamp"
        - $ref: "#/components/parameters/WebhookSignature"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SlidesDeletedEvent"
      responses:
        "200":
          description: Webhook received successfully
      tags:
        - Slides

  #################################################
  # 6) Transcript
  #################################################
  documents.transcript.created:
    post:
      summary: Transcript created
      description: HTTP POST webhook triggered when a transcript is created.
      operationId: transcriptCreatedEvent
      parameters:
        - $ref: "#/components/parameters/WebhookId"
        - $ref: "#/components/parameters/WebhookTimestamp"
        - $ref: "#/components/parameters/WebhookSignature"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TranscriptCreatedEvent"
      responses:
        "200":
          description: Webhook received successfully
      tags:
        - Transcript

  documents.transcript.updated:
    post:
      summary: Transcript updated
      description: HTTP POST webhook triggered when a transcript is updated.
      operationId: transcriptUpdatedEvent
      parameters:
        - $ref: "#/components/parameters/WebhookId"
        - $ref: "#/components/parameters/WebhookTimestamp"
        - $ref: "#/components/parameters/WebhookSignature"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TranscriptUpdatedEvent"
      responses:
        "200":
          description: Webhook received successfully
      tags:
        - Transcript

  documents.transcript.deleted:
    post:
      summary: Transcript deleted
      description: HTTP POST webhook triggered when a transcript is deleted.
      operationId: transcriptDeletedEvent
      parameters:
        - $ref: "#/components/parameters/WebhookId"
        - $ref: "#/components/parameters/WebhookTimestamp"
        - $ref: "#/components/parameters/WebhookSignature"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TranscriptDeletedEvent"
      responses:
        "200":
          description: Webhook received successfully
      tags:
        - Transcript

  ###############################################
  # 7) Live Audio
  ###############################################
  live.audio.created:
    post:
      summary: Live audio created
      description: HTTP POST webhook triggered when a live audio event is created.
      operationId: liveAudioCreatedEvent
      # Instead of inlining the parameters, reference your reusable ones:
      parameters:
        - $ref: "#/components/parameters/WebhookId"
        - $ref: "#/components/parameters/WebhookTimestamp"
        - $ref: "#/components/parameters/WebhookSignature"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/LiveAudioCreatedEvent"
      responses:
        "200":
          description: Webhook received successfully
      tags:
        - Live Audio

  live.audio.updated:
    post:
      summary: Live audio updated
      description: HTTP POST webhook triggered when a live audio event is updated.
      operationId: liveAudioUpdatedEvent
      parameters:
        - $ref: "#/components/parameters/WebhookId"
        - $ref: "#/components/parameters/WebhookTimestamp"
        - $ref: "#/components/parameters/WebhookSignature"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/LiveAudioUpdatedEvent"
      responses:
        "200":
          description: Webhook received successfully
      tags:
        - Live Audio

  live.audio.deleted:
    post:
      summary: Live audio deleted
      description: HTTP POST webhook triggered when a live audio event is deleted.
      operationId: liveAudioDeletedEvent
      parameters:
        - $ref: "#/components/parameters/WebhookId"
        - $ref: "#/components/parameters/WebhookTimestamp"
        - $ref: "#/components/parameters/WebhookSignature"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/LiveAudioDeletedEvent"
      responses:
        "200":
          description: Webhook received successfully
      tags:
        - Live Audio

  ###############################################
  # 8) Live Transcripts
  ###############################################
  live.transcripts.created:
    post:
      summary: Live transcripts created
      description: HTTP POST webhook triggered when a live transcript is created.
      operationId: liveTranscriptsCreatedEvent
      parameters:
        - $ref: "#/components/parameters/WebhookId"
        - $ref: "#/components/parameters/WebhookTimestamp"
        - $ref: "#/components/parameters/WebhookSignature"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/LiveTranscriptCreatedEvent"
      responses:
        "200":
          description: Webhook received successfully
      tags:
        - Live Transcripts

  live.transcript.updated:
    post:
      summary: Live transcripts updated
      description: HTTP POST webhook triggered when a live transcript is updated.
      operationId: liveTranscriptsUpdatedEvent
      parameters:
        - $ref: "#/components/parameters/WebhookId"
        - $ref: "#/components/parameters/WebhookTimestamp"
        - $ref: "#/components/parameters/WebhookSignature"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/LiveTranscriptUpdatedEvent"
      responses:
        "200":
          description: Webhook received successfully
      tags:
        - Live Transcripts

  live.transcript.deleted:
    post:
      summary: Live transcripts deleted
      description: HTTP POST webhook triggered when a live transcript is deleted.
      operationId: liveTranscriptsDeletedEvent
      parameters:
        - $ref: "#/components/parameters/WebhookId"
        - $ref: "#/components/parameters/WebhookTimestamp"
        - $ref: "#/components/parameters/WebhookSignature"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/LiveTranscriptDeletedEvent"
      responses:
        "200":
          description: Webhook received successfully
      tags:
        - Live Transcripts

  ###############################################
  # 9) Summary
  ###############################################
  summary.event.created:
    post:
      summary: Event summary created
      description: HTTP POST webhook triggered when an event summary is created.
      operationId: summaryEventCreated
      parameters:
        - $ref: "#/components/parameters/WebhookId"
        - $ref: "#/components/parameters/WebhookTimestamp"
        - $ref: "#/components/parameters/WebhookSignature"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SummaryEventCreatedEvent"
      responses:
        "200":
          description: Webhook received successfully
      tags:
        - Summary - Events

  summary.event.updated:
    post:
      summary: Event summary updated
      description: HTTP POST webhook triggered when an event summary is updated.
      operationId: summaryEventUpdated
      parameters:
        - $ref: "#/components/parameters/WebhookId"
        - $ref: "#/components/parameters/WebhookTimestamp"
        - $ref: "#/components/parameters/WebhookSignature"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SummaryEventUpdatedEvent"
      responses:
        "200":
          description: Webhook received successfully
      tags:
        - Summary - Events

  summary.event.deleted:
    post:
      summary: Event summary deleted
      description: HTTP POST webhook triggered when an event summary is deleted.
      operationId: summaryEventDeleted
      parameters:
        - $ref: "#/components/parameters/WebhookId"
        - $ref: "#/components/parameters/WebhookTimestamp"
        - $ref: "#/components/parameters/WebhookSignature"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SummaryEventDeletedEvent"
      responses:
        "200":
          description: Webhook received successfully
      tags:
        - Summary - Events

  summary.document.report.created:
    post:
      summary: Report document summary created
      description: HTTP POST webhook triggered when a report summary is created.
      operationId: summaryDocumentReportCreated
      parameters:
        - $ref: "#/components/parameters/WebhookId"
        - $ref: "#/components/parameters/WebhookTimestamp"
        - $ref: "#/components/parameters/WebhookSignature"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SummaryReportDocumentCreatedEvent"
      responses:
        "200":
          description: Webhook received successfully
      tags:
        - Summary - Reports

  summary.document.report.updated:
    post:
      summary: Report document summary updated
      description: HTTP POST webhook triggered when a report summary is updated.
      operationId: summaryDocumentReportUpdated
      parameters:
        - $ref: "#/components/parameters/WebhookId"
        - $ref: "#/components/parameters/WebhookTimestamp"
        - $ref: "#/components/parameters/WebhookSignature"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SummaryReportDocumentUpdatedEvent"
      responses:
        "200":
          description: Webhook received successfully
      tags:
        - Summary - Reports

  summary.document.report.deleted:
    post:
      summary: Report document summary deleted
      description: HTTP POST webhook triggered when a report summary is deleted.
      operationId: summaryDocumentReportDeleted
      parameters:
        - $ref: "#/components/parameters/WebhookId"
        - $ref: "#/components/parameters/WebhookTimestamp"
        - $ref: "#/components/parameters/WebhookSignature"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SummaryReportDocumentDeletedEvent"
      responses:
        "200":
          description: Webhook received successfully
      tags:
        - Summary - Reports

  summary.document.transcript.created:
    post:
      summary: Transcript document summary created
      description: HTTP POST webhook triggered when a transcript summary is created.
      operationId: summaryDocumentTranscriptCreated
      parameters:
        - $ref: "#/components/parameters/WebhookId"
        - $ref: "#/components/parameters/WebhookTimestamp"
        - $ref: "#/components/parameters/WebhookSignature"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SummaryTranscriptDocumentCreatedEvent"
      responses:
        "200":
          description: Webhook received successfully
      tags:
        - Summary - Transcripts

  summary.document.transcript.updated:
    post:
      summary: Transcript document summary updated
      description: HTTP POST webhook triggered when a transcript summary is updated.
      operationId: summaryDocumentTranscriptUpdated
      parameters:
        - $ref: "#/components/parameters/WebhookId"
        - $ref: "#/components/parameters/WebhookTimestamp"
        - $ref: "#/components/parameters/WebhookSignature"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SummaryTranscriptDocumentUpdatedEvent"
      responses:
        "200":
          description: Webhook received successfully
      tags:
        - Summary - Transcripts

  summary.document.transcript.deleted:
    post:
      summary: Transcript document summary deleted
      description: HTTP POST webhook triggered when a transcript summary is deleted.
      operationId: summaryDocumentTranscriptDeleted
      parameters:
        - $ref: "#/components/parameters/WebhookId"
        - $ref: "#/components/parameters/WebhookTimestamp"
        - $ref: "#/components/parameters/WebhookSignature"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SummaryTranscriptDocumentDeletedEvent"
      responses:
        "200":
          description: Webhook received successfully
      tags:
        - Summary - Transcripts

  summary.document.slides.created:
    post:
      summary: Slides document summary created
      description: HTTP POST webhook triggered when a slides summary is created.
      operationId: summaryDocumentSlidesCreated
      parameters:
        - $ref: "#/components/parameters/WebhookId"
        - $ref: "#/components/parameters/WebhookTimestamp"
        - $ref: "#/components/parameters/WebhookSignature"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SummarySlidesDocumentCreatedEvent"
      responses:
        "200":
          description: Webhook received successfully
      tags:
        - Summary - Slides

  summary.document.slides.updated:
    post:
      summary: Slides document summary updated
      description: HTTP POST webhook triggered when a slides summary is updated.
      operationId: summaryDocumentSlidesUpdated
      parameters:
        - $ref: "#/components/parameters/WebhookId"
        - $ref: "#/components/parameters/WebhookTimestamp"
        - $ref: "#/components/parameters/WebhookSignature"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SummarySlidesDocumentUpdatedEvent"
      responses:
        "200":
          description: Webhook received successfully
      tags:
        - Summary - Slides

  summary.document.slides.deleted:
    post:
      summary: Slides document summary deleted
      description: HTTP POST webhook triggered when a slides summary is deleted.
      operationId: summaryDocumentSlidesDeleted
      parameters:
        - $ref: "#/components/parameters/WebhookId"
        - $ref: "#/components/parameters/WebhookTimestamp"
        - $ref: "#/components/parameters/WebhookSignature"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SummarySlidesDocumentDeletedEvent"
      responses:
        "200":
          description: Webhook received successfully
      tags:
        - Summary - Slides

components:
  ###############################################
  # 1) Reusable Header Parameter Definitions
  ###############################################
  parameters:
    WebhookId:
      name: Webhook-Id
      in: header
      required: true
      description: A unique message identifier for the webhook.
      schema:
        type: string

    WebhookTimestamp:
      name: Webhook-Timestamp
      in: header
      required: true
      description: The time the message was generated (Unix timestamp in seconds).
      schema:
        type: string

    WebhookSignature:
      name: Webhook-Signature
      in: header
      required: true
      description: A cryptographic signature that allows you to verify the integrity and authenticity of the payload.
      schema:
        type: string

  ###############################################
  # 2) The Shared Schemas
  ###############################################
  schemas:
    ###############################################
    # a) Live Audio
    ###############################################
    LiveAudioCreatedEvent:
      type: object
      title: LiveAudioCreatedEvent
      properties:
        type:
          type: string
          const: live.audio.created
          description: The type of event.
        timestamp:
          $ref: "#/components/schemas/timestamp"
        data:
          $ref: "#/components/schemas/LiveAudio"
          description: On creation, the data object contains the details of the new entity.
        previousAttributes:
          type: object
          description: On creation, this is empty as the entity is new.
      required:
        - data
        - previousAttributes
        - type
        - timestamp
      examples:
        - type: live.audio.created
          timestamp: "2025-03-25T13:45:25.000Z"
          data:
            id: 329679
            eventId: 330452
            companyId: 19794
            date: "2025-05-13T12:00:00.000Z"
            state: notLive
            audio: null
            wentLiveAt: null
            createdAt: "2025-03-25T13:45:25.000Z"
            updatedAt: "2025-03-25T13:45:25.000Z"
          previousAttributes: {}

    LiveAudioUpdatedEvent:
      type: object
      title: LiveAudioUpdatedEvent
      properties:
        type:
          type: string
          const: live.audio.updated
          description: The type of event.
        timestamp:
          $ref: "#/components/schemas/timestamp"
        data:
          $ref: "#/components/schemas/LiveAudio"
          description: On update, contains the updated details.
        previousAttributes:
          $ref: "#/components/schemas/PartialLiveAudio"
          description: Only the properties that changed.
      required:
        - data
        - previousAttributes
        - type
        - timestamp
      examples:
        - type: live.audio.updated
          timestamp: "2025-03-25T13:31:00.000Z"
          data:
            id: 328350
            eventId: 329123
            companyId: 15764
            date: "2025-03-25T13:00:00.000Z"
            state: processingRecording
            audio: https://files.quartr.com/streams/abc.m3u8
            wentLiveAt: "2025-03-25T13:00:45.000Z"
            createdAt: "2025-03-19T15:58:19.000Z"
            updatedAt: "2025-03-25T13:31:00.000Z"
          previousAttributes:
            state: "live"
            updatedAt: "2025-03-25T13:00:45.000Z"

    LiveAudioDeletedEvent:
      type: object
      title: LiveAudioDeletedEvent
      properties:
        type:
          type: string
          const: live.audio.deleted
          description: The type of event.
        timestamp:
          $ref: "#/components/schemas/timestamp"
        data:
          type: object
          description: On deletion, data is empty as the entity is no longer available.
        previousAttributes:
          $ref: "#/components/schemas/LiveAudio"
          description: The last known state of the entity.
      required:
        - data
        - previousAttributes
        - type
        - timestamp
      examples:
        - type: live.audio.deleted
          timestamp: "2025-03-25T13:02:18.000Z"
          data: {}
          previousAttributes:
            id: 253813
            eventId: 254470
            companyId: 11178
            date: "2025-03-21T20:00:00.000Z"
            state: notLive
            audio: null
            wentLiveAt: null
            createdAt: "2024-11-08T14:15:57.000Z"
            updatedAt: "2025-03-21T08:43:55.000Z"

    LiveAudio:
      type: object
      properties:
        id:
          type: integer
          title: ID
        eventId:
          type: integer
          title: Event ID
        companyId:
          type: integer
          title: Company ID
        date:
          type: string
          format: date-time
          title: Date
        state:
          type: string
          title: State
          enum:
            - notLive
            - willBeLive
            - live
            - processingRecording
            - processingRecordingFailed
            - recordingAvailable
            - liveFailedNoAccess
            - liveFailedNotStarted
            - liveFailedInterrupted
        audio:
          type: string
          title: audio
        wentLiveAt:
          type: string
          format: date-time
          title: Went Live At
        createdAt:
          type: string
          format: date-time
          title: Created At
        updatedAt:
          type: string
          format: date-time
          title: Updated At
      required:
        - companyId
        - createdAt
        - updatedAt
        - date
        - eventId
        - id
        - state

    PartialLiveAudio:
      type: object
      properties:
        id:
          type: integer
          title: ID
        eventId:
          type: integer
          title: Event ID
        companyId:
          type: integer
          title: Company ID
        date:
          type: string
          format: date-time
          title: Date
        state:
          type: string
          title: State
          enum:
            - notLive
            - willBeLive
            - live
            - processingRecording
            - processingRecordingFailed
            - recordingAvailable
            - liveFailedNoAccess
            - liveFailedNotStarted
            - liveFailedInterrupted
        audio:
          type: string
          title: audio
        wentLiveAt:
          type: string
          format: date-time
          title: Went Live At
        createdAt:
          type: string
          format: date-time
          title: Created At
        updatedAt:
          type: string
          format: date-time
          title: Updated At
    ###############################################
    # a) Live Transcript
    ###############################################
    LiveTranscriptCreatedEvent:
      type: object
      title: LiveTranscriptCreatedEvent
      properties:
        type:
          type: string
          const: live.transcript.created
          description: The type of event.
        timestamp:
          $ref: "#/components/schemas/timestamp"
        data:
          $ref: "#/components/schemas/LiveTranscript"
          description: On creation, the data object contains the details of the new entity.
        previousAttributes:
          type: object
          description: On creation, this is empty as the entity is new.
      required:
        - data
        - previousAttributes
        - type
        - timestamp
      examples:
        - type: live.transcript.created
          timestamp: "2025-03-25T13:45:25.000Z"
          data:
            id: 329679
            eventId: 330452
            companyId: 19794
            date: "2025-05-13T12:00:00.000Z"
            state: notLive
            transcript: null
            wentLiveAt: null
            createdAt: "2025-03-25T13:45:25.000Z"
            updatedAt: "2025-03-25T13:45:25.000Z"
          previousAttributes: {}

    LiveTranscriptUpdatedEvent:
      type: object
      title: LiveTranscriptUpdatedEvent
      properties:
        type:
          type: string
          const: live.transcript.updated
          description: The type of event.
        timestamp:
          $ref: "#/components/schemas/timestamp"
        data:
          $ref: "#/components/schemas/LiveTranscript"
          description: On update, contains the updated details.
        previousAttributes:
          $ref: "#/components/schemas/PartialLiveTranscript"
          description: Only the properties that changed.
      required:
        - data
        - previousAttributes
        - type
        - timestamp
      examples:
        - type: live.transcript.updated
          timestamp: "2025-03-25T14:01:42.000Z"
          data:
            id: 310053
            eventId: 310826
            companyId: 20041
            date: "2025-03-25T14:00:00.000Z"
            state: live
            transcript: https://files.quartr.com/streams/abc.jsonl
            wentLiveAt: "2025-03-25T13:57:03.000Z"
            createdAt: "2025-01-29T10:45:07.000Z"
            updatedAt: "2025-03-25T14:01:42.000Z"
          previousAttributes:
            transcript: null
            updatedAt: "2025-03-25T13:57:03.000Z"

    LiveTranscriptDeletedEvent:
      type: object
      title: LiveTranscriptDeletedEvent
      properties:
        type:
          type: string
          const: live.transcript.deleted
          description: The type of event.
        timestamp:
          $ref: "#/components/schemas/timestamp"
        data:
          type: object
          description: On deletion, data is empty as the entity is no longer available.
        previousAttributes:
          $ref: "#/components/schemas/LiveTranscript"
          description: The last known state of the entity.
      required:
        - data
        - previousAttributes
        - type
        - timestamp
      examples:
        - type: live.transcript.deleted
          timestamp: "2025-08-24T15:24:12.000Z"
          data: {}
          previousAttributes:
            id: 253813
            eventId: 254470
            companyId: 11178
            date: "2025-03-21T20:00:00.000Z"
            state: notLive
            transcript: null
            wentLiveAt: null
            createdAt: "2024-11-08T14:15:57.000Z"
            updatedAt: "2025-03-21T08:43:55.000Z"

    LiveTranscript:
      type: object
      properties:
        id:
          type: integer
          title: ID
        eventId:
          type: integer
          title: Event ID
        companyId:
          type: integer
          title: Company ID
        date:
          type: string
          format: date-time
          title: Date
        state:
          type: string
          title: State
          enum:
            - notLive
            - willBeLive
            - live
            - processingRecording
            - processingRecordingFailed
            - recordingAvailable
            - liveFailedNoAccess
            - liveFailedNotStarted
            - liveFailedInterrupted
        transcript:
          type: string
          title: transcript
        wentLiveAt:
          type: string
          format: date-time
          title: Went Live At
        createdAt:
          type: string
          format: date-time
          title: Created At
        updatedAt:
          type: string
          format: date-time
          title: Updated At
      required:
        - companyId
        - createdAt
        - updatedAt
        - date
        - eventId
        - id
        - state

    PartialLiveTranscript:
      type: object
      properties:
        id:
          type: integer
          title: ID
        eventId:
          type: integer
          title: Event ID
        companyId:
          type: integer
          title: Company ID
        date:
          type: string
          format: date-time
          title: Date
        state:
          type: string
          title: State
          enum:
            - notLive
            - willBeLive
            - live
            - processingRecording
            - processingRecordingFailed
            - recordingAvailable
            - liveFailedNoAccess
            - liveFailedNotStarted
            - liveFailedInterrupted
        transcript:
          type: string
          title: audio
        wentLiveAt:
          type: string
          format: date-time
          title: Went Live At
        createdAt:
          type: string
          format: date-time
          title: Created At
        updatedAt:
          type: string
          format: date-time
          title: Updated At
    ################################################
    # 3) Company
    ################################################
    CompanyCreatedEvent:
      type: object
      title: CompanyCreatedEvent
      properties:
        type:
          type: string
          const: company.created
          description: The type of event.
        timestamp:
          $ref: "#/components/schemas/timestamp"
        data:
          $ref: "#/components/schemas/Company"
          description: On creation, the data object contains the details of the new entity.
        previousAttributes:
          type: object
          description: On creation, this is empty as the entity is new.
      required:
        - data
        - previousAttributes
        - type
        - timestamp
      examples:
        - type: company.created
          timestamp: "2025-03-25T08:16:52.000Z"
          data:
            id: 329385
            name: Example Company
            displayName: Example Co.
            country: US
            tickers: []
            isins: []
            cik: null
            figis: []
            backlinkUrl: https://example.com
            createdAt: "2025-03-25T08:16:52.000Z"
            updatedAt: "2025-03-25T08:16:52.000Z"
          previousAttributes: {}

    CompanyUpdatedEvent:
      type: object
      title: CompanyUpdatedEvent
      properties:
        type:
          type: string
          const: company.updated
          description: The type of event.
        timestamp:
          $ref: "#/components/schemas/timestamp"
        data:
          $ref: "#/components/schemas/Company"
          description: On update, contains the updated details.
        previousAttributes:
          $ref: "#/components/schemas/PartialCompany"
          description: Only the properties that changed.
      required:
        - data
        - previousAttributes
        - type
        - timestamp
      examples:
        - type: company.updated
          timestamp: "2025-03-25T08:17:34.000Z"
          data:
            id: 329385
            name: ACME Corporation
            displayName: ACME Corp.
            country: US
            tickers:
              - exchange: OTCPK
                ticker: EXMPL
            isins:
              - US1234567890
            cik: 0001234567
            figis:
              - BBG001S5N8V8
            backlinkUrl: https://example.com
            createdAt: "2025-03-25T08:16:52.000Z"
            updatedAt: "2025-03-25T08:17:33.000Z"
          previousAttributes:
            updatedAt: "2025-03-25T08:16:52.000Z"
            tickers: []

    CompanyDeletedEvent:
      type: object
      title: CompanyDeletedEvent
      properties:
        type:
          type: string
          const: company.deleted
          description: The type of event.
        timestamp:
          $ref: "#/components/schemas/timestamp"
        data:
          type: object
          description: On deletion, data is empty as the entity is no longer available.
        previousAttributes:
          $ref: "#/components/schemas/Company"
          description: The last known state of the entity.
      required:
        - data
        - previousAttributes
        - type
        - timestamp
      examples:
        - type: company.deleted
          timestamp: "2025-08-24T15:24:12.000Z"
          data: {}
          previousAttributes:
            id: 329385
            name: ACME Corporation
            displayName: ACME Corp.
            country: US
            tickers:
              - exchange: OTCPK
                ticker: EXMPL
            isins:
              - US1234567890
            cik: 0001234567
            figis:
              - BBG001S5N8V8
            backlinkUrl: https://example.com
            createdAt: "2025-03-25T08:16:52.000Z"
            updatedAt: "2025-03-25T08:17:33.000Z"

    Company:
      type: object
      properties:
        id:
          type: integer
          title: ID
        name:
          type: string
          title: Name
        displayName:
          type: string
          title: Display name
        country:
          type: string
          title: Country
        tickers:
          type: array
          items:
            type: string
          title: Tickers
        isins:
          type: array
          items:
            type: string
          title: ISINs
        cik:
          type: string
          nullable: true
          title: CIK
        figis:
          type: array
          items:
            type: string
          title: OpenFIGI share class codes
        backlinkUrl:
          type: string
          title: Backlink URL
        createdAt:
          type: string
          format: date-time
          title: Created At
        updatedAt:
          type: string
          format: date-time
          title: Updated At
      required:
        - id
        - name
        - country
        - backlinkUrl
        - createdAt
        - updatedAt

    PartialCompany:
      type: object
      properties:
        id:
          type: integer
          title: ID
        name:
          type: string
          title: Name
        displayName:
          type: string
          title: Display name
        country:
          type: string
          title: Country
        tickers:
          type: array
          items:
            type: string
          title: Tickers
        isins:
          type: array
          items:
            type: string
          title: ISINs
        cik:
          type: string
          nullable: true
          title: CIK
        figis:
          type: array
          items:
            type: string
          title: OpenFIGI share class codes
        backlinkUrl:
          type: string
          title: Backlink URL
        createdAt:
          type: string
          format: date-time
          title: Created At
        updatedAt:
          type: string
          format: date-time
          title: Updated At

    ################################################
    # 4) Event
    ################################################
    EventCreatedEvent:
      type: object
      title: EventCreatedEvent
      properties:
        type:
          type: string
          const: event.created
          description: The type of event.
        timestamp:
          $ref: "#/components/schemas/timestamp"
        data:
          $ref: "#/components/schemas/Event"
          description: On creation, the data object contains the details of the new entity.
        previousAttributes:
          type: object
          description: On creation, this is empty as the entity is new.
      required:
        - data
        - previousAttributes
        - type
        - timestamp
      examples:
        - type: event.created
          timestamp: "2025-03-25T12:15:32.000Z"
          data:
            id: 330417
            companyId: 6161
            title: Q2 2025
            typeId: 27
            fiscalYear: 2025
            fiscalPeriod: Q2
            date: "2025-07-30T06:00:00.000Z"
            backlinkUrl: https://example.com
            createdAt: "2025-03-25T12:15:32.000Z"
            updatedAt: "2025-03-25T12:15:32.000Z"
          previousAttributes: {}

    EventUpdatedEvent:
      type: object
      title: EventUpdatedEvent
      properties:
        type:
          type: string
          const: event.updated
          description: The type of event.
        timestamp:
          $ref: "#/components/schemas/timestamp"
        data:
          $ref: "#/components/schemas/Event"
          description: On update, contains the updated details.
        previousAttributes:
          $ref: "#/components/schemas/PartialEvent"
          description: Only the properties that changed.
      required:
        - data
        - previousAttributes
        - type
        - timestamp
      examples:
        - type: event.updated
          timestamp: "2025-03-25T12:31:02.000Z"
          data:
            id: 302566
            companyId: 18640
            title: Q4 2025
            typeId: 29
            fiscalYear: 2025
            fiscalPeriod: Q4
            date: "2025-04-28T06:00:00.000Z"
            backlinkUrl: https://example.com
            createdAt: "2025-01-07T04:06:11.000Z"
            updatedAt: "2025-03-25T12:31:02.000Z"
          previousAttributes:
            title: "2025-04-25T06:00:00.000Z"
            updatedAt: "2025-01-07T04:06:11.000Z"

    EventDeletedEvent:
      type: object
      title: EventDeletedEvent
      properties:
        type:
          type: string
          const: event.deleted
          description: The type of event.
        timestamp:
          $ref: "#/components/schemas/timestamp"
        data:
          type: object
          description: On deletion, data is empty as the entity is no longer available.
        previousAttributes:
          $ref: "#/components/schemas/Event"
          description: The last known state of the entity.
      required:
        - data
        - previousAttributes
        - type
        - timestamp
      examples:
        - type: event.deleted
          timestamp: "2025-08-24T15:24:12.000Z"
          data: {}
          previousAttributes:
            id: 309443
            companyId: 4280
            title: Q3 2025
            typeId: 28
            fiscalYear: 2025
            fiscalPeriod: Q3
            date: "2025-10-28T09:00:00.000Z"
            backlinkUrl: https://example.com
            createdAt: "2025-01-23T15:10:51.000Z"
            updatedAt: "2025-01-23T15:11:00.000Z"

    Event:
      type: object
      properties:
        id:
          type: integer
          title: ID
        companyId:
          type: integer
          title: Company ID
        title:
          type: string
          title: Title
        typeId:
          type: integer
          title: Type ID
        fiscalYear:
          type: integer
          title: Fiscal Year
        fiscalPeriod:
          type: string
          title: Fiscal Period
        date:
          type: string
          format: date-time
          title: Date
        backlinkUrl:
          type: string
          title: Backlink URL
        createdAt:
          type: string
          format: date-time
          title: Created At
        updatedAt:
          type: string
          format: date-time
          title: Updated At
      required:
        - id
        - companyId
        - title
        - typeId
        - date
        - backlinkUrl
        - createdAt
        - updatedAt

    PartialEvent:
      type: object
      properties:
        id:
          type: integer
          title: ID
        companyId:
          type: integer
          title: Company ID
        title:
          type: string
          title: Title
        typeId:
          type: integer
          title: Type ID
        fiscalYear:
          type: integer
          title: Fiscal Year
        fiscalPeriod:
          type: string
          title: Fiscal Period
        date:
          type: string
          format: date-time
          title: Date
        backlinkUrl:
          type: string
          title: Backlink URL
        createdAt:
          type: string
          format: date-time
          title: Created At
        updatedAt:
          type: string
          format: date-time
          title: Updated At

    ################################################
    # 5) Report
    ################################################

    ReportCreatedEvent:
      type: object
      title: ReportCreatedEvent
      properties:
        type:
          type: string
          const: document.report.created
          description: The type of event.
        timestamp:
          $ref: "#/components/schemas/timestamp"
        data:
          $ref: "#/components/schemas/Document"
          description: On creation, the data object contains the details of the new entity.
        previousAttributes:
          type: object
          description: On creation, this is empty as the entity is new.
      required:
        - data
        - previousAttributes
        - type
        - timestamp
      examples:
        - type: document.report.created
          timestamp: "2025-03-25T12:02:54.000Z"
          data:
            id: 1879622
            eventId: 329118
            companyId: 16562
            typeId: 19
            fileUrl: https://example.com/document.pdf
            createdAt: "2025-03-25T12:02:54.000Z"
            updatedAt: "2025-03-25T12:02:54.000Z"
          previousAttributes: {}

    ReportUpdatedEvent:
      type: object
      title: ReportUpdatedEvent
      properties:
        type:
          type: string
          const: document.report.updated
          description: The type of event.
        timestamp:
          $ref: "#/components/schemas/timestamp"
        data:
          $ref: "#/components/schemas/Document"
          description: On update, contains the updated details.
        previousAttributes:
          $ref: "#/components/schemas/PartialDocument"
          description: Only the properties that changed.
      required:
        - data
        - previousAttributes
        - type
        - timestamp
      examples:
        - type: document.report.updated
          timestamp: "2025-03-24T14:37:09.000Z"
          data:
            id: 1879622
            eventId: 329118
            companyId: 16562
            typeId: 20
            fileUrl: https://example.com/document.pdf
            createdAt: "2025-03-25T12:02:54.000Z"
            updatedAt: "2025-03-25T12:22:54.000Z"
          previousAttributes:
            typeId: 19
            updatedAt: "2025-03-25T12:02:54.000Z"

    ReportDeletedEvent:
      type: object
      title: ReportDeletedEvent
      properties:
        type:
          type: string
          const: document.report.deleted
          description: The type of event.
        timestamp:
          $ref: "#/components/schemas/timestamp"
        data:
          type: object
          description: On deletion, data is empty as the entity is no longer available.
        previousAttributes:
          $ref: "#/components/schemas/Document"
          description: The last known state of the entity.
      required:
        - data
        - previousAttributes
        - type
        - timestamp
      examples:
        - type: document.report.deleted
          timestamp: "2025-03-25T12:01:20.000Z"
          data: {}
          previousAttributes:
            id: 1879616
            eventId: 250410
            companyId: 3611
            typeId: 12
            fileUrl: https://example.com/document.pdf
            createdAt: "2025-03-25T12:01:12.000Z"
            updatedAt: "2025-03-25T12:01:19.000Z"

    ################################################
    # 6) Slides
    ################################################
    SlidesCreatedEvent:
      type: object
      title: SlidesCreatedEvent
      properties:
        type:
          type: string
          const: document.slides.created
          description: The type of event.
        timestamp:
          $ref: "#/components/schemas/timestamp"
        data:
          $ref: "#/components/schemas/Document"
          description: On creation, the data object contains the details of the new entity.
        previousAttributes:
          type: object
          description: On creation, this is empty as the entity is new.
      required:
        - data
        - previousAttributes
        - type
        - timestamp
      examples:
        - type: document.slides.created
          timestamp: "2025-03-24T22:47:50.000Z"
          data:
            id: 1879349
            eventId: 7531
            companyId: 6531
            typeId: 5
            fileUrl: https://example.com/slides.pdf
            createdAt: "2025-03-24T22:47:50.000Z"
            updatedAt: "2025-03-24T22:47:50.000Z"
          previousAttributes: {}

    SlidesUpdatedEvent:
      type: object
      title: SlidesUpdatedEvent
      properties:
        type:
          type: string
          const: document.slides.updated
          description: The type of event.
        timestamp:
          $ref: "#/components/schemas/timestamp"
        data:
          $ref: "#/components/schemas/Document"
          description: On update, contains the updated details.
        previousAttributes:
          $ref: "#/components/schemas/PartialDocument"
          description: Only the properties that changed.
      required:
        - data
        - previousAttributes
        - type
        - timestamp
      examples:
        - type: document.slides.updated
          timestamp: "2025-03-24T22:49:50.000Z"
          data:
            id: 1879349
            eventId: 7531
            companyId: 6531
            typeId: 5
            fileUrl: https://example.com/slides.pdf
            createdAt: "2025-03-24T22:47:50.000Z"
            updatedAt: "2025-03-24T22:49:50.000Z"
          previousAttributes:
            eventId: 7532
            updatedAt: "2025-03-24T22:47:50.000Z"

    SlidesDeletedEvent:
      type: object
      title: SlidesDeletedEvent
      properties:
        type:
          type: string
          const: document.slides.deleted
          description: The type of event.
        timestamp:
          $ref: "#/components/schemas/timestamp"
        data:
          type: object
          description: On deletion, data is empty as the entity is no longer available.
        previousAttributes:
          $ref: "#/components/schemas/Document"
          description: The last known state of the entity.
      required:
        - data
        - previousAttributes
        - type
        - timestamp
      examples:
        - type: document.slides.deleted
          timestamp: "2025-03-25T09:29:11.000Z"
          data: {}
          previousAttributes:
            id: 1876614
            eventId: 47220
            companyId: 12758
            typeId: 5
            fileUrl: https://example.com/slides.pdf
            createdAt: "2025-03-24T10:29:56.000Z"
            updatedAt: "2025-03-24T11:37:22.000Z"

    ################################################
    # 7) Transcripts
    ################################################
    TranscriptCreatedEvent:
      type: object
      title: TranscriptsCreatedEvent
      properties:
        type:
          type: string
          const: document.transcript.created
          description: The type of event.
        timestamp:
          $ref: "#/components/schemas/timestamp"
        data:
          $ref: "#/components/schemas/Document"
          description: On creation, the data object contains the details of the new entity.
        previousAttributes:
          type: object
          description: On creation, this is empty as the entity is new.
      required:
        - data
        - previousAttributes
        - type
        - timestamp
      examples:
        - type: document.transcript.created
          timestamp: "2025-03-25T13:48:34.000Z"
          data:
            id: 1879711
            eventId: 330449
            companyId: 5130
            typeId: 15
            fileUrl: https://example.com/transcript.json
            createdAt: "2025-03-25T13:48:34.000Z"
            updatedAt: "2025-03-25T13:48:34.000Z"
          previousAttributes: {}

    TranscriptUpdatedEvent:
      type: object
      title: TranscriptUpdatedEvent
      properties:
        type:
          type: string
          const: document.transcript.updated
          description: The type of event.
        timestamp:
          $ref: "#/components/schemas/timestamp"
        data:
          $ref: "#/components/schemas/Document"
          description: On update, contains the updated details.
        previousAttributes:
          $ref: "#/components/schemas/PartialDocument"
          description: Only the properties that changed.
      required:
        - data
        - previousAttributes
        - type
        - timestamp
      examples:
        - type: document.transcript.created
          timestamp: "2025-03-25T11:40:08.000Z"
          data:
            id: 1879609
            eventId: 230104
            companyId: 5801
            typeId: 15
            fileUrl: https://example.com/transcript-2.json
            createdAt: "2025-03-25T11:39:23.000Z"
            updatedAt: "2025-03-25T11:40:08.000Z"
          previousAttributes:
            fileUrl: https://example.com/transcript-1.json
            updatedAt: "2025-03-25T11:39:23.000Z"

    TranscriptDeletedEvent:
      type: object
      title: TranscriptDeletedEvent
      properties:
        type:
          type: string
          const: document.transcript.deleted
          description: The type of event.
        timestamp:
          $ref: "#/components/schemas/timestamp"
        data:
          type: object
          description: On deletion, data is empty as the entity is no longer available.
        previousAttributes:
          $ref: "#/components/schemas/Document"
          description: The last known state of the entity.
      required:
        - data
        - previousAttributes
        - type
        - timestamp
      examples:
        - type: document.transcript.deleted
          timestamp: "2025-08-24T15:24:12.000Z"
          data: {}
          previousAttributes:
            id: 1879332
            eventId: 330267
            companyId: 5008
            typeId: 15
            fileUrl: https://example.com/transcript.pdf
            createdAt: "2025-03-24T21:39:18.000Z"
            updatedAt: "2025-03-24T21:39:18.000Z"

    Document:
      type: object
      properties:
        id:
          type: integer
          title: ID
        eventId:
          type: integer
          title: Event ID
        companyId:
          type: integer
          title: Company ID
        typeId:
          type: integer
          title: Document Type
        fileUrl:
          type: string
          title: File URL
        createdAt:
          type: string
          format: date-time
          title: Created At
        updatedAt:
          type: string
          format: date-time
          title: Updated At
      required:
        - id
        - typeId
        - fileUrl
        - createdAt
        - updatedAt

    PartialDocument:
      type: object
      properties:
        id:
          type: integer
          title: ID
        eventId:
          type: integer
          title: Event ID
        companyId:
          type: integer
          title: Company ID
        typeId:
          type: integer
          title: Document Type
        fileUrl:
          type: string
          title: File URL
        createdAt:
          type: string
          format: date-time
          title: Created At
        updatedAt:
          type: string
          format: date-time
          title: Updated At

    ################################################
    # Audio
    ################################################
    AudioCreatedEvent:
      type: object
      title: AudioCreatedEvent
      properties:
        type:
          type: string
          const: audio.created
          description: The type of event.
        timestamp:
          $ref: "#/components/schemas/timestamp"
        data:
          $ref: "#/components/schemas/Audio"
          description: On creation, the data object contains the details of the new entity.
        previousAttributes:
          type: object
          description: On creation, this is empty as the entity is new.
      required:
        - data
        - previousAttributes
        - type
        - timestamp
      examples:
        - type: audio.created
          timestamp: "2025-03-25T12:51:30.000Z"
          data:
            id: 287310
            eventId: 226462
            companyId: 13866
            streamUrl: null
            fileUrl: https://files.quartr.com/audio.mpeg
            qna: 0
            audioMetedata:
              size: "200.0 MB"
              duration: 1230
              encoding: 7bit
              mimetype: audio/mpeg
            createdAt: "2025-03-25T12:51:30.000Z"
            updatedAt: "2025-03-25T12:51:30.000Z"
          previousAttributes: {}

    AudioUpdatedEvent:
      type: object
      title: AudioUpdatedEvent
      properties:
        type:
          type: string
          const: audio.updated
          description: The type of event.
        timestamp:
          $ref: "#/components/schemas/timestamp"
        data:
          $ref: "#/components/schemas/Audio"
          description: On update, contains the updated details.
        previousAttributes:
          $ref: "#/components/schemas/PartialAudio"
          description: Only the properties that changed.
      required:
        - data
        - previousAttributes
        - type
        - timestamp
      examples:
        - type: audio.updated
          timestamp: "2025-03-25T12:54:10.000Z"
          data:
            id: 287310
            eventId: 226462
            companyId: 13866
            streamUrl: https://files.quartr.com/stream.m3u8
            fileUrl: https://files.quartr.com/audio.mpeg
            qna: 0
            audioMetedata:
              size: "200.0 MB"
              duration: 1230
              encoding: 7bit
              mimetype: audio/mpeg
            createdAt: "2025-03-25T12:51:30.000Z"
            updatedAt: "2025-03-25T12:54:10.000Z"
          previousAttributes:
            streamUrl: null
            updatedAt: "2025-03-25T12:51:52.000Z"

    AudioDeletedEvent:
      type: object
      title: AudioDeletedEvent
      properties:
        type:
          type: string
          const: audio.deleted
          description: The type of event.
        timestamp:
          $ref: "#/components/schemas/timestamp"
        data:
          type: object
          description: On deletion, data is empty as the entity is no longer available.
        previousAttributes:
          $ref: "#/components/schemas/Audio"
          description: The last known state of the entity.
      required:
        - data
        - previousAttributes
        - type
        - timestamp
      examples:
        - type: audio.deleted
          timestamp: "2025-03-24T21:39:32.000Z"
          data: {}
          previousAttributes:
            id: 287274
            eventId: 330267
            companyId: 5008
            fileUrl: https://quartr.com/example.m3u8
            streamUrl: null
            qna: 0
            audioMetedata:
              size: "200.0 MB"
              duration: 1230
              encoding: 7bit
              mimetype: audio/mpeg
            createdAt: "2025-03-24T21:39:18.000Z"
            updatedAt: "2025-03-24T21:39:18.000Z"

    Audio:
      type: object
      properties:
        id:
          type: integer
          title: ID
        eventId:
          type: integer
          title: Event ID
        companyId:
          type: integer
          title: Company ID
        streamUrl:
          type: string
          title: Stream URL
        fileUrl:
          type: string
          title: File URL
        qna:
          type: integer
          title: Q&A Timestamp
        audioMetedata:
          type: object
          title: Audio Metadata
        createdAt:
          type: string
          format: date-time
          title: Created At
        updatedAt:
          type: string
          format: date-time
          title: Updated At
      required:
        - id
        - eventId
        - companyId
        - createdAt
        - updatedAt

    PartialAudio:
      type: object
      properties:
        id:
          type: integer
          title: ID
        eventId:
          type: integer
          title: Event ID
        companyId:
          type: integer
          title: Company ID
        streamUrl:
          type: string
          title: Stream URL
        fileUrl:
          type: string
          title: File URL
        qna:
          type: integer
          title: Q&A Timestamp
        audioMetedata:
          type: object
          title: Audio Metadata
        createdAt:
          type: string
          format: date-time
          title: Created At
        updatedAt:
          type: string
          format: date-time
          title: Updated At

    timestamp:
      type: string
      format: date-time
      title: Timestamp
      description: The time the event was triggered.

    ###############################################
    # 8) Summary
    ###############################################
    SummaryEventCreatedEvent:
      type: object
      title: SummaryEventCreatedEvent
      properties:
        type:
          type: string
          const: summary.event.created
          description: The type of event.
        timestamp:
          $ref: "#/components/schemas/timestamp"
        data:
          $ref: "#/components/schemas/SummaryEvent"
          description: On creation, the data object contains the details of the new entity.
        previousAttributes:
          type: object
          description: On creation, this is empty as the entity is new.
      required:
        - type
        - timestamp
        - data
        - previousAttributes
      examples:
        - type: summary.event.created
          timestamp: "2025-03-25T12:00:00.000Z"
          data:
            id: 91521
            eventId: 330417
            companyId: 16562
            length: short
            createdAt: "2025-03-25T12:00:00.000Z"
            updatedAt: "2025-03-25T12:00:00.000Z"
          previousAttributes: {}

    SummaryEventUpdatedEvent:
      type: object
      title: SummaryEventUpdatedEvent
      properties:
        type:
          type: string
          const: summary.event.updated
          description: The type of event.
        timestamp:
          $ref: "#/components/schemas/timestamp"
        data:
          $ref: "#/components/schemas/SummaryEvent"
          description: On update, contains the updated details.
        previousAttributes:
          $ref: "#/components/schemas/PartialSummaryEvent"
          description: Only the properties that changed.
      required:
        - type
        - timestamp
        - data
        - previousAttributes
      examples:
        - type: summary.event.updated
          timestamp: "2025-03-25T12:10:00.000Z"
          data:
            id: 91521
            eventId: 330417
            companyId: 16562
            length: long
            createdAt: "2025-03-25T12:00:00.000Z"
            updatedAt: "2025-03-25T12:10:00.000Z"
          previousAttributes:
            length: short
            updatedAt: "2025-03-25T12:00:00.000Z"

    SummaryEventDeletedEvent:
      type: object
      title: SummaryEventDeletedEvent
      properties:
        type:
          type: string
          const: summary.event.deleted
          description: The type of event.
        timestamp:
          $ref: "#/components/schemas/timestamp"
        data:
          type: object
          description: On deletion, data is empty as the entity is no longer available.
        previousAttributes:
          $ref: "#/components/schemas/SummaryEvent"
          description: The last known state of the entity.
      required:
        - type
        - timestamp
        - data
        - previousAttributes
      examples:
        - type: summary.event.deleted
          timestamp: "2025-03-25T12:20:00.000Z"
          data: {}
          previousAttributes:
            id: 91521
            eventId: 330417
            companyId: 16562
            length: long
            createdAt: "2025-03-25T12:00:00.000Z"
            updatedAt: "2025-03-25T12:10:00.000Z"

    SummaryEvent:
      type: object
      properties:
        id:
          type: integer
          title: ID
        eventId:
          type: integer
          title: Event ID
        companyId:
          type: integer
          title: Company ID
        length:
          type: string
          title: Length
          enum:
            - line
            - short
            - long
        createdAt:
          type: string
          format: date-time
          title: Created At
        updatedAt:
          type: string
          format: date-time
          title: Updated At
      required:
        - id
        - eventId
        - companyId
        - length
        - createdAt
        - updatedAt

    PartialSummaryEvent:
      type: object
      properties:
        id:
          type: integer
          title: ID
        eventId:
          type: integer
          title: Event ID
        companyId:
          type: integer
          title: Company ID
        length:
          type: string
          title: Length
          enum:
            - line
            - short
            - long
        createdAt:
          type: string
          format: date-time
          title: Created At
        updatedAt:
          type: string
          format: date-time
          title: Updated At

    SummaryReportDocumentCreatedEvent:
      type: object
      title: SummaryReportDocumentCreatedEvent
      properties:
        type:
          type: string
          const: summary.document.report.created
          description: The type of event.
        timestamp:
          $ref: "#/components/schemas/timestamp"
        data:
          $ref: "#/components/schemas/SummaryDocument"
          description: On creation, the data object contains the details of the new entity.
        previousAttributes:
          type: object
          description: On creation, this is empty as the entity is new.
      required:
        - data
        - previousAttributes
        - type
        - timestamp
      examples:
        - type: summary.document.report.created
          timestamp: "2025-03-25T12:02:54.000Z"
          data:
            id: 1001
            documentId: 1879622
            companyId: 16562
            eventId: 329118
            length: short
            createdAt: "2025-03-25T12:02:54.000Z"
            updatedAt: "2025-03-25T12:02:54.000Z"
          previousAttributes: {}

    SummaryReportDocumentUpdatedEvent:
      type: object
      title: SummaryReportDocumentUpdatedEvent
      properties:
        type:
          type: string
          const: summary.document.report.updated
          description: The type of event.
        timestamp:
          $ref: "#/components/schemas/timestamp"
        data:
          $ref: "#/components/schemas/SummaryDocument"
          description: On update, contains the updated details.
        previousAttributes:
          $ref: "#/components/schemas/PartialSummaryDocument"
          description: Only the properties that changed.
      required:
        - data
        - previousAttributes
        - type
        - timestamp
      examples:
        - type: summary.document.report.updated
          timestamp: "2025-03-25T12:22:54.000Z"
          data:
            id: 1001
            documentId: 1879622
            companyId: 16562
            eventId: 329118
            length: long
            createdAt: "2025-03-25T12:02:54.000Z"
            updatedAt: "2025-03-25T12:22:54.000Z"
          previousAttributes:
            length: short
            updatedAt: "2025-03-25T12:02:54.000Z"

    SummaryReportDocumentDeletedEvent:
      type: object
      title: SummaryReportDocumentDeletedEvent
      properties:
        type:
          type: string
          const: summary.document.report.deleted
          description: The type of event.
        timestamp:
          $ref: "#/components/schemas/timestamp"
        data:
          type: object
          description: On deletion, data is empty as the entity is no longer available.
        previousAttributes:
          $ref: "#/components/schemas/SummaryDocument"
          description: The last known state of the entity.
      required:
        - data
        - previousAttributes
        - type
        - timestamp
      examples:
        - type: summary.document.report.deleted
          timestamp: "2025-03-25T12:30:00.000Z"
          data: {}
          previousAttributes:
            id: 1001
            documentId: 1879622
            companyId: 16562
            eventId: 329118
            length: long
            createdAt: "2025-03-25T12:02:54.000Z"
            updatedAt: "2025-03-25T12:22:54.000Z"

    SummaryTranscriptDocumentCreatedEvent:
      type: object
      title: SummaryTranscriptDocumentCreatedEvent
      properties:
        type:
          type: string
          const: summary.document.transcript.created
          description: The type of event.
        timestamp:
          $ref: "#/components/schemas/timestamp"
        data:
          $ref: "#/components/schemas/SummaryDocument"
          description: On creation, the data object contains the details of the new entity.
        previousAttributes:
          type: object
          description: On creation, this is empty as the entity is new.
      required:
        - data
        - previousAttributes
        - type
        - timestamp
      examples:
        - type: summary.document.transcript.created
          timestamp: "2025-03-25T13:48:34.000Z"
          data:
            id: 2002
            documentId: 1879711
            companyId: 5130
            eventId: 330449
            length: line
            createdAt: "2025-03-25T13:48:34.000Z"
            updatedAt: "2025-03-25T13:48:34.000Z"
          previousAttributes: {}

    SummaryTranscriptDocumentUpdatedEvent:
      type: object
      title: SummaryTranscriptDocumentUpdatedEvent
      properties:
        type:
          type: string
          const: summary.document.transcript.updated
          description: The type of event.
        timestamp:
          $ref: "#/components/schemas/timestamp"
        data:
          $ref: "#/components/schemas/SummaryDocument"
          description: On update, contains the updated details.
        previousAttributes:
          $ref: "#/components/schemas/PartialSummaryDocument"
          description: Only the properties that changed.
      required:
        - data
        - previousAttributes
        - type
        - timestamp
      examples:
        - type: summary.document.transcript.updated
          timestamp: "2025-03-25T13:50:00.000Z"
          data:
            id: 2002
            documentId: 1879711
            companyId: 5130
            eventId: 330449
            length: short
            createdAt: "2025-03-25T13:48:34.000Z"
            updatedAt: "2025-03-25T13:50:00.000Z"
          previousAttributes:
            length: line
            updatedAt: "2025-03-25T13:48:34.000Z"

    SummaryTranscriptDocumentDeletedEvent:
      type: object
      title: SummaryTranscriptDocumentDeletedEvent
      properties:
        type:
          type: string
          const: summary.document.transcript.deleted
          description: The type of event.
        timestamp:
          $ref: "#/components/schemas/timestamp"
        data:
          type: object
          description: On deletion, data is empty as the entity is no longer available.
        previousAttributes:
          $ref: "#/components/schemas/SummaryDocument"
          description: The last known state of the entity.
      required:
        - data
        - previousAttributes
        - type
        - timestamp
      examples:
        - type: summary.document.transcript.deleted
          timestamp: "2025-03-25T13:55:00.000Z"
          data: {}
          previousAttributes:
            id: 2002
            documentId: 1879711
            companyId: 5130
            eventId: 330449
            length: short
            createdAt: "2025-03-25T13:48:34.000Z"
            updatedAt: "2025-03-25T13:50:00.000Z"

    SummarySlidesDocumentCreatedEvent:
      type: object
      title: SummarySlidesDocumentCreatedEvent
      properties:
        type:
          type: string
          const: summary.document.slides.created
          description: The type of event.
        timestamp:
          $ref: "#/components/schemas/timestamp"
        data:
          $ref: "#/components/schemas/SummaryDocument"
          description: On creation, the data object contains the details of the new entity.
        previousAttributes:
          type: object
          description: On creation, this is empty as the entity is new.
      required:
        - data
        - previousAttributes
        - type
        - timestamp
      examples:
        - type: summary.document.slides.created
          timestamp: "2025-03-24T22:47:50.000Z"
          data:
            id: 3002
            documentId: 1879349
            companyId: 6531
            eventId: 7531
            length: short
            createdAt: "2025-03-24T22:47:50.000Z"
            updatedAt: "2025-03-24T22:47:50.000Z"
          previousAttributes: {}

    SummarySlidesDocumentUpdatedEvent:
      type: object
      title: SummarySlidesDocumentUpdatedEvent
      properties:
        type:
          type: string
          const: summary.document.slides.updated
          description: The type of event.
        timestamp:
          $ref: "#/components/schemas/timestamp"
        data:
          $ref: "#/components/schemas/SummaryDocument"
          description: On update, contains the updated details.
        previousAttributes:
          $ref: "#/components/schemas/PartialSummaryDocument"
          description: Only the properties that changed.
      required:
        - data
        - previousAttributes
        - type
        - timestamp
      examples:
        - type: summary.document.slides.updated
          timestamp: "2025-03-24T22:49:50.000Z"
          data:
            id: 3003
            documentId: 1879349
            companyId: 6531
            eventId: 7531
            length: long
            createdAt: "2025-03-24T22:47:50.000Z"
            updatedAt: "2025-03-24T22:49:50.000Z"
          previousAttributes:
            length: short
            updatedAt: "2025-03-24T22:47:50.000Z"

    SummarySlidesDocumentDeletedEvent:
      type: object
      title: SummarySlidesDocumentDeletedEvent
      properties:
        type:
          type: string
          const: summary.document.slides.deleted
          description: The type of event.
        timestamp:
          $ref: "#/components/schemas/timestamp"
        data:
          type: object
          description: On deletion, data is empty as the entity is no longer available.
        previousAttributes:
          $ref: "#/components/schemas/SummaryDocument"
          description: The last known state of the entity.
      required:
        - data
        - previousAttributes
        - type
        - timestamp
      examples:
        - type: summary.document.slides.deleted
          timestamp: "2025-03-24T22:55:00.000Z"
          data: {}
          previousAttributes:
            id: 3003
            documentId: 1879349
            companyId: 6531
            eventId: 7531
            length: long
            createdAt: "2025-03-24T22:47:50.000Z"
            updatedAt: "2025-03-24T22:49:50.000Z"

    SummaryDocument:
      type: object
      properties:
        id:
          type: integer
          title: ID
        documentId:
          type: integer
          title: Document ID
        companyId:
          type: integer
          title: Company ID
        eventId:
          type: integer
          title: Event ID
        length:
          type: string
          title: Length
          enum:
            - line
            - short
            - long
        createdAt:
          type: string
          format: date-time
          title: Created At
        updatedAt:
          type: string
          format: date-time
          title: Updated At
      required:
        - id
        - documentId
        - companyId
        - eventId
        - length
        - createdAt
        - updatedAt

    PartialSummaryDocument:
      type: object
      properties:
        id:
          type: integer
          title: ID
        documentId:
          type: integer
          title: Document ID
        companyId:
          type: integer
          title: Company ID
        eventId:
          type: integer
          title: Event ID
        length:
          type: string
          title: Length
          enum:
            - line
            - short
            - long
        createdAt:
          type: string
          format: date-time
          title: Created At
        updatedAt:
          type: string
          format: date-time
          title: Updated At
