Files
a11f7e6510 feat: add session endpoint and booking access pbac (#24637)
* 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 <[email protected]>
2025-12-04 05:45:17 +00:00

68 lines
1.6 KiB
TypeScript

import { z } from "zod";
export const appKeysSchema = z.object({
api_key: z.string().min(1),
scale_plan: z.string().default("false"),
});
export const appDataSchema = z.object({});
export const ZSubmitBatchProcessorJobRes = z.object({
id: z.string(),
});
export type TSubmitBatchProcessorJobRes = z.infer<typeof ZSubmitBatchProcessorJobRes>;
export type batchProcessorBody = {
preset: "transcript";
inParams: {
sourceType: "recordingId";
recordingId: string;
};
outParams: {
s3Config: {
s3KeyTemplate: "transcript";
};
};
};
export const ZGetTranscriptAccessLink = z.object({
id: z.string(),
preset: z.string(),
status: z.string(),
transcription: z.array(
z.object({
format: z.string(),
link: z.string().url(),
})
),
});
const meetingParticipantSchema = z.object({
user_id: z.string().nullable(),
participant_id: z.string(),
user_name: z.string().nullable(),
join_time: z.number(),
duration: z.number(),
});
const meetingSessionSchema = z.object({
id: z.string(),
room: z.string(),
start_time: z.number(),
duration: z.number(),
ongoing: z.boolean(),
max_participants: z.number(),
participants: z.array(meetingParticipantSchema),
});
export const getMeetingInformationResponseSchema = z.object({
data: z.array(meetingSessionSchema),
});
export type CalMeetingParticipant = z.infer<typeof meetingParticipantSchema>;
export type CalMeetingSession = z.infer<typeof meetingSessionSchema>;
export type TGetMeetingInformationResponsesSchema = z.infer<typeof getMeetingInformationResponseSchema>;
export type TGetTranscriptAccessLink = z.infer<typeof ZGetTranscriptAccessLink>;