@spscommerce/asst-api 0.0.1-beta.6 → 0.0.1-beta.7
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/ItemErrorDetails-1614b511.d.ts +3137 -0
- package/dist/ItemErrorDetailsResult-0b4a628c.d.ts +3032 -0
- package/dist/chunk-4WER3ZLX.js +4576 -0
- package/dist/chunk-ETURPA7W.js +326 -0
- package/dist/index.cjs +813 -27
- package/dist/index.d.ts +86 -46
- package/dist/index.js +18 -5
- package/dist/msw.cjs +925 -62
- package/dist/msw.d.ts +581 -74
- package/dist/msw.js +246 -54
- package/dist/zod.cjs +718 -16
- package/dist/zod.d.ts +3 -2
- package/dist/zod.js +103 -55
- package/package.json +3 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,30 +1,10 @@
|
|
|
1
|
-
import { A as AsstClient, I as Import, a as ImportsStatus, E as Export, b as ItemCategoriesSearch } from './
|
|
2
|
-
export {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
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-0b4a628c.js';
|
|
2
|
+
export { k as AsstClientOptions, l as AsstUrl, B as BASE_URLS, m as Env, n as ImportErrors } from './ItemErrorDetailsResult-0b4a628c.js';
|
|
3
|
+
import { G as GenerateImportTemplateParams, D as DownLoadItemsParams, I as ItemDetail } from './ItemErrorDetails-1614b511.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-1614b511.js';
|
|
5
|
+
import 'ky-universal';
|
|
6
6
|
import 'ky';
|
|
7
|
-
|
|
8
|
-
declare const generateImportTemplateParamsSchema: z.ZodObject<{
|
|
9
|
-
"multi-sheet": z.ZodBoolean;
|
|
10
|
-
gids: z.ZodOptional<z.ZodString>;
|
|
11
|
-
productTypeIds: z.ZodOptional<z.ZodString>;
|
|
12
|
-
groupTypeId: z.ZodOptional<z.ZodNumber>;
|
|
13
|
-
includeGuides: z.ZodOptional<z.ZodBoolean>;
|
|
14
|
-
}, "strip", z.ZodTypeAny, {
|
|
15
|
-
"multi-sheet": boolean;
|
|
16
|
-
gids?: string | undefined;
|
|
17
|
-
productTypeIds?: string | undefined;
|
|
18
|
-
groupTypeId?: number | undefined;
|
|
19
|
-
includeGuides?: boolean | undefined;
|
|
20
|
-
}, {
|
|
21
|
-
"multi-sheet": boolean;
|
|
22
|
-
gids?: string | undefined;
|
|
23
|
-
productTypeIds?: string | undefined;
|
|
24
|
-
groupTypeId?: number | undefined;
|
|
25
|
-
includeGuides?: boolean | undefined;
|
|
26
|
-
}>;
|
|
27
|
-
type GenerateImportTemplateParams = z.infer<typeof generateImportTemplateParamsSchema>;
|
|
7
|
+
import 'zod';
|
|
28
8
|
|
|
29
9
|
/**
|
|
30
10
|
* Initialize Imports Api functions
|
|
@@ -39,10 +19,10 @@ declare function createImportsApi(client: AsstClient): {
|
|
|
39
19
|
importId: number;
|
|
40
20
|
count: number;
|
|
41
21
|
errors: {
|
|
42
|
-
attribute: string;
|
|
43
22
|
description: string;
|
|
44
23
|
importErrorId: number;
|
|
45
24
|
row: number;
|
|
25
|
+
attribute?: string | null | undefined;
|
|
46
26
|
}[];
|
|
47
27
|
hasNext: boolean;
|
|
48
28
|
totalCount: number;
|
|
@@ -63,6 +43,7 @@ declare function createImportsApi(client: AsstClient): {
|
|
|
63
43
|
*/
|
|
64
44
|
declare function createExportsApi(client: AsstClient): {
|
|
65
45
|
createExport: (data: Export) => Promise<void>;
|
|
46
|
+
downloadItems: (params: DownLoadItemsParams) => Promise<void>;
|
|
66
47
|
};
|
|
67
48
|
|
|
68
49
|
/**
|
|
@@ -76,24 +57,6 @@ declare function createProductTypesApi(client: AsstClient): {
|
|
|
76
57
|
}, signal?: AbortSignal) => Promise<AttrProdType[]>;
|
|
77
58
|
};
|
|
78
59
|
|
|
79
|
-
declare const connectionSchema: z.ZodObject<{
|
|
80
|
-
catalog_id: z.ZodNumber;
|
|
81
|
-
catalog_name: z.ZodString;
|
|
82
|
-
partner_company_name: z.ZodString;
|
|
83
|
-
partner_company_id: z.ZodNumber;
|
|
84
|
-
}, "strip", z.ZodTypeAny, {
|
|
85
|
-
catalog_id: number;
|
|
86
|
-
catalog_name: string;
|
|
87
|
-
partner_company_name: string;
|
|
88
|
-
partner_company_id: number;
|
|
89
|
-
}, {
|
|
90
|
-
catalog_id: number;
|
|
91
|
-
catalog_name: string;
|
|
92
|
-
partner_company_name: string;
|
|
93
|
-
partner_company_id: number;
|
|
94
|
-
}>;
|
|
95
|
-
type Connection = z.infer<typeof connectionSchema>;
|
|
96
|
-
|
|
97
60
|
/**
|
|
98
61
|
* Initialize Trading Partner Access Api functions
|
|
99
62
|
* @param client Assortment Client instance
|
|
@@ -120,4 +83,81 @@ declare function createCategoriesApi(client: AsstClient): {
|
|
|
120
83
|
}, signal?: AbortSignal) => Promise<ItemCategoriesSearch>;
|
|
121
84
|
};
|
|
122
85
|
|
|
123
|
-
|
|
86
|
+
/**
|
|
87
|
+
* Initialize Attributes Api functions
|
|
88
|
+
* @param client Assortment Client instance
|
|
89
|
+
* @returns An object containing Attributes API functions
|
|
90
|
+
*/
|
|
91
|
+
declare function createAttributesApi(client: AsstClient): {
|
|
92
|
+
getAllAttributes: (signal?: AbortSignal) => Promise<AttributeMetaData[]>;
|
|
93
|
+
getAllAttributesByCompany: (params?: {
|
|
94
|
+
offset?: number;
|
|
95
|
+
limit?: number;
|
|
96
|
+
}, signal?: AbortSignal) => Promise<AttributesByCompany>;
|
|
97
|
+
getAttributesExtensiveInfo: (signal?: AbortSignal) => Promise<AttributeDefinition[]>;
|
|
98
|
+
getAttributeValidValues: (attributeDbName: string, signal?: AbortSignal) => Promise<AttributeValidValues[]>;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Initialize Locale Api functions
|
|
103
|
+
* @param client Assortment Client instance
|
|
104
|
+
* @returns An object containing Locale API functions
|
|
105
|
+
*/
|
|
106
|
+
declare function createLocaleApi(client: AsstClient): {
|
|
107
|
+
getLocale: (signal?: AbortSignal) => Promise<Locale[]>;
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Initialize Spreadsheet Template Api functions
|
|
112
|
+
* @param client Assortment Client instance
|
|
113
|
+
* @returns An object containing Spreadsheet Template API functions
|
|
114
|
+
*/
|
|
115
|
+
declare function createSpreadsheetTemplateApi(client: AsstClient): {
|
|
116
|
+
getTemplates: (signal?: AbortSignal) => Promise<SpreadsheetTemplate[]>;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Initialize WhoAmI Api functions
|
|
121
|
+
* @param client Assortment Client instance
|
|
122
|
+
* @returns An object containing WhoAmI API functions
|
|
123
|
+
*/
|
|
124
|
+
declare function createWhoAmIApi(client: AsstClient): {
|
|
125
|
+
whoAmI: (signal?: AbortSignal) => Promise<UserAccount>;
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Initialize Company Features Api functions
|
|
130
|
+
* @param client Assortment Client instance
|
|
131
|
+
* @returns An object containing Company Features API functions
|
|
132
|
+
*/
|
|
133
|
+
declare function createCompanyFeaturesApi(client: AsstClient): {
|
|
134
|
+
checkIfStageItemSetupIsEnabled: (signal?: AbortSignal) => Promise<boolean>;
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Initialize Items Api functions
|
|
139
|
+
* @param client Assortment Client instance
|
|
140
|
+
* @returns An object containing Items API functions
|
|
141
|
+
*/
|
|
142
|
+
declare function createItemsApi(client: AsstClient): {
|
|
143
|
+
searchItems: (params?: {
|
|
144
|
+
url: string;
|
|
145
|
+
limit?: number;
|
|
146
|
+
offset?: number;
|
|
147
|
+
}, signal?: AbortSignal) => Promise<ItemSearchView>;
|
|
148
|
+
getItem: (itemId: string, locale?: string, signal?: AbortSignal) => Promise<ItemDetailView>;
|
|
149
|
+
updateItem: (itemId: string, item: ItemDetail) => Promise<void>;
|
|
150
|
+
deleteItem: (itemId: number) => Promise<void>;
|
|
151
|
+
deleteItems: (itemIds: string[]) => Promise<void>;
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Initialize Errors Api functions
|
|
156
|
+
* @param client Assortment Client instance
|
|
157
|
+
* @returns An object containing Errors API functions
|
|
158
|
+
*/
|
|
159
|
+
declare function createErrorsApi(client: AsstClient): {
|
|
160
|
+
getInvalidItemErrorDetails: (itemInfoId: string, signal?: AbortSignal) => Promise<ItemErrorDetailsResult>;
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
export { AsstClient, AttrProdType, AttributeDefinition, AttributeMetaData, AttributeValidValues, AttributesByCompany, DownLoadItemsParams, Export, GenerateImportTemplateParams, Import, ImportsStatus, ItemCategoriesSearch, ItemDetail, ItemDetailView, ItemErrorDetailsResult, ItemSearchView, Locale, SpreadsheetTemplate, TradingPartnerAccessByCompanyId, UserAccount, VendorPartnerAttGroups, createAttributesApi, createCategoriesApi, createCompanyFeaturesApi, createErrorsApi, createExportsApi, createImportsApi, createItemsApi, createLocaleApi, createProductTypesApi, createSpreadsheetTemplateApi, createTradingPartnerAccessApi, createWhoAmIApi };
|
package/dist/index.js
CHANGED
|
@@ -1,21 +1,34 @@
|
|
|
1
1
|
import {
|
|
2
|
+
createAttributesApi,
|
|
2
3
|
createCategoriesApi,
|
|
4
|
+
createCompanyFeaturesApi,
|
|
5
|
+
createErrorsApi,
|
|
3
6
|
createExportsApi,
|
|
4
7
|
createImportsApi,
|
|
8
|
+
createItemsApi,
|
|
9
|
+
createLocaleApi,
|
|
5
10
|
createProductTypesApi,
|
|
6
|
-
|
|
7
|
-
|
|
11
|
+
createSpreadsheetTemplateApi,
|
|
12
|
+
createTradingPartnerAccessApi,
|
|
13
|
+
createWhoAmIApi
|
|
14
|
+
} from "./chunk-ETURPA7W.js";
|
|
8
15
|
import {
|
|
9
16
|
AsstClient,
|
|
10
17
|
BASE_URLS
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-D3ML6E4G.js";
|
|
18
|
+
} from "./chunk-4WER3ZLX.js";
|
|
13
19
|
export {
|
|
14
20
|
AsstClient,
|
|
15
21
|
BASE_URLS,
|
|
22
|
+
createAttributesApi,
|
|
16
23
|
createCategoriesApi,
|
|
24
|
+
createCompanyFeaturesApi,
|
|
25
|
+
createErrorsApi,
|
|
17
26
|
createExportsApi,
|
|
18
27
|
createImportsApi,
|
|
28
|
+
createItemsApi,
|
|
29
|
+
createLocaleApi,
|
|
19
30
|
createProductTypesApi,
|
|
20
|
-
|
|
31
|
+
createSpreadsheetTemplateApi,
|
|
32
|
+
createTradingPartnerAccessApi,
|
|
33
|
+
createWhoAmIApi
|
|
21
34
|
};
|