* feat: add session endpoint * fix: remove participant id * refactor; feedback * fix: e2e test * refactor: add pbac * refactor: use constant * tests: add booking tests * fix: conflicts * chore: test * fix: tests * fix: tests * chore: remove un necessary * chore: docs * fix: desc * fix: booking-pbac gurd * fix: booking-pbac gurd * test: add unit tests * fix: remove legacy pbac * fix: chore remove * fix: update tests * test: add more test * test: move it to new file * chore: comment auth * chore: add message * chore: add message --------- Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
53 lines
1.9 KiB
TypeScript
53 lines
1.9 KiB
TypeScript
import type {
|
|
TSubmitBatchProcessorJobRes,
|
|
batchProcessorBody,
|
|
TGetTranscriptAccessLink,
|
|
TGetMeetingInformationResponsesSchema,
|
|
} from "@calcom/app-store/dailyvideo/zod";
|
|
import type { GetRecordingsResponseSchema, GetAccessLinkResponseSchema } from "@calcom/prisma/zod-utils";
|
|
|
|
import type { EventBusyDate } from "./Calendar";
|
|
import type { CredentialPayload } from "./Credential";
|
|
|
|
export interface VideoCallData {
|
|
type: string;
|
|
id: string;
|
|
password: string;
|
|
url: string;
|
|
}
|
|
|
|
// VideoApiAdapter is defined by the Video App. The App currently can choose to not define it. So, consider in type that VideoApiAdapter can be undefined.
|
|
export type VideoApiAdapter =
|
|
| {
|
|
createMeeting(event: CalendarEvent): Promise<VideoCallData>;
|
|
|
|
updateMeeting(bookingRef: PartialReference, event: CalendarEvent): Promise<VideoCallData>;
|
|
|
|
deleteMeeting(uid: string): Promise<unknown>;
|
|
|
|
getAvailability(dateFrom?: string, dateTo?: string): Promise<EventBusyDate[]>;
|
|
|
|
getRecordings?(roomName: string): Promise<GetRecordingsResponseSchema>;
|
|
|
|
getRecordingDownloadLink?(recordingId: string): Promise<GetAccessLinkResponseSchema>;
|
|
|
|
createInstantCalVideoRoom?(endTime: string): Promise<VideoCallData>;
|
|
|
|
getAllTranscriptsAccessLinkFromRoomName?(roomName: string): Promise<Array<string>>;
|
|
|
|
getAllTranscriptsAccessLinkFromMeetingId?(meetingId: string): Promise<Array<string>>;
|
|
|
|
submitBatchProcessorJob?(body: batchProcessorBody): Promise<TSubmitBatchProcessorJobRes>;
|
|
|
|
getTranscriptsAccessLinkFromRecordingId?(
|
|
recordingId: string
|
|
): Promise<TGetTranscriptAccessLink["transcription"] | { message: string }>;
|
|
|
|
checkIfRoomNameMatchesInRecording?(roomName: string, recordingId: string): Promise<boolean>;
|
|
|
|
getMeetingInformation?(roomName: string): Promise<TGetMeetingInformationResponsesSchema>;
|
|
}
|
|
| undefined;
|
|
|
|
export type VideoApiAdapterFactory = (credential: CredentialPayload) => VideoApiAdapter;
|