Files
calendar/packages/app-store/dailyvideo/zod.ts
T
b66d36a98e feat: generate transcription from recording and API endpoint (#15358)
* feat: generate transcription from recording

* fix: api

* chore: undo

* tests: add unit tests

* chore: refactor move zod type

* fix: add more security check

* chore: update test

* chore: type err

* chore: test

* chore: fix tyoe

* fix: build err

* chore: add try .. catch

* chore: update desc

---------

Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com>
2024-06-11 15:41:56 +00:00

42 lines
877 B
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(),
})
),
});
export type TGetTranscriptAccessLink = z.infer<typeof ZGetTranscriptAccessLink>;