File size: 870 Bytes
dfd43aa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import { z } from "zod";


export const SavefromArgsSchema = z.object({
    0: z.string().url(),
});


export const SavefromUrlItemSchema = z.object({
    url: z.string().url(),
    name: z.string(),
    type: z.string(),
    ext: z.string(),
});


export const SavefromVideoSchema = z.object({
    url: z.string().url(),
    format: z.string().optional(),
});


export const SavefromItemSchema = z.object({
    url: z.array(SavefromUrlItemSchema),
    thumb: z.string().url(),
    sd: SavefromVideoSchema.optional(),
    hd: SavefromVideoSchema.optional(),
    meta: z.object({
        title: z.string(),
        source: z.string(),
        duration: z.string().optional(),
        tags: z.string().optional(),
    }),
    video_quality: z.array(z.string()).optional(),
    hosting: z.string().optional(),
});

export const SavefromSchema = z.array(SavefromItemSchema);