@spscommerce/asst-api 5.3.0 → 5.3.3

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.
@@ -0,0 +1,1049 @@
1
+ // lib/imports/models/ImportDetail.ts
2
+ import { z } from "zod";
3
+ var importDetailSchema = z.object({
4
+ completedAt: z.number().nullish(),
5
+ errorCount: z.number(),
6
+ importId: z.number(),
7
+ name: z.string(),
8
+ startedAt: z.string().nullish(),
9
+ status: z.string(),
10
+ uploadedAt: z.string()
11
+ });
12
+
13
+ // lib/imports/models/Import.ts
14
+ import { z as z2 } from "zod";
15
+ var importSchema = z2.object({
16
+ count: z2.number(),
17
+ imports: z2.array(importDetailSchema)
18
+ });
19
+
20
+ // lib/imports/models/ImportError.ts
21
+ import { z as z3 } from "zod";
22
+ var importErrorSchema = z3.object({
23
+ attribute: z3.string().nullish(),
24
+ description: z3.string(),
25
+ importErrorId: z3.number(),
26
+ row: z3.number()
27
+ });
28
+
29
+ // lib/imports/models/ImportErrors.ts
30
+ import { z as z4 } from "zod";
31
+ var importErrorsSchema = z4.object({
32
+ count: z4.number(),
33
+ errors: z4.array(importErrorSchema),
34
+ hasNext: z4.boolean(),
35
+ importId: z4.number(),
36
+ totalCount: z4.number()
37
+ });
38
+
39
+ // lib/imports/models/ImportsStatusEnum.ts
40
+ import { z as z5 } from "zod";
41
+ var importStatusEnumSchema = z5.enum([
42
+ "QUEUED_FOR_IMPORT",
43
+ "IN_PROGRESS",
44
+ "DOC_FAILED",
45
+ "VALIDATION_FAILED",
46
+ "COMPLETED"
47
+ ]);
48
+
49
+ // lib/imports/models/ImportsStatus.ts
50
+ import { z as z6 } from "zod";
51
+ var importsStatusSchema = z6.object({
52
+ completedAt: z6.string().nullish(),
53
+ docInEventId: z6.string().nullish(),
54
+ errorCount: z6.number().nullish(),
55
+ importId: z6.number(),
56
+ invalidItemCount: z6.number().nullish(),
57
+ name: z6.string().nullish(),
58
+ status: importStatusEnumSchema,
59
+ totalItemCount: z6.number().nullish(),
60
+ validItemCount: z6.number().nullish()
61
+ });
62
+
63
+ // lib/imports/models/VendorPartnerAttGroups.ts
64
+ import { z as z7 } from "zod";
65
+ var vendorPartnerAttGroupsSchema = z7.object({
66
+ partnerCompanyId: z7.number(),
67
+ partnerCompanyName: z7.string(),
68
+ partnerAttributeGroups: z7.array(z7.number())
69
+ });
70
+
71
+ // lib/imports/models/GenerateImportTemplateParams.ts
72
+ import { z as z9 } from "zod";
73
+
74
+ // lib/_common/ApplicationType.ts
75
+ import { z as z8 } from "zod";
76
+ var applicationTypeSchema = z8.enum(["ASSORTMENT", "ITEM-XREF", "TEST-ORDER-GENERATOR"]);
77
+
78
+ // lib/imports/models/GenerateImportTemplateParams.ts
79
+ var generateImportTemplateParamsSchema = z9.object({
80
+ "multi-sheet": z9.boolean(),
81
+ callingApplicationType: applicationTypeSchema.optional(),
82
+ gids: z9.string().optional(),
83
+ groupTypeId: z9.number().optional(),
84
+ includeGuides: z9.boolean().optional(),
85
+ productTypeIds: z9.string().optional()
86
+ });
87
+
88
+ // lib/productTypes/models/AttrProdType.ts
89
+ import { z as z10 } from "zod";
90
+ var attrProdTypeSchema = z10.object({
91
+ attrProdTypeId: z10.number(),
92
+ productType: z10.string(),
93
+ description: z10.string(),
94
+ createdDate: z10.number(),
95
+ createdBy: z10.string(),
96
+ modifiedDate: z10.number().optional(),
97
+ modifiedBy: z10.string().optional(),
98
+ retailerId: z10.number().optional()
99
+ });
100
+
101
+ // lib/productTypes/models/PagedResults.ts
102
+ import { z as z11 } from "zod";
103
+ function pagedResultsSchema(resultsType) {
104
+ return z11.object({
105
+ next: z11.string(),
106
+ previous: z11.string(),
107
+ count: z11.number(),
108
+ results: z11.array(resultsType)
109
+ });
110
+ }
111
+
112
+ // lib/tradingPartners/models/Connection.ts
113
+ import { z as z12 } from "zod";
114
+ var connectionSchema = z12.object({
115
+ catalog_id: z12.number(),
116
+ catalog_name: z12.string().nullable(),
117
+ partner_company_name: z12.string(),
118
+ partner_company_id: z12.number(),
119
+ partner_org_id: z12.string()
120
+ });
121
+
122
+ // lib/tradingPartners/models/CompanyRelationshipUpsertBody.ts
123
+ import { z as z13 } from "zod";
124
+ var companyRelationshipUpsertBodySchema = z13.object({
125
+ supplierId: z13.number(),
126
+ retailerId: z13.number(),
127
+ catalogId: z13.number(),
128
+ active: z13.boolean(),
129
+ applicationType: z13.array(applicationTypeSchema).default([])
130
+ });
131
+
132
+ // lib/tradingPartners/models/ItemPartner.ts
133
+ import { z as z14 } from "zod";
134
+ var itemPartnerSchema = z14.object({
135
+ itemPartnerId: z14.number(),
136
+ retailerId: z14.number(),
137
+ supplierId: z14.number(),
138
+ catalogId: z14.number(),
139
+ isActive: z14.number(),
140
+ createdDate: z14.string(),
141
+ modifiedDate: z14.string(),
142
+ applications: z14.array(applicationTypeSchema)
143
+ });
144
+
145
+ // lib/companies/models/CompanyType.ts
146
+ import { z as z15 } from "zod";
147
+ var companyTypeSchema = z15.enum(["SUPPLIER", "RETAILER"]);
148
+
149
+ // lib/tradingPartners/models/TradingPartnerAccessByCompanyId.ts
150
+ import { z as z16 } from "zod";
151
+ var tradingPartnerAccessByCompanyIdSchema = z16.object({
152
+ companyId: z16.number(),
153
+ companyTypes: z16.array(companyTypeSchema),
154
+ identityOrgId: z16.string(),
155
+ companyName: z16.string(),
156
+ count: z16.number(),
157
+ connections: z16.array(connectionSchema)
158
+ });
159
+
160
+ // lib/categories/models/ItemCategory.ts
161
+ import { z as z17 } from "zod";
162
+ var categoryTypeSchema = z17.enum(["CATALOG", "SELECTION_CODE", "PRODUCT_CODE", "EXPORT"]);
163
+ var PRODUCT_CODE_DEFAULT_VALUE = "DEFAULT";
164
+ var SELECTION_CODE_DEFAULT_VALUE = "000";
165
+ var itemCategorySchema = z17.object({
166
+ categoryid: z17.number(),
167
+ encodedCategoryId: z17.string(),
168
+ companyId: z17.number(),
169
+ name: z17.string(),
170
+ isActive: z17.number(),
171
+ createdDate: z17.number().nullish(),
172
+ categorytimestamp: z17.number().nullish(),
173
+ typeId: z17.number(),
174
+ type: categoryTypeSchema,
175
+ categorykey: z17.string().nullish(),
176
+ description: z17.string().nullish(),
177
+ categoryCatalogName: z17.string().nullish()
178
+ });
179
+
180
+ // lib/categories/models/ItemCategoriesSearch.ts
181
+ import { z as z18 } from "zod";
182
+ var itemCategoriesSearchSchema = z18.object({
183
+ count: z18.number(),
184
+ data: z18.array(itemCategorySchema)
185
+ });
186
+
187
+ // lib/categories/models/ItemHierarchyResponse.ts
188
+ import { z as z19 } from "zod";
189
+ var baseHierarchySchema = z19.object({
190
+ id: z19.string(),
191
+ name: z19.string().nullish(),
192
+ description: z19.string().nullish(),
193
+ type: z19.string().nullish()
194
+ });
195
+ var hierarchySchema = baseHierarchySchema.extend({
196
+ child: z19.lazy(() => hierarchySchema).nullable()
197
+ });
198
+ var itemHierarchyResponseSchema = z19.object({
199
+ itemHierarchies: z19.array(
200
+ z19.object({
201
+ itemId: z19.string(),
202
+ hierarchies: z19.array(hierarchySchema)
203
+ })
204
+ )
205
+ });
206
+
207
+ // lib/categories/models/CatalogManagement.ts
208
+ import { z as z20 } from "zod";
209
+ var catalogCreateRequestSchema = z20.object({
210
+ type: z20.string(),
211
+ name: z20.string(),
212
+ companyId: z20.number()
213
+ });
214
+ var catalogCreateResponseSchema = z20.object({
215
+ categoryid: z20.number()
216
+ });
217
+ var catalogSearchParamsSchema = z20.object({
218
+ ownerCompanyIds: z20.array(z20.number()).optional(),
219
+ searchTerms: z20.string().optional(),
220
+ categoryType: z20.literal("CATALOG")
221
+ });
222
+ var catalogBriefResponseSchema = z20.object({
223
+ categoryId: z20.number(),
224
+ categoryName: z20.string(),
225
+ categoryDescription: z20.string(),
226
+ categoryDescriptionExt: z20.string(),
227
+ ownerCompanyId: z20.string(),
228
+ categoryTypeId: z20.number(),
229
+ createdAt: z20.string(),
230
+ modifiedAt: z20.string(),
231
+ createdBy: z20.string(),
232
+ modifiedBy: z20.string()
233
+ });
234
+
235
+ // lib/locale/models/Locale.ts
236
+ import { z as z21 } from "zod";
237
+ var localeSchema = z21.object({
238
+ localeCode: z21.string(),
239
+ localeDescription: z21.string()
240
+ });
241
+
242
+ // lib/spreadsheetTemplate/models/SpreadsheetTemplateCompany.ts
243
+ import { z as z22 } from "zod";
244
+ var spreadsheetTemplateCompanySchema = z22.object({
245
+ companyName: z22.string(),
246
+ companyId: z22.number(),
247
+ createdAt: z22.number()
248
+ });
249
+
250
+ // lib/spreadsheetTemplate/models/SpreadsheetTemplate.ts
251
+ import { z as z23 } from "zod";
252
+ var spreadsheetTemplateSchema = z23.object({
253
+ id: z23.number(),
254
+ fileLocation: z23.string(),
255
+ name: z23.string(),
256
+ templateType: z23.string(),
257
+ maxItemsPerDoc: z23.number(),
258
+ companies: z23.array(spreadsheetTemplateCompanySchema),
259
+ createdBy: z23.string().nullish(),
260
+ createdAt: z23.number().nullish(),
261
+ modifiedBy: z23.string().nullish(),
262
+ modifiedAt: z23.number().nullish()
263
+ });
264
+
265
+ // lib/whoami/models/IdentityServiceDatetimePreferences.ts
266
+ import { z as z24 } from "zod";
267
+ var identityServiceDatetimePreferencesSchema = z24.object({
268
+ DATE_TIME: z24.string(),
269
+ TIME: z24.string(),
270
+ SHORT_DATE: z24.string(),
271
+ LONG_DATETIME: z24.string(),
272
+ LONG_TIME: z24.string(),
273
+ DATE: z24.string()
274
+ });
275
+
276
+ // lib/whoami/models/IdentityServiceOrganizationMetadata.ts
277
+ import { z as z25 } from "zod";
278
+ var identityServiceOrganizationMetadataSchema = z25.object({
279
+ namespace: z25.string(),
280
+ key: z25.string(),
281
+ value: z25.string()
282
+ });
283
+
284
+ // lib/whoami/models/IdentityServiceOrganization.ts
285
+ import { z as z26 } from "zod";
286
+ var identityServiceOrganizationSchema = z26.object({
287
+ organization_name: z26.string().optional(),
288
+ organization_site: z26.string().optional(),
289
+ namespace: z26.string().optional(),
290
+ id: z26.string(),
291
+ permissions: z26.array(z26.string()).optional(),
292
+ metadata: identityServiceOrganizationMetadataSchema.optional()
293
+ });
294
+
295
+ // lib/whoami/models/IdentityServicePreferences.ts
296
+ import { z as z27 } from "zod";
297
+ var identityServicePreferencesSchema = z27.object({
298
+ locale: z27.string(),
299
+ timezone: z27.string(),
300
+ cpUpgrade: z27.string().optional(),
301
+ language: z27.array(z27.string()),
302
+ datetime: identityServiceDatetimePreferencesSchema
303
+ });
304
+
305
+ // lib/whoami/models/IdentityServiceUser.ts
306
+ import { z as z28 } from "zod";
307
+ var identityServiceUserSchema = z28.object({
308
+ id: z28.string(),
309
+ email: z28.string().optional(),
310
+ first_name: z28.string().optional(),
311
+ last_name: z28.string().optional(),
312
+ job_title: z28.string().optional(),
313
+ externally_managed: z28.boolean().optional(),
314
+ city: z28.string().optional(),
315
+ name: z28.string(),
316
+ state: z28.string().optional(),
317
+ country: z28.string().optional(),
318
+ user_type: z28.string().optional(),
319
+ token_type: z28.string().optional(),
320
+ avatar_image_id: z28.string().optional(),
321
+ avatar_image_url: z28.string().optional(),
322
+ origin_avatar_image_id: z28.string().optional(),
323
+ bio: z28.string().optional(),
324
+ phone_number: z28.string().optional(),
325
+ twitter_handle: z28.string().optional(),
326
+ linkedin_url: z28.string().optional(),
327
+ description: z28.string().optional(),
328
+ preferences: identityServicePreferencesSchema.optional(),
329
+ roles: z28.array(z28.string()),
330
+ organization: identityServiceOrganizationSchema,
331
+ password: z28.string(),
332
+ verified: z28.boolean()
333
+ });
334
+
335
+ // lib/whoami/models/RegisteredService.ts
336
+ import { z as z29 } from "zod";
337
+ var registeredServiceSchema = z29.object({
338
+ serviceId: z29.number(),
339
+ identityServiceId: z29.number(),
340
+ name: z29.string(),
341
+ isActive: z29.boolean()
342
+ });
343
+
344
+ // lib/whoami/models/UserAccount.ts
345
+ import { z as z30 } from "zod";
346
+ var userAccountSchema = z30.object({
347
+ identityUser: identityServiceUserSchema,
348
+ companyId: z30.number(),
349
+ companyName: z30.string(),
350
+ name: z30.string(),
351
+ assortmentPartnerCompanyId: z30.number().nullish(),
352
+ retailer: z30.boolean(),
353
+ supplier: z30.boolean(),
354
+ registeredService: registeredServiceSchema,
355
+ uniqueAttributes: z30.array(z30.string()),
356
+ admin: z30.boolean(),
357
+ adminToolUser: z30.boolean(),
358
+ attributeRegistryAdmin: z30.boolean(),
359
+ attributeRegistryDev: z30.boolean(),
360
+ attributeRegistryRsx: z30.boolean(),
361
+ attributeRegistryUser: z30.boolean(),
362
+ attributeRegistryViewer: z30.boolean()
363
+ });
364
+
365
+ // lib/items/v1/models/ItemHeader.ts
366
+ import { z as z31 } from "zod";
367
+ var itemHeaderSchema = z31.object({
368
+ status: z31.string().optional(),
369
+ catalogName: z31.string(),
370
+ productCodeName: z31.string(),
371
+ selectionCodeName: z31.string(),
372
+ gtin: z31.string(),
373
+ upc: z31.string(),
374
+ ean: z31.string(),
375
+ isbn: z31.string(),
376
+ partNumber: z31.string(),
377
+ lastUpdatedDateString: z31.string(),
378
+ companyId: z31.string(),
379
+ itemInfoId: z31.string()
380
+ });
381
+
382
+ // lib/items/v1/models/PhaseEnum.ts
383
+ import { z as z32 } from "zod";
384
+ var phaseEnumSchema = z32.enum([
385
+ "CORE",
386
+ "CORE_PLUS",
387
+ "CORE_ADVANCED",
388
+ "ENRICHED",
389
+ "STANDARD_REQUIREMENTS"
390
+ ]);
391
+
392
+ // lib/items/v1/models/TradingPartnerStage.ts
393
+ import { z as z33 } from "zod";
394
+ var tradingPartnerStageSchema = z33.object({
395
+ companyId: z33.number(),
396
+ companyName: z33.string(),
397
+ stage: z33.nullable(phaseEnumSchema),
398
+ isValid: z33.boolean()
399
+ });
400
+
401
+ // lib/items/v1/models/ItemMap.ts
402
+ import { z as z34 } from "zod";
403
+ var itemMapSchema = z34.object({
404
+ rn: z34.number().optional(),
405
+ iteminfoid: z34.string(),
406
+ tradingPartnerStages: z34.array(tradingPartnerStageSchema).optional(),
407
+ gtin: z34.string().nullish(),
408
+ catalogname: z34.string().nullish(),
409
+ isbn: z34.string().nullish(),
410
+ lastupdateddatestring: z34.string().nullish(),
411
+ upc: z34.string().nullish(),
412
+ productcodename: z34.string().nullish(),
413
+ ean: z34.string().nullish(),
414
+ selectioncodename: z34.string().nullish(),
415
+ createddatestring: z34.string().nullish(),
416
+ partnumber: z34.string().nullish(),
417
+ consumeravailabledatestring: z34.string().nullish(),
418
+ status: z34.string().nullish(),
419
+ nrfcolorcode: z34.array(z34.string()).nullish(),
420
+ nrfsizecode: z34.array(z34.string()).nullish(),
421
+ productcolordescription: z34.array(z34.string()).nullish(),
422
+ productsizedescription: z34.array(z34.string()).nullish()
423
+ }).passthrough();
424
+
425
+ // lib/items/v1/models/ItemTable.ts
426
+ import { z as z35 } from "zod";
427
+ var itemTableSchema = z35.object({
428
+ headers: itemHeaderSchema,
429
+ itemMaps: z35.array(itemMapSchema)
430
+ });
431
+
432
+ // lib/items/v1/models/ItemSearchView.ts
433
+ import { z as z36 } from "zod";
434
+ var itemSearchViewSchema = z36.object({
435
+ itemTable: itemTableSchema,
436
+ hasNext: z36.boolean(),
437
+ count: z36.number()
438
+ });
439
+
440
+ // lib/items/v1/models/AttributeDetail.ts
441
+ import { z as z38 } from "zod";
442
+
443
+ // lib/items/v1/models/AttrDatatypeNameEnum.ts
444
+ import { z as z37 } from "zod";
445
+ var attrDatatypeNameEnumSchema = z37.enum([
446
+ "TEXT",
447
+ "SET",
448
+ "INTEGER",
449
+ "FLOAT",
450
+ "BOOLEAN",
451
+ "DATE",
452
+ "KEYVALUE",
453
+ "REFERENCE",
454
+ // Not used anymore
455
+ "STRING",
456
+ "REAL"
457
+ ]);
458
+
459
+ // lib/items/v1/models/AttributeDetail.ts
460
+ var attributeDetailSchema = z38.object({
461
+ type: attrDatatypeNameEnumSchema,
462
+ name: z38.string(),
463
+ value: z38.string().or(z38.number()).or(z38.array(z38.string())).or(z38.array(z38.number())).nullable(),
464
+ label: z38.string(),
465
+ group: z38.string(),
466
+ orderBy: z38.number().or(z38.string()).nullish()
467
+ });
468
+
469
+ // lib/items/v1/models/CategoryEnum.ts
470
+ import { z as z39 } from "zod";
471
+ var categoryEnumSchema = z39.enum([
472
+ "ALIAS",
473
+ "CATALOG",
474
+ "EXPORT",
475
+ "LEGACY_PRODUCT_TYPE",
476
+ "PRODUCT_CLASSIFICATION",
477
+ "PRODUCT_CODE",
478
+ "SELECTION_CODE",
479
+ "TAG",
480
+ "TAXONOMY_ROOT"
481
+ ]);
482
+
483
+ // lib/items/v1/models/ComponentDetails.ts
484
+ import { z as z40 } from "zod";
485
+ var componentDetailsSchema = z40.object({
486
+ itemInfoId: z40.number(),
487
+ description: z40.string().nullish(),
488
+ saleable: z40.boolean(),
489
+ valid: z40.boolean(),
490
+ uniqueCriteria: z40.array(
491
+ z40.object({
492
+ name: z40.string(),
493
+ value: z40.string()
494
+ })
495
+ )
496
+ });
497
+
498
+ // lib/items/v1/models/RepeatableGroup.ts
499
+ import { z as z41 } from "zod";
500
+ var repeatableGroupSchema = z41.object({
501
+ repeatableGroupId: z41.string(),
502
+ repeatableNumber: z41.number()
503
+ });
504
+
505
+ // lib/items/v1/models/GroupedAttributeList.ts
506
+ import { z as z42 } from "zod";
507
+ var groupedAttributeListSchema = z42.object({
508
+ type: z42.string(),
509
+ rows: z42.array(z42.array(attributeDetailSchema)),
510
+ repeatableGroups: z42.array(repeatableGroupSchema)
511
+ });
512
+
513
+ // lib/items/v1/models/GroupedAttributes.ts
514
+ import { z as z43 } from "zod";
515
+ var groupedAttributesSchema = z43.object({
516
+ type: z43.string(),
517
+ attributes: z43.array(attributeDetailSchema),
518
+ attributeGroups: z43.array(groupedAttributeListSchema)
519
+ });
520
+
521
+ // lib/items/v1/models/HierarchyCategory.ts
522
+ import { z as z44 } from "zod";
523
+ var hierarchyCategorySchema = z44.object({
524
+ name: z44.string(),
525
+ description: z44.string().nullish(),
526
+ id: z44.number(),
527
+ companyId: z44.number().nullish(),
528
+ type: categoryEnumSchema
529
+ });
530
+
531
+ // lib/items/v1/models/HierarchyDetails.ts
532
+ import { z as z45 } from "zod";
533
+ var hierarchyDetailsSchema = z45.object({
534
+ catalogs: z45.array(hierarchyCategorySchema),
535
+ selectionCodes: z45.array(hierarchyCategorySchema),
536
+ productCodes: z45.array(hierarchyCategorySchema)
537
+ });
538
+
539
+ // lib/items/v1/models/PackComponentItemInfo.ts
540
+ import { z as z46 } from "zod";
541
+ var packComponentItemInfoSchema = z46.object({
542
+ companyid: z46.number(),
543
+ createddate: z46.number(),
544
+ isServiceApi: z46.boolean(),
545
+ isactive: z46.number(),
546
+ isvalid: z46.number(),
547
+ itemType: z46.string(),
548
+ iteminfoid: z46.number(),
549
+ itemtimestamp: z46.number(),
550
+ serviceId: z46.number(),
551
+ attributes: z46.record(z46.string(), z46.string().or(z46.array(z46.string())))
552
+ });
553
+
554
+ // lib/items/v1/models/ItemPrice.ts
555
+ import { z as z47 } from "zod";
556
+ var itemPriceSchema = z47.object({
557
+ amount: z47.number(),
558
+ currency: z47.string(),
559
+ id: z47.number().nullish(),
560
+ priceDivision: z47.string().nullish(),
561
+ iteminfoid: z47.number().nullish(),
562
+ startdate: z47.string().nullish(),
563
+ enddate: z47.string().nullish(),
564
+ qualifier: z47.string(),
565
+ region: z47.string().nullish(),
566
+ regionqualifier: z47.string().nullish(),
567
+ regiondescription: z47.string().nullish(),
568
+ partnercompanyid: z47.string().nullish(),
569
+ itempricetimestamp: z47.number().nullish(),
570
+ range_type: z47.string().nullish(),
571
+ date_range_type: z47.string().nullish(),
572
+ min_range: z47.number().nullish(),
573
+ gtin: z47.string().nullish(),
574
+ priceConditionDescription: z47.string().nullish(),
575
+ priceUnitQuantity: z47.number().nullish(),
576
+ priceUnitQuantityUOM: z47.string().nullish()
577
+ });
578
+
579
+ // lib/items/v1/models/PackComponentDetails.ts
580
+ import { z as z48 } from "zod";
581
+ var packComponentDetailsSchema = z48.object({
582
+ itemInfo: packComponentItemInfoSchema,
583
+ itemPrices: z48.array(itemPriceSchema)
584
+ });
585
+
586
+ // lib/items/v1/models/GroupedItem.ts
587
+ import { z as z49 } from "zod";
588
+ var groupedItemSchema = z49.object({
589
+ iteminfoid: z49.number(),
590
+ companyid: z49.number(),
591
+ status: z49.string(),
592
+ createdDate: z49.string(),
593
+ lastUpdatedDate: z49.string(),
594
+ identifiers: z49.record(z49.string(), z49.any()),
595
+ hierarchyDetails: hierarchyDetailsSchema,
596
+ groupedAttributes: z49.array(groupedAttributesSchema),
597
+ packComponentDetails: z49.array(packComponentDetailsSchema),
598
+ childComponentDetails: z49.array(componentDetailsSchema),
599
+ parentComponentDetails: z49.array(componentDetailsSchema),
600
+ locales: z49.array(z49.string())
601
+ });
602
+
603
+ // lib/items/v1/models/ItemDetailView.ts
604
+ import { z as z50 } from "zod";
605
+ var itemDetailViewSchema = z50.object({
606
+ item: groupedItemSchema
607
+ });
608
+
609
+ // lib/items/v1/models/Bulb.ts
610
+ import { z as z51 } from "zod";
611
+ var bulbSchema = z51.object({
612
+ iteminfoid: z51.number(),
613
+ id: z51.number(),
614
+ shape: z51.string(),
615
+ position: z51.number(),
616
+ quantity: z51.number(),
617
+ basetype: z51.string(),
618
+ maxwatt: z51.number(),
619
+ createdat: z51.string(),
620
+ modifiedat: z51.string(),
621
+ bulbtype: z51.string(),
622
+ bulbincluded: z51.string(),
623
+ bulbsize: z51.string(),
624
+ replacementbulb: z51.string(),
625
+ threewaybulb: z51.string()
626
+ });
627
+
628
+ // lib/items/v1/models/PackComponent.ts
629
+ import { z as z52 } from "zod";
630
+ var packComponentSchema = z52.object({
631
+ itemInfoId: z52.number().nullish(),
632
+ attributes: z52.record(z52.string(), z52.string().or(z52.array(z52.string()))),
633
+ prices: z52.array(itemPriceSchema)
634
+ });
635
+
636
+ // lib/items/v1/models/MediaItem.ts
637
+ import { z as z53 } from "zod";
638
+ var mediaItemSchema = z53.object({
639
+ id: z53.number(),
640
+ iteminfoid: z53.number(),
641
+ medianame: z53.string(),
642
+ height: z53.number().nullish(),
643
+ filename: z53.string(),
644
+ mediafilename: z53.string().nullish(),
645
+ description: z53.string().nullish(),
646
+ filesize: z53.number().nullish(),
647
+ format: z53.string().nullish(),
648
+ orientation: z53.string().nullish(),
649
+ pixeldensity: z53.string().nullish(),
650
+ purpose: z53.string().nullish(),
651
+ width: z53.number().nullish(),
652
+ mediatype: z53.string(),
653
+ mediaviewtype: z53.string().nullish(),
654
+ compressionquality: z53.string().nullish(),
655
+ thumbnailflag: z53.string().nullish()
656
+ });
657
+
658
+ // lib/items/v1/models/ItemDetail.ts
659
+ import { z as z54 } from "zod";
660
+ var itemDetailSchema = z54.object({
661
+ attributes: z54.record(z54.string(), z54.any()),
662
+ clusters: z54.record(
663
+ z54.string(),
664
+ z54.array(
665
+ z54.object({
666
+ itemInfoAttributes: z54.record(
667
+ z54.string(),
668
+ z54.string().or(z54.number()).or(z54.boolean())
669
+ )
670
+ })
671
+ )
672
+ ),
673
+ prices: z54.array(itemPriceSchema),
674
+ bulbs: z54.array(bulbSchema),
675
+ media: z54.array(mediaItemSchema),
676
+ packs: z54.array(packComponentSchema)
677
+ });
678
+
679
+ // lib/items/v1/models/SpsItemIdResponse.ts
680
+ import { z as z55 } from "zod";
681
+ var spsItemIdResponseSchema = z55.object({
682
+ id: z55.string(),
683
+ ref: z55.string()
684
+ });
685
+
686
+ // lib/items/v1/models/ItemStatusResponse.ts
687
+ import { z as z58 } from "zod";
688
+
689
+ // lib/items/v1/models/ItemStatus.ts
690
+ import { z as z57 } from "zod";
691
+
692
+ // lib/items/v1/models/ItemOrgStatus.ts
693
+ import { z as z56 } from "zod";
694
+ var itemOrgStatusSchema = z56.object({
695
+ org: z56.object({
696
+ ref: z56.string(),
697
+ id: z56.string(),
698
+ name: z56.string()
699
+ }),
700
+ lowestInvalidStage: phaseEnumSchema.nullable(),
701
+ validForRelationship: z56.boolean()
702
+ });
703
+
704
+ // lib/items/v1/models/ItemStatus.ts
705
+ var itemStatusSchema = z57.object({
706
+ itemId: z57.string(),
707
+ itemOrgStatuses: z57.array(itemOrgStatusSchema)
708
+ });
709
+
710
+ // lib/items/v1/models/ItemStatusResponse.ts
711
+ var itemStatusResponseSchema = z58.object({
712
+ itemStatuses: z58.array(itemStatusSchema)
713
+ });
714
+
715
+ // lib/errors/v1/models/ItemErrorDetails.ts
716
+ import { z as z59 } from "zod";
717
+ var itemErrorDetailsSchema = z59.object({
718
+ errorMessage: z59.string(),
719
+ attributeName: z59.string().nullable(),
720
+ tradingPartnerNames: z59.array(z59.string()),
721
+ phases: z59.array(phaseEnumSchema),
722
+ attributeDbNames: z59.array(z59.string()),
723
+ tradingPartnerStages: z59.array(tradingPartnerStageSchema),
724
+ repeatableGroupId: z59.string().nullish()
725
+ });
726
+
727
+ // lib/errors/v1/models/ItemErrorDetailsResult.ts
728
+ import { z as z60 } from "zod";
729
+ var itemErrorDetailsResultSchema = z60.object({
730
+ itemInfoId: z60.number(),
731
+ upc: z60.string().nullish(),
732
+ isbn: z60.string().nullish(),
733
+ gtin: z60.string().nullish(),
734
+ partnumber: z60.string().nullish(),
735
+ ean: z60.string().nullish(),
736
+ itemName: z60.string().nullable(),
737
+ itemErrorDetails: z60.array(itemErrorDetailsSchema)
738
+ });
739
+
740
+ // lib/errors/v2/models/TradingPartnerStage.ts
741
+ import { z as z66 } from "zod";
742
+
743
+ // lib/items/v2/models/ItemOrgStageDetails.ts
744
+ import { z as z63 } from "zod";
745
+
746
+ // lib/items/v2/models/Stage.ts
747
+ import { z as z61 } from "zod";
748
+ var stageSchema = z61.enum([
749
+ "CORE",
750
+ "CORE_PLUS",
751
+ "CORE_ADVANCED",
752
+ "ENRICHED"
753
+ ]);
754
+
755
+ // lib/items/v2/models/OrgSummary.ts
756
+ import { z as z62 } from "zod";
757
+ var orgSummarySchema = z62.object({
758
+ ref: z62.string(),
759
+ id: z62.string(),
760
+ name: z62.string()
761
+ });
762
+
763
+ // lib/items/v2/models/ItemOrgStageDetails.ts
764
+ var itemOrgStageDetailsSchema = z63.object({
765
+ /**
766
+ * When called as retailer, the vendor, else when vendor, the retailer.
767
+ * */
768
+ orgSummary: orgSummarySchema,
769
+ /**
770
+ * The company id of the retailer or vendor used for matching ItemOrgStageDetails to TradingPartnerStage for ErrorService
771
+ */
772
+ companyId: z63.number().nullish(),
773
+ /**
774
+ * "Standard Requirements" (null) UNLESS the retailer of the item is MSIS Enabled
775
+ * OTHERWISE the retailer default Stage UNLESS there's a currently active vendor-specific Stage defined
776
+ * OTHERWISE the trading partnership Stage UNLESS there's a currently active Item Level override defined
777
+ * OTHERWISE the item level override */
778
+ stage: stageSchema.nullish(),
779
+ /**
780
+ * If the item is valid for the active stage. Note that for "Standard Requirements" or
781
+ * "Enriched" this cam come directly from the item_doc table, but anything else requires validation
782
+ */
783
+ isValid: z63.boolean(),
784
+ /**
785
+ * Not null if there's an item level policy override for this trading partnership
786
+ */
787
+ itemPolicyId: z63.string().nullish(),
788
+ /**
789
+ * Start date for the Item level Stage if applicable
790
+ */
791
+ startDate: z63.number().transform((num) => new Date(num * 1e3)).nullish(),
792
+ /**
793
+ * End date for the Item level Stage if applicable
794
+ */
795
+ endDate: z63.number().transform((num) => new Date(num * 1e3)).nullish()
796
+ });
797
+
798
+ // lib/items/v2/models/ItemStatusV2.ts
799
+ import { z as z64 } from "zod";
800
+ var itemStatusV2Schema = z64.object({
801
+ itemId: z64.string(),
802
+ mostRestrictiveRetailerStage: stageSchema.nullable(),
803
+ itemOrgStageDetails: z64.array(itemOrgStageDetailsSchema)
804
+ });
805
+
806
+ // lib/items/v2/models/ItemStatusV2Response.ts
807
+ import { z as z65 } from "zod";
808
+ var itemStatusV2ResponseSchema = z65.object({
809
+ itemStatuses: z65.array(itemStatusV2Schema)
810
+ });
811
+
812
+ // lib/errors/v2/models/TradingPartnerStage.ts
813
+ var tradingPartnerStageV2Schema = z66.object({
814
+ companyId: z66.number(),
815
+ companyName: z66.string(),
816
+ stage: stageSchema.nullish(),
817
+ isValid: z66.boolean()
818
+ });
819
+
820
+ // lib/errors/v2/models/ItemErrorSummary.ts
821
+ import { z as z67 } from "zod";
822
+ var itemErrorSummaryV2Schema = z67.object({
823
+ itemInfoId: z67.number(),
824
+ upc: z67.string().nullish(),
825
+ isbn: z67.string().nullish(),
826
+ gtin: z67.string().nullish(),
827
+ ean: z67.string().nullish(),
828
+ partnumber: z67.string().nullish(),
829
+ colorfamily: z67.string().nullish(),
830
+ fit: z67.string().nullish(),
831
+ productcolordescription: z67.string().nullish(),
832
+ distributioncentercode: z67.string().nullish(),
833
+ accountnumber: z67.string().nullish(),
834
+ erpid: z67.string().nullish(),
835
+ totalErrors: z67.number(),
836
+ tradingPartners: z67.array(z67.string()),
837
+ tradingPartnerIds: z67.array(z67.number()),
838
+ // These are the stages assigned to the TradingPartners, not the stages of the errors
839
+ phases: z67.array(z67.string()),
840
+ // Same thing for the stage property in here: it's the stage of the Item & TradingPartner, not the stage of the error
841
+ tradingPartnerStages: z67.array(tradingPartnerStageV2Schema),
842
+ validatedDate: z67.number().pipe(z67.coerce.date()).nullish()
843
+ });
844
+
845
+ // lib/errors/v2/models/ItemErrorSummaryResult.ts
846
+ import { z as z68 } from "zod";
847
+ var itemErrorSummaryResultV2Schema = z68.object({
848
+ hasNext: z68.boolean(),
849
+ errors: z68.array(itemErrorSummaryV2Schema)
850
+ });
851
+
852
+ // lib/errors/v2/models/ItemErrorDetails.ts
853
+ import { z as z69 } from "zod";
854
+ var itemErrorDetailsV2Schema = z69.object({
855
+ errorMessage: z69.string(),
856
+ attributeName: z69.string().nullable(),
857
+ tradingPartnerNames: z69.array(z69.string()),
858
+ phases: z69.array(stageSchema),
859
+ attributeDbNames: z69.array(z69.string()),
860
+ tradingPartnerStages: z69.array(tradingPartnerStageV2Schema),
861
+ repeatableGroupId: z69.string().nullish()
862
+ });
863
+
864
+ // lib/errors/v2/models/ItemErrorDetailsResult.ts
865
+ import { z as z70 } from "zod";
866
+ var itemErrorDetailsResultV2Schema = z70.object({
867
+ itemInfoId: z70.number(),
868
+ upc: z70.string().nullish(),
869
+ isbn: z70.string().nullish(),
870
+ gtin: z70.string().nullish(),
871
+ partnumber: z70.string().nullish(),
872
+ ean: z70.string().nullish(),
873
+ colorfamily: z70.string().nullish(),
874
+ fit: z70.string().nullish(),
875
+ productcolordescription: z70.string().nullish(),
876
+ distributioncentercode: z70.string().nullish(),
877
+ accountnumber: z70.string().nullish(),
878
+ erpid: z70.string().nullish(),
879
+ itemName: z70.string().nullish(),
880
+ itemErrorDetails: z70.array(itemErrorDetailsV2Schema)
881
+ });
882
+
883
+ // lib/companies/models/CompanyBriefByOrg.ts
884
+ import { z as z71 } from "zod";
885
+ var companyBriefByOrgSchema = z71.object({
886
+ companyId: z71.number(),
887
+ name: z71.string(),
888
+ orgId: z71.string(),
889
+ companyTypes: z71.array(companyTypeSchema),
890
+ dc4Id: z71.number()
891
+ });
892
+
893
+ // lib/companies/models/Company.ts
894
+ import { z as z73 } from "zod";
895
+
896
+ // lib/companies/models/CompanyRelationship.ts
897
+ import { z as z72 } from "zod";
898
+ var applicationSchema = z72.object({
899
+ application: applicationTypeSchema,
900
+ relationshipApplicationId: z72.number()
901
+ });
902
+ var catalogSchema = z72.object({
903
+ active: z72.boolean(),
904
+ catalogId: z72.number(),
905
+ itemPartnerId: z72.number()
906
+ });
907
+ var relationshipCompanySchema = z72.object({
908
+ companyId: z72.number(),
909
+ companyTypes: z72.array(companyTypeSchema),
910
+ dc4Id: z72.number().nullable(),
911
+ name: z72.string(),
912
+ orgId: z72.string()
913
+ });
914
+ var relationshipSchema = z72.object({
915
+ active: z72.boolean(),
916
+ application: z72.array(applicationSchema),
917
+ catalog: z72.array(catalogSchema),
918
+ company: relationshipCompanySchema,
919
+ createdAt: z72.number(),
920
+ modifiedAt: z72.number().nullable(),
921
+ relationshipId: z72.number()
922
+ });
923
+
924
+ // lib/companies/models/Company.ts
925
+ var featureResponseSchema = z73.object({
926
+ active: z73.boolean(),
927
+ createdBy: z73.string().nullable(),
928
+ createdDate: z73.number().nullable(),
929
+ display: z73.string(),
930
+ modifiedBy: z73.string().nullish(),
931
+ modifiedDate: z73.number().nullish(),
932
+ type: z73.string()
933
+ });
934
+ var identitySchema = z73.object({
935
+ orgId: z73.string().nullable(),
936
+ service: z73.object({
937
+ name: z73.string()
938
+ }).nullable()
939
+ });
940
+ var companySchema = z73.object({
941
+ active: z73.boolean(),
942
+ companyId: z73.number(),
943
+ companyTypes: z73.array(companyTypeSchema),
944
+ createdAt: z73.number().nullable(),
945
+ features: z73.array(featureResponseSchema),
946
+ identity: identitySchema,
947
+ modifiedAt: z73.number().nullable(),
948
+ name: z73.string(),
949
+ relationships: z73.array(relationshipSchema),
950
+ uniqueAttributes: z73.array(z73.string())
951
+ });
952
+
953
+ // lib/companies/models/CompanySearch.ts
954
+ import { z as z74 } from "zod";
955
+ var companySearchParamsSchema = z74.object({
956
+ name: z74.string().min(2).max(100).optional(),
957
+ companyIds: z74.string().min(2).optional(),
958
+ orgId: z74.string().min(2).optional(),
959
+ catalogName: z74.string().min(2).max(100).optional(),
960
+ catalogIds: z74.string().min(2).optional(),
961
+ type: companyTypeSchema.optional()
962
+ });
963
+ var companyCatalogSchema = z74.object({
964
+ categoryId: z74.number(),
965
+ categoryName: z74.string()
966
+ });
967
+ var companySearchSchema = z74.object({
968
+ id: z74.string(),
969
+ organizationName: z74.string(),
970
+ description: z74.string(),
971
+ orgId: z74.string().optional(),
972
+ roles: z74.array(companyTypeSchema),
973
+ connections: z74.number(),
974
+ uniqueCriteria: z74.array(z74.string()).optional(),
975
+ serviceName: z74.string(),
976
+ catalogs: z74.array(companyCatalogSchema),
977
+ application: z74.array(applicationTypeSchema).optional()
978
+ });
979
+
980
+ export {
981
+ importDetailSchema,
982
+ importSchema,
983
+ importErrorSchema,
984
+ importErrorsSchema,
985
+ importStatusEnumSchema,
986
+ importsStatusSchema,
987
+ vendorPartnerAttGroupsSchema,
988
+ generateImportTemplateParamsSchema,
989
+ attrProdTypeSchema,
990
+ pagedResultsSchema,
991
+ connectionSchema,
992
+ companyRelationshipUpsertBodySchema,
993
+ itemPartnerSchema,
994
+ tradingPartnerAccessByCompanyIdSchema,
995
+ categoryTypeSchema,
996
+ PRODUCT_CODE_DEFAULT_VALUE,
997
+ SELECTION_CODE_DEFAULT_VALUE,
998
+ itemCategorySchema,
999
+ itemCategoriesSearchSchema,
1000
+ itemHierarchyResponseSchema,
1001
+ catalogCreateResponseSchema,
1002
+ catalogBriefResponseSchema,
1003
+ localeSchema,
1004
+ spreadsheetTemplateCompanySchema,
1005
+ spreadsheetTemplateSchema,
1006
+ identityServiceDatetimePreferencesSchema,
1007
+ identityServiceOrganizationMetadataSchema,
1008
+ identityServiceOrganizationSchema,
1009
+ identityServicePreferencesSchema,
1010
+ identityServiceUserSchema,
1011
+ registeredServiceSchema,
1012
+ userAccountSchema,
1013
+ itemHeaderSchema,
1014
+ phaseEnumSchema,
1015
+ tradingPartnerStageSchema,
1016
+ itemMapSchema,
1017
+ itemTableSchema,
1018
+ itemSearchViewSchema,
1019
+ attributeDetailSchema,
1020
+ categoryEnumSchema,
1021
+ componentDetailsSchema,
1022
+ repeatableGroupSchema,
1023
+ groupedAttributeListSchema,
1024
+ groupedAttributesSchema,
1025
+ hierarchyCategorySchema,
1026
+ hierarchyDetailsSchema,
1027
+ packComponentItemInfoSchema,
1028
+ itemPriceSchema,
1029
+ packComponentDetailsSchema,
1030
+ groupedItemSchema,
1031
+ itemDetailViewSchema,
1032
+ bulbSchema,
1033
+ packComponentSchema,
1034
+ mediaItemSchema,
1035
+ itemDetailSchema,
1036
+ spsItemIdResponseSchema,
1037
+ itemStatusResponseSchema,
1038
+ itemStatusV2ResponseSchema,
1039
+ itemErrorDetailsSchema,
1040
+ itemErrorDetailsResultSchema,
1041
+ tradingPartnerStageV2Schema,
1042
+ itemErrorSummaryV2Schema,
1043
+ itemErrorSummaryResultV2Schema,
1044
+ itemErrorDetailsV2Schema,
1045
+ itemErrorDetailsResultV2Schema,
1046
+ companyBriefByOrgSchema,
1047
+ companySchema,
1048
+ companySearchSchema
1049
+ };