-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cases.ts
39 lines (33 loc) · 857 Bytes
/
Cases.ts
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
import { z } from 'zod';
export const SquareStruct = z.object({
num: z.number().gte(1),
});
export const VaccineStruct = z
.object({
// issuer id number
issuer: z.number().positive(),
// timestamp of expiration
expiration: z.number().positive(),
})
.describe('Vaccine schema');
export const Square = z.object({
num: z.number().gte(0),
});
export const FieldStruct = z
.object({
lt: z.number().lt(10),
gt: z.number().gt(0),
lte: z.number().lte(5),
gte: z.number().gte(0),
max: z.number().max(100),
min: z.number().min(40),
})
.describe('Benchmark schema definitions');
export const BoolStruct = z.object({
boolean1: z.boolean(),
});
export const DateStruct = z.object({
birthday: z.date(),
minDate: z.date().min(new Date('1970-01-02')),
maxDate: z.date().max(new Date('1972-01-02')),
});