import type Mux from '@mux/ts'; import { z } from 'zod'; export declare const SUPPORTED_MUX_LANGUAGES: readonly [{ readonly label: "English"; readonly code: "en"; readonly state: "Stable"; }, { readonly label: "Spanish"; readonly code: "es"; readonly state: "Stable"; }, { readonly label: "Italian"; readonly code: "it"; readonly state: "Stable"; }, { readonly label: "Portuguese"; readonly code: "pt"; readonly state: "Stable"; }, { readonly label: "German"; readonly code: "de"; readonly state: "Stable"; }, { readonly label: "French"; readonly code: "fr"; readonly state: "Stable"; }, { readonly label: "Polish"; readonly code: "pl"; readonly state: "Beta"; }, { readonly label: "Russian"; readonly code: "ru"; readonly state: "Beta"; }, { readonly label: "Dutch"; readonly code: "nl"; readonly state: "Beta"; }, { readonly label: "Catalan"; readonly code: "ca"; readonly state: "Beta"; }, { readonly label: "Turkish"; readonly code: "tr"; readonly state: "Beta"; }, { readonly label: "Swedish"; readonly code: "sv"; readonly state: "Beta"; }, { readonly label: "Ukrainian"; readonly code: "uk"; readonly state: "Beta"; }, { readonly label: "Norwegian"; readonly code: "no"; readonly state: "Beta"; }, { readonly label: "Finnish"; readonly code: "fi"; readonly state: "Beta"; }, { readonly label: "Slovak"; readonly code: "sk"; readonly state: "Beta"; }, { readonly label: "Greek"; readonly code: "el"; readonly state: "Beta"; }, { readonly label: "Czech"; readonly code: "cs"; readonly state: "Beta"; }, { readonly label: "Croatian"; readonly code: "hr"; readonly state: "Beta"; }, { readonly label: "Danish"; readonly code: "da"; readonly state: "Beta"; }, { readonly label: "Romanian"; readonly code: "ro"; readonly state: "Beta"; }, { readonly label: "Bulgarian"; readonly code: "bg"; readonly state: "Beta"; }]; declare const SUPPORTED_MUX_LANGUAGES_VALUES: ("en" | "es" | "it" | "pt" | "de" | "fr" | "pl" | "ru" | "nl" | "ca" | "tr" | "sv" | "uk" | "no" | "fi" | "sk" | "el" | "cs" | "hr" | "da" | "ro" | "bg")[]; export type SupportedMuxLanguage = (typeof SUPPORTED_MUX_LANGUAGES_VALUES)[number]; /** A video's title, as `mux-asset`'s schema allows it. Checked before anything reaches Mux. */ export declare const MuxAssetTitle: z.ZodString; /** * Tags trimmed, without blanks, and without repeats that differ only in case. The first spelling stays. * Commas stay too: Robots writes tags like "$15,000". Only typing in the details form splits on them. */ export declare function normalizeTags(tags: string[]): string[]; /** .srt or .vtt file uploaded as subtitle/caption for a video */ export declare const TextTrackFile: z.ZodObject<{ contents: z.ZodString; type: z.ZodString; name: z.ZodString; size: z.ZodNumber; }, "strip", z.ZodTypeAny, { type?: string; contents?: string; name?: string; size?: number; }, { type?: string; contents?: string; name?: string; size?: number; }>; /** Subtitles and captions uploaded by the user */ export declare const CustomTextTrack: z.ZodObject<{ file: z.ZodObject<{ contents: z.ZodString; type: z.ZodString; name: z.ZodString; size: z.ZodNumber; }, "strip", z.ZodTypeAny, { type?: string; contents?: string; name?: string; size?: number; }, { type?: string; contents?: string; name?: string; size?: number; }>; name: z.ZodString; language_code: z.ZodString; closed_captions: z.ZodDefault; stored_track: z.ZodOptional>; }, "strip", z.ZodTypeAny, { name?: string; file?: { type?: string; contents?: string; name?: string; size?: number; }; language_code?: string; closed_captions?: boolean; stored_track?: Mux.Video.Assets.Track; }, { name?: string; file?: { type?: string; contents?: string; name?: string; size?: number; }; language_code?: string; closed_captions?: boolean; stored_track?: Mux.Video.Assets.Track; }>; export type ParsedCustomTextTrack = z.infer; export type StoredTextTrack = ParsedCustomTextTrack & { id: string; documentId: string; }; export declare const UploadConfig: z.ZodObject<{ /** * Enable static renditions by setting this to 'standard'. Can be overwritten on a per-asset basis. * @see {@link https://docs.mux.com/guides/video/enable-static-mp4-renditions#why-enable-mp4-support} * @defaultValue 'none' */ mp4_support: z.ZodDefault>; /** * Max resolution tier can be used to control the maximum resolution_tier your asset is encoded, stored, and streamed at. * @see {@link https://docs.mux.com/guides/stream-videos-in-4k} * @defaultValue '1080p' */ max_resolution_tier: z.ZodDefault>; /** * The video quality informs the cost, quality, and available platform features for the asset. * @see {@link https://docs.mux.com/guides/use-video-quality-levels} * @defaultValue 'plus' */ video_quality: z.ZodDefault>; /** * Whether or not to use signed URLs, making the asset private * @see {@link https://docs.mux.com/guides/use-encoding-tiers} * @defaultValue 'false' */ signed: z.ZodDefault; autogenerated_captions_languages: z.ZodOptional; isSourceLanguage: z.ZodDefault; }, "strip", z.ZodTypeAny, { code?: "en" | "es" | "it" | "pt" | "de" | "fr" | "pl" | "ru" | "nl" | "ca" | "tr" | "sv" | "uk" | "no" | "fi" | "sk" | "el" | "cs" | "hr" | "da" | "ro" | "bg"; isSourceLanguage?: boolean; }, { code?: "en" | "es" | "it" | "pt" | "de" | "fr" | "pl" | "ru" | "nl" | "ca" | "tr" | "sv" | "uk" | "no" | "fi" | "sk" | "el" | "cs" | "hr" | "da" | "ro" | "bg"; isSourceLanguage?: boolean; }>, "many">>; custom_text_tracks: z.ZodOptional; name: z.ZodString; language_code: z.ZodString; closed_captions: z.ZodDefault; stored_track: z.ZodOptional>; }, "strip", z.ZodTypeAny, { name?: string; file?: { type?: string; contents?: string; name?: string; size?: number; }; language_code?: string; closed_captions?: boolean; stored_track?: Mux.Video.Assets.Track; }, { name?: string; file?: { type?: string; contents?: string; name?: string; size?: number; }; language_code?: string; closed_captions?: boolean; stored_track?: Mux.Video.Assets.Track; }>, "many">>; upload_type: z.ZodDefault>; /** * The configured default Robots directives the person kept checked. Only someone with Run Robots * can narrow the list; the server ignores it for everyone else. */ directives: z.ZodOptional>; }, "strip", z.ZodTypeAny, { custom_text_tracks?: { name?: string; file?: { type?: string; contents?: string; name?: string; size?: number; }; language_code?: string; closed_captions?: boolean; stored_track?: Mux.Video.Assets.Track; }[]; mp4_support?: "none" | "standard"; max_resolution_tier?: "2160p" | "1440p" | "1080p"; video_quality?: "basic" | "plus" | "premium"; signed?: boolean; autogenerated_captions_languages?: { code?: "en" | "es" | "it" | "pt" | "de" | "fr" | "pl" | "ru" | "nl" | "ca" | "tr" | "sv" | "uk" | "no" | "fi" | "sk" | "el" | "cs" | "hr" | "da" | "ro" | "bg"; isSourceLanguage?: boolean; }[]; upload_type?: "url" | "file"; directives?: string[]; }, { custom_text_tracks?: { name?: string; file?: { type?: string; contents?: string; name?: string; size?: number; }; language_code?: string; closed_captions?: boolean; stored_track?: Mux.Video.Assets.Track; }[]; mp4_support?: "none" | "standard"; max_resolution_tier?: "2160p" | "1440p" | "1080p"; video_quality?: "basic" | "plus" | "premium"; signed?: boolean; autogenerated_captions_languages?: { code?: "en" | "es" | "it" | "pt" | "de" | "fr" | "pl" | "ru" | "nl" | "ca" | "tr" | "sv" | "uk" | "no" | "fi" | "sk" | "el" | "cs" | "hr" | "da" | "ro" | "bg"; isSourceLanguage?: boolean; }[]; upload_type?: "url" | "file"; directives?: string[]; }>; export type RequestedUploadConfig = z.input; export type ParsedUploadConfig = z.infer; export declare const UploadData: z.ZodIntersection, z.ZodDiscriminatedUnion<"upload_type", [z.ZodObject<{ upload_type: z.ZodLiteral<"file">; file: z.ZodType; }, "strip", z.ZodTypeAny, { file?: File; upload_type?: "file"; }, { file?: File; upload_type?: "file"; }>, z.ZodObject<{ upload_type: z.ZodLiteral<"url">; url: z.ZodString; }, "strip", z.ZodTypeAny, { url?: string; upload_type?: "url"; }, { url?: string; upload_type?: "url"; }>]>>, z.ZodObject<{ /** * Enable static renditions by setting this to 'standard'. Can be overwritten on a per-asset basis. * @see {@link https://docs.mux.com/guides/video/enable-static-mp4-renditions#why-enable-mp4-support} * @defaultValue 'none' */ mp4_support: z.ZodDefault>; /** * Max resolution tier can be used to control the maximum resolution_tier your asset is encoded, stored, and streamed at. * @see {@link https://docs.mux.com/guides/stream-videos-in-4k} * @defaultValue '1080p' */ max_resolution_tier: z.ZodDefault>; /** * The video quality informs the cost, quality, and available platform features for the asset. * @see {@link https://docs.mux.com/guides/use-video-quality-levels} * @defaultValue 'plus' */ video_quality: z.ZodDefault>; /** * Whether or not to use signed URLs, making the asset private * @see {@link https://docs.mux.com/guides/use-encoding-tiers} * @defaultValue 'false' */ signed: z.ZodDefault; autogenerated_captions_languages: z.ZodOptional; isSourceLanguage: z.ZodDefault; }, "strip", z.ZodTypeAny, { code?: "en" | "es" | "it" | "pt" | "de" | "fr" | "pl" | "ru" | "nl" | "ca" | "tr" | "sv" | "uk" | "no" | "fi" | "sk" | "el" | "cs" | "hr" | "da" | "ro" | "bg"; isSourceLanguage?: boolean; }, { code?: "en" | "es" | "it" | "pt" | "de" | "fr" | "pl" | "ru" | "nl" | "ca" | "tr" | "sv" | "uk" | "no" | "fi" | "sk" | "el" | "cs" | "hr" | "da" | "ro" | "bg"; isSourceLanguage?: boolean; }>, "many">>; custom_text_tracks: z.ZodOptional; name: z.ZodString; language_code: z.ZodString; closed_captions: z.ZodDefault; stored_track: z.ZodOptional>; }, "strip", z.ZodTypeAny, { name?: string; file?: { type?: string; contents?: string; name?: string; size?: number; }; language_code?: string; closed_captions?: boolean; stored_track?: Mux.Video.Assets.Track; }, { name?: string; file?: { type?: string; contents?: string; name?: string; size?: number; }; language_code?: string; closed_captions?: boolean; stored_track?: Mux.Video.Assets.Track; }>, "many">>; upload_type: z.ZodDefault>; /** * The configured default Robots directives the person kept checked. Only someone with Run Robots * can narrow the list; the server ignores it for everyone else. */ directives: z.ZodOptional>; }, "strip", z.ZodTypeAny, { custom_text_tracks?: { name?: string; file?: { type?: string; contents?: string; name?: string; size?: number; }; language_code?: string; closed_captions?: boolean; stored_track?: Mux.Video.Assets.Track; }[]; mp4_support?: "none" | "standard"; max_resolution_tier?: "2160p" | "1440p" | "1080p"; video_quality?: "basic" | "plus" | "premium"; signed?: boolean; autogenerated_captions_languages?: { code?: "en" | "es" | "it" | "pt" | "de" | "fr" | "pl" | "ru" | "nl" | "ca" | "tr" | "sv" | "uk" | "no" | "fi" | "sk" | "el" | "cs" | "hr" | "da" | "ro" | "bg"; isSourceLanguage?: boolean; }[]; upload_type?: "url" | "file"; directives?: string[]; }, { custom_text_tracks?: { name?: string; file?: { type?: string; contents?: string; name?: string; size?: number; }; language_code?: string; closed_captions?: boolean; stored_track?: Mux.Video.Assets.Track; }[]; mp4_support?: "none" | "standard"; max_resolution_tier?: "2160p" | "1440p" | "1080p"; video_quality?: "basic" | "plus" | "premium"; signed?: boolean; autogenerated_captions_languages?: { code?: "en" | "es" | "it" | "pt" | "de" | "fr" | "pl" | "ru" | "nl" | "ca" | "tr" | "sv" | "uk" | "no" | "fi" | "sk" | "el" | "cs" | "hr" | "da" | "ro" | "bg"; isSourceLanguage?: boolean; }[]; upload_type?: "url" | "file"; directives?: string[]; }>>; export type RequestedUploadData = z.input; /** * Used by `server/controllers/mux.ts` as that doesn't receive the file from the front-end. * Users upload the file directly from the browser via the presigned URL generated in `parseUploadRequest`. */ export declare const UploadDataWithoutFile: z.ZodIntersection, z.ZodDiscriminatedUnion<"upload_type", [z.ZodObject<{ upload_type: z.ZodLiteral<"file">; }, "strip", z.ZodTypeAny, { upload_type?: "file"; }, { upload_type?: "file"; }>, z.ZodObject<{ upload_type: z.ZodLiteral<"url">; url: z.ZodString; }, "strip", z.ZodTypeAny, { url?: string; upload_type?: "url"; }, { url?: string; upload_type?: "url"; }>]>>, z.ZodObject<{ /** * Enable static renditions by setting this to 'standard'. Can be overwritten on a per-asset basis. * @see {@link https://docs.mux.com/guides/video/enable-static-mp4-renditions#why-enable-mp4-support} * @defaultValue 'none' */ mp4_support: z.ZodDefault>; /** * Max resolution tier can be used to control the maximum resolution_tier your asset is encoded, stored, and streamed at. * @see {@link https://docs.mux.com/guides/stream-videos-in-4k} * @defaultValue '1080p' */ max_resolution_tier: z.ZodDefault>; /** * The video quality informs the cost, quality, and available platform features for the asset. * @see {@link https://docs.mux.com/guides/use-video-quality-levels} * @defaultValue 'plus' */ video_quality: z.ZodDefault>; /** * Whether or not to use signed URLs, making the asset private * @see {@link https://docs.mux.com/guides/use-encoding-tiers} * @defaultValue 'false' */ signed: z.ZodDefault; autogenerated_captions_languages: z.ZodOptional; isSourceLanguage: z.ZodDefault; }, "strip", z.ZodTypeAny, { code?: "en" | "es" | "it" | "pt" | "de" | "fr" | "pl" | "ru" | "nl" | "ca" | "tr" | "sv" | "uk" | "no" | "fi" | "sk" | "el" | "cs" | "hr" | "da" | "ro" | "bg"; isSourceLanguage?: boolean; }, { code?: "en" | "es" | "it" | "pt" | "de" | "fr" | "pl" | "ru" | "nl" | "ca" | "tr" | "sv" | "uk" | "no" | "fi" | "sk" | "el" | "cs" | "hr" | "da" | "ro" | "bg"; isSourceLanguage?: boolean; }>, "many">>; custom_text_tracks: z.ZodOptional; name: z.ZodString; language_code: z.ZodString; closed_captions: z.ZodDefault; stored_track: z.ZodOptional>; }, "strip", z.ZodTypeAny, { name?: string; file?: { type?: string; contents?: string; name?: string; size?: number; }; language_code?: string; closed_captions?: boolean; stored_track?: Mux.Video.Assets.Track; }, { name?: string; file?: { type?: string; contents?: string; name?: string; size?: number; }; language_code?: string; closed_captions?: boolean; stored_track?: Mux.Video.Assets.Track; }>, "many">>; upload_type: z.ZodDefault>; /** * The configured default Robots directives the person kept checked. Only someone with Run Robots * can narrow the list; the server ignores it for everyone else. */ directives: z.ZodOptional>; }, "strip", z.ZodTypeAny, { custom_text_tracks?: { name?: string; file?: { type?: string; contents?: string; name?: string; size?: number; }; language_code?: string; closed_captions?: boolean; stored_track?: Mux.Video.Assets.Track; }[]; mp4_support?: "none" | "standard"; max_resolution_tier?: "2160p" | "1440p" | "1080p"; video_quality?: "basic" | "plus" | "premium"; signed?: boolean; autogenerated_captions_languages?: { code?: "en" | "es" | "it" | "pt" | "de" | "fr" | "pl" | "ru" | "nl" | "ca" | "tr" | "sv" | "uk" | "no" | "fi" | "sk" | "el" | "cs" | "hr" | "da" | "ro" | "bg"; isSourceLanguage?: boolean; }[]; upload_type?: "url" | "file"; directives?: string[]; }, { custom_text_tracks?: { name?: string; file?: { type?: string; contents?: string; name?: string; size?: number; }; language_code?: string; closed_captions?: boolean; stored_track?: Mux.Video.Assets.Track; }[]; mp4_support?: "none" | "standard"; max_resolution_tier?: "2160p" | "1440p" | "1080p"; video_quality?: "basic" | "plus" | "premium"; signed?: boolean; autogenerated_captions_languages?: { code?: "en" | "es" | "it" | "pt" | "de" | "fr" | "pl" | "ru" | "nl" | "ca" | "tr" | "sv" | "uk" | "no" | "fi" | "sk" | "el" | "cs" | "hr" | "da" | "ro" | "bg"; isSourceLanguage?: boolean; }[]; upload_type?: "url" | "file"; directives?: string[]; }>>; export declare function uploadConfigToNewAssetInput(config: ParsedUploadConfig, storedTextTracks?: StoredTextTrack[], url?: string): Mux.Video.Assets.InputSettings[] | undefined; export {};