@spscommerce/asst-api 1.4.0 → 2.0.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/zod.cjs CHANGED
@@ -107,10 +107,123 @@ module.exports = __toCommonJS(zod_exports);
107
107
  // lib/asstClient.ts
108
108
  var import_ky = __toESM(require("ky"), 1);
109
109
 
110
- // ../../node_modules/.pnpm/zod@3.23.8/node_modules/zod/lib/index.mjs
110
+ // ../../node_modules/.pnpm/zod@3.25.30/node_modules/zod/dist/esm/v3/external.js
111
+ var external_exports = {};
112
+ __export(external_exports, {
113
+ BRAND: () => BRAND,
114
+ DIRTY: () => DIRTY,
115
+ EMPTY_PATH: () => EMPTY_PATH,
116
+ INVALID: () => INVALID,
117
+ NEVER: () => NEVER,
118
+ OK: () => OK,
119
+ ParseStatus: () => ParseStatus,
120
+ Schema: () => ZodType,
121
+ ZodAny: () => ZodAny,
122
+ ZodArray: () => ZodArray,
123
+ ZodBigInt: () => ZodBigInt,
124
+ ZodBoolean: () => ZodBoolean,
125
+ ZodBranded: () => ZodBranded,
126
+ ZodCatch: () => ZodCatch,
127
+ ZodDate: () => ZodDate,
128
+ ZodDefault: () => ZodDefault,
129
+ ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,
130
+ ZodEffects: () => ZodEffects,
131
+ ZodEnum: () => ZodEnum,
132
+ ZodError: () => ZodError,
133
+ ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind,
134
+ ZodFunction: () => ZodFunction,
135
+ ZodIntersection: () => ZodIntersection,
136
+ ZodIssueCode: () => ZodIssueCode,
137
+ ZodLazy: () => ZodLazy,
138
+ ZodLiteral: () => ZodLiteral,
139
+ ZodMap: () => ZodMap,
140
+ ZodNaN: () => ZodNaN,
141
+ ZodNativeEnum: () => ZodNativeEnum,
142
+ ZodNever: () => ZodNever,
143
+ ZodNull: () => ZodNull,
144
+ ZodNullable: () => ZodNullable,
145
+ ZodNumber: () => ZodNumber,
146
+ ZodObject: () => ZodObject,
147
+ ZodOptional: () => ZodOptional,
148
+ ZodParsedType: () => ZodParsedType,
149
+ ZodPipeline: () => ZodPipeline,
150
+ ZodPromise: () => ZodPromise,
151
+ ZodReadonly: () => ZodReadonly,
152
+ ZodRecord: () => ZodRecord,
153
+ ZodSchema: () => ZodType,
154
+ ZodSet: () => ZodSet,
155
+ ZodString: () => ZodString,
156
+ ZodSymbol: () => ZodSymbol,
157
+ ZodTransformer: () => ZodEffects,
158
+ ZodTuple: () => ZodTuple,
159
+ ZodType: () => ZodType,
160
+ ZodUndefined: () => ZodUndefined,
161
+ ZodUnion: () => ZodUnion,
162
+ ZodUnknown: () => ZodUnknown,
163
+ ZodVoid: () => ZodVoid,
164
+ addIssueToContext: () => addIssueToContext,
165
+ any: () => anyType,
166
+ array: () => arrayType,
167
+ bigint: () => bigIntType,
168
+ boolean: () => booleanType,
169
+ coerce: () => coerce,
170
+ custom: () => custom,
171
+ date: () => dateType,
172
+ datetimeRegex: () => datetimeRegex,
173
+ defaultErrorMap: () => en_default,
174
+ discriminatedUnion: () => discriminatedUnionType,
175
+ effect: () => effectsType,
176
+ enum: () => enumType,
177
+ function: () => functionType,
178
+ getErrorMap: () => getErrorMap,
179
+ getParsedType: () => getParsedType,
180
+ instanceof: () => instanceOfType,
181
+ intersection: () => intersectionType,
182
+ isAborted: () => isAborted,
183
+ isAsync: () => isAsync,
184
+ isDirty: () => isDirty,
185
+ isValid: () => isValid,
186
+ late: () => late,
187
+ lazy: () => lazyType,
188
+ literal: () => literalType,
189
+ makeIssue: () => makeIssue,
190
+ map: () => mapType,
191
+ nan: () => nanType,
192
+ nativeEnum: () => nativeEnumType,
193
+ never: () => neverType,
194
+ null: () => nullType,
195
+ nullable: () => nullableType,
196
+ number: () => numberType,
197
+ object: () => objectType,
198
+ objectUtil: () => objectUtil,
199
+ oboolean: () => oboolean,
200
+ onumber: () => onumber,
201
+ optional: () => optionalType,
202
+ ostring: () => ostring,
203
+ pipeline: () => pipelineType,
204
+ preprocess: () => preprocessType,
205
+ promise: () => promiseType,
206
+ quotelessJson: () => quotelessJson,
207
+ record: () => recordType,
208
+ set: () => setType,
209
+ setErrorMap: () => setErrorMap,
210
+ strictObject: () => strictObjectType,
211
+ string: () => stringType,
212
+ symbol: () => symbolType,
213
+ transformer: () => effectsType,
214
+ tuple: () => tupleType,
215
+ undefined: () => undefinedType,
216
+ union: () => unionType,
217
+ unknown: () => unknownType,
218
+ util: () => util,
219
+ void: () => voidType
220
+ });
221
+
222
+ // ../../node_modules/.pnpm/zod@3.25.30/node_modules/zod/dist/esm/v3/helpers/util.js
111
223
  var util;
112
224
  (function(util2) {
113
- util2.assertEqual = (val) => val;
225
+ util2.assertEqual = (_) => {
226
+ };
114
227
  function assertIs(_arg) {
115
228
  }
116
229
  util2.assertIs = assertIs;
@@ -154,7 +267,7 @@ var util;
154
267
  }
155
268
  return void 0;
156
269
  };
157
- util2.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && isFinite(val) && Math.floor(val) === val;
270
+ util2.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && Number.isFinite(val) && Math.floor(val) === val;
158
271
  function joinValues(array, separator = " | ") {
159
272
  return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator);
160
273
  }
@@ -206,7 +319,7 @@ var getParsedType = (data) => {
206
319
  case "string":
207
320
  return ZodParsedType.string;
208
321
  case "number":
209
- return isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;
322
+ return Number.isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;
210
323
  case "boolean":
211
324
  return ZodParsedType.boolean;
212
325
  case "function":
@@ -239,6 +352,8 @@ var getParsedType = (data) => {
239
352
  return ZodParsedType.unknown;
240
353
  }
241
354
  };
355
+
356
+ // ../../node_modules/.pnpm/zod@3.25.30/node_modules/zod/dist/esm/v3/ZodError.js
242
357
  var ZodIssueCode = util.arrayToEnum([
243
358
  "invalid_type",
244
359
  "invalid_literal",
@@ -262,6 +377,9 @@ var quotelessJson = (obj) => {
262
377
  return json.replace(/"([^"]+)":/g, "$1:");
263
378
  };
264
379
  var ZodError = class _ZodError extends Error {
380
+ get errors() {
381
+ return this.issues;
382
+ }
265
383
  constructor(issues) {
266
384
  super();
267
385
  this.issues = [];
@@ -280,9 +398,6 @@ var ZodError = class _ZodError extends Error {
280
398
  this.name = "ZodError";
281
399
  this.issues = issues;
282
400
  }
283
- get errors() {
284
- return this.issues;
285
- }
286
401
  format(_mapper) {
287
402
  const mapper = _mapper || function(issue) {
288
403
  return issue.message;
@@ -354,6 +469,8 @@ ZodError.create = (issues) => {
354
469
  const error = new ZodError(issues);
355
470
  return error;
356
471
  };
472
+
473
+ // ../../node_modules/.pnpm/zod@3.25.30/node_modules/zod/dist/esm/v3/locales/en.js
357
474
  var errorMap = (issue, _ctx) => {
358
475
  let message;
359
476
  switch (issue.code) {
@@ -452,13 +569,18 @@ var errorMap = (issue, _ctx) => {
452
569
  }
453
570
  return { message };
454
571
  };
455
- var overrideErrorMap = errorMap;
572
+ var en_default = errorMap;
573
+
574
+ // ../../node_modules/.pnpm/zod@3.25.30/node_modules/zod/dist/esm/v3/errors.js
575
+ var overrideErrorMap = en_default;
456
576
  function setErrorMap(map) {
457
577
  overrideErrorMap = map;
458
578
  }
459
579
  function getErrorMap() {
460
580
  return overrideErrorMap;
461
581
  }
582
+
583
+ // ../../node_modules/.pnpm/zod@3.25.30/node_modules/zod/dist/esm/v3/helpers/parseUtil.js
462
584
  var makeIssue = (params) => {
463
585
  const { data, path, errorMaps, issueData } = params;
464
586
  const fullPath = [...path, ...issueData.path || []];
@@ -493,9 +615,12 @@ function addIssueToContext(ctx, issueData) {
493
615
  path: ctx.path,
494
616
  errorMaps: [
495
617
  ctx.common.contextualErrorMap,
618
+ // contextual error map is first priority
496
619
  ctx.schemaErrorMap,
620
+ // then schema-bound map if available
497
621
  overrideMap,
498
- overrideMap === errorMap ? void 0 : errorMap
622
+ // then global override map
623
+ overrideMap === en_default ? void 0 : en_default
499
624
  // then global default map
500
625
  ].filter((x) => !!x)
501
626
  });
@@ -564,22 +689,26 @@ var isAborted = (x) => x.status === "aborted";
564
689
  var isDirty = (x) => x.status === "dirty";
565
690
  var isValid = (x) => x.status === "valid";
566
691
  var isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
567
- function __classPrivateFieldGet(receiver, state, kind, f) {
692
+
693
+ // ../../node_modules/.pnpm/zod@3.25.30/node_modules/zod/dist/esm/v3/helpers/errorUtil.js
694
+ var errorUtil;
695
+ (function(errorUtil2) {
696
+ errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
697
+ errorUtil2.toString = (message) => typeof message === "string" ? message : message?.message;
698
+ })(errorUtil || (errorUtil = {}));
699
+
700
+ // ../../node_modules/.pnpm/zod@3.25.30/node_modules/zod/dist/esm/v3/types.js
701
+ var __classPrivateFieldGet = function(receiver, state, kind, f) {
568
702
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
569
703
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
570
704
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
571
- }
572
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
705
+ };
706
+ var __classPrivateFieldSet = function(receiver, state, value, kind, f) {
573
707
  if (kind === "m") throw new TypeError("Private method is not writable");
574
708
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
575
709
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
576
710
  return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
577
- }
578
- var errorUtil;
579
- (function(errorUtil2) {
580
- errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
581
- errorUtil2.toString = (message) => typeof message === "string" ? message : message === null || message === void 0 ? void 0 : message.message;
582
- })(errorUtil || (errorUtil = {}));
711
+ };
583
712
  var _ZodEnum_cache;
584
713
  var _ZodNativeEnum_cache;
585
714
  var ParseInputLazyPath = class {
@@ -592,7 +721,7 @@ var ParseInputLazyPath = class {
592
721
  }
593
722
  get path() {
594
723
  if (!this._cachedPath.length) {
595
- if (this._key instanceof Array) {
724
+ if (Array.isArray(this._key)) {
596
725
  this._cachedPath.push(...this._path, ...this._key);
597
726
  } else {
598
727
  this._cachedPath.push(...this._path, this._key);
@@ -630,49 +759,20 @@ function processCreateParams(params) {
630
759
  if (errorMap2)
631
760
  return { errorMap: errorMap2, description };
632
761
  const customMap = (iss, ctx) => {
633
- var _a, _b;
634
762
  const { message } = params;
635
763
  if (iss.code === "invalid_enum_value") {
636
- return { message: message !== null && message !== void 0 ? message : ctx.defaultError };
764
+ return { message: message ?? ctx.defaultError };
637
765
  }
638
766
  if (typeof ctx.data === "undefined") {
639
- return { message: (_a = message !== null && message !== void 0 ? message : required_error) !== null && _a !== void 0 ? _a : ctx.defaultError };
767
+ return { message: message ?? required_error ?? ctx.defaultError };
640
768
  }
641
769
  if (iss.code !== "invalid_type")
642
770
  return { message: ctx.defaultError };
643
- return { message: (_b = message !== null && message !== void 0 ? message : invalid_type_error) !== null && _b !== void 0 ? _b : ctx.defaultError };
771
+ return { message: message ?? invalid_type_error ?? ctx.defaultError };
644
772
  };
645
773
  return { errorMap: customMap, description };
646
774
  }
647
775
  var ZodType = class {
648
- constructor(def) {
649
- this.spa = this.safeParseAsync;
650
- this._def = def;
651
- this.parse = this.parse.bind(this);
652
- this.safeParse = this.safeParse.bind(this);
653
- this.parseAsync = this.parseAsync.bind(this);
654
- this.safeParseAsync = this.safeParseAsync.bind(this);
655
- this.spa = this.spa.bind(this);
656
- this.refine = this.refine.bind(this);
657
- this.refinement = this.refinement.bind(this);
658
- this.superRefine = this.superRefine.bind(this);
659
- this.optional = this.optional.bind(this);
660
- this.nullable = this.nullable.bind(this);
661
- this.nullish = this.nullish.bind(this);
662
- this.array = this.array.bind(this);
663
- this.promise = this.promise.bind(this);
664
- this.or = this.or.bind(this);
665
- this.and = this.and.bind(this);
666
- this.transform = this.transform.bind(this);
667
- this.brand = this.brand.bind(this);
668
- this.default = this.default.bind(this);
669
- this.catch = this.catch.bind(this);
670
- this.describe = this.describe.bind(this);
671
- this.pipe = this.pipe.bind(this);
672
- this.readonly = this.readonly.bind(this);
673
- this.isNullable = this.isNullable.bind(this);
674
- this.isOptional = this.isOptional.bind(this);
675
- }
676
776
  get description() {
677
777
  return this._def.description;
678
778
  }
@@ -720,14 +820,13 @@ var ZodType = class {
720
820
  throw result.error;
721
821
  }
722
822
  safeParse(data, params) {
723
- var _a;
724
823
  const ctx = {
725
824
  common: {
726
825
  issues: [],
727
- async: (_a = params === null || params === void 0 ? void 0 : params.async) !== null && _a !== void 0 ? _a : false,
728
- contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap
826
+ async: params?.async ?? false,
827
+ contextualErrorMap: params?.errorMap
729
828
  },
730
- path: (params === null || params === void 0 ? void 0 : params.path) || [],
829
+ path: params?.path || [],
731
830
  schemaErrorMap: this._def.errorMap,
732
831
  parent: null,
733
832
  data,
@@ -736,6 +835,42 @@ var ZodType = class {
736
835
  const result = this._parseSync({ data, path: ctx.path, parent: ctx });
737
836
  return handleResult(ctx, result);
738
837
  }
838
+ "~validate"(data) {
839
+ const ctx = {
840
+ common: {
841
+ issues: [],
842
+ async: !!this["~standard"].async
843
+ },
844
+ path: [],
845
+ schemaErrorMap: this._def.errorMap,
846
+ parent: null,
847
+ data,
848
+ parsedType: getParsedType(data)
849
+ };
850
+ if (!this["~standard"].async) {
851
+ try {
852
+ const result = this._parseSync({ data, path: [], parent: ctx });
853
+ return isValid(result) ? {
854
+ value: result.value
855
+ } : {
856
+ issues: ctx.common.issues
857
+ };
858
+ } catch (err) {
859
+ if (err?.message?.toLowerCase()?.includes("encountered")) {
860
+ this["~standard"].async = true;
861
+ }
862
+ ctx.common = {
863
+ issues: [],
864
+ async: true
865
+ };
866
+ }
867
+ }
868
+ return this._parseAsync({ data, path: [], parent: ctx }).then((result) => isValid(result) ? {
869
+ value: result.value
870
+ } : {
871
+ issues: ctx.common.issues
872
+ });
873
+ }
739
874
  async parseAsync(data, params) {
740
875
  const result = await this.safeParseAsync(data, params);
741
876
  if (result.success)
@@ -746,10 +881,10 @@ var ZodType = class {
746
881
  const ctx = {
747
882
  common: {
748
883
  issues: [],
749
- contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap,
884
+ contextualErrorMap: params?.errorMap,
750
885
  async: true
751
886
  },
752
- path: (params === null || params === void 0 ? void 0 : params.path) || [],
887
+ path: params?.path || [],
753
888
  schemaErrorMap: this._def.errorMap,
754
889
  parent: null,
755
890
  data,
@@ -813,6 +948,39 @@ var ZodType = class {
813
948
  superRefine(refinement) {
814
949
  return this._refinement(refinement);
815
950
  }
951
+ constructor(def) {
952
+ this.spa = this.safeParseAsync;
953
+ this._def = def;
954
+ this.parse = this.parse.bind(this);
955
+ this.safeParse = this.safeParse.bind(this);
956
+ this.parseAsync = this.parseAsync.bind(this);
957
+ this.safeParseAsync = this.safeParseAsync.bind(this);
958
+ this.spa = this.spa.bind(this);
959
+ this.refine = this.refine.bind(this);
960
+ this.refinement = this.refinement.bind(this);
961
+ this.superRefine = this.superRefine.bind(this);
962
+ this.optional = this.optional.bind(this);
963
+ this.nullable = this.nullable.bind(this);
964
+ this.nullish = this.nullish.bind(this);
965
+ this.array = this.array.bind(this);
966
+ this.promise = this.promise.bind(this);
967
+ this.or = this.or.bind(this);
968
+ this.and = this.and.bind(this);
969
+ this.transform = this.transform.bind(this);
970
+ this.brand = this.brand.bind(this);
971
+ this.default = this.default.bind(this);
972
+ this.catch = this.catch.bind(this);
973
+ this.describe = this.describe.bind(this);
974
+ this.pipe = this.pipe.bind(this);
975
+ this.readonly = this.readonly.bind(this);
976
+ this.isNullable = this.isNullable.bind(this);
977
+ this.isOptional = this.isOptional.bind(this);
978
+ this["~standard"] = {
979
+ version: 1,
980
+ vendor: "zod",
981
+ validate: (data) => this["~validate"](data)
982
+ };
983
+ }
816
984
  optional() {
817
985
  return ZodOptional.create(this, this._def);
818
986
  }
@@ -823,7 +991,7 @@ var ZodType = class {
823
991
  return this.nullable().optional();
824
992
  }
825
993
  array() {
826
- return ZodArray.create(this, this._def);
994
+ return ZodArray.create(this);
827
995
  }
828
996
  promise() {
829
997
  return ZodPromise.create(this, this._def);
@@ -889,26 +1057,31 @@ var ZodType = class {
889
1057
  };
890
1058
  var cuidRegex = /^c[^\s-]{8,}$/i;
891
1059
  var cuid2Regex = /^[0-9a-z]+$/;
892
- var ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/;
1060
+ var ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/i;
893
1061
  var uuidRegex = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i;
894
1062
  var nanoidRegex = /^[a-z0-9_-]{21}$/i;
1063
+ var jwtRegex = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/;
895
1064
  var durationRegex = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/;
896
1065
  var emailRegex = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;
897
1066
  var _emojiRegex = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;
898
1067
  var emojiRegex;
899
1068
  var ipv4Regex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;
900
- var ipv6Regex = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;
1069
+ var ipv4CidrRegex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/;
1070
+ var ipv6Regex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/;
1071
+ var ipv6CidrRegex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;
901
1072
  var base64Regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;
1073
+ var base64urlRegex = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/;
902
1074
  var dateRegexSource = `((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`;
903
1075
  var dateRegex = new RegExp(`^${dateRegexSource}$`);
904
1076
  function timeRegexSource(args) {
905
- let regex = `([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d`;
1077
+ let secondsRegexSource = `[0-5]\\d`;
906
1078
  if (args.precision) {
907
- regex = `${regex}\\.\\d{${args.precision}}`;
1079
+ secondsRegexSource = `${secondsRegexSource}\\.\\d{${args.precision}}`;
908
1080
  } else if (args.precision == null) {
909
- regex = `${regex}(\\.\\d+)?`;
1081
+ secondsRegexSource = `${secondsRegexSource}(\\.\\d+)?`;
910
1082
  }
911
- return regex;
1083
+ const secondsQuantifier = args.precision ? "+" : "?";
1084
+ return `([01]\\d|2[0-3]):[0-5]\\d(:${secondsRegexSource})${secondsQuantifier}`;
912
1085
  }
913
1086
  function timeRegex(args) {
914
1087
  return new RegExp(`^${timeRegexSource(args)}$`);
@@ -931,6 +1104,35 @@ function isValidIP(ip, version) {
931
1104
  }
932
1105
  return false;
933
1106
  }
1107
+ function isValidJWT(jwt, alg) {
1108
+ if (!jwtRegex.test(jwt))
1109
+ return false;
1110
+ try {
1111
+ const [header] = jwt.split(".");
1112
+ const base64 = header.replace(/-/g, "+").replace(/_/g, "/").padEnd(header.length + (4 - header.length % 4) % 4, "=");
1113
+ const decoded = JSON.parse(atob(base64));
1114
+ if (typeof decoded !== "object" || decoded === null)
1115
+ return false;
1116
+ if ("typ" in decoded && decoded?.typ !== "JWT")
1117
+ return false;
1118
+ if (!decoded.alg)
1119
+ return false;
1120
+ if (alg && decoded.alg !== alg)
1121
+ return false;
1122
+ return true;
1123
+ } catch {
1124
+ return false;
1125
+ }
1126
+ }
1127
+ function isValidCidr(ip, version) {
1128
+ if ((version === "v4" || !version) && ipv4CidrRegex.test(ip)) {
1129
+ return true;
1130
+ }
1131
+ if ((version === "v6" || !version) && ipv6CidrRegex.test(ip)) {
1132
+ return true;
1133
+ }
1134
+ return false;
1135
+ }
934
1136
  var ZodString = class _ZodString extends ZodType {
935
1137
  _parse(input) {
936
1138
  if (this._def.coerce) {
@@ -1077,7 +1279,7 @@ var ZodString = class _ZodString extends ZodType {
1077
1279
  } else if (check.kind === "url") {
1078
1280
  try {
1079
1281
  new URL(input.data);
1080
- } catch (_a) {
1282
+ } catch {
1081
1283
  ctx = this._getOrReturnCtx(input, ctx);
1082
1284
  addIssueToContext(ctx, {
1083
1285
  validation: "url",
@@ -1187,6 +1389,26 @@ var ZodString = class _ZodString extends ZodType {
1187
1389
  });
1188
1390
  status.dirty();
1189
1391
  }
1392
+ } else if (check.kind === "jwt") {
1393
+ if (!isValidJWT(input.data, check.alg)) {
1394
+ ctx = this._getOrReturnCtx(input, ctx);
1395
+ addIssueToContext(ctx, {
1396
+ validation: "jwt",
1397
+ code: ZodIssueCode.invalid_string,
1398
+ message: check.message
1399
+ });
1400
+ status.dirty();
1401
+ }
1402
+ } else if (check.kind === "cidr") {
1403
+ if (!isValidCidr(input.data, check.version)) {
1404
+ ctx = this._getOrReturnCtx(input, ctx);
1405
+ addIssueToContext(ctx, {
1406
+ validation: "cidr",
1407
+ code: ZodIssueCode.invalid_string,
1408
+ message: check.message
1409
+ });
1410
+ status.dirty();
1411
+ }
1190
1412
  } else if (check.kind === "base64") {
1191
1413
  if (!base64Regex.test(input.data)) {
1192
1414
  ctx = this._getOrReturnCtx(input, ctx);
@@ -1197,6 +1419,16 @@ var ZodString = class _ZodString extends ZodType {
1197
1419
  });
1198
1420
  status.dirty();
1199
1421
  }
1422
+ } else if (check.kind === "base64url") {
1423
+ if (!base64urlRegex.test(input.data)) {
1424
+ ctx = this._getOrReturnCtx(input, ctx);
1425
+ addIssueToContext(ctx, {
1426
+ validation: "base64url",
1427
+ code: ZodIssueCode.invalid_string,
1428
+ message: check.message
1429
+ });
1430
+ status.dirty();
1431
+ }
1200
1432
  } else {
1201
1433
  util.assertNever(check);
1202
1434
  }
@@ -1243,11 +1475,22 @@ var ZodString = class _ZodString extends ZodType {
1243
1475
  base64(message) {
1244
1476
  return this._addCheck({ kind: "base64", ...errorUtil.errToObj(message) });
1245
1477
  }
1478
+ base64url(message) {
1479
+ return this._addCheck({
1480
+ kind: "base64url",
1481
+ ...errorUtil.errToObj(message)
1482
+ });
1483
+ }
1484
+ jwt(options) {
1485
+ return this._addCheck({ kind: "jwt", ...errorUtil.errToObj(options) });
1486
+ }
1246
1487
  ip(options) {
1247
1488
  return this._addCheck({ kind: "ip", ...errorUtil.errToObj(options) });
1248
1489
  }
1490
+ cidr(options) {
1491
+ return this._addCheck({ kind: "cidr", ...errorUtil.errToObj(options) });
1492
+ }
1249
1493
  datetime(options) {
1250
- var _a, _b;
1251
1494
  if (typeof options === "string") {
1252
1495
  return this._addCheck({
1253
1496
  kind: "datetime",
@@ -1259,10 +1502,10 @@ var ZodString = class _ZodString extends ZodType {
1259
1502
  }
1260
1503
  return this._addCheck({
1261
1504
  kind: "datetime",
1262
- precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === "undefined" ? null : options === null || options === void 0 ? void 0 : options.precision,
1263
- offset: (_a = options === null || options === void 0 ? void 0 : options.offset) !== null && _a !== void 0 ? _a : false,
1264
- local: (_b = options === null || options === void 0 ? void 0 : options.local) !== null && _b !== void 0 ? _b : false,
1265
- ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message)
1505
+ precision: typeof options?.precision === "undefined" ? null : options?.precision,
1506
+ offset: options?.offset ?? false,
1507
+ local: options?.local ?? false,
1508
+ ...errorUtil.errToObj(options?.message)
1266
1509
  });
1267
1510
  }
1268
1511
  date(message) {
@@ -1278,8 +1521,8 @@ var ZodString = class _ZodString extends ZodType {
1278
1521
  }
1279
1522
  return this._addCheck({
1280
1523
  kind: "time",
1281
- precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === "undefined" ? null : options === null || options === void 0 ? void 0 : options.precision,
1282
- ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message)
1524
+ precision: typeof options?.precision === "undefined" ? null : options?.precision,
1525
+ ...errorUtil.errToObj(options?.message)
1283
1526
  });
1284
1527
  }
1285
1528
  duration(message) {
@@ -1296,8 +1539,8 @@ var ZodString = class _ZodString extends ZodType {
1296
1539
  return this._addCheck({
1297
1540
  kind: "includes",
1298
1541
  value,
1299
- position: options === null || options === void 0 ? void 0 : options.position,
1300
- ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message)
1542
+ position: options?.position,
1543
+ ...errorUtil.errToObj(options?.message)
1301
1544
  });
1302
1545
  }
1303
1546
  startsWith(value, message) {
@@ -1336,8 +1579,7 @@ var ZodString = class _ZodString extends ZodType {
1336
1579
  });
1337
1580
  }
1338
1581
  /**
1339
- * @deprecated Use z.string().min(1) instead.
1340
- * @see {@link ZodString.min}
1582
+ * Equivalent to `.min(1)`
1341
1583
  */
1342
1584
  nonempty(message) {
1343
1585
  return this.min(1, errorUtil.errToObj(message));
@@ -1399,9 +1641,15 @@ var ZodString = class _ZodString extends ZodType {
1399
1641
  get isIP() {
1400
1642
  return !!this._def.checks.find((ch) => ch.kind === "ip");
1401
1643
  }
1644
+ get isCIDR() {
1645
+ return !!this._def.checks.find((ch) => ch.kind === "cidr");
1646
+ }
1402
1647
  get isBase64() {
1403
1648
  return !!this._def.checks.find((ch) => ch.kind === "base64");
1404
1649
  }
1650
+ get isBase64url() {
1651
+ return !!this._def.checks.find((ch) => ch.kind === "base64url");
1652
+ }
1405
1653
  get minLength() {
1406
1654
  let min = null;
1407
1655
  for (const ch of this._def.checks) {
@@ -1424,11 +1672,10 @@ var ZodString = class _ZodString extends ZodType {
1424
1672
  }
1425
1673
  };
1426
1674
  ZodString.create = (params) => {
1427
- var _a;
1428
1675
  return new ZodString({
1429
1676
  checks: [],
1430
1677
  typeName: ZodFirstPartyTypeKind.ZodString,
1431
- coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,
1678
+ coerce: params?.coerce ?? false,
1432
1679
  ...processCreateParams(params)
1433
1680
  });
1434
1681
  };
@@ -1436,9 +1683,9 @@ function floatSafeRemainder(val, step) {
1436
1683
  const valDecCount = (val.toString().split(".")[1] || "").length;
1437
1684
  const stepDecCount = (step.toString().split(".")[1] || "").length;
1438
1685
  const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
1439
- const valInt = parseInt(val.toFixed(decCount).replace(".", ""));
1440
- const stepInt = parseInt(step.toFixed(decCount).replace(".", ""));
1441
- return valInt % stepInt / Math.pow(10, decCount);
1686
+ const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
1687
+ const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
1688
+ return valInt % stepInt / 10 ** decCount;
1442
1689
  }
1443
1690
  var ZodNumber = class _ZodNumber extends ZodType {
1444
1691
  constructor() {
@@ -1648,7 +1895,8 @@ var ZodNumber = class _ZodNumber extends ZodType {
1648
1895
  return !!this._def.checks.find((ch) => ch.kind === "int" || ch.kind === "multipleOf" && util.isInteger(ch.value));
1649
1896
  }
1650
1897
  get isFinite() {
1651
- let max = null, min = null;
1898
+ let max = null;
1899
+ let min = null;
1652
1900
  for (const ch of this._def.checks) {
1653
1901
  if (ch.kind === "finite" || ch.kind === "int" || ch.kind === "multipleOf") {
1654
1902
  return true;
@@ -1667,7 +1915,7 @@ ZodNumber.create = (params) => {
1667
1915
  return new ZodNumber({
1668
1916
  checks: [],
1669
1917
  typeName: ZodFirstPartyTypeKind.ZodNumber,
1670
- coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
1918
+ coerce: params?.coerce || false,
1671
1919
  ...processCreateParams(params)
1672
1920
  });
1673
1921
  };
@@ -1679,17 +1927,15 @@ var ZodBigInt = class _ZodBigInt extends ZodType {
1679
1927
  }
1680
1928
  _parse(input) {
1681
1929
  if (this._def.coerce) {
1682
- input.data = BigInt(input.data);
1930
+ try {
1931
+ input.data = BigInt(input.data);
1932
+ } catch {
1933
+ return this._getInvalidInput(input);
1934
+ }
1683
1935
  }
1684
1936
  const parsedType = this._getType(input);
1685
1937
  if (parsedType !== ZodParsedType.bigint) {
1686
- const ctx2 = this._getOrReturnCtx(input);
1687
- addIssueToContext(ctx2, {
1688
- code: ZodIssueCode.invalid_type,
1689
- expected: ZodParsedType.bigint,
1690
- received: ctx2.parsedType
1691
- });
1692
- return INVALID;
1938
+ return this._getInvalidInput(input);
1693
1939
  }
1694
1940
  let ctx = void 0;
1695
1941
  const status = new ParseStatus();
@@ -1736,6 +1982,15 @@ var ZodBigInt = class _ZodBigInt extends ZodType {
1736
1982
  }
1737
1983
  return { status: status.value, value: input.data };
1738
1984
  }
1985
+ _getInvalidInput(input) {
1986
+ const ctx = this._getOrReturnCtx(input);
1987
+ addIssueToContext(ctx, {
1988
+ code: ZodIssueCode.invalid_type,
1989
+ expected: ZodParsedType.bigint,
1990
+ received: ctx.parsedType
1991
+ });
1992
+ return INVALID;
1993
+ }
1739
1994
  gte(value, message) {
1740
1995
  return this.setLimit("min", value, true, errorUtil.toString(message));
1741
1996
  }
@@ -1829,11 +2084,10 @@ var ZodBigInt = class _ZodBigInt extends ZodType {
1829
2084
  }
1830
2085
  };
1831
2086
  ZodBigInt.create = (params) => {
1832
- var _a;
1833
2087
  return new ZodBigInt({
1834
2088
  checks: [],
1835
2089
  typeName: ZodFirstPartyTypeKind.ZodBigInt,
1836
- coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,
2090
+ coerce: params?.coerce ?? false,
1837
2091
  ...processCreateParams(params)
1838
2092
  });
1839
2093
  };
@@ -1858,7 +2112,7 @@ var ZodBoolean = class extends ZodType {
1858
2112
  ZodBoolean.create = (params) => {
1859
2113
  return new ZodBoolean({
1860
2114
  typeName: ZodFirstPartyTypeKind.ZodBoolean,
1861
- coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
2115
+ coerce: params?.coerce || false,
1862
2116
  ...processCreateParams(params)
1863
2117
  });
1864
2118
  };
@@ -1877,7 +2131,7 @@ var ZodDate = class _ZodDate extends ZodType {
1877
2131
  });
1878
2132
  return INVALID;
1879
2133
  }
1880
- if (isNaN(input.data.getTime())) {
2134
+ if (Number.isNaN(input.data.getTime())) {
1881
2135
  const ctx2 = this._getOrReturnCtx(input);
1882
2136
  addIssueToContext(ctx2, {
1883
2137
  code: ZodIssueCode.invalid_date
@@ -1966,7 +2220,7 @@ var ZodDate = class _ZodDate extends ZodType {
1966
2220
  ZodDate.create = (params) => {
1967
2221
  return new ZodDate({
1968
2222
  checks: [],
1969
- coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
2223
+ coerce: params?.coerce || false,
1970
2224
  typeName: ZodFirstPartyTypeKind.ZodDate,
1971
2225
  ...processCreateParams(params)
1972
2226
  });
@@ -2241,7 +2495,8 @@ var ZodObject = class _ZodObject extends ZodType {
2241
2495
  return this._cached;
2242
2496
  const shape = this._def.shape();
2243
2497
  const keys = util.objectKeys(shape);
2244
- return this._cached = { shape, keys };
2498
+ this._cached = { shape, keys };
2499
+ return this._cached;
2245
2500
  }
2246
2501
  _parse(input) {
2247
2502
  const parsedType = this._getType(input);
@@ -2291,8 +2546,8 @@ var ZodObject = class _ZodObject extends ZodType {
2291
2546
  });
2292
2547
  status.dirty();
2293
2548
  }
2294
- } else if (unknownKeys === "strip") ;
2295
- else {
2549
+ } else if (unknownKeys === "strip") {
2550
+ } else {
2296
2551
  throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);
2297
2552
  }
2298
2553
  } else {
@@ -2339,11 +2594,10 @@ var ZodObject = class _ZodObject extends ZodType {
2339
2594
  unknownKeys: "strict",
2340
2595
  ...message !== void 0 ? {
2341
2596
  errorMap: (issue, ctx) => {
2342
- var _a, _b, _c, _d;
2343
- const defaultError = (_c = (_b = (_a = this._def).errorMap) === null || _b === void 0 ? void 0 : _b.call(_a, issue, ctx).message) !== null && _c !== void 0 ? _c : ctx.defaultError;
2597
+ const defaultError = this._def.errorMap?.(issue, ctx).message ?? ctx.defaultError;
2344
2598
  if (issue.code === "unrecognized_keys")
2345
2599
  return {
2346
- message: (_d = errorUtil.errToObj(message).message) !== null && _d !== void 0 ? _d : defaultError
2600
+ message: errorUtil.errToObj(message).message ?? defaultError
2347
2601
  };
2348
2602
  return {
2349
2603
  message: defaultError
@@ -2474,11 +2728,11 @@ var ZodObject = class _ZodObject extends ZodType {
2474
2728
  }
2475
2729
  pick(mask) {
2476
2730
  const shape = {};
2477
- util.objectKeys(mask).forEach((key) => {
2731
+ for (const key of util.objectKeys(mask)) {
2478
2732
  if (mask[key] && this.shape[key]) {
2479
2733
  shape[key] = this.shape[key];
2480
2734
  }
2481
- });
2735
+ }
2482
2736
  return new _ZodObject({
2483
2737
  ...this._def,
2484
2738
  shape: () => shape
@@ -2486,11 +2740,11 @@ var ZodObject = class _ZodObject extends ZodType {
2486
2740
  }
2487
2741
  omit(mask) {
2488
2742
  const shape = {};
2489
- util.objectKeys(this.shape).forEach((key) => {
2743
+ for (const key of util.objectKeys(this.shape)) {
2490
2744
  if (!mask[key]) {
2491
2745
  shape[key] = this.shape[key];
2492
2746
  }
2493
- });
2747
+ }
2494
2748
  return new _ZodObject({
2495
2749
  ...this._def,
2496
2750
  shape: () => shape
@@ -2504,14 +2758,14 @@ var ZodObject = class _ZodObject extends ZodType {
2504
2758
  }
2505
2759
  partial(mask) {
2506
2760
  const newShape = {};
2507
- util.objectKeys(this.shape).forEach((key) => {
2761
+ for (const key of util.objectKeys(this.shape)) {
2508
2762
  const fieldSchema = this.shape[key];
2509
2763
  if (mask && !mask[key]) {
2510
2764
  newShape[key] = fieldSchema;
2511
2765
  } else {
2512
2766
  newShape[key] = fieldSchema.optional();
2513
2767
  }
2514
- });
2768
+ }
2515
2769
  return new _ZodObject({
2516
2770
  ...this._def,
2517
2771
  shape: () => newShape
@@ -2519,7 +2773,7 @@ var ZodObject = class _ZodObject extends ZodType {
2519
2773
  }
2520
2774
  required(mask) {
2521
2775
  const newShape = {};
2522
- util.objectKeys(this.shape).forEach((key) => {
2776
+ for (const key of util.objectKeys(this.shape)) {
2523
2777
  if (mask && !mask[key]) {
2524
2778
  newShape[key] = this.shape[key];
2525
2779
  } else {
@@ -2530,7 +2784,7 @@ var ZodObject = class _ZodObject extends ZodType {
2530
2784
  }
2531
2785
  newShape[key] = newField;
2532
2786
  }
2533
- });
2787
+ }
2534
2788
  return new _ZodObject({
2535
2789
  ...this._def,
2536
2790
  shape: () => newShape
@@ -3146,12 +3400,7 @@ var ZodFunction = class _ZodFunction extends ZodType {
3146
3400
  return makeIssue({
3147
3401
  data: args,
3148
3402
  path: ctx.path,
3149
- errorMaps: [
3150
- ctx.common.contextualErrorMap,
3151
- ctx.schemaErrorMap,
3152
- getErrorMap(),
3153
- errorMap
3154
- ].filter((x) => !!x),
3403
+ errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x) => !!x),
3155
3404
  issueData: {
3156
3405
  code: ZodIssueCode.invalid_arguments,
3157
3406
  argumentsError: error
@@ -3162,12 +3411,7 @@ var ZodFunction = class _ZodFunction extends ZodType {
3162
3411
  return makeIssue({
3163
3412
  data: returns,
3164
3413
  path: ctx.path,
3165
- errorMaps: [
3166
- ctx.common.contextualErrorMap,
3167
- ctx.schemaErrorMap,
3168
- getErrorMap(),
3169
- errorMap
3170
- ].filter((x) => !!x),
3414
+ errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x) => !!x),
3171
3415
  issueData: {
3172
3416
  code: ZodIssueCode.invalid_return_type,
3173
3417
  returnTypeError: error
@@ -3546,7 +3790,10 @@ var ZodEffects = class extends ZodType {
3546
3790
  return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((base) => {
3547
3791
  if (!isValid(base))
3548
3792
  return base;
3549
- return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({ status: status.value, value: result }));
3793
+ return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({
3794
+ status: status.value,
3795
+ value: result
3796
+ }));
3550
3797
  });
3551
3798
  }
3552
3799
  }
@@ -3798,16 +4045,30 @@ ZodReadonly.create = (type, params) => {
3798
4045
  ...processCreateParams(params)
3799
4046
  });
3800
4047
  };
3801
- function custom(check, params = {}, fatal) {
4048
+ function cleanParams(params, data) {
4049
+ const p = typeof params === "function" ? params(data) : typeof params === "string" ? { message: params } : params;
4050
+ const p2 = typeof p === "string" ? { message: p } : p;
4051
+ return p2;
4052
+ }
4053
+ function custom(check, _params = {}, fatal) {
3802
4054
  if (check)
3803
4055
  return ZodAny.create().superRefine((data, ctx) => {
3804
- var _a, _b;
3805
- if (!check(data)) {
3806
- const p = typeof params === "function" ? params(data) : typeof params === "string" ? { message: params } : params;
3807
- const _fatal = (_b = (_a = p.fatal) !== null && _a !== void 0 ? _a : fatal) !== null && _b !== void 0 ? _b : true;
3808
- const p2 = typeof p === "string" ? { message: p } : p;
3809
- ctx.addIssue({ code: "custom", ...p2, fatal: _fatal });
4056
+ const r = check(data);
4057
+ if (r instanceof Promise) {
4058
+ return r.then((r2) => {
4059
+ if (!r2) {
4060
+ const params = cleanParams(_params, data);
4061
+ const _fatal = params.fatal ?? fatal ?? true;
4062
+ ctx.addIssue({ code: "custom", ...params, fatal: _fatal });
4063
+ }
4064
+ });
3810
4065
  }
4066
+ if (!r) {
4067
+ const params = cleanParams(_params, data);
4068
+ const _fatal = params.fatal ?? fatal ?? true;
4069
+ ctx.addIssue({ code: "custom", ...params, fatal: _fatal });
4070
+ }
4071
+ return;
3811
4072
  });
3812
4073
  return ZodAny.create();
3813
4074
  }
@@ -3904,130 +4165,14 @@ var coerce = {
3904
4165
  date: (arg) => ZodDate.create({ ...arg, coerce: true })
3905
4166
  };
3906
4167
  var NEVER = INVALID;
3907
- var z = /* @__PURE__ */ Object.freeze({
3908
- __proto__: null,
3909
- defaultErrorMap: errorMap,
3910
- setErrorMap,
3911
- getErrorMap,
3912
- makeIssue,
3913
- EMPTY_PATH,
3914
- addIssueToContext,
3915
- ParseStatus,
3916
- INVALID,
3917
- DIRTY,
3918
- OK,
3919
- isAborted,
3920
- isDirty,
3921
- isValid,
3922
- isAsync,
3923
- get util() {
3924
- return util;
3925
- },
3926
- get objectUtil() {
3927
- return objectUtil;
3928
- },
3929
- ZodParsedType,
3930
- getParsedType,
3931
- ZodType,
3932
- datetimeRegex,
3933
- ZodString,
3934
- ZodNumber,
3935
- ZodBigInt,
3936
- ZodBoolean,
3937
- ZodDate,
3938
- ZodSymbol,
3939
- ZodUndefined,
3940
- ZodNull,
3941
- ZodAny,
3942
- ZodUnknown,
3943
- ZodNever,
3944
- ZodVoid,
3945
- ZodArray,
3946
- ZodObject,
3947
- ZodUnion,
3948
- ZodDiscriminatedUnion,
3949
- ZodIntersection,
3950
- ZodTuple,
3951
- ZodRecord,
3952
- ZodMap,
3953
- ZodSet,
3954
- ZodFunction,
3955
- ZodLazy,
3956
- ZodLiteral,
3957
- ZodEnum,
3958
- ZodNativeEnum,
3959
- ZodPromise,
3960
- ZodEffects,
3961
- ZodTransformer: ZodEffects,
3962
- ZodOptional,
3963
- ZodNullable,
3964
- ZodDefault,
3965
- ZodCatch,
3966
- ZodNaN,
3967
- BRAND,
3968
- ZodBranded,
3969
- ZodPipeline,
3970
- ZodReadonly,
3971
- custom,
3972
- Schema: ZodType,
3973
- ZodSchema: ZodType,
3974
- late,
3975
- get ZodFirstPartyTypeKind() {
3976
- return ZodFirstPartyTypeKind;
3977
- },
3978
- coerce,
3979
- any: anyType,
3980
- array: arrayType,
3981
- bigint: bigIntType,
3982
- boolean: booleanType,
3983
- date: dateType,
3984
- discriminatedUnion: discriminatedUnionType,
3985
- effect: effectsType,
3986
- "enum": enumType,
3987
- "function": functionType,
3988
- "instanceof": instanceOfType,
3989
- intersection: intersectionType,
3990
- lazy: lazyType,
3991
- literal: literalType,
3992
- map: mapType,
3993
- nan: nanType,
3994
- nativeEnum: nativeEnumType,
3995
- never: neverType,
3996
- "null": nullType,
3997
- nullable: nullableType,
3998
- number: numberType,
3999
- object: objectType,
4000
- oboolean,
4001
- onumber,
4002
- optional: optionalType,
4003
- ostring,
4004
- pipeline: pipelineType,
4005
- preprocess: preprocessType,
4006
- promise: promiseType,
4007
- record: recordType,
4008
- set: setType,
4009
- strictObject: strictObjectType,
4010
- string: stringType,
4011
- symbol: symbolType,
4012
- transformer: effectsType,
4013
- tuple: tupleType,
4014
- "undefined": undefinedType,
4015
- union: unionType,
4016
- unknown: unknownType,
4017
- "void": voidType,
4018
- NEVER,
4019
- ZodIssueCode,
4020
- quotelessJson,
4021
- ZodError
4022
- });
4023
4168
 
4024
4169
  // lib/asstClient.ts
4025
- var baseUrlsSchema = z.object({
4026
- local: z.literal("https://localhost:8443/"),
4027
- test: z.literal(
4170
+ var baseUrlsSchema = external_exports.object({
4171
+ local: external_exports.literal("https://localhost:8443/"),
4172
+ test: external_exports.literal(
4028
4173
  "https://integration.api.spscommerce.com/assortment/gateway/"
4029
4174
  ),
4030
- prod: z.literal("https://api.spscommerce.com/assortment/gateway/")
4175
+ prod: external_exports.literal("https://api.spscommerce.com/assortment/gateway/")
4031
4176
  });
4032
4177
  var BASE_URLS = {
4033
4178
  local: "https://localhost:8443/",
@@ -4041,41 +4186,41 @@ var initialConfig = {
4041
4186
  };
4042
4187
 
4043
4188
  // lib/imports/models/ImportDetail.ts
4044
- var importDetailSchema = z.object({
4045
- completedAt: z.number().nullish(),
4046
- errorCount: z.number(),
4047
- importId: z.number(),
4048
- name: z.string(),
4049
- startedAt: z.string().nullish(),
4050
- status: z.string(),
4051
- uploadedAt: z.string()
4189
+ var importDetailSchema = external_exports.object({
4190
+ completedAt: external_exports.number().nullish(),
4191
+ errorCount: external_exports.number(),
4192
+ importId: external_exports.number(),
4193
+ name: external_exports.string(),
4194
+ startedAt: external_exports.string().nullish(),
4195
+ status: external_exports.string(),
4196
+ uploadedAt: external_exports.string()
4052
4197
  });
4053
4198
 
4054
4199
  // lib/imports/models/Import.ts
4055
- var importSchema = z.object({
4056
- count: z.number(),
4057
- imports: z.array(importDetailSchema)
4200
+ var importSchema = external_exports.object({
4201
+ count: external_exports.number(),
4202
+ imports: external_exports.array(importDetailSchema)
4058
4203
  });
4059
4204
 
4060
4205
  // lib/imports/models/ImportError.ts
4061
- var importErrorSchema = z.object({
4062
- attribute: z.string().nullish(),
4063
- description: z.string(),
4064
- importErrorId: z.number(),
4065
- row: z.number()
4206
+ var importErrorSchema = external_exports.object({
4207
+ attribute: external_exports.string().nullish(),
4208
+ description: external_exports.string(),
4209
+ importErrorId: external_exports.number(),
4210
+ row: external_exports.number()
4066
4211
  });
4067
4212
 
4068
4213
  // lib/imports/models/ImportErrors.ts
4069
- var importErrorsSchema = z.object({
4070
- count: z.number(),
4071
- errors: z.array(importErrorSchema),
4072
- hasNext: z.boolean(),
4073
- importId: z.number(),
4074
- totalCount: z.number()
4214
+ var importErrorsSchema = external_exports.object({
4215
+ count: external_exports.number(),
4216
+ errors: external_exports.array(importErrorSchema),
4217
+ hasNext: external_exports.boolean(),
4218
+ importId: external_exports.number(),
4219
+ totalCount: external_exports.number()
4075
4220
  });
4076
4221
 
4077
4222
  // lib/imports/models/ImportsStatusEnum.ts
4078
- var importStatusEnumSchema = z.enum([
4223
+ var importStatusEnumSchema = external_exports.enum([
4079
4224
  "QUEUED_FOR_IMPORT",
4080
4225
  "IN_PROGRESS",
4081
4226
  "DOC_FAILED",
@@ -4084,39 +4229,39 @@ var importStatusEnumSchema = z.enum([
4084
4229
  ]);
4085
4230
 
4086
4231
  // lib/imports/models/ImportsStatus.ts
4087
- var importsStatusSchema = z.object({
4088
- completedAt: z.string().nullish(),
4089
- docInEventId: z.string().nullish(),
4090
- errorCount: z.number().nullish(),
4091
- importId: z.number(),
4092
- invalidItemCount: z.number().nullish(),
4093
- name: z.string().nullish(),
4232
+ var importsStatusSchema = external_exports.object({
4233
+ completedAt: external_exports.string().nullish(),
4234
+ docInEventId: external_exports.string().nullish(),
4235
+ errorCount: external_exports.number().nullish(),
4236
+ importId: external_exports.number(),
4237
+ invalidItemCount: external_exports.number().nullish(),
4238
+ name: external_exports.string().nullish(),
4094
4239
  status: importStatusEnumSchema,
4095
- totalItemCount: z.number().nullish(),
4096
- validItemCount: z.number().nullish()
4240
+ totalItemCount: external_exports.number().nullish(),
4241
+ validItemCount: external_exports.number().nullish()
4097
4242
  });
4098
4243
 
4099
4244
  // lib/imports/models/VendorPartnerAttGroups.ts
4100
- var vendorPartnerAttGroupsSchema = z.object({
4101
- partnerCompanyId: z.number(),
4102
- partnerCompanyName: z.string(),
4103
- partnerAttributeGroups: z.array(z.number())
4245
+ var vendorPartnerAttGroupsSchema = external_exports.object({
4246
+ partnerCompanyId: external_exports.number(),
4247
+ partnerCompanyName: external_exports.string(),
4248
+ partnerAttributeGroups: external_exports.array(external_exports.number())
4104
4249
  });
4105
4250
 
4106
4251
  // lib/imports/models/GenerateImportTemplateParams.ts
4107
- var generateImportTemplateParamsSchema = z.object({
4108
- "multi-sheet": z.boolean(),
4109
- gids: z.string().optional(),
4110
- productTypeIds: z.string().optional(),
4111
- groupTypeId: z.number().optional(),
4112
- includeGuides: z.boolean().optional()
4252
+ var generateImportTemplateParamsSchema = external_exports.object({
4253
+ "multi-sheet": external_exports.boolean(),
4254
+ gids: external_exports.string().optional(),
4255
+ productTypeIds: external_exports.string().optional(),
4256
+ groupTypeId: external_exports.number().optional(),
4257
+ includeGuides: external_exports.boolean().optional()
4113
4258
  });
4114
4259
 
4115
4260
  // lib/exports/models/ExportType.ts
4116
- var exportTypeEnum = z.enum(["ALL", "UPDATES", "DELTAS_UPDATE", "NO_BUYER_PART_NUMBER"]);
4261
+ var exportTypeEnum = external_exports.enum(["ALL", "UPDATES", "DELTAS_UPDATE", "NO_BUYER_PART_NUMBER"]);
4117
4262
 
4118
4263
  // lib/exports/models/ExportFrequency.ts
4119
- var exportFrequencyEnum = z.enum([
4264
+ var exportFrequencyEnum = external_exports.enum([
4120
4265
  "IMMEDIATE",
4121
4266
  "ONETIME",
4122
4267
  "DAILY",
@@ -4125,7 +4270,7 @@ var exportFrequencyEnum = z.enum([
4125
4270
  ]);
4126
4271
 
4127
4272
  // lib/exports/models/ExportDayOfWeek.ts
4128
- var exportDayOfWeekEnum = z.enum([
4273
+ var exportDayOfWeekEnum = external_exports.enum([
4129
4274
  "MON",
4130
4275
  "TUE",
4131
4276
  "WED",
@@ -4136,118 +4281,118 @@ var exportDayOfWeekEnum = z.enum([
4136
4281
  ]);
4137
4282
 
4138
4283
  // lib/exports/models/Export.ts
4139
- var exportSchema = z.object({
4140
- exportName: z.string(),
4141
- exportDescription: z.string(),
4142
- isActive: z.boolean(),
4284
+ var exportSchema = external_exports.object({
4285
+ exportName: external_exports.string(),
4286
+ exportDescription: external_exports.string(),
4287
+ isActive: external_exports.boolean(),
4143
4288
  exportType: exportTypeEnum,
4144
4289
  exportFrequency: exportFrequencyEnum,
4145
- includeValidAttributes: z.optional(z.boolean()),
4146
- dayOfMonth: z.optional(z.number()),
4147
- dayOfWeek: z.optional(exportDayOfWeekEnum),
4148
- hourOfDay: z.optional(z.number()),
4149
- date: z.optional(z.string()),
4150
- catalogIds: z.optional(z.array(z.number())),
4151
- itemInfoIds: z.optional(z.array(z.number())),
4152
- excludeItemInfoIds: z.optional(z.array(z.number())),
4153
- selectionCodeIds: z.optional(z.array(z.number())),
4154
- productCodeIds: z.optional(z.array(z.number())),
4155
- productTypes: z.optional(z.array(z.string())),
4156
- deliveryType: z.optional(z.string()),
4157
- spreadsheetTemplateId: z.optional(z.number()),
4158
- emailAddresses: z.optional(z.array(z.string())),
4159
- subjectLine: z.optional(z.string()),
4160
- additionalLocales: z.optional(z.array(z.string())),
4161
- availableAttributeList: z.optional(z.array(z.string()))
4290
+ includeValidAttributes: external_exports.optional(external_exports.boolean()),
4291
+ dayOfMonth: external_exports.optional(external_exports.number()),
4292
+ dayOfWeek: external_exports.optional(exportDayOfWeekEnum),
4293
+ hourOfDay: external_exports.optional(external_exports.number()),
4294
+ date: external_exports.optional(external_exports.string()),
4295
+ catalogIds: external_exports.optional(external_exports.array(external_exports.number())),
4296
+ itemInfoIds: external_exports.optional(external_exports.array(external_exports.number())),
4297
+ excludeItemInfoIds: external_exports.optional(external_exports.array(external_exports.number())),
4298
+ selectionCodeIds: external_exports.optional(external_exports.array(external_exports.number())),
4299
+ productCodeIds: external_exports.optional(external_exports.array(external_exports.number())),
4300
+ productTypes: external_exports.optional(external_exports.array(external_exports.string())),
4301
+ deliveryType: external_exports.optional(external_exports.string()),
4302
+ spreadsheetTemplateId: external_exports.optional(external_exports.number()),
4303
+ emailAddresses: external_exports.optional(external_exports.array(external_exports.string())),
4304
+ subjectLine: external_exports.optional(external_exports.string()),
4305
+ additionalLocales: external_exports.optional(external_exports.array(external_exports.string())),
4306
+ availableAttributeList: external_exports.optional(external_exports.array(external_exports.string()))
4162
4307
  });
4163
4308
 
4164
4309
  // lib/exports/models/DownloadItemsParams.ts
4165
- var downLoadItemsParamsSchema = z.object({
4166
- "multi-sheet": z.boolean(),
4167
- ids: z.array(z.string())
4310
+ var downLoadItemsParamsSchema = external_exports.object({
4311
+ "multi-sheet": external_exports.boolean(),
4312
+ ids: external_exports.array(external_exports.string())
4168
4313
  });
4169
4314
 
4170
4315
  // lib/categories/models/ItemCategory.ts
4171
- var itemCategorySchema = z.object({
4172
- categoryid: z.number(),
4173
- encodedCategoryId: z.string(),
4174
- companyId: z.number(),
4175
- name: z.string(),
4176
- isActive: z.number(),
4177
- createdDate: z.number().nullish(),
4178
- categorytimestamp: z.number().nullish(),
4179
- typeId: z.number(),
4180
- type: z.string(),
4181
- categorykey: z.string().nullish(),
4182
- description: z.string().nullish(),
4183
- categoryCatalogName: z.string().nullish()
4316
+ var itemCategorySchema = external_exports.object({
4317
+ categoryid: external_exports.number(),
4318
+ encodedCategoryId: external_exports.string(),
4319
+ companyId: external_exports.number(),
4320
+ name: external_exports.string(),
4321
+ isActive: external_exports.number(),
4322
+ createdDate: external_exports.number().nullish(),
4323
+ categorytimestamp: external_exports.number().nullish(),
4324
+ typeId: external_exports.number(),
4325
+ type: external_exports.string(),
4326
+ categorykey: external_exports.string().nullish(),
4327
+ description: external_exports.string().nullish(),
4328
+ categoryCatalogName: external_exports.string().nullish()
4184
4329
  });
4185
4330
 
4186
4331
  // lib/categories/models/ItemCategoriesSearch.ts
4187
- var itemCategoriesSearchSchema = z.object({
4188
- count: z.number(),
4189
- data: z.array(itemCategorySchema)
4332
+ var itemCategoriesSearchSchema = external_exports.object({
4333
+ count: external_exports.number(),
4334
+ data: external_exports.array(itemCategorySchema)
4190
4335
  });
4191
4336
 
4192
4337
  // lib/categories/models/ItemHierarchyResponse.ts
4193
- var baseHierarchySchema = z.object({
4194
- id: z.string(),
4195
- name: z.string().nullish(),
4196
- description: z.string().nullish(),
4197
- type: z.string().nullish()
4338
+ var baseHierarchySchema = external_exports.object({
4339
+ id: external_exports.string(),
4340
+ name: external_exports.string().nullish(),
4341
+ description: external_exports.string().nullish(),
4342
+ type: external_exports.string().nullish()
4198
4343
  });
4199
4344
  var hierarchySchema = baseHierarchySchema.extend({
4200
- child: z.lazy(() => hierarchySchema).nullable()
4345
+ child: external_exports.lazy(() => hierarchySchema).nullable()
4201
4346
  });
4202
- var itemHierarchyResponseSchema = z.object({
4203
- itemHierarchies: z.array(
4204
- z.object({
4205
- itemId: z.string(),
4206
- hierarchies: z.array(hierarchySchema)
4347
+ var itemHierarchyResponseSchema = external_exports.object({
4348
+ itemHierarchies: external_exports.array(
4349
+ external_exports.object({
4350
+ itemId: external_exports.string(),
4351
+ hierarchies: external_exports.array(hierarchySchema)
4207
4352
  })
4208
4353
  )
4209
4354
  });
4210
4355
 
4211
4356
  // lib/attributes/models/AttributeMetaData.ts
4212
- var attributeMetaDataSchema = z.object({
4213
- dbName: z.string(),
4214
- label: z.string(),
4215
- group: z.string(),
4216
- aliases: z.array(z.string()),
4217
- orderBy: z.string().or(z.number()),
4218
- type: z.string(),
4219
- storageType: z.string(),
4220
- rsxPath: z.string(),
4221
- indexed: z.boolean(),
4222
- repeatable: z.boolean(),
4223
- extended: z.boolean(),
4224
- hybrid: z.boolean(),
4225
- userVisible: z.boolean(),
4226
- retailerOwnedId: z.number().nullish()
4357
+ var attributeMetaDataSchema = external_exports.object({
4358
+ dbName: external_exports.string(),
4359
+ label: external_exports.string(),
4360
+ group: external_exports.string(),
4361
+ aliases: external_exports.array(external_exports.string()),
4362
+ orderBy: external_exports.string().or(external_exports.number()),
4363
+ type: external_exports.string(),
4364
+ storageType: external_exports.string(),
4365
+ rsxPath: external_exports.string(),
4366
+ indexed: external_exports.boolean(),
4367
+ repeatable: external_exports.boolean(),
4368
+ extended: external_exports.boolean(),
4369
+ hybrid: external_exports.boolean(),
4370
+ userVisible: external_exports.boolean(),
4371
+ retailerOwnedId: external_exports.number().nullish()
4227
4372
  });
4228
4373
 
4229
4374
  // lib/attributes/models/AttributeSummary.ts
4230
- var attributeSummarySchema = z.object({
4231
- attributeId: z.number(),
4232
- attributeName: z.string(),
4233
- displayName: z.string(),
4234
- modifiedBy: z.string(),
4235
- modifiedDate: z.number(),
4236
- retailerOwnedId: z.number().nullish(),
4237
- clusterAttrGroupId: z.number().nullish(),
4238
- attributeType: z.string()
4375
+ var attributeSummarySchema = external_exports.object({
4376
+ attributeId: external_exports.number(),
4377
+ attributeName: external_exports.string(),
4378
+ displayName: external_exports.string(),
4379
+ modifiedBy: external_exports.string(),
4380
+ modifiedDate: external_exports.number(),
4381
+ retailerOwnedId: external_exports.number().nullish(),
4382
+ clusterAttrGroupId: external_exports.number().nullish(),
4383
+ attributeType: external_exports.string()
4239
4384
  });
4240
4385
 
4241
4386
  // lib/attributes/models/AttributesByCompany.ts
4242
- var attributesByCompanySchema = z.object({
4243
- next: z.string().nullish(),
4244
- previous: z.string().nullish(),
4245
- count: z.number(),
4246
- results: z.array(attributeSummarySchema)
4387
+ var attributesByCompanySchema = external_exports.object({
4388
+ next: external_exports.string().nullish(),
4389
+ previous: external_exports.string().nullish(),
4390
+ count: external_exports.number(),
4391
+ results: external_exports.array(attributeSummarySchema)
4247
4392
  });
4248
4393
 
4249
4394
  // lib/attributes/models/AttrDatatypeNameEnum.ts
4250
- var attrDatatypeNameEnumSchema = z.enum([
4395
+ var attrDatatypeNameEnumSchema = external_exports.enum([
4251
4396
  "TEXT",
4252
4397
  "SET",
4253
4398
  "INTEGER",
@@ -4260,126 +4405,126 @@ var attrDatatypeNameEnumSchema = z.enum([
4260
4405
  ]);
4261
4406
 
4262
4407
  // lib/attributes/models/AttributeGroup.ts
4263
- var attributeGroupSchema = z.object({
4264
- attrGroupId: z.number(),
4265
- attrGroupType: z.object({
4266
- attrGroupTypeId: z.number(),
4267
- groupTypeName: z.string(),
4268
- primary: z.boolean(),
4269
- restricted: z.boolean()
4408
+ var attributeGroupSchema = external_exports.object({
4409
+ attrGroupId: external_exports.number(),
4410
+ attrGroupType: external_exports.object({
4411
+ attrGroupTypeId: external_exports.number(),
4412
+ groupTypeName: external_exports.string(),
4413
+ primary: external_exports.boolean(),
4414
+ restricted: external_exports.boolean()
4270
4415
  }),
4271
- attrGroupTypeId: z.number(),
4272
- groupName: z.string(),
4273
- isDefault: z.boolean(),
4274
- orderWeight: z.number(),
4275
- primary: z.boolean()
4416
+ attrGroupTypeId: external_exports.number(),
4417
+ groupName: external_exports.string(),
4418
+ isDefault: external_exports.boolean(),
4419
+ orderWeight: external_exports.number(),
4420
+ primary: external_exports.boolean()
4276
4421
  });
4277
4422
 
4278
4423
  // lib/attributes/models/AttributeDefinition.ts
4279
- var parentAttributeSchema = z.object({
4280
- attrDataTypeId: z.number(),
4281
- attrDatatype: z.object({
4282
- attrDatatypeId: z.number(),
4424
+ var parentAttributeSchema = external_exports.object({
4425
+ attrDataTypeId: external_exports.number(),
4426
+ attrDatatype: external_exports.object({
4427
+ attrDatatypeId: external_exports.number(),
4283
4428
  datatypeName: attrDatatypeNameEnumSchema,
4284
- displayOnly: z.boolean()
4429
+ displayOnly: external_exports.boolean()
4285
4430
  }),
4286
- attrGroupId: z.number(),
4287
- attrGroups: z.array(attributeGroupSchema),
4288
- attrRoundId: z.number(),
4289
- attrStorageId: z.number(),
4290
- attributeId: z.number(),
4291
- attributeName: z.string(),
4292
- createdBy: z.string(),
4293
- createdDate: z.number(),
4294
- description: z.string().optional(),
4295
- displayName: z.string(),
4296
- modifiedDate: z.number(),
4297
- orderWeight: z.number(),
4298
- parentAttributeId: z.number().optional(),
4431
+ attrGroupId: external_exports.number(),
4432
+ attrGroups: external_exports.array(attributeGroupSchema),
4433
+ attrRoundId: external_exports.number(),
4434
+ attrStorageId: external_exports.number(),
4435
+ attributeId: external_exports.number(),
4436
+ attributeName: external_exports.string(),
4437
+ createdBy: external_exports.string(),
4438
+ createdDate: external_exports.number(),
4439
+ description: external_exports.string().optional(),
4440
+ displayName: external_exports.string(),
4441
+ modifiedDate: external_exports.number(),
4442
+ orderWeight: external_exports.number(),
4443
+ parentAttributeId: external_exports.number().optional(),
4299
4444
  primaryAttrGroup: attributeGroupSchema
4300
4445
  });
4301
- var attributeDefinitionSchema = z.object({
4302
- attrDataTypeId: z.number(),
4303
- attrDatatype: z.object({
4304
- attrDatatypeId: z.number(),
4446
+ var attributeDefinitionSchema = external_exports.object({
4447
+ attrDataTypeId: external_exports.number(),
4448
+ attrDatatype: external_exports.object({
4449
+ attrDatatypeId: external_exports.number(),
4305
4450
  datatypeName: attrDatatypeNameEnumSchema,
4306
- displayOnly: z.boolean()
4451
+ displayOnly: external_exports.boolean()
4307
4452
  }),
4308
- attrGroupId: z.number(),
4309
- attrGroups: z.array(attributeGroupSchema),
4310
- attrRestrictions: z.array(
4311
- z.object({
4312
- attrRestrictId: z.number(),
4313
- ignoreGlobal: z.boolean().optional(),
4314
- isDefault: z.boolean(),
4315
- isEssential: z.boolean(),
4316
- locale: z.string(),
4317
- mandatory: z.boolean(),
4318
- repeatable: z.boolean(),
4319
- minLength: z.number().optional(),
4320
- maxLength: z.number().optional()
4453
+ attrGroupId: external_exports.number(),
4454
+ attrGroups: external_exports.array(attributeGroupSchema),
4455
+ attrRestrictions: external_exports.array(
4456
+ external_exports.object({
4457
+ attrRestrictId: external_exports.number(),
4458
+ ignoreGlobal: external_exports.boolean().optional(),
4459
+ isDefault: external_exports.boolean(),
4460
+ isEssential: external_exports.boolean(),
4461
+ locale: external_exports.string(),
4462
+ mandatory: external_exports.boolean(),
4463
+ repeatable: external_exports.boolean(),
4464
+ minLength: external_exports.number().optional(),
4465
+ maxLength: external_exports.number().optional()
4321
4466
  })
4322
4467
  ).optional(),
4323
- attrRoundId: z.number(),
4324
- attrStorage: z.object({
4325
- attrStorageId: z.number(),
4326
- storageName: z.string()
4468
+ attrRoundId: external_exports.number(),
4469
+ attrStorage: external_exports.object({
4470
+ attrStorageId: external_exports.number(),
4471
+ storageName: external_exports.string()
4327
4472
  }),
4328
- attrStorageId: z.number(),
4329
- attrValues: z.array(
4330
- z.object({
4331
- attrKeyPair: z.string(),
4332
- attrValueId: z.number().optional(),
4333
- isDefault: z.boolean(),
4334
- locale: z.string(),
4335
- value: z.string()
4473
+ attrStorageId: external_exports.number(),
4474
+ attrValues: external_exports.array(
4475
+ external_exports.object({
4476
+ attrKeyPair: external_exports.string(),
4477
+ attrValueId: external_exports.number().optional(),
4478
+ isDefault: external_exports.boolean(),
4479
+ locale: external_exports.string(),
4480
+ value: external_exports.string()
4336
4481
  })
4337
4482
  ).optional(),
4338
- attributeId: z.number(),
4339
- attributeName: z.string(),
4340
- createdBy: z.string(),
4341
- createdDate: z.number(),
4342
- description: z.string().optional(),
4343
- displayName: z.string(),
4344
- modifiedDate: z.number(),
4345
- orderWeight: z.number().optional(),
4483
+ attributeId: external_exports.number(),
4484
+ attributeName: external_exports.string(),
4485
+ createdBy: external_exports.string(),
4486
+ createdDate: external_exports.number(),
4487
+ description: external_exports.string().optional(),
4488
+ displayName: external_exports.string(),
4489
+ modifiedDate: external_exports.number(),
4490
+ orderWeight: external_exports.number().optional(),
4346
4491
  parentAttribute: parentAttributeSchema.optional(),
4347
- parentAttributeId: z.number().optional(),
4492
+ parentAttributeId: external_exports.number().optional(),
4348
4493
  primaryAttrGroup: attributeGroupSchema
4349
4494
  });
4350
4495
 
4351
4496
  // lib/attributes/models/AttributeValidValues.ts
4352
- var attributeValidValuesSchema = z.object({
4353
- value: z.string(),
4354
- isDefault: z.boolean(),
4355
- locale: z.string(),
4356
- createdBy: z.string(),
4357
- createdDate: z.number(),
4358
- modifiedDate: z.number(),
4359
- modifiedBy: z.string(),
4360
- attributeId: z.number(),
4361
- attrValueId: z.number(),
4362
- attrKeyPair: z.string()
4497
+ var attributeValidValuesSchema = external_exports.object({
4498
+ value: external_exports.string(),
4499
+ isDefault: external_exports.boolean(),
4500
+ locale: external_exports.string(),
4501
+ createdBy: external_exports.string(),
4502
+ createdDate: external_exports.number(),
4503
+ modifiedDate: external_exports.number(),
4504
+ modifiedBy: external_exports.string(),
4505
+ attributeId: external_exports.number(),
4506
+ attrValueId: external_exports.number(),
4507
+ attrKeyPair: external_exports.string()
4363
4508
  });
4364
4509
 
4365
4510
  // lib/items/v1/models/ItemHeader.ts
4366
- var itemHeaderSchema = z.object({
4367
- status: z.string().optional(),
4368
- catalogName: z.string(),
4369
- productCodeName: z.string(),
4370
- selectionCodeName: z.string(),
4371
- gtin: z.string(),
4372
- upc: z.string(),
4373
- ean: z.string(),
4374
- isbn: z.string(),
4375
- partNumber: z.string(),
4376
- lastUpdatedDateString: z.string(),
4377
- companyId: z.string(),
4378
- itemInfoId: z.string()
4511
+ var itemHeaderSchema = external_exports.object({
4512
+ status: external_exports.string().optional(),
4513
+ catalogName: external_exports.string(),
4514
+ productCodeName: external_exports.string(),
4515
+ selectionCodeName: external_exports.string(),
4516
+ gtin: external_exports.string(),
4517
+ upc: external_exports.string(),
4518
+ ean: external_exports.string(),
4519
+ isbn: external_exports.string(),
4520
+ partNumber: external_exports.string(),
4521
+ lastUpdatedDateString: external_exports.string(),
4522
+ companyId: external_exports.string(),
4523
+ itemInfoId: external_exports.string()
4379
4524
  });
4380
4525
 
4381
4526
  // lib/items/v1/models/PhaseEnum.ts
4382
- var phaseEnumSchema = z.enum([
4527
+ var phaseEnumSchema = external_exports.enum([
4383
4528
  "CORE",
4384
4529
  "CORE_PLUS",
4385
4530
  "CORE_ADVANCED",
@@ -4388,61 +4533,61 @@ var phaseEnumSchema = z.enum([
4388
4533
  ]);
4389
4534
 
4390
4535
  // lib/items/v1/models/TradingPartnerStage.ts
4391
- var tradingPartnerStageSchema = z.object({
4392
- companyId: z.number(),
4393
- companyName: z.string(),
4394
- stage: z.nullable(phaseEnumSchema),
4395
- isValid: z.boolean()
4536
+ var tradingPartnerStageSchema = external_exports.object({
4537
+ companyId: external_exports.number(),
4538
+ companyName: external_exports.string(),
4539
+ stage: external_exports.nullable(phaseEnumSchema),
4540
+ isValid: external_exports.boolean()
4396
4541
  });
4397
4542
 
4398
4543
  // lib/items/v1/models/ItemMap.ts
4399
- var itemMapSchema = z.object({
4400
- rn: z.number().optional(),
4401
- iteminfoid: z.string(),
4402
- tradingPartnerStages: z.array(tradingPartnerStageSchema).optional(),
4403
- gtin: z.string().nullish(),
4404
- catalogname: z.string().nullish(),
4405
- isbn: z.string().nullish(),
4406
- lastupdateddatestring: z.string().nullish(),
4407
- upc: z.string().nullish(),
4408
- productcodename: z.string().nullish(),
4409
- ean: z.string().nullish(),
4410
- selectioncodename: z.string().nullish(),
4411
- createddatestring: z.string().nullish(),
4412
- partnumber: z.string().nullish(),
4413
- consumeravailabledatestring: z.string().nullish(),
4414
- status: z.string().nullish(),
4415
- nrfcolorcode: z.array(z.string()).nullish(),
4416
- nrfsizecode: z.array(z.string()).nullish(),
4417
- productcolordescription: z.array(z.string()).nullish(),
4418
- productsizedescription: z.array(z.string()).nullish()
4544
+ var itemMapSchema = external_exports.object({
4545
+ rn: external_exports.number().optional(),
4546
+ iteminfoid: external_exports.string(),
4547
+ tradingPartnerStages: external_exports.array(tradingPartnerStageSchema).optional(),
4548
+ gtin: external_exports.string().nullish(),
4549
+ catalogname: external_exports.string().nullish(),
4550
+ isbn: external_exports.string().nullish(),
4551
+ lastupdateddatestring: external_exports.string().nullish(),
4552
+ upc: external_exports.string().nullish(),
4553
+ productcodename: external_exports.string().nullish(),
4554
+ ean: external_exports.string().nullish(),
4555
+ selectioncodename: external_exports.string().nullish(),
4556
+ createddatestring: external_exports.string().nullish(),
4557
+ partnumber: external_exports.string().nullish(),
4558
+ consumeravailabledatestring: external_exports.string().nullish(),
4559
+ status: external_exports.string().nullish(),
4560
+ nrfcolorcode: external_exports.array(external_exports.string()).nullish(),
4561
+ nrfsizecode: external_exports.array(external_exports.string()).nullish(),
4562
+ productcolordescription: external_exports.array(external_exports.string()).nullish(),
4563
+ productsizedescription: external_exports.array(external_exports.string()).nullish()
4419
4564
  }).passthrough();
4420
4565
 
4421
4566
  // lib/items/v1/models/ItemTable.ts
4422
- var itemTableSchema = z.object({
4567
+ var itemTableSchema = external_exports.object({
4423
4568
  headers: itemHeaderSchema,
4424
- itemMaps: z.array(itemMapSchema)
4569
+ itemMaps: external_exports.array(itemMapSchema)
4425
4570
  });
4426
4571
 
4427
4572
  // lib/items/v1/models/ItemSearchView.ts
4428
- var itemSearchViewSchema = z.object({
4573
+ var itemSearchViewSchema = external_exports.object({
4429
4574
  itemTable: itemTableSchema,
4430
- hasNext: z.boolean(),
4431
- count: z.number()
4575
+ hasNext: external_exports.boolean(),
4576
+ count: external_exports.number()
4432
4577
  });
4433
4578
 
4434
4579
  // lib/items/v1/models/AttributeDetail.ts
4435
- var attributeDetailSchema = z.object({
4580
+ var attributeDetailSchema = external_exports.object({
4436
4581
  type: attrDatatypeNameEnumSchema,
4437
- name: z.string(),
4438
- value: z.string().or(z.number()).or(z.array(z.string())).or(z.array(z.number())).nullable(),
4439
- label: z.string(),
4440
- group: z.string(),
4441
- orderBy: z.number().or(z.string()).nullish()
4582
+ name: external_exports.string(),
4583
+ value: external_exports.string().or(external_exports.number()).or(external_exports.array(external_exports.string())).or(external_exports.array(external_exports.number())).nullable(),
4584
+ label: external_exports.string(),
4585
+ group: external_exports.string(),
4586
+ orderBy: external_exports.number().or(external_exports.string()).nullish()
4442
4587
  });
4443
4588
 
4444
4589
  // lib/items/v1/models/CategoryEnum.ts
4445
- var categoryEnumSchema = z.enum([
4590
+ var categoryEnumSchema = external_exports.enum([
4446
4591
  "ALIAS",
4447
4592
  "CATALOG",
4448
4593
  "EXPORT",
@@ -4455,411 +4600,411 @@ var categoryEnumSchema = z.enum([
4455
4600
  ]);
4456
4601
 
4457
4602
  // lib/items/v1/models/ComponentDetails.ts
4458
- var componentDetailsSchema = z.object({
4459
- itemInfoId: z.number(),
4460
- description: z.string().nullish(),
4461
- saleable: z.boolean(),
4462
- valid: z.boolean(),
4463
- uniqueCriteria: z.array(
4464
- z.object({
4465
- name: z.string(),
4466
- value: z.string()
4603
+ var componentDetailsSchema = external_exports.object({
4604
+ itemInfoId: external_exports.number(),
4605
+ description: external_exports.string().nullish(),
4606
+ saleable: external_exports.boolean(),
4607
+ valid: external_exports.boolean(),
4608
+ uniqueCriteria: external_exports.array(
4609
+ external_exports.object({
4610
+ name: external_exports.string(),
4611
+ value: external_exports.string()
4467
4612
  })
4468
4613
  )
4469
4614
  });
4470
4615
 
4471
4616
  // lib/items/v1/models/RepeatableGroup.ts
4472
- var repeatableGroupSchema = z.object({
4473
- repeatableGroupId: z.string(),
4474
- repeatableNumber: z.number()
4617
+ var repeatableGroupSchema = external_exports.object({
4618
+ repeatableGroupId: external_exports.string(),
4619
+ repeatableNumber: external_exports.number()
4475
4620
  });
4476
4621
 
4477
4622
  // lib/items/v1/models/GroupedAttributeList.ts
4478
- var groupedAttributeListSchema = z.object({
4479
- type: z.string(),
4480
- rows: z.array(z.array(attributeDetailSchema)),
4481
- repeatableGroups: z.array(repeatableGroupSchema)
4623
+ var groupedAttributeListSchema = external_exports.object({
4624
+ type: external_exports.string(),
4625
+ rows: external_exports.array(external_exports.array(attributeDetailSchema)),
4626
+ repeatableGroups: external_exports.array(repeatableGroupSchema)
4482
4627
  });
4483
4628
 
4484
4629
  // lib/items/v1/models/GroupedAttributes.ts
4485
- var groupedAttributesSchema = z.object({
4486
- type: z.string(),
4487
- attributes: z.array(attributeDetailSchema),
4488
- attributeGroups: z.array(groupedAttributeListSchema)
4630
+ var groupedAttributesSchema = external_exports.object({
4631
+ type: external_exports.string(),
4632
+ attributes: external_exports.array(attributeDetailSchema),
4633
+ attributeGroups: external_exports.array(groupedAttributeListSchema)
4489
4634
  });
4490
4635
 
4491
4636
  // lib/items/v1/models/HierarchyCategory.ts
4492
- var hierarchyCategorySchema = z.object({
4493
- name: z.string(),
4494
- description: z.string().nullish(),
4495
- id: z.number(),
4496
- companyId: z.number().nullish(),
4637
+ var hierarchyCategorySchema = external_exports.object({
4638
+ name: external_exports.string(),
4639
+ description: external_exports.string().nullish(),
4640
+ id: external_exports.number(),
4641
+ companyId: external_exports.number().nullish(),
4497
4642
  type: categoryEnumSchema
4498
4643
  });
4499
4644
 
4500
4645
  // lib/items/v1/models/HierarchyDetails.ts
4501
- var hierarchyDetailsSchema = z.object({
4502
- catalogs: z.array(hierarchyCategorySchema),
4503
- selectionCodes: z.array(hierarchyCategorySchema),
4504
- productCodes: z.array(hierarchyCategorySchema)
4646
+ var hierarchyDetailsSchema = external_exports.object({
4647
+ catalogs: external_exports.array(hierarchyCategorySchema),
4648
+ selectionCodes: external_exports.array(hierarchyCategorySchema),
4649
+ productCodes: external_exports.array(hierarchyCategorySchema)
4505
4650
  });
4506
4651
 
4507
4652
  // lib/items/v1/models/PackComponentItemInfo.ts
4508
- var packComponentItemInfoSchema = z.object({
4509
- companyid: z.number(),
4510
- createddate: z.number(),
4511
- isServiceApi: z.boolean(),
4512
- isactive: z.number(),
4513
- isvalid: z.number(),
4514
- itemType: z.string(),
4515
- iteminfoid: z.number(),
4516
- itemtimestamp: z.number(),
4517
- serviceId: z.number(),
4518
- attributes: z.record(z.string(), z.string().or(z.array(z.string())))
4653
+ var packComponentItemInfoSchema = external_exports.object({
4654
+ companyid: external_exports.number(),
4655
+ createddate: external_exports.number(),
4656
+ isServiceApi: external_exports.boolean(),
4657
+ isactive: external_exports.number(),
4658
+ isvalid: external_exports.number(),
4659
+ itemType: external_exports.string(),
4660
+ iteminfoid: external_exports.number(),
4661
+ itemtimestamp: external_exports.number(),
4662
+ serviceId: external_exports.number(),
4663
+ attributes: external_exports.record(external_exports.string(), external_exports.string().or(external_exports.array(external_exports.string())))
4519
4664
  });
4520
4665
 
4521
4666
  // lib/items/v1/models/ItemPrice.ts
4522
- var itemPriceSchema = z.object({
4523
- amount: z.number(),
4524
- currency: z.string(),
4525
- id: z.number().nullish(),
4526
- priceDivision: z.string().nullish(),
4527
- iteminfoid: z.number().nullish(),
4528
- startdate: z.string().nullish(),
4529
- enddate: z.string().nullish(),
4530
- qualifier: z.string(),
4531
- region: z.string().nullish(),
4532
- regionqualifier: z.string().nullish(),
4533
- regiondescription: z.string().nullish(),
4534
- partnercompanyid: z.string().nullish(),
4535
- itempricetimestamp: z.number().nullish(),
4536
- range_type: z.string().nullish(),
4537
- date_range_type: z.string().nullish(),
4538
- min_range: z.number().nullish(),
4539
- gtin: z.string().nullish(),
4540
- priceConditionDescription: z.string().nullish(),
4541
- priceUnitQuantity: z.number().nullish(),
4542
- priceUnitQuantityUOM: z.string().nullish()
4667
+ var itemPriceSchema = external_exports.object({
4668
+ amount: external_exports.number(),
4669
+ currency: external_exports.string(),
4670
+ id: external_exports.number().nullish(),
4671
+ priceDivision: external_exports.string().nullish(),
4672
+ iteminfoid: external_exports.number().nullish(),
4673
+ startdate: external_exports.string().nullish(),
4674
+ enddate: external_exports.string().nullish(),
4675
+ qualifier: external_exports.string(),
4676
+ region: external_exports.string().nullish(),
4677
+ regionqualifier: external_exports.string().nullish(),
4678
+ regiondescription: external_exports.string().nullish(),
4679
+ partnercompanyid: external_exports.string().nullish(),
4680
+ itempricetimestamp: external_exports.number().nullish(),
4681
+ range_type: external_exports.string().nullish(),
4682
+ date_range_type: external_exports.string().nullish(),
4683
+ min_range: external_exports.number().nullish(),
4684
+ gtin: external_exports.string().nullish(),
4685
+ priceConditionDescription: external_exports.string().nullish(),
4686
+ priceUnitQuantity: external_exports.number().nullish(),
4687
+ priceUnitQuantityUOM: external_exports.string().nullish()
4543
4688
  });
4544
4689
 
4545
4690
  // lib/items/v1/models/PackComponentDetails.ts
4546
- var packComponentDetailsSchema = z.object({
4691
+ var packComponentDetailsSchema = external_exports.object({
4547
4692
  itemInfo: packComponentItemInfoSchema,
4548
- itemPrices: z.array(itemPriceSchema)
4693
+ itemPrices: external_exports.array(itemPriceSchema)
4549
4694
  });
4550
4695
 
4551
4696
  // lib/items/v1/models/GroupedItem.ts
4552
- var groupedItemSchema = z.object({
4553
- iteminfoid: z.number(),
4554
- companyid: z.number(),
4555
- status: z.string(),
4556
- createdDate: z.string(),
4557
- lastUpdatedDate: z.string(),
4558
- identifiers: z.record(z.string(), z.any()),
4697
+ var groupedItemSchema = external_exports.object({
4698
+ iteminfoid: external_exports.number(),
4699
+ companyid: external_exports.number(),
4700
+ status: external_exports.string(),
4701
+ createdDate: external_exports.string(),
4702
+ lastUpdatedDate: external_exports.string(),
4703
+ identifiers: external_exports.record(external_exports.string(), external_exports.any()),
4559
4704
  hierarchyDetails: hierarchyDetailsSchema,
4560
- groupedAttributes: z.array(groupedAttributesSchema),
4561
- packComponentDetails: z.array(packComponentDetailsSchema),
4562
- childComponentDetails: z.array(componentDetailsSchema),
4563
- parentComponentDetails: z.array(componentDetailsSchema),
4564
- locales: z.array(z.string())
4705
+ groupedAttributes: external_exports.array(groupedAttributesSchema),
4706
+ packComponentDetails: external_exports.array(packComponentDetailsSchema),
4707
+ childComponentDetails: external_exports.array(componentDetailsSchema),
4708
+ parentComponentDetails: external_exports.array(componentDetailsSchema),
4709
+ locales: external_exports.array(external_exports.string())
4565
4710
  });
4566
4711
 
4567
4712
  // lib/items/v1/models/ItemDetailView.ts
4568
- var itemDetailViewSchema = z.object({
4713
+ var itemDetailViewSchema = external_exports.object({
4569
4714
  item: groupedItemSchema
4570
4715
  });
4571
4716
 
4572
4717
  // lib/items/v1/models/Bulb.ts
4573
- var bulbSchema = z.object({
4574
- iteminfoid: z.number(),
4575
- id: z.number(),
4576
- shape: z.string(),
4577
- position: z.number(),
4578
- quantity: z.number(),
4579
- basetype: z.string(),
4580
- maxwatt: z.number(),
4581
- createdat: z.string(),
4582
- modifiedat: z.string(),
4583
- bulbtype: z.string(),
4584
- bulbincluded: z.string(),
4585
- bulbsize: z.string(),
4586
- replacementbulb: z.string(),
4587
- threewaybulb: z.string()
4718
+ var bulbSchema = external_exports.object({
4719
+ iteminfoid: external_exports.number(),
4720
+ id: external_exports.number(),
4721
+ shape: external_exports.string(),
4722
+ position: external_exports.number(),
4723
+ quantity: external_exports.number(),
4724
+ basetype: external_exports.string(),
4725
+ maxwatt: external_exports.number(),
4726
+ createdat: external_exports.string(),
4727
+ modifiedat: external_exports.string(),
4728
+ bulbtype: external_exports.string(),
4729
+ bulbincluded: external_exports.string(),
4730
+ bulbsize: external_exports.string(),
4731
+ replacementbulb: external_exports.string(),
4732
+ threewaybulb: external_exports.string()
4588
4733
  });
4589
4734
 
4590
4735
  // lib/items/v1/models/PackComponent.ts
4591
- var packComponentSchema = z.object({
4592
- itemInfoId: z.number().nullish(),
4593
- attributes: z.record(z.string(), z.string().or(z.array(z.string()))),
4594
- prices: z.array(itemPriceSchema)
4736
+ var packComponentSchema = external_exports.object({
4737
+ itemInfoId: external_exports.number().nullish(),
4738
+ attributes: external_exports.record(external_exports.string(), external_exports.string().or(external_exports.array(external_exports.string()))),
4739
+ prices: external_exports.array(itemPriceSchema)
4595
4740
  });
4596
4741
 
4597
4742
  // lib/items/v1/models/MediaItem.ts
4598
- var mediaItemSchema = z.object({
4599
- id: z.number(),
4600
- iteminfoid: z.number(),
4601
- medianame: z.string(),
4602
- height: z.number().nullish(),
4603
- filename: z.string(),
4604
- mediafilename: z.string().nullish(),
4605
- description: z.string().nullish(),
4606
- filesize: z.number().nullish(),
4607
- format: z.string().nullish(),
4608
- orientation: z.string().nullish(),
4609
- pixeldensity: z.string().nullish(),
4610
- purpose: z.string().nullish(),
4611
- width: z.number().nullish(),
4612
- mediatype: z.string(),
4613
- mediaviewtype: z.string().nullish(),
4614
- compressionquality: z.string().nullish(),
4615
- thumbnailflag: z.string().nullish()
4743
+ var mediaItemSchema = external_exports.object({
4744
+ id: external_exports.number(),
4745
+ iteminfoid: external_exports.number(),
4746
+ medianame: external_exports.string(),
4747
+ height: external_exports.number().nullish(),
4748
+ filename: external_exports.string(),
4749
+ mediafilename: external_exports.string().nullish(),
4750
+ description: external_exports.string().nullish(),
4751
+ filesize: external_exports.number().nullish(),
4752
+ format: external_exports.string().nullish(),
4753
+ orientation: external_exports.string().nullish(),
4754
+ pixeldensity: external_exports.string().nullish(),
4755
+ purpose: external_exports.string().nullish(),
4756
+ width: external_exports.number().nullish(),
4757
+ mediatype: external_exports.string(),
4758
+ mediaviewtype: external_exports.string().nullish(),
4759
+ compressionquality: external_exports.string().nullish(),
4760
+ thumbnailflag: external_exports.string().nullish()
4616
4761
  });
4617
4762
 
4618
4763
  // lib/items/v1/models/ItemDetail.ts
4619
- var itemDetailSchema = z.object({
4620
- attributes: z.record(z.string(), z.any()),
4621
- clusters: z.record(
4622
- z.string(),
4623
- z.array(
4624
- z.object({
4625
- itemInfoAttributes: z.record(
4626
- z.string(),
4627
- z.string().or(z.number()).or(z.boolean())
4764
+ var itemDetailSchema = external_exports.object({
4765
+ attributes: external_exports.record(external_exports.string(), external_exports.any()),
4766
+ clusters: external_exports.record(
4767
+ external_exports.string(),
4768
+ external_exports.array(
4769
+ external_exports.object({
4770
+ itemInfoAttributes: external_exports.record(
4771
+ external_exports.string(),
4772
+ external_exports.string().or(external_exports.number()).or(external_exports.boolean())
4628
4773
  )
4629
4774
  })
4630
4775
  )
4631
4776
  ),
4632
- prices: z.array(itemPriceSchema),
4633
- bulbs: z.array(bulbSchema),
4634
- media: z.array(mediaItemSchema),
4635
- packs: z.array(packComponentSchema)
4777
+ prices: external_exports.array(itemPriceSchema),
4778
+ bulbs: external_exports.array(bulbSchema),
4779
+ media: external_exports.array(mediaItemSchema),
4780
+ packs: external_exports.array(packComponentSchema)
4636
4781
  });
4637
4782
 
4638
4783
  // lib/items/v1/models/SpsItemIdResponse.ts
4639
- var spsItemIdResponseSchema = z.object({
4640
- id: z.string(),
4641
- ref: z.string()
4784
+ var spsItemIdResponseSchema = external_exports.object({
4785
+ id: external_exports.string(),
4786
+ ref: external_exports.string()
4642
4787
  });
4643
4788
 
4644
4789
  // lib/items/v1/models/ItemOrgStatus.ts
4645
- var itemOrgStatusSchema = z.object({
4646
- org: z.object({
4647
- ref: z.string(),
4648
- id: z.string(),
4649
- name: z.string()
4790
+ var itemOrgStatusSchema = external_exports.object({
4791
+ org: external_exports.object({
4792
+ ref: external_exports.string(),
4793
+ id: external_exports.string(),
4794
+ name: external_exports.string()
4650
4795
  }),
4651
4796
  lowestInvalidStage: phaseEnumSchema.nullable(),
4652
- validForRelationship: z.boolean()
4797
+ validForRelationship: external_exports.boolean()
4653
4798
  });
4654
4799
 
4655
4800
  // lib/items/v1/models/ItemStatus.ts
4656
- var itemStatusSchema = z.object({
4657
- itemId: z.string(),
4658
- itemOrgStatuses: z.array(itemOrgStatusSchema)
4801
+ var itemStatusSchema = external_exports.object({
4802
+ itemId: external_exports.string(),
4803
+ itemOrgStatuses: external_exports.array(itemOrgStatusSchema)
4659
4804
  });
4660
4805
 
4661
4806
  // lib/items/v1/models/ItemStatusResponse.ts
4662
- var itemStatusResponseSchema = z.object({
4663
- itemStatuses: z.array(itemStatusSchema)
4807
+ var itemStatusResponseSchema = external_exports.object({
4808
+ itemStatuses: external_exports.array(itemStatusSchema)
4664
4809
  });
4665
4810
 
4666
4811
  // lib/locale/models/Locale.ts
4667
- var localeSchema = z.object({
4668
- localeCode: z.string(),
4669
- localeDescription: z.string()
4812
+ var localeSchema = external_exports.object({
4813
+ localeCode: external_exports.string(),
4814
+ localeDescription: external_exports.string()
4670
4815
  });
4671
4816
 
4672
4817
  // lib/productTypes/models/AttrProdType.ts
4673
- var attrProdTypeSchema = z.object({
4674
- attrProdTypeId: z.number(),
4675
- productType: z.string(),
4676
- description: z.string(),
4677
- createdDate: z.number(),
4678
- createdBy: z.string(),
4679
- modifiedDate: z.number().optional(),
4680
- modifiedBy: z.string().optional(),
4681
- retailerId: z.number().optional()
4818
+ var attrProdTypeSchema = external_exports.object({
4819
+ attrProdTypeId: external_exports.number(),
4820
+ productType: external_exports.string(),
4821
+ description: external_exports.string(),
4822
+ createdDate: external_exports.number(),
4823
+ createdBy: external_exports.string(),
4824
+ modifiedDate: external_exports.number().optional(),
4825
+ modifiedBy: external_exports.string().optional(),
4826
+ retailerId: external_exports.number().optional()
4682
4827
  });
4683
4828
 
4684
4829
  // lib/spreadsheetTemplate/models/SpreadsheetTemplateCompany.ts
4685
- var spreadsheetTemplateCompanySchema = z.object({
4686
- companyName: z.string(),
4687
- companyId: z.number(),
4688
- createdAt: z.number()
4830
+ var spreadsheetTemplateCompanySchema = external_exports.object({
4831
+ companyName: external_exports.string(),
4832
+ companyId: external_exports.number(),
4833
+ createdAt: external_exports.number()
4689
4834
  });
4690
4835
 
4691
4836
  // lib/spreadsheetTemplate/models/SpreadsheetTemplate.ts
4692
- var spreadsheetTemplateSchema = z.object({
4693
- id: z.number(),
4694
- fileLocation: z.string(),
4695
- name: z.string(),
4696
- templateType: z.string(),
4697
- maxItemsPerDoc: z.number(),
4698
- companies: z.array(spreadsheetTemplateCompanySchema),
4699
- createdBy: z.string().nullish(),
4700
- createdAt: z.number().nullish(),
4701
- modifiedBy: z.string().nullish(),
4702
- modifiedAt: z.number().nullish()
4837
+ var spreadsheetTemplateSchema = external_exports.object({
4838
+ id: external_exports.number(),
4839
+ fileLocation: external_exports.string(),
4840
+ name: external_exports.string(),
4841
+ templateType: external_exports.string(),
4842
+ maxItemsPerDoc: external_exports.number(),
4843
+ companies: external_exports.array(spreadsheetTemplateCompanySchema),
4844
+ createdBy: external_exports.string().nullish(),
4845
+ createdAt: external_exports.number().nullish(),
4846
+ modifiedBy: external_exports.string().nullish(),
4847
+ modifiedAt: external_exports.number().nullish()
4703
4848
  });
4704
4849
 
4705
4850
  // lib/tradingPartners/models/Connection.ts
4706
- var connectionSchema = z.object({
4707
- catalog_id: z.number(),
4708
- catalog_name: z.string().nullable(),
4709
- partner_company_name: z.string(),
4710
- partner_company_id: z.number(),
4711
- partner_org_id: z.string()
4851
+ var connectionSchema = external_exports.object({
4852
+ catalog_id: external_exports.number(),
4853
+ catalog_name: external_exports.string().nullable(),
4854
+ partner_company_name: external_exports.string(),
4855
+ partner_company_id: external_exports.number(),
4856
+ partner_org_id: external_exports.string()
4712
4857
  });
4713
4858
 
4714
4859
  // lib/tradingPartners/models/CompanyRelationshipUpsertBody.ts
4715
- var companyRelationshipUpsertBodySchema = z.object({
4716
- supplierId: z.number(),
4717
- retailerId: z.number(),
4718
- catalogId: z.number(),
4719
- active: z.boolean(),
4720
- applicationType: z.array(z.enum(["ASSORTMENT", "ITEM-XREF"])).default([])
4860
+ var companyRelationshipUpsertBodySchema = external_exports.object({
4861
+ supplierId: external_exports.number(),
4862
+ retailerId: external_exports.number(),
4863
+ catalogId: external_exports.number(),
4864
+ active: external_exports.boolean(),
4865
+ applicationType: external_exports.array(external_exports.enum(["ASSORTMENT", "ITEM-XREF", "TEST-ORDER-GENERATOR"])).default([])
4721
4866
  });
4722
4867
 
4723
4868
  // lib/tradingPartners/models/ItemPartner.ts
4724
- var itemPartnerSchema = z.object({
4725
- itemPartnerId: z.number(),
4726
- retailerId: z.number(),
4727
- supplierId: z.number(),
4728
- catalogId: z.number(),
4729
- isActive: z.number(),
4730
- createdDate: z.string(),
4731
- modifiedDate: z.string(),
4732
- applications: z.array(z.enum(["ASSORTMENT", "ITEM-XREF"]))
4869
+ var itemPartnerSchema = external_exports.object({
4870
+ itemPartnerId: external_exports.number(),
4871
+ retailerId: external_exports.number(),
4872
+ supplierId: external_exports.number(),
4873
+ catalogId: external_exports.number(),
4874
+ isActive: external_exports.number(),
4875
+ createdDate: external_exports.string(),
4876
+ modifiedDate: external_exports.string(),
4877
+ applications: external_exports.array(external_exports.enum(["ASSORTMENT", "ITEM-XREF"]))
4733
4878
  });
4734
4879
 
4735
4880
  // lib/tradingPartners/models/TradingPartnerAccessByCompanyId.ts
4736
- var tradingPartnerAccessByCompanyIdSchema = z.object({
4737
- companyId: z.number(),
4738
- companyType: z.string(),
4739
- identityOrgId: z.string(),
4740
- companyName: z.string(),
4741
- count: z.number(),
4742
- connections: z.array(connectionSchema)
4881
+ var tradingPartnerAccessByCompanyIdSchema = external_exports.object({
4882
+ companyId: external_exports.number(),
4883
+ companyType: external_exports.string(),
4884
+ identityOrgId: external_exports.string(),
4885
+ companyName: external_exports.string(),
4886
+ count: external_exports.number(),
4887
+ connections: external_exports.array(connectionSchema)
4743
4888
  });
4744
4889
 
4745
4890
  // lib/whoami/models/IdentityServiceDatetimePreferences.ts
4746
- var identityServiceDatetimePreferencesSchema = z.object({
4747
- DATE_TIME: z.string(),
4748
- TIME: z.string(),
4749
- SHORT_DATE: z.string(),
4750
- LONG_DATETIME: z.string(),
4751
- LONG_TIME: z.string(),
4752
- DATE: z.string()
4891
+ var identityServiceDatetimePreferencesSchema = external_exports.object({
4892
+ DATE_TIME: external_exports.string(),
4893
+ TIME: external_exports.string(),
4894
+ SHORT_DATE: external_exports.string(),
4895
+ LONG_DATETIME: external_exports.string(),
4896
+ LONG_TIME: external_exports.string(),
4897
+ DATE: external_exports.string()
4753
4898
  });
4754
4899
 
4755
4900
  // lib/whoami/models/IdentityServiceOrganizationMetadata.ts
4756
- var identityServiceOrganizationMetadataSchema = z.object({
4757
- namespace: z.string(),
4758
- key: z.string(),
4759
- value: z.string()
4901
+ var identityServiceOrganizationMetadataSchema = external_exports.object({
4902
+ namespace: external_exports.string(),
4903
+ key: external_exports.string(),
4904
+ value: external_exports.string()
4760
4905
  });
4761
4906
 
4762
4907
  // lib/whoami/models/IdentityServiceOrganization.ts
4763
- var identityServiceOrganizationSchema = z.object({
4764
- organization_name: z.string().optional(),
4765
- organization_site: z.string().optional(),
4766
- namespace: z.string().optional(),
4767
- id: z.string(),
4768
- permissions: z.array(z.string()).optional(),
4908
+ var identityServiceOrganizationSchema = external_exports.object({
4909
+ organization_name: external_exports.string().optional(),
4910
+ organization_site: external_exports.string().optional(),
4911
+ namespace: external_exports.string().optional(),
4912
+ id: external_exports.string(),
4913
+ permissions: external_exports.array(external_exports.string()).optional(),
4769
4914
  metadata: identityServiceOrganizationMetadataSchema.optional()
4770
4915
  });
4771
4916
 
4772
4917
  // lib/whoami/models/IdentityServicePreferences.ts
4773
- var identityServicePreferencesSchema = z.object({
4774
- locale: z.string(),
4775
- timezone: z.string(),
4776
- cpUpgrade: z.string().optional(),
4777
- language: z.array(z.string()),
4918
+ var identityServicePreferencesSchema = external_exports.object({
4919
+ locale: external_exports.string(),
4920
+ timezone: external_exports.string(),
4921
+ cpUpgrade: external_exports.string().optional(),
4922
+ language: external_exports.array(external_exports.string()),
4778
4923
  datetime: identityServiceDatetimePreferencesSchema
4779
4924
  });
4780
4925
 
4781
4926
  // lib/whoami/models/IdentityServiceUser.ts
4782
- var identityServiceUserSchema = z.object({
4783
- id: z.string(),
4784
- email: z.string().optional(),
4785
- first_name: z.string().optional(),
4786
- last_name: z.string().optional(),
4787
- job_title: z.string().optional(),
4788
- externally_managed: z.boolean().optional(),
4789
- city: z.string().optional(),
4790
- name: z.string(),
4791
- state: z.string().optional(),
4792
- country: z.string().optional(),
4793
- user_type: z.string().optional(),
4794
- token_type: z.string().optional(),
4795
- avatar_image_id: z.string().optional(),
4796
- avatar_image_url: z.string().optional(),
4797
- origin_avatar_image_id: z.string().optional(),
4798
- bio: z.string().optional(),
4799
- phone_number: z.string().optional(),
4800
- twitter_handle: z.string().optional(),
4801
- linkedin_url: z.string().optional(),
4802
- description: z.string().optional(),
4927
+ var identityServiceUserSchema = external_exports.object({
4928
+ id: external_exports.string(),
4929
+ email: external_exports.string().optional(),
4930
+ first_name: external_exports.string().optional(),
4931
+ last_name: external_exports.string().optional(),
4932
+ job_title: external_exports.string().optional(),
4933
+ externally_managed: external_exports.boolean().optional(),
4934
+ city: external_exports.string().optional(),
4935
+ name: external_exports.string(),
4936
+ state: external_exports.string().optional(),
4937
+ country: external_exports.string().optional(),
4938
+ user_type: external_exports.string().optional(),
4939
+ token_type: external_exports.string().optional(),
4940
+ avatar_image_id: external_exports.string().optional(),
4941
+ avatar_image_url: external_exports.string().optional(),
4942
+ origin_avatar_image_id: external_exports.string().optional(),
4943
+ bio: external_exports.string().optional(),
4944
+ phone_number: external_exports.string().optional(),
4945
+ twitter_handle: external_exports.string().optional(),
4946
+ linkedin_url: external_exports.string().optional(),
4947
+ description: external_exports.string().optional(),
4803
4948
  preferences: identityServicePreferencesSchema.optional(),
4804
- roles: z.array(z.string()),
4949
+ roles: external_exports.array(external_exports.string()),
4805
4950
  organization: identityServiceOrganizationSchema,
4806
- password: z.string(),
4807
- verified: z.boolean()
4951
+ password: external_exports.string(),
4952
+ verified: external_exports.boolean()
4808
4953
  });
4809
4954
 
4810
4955
  // lib/whoami/models/RegisteredService.ts
4811
- var registeredServiceSchema = z.object({
4812
- serviceId: z.number(),
4813
- identityServiceId: z.number(),
4814
- name: z.string(),
4815
- isActive: z.boolean()
4956
+ var registeredServiceSchema = external_exports.object({
4957
+ serviceId: external_exports.number(),
4958
+ identityServiceId: external_exports.number(),
4959
+ name: external_exports.string(),
4960
+ isActive: external_exports.boolean()
4816
4961
  });
4817
4962
 
4818
4963
  // lib/whoami/models/UserAccount.ts
4819
- var userAccountSchema = z.object({
4964
+ var userAccountSchema = external_exports.object({
4820
4965
  identityUser: identityServiceUserSchema,
4821
- companyId: z.number(),
4822
- companyName: z.string(),
4823
- name: z.string(),
4824
- assortmentPartnerCompanyId: z.number().nullish(),
4825
- retailer: z.boolean(),
4826
- supplier: z.boolean(),
4966
+ companyId: external_exports.number(),
4967
+ companyName: external_exports.string(),
4968
+ name: external_exports.string(),
4969
+ assortmentPartnerCompanyId: external_exports.number().nullish(),
4970
+ retailer: external_exports.boolean(),
4971
+ supplier: external_exports.boolean(),
4827
4972
  registeredService: registeredServiceSchema,
4828
- uniqueAttributes: z.array(z.string()),
4829
- admin: z.boolean(),
4830
- adminToolUser: z.boolean(),
4831
- attributeRegistryAdmin: z.boolean(),
4832
- attributeRegistryDev: z.boolean(),
4833
- attributeRegistryRsx: z.boolean(),
4834
- attributeRegistryUser: z.boolean(),
4835
- attributeRegistryViewer: z.boolean()
4973
+ uniqueAttributes: external_exports.array(external_exports.string()),
4974
+ admin: external_exports.boolean(),
4975
+ adminToolUser: external_exports.boolean(),
4976
+ attributeRegistryAdmin: external_exports.boolean(),
4977
+ attributeRegistryDev: external_exports.boolean(),
4978
+ attributeRegistryRsx: external_exports.boolean(),
4979
+ attributeRegistryUser: external_exports.boolean(),
4980
+ attributeRegistryViewer: external_exports.boolean()
4836
4981
  });
4837
4982
 
4838
4983
  // lib/errors/v1/models/ItemErrorDetails.ts
4839
- var itemErrorDetailsSchema = z.object({
4840
- errorMessage: z.string(),
4841
- attributeName: z.string().nullable(),
4842
- tradingPartnerNames: z.array(z.string()),
4843
- phases: z.array(phaseEnumSchema),
4844
- attributeDbNames: z.array(z.string()),
4845
- tradingPartnerStages: z.array(tradingPartnerStageSchema),
4846
- repeatableGroupId: z.string().nullish()
4984
+ var itemErrorDetailsSchema = external_exports.object({
4985
+ errorMessage: external_exports.string(),
4986
+ attributeName: external_exports.string().nullable(),
4987
+ tradingPartnerNames: external_exports.array(external_exports.string()),
4988
+ phases: external_exports.array(phaseEnumSchema),
4989
+ attributeDbNames: external_exports.array(external_exports.string()),
4990
+ tradingPartnerStages: external_exports.array(tradingPartnerStageSchema),
4991
+ repeatableGroupId: external_exports.string().nullish()
4847
4992
  });
4848
4993
 
4849
4994
  // lib/errors/v1/models/ItemErrorDetailsResult.ts
4850
- var itemErrorDetailsResultSchema = z.object({
4851
- itemInfoId: z.number(),
4852
- upc: z.string().nullish(),
4853
- isbn: z.string().nullish(),
4854
- gtin: z.string().nullish(),
4855
- partnumber: z.string().nullish(),
4856
- ean: z.string().nullish(),
4857
- itemName: z.string().nullable(),
4858
- itemErrorDetails: z.array(itemErrorDetailsSchema)
4995
+ var itemErrorDetailsResultSchema = external_exports.object({
4996
+ itemInfoId: external_exports.number(),
4997
+ upc: external_exports.string().nullish(),
4998
+ isbn: external_exports.string().nullish(),
4999
+ gtin: external_exports.string().nullish(),
5000
+ partnumber: external_exports.string().nullish(),
5001
+ ean: external_exports.string().nullish(),
5002
+ itemName: external_exports.string().nullable(),
5003
+ itemErrorDetails: external_exports.array(itemErrorDetailsSchema)
4859
5004
  });
4860
5005
 
4861
5006
  // lib/items/v2/models/Stage.ts
4862
- var stageSchema = z.enum([
5007
+ var stageSchema = external_exports.enum([
4863
5008
  "CORE",
4864
5009
  "CORE_PLUS",
4865
5010
  "CORE_ADVANCED",
@@ -4867,14 +5012,14 @@ var stageSchema = z.enum([
4867
5012
  ]);
4868
5013
 
4869
5014
  // lib/items/v2/models/OrgSummary.ts
4870
- var orgSummarySchema = z.object({
4871
- ref: z.string(),
4872
- id: z.string(),
4873
- name: z.string()
5015
+ var orgSummarySchema = external_exports.object({
5016
+ ref: external_exports.string(),
5017
+ id: external_exports.string(),
5018
+ name: external_exports.string()
4874
5019
  });
4875
5020
 
4876
5021
  // lib/items/v2/models/ItemOrgStageDetails.ts
4877
- var itemOrgStageDetailsSchema = z.object({
5022
+ var itemOrgStageDetailsSchema = external_exports.object({
4878
5023
  /**
4879
5024
  * When called as retailer, the vendor, else when vendor, the retailer.
4880
5025
  * */
@@ -4882,7 +5027,7 @@ var itemOrgStageDetailsSchema = z.object({
4882
5027
  /**
4883
5028
  * The company id of the retailer or vendor used for matching ItemOrgStageDetails to TradingPartnerStage for ErrorService
4884
5029
  */
4885
- companyId: z.number().nullish(),
5030
+ companyId: external_exports.number().nullish(),
4886
5031
  /**
4887
5032
  * "Standard Requirements" (null) UNLESS the retailer of the item is MSIS Enabled
4888
5033
  * OTHERWISE the retailer default Stage UNLESS there's a currently active vendor-specific Stage defined
@@ -4893,110 +5038,110 @@ var itemOrgStageDetailsSchema = z.object({
4893
5038
  * If the item is valid for the active stage. Note that for "Standard Requirements" or
4894
5039
  * "Enriched" this cam come directly from the item_doc table, but anything else requires validation
4895
5040
  */
4896
- isValid: z.boolean(),
5041
+ isValid: external_exports.boolean(),
4897
5042
  /**
4898
5043
  * Not null if there's an item level policy override for this trading partnership
4899
5044
  */
4900
- itemPolicyId: z.string().nullish(),
5045
+ itemPolicyId: external_exports.string().nullish(),
4901
5046
  /**
4902
5047
  * Start date for the Item level Stage if applicable
4903
5048
  */
4904
- startDate: z.number().transform((num) => new Date(num * 1e3)).nullish(),
5049
+ startDate: external_exports.number().transform((num) => new Date(num * 1e3)).nullish(),
4905
5050
  /**
4906
5051
  * End date for the Item level Stage if applicable
4907
5052
  */
4908
- endDate: z.number().transform((num) => new Date(num * 1e3)).nullish()
5053
+ endDate: external_exports.number().transform((num) => new Date(num * 1e3)).nullish()
4909
5054
  });
4910
5055
 
4911
5056
  // lib/items/v2/models/ItemStatusV2.ts
4912
- var itemStatusV2Schema = z.object({
4913
- itemId: z.string(),
5057
+ var itemStatusV2Schema = external_exports.object({
5058
+ itemId: external_exports.string(),
4914
5059
  mostRestrictiveRetailerStage: stageSchema.nullable(),
4915
- itemOrgStageDetails: z.array(itemOrgStageDetailsSchema)
5060
+ itemOrgStageDetails: external_exports.array(itemOrgStageDetailsSchema)
4916
5061
  });
4917
5062
 
4918
5063
  // lib/items/v2/models/ItemStatusV2Response.ts
4919
- var itemStatusV2ResponseSchema = z.object({
4920
- itemStatuses: z.array(itemStatusV2Schema)
5064
+ var itemStatusV2ResponseSchema = external_exports.object({
5065
+ itemStatuses: external_exports.array(itemStatusV2Schema)
4921
5066
  });
4922
5067
 
4923
5068
  // lib/errors/v2/models/TradingPartnerStage.ts
4924
- var tradingPartnerStageV2Schema = z.object({
4925
- companyId: z.number(),
4926
- companyName: z.string(),
5069
+ var tradingPartnerStageV2Schema = external_exports.object({
5070
+ companyId: external_exports.number(),
5071
+ companyName: external_exports.string(),
4927
5072
  stage: stageSchema.nullish(),
4928
- isValid: z.boolean()
5073
+ isValid: external_exports.boolean()
4929
5074
  });
4930
5075
 
4931
5076
  // lib/errors/v2/models/ItemErrorSummary.ts
4932
- var itemErrorSummaryV2Schema = z.object({
4933
- itemInfoId: z.number(),
4934
- upc: z.string().nullish(),
4935
- isbn: z.string().nullish(),
4936
- gtin: z.string().nullish(),
4937
- ean: z.string().nullish(),
4938
- partnumber: z.string().nullish(),
4939
- colorfamily: z.string().nullish(),
4940
- fit: z.string().nullish(),
4941
- productcolordescription: z.string().nullish(),
4942
- distributioncentercode: z.string().nullish(),
4943
- accountnumber: z.string().nullish(),
4944
- erpid: z.string().nullish(),
4945
- totalErrors: z.number(),
4946
- tradingPartners: z.array(z.string()),
4947
- tradingPartnerIds: z.array(z.number()),
5077
+ var itemErrorSummaryV2Schema = external_exports.object({
5078
+ itemInfoId: external_exports.number(),
5079
+ upc: external_exports.string().nullish(),
5080
+ isbn: external_exports.string().nullish(),
5081
+ gtin: external_exports.string().nullish(),
5082
+ ean: external_exports.string().nullish(),
5083
+ partnumber: external_exports.string().nullish(),
5084
+ colorfamily: external_exports.string().nullish(),
5085
+ fit: external_exports.string().nullish(),
5086
+ productcolordescription: external_exports.string().nullish(),
5087
+ distributioncentercode: external_exports.string().nullish(),
5088
+ accountnumber: external_exports.string().nullish(),
5089
+ erpid: external_exports.string().nullish(),
5090
+ totalErrors: external_exports.number(),
5091
+ tradingPartners: external_exports.array(external_exports.string()),
5092
+ tradingPartnerIds: external_exports.array(external_exports.number()),
4948
5093
  // These are the stages assigned to the TradingPartners, not the stages of the errors
4949
- phases: z.array(z.string()),
5094
+ phases: external_exports.array(external_exports.string()),
4950
5095
  // Same thing for the stage property in here: it's the stage of the Item & TradingPartner, not the stage of the error
4951
- tradingPartnerStages: z.array(tradingPartnerStageV2Schema),
4952
- validatedDate: z.number().pipe(z.coerce.date()).nullish()
5096
+ tradingPartnerStages: external_exports.array(tradingPartnerStageV2Schema),
5097
+ validatedDate: external_exports.number().pipe(external_exports.coerce.date()).nullish()
4953
5098
  });
4954
5099
 
4955
5100
  // lib/errors/v2/models/ItemErrorSummaryResult.ts
4956
- var itemErrorSummaryResultV2Schema = z.object({
4957
- hasNext: z.boolean(),
4958
- errors: z.array(itemErrorSummaryV2Schema)
5101
+ var itemErrorSummaryResultV2Schema = external_exports.object({
5102
+ hasNext: external_exports.boolean(),
5103
+ errors: external_exports.array(itemErrorSummaryV2Schema)
4959
5104
  });
4960
5105
 
4961
5106
  // lib/errors/v2/models/ItemErrorDetails.ts
4962
- var itemErrorDetailsV2Schema = z.object({
4963
- errorMessage: z.string(),
4964
- attributeName: z.string().nullable(),
4965
- tradingPartnerNames: z.array(z.string()),
4966
- phases: z.array(stageSchema),
4967
- attributeDbNames: z.array(z.string()),
4968
- tradingPartnerStages: z.array(tradingPartnerStageV2Schema),
4969
- repeatableGroupId: z.string().nullish()
5107
+ var itemErrorDetailsV2Schema = external_exports.object({
5108
+ errorMessage: external_exports.string(),
5109
+ attributeName: external_exports.string().nullable(),
5110
+ tradingPartnerNames: external_exports.array(external_exports.string()),
5111
+ phases: external_exports.array(stageSchema),
5112
+ attributeDbNames: external_exports.array(external_exports.string()),
5113
+ tradingPartnerStages: external_exports.array(tradingPartnerStageV2Schema),
5114
+ repeatableGroupId: external_exports.string().nullish()
4970
5115
  });
4971
5116
 
4972
5117
  // lib/errors/v2/models/ItemErrorDetailsResult.ts
4973
- var itemErrorDetailsResultV2Schema = z.object({
4974
- itemInfoId: z.number(),
4975
- upc: z.string().nullish(),
4976
- isbn: z.string().nullish(),
4977
- gtin: z.string().nullish(),
4978
- partnumber: z.string().nullish(),
4979
- ean: z.string().nullish(),
4980
- colorfamily: z.string().nullish(),
4981
- fit: z.string().nullish(),
4982
- productcolordescription: z.string().nullish(),
4983
- distributioncentercode: z.string().nullish(),
4984
- accountnumber: z.string().nullish(),
4985
- erpid: z.string().nullish(),
4986
- itemName: z.string().nullish(),
4987
- itemErrorDetails: z.array(itemErrorDetailsV2Schema)
5118
+ var itemErrorDetailsResultV2Schema = external_exports.object({
5119
+ itemInfoId: external_exports.number(),
5120
+ upc: external_exports.string().nullish(),
5121
+ isbn: external_exports.string().nullish(),
5122
+ gtin: external_exports.string().nullish(),
5123
+ partnumber: external_exports.string().nullish(),
5124
+ ean: external_exports.string().nullish(),
5125
+ colorfamily: external_exports.string().nullish(),
5126
+ fit: external_exports.string().nullish(),
5127
+ productcolordescription: external_exports.string().nullish(),
5128
+ distributioncentercode: external_exports.string().nullish(),
5129
+ accountnumber: external_exports.string().nullish(),
5130
+ erpid: external_exports.string().nullish(),
5131
+ itemName: external_exports.string().nullish(),
5132
+ itemErrorDetails: external_exports.array(itemErrorDetailsV2Schema)
4988
5133
  });
4989
5134
 
4990
5135
  // lib/companies/models/CompanyBriefByOrg.ts
4991
- var companyBriefByOrgSchema = z.object({
4992
- companyId: z.number(),
4993
- name: z.string(),
4994
- orgId: z.string(),
4995
- companyType: z.object({
4996
- type: z.enum(["SUPPLIER", "RETAILER"]),
4997
- display: z.enum(["SUPPLIER", "RETAILER"])
5136
+ var companyBriefByOrgSchema = external_exports.object({
5137
+ companyId: external_exports.number(),
5138
+ name: external_exports.string(),
5139
+ orgId: external_exports.string(),
5140
+ companyType: external_exports.object({
5141
+ type: external_exports.enum(["SUPPLIER", "RETAILER"]),
5142
+ display: external_exports.enum(["SUPPLIER", "RETAILER"])
4998
5143
  }),
4999
- dc4Id: z.number()
5144
+ dc4Id: external_exports.number()
5000
5145
  });
5001
5146
  // Annotate the CommonJS export names for ESM import in node:
5002
5147
  0 && (module.exports = {