typings: Update recording status enums and improve webhook models for clarity and consistency
This commit is contained in:
parent
baec69c3db
commit
2d4f005d3b
@ -1,30 +1,31 @@
|
|||||||
export const enum MeetRecordingStatus {
|
export const enum MeetRecordingStatus {
|
||||||
STARTING = 'STARTING',
|
STARTING = 'STARTING',
|
||||||
STARTED = 'STARTED',
|
ACTIVE = 'ACTIVE',
|
||||||
STOPPING = 'STOPPING',
|
ENDING = 'ENDING',
|
||||||
STOPPED = 'STOPPED',
|
COMPLETE = 'COMPLETE',
|
||||||
FAILED = 'FAILED',
|
FAILED = 'FAILED',
|
||||||
READY = 'READY'
|
ABORTED = 'ABORTED',
|
||||||
|
LIMITED_REACHED = 'LIMITED_REACHED',
|
||||||
}
|
}
|
||||||
|
|
||||||
export const enum MeetRecordingOutputMode {
|
export const enum MeetRecordingOutputMode {
|
||||||
COMPOSED = 'COMPOSED',
|
COMPOSED = 'COMPOSED'
|
||||||
INDIVIDUAL = 'INDIVIDUAL'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface representing a recording
|
* Interface representing a recording
|
||||||
*/
|
*/
|
||||||
export interface MeetRecordingInfo {
|
export interface MeetRecordingInfo {
|
||||||
id: string;
|
recordingId: string;
|
||||||
roomName: string;
|
|
||||||
// TODO: Delete roomId
|
|
||||||
roomId: string;
|
roomId: string;
|
||||||
outputMode: MeetRecordingOutputMode;
|
outputMode: MeetRecordingOutputMode;
|
||||||
status: MeetRecordingStatus;
|
status: MeetRecordingStatus;
|
||||||
filename?: string;
|
filename?: string;
|
||||||
startedAt?: number;
|
startDate?: number;
|
||||||
endedAt?: number;
|
endDate?: number;
|
||||||
duration?: number;
|
duration?: number;
|
||||||
size?: number;
|
size?: number;
|
||||||
|
errorCode?: number;
|
||||||
|
error?: string;
|
||||||
|
details?: string;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,24 +1,19 @@
|
|||||||
import { MeetRecordingStatus } from './recording.model.js';
|
/** THIS HEADER IS AUTOGENERATED. DO NOT MODIFY MANUALLY. For any changes, please update the '/openvidu-meet/typings' directory. */
|
||||||
|
|
||||||
export interface OpenViduWebhookEvent {
|
import { MeetRecordingInfo } from './recording.model.js';
|
||||||
|
import { OpenViduMeetRoom } from './room.js';
|
||||||
|
|
||||||
|
export type MeetWebhookPayload = MeetRecordingInfo | OpenViduMeetRoom;
|
||||||
|
|
||||||
|
export const enum MeetWebhookEventType {
|
||||||
|
RECORDING_STARTED = 'recordingStarted',
|
||||||
|
RECORDING_UPDATED = 'recordingUpdated',
|
||||||
|
RECORDING_ENDED = 'recordingEnded',
|
||||||
|
ROOM_FINISHED = 'roomFinished',
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface MeetWebhookEvent {
|
||||||
creationDate: number;
|
creationDate: number;
|
||||||
event: OpenViduWebhookEventType;
|
event: MeetWebhookEventType;
|
||||||
data: RoomWebhookData | RecordingWebhookData;
|
data: MeetWebhookPayload;
|
||||||
}
|
|
||||||
|
|
||||||
export const enum OpenViduWebhookEventType {
|
|
||||||
RECORDING_STARTED = 'recording_started',
|
|
||||||
RECORDING_STOPPED = 'recording_stopped',
|
|
||||||
ROOM_FINISHED = 'room_finished'
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface RecordingWebhookData {
|
|
||||||
recordingId: string;
|
|
||||||
filename?: string;
|
|
||||||
roomName: string;
|
|
||||||
status: MeetRecordingStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface RoomWebhookData {
|
|
||||||
roomName: string;
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user