mirror of
https://github.com/hanzoai/calendar.git
synced 2026-10-30 14:46:43 +00:00
* 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]>
68 lines
1.6 KiB
TypeScript
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>;
|