@sp-api-sdk/catalog-items-api-2022-04-01 2.0.7 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/src/api-model/api/catalog-api.js +54 -9
- 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/es/src/api-model/api/catalog-api.js +54 -9
- 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/types/src/api-model/api/catalog-api.d.ts +65 -21
- 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/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 +12 -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
|
|
@@ -33,7 +33,7 @@ const CatalogApiAxiosParamCreator = function (configuration) {
|
|
|
33
33
|
* Retrieves details for an item in the Amazon catalog. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | 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}
|
|
@@ -75,8 +75,8 @@ const CatalogApiAxiosParamCreator = function (configuration) {
|
|
|
75
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 | | ---- | ---- | | 2 | 2 | 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`.
|
|
@@ -159,21 +159,23 @@ const CatalogApiFp = function (configuration) {
|
|
|
159
159
|
* Retrieves details for an item in the Amazon catalog. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | 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
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 | | ---- | ---- | | 2 | 2 | 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
|
};
|
|
@@ -249,3 +253,44 @@ 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
|
+
Dimensions: 'dimensions',
|
|
262
|
+
Identifiers: 'identifiers',
|
|
263
|
+
Images: 'images',
|
|
264
|
+
ProductTypes: 'productTypes',
|
|
265
|
+
Relationships: 'relationships',
|
|
266
|
+
SalesRanks: 'salesRanks',
|
|
267
|
+
Summaries: 'summaries',
|
|
268
|
+
VendorDetails: 'vendorDetails'
|
|
269
|
+
};
|
|
270
|
+
/**
|
|
271
|
+
* @export
|
|
272
|
+
*/
|
|
273
|
+
exports.SearchCatalogItemsIdentifiersTypeEnum = {
|
|
274
|
+
Asin: 'ASIN',
|
|
275
|
+
Ean: 'EAN',
|
|
276
|
+
Gtin: 'GTIN',
|
|
277
|
+
Isbn: 'ISBN',
|
|
278
|
+
Jan: 'JAN',
|
|
279
|
+
Minsan: 'MINSAN',
|
|
280
|
+
Sku: 'SKU',
|
|
281
|
+
Upc: 'UPC'
|
|
282
|
+
};
|
|
283
|
+
/**
|
|
284
|
+
* @export
|
|
285
|
+
*/
|
|
286
|
+
exports.SearchCatalogItemsIncludedDataEnum = {
|
|
287
|
+
Attributes: 'attributes',
|
|
288
|
+
Dimensions: 'dimensions',
|
|
289
|
+
Identifiers: 'identifiers',
|
|
290
|
+
Images: 'images',
|
|
291
|
+
ProductTypes: 'productTypes',
|
|
292
|
+
Relationships: 'relationships',
|
|
293
|
+
SalesRanks: 'salesRanks',
|
|
294
|
+
Summaries: 'summaries',
|
|
295
|
+
VendorDetails: 'vendorDetails'
|
|
296
|
+
};
|
|
@@ -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
|
}
|
|
@@ -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
|
|
@@ -27,7 +27,7 @@ export const CatalogApiAxiosParamCreator = function (configuration) {
|
|
|
27
27
|
* Retrieves details for an item in the Amazon catalog. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | 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}
|
|
@@ -69,8 +69,8 @@ export const CatalogApiAxiosParamCreator = function (configuration) {
|
|
|
69
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 | | ---- | ---- | | 2 | 2 | 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`.
|
|
@@ -152,21 +152,23 @@ export const CatalogApiFp = function (configuration) {
|
|
|
152
152
|
* Retrieves details for an item in the Amazon catalog. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | 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
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 | | ---- | ---- | | 2 | 2 | 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
|
};
|
|
@@ -239,3 +243,44 @@ 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
|
+
Dimensions: 'dimensions',
|
|
252
|
+
Identifiers: 'identifiers',
|
|
253
|
+
Images: 'images',
|
|
254
|
+
ProductTypes: 'productTypes',
|
|
255
|
+
Relationships: 'relationships',
|
|
256
|
+
SalesRanks: 'salesRanks',
|
|
257
|
+
Summaries: 'summaries',
|
|
258
|
+
VendorDetails: 'vendorDetails'
|
|
259
|
+
};
|
|
260
|
+
/**
|
|
261
|
+
* @export
|
|
262
|
+
*/
|
|
263
|
+
export const SearchCatalogItemsIdentifiersTypeEnum = {
|
|
264
|
+
Asin: 'ASIN',
|
|
265
|
+
Ean: 'EAN',
|
|
266
|
+
Gtin: 'GTIN',
|
|
267
|
+
Isbn: 'ISBN',
|
|
268
|
+
Jan: 'JAN',
|
|
269
|
+
Minsan: 'MINSAN',
|
|
270
|
+
Sku: 'SKU',
|
|
271
|
+
Upc: 'UPC'
|
|
272
|
+
};
|
|
273
|
+
/**
|
|
274
|
+
* @export
|
|
275
|
+
*/
|
|
276
|
+
export const SearchCatalogItemsIncludedDataEnum = {
|
|
277
|
+
Attributes: 'attributes',
|
|
278
|
+
Dimensions: 'dimensions',
|
|
279
|
+
Identifiers: 'identifiers',
|
|
280
|
+
Images: 'images',
|
|
281
|
+
ProductTypes: 'productTypes',
|
|
282
|
+
Relationships: 'relationships',
|
|
283
|
+
SalesRanks: 'salesRanks',
|
|
284
|
+
Summaries: 'summaries',
|
|
285
|
+
VendorDetails: 'vendorDetails'
|
|
286
|
+
};
|
|
@@ -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
|
}
|
|
@@ -10,11 +10,11 @@
|
|
|
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
|
|
@@ -24,18 +24,18 @@ export declare const CatalogApiAxiosParamCreator: (configuration?: Configuration
|
|
|
24
24
|
* Retrieves details for an item in the Amazon catalog. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | 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
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 | | ---- | ---- | | 2 | 2 | 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
|
|
@@ -58,18 +58,18 @@ export declare const CatalogApiFp: (configuration?: Configuration) => {
|
|
|
58
58
|
* Retrieves details for an item in the Amazon catalog. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | 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
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 | | ---- | ---- | | 2 | 2 | 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
|
|
@@ -94,14 +94,14 @@ export declare const CatalogApiFactory: (configuration?: Configuration, basePath
|
|
|
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
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 | | ---- | ---- | | 2 | 2 | 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.
|
|
@@ -126,7 +126,7 @@ export interface CatalogApiGetCatalogItemRequest {
|
|
|
126
126
|
* @type {Array<'attributes' | '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
163
|
* @type {Array<'attributes' | '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}
|
|
@@ -227,7 +227,7 @@ export declare class CatalogApi extends BaseAPI {
|
|
|
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
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 | | ---- | ---- | | 2 | 2 | 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.
|
|
@@ -235,5 +235,49 @@ export declare class CatalogApi extends BaseAPI {
|
|
|
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 Dimensions: "dimensions";
|
|
246
|
+
readonly Identifiers: "identifiers";
|
|
247
|
+
readonly Images: "images";
|
|
248
|
+
readonly ProductTypes: "productTypes";
|
|
249
|
+
readonly Relationships: "relationships";
|
|
250
|
+
readonly SalesRanks: "salesRanks";
|
|
251
|
+
readonly Summaries: "summaries";
|
|
252
|
+
readonly VendorDetails: "vendorDetails";
|
|
253
|
+
};
|
|
254
|
+
export type GetCatalogItemIncludedDataEnum = typeof GetCatalogItemIncludedDataEnum[keyof typeof GetCatalogItemIncludedDataEnum];
|
|
255
|
+
/**
|
|
256
|
+
* @export
|
|
257
|
+
*/
|
|
258
|
+
export declare const SearchCatalogItemsIdentifiersTypeEnum: {
|
|
259
|
+
readonly Asin: "ASIN";
|
|
260
|
+
readonly Ean: "EAN";
|
|
261
|
+
readonly Gtin: "GTIN";
|
|
262
|
+
readonly Isbn: "ISBN";
|
|
263
|
+
readonly Jan: "JAN";
|
|
264
|
+
readonly Minsan: "MINSAN";
|
|
265
|
+
readonly Sku: "SKU";
|
|
266
|
+
readonly Upc: "UPC";
|
|
267
|
+
};
|
|
268
|
+
export type SearchCatalogItemsIdentifiersTypeEnum = typeof SearchCatalogItemsIdentifiersTypeEnum[keyof typeof SearchCatalogItemsIdentifiersTypeEnum];
|
|
269
|
+
/**
|
|
270
|
+
* @export
|
|
271
|
+
*/
|
|
272
|
+
export declare const SearchCatalogItemsIncludedDataEnum: {
|
|
273
|
+
readonly Attributes: "attributes";
|
|
274
|
+
readonly Dimensions: "dimensions";
|
|
275
|
+
readonly Identifiers: "identifiers";
|
|
276
|
+
readonly Images: "images";
|
|
277
|
+
readonly ProductTypes: "productTypes";
|
|
278
|
+
readonly Relationships: "relationships";
|
|
279
|
+
readonly SalesRanks: "salesRanks";
|
|
280
|
+
readonly Summaries: "summaries";
|
|
281
|
+
readonly VendorDetails: "vendorDetails";
|
|
282
|
+
};
|
|
283
|
+
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
|
*
|
|
@@ -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,14 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { ItemDimensionsByMarketplace } from './item-dimensions-by-marketplace';
|
|
13
|
-
import { ItemIdentifiersByMarketplace } from './item-identifiers-by-marketplace';
|
|
14
|
-
import { ItemImagesByMarketplace } from './item-images-by-marketplace';
|
|
15
|
-
import { ItemProductTypeByMarketplace } from './item-product-type-by-marketplace';
|
|
16
|
-
import { ItemRelationshipsByMarketplace } from './item-relationships-by-marketplace';
|
|
17
|
-
import { ItemSalesRanksByMarketplace } from './item-sales-ranks-by-marketplace';
|
|
18
|
-
import { ItemSummaryByMarketplace } from './item-summary-by-marketplace';
|
|
19
|
-
import { ItemVendorDetailsByMarketplace } from './item-vendor-details-by-marketplace';
|
|
12
|
+
import type { ItemDimensionsByMarketplace } from './item-dimensions-by-marketplace';
|
|
13
|
+
import type { ItemIdentifiersByMarketplace } from './item-identifiers-by-marketplace';
|
|
14
|
+
import type { ItemImagesByMarketplace } from './item-images-by-marketplace';
|
|
15
|
+
import type { ItemProductTypeByMarketplace } from './item-product-type-by-marketplace';
|
|
16
|
+
import type { ItemRelationshipsByMarketplace } from './item-relationships-by-marketplace';
|
|
17
|
+
import type { ItemSalesRanksByMarketplace } from './item-sales-ranks-by-marketplace';
|
|
18
|
+
import type { ItemSummaryByMarketplace } from './item-summary-by-marketplace';
|
|
19
|
+
import type { ItemVendorDetailsByMarketplace } from './item-vendor-details-by-marketplace';
|
|
20
20
|
/**
|
|
21
21
|
* An item in the Amazon catalog.
|
|
22
22
|
* @export
|
|
@@ -31,10 +31,12 @@ export interface Item {
|
|
|
31
31
|
'asin': string;
|
|
32
32
|
/**
|
|
33
33
|
* 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 {
|
|
34
|
+
* @type {{ [key: string]: any; }}
|
|
35
35
|
* @memberof Item
|
|
36
36
|
*/
|
|
37
|
-
'attributes'?:
|
|
37
|
+
'attributes'?: {
|
|
38
|
+
[key: string]: any;
|
|
39
|
+
};
|
|
38
40
|
/**
|
|
39
41
|
* Array of dimensions associated with the item in the Amazon catalog by Amazon marketplace.
|
|
40
42
|
* @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.1.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.8",
|
|
22
|
+
"axios": "^1.7.0"
|
|
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": "5a245a25a9f1765c825e2178668d4b0f4e44689b"
|
|
44
44
|
}
|