zod-nest 3.7.0 → 3.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.
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkJ2MGUXBB_js = require('./chunk-J2MGUXBB.js');
3
+ var chunkUIQQTAXT_js = require('./chunk-UIQQTAXT.js');
4
4
  var chunkEV5I5HGT_js = require('./chunk-EV5I5HGT.js');
5
5
  var common = require('@nestjs/common');
6
6
  var zod = require('zod');
@@ -39,7 +39,7 @@ var buildSiblingClass = /* @__PURE__ */ chunkEV5I5HGT_js.__name((parent, schema)
39
39
  }
40
40
  static schema = schema;
41
41
  static io = "output";
42
- static [chunkJ2MGUXBB_js.ZOD_DTO_SYMBOL] = true;
42
+ static [chunkUIQQTAXT_js.ZOD_DTO_SYMBOL] = true;
43
43
  static get id() {
44
44
  return parent.id;
45
45
  }
@@ -54,7 +54,7 @@ var buildSiblingClass = /* @__PURE__ */ chunkEV5I5HGT_js.__name((parent, schema)
54
54
  }
55
55
  static _OPENAPI_METADATA_FACTORY() {
56
56
  return {
57
- [chunkJ2MGUXBB_js.ZOD_NEST_DTO_EXTENSION]: makeZodDtoMarker(parent.id, "output")
57
+ [chunkUIQQTAXT_js.ZOD_NEST_DTO_EXTENSION]: makeZodDtoMarker(parent.id, "output")
58
58
  };
59
59
  }
60
60
  };
@@ -92,14 +92,14 @@ var resolveFallbackId = /* @__PURE__ */ chunkEV5I5HGT_js.__name((className) => {
92
92
  return fallback;
93
93
  }, "resolveFallbackId");
94
94
  var createZodDto = /* @__PURE__ */ chunkEV5I5HGT_js.__name((schema, options) => {
95
- const registry = options?.registry ?? chunkJ2MGUXBB_js.defaultRegistry;
95
+ const registry = options?.registry ?? chunkUIQQTAXT_js.defaultRegistry;
96
96
  const io = "input";
97
97
  let cachedId;
98
98
  const ensureRegistered = /* @__PURE__ */ chunkEV5I5HGT_js.__name((className) => {
99
99
  if (cachedId !== void 0) {
100
100
  return cachedId;
101
101
  }
102
- const named = chunkJ2MGUXBB_js.registerSchema(schema, registry, {
102
+ const named = chunkUIQQTAXT_js.registerSchema(schema, registry, {
103
103
  id: options?.id,
104
104
  expose: options?.expose
105
105
  });
@@ -119,7 +119,7 @@ var createZodDto = /* @__PURE__ */ chunkEV5I5HGT_js.__name((schema, options) =>
119
119
  }
120
120
  static schema = schema;
121
121
  static io = io;
122
- static [chunkJ2MGUXBB_js.ZOD_DTO_SYMBOL] = true;
122
+ static [chunkUIQQTAXT_js.ZOD_DTO_SYMBOL] = true;
123
123
  static get id() {
124
124
  return ensureRegistered(this.name);
125
125
  }
@@ -134,7 +134,7 @@ var createZodDto = /* @__PURE__ */ chunkEV5I5HGT_js.__name((schema, options) =>
134
134
  }
135
135
  static _OPENAPI_METADATA_FACTORY() {
136
136
  return {
137
- [chunkJ2MGUXBB_js.ZOD_NEST_DTO_EXTENSION]: makeZodDtoMarker(ensureRegistered(this.name), io)
137
+ [chunkUIQQTAXT_js.ZOD_NEST_DTO_EXTENSION]: makeZodDtoMarker(ensureRegistered(this.name), io)
138
138
  };
139
139
  }
140
140
  };
@@ -147,12 +147,12 @@ var ZodSerializationException = class extends common.InternalServerErrorExceptio
147
147
  zodError;
148
148
  executionContext;
149
149
  constructor(zodError, executionContext) {
150
- super({
150
+ const body = {
151
151
  statusCode: common.HttpStatus.INTERNAL_SERVER_ERROR,
152
152
  message: "Response validation failed"
153
- }, {
154
- cause: zodError
155
- });
153
+ };
154
+ super(body, chunkUIQQTAXT_js.errorCodeOptions(zodError, chunkUIQQTAXT_js.ZodNestErrorCode.SerializationFailed));
155
+ chunkUIQQTAXT_js.mirrorErrorCodeOntoBody(this, body);
156
156
  this.zodError = zodError;
157
157
  this.executionContext = executionContext;
158
158
  }
@@ -445,7 +445,7 @@ function _ts_param(paramIndex, decorator) {
445
445
  chunkEV5I5HGT_js.__name(_ts_param, "_ts_param");
446
446
  var isZodSchema2 = /* @__PURE__ */ chunkEV5I5HGT_js.__name((value) => value !== null && typeof value === "object" && "_zod" in value, "isZodSchema");
447
447
  var isOptionsObject = /* @__PURE__ */ chunkEV5I5HGT_js.__name((value) => value !== null && typeof value === "object" && !isZodSchema2(value), "isOptionsObject");
448
- var defaultExceptionFactory = /* @__PURE__ */ chunkEV5I5HGT_js.__name((zodError, argMetadata) => new chunkJ2MGUXBB_js.ZodValidationException(zodError, argMetadata), "defaultExceptionFactory");
448
+ var defaultExceptionFactory = /* @__PURE__ */ chunkEV5I5HGT_js.__name((zodError, argMetadata) => new chunkUIQQTAXT_js.ZodValidationException(zodError, argMetadata), "defaultExceptionFactory");
449
449
  exports.ZodValidationPipe = class _ZodValidationPipe {
450
450
  static {
451
451
  chunkEV5I5HGT_js.__name(this, "ZodValidationPipe");
@@ -483,7 +483,7 @@ exports.ZodValidationPipe = class _ZodValidationPipe {
483
483
  return this.explicitSchema;
484
484
  }
485
485
  const metatype = metadata.metatype;
486
- if (!chunkJ2MGUXBB_js.isZodDto(metatype)) {
486
+ if (!chunkUIQQTAXT_js.isZodDto(metatype)) {
487
487
  return void 0;
488
488
  }
489
489
  return metatype.schema;
@@ -493,7 +493,7 @@ exports.ZodValidationPipe = class _ZodValidationPipe {
493
493
  return this.explicitDtoName;
494
494
  }
495
495
  const metatype = metadata.metatype;
496
- if (chunkJ2MGUXBB_js.isZodDto(metatype)) {
496
+ if (chunkUIQQTAXT_js.isZodDto(metatype)) {
497
497
  return metatype.name;
498
498
  }
499
499
  return "schema";
@@ -506,7 +506,7 @@ exports.ZodValidationPipe = class _ZodValidationPipe {
506
506
  dtoName: void 0
507
507
  };
508
508
  }
509
- if (chunkJ2MGUXBB_js.isZodDto(arg)) {
509
+ if (chunkUIQQTAXT_js.isZodDto(arg)) {
510
510
  return {
511
511
  schema: arg.schema,
512
512
  factory: void 0,
@@ -528,8 +528,8 @@ exports.ZodValidationPipe = class _ZodValidationPipe {
528
528
  };
529
529
  }
530
530
  const optionSchema = arg.schema;
531
- const dtoName = chunkJ2MGUXBB_js.isZodDto(optionSchema) ? optionSchema.name : void 0;
532
- const resolvedSchema = chunkJ2MGUXBB_js.isZodDto(optionSchema) ? optionSchema.schema : optionSchema;
531
+ const dtoName = chunkUIQQTAXT_js.isZodDto(optionSchema) ? optionSchema.name : void 0;
532
+ const resolvedSchema = chunkUIQQTAXT_js.isZodDto(optionSchema) ? optionSchema.schema : optionSchema;
533
533
  return {
534
534
  schema: resolvedSchema,
535
535
  factory: arg.createValidationException,
@@ -585,14 +585,14 @@ var schemaToOutputDto = /* @__PURE__ */ chunkEV5I5HGT_js.__name((schema) => {
585
585
  if (cached !== void 0) {
586
586
  return cached;
587
587
  }
588
- const namedId = chunkJ2MGUXBB_js.registerSchema(schema);
588
+ const namedId = chunkUIQQTAXT_js.registerSchema(schema);
589
589
  if (namedId !== void 0) {
590
590
  const dto2 = createZodDto(schema).Output;
591
591
  responseDtoCache.set(schema, dto2);
592
592
  return dto2;
593
593
  }
594
- const anonId = chunkJ2MGUXBB_js.resolveAnonId(schema, chunkJ2MGUXBB_js.ANON_RESPONSE_PREFIX);
595
- chunkJ2MGUXBB_js.registerSchema(schema, chunkJ2MGUXBB_js.defaultRegistry, {
594
+ const anonId = chunkUIQQTAXT_js.resolveAnonId(schema, chunkUIQQTAXT_js.ANON_RESPONSE_PREFIX);
595
+ chunkUIQQTAXT_js.registerSchema(schema, chunkUIQQTAXT_js.defaultRegistry, {
596
596
  id: anonId,
597
597
  anonymous: true
598
598
  });
@@ -603,10 +603,10 @@ var schemaToOutputDto = /* @__PURE__ */ chunkEV5I5HGT_js.__name((schema) => {
603
603
  return dto;
604
604
  }, "schemaToOutputDto");
605
605
  var toResponseDto = /* @__PURE__ */ chunkEV5I5HGT_js.__name((entry, index) => {
606
- if (chunkJ2MGUXBB_js.isZodDto(entry)) {
606
+ if (chunkUIQQTAXT_js.isZodDto(entry)) {
607
607
  return entry;
608
608
  }
609
- if (chunkJ2MGUXBB_js.isZodSchema(entry)) {
609
+ if (chunkUIQQTAXT_js.isZodSchema(entry)) {
610
610
  return schemaToOutputDto(entry);
611
611
  }
612
612
  const where = index === void 0 ? "@ZodResponse({ type })" : `@ZodResponse({ type }) element [${index}]`;
@@ -652,7 +652,7 @@ var buildTupleSchema = /* @__PURE__ */ chunkEV5I5HGT_js.__name((dtos) => ({
652
652
  var buildContentResponseOptions = /* @__PURE__ */ chunkEV5I5HGT_js.__name((base, contentType, schema, markItemStream) => {
653
653
  const mediaType = markItemStream ? {
654
654
  schema,
655
- [chunkJ2MGUXBB_js.ZOD_NEST_ITEM_STREAM_EXTENSION]: true
655
+ [chunkUIQQTAXT_js.ZOD_NEST_ITEM_STREAM_EXTENSION]: true
656
656
  } : {
657
657
  schema
658
658
  };
@@ -806,15 +806,15 @@ var ZodBody = /* @__PURE__ */ chunkEV5I5HGT_js.__name((schema, options) => {
806
806
  });
807
807
  }, "ZodBody");
808
808
  var resolveBodySchema = /* @__PURE__ */ chunkEV5I5HGT_js.__name((schema, options) => {
809
- const registry = options?.registry ?? chunkJ2MGUXBB_js.defaultRegistry;
809
+ const registry = options?.registry ?? chunkUIQQTAXT_js.defaultRegistry;
810
810
  if (options?.flatten === true) {
811
- const merged = chunkJ2MGUXBB_js.flattenObjectIntersection(schema, registry, "@ZodBody");
812
- return chunkJ2MGUXBB_js.resolveSchemaRef(merged, {
811
+ const merged = chunkUIQQTAXT_js.flattenObjectIntersection(schema, registry, "@ZodBody");
812
+ return chunkUIQQTAXT_js.resolveSchemaRef(merged, {
813
813
  registry,
814
814
  deferAnonInline: true
815
815
  }).ref;
816
816
  }
817
- return chunkJ2MGUXBB_js.resolveSchemaRef(schema, {
817
+ return chunkUIQQTAXT_js.resolveSchemaRef(schema, {
818
818
  id: options?.id,
819
819
  registry,
820
820
  deferAnonInline: true
@@ -849,27 +849,27 @@ var appendQueryMarker = /* @__PURE__ */ chunkEV5I5HGT_js.__name((dtoId, ref) =>
849
849
 
850
850
  // src/decorators/zod-query.decorator.ts
851
851
  var ZodQuery = /* @__PURE__ */ chunkEV5I5HGT_js.__name((schema, options) => {
852
- if (!chunkJ2MGUXBB_js.isZodObject(schema)) {
853
- throw new chunkJ2MGUXBB_js.ZodNestError(`@ZodQuery requires a \`z.object({...})\` schema (got \`${schema._zod.def.type}\`). Each property of the object becomes one OpenAPI parameter. For non-object body shapes (intersections, unions, primitives), use \`@ZodBody\` instead.`);
852
+ if (!chunkUIQQTAXT_js.isZodObject(schema)) {
853
+ throw new chunkUIQQTAXT_js.ZodNestError(`@ZodQuery requires a \`z.object({...})\` schema (got \`${schema._zod.def.type}\`). Each property of the object becomes one OpenAPI parameter. For non-object body shapes (intersections, unions, primitives), use \`@ZodBody\` instead.`);
854
854
  }
855
- const registry = options?.registry ?? chunkJ2MGUXBB_js.defaultRegistry;
856
- const id = chunkJ2MGUXBB_js.registerSchema(schema, registry, {
855
+ const registry = options?.registry ?? chunkUIQQTAXT_js.defaultRegistry;
856
+ const id = chunkUIQQTAXT_js.registerSchema(schema, registry, {
857
857
  id: options?.id
858
858
  });
859
859
  if (id !== void 0) {
860
860
  return appendQueryMarker(id, options?.ref);
861
861
  }
862
862
  if (options?.ref === true) {
863
- throw new chunkJ2MGUXBB_js.ZodNestError(`@ZodQuery({ ref: true }) requires a named schema \u2014 there is no component to \`$ref\`. Name the schema via \`.meta({ id: 'Foo' })\` or pass the \`id\` option, or drop \`ref\` to expand per property.`);
863
+ throw new chunkUIQQTAXT_js.ZodNestError(`@ZodQuery({ ref: true }) requires a named schema \u2014 there is no component to \`$ref\`. Name the schema via \`.meta({ id: 'Foo' })\` or pass the \`id\` option, or drop \`ref\` to expand per property.`);
864
864
  }
865
- const expanded = chunkJ2MGUXBB_js.expandObjectSchema(schema, {
865
+ const expanded = chunkUIQQTAXT_js.expandObjectSchema(schema, {
866
866
  id: options?.id,
867
867
  registry,
868
868
  decoratorName: "@ZodQuery"
869
869
  });
870
870
  return common.applyDecorators(...expanded.map(({ name, required, resolution }) => swagger.ApiQuery({
871
871
  name,
872
- schema: chunkJ2MGUXBB_js.paramSchemaBody(resolution),
872
+ schema: chunkUIQQTAXT_js.paramSchemaBody(resolution),
873
873
  required
874
874
  })));
875
875
  }, "ZodQuery");
@@ -879,7 +879,7 @@ var API_PARAMETERS_KEY = "swagger/apiParameters";
879
879
 
880
880
  // src/decorators/zod-headers.decorator.ts
881
881
  var ZodHeaders = /* @__PURE__ */ chunkEV5I5HGT_js.__name((schema, options) => {
882
- const expanded = chunkJ2MGUXBB_js.expandObjectSchema(schema, {
882
+ const expanded = chunkUIQQTAXT_js.expandObjectSchema(schema, {
883
883
  id: options?.id,
884
884
  registry: options?.registry,
885
885
  decoratorName: "@ZodHeaders"
@@ -888,7 +888,7 @@ var ZodHeaders = /* @__PURE__ */ chunkEV5I5HGT_js.__name((schema, options) => {
888
888
  name,
889
889
  in: "header",
890
890
  required,
891
- schema: chunkJ2MGUXBB_js.paramSchemaBody(resolution)
891
+ schema: chunkUIQQTAXT_js.paramSchemaBody(resolution)
892
892
  }));
893
893
  return (_target, _propertyKey, descriptor) => {
894
894
  const handler = descriptor.value;
@@ -905,7 +905,7 @@ var ZodHeaders = /* @__PURE__ */ chunkEV5I5HGT_js.__name((schema, options) => {
905
905
 
906
906
  // src/decorators/zod-cookies.decorator.ts
907
907
  var ZodCookies = /* @__PURE__ */ chunkEV5I5HGT_js.__name((schema, options) => {
908
- const expanded = chunkJ2MGUXBB_js.expandObjectSchema(schema, {
908
+ const expanded = chunkUIQQTAXT_js.expandObjectSchema(schema, {
909
909
  id: options?.id,
910
910
  registry: options?.registry,
911
911
  decoratorName: "@ZodCookies"
@@ -914,7 +914,7 @@ var ZodCookies = /* @__PURE__ */ chunkEV5I5HGT_js.__name((schema, options) => {
914
914
  name,
915
915
  in: "cookie",
916
916
  required,
917
- schema: chunkJ2MGUXBB_js.paramSchemaBody(resolution)
917
+ schema: chunkUIQQTAXT_js.paramSchemaBody(resolution)
918
918
  }));
919
919
  return (_target, _propertyKey, descriptor) => {
920
920
  const handler = descriptor.value;
@@ -1199,7 +1199,7 @@ var scopeToKnownIds = /* @__PURE__ */ chunkEV5I5HGT_js.__name((zodRegistry, know
1199
1199
  return scoped;
1200
1200
  }, "scopeToKnownIds");
1201
1201
  var runPass = /* @__PURE__ */ chunkEV5I5HGT_js.__name((opts, io, knownIds) => {
1202
- const built = chunkJ2MGUXBB_js.buildToJsonSchemaOptions({
1202
+ const built = chunkUIQQTAXT_js.buildToJsonSchemaOptions({
1203
1203
  registry: opts.registry,
1204
1204
  io,
1205
1205
  override: opts.override,
@@ -1275,7 +1275,7 @@ var readMarker = /* @__PURE__ */ chunkEV5I5HGT_js.__name((schema) => {
1275
1275
  if (!isPlainRecord2(schema.properties)) {
1276
1276
  return void 0;
1277
1277
  }
1278
- const marker = schema.properties[chunkJ2MGUXBB_js.ZOD_NEST_DTO_EXTENSION];
1278
+ const marker = schema.properties[chunkUIQQTAXT_js.ZOD_NEST_DTO_EXTENSION];
1279
1279
  if (!isZodDtoMarker(marker)) {
1280
1280
  return void 0;
1281
1281
  }
@@ -1337,10 +1337,10 @@ var collectRefFromSchema = /* @__PURE__ */ chunkEV5I5HGT_js.__name((schema, clas
1337
1337
  return;
1338
1338
  }
1339
1339
  walkRefs(schema, (ref) => {
1340
- if (!ref.startsWith(chunkJ2MGUXBB_js.COMPONENTS_SCHEMAS_PREFIX)) {
1340
+ if (!ref.startsWith(chunkUIQQTAXT_js.COMPONENTS_SCHEMAS_PREFIX)) {
1341
1341
  return void 0;
1342
1342
  }
1343
- const className = ref.slice(chunkJ2MGUXBB_js.COMPONENTS_SCHEMAS_PREFIX.length);
1343
+ const className = ref.slice(chunkUIQQTAXT_js.COMPONENTS_SCHEMAS_PREFIX.length);
1344
1344
  const renamed = classToDtoId.get(className);
1345
1345
  if (renamed !== void 0) {
1346
1346
  ids.add(renamed);
@@ -1376,7 +1376,7 @@ var collectRefsFromResponses = /* @__PURE__ */ chunkEV5I5HGT_js.__name((response
1376
1376
  }, "collectRefsFromResponses");
1377
1377
 
1378
1378
  // src/document/errors.ts
1379
- var ZodNestDocumentError = class extends chunkJ2MGUXBB_js.ZodNestError {
1379
+ var ZodNestDocumentError = class extends chunkUIQQTAXT_js.ZodNestError {
1380
1380
  static {
1381
1381
  chunkEV5I5HGT_js.__name(this, "ZodNestDocumentError");
1382
1382
  }
@@ -1396,10 +1396,10 @@ var assertNoDanglingRefs = /* @__PURE__ */ chunkEV5I5HGT_js.__name((params) => {
1396
1396
  const schemas = doc.components?.schemas ?? {};
1397
1397
  const dangling = [];
1398
1398
  walkRefs(doc, (ref) => {
1399
- if (!ref.startsWith(chunkJ2MGUXBB_js.COMPONENTS_SCHEMAS_PREFIX)) {
1399
+ if (!ref.startsWith(chunkUIQQTAXT_js.COMPONENTS_SCHEMAS_PREFIX)) {
1400
1400
  return void 0;
1401
1401
  }
1402
- const target = ref.slice(chunkJ2MGUXBB_js.COMPONENTS_SCHEMAS_PREFIX.length);
1402
+ const target = ref.slice(chunkUIQQTAXT_js.COMPONENTS_SCHEMAS_PREFIX.length);
1403
1403
  if (!(target in schemas)) {
1404
1404
  dangling.push(ref);
1405
1405
  }
@@ -1415,7 +1415,7 @@ ${lines.join("\n")}`, {
1415
1415
  });
1416
1416
  }, "assertNoDanglingRefs");
1417
1417
  var hintFor = /* @__PURE__ */ chunkEV5I5HGT_js.__name((ref, collected) => {
1418
- const id = ref.slice(chunkJ2MGUXBB_js.COMPONENTS_SCHEMAS_PREFIX.length);
1418
+ const id = ref.slice(chunkUIQQTAXT_js.COMPONENTS_SCHEMAS_PREFIX.length);
1419
1419
  const usedInput = collected.inputExposedIds.has(id);
1420
1420
  const usedOutput = collected.outputExposedIds.has(id);
1421
1421
  if (usedInput && usedOutput) {
@@ -1443,7 +1443,7 @@ var buildQuerystringParam = /* @__PURE__ */ chunkEV5I5HGT_js.__name((params) =>
1443
1443
  content: {
1444
1444
  [QUERYSTRING_MEDIA_TYPE]: {
1445
1445
  schema: {
1446
- $ref: `${chunkJ2MGUXBB_js.COMPONENTS_SCHEMAS_PREFIX}${dtoId}`
1446
+ $ref: `${chunkUIQQTAXT_js.COMPONENTS_SCHEMAS_PREFIX}${dtoId}`
1447
1447
  }
1448
1448
  }
1449
1449
  }
@@ -1593,7 +1593,7 @@ var buildRefQueryParam = /* @__PURE__ */ chunkEV5I5HGT_js.__name((marker, body)
1593
1593
  style: "form",
1594
1594
  explode: true,
1595
1595
  schema: {
1596
- $ref: `${chunkJ2MGUXBB_js.COMPONENTS_SCHEMAS_PREFIX}${marker.dtoId}`
1596
+ $ref: `${chunkUIQQTAXT_js.COMPONENTS_SCHEMAS_PREFIX}${marker.dtoId}`
1597
1597
  }
1598
1598
  };
1599
1599
  }, "buildRefQueryParam");
@@ -1685,7 +1685,7 @@ var pruneOrphanObjectSchema = /* @__PURE__ */ chunkEV5I5HGT_js.__name((doc) => {
1685
1685
  return;
1686
1686
  }
1687
1687
  let referenced = false;
1688
- const targetRef = `${chunkJ2MGUXBB_js.COMPONENTS_SCHEMAS_PREFIX}Object`;
1688
+ const targetRef = `${chunkUIQQTAXT_js.COMPONENTS_SCHEMAS_PREFIX}Object`;
1689
1689
  walkRefs(doc, (ref) => {
1690
1690
  if (ref === targetRef) {
1691
1691
  referenced = true;
@@ -1715,10 +1715,10 @@ var closeOverRefs = /* @__PURE__ */ chunkEV5I5HGT_js.__name((seed, bodies) => {
1715
1715
  continue;
1716
1716
  }
1717
1717
  walkRefs(body, (ref) => {
1718
- if (!ref.startsWith(chunkJ2MGUXBB_js.COMPONENTS_SCHEMAS_PREFIX)) {
1718
+ if (!ref.startsWith(chunkUIQQTAXT_js.COMPONENTS_SCHEMAS_PREFIX)) {
1719
1719
  return void 0;
1720
1720
  }
1721
- const target = ref.slice(chunkJ2MGUXBB_js.COMPONENTS_SCHEMAS_PREFIX.length);
1721
+ const target = ref.slice(chunkUIQQTAXT_js.COMPONENTS_SCHEMAS_PREFIX.length);
1722
1722
  if (out.has(target)) {
1723
1723
  return void 0;
1724
1724
  }
@@ -1751,7 +1751,7 @@ var inlineAnonymousBodies = /* @__PURE__ */ chunkEV5I5HGT_js.__name(({ doc, regi
1751
1751
  ]) {
1752
1752
  const body = schemas[key];
1753
1753
  if (isPlainRecord5(body)) {
1754
- bodyByRef.set(`${chunkJ2MGUXBB_js.COMPONENTS_SCHEMAS_PREFIX}${key}`, body);
1754
+ bodyByRef.set(`${chunkUIQQTAXT_js.COMPONENTS_SCHEMAS_PREFIX}${key}`, body);
1755
1755
  }
1756
1756
  }
1757
1757
  }
@@ -1763,7 +1763,7 @@ var inlineAnonymousBodies = /* @__PURE__ */ chunkEV5I5HGT_js.__name(({ doc, regi
1763
1763
  }
1764
1764
  inlineRefs(doc.paths, bodyByRef);
1765
1765
  for (const ref of bodyByRef.keys()) {
1766
- delete schemas[ref.slice(chunkJ2MGUXBB_js.COMPONENTS_SCHEMAS_PREFIX.length)];
1766
+ delete schemas[ref.slice(chunkUIQQTAXT_js.COMPONENTS_SCHEMAS_PREFIX.length)];
1767
1767
  }
1768
1768
  }, "inlineAnonymousBodies");
1769
1769
  var refsWithin = /* @__PURE__ */ chunkEV5I5HGT_js.__name((schemas, bodyByRef) => {
@@ -1833,8 +1833,8 @@ var visitContentHolder = /* @__PURE__ */ chunkEV5I5HGT_js.__name((holder, emit)
1833
1833
  }
1834
1834
  }, "visitContentHolder");
1835
1835
  var rewriteMediaType = /* @__PURE__ */ chunkEV5I5HGT_js.__name((mediaTypeKey, mediaType, emit) => {
1836
- const marked = mediaType[chunkJ2MGUXBB_js.ZOD_NEST_ITEM_STREAM_EXTENSION] === true;
1837
- delete mediaType[chunkJ2MGUXBB_js.ZOD_NEST_ITEM_STREAM_EXTENSION];
1836
+ const marked = mediaType[chunkUIQQTAXT_js.ZOD_NEST_ITEM_STREAM_EXTENSION] === true;
1837
+ delete mediaType[chunkUIQQTAXT_js.ZOD_NEST_ITEM_STREAM_EXTENSION];
1838
1838
  if (!emit) {
1839
1839
  return;
1840
1840
  }
@@ -1959,7 +1959,7 @@ var isMarkerPlaceholder = /* @__PURE__ */ chunkEV5I5HGT_js.__name((value) => {
1959
1959
  if (properties === null || typeof properties !== "object") {
1960
1960
  return false;
1961
1961
  }
1962
- const marker = properties[chunkJ2MGUXBB_js.ZOD_NEST_DTO_EXTENSION];
1962
+ const marker = properties[chunkUIQQTAXT_js.ZOD_NEST_DTO_EXTENSION];
1963
1963
  return isZodDtoMarker(marker);
1964
1964
  }, "isMarkerPlaceholder");
1965
1965
  var canonicalEqual = /* @__PURE__ */ chunkEV5I5HGT_js.__name((a, b) => {
@@ -1985,7 +1985,7 @@ var decorateIfPresent = /* @__PURE__ */ chunkEV5I5HGT_js.__name((schemas, key) =
1985
1985
  }
1986
1986
  schemas[key] = {
1987
1987
  description: `ERROR: duplicate zod-nest id <${key.replace(/Output$/, "")}>`,
1988
- [chunkJ2MGUXBB_js.ZOD_NEST_ERROR_EXTENSION]: chunkJ2MGUXBB_js.ZOD_NEST_ERROR_DUPLICATE_ID
1988
+ [chunkUIQQTAXT_js.ZOD_NEST_ERROR_EXTENSION]: chunkUIQQTAXT_js.ZOD_NEST_ERROR_DUPLICATE_ID
1989
1989
  };
1990
1990
  }, "decorateIfPresent");
1991
1991
 
@@ -2038,8 +2038,8 @@ var addRefTitles = /* @__PURE__ */ chunkEV5I5HGT_js.__name((node, titleById) =>
2038
2038
  return;
2039
2039
  }
2040
2040
  const ref = node.$ref;
2041
- if (typeof ref === "string" && ref.startsWith(chunkJ2MGUXBB_js.COMPONENTS_SCHEMAS_PREFIX) && node.title === void 0) {
2042
- const title = titleById.get(ref.slice(chunkJ2MGUXBB_js.COMPONENTS_SCHEMAS_PREFIX.length));
2041
+ if (typeof ref === "string" && ref.startsWith(chunkUIQQTAXT_js.COMPONENTS_SCHEMAS_PREFIX) && node.title === void 0) {
2042
+ const title = titleById.get(ref.slice(chunkUIQQTAXT_js.COMPONENTS_SCHEMAS_PREFIX.length));
2043
2043
  if (title !== void 0) {
2044
2044
  node.title = title;
2045
2045
  }
@@ -2078,15 +2078,15 @@ var rewriteRefs = /* @__PURE__ */ chunkEV5I5HGT_js.__name((params) => {
2078
2078
  const { doc, renames, divergentOutputIds } = params;
2079
2079
  if (renames.size > 0) {
2080
2080
  walkRefs(doc, (ref) => {
2081
- if (!ref.startsWith(chunkJ2MGUXBB_js.COMPONENTS_SCHEMAS_PREFIX)) {
2081
+ if (!ref.startsWith(chunkUIQQTAXT_js.COMPONENTS_SCHEMAS_PREFIX)) {
2082
2082
  return void 0;
2083
2083
  }
2084
- const target = ref.slice(chunkJ2MGUXBB_js.COMPONENTS_SCHEMAS_PREFIX.length);
2084
+ const target = ref.slice(chunkUIQQTAXT_js.COMPONENTS_SCHEMAS_PREFIX.length);
2085
2085
  const renamed = renames.get(target);
2086
2086
  if (renamed === void 0) {
2087
2087
  return void 0;
2088
2088
  }
2089
- return `${chunkJ2MGUXBB_js.COMPONENTS_SCHEMAS_PREFIX}${renamed}`;
2089
+ return `${chunkUIQQTAXT_js.COMPONENTS_SCHEMAS_PREFIX}${renamed}`;
2090
2090
  });
2091
2091
  }
2092
2092
  if (divergentOutputIds.size === 0) {
@@ -2107,14 +2107,14 @@ var rewriteResponseSubtree = /* @__PURE__ */ chunkEV5I5HGT_js.__name((pathItem,
2107
2107
  continue;
2108
2108
  }
2109
2109
  walkRefs(responses, (ref) => {
2110
- if (!ref.startsWith(chunkJ2MGUXBB_js.COMPONENTS_SCHEMAS_PREFIX)) {
2110
+ if (!ref.startsWith(chunkUIQQTAXT_js.COMPONENTS_SCHEMAS_PREFIX)) {
2111
2111
  return void 0;
2112
2112
  }
2113
- const target = ref.slice(chunkJ2MGUXBB_js.COMPONENTS_SCHEMAS_PREFIX.length);
2113
+ const target = ref.slice(chunkUIQQTAXT_js.COMPONENTS_SCHEMAS_PREFIX.length);
2114
2114
  if (!divergentOutputIds.has(target)) {
2115
2115
  return void 0;
2116
2116
  }
2117
- return `${chunkJ2MGUXBB_js.COMPONENTS_SCHEMAS_PREFIX}${target}${OUTPUT_SUFFIX}`;
2117
+ return `${chunkUIQQTAXT_js.COMPONENTS_SCHEMAS_PREFIX}${target}${OUTPUT_SUFFIX}`;
2118
2118
  });
2119
2119
  }
2120
2120
  }, "rewriteResponseSubtree");
@@ -2156,10 +2156,10 @@ var stripMarkerFromSchema = /* @__PURE__ */ chunkEV5I5HGT_js.__name((schema) =>
2156
2156
  return;
2157
2157
  }
2158
2158
  const props = properties;
2159
- if (!(chunkJ2MGUXBB_js.ZOD_NEST_DTO_EXTENSION in props)) {
2159
+ if (!(chunkUIQQTAXT_js.ZOD_NEST_DTO_EXTENSION in props)) {
2160
2160
  return;
2161
2161
  }
2162
- delete props[chunkJ2MGUXBB_js.ZOD_NEST_DTO_EXTENSION];
2162
+ delete props[chunkUIQQTAXT_js.ZOD_NEST_DTO_EXTENSION];
2163
2163
  if (Object.keys(props).length === 0) {
2164
2164
  delete schema.properties;
2165
2165
  }
@@ -2181,7 +2181,7 @@ var withForcedExposure = /* @__PURE__ */ chunkEV5I5HGT_js.__name((collected, reg
2181
2181
  };
2182
2182
  }, "withForcedExposure");
2183
2183
  var applyZodNest = /* @__PURE__ */ chunkEV5I5HGT_js.__name((doc, opts = {}) => {
2184
- const registry = opts.registry ?? chunkJ2MGUXBB_js.defaultRegistry;
2184
+ const registry = opts.registry ?? chunkUIQQTAXT_js.defaultRegistry;
2185
2185
  const openApiVersion = resolveOpenApiVersion(doc);
2186
2186
  const emitThirtyTwo = openApiVersion.startsWith("3.2.");
2187
2187
  const collected = collectUsage(doc, registry);
@@ -2238,67 +2238,71 @@ var applyZodNest = /* @__PURE__ */ chunkEV5I5HGT_js.__name((doc, opts = {}) => {
2238
2238
 
2239
2239
  Object.defineProperty(exports, "COMPONENTS_SCHEMAS_PREFIX", {
2240
2240
  enumerable: true,
2241
- get: function () { return chunkJ2MGUXBB_js.COMPONENTS_SCHEMAS_PREFIX; }
2241
+ get: function () { return chunkUIQQTAXT_js.COMPONENTS_SCHEMAS_PREFIX; }
2242
2242
  });
2243
2243
  Object.defineProperty(exports, "ZOD_DTO_SYMBOL", {
2244
2244
  enumerable: true,
2245
- get: function () { return chunkJ2MGUXBB_js.ZOD_DTO_SYMBOL; }
2245
+ get: function () { return chunkUIQQTAXT_js.ZOD_DTO_SYMBOL; }
2246
2246
  });
2247
2247
  Object.defineProperty(exports, "ZOD_NEST_DTO_EXTENSION", {
2248
2248
  enumerable: true,
2249
- get: function () { return chunkJ2MGUXBB_js.ZOD_NEST_DTO_EXTENSION; }
2249
+ get: function () { return chunkUIQQTAXT_js.ZOD_NEST_DTO_EXTENSION; }
2250
2250
  });
2251
2251
  Object.defineProperty(exports, "ZOD_NEST_ERROR_DUPLICATE_ID", {
2252
2252
  enumerable: true,
2253
- get: function () { return chunkJ2MGUXBB_js.ZOD_NEST_ERROR_DUPLICATE_ID; }
2253
+ get: function () { return chunkUIQQTAXT_js.ZOD_NEST_ERROR_DUPLICATE_ID; }
2254
2254
  });
2255
2255
  Object.defineProperty(exports, "ZOD_NEST_ERROR_EXTENSION", {
2256
2256
  enumerable: true,
2257
- get: function () { return chunkJ2MGUXBB_js.ZOD_NEST_ERROR_EXTENSION; }
2257
+ get: function () { return chunkUIQQTAXT_js.ZOD_NEST_ERROR_EXTENSION; }
2258
2258
  });
2259
2259
  Object.defineProperty(exports, "ZodNestError", {
2260
2260
  enumerable: true,
2261
- get: function () { return chunkJ2MGUXBB_js.ZodNestError; }
2261
+ get: function () { return chunkUIQQTAXT_js.ZodNestError; }
2262
+ });
2263
+ Object.defineProperty(exports, "ZodNestErrorCode", {
2264
+ enumerable: true,
2265
+ get: function () { return chunkUIQQTAXT_js.ZodNestErrorCode; }
2262
2266
  });
2263
2267
  Object.defineProperty(exports, "ZodNestUnrepresentableError", {
2264
2268
  enumerable: true,
2265
- get: function () { return chunkJ2MGUXBB_js.ZodNestUnrepresentableError; }
2269
+ get: function () { return chunkUIQQTAXT_js.ZodNestUnrepresentableError; }
2266
2270
  });
2267
2271
  Object.defineProperty(exports, "ZodValidationException", {
2268
2272
  enumerable: true,
2269
- get: function () { return chunkJ2MGUXBB_js.ZodValidationException; }
2273
+ get: function () { return chunkUIQQTAXT_js.ZodValidationException; }
2270
2274
  });
2271
2275
  Object.defineProperty(exports, "createRegistry", {
2272
2276
  enumerable: true,
2273
- get: function () { return chunkJ2MGUXBB_js.createRegistry; }
2277
+ get: function () { return chunkUIQQTAXT_js.createRegistry; }
2274
2278
  });
2275
2279
  Object.defineProperty(exports, "defaultRegistry", {
2276
2280
  enumerable: true,
2277
- get: function () { return chunkJ2MGUXBB_js.defaultRegistry; }
2281
+ get: function () { return chunkUIQQTAXT_js.defaultRegistry; }
2278
2282
  });
2279
2283
  Object.defineProperty(exports, "extend", {
2280
2284
  enumerable: true,
2281
- get: function () { return chunkJ2MGUXBB_js.extend; }
2285
+ get: function () { return chunkUIQQTAXT_js.extend; }
2282
2286
  });
2283
2287
  Object.defineProperty(exports, "getLineage", {
2284
2288
  enumerable: true,
2285
- get: function () { return chunkJ2MGUXBB_js.getLineage; }
2289
+ get: function () { return chunkUIQQTAXT_js.getLineage; }
2286
2290
  });
2287
2291
  Object.defineProperty(exports, "isZodDto", {
2288
2292
  enumerable: true,
2289
- get: function () { return chunkJ2MGUXBB_js.isZodDto; }
2293
+ get: function () { return chunkUIQQTAXT_js.isZodDto; }
2290
2294
  });
2291
2295
  Object.defineProperty(exports, "isZodSchema", {
2292
2296
  enumerable: true,
2293
- get: function () { return chunkJ2MGUXBB_js.isZodSchema; }
2297
+ get: function () { return chunkUIQQTAXT_js.isZodSchema; }
2294
2298
  });
2295
2299
  Object.defineProperty(exports, "registerSchema", {
2296
2300
  enumerable: true,
2297
- get: function () { return chunkJ2MGUXBB_js.registerSchema; }
2301
+ get: function () { return chunkUIQQTAXT_js.registerSchema; }
2298
2302
  });
2299
2303
  Object.defineProperty(exports, "toOpenApi", {
2300
2304
  enumerable: true,
2301
- get: function () { return chunkJ2MGUXBB_js.toOpenApi; }
2305
+ get: function () { return chunkUIQQTAXT_js.toOpenApi; }
2302
2306
  });
2303
2307
  Object.defineProperty(exports, "overrideJSONSchema", {
2304
2308
  enumerable: true,