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