Skip to content

Commit 814176b

Browse files
committed
regenerated example schema for zod
1 parent 0877cb5 commit 814176b

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

example/zod/schemas.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const isDefinedNonNullAny = (v: any): v is definedNonNullAny => v !== und
1212
export const definedNonNullAnySchema = z.any().refine((v) => isDefinedNonNullAny(v));
1313

1414
export function AttributeInputSchema(): z.ZodObject<Properties<AttributeInput>> {
15-
return z.object({
15+
return z.object<Properties<AttributeInput>>({
1616
key: z.string().nullish(),
1717
val: z.string().nullish()
1818
})
@@ -21,7 +21,7 @@ export function AttributeInputSchema(): z.ZodObject<Properties<AttributeInput>>
2121
export const ButtonComponentTypeSchema = z.nativeEnum(ButtonComponentType);
2222

2323
export function ComponentInputSchema(): z.ZodObject<Properties<ComponentInput>> {
24-
return z.object({
24+
return z.object<Properties<ComponentInput>>({
2525
child: z.lazy(() => ComponentInputSchema().nullish()),
2626
childrens: z.array(z.lazy(() => ComponentInputSchema().nullable())).nullish(),
2727
event: z.lazy(() => EventInputSchema().nullish()),
@@ -31,21 +31,21 @@ export function ComponentInputSchema(): z.ZodObject<Properties<ComponentInput>>
3131
}
3232

3333
export function DropDownComponentInputSchema(): z.ZodObject<Properties<DropDownComponentInput>> {
34-
return z.object({
34+
return z.object<Properties<DropDownComponentInput>>({
3535
dropdownComponent: z.lazy(() => ComponentInputSchema().nullish()),
3636
getEvent: z.lazy(() => EventInputSchema())
3737
})
3838
}
3939

4040
export function EventArgumentInputSchema(): z.ZodObject<Properties<EventArgumentInput>> {
41-
return z.object({
41+
return z.object<Properties<EventArgumentInput>>({
4242
name: z.string().min(5),
4343
value: z.string().regex(/^foo/, "message")
4444
})
4545
}
4646

4747
export function EventInputSchema(): z.ZodObject<Properties<EventInput>> {
48-
return z.object({
48+
return z.object<Properties<EventInput>>({
4949
arguments: z.array(z.lazy(() => EventArgumentInputSchema())),
5050
options: z.array(EventOptionTypeSchema).nullish()
5151
})
@@ -54,7 +54,7 @@ export function EventInputSchema(): z.ZodObject<Properties<EventInput>> {
5454
export const EventOptionTypeSchema = z.nativeEnum(EventOptionType);
5555

5656
export function HttpInputSchema(): z.ZodObject<Properties<HttpInput>> {
57-
return z.object({
57+
return z.object<Properties<HttpInput>>({
5858
method: HttpMethodSchema.nullish(),
5959
url: definedNonNullAnySchema
6060
})
@@ -63,13 +63,13 @@ export function HttpInputSchema(): z.ZodObject<Properties<HttpInput>> {
6363
export const HttpMethodSchema = z.nativeEnum(HttpMethod);
6464

6565
export function LayoutInputSchema(): z.ZodObject<Properties<LayoutInput>> {
66-
return z.object({
66+
return z.object<Properties<LayoutInput>>({
6767
dropdown: z.lazy(() => DropDownComponentInputSchema().nullish())
6868
})
6969
}
7070

7171
export function PageInputSchema(): z.ZodObject<Properties<PageInput>> {
72-
return z.object({
72+
return z.object<Properties<PageInput>>({
7373
attributes: z.array(z.lazy(() => AttributeInputSchema())).nullish(),
7474
date: definedNonNullAnySchema.nullish(),
7575
height: z.number(),
@@ -87,7 +87,7 @@ export function PageInputSchema(): z.ZodObject<Properties<PageInput>> {
8787
export const PageTypeSchema = z.nativeEnum(PageType);
8888

8989
export function UserSchema(): z.ZodObject<Properties<User>> {
90-
return z.object({
90+
return z.object<Properties<User>>({
9191
__typename: z.literal('User').optional(),
9292
createdAt: definedNonNullAnySchema.nullish(),
9393
email: z.string().nullish(),

0 commit comments

Comments
 (0)