@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.
@@ -1,10 +1,129 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __export = (target, all) => {
3
+ for (var name in all)
4
+ __defProp(target, name, { get: all[name], enumerable: true });
5
+ };
6
+
1
7
  // lib/asstClient.ts
2
8
  import ky from "ky";
3
9
 
4
- // ../../node_modules/.pnpm/zod@3.23.8/node_modules/zod/lib/index.mjs
10
+ // ../../node_modules/.pnpm/zod@3.25.30/node_modules/zod/dist/esm/v3/external.js
11
+ var external_exports = {};
12
+ __export(external_exports, {
13
+ BRAND: () => BRAND,
14
+ DIRTY: () => DIRTY,
15
+ EMPTY_PATH: () => EMPTY_PATH,
16
+ INVALID: () => INVALID,
17
+ NEVER: () => NEVER,
18
+ OK: () => OK,
19
+ ParseStatus: () => ParseStatus,
20
+ Schema: () => ZodType,
21
+ ZodAny: () => ZodAny,
22
+ ZodArray: () => ZodArray,
23
+ ZodBigInt: () => ZodBigInt,
24
+ ZodBoolean: () => ZodBoolean,
25
+ ZodBranded: () => ZodBranded,
26
+ ZodCatch: () => ZodCatch,
27
+ ZodDate: () => ZodDate,
28
+ ZodDefault: () => ZodDefault,
29
+ ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,
30
+ ZodEffects: () => ZodEffects,
31
+ ZodEnum: () => ZodEnum,
32
+ ZodError: () => ZodError,
33
+ ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind,
34
+ ZodFunction: () => ZodFunction,
35
+ ZodIntersection: () => ZodIntersection,
36
+ ZodIssueCode: () => ZodIssueCode,
37
+ ZodLazy: () => ZodLazy,
38
+ ZodLiteral: () => ZodLiteral,
39
+ ZodMap: () => ZodMap,
40
+ ZodNaN: () => ZodNaN,
41
+ ZodNativeEnum: () => ZodNativeEnum,
42
+ ZodNever: () => ZodNever,
43
+ ZodNull: () => ZodNull,
44
+ ZodNullable: () => ZodNullable,
45
+ ZodNumber: () => ZodNumber,
46
+ ZodObject: () => ZodObject,
47
+ ZodOptional: () => ZodOptional,
48
+ ZodParsedType: () => ZodParsedType,
49
+ ZodPipeline: () => ZodPipeline,
50
+ ZodPromise: () => ZodPromise,
51
+ ZodReadonly: () => ZodReadonly,
52
+ ZodRecord: () => ZodRecord,
53
+ ZodSchema: () => ZodType,
54
+ ZodSet: () => ZodSet,
55
+ ZodString: () => ZodString,
56
+ ZodSymbol: () => ZodSymbol,
57
+ ZodTransformer: () => ZodEffects,
58
+ ZodTuple: () => ZodTuple,
59
+ ZodType: () => ZodType,
60
+ ZodUndefined: () => ZodUndefined,
61
+ ZodUnion: () => ZodUnion,
62
+ ZodUnknown: () => ZodUnknown,
63
+ ZodVoid: () => ZodVoid,
64
+ addIssueToContext: () => addIssueToContext,
65
+ any: () => anyType,
66
+ array: () => arrayType,
67
+ bigint: () => bigIntType,
68
+ boolean: () => booleanType,
69
+ coerce: () => coerce,
70
+ custom: () => custom,
71
+ date: () => dateType,
72
+ datetimeRegex: () => datetimeRegex,
73
+ defaultErrorMap: () => en_default,
74
+ discriminatedUnion: () => discriminatedUnionType,
75
+ effect: () => effectsType,
76
+ enum: () => enumType,
77
+ function: () => functionType,
78
+ getErrorMap: () => getErrorMap,
79
+ getParsedType: () => getParsedType,
80
+ instanceof: () => instanceOfType,
81
+ intersection: () => intersectionType,
82
+ isAborted: () => isAborted,
83
+ isAsync: () => isAsync,
84
+ isDirty: () => isDirty,
85
+ isValid: () => isValid,
86
+ late: () => late,
87
+ lazy: () => lazyType,
88
+ literal: () => literalType,
89
+ makeIssue: () => makeIssue,
90
+ map: () => mapType,
91
+ nan: () => nanType,
92
+ nativeEnum: () => nativeEnumType,
93
+ never: () => neverType,
94
+ null: () => nullType,
95
+ nullable: () => nullableType,
96
+ number: () => numberType,
97
+ object: () => objectType,
98
+ objectUtil: () => objectUtil,
99
+ oboolean: () => oboolean,
100
+ onumber: () => onumber,
101
+ optional: () => optionalType,
102
+ ostring: () => ostring,
103
+ pipeline: () => pipelineType,
104
+ preprocess: () => preprocessType,
105
+ promise: () => promiseType,
106
+ quotelessJson: () => quotelessJson,
107
+ record: () => recordType,
108
+ set: () => setType,
109
+ setErrorMap: () => setErrorMap,
110
+ strictObject: () => strictObjectType,
111
+ string: () => stringType,
112
+ symbol: () => symbolType,
113
+ transformer: () => effectsType,
114
+ tuple: () => tupleType,
115
+ undefined: () => undefinedType,
116
+ union: () => unionType,
117
+ unknown: () => unknownType,
118
+ util: () => util,
119
+ void: () => voidType
120
+ });
121
+
122
+ // ../../node_modules/.pnpm/zod@3.25.30/node_modules/zod/dist/esm/v3/helpers/util.js
5
123
  var util;
6
124
  (function(util2) {
7
- util2.assertEqual = (val) => val;
125
+ util2.assertEqual = (_) => {
126
+ };
8
127
  function assertIs(_arg) {
9
128
  }
10
129
  util2.assertIs = assertIs;
@@ -48,7 +167,7 @@ var util;
48
167
  }
49
168
  return void 0;
50
169
  };
51
- util2.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && isFinite(val) && Math.floor(val) === val;
170
+ util2.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && Number.isFinite(val) && Math.floor(val) === val;
52
171
  function joinValues(array, separator = " | ") {
53
172
  return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator);
54
173
  }
@@ -100,7 +219,7 @@ var getParsedType = (data) => {
100
219
  case "string":
101
220
  return ZodParsedType.string;
102
221
  case "number":
103
- return isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;
222
+ return Number.isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;
104
223
  case "boolean":
105
224
  return ZodParsedType.boolean;
106
225
  case "function":
@@ -133,6 +252,8 @@ var getParsedType = (data) => {
133
252
  return ZodParsedType.unknown;
134
253
  }
135
254
  };
255
+
256
+ // ../../node_modules/.pnpm/zod@3.25.30/node_modules/zod/dist/esm/v3/ZodError.js
136
257
  var ZodIssueCode = util.arrayToEnum([
137
258
  "invalid_type",
138
259
  "invalid_literal",
@@ -156,6 +277,9 @@ var quotelessJson = (obj) => {
156
277
  return json.replace(/"([^"]+)":/g, "$1:");
157
278
  };
158
279
  var ZodError = class _ZodError extends Error {
280
+ get errors() {
281
+ return this.issues;
282
+ }
159
283
  constructor(issues) {
160
284
  super();
161
285
  this.issues = [];
@@ -174,9 +298,6 @@ var ZodError = class _ZodError extends Error {
174
298
  this.name = "ZodError";
175
299
  this.issues = issues;
176
300
  }
177
- get errors() {
178
- return this.issues;
179
- }
180
301
  format(_mapper) {
181
302
  const mapper = _mapper || function(issue) {
182
303
  return issue.message;
@@ -248,6 +369,8 @@ ZodError.create = (issues) => {
248
369
  const error = new ZodError(issues);
249
370
  return error;
250
371
  };
372
+
373
+ // ../../node_modules/.pnpm/zod@3.25.30/node_modules/zod/dist/esm/v3/locales/en.js
251
374
  var errorMap = (issue, _ctx) => {
252
375
  let message;
253
376
  switch (issue.code) {
@@ -346,13 +469,18 @@ var errorMap = (issue, _ctx) => {
346
469
  }
347
470
  return { message };
348
471
  };
349
- var overrideErrorMap = errorMap;
472
+ var en_default = errorMap;
473
+
474
+ // ../../node_modules/.pnpm/zod@3.25.30/node_modules/zod/dist/esm/v3/errors.js
475
+ var overrideErrorMap = en_default;
350
476
  function setErrorMap(map) {
351
477
  overrideErrorMap = map;
352
478
  }
353
479
  function getErrorMap() {
354
480
  return overrideErrorMap;
355
481
  }
482
+
483
+ // ../../node_modules/.pnpm/zod@3.25.30/node_modules/zod/dist/esm/v3/helpers/parseUtil.js
356
484
  var makeIssue = (params) => {
357
485
  const { data, path, errorMaps, issueData } = params;
358
486
  const fullPath = [...path, ...issueData.path || []];
@@ -387,9 +515,12 @@ function addIssueToContext(ctx, issueData) {
387
515
  path: ctx.path,
388
516
  errorMaps: [
389
517
  ctx.common.contextualErrorMap,
518
+ // contextual error map is first priority
390
519
  ctx.schemaErrorMap,
520
+ // then schema-bound map if available
391
521
  overrideMap,
392
- overrideMap === errorMap ? void 0 : errorMap
522
+ // then global override map
523
+ overrideMap === en_default ? void 0 : en_default
393
524
  // then global default map
394
525
  ].filter((x) => !!x)
395
526
  });
@@ -458,22 +589,26 @@ var isAborted = (x) => x.status === "aborted";
458
589
  var isDirty = (x) => x.status === "dirty";
459
590
  var isValid = (x) => x.status === "valid";
460
591
  var isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
461
- function __classPrivateFieldGet(receiver, state, kind, f) {
592
+
593
+ // ../../node_modules/.pnpm/zod@3.25.30/node_modules/zod/dist/esm/v3/helpers/errorUtil.js
594
+ var errorUtil;
595
+ (function(errorUtil2) {
596
+ errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
597
+ errorUtil2.toString = (message) => typeof message === "string" ? message : message?.message;
598
+ })(errorUtil || (errorUtil = {}));
599
+
600
+ // ../../node_modules/.pnpm/zod@3.25.30/node_modules/zod/dist/esm/v3/types.js
601
+ var __classPrivateFieldGet = function(receiver, state, kind, f) {
462
602
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
463
603
  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");
464
604
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
465
- }
466
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
605
+ };
606
+ var __classPrivateFieldSet = function(receiver, state, value, kind, f) {
467
607
  if (kind === "m") throw new TypeError("Private method is not writable");
468
608
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
469
609
  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");
470
610
  return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
471
- }
472
- var errorUtil;
473
- (function(errorUtil2) {
474
- errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
475
- errorUtil2.toString = (message) => typeof message === "string" ? message : message === null || message === void 0 ? void 0 : message.message;
476
- })(errorUtil || (errorUtil = {}));
611
+ };
477
612
  var _ZodEnum_cache;
478
613
  var _ZodNativeEnum_cache;
479
614
  var ParseInputLazyPath = class {
@@ -486,7 +621,7 @@ var ParseInputLazyPath = class {
486
621
  }
487
622
  get path() {
488
623
  if (!this._cachedPath.length) {
489
- if (this._key instanceof Array) {
624
+ if (Array.isArray(this._key)) {
490
625
  this._cachedPath.push(...this._path, ...this._key);
491
626
  } else {
492
627
  this._cachedPath.push(...this._path, this._key);
@@ -524,49 +659,20 @@ function processCreateParams(params) {
524
659
  if (errorMap2)
525
660
  return { errorMap: errorMap2, description };
526
661
  const customMap = (iss, ctx) => {
527
- var _a, _b;
528
662
  const { message } = params;
529
663
  if (iss.code === "invalid_enum_value") {
530
- return { message: message !== null && message !== void 0 ? message : ctx.defaultError };
664
+ return { message: message ?? ctx.defaultError };
531
665
  }
532
666
  if (typeof ctx.data === "undefined") {
533
- return { message: (_a = message !== null && message !== void 0 ? message : required_error) !== null && _a !== void 0 ? _a : ctx.defaultError };
667
+ return { message: message ?? required_error ?? ctx.defaultError };
534
668
  }
535
669
  if (iss.code !== "invalid_type")
536
670
  return { message: ctx.defaultError };
537
- return { message: (_b = message !== null && message !== void 0 ? message : invalid_type_error) !== null && _b !== void 0 ? _b : ctx.defaultError };
671
+ return { message: message ?? invalid_type_error ?? ctx.defaultError };
538
672
  };
539
673
  return { errorMap: customMap, description };
540
674
  }
541
675
  var ZodType = class {
542
- constructor(def) {
543
- this.spa = this.safeParseAsync;
544
- this._def = def;
545
- this.parse = this.parse.bind(this);
546
- this.safeParse = this.safeParse.bind(this);
547
- this.parseAsync = this.parseAsync.bind(this);
548
- this.safeParseAsync = this.safeParseAsync.bind(this);
549
- this.spa = this.spa.bind(this);
550
- this.refine = this.refine.bind(this);
551
- this.refinement = this.refinement.bind(this);
552
- this.superRefine = this.superRefine.bind(this);
553
- this.optional = this.optional.bind(this);
554
- this.nullable = this.nullable.bind(this);
555
- this.nullish = this.nullish.bind(this);
556
- this.array = this.array.bind(this);
557
- this.promise = this.promise.bind(this);
558
- this.or = this.or.bind(this);
559
- this.and = this.and.bind(this);
560
- this.transform = this.transform.bind(this);
561
- this.brand = this.brand.bind(this);
562
- this.default = this.default.bind(this);
563
- this.catch = this.catch.bind(this);
564
- this.describe = this.describe.bind(this);
565
- this.pipe = this.pipe.bind(this);
566
- this.readonly = this.readonly.bind(this);
567
- this.isNullable = this.isNullable.bind(this);
568
- this.isOptional = this.isOptional.bind(this);
569
- }
570
676
  get description() {
571
677
  return this._def.description;
572
678
  }
@@ -614,14 +720,13 @@ var ZodType = class {
614
720
  throw result.error;
615
721
  }
616
722
  safeParse(data, params) {
617
- var _a;
618
723
  const ctx = {
619
724
  common: {
620
725
  issues: [],
621
- async: (_a = params === null || params === void 0 ? void 0 : params.async) !== null && _a !== void 0 ? _a : false,
622
- contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap
726
+ async: params?.async ?? false,
727
+ contextualErrorMap: params?.errorMap
623
728
  },
624
- path: (params === null || params === void 0 ? void 0 : params.path) || [],
729
+ path: params?.path || [],
625
730
  schemaErrorMap: this._def.errorMap,
626
731
  parent: null,
627
732
  data,
@@ -630,6 +735,42 @@ var ZodType = class {
630
735
  const result = this._parseSync({ data, path: ctx.path, parent: ctx });
631
736
  return handleResult(ctx, result);
632
737
  }
738
+ "~validate"(data) {
739
+ const ctx = {
740
+ common: {
741
+ issues: [],
742
+ async: !!this["~standard"].async
743
+ },
744
+ path: [],
745
+ schemaErrorMap: this._def.errorMap,
746
+ parent: null,
747
+ data,
748
+ parsedType: getParsedType(data)
749
+ };
750
+ if (!this["~standard"].async) {
751
+ try {
752
+ const result = this._parseSync({ data, path: [], parent: ctx });
753
+ return isValid(result) ? {
754
+ value: result.value
755
+ } : {
756
+ issues: ctx.common.issues
757
+ };
758
+ } catch (err) {
759
+ if (err?.message?.toLowerCase()?.includes("encountered")) {
760
+ this["~standard"].async = true;
761
+ }
762
+ ctx.common = {
763
+ issues: [],
764
+ async: true
765
+ };
766
+ }
767
+ }
768
+ return this._parseAsync({ data, path: [], parent: ctx }).then((result) => isValid(result) ? {
769
+ value: result.value
770
+ } : {
771
+ issues: ctx.common.issues
772
+ });
773
+ }
633
774
  async parseAsync(data, params) {
634
775
  const result = await this.safeParseAsync(data, params);
635
776
  if (result.success)
@@ -640,10 +781,10 @@ var ZodType = class {
640
781
  const ctx = {
641
782
  common: {
642
783
  issues: [],
643
- contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap,
784
+ contextualErrorMap: params?.errorMap,
644
785
  async: true
645
786
  },
646
- path: (params === null || params === void 0 ? void 0 : params.path) || [],
787
+ path: params?.path || [],
647
788
  schemaErrorMap: this._def.errorMap,
648
789
  parent: null,
649
790
  data,
@@ -707,6 +848,39 @@ var ZodType = class {
707
848
  superRefine(refinement) {
708
849
  return this._refinement(refinement);
709
850
  }
851
+ constructor(def) {
852
+ this.spa = this.safeParseAsync;
853
+ this._def = def;
854
+ this.parse = this.parse.bind(this);
855
+ this.safeParse = this.safeParse.bind(this);
856
+ this.parseAsync = this.parseAsync.bind(this);
857
+ this.safeParseAsync = this.safeParseAsync.bind(this);
858
+ this.spa = this.spa.bind(this);
859
+ this.refine = this.refine.bind(this);
860
+ this.refinement = this.refinement.bind(this);
861
+ this.superRefine = this.superRefine.bind(this);
862
+ this.optional = this.optional.bind(this);
863
+ this.nullable = this.nullable.bind(this);
864
+ this.nullish = this.nullish.bind(this);
865
+ this.array = this.array.bind(this);
866
+ this.promise = this.promise.bind(this);
867
+ this.or = this.or.bind(this);
868
+ this.and = this.and.bind(this);
869
+ this.transform = this.transform.bind(this);
870
+ this.brand = this.brand.bind(this);
871
+ this.default = this.default.bind(this);
872
+ this.catch = this.catch.bind(this);
873
+ this.describe = this.describe.bind(this);
874
+ this.pipe = this.pipe.bind(this);
875
+ this.readonly = this.readonly.bind(this);
876
+ this.isNullable = this.isNullable.bind(this);
877
+ this.isOptional = this.isOptional.bind(this);
878
+ this["~standard"] = {
879
+ version: 1,
880
+ vendor: "zod",
881
+ validate: (data) => this["~validate"](data)
882
+ };
883
+ }
710
884
  optional() {
711
885
  return ZodOptional.create(this, this._def);
712
886
  }
@@ -717,7 +891,7 @@ var ZodType = class {
717
891
  return this.nullable().optional();
718
892
  }
719
893
  array() {
720
- return ZodArray.create(this, this._def);
894
+ return ZodArray.create(this);
721
895
  }
722
896
  promise() {
723
897
  return ZodPromise.create(this, this._def);
@@ -783,26 +957,31 @@ var ZodType = class {
783
957
  };
784
958
  var cuidRegex = /^c[^\s-]{8,}$/i;
785
959
  var cuid2Regex = /^[0-9a-z]+$/;
786
- var ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/;
960
+ var ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/i;
787
961
  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;
788
962
  var nanoidRegex = /^[a-z0-9_-]{21}$/i;
963
+ var jwtRegex = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/;
789
964
  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)?)??$/;
790
965
  var emailRegex = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;
791
966
  var _emojiRegex = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;
792
967
  var emojiRegex;
793
968
  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])$/;
794
- 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})))$/;
969
+ 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])$/;
970
+ 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]))$/;
971
+ 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])$/;
795
972
  var base64Regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;
973
+ var base64urlRegex = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/;
796
974
  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])))`;
797
975
  var dateRegex = new RegExp(`^${dateRegexSource}$`);
798
976
  function timeRegexSource(args) {
799
- let regex = `([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d`;
977
+ let secondsRegexSource = `[0-5]\\d`;
800
978
  if (args.precision) {
801
- regex = `${regex}\\.\\d{${args.precision}}`;
979
+ secondsRegexSource = `${secondsRegexSource}\\.\\d{${args.precision}}`;
802
980
  } else if (args.precision == null) {
803
- regex = `${regex}(\\.\\d+)?`;
981
+ secondsRegexSource = `${secondsRegexSource}(\\.\\d+)?`;
804
982
  }
805
- return regex;
983
+ const secondsQuantifier = args.precision ? "+" : "?";
984
+ return `([01]\\d|2[0-3]):[0-5]\\d(:${secondsRegexSource})${secondsQuantifier}`;
806
985
  }
807
986
  function timeRegex(args) {
808
987
  return new RegExp(`^${timeRegexSource(args)}$`);
@@ -825,6 +1004,35 @@ function isValidIP(ip, version) {
825
1004
  }
826
1005
  return false;
827
1006
  }
1007
+ function isValidJWT(jwt, alg) {
1008
+ if (!jwtRegex.test(jwt))
1009
+ return false;
1010
+ try {
1011
+ const [header] = jwt.split(".");
1012
+ const base64 = header.replace(/-/g, "+").replace(/_/g, "/").padEnd(header.length + (4 - header.length % 4) % 4, "=");
1013
+ const decoded = JSON.parse(atob(base64));
1014
+ if (typeof decoded !== "object" || decoded === null)
1015
+ return false;
1016
+ if ("typ" in decoded && decoded?.typ !== "JWT")
1017
+ return false;
1018
+ if (!decoded.alg)
1019
+ return false;
1020
+ if (alg && decoded.alg !== alg)
1021
+ return false;
1022
+ return true;
1023
+ } catch {
1024
+ return false;
1025
+ }
1026
+ }
1027
+ function isValidCidr(ip, version) {
1028
+ if ((version === "v4" || !version) && ipv4CidrRegex.test(ip)) {
1029
+ return true;
1030
+ }
1031
+ if ((version === "v6" || !version) && ipv6CidrRegex.test(ip)) {
1032
+ return true;
1033
+ }
1034
+ return false;
1035
+ }
828
1036
  var ZodString = class _ZodString extends ZodType {
829
1037
  _parse(input) {
830
1038
  if (this._def.coerce) {
@@ -971,7 +1179,7 @@ var ZodString = class _ZodString extends ZodType {
971
1179
  } else if (check.kind === "url") {
972
1180
  try {
973
1181
  new URL(input.data);
974
- } catch (_a) {
1182
+ } catch {
975
1183
  ctx = this._getOrReturnCtx(input, ctx);
976
1184
  addIssueToContext(ctx, {
977
1185
  validation: "url",
@@ -1081,6 +1289,26 @@ var ZodString = class _ZodString extends ZodType {
1081
1289
  });
1082
1290
  status.dirty();
1083
1291
  }
1292
+ } else if (check.kind === "jwt") {
1293
+ if (!isValidJWT(input.data, check.alg)) {
1294
+ ctx = this._getOrReturnCtx(input, ctx);
1295
+ addIssueToContext(ctx, {
1296
+ validation: "jwt",
1297
+ code: ZodIssueCode.invalid_string,
1298
+ message: check.message
1299
+ });
1300
+ status.dirty();
1301
+ }
1302
+ } else if (check.kind === "cidr") {
1303
+ if (!isValidCidr(input.data, check.version)) {
1304
+ ctx = this._getOrReturnCtx(input, ctx);
1305
+ addIssueToContext(ctx, {
1306
+ validation: "cidr",
1307
+ code: ZodIssueCode.invalid_string,
1308
+ message: check.message
1309
+ });
1310
+ status.dirty();
1311
+ }
1084
1312
  } else if (check.kind === "base64") {
1085
1313
  if (!base64Regex.test(input.data)) {
1086
1314
  ctx = this._getOrReturnCtx(input, ctx);
@@ -1091,6 +1319,16 @@ var ZodString = class _ZodString extends ZodType {
1091
1319
  });
1092
1320
  status.dirty();
1093
1321
  }
1322
+ } else if (check.kind === "base64url") {
1323
+ if (!base64urlRegex.test(input.data)) {
1324
+ ctx = this._getOrReturnCtx(input, ctx);
1325
+ addIssueToContext(ctx, {
1326
+ validation: "base64url",
1327
+ code: ZodIssueCode.invalid_string,
1328
+ message: check.message
1329
+ });
1330
+ status.dirty();
1331
+ }
1094
1332
  } else {
1095
1333
  util.assertNever(check);
1096
1334
  }
@@ -1137,11 +1375,22 @@ var ZodString = class _ZodString extends ZodType {
1137
1375
  base64(message) {
1138
1376
  return this._addCheck({ kind: "base64", ...errorUtil.errToObj(message) });
1139
1377
  }
1378
+ base64url(message) {
1379
+ return this._addCheck({
1380
+ kind: "base64url",
1381
+ ...errorUtil.errToObj(message)
1382
+ });
1383
+ }
1384
+ jwt(options) {
1385
+ return this._addCheck({ kind: "jwt", ...errorUtil.errToObj(options) });
1386
+ }
1140
1387
  ip(options) {
1141
1388
  return this._addCheck({ kind: "ip", ...errorUtil.errToObj(options) });
1142
1389
  }
1390
+ cidr(options) {
1391
+ return this._addCheck({ kind: "cidr", ...errorUtil.errToObj(options) });
1392
+ }
1143
1393
  datetime(options) {
1144
- var _a, _b;
1145
1394
  if (typeof options === "string") {
1146
1395
  return this._addCheck({
1147
1396
  kind: "datetime",
@@ -1153,10 +1402,10 @@ var ZodString = class _ZodString extends ZodType {
1153
1402
  }
1154
1403
  return this._addCheck({
1155
1404
  kind: "datetime",
1156
- precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === "undefined" ? null : options === null || options === void 0 ? void 0 : options.precision,
1157
- offset: (_a = options === null || options === void 0 ? void 0 : options.offset) !== null && _a !== void 0 ? _a : false,
1158
- local: (_b = options === null || options === void 0 ? void 0 : options.local) !== null && _b !== void 0 ? _b : false,
1159
- ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message)
1405
+ precision: typeof options?.precision === "undefined" ? null : options?.precision,
1406
+ offset: options?.offset ?? false,
1407
+ local: options?.local ?? false,
1408
+ ...errorUtil.errToObj(options?.message)
1160
1409
  });
1161
1410
  }
1162
1411
  date(message) {
@@ -1172,8 +1421,8 @@ var ZodString = class _ZodString extends ZodType {
1172
1421
  }
1173
1422
  return this._addCheck({
1174
1423
  kind: "time",
1175
- precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === "undefined" ? null : options === null || options === void 0 ? void 0 : options.precision,
1176
- ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message)
1424
+ precision: typeof options?.precision === "undefined" ? null : options?.precision,
1425
+ ...errorUtil.errToObj(options?.message)
1177
1426
  });
1178
1427
  }
1179
1428
  duration(message) {
@@ -1190,8 +1439,8 @@ var ZodString = class _ZodString extends ZodType {
1190
1439
  return this._addCheck({
1191
1440
  kind: "includes",
1192
1441
  value,
1193
- position: options === null || options === void 0 ? void 0 : options.position,
1194
- ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message)
1442
+ position: options?.position,
1443
+ ...errorUtil.errToObj(options?.message)
1195
1444
  });
1196
1445
  }
1197
1446
  startsWith(value, message) {
@@ -1230,8 +1479,7 @@ var ZodString = class _ZodString extends ZodType {
1230
1479
  });
1231
1480
  }
1232
1481
  /**
1233
- * @deprecated Use z.string().min(1) instead.
1234
- * @see {@link ZodString.min}
1482
+ * Equivalent to `.min(1)`
1235
1483
  */
1236
1484
  nonempty(message) {
1237
1485
  return this.min(1, errorUtil.errToObj(message));
@@ -1293,9 +1541,15 @@ var ZodString = class _ZodString extends ZodType {
1293
1541
  get isIP() {
1294
1542
  return !!this._def.checks.find((ch) => ch.kind === "ip");
1295
1543
  }
1544
+ get isCIDR() {
1545
+ return !!this._def.checks.find((ch) => ch.kind === "cidr");
1546
+ }
1296
1547
  get isBase64() {
1297
1548
  return !!this._def.checks.find((ch) => ch.kind === "base64");
1298
1549
  }
1550
+ get isBase64url() {
1551
+ return !!this._def.checks.find((ch) => ch.kind === "base64url");
1552
+ }
1299
1553
  get minLength() {
1300
1554
  let min = null;
1301
1555
  for (const ch of this._def.checks) {
@@ -1318,11 +1572,10 @@ var ZodString = class _ZodString extends ZodType {
1318
1572
  }
1319
1573
  };
1320
1574
  ZodString.create = (params) => {
1321
- var _a;
1322
1575
  return new ZodString({
1323
1576
  checks: [],
1324
1577
  typeName: ZodFirstPartyTypeKind.ZodString,
1325
- coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,
1578
+ coerce: params?.coerce ?? false,
1326
1579
  ...processCreateParams(params)
1327
1580
  });
1328
1581
  };
@@ -1330,9 +1583,9 @@ function floatSafeRemainder(val, step) {
1330
1583
  const valDecCount = (val.toString().split(".")[1] || "").length;
1331
1584
  const stepDecCount = (step.toString().split(".")[1] || "").length;
1332
1585
  const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
1333
- const valInt = parseInt(val.toFixed(decCount).replace(".", ""));
1334
- const stepInt = parseInt(step.toFixed(decCount).replace(".", ""));
1335
- return valInt % stepInt / Math.pow(10, decCount);
1586
+ const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
1587
+ const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
1588
+ return valInt % stepInt / 10 ** decCount;
1336
1589
  }
1337
1590
  var ZodNumber = class _ZodNumber extends ZodType {
1338
1591
  constructor() {
@@ -1542,7 +1795,8 @@ var ZodNumber = class _ZodNumber extends ZodType {
1542
1795
  return !!this._def.checks.find((ch) => ch.kind === "int" || ch.kind === "multipleOf" && util.isInteger(ch.value));
1543
1796
  }
1544
1797
  get isFinite() {
1545
- let max = null, min = null;
1798
+ let max = null;
1799
+ let min = null;
1546
1800
  for (const ch of this._def.checks) {
1547
1801
  if (ch.kind === "finite" || ch.kind === "int" || ch.kind === "multipleOf") {
1548
1802
  return true;
@@ -1561,7 +1815,7 @@ ZodNumber.create = (params) => {
1561
1815
  return new ZodNumber({
1562
1816
  checks: [],
1563
1817
  typeName: ZodFirstPartyTypeKind.ZodNumber,
1564
- coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
1818
+ coerce: params?.coerce || false,
1565
1819
  ...processCreateParams(params)
1566
1820
  });
1567
1821
  };
@@ -1573,17 +1827,15 @@ var ZodBigInt = class _ZodBigInt extends ZodType {
1573
1827
  }
1574
1828
  _parse(input) {
1575
1829
  if (this._def.coerce) {
1576
- input.data = BigInt(input.data);
1830
+ try {
1831
+ input.data = BigInt(input.data);
1832
+ } catch {
1833
+ return this._getInvalidInput(input);
1834
+ }
1577
1835
  }
1578
1836
  const parsedType = this._getType(input);
1579
1837
  if (parsedType !== ZodParsedType.bigint) {
1580
- const ctx2 = this._getOrReturnCtx(input);
1581
- addIssueToContext(ctx2, {
1582
- code: ZodIssueCode.invalid_type,
1583
- expected: ZodParsedType.bigint,
1584
- received: ctx2.parsedType
1585
- });
1586
- return INVALID;
1838
+ return this._getInvalidInput(input);
1587
1839
  }
1588
1840
  let ctx = void 0;
1589
1841
  const status = new ParseStatus();
@@ -1630,6 +1882,15 @@ var ZodBigInt = class _ZodBigInt extends ZodType {
1630
1882
  }
1631
1883
  return { status: status.value, value: input.data };
1632
1884
  }
1885
+ _getInvalidInput(input) {
1886
+ const ctx = this._getOrReturnCtx(input);
1887
+ addIssueToContext(ctx, {
1888
+ code: ZodIssueCode.invalid_type,
1889
+ expected: ZodParsedType.bigint,
1890
+ received: ctx.parsedType
1891
+ });
1892
+ return INVALID;
1893
+ }
1633
1894
  gte(value, message) {
1634
1895
  return this.setLimit("min", value, true, errorUtil.toString(message));
1635
1896
  }
@@ -1723,11 +1984,10 @@ var ZodBigInt = class _ZodBigInt extends ZodType {
1723
1984
  }
1724
1985
  };
1725
1986
  ZodBigInt.create = (params) => {
1726
- var _a;
1727
1987
  return new ZodBigInt({
1728
1988
  checks: [],
1729
1989
  typeName: ZodFirstPartyTypeKind.ZodBigInt,
1730
- coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,
1990
+ coerce: params?.coerce ?? false,
1731
1991
  ...processCreateParams(params)
1732
1992
  });
1733
1993
  };
@@ -1752,7 +2012,7 @@ var ZodBoolean = class extends ZodType {
1752
2012
  ZodBoolean.create = (params) => {
1753
2013
  return new ZodBoolean({
1754
2014
  typeName: ZodFirstPartyTypeKind.ZodBoolean,
1755
- coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
2015
+ coerce: params?.coerce || false,
1756
2016
  ...processCreateParams(params)
1757
2017
  });
1758
2018
  };
@@ -1771,7 +2031,7 @@ var ZodDate = class _ZodDate extends ZodType {
1771
2031
  });
1772
2032
  return INVALID;
1773
2033
  }
1774
- if (isNaN(input.data.getTime())) {
2034
+ if (Number.isNaN(input.data.getTime())) {
1775
2035
  const ctx2 = this._getOrReturnCtx(input);
1776
2036
  addIssueToContext(ctx2, {
1777
2037
  code: ZodIssueCode.invalid_date
@@ -1860,7 +2120,7 @@ var ZodDate = class _ZodDate extends ZodType {
1860
2120
  ZodDate.create = (params) => {
1861
2121
  return new ZodDate({
1862
2122
  checks: [],
1863
- coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
2123
+ coerce: params?.coerce || false,
1864
2124
  typeName: ZodFirstPartyTypeKind.ZodDate,
1865
2125
  ...processCreateParams(params)
1866
2126
  });
@@ -2135,7 +2395,8 @@ var ZodObject = class _ZodObject extends ZodType {
2135
2395
  return this._cached;
2136
2396
  const shape = this._def.shape();
2137
2397
  const keys = util.objectKeys(shape);
2138
- return this._cached = { shape, keys };
2398
+ this._cached = { shape, keys };
2399
+ return this._cached;
2139
2400
  }
2140
2401
  _parse(input) {
2141
2402
  const parsedType = this._getType(input);
@@ -2185,8 +2446,8 @@ var ZodObject = class _ZodObject extends ZodType {
2185
2446
  });
2186
2447
  status.dirty();
2187
2448
  }
2188
- } else if (unknownKeys === "strip") ;
2189
- else {
2449
+ } else if (unknownKeys === "strip") {
2450
+ } else {
2190
2451
  throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);
2191
2452
  }
2192
2453
  } else {
@@ -2233,11 +2494,10 @@ var ZodObject = class _ZodObject extends ZodType {
2233
2494
  unknownKeys: "strict",
2234
2495
  ...message !== void 0 ? {
2235
2496
  errorMap: (issue, ctx) => {
2236
- var _a, _b, _c, _d;
2237
- 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;
2497
+ const defaultError = this._def.errorMap?.(issue, ctx).message ?? ctx.defaultError;
2238
2498
  if (issue.code === "unrecognized_keys")
2239
2499
  return {
2240
- message: (_d = errorUtil.errToObj(message).message) !== null && _d !== void 0 ? _d : defaultError
2500
+ message: errorUtil.errToObj(message).message ?? defaultError
2241
2501
  };
2242
2502
  return {
2243
2503
  message: defaultError
@@ -2368,11 +2628,11 @@ var ZodObject = class _ZodObject extends ZodType {
2368
2628
  }
2369
2629
  pick(mask) {
2370
2630
  const shape = {};
2371
- util.objectKeys(mask).forEach((key) => {
2631
+ for (const key of util.objectKeys(mask)) {
2372
2632
  if (mask[key] && this.shape[key]) {
2373
2633
  shape[key] = this.shape[key];
2374
2634
  }
2375
- });
2635
+ }
2376
2636
  return new _ZodObject({
2377
2637
  ...this._def,
2378
2638
  shape: () => shape
@@ -2380,11 +2640,11 @@ var ZodObject = class _ZodObject extends ZodType {
2380
2640
  }
2381
2641
  omit(mask) {
2382
2642
  const shape = {};
2383
- util.objectKeys(this.shape).forEach((key) => {
2643
+ for (const key of util.objectKeys(this.shape)) {
2384
2644
  if (!mask[key]) {
2385
2645
  shape[key] = this.shape[key];
2386
2646
  }
2387
- });
2647
+ }
2388
2648
  return new _ZodObject({
2389
2649
  ...this._def,
2390
2650
  shape: () => shape
@@ -2398,14 +2658,14 @@ var ZodObject = class _ZodObject extends ZodType {
2398
2658
  }
2399
2659
  partial(mask) {
2400
2660
  const newShape = {};
2401
- util.objectKeys(this.shape).forEach((key) => {
2661
+ for (const key of util.objectKeys(this.shape)) {
2402
2662
  const fieldSchema = this.shape[key];
2403
2663
  if (mask && !mask[key]) {
2404
2664
  newShape[key] = fieldSchema;
2405
2665
  } else {
2406
2666
  newShape[key] = fieldSchema.optional();
2407
2667
  }
2408
- });
2668
+ }
2409
2669
  return new _ZodObject({
2410
2670
  ...this._def,
2411
2671
  shape: () => newShape
@@ -2413,7 +2673,7 @@ var ZodObject = class _ZodObject extends ZodType {
2413
2673
  }
2414
2674
  required(mask) {
2415
2675
  const newShape = {};
2416
- util.objectKeys(this.shape).forEach((key) => {
2676
+ for (const key of util.objectKeys(this.shape)) {
2417
2677
  if (mask && !mask[key]) {
2418
2678
  newShape[key] = this.shape[key];
2419
2679
  } else {
@@ -2424,7 +2684,7 @@ var ZodObject = class _ZodObject extends ZodType {
2424
2684
  }
2425
2685
  newShape[key] = newField;
2426
2686
  }
2427
- });
2687
+ }
2428
2688
  return new _ZodObject({
2429
2689
  ...this._def,
2430
2690
  shape: () => newShape
@@ -3040,12 +3300,7 @@ var ZodFunction = class _ZodFunction extends ZodType {
3040
3300
  return makeIssue({
3041
3301
  data: args,
3042
3302
  path: ctx.path,
3043
- errorMaps: [
3044
- ctx.common.contextualErrorMap,
3045
- ctx.schemaErrorMap,
3046
- getErrorMap(),
3047
- errorMap
3048
- ].filter((x) => !!x),
3303
+ errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x) => !!x),
3049
3304
  issueData: {
3050
3305
  code: ZodIssueCode.invalid_arguments,
3051
3306
  argumentsError: error
@@ -3056,12 +3311,7 @@ var ZodFunction = class _ZodFunction extends ZodType {
3056
3311
  return makeIssue({
3057
3312
  data: returns,
3058
3313
  path: ctx.path,
3059
- errorMaps: [
3060
- ctx.common.contextualErrorMap,
3061
- ctx.schemaErrorMap,
3062
- getErrorMap(),
3063
- errorMap
3064
- ].filter((x) => !!x),
3314
+ errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x) => !!x),
3065
3315
  issueData: {
3066
3316
  code: ZodIssueCode.invalid_return_type,
3067
3317
  returnTypeError: error
@@ -3440,7 +3690,10 @@ var ZodEffects = class extends ZodType {
3440
3690
  return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((base) => {
3441
3691
  if (!isValid(base))
3442
3692
  return base;
3443
- return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({ status: status.value, value: result }));
3693
+ return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({
3694
+ status: status.value,
3695
+ value: result
3696
+ }));
3444
3697
  });
3445
3698
  }
3446
3699
  }
@@ -3692,16 +3945,30 @@ ZodReadonly.create = (type, params) => {
3692
3945
  ...processCreateParams(params)
3693
3946
  });
3694
3947
  };
3695
- function custom(check, params = {}, fatal) {
3948
+ function cleanParams(params, data) {
3949
+ const p = typeof params === "function" ? params(data) : typeof params === "string" ? { message: params } : params;
3950
+ const p2 = typeof p === "string" ? { message: p } : p;
3951
+ return p2;
3952
+ }
3953
+ function custom(check, _params = {}, fatal) {
3696
3954
  if (check)
3697
3955
  return ZodAny.create().superRefine((data, ctx) => {
3698
- var _a, _b;
3699
- if (!check(data)) {
3700
- const p = typeof params === "function" ? params(data) : typeof params === "string" ? { message: params } : params;
3701
- const _fatal = (_b = (_a = p.fatal) !== null && _a !== void 0 ? _a : fatal) !== null && _b !== void 0 ? _b : true;
3702
- const p2 = typeof p === "string" ? { message: p } : p;
3703
- ctx.addIssue({ code: "custom", ...p2, fatal: _fatal });
3956
+ const r = check(data);
3957
+ if (r instanceof Promise) {
3958
+ return r.then((r2) => {
3959
+ if (!r2) {
3960
+ const params = cleanParams(_params, data);
3961
+ const _fatal = params.fatal ?? fatal ?? true;
3962
+ ctx.addIssue({ code: "custom", ...params, fatal: _fatal });
3963
+ }
3964
+ });
3704
3965
  }
3966
+ if (!r) {
3967
+ const params = cleanParams(_params, data);
3968
+ const _fatal = params.fatal ?? fatal ?? true;
3969
+ ctx.addIssue({ code: "custom", ...params, fatal: _fatal });
3970
+ }
3971
+ return;
3705
3972
  });
3706
3973
  return ZodAny.create();
3707
3974
  }
@@ -3798,130 +4065,14 @@ var coerce = {
3798
4065
  date: (arg) => ZodDate.create({ ...arg, coerce: true })
3799
4066
  };
3800
4067
  var NEVER = INVALID;
3801
- var z = /* @__PURE__ */ Object.freeze({
3802
- __proto__: null,
3803
- defaultErrorMap: errorMap,
3804
- setErrorMap,
3805
- getErrorMap,
3806
- makeIssue,
3807
- EMPTY_PATH,
3808
- addIssueToContext,
3809
- ParseStatus,
3810
- INVALID,
3811
- DIRTY,
3812
- OK,
3813
- isAborted,
3814
- isDirty,
3815
- isValid,
3816
- isAsync,
3817
- get util() {
3818
- return util;
3819
- },
3820
- get objectUtil() {
3821
- return objectUtil;
3822
- },
3823
- ZodParsedType,
3824
- getParsedType,
3825
- ZodType,
3826
- datetimeRegex,
3827
- ZodString,
3828
- ZodNumber,
3829
- ZodBigInt,
3830
- ZodBoolean,
3831
- ZodDate,
3832
- ZodSymbol,
3833
- ZodUndefined,
3834
- ZodNull,
3835
- ZodAny,
3836
- ZodUnknown,
3837
- ZodNever,
3838
- ZodVoid,
3839
- ZodArray,
3840
- ZodObject,
3841
- ZodUnion,
3842
- ZodDiscriminatedUnion,
3843
- ZodIntersection,
3844
- ZodTuple,
3845
- ZodRecord,
3846
- ZodMap,
3847
- ZodSet,
3848
- ZodFunction,
3849
- ZodLazy,
3850
- ZodLiteral,
3851
- ZodEnum,
3852
- ZodNativeEnum,
3853
- ZodPromise,
3854
- ZodEffects,
3855
- ZodTransformer: ZodEffects,
3856
- ZodOptional,
3857
- ZodNullable,
3858
- ZodDefault,
3859
- ZodCatch,
3860
- ZodNaN,
3861
- BRAND,
3862
- ZodBranded,
3863
- ZodPipeline,
3864
- ZodReadonly,
3865
- custom,
3866
- Schema: ZodType,
3867
- ZodSchema: ZodType,
3868
- late,
3869
- get ZodFirstPartyTypeKind() {
3870
- return ZodFirstPartyTypeKind;
3871
- },
3872
- coerce,
3873
- any: anyType,
3874
- array: arrayType,
3875
- bigint: bigIntType,
3876
- boolean: booleanType,
3877
- date: dateType,
3878
- discriminatedUnion: discriminatedUnionType,
3879
- effect: effectsType,
3880
- "enum": enumType,
3881
- "function": functionType,
3882
- "instanceof": instanceOfType,
3883
- intersection: intersectionType,
3884
- lazy: lazyType,
3885
- literal: literalType,
3886
- map: mapType,
3887
- nan: nanType,
3888
- nativeEnum: nativeEnumType,
3889
- never: neverType,
3890
- "null": nullType,
3891
- nullable: nullableType,
3892
- number: numberType,
3893
- object: objectType,
3894
- oboolean,
3895
- onumber,
3896
- optional: optionalType,
3897
- ostring,
3898
- pipeline: pipelineType,
3899
- preprocess: preprocessType,
3900
- promise: promiseType,
3901
- record: recordType,
3902
- set: setType,
3903
- strictObject: strictObjectType,
3904
- string: stringType,
3905
- symbol: symbolType,
3906
- transformer: effectsType,
3907
- tuple: tupleType,
3908
- "undefined": undefinedType,
3909
- union: unionType,
3910
- unknown: unknownType,
3911
- "void": voidType,
3912
- NEVER,
3913
- ZodIssueCode,
3914
- quotelessJson,
3915
- ZodError
3916
- });
3917
4068
 
3918
4069
  // lib/asstClient.ts
3919
- var baseUrlsSchema = z.object({
3920
- local: z.literal("https://localhost:8443/"),
3921
- test: z.literal(
4070
+ var baseUrlsSchema = external_exports.object({
4071
+ local: external_exports.literal("https://localhost:8443/"),
4072
+ test: external_exports.literal(
3922
4073
  "https://integration.api.spscommerce.com/assortment/gateway/"
3923
4074
  ),
3924
- prod: z.literal("https://api.spscommerce.com/assortment/gateway/")
4075
+ prod: external_exports.literal("https://api.spscommerce.com/assortment/gateway/")
3925
4076
  });
3926
4077
  var BASE_URLS = {
3927
4078
  local: "https://localhost:8443/",
@@ -3985,41 +4136,41 @@ var AsstClient = class {
3985
4136
  };
3986
4137
 
3987
4138
  // lib/imports/models/ImportDetail.ts
3988
- var importDetailSchema = z.object({
3989
- completedAt: z.number().nullish(),
3990
- errorCount: z.number(),
3991
- importId: z.number(),
3992
- name: z.string(),
3993
- startedAt: z.string().nullish(),
3994
- status: z.string(),
3995
- uploadedAt: z.string()
4139
+ var importDetailSchema = external_exports.object({
4140
+ completedAt: external_exports.number().nullish(),
4141
+ errorCount: external_exports.number(),
4142
+ importId: external_exports.number(),
4143
+ name: external_exports.string(),
4144
+ startedAt: external_exports.string().nullish(),
4145
+ status: external_exports.string(),
4146
+ uploadedAt: external_exports.string()
3996
4147
  });
3997
4148
 
3998
4149
  // lib/imports/models/Import.ts
3999
- var importSchema = z.object({
4000
- count: z.number(),
4001
- imports: z.array(importDetailSchema)
4150
+ var importSchema = external_exports.object({
4151
+ count: external_exports.number(),
4152
+ imports: external_exports.array(importDetailSchema)
4002
4153
  });
4003
4154
 
4004
4155
  // lib/imports/models/ImportError.ts
4005
- var importErrorSchema = z.object({
4006
- attribute: z.string().nullish(),
4007
- description: z.string(),
4008
- importErrorId: z.number(),
4009
- row: z.number()
4156
+ var importErrorSchema = external_exports.object({
4157
+ attribute: external_exports.string().nullish(),
4158
+ description: external_exports.string(),
4159
+ importErrorId: external_exports.number(),
4160
+ row: external_exports.number()
4010
4161
  });
4011
4162
 
4012
4163
  // lib/imports/models/ImportErrors.ts
4013
- var importErrorsSchema = z.object({
4014
- count: z.number(),
4015
- errors: z.array(importErrorSchema),
4016
- hasNext: z.boolean(),
4017
- importId: z.number(),
4018
- totalCount: z.number()
4164
+ var importErrorsSchema = external_exports.object({
4165
+ count: external_exports.number(),
4166
+ errors: external_exports.array(importErrorSchema),
4167
+ hasNext: external_exports.boolean(),
4168
+ importId: external_exports.number(),
4169
+ totalCount: external_exports.number()
4019
4170
  });
4020
4171
 
4021
4172
  // lib/imports/models/ImportsStatusEnum.ts
4022
- var importStatusEnumSchema = z.enum([
4173
+ var importStatusEnumSchema = external_exports.enum([
4023
4174
  "QUEUED_FOR_IMPORT",
4024
4175
  "IN_PROGRESS",
4025
4176
  "DOC_FAILED",
@@ -4028,39 +4179,39 @@ var importStatusEnumSchema = z.enum([
4028
4179
  ]);
4029
4180
 
4030
4181
  // lib/imports/models/ImportsStatus.ts
4031
- var importsStatusSchema = z.object({
4032
- completedAt: z.string().nullish(),
4033
- docInEventId: z.string().nullish(),
4034
- errorCount: z.number().nullish(),
4035
- importId: z.number(),
4036
- invalidItemCount: z.number().nullish(),
4037
- name: z.string().nullish(),
4182
+ var importsStatusSchema = external_exports.object({
4183
+ completedAt: external_exports.string().nullish(),
4184
+ docInEventId: external_exports.string().nullish(),
4185
+ errorCount: external_exports.number().nullish(),
4186
+ importId: external_exports.number(),
4187
+ invalidItemCount: external_exports.number().nullish(),
4188
+ name: external_exports.string().nullish(),
4038
4189
  status: importStatusEnumSchema,
4039
- totalItemCount: z.number().nullish(),
4040
- validItemCount: z.number().nullish()
4190
+ totalItemCount: external_exports.number().nullish(),
4191
+ validItemCount: external_exports.number().nullish()
4041
4192
  });
4042
4193
 
4043
4194
  // lib/imports/models/VendorPartnerAttGroups.ts
4044
- var vendorPartnerAttGroupsSchema = z.object({
4045
- partnerCompanyId: z.number(),
4046
- partnerCompanyName: z.string(),
4047
- partnerAttributeGroups: z.array(z.number())
4195
+ var vendorPartnerAttGroupsSchema = external_exports.object({
4196
+ partnerCompanyId: external_exports.number(),
4197
+ partnerCompanyName: external_exports.string(),
4198
+ partnerAttributeGroups: external_exports.array(external_exports.number())
4048
4199
  });
4049
4200
 
4050
4201
  // lib/imports/models/GenerateImportTemplateParams.ts
4051
- var generateImportTemplateParamsSchema = z.object({
4052
- "multi-sheet": z.boolean(),
4053
- gids: z.string().optional(),
4054
- productTypeIds: z.string().optional(),
4055
- groupTypeId: z.number().optional(),
4056
- includeGuides: z.boolean().optional()
4202
+ var generateImportTemplateParamsSchema = external_exports.object({
4203
+ "multi-sheet": external_exports.boolean(),
4204
+ gids: external_exports.string().optional(),
4205
+ productTypeIds: external_exports.string().optional(),
4206
+ groupTypeId: external_exports.number().optional(),
4207
+ includeGuides: external_exports.boolean().optional()
4057
4208
  });
4058
4209
 
4059
4210
  // lib/exports/models/ExportType.ts
4060
- var exportTypeEnum = z.enum(["ALL", "UPDATES", "DELTAS_UPDATE", "NO_BUYER_PART_NUMBER"]);
4211
+ var exportTypeEnum = external_exports.enum(["ALL", "UPDATES", "DELTAS_UPDATE", "NO_BUYER_PART_NUMBER"]);
4061
4212
 
4062
4213
  // lib/exports/models/ExportFrequency.ts
4063
- var exportFrequencyEnum = z.enum([
4214
+ var exportFrequencyEnum = external_exports.enum([
4064
4215
  "IMMEDIATE",
4065
4216
  "ONETIME",
4066
4217
  "DAILY",
@@ -4069,7 +4220,7 @@ var exportFrequencyEnum = z.enum([
4069
4220
  ]);
4070
4221
 
4071
4222
  // lib/exports/models/ExportDayOfWeek.ts
4072
- var exportDayOfWeekEnum = z.enum([
4223
+ var exportDayOfWeekEnum = external_exports.enum([
4073
4224
  "MON",
4074
4225
  "TUE",
4075
4226
  "WED",
@@ -4080,118 +4231,118 @@ var exportDayOfWeekEnum = z.enum([
4080
4231
  ]);
4081
4232
 
4082
4233
  // lib/exports/models/Export.ts
4083
- var exportSchema = z.object({
4084
- exportName: z.string(),
4085
- exportDescription: z.string(),
4086
- isActive: z.boolean(),
4234
+ var exportSchema = external_exports.object({
4235
+ exportName: external_exports.string(),
4236
+ exportDescription: external_exports.string(),
4237
+ isActive: external_exports.boolean(),
4087
4238
  exportType: exportTypeEnum,
4088
4239
  exportFrequency: exportFrequencyEnum,
4089
- includeValidAttributes: z.optional(z.boolean()),
4090
- dayOfMonth: z.optional(z.number()),
4091
- dayOfWeek: z.optional(exportDayOfWeekEnum),
4092
- hourOfDay: z.optional(z.number()),
4093
- date: z.optional(z.string()),
4094
- catalogIds: z.optional(z.array(z.number())),
4095
- itemInfoIds: z.optional(z.array(z.number())),
4096
- excludeItemInfoIds: z.optional(z.array(z.number())),
4097
- selectionCodeIds: z.optional(z.array(z.number())),
4098
- productCodeIds: z.optional(z.array(z.number())),
4099
- productTypes: z.optional(z.array(z.string())),
4100
- deliveryType: z.optional(z.string()),
4101
- spreadsheetTemplateId: z.optional(z.number()),
4102
- emailAddresses: z.optional(z.array(z.string())),
4103
- subjectLine: z.optional(z.string()),
4104
- additionalLocales: z.optional(z.array(z.string())),
4105
- availableAttributeList: z.optional(z.array(z.string()))
4240
+ includeValidAttributes: external_exports.optional(external_exports.boolean()),
4241
+ dayOfMonth: external_exports.optional(external_exports.number()),
4242
+ dayOfWeek: external_exports.optional(exportDayOfWeekEnum),
4243
+ hourOfDay: external_exports.optional(external_exports.number()),
4244
+ date: external_exports.optional(external_exports.string()),
4245
+ catalogIds: external_exports.optional(external_exports.array(external_exports.number())),
4246
+ itemInfoIds: external_exports.optional(external_exports.array(external_exports.number())),
4247
+ excludeItemInfoIds: external_exports.optional(external_exports.array(external_exports.number())),
4248
+ selectionCodeIds: external_exports.optional(external_exports.array(external_exports.number())),
4249
+ productCodeIds: external_exports.optional(external_exports.array(external_exports.number())),
4250
+ productTypes: external_exports.optional(external_exports.array(external_exports.string())),
4251
+ deliveryType: external_exports.optional(external_exports.string()),
4252
+ spreadsheetTemplateId: external_exports.optional(external_exports.number()),
4253
+ emailAddresses: external_exports.optional(external_exports.array(external_exports.string())),
4254
+ subjectLine: external_exports.optional(external_exports.string()),
4255
+ additionalLocales: external_exports.optional(external_exports.array(external_exports.string())),
4256
+ availableAttributeList: external_exports.optional(external_exports.array(external_exports.string()))
4106
4257
  });
4107
4258
 
4108
4259
  // lib/exports/models/DownloadItemsParams.ts
4109
- var downLoadItemsParamsSchema = z.object({
4110
- "multi-sheet": z.boolean(),
4111
- ids: z.array(z.string())
4260
+ var downLoadItemsParamsSchema = external_exports.object({
4261
+ "multi-sheet": external_exports.boolean(),
4262
+ ids: external_exports.array(external_exports.string())
4112
4263
  });
4113
4264
 
4114
4265
  // lib/categories/models/ItemCategory.ts
4115
- var itemCategorySchema = z.object({
4116
- categoryid: z.number(),
4117
- encodedCategoryId: z.string(),
4118
- companyId: z.number(),
4119
- name: z.string(),
4120
- isActive: z.number(),
4121
- createdDate: z.number().nullish(),
4122
- categorytimestamp: z.number().nullish(),
4123
- typeId: z.number(),
4124
- type: z.string(),
4125
- categorykey: z.string().nullish(),
4126
- description: z.string().nullish(),
4127
- categoryCatalogName: z.string().nullish()
4266
+ var itemCategorySchema = external_exports.object({
4267
+ categoryid: external_exports.number(),
4268
+ encodedCategoryId: external_exports.string(),
4269
+ companyId: external_exports.number(),
4270
+ name: external_exports.string(),
4271
+ isActive: external_exports.number(),
4272
+ createdDate: external_exports.number().nullish(),
4273
+ categorytimestamp: external_exports.number().nullish(),
4274
+ typeId: external_exports.number(),
4275
+ type: external_exports.string(),
4276
+ categorykey: external_exports.string().nullish(),
4277
+ description: external_exports.string().nullish(),
4278
+ categoryCatalogName: external_exports.string().nullish()
4128
4279
  });
4129
4280
 
4130
4281
  // lib/categories/models/ItemCategoriesSearch.ts
4131
- var itemCategoriesSearchSchema = z.object({
4132
- count: z.number(),
4133
- data: z.array(itemCategorySchema)
4282
+ var itemCategoriesSearchSchema = external_exports.object({
4283
+ count: external_exports.number(),
4284
+ data: external_exports.array(itemCategorySchema)
4134
4285
  });
4135
4286
 
4136
4287
  // lib/categories/models/ItemHierarchyResponse.ts
4137
- var baseHierarchySchema = z.object({
4138
- id: z.string(),
4139
- name: z.string().nullish(),
4140
- description: z.string().nullish(),
4141
- type: z.string().nullish()
4288
+ var baseHierarchySchema = external_exports.object({
4289
+ id: external_exports.string(),
4290
+ name: external_exports.string().nullish(),
4291
+ description: external_exports.string().nullish(),
4292
+ type: external_exports.string().nullish()
4142
4293
  });
4143
4294
  var hierarchySchema = baseHierarchySchema.extend({
4144
- child: z.lazy(() => hierarchySchema).nullable()
4295
+ child: external_exports.lazy(() => hierarchySchema).nullable()
4145
4296
  });
4146
- var itemHierarchyResponseSchema = z.object({
4147
- itemHierarchies: z.array(
4148
- z.object({
4149
- itemId: z.string(),
4150
- hierarchies: z.array(hierarchySchema)
4297
+ var itemHierarchyResponseSchema = external_exports.object({
4298
+ itemHierarchies: external_exports.array(
4299
+ external_exports.object({
4300
+ itemId: external_exports.string(),
4301
+ hierarchies: external_exports.array(hierarchySchema)
4151
4302
  })
4152
4303
  )
4153
4304
  });
4154
4305
 
4155
4306
  // lib/attributes/models/AttributeMetaData.ts
4156
- var attributeMetaDataSchema = z.object({
4157
- dbName: z.string(),
4158
- label: z.string(),
4159
- group: z.string(),
4160
- aliases: z.array(z.string()),
4161
- orderBy: z.string().or(z.number()),
4162
- type: z.string(),
4163
- storageType: z.string(),
4164
- rsxPath: z.string(),
4165
- indexed: z.boolean(),
4166
- repeatable: z.boolean(),
4167
- extended: z.boolean(),
4168
- hybrid: z.boolean(),
4169
- userVisible: z.boolean(),
4170
- retailerOwnedId: z.number().nullish()
4307
+ var attributeMetaDataSchema = external_exports.object({
4308
+ dbName: external_exports.string(),
4309
+ label: external_exports.string(),
4310
+ group: external_exports.string(),
4311
+ aliases: external_exports.array(external_exports.string()),
4312
+ orderBy: external_exports.string().or(external_exports.number()),
4313
+ type: external_exports.string(),
4314
+ storageType: external_exports.string(),
4315
+ rsxPath: external_exports.string(),
4316
+ indexed: external_exports.boolean(),
4317
+ repeatable: external_exports.boolean(),
4318
+ extended: external_exports.boolean(),
4319
+ hybrid: external_exports.boolean(),
4320
+ userVisible: external_exports.boolean(),
4321
+ retailerOwnedId: external_exports.number().nullish()
4171
4322
  });
4172
4323
 
4173
4324
  // lib/attributes/models/AttributeSummary.ts
4174
- var attributeSummarySchema = z.object({
4175
- attributeId: z.number(),
4176
- attributeName: z.string(),
4177
- displayName: z.string(),
4178
- modifiedBy: z.string(),
4179
- modifiedDate: z.number(),
4180
- retailerOwnedId: z.number().nullish(),
4181
- clusterAttrGroupId: z.number().nullish(),
4182
- attributeType: z.string()
4325
+ var attributeSummarySchema = external_exports.object({
4326
+ attributeId: external_exports.number(),
4327
+ attributeName: external_exports.string(),
4328
+ displayName: external_exports.string(),
4329
+ modifiedBy: external_exports.string(),
4330
+ modifiedDate: external_exports.number(),
4331
+ retailerOwnedId: external_exports.number().nullish(),
4332
+ clusterAttrGroupId: external_exports.number().nullish(),
4333
+ attributeType: external_exports.string()
4183
4334
  });
4184
4335
 
4185
4336
  // lib/attributes/models/AttributesByCompany.ts
4186
- var attributesByCompanySchema = z.object({
4187
- next: z.string().nullish(),
4188
- previous: z.string().nullish(),
4189
- count: z.number(),
4190
- results: z.array(attributeSummarySchema)
4337
+ var attributesByCompanySchema = external_exports.object({
4338
+ next: external_exports.string().nullish(),
4339
+ previous: external_exports.string().nullish(),
4340
+ count: external_exports.number(),
4341
+ results: external_exports.array(attributeSummarySchema)
4191
4342
  });
4192
4343
 
4193
4344
  // lib/attributes/models/AttrDatatypeNameEnum.ts
4194
- var attrDatatypeNameEnumSchema = z.enum([
4345
+ var attrDatatypeNameEnumSchema = external_exports.enum([
4195
4346
  "TEXT",
4196
4347
  "SET",
4197
4348
  "INTEGER",
@@ -4204,126 +4355,126 @@ var attrDatatypeNameEnumSchema = z.enum([
4204
4355
  ]);
4205
4356
 
4206
4357
  // lib/attributes/models/AttributeGroup.ts
4207
- var attributeGroupSchema = z.object({
4208
- attrGroupId: z.number(),
4209
- attrGroupType: z.object({
4210
- attrGroupTypeId: z.number(),
4211
- groupTypeName: z.string(),
4212
- primary: z.boolean(),
4213
- restricted: z.boolean()
4358
+ var attributeGroupSchema = external_exports.object({
4359
+ attrGroupId: external_exports.number(),
4360
+ attrGroupType: external_exports.object({
4361
+ attrGroupTypeId: external_exports.number(),
4362
+ groupTypeName: external_exports.string(),
4363
+ primary: external_exports.boolean(),
4364
+ restricted: external_exports.boolean()
4214
4365
  }),
4215
- attrGroupTypeId: z.number(),
4216
- groupName: z.string(),
4217
- isDefault: z.boolean(),
4218
- orderWeight: z.number(),
4219
- primary: z.boolean()
4366
+ attrGroupTypeId: external_exports.number(),
4367
+ groupName: external_exports.string(),
4368
+ isDefault: external_exports.boolean(),
4369
+ orderWeight: external_exports.number(),
4370
+ primary: external_exports.boolean()
4220
4371
  });
4221
4372
 
4222
4373
  // lib/attributes/models/AttributeDefinition.ts
4223
- var parentAttributeSchema = z.object({
4224
- attrDataTypeId: z.number(),
4225
- attrDatatype: z.object({
4226
- attrDatatypeId: z.number(),
4374
+ var parentAttributeSchema = external_exports.object({
4375
+ attrDataTypeId: external_exports.number(),
4376
+ attrDatatype: external_exports.object({
4377
+ attrDatatypeId: external_exports.number(),
4227
4378
  datatypeName: attrDatatypeNameEnumSchema,
4228
- displayOnly: z.boolean()
4379
+ displayOnly: external_exports.boolean()
4229
4380
  }),
4230
- attrGroupId: z.number(),
4231
- attrGroups: z.array(attributeGroupSchema),
4232
- attrRoundId: z.number(),
4233
- attrStorageId: z.number(),
4234
- attributeId: z.number(),
4235
- attributeName: z.string(),
4236
- createdBy: z.string(),
4237
- createdDate: z.number(),
4238
- description: z.string().optional(),
4239
- displayName: z.string(),
4240
- modifiedDate: z.number(),
4241
- orderWeight: z.number(),
4242
- parentAttributeId: z.number().optional(),
4381
+ attrGroupId: external_exports.number(),
4382
+ attrGroups: external_exports.array(attributeGroupSchema),
4383
+ attrRoundId: external_exports.number(),
4384
+ attrStorageId: external_exports.number(),
4385
+ attributeId: external_exports.number(),
4386
+ attributeName: external_exports.string(),
4387
+ createdBy: external_exports.string(),
4388
+ createdDate: external_exports.number(),
4389
+ description: external_exports.string().optional(),
4390
+ displayName: external_exports.string(),
4391
+ modifiedDate: external_exports.number(),
4392
+ orderWeight: external_exports.number(),
4393
+ parentAttributeId: external_exports.number().optional(),
4243
4394
  primaryAttrGroup: attributeGroupSchema
4244
4395
  });
4245
- var attributeDefinitionSchema = z.object({
4246
- attrDataTypeId: z.number(),
4247
- attrDatatype: z.object({
4248
- attrDatatypeId: z.number(),
4396
+ var attributeDefinitionSchema = external_exports.object({
4397
+ attrDataTypeId: external_exports.number(),
4398
+ attrDatatype: external_exports.object({
4399
+ attrDatatypeId: external_exports.number(),
4249
4400
  datatypeName: attrDatatypeNameEnumSchema,
4250
- displayOnly: z.boolean()
4401
+ displayOnly: external_exports.boolean()
4251
4402
  }),
4252
- attrGroupId: z.number(),
4253
- attrGroups: z.array(attributeGroupSchema),
4254
- attrRestrictions: z.array(
4255
- z.object({
4256
- attrRestrictId: z.number(),
4257
- ignoreGlobal: z.boolean().optional(),
4258
- isDefault: z.boolean(),
4259
- isEssential: z.boolean(),
4260
- locale: z.string(),
4261
- mandatory: z.boolean(),
4262
- repeatable: z.boolean(),
4263
- minLength: z.number().optional(),
4264
- maxLength: z.number().optional()
4403
+ attrGroupId: external_exports.number(),
4404
+ attrGroups: external_exports.array(attributeGroupSchema),
4405
+ attrRestrictions: external_exports.array(
4406
+ external_exports.object({
4407
+ attrRestrictId: external_exports.number(),
4408
+ ignoreGlobal: external_exports.boolean().optional(),
4409
+ isDefault: external_exports.boolean(),
4410
+ isEssential: external_exports.boolean(),
4411
+ locale: external_exports.string(),
4412
+ mandatory: external_exports.boolean(),
4413
+ repeatable: external_exports.boolean(),
4414
+ minLength: external_exports.number().optional(),
4415
+ maxLength: external_exports.number().optional()
4265
4416
  })
4266
4417
  ).optional(),
4267
- attrRoundId: z.number(),
4268
- attrStorage: z.object({
4269
- attrStorageId: z.number(),
4270
- storageName: z.string()
4418
+ attrRoundId: external_exports.number(),
4419
+ attrStorage: external_exports.object({
4420
+ attrStorageId: external_exports.number(),
4421
+ storageName: external_exports.string()
4271
4422
  }),
4272
- attrStorageId: z.number(),
4273
- attrValues: z.array(
4274
- z.object({
4275
- attrKeyPair: z.string(),
4276
- attrValueId: z.number().optional(),
4277
- isDefault: z.boolean(),
4278
- locale: z.string(),
4279
- value: z.string()
4423
+ attrStorageId: external_exports.number(),
4424
+ attrValues: external_exports.array(
4425
+ external_exports.object({
4426
+ attrKeyPair: external_exports.string(),
4427
+ attrValueId: external_exports.number().optional(),
4428
+ isDefault: external_exports.boolean(),
4429
+ locale: external_exports.string(),
4430
+ value: external_exports.string()
4280
4431
  })
4281
4432
  ).optional(),
4282
- attributeId: z.number(),
4283
- attributeName: z.string(),
4284
- createdBy: z.string(),
4285
- createdDate: z.number(),
4286
- description: z.string().optional(),
4287
- displayName: z.string(),
4288
- modifiedDate: z.number(),
4289
- orderWeight: z.number().optional(),
4433
+ attributeId: external_exports.number(),
4434
+ attributeName: external_exports.string(),
4435
+ createdBy: external_exports.string(),
4436
+ createdDate: external_exports.number(),
4437
+ description: external_exports.string().optional(),
4438
+ displayName: external_exports.string(),
4439
+ modifiedDate: external_exports.number(),
4440
+ orderWeight: external_exports.number().optional(),
4290
4441
  parentAttribute: parentAttributeSchema.optional(),
4291
- parentAttributeId: z.number().optional(),
4442
+ parentAttributeId: external_exports.number().optional(),
4292
4443
  primaryAttrGroup: attributeGroupSchema
4293
4444
  });
4294
4445
 
4295
4446
  // lib/attributes/models/AttributeValidValues.ts
4296
- var attributeValidValuesSchema = z.object({
4297
- value: z.string(),
4298
- isDefault: z.boolean(),
4299
- locale: z.string(),
4300
- createdBy: z.string(),
4301
- createdDate: z.number(),
4302
- modifiedDate: z.number(),
4303
- modifiedBy: z.string(),
4304
- attributeId: z.number(),
4305
- attrValueId: z.number(),
4306
- attrKeyPair: z.string()
4447
+ var attributeValidValuesSchema = external_exports.object({
4448
+ value: external_exports.string(),
4449
+ isDefault: external_exports.boolean(),
4450
+ locale: external_exports.string(),
4451
+ createdBy: external_exports.string(),
4452
+ createdDate: external_exports.number(),
4453
+ modifiedDate: external_exports.number(),
4454
+ modifiedBy: external_exports.string(),
4455
+ attributeId: external_exports.number(),
4456
+ attrValueId: external_exports.number(),
4457
+ attrKeyPair: external_exports.string()
4307
4458
  });
4308
4459
 
4309
4460
  // lib/items/v1/models/ItemHeader.ts
4310
- var itemHeaderSchema = z.object({
4311
- status: z.string().optional(),
4312
- catalogName: z.string(),
4313
- productCodeName: z.string(),
4314
- selectionCodeName: z.string(),
4315
- gtin: z.string(),
4316
- upc: z.string(),
4317
- ean: z.string(),
4318
- isbn: z.string(),
4319
- partNumber: z.string(),
4320
- lastUpdatedDateString: z.string(),
4321
- companyId: z.string(),
4322
- itemInfoId: z.string()
4461
+ var itemHeaderSchema = external_exports.object({
4462
+ status: external_exports.string().optional(),
4463
+ catalogName: external_exports.string(),
4464
+ productCodeName: external_exports.string(),
4465
+ selectionCodeName: external_exports.string(),
4466
+ gtin: external_exports.string(),
4467
+ upc: external_exports.string(),
4468
+ ean: external_exports.string(),
4469
+ isbn: external_exports.string(),
4470
+ partNumber: external_exports.string(),
4471
+ lastUpdatedDateString: external_exports.string(),
4472
+ companyId: external_exports.string(),
4473
+ itemInfoId: external_exports.string()
4323
4474
  });
4324
4475
 
4325
4476
  // lib/items/v1/models/PhaseEnum.ts
4326
- var phaseEnumSchema = z.enum([
4477
+ var phaseEnumSchema = external_exports.enum([
4327
4478
  "CORE",
4328
4479
  "CORE_PLUS",
4329
4480
  "CORE_ADVANCED",
@@ -4332,61 +4483,61 @@ var phaseEnumSchema = z.enum([
4332
4483
  ]);
4333
4484
 
4334
4485
  // lib/items/v1/models/TradingPartnerStage.ts
4335
- var tradingPartnerStageSchema = z.object({
4336
- companyId: z.number(),
4337
- companyName: z.string(),
4338
- stage: z.nullable(phaseEnumSchema),
4339
- isValid: z.boolean()
4486
+ var tradingPartnerStageSchema = external_exports.object({
4487
+ companyId: external_exports.number(),
4488
+ companyName: external_exports.string(),
4489
+ stage: external_exports.nullable(phaseEnumSchema),
4490
+ isValid: external_exports.boolean()
4340
4491
  });
4341
4492
 
4342
4493
  // lib/items/v1/models/ItemMap.ts
4343
- var itemMapSchema = z.object({
4344
- rn: z.number().optional(),
4345
- iteminfoid: z.string(),
4346
- tradingPartnerStages: z.array(tradingPartnerStageSchema).optional(),
4347
- gtin: z.string().nullish(),
4348
- catalogname: z.string().nullish(),
4349
- isbn: z.string().nullish(),
4350
- lastupdateddatestring: z.string().nullish(),
4351
- upc: z.string().nullish(),
4352
- productcodename: z.string().nullish(),
4353
- ean: z.string().nullish(),
4354
- selectioncodename: z.string().nullish(),
4355
- createddatestring: z.string().nullish(),
4356
- partnumber: z.string().nullish(),
4357
- consumeravailabledatestring: z.string().nullish(),
4358
- status: z.string().nullish(),
4359
- nrfcolorcode: z.array(z.string()).nullish(),
4360
- nrfsizecode: z.array(z.string()).nullish(),
4361
- productcolordescription: z.array(z.string()).nullish(),
4362
- productsizedescription: z.array(z.string()).nullish()
4494
+ var itemMapSchema = external_exports.object({
4495
+ rn: external_exports.number().optional(),
4496
+ iteminfoid: external_exports.string(),
4497
+ tradingPartnerStages: external_exports.array(tradingPartnerStageSchema).optional(),
4498
+ gtin: external_exports.string().nullish(),
4499
+ catalogname: external_exports.string().nullish(),
4500
+ isbn: external_exports.string().nullish(),
4501
+ lastupdateddatestring: external_exports.string().nullish(),
4502
+ upc: external_exports.string().nullish(),
4503
+ productcodename: external_exports.string().nullish(),
4504
+ ean: external_exports.string().nullish(),
4505
+ selectioncodename: external_exports.string().nullish(),
4506
+ createddatestring: external_exports.string().nullish(),
4507
+ partnumber: external_exports.string().nullish(),
4508
+ consumeravailabledatestring: external_exports.string().nullish(),
4509
+ status: external_exports.string().nullish(),
4510
+ nrfcolorcode: external_exports.array(external_exports.string()).nullish(),
4511
+ nrfsizecode: external_exports.array(external_exports.string()).nullish(),
4512
+ productcolordescription: external_exports.array(external_exports.string()).nullish(),
4513
+ productsizedescription: external_exports.array(external_exports.string()).nullish()
4363
4514
  }).passthrough();
4364
4515
 
4365
4516
  // lib/items/v1/models/ItemTable.ts
4366
- var itemTableSchema = z.object({
4517
+ var itemTableSchema = external_exports.object({
4367
4518
  headers: itemHeaderSchema,
4368
- itemMaps: z.array(itemMapSchema)
4519
+ itemMaps: external_exports.array(itemMapSchema)
4369
4520
  });
4370
4521
 
4371
4522
  // lib/items/v1/models/ItemSearchView.ts
4372
- var itemSearchViewSchema = z.object({
4523
+ var itemSearchViewSchema = external_exports.object({
4373
4524
  itemTable: itemTableSchema,
4374
- hasNext: z.boolean(),
4375
- count: z.number()
4525
+ hasNext: external_exports.boolean(),
4526
+ count: external_exports.number()
4376
4527
  });
4377
4528
 
4378
4529
  // lib/items/v1/models/AttributeDetail.ts
4379
- var attributeDetailSchema = z.object({
4530
+ var attributeDetailSchema = external_exports.object({
4380
4531
  type: attrDatatypeNameEnumSchema,
4381
- name: z.string(),
4382
- value: z.string().or(z.number()).or(z.array(z.string())).or(z.array(z.number())).nullable(),
4383
- label: z.string(),
4384
- group: z.string(),
4385
- orderBy: z.number().or(z.string()).nullish()
4532
+ name: external_exports.string(),
4533
+ value: external_exports.string().or(external_exports.number()).or(external_exports.array(external_exports.string())).or(external_exports.array(external_exports.number())).nullable(),
4534
+ label: external_exports.string(),
4535
+ group: external_exports.string(),
4536
+ orderBy: external_exports.number().or(external_exports.string()).nullish()
4386
4537
  });
4387
4538
 
4388
4539
  // lib/items/v1/models/CategoryEnum.ts
4389
- var categoryEnumSchema = z.enum([
4540
+ var categoryEnumSchema = external_exports.enum([
4390
4541
  "ALIAS",
4391
4542
  "CATALOG",
4392
4543
  "EXPORT",
@@ -4399,421 +4550,421 @@ var categoryEnumSchema = z.enum([
4399
4550
  ]);
4400
4551
 
4401
4552
  // lib/items/v1/models/ComponentDetails.ts
4402
- var componentDetailsSchema = z.object({
4403
- itemInfoId: z.number(),
4404
- description: z.string().nullish(),
4405
- saleable: z.boolean(),
4406
- valid: z.boolean(),
4407
- uniqueCriteria: z.array(
4408
- z.object({
4409
- name: z.string(),
4410
- value: z.string()
4553
+ var componentDetailsSchema = external_exports.object({
4554
+ itemInfoId: external_exports.number(),
4555
+ description: external_exports.string().nullish(),
4556
+ saleable: external_exports.boolean(),
4557
+ valid: external_exports.boolean(),
4558
+ uniqueCriteria: external_exports.array(
4559
+ external_exports.object({
4560
+ name: external_exports.string(),
4561
+ value: external_exports.string()
4411
4562
  })
4412
4563
  )
4413
4564
  });
4414
4565
 
4415
4566
  // lib/items/v1/models/RepeatableGroup.ts
4416
- var repeatableGroupSchema = z.object({
4417
- repeatableGroupId: z.string(),
4418
- repeatableNumber: z.number()
4567
+ var repeatableGroupSchema = external_exports.object({
4568
+ repeatableGroupId: external_exports.string(),
4569
+ repeatableNumber: external_exports.number()
4419
4570
  });
4420
4571
 
4421
4572
  // lib/items/v1/models/GroupedAttributeList.ts
4422
- var groupedAttributeListSchema = z.object({
4423
- type: z.string(),
4424
- rows: z.array(z.array(attributeDetailSchema)),
4425
- repeatableGroups: z.array(repeatableGroupSchema)
4573
+ var groupedAttributeListSchema = external_exports.object({
4574
+ type: external_exports.string(),
4575
+ rows: external_exports.array(external_exports.array(attributeDetailSchema)),
4576
+ repeatableGroups: external_exports.array(repeatableGroupSchema)
4426
4577
  });
4427
4578
 
4428
4579
  // lib/items/v1/models/GroupedAttributes.ts
4429
- var groupedAttributesSchema = z.object({
4430
- type: z.string(),
4431
- attributes: z.array(attributeDetailSchema),
4432
- attributeGroups: z.array(groupedAttributeListSchema)
4580
+ var groupedAttributesSchema = external_exports.object({
4581
+ type: external_exports.string(),
4582
+ attributes: external_exports.array(attributeDetailSchema),
4583
+ attributeGroups: external_exports.array(groupedAttributeListSchema)
4433
4584
  });
4434
4585
 
4435
4586
  // lib/items/v1/models/HierarchyCategory.ts
4436
- var hierarchyCategorySchema = z.object({
4437
- name: z.string(),
4438
- description: z.string().nullish(),
4439
- id: z.number(),
4440
- companyId: z.number().nullish(),
4587
+ var hierarchyCategorySchema = external_exports.object({
4588
+ name: external_exports.string(),
4589
+ description: external_exports.string().nullish(),
4590
+ id: external_exports.number(),
4591
+ companyId: external_exports.number().nullish(),
4441
4592
  type: categoryEnumSchema
4442
4593
  });
4443
4594
 
4444
4595
  // lib/items/v1/models/HierarchyDetails.ts
4445
- var hierarchyDetailsSchema = z.object({
4446
- catalogs: z.array(hierarchyCategorySchema),
4447
- selectionCodes: z.array(hierarchyCategorySchema),
4448
- productCodes: z.array(hierarchyCategorySchema)
4596
+ var hierarchyDetailsSchema = external_exports.object({
4597
+ catalogs: external_exports.array(hierarchyCategorySchema),
4598
+ selectionCodes: external_exports.array(hierarchyCategorySchema),
4599
+ productCodes: external_exports.array(hierarchyCategorySchema)
4449
4600
  });
4450
4601
 
4451
4602
  // lib/items/v1/models/PackComponentItemInfo.ts
4452
- var packComponentItemInfoSchema = z.object({
4453
- companyid: z.number(),
4454
- createddate: z.number(),
4455
- isServiceApi: z.boolean(),
4456
- isactive: z.number(),
4457
- isvalid: z.number(),
4458
- itemType: z.string(),
4459
- iteminfoid: z.number(),
4460
- itemtimestamp: z.number(),
4461
- serviceId: z.number(),
4462
- attributes: z.record(z.string(), z.string().or(z.array(z.string())))
4603
+ var packComponentItemInfoSchema = external_exports.object({
4604
+ companyid: external_exports.number(),
4605
+ createddate: external_exports.number(),
4606
+ isServiceApi: external_exports.boolean(),
4607
+ isactive: external_exports.number(),
4608
+ isvalid: external_exports.number(),
4609
+ itemType: external_exports.string(),
4610
+ iteminfoid: external_exports.number(),
4611
+ itemtimestamp: external_exports.number(),
4612
+ serviceId: external_exports.number(),
4613
+ attributes: external_exports.record(external_exports.string(), external_exports.string().or(external_exports.array(external_exports.string())))
4463
4614
  });
4464
4615
 
4465
4616
  // lib/items/v1/models/ItemPrice.ts
4466
- var itemPriceSchema = z.object({
4467
- amount: z.number(),
4468
- currency: z.string(),
4469
- id: z.number().nullish(),
4470
- priceDivision: z.string().nullish(),
4471
- iteminfoid: z.number().nullish(),
4472
- startdate: z.string().nullish(),
4473
- enddate: z.string().nullish(),
4474
- qualifier: z.string(),
4475
- region: z.string().nullish(),
4476
- regionqualifier: z.string().nullish(),
4477
- regiondescription: z.string().nullish(),
4478
- partnercompanyid: z.string().nullish(),
4479
- itempricetimestamp: z.number().nullish(),
4480
- range_type: z.string().nullish(),
4481
- date_range_type: z.string().nullish(),
4482
- min_range: z.number().nullish(),
4483
- gtin: z.string().nullish(),
4484
- priceConditionDescription: z.string().nullish(),
4485
- priceUnitQuantity: z.number().nullish(),
4486
- priceUnitQuantityUOM: z.string().nullish()
4617
+ var itemPriceSchema = external_exports.object({
4618
+ amount: external_exports.number(),
4619
+ currency: external_exports.string(),
4620
+ id: external_exports.number().nullish(),
4621
+ priceDivision: external_exports.string().nullish(),
4622
+ iteminfoid: external_exports.number().nullish(),
4623
+ startdate: external_exports.string().nullish(),
4624
+ enddate: external_exports.string().nullish(),
4625
+ qualifier: external_exports.string(),
4626
+ region: external_exports.string().nullish(),
4627
+ regionqualifier: external_exports.string().nullish(),
4628
+ regiondescription: external_exports.string().nullish(),
4629
+ partnercompanyid: external_exports.string().nullish(),
4630
+ itempricetimestamp: external_exports.number().nullish(),
4631
+ range_type: external_exports.string().nullish(),
4632
+ date_range_type: external_exports.string().nullish(),
4633
+ min_range: external_exports.number().nullish(),
4634
+ gtin: external_exports.string().nullish(),
4635
+ priceConditionDescription: external_exports.string().nullish(),
4636
+ priceUnitQuantity: external_exports.number().nullish(),
4637
+ priceUnitQuantityUOM: external_exports.string().nullish()
4487
4638
  });
4488
4639
 
4489
4640
  // lib/items/v1/models/PackComponentDetails.ts
4490
- var packComponentDetailsSchema = z.object({
4641
+ var packComponentDetailsSchema = external_exports.object({
4491
4642
  itemInfo: packComponentItemInfoSchema,
4492
- itemPrices: z.array(itemPriceSchema)
4643
+ itemPrices: external_exports.array(itemPriceSchema)
4493
4644
  });
4494
4645
 
4495
4646
  // lib/items/v1/models/GroupedItem.ts
4496
- var groupedItemSchema = z.object({
4497
- iteminfoid: z.number(),
4498
- companyid: z.number(),
4499
- status: z.string(),
4500
- createdDate: z.string(),
4501
- lastUpdatedDate: z.string(),
4502
- identifiers: z.record(z.string(), z.any()),
4647
+ var groupedItemSchema = external_exports.object({
4648
+ iteminfoid: external_exports.number(),
4649
+ companyid: external_exports.number(),
4650
+ status: external_exports.string(),
4651
+ createdDate: external_exports.string(),
4652
+ lastUpdatedDate: external_exports.string(),
4653
+ identifiers: external_exports.record(external_exports.string(), external_exports.any()),
4503
4654
  hierarchyDetails: hierarchyDetailsSchema,
4504
- groupedAttributes: z.array(groupedAttributesSchema),
4505
- packComponentDetails: z.array(packComponentDetailsSchema),
4506
- childComponentDetails: z.array(componentDetailsSchema),
4507
- parentComponentDetails: z.array(componentDetailsSchema),
4508
- locales: z.array(z.string())
4655
+ groupedAttributes: external_exports.array(groupedAttributesSchema),
4656
+ packComponentDetails: external_exports.array(packComponentDetailsSchema),
4657
+ childComponentDetails: external_exports.array(componentDetailsSchema),
4658
+ parentComponentDetails: external_exports.array(componentDetailsSchema),
4659
+ locales: external_exports.array(external_exports.string())
4509
4660
  });
4510
4661
 
4511
4662
  // lib/items/v1/models/ItemDetailView.ts
4512
- var itemDetailViewSchema = z.object({
4663
+ var itemDetailViewSchema = external_exports.object({
4513
4664
  item: groupedItemSchema
4514
4665
  });
4515
4666
 
4516
4667
  // lib/items/v1/models/Bulb.ts
4517
- var bulbSchema = z.object({
4518
- iteminfoid: z.number(),
4519
- id: z.number(),
4520
- shape: z.string(),
4521
- position: z.number(),
4522
- quantity: z.number(),
4523
- basetype: z.string(),
4524
- maxwatt: z.number(),
4525
- createdat: z.string(),
4526
- modifiedat: z.string(),
4527
- bulbtype: z.string(),
4528
- bulbincluded: z.string(),
4529
- bulbsize: z.string(),
4530
- replacementbulb: z.string(),
4531
- threewaybulb: z.string()
4668
+ var bulbSchema = external_exports.object({
4669
+ iteminfoid: external_exports.number(),
4670
+ id: external_exports.number(),
4671
+ shape: external_exports.string(),
4672
+ position: external_exports.number(),
4673
+ quantity: external_exports.number(),
4674
+ basetype: external_exports.string(),
4675
+ maxwatt: external_exports.number(),
4676
+ createdat: external_exports.string(),
4677
+ modifiedat: external_exports.string(),
4678
+ bulbtype: external_exports.string(),
4679
+ bulbincluded: external_exports.string(),
4680
+ bulbsize: external_exports.string(),
4681
+ replacementbulb: external_exports.string(),
4682
+ threewaybulb: external_exports.string()
4532
4683
  });
4533
4684
 
4534
4685
  // lib/items/v1/models/PackComponent.ts
4535
- var packComponentSchema = z.object({
4536
- itemInfoId: z.number().nullish(),
4537
- attributes: z.record(z.string(), z.string().or(z.array(z.string()))),
4538
- prices: z.array(itemPriceSchema)
4686
+ var packComponentSchema = external_exports.object({
4687
+ itemInfoId: external_exports.number().nullish(),
4688
+ attributes: external_exports.record(external_exports.string(), external_exports.string().or(external_exports.array(external_exports.string()))),
4689
+ prices: external_exports.array(itemPriceSchema)
4539
4690
  });
4540
4691
 
4541
4692
  // lib/items/v1/models/MediaItem.ts
4542
- var mediaItemSchema = z.object({
4543
- id: z.number(),
4544
- iteminfoid: z.number(),
4545
- medianame: z.string(),
4546
- height: z.number().nullish(),
4547
- filename: z.string(),
4548
- mediafilename: z.string().nullish(),
4549
- description: z.string().nullish(),
4550
- filesize: z.number().nullish(),
4551
- format: z.string().nullish(),
4552
- orientation: z.string().nullish(),
4553
- pixeldensity: z.string().nullish(),
4554
- purpose: z.string().nullish(),
4555
- width: z.number().nullish(),
4556
- mediatype: z.string(),
4557
- mediaviewtype: z.string().nullish(),
4558
- compressionquality: z.string().nullish(),
4559
- thumbnailflag: z.string().nullish()
4693
+ var mediaItemSchema = external_exports.object({
4694
+ id: external_exports.number(),
4695
+ iteminfoid: external_exports.number(),
4696
+ medianame: external_exports.string(),
4697
+ height: external_exports.number().nullish(),
4698
+ filename: external_exports.string(),
4699
+ mediafilename: external_exports.string().nullish(),
4700
+ description: external_exports.string().nullish(),
4701
+ filesize: external_exports.number().nullish(),
4702
+ format: external_exports.string().nullish(),
4703
+ orientation: external_exports.string().nullish(),
4704
+ pixeldensity: external_exports.string().nullish(),
4705
+ purpose: external_exports.string().nullish(),
4706
+ width: external_exports.number().nullish(),
4707
+ mediatype: external_exports.string(),
4708
+ mediaviewtype: external_exports.string().nullish(),
4709
+ compressionquality: external_exports.string().nullish(),
4710
+ thumbnailflag: external_exports.string().nullish()
4560
4711
  });
4561
4712
 
4562
4713
  // lib/items/v1/models/ItemDetail.ts
4563
- var itemDetailSchema = z.object({
4564
- attributes: z.record(z.string(), z.any()),
4565
- clusters: z.record(
4566
- z.string(),
4567
- z.array(
4568
- z.object({
4569
- itemInfoAttributes: z.record(
4570
- z.string(),
4571
- z.string().or(z.number()).or(z.boolean())
4714
+ var itemDetailSchema = external_exports.object({
4715
+ attributes: external_exports.record(external_exports.string(), external_exports.any()),
4716
+ clusters: external_exports.record(
4717
+ external_exports.string(),
4718
+ external_exports.array(
4719
+ external_exports.object({
4720
+ itemInfoAttributes: external_exports.record(
4721
+ external_exports.string(),
4722
+ external_exports.string().or(external_exports.number()).or(external_exports.boolean())
4572
4723
  )
4573
4724
  })
4574
4725
  )
4575
4726
  ),
4576
- prices: z.array(itemPriceSchema),
4577
- bulbs: z.array(bulbSchema),
4578
- media: z.array(mediaItemSchema),
4579
- packs: z.array(packComponentSchema)
4727
+ prices: external_exports.array(itemPriceSchema),
4728
+ bulbs: external_exports.array(bulbSchema),
4729
+ media: external_exports.array(mediaItemSchema),
4730
+ packs: external_exports.array(packComponentSchema)
4580
4731
  });
4581
4732
 
4582
4733
  // lib/items/v1/models/SpsItemIdResponse.ts
4583
- var spsItemIdResponseSchema = z.object({
4584
- id: z.string(),
4585
- ref: z.string()
4734
+ var spsItemIdResponseSchema = external_exports.object({
4735
+ id: external_exports.string(),
4736
+ ref: external_exports.string()
4586
4737
  });
4587
4738
 
4588
4739
  // lib/items/v1/models/ItemOrgStatus.ts
4589
- var itemOrgStatusSchema = z.object({
4590
- org: z.object({
4591
- ref: z.string(),
4592
- id: z.string(),
4593
- name: z.string()
4740
+ var itemOrgStatusSchema = external_exports.object({
4741
+ org: external_exports.object({
4742
+ ref: external_exports.string(),
4743
+ id: external_exports.string(),
4744
+ name: external_exports.string()
4594
4745
  }),
4595
4746
  lowestInvalidStage: phaseEnumSchema.nullable(),
4596
- validForRelationship: z.boolean()
4747
+ validForRelationship: external_exports.boolean()
4597
4748
  });
4598
4749
 
4599
4750
  // lib/items/v1/models/ItemStatus.ts
4600
- var itemStatusSchema = z.object({
4601
- itemId: z.string(),
4602
- itemOrgStatuses: z.array(itemOrgStatusSchema)
4751
+ var itemStatusSchema = external_exports.object({
4752
+ itemId: external_exports.string(),
4753
+ itemOrgStatuses: external_exports.array(itemOrgStatusSchema)
4603
4754
  });
4604
4755
 
4605
4756
  // lib/items/v1/models/ItemStatusResponse.ts
4606
- var itemStatusResponseSchema = z.object({
4607
- itemStatuses: z.array(itemStatusSchema)
4757
+ var itemStatusResponseSchema = external_exports.object({
4758
+ itemStatuses: external_exports.array(itemStatusSchema)
4608
4759
  });
4609
4760
 
4610
4761
  // lib/locale/models/Locale.ts
4611
- var localeSchema = z.object({
4612
- localeCode: z.string(),
4613
- localeDescription: z.string()
4762
+ var localeSchema = external_exports.object({
4763
+ localeCode: external_exports.string(),
4764
+ localeDescription: external_exports.string()
4614
4765
  });
4615
4766
 
4616
4767
  // lib/productTypes/models/AttrProdType.ts
4617
- var attrProdTypeSchema = z.object({
4618
- attrProdTypeId: z.number(),
4619
- productType: z.string(),
4620
- description: z.string(),
4621
- createdDate: z.number(),
4622
- createdBy: z.string(),
4623
- modifiedDate: z.number().optional(),
4624
- modifiedBy: z.string().optional(),
4625
- retailerId: z.number().optional()
4768
+ var attrProdTypeSchema = external_exports.object({
4769
+ attrProdTypeId: external_exports.number(),
4770
+ productType: external_exports.string(),
4771
+ description: external_exports.string(),
4772
+ createdDate: external_exports.number(),
4773
+ createdBy: external_exports.string(),
4774
+ modifiedDate: external_exports.number().optional(),
4775
+ modifiedBy: external_exports.string().optional(),
4776
+ retailerId: external_exports.number().optional()
4626
4777
  });
4627
4778
 
4628
4779
  // lib/productTypes/models/PagedResults.ts
4629
4780
  function pagedResultsSchema(resultsType) {
4630
- return z.object({
4631
- next: z.string(),
4632
- previous: z.string(),
4633
- count: z.number(),
4634
- results: z.array(resultsType)
4781
+ return external_exports.object({
4782
+ next: external_exports.string(),
4783
+ previous: external_exports.string(),
4784
+ count: external_exports.number(),
4785
+ results: external_exports.array(resultsType)
4635
4786
  });
4636
4787
  }
4637
4788
 
4638
4789
  // lib/spreadsheetTemplate/models/SpreadsheetTemplateCompany.ts
4639
- var spreadsheetTemplateCompanySchema = z.object({
4640
- companyName: z.string(),
4641
- companyId: z.number(),
4642
- createdAt: z.number()
4790
+ var spreadsheetTemplateCompanySchema = external_exports.object({
4791
+ companyName: external_exports.string(),
4792
+ companyId: external_exports.number(),
4793
+ createdAt: external_exports.number()
4643
4794
  });
4644
4795
 
4645
4796
  // lib/spreadsheetTemplate/models/SpreadsheetTemplate.ts
4646
- var spreadsheetTemplateSchema = z.object({
4647
- id: z.number(),
4648
- fileLocation: z.string(),
4649
- name: z.string(),
4650
- templateType: z.string(),
4651
- maxItemsPerDoc: z.number(),
4652
- companies: z.array(spreadsheetTemplateCompanySchema),
4653
- createdBy: z.string().nullish(),
4654
- createdAt: z.number().nullish(),
4655
- modifiedBy: z.string().nullish(),
4656
- modifiedAt: z.number().nullish()
4797
+ var spreadsheetTemplateSchema = external_exports.object({
4798
+ id: external_exports.number(),
4799
+ fileLocation: external_exports.string(),
4800
+ name: external_exports.string(),
4801
+ templateType: external_exports.string(),
4802
+ maxItemsPerDoc: external_exports.number(),
4803
+ companies: external_exports.array(spreadsheetTemplateCompanySchema),
4804
+ createdBy: external_exports.string().nullish(),
4805
+ createdAt: external_exports.number().nullish(),
4806
+ modifiedBy: external_exports.string().nullish(),
4807
+ modifiedAt: external_exports.number().nullish()
4657
4808
  });
4658
4809
 
4659
4810
  // lib/tradingPartners/models/Connection.ts
4660
- var connectionSchema = z.object({
4661
- catalog_id: z.number(),
4662
- catalog_name: z.string().nullable(),
4663
- partner_company_name: z.string(),
4664
- partner_company_id: z.number(),
4665
- partner_org_id: z.string()
4811
+ var connectionSchema = external_exports.object({
4812
+ catalog_id: external_exports.number(),
4813
+ catalog_name: external_exports.string().nullable(),
4814
+ partner_company_name: external_exports.string(),
4815
+ partner_company_id: external_exports.number(),
4816
+ partner_org_id: external_exports.string()
4666
4817
  });
4667
4818
 
4668
4819
  // lib/tradingPartners/models/CompanyRelationshipUpsertBody.ts
4669
- var companyRelationshipUpsertBodySchema = z.object({
4670
- supplierId: z.number(),
4671
- retailerId: z.number(),
4672
- catalogId: z.number(),
4673
- active: z.boolean(),
4674
- applicationType: z.array(z.enum(["ASSORTMENT", "ITEM-XREF"])).default([])
4820
+ var companyRelationshipUpsertBodySchema = external_exports.object({
4821
+ supplierId: external_exports.number(),
4822
+ retailerId: external_exports.number(),
4823
+ catalogId: external_exports.number(),
4824
+ active: external_exports.boolean(),
4825
+ applicationType: external_exports.array(external_exports.enum(["ASSORTMENT", "ITEM-XREF", "TEST-ORDER-GENERATOR"])).default([])
4675
4826
  });
4676
4827
 
4677
4828
  // lib/tradingPartners/models/ItemPartner.ts
4678
- var itemPartnerSchema = z.object({
4679
- itemPartnerId: z.number(),
4680
- retailerId: z.number(),
4681
- supplierId: z.number(),
4682
- catalogId: z.number(),
4683
- isActive: z.number(),
4684
- createdDate: z.string(),
4685
- modifiedDate: z.string(),
4686
- applications: z.array(z.enum(["ASSORTMENT", "ITEM-XREF"]))
4829
+ var itemPartnerSchema = external_exports.object({
4830
+ itemPartnerId: external_exports.number(),
4831
+ retailerId: external_exports.number(),
4832
+ supplierId: external_exports.number(),
4833
+ catalogId: external_exports.number(),
4834
+ isActive: external_exports.number(),
4835
+ createdDate: external_exports.string(),
4836
+ modifiedDate: external_exports.string(),
4837
+ applications: external_exports.array(external_exports.enum(["ASSORTMENT", "ITEM-XREF"]))
4687
4838
  });
4688
4839
 
4689
4840
  // lib/tradingPartners/models/TradingPartnerAccessByCompanyId.ts
4690
- var tradingPartnerAccessByCompanyIdSchema = z.object({
4691
- companyId: z.number(),
4692
- companyType: z.string(),
4693
- identityOrgId: z.string(),
4694
- companyName: z.string(),
4695
- count: z.number(),
4696
- connections: z.array(connectionSchema)
4841
+ var tradingPartnerAccessByCompanyIdSchema = external_exports.object({
4842
+ companyId: external_exports.number(),
4843
+ companyType: external_exports.string(),
4844
+ identityOrgId: external_exports.string(),
4845
+ companyName: external_exports.string(),
4846
+ count: external_exports.number(),
4847
+ connections: external_exports.array(connectionSchema)
4697
4848
  });
4698
4849
 
4699
4850
  // lib/whoami/models/IdentityServiceDatetimePreferences.ts
4700
- var identityServiceDatetimePreferencesSchema = z.object({
4701
- DATE_TIME: z.string(),
4702
- TIME: z.string(),
4703
- SHORT_DATE: z.string(),
4704
- LONG_DATETIME: z.string(),
4705
- LONG_TIME: z.string(),
4706
- DATE: z.string()
4851
+ var identityServiceDatetimePreferencesSchema = external_exports.object({
4852
+ DATE_TIME: external_exports.string(),
4853
+ TIME: external_exports.string(),
4854
+ SHORT_DATE: external_exports.string(),
4855
+ LONG_DATETIME: external_exports.string(),
4856
+ LONG_TIME: external_exports.string(),
4857
+ DATE: external_exports.string()
4707
4858
  });
4708
4859
 
4709
4860
  // lib/whoami/models/IdentityServiceOrganizationMetadata.ts
4710
- var identityServiceOrganizationMetadataSchema = z.object({
4711
- namespace: z.string(),
4712
- key: z.string(),
4713
- value: z.string()
4861
+ var identityServiceOrganizationMetadataSchema = external_exports.object({
4862
+ namespace: external_exports.string(),
4863
+ key: external_exports.string(),
4864
+ value: external_exports.string()
4714
4865
  });
4715
4866
 
4716
4867
  // lib/whoami/models/IdentityServiceOrganization.ts
4717
- var identityServiceOrganizationSchema = z.object({
4718
- organization_name: z.string().optional(),
4719
- organization_site: z.string().optional(),
4720
- namespace: z.string().optional(),
4721
- id: z.string(),
4722
- permissions: z.array(z.string()).optional(),
4868
+ var identityServiceOrganizationSchema = external_exports.object({
4869
+ organization_name: external_exports.string().optional(),
4870
+ organization_site: external_exports.string().optional(),
4871
+ namespace: external_exports.string().optional(),
4872
+ id: external_exports.string(),
4873
+ permissions: external_exports.array(external_exports.string()).optional(),
4723
4874
  metadata: identityServiceOrganizationMetadataSchema.optional()
4724
4875
  });
4725
4876
 
4726
4877
  // lib/whoami/models/IdentityServicePreferences.ts
4727
- var identityServicePreferencesSchema = z.object({
4728
- locale: z.string(),
4729
- timezone: z.string(),
4730
- cpUpgrade: z.string().optional(),
4731
- language: z.array(z.string()),
4878
+ var identityServicePreferencesSchema = external_exports.object({
4879
+ locale: external_exports.string(),
4880
+ timezone: external_exports.string(),
4881
+ cpUpgrade: external_exports.string().optional(),
4882
+ language: external_exports.array(external_exports.string()),
4732
4883
  datetime: identityServiceDatetimePreferencesSchema
4733
4884
  });
4734
4885
 
4735
4886
  // lib/whoami/models/IdentityServiceUser.ts
4736
- var identityServiceUserSchema = z.object({
4737
- id: z.string(),
4738
- email: z.string().optional(),
4739
- first_name: z.string().optional(),
4740
- last_name: z.string().optional(),
4741
- job_title: z.string().optional(),
4742
- externally_managed: z.boolean().optional(),
4743
- city: z.string().optional(),
4744
- name: z.string(),
4745
- state: z.string().optional(),
4746
- country: z.string().optional(),
4747
- user_type: z.string().optional(),
4748
- token_type: z.string().optional(),
4749
- avatar_image_id: z.string().optional(),
4750
- avatar_image_url: z.string().optional(),
4751
- origin_avatar_image_id: z.string().optional(),
4752
- bio: z.string().optional(),
4753
- phone_number: z.string().optional(),
4754
- twitter_handle: z.string().optional(),
4755
- linkedin_url: z.string().optional(),
4756
- description: z.string().optional(),
4887
+ var identityServiceUserSchema = external_exports.object({
4888
+ id: external_exports.string(),
4889
+ email: external_exports.string().optional(),
4890
+ first_name: external_exports.string().optional(),
4891
+ last_name: external_exports.string().optional(),
4892
+ job_title: external_exports.string().optional(),
4893
+ externally_managed: external_exports.boolean().optional(),
4894
+ city: external_exports.string().optional(),
4895
+ name: external_exports.string(),
4896
+ state: external_exports.string().optional(),
4897
+ country: external_exports.string().optional(),
4898
+ user_type: external_exports.string().optional(),
4899
+ token_type: external_exports.string().optional(),
4900
+ avatar_image_id: external_exports.string().optional(),
4901
+ avatar_image_url: external_exports.string().optional(),
4902
+ origin_avatar_image_id: external_exports.string().optional(),
4903
+ bio: external_exports.string().optional(),
4904
+ phone_number: external_exports.string().optional(),
4905
+ twitter_handle: external_exports.string().optional(),
4906
+ linkedin_url: external_exports.string().optional(),
4907
+ description: external_exports.string().optional(),
4757
4908
  preferences: identityServicePreferencesSchema.optional(),
4758
- roles: z.array(z.string()),
4909
+ roles: external_exports.array(external_exports.string()),
4759
4910
  organization: identityServiceOrganizationSchema,
4760
- password: z.string(),
4761
- verified: z.boolean()
4911
+ password: external_exports.string(),
4912
+ verified: external_exports.boolean()
4762
4913
  });
4763
4914
 
4764
4915
  // lib/whoami/models/RegisteredService.ts
4765
- var registeredServiceSchema = z.object({
4766
- serviceId: z.number(),
4767
- identityServiceId: z.number(),
4768
- name: z.string(),
4769
- isActive: z.boolean()
4916
+ var registeredServiceSchema = external_exports.object({
4917
+ serviceId: external_exports.number(),
4918
+ identityServiceId: external_exports.number(),
4919
+ name: external_exports.string(),
4920
+ isActive: external_exports.boolean()
4770
4921
  });
4771
4922
 
4772
4923
  // lib/whoami/models/UserAccount.ts
4773
- var userAccountSchema = z.object({
4924
+ var userAccountSchema = external_exports.object({
4774
4925
  identityUser: identityServiceUserSchema,
4775
- companyId: z.number(),
4776
- companyName: z.string(),
4777
- name: z.string(),
4778
- assortmentPartnerCompanyId: z.number().nullish(),
4779
- retailer: z.boolean(),
4780
- supplier: z.boolean(),
4926
+ companyId: external_exports.number(),
4927
+ companyName: external_exports.string(),
4928
+ name: external_exports.string(),
4929
+ assortmentPartnerCompanyId: external_exports.number().nullish(),
4930
+ retailer: external_exports.boolean(),
4931
+ supplier: external_exports.boolean(),
4781
4932
  registeredService: registeredServiceSchema,
4782
- uniqueAttributes: z.array(z.string()),
4783
- admin: z.boolean(),
4784
- adminToolUser: z.boolean(),
4785
- attributeRegistryAdmin: z.boolean(),
4786
- attributeRegistryDev: z.boolean(),
4787
- attributeRegistryRsx: z.boolean(),
4788
- attributeRegistryUser: z.boolean(),
4789
- attributeRegistryViewer: z.boolean()
4933
+ uniqueAttributes: external_exports.array(external_exports.string()),
4934
+ admin: external_exports.boolean(),
4935
+ adminToolUser: external_exports.boolean(),
4936
+ attributeRegistryAdmin: external_exports.boolean(),
4937
+ attributeRegistryDev: external_exports.boolean(),
4938
+ attributeRegistryRsx: external_exports.boolean(),
4939
+ attributeRegistryUser: external_exports.boolean(),
4940
+ attributeRegistryViewer: external_exports.boolean()
4790
4941
  });
4791
4942
 
4792
4943
  // lib/errors/v1/models/ItemErrorDetails.ts
4793
- var itemErrorDetailsSchema = z.object({
4794
- errorMessage: z.string(),
4795
- attributeName: z.string().nullable(),
4796
- tradingPartnerNames: z.array(z.string()),
4797
- phases: z.array(phaseEnumSchema),
4798
- attributeDbNames: z.array(z.string()),
4799
- tradingPartnerStages: z.array(tradingPartnerStageSchema),
4800
- repeatableGroupId: z.string().nullish()
4944
+ var itemErrorDetailsSchema = external_exports.object({
4945
+ errorMessage: external_exports.string(),
4946
+ attributeName: external_exports.string().nullable(),
4947
+ tradingPartnerNames: external_exports.array(external_exports.string()),
4948
+ phases: external_exports.array(phaseEnumSchema),
4949
+ attributeDbNames: external_exports.array(external_exports.string()),
4950
+ tradingPartnerStages: external_exports.array(tradingPartnerStageSchema),
4951
+ repeatableGroupId: external_exports.string().nullish()
4801
4952
  });
4802
4953
 
4803
4954
  // lib/errors/v1/models/ItemErrorDetailsResult.ts
4804
- var itemErrorDetailsResultSchema = z.object({
4805
- itemInfoId: z.number(),
4806
- upc: z.string().nullish(),
4807
- isbn: z.string().nullish(),
4808
- gtin: z.string().nullish(),
4809
- partnumber: z.string().nullish(),
4810
- ean: z.string().nullish(),
4811
- itemName: z.string().nullable(),
4812
- itemErrorDetails: z.array(itemErrorDetailsSchema)
4955
+ var itemErrorDetailsResultSchema = external_exports.object({
4956
+ itemInfoId: external_exports.number(),
4957
+ upc: external_exports.string().nullish(),
4958
+ isbn: external_exports.string().nullish(),
4959
+ gtin: external_exports.string().nullish(),
4960
+ partnumber: external_exports.string().nullish(),
4961
+ ean: external_exports.string().nullish(),
4962
+ itemName: external_exports.string().nullable(),
4963
+ itemErrorDetails: external_exports.array(itemErrorDetailsSchema)
4813
4964
  });
4814
4965
 
4815
4966
  // lib/items/v2/models/Stage.ts
4816
- var stageSchema = z.enum([
4967
+ var stageSchema = external_exports.enum([
4817
4968
  "CORE",
4818
4969
  "CORE_PLUS",
4819
4970
  "CORE_ADVANCED",
@@ -4821,14 +4972,14 @@ var stageSchema = z.enum([
4821
4972
  ]);
4822
4973
 
4823
4974
  // lib/items/v2/models/OrgSummary.ts
4824
- var orgSummarySchema = z.object({
4825
- ref: z.string(),
4826
- id: z.string(),
4827
- name: z.string()
4975
+ var orgSummarySchema = external_exports.object({
4976
+ ref: external_exports.string(),
4977
+ id: external_exports.string(),
4978
+ name: external_exports.string()
4828
4979
  });
4829
4980
 
4830
4981
  // lib/items/v2/models/ItemOrgStageDetails.ts
4831
- var itemOrgStageDetailsSchema = z.object({
4982
+ var itemOrgStageDetailsSchema = external_exports.object({
4832
4983
  /**
4833
4984
  * When called as retailer, the vendor, else when vendor, the retailer.
4834
4985
  * */
@@ -4836,7 +4987,7 @@ var itemOrgStageDetailsSchema = z.object({
4836
4987
  /**
4837
4988
  * The company id of the retailer or vendor used for matching ItemOrgStageDetails to TradingPartnerStage for ErrorService
4838
4989
  */
4839
- companyId: z.number().nullish(),
4990
+ companyId: external_exports.number().nullish(),
4840
4991
  /**
4841
4992
  * "Standard Requirements" (null) UNLESS the retailer of the item is MSIS Enabled
4842
4993
  * OTHERWISE the retailer default Stage UNLESS there's a currently active vendor-specific Stage defined
@@ -4847,114 +4998,114 @@ var itemOrgStageDetailsSchema = z.object({
4847
4998
  * If the item is valid for the active stage. Note that for "Standard Requirements" or
4848
4999
  * "Enriched" this cam come directly from the item_doc table, but anything else requires validation
4849
5000
  */
4850
- isValid: z.boolean(),
5001
+ isValid: external_exports.boolean(),
4851
5002
  /**
4852
5003
  * Not null if there's an item level policy override for this trading partnership
4853
5004
  */
4854
- itemPolicyId: z.string().nullish(),
5005
+ itemPolicyId: external_exports.string().nullish(),
4855
5006
  /**
4856
5007
  * Start date for the Item level Stage if applicable
4857
5008
  */
4858
- startDate: z.number().transform((num) => new Date(num * 1e3)).nullish(),
5009
+ startDate: external_exports.number().transform((num) => new Date(num * 1e3)).nullish(),
4859
5010
  /**
4860
5011
  * End date for the Item level Stage if applicable
4861
5012
  */
4862
- endDate: z.number().transform((num) => new Date(num * 1e3)).nullish()
5013
+ endDate: external_exports.number().transform((num) => new Date(num * 1e3)).nullish()
4863
5014
  });
4864
5015
 
4865
5016
  // lib/items/v2/models/ItemStatusV2.ts
4866
- var itemStatusV2Schema = z.object({
4867
- itemId: z.string(),
5017
+ var itemStatusV2Schema = external_exports.object({
5018
+ itemId: external_exports.string(),
4868
5019
  mostRestrictiveRetailerStage: stageSchema.nullable(),
4869
- itemOrgStageDetails: z.array(itemOrgStageDetailsSchema)
5020
+ itemOrgStageDetails: external_exports.array(itemOrgStageDetailsSchema)
4870
5021
  });
4871
5022
 
4872
5023
  // lib/items/v2/models/ItemStatusV2Response.ts
4873
- var itemStatusV2ResponseSchema = z.object({
4874
- itemStatuses: z.array(itemStatusV2Schema)
5024
+ var itemStatusV2ResponseSchema = external_exports.object({
5025
+ itemStatuses: external_exports.array(itemStatusV2Schema)
4875
5026
  });
4876
5027
 
4877
5028
  // lib/errors/v2/models/TradingPartnerStage.ts
4878
- var tradingPartnerStageV2Schema = z.object({
4879
- companyId: z.number(),
4880
- companyName: z.string(),
5029
+ var tradingPartnerStageV2Schema = external_exports.object({
5030
+ companyId: external_exports.number(),
5031
+ companyName: external_exports.string(),
4881
5032
  stage: stageSchema.nullish(),
4882
- isValid: z.boolean()
5033
+ isValid: external_exports.boolean()
4883
5034
  });
4884
5035
 
4885
5036
  // lib/errors/v2/models/ItemErrorSummary.ts
4886
- var itemErrorSummaryV2Schema = z.object({
4887
- itemInfoId: z.number(),
4888
- upc: z.string().nullish(),
4889
- isbn: z.string().nullish(),
4890
- gtin: z.string().nullish(),
4891
- ean: z.string().nullish(),
4892
- partnumber: z.string().nullish(),
4893
- colorfamily: z.string().nullish(),
4894
- fit: z.string().nullish(),
4895
- productcolordescription: z.string().nullish(),
4896
- distributioncentercode: z.string().nullish(),
4897
- accountnumber: z.string().nullish(),
4898
- erpid: z.string().nullish(),
4899
- totalErrors: z.number(),
4900
- tradingPartners: z.array(z.string()),
4901
- tradingPartnerIds: z.array(z.number()),
5037
+ var itemErrorSummaryV2Schema = external_exports.object({
5038
+ itemInfoId: external_exports.number(),
5039
+ upc: external_exports.string().nullish(),
5040
+ isbn: external_exports.string().nullish(),
5041
+ gtin: external_exports.string().nullish(),
5042
+ ean: external_exports.string().nullish(),
5043
+ partnumber: external_exports.string().nullish(),
5044
+ colorfamily: external_exports.string().nullish(),
5045
+ fit: external_exports.string().nullish(),
5046
+ productcolordescription: external_exports.string().nullish(),
5047
+ distributioncentercode: external_exports.string().nullish(),
5048
+ accountnumber: external_exports.string().nullish(),
5049
+ erpid: external_exports.string().nullish(),
5050
+ totalErrors: external_exports.number(),
5051
+ tradingPartners: external_exports.array(external_exports.string()),
5052
+ tradingPartnerIds: external_exports.array(external_exports.number()),
4902
5053
  // These are the stages assigned to the TradingPartners, not the stages of the errors
4903
- phases: z.array(z.string()),
5054
+ phases: external_exports.array(external_exports.string()),
4904
5055
  // Same thing for the stage property in here: it's the stage of the Item & TradingPartner, not the stage of the error
4905
- tradingPartnerStages: z.array(tradingPartnerStageV2Schema),
4906
- validatedDate: z.number().pipe(z.coerce.date()).nullish()
5056
+ tradingPartnerStages: external_exports.array(tradingPartnerStageV2Schema),
5057
+ validatedDate: external_exports.number().pipe(external_exports.coerce.date()).nullish()
4907
5058
  });
4908
5059
 
4909
5060
  // lib/errors/v2/models/ItemErrorSummaryResult.ts
4910
- var itemErrorSummaryResultV2Schema = z.object({
4911
- hasNext: z.boolean(),
4912
- errors: z.array(itemErrorSummaryV2Schema)
5061
+ var itemErrorSummaryResultV2Schema = external_exports.object({
5062
+ hasNext: external_exports.boolean(),
5063
+ errors: external_exports.array(itemErrorSummaryV2Schema)
4913
5064
  });
4914
5065
 
4915
5066
  // lib/errors/v2/models/ItemErrorDetails.ts
4916
- var itemErrorDetailsV2Schema = z.object({
4917
- errorMessage: z.string(),
4918
- attributeName: z.string().nullable(),
4919
- tradingPartnerNames: z.array(z.string()),
4920
- phases: z.array(stageSchema),
4921
- attributeDbNames: z.array(z.string()),
4922
- tradingPartnerStages: z.array(tradingPartnerStageV2Schema),
4923
- repeatableGroupId: z.string().nullish()
5067
+ var itemErrorDetailsV2Schema = external_exports.object({
5068
+ errorMessage: external_exports.string(),
5069
+ attributeName: external_exports.string().nullable(),
5070
+ tradingPartnerNames: external_exports.array(external_exports.string()),
5071
+ phases: external_exports.array(stageSchema),
5072
+ attributeDbNames: external_exports.array(external_exports.string()),
5073
+ tradingPartnerStages: external_exports.array(tradingPartnerStageV2Schema),
5074
+ repeatableGroupId: external_exports.string().nullish()
4924
5075
  });
4925
5076
 
4926
5077
  // lib/errors/v2/models/ItemErrorDetailsResult.ts
4927
- var itemErrorDetailsResultV2Schema = z.object({
4928
- itemInfoId: z.number(),
4929
- upc: z.string().nullish(),
4930
- isbn: z.string().nullish(),
4931
- gtin: z.string().nullish(),
4932
- partnumber: z.string().nullish(),
4933
- ean: z.string().nullish(),
4934
- colorfamily: z.string().nullish(),
4935
- fit: z.string().nullish(),
4936
- productcolordescription: z.string().nullish(),
4937
- distributioncentercode: z.string().nullish(),
4938
- accountnumber: z.string().nullish(),
4939
- erpid: z.string().nullish(),
4940
- itemName: z.string().nullish(),
4941
- itemErrorDetails: z.array(itemErrorDetailsV2Schema)
5078
+ var itemErrorDetailsResultV2Schema = external_exports.object({
5079
+ itemInfoId: external_exports.number(),
5080
+ upc: external_exports.string().nullish(),
5081
+ isbn: external_exports.string().nullish(),
5082
+ gtin: external_exports.string().nullish(),
5083
+ partnumber: external_exports.string().nullish(),
5084
+ ean: external_exports.string().nullish(),
5085
+ colorfamily: external_exports.string().nullish(),
5086
+ fit: external_exports.string().nullish(),
5087
+ productcolordescription: external_exports.string().nullish(),
5088
+ distributioncentercode: external_exports.string().nullish(),
5089
+ accountnumber: external_exports.string().nullish(),
5090
+ erpid: external_exports.string().nullish(),
5091
+ itemName: external_exports.string().nullish(),
5092
+ itemErrorDetails: external_exports.array(itemErrorDetailsV2Schema)
4942
5093
  });
4943
5094
 
4944
5095
  // lib/companies/models/CompanyBriefByOrg.ts
4945
- var companyBriefByOrgSchema = z.object({
4946
- companyId: z.number(),
4947
- name: z.string(),
4948
- orgId: z.string(),
4949
- companyType: z.object({
4950
- type: z.enum(["SUPPLIER", "RETAILER"]),
4951
- display: z.enum(["SUPPLIER", "RETAILER"])
5096
+ var companyBriefByOrgSchema = external_exports.object({
5097
+ companyId: external_exports.number(),
5098
+ name: external_exports.string(),
5099
+ orgId: external_exports.string(),
5100
+ companyType: external_exports.object({
5101
+ type: external_exports.enum(["SUPPLIER", "RETAILER"]),
5102
+ display: external_exports.enum(["SUPPLIER", "RETAILER"])
4952
5103
  }),
4953
- dc4Id: z.number()
5104
+ dc4Id: external_exports.number()
4954
5105
  });
4955
5106
 
4956
5107
  export {
4957
- z,
5108
+ external_exports,
4958
5109
  BASE_URLS,
4959
5110
  envSchema,
4960
5111
  AsstClient,