@spscommerce/asst-api 0.0.1-beta.8 → 0.0.1
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/{ItemErrorDetailsResult-c12c4eac.d.ts → ItemErrorDetailsResult-317fbe3e.d.ts} +368 -298
- package/dist/ItemStatusResponse-7f871d5a.d.ts +91 -0
- package/dist/{chunk-3JRE7YYE.js → chunk-HEFVXX2V.js} +86 -27
- package/dist/{chunk-OVOZIZA2.js → chunk-HG7MCO42.js} +81 -18
- package/dist/index.cjs +156 -42
- package/dist/index.d.ts +119 -6
- package/dist/index.js +4 -2
- package/dist/msw.cjs +162 -33
- package/dist/msw.d.ts +118 -61
- package/dist/msw.js +82 -11
- package/dist/{ItemErrorDetails-1614b511.d.ts → zod-1c4396f8.d.ts} +377 -241
- package/dist/zod.cjs +88 -26
- package/dist/zod.d.ts +2 -2
- package/dist/zod.js +9 -1
- package/package.json +1 -1
package/dist/msw.cjs
CHANGED
|
@@ -35,6 +35,7 @@ __export(msw_exports, {
|
|
|
35
35
|
createCompanyFeaturesApiHandlers: () => createCompanyFeaturesApiHandlers,
|
|
36
36
|
createErrorsApiHandlers: () => createErrorsApiHandlers,
|
|
37
37
|
createExportsApiHandlers: () => createExportsApiHandlers,
|
|
38
|
+
createFeatureFlagsApiHandlers: () => createFeatureFlagsApiHandlers,
|
|
38
39
|
createImportsApiHandlers: () => createImportsApiHandlers,
|
|
39
40
|
createItemsApiHandlers: () => createItemsApiHandlers,
|
|
40
41
|
createLocaleApiHandlers: () => createLocaleApiHandlers,
|
|
@@ -2661,8 +2662,8 @@ var ZodTuple = class extends ZodType {
|
|
|
2661
2662
|
});
|
|
2662
2663
|
return INVALID;
|
|
2663
2664
|
}
|
|
2664
|
-
const
|
|
2665
|
-
if (!
|
|
2665
|
+
const rest14 = this._def.rest;
|
|
2666
|
+
if (!rest14 && ctx.data.length > this._def.items.length) {
|
|
2666
2667
|
addIssueToContext(ctx, {
|
|
2667
2668
|
code: ZodIssueCode.too_big,
|
|
2668
2669
|
maximum: this._def.items.length,
|
|
@@ -2689,10 +2690,10 @@ var ZodTuple = class extends ZodType {
|
|
|
2689
2690
|
get items() {
|
|
2690
2691
|
return this._def.items;
|
|
2691
2692
|
}
|
|
2692
|
-
rest(
|
|
2693
|
+
rest(rest14) {
|
|
2693
2694
|
return new ZodTuple({
|
|
2694
2695
|
...this._def,
|
|
2695
|
-
rest:
|
|
2696
|
+
rest: rest14
|
|
2696
2697
|
});
|
|
2697
2698
|
}
|
|
2698
2699
|
};
|
|
@@ -3872,6 +3873,7 @@ var import_msw2 = require("msw");
|
|
|
3872
3873
|
// lib/categories/models/ItemCategory.ts
|
|
3873
3874
|
var itemCategorySchema = z.object({
|
|
3874
3875
|
categoryid: z.number(),
|
|
3876
|
+
encodedCategoryId: z.string(),
|
|
3875
3877
|
companyId: z.number(),
|
|
3876
3878
|
name: z.string(),
|
|
3877
3879
|
isActive: z.number(),
|
|
@@ -3890,6 +3892,30 @@ var itemCategoriesSearchSchema = z.object({
|
|
|
3890
3892
|
data: z.array(itemCategorySchema)
|
|
3891
3893
|
});
|
|
3892
3894
|
|
|
3895
|
+
// lib/categories/models/Hierarchy.ts
|
|
3896
|
+
var baseHierarchySchema = z.object({
|
|
3897
|
+
id: z.string(),
|
|
3898
|
+
name: z.string().nullish(),
|
|
3899
|
+
description: z.string().nullish(),
|
|
3900
|
+
type: z.string().nullish()
|
|
3901
|
+
});
|
|
3902
|
+
var hierarchySchema = baseHierarchySchema.extend(
|
|
3903
|
+
{
|
|
3904
|
+
child: z.lazy(() => hierarchySchema).nullable()
|
|
3905
|
+
}
|
|
3906
|
+
);
|
|
3907
|
+
|
|
3908
|
+
// lib/categories/models/ItemHierarchy.ts
|
|
3909
|
+
var itemHierarchySchema = z.object({
|
|
3910
|
+
itemId: z.string(),
|
|
3911
|
+
hierarchies: z.array(hierarchySchema)
|
|
3912
|
+
});
|
|
3913
|
+
|
|
3914
|
+
// lib/categories/models/ItemHierarchyResponse.ts
|
|
3915
|
+
var itemHierarchyResponseSchema = z.object({
|
|
3916
|
+
itemHierarchies: z.array(itemHierarchySchema)
|
|
3917
|
+
});
|
|
3918
|
+
|
|
3893
3919
|
// lib/categories/index.ts
|
|
3894
3920
|
var BASE_URL2 = "categories";
|
|
3895
3921
|
|
|
@@ -4004,9 +4030,10 @@ var import_msw5 = require("msw");
|
|
|
4004
4030
|
// lib/tradingPartners/models/Connection.ts
|
|
4005
4031
|
var connectionSchema = z.object({
|
|
4006
4032
|
catalog_id: z.number(),
|
|
4007
|
-
catalog_name: z.string(),
|
|
4033
|
+
catalog_name: z.string().nullable(),
|
|
4008
4034
|
partner_company_name: z.string(),
|
|
4009
|
-
partner_company_id: z.number()
|
|
4035
|
+
partner_company_id: z.number(),
|
|
4036
|
+
partner_org_id: z.string()
|
|
4010
4037
|
});
|
|
4011
4038
|
|
|
4012
4039
|
// lib/tradingPartners/models/TradingPartnerAccessByCompanyId.ts
|
|
@@ -4059,9 +4086,9 @@ var identityServiceOrganizationMetadataSchema = z.object({
|
|
|
4059
4086
|
|
|
4060
4087
|
// lib/whoami/models/IdentityServiceOrganization.ts
|
|
4061
4088
|
var identityServiceOrganizationSchema = z.object({
|
|
4062
|
-
organization_name: z.string(),
|
|
4063
|
-
organization_site: z.string(),
|
|
4064
|
-
namespace: z.string(),
|
|
4089
|
+
organization_name: z.string().optional(),
|
|
4090
|
+
organization_site: z.string().optional(),
|
|
4091
|
+
namespace: z.string().optional(),
|
|
4065
4092
|
id: z.string(),
|
|
4066
4093
|
permissions: z.array(z.string()).optional(),
|
|
4067
4094
|
metadata: identityServiceOrganizationMetadataSchema.optional()
|
|
@@ -4079,26 +4106,26 @@ var identityServicePreferencesSchema = z.object({
|
|
|
4079
4106
|
// lib/whoami/models/IdentityServiceUser.ts
|
|
4080
4107
|
var identityServiceUserSchema = z.object({
|
|
4081
4108
|
id: z.string(),
|
|
4082
|
-
email: z.string(),
|
|
4083
|
-
first_name: z.string(),
|
|
4084
|
-
last_name: z.string(),
|
|
4085
|
-
job_title: z.string(),
|
|
4086
|
-
externally_managed: z.boolean(),
|
|
4087
|
-
city: z.string(),
|
|
4109
|
+
email: z.string().optional(),
|
|
4110
|
+
first_name: z.string().optional(),
|
|
4111
|
+
last_name: z.string().optional(),
|
|
4112
|
+
job_title: z.string().optional(),
|
|
4113
|
+
externally_managed: z.boolean().optional(),
|
|
4114
|
+
city: z.string().optional(),
|
|
4088
4115
|
name: z.string(),
|
|
4089
|
-
state: z.string(),
|
|
4090
|
-
country: z.string(),
|
|
4091
|
-
user_type: z.string(),
|
|
4092
|
-
token_type: z.string(),
|
|
4093
|
-
avatar_image_id: z.string(),
|
|
4094
|
-
avatar_image_url: z.string(),
|
|
4095
|
-
origin_avatar_image_id: z.string(),
|
|
4096
|
-
bio: z.string(),
|
|
4097
|
-
phone_number: z.string(),
|
|
4098
|
-
twitter_handle: z.string(),
|
|
4099
|
-
linkedin_url: z.string(),
|
|
4116
|
+
state: z.string().optional(),
|
|
4117
|
+
country: z.string().optional(),
|
|
4118
|
+
user_type: z.string().optional(),
|
|
4119
|
+
token_type: z.string().optional(),
|
|
4120
|
+
avatar_image_id: z.string().optional(),
|
|
4121
|
+
avatar_image_url: z.string().optional(),
|
|
4122
|
+
origin_avatar_image_id: z.string().optional(),
|
|
4123
|
+
bio: z.string().optional(),
|
|
4124
|
+
phone_number: z.string().optional(),
|
|
4125
|
+
twitter_handle: z.string().optional(),
|
|
4126
|
+
linkedin_url: z.string().optional(),
|
|
4100
4127
|
description: z.string().optional(),
|
|
4101
|
-
preferences: identityServicePreferencesSchema,
|
|
4128
|
+
preferences: identityServicePreferencesSchema.optional(),
|
|
4102
4129
|
roles: z.array(z.string()),
|
|
4103
4130
|
organization: identityServiceOrganizationSchema,
|
|
4104
4131
|
password: z.string(),
|
|
@@ -4205,10 +4232,10 @@ var itemMapSchema = z.object({
|
|
|
4205
4232
|
consumeravailabledatestring: z.string().nullish(),
|
|
4206
4233
|
status: z.string().nullish(),
|
|
4207
4234
|
nrfcolorcode: z.array(z.string()).nullish(),
|
|
4208
|
-
nrfsizecode: z.string().nullish(),
|
|
4235
|
+
nrfsizecode: z.array(z.string()).nullish(),
|
|
4209
4236
|
productcolordescription: z.array(z.string()).nullish(),
|
|
4210
4237
|
productsizedescription: z.array(z.string()).nullish()
|
|
4211
|
-
});
|
|
4238
|
+
}).passthrough();
|
|
4212
4239
|
|
|
4213
4240
|
// lib/items/models/ItemTable.ts
|
|
4214
4241
|
var itemTableSchema = z.object({
|
|
@@ -4680,10 +4707,38 @@ var itemDetailSchema = z.object({
|
|
|
4680
4707
|
packs: z.array(packComponentSchema)
|
|
4681
4708
|
});
|
|
4682
4709
|
|
|
4710
|
+
// lib/items/models/SpsItemIdResponse.ts
|
|
4711
|
+
var spsItemIdResponseSchema = z.object({
|
|
4712
|
+
id: z.string(),
|
|
4713
|
+
ref: z.string()
|
|
4714
|
+
});
|
|
4715
|
+
|
|
4716
|
+
// lib/items/models/ItemOrgStatus.ts
|
|
4717
|
+
var itemOrgStatusSchema = z.object({
|
|
4718
|
+
org: z.object({
|
|
4719
|
+
ref: z.string(),
|
|
4720
|
+
id: z.string(),
|
|
4721
|
+
name: z.string()
|
|
4722
|
+
}),
|
|
4723
|
+
lowestInvalidStage: phaseEnumSchema.nullable(),
|
|
4724
|
+
validForRelationship: z.boolean()
|
|
4725
|
+
});
|
|
4726
|
+
|
|
4727
|
+
// lib/items/models/ItemStatus.ts
|
|
4728
|
+
var itemStatusSchema = z.object({
|
|
4729
|
+
itemId: z.string(),
|
|
4730
|
+
itemOrgStatuses: z.array(itemOrgStatusSchema)
|
|
4731
|
+
});
|
|
4732
|
+
|
|
4733
|
+
// lib/items/models/ItemStatusResponse.ts
|
|
4734
|
+
var itemStatusResponseSchema = z.object({
|
|
4735
|
+
itemStatuses: z.array(itemStatusSchema)
|
|
4736
|
+
});
|
|
4737
|
+
|
|
4683
4738
|
// lib/errors/models/ItemErrorDetails.ts
|
|
4684
4739
|
var itemErrorDetailsSchema = z.object({
|
|
4685
4740
|
errorMessage: z.string(),
|
|
4686
|
-
attributeName: z.string(),
|
|
4741
|
+
attributeName: z.string().nullable(),
|
|
4687
4742
|
tradingPartnerNames: z.array(z.string()),
|
|
4688
4743
|
phases: z.array(phaseEnumSchema),
|
|
4689
4744
|
attributeDbNames: z.array(z.string()),
|
|
@@ -4785,7 +4840,46 @@ function createItemsApiHandlers(client) {
|
|
|
4785
4840
|
}) {
|
|
4786
4841
|
return import_msw9.rest.post(`${client.getBaseUrl()}/${BASE_URL9}/items`, resolver);
|
|
4787
4842
|
}
|
|
4788
|
-
|
|
4843
|
+
function getItemInfoId(resolver = (_req, res, ctx) => {
|
|
4844
|
+
const data = (0, import_zod_mock8.generateMock)(z.number());
|
|
4845
|
+
return res(ctx.status(200), ctx.json(data));
|
|
4846
|
+
}) {
|
|
4847
|
+
return import_msw9.rest.get(
|
|
4848
|
+
`${client.getBaseUrl()}/${BASE_URL9}/:spsItemId/itemInfoId`,
|
|
4849
|
+
resolver
|
|
4850
|
+
);
|
|
4851
|
+
}
|
|
4852
|
+
getItemInfoId.generateData = () => (0, import_zod_mock8.generateMock)(z.number());
|
|
4853
|
+
function getSpsItemId(resolver = (_req, res, ctx) => {
|
|
4854
|
+
const data = (0, import_zod_mock8.generateMock)(z.string());
|
|
4855
|
+
return res(ctx.status(200), ctx.json(data));
|
|
4856
|
+
}) {
|
|
4857
|
+
return import_msw9.rest.get(
|
|
4858
|
+
`${client.getBaseUrl()}/${BASE_URL9}/:itemInfoId/spsItemId`,
|
|
4859
|
+
resolver
|
|
4860
|
+
);
|
|
4861
|
+
}
|
|
4862
|
+
getSpsItemId.generateData = () => (0, import_zod_mock8.generateMock)(z.string());
|
|
4863
|
+
function getItemStatus(resolver = (_req, res, ctx) => {
|
|
4864
|
+
const data = (0, import_zod_mock8.generateMock)(itemStatusResponseSchema);
|
|
4865
|
+
return res(ctx.status(200), ctx.json(data));
|
|
4866
|
+
}) {
|
|
4867
|
+
return import_msw9.rest.get(
|
|
4868
|
+
`${client.getBaseUrl()}/${BASE_URL9}/status`,
|
|
4869
|
+
resolver
|
|
4870
|
+
);
|
|
4871
|
+
}
|
|
4872
|
+
getItemStatus.generateData = () => (0, import_zod_mock8.generateMock)(itemStatusResponseSchema);
|
|
4873
|
+
return {
|
|
4874
|
+
searchItems,
|
|
4875
|
+
getItem,
|
|
4876
|
+
updateItem,
|
|
4877
|
+
deleteItem,
|
|
4878
|
+
deleteItems,
|
|
4879
|
+
getItemInfoId,
|
|
4880
|
+
getSpsItemId,
|
|
4881
|
+
getItemStatus
|
|
4882
|
+
};
|
|
4789
4883
|
}
|
|
4790
4884
|
|
|
4791
4885
|
// lib/attributes/mockHandlers.ts
|
|
@@ -4830,12 +4924,23 @@ function createAttributesApiHandlers(client) {
|
|
|
4830
4924
|
resolver
|
|
4831
4925
|
);
|
|
4832
4926
|
}
|
|
4833
|
-
getAttributeValidValues.generateData = () => (0, import_zod_mock9.generateMock)(
|
|
4927
|
+
getAttributeValidValues.generateData = () => (0, import_zod_mock9.generateMock)(attributeValidValuesSchema);
|
|
4928
|
+
function getCompanyInterestedAttributes(resolver = (_req, res, ctx) => {
|
|
4929
|
+
const data = (0, import_zod_mock9.generateMock)(z.array(z.string()));
|
|
4930
|
+
return res(ctx.status(200), ctx.json(data));
|
|
4931
|
+
}) {
|
|
4932
|
+
return import_msw10.rest.get(
|
|
4933
|
+
`${client.getBaseUrl()}/${BASE_URL10}/company/interested-attributes`,
|
|
4934
|
+
resolver
|
|
4935
|
+
);
|
|
4936
|
+
}
|
|
4937
|
+
getCompanyInterestedAttributes.generateData = () => (0, import_zod_mock9.generateMock)(z.array(z.string()));
|
|
4834
4938
|
return {
|
|
4835
4939
|
getAllAttributes,
|
|
4836
4940
|
getAllAttributesByCompany,
|
|
4837
4941
|
getAttributesExtensiveInfo,
|
|
4838
|
-
getAttributeValidValues
|
|
4942
|
+
getAttributeValidValues,
|
|
4943
|
+
getCompanyInterestedAttributes
|
|
4839
4944
|
};
|
|
4840
4945
|
}
|
|
4841
4946
|
|
|
@@ -4882,6 +4987,29 @@ function createCompanyFeaturesApiHandlers(client) {
|
|
|
4882
4987
|
checkIfStageItemSetupIsEnabled
|
|
4883
4988
|
};
|
|
4884
4989
|
}
|
|
4990
|
+
|
|
4991
|
+
// lib/featureFlags/mockHandlers.ts
|
|
4992
|
+
var import_zod_mock12 = require("@anatine/zod-mock");
|
|
4993
|
+
var import_msw13 = require("msw");
|
|
4994
|
+
|
|
4995
|
+
// lib/featureFlags/index.ts
|
|
4996
|
+
var BASE_URL13 = "feature-flag";
|
|
4997
|
+
|
|
4998
|
+
// lib/featureFlags/mockHandlers.ts
|
|
4999
|
+
function createFeatureFlagsApiHandlers(client) {
|
|
5000
|
+
function checkEnableItemsApiEndpointsForImports(resolver = (_req, res, ctx) => {
|
|
5001
|
+
const data = (0, import_zod_mock12.generateMock)(z.boolean());
|
|
5002
|
+
return res(ctx.status(200), ctx.json(data));
|
|
5003
|
+
}) {
|
|
5004
|
+
return import_msw13.rest.get(
|
|
5005
|
+
`${client.getBaseUrl()}/${BASE_URL13}/enable-items-api-endpoints-for-imports/`,
|
|
5006
|
+
resolver
|
|
5007
|
+
);
|
|
5008
|
+
}
|
|
5009
|
+
return {
|
|
5010
|
+
checkEnableItemsApiEndpointsForImports
|
|
5011
|
+
};
|
|
5012
|
+
}
|
|
4885
5013
|
// Annotate the CommonJS export names for ESM import in node:
|
|
4886
5014
|
0 && (module.exports = {
|
|
4887
5015
|
createAttributesApiHandlers,
|
|
@@ -4889,6 +5017,7 @@ function createCompanyFeaturesApiHandlers(client) {
|
|
|
4889
5017
|
createCompanyFeaturesApiHandlers,
|
|
4890
5018
|
createErrorsApiHandlers,
|
|
4891
5019
|
createExportsApiHandlers,
|
|
5020
|
+
createFeatureFlagsApiHandlers,
|
|
4892
5021
|
createImportsApiHandlers,
|
|
4893
5022
|
createItemsApiHandlers,
|
|
4894
5023
|
createLocaleApiHandlers,
|
package/dist/msw.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as msw from 'msw';
|
|
2
2
|
import { ResponseResolver, RestRequest, RestContext, DefaultBodyType } from 'msw';
|
|
3
3
|
import * as msw_lib_glossary_de6278a9 from 'msw/lib/glossary-de6278a9';
|
|
4
|
-
import { A as AsstClient,
|
|
4
|
+
import { A as AsstClient, I as ImportErrors, a as Import, b as ImportsStatus, V as VendorPartnerAttGroups, c as ItemCategoriesSearch, E as Export, d as attrProdTypeSchema, T as TradingPartnerAccessByCompanyId, U as UserAccount, e as ItemErrorDetailsResult, L as Locale, f as ItemSearchView, g as ItemDetailView, h as AttributeMetaData, i as AttributesByCompany, j as AttributeDefinition, k as AttributeValidValues, S as SpreadsheetTemplate } from './ItemErrorDetailsResult-317fbe3e.js';
|
|
5
5
|
import { z } from 'zod';
|
|
6
|
+
import { I as ItemStatusResponse } from './ItemStatusResponse-7f871d5a.js';
|
|
6
7
|
import 'ky-universal';
|
|
7
8
|
import 'ky';
|
|
8
9
|
|
|
@@ -107,6 +108,7 @@ declare function createCategoriesApiHandlers(client: AsstClient): {
|
|
|
107
108
|
type: string;
|
|
108
109
|
name: string;
|
|
109
110
|
categoryid: number;
|
|
111
|
+
encodedCategoryId: string;
|
|
110
112
|
companyId: number;
|
|
111
113
|
isActive: number;
|
|
112
114
|
typeId: number;
|
|
@@ -175,9 +177,10 @@ declare function createTradingPartnerAccessApiHandlers(client: AsstClient): {
|
|
|
175
177
|
companyName: string;
|
|
176
178
|
connections: {
|
|
177
179
|
catalog_id: number;
|
|
178
|
-
catalog_name: string;
|
|
180
|
+
catalog_name: string | null;
|
|
179
181
|
partner_company_name: string;
|
|
180
182
|
partner_company_id: number;
|
|
183
|
+
partner_org_id: string;
|
|
181
184
|
}[];
|
|
182
185
|
};
|
|
183
186
|
};
|
|
@@ -198,43 +201,12 @@ declare function createWhoAmIApiHandlers(client: AsstClient): {
|
|
|
198
201
|
identityUser: {
|
|
199
202
|
name: string;
|
|
200
203
|
id: string;
|
|
201
|
-
email: string;
|
|
202
|
-
first_name: string;
|
|
203
|
-
last_name: string;
|
|
204
|
-
job_title: string;
|
|
205
|
-
externally_managed: boolean;
|
|
206
|
-
city: string;
|
|
207
|
-
state: string;
|
|
208
|
-
country: string;
|
|
209
|
-
user_type: string;
|
|
210
|
-
token_type: string;
|
|
211
|
-
avatar_image_id: string;
|
|
212
|
-
avatar_image_url: string;
|
|
213
|
-
origin_avatar_image_id: string;
|
|
214
|
-
bio: string;
|
|
215
|
-
phone_number: string;
|
|
216
|
-
twitter_handle: string;
|
|
217
|
-
linkedin_url: string;
|
|
218
|
-
preferences: {
|
|
219
|
-
locale: string;
|
|
220
|
-
timezone: string;
|
|
221
|
-
language: string[];
|
|
222
|
-
datetime: {
|
|
223
|
-
DATE_TIME: string;
|
|
224
|
-
TIME: string;
|
|
225
|
-
SHORT_DATE: string;
|
|
226
|
-
LONG_DATETIME: string;
|
|
227
|
-
LONG_TIME: string;
|
|
228
|
-
DATE: string;
|
|
229
|
-
};
|
|
230
|
-
cpUpgrade?: string | undefined;
|
|
231
|
-
};
|
|
232
204
|
roles: string[];
|
|
233
205
|
organization: {
|
|
234
|
-
namespace: string;
|
|
235
|
-
organization_name: string;
|
|
236
|
-
organization_site: string;
|
|
237
206
|
id: string;
|
|
207
|
+
organization_name?: string | undefined;
|
|
208
|
+
organization_site?: string | undefined;
|
|
209
|
+
namespace?: string | undefined;
|
|
238
210
|
permissions?: string[] | undefined;
|
|
239
211
|
metadata?: {
|
|
240
212
|
value: string;
|
|
@@ -244,7 +216,38 @@ declare function createWhoAmIApiHandlers(client: AsstClient): {
|
|
|
244
216
|
};
|
|
245
217
|
password: string;
|
|
246
218
|
verified: boolean;
|
|
219
|
+
email?: string | undefined;
|
|
220
|
+
first_name?: string | undefined;
|
|
221
|
+
last_name?: string | undefined;
|
|
222
|
+
job_title?: string | undefined;
|
|
223
|
+
externally_managed?: boolean | undefined;
|
|
224
|
+
city?: string | undefined;
|
|
225
|
+
state?: string | undefined;
|
|
226
|
+
country?: string | undefined;
|
|
227
|
+
user_type?: string | undefined;
|
|
228
|
+
token_type?: string | undefined;
|
|
229
|
+
avatar_image_id?: string | undefined;
|
|
230
|
+
avatar_image_url?: string | undefined;
|
|
231
|
+
origin_avatar_image_id?: string | undefined;
|
|
232
|
+
bio?: string | undefined;
|
|
233
|
+
phone_number?: string | undefined;
|
|
234
|
+
twitter_handle?: string | undefined;
|
|
235
|
+
linkedin_url?: string | undefined;
|
|
247
236
|
description?: string | undefined;
|
|
237
|
+
preferences?: {
|
|
238
|
+
locale: string;
|
|
239
|
+
timezone: string;
|
|
240
|
+
language: string[];
|
|
241
|
+
datetime: {
|
|
242
|
+
DATE_TIME: string;
|
|
243
|
+
TIME: string;
|
|
244
|
+
SHORT_DATE: string;
|
|
245
|
+
LONG_DATETIME: string;
|
|
246
|
+
LONG_TIME: string;
|
|
247
|
+
DATE: string;
|
|
248
|
+
};
|
|
249
|
+
cpUpgrade?: string | undefined;
|
|
250
|
+
} | undefined;
|
|
248
251
|
};
|
|
249
252
|
retailer: boolean;
|
|
250
253
|
supplier: boolean;
|
|
@@ -287,7 +290,7 @@ declare function createErrorsApiHandlers(client: AsstClient): {
|
|
|
287
290
|
stage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
|
|
288
291
|
isValid: boolean;
|
|
289
292
|
}[];
|
|
290
|
-
attributeName: string;
|
|
293
|
+
attributeName: string | null;
|
|
291
294
|
errorMessage: string;
|
|
292
295
|
tradingPartnerNames: string[];
|
|
293
296
|
phases: ("CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS")[];
|
|
@@ -348,32 +351,42 @@ declare function createItemsApiHandlers(client: AsstClient): {
|
|
|
348
351
|
itemInfoId: string;
|
|
349
352
|
status?: string | undefined;
|
|
350
353
|
};
|
|
351
|
-
itemMaps: {
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
tradingPartnerStages
|
|
354
|
+
itemMaps: z.objectOutputType<{
|
|
355
|
+
rn: z.ZodOptional<z.ZodNumber>;
|
|
356
|
+
iteminfoid: z.ZodString;
|
|
357
|
+
tradingPartnerStages: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
358
|
+
companyId: z.ZodNumber;
|
|
359
|
+
companyName: z.ZodString;
|
|
360
|
+
stage: z.ZodNullable<z.ZodEnum<["CORE", "CORE_PLUS", "CORE_ADVANCED", "ENRICHED", "STANDARD_REQUIREMENTS"]>>;
|
|
361
|
+
isValid: z.ZodBoolean;
|
|
362
|
+
}, "strip", z.ZodTypeAny, {
|
|
355
363
|
companyId: number;
|
|
356
364
|
companyName: string;
|
|
357
365
|
stage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
|
|
358
366
|
isValid: boolean;
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
367
|
+
}, {
|
|
368
|
+
companyId: number;
|
|
369
|
+
companyName: string;
|
|
370
|
+
stage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
|
|
371
|
+
isValid: boolean;
|
|
372
|
+
}>, "many">>;
|
|
373
|
+
gtin: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
374
|
+
catalogname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
375
|
+
isbn: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
376
|
+
lastupdateddatestring: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
377
|
+
upc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
378
|
+
productcodename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
379
|
+
ean: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
380
|
+
selectioncodename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
381
|
+
createddatestring: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
382
|
+
partnumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
383
|
+
consumeravailabledatestring: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
384
|
+
status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
385
|
+
nrfcolorcode: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
386
|
+
nrfsizecode: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
387
|
+
productcolordescription: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
388
|
+
productsizedescription: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
389
|
+
}, z.ZodTypeAny, "passthrough">[];
|
|
377
390
|
};
|
|
378
391
|
};
|
|
379
392
|
};
|
|
@@ -507,6 +520,37 @@ declare function createItemsApiHandlers(client: AsstClient): {
|
|
|
507
520
|
deleteItems: (resolver?: ResponseResolver<RestRequest<never, {
|
|
508
521
|
itemIds: string[];
|
|
509
522
|
}>>) => msw.RestHandler<msw_lib_glossary_de6278a9.M<DefaultBodyType>>;
|
|
523
|
+
getItemInfoId: {
|
|
524
|
+
(resolver?: ResponseResolver<RestRequest<never, {
|
|
525
|
+
spsItemId: string;
|
|
526
|
+
}>, RestContext, number>): msw.RestHandler<msw_lib_glossary_de6278a9.M<DefaultBodyType>>;
|
|
527
|
+
generateData(): number;
|
|
528
|
+
};
|
|
529
|
+
getSpsItemId: {
|
|
530
|
+
(resolver?: ResponseResolver<RestRequest<never, {
|
|
531
|
+
itemInfoId: string;
|
|
532
|
+
}>, RestContext, string>): msw.RestHandler<msw_lib_glossary_de6278a9.M<DefaultBodyType>>;
|
|
533
|
+
generateData(): string;
|
|
534
|
+
};
|
|
535
|
+
getItemStatus: {
|
|
536
|
+
(resolver?: ResponseResolver<RestRequest<never, {
|
|
537
|
+
itemIds: string[];
|
|
538
|
+
}>, RestContext, ItemStatusResponse>): msw.RestHandler<msw_lib_glossary_de6278a9.M<DefaultBodyType>>;
|
|
539
|
+
generateData(): {
|
|
540
|
+
itemStatuses: {
|
|
541
|
+
itemId: string;
|
|
542
|
+
itemOrgStatuses: {
|
|
543
|
+
org: {
|
|
544
|
+
name: string;
|
|
545
|
+
id: string;
|
|
546
|
+
ref: string;
|
|
547
|
+
};
|
|
548
|
+
lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
|
|
549
|
+
validForRelationship: boolean;
|
|
550
|
+
}[];
|
|
551
|
+
}[];
|
|
552
|
+
};
|
|
553
|
+
};
|
|
510
554
|
};
|
|
511
555
|
|
|
512
556
|
/**
|
|
@@ -691,7 +735,11 @@ declare function createAttributesApiHandlers(client: AsstClient): {
|
|
|
691
735
|
isDefault: boolean;
|
|
692
736
|
attrKeyPair: string;
|
|
693
737
|
attrValueId: number;
|
|
694
|
-
}
|
|
738
|
+
};
|
|
739
|
+
};
|
|
740
|
+
getCompanyInterestedAttributes: {
|
|
741
|
+
(resolver?: ResponseResolver<RestRequest<never, never>, RestContext, string[]>): msw.RestHandler<msw_lib_glossary_de6278a9.M<DefaultBodyType>>;
|
|
742
|
+
generateData(): string[];
|
|
695
743
|
};
|
|
696
744
|
};
|
|
697
745
|
|
|
@@ -731,4 +779,13 @@ declare function createCompanyFeaturesApiHandlers(client: AsstClient): {
|
|
|
731
779
|
checkIfStageItemSetupIsEnabled: (resolver?: ResponseResolver<RestRequest<never>, RestContext, boolean>) => msw.RestHandler<msw_lib_glossary_de6278a9.M<msw_lib_glossary_de6278a9.h>>;
|
|
732
780
|
};
|
|
733
781
|
|
|
734
|
-
|
|
782
|
+
/**
|
|
783
|
+
* Generate collection of MSW request handlers for `Feature Flags Api`
|
|
784
|
+
* @param client Assortment Client instance
|
|
785
|
+
* @returns An object containing functions to generate MSW request handlers
|
|
786
|
+
*/
|
|
787
|
+
declare function createFeatureFlagsApiHandlers(client: AsstClient): {
|
|
788
|
+
checkEnableItemsApiEndpointsForImports: (resolver?: ResponseResolver<RestRequest<never>, RestContext, boolean>) => msw.RestHandler<msw_lib_glossary_de6278a9.M<msw_lib_glossary_de6278a9.h>>;
|
|
789
|
+
};
|
|
790
|
+
|
|
791
|
+
export { createAttributesApiHandlers, createCategoriesApiHandlers, createCompanyFeaturesApiHandlers, createErrorsApiHandlers, createExportsApiHandlers, createFeatureFlagsApiHandlers, createImportsApiHandlers, createItemsApiHandlers, createLocaleApiHandlers, createProductTypesApiHandlers, createSpreadsheetTemplateApiHandlers, createTradingPartnerAccessApiHandlers, createWhoAmIApiHandlers };
|