# Code generated by cmd/asyncapi/main.go; DO NOT EDIT.
#
# This file is generated from the Go event registry at:
#   app/api/internal/events/outbound/registry.go
#
# To regenerate this file, run:
#   task partner:webhook:generate
#
# To add or modify webhook events, update the Go types in:
#   app/api/internal/events/outbound/*.go
#
asyncapi: 2.6.0
info:
    title: Contio Partner Webhook Events
    version: 1.7.0
    description: AsyncAPI specification for Contio Partner webhook events.
    contact:
        name: Contio Partner Support
        url: https://docs.contio.ai/partner-api/
servers:
    production:
        url: https://your.domain.com/contio/webhook
        protocol: https
        description: Your Contio webhook callback endpoint (configured via Contio Partner Admin API)
channels:
    action_button.triggered:
        subscribe:
            summary: Sent when a partner's action button is triggered
            operationId: onActionButtonTriggered
            message:
                name: action_button.triggered
                payload:
                    $ref: '#/components/schemas/ActionButtonTriggeredPayload'
    action_item.completed:
        subscribe:
            summary: Sent when an action item is marked as completed
            operationId: onActionItemCompleted
            message:
                name: action_item.completed
                payload:
                    $ref: '#/components/schemas/ActionItemCompletedPayload'
    action_item.created:
        subscribe:
            summary: Sent when a new action item is created
            operationId: onActionItemCreated
            message:
                name: action_item.created
                payload:
                    $ref: '#/components/schemas/ActionItemCreatedPayload'
    action_item.updated:
        subscribe:
            summary: Sent when an action item's status or details change
            operationId: onActionItemUpdated
            message:
                name: action_item.updated
                payload:
                    $ref: '#/components/schemas/ActionItemUpdatedPayload'
    agenda_item.created:
        subscribe:
            summary: Sent when an agenda item is created
            operationId: onAgendaItemCreated
            message:
                name: agenda_item.created
                payload:
                    $ref: '#/components/schemas/AgendaItemCreatedPayload'
    agenda_item.deleted:
        subscribe:
            summary: Sent when an agenda item is deleted
            operationId: onAgendaItemDeleted
            message:
                name: agenda_item.deleted
                payload:
                    $ref: '#/components/schemas/AgendaItemDeletedPayload'
    agenda_item.updated:
        subscribe:
            summary: Sent when an agenda item is updated
            operationId: onAgendaItemUpdated
            message:
                name: agenda_item.updated
                payload:
                    $ref: '#/components/schemas/AgendaItemUpdatedPayload'
    automation.assignment.created:
        subscribe:
            summary: Sent when an action item is assigned to your automation
            operationId: onAutomationAssignmentCreated
            message:
                name: automation.assignment.created
                payload:
                    $ref: '#/components/schemas/AutomationAssignmentCreatedPayload'
    calendar_event.created:
        subscribe:
            summary: Sent when a calendar event is synced from an external calendar
            operationId: onCalendarEventCreated
            message:
                name: calendar_event.created
                payload:
                    $ref: '#/components/schemas/CalendarEventCreatedPayload'
    calendar_event.deleted:
        subscribe:
            summary: Sent when a calendar event is cancelled/deleted from an external calendar
            operationId: onCalendarEventDeleted
            message:
                name: calendar_event.deleted
                payload:
                    $ref: '#/components/schemas/CalendarEventDeletedPayload'
    calendar_event.updated:
        subscribe:
            summary: Sent when a calendar event is updated in an external calendar
            operationId: onCalendarEventUpdated
            message:
                name: calendar_event.updated
                payload:
                    $ref: '#/components/schemas/CalendarEventUpdatedPayload'
    meeting.completed:
        subscribe:
            summary: Sent when a meeting ends and notes/summary are available
            operationId: onMeetingCompleted
            message:
                name: meeting.completed
                payload:
                    $ref: '#/components/schemas/MeetingCompletedPayload'
    meeting.context.created:
        subscribe:
            summary: Sent when a partner uploads context data to a meeting
            operationId: onMeetingContextCreated
            message:
                name: meeting.context.created
                payload:
                    $ref: '#/components/schemas/MeetingContextCreatedPayload'
    meeting.context.deleted:
        subscribe:
            summary: Sent when context data is removed from a meeting
            operationId: onMeetingContextDeleted
            message:
                name: meeting.context.deleted
                payload:
                    $ref: '#/components/schemas/MeetingContextDeletedPayload'
    meeting.context.processed:
        subscribe:
            summary: Sent when uploaded context data has been preprocessed
            operationId: onMeetingContextProcessed
            message:
                name: meeting.context.processed
                payload:
                    $ref: '#/components/schemas/MeetingContextProcessedPayload'
    meeting.created:
        subscribe:
            summary: Sent when a new meeting is created
            operationId: onMeetingCreated
            message:
                name: meeting.created
                payload:
                    $ref: '#/components/schemas/MeetingCreatedPayload'
    meeting.updated:
        subscribe:
            summary: Sent when a meeting's properties are updated
            operationId: onMeetingUpdated
            message:
                name: meeting.updated
                payload:
                    $ref: '#/components/schemas/MeetingUpdatedPayload'
    meeting_template.applied:
        subscribe:
            summary: Sent when a meeting template is applied to a meeting
            operationId: onMeetingTemplateApplied
            message:
                name: meeting_template.applied
                payload:
                    $ref: '#/components/schemas/MeetingTemplateAppliedPayload'
    next_step.completed:
        subscribe:
            summary: Sent when a Next Step execution completes
            operationId: onNextStepCompleted
            message:
                name: next_step.completed
                payload:
                    $ref: '#/components/schemas/NextStepCompletedPayload'
    participant.added:
        subscribe:
            summary: Sent when one or more participants are added to a meeting
            operationId: onParticipantAdded
            message:
                name: participant.added
                payload:
                    $ref: '#/components/schemas/ParticipantAddedPayload'
    participant.removed:
        subscribe:
            summary: Sent when a participant is removed from a meeting
            operationId: onParticipantRemoved
            message:
                name: participant.removed
                payload:
                    $ref: '#/components/schemas/ParticipantRemovedPayload'
    session.expired:
        subscribe:
            summary: Sent when a chat session expires due to inactivity
            operationId: onSessionExpired
            message:
                name: session.expired
                payload:
                    $ref: '#/components/schemas/SessionExpiredPayload'
    session.turn.completed:
        subscribe:
            summary: Sent when the agent finishes processing a turn in a chat session
            operationId: onSessionTurnCompleted
            message:
                name: session.turn.completed
                payload:
                    $ref: '#/components/schemas/SessionTurnCompletedPayload'
    session.turn.failed:
        subscribe:
            summary: Sent when the agent fails to process a turn in a chat session
            operationId: onSessionTurnFailed
            message:
                name: session.turn.failed
                payload:
                    $ref: '#/components/schemas/SessionTurnFailedPayload'
    user.connection.revoked:
        subscribe:
            summary: Sent when a user revokes their connection to your partner app
            operationId: onUserConnectionRevoked
            message:
                name: user.connection.revoked
                payload:
                    $ref: '#/components/schemas/UserConnectionRevokedPayload'
    workflow.run.completed:
        subscribe:
            summary: Sent when a workflow run completes successfully
            operationId: onWorkflowRunCompleted
            message:
                name: workflow.run.completed
                payload:
                    $ref: '#/components/schemas/WorkflowRunCompletedPayload'
    workflow.run.failed:
        subscribe:
            summary: Sent when a workflow run fails
            operationId: onWorkflowRunFailed
            message:
                name: workflow.run.failed
                payload:
                    $ref: '#/components/schemas/WorkflowRunFailedPayload'
    workflow.run.started:
        subscribe:
            summary: Sent when a workflow run starts
            operationId: onWorkflowRunStarted
            message:
                name: workflow.run.started
                payload:
                    $ref: '#/components/schemas/WorkflowRunStartedPayload'
    workflow.step.completed:
        subscribe:
            summary: Sent when a workflow step completes
            operationId: onWorkflowStepCompleted
            message:
                name: workflow.step.completed
                payload:
                    $ref: '#/components/schemas/WorkflowStepCompletedPayload'
    workflow.task.created:
        subscribe:
            summary: Sent when a workflow task is created
            operationId: onWorkflowTaskCreated
            message:
                name: workflow.task.created
                payload:
                    $ref: '#/components/schemas/WorkflowTaskCreatedPayload'
    workflow.task.resolved:
        subscribe:
            summary: Sent when a workflow task is resolved
            operationId: onWorkflowTaskResolved
            message:
                name: workflow.task.resolved
                payload:
                    $ref: '#/components/schemas/WorkflowTaskResolvedPayload'
components:
    schemas:
        ActionButtonTriggeredData:
            type: object
            required:
                - action_button_id
                - action_button_name
                - meeting_id
                - trigger_mode
                - triggered_at
                - triggered_by
            properties:
                action_button_id:
                    type: string
                    format: uuid
                action_button_name:
                    type: string
                invocation_id:
                    type:
                        - string
                        - "null"
                    format: uuid
                meeting_id:
                    type: string
                    format: uuid
                next_step_id:
                    type:
                        - string
                        - "null"
                    format: uuid
                result_id:
                    type:
                        - string
                        - "null"
                    format: uuid
                trigger_mode:
                    type: string
                triggered_at:
                    type: string
                    format: date-time
                triggered_by:
                    type: string
        ActionButtonTriggeredPayload:
            allOf:
                - $ref: '#/components/schemas/WebhookPayloadBase'
                - properties:
                    data:
                        $ref: '#/components/schemas/ActionButtonTriggeredData'
                    event_type:
                        const: action_button.triggered
                  type: object
        ActionItemCompletedData:
            type: object
            required:
                - action_item_id
                - completed_at
                - completed_by_user_id
                - meeting_id
                - title
                - workspace_id
            properties:
                action_item_id:
                    type: string
                    format: uuid
                assignee_id:
                    type:
                        - string
                        - "null"
                    format: uuid
                completed_at:
                    type: string
                    format: date-time
                completed_by_user_id:
                    type: string
                    format: uuid
                meeting_id:
                    type: string
                    format: uuid
                title:
                    type: string
                workspace_id:
                    type: string
                    format: uuid
        ActionItemCompletedPayload:
            allOf:
                - $ref: '#/components/schemas/WebhookPayloadBase'
                - properties:
                    data:
                        $ref: '#/components/schemas/ActionItemCompletedData'
                    event_type:
                        const: action_item.completed
                  type: object
        ActionItemCreatedData:
            type: object
            required:
                - action_item_id
                - created_at
                - meeting_id
                - title
                - workspace_id
            properties:
                action_item_id:
                    type: string
                    format: uuid
                assignee_id:
                    type:
                        - string
                        - "null"
                    format: uuid
                created_at:
                    type: string
                    format: date-time
                meeting_id:
                    type: string
                    format: uuid
                title:
                    type: string
                workspace_id:
                    type: string
                    format: uuid
        ActionItemCreatedPayload:
            allOf:
                - $ref: '#/components/schemas/WebhookPayloadBase'
                - properties:
                    data:
                        $ref: '#/components/schemas/ActionItemCreatedData'
                    event_type:
                        const: action_item.created
                  type: object
        ActionItemStatus:
            type: string
            description: Status of an action item
            enum:
                - needs_review
                - accepted
                - in_progress
                - completed
                - cancelled
                - blocked
        ActionItemUpdatedData:
            type: object
            required:
                - action_item_id
                - is_completed
                - meeting_id
                - status
                - updated_at
                - workspace_id
            properties:
                action_item_id:
                    type: string
                    format: uuid
                assignee_id:
                    type:
                        - string
                        - "null"
                    format: uuid
                is_completed:
                    type: boolean
                meeting_id:
                    type: string
                    format: uuid
                status:
                    $ref: '#/components/schemas/ActionItemStatus'
                updated_at:
                    type: string
                    format: date-time
                workspace_id:
                    type: string
                    format: uuid
        ActionItemUpdatedPayload:
            allOf:
                - $ref: '#/components/schemas/WebhookPayloadBase'
                - properties:
                    data:
                        $ref: '#/components/schemas/ActionItemUpdatedData'
                    event_type:
                        const: action_item.updated
                  type: object
        AgendaItemCreatedData:
            type: object
            required:
                - agenda_item_id
                - created_at
                - item_type
                - title
            properties:
                agenda_item_id:
                    type: string
                    format: uuid
                created_at:
                    type: string
                    format: date-time
                item_type:
                    type: string
                meeting_id:
                    type:
                        - string
                        - "null"
                    format: uuid
                title:
                    type: string
        AgendaItemCreatedPayload:
            allOf:
                - $ref: '#/components/schemas/WebhookPayloadBase'
                - properties:
                    data:
                        $ref: '#/components/schemas/AgendaItemCreatedData'
                    event_type:
                        const: agenda_item.created
                  type: object
        AgendaItemDeletedData:
            type: object
            required:
                - agenda_item_id
                - deleted_at
            properties:
                agenda_item_id:
                    type: string
                    format: uuid
                deleted_at:
                    type: string
                    format: date-time
                meeting_id:
                    type:
                        - string
                        - "null"
                    format: uuid
        AgendaItemDeletedPayload:
            allOf:
                - $ref: '#/components/schemas/WebhookPayloadBase'
                - properties:
                    data:
                        $ref: '#/components/schemas/AgendaItemDeletedData'
                    event_type:
                        const: agenda_item.deleted
                  type: object
        AgendaItemUpdatedData:
            type: object
            required:
                - agenda_item_id
                - item_type
                - status
                - title
                - updated_at
            properties:
                agenda_item_id:
                    type: string
                    format: uuid
                item_type:
                    type: string
                meeting_id:
                    type:
                        - string
                        - "null"
                    format: uuid
                status:
                    type: string
                title:
                    type: string
                updated_at:
                    type: string
                    format: date-time
        AgendaItemUpdatedPayload:
            allOf:
                - $ref: '#/components/schemas/WebhookPayloadBase'
                - properties:
                    data:
                        $ref: '#/components/schemas/AgendaItemUpdatedData'
                    event_type:
                        const: agenda_item.updated
                  type: object
        AutomationAssignmentCreatedData:
            type: object
            required:
                - action_item_id
                - assignment_id
                - automation_id
                - automation_name
                - created_at
                - meeting_id
                - status
                - workspace_id
            properties:
                action_item_id:
                    type: string
                    format: uuid
                assignment_id:
                    type: string
                    format: uuid
                automation_data_payload:
                    type: object
                    additionalProperties: true
                automation_id:
                    type: string
                    format: uuid
                automation_name:
                    type: string
                confidence_score:
                    type: number
                created_at:
                    type: string
                    format: date-time
                meeting_id:
                    type: string
                    format: uuid
                status:
                    type: string
                workspace_id:
                    type: string
                    format: uuid
        AutomationAssignmentCreatedPayload:
            allOf:
                - $ref: '#/components/schemas/WebhookPayloadBase'
                - properties:
                    data:
                        $ref: '#/components/schemas/AutomationAssignmentCreatedData'
                    event_type:
                        const: automation.assignment.created
                  type: object
        CalendarEventCreatedData:
            type: object
            required:
                - attendee_count
                - calendar_event_id
                - end_time
                - is_all_day
                - start_time
                - title
            properties:
                attendee_count:
                    type: integer
                calendar_event_id:
                    type: string
                    format: uuid
                end_time:
                    type: string
                    format: date-time
                is_all_day:
                    type: boolean
                start_time:
                    type: string
                    format: date-time
                title:
                    type: string
        CalendarEventCreatedPayload:
            allOf:
                - $ref: '#/components/schemas/WebhookPayloadBase'
                - properties:
                    data:
                        $ref: '#/components/schemas/CalendarEventCreatedData'
                    event_type:
                        const: calendar_event.created
                  type: object
        CalendarEventDeletedData:
            type: object
            required:
                - calendar_event_id
            properties:
                calendar_event_id:
                    type: string
                    format: uuid
        CalendarEventDeletedPayload:
            allOf:
                - $ref: '#/components/schemas/WebhookPayloadBase'
                - properties:
                    data:
                        $ref: '#/components/schemas/CalendarEventDeletedData'
                    event_type:
                        const: calendar_event.deleted
                  type: object
        CalendarEventUpdatedData:
            type: object
            required:
                - attendee_count
                - calendar_event_id
                - end_time
                - is_all_day
                - start_time
                - title
            properties:
                attendee_count:
                    type: integer
                calendar_event_id:
                    type: string
                    format: uuid
                end_time:
                    type: string
                    format: date-time
                is_all_day:
                    type: boolean
                start_time:
                    type: string
                    format: date-time
                title:
                    type: string
        CalendarEventUpdatedPayload:
            allOf:
                - $ref: '#/components/schemas/WebhookPayloadBase'
                - properties:
                    data:
                        $ref: '#/components/schemas/CalendarEventUpdatedData'
                    event_type:
                        const: calendar_event.updated
                  type: object
        MeetingCompletedData:
            type: object
            required:
                - completed_at
                - meeting_id
                - title
                - workspace_id
            properties:
                completed_at:
                    type: string
                    format: date-time
                meeting_id:
                    type: string
                    format: uuid
                title:
                    type: string
                workspace_id:
                    type: string
                    format: uuid
        MeetingCompletedPayload:
            allOf:
                - $ref: '#/components/schemas/WebhookPayloadBase'
                - properties:
                    data:
                        $ref: '#/components/schemas/MeetingCompletedData'
                    event_type:
                        const: meeting.completed
                  type: object
        MeetingContextCreatedData:
            type: object
            required:
                - context_id
                - created_at
                - meeting_id
                - workspace_id
            properties:
                context_id:
                    type: string
                    format: uuid
                created_at:
                    type: string
                    format: date-time
                meeting_id:
                    type: string
                    format: uuid
                title:
                    type: string
                workspace_id:
                    type: string
                    format: uuid
        MeetingContextCreatedPayload:
            allOf:
                - $ref: '#/components/schemas/WebhookPayloadBase'
                - properties:
                    data:
                        $ref: '#/components/schemas/MeetingContextCreatedData'
                    event_type:
                        const: meeting.context.created
                  type: object
        MeetingContextDeletedData:
            type: object
            required:
                - context_id
                - deleted_at
                - meeting_id
                - workspace_id
            properties:
                context_id:
                    type: string
                    format: uuid
                deleted_at:
                    type: string
                    format: date-time
                meeting_id:
                    type: string
                    format: uuid
                workspace_id:
                    type: string
                    format: uuid
        MeetingContextDeletedPayload:
            allOf:
                - $ref: '#/components/schemas/WebhookPayloadBase'
                - properties:
                    data:
                        $ref: '#/components/schemas/MeetingContextDeletedData'
                    event_type:
                        const: meeting.context.deleted
                  type: object
        MeetingContextProcessedData:
            type: object
            required:
                - context_id
                - meeting_id
                - processed_at
                - sanitization_report
                - workspace_id
            properties:
                context_id:
                    type: string
                    format: uuid
                meeting_id:
                    type: string
                    format: uuid
                processed_at:
                    type: string
                    format: date-time
                sanitization_report:
                    type: object
                    required:
                        - formula_escaped
                        - pii_detected
                        - secrets_detected
                    properties:
                        formula_escaped:
                            type: boolean
                        pii_detected:
                            type: boolean
                        redactions:
                            type: array
                            items:
                                type: object
                                required:
                                    - count
                                    - type
                                properties:
                                    count:
                                        type: integer
                                    type:
                                        type: string
                        secrets_detected:
                            type: boolean
                workspace_id:
                    type: string
                    format: uuid
        MeetingContextProcessedPayload:
            allOf:
                - $ref: '#/components/schemas/WebhookPayloadBase'
                - properties:
                    data:
                        $ref: '#/components/schemas/MeetingContextProcessedData'
                    event_type:
                        const: meeting.context.processed
                  type: object
        MeetingCreatedData:
            type: object
            required:
                - created_at
                - created_by_user_id
                - meeting_id
                - title
                - workspace_id
            properties:
                created_at:
                    type: string
                    format: date-time
                created_by_user_id:
                    type: string
                    format: uuid
                meeting_id:
                    type: string
                    format: uuid
                title:
                    type: string
                workspace_id:
                    type: string
                    format: uuid
        MeetingCreatedPayload:
            allOf:
                - $ref: '#/components/schemas/WebhookPayloadBase'
                - properties:
                    data:
                        $ref: '#/components/schemas/MeetingCreatedData'
                    event_type:
                        const: meeting.created
                  type: object
        MeetingTemplateAppliedData:
            type: object
            required:
                - applied_at
                - applied_by_user_id
                - applied_items
                - meeting_id
                - template_id
                - template_name
            properties:
                applied_at:
                    type: string
                    format: date-time
                applied_by_user_id:
                    type: string
                    format: uuid
                applied_items:
                    type: object
                    required:
                        - agenda_items
                        - documents
                        - participants
                    properties:
                        agenda_items:
                            type: integer
                        documents:
                            type: integer
                        participants:
                            type: integer
                meeting_id:
                    type: string
                    format: uuid
                template_id:
                    type: string
                    format: uuid
                template_name:
                    type: string
        MeetingTemplateAppliedPayload:
            allOf:
                - $ref: '#/components/schemas/WebhookPayloadBase'
                - properties:
                    data:
                        $ref: '#/components/schemas/MeetingTemplateAppliedData'
                    event_type:
                        const: meeting_template.applied
                  type: object
        MeetingUpdatedData:
            type: object
            required:
                - meeting_id
                - title
                - updated_at
                - workspace_id
            properties:
                meeting_id:
                    type: string
                    format: uuid
                scheduled_start:
                    type:
                        - string
                        - "null"
                    format: date-time
                title:
                    type: string
                updated_at:
                    type: string
                    format: date-time
                workspace_id:
                    type: string
                    format: uuid
        MeetingUpdatedPayload:
            allOf:
                - $ref: '#/components/schemas/WebhookPayloadBase'
                - properties:
                    data:
                        $ref: '#/components/schemas/MeetingUpdatedData'
                    event_type:
                        const: meeting.updated
                  type: object
        NextStepCompletedData:
            type: object
            required:
                - executed_at
                - executed_by
                - execution_mode
                - meeting_id
                - next_step_id
                - next_step_name
                - result_id
            properties:
                executed_at:
                    type: string
                    format: date-time
                executed_by:
                    type: string
                execution_mode:
                    type: string
                meeting_id:
                    type: string
                    format: uuid
                next_step_id:
                    type: string
                    format: uuid
                next_step_name:
                    type: string
                result_id:
                    type: string
                    format: uuid
        NextStepCompletedPayload:
            allOf:
                - $ref: '#/components/schemas/WebhookPayloadBase'
                - properties:
                    data:
                        $ref: '#/components/schemas/NextStepCompletedData'
                    event_type:
                        const: next_step.completed
                  type: object
        ParticipantAddedData:
            type: object
            required:
                - added_at
                - meeting_id
                - participants
                - workspace_id
            properties:
                added_at:
                    type: string
                    format: date-time
                meeting_id:
                    type: string
                    format: uuid
                participants:
                    type: array
                    items:
                        $ref: '#/components/schemas/ParticipantInfo'
                workspace_id:
                    type: string
                    format: uuid
        ParticipantAddedPayload:
            allOf:
                - $ref: '#/components/schemas/WebhookPayloadBase'
                - properties:
                    data:
                        $ref: '#/components/schemas/ParticipantAddedData'
                    event_type:
                        const: participant.added
                  type: object
        ParticipantInfo:
            type: object
            required:
                - participant_id
                - role
            properties:
                guest_email:
                    type:
                        - string
                        - "null"
                    format: email
                participant_id:
                    type: string
                    format: uuid
                role:
                    type: string
                user_id:
                    type:
                        - string
                        - "null"
                    format: uuid
        ParticipantRemovedData:
            type: object
            required:
                - meeting_id
                - participant_id
                - removed_at
                - workspace_id
            properties:
                guest_email:
                    type:
                        - string
                        - "null"
                    format: email
                meeting_id:
                    type: string
                    format: uuid
                participant_id:
                    type: string
                    format: uuid
                removed_at:
                    type: string
                    format: date-time
                user_id:
                    type:
                        - string
                        - "null"
                    format: uuid
                workspace_id:
                    type: string
                    format: uuid
        ParticipantRemovedPayload:
            allOf:
                - $ref: '#/components/schemas/WebhookPayloadBase'
                - properties:
                    data:
                        $ref: '#/components/schemas/ParticipantRemovedData'
                    event_type:
                        const: participant.removed
                  type: object
        PartnerMeetingSummary:
            type: object
            required:
                - meeting_id
                - title
            properties:
                meeting_id:
                    type: string
                title:
                    type: string
        SessionExpiredData:
            type: object
            required:
                - expired_at
                - last_activity_at
                - session_id
                - turn_count
            properties:
                expired_at:
                    type: string
                    format: date-time
                last_activity_at:
                    type: string
                    format: date-time
                meeting_id:
                    type:
                        - string
                        - "null"
                    format: uuid
                session_id:
                    type: string
                    format: uuid
                turn_count:
                    type: integer
        SessionExpiredPayload:
            allOf:
                - $ref: '#/components/schemas/WebhookPayloadBase'
                - properties:
                    data:
                        $ref: '#/components/schemas/SessionExpiredData'
                    event_type:
                        const: session.expired
                  type: object
        SessionTurnCompletedData:
            type: object
            required:
                - completed_at
                - sequence_number
                - session_id
                - turn_id
            properties:
                completed_at:
                    type: string
                    format: date-time
                meeting_id:
                    type:
                        - string
                        - "null"
                    format: uuid
                sequence_number:
                    type: integer
                session_id:
                    type: string
                    format: uuid
                turn_id:
                    type: string
                    format: uuid
        SessionTurnCompletedPayload:
            allOf:
                - $ref: '#/components/schemas/WebhookPayloadBase'
                - properties:
                    data:
                        $ref: '#/components/schemas/SessionTurnCompletedData'
                    event_type:
                        const: session.turn.completed
                  type: object
        SessionTurnFailedData:
            type: object
            required:
                - error_code
                - error_message
                - failed_at
                - sequence_number
                - session_id
                - turn_id
            properties:
                error_code:
                    type: string
                error_message:
                    type: string
                failed_at:
                    type: string
                    format: date-time
                meeting_id:
                    type:
                        - string
                        - "null"
                    format: uuid
                sequence_number:
                    type: integer
                session_id:
                    type: string
                    format: uuid
                turn_id:
                    type: string
                    format: uuid
        SessionTurnFailedPayload:
            allOf:
                - $ref: '#/components/schemas/WebhookPayloadBase'
                - properties:
                    data:
                        $ref: '#/components/schemas/SessionTurnFailedData'
                    event_type:
                        const: session.turn.failed
                  type: object
        UserConnectionRevokedData:
            type: object
            required:
                - connection_id
                - revoked_at
            properties:
                connection_id:
                    type: string
                    format: uuid
                revoked_at:
                    type: string
                    format: date-time
        UserConnectionRevokedPayload:
            allOf:
                - $ref: '#/components/schemas/WebhookPayloadBase'
                - properties:
                    data:
                        $ref: '#/components/schemas/UserConnectionRevokedData'
                    event_type:
                        const: user.connection.revoked
                  type: object
        WebhookPayloadBase:
            type: object
            required:
                - event_type
                - event_id
                - timestamp
                - partner_app_id
                - data
            properties:
                data:
                    type: object
                event_id:
                    type: string
                    format: uuid
                event_type:
                    type: string
                for_user:
                    $ref: '#/components/schemas/WebhookUserContext'
                partner_app_id:
                    type: string
                    format: uuid
                timestamp:
                    type: string
                    format: date-time
        WebhookUserContext:
            type: object
            description: User context for webhooks - identifies which user the event is being delivered for
            required:
                - id
                - email
            properties:
                email:
                    type: string
                    format: email
                id:
                    type: string
                    format: uuid
        WorkflowRunCompletedData:
            type: object
            required:
                - completed_at
                - duration_ms
                - final_status
                - run_id
                - template_id
                - total_steps
                - workspace_id
            properties:
                completed_at:
                    type: string
                    format: date-time
                duration_ms:
                    type: integer
                final_status:
                    type: string
                run_id:
                    type: string
                    format: uuid
                template_id:
                    type: string
                    format: uuid
                total_steps:
                    type: integer
                workspace_id:
                    type: string
                    format: uuid
        WorkflowRunCompletedPayload:
            allOf:
                - $ref: '#/components/schemas/WebhookPayloadBase'
                - properties:
                    data:
                        $ref: '#/components/schemas/WorkflowRunCompletedData'
                    event_type:
                        const: workflow.run.completed
                  type: object
        WorkflowRunFailedData:
            type: object
            required:
                - error_message
                - failed_at
                - final_status
                - run_id
                - template_id
                - workspace_id
            properties:
                error_message:
                    type: string
                failed_at:
                    type: string
                    format: date-time
                final_status:
                    type: string
                node_id:
                    type:
                        - string
                        - "null"
                run_id:
                    type: string
                    format: uuid
                step_id:
                    type:
                        - string
                        - "null"
                    format: uuid
                template_id:
                    type: string
                    format: uuid
                workspace_id:
                    type: string
                    format: uuid
        WorkflowRunFailedPayload:
            allOf:
                - $ref: '#/components/schemas/WebhookPayloadBase'
                - properties:
                    data:
                        $ref: '#/components/schemas/WorkflowRunFailedData'
                    event_type:
                        const: workflow.run.failed
                  type: object
        WorkflowRunStartedData:
            type: object
            required:
                - originating_id
                - originating_type
                - run_id
                - started_at
                - template_id
                - trigger_type
                - workspace_id
            properties:
                originating_id:
                    type: string
                    format: uuid
                originating_type:
                    type: string
                run_id:
                    type: string
                    format: uuid
                started_at:
                    type: string
                    format: date-time
                template_id:
                    type: string
                    format: uuid
                trigger_type:
                    type: string
                triggered_by:
                    type:
                        - string
                        - "null"
                workspace_id:
                    type: string
                    format: uuid
        WorkflowRunStartedPayload:
            allOf:
                - $ref: '#/components/schemas/WebhookPayloadBase'
                - properties:
                    data:
                        $ref: '#/components/schemas/WorkflowRunStartedData'
                    event_type:
                        const: workflow.run.started
                  type: object
        WorkflowStepCompletedData:
            type: object
            required:
                - completed_at
                - node_id
                - node_type
                - run_id
                - status
                - step_id
            properties:
                completed_at:
                    type: string
                    format: date-time
                node_id:
                    type: string
                node_type:
                    type: string
                output_summary: {}
                run_id:
                    type: string
                    format: uuid
                status:
                    type: string
                step_id:
                    type: string
                    format: uuid
        WorkflowStepCompletedPayload:
            allOf:
                - $ref: '#/components/schemas/WebhookPayloadBase'
                - properties:
                    data:
                        $ref: '#/components/schemas/WorkflowStepCompletedData'
                    event_type:
                        const: workflow.step.completed
                  type: object
        WorkflowTaskCreatedData:
            type: object
            required:
                - assignee_user_id
                - created_at
                - run_id
                - task_id
                - task_type
                - title
                - workspace_id
            properties:
                assignee_user_id:
                    type: string
                    format: uuid
                created_at:
                    type: string
                    format: date-time
                run_id:
                    type: string
                    format: uuid
                task_id:
                    type: string
                    format: uuid
                task_type:
                    type: string
                title:
                    type: string
                workspace_id:
                    type: string
                    format: uuid
        WorkflowTaskCreatedPayload:
            allOf:
                - $ref: '#/components/schemas/WebhookPayloadBase'
                - properties:
                    data:
                        $ref: '#/components/schemas/WorkflowTaskCreatedData'
                    event_type:
                        const: workflow.task.created
                  type: object
        WorkflowTaskResolvedData:
            type: object
            required:
                - decision
                - resolved_at
                - resolved_by
                - run_id
                - task_id
                - workspace_id
            properties:
                decision:
                    type: string
                reason:
                    type:
                        - string
                        - "null"
                resolved_at:
                    type: string
                    format: date-time
                resolved_by:
                    type: string
                run_id:
                    type: string
                    format: uuid
                task_id:
                    type: string
                    format: uuid
                workspace_id:
                    type: string
                    format: uuid
        WorkflowTaskResolvedPayload:
            allOf:
                - $ref: '#/components/schemas/WebhookPayloadBase'
                - properties:
                    data:
                        $ref: '#/components/schemas/WorkflowTaskResolvedData'
                    event_type:
                        const: workflow.task.resolved
                  type: object
