UNPKG

@4players/odin-common

Version:

A collection of commonly used type definitions and utility functions across ODIN web projects

134 lines (133 loc) 4.43 kB
import * as z from 'zod'; export declare const MediaIdSchema: z.ZodNumber; export type MediaId = z.infer<typeof MediaIdSchema>; export declare const MediaAudioPropertiesSchema: z.ZodObject<{ kind: z.ZodOptional<z.ZodLiteral<"audio">>; uid: z.ZodOptional<z.ZodString>; customType: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { uid?: string | undefined; kind?: "audio" | undefined; customType?: string | undefined; }, { uid?: string | undefined; kind?: "audio" | undefined; customType?: string | undefined; }>; export type MediaAudioProperties = z.infer<typeof MediaAudioPropertiesSchema>; export declare const MediaVideoPropertiesSchema: z.ZodObject<{ kind: z.ZodOptional<z.ZodLiteral<"video">>; codec: z.ZodOptional<z.ZodString>; uid: z.ZodOptional<z.ZodString>; customType: z.ZodOptional<z.ZodString>; id: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { id?: string | undefined; codec?: string | undefined; uid?: string | undefined; kind?: "video" | undefined; customType?: string | undefined; }, { id?: string | undefined; codec?: string | undefined; uid?: string | undefined; kind?: "video" | undefined; customType?: string | undefined; }>; export type MediaVideoProperties = z.infer<typeof MediaVideoPropertiesSchema>; export declare const MediaPropertiesSchema: z.ZodUnion<[z.ZodObject<{ kind: z.ZodOptional<z.ZodLiteral<"audio">>; uid: z.ZodOptional<z.ZodString>; customType: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { uid?: string | undefined; kind?: "audio" | undefined; customType?: string | undefined; }, { uid?: string | undefined; kind?: "audio" | undefined; customType?: string | undefined; }>, z.ZodObject<{ kind: z.ZodOptional<z.ZodLiteral<"video">>; codec: z.ZodOptional<z.ZodString>; uid: z.ZodOptional<z.ZodString>; customType: z.ZodOptional<z.ZodString>; id: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { id?: string | undefined; codec?: string | undefined; uid?: string | undefined; kind?: "video" | undefined; customType?: string | undefined; }, { id?: string | undefined; codec?: string | undefined; uid?: string | undefined; kind?: "video" | undefined; customType?: string | undefined; }>]>; export type MediaProperties = z.infer<typeof MediaPropertiesSchema>; export declare const MediaSchema: z.ZodObject<{ id: z.ZodNumber; properties: z.ZodUnion<[z.ZodObject<{ kind: z.ZodOptional<z.ZodLiteral<"audio">>; uid: z.ZodOptional<z.ZodString>; customType: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { uid?: string | undefined; kind?: "audio" | undefined; customType?: string | undefined; }, { uid?: string | undefined; kind?: "audio" | undefined; customType?: string | undefined; }>, z.ZodObject<{ kind: z.ZodOptional<z.ZodLiteral<"video">>; codec: z.ZodOptional<z.ZodString>; uid: z.ZodOptional<z.ZodString>; customType: z.ZodOptional<z.ZodString>; id: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { id?: string | undefined; codec?: string | undefined; uid?: string | undefined; kind?: "video" | undefined; customType?: string | undefined; }, { id?: string | undefined; codec?: string | undefined; uid?: string | undefined; kind?: "video" | undefined; customType?: string | undefined; }>]>; paused: z.ZodBoolean; }, "strip", z.ZodTypeAny, { id: number; paused: boolean; properties: { uid?: string | undefined; kind?: "audio" | undefined; customType?: string | undefined; } | { id?: string | undefined; codec?: string | undefined; uid?: string | undefined; kind?: "video" | undefined; customType?: string | undefined; }; }, { id: number; paused: boolean; properties: { uid?: string | undefined; kind?: "audio" | undefined; customType?: string | undefined; } | { id?: string | undefined; codec?: string | undefined; uid?: string | undefined; kind?: "video" | undefined; customType?: string | undefined; }; }>; export type Media = z.infer<typeof MediaSchema>;