@spscommerce/asst-api 0.0.1-beta.8 → 0.0.1-beta.9
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/ImportsStatus-52d26b01.d.ts +134 -0
- package/dist/ImportsStatusEnum-22c03a0b.d.ts +51 -0
- package/dist/ItemCategoriesSearch-1bb945de.d.ts +275 -0
- package/dist/ItemCategoriesSearch-44b87663.d.ts +318 -0
- package/dist/ItemCategoriesSearch-e0870a34.d.ts +318 -0
- package/dist/ItemCategoriesSearch-e3298650.d.ts +319 -0
- package/dist/ItemCategoriesSearch-ec43591f.d.ts +319 -0
- package/dist/ItemCategory-14816deb.d.ts +99 -0
- package/dist/ItemCategory-768179bd.d.ts +99 -0
- package/dist/ItemErrorDetails-1bd2821e.d.ts +3137 -0
- package/dist/ItemErrorDetails-e6e400aa.d.ts +3197 -0
- package/dist/ItemErrorDetailsResult-0b4a628c.d.ts +3032 -0
- package/dist/ItemErrorDetailsResult-859368da.d.ts +3032 -0
- package/dist/ItemErrorDetailsResult-9ac97c24.d.ts +3032 -0
- package/dist/ItemErrorDetailsResult-c62caeae.d.ts +3092 -0
- package/dist/TradingPartnerAccessByCompanyId-29866586.d.ts +97 -0
- package/dist/TradingPartnerAccessByCompanyId-43f83fb6.d.ts +130 -0
- package/dist/TradingPartnerAccessByCompanyId-479e3e57.d.ts +124 -0
- package/dist/TradingPartnerAccessByCompanyId-53b868a8.d.ts +125 -0
- package/dist/TradingPartnerAccessByCompanyId-b227f0c5.d.ts +125 -0
- package/dist/TradingPartnerAccessByCompanyId-e7a1d443.d.ts +129 -0
- package/dist/asstClient-f6a1693a.d.ts +29 -0
- package/dist/chunk-3FMMM7IS.js +80 -0
- package/dist/chunk-4WER3ZLX.js +4576 -0
- package/dist/chunk-6ZNFOWTV.js +78 -0
- package/dist/chunk-7HCJJATJ.js +40 -0
- package/dist/chunk-B7B2ACF4.js +3794 -0
- package/dist/chunk-D3ML6E4G.js +3787 -0
- package/dist/chunk-ETURPA7W.js +326 -0
- package/dist/chunk-F3KCLICG.js +77 -0
- package/dist/chunk-FS6LHGAR.js +87 -0
- package/dist/chunk-G36FM5OA.js +327 -0
- package/dist/chunk-GDFX3WTX.js +78 -0
- package/dist/chunk-IHIEBLQV.js +4576 -0
- package/dist/chunk-ITWMRXLD.js +328 -0
- package/dist/chunk-LGP22FRF.js +0 -0
- package/dist/chunk-LYMGZWSR.js +80 -0
- package/dist/chunk-N2OYWNHF.js +80 -0
- package/dist/chunk-OA6PO3QG.js +78 -0
- package/dist/chunk-OBXZRDPY.js +77 -0
- package/dist/chunk-OI47EFQH.js +82 -0
- package/dist/chunk-RNUSCCKB.js +183 -0
- package/dist/chunk-RRGAJ4ZS.js +4576 -0
- package/dist/chunk-T3UCSW2B.js +81 -0
- package/dist/chunk-XMNYZGXF.js +84 -0
- package/dist/chunk-YCQUK6KV.js +85 -0
- package/dist/index.cjs +10 -8
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2 -2
- package/dist/msw.cjs +4 -4
- package/dist/msw.d.ts +41 -25
- package/dist/msw.js +2 -2
- package/dist/zod.cjs +4 -4
- package/dist/zod.d.ts +2 -2
- package/dist/zod.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import {
|
|
2
|
+
z
|
|
3
|
+
} from "./chunk-D3ML6E4G.js";
|
|
4
|
+
|
|
5
|
+
// lib/asstClient.ts
|
|
6
|
+
import ky from "ky-universal";
|
|
7
|
+
var baseUrlsSchema = z.object({
|
|
8
|
+
local: z.literal("https://localhost:8443"),
|
|
9
|
+
test: z.literal("https://integration.api.spscommerce.com/assortment/gateway"),
|
|
10
|
+
prod: z.literal("https://api.spscommerce.com/assortment/gateway")
|
|
11
|
+
});
|
|
12
|
+
var BASE_URLS = {
|
|
13
|
+
local: "https://localhost:8443",
|
|
14
|
+
test: "https://integration.api.spscommerce.com/assortment/gateway",
|
|
15
|
+
prod: "https://api.spscommerce.com/assortment/gateway"
|
|
16
|
+
};
|
|
17
|
+
var envSchema = baseUrlsSchema.keyof();
|
|
18
|
+
var AsstClient = class {
|
|
19
|
+
#client = ky.create({
|
|
20
|
+
prefixUrl: BASE_URLS["test"],
|
|
21
|
+
retry: 0
|
|
22
|
+
});
|
|
23
|
+
#baseUrl = BASE_URLS["test"];
|
|
24
|
+
#subscriptionCallback;
|
|
25
|
+
#currentConfig = {};
|
|
26
|
+
constructor(options) {
|
|
27
|
+
console.log(`AsstClient created! Config: ${options ? JSON.stringify(options) : "default"}`);
|
|
28
|
+
if (options) {
|
|
29
|
+
this.updateConfig(options);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
updateConfig(options) {
|
|
33
|
+
this.#client = this.#client.extend(options);
|
|
34
|
+
this.#currentConfig = options;
|
|
35
|
+
if (options.prefixUrl) {
|
|
36
|
+
this.#baseUrl = options.prefixUrl;
|
|
37
|
+
}
|
|
38
|
+
if (this.#subscriptionCallback) {
|
|
39
|
+
this.#subscriptionCallback(options);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
getBaseUrl() {
|
|
43
|
+
return this.#baseUrl;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Subscribe to config changes. The callback will be immediately invoked with the current config.
|
|
47
|
+
* @param subscriptionCallback Function that will be called with the new config every time it is changed
|
|
48
|
+
*/
|
|
49
|
+
subscribeToConfigChange(subscriptionCallback) {
|
|
50
|
+
console.log(`Subscription added`);
|
|
51
|
+
this.#subscriptionCallback = subscriptionCallback;
|
|
52
|
+
subscriptionCallback(this.#currentConfig);
|
|
53
|
+
}
|
|
54
|
+
unsubscribeToConfigChange() {
|
|
55
|
+
this.#subscriptionCallback = void 0;
|
|
56
|
+
}
|
|
57
|
+
get(url, options) {
|
|
58
|
+
return this.#client.get(url, options);
|
|
59
|
+
}
|
|
60
|
+
post(url, options) {
|
|
61
|
+
return this.#client.post(url, options);
|
|
62
|
+
}
|
|
63
|
+
put(url, options) {
|
|
64
|
+
return this.#client.put(url, options);
|
|
65
|
+
}
|
|
66
|
+
patch(url, options) {
|
|
67
|
+
return this.#client.patch(url, options);
|
|
68
|
+
}
|
|
69
|
+
head(url, options) {
|
|
70
|
+
return this.#client.head(url, options);
|
|
71
|
+
}
|
|
72
|
+
delete(url, options) {
|
|
73
|
+
return this.#client.delete(url, options);
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export {
|
|
78
|
+
BASE_URLS,
|
|
79
|
+
envSchema,
|
|
80
|
+
AsstClient
|
|
81
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import {
|
|
2
|
+
z
|
|
3
|
+
} from "./chunk-D3ML6E4G.js";
|
|
4
|
+
|
|
5
|
+
// lib/asstClient.ts
|
|
6
|
+
import ky from "ky-universal";
|
|
7
|
+
var baseUrlsSchema = z.object({
|
|
8
|
+
local: z.literal("https://localhost:8443"),
|
|
9
|
+
test: z.literal("https://integration.api.spscommerce.com/assortment/gateway"),
|
|
10
|
+
prod: z.literal("https://api.spscommerce.com/assortment/gateway")
|
|
11
|
+
});
|
|
12
|
+
var BASE_URLS = {
|
|
13
|
+
local: "https://localhost:8443",
|
|
14
|
+
test: "https://integration.api.spscommerce.com/assortment/gateway",
|
|
15
|
+
prod: "https://api.spscommerce.com/assortment/gateway"
|
|
16
|
+
};
|
|
17
|
+
var envSchema = baseUrlsSchema.keyof();
|
|
18
|
+
var initialConfig = {
|
|
19
|
+
prefixUrl: BASE_URLS["test"],
|
|
20
|
+
retry: 0
|
|
21
|
+
};
|
|
22
|
+
var AsstClient = class {
|
|
23
|
+
#client = ky.create(initialConfig);
|
|
24
|
+
#baseUrl = BASE_URLS["test"];
|
|
25
|
+
#subscriptionCallback;
|
|
26
|
+
#currentConfig = initialConfig;
|
|
27
|
+
constructor(options) {
|
|
28
|
+
console.log(
|
|
29
|
+
`AsstClient created! Config: ${options ? JSON.stringify(options) : "default"}`
|
|
30
|
+
);
|
|
31
|
+
if (options) {
|
|
32
|
+
this.updateConfig(options);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
updateConfig(options) {
|
|
36
|
+
this.#client = this.#client.extend(options);
|
|
37
|
+
this.#currentConfig = options;
|
|
38
|
+
if (options.prefixUrl) {
|
|
39
|
+
this.#baseUrl = options.prefixUrl;
|
|
40
|
+
}
|
|
41
|
+
if (this.#subscriptionCallback) {
|
|
42
|
+
this.#subscriptionCallback(options);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
getBaseUrl() {
|
|
46
|
+
return this.#baseUrl;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Subscribe to config changes. The callback will be immediately invoked with the current config.
|
|
50
|
+
* @param subscriptionCallback Function that will be called with the new config every time it is changed
|
|
51
|
+
*/
|
|
52
|
+
subscribeToConfigChange(subscriptionCallback) {
|
|
53
|
+
console.log(`Subscription added`);
|
|
54
|
+
this.#subscriptionCallback = subscriptionCallback;
|
|
55
|
+
subscriptionCallback(this.#currentConfig);
|
|
56
|
+
}
|
|
57
|
+
unsubscribeToConfigChange() {
|
|
58
|
+
this.#subscriptionCallback = void 0;
|
|
59
|
+
}
|
|
60
|
+
get(url, options) {
|
|
61
|
+
return this.#client.get(url, options);
|
|
62
|
+
}
|
|
63
|
+
post(url, options) {
|
|
64
|
+
return this.#client.post(url, options);
|
|
65
|
+
}
|
|
66
|
+
put(url, options) {
|
|
67
|
+
return this.#client.put(url, options);
|
|
68
|
+
}
|
|
69
|
+
patch(url, options) {
|
|
70
|
+
return this.#client.patch(url, options);
|
|
71
|
+
}
|
|
72
|
+
head(url, options) {
|
|
73
|
+
return this.#client.head(url, options);
|
|
74
|
+
}
|
|
75
|
+
delete(url, options) {
|
|
76
|
+
return this.#client.delete(url, options);
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export {
|
|
81
|
+
BASE_URLS,
|
|
82
|
+
envSchema,
|
|
83
|
+
AsstClient
|
|
84
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import {
|
|
2
|
+
z
|
|
3
|
+
} from "./chunk-D3ML6E4G.js";
|
|
4
|
+
|
|
5
|
+
// lib/asstClient.ts
|
|
6
|
+
import ky from "ky-universal";
|
|
7
|
+
var baseUrlsSchema = z.object({
|
|
8
|
+
local: z.literal("https://localhost:8443"),
|
|
9
|
+
test: z.literal("https://integration.api.spscommerce.com/assortment/gateway"),
|
|
10
|
+
prod: z.literal("https://api.spscommerce.com/assortment/gateway")
|
|
11
|
+
});
|
|
12
|
+
var BASE_URLS = {
|
|
13
|
+
local: "https://localhost:8443",
|
|
14
|
+
test: "https://integration.api.spscommerce.com/assortment/gateway",
|
|
15
|
+
prod: "https://api.spscommerce.com/assortment/gateway"
|
|
16
|
+
};
|
|
17
|
+
var envSchema = baseUrlsSchema.keyof();
|
|
18
|
+
var initialConfig = {
|
|
19
|
+
prefixUrl: BASE_URLS["test"],
|
|
20
|
+
retry: 0
|
|
21
|
+
};
|
|
22
|
+
var AsstClient = class {
|
|
23
|
+
#client = ky.create(initialConfig);
|
|
24
|
+
#baseUrl = BASE_URLS["test"];
|
|
25
|
+
#subscriptionCallback;
|
|
26
|
+
#currentConfig = initialConfig;
|
|
27
|
+
constructor(options) {
|
|
28
|
+
console.log(
|
|
29
|
+
`AsstClient created! Config: ${options ? JSON.stringify(options) : "default"}`
|
|
30
|
+
);
|
|
31
|
+
if (options) {
|
|
32
|
+
this.updateConfig(options);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
updateConfig(options) {
|
|
36
|
+
console.log(`Config updated! ${JSON.stringify(options)}`);
|
|
37
|
+
this.#client = this.#client.extend(options);
|
|
38
|
+
this.#currentConfig = options;
|
|
39
|
+
if (options.prefixUrl) {
|
|
40
|
+
this.#baseUrl = options.prefixUrl;
|
|
41
|
+
}
|
|
42
|
+
if (this.#subscriptionCallback) {
|
|
43
|
+
this.#subscriptionCallback(options);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
getBaseUrl() {
|
|
47
|
+
return this.#baseUrl;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Subscribe to config changes. The callback will be immediately invoked with the current config.
|
|
51
|
+
* @param subscriptionCallback Function that will be called with the new config every time it is changed
|
|
52
|
+
*/
|
|
53
|
+
subscribeToConfigChange(subscriptionCallback) {
|
|
54
|
+
console.log(`Subscription added`);
|
|
55
|
+
this.#subscriptionCallback = subscriptionCallback;
|
|
56
|
+
subscriptionCallback(this.#currentConfig);
|
|
57
|
+
}
|
|
58
|
+
unsubscribeToConfigChange() {
|
|
59
|
+
this.#subscriptionCallback = void 0;
|
|
60
|
+
}
|
|
61
|
+
get(url, options) {
|
|
62
|
+
return this.#client.get(url, options);
|
|
63
|
+
}
|
|
64
|
+
post(url, options) {
|
|
65
|
+
return this.#client.post(url, options);
|
|
66
|
+
}
|
|
67
|
+
put(url, options) {
|
|
68
|
+
return this.#client.put(url, options);
|
|
69
|
+
}
|
|
70
|
+
patch(url, options) {
|
|
71
|
+
return this.#client.patch(url, options);
|
|
72
|
+
}
|
|
73
|
+
head(url, options) {
|
|
74
|
+
return this.#client.head(url, options);
|
|
75
|
+
}
|
|
76
|
+
delete(url, options) {
|
|
77
|
+
return this.#client.delete(url, options);
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export {
|
|
82
|
+
BASE_URLS,
|
|
83
|
+
envSchema,
|
|
84
|
+
AsstClient
|
|
85
|
+
};
|
package/dist/index.cjs
CHANGED
|
@@ -3901,7 +3901,8 @@ function createImportsApi(client) {
|
|
|
3901
3901
|
searchParams: params,
|
|
3902
3902
|
headers: {
|
|
3903
3903
|
Accept: "application/octet-stream"
|
|
3904
|
-
}
|
|
3904
|
+
},
|
|
3905
|
+
timeout: false
|
|
3905
3906
|
});
|
|
3906
3907
|
const disposition = response.headers.get("content-disposition") || "";
|
|
3907
3908
|
const filename = disposition.match(/filename="(.+)"/)?.[1];
|
|
@@ -3940,7 +3941,8 @@ function createExportsApi(client) {
|
|
|
3940
3941
|
searchParams,
|
|
3941
3942
|
headers: {
|
|
3942
3943
|
Accept: "application/octet-stream"
|
|
3943
|
-
}
|
|
3944
|
+
},
|
|
3945
|
+
timeout: false
|
|
3944
3946
|
});
|
|
3945
3947
|
const disposition = response.headers.get("content-disposition") || "";
|
|
3946
3948
|
const filename = disposition.match(/filename="(.+)"/)?.[1];
|
|
@@ -3993,7 +3995,7 @@ function createProductTypesApi(client) {
|
|
|
3993
3995
|
// lib/tradingPartners/models/Connection.ts
|
|
3994
3996
|
var connectionSchema = z.object({
|
|
3995
3997
|
catalog_id: z.number(),
|
|
3996
|
-
catalog_name: z.string(),
|
|
3998
|
+
catalog_name: z.string().nullable(),
|
|
3997
3999
|
partner_company_name: z.string(),
|
|
3998
4000
|
partner_company_id: z.number()
|
|
3999
4001
|
});
|
|
@@ -4477,10 +4479,10 @@ var itemMapSchema = z.object({
|
|
|
4477
4479
|
consumeravailabledatestring: z.string().nullish(),
|
|
4478
4480
|
status: z.string().nullish(),
|
|
4479
4481
|
nrfcolorcode: z.array(z.string()).nullish(),
|
|
4480
|
-
nrfsizecode: z.string().nullish(),
|
|
4482
|
+
nrfsizecode: z.array(z.string()).nullish(),
|
|
4481
4483
|
productcolordescription: z.array(z.string()).nullish(),
|
|
4482
4484
|
productsizedescription: z.array(z.string()).nullish()
|
|
4483
|
-
});
|
|
4485
|
+
}).passthrough();
|
|
4484
4486
|
|
|
4485
4487
|
// lib/items/models/ItemTable.ts
|
|
4486
4488
|
var itemTableSchema = z.object({
|
|
@@ -4552,7 +4554,7 @@ var downLoadItemsParamsSchema = z.object({
|
|
|
4552
4554
|
// lib/errors/models/ItemErrorDetails.ts
|
|
4553
4555
|
var itemErrorDetailsSchema = z.object({
|
|
4554
4556
|
errorMessage: z.string(),
|
|
4555
|
-
attributeName: z.string(),
|
|
4557
|
+
attributeName: z.string().nullable(),
|
|
4556
4558
|
tradingPartnerNames: z.array(z.string()),
|
|
4557
4559
|
phases: z.array(phaseEnumSchema),
|
|
4558
4560
|
attributeDbNames: z.array(z.string()),
|
|
@@ -4789,7 +4791,7 @@ function createItemsApi(client) {
|
|
|
4789
4791
|
return itemDetailViewSchema.parse(data);
|
|
4790
4792
|
}
|
|
4791
4793
|
async function updateItem(itemId, item) {
|
|
4792
|
-
client.put(`${BASE_URL11}/details/${itemId}`, { json: { item } }).json();
|
|
4794
|
+
await client.put(`${BASE_URL11}/details/${itemId}`, { json: { ...item } }).json();
|
|
4793
4795
|
}
|
|
4794
4796
|
async function deleteItem(itemId) {
|
|
4795
4797
|
await client.delete(`${BASE_URL11}/${itemId}`);
|
|
@@ -4799,7 +4801,7 @@ function createItemsApi(client) {
|
|
|
4799
4801
|
itemIds.forEach((id) => {
|
|
4800
4802
|
params.append("items", id);
|
|
4801
4803
|
});
|
|
4802
|
-
await client.delete(`${BASE_URL11}
|
|
4804
|
+
await client.delete(`${BASE_URL11}`, { searchParams: params });
|
|
4803
4805
|
}
|
|
4804
4806
|
return {
|
|
4805
4807
|
searchItems,
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { A as AsstClient, I as Import, a as ImportsStatus, V as VendorPartnerAttGroups, E as Export, b as AttrProdType, T as TradingPartnerAccessByCompanyId, c as ItemCategoriesSearch, d as AttributeMetaData, e as AttributesByCompany, f as AttributeDefinition, g as AttributeValidValues, L as Locale, S as SpreadsheetTemplate, U as UserAccount, h as ItemSearchView, i as ItemDetailView, j as ItemErrorDetailsResult } from './ItemErrorDetailsResult-
|
|
2
|
-
export { k as AsstClientOptions, l as AsstUrl, B as BASE_URLS, m as Env, n as ImportErrors } from './ItemErrorDetailsResult-
|
|
3
|
-
import { G as GenerateImportTemplateParams, D as DownLoadItemsParams, I as ItemDetail } from './ItemErrorDetails-
|
|
4
|
-
export { g as AttrDatatypeNameEnum, q as AttributeDetail, h as AttributeGroup, A as AttributeSummary, B as Bulb, r as CategoryEnum, s as ComponentDetails, C as Connection, E as ExportDayOfWeek, d as ExportFrequency, e as ExportType, t as GroupedAttributeList, u as GroupedAttributes, v as GroupedItem, H as HierarchyCategory, w as HierarchyDetails, j as IdentityServiceDatetimePreferences, k as IdentityServiceOrganization, i as IdentityServiceOrganizationMetadata, l as IdentityServicePreferences, m as IdentityServiceUser, a as ImportDetails, b as ImportError, c as ImportStatusEnum, f as ItemCategory, K as ItemErrorDetails, n as ItemHeader, o as ItemMap, x as ItemPrice, p as ItemTable, M as MediaItem, z as PackComponent, y as PackComponentDetails, J as PackComponentItemInfo, P as PhaseEnum, R as RegisteredService, F as RepeatableGroup, S as SpreadsheetTemplateCompany, T as TradingPartnerStage } from './ItemErrorDetails-
|
|
1
|
+
import { A as AsstClient, I as Import, a as ImportsStatus, V as VendorPartnerAttGroups, E as Export, b as AttrProdType, T as TradingPartnerAccessByCompanyId, c as ItemCategoriesSearch, d as AttributeMetaData, e as AttributesByCompany, f as AttributeDefinition, g as AttributeValidValues, L as Locale, S as SpreadsheetTemplate, U as UserAccount, h as ItemSearchView, i as ItemDetailView, j as ItemErrorDetailsResult } from './ItemErrorDetailsResult-c62caeae.js';
|
|
2
|
+
export { k as AsstClientOptions, l as AsstUrl, B as BASE_URLS, m as Env, n as ImportErrors } from './ItemErrorDetailsResult-c62caeae.js';
|
|
3
|
+
import { G as GenerateImportTemplateParams, D as DownLoadItemsParams, I as ItemDetail } from './ItemErrorDetails-e6e400aa.js';
|
|
4
|
+
export { g as AttrDatatypeNameEnum, q as AttributeDetail, h as AttributeGroup, A as AttributeSummary, B as Bulb, r as CategoryEnum, s as ComponentDetails, C as Connection, E as ExportDayOfWeek, d as ExportFrequency, e as ExportType, t as GroupedAttributeList, u as GroupedAttributes, v as GroupedItem, H as HierarchyCategory, w as HierarchyDetails, j as IdentityServiceDatetimePreferences, k as IdentityServiceOrganization, i as IdentityServiceOrganizationMetadata, l as IdentityServicePreferences, m as IdentityServiceUser, a as ImportDetails, b as ImportError, c as ImportStatusEnum, f as ItemCategory, K as ItemErrorDetails, n as ItemHeader, o as ItemMap, x as ItemPrice, p as ItemTable, M as MediaItem, z as PackComponent, y as PackComponentDetails, J as PackComponentItemInfo, P as PhaseEnum, R as RegisteredService, F as RepeatableGroup, S as SpreadsheetTemplateCompany, T as TradingPartnerStage } from './ItemErrorDetails-e6e400aa.js';
|
|
5
5
|
import 'ky-universal';
|
|
6
6
|
import 'ky';
|
|
7
7
|
import 'zod';
|
package/dist/index.js
CHANGED
|
@@ -11,11 +11,11 @@ import {
|
|
|
11
11
|
createSpreadsheetTemplateApi,
|
|
12
12
|
createTradingPartnerAccessApi,
|
|
13
13
|
createWhoAmIApi
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-ITWMRXLD.js";
|
|
15
15
|
import {
|
|
16
16
|
AsstClient,
|
|
17
17
|
BASE_URLS
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-IHIEBLQV.js";
|
|
19
19
|
export {
|
|
20
20
|
AsstClient,
|
|
21
21
|
BASE_URLS,
|
package/dist/msw.cjs
CHANGED
|
@@ -4004,7 +4004,7 @@ var import_msw5 = require("msw");
|
|
|
4004
4004
|
// lib/tradingPartners/models/Connection.ts
|
|
4005
4005
|
var connectionSchema = z.object({
|
|
4006
4006
|
catalog_id: z.number(),
|
|
4007
|
-
catalog_name: z.string(),
|
|
4007
|
+
catalog_name: z.string().nullable(),
|
|
4008
4008
|
partner_company_name: z.string(),
|
|
4009
4009
|
partner_company_id: z.number()
|
|
4010
4010
|
});
|
|
@@ -4205,10 +4205,10 @@ var itemMapSchema = z.object({
|
|
|
4205
4205
|
consumeravailabledatestring: z.string().nullish(),
|
|
4206
4206
|
status: z.string().nullish(),
|
|
4207
4207
|
nrfcolorcode: z.array(z.string()).nullish(),
|
|
4208
|
-
nrfsizecode: z.string().nullish(),
|
|
4208
|
+
nrfsizecode: z.array(z.string()).nullish(),
|
|
4209
4209
|
productcolordescription: z.array(z.string()).nullish(),
|
|
4210
4210
|
productsizedescription: z.array(z.string()).nullish()
|
|
4211
|
-
});
|
|
4211
|
+
}).passthrough();
|
|
4212
4212
|
|
|
4213
4213
|
// lib/items/models/ItemTable.ts
|
|
4214
4214
|
var itemTableSchema = z.object({
|
|
@@ -4683,7 +4683,7 @@ var itemDetailSchema = z.object({
|
|
|
4683
4683
|
// lib/errors/models/ItemErrorDetails.ts
|
|
4684
4684
|
var itemErrorDetailsSchema = z.object({
|
|
4685
4685
|
errorMessage: z.string(),
|
|
4686
|
-
attributeName: z.string(),
|
|
4686
|
+
attributeName: z.string().nullable(),
|
|
4687
4687
|
tradingPartnerNames: z.array(z.string()),
|
|
4688
4688
|
phases: z.array(phaseEnumSchema),
|
|
4689
4689
|
attributeDbNames: z.array(z.string()),
|
package/dist/msw.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
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, n as ImportErrors, I as Import, a as ImportsStatus, V as VendorPartnerAttGroups, c as ItemCategoriesSearch, E as Export, o as attrProdTypeSchema, T as TradingPartnerAccessByCompanyId, U as UserAccount, j as ItemErrorDetailsResult, L as Locale, h as ItemSearchView, i as ItemDetailView, d as AttributeMetaData, e as AttributesByCompany, f as AttributeDefinition, g as AttributeValidValues, S as SpreadsheetTemplate } from './ItemErrorDetailsResult-
|
|
4
|
+
import { A as AsstClient, n as ImportErrors, I as Import, a as ImportsStatus, V as VendorPartnerAttGroups, c as ItemCategoriesSearch, E as Export, o as attrProdTypeSchema, T as TradingPartnerAccessByCompanyId, U as UserAccount, j as ItemErrorDetailsResult, L as Locale, h as ItemSearchView, i as ItemDetailView, d as AttributeMetaData, e as AttributesByCompany, f as AttributeDefinition, g as AttributeValidValues, S as SpreadsheetTemplate } from './ItemErrorDetailsResult-c62caeae.js';
|
|
5
|
+
import * as zod from 'zod';
|
|
5
6
|
import { z } from 'zod';
|
|
6
7
|
import 'ky-universal';
|
|
7
8
|
import 'ky';
|
|
@@ -175,7 +176,7 @@ declare function createTradingPartnerAccessApiHandlers(client: AsstClient): {
|
|
|
175
176
|
companyName: string;
|
|
176
177
|
connections: {
|
|
177
178
|
catalog_id: number;
|
|
178
|
-
catalog_name: string;
|
|
179
|
+
catalog_name: string | null;
|
|
179
180
|
partner_company_name: string;
|
|
180
181
|
partner_company_id: number;
|
|
181
182
|
}[];
|
|
@@ -287,7 +288,7 @@ declare function createErrorsApiHandlers(client: AsstClient): {
|
|
|
287
288
|
stage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
|
|
288
289
|
isValid: boolean;
|
|
289
290
|
}[];
|
|
290
|
-
attributeName: string;
|
|
291
|
+
attributeName: string | null;
|
|
291
292
|
errorMessage: string;
|
|
292
293
|
tradingPartnerNames: string[];
|
|
293
294
|
phases: ("CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS")[];
|
|
@@ -348,32 +349,47 @@ declare function createItemsApiHandlers(client: AsstClient): {
|
|
|
348
349
|
itemInfoId: string;
|
|
349
350
|
status?: string | undefined;
|
|
350
351
|
};
|
|
351
|
-
itemMaps: {
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
tradingPartnerStages
|
|
352
|
+
itemMaps: zod.objectOutputType<{
|
|
353
|
+
rn: zod.ZodOptional<zod.ZodNumber>;
|
|
354
|
+
iteminfoid: zod.ZodString;
|
|
355
|
+
tradingPartnerStages: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
356
|
+
companyId: zod.ZodNumber;
|
|
357
|
+
companyName: zod.ZodString;
|
|
358
|
+
stage: zod.ZodNullable<zod.ZodEnum<["CORE", "CORE_PLUS", "CORE_ADVANCED", "ENRICHED", "STANDARD_REQUIREMENTS"]>>;
|
|
359
|
+
isValid: zod.ZodBoolean;
|
|
360
|
+
}, "strip", zod.ZodTypeAny, {
|
|
355
361
|
companyId: number;
|
|
356
362
|
companyName: string;
|
|
357
363
|
stage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
|
|
358
364
|
isValid: boolean;
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
365
|
+
}, {
|
|
366
|
+
companyId: number;
|
|
367
|
+
companyName: string;
|
|
368
|
+
stage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
|
|
369
|
+
isValid: boolean;
|
|
370
|
+
}>, "many">>;
|
|
371
|
+
gtin: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
372
|
+
catalogname: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
373
|
+
isbn: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
374
|
+
lastupdateddatestring: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
375
|
+
upc: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
376
|
+
productcodename: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
377
|
+
ean: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
378
|
+
selectioncodename: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
379
|
+
createddatestring: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
380
|
+
/**
|
|
381
|
+
* Get MSW handler for `searchItems` api
|
|
382
|
+
* @param resolver MSW resolver function
|
|
383
|
+
* @returns MSW handler
|
|
384
|
+
*/
|
|
385
|
+
partnumber: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
386
|
+
consumeravailabledatestring: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
387
|
+
status: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
388
|
+
nrfcolorcode: zod.ZodOptional<zod.ZodNullable<zod.ZodArray<zod.ZodString, "many">>>;
|
|
389
|
+
nrfsizecode: zod.ZodOptional<zod.ZodNullable<zod.ZodArray<zod.ZodString, "many">>>;
|
|
390
|
+
productcolordescription: zod.ZodOptional<zod.ZodNullable<zod.ZodArray<zod.ZodString, "many">>>;
|
|
391
|
+
productsizedescription: zod.ZodOptional<zod.ZodNullable<zod.ZodArray<zod.ZodString, "many">>>;
|
|
392
|
+
}, zod.ZodTypeAny, "passthrough">[];
|
|
377
393
|
};
|
|
378
394
|
};
|
|
379
395
|
};
|
package/dist/msw.js
CHANGED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
BASE_URL8,
|
|
13
13
|
BASE_URL9,
|
|
14
14
|
BASE_URL_V2
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-ITWMRXLD.js";
|
|
16
16
|
import {
|
|
17
17
|
attrProdTypeSchema,
|
|
18
18
|
attributeDefinitionSchema,
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
userAccountSchema,
|
|
34
34
|
vendorPartnerAttGroupsSchema,
|
|
35
35
|
z
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-IHIEBLQV.js";
|
|
37
37
|
|
|
38
38
|
// lib/imports/mockHandlers.ts
|
|
39
39
|
import { generateMock } from "@anatine/zod-mock";
|
package/dist/zod.cjs
CHANGED
|
@@ -4148,10 +4148,10 @@ var itemMapSchema = z.object({
|
|
|
4148
4148
|
consumeravailabledatestring: z.string().nullish(),
|
|
4149
4149
|
status: z.string().nullish(),
|
|
4150
4150
|
nrfcolorcode: z.array(z.string()).nullish(),
|
|
4151
|
-
nrfsizecode: z.string().nullish(),
|
|
4151
|
+
nrfsizecode: z.array(z.string()).nullish(),
|
|
4152
4152
|
productcolordescription: z.array(z.string()).nullish(),
|
|
4153
4153
|
productsizedescription: z.array(z.string()).nullish()
|
|
4154
|
-
});
|
|
4154
|
+
}).passthrough();
|
|
4155
4155
|
|
|
4156
4156
|
// lib/items/models/ItemTable.ts
|
|
4157
4157
|
var itemTableSchema = z.object({
|
|
@@ -4412,7 +4412,7 @@ var spreadsheetTemplateSchema = z.object({
|
|
|
4412
4412
|
// lib/tradingPartners/models/Connection.ts
|
|
4413
4413
|
var connectionSchema = z.object({
|
|
4414
4414
|
catalog_id: z.number(),
|
|
4415
|
-
catalog_name: z.string(),
|
|
4415
|
+
catalog_name: z.string().nullable(),
|
|
4416
4416
|
partner_company_name: z.string(),
|
|
4417
4417
|
partner_company_id: z.number()
|
|
4418
4418
|
});
|
|
@@ -4523,7 +4523,7 @@ var userAccountSchema = z.object({
|
|
|
4523
4523
|
// lib/errors/models/ItemErrorDetails.ts
|
|
4524
4524
|
var itemErrorDetailsSchema = z.object({
|
|
4525
4525
|
errorMessage: z.string(),
|
|
4526
|
-
attributeName: z.string(),
|
|
4526
|
+
attributeName: z.string().nullable(),
|
|
4527
4527
|
tradingPartnerNames: z.array(z.string()),
|
|
4528
4528
|
phases: z.array(phaseEnumSchema),
|
|
4529
4529
|
attributeDbNames: z.array(z.string()),
|
package/dist/zod.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { o as attrProdTypeSchema, w as attributeDefinitionSchema, x as attributeMetaDataSchema, z as attributeValidValuesSchema, y as attributesByCompanySchema, p as envSchema, t as exportSchema, q as importErrorsSchema, r as importSchema, s as importsStatusSchema, u as itemCategoriesSearchSchema, D as itemDetailViewSchema, K as itemErrorDetailsResultSchema, C as itemSearchViewSchema, F as localeSchema, G as spreadsheetTemplateSchema, H as tradingPartnerAccessByCompanyIdSchema, J as userAccountSchema, v as vendorPartnerAttGroupsSchema } from './ItemErrorDetailsResult-
|
|
2
|
-
export { Z as attrDatatypeNameEnumSchema, ac as attributeDetailSchema, _ as attributeGroupSchema, $ as attributeSummarySchema, a5 as bulbSchema, aa as categoryEnumSchema, ae as componentDetailsSchema, am as connectionSchema, X as downLoadItemsParamsSchema, U as exportDayOfWeekEnum, V as exportFrequencyEnum, W as exportTypeEnum, Q as generateImportTemplateParamsSchema, ai as groupedAttributeListSchema, ag as groupedAttributesSchema, a9 as groupedItemSchema, ah as hierarchyCategorySchema, af as hierarchyDetailsSchema, an as identityServiceDatetimePreferencesSchema, ao as identityServiceOrganizationMetadataSchema, ap as identityServiceOrganizationSchema, aq as identityServicePreferencesSchema, ar as identityServiceUserSchema, L as importDetailSchema, N as importErrorSchema, O as importStatusEnumSchema, Y as itemCategorySchema, a8 as itemDetailSchema, at as itemErrorDetailsSchema, a0 as itemHeaderSchema, a1 as itemMapSchema, a6 as itemPriceSchema, a2 as itemTableSchema, a7 as mediaItemSchema, aj as packComponentDetailsSchema, ak as packComponentItemInfoSchema, ab as packComponentSchema, a3 as phaseEnumSchema, as as registeredServiceSchema, ad as repeatableGroupSchema, al as spreadsheetTemplateCompanySchema, a4 as tradingPartnerStageSchema } from './ItemErrorDetails-
|
|
1
|
+
export { o as attrProdTypeSchema, w as attributeDefinitionSchema, x as attributeMetaDataSchema, z as attributeValidValuesSchema, y as attributesByCompanySchema, p as envSchema, t as exportSchema, q as importErrorsSchema, r as importSchema, s as importsStatusSchema, u as itemCategoriesSearchSchema, D as itemDetailViewSchema, K as itemErrorDetailsResultSchema, C as itemSearchViewSchema, F as localeSchema, G as spreadsheetTemplateSchema, H as tradingPartnerAccessByCompanyIdSchema, J as userAccountSchema, v as vendorPartnerAttGroupsSchema } from './ItemErrorDetailsResult-c62caeae.js';
|
|
2
|
+
export { Z as attrDatatypeNameEnumSchema, ac as attributeDetailSchema, _ as attributeGroupSchema, $ as attributeSummarySchema, a5 as bulbSchema, aa as categoryEnumSchema, ae as componentDetailsSchema, am as connectionSchema, X as downLoadItemsParamsSchema, U as exportDayOfWeekEnum, V as exportFrequencyEnum, W as exportTypeEnum, Q as generateImportTemplateParamsSchema, ai as groupedAttributeListSchema, ag as groupedAttributesSchema, a9 as groupedItemSchema, ah as hierarchyCategorySchema, af as hierarchyDetailsSchema, an as identityServiceDatetimePreferencesSchema, ao as identityServiceOrganizationMetadataSchema, ap as identityServiceOrganizationSchema, aq as identityServicePreferencesSchema, ar as identityServiceUserSchema, L as importDetailSchema, N as importErrorSchema, O as importStatusEnumSchema, Y as itemCategorySchema, a8 as itemDetailSchema, at as itemErrorDetailsSchema, a0 as itemHeaderSchema, a1 as itemMapSchema, a6 as itemPriceSchema, a2 as itemTableSchema, a7 as mediaItemSchema, aj as packComponentDetailsSchema, ak as packComponentItemInfoSchema, ab as packComponentSchema, a3 as phaseEnumSchema, as as registeredServiceSchema, ad as repeatableGroupSchema, al as spreadsheetTemplateCompanySchema, a4 as tradingPartnerStageSchema } from './ItemErrorDetails-e6e400aa.js';
|
|
3
3
|
import 'ky-universal';
|
|
4
4
|
import 'ky';
|
|
5
5
|
import 'zod';
|
package/dist/zod.js
CHANGED
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": "0.0.1-beta.
|
|
6
|
+
"version": "0.0.1-beta.9",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist"
|
|
9
9
|
],
|