@sp-api-sdk/product-type-definitions-api-2020-09-01 4.0.17 → 5.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.
Files changed (62) hide show
  1. package/README.md +4 -4
  2. package/dist/index.cjs +497 -0
  3. package/dist/index.cjs.map +1 -0
  4. package/dist/index.d.cts +606 -0
  5. package/dist/index.d.ts +606 -0
  6. package/dist/index.js +449 -0
  7. package/dist/index.js.map +1 -0
  8. package/package.json +23 -12
  9. package/dist/cjs/api-model/api/product-type-definitions-api.js +0 -278
  10. package/dist/cjs/api-model/api.js +0 -30
  11. package/dist/cjs/api-model/base.js +0 -52
  12. package/dist/cjs/api-model/common.js +0 -123
  13. package/dist/cjs/api-model/configuration.js +0 -98
  14. package/dist/cjs/api-model/index.js +0 -32
  15. package/dist/cjs/api-model/models/error-list.js +0 -15
  16. package/dist/cjs/api-model/models/index.js +0 -25
  17. package/dist/cjs/api-model/models/model-error.js +0 -15
  18. package/dist/cjs/api-model/models/product-type-definition.js +0 -25
  19. package/dist/cjs/api-model/models/product-type-list.js +0 -15
  20. package/dist/cjs/api-model/models/product-type-version.js +0 -15
  21. package/dist/cjs/api-model/models/product-type.js +0 -15
  22. package/dist/cjs/api-model/models/property-group.js +0 -15
  23. package/dist/cjs/api-model/models/schema-link-link.js +0 -19
  24. package/dist/cjs/api-model/models/schema-link.js +0 -15
  25. package/dist/cjs/client.js +0 -28
  26. package/dist/cjs/index.js +0 -19
  27. package/dist/es/api-model/api/product-type-definitions-api.js +0 -268
  28. package/dist/es/api-model/api.js +0 -14
  29. package/dist/es/api-model/base.js +0 -44
  30. package/dist/es/api-model/common.js +0 -110
  31. package/dist/es/api-model/configuration.js +0 -94
  32. package/dist/es/api-model/index.js +0 -16
  33. package/dist/es/api-model/models/error-list.js +0 -14
  34. package/dist/es/api-model/models/index.js +0 -9
  35. package/dist/es/api-model/models/model-error.js +0 -14
  36. package/dist/es/api-model/models/product-type-definition.js +0 -22
  37. package/dist/es/api-model/models/product-type-list.js +0 -14
  38. package/dist/es/api-model/models/product-type-version.js +0 -14
  39. package/dist/es/api-model/models/product-type.js +0 -14
  40. package/dist/es/api-model/models/property-group.js +0 -14
  41. package/dist/es/api-model/models/schema-link-link.js +0 -16
  42. package/dist/es/api-model/models/schema-link.js +0 -14
  43. package/dist/es/client.js +0 -24
  44. package/dist/es/index.js +0 -3
  45. package/dist/types/api-model/api/product-type-definitions-api.d.ts +0 -223
  46. package/dist/types/api-model/api.d.ts +0 -12
  47. package/dist/types/api-model/base.d.ts +0 -42
  48. package/dist/types/api-model/common.d.ts +0 -34
  49. package/dist/types/api-model/configuration.d.ts +0 -98
  50. package/dist/types/api-model/index.d.ts +0 -14
  51. package/dist/types/api-model/models/error-list.d.ts +0 -17
  52. package/dist/types/api-model/models/index.d.ts +0 -9
  53. package/dist/types/api-model/models/model-error.d.ts +0 -28
  54. package/dist/types/api-model/models/product-type-definition.d.ts +0 -63
  55. package/dist/types/api-model/models/product-type-list.d.ts +0 -22
  56. package/dist/types/api-model/models/product-type-version.d.ts +0 -28
  57. package/dist/types/api-model/models/product-type.d.ts +0 -28
  58. package/dist/types/api-model/models/property-group.d.ts +0 -28
  59. package/dist/types/api-model/models/schema-link-link.d.ts +0 -28
  60. package/dist/types/api-model/models/schema-link.d.ts +0 -19
  61. package/dist/types/client.d.ts +0 -6
  62. package/dist/types/index.d.ts +0 -3
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # `product-type-definitions-api-2020-09-01`
1
+ # `@sp-api-sdk/product-type-definitions-api-2020-09-01`
2
2
 
3
3
  [![npm version](https://img.shields.io/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)
4
4
  [![XO code style](https://img.shields.io/badge/code_style-xo-cyan)](https://github.com/xojs/xo)
@@ -27,10 +27,10 @@ npm install @sp-api-sdk/product-type-definitions-api-2020-09-01
27
27
  import {SellingPartnerApiAuth} from '@sp-api-sdk/auth'
28
28
  import {ProductTypeDefinitionsApiClient} from '@sp-api-sdk/product-type-definitions-api-2020-09-01'
29
29
 
30
+ // `clientId` and `clientSecret` default to the `LWA_CLIENT_ID` and
31
+ // `LWA_CLIENT_SECRET` environment variables.
30
32
  const auth = new SellingPartnerApiAuth({
31
- clientId: process.env.LWA_CLIENT_ID,
32
- clientSecret: process.env.LWA_CLIENT_SECRET,
33
- refreshToken: 'Atzr|…',
33
+ refreshToken: await getRefreshTokenForSeller(sellerId),
34
34
  })
35
35
 
36
36
  const client = new ProductTypeDefinitionsApiClient({
package/dist/index.cjs ADDED
@@ -0,0 +1,497 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/index.ts
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
+ GetDefinitionsProductTypeLocaleEnum: () => GetDefinitionsProductTypeLocaleEnum,
34
+ GetDefinitionsProductTypeRequirementsEnforcedEnum: () => GetDefinitionsProductTypeRequirementsEnforcedEnum,
35
+ GetDefinitionsProductTypeRequirementsEnum: () => GetDefinitionsProductTypeRequirementsEnum,
36
+ ProductTypeDefinitionRequirementsEnforcedEnum: () => ProductTypeDefinitionRequirementsEnforcedEnum,
37
+ ProductTypeDefinitionRequirementsEnum: () => ProductTypeDefinitionRequirementsEnum,
38
+ ProductTypeDefinitionsApi: () => ProductTypeDefinitionsApi,
39
+ ProductTypeDefinitionsApiAxiosParamCreator: () => ProductTypeDefinitionsApiAxiosParamCreator,
40
+ ProductTypeDefinitionsApiClient: () => ProductTypeDefinitionsApiClient,
41
+ ProductTypeDefinitionsApiFactory: () => ProductTypeDefinitionsApiFactory,
42
+ ProductTypeDefinitionsApiFp: () => ProductTypeDefinitionsApiFp,
43
+ SchemaLinkLinkVerbEnum: () => SchemaLinkLinkVerbEnum,
44
+ clientRateLimits: () => clientRateLimits
45
+ });
46
+ module.exports = __toCommonJS(index_exports);
47
+
48
+ // src/client.ts
49
+ var import_common2 = require("@sp-api-sdk/common");
50
+
51
+ // src/api-model/api/product-type-definitions-api.ts
52
+ var import_axios2 = __toESM(require("axios"), 1);
53
+
54
+ // src/api-model/base.ts
55
+ var import_axios = __toESM(require("axios"), 1);
56
+ var BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
57
+ var COLLECTION_FORMATS = {
58
+ csv: ",",
59
+ ssv: " ",
60
+ tsv: " ",
61
+ pipes: "|"
62
+ };
63
+ var BaseAPI = class {
64
+ constructor(configuration, basePath = BASE_PATH, axios = import_axios.default) {
65
+ this.basePath = basePath;
66
+ this.axios = axios;
67
+ if (configuration) {
68
+ this.configuration = configuration;
69
+ this.basePath = configuration.basePath ?? basePath;
70
+ }
71
+ }
72
+ basePath;
73
+ axios;
74
+ configuration;
75
+ };
76
+ var RequiredError = class extends Error {
77
+ constructor(field, msg) {
78
+ super(msg);
79
+ this.field = field;
80
+ this.name = "RequiredError";
81
+ }
82
+ field;
83
+ };
84
+ var operationServerMap = {};
85
+
86
+ // src/api-model/common.ts
87
+ var DUMMY_BASE_URL = "https://example.com";
88
+ var assertParamExists = function(functionName, paramName, paramValue) {
89
+ if (paramValue === null || paramValue === void 0) {
90
+ throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
91
+ }
92
+ };
93
+ function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
94
+ if (parameter == null) return;
95
+ if (typeof parameter === "object") {
96
+ if (Array.isArray(parameter) || parameter instanceof Set) {
97
+ parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
98
+ } else {
99
+ Object.keys(parameter).forEach(
100
+ (currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`)
101
+ );
102
+ }
103
+ } else {
104
+ if (urlSearchParams.has(key)) {
105
+ urlSearchParams.append(key, parameter);
106
+ } else {
107
+ urlSearchParams.set(key, parameter);
108
+ }
109
+ }
110
+ }
111
+ var setSearchParams = function(url, ...objects) {
112
+ const searchParams = new URLSearchParams(url.search);
113
+ setFlattenedQueryParams(searchParams, objects);
114
+ url.search = searchParams.toString();
115
+ };
116
+ var toPathString = function(url) {
117
+ return url.pathname + url.search + url.hash;
118
+ };
119
+ var createRequestFunction = function(axiosArgs, globalAxios3, BASE_PATH2, configuration) {
120
+ return (axios = globalAxios3, basePath = BASE_PATH2) => {
121
+ const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? "" : configuration?.basePath ?? basePath) + axiosArgs.url };
122
+ return axios.request(axiosRequestArgs);
123
+ };
124
+ };
125
+
126
+ // src/api-model/api/product-type-definitions-api.ts
127
+ var ProductTypeDefinitionsApiAxiosParamCreator = function(configuration) {
128
+ return {
129
+ /**
130
+ * 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
+ * @param {string} productType The Amazon product type name.
132
+ * @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.
133
+ * @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.
134
+ * @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.
135
+ * @param {GetDefinitionsProductTypeRequirementsEnum} [requirements] The name of the requirements set to retrieve requirements for.
136
+ * @param {GetDefinitionsProductTypeRequirementsEnforcedEnum} [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).
137
+ * @param {GetDefinitionsProductTypeLocaleEnum} [locale] Locale for retrieving display labels and other presentation details. Defaults to the default language of the first marketplace in the request.
138
+ * @param {*} [options] Override http request option.
139
+ * @throws {RequiredError}
140
+ */
141
+ getDefinitionsProductType: async (productType, marketplaceIds, sellerId, productTypeVersion, requirements, requirementsEnforced, locale, options = {}) => {
142
+ assertParamExists("getDefinitionsProductType", "productType", productType);
143
+ assertParamExists("getDefinitionsProductType", "marketplaceIds", marketplaceIds);
144
+ const localVarPath = `/definitions/2020-09-01/productTypes/{productType}`.replace("{productType}", encodeURIComponent(String(productType)));
145
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
146
+ let baseOptions;
147
+ if (configuration) {
148
+ baseOptions = configuration.baseOptions;
149
+ }
150
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
151
+ const localVarHeaderParameter = {};
152
+ const localVarQueryParameter = {};
153
+ if (sellerId !== void 0) {
154
+ localVarQueryParameter["sellerId"] = sellerId;
155
+ }
156
+ if (marketplaceIds) {
157
+ localVarQueryParameter["marketplaceIds"] = marketplaceIds.join(COLLECTION_FORMATS.csv);
158
+ }
159
+ if (productTypeVersion !== void 0) {
160
+ localVarQueryParameter["productTypeVersion"] = productTypeVersion;
161
+ }
162
+ if (requirements !== void 0) {
163
+ localVarQueryParameter["requirements"] = requirements;
164
+ }
165
+ if (requirementsEnforced !== void 0) {
166
+ localVarQueryParameter["requirementsEnforced"] = requirementsEnforced;
167
+ }
168
+ if (locale !== void 0) {
169
+ localVarQueryParameter["locale"] = locale;
170
+ }
171
+ localVarHeaderParameter["Accept"] = "application/json";
172
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
173
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
174
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
175
+ return {
176
+ url: toPathString(localVarUrlObj),
177
+ options: localVarRequestOptions
178
+ };
179
+ },
180
+ /**
181
+ * 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 {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers for the request.
183
+ * @param {Array<string>} [keywords] A comma-delimited list of keywords to search product types. **Note:** Cannot be used with &#x60;itemName&#x60;.
184
+ * @param {string} [itemName] The title of the ASIN to get the product type recommendation. **Note:** Cannot be used with &#x60;keywords&#x60;.
185
+ * @param {string} [locale] The locale for the display names in the response. Defaults to the primary locale of the marketplace.
186
+ * @param {string} [searchLocale] The locale used for the &#x60;keywords&#x60; and &#x60;itemName&#x60; parameters. Defaults to the primary locale of the marketplace.
187
+ * @param {*} [options] Override http request option.
188
+ * @throws {RequiredError}
189
+ */
190
+ searchDefinitionsProductTypes: async (marketplaceIds, keywords, itemName, locale, searchLocale, options = {}) => {
191
+ assertParamExists("searchDefinitionsProductTypes", "marketplaceIds", marketplaceIds);
192
+ const localVarPath = `/definitions/2020-09-01/productTypes`;
193
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
194
+ let baseOptions;
195
+ if (configuration) {
196
+ baseOptions = configuration.baseOptions;
197
+ }
198
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
199
+ const localVarHeaderParameter = {};
200
+ const localVarQueryParameter = {};
201
+ if (keywords) {
202
+ localVarQueryParameter["keywords"] = keywords.join(COLLECTION_FORMATS.csv);
203
+ }
204
+ if (marketplaceIds) {
205
+ localVarQueryParameter["marketplaceIds"] = marketplaceIds.join(COLLECTION_FORMATS.csv);
206
+ }
207
+ if (itemName !== void 0) {
208
+ localVarQueryParameter["itemName"] = itemName;
209
+ }
210
+ if (locale !== void 0) {
211
+ localVarQueryParameter["locale"] = locale;
212
+ }
213
+ if (searchLocale !== void 0) {
214
+ localVarQueryParameter["searchLocale"] = searchLocale;
215
+ }
216
+ localVarHeaderParameter["Accept"] = "application/json";
217
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
218
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
219
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
220
+ return {
221
+ url: toPathString(localVarUrlObj),
222
+ options: localVarRequestOptions
223
+ };
224
+ }
225
+ };
226
+ };
227
+ var ProductTypeDefinitionsApiFp = function(configuration) {
228
+ const localVarAxiosParamCreator = ProductTypeDefinitionsApiAxiosParamCreator(configuration);
229
+ return {
230
+ /**
231
+ * 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).
232
+ * @param {string} productType The Amazon product type name.
233
+ * @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.
234
+ * @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.
235
+ * @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.
236
+ * @param {GetDefinitionsProductTypeRequirementsEnum} [requirements] The name of the requirements set to retrieve requirements for.
237
+ * @param {GetDefinitionsProductTypeRequirementsEnforcedEnum} [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).
238
+ * @param {GetDefinitionsProductTypeLocaleEnum} [locale] Locale for retrieving display labels and other presentation details. Defaults to the default language of the first marketplace in the request.
239
+ * @param {*} [options] Override http request option.
240
+ * @throws {RequiredError}
241
+ */
242
+ async getDefinitionsProductType(productType, marketplaceIds, sellerId, productTypeVersion, requirements, requirementsEnforced, locale, options) {
243
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getDefinitionsProductType(productType, marketplaceIds, sellerId, productTypeVersion, requirements, requirementsEnforced, locale, options);
244
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
245
+ const localVarOperationServerBasePath = operationServerMap["ProductTypeDefinitionsApi.getDefinitionsProductType"]?.[localVarOperationServerIndex]?.url;
246
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, import_axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
247
+ },
248
+ /**
249
+ * 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).
250
+ * @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers for the request.
251
+ * @param {Array<string>} [keywords] A comma-delimited list of keywords to search product types. **Note:** Cannot be used with &#x60;itemName&#x60;.
252
+ * @param {string} [itemName] The title of the ASIN to get the product type recommendation. **Note:** Cannot be used with &#x60;keywords&#x60;.
253
+ * @param {string} [locale] The locale for the display names in the response. Defaults to the primary locale of the marketplace.
254
+ * @param {string} [searchLocale] The locale used for the &#x60;keywords&#x60; and &#x60;itemName&#x60; parameters. Defaults to the primary locale of the marketplace.
255
+ * @param {*} [options] Override http request option.
256
+ * @throws {RequiredError}
257
+ */
258
+ async searchDefinitionsProductTypes(marketplaceIds, keywords, itemName, locale, searchLocale, options) {
259
+ const localVarAxiosArgs = await localVarAxiosParamCreator.searchDefinitionsProductTypes(marketplaceIds, keywords, itemName, locale, searchLocale, options);
260
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
261
+ const localVarOperationServerBasePath = operationServerMap["ProductTypeDefinitionsApi.searchDefinitionsProductTypes"]?.[localVarOperationServerIndex]?.url;
262
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, import_axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
263
+ }
264
+ };
265
+ };
266
+ var ProductTypeDefinitionsApiFactory = function(configuration, basePath, axios) {
267
+ const localVarFp = ProductTypeDefinitionsApiFp(configuration);
268
+ return {
269
+ /**
270
+ * 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).
271
+ * @param {ProductTypeDefinitionsApiGetDefinitionsProductTypeRequest} requestParameters Request parameters.
272
+ * @param {*} [options] Override http request option.
273
+ * @throws {RequiredError}
274
+ */
275
+ getDefinitionsProductType(requestParameters, options) {
276
+ return localVarFp.getDefinitionsProductType(requestParameters.productType, requestParameters.marketplaceIds, requestParameters.sellerId, requestParameters.productTypeVersion, requestParameters.requirements, requestParameters.requirementsEnforced, requestParameters.locale, options).then((request) => request(axios, basePath));
277
+ },
278
+ /**
279
+ * 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).
280
+ * @param {ProductTypeDefinitionsApiSearchDefinitionsProductTypesRequest} requestParameters Request parameters.
281
+ * @param {*} [options] Override http request option.
282
+ * @throws {RequiredError}
283
+ */
284
+ searchDefinitionsProductTypes(requestParameters, options) {
285
+ return localVarFp.searchDefinitionsProductTypes(requestParameters.marketplaceIds, requestParameters.keywords, requestParameters.itemName, requestParameters.locale, requestParameters.searchLocale, options).then((request) => request(axios, basePath));
286
+ }
287
+ };
288
+ };
289
+ var ProductTypeDefinitionsApi = class extends BaseAPI {
290
+ /**
291
+ * 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).
292
+ * @param {ProductTypeDefinitionsApiGetDefinitionsProductTypeRequest} requestParameters Request parameters.
293
+ * @param {*} [options] Override http request option.
294
+ * @throws {RequiredError}
295
+ */
296
+ getDefinitionsProductType(requestParameters, options) {
297
+ 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));
298
+ }
299
+ /**
300
+ * 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).
301
+ * @param {ProductTypeDefinitionsApiSearchDefinitionsProductTypesRequest} requestParameters Request parameters.
302
+ * @param {*} [options] Override http request option.
303
+ * @throws {RequiredError}
304
+ */
305
+ searchDefinitionsProductTypes(requestParameters, options) {
306
+ return ProductTypeDefinitionsApiFp(this.configuration).searchDefinitionsProductTypes(requestParameters.marketplaceIds, requestParameters.keywords, requestParameters.itemName, requestParameters.locale, requestParameters.searchLocale, options).then((request) => request(this.axios, this.basePath));
307
+ }
308
+ };
309
+ var GetDefinitionsProductTypeRequirementsEnum = {
310
+ Listing: "LISTING",
311
+ ListingProductOnly: "LISTING_PRODUCT_ONLY",
312
+ ListingOfferOnly: "LISTING_OFFER_ONLY"
313
+ };
314
+ var GetDefinitionsProductTypeRequirementsEnforcedEnum = {
315
+ Enforced: "ENFORCED",
316
+ NotEnforced: "NOT_ENFORCED"
317
+ };
318
+ var GetDefinitionsProductTypeLocaleEnum = {
319
+ Default: "DEFAULT",
320
+ Ar: "ar",
321
+ ArAe: "ar_AE",
322
+ De: "de",
323
+ DeDe: "de_DE",
324
+ En: "en",
325
+ EnAe: "en_AE",
326
+ EnAu: "en_AU",
327
+ EnCa: "en_CA",
328
+ EnGb: "en_GB",
329
+ EnIn: "en_IN",
330
+ EnSg: "en_SG",
331
+ EnUs: "en_US",
332
+ Es: "es",
333
+ EsEs: "es_ES",
334
+ EsMx: "es_MX",
335
+ EsUs: "es_US",
336
+ Fr: "fr",
337
+ FrCa: "fr_CA",
338
+ FrFr: "fr_FR",
339
+ It: "it",
340
+ ItIt: "it_IT",
341
+ Ja: "ja",
342
+ JaJp: "ja_JP",
343
+ Nl: "nl",
344
+ NlNl: "nl_NL",
345
+ Pl: "pl",
346
+ PlPl: "pl_PL",
347
+ Pt: "pt",
348
+ PtBr: "pt_BR",
349
+ PtPt: "pt_PT",
350
+ Sv: "sv",
351
+ SvSe: "sv_SE",
352
+ Tr: "tr",
353
+ TrTr: "tr_TR",
354
+ Zh: "zh",
355
+ ZhCn: "zh_CN",
356
+ ZhTw: "zh_TW"
357
+ };
358
+
359
+ // src/api-model/configuration.ts
360
+ var Configuration = class {
361
+ /**
362
+ * parameter for apiKey security
363
+ * @param name security name
364
+ */
365
+ apiKey;
366
+ /**
367
+ * parameter for basic security
368
+ */
369
+ username;
370
+ /**
371
+ * parameter for basic security
372
+ */
373
+ password;
374
+ /**
375
+ * parameter for oauth2 security
376
+ * @param name security name
377
+ * @param scopes oauth2 scope
378
+ */
379
+ accessToken;
380
+ /**
381
+ * parameter for aws4 signature security
382
+ * @param {Object} AWS4Signature - AWS4 Signature security
383
+ * @param {string} options.region - aws region
384
+ * @param {string} options.service - name of the service.
385
+ * @param {string} credentials.accessKeyId - aws access key id
386
+ * @param {string} credentials.secretAccessKey - aws access key
387
+ * @param {string} credentials.sessionToken - aws session token
388
+ * @memberof Configuration
389
+ */
390
+ awsv4;
391
+ /**
392
+ * override base path
393
+ */
394
+ basePath;
395
+ /**
396
+ * override server index
397
+ */
398
+ serverIndex;
399
+ /**
400
+ * base options for axios calls
401
+ */
402
+ baseOptions;
403
+ /**
404
+ * The FormData constructor that will be used to create multipart form data
405
+ * requests. You can inject this here so that execution environments that
406
+ * do not support the FormData class can still run the generated client.
407
+ *
408
+ * @type {new () => FormData}
409
+ */
410
+ formDataCtor;
411
+ constructor(param = {}) {
412
+ this.apiKey = param.apiKey;
413
+ this.username = param.username;
414
+ this.password = param.password;
415
+ this.accessToken = param.accessToken;
416
+ this.awsv4 = param.awsv4;
417
+ this.basePath = param.basePath;
418
+ this.serverIndex = param.serverIndex;
419
+ this.baseOptions = {
420
+ ...param.baseOptions,
421
+ headers: {
422
+ ...param.baseOptions?.headers
423
+ }
424
+ };
425
+ this.formDataCtor = param.formDataCtor;
426
+ }
427
+ /**
428
+ * Check if the given MIME is a JSON MIME.
429
+ * JSON MIME examples:
430
+ * application/json
431
+ * application/json; charset=UTF8
432
+ * APPLICATION/JSON
433
+ * application/vnd.company+json
434
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
435
+ * @return True if the given MIME is JSON, false otherwise.
436
+ */
437
+ isJsonMime(mime) {
438
+ const jsonMime = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i;
439
+ return mime !== null && jsonMime.test(mime);
440
+ }
441
+ };
442
+
443
+ // src/api-model/models/product-type-definition.ts
444
+ var ProductTypeDefinitionRequirementsEnum = {
445
+ Listing: "LISTING",
446
+ ListingProductOnly: "LISTING_PRODUCT_ONLY",
447
+ ListingOfferOnly: "LISTING_OFFER_ONLY"
448
+ };
449
+ var ProductTypeDefinitionRequirementsEnforcedEnum = {
450
+ Enforced: "ENFORCED",
451
+ NotEnforced: "NOT_ENFORCED"
452
+ };
453
+
454
+ // src/api-model/models/schema-link-link.ts
455
+ var SchemaLinkLinkVerbEnum = {
456
+ Get: "GET"
457
+ };
458
+
459
+ // src/client.ts
460
+ var clientRateLimits = [
461
+ {
462
+ method: "get",
463
+ // eslint-disable-next-line prefer-regex-literals
464
+ urlRegex: new RegExp("^/definitions/2020-09-01/productTypes$"),
465
+ rate: 5,
466
+ burst: 10
467
+ },
468
+ {
469
+ method: "get",
470
+ // eslint-disable-next-line prefer-regex-literals
471
+ urlRegex: new RegExp("^/definitions/2020-09-01/productTypes/[^/]*$"),
472
+ rate: 5,
473
+ burst: 10
474
+ }
475
+ ];
476
+ var ProductTypeDefinitionsApiClient = class extends ProductTypeDefinitionsApi {
477
+ constructor(configuration) {
478
+ const { axios, endpoint } = (0, import_common2.createAxiosInstance)(configuration, clientRateLimits);
479
+ super(new Configuration(), endpoint, axios);
480
+ }
481
+ };
482
+ // Annotate the CommonJS export names for ESM import in node:
483
+ 0 && (module.exports = {
484
+ GetDefinitionsProductTypeLocaleEnum,
485
+ GetDefinitionsProductTypeRequirementsEnforcedEnum,
486
+ GetDefinitionsProductTypeRequirementsEnum,
487
+ ProductTypeDefinitionRequirementsEnforcedEnum,
488
+ ProductTypeDefinitionRequirementsEnum,
489
+ ProductTypeDefinitionsApi,
490
+ ProductTypeDefinitionsApiAxiosParamCreator,
491
+ ProductTypeDefinitionsApiClient,
492
+ ProductTypeDefinitionsApiFactory,
493
+ ProductTypeDefinitionsApiFp,
494
+ SchemaLinkLinkVerbEnum,
495
+ clientRateLimits
496
+ });
497
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts","../src/client.ts","../src/api-model/api/product-type-definitions-api.ts","../src/api-model/base.ts","../src/api-model/common.ts","../src/api-model/configuration.ts","../src/api-model/models/product-type-definition.ts","../src/api-model/models/schema-link-link.ts"],"sourcesContent":["export * from './client.js'\nexport * from './api-model/api.js'\nexport * from './api-model/models/index.js'\n","import {type ClientConfiguration, createAxiosInstance, type RateLimit} from '@sp-api-sdk/common'\n\nimport {Configuration, ProductTypeDefinitionsApi} from './api-model/index.js'\n\nexport const clientRateLimits: RateLimit[] = [\n {\n method: 'get',\n // eslint-disable-next-line prefer-regex-literals\n urlRegex: new RegExp('^/definitions/2020-09-01/productTypes$'),\n rate: 5,\n burst: 10,\n },\n {\n method: 'get',\n // eslint-disable-next-line prefer-regex-literals\n urlRegex: new RegExp('^/definitions/2020-09-01/productTypes/[^/]*$'),\n rate: 5,\n burst: 10,\n },\n]\n\nexport class ProductTypeDefinitionsApiClient extends ProductTypeDefinitionsApi {\n constructor(configuration: ClientConfiguration) {\n const {axios, endpoint} = createAxiosInstance(configuration, clientRateLimits)\n\n super(new Configuration(), endpoint, axios)\n }\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * Selling Partner API for Product Type Definitions\n * 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](https://developer-docs.amazon.com/sp-api/docs/product-type-api-use-case-guide).\n *\n * The version of the OpenAPI document: 2020-09-01\n * \n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\nimport type { Configuration } from '../configuration.js';\nimport type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';\nimport globalAxios from 'axios';\n// Some imports not used depending on template conditions\n// @ts-ignore\nimport { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from '../common.js';\n// @ts-ignore\nimport { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base.js';\n// @ts-ignore\nimport type { ErrorList } from '../models/index.js';\n// @ts-ignore\nimport type { ProductTypeDefinition } from '../models/index.js';\n// @ts-ignore\nimport type { ProductTypeList } from '../models/index.js';\n/**\n * ProductTypeDefinitionsApi - axios parameter creator\n */\nexport const ProductTypeDefinitionsApiAxiosParamCreator = function (configuration?: Configuration) {\n return {\n /**\n * 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).\n * @param {string} productType The Amazon product type name.\n * @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.\n * @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.\n * @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.\n * @param {GetDefinitionsProductTypeRequirementsEnum} [requirements] The name of the requirements set to retrieve requirements for.\n * @param {GetDefinitionsProductTypeRequirementsEnforcedEnum} [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).\n * @param {GetDefinitionsProductTypeLocaleEnum} [locale] Locale for retrieving display labels and other presentation details. Defaults to the default language of the first marketplace in the request.\n * @param {*} [options] Override http request option.\n * @throws {RequiredError}\n */\n getDefinitionsProductType: async (productType: string, marketplaceIds: Array<string>, sellerId?: string, productTypeVersion?: string, requirements?: GetDefinitionsProductTypeRequirementsEnum, requirementsEnforced?: GetDefinitionsProductTypeRequirementsEnforcedEnum, locale?: GetDefinitionsProductTypeLocaleEnum, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {\n // verify required parameter 'productType' is not null or undefined\n assertParamExists('getDefinitionsProductType', 'productType', productType)\n // verify required parameter 'marketplaceIds' is not null or undefined\n assertParamExists('getDefinitionsProductType', 'marketplaceIds', marketplaceIds)\n const localVarPath = `/definitions/2020-09-01/productTypes/{productType}`\n .replace('{productType}', encodeURIComponent(String(productType)));\n // use dummy base URL string because the URL constructor only accepts absolute URLs.\n const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);\n let baseOptions;\n if (configuration) {\n baseOptions = configuration.baseOptions;\n }\n\n const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};\n const localVarHeaderParameter = {} as any;\n const localVarQueryParameter = {} as any;\n\n if (sellerId !== undefined) {\n localVarQueryParameter['sellerId'] = sellerId;\n }\n\n if (marketplaceIds) {\n localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(COLLECTION_FORMATS.csv);\n }\n\n if (productTypeVersion !== undefined) {\n localVarQueryParameter['productTypeVersion'] = productTypeVersion;\n }\n\n if (requirements !== undefined) {\n localVarQueryParameter['requirements'] = requirements;\n }\n\n if (requirementsEnforced !== undefined) {\n localVarQueryParameter['requirementsEnforced'] = requirementsEnforced;\n }\n\n if (locale !== undefined) {\n localVarQueryParameter['locale'] = locale;\n }\n\n localVarHeaderParameter['Accept'] = 'application/json';\n\n setSearchParams(localVarUrlObj, localVarQueryParameter);\n let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};\n localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};\n\n return {\n url: toPathString(localVarUrlObj),\n options: localVarRequestOptions,\n };\n },\n /**\n * 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).\n * @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers for the request.\n * @param {Array<string>} [keywords] A comma-delimited list of keywords to search product types. **Note:** Cannot be used with &#x60;itemName&#x60;.\n * @param {string} [itemName] The title of the ASIN to get the product type recommendation. **Note:** Cannot be used with &#x60;keywords&#x60;.\n * @param {string} [locale] The locale for the display names in the response. Defaults to the primary locale of the marketplace.\n * @param {string} [searchLocale] The locale used for the &#x60;keywords&#x60; and &#x60;itemName&#x60; parameters. Defaults to the primary locale of the marketplace.\n * @param {*} [options] Override http request option.\n * @throws {RequiredError}\n */\n searchDefinitionsProductTypes: async (marketplaceIds: Array<string>, keywords?: Array<string>, itemName?: string, locale?: string, searchLocale?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {\n // verify required parameter 'marketplaceIds' is not null or undefined\n assertParamExists('searchDefinitionsProductTypes', 'marketplaceIds', marketplaceIds)\n const localVarPath = `/definitions/2020-09-01/productTypes`;\n // use dummy base URL string because the URL constructor only accepts absolute URLs.\n const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);\n let baseOptions;\n if (configuration) {\n baseOptions = configuration.baseOptions;\n }\n\n const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};\n const localVarHeaderParameter = {} as any;\n const localVarQueryParameter = {} as any;\n\n if (keywords) {\n localVarQueryParameter['keywords'] = keywords.join(COLLECTION_FORMATS.csv);\n }\n\n if (marketplaceIds) {\n localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(COLLECTION_FORMATS.csv);\n }\n\n if (itemName !== undefined) {\n localVarQueryParameter['itemName'] = itemName;\n }\n\n if (locale !== undefined) {\n localVarQueryParameter['locale'] = locale;\n }\n\n if (searchLocale !== undefined) {\n localVarQueryParameter['searchLocale'] = searchLocale;\n }\n\n localVarHeaderParameter['Accept'] = 'application/json';\n\n setSearchParams(localVarUrlObj, localVarQueryParameter);\n let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};\n localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};\n\n return {\n url: toPathString(localVarUrlObj),\n options: localVarRequestOptions,\n };\n },\n }\n};\n\n/**\n * ProductTypeDefinitionsApi - functional programming interface\n */\nexport const ProductTypeDefinitionsApiFp = function(configuration?: Configuration) {\n const localVarAxiosParamCreator = ProductTypeDefinitionsApiAxiosParamCreator(configuration)\n return {\n /**\n * 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).\n * @param {string} productType The Amazon product type name.\n * @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.\n * @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.\n * @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.\n * @param {GetDefinitionsProductTypeRequirementsEnum} [requirements] The name of the requirements set to retrieve requirements for.\n * @param {GetDefinitionsProductTypeRequirementsEnforcedEnum} [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).\n * @param {GetDefinitionsProductTypeLocaleEnum} [locale] Locale for retrieving display labels and other presentation details. Defaults to the default language of the first marketplace in the request.\n * @param {*} [options] Override http request option.\n * @throws {RequiredError}\n */\n async getDefinitionsProductType(productType: string, marketplaceIds: Array<string>, sellerId?: string, productTypeVersion?: string, requirements?: GetDefinitionsProductTypeRequirementsEnum, requirementsEnforced?: GetDefinitionsProductTypeRequirementsEnforcedEnum, locale?: GetDefinitionsProductTypeLocaleEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ProductTypeDefinition>> {\n const localVarAxiosArgs = await localVarAxiosParamCreator.getDefinitionsProductType(productType, marketplaceIds, sellerId, productTypeVersion, requirements, requirementsEnforced, locale, options);\n const localVarOperationServerIndex = configuration?.serverIndex ?? 0;\n const localVarOperationServerBasePath = operationServerMap['ProductTypeDefinitionsApi.getDefinitionsProductType']?.[localVarOperationServerIndex]?.url;\n return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);\n },\n /**\n * 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).\n * @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers for the request.\n * @param {Array<string>} [keywords] A comma-delimited list of keywords to search product types. **Note:** Cannot be used with &#x60;itemName&#x60;.\n * @param {string} [itemName] The title of the ASIN to get the product type recommendation. **Note:** Cannot be used with &#x60;keywords&#x60;.\n * @param {string} [locale] The locale for the display names in the response. Defaults to the primary locale of the marketplace.\n * @param {string} [searchLocale] The locale used for the &#x60;keywords&#x60; and &#x60;itemName&#x60; parameters. Defaults to the primary locale of the marketplace.\n * @param {*} [options] Override http request option.\n * @throws {RequiredError}\n */\n async searchDefinitionsProductTypes(marketplaceIds: Array<string>, keywords?: Array<string>, itemName?: string, locale?: string, searchLocale?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ProductTypeList>> {\n const localVarAxiosArgs = await localVarAxiosParamCreator.searchDefinitionsProductTypes(marketplaceIds, keywords, itemName, locale, searchLocale, options);\n const localVarOperationServerIndex = configuration?.serverIndex ?? 0;\n const localVarOperationServerBasePath = operationServerMap['ProductTypeDefinitionsApi.searchDefinitionsProductTypes']?.[localVarOperationServerIndex]?.url;\n return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);\n },\n }\n};\n\n/**\n * ProductTypeDefinitionsApi - factory interface\n */\nexport const ProductTypeDefinitionsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {\n const localVarFp = ProductTypeDefinitionsApiFp(configuration)\n return {\n /**\n * 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).\n * @param {ProductTypeDefinitionsApiGetDefinitionsProductTypeRequest} requestParameters Request parameters.\n * @param {*} [options] Override http request option.\n * @throws {RequiredError}\n */\n getDefinitionsProductType(requestParameters: ProductTypeDefinitionsApiGetDefinitionsProductTypeRequest, options?: RawAxiosRequestConfig): AxiosPromise<ProductTypeDefinition> {\n return localVarFp.getDefinitionsProductType(requestParameters.productType, requestParameters.marketplaceIds, requestParameters.sellerId, requestParameters.productTypeVersion, requestParameters.requirements, requestParameters.requirementsEnforced, requestParameters.locale, options).then((request) => request(axios, basePath));\n },\n /**\n * 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).\n * @param {ProductTypeDefinitionsApiSearchDefinitionsProductTypesRequest} requestParameters Request parameters.\n * @param {*} [options] Override http request option.\n * @throws {RequiredError}\n */\n searchDefinitionsProductTypes(requestParameters: ProductTypeDefinitionsApiSearchDefinitionsProductTypesRequest, options?: RawAxiosRequestConfig): AxiosPromise<ProductTypeList> {\n return localVarFp.searchDefinitionsProductTypes(requestParameters.marketplaceIds, requestParameters.keywords, requestParameters.itemName, requestParameters.locale, requestParameters.searchLocale, options).then((request) => request(axios, basePath));\n },\n };\n};\n\n/**\n * Request parameters for getDefinitionsProductType operation in ProductTypeDefinitionsApi.\n */\nexport interface ProductTypeDefinitionsApiGetDefinitionsProductTypeRequest {\n /**\n * The Amazon product type name.\n */\n readonly productType: string\n\n /**\n * A comma-delimited list of Amazon marketplace identifiers for the request. Note: This parameter is limited to one marketplaceId at this time.\n */\n readonly marketplaceIds: Array<string>\n\n /**\n * 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.\n */\n readonly sellerId?: string\n\n /**\n * 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.\n */\n readonly productTypeVersion?: string\n\n /**\n * The name of the requirements set to retrieve requirements for.\n */\n readonly requirements?: GetDefinitionsProductTypeRequirementsEnum\n\n /**\n * 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).\n */\n readonly requirementsEnforced?: GetDefinitionsProductTypeRequirementsEnforcedEnum\n\n /**\n * Locale for retrieving display labels and other presentation details. Defaults to the default language of the first marketplace in the request.\n */\n readonly locale?: GetDefinitionsProductTypeLocaleEnum\n}\n\n/**\n * Request parameters for searchDefinitionsProductTypes operation in ProductTypeDefinitionsApi.\n */\nexport interface ProductTypeDefinitionsApiSearchDefinitionsProductTypesRequest {\n /**\n * A comma-delimited list of Amazon marketplace identifiers for the request.\n */\n readonly marketplaceIds: Array<string>\n\n /**\n * A comma-delimited list of keywords to search product types. **Note:** Cannot be used with &#x60;itemName&#x60;.\n */\n readonly keywords?: Array<string>\n\n /**\n * The title of the ASIN to get the product type recommendation. **Note:** Cannot be used with &#x60;keywords&#x60;.\n */\n readonly itemName?: string\n\n /**\n * The locale for the display names in the response. Defaults to the primary locale of the marketplace.\n */\n readonly locale?: string\n\n /**\n * The locale used for the &#x60;keywords&#x60; and &#x60;itemName&#x60; parameters. Defaults to the primary locale of the marketplace.\n */\n readonly searchLocale?: string\n}\n\n/**\n * ProductTypeDefinitionsApi - object-oriented interface\n */\nexport class ProductTypeDefinitionsApi extends BaseAPI {\n /**\n * 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).\n * @param {ProductTypeDefinitionsApiGetDefinitionsProductTypeRequest} requestParameters Request parameters.\n * @param {*} [options] Override http request option.\n * @throws {RequiredError}\n */\n public getDefinitionsProductType(requestParameters: ProductTypeDefinitionsApiGetDefinitionsProductTypeRequest, options?: RawAxiosRequestConfig) {\n 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));\n }\n\n /**\n * 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).\n * @param {ProductTypeDefinitionsApiSearchDefinitionsProductTypesRequest} requestParameters Request parameters.\n * @param {*} [options] Override http request option.\n * @throws {RequiredError}\n */\n public searchDefinitionsProductTypes(requestParameters: ProductTypeDefinitionsApiSearchDefinitionsProductTypesRequest, options?: RawAxiosRequestConfig) {\n return ProductTypeDefinitionsApiFp(this.configuration).searchDefinitionsProductTypes(requestParameters.marketplaceIds, requestParameters.keywords, requestParameters.itemName, requestParameters.locale, requestParameters.searchLocale, options).then((request) => request(this.axios, this.basePath));\n }\n}\n\nexport const GetDefinitionsProductTypeRequirementsEnum = {\n Listing: 'LISTING',\n ListingProductOnly: 'LISTING_PRODUCT_ONLY',\n ListingOfferOnly: 'LISTING_OFFER_ONLY',\n} as const;\nexport type GetDefinitionsProductTypeRequirementsEnum = typeof GetDefinitionsProductTypeRequirementsEnum[keyof typeof GetDefinitionsProductTypeRequirementsEnum];\nexport const GetDefinitionsProductTypeRequirementsEnforcedEnum = {\n Enforced: 'ENFORCED',\n NotEnforced: 'NOT_ENFORCED',\n} as const;\nexport type GetDefinitionsProductTypeRequirementsEnforcedEnum = typeof GetDefinitionsProductTypeRequirementsEnforcedEnum[keyof typeof GetDefinitionsProductTypeRequirementsEnforcedEnum];\nexport const GetDefinitionsProductTypeLocaleEnum = {\n Default: 'DEFAULT',\n Ar: 'ar',\n ArAe: 'ar_AE',\n De: 'de',\n DeDe: 'de_DE',\n En: 'en',\n EnAe: 'en_AE',\n EnAu: 'en_AU',\n EnCa: 'en_CA',\n EnGb: 'en_GB',\n EnIn: 'en_IN',\n EnSg: 'en_SG',\n EnUs: 'en_US',\n Es: 'es',\n EsEs: 'es_ES',\n EsMx: 'es_MX',\n EsUs: 'es_US',\n Fr: 'fr',\n FrCa: 'fr_CA',\n FrFr: 'fr_FR',\n It: 'it',\n ItIt: 'it_IT',\n Ja: 'ja',\n JaJp: 'ja_JP',\n Nl: 'nl',\n NlNl: 'nl_NL',\n Pl: 'pl',\n PlPl: 'pl_PL',\n Pt: 'pt',\n PtBr: 'pt_BR',\n PtPt: 'pt_PT',\n Sv: 'sv',\n SvSe: 'sv_SE',\n Tr: 'tr',\n TrTr: 'tr_TR',\n Zh: 'zh',\n ZhCn: 'zh_CN',\n ZhTw: 'zh_TW',\n} as const;\nexport type GetDefinitionsProductTypeLocaleEnum = typeof GetDefinitionsProductTypeLocaleEnum[keyof typeof GetDefinitionsProductTypeLocaleEnum];\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * Selling Partner API for Product Type Definitions\n * 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](https://developer-docs.amazon.com/sp-api/docs/product-type-api-use-case-guide).\n *\n * The version of the OpenAPI document: 2020-09-01\n * \n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\nimport type { Configuration } from './configuration.js';\n// Some imports not used depending on template conditions\n// @ts-ignore\nimport type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';\nimport globalAxios from 'axios';\n\nexport const BASE_PATH = \"https://sellingpartnerapi-na.amazon.com\".replace(/\\/+$/, \"\");\n\nexport const COLLECTION_FORMATS = {\n csv: \",\",\n ssv: \" \",\n tsv: \"\\t\",\n pipes: \"|\",\n};\n\nexport interface RequestArgs {\n url: string;\n options: RawAxiosRequestConfig;\n}\n\nexport class BaseAPI {\n protected configuration: Configuration | undefined;\n\n constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {\n if (configuration) {\n this.configuration = configuration;\n this.basePath = configuration.basePath ?? basePath;\n }\n }\n};\n\nexport class RequiredError extends Error {\n constructor(public field: string, msg?: string) {\n super(msg);\n this.name = \"RequiredError\"\n }\n}\n\ninterface ServerMap {\n [key: string]: {\n url: string,\n description: string,\n }[];\n}\n\nexport const operationServerMap: ServerMap = {\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * Selling Partner API for Product Type Definitions\n * 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](https://developer-docs.amazon.com/sp-api/docs/product-type-api-use-case-guide).\n *\n * The version of the OpenAPI document: 2020-09-01\n * \n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport type { Configuration } from \"./configuration.js\";\nimport type { RequestArgs } from \"./base.js\";\nimport type { AxiosInstance, AxiosResponse } from 'axios';\nimport { RequiredError } from \"./base.js\";\n\nexport const DUMMY_BASE_URL = 'https://example.com'\n\n/**\n *\n * @throws {RequiredError}\n */\nexport const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) {\n if (paramValue === null || paramValue === undefined) {\n throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);\n }\n}\n\nexport const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) {\n if (configuration && configuration.apiKey) {\n const localVarApiKeyValue = typeof configuration.apiKey === 'function'\n ? await configuration.apiKey(keyParamName)\n : await configuration.apiKey;\n object[keyParamName] = localVarApiKeyValue;\n }\n}\n\nexport const setBasicAuthToObject = function (object: any, configuration?: Configuration) {\n if (configuration && (configuration.username || configuration.password)) {\n object[\"auth\"] = { username: configuration.username, password: configuration.password };\n }\n}\n\nexport const setBearerAuthToObject = async function (object: any, configuration?: Configuration) {\n if (configuration && configuration.accessToken) {\n const accessToken = typeof configuration.accessToken === 'function'\n ? await configuration.accessToken()\n : await configuration.accessToken;\n object[\"Authorization\"] = \"Bearer \" + accessToken;\n }\n}\n\nexport const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) {\n if (configuration && configuration.accessToken) {\n const localVarAccessTokenValue = typeof configuration.accessToken === 'function'\n ? await configuration.accessToken(name, scopes)\n : await configuration.accessToken;\n object[\"Authorization\"] = \"Bearer \" + localVarAccessTokenValue;\n }\n}\n\n\nfunction setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = \"\"): void {\n if (parameter == null) return;\n if (typeof parameter === \"object\") {\n if (Array.isArray(parameter) || parameter instanceof Set) {\n (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));\n }\n else {\n Object.keys(parameter).forEach(currentKey =>\n setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`)\n );\n }\n }\n else {\n if (urlSearchParams.has(key)) {\n urlSearchParams.append(key, parameter);\n }\n else {\n urlSearchParams.set(key, parameter);\n }\n }\n}\n\nexport const setSearchParams = function (url: URL, ...objects: any[]) {\n const searchParams = new URLSearchParams(url.search);\n setFlattenedQueryParams(searchParams, objects);\n url.search = searchParams.toString();\n}\n\n/**\n * JSON serialization helper function which replaces instances of unserializable types with serializable ones.\n * This function will run for every key-value pair encountered by JSON.stringify while traversing an object.\n * Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.\n */\n// @ts-ignore\nexport const replaceWithSerializableTypeIfNeeded = function(key: string, value: any) {\n if (value instanceof Set) {\n return Array.from(value);\n } else {\n return value;\n }\n}\n\nexport const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) {\n const nonString = typeof value !== 'string';\n const needsSerialization = nonString && configuration && configuration.isJsonMime\n ? configuration.isJsonMime(requestOptions.headers['Content-Type'])\n : nonString;\n return needsSerialization\n ? JSON.stringify(value !== undefined ? value : {}, replaceWithSerializableTypeIfNeeded)\n : (value || \"\");\n}\n\nexport const toPathString = function (url: URL) {\n return url.pathname + url.search + url.hash\n}\n\nexport const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) {\n return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {\n const axiosRequestArgs = {...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url};\n return axios.request<T, R>(axiosRequestArgs);\n };\n}\n","/* tslint:disable */\n/**\n * Selling Partner API for Product Type Definitions\n * 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](https://developer-docs.amazon.com/sp-api/docs/product-type-api-use-case-guide).\n *\n * The version of the OpenAPI document: 2020-09-01\n * \n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\ninterface AWSv4Configuration {\n options?: {\n region?: string\n service?: string\n }\n credentials?: {\n accessKeyId?: string\n secretAccessKey?: string,\n sessionToken?: string\n }\n}\n\nexport interface ConfigurationParameters {\n apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);\n username?: string;\n password?: string;\n accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);\n awsv4?: AWSv4Configuration;\n basePath?: string;\n serverIndex?: number;\n baseOptions?: any;\n formDataCtor?: new () => any;\n}\n\nexport class Configuration {\n /**\n * parameter for apiKey security\n * @param name security name\n */\n apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);\n /**\n * parameter for basic security\n */\n username?: string;\n /**\n * parameter for basic security\n */\n password?: string;\n /**\n * parameter for oauth2 security\n * @param name security name\n * @param scopes oauth2 scope\n */\n accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);\n /**\n * parameter for aws4 signature security\n * @param {Object} AWS4Signature - AWS4 Signature security\n * @param {string} options.region - aws region\n * @param {string} options.service - name of the service.\n * @param {string} credentials.accessKeyId - aws access key id\n * @param {string} credentials.secretAccessKey - aws access key\n * @param {string} credentials.sessionToken - aws session token\n * @memberof Configuration\n */\n awsv4?: AWSv4Configuration;\n /**\n * override base path\n */\n basePath?: string;\n /**\n * override server index\n */\n serverIndex?: number;\n /**\n * base options for axios calls\n */\n baseOptions?: any;\n /**\n * The FormData constructor that will be used to create multipart form data\n * requests. You can inject this here so that execution environments that\n * do not support the FormData class can still run the generated client.\n *\n * @type {new () => FormData}\n */\n formDataCtor?: new () => any;\n\n constructor(param: ConfigurationParameters = {}) {\n this.apiKey = param.apiKey;\n this.username = param.username;\n this.password = param.password;\n this.accessToken = param.accessToken;\n this.awsv4 = param.awsv4;\n this.basePath = param.basePath;\n this.serverIndex = param.serverIndex;\n this.baseOptions = {\n ...param.baseOptions,\n headers: {\n ...param.baseOptions?.headers,\n },\n };\n this.formDataCtor = param.formDataCtor;\n }\n\n /**\n * Check if the given MIME is a JSON MIME.\n * JSON MIME examples:\n * application/json\n * application/json; charset=UTF8\n * APPLICATION/JSON\n * application/vnd.company+json\n * @param mime - MIME (Multipurpose Internet Mail Extensions)\n * @return True if the given MIME is JSON, false otherwise.\n */\n public isJsonMime(mime: string): boolean {\n const jsonMime: RegExp = /^(application\\/json|[^;/ \\t]+\\/[^;/ \\t]+[+]json)[ \\t]*(;.*)?$/i;\n return mime !== null && jsonMime.test(mime);\n }\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * Selling Partner API for Product Type Definitions\n * 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](https://developer-docs.amazon.com/sp-api/docs/product-type-api-use-case-guide).\n *\n * The version of the OpenAPI document: 2020-09-01\n * \n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\n// May contain unused imports in some cases\n// @ts-ignore\nimport type { ProductTypeVersion } from './product-type-version.js';\n// May contain unused imports in some cases\n// @ts-ignore\nimport type { PropertyGroup } from './property-group.js';\n// May contain unused imports in some cases\n// @ts-ignore\nimport type { SchemaLink } from './schema-link.js';\n\n/**\n * A product type definition represents the attributes and data requirements for a product type in the Amazon catalog. Product type definitions are used interchangeably between the Selling Partner API for Listings Items, Selling Partner API for Catalog Items, and JSON-based listings feeds in the Selling Partner API for Feeds.\n */\nexport interface ProductTypeDefinition {\n 'metaSchema'?: SchemaLink;\n 'schema': SchemaLink;\n /**\n * Name of the requirements set represented in this product type definition.\n */\n 'requirements': ProductTypeDefinitionRequirementsEnum;\n /**\n * 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 of the required attributes being present (such as for partial updates).\n */\n 'requirementsEnforced': ProductTypeDefinitionRequirementsEnforcedEnum;\n /**\n * Mapping of property group names to property groups. Property groups represent logical groupings of schema properties that can be used for display or informational purposes.\n */\n 'propertyGroups': { [key: string]: PropertyGroup; };\n /**\n * Locale of the display elements contained in the product type definition.\n */\n 'locale': string;\n /**\n * Amazon marketplace identifiers for which the product type definition is applicable.\n */\n 'marketplaceIds': Array<string>;\n /**\n * The name of the Amazon product type that this product type definition applies to.\n */\n 'productType': string;\n /**\n * Human-readable and localized description of the Amazon product type.\n */\n 'displayName': string;\n 'productTypeVersion': ProductTypeVersion;\n}\n\nexport const ProductTypeDefinitionRequirementsEnum = {\n Listing: 'LISTING',\n ListingProductOnly: 'LISTING_PRODUCT_ONLY',\n ListingOfferOnly: 'LISTING_OFFER_ONLY',\n} as const;\n\nexport type ProductTypeDefinitionRequirementsEnum = typeof ProductTypeDefinitionRequirementsEnum[keyof typeof ProductTypeDefinitionRequirementsEnum];\nexport const ProductTypeDefinitionRequirementsEnforcedEnum = {\n Enforced: 'ENFORCED',\n NotEnforced: 'NOT_ENFORCED',\n} as const;\n\nexport type ProductTypeDefinitionRequirementsEnforcedEnum = typeof ProductTypeDefinitionRequirementsEnforcedEnum[keyof typeof ProductTypeDefinitionRequirementsEnforcedEnum];\n\n\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * Selling Partner API for Product Type Definitions\n * 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](https://developer-docs.amazon.com/sp-api/docs/product-type-api-use-case-guide).\n *\n * The version of the OpenAPI document: 2020-09-01\n * \n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\n\n/**\n * Link to retrieve the schema.\n */\nexport interface SchemaLinkLink {\n /**\n * URI resource for the link.\n */\n 'resource': string;\n /**\n * HTTP method for the link operation.\n */\n 'verb': SchemaLinkLinkVerbEnum;\n}\n\nexport const SchemaLinkLinkVerbEnum = {\n Get: 'GET',\n} as const;\n\nexport type SchemaLinkLinkVerbEnum = typeof SchemaLinkLinkVerbEnum[keyof typeof SchemaLinkLinkVerbEnum];\n\n\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,iBAA4E;;;ACiB5E,IAAAC,gBAAwB;;;ACExB,mBAAwB;AAEjB,IAAM,YAAY,0CAA0C,QAAQ,QAAQ,EAAE;AAE9E,IAAM,qBAAqB;AAAA,EAC9B,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,OAAO;AACX;AAOO,IAAM,UAAN,MAAc;AAAA,EAGjB,YAAY,eAAyC,WAAmB,WAAqB,QAAuB,aAAAC,SAAa;AAA5E;AAAwC;AACzF,QAAI,eAAe;AACf,WAAK,gBAAgB;AACrB,WAAK,WAAW,cAAc,YAAY;AAAA,IAC9C;A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