@sp-api-sdk/product-type-definitions-api-2020-09-01 1.7.7 → 1.7.11

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/README.md CHANGED
@@ -4,6 +4,15 @@ The Selling Partner API for Product Type Definitions provides programmatic acces
4
4
 
5
5
  For more information, see the [Product Type Definitions API Use Case Guide](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/use-case-guides/product-type-definitions-api-use-case-guide/definitions-product-types-api-use-case-guide_2020-09-01.md).
6
6
 
7
+ [![npm version](https://badgen.net/npm/v/@sp-api-sdk/product-type-definitions-api-2020-09-01)](https://www.npmjs.com/package/@sp-api-sdk/product-type-definitions-api-2020-09-01)
8
+ [![XO code style](https://badgen.net/badge/code%20style/XO/cyan)](https://github.com/xojs/xo)
9
+
10
+ ## Documentation
11
+
12
+ Learn more about this Selling Partner API by visiting the [official documentation](https://github.com/amzn/selling-partner-api-docs/tree/main/references/product-type-definitions-api/definitionsProductTypes_2020-09-01.md).
13
+
14
+ Also, see the [generated documentation](https://bizon.github.io/selling-partner-api-sdk/modules/_sp_api_sdk_product_type_definitions_api_2020_09_01.html) for this API client.
15
+
7
16
  ## Installing
8
17
 
9
18
  ```sh
@@ -21,26 +30,25 @@ import {SellingPartnerApiAuth} from '@sp-api-sdk/auth'
21
30
  import {ProductTypeDefinitionsApiClient} from '@sp-api-sdk/product-type-definitions-api-2020-09-01'
22
31
 
23
32
  const auth = new SellingPartnerApiAuth({
24
- clientId: '',
25
- clientSecret: '',
26
- refreshToken: '',
27
- secretAccessKey: '',
33
+ clientId: process.env.LWA_CLIENT_ID,
34
+ clientSecret: process.env.LWA_CLIENT_SECRET,
35
+ refreshToken: 'Atzr|…',
28
36
  accessKeyId: '',
29
- region: '',
37
+ secretAccessKey: '',
30
38
  role: {
31
- arn: '',
32
- }
39
+ arn: 'arn:aws:iam::…',
40
+ },
33
41
  })
34
42
 
35
43
  const client = new ProductTypeDefinitionsApiClient({
36
44
  auth,
37
- region: 'eu' // or 'eu-west-1'
45
+ region: 'eu',
38
46
  })
39
47
  ```
40
48
 
41
- ## Handle Rate Limiting
49
+ ## Rate Limiting
42
50
 
43
- If you want to let the SDK retry after each 429 responses, instanciate the client like this:
51
+ In order to retry rate limited requests (HTTP 429), you can configure the API client as such:
44
52
 
45
53
  ```javascript
46
54
  const client = new ProductTypeDefinitionsApiClient({
@@ -48,13 +56,28 @@ const client = new ProductTypeDefinitionsApiClient({
48
56
  region: 'eu',
49
57
  rateLimiting: {
50
58
  retry: true,
51
- onRetry: (retryInfo) => console.log(retryInfo) // Optional
52
- }
59
+ // Optionally specify a callback that will be called on every retry.
60
+ onRetry: (retryInfo) => {
61
+ console.log(retryInfo)
62
+ },
63
+ },
53
64
  })
54
65
  ```
55
66
 
56
- The SDK gets the rate limits for each routes from the API documentation
67
+ The rate limits used for each route are specified in the [API documentation]((https://github.com/amzn/selling-partner-api-docs/tree/main/references/product-type-definitions-api/definitionsProductTypes_2020-09-01.md)).
68
+
69
+ ## License
70
+
71
+ MIT
57
72
 
58
- ## API documentation
73
+ ## Miscellaneous
59
74
 
60
- See [here](https://github.com/amzn/selling-partner-api-docs/tree/main/references/product-type-definitions-api/definitionsProductTypes_2020-09-01.md)
75
+ ```
76
+ ╚⊙ ⊙╝
77
+ ╚═(███)═╝
78
+ ╚═(███)═╝
79
+ ╚═(███)═╝
80
+ ╚═(███)═╝
81
+ ╚═(███)═╝
82
+ ╚═(███)═╝
83
+ ```
@@ -30,7 +30,7 @@ const DefinitionsApiAxiosParamCreator = function (configuration) {
30
30
  /**
31
31
  * 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://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/usage-plans-rate-limits/Usage-Plans-and-Rate-Limits.md).
32
32
  * @param {string} productType The Amazon product type name.
33
- * @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers for the request.
33
+ * @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.
34
34
  * @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.
35
35
  * @param {string} [productTypeVersion] The version of the Amazon product type to retrieve. Defaults to \&quot;LATEST\&quot;,. Prerelease versions of product type definitions may be retrieved with \&quot;RELEASE_CANDIDATE\&quot;. If no prerelease version is currently available, the \&quot;LATEST\&quot; live version will be provided.
36
36
  * @param {'LISTING' | 'LISTING_PRODUCT_ONLY' | 'LISTING_OFFER_ONLY'} [requirements] The name of the requirements set to retrieve requirements for.
@@ -128,7 +128,7 @@ const DefinitionsApiFp = function (configuration) {
128
128
  /**
129
129
  * 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://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/usage-plans-rate-limits/Usage-Plans-and-Rate-Limits.md).
130
130
  * @param {string} productType The Amazon product type name.
131
- * @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers for the request.
131
+ * @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.
132
132
  * @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.
133
133
  * @param {string} [productTypeVersion] The version of the Amazon product type to retrieve. Defaults to \&quot;LATEST\&quot;,. Prerelease versions of product type definitions may be retrieved with \&quot;RELEASE_CANDIDATE\&quot;. If no prerelease version is currently available, the \&quot;LATEST\&quot; live version will be provided.
134
134
  * @param {'LISTING' | 'LISTING_PRODUCT_ONLY' | 'LISTING_OFFER_ONLY'} [requirements] The name of the requirements set to retrieve requirements for.
@@ -165,7 +165,7 @@ const DefinitionsApiFactory = function (configuration, basePath, axios) {
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://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/usage-plans-rate-limits/Usage-Plans-and-Rate-Limits.md).
167
167
  * @param {string} productType The Amazon product type name.
168
- * @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers for the request.
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
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
170
  * @param {string} [productTypeVersion] The version of the Amazon product type to retrieve. Defaults to \&quot;LATEST\&quot;,. Prerelease versions of product type definitions may be retrieved with \&quot;RELEASE_CANDIDATE\&quot;. If no prerelease version is currently available, the \&quot;LATEST\&quot; live version will be provided.
171
171
  * @param {'LISTING' | 'LISTING_PRODUCT_ONLY' | 'LISTING_OFFER_ONLY'} [requirements] The name of the requirements set to retrieve requirements for.
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ProductTypeDefinitionsApiClient = exports.RATE_LIMITS = void 0;
3
+ exports.ProductTypeDefinitionsApiClient = exports.clientRateLimits = void 0;
4
4
  /* eslint-disable prefer-regex-literals */
5
5
  const common_1 = require("@sp-api-sdk/common");
6
6
  const api_model_1 = require("./api-model");
7
7
  const error_1 = require("./error");
8
- exports.RATE_LIMITS = [
8
+ exports.clientRateLimits = [
9
9
  {
10
10
  method: 'get',
11
11
  urlRegex: new RegExp('^/definitions/2020-09-01/productTypes$'),
@@ -21,20 +21,23 @@ exports.RATE_LIMITS = [
21
21
  ];
22
22
  class ProductTypeDefinitionsApiClient extends api_model_1.DefinitionsApi {
23
23
  constructor(parameters) {
24
- const region = common_1.awsRegionByCode[parameters.region] ?? parameters.region;
24
+ const config = common_1.sellingPartnerRegions[parameters.region];
25
+ if (!config) {
26
+ throw new error_1.ProductTypeDefinitionsApiError(`Unknown region: ${parameters.region}`);
27
+ }
25
28
  const { rateLimiting, ...clientParameters } = parameters;
26
- const axiosParameters = { ...clientParameters, region };
29
+ const axiosParameters = {
30
+ ...clientParameters,
31
+ region: config.awsRegion,
32
+ };
27
33
  if (rateLimiting?.retry) {
28
- axiosParameters.rateLimits = exports.RATE_LIMITS;
34
+ axiosParameters.rateLimits = exports.clientRateLimits;
29
35
  axiosParameters.onRetry = rateLimiting.onRetry;
30
36
  }
31
37
  const axiosInstance = (0, common_1.createAxiosInstance)(axiosParameters);
32
38
  const configuration = new api_model_1.Configuration();
33
39
  const environment = parameters.sandbox ? 'sandbox' : 'production';
34
- const endpoint = common_1.endpoints[environment][region];
35
- if (!endpoint) {
36
- throw new error_1.ProductTypeDefinitionsApiError(`Unknown region : ${region}`);
37
- }
40
+ const endpoint = config.endpoints[environment];
38
41
  super(configuration, endpoint, axiosInstance);
39
42
  }
40
43
  }
@@ -26,7 +26,7 @@ export const DefinitionsApiAxiosParamCreator = function (configuration) {
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://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/usage-plans-rate-limits/Usage-Plans-and-Rate-Limits.md).
28
28
  * @param {string} productType The Amazon product type name.
29
- * @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers for the request.
29
+ * @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.
30
30
  * @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.
31
31
  * @param {string} [productTypeVersion] The version of the Amazon product type to retrieve. Defaults to \&quot;LATEST\&quot;,. Prerelease versions of product type definitions may be retrieved with \&quot;RELEASE_CANDIDATE\&quot;. If no prerelease version is currently available, the \&quot;LATEST\&quot; live version will be provided.
32
32
  * @param {'LISTING' | 'LISTING_PRODUCT_ONLY' | 'LISTING_OFFER_ONLY'} [requirements] The name of the requirements set to retrieve requirements for.
@@ -123,7 +123,7 @@ export const DefinitionsApiFp = function (configuration) {
123
123
  /**
124
124
  * 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://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/usage-plans-rate-limits/Usage-Plans-and-Rate-Limits.md).
125
125
  * @param {string} productType The Amazon product type name.
126
- * @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers for the request.
126
+ * @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.
127
127
  * @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.
128
128
  * @param {string} [productTypeVersion] The version of the Amazon product type to retrieve. Defaults to \&quot;LATEST\&quot;,. Prerelease versions of product type definitions may be retrieved with \&quot;RELEASE_CANDIDATE\&quot;. If no prerelease version is currently available, the \&quot;LATEST\&quot; live version will be provided.
129
129
  * @param {'LISTING' | 'LISTING_PRODUCT_ONLY' | 'LISTING_OFFER_ONLY'} [requirements] The name of the requirements set to retrieve requirements for.
@@ -159,7 +159,7 @@ export const DefinitionsApiFactory = function (configuration, basePath, axios) {
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://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/usage-plans-rate-limits/Usage-Plans-and-Rate-Limits.md).
161
161
  * @param {string} productType The Amazon product type name.
162
- * @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers for the request.
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
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
164
  * @param {string} [productTypeVersion] The version of the Amazon product type to retrieve. Defaults to \&quot;LATEST\&quot;,. Prerelease versions of product type definitions may be retrieved with \&quot;RELEASE_CANDIDATE\&quot;. If no prerelease version is currently available, the \&quot;LATEST\&quot; live version will be provided.
165
165
  * @param {'LISTING' | 'LISTING_PRODUCT_ONLY' | 'LISTING_OFFER_ONLY'} [requirements] The name of the requirements set to retrieve requirements for.
@@ -1,8 +1,8 @@
1
1
  /* eslint-disable prefer-regex-literals */
2
- import { endpoints, awsRegionByCode, createAxiosInstance } from '@sp-api-sdk/common';
2
+ import { sellingPartnerRegions, createAxiosInstance } from '@sp-api-sdk/common';
3
3
  import { Configuration, DefinitionsApi } from './api-model';
4
4
  import { ProductTypeDefinitionsApiError } from './error';
5
- export const RATE_LIMITS = [
5
+ export const clientRateLimits = [
6
6
  {
7
7
  method: 'get',
8
8
  urlRegex: new RegExp('^/definitions/2020-09-01/productTypes$'),
@@ -18,20 +18,23 @@ export const RATE_LIMITS = [
18
18
  ];
19
19
  export class ProductTypeDefinitionsApiClient extends DefinitionsApi {
20
20
  constructor(parameters) {
21
- const region = awsRegionByCode[parameters.region] ?? parameters.region;
21
+ const config = sellingPartnerRegions[parameters.region];
22
+ if (!config) {
23
+ throw new ProductTypeDefinitionsApiError(`Unknown region: ${parameters.region}`);
24
+ }
22
25
  const { rateLimiting, ...clientParameters } = parameters;
23
- const axiosParameters = { ...clientParameters, region };
26
+ const axiosParameters = {
27
+ ...clientParameters,
28
+ region: config.awsRegion,
29
+ };
24
30
  if (rateLimiting?.retry) {
25
- axiosParameters.rateLimits = RATE_LIMITS;
31
+ axiosParameters.rateLimits = clientRateLimits;
26
32
  axiosParameters.onRetry = rateLimiting.onRetry;
27
33
  }
28
34
  const axiosInstance = createAxiosInstance(axiosParameters);
29
35
  const configuration = new Configuration();
30
36
  const environment = parameters.sandbox ? 'sandbox' : 'production';
31
- const endpoint = endpoints[environment][region];
32
- if (!endpoint) {
33
- throw new ProductTypeDefinitionsApiError(`Unknown region : ${region}`);
34
- }
37
+ const endpoint = config.endpoints[environment];
35
38
  super(configuration, endpoint, axiosInstance);
36
39
  }
37
40
  }
@@ -22,7 +22,7 @@ export declare const DefinitionsApiAxiosParamCreator: (configuration?: Configura
22
22
  /**
23
23
  * 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://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/usage-plans-rate-limits/Usage-Plans-and-Rate-Limits.md).
24
24
  * @param {string} productType The Amazon product type name.
25
- * @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers for the request.
25
+ * @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.
26
26
  * @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.
27
27
  * @param {string} [productTypeVersion] The version of the Amazon product type to retrieve. Defaults to \&quot;LATEST\&quot;,. Prerelease versions of product type definitions may be retrieved with \&quot;RELEASE_CANDIDATE\&quot;. If no prerelease version is currently available, the \&quot;LATEST\&quot; live version will be provided.
28
28
  * @param {'LISTING' | 'LISTING_PRODUCT_ONLY' | 'LISTING_OFFER_ONLY'} [requirements] The name of the requirements set to retrieve requirements for.
@@ -49,7 +49,7 @@ export declare const DefinitionsApiFp: (configuration?: Configuration | undefine
49
49
  /**
50
50
  * 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://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/usage-plans-rate-limits/Usage-Plans-and-Rate-Limits.md).
51
51
  * @param {string} productType The Amazon product type name.
52
- * @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers for the request.
52
+ * @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.
53
53
  * @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.
54
54
  * @param {string} [productTypeVersion] The version of the Amazon product type to retrieve. Defaults to \&quot;LATEST\&quot;,. Prerelease versions of product type definitions may be retrieved with \&quot;RELEASE_CANDIDATE\&quot;. If no prerelease version is currently available, the \&quot;LATEST\&quot; live version will be provided.
55
55
  * @param {'LISTING' | 'LISTING_PRODUCT_ONLY' | 'LISTING_OFFER_ONLY'} [requirements] The name of the requirements set to retrieve requirements for.
@@ -76,7 +76,7 @@ export declare const DefinitionsApiFactory: (configuration?: Configuration | und
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://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/usage-plans-rate-limits/Usage-Plans-and-Rate-Limits.md).
78
78
  * @param {string} productType The Amazon product type name.
79
- * @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers for the request.
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
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
81
  * @param {string} [productTypeVersion] The version of the Amazon product type to retrieve. Defaults to \&quot;LATEST\&quot;,. Prerelease versions of product type definitions may be retrieved with \&quot;RELEASE_CANDIDATE\&quot;. If no prerelease version is currently available, the \&quot;LATEST\&quot; live version will be provided.
82
82
  * @param {'LISTING' | 'LISTING_PRODUCT_ONLY' | 'LISTING_OFFER_ONLY'} [requirements] The name of the requirements set to retrieve requirements for.
@@ -108,7 +108,7 @@ export interface DefinitionsApiGetDefinitionsProductTypeRequest {
108
108
  */
109
109
  readonly productType: string;
110
110
  /**
111
- * A comma-delimited list of Amazon marketplace identifiers for the request.
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
113
  * @memberof DefinitionsApiGetDefinitionsProductType
114
114
  */
@@ -177,7 +177,7 @@ export declare class DefinitionsApi extends BaseAPI {
177
177
  * @throws {RequiredError}
178
178
  * @memberof DefinitionsApi
179
179
  */
180
- getDefinitionsProductType(requestParameters: DefinitionsApiGetDefinitionsProductTypeRequest, options?: any): Promise<import("axios").AxiosResponse<ProductTypeDefinition>>;
180
+ getDefinitionsProductType(requestParameters: DefinitionsApiGetDefinitionsProductTypeRequest, options?: any): Promise<import("axios").AxiosResponse<ProductTypeDefinition, any>>;
181
181
  /**
182
182
  * 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://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/usage-plans-rate-limits/Usage-Plans-and-Rate-Limits.md).
183
183
  * @param {DefinitionsApiSearchDefinitionsProductTypesRequest} requestParameters Request parameters.
@@ -185,5 +185,5 @@ export declare class DefinitionsApi extends BaseAPI {
185
185
  * @throws {RequiredError}
186
186
  * @memberof DefinitionsApi
187
187
  */
188
- searchDefinitionsProductTypes(requestParameters: DefinitionsApiSearchDefinitionsProductTypesRequest, options?: any): Promise<import("axios").AxiosResponse<ProductTypeList>>;
188
+ searchDefinitionsProductTypes(requestParameters: DefinitionsApiSearchDefinitionsProductTypesRequest, options?: any): Promise<import("axios").AxiosResponse<ProductTypeList, any>>;
189
189
  }
@@ -62,4 +62,4 @@ export declare const toPathString: (url: URL) => string;
62
62
  *
63
63
  * @export
64
64
  */
65
- export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration | undefined) => (axios?: AxiosInstance, basePath?: string) => Promise<import("axios").AxiosResponse<any>>;
65
+ export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration | undefined) => (axios?: AxiosInstance, basePath?: string) => Promise<import("axios").AxiosResponse<any, any>>;
@@ -1,11 +1,11 @@
1
- import { onRetry } from '@sp-api-sdk/common';
2
- import type { ClientConfiguration, RateLimit } from '@sp-api-sdk/common';
1
+ import type { ClientConfiguration, SellingPartnerRegion, RateLimit, OnRetryHandler } from '@sp-api-sdk/common';
3
2
  import { DefinitionsApi } from './api-model';
4
- export declare const RATE_LIMITS: RateLimit[];
3
+ export declare const clientRateLimits: RateLimit[];
5
4
  export interface ClientParameters extends Omit<ClientConfiguration, 'rateLimits' | 'onRetry'> {
5
+ region: SellingPartnerRegion;
6
6
  rateLimiting?: {
7
7
  retry: boolean;
8
- onRetry?: onRetry;
8
+ onRetry?: OnRetryHandler;
9
9
  };
10
10
  }
11
11
  export declare class ProductTypeDefinitionsApiClient extends DefinitionsApi {
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.7.7",
5
+ "version": "1.7.11",
6
6
  "main": "dist/cjs/index.js",
7
7
  "module": "dist/es/index.js",
8
8
  "types": "dist/types/index.d.ts",
@@ -25,9 +25,9 @@
25
25
  "test": "NODE_ENV='test' yarn jest"
26
26
  },
27
27
  "dependencies": {
28
- "@sp-api-sdk/auth": "^1.9.3",
29
- "@sp-api-sdk/common": "^1.7.4",
30
- "axios": "^0.21.1"
28
+ "@sp-api-sdk/auth": "^1.9.6",
29
+ "@sp-api-sdk/common": "^1.7.8",
30
+ "axios": "^0.24.0"
31
31
  },
32
32
  "repository": {
33
33
  "type": "git",
@@ -48,5 +48,5 @@
48
48
  "sp sdk",
49
49
  "product type definitions api"
50
50
  ],
51
- "gitHead": "30d4f1399133a7e6a08f9a2ec2cb9ce4641a623b"
51
+ "gitHead": "f21b5cb511abd110bf1f07843558719993f36187"
52
52
  }