@spscommerce/asst-api 4.2.2 → 4.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{CompanyBriefByOrg-Dy2omcT0.d.cts → SpsItemIdResponse-0VgfCmG_.d.cts} +26 -37
- package/dist/{CompanyBriefByOrg-Dy2omcT0.d.ts → SpsItemIdResponse-0VgfCmG_.d.ts} +26 -37
- package/dist/SpsItemIdResponse-CI_Ao86P.d.cts +87 -0
- package/dist/SpsItemIdResponse-CI_Ao86P.d.ts +87 -0
- package/dist/SpsItemIdResponse-s0vCXepG.d.cts +74 -0
- package/dist/SpsItemIdResponse-s0vCXepG.d.ts +74 -0
- package/dist/chunk-355LPVI6.js +126 -0
- package/dist/{chunk-BVCWT7AV.js → chunk-55ECRTUX.js} +1 -1
- package/dist/chunk-63KIELUR.js +128 -0
- package/dist/{chunk-4RARACQK.js → chunk-CI3ZSIT4.js} +29 -13
- package/dist/chunk-DK2OMRWR.js +134 -0
- package/dist/chunk-FCUIJXCD.js +544 -0
- package/dist/{chunk-MH76527N.js → chunk-L4AWOEED.js} +6 -6
- package/dist/chunk-LKUGPDIT.js +4896 -0
- package/dist/chunk-NFZI7D22.js +544 -0
- package/dist/chunk-NUUQDRHD.js +4899 -0
- package/dist/chunk-RPGGEEFE.js +79 -0
- package/dist/index.cjs +14 -10
- package/dist/index.d.cts +18 -7
- package/dist/index.d.ts +18 -7
- package/dist/index.js +5 -17
- package/dist/msw.cjs +71 -25
- package/dist/msw.d.cts +58 -4
- package/dist/msw.d.ts +58 -4
- package/dist/msw.js +61 -13
- package/dist/{zod-BRmUARvM.d.cts → zod-C3fOiO-H.d.cts} +38 -17
- package/dist/zod-C41Rts8D.d.cts +5903 -0
- package/dist/{zod-CFNzalN6.d.ts → zod-CJ6AFTQr.d.ts} +38 -17
- package/dist/zod-CJmsC_DX.d.cts +5900 -0
- package/dist/zod-COyz02Lh.d.ts +5903 -0
- package/dist/zod-CzPw-bfk.d.cts +5900 -0
- package/dist/zod-vDuspd-x.d.ts +5900 -0
- package/dist/zod-xWM6u1LJ.d.ts +5900 -0
- package/dist/zod.cjs +14 -10
- package/dist/zod.d.cts +2 -2
- package/dist/zod.d.ts +2 -2
- package/dist/zod.js +2 -2
- package/package.json +3 -3
- package/dist/index-9KKchLwe.d.cts +0 -14
- package/dist/index-DeivEdv0.d.ts +0 -14
package/dist/msw.js
CHANGED
|
@@ -6,6 +6,8 @@ import {
|
|
|
6
6
|
BASE_URL13,
|
|
7
7
|
BASE_URL14,
|
|
8
8
|
BASE_URL15,
|
|
9
|
+
BASE_URL16,
|
|
10
|
+
BASE_URL17,
|
|
9
11
|
BASE_URL2,
|
|
10
12
|
BASE_URL3,
|
|
11
13
|
BASE_URL4,
|
|
@@ -16,11 +18,11 @@ import {
|
|
|
16
18
|
BASE_URL9,
|
|
17
19
|
BASE_URL_V2,
|
|
18
20
|
FlattenedItemIdentifierKeysSchema,
|
|
19
|
-
createCompaniesApi,
|
|
20
21
|
retailerTradingPartnerStages
|
|
21
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-NFZI7D22.js";
|
|
22
23
|
import {
|
|
23
24
|
attrProdTypeSchema,
|
|
25
|
+
companyBriefByOrgSchema,
|
|
24
26
|
external_exports,
|
|
25
27
|
importErrorsSchema,
|
|
26
28
|
importSchema,
|
|
@@ -30,9 +32,11 @@ import {
|
|
|
30
32
|
itemErrorDetailsResultSchema,
|
|
31
33
|
itemErrorDetailsResultV2Schema,
|
|
32
34
|
itemErrorSummaryResultV2Schema,
|
|
35
|
+
itemHierarchyResponseSchema,
|
|
33
36
|
itemPartnerSchema,
|
|
34
37
|
itemSearchViewSchema,
|
|
35
38
|
itemStatusResponseSchema,
|
|
39
|
+
itemStatusV2ResponseSchema,
|
|
36
40
|
localeSchema,
|
|
37
41
|
pagedResultsSchema,
|
|
38
42
|
spreadsheetTemplateSchema,
|
|
@@ -40,7 +44,7 @@ import {
|
|
|
40
44
|
tradingPartnerAccessByCompanyIdSchema,
|
|
41
45
|
userAccountSchema,
|
|
42
46
|
vendorPartnerAttGroupsSchema
|
|
43
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-LKUGPDIT.js";
|
|
44
48
|
|
|
45
49
|
// lib/imports/mockHandlers.ts
|
|
46
50
|
import { generateMock } from "@anatine/zod-mock";
|
|
@@ -137,8 +141,19 @@ function createCategoriesApiHandlers(client) {
|
|
|
137
141
|
);
|
|
138
142
|
}
|
|
139
143
|
getCategory.generateData = () => generateMock2(itemCategoriesSearchSchema);
|
|
144
|
+
function getItemHierarchy(resolver = (_info) => {
|
|
145
|
+
const data = generateMock2(itemHierarchyResponseSchema);
|
|
146
|
+
return HttpResponse2.json(data);
|
|
147
|
+
}) {
|
|
148
|
+
return http2.post(
|
|
149
|
+
`${client.getBaseUrl()}${BASE_URL6}/item-hierarchy`,
|
|
150
|
+
resolver
|
|
151
|
+
);
|
|
152
|
+
}
|
|
153
|
+
getItemHierarchy.generateData = () => generateMock2(itemHierarchyResponseSchema);
|
|
140
154
|
return {
|
|
141
|
-
getCategory
|
|
155
|
+
getCategory,
|
|
156
|
+
getItemHierarchy
|
|
142
157
|
};
|
|
143
158
|
}
|
|
144
159
|
|
|
@@ -260,7 +275,7 @@ function createErrorsApiHandlers(client) {
|
|
|
260
275
|
return HttpResponse8.json(data);
|
|
261
276
|
}) {
|
|
262
277
|
return http8.get(
|
|
263
|
-
`${client.getBaseUrl()}${
|
|
278
|
+
`${client.getBaseUrl()}${BASE_URL14}/items/:itemInfoId`,
|
|
264
279
|
resolver
|
|
265
280
|
);
|
|
266
281
|
}
|
|
@@ -278,14 +293,14 @@ function createErrorsApiV2Handlers(client) {
|
|
|
278
293
|
const data = generateMock8(itemErrorSummaryResultV2Schema);
|
|
279
294
|
return HttpResponse9.json(data);
|
|
280
295
|
}) {
|
|
281
|
-
return http9.get(`${client.getBaseUrl()}${
|
|
296
|
+
return http9.get(`${client.getBaseUrl()}${BASE_URL15}/summary`, resolver);
|
|
282
297
|
}
|
|
283
298
|
function getItemErrorDetails(resolver = (_info) => {
|
|
284
299
|
const data = generateMock8(itemErrorDetailsResultV2Schema);
|
|
285
300
|
return HttpResponse9.json(data);
|
|
286
301
|
}) {
|
|
287
302
|
return http9.get(
|
|
288
|
-
`${client.getBaseUrl()}${
|
|
303
|
+
`${client.getBaseUrl()}${BASE_URL15}/items/:itemInfoId`,
|
|
289
304
|
resolver
|
|
290
305
|
);
|
|
291
306
|
}
|
|
@@ -447,10 +462,10 @@ function createFeatureFlagsApiHandlers(client) {
|
|
|
447
462
|
const data = generateMock13(external_exports.boolean());
|
|
448
463
|
return HttpResponse14.json(data);
|
|
449
464
|
}) {
|
|
450
|
-
const baseUrl = `${client.getBaseUrl()}${BASE_URL11}/enable-items-api-uom-conversion-rules
|
|
465
|
+
const baseUrl = `${client.getBaseUrl()}${BASE_URL11}/enable-items-api-uom-conversion-rules`;
|
|
451
466
|
return [
|
|
452
|
-
http14.get(`${baseUrl}
|
|
453
|
-
http14.get(`${baseUrl}/:companyId
|
|
467
|
+
http14.get(`${baseUrl}/`, resolver),
|
|
468
|
+
http14.get(`${baseUrl}/:companyId/`, resolver)
|
|
454
469
|
// Handles requests with companyId
|
|
455
470
|
];
|
|
456
471
|
}
|
|
@@ -469,14 +484,14 @@ function createUniqueCriteriaApiHandlers(client) {
|
|
|
469
484
|
const data = generateMock14(external_exports.array(external_exports.string()));
|
|
470
485
|
return HttpResponse15.json(data);
|
|
471
486
|
}) {
|
|
472
|
-
return http15.get(`${client.getBaseUrl()}${
|
|
487
|
+
return http15.get(`${client.getBaseUrl()}${BASE_URL16}/org`, resolver);
|
|
473
488
|
}
|
|
474
489
|
getUniqueCriteriaByOrg.generateData = () => generateMock14(external_exports.array(external_exports.string()));
|
|
475
490
|
function getProductUniqueCriteriaByOrg(resolver = (_info) => {
|
|
476
491
|
const data = generateMock14(external_exports.array(FlattenedItemIdentifierKeysSchema));
|
|
477
492
|
return HttpResponse15.json(data);
|
|
478
493
|
}) {
|
|
479
|
-
return http15.get(`${client.getBaseUrl()}${
|
|
494
|
+
return http15.get(`${client.getBaseUrl()}${BASE_URL16}/product/org`, resolver);
|
|
480
495
|
}
|
|
481
496
|
getProductUniqueCriteriaByOrg.generateData = () => generateMock14(external_exports.array(FlattenedItemIdentifierKeysSchema));
|
|
482
497
|
return {
|
|
@@ -484,9 +499,41 @@ function createUniqueCriteriaApiHandlers(client) {
|
|
|
484
499
|
getProductUniqueCriteriaByOrg
|
|
485
500
|
};
|
|
486
501
|
}
|
|
502
|
+
|
|
503
|
+
// lib/companies/mockHandlers.ts
|
|
504
|
+
import { generateMock as generateMock15 } from "@anatine/zod-mock";
|
|
505
|
+
import { http as http16, HttpResponse as HttpResponse16 } from "msw";
|
|
506
|
+
function createCompaniesApiHandlers(client) {
|
|
507
|
+
function getCompanyBriefInfoByOrg(resolver = (_info) => {
|
|
508
|
+
const data = generateMock15(companyBriefByOrgSchema);
|
|
509
|
+
return HttpResponse16.json(data);
|
|
510
|
+
}) {
|
|
511
|
+
return http16.get(`${client.getBaseUrl()}${BASE_URL17}/brief`, resolver);
|
|
512
|
+
}
|
|
513
|
+
getCompanyBriefInfoByOrg.generateData = () => generateMock15(companyBriefByOrgSchema);
|
|
514
|
+
return {
|
|
515
|
+
getCompanyBriefInfoByOrg
|
|
516
|
+
};
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
// lib/items/v2/mockHandlers.ts
|
|
520
|
+
import { generateMock as generateMock16 } from "@anatine/zod-mock";
|
|
521
|
+
import { http as http17, HttpResponse as HttpResponse17 } from "msw";
|
|
522
|
+
function createItemsApiV2Handlers(client) {
|
|
523
|
+
function getItemStatus(resolver = (_info) => {
|
|
524
|
+
const data = generateMock16(itemStatusV2ResponseSchema);
|
|
525
|
+
return HttpResponse17.json(data);
|
|
526
|
+
}) {
|
|
527
|
+
return http17.post(`${client.getBaseUrl()}${BASE_URL13}/status`, resolver);
|
|
528
|
+
}
|
|
529
|
+
getItemStatus.generateData = () => generateMock16(itemStatusV2ResponseSchema);
|
|
530
|
+
return {
|
|
531
|
+
getItemStatus
|
|
532
|
+
};
|
|
533
|
+
}
|
|
487
534
|
export {
|
|
488
535
|
createCategoriesApiHandlers,
|
|
489
|
-
|
|
536
|
+
createCompaniesApiHandlers,
|
|
490
537
|
createCompanyFeaturesApiHandlers,
|
|
491
538
|
createErrorsApiHandlers,
|
|
492
539
|
createErrorsApiV2Handlers,
|
|
@@ -494,6 +541,7 @@ export {
|
|
|
494
541
|
createFeatureFlagsApiHandlers,
|
|
495
542
|
createImportsApiHandlers,
|
|
496
543
|
createItemsApiHandlers,
|
|
544
|
+
createItemsApiV2Handlers,
|
|
497
545
|
createLocaleApiHandlers,
|
|
498
546
|
createProductTypesApiHandlers,
|
|
499
547
|
createSpreadsheetTemplateApiHandlers,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './
|
|
1
|
+
import './SpsItemIdResponse-s0vCXepG.cjs';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
declare const importSchema: z.ZodObject<{
|
|
@@ -593,21 +593,6 @@ declare const itemCategoriesSearchSchema: z.ZodObject<{
|
|
|
593
593
|
}>;
|
|
594
594
|
type ItemCategoriesSearch = z.infer<typeof itemCategoriesSearchSchema>;
|
|
595
595
|
|
|
596
|
-
type Hierarchy = {
|
|
597
|
-
id: string;
|
|
598
|
-
name?: string | null;
|
|
599
|
-
description?: string | null;
|
|
600
|
-
type?: string | null;
|
|
601
|
-
child?: Hierarchy | null;
|
|
602
|
-
};
|
|
603
|
-
type ItemHierarchyResponse = {
|
|
604
|
-
itemHierarchies: Array<{
|
|
605
|
-
itemId: string;
|
|
606
|
-
hierarchies: Array<Hierarchy>;
|
|
607
|
-
}>;
|
|
608
|
-
};
|
|
609
|
-
declare const itemHierarchyResponseSchema: z.ZodType<ItemHierarchyResponse>;
|
|
610
|
-
|
|
611
596
|
declare const localeSchema: z.ZodObject<{
|
|
612
597
|
localeCode: z.ZodString;
|
|
613
598
|
localeDescription: z.ZodString;
|
|
@@ -5876,4 +5861,40 @@ declare const itemErrorDetailsResultV2Schema: z.ZodObject<{
|
|
|
5876
5861
|
}>;
|
|
5877
5862
|
type ItemErrorDetailsResultV2 = z.infer<typeof itemErrorDetailsResultV2Schema>;
|
|
5878
5863
|
|
|
5879
|
-
|
|
5864
|
+
declare const companyBriefByOrgSchema: z.ZodObject<{
|
|
5865
|
+
companyId: z.ZodNumber;
|
|
5866
|
+
name: z.ZodString;
|
|
5867
|
+
orgId: z.ZodString;
|
|
5868
|
+
companyType: z.ZodObject<{
|
|
5869
|
+
type: z.ZodEnum<["SUPPLIER", "RETAILER"]>;
|
|
5870
|
+
display: z.ZodEnum<["SUPPLIER", "RETAILER"]>;
|
|
5871
|
+
}, "strip", z.ZodTypeAny, {
|
|
5872
|
+
type: "SUPPLIER" | "RETAILER";
|
|
5873
|
+
display: "SUPPLIER" | "RETAILER";
|
|
5874
|
+
}, {
|
|
5875
|
+
type: "SUPPLIER" | "RETAILER";
|
|
5876
|
+
display: "SUPPLIER" | "RETAILER";
|
|
5877
|
+
}>;
|
|
5878
|
+
dc4Id: z.ZodNumber;
|
|
5879
|
+
}, "strip", z.ZodTypeAny, {
|
|
5880
|
+
name: string;
|
|
5881
|
+
orgId: string;
|
|
5882
|
+
companyId: number;
|
|
5883
|
+
companyType: {
|
|
5884
|
+
type: "SUPPLIER" | "RETAILER";
|
|
5885
|
+
display: "SUPPLIER" | "RETAILER";
|
|
5886
|
+
};
|
|
5887
|
+
dc4Id: number;
|
|
5888
|
+
}, {
|
|
5889
|
+
name: string;
|
|
5890
|
+
orgId: string;
|
|
5891
|
+
companyId: number;
|
|
5892
|
+
companyType: {
|
|
5893
|
+
type: "SUPPLIER" | "RETAILER";
|
|
5894
|
+
display: "SUPPLIER" | "RETAILER";
|
|
5895
|
+
};
|
|
5896
|
+
dc4Id: number;
|
|
5897
|
+
}>;
|
|
5898
|
+
type CompanyBriefByOrg = z.infer<typeof companyBriefByOrgSchema>;
|
|
5899
|
+
|
|
5900
|
+
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 };
|