@spscommerce/asst-api 0.2.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{CompanyBriefByOrg-eea5479d.d.ts → CompanyBriefByOrg-HsKxilwl.d.ts} +140 -140
- package/dist/{chunk-VICSFYTR.js → chunk-6FFDMMN5.js} +430 -199
- package/dist/{chunk-HBDHFANT.js → chunk-C2N5RQWG.js} +95 -50
- package/dist/{index-ba0dd228.d.ts → index-wuCGfJSu.d.ts} +5 -2
- package/dist/index.cjs +590 -237
- package/dist/index.d.cts +617 -0
- package/dist/index.d.ts +325 -10
- package/dist/index.js +81 -3
- package/dist/msw.cjs +569 -299
- package/dist/msw.d.cts +833 -0
- package/dist/msw.d.ts +40 -28
- package/dist/msw.js +111 -89
- package/dist/{zod-5a9153f1.d.ts → zod-9pZn6tpQ.d.ts} +206 -248
- package/dist/zod.cjs +430 -201
- package/dist/zod.d.cts +5 -0
- package/dist/zod.d.ts +2 -2
- package/dist/zod.js +1 -5
- package/package.json +2 -3
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,617 @@
|
|
|
1
|
+
import { A as AsstClient, a as Import, b as ImportsStatus, V as VendorPartnerAttGroups, E as Export, m as AttrProdType, T as TradingPartnerAccessByCompanyId, e as CompanyRelationshipUpsertBody, c as ItemCategoriesSearch, i as AttributeMetaData, j as AttributesByCompany, k as AttributeDefinition, l as AttributeValidValues, L as Locale, S as SpreadsheetTemplate, U as UserAccount, g as ItemSearchView, h as ItemDetailView, f as ItemErrorDetailsResult } from './CompanyBriefByOrg-HsKxilwl.js';
|
|
2
|
+
export { o as AsstClientOptions, p as AsstUrl, B as BASE_URLS, C as CompanyBriefByOrg, q as Env, I as ImportErrors, n as envSchema } from './CompanyBriefByOrg-HsKxilwl.js';
|
|
3
|
+
import { G as GenerateImportTemplateParams, D as DownLoadItemsParams, I as ItemPartner, a as ItemHierarchyResponse, b as ItemDetail, S as SpsItemIdResponse } from './zod-9pZn6tpQ.js';
|
|
4
|
+
export { i as AttrDatatypeNameEnum, t as AttributeDetail, j as AttributeGroup, A as AttributeSummary, J as Bulb, u as CategoryEnum, v as ComponentDetails, C as Connection, E as ExportDayOfWeek, f as ExportFrequency, g as ExportType, w as GroupedAttributeList, x as GroupedAttributes, y as GroupedItem, H as HierarchyCategory, z as HierarchyDetails, m as IdentityServiceDatetimePreferences, n as IdentityServiceOrganization, l as IdentityServiceOrganizationMetadata, o as IdentityServicePreferences, p as IdentityServiceUser, c as ImportDetails, d as ImportError, e as ImportStatusEnum, h as ItemCategory, O as ItemErrorDetails, q as ItemHeader, r as ItemMap, B as ItemPrice, s as ItemTable, M as MediaItem, K as PackComponent, F as PackComponentDetails, N as PackComponentItemInfo, P as PhaseEnum, R as RegisteredService, L as RepeatableGroup, k as SpreadsheetTemplateCompany, T as TradingPartnerStage } from './zod-9pZn6tpQ.js';
|
|
5
|
+
import { R as RetailerTradingPartnerStages, I as ItemStatusResponse } from './index-wuCGfJSu.js';
|
|
6
|
+
export { c as createCompaniesApi } from './index-wuCGfJSu.js';
|
|
7
|
+
import { z } from 'zod';
|
|
8
|
+
import 'ky-universal';
|
|
9
|
+
import 'ky';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Initialize Imports Api functions
|
|
13
|
+
* @param client Assortment Client instance
|
|
14
|
+
* @returns An object containing Imports API functions
|
|
15
|
+
*/
|
|
16
|
+
declare function createImportsApi(client: AsstClient): {
|
|
17
|
+
getImportErrors: (importId: number, params?: {
|
|
18
|
+
offset?: number;
|
|
19
|
+
limit?: number;
|
|
20
|
+
}, signal?: AbortSignal) => Promise<{
|
|
21
|
+
importId: number;
|
|
22
|
+
count: number;
|
|
23
|
+
errors: {
|
|
24
|
+
description: string;
|
|
25
|
+
importErrorId: number;
|
|
26
|
+
row: number;
|
|
27
|
+
attribute?: string | null | undefined;
|
|
28
|
+
}[];
|
|
29
|
+
hasNext: boolean;
|
|
30
|
+
totalCount: number;
|
|
31
|
+
}>;
|
|
32
|
+
getImports: (params?: {
|
|
33
|
+
status: string;
|
|
34
|
+
}, signal?: AbortSignal) => Promise<Import>;
|
|
35
|
+
getImportsStatus: (signal?: AbortSignal) => Promise<ImportsStatus[]>;
|
|
36
|
+
uploadImport: (file: FormData) => Promise<void>;
|
|
37
|
+
getVendorPartnerGroups: (signal?: AbortSignal) => Promise<VendorPartnerAttGroups[]>;
|
|
38
|
+
generateImportTemplate: (params: GenerateImportTemplateParams) => Promise<void>;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Initialize Exports Api functions
|
|
43
|
+
* @param client Assortment Client instance
|
|
44
|
+
* @returns An object containing Exports API functions
|
|
45
|
+
*/
|
|
46
|
+
declare function createExportsApi(client: AsstClient): {
|
|
47
|
+
createExport: (data: Export, params?: {
|
|
48
|
+
orgId?: string;
|
|
49
|
+
}) => Promise<void>;
|
|
50
|
+
downloadItems: (params: DownLoadItemsParams) => Promise<void>;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Initialize Product Types Api functions
|
|
55
|
+
* @param client Assortment Client instance
|
|
56
|
+
* @returns An object containing Product Types API functions
|
|
57
|
+
*/
|
|
58
|
+
declare function createProductTypesApi(client: AsstClient): {
|
|
59
|
+
getProductTypes: (params?: {
|
|
60
|
+
retailerIds: number[];
|
|
61
|
+
}, signal?: AbortSignal) => Promise<AttrProdType[]>;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Initialize Trading Partner Access Api functions
|
|
66
|
+
* @param client Assortment Client instance
|
|
67
|
+
* @returns An object containing Trading Partner Access API functions
|
|
68
|
+
*/
|
|
69
|
+
declare function createTradingPartnerAccessApi(client: AsstClient): {
|
|
70
|
+
getAllTradingPartners: (params?: {
|
|
71
|
+
orgId?: string;
|
|
72
|
+
}, signal?: AbortSignal) => Promise<TradingPartnerAccessByCompanyId>;
|
|
73
|
+
upsertRelationship: (data: CompanyRelationshipUpsertBody) => Promise<ItemPartner>;
|
|
74
|
+
upsertHierarchy: (data: CompanyRelationshipUpsertBody) => Promise<void>;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Initialize Trading Partner Settings Api functions
|
|
79
|
+
* @param client Assortment Client instance
|
|
80
|
+
* @returns An object containing Trading Partner Settings API functions
|
|
81
|
+
*/
|
|
82
|
+
declare function createTradingPartnerSettingsApi(client: AsstClient): {
|
|
83
|
+
getRetailerStages: (signal?: AbortSignal) => Promise<RetailerTradingPartnerStages>;
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
type CategoriesApi = {
|
|
87
|
+
getCatalogs: (params?: {
|
|
88
|
+
categoryName?: string;
|
|
89
|
+
orgId?: string;
|
|
90
|
+
}, signal?: AbortSignal) => Promise<ItemCategoriesSearch>;
|
|
91
|
+
getProductCodes: (params?: {
|
|
92
|
+
categoryName?: string;
|
|
93
|
+
catalogId?: string;
|
|
94
|
+
selectionCodeId?: string;
|
|
95
|
+
orgId?: string;
|
|
96
|
+
}, signal?: AbortSignal) => Promise<ItemCategoriesSearch>;
|
|
97
|
+
getSelectionCodes: (params?: {
|
|
98
|
+
categoryName?: string;
|
|
99
|
+
catalogId?: string;
|
|
100
|
+
orgId?: string;
|
|
101
|
+
}, signal?: AbortSignal) => Promise<ItemCategoriesSearch>;
|
|
102
|
+
getItemHierarchy: (itemIds: string[]) => Promise<ItemHierarchyResponse>;
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* Initialize Categories Api functions
|
|
106
|
+
* @param client Assortment Client instance
|
|
107
|
+
* @returns An object containing Categories API functions
|
|
108
|
+
*/
|
|
109
|
+
declare function createCategoriesApi(client: AsstClient): CategoriesApi;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Initialize Attributes Api functions
|
|
113
|
+
* @param client Assortment Client instance
|
|
114
|
+
* @returns An object containing Attributes API functions
|
|
115
|
+
*/
|
|
116
|
+
declare function createAttributesApi(client: AsstClient): {
|
|
117
|
+
getAllAttributes: (signal?: AbortSignal) => Promise<AttributeMetaData[]>;
|
|
118
|
+
getAllAttributesByCompany: (params?: {
|
|
119
|
+
offset?: number;
|
|
120
|
+
limit?: number;
|
|
121
|
+
}, signal?: AbortSignal) => Promise<AttributesByCompany>;
|
|
122
|
+
getAttributesExtensiveInfo: (signal?: AbortSignal) => Promise<AttributeDefinition[]>;
|
|
123
|
+
getAttributeValidValues: (attributeDbName: string, signal?: AbortSignal) => Promise<AttributeValidValues[]>;
|
|
124
|
+
getCompanyInterestedAttributes: (params?: {
|
|
125
|
+
orgId?: string;
|
|
126
|
+
}, signal?: AbortSignal) => Promise<string[]>;
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Initialize Locale Api functions
|
|
131
|
+
* @param client Assortment Client instance
|
|
132
|
+
* @returns An object containing Locale API functions
|
|
133
|
+
*/
|
|
134
|
+
declare function createLocaleApi(client: AsstClient): {
|
|
135
|
+
getLocale: (signal?: AbortSignal) => Promise<Locale[]>;
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Initialize Spreadsheet Template Api functions
|
|
140
|
+
* @param client Assortment Client instance
|
|
141
|
+
* @returns An object containing Spreadsheet Template API functions
|
|
142
|
+
*/
|
|
143
|
+
declare function createSpreadsheetTemplateApi(client: AsstClient): {
|
|
144
|
+
getTemplates: (params?: {
|
|
145
|
+
orgId?: string;
|
|
146
|
+
}, signal?: AbortSignal) => Promise<SpreadsheetTemplate[]>;
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Initialize WhoAmI Api functions
|
|
151
|
+
* @param client Assortment Client instance
|
|
152
|
+
* @returns An object containing WhoAmI API functions
|
|
153
|
+
*/
|
|
154
|
+
declare function createWhoAmIApi(client: AsstClient): {
|
|
155
|
+
whoAmI: (signal?: AbortSignal) => Promise<UserAccount>;
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
type ApplicationType = "ASSORTMENT" | "ITEM-XREF";
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Initialize Company Features Api functions
|
|
162
|
+
* @param client Assortment Client instance
|
|
163
|
+
* @returns An object containing Company Features API functions
|
|
164
|
+
*/
|
|
165
|
+
declare function createCompanyFeaturesApi(client: AsstClient): {
|
|
166
|
+
checkIfStageItemSetupIsEnabled: (signal?: AbortSignal) => Promise<boolean>;
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Initialize Feature Flags Api functions
|
|
171
|
+
* @param client Assortment Client instance
|
|
172
|
+
* @returns An object containing feature flags utility functions
|
|
173
|
+
*/
|
|
174
|
+
declare function createFeatureFlagsApi(client: AsstClient): {
|
|
175
|
+
checkEnableItemsApiEndpointsForImports: (signal?: AbortSignal) => Promise<boolean>;
|
|
176
|
+
checkEnableItemsLevelMSIS: (signal?: AbortSignal) => Promise<boolean>;
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
declare const itemStatusSchema: z.ZodObject<{
|
|
180
|
+
itemId: z.ZodString;
|
|
181
|
+
itemOrgStatuses: z.ZodArray<z.ZodObject<{
|
|
182
|
+
org: z.ZodObject<{
|
|
183
|
+
ref: z.ZodString;
|
|
184
|
+
id: z.ZodString;
|
|
185
|
+
name: z.ZodString;
|
|
186
|
+
}, "strip", z.ZodTypeAny, {
|
|
187
|
+
name: string;
|
|
188
|
+
id: string;
|
|
189
|
+
ref: string;
|
|
190
|
+
}, {
|
|
191
|
+
name: string;
|
|
192
|
+
id: string;
|
|
193
|
+
ref: string;
|
|
194
|
+
}>;
|
|
195
|
+
lowestInvalidStage: z.ZodNullable<z.ZodEnum<["CORE", "CORE_PLUS", "CORE_ADVANCED", "ENRICHED", "STANDARD_REQUIREMENTS"]>>;
|
|
196
|
+
validForRelationship: z.ZodBoolean;
|
|
197
|
+
}, "strip", z.ZodTypeAny, {
|
|
198
|
+
org: {
|
|
199
|
+
name: string;
|
|
200
|
+
id: string;
|
|
201
|
+
ref: string;
|
|
202
|
+
};
|
|
203
|
+
lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
|
|
204
|
+
validForRelationship: boolean;
|
|
205
|
+
}, {
|
|
206
|
+
org: {
|
|
207
|
+
name: string;
|
|
208
|
+
id: string;
|
|
209
|
+
ref: string;
|
|
210
|
+
};
|
|
211
|
+
lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
|
|
212
|
+
validForRelationship: boolean;
|
|
213
|
+
}>, "many">;
|
|
214
|
+
}, "strip", z.ZodTypeAny, {
|
|
215
|
+
itemId: string;
|
|
216
|
+
itemOrgStatuses: {
|
|
217
|
+
org: {
|
|
218
|
+
name: string;
|
|
219
|
+
id: string;
|
|
220
|
+
ref: string;
|
|
221
|
+
};
|
|
222
|
+
lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
|
|
223
|
+
validForRelationship: boolean;
|
|
224
|
+
}[];
|
|
225
|
+
}, {
|
|
226
|
+
itemId: string;
|
|
227
|
+
itemOrgStatuses: {
|
|
228
|
+
org: {
|
|
229
|
+
name: string;
|
|
230
|
+
id: string;
|
|
231
|
+
ref: string;
|
|
232
|
+
};
|
|
233
|
+
lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
|
|
234
|
+
validForRelationship: boolean;
|
|
235
|
+
}[];
|
|
236
|
+
}>;
|
|
237
|
+
type ItemStatus = z.infer<typeof itemStatusSchema>;
|
|
238
|
+
|
|
239
|
+
declare const itemOrgStatusSchema: z.ZodObject<{
|
|
240
|
+
org: z.ZodObject<{
|
|
241
|
+
ref: z.ZodString;
|
|
242
|
+
id: z.ZodString;
|
|
243
|
+
name: z.ZodString;
|
|
244
|
+
}, "strip", z.ZodTypeAny, {
|
|
245
|
+
name: string;
|
|
246
|
+
id: string;
|
|
247
|
+
ref: string;
|
|
248
|
+
}, {
|
|
249
|
+
name: string;
|
|
250
|
+
id: string;
|
|
251
|
+
ref: string;
|
|
252
|
+
}>;
|
|
253
|
+
lowestInvalidStage: z.ZodNullable<z.ZodEnum<["CORE", "CORE_PLUS", "CORE_ADVANCED", "ENRICHED", "STANDARD_REQUIREMENTS"]>>;
|
|
254
|
+
validForRelationship: z.ZodBoolean;
|
|
255
|
+
}, "strip", z.ZodTypeAny, {
|
|
256
|
+
org: {
|
|
257
|
+
name: string;
|
|
258
|
+
id: string;
|
|
259
|
+
ref: string;
|
|
260
|
+
};
|
|
261
|
+
lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
|
|
262
|
+
validForRelationship: boolean;
|
|
263
|
+
}, {
|
|
264
|
+
org: {
|
|
265
|
+
name: string;
|
|
266
|
+
id: string;
|
|
267
|
+
ref: string;
|
|
268
|
+
};
|
|
269
|
+
lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
|
|
270
|
+
validForRelationship: boolean;
|
|
271
|
+
}>;
|
|
272
|
+
type ItemOrgStatus = z.infer<typeof itemOrgStatusSchema>;
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Initialize Items Api functions
|
|
276
|
+
* @param client Assortment Client instance
|
|
277
|
+
* @returns An object containing Items API functions
|
|
278
|
+
*/
|
|
279
|
+
declare function createItemsApi(client: AsstClient): {
|
|
280
|
+
searchItems: (params?: {
|
|
281
|
+
url: string;
|
|
282
|
+
limit?: number;
|
|
283
|
+
offset?: number;
|
|
284
|
+
applicationType?: ApplicationType;
|
|
285
|
+
}, signal?: AbortSignal) => Promise<ItemSearchView>;
|
|
286
|
+
getItem: (itemId: string, locale?: string, signal?: AbortSignal) => Promise<ItemDetailView>;
|
|
287
|
+
updateItem: (itemId: string, item: ItemDetail) => Promise<void>;
|
|
288
|
+
deleteItem: (itemId: number) => Promise<void>;
|
|
289
|
+
deleteItems: (itemIds: string[]) => Promise<void>;
|
|
290
|
+
getItemInfoId: (spsItemId: string, signal?: AbortSignal) => Promise<number>;
|
|
291
|
+
getSpsItemId: (itemInfoId: string, signal?: AbortSignal) => Promise<SpsItemIdResponse>;
|
|
292
|
+
getItemStatus: (itemIds: string[]) => Promise<ItemStatusResponse>;
|
|
293
|
+
};
|
|
294
|
+
|
|
295
|
+
declare const itemOrgStageDetailsSchema: z.ZodObject<{
|
|
296
|
+
/**
|
|
297
|
+
* When called as retailer, the vendor, else when vendor, the retailer.
|
|
298
|
+
* */
|
|
299
|
+
orgSummary: z.ZodObject<{
|
|
300
|
+
ref: z.ZodString;
|
|
301
|
+
id: z.ZodString;
|
|
302
|
+
name: z.ZodString;
|
|
303
|
+
}, "strip", z.ZodTypeAny, {
|
|
304
|
+
name: string;
|
|
305
|
+
id: string;
|
|
306
|
+
ref: string;
|
|
307
|
+
}, {
|
|
308
|
+
name: string;
|
|
309
|
+
id: string;
|
|
310
|
+
ref: string;
|
|
311
|
+
}>;
|
|
312
|
+
/**
|
|
313
|
+
* The company id of the retailer or vendor used for matching ItemOrgStageDetails to TradingPartnerStage for ErrorService
|
|
314
|
+
*/
|
|
315
|
+
companyId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
316
|
+
/**
|
|
317
|
+
* "Standard Requirements" (null) UNLESS the retailer of the item is MSIS Enabled
|
|
318
|
+
* OTHERWISE the retailer default Stage UNLESS there's a currently active vendor-specific Stage defined
|
|
319
|
+
* OTHERWISE the trading partnership Stage UNLESS there's a currently active Item Level override defined
|
|
320
|
+
* OTHERWISE the item level override */
|
|
321
|
+
stage: z.ZodOptional<z.ZodNullable<z.ZodEnum<["CORE", "CORE_PLUS", "CORE_ADVANCED", "ENRICHED"]>>>;
|
|
322
|
+
/**
|
|
323
|
+
* If the item is valid for the active stage. Note that for "Standard Requirements" or
|
|
324
|
+
* "Enriched" this cam come directly from the item_doc table, but anything else requires validation
|
|
325
|
+
*/
|
|
326
|
+
isValid: z.ZodBoolean;
|
|
327
|
+
/**
|
|
328
|
+
* Not null if there's an item level policy override for this trading partnership
|
|
329
|
+
*/
|
|
330
|
+
itemPolicyId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
331
|
+
/**
|
|
332
|
+
* Start date for the Item level Stage if applicable
|
|
333
|
+
*/
|
|
334
|
+
startDate: z.ZodOptional<z.ZodNullable<z.ZodPipeline<z.ZodNumber, z.ZodDate>>>;
|
|
335
|
+
/**
|
|
336
|
+
* End date for the Item level Stage if applicable
|
|
337
|
+
*/
|
|
338
|
+
endDate: z.ZodOptional<z.ZodNullable<z.ZodPipeline<z.ZodNumber, z.ZodDate>>>;
|
|
339
|
+
}, "strip", z.ZodTypeAny, {
|
|
340
|
+
isValid: boolean;
|
|
341
|
+
orgSummary: {
|
|
342
|
+
name: string;
|
|
343
|
+
id: string;
|
|
344
|
+
ref: string;
|
|
345
|
+
};
|
|
346
|
+
companyId?: number | null | undefined;
|
|
347
|
+
stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
|
|
348
|
+
itemPolicyId?: string | null | undefined;
|
|
349
|
+
startDate?: Date | null | undefined;
|
|
350
|
+
endDate?: Date | null | undefined;
|
|
351
|
+
}, {
|
|
352
|
+
isValid: boolean;
|
|
353
|
+
orgSummary: {
|
|
354
|
+
name: string;
|
|
355
|
+
id: string;
|
|
356
|
+
ref: string;
|
|
357
|
+
};
|
|
358
|
+
companyId?: number | null | undefined;
|
|
359
|
+
stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
|
|
360
|
+
itemPolicyId?: string | null | undefined;
|
|
361
|
+
startDate?: number | null | undefined;
|
|
362
|
+
endDate?: number | null | undefined;
|
|
363
|
+
}>;
|
|
364
|
+
type ItemOrgStageDetails = z.infer<typeof itemOrgStageDetailsSchema>;
|
|
365
|
+
|
|
366
|
+
declare const itemStatusV2Schema: z.ZodObject<{
|
|
367
|
+
itemId: z.ZodString;
|
|
368
|
+
mostRestrictiveRetailerStage: z.ZodNullable<z.ZodEnum<["CORE", "CORE_PLUS", "CORE_ADVANCED", "ENRICHED"]>>;
|
|
369
|
+
itemOrgStageDetails: z.ZodArray<z.ZodObject<{
|
|
370
|
+
orgSummary: z.ZodObject<{
|
|
371
|
+
ref: z.ZodString;
|
|
372
|
+
id: z.ZodString;
|
|
373
|
+
name: z.ZodString;
|
|
374
|
+
}, "strip", z.ZodTypeAny, {
|
|
375
|
+
name: string;
|
|
376
|
+
id: string;
|
|
377
|
+
ref: string;
|
|
378
|
+
}, {
|
|
379
|
+
name: string;
|
|
380
|
+
id: string;
|
|
381
|
+
ref: string;
|
|
382
|
+
}>;
|
|
383
|
+
companyId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
384
|
+
stage: z.ZodOptional<z.ZodNullable<z.ZodEnum<["CORE", "CORE_PLUS", "CORE_ADVANCED", "ENRICHED"]>>>;
|
|
385
|
+
isValid: z.ZodBoolean;
|
|
386
|
+
itemPolicyId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
387
|
+
startDate: z.ZodOptional<z.ZodNullable<z.ZodPipeline<z.ZodNumber, z.ZodDate>>>;
|
|
388
|
+
endDate: z.ZodOptional<z.ZodNullable<z.ZodPipeline<z.ZodNumber, z.ZodDate>>>;
|
|
389
|
+
}, "strip", z.ZodTypeAny, {
|
|
390
|
+
isValid: boolean;
|
|
391
|
+
orgSummary: {
|
|
392
|
+
name: string;
|
|
393
|
+
id: string;
|
|
394
|
+
ref: string;
|
|
395
|
+
};
|
|
396
|
+
companyId?: number | null | undefined;
|
|
397
|
+
stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
|
|
398
|
+
itemPolicyId?: string | null | undefined;
|
|
399
|
+
startDate?: Date | null | undefined;
|
|
400
|
+
endDate?: Date | null | undefined;
|
|
401
|
+
}, {
|
|
402
|
+
isValid: boolean;
|
|
403
|
+
orgSummary: {
|
|
404
|
+
name: string;
|
|
405
|
+
id: string;
|
|
406
|
+
ref: string;
|
|
407
|
+
};
|
|
408
|
+
companyId?: number | null | undefined;
|
|
409
|
+
stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
|
|
410
|
+
itemPolicyId?: string | null | undefined;
|
|
411
|
+
startDate?: number | null | undefined;
|
|
412
|
+
endDate?: number | null | undefined;
|
|
413
|
+
}>, "many">;
|
|
414
|
+
}, "strip", z.ZodTypeAny, {
|
|
415
|
+
itemId: string;
|
|
416
|
+
mostRestrictiveRetailerStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null;
|
|
417
|
+
itemOrgStageDetails: {
|
|
418
|
+
isValid: boolean;
|
|
419
|
+
orgSummary: {
|
|
420
|
+
name: string;
|
|
421
|
+
id: string;
|
|
422
|
+
ref: string;
|
|
423
|
+
};
|
|
424
|
+
companyId?: number | null | undefined;
|
|
425
|
+
stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
|
|
426
|
+
itemPolicyId?: string | null | undefined;
|
|
427
|
+
startDate?: Date | null | undefined;
|
|
428
|
+
endDate?: Date | null | undefined;
|
|
429
|
+
}[];
|
|
430
|
+
}, {
|
|
431
|
+
itemId: string;
|
|
432
|
+
mostRestrictiveRetailerStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null;
|
|
433
|
+
itemOrgStageDetails: {
|
|
434
|
+
isValid: boolean;
|
|
435
|
+
orgSummary: {
|
|
436
|
+
name: string;
|
|
437
|
+
id: string;
|
|
438
|
+
ref: string;
|
|
439
|
+
};
|
|
440
|
+
companyId?: number | null | undefined;
|
|
441
|
+
stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
|
|
442
|
+
itemPolicyId?: string | null | undefined;
|
|
443
|
+
startDate?: number | null | undefined;
|
|
444
|
+
endDate?: number | null | undefined;
|
|
445
|
+
}[];
|
|
446
|
+
}>;
|
|
447
|
+
type ItemStatusV2 = z.infer<typeof itemStatusV2Schema>;
|
|
448
|
+
|
|
449
|
+
declare const itemStatusV2ResponseSchema: z.ZodObject<{
|
|
450
|
+
itemStatuses: z.ZodArray<z.ZodObject<{
|
|
451
|
+
itemId: z.ZodString;
|
|
452
|
+
mostRestrictiveRetailerStage: z.ZodNullable<z.ZodEnum<["CORE", "CORE_PLUS", "CORE_ADVANCED", "ENRICHED"]>>;
|
|
453
|
+
itemOrgStageDetails: z.ZodArray<z.ZodObject<{
|
|
454
|
+
orgSummary: z.ZodObject<{
|
|
455
|
+
ref: z.ZodString;
|
|
456
|
+
id: z.ZodString;
|
|
457
|
+
name: z.ZodString;
|
|
458
|
+
}, "strip", z.ZodTypeAny, {
|
|
459
|
+
name: string;
|
|
460
|
+
id: string;
|
|
461
|
+
ref: string;
|
|
462
|
+
}, {
|
|
463
|
+
name: string;
|
|
464
|
+
id: string;
|
|
465
|
+
ref: string;
|
|
466
|
+
}>;
|
|
467
|
+
companyId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
468
|
+
stage: z.ZodOptional<z.ZodNullable<z.ZodEnum<["CORE", "CORE_PLUS", "CORE_ADVANCED", "ENRICHED"]>>>;
|
|
469
|
+
isValid: z.ZodBoolean;
|
|
470
|
+
itemPolicyId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
471
|
+
startDate: z.ZodOptional<z.ZodNullable<z.ZodPipeline<z.ZodNumber, z.ZodDate>>>;
|
|
472
|
+
endDate: z.ZodOptional<z.ZodNullable<z.ZodPipeline<z.ZodNumber, z.ZodDate>>>;
|
|
473
|
+
}, "strip", z.ZodTypeAny, {
|
|
474
|
+
isValid: boolean;
|
|
475
|
+
orgSummary: {
|
|
476
|
+
name: string;
|
|
477
|
+
id: string;
|
|
478
|
+
ref: string;
|
|
479
|
+
};
|
|
480
|
+
companyId?: number | null | undefined;
|
|
481
|
+
stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
|
|
482
|
+
itemPolicyId?: string | null | undefined;
|
|
483
|
+
startDate?: Date | null | undefined;
|
|
484
|
+
endDate?: Date | null | undefined;
|
|
485
|
+
}, {
|
|
486
|
+
isValid: boolean;
|
|
487
|
+
orgSummary: {
|
|
488
|
+
name: string;
|
|
489
|
+
id: string;
|
|
490
|
+
ref: string;
|
|
491
|
+
};
|
|
492
|
+
companyId?: number | null | undefined;
|
|
493
|
+
stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
|
|
494
|
+
itemPolicyId?: string | null | undefined;
|
|
495
|
+
startDate?: number | null | undefined;
|
|
496
|
+
endDate?: number | null | undefined;
|
|
497
|
+
}>, "many">;
|
|
498
|
+
}, "strip", z.ZodTypeAny, {
|
|
499
|
+
itemId: string;
|
|
500
|
+
mostRestrictiveRetailerStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null;
|
|
501
|
+
itemOrgStageDetails: {
|
|
502
|
+
isValid: boolean;
|
|
503
|
+
orgSummary: {
|
|
504
|
+
name: string;
|
|
505
|
+
id: string;
|
|
506
|
+
ref: string;
|
|
507
|
+
};
|
|
508
|
+
companyId?: number | null | undefined;
|
|
509
|
+
stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
|
|
510
|
+
itemPolicyId?: string | null | undefined;
|
|
511
|
+
startDate?: Date | null | undefined;
|
|
512
|
+
endDate?: Date | null | undefined;
|
|
513
|
+
}[];
|
|
514
|
+
}, {
|
|
515
|
+
itemId: string;
|
|
516
|
+
mostRestrictiveRetailerStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null;
|
|
517
|
+
itemOrgStageDetails: {
|
|
518
|
+
isValid: boolean;
|
|
519
|
+
orgSummary: {
|
|
520
|
+
name: string;
|
|
521
|
+
id: string;
|
|
522
|
+
ref: string;
|
|
523
|
+
};
|
|
524
|
+
companyId?: number | null | undefined;
|
|
525
|
+
stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
|
|
526
|
+
itemPolicyId?: string | null | undefined;
|
|
527
|
+
startDate?: number | null | undefined;
|
|
528
|
+
endDate?: number | null | undefined;
|
|
529
|
+
}[];
|
|
530
|
+
}>, "many">;
|
|
531
|
+
}, "strip", z.ZodTypeAny, {
|
|
532
|
+
itemStatuses: {
|
|
533
|
+
itemId: string;
|
|
534
|
+
mostRestrictiveRetailerStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null;
|
|
535
|
+
itemOrgStageDetails: {
|
|
536
|
+
isValid: boolean;
|
|
537
|
+
orgSummary: {
|
|
538
|
+
name: string;
|
|
539
|
+
id: string;
|
|
540
|
+
ref: string;
|
|
541
|
+
};
|
|
542
|
+
companyId?: number | null | undefined;
|
|
543
|
+
stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
|
|
544
|
+
itemPolicyId?: string | null | undefined;
|
|
545
|
+
startDate?: Date | null | undefined;
|
|
546
|
+
endDate?: Date | null | undefined;
|
|
547
|
+
}[];
|
|
548
|
+
}[];
|
|
549
|
+
}, {
|
|
550
|
+
itemStatuses: {
|
|
551
|
+
itemId: string;
|
|
552
|
+
mostRestrictiveRetailerStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null;
|
|
553
|
+
itemOrgStageDetails: {
|
|
554
|
+
isValid: boolean;
|
|
555
|
+
orgSummary: {
|
|
556
|
+
name: string;
|
|
557
|
+
id: string;
|
|
558
|
+
ref: string;
|
|
559
|
+
};
|
|
560
|
+
companyId?: number | null | undefined;
|
|
561
|
+
stage?: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | null | undefined;
|
|
562
|
+
itemPolicyId?: string | null | undefined;
|
|
563
|
+
startDate?: number | null | undefined;
|
|
564
|
+
endDate?: number | null | undefined;
|
|
565
|
+
}[];
|
|
566
|
+
}[];
|
|
567
|
+
}>;
|
|
568
|
+
type ItemStatusV2Response = z.infer<typeof itemStatusV2ResponseSchema>;
|
|
569
|
+
|
|
570
|
+
declare const orgSummarySchema: 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
|
+
type OrgSummary = z.infer<typeof orgSummarySchema>;
|
|
584
|
+
|
|
585
|
+
declare const stageSchema: z.ZodEnum<["CORE", "CORE_PLUS", "CORE_ADVANCED", "ENRICHED"]>;
|
|
586
|
+
type Stage = z.infer<typeof stageSchema>;
|
|
587
|
+
|
|
588
|
+
/**
|
|
589
|
+
* Initialize Items Api functions
|
|
590
|
+
* @param client Assortment Client instance
|
|
591
|
+
* @returns An object containing Items API functions
|
|
592
|
+
*/
|
|
593
|
+
declare function createItemsApiV2(client: AsstClient): {
|
|
594
|
+
getItemStatus: (itemIds: string[]) => Promise<ItemStatusV2Response>;
|
|
595
|
+
};
|
|
596
|
+
|
|
597
|
+
/**
|
|
598
|
+
* Initialize Errors Api functions
|
|
599
|
+
* @param client Assortment Client instance
|
|
600
|
+
* @returns An object containing Errors API functions
|
|
601
|
+
*/
|
|
602
|
+
declare function createErrorsApi(client: AsstClient): {
|
|
603
|
+
getInvalidItemErrorDetails: (itemInfoId: string, signal?: AbortSignal) => Promise<ItemErrorDetailsResult>;
|
|
604
|
+
};
|
|
605
|
+
|
|
606
|
+
/**
|
|
607
|
+
* Initialize UniqueCriteria Api functions
|
|
608
|
+
* @param client Assortment Client instance
|
|
609
|
+
* @returns An object containing UniqueCriteria API functions
|
|
610
|
+
*/
|
|
611
|
+
declare function createUniqueCriteriaApi(client: AsstClient): {
|
|
612
|
+
getUniqueCriteriaByOrg: (params?: {
|
|
613
|
+
orgId?: string;
|
|
614
|
+
}, signal?: AbortSignal) => Promise<string[]>;
|
|
615
|
+
};
|
|
616
|
+
|
|
617
|
+
export { type ApplicationType, AsstClient, AttrProdType, AttributeDefinition, AttributeMetaData, AttributeValidValues, AttributesByCompany, type CategoriesApi, CompanyRelationshipUpsertBody, DownLoadItemsParams, Export, GenerateImportTemplateParams, Import, ImportsStatus, ItemCategoriesSearch, ItemDetail, ItemDetailView, ItemErrorDetailsResult, ItemHierarchyResponse, type ItemOrgStageDetails, type ItemOrgStatus, ItemPartner, ItemSearchView, type ItemStatus, ItemStatusResponse, type ItemStatusV2, type ItemStatusV2Response, Locale, type OrgSummary, RetailerTradingPartnerStages, SpreadsheetTemplate, SpsItemIdResponse, type Stage, TradingPartnerAccessByCompanyId, UserAccount, VendorPartnerAttGroups, createAttributesApi, createCategoriesApi, createCompanyFeaturesApi, createErrorsApi, createExportsApi, createFeatureFlagsApi, createImportsApi, createItemsApi, createItemsApiV2, createLocaleApi, createProductTypesApi, createSpreadsheetTemplateApi, createTradingPartnerAccessApi, createTradingPartnerSettingsApi, createUniqueCriteriaApi, createWhoAmIApi };
|