@sp-api-sdk/catalog-items-api-2022-04-01 2.0.7 → 2.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/cjs/src/api-model/api/catalog-api.js +64 -17
- package/dist/cjs/src/api-model/base.js +7 -2
- package/dist/cjs/src/api-model/common.js +1 -1
- package/dist/cjs/src/api-model/configuration.js +8 -0
- package/dist/cjs/src/api-model/models/index.js +1 -0
- package/dist/cjs/src/api-model/models/item-browse-classifications-by-marketplace.js +15 -0
- package/dist/cjs/src/client.js +4 -4
- package/dist/es/src/api-model/api/catalog-api.js +64 -17
- package/dist/es/src/api-model/base.js +6 -1
- package/dist/es/src/api-model/common.js +1 -1
- package/dist/es/src/api-model/configuration.js +8 -0
- package/dist/es/src/api-model/models/index.js +1 -0
- package/dist/es/src/api-model/models/item-browse-classifications-by-marketplace.js +14 -0
- package/dist/es/src/client.js +4 -4
- package/dist/types/src/api-model/api/catalog-api.d.ts +77 -31
- package/dist/types/src/api-model/base.d.ts +14 -2
- package/dist/types/src/api-model/configuration.d.ts +8 -0
- package/dist/types/src/api-model/models/dimensions.d.ts +1 -1
- package/dist/types/src/api-model/models/index.d.ts +1 -0
- package/dist/types/src/api-model/models/item-browse-classification.d.ts +7 -1
- package/dist/types/src/api-model/models/item-browse-classifications-by-marketplace.d.ts +31 -0
- package/dist/types/src/api-model/models/item-contributor.d.ts +1 -1
- package/dist/types/src/api-model/models/item-dimensions-by-marketplace.d.ts +1 -1
- package/dist/types/src/api-model/models/item-identifiers-by-marketplace.d.ts +1 -1
- package/dist/types/src/api-model/models/item-images-by-marketplace.d.ts +1 -1
- package/dist/types/src/api-model/models/item-relationship.d.ts +1 -1
- package/dist/types/src/api-model/models/item-relationships-by-marketplace.d.ts +1 -1
- package/dist/types/src/api-model/models/item-sales-ranks-by-marketplace.d.ts +2 -2
- package/dist/types/src/api-model/models/item-search-results.d.ts +3 -3
- package/dist/types/src/api-model/models/item-summary-by-marketplace.d.ts +2 -2
- package/dist/types/src/api-model/models/item-vendor-details-by-marketplace.d.ts +1 -1
- package/dist/types/src/api-model/models/item.d.ts +19 -10
- package/dist/types/src/api-model/models/refinements.d.ts +2 -2
- package/package.json +4 -4
|
@@ -16,7 +16,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
16
16
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
17
17
|
};
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.CatalogApi = exports.CatalogApiFactory = exports.CatalogApiFp = exports.CatalogApiAxiosParamCreator = void 0;
|
|
19
|
+
exports.SearchCatalogItemsIncludedDataEnum = exports.SearchCatalogItemsIdentifiersTypeEnum = exports.GetCatalogItemIncludedDataEnum = exports.CatalogApi = exports.CatalogApiFactory = exports.CatalogApiFp = exports.CatalogApiAxiosParamCreator = void 0;
|
|
20
20
|
const axios_1 = __importDefault(require("axios"));
|
|
21
21
|
// Some imports not used depending on template conditions
|
|
22
22
|
// @ts-ignore
|
|
@@ -30,10 +30,10 @@ const base_1 = require("../base");
|
|
|
30
30
|
const CatalogApiAxiosParamCreator = function (configuration) {
|
|
31
31
|
return {
|
|
32
32
|
/**
|
|
33
|
-
* Retrieves details for an item in the Amazon catalog. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | |
|
|
33
|
+
* Retrieves details for an item in the Amazon catalog. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to the [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
34
34
|
* @param {string} asin The Amazon Standard Identification Number (ASIN) of the item.
|
|
35
35
|
* @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers. Data sets in the response contain data only for the specified marketplaces.
|
|
36
|
-
* @param {Array<
|
|
36
|
+
* @param {Array<GetCatalogItemIncludedDataEnum>} [includedData] A comma-delimited list of data sets to include in the response. Default: `summaries`.
|
|
37
37
|
* @param {string} [locale] Locale for retrieving localized summaries. Defaults to the primary locale of the marketplace.
|
|
38
38
|
* @param {*} [options] Override http request option.
|
|
39
39
|
* @throws {RequiredError}
|
|
@@ -72,11 +72,11 @@ const CatalogApiAxiosParamCreator = function (configuration) {
|
|
|
72
72
|
};
|
|
73
73
|
},
|
|
74
74
|
/**
|
|
75
|
-
* Search for and return a list of Amazon catalog items and associated information either by identifier or by keywords. **Usage Plans:** | Rate (requests per second) | Burst | | ---- | ---- | |
|
|
75
|
+
* Search for and return a list of Amazon catalog items and associated information either by identifier or by keywords. **Usage Plans:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to the [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
76
76
|
* @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers for the request.
|
|
77
77
|
* @param {Array<string>} [identifiers] A comma-delimited list of product identifiers to search the Amazon catalog for. **Note:** Cannot be used with `keywords`.
|
|
78
|
-
* @param {
|
|
79
|
-
* @param {Array<
|
|
78
|
+
* @param {SearchCatalogItemsIdentifiersTypeEnum} [identifiersType] Type of product identifiers to search the Amazon catalog for. **Note:** Required when `identifiers` are provided.
|
|
79
|
+
* @param {Array<SearchCatalogItemsIncludedDataEnum>} [includedData] A comma-delimited list of data sets to include in the response. Default: `summaries`.
|
|
80
80
|
* @param {string} [locale] Locale for retrieving localized summaries. Defaults to the primary locale of the marketplace.
|
|
81
81
|
* @param {string} [sellerId] A selling partner identifier, such as a seller account or vendor code. **Note:** Required when `identifiersType` is `SKU`.
|
|
82
82
|
* @param {Array<string>} [keywords] A comma-delimited list of words to search the Amazon catalog for. **Note:** Cannot be used with `identifiers`.
|
|
@@ -156,24 +156,26 @@ const CatalogApiFp = function (configuration) {
|
|
|
156
156
|
const localVarAxiosParamCreator = (0, exports.CatalogApiAxiosParamCreator)(configuration);
|
|
157
157
|
return {
|
|
158
158
|
/**
|
|
159
|
-
* Retrieves details for an item in the Amazon catalog. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | |
|
|
159
|
+
* Retrieves details for an item in the Amazon catalog. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to the [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
160
160
|
* @param {string} asin The Amazon Standard Identification Number (ASIN) of the item.
|
|
161
161
|
* @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers. Data sets in the response contain data only for the specified marketplaces.
|
|
162
|
-
* @param {Array<
|
|
162
|
+
* @param {Array<GetCatalogItemIncludedDataEnum>} [includedData] A comma-delimited list of data sets to include in the response. Default: `summaries`.
|
|
163
163
|
* @param {string} [locale] Locale for retrieving localized summaries. Defaults to the primary locale of the marketplace.
|
|
164
164
|
* @param {*} [options] Override http request option.
|
|
165
165
|
* @throws {RequiredError}
|
|
166
166
|
*/
|
|
167
167
|
async getCatalogItem(asin, marketplaceIds, includedData, locale, options) {
|
|
168
168
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getCatalogItem(asin, marketplaceIds, includedData, locale, options);
|
|
169
|
-
|
|
169
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
170
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['CatalogApi.getCatalogItem']?.[localVarOperationServerIndex]?.url;
|
|
171
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
170
172
|
},
|
|
171
173
|
/**
|
|
172
|
-
* Search for and return a list of Amazon catalog items and associated information either by identifier or by keywords. **Usage Plans:** | Rate (requests per second) | Burst | | ---- | ---- | |
|
|
174
|
+
* Search for and return a list of Amazon catalog items and associated information either by identifier or by keywords. **Usage Plans:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to the [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
173
175
|
* @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers for the request.
|
|
174
176
|
* @param {Array<string>} [identifiers] A comma-delimited list of product identifiers to search the Amazon catalog for. **Note:** Cannot be used with `keywords`.
|
|
175
|
-
* @param {
|
|
176
|
-
* @param {Array<
|
|
177
|
+
* @param {SearchCatalogItemsIdentifiersTypeEnum} [identifiersType] Type of product identifiers to search the Amazon catalog for. **Note:** Required when `identifiers` are provided.
|
|
178
|
+
* @param {Array<SearchCatalogItemsIncludedDataEnum>} [includedData] A comma-delimited list of data sets to include in the response. Default: `summaries`.
|
|
177
179
|
* @param {string} [locale] Locale for retrieving localized summaries. Defaults to the primary locale of the marketplace.
|
|
178
180
|
* @param {string} [sellerId] A selling partner identifier, such as a seller account or vendor code. **Note:** Required when `identifiersType` is `SKU`.
|
|
179
181
|
* @param {Array<string>} [keywords] A comma-delimited list of words to search the Amazon catalog for. **Note:** Cannot be used with `identifiers`.
|
|
@@ -187,7 +189,9 @@ const CatalogApiFp = function (configuration) {
|
|
|
187
189
|
*/
|
|
188
190
|
async searchCatalogItems(marketplaceIds, identifiers, identifiersType, includedData, locale, sellerId, keywords, brandNames, classificationIds, pageSize, pageToken, keywordsLocale, options) {
|
|
189
191
|
const localVarAxiosArgs = await localVarAxiosParamCreator.searchCatalogItems(marketplaceIds, identifiers, identifiersType, includedData, locale, sellerId, keywords, brandNames, classificationIds, pageSize, pageToken, keywordsLocale, options);
|
|
190
|
-
|
|
192
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
193
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['CatalogApi.searchCatalogItems']?.[localVarOperationServerIndex]?.url;
|
|
194
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
191
195
|
},
|
|
192
196
|
};
|
|
193
197
|
};
|
|
@@ -200,7 +204,7 @@ const CatalogApiFactory = function (configuration, basePath, axios) {
|
|
|
200
204
|
const localVarFp = (0, exports.CatalogApiFp)(configuration);
|
|
201
205
|
return {
|
|
202
206
|
/**
|
|
203
|
-
* Retrieves details for an item in the Amazon catalog. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | |
|
|
207
|
+
* Retrieves details for an item in the Amazon catalog. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to the [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
204
208
|
* @param {CatalogApiGetCatalogItemRequest} requestParameters Request parameters.
|
|
205
209
|
* @param {*} [options] Override http request option.
|
|
206
210
|
* @throws {RequiredError}
|
|
@@ -209,7 +213,7 @@ const CatalogApiFactory = function (configuration, basePath, axios) {
|
|
|
209
213
|
return localVarFp.getCatalogItem(requestParameters.asin, requestParameters.marketplaceIds, requestParameters.includedData, requestParameters.locale, options).then((request) => request(axios, basePath));
|
|
210
214
|
},
|
|
211
215
|
/**
|
|
212
|
-
* Search for and return a list of Amazon catalog items and associated information either by identifier or by keywords. **Usage Plans:** | Rate (requests per second) | Burst | | ---- | ---- | |
|
|
216
|
+
* Search for and return a list of Amazon catalog items and associated information either by identifier or by keywords. **Usage Plans:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to the [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
213
217
|
* @param {CatalogApiSearchCatalogItemsRequest} requestParameters Request parameters.
|
|
214
218
|
* @param {*} [options] Override http request option.
|
|
215
219
|
* @throws {RequiredError}
|
|
@@ -228,7 +232,7 @@ exports.CatalogApiFactory = CatalogApiFactory;
|
|
|
228
232
|
*/
|
|
229
233
|
class CatalogApi extends base_1.BaseAPI {
|
|
230
234
|
/**
|
|
231
|
-
* Retrieves details for an item in the Amazon catalog. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | |
|
|
235
|
+
* Retrieves details for an item in the Amazon catalog. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to the [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
232
236
|
* @param {CatalogApiGetCatalogItemRequest} requestParameters Request parameters.
|
|
233
237
|
* @param {*} [options] Override http request option.
|
|
234
238
|
* @throws {RequiredError}
|
|
@@ -238,7 +242,7 @@ class CatalogApi extends base_1.BaseAPI {
|
|
|
238
242
|
return (0, exports.CatalogApiFp)(this.configuration).getCatalogItem(requestParameters.asin, requestParameters.marketplaceIds, requestParameters.includedData, requestParameters.locale, options).then((request) => request(this.axios, this.basePath));
|
|
239
243
|
}
|
|
240
244
|
/**
|
|
241
|
-
* Search for and return a list of Amazon catalog items and associated information either by identifier or by keywords. **Usage Plans:** | Rate (requests per second) | Burst | | ---- | ---- | |
|
|
245
|
+
* Search for and return a list of Amazon catalog items and associated information either by identifier or by keywords. **Usage Plans:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to the [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
242
246
|
* @param {CatalogApiSearchCatalogItemsRequest} requestParameters Request parameters.
|
|
243
247
|
* @param {*} [options] Override http request option.
|
|
244
248
|
* @throws {RequiredError}
|
|
@@ -249,3 +253,46 @@ class CatalogApi extends base_1.BaseAPI {
|
|
|
249
253
|
}
|
|
250
254
|
}
|
|
251
255
|
exports.CatalogApi = CatalogApi;
|
|
256
|
+
/**
|
|
257
|
+
* @export
|
|
258
|
+
*/
|
|
259
|
+
exports.GetCatalogItemIncludedDataEnum = {
|
|
260
|
+
Attributes: 'attributes',
|
|
261
|
+
Classifications: 'classifications',
|
|
262
|
+
Dimensions: 'dimensions',
|
|
263
|
+
Identifiers: 'identifiers',
|
|
264
|
+
Images: 'images',
|
|
265
|
+
ProductTypes: 'productTypes',
|
|
266
|
+
Relationships: 'relationships',
|
|
267
|
+
SalesRanks: 'salesRanks',
|
|
268
|
+
Summaries: 'summaries',
|
|
269
|
+
VendorDetails: 'vendorDetails'
|
|
270
|
+
};
|
|
271
|
+
/**
|
|
272
|
+
* @export
|
|
273
|
+
*/
|
|
274
|
+
exports.SearchCatalogItemsIdentifiersTypeEnum = {
|
|
275
|
+
Asin: 'ASIN',
|
|
276
|
+
Ean: 'EAN',
|
|
277
|
+
Gtin: 'GTIN',
|
|
278
|
+
Isbn: 'ISBN',
|
|
279
|
+
Jan: 'JAN',
|
|
280
|
+
Minsan: 'MINSAN',
|
|
281
|
+
Sku: 'SKU',
|
|
282
|
+
Upc: 'UPC'
|
|
283
|
+
};
|
|
284
|
+
/**
|
|
285
|
+
* @export
|
|
286
|
+
*/
|
|
287
|
+
exports.SearchCatalogItemsIncludedDataEnum = {
|
|
288
|
+
Attributes: 'attributes',
|
|
289
|
+
Classifications: 'classifications',
|
|
290
|
+
Dimensions: 'dimensions',
|
|
291
|
+
Identifiers: 'identifiers',
|
|
292
|
+
Images: 'images',
|
|
293
|
+
ProductTypes: 'productTypes',
|
|
294
|
+
Relationships: 'relationships',
|
|
295
|
+
SalesRanks: 'salesRanks',
|
|
296
|
+
Summaries: 'summaries',
|
|
297
|
+
VendorDetails: 'vendorDetails'
|
|
298
|
+
};
|
|
@@ -16,7 +16,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
16
16
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
17
17
|
};
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
|
|
19
|
+
exports.operationServerMap = exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
|
|
20
20
|
const axios_1 = __importDefault(require("axios"));
|
|
21
21
|
exports.BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
|
|
22
22
|
/**
|
|
@@ -43,7 +43,7 @@ class BaseAPI {
|
|
|
43
43
|
this.axios = axios;
|
|
44
44
|
if (configuration) {
|
|
45
45
|
this.configuration = configuration;
|
|
46
|
-
this.basePath = configuration.basePath
|
|
46
|
+
this.basePath = configuration.basePath ?? basePath;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
}
|
|
@@ -64,3 +64,8 @@ class RequiredError extends Error {
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
exports.RequiredError = RequiredError;
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
* @export
|
|
70
|
+
*/
|
|
71
|
+
exports.operationServerMap = {};
|
|
@@ -138,7 +138,7 @@ exports.toPathString = toPathString;
|
|
|
138
138
|
*/
|
|
139
139
|
const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
|
|
140
140
|
return (axios = globalAxios, basePath = BASE_PATH) => {
|
|
141
|
-
const axiosRequestArgs = { ...axiosArgs.options, url: (configuration?.basePath
|
|
141
|
+
const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url };
|
|
142
142
|
return axios.request(axiosRequestArgs);
|
|
143
143
|
};
|
|
144
144
|
};
|
|
@@ -49,6 +49,13 @@ class Configuration {
|
|
|
49
49
|
* @memberof Configuration
|
|
50
50
|
*/
|
|
51
51
|
basePath;
|
|
52
|
+
/**
|
|
53
|
+
* override server index
|
|
54
|
+
*
|
|
55
|
+
* @type {number}
|
|
56
|
+
* @memberof Configuration
|
|
57
|
+
*/
|
|
58
|
+
serverIndex;
|
|
52
59
|
/**
|
|
53
60
|
* base options for axios calls
|
|
54
61
|
*
|
|
@@ -70,6 +77,7 @@ class Configuration {
|
|
|
70
77
|
this.password = param.password;
|
|
71
78
|
this.accessToken = param.accessToken;
|
|
72
79
|
this.basePath = param.basePath;
|
|
80
|
+
this.serverIndex = param.serverIndex;
|
|
73
81
|
this.baseOptions = param.baseOptions;
|
|
74
82
|
this.formDataCtor = param.formDataCtor;
|
|
75
83
|
}
|
|
@@ -21,6 +21,7 @@ __exportStar(require("./dimensions"), exports);
|
|
|
21
21
|
__exportStar(require("./error-list"), exports);
|
|
22
22
|
__exportStar(require("./item"), exports);
|
|
23
23
|
__exportStar(require("./item-browse-classification"), exports);
|
|
24
|
+
__exportStar(require("./item-browse-classifications-by-marketplace"), exports);
|
|
24
25
|
__exportStar(require("./item-classification-sales-rank"), exports);
|
|
25
26
|
__exportStar(require("./item-contributor"), exports);
|
|
26
27
|
__exportStar(require("./item-contributor-role"), exports);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Selling Partner API for Catalog Items
|
|
6
|
+
* The Selling Partner API for Catalog Items provides programmatic access to information about items in the Amazon catalog. For more information, refer to the [Catalog Items API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/catalog-items-api-v2022-04-01-use-case-guide).
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 2022-04-01
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
package/dist/cjs/src/client.js
CHANGED
|
@@ -8,15 +8,15 @@ exports.clientRateLimits = [
|
|
|
8
8
|
method: 'get',
|
|
9
9
|
// eslint-disable-next-line prefer-regex-literals
|
|
10
10
|
urlRegex: new RegExp('^/catalog/2022-04-01/items$'),
|
|
11
|
-
rate:
|
|
12
|
-
burst:
|
|
11
|
+
rate: 5,
|
|
12
|
+
burst: 5,
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
method: 'get',
|
|
16
16
|
// eslint-disable-next-line prefer-regex-literals
|
|
17
17
|
urlRegex: new RegExp('^/catalog/2022-04-01/items/[^/]*$'),
|
|
18
|
-
rate:
|
|
19
|
-
burst:
|
|
18
|
+
rate: 5,
|
|
19
|
+
burst: 5,
|
|
20
20
|
},
|
|
21
21
|
];
|
|
22
22
|
class CatalogItemsApiClient extends api_model_1.CatalogApi {
|
|
@@ -16,7 +16,7 @@ import globalAxios from 'axios';
|
|
|
16
16
|
// @ts-ignore
|
|
17
17
|
import { DUMMY_BASE_URL, assertParamExists, setSearchParams, toPathString, createRequestFunction } from '../common';
|
|
18
18
|
// @ts-ignore
|
|
19
|
-
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI } from '../base';
|
|
19
|
+
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, operationServerMap } from '../base';
|
|
20
20
|
/**
|
|
21
21
|
* CatalogApi - axios parameter creator
|
|
22
22
|
* @export
|
|
@@ -24,10 +24,10 @@ import { BASE_PATH, COLLECTION_FORMATS, BaseAPI } from '../base';
|
|
|
24
24
|
export const CatalogApiAxiosParamCreator = function (configuration) {
|
|
25
25
|
return {
|
|
26
26
|
/**
|
|
27
|
-
* Retrieves details for an item in the Amazon catalog. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | |
|
|
27
|
+
* Retrieves details for an item in the Amazon catalog. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to the [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
28
28
|
* @param {string} asin The Amazon Standard Identification Number (ASIN) of the item.
|
|
29
29
|
* @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers. Data sets in the response contain data only for the specified marketplaces.
|
|
30
|
-
* @param {Array<
|
|
30
|
+
* @param {Array<GetCatalogItemIncludedDataEnum>} [includedData] A comma-delimited list of data sets to include in the response. Default: `summaries`.
|
|
31
31
|
* @param {string} [locale] Locale for retrieving localized summaries. Defaults to the primary locale of the marketplace.
|
|
32
32
|
* @param {*} [options] Override http request option.
|
|
33
33
|
* @throws {RequiredError}
|
|
@@ -66,11 +66,11 @@ export const CatalogApiAxiosParamCreator = function (configuration) {
|
|
|
66
66
|
};
|
|
67
67
|
},
|
|
68
68
|
/**
|
|
69
|
-
* Search for and return a list of Amazon catalog items and associated information either by identifier or by keywords. **Usage Plans:** | Rate (requests per second) | Burst | | ---- | ---- | |
|
|
69
|
+
* Search for and return a list of Amazon catalog items and associated information either by identifier or by keywords. **Usage Plans:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to the [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
70
70
|
* @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers for the request.
|
|
71
71
|
* @param {Array<string>} [identifiers] A comma-delimited list of product identifiers to search the Amazon catalog for. **Note:** Cannot be used with `keywords`.
|
|
72
|
-
* @param {
|
|
73
|
-
* @param {Array<
|
|
72
|
+
* @param {SearchCatalogItemsIdentifiersTypeEnum} [identifiersType] Type of product identifiers to search the Amazon catalog for. **Note:** Required when `identifiers` are provided.
|
|
73
|
+
* @param {Array<SearchCatalogItemsIncludedDataEnum>} [includedData] A comma-delimited list of data sets to include in the response. Default: `summaries`.
|
|
74
74
|
* @param {string} [locale] Locale for retrieving localized summaries. Defaults to the primary locale of the marketplace.
|
|
75
75
|
* @param {string} [sellerId] A selling partner identifier, such as a seller account or vendor code. **Note:** Required when `identifiersType` is `SKU`.
|
|
76
76
|
* @param {Array<string>} [keywords] A comma-delimited list of words to search the Amazon catalog for. **Note:** Cannot be used with `identifiers`.
|
|
@@ -149,24 +149,26 @@ export const CatalogApiFp = function (configuration) {
|
|
|
149
149
|
const localVarAxiosParamCreator = CatalogApiAxiosParamCreator(configuration);
|
|
150
150
|
return {
|
|
151
151
|
/**
|
|
152
|
-
* Retrieves details for an item in the Amazon catalog. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | |
|
|
152
|
+
* Retrieves details for an item in the Amazon catalog. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to the [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
153
153
|
* @param {string} asin The Amazon Standard Identification Number (ASIN) of the item.
|
|
154
154
|
* @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers. Data sets in the response contain data only for the specified marketplaces.
|
|
155
|
-
* @param {Array<
|
|
155
|
+
* @param {Array<GetCatalogItemIncludedDataEnum>} [includedData] A comma-delimited list of data sets to include in the response. Default: `summaries`.
|
|
156
156
|
* @param {string} [locale] Locale for retrieving localized summaries. Defaults to the primary locale of the marketplace.
|
|
157
157
|
* @param {*} [options] Override http request option.
|
|
158
158
|
* @throws {RequiredError}
|
|
159
159
|
*/
|
|
160
160
|
async getCatalogItem(asin, marketplaceIds, includedData, locale, options) {
|
|
161
161
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getCatalogItem(asin, marketplaceIds, includedData, locale, options);
|
|
162
|
-
|
|
162
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
163
|
+
const localVarOperationServerBasePath = operationServerMap['CatalogApi.getCatalogItem']?.[localVarOperationServerIndex]?.url;
|
|
164
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
163
165
|
},
|
|
164
166
|
/**
|
|
165
|
-
* Search for and return a list of Amazon catalog items and associated information either by identifier or by keywords. **Usage Plans:** | Rate (requests per second) | Burst | | ---- | ---- | |
|
|
167
|
+
* Search for and return a list of Amazon catalog items and associated information either by identifier or by keywords. **Usage Plans:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to the [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
166
168
|
* @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers for the request.
|
|
167
169
|
* @param {Array<string>} [identifiers] A comma-delimited list of product identifiers to search the Amazon catalog for. **Note:** Cannot be used with `keywords`.
|
|
168
|
-
* @param {
|
|
169
|
-
* @param {Array<
|
|
170
|
+
* @param {SearchCatalogItemsIdentifiersTypeEnum} [identifiersType] Type of product identifiers to search the Amazon catalog for. **Note:** Required when `identifiers` are provided.
|
|
171
|
+
* @param {Array<SearchCatalogItemsIncludedDataEnum>} [includedData] A comma-delimited list of data sets to include in the response. Default: `summaries`.
|
|
170
172
|
* @param {string} [locale] Locale for retrieving localized summaries. Defaults to the primary locale of the marketplace.
|
|
171
173
|
* @param {string} [sellerId] A selling partner identifier, such as a seller account or vendor code. **Note:** Required when `identifiersType` is `SKU`.
|
|
172
174
|
* @param {Array<string>} [keywords] A comma-delimited list of words to search the Amazon catalog for. **Note:** Cannot be used with `identifiers`.
|
|
@@ -180,7 +182,9 @@ export const CatalogApiFp = function (configuration) {
|
|
|
180
182
|
*/
|
|
181
183
|
async searchCatalogItems(marketplaceIds, identifiers, identifiersType, includedData, locale, sellerId, keywords, brandNames, classificationIds, pageSize, pageToken, keywordsLocale, options) {
|
|
182
184
|
const localVarAxiosArgs = await localVarAxiosParamCreator.searchCatalogItems(marketplaceIds, identifiers, identifiersType, includedData, locale, sellerId, keywords, brandNames, classificationIds, pageSize, pageToken, keywordsLocale, options);
|
|
183
|
-
|
|
185
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
186
|
+
const localVarOperationServerBasePath = operationServerMap['CatalogApi.searchCatalogItems']?.[localVarOperationServerIndex]?.url;
|
|
187
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
184
188
|
},
|
|
185
189
|
};
|
|
186
190
|
};
|
|
@@ -192,7 +196,7 @@ export const CatalogApiFactory = function (configuration, basePath, axios) {
|
|
|
192
196
|
const localVarFp = CatalogApiFp(configuration);
|
|
193
197
|
return {
|
|
194
198
|
/**
|
|
195
|
-
* Retrieves details for an item in the Amazon catalog. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | |
|
|
199
|
+
* Retrieves details for an item in the Amazon catalog. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to the [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
196
200
|
* @param {CatalogApiGetCatalogItemRequest} requestParameters Request parameters.
|
|
197
201
|
* @param {*} [options] Override http request option.
|
|
198
202
|
* @throws {RequiredError}
|
|
@@ -201,7 +205,7 @@ export const CatalogApiFactory = function (configuration, basePath, axios) {
|
|
|
201
205
|
return localVarFp.getCatalogItem(requestParameters.asin, requestParameters.marketplaceIds, requestParameters.includedData, requestParameters.locale, options).then((request) => request(axios, basePath));
|
|
202
206
|
},
|
|
203
207
|
/**
|
|
204
|
-
* Search for and return a list of Amazon catalog items and associated information either by identifier or by keywords. **Usage Plans:** | Rate (requests per second) | Burst | | ---- | ---- | |
|
|
208
|
+
* Search for and return a list of Amazon catalog items and associated information either by identifier or by keywords. **Usage Plans:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to the [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
205
209
|
* @param {CatalogApiSearchCatalogItemsRequest} requestParameters Request parameters.
|
|
206
210
|
* @param {*} [options] Override http request option.
|
|
207
211
|
* @throws {RequiredError}
|
|
@@ -219,7 +223,7 @@ export const CatalogApiFactory = function (configuration, basePath, axios) {
|
|
|
219
223
|
*/
|
|
220
224
|
export class CatalogApi extends BaseAPI {
|
|
221
225
|
/**
|
|
222
|
-
* Retrieves details for an item in the Amazon catalog. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | |
|
|
226
|
+
* Retrieves details for an item in the Amazon catalog. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to the [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
223
227
|
* @param {CatalogApiGetCatalogItemRequest} requestParameters Request parameters.
|
|
224
228
|
* @param {*} [options] Override http request option.
|
|
225
229
|
* @throws {RequiredError}
|
|
@@ -229,7 +233,7 @@ export class CatalogApi extends BaseAPI {
|
|
|
229
233
|
return CatalogApiFp(this.configuration).getCatalogItem(requestParameters.asin, requestParameters.marketplaceIds, requestParameters.includedData, requestParameters.locale, options).then((request) => request(this.axios, this.basePath));
|
|
230
234
|
}
|
|
231
235
|
/**
|
|
232
|
-
* Search for and return a list of Amazon catalog items and associated information either by identifier or by keywords. **Usage Plans:** | Rate (requests per second) | Burst | | ---- | ---- | |
|
|
236
|
+
* Search for and return a list of Amazon catalog items and associated information either by identifier or by keywords. **Usage Plans:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to the [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
233
237
|
* @param {CatalogApiSearchCatalogItemsRequest} requestParameters Request parameters.
|
|
234
238
|
* @param {*} [options] Override http request option.
|
|
235
239
|
* @throws {RequiredError}
|
|
@@ -239,3 +243,46 @@ export class CatalogApi extends BaseAPI {
|
|
|
239
243
|
return CatalogApiFp(this.configuration).searchCatalogItems(requestParameters.marketplaceIds, requestParameters.identifiers, requestParameters.identifiersType, requestParameters.includedData, requestParameters.locale, requestParameters.sellerId, requestParameters.keywords, requestParameters.brandNames, requestParameters.classificationIds, requestParameters.pageSize, requestParameters.pageToken, requestParameters.keywordsLocale, options).then((request) => request(this.axios, this.basePath));
|
|
240
244
|
}
|
|
241
245
|
}
|
|
246
|
+
/**
|
|
247
|
+
* @export
|
|
248
|
+
*/
|
|
249
|
+
export const GetCatalogItemIncludedDataEnum = {
|
|
250
|
+
Attributes: 'attributes',
|
|
251
|
+
Classifications: 'classifications',
|
|
252
|
+
Dimensions: 'dimensions',
|
|
253
|
+
Identifiers: 'identifiers',
|
|
254
|
+
Images: 'images',
|
|
255
|
+
ProductTypes: 'productTypes',
|
|
256
|
+
Relationships: 'relationships',
|
|
257
|
+
SalesRanks: 'salesRanks',
|
|
258
|
+
Summaries: 'summaries',
|
|
259
|
+
VendorDetails: 'vendorDetails'
|
|
260
|
+
};
|
|
261
|
+
/**
|
|
262
|
+
* @export
|
|
263
|
+
*/
|
|
264
|
+
export const SearchCatalogItemsIdentifiersTypeEnum = {
|
|
265
|
+
Asin: 'ASIN',
|
|
266
|
+
Ean: 'EAN',
|
|
267
|
+
Gtin: 'GTIN',
|
|
268
|
+
Isbn: 'ISBN',
|
|
269
|
+
Jan: 'JAN',
|
|
270
|
+
Minsan: 'MINSAN',
|
|
271
|
+
Sku: 'SKU',
|
|
272
|
+
Upc: 'UPC'
|
|
273
|
+
};
|
|
274
|
+
/**
|
|
275
|
+
* @export
|
|
276
|
+
*/
|
|
277
|
+
export const SearchCatalogItemsIncludedDataEnum = {
|
|
278
|
+
Attributes: 'attributes',
|
|
279
|
+
Classifications: 'classifications',
|
|
280
|
+
Dimensions: 'dimensions',
|
|
281
|
+
Identifiers: 'identifiers',
|
|
282
|
+
Images: 'images',
|
|
283
|
+
ProductTypes: 'productTypes',
|
|
284
|
+
Relationships: 'relationships',
|
|
285
|
+
SalesRanks: 'salesRanks',
|
|
286
|
+
Summaries: 'summaries',
|
|
287
|
+
VendorDetails: 'vendorDetails'
|
|
288
|
+
};
|
|
@@ -37,7 +37,7 @@ export class BaseAPI {
|
|
|
37
37
|
this.axios = axios;
|
|
38
38
|
if (configuration) {
|
|
39
39
|
this.configuration = configuration;
|
|
40
|
-
this.basePath = configuration.basePath
|
|
40
|
+
this.basePath = configuration.basePath ?? basePath;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
}
|
|
@@ -56,3 +56,8 @@ export class RequiredError extends Error {
|
|
|
56
56
|
this.name = "RequiredError";
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
*
|
|
61
|
+
* @export
|
|
62
|
+
*/
|
|
63
|
+
export const operationServerMap = {};
|
|
@@ -127,7 +127,7 @@ export const toPathString = function (url) {
|
|
|
127
127
|
*/
|
|
128
128
|
export const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
|
|
129
129
|
return (axios = globalAxios, basePath = BASE_PATH) => {
|
|
130
|
-
const axiosRequestArgs = { ...axiosArgs.options, url: (configuration?.basePath
|
|
130
|
+
const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url };
|
|
131
131
|
return axios.request(axiosRequestArgs);
|
|
132
132
|
};
|
|
133
133
|
};
|
|
@@ -46,6 +46,13 @@ export class Configuration {
|
|
|
46
46
|
* @memberof Configuration
|
|
47
47
|
*/
|
|
48
48
|
basePath;
|
|
49
|
+
/**
|
|
50
|
+
* override server index
|
|
51
|
+
*
|
|
52
|
+
* @type {number}
|
|
53
|
+
* @memberof Configuration
|
|
54
|
+
*/
|
|
55
|
+
serverIndex;
|
|
49
56
|
/**
|
|
50
57
|
* base options for axios calls
|
|
51
58
|
*
|
|
@@ -67,6 +74,7 @@ export class Configuration {
|
|
|
67
74
|
this.password = param.password;
|
|
68
75
|
this.accessToken = param.accessToken;
|
|
69
76
|
this.basePath = param.basePath;
|
|
77
|
+
this.serverIndex = param.serverIndex;
|
|
70
78
|
this.baseOptions = param.baseOptions;
|
|
71
79
|
this.formDataCtor = param.formDataCtor;
|
|
72
80
|
}
|
|
@@ -5,6 +5,7 @@ export * from './dimensions';
|
|
|
5
5
|
export * from './error-list';
|
|
6
6
|
export * from './item';
|
|
7
7
|
export * from './item-browse-classification';
|
|
8
|
+
export * from './item-browse-classifications-by-marketplace';
|
|
8
9
|
export * from './item-classification-sales-rank';
|
|
9
10
|
export * from './item-contributor';
|
|
10
11
|
export * from './item-contributor-role';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Selling Partner API for Catalog Items
|
|
5
|
+
* The Selling Partner API for Catalog Items provides programmatic access to information about items in the Amazon catalog. For more information, refer to the [Catalog Items API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/catalog-items-api-v2022-04-01-use-case-guide).
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2022-04-01
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
export {};
|
package/dist/es/src/client.js
CHANGED
|
@@ -5,15 +5,15 @@ export const clientRateLimits = [
|
|
|
5
5
|
method: 'get',
|
|
6
6
|
// eslint-disable-next-line prefer-regex-literals
|
|
7
7
|
urlRegex: new RegExp('^/catalog/2022-04-01/items$'),
|
|
8
|
-
rate:
|
|
9
|
-
burst:
|
|
8
|
+
rate: 5,
|
|
9
|
+
burst: 5,
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
12
|
method: 'get',
|
|
13
13
|
// eslint-disable-next-line prefer-regex-literals
|
|
14
14
|
urlRegex: new RegExp('^/catalog/2022-04-01/items/[^/]*$'),
|
|
15
|
-
rate:
|
|
16
|
-
burst:
|
|
15
|
+
rate: 5,
|
|
16
|
+
burst: 5,
|
|
17
17
|
},
|
|
18
18
|
];
|
|
19
19
|
export class CatalogItemsApiClient extends CatalogApi {
|
|
@@ -10,32 +10,32 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { Configuration } from '../configuration';
|
|
13
|
-
import type { AxiosPromise, AxiosInstance,
|
|
13
|
+
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
14
14
|
import globalAxios from 'axios';
|
|
15
|
-
import { RequestArgs, BaseAPI } from '../base';
|
|
16
|
-
import { Item } from '../models';
|
|
17
|
-
import { ItemSearchResults } from '../models';
|
|
15
|
+
import { type RequestArgs, BaseAPI } from '../base';
|
|
16
|
+
import type { Item } from '../models';
|
|
17
|
+
import type { ItemSearchResults } from '../models';
|
|
18
18
|
/**
|
|
19
19
|
* CatalogApi - axios parameter creator
|
|
20
20
|
* @export
|
|
21
21
|
*/
|
|
22
22
|
export declare const CatalogApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
23
23
|
/**
|
|
24
|
-
* Retrieves details for an item in the Amazon catalog. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | |
|
|
24
|
+
* Retrieves details for an item in the Amazon catalog. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to the [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
25
25
|
* @param {string} asin The Amazon Standard Identification Number (ASIN) of the item.
|
|
26
26
|
* @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers. Data sets in the response contain data only for the specified marketplaces.
|
|
27
|
-
* @param {Array<
|
|
27
|
+
* @param {Array<GetCatalogItemIncludedDataEnum>} [includedData] A comma-delimited list of data sets to include in the response. Default: `summaries`.
|
|
28
28
|
* @param {string} [locale] Locale for retrieving localized summaries. Defaults to the primary locale of the marketplace.
|
|
29
29
|
* @param {*} [options] Override http request option.
|
|
30
30
|
* @throws {RequiredError}
|
|
31
31
|
*/
|
|
32
|
-
getCatalogItem: (asin: string, marketplaceIds: Array<string>, includedData?: Array<
|
|
32
|
+
getCatalogItem: (asin: string, marketplaceIds: Array<string>, includedData?: Array<GetCatalogItemIncludedDataEnum>, locale?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
33
33
|
/**
|
|
34
|
-
* Search for and return a list of Amazon catalog items and associated information either by identifier or by keywords. **Usage Plans:** | Rate (requests per second) | Burst | | ---- | ---- | |
|
|
34
|
+
* Search for and return a list of Amazon catalog items and associated information either by identifier or by keywords. **Usage Plans:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to the [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
35
35
|
* @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers for the request.
|
|
36
36
|
* @param {Array<string>} [identifiers] A comma-delimited list of product identifiers to search the Amazon catalog for. **Note:** Cannot be used with `keywords`.
|
|
37
|
-
* @param {
|
|
38
|
-
* @param {Array<
|
|
37
|
+
* @param {SearchCatalogItemsIdentifiersTypeEnum} [identifiersType] Type of product identifiers to search the Amazon catalog for. **Note:** Required when `identifiers` are provided.
|
|
38
|
+
* @param {Array<SearchCatalogItemsIncludedDataEnum>} [includedData] A comma-delimited list of data sets to include in the response. Default: `summaries`.
|
|
39
39
|
* @param {string} [locale] Locale for retrieving localized summaries. Defaults to the primary locale of the marketplace.
|
|
40
40
|
* @param {string} [sellerId] A selling partner identifier, such as a seller account or vendor code. **Note:** Required when `identifiersType` is `SKU`.
|
|
41
41
|
* @param {Array<string>} [keywords] A comma-delimited list of words to search the Amazon catalog for. **Note:** Cannot be used with `identifiers`.
|
|
@@ -47,7 +47,7 @@ export declare const CatalogApiAxiosParamCreator: (configuration?: Configuration
|
|
|
47
47
|
* @param {*} [options] Override http request option.
|
|
48
48
|
* @throws {RequiredError}
|
|
49
49
|
*/
|
|
50
|
-
searchCatalogItems: (marketplaceIds: Array<string>, identifiers?: Array<string>, identifiersType?:
|
|
50
|
+
searchCatalogItems: (marketplaceIds: Array<string>, identifiers?: Array<string>, identifiersType?: SearchCatalogItemsIdentifiersTypeEnum, includedData?: Array<SearchCatalogItemsIncludedDataEnum>, locale?: string, sellerId?: string, keywords?: Array<string>, brandNames?: Array<string>, classificationIds?: Array<string>, pageSize?: number, pageToken?: string, keywordsLocale?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
51
51
|
};
|
|
52
52
|
/**
|
|
53
53
|
* CatalogApi - functional programming interface
|
|
@@ -55,21 +55,21 @@ export declare const CatalogApiAxiosParamCreator: (configuration?: Configuration
|
|
|
55
55
|
*/
|
|
56
56
|
export declare const CatalogApiFp: (configuration?: Configuration) => {
|
|
57
57
|
/**
|
|
58
|
-
* Retrieves details for an item in the Amazon catalog. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | |
|
|
58
|
+
* Retrieves details for an item in the Amazon catalog. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to the [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
59
59
|
* @param {string} asin The Amazon Standard Identification Number (ASIN) of the item.
|
|
60
60
|
* @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers. Data sets in the response contain data only for the specified marketplaces.
|
|
61
|
-
* @param {Array<
|
|
61
|
+
* @param {Array<GetCatalogItemIncludedDataEnum>} [includedData] A comma-delimited list of data sets to include in the response. Default: `summaries`.
|
|
62
62
|
* @param {string} [locale] Locale for retrieving localized summaries. Defaults to the primary locale of the marketplace.
|
|
63
63
|
* @param {*} [options] Override http request option.
|
|
64
64
|
* @throws {RequiredError}
|
|
65
65
|
*/
|
|
66
|
-
getCatalogItem(asin: string, marketplaceIds: Array<string>, includedData?: Array<
|
|
66
|
+
getCatalogItem(asin: string, marketplaceIds: Array<string>, includedData?: Array<GetCatalogItemIncludedDataEnum>, locale?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Item>>;
|
|
67
67
|
/**
|
|
68
|
-
* Search for and return a list of Amazon catalog items and associated information either by identifier or by keywords. **Usage Plans:** | Rate (requests per second) | Burst | | ---- | ---- | |
|
|
68
|
+
* Search for and return a list of Amazon catalog items and associated information either by identifier or by keywords. **Usage Plans:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to the [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
69
69
|
* @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers for the request.
|
|
70
70
|
* @param {Array<string>} [identifiers] A comma-delimited list of product identifiers to search the Amazon catalog for. **Note:** Cannot be used with `keywords`.
|
|
71
|
-
* @param {
|
|
72
|
-
* @param {Array<
|
|
71
|
+
* @param {SearchCatalogItemsIdentifiersTypeEnum} [identifiersType] Type of product identifiers to search the Amazon catalog for. **Note:** Required when `identifiers` are provided.
|
|
72
|
+
* @param {Array<SearchCatalogItemsIncludedDataEnum>} [includedData] A comma-delimited list of data sets to include in the response. Default: `summaries`.
|
|
73
73
|
* @param {string} [locale] Locale for retrieving localized summaries. Defaults to the primary locale of the marketplace.
|
|
74
74
|
* @param {string} [sellerId] A selling partner identifier, such as a seller account or vendor code. **Note:** Required when `identifiersType` is `SKU`.
|
|
75
75
|
* @param {Array<string>} [keywords] A comma-delimited list of words to search the Amazon catalog for. **Note:** Cannot be used with `identifiers`.
|
|
@@ -81,7 +81,7 @@ export declare const CatalogApiFp: (configuration?: Configuration) => {
|
|
|
81
81
|
* @param {*} [options] Override http request option.
|
|
82
82
|
* @throws {RequiredError}
|
|
83
83
|
*/
|
|
84
|
-
searchCatalogItems(marketplaceIds: Array<string>, identifiers?: Array<string>, identifiersType?:
|
|
84
|
+
searchCatalogItems(marketplaceIds: Array<string>, identifiers?: Array<string>, identifiersType?: SearchCatalogItemsIdentifiersTypeEnum, includedData?: Array<SearchCatalogItemsIncludedDataEnum>, locale?: string, sellerId?: string, keywords?: Array<string>, brandNames?: Array<string>, classificationIds?: Array<string>, pageSize?: number, pageToken?: string, keywordsLocale?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ItemSearchResults>>;
|
|
85
85
|
};
|
|
86
86
|
/**
|
|
87
87
|
* CatalogApi - factory interface
|
|
@@ -89,19 +89,19 @@ export declare const CatalogApiFp: (configuration?: Configuration) => {
|
|
|
89
89
|
*/
|
|
90
90
|
export declare const CatalogApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
91
91
|
/**
|
|
92
|
-
* Retrieves details for an item in the Amazon catalog. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | |
|
|
92
|
+
* Retrieves details for an item in the Amazon catalog. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to the [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
93
93
|
* @param {CatalogApiGetCatalogItemRequest} requestParameters Request parameters.
|
|
94
94
|
* @param {*} [options] Override http request option.
|
|
95
95
|
* @throws {RequiredError}
|
|
96
96
|
*/
|
|
97
|
-
getCatalogItem(requestParameters: CatalogApiGetCatalogItemRequest, options?:
|
|
97
|
+
getCatalogItem(requestParameters: CatalogApiGetCatalogItemRequest, options?: RawAxiosRequestConfig): AxiosPromise<Item>;
|
|
98
98
|
/**
|
|
99
|
-
* Search for and return a list of Amazon catalog items and associated information either by identifier or by keywords. **Usage Plans:** | Rate (requests per second) | Burst | | ---- | ---- | |
|
|
99
|
+
* Search for and return a list of Amazon catalog items and associated information either by identifier or by keywords. **Usage Plans:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to the [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
100
100
|
* @param {CatalogApiSearchCatalogItemsRequest} requestParameters Request parameters.
|
|
101
101
|
* @param {*} [options] Override http request option.
|
|
102
102
|
* @throws {RequiredError}
|
|
103
103
|
*/
|
|
104
|
-
searchCatalogItems(requestParameters: CatalogApiSearchCatalogItemsRequest, options?:
|
|
104
|
+
searchCatalogItems(requestParameters: CatalogApiSearchCatalogItemsRequest, options?: RawAxiosRequestConfig): AxiosPromise<ItemSearchResults>;
|
|
105
105
|
};
|
|
106
106
|
/**
|
|
107
107
|
* Request parameters for getCatalogItem operation in CatalogApi.
|
|
@@ -123,10 +123,10 @@ export interface CatalogApiGetCatalogItemRequest {
|
|
|
123
123
|
readonly marketplaceIds: Array<string>;
|
|
124
124
|
/**
|
|
125
125
|
* A comma-delimited list of data sets to include in the response. Default: `summaries`.
|
|
126
|
-
* @type {Array<'attributes' | 'dimensions' | 'identifiers' | 'images' | 'productTypes' | 'relationships' | 'salesRanks' | 'summaries' | 'vendorDetails'>}
|
|
126
|
+
* @type {Array<'attributes' | 'classifications' | 'dimensions' | 'identifiers' | 'images' | 'productTypes' | 'relationships' | 'salesRanks' | 'summaries' | 'vendorDetails'>}
|
|
127
127
|
* @memberof CatalogApiGetCatalogItem
|
|
128
128
|
*/
|
|
129
|
-
readonly includedData?: Array<
|
|
129
|
+
readonly includedData?: Array<GetCatalogItemIncludedDataEnum>;
|
|
130
130
|
/**
|
|
131
131
|
* Locale for retrieving localized summaries. Defaults to the primary locale of the marketplace.
|
|
132
132
|
* @type {string}
|
|
@@ -157,13 +157,13 @@ export interface CatalogApiSearchCatalogItemsRequest {
|
|
|
157
157
|
* @type {'ASIN' | 'EAN' | 'GTIN' | 'ISBN' | 'JAN' | 'MINSAN' | 'SKU' | 'UPC'}
|
|
158
158
|
* @memberof CatalogApiSearchCatalogItems
|
|
159
159
|
*/
|
|
160
|
-
readonly identifiersType?:
|
|
160
|
+
readonly identifiersType?: SearchCatalogItemsIdentifiersTypeEnum;
|
|
161
161
|
/**
|
|
162
162
|
* A comma-delimited list of data sets to include in the response. Default: `summaries`.
|
|
163
|
-
* @type {Array<'attributes' | 'dimensions' | 'identifiers' | 'images' | 'productTypes' | 'relationships' | 'salesRanks' | 'summaries' | 'vendorDetails'>}
|
|
163
|
+
* @type {Array<'attributes' | 'classifications' | 'dimensions' | 'identifiers' | 'images' | 'productTypes' | 'relationships' | 'salesRanks' | 'summaries' | 'vendorDetails'>}
|
|
164
164
|
* @memberof CatalogApiSearchCatalogItems
|
|
165
165
|
*/
|
|
166
|
-
readonly includedData?: Array<
|
|
166
|
+
readonly includedData?: Array<SearchCatalogItemsIncludedDataEnum>;
|
|
167
167
|
/**
|
|
168
168
|
* Locale for retrieving localized summaries. Defaults to the primary locale of the marketplace.
|
|
169
169
|
* @type {string}
|
|
@@ -221,19 +221,65 @@ export interface CatalogApiSearchCatalogItemsRequest {
|
|
|
221
221
|
*/
|
|
222
222
|
export declare class CatalogApi extends BaseAPI {
|
|
223
223
|
/**
|
|
224
|
-
* Retrieves details for an item in the Amazon catalog. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | |
|
|
224
|
+
* Retrieves details for an item in the Amazon catalog. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to the [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
225
225
|
* @param {CatalogApiGetCatalogItemRequest} requestParameters Request parameters.
|
|
226
226
|
* @param {*} [options] Override http request option.
|
|
227
227
|
* @throws {RequiredError}
|
|
228
228
|
* @memberof CatalogApi
|
|
229
229
|
*/
|
|
230
|
-
getCatalogItem(requestParameters: CatalogApiGetCatalogItemRequest, options?:
|
|
230
|
+
getCatalogItem(requestParameters: CatalogApiGetCatalogItemRequest, options?: RawAxiosRequestConfig): Promise<globalAxios.AxiosResponse<Item, any>>;
|
|
231
231
|
/**
|
|
232
|
-
* Search for and return a list of Amazon catalog items and associated information either by identifier or by keywords. **Usage Plans:** | Rate (requests per second) | Burst | | ---- | ---- | |
|
|
232
|
+
* Search for and return a list of Amazon catalog items and associated information either by identifier or by keywords. **Usage Plans:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to the [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
233
233
|
* @param {CatalogApiSearchCatalogItemsRequest} requestParameters Request parameters.
|
|
234
234
|
* @param {*} [options] Override http request option.
|
|
235
235
|
* @throws {RequiredError}
|
|
236
236
|
* @memberof CatalogApi
|
|
237
237
|
*/
|
|
238
|
-
searchCatalogItems(requestParameters: CatalogApiSearchCatalogItemsRequest, options?:
|
|
238
|
+
searchCatalogItems(requestParameters: CatalogApiSearchCatalogItemsRequest, options?: RawAxiosRequestConfig): Promise<globalAxios.AxiosResponse<ItemSearchResults, any>>;
|
|
239
239
|
}
|
|
240
|
+
/**
|
|
241
|
+
* @export
|
|
242
|
+
*/
|
|
243
|
+
export declare const GetCatalogItemIncludedDataEnum: {
|
|
244
|
+
readonly Attributes: "attributes";
|
|
245
|
+
readonly Classifications: "classifications";
|
|
246
|
+
readonly Dimensions: "dimensions";
|
|
247
|
+
readonly Identifiers: "identifiers";
|
|
248
|
+
readonly Images: "images";
|
|
249
|
+
readonly ProductTypes: "productTypes";
|
|
250
|
+
readonly Relationships: "relationships";
|
|
251
|
+
readonly SalesRanks: "salesRanks";
|
|
252
|
+
readonly Summaries: "summaries";
|
|
253
|
+
readonly VendorDetails: "vendorDetails";
|
|
254
|
+
};
|
|
255
|
+
export type GetCatalogItemIncludedDataEnum = typeof GetCatalogItemIncludedDataEnum[keyof typeof GetCatalogItemIncludedDataEnum];
|
|
256
|
+
/**
|
|
257
|
+
* @export
|
|
258
|
+
*/
|
|
259
|
+
export declare const SearchCatalogItemsIdentifiersTypeEnum: {
|
|
260
|
+
readonly Asin: "ASIN";
|
|
261
|
+
readonly Ean: "EAN";
|
|
262
|
+
readonly Gtin: "GTIN";
|
|
263
|
+
readonly Isbn: "ISBN";
|
|
264
|
+
readonly Jan: "JAN";
|
|
265
|
+
readonly Minsan: "MINSAN";
|
|
266
|
+
readonly Sku: "SKU";
|
|
267
|
+
readonly Upc: "UPC";
|
|
268
|
+
};
|
|
269
|
+
export type SearchCatalogItemsIdentifiersTypeEnum = typeof SearchCatalogItemsIdentifiersTypeEnum[keyof typeof SearchCatalogItemsIdentifiersTypeEnum];
|
|
270
|
+
/**
|
|
271
|
+
* @export
|
|
272
|
+
*/
|
|
273
|
+
export declare const SearchCatalogItemsIncludedDataEnum: {
|
|
274
|
+
readonly Attributes: "attributes";
|
|
275
|
+
readonly Classifications: "classifications";
|
|
276
|
+
readonly Dimensions: "dimensions";
|
|
277
|
+
readonly Identifiers: "identifiers";
|
|
278
|
+
readonly Images: "images";
|
|
279
|
+
readonly ProductTypes: "productTypes";
|
|
280
|
+
readonly Relationships: "relationships";
|
|
281
|
+
readonly SalesRanks: "salesRanks";
|
|
282
|
+
readonly Summaries: "summaries";
|
|
283
|
+
readonly VendorDetails: "vendorDetails";
|
|
284
|
+
};
|
|
285
|
+
export type SearchCatalogItemsIncludedDataEnum = typeof SearchCatalogItemsIncludedDataEnum[keyof typeof SearchCatalogItemsIncludedDataEnum];
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { Configuration } from './configuration';
|
|
13
|
-
import type { AxiosInstance,
|
|
13
|
+
import type { AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
14
14
|
export declare const BASE_PATH: string;
|
|
15
15
|
/**
|
|
16
16
|
*
|
|
@@ -29,7 +29,7 @@ export declare const COLLECTION_FORMATS: {
|
|
|
29
29
|
*/
|
|
30
30
|
export interface RequestArgs {
|
|
31
31
|
url: string;
|
|
32
|
-
options:
|
|
32
|
+
options: RawAxiosRequestConfig;
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
35
|
*
|
|
@@ -52,3 +52,15 @@ export declare class RequiredError extends Error {
|
|
|
52
52
|
field: string;
|
|
53
53
|
constructor(field: string, msg?: string);
|
|
54
54
|
}
|
|
55
|
+
interface ServerMap {
|
|
56
|
+
[key: string]: {
|
|
57
|
+
url: string;
|
|
58
|
+
description: string;
|
|
59
|
+
}[];
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @export
|
|
64
|
+
*/
|
|
65
|
+
export declare const operationServerMap: ServerMap;
|
|
66
|
+
export {};
|
|
@@ -15,6 +15,7 @@ export interface ConfigurationParameters {
|
|
|
15
15
|
password?: string;
|
|
16
16
|
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
|
17
17
|
basePath?: string;
|
|
18
|
+
serverIndex?: number;
|
|
18
19
|
baseOptions?: any;
|
|
19
20
|
formDataCtor?: new () => any;
|
|
20
21
|
}
|
|
@@ -53,6 +54,13 @@ export declare class Configuration {
|
|
|
53
54
|
* @memberof Configuration
|
|
54
55
|
*/
|
|
55
56
|
basePath?: string;
|
|
57
|
+
/**
|
|
58
|
+
* override server index
|
|
59
|
+
*
|
|
60
|
+
* @type {number}
|
|
61
|
+
* @memberof Configuration
|
|
62
|
+
*/
|
|
63
|
+
serverIndex?: number;
|
|
56
64
|
/**
|
|
57
65
|
* base options for axios calls
|
|
58
66
|
*
|
|
@@ -5,6 +5,7 @@ export * from './dimensions';
|
|
|
5
5
|
export * from './error-list';
|
|
6
6
|
export * from './item';
|
|
7
7
|
export * from './item-browse-classification';
|
|
8
|
+
export * from './item-browse-classifications-by-marketplace';
|
|
8
9
|
export * from './item-classification-sales-rank';
|
|
9
10
|
export * from './item-contributor';
|
|
10
11
|
export * from './item-contributor-role';
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
export interface ItemBrowseClassification {
|
|
18
18
|
/**
|
|
19
|
-
* Display name for the classification.
|
|
19
|
+
* Display name for the classification (browse node).
|
|
20
20
|
* @type {string}
|
|
21
21
|
* @memberof ItemBrowseClassification
|
|
22
22
|
*/
|
|
@@ -27,4 +27,10 @@ export interface ItemBrowseClassification {
|
|
|
27
27
|
* @memberof ItemBrowseClassification
|
|
28
28
|
*/
|
|
29
29
|
'classificationId': string;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {ItemBrowseClassification}
|
|
33
|
+
* @memberof ItemBrowseClassification
|
|
34
|
+
*/
|
|
35
|
+
'parent'?: ItemBrowseClassification;
|
|
30
36
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Selling Partner API for Catalog Items
|
|
3
|
+
* The Selling Partner API for Catalog Items provides programmatic access to information about items in the Amazon catalog. For more information, refer to the [Catalog Items API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/catalog-items-api-v2022-04-01-use-case-guide).
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 2022-04-01
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { ItemBrowseClassification } from './item-browse-classification';
|
|
13
|
+
/**
|
|
14
|
+
* Classifications (browse nodes) associated with the item in the Amazon catalog for the indicated Amazon marketplace.
|
|
15
|
+
* @export
|
|
16
|
+
* @interface ItemBrowseClassificationsByMarketplace
|
|
17
|
+
*/
|
|
18
|
+
export interface ItemBrowseClassificationsByMarketplace {
|
|
19
|
+
/**
|
|
20
|
+
* Amazon marketplace identifier.
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof ItemBrowseClassificationsByMarketplace
|
|
23
|
+
*/
|
|
24
|
+
'marketplaceId': string;
|
|
25
|
+
/**
|
|
26
|
+
* Classifications (browse nodes) associated with the item in the Amazon catalog for the indicated Amazon marketplace.
|
|
27
|
+
* @type {Array<ItemBrowseClassification>}
|
|
28
|
+
* @memberof ItemBrowseClassificationsByMarketplace
|
|
29
|
+
*/
|
|
30
|
+
'classifications'?: Array<ItemBrowseClassification>;
|
|
31
|
+
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { ItemContributorRole } from './item-contributor-role';
|
|
12
|
+
import type { ItemContributorRole } from './item-contributor-role';
|
|
13
13
|
/**
|
|
14
14
|
* Individual contributor to the creation of an item, such as an author or actor.
|
|
15
15
|
* @export
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { Dimensions } from './dimensions';
|
|
12
|
+
import type { Dimensions } from './dimensions';
|
|
13
13
|
/**
|
|
14
14
|
* Dimensions associated with the item in the Amazon catalog for the indicated Amazon marketplace.
|
|
15
15
|
* @export
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { ItemIdentifier } from './item-identifier';
|
|
12
|
+
import type { ItemIdentifier } from './item-identifier';
|
|
13
13
|
/**
|
|
14
14
|
* Identifiers associated with the item in the Amazon catalog for the indicated Amazon marketplace.
|
|
15
15
|
* @export
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { ItemImage } from './item-image';
|
|
12
|
+
import type { ItemImage } from './item-image';
|
|
13
13
|
/**
|
|
14
14
|
* Images for an item in the Amazon catalog for the indicated Amazon marketplace.
|
|
15
15
|
* @export
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { ItemVariationTheme } from './item-variation-theme';
|
|
12
|
+
import type { ItemVariationTheme } from './item-variation-theme';
|
|
13
13
|
/**
|
|
14
14
|
* Relationship details for an Amazon catalog item.
|
|
15
15
|
* @export
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { ItemRelationship } from './item-relationship';
|
|
12
|
+
import type { ItemRelationship } from './item-relationship';
|
|
13
13
|
/**
|
|
14
14
|
* Relationship details for the Amazon catalog item for the indicated Amazon marketplace.
|
|
15
15
|
* @export
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { ItemClassificationSalesRank } from './item-classification-sales-rank';
|
|
13
|
-
import { ItemDisplayGroupSalesRank } from './item-display-group-sales-rank';
|
|
12
|
+
import type { ItemClassificationSalesRank } from './item-classification-sales-rank';
|
|
13
|
+
import type { ItemDisplayGroupSalesRank } from './item-display-group-sales-rank';
|
|
14
14
|
/**
|
|
15
15
|
* Sales ranks of an Amazon catalog item for the indicated Amazon marketplace.
|
|
16
16
|
* @export
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { Item } from './item';
|
|
13
|
-
import { Pagination } from './pagination';
|
|
14
|
-
import { Refinements } from './refinements';
|
|
12
|
+
import type { Item } from './item';
|
|
13
|
+
import type { Pagination } from './pagination';
|
|
14
|
+
import type { Refinements } from './refinements';
|
|
15
15
|
/**
|
|
16
16
|
* Items in the Amazon catalog and search related metadata.
|
|
17
17
|
* @export
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { ItemBrowseClassification } from './item-browse-classification';
|
|
13
|
-
import { ItemContributor } from './item-contributor';
|
|
12
|
+
import type { ItemBrowseClassification } from './item-browse-classification';
|
|
13
|
+
import type { ItemContributor } from './item-contributor';
|
|
14
14
|
/**
|
|
15
15
|
* Summary details of an Amazon catalog item for the indicated Amazon marketplace.
|
|
16
16
|
* @export
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { ItemVendorDetailsCategory } from './item-vendor-details-category';
|
|
12
|
+
import type { ItemVendorDetailsCategory } from './item-vendor-details-category';
|
|
13
13
|
/**
|
|
14
14
|
* Vendor details associated with an Amazon catalog item for the indicated Amazon marketplace.
|
|
15
15
|
* @export
|
|
@@ -9,14 +9,15 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
12
|
+
import type { ItemBrowseClassificationsByMarketplace } from './item-browse-classifications-by-marketplace';
|
|
13
|
+
import type { ItemDimensionsByMarketplace } from './item-dimensions-by-marketplace';
|
|
14
|
+
import type { ItemIdentifiersByMarketplace } from './item-identifiers-by-marketplace';
|
|
15
|
+
import type { ItemImagesByMarketplace } from './item-images-by-marketplace';
|
|
16
|
+
import type { ItemProductTypeByMarketplace } from './item-product-type-by-marketplace';
|
|
17
|
+
import type { ItemRelationshipsByMarketplace } from './item-relationships-by-marketplace';
|
|
18
|
+
import type { ItemSalesRanksByMarketplace } from './item-sales-ranks-by-marketplace';
|
|
19
|
+
import type { ItemSummaryByMarketplace } from './item-summary-by-marketplace';
|
|
20
|
+
import type { ItemVendorDetailsByMarketplace } from './item-vendor-details-by-marketplace';
|
|
20
21
|
/**
|
|
21
22
|
* An item in the Amazon catalog.
|
|
22
23
|
* @export
|
|
@@ -31,10 +32,18 @@ export interface Item {
|
|
|
31
32
|
'asin': string;
|
|
32
33
|
/**
|
|
33
34
|
* A JSON object that contains structured item attribute data keyed by attribute name. Catalog item attributes conform to the related product type definitions available in the Selling Partner API for Product Type Definitions.
|
|
34
|
-
* @type {
|
|
35
|
+
* @type {{ [key: string]: any; }}
|
|
35
36
|
* @memberof Item
|
|
36
37
|
*/
|
|
37
|
-
'attributes'?:
|
|
38
|
+
'attributes'?: {
|
|
39
|
+
[key: string]: any;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Array of classifications (browse nodes) associated with the item in the Amazon catalog by Amazon marketplace.
|
|
43
|
+
* @type {Array<ItemBrowseClassificationsByMarketplace>}
|
|
44
|
+
* @memberof Item
|
|
45
|
+
*/
|
|
46
|
+
'classifications'?: Array<ItemBrowseClassificationsByMarketplace>;
|
|
38
47
|
/**
|
|
39
48
|
* Array of dimensions associated with the item in the Amazon catalog by Amazon marketplace.
|
|
40
49
|
* @type {Array<ItemDimensionsByMarketplace>}
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { BrandRefinement } from './brand-refinement';
|
|
13
|
-
import { ClassificationRefinement } from './classification-refinement';
|
|
12
|
+
import type { BrandRefinement } from './brand-refinement';
|
|
13
|
+
import type { ClassificationRefinement } from './classification-refinement';
|
|
14
14
|
/**
|
|
15
15
|
* Search refinements.
|
|
16
16
|
* @export
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@sp-api-sdk/catalog-items-api-2022-04-01",
|
|
3
3
|
"author": "Bertrand Marron <bertrand@bizon.solutions>",
|
|
4
4
|
"description": "The Selling Partner API for Catalog Items provides programmatic access to information about items in the Amazon catalog. For more information, refer to the Catalog Items API Use Case Guide.",
|
|
5
|
-
"version": "2.0
|
|
5
|
+
"version": "2.2.0",
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
7
7
|
"module": "dist/es/index.js",
|
|
8
8
|
"types": "dist/types/index.d.ts",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"dist/**/*.d.ts"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@sp-api-sdk/common": "2.0.
|
|
22
|
-
"axios": "^1.
|
|
21
|
+
"@sp-api-sdk/common": "2.0.9",
|
|
22
|
+
"axios": "^1.7.2"
|
|
23
23
|
},
|
|
24
24
|
"repository": {
|
|
25
25
|
"type": "git",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"sp sdk",
|
|
41
41
|
"catalog items api"
|
|
42
42
|
],
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "cce8c720364baf071322463e8e3ed29c322cc93a"
|
|
44
44
|
}
|