File size: 641 Bytes
679ee1f
 
 
 
e6618eb
679ee1f
 
 
e6618eb
679ee1f
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import { z } from 'zod';

const URL_ERROR_MESSAGE = 'Input must be a valid sfile.mobi URL!';

const SfilemobidlArgsSchema = z.object({
    0: z.string().url({ message: URL_ERROR_MESSAGE }).regex(/^(https?:\/\/)?sfile\.mobi/i, URL_ERROR_MESSAGE)
});

const SfilemobidlSchema = z.object({
    url: z.string().url(),
    filename: z.string(),
    icon: z.string(),
    type: z.string(),
    mimetype: z.string(),
    uploaded: z.string(),
    uploadby: z.string(),
    uploadbyUrl: z.string().url(),
    uploadon: z.string(),
    uploadonUrl: z.string().url(),
    downloads: z.number()
});

export { SfilemobidlArgsSchema, SfilemobidlSchema };