@spscommerce/asst-api 4.3.0 → 4.5.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-CI_Ao86P.d.cts → SpsItemIdResponse-gAHfCzwP.d.cts} +22 -14
- package/dist/{SpsItemIdResponse-CI_Ao86P.d.ts → SpsItemIdResponse-gAHfCzwP.d.ts} +22 -14
- package/dist/{chunk-LKUGPDIT.js → chunk-BMTYM2N6.js} +33 -4
- package/dist/{chunk-CI3ZSIT4.js → chunk-VS3QNXZF.js} +146 -37
- package/dist/{chunk-55ECRTUX.js → chunk-WX4LGXJV.js} +1 -1
- package/dist/index.cjs +174 -40
- package/dist/index.d.cts +141 -14
- package/dist/index.d.ts +141 -14
- package/dist/index.js +3 -3
- package/dist/msw.cjs +85 -7
- package/dist/msw.d.cts +43 -12
- package/dist/msw.d.ts +43 -12
- package/dist/msw.js +50 -4
- package/dist/{zod-C41Rts8D.d.cts → zod-C-emh7a3.d.cts} +10 -46
- package/dist/{zod-COyz02Lh.d.ts → zod-D3Xe9bw3.d.ts} +10 -46
- package/dist/zod.cjs +31 -4
- 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
- package/dist/SpsItemIdResponse-0VgfCmG_.d.cts +0 -84
- package/dist/SpsItemIdResponse-0VgfCmG_.d.ts +0 -84
- package/dist/SpsItemIdResponse-s0vCXepG.d.cts +0 -74
- package/dist/SpsItemIdResponse-s0vCXepG.d.ts +0 -74
- package/dist/chunk-355LPVI6.js +0 -126
- package/dist/chunk-63KIELUR.js +0 -128
- package/dist/chunk-DK2OMRWR.js +0 -134
- package/dist/chunk-FCUIJXCD.js +0 -544
- package/dist/chunk-L4AWOEED.js +0 -4892
- package/dist/chunk-NFZI7D22.js +0 -544
- package/dist/chunk-NUUQDRHD.js +0 -4899
- package/dist/chunk-RPGGEEFE.js +0 -79
- package/dist/zod-C3fOiO-H.d.cts +0 -5900
- package/dist/zod-CJ6AFTQr.d.ts +0 -5900
- package/dist/zod-CJmsC_DX.d.cts +0 -5900
- package/dist/zod-CzPw-bfk.d.cts +0 -5900
- package/dist/zod-vDuspd-x.d.ts +0 -5900
- package/dist/zod-xWM6u1LJ.d.ts +0 -5900
package/dist/msw.cjs
CHANGED
|
@@ -4269,6 +4269,33 @@ var itemHierarchyResponseSchema = external_exports.object({
|
|
|
4269
4269
|
)
|
|
4270
4270
|
});
|
|
4271
4271
|
|
|
4272
|
+
// lib/categories/models/CatalogManagement.ts
|
|
4273
|
+
var catalogCreateRequestSchema = external_exports.object({
|
|
4274
|
+
type: external_exports.string(),
|
|
4275
|
+
name: external_exports.string(),
|
|
4276
|
+
companyId: external_exports.number()
|
|
4277
|
+
});
|
|
4278
|
+
var catalogCreateResponseSchema = external_exports.object({
|
|
4279
|
+
categoryid: external_exports.number()
|
|
4280
|
+
});
|
|
4281
|
+
var catalogSearchParamsSchema = external_exports.object({
|
|
4282
|
+
ownerCompanyIds: external_exports.array(external_exports.number()).optional(),
|
|
4283
|
+
searchTerms: external_exports.string().optional(),
|
|
4284
|
+
categoryType: external_exports.literal("CATALOG")
|
|
4285
|
+
});
|
|
4286
|
+
var catalogBriefResponseSchema = external_exports.object({
|
|
4287
|
+
categoryId: external_exports.number(),
|
|
4288
|
+
categoryName: external_exports.string(),
|
|
4289
|
+
categoryDescription: external_exports.string(),
|
|
4290
|
+
categoryDescriptionExt: external_exports.string(),
|
|
4291
|
+
ownerCompanyId: external_exports.string(),
|
|
4292
|
+
categoryTypeId: external_exports.number(),
|
|
4293
|
+
createdAt: external_exports.string(),
|
|
4294
|
+
modifiedAt: external_exports.string(),
|
|
4295
|
+
createdBy: external_exports.string(),
|
|
4296
|
+
modifiedBy: external_exports.string()
|
|
4297
|
+
});
|
|
4298
|
+
|
|
4272
4299
|
// lib/categories/index.ts
|
|
4273
4300
|
var BASE_URL2 = "categories";
|
|
4274
4301
|
|
|
@@ -4314,9 +4341,31 @@ function createCategoriesApiHandlers(client) {
|
|
|
4314
4341
|
);
|
|
4315
4342
|
}
|
|
4316
4343
|
getItemHierarchy.generateData = () => (0, import_zod_mock2.generateMock)(itemHierarchyResponseSchema);
|
|
4344
|
+
function createCatalog(resolver = (_info) => {
|
|
4345
|
+
const data = (0, import_zod_mock2.generateMock)(catalogCreateResponseSchema);
|
|
4346
|
+
return import_msw2.HttpResponse.json(data);
|
|
4347
|
+
}) {
|
|
4348
|
+
return import_msw2.http.post(`${client.getBaseUrl()}category`, resolver);
|
|
4349
|
+
}
|
|
4350
|
+
createCatalog.generateData = () => (0, import_zod_mock2.generateMock)(catalogCreateResponseSchema);
|
|
4351
|
+
function searchCatalogsByCompany(resolver = (_info) => {
|
|
4352
|
+
const data = Array.from(
|
|
4353
|
+
{ length: 3 },
|
|
4354
|
+
() => (0, import_zod_mock2.generateMock)(catalogBriefResponseSchema)
|
|
4355
|
+
);
|
|
4356
|
+
return import_msw2.HttpResponse.json(data);
|
|
4357
|
+
}) {
|
|
4358
|
+
return import_msw2.http.get(
|
|
4359
|
+
`${client.getBaseUrl()}category/brief/CATALOG/search`,
|
|
4360
|
+
resolver
|
|
4361
|
+
);
|
|
4362
|
+
}
|
|
4363
|
+
searchCatalogsByCompany.generateData = () => Array.from({ length: 3 }, () => (0, import_zod_mock2.generateMock)(catalogBriefResponseSchema));
|
|
4317
4364
|
return {
|
|
4318
4365
|
getCategory,
|
|
4319
|
-
getItemHierarchy
|
|
4366
|
+
getItemHierarchy,
|
|
4367
|
+
createCatalog,
|
|
4368
|
+
searchCatalogsByCompany
|
|
4320
4369
|
};
|
|
4321
4370
|
}
|
|
4322
4371
|
|
|
@@ -5392,11 +5441,27 @@ var FlattenedItemIdentifierKeysSchema = external_exports.enum(
|
|
|
5392
5441
|
FlattenedItemIdentifierKeys
|
|
5393
5442
|
);
|
|
5394
5443
|
|
|
5444
|
+
// lib/uniqueCriteria/models/UniqueCriteriaOptionsSchema.ts
|
|
5445
|
+
var uniqueCriteriaOptions = external_exports.object({
|
|
5446
|
+
name: external_exports.string(),
|
|
5447
|
+
value: external_exports.string()
|
|
5448
|
+
});
|
|
5449
|
+
var uniqueCriteriaOptionsSchema = external_exports.array(uniqueCriteriaOptions);
|
|
5450
|
+
|
|
5395
5451
|
// lib/uniqueCriteria/index.ts
|
|
5396
5452
|
var BASE_URL15 = "uniquecriteria";
|
|
5397
5453
|
|
|
5398
5454
|
// lib/uniqueCriteria/mockHandlers.ts
|
|
5399
5455
|
function createUniqueCriteriaApiHandlers(client) {
|
|
5456
|
+
function getUniqueCriteriaOptions(resolver = (_info) => {
|
|
5457
|
+
const data = (0, import_zod_mock14.generateMock)(
|
|
5458
|
+
external_exports.array(external_exports.object({ name: external_exports.string(), value: external_exports.string() }))
|
|
5459
|
+
);
|
|
5460
|
+
return import_msw15.HttpResponse.json(data);
|
|
5461
|
+
}) {
|
|
5462
|
+
return import_msw15.http.get(`${client.getBaseUrl()}${BASE_URL15}`, resolver);
|
|
5463
|
+
}
|
|
5464
|
+
getUniqueCriteriaOptions.generateData = () => (0, import_zod_mock14.generateMock)(external_exports.array(external_exports.object({ name: external_exports.string(), value: external_exports.string() })));
|
|
5400
5465
|
function getUniqueCriteriaByOrg(resolver = (_info) => {
|
|
5401
5466
|
const data = (0, import_zod_mock14.generateMock)(external_exports.array(external_exports.string()));
|
|
5402
5467
|
return import_msw15.HttpResponse.json(data);
|
|
@@ -5411,9 +5476,22 @@ function createUniqueCriteriaApiHandlers(client) {
|
|
|
5411
5476
|
return import_msw15.http.get(`${client.getBaseUrl()}${BASE_URL15}/product/org`, resolver);
|
|
5412
5477
|
}
|
|
5413
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
|
+
});
|
|
5414
5490
|
return {
|
|
5491
|
+
getUniqueCriteriaOptions,
|
|
5415
5492
|
getUniqueCriteriaByOrg,
|
|
5416
|
-
getProductUniqueCriteriaByOrg
|
|
5493
|
+
getProductUniqueCriteriaByOrg,
|
|
5494
|
+
updateMultipleUniqueCriteriaAttributes
|
|
5417
5495
|
};
|
|
5418
5496
|
}
|
|
5419
5497
|
|
|
@@ -5421,20 +5499,20 @@ function createUniqueCriteriaApiHandlers(client) {
|
|
|
5421
5499
|
var import_zod_mock15 = require("@anatine/zod-mock");
|
|
5422
5500
|
var import_msw16 = require("msw");
|
|
5423
5501
|
|
|
5502
|
+
// lib/companies/models/CompanyType.ts
|
|
5503
|
+
var companyTypeSchema = external_exports.enum(["SUPPLIER", "RETAILER"]);
|
|
5504
|
+
|
|
5424
5505
|
// lib/companies/models/CompanyBriefByOrg.ts
|
|
5425
5506
|
var companyBriefByOrgSchema = external_exports.object({
|
|
5426
5507
|
companyId: external_exports.number(),
|
|
5427
5508
|
name: external_exports.string(),
|
|
5428
5509
|
orgId: external_exports.string(),
|
|
5429
|
-
|
|
5430
|
-
type: external_exports.enum(["SUPPLIER", "RETAILER"]),
|
|
5431
|
-
display: external_exports.enum(["SUPPLIER", "RETAILER"])
|
|
5432
|
-
}),
|
|
5510
|
+
companyTypes: external_exports.array(companyTypeSchema),
|
|
5433
5511
|
dc4Id: external_exports.number()
|
|
5434
5512
|
});
|
|
5435
5513
|
|
|
5436
5514
|
// lib/companies/index.ts
|
|
5437
|
-
var BASE_URL16 = "companys";
|
|
5515
|
+
var BASE_URL16 = "v3/companys";
|
|
5438
5516
|
|
|
5439
5517
|
// lib/companies/mockHandlers.ts
|
|
5440
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
|
|
|
@@ -79,9 +79,9 @@ declare function createCategoriesApiHandlers(client: AsstClient): {
|
|
|
79
79
|
data: {
|
|
80
80
|
type: "CATALOG" | "SELECTION_CODE" | "PRODUCT_CODE" | "EXPORT";
|
|
81
81
|
name: string;
|
|
82
|
+
companyId: number;
|
|
82
83
|
categoryid: number;
|
|
83
84
|
encodedCategoryId: string;
|
|
84
|
-
companyId: number;
|
|
85
85
|
isActive: number;
|
|
86
86
|
typeId: number;
|
|
87
87
|
description?: string | null | undefined;
|
|
@@ -96,6 +96,27 @@ declare function createCategoriesApiHandlers(client: AsstClient): {
|
|
|
96
96
|
(resolver?: ResponseResolver): msw.HttpHandler;
|
|
97
97
|
generateData(): ItemHierarchyResponse;
|
|
98
98
|
};
|
|
99
|
+
createCatalog: {
|
|
100
|
+
(resolver?: ResponseResolver): msw.HttpHandler;
|
|
101
|
+
generateData(): {
|
|
102
|
+
categoryid: number;
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
searchCatalogsByCompany: {
|
|
106
|
+
(resolver?: ResponseResolver): msw.HttpHandler;
|
|
107
|
+
generateData(): {
|
|
108
|
+
categoryId: number;
|
|
109
|
+
categoryName: string;
|
|
110
|
+
categoryDescription: string;
|
|
111
|
+
categoryDescriptionExt: string;
|
|
112
|
+
ownerCompanyId: string;
|
|
113
|
+
categoryTypeId: number;
|
|
114
|
+
createdAt: string;
|
|
115
|
+
modifiedAt: string;
|
|
116
|
+
createdBy: string;
|
|
117
|
+
modifiedBy: string;
|
|
118
|
+
}[];
|
|
119
|
+
};
|
|
99
120
|
};
|
|
100
121
|
|
|
101
122
|
/**
|
|
@@ -123,11 +144,11 @@ declare function createProductTypesApiHandlers(client: AsstClient): {
|
|
|
123
144
|
results: {
|
|
124
145
|
description: string;
|
|
125
146
|
createdDate: number;
|
|
147
|
+
createdBy: string;
|
|
126
148
|
attrProdTypeId: number;
|
|
127
149
|
productType: string;
|
|
128
|
-
createdBy: string;
|
|
129
|
-
modifiedDate?: number | undefined;
|
|
130
150
|
modifiedBy?: string | undefined;
|
|
151
|
+
modifiedDate?: number | undefined;
|
|
131
152
|
retailerId?: number | undefined;
|
|
132
153
|
}[];
|
|
133
154
|
};
|
|
@@ -594,13 +615,13 @@ declare function createSpreadsheetTemplateApiHandlers(client: AsstClient): {
|
|
|
594
615
|
maxItemsPerDoc: number;
|
|
595
616
|
companies: {
|
|
596
617
|
companyId: number;
|
|
597
|
-
companyName: string;
|
|
598
618
|
createdAt: number;
|
|
619
|
+
companyName: string;
|
|
599
620
|
}[];
|
|
600
|
-
createdBy?: string | null | undefined;
|
|
601
|
-
modifiedBy?: string | null | undefined;
|
|
602
621
|
createdAt?: number | null | undefined;
|
|
603
622
|
modifiedAt?: number | null | undefined;
|
|
623
|
+
createdBy?: string | null | undefined;
|
|
624
|
+
modifiedBy?: string | null | undefined;
|
|
604
625
|
}[];
|
|
605
626
|
};
|
|
606
627
|
};
|
|
@@ -631,6 +652,13 @@ declare function createFeatureFlagsApiHandlers(client: AsstClient): {
|
|
|
631
652
|
* @returns An object containing functions to generate MSW request handlers
|
|
632
653
|
*/
|
|
633
654
|
declare function createUniqueCriteriaApiHandlers(client: AsstClient): {
|
|
655
|
+
getUniqueCriteriaOptions: {
|
|
656
|
+
(resolver?: ResponseResolver): msw.HttpHandler;
|
|
657
|
+
generateData(): {
|
|
658
|
+
value: string;
|
|
659
|
+
name: string;
|
|
660
|
+
}[];
|
|
661
|
+
};
|
|
634
662
|
getUniqueCriteriaByOrg: {
|
|
635
663
|
(resolver?: ResponseResolver): msw.HttpHandler;
|
|
636
664
|
generateData(): string[];
|
|
@@ -639,6 +667,12 @@ declare function createUniqueCriteriaApiHandlers(client: AsstClient): {
|
|
|
639
667
|
(resolver?: ResponseResolver): msw.HttpHandler;
|
|
640
668
|
generateData(): ("gtin" | "upc" | "ean" | "isbn" | "partnumber" | "eaneight" | "upcCaseCode" | "buyerPartNumber" | "sku" | "nationalDrugCode" | "drugIdentificationNumber" | "nationalHealthRelatedItemCode" | "manufacturersPartNumber" | "internationalStandardSerialNumber" | "nabcaNumber" | "erpId" | "componentId")[];
|
|
641
669
|
};
|
|
670
|
+
updateMultipleUniqueCriteriaAttributes: {
|
|
671
|
+
(resolver?: ResponseResolver): msw.HttpHandler;
|
|
672
|
+
generateData(): {
|
|
673
|
+
success: boolean;
|
|
674
|
+
};
|
|
675
|
+
};
|
|
642
676
|
};
|
|
643
677
|
|
|
644
678
|
/**
|
|
@@ -648,15 +682,12 @@ declare function createUniqueCriteriaApiHandlers(client: AsstClient): {
|
|
|
648
682
|
*/
|
|
649
683
|
declare function createCompaniesApiHandlers(client: AsstClient): {
|
|
650
684
|
getCompanyBriefInfoByOrg: {
|
|
651
|
-
(resolver?:
|
|
685
|
+
(resolver?: HttpResponseResolver<never, never, CompanyBriefByOrg>): msw.HttpHandler;
|
|
652
686
|
generateData(): {
|
|
653
687
|
name: string;
|
|
654
688
|
companyId: number;
|
|
655
689
|
orgId: string;
|
|
656
|
-
|
|
657
|
-
type: "SUPPLIER" | "RETAILER";
|
|
658
|
-
display: "SUPPLIER" | "RETAILER";
|
|
659
|
-
};
|
|
690
|
+
companyTypes: ("SUPPLIER" | "RETAILER")[];
|
|
660
691
|
dc4Id: number;
|
|
661
692
|
};
|
|
662
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
|
|
|
@@ -79,9 +79,9 @@ declare function createCategoriesApiHandlers(client: AsstClient): {
|
|
|
79
79
|
data: {
|
|
80
80
|
type: "CATALOG" | "SELECTION_CODE" | "PRODUCT_CODE" | "EXPORT";
|
|
81
81
|
name: string;
|
|
82
|
+
companyId: number;
|
|
82
83
|
categoryid: number;
|
|
83
84
|
encodedCategoryId: string;
|
|
84
|
-
companyId: number;
|
|
85
85
|
isActive: number;
|
|
86
86
|
typeId: number;
|
|
87
87
|
description?: string | null | undefined;
|
|
@@ -96,6 +96,27 @@ declare function createCategoriesApiHandlers(client: AsstClient): {
|
|
|
96
96
|
(resolver?: ResponseResolver): msw.HttpHandler;
|
|
97
97
|
generateData(): ItemHierarchyResponse;
|
|
98
98
|
};
|
|
99
|
+
createCatalog: {
|
|
100
|
+
(resolver?: ResponseResolver): msw.HttpHandler;
|
|
101
|
+
generateData(): {
|
|
102
|
+
categoryid: number;
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
searchCatalogsByCompany: {
|
|
106
|
+
(resolver?: ResponseResolver): msw.HttpHandler;
|
|
107
|
+
generateData(): {
|
|
108
|
+
categoryId: number;
|
|
109
|
+
categoryName: string;
|
|
110
|
+
categoryDescription: string;
|
|
111
|
+
categoryDescriptionExt: string;
|
|
112
|
+
ownerCompanyId: string;
|
|
113
|
+
categoryTypeId: number;
|
|
114
|
+
createdAt: string;
|
|
115
|
+
modifiedAt: string;
|
|
116
|
+
createdBy: string;
|
|
117
|
+
modifiedBy: string;
|
|
118
|
+
}[];
|
|
119
|
+
};
|
|
99
120
|
};
|
|
100
121
|
|
|
101
122
|
/**
|
|
@@ -123,11 +144,11 @@ declare function createProductTypesApiHandlers(client: AsstClient): {
|
|
|
123
144
|
results: {
|
|
124
145
|
description: string;
|
|
125
146
|
createdDate: number;
|
|
147
|
+
createdBy: string;
|
|
126
148
|
attrProdTypeId: number;
|
|
127
149
|
productType: string;
|
|
128
|
-
createdBy: string;
|
|
129
|
-
modifiedDate?: number | undefined;
|
|
130
150
|
modifiedBy?: string | undefined;
|
|
151
|
+
modifiedDate?: number | undefined;
|
|
131
152
|
retailerId?: number | undefined;
|
|
132
153
|
}[];
|
|
133
154
|
};
|
|
@@ -594,13 +615,13 @@ declare function createSpreadsheetTemplateApiHandlers(client: AsstClient): {
|
|
|
594
615
|
maxItemsPerDoc: number;
|
|
595
616
|
companies: {
|
|
596
617
|
companyId: number;
|
|
597
|
-
companyName: string;
|
|
598
618
|
createdAt: number;
|
|
619
|
+
companyName: string;
|
|
599
620
|
}[];
|
|
600
|
-
createdBy?: string | null | undefined;
|
|
601
|
-
modifiedBy?: string | null | undefined;
|
|
602
621
|
createdAt?: number | null | undefined;
|
|
603
622
|
modifiedAt?: number | null | undefined;
|
|
623
|
+
createdBy?: string | null | undefined;
|
|
624
|
+
modifiedBy?: string | null | undefined;
|
|
604
625
|
}[];
|
|
605
626
|
};
|
|
606
627
|
};
|
|
@@ -631,6 +652,13 @@ declare function createFeatureFlagsApiHandlers(client: AsstClient): {
|
|
|
631
652
|
* @returns An object containing functions to generate MSW request handlers
|
|
632
653
|
*/
|
|
633
654
|
declare function createUniqueCriteriaApiHandlers(client: AsstClient): {
|
|
655
|
+
getUniqueCriteriaOptions: {
|
|
656
|
+
(resolver?: ResponseResolver): msw.HttpHandler;
|
|
657
|
+
generateData(): {
|
|
658
|
+
value: string;
|
|
659
|
+
name: string;
|
|
660
|
+
}[];
|
|
661
|
+
};
|
|
634
662
|
getUniqueCriteriaByOrg: {
|
|
635
663
|
(resolver?: ResponseResolver): msw.HttpHandler;
|
|
636
664
|
generateData(): string[];
|
|
@@ -639,6 +667,12 @@ declare function createUniqueCriteriaApiHandlers(client: AsstClient): {
|
|
|
639
667
|
(resolver?: ResponseResolver): msw.HttpHandler;
|
|
640
668
|
generateData(): ("gtin" | "upc" | "ean" | "isbn" | "partnumber" | "eaneight" | "upcCaseCode" | "buyerPartNumber" | "sku" | "nationalDrugCode" | "drugIdentificationNumber" | "nationalHealthRelatedItemCode" | "manufacturersPartNumber" | "internationalStandardSerialNumber" | "nabcaNumber" | "erpId" | "componentId")[];
|
|
641
669
|
};
|
|
670
|
+
updateMultipleUniqueCriteriaAttributes: {
|
|
671
|
+
(resolver?: ResponseResolver): msw.HttpHandler;
|
|
672
|
+
generateData(): {
|
|
673
|
+
success: boolean;
|
|
674
|
+
};
|
|
675
|
+
};
|
|
642
676
|
};
|
|
643
677
|
|
|
644
678
|
/**
|
|
@@ -648,15 +682,12 @@ declare function createUniqueCriteriaApiHandlers(client: AsstClient): {
|
|
|
648
682
|
*/
|
|
649
683
|
declare function createCompaniesApiHandlers(client: AsstClient): {
|
|
650
684
|
getCompanyBriefInfoByOrg: {
|
|
651
|
-
(resolver?:
|
|
685
|
+
(resolver?: HttpResponseResolver<never, never, CompanyBriefByOrg>): msw.HttpHandler;
|
|
652
686
|
generateData(): {
|
|
653
687
|
name: string;
|
|
654
688
|
companyId: number;
|
|
655
689
|
orgId: string;
|
|
656
|
-
|
|
657
|
-
type: "SUPPLIER" | "RETAILER";
|
|
658
|
-
display: "SUPPLIER" | "RETAILER";
|
|
659
|
-
};
|
|
690
|
+
companyTypes: ("SUPPLIER" | "RETAILER")[];
|
|
660
691
|
dc4Id: number;
|
|
661
692
|
};
|
|
662
693
|
};
|
package/dist/msw.js
CHANGED
|
@@ -19,9 +19,11 @@ import {
|
|
|
19
19
|
BASE_URL_V2,
|
|
20
20
|
FlattenedItemIdentifierKeysSchema,
|
|
21
21
|
retailerTradingPartnerStages
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-VS3QNXZF.js";
|
|
23
23
|
import {
|
|
24
24
|
attrProdTypeSchema,
|
|
25
|
+
catalogBriefResponseSchema,
|
|
26
|
+
catalogCreateResponseSchema,
|
|
25
27
|
companyBriefByOrgSchema,
|
|
26
28
|
external_exports,
|
|
27
29
|
importErrorsSchema,
|
|
@@ -44,7 +46,7 @@ import {
|
|
|
44
46
|
tradingPartnerAccessByCompanyIdSchema,
|
|
45
47
|
userAccountSchema,
|
|
46
48
|
vendorPartnerAttGroupsSchema
|
|
47
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-BMTYM2N6.js";
|
|
48
50
|
|
|
49
51
|
// lib/imports/mockHandlers.ts
|
|
50
52
|
import { generateMock } from "@anatine/zod-mock";
|
|
@@ -151,9 +153,31 @@ function createCategoriesApiHandlers(client) {
|
|
|
151
153
|
);
|
|
152
154
|
}
|
|
153
155
|
getItemHierarchy.generateData = () => generateMock2(itemHierarchyResponseSchema);
|
|
156
|
+
function createCatalog(resolver = (_info) => {
|
|
157
|
+
const data = generateMock2(catalogCreateResponseSchema);
|
|
158
|
+
return HttpResponse2.json(data);
|
|
159
|
+
}) {
|
|
160
|
+
return http2.post(`${client.getBaseUrl()}category`, resolver);
|
|
161
|
+
}
|
|
162
|
+
createCatalog.generateData = () => generateMock2(catalogCreateResponseSchema);
|
|
163
|
+
function searchCatalogsByCompany(resolver = (_info) => {
|
|
164
|
+
const data = Array.from(
|
|
165
|
+
{ length: 3 },
|
|
166
|
+
() => generateMock2(catalogBriefResponseSchema)
|
|
167
|
+
);
|
|
168
|
+
return HttpResponse2.json(data);
|
|
169
|
+
}) {
|
|
170
|
+
return http2.get(
|
|
171
|
+
`${client.getBaseUrl()}category/brief/CATALOG/search`,
|
|
172
|
+
resolver
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
searchCatalogsByCompany.generateData = () => Array.from({ length: 3 }, () => generateMock2(catalogBriefResponseSchema));
|
|
154
176
|
return {
|
|
155
177
|
getCategory,
|
|
156
|
-
getItemHierarchy
|
|
178
|
+
getItemHierarchy,
|
|
179
|
+
createCatalog,
|
|
180
|
+
searchCatalogsByCompany
|
|
157
181
|
};
|
|
158
182
|
}
|
|
159
183
|
|
|
@@ -480,6 +504,15 @@ function createFeatureFlagsApiHandlers(client) {
|
|
|
480
504
|
import { generateMock as generateMock14 } from "@anatine/zod-mock";
|
|
481
505
|
import { http as http15, HttpResponse as HttpResponse15 } from "msw";
|
|
482
506
|
function createUniqueCriteriaApiHandlers(client) {
|
|
507
|
+
function getUniqueCriteriaOptions(resolver = (_info) => {
|
|
508
|
+
const data = generateMock14(
|
|
509
|
+
external_exports.array(external_exports.object({ name: external_exports.string(), value: external_exports.string() }))
|
|
510
|
+
);
|
|
511
|
+
return HttpResponse15.json(data);
|
|
512
|
+
}) {
|
|
513
|
+
return http15.get(`${client.getBaseUrl()}${BASE_URL16}`, resolver);
|
|
514
|
+
}
|
|
515
|
+
getUniqueCriteriaOptions.generateData = () => generateMock14(external_exports.array(external_exports.object({ name: external_exports.string(), value: external_exports.string() })));
|
|
483
516
|
function getUniqueCriteriaByOrg(resolver = (_info) => {
|
|
484
517
|
const data = generateMock14(external_exports.array(external_exports.string()));
|
|
485
518
|
return HttpResponse15.json(data);
|
|
@@ -494,9 +527,22 @@ function createUniqueCriteriaApiHandlers(client) {
|
|
|
494
527
|
return http15.get(`${client.getBaseUrl()}${BASE_URL16}/product/org`, resolver);
|
|
495
528
|
}
|
|
496
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
|
+
});
|
|
497
541
|
return {
|
|
542
|
+
getUniqueCriteriaOptions,
|
|
498
543
|
getUniqueCriteriaByOrg,
|
|
499
|
-
getProductUniqueCriteriaByOrg
|
|
544
|
+
getProductUniqueCriteriaByOrg,
|
|
545
|
+
updateMultipleUniqueCriteriaAttributes
|
|
500
546
|
};
|
|
501
547
|
}
|
|
502
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<{
|
|
@@ -308,13 +308,13 @@ declare const downLoadItemsParamsSchema: z.ZodObject<{
|
|
|
308
308
|
}, "strip", z.ZodTypeAny, {
|
|
309
309
|
"multi-sheet": boolean;
|
|
310
310
|
ids: string[];
|
|
311
|
-
availableAttributes?: string[] | undefined;
|
|
312
311
|
orgId?: string | undefined;
|
|
312
|
+
availableAttributes?: string[] | undefined;
|
|
313
313
|
}, {
|
|
314
314
|
"multi-sheet": boolean;
|
|
315
315
|
ids: string[];
|
|
316
|
-
availableAttributes?: string[] | undefined;
|
|
317
316
|
orgId?: string | undefined;
|
|
317
|
+
availableAttributes?: string[] | undefined;
|
|
318
318
|
}>;
|
|
319
319
|
type DownLoadItemsParams = z.infer<typeof downLoadItemsParamsSchema>;
|
|
320
320
|
|
|
@@ -493,8 +493,8 @@ declare const itemCategorySchema: z.ZodObject<{
|
|
|
493
493
|
}, "strip", z.ZodTypeAny, {
|
|
494
494
|
type: "CATALOG" | "SELECTION_CODE" | "PRODUCT_CODE" | "EXPORT";
|
|
495
495
|
name: string;
|
|
496
|
-
isActive: number;
|
|
497
496
|
companyId: number;
|
|
497
|
+
isActive: number;
|
|
498
498
|
categoryid: number;
|
|
499
499
|
encodedCategoryId: string;
|
|
500
500
|
typeId: number;
|
|
@@ -506,8 +506,8 @@ declare const itemCategorySchema: z.ZodObject<{
|
|
|
506
506
|
}, {
|
|
507
507
|
type: "CATALOG" | "SELECTION_CODE" | "PRODUCT_CODE" | "EXPORT";
|
|
508
508
|
name: string;
|
|
509
|
-
isActive: number;
|
|
510
509
|
companyId: number;
|
|
510
|
+
isActive: number;
|
|
511
511
|
categoryid: number;
|
|
512
512
|
encodedCategoryId: string;
|
|
513
513
|
typeId: number;
|
|
@@ -537,8 +537,8 @@ declare const itemCategoriesSearchSchema: z.ZodObject<{
|
|
|
537
537
|
}, "strip", z.ZodTypeAny, {
|
|
538
538
|
type: "CATALOG" | "SELECTION_CODE" | "PRODUCT_CODE" | "EXPORT";
|
|
539
539
|
name: string;
|
|
540
|
-
isActive: number;
|
|
541
540
|
companyId: number;
|
|
541
|
+
isActive: number;
|
|
542
542
|
categoryid: number;
|
|
543
543
|
encodedCategoryId: string;
|
|
544
544
|
typeId: number;
|
|
@@ -550,8 +550,8 @@ declare const itemCategoriesSearchSchema: z.ZodObject<{
|
|
|
550
550
|
}, {
|
|
551
551
|
type: "CATALOG" | "SELECTION_CODE" | "PRODUCT_CODE" | "EXPORT";
|
|
552
552
|
name: string;
|
|
553
|
-
isActive: number;
|
|
554
553
|
companyId: number;
|
|
554
|
+
isActive: number;
|
|
555
555
|
categoryid: number;
|
|
556
556
|
encodedCategoryId: string;
|
|
557
557
|
typeId: number;
|
|
@@ -566,8 +566,8 @@ declare const itemCategoriesSearchSchema: z.ZodObject<{
|
|
|
566
566
|
data: {
|
|
567
567
|
type: "CATALOG" | "SELECTION_CODE" | "PRODUCT_CODE" | "EXPORT";
|
|
568
568
|
name: string;
|
|
569
|
-
isActive: number;
|
|
570
569
|
companyId: number;
|
|
570
|
+
isActive: number;
|
|
571
571
|
categoryid: number;
|
|
572
572
|
encodedCategoryId: string;
|
|
573
573
|
typeId: number;
|
|
@@ -582,8 +582,8 @@ declare const itemCategoriesSearchSchema: z.ZodObject<{
|
|
|
582
582
|
data: {
|
|
583
583
|
type: "CATALOG" | "SELECTION_CODE" | "PRODUCT_CODE" | "EXPORT";
|
|
584
584
|
name: string;
|
|
585
|
-
isActive: number;
|
|
586
585
|
companyId: number;
|
|
586
|
+
isActive: number;
|
|
587
587
|
categoryid: number;
|
|
588
588
|
encodedCategoryId: string;
|
|
589
589
|
typeId: number;
|
|
@@ -5864,40 +5864,4 @@ declare const itemErrorDetailsResultV2Schema: z.ZodObject<{
|
|
|
5864
5864
|
}>;
|
|
5865
5865
|
type ItemErrorDetailsResultV2 = z.infer<typeof itemErrorDetailsResultV2Schema>;
|
|
5866
5866
|
|
|
5867
|
-
|
|
5868
|
-
companyId: z.ZodNumber;
|
|
5869
|
-
name: z.ZodString;
|
|
5870
|
-
orgId: z.ZodString;
|
|
5871
|
-
companyType: z.ZodObject<{
|
|
5872
|
-
type: z.ZodEnum<["SUPPLIER", "RETAILER"]>;
|
|
5873
|
-
display: z.ZodEnum<["SUPPLIER", "RETAILER"]>;
|
|
5874
|
-
}, "strip", z.ZodTypeAny, {
|
|
5875
|
-
type: "SUPPLIER" | "RETAILER";
|
|
5876
|
-
display: "SUPPLIER" | "RETAILER";
|
|
5877
|
-
}, {
|
|
5878
|
-
type: "SUPPLIER" | "RETAILER";
|
|
5879
|
-
display: "SUPPLIER" | "RETAILER";
|
|
5880
|
-
}>;
|
|
5881
|
-
dc4Id: z.ZodNumber;
|
|
5882
|
-
}, "strip", z.ZodTypeAny, {
|
|
5883
|
-
name: string;
|
|
5884
|
-
orgId: string;
|
|
5885
|
-
companyId: number;
|
|
5886
|
-
companyType: {
|
|
5887
|
-
type: "SUPPLIER" | "RETAILER";
|
|
5888
|
-
display: "SUPPLIER" | "RETAILER";
|
|
5889
|
-
};
|
|
5890
|
-
dc4Id: number;
|
|
5891
|
-
}, {
|
|
5892
|
-
name: string;
|
|
5893
|
-
orgId: string;
|
|
5894
|
-
companyId: number;
|
|
5895
|
-
companyType: {
|
|
5896
|
-
type: "SUPPLIER" | "RETAILER";
|
|
5897
|
-
display: "SUPPLIER" | "RETAILER";
|
|
5898
|
-
};
|
|
5899
|
-
dc4Id: number;
|
|
5900
|
-
}>;
|
|
5901
|
-
type CompanyBriefByOrg = z.infer<typeof companyBriefByOrgSchema>;
|
|
5902
|
-
|
|
5903
|
-
export { type PackComponentDetails as $, type AttrProdType as A, type ItemHeader as B, type CompanyRelationshipUpsertBody as C, type DownLoadItemsParams as D, type Export as E, type ItemMap as F, type GenerateImportTemplateParams as G, type ItemTable as H, type Import as I, type PhaseEnum as J, type TradingPartnerStage as K, type Locale as L, type AttributeDetail as M, type CategoryEnum as N, type ComponentDetails as O, PRODUCT_CODE_DEFAULT_VALUE as P, type GroupedAttributeList as Q, type RegisteredService as R, type SpreadsheetTemplate as S, type TradingPartnerAccessByCompanyId as T, type UserAccount as U, type VendorPartnerAttGroups as V, type GroupedAttributes as W, type GroupedItem as X, type HierarchyCategory as Y, type HierarchyDetails as Z, type ItemPrice as _, type ImportsStatus as a, itemErrorDetailsResultSchema as a$, type MediaItem as a0, type Bulb as a1, type PackComponent as a2, type RepeatableGroup as a3, type PackComponentItemInfo as a4, type ItemErrorDetails as a5, type ItemErrorSummaryV2 as a6, type ItemErrorDetailsV2 as a7, type TradingPartnerStageV2 as a8, importDetailSchema as a9, categoryEnumSchema as aA, packComponentSchema as aB, itemDetailViewSchema as aC, attributeDetailSchema as aD, repeatableGroupSchema as aE, componentDetailsSchema as aF, hierarchyDetailsSchema as aG, groupedAttributesSchema as aH, hierarchyCategorySchema as aI, groupedAttributeListSchema as aJ, packComponentDetailsSchema as aK, packComponentItemInfoSchema as aL, localeSchema as aM, attrProdTypeSchema as aN, spreadsheetTemplateCompanySchema as aO, spreadsheetTemplateSchema as aP, connectionSchema as aQ, tradingPartnerAccessByCompanyIdSchema as aR, itemPartnerSchema as aS, companyRelationshipUpsertBodySchema as aT, identityServiceDatetimePreferencesSchema as aU, identityServiceOrganizationMetadataSchema as aV, identityServiceOrganizationSchema as aW, identityServicePreferencesSchema as aX, identityServiceUserSchema as aY, registeredServiceSchema as aZ, userAccountSchema as a_, importErrorSchema as aa, importErrorsSchema as ab, importSchema as ac, importsStatusSchema as ad, importStatusEnumSchema as ae, generateImportTemplateParamsSchema as af, vendorPartnerAttGroupsSchema as ag, exportDayOfWeekEnum as ah, exportFrequencyEnum as ai, exportTypeEnum as aj, exportSchema as ak, downLoadItemsParamsSchema as al, itemCategoriesSearchSchema as am, itemCategorySchema as an, categoryTypeSchema as ao, itemHeaderSchema as ap, itemMapSchema as aq, itemSearchViewSchema as ar, itemTableSchema as as, phaseEnumSchema as at, tradingPartnerStageSchema as au, bulbSchema as av, itemPriceSchema as aw, mediaItemSchema as ax, itemDetailSchema as ay, groupedItemSchema as az, type ItemPartner as b, itemErrorDetailsSchema as b0, itemErrorDetailsResultV2Schema as b1, itemErrorSummaryV2Schema as b2, itemErrorDetailsV2Schema as b3, tradingPartnerStageV2Schema as b4, itemErrorSummaryResultV2Schema as b5, companyBriefByOrgSchema as b6, 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 CompanyBriefByOrg as j, type ImportDetails as k, type ImportError as l, type ImportErrors as m, type ImportStatusEnum as n, type ExportDayOfWeek as o, type ExportFrequency as p, type ExportType as q, type Connection as r, SELECTION_CODE_DEFAULT_VALUE as s, type ItemCategory as t, type SpreadsheetTemplateCompany as u, type IdentityServiceOrganizationMetadata as v, type IdentityServiceDatetimePreferences as w, type IdentityServiceOrganization as x, type IdentityServicePreferences as y, type IdentityServiceUser as z };
|
|
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 };
|