@spscommerce/asst-api 1.4.0 → 3.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/msw.cjs CHANGED
@@ -54,10 +54,123 @@ module.exports = __toCommonJS(msw_exports);
54
54
  var import_zod_mock = require("@anatine/zod-mock");
55
55
  var import_msw = require("msw");
56
56
 
57
- // ../../node_modules/.pnpm/zod@3.23.8/node_modules/zod/lib/index.mjs
57
+ // ../../node_modules/.pnpm/zod@3.25.30/node_modules/zod/dist/esm/v3/external.js
58
+ var external_exports = {};
59
+ __export(external_exports, {
60
+ BRAND: () => BRAND,
61
+ DIRTY: () => DIRTY,
62
+ EMPTY_PATH: () => EMPTY_PATH,
63
+ INVALID: () => INVALID,
64
+ NEVER: () => NEVER,
65
+ OK: () => OK,
66
+ ParseStatus: () => ParseStatus,
67
+ Schema: () => ZodType,
68
+ ZodAny: () => ZodAny,
69
+ ZodArray: () => ZodArray,
70
+ ZodBigInt: () => ZodBigInt,
71
+ ZodBoolean: () => ZodBoolean,
72
+ ZodBranded: () => ZodBranded,
73
+ ZodCatch: () => ZodCatch,
74
+ ZodDate: () => ZodDate,
75
+ ZodDefault: () => ZodDefault,
76
+ ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,
77
+ ZodEffects: () => ZodEffects,
78
+ ZodEnum: () => ZodEnum,
79
+ ZodError: () => ZodError,
80
+ ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind,
81
+ ZodFunction: () => ZodFunction,
82
+ ZodIntersection: () => ZodIntersection,
83
+ ZodIssueCode: () => ZodIssueCode,
84
+ ZodLazy: () => ZodLazy,
85
+ ZodLiteral: () => ZodLiteral,
86
+ ZodMap: () => ZodMap,
87
+ ZodNaN: () => ZodNaN,
88
+ ZodNativeEnum: () => ZodNativeEnum,
89
+ ZodNever: () => ZodNever,
90
+ ZodNull: () => ZodNull,
91
+ ZodNullable: () => ZodNullable,
92
+ ZodNumber: () => ZodNumber,
93
+ ZodObject: () => ZodObject,
94
+ ZodOptional: () => ZodOptional,
95
+ ZodParsedType: () => ZodParsedType,
96
+ ZodPipeline: () => ZodPipeline,
97
+ ZodPromise: () => ZodPromise,
98
+ ZodReadonly: () => ZodReadonly,
99
+ ZodRecord: () => ZodRecord,
100
+ ZodSchema: () => ZodType,
101
+ ZodSet: () => ZodSet,
102
+ ZodString: () => ZodString,
103
+ ZodSymbol: () => ZodSymbol,
104
+ ZodTransformer: () => ZodEffects,
105
+ ZodTuple: () => ZodTuple,
106
+ ZodType: () => ZodType,
107
+ ZodUndefined: () => ZodUndefined,
108
+ ZodUnion: () => ZodUnion,
109
+ ZodUnknown: () => ZodUnknown,
110
+ ZodVoid: () => ZodVoid,
111
+ addIssueToContext: () => addIssueToContext,
112
+ any: () => anyType,
113
+ array: () => arrayType,
114
+ bigint: () => bigIntType,
115
+ boolean: () => booleanType,
116
+ coerce: () => coerce,
117
+ custom: () => custom,
118
+ date: () => dateType,
119
+ datetimeRegex: () => datetimeRegex,
120
+ defaultErrorMap: () => en_default,
121
+ discriminatedUnion: () => discriminatedUnionType,
122
+ effect: () => effectsType,
123
+ enum: () => enumType,
124
+ function: () => functionType,
125
+ getErrorMap: () => getErrorMap,
126
+ getParsedType: () => getParsedType,
127
+ instanceof: () => instanceOfType,
128
+ intersection: () => intersectionType,
129
+ isAborted: () => isAborted,
130
+ isAsync: () => isAsync,
131
+ isDirty: () => isDirty,
132
+ isValid: () => isValid,
133
+ late: () => late,
134
+ lazy: () => lazyType,
135
+ literal: () => literalType,
136
+ makeIssue: () => makeIssue,
137
+ map: () => mapType,
138
+ nan: () => nanType,
139
+ nativeEnum: () => nativeEnumType,
140
+ never: () => neverType,
141
+ null: () => nullType,
142
+ nullable: () => nullableType,
143
+ number: () => numberType,
144
+ object: () => objectType,
145
+ objectUtil: () => objectUtil,
146
+ oboolean: () => oboolean,
147
+ onumber: () => onumber,
148
+ optional: () => optionalType,
149
+ ostring: () => ostring,
150
+ pipeline: () => pipelineType,
151
+ preprocess: () => preprocessType,
152
+ promise: () => promiseType,
153
+ quotelessJson: () => quotelessJson,
154
+ record: () => recordType,
155
+ set: () => setType,
156
+ setErrorMap: () => setErrorMap,
157
+ strictObject: () => strictObjectType,
158
+ string: () => stringType,
159
+ symbol: () => symbolType,
160
+ transformer: () => effectsType,
161
+ tuple: () => tupleType,
162
+ undefined: () => undefinedType,
163
+ union: () => unionType,
164
+ unknown: () => unknownType,
165
+ util: () => util,
166
+ void: () => voidType
167
+ });
168
+
169
+ // ../../node_modules/.pnpm/zod@3.25.30/node_modules/zod/dist/esm/v3/helpers/util.js
58
170
  var util;
59
171
  (function(util2) {
60
- util2.assertEqual = (val) => val;
172
+ util2.assertEqual = (_) => {
173
+ };
61
174
  function assertIs(_arg) {
62
175
  }
63
176
  util2.assertIs = assertIs;
@@ -101,7 +214,7 @@ var util;
101
214
  }
102
215
  return void 0;
103
216
  };
104
- util2.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && isFinite(val) && Math.floor(val) === val;
217
+ util2.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && Number.isFinite(val) && Math.floor(val) === val;
105
218
  function joinValues(array, separator = " | ") {
106
219
  return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator);
107
220
  }
@@ -153,7 +266,7 @@ var getParsedType = (data) => {
153
266
  case "string":
154
267
  return ZodParsedType.string;
155
268
  case "number":
156
- return isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;
269
+ return Number.isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;
157
270
  case "boolean":
158
271
  return ZodParsedType.boolean;
159
272
  case "function":
@@ -186,6 +299,8 @@ var getParsedType = (data) => {
186
299
  return ZodParsedType.unknown;
187
300
  }
188
301
  };
302
+
303
+ // ../../node_modules/.pnpm/zod@3.25.30/node_modules/zod/dist/esm/v3/ZodError.js
189
304
  var ZodIssueCode = util.arrayToEnum([
190
305
  "invalid_type",
191
306
  "invalid_literal",
@@ -209,6 +324,9 @@ var quotelessJson = (obj) => {
209
324
  return json.replace(/"([^"]+)":/g, "$1:");
210
325
  };
211
326
  var ZodError = class _ZodError extends Error {
327
+ get errors() {
328
+ return this.issues;
329
+ }
212
330
  constructor(issues) {
213
331
  super();
214
332
  this.issues = [];
@@ -227,9 +345,6 @@ var ZodError = class _ZodError extends Error {
227
345
  this.name = "ZodError";
228
346
  this.issues = issues;
229
347
  }
230
- get errors() {
231
- return this.issues;
232
- }
233
348
  format(_mapper) {
234
349
  const mapper = _mapper || function(issue) {
235
350
  return issue.message;
@@ -301,6 +416,8 @@ ZodError.create = (issues) => {
301
416
  const error = new ZodError(issues);
302
417
  return error;
303
418
  };
419
+
420
+ // ../../node_modules/.pnpm/zod@3.25.30/node_modules/zod/dist/esm/v3/locales/en.js
304
421
  var errorMap = (issue, _ctx) => {
305
422
  let message;
306
423
  switch (issue.code) {
@@ -399,13 +516,18 @@ var errorMap = (issue, _ctx) => {
399
516
  }
400
517
  return { message };
401
518
  };
402
- var overrideErrorMap = errorMap;
519
+ var en_default = errorMap;
520
+
521
+ // ../../node_modules/.pnpm/zod@3.25.30/node_modules/zod/dist/esm/v3/errors.js
522
+ var overrideErrorMap = en_default;
403
523
  function setErrorMap(map) {
404
524
  overrideErrorMap = map;
405
525
  }
406
526
  function getErrorMap() {
407
527
  return overrideErrorMap;
408
528
  }
529
+
530
+ // ../../node_modules/.pnpm/zod@3.25.30/node_modules/zod/dist/esm/v3/helpers/parseUtil.js
409
531
  var makeIssue = (params) => {
410
532
  const { data, path, errorMaps, issueData } = params;
411
533
  const fullPath = [...path, ...issueData.path || []];
@@ -440,9 +562,12 @@ function addIssueToContext(ctx, issueData) {
440
562
  path: ctx.path,
441
563
  errorMaps: [
442
564
  ctx.common.contextualErrorMap,
565
+ // contextual error map is first priority
443
566
  ctx.schemaErrorMap,
567
+ // then schema-bound map if available
444
568
  overrideMap,
445
- overrideMap === errorMap ? void 0 : errorMap
569
+ // then global override map
570
+ overrideMap === en_default ? void 0 : en_default
446
571
  // then global default map
447
572
  ].filter((x) => !!x)
448
573
  });
@@ -511,22 +636,26 @@ var isAborted = (x) => x.status === "aborted";
511
636
  var isDirty = (x) => x.status === "dirty";
512
637
  var isValid = (x) => x.status === "valid";
513
638
  var isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
514
- function __classPrivateFieldGet(receiver, state, kind, f) {
639
+
640
+ // ../../node_modules/.pnpm/zod@3.25.30/node_modules/zod/dist/esm/v3/helpers/errorUtil.js
641
+ var errorUtil;
642
+ (function(errorUtil2) {
643
+ errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
644
+ errorUtil2.toString = (message) => typeof message === "string" ? message : message?.message;
645
+ })(errorUtil || (errorUtil = {}));
646
+
647
+ // ../../node_modules/.pnpm/zod@3.25.30/node_modules/zod/dist/esm/v3/types.js
648
+ var __classPrivateFieldGet = function(receiver, state, kind, f) {
515
649
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
516
650
  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");
517
651
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
518
- }
519
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
652
+ };
653
+ var __classPrivateFieldSet = function(receiver, state, value, kind, f) {
520
654
  if (kind === "m") throw new TypeError("Private method is not writable");
521
655
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
522
656
  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");
523
657
  return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
524
- }
525
- var errorUtil;
526
- (function(errorUtil2) {
527
- errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
528
- errorUtil2.toString = (message) => typeof message === "string" ? message : message === null || message === void 0 ? void 0 : message.message;
529
- })(errorUtil || (errorUtil = {}));
658
+ };
530
659
  var _ZodEnum_cache;
531
660
  var _ZodNativeEnum_cache;
532
661
  var ParseInputLazyPath = class {
@@ -539,7 +668,7 @@ var ParseInputLazyPath = class {
539
668
  }
540
669
  get path() {
541
670
  if (!this._cachedPath.length) {
542
- if (this._key instanceof Array) {
671
+ if (Array.isArray(this._key)) {
543
672
  this._cachedPath.push(...this._path, ...this._key);
544
673
  } else {
545
674
  this._cachedPath.push(...this._path, this._key);
@@ -577,49 +706,20 @@ function processCreateParams(params) {
577
706
  if (errorMap2)
578
707
  return { errorMap: errorMap2, description };
579
708
  const customMap = (iss, ctx) => {
580
- var _a, _b;
581
709
  const { message } = params;
582
710
  if (iss.code === "invalid_enum_value") {
583
- return { message: message !== null && message !== void 0 ? message : ctx.defaultError };
711
+ return { message: message ?? ctx.defaultError };
584
712
  }
585
713
  if (typeof ctx.data === "undefined") {
586
- return { message: (_a = message !== null && message !== void 0 ? message : required_error) !== null && _a !== void 0 ? _a : ctx.defaultError };
714
+ return { message: message ?? required_error ?? ctx.defaultError };
587
715
  }
588
716
  if (iss.code !== "invalid_type")
589
717
  return { message: ctx.defaultError };
590
- return { message: (_b = message !== null && message !== void 0 ? message : invalid_type_error) !== null && _b !== void 0 ? _b : ctx.defaultError };
718
+ return { message: message ?? invalid_type_error ?? ctx.defaultError };
591
719
  };
592
720
  return { errorMap: customMap, description };
593
721
  }
594
722
  var ZodType = class {
595
- constructor(def) {
596
- this.spa = this.safeParseAsync;
597
- this._def = def;
598
- this.parse = this.parse.bind(this);
599
- this.safeParse = this.safeParse.bind(this);
600
- this.parseAsync = this.parseAsync.bind(this);
601
- this.safeParseAsync = this.safeParseAsync.bind(this);
602
- this.spa = this.spa.bind(this);
603
- this.refine = this.refine.bind(this);
604
- this.refinement = this.refinement.bind(this);
605
- this.superRefine = this.superRefine.bind(this);
606
- this.optional = this.optional.bind(this);
607
- this.nullable = this.nullable.bind(this);
608
- this.nullish = this.nullish.bind(this);
609
- this.array = this.array.bind(this);
610
- this.promise = this.promise.bind(this);
611
- this.or = this.or.bind(this);
612
- this.and = this.and.bind(this);
613
- this.transform = this.transform.bind(this);
614
- this.brand = this.brand.bind(this);
615
- this.default = this.default.bind(this);
616
- this.catch = this.catch.bind(this);
617
- this.describe = this.describe.bind(this);
618
- this.pipe = this.pipe.bind(this);
619
- this.readonly = this.readonly.bind(this);
620
- this.isNullable = this.isNullable.bind(this);
621
- this.isOptional = this.isOptional.bind(this);
622
- }
623
723
  get description() {
624
724
  return this._def.description;
625
725
  }
@@ -667,14 +767,13 @@ var ZodType = class {
667
767
  throw result.error;
668
768
  }
669
769
  safeParse(data, params) {
670
- var _a;
671
770
  const ctx = {
672
771
  common: {
673
772
  issues: [],
674
- async: (_a = params === null || params === void 0 ? void 0 : params.async) !== null && _a !== void 0 ? _a : false,
675
- contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap
773
+ async: params?.async ?? false,
774
+ contextualErrorMap: params?.errorMap
676
775
  },
677
- path: (params === null || params === void 0 ? void 0 : params.path) || [],
776
+ path: params?.path || [],
678
777
  schemaErrorMap: this._def.errorMap,
679
778
  parent: null,
680
779
  data,
@@ -683,6 +782,42 @@ var ZodType = class {
683
782
  const result = this._parseSync({ data, path: ctx.path, parent: ctx });
684
783
  return handleResult(ctx, result);
685
784
  }
785
+ "~validate"(data) {
786
+ const ctx = {
787
+ common: {
788
+ issues: [],
789
+ async: !!this["~standard"].async
790
+ },
791
+ path: [],
792
+ schemaErrorMap: this._def.errorMap,
793
+ parent: null,
794
+ data,
795
+ parsedType: getParsedType(data)
796
+ };
797
+ if (!this["~standard"].async) {
798
+ try {
799
+ const result = this._parseSync({ data, path: [], parent: ctx });
800
+ return isValid(result) ? {
801
+ value: result.value
802
+ } : {
803
+ issues: ctx.common.issues
804
+ };
805
+ } catch (err) {
806
+ if (err?.message?.toLowerCase()?.includes("encountered")) {
807
+ this["~standard"].async = true;
808
+ }
809
+ ctx.common = {
810
+ issues: [],
811
+ async: true
812
+ };
813
+ }
814
+ }
815
+ return this._parseAsync({ data, path: [], parent: ctx }).then((result) => isValid(result) ? {
816
+ value: result.value
817
+ } : {
818
+ issues: ctx.common.issues
819
+ });
820
+ }
686
821
  async parseAsync(data, params) {
687
822
  const result = await this.safeParseAsync(data, params);
688
823
  if (result.success)
@@ -693,10 +828,10 @@ var ZodType = class {
693
828
  const ctx = {
694
829
  common: {
695
830
  issues: [],
696
- contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap,
831
+ contextualErrorMap: params?.errorMap,
697
832
  async: true
698
833
  },
699
- path: (params === null || params === void 0 ? void 0 : params.path) || [],
834
+ path: params?.path || [],
700
835
  schemaErrorMap: this._def.errorMap,
701
836
  parent: null,
702
837
  data,
@@ -760,6 +895,39 @@ var ZodType = class {
760
895
  superRefine(refinement) {
761
896
  return this._refinement(refinement);
762
897
  }
898
+ constructor(def) {
899
+ this.spa = this.safeParseAsync;
900
+ this._def = def;
901
+ this.parse = this.parse.bind(this);
902
+ this.safeParse = this.safeParse.bind(this);
903
+ this.parseAsync = this.parseAsync.bind(this);
904
+ this.safeParseAsync = this.safeParseAsync.bind(this);
905
+ this.spa = this.spa.bind(this);
906
+ this.refine = this.refine.bind(this);
907
+ this.refinement = this.refinement.bind(this);
908
+ this.superRefine = this.superRefine.bind(this);
909
+ this.optional = this.optional.bind(this);
910
+ this.nullable = this.nullable.bind(this);
911
+ this.nullish = this.nullish.bind(this);
912
+ this.array = this.array.bind(this);
913
+ this.promise = this.promise.bind(this);
914
+ this.or = this.or.bind(this);
915
+ this.and = this.and.bind(this);
916
+ this.transform = this.transform.bind(this);
917
+ this.brand = this.brand.bind(this);
918
+ this.default = this.default.bind(this);
919
+ this.catch = this.catch.bind(this);
920
+ this.describe = this.describe.bind(this);
921
+ this.pipe = this.pipe.bind(this);
922
+ this.readonly = this.readonly.bind(this);
923
+ this.isNullable = this.isNullable.bind(this);
924
+ this.isOptional = this.isOptional.bind(this);
925
+ this["~standard"] = {
926
+ version: 1,
927
+ vendor: "zod",
928
+ validate: (data) => this["~validate"](data)
929
+ };
930
+ }
763
931
  optional() {
764
932
  return ZodOptional.create(this, this._def);
765
933
  }
@@ -770,7 +938,7 @@ var ZodType = class {
770
938
  return this.nullable().optional();
771
939
  }
772
940
  array() {
773
- return ZodArray.create(this, this._def);
941
+ return ZodArray.create(this);
774
942
  }
775
943
  promise() {
776
944
  return ZodPromise.create(this, this._def);
@@ -836,26 +1004,31 @@ var ZodType = class {
836
1004
  };
837
1005
  var cuidRegex = /^c[^\s-]{8,}$/i;
838
1006
  var cuid2Regex = /^[0-9a-z]+$/;
839
- var ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/;
1007
+ var ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/i;
840
1008
  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;
841
1009
  var nanoidRegex = /^[a-z0-9_-]{21}$/i;
1010
+ var jwtRegex = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/;
842
1011
  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)?)??$/;
843
1012
  var emailRegex = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;
844
1013
  var _emojiRegex = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;
845
1014
  var emojiRegex;
846
1015
  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])$/;
847
- 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})))$/;
1016
+ 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])$/;
1017
+ 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]))$/;
1018
+ 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])$/;
848
1019
  var base64Regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;
1020
+ var base64urlRegex = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/;
849
1021
  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])))`;
850
1022
  var dateRegex = new RegExp(`^${dateRegexSource}$`);
851
1023
  function timeRegexSource(args) {
852
- let regex = `([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d`;
1024
+ let secondsRegexSource = `[0-5]\\d`;
853
1025
  if (args.precision) {
854
- regex = `${regex}\\.\\d{${args.precision}}`;
1026
+ secondsRegexSource = `${secondsRegexSource}\\.\\d{${args.precision}}`;
855
1027
  } else if (args.precision == null) {
856
- regex = `${regex}(\\.\\d+)?`;
1028
+ secondsRegexSource = `${secondsRegexSource}(\\.\\d+)?`;
857
1029
  }
858
- return regex;
1030
+ const secondsQuantifier = args.precision ? "+" : "?";
1031
+ return `([01]\\d|2[0-3]):[0-5]\\d(:${secondsRegexSource})${secondsQuantifier}`;
859
1032
  }
860
1033
  function timeRegex(args) {
861
1034
  return new RegExp(`^${timeRegexSource(args)}$`);
@@ -878,6 +1051,35 @@ function isValidIP(ip, version) {
878
1051
  }
879
1052
  return false;
880
1053
  }
1054
+ function isValidJWT(jwt, alg) {
1055
+ if (!jwtRegex.test(jwt))
1056
+ return false;
1057
+ try {
1058
+ const [header] = jwt.split(".");
1059
+ const base64 = header.replace(/-/g, "+").replace(/_/g, "/").padEnd(header.length + (4 - header.length % 4) % 4, "=");
1060
+ const decoded = JSON.parse(atob(base64));
1061
+ if (typeof decoded !== "object" || decoded === null)
1062
+ return false;
1063
+ if ("typ" in decoded && decoded?.typ !== "JWT")
1064
+ return false;
1065
+ if (!decoded.alg)
1066
+ return false;
1067
+ if (alg && decoded.alg !== alg)
1068
+ return false;
1069
+ return true;
1070
+ } catch {
1071
+ return false;
1072
+ }
1073
+ }
1074
+ function isValidCidr(ip, version) {
1075
+ if ((version === "v4" || !version) && ipv4CidrRegex.test(ip)) {
1076
+ return true;
1077
+ }
1078
+ if ((version === "v6" || !version) && ipv6CidrRegex.test(ip)) {
1079
+ return true;
1080
+ }
1081
+ return false;
1082
+ }
881
1083
  var ZodString = class _ZodString extends ZodType {
882
1084
  _parse(input) {
883
1085
  if (this._def.coerce) {
@@ -1024,7 +1226,7 @@ var ZodString = class _ZodString extends ZodType {
1024
1226
  } else if (check.kind === "url") {
1025
1227
  try {
1026
1228
  new URL(input.data);
1027
- } catch (_a) {
1229
+ } catch {
1028
1230
  ctx = this._getOrReturnCtx(input, ctx);
1029
1231
  addIssueToContext(ctx, {
1030
1232
  validation: "url",
@@ -1134,6 +1336,26 @@ var ZodString = class _ZodString extends ZodType {
1134
1336
  });
1135
1337
  status.dirty();
1136
1338
  }
1339
+ } else if (check.kind === "jwt") {
1340
+ if (!isValidJWT(input.data, check.alg)) {
1341
+ ctx = this._getOrReturnCtx(input, ctx);
1342
+ addIssueToContext(ctx, {
1343
+ validation: "jwt",
1344
+ code: ZodIssueCode.invalid_string,
1345
+ message: check.message
1346
+ });
1347
+ status.dirty();
1348
+ }
1349
+ } else if (check.kind === "cidr") {
1350
+ if (!isValidCidr(input.data, check.version)) {
1351
+ ctx = this._getOrReturnCtx(input, ctx);
1352
+ addIssueToContext(ctx, {
1353
+ validation: "cidr",
1354
+ code: ZodIssueCode.invalid_string,
1355
+ message: check.message
1356
+ });
1357
+ status.dirty();
1358
+ }
1137
1359
  } else if (check.kind === "base64") {
1138
1360
  if (!base64Regex.test(input.data)) {
1139
1361
  ctx = this._getOrReturnCtx(input, ctx);
@@ -1144,6 +1366,16 @@ var ZodString = class _ZodString extends ZodType {
1144
1366
  });
1145
1367
  status.dirty();
1146
1368
  }
1369
+ } else if (check.kind === "base64url") {
1370
+ if (!base64urlRegex.test(input.data)) {
1371
+ ctx = this._getOrReturnCtx(input, ctx);
1372
+ addIssueToContext(ctx, {
1373
+ validation: "base64url",
1374
+ code: ZodIssueCode.invalid_string,
1375
+ message: check.message
1376
+ });
1377
+ status.dirty();
1378
+ }
1147
1379
  } else {
1148
1380
  util.assertNever(check);
1149
1381
  }
@@ -1190,11 +1422,22 @@ var ZodString = class _ZodString extends ZodType {
1190
1422
  base64(message) {
1191
1423
  return this._addCheck({ kind: "base64", ...errorUtil.errToObj(message) });
1192
1424
  }
1425
+ base64url(message) {
1426
+ return this._addCheck({
1427
+ kind: "base64url",
1428
+ ...errorUtil.errToObj(message)
1429
+ });
1430
+ }
1431
+ jwt(options) {
1432
+ return this._addCheck({ kind: "jwt", ...errorUtil.errToObj(options) });
1433
+ }
1193
1434
  ip(options) {
1194
1435
  return this._addCheck({ kind: "ip", ...errorUtil.errToObj(options) });
1195
1436
  }
1437
+ cidr(options) {
1438
+ return this._addCheck({ kind: "cidr", ...errorUtil.errToObj(options) });
1439
+ }
1196
1440
  datetime(options) {
1197
- var _a, _b;
1198
1441
  if (typeof options === "string") {
1199
1442
  return this._addCheck({
1200
1443
  kind: "datetime",
@@ -1206,10 +1449,10 @@ var ZodString = class _ZodString extends ZodType {
1206
1449
  }
1207
1450
  return this._addCheck({
1208
1451
  kind: "datetime",
1209
- precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === "undefined" ? null : options === null || options === void 0 ? void 0 : options.precision,
1210
- offset: (_a = options === null || options === void 0 ? void 0 : options.offset) !== null && _a !== void 0 ? _a : false,
1211
- local: (_b = options === null || options === void 0 ? void 0 : options.local) !== null && _b !== void 0 ? _b : false,
1212
- ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message)
1452
+ precision: typeof options?.precision === "undefined" ? null : options?.precision,
1453
+ offset: options?.offset ?? false,
1454
+ local: options?.local ?? false,
1455
+ ...errorUtil.errToObj(options?.message)
1213
1456
  });
1214
1457
  }
1215
1458
  date(message) {
@@ -1225,8 +1468,8 @@ var ZodString = class _ZodString extends ZodType {
1225
1468
  }
1226
1469
  return this._addCheck({
1227
1470
  kind: "time",
1228
- precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === "undefined" ? null : options === null || options === void 0 ? void 0 : options.precision,
1229
- ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message)
1471
+ precision: typeof options?.precision === "undefined" ? null : options?.precision,
1472
+ ...errorUtil.errToObj(options?.message)
1230
1473
  });
1231
1474
  }
1232
1475
  duration(message) {
@@ -1243,8 +1486,8 @@ var ZodString = class _ZodString extends ZodType {
1243
1486
  return this._addCheck({
1244
1487
  kind: "includes",
1245
1488
  value,
1246
- position: options === null || options === void 0 ? void 0 : options.position,
1247
- ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message)
1489
+ position: options?.position,
1490
+ ...errorUtil.errToObj(options?.message)
1248
1491
  });
1249
1492
  }
1250
1493
  startsWith(value, message) {
@@ -1283,8 +1526,7 @@ var ZodString = class _ZodString extends ZodType {
1283
1526
  });
1284
1527
  }
1285
1528
  /**
1286
- * @deprecated Use z.string().min(1) instead.
1287
- * @see {@link ZodString.min}
1529
+ * Equivalent to `.min(1)`
1288
1530
  */
1289
1531
  nonempty(message) {
1290
1532
  return this.min(1, errorUtil.errToObj(message));
@@ -1346,9 +1588,15 @@ var ZodString = class _ZodString extends ZodType {
1346
1588
  get isIP() {
1347
1589
  return !!this._def.checks.find((ch) => ch.kind === "ip");
1348
1590
  }
1591
+ get isCIDR() {
1592
+ return !!this._def.checks.find((ch) => ch.kind === "cidr");
1593
+ }
1349
1594
  get isBase64() {
1350
1595
  return !!this._def.checks.find((ch) => ch.kind === "base64");
1351
1596
  }
1597
+ get isBase64url() {
1598
+ return !!this._def.checks.find((ch) => ch.kind === "base64url");
1599
+ }
1352
1600
  get minLength() {
1353
1601
  let min = null;
1354
1602
  for (const ch of this._def.checks) {
@@ -1371,11 +1619,10 @@ var ZodString = class _ZodString extends ZodType {
1371
1619
  }
1372
1620
  };
1373
1621
  ZodString.create = (params) => {
1374
- var _a;
1375
1622
  return new ZodString({
1376
1623
  checks: [],
1377
1624
  typeName: ZodFirstPartyTypeKind.ZodString,
1378
- coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,
1625
+ coerce: params?.coerce ?? false,
1379
1626
  ...processCreateParams(params)
1380
1627
  });
1381
1628
  };
@@ -1383,9 +1630,9 @@ function floatSafeRemainder(val, step) {
1383
1630
  const valDecCount = (val.toString().split(".")[1] || "").length;
1384
1631
  const stepDecCount = (step.toString().split(".")[1] || "").length;
1385
1632
  const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
1386
- const valInt = parseInt(val.toFixed(decCount).replace(".", ""));
1387
- const stepInt = parseInt(step.toFixed(decCount).replace(".", ""));
1388
- return valInt % stepInt / Math.pow(10, decCount);
1633
+ const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
1634
+ const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
1635
+ return valInt % stepInt / 10 ** decCount;
1389
1636
  }
1390
1637
  var ZodNumber = class _ZodNumber extends ZodType {
1391
1638
  constructor() {
@@ -1595,7 +1842,8 @@ var ZodNumber = class _ZodNumber extends ZodType {
1595
1842
  return !!this._def.checks.find((ch) => ch.kind === "int" || ch.kind === "multipleOf" && util.isInteger(ch.value));
1596
1843
  }
1597
1844
  get isFinite() {
1598
- let max = null, min = null;
1845
+ let max = null;
1846
+ let min = null;
1599
1847
  for (const ch of this._def.checks) {
1600
1848
  if (ch.kind === "finite" || ch.kind === "int" || ch.kind === "multipleOf") {
1601
1849
  return true;
@@ -1614,7 +1862,7 @@ ZodNumber.create = (params) => {
1614
1862
  return new ZodNumber({
1615
1863
  checks: [],
1616
1864
  typeName: ZodFirstPartyTypeKind.ZodNumber,
1617
- coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
1865
+ coerce: params?.coerce || false,
1618
1866
  ...processCreateParams(params)
1619
1867
  });
1620
1868
  };
@@ -1626,17 +1874,15 @@ var ZodBigInt = class _ZodBigInt extends ZodType {
1626
1874
  }
1627
1875
  _parse(input) {
1628
1876
  if (this._def.coerce) {
1629
- input.data = BigInt(input.data);
1877
+ try {
1878
+ input.data = BigInt(input.data);
1879
+ } catch {
1880
+ return this._getInvalidInput(input);
1881
+ }
1630
1882
  }
1631
1883
  const parsedType = this._getType(input);
1632
1884
  if (parsedType !== ZodParsedType.bigint) {
1633
- const ctx2 = this._getOrReturnCtx(input);
1634
- addIssueToContext(ctx2, {
1635
- code: ZodIssueCode.invalid_type,
1636
- expected: ZodParsedType.bigint,
1637
- received: ctx2.parsedType
1638
- });
1639
- return INVALID;
1885
+ return this._getInvalidInput(input);
1640
1886
  }
1641
1887
  let ctx = void 0;
1642
1888
  const status = new ParseStatus();
@@ -1683,6 +1929,15 @@ var ZodBigInt = class _ZodBigInt extends ZodType {
1683
1929
  }
1684
1930
  return { status: status.value, value: input.data };
1685
1931
  }
1932
+ _getInvalidInput(input) {
1933
+ const ctx = this._getOrReturnCtx(input);
1934
+ addIssueToContext(ctx, {
1935
+ code: ZodIssueCode.invalid_type,
1936
+ expected: ZodParsedType.bigint,
1937
+ received: ctx.parsedType
1938
+ });
1939
+ return INVALID;
1940
+ }
1686
1941
  gte(value, message) {
1687
1942
  return this.setLimit("min", value, true, errorUtil.toString(message));
1688
1943
  }
@@ -1776,11 +2031,10 @@ var ZodBigInt = class _ZodBigInt extends ZodType {
1776
2031
  }
1777
2032
  };
1778
2033
  ZodBigInt.create = (params) => {
1779
- var _a;
1780
2034
  return new ZodBigInt({
1781
2035
  checks: [],
1782
2036
  typeName: ZodFirstPartyTypeKind.ZodBigInt,
1783
- coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,
2037
+ coerce: params?.coerce ?? false,
1784
2038
  ...processCreateParams(params)
1785
2039
  });
1786
2040
  };
@@ -1805,7 +2059,7 @@ var ZodBoolean = class extends ZodType {
1805
2059
  ZodBoolean.create = (params) => {
1806
2060
  return new ZodBoolean({
1807
2061
  typeName: ZodFirstPartyTypeKind.ZodBoolean,
1808
- coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
2062
+ coerce: params?.coerce || false,
1809
2063
  ...processCreateParams(params)
1810
2064
  });
1811
2065
  };
@@ -1824,7 +2078,7 @@ var ZodDate = class _ZodDate extends ZodType {
1824
2078
  });
1825
2079
  return INVALID;
1826
2080
  }
1827
- if (isNaN(input.data.getTime())) {
2081
+ if (Number.isNaN(input.data.getTime())) {
1828
2082
  const ctx2 = this._getOrReturnCtx(input);
1829
2083
  addIssueToContext(ctx2, {
1830
2084
  code: ZodIssueCode.invalid_date
@@ -1913,7 +2167,7 @@ var ZodDate = class _ZodDate extends ZodType {
1913
2167
  ZodDate.create = (params) => {
1914
2168
  return new ZodDate({
1915
2169
  checks: [],
1916
- coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
2170
+ coerce: params?.coerce || false,
1917
2171
  typeName: ZodFirstPartyTypeKind.ZodDate,
1918
2172
  ...processCreateParams(params)
1919
2173
  });
@@ -2188,7 +2442,8 @@ var ZodObject = class _ZodObject extends ZodType {
2188
2442
  return this._cached;
2189
2443
  const shape = this._def.shape();
2190
2444
  const keys = util.objectKeys(shape);
2191
- return this._cached = { shape, keys };
2445
+ this._cached = { shape, keys };
2446
+ return this._cached;
2192
2447
  }
2193
2448
  _parse(input) {
2194
2449
  const parsedType = this._getType(input);
@@ -2238,8 +2493,8 @@ var ZodObject = class _ZodObject extends ZodType {
2238
2493
  });
2239
2494
  status.dirty();
2240
2495
  }
2241
- } else if (unknownKeys === "strip") ;
2242
- else {
2496
+ } else if (unknownKeys === "strip") {
2497
+ } else {
2243
2498
  throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);
2244
2499
  }
2245
2500
  } else {
@@ -2286,11 +2541,10 @@ var ZodObject = class _ZodObject extends ZodType {
2286
2541
  unknownKeys: "strict",
2287
2542
  ...message !== void 0 ? {
2288
2543
  errorMap: (issue, ctx) => {
2289
- var _a, _b, _c, _d;
2290
- 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;
2544
+ const defaultError = this._def.errorMap?.(issue, ctx).message ?? ctx.defaultError;
2291
2545
  if (issue.code === "unrecognized_keys")
2292
2546
  return {
2293
- message: (_d = errorUtil.errToObj(message).message) !== null && _d !== void 0 ? _d : defaultError
2547
+ message: errorUtil.errToObj(message).message ?? defaultError
2294
2548
  };
2295
2549
  return {
2296
2550
  message: defaultError
@@ -2421,11 +2675,11 @@ var ZodObject = class _ZodObject extends ZodType {
2421
2675
  }
2422
2676
  pick(mask) {
2423
2677
  const shape = {};
2424
- util.objectKeys(mask).forEach((key) => {
2678
+ for (const key of util.objectKeys(mask)) {
2425
2679
  if (mask[key] && this.shape[key]) {
2426
2680
  shape[key] = this.shape[key];
2427
2681
  }
2428
- });
2682
+ }
2429
2683
  return new _ZodObject({
2430
2684
  ...this._def,
2431
2685
  shape: () => shape
@@ -2433,11 +2687,11 @@ var ZodObject = class _ZodObject extends ZodType {
2433
2687
  }
2434
2688
  omit(mask) {
2435
2689
  const shape = {};
2436
- util.objectKeys(this.shape).forEach((key) => {
2690
+ for (const key of util.objectKeys(this.shape)) {
2437
2691
  if (!mask[key]) {
2438
2692
  shape[key] = this.shape[key];
2439
2693
  }
2440
- });
2694
+ }
2441
2695
  return new _ZodObject({
2442
2696
  ...this._def,
2443
2697
  shape: () => shape
@@ -2451,14 +2705,14 @@ var ZodObject = class _ZodObject extends ZodType {
2451
2705
  }
2452
2706
  partial(mask) {
2453
2707
  const newShape = {};
2454
- util.objectKeys(this.shape).forEach((key) => {
2708
+ for (const key of util.objectKeys(this.shape)) {
2455
2709
  const fieldSchema = this.shape[key];
2456
2710
  if (mask && !mask[key]) {
2457
2711
  newShape[key] = fieldSchema;
2458
2712
  } else {
2459
2713
  newShape[key] = fieldSchema.optional();
2460
2714
  }
2461
- });
2715
+ }
2462
2716
  return new _ZodObject({
2463
2717
  ...this._def,
2464
2718
  shape: () => newShape
@@ -2466,7 +2720,7 @@ var ZodObject = class _ZodObject extends ZodType {
2466
2720
  }
2467
2721
  required(mask) {
2468
2722
  const newShape = {};
2469
- util.objectKeys(this.shape).forEach((key) => {
2723
+ for (const key of util.objectKeys(this.shape)) {
2470
2724
  if (mask && !mask[key]) {
2471
2725
  newShape[key] = this.shape[key];
2472
2726
  } else {
@@ -2477,7 +2731,7 @@ var ZodObject = class _ZodObject extends ZodType {
2477
2731
  }
2478
2732
  newShape[key] = newField;
2479
2733
  }
2480
- });
2734
+ }
2481
2735
  return new _ZodObject({
2482
2736
  ...this._def,
2483
2737
  shape: () => newShape
@@ -3093,12 +3347,7 @@ var ZodFunction = class _ZodFunction extends ZodType {
3093
3347
  return makeIssue({
3094
3348
  data: args,
3095
3349
  path: ctx.path,
3096
- errorMaps: [
3097
- ctx.common.contextualErrorMap,
3098
- ctx.schemaErrorMap,
3099
- getErrorMap(),
3100
- errorMap
3101
- ].filter((x) => !!x),
3350
+ errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x) => !!x),
3102
3351
  issueData: {
3103
3352
  code: ZodIssueCode.invalid_arguments,
3104
3353
  argumentsError: error
@@ -3109,12 +3358,7 @@ var ZodFunction = class _ZodFunction extends ZodType {
3109
3358
  return makeIssue({
3110
3359
  data: returns,
3111
3360
  path: ctx.path,
3112
- errorMaps: [
3113
- ctx.common.contextualErrorMap,
3114
- ctx.schemaErrorMap,
3115
- getErrorMap(),
3116
- errorMap
3117
- ].filter((x) => !!x),
3361
+ errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x) => !!x),
3118
3362
  issueData: {
3119
3363
  code: ZodIssueCode.invalid_return_type,
3120
3364
  returnTypeError: error
@@ -3493,7 +3737,10 @@ var ZodEffects = class extends ZodType {
3493
3737
  return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((base) => {
3494
3738
  if (!isValid(base))
3495
3739
  return base;
3496
- return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({ status: status.value, value: result }));
3740
+ return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({
3741
+ status: status.value,
3742
+ value: result
3743
+ }));
3497
3744
  });
3498
3745
  }
3499
3746
  }
@@ -3745,16 +3992,30 @@ ZodReadonly.create = (type, params) => {
3745
3992
  ...processCreateParams(params)
3746
3993
  });
3747
3994
  };
3748
- function custom(check, params = {}, fatal) {
3995
+ function cleanParams(params, data) {
3996
+ const p = typeof params === "function" ? params(data) : typeof params === "string" ? { message: params } : params;
3997
+ const p2 = typeof p === "string" ? { message: p } : p;
3998
+ return p2;
3999
+ }
4000
+ function custom(check, _params = {}, fatal) {
3749
4001
  if (check)
3750
4002
  return ZodAny.create().superRefine((data, ctx) => {
3751
- var _a, _b;
3752
- if (!check(data)) {
3753
- const p = typeof params === "function" ? params(data) : typeof params === "string" ? { message: params } : params;
3754
- const _fatal = (_b = (_a = p.fatal) !== null && _a !== void 0 ? _a : fatal) !== null && _b !== void 0 ? _b : true;
3755
- const p2 = typeof p === "string" ? { message: p } : p;
3756
- ctx.addIssue({ code: "custom", ...p2, fatal: _fatal });
4003
+ const r = check(data);
4004
+ if (r instanceof Promise) {
4005
+ return r.then((r2) => {
4006
+ if (!r2) {
4007
+ const params = cleanParams(_params, data);
4008
+ const _fatal = params.fatal ?? fatal ?? true;
4009
+ ctx.addIssue({ code: "custom", ...params, fatal: _fatal });
4010
+ }
4011
+ });
3757
4012
  }
4013
+ if (!r) {
4014
+ const params = cleanParams(_params, data);
4015
+ const _fatal = params.fatal ?? fatal ?? true;
4016
+ ctx.addIssue({ code: "custom", ...params, fatal: _fatal });
4017
+ }
4018
+ return;
3758
4019
  });
3759
4020
  return ZodAny.create();
3760
4021
  }
@@ -3851,159 +4112,43 @@ var coerce = {
3851
4112
  date: (arg) => ZodDate.create({ ...arg, coerce: true })
3852
4113
  };
3853
4114
  var NEVER = INVALID;
3854
- var z = /* @__PURE__ */ Object.freeze({
3855
- __proto__: null,
3856
- defaultErrorMap: errorMap,
3857
- setErrorMap,
3858
- getErrorMap,
3859
- makeIssue,
3860
- EMPTY_PATH,
3861
- addIssueToContext,
3862
- ParseStatus,
3863
- INVALID,
3864
- DIRTY,
3865
- OK,
3866
- isAborted,
3867
- isDirty,
3868
- isValid,
3869
- isAsync,
3870
- get util() {
3871
- return util;
3872
- },
3873
- get objectUtil() {
3874
- return objectUtil;
3875
- },
3876
- ZodParsedType,
3877
- getParsedType,
3878
- ZodType,
3879
- datetimeRegex,
3880
- ZodString,
3881
- ZodNumber,
3882
- ZodBigInt,
3883
- ZodBoolean,
3884
- ZodDate,
3885
- ZodSymbol,
3886
- ZodUndefined,
3887
- ZodNull,
3888
- ZodAny,
3889
- ZodUnknown,
3890
- ZodNever,
3891
- ZodVoid,
3892
- ZodArray,
3893
- ZodObject,
3894
- ZodUnion,
3895
- ZodDiscriminatedUnion,
3896
- ZodIntersection,
3897
- ZodTuple,
3898
- ZodRecord,
3899
- ZodMap,
3900
- ZodSet,
3901
- ZodFunction,
3902
- ZodLazy,
3903
- ZodLiteral,
3904
- ZodEnum,
3905
- ZodNativeEnum,
3906
- ZodPromise,
3907
- ZodEffects,
3908
- ZodTransformer: ZodEffects,
3909
- ZodOptional,
3910
- ZodNullable,
3911
- ZodDefault,
3912
- ZodCatch,
3913
- ZodNaN,
3914
- BRAND,
3915
- ZodBranded,
3916
- ZodPipeline,
3917
- ZodReadonly,
3918
- custom,
3919
- Schema: ZodType,
3920
- ZodSchema: ZodType,
3921
- late,
3922
- get ZodFirstPartyTypeKind() {
3923
- return ZodFirstPartyTypeKind;
3924
- },
3925
- coerce,
3926
- any: anyType,
3927
- array: arrayType,
3928
- bigint: bigIntType,
3929
- boolean: booleanType,
3930
- date: dateType,
3931
- discriminatedUnion: discriminatedUnionType,
3932
- effect: effectsType,
3933
- "enum": enumType,
3934
- "function": functionType,
3935
- "instanceof": instanceOfType,
3936
- intersection: intersectionType,
3937
- lazy: lazyType,
3938
- literal: literalType,
3939
- map: mapType,
3940
- nan: nanType,
3941
- nativeEnum: nativeEnumType,
3942
- never: neverType,
3943
- "null": nullType,
3944
- nullable: nullableType,
3945
- number: numberType,
3946
- object: objectType,
3947
- oboolean,
3948
- onumber,
3949
- optional: optionalType,
3950
- ostring,
3951
- pipeline: pipelineType,
3952
- preprocess: preprocessType,
3953
- promise: promiseType,
3954
- record: recordType,
3955
- set: setType,
3956
- strictObject: strictObjectType,
3957
- string: stringType,
3958
- symbol: symbolType,
3959
- transformer: effectsType,
3960
- tuple: tupleType,
3961
- "undefined": undefinedType,
3962
- union: unionType,
3963
- unknown: unknownType,
3964
- "void": voidType,
3965
- NEVER,
3966
- ZodIssueCode,
3967
- quotelessJson,
3968
- ZodError
3969
- });
3970
4115
 
3971
4116
  // lib/imports/models/ImportDetail.ts
3972
- var importDetailSchema = z.object({
3973
- completedAt: z.number().nullish(),
3974
- errorCount: z.number(),
3975
- importId: z.number(),
3976
- name: z.string(),
3977
- startedAt: z.string().nullish(),
3978
- status: z.string(),
3979
- uploadedAt: z.string()
4117
+ var importDetailSchema = external_exports.object({
4118
+ completedAt: external_exports.number().nullish(),
4119
+ errorCount: external_exports.number(),
4120
+ importId: external_exports.number(),
4121
+ name: external_exports.string(),
4122
+ startedAt: external_exports.string().nullish(),
4123
+ status: external_exports.string(),
4124
+ uploadedAt: external_exports.string()
3980
4125
  });
3981
4126
 
3982
4127
  // lib/imports/models/Import.ts
3983
- var importSchema = z.object({
3984
- count: z.number(),
3985
- imports: z.array(importDetailSchema)
4128
+ var importSchema = external_exports.object({
4129
+ count: external_exports.number(),
4130
+ imports: external_exports.array(importDetailSchema)
3986
4131
  });
3987
4132
 
3988
4133
  // lib/imports/models/ImportError.ts
3989
- var importErrorSchema = z.object({
3990
- attribute: z.string().nullish(),
3991
- description: z.string(),
3992
- importErrorId: z.number(),
3993
- row: z.number()
4134
+ var importErrorSchema = external_exports.object({
4135
+ attribute: external_exports.string().nullish(),
4136
+ description: external_exports.string(),
4137
+ importErrorId: external_exports.number(),
4138
+ row: external_exports.number()
3994
4139
  });
3995
4140
 
3996
4141
  // lib/imports/models/ImportErrors.ts
3997
- var importErrorsSchema = z.object({
3998
- count: z.number(),
3999
- errors: z.array(importErrorSchema),
4000
- hasNext: z.boolean(),
4001
- importId: z.number(),
4002
- totalCount: z.number()
4142
+ var importErrorsSchema = external_exports.object({
4143
+ count: external_exports.number(),
4144
+ errors: external_exports.array(importErrorSchema),
4145
+ hasNext: external_exports.boolean(),
4146
+ importId: external_exports.number(),
4147
+ totalCount: external_exports.number()
4003
4148
  });
4004
4149
 
4005
4150
  // lib/imports/models/ImportsStatusEnum.ts
4006
- var importStatusEnumSchema = z.enum([
4151
+ var importStatusEnumSchema = external_exports.enum([
4007
4152
  "QUEUED_FOR_IMPORT",
4008
4153
  "IN_PROGRESS",
4009
4154
  "DOC_FAILED",
@@ -4012,32 +4157,32 @@ var importStatusEnumSchema = z.enum([
4012
4157
  ]);
4013
4158
 
4014
4159
  // lib/imports/models/ImportsStatus.ts
4015
- var importsStatusSchema = z.object({
4016
- completedAt: z.string().nullish(),
4017
- docInEventId: z.string().nullish(),
4018
- errorCount: z.number().nullish(),
4019
- importId: z.number(),
4020
- invalidItemCount: z.number().nullish(),
4021
- name: z.string().nullish(),
4160
+ var importsStatusSchema = external_exports.object({
4161
+ completedAt: external_exports.string().nullish(),
4162
+ docInEventId: external_exports.string().nullish(),
4163
+ errorCount: external_exports.number().nullish(),
4164
+ importId: external_exports.number(),
4165
+ invalidItemCount: external_exports.number().nullish(),
4166
+ name: external_exports.string().nullish(),
4022
4167
  status: importStatusEnumSchema,
4023
- totalItemCount: z.number().nullish(),
4024
- validItemCount: z.number().nullish()
4168
+ totalItemCount: external_exports.number().nullish(),
4169
+ validItemCount: external_exports.number().nullish()
4025
4170
  });
4026
4171
 
4027
4172
  // lib/imports/models/VendorPartnerAttGroups.ts
4028
- var vendorPartnerAttGroupsSchema = z.object({
4029
- partnerCompanyId: z.number(),
4030
- partnerCompanyName: z.string(),
4031
- partnerAttributeGroups: z.array(z.number())
4173
+ var vendorPartnerAttGroupsSchema = external_exports.object({
4174
+ partnerCompanyId: external_exports.number(),
4175
+ partnerCompanyName: external_exports.string(),
4176
+ partnerAttributeGroups: external_exports.array(external_exports.number())
4032
4177
  });
4033
4178
 
4034
4179
  // lib/imports/models/GenerateImportTemplateParams.ts
4035
- var generateImportTemplateParamsSchema = z.object({
4036
- "multi-sheet": z.boolean(),
4037
- gids: z.string().optional(),
4038
- productTypeIds: z.string().optional(),
4039
- groupTypeId: z.number().optional(),
4040
- includeGuides: z.boolean().optional()
4180
+ var generateImportTemplateParamsSchema = external_exports.object({
4181
+ "multi-sheet": external_exports.boolean(),
4182
+ gids: external_exports.string().optional(),
4183
+ productTypeIds: external_exports.string().optional(),
4184
+ groupTypeId: external_exports.number().optional(),
4185
+ includeGuides: external_exports.boolean().optional()
4041
4186
  });
4042
4187
 
4043
4188
  // lib/imports/index.ts
@@ -4063,14 +4208,14 @@ function createImportsApiHandlers(client) {
4063
4208
  }
4064
4209
  getImports.generateData = () => (0, import_zod_mock.generateMock)(importSchema);
4065
4210
  function getImportsStatus(resolver = (_info) => {
4066
- const data = (0, import_zod_mock.generateMock)(z.array(importsStatusSchema));
4211
+ const data = (0, import_zod_mock.generateMock)(external_exports.array(importsStatusSchema));
4067
4212
  return import_msw.HttpResponse.json(data);
4068
4213
  }) {
4069
4214
  return import_msw.http.get(`${client.getBaseUrl()}${BASE_URL}/status`, resolver);
4070
4215
  }
4071
- getImportsStatus.generateData = () => (0, import_zod_mock.generateMock)(z.array(importsStatusSchema));
4216
+ getImportsStatus.generateData = () => (0, import_zod_mock.generateMock)(external_exports.array(importsStatusSchema));
4072
4217
  function getVendorPartnerGroups(resolver = (_info) => {
4073
- const data = (0, import_zod_mock.generateMock)(z.array(vendorPartnerAttGroupsSchema));
4218
+ const data = (0, import_zod_mock.generateMock)(external_exports.array(vendorPartnerAttGroupsSchema));
4074
4219
  return import_msw.HttpResponse.json(data);
4075
4220
  }) {
4076
4221
  return import_msw.http.get(
@@ -4078,7 +4223,7 @@ function createImportsApiHandlers(client) {
4078
4223
  resolver
4079
4224
  );
4080
4225
  }
4081
- getVendorPartnerGroups.generateData = () => (0, import_zod_mock.generateMock)(z.array(vendorPartnerAttGroupsSchema));
4226
+ getVendorPartnerGroups.generateData = () => (0, import_zod_mock.generateMock)(external_exports.array(vendorPartnerAttGroupsSchema));
4082
4227
  function uploadImport(resolver = (_info) => {
4083
4228
  return new import_msw.HttpResponse(null, { status: 200 });
4084
4229
  }) {
@@ -4107,42 +4252,42 @@ var import_zod_mock2 = require("@anatine/zod-mock");
4107
4252
  var import_msw2 = require("msw");
4108
4253
 
4109
4254
  // lib/categories/models/ItemCategory.ts
4110
- var itemCategorySchema = z.object({
4111
- categoryid: z.number(),
4112
- encodedCategoryId: z.string(),
4113
- companyId: z.number(),
4114
- name: z.string(),
4115
- isActive: z.number(),
4116
- createdDate: z.number().nullish(),
4117
- categorytimestamp: z.number().nullish(),
4118
- typeId: z.number(),
4119
- type: z.string(),
4120
- categorykey: z.string().nullish(),
4121
- description: z.string().nullish(),
4122
- categoryCatalogName: z.string().nullish()
4255
+ var itemCategorySchema = external_exports.object({
4256
+ categoryid: external_exports.number(),
4257
+ encodedCategoryId: external_exports.string(),
4258
+ companyId: external_exports.number(),
4259
+ name: external_exports.string(),
4260
+ isActive: external_exports.number(),
4261
+ createdDate: external_exports.number().nullish(),
4262
+ categorytimestamp: external_exports.number().nullish(),
4263
+ typeId: external_exports.number(),
4264
+ type: external_exports.string(),
4265
+ categorykey: external_exports.string().nullish(),
4266
+ description: external_exports.string().nullish(),
4267
+ categoryCatalogName: external_exports.string().nullish()
4123
4268
  });
4124
4269
 
4125
4270
  // lib/categories/models/ItemCategoriesSearch.ts
4126
- var itemCategoriesSearchSchema = z.object({
4127
- count: z.number(),
4128
- data: z.array(itemCategorySchema)
4271
+ var itemCategoriesSearchSchema = external_exports.object({
4272
+ count: external_exports.number(),
4273
+ data: external_exports.array(itemCategorySchema)
4129
4274
  });
4130
4275
 
4131
4276
  // lib/categories/models/ItemHierarchyResponse.ts
4132
- var baseHierarchySchema = z.object({
4133
- id: z.string(),
4134
- name: z.string().nullish(),
4135
- description: z.string().nullish(),
4136
- type: z.string().nullish()
4277
+ var baseHierarchySchema = external_exports.object({
4278
+ id: external_exports.string(),
4279
+ name: external_exports.string().nullish(),
4280
+ description: external_exports.string().nullish(),
4281
+ type: external_exports.string().nullish()
4137
4282
  });
4138
4283
  var hierarchySchema = baseHierarchySchema.extend({
4139
- child: z.lazy(() => hierarchySchema).nullable()
4284
+ child: external_exports.lazy(() => hierarchySchema).nullable()
4140
4285
  });
4141
- var itemHierarchyResponseSchema = z.object({
4142
- itemHierarchies: z.array(
4143
- z.object({
4144
- itemId: z.string(),
4145
- hierarchies: z.array(hierarchySchema)
4286
+ var itemHierarchyResponseSchema = external_exports.object({
4287
+ itemHierarchies: external_exports.array(
4288
+ external_exports.object({
4289
+ itemId: external_exports.string(),
4290
+ hierarchies: external_exports.array(hierarchySchema)
4146
4291
  })
4147
4292
  )
4148
4293
  });
@@ -4220,24 +4365,24 @@ var import_zod_mock3 = require("@anatine/zod-mock");
4220
4365
  var import_msw4 = require("msw");
4221
4366
 
4222
4367
  // lib/productTypes/models/AttrProdType.ts
4223
- var attrProdTypeSchema = z.object({
4224
- attrProdTypeId: z.number(),
4225
- productType: z.string(),
4226
- description: z.string(),
4227
- createdDate: z.number(),
4228
- createdBy: z.string(),
4229
- modifiedDate: z.number().optional(),
4230
- modifiedBy: z.string().optional(),
4231
- retailerId: z.number().optional()
4368
+ var attrProdTypeSchema = external_exports.object({
4369
+ attrProdTypeId: external_exports.number(),
4370
+ productType: external_exports.string(),
4371
+ description: external_exports.string(),
4372
+ createdDate: external_exports.number(),
4373
+ createdBy: external_exports.string(),
4374
+ modifiedDate: external_exports.number().optional(),
4375
+ modifiedBy: external_exports.string().optional(),
4376
+ retailerId: external_exports.number().optional()
4232
4377
  });
4233
4378
 
4234
4379
  // lib/productTypes/models/PagedResults.ts
4235
4380
  function pagedResultsSchema(resultsType) {
4236
- return z.object({
4237
- next: z.string(),
4238
- previous: z.string(),
4239
- count: z.number(),
4240
- results: z.array(resultsType)
4381
+ return external_exports.object({
4382
+ next: external_exports.string(),
4383
+ previous: external_exports.string(),
4384
+ count: external_exports.number(),
4385
+ results: external_exports.array(resultsType)
4241
4386
  });
4242
4387
  }
4243
4388
 
@@ -4263,43 +4408,43 @@ var import_zod_mock4 = require("@anatine/zod-mock");
4263
4408
  var import_msw5 = require("msw");
4264
4409
 
4265
4410
  // lib/tradingPartners/models/Connection.ts
4266
- var connectionSchema = z.object({
4267
- catalog_id: z.number(),
4268
- catalog_name: z.string().nullable(),
4269
- partner_company_name: z.string(),
4270
- partner_company_id: z.number(),
4271
- partner_org_id: z.string()
4411
+ var connectionSchema = external_exports.object({
4412
+ catalog_id: external_exports.number(),
4413
+ catalog_name: external_exports.string().nullable(),
4414
+ partner_company_name: external_exports.string(),
4415
+ partner_company_id: external_exports.number(),
4416
+ partner_org_id: external_exports.string()
4272
4417
  });
4273
4418
 
4274
4419
  // lib/tradingPartners/models/CompanyRelationshipUpsertBody.ts
4275
- var companyRelationshipUpsertBodySchema = z.object({
4276
- supplierId: z.number(),
4277
- retailerId: z.number(),
4278
- catalogId: z.number(),
4279
- active: z.boolean(),
4280
- applicationType: z.array(z.enum(["ASSORTMENT", "ITEM-XREF"])).default([])
4420
+ var companyRelationshipUpsertBodySchema = external_exports.object({
4421
+ supplierId: external_exports.number(),
4422
+ retailerId: external_exports.number(),
4423
+ catalogId: external_exports.number(),
4424
+ active: external_exports.boolean(),
4425
+ applicationType: external_exports.array(external_exports.enum(["ASSORTMENT", "ITEM-XREF", "TEST-ORDER-GENERATOR"])).default([])
4281
4426
  });
4282
4427
 
4283
4428
  // lib/tradingPartners/models/ItemPartner.ts
4284
- var itemPartnerSchema = z.object({
4285
- itemPartnerId: z.number(),
4286
- retailerId: z.number(),
4287
- supplierId: z.number(),
4288
- catalogId: z.number(),
4289
- isActive: z.number(),
4290
- createdDate: z.string(),
4291
- modifiedDate: z.string(),
4292
- applications: z.array(z.enum(["ASSORTMENT", "ITEM-XREF"]))
4429
+ var itemPartnerSchema = external_exports.object({
4430
+ itemPartnerId: external_exports.number(),
4431
+ retailerId: external_exports.number(),
4432
+ supplierId: external_exports.number(),
4433
+ catalogId: external_exports.number(),
4434
+ isActive: external_exports.number(),
4435
+ createdDate: external_exports.string(),
4436
+ modifiedDate: external_exports.string(),
4437
+ applications: external_exports.array(external_exports.enum(["ASSORTMENT", "ITEM-XREF"]))
4293
4438
  });
4294
4439
 
4295
4440
  // lib/tradingPartners/models/TradingPartnerAccessByCompanyId.ts
4296
- var tradingPartnerAccessByCompanyIdSchema = z.object({
4297
- companyId: z.number(),
4298
- companyType: z.string(),
4299
- identityOrgId: z.string(),
4300
- companyName: z.string(),
4301
- count: z.number(),
4302
- connections: z.array(connectionSchema)
4441
+ var tradingPartnerAccessByCompanyIdSchema = external_exports.object({
4442
+ companyId: external_exports.number(),
4443
+ companyType: external_exports.string(),
4444
+ identityOrgId: external_exports.string(),
4445
+ companyName: external_exports.string(),
4446
+ count: external_exports.number(),
4447
+ connections: external_exports.array(connectionSchema)
4303
4448
  });
4304
4449
 
4305
4450
  // lib/tradingPartners/index.ts
@@ -4344,8 +4489,8 @@ var import_zod_mock5 = require("@anatine/zod-mock");
4344
4489
  var import_msw6 = require("msw");
4345
4490
 
4346
4491
  // lib/tradingPartnerSettings/models/RetailerTradingPartnerStages.ts
4347
- var retailerTradingPartnerStages = z.array(
4348
- z.enum([
4492
+ var retailerTradingPartnerStages = external_exports.array(
4493
+ external_exports.enum([
4349
4494
  "Core",
4350
4495
  "Core Plus",
4351
4496
  "Core Advanced",
@@ -4379,96 +4524,96 @@ var import_zod_mock6 = require("@anatine/zod-mock");
4379
4524
  var import_msw7 = require("msw");
4380
4525
 
4381
4526
  // lib/whoami/models/IdentityServiceDatetimePreferences.ts
4382
- var identityServiceDatetimePreferencesSchema = z.object({
4383
- DATE_TIME: z.string(),
4384
- TIME: z.string(),
4385
- SHORT_DATE: z.string(),
4386
- LONG_DATETIME: z.string(),
4387
- LONG_TIME: z.string(),
4388
- DATE: z.string()
4527
+ var identityServiceDatetimePreferencesSchema = external_exports.object({
4528
+ DATE_TIME: external_exports.string(),
4529
+ TIME: external_exports.string(),
4530
+ SHORT_DATE: external_exports.string(),
4531
+ LONG_DATETIME: external_exports.string(),
4532
+ LONG_TIME: external_exports.string(),
4533
+ DATE: external_exports.string()
4389
4534
  });
4390
4535
 
4391
4536
  // lib/whoami/models/IdentityServiceOrganizationMetadata.ts
4392
- var identityServiceOrganizationMetadataSchema = z.object({
4393
- namespace: z.string(),
4394
- key: z.string(),
4395
- value: z.string()
4537
+ var identityServiceOrganizationMetadataSchema = external_exports.object({
4538
+ namespace: external_exports.string(),
4539
+ key: external_exports.string(),
4540
+ value: external_exports.string()
4396
4541
  });
4397
4542
 
4398
4543
  // lib/whoami/models/IdentityServiceOrganization.ts
4399
- var identityServiceOrganizationSchema = z.object({
4400
- organization_name: z.string().optional(),
4401
- organization_site: z.string().optional(),
4402
- namespace: z.string().optional(),
4403
- id: z.string(),
4404
- permissions: z.array(z.string()).optional(),
4544
+ var identityServiceOrganizationSchema = external_exports.object({
4545
+ organization_name: external_exports.string().optional(),
4546
+ organization_site: external_exports.string().optional(),
4547
+ namespace: external_exports.string().optional(),
4548
+ id: external_exports.string(),
4549
+ permissions: external_exports.array(external_exports.string()).optional(),
4405
4550
  metadata: identityServiceOrganizationMetadataSchema.optional()
4406
4551
  });
4407
4552
 
4408
4553
  // lib/whoami/models/IdentityServicePreferences.ts
4409
- var identityServicePreferencesSchema = z.object({
4410
- locale: z.string(),
4411
- timezone: z.string(),
4412
- cpUpgrade: z.string().optional(),
4413
- language: z.array(z.string()),
4554
+ var identityServicePreferencesSchema = external_exports.object({
4555
+ locale: external_exports.string(),
4556
+ timezone: external_exports.string(),
4557
+ cpUpgrade: external_exports.string().optional(),
4558
+ language: external_exports.array(external_exports.string()),
4414
4559
  datetime: identityServiceDatetimePreferencesSchema
4415
4560
  });
4416
4561
 
4417
4562
  // lib/whoami/models/IdentityServiceUser.ts
4418
- var identityServiceUserSchema = z.object({
4419
- id: z.string(),
4420
- email: z.string().optional(),
4421
- first_name: z.string().optional(),
4422
- last_name: z.string().optional(),
4423
- job_title: z.string().optional(),
4424
- externally_managed: z.boolean().optional(),
4425
- city: z.string().optional(),
4426
- name: z.string(),
4427
- state: z.string().optional(),
4428
- country: z.string().optional(),
4429
- user_type: z.string().optional(),
4430
- token_type: z.string().optional(),
4431
- avatar_image_id: z.string().optional(),
4432
- avatar_image_url: z.string().optional(),
4433
- origin_avatar_image_id: z.string().optional(),
4434
- bio: z.string().optional(),
4435
- phone_number: z.string().optional(),
4436
- twitter_handle: z.string().optional(),
4437
- linkedin_url: z.string().optional(),
4438
- description: z.string().optional(),
4563
+ var identityServiceUserSchema = external_exports.object({
4564
+ id: external_exports.string(),
4565
+ email: external_exports.string().optional(),
4566
+ first_name: external_exports.string().optional(),
4567
+ last_name: external_exports.string().optional(),
4568
+ job_title: external_exports.string().optional(),
4569
+ externally_managed: external_exports.boolean().optional(),
4570
+ city: external_exports.string().optional(),
4571
+ name: external_exports.string(),
4572
+ state: external_exports.string().optional(),
4573
+ country: external_exports.string().optional(),
4574
+ user_type: external_exports.string().optional(),
4575
+ token_type: external_exports.string().optional(),
4576
+ avatar_image_id: external_exports.string().optional(),
4577
+ avatar_image_url: external_exports.string().optional(),
4578
+ origin_avatar_image_id: external_exports.string().optional(),
4579
+ bio: external_exports.string().optional(),
4580
+ phone_number: external_exports.string().optional(),
4581
+ twitter_handle: external_exports.string().optional(),
4582
+ linkedin_url: external_exports.string().optional(),
4583
+ description: external_exports.string().optional(),
4439
4584
  preferences: identityServicePreferencesSchema.optional(),
4440
- roles: z.array(z.string()),
4585
+ roles: external_exports.array(external_exports.string()),
4441
4586
  organization: identityServiceOrganizationSchema,
4442
- password: z.string(),
4443
- verified: z.boolean()
4587
+ password: external_exports.string(),
4588
+ verified: external_exports.boolean()
4444
4589
  });
4445
4590
 
4446
4591
  // lib/whoami/models/RegisteredService.ts
4447
- var registeredServiceSchema = z.object({
4448
- serviceId: z.number(),
4449
- identityServiceId: z.number(),
4450
- name: z.string(),
4451
- isActive: z.boolean()
4592
+ var registeredServiceSchema = external_exports.object({
4593
+ serviceId: external_exports.number(),
4594
+ identityServiceId: external_exports.number(),
4595
+ name: external_exports.string(),
4596
+ isActive: external_exports.boolean()
4452
4597
  });
4453
4598
 
4454
4599
  // lib/whoami/models/UserAccount.ts
4455
- var userAccountSchema = z.object({
4600
+ var userAccountSchema = external_exports.object({
4456
4601
  identityUser: identityServiceUserSchema,
4457
- companyId: z.number(),
4458
- companyName: z.string(),
4459
- name: z.string(),
4460
- assortmentPartnerCompanyId: z.number().nullish(),
4461
- retailer: z.boolean(),
4462
- supplier: z.boolean(),
4602
+ companyId: external_exports.number(),
4603
+ companyName: external_exports.string(),
4604
+ name: external_exports.string(),
4605
+ assortmentPartnerCompanyId: external_exports.number().nullish(),
4606
+ retailer: external_exports.boolean(),
4607
+ supplier: external_exports.boolean(),
4463
4608
  registeredService: registeredServiceSchema,
4464
- uniqueAttributes: z.array(z.string()),
4465
- admin: z.boolean(),
4466
- adminToolUser: z.boolean(),
4467
- attributeRegistryAdmin: z.boolean(),
4468
- attributeRegistryDev: z.boolean(),
4469
- attributeRegistryRsx: z.boolean(),
4470
- attributeRegistryUser: z.boolean(),
4471
- attributeRegistryViewer: z.boolean()
4609
+ uniqueAttributes: external_exports.array(external_exports.string()),
4610
+ admin: external_exports.boolean(),
4611
+ adminToolUser: external_exports.boolean(),
4612
+ attributeRegistryAdmin: external_exports.boolean(),
4613
+ attributeRegistryDev: external_exports.boolean(),
4614
+ attributeRegistryRsx: external_exports.boolean(),
4615
+ attributeRegistryUser: external_exports.boolean(),
4616
+ attributeRegistryViewer: external_exports.boolean()
4472
4617
  });
4473
4618
 
4474
4619
  // lib/whoami/index.ts
@@ -4493,23 +4638,23 @@ var import_zod_mock7 = require("@anatine/zod-mock");
4493
4638
  var import_msw8 = require("msw");
4494
4639
 
4495
4640
  // lib/items/v1/models/ItemHeader.ts
4496
- var itemHeaderSchema = z.object({
4497
- status: z.string().optional(),
4498
- catalogName: z.string(),
4499
- productCodeName: z.string(),
4500
- selectionCodeName: z.string(),
4501
- gtin: z.string(),
4502
- upc: z.string(),
4503
- ean: z.string(),
4504
- isbn: z.string(),
4505
- partNumber: z.string(),
4506
- lastUpdatedDateString: z.string(),
4507
- companyId: z.string(),
4508
- itemInfoId: z.string()
4641
+ var itemHeaderSchema = external_exports.object({
4642
+ status: external_exports.string().optional(),
4643
+ catalogName: external_exports.string(),
4644
+ productCodeName: external_exports.string(),
4645
+ selectionCodeName: external_exports.string(),
4646
+ gtin: external_exports.string(),
4647
+ upc: external_exports.string(),
4648
+ ean: external_exports.string(),
4649
+ isbn: external_exports.string(),
4650
+ partNumber: external_exports.string(),
4651
+ lastUpdatedDateString: external_exports.string(),
4652
+ companyId: external_exports.string(),
4653
+ itemInfoId: external_exports.string()
4509
4654
  });
4510
4655
 
4511
4656
  // lib/items/v1/models/PhaseEnum.ts
4512
- var phaseEnumSchema = z.enum([
4657
+ var phaseEnumSchema = external_exports.enum([
4513
4658
  "CORE",
4514
4659
  "CORE_PLUS",
4515
4660
  "CORE_ADVANCED",
@@ -4518,57 +4663,57 @@ var phaseEnumSchema = z.enum([
4518
4663
  ]);
4519
4664
 
4520
4665
  // lib/items/v1/models/TradingPartnerStage.ts
4521
- var tradingPartnerStageSchema = z.object({
4522
- companyId: z.number(),
4523
- companyName: z.string(),
4524
- stage: z.nullable(phaseEnumSchema),
4525
- isValid: z.boolean()
4666
+ var tradingPartnerStageSchema = external_exports.object({
4667
+ companyId: external_exports.number(),
4668
+ companyName: external_exports.string(),
4669
+ stage: external_exports.nullable(phaseEnumSchema),
4670
+ isValid: external_exports.boolean()
4526
4671
  });
4527
4672
 
4528
4673
  // lib/items/v1/models/ItemMap.ts
4529
- var itemMapSchema = z.object({
4530
- rn: z.number().optional(),
4531
- iteminfoid: z.string(),
4532
- tradingPartnerStages: z.array(tradingPartnerStageSchema).optional(),
4533
- gtin: z.string().nullish(),
4534
- catalogname: z.string().nullish(),
4535
- isbn: z.string().nullish(),
4536
- lastupdateddatestring: z.string().nullish(),
4537
- upc: z.string().nullish(),
4538
- productcodename: z.string().nullish(),
4539
- ean: z.string().nullish(),
4540
- selectioncodename: z.string().nullish(),
4541
- createddatestring: z.string().nullish(),
4542
- partnumber: z.string().nullish(),
4543
- consumeravailabledatestring: z.string().nullish(),
4544
- status: z.string().nullish(),
4545
- nrfcolorcode: z.array(z.string()).nullish(),
4546
- nrfsizecode: z.array(z.string()).nullish(),
4547
- productcolordescription: z.array(z.string()).nullish(),
4548
- productsizedescription: z.array(z.string()).nullish()
4674
+ var itemMapSchema = external_exports.object({
4675
+ rn: external_exports.number().optional(),
4676
+ iteminfoid: external_exports.string(),
4677
+ tradingPartnerStages: external_exports.array(tradingPartnerStageSchema).optional(),
4678
+ gtin: external_exports.string().nullish(),
4679
+ catalogname: external_exports.string().nullish(),
4680
+ isbn: external_exports.string().nullish(),
4681
+ lastupdateddatestring: external_exports.string().nullish(),
4682
+ upc: external_exports.string().nullish(),
4683
+ productcodename: external_exports.string().nullish(),
4684
+ ean: external_exports.string().nullish(),
4685
+ selectioncodename: external_exports.string().nullish(),
4686
+ createddatestring: external_exports.string().nullish(),
4687
+ partnumber: external_exports.string().nullish(),
4688
+ consumeravailabledatestring: external_exports.string().nullish(),
4689
+ status: external_exports.string().nullish(),
4690
+ nrfcolorcode: external_exports.array(external_exports.string()).nullish(),
4691
+ nrfsizecode: external_exports.array(external_exports.string()).nullish(),
4692
+ productcolordescription: external_exports.array(external_exports.string()).nullish(),
4693
+ productsizedescription: external_exports.array(external_exports.string()).nullish()
4549
4694
  }).passthrough();
4550
4695
 
4551
4696
  // lib/items/v1/models/ItemTable.ts
4552
- var itemTableSchema = z.object({
4697
+ var itemTableSchema = external_exports.object({
4553
4698
  headers: itemHeaderSchema,
4554
- itemMaps: z.array(itemMapSchema)
4699
+ itemMaps: external_exports.array(itemMapSchema)
4555
4700
  });
4556
4701
 
4557
4702
  // lib/items/v1/models/ItemSearchView.ts
4558
- var itemSearchViewSchema = z.object({
4703
+ var itemSearchViewSchema = external_exports.object({
4559
4704
  itemTable: itemTableSchema,
4560
- hasNext: z.boolean(),
4561
- count: z.number()
4705
+ hasNext: external_exports.boolean(),
4706
+ count: external_exports.number()
4562
4707
  });
4563
4708
 
4564
4709
  // lib/asstClient.ts
4565
4710
  var import_ky = __toESM(require("ky"), 1);
4566
- var baseUrlsSchema = z.object({
4567
- local: z.literal("https://localhost:8443/"),
4568
- test: z.literal(
4711
+ var baseUrlsSchema = external_exports.object({
4712
+ local: external_exports.literal("https://localhost:8443/"),
4713
+ test: external_exports.literal(
4569
4714
  "https://integration.api.spscommerce.com/assortment/gateway/"
4570
4715
  ),
4571
- prod: z.literal("https://api.spscommerce.com/assortment/gateway/")
4716
+ prod: external_exports.literal("https://api.spscommerce.com/assortment/gateway/")
4572
4717
  });
4573
4718
  var BASE_URLS = {
4574
4719
  local: "https://localhost:8443/",
@@ -4582,10 +4727,10 @@ var initialConfig = {
4582
4727
  };
4583
4728
 
4584
4729
  // lib/exports/models/ExportType.ts
4585
- var exportTypeEnum = z.enum(["ALL", "UPDATES", "DELTAS_UPDATE", "NO_BUYER_PART_NUMBER"]);
4730
+ var exportTypeEnum = external_exports.enum(["ALL", "UPDATES", "DELTAS_UPDATE", "NO_BUYER_PART_NUMBER"]);
4586
4731
 
4587
4732
  // lib/exports/models/ExportFrequency.ts
4588
- var exportFrequencyEnum = z.enum([
4733
+ var exportFrequencyEnum = external_exports.enum([
4589
4734
  "IMMEDIATE",
4590
4735
  "ONETIME",
4591
4736
  "DAILY",
@@ -4594,7 +4739,7 @@ var exportFrequencyEnum = z.enum([
4594
4739
  ]);
4595
4740
 
4596
4741
  // lib/exports/models/ExportDayOfWeek.ts
4597
- var exportDayOfWeekEnum = z.enum([
4742
+ var exportDayOfWeekEnum = external_exports.enum([
4598
4743
  "MON",
4599
4744
  "TUE",
4600
4745
  "WED",
@@ -4605,77 +4750,77 @@ var exportDayOfWeekEnum = z.enum([
4605
4750
  ]);
4606
4751
 
4607
4752
  // lib/exports/models/Export.ts
4608
- var exportSchema = z.object({
4609
- exportName: z.string(),
4610
- exportDescription: z.string(),
4611
- isActive: z.boolean(),
4753
+ var exportSchema = external_exports.object({
4754
+ exportName: external_exports.string(),
4755
+ exportDescription: external_exports.string(),
4756
+ isActive: external_exports.boolean(),
4612
4757
  exportType: exportTypeEnum,
4613
4758
  exportFrequency: exportFrequencyEnum,
4614
- includeValidAttributes: z.optional(z.boolean()),
4615
- dayOfMonth: z.optional(z.number()),
4616
- dayOfWeek: z.optional(exportDayOfWeekEnum),
4617
- hourOfDay: z.optional(z.number()),
4618
- date: z.optional(z.string()),
4619
- catalogIds: z.optional(z.array(z.number())),
4620
- itemInfoIds: z.optional(z.array(z.number())),
4621
- excludeItemInfoIds: z.optional(z.array(z.number())),
4622
- selectionCodeIds: z.optional(z.array(z.number())),
4623
- productCodeIds: z.optional(z.array(z.number())),
4624
- productTypes: z.optional(z.array(z.string())),
4625
- deliveryType: z.optional(z.string()),
4626
- spreadsheetTemplateId: z.optional(z.number()),
4627
- emailAddresses: z.optional(z.array(z.string())),
4628
- subjectLine: z.optional(z.string()),
4629
- additionalLocales: z.optional(z.array(z.string())),
4630
- availableAttributeList: z.optional(z.array(z.string()))
4759
+ includeValidAttributes: external_exports.optional(external_exports.boolean()),
4760
+ dayOfMonth: external_exports.optional(external_exports.number()),
4761
+ dayOfWeek: external_exports.optional(exportDayOfWeekEnum),
4762
+ hourOfDay: external_exports.optional(external_exports.number()),
4763
+ date: external_exports.optional(external_exports.string()),
4764
+ catalogIds: external_exports.optional(external_exports.array(external_exports.number())),
4765
+ itemInfoIds: external_exports.optional(external_exports.array(external_exports.number())),
4766
+ excludeItemInfoIds: external_exports.optional(external_exports.array(external_exports.number())),
4767
+ selectionCodeIds: external_exports.optional(external_exports.array(external_exports.number())),
4768
+ productCodeIds: external_exports.optional(external_exports.array(external_exports.number())),
4769
+ productTypes: external_exports.optional(external_exports.array(external_exports.string())),
4770
+ deliveryType: external_exports.optional(external_exports.string()),
4771
+ spreadsheetTemplateId: external_exports.optional(external_exports.number()),
4772
+ emailAddresses: external_exports.optional(external_exports.array(external_exports.string())),
4773
+ subjectLine: external_exports.optional(external_exports.string()),
4774
+ additionalLocales: external_exports.optional(external_exports.array(external_exports.string())),
4775
+ availableAttributeList: external_exports.optional(external_exports.array(external_exports.string()))
4631
4776
  });
4632
4777
 
4633
4778
  // lib/exports/models/DownloadItemsParams.ts
4634
- var downLoadItemsParamsSchema = z.object({
4635
- "multi-sheet": z.boolean(),
4636
- ids: z.array(z.string())
4779
+ var downLoadItemsParamsSchema = external_exports.object({
4780
+ "multi-sheet": external_exports.boolean(),
4781
+ ids: external_exports.array(external_exports.string())
4637
4782
  });
4638
4783
 
4639
4784
  // lib/attributes/models/AttributeMetaData.ts
4640
- var attributeMetaDataSchema = z.object({
4641
- dbName: z.string(),
4642
- label: z.string(),
4643
- group: z.string(),
4644
- aliases: z.array(z.string()),
4645
- orderBy: z.string().or(z.number()),
4646
- type: z.string(),
4647
- storageType: z.string(),
4648
- rsxPath: z.string(),
4649
- indexed: z.boolean(),
4650
- repeatable: z.boolean(),
4651
- extended: z.boolean(),
4652
- hybrid: z.boolean(),
4653
- userVisible: z.boolean(),
4654
- retailerOwnedId: z.number().nullish()
4785
+ var attributeMetaDataSchema = external_exports.object({
4786
+ dbName: external_exports.string(),
4787
+ label: external_exports.string(),
4788
+ group: external_exports.string(),
4789
+ aliases: external_exports.array(external_exports.string()),
4790
+ orderBy: external_exports.string().or(external_exports.number()),
4791
+ type: external_exports.string(),
4792
+ storageType: external_exports.string(),
4793
+ rsxPath: external_exports.string(),
4794
+ indexed: external_exports.boolean(),
4795
+ repeatable: external_exports.boolean(),
4796
+ extended: external_exports.boolean(),
4797
+ hybrid: external_exports.boolean(),
4798
+ userVisible: external_exports.boolean(),
4799
+ retailerOwnedId: external_exports.number().nullish()
4655
4800
  });
4656
4801
 
4657
4802
  // lib/attributes/models/AttributeSummary.ts
4658
- var attributeSummarySchema = z.object({
4659
- attributeId: z.number(),
4660
- attributeName: z.string(),
4661
- displayName: z.string(),
4662
- modifiedBy: z.string(),
4663
- modifiedDate: z.number(),
4664
- retailerOwnedId: z.number().nullish(),
4665
- clusterAttrGroupId: z.number().nullish(),
4666
- attributeType: z.string()
4803
+ var attributeSummarySchema = external_exports.object({
4804
+ attributeId: external_exports.number(),
4805
+ attributeName: external_exports.string(),
4806
+ displayName: external_exports.string(),
4807
+ modifiedBy: external_exports.string(),
4808
+ modifiedDate: external_exports.number(),
4809
+ retailerOwnedId: external_exports.number().nullish(),
4810
+ clusterAttrGroupId: external_exports.number().nullish(),
4811
+ attributeType: external_exports.string()
4667
4812
  });
4668
4813
 
4669
4814
  // lib/attributes/models/AttributesByCompany.ts
4670
- var attributesByCompanySchema = z.object({
4671
- next: z.string().nullish(),
4672
- previous: z.string().nullish(),
4673
- count: z.number(),
4674
- results: z.array(attributeSummarySchema)
4815
+ var attributesByCompanySchema = external_exports.object({
4816
+ next: external_exports.string().nullish(),
4817
+ previous: external_exports.string().nullish(),
4818
+ count: external_exports.number(),
4819
+ results: external_exports.array(attributeSummarySchema)
4675
4820
  });
4676
4821
 
4677
4822
  // lib/attributes/models/AttrDatatypeNameEnum.ts
4678
- var attrDatatypeNameEnumSchema = z.enum([
4823
+ var attrDatatypeNameEnumSchema = external_exports.enum([
4679
4824
  "TEXT",
4680
4825
  "SET",
4681
4826
  "INTEGER",
@@ -4688,137 +4833,137 @@ var attrDatatypeNameEnumSchema = z.enum([
4688
4833
  ]);
4689
4834
 
4690
4835
  // lib/attributes/models/AttributeGroup.ts
4691
- var attributeGroupSchema = z.object({
4692
- attrGroupId: z.number(),
4693
- attrGroupType: z.object({
4694
- attrGroupTypeId: z.number(),
4695
- groupTypeName: z.string(),
4696
- primary: z.boolean(),
4697
- restricted: z.boolean()
4836
+ var attributeGroupSchema = external_exports.object({
4837
+ attrGroupId: external_exports.number(),
4838
+ attrGroupType: external_exports.object({
4839
+ attrGroupTypeId: external_exports.number(),
4840
+ groupTypeName: external_exports.string(),
4841
+ primary: external_exports.boolean(),
4842
+ restricted: external_exports.boolean()
4698
4843
  }),
4699
- attrGroupTypeId: z.number(),
4700
- groupName: z.string(),
4701
- isDefault: z.boolean(),
4702
- orderWeight: z.number(),
4703
- primary: z.boolean()
4844
+ attrGroupTypeId: external_exports.number(),
4845
+ groupName: external_exports.string(),
4846
+ isDefault: external_exports.boolean(),
4847
+ orderWeight: external_exports.number(),
4848
+ primary: external_exports.boolean()
4704
4849
  });
4705
4850
 
4706
4851
  // lib/attributes/models/AttributeDefinition.ts
4707
- var parentAttributeSchema = z.object({
4708
- attrDataTypeId: z.number(),
4709
- attrDatatype: z.object({
4710
- attrDatatypeId: z.number(),
4852
+ var parentAttributeSchema = external_exports.object({
4853
+ attrDataTypeId: external_exports.number(),
4854
+ attrDatatype: external_exports.object({
4855
+ attrDatatypeId: external_exports.number(),
4711
4856
  datatypeName: attrDatatypeNameEnumSchema,
4712
- displayOnly: z.boolean()
4857
+ displayOnly: external_exports.boolean()
4713
4858
  }),
4714
- attrGroupId: z.number(),
4715
- attrGroups: z.array(attributeGroupSchema),
4716
- attrRoundId: z.number(),
4717
- attrStorageId: z.number(),
4718
- attributeId: z.number(),
4719
- attributeName: z.string(),
4720
- createdBy: z.string(),
4721
- createdDate: z.number(),
4722
- description: z.string().optional(),
4723
- displayName: z.string(),
4724
- modifiedDate: z.number(),
4725
- orderWeight: z.number(),
4726
- parentAttributeId: z.number().optional(),
4859
+ attrGroupId: external_exports.number(),
4860
+ attrGroups: external_exports.array(attributeGroupSchema),
4861
+ attrRoundId: external_exports.number(),
4862
+ attrStorageId: external_exports.number(),
4863
+ attributeId: external_exports.number(),
4864
+ attributeName: external_exports.string(),
4865
+ createdBy: external_exports.string(),
4866
+ createdDate: external_exports.number(),
4867
+ description: external_exports.string().optional(),
4868
+ displayName: external_exports.string(),
4869
+ modifiedDate: external_exports.number(),
4870
+ orderWeight: external_exports.number(),
4871
+ parentAttributeId: external_exports.number().optional(),
4727
4872
  primaryAttrGroup: attributeGroupSchema
4728
4873
  });
4729
- var attributeDefinitionSchema = z.object({
4730
- attrDataTypeId: z.number(),
4731
- attrDatatype: z.object({
4732
- attrDatatypeId: z.number(),
4874
+ var attributeDefinitionSchema = external_exports.object({
4875
+ attrDataTypeId: external_exports.number(),
4876
+ attrDatatype: external_exports.object({
4877
+ attrDatatypeId: external_exports.number(),
4733
4878
  datatypeName: attrDatatypeNameEnumSchema,
4734
- displayOnly: z.boolean()
4879
+ displayOnly: external_exports.boolean()
4735
4880
  }),
4736
- attrGroupId: z.number(),
4737
- attrGroups: z.array(attributeGroupSchema),
4738
- attrRestrictions: z.array(
4739
- z.object({
4740
- attrRestrictId: z.number(),
4741
- ignoreGlobal: z.boolean().optional(),
4742
- isDefault: z.boolean(),
4743
- isEssential: z.boolean(),
4744
- locale: z.string(),
4745
- mandatory: z.boolean(),
4746
- repeatable: z.boolean(),
4747
- minLength: z.number().optional(),
4748
- maxLength: z.number().optional()
4881
+ attrGroupId: external_exports.number(),
4882
+ attrGroups: external_exports.array(attributeGroupSchema),
4883
+ attrRestrictions: external_exports.array(
4884
+ external_exports.object({
4885
+ attrRestrictId: external_exports.number(),
4886
+ ignoreGlobal: external_exports.boolean().optional(),
4887
+ isDefault: external_exports.boolean(),
4888
+ isEssential: external_exports.boolean(),
4889
+ locale: external_exports.string(),
4890
+ mandatory: external_exports.boolean(),
4891
+ repeatable: external_exports.boolean(),
4892
+ minLength: external_exports.number().optional(),
4893
+ maxLength: external_exports.number().optional()
4749
4894
  })
4750
4895
  ).optional(),
4751
- attrRoundId: z.number(),
4752
- attrStorage: z.object({
4753
- attrStorageId: z.number(),
4754
- storageName: z.string()
4896
+ attrRoundId: external_exports.number(),
4897
+ attrStorage: external_exports.object({
4898
+ attrStorageId: external_exports.number(),
4899
+ storageName: external_exports.string()
4755
4900
  }),
4756
- attrStorageId: z.number(),
4757
- attrValues: z.array(
4758
- z.object({
4759
- attrKeyPair: z.string(),
4760
- attrValueId: z.number().optional(),
4761
- isDefault: z.boolean(),
4762
- locale: z.string(),
4763
- value: z.string()
4901
+ attrStorageId: external_exports.number(),
4902
+ attrValues: external_exports.array(
4903
+ external_exports.object({
4904
+ attrKeyPair: external_exports.string(),
4905
+ attrValueId: external_exports.number().optional(),
4906
+ isDefault: external_exports.boolean(),
4907
+ locale: external_exports.string(),
4908
+ value: external_exports.string()
4764
4909
  })
4765
4910
  ).optional(),
4766
- attributeId: z.number(),
4767
- attributeName: z.string(),
4768
- createdBy: z.string(),
4769
- createdDate: z.number(),
4770
- description: z.string().optional(),
4771
- displayName: z.string(),
4772
- modifiedDate: z.number(),
4773
- orderWeight: z.number().optional(),
4911
+ attributeId: external_exports.number(),
4912
+ attributeName: external_exports.string(),
4913
+ createdBy: external_exports.string(),
4914
+ createdDate: external_exports.number(),
4915
+ description: external_exports.string().optional(),
4916
+ displayName: external_exports.string(),
4917
+ modifiedDate: external_exports.number(),
4918
+ orderWeight: external_exports.number().optional(),
4774
4919
  parentAttribute: parentAttributeSchema.optional(),
4775
- parentAttributeId: z.number().optional(),
4920
+ parentAttributeId: external_exports.number().optional(),
4776
4921
  primaryAttrGroup: attributeGroupSchema
4777
4922
  });
4778
4923
 
4779
4924
  // lib/attributes/models/AttributeValidValues.ts
4780
- var attributeValidValuesSchema = z.object({
4781
- value: z.string(),
4782
- isDefault: z.boolean(),
4783
- locale: z.string(),
4784
- createdBy: z.string(),
4785
- createdDate: z.number(),
4786
- modifiedDate: z.number(),
4787
- modifiedBy: z.string(),
4788
- attributeId: z.number(),
4789
- attrValueId: z.number(),
4790
- attrKeyPair: z.string()
4925
+ var attributeValidValuesSchema = external_exports.object({
4926
+ value: external_exports.string(),
4927
+ isDefault: external_exports.boolean(),
4928
+ locale: external_exports.string(),
4929
+ createdBy: external_exports.string(),
4930
+ createdDate: external_exports.number(),
4931
+ modifiedDate: external_exports.number(),
4932
+ modifiedBy: external_exports.string(),
4933
+ attributeId: external_exports.number(),
4934
+ attrValueId: external_exports.number(),
4935
+ attrKeyPair: external_exports.string()
4791
4936
  });
4792
4937
 
4793
4938
  // lib/locale/models/Locale.ts
4794
- var localeSchema = z.object({
4795
- localeCode: z.string(),
4796
- localeDescription: z.string()
4939
+ var localeSchema = external_exports.object({
4940
+ localeCode: external_exports.string(),
4941
+ localeDescription: external_exports.string()
4797
4942
  });
4798
4943
 
4799
4944
  // lib/spreadsheetTemplate/models/SpreadsheetTemplateCompany.ts
4800
- var spreadsheetTemplateCompanySchema = z.object({
4801
- companyName: z.string(),
4802
- companyId: z.number(),
4803
- createdAt: z.number()
4945
+ var spreadsheetTemplateCompanySchema = external_exports.object({
4946
+ companyName: external_exports.string(),
4947
+ companyId: external_exports.number(),
4948
+ createdAt: external_exports.number()
4804
4949
  });
4805
4950
 
4806
4951
  // lib/spreadsheetTemplate/models/SpreadsheetTemplate.ts
4807
- var spreadsheetTemplateSchema = z.object({
4808
- id: z.number(),
4809
- fileLocation: z.string(),
4810
- name: z.string(),
4811
- templateType: z.string(),
4812
- maxItemsPerDoc: z.number(),
4813
- companies: z.array(spreadsheetTemplateCompanySchema),
4814
- createdBy: z.string().nullish(),
4815
- createdAt: z.number().nullish(),
4816
- modifiedBy: z.string().nullish(),
4817
- modifiedAt: z.number().nullish()
4952
+ var spreadsheetTemplateSchema = external_exports.object({
4953
+ id: external_exports.number(),
4954
+ fileLocation: external_exports.string(),
4955
+ name: external_exports.string(),
4956
+ templateType: external_exports.string(),
4957
+ maxItemsPerDoc: external_exports.number(),
4958
+ companies: external_exports.array(spreadsheetTemplateCompanySchema),
4959
+ createdBy: external_exports.string().nullish(),
4960
+ createdAt: external_exports.number().nullish(),
4961
+ modifiedBy: external_exports.string().nullish(),
4962
+ modifiedAt: external_exports.number().nullish()
4818
4963
  });
4819
4964
 
4820
4965
  // lib/items/v2/models/Stage.ts
4821
- var stageSchema = z.enum([
4966
+ var stageSchema = external_exports.enum([
4822
4967
  "CORE",
4823
4968
  "CORE_PLUS",
4824
4969
  "CORE_ADVANCED",
@@ -4826,14 +4971,14 @@ var stageSchema = z.enum([
4826
4971
  ]);
4827
4972
 
4828
4973
  // lib/items/v2/models/OrgSummary.ts
4829
- var orgSummarySchema = z.object({
4830
- ref: z.string(),
4831
- id: z.string(),
4832
- name: z.string()
4974
+ var orgSummarySchema = external_exports.object({
4975
+ ref: external_exports.string(),
4976
+ id: external_exports.string(),
4977
+ name: external_exports.string()
4833
4978
  });
4834
4979
 
4835
4980
  // lib/items/v2/models/ItemOrgStageDetails.ts
4836
- var itemOrgStageDetailsSchema = z.object({
4981
+ var itemOrgStageDetailsSchema = external_exports.object({
4837
4982
  /**
4838
4983
  * When called as retailer, the vendor, else when vendor, the retailer.
4839
4984
  * */
@@ -4841,7 +4986,7 @@ var itemOrgStageDetailsSchema = z.object({
4841
4986
  /**
4842
4987
  * The company id of the retailer or vendor used for matching ItemOrgStageDetails to TradingPartnerStage for ErrorService
4843
4988
  */
4844
- companyId: z.number().nullish(),
4989
+ companyId: external_exports.number().nullish(),
4845
4990
  /**
4846
4991
  * "Standard Requirements" (null) UNLESS the retailer of the item is MSIS Enabled
4847
4992
  * OTHERWISE the retailer default Stage UNLESS there's a currently active vendor-specific Stage defined
@@ -4852,124 +4997,124 @@ var itemOrgStageDetailsSchema = z.object({
4852
4997
  * If the item is valid for the active stage. Note that for "Standard Requirements" or
4853
4998
  * "Enriched" this cam come directly from the item_doc table, but anything else requires validation
4854
4999
  */
4855
- isValid: z.boolean(),
5000
+ isValid: external_exports.boolean(),
4856
5001
  /**
4857
5002
  * Not null if there's an item level policy override for this trading partnership
4858
5003
  */
4859
- itemPolicyId: z.string().nullish(),
5004
+ itemPolicyId: external_exports.string().nullish(),
4860
5005
  /**
4861
5006
  * Start date for the Item level Stage if applicable
4862
5007
  */
4863
- startDate: z.number().transform((num) => new Date(num * 1e3)).nullish(),
5008
+ startDate: external_exports.number().transform((num) => new Date(num * 1e3)).nullish(),
4864
5009
  /**
4865
5010
  * End date for the Item level Stage if applicable
4866
5011
  */
4867
- endDate: z.number().transform((num) => new Date(num * 1e3)).nullish()
5012
+ endDate: external_exports.number().transform((num) => new Date(num * 1e3)).nullish()
4868
5013
  });
4869
5014
 
4870
5015
  // lib/items/v2/models/ItemStatusV2.ts
4871
- var itemStatusV2Schema = z.object({
4872
- itemId: z.string(),
5016
+ var itemStatusV2Schema = external_exports.object({
5017
+ itemId: external_exports.string(),
4873
5018
  mostRestrictiveRetailerStage: stageSchema.nullable(),
4874
- itemOrgStageDetails: z.array(itemOrgStageDetailsSchema)
5019
+ itemOrgStageDetails: external_exports.array(itemOrgStageDetailsSchema)
4875
5020
  });
4876
5021
 
4877
5022
  // lib/items/v2/models/ItemStatusV2Response.ts
4878
- var itemStatusV2ResponseSchema = z.object({
4879
- itemStatuses: z.array(itemStatusV2Schema)
5023
+ var itemStatusV2ResponseSchema = external_exports.object({
5024
+ itemStatuses: external_exports.array(itemStatusV2Schema)
4880
5025
  });
4881
5026
 
4882
5027
  // lib/errors/v2/models/TradingPartnerStage.ts
4883
- var tradingPartnerStageV2Schema = z.object({
4884
- companyId: z.number(),
4885
- companyName: z.string(),
5028
+ var tradingPartnerStageV2Schema = external_exports.object({
5029
+ companyId: external_exports.number(),
5030
+ companyName: external_exports.string(),
4886
5031
  stage: stageSchema.nullish(),
4887
- isValid: z.boolean()
5032
+ isValid: external_exports.boolean()
4888
5033
  });
4889
5034
 
4890
5035
  // lib/errors/v2/models/ItemErrorSummary.ts
4891
- var itemErrorSummaryV2Schema = z.object({
4892
- itemInfoId: z.number(),
4893
- upc: z.string().nullish(),
4894
- isbn: z.string().nullish(),
4895
- gtin: z.string().nullish(),
4896
- ean: z.string().nullish(),
4897
- partnumber: z.string().nullish(),
4898
- colorfamily: z.string().nullish(),
4899
- fit: z.string().nullish(),
4900
- productcolordescription: z.string().nullish(),
4901
- distributioncentercode: z.string().nullish(),
4902
- accountnumber: z.string().nullish(),
4903
- erpid: z.string().nullish(),
4904
- totalErrors: z.number(),
4905
- tradingPartners: z.array(z.string()),
4906
- tradingPartnerIds: z.array(z.number()),
5036
+ var itemErrorSummaryV2Schema = external_exports.object({
5037
+ itemInfoId: external_exports.number(),
5038
+ upc: external_exports.string().nullish(),
5039
+ isbn: external_exports.string().nullish(),
5040
+ gtin: external_exports.string().nullish(),
5041
+ ean: external_exports.string().nullish(),
5042
+ partnumber: external_exports.string().nullish(),
5043
+ colorfamily: external_exports.string().nullish(),
5044
+ fit: external_exports.string().nullish(),
5045
+ productcolordescription: external_exports.string().nullish(),
5046
+ distributioncentercode: external_exports.string().nullish(),
5047
+ accountnumber: external_exports.string().nullish(),
5048
+ erpid: external_exports.string().nullish(),
5049
+ totalErrors: external_exports.number(),
5050
+ tradingPartners: external_exports.array(external_exports.string()),
5051
+ tradingPartnerIds: external_exports.array(external_exports.number()),
4907
5052
  // These are the stages assigned to the TradingPartners, not the stages of the errors
4908
- phases: z.array(z.string()),
5053
+ phases: external_exports.array(external_exports.string()),
4909
5054
  // Same thing for the stage property in here: it's the stage of the Item & TradingPartner, not the stage of the error
4910
- tradingPartnerStages: z.array(tradingPartnerStageV2Schema),
4911
- validatedDate: z.number().pipe(z.coerce.date()).nullish()
5055
+ tradingPartnerStages: external_exports.array(tradingPartnerStageV2Schema),
5056
+ validatedDate: external_exports.number().pipe(external_exports.coerce.date()).nullish()
4912
5057
  });
4913
5058
 
4914
5059
  // lib/errors/v2/models/ItemErrorSummaryResult.ts
4915
- var itemErrorSummaryResultV2Schema = z.object({
4916
- hasNext: z.boolean(),
4917
- errors: z.array(itemErrorSummaryV2Schema)
5060
+ var itemErrorSummaryResultV2Schema = external_exports.object({
5061
+ hasNext: external_exports.boolean(),
5062
+ errors: external_exports.array(itemErrorSummaryV2Schema)
4918
5063
  });
4919
5064
 
4920
5065
  // lib/errors/v2/models/ItemErrorDetails.ts
4921
- var itemErrorDetailsV2Schema = z.object({
4922
- errorMessage: z.string(),
4923
- attributeName: z.string().nullable(),
4924
- tradingPartnerNames: z.array(z.string()),
4925
- phases: z.array(stageSchema),
4926
- attributeDbNames: z.array(z.string()),
4927
- tradingPartnerStages: z.array(tradingPartnerStageV2Schema),
4928
- repeatableGroupId: z.string().nullish()
5066
+ var itemErrorDetailsV2Schema = external_exports.object({
5067
+ errorMessage: external_exports.string(),
5068
+ attributeName: external_exports.string().nullable(),
5069
+ tradingPartnerNames: external_exports.array(external_exports.string()),
5070
+ phases: external_exports.array(stageSchema),
5071
+ attributeDbNames: external_exports.array(external_exports.string()),
5072
+ tradingPartnerStages: external_exports.array(tradingPartnerStageV2Schema),
5073
+ repeatableGroupId: external_exports.string().nullish()
4929
5074
  });
4930
5075
 
4931
5076
  // lib/errors/v2/models/ItemErrorDetailsResult.ts
4932
- var itemErrorDetailsResultV2Schema = z.object({
4933
- itemInfoId: z.number(),
4934
- upc: z.string().nullish(),
4935
- isbn: z.string().nullish(),
4936
- gtin: z.string().nullish(),
4937
- partnumber: z.string().nullish(),
4938
- ean: 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
- itemName: z.string().nullish(),
4946
- itemErrorDetails: z.array(itemErrorDetailsV2Schema)
5077
+ var itemErrorDetailsResultV2Schema = 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
+ partnumber: external_exports.string().nullish(),
5083
+ ean: 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
+ itemName: external_exports.string().nullish(),
5091
+ itemErrorDetails: external_exports.array(itemErrorDetailsV2Schema)
4947
5092
  });
4948
5093
 
4949
5094
  // lib/companies/models/CompanyBriefByOrg.ts
4950
- var companyBriefByOrgSchema = z.object({
4951
- companyId: z.number(),
4952
- name: z.string(),
4953
- orgId: z.string(),
4954
- companyType: z.object({
4955
- type: z.enum(["SUPPLIER", "RETAILER"]),
4956
- display: z.enum(["SUPPLIER", "RETAILER"])
5095
+ var companyBriefByOrgSchema = external_exports.object({
5096
+ companyId: external_exports.number(),
5097
+ name: external_exports.string(),
5098
+ orgId: external_exports.string(),
5099
+ companyType: external_exports.object({
5100
+ type: external_exports.enum(["SUPPLIER", "RETAILER"]),
5101
+ display: external_exports.enum(["SUPPLIER", "RETAILER"])
4957
5102
  }),
4958
- dc4Id: z.number()
5103
+ dc4Id: external_exports.number()
4959
5104
  });
4960
5105
 
4961
5106
  // lib/items/v1/models/AttributeDetail.ts
4962
- var attributeDetailSchema = z.object({
5107
+ var attributeDetailSchema = external_exports.object({
4963
5108
  type: attrDatatypeNameEnumSchema,
4964
- name: z.string(),
4965
- value: z.string().or(z.number()).or(z.array(z.string())).or(z.array(z.number())).nullable(),
4966
- label: z.string(),
4967
- group: z.string(),
4968
- orderBy: z.number().or(z.string()).nullish()
5109
+ name: external_exports.string(),
5110
+ value: external_exports.string().or(external_exports.number()).or(external_exports.array(external_exports.string())).or(external_exports.array(external_exports.number())).nullable(),
5111
+ label: external_exports.string(),
5112
+ group: external_exports.string(),
5113
+ orderBy: external_exports.number().or(external_exports.string()).nullish()
4969
5114
  });
4970
5115
 
4971
5116
  // lib/items/v1/models/CategoryEnum.ts
4972
- var categoryEnumSchema = z.enum([
5117
+ var categoryEnumSchema = external_exports.enum([
4973
5118
  "ALIAS",
4974
5119
  "CATALOG",
4975
5120
  "EXPORT",
@@ -4982,235 +5127,235 @@ var categoryEnumSchema = z.enum([
4982
5127
  ]);
4983
5128
 
4984
5129
  // lib/items/v1/models/ComponentDetails.ts
4985
- var componentDetailsSchema = z.object({
4986
- itemInfoId: z.number(),
4987
- description: z.string().nullish(),
4988
- saleable: z.boolean(),
4989
- valid: z.boolean(),
4990
- uniqueCriteria: z.array(
4991
- z.object({
4992
- name: z.string(),
4993
- value: z.string()
5130
+ var componentDetailsSchema = external_exports.object({
5131
+ itemInfoId: external_exports.number(),
5132
+ description: external_exports.string().nullish(),
5133
+ saleable: external_exports.boolean(),
5134
+ valid: external_exports.boolean(),
5135
+ uniqueCriteria: external_exports.array(
5136
+ external_exports.object({
5137
+ name: external_exports.string(),
5138
+ value: external_exports.string()
4994
5139
  })
4995
5140
  )
4996
5141
  });
4997
5142
 
4998
5143
  // lib/items/v1/models/RepeatableGroup.ts
4999
- var repeatableGroupSchema = z.object({
5000
- repeatableGroupId: z.string(),
5001
- repeatableNumber: z.number()
5144
+ var repeatableGroupSchema = external_exports.object({
5145
+ repeatableGroupId: external_exports.string(),
5146
+ repeatableNumber: external_exports.number()
5002
5147
  });
5003
5148
 
5004
5149
  // lib/items/v1/models/GroupedAttributeList.ts
5005
- var groupedAttributeListSchema = z.object({
5006
- type: z.string(),
5007
- rows: z.array(z.array(attributeDetailSchema)),
5008
- repeatableGroups: z.array(repeatableGroupSchema)
5150
+ var groupedAttributeListSchema = external_exports.object({
5151
+ type: external_exports.string(),
5152
+ rows: external_exports.array(external_exports.array(attributeDetailSchema)),
5153
+ repeatableGroups: external_exports.array(repeatableGroupSchema)
5009
5154
  });
5010
5155
 
5011
5156
  // lib/items/v1/models/GroupedAttributes.ts
5012
- var groupedAttributesSchema = z.object({
5013
- type: z.string(),
5014
- attributes: z.array(attributeDetailSchema),
5015
- attributeGroups: z.array(groupedAttributeListSchema)
5157
+ var groupedAttributesSchema = external_exports.object({
5158
+ type: external_exports.string(),
5159
+ attributes: external_exports.array(attributeDetailSchema),
5160
+ attributeGroups: external_exports.array(groupedAttributeListSchema)
5016
5161
  });
5017
5162
 
5018
5163
  // lib/items/v1/models/HierarchyCategory.ts
5019
- var hierarchyCategorySchema = z.object({
5020
- name: z.string(),
5021
- description: z.string().nullish(),
5022
- id: z.number(),
5023
- companyId: z.number().nullish(),
5164
+ var hierarchyCategorySchema = external_exports.object({
5165
+ name: external_exports.string(),
5166
+ description: external_exports.string().nullish(),
5167
+ id: external_exports.number(),
5168
+ companyId: external_exports.number().nullish(),
5024
5169
  type: categoryEnumSchema
5025
5170
  });
5026
5171
 
5027
5172
  // lib/items/v1/models/HierarchyDetails.ts
5028
- var hierarchyDetailsSchema = z.object({
5029
- catalogs: z.array(hierarchyCategorySchema),
5030
- selectionCodes: z.array(hierarchyCategorySchema),
5031
- productCodes: z.array(hierarchyCategorySchema)
5173
+ var hierarchyDetailsSchema = external_exports.object({
5174
+ catalogs: external_exports.array(hierarchyCategorySchema),
5175
+ selectionCodes: external_exports.array(hierarchyCategorySchema),
5176
+ productCodes: external_exports.array(hierarchyCategorySchema)
5032
5177
  });
5033
5178
 
5034
5179
  // lib/items/v1/models/PackComponentItemInfo.ts
5035
- var packComponentItemInfoSchema = z.object({
5036
- companyid: z.number(),
5037
- createddate: z.number(),
5038
- isServiceApi: z.boolean(),
5039
- isactive: z.number(),
5040
- isvalid: z.number(),
5041
- itemType: z.string(),
5042
- iteminfoid: z.number(),
5043
- itemtimestamp: z.number(),
5044
- serviceId: z.number(),
5045
- attributes: z.record(z.string(), z.string().or(z.array(z.string())))
5180
+ var packComponentItemInfoSchema = external_exports.object({
5181
+ companyid: external_exports.number(),
5182
+ createddate: external_exports.number(),
5183
+ isServiceApi: external_exports.boolean(),
5184
+ isactive: external_exports.number(),
5185
+ isvalid: external_exports.number(),
5186
+ itemType: external_exports.string(),
5187
+ iteminfoid: external_exports.number(),
5188
+ itemtimestamp: external_exports.number(),
5189
+ serviceId: external_exports.number(),
5190
+ attributes: external_exports.record(external_exports.string(), external_exports.string().or(external_exports.array(external_exports.string())))
5046
5191
  });
5047
5192
 
5048
5193
  // lib/items/v1/models/ItemPrice.ts
5049
- var itemPriceSchema = z.object({
5050
- amount: z.number(),
5051
- currency: z.string(),
5052
- id: z.number().nullish(),
5053
- priceDivision: z.string().nullish(),
5054
- iteminfoid: z.number().nullish(),
5055
- startdate: z.string().nullish(),
5056
- enddate: z.string().nullish(),
5057
- qualifier: z.string(),
5058
- region: z.string().nullish(),
5059
- regionqualifier: z.string().nullish(),
5060
- regiondescription: z.string().nullish(),
5061
- partnercompanyid: z.string().nullish(),
5062
- itempricetimestamp: z.number().nullish(),
5063
- range_type: z.string().nullish(),
5064
- date_range_type: z.string().nullish(),
5065
- min_range: z.number().nullish(),
5066
- gtin: z.string().nullish(),
5067
- priceConditionDescription: z.string().nullish(),
5068
- priceUnitQuantity: z.number().nullish(),
5069
- priceUnitQuantityUOM: z.string().nullish()
5194
+ var itemPriceSchema = external_exports.object({
5195
+ amount: external_exports.number(),
5196
+ currency: external_exports.string(),
5197
+ id: external_exports.number().nullish(),
5198
+ priceDivision: external_exports.string().nullish(),
5199
+ iteminfoid: external_exports.number().nullish(),
5200
+ startdate: external_exports.string().nullish(),
5201
+ enddate: external_exports.string().nullish(),
5202
+ qualifier: external_exports.string(),
5203
+ region: external_exports.string().nullish(),
5204
+ regionqualifier: external_exports.string().nullish(),
5205
+ regiondescription: external_exports.string().nullish(),
5206
+ partnercompanyid: external_exports.string().nullish(),
5207
+ itempricetimestamp: external_exports.number().nullish(),
5208
+ range_type: external_exports.string().nullish(),
5209
+ date_range_type: external_exports.string().nullish(),
5210
+ min_range: external_exports.number().nullish(),
5211
+ gtin: external_exports.string().nullish(),
5212
+ priceConditionDescription: external_exports.string().nullish(),
5213
+ priceUnitQuantity: external_exports.number().nullish(),
5214
+ priceUnitQuantityUOM: external_exports.string().nullish()
5070
5215
  });
5071
5216
 
5072
5217
  // lib/items/v1/models/PackComponentDetails.ts
5073
- var packComponentDetailsSchema = z.object({
5218
+ var packComponentDetailsSchema = external_exports.object({
5074
5219
  itemInfo: packComponentItemInfoSchema,
5075
- itemPrices: z.array(itemPriceSchema)
5220
+ itemPrices: external_exports.array(itemPriceSchema)
5076
5221
  });
5077
5222
 
5078
5223
  // lib/items/v1/models/GroupedItem.ts
5079
- var groupedItemSchema = z.object({
5080
- iteminfoid: z.number(),
5081
- companyid: z.number(),
5082
- status: z.string(),
5083
- createdDate: z.string(),
5084
- lastUpdatedDate: z.string(),
5085
- identifiers: z.record(z.string(), z.any()),
5224
+ var groupedItemSchema = external_exports.object({
5225
+ iteminfoid: external_exports.number(),
5226
+ companyid: external_exports.number(),
5227
+ status: external_exports.string(),
5228
+ createdDate: external_exports.string(),
5229
+ lastUpdatedDate: external_exports.string(),
5230
+ identifiers: external_exports.record(external_exports.string(), external_exports.any()),
5086
5231
  hierarchyDetails: hierarchyDetailsSchema,
5087
- groupedAttributes: z.array(groupedAttributesSchema),
5088
- packComponentDetails: z.array(packComponentDetailsSchema),
5089
- childComponentDetails: z.array(componentDetailsSchema),
5090
- parentComponentDetails: z.array(componentDetailsSchema),
5091
- locales: z.array(z.string())
5232
+ groupedAttributes: external_exports.array(groupedAttributesSchema),
5233
+ packComponentDetails: external_exports.array(packComponentDetailsSchema),
5234
+ childComponentDetails: external_exports.array(componentDetailsSchema),
5235
+ parentComponentDetails: external_exports.array(componentDetailsSchema),
5236
+ locales: external_exports.array(external_exports.string())
5092
5237
  });
5093
5238
 
5094
5239
  // lib/items/v1/models/ItemDetailView.ts
5095
- var itemDetailViewSchema = z.object({
5240
+ var itemDetailViewSchema = external_exports.object({
5096
5241
  item: groupedItemSchema
5097
5242
  });
5098
5243
 
5099
5244
  // lib/items/v1/models/Bulb.ts
5100
- var bulbSchema = z.object({
5101
- iteminfoid: z.number(),
5102
- id: z.number(),
5103
- shape: z.string(),
5104
- position: z.number(),
5105
- quantity: z.number(),
5106
- basetype: z.string(),
5107
- maxwatt: z.number(),
5108
- createdat: z.string(),
5109
- modifiedat: z.string(),
5110
- bulbtype: z.string(),
5111
- bulbincluded: z.string(),
5112
- bulbsize: z.string(),
5113
- replacementbulb: z.string(),
5114
- threewaybulb: z.string()
5245
+ var bulbSchema = external_exports.object({
5246
+ iteminfoid: external_exports.number(),
5247
+ id: external_exports.number(),
5248
+ shape: external_exports.string(),
5249
+ position: external_exports.number(),
5250
+ quantity: external_exports.number(),
5251
+ basetype: external_exports.string(),
5252
+ maxwatt: external_exports.number(),
5253
+ createdat: external_exports.string(),
5254
+ modifiedat: external_exports.string(),
5255
+ bulbtype: external_exports.string(),
5256
+ bulbincluded: external_exports.string(),
5257
+ bulbsize: external_exports.string(),
5258
+ replacementbulb: external_exports.string(),
5259
+ threewaybulb: external_exports.string()
5115
5260
  });
5116
5261
 
5117
5262
  // lib/items/v1/models/PackComponent.ts
5118
- var packComponentSchema = z.object({
5119
- itemInfoId: z.number().nullish(),
5120
- attributes: z.record(z.string(), z.string().or(z.array(z.string()))),
5121
- prices: z.array(itemPriceSchema)
5263
+ var packComponentSchema = external_exports.object({
5264
+ itemInfoId: external_exports.number().nullish(),
5265
+ attributes: external_exports.record(external_exports.string(), external_exports.string().or(external_exports.array(external_exports.string()))),
5266
+ prices: external_exports.array(itemPriceSchema)
5122
5267
  });
5123
5268
 
5124
5269
  // lib/items/v1/models/MediaItem.ts
5125
- var mediaItemSchema = z.object({
5126
- id: z.number(),
5127
- iteminfoid: z.number(),
5128
- medianame: z.string(),
5129
- height: z.number().nullish(),
5130
- filename: z.string(),
5131
- mediafilename: z.string().nullish(),
5132
- description: z.string().nullish(),
5133
- filesize: z.number().nullish(),
5134
- format: z.string().nullish(),
5135
- orientation: z.string().nullish(),
5136
- pixeldensity: z.string().nullish(),
5137
- purpose: z.string().nullish(),
5138
- width: z.number().nullish(),
5139
- mediatype: z.string(),
5140
- mediaviewtype: z.string().nullish(),
5141
- compressionquality: z.string().nullish(),
5142
- thumbnailflag: z.string().nullish()
5270
+ var mediaItemSchema = external_exports.object({
5271
+ id: external_exports.number(),
5272
+ iteminfoid: external_exports.number(),
5273
+ medianame: external_exports.string(),
5274
+ height: external_exports.number().nullish(),
5275
+ filename: external_exports.string(),
5276
+ mediafilename: external_exports.string().nullish(),
5277
+ description: external_exports.string().nullish(),
5278
+ filesize: external_exports.number().nullish(),
5279
+ format: external_exports.string().nullish(),
5280
+ orientation: external_exports.string().nullish(),
5281
+ pixeldensity: external_exports.string().nullish(),
5282
+ purpose: external_exports.string().nullish(),
5283
+ width: external_exports.number().nullish(),
5284
+ mediatype: external_exports.string(),
5285
+ mediaviewtype: external_exports.string().nullish(),
5286
+ compressionquality: external_exports.string().nullish(),
5287
+ thumbnailflag: external_exports.string().nullish()
5143
5288
  });
5144
5289
 
5145
5290
  // lib/items/v1/models/ItemDetail.ts
5146
- var itemDetailSchema = z.object({
5147
- attributes: z.record(z.string(), z.any()),
5148
- clusters: z.record(
5149
- z.string(),
5150
- z.array(
5151
- z.object({
5152
- itemInfoAttributes: z.record(
5153
- z.string(),
5154
- z.string().or(z.number()).or(z.boolean())
5291
+ var itemDetailSchema = external_exports.object({
5292
+ attributes: external_exports.record(external_exports.string(), external_exports.any()),
5293
+ clusters: external_exports.record(
5294
+ external_exports.string(),
5295
+ external_exports.array(
5296
+ external_exports.object({
5297
+ itemInfoAttributes: external_exports.record(
5298
+ external_exports.string(),
5299
+ external_exports.string().or(external_exports.number()).or(external_exports.boolean())
5155
5300
  )
5156
5301
  })
5157
5302
  )
5158
5303
  ),
5159
- prices: z.array(itemPriceSchema),
5160
- bulbs: z.array(bulbSchema),
5161
- media: z.array(mediaItemSchema),
5162
- packs: z.array(packComponentSchema)
5304
+ prices: external_exports.array(itemPriceSchema),
5305
+ bulbs: external_exports.array(bulbSchema),
5306
+ media: external_exports.array(mediaItemSchema),
5307
+ packs: external_exports.array(packComponentSchema)
5163
5308
  });
5164
5309
 
5165
5310
  // lib/items/v1/models/SpsItemIdResponse.ts
5166
- var spsItemIdResponseSchema = z.object({
5167
- id: z.string(),
5168
- ref: z.string()
5311
+ var spsItemIdResponseSchema = external_exports.object({
5312
+ id: external_exports.string(),
5313
+ ref: external_exports.string()
5169
5314
  });
5170
5315
 
5171
5316
  // lib/items/v1/models/ItemOrgStatus.ts
5172
- var itemOrgStatusSchema = z.object({
5173
- org: z.object({
5174
- ref: z.string(),
5175
- id: z.string(),
5176
- name: z.string()
5317
+ var itemOrgStatusSchema = external_exports.object({
5318
+ org: external_exports.object({
5319
+ ref: external_exports.string(),
5320
+ id: external_exports.string(),
5321
+ name: external_exports.string()
5177
5322
  }),
5178
5323
  lowestInvalidStage: phaseEnumSchema.nullable(),
5179
- validForRelationship: z.boolean()
5324
+ validForRelationship: external_exports.boolean()
5180
5325
  });
5181
5326
 
5182
5327
  // lib/items/v1/models/ItemStatus.ts
5183
- var itemStatusSchema = z.object({
5184
- itemId: z.string(),
5185
- itemOrgStatuses: z.array(itemOrgStatusSchema)
5328
+ var itemStatusSchema = external_exports.object({
5329
+ itemId: external_exports.string(),
5330
+ itemOrgStatuses: external_exports.array(itemOrgStatusSchema)
5186
5331
  });
5187
5332
 
5188
5333
  // lib/items/v1/models/ItemStatusResponse.ts
5189
- var itemStatusResponseSchema = z.object({
5190
- itemStatuses: z.array(itemStatusSchema)
5334
+ var itemStatusResponseSchema = external_exports.object({
5335
+ itemStatuses: external_exports.array(itemStatusSchema)
5191
5336
  });
5192
5337
 
5193
5338
  // lib/errors/v1/models/ItemErrorDetails.ts
5194
- var itemErrorDetailsSchema = z.object({
5195
- errorMessage: z.string(),
5196
- attributeName: z.string().nullable(),
5197
- tradingPartnerNames: z.array(z.string()),
5198
- phases: z.array(phaseEnumSchema),
5199
- attributeDbNames: z.array(z.string()),
5200
- tradingPartnerStages: z.array(tradingPartnerStageSchema),
5201
- repeatableGroupId: z.string().nullish()
5339
+ var itemErrorDetailsSchema = external_exports.object({
5340
+ errorMessage: external_exports.string(),
5341
+ attributeName: external_exports.string().nullable(),
5342
+ tradingPartnerNames: external_exports.array(external_exports.string()),
5343
+ phases: external_exports.array(phaseEnumSchema),
5344
+ attributeDbNames: external_exports.array(external_exports.string()),
5345
+ tradingPartnerStages: external_exports.array(tradingPartnerStageSchema),
5346
+ repeatableGroupId: external_exports.string().nullish()
5202
5347
  });
5203
5348
 
5204
5349
  // lib/errors/v1/models/ItemErrorDetailsResult.ts
5205
- var itemErrorDetailsResultSchema = z.object({
5206
- itemInfoId: z.number(),
5207
- upc: z.string().nullish(),
5208
- isbn: z.string().nullish(),
5209
- gtin: z.string().nullish(),
5210
- partnumber: z.string().nullish(),
5211
- ean: z.string().nullish(),
5212
- itemName: z.string().nullable(),
5213
- itemErrorDetails: z.array(itemErrorDetailsSchema)
5350
+ var itemErrorDetailsResultSchema = external_exports.object({
5351
+ itemInfoId: external_exports.number(),
5352
+ upc: external_exports.string().nullish(),
5353
+ isbn: external_exports.string().nullish(),
5354
+ gtin: external_exports.string().nullish(),
5355
+ partnumber: external_exports.string().nullish(),
5356
+ ean: external_exports.string().nullish(),
5357
+ itemName: external_exports.string().nullable(),
5358
+ itemErrorDetails: external_exports.array(itemErrorDetailsSchema)
5214
5359
  });
5215
5360
 
5216
5361
  // lib/errors/v1/index.ts
@@ -5274,12 +5419,12 @@ var BASE_URL10 = "locale";
5274
5419
  // lib/locale/mockHandlers.ts
5275
5420
  function createLocaleApiHandlers(client) {
5276
5421
  function getLocale(resolver = (_info) => {
5277
- const data = (0, import_zod_mock9.generateMock)(z.array(localeSchema));
5422
+ const data = (0, import_zod_mock9.generateMock)(external_exports.array(localeSchema));
5278
5423
  return import_msw10.HttpResponse.json(data);
5279
5424
  }) {
5280
5425
  return import_msw10.http.get(`${client.getBaseUrl()}${BASE_URL10}`, resolver);
5281
5426
  }
5282
- getLocale.generateData = () => (0, import_zod_mock9.generateMock)(z.array(localeSchema));
5427
+ getLocale.generateData = () => (0, import_zod_mock9.generateMock)(external_exports.array(localeSchema));
5283
5428
  return {
5284
5429
  getLocale
5285
5430
  };
@@ -5327,7 +5472,7 @@ function createItemsApiHandlers(client) {
5327
5472
  return import_msw11.http.post(`${client.getBaseUrl()}${BASE_URL11}/items`, resolver);
5328
5473
  }
5329
5474
  function getItemInfoId(resolver = (_info) => {
5330
- const data = (0, import_zod_mock10.generateMock)(z.number());
5475
+ const data = (0, import_zod_mock10.generateMock)(external_exports.number());
5331
5476
  return import_msw11.HttpResponse.json(data);
5332
5477
  }) {
5333
5478
  return import_msw11.http.get(
@@ -5335,7 +5480,7 @@ function createItemsApiHandlers(client) {
5335
5480
  resolver
5336
5481
  );
5337
5482
  }
5338
- getItemInfoId.generateData = () => (0, import_zod_mock10.generateMock)(z.number());
5483
+ getItemInfoId.generateData = () => (0, import_zod_mock10.generateMock)(external_exports.number());
5339
5484
  function getSpsItemId(resolver = () => {
5340
5485
  const data = (0, import_zod_mock10.generateMock)(spsItemIdResponseSchema);
5341
5486
  return import_msw11.HttpResponse.json(data);
@@ -5375,7 +5520,7 @@ var BASE_URL12 = "attributes";
5375
5520
  // lib/attributes/mockHandlers.ts
5376
5521
  function createAttributesApiHandlers(client) {
5377
5522
  function getAllAttributes(resolver = (_info) => {
5378
- const data = (0, import_zod_mock11.generateMock)(z.array(attributeMetaDataSchema));
5523
+ const data = (0, import_zod_mock11.generateMock)(external_exports.array(attributeMetaDataSchema));
5379
5524
  return import_msw12.HttpResponse.json(data);
5380
5525
  }) {
5381
5526
  return import_msw12.http.get(`${client.getBaseUrl()}${BASE_URL12}`, resolver);
@@ -5389,7 +5534,7 @@ function createAttributesApiHandlers(client) {
5389
5534
  }
5390
5535
  getAllAttributesByCompany.generateData = () => (0, import_zod_mock11.generateMock)(attributesByCompanySchema);
5391
5536
  function getAttributesExtensiveInfo(resolver = (_info) => {
5392
- const data = (0, import_zod_mock11.generateMock)(z.array(attributeDefinitionSchema));
5537
+ const data = (0, import_zod_mock11.generateMock)(external_exports.array(attributeDefinitionSchema));
5393
5538
  return import_msw12.HttpResponse.json(data);
5394
5539
  }) {
5395
5540
  return import_msw12.http.get(
@@ -5397,9 +5542,9 @@ function createAttributesApiHandlers(client) {
5397
5542
  resolver
5398
5543
  );
5399
5544
  }
5400
- getAttributesExtensiveInfo.generateData = () => (0, import_zod_mock11.generateMock)(z.array(attributeDefinitionSchema));
5545
+ getAttributesExtensiveInfo.generateData = () => (0, import_zod_mock11.generateMock)(external_exports.array(attributeDefinitionSchema));
5401
5546
  function getAttributeValidValues(resolver = () => {
5402
- const data = (0, import_zod_mock11.generateMock)(z.array(attributeValidValuesSchema));
5547
+ const data = (0, import_zod_mock11.generateMock)(external_exports.array(attributeValidValuesSchema));
5403
5548
  return import_msw12.HttpResponse.json(data);
5404
5549
  }) {
5405
5550
  return import_msw12.http.get(
@@ -5409,7 +5554,7 @@ function createAttributesApiHandlers(client) {
5409
5554
  }
5410
5555
  getAttributeValidValues.generateData = () => (0, import_zod_mock11.generateMock)(attributeValidValuesSchema);
5411
5556
  function getCompanyInterestedAttributes(resolver = (_info) => {
5412
- const data = (0, import_zod_mock11.generateMock)(z.array(z.string()));
5557
+ const data = (0, import_zod_mock11.generateMock)(external_exports.array(external_exports.string()));
5413
5558
  return import_msw12.HttpResponse.json(data);
5414
5559
  }) {
5415
5560
  return import_msw12.http.get(
@@ -5417,7 +5562,7 @@ function createAttributesApiHandlers(client) {
5417
5562
  resolver
5418
5563
  );
5419
5564
  }
5420
- getCompanyInterestedAttributes.generateData = () => (0, import_zod_mock11.generateMock)(z.array(z.string()));
5565
+ getCompanyInterestedAttributes.generateData = () => (0, import_zod_mock11.generateMock)(external_exports.array(external_exports.string()));
5421
5566
  return {
5422
5567
  getAllAttributes,
5423
5568
  getAllAttributesByCompany,
@@ -5437,12 +5582,12 @@ var BASE_URL13 = "templates";
5437
5582
  // lib/spreadsheetTemplate/mockHandlers.ts
5438
5583
  function createSpreadsheetTemplateApiHandlers(client) {
5439
5584
  function getTemplates(resolver = (_info) => {
5440
- const data = (0, import_zod_mock12.generateMock)(z.array(spreadsheetTemplateSchema));
5585
+ const data = (0, import_zod_mock12.generateMock)(external_exports.array(spreadsheetTemplateSchema));
5441
5586
  return import_msw13.HttpResponse.json(data);
5442
5587
  }) {
5443
5588
  return import_msw13.http.get(`${client.getBaseUrl()}${BASE_URL13}`, resolver);
5444
5589
  }
5445
- getTemplates.generateData = () => (0, import_zod_mock12.generateMock)(z.array(spreadsheetTemplateSchema));
5590
+ getTemplates.generateData = () => (0, import_zod_mock12.generateMock)(external_exports.array(spreadsheetTemplateSchema));
5446
5591
  return {
5447
5592
  getTemplates
5448
5593
  };
@@ -5458,7 +5603,7 @@ var BASE_URL14 = "feature";
5458
5603
  // lib/companyFeatures/mockHandlers.ts
5459
5604
  function createCompanyFeaturesApiHandlers(client) {
5460
5605
  function checkIfStageItemSetupIsEnabled(resolver = (_info) => {
5461
- const data = (0, import_zod_mock13.generateMock)(z.boolean());
5606
+ const data = (0, import_zod_mock13.generateMock)(external_exports.boolean());
5462
5607
  return import_msw14.HttpResponse.json(data);
5463
5608
  }) {
5464
5609
  return import_msw14.http.get(`${client.getBaseUrl()}${BASE_URL14}/isphaseditemsetupenabled`, resolver);
@@ -5478,7 +5623,7 @@ var BASE_URL15 = "feature-flag";
5478
5623
  // lib/featureFlags/mockHandlers.ts
5479
5624
  function createFeatureFlagsApiHandlers(client) {
5480
5625
  function checkEnableItemsLevelMSIS(resolver = (_info) => {
5481
- const data = (0, import_zod_mock14.generateMock)(z.boolean());
5626
+ const data = (0, import_zod_mock14.generateMock)(external_exports.boolean());
5482
5627
  return import_msw15.HttpResponse.json(data);
5483
5628
  }) {
5484
5629
  return import_msw15.http.get(
@@ -5487,7 +5632,7 @@ function createFeatureFlagsApiHandlers(client) {
5487
5632
  );
5488
5633
  }
5489
5634
  function checkIfEnabledForPackagingHierarchies(resolver = (_info) => {
5490
- const data = (0, import_zod_mock14.generateMock)(z.boolean());
5635
+ const data = (0, import_zod_mock14.generateMock)(external_exports.boolean());
5491
5636
  return import_msw15.HttpResponse.json(data);
5492
5637
  }) {
5493
5638
  return import_msw15.http.get(
@@ -5495,9 +5640,21 @@ function createFeatureFlagsApiHandlers(client) {
5495
5640
  resolver
5496
5641
  );
5497
5642
  }
5643
+ function checkIfEnabledForItemUomConversionRules(resolver = (_info) => {
5644
+ const data = (0, import_zod_mock14.generateMock)(external_exports.boolean());
5645
+ return import_msw15.HttpResponse.json(data);
5646
+ }) {
5647
+ const baseUrl = `${client.getBaseUrl()}${BASE_URL15}/enable-items-api-uom-conversion-rules/`;
5648
+ return [
5649
+ import_msw15.http.get(`${baseUrl}`, resolver),
5650
+ import_msw15.http.get(`${baseUrl}/:companyId`, resolver)
5651
+ // Handles requests with companyId
5652
+ ];
5653
+ }
5498
5654
  return {
5499
5655
  checkEnableItemsLevelMSIS,
5500
- checkIfEnabledForPackagingHierarchies
5656
+ checkIfEnabledForPackagingHierarchies,
5657
+ checkIfEnabledForItemUomConversionRules
5501
5658
  };
5502
5659
  }
5503
5660
 
@@ -5531,7 +5688,7 @@ var FlattenedItemIdentifierKeys = [
5531
5688
  "erpId",
5532
5689
  "componentId"
5533
5690
  ];
5534
- var FlattenedItemIdentifierKeysSchema = z.enum(
5691
+ var FlattenedItemIdentifierKeysSchema = external_exports.enum(
5535
5692
  FlattenedItemIdentifierKeys
5536
5693
  );
5537
5694
 
@@ -5541,19 +5698,19 @@ var BASE_URL16 = "uniquecriteria";
5541
5698
  // lib/uniqueCriteria/mockHandlers.ts
5542
5699
  function createUniqueCriteriaApiHandlers(client) {
5543
5700
  function getUniqueCriteriaByOrg(resolver = (_info) => {
5544
- const data = (0, import_zod_mock15.generateMock)(z.array(z.string()));
5701
+ const data = (0, import_zod_mock15.generateMock)(external_exports.array(external_exports.string()));
5545
5702
  return import_msw16.HttpResponse.json(data);
5546
5703
  }) {
5547
5704
  return import_msw16.http.get(`${client.getBaseUrl()}${BASE_URL16}/org`, resolver);
5548
5705
  }
5549
- getUniqueCriteriaByOrg.generateData = () => (0, import_zod_mock15.generateMock)(z.array(z.string()));
5706
+ getUniqueCriteriaByOrg.generateData = () => (0, import_zod_mock15.generateMock)(external_exports.array(external_exports.string()));
5550
5707
  function getProductUniqueCriteriaByOrg(resolver = (_info) => {
5551
- const data = (0, import_zod_mock15.generateMock)(z.array(FlattenedItemIdentifierKeysSchema));
5708
+ const data = (0, import_zod_mock15.generateMock)(external_exports.array(FlattenedItemIdentifierKeysSchema));
5552
5709
  return import_msw16.HttpResponse.json(data);
5553
5710
  }) {
5554
5711
  return import_msw16.http.get(`${client.getBaseUrl()}${BASE_URL16}/product/org`, resolver);
5555
5712
  }
5556
- getProductUniqueCriteriaByOrg.generateData = () => (0, import_zod_mock15.generateMock)(z.array(FlattenedItemIdentifierKeysSchema));
5713
+ getProductUniqueCriteriaByOrg.generateData = () => (0, import_zod_mock15.generateMock)(external_exports.array(FlattenedItemIdentifierKeysSchema));
5557
5714
  return {
5558
5715
  getUniqueCriteriaByOrg,
5559
5716
  getProductUniqueCriteriaByOrg