@spscommerce/asst-api 5.2.0 → 5.3.2

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/index.d.cts DELETED
@@ -1,964 +0,0 @@
1
- import { A as AsstClient, I as ItemHierarchyResponse, a as CompanyType, S as SpsItemIdResponse, C as CompanyBriefByOrg } from './SpsItemIdResponse-CSZKx_Tz.cjs';
2
- export { b as AsstClientOptions, c as AsstUrl, B as BASE_URLS, E as Env, e as envSchema } from './SpsItemIdResponse-CSZKx_Tz.cjs';
3
- import { I as Import, a as ImportsStatus, V as VendorPartnerAttGroups, G as GenerateImportTemplateParams, E as Export, D as DownLoadItemsParams, A as AttrProdType, T as TradingPartnerAccessByCompanyId, C as CompanyRelationshipUpsertBody, b as ItemPartner, c as ItemCategoriesSearch, L as Locale, S as SpreadsheetTemplate, U as UserAccount, d as ItemSearchView, e as ItemDetailView, f as ItemDetail, g as ItemErrorDetailsResult, h as ItemErrorSummaryResultV2, i as ItemErrorDetailsResultV2 } from './zod-CFHO1Ktc.cjs';
4
- export { j as AttributeDetail, B as Bulb, k as CategoryEnum, l as ComponentDetails, m as Connection, n as ExportDayOfWeek, o as ExportFrequency, p as ExportType, q as GroupedAttributeList, r as GroupedAttributes, s as GroupedItem, H as HierarchyCategory, t as HierarchyDetails, u as IdentityServiceDatetimePreferences, v as IdentityServiceOrganization, w as IdentityServiceOrganizationMetadata, x as IdentityServicePreferences, y as IdentityServiceUser, z as ImportDetails, F as ImportError, J as ImportErrors, K as ImportStatusEnum, M as ItemCategory, N as ItemErrorDetails, O as ItemErrorDetailsV2, P as ItemErrorSummaryV2, Q as ItemHeader, R as ItemMap, W as ItemPrice, X as ItemTable, Y as MediaItem, Z as PRODUCT_CODE_DEFAULT_VALUE, _ as PackComponent, $ as PackComponentDetails, a0 as PackComponentItemInfo, a1 as PhaseEnum, a2 as RegisteredService, a3 as RepeatableGroup, a4 as SELECTION_CODE_DEFAULT_VALUE, a5 as SpreadsheetTemplateCompany, a6 as TradingPartnerStage, a7 as TradingPartnerStageV2 } from './zod-CFHO1Ktc.cjs';
5
- import { z } from 'zod';
6
- import { b as CompanySearchParams, C as CompanySearch, a as Company } from './CompanySearch-7_L0_02Y.cjs';
7
- import 'ky';
8
-
9
- declare const relationshipSchema: z.ZodObject<{
10
- active: z.ZodBoolean;
11
- application: z.ZodArray<z.ZodObject<{
12
- application: z.ZodEnum<["ASSORTMENT", "ITEM-XREF", "TEST-ORDER-GENERATOR"]>;
13
- relationshipApplicationId: z.ZodNumber;
14
- }, "strip", z.ZodTypeAny, {
15
- application: "ASSORTMENT" | "ITEM-XREF" | "TEST-ORDER-GENERATOR";
16
- relationshipApplicationId: number;
17
- }, {
18
- application: "ASSORTMENT" | "ITEM-XREF" | "TEST-ORDER-GENERATOR";
19
- relationshipApplicationId: number;
20
- }>, "many">;
21
- catalog: z.ZodArray<z.ZodObject<{
22
- active: z.ZodBoolean;
23
- catalogId: z.ZodNumber;
24
- itemPartnerId: z.ZodNumber;
25
- }, "strip", z.ZodTypeAny, {
26
- active: boolean;
27
- catalogId: number;
28
- itemPartnerId: number;
29
- }, {
30
- active: boolean;
31
- catalogId: number;
32
- itemPartnerId: number;
33
- }>, "many">;
34
- company: z.ZodObject<{
35
- companyId: z.ZodNumber;
36
- companyTypes: z.ZodArray<z.ZodEnum<["SUPPLIER", "RETAILER"]>, "many">;
37
- dc4Id: z.ZodNullable<z.ZodNumber>;
38
- name: z.ZodString;
39
- orgId: z.ZodString;
40
- }, "strip", z.ZodTypeAny, {
41
- companyId: number;
42
- name: string;
43
- orgId: string;
44
- companyTypes: ("SUPPLIER" | "RETAILER")[];
45
- dc4Id: number | null;
46
- }, {
47
- companyId: number;
48
- name: string;
49
- orgId: string;
50
- companyTypes: ("SUPPLIER" | "RETAILER")[];
51
- dc4Id: number | null;
52
- }>;
53
- createdAt: z.ZodNumber;
54
- modifiedAt: z.ZodNullable<z.ZodNumber>;
55
- relationshipId: z.ZodNumber;
56
- }, "strip", z.ZodTypeAny, {
57
- application: {
58
- application: "ASSORTMENT" | "ITEM-XREF" | "TEST-ORDER-GENERATOR";
59
- relationshipApplicationId: number;
60
- }[];
61
- active: boolean;
62
- catalog: {
63
- active: boolean;
64
- catalogId: number;
65
- itemPartnerId: number;
66
- }[];
67
- company: {
68
- companyId: number;
69
- name: string;
70
- orgId: string;
71
- companyTypes: ("SUPPLIER" | "RETAILER")[];
72
- dc4Id: number | null;
73
- };
74
- createdAt: number;
75
- modifiedAt: number | null;
76
- relationshipId: number;
77
- }, {
78
- application: {
79
- application: "ASSORTMENT" | "ITEM-XREF" | "TEST-ORDER-GENERATOR";
80
- relationshipApplicationId: number;
81
- }[];
82
- active: boolean;
83
- catalog: {
84
- active: boolean;
85
- catalogId: number;
86
- itemPartnerId: number;
87
- }[];
88
- company: {
89
- companyId: number;
90
- name: string;
91
- orgId: string;
92
- companyTypes: ("SUPPLIER" | "RETAILER")[];
93
- dc4Id: number | null;
94
- };
95
- createdAt: number;
96
- modifiedAt: number | null;
97
- relationshipId: number;
98
- }>;
99
- type CompanyRelationship = z.infer<typeof relationshipSchema>;
100
-
101
- /**
102
- * Initialize Imports Api functions
103
- * @param client Assortment Client instance
104
- * @returns An object containing Imports API functions
105
- */
106
- declare function createImportsApi(client: AsstClient): {
107
- getImportErrors: (importId: string, params?: {
108
- offset?: number;
109
- limit?: number;
110
- }, signal?: AbortSignal) => Promise<{
111
- importId: number;
112
- count: number;
113
- errors: {
114
- description: string;
115
- importErrorId: number;
116
- row: number;
117
- attribute?: string | null | undefined;
118
- }[];
119
- hasNext: boolean;
120
- totalCount: number;
121
- }>;
122
- getImports: (params?: {
123
- status: string;
124
- }, signal?: AbortSignal) => Promise<Import>;
125
- getImportsStatus: (signal?: AbortSignal) => Promise<ImportsStatus[]>;
126
- uploadImport: (file: FormData) => Promise<void>;
127
- getVendorPartnerGroups: (signal?: AbortSignal) => Promise<VendorPartnerAttGroups[]>;
128
- generateImportTemplate: (params: GenerateImportTemplateParams) => Promise<void>;
129
- };
130
-
131
- /**
132
- * Initialize Exports Api functions
133
- * @param client Assortment Client instance
134
- * @param companyType Company type for perspective
135
- * @returns An object containing Exports API functions
136
- */
137
- declare function createExportsApi(client: AsstClient): {
138
- createExport: (data: Export, params?: {
139
- orgId?: string;
140
- }) => Promise<void>;
141
- downloadItems: (params: DownLoadItemsParams) => Promise<void>;
142
- };
143
-
144
- /**
145
- * Initialize Product Types Api functions
146
- * @param client Assortment Client instance
147
- * @returns An object containing Product Types API functions
148
- */
149
- declare function createProductTypesApi(client: AsstClient): {
150
- getProductTypes: (params?: {
151
- retailerIds: number[];
152
- }, signal?: AbortSignal) => Promise<AttrProdType[]>;
153
- };
154
-
155
- /**
156
- * Initialize Trading Partner Access Api functions
157
- * @param client Assortment Client instance
158
- * @returns An object containing Trading Partner Access API functions
159
- */
160
- declare function createTradingPartnerAccessApi(client: AsstClient): {
161
- getAllTradingPartners: (params?: {
162
- orgId?: string;
163
- }, signal?: AbortSignal) => Promise<TradingPartnerAccessByCompanyId>;
164
- upsertRelationship: (data: CompanyRelationshipUpsertBody) => Promise<ItemPartner>;
165
- upsertHierarchy: (data: CompanyRelationshipUpsertBody) => Promise<void>;
166
- };
167
-
168
- declare const retailerTradingPartnerStages: z.ZodArray<z.ZodEnum<["Core", "Core Plus", "Core Advanced", "Enriched", "Standard Requirements"]>, "many">;
169
- type RetailerTradingPartnerStages = z.infer<typeof retailerTradingPartnerStages>;
170
-
171
- /**
172
- * Initialize Trading Partner Settings Api functions
173
- * @param client Assortment Client instance
174
- * @returns An object containing Trading Partner Settings API functions
175
- */
176
- declare function createTradingPartnerSettingsApi(client: AsstClient): {
177
- getRetailerStages: (signal?: AbortSignal) => Promise<RetailerTradingPartnerStages>;
178
- };
179
-
180
- /**
181
- * Request payload for creating a new catalog
182
- * Matches the backend POST /categories endpoint
183
- */
184
- declare const catalogCreateRequestSchema: z.ZodObject<{
185
- type: z.ZodString;
186
- name: z.ZodString;
187
- companyId: z.ZodNumber;
188
- }, "strip", z.ZodTypeAny, {
189
- type: string;
190
- companyId: number;
191
- name: string;
192
- }, {
193
- type: string;
194
- companyId: number;
195
- name: string;
196
- }>;
197
- type CatalogCreateRequest = z.infer<typeof catalogCreateRequestSchema>;
198
- /**
199
- * Response from creating a new catalog
200
- * Returns the created category ID (lowercase 'categoryid')
201
- */
202
- declare const catalogCreateResponseSchema: z.ZodObject<{
203
- categoryid: z.ZodNumber;
204
- }, "strip", z.ZodTypeAny, {
205
- categoryid: number;
206
- }, {
207
- categoryid: number;
208
- }>;
209
- type CatalogCreateResponse = z.infer<typeof catalogCreateResponseSchema>;
210
- /**
211
- * Parameters for searching catalogs by company
212
- */
213
- declare const catalogSearchParamsSchema: z.ZodObject<{
214
- ownerCompanyIds: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
215
- searchTerms: z.ZodOptional<z.ZodString>;
216
- categoryType: z.ZodLiteral<"CATALOG">;
217
- }, "strip", z.ZodTypeAny, {
218
- categoryType: "CATALOG";
219
- ownerCompanyIds?: number[] | undefined;
220
- searchTerms?: string | undefined;
221
- }, {
222
- categoryType: "CATALOG";
223
- ownerCompanyIds?: number[] | undefined;
224
- searchTerms?: string | undefined;
225
- }>;
226
- type CatalogSearchParams = z.infer<typeof catalogSearchParamsSchema>;
227
- /**
228
- * Brief catalog information returned from search
229
- */
230
- declare const catalogBriefResponseSchema: z.ZodObject<{
231
- categoryId: z.ZodNumber;
232
- categoryName: z.ZodString;
233
- categoryDescription: z.ZodString;
234
- categoryDescriptionExt: z.ZodString;
235
- ownerCompanyId: z.ZodString;
236
- categoryTypeId: z.ZodNumber;
237
- createdAt: z.ZodString;
238
- modifiedAt: z.ZodString;
239
- createdBy: z.ZodString;
240
- modifiedBy: z.ZodString;
241
- }, "strip", z.ZodTypeAny, {
242
- createdAt: string;
243
- modifiedAt: string;
244
- createdBy: string;
245
- modifiedBy: string;
246
- categoryId: number;
247
- categoryName: string;
248
- categoryDescription: string;
249
- categoryDescriptionExt: string;
250
- ownerCompanyId: string;
251
- categoryTypeId: number;
252
- }, {
253
- createdAt: string;
254
- modifiedAt: string;
255
- createdBy: string;
256
- modifiedBy: string;
257
- categoryId: number;
258
- categoryName: string;
259
- categoryDescription: string;
260
- categoryDescriptionExt: string;
261
- ownerCompanyId: string;
262
- categoryTypeId: number;
263
- }>;
264
- type CatalogBriefResponse = z.infer<typeof catalogBriefResponseSchema>;
265
-
266
- type CategoriesApi = {
267
- getCatalogs: (params?: {
268
- categoryName?: string;
269
- orgId?: string;
270
- }, signal?: AbortSignal) => Promise<ItemCategoriesSearch>;
271
- getProductCodes: (params?: {
272
- categoryName?: string;
273
- catalogId?: string;
274
- selectionCodeId?: string;
275
- orgId?: string;
276
- }, signal?: AbortSignal) => Promise<ItemCategoriesSearch>;
277
- getSelectionCodes: (params?: {
278
- categoryName?: string;
279
- catalogId?: string;
280
- orgId?: string;
281
- }, signal?: AbortSignal) => Promise<ItemCategoriesSearch>;
282
- getItemHierarchy: (itemIds: string[]) => Promise<ItemHierarchyResponse>;
283
- createCatalog: (params: CatalogCreateRequest, signal?: AbortSignal) => Promise<CatalogCreateResponse>;
284
- searchCatalogsByCompany: (params: CatalogSearchParams, signal?: AbortSignal) => Promise<CatalogBriefResponse[]>;
285
- createCategoryHierarchy: (params?: {
286
- orgId?: string;
287
- }) => Promise<string[]>;
288
- };
289
- /**
290
- * Initialize Categories Api functions
291
- * @param client Assortment Client instance
292
- * @returns An object containing Categories API functions
293
- */
294
- declare function createCategoriesApi(client: AsstClient): CategoriesApi;
295
-
296
- /**
297
- * Initialize Locale Api functions
298
- * @param client Assortment Client instance
299
- * @returns An object containing Locale API functions
300
- */
301
- declare function createLocaleApi(client: AsstClient): {
302
- getLocale: (signal?: AbortSignal) => Promise<Locale[]>;
303
- };
304
-
305
- /**
306
- * Initialize Spreadsheet Template Api functions
307
- * @param client Assortment Client instance
308
- * @returns An object containing Spreadsheet Template API functions
309
- */
310
- declare function createSpreadsheetTemplateApi(client: AsstClient): {
311
- getTemplates: (params?: {
312
- orgId?: string;
313
- }, signal?: AbortSignal) => Promise<SpreadsheetTemplate[]>;
314
- };
315
-
316
- /**
317
- * Initialize WhoAmI Api functions
318
- * @param client Assortment Client instance
319
- * @returns An object containing WhoAmI API functions
320
- */
321
- declare function createWhoAmIApi(client: AsstClient): {
322
- whoAmI: (signal?: AbortSignal) => Promise<UserAccount>;
323
- };
324
-
325
- declare const applicationTypeSchema: z.ZodEnum<["ASSORTMENT", "ITEM-XREF", "TEST-ORDER-GENERATOR"]>;
326
- type ApplicationType = z.infer<typeof applicationTypeSchema>;
327
-
328
- /**
329
- * Note: These represent the small set of flags that are enabled via the UI. These
330
- * match the backend enum values in the CompanyFeatures service. If this list
331
- * grows significantly, we should consider moving these to their own constants file or
332
- * generating them from the backend.
333
- */
334
- type FeatureType = "RETAILERAPI" | "DELTASUPDATEEXPORT" | "ASSORTMENTUIDASHBOARD" | "PHASEDITEMSETUP" | "PUBLICIMAGEACCESS" | "SINGLEHIERARCHYBYITEM" | "DELTAPRICEEXPORT";
335
- /**
336
- * Initialize Company Features Api functions
337
- * @param client Assortment Client instance
338
- * @param companyType Company type for perspective on hybrid organisations
339
- * @returns An object containing Company Features API functions
340
- */
341
- declare function createCompanyFeaturesApi(client: AsstClient, companyType?: CompanyType): {
342
- checkIfStageItemSetupIsEnabled: (signal?: AbortSignal) => Promise<boolean>;
343
- enableFeatureForCompany: (featureKey: FeatureType, companyId: number) => Promise<void>;
344
- };
345
-
346
- interface FlagOptions {
347
- companyId?: string;
348
- signal?: AbortSignal;
349
- }
350
- /**
351
- * Initialize Feature Flags Api functions
352
- * @param client Assortment Client instance
353
- * @returns An object containing feature flags utility functions
354
- */
355
- declare function createFeatureFlagsApi(client: AsstClient): {
356
- checkEnableItemsLevelMSIS: (signal?: AbortSignal) => Promise<boolean>;
357
- checkIfEnabledForPackagingHierarchies: (signal?: AbortSignal) => Promise<boolean>;
358
- checkIfEnabledForItemUomConversionRules: (flagOptions?: FlagOptions) => Promise<boolean>;
359
- checkIfItemMatchEnabled: (flagOptions?: FlagOptions) => Promise<boolean>;
360
- };
361
-
362
- declare const itemStatusResponseSchema: z.ZodObject<{
363
- itemStatuses: z.ZodArray<z.ZodObject<{
364
- itemId: z.ZodString;
365
- itemOrgStatuses: z.ZodArray<z.ZodObject<{
366
- org: z.ZodObject<{
367
- ref: z.ZodString;
368
- id: z.ZodString;
369
- name: z.ZodString;
370
- }, "strip", z.ZodTypeAny, {
371
- name: string;
372
- id: string;
373
- ref: string;
374
- }, {
375
- name: string;
376
- id: string;
377
- ref: string;
378
- }>;
379
- lowestInvalidStage: z.ZodNullable<z.ZodEnum<["CORE", "CORE_PLUS", "CORE_ADVANCED", "ENRICHED", "STANDARD_REQUIREMENTS"]>>;
380
- validForRelationship: z.ZodBoolean;
381
- }, "strip", z.ZodTypeAny, {
382
- org: {
383
- name: string;
384
- id: string;
385
- ref: string;
386
- };
387
- lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
388
- validForRelationship: boolean;
389
- }, {
390
- org: {
391
- name: string;
392
- id: string;
393
- ref: string;
394
- };
395
- lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
396
- validForRelationship: boolean;
397
- }>, "many">;
398
- }, "strip", z.ZodTypeAny, {
399
- itemId: string;
400
- itemOrgStatuses: {
401
- org: {
402
- name: string;
403
- id: string;
404
- ref: string;
405
- };
406
- lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
407
- validForRelationship: boolean;
408
- }[];
409
- }, {
410
- itemId: string;
411
- itemOrgStatuses: {
412
- org: {
413
- name: string;
414
- id: string;
415
- ref: string;
416
- };
417
- lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
418
- validForRelationship: boolean;
419
- }[];
420
- }>, "many">;
421
- }, "strip", z.ZodTypeAny, {
422
- itemStatuses: {
423
- itemId: string;
424
- itemOrgStatuses: {
425
- org: {
426
- name: string;
427
- id: string;
428
- ref: string;
429
- };
430
- lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
431
- validForRelationship: boolean;
432
- }[];
433
- }[];
434
- }, {
435
- itemStatuses: {
436
- itemId: string;
437
- itemOrgStatuses: {
438
- org: {
439
- name: string;
440
- id: string;
441
- ref: string;
442
- };
443
- lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
444
- validForRelationship: boolean;
445
- }[];
446
- }[];
447
- }>;
448
- type ItemStatusResponse = z.infer<typeof itemStatusResponseSchema>;
449
-
450
- declare const itemStatusSchema: z.ZodObject<{
451
- itemId: z.ZodString;
452
- itemOrgStatuses: z.ZodArray<z.ZodObject<{
453
- org: z.ZodObject<{
454
- ref: z.ZodString;
455
- id: z.ZodString;
456
- name: z.ZodString;
457
- }, "strip", z.ZodTypeAny, {
458
- name: string;
459
- id: string;
460
- ref: string;
461
- }, {
462
- name: string;
463
- id: string;
464
- ref: string;
465
- }>;
466
- lowestInvalidStage: z.ZodNullable<z.ZodEnum<["CORE", "CORE_PLUS", "CORE_ADVANCED", "ENRICHED", "STANDARD_REQUIREMENTS"]>>;
467
- validForRelationship: z.ZodBoolean;
468
- }, "strip", z.ZodTypeAny, {
469
- org: {
470
- name: string;
471
- id: string;
472
- ref: string;
473
- };
474
- lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
475
- validForRelationship: boolean;
476
- }, {
477
- org: {
478
- name: string;
479
- id: string;
480
- ref: string;
481
- };
482
- lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
483
- validForRelationship: boolean;
484
- }>, "many">;
485
- }, "strip", z.ZodTypeAny, {
486
- itemId: string;
487
- itemOrgStatuses: {
488
- org: {
489
- name: string;
490
- id: string;
491
- ref: string;
492
- };
493
- lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
494
- validForRelationship: boolean;
495
- }[];
496
- }, {
497
- itemId: string;
498
- itemOrgStatuses: {
499
- org: {
500
- name: string;
501
- id: string;
502
- ref: string;
503
- };
504
- lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
505
- validForRelationship: boolean;
506
- }[];
507
- }>;
508
- type ItemStatus = z.infer<typeof itemStatusSchema>;
509
-
510
- declare const itemOrgStatusSchema: z.ZodObject<{
511
- org: z.ZodObject<{
512
- ref: z.ZodString;
513
- id: z.ZodString;
514
- name: z.ZodString;
515
- }, "strip", z.ZodTypeAny, {
516
- name: string;
517
- id: string;
518
- ref: string;
519
- }, {
520
- name: string;
521
- id: string;
522
- ref: string;
523
- }>;
524
- lowestInvalidStage: z.ZodNullable<z.ZodEnum<["CORE", "CORE_PLUS", "CORE_ADVANCED", "ENRICHED", "STANDARD_REQUIREMENTS"]>>;
525
- validForRelationship: z.ZodBoolean;
526
- }, "strip", z.ZodTypeAny, {
527
- org: {
528
- name: string;
529
- id: string;
530
- ref: string;
531
- };
532
- lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
533
- validForRelationship: boolean;
534
- }, {
535
- org: {
536
- name: string;
537
- id: string;
538
- ref: string;
539
- };
540
- lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
541
- validForRelationship: boolean;
542
- }>;
543
- type ItemOrgStatus = z.infer<typeof itemOrgStatusSchema>;
544
-
545
- type ItemsApi = {
546
- searchItems: (params?: {
547
- url: string;
548
- limit?: number;
549
- offset?: number;
550
- applicationType?: ApplicationType;
551
- }, signal?: AbortSignal) => Promise<ItemSearchView>;
552
- getItem: (itemId: string, locale?: string, signal?: AbortSignal) => Promise<ItemDetailView>;
553
- updateItem: (itemId: string, item: ItemDetail) => Promise<void>;
554
- deleteItem: (itemId: number) => Promise<void>;
555
- deleteItems: (itemIds: string[]) => Promise<void>;
556
- getItemInfoId: (spsItemId: string, signal?: AbortSignal) => Promise<number>;
557
- getSpsItemId: (itemInfoId: string, signal?: AbortSignal) => Promise<SpsItemIdResponse>;
558
- };
559
- /**
560
- * Initialize Items Api functions
561
- * @param client Assortment Client instance
562
- * @returns An object containing Items API functions
563
- */
564
- declare function createItemsApi(client: AsstClient): ItemsApi;
565
-
566
- declare const itemOrgStageDetailsSchema: z.ZodObject<{
567
- /**
568
- * When called as retailer, the vendor, else when vendor, the retailer.
569
- * */
570
- orgSummary: z.ZodObject<{
571
- ref: z.ZodString;
572
- id: z.ZodString;
573
- name: z.ZodString;
574
- }, "strip", z.ZodTypeAny, {
575
- name: string;
576
- id: string;
577
- ref: string;
578
- }, {
579
- name: string;
580
- id: string;
581
- ref: string;
582
- }>;
583
- /**
584
- * The company id of the retailer or vendor used for matching ItemOrgStageDetails to TradingPartnerStage for ErrorService
585
- */
586
- companyId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
587
- /**
588
- * "Standard Requirements" (null) UNLESS the retailer of the item is MSIS Enabled
589
- * OTHERWISE the retailer default Stage UNLESS there's a currently active vendor-specific Stage defined
590
- * OTHERWISE the trading partnership Stage UNLESS there's a currently active Item Level override defined
591
- * OTHERWISE the item level override */
592
- stage: z.ZodOptional<z.ZodNullable<z.ZodEnum<["CORE", "CORE_PLUS", "CORE_ADVANCED", "ENRICHED"]>>>;
593
- /**
594
- * If the item is valid for the active stage. Note that for "Standard Requirements" or
595
- * "Enriched" this cam come directly from the item_doc table, but anything else requires validation
596
- */
597
- isValid: z.ZodBoolean;
598
- /**
599
- * Not null if there's an item level policy override for this trading partnership
600
- */
601
- itemPolicyId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
602
- /**
603
- * Start date for the Item level Stage if applicable
604
- */
605
- startDate: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, Date, number>>>;
606
- /**
607
- * End date for the Item level Stage if applicable
608
- */
609
- endDate: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, Date, number>>>;
610
- }, "strip", z.ZodTypeAny, {
611
- isValid: boolean;
612
- orgSummary: {
613
- name: string;
614
- id: string;
615
- ref: string;
616
- };
617
- companyId?: number | null | undefined;
618
- stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
619
- itemPolicyId?: string | null | undefined;
620
- startDate?: Date | null | undefined;
621
- endDate?: Date | null | undefined;
622
- }, {
623
- isValid: boolean;
624
- orgSummary: {
625
- name: string;
626
- id: string;
627
- ref: string;
628
- };
629
- companyId?: number | null | undefined;
630
- stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
631
- itemPolicyId?: string | null | undefined;
632
- startDate?: number | null | undefined;
633
- endDate?: number | null | undefined;
634
- }>;
635
- type ItemOrgStageDetails = z.infer<typeof itemOrgStageDetailsSchema>;
636
-
637
- declare const itemStatusV2Schema: z.ZodObject<{
638
- itemId: z.ZodString;
639
- mostRestrictiveRetailerStage: z.ZodNullable<z.ZodEnum<["CORE", "CORE_PLUS", "CORE_ADVANCED", "ENRICHED"]>>;
640
- itemOrgStageDetails: z.ZodArray<z.ZodObject<{
641
- orgSummary: z.ZodObject<{
642
- ref: z.ZodString;
643
- id: z.ZodString;
644
- name: z.ZodString;
645
- }, "strip", z.ZodTypeAny, {
646
- name: string;
647
- id: string;
648
- ref: string;
649
- }, {
650
- name: string;
651
- id: string;
652
- ref: string;
653
- }>;
654
- companyId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
655
- stage: z.ZodOptional<z.ZodNullable<z.ZodEnum<["CORE", "CORE_PLUS", "CORE_ADVANCED", "ENRICHED"]>>>;
656
- isValid: z.ZodBoolean;
657
- itemPolicyId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
658
- startDate: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, Date, number>>>;
659
- endDate: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, Date, number>>>;
660
- }, "strip", z.ZodTypeAny, {
661
- isValid: boolean;
662
- orgSummary: {
663
- name: string;
664
- id: string;
665
- ref: string;
666
- };
667
- companyId?: number | null | undefined;
668
- stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
669
- itemPolicyId?: string | null | undefined;
670
- startDate?: Date | null | undefined;
671
- endDate?: Date | null | undefined;
672
- }, {
673
- isValid: boolean;
674
- orgSummary: {
675
- name: string;
676
- id: string;
677
- ref: string;
678
- };
679
- companyId?: number | null | undefined;
680
- stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
681
- itemPolicyId?: string | null | undefined;
682
- startDate?: number | null | undefined;
683
- endDate?: number | null | undefined;
684
- }>, "many">;
685
- }, "strip", z.ZodTypeAny, {
686
- itemId: string;
687
- mostRestrictiveRetailerStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null;
688
- itemOrgStageDetails: {
689
- isValid: boolean;
690
- orgSummary: {
691
- name: string;
692
- id: string;
693
- ref: string;
694
- };
695
- companyId?: number | null | undefined;
696
- stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
697
- itemPolicyId?: string | null | undefined;
698
- startDate?: Date | null | undefined;
699
- endDate?: Date | null | undefined;
700
- }[];
701
- }, {
702
- itemId: string;
703
- mostRestrictiveRetailerStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null;
704
- itemOrgStageDetails: {
705
- isValid: boolean;
706
- orgSummary: {
707
- name: string;
708
- id: string;
709
- ref: string;
710
- };
711
- companyId?: number | null | undefined;
712
- stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
713
- itemPolicyId?: string | null | undefined;
714
- startDate?: number | null | undefined;
715
- endDate?: number | null | undefined;
716
- }[];
717
- }>;
718
- type ItemStatusV2 = z.infer<typeof itemStatusV2Schema>;
719
-
720
- declare const itemStatusV2ResponseSchema: z.ZodObject<{
721
- itemStatuses: z.ZodArray<z.ZodObject<{
722
- itemId: z.ZodString;
723
- mostRestrictiveRetailerStage: z.ZodNullable<z.ZodEnum<["CORE", "CORE_PLUS", "CORE_ADVANCED", "ENRICHED"]>>;
724
- itemOrgStageDetails: z.ZodArray<z.ZodObject<{
725
- orgSummary: z.ZodObject<{
726
- ref: z.ZodString;
727
- id: z.ZodString;
728
- name: z.ZodString;
729
- }, "strip", z.ZodTypeAny, {
730
- name: string;
731
- id: string;
732
- ref: string;
733
- }, {
734
- name: string;
735
- id: string;
736
- ref: string;
737
- }>;
738
- companyId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
739
- stage: z.ZodOptional<z.ZodNullable<z.ZodEnum<["CORE", "CORE_PLUS", "CORE_ADVANCED", "ENRICHED"]>>>;
740
- isValid: z.ZodBoolean;
741
- itemPolicyId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
742
- startDate: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, Date, number>>>;
743
- endDate: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, Date, number>>>;
744
- }, "strip", z.ZodTypeAny, {
745
- isValid: boolean;
746
- orgSummary: {
747
- name: string;
748
- id: string;
749
- ref: string;
750
- };
751
- companyId?: number | null | undefined;
752
- stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
753
- itemPolicyId?: string | null | undefined;
754
- startDate?: Date | null | undefined;
755
- endDate?: Date | null | undefined;
756
- }, {
757
- isValid: boolean;
758
- orgSummary: {
759
- name: string;
760
- id: string;
761
- ref: string;
762
- };
763
- companyId?: number | null | undefined;
764
- stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
765
- itemPolicyId?: string | null | undefined;
766
- startDate?: number | null | undefined;
767
- endDate?: number | null | undefined;
768
- }>, "many">;
769
- }, "strip", z.ZodTypeAny, {
770
- itemId: string;
771
- mostRestrictiveRetailerStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null;
772
- itemOrgStageDetails: {
773
- isValid: boolean;
774
- orgSummary: {
775
- name: string;
776
- id: string;
777
- ref: string;
778
- };
779
- companyId?: number | null | undefined;
780
- stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
781
- itemPolicyId?: string | null | undefined;
782
- startDate?: Date | null | undefined;
783
- endDate?: Date | null | undefined;
784
- }[];
785
- }, {
786
- itemId: string;
787
- mostRestrictiveRetailerStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null;
788
- itemOrgStageDetails: {
789
- isValid: boolean;
790
- orgSummary: {
791
- name: string;
792
- id: string;
793
- ref: string;
794
- };
795
- companyId?: number | null | undefined;
796
- stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
797
- itemPolicyId?: string | null | undefined;
798
- startDate?: number | null | undefined;
799
- endDate?: number | null | undefined;
800
- }[];
801
- }>, "many">;
802
- }, "strip", z.ZodTypeAny, {
803
- itemStatuses: {
804
- itemId: string;
805
- mostRestrictiveRetailerStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null;
806
- itemOrgStageDetails: {
807
- isValid: boolean;
808
- orgSummary: {
809
- name: string;
810
- id: string;
811
- ref: string;
812
- };
813
- companyId?: number | null | undefined;
814
- stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
815
- itemPolicyId?: string | null | undefined;
816
- startDate?: Date | null | undefined;
817
- endDate?: Date | null | undefined;
818
- }[];
819
- }[];
820
- }, {
821
- itemStatuses: {
822
- itemId: string;
823
- mostRestrictiveRetailerStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null;
824
- itemOrgStageDetails: {
825
- isValid: boolean;
826
- orgSummary: {
827
- name: string;
828
- id: string;
829
- ref: string;
830
- };
831
- companyId?: number | null | undefined;
832
- stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
833
- itemPolicyId?: string | null | undefined;
834
- startDate?: number | null | undefined;
835
- endDate?: number | null | undefined;
836
- }[];
837
- }[];
838
- }>;
839
- type ItemStatusV2Response = z.infer<typeof itemStatusV2ResponseSchema>;
840
-
841
- declare const orgSummarySchema: z.ZodObject<{
842
- ref: z.ZodString;
843
- id: z.ZodString;
844
- name: z.ZodString;
845
- }, "strip", z.ZodTypeAny, {
846
- name: string;
847
- id: string;
848
- ref: string;
849
- }, {
850
- name: string;
851
- id: string;
852
- ref: string;
853
- }>;
854
- type OrgSummary = z.infer<typeof orgSummarySchema>;
855
-
856
- declare const stageSchema: z.ZodEnum<["CORE", "CORE_PLUS", "CORE_ADVANCED", "ENRICHED"]>;
857
- type Stage = z.infer<typeof stageSchema>;
858
-
859
- /**
860
- * Initialize Items Api functions
861
- * @param client Assortment Client instance
862
- * @returns An object containing Items API functions
863
- */
864
- declare function createItemsApiV2(client: AsstClient): {
865
- getItemStatus: (itemIds: string[]) => Promise<ItemStatusV2Response>;
866
- };
867
-
868
- /**
869
- * Initialize Errors Api functions
870
- * @param client Assortment Client instance
871
- * @returns An object containing Errors API functions
872
- */
873
- declare function createErrorsApi(client: AsstClient): {
874
- getInvalidItemErrorDetails: (itemInfoId: string, signal?: AbortSignal) => Promise<ItemErrorDetailsResult>;
875
- };
876
-
877
- type GetItemErrorSummaryParams = {
878
- searchField?: string;
879
- searchText?: string;
880
- tradingPartnerIds?: number[];
881
- offset?: number;
882
- limit?: number;
883
- docInEventId?: string;
884
- importId?: string;
885
- };
886
- /**
887
- * Initialize Errors Api functions
888
- * @param client Assortment Client instance
889
- * @param companyType Company type for perspective
890
- * @returns An object containing Errors API functions
891
- */
892
- declare function createErrorsApiV2(client: AsstClient): {
893
- getItemErrorSummary: (params: GetItemErrorSummaryParams, signal?: AbortSignal) => Promise<ItemErrorSummaryResultV2>;
894
- getItemErrorDetails: (itemInfoId: number, signal?: AbortSignal) => Promise<ItemErrorDetailsResultV2>;
895
- };
896
-
897
- declare const FlattenedItemIdentifierKeys: readonly ["eaneight", "upc", "ean", "gtin", "upcCaseCode", "buyerPartNumber", "partnumber", "isbn", "sku", "nationalDrugCode", "drugIdentificationNumber", "nationalHealthRelatedItemCode", "manufacturersPartNumber", "internationalStandardSerialNumber", "nabcaNumber", "erpId", "componentId"];
898
- type FlattenedItemIdentifiers = (typeof FlattenedItemIdentifierKeys)[number];
899
-
900
- declare const uniqueCriteriaOptionsSchema: z.ZodArray<z.ZodObject<{
901
- name: z.ZodString;
902
- value: z.ZodString;
903
- }, "strip", z.ZodTypeAny, {
904
- value: string;
905
- name: string;
906
- }, {
907
- value: string;
908
- name: string;
909
- }>, "many">;
910
- type UniqueCriteriaOptions = z.infer<typeof uniqueCriteriaOptionsSchema>;
911
-
912
- /**
913
- * Initialize UniqueCriteria Api functions
914
- * @param client Assortment Client instance
915
- * @returns An object containing UniqueCriteria API functions
916
- */
917
- declare function createUniqueCriteriaApi(client: AsstClient): {
918
- getUniqueCriteriaOptions: () => Promise<UniqueCriteriaOptions>;
919
- getUniqueCriteriaByOrg: (params?: {
920
- orgId?: string;
921
- }, signal?: AbortSignal) => Promise<string[]>;
922
- getProductUniqueCriteriaByOrg: (params?: {
923
- orgId?: string;
924
- }, signal?: AbortSignal) => Promise<FlattenedItemIdentifiers[]>;
925
- updateMultipleUniqueCriteriaAttributes: (uniqueAttributes: {
926
- uniqueAttribute: string;
927
- }[], companyId: number) => Promise<void>;
928
- };
929
-
930
- /**
931
- * Initialize Companies Api functions
932
- * @param client Assortment Client instance
933
- * @returns A CompanyBriefByOrg object containing Companies API functions
934
- */
935
- declare function createCompaniesApi(client: AsstClient): {
936
- getCompanyBriefInfoByOrg: (params?: {
937
- orgId?: string;
938
- }, signal?: AbortSignal) => Promise<CompanyBriefByOrg>;
939
- companySearch: (params?: CompanySearchParams, signal?: AbortSignal) => Promise<CompanySearch[]>;
940
- getCompanyById: (companyId: number, signal?: AbortSignal) => Promise<Company>;
941
- };
942
-
943
- declare const activateRuleRequestDtoSchema: z.ZodObject<{
944
- instanceId: z.ZodNullable<z.ZodString>;
945
- description: z.ZodString;
946
- }, "strip", z.ZodTypeAny, {
947
- description: string;
948
- instanceId: string | null;
949
- }, {
950
- description: string;
951
- instanceId: string | null;
952
- }>;
953
- type ActivateRuleRequestDto = z.infer<typeof activateRuleRequestDtoSchema>;
954
-
955
- /**
956
- * Initialize Rules Management Api functions
957
- * @param client Assortment Client instance
958
- * @returns An object containing Rules Management API functions
959
- */
960
- declare function createRulesManagementApi(client: AsstClient): {
961
- activateRule: (ruleId: string, request: ActivateRuleRequestDto, signal?: AbortSignal) => Promise<void>;
962
- };
963
-
964
- export { type ActivateRuleRequestDto, type ApplicationType, AsstClient, AttrProdType, type CatalogBriefResponse, type CatalogCreateRequest, type CatalogCreateResponse, type CatalogSearchParams, type CategoriesApi, Company, CompanyBriefByOrg, type CompanyRelationship, CompanyRelationshipUpsertBody, CompanySearch, CompanySearchParams, CompanyType, DownLoadItemsParams, Export, type FeatureType, type FlagOptions, type FlattenedItemIdentifiers, GenerateImportTemplateParams, type GetItemErrorSummaryParams, Import, ImportsStatus, ItemCategoriesSearch, ItemDetail, ItemDetailView, ItemErrorDetailsResult, ItemErrorDetailsResultV2, ItemErrorSummaryResultV2, ItemHierarchyResponse, type ItemOrgStageDetails, type ItemOrgStatus, ItemPartner, ItemSearchView, type ItemStatus, type ItemStatusResponse, type ItemStatusV2, type ItemStatusV2Response, type ItemsApi, Locale, type OrgSummary, type RetailerTradingPartnerStages, SpreadsheetTemplate, SpsItemIdResponse, type Stage, TradingPartnerAccessByCompanyId, type UniqueCriteriaOptions, UserAccount, VendorPartnerAttGroups, createCategoriesApi, createCompaniesApi, createCompanyFeaturesApi, createErrorsApi, createErrorsApiV2, createExportsApi, createFeatureFlagsApi, createImportsApi, createItemsApi, createItemsApiV2, createLocaleApi, createProductTypesApi, createRulesManagementApi, createSpreadsheetTemplateApi, createTradingPartnerAccessApi, createTradingPartnerSettingsApi, createUniqueCriteriaApi, createWhoAmIApi };