@spscommerce/asst-api 4.4.0 → 4.6.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/{SpsItemIdResponse-s0vCXepG.d.cts → SpsItemIdResponse-gAHfCzwP.d.cts} +22 -1
- package/dist/{SpsItemIdResponse-s0vCXepG.d.ts → SpsItemIdResponse-gAHfCzwP.d.ts} +22 -1
- package/dist/{chunk-YT2B4UAK.js → chunk-BMTYM2N6.js} +8 -12
- package/dist/{chunk-V2XRXJIJ.js → chunk-U7UJOT4D.js} +23 -19
- package/dist/{chunk-WODMKML4.js → chunk-WX4LGXJV.js} +1 -1
- package/dist/index.cjs +30 -29
- package/dist/index.d.cts +38 -28
- package/dist/index.d.ts +38 -28
- package/dist/index.js +3 -3
- package/dist/msw.cjs +23 -14
- package/dist/msw.d.cts +19 -9
- package/dist/msw.d.ts +19 -9
- package/dist/msw.js +16 -3
- package/dist/{zod-CJ7lvFQH.d.cts → zod-C-emh7a3.d.cts} +2 -38
- package/dist/{zod-j6CrX5vY.d.ts → zod-D3Xe9bw3.d.ts} +2 -38
- package/dist/zod.cjs +8 -12
- package/dist/zod.d.cts +2 -2
- package/dist/zod.d.ts +2 -2
- package/dist/zod.js +2 -2
- package/package.json +2 -3
|
@@ -44,6 +44,27 @@ declare class AsstClient {
|
|
|
44
44
|
delete(url: Input, options?: AsstClientOptions): ky.ResponsePromise;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
declare const companyBriefByOrgSchema: z.ZodObject<{
|
|
48
|
+
companyId: z.ZodNumber;
|
|
49
|
+
name: z.ZodString;
|
|
50
|
+
orgId: z.ZodString;
|
|
51
|
+
companyTypes: z.ZodArray<z.ZodEnum<["SUPPLIER", "RETAILER"]>, "many">;
|
|
52
|
+
dc4Id: z.ZodNumber;
|
|
53
|
+
}, "strip", z.ZodTypeAny, {
|
|
54
|
+
name: string;
|
|
55
|
+
companyId: number;
|
|
56
|
+
orgId: string;
|
|
57
|
+
companyTypes: ("SUPPLIER" | "RETAILER")[];
|
|
58
|
+
dc4Id: number;
|
|
59
|
+
}, {
|
|
60
|
+
name: string;
|
|
61
|
+
companyId: number;
|
|
62
|
+
orgId: string;
|
|
63
|
+
companyTypes: ("SUPPLIER" | "RETAILER")[];
|
|
64
|
+
dc4Id: number;
|
|
65
|
+
}>;
|
|
66
|
+
type CompanyBriefByOrg = z.infer<typeof companyBriefByOrgSchema>;
|
|
67
|
+
|
|
47
68
|
type Hierarchy = {
|
|
48
69
|
id: string;
|
|
49
70
|
name?: string | null;
|
|
@@ -71,4 +92,4 @@ declare const spsItemIdResponseSchema: z.ZodObject<{
|
|
|
71
92
|
}>;
|
|
72
93
|
type SpsItemIdResponse = z.infer<typeof spsItemIdResponseSchema>;
|
|
73
94
|
|
|
74
|
-
export { AsstClient as A, BASE_URLS as B, type Env as E, type ItemHierarchyResponse as I, type SpsItemIdResponse as S, type AsstClientOptions as a, type AsstUrl as b, envSchema as e, itemHierarchyResponseSchema as i, spsItemIdResponseSchema as s };
|
|
95
|
+
export { AsstClient as A, BASE_URLS as B, type CompanyBriefByOrg as C, type Env as E, type ItemHierarchyResponse as I, type SpsItemIdResponse as S, type AsstClientOptions as a, type AsstUrl as b, companyBriefByOrgSchema as c, envSchema as e, itemHierarchyResponseSchema as i, spsItemIdResponseSchema as s };
|
|
@@ -44,6 +44,27 @@ declare class AsstClient {
|
|
|
44
44
|
delete(url: Input, options?: AsstClientOptions): ky.ResponsePromise;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
declare const companyBriefByOrgSchema: z.ZodObject<{
|
|
48
|
+
companyId: z.ZodNumber;
|
|
49
|
+
name: z.ZodString;
|
|
50
|
+
orgId: z.ZodString;
|
|
51
|
+
companyTypes: z.ZodArray<z.ZodEnum<["SUPPLIER", "RETAILER"]>, "many">;
|
|
52
|
+
dc4Id: z.ZodNumber;
|
|
53
|
+
}, "strip", z.ZodTypeAny, {
|
|
54
|
+
name: string;
|
|
55
|
+
companyId: number;
|
|
56
|
+
orgId: string;
|
|
57
|
+
companyTypes: ("SUPPLIER" | "RETAILER")[];
|
|
58
|
+
dc4Id: number;
|
|
59
|
+
}, {
|
|
60
|
+
name: string;
|
|
61
|
+
companyId: number;
|
|
62
|
+
orgId: string;
|
|
63
|
+
companyTypes: ("SUPPLIER" | "RETAILER")[];
|
|
64
|
+
dc4Id: number;
|
|
65
|
+
}>;
|
|
66
|
+
type CompanyBriefByOrg = z.infer<typeof companyBriefByOrgSchema>;
|
|
67
|
+
|
|
47
68
|
type Hierarchy = {
|
|
48
69
|
id: string;
|
|
49
70
|
name?: string | null;
|
|
@@ -71,4 +92,4 @@ declare const spsItemIdResponseSchema: z.ZodObject<{
|
|
|
71
92
|
}>;
|
|
72
93
|
type SpsItemIdResponse = z.infer<typeof spsItemIdResponseSchema>;
|
|
73
94
|
|
|
74
|
-
export { AsstClient as A, BASE_URLS as B, type Env as E, type ItemHierarchyResponse as I, type SpsItemIdResponse as S, type AsstClientOptions as a, type AsstUrl as b, envSchema as e, itemHierarchyResponseSchema as i, spsItemIdResponseSchema as s };
|
|
95
|
+
export { AsstClient as A, BASE_URLS as B, type CompanyBriefByOrg as C, type Env as E, type ItemHierarchyResponse as I, type SpsItemIdResponse as S, type AsstClientOptions as a, type AsstUrl as b, companyBriefByOrgSchema as c, envSchema as e, itemHierarchyResponseSchema as i, spsItemIdResponseSchema as s };
|
|
@@ -4229,13 +4229,12 @@ var itemHierarchyResponseSchema = external_exports.object({
|
|
|
4229
4229
|
|
|
4230
4230
|
// lib/categories/models/CatalogManagement.ts
|
|
4231
4231
|
var catalogCreateRequestSchema = external_exports.object({
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
categoryDescription: external_exports.string().optional()
|
|
4232
|
+
type: external_exports.string(),
|
|
4233
|
+
name: external_exports.string(),
|
|
4234
|
+
companyId: external_exports.number()
|
|
4236
4235
|
});
|
|
4237
4236
|
var catalogCreateResponseSchema = external_exports.object({
|
|
4238
|
-
|
|
4237
|
+
categoryid: external_exports.number()
|
|
4239
4238
|
});
|
|
4240
4239
|
var catalogSearchParamsSchema = external_exports.object({
|
|
4241
4240
|
ownerCompanyIds: external_exports.array(external_exports.number()).optional(),
|
|
@@ -4843,21 +4842,18 @@ var itemErrorDetailsResultV2Schema = external_exports.object({
|
|
|
4843
4842
|
itemErrorDetails: external_exports.array(itemErrorDetailsV2Schema)
|
|
4844
4843
|
});
|
|
4845
4844
|
|
|
4845
|
+
// lib/companies/models/CompanyType.ts
|
|
4846
|
+
var companyTypeSchema = external_exports.enum(["SUPPLIER", "RETAILER"]);
|
|
4847
|
+
|
|
4846
4848
|
// lib/companies/models/CompanyBriefByOrg.ts
|
|
4847
4849
|
var companyBriefByOrgSchema = external_exports.object({
|
|
4848
4850
|
companyId: external_exports.number(),
|
|
4849
4851
|
name: external_exports.string(),
|
|
4850
4852
|
orgId: external_exports.string(),
|
|
4851
|
-
|
|
4852
|
-
type: external_exports.enum(["SUPPLIER", "RETAILER"]),
|
|
4853
|
-
display: external_exports.enum(["SUPPLIER", "RETAILER"])
|
|
4854
|
-
}),
|
|
4853
|
+
companyTypes: external_exports.array(companyTypeSchema),
|
|
4855
4854
|
dc4Id: external_exports.number()
|
|
4856
4855
|
});
|
|
4857
4856
|
|
|
4858
|
-
// lib/companies/models/CompanyType.ts
|
|
4859
|
-
var companyTypeSchema = external_exports.enum(["SUPPLIER", "RETAILER"]);
|
|
4860
|
-
|
|
4861
4857
|
export {
|
|
4862
4858
|
external_exports,
|
|
4863
4859
|
importDetailSchema,
|
|
@@ -14,7 +14,6 @@ import {
|
|
|
14
14
|
itemErrorSummaryResultV2Schema,
|
|
15
15
|
itemHierarchyResponseSchema,
|
|
16
16
|
itemSearchViewSchema,
|
|
17
|
-
itemStatusResponseSchema,
|
|
18
17
|
itemStatusV2ResponseSchema,
|
|
19
18
|
localeSchema,
|
|
20
19
|
spreadsheetTemplateSchema,
|
|
@@ -22,7 +21,7 @@ import {
|
|
|
22
21
|
tradingPartnerAccessByCompanyIdSchema,
|
|
23
22
|
userAccountSchema,
|
|
24
23
|
vendorPartnerAttGroupsSchema
|
|
25
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-BMTYM2N6.js";
|
|
26
25
|
|
|
27
26
|
// lib/util.ts
|
|
28
27
|
function getCompanyTypeSearchParams({
|
|
@@ -160,10 +159,10 @@ function createProductTypesApi(client) {
|
|
|
160
159
|
|
|
161
160
|
// lib/tradingPartners/index.ts
|
|
162
161
|
var BASE_URL4 = "trading-partner-access";
|
|
163
|
-
function createTradingPartnerAccessApi(client) {
|
|
162
|
+
function createTradingPartnerAccessApi(client, companyType) {
|
|
164
163
|
async function getAllTradingPartners(params, signal) {
|
|
165
164
|
const data = await client.get(`${BASE_URL4}/connections`, {
|
|
166
|
-
searchParams: params,
|
|
165
|
+
searchParams: getCompanyTypeSearchParams({ params, companyType }),
|
|
167
166
|
signal
|
|
168
167
|
}).json();
|
|
169
168
|
return tradingPartnerAccessByCompanyIdSchema.parse(data);
|
|
@@ -260,7 +259,7 @@ function createCategoriesApi(client) {
|
|
|
260
259
|
return itemHierarchyResponseSchema.parse(data);
|
|
261
260
|
}
|
|
262
261
|
async function createCatalog(params, signal) {
|
|
263
|
-
const data = await client.post(
|
|
262
|
+
const data = await client.post(`${BASE_URL6}`, {
|
|
264
263
|
json: params,
|
|
265
264
|
signal
|
|
266
265
|
}).json();
|
|
@@ -346,8 +345,12 @@ function createCompanyFeaturesApi(client, companyType) {
|
|
|
346
345
|
}).json();
|
|
347
346
|
return external_exports.boolean().parse(data);
|
|
348
347
|
}
|
|
348
|
+
async function enableFeatureForCompany(featureKey, companyId) {
|
|
349
|
+
await client.put(`${BASE_URL10}/${featureKey}/company/${companyId}/enable`);
|
|
350
|
+
}
|
|
349
351
|
return {
|
|
350
|
-
checkIfStageItemSetupIsEnabled
|
|
352
|
+
checkIfStageItemSetupIsEnabled,
|
|
353
|
+
enableFeatureForCompany
|
|
351
354
|
};
|
|
352
355
|
}
|
|
353
356
|
|
|
@@ -437,13 +440,6 @@ function createItemsApi(client, companyType) {
|
|
|
437
440
|
const data = await client.get(`${BASE_URL12}/${itemInfoId}/spsItemId`, { signal }).json();
|
|
438
441
|
return spsItemIdResponseSchema.parse(data);
|
|
439
442
|
}
|
|
440
|
-
async function getItemStatus(itemIds) {
|
|
441
|
-
const data = await client.post(`${BASE_URL12}/status`, {
|
|
442
|
-
json: { itemIds },
|
|
443
|
-
searchParams: getCompanyTypeSearchParams({ companyType })
|
|
444
|
-
}).json();
|
|
445
|
-
return itemStatusResponseSchema.parse(data);
|
|
446
|
-
}
|
|
447
443
|
return {
|
|
448
444
|
searchItems,
|
|
449
445
|
getItem,
|
|
@@ -451,15 +447,14 @@ function createItemsApi(client, companyType) {
|
|
|
451
447
|
deleteItem,
|
|
452
448
|
deleteItems,
|
|
453
449
|
getItemInfoId,
|
|
454
|
-
getSpsItemId
|
|
455
|
-
getItemStatus
|
|
450
|
+
getSpsItemId
|
|
456
451
|
};
|
|
457
452
|
}
|
|
458
453
|
|
|
459
454
|
// lib/items/v2/index.ts
|
|
460
455
|
var BASE_URL13 = "v2/items";
|
|
461
|
-
function createItemsApiV2(client
|
|
462
|
-
async function getItemStatus(itemIds) {
|
|
456
|
+
function createItemsApiV2(client) {
|
|
457
|
+
async function getItemStatus(companyType, itemIds) {
|
|
463
458
|
const data = await client.post(`${BASE_URL13}/status`, {
|
|
464
459
|
json: { itemIds },
|
|
465
460
|
searchParams: getCompanyTypeSearchParams({ companyType })
|
|
@@ -579,15 +574,24 @@ function createUniqueCriteriaApi(client) {
|
|
|
579
574
|
}).json();
|
|
580
575
|
return external_exports.array(FlattenedItemIdentifierKeysSchema).parse(data);
|
|
581
576
|
}
|
|
577
|
+
async function updateMultipleUniqueCriteriaAttributes(uniqueAttributes, companyId) {
|
|
578
|
+
await client.put(`${BASE_URL16}/multiple/${companyId}`, {
|
|
579
|
+
json: uniqueAttributes,
|
|
580
|
+
headers: {
|
|
581
|
+
"Content-Type": "application/json"
|
|
582
|
+
}
|
|
583
|
+
});
|
|
584
|
+
}
|
|
582
585
|
return {
|
|
583
586
|
getUniqueCriteriaOptions,
|
|
584
587
|
getUniqueCriteriaByOrg,
|
|
585
|
-
getProductUniqueCriteriaByOrg
|
|
588
|
+
getProductUniqueCriteriaByOrg,
|
|
589
|
+
updateMultipleUniqueCriteriaAttributes
|
|
586
590
|
};
|
|
587
591
|
}
|
|
588
592
|
|
|
589
593
|
// lib/companies/index.ts
|
|
590
|
-
var BASE_URL17 = "companys";
|
|
594
|
+
var BASE_URL17 = "v3/companys";
|
|
591
595
|
function createCompaniesApi(client) {
|
|
592
596
|
async function getCompanyBriefInfoByOrg(params, signal) {
|
|
593
597
|
const data = await client.get(`${BASE_URL17}/brief`, {
|
package/dist/index.cjs
CHANGED
|
@@ -4432,10 +4432,10 @@ var tradingPartnerAccessByCompanyIdSchema = external_exports.object({
|
|
|
4432
4432
|
|
|
4433
4433
|
// lib/tradingPartners/index.ts
|
|
4434
4434
|
var BASE_URL4 = "trading-partner-access";
|
|
4435
|
-
function createTradingPartnerAccessApi(client) {
|
|
4435
|
+
function createTradingPartnerAccessApi(client, companyType) {
|
|
4436
4436
|
async function getAllTradingPartners(params, signal) {
|
|
4437
4437
|
const data = await client.get(`${BASE_URL4}/connections`, {
|
|
4438
|
-
searchParams: params,
|
|
4438
|
+
searchParams: getCompanyTypeSearchParams({ params, companyType }),
|
|
4439
4439
|
signal
|
|
4440
4440
|
}).json();
|
|
4441
4441
|
return tradingPartnerAccessByCompanyIdSchema.parse(data);
|
|
@@ -4525,13 +4525,12 @@ var itemHierarchyResponseSchema = external_exports.object({
|
|
|
4525
4525
|
|
|
4526
4526
|
// lib/categories/models/CatalogManagement.ts
|
|
4527
4527
|
var catalogCreateRequestSchema = external_exports.object({
|
|
4528
|
-
|
|
4529
|
-
|
|
4530
|
-
|
|
4531
|
-
categoryDescription: external_exports.string().optional()
|
|
4528
|
+
type: external_exports.string(),
|
|
4529
|
+
name: external_exports.string(),
|
|
4530
|
+
companyId: external_exports.number()
|
|
4532
4531
|
});
|
|
4533
4532
|
var catalogCreateResponseSchema = external_exports.object({
|
|
4534
|
-
|
|
4533
|
+
categoryid: external_exports.number()
|
|
4535
4534
|
});
|
|
4536
4535
|
var catalogSearchParamsSchema = external_exports.object({
|
|
4537
4536
|
ownerCompanyIds: external_exports.array(external_exports.number()).optional(),
|
|
@@ -4604,7 +4603,7 @@ function createCategoriesApi(client) {
|
|
|
4604
4603
|
return itemHierarchyResponseSchema.parse(data);
|
|
4605
4604
|
}
|
|
4606
4605
|
async function createCatalog(params, signal) {
|
|
4607
|
-
const data = await client.post(
|
|
4606
|
+
const data = await client.post(`${BASE_URL6}`, {
|
|
4608
4607
|
json: params,
|
|
4609
4608
|
signal
|
|
4610
4609
|
}).json();
|
|
@@ -4810,8 +4809,12 @@ function createCompanyFeaturesApi(client, companyType) {
|
|
|
4810
4809
|
}).json();
|
|
4811
4810
|
return external_exports.boolean().parse(data);
|
|
4812
4811
|
}
|
|
4812
|
+
async function enableFeatureForCompany(featureKey, companyId) {
|
|
4813
|
+
await client.put(`${BASE_URL10}/${featureKey}/company/${companyId}/enable`);
|
|
4814
|
+
}
|
|
4813
4815
|
return {
|
|
4814
|
-
checkIfStageItemSetupIsEnabled
|
|
4816
|
+
checkIfStageItemSetupIsEnabled,
|
|
4817
|
+
enableFeatureForCompany
|
|
4815
4818
|
};
|
|
4816
4819
|
}
|
|
4817
4820
|
|
|
@@ -5217,13 +5220,6 @@ function createItemsApi(client, companyType) {
|
|
|
5217
5220
|
const data = await client.get(`${BASE_URL12}/${itemInfoId}/spsItemId`, { signal }).json();
|
|
5218
5221
|
return spsItemIdResponseSchema.parse(data);
|
|
5219
5222
|
}
|
|
5220
|
-
async function getItemStatus(itemIds) {
|
|
5221
|
-
const data = await client.post(`${BASE_URL12}/status`, {
|
|
5222
|
-
json: { itemIds },
|
|
5223
|
-
searchParams: getCompanyTypeSearchParams({ companyType })
|
|
5224
|
-
}).json();
|
|
5225
|
-
return itemStatusResponseSchema.parse(data);
|
|
5226
|
-
}
|
|
5227
5223
|
return {
|
|
5228
5224
|
searchItems,
|
|
5229
5225
|
getItem,
|
|
@@ -5231,8 +5227,7 @@ function createItemsApi(client, companyType) {
|
|
|
5231
5227
|
deleteItem,
|
|
5232
5228
|
deleteItems,
|
|
5233
5229
|
getItemInfoId,
|
|
5234
|
-
getSpsItemId
|
|
5235
|
-
getItemStatus
|
|
5230
|
+
getSpsItemId
|
|
5236
5231
|
};
|
|
5237
5232
|
}
|
|
5238
5233
|
|
|
@@ -5300,8 +5295,8 @@ var itemStatusV2ResponseSchema = external_exports.object({
|
|
|
5300
5295
|
|
|
5301
5296
|
// lib/items/v2/index.ts
|
|
5302
5297
|
var BASE_URL13 = "v2/items";
|
|
5303
|
-
function createItemsApiV2(client
|
|
5304
|
-
async function getItemStatus(itemIds) {
|
|
5298
|
+
function createItemsApiV2(client) {
|
|
5299
|
+
async function getItemStatus(companyType, itemIds) {
|
|
5305
5300
|
const data = await client.post(`${BASE_URL13}/status`, {
|
|
5306
5301
|
json: { itemIds },
|
|
5307
5302
|
searchParams: getCompanyTypeSearchParams({ companyType })
|
|
@@ -5511,30 +5506,36 @@ function createUniqueCriteriaApi(client) {
|
|
|
5511
5506
|
}).json();
|
|
5512
5507
|
return external_exports.array(FlattenedItemIdentifierKeysSchema).parse(data);
|
|
5513
5508
|
}
|
|
5509
|
+
async function updateMultipleUniqueCriteriaAttributes(uniqueAttributes, companyId) {
|
|
5510
|
+
await client.put(`${BASE_URL16}/multiple/${companyId}`, {
|
|
5511
|
+
json: uniqueAttributes,
|
|
5512
|
+
headers: {
|
|
5513
|
+
"Content-Type": "application/json"
|
|
5514
|
+
}
|
|
5515
|
+
});
|
|
5516
|
+
}
|
|
5514
5517
|
return {
|
|
5515
5518
|
getUniqueCriteriaOptions,
|
|
5516
5519
|
getUniqueCriteriaByOrg,
|
|
5517
|
-
getProductUniqueCriteriaByOrg
|
|
5520
|
+
getProductUniqueCriteriaByOrg,
|
|
5521
|
+
updateMultipleUniqueCriteriaAttributes
|
|
5518
5522
|
};
|
|
5519
5523
|
}
|
|
5520
5524
|
|
|
5525
|
+
// lib/companies/models/CompanyType.ts
|
|
5526
|
+
var companyTypeSchema = external_exports.enum(["SUPPLIER", "RETAILER"]);
|
|
5527
|
+
|
|
5521
5528
|
// lib/companies/models/CompanyBriefByOrg.ts
|
|
5522
5529
|
var companyBriefByOrgSchema = external_exports.object({
|
|
5523
5530
|
companyId: external_exports.number(),
|
|
5524
5531
|
name: external_exports.string(),
|
|
5525
5532
|
orgId: external_exports.string(),
|
|
5526
|
-
|
|
5527
|
-
type: external_exports.enum(["SUPPLIER", "RETAILER"]),
|
|
5528
|
-
display: external_exports.enum(["SUPPLIER", "RETAILER"])
|
|
5529
|
-
}),
|
|
5533
|
+
companyTypes: external_exports.array(companyTypeSchema),
|
|
5530
5534
|
dc4Id: external_exports.number()
|
|
5531
5535
|
});
|
|
5532
5536
|
|
|
5533
|
-
// lib/companies/models/CompanyType.ts
|
|
5534
|
-
var companyTypeSchema = external_exports.enum(["SUPPLIER", "RETAILER"]);
|
|
5535
|
-
|
|
5536
5537
|
// lib/companies/index.ts
|
|
5537
|
-
var BASE_URL17 = "companys";
|
|
5538
|
+
var BASE_URL17 = "v3/companys";
|
|
5538
5539
|
function createCompaniesApi(client) {
|
|
5539
5540
|
async function getCompanyBriefInfoByOrg(params, signal) {
|
|
5540
5541
|
const data = await client.get(`${BASE_URL17}/brief`, {
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { A as AsstClient, I as ItemHierarchyResponse, S as SpsItemIdResponse } from './SpsItemIdResponse-
|
|
2
|
-
export { a as AsstClientOptions, b as AsstUrl, B as BASE_URLS, E as Env, e as envSchema } from './SpsItemIdResponse-
|
|
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
|
|
4
|
-
export {
|
|
1
|
+
import { A as AsstClient, I as ItemHierarchyResponse, S as SpsItemIdResponse, C as CompanyBriefByOrg } from './SpsItemIdResponse-gAHfCzwP.cjs';
|
|
2
|
+
export { a as AsstClientOptions, b as AsstUrl, B as BASE_URLS, E as Env, e as envSchema } from './SpsItemIdResponse-gAHfCzwP.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-C-emh7a3.cjs';
|
|
4
|
+
export { K as AttributeDetail, a0 as Bulb, M as CategoryEnum, N as ComponentDetails, q as Connection, n as ExportDayOfWeek, o as ExportFrequency, p as ExportType, O as GroupedAttributeList, Q as GroupedAttributes, W as GroupedItem, X as HierarchyCategory, Y as HierarchyDetails, v as IdentityServiceDatetimePreferences, w as IdentityServiceOrganization, u as IdentityServiceOrganizationMetadata, x as IdentityServicePreferences, y as IdentityServiceUser, j as ImportDetails, k as ImportError, l as ImportErrors, m as ImportStatusEnum, s as ItemCategory, a4 as ItemErrorDetails, a6 as ItemErrorDetailsV2, a5 as ItemErrorSummaryV2, z as ItemHeader, B as ItemMap, Z as ItemPrice, F as ItemTable, $ as MediaItem, P as PRODUCT_CODE_DEFAULT_VALUE, a1 as PackComponent, _ as PackComponentDetails, a3 as PackComponentItemInfo, H as PhaseEnum, R as RegisteredService, a2 as RepeatableGroup, r as SELECTION_CODE_DEFAULT_VALUE, t as SpreadsheetTemplateCompany, J as TradingPartnerStage, a7 as TradingPartnerStageV2 } from './zod-C-emh7a3.cjs';
|
|
5
5
|
import { z } from 'zod';
|
|
6
6
|
import 'ky';
|
|
7
7
|
|
|
@@ -65,9 +65,10 @@ declare function createProductTypesApi(client: AsstClient): {
|
|
|
65
65
|
/**
|
|
66
66
|
* Initialize Trading Partner Access Api functions
|
|
67
67
|
* @param client Assortment Client instance
|
|
68
|
+
* @param companyType Company type for perspective
|
|
68
69
|
* @returns An object containing Trading Partner Access API functions
|
|
69
70
|
*/
|
|
70
|
-
declare function createTradingPartnerAccessApi(client: AsstClient): {
|
|
71
|
+
declare function createTradingPartnerAccessApi(client: AsstClient, companyType?: CompanyType): {
|
|
71
72
|
getAllTradingPartners: (params?: {
|
|
72
73
|
orgId?: string;
|
|
73
74
|
}, signal?: AbortSignal) => Promise<TradingPartnerAccessByCompanyId>;
|
|
@@ -90,33 +91,32 @@ declare function createTradingPartnerSettingsApi(client: AsstClient, companyType
|
|
|
90
91
|
|
|
91
92
|
/**
|
|
92
93
|
* Request payload for creating a new catalog
|
|
94
|
+
* Matches the backend POST /categories endpoint
|
|
93
95
|
*/
|
|
94
96
|
declare const catalogCreateRequestSchema: z.ZodObject<{
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
categoryDescription: z.ZodOptional<z.ZodString>;
|
|
97
|
+
type: z.ZodString;
|
|
98
|
+
name: z.ZodString;
|
|
99
|
+
companyId: z.ZodNumber;
|
|
99
100
|
}, "strip", z.ZodTypeAny, {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
categoryDescription?: string | undefined;
|
|
101
|
+
type: string;
|
|
102
|
+
name: string;
|
|
103
|
+
companyId: number;
|
|
104
104
|
}, {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
categoryDescription?: string | undefined;
|
|
105
|
+
type: string;
|
|
106
|
+
name: string;
|
|
107
|
+
companyId: number;
|
|
109
108
|
}>;
|
|
110
109
|
type CatalogCreateRequest = z.infer<typeof catalogCreateRequestSchema>;
|
|
111
110
|
/**
|
|
112
111
|
* Response from creating a new catalog
|
|
112
|
+
* Returns the created category ID (lowercase 'categoryid')
|
|
113
113
|
*/
|
|
114
114
|
declare const catalogCreateResponseSchema: z.ZodObject<{
|
|
115
|
-
|
|
115
|
+
categoryid: z.ZodNumber;
|
|
116
116
|
}, "strip", z.ZodTypeAny, {
|
|
117
|
-
|
|
117
|
+
categoryid: number;
|
|
118
118
|
}, {
|
|
119
|
-
|
|
119
|
+
categoryid: number;
|
|
120
120
|
}>;
|
|
121
121
|
type CatalogCreateResponse = z.infer<typeof catalogCreateResponseSchema>;
|
|
122
122
|
/**
|
|
@@ -153,23 +153,23 @@ declare const catalogBriefResponseSchema: z.ZodObject<{
|
|
|
153
153
|
}, "strip", z.ZodTypeAny, {
|
|
154
154
|
createdBy: string;
|
|
155
155
|
modifiedBy: string;
|
|
156
|
+
categoryId: number;
|
|
156
157
|
categoryName: string;
|
|
157
|
-
categoryTypeId: number;
|
|
158
158
|
categoryDescription: string;
|
|
159
|
-
categoryId: number;
|
|
160
159
|
categoryDescriptionExt: string;
|
|
161
160
|
ownerCompanyId: string;
|
|
161
|
+
categoryTypeId: number;
|
|
162
162
|
createdAt: string;
|
|
163
163
|
modifiedAt: string;
|
|
164
164
|
}, {
|
|
165
165
|
createdBy: string;
|
|
166
166
|
modifiedBy: string;
|
|
167
|
+
categoryId: number;
|
|
167
168
|
categoryName: string;
|
|
168
|
-
categoryTypeId: number;
|
|
169
169
|
categoryDescription: string;
|
|
170
|
-
categoryId: number;
|
|
171
170
|
categoryDescriptionExt: string;
|
|
172
171
|
ownerCompanyId: string;
|
|
172
|
+
categoryTypeId: number;
|
|
173
173
|
createdAt: string;
|
|
174
174
|
modifiedAt: string;
|
|
175
175
|
}>;
|
|
@@ -237,6 +237,13 @@ declare function createWhoAmIApi(client: AsstClient): {
|
|
|
237
237
|
declare const applicationTypeSchema: z.ZodEnum<["ASSORTMENT", "ITEM-XREF", "TEST-ORDER-GENERATOR"]>;
|
|
238
238
|
type ApplicationType = z.infer<typeof applicationTypeSchema>;
|
|
239
239
|
|
|
240
|
+
/**
|
|
241
|
+
* Note: These represent the small set of flags that are enabled via the UI. These
|
|
242
|
+
* match the backend enum values in the CompanyFeatures service. If this list
|
|
243
|
+
* grows significantly, we should consider moving these to their own constants file or
|
|
244
|
+
* generating them from the backend.
|
|
245
|
+
*/
|
|
246
|
+
type FeatureType = "RETAILERAPI" | "DELTASUPDATEEXPORT" | "ASSORTMENTUIDASHBOARD" | "PHASEDITEMSETUP" | "PUBLICIMAGEACCESS" | "SINGLEHIERARCHYBYITEM" | "DELTAPRICEEXPORT";
|
|
240
247
|
/**
|
|
241
248
|
* Initialize Company Features Api functions
|
|
242
249
|
* @param client Assortment Client instance
|
|
@@ -245,6 +252,7 @@ type ApplicationType = z.infer<typeof applicationTypeSchema>;
|
|
|
245
252
|
*/
|
|
246
253
|
declare function createCompanyFeaturesApi(client: AsstClient, companyType?: CompanyType): {
|
|
247
254
|
checkIfStageItemSetupIsEnabled: (signal?: AbortSignal) => Promise<boolean>;
|
|
255
|
+
enableFeatureForCompany: (featureKey: FeatureType, companyId: number) => Promise<void>;
|
|
248
256
|
};
|
|
249
257
|
|
|
250
258
|
interface FlagOptions {
|
|
@@ -459,7 +467,6 @@ type ItemsApi = {
|
|
|
459
467
|
deleteItems: (itemIds: string[]) => Promise<void>;
|
|
460
468
|
getItemInfoId: (spsItemId: string, signal?: AbortSignal) => Promise<number>;
|
|
461
469
|
getSpsItemId: (itemInfoId: string, signal?: AbortSignal) => Promise<SpsItemIdResponse>;
|
|
462
|
-
getItemStatus: (itemIds: string[]) => Promise<ItemStatusResponse>;
|
|
463
470
|
};
|
|
464
471
|
/**
|
|
465
472
|
* Initialize Items Api functions
|
|
@@ -768,8 +775,8 @@ type Stage = z.infer<typeof stageSchema>;
|
|
|
768
775
|
* @param companyType Company type for perspective
|
|
769
776
|
* @returns An object containing Items API functions
|
|
770
777
|
*/
|
|
771
|
-
declare function createItemsApiV2(client: AsstClient
|
|
772
|
-
getItemStatus: (itemIds: string[]) => Promise<ItemStatusV2Response>;
|
|
778
|
+
declare function createItemsApiV2(client: AsstClient): {
|
|
779
|
+
getItemStatus: (companyType: CompanyType, itemIds: string[]) => Promise<ItemStatusV2Response>;
|
|
773
780
|
};
|
|
774
781
|
|
|
775
782
|
/**
|
|
@@ -830,6 +837,9 @@ declare function createUniqueCriteriaApi(client: AsstClient): {
|
|
|
830
837
|
getProductUniqueCriteriaByOrg: (params?: {
|
|
831
838
|
orgId?: string;
|
|
832
839
|
}, signal?: AbortSignal) => Promise<FlattenedItemIdentifiers[]>;
|
|
840
|
+
updateMultipleUniqueCriteriaAttributes: (uniqueAttributes: {
|
|
841
|
+
uniqueAttribute: string;
|
|
842
|
+
}[], companyId: number) => Promise<void>;
|
|
833
843
|
};
|
|
834
844
|
|
|
835
845
|
/**
|
|
@@ -843,4 +853,4 @@ declare function createCompaniesApi(client: AsstClient): {
|
|
|
843
853
|
}, signal?: AbortSignal) => Promise<CompanyBriefByOrg>;
|
|
844
854
|
};
|
|
845
855
|
|
|
846
|
-
export { type ApplicationType, AsstClient, AttrProdType, type CategoriesApi, CompanyBriefByOrg, CompanyRelationshipUpsertBody, DownLoadItemsParams, Export, 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, createSpreadsheetTemplateApi, createTradingPartnerAccessApi, createTradingPartnerSettingsApi, createUniqueCriteriaApi, createWhoAmIApi };
|
|
856
|
+
export { type ApplicationType, AsstClient, AttrProdType, type CatalogBriefResponse, type CatalogCreateRequest, type CatalogCreateResponse, type CatalogSearchParams, type CategoriesApi, CompanyBriefByOrg, CompanyRelationshipUpsertBody, 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, createSpreadsheetTemplateApi, createTradingPartnerAccessApi, createTradingPartnerSettingsApi, createUniqueCriteriaApi, createWhoAmIApi };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { A as AsstClient, I as ItemHierarchyResponse, S as SpsItemIdResponse } from './SpsItemIdResponse-
|
|
2
|
-
export { a as AsstClientOptions, b as AsstUrl, B as BASE_URLS, E as Env, e as envSchema } from './SpsItemIdResponse-
|
|
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
|
|
4
|
-
export {
|
|
1
|
+
import { A as AsstClient, I as ItemHierarchyResponse, S as SpsItemIdResponse, C as CompanyBriefByOrg } from './SpsItemIdResponse-gAHfCzwP.js';
|
|
2
|
+
export { a as AsstClientOptions, b as AsstUrl, B as BASE_URLS, E as Env, e as envSchema } from './SpsItemIdResponse-gAHfCzwP.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, 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-D3Xe9bw3.js';
|
|
4
|
+
export { K as AttributeDetail, a0 as Bulb, M as CategoryEnum, N as ComponentDetails, q as Connection, n as ExportDayOfWeek, o as ExportFrequency, p as ExportType, O as GroupedAttributeList, Q as GroupedAttributes, W as GroupedItem, X as HierarchyCategory, Y as HierarchyDetails, v as IdentityServiceDatetimePreferences, w as IdentityServiceOrganization, u as IdentityServiceOrganizationMetadata, x as IdentityServicePreferences, y as IdentityServiceUser, j as ImportDetails, k as ImportError, l as ImportErrors, m as ImportStatusEnum, s as ItemCategory, a4 as ItemErrorDetails, a6 as ItemErrorDetailsV2, a5 as ItemErrorSummaryV2, z as ItemHeader, B as ItemMap, Z as ItemPrice, F as ItemTable, $ as MediaItem, P as PRODUCT_CODE_DEFAULT_VALUE, a1 as PackComponent, _ as PackComponentDetails, a3 as PackComponentItemInfo, H as PhaseEnum, R as RegisteredService, a2 as RepeatableGroup, r as SELECTION_CODE_DEFAULT_VALUE, t as SpreadsheetTemplateCompany, J as TradingPartnerStage, a7 as TradingPartnerStageV2 } from './zod-D3Xe9bw3.js';
|
|
5
5
|
import { z } from 'zod';
|
|
6
6
|
import 'ky';
|
|
7
7
|
|
|
@@ -65,9 +65,10 @@ declare function createProductTypesApi(client: AsstClient): {
|
|
|
65
65
|
/**
|
|
66
66
|
* Initialize Trading Partner Access Api functions
|
|
67
67
|
* @param client Assortment Client instance
|
|
68
|
+
* @param companyType Company type for perspective
|
|
68
69
|
* @returns An object containing Trading Partner Access API functions
|
|
69
70
|
*/
|
|
70
|
-
declare function createTradingPartnerAccessApi(client: AsstClient): {
|
|
71
|
+
declare function createTradingPartnerAccessApi(client: AsstClient, companyType?: CompanyType): {
|
|
71
72
|
getAllTradingPartners: (params?: {
|
|
72
73
|
orgId?: string;
|
|
73
74
|
}, signal?: AbortSignal) => Promise<TradingPartnerAccessByCompanyId>;
|
|
@@ -90,33 +91,32 @@ declare function createTradingPartnerSettingsApi(client: AsstClient, companyType
|
|
|
90
91
|
|
|
91
92
|
/**
|
|
92
93
|
* Request payload for creating a new catalog
|
|
94
|
+
* Matches the backend POST /categories endpoint
|
|
93
95
|
*/
|
|
94
96
|
declare const catalogCreateRequestSchema: z.ZodObject<{
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
categoryDescription: z.ZodOptional<z.ZodString>;
|
|
97
|
+
type: z.ZodString;
|
|
98
|
+
name: z.ZodString;
|
|
99
|
+
companyId: z.ZodNumber;
|
|
99
100
|
}, "strip", z.ZodTypeAny, {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
categoryDescription?: string | undefined;
|
|
101
|
+
type: string;
|
|
102
|
+
name: string;
|
|
103
|
+
companyId: number;
|
|
104
104
|
}, {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
categoryDescription?: string | undefined;
|
|
105
|
+
type: string;
|
|
106
|
+
name: string;
|
|
107
|
+
companyId: number;
|
|
109
108
|
}>;
|
|
110
109
|
type CatalogCreateRequest = z.infer<typeof catalogCreateRequestSchema>;
|
|
111
110
|
/**
|
|
112
111
|
* Response from creating a new catalog
|
|
112
|
+
* Returns the created category ID (lowercase 'categoryid')
|
|
113
113
|
*/
|
|
114
114
|
declare const catalogCreateResponseSchema: z.ZodObject<{
|
|
115
|
-
|
|
115
|
+
categoryid: z.ZodNumber;
|
|
116
116
|
}, "strip", z.ZodTypeAny, {
|
|
117
|
-
|
|
117
|
+
categoryid: number;
|
|
118
118
|
}, {
|
|
119
|
-
|
|
119
|
+
categoryid: number;
|
|
120
120
|
}>;
|
|
121
121
|
type CatalogCreateResponse = z.infer<typeof catalogCreateResponseSchema>;
|
|
122
122
|
/**
|
|
@@ -153,23 +153,23 @@ declare const catalogBriefResponseSchema: z.ZodObject<{
|
|
|
153
153
|
}, "strip", z.ZodTypeAny, {
|
|
154
154
|
createdBy: string;
|
|
155
155
|
modifiedBy: string;
|
|
156
|
+
categoryId: number;
|
|
156
157
|
categoryName: string;
|
|
157
|
-
categoryTypeId: number;
|
|
158
158
|
categoryDescription: string;
|
|
159
|
-
categoryId: number;
|
|
160
159
|
categoryDescriptionExt: string;
|
|
161
160
|
ownerCompanyId: string;
|
|
161
|
+
categoryTypeId: number;
|
|
162
162
|
createdAt: string;
|
|
163
163
|
modifiedAt: string;
|
|
164
164
|
}, {
|
|
165
165
|
createdBy: string;
|
|
166
166
|
modifiedBy: string;
|
|
167
|
+
categoryId: number;
|
|
167
168
|
categoryName: string;
|
|
168
|
-
categoryTypeId: number;
|
|
169
169
|
categoryDescription: string;
|
|
170
|
-
categoryId: number;
|
|
171
170
|
categoryDescriptionExt: string;
|
|
172
171
|
ownerCompanyId: string;
|
|
172
|
+
categoryTypeId: number;
|
|
173
173
|
createdAt: string;
|
|
174
174
|
modifiedAt: string;
|
|
175
175
|
}>;
|
|
@@ -237,6 +237,13 @@ declare function createWhoAmIApi(client: AsstClient): {
|
|
|
237
237
|
declare const applicationTypeSchema: z.ZodEnum<["ASSORTMENT", "ITEM-XREF", "TEST-ORDER-GENERATOR"]>;
|
|
238
238
|
type ApplicationType = z.infer<typeof applicationTypeSchema>;
|
|
239
239
|
|
|
240
|
+
/**
|
|
241
|
+
* Note: These represent the small set of flags that are enabled via the UI. These
|
|
242
|
+
* match the backend enum values in the CompanyFeatures service. If this list
|
|
243
|
+
* grows significantly, we should consider moving these to their own constants file or
|
|
244
|
+
* generating them from the backend.
|
|
245
|
+
*/
|
|
246
|
+
type FeatureType = "RETAILERAPI" | "DELTASUPDATEEXPORT" | "ASSORTMENTUIDASHBOARD" | "PHASEDITEMSETUP" | "PUBLICIMAGEACCESS" | "SINGLEHIERARCHYBYITEM" | "DELTAPRICEEXPORT";
|
|
240
247
|
/**
|
|
241
248
|
* Initialize Company Features Api functions
|
|
242
249
|
* @param client Assortment Client instance
|
|
@@ -245,6 +252,7 @@ type ApplicationType = z.infer<typeof applicationTypeSchema>;
|
|
|
245
252
|
*/
|
|
246
253
|
declare function createCompanyFeaturesApi(client: AsstClient, companyType?: CompanyType): {
|
|
247
254
|
checkIfStageItemSetupIsEnabled: (signal?: AbortSignal) => Promise<boolean>;
|
|
255
|
+
enableFeatureForCompany: (featureKey: FeatureType, companyId: number) => Promise<void>;
|
|
248
256
|
};
|
|
249
257
|
|
|
250
258
|
interface FlagOptions {
|
|
@@ -459,7 +467,6 @@ type ItemsApi = {
|
|
|
459
467
|
deleteItems: (itemIds: string[]) => Promise<void>;
|
|
460
468
|
getItemInfoId: (spsItemId: string, signal?: AbortSignal) => Promise<number>;
|
|
461
469
|
getSpsItemId: (itemInfoId: string, signal?: AbortSignal) => Promise<SpsItemIdResponse>;
|
|
462
|
-
getItemStatus: (itemIds: string[]) => Promise<ItemStatusResponse>;
|
|
463
470
|
};
|
|
464
471
|
/**
|
|
465
472
|
* Initialize Items Api functions
|
|
@@ -768,8 +775,8 @@ type Stage = z.infer<typeof stageSchema>;
|
|
|
768
775
|
* @param companyType Company type for perspective
|
|
769
776
|
* @returns An object containing Items API functions
|
|
770
777
|
*/
|
|
771
|
-
declare function createItemsApiV2(client: AsstClient
|
|
772
|
-
getItemStatus: (itemIds: string[]) => Promise<ItemStatusV2Response>;
|
|
778
|
+
declare function createItemsApiV2(client: AsstClient): {
|
|
779
|
+
getItemStatus: (companyType: CompanyType, itemIds: string[]) => Promise<ItemStatusV2Response>;
|
|
773
780
|
};
|
|
774
781
|
|
|
775
782
|
/**
|
|
@@ -830,6 +837,9 @@ declare function createUniqueCriteriaApi(client: AsstClient): {
|
|
|
830
837
|
getProductUniqueCriteriaByOrg: (params?: {
|
|
831
838
|
orgId?: string;
|
|
832
839
|
}, signal?: AbortSignal) => Promise<FlattenedItemIdentifiers[]>;
|
|
840
|
+
updateMultipleUniqueCriteriaAttributes: (uniqueAttributes: {
|
|
841
|
+
uniqueAttribute: string;
|
|
842
|
+
}[], companyId: number) => Promise<void>;
|
|
833
843
|
};
|
|
834
844
|
|
|
835
845
|
/**
|
|
@@ -843,4 +853,4 @@ declare function createCompaniesApi(client: AsstClient): {
|
|
|
843
853
|
}, signal?: AbortSignal) => Promise<CompanyBriefByOrg>;
|
|
844
854
|
};
|
|
845
855
|
|
|
846
|
-
export { type ApplicationType, AsstClient, AttrProdType, type CategoriesApi, CompanyBriefByOrg, CompanyRelationshipUpsertBody, DownLoadItemsParams, Export, 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, createSpreadsheetTemplateApi, createTradingPartnerAccessApi, createTradingPartnerSettingsApi, createUniqueCriteriaApi, createWhoAmIApi };
|
|
856
|
+
export { type ApplicationType, AsstClient, AttrProdType, type CatalogBriefResponse, type CatalogCreateRequest, type CatalogCreateResponse, type CatalogSearchParams, type CategoriesApi, CompanyBriefByOrg, CompanyRelationshipUpsertBody, 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, createSpreadsheetTemplateApi, createTradingPartnerAccessApi, createTradingPartnerSettingsApi, createUniqueCriteriaApi, createWhoAmIApi };
|
package/dist/index.js
CHANGED
|
@@ -16,16 +16,16 @@ import {
|
|
|
16
16
|
createTradingPartnerSettingsApi,
|
|
17
17
|
createUniqueCriteriaApi,
|
|
18
18
|
createWhoAmIApi
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-U7UJOT4D.js";
|
|
20
20
|
import {
|
|
21
21
|
AsstClient,
|
|
22
22
|
BASE_URLS,
|
|
23
23
|
envSchema
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-WX4LGXJV.js";
|
|
25
25
|
import {
|
|
26
26
|
PRODUCT_CODE_DEFAULT_VALUE,
|
|
27
27
|
SELECTION_CODE_DEFAULT_VALUE
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-BMTYM2N6.js";
|
|
29
29
|
export {
|
|
30
30
|
AsstClient,
|
|
31
31
|
BASE_URLS,
|
package/dist/msw.cjs
CHANGED
|
@@ -4271,13 +4271,12 @@ var itemHierarchyResponseSchema = external_exports.object({
|
|
|
4271
4271
|
|
|
4272
4272
|
// lib/categories/models/CatalogManagement.ts
|
|
4273
4273
|
var catalogCreateRequestSchema = external_exports.object({
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
categoryDescription: external_exports.string().optional()
|
|
4274
|
+
type: external_exports.string(),
|
|
4275
|
+
name: external_exports.string(),
|
|
4276
|
+
companyId: external_exports.number()
|
|
4278
4277
|
});
|
|
4279
4278
|
var catalogCreateResponseSchema = external_exports.object({
|
|
4280
|
-
|
|
4279
|
+
categoryid: external_exports.number()
|
|
4281
4280
|
});
|
|
4282
4281
|
var catalogSearchParamsSchema = external_exports.object({
|
|
4283
4282
|
ownerCompanyIds: external_exports.array(external_exports.number()).optional(),
|
|
@@ -5477,9 +5476,22 @@ function createUniqueCriteriaApiHandlers(client) {
|
|
|
5477
5476
|
return import_msw15.http.get(`${client.getBaseUrl()}${BASE_URL15}/product/org`, resolver);
|
|
5478
5477
|
}
|
|
5479
5478
|
getProductUniqueCriteriaByOrg.generateData = () => (0, import_zod_mock14.generateMock)(external_exports.array(FlattenedItemIdentifierKeysSchema));
|
|
5479
|
+
function updateMultipleUniqueCriteriaAttributes(resolver = (_info) => {
|
|
5480
|
+
return import_msw15.HttpResponse.json({ success: true });
|
|
5481
|
+
}) {
|
|
5482
|
+
return import_msw15.http.put(
|
|
5483
|
+
`${client.getBaseUrl()}${BASE_URL15}/multiple/:companyId`,
|
|
5484
|
+
resolver
|
|
5485
|
+
);
|
|
5486
|
+
}
|
|
5487
|
+
updateMultipleUniqueCriteriaAttributes.generateData = () => ({
|
|
5488
|
+
success: true
|
|
5489
|
+
});
|
|
5480
5490
|
return {
|
|
5491
|
+
getUniqueCriteriaOptions,
|
|
5481
5492
|
getUniqueCriteriaByOrg,
|
|
5482
|
-
getProductUniqueCriteriaByOrg
|
|
5493
|
+
getProductUniqueCriteriaByOrg,
|
|
5494
|
+
updateMultipleUniqueCriteriaAttributes
|
|
5483
5495
|
};
|
|
5484
5496
|
}
|
|
5485
5497
|
|
|
@@ -5487,23 +5499,20 @@ function createUniqueCriteriaApiHandlers(client) {
|
|
|
5487
5499
|
var import_zod_mock15 = require("@anatine/zod-mock");
|
|
5488
5500
|
var import_msw16 = require("msw");
|
|
5489
5501
|
|
|
5502
|
+
// lib/companies/models/CompanyType.ts
|
|
5503
|
+
var companyTypeSchema = external_exports.enum(["SUPPLIER", "RETAILER"]);
|
|
5504
|
+
|
|
5490
5505
|
// lib/companies/models/CompanyBriefByOrg.ts
|
|
5491
5506
|
var companyBriefByOrgSchema = external_exports.object({
|
|
5492
5507
|
companyId: external_exports.number(),
|
|
5493
5508
|
name: external_exports.string(),
|
|
5494
5509
|
orgId: external_exports.string(),
|
|
5495
|
-
|
|
5496
|
-
type: external_exports.enum(["SUPPLIER", "RETAILER"]),
|
|
5497
|
-
display: external_exports.enum(["SUPPLIER", "RETAILER"])
|
|
5498
|
-
}),
|
|
5510
|
+
companyTypes: external_exports.array(companyTypeSchema),
|
|
5499
5511
|
dc4Id: external_exports.number()
|
|
5500
5512
|
});
|
|
5501
5513
|
|
|
5502
|
-
// lib/companies/models/CompanyType.ts
|
|
5503
|
-
var companyTypeSchema = external_exports.enum(["SUPPLIER", "RETAILER"]);
|
|
5504
|
-
|
|
5505
5514
|
// lib/companies/index.ts
|
|
5506
|
-
var BASE_URL16 = "companys";
|
|
5515
|
+
var BASE_URL16 = "v3/companys";
|
|
5507
5516
|
|
|
5508
5517
|
// lib/companies/mockHandlers.ts
|
|
5509
5518
|
function createCompaniesApiHandlers(client) {
|
package/dist/msw.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as msw from 'msw';
|
|
2
2
|
import { ResponseResolver, HttpResponseResolver, HttpHandler } from 'msw';
|
|
3
|
-
import { A as AsstClient, I as ItemHierarchyResponse, S as SpsItemIdResponse } from './SpsItemIdResponse-
|
|
3
|
+
import { A as AsstClient, I as ItemHierarchyResponse, S as SpsItemIdResponse, C as CompanyBriefByOrg } from './SpsItemIdResponse-gAHfCzwP.cjs';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
import 'ky';
|
|
6
6
|
|
|
@@ -99,18 +99,18 @@ declare function createCategoriesApiHandlers(client: AsstClient): {
|
|
|
99
99
|
createCatalog: {
|
|
100
100
|
(resolver?: ResponseResolver): msw.HttpHandler;
|
|
101
101
|
generateData(): {
|
|
102
|
-
|
|
102
|
+
categoryid: number;
|
|
103
103
|
};
|
|
104
104
|
};
|
|
105
105
|
searchCatalogsByCompany: {
|
|
106
106
|
(resolver?: ResponseResolver): msw.HttpHandler;
|
|
107
107
|
generateData(): {
|
|
108
|
+
categoryId: number;
|
|
108
109
|
categoryName: string;
|
|
109
|
-
categoryTypeId: number;
|
|
110
110
|
categoryDescription: string;
|
|
111
|
-
categoryId: number;
|
|
112
111
|
categoryDescriptionExt: string;
|
|
113
112
|
ownerCompanyId: string;
|
|
113
|
+
categoryTypeId: number;
|
|
114
114
|
createdAt: string;
|
|
115
115
|
modifiedAt: string;
|
|
116
116
|
createdBy: string;
|
|
@@ -652,6 +652,13 @@ declare function createFeatureFlagsApiHandlers(client: AsstClient): {
|
|
|
652
652
|
* @returns An object containing functions to generate MSW request handlers
|
|
653
653
|
*/
|
|
654
654
|
declare function createUniqueCriteriaApiHandlers(client: AsstClient): {
|
|
655
|
+
getUniqueCriteriaOptions: {
|
|
656
|
+
(resolver?: ResponseResolver): msw.HttpHandler;
|
|
657
|
+
generateData(): {
|
|
658
|
+
value: string;
|
|
659
|
+
name: string;
|
|
660
|
+
}[];
|
|
661
|
+
};
|
|
655
662
|
getUniqueCriteriaByOrg: {
|
|
656
663
|
(resolver?: ResponseResolver): msw.HttpHandler;
|
|
657
664
|
generateData(): string[];
|
|
@@ -660,6 +667,12 @@ declare function createUniqueCriteriaApiHandlers(client: AsstClient): {
|
|
|
660
667
|
(resolver?: ResponseResolver): msw.HttpHandler;
|
|
661
668
|
generateData(): ("gtin" | "upc" | "ean" | "isbn" | "partnumber" | "eaneight" | "upcCaseCode" | "buyerPartNumber" | "sku" | "nationalDrugCode" | "drugIdentificationNumber" | "nationalHealthRelatedItemCode" | "manufacturersPartNumber" | "internationalStandardSerialNumber" | "nabcaNumber" | "erpId" | "componentId")[];
|
|
662
669
|
};
|
|
670
|
+
updateMultipleUniqueCriteriaAttributes: {
|
|
671
|
+
(resolver?: ResponseResolver): msw.HttpHandler;
|
|
672
|
+
generateData(): {
|
|
673
|
+
success: boolean;
|
|
674
|
+
};
|
|
675
|
+
};
|
|
663
676
|
};
|
|
664
677
|
|
|
665
678
|
/**
|
|
@@ -669,15 +682,12 @@ declare function createUniqueCriteriaApiHandlers(client: AsstClient): {
|
|
|
669
682
|
*/
|
|
670
683
|
declare function createCompaniesApiHandlers(client: AsstClient): {
|
|
671
684
|
getCompanyBriefInfoByOrg: {
|
|
672
|
-
(resolver?:
|
|
685
|
+
(resolver?: HttpResponseResolver<never, never, CompanyBriefByOrg>): msw.HttpHandler;
|
|
673
686
|
generateData(): {
|
|
674
687
|
name: string;
|
|
675
688
|
companyId: number;
|
|
676
689
|
orgId: string;
|
|
677
|
-
|
|
678
|
-
type: "SUPPLIER" | "RETAILER";
|
|
679
|
-
display: "SUPPLIER" | "RETAILER";
|
|
680
|
-
};
|
|
690
|
+
companyTypes: ("SUPPLIER" | "RETAILER")[];
|
|
681
691
|
dc4Id: number;
|
|
682
692
|
};
|
|
683
693
|
};
|
package/dist/msw.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as msw from 'msw';
|
|
2
2
|
import { ResponseResolver, HttpResponseResolver, HttpHandler } from 'msw';
|
|
3
|
-
import { A as AsstClient, I as ItemHierarchyResponse, S as SpsItemIdResponse } from './SpsItemIdResponse-
|
|
3
|
+
import { A as AsstClient, I as ItemHierarchyResponse, S as SpsItemIdResponse, C as CompanyBriefByOrg } from './SpsItemIdResponse-gAHfCzwP.js';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
import 'ky';
|
|
6
6
|
|
|
@@ -99,18 +99,18 @@ declare function createCategoriesApiHandlers(client: AsstClient): {
|
|
|
99
99
|
createCatalog: {
|
|
100
100
|
(resolver?: ResponseResolver): msw.HttpHandler;
|
|
101
101
|
generateData(): {
|
|
102
|
-
|
|
102
|
+
categoryid: number;
|
|
103
103
|
};
|
|
104
104
|
};
|
|
105
105
|
searchCatalogsByCompany: {
|
|
106
106
|
(resolver?: ResponseResolver): msw.HttpHandler;
|
|
107
107
|
generateData(): {
|
|
108
|
+
categoryId: number;
|
|
108
109
|
categoryName: string;
|
|
109
|
-
categoryTypeId: number;
|
|
110
110
|
categoryDescription: string;
|
|
111
|
-
categoryId: number;
|
|
112
111
|
categoryDescriptionExt: string;
|
|
113
112
|
ownerCompanyId: string;
|
|
113
|
+
categoryTypeId: number;
|
|
114
114
|
createdAt: string;
|
|
115
115
|
modifiedAt: string;
|
|
116
116
|
createdBy: string;
|
|
@@ -652,6 +652,13 @@ declare function createFeatureFlagsApiHandlers(client: AsstClient): {
|
|
|
652
652
|
* @returns An object containing functions to generate MSW request handlers
|
|
653
653
|
*/
|
|
654
654
|
declare function createUniqueCriteriaApiHandlers(client: AsstClient): {
|
|
655
|
+
getUniqueCriteriaOptions: {
|
|
656
|
+
(resolver?: ResponseResolver): msw.HttpHandler;
|
|
657
|
+
generateData(): {
|
|
658
|
+
value: string;
|
|
659
|
+
name: string;
|
|
660
|
+
}[];
|
|
661
|
+
};
|
|
655
662
|
getUniqueCriteriaByOrg: {
|
|
656
663
|
(resolver?: ResponseResolver): msw.HttpHandler;
|
|
657
664
|
generateData(): string[];
|
|
@@ -660,6 +667,12 @@ declare function createUniqueCriteriaApiHandlers(client: AsstClient): {
|
|
|
660
667
|
(resolver?: ResponseResolver): msw.HttpHandler;
|
|
661
668
|
generateData(): ("gtin" | "upc" | "ean" | "isbn" | "partnumber" | "eaneight" | "upcCaseCode" | "buyerPartNumber" | "sku" | "nationalDrugCode" | "drugIdentificationNumber" | "nationalHealthRelatedItemCode" | "manufacturersPartNumber" | "internationalStandardSerialNumber" | "nabcaNumber" | "erpId" | "componentId")[];
|
|
662
669
|
};
|
|
670
|
+
updateMultipleUniqueCriteriaAttributes: {
|
|
671
|
+
(resolver?: ResponseResolver): msw.HttpHandler;
|
|
672
|
+
generateData(): {
|
|
673
|
+
success: boolean;
|
|
674
|
+
};
|
|
675
|
+
};
|
|
663
676
|
};
|
|
664
677
|
|
|
665
678
|
/**
|
|
@@ -669,15 +682,12 @@ declare function createUniqueCriteriaApiHandlers(client: AsstClient): {
|
|
|
669
682
|
*/
|
|
670
683
|
declare function createCompaniesApiHandlers(client: AsstClient): {
|
|
671
684
|
getCompanyBriefInfoByOrg: {
|
|
672
|
-
(resolver?:
|
|
685
|
+
(resolver?: HttpResponseResolver<never, never, CompanyBriefByOrg>): msw.HttpHandler;
|
|
673
686
|
generateData(): {
|
|
674
687
|
name: string;
|
|
675
688
|
companyId: number;
|
|
676
689
|
orgId: string;
|
|
677
|
-
|
|
678
|
-
type: "SUPPLIER" | "RETAILER";
|
|
679
|
-
display: "SUPPLIER" | "RETAILER";
|
|
680
|
-
};
|
|
690
|
+
companyTypes: ("SUPPLIER" | "RETAILER")[];
|
|
681
691
|
dc4Id: number;
|
|
682
692
|
};
|
|
683
693
|
};
|
package/dist/msw.js
CHANGED
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
BASE_URL_V2,
|
|
20
20
|
FlattenedItemIdentifierKeysSchema,
|
|
21
21
|
retailerTradingPartnerStages
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-U7UJOT4D.js";
|
|
23
23
|
import {
|
|
24
24
|
attrProdTypeSchema,
|
|
25
25
|
catalogBriefResponseSchema,
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
tradingPartnerAccessByCompanyIdSchema,
|
|
47
47
|
userAccountSchema,
|
|
48
48
|
vendorPartnerAttGroupsSchema
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-BMTYM2N6.js";
|
|
50
50
|
|
|
51
51
|
// lib/imports/mockHandlers.ts
|
|
52
52
|
import { generateMock } from "@anatine/zod-mock";
|
|
@@ -527,9 +527,22 @@ function createUniqueCriteriaApiHandlers(client) {
|
|
|
527
527
|
return http15.get(`${client.getBaseUrl()}${BASE_URL16}/product/org`, resolver);
|
|
528
528
|
}
|
|
529
529
|
getProductUniqueCriteriaByOrg.generateData = () => generateMock14(external_exports.array(FlattenedItemIdentifierKeysSchema));
|
|
530
|
+
function updateMultipleUniqueCriteriaAttributes(resolver = (_info) => {
|
|
531
|
+
return HttpResponse15.json({ success: true });
|
|
532
|
+
}) {
|
|
533
|
+
return http15.put(
|
|
534
|
+
`${client.getBaseUrl()}${BASE_URL16}/multiple/:companyId`,
|
|
535
|
+
resolver
|
|
536
|
+
);
|
|
537
|
+
}
|
|
538
|
+
updateMultipleUniqueCriteriaAttributes.generateData = () => ({
|
|
539
|
+
success: true
|
|
540
|
+
});
|
|
530
541
|
return {
|
|
542
|
+
getUniqueCriteriaOptions,
|
|
531
543
|
getUniqueCriteriaByOrg,
|
|
532
|
-
getProductUniqueCriteriaByOrg
|
|
544
|
+
getProductUniqueCriteriaByOrg,
|
|
545
|
+
updateMultipleUniqueCriteriaAttributes
|
|
533
546
|
};
|
|
534
547
|
}
|
|
535
548
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './SpsItemIdResponse-
|
|
1
|
+
import './SpsItemIdResponse-gAHfCzwP.cjs';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
declare const importSchema: z.ZodObject<{
|
|
@@ -219,42 +219,6 @@ declare const generateImportTemplateParamsSchema: z.ZodObject<{
|
|
|
219
219
|
}>;
|
|
220
220
|
type GenerateImportTemplateParams = z.infer<typeof generateImportTemplateParamsSchema>;
|
|
221
221
|
|
|
222
|
-
declare const companyBriefByOrgSchema: z.ZodObject<{
|
|
223
|
-
companyId: z.ZodNumber;
|
|
224
|
-
name: z.ZodString;
|
|
225
|
-
orgId: z.ZodString;
|
|
226
|
-
companyType: z.ZodObject<{
|
|
227
|
-
type: z.ZodEnum<["SUPPLIER", "RETAILER"]>;
|
|
228
|
-
display: z.ZodEnum<["SUPPLIER", "RETAILER"]>;
|
|
229
|
-
}, "strip", z.ZodTypeAny, {
|
|
230
|
-
type: "SUPPLIER" | "RETAILER";
|
|
231
|
-
display: "SUPPLIER" | "RETAILER";
|
|
232
|
-
}, {
|
|
233
|
-
type: "SUPPLIER" | "RETAILER";
|
|
234
|
-
display: "SUPPLIER" | "RETAILER";
|
|
235
|
-
}>;
|
|
236
|
-
dc4Id: z.ZodNumber;
|
|
237
|
-
}, "strip", z.ZodTypeAny, {
|
|
238
|
-
name: string;
|
|
239
|
-
companyId: number;
|
|
240
|
-
orgId: string;
|
|
241
|
-
companyType: {
|
|
242
|
-
type: "SUPPLIER" | "RETAILER";
|
|
243
|
-
display: "SUPPLIER" | "RETAILER";
|
|
244
|
-
};
|
|
245
|
-
dc4Id: number;
|
|
246
|
-
}, {
|
|
247
|
-
name: string;
|
|
248
|
-
companyId: number;
|
|
249
|
-
orgId: string;
|
|
250
|
-
companyType: {
|
|
251
|
-
type: "SUPPLIER" | "RETAILER";
|
|
252
|
-
display: "SUPPLIER" | "RETAILER";
|
|
253
|
-
};
|
|
254
|
-
dc4Id: number;
|
|
255
|
-
}>;
|
|
256
|
-
type CompanyBriefByOrg = z.infer<typeof companyBriefByOrgSchema>;
|
|
257
|
-
|
|
258
222
|
declare const exportSchema: z.ZodObject<{
|
|
259
223
|
exportName: z.ZodString;
|
|
260
224
|
exportDescription: z.ZodString;
|
|
@@ -5900,4 +5864,4 @@ declare const itemErrorDetailsResultV2Schema: z.ZodObject<{
|
|
|
5900
5864
|
}>;
|
|
5901
5865
|
type ItemErrorDetailsResultV2 = z.infer<typeof itemErrorDetailsResultV2Schema>;
|
|
5902
5866
|
|
|
5903
|
-
export { type
|
|
5867
|
+
export { type MediaItem as $, type AttrProdType as A, type ItemMap as B, type CompanyRelationshipUpsertBody as C, type DownLoadItemsParams as D, type Export as E, type ItemTable as F, type GenerateImportTemplateParams as G, type PhaseEnum as H, type Import as I, type TradingPartnerStage as J, type AttributeDetail as K, type Locale as L, type CategoryEnum as M, type ComponentDetails as N, type GroupedAttributeList as O, PRODUCT_CODE_DEFAULT_VALUE as P, type GroupedAttributes as Q, type RegisteredService as R, type SpreadsheetTemplate as S, type TradingPartnerAccessByCompanyId as T, type UserAccount as U, type VendorPartnerAttGroups as V, type GroupedItem as W, type HierarchyCategory as X, type HierarchyDetails as Y, type ItemPrice as Z, type PackComponentDetails as _, type ImportsStatus as a, itemErrorDetailsSchema as a$, type Bulb as a0, type PackComponent as a1, type RepeatableGroup as a2, type PackComponentItemInfo as a3, type ItemErrorDetails as a4, type ItemErrorSummaryV2 as a5, type ItemErrorDetailsV2 as a6, type TradingPartnerStageV2 as a7, importDetailSchema as a8, importErrorSchema as a9, packComponentSchema as aA, itemDetailViewSchema as aB, attributeDetailSchema as aC, repeatableGroupSchema as aD, componentDetailsSchema as aE, hierarchyDetailsSchema as aF, groupedAttributesSchema as aG, hierarchyCategorySchema as aH, groupedAttributeListSchema as aI, packComponentDetailsSchema as aJ, packComponentItemInfoSchema as aK, localeSchema as aL, attrProdTypeSchema as aM, spreadsheetTemplateCompanySchema as aN, spreadsheetTemplateSchema as aO, connectionSchema as aP, tradingPartnerAccessByCompanyIdSchema as aQ, itemPartnerSchema as aR, companyRelationshipUpsertBodySchema as aS, identityServiceDatetimePreferencesSchema as aT, identityServiceOrganizationMetadataSchema as aU, identityServiceOrganizationSchema as aV, identityServicePreferencesSchema as aW, identityServiceUserSchema as aX, registeredServiceSchema as aY, userAccountSchema as aZ, itemErrorDetailsResultSchema as a_, importErrorsSchema as aa, importSchema as ab, importsStatusSchema as ac, importStatusEnumSchema as ad, generateImportTemplateParamsSchema as ae, vendorPartnerAttGroupsSchema as af, exportDayOfWeekEnum as ag, exportFrequencyEnum as ah, exportTypeEnum as ai, exportSchema as aj, downLoadItemsParamsSchema as ak, itemCategoriesSearchSchema as al, itemCategorySchema as am, categoryTypeSchema as an, itemHeaderSchema as ao, itemMapSchema as ap, itemSearchViewSchema as aq, itemTableSchema as ar, phaseEnumSchema as as, tradingPartnerStageSchema as at, bulbSchema as au, itemPriceSchema as av, mediaItemSchema as aw, itemDetailSchema as ax, groupedItemSchema as ay, categoryEnumSchema as az, type ItemPartner as b, itemErrorDetailsResultV2Schema as b0, itemErrorSummaryV2Schema as b1, itemErrorDetailsV2Schema as b2, tradingPartnerStageV2Schema as b3, itemErrorSummaryResultV2Schema as b4, type ItemCategoriesSearch as c, type ItemSearchView as d, type ItemDetailView as e, type ItemDetail as f, type ItemErrorDetailsResult as g, type ItemErrorSummaryResultV2 as h, type ItemErrorDetailsResultV2 as i, type ImportDetails as j, type ImportError as k, type ImportErrors as l, type ImportStatusEnum as m, type ExportDayOfWeek as n, type ExportFrequency as o, type ExportType as p, type Connection as q, SELECTION_CODE_DEFAULT_VALUE as r, type ItemCategory as s, type SpreadsheetTemplateCompany as t, type IdentityServiceOrganizationMetadata as u, type IdentityServiceDatetimePreferences as v, type IdentityServiceOrganization as w, type IdentityServicePreferences as x, type IdentityServiceUser as y, type ItemHeader as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './SpsItemIdResponse-
|
|
1
|
+
import './SpsItemIdResponse-gAHfCzwP.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
declare const importSchema: z.ZodObject<{
|
|
@@ -219,42 +219,6 @@ declare const generateImportTemplateParamsSchema: z.ZodObject<{
|
|
|
219
219
|
}>;
|
|
220
220
|
type GenerateImportTemplateParams = z.infer<typeof generateImportTemplateParamsSchema>;
|
|
221
221
|
|
|
222
|
-
declare const companyBriefByOrgSchema: z.ZodObject<{
|
|
223
|
-
companyId: z.ZodNumber;
|
|
224
|
-
name: z.ZodString;
|
|
225
|
-
orgId: z.ZodString;
|
|
226
|
-
companyType: z.ZodObject<{
|
|
227
|
-
type: z.ZodEnum<["SUPPLIER", "RETAILER"]>;
|
|
228
|
-
display: z.ZodEnum<["SUPPLIER", "RETAILER"]>;
|
|
229
|
-
}, "strip", z.ZodTypeAny, {
|
|
230
|
-
type: "SUPPLIER" | "RETAILER";
|
|
231
|
-
display: "SUPPLIER" | "RETAILER";
|
|
232
|
-
}, {
|
|
233
|
-
type: "SUPPLIER" | "RETAILER";
|
|
234
|
-
display: "SUPPLIER" | "RETAILER";
|
|
235
|
-
}>;
|
|
236
|
-
dc4Id: z.ZodNumber;
|
|
237
|
-
}, "strip", z.ZodTypeAny, {
|
|
238
|
-
name: string;
|
|
239
|
-
companyId: number;
|
|
240
|
-
orgId: string;
|
|
241
|
-
companyType: {
|
|
242
|
-
type: "SUPPLIER" | "RETAILER";
|
|
243
|
-
display: "SUPPLIER" | "RETAILER";
|
|
244
|
-
};
|
|
245
|
-
dc4Id: number;
|
|
246
|
-
}, {
|
|
247
|
-
name: string;
|
|
248
|
-
companyId: number;
|
|
249
|
-
orgId: string;
|
|
250
|
-
companyType: {
|
|
251
|
-
type: "SUPPLIER" | "RETAILER";
|
|
252
|
-
display: "SUPPLIER" | "RETAILER";
|
|
253
|
-
};
|
|
254
|
-
dc4Id: number;
|
|
255
|
-
}>;
|
|
256
|
-
type CompanyBriefByOrg = z.infer<typeof companyBriefByOrgSchema>;
|
|
257
|
-
|
|
258
222
|
declare const exportSchema: z.ZodObject<{
|
|
259
223
|
exportName: z.ZodString;
|
|
260
224
|
exportDescription: z.ZodString;
|
|
@@ -5900,4 +5864,4 @@ declare const itemErrorDetailsResultV2Schema: z.ZodObject<{
|
|
|
5900
5864
|
}>;
|
|
5901
5865
|
type ItemErrorDetailsResultV2 = z.infer<typeof itemErrorDetailsResultV2Schema>;
|
|
5902
5866
|
|
|
5903
|
-
export { type
|
|
5867
|
+
export { type MediaItem as $, type AttrProdType as A, type ItemMap as B, type CompanyRelationshipUpsertBody as C, type DownLoadItemsParams as D, type Export as E, type ItemTable as F, type GenerateImportTemplateParams as G, type PhaseEnum as H, type Import as I, type TradingPartnerStage as J, type AttributeDetail as K, type Locale as L, type CategoryEnum as M, type ComponentDetails as N, type GroupedAttributeList as O, PRODUCT_CODE_DEFAULT_VALUE as P, type GroupedAttributes as Q, type RegisteredService as R, type SpreadsheetTemplate as S, type TradingPartnerAccessByCompanyId as T, type UserAccount as U, type VendorPartnerAttGroups as V, type GroupedItem as W, type HierarchyCategory as X, type HierarchyDetails as Y, type ItemPrice as Z, type PackComponentDetails as _, type ImportsStatus as a, itemErrorDetailsSchema as a$, type Bulb as a0, type PackComponent as a1, type RepeatableGroup as a2, type PackComponentItemInfo as a3, type ItemErrorDetails as a4, type ItemErrorSummaryV2 as a5, type ItemErrorDetailsV2 as a6, type TradingPartnerStageV2 as a7, importDetailSchema as a8, importErrorSchema as a9, packComponentSchema as aA, itemDetailViewSchema as aB, attributeDetailSchema as aC, repeatableGroupSchema as aD, componentDetailsSchema as aE, hierarchyDetailsSchema as aF, groupedAttributesSchema as aG, hierarchyCategorySchema as aH, groupedAttributeListSchema as aI, packComponentDetailsSchema as aJ, packComponentItemInfoSchema as aK, localeSchema as aL, attrProdTypeSchema as aM, spreadsheetTemplateCompanySchema as aN, spreadsheetTemplateSchema as aO, connectionSchema as aP, tradingPartnerAccessByCompanyIdSchema as aQ, itemPartnerSchema as aR, companyRelationshipUpsertBodySchema as aS, identityServiceDatetimePreferencesSchema as aT, identityServiceOrganizationMetadataSchema as aU, identityServiceOrganizationSchema as aV, identityServicePreferencesSchema as aW, identityServiceUserSchema as aX, registeredServiceSchema as aY, userAccountSchema as aZ, itemErrorDetailsResultSchema as a_, importErrorsSchema as aa, importSchema as ab, importsStatusSchema as ac, importStatusEnumSchema as ad, generateImportTemplateParamsSchema as ae, vendorPartnerAttGroupsSchema as af, exportDayOfWeekEnum as ag, exportFrequencyEnum as ah, exportTypeEnum as ai, exportSchema as aj, downLoadItemsParamsSchema as ak, itemCategoriesSearchSchema as al, itemCategorySchema as am, categoryTypeSchema as an, itemHeaderSchema as ao, itemMapSchema as ap, itemSearchViewSchema as aq, itemTableSchema as ar, phaseEnumSchema as as, tradingPartnerStageSchema as at, bulbSchema as au, itemPriceSchema as av, mediaItemSchema as aw, itemDetailSchema as ax, groupedItemSchema as ay, categoryEnumSchema as az, type ItemPartner as b, itemErrorDetailsResultV2Schema as b0, itemErrorSummaryV2Schema as b1, itemErrorDetailsV2Schema as b2, tradingPartnerStageV2Schema as b3, itemErrorSummaryResultV2Schema as b4, type ItemCategoriesSearch as c, type ItemSearchView as d, type ItemDetailView as e, type ItemDetail as f, type ItemErrorDetailsResult as g, type ItemErrorSummaryResultV2 as h, type ItemErrorDetailsResultV2 as i, type ImportDetails as j, type ImportError as k, type ImportErrors as l, type ImportStatusEnum as m, type ExportDayOfWeek as n, type ExportFrequency as o, type ExportType as p, type Connection as q, SELECTION_CODE_DEFAULT_VALUE as r, type ItemCategory as s, type SpreadsheetTemplateCompany as t, type IdentityServiceOrganizationMetadata as u, type IdentityServiceDatetimePreferences as v, type IdentityServiceOrganization as w, type IdentityServicePreferences as x, type IdentityServiceUser as y, type ItemHeader as z };
|
package/dist/zod.cjs
CHANGED
|
@@ -4338,13 +4338,12 @@ var itemHierarchyResponseSchema = external_exports.object({
|
|
|
4338
4338
|
|
|
4339
4339
|
// lib/categories/models/CatalogManagement.ts
|
|
4340
4340
|
var catalogCreateRequestSchema = external_exports.object({
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
categoryDescription: external_exports.string().optional()
|
|
4341
|
+
type: external_exports.string(),
|
|
4342
|
+
name: external_exports.string(),
|
|
4343
|
+
companyId: external_exports.number()
|
|
4345
4344
|
});
|
|
4346
4345
|
var catalogCreateResponseSchema = external_exports.object({
|
|
4347
|
-
|
|
4346
|
+
categoryid: external_exports.number()
|
|
4348
4347
|
});
|
|
4349
4348
|
var catalogSearchParamsSchema = external_exports.object({
|
|
4350
4349
|
ownerCompanyIds: external_exports.array(external_exports.number()).optional(),
|
|
@@ -5004,20 +5003,17 @@ var itemErrorDetailsResultV2Schema = external_exports.object({
|
|
|
5004
5003
|
itemErrorDetails: external_exports.array(itemErrorDetailsV2Schema)
|
|
5005
5004
|
});
|
|
5006
5005
|
|
|
5006
|
+
// lib/companies/models/CompanyType.ts
|
|
5007
|
+
var companyTypeSchema = external_exports.enum(["SUPPLIER", "RETAILER"]);
|
|
5008
|
+
|
|
5007
5009
|
// lib/companies/models/CompanyBriefByOrg.ts
|
|
5008
5010
|
var companyBriefByOrgSchema = external_exports.object({
|
|
5009
5011
|
companyId: external_exports.number(),
|
|
5010
5012
|
name: external_exports.string(),
|
|
5011
5013
|
orgId: external_exports.string(),
|
|
5012
|
-
|
|
5013
|
-
type: external_exports.enum(["SUPPLIER", "RETAILER"]),
|
|
5014
|
-
display: external_exports.enum(["SUPPLIER", "RETAILER"])
|
|
5015
|
-
}),
|
|
5014
|
+
companyTypes: external_exports.array(companyTypeSchema),
|
|
5016
5015
|
dc4Id: external_exports.number()
|
|
5017
5016
|
});
|
|
5018
|
-
|
|
5019
|
-
// lib/companies/models/CompanyType.ts
|
|
5020
|
-
var companyTypeSchema = external_exports.enum(["SUPPLIER", "RETAILER"]);
|
|
5021
5017
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5022
5018
|
0 && (module.exports = {
|
|
5023
5019
|
attrProdTypeSchema,
|
package/dist/zod.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { e as envSchema, i as itemHierarchyResponseSchema, s as spsItemIdResponseSchema } from './SpsItemIdResponse-
|
|
2
|
-
export {
|
|
1
|
+
export { c as companyBriefByOrgSchema, e as envSchema, i as itemHierarchyResponseSchema, s as spsItemIdResponseSchema } from './SpsItemIdResponse-gAHfCzwP.cjs';
|
|
2
|
+
export { aM as attrProdTypeSchema, aC as attributeDetailSchema, au as bulbSchema, az as categoryEnumSchema, an as categoryTypeSchema, aS as companyRelationshipUpsertBodySchema, aE as componentDetailsSchema, aP as connectionSchema, ak as downLoadItemsParamsSchema, ag as exportDayOfWeekEnum, ah as exportFrequencyEnum, aj as exportSchema, ai as exportTypeEnum, ae as generateImportTemplateParamsSchema, aI as groupedAttributeListSchema, aG as groupedAttributesSchema, ay as groupedItemSchema, aH as hierarchyCategorySchema, aF as hierarchyDetailsSchema, aT as identityServiceDatetimePreferencesSchema, aU as identityServiceOrganizationMetadataSchema, aV as identityServiceOrganizationSchema, aW as identityServicePreferencesSchema, aX as identityServiceUserSchema, a8 as importDetailSchema, a9 as importErrorSchema, aa as importErrorsSchema, ab as importSchema, ad as importStatusEnumSchema, ac as importsStatusSchema, al as itemCategoriesSearchSchema, am as itemCategorySchema, ax as itemDetailSchema, aB as itemDetailViewSchema, a_ as itemErrorDetailsResultSchema, b0 as itemErrorDetailsResultV2Schema, a$ as itemErrorDetailsSchema, b2 as itemErrorDetailsV2Schema, b4 as itemErrorSummaryResultV2Schema, b1 as itemErrorSummaryV2Schema, ao as itemHeaderSchema, ap as itemMapSchema, aR as itemPartnerSchema, av as itemPriceSchema, aq as itemSearchViewSchema, ar as itemTableSchema, aL as localeSchema, aw as mediaItemSchema, aJ as packComponentDetailsSchema, aK as packComponentItemInfoSchema, aA as packComponentSchema, as as phaseEnumSchema, aY as registeredServiceSchema, aD as repeatableGroupSchema, aN as spreadsheetTemplateCompanySchema, aO as spreadsheetTemplateSchema, aQ as tradingPartnerAccessByCompanyIdSchema, at as tradingPartnerStageSchema, b3 as tradingPartnerStageV2Schema, aZ as userAccountSchema, af as vendorPartnerAttGroupsSchema } from './zod-C-emh7a3.cjs';
|
|
3
3
|
import 'ky';
|
|
4
4
|
import 'zod';
|
package/dist/zod.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { e as envSchema, i as itemHierarchyResponseSchema, s as spsItemIdResponseSchema } from './SpsItemIdResponse-
|
|
2
|
-
export {
|
|
1
|
+
export { c as companyBriefByOrgSchema, e as envSchema, i as itemHierarchyResponseSchema, s as spsItemIdResponseSchema } from './SpsItemIdResponse-gAHfCzwP.js';
|
|
2
|
+
export { aM as attrProdTypeSchema, aC as attributeDetailSchema, au as bulbSchema, az as categoryEnumSchema, an as categoryTypeSchema, aS as companyRelationshipUpsertBodySchema, aE as componentDetailsSchema, aP as connectionSchema, ak as downLoadItemsParamsSchema, ag as exportDayOfWeekEnum, ah as exportFrequencyEnum, aj as exportSchema, ai as exportTypeEnum, ae as generateImportTemplateParamsSchema, aI as groupedAttributeListSchema, aG as groupedAttributesSchema, ay as groupedItemSchema, aH as hierarchyCategorySchema, aF as hierarchyDetailsSchema, aT as identityServiceDatetimePreferencesSchema, aU as identityServiceOrganizationMetadataSchema, aV as identityServiceOrganizationSchema, aW as identityServicePreferencesSchema, aX as identityServiceUserSchema, a8 as importDetailSchema, a9 as importErrorSchema, aa as importErrorsSchema, ab as importSchema, ad as importStatusEnumSchema, ac as importsStatusSchema, al as itemCategoriesSearchSchema, am as itemCategorySchema, ax as itemDetailSchema, aB as itemDetailViewSchema, a_ as itemErrorDetailsResultSchema, b0 as itemErrorDetailsResultV2Schema, a$ as itemErrorDetailsSchema, b2 as itemErrorDetailsV2Schema, b4 as itemErrorSummaryResultV2Schema, b1 as itemErrorSummaryV2Schema, ao as itemHeaderSchema, ap as itemMapSchema, aR as itemPartnerSchema, av as itemPriceSchema, aq as itemSearchViewSchema, ar as itemTableSchema, aL as localeSchema, aw as mediaItemSchema, aJ as packComponentDetailsSchema, aK as packComponentItemInfoSchema, aA as packComponentSchema, as as phaseEnumSchema, aY as registeredServiceSchema, aD as repeatableGroupSchema, aN as spreadsheetTemplateCompanySchema, aO as spreadsheetTemplateSchema, aQ as tradingPartnerAccessByCompanyIdSchema, at as tradingPartnerStageSchema, b3 as tradingPartnerStageV2Schema, aZ as userAccountSchema, af as vendorPartnerAttGroupsSchema } from './zod-D3Xe9bw3.js';
|
|
3
3
|
import 'ky';
|
|
4
4
|
import 'zod';
|
package/dist/zod.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
envSchema
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WX4LGXJV.js";
|
|
4
4
|
import {
|
|
5
5
|
attrProdTypeSchema,
|
|
6
6
|
attributeDetailSchema,
|
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
tradingPartnerStageV2Schema,
|
|
63
63
|
userAccountSchema,
|
|
64
64
|
vendorPartnerAttGroupsSchema
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-BMTYM2N6.js";
|
|
66
66
|
|
|
67
67
|
// lib/exports/models/ExportType.ts
|
|
68
68
|
var exportTypeEnum = external_exports.enum(["ALL", "UPDATES", "DELTAS_UPDATE", "NO_BUYER_PART_NUMBER"]);
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Assortment Api is a collection of HTTP functions to use Assortment endpoints",
|
|
4
4
|
"author": "Assortment",
|
|
5
5
|
"repository": "https://github.com/SPSCommerce/assortment-main/tree/main/ui/packages/asst-api",
|
|
6
|
-
"version": "4.
|
|
6
|
+
"version": "4.6.0",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist"
|
|
9
9
|
],
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"@anatine/zod-mock": "^3.13.4",
|
|
37
37
|
"@faker-js/faker": "^8.4.1",
|
|
38
|
-
"msw": "^2
|
|
38
|
+
"msw": "^2"
|
|
39
39
|
},
|
|
40
40
|
"peerDependenciesMeta": {
|
|
41
41
|
"@anatine/zod-mock": {
|
|
@@ -52,7 +52,6 @@
|
|
|
52
52
|
"@anatine/zod-mock": "^3.13.4",
|
|
53
53
|
"@faker-js/faker": "^8.4.1",
|
|
54
54
|
"@microsoft/api-extractor": "^7.47.9",
|
|
55
|
-
"msw": "^2.10.5",
|
|
56
55
|
"tsup": "^8.3.0",
|
|
57
56
|
"vite": "^6.2.6"
|
|
58
57
|
},
|