randydev commited on
Commit
679ee1f
·
verified ·
1 Parent(s): 35bdec7

Create sfilemobi-dl-v1.ts

Browse files
Files changed (1) hide show
  1. lib/types/sfilemobi-dl-v1.ts +23 -0
lib/types/sfilemobi-dl-v1.ts ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { z } from 'zod';
2
+
3
+ const URL_ERROR_MESSAGE = 'Input must be a valid sfile.mobi URL!';
4
+
5
+ export const SfilemobidlArgsSchema = z.object({
6
+ 0: z.string().url({ message: URL_ERROR_MESSAGE }).regex(/^(https?:\/\/)?sfile\.mobi/i, URL_ERROR_MESSAGE)
7
+ });
8
+
9
+ export const SfilemobidlSchema = z.object({
10
+ url: z.string().url(),
11
+ filename: z.string(),
12
+ icon: z.string(),
13
+ type: z.string(),
14
+ mimetype: z.string(),
15
+ uploaded: z.string(),
16
+ uploadby: z.string(),
17
+ uploadbyUrl: z.string().url(),
18
+ uploadon: z.string(),
19
+ uploadonUrl: z.string().url(),
20
+ downloads: z.number()
21
+ });
22
+
23
+ export { SfilemobidlArgsSchema, SfilemobidlSchema };