@sp-api-sdk/catalog-items-api-2022-04-01 5.0.0 → 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,481 +1,443 @@
1
- // src/client.ts
2
1
  import { createAxiosInstance } from "@sp-api-sdk/common";
3
-
4
- // src/api-model/api/catalog-items-api.ts
5
- import globalAxios2 from "axios";
6
-
7
- // src/api-model/base.ts
8
2
  import globalAxios from "axios";
9
- var BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
10
- var COLLECTION_FORMATS = {
11
- csv: ",",
12
- ssv: " ",
13
- tsv: " ",
14
- pipes: "|"
3
+ //#region src/api-model/base.ts
4
+ const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
5
+ const COLLECTION_FORMATS = {
6
+ csv: ",",
7
+ ssv: " ",
8
+ tsv: " ",
9
+ pipes: "|"
15
10
  };
16
11
  var BaseAPI = class {
17
- constructor(configuration, basePath = BASE_PATH, axios = globalAxios) {
18
- this.basePath = basePath;
19
- this.axios = axios;
20
- if (configuration) {
21
- this.configuration = configuration;
22
- this.basePath = configuration.basePath ?? basePath;
23
- }
24
- }
25
- basePath;
26
- axios;
27
- configuration;
12
+ basePath;
13
+ axios;
14
+ configuration;
15
+ constructor(configuration, basePath = BASE_PATH, axios = globalAxios) {
16
+ this.basePath = basePath;
17
+ this.axios = axios;
18
+ if (configuration) {
19
+ this.configuration = configuration;
20
+ this.basePath = configuration.basePath ?? basePath;
21
+ }
22
+ }
28
23
  };
29
24
  var RequiredError = class extends Error {
30
- constructor(field, msg) {
31
- super(msg);
32
- this.field = field;
33
- this.name = "RequiredError";
34
- }
35
- field;
25
+ field;
26
+ constructor(field, msg) {
27
+ super(msg);
28
+ this.field = field;
29
+ this.name = "RequiredError";
30
+ }
36
31
  };
37
- var operationServerMap = {};
38
-
39
- // src/api-model/common.ts
40
- var DUMMY_BASE_URL = "https://example.com";
41
- var assertParamExists = function(functionName, paramName, paramValue) {
42
- if (paramValue === null || paramValue === void 0) {
43
- throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
44
- }
32
+ const operationServerMap = {};
33
+ //#endregion
34
+ //#region src/api-model/common.ts
35
+ const DUMMY_BASE_URL = "https://example.com";
36
+ /**
37
+ *
38
+ * @throws {RequiredError}
39
+ */
40
+ const assertParamExists = function(functionName, paramName, paramValue) {
41
+ if (paramValue === null || paramValue === void 0) throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
45
42
  };
46
43
  function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
47
- if (parameter == null) return;
48
- if (typeof parameter === "object") {
49
- if (Array.isArray(parameter) || parameter instanceof Set) {
50
- parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
51
- } else {
52
- Object.keys(parameter).forEach(
53
- (currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`)
54
- );
55
- }
56
- } else {
57
- if (urlSearchParams.has(key)) {
58
- urlSearchParams.append(key, parameter);
59
- } else {
60
- urlSearchParams.set(key, parameter);
61
- }
62
- }
44
+ if (parameter == null) return;
45
+ if (typeof parameter === "object") if (Array.isArray(parameter) || parameter instanceof Set) parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
46
+ else Object.keys(parameter).forEach((currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`));
47
+ else if (urlSearchParams.has(key)) urlSearchParams.append(key, parameter);
48
+ else urlSearchParams.set(key, parameter);
63
49
  }
64
- var setSearchParams = function(url, ...objects) {
65
- const searchParams = new URLSearchParams(url.search);
66
- setFlattenedQueryParams(searchParams, objects);
67
- url.search = searchParams.toString();
50
+ const setSearchParams = function(url, ...objects) {
51
+ const searchParams = new URLSearchParams(url.search);
52
+ setFlattenedQueryParams(searchParams, objects);
53
+ url.search = searchParams.toString();
68
54
  };
69
- var toPathString = function(url) {
70
- return url.pathname + url.search + url.hash;
55
+ const toPathString = function(url) {
56
+ return url.pathname + url.search + url.hash;
71
57
  };
72
- var createRequestFunction = function(axiosArgs, globalAxios3, BASE_PATH2, configuration) {
73
- return (axios = globalAxios3, basePath = BASE_PATH2) => {
74
- const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? "" : configuration?.basePath ?? basePath) + axiosArgs.url };
75
- return axios.request(axiosRequestArgs);
76
- };
58
+ const createRequestFunction = function(axiosArgs, globalAxios, BASE_PATH, configuration) {
59
+ return (axios = globalAxios, basePath = BASE_PATH) => {
60
+ const axiosRequestArgs = {
61
+ ...axiosArgs.options,
62
+ url: (axios.defaults.baseURL ? "" : configuration?.basePath ?? basePath) + axiosArgs.url
63
+ };
64
+ return axios.request(axiosRequestArgs);
65
+ };
77
66
  };
78
-
79
- // src/api-model/api/catalog-items-api.ts
80
- var CatalogItemsApiAxiosParamCreator = function(configuration) {
81
- return {
82
- /**
83
- * Retrieves details for an item in the Amazon catalog. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
84
- * @param {string} asin The Amazon Standard Identification Number (ASIN) of the item.
85
- * @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
86
- * @param {Array<GetCatalogItemIncludedDataEnum>} [includedData] A comma-delimited list of datasets to include in the response.
87
- * @param {string} [locale] The locale for which you want to retrieve localized summaries. Defaults to the primary locale of the marketplace.
88
- * @param {*} [options] Override http request option.
89
- * @throws {RequiredError}
90
- */
91
- getCatalogItem: async (asin, marketplaceIds, includedData, locale, options = {}) => {
92
- assertParamExists("getCatalogItem", "asin", asin);
93
- assertParamExists("getCatalogItem", "marketplaceIds", marketplaceIds);
94
- const localVarPath = `/catalog/2022-04-01/items/{asin}`.replace("{asin}", encodeURIComponent(String(asin)));
95
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
96
- let baseOptions;
97
- if (configuration) {
98
- baseOptions = configuration.baseOptions;
99
- }
100
- const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
101
- const localVarHeaderParameter = {};
102
- const localVarQueryParameter = {};
103
- if (marketplaceIds) {
104
- localVarQueryParameter["marketplaceIds"] = marketplaceIds.join(COLLECTION_FORMATS.csv);
105
- }
106
- if (includedData) {
107
- localVarQueryParameter["includedData"] = includedData.join(COLLECTION_FORMATS.csv);
108
- }
109
- if (locale !== void 0) {
110
- localVarQueryParameter["locale"] = locale;
111
- }
112
- localVarHeaderParameter["Accept"] = "application/json";
113
- setSearchParams(localVarUrlObj, localVarQueryParameter);
114
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
115
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
116
- return {
117
- url: toPathString(localVarUrlObj),
118
- options: localVarRequestOptions
119
- };
120
- },
121
- /**
122
- * Search for a list of Amazon catalog items and item-related information. You can search by identifier or by keywords. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
123
- * @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
124
- * @param {Array<string>} [identifiers] A comma-delimited list of product identifiers that you can use to search the Amazon catalog. **Note:** You cannot include &#x60;identifiers&#x60; and &#x60;keywords&#x60; in the same request.
125
- * @param {SearchCatalogItemsIdentifiersTypeEnum} [identifiersType] The type of product identifiers that you can use to search the Amazon catalog. **Note:** &#x60;identifiersType&#x60; is required when &#x60;identifiers&#x60; is in the request.
126
- * @param {Array<SearchCatalogItemsIncludedDataEnum>} [includedData] A comma-delimited list of datasets to include in the response.
127
- * @param {string} [locale] The locale for which you want to retrieve localized summaries. Defaults to the primary locale of the marketplace.
128
- * @param {string} [sellerId] A selling partner identifier, such as a seller account or vendor code. **Note:** Required when &#x60;identifiersType&#x60; is &#x60;SKU&#x60;.
129
- * @param {Array<string>} [keywords] A comma-delimited list of keywords that you can use to search the Amazon catalog. **Note:** You cannot include &#x60;keywords&#x60; and &#x60;identifiers&#x60; in the same request.
130
- * @param {Array<string>} [brandNames] A comma-delimited list of brand names that you can use to limit the search in queries based on &#x60;keywords&#x60;. **Note:** Cannot be used with &#x60;identifiers&#x60;.
131
- * @param {Array<string>} [classificationIds] A comma-delimited list of classification identifiers that you can use to limit the search in queries based on &#x60;keywords&#x60;. **Note:** Cannot be used with &#x60;identifiers&#x60;.
132
- * @param {number} [pageSize] The number of results to include on each page.
133
- * @param {string} [pageToken] A token that you can use to fetch a specific page when there are multiple pages of results.
134
- * @param {string} [keywordsLocale] The language of the keywords that are included in queries based on &#x60;keywords&#x60;. Defaults to the primary locale of the marketplace. **Note:** Cannot be used with &#x60;identifiers&#x60;.
135
- * @param {*} [options] Override http request option.
136
- * @throws {RequiredError}
137
- */
138
- searchCatalogItems: async (marketplaceIds, identifiers, identifiersType, includedData, locale, sellerId, keywords, brandNames, classificationIds, pageSize, pageToken, keywordsLocale, options = {}) => {
139
- assertParamExists("searchCatalogItems", "marketplaceIds", marketplaceIds);
140
- const localVarPath = `/catalog/2022-04-01/items`;
141
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
142
- let baseOptions;
143
- if (configuration) {
144
- baseOptions = configuration.baseOptions;
145
- }
146
- const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
147
- const localVarHeaderParameter = {};
148
- const localVarQueryParameter = {};
149
- if (identifiers) {
150
- localVarQueryParameter["identifiers"] = identifiers.join(COLLECTION_FORMATS.csv);
151
- }
152
- if (identifiersType !== void 0) {
153
- localVarQueryParameter["identifiersType"] = identifiersType;
154
- }
155
- if (marketplaceIds) {
156
- localVarQueryParameter["marketplaceIds"] = marketplaceIds.join(COLLECTION_FORMATS.csv);
157
- }
158
- if (includedData) {
159
- localVarQueryParameter["includedData"] = includedData.join(COLLECTION_FORMATS.csv);
160
- }
161
- if (locale !== void 0) {
162
- localVarQueryParameter["locale"] = locale;
163
- }
164
- if (sellerId !== void 0) {
165
- localVarQueryParameter["sellerId"] = sellerId;
166
- }
167
- if (keywords) {
168
- localVarQueryParameter["keywords"] = keywords.join(COLLECTION_FORMATS.csv);
169
- }
170
- if (brandNames) {
171
- localVarQueryParameter["brandNames"] = brandNames.join(COLLECTION_FORMATS.csv);
172
- }
173
- if (classificationIds) {
174
- localVarQueryParameter["classificationIds"] = classificationIds.join(COLLECTION_FORMATS.csv);
175
- }
176
- if (pageSize !== void 0) {
177
- localVarQueryParameter["pageSize"] = pageSize;
178
- }
179
- if (pageToken !== void 0) {
180
- localVarQueryParameter["pageToken"] = pageToken;
181
- }
182
- if (keywordsLocale !== void 0) {
183
- localVarQueryParameter["keywordsLocale"] = keywordsLocale;
184
- }
185
- localVarHeaderParameter["Accept"] = "application/json";
186
- setSearchParams(localVarUrlObj, localVarQueryParameter);
187
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
188
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
189
- return {
190
- url: toPathString(localVarUrlObj),
191
- options: localVarRequestOptions
192
- };
193
- }
194
- };
67
+ //#endregion
68
+ //#region src/api-model/api/catalog-items-api.ts
69
+ /**
70
+ * CatalogItemsApi - axios parameter creator
71
+ */
72
+ const CatalogItemsApiAxiosParamCreator = function(configuration) {
73
+ return {
74
+ /**
75
+ * Retrieves details for an item in the Amazon catalog. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
76
+ * @param {string} asin The Amazon Standard Identification Number (ASIN) of the item.
77
+ * @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
78
+ * @param {Array<GetCatalogItemIncludedDataEnum>} [includedData] A comma-delimited list of datasets to include in the response.
79
+ * @param {string} [locale] The locale for which you want to retrieve localized summaries. Defaults to the primary locale of the marketplace.
80
+ * @param {*} [options] Override http request option.
81
+ * @throws {RequiredError}
82
+ */
83
+ getCatalogItem: async (asin, marketplaceIds, includedData, locale, options = {}) => {
84
+ assertParamExists("getCatalogItem", "asin", asin);
85
+ assertParamExists("getCatalogItem", "marketplaceIds", marketplaceIds);
86
+ const localVarPath = `/catalog/2022-04-01/items/{asin}`.replace("{asin}", encodeURIComponent(String(asin)));
87
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
88
+ let baseOptions;
89
+ if (configuration) baseOptions = configuration.baseOptions;
90
+ const localVarRequestOptions = {
91
+ method: "GET",
92
+ ...baseOptions,
93
+ ...options
94
+ };
95
+ const localVarHeaderParameter = {};
96
+ const localVarQueryParameter = {};
97
+ if (marketplaceIds) localVarQueryParameter["marketplaceIds"] = marketplaceIds.join(COLLECTION_FORMATS.csv);
98
+ if (includedData) localVarQueryParameter["includedData"] = includedData.join(COLLECTION_FORMATS.csv);
99
+ if (locale !== void 0) localVarQueryParameter["locale"] = locale;
100
+ localVarHeaderParameter["Accept"] = "application/json";
101
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
102
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
103
+ localVarRequestOptions.headers = {
104
+ ...localVarHeaderParameter,
105
+ ...headersFromBaseOptions,
106
+ ...options.headers
107
+ };
108
+ return {
109
+ url: toPathString(localVarUrlObj),
110
+ options: localVarRequestOptions
111
+ };
112
+ },
113
+ /**
114
+ * Search for a list of Amazon catalog items and item-related information. You can search by identifier or by keywords. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
115
+ * @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
116
+ * @param {Array<string>} [identifiers] A comma-delimited list of product identifiers that you can use to search the Amazon catalog. **Note:** You cannot include &#x60;identifiers&#x60; and &#x60;keywords&#x60; in the same request.
117
+ * @param {SearchCatalogItemsIdentifiersTypeEnum} [identifiersType] The type of product identifiers that you can use to search the Amazon catalog. **Note:** &#x60;identifiersType&#x60; is required when &#x60;identifiers&#x60; is in the request.
118
+ * @param {Array<SearchCatalogItemsIncludedDataEnum>} [includedData] A comma-delimited list of datasets to include in the response.
119
+ * @param {string} [locale] The locale for which you want to retrieve localized summaries. Defaults to the primary locale of the marketplace.
120
+ * @param {string} [sellerId] A selling partner identifier, such as a seller account or vendor code. **Note:** Required when &#x60;identifiersType&#x60; is &#x60;SKU&#x60;.
121
+ * @param {Array<string>} [keywords] A comma-delimited list of keywords that you can use to search the Amazon catalog. **Note:** You cannot include &#x60;keywords&#x60; and &#x60;identifiers&#x60; in the same request.
122
+ * @param {Array<string>} [brandNames] A comma-delimited list of brand names that you can use to limit the search in queries based on &#x60;keywords&#x60;. **Note:** Cannot be used with &#x60;identifiers&#x60;.
123
+ * @param {Array<string>} [classificationIds] A comma-delimited list of classification identifiers that you can use to limit the search in queries based on &#x60;keywords&#x60;. **Note:** Cannot be used with &#x60;identifiers&#x60;.
124
+ * @param {number} [pageSize] The number of results to include on each page.
125
+ * @param {string} [pageToken] A token that you can use to fetch a specific page when there are multiple pages of results.
126
+ * @param {string} [keywordsLocale] The language of the keywords that are included in queries based on &#x60;keywords&#x60;. Defaults to the primary locale of the marketplace. **Note:** Cannot be used with &#x60;identifiers&#x60;.
127
+ * @param {*} [options] Override http request option.
128
+ * @throws {RequiredError}
129
+ */
130
+ searchCatalogItems: async (marketplaceIds, identifiers, identifiersType, includedData, locale, sellerId, keywords, brandNames, classificationIds, pageSize, pageToken, keywordsLocale, options = {}) => {
131
+ assertParamExists("searchCatalogItems", "marketplaceIds", marketplaceIds);
132
+ const localVarUrlObj = new URL(`/catalog/2022-04-01/items`, DUMMY_BASE_URL);
133
+ let baseOptions;
134
+ if (configuration) baseOptions = configuration.baseOptions;
135
+ const localVarRequestOptions = {
136
+ method: "GET",
137
+ ...baseOptions,
138
+ ...options
139
+ };
140
+ const localVarHeaderParameter = {};
141
+ const localVarQueryParameter = {};
142
+ if (identifiers) localVarQueryParameter["identifiers"] = identifiers.join(COLLECTION_FORMATS.csv);
143
+ if (identifiersType !== void 0) localVarQueryParameter["identifiersType"] = identifiersType;
144
+ if (marketplaceIds) localVarQueryParameter["marketplaceIds"] = marketplaceIds.join(COLLECTION_FORMATS.csv);
145
+ if (includedData) localVarQueryParameter["includedData"] = includedData.join(COLLECTION_FORMATS.csv);
146
+ if (locale !== void 0) localVarQueryParameter["locale"] = locale;
147
+ if (sellerId !== void 0) localVarQueryParameter["sellerId"] = sellerId;
148
+ if (keywords) localVarQueryParameter["keywords"] = keywords.join(COLLECTION_FORMATS.csv);
149
+ if (brandNames) localVarQueryParameter["brandNames"] = brandNames.join(COLLECTION_FORMATS.csv);
150
+ if (classificationIds) localVarQueryParameter["classificationIds"] = classificationIds.join(COLLECTION_FORMATS.csv);
151
+ if (pageSize !== void 0) localVarQueryParameter["pageSize"] = pageSize;
152
+ if (pageToken !== void 0) localVarQueryParameter["pageToken"] = pageToken;
153
+ if (keywordsLocale !== void 0) localVarQueryParameter["keywordsLocale"] = keywordsLocale;
154
+ localVarHeaderParameter["Accept"] = "application/json";
155
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
156
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
157
+ localVarRequestOptions.headers = {
158
+ ...localVarHeaderParameter,
159
+ ...headersFromBaseOptions,
160
+ ...options.headers
161
+ };
162
+ return {
163
+ url: toPathString(localVarUrlObj),
164
+ options: localVarRequestOptions
165
+ };
166
+ }
167
+ };
195
168
  };
196
- var CatalogItemsApiFp = function(configuration) {
197
- const localVarAxiosParamCreator = CatalogItemsApiAxiosParamCreator(configuration);
198
- return {
199
- /**
200
- * Retrieves details for an item in the Amazon catalog. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
201
- * @param {string} asin The Amazon Standard Identification Number (ASIN) of the item.
202
- * @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
203
- * @param {Array<GetCatalogItemIncludedDataEnum>} [includedData] A comma-delimited list of datasets to include in the response.
204
- * @param {string} [locale] The locale for which you want to retrieve localized summaries. Defaults to the primary locale of the marketplace.
205
- * @param {*} [options] Override http request option.
206
- * @throws {RequiredError}
207
- */
208
- async getCatalogItem(asin, marketplaceIds, includedData, locale, options) {
209
- const localVarAxiosArgs = await localVarAxiosParamCreator.getCatalogItem(asin, marketplaceIds, includedData, locale, options);
210
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
211
- const localVarOperationServerBasePath = operationServerMap["CatalogItemsApi.getCatalogItem"]?.[localVarOperationServerIndex]?.url;
212
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
213
- },
214
- /**
215
- * Search for a list of Amazon catalog items and item-related information. You can search by identifier or by keywords. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
216
- * @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
217
- * @param {Array<string>} [identifiers] A comma-delimited list of product identifiers that you can use to search the Amazon catalog. **Note:** You cannot include &#x60;identifiers&#x60; and &#x60;keywords&#x60; in the same request.
218
- * @param {SearchCatalogItemsIdentifiersTypeEnum} [identifiersType] The type of product identifiers that you can use to search the Amazon catalog. **Note:** &#x60;identifiersType&#x60; is required when &#x60;identifiers&#x60; is in the request.
219
- * @param {Array<SearchCatalogItemsIncludedDataEnum>} [includedData] A comma-delimited list of datasets to include in the response.
220
- * @param {string} [locale] The locale for which you want to retrieve localized summaries. Defaults to the primary locale of the marketplace.
221
- * @param {string} [sellerId] A selling partner identifier, such as a seller account or vendor code. **Note:** Required when &#x60;identifiersType&#x60; is &#x60;SKU&#x60;.
222
- * @param {Array<string>} [keywords] A comma-delimited list of keywords that you can use to search the Amazon catalog. **Note:** You cannot include &#x60;keywords&#x60; and &#x60;identifiers&#x60; in the same request.
223
- * @param {Array<string>} [brandNames] A comma-delimited list of brand names that you can use to limit the search in queries based on &#x60;keywords&#x60;. **Note:** Cannot be used with &#x60;identifiers&#x60;.
224
- * @param {Array<string>} [classificationIds] A comma-delimited list of classification identifiers that you can use to limit the search in queries based on &#x60;keywords&#x60;. **Note:** Cannot be used with &#x60;identifiers&#x60;.
225
- * @param {number} [pageSize] The number of results to include on each page.
226
- * @param {string} [pageToken] A token that you can use to fetch a specific page when there are multiple pages of results.
227
- * @param {string} [keywordsLocale] The language of the keywords that are included in queries based on &#x60;keywords&#x60;. Defaults to the primary locale of the marketplace. **Note:** Cannot be used with &#x60;identifiers&#x60;.
228
- * @param {*} [options] Override http request option.
229
- * @throws {RequiredError}
230
- */
231
- async searchCatalogItems(marketplaceIds, identifiers, identifiersType, includedData, locale, sellerId, keywords, brandNames, classificationIds, pageSize, pageToken, keywordsLocale, options) {
232
- const localVarAxiosArgs = await localVarAxiosParamCreator.searchCatalogItems(marketplaceIds, identifiers, identifiersType, includedData, locale, sellerId, keywords, brandNames, classificationIds, pageSize, pageToken, keywordsLocale, options);
233
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
234
- const localVarOperationServerBasePath = operationServerMap["CatalogItemsApi.searchCatalogItems"]?.[localVarOperationServerIndex]?.url;
235
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
236
- }
237
- };
169
+ /**
170
+ * CatalogItemsApi - functional programming interface
171
+ */
172
+ const CatalogItemsApiFp = function(configuration) {
173
+ const localVarAxiosParamCreator = CatalogItemsApiAxiosParamCreator(configuration);
174
+ return {
175
+ /**
176
+ * Retrieves details for an item in the Amazon catalog. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
177
+ * @param {string} asin The Amazon Standard Identification Number (ASIN) of the item.
178
+ * @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
179
+ * @param {Array<GetCatalogItemIncludedDataEnum>} [includedData] A comma-delimited list of datasets to include in the response.
180
+ * @param {string} [locale] The locale for which you want to retrieve localized summaries. Defaults to the primary locale of the marketplace.
181
+ * @param {*} [options] Override http request option.
182
+ * @throws {RequiredError}
183
+ */
184
+ async getCatalogItem(asin, marketplaceIds, includedData, locale, options) {
185
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getCatalogItem(asin, marketplaceIds, includedData, locale, options);
186
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
187
+ const localVarOperationServerBasePath = operationServerMap["CatalogItemsApi.getCatalogItem"]?.[localVarOperationServerIndex]?.url;
188
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
189
+ },
190
+ /**
191
+ * Search for a list of Amazon catalog items and item-related information. You can search by identifier or by keywords. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
192
+ * @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
193
+ * @param {Array<string>} [identifiers] A comma-delimited list of product identifiers that you can use to search the Amazon catalog. **Note:** You cannot include &#x60;identifiers&#x60; and &#x60;keywords&#x60; in the same request.
194
+ * @param {SearchCatalogItemsIdentifiersTypeEnum} [identifiersType] The type of product identifiers that you can use to search the Amazon catalog. **Note:** &#x60;identifiersType&#x60; is required when &#x60;identifiers&#x60; is in the request.
195
+ * @param {Array<SearchCatalogItemsIncludedDataEnum>} [includedData] A comma-delimited list of datasets to include in the response.
196
+ * @param {string} [locale] The locale for which you want to retrieve localized summaries. Defaults to the primary locale of the marketplace.
197
+ * @param {string} [sellerId] A selling partner identifier, such as a seller account or vendor code. **Note:** Required when &#x60;identifiersType&#x60; is &#x60;SKU&#x60;.
198
+ * @param {Array<string>} [keywords] A comma-delimited list of keywords that you can use to search the Amazon catalog. **Note:** You cannot include &#x60;keywords&#x60; and &#x60;identifiers&#x60; in the same request.
199
+ * @param {Array<string>} [brandNames] A comma-delimited list of brand names that you can use to limit the search in queries based on &#x60;keywords&#x60;. **Note:** Cannot be used with &#x60;identifiers&#x60;.
200
+ * @param {Array<string>} [classificationIds] A comma-delimited list of classification identifiers that you can use to limit the search in queries based on &#x60;keywords&#x60;. **Note:** Cannot be used with &#x60;identifiers&#x60;.
201
+ * @param {number} [pageSize] The number of results to include on each page.
202
+ * @param {string} [pageToken] A token that you can use to fetch a specific page when there are multiple pages of results.
203
+ * @param {string} [keywordsLocale] The language of the keywords that are included in queries based on &#x60;keywords&#x60;. Defaults to the primary locale of the marketplace. **Note:** Cannot be used with &#x60;identifiers&#x60;.
204
+ * @param {*} [options] Override http request option.
205
+ * @throws {RequiredError}
206
+ */
207
+ async searchCatalogItems(marketplaceIds, identifiers, identifiersType, includedData, locale, sellerId, keywords, brandNames, classificationIds, pageSize, pageToken, keywordsLocale, options) {
208
+ const localVarAxiosArgs = await localVarAxiosParamCreator.searchCatalogItems(marketplaceIds, identifiers, identifiersType, includedData, locale, sellerId, keywords, brandNames, classificationIds, pageSize, pageToken, keywordsLocale, options);
209
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
210
+ const localVarOperationServerBasePath = operationServerMap["CatalogItemsApi.searchCatalogItems"]?.[localVarOperationServerIndex]?.url;
211
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
212
+ }
213
+ };
238
214
  };
239
- var CatalogItemsApiFactory = function(configuration, basePath, axios) {
240
- const localVarFp = CatalogItemsApiFp(configuration);
241
- return {
242
- /**
243
- * Retrieves details for an item in the Amazon catalog. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
244
- * @param {CatalogItemsApiGetCatalogItemRequest} requestParameters Request parameters.
245
- * @param {*} [options] Override http request option.
246
- * @throws {RequiredError}
247
- */
248
- getCatalogItem(requestParameters, options) {
249
- return localVarFp.getCatalogItem(requestParameters.asin, requestParameters.marketplaceIds, requestParameters.includedData, requestParameters.locale, options).then((request) => request(axios, basePath));
250
- },
251
- /**
252
- * Search for a list of Amazon catalog items and item-related information. You can search by identifier or by keywords. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
253
- * @param {CatalogItemsApiSearchCatalogItemsRequest} requestParameters Request parameters.
254
- * @param {*} [options] Override http request option.
255
- * @throws {RequiredError}
256
- */
257
- searchCatalogItems(requestParameters, options) {
258
- return localVarFp.searchCatalogItems(requestParameters.marketplaceIds, requestParameters.identifiers, requestParameters.identifiersType, requestParameters.includedData, requestParameters.locale, requestParameters.sellerId, requestParameters.keywords, requestParameters.brandNames, requestParameters.classificationIds, requestParameters.pageSize, requestParameters.pageToken, requestParameters.keywordsLocale, options).then((request) => request(axios, basePath));
259
- }
260
- };
215
+ /**
216
+ * CatalogItemsApi - factory interface
217
+ */
218
+ const CatalogItemsApiFactory = function(configuration, basePath, axios) {
219
+ const localVarFp = CatalogItemsApiFp(configuration);
220
+ return {
221
+ /**
222
+ * Retrieves details for an item in the Amazon catalog. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
223
+ * @param {CatalogItemsApiGetCatalogItemRequest} requestParameters Request parameters.
224
+ * @param {*} [options] Override http request option.
225
+ * @throws {RequiredError}
226
+ */
227
+ getCatalogItem(requestParameters, options) {
228
+ return localVarFp.getCatalogItem(requestParameters.asin, requestParameters.marketplaceIds, requestParameters.includedData, requestParameters.locale, options).then((request) => request(axios, basePath));
229
+ },
230
+ /**
231
+ * Search for a list of Amazon catalog items and item-related information. You can search by identifier or by keywords. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
232
+ * @param {CatalogItemsApiSearchCatalogItemsRequest} requestParameters Request parameters.
233
+ * @param {*} [options] Override http request option.
234
+ * @throws {RequiredError}
235
+ */
236
+ searchCatalogItems(requestParameters, options) {
237
+ return localVarFp.searchCatalogItems(requestParameters.marketplaceIds, requestParameters.identifiers, requestParameters.identifiersType, requestParameters.includedData, requestParameters.locale, requestParameters.sellerId, requestParameters.keywords, requestParameters.brandNames, requestParameters.classificationIds, requestParameters.pageSize, requestParameters.pageToken, requestParameters.keywordsLocale, options).then((request) => request(axios, basePath));
238
+ }
239
+ };
261
240
  };
241
+ /**
242
+ * CatalogItemsApi - object-oriented interface
243
+ */
262
244
  var CatalogItemsApi = class extends BaseAPI {
263
- /**
264
- * Retrieves details for an item in the Amazon catalog. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
265
- * @param {CatalogItemsApiGetCatalogItemRequest} requestParameters Request parameters.
266
- * @param {*} [options] Override http request option.
267
- * @throws {RequiredError}
268
- */
269
- getCatalogItem(requestParameters, options) {
270
- return CatalogItemsApiFp(this.configuration).getCatalogItem(requestParameters.asin, requestParameters.marketplaceIds, requestParameters.includedData, requestParameters.locale, options).then((request) => request(this.axios, this.basePath));
271
- }
272
- /**
273
- * Search for a list of Amazon catalog items and item-related information. You can search by identifier or by keywords. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
274
- * @param {CatalogItemsApiSearchCatalogItemsRequest} requestParameters Request parameters.
275
- * @param {*} [options] Override http request option.
276
- * @throws {RequiredError}
277
- */
278
- searchCatalogItems(requestParameters, options) {
279
- return CatalogItemsApiFp(this.configuration).searchCatalogItems(requestParameters.marketplaceIds, requestParameters.identifiers, requestParameters.identifiersType, requestParameters.includedData, requestParameters.locale, requestParameters.sellerId, requestParameters.keywords, requestParameters.brandNames, requestParameters.classificationIds, requestParameters.pageSize, requestParameters.pageToken, requestParameters.keywordsLocale, options).then((request) => request(this.axios, this.basePath));
280
- }
245
+ /**
246
+ * Retrieves details for an item in the Amazon catalog. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
247
+ * @param {CatalogItemsApiGetCatalogItemRequest} requestParameters Request parameters.
248
+ * @param {*} [options] Override http request option.
249
+ * @throws {RequiredError}
250
+ */
251
+ getCatalogItem(requestParameters, options) {
252
+ return CatalogItemsApiFp(this.configuration).getCatalogItem(requestParameters.asin, requestParameters.marketplaceIds, requestParameters.includedData, requestParameters.locale, options).then((request) => request(this.axios, this.basePath));
253
+ }
254
+ /**
255
+ * Search for a list of Amazon catalog items and item-related information. You can search by identifier or by keywords. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
256
+ * @param {CatalogItemsApiSearchCatalogItemsRequest} requestParameters Request parameters.
257
+ * @param {*} [options] Override http request option.
258
+ * @throws {RequiredError}
259
+ */
260
+ searchCatalogItems(requestParameters, options) {
261
+ return CatalogItemsApiFp(this.configuration).searchCatalogItems(requestParameters.marketplaceIds, requestParameters.identifiers, requestParameters.identifiersType, requestParameters.includedData, requestParameters.locale, requestParameters.sellerId, requestParameters.keywords, requestParameters.brandNames, requestParameters.classificationIds, requestParameters.pageSize, requestParameters.pageToken, requestParameters.keywordsLocale, options).then((request) => request(this.axios, this.basePath));
262
+ }
281
263
  };
282
- var GetCatalogItemIncludedDataEnum = {
283
- Attributes: "attributes",
284
- Classifications: "classifications",
285
- Dimensions: "dimensions",
286
- Identifiers: "identifiers",
287
- Images: "images",
288
- ProductTypes: "productTypes",
289
- Relationships: "relationships",
290
- SalesRanks: "salesRanks",
291
- Summaries: "summaries",
292
- VendorDetails: "vendorDetails"
264
+ const GetCatalogItemIncludedDataEnum = {
265
+ Attributes: "attributes",
266
+ Classifications: "classifications",
267
+ Dimensions: "dimensions",
268
+ Identifiers: "identifiers",
269
+ Images: "images",
270
+ ProductTypes: "productTypes",
271
+ Relationships: "relationships",
272
+ SalesRanks: "salesRanks",
273
+ Summaries: "summaries",
274
+ VendorDetails: "vendorDetails"
293
275
  };
294
- var SearchCatalogItemsIdentifiersTypeEnum = {
295
- Asin: "ASIN",
296
- Ean: "EAN",
297
- Gtin: "GTIN",
298
- Isbn: "ISBN",
299
- Jan: "JAN",
300
- Minsan: "MINSAN",
301
- Sku: "SKU",
302
- Upc: "UPC"
276
+ const SearchCatalogItemsIdentifiersTypeEnum = {
277
+ Asin: "ASIN",
278
+ Ean: "EAN",
279
+ Gtin: "GTIN",
280
+ Isbn: "ISBN",
281
+ Jan: "JAN",
282
+ Minsan: "MINSAN",
283
+ Sku: "SKU",
284
+ Upc: "UPC"
303
285
  };
304
- var SearchCatalogItemsIncludedDataEnum = {
305
- Attributes: "attributes",
306
- Classifications: "classifications",
307
- Dimensions: "dimensions",
308
- Identifiers: "identifiers",
309
- Images: "images",
310
- ProductTypes: "productTypes",
311
- Relationships: "relationships",
312
- SalesRanks: "salesRanks",
313
- Summaries: "summaries",
314
- VendorDetails: "vendorDetails"
286
+ const SearchCatalogItemsIncludedDataEnum = {
287
+ Attributes: "attributes",
288
+ Classifications: "classifications",
289
+ Dimensions: "dimensions",
290
+ Identifiers: "identifiers",
291
+ Images: "images",
292
+ ProductTypes: "productTypes",
293
+ Relationships: "relationships",
294
+ SalesRanks: "salesRanks",
295
+ Summaries: "summaries",
296
+ VendorDetails: "vendorDetails"
315
297
  };
316
-
317
- // src/api-model/configuration.ts
298
+ //#endregion
299
+ //#region src/api-model/configuration.ts
318
300
  var Configuration = class {
319
- /**
320
- * parameter for apiKey security
321
- * @param name security name
322
- */
323
- apiKey;
324
- /**
325
- * parameter for basic security
326
- */
327
- username;
328
- /**
329
- * parameter for basic security
330
- */
331
- password;
332
- /**
333
- * parameter for oauth2 security
334
- * @param name security name
335
- * @param scopes oauth2 scope
336
- */
337
- accessToken;
338
- /**
339
- * parameter for aws4 signature security
340
- * @param {Object} AWS4Signature - AWS4 Signature security
341
- * @param {string} options.region - aws region
342
- * @param {string} options.service - name of the service.
343
- * @param {string} credentials.accessKeyId - aws access key id
344
- * @param {string} credentials.secretAccessKey - aws access key
345
- * @param {string} credentials.sessionToken - aws session token
346
- * @memberof Configuration
347
- */
348
- awsv4;
349
- /**
350
- * override base path
351
- */
352
- basePath;
353
- /**
354
- * override server index
355
- */
356
- serverIndex;
357
- /**
358
- * base options for axios calls
359
- */
360
- baseOptions;
361
- /**
362
- * The FormData constructor that will be used to create multipart form data
363
- * requests. You can inject this here so that execution environments that
364
- * do not support the FormData class can still run the generated client.
365
- *
366
- * @type {new () => FormData}
367
- */
368
- formDataCtor;
369
- constructor(param = {}) {
370
- this.apiKey = param.apiKey;
371
- this.username = param.username;
372
- this.password = param.password;
373
- this.accessToken = param.accessToken;
374
- this.awsv4 = param.awsv4;
375
- this.basePath = param.basePath;
376
- this.serverIndex = param.serverIndex;
377
- this.baseOptions = {
378
- ...param.baseOptions,
379
- headers: {
380
- ...param.baseOptions?.headers
381
- }
382
- };
383
- this.formDataCtor = param.formDataCtor;
384
- }
385
- /**
386
- * Check if the given MIME is a JSON MIME.
387
- * JSON MIME examples:
388
- * application/json
389
- * application/json; charset=UTF8
390
- * APPLICATION/JSON
391
- * application/vnd.company+json
392
- * @param mime - MIME (Multipurpose Internet Mail Extensions)
393
- * @return True if the given MIME is JSON, false otherwise.
394
- */
395
- isJsonMime(mime) {
396
- const jsonMime = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i;
397
- return mime !== null && jsonMime.test(mime);
398
- }
301
+ /**
302
+ * parameter for apiKey security
303
+ * @param name security name
304
+ */
305
+ apiKey;
306
+ /**
307
+ * parameter for basic security
308
+ */
309
+ username;
310
+ /**
311
+ * parameter for basic security
312
+ */
313
+ password;
314
+ /**
315
+ * parameter for oauth2 security
316
+ * @param name security name
317
+ * @param scopes oauth2 scope
318
+ */
319
+ accessToken;
320
+ /**
321
+ * parameter for aws4 signature security
322
+ * @param {Object} AWS4Signature - AWS4 Signature security
323
+ * @param {string} options.region - aws region
324
+ * @param {string} options.service - name of the service.
325
+ * @param {string} credentials.accessKeyId - aws access key id
326
+ * @param {string} credentials.secretAccessKey - aws access key
327
+ * @param {string} credentials.sessionToken - aws session token
328
+ * @memberof Configuration
329
+ */
330
+ awsv4;
331
+ /**
332
+ * override base path
333
+ */
334
+ basePath;
335
+ /**
336
+ * override server index
337
+ */
338
+ serverIndex;
339
+ /**
340
+ * base options for axios calls
341
+ */
342
+ baseOptions;
343
+ /**
344
+ * The FormData constructor that will be used to create multipart form data
345
+ * requests. You can inject this here so that execution environments that
346
+ * do not support the FormData class can still run the generated client.
347
+ *
348
+ * @type {new () => FormData}
349
+ */
350
+ formDataCtor;
351
+ constructor(param = {}) {
352
+ this.apiKey = param.apiKey;
353
+ this.username = param.username;
354
+ this.password = param.password;
355
+ this.accessToken = param.accessToken;
356
+ this.awsv4 = param.awsv4;
357
+ this.basePath = param.basePath;
358
+ this.serverIndex = param.serverIndex;
359
+ this.baseOptions = {
360
+ ...param.baseOptions,
361
+ headers: { ...param.baseOptions?.headers }
362
+ };
363
+ this.formDataCtor = param.formDataCtor;
364
+ }
365
+ /**
366
+ * Check if the given MIME is a JSON MIME.
367
+ * JSON MIME examples:
368
+ * application/json
369
+ * application/json; charset=UTF8
370
+ * APPLICATION/JSON
371
+ * application/vnd.company+json
372
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
373
+ * @return True if the given MIME is JSON, false otherwise.
374
+ */
375
+ isJsonMime(mime) {
376
+ return mime !== null && /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i.test(mime);
377
+ }
399
378
  };
400
-
401
- // src/api-model/models/item-image.ts
402
- var ItemImageVariantEnum = {
403
- Main: "MAIN",
404
- Pt01: "PT01",
405
- Pt02: "PT02",
406
- Pt03: "PT03",
407
- Pt04: "PT04",
408
- Pt05: "PT05",
409
- Pt06: "PT06",
410
- Pt07: "PT07",
411
- Pt08: "PT08",
412
- Swch: "SWCH"
379
+ //#endregion
380
+ //#region src/api-model/models/item-image.ts
381
+ const ItemImageVariantEnum = {
382
+ Main: "MAIN",
383
+ Pt01: "PT01",
384
+ Pt02: "PT02",
385
+ Pt03: "PT03",
386
+ Pt04: "PT04",
387
+ Pt05: "PT05",
388
+ Pt06: "PT06",
389
+ Pt07: "PT07",
390
+ Pt08: "PT08",
391
+ Swch: "SWCH"
413
392
  };
414
-
415
- // src/api-model/models/item-relationship.ts
416
- var ItemRelationshipTypeEnum = {
417
- Variation: "VARIATION",
418
- PackageHierarchy: "PACKAGE_HIERARCHY"
393
+ //#endregion
394
+ //#region src/api-model/models/item-relationship.ts
395
+ const ItemRelationshipTypeEnum = {
396
+ Variation: "VARIATION",
397
+ PackageHierarchy: "PACKAGE_HIERARCHY"
419
398
  };
420
-
421
- // src/api-model/models/item-summary-by-marketplace.ts
422
- var ItemSummaryByMarketplaceItemClassificationEnum = {
423
- BaseProduct: "BASE_PRODUCT",
424
- Other: "OTHER",
425
- ProductBundle: "PRODUCT_BUNDLE",
426
- VariationParent: "VARIATION_PARENT"
399
+ //#endregion
400
+ //#region src/api-model/models/item-summary-by-marketplace.ts
401
+ const ItemSummaryByMarketplaceItemClassificationEnum = {
402
+ BaseProduct: "BASE_PRODUCT",
403
+ Other: "OTHER",
404
+ ProductBundle: "PRODUCT_BUNDLE",
405
+ VariationParent: "VARIATION_PARENT"
427
406
  };
428
-
429
- // src/api-model/models/item-vendor-details-by-marketplace.ts
430
- var ItemVendorDetailsByMarketplaceReplenishmentCategoryEnum = {
431
- Allocated: "ALLOCATED",
432
- BasicReplenishment: "BASIC_REPLENISHMENT",
433
- InSeason: "IN_SEASON",
434
- LimitedReplenishment: "LIMITED_REPLENISHMENT",
435
- ManufacturerOutOfStock: "MANUFACTURER_OUT_OF_STOCK",
436
- NewProduct: "NEW_PRODUCT",
437
- NonReplenishable: "NON_REPLENISHABLE",
438
- NonStockupable: "NON_STOCKUPABLE",
439
- Obsolete: "OBSOLETE",
440
- PlannedReplenishment: "PLANNED_REPLENISHMENT"
407
+ //#endregion
408
+ //#region src/api-model/models/item-vendor-details-by-marketplace.ts
409
+ const ItemVendorDetailsByMarketplaceReplenishmentCategoryEnum = {
410
+ Allocated: "ALLOCATED",
411
+ BasicReplenishment: "BASIC_REPLENISHMENT",
412
+ InSeason: "IN_SEASON",
413
+ LimitedReplenishment: "LIMITED_REPLENISHMENT",
414
+ ManufacturerOutOfStock: "MANUFACTURER_OUT_OF_STOCK",
415
+ NewProduct: "NEW_PRODUCT",
416
+ NonReplenishable: "NON_REPLENISHABLE",
417
+ NonStockupable: "NON_STOCKUPABLE",
418
+ Obsolete: "OBSOLETE",
419
+ PlannedReplenishment: "PLANNED_REPLENISHMENT"
441
420
  };
442
-
443
- // src/client.ts
444
- var clientRateLimits = [
445
- {
446
- method: "get",
447
- // eslint-disable-next-line prefer-regex-literals
448
- urlRegex: new RegExp("^/catalog/2022-04-01/items$"),
449
- rate: 2,
450
- burst: 2
451
- },
452
- {
453
- method: "get",
454
- // eslint-disable-next-line prefer-regex-literals
455
- urlRegex: new RegExp("^/catalog/2022-04-01/items/[^/]*$"),
456
- rate: 2,
457
- burst: 2
458
- }
459
- ];
421
+ //#endregion
422
+ //#region src/client.ts
423
+ const clientRateLimits = [{
424
+ method: "get",
425
+ urlRegex: /^\/catalog\/2022\u{2D}04\u{2D}01\/items$/v,
426
+ rate: 2,
427
+ burst: 2
428
+ }, {
429
+ method: "get",
430
+ urlRegex: /^\/catalog\/2022\u{2D}04\u{2D}01\/items\/[^\/]*$/v,
431
+ rate: 2,
432
+ burst: 2
433
+ }];
460
434
  var CatalogItemsApiClient = class extends CatalogItemsApi {
461
- constructor(configuration) {
462
- const { axios, endpoint } = createAxiosInstance(configuration, clientRateLimits);
463
- super(new Configuration(), endpoint, axios);
464
- }
465
- };
466
- export {
467
- CatalogItemsApi,
468
- CatalogItemsApiAxiosParamCreator,
469
- CatalogItemsApiClient,
470
- CatalogItemsApiFactory,
471
- CatalogItemsApiFp,
472
- GetCatalogItemIncludedDataEnum,
473
- ItemImageVariantEnum,
474
- ItemRelationshipTypeEnum,
475
- ItemSummaryByMarketplaceItemClassificationEnum,
476
- ItemVendorDetailsByMarketplaceReplenishmentCategoryEnum,
477
- SearchCatalogItemsIdentifiersTypeEnum,
478
- SearchCatalogItemsIncludedDataEnum,
479
- clientRateLimits
435
+ constructor(configuration) {
436
+ const { axios, endpoint } = createAxiosInstance(configuration, clientRateLimits);
437
+ super(new Configuration(), endpoint, axios);
438
+ }
480
439
  };
440
+ //#endregion
441
+ export { CatalogItemsApi, CatalogItemsApiAxiosParamCreator, CatalogItemsApiClient, CatalogItemsApiFactory, CatalogItemsApiFp, GetCatalogItemIncludedDataEnum, ItemImageVariantEnum, ItemRelationshipTypeEnum, ItemSummaryByMarketplaceItemClassificationEnum, ItemVendorDetailsByMarketplaceReplenishmentCategoryEnum, SearchCatalogItemsIdentifiersTypeEnum, SearchCatalogItemsIncludedDataEnum, clientRateLimits };
442
+
481
443
  //# sourceMappingURL=index.js.map