@spscommerce/asst-api 1.0.0 → 1.1.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-QIqfCtA_.d.ts} +273 -8
- package/dist/{chunk-6FFDMMN5.js → chunk-3EK6JHC5.js} +137 -2
- package/dist/{chunk-C2N5RQWG.js → chunk-SFRJ3IYY.js} +43 -13
- package/dist/{index-wuCGfJSu.d.ts → index-6k1X-ckx.d.ts} +1 -1
- package/dist/index.cjs +171 -76
- package/dist/index.d.cts +32 -15
- package/dist/index.d.ts +32 -15
- package/dist/index.js +5 -65
- package/dist/msw.cjs +250 -98
- package/dist/msw.d.cts +49 -8
- package/dist/msw.d.ts +49 -8
- package/dist/msw.js +95 -73
- package/dist/{zod-9pZn6tpQ.d.ts → zod-FlYA7lT3.d.ts} +157 -2
- package/dist/zod.cjs +141 -2
- 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/index.cjs
CHANGED
|
@@ -37,6 +37,7 @@ __export(lib_exports, {
|
|
|
37
37
|
createCompaniesApi: () => createCompaniesApi,
|
|
38
38
|
createCompanyFeaturesApi: () => createCompanyFeaturesApi,
|
|
39
39
|
createErrorsApi: () => createErrorsApi,
|
|
40
|
+
createErrorsApiV2: () => createErrorsApiV2,
|
|
40
41
|
createExportsApi: () => createExportsApi,
|
|
41
42
|
createFeatureFlagsApi: () => createFeatureFlagsApi,
|
|
42
43
|
createImportsApi: () => createImportsApi,
|
|
@@ -4797,12 +4798,6 @@ function createCompanyFeaturesApi(client) {
|
|
|
4797
4798
|
// lib/featureFlags/index.ts
|
|
4798
4799
|
var BASE_URL12 = "feature-flag";
|
|
4799
4800
|
function createFeatureFlagsApi(client) {
|
|
4800
|
-
async function checkEnableItemsApiEndpointsForImports(signal) {
|
|
4801
|
-
const data = await client.get(`${BASE_URL12}/enable-items-api-endpoints-for-imports/`, {
|
|
4802
|
-
signal
|
|
4803
|
-
}).json();
|
|
4804
|
-
return z.boolean().parse(data);
|
|
4805
|
-
}
|
|
4806
4801
|
async function checkEnableItemsLevelMSIS(signal) {
|
|
4807
4802
|
const data = await client.get(`${BASE_URL12}/enable-item-level-msis/`, {
|
|
4808
4803
|
signal
|
|
@@ -4810,7 +4805,6 @@ function createFeatureFlagsApi(client) {
|
|
|
4810
4805
|
return z.boolean().parse(data);
|
|
4811
4806
|
}
|
|
4812
4807
|
return {
|
|
4813
|
-
checkEnableItemsApiEndpointsForImports,
|
|
4814
4808
|
checkEnableItemsLevelMSIS
|
|
4815
4809
|
};
|
|
4816
4810
|
}
|
|
@@ -4938,7 +4932,7 @@ var downLoadItemsParamsSchema = z.object({
|
|
|
4938
4932
|
ids: z.array(z.string())
|
|
4939
4933
|
});
|
|
4940
4934
|
|
|
4941
|
-
// lib/errors/models/ItemErrorDetails.ts
|
|
4935
|
+
// lib/errors/v1/models/ItemErrorDetails.ts
|
|
4942
4936
|
var itemErrorDetailsSchema = z.object({
|
|
4943
4937
|
errorMessage: z.string(),
|
|
4944
4938
|
attributeName: z.string().nullable(),
|
|
@@ -4949,7 +4943,7 @@ var itemErrorDetailsSchema = z.object({
|
|
|
4949
4943
|
repeatableGroupId: z.string().nullish()
|
|
4950
4944
|
});
|
|
4951
4945
|
|
|
4952
|
-
// lib/errors/models/ItemErrorDetailsResult.ts
|
|
4946
|
+
// lib/errors/v1/models/ItemErrorDetailsResult.ts
|
|
4953
4947
|
var itemErrorDetailsResultSchema = z.object({
|
|
4954
4948
|
itemInfoId: z.number(),
|
|
4955
4949
|
upc: z.string().nullish(),
|
|
@@ -4961,6 +4955,135 @@ var itemErrorDetailsResultSchema = z.object({
|
|
|
4961
4955
|
itemErrorDetails: z.array(itemErrorDetailsSchema)
|
|
4962
4956
|
});
|
|
4963
4957
|
|
|
4958
|
+
// lib/items/v2/models/Stage.ts
|
|
4959
|
+
var stageSchema = z.enum([
|
|
4960
|
+
"CORE",
|
|
4961
|
+
"CORE_PLUS",
|
|
4962
|
+
"CORE_ADVANCED",
|
|
4963
|
+
"ENRICHED"
|
|
4964
|
+
]);
|
|
4965
|
+
|
|
4966
|
+
// lib/items/v2/models/OrgSummary.ts
|
|
4967
|
+
var orgSummarySchema = z.object({
|
|
4968
|
+
ref: z.string(),
|
|
4969
|
+
id: z.string(),
|
|
4970
|
+
name: z.string()
|
|
4971
|
+
});
|
|
4972
|
+
|
|
4973
|
+
// lib/items/v2/models/ItemOrgStageDetails.ts
|
|
4974
|
+
var itemOrgStageDetailsSchema = z.object({
|
|
4975
|
+
/**
|
|
4976
|
+
* When called as retailer, the vendor, else when vendor, the retailer.
|
|
4977
|
+
* */
|
|
4978
|
+
orgSummary: orgSummarySchema,
|
|
4979
|
+
/**
|
|
4980
|
+
* The company id of the retailer or vendor used for matching ItemOrgStageDetails to TradingPartnerStage for ErrorService
|
|
4981
|
+
*/
|
|
4982
|
+
companyId: z.number().nullish(),
|
|
4983
|
+
/**
|
|
4984
|
+
* "Standard Requirements" (null) UNLESS the retailer of the item is MSIS Enabled
|
|
4985
|
+
* OTHERWISE the retailer default Stage UNLESS there's a currently active vendor-specific Stage defined
|
|
4986
|
+
* OTHERWISE the trading partnership Stage UNLESS there's a currently active Item Level override defined
|
|
4987
|
+
* OTHERWISE the item level override */
|
|
4988
|
+
stage: stageSchema.nullish(),
|
|
4989
|
+
/**
|
|
4990
|
+
* If the item is valid for the active stage. Note that for "Standard Requirements" or
|
|
4991
|
+
* "Enriched" this cam come directly from the item_doc table, but anything else requires validation
|
|
4992
|
+
*/
|
|
4993
|
+
isValid: z.boolean(),
|
|
4994
|
+
/**
|
|
4995
|
+
* Not null if there's an item level policy override for this trading partnership
|
|
4996
|
+
*/
|
|
4997
|
+
itemPolicyId: z.string().nullish(),
|
|
4998
|
+
/**
|
|
4999
|
+
* Start date for the Item level Stage if applicable
|
|
5000
|
+
*/
|
|
5001
|
+
startDate: z.number().transform((num) => new Date(num * 1e3)).nullish(),
|
|
5002
|
+
/**
|
|
5003
|
+
* End date for the Item level Stage if applicable
|
|
5004
|
+
*/
|
|
5005
|
+
endDate: z.number().transform((num) => new Date(num * 1e3)).nullish()
|
|
5006
|
+
});
|
|
5007
|
+
|
|
5008
|
+
// lib/items/v2/models/ItemStatusV2.ts
|
|
5009
|
+
var itemStatusV2Schema = z.object({
|
|
5010
|
+
itemId: z.string(),
|
|
5011
|
+
mostRestrictiveRetailerStage: stageSchema.nullable(),
|
|
5012
|
+
itemOrgStageDetails: z.array(itemOrgStageDetailsSchema)
|
|
5013
|
+
});
|
|
5014
|
+
|
|
5015
|
+
// lib/items/v2/models/ItemStatusV2Response.ts
|
|
5016
|
+
var itemStatusV2ResponseSchema = z.object({
|
|
5017
|
+
itemStatuses: z.array(itemStatusV2Schema)
|
|
5018
|
+
});
|
|
5019
|
+
|
|
5020
|
+
// lib/errors/v2/models/TradingPartnerStage.ts
|
|
5021
|
+
var tradingPartnerStageV2Schema = z.object({
|
|
5022
|
+
companyId: z.number(),
|
|
5023
|
+
companyName: z.string(),
|
|
5024
|
+
stage: stageSchema.nullish(),
|
|
5025
|
+
isValid: z.boolean()
|
|
5026
|
+
});
|
|
5027
|
+
|
|
5028
|
+
// lib/errors/v2/models/ItemErrorSummary.ts
|
|
5029
|
+
var itemErrorSummaryV2Schema = z.object({
|
|
5030
|
+
itemInfoId: z.number(),
|
|
5031
|
+
upc: z.string().nullish(),
|
|
5032
|
+
isbn: z.string().nullish(),
|
|
5033
|
+
gtin: z.string().nullish(),
|
|
5034
|
+
ean: z.string().nullish(),
|
|
5035
|
+
partnumber: z.string().nullish(),
|
|
5036
|
+
colorfamily: z.string().nullish(),
|
|
5037
|
+
fit: z.string().nullish(),
|
|
5038
|
+
productcolordescription: z.string().nullish(),
|
|
5039
|
+
distributioncentercode: z.string().nullish(),
|
|
5040
|
+
accountnumber: z.string().nullish(),
|
|
5041
|
+
erpid: z.string().nullish(),
|
|
5042
|
+
totalErrors: z.number(),
|
|
5043
|
+
tradingPartners: z.array(z.string()),
|
|
5044
|
+
tradingPartnerIds: z.array(z.number()),
|
|
5045
|
+
// These are the stages assigned to the TradingPartners, not the stages of the errors
|
|
5046
|
+
phases: z.array(z.string()),
|
|
5047
|
+
// Same thing for the stage property in here: it's the stage of the Item & TradingPartner, not the stage of the error
|
|
5048
|
+
tradingPartnerStages: z.array(tradingPartnerStageV2Schema),
|
|
5049
|
+
validatedDate: z.number().pipe(z.coerce.date()).nullish()
|
|
5050
|
+
});
|
|
5051
|
+
|
|
5052
|
+
// lib/errors/v2/models/ItemErrorSummaryResult.ts
|
|
5053
|
+
var itemErrorSummaryResultV2Schema = z.object({
|
|
5054
|
+
hasNext: z.boolean(),
|
|
5055
|
+
errors: z.array(itemErrorSummaryV2Schema)
|
|
5056
|
+
});
|
|
5057
|
+
|
|
5058
|
+
// lib/errors/v2/models/ItemErrorDetails.ts
|
|
5059
|
+
var itemErrorDetailsV2Schema = z.object({
|
|
5060
|
+
errorMessage: z.string(),
|
|
5061
|
+
attributeName: z.string(),
|
|
5062
|
+
attributeDbNames: z.array(z.string()),
|
|
5063
|
+
tradingPartnerNames: z.array(z.string()),
|
|
5064
|
+
phases: z.set(stageSchema),
|
|
5065
|
+
tradingPartnerStages: z.array(tradingPartnerStageV2Schema),
|
|
5066
|
+
repeatableGroupId: z.string()
|
|
5067
|
+
});
|
|
5068
|
+
|
|
5069
|
+
// lib/errors/v2/models/ItemErrorDetailsResult.ts
|
|
5070
|
+
var itemErrorDetailsResultV2Schema = z.object({
|
|
5071
|
+
itemInfoId: z.number(),
|
|
5072
|
+
upc: z.string().nullish(),
|
|
5073
|
+
isbn: z.string().nullish(),
|
|
5074
|
+
gtin: z.string().nullish(),
|
|
5075
|
+
partnumber: z.string().nullish(),
|
|
5076
|
+
ean: z.string().nullish(),
|
|
5077
|
+
colorfamily: z.string().nullish(),
|
|
5078
|
+
fit: z.string().nullish(),
|
|
5079
|
+
productcolordescription: z.string().nullish(),
|
|
5080
|
+
distributioncentercode: z.string().nullish(),
|
|
5081
|
+
accountnumber: z.string().nullish(),
|
|
5082
|
+
erpid: z.string().nullish(),
|
|
5083
|
+
itemName: z.string().nullish(),
|
|
5084
|
+
itemErrorDetails: z.array(itemErrorDetailsV2Schema)
|
|
5085
|
+
});
|
|
5086
|
+
|
|
4964
5087
|
// lib/companies/models/CompanyBriefByOrg.ts
|
|
4965
5088
|
var companyBriefByOrgSchema = z.object({
|
|
4966
5089
|
companyId: z.number(),
|
|
@@ -5266,68 +5389,6 @@ function createItemsApi(client) {
|
|
|
5266
5389
|
};
|
|
5267
5390
|
}
|
|
5268
5391
|
|
|
5269
|
-
// lib/items/v2/models/Stage.ts
|
|
5270
|
-
var stageSchema = z.enum([
|
|
5271
|
-
"CORE",
|
|
5272
|
-
"CORE_PLUS",
|
|
5273
|
-
"CORE_ADVANCED",
|
|
5274
|
-
"ENRICHED"
|
|
5275
|
-
]);
|
|
5276
|
-
|
|
5277
|
-
// lib/items/v2/models/OrgSummary.ts
|
|
5278
|
-
var orgSummarySchema = z.object({
|
|
5279
|
-
ref: z.string(),
|
|
5280
|
-
id: z.string(),
|
|
5281
|
-
name: z.string()
|
|
5282
|
-
});
|
|
5283
|
-
|
|
5284
|
-
// lib/items/v2/models/ItemOrgStageDetails.ts
|
|
5285
|
-
var itemOrgStageDetailsSchema = z.object({
|
|
5286
|
-
/**
|
|
5287
|
-
* When called as retailer, the vendor, else when vendor, the retailer.
|
|
5288
|
-
* */
|
|
5289
|
-
orgSummary: orgSummarySchema,
|
|
5290
|
-
/**
|
|
5291
|
-
* The company id of the retailer or vendor used for matching ItemOrgStageDetails to TradingPartnerStage for ErrorService
|
|
5292
|
-
*/
|
|
5293
|
-
companyId: z.number().nullish(),
|
|
5294
|
-
/**
|
|
5295
|
-
* "Standard Requirements" (null) UNLESS the retailer of the item is MSIS Enabled
|
|
5296
|
-
* OTHERWISE the retailer default Stage UNLESS there's a currently active vendor-specific Stage defined
|
|
5297
|
-
* OTHERWISE the trading partnership Stage UNLESS there's a currently active Item Level override defined
|
|
5298
|
-
* OTHERWISE the item level override */
|
|
5299
|
-
stage: stageSchema.nullish(),
|
|
5300
|
-
/**
|
|
5301
|
-
* If the item is valid for the active stage. Note that for "Standard Requirements" or
|
|
5302
|
-
* "Enriched" this cam come directly from the item_doc table, but anything else requires validation
|
|
5303
|
-
*/
|
|
5304
|
-
isValid: z.boolean(),
|
|
5305
|
-
/**
|
|
5306
|
-
* Not null if there's an item level policy override for this trading partnership
|
|
5307
|
-
*/
|
|
5308
|
-
itemPolicyId: z.string().nullish(),
|
|
5309
|
-
/**
|
|
5310
|
-
* Start date for the Item level Stage if applicable
|
|
5311
|
-
*/
|
|
5312
|
-
startDate: z.number().pipe(z.coerce.date()).nullish(),
|
|
5313
|
-
/**
|
|
5314
|
-
* End date for the Item level Stage if applicable
|
|
5315
|
-
*/
|
|
5316
|
-
endDate: z.number().pipe(z.coerce.date()).nullish()
|
|
5317
|
-
});
|
|
5318
|
-
|
|
5319
|
-
// lib/items/v2/models/ItemStatusV2.ts
|
|
5320
|
-
var itemStatusV2Schema = z.object({
|
|
5321
|
-
itemId: z.string(),
|
|
5322
|
-
mostRestrictiveRetailerStage: stageSchema.nullable(),
|
|
5323
|
-
itemOrgStageDetails: z.array(itemOrgStageDetailsSchema)
|
|
5324
|
-
});
|
|
5325
|
-
|
|
5326
|
-
// lib/items/v2/models/ItemStatusV2Response.ts
|
|
5327
|
-
var itemStatusV2ResponseSchema = z.object({
|
|
5328
|
-
itemStatuses: z.array(itemStatusV2Schema)
|
|
5329
|
-
});
|
|
5330
|
-
|
|
5331
5392
|
// lib/items/v2/index.ts
|
|
5332
5393
|
var BASE_URL14 = "v2/items";
|
|
5333
5394
|
function createItemsApiV2(client) {
|
|
@@ -5340,7 +5401,7 @@ function createItemsApiV2(client) {
|
|
|
5340
5401
|
};
|
|
5341
5402
|
}
|
|
5342
5403
|
|
|
5343
|
-
// lib/errors/index.ts
|
|
5404
|
+
// lib/errors/v1/index.ts
|
|
5344
5405
|
var BASE_URL15 = "errors";
|
|
5345
5406
|
function createErrorsApi(client) {
|
|
5346
5407
|
async function getInvalidItemErrorDetails(itemInfoId, signal) {
|
|
@@ -5354,11 +5415,44 @@ function createErrorsApi(client) {
|
|
|
5354
5415
|
};
|
|
5355
5416
|
}
|
|
5356
5417
|
|
|
5418
|
+
// lib/errors/v2/index.ts
|
|
5419
|
+
var BASE_URL16 = "errors/v2";
|
|
5420
|
+
function createErrorsApiV2(client) {
|
|
5421
|
+
async function getItemErrorSummary(params, signal) {
|
|
5422
|
+
const searchParams = new URLSearchParams();
|
|
5423
|
+
if (params.searchField)
|
|
5424
|
+
searchParams.append("searchField", params.searchField);
|
|
5425
|
+
if (params.searchText)
|
|
5426
|
+
searchParams.append("searchText", params.searchText);
|
|
5427
|
+
if (params.tradingPartnerIds) {
|
|
5428
|
+
params.tradingPartnerIds.forEach((id) => searchParams.append("tradingPartnerIds", id.toString()));
|
|
5429
|
+
}
|
|
5430
|
+
if (params.offset)
|
|
5431
|
+
searchParams.append("offset", params.offset.toString());
|
|
5432
|
+
if (params.limit)
|
|
5433
|
+
searchParams.append("limit", params.limit.toString());
|
|
5434
|
+
if (params.docInEventId)
|
|
5435
|
+
searchParams.append("docInEventId", params.docInEventId);
|
|
5436
|
+
if (params.importId)
|
|
5437
|
+
searchParams.append("importId", params.importId);
|
|
5438
|
+
const data = await client.get(`${BASE_URL16}/summary`, { signal, searchParams }).json();
|
|
5439
|
+
return itemErrorSummaryResultV2Schema.parse(data);
|
|
5440
|
+
}
|
|
5441
|
+
async function getItemErrorDetails(itemInfoId, signal) {
|
|
5442
|
+
const data = await client.get(`${BASE_URL16}/items/${itemInfoId}`, { signal }).json();
|
|
5443
|
+
return itemErrorDetailsResultV2Schema.parse(data);
|
|
5444
|
+
}
|
|
5445
|
+
return {
|
|
5446
|
+
getItemErrorSummary,
|
|
5447
|
+
getItemErrorDetails
|
|
5448
|
+
};
|
|
5449
|
+
}
|
|
5450
|
+
|
|
5357
5451
|
// lib/uniqueCriteria/index.ts
|
|
5358
|
-
var
|
|
5452
|
+
var BASE_URL17 = "uniquecriteria";
|
|
5359
5453
|
function createUniqueCriteriaApi(client) {
|
|
5360
5454
|
async function getUniqueCriteriaByOrg(params, signal) {
|
|
5361
|
-
const data = await client.get(`${
|
|
5455
|
+
const data = await client.get(`${BASE_URL17}/org`, {
|
|
5362
5456
|
searchParams: params,
|
|
5363
5457
|
signal
|
|
5364
5458
|
}).json();
|
|
@@ -5368,10 +5462,10 @@ function createUniqueCriteriaApi(client) {
|
|
|
5368
5462
|
}
|
|
5369
5463
|
|
|
5370
5464
|
// lib/companies/index.ts
|
|
5371
|
-
var
|
|
5465
|
+
var BASE_URL18 = "companys";
|
|
5372
5466
|
function createCompaniesApi(client) {
|
|
5373
5467
|
async function getCompanyBriefInfoByOrg(params, signal) {
|
|
5374
|
-
const data = await client.get(`${
|
|
5468
|
+
const data = await client.get(`${BASE_URL18}/brief`, {
|
|
5375
5469
|
searchParams: params,
|
|
5376
5470
|
signal
|
|
5377
5471
|
}).json();
|
|
@@ -5388,6 +5482,7 @@ function createCompaniesApi(client) {
|
|
|
5388
5482
|
createCompaniesApi,
|
|
5389
5483
|
createCompanyFeaturesApi,
|
|
5390
5484
|
createErrorsApi,
|
|
5485
|
+
createErrorsApiV2,
|
|
5391
5486
|
createExportsApi,
|
|
5392
5487
|
createFeatureFlagsApi,
|
|
5393
5488
|
createImportsApi,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { A as AsstClient, a as Import, b as ImportsStatus, V as VendorPartnerAttGroups, E as Export,
|
|
2
|
-
export {
|
|
3
|
-
import { G as GenerateImportTemplateParams, D as DownLoadItemsParams, I as ItemPartner, a as ItemHierarchyResponse, b as ItemDetail, S as SpsItemIdResponse } from './zod-
|
|
4
|
-
export { i as AttrDatatypeNameEnum, t as AttributeDetail, j as AttributeGroup, A as AttributeSummary, J as Bulb, u as CategoryEnum, v as ComponentDetails, C as Connection, E as ExportDayOfWeek, f as ExportFrequency, g as ExportType, w as GroupedAttributeList, x as GroupedAttributes, y as GroupedItem, H as HierarchyCategory, z as HierarchyDetails, m as IdentityServiceDatetimePreferences, n as IdentityServiceOrganization, l as IdentityServiceOrganizationMetadata, o as IdentityServicePreferences, p as IdentityServiceUser, c as ImportDetails, d as ImportError, e as ImportStatusEnum, h as ItemCategory, O as ItemErrorDetails, q as ItemHeader, r as ItemMap, B as ItemPrice, s as ItemTable, M as MediaItem, K as PackComponent, F as PackComponentDetails, N as PackComponentItemInfo, P as PhaseEnum, R as RegisteredService, L as RepeatableGroup, k as SpreadsheetTemplateCompany, T as TradingPartnerStage } from './zod-
|
|
5
|
-
import { R as RetailerTradingPartnerStages, I as ItemStatusResponse } from './index-
|
|
6
|
-
export { c as createCompaniesApi } from './index-
|
|
1
|
+
import { A as AsstClient, a as Import, b as ImportsStatus, V as VendorPartnerAttGroups, E as Export, o as AttrProdType, T as TradingPartnerAccessByCompanyId, e as CompanyRelationshipUpsertBody, c as ItemCategoriesSearch, k as AttributeMetaData, l as AttributesByCompany, m as AttributeDefinition, n as AttributeValidValues, L as Locale, S as SpreadsheetTemplate, U as UserAccount, i as ItemSearchView, j as ItemDetailView, f as ItemErrorDetailsResult, g as ItemErrorSummaryResultV2, h as ItemErrorDetailsResultV2 } from './CompanyBriefByOrg-QIqfCtA_.js';
|
|
2
|
+
export { q as AsstClientOptions, r as AsstUrl, B as BASE_URLS, C as CompanyBriefByOrg, s as Env, I as ImportErrors, p as envSchema } from './CompanyBriefByOrg-QIqfCtA_.js';
|
|
3
|
+
import { G as GenerateImportTemplateParams, D as DownLoadItemsParams, I as ItemPartner, a as ItemHierarchyResponse, b as ItemDetail, S as SpsItemIdResponse } from './zod-FlYA7lT3.js';
|
|
4
|
+
export { i as AttrDatatypeNameEnum, t as AttributeDetail, j as AttributeGroup, A as AttributeSummary, J as Bulb, u as CategoryEnum, v as ComponentDetails, C as Connection, E as ExportDayOfWeek, f as ExportFrequency, g as ExportType, w as GroupedAttributeList, x as GroupedAttributes, y as GroupedItem, H as HierarchyCategory, z as HierarchyDetails, m as IdentityServiceDatetimePreferences, n as IdentityServiceOrganization, l as IdentityServiceOrganizationMetadata, o as IdentityServicePreferences, p as IdentityServiceUser, c as ImportDetails, d as ImportError, e as ImportStatusEnum, h as ItemCategory, O as ItemErrorDetails, U as ItemErrorDetailsV2, Q as ItemErrorSummaryV2, q as ItemHeader, r as ItemMap, B as ItemPrice, s as ItemTable, M as MediaItem, K as PackComponent, F as PackComponentDetails, N as PackComponentItemInfo, P as PhaseEnum, R as RegisteredService, L as RepeatableGroup, k as SpreadsheetTemplateCompany, T as TradingPartnerStage, V as TradingPartnerStageV2 } from './zod-FlYA7lT3.js';
|
|
5
|
+
import { R as RetailerTradingPartnerStages, I as ItemStatusResponse } from './index-6k1X-ckx.js';
|
|
6
|
+
export { c as createCompaniesApi } from './index-6k1X-ckx.js';
|
|
7
7
|
import { z } from 'zod';
|
|
8
|
-
import 'ky-universal';
|
|
9
8
|
import 'ky';
|
|
10
9
|
|
|
11
10
|
/**
|
|
@@ -172,7 +171,6 @@ declare function createCompanyFeaturesApi(client: AsstClient): {
|
|
|
172
171
|
* @returns An object containing feature flags utility functions
|
|
173
172
|
*/
|
|
174
173
|
declare function createFeatureFlagsApi(client: AsstClient): {
|
|
175
|
-
checkEnableItemsApiEndpointsForImports: (signal?: AbortSignal) => Promise<boolean>;
|
|
176
174
|
checkEnableItemsLevelMSIS: (signal?: AbortSignal) => Promise<boolean>;
|
|
177
175
|
};
|
|
178
176
|
|
|
@@ -331,11 +329,11 @@ declare const itemOrgStageDetailsSchema: z.ZodObject<{
|
|
|
331
329
|
/**
|
|
332
330
|
* Start date for the Item level Stage if applicable
|
|
333
331
|
*/
|
|
334
|
-
startDate: z.ZodOptional<z.ZodNullable<z.
|
|
332
|
+
startDate: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, Date, number>>>;
|
|
335
333
|
/**
|
|
336
334
|
* End date for the Item level Stage if applicable
|
|
337
335
|
*/
|
|
338
|
-
endDate: z.ZodOptional<z.ZodNullable<z.
|
|
336
|
+
endDate: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, Date, number>>>;
|
|
339
337
|
}, "strip", z.ZodTypeAny, {
|
|
340
338
|
isValid: boolean;
|
|
341
339
|
orgSummary: {
|
|
@@ -384,8 +382,8 @@ declare const itemStatusV2Schema: z.ZodObject<{
|
|
|
384
382
|
stage: z.ZodOptional<z.ZodNullable<z.ZodEnum<["CORE", "CORE_PLUS", "CORE_ADVANCED", "ENRICHED"]>>>;
|
|
385
383
|
isValid: z.ZodBoolean;
|
|
386
384
|
itemPolicyId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
387
|
-
startDate: z.ZodOptional<z.ZodNullable<z.
|
|
388
|
-
endDate: z.ZodOptional<z.ZodNullable<z.
|
|
385
|
+
startDate: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, Date, number>>>;
|
|
386
|
+
endDate: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, Date, number>>>;
|
|
389
387
|
}, "strip", z.ZodTypeAny, {
|
|
390
388
|
isValid: boolean;
|
|
391
389
|
orgSummary: {
|
|
@@ -468,8 +466,8 @@ declare const itemStatusV2ResponseSchema: z.ZodObject<{
|
|
|
468
466
|
stage: z.ZodOptional<z.ZodNullable<z.ZodEnum<["CORE", "CORE_PLUS", "CORE_ADVANCED", "ENRICHED"]>>>;
|
|
469
467
|
isValid: z.ZodBoolean;
|
|
470
468
|
itemPolicyId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
471
|
-
startDate: z.ZodOptional<z.ZodNullable<z.
|
|
472
|
-
endDate: z.ZodOptional<z.ZodNullable<z.
|
|
469
|
+
startDate: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, Date, number>>>;
|
|
470
|
+
endDate: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, Date, number>>>;
|
|
473
471
|
}, "strip", z.ZodTypeAny, {
|
|
474
472
|
isValid: boolean;
|
|
475
473
|
orgSummary: {
|
|
@@ -603,6 +601,25 @@ declare function createErrorsApi(client: AsstClient): {
|
|
|
603
601
|
getInvalidItemErrorDetails: (itemInfoId: string, signal?: AbortSignal) => Promise<ItemErrorDetailsResult>;
|
|
604
602
|
};
|
|
605
603
|
|
|
604
|
+
type GetItemErrorSummaryParams = {
|
|
605
|
+
searchField?: string;
|
|
606
|
+
searchText?: string;
|
|
607
|
+
tradingPartnerIds?: number[];
|
|
608
|
+
offset?: number;
|
|
609
|
+
limit?: number;
|
|
610
|
+
docInEventId?: string;
|
|
611
|
+
importId?: string;
|
|
612
|
+
};
|
|
613
|
+
/**
|
|
614
|
+
* Initialize Errors Api functions
|
|
615
|
+
* @param client Assortment Client instance
|
|
616
|
+
* @returns An object containing Errors API functions
|
|
617
|
+
*/
|
|
618
|
+
declare function createErrorsApiV2(client: AsstClient): {
|
|
619
|
+
getItemErrorSummary: (params: GetItemErrorSummaryParams, signal?: AbortSignal) => Promise<ItemErrorSummaryResultV2>;
|
|
620
|
+
getItemErrorDetails: (itemInfoId: number, signal?: AbortSignal) => Promise<ItemErrorDetailsResultV2>;
|
|
621
|
+
};
|
|
622
|
+
|
|
606
623
|
/**
|
|
607
624
|
* Initialize UniqueCriteria Api functions
|
|
608
625
|
* @param client Assortment Client instance
|
|
@@ -614,4 +631,4 @@ declare function createUniqueCriteriaApi(client: AsstClient): {
|
|
|
614
631
|
}, signal?: AbortSignal) => Promise<string[]>;
|
|
615
632
|
};
|
|
616
633
|
|
|
617
|
-
export { type ApplicationType, AsstClient, AttrProdType, AttributeDefinition, AttributeMetaData, AttributeValidValues, AttributesByCompany, type CategoriesApi, CompanyRelationshipUpsertBody, DownLoadItemsParams, Export, GenerateImportTemplateParams, Import, ImportsStatus, ItemCategoriesSearch, ItemDetail, ItemDetailView, ItemErrorDetailsResult, ItemHierarchyResponse, type ItemOrgStageDetails, type ItemOrgStatus, ItemPartner, ItemSearchView, type ItemStatus, ItemStatusResponse, type ItemStatusV2, type ItemStatusV2Response, Locale, type OrgSummary, RetailerTradingPartnerStages, SpreadsheetTemplate, SpsItemIdResponse, type Stage, TradingPartnerAccessByCompanyId, UserAccount, VendorPartnerAttGroups, createAttributesApi, createCategoriesApi, createCompanyFeaturesApi, createErrorsApi, createExportsApi, createFeatureFlagsApi, createImportsApi, createItemsApi, createItemsApiV2, createLocaleApi, createProductTypesApi, createSpreadsheetTemplateApi, createTradingPartnerAccessApi, createTradingPartnerSettingsApi, createUniqueCriteriaApi, createWhoAmIApi };
|
|
634
|
+
export { type ApplicationType, AsstClient, AttrProdType, AttributeDefinition, AttributeMetaData, AttributeValidValues, AttributesByCompany, type CategoriesApi, CompanyRelationshipUpsertBody, DownLoadItemsParams, Export, GenerateImportTemplateParams, type GetItemErrorSummaryParams, Import, ImportsStatus, ItemCategoriesSearch, ItemDetail, ItemDetailView, ItemErrorDetailsResult, ItemErrorDetailsResultV2, ItemErrorSummaryResultV2, ItemHierarchyResponse, type ItemOrgStageDetails, type ItemOrgStatus, ItemPartner, ItemSearchView, type ItemStatus, ItemStatusResponse, type ItemStatusV2, type ItemStatusV2Response, Locale, type OrgSummary, RetailerTradingPartnerStages, SpreadsheetTemplate, SpsItemIdResponse, type Stage, TradingPartnerAccessByCompanyId, UserAccount, VendorPartnerAttGroups, createAttributesApi, createCategoriesApi, createCompanyFeaturesApi, createErrorsApi, createErrorsApiV2, createExportsApi, createFeatureFlagsApi, createImportsApi, createItemsApi, createItemsApiV2, createLocaleApi, createProductTypesApi, createSpreadsheetTemplateApi, createTradingPartnerAccessApi, createTradingPartnerSettingsApi, createUniqueCriteriaApi, createWhoAmIApi };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { A as AsstClient, a as Import, b as ImportsStatus, V as VendorPartnerAttGroups, E as Export,
|
|
2
|
-
export {
|
|
3
|
-
import { G as GenerateImportTemplateParams, D as DownLoadItemsParams, I as ItemPartner, a as ItemHierarchyResponse, b as ItemDetail, S as SpsItemIdResponse } from './zod-
|
|
4
|
-
export { i as AttrDatatypeNameEnum, t as AttributeDetail, j as AttributeGroup, A as AttributeSummary, J as Bulb, u as CategoryEnum, v as ComponentDetails, C as Connection, E as ExportDayOfWeek, f as ExportFrequency, g as ExportType, w as GroupedAttributeList, x as GroupedAttributes, y as GroupedItem, H as HierarchyCategory, z as HierarchyDetails, m as IdentityServiceDatetimePreferences, n as IdentityServiceOrganization, l as IdentityServiceOrganizationMetadata, o as IdentityServicePreferences, p as IdentityServiceUser, c as ImportDetails, d as ImportError, e as ImportStatusEnum, h as ItemCategory, O as ItemErrorDetails, q as ItemHeader, r as ItemMap, B as ItemPrice, s as ItemTable, M as MediaItem, K as PackComponent, F as PackComponentDetails, N as PackComponentItemInfo, P as PhaseEnum, R as RegisteredService, L as RepeatableGroup, k as SpreadsheetTemplateCompany, T as TradingPartnerStage } from './zod-
|
|
5
|
-
import { R as RetailerTradingPartnerStages, I as ItemStatusResponse } from './index-
|
|
6
|
-
export { c as createCompaniesApi } from './index-
|
|
1
|
+
import { A as AsstClient, a as Import, b as ImportsStatus, V as VendorPartnerAttGroups, E as Export, o as AttrProdType, T as TradingPartnerAccessByCompanyId, e as CompanyRelationshipUpsertBody, c as ItemCategoriesSearch, k as AttributeMetaData, l as AttributesByCompany, m as AttributeDefinition, n as AttributeValidValues, L as Locale, S as SpreadsheetTemplate, U as UserAccount, i as ItemSearchView, j as ItemDetailView, f as ItemErrorDetailsResult, g as ItemErrorSummaryResultV2, h as ItemErrorDetailsResultV2 } from './CompanyBriefByOrg-QIqfCtA_.js';
|
|
2
|
+
export { q as AsstClientOptions, r as AsstUrl, B as BASE_URLS, C as CompanyBriefByOrg, s as Env, I as ImportErrors, p as envSchema } from './CompanyBriefByOrg-QIqfCtA_.js';
|
|
3
|
+
import { G as GenerateImportTemplateParams, D as DownLoadItemsParams, I as ItemPartner, a as ItemHierarchyResponse, b as ItemDetail, S as SpsItemIdResponse } from './zod-FlYA7lT3.js';
|
|
4
|
+
export { i as AttrDatatypeNameEnum, t as AttributeDetail, j as AttributeGroup, A as AttributeSummary, J as Bulb, u as CategoryEnum, v as ComponentDetails, C as Connection, E as ExportDayOfWeek, f as ExportFrequency, g as ExportType, w as GroupedAttributeList, x as GroupedAttributes, y as GroupedItem, H as HierarchyCategory, z as HierarchyDetails, m as IdentityServiceDatetimePreferences, n as IdentityServiceOrganization, l as IdentityServiceOrganizationMetadata, o as IdentityServicePreferences, p as IdentityServiceUser, c as ImportDetails, d as ImportError, e as ImportStatusEnum, h as ItemCategory, O as ItemErrorDetails, U as ItemErrorDetailsV2, Q as ItemErrorSummaryV2, q as ItemHeader, r as ItemMap, B as ItemPrice, s as ItemTable, M as MediaItem, K as PackComponent, F as PackComponentDetails, N as PackComponentItemInfo, P as PhaseEnum, R as RegisteredService, L as RepeatableGroup, k as SpreadsheetTemplateCompany, T as TradingPartnerStage, V as TradingPartnerStageV2 } from './zod-FlYA7lT3.js';
|
|
5
|
+
import { R as RetailerTradingPartnerStages, I as ItemStatusResponse } from './index-6k1X-ckx.js';
|
|
6
|
+
export { c as createCompaniesApi } from './index-6k1X-ckx.js';
|
|
7
7
|
import { z } from 'zod';
|
|
8
|
-
import 'ky-universal';
|
|
9
8
|
import 'ky';
|
|
10
9
|
|
|
11
10
|
/**
|
|
@@ -172,7 +171,6 @@ declare function createCompanyFeaturesApi(client: AsstClient): {
|
|
|
172
171
|
* @returns An object containing feature flags utility functions
|
|
173
172
|
*/
|
|
174
173
|
declare function createFeatureFlagsApi(client: AsstClient): {
|
|
175
|
-
checkEnableItemsApiEndpointsForImports: (signal?: AbortSignal) => Promise<boolean>;
|
|
176
174
|
checkEnableItemsLevelMSIS: (signal?: AbortSignal) => Promise<boolean>;
|
|
177
175
|
};
|
|
178
176
|
|
|
@@ -331,11 +329,11 @@ declare const itemOrgStageDetailsSchema: z.ZodObject<{
|
|
|
331
329
|
/**
|
|
332
330
|
* Start date for the Item level Stage if applicable
|
|
333
331
|
*/
|
|
334
|
-
startDate: z.ZodOptional<z.ZodNullable<z.
|
|
332
|
+
startDate: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, Date, number>>>;
|
|
335
333
|
/**
|
|
336
334
|
* End date for the Item level Stage if applicable
|
|
337
335
|
*/
|
|
338
|
-
endDate: z.ZodOptional<z.ZodNullable<z.
|
|
336
|
+
endDate: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, Date, number>>>;
|
|
339
337
|
}, "strip", z.ZodTypeAny, {
|
|
340
338
|
isValid: boolean;
|
|
341
339
|
orgSummary: {
|
|
@@ -384,8 +382,8 @@ declare const itemStatusV2Schema: z.ZodObject<{
|
|
|
384
382
|
stage: z.ZodOptional<z.ZodNullable<z.ZodEnum<["CORE", "CORE_PLUS", "CORE_ADVANCED", "ENRICHED"]>>>;
|
|
385
383
|
isValid: z.ZodBoolean;
|
|
386
384
|
itemPolicyId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
387
|
-
startDate: z.ZodOptional<z.ZodNullable<z.
|
|
388
|
-
endDate: z.ZodOptional<z.ZodNullable<z.
|
|
385
|
+
startDate: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, Date, number>>>;
|
|
386
|
+
endDate: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, Date, number>>>;
|
|
389
387
|
}, "strip", z.ZodTypeAny, {
|
|
390
388
|
isValid: boolean;
|
|
391
389
|
orgSummary: {
|
|
@@ -468,8 +466,8 @@ declare const itemStatusV2ResponseSchema: z.ZodObject<{
|
|
|
468
466
|
stage: z.ZodOptional<z.ZodNullable<z.ZodEnum<["CORE", "CORE_PLUS", "CORE_ADVANCED", "ENRICHED"]>>>;
|
|
469
467
|
isValid: z.ZodBoolean;
|
|
470
468
|
itemPolicyId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
471
|
-
startDate: z.ZodOptional<z.ZodNullable<z.
|
|
472
|
-
endDate: z.ZodOptional<z.ZodNullable<z.
|
|
469
|
+
startDate: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, Date, number>>>;
|
|
470
|
+
endDate: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, Date, number>>>;
|
|
473
471
|
}, "strip", z.ZodTypeAny, {
|
|
474
472
|
isValid: boolean;
|
|
475
473
|
orgSummary: {
|
|
@@ -603,6 +601,25 @@ declare function createErrorsApi(client: AsstClient): {
|
|
|
603
601
|
getInvalidItemErrorDetails: (itemInfoId: string, signal?: AbortSignal) => Promise<ItemErrorDetailsResult>;
|
|
604
602
|
};
|
|
605
603
|
|
|
604
|
+
type GetItemErrorSummaryParams = {
|
|
605
|
+
searchField?: string;
|
|
606
|
+
searchText?: string;
|
|
607
|
+
tradingPartnerIds?: number[];
|
|
608
|
+
offset?: number;
|
|
609
|
+
limit?: number;
|
|
610
|
+
docInEventId?: string;
|
|
611
|
+
importId?: string;
|
|
612
|
+
};
|
|
613
|
+
/**
|
|
614
|
+
* Initialize Errors Api functions
|
|
615
|
+
* @param client Assortment Client instance
|
|
616
|
+
* @returns An object containing Errors API functions
|
|
617
|
+
*/
|
|
618
|
+
declare function createErrorsApiV2(client: AsstClient): {
|
|
619
|
+
getItemErrorSummary: (params: GetItemErrorSummaryParams, signal?: AbortSignal) => Promise<ItemErrorSummaryResultV2>;
|
|
620
|
+
getItemErrorDetails: (itemInfoId: number, signal?: AbortSignal) => Promise<ItemErrorDetailsResultV2>;
|
|
621
|
+
};
|
|
622
|
+
|
|
606
623
|
/**
|
|
607
624
|
* Initialize UniqueCriteria Api functions
|
|
608
625
|
* @param client Assortment Client instance
|
|
@@ -614,4 +631,4 @@ declare function createUniqueCriteriaApi(client: AsstClient): {
|
|
|
614
631
|
}, signal?: AbortSignal) => Promise<string[]>;
|
|
615
632
|
};
|
|
616
633
|
|
|
617
|
-
export { type ApplicationType, AsstClient, AttrProdType, AttributeDefinition, AttributeMetaData, AttributeValidValues, AttributesByCompany, type CategoriesApi, CompanyRelationshipUpsertBody, DownLoadItemsParams, Export, GenerateImportTemplateParams, Import, ImportsStatus, ItemCategoriesSearch, ItemDetail, ItemDetailView, ItemErrorDetailsResult, ItemHierarchyResponse, type ItemOrgStageDetails, type ItemOrgStatus, ItemPartner, ItemSearchView, type ItemStatus, ItemStatusResponse, type ItemStatusV2, type ItemStatusV2Response, Locale, type OrgSummary, RetailerTradingPartnerStages, SpreadsheetTemplate, SpsItemIdResponse, type Stage, TradingPartnerAccessByCompanyId, UserAccount, VendorPartnerAttGroups, createAttributesApi, createCategoriesApi, createCompanyFeaturesApi, createErrorsApi, createExportsApi, createFeatureFlagsApi, createImportsApi, createItemsApi, createItemsApiV2, createLocaleApi, createProductTypesApi, createSpreadsheetTemplateApi, createTradingPartnerAccessApi, createTradingPartnerSettingsApi, createUniqueCriteriaApi, createWhoAmIApi };
|
|
634
|
+
export { type ApplicationType, AsstClient, AttrProdType, AttributeDefinition, AttributeMetaData, AttributeValidValues, AttributesByCompany, type CategoriesApi, CompanyRelationshipUpsertBody, DownLoadItemsParams, Export, GenerateImportTemplateParams, type GetItemErrorSummaryParams, Import, ImportsStatus, ItemCategoriesSearch, ItemDetail, ItemDetailView, ItemErrorDetailsResult, ItemErrorDetailsResultV2, ItemErrorSummaryResultV2, ItemHierarchyResponse, type ItemOrgStageDetails, type ItemOrgStatus, ItemPartner, ItemSearchView, type ItemStatus, ItemStatusResponse, type ItemStatusV2, type ItemStatusV2Response, Locale, type OrgSummary, RetailerTradingPartnerStages, SpreadsheetTemplate, SpsItemIdResponse, type Stage, TradingPartnerAccessByCompanyId, UserAccount, VendorPartnerAttGroups, createAttributesApi, createCategoriesApi, createCompanyFeaturesApi, createErrorsApi, createErrorsApiV2, createExportsApi, createFeatureFlagsApi, createImportsApi, createItemsApi, createItemsApiV2, createLocaleApi, createProductTypesApi, createSpreadsheetTemplateApi, createTradingPartnerAccessApi, createTradingPartnerSettingsApi, createUniqueCriteriaApi, createWhoAmIApi };
|
package/dist/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
createCompaniesApi,
|
|
5
5
|
createCompanyFeaturesApi,
|
|
6
6
|
createErrorsApi,
|
|
7
|
+
createErrorsApiV2,
|
|
7
8
|
createExportsApi,
|
|
8
9
|
createFeatureFlagsApi,
|
|
9
10
|
createImportsApi,
|
|
@@ -15,75 +16,13 @@ import {
|
|
|
15
16
|
createTradingPartnerSettingsApi,
|
|
16
17
|
createUniqueCriteriaApi,
|
|
17
18
|
createWhoAmIApi
|
|
18
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-SFRJ3IYY.js";
|
|
19
20
|
import {
|
|
20
21
|
AsstClient,
|
|
21
22
|
BASE_URLS,
|
|
22
23
|
envSchema,
|
|
23
|
-
|
|
24
|
-
} from "./chunk-
|
|
25
|
-
|
|
26
|
-
// lib/items/v2/models/Stage.ts
|
|
27
|
-
var stageSchema = z.enum([
|
|
28
|
-
"CORE",
|
|
29
|
-
"CORE_PLUS",
|
|
30
|
-
"CORE_ADVANCED",
|
|
31
|
-
"ENRICHED"
|
|
32
|
-
]);
|
|
33
|
-
|
|
34
|
-
// lib/items/v2/models/OrgSummary.ts
|
|
35
|
-
var orgSummarySchema = z.object({
|
|
36
|
-
ref: z.string(),
|
|
37
|
-
id: z.string(),
|
|
38
|
-
name: z.string()
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
// lib/items/v2/models/ItemOrgStageDetails.ts
|
|
42
|
-
var itemOrgStageDetailsSchema = z.object({
|
|
43
|
-
/**
|
|
44
|
-
* When called as retailer, the vendor, else when vendor, the retailer.
|
|
45
|
-
* */
|
|
46
|
-
orgSummary: orgSummarySchema,
|
|
47
|
-
/**
|
|
48
|
-
* The company id of the retailer or vendor used for matching ItemOrgStageDetails to TradingPartnerStage for ErrorService
|
|
49
|
-
*/
|
|
50
|
-
companyId: z.number().nullish(),
|
|
51
|
-
/**
|
|
52
|
-
* "Standard Requirements" (null) UNLESS the retailer of the item is MSIS Enabled
|
|
53
|
-
* OTHERWISE the retailer default Stage UNLESS there's a currently active vendor-specific Stage defined
|
|
54
|
-
* OTHERWISE the trading partnership Stage UNLESS there's a currently active Item Level override defined
|
|
55
|
-
* OTHERWISE the item level override */
|
|
56
|
-
stage: stageSchema.nullish(),
|
|
57
|
-
/**
|
|
58
|
-
* If the item is valid for the active stage. Note that for "Standard Requirements" or
|
|
59
|
-
* "Enriched" this cam come directly from the item_doc table, but anything else requires validation
|
|
60
|
-
*/
|
|
61
|
-
isValid: z.boolean(),
|
|
62
|
-
/**
|
|
63
|
-
* Not null if there's an item level policy override for this trading partnership
|
|
64
|
-
*/
|
|
65
|
-
itemPolicyId: z.string().nullish(),
|
|
66
|
-
/**
|
|
67
|
-
* Start date for the Item level Stage if applicable
|
|
68
|
-
*/
|
|
69
|
-
startDate: z.number().pipe(z.coerce.date()).nullish(),
|
|
70
|
-
/**
|
|
71
|
-
* End date for the Item level Stage if applicable
|
|
72
|
-
*/
|
|
73
|
-
endDate: z.number().pipe(z.coerce.date()).nullish()
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
// lib/items/v2/models/ItemStatusV2.ts
|
|
77
|
-
var itemStatusV2Schema = z.object({
|
|
78
|
-
itemId: z.string(),
|
|
79
|
-
mostRestrictiveRetailerStage: stageSchema.nullable(),
|
|
80
|
-
itemOrgStageDetails: z.array(itemOrgStageDetailsSchema)
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
// lib/items/v2/models/ItemStatusV2Response.ts
|
|
84
|
-
var itemStatusV2ResponseSchema = z.object({
|
|
85
|
-
itemStatuses: z.array(itemStatusV2Schema)
|
|
86
|
-
});
|
|
24
|
+
itemStatusV2ResponseSchema
|
|
25
|
+
} from "./chunk-3EK6JHC5.js";
|
|
87
26
|
|
|
88
27
|
// lib/items/v2/index.ts
|
|
89
28
|
var BASE_URL = "v2/items";
|
|
@@ -104,6 +43,7 @@ export {
|
|
|
104
43
|
createCompaniesApi,
|
|
105
44
|
createCompanyFeaturesApi,
|
|
106
45
|
createErrorsApi,
|
|
46
|
+
createErrorsApiV2,
|
|
107
47
|
createExportsApi,
|
|
108
48
|
createFeatureFlagsApi,
|
|
109
49
|
createImportsApi,
|