@spscommerce/asst-api 1.2.1 → 1.3.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-itus4RMD.d.cts +131 -0
- package/dist/CompanyBriefByOrg-itus4RMD.d.ts +131 -0
- package/dist/{chunk-AH5MG2WF.js → chunk-5AROSGQB.js} +7 -13
- package/dist/{chunk-IO62OUOU.js → chunk-TTT6PM27.js} +57 -21
- package/dist/index-B8ovDTs5.d.cts +14 -0
- package/dist/index-BFKgtuVI.d.ts +14 -0
- package/dist/index.cjs +63 -34
- package/dist/index.d.cts +112 -14
- package/dist/index.d.ts +112 -14
- package/dist/index.js +2 -2
- package/dist/msw.cjs +196 -150
- package/dist/msw.d.cts +50 -97
- package/dist/msw.d.ts +50 -97
- package/dist/msw.js +175 -159
- package/dist/{zod-NE2xXWlK.d.ts → zod-C5pRCHei.d.ts} +3329 -33
- package/dist/zod-DzhoVlw_.d.cts +6712 -0
- package/dist/zod.cjs +7 -13
- package/dist/zod.d.cts +2 -2
- package/dist/zod.d.ts +2 -2
- package/dist/zod.js +1 -1
- package/package.json +24 -23
- package/dist/CompanyBriefByOrg-LTdsUKm4.d.ts +0 -3427
- package/dist/index-Zz-6wNSh.d.ts +0 -106
package/dist/index.d.cts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { A as AsstClient, a as
|
|
2
|
-
export {
|
|
3
|
-
import { G as GenerateImportTemplateParams, D as DownLoadItemsParams,
|
|
4
|
-
export {
|
|
5
|
-
import { R as RetailerTradingPartnerStages, I as ItemStatusResponse } from './index-Zz-6wNSh.js';
|
|
6
|
-
export { c as createCompaniesApi } from './index-Zz-6wNSh.js';
|
|
1
|
+
import { A as AsstClient, a as AttributeValidValues, S as SpsItemIdResponse } from './CompanyBriefByOrg-itus4RMD.cjs';
|
|
2
|
+
export { b as AsstClientOptions, c as AsstUrl, B as BASE_URLS, C as CompanyBriefByOrg, E as Env, e as envSchema } from './CompanyBriefByOrg-itus4RMD.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, d as ItemHierarchyResponse, e as AttributeMetaData, f as AttributesByCompany, g as AttributeDefinition, L as Locale, S as SpreadsheetTemplate, U as UserAccount, h as ItemSearchView, i as ItemDetailView, j as ItemDetail, k as ItemErrorDetailsResult, l as ItemErrorSummaryResultV2, m as ItemErrorDetailsResultV2 } from './zod-DzhoVlw_.cjs';
|
|
4
|
+
export { x as AttrDatatypeNameEnum, W as AttributeDetail, y as AttributeGroup, w as AttributeSummary, a5 as Bulb, X as CategoryEnum, Y as ComponentDetails, u as Connection, r as ExportDayOfWeek, s as ExportFrequency, t as ExportType, Z as GroupedAttributeList, _ as GroupedAttributes, $ as GroupedItem, a0 as HierarchyCategory, a1 as HierarchyDetails, F as IdentityServiceDatetimePreferences, H as IdentityServiceOrganization, B as IdentityServiceOrganizationMetadata, J as IdentityServicePreferences, K as IdentityServiceUser, n as ImportDetails, o as ImportError, p as ImportErrors, q as ImportStatusEnum, v as ItemCategory, a9 as ItemErrorDetails, ab as ItemErrorDetailsV2, aa as ItemErrorSummaryV2, M as ItemHeader, N as ItemMap, a2 as ItemPrice, O as ItemTable, a4 as MediaItem, a6 as PackComponent, a3 as PackComponentDetails, a8 as PackComponentItemInfo, P as PhaseEnum, R as RegisteredService, a7 as RepeatableGroup, z as SpreadsheetTemplateCompany, Q as TradingPartnerStage, ac as TradingPartnerStageV2 } from './zod-DzhoVlw_.cjs';
|
|
7
5
|
import { z } from 'zod';
|
|
6
|
+
export { c as createCompaniesApi } from './index-B8ovDTs5.cjs';
|
|
8
7
|
import 'ky';
|
|
9
8
|
|
|
10
9
|
/**
|
|
@@ -13,7 +12,7 @@ import 'ky';
|
|
|
13
12
|
* @returns An object containing Imports API functions
|
|
14
13
|
*/
|
|
15
14
|
declare function createImportsApi(client: AsstClient): {
|
|
16
|
-
getImportErrors: (importId:
|
|
15
|
+
getImportErrors: (importId: string, params?: {
|
|
17
16
|
offset?: number;
|
|
18
17
|
limit?: number;
|
|
19
18
|
}, signal?: AbortSignal) => Promise<{
|
|
@@ -73,6 +72,9 @@ declare function createTradingPartnerAccessApi(client: AsstClient): {
|
|
|
73
72
|
upsertHierarchy: (data: CompanyRelationshipUpsertBody) => Promise<void>;
|
|
74
73
|
};
|
|
75
74
|
|
|
75
|
+
declare const retailerTradingPartnerStages: z.ZodArray<z.ZodEnum<["Core", "Core Plus", "Core Advanced", "Enriched", "Standard Requirements"]>, "many">;
|
|
76
|
+
type RetailerTradingPartnerStages = z.infer<typeof retailerTradingPartnerStages>;
|
|
77
|
+
|
|
76
78
|
/**
|
|
77
79
|
* Initialize Trading Partner Settings Api functions
|
|
78
80
|
* @param client Assortment Client instance
|
|
@@ -172,8 +174,97 @@ declare function createCompanyFeaturesApi(client: AsstClient): {
|
|
|
172
174
|
*/
|
|
173
175
|
declare function createFeatureFlagsApi(client: AsstClient): {
|
|
174
176
|
checkEnableItemsLevelMSIS: (signal?: AbortSignal) => Promise<boolean>;
|
|
177
|
+
checkIfEnabledForPackagingHierarchies: (signal?: AbortSignal) => Promise<boolean>;
|
|
175
178
|
};
|
|
176
179
|
|
|
180
|
+
declare const itemStatusResponseSchema: z.ZodObject<{
|
|
181
|
+
itemStatuses: z.ZodArray<z.ZodObject<{
|
|
182
|
+
itemId: z.ZodString;
|
|
183
|
+
itemOrgStatuses: z.ZodArray<z.ZodObject<{
|
|
184
|
+
org: z.ZodObject<{
|
|
185
|
+
ref: z.ZodString;
|
|
186
|
+
id: z.ZodString;
|
|
187
|
+
name: z.ZodString;
|
|
188
|
+
}, "strip", z.ZodTypeAny, {
|
|
189
|
+
name: string;
|
|
190
|
+
id: string;
|
|
191
|
+
ref: string;
|
|
192
|
+
}, {
|
|
193
|
+
name: string;
|
|
194
|
+
id: string;
|
|
195
|
+
ref: string;
|
|
196
|
+
}>;
|
|
197
|
+
lowestInvalidStage: z.ZodNullable<z.ZodEnum<["CORE", "CORE_PLUS", "CORE_ADVANCED", "ENRICHED", "STANDARD_REQUIREMENTS"]>>;
|
|
198
|
+
validForRelationship: z.ZodBoolean;
|
|
199
|
+
}, "strip", z.ZodTypeAny, {
|
|
200
|
+
org: {
|
|
201
|
+
name: string;
|
|
202
|
+
id: string;
|
|
203
|
+
ref: string;
|
|
204
|
+
};
|
|
205
|
+
lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
|
|
206
|
+
validForRelationship: boolean;
|
|
207
|
+
}, {
|
|
208
|
+
org: {
|
|
209
|
+
name: string;
|
|
210
|
+
id: string;
|
|
211
|
+
ref: string;
|
|
212
|
+
};
|
|
213
|
+
lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
|
|
214
|
+
validForRelationship: boolean;
|
|
215
|
+
}>, "many">;
|
|
216
|
+
}, "strip", z.ZodTypeAny, {
|
|
217
|
+
itemId: string;
|
|
218
|
+
itemOrgStatuses: {
|
|
219
|
+
org: {
|
|
220
|
+
name: string;
|
|
221
|
+
id: string;
|
|
222
|
+
ref: string;
|
|
223
|
+
};
|
|
224
|
+
lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
|
|
225
|
+
validForRelationship: boolean;
|
|
226
|
+
}[];
|
|
227
|
+
}, {
|
|
228
|
+
itemId: string;
|
|
229
|
+
itemOrgStatuses: {
|
|
230
|
+
org: {
|
|
231
|
+
name: string;
|
|
232
|
+
id: string;
|
|
233
|
+
ref: string;
|
|
234
|
+
};
|
|
235
|
+
lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
|
|
236
|
+
validForRelationship: boolean;
|
|
237
|
+
}[];
|
|
238
|
+
}>, "many">;
|
|
239
|
+
}, "strip", z.ZodTypeAny, {
|
|
240
|
+
itemStatuses: {
|
|
241
|
+
itemId: string;
|
|
242
|
+
itemOrgStatuses: {
|
|
243
|
+
org: {
|
|
244
|
+
name: string;
|
|
245
|
+
id: string;
|
|
246
|
+
ref: string;
|
|
247
|
+
};
|
|
248
|
+
lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
|
|
249
|
+
validForRelationship: boolean;
|
|
250
|
+
}[];
|
|
251
|
+
}[];
|
|
252
|
+
}, {
|
|
253
|
+
itemStatuses: {
|
|
254
|
+
itemId: string;
|
|
255
|
+
itemOrgStatuses: {
|
|
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
|
+
}[];
|
|
265
|
+
}>;
|
|
266
|
+
type ItemStatusResponse = z.infer<typeof itemStatusResponseSchema>;
|
|
267
|
+
|
|
177
268
|
declare const itemStatusSchema: z.ZodObject<{
|
|
178
269
|
itemId: z.ZodString;
|
|
179
270
|
itemOrgStatuses: z.ZodArray<z.ZodObject<{
|
|
@@ -269,12 +360,7 @@ declare const itemOrgStatusSchema: z.ZodObject<{
|
|
|
269
360
|
}>;
|
|
270
361
|
type ItemOrgStatus = z.infer<typeof itemOrgStatusSchema>;
|
|
271
362
|
|
|
272
|
-
|
|
273
|
-
* Initialize Items Api functions
|
|
274
|
-
* @param client Assortment Client instance
|
|
275
|
-
* @returns An object containing Items API functions
|
|
276
|
-
*/
|
|
277
|
-
declare function createItemsApi(client: AsstClient): {
|
|
363
|
+
type ItemsApi = {
|
|
278
364
|
searchItems: (params?: {
|
|
279
365
|
url: string;
|
|
280
366
|
limit?: number;
|
|
@@ -289,6 +375,12 @@ declare function createItemsApi(client: AsstClient): {
|
|
|
289
375
|
getSpsItemId: (itemInfoId: string, signal?: AbortSignal) => Promise<SpsItemIdResponse>;
|
|
290
376
|
getItemStatus: (itemIds: string[]) => Promise<ItemStatusResponse>;
|
|
291
377
|
};
|
|
378
|
+
/**
|
|
379
|
+
* Initialize Items Api functions
|
|
380
|
+
* @param client Assortment Client instance
|
|
381
|
+
* @returns An object containing Items API functions
|
|
382
|
+
*/
|
|
383
|
+
declare function createItemsApi(client: AsstClient): ItemsApi;
|
|
292
384
|
|
|
293
385
|
declare const itemOrgStageDetailsSchema: z.ZodObject<{
|
|
294
386
|
/**
|
|
@@ -620,6 +712,9 @@ declare function createErrorsApiV2(client: AsstClient): {
|
|
|
620
712
|
getItemErrorDetails: (itemInfoId: number, signal?: AbortSignal) => Promise<ItemErrorDetailsResultV2>;
|
|
621
713
|
};
|
|
622
714
|
|
|
715
|
+
declare const FlattenedItemIdentifierKeys: readonly ["eaneight", "upc", "ean", "gtin", "upcCaseCode", "buyerPartNumber", "partnumber", "isbn", "sku", "nationalDrugCode", "drugIdentificationNumber", "nationalHealthRelatedItemCode", "manufacturersPartNumber", "internationalStandardSerialNumber", "nabcaNumber", "erpId", "componentId"];
|
|
716
|
+
type FlattenedItemIdentifiers = (typeof FlattenedItemIdentifierKeys)[number];
|
|
717
|
+
|
|
623
718
|
/**
|
|
624
719
|
* Initialize UniqueCriteria Api functions
|
|
625
720
|
* @param client Assortment Client instance
|
|
@@ -629,6 +724,9 @@ declare function createUniqueCriteriaApi(client: AsstClient): {
|
|
|
629
724
|
getUniqueCriteriaByOrg: (params?: {
|
|
630
725
|
orgId?: string;
|
|
631
726
|
}, signal?: AbortSignal) => Promise<string[]>;
|
|
727
|
+
getProductUniqueCriteriaByOrg: (params?: {
|
|
728
|
+
orgId?: string;
|
|
729
|
+
}, signal?: AbortSignal) => Promise<FlattenedItemIdentifiers[]>;
|
|
632
730
|
};
|
|
633
731
|
|
|
634
|
-
export { type ApplicationType, AsstClient, AttrProdType, AttributeDefinition, AttributeMetaData, AttributeValidValues, AttributesByCompany, type CategoriesApi, CompanyRelationshipUpsertBody, DownLoadItemsParams, Export, GenerateImportTemplateParams, type GetItemErrorSummaryParams, Import, ImportsStatus, ItemCategoriesSearch, ItemDetail, ItemDetailView, ItemErrorDetailsResult, ItemErrorDetailsResultV2, ItemErrorSummaryResultV2, 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, createErrorsApiV2, createExportsApi, createFeatureFlagsApi, createImportsApi, createItemsApi, createItemsApiV2, createLocaleApi, createProductTypesApi, createSpreadsheetTemplateApi, createTradingPartnerAccessApi, createTradingPartnerSettingsApi, createUniqueCriteriaApi, createWhoAmIApi };
|
|
732
|
+
export { type ApplicationType, AsstClient, AttrProdType, AttributeDefinition, AttributeMetaData, AttributeValidValues, AttributesByCompany, type CategoriesApi, CompanyRelationshipUpsertBody, DownLoadItemsParams, Export, 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, UserAccount, VendorPartnerAttGroups, createAttributesApi, createCategoriesApi, createCompanyFeaturesApi, createErrorsApi, createErrorsApiV2, createExportsApi, createFeatureFlagsApi, createImportsApi, createItemsApi, createItemsApiV2, createLocaleApi, createProductTypesApi, createSpreadsheetTemplateApi, createTradingPartnerAccessApi, createTradingPartnerSettingsApi, createUniqueCriteriaApi, createWhoAmIApi };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { A as AsstClient, a as
|
|
2
|
-
export {
|
|
3
|
-
import { G as GenerateImportTemplateParams, D as DownLoadItemsParams,
|
|
4
|
-
export {
|
|
5
|
-
import { R as RetailerTradingPartnerStages, I as ItemStatusResponse } from './index-Zz-6wNSh.js';
|
|
6
|
-
export { c as createCompaniesApi } from './index-Zz-6wNSh.js';
|
|
1
|
+
import { A as AsstClient, a as AttributeValidValues, S as SpsItemIdResponse } from './CompanyBriefByOrg-itus4RMD.js';
|
|
2
|
+
export { b as AsstClientOptions, c as AsstUrl, B as BASE_URLS, C as CompanyBriefByOrg, E as Env, e as envSchema } from './CompanyBriefByOrg-itus4RMD.js';
|
|
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, d as ItemHierarchyResponse, e as AttributeMetaData, f as AttributesByCompany, g as AttributeDefinition, L as Locale, S as SpreadsheetTemplate, U as UserAccount, h as ItemSearchView, i as ItemDetailView, j as ItemDetail, k as ItemErrorDetailsResult, l as ItemErrorSummaryResultV2, m as ItemErrorDetailsResultV2 } from './zod-C5pRCHei.js';
|
|
4
|
+
export { x as AttrDatatypeNameEnum, W as AttributeDetail, y as AttributeGroup, w as AttributeSummary, a5 as Bulb, X as CategoryEnum, Y as ComponentDetails, u as Connection, r as ExportDayOfWeek, s as ExportFrequency, t as ExportType, Z as GroupedAttributeList, _ as GroupedAttributes, $ as GroupedItem, a0 as HierarchyCategory, a1 as HierarchyDetails, F as IdentityServiceDatetimePreferences, H as IdentityServiceOrganization, B as IdentityServiceOrganizationMetadata, J as IdentityServicePreferences, K as IdentityServiceUser, n as ImportDetails, o as ImportError, p as ImportErrors, q as ImportStatusEnum, v as ItemCategory, a9 as ItemErrorDetails, ab as ItemErrorDetailsV2, aa as ItemErrorSummaryV2, M as ItemHeader, N as ItemMap, a2 as ItemPrice, O as ItemTable, a4 as MediaItem, a6 as PackComponent, a3 as PackComponentDetails, a8 as PackComponentItemInfo, P as PhaseEnum, R as RegisteredService, a7 as RepeatableGroup, z as SpreadsheetTemplateCompany, Q as TradingPartnerStage, ac as TradingPartnerStageV2 } from './zod-C5pRCHei.js';
|
|
7
5
|
import { z } from 'zod';
|
|
6
|
+
export { c as createCompaniesApi } from './index-BFKgtuVI.js';
|
|
8
7
|
import 'ky';
|
|
9
8
|
|
|
10
9
|
/**
|
|
@@ -13,7 +12,7 @@ import 'ky';
|
|
|
13
12
|
* @returns An object containing Imports API functions
|
|
14
13
|
*/
|
|
15
14
|
declare function createImportsApi(client: AsstClient): {
|
|
16
|
-
getImportErrors: (importId:
|
|
15
|
+
getImportErrors: (importId: string, params?: {
|
|
17
16
|
offset?: number;
|
|
18
17
|
limit?: number;
|
|
19
18
|
}, signal?: AbortSignal) => Promise<{
|
|
@@ -73,6 +72,9 @@ declare function createTradingPartnerAccessApi(client: AsstClient): {
|
|
|
73
72
|
upsertHierarchy: (data: CompanyRelationshipUpsertBody) => Promise<void>;
|
|
74
73
|
};
|
|
75
74
|
|
|
75
|
+
declare const retailerTradingPartnerStages: z.ZodArray<z.ZodEnum<["Core", "Core Plus", "Core Advanced", "Enriched", "Standard Requirements"]>, "many">;
|
|
76
|
+
type RetailerTradingPartnerStages = z.infer<typeof retailerTradingPartnerStages>;
|
|
77
|
+
|
|
76
78
|
/**
|
|
77
79
|
* Initialize Trading Partner Settings Api functions
|
|
78
80
|
* @param client Assortment Client instance
|
|
@@ -172,8 +174,97 @@ declare function createCompanyFeaturesApi(client: AsstClient): {
|
|
|
172
174
|
*/
|
|
173
175
|
declare function createFeatureFlagsApi(client: AsstClient): {
|
|
174
176
|
checkEnableItemsLevelMSIS: (signal?: AbortSignal) => Promise<boolean>;
|
|
177
|
+
checkIfEnabledForPackagingHierarchies: (signal?: AbortSignal) => Promise<boolean>;
|
|
175
178
|
};
|
|
176
179
|
|
|
180
|
+
declare const itemStatusResponseSchema: z.ZodObject<{
|
|
181
|
+
itemStatuses: z.ZodArray<z.ZodObject<{
|
|
182
|
+
itemId: z.ZodString;
|
|
183
|
+
itemOrgStatuses: z.ZodArray<z.ZodObject<{
|
|
184
|
+
org: z.ZodObject<{
|
|
185
|
+
ref: z.ZodString;
|
|
186
|
+
id: z.ZodString;
|
|
187
|
+
name: z.ZodString;
|
|
188
|
+
}, "strip", z.ZodTypeAny, {
|
|
189
|
+
name: string;
|
|
190
|
+
id: string;
|
|
191
|
+
ref: string;
|
|
192
|
+
}, {
|
|
193
|
+
name: string;
|
|
194
|
+
id: string;
|
|
195
|
+
ref: string;
|
|
196
|
+
}>;
|
|
197
|
+
lowestInvalidStage: z.ZodNullable<z.ZodEnum<["CORE", "CORE_PLUS", "CORE_ADVANCED", "ENRICHED", "STANDARD_REQUIREMENTS"]>>;
|
|
198
|
+
validForRelationship: z.ZodBoolean;
|
|
199
|
+
}, "strip", z.ZodTypeAny, {
|
|
200
|
+
org: {
|
|
201
|
+
name: string;
|
|
202
|
+
id: string;
|
|
203
|
+
ref: string;
|
|
204
|
+
};
|
|
205
|
+
lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
|
|
206
|
+
validForRelationship: boolean;
|
|
207
|
+
}, {
|
|
208
|
+
org: {
|
|
209
|
+
name: string;
|
|
210
|
+
id: string;
|
|
211
|
+
ref: string;
|
|
212
|
+
};
|
|
213
|
+
lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
|
|
214
|
+
validForRelationship: boolean;
|
|
215
|
+
}>, "many">;
|
|
216
|
+
}, "strip", z.ZodTypeAny, {
|
|
217
|
+
itemId: string;
|
|
218
|
+
itemOrgStatuses: {
|
|
219
|
+
org: {
|
|
220
|
+
name: string;
|
|
221
|
+
id: string;
|
|
222
|
+
ref: string;
|
|
223
|
+
};
|
|
224
|
+
lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
|
|
225
|
+
validForRelationship: boolean;
|
|
226
|
+
}[];
|
|
227
|
+
}, {
|
|
228
|
+
itemId: string;
|
|
229
|
+
itemOrgStatuses: {
|
|
230
|
+
org: {
|
|
231
|
+
name: string;
|
|
232
|
+
id: string;
|
|
233
|
+
ref: string;
|
|
234
|
+
};
|
|
235
|
+
lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
|
|
236
|
+
validForRelationship: boolean;
|
|
237
|
+
}[];
|
|
238
|
+
}>, "many">;
|
|
239
|
+
}, "strip", z.ZodTypeAny, {
|
|
240
|
+
itemStatuses: {
|
|
241
|
+
itemId: string;
|
|
242
|
+
itemOrgStatuses: {
|
|
243
|
+
org: {
|
|
244
|
+
name: string;
|
|
245
|
+
id: string;
|
|
246
|
+
ref: string;
|
|
247
|
+
};
|
|
248
|
+
lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
|
|
249
|
+
validForRelationship: boolean;
|
|
250
|
+
}[];
|
|
251
|
+
}[];
|
|
252
|
+
}, {
|
|
253
|
+
itemStatuses: {
|
|
254
|
+
itemId: string;
|
|
255
|
+
itemOrgStatuses: {
|
|
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
|
+
}[];
|
|
265
|
+
}>;
|
|
266
|
+
type ItemStatusResponse = z.infer<typeof itemStatusResponseSchema>;
|
|
267
|
+
|
|
177
268
|
declare const itemStatusSchema: z.ZodObject<{
|
|
178
269
|
itemId: z.ZodString;
|
|
179
270
|
itemOrgStatuses: z.ZodArray<z.ZodObject<{
|
|
@@ -269,12 +360,7 @@ declare const itemOrgStatusSchema: z.ZodObject<{
|
|
|
269
360
|
}>;
|
|
270
361
|
type ItemOrgStatus = z.infer<typeof itemOrgStatusSchema>;
|
|
271
362
|
|
|
272
|
-
|
|
273
|
-
* Initialize Items Api functions
|
|
274
|
-
* @param client Assortment Client instance
|
|
275
|
-
* @returns An object containing Items API functions
|
|
276
|
-
*/
|
|
277
|
-
declare function createItemsApi(client: AsstClient): {
|
|
363
|
+
type ItemsApi = {
|
|
278
364
|
searchItems: (params?: {
|
|
279
365
|
url: string;
|
|
280
366
|
limit?: number;
|
|
@@ -289,6 +375,12 @@ declare function createItemsApi(client: AsstClient): {
|
|
|
289
375
|
getSpsItemId: (itemInfoId: string, signal?: AbortSignal) => Promise<SpsItemIdResponse>;
|
|
290
376
|
getItemStatus: (itemIds: string[]) => Promise<ItemStatusResponse>;
|
|
291
377
|
};
|
|
378
|
+
/**
|
|
379
|
+
* Initialize Items Api functions
|
|
380
|
+
* @param client Assortment Client instance
|
|
381
|
+
* @returns An object containing Items API functions
|
|
382
|
+
*/
|
|
383
|
+
declare function createItemsApi(client: AsstClient): ItemsApi;
|
|
292
384
|
|
|
293
385
|
declare const itemOrgStageDetailsSchema: z.ZodObject<{
|
|
294
386
|
/**
|
|
@@ -620,6 +712,9 @@ declare function createErrorsApiV2(client: AsstClient): {
|
|
|
620
712
|
getItemErrorDetails: (itemInfoId: number, signal?: AbortSignal) => Promise<ItemErrorDetailsResultV2>;
|
|
621
713
|
};
|
|
622
714
|
|
|
715
|
+
declare const FlattenedItemIdentifierKeys: readonly ["eaneight", "upc", "ean", "gtin", "upcCaseCode", "buyerPartNumber", "partnumber", "isbn", "sku", "nationalDrugCode", "drugIdentificationNumber", "nationalHealthRelatedItemCode", "manufacturersPartNumber", "internationalStandardSerialNumber", "nabcaNumber", "erpId", "componentId"];
|
|
716
|
+
type FlattenedItemIdentifiers = (typeof FlattenedItemIdentifierKeys)[number];
|
|
717
|
+
|
|
623
718
|
/**
|
|
624
719
|
* Initialize UniqueCriteria Api functions
|
|
625
720
|
* @param client Assortment Client instance
|
|
@@ -629,6 +724,9 @@ declare function createUniqueCriteriaApi(client: AsstClient): {
|
|
|
629
724
|
getUniqueCriteriaByOrg: (params?: {
|
|
630
725
|
orgId?: string;
|
|
631
726
|
}, signal?: AbortSignal) => Promise<string[]>;
|
|
727
|
+
getProductUniqueCriteriaByOrg: (params?: {
|
|
728
|
+
orgId?: string;
|
|
729
|
+
}, signal?: AbortSignal) => Promise<FlattenedItemIdentifiers[]>;
|
|
632
730
|
};
|
|
633
731
|
|
|
634
|
-
export { type ApplicationType, AsstClient, AttrProdType, AttributeDefinition, AttributeMetaData, AttributeValidValues, AttributesByCompany, type CategoriesApi, CompanyRelationshipUpsertBody, DownLoadItemsParams, Export, GenerateImportTemplateParams, type GetItemErrorSummaryParams, Import, ImportsStatus, ItemCategoriesSearch, ItemDetail, ItemDetailView, ItemErrorDetailsResult, ItemErrorDetailsResultV2, ItemErrorSummaryResultV2, 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, createErrorsApiV2, createExportsApi, createFeatureFlagsApi, createImportsApi, createItemsApi, createItemsApiV2, createLocaleApi, createProductTypesApi, createSpreadsheetTemplateApi, createTradingPartnerAccessApi, createTradingPartnerSettingsApi, createUniqueCriteriaApi, createWhoAmIApi };
|
|
732
|
+
export { type ApplicationType, AsstClient, AttrProdType, AttributeDefinition, AttributeMetaData, AttributeValidValues, AttributesByCompany, type CategoriesApi, CompanyRelationshipUpsertBody, DownLoadItemsParams, Export, 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, UserAccount, VendorPartnerAttGroups, createAttributesApi, createCategoriesApi, createCompanyFeaturesApi, createErrorsApi, createErrorsApiV2, createExportsApi, createFeatureFlagsApi, createImportsApi, createItemsApi, createItemsApiV2, createLocaleApi, createProductTypesApi, createSpreadsheetTemplateApi, createTradingPartnerAccessApi, createTradingPartnerSettingsApi, createUniqueCriteriaApi, createWhoAmIApi };
|
package/dist/index.js
CHANGED
|
@@ -16,13 +16,13 @@ import {
|
|
|
16
16
|
createTradingPartnerSettingsApi,
|
|
17
17
|
createUniqueCriteriaApi,
|
|
18
18
|
createWhoAmIApi
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-TTT6PM27.js";
|
|
20
20
|
import {
|
|
21
21
|
AsstClient,
|
|
22
22
|
BASE_URLS,
|
|
23
23
|
envSchema,
|
|
24
24
|
itemStatusV2ResponseSchema
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-5AROSGQB.js";
|
|
26
26
|
|
|
27
27
|
// lib/items/v2/index.ts
|
|
28
28
|
var BASE_URL = "v2/items";
|