Spaces:
Paused
Paused
import { z } from "zod"; | |
const YoutubeDownloaderArgsSchema = z.object({ | |
0: z.string().url(), | |
1: z.enum(["id", "en", "es"]).optional() | |
}); | |
const YoutubedlDataSchema = z.object({ | |
quality: z.string(), | |
type: z.string(), | |
fileSizeH: z.string().nullable().optional(), | |
fileSize: z.number().nullable().optional(), | |
download: z.function().args().returns(z.promise(z.string().url())) | |
}); | |
const YoutubedlSchema = z.object({ | |
id: z.string(), | |
thumbnail: z.string().url(), | |
title: z.string(), | |
duration: z.number(), | |
video: z.record(z.string(), YoutubedlDataSchema).nullable().optional(), | |
audio: z.record(z.string(), YoutubedlDataSchema).nullable().optional(), | |
other: z.record(z.string(), YoutubedlDataSchema).nullable().optional() | |
}); | |
export { YoutubeDownloaderArgsSchema, YoutubedlSchema }; |