@sp-api-sdk/product-type-definitions-api-2020-09-01 1.10.9 → 1.10.10
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/definitions-api.js +6 -13
- package/dist/cjs/src/api-model/base.js +1 -3
- package/dist/cjs/src/api-model/common.js +2 -0
- package/dist/es/src/api-model/api/definitions-api.js +6 -13
- package/dist/es/src/api-model/base.js +1 -3
- package/dist/es/src/api-model/common.js +2 -0
- package/dist/types/src/api-model/api/definitions-api.d.ts +6 -13
- package/dist/types/src/api-model/base.d.ts +2 -3
- package/dist/types/src/api-model/common.d.ts +3 -3
- package/package.json +3 -3
|
@@ -164,28 +164,21 @@ const DefinitionsApiFactory = function (configuration, basePath, axios) {
|
|
|
164
164
|
return {
|
|
165
165
|
/**
|
|
166
166
|
* 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).
|
|
167
|
-
* @param {
|
|
168
|
-
* @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers for the request. Note: This parameter is limited to one marketplaceId at this time.
|
|
169
|
-
* @param {string} [sellerId] 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.
|
|
170
|
-
* @param {string} [productTypeVersion] 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.
|
|
171
|
-
* @param {'LISTING' | 'LISTING_PRODUCT_ONLY' | 'LISTING_OFFER_ONLY'} [requirements] The name of the requirements set to retrieve requirements for.
|
|
172
|
-
* @param {'ENFORCED' | 'NOT_ENFORCED'} [requirementsEnforced] 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).
|
|
173
|
-
* @param {'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'} [locale] Locale for retrieving display labels and other presentation details. Defaults to the default language of the first marketplace in the request.
|
|
167
|
+
* @param {DefinitionsApiGetDefinitionsProductTypeRequest} requestParameters Request parameters.
|
|
174
168
|
* @param {*} [options] Override http request option.
|
|
175
169
|
* @throws {RequiredError}
|
|
176
170
|
*/
|
|
177
|
-
getDefinitionsProductType(
|
|
178
|
-
return localVarFp.getDefinitionsProductType(productType, marketplaceIds, sellerId, productTypeVersion, requirements, requirementsEnforced, locale, options).then((request) => request(axios, basePath));
|
|
171
|
+
getDefinitionsProductType(requestParameters, options) {
|
|
172
|
+
return localVarFp.getDefinitionsProductType(requestParameters.productType, requestParameters.marketplaceIds, requestParameters.sellerId, requestParameters.productTypeVersion, requestParameters.requirements, requestParameters.requirementsEnforced, requestParameters.locale, options).then((request) => request(axios, basePath));
|
|
179
173
|
},
|
|
180
174
|
/**
|
|
181
175
|
* 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).
|
|
182
|
-
* @param {
|
|
183
|
-
* @param {Array<string>} [keywords] A comma-delimited list of keywords to search product types by.
|
|
176
|
+
* @param {DefinitionsApiSearchDefinitionsProductTypesRequest} requestParameters Request parameters.
|
|
184
177
|
* @param {*} [options] Override http request option.
|
|
185
178
|
* @throws {RequiredError}
|
|
186
179
|
*/
|
|
187
|
-
searchDefinitionsProductTypes(
|
|
188
|
-
return localVarFp.searchDefinitionsProductTypes(marketplaceIds, keywords, options).then((request) => request(axios, basePath));
|
|
180
|
+
searchDefinitionsProductTypes(requestParameters, options) {
|
|
181
|
+
return localVarFp.searchDefinitionsProductTypes(requestParameters.marketplaceIds, requestParameters.keywords, options).then((request) => request(axios, basePath));
|
|
189
182
|
},
|
|
190
183
|
};
|
|
191
184
|
};
|
|
@@ -15,8 +15,6 @@
|
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
|
|
17
17
|
const tslib_1 = require("tslib");
|
|
18
|
-
// Some imports not used depending on template conditions
|
|
19
|
-
// @ts-ignore
|
|
20
18
|
const axios_1 = tslib_1.__importDefault(require("axios"));
|
|
21
19
|
exports.BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
|
|
22
20
|
/**
|
|
@@ -57,10 +55,10 @@ exports.BaseAPI = BaseAPI;
|
|
|
57
55
|
*/
|
|
58
56
|
class RequiredError extends Error {
|
|
59
57
|
field;
|
|
60
|
-
name = "RequiredError";
|
|
61
58
|
constructor(field, msg) {
|
|
62
59
|
super(msg);
|
|
63
60
|
this.field = field;
|
|
61
|
+
this.name = "RequiredError";
|
|
64
62
|
}
|
|
65
63
|
}
|
|
66
64
|
exports.RequiredError = RequiredError;
|
|
@@ -81,6 +81,8 @@ const setOAuthToObject = async function (object, name, scopes, configuration) {
|
|
|
81
81
|
};
|
|
82
82
|
exports.setOAuthToObject = setOAuthToObject;
|
|
83
83
|
function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
|
|
84
|
+
if (parameter == null)
|
|
85
|
+
return;
|
|
84
86
|
if (typeof parameter === "object") {
|
|
85
87
|
if (Array.isArray(parameter)) {
|
|
86
88
|
parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
|
@@ -158,28 +158,21 @@ export const DefinitionsApiFactory = function (configuration, basePath, axios) {
|
|
|
158
158
|
return {
|
|
159
159
|
/**
|
|
160
160
|
* 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).
|
|
161
|
-
* @param {
|
|
162
|
-
* @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers for the request. Note: This parameter is limited to one marketplaceId at this time.
|
|
163
|
-
* @param {string} [sellerId] 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.
|
|
164
|
-
* @param {string} [productTypeVersion] 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.
|
|
165
|
-
* @param {'LISTING' | 'LISTING_PRODUCT_ONLY' | 'LISTING_OFFER_ONLY'} [requirements] The name of the requirements set to retrieve requirements for.
|
|
166
|
-
* @param {'ENFORCED' | 'NOT_ENFORCED'} [requirementsEnforced] 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).
|
|
167
|
-
* @param {'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'} [locale] Locale for retrieving display labels and other presentation details. Defaults to the default language of the first marketplace in the request.
|
|
161
|
+
* @param {DefinitionsApiGetDefinitionsProductTypeRequest} requestParameters Request parameters.
|
|
168
162
|
* @param {*} [options] Override http request option.
|
|
169
163
|
* @throws {RequiredError}
|
|
170
164
|
*/
|
|
171
|
-
getDefinitionsProductType(
|
|
172
|
-
return localVarFp.getDefinitionsProductType(productType, marketplaceIds, sellerId, productTypeVersion, requirements, requirementsEnforced, locale, options).then((request) => request(axios, basePath));
|
|
165
|
+
getDefinitionsProductType(requestParameters, options) {
|
|
166
|
+
return localVarFp.getDefinitionsProductType(requestParameters.productType, requestParameters.marketplaceIds, requestParameters.sellerId, requestParameters.productTypeVersion, requestParameters.requirements, requestParameters.requirementsEnforced, requestParameters.locale, options).then((request) => request(axios, basePath));
|
|
173
167
|
},
|
|
174
168
|
/**
|
|
175
169
|
* 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).
|
|
176
|
-
* @param {
|
|
177
|
-
* @param {Array<string>} [keywords] A comma-delimited list of keywords to search product types by.
|
|
170
|
+
* @param {DefinitionsApiSearchDefinitionsProductTypesRequest} requestParameters Request parameters.
|
|
178
171
|
* @param {*} [options] Override http request option.
|
|
179
172
|
* @throws {RequiredError}
|
|
180
173
|
*/
|
|
181
|
-
searchDefinitionsProductTypes(
|
|
182
|
-
return localVarFp.searchDefinitionsProductTypes(marketplaceIds, keywords, options).then((request) => request(axios, basePath));
|
|
174
|
+
searchDefinitionsProductTypes(requestParameters, options) {
|
|
175
|
+
return localVarFp.searchDefinitionsProductTypes(requestParameters.marketplaceIds, requestParameters.keywords, options).then((request) => request(axios, basePath));
|
|
183
176
|
},
|
|
184
177
|
};
|
|
185
178
|
};
|
|
@@ -11,8 +11,6 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
-
// Some imports not used depending on template conditions
|
|
15
|
-
// @ts-ignore
|
|
16
14
|
import globalAxios from 'axios';
|
|
17
15
|
export const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
|
|
18
16
|
/**
|
|
@@ -52,9 +50,9 @@ export class BaseAPI {
|
|
|
52
50
|
*/
|
|
53
51
|
export class RequiredError extends Error {
|
|
54
52
|
field;
|
|
55
|
-
name = "RequiredError";
|
|
56
53
|
constructor(field, msg) {
|
|
57
54
|
super(msg);
|
|
58
55
|
this.field = field;
|
|
56
|
+
this.name = "RequiredError";
|
|
59
57
|
}
|
|
60
58
|
}
|
|
@@ -73,6 +73,8 @@ export const setOAuthToObject = async function (object, name, scopes, configurat
|
|
|
73
73
|
}
|
|
74
74
|
};
|
|
75
75
|
function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
|
|
76
|
+
if (parameter == null)
|
|
77
|
+
return;
|
|
76
78
|
if (typeof parameter === "object") {
|
|
77
79
|
if (Array.isArray(parameter)) {
|
|
78
80
|
parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
12
|
+
import type { Configuration } from '../configuration';
|
|
13
|
+
import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
14
14
|
import { RequestArgs, BaseAPI } from '../base';
|
|
15
15
|
import { ProductTypeDefinition } from '../models';
|
|
16
16
|
import { ProductTypeList } from '../models';
|
|
@@ -75,25 +75,18 @@ export declare const DefinitionsApiFp: (configuration?: Configuration) => {
|
|
|
75
75
|
export declare const DefinitionsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
76
76
|
/**
|
|
77
77
|
* 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).
|
|
78
|
-
* @param {
|
|
79
|
-
* @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers for the request. Note: This parameter is limited to one marketplaceId at this time.
|
|
80
|
-
* @param {string} [sellerId] 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.
|
|
81
|
-
* @param {string} [productTypeVersion] 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.
|
|
82
|
-
* @param {'LISTING' | 'LISTING_PRODUCT_ONLY' | 'LISTING_OFFER_ONLY'} [requirements] The name of the requirements set to retrieve requirements for.
|
|
83
|
-
* @param {'ENFORCED' | 'NOT_ENFORCED'} [requirementsEnforced] 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).
|
|
84
|
-
* @param {'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'} [locale] Locale for retrieving display labels and other presentation details. Defaults to the default language of the first marketplace in the request.
|
|
78
|
+
* @param {DefinitionsApiGetDefinitionsProductTypeRequest} requestParameters Request parameters.
|
|
85
79
|
* @param {*} [options] Override http request option.
|
|
86
80
|
* @throws {RequiredError}
|
|
87
81
|
*/
|
|
88
|
-
getDefinitionsProductType(
|
|
82
|
+
getDefinitionsProductType(requestParameters: DefinitionsApiGetDefinitionsProductTypeRequest, options?: AxiosRequestConfig): AxiosPromise<ProductTypeDefinition>;
|
|
89
83
|
/**
|
|
90
84
|
* 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).
|
|
91
|
-
* @param {
|
|
92
|
-
* @param {Array<string>} [keywords] A comma-delimited list of keywords to search product types by.
|
|
85
|
+
* @param {DefinitionsApiSearchDefinitionsProductTypesRequest} requestParameters Request parameters.
|
|
93
86
|
* @param {*} [options] Override http request option.
|
|
94
87
|
* @throws {RequiredError}
|
|
95
88
|
*/
|
|
96
|
-
searchDefinitionsProductTypes(
|
|
89
|
+
searchDefinitionsProductTypes(requestParameters: DefinitionsApiSearchDefinitionsProductTypesRequest, options?: AxiosRequestConfig): AxiosPromise<ProductTypeList>;
|
|
97
90
|
};
|
|
98
91
|
/**
|
|
99
92
|
* Request parameters for getDefinitionsProductType operation in DefinitionsApi.
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { Configuration } from
|
|
13
|
-
import { AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
12
|
+
import type { Configuration } from './configuration';
|
|
13
|
+
import type { AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
14
14
|
export declare const BASE_PATH: string;
|
|
15
15
|
/**
|
|
16
16
|
*
|
|
@@ -50,6 +50,5 @@ export declare class BaseAPI {
|
|
|
50
50
|
*/
|
|
51
51
|
export declare class RequiredError extends Error {
|
|
52
52
|
field: string;
|
|
53
|
-
name: "RequiredError";
|
|
54
53
|
constructor(field: string, msg?: string);
|
|
55
54
|
}
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
/// <reference types="node" />
|
|
13
|
-
import { Configuration } from "./configuration";
|
|
14
|
-
import { RequestArgs } from "./base";
|
|
15
|
-
import { AxiosInstance, AxiosResponse } from 'axios';
|
|
13
|
+
import type { Configuration } from "./configuration";
|
|
14
|
+
import type { RequestArgs } from "./base";
|
|
15
|
+
import type { AxiosInstance, AxiosResponse } from 'axios';
|
|
16
16
|
/**
|
|
17
17
|
*
|
|
18
18
|
* @export
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@sp-api-sdk/product-type-definitions-api-2020-09-01",
|
|
3
3
|
"author": "Vincent Mesquita <vincent.mesquita@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": "1.10.
|
|
5
|
+
"version": "1.10.10",
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
7
7
|
"module": "dist/es/index.js",
|
|
8
8
|
"types": "dist/types/index.d.ts",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"test": "jest"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@sp-api-sdk/common": "^1.9.
|
|
29
|
+
"@sp-api-sdk/common": "^1.9.22",
|
|
30
30
|
"axios": "^0.27.2"
|
|
31
31
|
},
|
|
32
32
|
"repository": {
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"typedoc": {
|
|
52
52
|
"entryPoint": "./index.ts"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "19982f06cbbd770bfc7b9f1bc8a42f59b57baead"
|
|
55
55
|
}
|