randydev commited on
Commit
dfd43aa
·
verified ·
1 Parent(s): 7edd258

Create savefrom-v1.js

Browse files
Files changed (1) hide show
  1. lib/types/savefrom-v1.js +38 -0
lib/types/savefrom-v1.js ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { z } from "zod";
2
+
3
+
4
+ export const SavefromArgsSchema = z.object({
5
+ 0: z.string().url(),
6
+ });
7
+
8
+
9
+ export const SavefromUrlItemSchema = z.object({
10
+ url: z.string().url(),
11
+ name: z.string(),
12
+ type: z.string(),
13
+ ext: z.string(),
14
+ });
15
+
16
+
17
+ export const SavefromVideoSchema = z.object({
18
+ url: z.string().url(),
19
+ format: z.string().optional(),
20
+ });
21
+
22
+
23
+ export const SavefromItemSchema = z.object({
24
+ url: z.array(SavefromUrlItemSchema),
25
+ thumb: z.string().url(),
26
+ sd: SavefromVideoSchema.optional(),
27
+ hd: SavefromVideoSchema.optional(),
28
+ meta: z.object({
29
+ title: z.string(),
30
+ source: z.string(),
31
+ duration: z.string().optional(),
32
+ tags: z.string().optional(),
33
+ }),
34
+ video_quality: z.array(z.string()).optional(),
35
+ hosting: z.string().optional(),
36
+ });
37
+
38
+ export const SavefromSchema = z.array(SavefromItemSchema);