File size: 1,313 Bytes
be7f7de ade54cd be7f7de ed2c43b be7f7de ade54cd |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
import { z } from 'zod';
const LinkItemSchema = z.object({
size: z.string(),
f: z.string(),
q: z.string(),
q_text: z.string(),
k: z.string(),
});
const LinksSchema = z.object({
mp4: z.record(LinkItemSchema),
mp3: z.record(LinkItemSchema),
other: z.record(LinkItemSchema).optional(),
});
const RelatedContentSchema = z.object({
v: z.string(),
t: z.string(),
});
const RelatedVideosSchema = z.object({
title: z.string(),
contents: z.array(RelatedContentSchema),
});
const YoutubedlResponseSchema = z.object({
status: z.string(),
mess: z.string(),
page: z.string(),
vid: z.string(),
extractor: z.string(),
title: z.string(),
t: z.number(),
a: z.string(),
links: LinksSchema,
related: z.array(RelatedVideosSchema),
});
const ConvertResponseSchema = z.object({
status: z.string(),
mess: z.string(),
c_status: z.string(),
vid: z.string().nullable().optional(),
title: z.string().nullable().optional(),
ftype: z.string().nullable().optional(),
fquality: z.string().nullable().optional(),
dlink: z.string().url().nullable().optional(),
});
export {
LinkItemSchema,
LinksSchema,
RelatedContentSchema,
RelatedVideosSchema,
YoutubedlResponseSchema,
ConvertResponseSchema
}; |