@sp-api-sdk/product-type-definitions-api-2020-09-01 3.0.3 → 4.0.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/api-model/api/{definitions-api.js → product-type-definitions-api.js} +26 -26
- package/dist/cjs/api-model/api.js +1 -1
- package/dist/cjs/client.js +1 -1
- package/dist/es/api-model/api/{definitions-api.js → product-type-definitions-api.js} +21 -21
- package/dist/es/api-model/api.js +1 -1
- package/dist/es/client.js +2 -2
- package/dist/types/api-model/api/{definitions-api.d.ts → product-type-definitions-api.d.ts} +37 -37
- package/dist/types/api-model/api.d.ts +1 -1
- package/dist/types/client.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.GetDefinitionsProductTypeLocaleEnum = exports.GetDefinitionsProductTypeRequirementsEnforcedEnum = exports.GetDefinitionsProductTypeRequirementsEnum = exports.
|
|
19
|
+
exports.GetDefinitionsProductTypeLocaleEnum = exports.GetDefinitionsProductTypeRequirementsEnforcedEnum = exports.GetDefinitionsProductTypeRequirementsEnum = exports.ProductTypeDefinitionsApi = exports.ProductTypeDefinitionsApiFactory = exports.ProductTypeDefinitionsApiFp = exports.ProductTypeDefinitionsApiAxiosParamCreator = void 0;
|
|
20
20
|
const axios_1 = __importDefault(require("axios"));
|
|
21
21
|
// Some imports not used depending on template conditions
|
|
22
22
|
// @ts-ignore
|
|
@@ -24,10 +24,10 @@ const common_1 = require("../common");
|
|
|
24
24
|
// @ts-ignore
|
|
25
25
|
const base_1 = require("../base");
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* ProductTypeDefinitionsApi - axios parameter creator
|
|
28
28
|
* @export
|
|
29
29
|
*/
|
|
30
|
-
const
|
|
30
|
+
const ProductTypeDefinitionsApiAxiosParamCreator = function (configuration) {
|
|
31
31
|
return {
|
|
32
32
|
/**
|
|
33
33
|
* Retrieve an Amazon product type definition. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 5 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see [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).
|
|
@@ -131,13 +131,13 @@ const DefinitionsApiAxiosParamCreator = function (configuration) {
|
|
|
131
131
|
},
|
|
132
132
|
};
|
|
133
133
|
};
|
|
134
|
-
exports.
|
|
134
|
+
exports.ProductTypeDefinitionsApiAxiosParamCreator = ProductTypeDefinitionsApiAxiosParamCreator;
|
|
135
135
|
/**
|
|
136
|
-
*
|
|
136
|
+
* ProductTypeDefinitionsApi - functional programming interface
|
|
137
137
|
* @export
|
|
138
138
|
*/
|
|
139
|
-
const
|
|
140
|
-
const localVarAxiosParamCreator = (0, exports.
|
|
139
|
+
const ProductTypeDefinitionsApiFp = function (configuration) {
|
|
140
|
+
const localVarAxiosParamCreator = (0, exports.ProductTypeDefinitionsApiAxiosParamCreator)(configuration);
|
|
141
141
|
return {
|
|
142
142
|
/**
|
|
143
143
|
* Retrieve an Amazon product type definition. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 5 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see [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).
|
|
@@ -154,7 +154,7 @@ const DefinitionsApiFp = function (configuration) {
|
|
|
154
154
|
async getDefinitionsProductType(productType, marketplaceIds, sellerId, productTypeVersion, requirements, requirementsEnforced, locale, options) {
|
|
155
155
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getDefinitionsProductType(productType, marketplaceIds, sellerId, productTypeVersion, requirements, requirementsEnforced, locale, options);
|
|
156
156
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
157
|
-
const localVarOperationServerBasePath = base_1.operationServerMap['
|
|
157
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['ProductTypeDefinitionsApi.getDefinitionsProductType']?.[localVarOperationServerIndex]?.url;
|
|
158
158
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
159
159
|
},
|
|
160
160
|
/**
|
|
@@ -170,22 +170,22 @@ const DefinitionsApiFp = function (configuration) {
|
|
|
170
170
|
async searchDefinitionsProductTypes(marketplaceIds, keywords, itemName, locale, searchLocale, options) {
|
|
171
171
|
const localVarAxiosArgs = await localVarAxiosParamCreator.searchDefinitionsProductTypes(marketplaceIds, keywords, itemName, locale, searchLocale, options);
|
|
172
172
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
173
|
-
const localVarOperationServerBasePath = base_1.operationServerMap['
|
|
173
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['ProductTypeDefinitionsApi.searchDefinitionsProductTypes']?.[localVarOperationServerIndex]?.url;
|
|
174
174
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
175
175
|
},
|
|
176
176
|
};
|
|
177
177
|
};
|
|
178
|
-
exports.
|
|
178
|
+
exports.ProductTypeDefinitionsApiFp = ProductTypeDefinitionsApiFp;
|
|
179
179
|
/**
|
|
180
|
-
*
|
|
180
|
+
* ProductTypeDefinitionsApi - factory interface
|
|
181
181
|
* @export
|
|
182
182
|
*/
|
|
183
|
-
const
|
|
184
|
-
const localVarFp = (0, exports.
|
|
183
|
+
const ProductTypeDefinitionsApiFactory = function (configuration, basePath, axios) {
|
|
184
|
+
const localVarFp = (0, exports.ProductTypeDefinitionsApiFp)(configuration);
|
|
185
185
|
return {
|
|
186
186
|
/**
|
|
187
187
|
* Retrieve an Amazon product type definition. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 5 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see [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).
|
|
188
|
-
* @param {
|
|
188
|
+
* @param {ProductTypeDefinitionsApiGetDefinitionsProductTypeRequest} requestParameters Request parameters.
|
|
189
189
|
* @param {*} [options] Override http request option.
|
|
190
190
|
* @throws {RequiredError}
|
|
191
191
|
*/
|
|
@@ -194,7 +194,7 @@ const DefinitionsApiFactory = function (configuration, basePath, axios) {
|
|
|
194
194
|
},
|
|
195
195
|
/**
|
|
196
196
|
* Search for and return a list of Amazon product types that have definitions available. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 5 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see [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).
|
|
197
|
-
* @param {
|
|
197
|
+
* @param {ProductTypeDefinitionsApiSearchDefinitionsProductTypesRequest} requestParameters Request parameters.
|
|
198
198
|
* @param {*} [options] Override http request option.
|
|
199
199
|
* @throws {RequiredError}
|
|
200
200
|
*/
|
|
@@ -203,36 +203,36 @@ const DefinitionsApiFactory = function (configuration, basePath, axios) {
|
|
|
203
203
|
},
|
|
204
204
|
};
|
|
205
205
|
};
|
|
206
|
-
exports.
|
|
206
|
+
exports.ProductTypeDefinitionsApiFactory = ProductTypeDefinitionsApiFactory;
|
|
207
207
|
/**
|
|
208
|
-
*
|
|
208
|
+
* ProductTypeDefinitionsApi - object-oriented interface
|
|
209
209
|
* @export
|
|
210
|
-
* @class
|
|
210
|
+
* @class ProductTypeDefinitionsApi
|
|
211
211
|
* @extends {BaseAPI}
|
|
212
212
|
*/
|
|
213
|
-
class
|
|
213
|
+
class ProductTypeDefinitionsApi extends base_1.BaseAPI {
|
|
214
214
|
/**
|
|
215
215
|
* Retrieve an Amazon product type definition. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 5 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see [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).
|
|
216
|
-
* @param {
|
|
216
|
+
* @param {ProductTypeDefinitionsApiGetDefinitionsProductTypeRequest} requestParameters Request parameters.
|
|
217
217
|
* @param {*} [options] Override http request option.
|
|
218
218
|
* @throws {RequiredError}
|
|
219
|
-
* @memberof
|
|
219
|
+
* @memberof ProductTypeDefinitionsApi
|
|
220
220
|
*/
|
|
221
221
|
getDefinitionsProductType(requestParameters, options) {
|
|
222
|
-
return (0, exports.
|
|
222
|
+
return (0, exports.ProductTypeDefinitionsApiFp)(this.configuration).getDefinitionsProductType(requestParameters.productType, requestParameters.marketplaceIds, requestParameters.sellerId, requestParameters.productTypeVersion, requestParameters.requirements, requestParameters.requirementsEnforced, requestParameters.locale, options).then((request) => request(this.axios, this.basePath));
|
|
223
223
|
}
|
|
224
224
|
/**
|
|
225
225
|
* Search for and return a list of Amazon product types that have definitions available. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 5 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see [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).
|
|
226
|
-
* @param {
|
|
226
|
+
* @param {ProductTypeDefinitionsApiSearchDefinitionsProductTypesRequest} requestParameters Request parameters.
|
|
227
227
|
* @param {*} [options] Override http request option.
|
|
228
228
|
* @throws {RequiredError}
|
|
229
|
-
* @memberof
|
|
229
|
+
* @memberof ProductTypeDefinitionsApi
|
|
230
230
|
*/
|
|
231
231
|
searchDefinitionsProductTypes(requestParameters, options) {
|
|
232
|
-
return (0, exports.
|
|
232
|
+
return (0, exports.ProductTypeDefinitionsApiFp)(this.configuration).searchDefinitionsProductTypes(requestParameters.marketplaceIds, requestParameters.keywords, requestParameters.itemName, requestParameters.locale, requestParameters.searchLocale, options).then((request) => request(this.axios, this.basePath));
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
|
-
exports.
|
|
235
|
+
exports.ProductTypeDefinitionsApi = ProductTypeDefinitionsApi;
|
|
236
236
|
/**
|
|
237
237
|
* @export
|
|
238
238
|
*/
|
|
@@ -27,4 +27,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
27
27
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
28
28
|
};
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
__exportStar(require("./api/definitions-api"), exports);
|
|
30
|
+
__exportStar(require("./api/product-type-definitions-api"), exports);
|
package/dist/cjs/client.js
CHANGED
|
@@ -19,7 +19,7 @@ exports.clientRateLimits = [
|
|
|
19
19
|
burst: 10,
|
|
20
20
|
},
|
|
21
21
|
];
|
|
22
|
-
class ProductTypeDefinitionsApiClient extends api_model_1.
|
|
22
|
+
class ProductTypeDefinitionsApiClient extends api_model_1.ProductTypeDefinitionsApi {
|
|
23
23
|
constructor(configuration) {
|
|
24
24
|
const { axios, endpoint } = (0, common_1.createAxiosInstance)(configuration, exports.clientRateLimits);
|
|
25
25
|
super(new api_model_1.Configuration(), endpoint, axios);
|
|
@@ -18,10 +18,10 @@ import { DUMMY_BASE_URL, assertParamExists, setSearchParams, toPathString, creat
|
|
|
18
18
|
// @ts-ignore
|
|
19
19
|
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, operationServerMap } from '../base';
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* ProductTypeDefinitionsApi - axios parameter creator
|
|
22
22
|
* @export
|
|
23
23
|
*/
|
|
24
|
-
export const
|
|
24
|
+
export const ProductTypeDefinitionsApiAxiosParamCreator = function (configuration) {
|
|
25
25
|
return {
|
|
26
26
|
/**
|
|
27
27
|
* Retrieve an Amazon product type definition. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 5 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see [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).
|
|
@@ -126,11 +126,11 @@ export const DefinitionsApiAxiosParamCreator = function (configuration) {
|
|
|
126
126
|
};
|
|
127
127
|
};
|
|
128
128
|
/**
|
|
129
|
-
*
|
|
129
|
+
* ProductTypeDefinitionsApi - functional programming interface
|
|
130
130
|
* @export
|
|
131
131
|
*/
|
|
132
|
-
export const
|
|
133
|
-
const localVarAxiosParamCreator =
|
|
132
|
+
export const ProductTypeDefinitionsApiFp = function (configuration) {
|
|
133
|
+
const localVarAxiosParamCreator = ProductTypeDefinitionsApiAxiosParamCreator(configuration);
|
|
134
134
|
return {
|
|
135
135
|
/**
|
|
136
136
|
* Retrieve an Amazon product type definition. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 5 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see [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).
|
|
@@ -147,7 +147,7 @@ export const DefinitionsApiFp = function (configuration) {
|
|
|
147
147
|
async getDefinitionsProductType(productType, marketplaceIds, sellerId, productTypeVersion, requirements, requirementsEnforced, locale, options) {
|
|
148
148
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getDefinitionsProductType(productType, marketplaceIds, sellerId, productTypeVersion, requirements, requirementsEnforced, locale, options);
|
|
149
149
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
150
|
-
const localVarOperationServerBasePath = operationServerMap['
|
|
150
|
+
const localVarOperationServerBasePath = operationServerMap['ProductTypeDefinitionsApi.getDefinitionsProductType']?.[localVarOperationServerIndex]?.url;
|
|
151
151
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
152
152
|
},
|
|
153
153
|
/**
|
|
@@ -163,21 +163,21 @@ export const DefinitionsApiFp = function (configuration) {
|
|
|
163
163
|
async searchDefinitionsProductTypes(marketplaceIds, keywords, itemName, locale, searchLocale, options) {
|
|
164
164
|
const localVarAxiosArgs = await localVarAxiosParamCreator.searchDefinitionsProductTypes(marketplaceIds, keywords, itemName, locale, searchLocale, options);
|
|
165
165
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
166
|
-
const localVarOperationServerBasePath = operationServerMap['
|
|
166
|
+
const localVarOperationServerBasePath = operationServerMap['ProductTypeDefinitionsApi.searchDefinitionsProductTypes']?.[localVarOperationServerIndex]?.url;
|
|
167
167
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
168
168
|
},
|
|
169
169
|
};
|
|
170
170
|
};
|
|
171
171
|
/**
|
|
172
|
-
*
|
|
172
|
+
* ProductTypeDefinitionsApi - factory interface
|
|
173
173
|
* @export
|
|
174
174
|
*/
|
|
175
|
-
export const
|
|
176
|
-
const localVarFp =
|
|
175
|
+
export const ProductTypeDefinitionsApiFactory = function (configuration, basePath, axios) {
|
|
176
|
+
const localVarFp = ProductTypeDefinitionsApiFp(configuration);
|
|
177
177
|
return {
|
|
178
178
|
/**
|
|
179
179
|
* Retrieve an Amazon product type definition. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 5 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see [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).
|
|
180
|
-
* @param {
|
|
180
|
+
* @param {ProductTypeDefinitionsApiGetDefinitionsProductTypeRequest} requestParameters Request parameters.
|
|
181
181
|
* @param {*} [options] Override http request option.
|
|
182
182
|
* @throws {RequiredError}
|
|
183
183
|
*/
|
|
@@ -186,7 +186,7 @@ export const DefinitionsApiFactory = function (configuration, basePath, axios) {
|
|
|
186
186
|
},
|
|
187
187
|
/**
|
|
188
188
|
* Search for and return a list of Amazon product types that have definitions available. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 5 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see [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).
|
|
189
|
-
* @param {
|
|
189
|
+
* @param {ProductTypeDefinitionsApiSearchDefinitionsProductTypesRequest} requestParameters Request parameters.
|
|
190
190
|
* @param {*} [options] Override http request option.
|
|
191
191
|
* @throws {RequiredError}
|
|
192
192
|
*/
|
|
@@ -196,31 +196,31 @@ export const DefinitionsApiFactory = function (configuration, basePath, axios) {
|
|
|
196
196
|
};
|
|
197
197
|
};
|
|
198
198
|
/**
|
|
199
|
-
*
|
|
199
|
+
* ProductTypeDefinitionsApi - object-oriented interface
|
|
200
200
|
* @export
|
|
201
|
-
* @class
|
|
201
|
+
* @class ProductTypeDefinitionsApi
|
|
202
202
|
* @extends {BaseAPI}
|
|
203
203
|
*/
|
|
204
|
-
export class
|
|
204
|
+
export class ProductTypeDefinitionsApi extends BaseAPI {
|
|
205
205
|
/**
|
|
206
206
|
* Retrieve an Amazon product type definition. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 5 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see [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).
|
|
207
|
-
* @param {
|
|
207
|
+
* @param {ProductTypeDefinitionsApiGetDefinitionsProductTypeRequest} requestParameters Request parameters.
|
|
208
208
|
* @param {*} [options] Override http request option.
|
|
209
209
|
* @throws {RequiredError}
|
|
210
|
-
* @memberof
|
|
210
|
+
* @memberof ProductTypeDefinitionsApi
|
|
211
211
|
*/
|
|
212
212
|
getDefinitionsProductType(requestParameters, options) {
|
|
213
|
-
return
|
|
213
|
+
return ProductTypeDefinitionsApiFp(this.configuration).getDefinitionsProductType(requestParameters.productType, requestParameters.marketplaceIds, requestParameters.sellerId, requestParameters.productTypeVersion, requestParameters.requirements, requestParameters.requirementsEnforced, requestParameters.locale, options).then((request) => request(this.axios, this.basePath));
|
|
214
214
|
}
|
|
215
215
|
/**
|
|
216
216
|
* Search for and return a list of Amazon product types that have definitions available. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 5 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see [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).
|
|
217
|
-
* @param {
|
|
217
|
+
* @param {ProductTypeDefinitionsApiSearchDefinitionsProductTypesRequest} requestParameters Request parameters.
|
|
218
218
|
* @param {*} [options] Override http request option.
|
|
219
219
|
* @throws {RequiredError}
|
|
220
|
-
* @memberof
|
|
220
|
+
* @memberof ProductTypeDefinitionsApi
|
|
221
221
|
*/
|
|
222
222
|
searchDefinitionsProductTypes(requestParameters, options) {
|
|
223
|
-
return
|
|
223
|
+
return ProductTypeDefinitionsApiFp(this.configuration).searchDefinitionsProductTypes(requestParameters.marketplaceIds, requestParameters.keywords, requestParameters.itemName, requestParameters.locale, requestParameters.searchLocale, options).then((request) => request(this.axios, this.basePath));
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
226
|
/**
|
package/dist/es/api-model/api.js
CHANGED
package/dist/es/client.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createAxiosInstance } from '@sp-api-sdk/common';
|
|
2
|
-
import { Configuration,
|
|
2
|
+
import { Configuration, ProductTypeDefinitionsApi } from './api-model';
|
|
3
3
|
export const clientRateLimits = [
|
|
4
4
|
{
|
|
5
5
|
method: 'get',
|
|
@@ -16,7 +16,7 @@ export const clientRateLimits = [
|
|
|
16
16
|
burst: 10,
|
|
17
17
|
},
|
|
18
18
|
];
|
|
19
|
-
export class ProductTypeDefinitionsApiClient extends
|
|
19
|
+
export class ProductTypeDefinitionsApiClient extends ProductTypeDefinitionsApi {
|
|
20
20
|
constructor(configuration) {
|
|
21
21
|
const { axios, endpoint } = createAxiosInstance(configuration, clientRateLimits);
|
|
22
22
|
super(new Configuration(), endpoint, axios);
|
|
@@ -16,10 +16,10 @@ import { type RequestArgs, BaseAPI } from '../base';
|
|
|
16
16
|
import type { ProductTypeDefinition } from '../models';
|
|
17
17
|
import type { ProductTypeList } from '../models';
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* ProductTypeDefinitionsApi - axios parameter creator
|
|
20
20
|
* @export
|
|
21
21
|
*/
|
|
22
|
-
export declare const
|
|
22
|
+
export declare const ProductTypeDefinitionsApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
23
23
|
/**
|
|
24
24
|
* Retrieve an Amazon product type definition. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 5 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see [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} productType The Amazon product type name.
|
|
@@ -46,10 +46,10 @@ export declare const DefinitionsApiAxiosParamCreator: (configuration?: Configura
|
|
|
46
46
|
searchDefinitionsProductTypes: (marketplaceIds: Array<string>, keywords?: Array<string>, itemName?: string, locale?: string, searchLocale?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
47
47
|
};
|
|
48
48
|
/**
|
|
49
|
-
*
|
|
49
|
+
* ProductTypeDefinitionsApi - functional programming interface
|
|
50
50
|
* @export
|
|
51
51
|
*/
|
|
52
|
-
export declare const
|
|
52
|
+
export declare const ProductTypeDefinitionsApiFp: (configuration?: Configuration) => {
|
|
53
53
|
/**
|
|
54
54
|
* Retrieve an Amazon product type definition. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 5 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see [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).
|
|
55
55
|
* @param {string} productType The Amazon product type name.
|
|
@@ -76,134 +76,134 @@ export declare const DefinitionsApiFp: (configuration?: Configuration) => {
|
|
|
76
76
|
searchDefinitionsProductTypes(marketplaceIds: Array<string>, keywords?: Array<string>, itemName?: string, locale?: string, searchLocale?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ProductTypeList>>;
|
|
77
77
|
};
|
|
78
78
|
/**
|
|
79
|
-
*
|
|
79
|
+
* ProductTypeDefinitionsApi - factory interface
|
|
80
80
|
* @export
|
|
81
81
|
*/
|
|
82
|
-
export declare const
|
|
82
|
+
export declare const ProductTypeDefinitionsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
83
83
|
/**
|
|
84
84
|
* Retrieve an Amazon product type definition. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 5 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see [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).
|
|
85
|
-
* @param {
|
|
85
|
+
* @param {ProductTypeDefinitionsApiGetDefinitionsProductTypeRequest} requestParameters Request parameters.
|
|
86
86
|
* @param {*} [options] Override http request option.
|
|
87
87
|
* @throws {RequiredError}
|
|
88
88
|
*/
|
|
89
|
-
getDefinitionsProductType(requestParameters:
|
|
89
|
+
getDefinitionsProductType(requestParameters: ProductTypeDefinitionsApiGetDefinitionsProductTypeRequest, options?: RawAxiosRequestConfig): AxiosPromise<ProductTypeDefinition>;
|
|
90
90
|
/**
|
|
91
91
|
* Search for and return a list of Amazon product types that have definitions available. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 5 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see [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).
|
|
92
|
-
* @param {
|
|
92
|
+
* @param {ProductTypeDefinitionsApiSearchDefinitionsProductTypesRequest} requestParameters Request parameters.
|
|
93
93
|
* @param {*} [options] Override http request option.
|
|
94
94
|
* @throws {RequiredError}
|
|
95
95
|
*/
|
|
96
|
-
searchDefinitionsProductTypes(requestParameters:
|
|
96
|
+
searchDefinitionsProductTypes(requestParameters: ProductTypeDefinitionsApiSearchDefinitionsProductTypesRequest, options?: RawAxiosRequestConfig): AxiosPromise<ProductTypeList>;
|
|
97
97
|
};
|
|
98
98
|
/**
|
|
99
|
-
* Request parameters for getDefinitionsProductType operation in
|
|
99
|
+
* Request parameters for getDefinitionsProductType operation in ProductTypeDefinitionsApi.
|
|
100
100
|
* @export
|
|
101
|
-
* @interface
|
|
101
|
+
* @interface ProductTypeDefinitionsApiGetDefinitionsProductTypeRequest
|
|
102
102
|
*/
|
|
103
|
-
export interface
|
|
103
|
+
export interface ProductTypeDefinitionsApiGetDefinitionsProductTypeRequest {
|
|
104
104
|
/**
|
|
105
105
|
* The Amazon product type name.
|
|
106
106
|
* @type {string}
|
|
107
|
-
* @memberof
|
|
107
|
+
* @memberof ProductTypeDefinitionsApiGetDefinitionsProductType
|
|
108
108
|
*/
|
|
109
109
|
readonly productType: string;
|
|
110
110
|
/**
|
|
111
111
|
* A comma-delimited list of Amazon marketplace identifiers for the request. Note: This parameter is limited to one marketplaceId at this time.
|
|
112
112
|
* @type {Array<string>}
|
|
113
|
-
* @memberof
|
|
113
|
+
* @memberof ProductTypeDefinitionsApiGetDefinitionsProductType
|
|
114
114
|
*/
|
|
115
115
|
readonly marketplaceIds: Array<string>;
|
|
116
116
|
/**
|
|
117
117
|
* A selling partner identifier. When provided, seller-specific requirements and values are populated within the product type definition schema, such as brand names associated with the selling partner.
|
|
118
118
|
* @type {string}
|
|
119
|
-
* @memberof
|
|
119
|
+
* @memberof ProductTypeDefinitionsApiGetDefinitionsProductType
|
|
120
120
|
*/
|
|
121
121
|
readonly sellerId?: string;
|
|
122
122
|
/**
|
|
123
123
|
* The version of the Amazon product type to retrieve. Defaults to \"LATEST\",. Prerelease versions of product type definitions may be retrieved with \"RELEASE_CANDIDATE\". If no prerelease version is currently available, the \"LATEST\" live version will be provided.
|
|
124
124
|
* @type {string}
|
|
125
|
-
* @memberof
|
|
125
|
+
* @memberof ProductTypeDefinitionsApiGetDefinitionsProductType
|
|
126
126
|
*/
|
|
127
127
|
readonly productTypeVersion?: string;
|
|
128
128
|
/**
|
|
129
129
|
* The name of the requirements set to retrieve requirements for.
|
|
130
130
|
* @type {'LISTING' | 'LISTING_PRODUCT_ONLY' | 'LISTING_OFFER_ONLY'}
|
|
131
|
-
* @memberof
|
|
131
|
+
* @memberof ProductTypeDefinitionsApiGetDefinitionsProductType
|
|
132
132
|
*/
|
|
133
133
|
readonly requirements?: GetDefinitionsProductTypeRequirementsEnum;
|
|
134
134
|
/**
|
|
135
135
|
* Identifies if the required attributes for a requirements set are enforced by the product type definition schema. Non-enforced requirements enable structural validation of individual attributes without all the required attributes being present (such as for partial updates).
|
|
136
136
|
* @type {'ENFORCED' | 'NOT_ENFORCED'}
|
|
137
|
-
* @memberof
|
|
137
|
+
* @memberof ProductTypeDefinitionsApiGetDefinitionsProductType
|
|
138
138
|
*/
|
|
139
139
|
readonly requirementsEnforced?: GetDefinitionsProductTypeRequirementsEnforcedEnum;
|
|
140
140
|
/**
|
|
141
141
|
* Locale for retrieving display labels and other presentation details. Defaults to the default language of the first marketplace in the request.
|
|
142
142
|
* @type {'DEFAULT' | 'ar' | 'ar_AE' | 'de' | 'de_DE' | 'en' | 'en_AE' | 'en_AU' | 'en_CA' | 'en_GB' | 'en_IN' | 'en_SG' | 'en_US' | 'es' | 'es_ES' | 'es_MX' | 'es_US' | 'fr' | 'fr_CA' | 'fr_FR' | 'it' | 'it_IT' | 'ja' | 'ja_JP' | 'nl' | 'nl_NL' | 'pl' | 'pl_PL' | 'pt' | 'pt_BR' | 'pt_PT' | 'sv' | 'sv_SE' | 'tr' | 'tr_TR' | 'zh' | 'zh_CN' | 'zh_TW'}
|
|
143
|
-
* @memberof
|
|
143
|
+
* @memberof ProductTypeDefinitionsApiGetDefinitionsProductType
|
|
144
144
|
*/
|
|
145
145
|
readonly locale?: GetDefinitionsProductTypeLocaleEnum;
|
|
146
146
|
}
|
|
147
147
|
/**
|
|
148
|
-
* Request parameters for searchDefinitionsProductTypes operation in
|
|
148
|
+
* Request parameters for searchDefinitionsProductTypes operation in ProductTypeDefinitionsApi.
|
|
149
149
|
* @export
|
|
150
|
-
* @interface
|
|
150
|
+
* @interface ProductTypeDefinitionsApiSearchDefinitionsProductTypesRequest
|
|
151
151
|
*/
|
|
152
|
-
export interface
|
|
152
|
+
export interface ProductTypeDefinitionsApiSearchDefinitionsProductTypesRequest {
|
|
153
153
|
/**
|
|
154
154
|
* A comma-delimited list of Amazon marketplace identifiers for the request.
|
|
155
155
|
* @type {Array<string>}
|
|
156
|
-
* @memberof
|
|
156
|
+
* @memberof ProductTypeDefinitionsApiSearchDefinitionsProductTypes
|
|
157
157
|
*/
|
|
158
158
|
readonly marketplaceIds: Array<string>;
|
|
159
159
|
/**
|
|
160
160
|
* A comma-delimited list of keywords to search product types. **Note:** Cannot be used with `itemName`.
|
|
161
161
|
* @type {Array<string>}
|
|
162
|
-
* @memberof
|
|
162
|
+
* @memberof ProductTypeDefinitionsApiSearchDefinitionsProductTypes
|
|
163
163
|
*/
|
|
164
164
|
readonly keywords?: Array<string>;
|
|
165
165
|
/**
|
|
166
166
|
* The title of the ASIN to get the product type recommendation. **Note:** Cannot be used with `keywords`.
|
|
167
167
|
* @type {string}
|
|
168
|
-
* @memberof
|
|
168
|
+
* @memberof ProductTypeDefinitionsApiSearchDefinitionsProductTypes
|
|
169
169
|
*/
|
|
170
170
|
readonly itemName?: string;
|
|
171
171
|
/**
|
|
172
172
|
* The locale for the display names in the response. Defaults to the primary locale of the marketplace.
|
|
173
173
|
* @type {string}
|
|
174
|
-
* @memberof
|
|
174
|
+
* @memberof ProductTypeDefinitionsApiSearchDefinitionsProductTypes
|
|
175
175
|
*/
|
|
176
176
|
readonly locale?: string;
|
|
177
177
|
/**
|
|
178
178
|
* The locale used for the `keywords` and `itemName` parameters. Defaults to the primary locale of the marketplace.
|
|
179
179
|
* @type {string}
|
|
180
|
-
* @memberof
|
|
180
|
+
* @memberof ProductTypeDefinitionsApiSearchDefinitionsProductTypes
|
|
181
181
|
*/
|
|
182
182
|
readonly searchLocale?: string;
|
|
183
183
|
}
|
|
184
184
|
/**
|
|
185
|
-
*
|
|
185
|
+
* ProductTypeDefinitionsApi - object-oriented interface
|
|
186
186
|
* @export
|
|
187
|
-
* @class
|
|
187
|
+
* @class ProductTypeDefinitionsApi
|
|
188
188
|
* @extends {BaseAPI}
|
|
189
189
|
*/
|
|
190
|
-
export declare class
|
|
190
|
+
export declare class ProductTypeDefinitionsApi extends BaseAPI {
|
|
191
191
|
/**
|
|
192
192
|
* Retrieve an Amazon product type definition. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 5 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see [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).
|
|
193
|
-
* @param {
|
|
193
|
+
* @param {ProductTypeDefinitionsApiGetDefinitionsProductTypeRequest} requestParameters Request parameters.
|
|
194
194
|
* @param {*} [options] Override http request option.
|
|
195
195
|
* @throws {RequiredError}
|
|
196
|
-
* @memberof
|
|
196
|
+
* @memberof ProductTypeDefinitionsApi
|
|
197
197
|
*/
|
|
198
|
-
getDefinitionsProductType(requestParameters:
|
|
198
|
+
getDefinitionsProductType(requestParameters: ProductTypeDefinitionsApiGetDefinitionsProductTypeRequest, options?: RawAxiosRequestConfig): Promise<globalAxios.AxiosResponse<ProductTypeDefinition, any>>;
|
|
199
199
|
/**
|
|
200
200
|
* Search for and return a list of Amazon product types that have definitions available. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 5 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see [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).
|
|
201
|
-
* @param {
|
|
201
|
+
* @param {ProductTypeDefinitionsApiSearchDefinitionsProductTypesRequest} requestParameters Request parameters.
|
|
202
202
|
* @param {*} [options] Override http request option.
|
|
203
203
|
* @throws {RequiredError}
|
|
204
|
-
* @memberof
|
|
204
|
+
* @memberof ProductTypeDefinitionsApi
|
|
205
205
|
*/
|
|
206
|
-
searchDefinitionsProductTypes(requestParameters:
|
|
206
|
+
searchDefinitionsProductTypes(requestParameters: ProductTypeDefinitionsApiSearchDefinitionsProductTypesRequest, options?: RawAxiosRequestConfig): Promise<globalAxios.AxiosResponse<ProductTypeList, any>>;
|
|
207
207
|
}
|
|
208
208
|
/**
|
|
209
209
|
* @export
|
package/dist/types/client.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ClientConfiguration, type RateLimit } from '@sp-api-sdk/common';
|
|
2
|
-
import {
|
|
2
|
+
import { ProductTypeDefinitionsApi } from './api-model';
|
|
3
3
|
export declare const clientRateLimits: RateLimit[];
|
|
4
|
-
export declare class ProductTypeDefinitionsApiClient extends
|
|
4
|
+
export declare class ProductTypeDefinitionsApiClient extends ProductTypeDefinitionsApi {
|
|
5
5
|
constructor(configuration: ClientConfiguration);
|
|
6
6
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@sp-api-sdk/product-type-definitions-api-2020-09-01",
|
|
3
3
|
"author": "Bertrand Marron <bertrand@bizon.solutions>",
|
|
4
4
|
"description": "The Selling Partner API for Product Type Definitions provides programmatic access to attribute and data requirements for product types in the Amazon catalog. Use this API to return the JSON Schema for a product type that you can then use with other Selling Partner APIs, such as the Selling Partner API for Listings Items, the Selling Partner API for Catalog Items, and the Selling Partner API for Feeds (for JSON-based listing feeds). For more information, see the Product Type Definitions API Use Case Guide.",
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "4.0.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.1.
|
|
22
|
-
"axios": "^1.
|
|
21
|
+
"@sp-api-sdk/common": "2.1.14",
|
|
22
|
+
"axios": "^1.9.0"
|
|
23
23
|
},
|
|
24
24
|
"repository": {
|
|
25
25
|
"type": "git",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"sp sdk",
|
|
41
41
|
"product type definitions api"
|
|
42
42
|
],
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "773f45c3f4aab28e0bd9f6033045988800d7f258"
|
|
44
44
|
}
|