@kubb/plugin-zod 4.7.4 → 4.8.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.
@@ -106,11 +106,29 @@ function Operations({ name, operations }) {
106
106
 
107
107
  //#endregion
108
108
  //#region src/parser.ts
109
+ /**
110
+ * Helper to build string/array length constraint checks for Zod Mini mode
111
+ */
112
+ function buildLengthChecks(min, max) {
113
+ const checks = [];
114
+ if (min !== void 0) checks.push(`z.minLength(${min})`);
115
+ if (max !== void 0) checks.push(`z.maxLength(${max})`);
116
+ return checks;
117
+ }
109
118
  const zodKeywordMapper = {
110
119
  any: () => "z.any()",
111
120
  unknown: () => "z.unknown()",
112
121
  void: () => "z.void()",
113
- number: (coercion, min, max, exclusiveMinimum, exclusiveMaximum) => {
122
+ number: (coercion, min, max, exclusiveMinimum, exclusiveMaximum, mini) => {
123
+ if (mini) {
124
+ const checks = [];
125
+ if (min !== void 0) checks.push(`z.minimum(${min})`);
126
+ if (max !== void 0) checks.push(`z.maximum(${max})`);
127
+ if (exclusiveMinimum !== void 0) checks.push(`z.minimum(${exclusiveMinimum}, { exclusive: true })`);
128
+ if (exclusiveMaximum !== void 0) checks.push(`z.maximum(${exclusiveMaximum}, { exclusive: true })`);
129
+ if (checks.length > 0) return `z.number().check(${checks.join(", ")})`;
130
+ return "z.number()";
131
+ }
114
132
  return [
115
133
  coercion ? "z.coerce.number()" : "z.number()",
116
134
  min !== void 0 ? `.min(${min})` : void 0,
@@ -119,7 +137,16 @@ const zodKeywordMapper = {
119
137
  exclusiveMaximum !== void 0 ? `.lt(${exclusiveMaximum})` : void 0
120
138
  ].filter(Boolean).join("");
121
139
  },
122
- integer: (coercion, min, max, version = "3", exclusiveMinimum, exclusiveMaximum) => {
140
+ integer: (coercion, min, max, version = "3", exclusiveMinimum, exclusiveMaximum, mini) => {
141
+ if (mini) {
142
+ const checks = [];
143
+ if (min !== void 0) checks.push(`z.minimum(${min})`);
144
+ if (max !== void 0) checks.push(`z.maximum(${max})`);
145
+ if (exclusiveMinimum !== void 0) checks.push(`z.minimum(${exclusiveMinimum}, { exclusive: true })`);
146
+ if (exclusiveMaximum !== void 0) checks.push(`z.maximum(${exclusiveMaximum}, { exclusive: true })`);
147
+ if (checks.length > 0) return `z.int().check(${checks.join(", ")})`;
148
+ return "z.int()";
149
+ }
123
150
  return [
124
151
  coercion ? "z.coerce.number().int()" : version === "4" ? "z.int()" : "z.number().int()",
125
152
  min !== void 0 ? `.min(${min})` : void 0,
@@ -147,7 +174,12 @@ const zodKeywordMapper = {
147
174
  ${value}
148
175
  })`;
149
176
  },
150
- string: (coercion, min, max) => {
177
+ string: (coercion, min, max, mini) => {
178
+ if (mini) {
179
+ const checks = buildLengthChecks(min, max);
180
+ if (checks.length > 0) return `z.string().check(${checks.join(", ")})`;
181
+ return "z.string()";
182
+ }
151
183
  return [
152
184
  coercion ? "z.coerce.string()" : "z.string()",
153
185
  min !== void 0 ? `.min(${min})` : void 0,
@@ -165,7 +197,13 @@ const zodKeywordMapper = {
165
197
  if (value) return `z.nullish(${value})`;
166
198
  return ".nullish()";
167
199
  },
168
- array: (items = [], min, max, unique) => {
200
+ array: (items = [], min, max, unique, mini) => {
201
+ if (mini) {
202
+ const checks = buildLengthChecks(min, max);
203
+ if (unique) checks.push(`z.refine(items => new Set(items).size === items.length, { message: "Array entries must be unique" })`);
204
+ if (checks.length > 0) return `z.array(${items?.join("")}).check(${checks.join(", ")})`;
205
+ return `z.array(${items?.join("")})`;
206
+ }
169
207
  return [
170
208
  `z.array(${items?.join("")})`,
171
209
  min !== void 0 ? `.min(${min})` : void 0,
@@ -177,7 +215,8 @@ const zodKeywordMapper = {
177
215
  enum: (items = []) => `z.enum([${items?.join(", ")}])`,
178
216
  union: (items = []) => `z.union([${items?.join(", ")}])`,
179
217
  const: (value) => `z.literal(${value ?? ""})`,
180
- datetime: (offset = false, local = false, version = "3") => {
218
+ datetime: (offset = false, local = false, version = "3", mini) => {
219
+ if (mini) return "z.string()";
181
220
  if (offset) return version === "4" ? `z.iso.datetime({ offset: ${offset} })` : `z.string().datetime({ offset: ${offset} })`;
182
221
  if (local) return version === "4" ? `z.iso.datetime({ local: ${local} })` : `z.string().datetime({ local: ${local} })`;
183
222
  return "z.string().datetime()";
@@ -192,34 +231,57 @@ const zodKeywordMapper = {
192
231
  if (coercion) return "z.coerce.date()";
193
232
  return "z.date()";
194
233
  },
195
- uuid: (coercion, version = "3", min, max) => {
234
+ uuid: (coercion, version = "3", min, max, mini) => {
235
+ if (mini) {
236
+ const checks = buildLengthChecks(min, max);
237
+ if (checks.length > 0) return `z.uuid().check(${checks.join(", ")})`;
238
+ return "z.uuid()";
239
+ }
196
240
  return [
197
241
  coercion ? version === "4" ? "z.uuid()" : "z.coerce.string().uuid()" : version === "4" ? "z.uuid()" : "z.string().uuid()",
198
242
  min !== void 0 ? `.min(${min})` : void 0,
199
243
  max !== void 0 ? `.max(${max})` : void 0
200
244
  ].filter(Boolean).join("");
201
245
  },
202
- url: (coercion, version = "3", min, max) => {
246
+ url: (coercion, version = "3", min, max, mini) => {
247
+ if (mini) {
248
+ const checks = buildLengthChecks(min, max);
249
+ if (checks.length > 0) return `z.url().check(${checks.join(", ")})`;
250
+ return "z.url()";
251
+ }
203
252
  return [
204
253
  coercion ? version === "4" ? "z.url()" : "z.coerce.string().url()" : version === "4" ? "z.url()" : "z.string().url()",
205
254
  min !== void 0 ? `.min(${min})` : void 0,
206
255
  max !== void 0 ? `.max(${max})` : void 0
207
256
  ].filter(Boolean).join("");
208
257
  },
209
- default: (value) => {
258
+ default: (value, innerSchema, mini) => {
259
+ if (mini && innerSchema) return `z._default(${innerSchema}, ${typeof value === "object" ? "{}" : value ?? ""})`;
210
260
  if (typeof value === "object") return ".default({})";
211
261
  return `.default(${value ?? ""})`;
212
262
  },
213
263
  and: (items = []) => items?.map((item) => `.and(${item})`).join(""),
214
- describe: (value = "") => `.describe(${value})`,
264
+ describe: (value = "", innerSchema, mini) => {
265
+ if (mini) return;
266
+ if (innerSchema) return `z.describe(${innerSchema}, ${value})`;
267
+ return `.describe(${value})`;
268
+ },
215
269
  max: void 0,
216
270
  min: void 0,
217
271
  optional: (value) => {
218
272
  if (value) return `z.optional(${value})`;
219
273
  return ".optional()";
220
274
  },
221
- matches: (value = "", coercion) => coercion ? `z.coerce.string().regex(${value})` : `z.string().regex(${value})`,
222
- email: (coercion, version = "3", min, max) => {
275
+ matches: (value = "", coercion, mini) => {
276
+ if (mini) return `z.string().check(z.regex(${value}))`;
277
+ return coercion ? `z.coerce.string().regex(${value})` : `z.string().regex(${value})`;
278
+ },
279
+ email: (coercion, version = "3", min, max, mini) => {
280
+ if (mini) {
281
+ const checks = buildLengthChecks(min, max);
282
+ if (checks.length > 0) return `z.email().check(${checks.join(", ")})`;
283
+ return "z.email()";
284
+ }
223
285
  return [
224
286
  coercion ? version === "4" ? "z.email()" : "z.coerce.string().email()" : version === "4" ? "z.email()" : "z.string().email()",
225
287
  min !== void 0 ? `.min(${min})` : void 0,
@@ -240,7 +302,10 @@ const zodKeywordMapper = {
240
302
  deprecated: void 0,
241
303
  example: void 0,
242
304
  schema: void 0,
243
- catchall: (value) => value ? `.catchall(${value})` : void 0,
305
+ catchall: (value, mini) => {
306
+ if (mini) return;
307
+ return value ? `.catchall(${value})` : void 0;
308
+ },
244
309
  name: void 0,
245
310
  exclusiveMinimum: void 0,
246
311
  exclusiveMaximum: void 0
@@ -277,6 +342,55 @@ function sort(items) {
277
342
  if (!items) return [];
278
343
  return __kubb_core_transformers.default.orderBy(items, [(v) => order.indexOf(v.keyword)], ["asc"]);
279
344
  }
345
+ /**
346
+ * Keywords that represent modifiers for mini mode
347
+ * These are separated from the base schema and wrapped around it
348
+ * Note: describe is included to filter it out, but won't be wrapped (Zod Mini doesn't support describe)
349
+ */
350
+ const miniModifierKeywords = [
351
+ __kubb_plugin_oas.schemaKeywords.optional,
352
+ __kubb_plugin_oas.schemaKeywords.nullable,
353
+ __kubb_plugin_oas.schemaKeywords.nullish,
354
+ __kubb_plugin_oas.schemaKeywords.default,
355
+ __kubb_plugin_oas.schemaKeywords.describe
356
+ ];
357
+ /**
358
+ * Extracts mini mode modifiers from a schemas array
359
+ * This can be reused by other parsers (e.g., valibot) that need similar functionality
360
+ * Note: describe is not included as Zod Mini doesn't support it
361
+ */
362
+ function extractMiniModifiers(schemas) {
363
+ const defaultSchema = schemas.find((item) => (0, __kubb_plugin_oas.isKeyword)(item, __kubb_plugin_oas.schemaKeywords.default));
364
+ return {
365
+ hasOptional: schemas.some((item) => (0, __kubb_plugin_oas.isKeyword)(item, __kubb_plugin_oas.schemaKeywords.optional)),
366
+ hasNullable: schemas.some((item) => (0, __kubb_plugin_oas.isKeyword)(item, __kubb_plugin_oas.schemaKeywords.nullable)),
367
+ hasNullish: schemas.some((item) => (0, __kubb_plugin_oas.isKeyword)(item, __kubb_plugin_oas.schemaKeywords.nullish)),
368
+ defaultValue: defaultSchema?.args
369
+ };
370
+ }
371
+ /**
372
+ * Filters out modifier keywords from schemas for mini mode base schema parsing
373
+ * This can be reused by other parsers (e.g., valibot) that need similar functionality
374
+ */
375
+ function filterMiniModifiers(schemas) {
376
+ return schemas.filter((item) => !miniModifierKeywords.some((keyword) => (0, __kubb_plugin_oas.isKeyword)(item, keyword)));
377
+ }
378
+ /**
379
+ * Wraps an output string with Zod Mini functional modifiers
380
+ * Order: default (innermost) -> nullable -> optional (outermost)
381
+ * OR: default -> nullish
382
+ * Note: describe is not supported in Zod Mini and is skipped
383
+ */
384
+ function wrapWithMiniModifiers(output, modifiers) {
385
+ let result = output;
386
+ if (modifiers.defaultValue !== void 0) result = zodKeywordMapper.default(modifiers.defaultValue, result, true);
387
+ if (modifiers.hasNullish) result = zodKeywordMapper.nullish(result);
388
+ else {
389
+ if (modifiers.hasNullable) result = zodKeywordMapper.nullable(result);
390
+ if (modifiers.hasOptional) result = zodKeywordMapper.optional(result);
391
+ }
392
+ return result;
393
+ }
280
394
  const shouldCoerce = (coercion, type) => {
281
395
  if (coercion === void 0) return false;
282
396
  if (typeof coercion === "boolean") return coercion;
@@ -325,7 +439,7 @@ function parse({ schema, parent, current, name, siblings }, options) {
325
439
  current: it,
326
440
  siblings: siblings$1
327
441
  }, options);
328
- }).filter(Boolean), current.args.min, current.args.max, current.args.unique);
442
+ }).filter(Boolean), current.args.min, current.args.max, current.args.unique, options.mini);
329
443
  if ((0, __kubb_plugin_oas.isKeyword)(current, __kubb_plugin_oas.schemaKeywords.enum)) {
330
444
  if (current.args.asConst) {
331
445
  if (current.args.items.length === 1) {
@@ -396,6 +510,20 @@ function parse({ schema, parent, current, name, siblings }, options) {
396
510
  schema: schema?.properties?.[propertyName]
397
511
  }) || baseSchemaOutput : baseSchemaOutput;
398
512
  if (options.version === "4" && hasRef$1) {
513
+ if (options.mini) {
514
+ if (isNullish) return `get "${propertyName}"(){
515
+ return ${zodKeywordMapper.nullish(objectValue)}
516
+ }`;
517
+ if (isOptional) return `get "${propertyName}"(){
518
+ return ${zodKeywordMapper.optional(objectValue)}
519
+ }`;
520
+ if (isNullable) return `get "${propertyName}"(){
521
+ return ${zodKeywordMapper.nullable(objectValue)}
522
+ }`;
523
+ return `get "${propertyName}"(){
524
+ return ${objectValue}
525
+ }`;
526
+ }
399
527
  if (isNullish) return `get "${propertyName}"(){
400
528
  return ${objectValue}${zodKeywordMapper.nullish()}
401
529
  }`;
@@ -421,7 +549,7 @@ function parse({ schema, parent, current, name, siblings }, options) {
421
549
  current: it,
422
550
  siblings: siblings$1
423
551
  }, options)).filter(Boolean).join("") : void 0;
424
- return [zodKeywordMapper.object(properties, current.args?.strict, options.version), additionalProperties ? zodKeywordMapper.catchall(additionalProperties) : void 0].filter(Boolean).join("");
552
+ return [zodKeywordMapper.object(properties, current.args?.strict, options.version), additionalProperties ? zodKeywordMapper.catchall(additionalProperties, options.mini) : void 0].filter(Boolean).join("");
425
553
  }
426
554
  if ((0, __kubb_plugin_oas.isKeyword)(current, __kubb_plugin_oas.schemaKeywords.tuple)) return zodKeywordMapper.tuple(current.args.items.map((it, _index, siblings$1) => parse({
427
555
  schema,
@@ -436,45 +564,50 @@ function parse({ schema, parent, current, name, siblings }, options) {
436
564
  return zodKeywordMapper.const(__kubb_core_transformers.default.stringify(current.args.value));
437
565
  }
438
566
  if ((0, __kubb_plugin_oas.isKeyword)(current, __kubb_plugin_oas.schemaKeywords.matches)) {
439
- if (current.args) return zodKeywordMapper.matches(__kubb_core_transformers.default.toRegExpString(current.args, null), shouldCoerce(options.coercion, "strings"));
567
+ if (current.args) return zodKeywordMapper.matches(__kubb_core_transformers.default.toRegExpString(current.args, null), shouldCoerce(options.coercion, "strings"), options.mini);
440
568
  }
441
569
  if ((0, __kubb_plugin_oas.isKeyword)(current, __kubb_plugin_oas.schemaKeywords.default)) {
570
+ if (options.mini) return;
442
571
  if (current.args) return zodKeywordMapper.default(current.args);
443
572
  }
444
573
  if ((0, __kubb_plugin_oas.isKeyword)(current, __kubb_plugin_oas.schemaKeywords.describe)) {
445
- if (current.args) return zodKeywordMapper.describe(__kubb_core_transformers.default.stringify(current.args.toString()));
574
+ if (current.args) return zodKeywordMapper.describe(__kubb_core_transformers.default.stringify(current.args.toString()), void 0, options.mini);
446
575
  }
447
576
  if ((0, __kubb_plugin_oas.isKeyword)(current, __kubb_plugin_oas.schemaKeywords.string)) {
448
577
  const minSchema = __kubb_plugin_oas.SchemaGenerator.find(siblings, __kubb_plugin_oas.schemaKeywords.min);
449
578
  const maxSchema = __kubb_plugin_oas.SchemaGenerator.find(siblings, __kubb_plugin_oas.schemaKeywords.max);
450
- return zodKeywordMapper.string(shouldCoerce(options.coercion, "strings"), minSchema?.args, maxSchema?.args);
579
+ return zodKeywordMapper.string(shouldCoerce(options.coercion, "strings"), minSchema?.args, maxSchema?.args, options.mini);
580
+ }
581
+ if ((0, __kubb_plugin_oas.isKeyword)(current, __kubb_plugin_oas.schemaKeywords.uuid)) {
582
+ const minSchema = __kubb_plugin_oas.SchemaGenerator.find(siblings, __kubb_plugin_oas.schemaKeywords.min);
583
+ const maxSchema = __kubb_plugin_oas.SchemaGenerator.find(siblings, __kubb_plugin_oas.schemaKeywords.max);
584
+ return zodKeywordMapper.uuid(shouldCoerce(options.coercion, "strings"), options.version, minSchema?.args, maxSchema?.args, options.mini);
451
585
  }
452
- if ((0, __kubb_plugin_oas.isKeyword)(current, __kubb_plugin_oas.schemaKeywords.uuid)) return zodKeywordMapper.uuid(shouldCoerce(options.coercion, "strings"), options.version);
453
586
  if ((0, __kubb_plugin_oas.isKeyword)(current, __kubb_plugin_oas.schemaKeywords.email)) {
454
587
  const minSchema = __kubb_plugin_oas.SchemaGenerator.find(siblings, __kubb_plugin_oas.schemaKeywords.min);
455
588
  const maxSchema = __kubb_plugin_oas.SchemaGenerator.find(siblings, __kubb_plugin_oas.schemaKeywords.max);
456
- return zodKeywordMapper.email(shouldCoerce(options.coercion, "strings"), options.version, minSchema?.args, maxSchema?.args);
589
+ return zodKeywordMapper.email(shouldCoerce(options.coercion, "strings"), options.version, minSchema?.args, maxSchema?.args, options.mini);
457
590
  }
458
591
  if ((0, __kubb_plugin_oas.isKeyword)(current, __kubb_plugin_oas.schemaKeywords.url)) {
459
592
  const minSchema = __kubb_plugin_oas.SchemaGenerator.find(siblings, __kubb_plugin_oas.schemaKeywords.min);
460
593
  const maxSchema = __kubb_plugin_oas.SchemaGenerator.find(siblings, __kubb_plugin_oas.schemaKeywords.max);
461
- return zodKeywordMapper.url(shouldCoerce(options.coercion, "strings"), options.version, minSchema?.args, maxSchema?.args);
594
+ return zodKeywordMapper.url(shouldCoerce(options.coercion, "strings"), options.version, minSchema?.args, maxSchema?.args, options.mini);
462
595
  }
463
596
  if ((0, __kubb_plugin_oas.isKeyword)(current, __kubb_plugin_oas.schemaKeywords.number)) {
464
597
  const minSchema = __kubb_plugin_oas.SchemaGenerator.find(siblings, __kubb_plugin_oas.schemaKeywords.min);
465
598
  const maxSchema = __kubb_plugin_oas.SchemaGenerator.find(siblings, __kubb_plugin_oas.schemaKeywords.max);
466
599
  const exclusiveMinimumSchema = __kubb_plugin_oas.SchemaGenerator.find(siblings, __kubb_plugin_oas.schemaKeywords.exclusiveMinimum);
467
600
  const exclusiveMaximumSchema = __kubb_plugin_oas.SchemaGenerator.find(siblings, __kubb_plugin_oas.schemaKeywords.exclusiveMaximum);
468
- return zodKeywordMapper.number(shouldCoerce(options.coercion, "numbers"), minSchema?.args, maxSchema?.args, exclusiveMinimumSchema?.args, exclusiveMaximumSchema?.args);
601
+ return zodKeywordMapper.number(shouldCoerce(options.coercion, "numbers"), minSchema?.args, maxSchema?.args, exclusiveMinimumSchema?.args, exclusiveMaximumSchema?.args, options.mini);
469
602
  }
470
603
  if ((0, __kubb_plugin_oas.isKeyword)(current, __kubb_plugin_oas.schemaKeywords.integer)) {
471
604
  const minSchema = __kubb_plugin_oas.SchemaGenerator.find(siblings, __kubb_plugin_oas.schemaKeywords.min);
472
605
  const maxSchema = __kubb_plugin_oas.SchemaGenerator.find(siblings, __kubb_plugin_oas.schemaKeywords.max);
473
606
  const exclusiveMinimumSchema = __kubb_plugin_oas.SchemaGenerator.find(siblings, __kubb_plugin_oas.schemaKeywords.exclusiveMinimum);
474
607
  const exclusiveMaximumSchema = __kubb_plugin_oas.SchemaGenerator.find(siblings, __kubb_plugin_oas.schemaKeywords.exclusiveMaximum);
475
- return zodKeywordMapper.integer(shouldCoerce(options.coercion, "numbers"), minSchema?.args, maxSchema?.args, options.version, exclusiveMinimumSchema?.args, exclusiveMaximumSchema?.args);
608
+ return zodKeywordMapper.integer(shouldCoerce(options.coercion, "numbers"), minSchema?.args, maxSchema?.args, options.version, exclusiveMinimumSchema?.args, exclusiveMaximumSchema?.args, options.mini);
476
609
  }
477
- if ((0, __kubb_plugin_oas.isKeyword)(current, __kubb_plugin_oas.schemaKeywords.datetime)) return zodKeywordMapper.datetime(current.args.offset, current.args.local, options.version);
610
+ if ((0, __kubb_plugin_oas.isKeyword)(current, __kubb_plugin_oas.schemaKeywords.datetime)) return zodKeywordMapper.datetime(current.args.offset, current.args.local, options.version, options.mini);
478
611
  if ((0, __kubb_plugin_oas.isKeyword)(current, __kubb_plugin_oas.schemaKeywords.date)) return zodKeywordMapper.date(current.args.type, shouldCoerce(options.coercion, "dates"), options.version);
479
612
  if ((0, __kubb_plugin_oas.isKeyword)(current, __kubb_plugin_oas.schemaKeywords.time)) return zodKeywordMapper.time(current.args.type, shouldCoerce(options.coercion, "dates"), options.version);
480
613
  if (current.keyword in zodKeywordMapper && "args" in current) {
@@ -486,14 +619,15 @@ function parse({ schema, parent, current, name, siblings }, options) {
486
619
 
487
620
  //#endregion
488
621
  //#region src/components/Zod.tsx
489
- function Zod({ name, typeName, tree, schema, inferTypeName, mapper, coercion, keysToOmit, description, wrapOutput, version, emptySchemaType }) {
622
+ function Zod({ name, typeName, tree, schema, inferTypeName, mapper, coercion, keysToOmit, description, wrapOutput, version, emptySchemaType, mini = false }) {
490
623
  const hasTuple = !!__kubb_plugin_oas.SchemaGenerator.find(tree, __kubb_plugin_oas.schemaKeywords.tuple);
491
624
  const schemas = sort(tree).filter((item) => {
492
625
  if (hasTuple && ((0, __kubb_plugin_oas.isKeyword)(item, __kubb_plugin_oas.schemaKeywords.min) || (0, __kubb_plugin_oas.isKeyword)(item, __kubb_plugin_oas.schemaKeywords.max))) return false;
493
626
  return true;
494
627
  });
495
- const output = schemas.map((schema$1, index) => {
496
- const siblings = schemas.filter((_, i) => i !== index);
628
+ const baseSchemas = mini ? filterMiniModifiers(schemas) : schemas;
629
+ const output = baseSchemas.map((schema$1, index) => {
630
+ const siblings = baseSchemas.filter((_, i) => i !== index);
497
631
  return parse({
498
632
  schema: schema$1,
499
633
  parent: void 0,
@@ -504,17 +638,20 @@ function Zod({ name, typeName, tree, schema, inferTypeName, mapper, coercion, ke
504
638
  mapper,
505
639
  coercion,
506
640
  wrapOutput,
507
- version
641
+ version,
642
+ mini
508
643
  });
509
644
  }).filter(Boolean).join("");
510
645
  let suffix = "";
511
646
  const firstSchema = schemas.at(0);
512
647
  const lastSchema = schemas.at(-1);
513
- if (lastSchema && (0, __kubb_plugin_oas.isKeyword)(lastSchema, __kubb_plugin_oas.schemaKeywords.nullable)) if (firstSchema && (0, __kubb_plugin_oas.isKeyword)(firstSchema, __kubb_plugin_oas.schemaKeywords.ref)) if (version === "3") suffix = ".unwrap().schema.unwrap()";
648
+ if (!mini && lastSchema && (0, __kubb_plugin_oas.isKeyword)(lastSchema, __kubb_plugin_oas.schemaKeywords.nullable)) if (firstSchema && (0, __kubb_plugin_oas.isKeyword)(firstSchema, __kubb_plugin_oas.schemaKeywords.ref)) if (version === "3") suffix = ".unwrap().schema.unwrap()";
514
649
  else suffix = ".unwrap().unwrap()";
515
650
  else suffix = ".unwrap()";
516
- else if (firstSchema && (0, __kubb_plugin_oas.isKeyword)(firstSchema, __kubb_plugin_oas.schemaKeywords.ref)) if (version === "3") suffix = ".schema";
517
- else suffix = ".unwrap()";
651
+ else if (!mini) {
652
+ if (firstSchema && (0, __kubb_plugin_oas.isKeyword)(firstSchema, __kubb_plugin_oas.schemaKeywords.ref)) if (version === "3") suffix = ".schema";
653
+ else suffix = ".unwrap()";
654
+ }
518
655
  const emptyValue = parse({
519
656
  schema,
520
657
  parent: void 0,
@@ -524,9 +661,11 @@ function Zod({ name, typeName, tree, schema, inferTypeName, mapper, coercion, ke
524
661
  mapper,
525
662
  coercion,
526
663
  wrapOutput,
527
- version
664
+ version,
665
+ mini
528
666
  });
529
- const baseSchemaOutput = [output, keysToOmit?.length ? `${suffix}.omit({ ${keysToOmit.map((key) => `'${key}': true`).join(",")} })` : void 0].filter(Boolean).join("") || emptyValue || "";
667
+ let baseSchemaOutput = [output, keysToOmit?.length ? `${suffix}.omit({ ${keysToOmit.map((key) => `'${key}': true`).join(",")} })` : void 0].filter(Boolean).join("") || emptyValue || "";
668
+ if (mini) baseSchemaOutput = wrapWithMiniModifiers(baseSchemaOutput, extractMiniModifiers(schemas));
530
669
  const wrappedSchemaOutput = wrapOutput ? wrapOutput({
531
670
  output: baseSchemaOutput,
532
671
  schema
@@ -578,4 +717,4 @@ Object.defineProperty(exports, '__toESM', {
578
717
  return __toESM;
579
718
  }
580
719
  });
581
- //# sourceMappingURL=components-CVRd05if.cjs.map
720
+ //# sourceMappingURL=components-5OPJsyIm.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"components-5OPJsyIm.cjs","names":["File","Type","Const","transformers","checks: string[]","order: string[]","schemaKeywords","transformers","schema","hasRef","SchemaGenerator","value","SchemaGenerator","schemaKeywords","parserZod.sort","parserZod.filterMiniModifiers","parserZod.parse","schema","parserZod.wrapWithMiniModifiers","parserZod.extractMiniModifiers","File","Const","transformers","Type"],"sources":["../src/components/Operations.tsx","../src/parser.ts","../src/components/Zod.tsx"],"sourcesContent":["import transformers from '@kubb/core/transformers'\nimport type { HttpMethod, Operation } from '@kubb/oas'\nimport type { SchemaNames } from '@kubb/plugin-oas/hooks'\nimport { Const, File, Type } from '@kubb/react-fabric'\nimport type { KubbNode } from '@kubb/react-fabric/types'\n\ntype Props = {\n name: string\n operations: Array<{ operation: Operation; data: SchemaNames }>\n}\n\nexport function Operations({ name, operations }: Props): KubbNode {\n const operationsJSON = operations.reduce(\n (prev, acc) => {\n prev[`\"${acc.operation.getOperationId()}\"`] = acc.data\n\n return prev\n },\n {} as Record<string, unknown>,\n )\n\n const pathsJSON = operations.reduce(\n (prev, acc) => {\n prev[`\"${acc.operation.path}\"`] = {\n ...(prev[`\"${acc.operation.path}\"`] || ({} as Record<HttpMethod, string>)),\n [acc.operation.method]: `operations[\"${acc.operation.getOperationId()}\"]`,\n }\n\n return prev\n },\n {} as Record<string, Record<HttpMethod, string>>,\n )\n\n return (\n <>\n <File.Source name=\"OperationSchema\" isExportable isIndexable>\n <Type name=\"OperationSchema\" export>{`{\n readonly request: z.ZodTypeAny | undefined;\n readonly parameters: {\n readonly path: z.ZodTypeAny | undefined;\n readonly query: z.ZodTypeAny | undefined;\n readonly header: z.ZodTypeAny | undefined;\n };\n readonly responses: {\n readonly [status: number]: z.ZodTypeAny;\n readonly default: z.ZodTypeAny;\n };\n readonly errors: {\n readonly [status: number]: z.ZodTypeAny;\n };\n}`}</Type>\n </File.Source>\n <File.Source name=\"OperationsMap\" isExportable isIndexable>\n <Type name=\"OperationsMap\" export>\n {'Record<string, OperationSchema>'}\n </Type>\n </File.Source>\n <File.Source name={name} isExportable isIndexable>\n <Const export name={name} asConst>\n {`{${transformers.stringifyObject(operationsJSON)}}`}\n </Const>\n </File.Source>\n <File.Source name={'paths'} isExportable isIndexable>\n <Const export name={'paths'} asConst>\n {`{${transformers.stringifyObject(pathsJSON)}}`}\n </Const>\n </File.Source>\n </>\n )\n}\n","import transformers from '@kubb/core/transformers'\n\nimport type { Schema, SchemaKeywordBase, SchemaMapper } from '@kubb/plugin-oas'\nimport { isKeyword, SchemaGenerator, type SchemaKeywordMapper, type SchemaTree, schemaKeywords } from '@kubb/plugin-oas'\n\n//TODO add zodKeywordMapper as function that returns 3 versions: v3, v4 and v4 mini, this can also be used to have the custom mapping(see object type)\n// also include shouldCoerce\n\n/**\n * Helper to build string/array length constraint checks for Zod Mini mode\n */\nfunction buildLengthChecks(min?: number, max?: number): string[] {\n const checks: string[] = []\n if (min !== undefined) checks.push(`z.minLength(${min})`)\n if (max !== undefined) checks.push(`z.maxLength(${max})`)\n return checks\n}\n\nconst zodKeywordMapper = {\n any: () => 'z.any()',\n unknown: () => 'z.unknown()',\n void: () => 'z.void()',\n number: (coercion?: boolean, min?: number, max?: number, exclusiveMinimum?: number, exclusiveMaximum?: number, mini?: boolean) => {\n if (mini) {\n const checks: string[] = []\n if (min !== undefined) checks.push(`z.minimum(${min})`)\n if (max !== undefined) checks.push(`z.maximum(${max})`)\n if (exclusiveMinimum !== undefined) checks.push(`z.minimum(${exclusiveMinimum}, { exclusive: true })`)\n if (exclusiveMaximum !== undefined) checks.push(`z.maximum(${exclusiveMaximum}, { exclusive: true })`)\n if (checks.length > 0) {\n return `z.number().check(${checks.join(', ')})`\n }\n return 'z.number()'\n }\n return [\n coercion ? 'z.coerce.number()' : 'z.number()',\n min !== undefined ? `.min(${min})` : undefined,\n max !== undefined ? `.max(${max})` : undefined,\n exclusiveMinimum !== undefined ? `.gt(${exclusiveMinimum})` : undefined,\n exclusiveMaximum !== undefined ? `.lt(${exclusiveMaximum})` : undefined,\n ]\n .filter(Boolean)\n .join('')\n },\n integer: (coercion?: boolean, min?: number, max?: number, version: '3' | '4' = '3', exclusiveMinimum?: number, exclusiveMaximum?: number, mini?: boolean) => {\n if (mini) {\n const checks: string[] = []\n if (min !== undefined) checks.push(`z.minimum(${min})`)\n if (max !== undefined) checks.push(`z.maximum(${max})`)\n if (exclusiveMinimum !== undefined) checks.push(`z.minimum(${exclusiveMinimum}, { exclusive: true })`)\n if (exclusiveMaximum !== undefined) checks.push(`z.maximum(${exclusiveMaximum}, { exclusive: true })`)\n if (checks.length > 0) {\n return `z.int().check(${checks.join(', ')})`\n }\n return 'z.int()'\n }\n return [\n coercion ? 'z.coerce.number().int()' : version === '4' ? 'z.int()' : 'z.number().int()',\n min !== undefined ? `.min(${min})` : undefined,\n max !== undefined ? `.max(${max})` : undefined,\n exclusiveMinimum !== undefined ? `.gt(${exclusiveMinimum})` : undefined,\n exclusiveMaximum !== undefined ? `.lt(${exclusiveMaximum})` : undefined,\n ]\n .filter(Boolean)\n .join('')\n },\n interface: (value?: string, strict?: boolean) => {\n if (strict) {\n return `z.strictInterface({\n ${value}\n })`\n }\n return `z.interface({\n ${value}\n })`\n },\n object: (value?: string, strict?: boolean, version: '3' | '4' = '3') => {\n if (version === '4' && strict) {\n return `z.strictObject({\n ${value}\n })`\n }\n\n if (strict) {\n return `z.object({\n ${value}\n }).strict()`\n }\n\n return `z.object({\n ${value}\n })`\n },\n string: (coercion?: boolean, min?: number, max?: number, mini?: boolean) => {\n if (mini) {\n const checks = buildLengthChecks(min, max)\n if (checks.length > 0) {\n return `z.string().check(${checks.join(', ')})`\n }\n return 'z.string()'\n }\n return [coercion ? 'z.coerce.string()' : 'z.string()', min !== undefined ? `.min(${min})` : undefined, max !== undefined ? `.max(${max})` : undefined]\n .filter(Boolean)\n .join('')\n },\n //support for discriminatedUnion\n boolean: () => 'z.boolean()',\n undefined: () => 'z.undefined()',\n nullable: (value?: string) => {\n if (value) {\n return `z.nullable(${value})`\n }\n return '.nullable()'\n },\n null: () => 'z.null()',\n nullish: (value?: string) => {\n if (value) {\n return `z.nullish(${value})`\n }\n return '.nullish()'\n },\n array: (items: string[] = [], min?: number, max?: number, unique?: boolean, mini?: boolean) => {\n if (mini) {\n const checks = buildLengthChecks(min, max)\n if (unique) checks.push(`z.refine(items => new Set(items).size === items.length, { message: \"Array entries must be unique\" })`)\n if (checks.length > 0) {\n return `z.array(${items?.join('')}).check(${checks.join(', ')})`\n }\n return `z.array(${items?.join('')})`\n }\n return [\n `z.array(${items?.join('')})`,\n min !== undefined ? `.min(${min})` : undefined,\n max !== undefined ? `.max(${max})` : undefined,\n unique ? `.refine(items => new Set(items).size === items.length, { message: \"Array entries must be unique\" })` : undefined,\n ]\n .filter(Boolean)\n .join('')\n },\n tuple: (items: string[] = []) => `z.tuple([${items?.join(', ')}])`,\n enum: (items: string[] = []) => `z.enum([${items?.join(', ')}])`,\n union: (items: string[] = []) => `z.union([${items?.join(', ')}])`,\n const: (value?: string | number | boolean) => `z.literal(${value ?? ''})`,\n /**\n * ISO 8601\n */\n datetime: (offset = false, local = false, version: '3' | '4' = '3', mini?: boolean) => {\n // Zod Mini doesn't support .datetime() method, use plain string\n if (mini) {\n return 'z.string()'\n }\n\n if (offset) {\n return version === '4' ? `z.iso.datetime({ offset: ${offset} })` : `z.string().datetime({ offset: ${offset} })`\n }\n\n if (local) {\n return version === '4' ? `z.iso.datetime({ local: ${local} })` : `z.string().datetime({ local: ${local} })`\n }\n\n return 'z.string().datetime()'\n },\n /**\n * Type `'date'` Date\n * Type `'string'` ISO date format (YYYY-MM-DD)\n * @default ISO date format (YYYY-MM-DD)\n */\n date: (type: 'date' | 'string' = 'string', coercion?: boolean, version: '3' | '4' = '3') => {\n if (type === 'string') {\n return version === '4' ? 'z.iso.date()' : 'z.string().date()'\n }\n\n if (coercion) {\n return 'z.coerce.date()'\n }\n\n return 'z.date()'\n },\n /**\n * Type `'date'` Date\n * Type `'string'` ISO time format (HH:mm:ss[.SSSSSS])\n * @default ISO time format (HH:mm:ss[.SSSSSS])\n */\n time: (type: 'date' | 'string' = 'string', coercion?: boolean, version: '3' | '4' = '3') => {\n if (type === 'string') {\n return version === '4' ? 'z.iso.time()' : 'z.string().time()'\n }\n\n if (coercion) {\n return 'z.coerce.date()'\n }\n\n return 'z.date()'\n },\n uuid: (coercion?: boolean, version: '3' | '4' = '3', min?: number, max?: number, mini?: boolean) => {\n if (mini) {\n const checks = buildLengthChecks(min, max)\n if (checks.length > 0) {\n return `z.uuid().check(${checks.join(', ')})`\n }\n return 'z.uuid()'\n }\n return [\n coercion ? (version === '4' ? 'z.uuid()' : 'z.coerce.string().uuid()') : version === '4' ? 'z.uuid()' : 'z.string().uuid()',\n min !== undefined ? `.min(${min})` : undefined,\n max !== undefined ? `.max(${max})` : undefined,\n ]\n .filter(Boolean)\n .join('')\n },\n url: (coercion?: boolean, version: '3' | '4' = '3', min?: number, max?: number, mini?: boolean) => {\n if (mini) {\n const checks = buildLengthChecks(min, max)\n if (checks.length > 0) {\n return `z.url().check(${checks.join(', ')})`\n }\n return 'z.url()'\n }\n return [\n coercion ? (version === '4' ? 'z.url()' : 'z.coerce.string().url()') : version === '4' ? 'z.url()' : 'z.string().url()',\n min !== undefined ? `.min(${min})` : undefined,\n max !== undefined ? `.max(${max})` : undefined,\n ]\n .filter(Boolean)\n .join('')\n },\n default: (value?: string | number | true | object, innerSchema?: string, mini?: boolean) => {\n if (mini && innerSchema) {\n const defaultValue = typeof value === 'object' ? '{}' : (value ?? '')\n return `z._default(${innerSchema}, ${defaultValue})`\n }\n if (typeof value === 'object') {\n return '.default({})'\n }\n return `.default(${value ?? ''})`\n },\n and: (items: string[] = []) => items?.map((item) => `.and(${item})`).join(''),\n describe: (value = '', innerSchema?: string, mini?: boolean) => {\n if (mini) {\n return undefined\n }\n\n if (innerSchema) {\n return `z.describe(${innerSchema}, ${value})`\n }\n return `.describe(${value})`\n },\n max: undefined,\n min: undefined,\n optional: (value?: string) => {\n if (value) {\n return `z.optional(${value})`\n }\n return '.optional()'\n },\n matches: (value = '', coercion?: boolean, mini?: boolean) => {\n if (mini) {\n return `z.string().check(z.regex(${value}))`\n }\n return coercion ? `z.coerce.string().regex(${value})` : `z.string().regex(${value})`\n },\n email: (coercion?: boolean, version: '3' | '4' = '3', min?: number, max?: number, mini?: boolean) => {\n if (mini) {\n const checks = buildLengthChecks(min, max)\n if (checks.length > 0) {\n return `z.email().check(${checks.join(', ')})`\n }\n return 'z.email()'\n }\n return [\n coercion ? (version === '4' ? 'z.email()' : 'z.coerce.string().email()') : version === '4' ? 'z.email()' : 'z.string().email()',\n min !== undefined ? `.min(${min})` : undefined,\n max !== undefined ? `.max(${max})` : undefined,\n ]\n .filter(Boolean)\n .join('')\n },\n firstName: undefined,\n lastName: undefined,\n password: undefined,\n phone: undefined,\n readOnly: undefined,\n writeOnly: undefined,\n ref: (value?: string) => {\n if (!value) {\n return undefined\n }\n\n return `z.lazy(() => ${value})`\n },\n blob: () => 'z.instanceof(File)',\n deprecated: undefined,\n example: undefined,\n schema: undefined,\n catchall: (value?: string, mini?: boolean) => {\n // Zod Mini doesn't support .catchall() method\n if (mini) {\n return undefined\n }\n return value ? `.catchall(${value})` : undefined\n },\n name: undefined,\n exclusiveMinimum: undefined,\n exclusiveMaximum: undefined,\n} satisfies SchemaMapper<string | null | undefined>\n\n/**\n * @link based on https://github.com/cellular/oazapfts/blob/7ba226ebb15374e8483cc53e7532f1663179a22c/src/codegen/generate.ts#L398\n */\n\nexport function sort(items?: Schema[]): Schema[] {\n const order: string[] = [\n schemaKeywords.string,\n schemaKeywords.datetime,\n schemaKeywords.date,\n schemaKeywords.time,\n schemaKeywords.tuple,\n schemaKeywords.number,\n schemaKeywords.object,\n schemaKeywords.enum,\n schemaKeywords.url,\n schemaKeywords.email,\n schemaKeywords.firstName,\n schemaKeywords.lastName,\n schemaKeywords.password,\n schemaKeywords.matches,\n schemaKeywords.uuid,\n schemaKeywords.null,\n schemaKeywords.min,\n schemaKeywords.max,\n schemaKeywords.default,\n schemaKeywords.describe,\n schemaKeywords.optional,\n schemaKeywords.nullable,\n schemaKeywords.nullish,\n ]\n\n if (!items) {\n return []\n }\n\n return transformers.orderBy(items, [(v) => order.indexOf(v.keyword)], ['asc'])\n}\n\ntype MiniModifiers = {\n hasOptional?: boolean\n hasNullable?: boolean\n hasNullish?: boolean\n defaultValue?: string | number | true | object\n}\n\n/**\n * Keywords that represent modifiers for mini mode\n * These are separated from the base schema and wrapped around it\n * Note: describe is included to filter it out, but won't be wrapped (Zod Mini doesn't support describe)\n */\nexport const miniModifierKeywords = [schemaKeywords.optional, schemaKeywords.nullable, schemaKeywords.nullish, schemaKeywords.default, schemaKeywords.describe]\n\n/**\n * Extracts mini mode modifiers from a schemas array\n * This can be reused by other parsers (e.g., valibot) that need similar functionality\n * Note: describe is not included as Zod Mini doesn't support it\n */\nexport function extractMiniModifiers(schemas: Schema[]): MiniModifiers {\n const defaultSchema = schemas.find((item) => isKeyword(item, schemaKeywords.default)) as { keyword: string; args: unknown } | undefined\n\n return {\n hasOptional: schemas.some((item) => isKeyword(item, schemaKeywords.optional)),\n hasNullable: schemas.some((item) => isKeyword(item, schemaKeywords.nullable)),\n hasNullish: schemas.some((item) => isKeyword(item, schemaKeywords.nullish)),\n defaultValue: defaultSchema?.args as string | number | true | object | undefined,\n }\n}\n\n/**\n * Filters out modifier keywords from schemas for mini mode base schema parsing\n * This can be reused by other parsers (e.g., valibot) that need similar functionality\n */\nexport function filterMiniModifiers(schemas: Schema[]): Schema[] {\n return schemas.filter((item) => !miniModifierKeywords.some((keyword) => isKeyword(item, keyword)))\n}\n\n/**\n * Wraps an output string with Zod Mini functional modifiers\n * Order: default (innermost) -> nullable -> optional (outermost)\n * OR: default -> nullish\n * Note: describe is not supported in Zod Mini and is skipped\n */\nexport function wrapWithMiniModifiers(output: string, modifiers: MiniModifiers): string {\n let result = output\n\n // Apply default first (innermost wrapper)\n if (modifiers.defaultValue !== undefined) {\n result = zodKeywordMapper.default(modifiers.defaultValue, result, true)!\n }\n\n // Apply nullish, nullable, or optional (outer wrappers for optionality)\n if (modifiers.hasNullish) {\n result = zodKeywordMapper.nullish(result)!\n } else {\n if (modifiers.hasNullable) {\n result = zodKeywordMapper.nullable(result)!\n }\n if (modifiers.hasOptional) {\n result = zodKeywordMapper.optional(result)!\n }\n }\n\n return result\n}\n\nconst shouldCoerce = (coercion: ParserOptions['coercion'] | undefined, type: 'dates' | 'strings' | 'numbers'): boolean => {\n if (coercion === undefined) {\n return false\n }\n if (typeof coercion === 'boolean') {\n return coercion\n }\n\n return !!coercion[type]\n}\n\ntype ParserOptions = {\n mapper?: Record<string, string>\n coercion?: boolean | { dates?: boolean; strings?: boolean; numbers?: boolean }\n wrapOutput?: (opts: { output: string; schema: any }) => string | undefined\n version: '3' | '4'\n skipLazyForRefs?: boolean\n mini?: boolean\n}\n\nexport function parse({ schema, parent, current, name, siblings }: SchemaTree, options: ParserOptions): string | undefined {\n const value = zodKeywordMapper[current.keyword as keyof typeof zodKeywordMapper]\n\n // Early exit: if siblings contain both matches and ref → skip matches entirely\n const hasMatches = siblings.some((it) => isKeyword(it, schemaKeywords.matches))\n const hasRef = siblings.some((it) => isKeyword(it, schemaKeywords.ref))\n\n if (hasMatches && hasRef && isKeyword(current, schemaKeywords.matches)) {\n return undefined // strip matches\n }\n\n if (!value) {\n return undefined\n }\n\n if (isKeyword(current, schemaKeywords.union)) {\n // zod union type needs at least 2 items\n if (Array.isArray(current.args) && current.args.length === 1) {\n return parse({ schema, parent, name, current: current.args[0] as Schema, siblings }, options)\n }\n if (Array.isArray(current.args) && !current.args.length) {\n return ''\n }\n\n return zodKeywordMapper.union(\n sort(current.args)\n .map((it, _index, siblings) => parse({ schema, parent: current, name, current: it, siblings }, options))\n .filter(Boolean),\n )\n }\n\n if (isKeyword(current, schemaKeywords.and)) {\n const items = sort(current.args)\n .filter((schema: Schema) => {\n return ![schemaKeywords.optional, schemaKeywords.describe].includes(schema.keyword as typeof schemaKeywords.describe)\n })\n .map((it: Schema, _index, siblings) => parse({ schema, parent: current, name, current: it, siblings }, options))\n .filter(Boolean)\n\n return `${items.slice(0, 1)}${zodKeywordMapper.and(items.slice(1))}`\n }\n\n if (isKeyword(current, schemaKeywords.array)) {\n return zodKeywordMapper.array(\n sort(current.args.items)\n .map((it, _index, siblings) => {\n return parse({ schema, parent: current, name, current: it, siblings }, options)\n })\n .filter(Boolean),\n current.args.min,\n current.args.max,\n current.args.unique,\n options.mini,\n )\n }\n\n if (isKeyword(current, schemaKeywords.enum)) {\n if (current.args.asConst) {\n if (current.args.items.length === 1) {\n const child = {\n keyword: schemaKeywords.const,\n args: current.args.items[0],\n }\n return parse({ schema, parent: current, name, current: child, siblings: [child] }, options)\n }\n\n return zodKeywordMapper.union(\n current.args.items\n .map((schema) => ({\n keyword: schemaKeywords.const,\n args: schema,\n }))\n .map((it, _index, siblings) => {\n return parse({ schema, parent: current, name, current: it, siblings }, options)\n })\n .filter(Boolean),\n )\n }\n\n return zodKeywordMapper.enum(\n current.args.items.map((schema) => {\n if (schema.format === 'boolean') {\n return transformers.stringify(schema.value)\n }\n\n if (schema.format === 'number') {\n return transformers.stringify(schema.value)\n }\n return transformers.stringify(schema.value)\n }),\n )\n }\n\n if (isKeyword(current, schemaKeywords.ref)) {\n // Skip z.lazy wrapper if skipLazyForRefs is true (e.g., inside v4 getters)\n if (options.skipLazyForRefs) {\n return current.args?.name\n }\n return zodKeywordMapper.ref(current.args?.name)\n }\n\n if (isKeyword(current, schemaKeywords.object)) {\n const propertyEntries = Object.entries(current.args?.properties || {}).filter((item) => {\n const schema = item[1]\n return schema && typeof schema.map === 'function'\n })\n\n const properties = propertyEntries\n .map(([propertyName, schemas]) => {\n const nameSchema = schemas.find((it) => it.keyword === schemaKeywords.name) as SchemaKeywordMapper['name']\n const isNullable = schemas.some((it) => isKeyword(it, schemaKeywords.nullable))\n const isNullish = schemas.some((it) => isKeyword(it, schemaKeywords.nullish))\n const isOptional = schemas.some((it) => isKeyword(it, schemaKeywords.optional))\n const hasRef = !!SchemaGenerator.find(schemas, schemaKeywords.ref)\n\n const mappedName = nameSchema?.args || propertyName\n\n // custom mapper(pluginOptions)\n if (options.mapper?.[mappedName]) {\n return `\"${propertyName}\": ${options.mapper?.[mappedName]}`\n }\n\n const baseSchemaOutput = sort(schemas)\n .filter((schema) => {\n return !isKeyword(schema, schemaKeywords.optional) && !isKeyword(schema, schemaKeywords.nullable) && !isKeyword(schema, schemaKeywords.nullish)\n })\n .map((it) => {\n // For v4 with refs, skip z.lazy wrapper since the getter provides lazy evaluation\n const skipLazyForRefs = options.version === '4' && hasRef\n return parse({ schema, parent: current, name, current: it, siblings: schemas }, { ...options, skipLazyForRefs })\n })\n .filter(Boolean)\n .join('')\n\n const objectValue = options.wrapOutput\n ? options.wrapOutput({ output: baseSchemaOutput, schema: schema?.properties?.[propertyName] }) || baseSchemaOutput\n : baseSchemaOutput\n\n if (options.version === '4' && hasRef) {\n // In mini mode, use functional wrappers instead of chainable methods\n if (options.mini) {\n // both optional and nullable\n if (isNullish) {\n return `get \"${propertyName}\"(){\n return ${zodKeywordMapper.nullish(objectValue)}\n }`\n }\n\n // undefined\n if (isOptional) {\n return `get \"${propertyName}\"(){\n return ${zodKeywordMapper.optional(objectValue)}\n }`\n }\n\n // null\n if (isNullable) {\n return `get \"${propertyName}\"(){\n return ${zodKeywordMapper.nullable(objectValue)}\n }`\n }\n\n return `get \"${propertyName}\"(){\n return ${objectValue}\n }`\n }\n\n // Non-mini mode uses chainable methods\n // both optional and nullable\n if (isNullish) {\n return `get \"${propertyName}\"(){\n return ${objectValue}${zodKeywordMapper.nullish()}\n }`\n }\n\n // undefined\n if (isOptional) {\n return `get \"${propertyName}\"(){\n return ${objectValue}${zodKeywordMapper.optional()}\n }`\n }\n\n // null\n if (isNullable) {\n return `get \"${propertyName}\"(){\n return ${objectValue}${zodKeywordMapper.nullable()}\n }`\n }\n\n return `get \"${propertyName}\"(){\n return ${objectValue}\n }`\n }\n\n // both optional and nullable\n if (isNullish) {\n return `\"${propertyName}\": ${objectValue}${zodKeywordMapper.nullish()}`\n }\n\n // undefined\n if (isOptional) {\n return `\"${propertyName}\": ${zodKeywordMapper.optional(objectValue)}`\n }\n\n // null\n if (isNullable) {\n return `\"${propertyName}\": ${zodKeywordMapper.nullable(objectValue)}`\n }\n\n return `\"${propertyName}\": ${objectValue}`\n })\n .join(',\\n')\n\n const additionalProperties = current.args?.additionalProperties?.length\n ? current.args.additionalProperties\n .map((it, _index, siblings) => parse({ schema, parent: current, name, current: it, siblings }, options))\n .filter(Boolean)\n .join('')\n : undefined\n\n const text = [\n zodKeywordMapper.object(properties, current.args?.strict, options.version),\n additionalProperties ? zodKeywordMapper.catchall(additionalProperties, options.mini) : undefined,\n ].filter(Boolean)\n\n return text.join('')\n }\n\n if (isKeyword(current, schemaKeywords.tuple)) {\n return zodKeywordMapper.tuple(\n current.args.items.map((it, _index, siblings) => parse({ schema, parent: current, name, current: it, siblings }, options)).filter(Boolean),\n )\n }\n\n if (isKeyword(current, schemaKeywords.const)) {\n if (current.args.format === 'number' && current.args.value !== undefined) {\n return zodKeywordMapper.const(Number(current.args.value))\n }\n\n if (current.args.format === 'boolean' && current.args.value !== undefined) {\n return zodKeywordMapper.const(current.args.value)\n }\n return zodKeywordMapper.const(transformers.stringify(current.args.value))\n }\n\n if (isKeyword(current, schemaKeywords.matches)) {\n if (current.args) {\n return zodKeywordMapper.matches(transformers.toRegExpString(current.args, null), shouldCoerce(options.coercion, 'strings'), options.mini)\n }\n }\n\n if (isKeyword(current, schemaKeywords.default)) {\n // In mini mode, default is handled by wrapWithMiniModifiers\n if (options.mini) {\n return undefined\n }\n if (current.args) {\n return zodKeywordMapper.default(current.args)\n }\n }\n\n if (isKeyword(current, schemaKeywords.describe)) {\n if (current.args) {\n return zodKeywordMapper.describe(transformers.stringify(current.args.toString()), undefined, options.mini)\n }\n }\n\n if (isKeyword(current, schemaKeywords.string)) {\n const minSchema = SchemaGenerator.find(siblings, schemaKeywords.min)\n const maxSchema = SchemaGenerator.find(siblings, schemaKeywords.max)\n\n return zodKeywordMapper.string(shouldCoerce(options.coercion, 'strings'), minSchema?.args, maxSchema?.args, options.mini)\n }\n\n if (isKeyword(current, schemaKeywords.uuid)) {\n const minSchema = SchemaGenerator.find(siblings, schemaKeywords.min)\n const maxSchema = SchemaGenerator.find(siblings, schemaKeywords.max)\n\n return zodKeywordMapper.uuid(shouldCoerce(options.coercion, 'strings'), options.version, minSchema?.args, maxSchema?.args, options.mini)\n }\n\n if (isKeyword(current, schemaKeywords.email)) {\n const minSchema = SchemaGenerator.find(siblings, schemaKeywords.min)\n const maxSchema = SchemaGenerator.find(siblings, schemaKeywords.max)\n\n return zodKeywordMapper.email(shouldCoerce(options.coercion, 'strings'), options.version, minSchema?.args, maxSchema?.args, options.mini)\n }\n\n if (isKeyword(current, schemaKeywords.url)) {\n const minSchema = SchemaGenerator.find(siblings, schemaKeywords.min)\n const maxSchema = SchemaGenerator.find(siblings, schemaKeywords.max)\n\n return zodKeywordMapper.url(shouldCoerce(options.coercion, 'strings'), options.version, minSchema?.args, maxSchema?.args, options.mini)\n }\n\n if (isKeyword(current, schemaKeywords.number)) {\n const minSchema = SchemaGenerator.find(siblings, schemaKeywords.min)\n const maxSchema = SchemaGenerator.find(siblings, schemaKeywords.max)\n\n const exclusiveMinimumSchema = SchemaGenerator.find(siblings, schemaKeywords.exclusiveMinimum)\n const exclusiveMaximumSchema = SchemaGenerator.find(siblings, schemaKeywords.exclusiveMaximum)\n return zodKeywordMapper.number(\n shouldCoerce(options.coercion, 'numbers'),\n minSchema?.args,\n maxSchema?.args,\n exclusiveMinimumSchema?.args,\n exclusiveMaximumSchema?.args,\n options.mini,\n )\n }\n\n if (isKeyword(current, schemaKeywords.integer)) {\n const minSchema = SchemaGenerator.find(siblings, schemaKeywords.min)\n const maxSchema = SchemaGenerator.find(siblings, schemaKeywords.max)\n\n const exclusiveMinimumSchema = SchemaGenerator.find(siblings, schemaKeywords.exclusiveMinimum)\n const exclusiveMaximumSchema = SchemaGenerator.find(siblings, schemaKeywords.exclusiveMaximum)\n return zodKeywordMapper.integer(\n shouldCoerce(options.coercion, 'numbers'),\n minSchema?.args,\n maxSchema?.args,\n options.version,\n exclusiveMinimumSchema?.args,\n exclusiveMaximumSchema?.args,\n options.mini,\n )\n }\n\n if (isKeyword(current, schemaKeywords.datetime)) {\n return zodKeywordMapper.datetime(current.args.offset, current.args.local, options.version, options.mini)\n }\n\n if (isKeyword(current, schemaKeywords.date)) {\n return zodKeywordMapper.date(current.args.type, shouldCoerce(options.coercion, 'dates'), options.version)\n }\n\n if (isKeyword(current, schemaKeywords.time)) {\n return zodKeywordMapper.time(current.args.type, shouldCoerce(options.coercion, 'dates'), options.version)\n }\n\n if (current.keyword in zodKeywordMapper && 'args' in current) {\n const value = zodKeywordMapper[current.keyword as keyof typeof zodKeywordMapper] as (typeof zodKeywordMapper)['const']\n\n return value((current as SchemaKeywordBase<unknown>).args as any)\n }\n\n if (current.keyword in zodKeywordMapper) {\n return value()\n }\n\n return undefined\n}\n","import transformers from '@kubb/core/transformers'\nimport type { SchemaObject } from '@kubb/oas'\nimport { isKeyword, type Schema, SchemaGenerator, schemaKeywords } from '@kubb/plugin-oas'\nimport { Const, File, Type } from '@kubb/react-fabric'\nimport type { KubbNode } from '@kubb/react-fabric/types'\nimport * as parserZod from '../parser.ts'\nimport type { PluginZod } from '../types.ts'\n\ntype Props = {\n name: string\n typeName?: string\n inferTypeName?: string\n tree: Array<Schema>\n schema: SchemaObject\n description?: string\n coercion: PluginZod['resolvedOptions']['coercion']\n mapper: PluginZod['resolvedOptions']['mapper']\n keysToOmit?: string[]\n wrapOutput?: PluginZod['resolvedOptions']['wrapOutput']\n version: '3' | '4'\n emptySchemaType: PluginZod['resolvedOptions']['emptySchemaType']\n mini?: boolean\n}\n\nexport function Zod({\n name,\n typeName,\n tree,\n schema,\n inferTypeName,\n mapper,\n coercion,\n keysToOmit,\n description,\n wrapOutput,\n version,\n emptySchemaType,\n mini = false,\n}: Props): KubbNode {\n const hasTuple = !!SchemaGenerator.find(tree, schemaKeywords.tuple)\n\n const schemas = parserZod.sort(tree).filter((item) => {\n if (hasTuple && (isKeyword(item, schemaKeywords.min) || isKeyword(item, schemaKeywords.max))) {\n return false\n }\n\n return true\n })\n\n // In mini mode, filter out modifiers from the main schema parsing\n const baseSchemas = mini ? parserZod.filterMiniModifiers(schemas) : schemas\n\n const output = baseSchemas\n .map((schema, index) => {\n const siblings = baseSchemas.filter((_, i) => i !== index)\n\n return parserZod.parse({ schema, parent: undefined, current: schema, siblings, name }, { mapper, coercion, wrapOutput, version, mini })\n })\n .filter(Boolean)\n .join('')\n\n let suffix = ''\n const firstSchema = schemas.at(0)\n const lastSchema = schemas.at(-1)\n\n if (!mini && lastSchema && isKeyword(lastSchema, schemaKeywords.nullable)) {\n if (firstSchema && isKeyword(firstSchema, schemaKeywords.ref)) {\n if (version === '3') {\n suffix = '.unwrap().schema.unwrap()'\n } else {\n suffix = '.unwrap().unwrap()'\n }\n } else {\n suffix = '.unwrap()'\n }\n } else if (!mini) {\n if (firstSchema && isKeyword(firstSchema, schemaKeywords.ref)) {\n if (version === '3') {\n suffix = '.schema'\n } else {\n suffix = '.unwrap()'\n }\n }\n }\n\n const emptyValue = parserZod.parse(\n {\n schema,\n parent: undefined,\n current: {\n keyword: schemaKeywords[emptySchemaType],\n },\n siblings: [],\n },\n { mapper, coercion, wrapOutput, version, mini },\n )\n\n let baseSchemaOutput =\n [output, keysToOmit?.length ? `${suffix}.omit({ ${keysToOmit.map((key) => `'${key}': true`).join(',')} })` : undefined].filter(Boolean).join('') ||\n emptyValue ||\n ''\n\n // For mini mode, wrap the output with modifiers using the parser function\n if (mini) {\n baseSchemaOutput = parserZod.wrapWithMiniModifiers(baseSchemaOutput, parserZod.extractMiniModifiers(schemas))\n }\n\n const wrappedSchemaOutput = wrapOutput ? wrapOutput({ output: baseSchemaOutput, schema }) || baseSchemaOutput : baseSchemaOutput\n const finalOutput = typeName ? `${wrappedSchemaOutput} as unknown as ${version === '4' ? 'z.ZodType' : 'ToZod'}<${typeName}>` : wrappedSchemaOutput\n\n return (\n <>\n <File.Source name={name} isExportable isIndexable>\n <Const\n export\n name={name}\n JSDoc={{\n comments: [description ? `@description ${transformers.jsStringEscape(description)}` : undefined].filter(Boolean),\n }}\n >\n {finalOutput}\n </Const>\n </File.Source>\n {inferTypeName && (\n <File.Source name={inferTypeName} isExportable isIndexable isTypeOnly>\n {typeName && (\n <Type export name={inferTypeName}>\n {typeName}\n </Type>\n )}\n {!typeName && (\n <Type export name={inferTypeName}>\n {`z.infer<typeof ${name}>`}\n </Type>\n )}\n </File.Source>\n )}\n </>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,SAAgB,WAAW,EAAE,MAAM,cAA+B;CAChE,MAAM,iBAAiB,WAAW,QAC/B,MAAM,QAAQ;AACb,OAAK,IAAI,IAAI,UAAU,gBAAgB,CAAC,MAAM,IAAI;AAElD,SAAO;IAET,EAAE,CACH;CAED,MAAM,YAAY,WAAW,QAC1B,MAAM,QAAQ;AACb,OAAK,IAAI,IAAI,UAAU,KAAK,MAAM;GAChC,GAAI,KAAK,IAAI,IAAI,UAAU,KAAK,OAAQ,EAAE;IACzC,IAAI,UAAU,SAAS,eAAe,IAAI,UAAU,gBAAgB,CAAC;GACvE;AAED,SAAO;IAET,EAAE,CACH;AAED,QACE;EACE,yDAACA,yBAAK;GAAO,MAAK;GAAkB;GAAa;aAC/C,yDAACC;IAAK,MAAK;IAAkB;cAAQ;;;;;;;;;;;;;;;KAcnC;IACU;EACd,yDAACD,yBAAK;GAAO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