diff --git a/backend/openapi/components/schemas/meet-webhook.yaml b/backend/openapi/components/schemas/meet-webhook.yaml index 53d313a..b9c5b03 100644 --- a/backend/openapi/components/schemas/meet-webhook.yaml +++ b/backend/openapi/components/schemas/meet-webhook.yaml @@ -3,37 +3,33 @@ MeetWebhookEvent: properties: creationDate: type: number - description: The timestamp when the webhook event was created. + description: The date when the event was created (milliseconds since the Unix epoch). + example: 1620000000000 event: - $ref: '#/MeetWebhookEventType' - description: The type of event. + type: string + description: Event type identifier. + enum: + - recordingStarted + - recordingUpdated + - recordingEnded + - meetingStarted + - meetingEnded + example: recordingStarted data: oneOf: - allOf: - title: Recording Event Data - description: Data for recording-related events (started, updated, ended) - $ref: './meet-recording.yaml' - # - allOf: - # - title: Room Event Data - # - description: Data for room-related events (created, updated, deleted) - # - $ref: './meet-room.yaml' + - allOf: + - title: Room Event Data + - description: Data for room-related events (meeting started, meeting ended) + - $ref: './meet-room.yaml' discriminator: propertyName: eventType mapping: recordingStarted: './meet-recording.yaml' recordingUpdated: './meet-recording.yaml' recordingEnded: './meet-recording.yaml' - # roomCreated: './meet-room.yaml' - # roomUpdated: './meet-room.yaml' - # roomDeleted: './meet-room.yaml' - description: The event payload data, determined by the event type. - -MeetWebhookEventType: - type: string - enum: - - recordingStarted - - recordingUpdated - - recordingEnded - # - roomCreated - # - roomUpdated - # - roomDeleted + meetingStarted: './meet-room.yaml' + meetingEnded: './meet-room.yaml' diff --git a/backend/openapi/components/schemas/recording-base.yaml b/backend/openapi/components/schemas/recording-base.yaml index ef9c2ec..4b535a2 100644 --- a/backend/openapi/components/schemas/recording-base.yaml +++ b/backend/openapi/components/schemas/recording-base.yaml @@ -1,23 +1,32 @@ type: object required: - - recordingId - - roomId - - filename - - startDate + - recordingId + - roomId + - roomName + - status + - filename + - startDate properties: - recordingId: - type: string - description: The unique identifier of the recording. - example: room-123--EG_XYZ--XX445 - roomId: - type: string - description: The ID of the room where the recording was made. - example: room-123 - filename: - type: string - description: The name of the recording file. - example: room-123--XX445.mp4 - startDate: - type: number - description: The date when the recording started (milliseconds since the Unix epoch). - example: 1620000000000 \ No newline at end of file + recordingId: + type: string + description: The unique identifier of the recording. + example: room-123--EG_XYZ--XX445 + roomId: + type: string + description: The ID of the room where the recording was made. + example: room-123 + roomName: + type: string + description: The name of the room where the recording was made. + example: 'room' + status: + type: string + description: The status of the recording. + filename: + type: string + description: The name of the recording file. + example: room-123--XX445.mp4 + startDate: + type: number + description: The date when the recording started (milliseconds since the Unix epoch). + example: 1620000000000 diff --git a/backend/openapi/components/schemas/webhook-base-event.yaml b/backend/openapi/components/schemas/webhook-base-event.yaml index 98a38fc..b7c2a93 100644 --- a/backend/openapi/components/schemas/webhook-base-event.yaml +++ b/backend/openapi/components/schemas/webhook-base-event.yaml @@ -11,7 +11,6 @@ properties: event: type: string description: Event type identifier. - example: webhookEvent data: type: object description: The data associated with the event. diff --git a/backend/openapi/webhooks/webhooks.yaml b/backend/openapi/webhooks/webhooks.yaml index 96323a3..748fcec 100644 --- a/backend/openapi/webhooks/webhooks.yaml +++ b/backend/openapi/webhooks/webhooks.yaml @@ -22,17 +22,11 @@ recordingStarted: example: recordingStarted data: type: object - required: - - recordingId - - roomId - - status allOf: - $ref: ../components/schemas/recording-base.yaml - properties: status: - type: string enum: [STARTING, ACTIVE] - description: The status of the recording. example: STARTING responses: '200': @@ -62,17 +56,11 @@ recordingUpdated: example: recordingUpdated data: type: object - required: - - recordingId - - roomId - - status allOf: - $ref: ../components/schemas/recording-base.yaml - properties: status: - type: string enum: [ACTIVE, ENDING] - description: The status of the recording. example: ACTIVE responses: '200': @@ -104,17 +92,15 @@ recordingEnded: data: type: object required: - - recordingId - - roomId - - status - endDate + - duration + - size + - details allOf: - $ref: ../components/schemas/recording-base.yaml - properties: status: - type: string enum: [COMPLETE, FAILED, ABORTED, LIMIT_REACHED] - description: The status of the recording. example: COMPLETE endDate: type: number