Kyoo/front/src/models/extra.ts
2025-07-15 00:11:28 +02:00

30 lines
597 B
TypeScript

import { z } from "zod/v4";
import { KImage } from "./utils/images";
import { zdate } from "./utils/utils";
export const Extra = z.object({
kind: z.enum([
"other",
"trailer",
"interview",
"behind-the-scene",
"deleted-scene",
"blooper",
]),
id: z.string(),
slug: z.string(),
name: z.string(),
runtime: z.number().nullable(),
thumbnail: KImage.nullable(),
createdAt: zdate(),
updatedAt: zdate(),
progress: z.object({
percent: z.int().min(0).max(100),
time: z.int().min(0).nullable(),
playedDate: zdate().nullable(),
}),
});
export type Extra = z.infer<typeof Extra>;