@spscommerce/asst-api 5.3.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,994 +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
- * Defined as a const tuple so that both the `FeatureType` union and the Zod schema
335
- * share a single source of truth — adding a value here automatically widens both.
336
- */
337
- type FeatureType = "RETAILERAPI" | "DELTASUPDATEEXPORT" | "ASSORTMENTUIDASHBOARD" | "PHASEDITEMSETUP" | "PUBLICIMAGEACCESS" | "SINGLEHIERARCHYBYITEM" | "DELTAPRICEEXPORT" | "ASSORTMENTXREF";
338
- declare const companyFeatureSchema: z.ZodObject<{
339
- /**
340
- * Validated as a string at runtime so that unknown feature types returned by the
341
- * backend (e.g., after a backend-only deploy) never cause a ZodError. The TypeScript
342
- * type is narrowed to `FeatureType` so callers still get compile-time checking when
343
- * comparing against known values.
344
- */
345
- type: z.ZodString;
346
- display: z.ZodString;
347
- active: z.ZodBoolean;
348
- assortmentSystemInstanceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
349
- defaultCatalogId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
350
- }, "strip", z.ZodTypeAny, {
351
- type: string;
352
- active: boolean;
353
- display: string;
354
- assortmentSystemInstanceId?: string | null | undefined;
355
- defaultCatalogId?: number | null | undefined;
356
- }, {
357
- type: string;
358
- active: boolean;
359
- display: string;
360
- assortmentSystemInstanceId?: string | null | undefined;
361
- defaultCatalogId?: number | null | undefined;
362
- }>;
363
- type CompanyFeature = z.infer<typeof companyFeatureSchema>;
364
- /**
365
- * Initialize Company Features Api functions
366
- * @param client Assortment Client instance
367
- * @param companyType Company type for perspective on hybrid organisations
368
- * @returns An object containing Company Features API functions
369
- */
370
- declare function createCompanyFeaturesApi(client: AsstClient, companyType?: CompanyType): {
371
- checkIfStageItemSetupIsEnabled: (signal?: AbortSignal) => Promise<boolean>;
372
- enableFeatureForCompany: (featureKey: FeatureType, companyId: number) => Promise<void>;
373
- getFeaturesForCompany: (companyId: number, signal?: AbortSignal) => Promise<CompanyFeature[]>;
374
- };
375
-
376
- interface FlagOptions {
377
- companyId?: string;
378
- signal?: AbortSignal;
379
- }
380
- /**
381
- * Initialize Feature Flags Api functions
382
- * @param client Assortment Client instance
383
- * @returns An object containing feature flags utility functions
384
- */
385
- declare function createFeatureFlagsApi(client: AsstClient): {
386
- checkEnableItemsLevelMSIS: (signal?: AbortSignal) => Promise<boolean>;
387
- checkIfEnabledForPackagingHierarchies: (signal?: AbortSignal) => Promise<boolean>;
388
- checkIfEnabledForItemUomConversionRules: (flagOptions?: FlagOptions) => Promise<boolean>;
389
- checkIfItemMatchEnabled: (flagOptions?: FlagOptions) => Promise<boolean>;
390
- };
391
-
392
- declare const itemStatusResponseSchema: z.ZodObject<{
393
- itemStatuses: z.ZodArray<z.ZodObject<{
394
- itemId: z.ZodString;
395
- itemOrgStatuses: z.ZodArray<z.ZodObject<{
396
- org: z.ZodObject<{
397
- ref: z.ZodString;
398
- id: z.ZodString;
399
- name: z.ZodString;
400
- }, "strip", z.ZodTypeAny, {
401
- name: string;
402
- id: string;
403
- ref: string;
404
- }, {
405
- name: string;
406
- id: string;
407
- ref: string;
408
- }>;
409
- lowestInvalidStage: z.ZodNullable<z.ZodEnum<["CORE", "CORE_PLUS", "CORE_ADVANCED", "ENRICHED", "STANDARD_REQUIREMENTS"]>>;
410
- validForRelationship: z.ZodBoolean;
411
- }, "strip", z.ZodTypeAny, {
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
- org: {
421
- name: string;
422
- id: string;
423
- ref: string;
424
- };
425
- lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
426
- validForRelationship: boolean;
427
- }>, "many">;
428
- }, "strip", z.ZodTypeAny, {
429
- itemId: string;
430
- itemOrgStatuses: {
431
- org: {
432
- name: string;
433
- id: string;
434
- ref: string;
435
- };
436
- lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
437
- validForRelationship: boolean;
438
- }[];
439
- }, {
440
- itemId: string;
441
- itemOrgStatuses: {
442
- org: {
443
- name: string;
444
- id: string;
445
- ref: string;
446
- };
447
- lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
448
- validForRelationship: boolean;
449
- }[];
450
- }>, "many">;
451
- }, "strip", z.ZodTypeAny, {
452
- itemStatuses: {
453
- itemId: string;
454
- itemOrgStatuses: {
455
- org: {
456
- name: string;
457
- id: string;
458
- ref: string;
459
- };
460
- lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
461
- validForRelationship: boolean;
462
- }[];
463
- }[];
464
- }, {
465
- itemStatuses: {
466
- itemId: string;
467
- itemOrgStatuses: {
468
- org: {
469
- name: string;
470
- id: string;
471
- ref: string;
472
- };
473
- lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
474
- validForRelationship: boolean;
475
- }[];
476
- }[];
477
- }>;
478
- type ItemStatusResponse = z.infer<typeof itemStatusResponseSchema>;
479
-
480
- declare const itemStatusSchema: z.ZodObject<{
481
- itemId: z.ZodString;
482
- itemOrgStatuses: z.ZodArray<z.ZodObject<{
483
- org: z.ZodObject<{
484
- ref: z.ZodString;
485
- id: z.ZodString;
486
- name: z.ZodString;
487
- }, "strip", z.ZodTypeAny, {
488
- name: string;
489
- id: string;
490
- ref: string;
491
- }, {
492
- name: string;
493
- id: string;
494
- ref: string;
495
- }>;
496
- lowestInvalidStage: z.ZodNullable<z.ZodEnum<["CORE", "CORE_PLUS", "CORE_ADVANCED", "ENRICHED", "STANDARD_REQUIREMENTS"]>>;
497
- validForRelationship: z.ZodBoolean;
498
- }, "strip", z.ZodTypeAny, {
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
- org: {
508
- name: string;
509
- id: string;
510
- ref: string;
511
- };
512
- lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
513
- validForRelationship: boolean;
514
- }>, "many">;
515
- }, "strip", z.ZodTypeAny, {
516
- itemId: string;
517
- itemOrgStatuses: {
518
- org: {
519
- name: string;
520
- id: string;
521
- ref: string;
522
- };
523
- lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
524
- validForRelationship: boolean;
525
- }[];
526
- }, {
527
- itemId: string;
528
- itemOrgStatuses: {
529
- org: {
530
- name: string;
531
- id: string;
532
- ref: string;
533
- };
534
- lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
535
- validForRelationship: boolean;
536
- }[];
537
- }>;
538
- type ItemStatus = z.infer<typeof itemStatusSchema>;
539
-
540
- declare const itemOrgStatusSchema: z.ZodObject<{
541
- org: z.ZodObject<{
542
- ref: z.ZodString;
543
- id: z.ZodString;
544
- name: z.ZodString;
545
- }, "strip", z.ZodTypeAny, {
546
- name: string;
547
- id: string;
548
- ref: string;
549
- }, {
550
- name: string;
551
- id: string;
552
- ref: string;
553
- }>;
554
- lowestInvalidStage: z.ZodNullable<z.ZodEnum<["CORE", "CORE_PLUS", "CORE_ADVANCED", "ENRICHED", "STANDARD_REQUIREMENTS"]>>;
555
- validForRelationship: z.ZodBoolean;
556
- }, "strip", z.ZodTypeAny, {
557
- org: {
558
- name: string;
559
- id: string;
560
- ref: string;
561
- };
562
- lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
563
- validForRelationship: boolean;
564
- }, {
565
- org: {
566
- name: string;
567
- id: string;
568
- ref: string;
569
- };
570
- lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
571
- validForRelationship: boolean;
572
- }>;
573
- type ItemOrgStatus = z.infer<typeof itemOrgStatusSchema>;
574
-
575
- type ItemsApi = {
576
- searchItems: (params?: {
577
- url: string;
578
- limit?: number;
579
- offset?: number;
580
- applicationType?: ApplicationType;
581
- }, signal?: AbortSignal) => Promise<ItemSearchView>;
582
- getItem: (itemId: string, locale?: string, signal?: AbortSignal) => Promise<ItemDetailView>;
583
- updateItem: (itemId: string, item: ItemDetail) => Promise<void>;
584
- deleteItem: (itemId: number) => Promise<void>;
585
- deleteItems: (itemIds: string[]) => Promise<void>;
586
- getItemInfoId: (spsItemId: string, signal?: AbortSignal) => Promise<number>;
587
- getSpsItemId: (itemInfoId: string, signal?: AbortSignal) => Promise<SpsItemIdResponse>;
588
- };
589
- /**
590
- * Initialize Items Api functions
591
- * @param client Assortment Client instance
592
- * @returns An object containing Items API functions
593
- */
594
- declare function createItemsApi(client: AsstClient): ItemsApi;
595
-
596
- declare const itemOrgStageDetailsSchema: z.ZodObject<{
597
- /**
598
- * When called as retailer, the vendor, else when vendor, the retailer.
599
- * */
600
- orgSummary: z.ZodObject<{
601
- ref: z.ZodString;
602
- id: z.ZodString;
603
- name: z.ZodString;
604
- }, "strip", z.ZodTypeAny, {
605
- name: string;
606
- id: string;
607
- ref: string;
608
- }, {
609
- name: string;
610
- id: string;
611
- ref: string;
612
- }>;
613
- /**
614
- * The company id of the retailer or vendor used for matching ItemOrgStageDetails to TradingPartnerStage for ErrorService
615
- */
616
- companyId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
617
- /**
618
- * "Standard Requirements" (null) UNLESS the retailer of the item is MSIS Enabled
619
- * OTHERWISE the retailer default Stage UNLESS there's a currently active vendor-specific Stage defined
620
- * OTHERWISE the trading partnership Stage UNLESS there's a currently active Item Level override defined
621
- * OTHERWISE the item level override */
622
- stage: z.ZodOptional<z.ZodNullable<z.ZodEnum<["CORE", "CORE_PLUS", "CORE_ADVANCED", "ENRICHED"]>>>;
623
- /**
624
- * If the item is valid for the active stage. Note that for "Standard Requirements" or
625
- * "Enriched" this cam come directly from the item_doc table, but anything else requires validation
626
- */
627
- isValid: z.ZodBoolean;
628
- /**
629
- * Not null if there's an item level policy override for this trading partnership
630
- */
631
- itemPolicyId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
632
- /**
633
- * Start date for the Item level Stage if applicable
634
- */
635
- startDate: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, Date, number>>>;
636
- /**
637
- * End date for the Item level Stage if applicable
638
- */
639
- endDate: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, Date, number>>>;
640
- }, "strip", z.ZodTypeAny, {
641
- isValid: boolean;
642
- orgSummary: {
643
- name: string;
644
- id: string;
645
- ref: string;
646
- };
647
- companyId?: number | null | undefined;
648
- stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
649
- itemPolicyId?: string | null | undefined;
650
- startDate?: Date | null | undefined;
651
- endDate?: Date | null | undefined;
652
- }, {
653
- isValid: boolean;
654
- orgSummary: {
655
- name: string;
656
- id: string;
657
- ref: string;
658
- };
659
- companyId?: number | null | undefined;
660
- stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
661
- itemPolicyId?: string | null | undefined;
662
- startDate?: number | null | undefined;
663
- endDate?: number | null | undefined;
664
- }>;
665
- type ItemOrgStageDetails = z.infer<typeof itemOrgStageDetailsSchema>;
666
-
667
- declare const itemStatusV2Schema: z.ZodObject<{
668
- itemId: z.ZodString;
669
- mostRestrictiveRetailerStage: z.ZodNullable<z.ZodEnum<["CORE", "CORE_PLUS", "CORE_ADVANCED", "ENRICHED"]>>;
670
- itemOrgStageDetails: z.ZodArray<z.ZodObject<{
671
- orgSummary: z.ZodObject<{
672
- ref: z.ZodString;
673
- id: z.ZodString;
674
- name: z.ZodString;
675
- }, "strip", z.ZodTypeAny, {
676
- name: string;
677
- id: string;
678
- ref: string;
679
- }, {
680
- name: string;
681
- id: string;
682
- ref: string;
683
- }>;
684
- companyId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
685
- stage: z.ZodOptional<z.ZodNullable<z.ZodEnum<["CORE", "CORE_PLUS", "CORE_ADVANCED", "ENRICHED"]>>>;
686
- isValid: z.ZodBoolean;
687
- itemPolicyId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
688
- startDate: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, Date, number>>>;
689
- endDate: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, Date, number>>>;
690
- }, "strip", z.ZodTypeAny, {
691
- isValid: boolean;
692
- orgSummary: {
693
- name: string;
694
- id: string;
695
- ref: string;
696
- };
697
- companyId?: number | null | undefined;
698
- stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
699
- itemPolicyId?: string | null | undefined;
700
- startDate?: Date | null | undefined;
701
- endDate?: Date | null | undefined;
702
- }, {
703
- isValid: boolean;
704
- orgSummary: {
705
- name: string;
706
- id: string;
707
- ref: string;
708
- };
709
- companyId?: number | null | undefined;
710
- stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
711
- itemPolicyId?: string | null | undefined;
712
- startDate?: number | null | undefined;
713
- endDate?: number | null | undefined;
714
- }>, "many">;
715
- }, "strip", z.ZodTypeAny, {
716
- itemId: string;
717
- mostRestrictiveRetailerStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null;
718
- itemOrgStageDetails: {
719
- isValid: boolean;
720
- orgSummary: {
721
- name: string;
722
- id: string;
723
- ref: string;
724
- };
725
- companyId?: number | null | undefined;
726
- stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
727
- itemPolicyId?: string | null | undefined;
728
- startDate?: Date | null | undefined;
729
- endDate?: Date | null | undefined;
730
- }[];
731
- }, {
732
- itemId: string;
733
- mostRestrictiveRetailerStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null;
734
- itemOrgStageDetails: {
735
- isValid: boolean;
736
- orgSummary: {
737
- name: string;
738
- id: string;
739
- ref: string;
740
- };
741
- companyId?: number | null | undefined;
742
- stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
743
- itemPolicyId?: string | null | undefined;
744
- startDate?: number | null | undefined;
745
- endDate?: number | null | undefined;
746
- }[];
747
- }>;
748
- type ItemStatusV2 = z.infer<typeof itemStatusV2Schema>;
749
-
750
- declare const itemStatusV2ResponseSchema: z.ZodObject<{
751
- itemStatuses: z.ZodArray<z.ZodObject<{
752
- itemId: z.ZodString;
753
- mostRestrictiveRetailerStage: z.ZodNullable<z.ZodEnum<["CORE", "CORE_PLUS", "CORE_ADVANCED", "ENRICHED"]>>;
754
- itemOrgStageDetails: z.ZodArray<z.ZodObject<{
755
- orgSummary: z.ZodObject<{
756
- ref: z.ZodString;
757
- id: z.ZodString;
758
- name: z.ZodString;
759
- }, "strip", z.ZodTypeAny, {
760
- name: string;
761
- id: string;
762
- ref: string;
763
- }, {
764
- name: string;
765
- id: string;
766
- ref: string;
767
- }>;
768
- companyId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
769
- stage: z.ZodOptional<z.ZodNullable<z.ZodEnum<["CORE", "CORE_PLUS", "CORE_ADVANCED", "ENRICHED"]>>>;
770
- isValid: z.ZodBoolean;
771
- itemPolicyId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
772
- startDate: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, Date, number>>>;
773
- endDate: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, Date, number>>>;
774
- }, "strip", z.ZodTypeAny, {
775
- isValid: boolean;
776
- orgSummary: {
777
- name: string;
778
- id: string;
779
- ref: string;
780
- };
781
- companyId?: number | null | undefined;
782
- stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
783
- itemPolicyId?: string | null | undefined;
784
- startDate?: Date | null | undefined;
785
- endDate?: Date | null | undefined;
786
- }, {
787
- isValid: boolean;
788
- orgSummary: {
789
- name: string;
790
- id: string;
791
- ref: string;
792
- };
793
- companyId?: number | null | undefined;
794
- stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
795
- itemPolicyId?: string | null | undefined;
796
- startDate?: number | null | undefined;
797
- endDate?: number | null | undefined;
798
- }>, "many">;
799
- }, "strip", z.ZodTypeAny, {
800
- itemId: string;
801
- mostRestrictiveRetailerStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null;
802
- itemOrgStageDetails: {
803
- isValid: boolean;
804
- orgSummary: {
805
- name: string;
806
- id: string;
807
- ref: string;
808
- };
809
- companyId?: number | null | undefined;
810
- stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
811
- itemPolicyId?: string | null | undefined;
812
- startDate?: Date | null | undefined;
813
- endDate?: Date | null | undefined;
814
- }[];
815
- }, {
816
- itemId: string;
817
- mostRestrictiveRetailerStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null;
818
- itemOrgStageDetails: {
819
- isValid: boolean;
820
- orgSummary: {
821
- name: string;
822
- id: string;
823
- ref: string;
824
- };
825
- companyId?: number | null | undefined;
826
- stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
827
- itemPolicyId?: string | null | undefined;
828
- startDate?: number | null | undefined;
829
- endDate?: number | null | undefined;
830
- }[];
831
- }>, "many">;
832
- }, "strip", z.ZodTypeAny, {
833
- itemStatuses: {
834
- itemId: string;
835
- mostRestrictiveRetailerStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null;
836
- itemOrgStageDetails: {
837
- isValid: boolean;
838
- orgSummary: {
839
- name: string;
840
- id: string;
841
- ref: string;
842
- };
843
- companyId?: number | null | undefined;
844
- stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
845
- itemPolicyId?: string | null | undefined;
846
- startDate?: Date | null | undefined;
847
- endDate?: Date | null | undefined;
848
- }[];
849
- }[];
850
- }, {
851
- itemStatuses: {
852
- itemId: string;
853
- mostRestrictiveRetailerStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null;
854
- itemOrgStageDetails: {
855
- isValid: boolean;
856
- orgSummary: {
857
- name: string;
858
- id: string;
859
- ref: string;
860
- };
861
- companyId?: number | null | undefined;
862
- stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
863
- itemPolicyId?: string | null | undefined;
864
- startDate?: number | null | undefined;
865
- endDate?: number | null | undefined;
866
- }[];
867
- }[];
868
- }>;
869
- type ItemStatusV2Response = z.infer<typeof itemStatusV2ResponseSchema>;
870
-
871
- declare const orgSummarySchema: z.ZodObject<{
872
- ref: z.ZodString;
873
- id: z.ZodString;
874
- name: z.ZodString;
875
- }, "strip", z.ZodTypeAny, {
876
- name: string;
877
- id: string;
878
- ref: string;
879
- }, {
880
- name: string;
881
- id: string;
882
- ref: string;
883
- }>;
884
- type OrgSummary = z.infer<typeof orgSummarySchema>;
885
-
886
- declare const stageSchema: z.ZodEnum<["CORE", "CORE_PLUS", "CORE_ADVANCED", "ENRICHED"]>;
887
- type Stage = z.infer<typeof stageSchema>;
888
-
889
- /**
890
- * Initialize Items Api functions
891
- * @param client Assortment Client instance
892
- * @returns An object containing Items API functions
893
- */
894
- declare function createItemsApiV2(client: AsstClient): {
895
- getItemStatus: (itemIds: string[]) => Promise<ItemStatusV2Response>;
896
- };
897
-
898
- /**
899
- * Initialize Errors Api functions
900
- * @param client Assortment Client instance
901
- * @returns An object containing Errors API functions
902
- */
903
- declare function createErrorsApi(client: AsstClient): {
904
- getInvalidItemErrorDetails: (itemInfoId: string, signal?: AbortSignal) => Promise<ItemErrorDetailsResult>;
905
- };
906
-
907
- type GetItemErrorSummaryParams = {
908
- searchField?: string;
909
- searchText?: string;
910
- tradingPartnerIds?: number[];
911
- offset?: number;
912
- limit?: number;
913
- docInEventId?: string;
914
- importId?: string;
915
- };
916
- /**
917
- * Initialize Errors Api functions
918
- * @param client Assortment Client instance
919
- * @param companyType Company type for perspective
920
- * @returns An object containing Errors API functions
921
- */
922
- declare function createErrorsApiV2(client: AsstClient): {
923
- getItemErrorSummary: (params: GetItemErrorSummaryParams, signal?: AbortSignal) => Promise<ItemErrorSummaryResultV2>;
924
- getItemErrorDetails: (itemInfoId: number, signal?: AbortSignal) => Promise<ItemErrorDetailsResultV2>;
925
- };
926
-
927
- declare const FlattenedItemIdentifierKeys: readonly ["eaneight", "upc", "ean", "gtin", "upcCaseCode", "buyerPartNumber", "partnumber", "isbn", "sku", "nationalDrugCode", "drugIdentificationNumber", "nationalHealthRelatedItemCode", "manufacturersPartNumber", "internationalStandardSerialNumber", "nabcaNumber", "erpId", "componentId"];
928
- type FlattenedItemIdentifiers = (typeof FlattenedItemIdentifierKeys)[number];
929
-
930
- declare const uniqueCriteriaOptionsSchema: z.ZodArray<z.ZodObject<{
931
- name: z.ZodString;
932
- value: z.ZodString;
933
- }, "strip", z.ZodTypeAny, {
934
- value: string;
935
- name: string;
936
- }, {
937
- value: string;
938
- name: string;
939
- }>, "many">;
940
- type UniqueCriteriaOptions = z.infer<typeof uniqueCriteriaOptionsSchema>;
941
-
942
- /**
943
- * Initialize UniqueCriteria Api functions
944
- * @param client Assortment Client instance
945
- * @returns An object containing UniqueCriteria API functions
946
- */
947
- declare function createUniqueCriteriaApi(client: AsstClient): {
948
- getUniqueCriteriaOptions: () => Promise<UniqueCriteriaOptions>;
949
- getUniqueCriteriaByOrg: (params?: {
950
- orgId?: string;
951
- }, signal?: AbortSignal) => Promise<string[]>;
952
- getProductUniqueCriteriaByOrg: (params?: {
953
- orgId?: string;
954
- }, signal?: AbortSignal) => Promise<FlattenedItemIdentifiers[]>;
955
- updateMultipleUniqueCriteriaAttributes: (uniqueAttributes: {
956
- uniqueAttribute: string;
957
- }[], companyId: number) => Promise<void>;
958
- };
959
-
960
- /**
961
- * Initialize Companies Api functions
962
- * @param client Assortment Client instance
963
- * @returns A CompanyBriefByOrg object containing Companies API functions
964
- */
965
- declare function createCompaniesApi(client: AsstClient): {
966
- getCompanyBriefInfoByOrg: (params?: {
967
- orgId?: string;
968
- }, signal?: AbortSignal) => Promise<CompanyBriefByOrg>;
969
- companySearch: (params?: CompanySearchParams, signal?: AbortSignal) => Promise<CompanySearch[]>;
970
- getCompanyById: (companyId: number, signal?: AbortSignal) => Promise<Company>;
971
- };
972
-
973
- declare const activateRuleRequestDtoSchema: z.ZodObject<{
974
- instanceId: z.ZodNullable<z.ZodString>;
975
- description: z.ZodString;
976
- }, "strip", z.ZodTypeAny, {
977
- description: string;
978
- instanceId: string | null;
979
- }, {
980
- description: string;
981
- instanceId: string | null;
982
- }>;
983
- type ActivateRuleRequestDto = z.infer<typeof activateRuleRequestDtoSchema>;
984
-
985
- /**
986
- * Initialize Rules Management Api functions
987
- * @param client Assortment Client instance
988
- * @returns An object containing Rules Management API functions
989
- */
990
- declare function createRulesManagementApi(client: AsstClient): {
991
- activateRule: (ruleId: string, request: ActivateRuleRequestDto, signal?: AbortSignal) => Promise<void>;
992
- };
993
-
994
- export { type ActivateRuleRequestDto, type ApplicationType, AsstClient, AttrProdType, type CatalogBriefResponse, type CatalogCreateRequest, type CatalogCreateResponse, type CatalogSearchParams, type CategoriesApi, Company, CompanyBriefByOrg, type CompanyFeature, 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 };