@miroir-framework/jzod-ts 0.5.3 → 0.6.0

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/dist/bundle.d.ts CHANGED
@@ -1,400 +1,240 @@
1
1
  import ts from 'typescript';
2
- import { z, ZodType } from 'zod';
2
+ import { z } from 'zod';
3
3
 
4
- declare const jzodRootSchema: z.ZodObject<{
5
- optional: z.ZodOptional<z.ZodBoolean>;
6
- }, "strict", z.ZodTypeAny, {
4
+ type JzodArray = {
7
5
  optional?: boolean | undefined;
8
- }, {
9
- optional?: boolean | undefined;
10
- }>;
11
- type JzodRoot = z.infer<typeof jzodRootSchema>;
12
- declare const jzodEnumAttributeTypes: z.ZodEnum<["any", "bigint", "boolean", "date", "never", "null", "number", "string", "uuid", "undefined", "unknown", "void"]>;
13
- type JzodEnumTypes = z.infer<typeof jzodEnumAttributeTypes>;
14
- declare const jzodEnumElementTypes: z.ZodEnum<["array", "enum", "function", "lazy", "literal", "intersection", "map", "object", "promise", "record", "schemaReference", "set", "simpleType", "tuple", "union"]>;
15
- type JzodEnumElementTypes = z.infer<typeof jzodEnumElementTypes>;
16
- interface JzodArray extends JzodRoot {
17
- optional?: boolean;
18
- nullable?: boolean;
6
+ nullable?: boolean | undefined;
19
7
  extra?: {
20
- [k: string]: any;
21
- };
22
- type: 'array';
8
+ [x: string]: any;
9
+ } | undefined;
10
+ type: "array";
23
11
  definition: JzodElement;
24
- }
25
- declare const jzodArray: z.ZodType<JzodArray>;
26
- declare const jzodAttributeDateValidations: z.ZodObject<{
27
- extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
28
- type: z.ZodEnum<["min", "max"]>;
29
- parameter: z.ZodAny;
30
- }, "strict", z.ZodTypeAny, {
31
- type: "min" | "max";
32
- extra?: Record<string, any> | undefined;
33
- parameter?: any;
34
- }, {
35
- type: "min" | "max";
36
- extra?: Record<string, any> | undefined;
37
- parameter?: any;
38
- }>;
39
- type JzodAttributeDateValidations = z.infer<typeof jzodAttributeDateValidations>;
40
- declare const jzodAttributeNumberValidations: z.ZodObject<{
41
- extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
42
- type: z.ZodEnum<["gt", "gte", "lt", "lte", "int", "positive", "nonpositive", "negative", "nonnegative", "multipleOf", "finite", "safe"]>;
43
- parameter: z.ZodAny;
44
- }, "strict", z.ZodTypeAny, {
45
- type: "multipleOf" | "gt" | "gte" | "lt" | "lte" | "int" | "positive" | "nonpositive" | "negative" | "nonnegative" | "finite" | "safe";
46
- extra?: Record<string, any> | undefined;
47
- parameter?: any;
48
- }, {
49
- type: "multipleOf" | "gt" | "gte" | "lt" | "lte" | "int" | "positive" | "nonpositive" | "negative" | "nonnegative" | "finite" | "safe";
50
- extra?: Record<string, any> | undefined;
51
- parameter?: any;
52
- }>;
53
- type JzodAttributeNumberValidations = z.infer<typeof jzodAttributeNumberValidations>;
54
- declare const jzodAttributeStringValidations: z.ZodObject<{
55
- extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
56
- type: z.ZodEnum<["max", "min", "length", "email", "url", "emoji", "uuid", "cuid", "cuid2", "ulid", "regex", "includes", "startsWith", "endsWith", "datetime", "ip"]>;
57
- parameter: z.ZodAny;
58
- }, "strict", z.ZodTypeAny, {
59
- type: "length" | "includes" | "uuid" | "min" | "max" | "email" | "url" | "emoji" | "cuid" | "cuid2" | "ulid" | "regex" | "startsWith" | "endsWith" | "datetime" | "ip";
60
- extra?: Record<string, any> | undefined;
61
- parameter?: any;
62
- }, {
63
- type: "length" | "includes" | "uuid" | "min" | "max" | "email" | "url" | "emoji" | "cuid" | "cuid2" | "ulid" | "regex" | "startsWith" | "endsWith" | "datetime" | "ip";
64
- extra?: Record<string, any> | undefined;
65
- parameter?: any;
66
- }>;
67
- type JzodAttributeStringValidations = z.infer<typeof jzodAttributeStringValidations>;
68
- declare const jzodAttributeDateWithValidations: z.ZodObject<{
69
- optional: z.ZodOptional<z.ZodBoolean>;
70
- nullable: z.ZodOptional<z.ZodBoolean>;
71
- extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
72
- coerce: z.ZodOptional<z.ZodBoolean>;
73
- type: z.ZodLiteral<"simpleType">;
74
- definition: z.ZodLiteral<"date">;
75
- validations: z.ZodArray<z.ZodObject<{
76
- extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
77
- type: z.ZodEnum<["min", "max"]>;
78
- parameter: z.ZodAny;
79
- }, "strict", z.ZodTypeAny, {
80
- type: "min" | "max";
81
- extra?: Record<string, any> | undefined;
82
- parameter?: any;
83
- }, {
84
- type: "min" | "max";
85
- extra?: Record<string, any> | undefined;
86
- parameter?: any;
87
- }>, "many">;
88
- }, "strict", z.ZodTypeAny, {
89
- type: "simpleType";
90
- definition: "date";
91
- validations: {
92
- type: "min" | "max";
93
- extra?: Record<string, any> | undefined;
94
- parameter?: any;
95
- }[];
12
+ };
13
+ type JzodAttribute = {
96
14
  optional?: boolean | undefined;
97
15
  nullable?: boolean | undefined;
98
- extra?: Record<string, any> | undefined;
99
- coerce?: boolean | undefined;
100
- }, {
16
+ extra?: {
17
+ [x: string]: any;
18
+ } | undefined;
101
19
  type: "simpleType";
102
- definition: "date";
103
- validations: {
104
- type: "min" | "max";
105
- extra?: Record<string, any> | undefined;
106
- parameter?: any;
107
- }[];
108
- optional?: boolean | undefined;
109
- nullable?: boolean | undefined;
110
- extra?: Record<string, any> | undefined;
111
20
  coerce?: boolean | undefined;
112
- }>;
113
- type JzodAttributeDateWithValidations = z.infer<typeof jzodAttributeDateWithValidations>;
114
- declare const jzodAttributeNumberWithValidations: z.ZodObject<{
115
- optional: z.ZodOptional<z.ZodBoolean>;
116
- nullable: z.ZodOptional<z.ZodBoolean>;
117
- extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
118
- coerce: z.ZodOptional<z.ZodBoolean>;
119
- type: z.ZodLiteral<"simpleType">;
120
- definition: z.ZodLiteral<"number">;
121
- validations: z.ZodArray<z.ZodObject<{
122
- extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
123
- type: z.ZodEnum<["gt", "gte", "lt", "lte", "int", "positive", "nonpositive", "negative", "nonnegative", "multipleOf", "finite", "safe"]>;
124
- parameter: z.ZodAny;
125
- }, "strict", z.ZodTypeAny, {
126
- type: "multipleOf" | "gt" | "gte" | "lt" | "lte" | "int" | "positive" | "nonpositive" | "negative" | "nonnegative" | "finite" | "safe";
127
- extra?: Record<string, any> | undefined;
128
- parameter?: any;
129
- }, {
130
- type: "multipleOf" | "gt" | "gte" | "lt" | "lte" | "int" | "positive" | "nonpositive" | "negative" | "nonnegative" | "finite" | "safe";
131
- extra?: Record<string, any> | undefined;
132
- parameter?: any;
133
- }>, "many">;
134
- }, "strict", z.ZodTypeAny, {
135
- type: "simpleType";
136
- definition: "number";
137
- validations: {
138
- type: "multipleOf" | "gt" | "gte" | "lt" | "lte" | "int" | "positive" | "nonpositive" | "negative" | "nonnegative" | "finite" | "safe";
139
- extra?: Record<string, any> | undefined;
140
- parameter?: any;
141
- }[];
21
+ definition: JzodEnumAttributeTypes;
22
+ };
23
+ type JzodAttributeDateValidations = {
24
+ extra?: {
25
+ [x: string]: any;
26
+ } | undefined;
27
+ type: "min" | "max";
28
+ parameter?: any;
29
+ };
30
+ type JzodAttributeDateWithValidations = {
142
31
  optional?: boolean | undefined;
143
32
  nullable?: boolean | undefined;
144
- extra?: Record<string, any> | undefined;
145
- coerce?: boolean | undefined;
146
- }, {
33
+ extra?: {
34
+ [x: string]: any;
35
+ } | undefined;
147
36
  type: "simpleType";
148
- definition: "number";
149
- validations: {
150
- type: "multipleOf" | "gt" | "gte" | "lt" | "lte" | "int" | "positive" | "nonpositive" | "negative" | "nonnegative" | "finite" | "safe";
151
- extra?: Record<string, any> | undefined;
152
- parameter?: any;
153
- }[];
37
+ definition: "date";
38
+ validations: JzodAttributeDateValidations[];
39
+ };
40
+ type JzodAttributeNumberValidations = {
41
+ extra?: {
42
+ [x: string]: any;
43
+ } | undefined;
44
+ type: "gt" | "gte" | "lt" | "lte" | "int" | "positive" | "nonpositive" | "negative" | "nonnegative" | "multipleOf" | "finite" | "safe";
45
+ parameter?: any;
46
+ };
47
+ type JzodAttributeNumberWithValidations = {
154
48
  optional?: boolean | undefined;
155
49
  nullable?: boolean | undefined;
156
- extra?: Record<string, any> | undefined;
157
- coerce?: boolean | undefined;
158
- }>;
159
- type JzodAttributeNumberWithValidations = z.infer<typeof jzodAttributeNumberWithValidations>;
160
- declare const jzodAttributeStringWithValidations: z.ZodObject<{
161
- optional: z.ZodOptional<z.ZodBoolean>;
162
- nullable: z.ZodOptional<z.ZodBoolean>;
163
- extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
164
- coerce: z.ZodOptional<z.ZodBoolean>;
165
- type: z.ZodLiteral<"simpleType">;
166
- definition: z.ZodLiteral<"string">;
167
- validations: z.ZodArray<z.ZodObject<{
168
- extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
169
- type: z.ZodEnum<["max", "min", "length", "email", "url", "emoji", "uuid", "cuid", "cuid2", "ulid", "regex", "includes", "startsWith", "endsWith", "datetime", "ip"]>;
170
- parameter: z.ZodAny;
171
- }, "strict", z.ZodTypeAny, {
172
- type: "length" | "includes" | "uuid" | "min" | "max" | "email" | "url" | "emoji" | "cuid" | "cuid2" | "ulid" | "regex" | "startsWith" | "endsWith" | "datetime" | "ip";
173
- extra?: Record<string, any> | undefined;
174
- parameter?: any;
175
- }, {
176
- type: "length" | "includes" | "uuid" | "min" | "max" | "email" | "url" | "emoji" | "cuid" | "cuid2" | "ulid" | "regex" | "startsWith" | "endsWith" | "datetime" | "ip";
177
- extra?: Record<string, any> | undefined;
178
- parameter?: any;
179
- }>, "many">;
180
- }, "strict", z.ZodTypeAny, {
50
+ extra?: {
51
+ [x: string]: any;
52
+ } | undefined;
181
53
  type: "simpleType";
182
- definition: "string";
183
- validations: {
184
- type: "length" | "includes" | "uuid" | "min" | "max" | "email" | "url" | "emoji" | "cuid" | "cuid2" | "ulid" | "regex" | "startsWith" | "endsWith" | "datetime" | "ip";
185
- extra?: Record<string, any> | undefined;
186
- parameter?: any;
187
- }[];
54
+ definition: "number";
55
+ validations: JzodAttributeNumberValidations[];
56
+ };
57
+ type JzodAttributeStringValidations = {
58
+ extra?: {
59
+ [x: string]: any;
60
+ } | undefined;
61
+ type: "max" | "min" | "length" | "email" | "url" | "emoji" | "uuid" | "cuid" | "cuid2" | "ulid" | "regex" | "includes" | "startsWith" | "endsWith" | "datetime" | "ip";
62
+ parameter?: any;
63
+ };
64
+ type JzodAttributeStringWithValidations = {
188
65
  optional?: boolean | undefined;
189
66
  nullable?: boolean | undefined;
190
- extra?: Record<string, any> | undefined;
191
- coerce?: boolean | undefined;
192
- }, {
67
+ extra?: {
68
+ [x: string]: any;
69
+ } | undefined;
193
70
  type: "simpleType";
194
71
  definition: "string";
195
- validations: {
196
- type: "length" | "includes" | "uuid" | "min" | "max" | "email" | "url" | "emoji" | "cuid" | "cuid2" | "ulid" | "regex" | "startsWith" | "endsWith" | "datetime" | "ip";
197
- extra?: Record<string, any> | undefined;
198
- parameter?: any;
199
- }[];
200
- optional?: boolean | undefined;
201
- nullable?: boolean | undefined;
202
- extra?: Record<string, any> | undefined;
203
- coerce?: boolean | undefined;
204
- }>;
205
- type JzodAttributeStringWithValidations = z.infer<typeof jzodAttributeStringWithValidations>;
206
- declare const jzodAttribute: z.ZodObject<{
207
- optional: z.ZodOptional<z.ZodBoolean>;
208
- nullable: z.ZodOptional<z.ZodBoolean>;
209
- extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
210
- coerce: z.ZodOptional<z.ZodBoolean>;
211
- type: z.ZodLiteral<"simpleType">;
212
- definition: z.ZodLazy<z.ZodEnum<["any", "bigint", "boolean", "date", "never", "null", "number", "string", "uuid", "undefined", "unknown", "void"]>>;
213
- }, "strict", z.ZodTypeAny, {
214
- type: "simpleType";
215
- definition: "string" | "number" | "bigint" | "boolean" | "undefined" | "any" | "date" | "never" | "null" | "uuid" | "unknown" | "void";
216
- optional?: boolean | undefined;
217
- nullable?: boolean | undefined;
218
- extra?: Record<string, any> | undefined;
219
- coerce?: boolean | undefined;
220
- }, {
221
- type: "simpleType";
222
- definition: "string" | "number" | "bigint" | "boolean" | "undefined" | "any" | "date" | "never" | "null" | "uuid" | "unknown" | "void";
223
- optional?: boolean | undefined;
224
- nullable?: boolean | undefined;
225
- extra?: Record<string, any> | undefined;
226
- coerce?: boolean | undefined;
227
- }>;
228
- type JzodAttribute = z.infer<typeof jzodAttribute>;
229
- type JzodElement = JzodArray | JzodAttribute | JzodAttributeDateWithValidations | JzodAttributeNumberWithValidations | JzodAttributeStringWithValidations | JzodEnum | JzodFunction | JzodLazy | JzodLiteral | JzodIntersection | JzodMap | JzodRecord | JzodObject | JzodPromise | JzodReference | JzodSet | JzodTuple | JzodUnion;
230
- declare const jzodElement: z.ZodType<JzodElement>;
231
- declare const jzodEnum: z.ZodObject<{
232
- optional: z.ZodOptional<z.ZodBoolean>;
233
- nullable: z.ZodOptional<z.ZodBoolean>;
234
- extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
235
- type: z.ZodLiteral<"enum">;
236
- definition: z.ZodArray<z.ZodString, "many">;
237
- }, "strict", z.ZodTypeAny, {
238
- type: "enum";
239
- definition: string[];
72
+ validations: JzodAttributeStringValidations[];
73
+ };
74
+ type JzodElement = JzodArray | JzodAttribute | JzodAttributeDateWithValidations | JzodAttributeNumberWithValidations | JzodAttributeStringWithValidations | JzodEnum | JzodFunction | JzodLazy | JzodLiteral | JzodIntersection | JzodMap | JzodObject | JzodPromise | JzodRecord | JzodReference | JzodSet | JzodTuple | JzodUnion;
75
+ type JzodEnum = {
240
76
  optional?: boolean | undefined;
241
77
  nullable?: boolean | undefined;
242
- extra?: Record<string, any> | undefined;
243
- }, {
78
+ extra?: {
79
+ [x: string]: any;
80
+ } | undefined;
244
81
  type: "enum";
245
82
  definition: string[];
83
+ };
84
+ type JzodEnumAttributeTypes = "any" | "bigint" | "boolean" | "date" | "never" | "null" | "number" | "string" | "uuid" | "undefined" | "unknown" | "void";
85
+ type JzodEnumElementTypes = "array" | "enum" | "function" | "lazy" | "literal" | "intersection" | "map" | "object" | "promise" | "record" | "schemaReference" | "set" | "simpleType" | "tuple" | "union";
86
+ type JzodFunction = {
246
87
  optional?: boolean | undefined;
247
88
  nullable?: boolean | undefined;
248
- extra?: Record<string, any> | undefined;
249
- }>;
250
- type JzodEnum = z.infer<typeof jzodEnum>;
251
- interface JzodFunction {
252
89
  extra?: {
253
- [k: string]: any;
254
- };
255
- type: 'function';
90
+ [x: string]: any;
91
+ } | undefined;
92
+ type: "function";
256
93
  definition: {
257
94
  args: JzodElement[];
258
- returns?: JzodElement;
95
+ returns?: JzodElement | undefined;
259
96
  };
260
- }
261
- declare const jzodFunction: ZodType<JzodFunction>;
262
- declare const jzodLazy: z.ZodObject<{
263
- type: z.ZodLiteral<"lazy">;
264
- extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
265
- definition: ZodType<JzodFunction, z.ZodTypeDef, JzodFunction>;
266
- }, "strict", z.ZodTypeAny, {
267
- type: "lazy";
268
- definition: JzodFunction;
269
- extra?: Record<string, any> | undefined;
270
- }, {
97
+ };
98
+ type JzodLazy = {
99
+ optional?: boolean | undefined;
100
+ nullable?: boolean | undefined;
101
+ extra?: {
102
+ [x: string]: any;
103
+ } | undefined;
271
104
  type: "lazy";
272
105
  definition: JzodFunction;
273
- extra?: Record<string, any> | undefined;
274
- }>;
275
- type JzodLazy = z.infer<typeof jzodLazy>;
276
- declare const jzodLiteral: z.ZodObject<{
277
- optional: z.ZodOptional<z.ZodBoolean>;
278
- nullable: z.ZodOptional<z.ZodBoolean>;
279
- extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
280
- type: z.ZodLiteral<"literal">;
281
- definition: z.ZodString;
282
- }, "strict", z.ZodTypeAny, {
283
- type: "literal";
284
- definition: string;
106
+ };
107
+ type JzodLiteral = {
285
108
  optional?: boolean | undefined;
286
109
  nullable?: boolean | undefined;
287
- extra?: Record<string, any> | undefined;
288
- }, {
110
+ extra?: {
111
+ [x: string]: any;
112
+ } | undefined;
289
113
  type: "literal";
290
114
  definition: string;
115
+ };
116
+ type JzodIntersection = {
291
117
  optional?: boolean | undefined;
292
118
  nullable?: boolean | undefined;
293
- extra?: Record<string, any> | undefined;
294
- }>;
295
- type JzodLiteral = z.infer<typeof jzodLiteral>;
296
- interface JzodIntersection {
297
- optional?: boolean;
298
- nullable?: boolean;
299
119
  extra?: {
300
- [k: string]: any;
301
- };
302
- type: 'intersection';
120
+ [x: string]: any;
121
+ } | undefined;
122
+ type: "intersection";
303
123
  definition: {
304
124
  left: JzodElement;
305
125
  right: JzodElement;
306
126
  };
307
- }
308
- declare const jzodIntersection: z.ZodType<JzodIntersection>;
309
- interface JzodMap extends JzodRoot {
310
- optional?: boolean;
311
- nullable?: boolean;
127
+ };
128
+ type JzodMap = {
129
+ optional?: boolean | undefined;
130
+ nullable?: boolean | undefined;
312
131
  extra?: {
313
- [k: string]: any;
314
- };
315
- type: 'map';
316
- definition: [JzodElement, JzodElement];
317
- }
318
- declare const jzodMapSchema: z.ZodType<JzodMap>;
319
- interface JzodObject extends JzodRoot {
320
- optional?: boolean;
321
- nullable?: boolean;
322
- extend?: JzodReference | JzodObject;
132
+ [x: string]: any;
133
+ } | undefined;
134
+ type: "map";
135
+ definition: [
136
+ JzodElement,
137
+ JzodElement
138
+ ];
139
+ };
140
+ type JzodObject = {
141
+ optional?: boolean | undefined;
142
+ nullable?: boolean | undefined;
323
143
  extra?: {
324
- [k: string]: any;
325
- };
144
+ [x: string]: any;
145
+ } | undefined;
146
+ extend?: (JzodReference | JzodObject) | undefined;
326
147
  type: "object";
327
- nonStrict?: boolean;
148
+ nonStrict?: boolean | undefined;
328
149
  definition: {
329
- [attributeName: string]: JzodElement;
150
+ [x: string]: JzodElement;
330
151
  };
331
- }
332
- declare const jzodObject: z.ZodType<JzodObject>;
333
- interface JzodPromise extends JzodRoot {
152
+ };
153
+ type JzodPromise = {
154
+ optional?: boolean | undefined;
155
+ nullable?: boolean | undefined;
334
156
  extra?: {
335
- [k: string]: any;
336
- };
337
- type: 'promise';
157
+ [x: string]: any;
158
+ } | undefined;
159
+ type: "promise";
338
160
  definition: JzodElement;
339
- }
340
- declare const jzodPromise: z.ZodType<JzodPromise>;
341
- interface JzodRecord {
342
- optional?: boolean;
343
- nullable?: boolean;
161
+ };
162
+ type JzodRecord = {
163
+ optional?: boolean | undefined;
164
+ nullable?: boolean | undefined;
344
165
  extra?: {
345
- [k: string]: any;
346
- };
347
- type: 'record';
166
+ [x: string]: any;
167
+ } | undefined;
168
+ type: "record";
348
169
  definition: JzodElement;
349
- }
350
- declare const jzodRecord: z.ZodType<JzodRecord>;
351
- interface JzodReference {
352
- optional?: boolean;
353
- nullable?: boolean;
170
+ };
171
+ type JzodReference = {
172
+ optional?: boolean | undefined;
173
+ nullable?: boolean | undefined;
354
174
  extra?: {
355
- [k: string]: any;
356
- };
175
+ [x: string]: any;
176
+ } | undefined;
177
+ type: "schemaReference";
357
178
  context?: {
358
- [attributeName: string]: JzodElement;
359
- };
360
- type: 'schemaReference';
179
+ [x: string]: JzodElement;
180
+ } | undefined;
361
181
  definition: {
362
- eager?: boolean;
363
- relativePath?: string;
364
- absolutePath?: string;
182
+ eager?: boolean | undefined;
183
+ relativePath?: string | undefined;
184
+ absolutePath?: string | undefined;
365
185
  };
366
- }
367
- declare const jzodReference: ZodType<JzodReference>;
368
- interface JzodSet extends JzodRoot {
369
- optional?: boolean;
370
- nullable?: boolean;
186
+ };
187
+ type JzodSet = {
188
+ optional?: boolean | undefined;
189
+ nullable?: boolean | undefined;
371
190
  extra?: {
372
- [k: string]: any;
373
- };
374
- type: 'set';
191
+ [x: string]: any;
192
+ } | undefined;
193
+ type: "set";
375
194
  definition: JzodElement;
376
- }
377
- declare const jzodSet: z.ZodType<JzodSet>;
378
- interface JzodTuple {
379
- optional?: boolean;
380
- nullable?: boolean;
195
+ };
196
+ type JzodTuple = {
197
+ optional?: boolean | undefined;
198
+ nullable?: boolean | undefined;
381
199
  extra?: {
382
- [k: string]: any;
383
- };
384
- type: 'tuple';
200
+ [x: string]: any;
201
+ } | undefined;
202
+ type: "tuple";
385
203
  definition: JzodElement[];
386
- }
387
- declare const jzodTuple: z.ZodType<JzodTuple>;
388
- interface JzodUnion {
389
- optional?: boolean;
390
- nullable?: boolean;
204
+ };
205
+ type JzodUnion = {
206
+ optional?: boolean | undefined;
207
+ nullable?: boolean | undefined;
391
208
  extra?: {
392
- [k: string]: any;
393
- };
209
+ [x: string]: any;
210
+ } | undefined;
394
211
  type: "union";
395
- discriminator?: string;
212
+ discriminator?: string | undefined;
396
213
  definition: JzodElement[];
397
- }
214
+ };
215
+ declare const jzodArray: z.ZodType<JzodArray>;
216
+ declare const jzodAttribute: z.ZodType<JzodAttribute>;
217
+ declare const jzodAttributeDateValidations: z.ZodType<JzodAttributeDateValidations>;
218
+ declare const jzodAttributeDateWithValidations: z.ZodType<JzodAttributeDateWithValidations>;
219
+ declare const jzodAttributeNumberValidations: z.ZodType<JzodAttributeNumberValidations>;
220
+ declare const jzodAttributeNumberWithValidations: z.ZodType<JzodAttributeNumberWithValidations>;
221
+ declare const jzodAttributeStringValidations: z.ZodType<JzodAttributeStringValidations>;
222
+ declare const jzodAttributeStringWithValidations: z.ZodType<JzodAttributeStringWithValidations>;
223
+ declare const jzodElement: z.ZodType<JzodElement>;
224
+ declare const jzodEnum: z.ZodType<JzodEnum>;
225
+ declare const jzodEnumAttributeTypes: z.ZodType<JzodEnumAttributeTypes>;
226
+ declare const jzodEnumElementTypes: z.ZodType<JzodEnumElementTypes>;
227
+ declare const jzodFunction: z.ZodType<JzodFunction>;
228
+ declare const jzodLazy: z.ZodType<JzodLazy>;
229
+ declare const jzodLiteral: z.ZodType<JzodLiteral>;
230
+ declare const jzodIntersection: z.ZodType<JzodIntersection>;
231
+ declare const jzodMap: z.ZodType<JzodMap>;
232
+ declare const jzodObject: z.ZodType<JzodObject>;
233
+ declare const jzodPromise: z.ZodType<JzodPromise>;
234
+ declare const jzodRecord: z.ZodType<JzodRecord>;
235
+ declare const jzodReference: z.ZodType<JzodReference>;
236
+ declare const jzodSet: z.ZodType<JzodSet>;
237
+ declare const jzodTuple: z.ZodType<JzodTuple>;
398
238
  declare const jzodUnion: z.ZodType<JzodUnion>;
399
239
 
400
240
  type TsTypeAliases = {
@@ -411,9 +251,9 @@ interface TsTypeAliasesAndZodText {
411
251
  mainZodText: string;
412
252
  }
413
253
  declare function jzodToTsTypeAliasesAndZodText(element: JzodElement, typeName?: string): TsTypeAliasesAndZodText;
414
- declare function jzodToTsCode(jzodElement: JzodElement, exportPrefix?: boolean, typeName?: string): string;
254
+ declare function jzodToTsCode(jzodElement: JzodElement, exportPrefix?: boolean, typeName?: string, typeSchema?: boolean): string;
415
255
 
416
256
  declare function printTsTypeAlias(typeAlias: ts.TypeAliasDeclaration, exportPrefix?: boolean): string;
417
257
  declare function printTsTypeAliases(typeAliases: TsTypeAliases, exportPrefix?: boolean): string;
418
258
 
419
- export { JzodArray, JzodAttribute, JzodAttributeDateValidations, JzodAttributeDateWithValidations, JzodAttributeNumberValidations, JzodAttributeNumberWithValidations, JzodAttributeStringValidations, JzodAttributeStringWithValidations, JzodElement, JzodEnum, JzodEnumElementTypes, JzodEnumTypes, JzodFunction, JzodIntersection, JzodLazy, JzodLiteral, JzodMap, JzodObject, JzodPromise, JzodRecord, JzodReference, JzodSet, JzodTuple, TsTypeAliasesAndZodText as JzodTypeAliasesAndZodText, JzodUnion, TsTypeAliases, jzodArray, jzodAttribute, jzodAttributeDateValidations, jzodAttributeDateWithValidations, jzodAttributeNumberValidations, jzodAttributeNumberWithValidations, jzodAttributeStringValidations, jzodAttributeStringWithValidations, jzodElement, jzodEnum, jzodEnumAttributeTypes, jzodEnumElementTypes, jzodFunction, jzodIntersection, jzodLazy, jzodLiteral, jzodMapSchema, jzodObject, jzodPromise, jzodRecord, jzodReference, jzodSet, jzodToTsCode, jzodToTsTypeAliasesAndZodText, jzodTuple, jzodUnion, printTsTypeAlias, printTsTypeAliases };
259
+ export { JzodArray, JzodAttribute, JzodAttributeDateValidations, JzodAttributeDateWithValidations, JzodAttributeNumberValidations, JzodAttributeNumberWithValidations, JzodAttributeStringValidations, JzodAttributeStringWithValidations, JzodElement, JzodEnum, JzodEnumAttributeTypes, JzodEnumElementTypes, JzodFunction, JzodIntersection, JzodLazy, JzodLiteral, JzodMap, JzodObject, JzodPromise, JzodRecord, JzodReference, JzodSet, JzodTuple, TsTypeAliasesAndZodText as JzodTypeAliasesAndZodText, JzodUnion, TsTypeAliases, jzodArray, jzodAttribute, jzodAttributeDateValidations, jzodAttributeDateWithValidations, jzodAttributeNumberValidations, jzodAttributeNumberWithValidations, jzodAttributeStringValidations, jzodAttributeStringWithValidations, jzodElement, jzodEnum, jzodEnumAttributeTypes, jzodEnumElementTypes, jzodFunction, jzodIntersection, jzodLazy, jzodLiteral, jzodMap, jzodObject, jzodPromise, jzodRecord, jzodReference, jzodSet, jzodToTsCode, jzodToTsTypeAliasesAndZodText, jzodTuple, jzodUnion, printTsTypeAlias, printTsTypeAliases };