@vladimirdev635/gql-codegen 0.0.91 → 0.0.92
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/actors/ts/graphql/generators/client/fragments.js +4 -2
- package/actors/ts/graphql/generators/server/inputs.js +8 -7
- package/actors/ts/graphql/generators/server/objects.js +5 -9
- package/actors/ts/graphql/generators/server/shared.d.ts +1 -1
- package/actors/ts/graphql/generators/server/shared.js +1 -1
- package/package.json +1 -1
- package/schema/client/directive.d.ts +1 -12
- package/schema/client/operation.d.ts +1 -12
- package/schema/client/root.d.ts +2 -24
- package/schema/server.d.ts +20 -306
- package/schema/server.js +5 -2
- package/schema/shared.d.ts +3 -36
- package/schema/shared.js +5 -2
- package/schema/test-client.json +1 -1
- package/schema/test-server.json +1 -1
- package/schema/utils.js +27 -19
package/schema/server.d.ts
CHANGED
|
@@ -45,26 +45,7 @@ export declare const objectLiteralSpecSchema: z.ZodObject<{
|
|
|
45
45
|
export declare const objectArraySpecSchema: z.ZodObject<{
|
|
46
46
|
_type: z.ZodLiteral<"array">;
|
|
47
47
|
nullable: z.ZodBoolean;
|
|
48
|
-
type: z.ZodDiscriminatedUnion<[
|
|
49
|
-
_type: z.ZodLiteral<"ObjectType">;
|
|
50
|
-
name: z.ZodString;
|
|
51
|
-
$ref: z.ZodString;
|
|
52
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
53
|
-
_type: z.ZodLiteral<"InterfaceType">;
|
|
54
|
-
name: z.ZodString;
|
|
55
|
-
$ref: z.ZodString;
|
|
56
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
57
|
-
_type: z.ZodLiteral<"Scalar">;
|
|
58
|
-
name: z.ZodString;
|
|
59
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
60
|
-
_type: z.ZodLiteral<"Union">;
|
|
61
|
-
name: z.ZodString;
|
|
62
|
-
$ref: z.ZodString;
|
|
63
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
64
|
-
_type: z.ZodLiteral<"Enum">;
|
|
65
|
-
name: z.ZodString;
|
|
66
|
-
$ref: z.ZodString;
|
|
67
|
-
}, z.core.$strip>]>;
|
|
48
|
+
type: z.ZodDiscriminatedUnion<[typeof objectLiteralSpecSchema, typeof objectArraySpecSchema]>;
|
|
68
49
|
}, z.core.$strip>;
|
|
69
50
|
export declare const objectNonCallableFieldSpecSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
70
51
|
_type: z.ZodLiteral<"literal">;
|
|
@@ -91,26 +72,7 @@ export declare const objectNonCallableFieldSpecSchema: z.ZodDiscriminatedUnion<[
|
|
|
91
72
|
}, z.core.$strip>, z.ZodObject<{
|
|
92
73
|
_type: z.ZodLiteral<"array">;
|
|
93
74
|
nullable: z.ZodBoolean;
|
|
94
|
-
type: z.ZodDiscriminatedUnion<[
|
|
95
|
-
_type: z.ZodLiteral<"ObjectType">;
|
|
96
|
-
name: z.ZodString;
|
|
97
|
-
$ref: z.ZodString;
|
|
98
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
99
|
-
_type: z.ZodLiteral<"InterfaceType">;
|
|
100
|
-
name: z.ZodString;
|
|
101
|
-
$ref: z.ZodString;
|
|
102
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
103
|
-
_type: z.ZodLiteral<"Scalar">;
|
|
104
|
-
name: z.ZodString;
|
|
105
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
106
|
-
_type: z.ZodLiteral<"Union">;
|
|
107
|
-
name: z.ZodString;
|
|
108
|
-
$ref: z.ZodString;
|
|
109
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
110
|
-
_type: z.ZodLiteral<"Enum">;
|
|
111
|
-
name: z.ZodString;
|
|
112
|
-
$ref: z.ZodString;
|
|
113
|
-
}, z.core.$strip>]>;
|
|
75
|
+
type: z.ZodDiscriminatedUnion<[typeof objectLiteralSpecSchema, typeof objectArraySpecSchema]>;
|
|
114
76
|
}, z.core.$strip>]>;
|
|
115
77
|
export declare const callableSpecSchema: z.ZodObject<{
|
|
116
78
|
_type: z.ZodLiteral<"callable">;
|
|
@@ -139,26 +101,7 @@ export declare const callableSpecSchema: z.ZodObject<{
|
|
|
139
101
|
}, z.core.$strip>, z.ZodObject<{
|
|
140
102
|
_type: z.ZodLiteral<"array">;
|
|
141
103
|
nullable: z.ZodBoolean;
|
|
142
|
-
type: z.ZodDiscriminatedUnion<[
|
|
143
|
-
_type: z.ZodLiteral<"ObjectType">;
|
|
144
|
-
name: z.ZodString;
|
|
145
|
-
$ref: z.ZodString;
|
|
146
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
147
|
-
_type: z.ZodLiteral<"InterfaceType">;
|
|
148
|
-
name: z.ZodString;
|
|
149
|
-
$ref: z.ZodString;
|
|
150
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
151
|
-
_type: z.ZodLiteral<"Scalar">;
|
|
152
|
-
name: z.ZodString;
|
|
153
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
154
|
-
_type: z.ZodLiteral<"Union">;
|
|
155
|
-
name: z.ZodString;
|
|
156
|
-
$ref: z.ZodString;
|
|
157
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
158
|
-
_type: z.ZodLiteral<"Enum">;
|
|
159
|
-
name: z.ZodString;
|
|
160
|
-
$ref: z.ZodString;
|
|
161
|
-
}, z.core.$strip>]>;
|
|
104
|
+
type: z.ZodDiscriminatedUnion<[typeof objectLiteralSpecSchema, typeof objectArraySpecSchema]>;
|
|
162
105
|
}, z.core.$strip>]>;
|
|
163
106
|
arguments: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
164
107
|
nullable: z.ZodBoolean;
|
|
@@ -180,19 +123,8 @@ export declare const callableSpecSchema: z.ZodObject<{
|
|
|
180
123
|
}, z.core.$strip>, z.ZodObject<{
|
|
181
124
|
_type: z.ZodLiteral<"array">;
|
|
182
125
|
nullable: z.ZodBoolean;
|
|
183
|
-
type: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
184
|
-
_type: z.ZodLiteral<"InputType">;
|
|
185
|
-
name: z.ZodString;
|
|
186
|
-
$ref: z.ZodString;
|
|
187
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
188
|
-
_type: z.ZodLiteral<"Scalar">;
|
|
189
|
-
name: z.ZodString;
|
|
190
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
191
|
-
_type: z.ZodLiteral<"Enum">;
|
|
192
|
-
name: z.ZodString;
|
|
193
|
-
$ref: z.ZodString;
|
|
194
|
-
}, z.core.$strip>]>;
|
|
195
126
|
defaultValue: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodArray<z.ZodInt>, z.ZodArray<z.ZodFloat32>, z.ZodArray<z.ZodBoolean>]>>>;
|
|
127
|
+
type: z.ZodDiscriminatedUnion<[typeof import("./shared.js").inputLiteralSpecSchema, typeof import("./shared.js").inputArraySpecSchema]>;
|
|
196
128
|
}, z.core.$strip>]>;
|
|
197
129
|
}, z.core.$strip>>;
|
|
198
130
|
}, z.core.$strip>;
|
|
@@ -221,26 +153,7 @@ export declare const objectFieldSpecSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
221
153
|
}, z.core.$strip>, z.ZodObject<{
|
|
222
154
|
_type: z.ZodLiteral<"array">;
|
|
223
155
|
nullable: z.ZodBoolean;
|
|
224
|
-
type: z.ZodDiscriminatedUnion<[
|
|
225
|
-
_type: z.ZodLiteral<"ObjectType">;
|
|
226
|
-
name: z.ZodString;
|
|
227
|
-
$ref: z.ZodString;
|
|
228
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
229
|
-
_type: z.ZodLiteral<"InterfaceType">;
|
|
230
|
-
name: z.ZodString;
|
|
231
|
-
$ref: z.ZodString;
|
|
232
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
233
|
-
_type: z.ZodLiteral<"Scalar">;
|
|
234
|
-
name: z.ZodString;
|
|
235
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
236
|
-
_type: z.ZodLiteral<"Union">;
|
|
237
|
-
name: z.ZodString;
|
|
238
|
-
$ref: z.ZodString;
|
|
239
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
240
|
-
_type: z.ZodLiteral<"Enum">;
|
|
241
|
-
name: z.ZodString;
|
|
242
|
-
$ref: z.ZodString;
|
|
243
|
-
}, z.core.$strip>]>;
|
|
156
|
+
type: z.ZodDiscriminatedUnion<[typeof objectLiteralSpecSchema, typeof objectArraySpecSchema]>;
|
|
244
157
|
}, z.core.$strip>, z.ZodObject<{
|
|
245
158
|
_type: z.ZodLiteral<"callable">;
|
|
246
159
|
returnType: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -268,26 +181,7 @@ export declare const objectFieldSpecSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
268
181
|
}, z.core.$strip>, z.ZodObject<{
|
|
269
182
|
_type: z.ZodLiteral<"array">;
|
|
270
183
|
nullable: z.ZodBoolean;
|
|
271
|
-
type: z.ZodDiscriminatedUnion<[
|
|
272
|
-
_type: z.ZodLiteral<"ObjectType">;
|
|
273
|
-
name: z.ZodString;
|
|
274
|
-
$ref: z.ZodString;
|
|
275
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
276
|
-
_type: z.ZodLiteral<"InterfaceType">;
|
|
277
|
-
name: z.ZodString;
|
|
278
|
-
$ref: z.ZodString;
|
|
279
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
280
|
-
_type: z.ZodLiteral<"Scalar">;
|
|
281
|
-
name: z.ZodString;
|
|
282
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
283
|
-
_type: z.ZodLiteral<"Union">;
|
|
284
|
-
name: z.ZodString;
|
|
285
|
-
$ref: z.ZodString;
|
|
286
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
287
|
-
_type: z.ZodLiteral<"Enum">;
|
|
288
|
-
name: z.ZodString;
|
|
289
|
-
$ref: z.ZodString;
|
|
290
|
-
}, z.core.$strip>]>;
|
|
184
|
+
type: z.ZodDiscriminatedUnion<[typeof objectLiteralSpecSchema, typeof objectArraySpecSchema]>;
|
|
291
185
|
}, z.core.$strip>]>;
|
|
292
186
|
arguments: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
293
187
|
nullable: z.ZodBoolean;
|
|
@@ -309,19 +203,8 @@ export declare const objectFieldSpecSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
309
203
|
}, z.core.$strip>, z.ZodObject<{
|
|
310
204
|
_type: z.ZodLiteral<"array">;
|
|
311
205
|
nullable: z.ZodBoolean;
|
|
312
|
-
type: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
313
|
-
_type: z.ZodLiteral<"InputType">;
|
|
314
|
-
name: z.ZodString;
|
|
315
|
-
$ref: z.ZodString;
|
|
316
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
317
|
-
_type: z.ZodLiteral<"Scalar">;
|
|
318
|
-
name: z.ZodString;
|
|
319
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
320
|
-
_type: z.ZodLiteral<"Enum">;
|
|
321
|
-
name: z.ZodString;
|
|
322
|
-
$ref: z.ZodString;
|
|
323
|
-
}, z.core.$strip>]>;
|
|
324
206
|
defaultValue: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodArray<z.ZodInt>, z.ZodArray<z.ZodFloat32>, z.ZodArray<z.ZodBoolean>]>>>;
|
|
207
|
+
type: z.ZodDiscriminatedUnion<[typeof import("./shared.js").inputLiteralSpecSchema, typeof import("./shared.js").inputArraySpecSchema]>;
|
|
325
208
|
}, z.core.$strip>]>;
|
|
326
209
|
}, z.core.$strip>>;
|
|
327
210
|
}, z.core.$strip>]>;
|
|
@@ -352,26 +235,7 @@ export declare const objectFieldSchema: z.ZodObject<{
|
|
|
352
235
|
}, z.core.$strip>, z.ZodObject<{
|
|
353
236
|
_type: z.ZodLiteral<"array">;
|
|
354
237
|
nullable: z.ZodBoolean;
|
|
355
|
-
type: z.ZodDiscriminatedUnion<[
|
|
356
|
-
_type: z.ZodLiteral<"ObjectType">;
|
|
357
|
-
name: z.ZodString;
|
|
358
|
-
$ref: z.ZodString;
|
|
359
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
360
|
-
_type: z.ZodLiteral<"InterfaceType">;
|
|
361
|
-
name: z.ZodString;
|
|
362
|
-
$ref: z.ZodString;
|
|
363
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
364
|
-
_type: z.ZodLiteral<"Scalar">;
|
|
365
|
-
name: z.ZodString;
|
|
366
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
367
|
-
_type: z.ZodLiteral<"Union">;
|
|
368
|
-
name: z.ZodString;
|
|
369
|
-
$ref: z.ZodString;
|
|
370
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
371
|
-
_type: z.ZodLiteral<"Enum">;
|
|
372
|
-
name: z.ZodString;
|
|
373
|
-
$ref: z.ZodString;
|
|
374
|
-
}, z.core.$strip>]>;
|
|
238
|
+
type: z.ZodDiscriminatedUnion<[typeof objectLiteralSpecSchema, typeof objectArraySpecSchema]>;
|
|
375
239
|
}, z.core.$strip>, z.ZodObject<{
|
|
376
240
|
_type: z.ZodLiteral<"callable">;
|
|
377
241
|
returnType: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -399,26 +263,7 @@ export declare const objectFieldSchema: z.ZodObject<{
|
|
|
399
263
|
}, z.core.$strip>, z.ZodObject<{
|
|
400
264
|
_type: z.ZodLiteral<"array">;
|
|
401
265
|
nullable: z.ZodBoolean;
|
|
402
|
-
type: z.ZodDiscriminatedUnion<[
|
|
403
|
-
_type: z.ZodLiteral<"ObjectType">;
|
|
404
|
-
name: z.ZodString;
|
|
405
|
-
$ref: z.ZodString;
|
|
406
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
407
|
-
_type: z.ZodLiteral<"InterfaceType">;
|
|
408
|
-
name: z.ZodString;
|
|
409
|
-
$ref: z.ZodString;
|
|
410
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
411
|
-
_type: z.ZodLiteral<"Scalar">;
|
|
412
|
-
name: z.ZodString;
|
|
413
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
414
|
-
_type: z.ZodLiteral<"Union">;
|
|
415
|
-
name: z.ZodString;
|
|
416
|
-
$ref: z.ZodString;
|
|
417
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
418
|
-
_type: z.ZodLiteral<"Enum">;
|
|
419
|
-
name: z.ZodString;
|
|
420
|
-
$ref: z.ZodString;
|
|
421
|
-
}, z.core.$strip>]>;
|
|
266
|
+
type: z.ZodDiscriminatedUnion<[typeof objectLiteralSpecSchema, typeof objectArraySpecSchema]>;
|
|
422
267
|
}, z.core.$strip>]>;
|
|
423
268
|
arguments: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
424
269
|
nullable: z.ZodBoolean;
|
|
@@ -440,26 +285,15 @@ export declare const objectFieldSchema: z.ZodObject<{
|
|
|
440
285
|
}, z.core.$strip>, z.ZodObject<{
|
|
441
286
|
_type: z.ZodLiteral<"array">;
|
|
442
287
|
nullable: z.ZodBoolean;
|
|
443
|
-
type: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
444
|
-
_type: z.ZodLiteral<"InputType">;
|
|
445
|
-
name: z.ZodString;
|
|
446
|
-
$ref: z.ZodString;
|
|
447
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
448
|
-
_type: z.ZodLiteral<"Scalar">;
|
|
449
|
-
name: z.ZodString;
|
|
450
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
451
|
-
_type: z.ZodLiteral<"Enum">;
|
|
452
|
-
name: z.ZodString;
|
|
453
|
-
$ref: z.ZodString;
|
|
454
|
-
}, z.core.$strip>]>;
|
|
455
288
|
defaultValue: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodArray<z.ZodInt>, z.ZodArray<z.ZodFloat32>, z.ZodArray<z.ZodBoolean>]>>>;
|
|
289
|
+
type: z.ZodDiscriminatedUnion<[typeof import("./shared.js").inputLiteralSpecSchema, typeof import("./shared.js").inputArraySpecSchema]>;
|
|
456
290
|
}, z.core.$strip>]>;
|
|
457
291
|
}, z.core.$strip>>;
|
|
458
292
|
}, z.core.$strip>]>;
|
|
459
293
|
}, z.core.$strip>;
|
|
460
294
|
export declare const objectSchema: z.ZodObject<{
|
|
461
295
|
name: z.ZodString;
|
|
462
|
-
implements: z.ZodRecord<z.ZodString, z.
|
|
296
|
+
implements: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
463
297
|
fields: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
464
298
|
nullable: z.ZodBoolean;
|
|
465
299
|
spec: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -487,26 +321,7 @@ export declare const objectSchema: z.ZodObject<{
|
|
|
487
321
|
}, z.core.$strip>, z.ZodObject<{
|
|
488
322
|
_type: z.ZodLiteral<"array">;
|
|
489
323
|
nullable: z.ZodBoolean;
|
|
490
|
-
type: z.ZodDiscriminatedUnion<[
|
|
491
|
-
_type: z.ZodLiteral<"ObjectType">;
|
|
492
|
-
name: z.ZodString;
|
|
493
|
-
$ref: z.ZodString;
|
|
494
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
495
|
-
_type: z.ZodLiteral<"InterfaceType">;
|
|
496
|
-
name: z.ZodString;
|
|
497
|
-
$ref: z.ZodString;
|
|
498
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
499
|
-
_type: z.ZodLiteral<"Scalar">;
|
|
500
|
-
name: z.ZodString;
|
|
501
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
502
|
-
_type: z.ZodLiteral<"Union">;
|
|
503
|
-
name: z.ZodString;
|
|
504
|
-
$ref: z.ZodString;
|
|
505
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
506
|
-
_type: z.ZodLiteral<"Enum">;
|
|
507
|
-
name: z.ZodString;
|
|
508
|
-
$ref: z.ZodString;
|
|
509
|
-
}, z.core.$strip>]>;
|
|
324
|
+
type: z.ZodDiscriminatedUnion<[typeof objectLiteralSpecSchema, typeof objectArraySpecSchema]>;
|
|
510
325
|
}, z.core.$strip>, z.ZodObject<{
|
|
511
326
|
_type: z.ZodLiteral<"callable">;
|
|
512
327
|
returnType: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -534,26 +349,7 @@ export declare const objectSchema: z.ZodObject<{
|
|
|
534
349
|
}, z.core.$strip>, z.ZodObject<{
|
|
535
350
|
_type: z.ZodLiteral<"array">;
|
|
536
351
|
nullable: z.ZodBoolean;
|
|
537
|
-
type: z.ZodDiscriminatedUnion<[
|
|
538
|
-
_type: z.ZodLiteral<"ObjectType">;
|
|
539
|
-
name: z.ZodString;
|
|
540
|
-
$ref: z.ZodString;
|
|
541
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
542
|
-
_type: z.ZodLiteral<"InterfaceType">;
|
|
543
|
-
name: z.ZodString;
|
|
544
|
-
$ref: z.ZodString;
|
|
545
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
546
|
-
_type: z.ZodLiteral<"Scalar">;
|
|
547
|
-
name: z.ZodString;
|
|
548
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
549
|
-
_type: z.ZodLiteral<"Union">;
|
|
550
|
-
name: z.ZodString;
|
|
551
|
-
$ref: z.ZodString;
|
|
552
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
553
|
-
_type: z.ZodLiteral<"Enum">;
|
|
554
|
-
name: z.ZodString;
|
|
555
|
-
$ref: z.ZodString;
|
|
556
|
-
}, z.core.$strip>]>;
|
|
352
|
+
type: z.ZodDiscriminatedUnion<[typeof objectLiteralSpecSchema, typeof objectArraySpecSchema]>;
|
|
557
353
|
}, z.core.$strip>]>;
|
|
558
354
|
arguments: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
559
355
|
nullable: z.ZodBoolean;
|
|
@@ -575,19 +371,8 @@ export declare const objectSchema: z.ZodObject<{
|
|
|
575
371
|
}, z.core.$strip>, z.ZodObject<{
|
|
576
372
|
_type: z.ZodLiteral<"array">;
|
|
577
373
|
nullable: z.ZodBoolean;
|
|
578
|
-
type: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
579
|
-
_type: z.ZodLiteral<"InputType">;
|
|
580
|
-
name: z.ZodString;
|
|
581
|
-
$ref: z.ZodString;
|
|
582
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
583
|
-
_type: z.ZodLiteral<"Scalar">;
|
|
584
|
-
name: z.ZodString;
|
|
585
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
586
|
-
_type: z.ZodLiteral<"Enum">;
|
|
587
|
-
name: z.ZodString;
|
|
588
|
-
$ref: z.ZodString;
|
|
589
|
-
}, z.core.$strip>]>;
|
|
590
374
|
defaultValue: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodArray<z.ZodInt>, z.ZodArray<z.ZodFloat32>, z.ZodArray<z.ZodBoolean>]>>>;
|
|
375
|
+
type: z.ZodDiscriminatedUnion<[typeof import("./shared.js").inputLiteralSpecSchema, typeof import("./shared.js").inputArraySpecSchema]>;
|
|
591
376
|
}, z.core.$strip>]>;
|
|
592
377
|
}, z.core.$strip>>;
|
|
593
378
|
}, z.core.$strip>]>;
|
|
@@ -615,19 +400,8 @@ export declare const inputSchema: z.ZodObject<{
|
|
|
615
400
|
}, z.core.$strip>, z.ZodObject<{
|
|
616
401
|
_type: z.ZodLiteral<"array">;
|
|
617
402
|
nullable: z.ZodBoolean;
|
|
618
|
-
type: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
619
|
-
_type: z.ZodLiteral<"InputType">;
|
|
620
|
-
name: z.ZodString;
|
|
621
|
-
$ref: z.ZodString;
|
|
622
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
623
|
-
_type: z.ZodLiteral<"Scalar">;
|
|
624
|
-
name: z.ZodString;
|
|
625
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
626
|
-
_type: z.ZodLiteral<"Enum">;
|
|
627
|
-
name: z.ZodString;
|
|
628
|
-
$ref: z.ZodString;
|
|
629
|
-
}, z.core.$strip>]>;
|
|
630
403
|
defaultValue: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodArray<z.ZodInt>, z.ZodArray<z.ZodFloat32>, z.ZodArray<z.ZodBoolean>]>>>;
|
|
404
|
+
type: z.ZodDiscriminatedUnion<[typeof import("./shared.js").inputLiteralSpecSchema, typeof import("./shared.js").inputArraySpecSchema]>;
|
|
631
405
|
}, z.core.$strip>]>;
|
|
632
406
|
}, z.core.$strip>>;
|
|
633
407
|
}, z.core.$strip>;
|
|
@@ -671,7 +445,7 @@ export declare const enumSchema: z.ZodObject<{
|
|
|
671
445
|
export declare const serverSchema: z.ZodObject<{
|
|
672
446
|
objects: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
673
447
|
name: z.ZodString;
|
|
674
|
-
implements: z.ZodRecord<z.ZodString, z.
|
|
448
|
+
implements: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
675
449
|
fields: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
676
450
|
nullable: z.ZodBoolean;
|
|
677
451
|
spec: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -699,26 +473,7 @@ export declare const serverSchema: z.ZodObject<{
|
|
|
699
473
|
}, z.core.$strip>, z.ZodObject<{
|
|
700
474
|
_type: z.ZodLiteral<"array">;
|
|
701
475
|
nullable: z.ZodBoolean;
|
|
702
|
-
type: z.ZodDiscriminatedUnion<[
|
|
703
|
-
_type: z.ZodLiteral<"ObjectType">;
|
|
704
|
-
name: z.ZodString;
|
|
705
|
-
$ref: z.ZodString;
|
|
706
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
707
|
-
_type: z.ZodLiteral<"InterfaceType">;
|
|
708
|
-
name: z.ZodString;
|
|
709
|
-
$ref: z.ZodString;
|
|
710
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
711
|
-
_type: z.ZodLiteral<"Scalar">;
|
|
712
|
-
name: z.ZodString;
|
|
713
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
714
|
-
_type: z.ZodLiteral<"Union">;
|
|
715
|
-
name: z.ZodString;
|
|
716
|
-
$ref: z.ZodString;
|
|
717
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
718
|
-
_type: z.ZodLiteral<"Enum">;
|
|
719
|
-
name: z.ZodString;
|
|
720
|
-
$ref: z.ZodString;
|
|
721
|
-
}, z.core.$strip>]>;
|
|
476
|
+
type: z.ZodDiscriminatedUnion<[typeof objectLiteralSpecSchema, typeof objectArraySpecSchema]>;
|
|
722
477
|
}, z.core.$strip>, z.ZodObject<{
|
|
723
478
|
_type: z.ZodLiteral<"callable">;
|
|
724
479
|
returnType: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -746,26 +501,7 @@ export declare const serverSchema: z.ZodObject<{
|
|
|
746
501
|
}, z.core.$strip>, z.ZodObject<{
|
|
747
502
|
_type: z.ZodLiteral<"array">;
|
|
748
503
|
nullable: z.ZodBoolean;
|
|
749
|
-
type: z.ZodDiscriminatedUnion<[
|
|
750
|
-
_type: z.ZodLiteral<"ObjectType">;
|
|
751
|
-
name: z.ZodString;
|
|
752
|
-
$ref: z.ZodString;
|
|
753
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
754
|
-
_type: z.ZodLiteral<"InterfaceType">;
|
|
755
|
-
name: z.ZodString;
|
|
756
|
-
$ref: z.ZodString;
|
|
757
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
758
|
-
_type: z.ZodLiteral<"Scalar">;
|
|
759
|
-
name: z.ZodString;
|
|
760
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
761
|
-
_type: z.ZodLiteral<"Union">;
|
|
762
|
-
name: z.ZodString;
|
|
763
|
-
$ref: z.ZodString;
|
|
764
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
765
|
-
_type: z.ZodLiteral<"Enum">;
|
|
766
|
-
name: z.ZodString;
|
|
767
|
-
$ref: z.ZodString;
|
|
768
|
-
}, z.core.$strip>]>;
|
|
504
|
+
type: z.ZodDiscriminatedUnion<[typeof objectLiteralSpecSchema, typeof objectArraySpecSchema]>;
|
|
769
505
|
}, z.core.$strip>]>;
|
|
770
506
|
arguments: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
771
507
|
nullable: z.ZodBoolean;
|
|
@@ -787,19 +523,8 @@ export declare const serverSchema: z.ZodObject<{
|
|
|
787
523
|
}, z.core.$strip>, z.ZodObject<{
|
|
788
524
|
_type: z.ZodLiteral<"array">;
|
|
789
525
|
nullable: z.ZodBoolean;
|
|
790
|
-
type: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
791
|
-
_type: z.ZodLiteral<"InputType">;
|
|
792
|
-
name: z.ZodString;
|
|
793
|
-
$ref: z.ZodString;
|
|
794
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
795
|
-
_type: z.ZodLiteral<"Scalar">;
|
|
796
|
-
name: z.ZodString;
|
|
797
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
798
|
-
_type: z.ZodLiteral<"Enum">;
|
|
799
|
-
name: z.ZodString;
|
|
800
|
-
$ref: z.ZodString;
|
|
801
|
-
}, z.core.$strip>]>;
|
|
802
526
|
defaultValue: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodArray<z.ZodInt>, z.ZodArray<z.ZodFloat32>, z.ZodArray<z.ZodBoolean>]>>>;
|
|
527
|
+
type: z.ZodDiscriminatedUnion<[typeof import("./shared.js").inputLiteralSpecSchema, typeof import("./shared.js").inputArraySpecSchema]>;
|
|
803
528
|
}, z.core.$strip>]>;
|
|
804
529
|
}, z.core.$strip>>;
|
|
805
530
|
}, z.core.$strip>]>;
|
|
@@ -852,19 +577,8 @@ export declare const serverSchema: z.ZodObject<{
|
|
|
852
577
|
}, z.core.$strip>, z.ZodObject<{
|
|
853
578
|
_type: z.ZodLiteral<"array">;
|
|
854
579
|
nullable: z.ZodBoolean;
|
|
855
|
-
type: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
856
|
-
_type: z.ZodLiteral<"InputType">;
|
|
857
|
-
name: z.ZodString;
|
|
858
|
-
$ref: z.ZodString;
|
|
859
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
860
|
-
_type: z.ZodLiteral<"Scalar">;
|
|
861
|
-
name: z.ZodString;
|
|
862
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
863
|
-
_type: z.ZodLiteral<"Enum">;
|
|
864
|
-
name: z.ZodString;
|
|
865
|
-
$ref: z.ZodString;
|
|
866
|
-
}, z.core.$strip>]>;
|
|
867
580
|
defaultValue: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodArray<z.ZodInt>, z.ZodArray<z.ZodFloat32>, z.ZodArray<z.ZodBoolean>]>>>;
|
|
581
|
+
type: z.ZodDiscriminatedUnion<[typeof import("./shared.js").inputLiteralSpecSchema, typeof import("./shared.js").inputArraySpecSchema]>;
|
|
868
582
|
}, z.core.$strip>]>;
|
|
869
583
|
}, z.core.$strip>>;
|
|
870
584
|
}, z.core.$strip>>;
|
package/schema/server.js
CHANGED
|
@@ -34,7 +34,10 @@ export const objectLiteralSpecSchema = z.object({
|
|
|
34
34
|
export const objectArraySpecSchema = z.object({
|
|
35
35
|
_type: z.literal('array'),
|
|
36
36
|
nullable: z.boolean(),
|
|
37
|
-
type
|
|
37
|
+
get type() {
|
|
38
|
+
// eslint-disable-next-line no-use-before-define
|
|
39
|
+
return objectNonCallableFieldSpecSchema;
|
|
40
|
+
}
|
|
38
41
|
});
|
|
39
42
|
export const objectNonCallableFieldSpecSchema = z.discriminatedUnion('_type', [
|
|
40
43
|
objectLiteralSpecSchema,
|
|
@@ -56,7 +59,7 @@ export const objectFieldSchema = z.object({
|
|
|
56
59
|
});
|
|
57
60
|
export const objectSchema = z.object({
|
|
58
61
|
name: z.string(),
|
|
59
|
-
implements: z.record(z.string(), z.
|
|
62
|
+
implements: z.record(z.string(), z.any()),
|
|
60
63
|
fields: z.record(z.string(), objectFieldSchema),
|
|
61
64
|
});
|
|
62
65
|
export const inputSchema = z.object({
|
package/schema/shared.d.ts
CHANGED
|
@@ -32,19 +32,8 @@ export declare const inputLiteralSpecSchema: z.ZodObject<{
|
|
|
32
32
|
export declare const inputArraySpecSchema: z.ZodObject<{
|
|
33
33
|
_type: z.ZodLiteral<"array">;
|
|
34
34
|
nullable: z.ZodBoolean;
|
|
35
|
-
type: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
36
|
-
_type: z.ZodLiteral<"InputType">;
|
|
37
|
-
name: z.ZodString;
|
|
38
|
-
$ref: z.ZodString;
|
|
39
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
40
|
-
_type: z.ZodLiteral<"Scalar">;
|
|
41
|
-
name: z.ZodString;
|
|
42
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
43
|
-
_type: z.ZodLiteral<"Enum">;
|
|
44
|
-
name: z.ZodString;
|
|
45
|
-
$ref: z.ZodString;
|
|
46
|
-
}, z.core.$strip>]>;
|
|
47
35
|
defaultValue: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodArray<z.ZodInt>, z.ZodArray<z.ZodFloat32>, z.ZodArray<z.ZodBoolean>]>>>;
|
|
36
|
+
type: z.ZodDiscriminatedUnion<[typeof inputLiteralSpecSchema, typeof inputArraySpecSchema]>;
|
|
48
37
|
}, z.core.$strip>;
|
|
49
38
|
export declare const inputFieldSpecSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
50
39
|
_type: z.ZodLiteral<"literal">;
|
|
@@ -64,19 +53,8 @@ export declare const inputFieldSpecSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
64
53
|
}, z.core.$strip>, z.ZodObject<{
|
|
65
54
|
_type: z.ZodLiteral<"array">;
|
|
66
55
|
nullable: z.ZodBoolean;
|
|
67
|
-
type: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
68
|
-
_type: z.ZodLiteral<"InputType">;
|
|
69
|
-
name: z.ZodString;
|
|
70
|
-
$ref: z.ZodString;
|
|
71
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
72
|
-
_type: z.ZodLiteral<"Scalar">;
|
|
73
|
-
name: z.ZodString;
|
|
74
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
75
|
-
_type: z.ZodLiteral<"Enum">;
|
|
76
|
-
name: z.ZodString;
|
|
77
|
-
$ref: z.ZodString;
|
|
78
|
-
}, z.core.$strip>]>;
|
|
79
56
|
defaultValue: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodArray<z.ZodInt>, z.ZodArray<z.ZodFloat32>, z.ZodArray<z.ZodBoolean>]>>>;
|
|
57
|
+
type: z.ZodDiscriminatedUnion<[typeof inputLiteralSpecSchema, typeof inputArraySpecSchema]>;
|
|
80
58
|
}, z.core.$strip>]>;
|
|
81
59
|
export declare const inputFieldSchema: z.ZodObject<{
|
|
82
60
|
nullable: z.ZodBoolean;
|
|
@@ -98,18 +76,7 @@ export declare const inputFieldSchema: z.ZodObject<{
|
|
|
98
76
|
}, z.core.$strip>, z.ZodObject<{
|
|
99
77
|
_type: z.ZodLiteral<"array">;
|
|
100
78
|
nullable: z.ZodBoolean;
|
|
101
|
-
type: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
102
|
-
_type: z.ZodLiteral<"InputType">;
|
|
103
|
-
name: z.ZodString;
|
|
104
|
-
$ref: z.ZodString;
|
|
105
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
106
|
-
_type: z.ZodLiteral<"Scalar">;
|
|
107
|
-
name: z.ZodString;
|
|
108
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
109
|
-
_type: z.ZodLiteral<"Enum">;
|
|
110
|
-
name: z.ZodString;
|
|
111
|
-
$ref: z.ZodString;
|
|
112
|
-
}, z.core.$strip>]>;
|
|
113
79
|
defaultValue: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodArray<z.ZodInt>, z.ZodArray<z.ZodFloat32>, z.ZodArray<z.ZodBoolean>]>>>;
|
|
80
|
+
type: z.ZodDiscriminatedUnion<[typeof inputLiteralSpecSchema, typeof inputArraySpecSchema]>;
|
|
114
81
|
}, z.core.$strip>]>;
|
|
115
82
|
}, z.core.$strip>;
|
package/schema/shared.js
CHANGED
|
@@ -35,8 +35,11 @@ export const inputLiteralSpecSchema = z.object({
|
|
|
35
35
|
export const inputArraySpecSchema = z.object({
|
|
36
36
|
_type: z.literal('array'),
|
|
37
37
|
nullable: z.boolean(),
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
defaultValue: arrayLiteralSchema.optional().nullable(),
|
|
39
|
+
get type() {
|
|
40
|
+
// eslint-disable-next-line no-use-before-define
|
|
41
|
+
return inputFieldSpecSchema;
|
|
42
|
+
},
|
|
40
43
|
});
|
|
41
44
|
export const inputFieldSpecSchema = z.discriminatedUnion('_type', [
|
|
42
45
|
inputLiteralSpecSchema,
|