@spscommerce/asst-api 1.0.1 → 1.2.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-HsKxilwl.d.ts → CompanyBriefByOrg-57oGCtjK.d.ts} +276 -8
- package/dist/{chunk-HCQG42LN.js → chunk-27XV7TS2.js} +43 -6
- package/dist/{chunk-6FFDMMN5.js → chunk-CUVSWUIQ.js} +139 -3
- package/dist/{index-wuCGfJSu.d.ts → index-fgr_c5Wj.d.ts} +1 -1
- package/dist/index.cjs +173 -70
- package/dist/index.d.cts +32 -14
- package/dist/index.d.ts +32 -14
- package/dist/index.js +5 -65
- package/dist/msw.cjs +252 -89
- package/dist/msw.d.cts +49 -7
- package/dist/msw.d.ts +49 -7
- package/dist/msw.js +95 -63
- package/dist/{zod-9pZn6tpQ.d.ts → zod-zxqlYYMG.d.ts} +157 -2
- package/dist/zod.cjs +143 -3
- package/dist/zod.d.cts +2 -3
- package/dist/zod.d.ts +2 -3
- package/dist/zod.js +11 -1
- package/package.json +3 -3
package/dist/zod.cjs
CHANGED
|
@@ -73,7 +73,11 @@ __export(zod_exports, {
|
|
|
73
73
|
itemDetailSchema: () => itemDetailSchema,
|
|
74
74
|
itemDetailViewSchema: () => itemDetailViewSchema,
|
|
75
75
|
itemErrorDetailsResultSchema: () => itemErrorDetailsResultSchema,
|
|
76
|
+
itemErrorDetailsResultV2Schema: () => itemErrorDetailsResultV2Schema,
|
|
76
77
|
itemErrorDetailsSchema: () => itemErrorDetailsSchema,
|
|
78
|
+
itemErrorDetailsV2Schema: () => itemErrorDetailsV2Schema,
|
|
79
|
+
itemErrorSummaryResultV2Schema: () => itemErrorSummaryResultV2Schema,
|
|
80
|
+
itemErrorSummaryV2Schema: () => itemErrorSummaryV2Schema,
|
|
77
81
|
itemHeaderSchema: () => itemHeaderSchema,
|
|
78
82
|
itemHierarchyResponseSchema: () => itemHierarchyResponseSchema,
|
|
79
83
|
itemMapSchema: () => itemMapSchema,
|
|
@@ -94,6 +98,7 @@ __export(zod_exports, {
|
|
|
94
98
|
spsItemIdResponseSchema: () => spsItemIdResponseSchema,
|
|
95
99
|
tradingPartnerAccessByCompanyIdSchema: () => tradingPartnerAccessByCompanyIdSchema,
|
|
96
100
|
tradingPartnerStageSchema: () => tradingPartnerStageSchema,
|
|
101
|
+
tradingPartnerStageV2Schema: () => tradingPartnerStageV2Schema,
|
|
97
102
|
userAccountSchema: () => userAccountSchema,
|
|
98
103
|
vendorPartnerAttGroupsSchema: () => vendorPartnerAttGroupsSchema
|
|
99
104
|
});
|
|
@@ -4158,7 +4163,8 @@ var exportSchema = z.object({
|
|
|
4158
4163
|
spreadsheetTemplateId: z.optional(z.number()),
|
|
4159
4164
|
emailAddresses: z.optional(z.array(z.string())),
|
|
4160
4165
|
subjectLine: z.optional(z.string()),
|
|
4161
|
-
additionalLocales: z.optional(z.array(z.string()))
|
|
4166
|
+
additionalLocales: z.optional(z.array(z.string())),
|
|
4167
|
+
availableAttributeList: z.optional(z.array(z.string()))
|
|
4162
4168
|
});
|
|
4163
4169
|
|
|
4164
4170
|
// lib/exports/models/DownloadItemsParams.ts
|
|
@@ -4835,7 +4841,7 @@ var userAccountSchema = z.object({
|
|
|
4835
4841
|
attributeRegistryViewer: z.boolean()
|
|
4836
4842
|
});
|
|
4837
4843
|
|
|
4838
|
-
// lib/errors/models/ItemErrorDetails.ts
|
|
4844
|
+
// lib/errors/v1/models/ItemErrorDetails.ts
|
|
4839
4845
|
var itemErrorDetailsSchema = z.object({
|
|
4840
4846
|
errorMessage: z.string(),
|
|
4841
4847
|
attributeName: z.string().nullable(),
|
|
@@ -4846,7 +4852,7 @@ var itemErrorDetailsSchema = z.object({
|
|
|
4846
4852
|
repeatableGroupId: z.string().nullish()
|
|
4847
4853
|
});
|
|
4848
4854
|
|
|
4849
|
-
// lib/errors/models/ItemErrorDetailsResult.ts
|
|
4855
|
+
// lib/errors/v1/models/ItemErrorDetailsResult.ts
|
|
4850
4856
|
var itemErrorDetailsResultSchema = z.object({
|
|
4851
4857
|
itemInfoId: z.number(),
|
|
4852
4858
|
upc: z.string().nullish(),
|
|
@@ -4858,6 +4864,135 @@ var itemErrorDetailsResultSchema = z.object({
|
|
|
4858
4864
|
itemErrorDetails: z.array(itemErrorDetailsSchema)
|
|
4859
4865
|
});
|
|
4860
4866
|
|
|
4867
|
+
// lib/items/v2/models/Stage.ts
|
|
4868
|
+
var stageSchema = z.enum([
|
|
4869
|
+
"CORE",
|
|
4870
|
+
"CORE_PLUS",
|
|
4871
|
+
"CORE_ADVANCED",
|
|
4872
|
+
"ENRICHED"
|
|
4873
|
+
]);
|
|
4874
|
+
|
|
4875
|
+
// lib/items/v2/models/OrgSummary.ts
|
|
4876
|
+
var orgSummarySchema = z.object({
|
|
4877
|
+
ref: z.string(),
|
|
4878
|
+
id: z.string(),
|
|
4879
|
+
name: z.string()
|
|
4880
|
+
});
|
|
4881
|
+
|
|
4882
|
+
// lib/items/v2/models/ItemOrgStageDetails.ts
|
|
4883
|
+
var itemOrgStageDetailsSchema = z.object({
|
|
4884
|
+
/**
|
|
4885
|
+
* When called as retailer, the vendor, else when vendor, the retailer.
|
|
4886
|
+
* */
|
|
4887
|
+
orgSummary: orgSummarySchema,
|
|
4888
|
+
/**
|
|
4889
|
+
* The company id of the retailer or vendor used for matching ItemOrgStageDetails to TradingPartnerStage for ErrorService
|
|
4890
|
+
*/
|
|
4891
|
+
companyId: z.number().nullish(),
|
|
4892
|
+
/**
|
|
4893
|
+
* "Standard Requirements" (null) UNLESS the retailer of the item is MSIS Enabled
|
|
4894
|
+
* OTHERWISE the retailer default Stage UNLESS there's a currently active vendor-specific Stage defined
|
|
4895
|
+
* OTHERWISE the trading partnership Stage UNLESS there's a currently active Item Level override defined
|
|
4896
|
+
* OTHERWISE the item level override */
|
|
4897
|
+
stage: stageSchema.nullish(),
|
|
4898
|
+
/**
|
|
4899
|
+
* If the item is valid for the active stage. Note that for "Standard Requirements" or
|
|
4900
|
+
* "Enriched" this cam come directly from the item_doc table, but anything else requires validation
|
|
4901
|
+
*/
|
|
4902
|
+
isValid: z.boolean(),
|
|
4903
|
+
/**
|
|
4904
|
+
* Not null if there's an item level policy override for this trading partnership
|
|
4905
|
+
*/
|
|
4906
|
+
itemPolicyId: z.string().nullish(),
|
|
4907
|
+
/**
|
|
4908
|
+
* Start date for the Item level Stage if applicable
|
|
4909
|
+
*/
|
|
4910
|
+
startDate: z.number().transform((num) => new Date(num * 1e3)).nullish(),
|
|
4911
|
+
/**
|
|
4912
|
+
* End date for the Item level Stage if applicable
|
|
4913
|
+
*/
|
|
4914
|
+
endDate: z.number().transform((num) => new Date(num * 1e3)).nullish()
|
|
4915
|
+
});
|
|
4916
|
+
|
|
4917
|
+
// lib/items/v2/models/ItemStatusV2.ts
|
|
4918
|
+
var itemStatusV2Schema = z.object({
|
|
4919
|
+
itemId: z.string(),
|
|
4920
|
+
mostRestrictiveRetailerStage: stageSchema.nullable(),
|
|
4921
|
+
itemOrgStageDetails: z.array(itemOrgStageDetailsSchema)
|
|
4922
|
+
});
|
|
4923
|
+
|
|
4924
|
+
// lib/items/v2/models/ItemStatusV2Response.ts
|
|
4925
|
+
var itemStatusV2ResponseSchema = z.object({
|
|
4926
|
+
itemStatuses: z.array(itemStatusV2Schema)
|
|
4927
|
+
});
|
|
4928
|
+
|
|
4929
|
+
// lib/errors/v2/models/TradingPartnerStage.ts
|
|
4930
|
+
var tradingPartnerStageV2Schema = z.object({
|
|
4931
|
+
companyId: z.number(),
|
|
4932
|
+
companyName: z.string(),
|
|
4933
|
+
stage: stageSchema.nullish(),
|
|
4934
|
+
isValid: z.boolean()
|
|
4935
|
+
});
|
|
4936
|
+
|
|
4937
|
+
// lib/errors/v2/models/ItemErrorSummary.ts
|
|
4938
|
+
var itemErrorSummaryV2Schema = z.object({
|
|
4939
|
+
itemInfoId: z.number(),
|
|
4940
|
+
upc: z.string().nullish(),
|
|
4941
|
+
isbn: z.string().nullish(),
|
|
4942
|
+
gtin: z.string().nullish(),
|
|
4943
|
+
ean: z.string().nullish(),
|
|
4944
|
+
partnumber: z.string().nullish(),
|
|
4945
|
+
colorfamily: z.string().nullish(),
|
|
4946
|
+
fit: z.string().nullish(),
|
|
4947
|
+
productcolordescription: z.string().nullish(),
|
|
4948
|
+
distributioncentercode: z.string().nullish(),
|
|
4949
|
+
accountnumber: z.string().nullish(),
|
|
4950
|
+
erpid: z.string().nullish(),
|
|
4951
|
+
totalErrors: z.number(),
|
|
4952
|
+
tradingPartners: z.array(z.string()),
|
|
4953
|
+
tradingPartnerIds: z.array(z.number()),
|
|
4954
|
+
// These are the stages assigned to the TradingPartners, not the stages of the errors
|
|
4955
|
+
phases: z.array(z.string()),
|
|
4956
|
+
// Same thing for the stage property in here: it's the stage of the Item & TradingPartner, not the stage of the error
|
|
4957
|
+
tradingPartnerStages: z.array(tradingPartnerStageV2Schema),
|
|
4958
|
+
validatedDate: z.number().pipe(z.coerce.date()).nullish()
|
|
4959
|
+
});
|
|
4960
|
+
|
|
4961
|
+
// lib/errors/v2/models/ItemErrorSummaryResult.ts
|
|
4962
|
+
var itemErrorSummaryResultV2Schema = z.object({
|
|
4963
|
+
hasNext: z.boolean(),
|
|
4964
|
+
errors: z.array(itemErrorSummaryV2Schema)
|
|
4965
|
+
});
|
|
4966
|
+
|
|
4967
|
+
// lib/errors/v2/models/ItemErrorDetails.ts
|
|
4968
|
+
var itemErrorDetailsV2Schema = z.object({
|
|
4969
|
+
errorMessage: z.string(),
|
|
4970
|
+
attributeName: z.string(),
|
|
4971
|
+
attributeDbNames: z.array(z.string()),
|
|
4972
|
+
tradingPartnerNames: z.array(z.string()),
|
|
4973
|
+
phases: z.set(stageSchema),
|
|
4974
|
+
tradingPartnerStages: z.array(tradingPartnerStageV2Schema),
|
|
4975
|
+
repeatableGroupId: z.string()
|
|
4976
|
+
});
|
|
4977
|
+
|
|
4978
|
+
// lib/errors/v2/models/ItemErrorDetailsResult.ts
|
|
4979
|
+
var itemErrorDetailsResultV2Schema = z.object({
|
|
4980
|
+
itemInfoId: z.number(),
|
|
4981
|
+
upc: z.string().nullish(),
|
|
4982
|
+
isbn: z.string().nullish(),
|
|
4983
|
+
gtin: z.string().nullish(),
|
|
4984
|
+
partnumber: z.string().nullish(),
|
|
4985
|
+
ean: z.string().nullish(),
|
|
4986
|
+
colorfamily: z.string().nullish(),
|
|
4987
|
+
fit: z.string().nullish(),
|
|
4988
|
+
productcolordescription: z.string().nullish(),
|
|
4989
|
+
distributioncentercode: z.string().nullish(),
|
|
4990
|
+
accountnumber: z.string().nullish(),
|
|
4991
|
+
erpid: z.string().nullish(),
|
|
4992
|
+
itemName: z.string().nullish(),
|
|
4993
|
+
itemErrorDetails: z.array(itemErrorDetailsV2Schema)
|
|
4994
|
+
});
|
|
4995
|
+
|
|
4861
4996
|
// lib/companies/models/CompanyBriefByOrg.ts
|
|
4862
4997
|
var companyBriefByOrgSchema = z.object({
|
|
4863
4998
|
companyId: z.number(),
|
|
@@ -4914,7 +5049,11 @@ var companyBriefByOrgSchema = z.object({
|
|
|
4914
5049
|
itemDetailSchema,
|
|
4915
5050
|
itemDetailViewSchema,
|
|
4916
5051
|
itemErrorDetailsResultSchema,
|
|
5052
|
+
itemErrorDetailsResultV2Schema,
|
|
4917
5053
|
itemErrorDetailsSchema,
|
|
5054
|
+
itemErrorDetailsV2Schema,
|
|
5055
|
+
itemErrorSummaryResultV2Schema,
|
|
5056
|
+
itemErrorSummaryV2Schema,
|
|
4918
5057
|
itemHeaderSchema,
|
|
4919
5058
|
itemHierarchyResponseSchema,
|
|
4920
5059
|
itemMapSchema,
|
|
@@ -4935,6 +5074,7 @@ var companyBriefByOrgSchema = z.object({
|
|
|
4935
5074
|
spsItemIdResponseSchema,
|
|
4936
5075
|
tradingPartnerAccessByCompanyIdSchema,
|
|
4937
5076
|
tradingPartnerStageSchema,
|
|
5077
|
+
tradingPartnerStageV2Schema,
|
|
4938
5078
|
userAccountSchema,
|
|
4939
5079
|
vendorPartnerAttGroupsSchema
|
|
4940
5080
|
});
|
package/dist/zod.d.cts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export { d as attrProdTypeSchema,
|
|
2
|
-
export {
|
|
3
|
-
import 'ky-universal';
|
|
1
|
+
export { d as attrProdTypeSchema, z as attributeDefinitionSchema, D as attributeMetaDataSchema, G as attributeValidValuesSchema, F as attributesByCompanySchema, X as companyBriefByOrgSchema, O as companyRelationshipUpsertBodySchema, p as envSchema, x as exportSchema, t as importErrorsSchema, u as importSchema, v as importsStatusSchema, y as itemCategoriesSearchSchema, J as itemDetailViewSchema, Q as itemErrorDetailsResultSchema, R as itemErrorDetailsResultV2Schema, W as itemErrorSummaryResultV2Schema, H as itemSearchViewSchema, K as localeSchema, M as spreadsheetTemplateSchema, N as tradingPartnerAccessByCompanyIdSchema, P as userAccountSchema, w as vendorPartnerAttGroupsSchema } from './CompanyBriefByOrg-57oGCtjK.js';
|
|
2
|
+
export { a4 as attrDatatypeNameEnumSchema, aj as attributeDetailSchema, a5 as attributeGroupSchema, a6 as attributeSummarySchema, ac as bulbSchema, ah as categoryEnumSchema, al as componentDetailsSchema, au as connectionSchema, a1 as downLoadItemsParamsSchema, _ as exportDayOfWeekEnum, $ as exportFrequencyEnum, a0 as exportTypeEnum, Z as generateImportTemplateParamsSchema, ap as groupedAttributeListSchema, an as groupedAttributesSchema, ag as groupedItemSchema, ao as hierarchyCategorySchema, am as hierarchyDetailsSchema, aw as identityServiceDatetimePreferencesSchema, ax as identityServiceOrganizationMetadataSchema, ay as identityServiceOrganizationSchema, az as identityServicePreferencesSchema, aA as identityServiceUserSchema, W as importDetailSchema, X as importErrorSchema, Y as importStatusEnumSchema, a2 as itemCategorySchema, af as itemDetailSchema, aC as itemErrorDetailsSchema, aE as itemErrorDetailsV2Schema, aD as itemErrorSummaryV2Schema, a7 as itemHeaderSchema, a3 as itemHierarchyResponseSchema, a8 as itemMapSchema, av as itemPartnerSchema, ad as itemPriceSchema, a9 as itemTableSchema, ae as mediaItemSchema, aq as packComponentDetailsSchema, ar as packComponentItemInfoSchema, ai as packComponentSchema, aa as phaseEnumSchema, aB as registeredServiceSchema, ak as repeatableGroupSchema, at as spreadsheetTemplateCompanySchema, as as spsItemIdResponseSchema, ab as tradingPartnerStageSchema, aF as tradingPartnerStageV2Schema } from './zod-zxqlYYMG.js';
|
|
4
3
|
import 'ky';
|
|
5
4
|
import 'zod';
|
package/dist/zod.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export { d as attrProdTypeSchema,
|
|
2
|
-
export {
|
|
3
|
-
import 'ky-universal';
|
|
1
|
+
export { d as attrProdTypeSchema, z as attributeDefinitionSchema, D as attributeMetaDataSchema, G as attributeValidValuesSchema, F as attributesByCompanySchema, X as companyBriefByOrgSchema, O as companyRelationshipUpsertBodySchema, p as envSchema, x as exportSchema, t as importErrorsSchema, u as importSchema, v as importsStatusSchema, y as itemCategoriesSearchSchema, J as itemDetailViewSchema, Q as itemErrorDetailsResultSchema, R as itemErrorDetailsResultV2Schema, W as itemErrorSummaryResultV2Schema, H as itemSearchViewSchema, K as localeSchema, M as spreadsheetTemplateSchema, N as tradingPartnerAccessByCompanyIdSchema, P as userAccountSchema, w as vendorPartnerAttGroupsSchema } from './CompanyBriefByOrg-57oGCtjK.js';
|
|
2
|
+
export { a4 as attrDatatypeNameEnumSchema, aj as attributeDetailSchema, a5 as attributeGroupSchema, a6 as attributeSummarySchema, ac as bulbSchema, ah as categoryEnumSchema, al as componentDetailsSchema, au as connectionSchema, a1 as downLoadItemsParamsSchema, _ as exportDayOfWeekEnum, $ as exportFrequencyEnum, a0 as exportTypeEnum, Z as generateImportTemplateParamsSchema, ap as groupedAttributeListSchema, an as groupedAttributesSchema, ag as groupedItemSchema, ao as hierarchyCategorySchema, am as hierarchyDetailsSchema, aw as identityServiceDatetimePreferencesSchema, ax as identityServiceOrganizationMetadataSchema, ay as identityServiceOrganizationSchema, az as identityServicePreferencesSchema, aA as identityServiceUserSchema, W as importDetailSchema, X as importErrorSchema, Y as importStatusEnumSchema, a2 as itemCategorySchema, af as itemDetailSchema, aC as itemErrorDetailsSchema, aE as itemErrorDetailsV2Schema, aD as itemErrorSummaryV2Schema, a7 as itemHeaderSchema, a3 as itemHierarchyResponseSchema, a8 as itemMapSchema, av as itemPartnerSchema, ad as itemPriceSchema, a9 as itemTableSchema, ae as mediaItemSchema, aq as packComponentDetailsSchema, ar as packComponentItemInfoSchema, ai as packComponentSchema, aa as phaseEnumSchema, aB as registeredServiceSchema, ak as repeatableGroupSchema, at as spreadsheetTemplateCompanySchema, as as spsItemIdResponseSchema, ab as tradingPartnerStageSchema, aF as tradingPartnerStageV2Schema } from './zod-zxqlYYMG.js';
|
|
4
3
|
import 'ky';
|
|
5
4
|
import 'zod';
|
package/dist/zod.js
CHANGED
|
@@ -42,7 +42,11 @@ import {
|
|
|
42
42
|
itemDetailSchema,
|
|
43
43
|
itemDetailViewSchema,
|
|
44
44
|
itemErrorDetailsResultSchema,
|
|
45
|
+
itemErrorDetailsResultV2Schema,
|
|
45
46
|
itemErrorDetailsSchema,
|
|
47
|
+
itemErrorDetailsV2Schema,
|
|
48
|
+
itemErrorSummaryResultV2Schema,
|
|
49
|
+
itemErrorSummaryV2Schema,
|
|
46
50
|
itemHeaderSchema,
|
|
47
51
|
itemHierarchyResponseSchema,
|
|
48
52
|
itemMapSchema,
|
|
@@ -63,9 +67,10 @@ import {
|
|
|
63
67
|
spsItemIdResponseSchema,
|
|
64
68
|
tradingPartnerAccessByCompanyIdSchema,
|
|
65
69
|
tradingPartnerStageSchema,
|
|
70
|
+
tradingPartnerStageV2Schema,
|
|
66
71
|
userAccountSchema,
|
|
67
72
|
vendorPartnerAttGroupsSchema
|
|
68
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-CUVSWUIQ.js";
|
|
69
74
|
export {
|
|
70
75
|
attrDatatypeNameEnumSchema,
|
|
71
76
|
attrProdTypeSchema,
|
|
@@ -110,7 +115,11 @@ export {
|
|
|
110
115
|
itemDetailSchema,
|
|
111
116
|
itemDetailViewSchema,
|
|
112
117
|
itemErrorDetailsResultSchema,
|
|
118
|
+
itemErrorDetailsResultV2Schema,
|
|
113
119
|
itemErrorDetailsSchema,
|
|
120
|
+
itemErrorDetailsV2Schema,
|
|
121
|
+
itemErrorSummaryResultV2Schema,
|
|
122
|
+
itemErrorSummaryV2Schema,
|
|
114
123
|
itemHeaderSchema,
|
|
115
124
|
itemHierarchyResponseSchema,
|
|
116
125
|
itemMapSchema,
|
|
@@ -131,6 +140,7 @@ export {
|
|
|
131
140
|
spsItemIdResponseSchema,
|
|
132
141
|
tradingPartnerAccessByCompanyIdSchema,
|
|
133
142
|
tradingPartnerStageSchema,
|
|
143
|
+
tradingPartnerStageV2Schema,
|
|
134
144
|
userAccountSchema,
|
|
135
145
|
vendorPartnerAttGroupsSchema
|
|
136
146
|
};
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Assortment Api is a collection of HTTP functions to use Assortment endpoints",
|
|
4
4
|
"author": "Assortment",
|
|
5
5
|
"repository": "https://github.com/SPSCommerce/assortment-main/tree/main/ui/packages/asst-api",
|
|
6
|
-
"version": "1.0
|
|
6
|
+
"version": "1.2.0",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist"
|
|
9
9
|
],
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"vite": "^4.1.0"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"ky": "^0.
|
|
55
|
-
"ky-universal": "^0.
|
|
54
|
+
"ky": "^0.25.1",
|
|
55
|
+
"ky-universal": "^0.8.2"
|
|
56
56
|
},
|
|
57
57
|
"msw": {
|
|
58
58
|
"workerDirectory": "public"
|