@spscommerce/asst-api 4.7.0 → 4.8.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/CompanySearch-T6HJx4a6.d.cts +313 -0
- package/dist/CompanySearch-T6HJx4a6.d.ts +313 -0
- package/dist/{SpsItemIdResponse-gAHfCzwP.d.cts → SpsItemIdResponse-BEq6yqtR.d.cts} +28 -23
- package/dist/{SpsItemIdResponse-gAHfCzwP.d.ts → SpsItemIdResponse-BEq6yqtR.d.ts} +28 -23
- package/dist/{chunk-BMTYM2N6.js → chunk-52RZCPMT.js} +85 -1
- package/dist/{chunk-WX4LGXJV.js → chunk-VQDRXCML.js} +8 -1
- package/dist/{chunk-IZLZKWK7.js → chunk-ZAW3TKZQ.js} +95 -33
- package/dist/index.cjs +181 -32
- package/dist/index.d.cts +112 -25
- package/dist/index.d.ts +112 -25
- package/dist/index.js +3 -3
- package/dist/msw.cjs +102 -1
- package/dist/msw.d.cts +98 -28
- package/dist/msw.d.ts +98 -28
- package/dist/msw.js +24 -3
- package/dist/{zod-C-emh7a3.d.cts → zod-CEvcMeWn.d.ts} +159 -159
- package/dist/{zod-D3Xe9bw3.d.ts → zod-DscWtu4d.d.cts} +159 -159
- package/dist/zod.cjs +82 -0
- package/dist/zod.d.cts +3 -3
- package/dist/zod.d.ts +3 -3
- package/dist/zod.js +2 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,19 +1,109 @@
|
|
|
1
|
-
import { A as AsstClient, I as ItemHierarchyResponse, S as SpsItemIdResponse, C as CompanyBriefByOrg } from './SpsItemIdResponse-
|
|
2
|
-
export {
|
|
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-
|
|
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-
|
|
1
|
+
import { A as AsstClient, I as ItemHierarchyResponse, a as CompanyType, S as SpsItemIdResponse, C as CompanyBriefByOrg } from './SpsItemIdResponse-BEq6yqtR.js';
|
|
2
|
+
export { b as AsstClientOptions, c as AsstUrl, B as BASE_URLS, E as Env, e as envSchema } from './SpsItemIdResponse-BEq6yqtR.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-CEvcMeWn.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-CEvcMeWn.js';
|
|
5
5
|
import { z } from 'zod';
|
|
6
|
+
import { b as CompanySearchParams, C as CompanySearch, a as Company } from './CompanySearch-T6HJx4a6.js';
|
|
6
7
|
import 'ky';
|
|
7
8
|
|
|
8
|
-
declare const
|
|
9
|
-
|
|
9
|
+
declare const relationshipSchema: z.ZodObject<{
|
|
10
|
+
active: z.ZodBoolean;
|
|
11
|
+
application: z.ZodArray<z.ZodObject<{
|
|
12
|
+
application: z.ZodEnum<["ASSORTMENT", "ITEM-XREF", "TEST-ORDER-GENERATOR"]>;
|
|
13
|
+
relationshipApplicationId: z.ZodNumber;
|
|
14
|
+
}, "strip", z.ZodTypeAny, {
|
|
15
|
+
application: "ASSORTMENT" | "ITEM-XREF" | "TEST-ORDER-GENERATOR";
|
|
16
|
+
relationshipApplicationId: number;
|
|
17
|
+
}, {
|
|
18
|
+
application: "ASSORTMENT" | "ITEM-XREF" | "TEST-ORDER-GENERATOR";
|
|
19
|
+
relationshipApplicationId: number;
|
|
20
|
+
}>, "many">;
|
|
21
|
+
catalog: z.ZodArray<z.ZodObject<{
|
|
22
|
+
active: z.ZodBoolean;
|
|
23
|
+
catalogId: z.ZodNumber;
|
|
24
|
+
itemPartnerId: z.ZodNumber;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
active: boolean;
|
|
27
|
+
catalogId: number;
|
|
28
|
+
itemPartnerId: number;
|
|
29
|
+
}, {
|
|
30
|
+
active: boolean;
|
|
31
|
+
catalogId: number;
|
|
32
|
+
itemPartnerId: number;
|
|
33
|
+
}>, "many">;
|
|
34
|
+
company: z.ZodObject<{
|
|
35
|
+
companyId: z.ZodNumber;
|
|
36
|
+
companyTypes: z.ZodArray<z.ZodEnum<["SUPPLIER", "RETAILER"]>, "many">;
|
|
37
|
+
dc4Id: z.ZodNullable<z.ZodNumber>;
|
|
38
|
+
name: z.ZodString;
|
|
39
|
+
orgId: z.ZodString;
|
|
40
|
+
}, "strip", z.ZodTypeAny, {
|
|
41
|
+
companyId: number;
|
|
42
|
+
name: string;
|
|
43
|
+
orgId: string;
|
|
44
|
+
companyTypes: ("SUPPLIER" | "RETAILER")[];
|
|
45
|
+
dc4Id: number | null;
|
|
46
|
+
}, {
|
|
47
|
+
companyId: number;
|
|
48
|
+
name: string;
|
|
49
|
+
orgId: string;
|
|
50
|
+
companyTypes: ("SUPPLIER" | "RETAILER")[];
|
|
51
|
+
dc4Id: number | null;
|
|
52
|
+
}>;
|
|
53
|
+
createdAt: z.ZodNumber;
|
|
54
|
+
modifiedAt: z.ZodNullable<z.ZodNumber>;
|
|
55
|
+
relationshipId: z.ZodNumber;
|
|
56
|
+
}, "strip", z.ZodTypeAny, {
|
|
57
|
+
application: {
|
|
58
|
+
application: "ASSORTMENT" | "ITEM-XREF" | "TEST-ORDER-GENERATOR";
|
|
59
|
+
relationshipApplicationId: number;
|
|
60
|
+
}[];
|
|
61
|
+
active: boolean;
|
|
62
|
+
catalog: {
|
|
63
|
+
active: boolean;
|
|
64
|
+
catalogId: number;
|
|
65
|
+
itemPartnerId: number;
|
|
66
|
+
}[];
|
|
67
|
+
company: {
|
|
68
|
+
companyId: number;
|
|
69
|
+
name: string;
|
|
70
|
+
orgId: string;
|
|
71
|
+
companyTypes: ("SUPPLIER" | "RETAILER")[];
|
|
72
|
+
dc4Id: number | null;
|
|
73
|
+
};
|
|
74
|
+
createdAt: number;
|
|
75
|
+
modifiedAt: number | null;
|
|
76
|
+
relationshipId: number;
|
|
77
|
+
}, {
|
|
78
|
+
application: {
|
|
79
|
+
application: "ASSORTMENT" | "ITEM-XREF" | "TEST-ORDER-GENERATOR";
|
|
80
|
+
relationshipApplicationId: number;
|
|
81
|
+
}[];
|
|
82
|
+
active: boolean;
|
|
83
|
+
catalog: {
|
|
84
|
+
active: boolean;
|
|
85
|
+
catalogId: number;
|
|
86
|
+
itemPartnerId: number;
|
|
87
|
+
}[];
|
|
88
|
+
company: {
|
|
89
|
+
companyId: number;
|
|
90
|
+
name: string;
|
|
91
|
+
orgId: string;
|
|
92
|
+
companyTypes: ("SUPPLIER" | "RETAILER")[];
|
|
93
|
+
dc4Id: number | null;
|
|
94
|
+
};
|
|
95
|
+
createdAt: number;
|
|
96
|
+
modifiedAt: number | null;
|
|
97
|
+
relationshipId: number;
|
|
98
|
+
}>;
|
|
99
|
+
type CompanyRelationship = z.infer<typeof relationshipSchema>;
|
|
10
100
|
|
|
11
101
|
/**
|
|
12
102
|
* Initialize Imports Api functions
|
|
13
103
|
* @param client Assortment Client instance
|
|
14
104
|
* @returns An object containing Imports API functions
|
|
15
105
|
*/
|
|
16
|
-
declare function createImportsApi(client: AsstClient
|
|
106
|
+
declare function createImportsApi(client: AsstClient): {
|
|
17
107
|
getImportErrors: (importId: string, params?: {
|
|
18
108
|
offset?: number;
|
|
19
109
|
limit?: number;
|
|
@@ -44,7 +134,7 @@ declare function createImportsApi(client: AsstClient, companyType?: CompanyType)
|
|
|
44
134
|
* @param companyType Company type for perspective
|
|
45
135
|
* @returns An object containing Exports API functions
|
|
46
136
|
*/
|
|
47
|
-
declare function createExportsApi(client: AsstClient
|
|
137
|
+
declare function createExportsApi(client: AsstClient): {
|
|
48
138
|
createExport: (data: Export, params?: {
|
|
49
139
|
orgId?: string;
|
|
50
140
|
}) => Promise<void>;
|
|
@@ -65,10 +155,9 @@ declare function createProductTypesApi(client: AsstClient): {
|
|
|
65
155
|
/**
|
|
66
156
|
* Initialize Trading Partner Access Api functions
|
|
67
157
|
* @param client Assortment Client instance
|
|
68
|
-
* @param companyType Company type for perspective
|
|
69
158
|
* @returns An object containing Trading Partner Access API functions
|
|
70
159
|
*/
|
|
71
|
-
declare function createTradingPartnerAccessApi(client: AsstClient
|
|
160
|
+
declare function createTradingPartnerAccessApi(client: AsstClient): {
|
|
72
161
|
getAllTradingPartners: (params?: {
|
|
73
162
|
orgId?: string;
|
|
74
163
|
}, signal?: AbortSignal) => Promise<TradingPartnerAccessByCompanyId>;
|
|
@@ -82,10 +171,9 @@ type RetailerTradingPartnerStages = z.infer<typeof retailerTradingPartnerStages>
|
|
|
82
171
|
/**
|
|
83
172
|
* Initialize Trading Partner Settings Api functions
|
|
84
173
|
* @param client Assortment Client instance
|
|
85
|
-
* @param companyType Company type for perspective
|
|
86
174
|
* @returns An object containing Trading Partner Settings API functions
|
|
87
175
|
*/
|
|
88
|
-
declare function createTradingPartnerSettingsApi(client: AsstClient
|
|
176
|
+
declare function createTradingPartnerSettingsApi(client: AsstClient): {
|
|
89
177
|
getRetailerStages: (signal?: AbortSignal) => Promise<RetailerTradingPartnerStages>;
|
|
90
178
|
};
|
|
91
179
|
|
|
@@ -99,12 +187,12 @@ declare const catalogCreateRequestSchema: z.ZodObject<{
|
|
|
99
187
|
companyId: z.ZodNumber;
|
|
100
188
|
}, "strip", z.ZodTypeAny, {
|
|
101
189
|
type: string;
|
|
102
|
-
name: string;
|
|
103
190
|
companyId: number;
|
|
191
|
+
name: string;
|
|
104
192
|
}, {
|
|
105
193
|
type: string;
|
|
106
|
-
name: string;
|
|
107
194
|
companyId: number;
|
|
195
|
+
name: string;
|
|
108
196
|
}>;
|
|
109
197
|
type CatalogCreateRequest = z.infer<typeof catalogCreateRequestSchema>;
|
|
110
198
|
/**
|
|
@@ -151,6 +239,8 @@ declare const catalogBriefResponseSchema: z.ZodObject<{
|
|
|
151
239
|
createdBy: z.ZodString;
|
|
152
240
|
modifiedBy: z.ZodString;
|
|
153
241
|
}, "strip", z.ZodTypeAny, {
|
|
242
|
+
createdAt: string;
|
|
243
|
+
modifiedAt: string;
|
|
154
244
|
createdBy: string;
|
|
155
245
|
modifiedBy: string;
|
|
156
246
|
categoryId: number;
|
|
@@ -159,9 +249,9 @@ declare const catalogBriefResponseSchema: z.ZodObject<{
|
|
|
159
249
|
categoryDescriptionExt: string;
|
|
160
250
|
ownerCompanyId: string;
|
|
161
251
|
categoryTypeId: number;
|
|
252
|
+
}, {
|
|
162
253
|
createdAt: string;
|
|
163
254
|
modifiedAt: string;
|
|
164
|
-
}, {
|
|
165
255
|
createdBy: string;
|
|
166
256
|
modifiedBy: string;
|
|
167
257
|
categoryId: number;
|
|
@@ -170,8 +260,6 @@ declare const catalogBriefResponseSchema: z.ZodObject<{
|
|
|
170
260
|
categoryDescriptionExt: string;
|
|
171
261
|
ownerCompanyId: string;
|
|
172
262
|
categoryTypeId: number;
|
|
173
|
-
createdAt: string;
|
|
174
|
-
modifiedAt: string;
|
|
175
263
|
}>;
|
|
176
264
|
type CatalogBriefResponse = z.infer<typeof catalogBriefResponseSchema>;
|
|
177
265
|
|
|
@@ -471,10 +559,9 @@ type ItemsApi = {
|
|
|
471
559
|
/**
|
|
472
560
|
* Initialize Items Api functions
|
|
473
561
|
* @param client Assortment Client instance
|
|
474
|
-
* @param companyType Optional company type eg "RETAILER" | "SUPPLIER"
|
|
475
562
|
* @returns An object containing Items API functions
|
|
476
563
|
*/
|
|
477
|
-
declare function createItemsApi(client: AsstClient
|
|
564
|
+
declare function createItemsApi(client: AsstClient): ItemsApi;
|
|
478
565
|
|
|
479
566
|
declare const itemOrgStageDetailsSchema: z.ZodObject<{
|
|
480
567
|
/**
|
|
@@ -772,20 +859,18 @@ type Stage = z.infer<typeof stageSchema>;
|
|
|
772
859
|
/**
|
|
773
860
|
* Initialize Items Api functions
|
|
774
861
|
* @param client Assortment Client instance
|
|
775
|
-
* @param companyType Company type for perspective
|
|
776
862
|
* @returns An object containing Items API functions
|
|
777
863
|
*/
|
|
778
864
|
declare function createItemsApiV2(client: AsstClient): {
|
|
779
|
-
getItemStatus: (
|
|
865
|
+
getItemStatus: (itemIds: string[]) => Promise<ItemStatusV2Response>;
|
|
780
866
|
};
|
|
781
867
|
|
|
782
868
|
/**
|
|
783
869
|
* Initialize Errors Api functions
|
|
784
870
|
* @param client Assortment Client instance
|
|
785
|
-
* @param companyType Company type for perspective
|
|
786
871
|
* @returns An object containing Errors API functions
|
|
787
872
|
*/
|
|
788
|
-
declare function createErrorsApi(client: AsstClient
|
|
873
|
+
declare function createErrorsApi(client: AsstClient): {
|
|
789
874
|
getInvalidItemErrorDetails: (itemInfoId: string, signal?: AbortSignal) => Promise<ItemErrorDetailsResult>;
|
|
790
875
|
};
|
|
791
876
|
|
|
@@ -804,7 +889,7 @@ type GetItemErrorSummaryParams = {
|
|
|
804
889
|
* @param companyType Company type for perspective
|
|
805
890
|
* @returns An object containing Errors API functions
|
|
806
891
|
*/
|
|
807
|
-
declare function createErrorsApiV2(client: AsstClient
|
|
892
|
+
declare function createErrorsApiV2(client: AsstClient): {
|
|
808
893
|
getItemErrorSummary: (params: GetItemErrorSummaryParams, signal?: AbortSignal) => Promise<ItemErrorSummaryResultV2>;
|
|
809
894
|
getItemErrorDetails: (itemInfoId: number, signal?: AbortSignal) => Promise<ItemErrorDetailsResultV2>;
|
|
810
895
|
};
|
|
@@ -851,6 +936,8 @@ declare function createCompaniesApi(client: AsstClient): {
|
|
|
851
936
|
getCompanyBriefInfoByOrg: (params?: {
|
|
852
937
|
orgId?: string;
|
|
853
938
|
}, signal?: AbortSignal) => Promise<CompanyBriefByOrg>;
|
|
939
|
+
companySearch: (params?: CompanySearchParams, signal?: AbortSignal) => Promise<CompanySearch[]>;
|
|
940
|
+
getCompanyById: (companyId: number, signal?: AbortSignal) => Promise<Company>;
|
|
854
941
|
};
|
|
855
942
|
|
|
856
943
|
declare const activateRuleRequestDtoSchema: z.ZodObject<{
|
|
@@ -874,4 +961,4 @@ declare function createRulesManagementApi(client: AsstClient): {
|
|
|
874
961
|
activateRule: (ruleId: string, request: ActivateRuleRequestDto, signal?: AbortSignal) => Promise<void>;
|
|
875
962
|
};
|
|
876
963
|
|
|
877
|
-
export { type ActivateRuleRequestDto, 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, createRulesManagementApi, createSpreadsheetTemplateApi, createTradingPartnerAccessApi, createTradingPartnerSettingsApi, createUniqueCriteriaApi, createWhoAmIApi };
|
|
964
|
+
export { type ActivateRuleRequestDto, type ApplicationType, AsstClient, AttrProdType, type CatalogBriefResponse, type CatalogCreateRequest, type CatalogCreateResponse, type CatalogSearchParams, type CategoriesApi, Company, CompanyBriefByOrg, type CompanyRelationship, CompanyRelationshipUpsertBody, CompanySearch, CompanySearchParams, CompanyType, 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, createRulesManagementApi, createSpreadsheetTemplateApi, createTradingPartnerAccessApi, createTradingPartnerSettingsApi, createUniqueCriteriaApi, createWhoAmIApi };
|
package/dist/index.js
CHANGED
|
@@ -17,16 +17,16 @@ import {
|
|
|
17
17
|
createTradingPartnerSettingsApi,
|
|
18
18
|
createUniqueCriteriaApi,
|
|
19
19
|
createWhoAmIApi
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-ZAW3TKZQ.js";
|
|
21
21
|
import {
|
|
22
22
|
AsstClient,
|
|
23
23
|
BASE_URLS,
|
|
24
24
|
envSchema
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-VQDRXCML.js";
|
|
26
26
|
import {
|
|
27
27
|
PRODUCT_CODE_DEFAULT_VALUE,
|
|
28
28
|
SELECTION_CODE_DEFAULT_VALUE
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-52RZCPMT.js";
|
|
30
30
|
export {
|
|
31
31
|
AsstClient,
|
|
32
32
|
BASE_URLS,
|
package/dist/msw.cjs
CHANGED
|
@@ -5512,6 +5512,88 @@ var companyBriefByOrgSchema = external_exports.object({
|
|
|
5512
5512
|
dc4Id: external_exports.number()
|
|
5513
5513
|
});
|
|
5514
5514
|
|
|
5515
|
+
// lib/companies/models/CompanyRelationship.ts
|
|
5516
|
+
var applicationSchema = external_exports.object({
|
|
5517
|
+
application: applicationTypeSchema,
|
|
5518
|
+
relationshipApplicationId: external_exports.number()
|
|
5519
|
+
});
|
|
5520
|
+
var catalogSchema = external_exports.object({
|
|
5521
|
+
active: external_exports.boolean(),
|
|
5522
|
+
catalogId: external_exports.number(),
|
|
5523
|
+
itemPartnerId: external_exports.number()
|
|
5524
|
+
});
|
|
5525
|
+
var relationshipCompanySchema = external_exports.object({
|
|
5526
|
+
companyId: external_exports.number(),
|
|
5527
|
+
companyTypes: external_exports.array(companyTypeSchema),
|
|
5528
|
+
dc4Id: external_exports.number().nullable(),
|
|
5529
|
+
name: external_exports.string(),
|
|
5530
|
+
orgId: external_exports.string()
|
|
5531
|
+
});
|
|
5532
|
+
var relationshipSchema = external_exports.object({
|
|
5533
|
+
active: external_exports.boolean(),
|
|
5534
|
+
application: external_exports.array(applicationSchema),
|
|
5535
|
+
catalog: external_exports.array(catalogSchema),
|
|
5536
|
+
company: relationshipCompanySchema,
|
|
5537
|
+
createdAt: external_exports.number(),
|
|
5538
|
+
modifiedAt: external_exports.number().nullable(),
|
|
5539
|
+
relationshipId: external_exports.number()
|
|
5540
|
+
});
|
|
5541
|
+
|
|
5542
|
+
// lib/companies/models/Company.ts
|
|
5543
|
+
var featureResponseSchema = external_exports.object({
|
|
5544
|
+
active: external_exports.boolean(),
|
|
5545
|
+
createdBy: external_exports.string().nullable(),
|
|
5546
|
+
createdDate: external_exports.number().nullable(),
|
|
5547
|
+
display: external_exports.string(),
|
|
5548
|
+
modifiedBy: external_exports.string().nullable(),
|
|
5549
|
+
modifiedDate: external_exports.number().nullable(),
|
|
5550
|
+
type: external_exports.string()
|
|
5551
|
+
});
|
|
5552
|
+
var identitySchema = external_exports.object({
|
|
5553
|
+
orgId: external_exports.string().nullable(),
|
|
5554
|
+
service: external_exports.object({
|
|
5555
|
+
name: external_exports.string()
|
|
5556
|
+
}).nullable()
|
|
5557
|
+
});
|
|
5558
|
+
var companySchema = external_exports.object({
|
|
5559
|
+
active: external_exports.boolean(),
|
|
5560
|
+
companyId: external_exports.number(),
|
|
5561
|
+
companyTypes: external_exports.array(companyTypeSchema),
|
|
5562
|
+
createdAt: external_exports.number().nullable(),
|
|
5563
|
+
features: external_exports.array(featureResponseSchema),
|
|
5564
|
+
identity: identitySchema,
|
|
5565
|
+
modifiedAt: external_exports.number().nullable(),
|
|
5566
|
+
name: external_exports.string(),
|
|
5567
|
+
relationships: external_exports.array(relationshipSchema),
|
|
5568
|
+
uniqueAttributes: external_exports.array(external_exports.string())
|
|
5569
|
+
});
|
|
5570
|
+
|
|
5571
|
+
// lib/companies/models/CompanySearch.ts
|
|
5572
|
+
var companySearchParamsSchema = external_exports.object({
|
|
5573
|
+
name: external_exports.string().min(2).max(100).optional(),
|
|
5574
|
+
companyIds: external_exports.string().min(2).optional(),
|
|
5575
|
+
orgId: external_exports.string().min(2).optional(),
|
|
5576
|
+
catalogName: external_exports.string().min(2).max(100).optional(),
|
|
5577
|
+
catalogIds: external_exports.string().min(2).optional(),
|
|
5578
|
+
type: companyTypeSchema.optional()
|
|
5579
|
+
});
|
|
5580
|
+
var companyCatalogSchema = external_exports.object({
|
|
5581
|
+
categoryId: external_exports.number(),
|
|
5582
|
+
categoryName: external_exports.string()
|
|
5583
|
+
});
|
|
5584
|
+
var companySearchSchema = external_exports.object({
|
|
5585
|
+
id: external_exports.string(),
|
|
5586
|
+
organizationName: external_exports.string(),
|
|
5587
|
+
description: external_exports.string(),
|
|
5588
|
+
orgId: external_exports.string().optional(),
|
|
5589
|
+
roles: external_exports.array(companyTypeSchema),
|
|
5590
|
+
connections: external_exports.number(),
|
|
5591
|
+
uniqueCriteria: external_exports.array(external_exports.string()).optional(),
|
|
5592
|
+
serviceName: external_exports.string(),
|
|
5593
|
+
catalogs: external_exports.array(companyCatalogSchema),
|
|
5594
|
+
application: external_exports.array(applicationTypeSchema).optional()
|
|
5595
|
+
});
|
|
5596
|
+
|
|
5515
5597
|
// lib/companies/index.ts
|
|
5516
5598
|
var BASE_URL16 = "v3/companys";
|
|
5517
5599
|
|
|
@@ -5524,8 +5606,27 @@ function createCompaniesApiHandlers(client) {
|
|
|
5524
5606
|
return import_msw16.http.get(`${client.getBaseUrl()}${BASE_URL16}/brief`, resolver);
|
|
5525
5607
|
}
|
|
5526
5608
|
getCompanyBriefInfoByOrg.generateData = () => (0, import_zod_mock15.generateMock)(companyBriefByOrgSchema);
|
|
5609
|
+
function companySearch(resolver = (_info) => {
|
|
5610
|
+
const data = Array.from(
|
|
5611
|
+
{ length: 3 },
|
|
5612
|
+
() => (0, import_zod_mock15.generateMock)(companySearchSchema)
|
|
5613
|
+
);
|
|
5614
|
+
return import_msw16.HttpResponse.json(data);
|
|
5615
|
+
}) {
|
|
5616
|
+
return import_msw16.http.get(`${client.getBaseUrl()}${BASE_URL16}/search`, resolver);
|
|
5617
|
+
}
|
|
5618
|
+
companySearch.generateData = () => Array.from({ length: 3 }, () => (0, import_zod_mock15.generateMock)(companySearchSchema));
|
|
5619
|
+
function getCompanyById(resolver = (_info) => {
|
|
5620
|
+
const data = (0, import_zod_mock15.generateMock)(companySchema);
|
|
5621
|
+
return import_msw16.HttpResponse.json(data);
|
|
5622
|
+
}) {
|
|
5623
|
+
return import_msw16.http.get(`${client.getBaseUrl()}${BASE_URL16}/:companyId`, resolver);
|
|
5624
|
+
}
|
|
5625
|
+
getCompanyById.generateData = () => (0, import_zod_mock15.generateMock)(companySchema);
|
|
5527
5626
|
return {
|
|
5528
|
-
getCompanyBriefInfoByOrg
|
|
5627
|
+
getCompanyBriefInfoByOrg,
|
|
5628
|
+
companySearch,
|
|
5629
|
+
getCompanyById
|
|
5529
5630
|
};
|
|
5530
5631
|
}
|
|
5531
5632
|
|
package/dist/msw.d.cts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
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, C as CompanyBriefByOrg } from './SpsItemIdResponse-
|
|
3
|
+
import { A as AsstClient, I as ItemHierarchyResponse, S as SpsItemIdResponse, C as CompanyBriefByOrg } from './SpsItemIdResponse-BEq6yqtR.cjs';
|
|
4
4
|
import { z } from 'zod';
|
|
5
|
+
import { C as CompanySearch, a as Company } from './CompanySearch-T6HJx4a6.cjs';
|
|
5
6
|
import 'ky';
|
|
6
7
|
|
|
7
8
|
/**
|
|
@@ -31,9 +32,9 @@ declare function createImportsApiHandlers(client: AsstClient): {
|
|
|
31
32
|
count: number;
|
|
32
33
|
imports: {
|
|
33
34
|
status: string;
|
|
35
|
+
name: string;
|
|
34
36
|
errorCount: number;
|
|
35
37
|
importId: number;
|
|
36
|
-
name: string;
|
|
37
38
|
uploadedAt: string;
|
|
38
39
|
completedAt?: number | null | undefined;
|
|
39
40
|
startedAt?: string | null | undefined;
|
|
@@ -45,9 +46,9 @@ declare function createImportsApiHandlers(client: AsstClient): {
|
|
|
45
46
|
generateData(): {
|
|
46
47
|
status: "QUEUED_FOR_IMPORT" | "IN_PROGRESS" | "DOC_FAILED" | "VALIDATION_FAILED" | "COMPLETED";
|
|
47
48
|
importId: number;
|
|
49
|
+
name?: string | null | undefined;
|
|
48
50
|
completedAt?: string | null | undefined;
|
|
49
51
|
errorCount?: number | null | undefined;
|
|
50
|
-
name?: string | null | undefined;
|
|
51
52
|
docInEventId?: string | null | undefined;
|
|
52
53
|
invalidItemCount?: number | null | undefined;
|
|
53
54
|
totalItemCount?: number | null | undefined;
|
|
@@ -78,14 +79,14 @@ declare function createCategoriesApiHandlers(client: AsstClient): {
|
|
|
78
79
|
count: number;
|
|
79
80
|
data: {
|
|
80
81
|
type: "CATALOG" | "SELECTION_CODE" | "PRODUCT_CODE" | "EXPORT";
|
|
81
|
-
name: string;
|
|
82
82
|
companyId: number;
|
|
83
|
+
name: string;
|
|
83
84
|
categoryid: number;
|
|
84
85
|
encodedCategoryId: string;
|
|
85
86
|
isActive: number;
|
|
86
87
|
typeId: number;
|
|
87
|
-
description?: string | null | undefined;
|
|
88
88
|
createdDate?: number | null | undefined;
|
|
89
|
+
description?: string | null | undefined;
|
|
89
90
|
categorytimestamp?: number | null | undefined;
|
|
90
91
|
categorykey?: string | null | undefined;
|
|
91
92
|
categoryCatalogName?: string | null | undefined;
|
|
@@ -105,16 +106,16 @@ declare function createCategoriesApiHandlers(client: AsstClient): {
|
|
|
105
106
|
searchCatalogsByCompany: {
|
|
106
107
|
(resolver?: ResponseResolver): msw.HttpHandler;
|
|
107
108
|
generateData(): {
|
|
109
|
+
createdAt: string;
|
|
110
|
+
modifiedAt: string;
|
|
111
|
+
createdBy: string;
|
|
112
|
+
modifiedBy: string;
|
|
108
113
|
categoryId: number;
|
|
109
114
|
categoryName: string;
|
|
110
115
|
categoryDescription: string;
|
|
111
116
|
categoryDescriptionExt: string;
|
|
112
117
|
ownerCompanyId: string;
|
|
113
118
|
categoryTypeId: number;
|
|
114
|
-
createdAt: string;
|
|
115
|
-
modifiedAt: string;
|
|
116
|
-
createdBy: string;
|
|
117
|
-
modifiedBy: string;
|
|
118
119
|
}[];
|
|
119
120
|
};
|
|
120
121
|
};
|
|
@@ -142,9 +143,9 @@ declare function createProductTypesApiHandlers(client: AsstClient): {
|
|
|
142
143
|
next: string;
|
|
143
144
|
previous: string;
|
|
144
145
|
results: {
|
|
145
|
-
description: string;
|
|
146
|
-
createdDate: number;
|
|
147
146
|
createdBy: string;
|
|
147
|
+
createdDate: number;
|
|
148
|
+
description: string;
|
|
148
149
|
attrProdTypeId: number;
|
|
149
150
|
productType: string;
|
|
150
151
|
modifiedBy?: string | undefined;
|
|
@@ -164,11 +165,7 @@ declare function createTradingPartnerAccessApiHandlers(client: AsstClient): {
|
|
|
164
165
|
getAllTradingPartners: {
|
|
165
166
|
(resolver?: ResponseResolver): msw.HttpHandler;
|
|
166
167
|
generateData(): {
|
|
167
|
-
count: number;
|
|
168
168
|
companyId: number;
|
|
169
|
-
companyType: string;
|
|
170
|
-
identityOrgId: string;
|
|
171
|
-
companyName: string;
|
|
172
169
|
connections: {
|
|
173
170
|
catalog_id: number;
|
|
174
171
|
catalog_name: string | null;
|
|
@@ -176,18 +173,22 @@ declare function createTradingPartnerAccessApiHandlers(client: AsstClient): {
|
|
|
176
173
|
partner_company_id: number;
|
|
177
174
|
partner_org_id: string;
|
|
178
175
|
}[];
|
|
176
|
+
count: number;
|
|
177
|
+
companyType: string;
|
|
178
|
+
identityOrgId: string;
|
|
179
|
+
companyName: string;
|
|
179
180
|
};
|
|
180
181
|
};
|
|
181
182
|
upsertRelationship: {
|
|
182
183
|
(resolver?: ResponseResolver): msw.HttpHandler;
|
|
183
184
|
generateData(): {
|
|
184
|
-
isActive: number;
|
|
185
|
-
createdDate: string;
|
|
186
185
|
catalogId: number;
|
|
186
|
+
itemPartnerId: number;
|
|
187
|
+
createdDate: string;
|
|
187
188
|
modifiedDate: string;
|
|
189
|
+
isActive: number;
|
|
188
190
|
retailerId: number;
|
|
189
191
|
supplierId: number;
|
|
190
|
-
itemPartnerId: number;
|
|
191
192
|
applications: ("ASSORTMENT" | "ITEM-XREF" | "TEST-ORDER-GENERATOR")[];
|
|
192
193
|
};
|
|
193
194
|
};
|
|
@@ -215,8 +216,9 @@ declare function createWhoAmIApiHandlers(client: AsstClient): {
|
|
|
215
216
|
whoAmI: {
|
|
216
217
|
(resolver?: ResponseResolver): msw.HttpHandler;
|
|
217
218
|
generateData(): {
|
|
218
|
-
name: string;
|
|
219
219
|
companyId: number;
|
|
220
|
+
name: string;
|
|
221
|
+
uniqueAttributes: string[];
|
|
220
222
|
companyName: string;
|
|
221
223
|
identityUser: {
|
|
222
224
|
name: string;
|
|
@@ -277,7 +279,6 @@ declare function createWhoAmIApiHandlers(client: AsstClient): {
|
|
|
277
279
|
serviceId: number;
|
|
278
280
|
identityServiceId: number;
|
|
279
281
|
};
|
|
280
|
-
uniqueAttributes: string[];
|
|
281
282
|
admin: boolean;
|
|
282
283
|
adminToolUser: boolean;
|
|
283
284
|
attributeRegistryAdmin: boolean;
|
|
@@ -460,22 +461,22 @@ declare function createItemsApiHandlers(client: AsstClient): {
|
|
|
460
461
|
type: "CATALOG" | "SELECTION_CODE" | "PRODUCT_CODE" | "EXPORT" | "ALIAS" | "LEGACY_PRODUCT_TYPE" | "PRODUCT_CLASSIFICATION" | "TAG" | "TAXONOMY_ROOT";
|
|
461
462
|
name: string;
|
|
462
463
|
id: number;
|
|
463
|
-
description?: string | null | undefined;
|
|
464
464
|
companyId?: number | null | undefined;
|
|
465
|
+
description?: string | null | undefined;
|
|
465
466
|
}[];
|
|
466
467
|
selectionCodes: {
|
|
467
468
|
type: "CATALOG" | "SELECTION_CODE" | "PRODUCT_CODE" | "EXPORT" | "ALIAS" | "LEGACY_PRODUCT_TYPE" | "PRODUCT_CLASSIFICATION" | "TAG" | "TAXONOMY_ROOT";
|
|
468
469
|
name: string;
|
|
469
470
|
id: number;
|
|
470
|
-
description?: string | null | undefined;
|
|
471
471
|
companyId?: number | null | undefined;
|
|
472
|
+
description?: string | null | undefined;
|
|
472
473
|
}[];
|
|
473
474
|
productCodes: {
|
|
474
475
|
type: "CATALOG" | "SELECTION_CODE" | "PRODUCT_CODE" | "EXPORT" | "ALIAS" | "LEGACY_PRODUCT_TYPE" | "PRODUCT_CLASSIFICATION" | "TAG" | "TAXONOMY_ROOT";
|
|
475
476
|
name: string;
|
|
476
477
|
id: number;
|
|
477
|
-
description?: string | null | undefined;
|
|
478
478
|
companyId?: number | null | undefined;
|
|
479
|
+
description?: string | null | undefined;
|
|
479
480
|
}[];
|
|
480
481
|
};
|
|
481
482
|
groupedAttributes: {
|
|
@@ -542,22 +543,22 @@ declare function createItemsApiHandlers(client: AsstClient): {
|
|
|
542
543
|
}[];
|
|
543
544
|
childComponentDetails: {
|
|
544
545
|
valid: boolean;
|
|
545
|
-
itemInfoId: number;
|
|
546
|
-
saleable: boolean;
|
|
547
546
|
uniqueCriteria: {
|
|
548
547
|
value: string;
|
|
549
548
|
name: string;
|
|
550
549
|
}[];
|
|
550
|
+
itemInfoId: number;
|
|
551
|
+
saleable: boolean;
|
|
551
552
|
description?: string | null | undefined;
|
|
552
553
|
}[];
|
|
553
554
|
parentComponentDetails: {
|
|
554
555
|
valid: boolean;
|
|
555
|
-
itemInfoId: number;
|
|
556
|
-
saleable: boolean;
|
|
557
556
|
uniqueCriteria: {
|
|
558
557
|
value: string;
|
|
559
558
|
name: string;
|
|
560
559
|
}[];
|
|
560
|
+
itemInfoId: number;
|
|
561
|
+
saleable: boolean;
|
|
561
562
|
description?: string | null | undefined;
|
|
562
563
|
}[];
|
|
563
564
|
locales: string[];
|
|
@@ -684,13 +685,82 @@ declare function createCompaniesApiHandlers(client: AsstClient): {
|
|
|
684
685
|
getCompanyBriefInfoByOrg: {
|
|
685
686
|
(resolver?: HttpResponseResolver<never, never, CompanyBriefByOrg>): msw.HttpHandler;
|
|
686
687
|
generateData(): {
|
|
687
|
-
name: string;
|
|
688
688
|
companyId: number;
|
|
689
|
+
name: string;
|
|
689
690
|
orgId: string;
|
|
690
691
|
companyTypes: ("SUPPLIER" | "RETAILER")[];
|
|
691
692
|
dc4Id: number;
|
|
692
693
|
};
|
|
693
694
|
};
|
|
695
|
+
companySearch: {
|
|
696
|
+
(resolver?: HttpResponseResolver<never, never, CompanySearch[]>): msw.HttpHandler;
|
|
697
|
+
generateData(): {
|
|
698
|
+
id: string;
|
|
699
|
+
organizationName: string;
|
|
700
|
+
description: string;
|
|
701
|
+
roles: ("SUPPLIER" | "RETAILER")[];
|
|
702
|
+
connections: number;
|
|
703
|
+
serviceName: string;
|
|
704
|
+
catalogs: {
|
|
705
|
+
categoryId: number;
|
|
706
|
+
categoryName: string;
|
|
707
|
+
}[];
|
|
708
|
+
orgId?: string | undefined;
|
|
709
|
+
application?: ("ASSORTMENT" | "ITEM-XREF" | "TEST-ORDER-GENERATOR")[] | undefined;
|
|
710
|
+
uniqueCriteria?: string[] | undefined;
|
|
711
|
+
}[];
|
|
712
|
+
};
|
|
713
|
+
getCompanyById: {
|
|
714
|
+
(resolver?: HttpResponseResolver<{
|
|
715
|
+
companyId: string;
|
|
716
|
+
}, never, Company>): msw.HttpHandler;
|
|
717
|
+
generateData(): {
|
|
718
|
+
companyId: number;
|
|
719
|
+
name: string;
|
|
720
|
+
companyTypes: ("SUPPLIER" | "RETAILER")[];
|
|
721
|
+
active: boolean;
|
|
722
|
+
createdAt: number | null;
|
|
723
|
+
modifiedAt: number | null;
|
|
724
|
+
features: {
|
|
725
|
+
type: string;
|
|
726
|
+
active: boolean;
|
|
727
|
+
createdBy: string | null;
|
|
728
|
+
createdDate: number | null;
|
|
729
|
+
display: string;
|
|
730
|
+
modifiedBy: string | null;
|
|
731
|
+
modifiedDate: number | null;
|
|
732
|
+
}[];
|
|
733
|
+
identity: {
|
|
734
|
+
orgId: string | null;
|
|
735
|
+
service: {
|
|
736
|
+
name: string;
|
|
737
|
+
} | null;
|
|
738
|
+
};
|
|
739
|
+
relationships: {
|
|
740
|
+
application: {
|
|
741
|
+
application: "ASSORTMENT" | "ITEM-XREF" | "TEST-ORDER-GENERATOR";
|
|
742
|
+
relationshipApplicationId: number;
|
|
743
|
+
}[];
|
|
744
|
+
active: boolean;
|
|
745
|
+
catalog: {
|
|
746
|
+
active: boolean;
|
|
747
|
+
catalogId: number;
|
|
748
|
+
itemPartnerId: number;
|
|
749
|
+
}[];
|
|
750
|
+
company: {
|
|
751
|
+
companyId: number;
|
|
752
|
+
name: string;
|
|
753
|
+
orgId: string;
|
|
754
|
+
companyTypes: ("SUPPLIER" | "RETAILER")[];
|
|
755
|
+
dc4Id: number | null;
|
|
756
|
+
};
|
|
757
|
+
createdAt: number;
|
|
758
|
+
modifiedAt: number | null;
|
|
759
|
+
relationshipId: number;
|
|
760
|
+
}[];
|
|
761
|
+
uniqueAttributes: string[];
|
|
762
|
+
};
|
|
763
|
+
};
|
|
694
764
|
};
|
|
695
765
|
|
|
696
766
|
/**
|