@sp-api-sdk/customer-feedback-api-2024-06-01 2.0.0 → 2.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,637 +1,654 @@
1
- // src/client.ts
2
1
  import { createAxiosInstance } from "@sp-api-sdk/common";
3
-
4
- // src/api-model/api/customer-feedback-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(/\/+$/, "");
3
+ //#region src/api-model/base.ts
4
+ const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
10
5
  var BaseAPI = class {
11
- constructor(configuration, basePath = BASE_PATH, axios = globalAxios) {
12
- this.basePath = basePath;
13
- this.axios = axios;
14
- if (configuration) {
15
- this.configuration = configuration;
16
- this.basePath = configuration.basePath ?? basePath;
17
- }
18
- }
19
- basePath;
20
- axios;
21
- configuration;
6
+ basePath;
7
+ axios;
8
+ configuration;
9
+ constructor(configuration, basePath = BASE_PATH, axios = globalAxios) {
10
+ this.basePath = basePath;
11
+ this.axios = axios;
12
+ if (configuration) {
13
+ this.configuration = configuration;
14
+ this.basePath = configuration.basePath ?? basePath;
15
+ }
16
+ }
22
17
  };
23
18
  var RequiredError = class extends Error {
24
- constructor(field, msg) {
25
- super(msg);
26
- this.field = field;
27
- this.name = "RequiredError";
28
- }
29
- field;
19
+ field;
20
+ constructor(field, msg) {
21
+ super(msg);
22
+ this.field = field;
23
+ this.name = "RequiredError";
24
+ }
30
25
  };
31
- var operationServerMap = {};
32
-
33
- // src/api-model/common.ts
34
- var DUMMY_BASE_URL = "https://example.com";
35
- var assertParamExists = function(functionName, paramName, paramValue) {
36
- if (paramValue === null || paramValue === void 0) {
37
- throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
38
- }
26
+ const operationServerMap = {};
27
+ //#endregion
28
+ //#region src/api-model/common.ts
29
+ const DUMMY_BASE_URL = "https://example.com";
30
+ /**
31
+ *
32
+ * @throws {RequiredError}
33
+ */
34
+ const assertParamExists = function(functionName, paramName, paramValue) {
35
+ if (paramValue === null || paramValue === void 0) throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
39
36
  };
40
37
  function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
41
- if (parameter == null) return;
42
- if (typeof parameter === "object") {
43
- if (Array.isArray(parameter) || parameter instanceof Set) {
44
- parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
45
- } else {
46
- Object.keys(parameter).forEach(
47
- (currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`)
48
- );
49
- }
50
- } else {
51
- if (urlSearchParams.has(key)) {
52
- urlSearchParams.append(key, parameter);
53
- } else {
54
- urlSearchParams.set(key, parameter);
55
- }
56
- }
38
+ if (parameter == null) return;
39
+ if (typeof parameter === "object") if (Array.isArray(parameter) || parameter instanceof Set) parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
40
+ else Object.keys(parameter).forEach((currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`));
41
+ else if (urlSearchParams.has(key)) urlSearchParams.append(key, parameter);
42
+ else urlSearchParams.set(key, parameter);
57
43
  }
58
- var setSearchParams = function(url, ...objects) {
59
- const searchParams = new URLSearchParams(url.search);
60
- setFlattenedQueryParams(searchParams, objects);
61
- url.search = searchParams.toString();
44
+ const setSearchParams = function(url, ...objects) {
45
+ const searchParams = new URLSearchParams(url.search);
46
+ setFlattenedQueryParams(searchParams, objects);
47
+ url.search = searchParams.toString();
62
48
  };
63
- var toPathString = function(url) {
64
- return url.pathname + url.search + url.hash;
49
+ const toPathString = function(url) {
50
+ return url.pathname + url.search + url.hash;
65
51
  };
66
- var createRequestFunction = function(axiosArgs, globalAxios3, BASE_PATH2, configuration) {
67
- return (axios = globalAxios3, basePath = BASE_PATH2) => {
68
- const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? "" : configuration?.basePath ?? basePath) + axiosArgs.url };
69
- return axios.request(axiosRequestArgs);
70
- };
52
+ const createRequestFunction = function(axiosArgs, globalAxios, BASE_PATH, configuration) {
53
+ return (axios = globalAxios, basePath = BASE_PATH) => {
54
+ const axiosRequestArgs = {
55
+ ...axiosArgs.options,
56
+ url: (axios.defaults.baseURL ? "" : configuration?.basePath ?? basePath) + axiosArgs.url
57
+ };
58
+ return axios.request(axiosRequestArgs);
59
+ };
71
60
  };
72
-
73
- // src/api-model/api/customer-feedback-api.ts
74
- var CustomerFeedbackApiAxiosParamCreator = function(configuration) {
75
- return {
76
- /**
77
- * Retrieve the topics that customers mention when they return items in a browse node.
78
- * @param {string} browseNodeId A browse node ID is a unique identifier for a browse node. A browse node is a named location in a browse tree that is used for navigation, product classification, and website content.
79
- * @param {string} marketplaceId The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids.
80
- * @param {*} [options] Override http request option.
81
- * @throws {RequiredError}
82
- */
83
- getBrowseNodeReturnTopics: async (browseNodeId, marketplaceId, options = {}) => {
84
- assertParamExists("getBrowseNodeReturnTopics", "browseNodeId", browseNodeId);
85
- assertParamExists("getBrowseNodeReturnTopics", "marketplaceId", marketplaceId);
86
- const localVarPath = `/customerFeedback/2024-06-01/browseNodes/{browseNodeId}/returns/topics`.replace("{browseNodeId}", encodeURIComponent(String(browseNodeId)));
87
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
88
- let baseOptions;
89
- if (configuration) {
90
- baseOptions = configuration.baseOptions;
91
- }
92
- const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
93
- const localVarHeaderParameter = {};
94
- const localVarQueryParameter = {};
95
- if (marketplaceId !== void 0) {
96
- localVarQueryParameter["marketplaceId"] = marketplaceId;
97
- }
98
- localVarHeaderParameter["Accept"] = "application/json";
99
- setSearchParams(localVarUrlObj, localVarQueryParameter);
100
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
101
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
102
- return {
103
- url: toPathString(localVarUrlObj),
104
- options: localVarRequestOptions
105
- };
106
- },
107
- /**
108
- * Retrieve the trends of topics that customers mention when they return items in a browse node.
109
- * @param {string} browseNodeId A browse node ID is a unique identifier of a browse node. A browse node is a named location in a browse tree that is used for navigation, product classification, and website content.
110
- * @param {string} marketplaceId The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids.
111
- * @param {*} [options] Override http request option.
112
- * @throws {RequiredError}
113
- */
114
- getBrowseNodeReturnTrends: async (browseNodeId, marketplaceId, options = {}) => {
115
- assertParamExists("getBrowseNodeReturnTrends", "browseNodeId", browseNodeId);
116
- assertParamExists("getBrowseNodeReturnTrends", "marketplaceId", marketplaceId);
117
- const localVarPath = `/customerFeedback/2024-06-01/browseNodes/{browseNodeId}/returns/trends`.replace("{browseNodeId}", encodeURIComponent(String(browseNodeId)));
118
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
119
- let baseOptions;
120
- if (configuration) {
121
- baseOptions = configuration.baseOptions;
122
- }
123
- const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
124
- const localVarHeaderParameter = {};
125
- const localVarQueryParameter = {};
126
- if (marketplaceId !== void 0) {
127
- localVarQueryParameter["marketplaceId"] = marketplaceId;
128
- }
129
- localVarHeaderParameter["Accept"] = "application/json";
130
- setSearchParams(localVarUrlObj, localVarQueryParameter);
131
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
132
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
133
- return {
134
- url: toPathString(localVarUrlObj),
135
- options: localVarRequestOptions
136
- };
137
- },
138
- /**
139
- * Retrieve a browse node\'s ten most positive and ten most negative review topics.
140
- * @param {string} browseNodeId The ID of a browse node. A browse node is a named location in a browse tree that is used for navigation, product classification, and website content.
141
- * @param {string} marketplaceId The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids.
142
- * @param {string} sortBy The metric by which to sort the data in the response.
143
- * @param {*} [options] Override http request option.
144
- * @throws {RequiredError}
145
- */
146
- getBrowseNodeReviewTopics: async (browseNodeId, marketplaceId, sortBy, options = {}) => {
147
- assertParamExists("getBrowseNodeReviewTopics", "browseNodeId", browseNodeId);
148
- assertParamExists("getBrowseNodeReviewTopics", "marketplaceId", marketplaceId);
149
- assertParamExists("getBrowseNodeReviewTopics", "sortBy", sortBy);
150
- const localVarPath = `/customerFeedback/2024-06-01/browseNodes/{browseNodeId}/reviews/topics`.replace("{browseNodeId}", encodeURIComponent(String(browseNodeId)));
151
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
152
- let baseOptions;
153
- if (configuration) {
154
- baseOptions = configuration.baseOptions;
155
- }
156
- const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
157
- const localVarHeaderParameter = {};
158
- const localVarQueryParameter = {};
159
- if (marketplaceId !== void 0) {
160
- localVarQueryParameter["marketplaceId"] = marketplaceId;
161
- }
162
- if (sortBy !== void 0) {
163
- localVarQueryParameter["sortBy"] = sortBy;
164
- }
165
- localVarHeaderParameter["Accept"] = "application/json";
166
- setSearchParams(localVarUrlObj, localVarQueryParameter);
167
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
168
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
169
- return {
170
- url: toPathString(localVarUrlObj),
171
- options: localVarRequestOptions
172
- };
173
- },
174
- /**
175
- * Retrieve the positive and negative review trends of items in a browse node for the past six months.
176
- * @param {string} browseNodeId A browse node ID is a unique identifier of a browse node. A browse node is a named location in a browse tree that is used for navigation, product classification, and website content.
177
- * @param {string} marketplaceId The marketplace ID is the globally unique identifier of a marketplace. For more information, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
178
- * @param {*} [options] Override http request option.
179
- * @throws {RequiredError}
180
- */
181
- getBrowseNodeReviewTrends: async (browseNodeId, marketplaceId, options = {}) => {
182
- assertParamExists("getBrowseNodeReviewTrends", "browseNodeId", browseNodeId);
183
- assertParamExists("getBrowseNodeReviewTrends", "marketplaceId", marketplaceId);
184
- const localVarPath = `/customerFeedback/2024-06-01/browseNodes/{browseNodeId}/reviews/trends`.replace("{browseNodeId}", encodeURIComponent(String(browseNodeId)));
185
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
186
- let baseOptions;
187
- if (configuration) {
188
- baseOptions = configuration.baseOptions;
189
- }
190
- const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
191
- const localVarHeaderParameter = {};
192
- const localVarQueryParameter = {};
193
- if (marketplaceId !== void 0) {
194
- localVarQueryParameter["marketplaceId"] = marketplaceId;
195
- }
196
- localVarHeaderParameter["Accept"] = "application/json";
197
- setSearchParams(localVarUrlObj, localVarQueryParameter);
198
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
199
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
200
- return {
201
- url: toPathString(localVarUrlObj),
202
- options: localVarRequestOptions
203
- };
204
- },
205
- /**
206
- * This API returns the associated browse node of the requested ASIN. A browse node is a location in a browse tree that is used for navigation, product classification, and website content on the Amazon retail website.
207
- * @param {string} asin The Amazon Standard Identification Number (ASIN) is the unique identifier of a product within a marketplace.
208
- * @param {string} marketplaceId The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids.
209
- * @param {*} [options] Override http request option.
210
- * @throws {RequiredError}
211
- */
212
- getItemBrowseNode: async (asin, marketplaceId, options = {}) => {
213
- assertParamExists("getItemBrowseNode", "asin", asin);
214
- assertParamExists("getItemBrowseNode", "marketplaceId", marketplaceId);
215
- const localVarPath = `/customerFeedback/2024-06-01/items/{asin}/browseNode`.replace("{asin}", encodeURIComponent(String(asin)));
216
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
217
- let baseOptions;
218
- if (configuration) {
219
- baseOptions = configuration.baseOptions;
220
- }
221
- const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
222
- const localVarHeaderParameter = {};
223
- const localVarQueryParameter = {};
224
- if (marketplaceId !== void 0) {
225
- localVarQueryParameter["marketplaceId"] = marketplaceId;
226
- }
227
- localVarHeaderParameter["Accept"] = "application/json";
228
- setSearchParams(localVarUrlObj, localVarQueryParameter);
229
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
230
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
231
- return {
232
- url: toPathString(localVarUrlObj),
233
- options: localVarRequestOptions
234
- };
235
- },
236
- /**
237
- * Retrieve an item\'s ten most positive and ten most negative review topics.
238
- * @param {string} asin The Amazon Standard Identification Number (ASIN) is the unique identifier of a product within a marketplace. The value must be a child ASIN.
239
- * @param {string} marketplaceId The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids.
240
- * @param {string} sortBy The metric by which to sort data in the response.
241
- * @param {*} [options] Override http request option.
242
- * @throws {RequiredError}
243
- */
244
- getItemReviewTopics: async (asin, marketplaceId, sortBy, options = {}) => {
245
- assertParamExists("getItemReviewTopics", "asin", asin);
246
- assertParamExists("getItemReviewTopics", "marketplaceId", marketplaceId);
247
- assertParamExists("getItemReviewTopics", "sortBy", sortBy);
248
- const localVarPath = `/customerFeedback/2024-06-01/items/{asin}/reviews/topics`.replace("{asin}", encodeURIComponent(String(asin)));
249
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
250
- let baseOptions;
251
- if (configuration) {
252
- baseOptions = configuration.baseOptions;
253
- }
254
- const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
255
- const localVarHeaderParameter = {};
256
- const localVarQueryParameter = {};
257
- if (marketplaceId !== void 0) {
258
- localVarQueryParameter["marketplaceId"] = marketplaceId;
259
- }
260
- if (sortBy !== void 0) {
261
- localVarQueryParameter["sortBy"] = sortBy;
262
- }
263
- localVarHeaderParameter["Accept"] = "application/json";
264
- setSearchParams(localVarUrlObj, localVarQueryParameter);
265
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
266
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
267
- return {
268
- url: toPathString(localVarUrlObj),
269
- options: localVarRequestOptions
270
- };
271
- },
272
- /**
273
- * Retrieve an item\'s positive and negative review trends for the past six months.
274
- * @param {string} asin The Amazon Standard Identification Number (ASIN) is the unique identifier of a product within a marketplace. This API takes child ASIN as an input.
275
- * @param {string} marketplaceId The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids.
276
- * @param {*} [options] Override http request option.
277
- * @throws {RequiredError}
278
- */
279
- getItemReviewTrends: async (asin, marketplaceId, options = {}) => {
280
- assertParamExists("getItemReviewTrends", "asin", asin);
281
- assertParamExists("getItemReviewTrends", "marketplaceId", marketplaceId);
282
- const localVarPath = `/customerFeedback/2024-06-01/items/{asin}/reviews/trends`.replace("{asin}", encodeURIComponent(String(asin)));
283
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
284
- let baseOptions;
285
- if (configuration) {
286
- baseOptions = configuration.baseOptions;
287
- }
288
- const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
289
- const localVarHeaderParameter = {};
290
- const localVarQueryParameter = {};
291
- if (marketplaceId !== void 0) {
292
- localVarQueryParameter["marketplaceId"] = marketplaceId;
293
- }
294
- localVarHeaderParameter["Accept"] = "application/json";
295
- setSearchParams(localVarUrlObj, localVarQueryParameter);
296
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
297
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
298
- return {
299
- url: toPathString(localVarUrlObj),
300
- options: localVarRequestOptions
301
- };
302
- }
303
- };
61
+ //#endregion
62
+ //#region src/api-model/api/customer-feedback-api.ts
63
+ /**
64
+ * CustomerFeedbackApi - axios parameter creator
65
+ */
66
+ const CustomerFeedbackApiAxiosParamCreator = function(configuration) {
67
+ return {
68
+ /**
69
+ * Retrieve the topics that customers mention when they return items in a browse node.
70
+ * @param {string} browseNodeId A browse node ID is a unique identifier for a browse node. A browse node is a named location in a browse tree that is used for navigation, product classification, and website content.
71
+ * @param {string} marketplaceId The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids.
72
+ * @param {*} [options] Override http request option.
73
+ * @throws {RequiredError}
74
+ */
75
+ getBrowseNodeReturnTopics: async (browseNodeId, marketplaceId, options = {}) => {
76
+ assertParamExists("getBrowseNodeReturnTopics", "browseNodeId", browseNodeId);
77
+ assertParamExists("getBrowseNodeReturnTopics", "marketplaceId", marketplaceId);
78
+ const localVarPath = `/customerFeedback/2024-06-01/browseNodes/{browseNodeId}/returns/topics`.replace("{browseNodeId}", encodeURIComponent(String(browseNodeId)));
79
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
80
+ let baseOptions;
81
+ if (configuration) baseOptions = configuration.baseOptions;
82
+ const localVarRequestOptions = {
83
+ method: "GET",
84
+ ...baseOptions,
85
+ ...options
86
+ };
87
+ const localVarHeaderParameter = {};
88
+ const localVarQueryParameter = {};
89
+ if (marketplaceId !== void 0) localVarQueryParameter["marketplaceId"] = marketplaceId;
90
+ localVarHeaderParameter["Accept"] = "application/json";
91
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
92
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
93
+ localVarRequestOptions.headers = {
94
+ ...localVarHeaderParameter,
95
+ ...headersFromBaseOptions,
96
+ ...options.headers
97
+ };
98
+ return {
99
+ url: toPathString(localVarUrlObj),
100
+ options: localVarRequestOptions
101
+ };
102
+ },
103
+ /**
104
+ * Retrieve the trends of topics that customers mention when they return items in a browse node.
105
+ * @param {string} browseNodeId A browse node ID is a unique identifier of a browse node. A browse node is a named location in a browse tree that is used for navigation, product classification, and website content.
106
+ * @param {string} marketplaceId The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids.
107
+ * @param {*} [options] Override http request option.
108
+ * @throws {RequiredError}
109
+ */
110
+ getBrowseNodeReturnTrends: async (browseNodeId, marketplaceId, options = {}) => {
111
+ assertParamExists("getBrowseNodeReturnTrends", "browseNodeId", browseNodeId);
112
+ assertParamExists("getBrowseNodeReturnTrends", "marketplaceId", marketplaceId);
113
+ const localVarPath = `/customerFeedback/2024-06-01/browseNodes/{browseNodeId}/returns/trends`.replace("{browseNodeId}", encodeURIComponent(String(browseNodeId)));
114
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
115
+ let baseOptions;
116
+ if (configuration) baseOptions = configuration.baseOptions;
117
+ const localVarRequestOptions = {
118
+ method: "GET",
119
+ ...baseOptions,
120
+ ...options
121
+ };
122
+ const localVarHeaderParameter = {};
123
+ const localVarQueryParameter = {};
124
+ if (marketplaceId !== void 0) localVarQueryParameter["marketplaceId"] = marketplaceId;
125
+ localVarHeaderParameter["Accept"] = "application/json";
126
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
127
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
128
+ localVarRequestOptions.headers = {
129
+ ...localVarHeaderParameter,
130
+ ...headersFromBaseOptions,
131
+ ...options.headers
132
+ };
133
+ return {
134
+ url: toPathString(localVarUrlObj),
135
+ options: localVarRequestOptions
136
+ };
137
+ },
138
+ /**
139
+ * Retrieve a browse node\'s ten most positive and ten most negative review topics.
140
+ * @param {string} browseNodeId The ID of a browse node. A browse node is a named location in a browse tree that is used for navigation, product classification, and website content.
141
+ * @param {string} marketplaceId The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids.
142
+ * @param {string} sortBy The metric by which to sort the data in the response.
143
+ * @param {*} [options] Override http request option.
144
+ * @throws {RequiredError}
145
+ */
146
+ getBrowseNodeReviewTopics: async (browseNodeId, marketplaceId, sortBy, options = {}) => {
147
+ assertParamExists("getBrowseNodeReviewTopics", "browseNodeId", browseNodeId);
148
+ assertParamExists("getBrowseNodeReviewTopics", "marketplaceId", marketplaceId);
149
+ assertParamExists("getBrowseNodeReviewTopics", "sortBy", sortBy);
150
+ const localVarPath = `/customerFeedback/2024-06-01/browseNodes/{browseNodeId}/reviews/topics`.replace("{browseNodeId}", encodeURIComponent(String(browseNodeId)));
151
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
152
+ let baseOptions;
153
+ if (configuration) baseOptions = configuration.baseOptions;
154
+ const localVarRequestOptions = {
155
+ method: "GET",
156
+ ...baseOptions,
157
+ ...options
158
+ };
159
+ const localVarHeaderParameter = {};
160
+ const localVarQueryParameter = {};
161
+ if (marketplaceId !== void 0) localVarQueryParameter["marketplaceId"] = marketplaceId;
162
+ if (sortBy !== void 0) localVarQueryParameter["sortBy"] = sortBy;
163
+ localVarHeaderParameter["Accept"] = "application/json";
164
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
165
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
166
+ localVarRequestOptions.headers = {
167
+ ...localVarHeaderParameter,
168
+ ...headersFromBaseOptions,
169
+ ...options.headers
170
+ };
171
+ return {
172
+ url: toPathString(localVarUrlObj),
173
+ options: localVarRequestOptions
174
+ };
175
+ },
176
+ /**
177
+ * Retrieve the positive and negative review trends of items in a browse node for the past six months.
178
+ * @param {string} browseNodeId A browse node ID is a unique identifier of a browse node. A browse node is a named location in a browse tree that is used for navigation, product classification, and website content.
179
+ * @param {string} marketplaceId The marketplace ID is the globally unique identifier of a marketplace. For more information, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
180
+ * @param {*} [options] Override http request option.
181
+ * @throws {RequiredError}
182
+ */
183
+ getBrowseNodeReviewTrends: async (browseNodeId, marketplaceId, options = {}) => {
184
+ assertParamExists("getBrowseNodeReviewTrends", "browseNodeId", browseNodeId);
185
+ assertParamExists("getBrowseNodeReviewTrends", "marketplaceId", marketplaceId);
186
+ const localVarPath = `/customerFeedback/2024-06-01/browseNodes/{browseNodeId}/reviews/trends`.replace("{browseNodeId}", encodeURIComponent(String(browseNodeId)));
187
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
188
+ let baseOptions;
189
+ if (configuration) baseOptions = configuration.baseOptions;
190
+ const localVarRequestOptions = {
191
+ method: "GET",
192
+ ...baseOptions,
193
+ ...options
194
+ };
195
+ const localVarHeaderParameter = {};
196
+ const localVarQueryParameter = {};
197
+ if (marketplaceId !== void 0) localVarQueryParameter["marketplaceId"] = marketplaceId;
198
+ localVarHeaderParameter["Accept"] = "application/json";
199
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
200
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
201
+ localVarRequestOptions.headers = {
202
+ ...localVarHeaderParameter,
203
+ ...headersFromBaseOptions,
204
+ ...options.headers
205
+ };
206
+ return {
207
+ url: toPathString(localVarUrlObj),
208
+ options: localVarRequestOptions
209
+ };
210
+ },
211
+ /**
212
+ * This API returns the associated browse node of the requested ASIN. A browse node is a location in a browse tree that is used for navigation, product classification, and website content on the Amazon retail website.
213
+ * @param {string} asin The Amazon Standard Identification Number (ASIN) is the unique identifier of a product within a marketplace.
214
+ * @param {string} marketplaceId The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids.
215
+ * @param {*} [options] Override http request option.
216
+ * @throws {RequiredError}
217
+ */
218
+ getItemBrowseNode: async (asin, marketplaceId, options = {}) => {
219
+ assertParamExists("getItemBrowseNode", "asin", asin);
220
+ assertParamExists("getItemBrowseNode", "marketplaceId", marketplaceId);
221
+ const localVarPath = `/customerFeedback/2024-06-01/items/{asin}/browseNode`.replace("{asin}", encodeURIComponent(String(asin)));
222
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
223
+ let baseOptions;
224
+ if (configuration) baseOptions = configuration.baseOptions;
225
+ const localVarRequestOptions = {
226
+ method: "GET",
227
+ ...baseOptions,
228
+ ...options
229
+ };
230
+ const localVarHeaderParameter = {};
231
+ const localVarQueryParameter = {};
232
+ if (marketplaceId !== void 0) localVarQueryParameter["marketplaceId"] = marketplaceId;
233
+ localVarHeaderParameter["Accept"] = "application/json";
234
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
235
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
236
+ localVarRequestOptions.headers = {
237
+ ...localVarHeaderParameter,
238
+ ...headersFromBaseOptions,
239
+ ...options.headers
240
+ };
241
+ return {
242
+ url: toPathString(localVarUrlObj),
243
+ options: localVarRequestOptions
244
+ };
245
+ },
246
+ /**
247
+ * Retrieve an item\'s ten most positive and ten most negative review topics.
248
+ * @param {string} asin The Amazon Standard Identification Number (ASIN) is the unique identifier of a product within a marketplace. The value must be a child ASIN.
249
+ * @param {string} marketplaceId The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids.
250
+ * @param {string} sortBy The metric by which to sort data in the response.
251
+ * @param {*} [options] Override http request option.
252
+ * @throws {RequiredError}
253
+ */
254
+ getItemReviewTopics: async (asin, marketplaceId, sortBy, options = {}) => {
255
+ assertParamExists("getItemReviewTopics", "asin", asin);
256
+ assertParamExists("getItemReviewTopics", "marketplaceId", marketplaceId);
257
+ assertParamExists("getItemReviewTopics", "sortBy", sortBy);
258
+ const localVarPath = `/customerFeedback/2024-06-01/items/{asin}/reviews/topics`.replace("{asin}", encodeURIComponent(String(asin)));
259
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
260
+ let baseOptions;
261
+ if (configuration) baseOptions = configuration.baseOptions;
262
+ const localVarRequestOptions = {
263
+ method: "GET",
264
+ ...baseOptions,
265
+ ...options
266
+ };
267
+ const localVarHeaderParameter = {};
268
+ const localVarQueryParameter = {};
269
+ if (marketplaceId !== void 0) localVarQueryParameter["marketplaceId"] = marketplaceId;
270
+ if (sortBy !== void 0) localVarQueryParameter["sortBy"] = sortBy;
271
+ localVarHeaderParameter["Accept"] = "application/json";
272
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
273
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
274
+ localVarRequestOptions.headers = {
275
+ ...localVarHeaderParameter,
276
+ ...headersFromBaseOptions,
277
+ ...options.headers
278
+ };
279
+ return {
280
+ url: toPathString(localVarUrlObj),
281
+ options: localVarRequestOptions
282
+ };
283
+ },
284
+ /**
285
+ * Retrieve an item\'s positive and negative review trends for the past six months.
286
+ * @param {string} asin The Amazon Standard Identification Number (ASIN) is the unique identifier of a product within a marketplace. This API takes child ASIN as an input.
287
+ * @param {string} marketplaceId The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids.
288
+ * @param {*} [options] Override http request option.
289
+ * @throws {RequiredError}
290
+ */
291
+ getItemReviewTrends: async (asin, marketplaceId, options = {}) => {
292
+ assertParamExists("getItemReviewTrends", "asin", asin);
293
+ assertParamExists("getItemReviewTrends", "marketplaceId", marketplaceId);
294
+ const localVarPath = `/customerFeedback/2024-06-01/items/{asin}/reviews/trends`.replace("{asin}", encodeURIComponent(String(asin)));
295
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
296
+ let baseOptions;
297
+ if (configuration) baseOptions = configuration.baseOptions;
298
+ const localVarRequestOptions = {
299
+ method: "GET",
300
+ ...baseOptions,
301
+ ...options
302
+ };
303
+ const localVarHeaderParameter = {};
304
+ const localVarQueryParameter = {};
305
+ if (marketplaceId !== void 0) localVarQueryParameter["marketplaceId"] = marketplaceId;
306
+ localVarHeaderParameter["Accept"] = "application/json";
307
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
308
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
309
+ localVarRequestOptions.headers = {
310
+ ...localVarHeaderParameter,
311
+ ...headersFromBaseOptions,
312
+ ...options.headers
313
+ };
314
+ return {
315
+ url: toPathString(localVarUrlObj),
316
+ options: localVarRequestOptions
317
+ };
318
+ }
319
+ };
304
320
  };
305
- var CustomerFeedbackApiFp = function(configuration) {
306
- const localVarAxiosParamCreator = CustomerFeedbackApiAxiosParamCreator(configuration);
307
- return {
308
- /**
309
- * Retrieve the topics that customers mention when they return items in a browse node.
310
- * @param {string} browseNodeId A browse node ID is a unique identifier for a browse node. A browse node is a named location in a browse tree that is used for navigation, product classification, and website content.
311
- * @param {string} marketplaceId The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids.
312
- * @param {*} [options] Override http request option.
313
- * @throws {RequiredError}
314
- */
315
- async getBrowseNodeReturnTopics(browseNodeId, marketplaceId, options) {
316
- const localVarAxiosArgs = await localVarAxiosParamCreator.getBrowseNodeReturnTopics(browseNodeId, marketplaceId, options);
317
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
318
- const localVarOperationServerBasePath = operationServerMap["CustomerFeedbackApi.getBrowseNodeReturnTopics"]?.[localVarOperationServerIndex]?.url;
319
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
320
- },
321
- /**
322
- * Retrieve the trends of topics that customers mention when they return items in a browse node.
323
- * @param {string} browseNodeId A browse node ID is a unique identifier of a browse node. A browse node is a named location in a browse tree that is used for navigation, product classification, and website content.
324
- * @param {string} marketplaceId The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids.
325
- * @param {*} [options] Override http request option.
326
- * @throws {RequiredError}
327
- */
328
- async getBrowseNodeReturnTrends(browseNodeId, marketplaceId, options) {
329
- const localVarAxiosArgs = await localVarAxiosParamCreator.getBrowseNodeReturnTrends(browseNodeId, marketplaceId, options);
330
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
331
- const localVarOperationServerBasePath = operationServerMap["CustomerFeedbackApi.getBrowseNodeReturnTrends"]?.[localVarOperationServerIndex]?.url;
332
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
333
- },
334
- /**
335
- * Retrieve a browse node\'s ten most positive and ten most negative review topics.
336
- * @param {string} browseNodeId The ID of a browse node. A browse node is a named location in a browse tree that is used for navigation, product classification, and website content.
337
- * @param {string} marketplaceId The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids.
338
- * @param {string} sortBy The metric by which to sort the data in the response.
339
- * @param {*} [options] Override http request option.
340
- * @throws {RequiredError}
341
- */
342
- async getBrowseNodeReviewTopics(browseNodeId, marketplaceId, sortBy, options) {
343
- const localVarAxiosArgs = await localVarAxiosParamCreator.getBrowseNodeReviewTopics(browseNodeId, marketplaceId, sortBy, options);
344
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
345
- const localVarOperationServerBasePath = operationServerMap["CustomerFeedbackApi.getBrowseNodeReviewTopics"]?.[localVarOperationServerIndex]?.url;
346
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
347
- },
348
- /**
349
- * Retrieve the positive and negative review trends of items in a browse node for the past six months.
350
- * @param {string} browseNodeId A browse node ID is a unique identifier of a browse node. A browse node is a named location in a browse tree that is used for navigation, product classification, and website content.
351
- * @param {string} marketplaceId The marketplace ID is the globally unique identifier of a marketplace. For more information, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
352
- * @param {*} [options] Override http request option.
353
- * @throws {RequiredError}
354
- */
355
- async getBrowseNodeReviewTrends(browseNodeId, marketplaceId, options) {
356
- const localVarAxiosArgs = await localVarAxiosParamCreator.getBrowseNodeReviewTrends(browseNodeId, marketplaceId, options);
357
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
358
- const localVarOperationServerBasePath = operationServerMap["CustomerFeedbackApi.getBrowseNodeReviewTrends"]?.[localVarOperationServerIndex]?.url;
359
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
360
- },
361
- /**
362
- * This API returns the associated browse node of the requested ASIN. A browse node is a location in a browse tree that is used for navigation, product classification, and website content on the Amazon retail website.
363
- * @param {string} asin The Amazon Standard Identification Number (ASIN) is the unique identifier of a product within a marketplace.
364
- * @param {string} marketplaceId The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids.
365
- * @param {*} [options] Override http request option.
366
- * @throws {RequiredError}
367
- */
368
- async getItemBrowseNode(asin, marketplaceId, options) {
369
- const localVarAxiosArgs = await localVarAxiosParamCreator.getItemBrowseNode(asin, marketplaceId, options);
370
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
371
- const localVarOperationServerBasePath = operationServerMap["CustomerFeedbackApi.getItemBrowseNode"]?.[localVarOperationServerIndex]?.url;
372
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
373
- },
374
- /**
375
- * Retrieve an item\'s ten most positive and ten most negative review topics.
376
- * @param {string} asin The Amazon Standard Identification Number (ASIN) is the unique identifier of a product within a marketplace. The value must be a child ASIN.
377
- * @param {string} marketplaceId The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids.
378
- * @param {string} sortBy The metric by which to sort data in the response.
379
- * @param {*} [options] Override http request option.
380
- * @throws {RequiredError}
381
- */
382
- async getItemReviewTopics(asin, marketplaceId, sortBy, options) {
383
- const localVarAxiosArgs = await localVarAxiosParamCreator.getItemReviewTopics(asin, marketplaceId, sortBy, options);
384
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
385
- const localVarOperationServerBasePath = operationServerMap["CustomerFeedbackApi.getItemReviewTopics"]?.[localVarOperationServerIndex]?.url;
386
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
387
- },
388
- /**
389
- * Retrieve an item\'s positive and negative review trends for the past six months.
390
- * @param {string} asin The Amazon Standard Identification Number (ASIN) is the unique identifier of a product within a marketplace. This API takes child ASIN as an input.
391
- * @param {string} marketplaceId The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids.
392
- * @param {*} [options] Override http request option.
393
- * @throws {RequiredError}
394
- */
395
- async getItemReviewTrends(asin, marketplaceId, options) {
396
- const localVarAxiosArgs = await localVarAxiosParamCreator.getItemReviewTrends(asin, marketplaceId, options);
397
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
398
- const localVarOperationServerBasePath = operationServerMap["CustomerFeedbackApi.getItemReviewTrends"]?.[localVarOperationServerIndex]?.url;
399
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
400
- }
401
- };
321
+ /**
322
+ * CustomerFeedbackApi - functional programming interface
323
+ */
324
+ const CustomerFeedbackApiFp = function(configuration) {
325
+ const localVarAxiosParamCreator = CustomerFeedbackApiAxiosParamCreator(configuration);
326
+ return {
327
+ /**
328
+ * Retrieve the topics that customers mention when they return items in a browse node.
329
+ * @param {string} browseNodeId A browse node ID is a unique identifier for a browse node. A browse node is a named location in a browse tree that is used for navigation, product classification, and website content.
330
+ * @param {string} marketplaceId The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids.
331
+ * @param {*} [options] Override http request option.
332
+ * @throws {RequiredError}
333
+ */
334
+ async getBrowseNodeReturnTopics(browseNodeId, marketplaceId, options) {
335
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getBrowseNodeReturnTopics(browseNodeId, marketplaceId, options);
336
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
337
+ const localVarOperationServerBasePath = operationServerMap["CustomerFeedbackApi.getBrowseNodeReturnTopics"]?.[localVarOperationServerIndex]?.url;
338
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
339
+ },
340
+ /**
341
+ * Retrieve the trends of topics that customers mention when they return items in a browse node.
342
+ * @param {string} browseNodeId A browse node ID is a unique identifier of a browse node. A browse node is a named location in a browse tree that is used for navigation, product classification, and website content.
343
+ * @param {string} marketplaceId The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids.
344
+ * @param {*} [options] Override http request option.
345
+ * @throws {RequiredError}
346
+ */
347
+ async getBrowseNodeReturnTrends(browseNodeId, marketplaceId, options) {
348
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getBrowseNodeReturnTrends(browseNodeId, marketplaceId, options);
349
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
350
+ const localVarOperationServerBasePath = operationServerMap["CustomerFeedbackApi.getBrowseNodeReturnTrends"]?.[localVarOperationServerIndex]?.url;
351
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
352
+ },
353
+ /**
354
+ * Retrieve a browse node\'s ten most positive and ten most negative review topics.
355
+ * @param {string} browseNodeId The ID of a browse node. A browse node is a named location in a browse tree that is used for navigation, product classification, and website content.
356
+ * @param {string} marketplaceId The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids.
357
+ * @param {string} sortBy The metric by which to sort the data in the response.
358
+ * @param {*} [options] Override http request option.
359
+ * @throws {RequiredError}
360
+ */
361
+ async getBrowseNodeReviewTopics(browseNodeId, marketplaceId, sortBy, options) {
362
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getBrowseNodeReviewTopics(browseNodeId, marketplaceId, sortBy, options);
363
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
364
+ const localVarOperationServerBasePath = operationServerMap["CustomerFeedbackApi.getBrowseNodeReviewTopics"]?.[localVarOperationServerIndex]?.url;
365
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
366
+ },
367
+ /**
368
+ * Retrieve the positive and negative review trends of items in a browse node for the past six months.
369
+ * @param {string} browseNodeId A browse node ID is a unique identifier of a browse node. A browse node is a named location in a browse tree that is used for navigation, product classification, and website content.
370
+ * @param {string} marketplaceId The marketplace ID is the globally unique identifier of a marketplace. For more information, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
371
+ * @param {*} [options] Override http request option.
372
+ * @throws {RequiredError}
373
+ */
374
+ async getBrowseNodeReviewTrends(browseNodeId, marketplaceId, options) {
375
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getBrowseNodeReviewTrends(browseNodeId, marketplaceId, options);
376
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
377
+ const localVarOperationServerBasePath = operationServerMap["CustomerFeedbackApi.getBrowseNodeReviewTrends"]?.[localVarOperationServerIndex]?.url;
378
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
379
+ },
380
+ /**
381
+ * This API returns the associated browse node of the requested ASIN. A browse node is a location in a browse tree that is used for navigation, product classification, and website content on the Amazon retail website.
382
+ * @param {string} asin The Amazon Standard Identification Number (ASIN) is the unique identifier of a product within a marketplace.
383
+ * @param {string} marketplaceId The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids.
384
+ * @param {*} [options] Override http request option.
385
+ * @throws {RequiredError}
386
+ */
387
+ async getItemBrowseNode(asin, marketplaceId, options) {
388
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getItemBrowseNode(asin, marketplaceId, options);
389
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
390
+ const localVarOperationServerBasePath = operationServerMap["CustomerFeedbackApi.getItemBrowseNode"]?.[localVarOperationServerIndex]?.url;
391
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
392
+ },
393
+ /**
394
+ * Retrieve an item\'s ten most positive and ten most negative review topics.
395
+ * @param {string} asin The Amazon Standard Identification Number (ASIN) is the unique identifier of a product within a marketplace. The value must be a child ASIN.
396
+ * @param {string} marketplaceId The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids.
397
+ * @param {string} sortBy The metric by which to sort data in the response.
398
+ * @param {*} [options] Override http request option.
399
+ * @throws {RequiredError}
400
+ */
401
+ async getItemReviewTopics(asin, marketplaceId, sortBy, options) {
402
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getItemReviewTopics(asin, marketplaceId, sortBy, options);
403
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
404
+ const localVarOperationServerBasePath = operationServerMap["CustomerFeedbackApi.getItemReviewTopics"]?.[localVarOperationServerIndex]?.url;
405
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
406
+ },
407
+ /**
408
+ * Retrieve an item\'s positive and negative review trends for the past six months.
409
+ * @param {string} asin The Amazon Standard Identification Number (ASIN) is the unique identifier of a product within a marketplace. This API takes child ASIN as an input.
410
+ * @param {string} marketplaceId The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids.
411
+ * @param {*} [options] Override http request option.
412
+ * @throws {RequiredError}
413
+ */
414
+ async getItemReviewTrends(asin, marketplaceId, options) {
415
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getItemReviewTrends(asin, marketplaceId, options);
416
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
417
+ const localVarOperationServerBasePath = operationServerMap["CustomerFeedbackApi.getItemReviewTrends"]?.[localVarOperationServerIndex]?.url;
418
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
419
+ }
420
+ };
402
421
  };
403
- var CustomerFeedbackApiFactory = function(configuration, basePath, axios) {
404
- const localVarFp = CustomerFeedbackApiFp(configuration);
405
- return {
406
- /**
407
- * Retrieve the topics that customers mention when they return items in a browse node.
408
- * @param {CustomerFeedbackApiGetBrowseNodeReturnTopicsRequest} requestParameters Request parameters.
409
- * @param {*} [options] Override http request option.
410
- * @throws {RequiredError}
411
- */
412
- getBrowseNodeReturnTopics(requestParameters, options) {
413
- return localVarFp.getBrowseNodeReturnTopics(requestParameters.browseNodeId, requestParameters.marketplaceId, options).then((request) => request(axios, basePath));
414
- },
415
- /**
416
- * Retrieve the trends of topics that customers mention when they return items in a browse node.
417
- * @param {CustomerFeedbackApiGetBrowseNodeReturnTrendsRequest} requestParameters Request parameters.
418
- * @param {*} [options] Override http request option.
419
- * @throws {RequiredError}
420
- */
421
- getBrowseNodeReturnTrends(requestParameters, options) {
422
- return localVarFp.getBrowseNodeReturnTrends(requestParameters.browseNodeId, requestParameters.marketplaceId, options).then((request) => request(axios, basePath));
423
- },
424
- /**
425
- * Retrieve a browse node\'s ten most positive and ten most negative review topics.
426
- * @param {CustomerFeedbackApiGetBrowseNodeReviewTopicsRequest} requestParameters Request parameters.
427
- * @param {*} [options] Override http request option.
428
- * @throws {RequiredError}
429
- */
430
- getBrowseNodeReviewTopics(requestParameters, options) {
431
- return localVarFp.getBrowseNodeReviewTopics(requestParameters.browseNodeId, requestParameters.marketplaceId, requestParameters.sortBy, options).then((request) => request(axios, basePath));
432
- },
433
- /**
434
- * Retrieve the positive and negative review trends of items in a browse node for the past six months.
435
- * @param {CustomerFeedbackApiGetBrowseNodeReviewTrendsRequest} requestParameters Request parameters.
436
- * @param {*} [options] Override http request option.
437
- * @throws {RequiredError}
438
- */
439
- getBrowseNodeReviewTrends(requestParameters, options) {
440
- return localVarFp.getBrowseNodeReviewTrends(requestParameters.browseNodeId, requestParameters.marketplaceId, options).then((request) => request(axios, basePath));
441
- },
442
- /**
443
- * This API returns the associated browse node of the requested ASIN. A browse node is a location in a browse tree that is used for navigation, product classification, and website content on the Amazon retail website.
444
- * @param {CustomerFeedbackApiGetItemBrowseNodeRequest} requestParameters Request parameters.
445
- * @param {*} [options] Override http request option.
446
- * @throws {RequiredError}
447
- */
448
- getItemBrowseNode(requestParameters, options) {
449
- return localVarFp.getItemBrowseNode(requestParameters.asin, requestParameters.marketplaceId, options).then((request) => request(axios, basePath));
450
- },
451
- /**
452
- * Retrieve an item\'s ten most positive and ten most negative review topics.
453
- * @param {CustomerFeedbackApiGetItemReviewTopicsRequest} requestParameters Request parameters.
454
- * @param {*} [options] Override http request option.
455
- * @throws {RequiredError}
456
- */
457
- getItemReviewTopics(requestParameters, options) {
458
- return localVarFp.getItemReviewTopics(requestParameters.asin, requestParameters.marketplaceId, requestParameters.sortBy, options).then((request) => request(axios, basePath));
459
- },
460
- /**
461
- * Retrieve an item\'s positive and negative review trends for the past six months.
462
- * @param {CustomerFeedbackApiGetItemReviewTrendsRequest} requestParameters Request parameters.
463
- * @param {*} [options] Override http request option.
464
- * @throws {RequiredError}
465
- */
466
- getItemReviewTrends(requestParameters, options) {
467
- return localVarFp.getItemReviewTrends(requestParameters.asin, requestParameters.marketplaceId, options).then((request) => request(axios, basePath));
468
- }
469
- };
422
+ /**
423
+ * CustomerFeedbackApi - factory interface
424
+ */
425
+ const CustomerFeedbackApiFactory = function(configuration, basePath, axios) {
426
+ const localVarFp = CustomerFeedbackApiFp(configuration);
427
+ return {
428
+ /**
429
+ * Retrieve the topics that customers mention when they return items in a browse node.
430
+ * @param {CustomerFeedbackApiGetBrowseNodeReturnTopicsRequest} requestParameters Request parameters.
431
+ * @param {*} [options] Override http request option.
432
+ * @throws {RequiredError}
433
+ */
434
+ getBrowseNodeReturnTopics(requestParameters, options) {
435
+ return localVarFp.getBrowseNodeReturnTopics(requestParameters.browseNodeId, requestParameters.marketplaceId, options).then((request) => request(axios, basePath));
436
+ },
437
+ /**
438
+ * Retrieve the trends of topics that customers mention when they return items in a browse node.
439
+ * @param {CustomerFeedbackApiGetBrowseNodeReturnTrendsRequest} requestParameters Request parameters.
440
+ * @param {*} [options] Override http request option.
441
+ * @throws {RequiredError}
442
+ */
443
+ getBrowseNodeReturnTrends(requestParameters, options) {
444
+ return localVarFp.getBrowseNodeReturnTrends(requestParameters.browseNodeId, requestParameters.marketplaceId, options).then((request) => request(axios, basePath));
445
+ },
446
+ /**
447
+ * Retrieve a browse node\'s ten most positive and ten most negative review topics.
448
+ * @param {CustomerFeedbackApiGetBrowseNodeReviewTopicsRequest} requestParameters Request parameters.
449
+ * @param {*} [options] Override http request option.
450
+ * @throws {RequiredError}
451
+ */
452
+ getBrowseNodeReviewTopics(requestParameters, options) {
453
+ return localVarFp.getBrowseNodeReviewTopics(requestParameters.browseNodeId, requestParameters.marketplaceId, requestParameters.sortBy, options).then((request) => request(axios, basePath));
454
+ },
455
+ /**
456
+ * Retrieve the positive and negative review trends of items in a browse node for the past six months.
457
+ * @param {CustomerFeedbackApiGetBrowseNodeReviewTrendsRequest} requestParameters Request parameters.
458
+ * @param {*} [options] Override http request option.
459
+ * @throws {RequiredError}
460
+ */
461
+ getBrowseNodeReviewTrends(requestParameters, options) {
462
+ return localVarFp.getBrowseNodeReviewTrends(requestParameters.browseNodeId, requestParameters.marketplaceId, options).then((request) => request(axios, basePath));
463
+ },
464
+ /**
465
+ * This API returns the associated browse node of the requested ASIN. A browse node is a location in a browse tree that is used for navigation, product classification, and website content on the Amazon retail website.
466
+ * @param {CustomerFeedbackApiGetItemBrowseNodeRequest} requestParameters Request parameters.
467
+ * @param {*} [options] Override http request option.
468
+ * @throws {RequiredError}
469
+ */
470
+ getItemBrowseNode(requestParameters, options) {
471
+ return localVarFp.getItemBrowseNode(requestParameters.asin, requestParameters.marketplaceId, options).then((request) => request(axios, basePath));
472
+ },
473
+ /**
474
+ * Retrieve an item\'s ten most positive and ten most negative review topics.
475
+ * @param {CustomerFeedbackApiGetItemReviewTopicsRequest} requestParameters Request parameters.
476
+ * @param {*} [options] Override http request option.
477
+ * @throws {RequiredError}
478
+ */
479
+ getItemReviewTopics(requestParameters, options) {
480
+ return localVarFp.getItemReviewTopics(requestParameters.asin, requestParameters.marketplaceId, requestParameters.sortBy, options).then((request) => request(axios, basePath));
481
+ },
482
+ /**
483
+ * Retrieve an item\'s positive and negative review trends for the past six months.
484
+ * @param {CustomerFeedbackApiGetItemReviewTrendsRequest} requestParameters Request parameters.
485
+ * @param {*} [options] Override http request option.
486
+ * @throws {RequiredError}
487
+ */
488
+ getItemReviewTrends(requestParameters, options) {
489
+ return localVarFp.getItemReviewTrends(requestParameters.asin, requestParameters.marketplaceId, options).then((request) => request(axios, basePath));
490
+ }
491
+ };
470
492
  };
493
+ /**
494
+ * CustomerFeedbackApi - object-oriented interface
495
+ */
471
496
  var CustomerFeedbackApi = class extends BaseAPI {
472
- /**
473
- * Retrieve the topics that customers mention when they return items in a browse node.
474
- * @param {CustomerFeedbackApiGetBrowseNodeReturnTopicsRequest} requestParameters Request parameters.
475
- * @param {*} [options] Override http request option.
476
- * @throws {RequiredError}
477
- */
478
- getBrowseNodeReturnTopics(requestParameters, options) {
479
- return CustomerFeedbackApiFp(this.configuration).getBrowseNodeReturnTopics(requestParameters.browseNodeId, requestParameters.marketplaceId, options).then((request) => request(this.axios, this.basePath));
480
- }
481
- /**
482
- * Retrieve the trends of topics that customers mention when they return items in a browse node.
483
- * @param {CustomerFeedbackApiGetBrowseNodeReturnTrendsRequest} requestParameters Request parameters.
484
- * @param {*} [options] Override http request option.
485
- * @throws {RequiredError}
486
- */
487
- getBrowseNodeReturnTrends(requestParameters, options) {
488
- return CustomerFeedbackApiFp(this.configuration).getBrowseNodeReturnTrends(requestParameters.browseNodeId, requestParameters.marketplaceId, options).then((request) => request(this.axios, this.basePath));
489
- }
490
- /**
491
- * Retrieve a browse node\'s ten most positive and ten most negative review topics.
492
- * @param {CustomerFeedbackApiGetBrowseNodeReviewTopicsRequest} requestParameters Request parameters.
493
- * @param {*} [options] Override http request option.
494
- * @throws {RequiredError}
495
- */
496
- getBrowseNodeReviewTopics(requestParameters, options) {
497
- return CustomerFeedbackApiFp(this.configuration).getBrowseNodeReviewTopics(requestParameters.browseNodeId, requestParameters.marketplaceId, requestParameters.sortBy, options).then((request) => request(this.axios, this.basePath));
498
- }
499
- /**
500
- * Retrieve the positive and negative review trends of items in a browse node for the past six months.
501
- * @param {CustomerFeedbackApiGetBrowseNodeReviewTrendsRequest} requestParameters Request parameters.
502
- * @param {*} [options] Override http request option.
503
- * @throws {RequiredError}
504
- */
505
- getBrowseNodeReviewTrends(requestParameters, options) {
506
- return CustomerFeedbackApiFp(this.configuration).getBrowseNodeReviewTrends(requestParameters.browseNodeId, requestParameters.marketplaceId, options).then((request) => request(this.axios, this.basePath));
507
- }
508
- /**
509
- * This API returns the associated browse node of the requested ASIN. A browse node is a location in a browse tree that is used for navigation, product classification, and website content on the Amazon retail website.
510
- * @param {CustomerFeedbackApiGetItemBrowseNodeRequest} requestParameters Request parameters.
511
- * @param {*} [options] Override http request option.
512
- * @throws {RequiredError}
513
- */
514
- getItemBrowseNode(requestParameters, options) {
515
- return CustomerFeedbackApiFp(this.configuration).getItemBrowseNode(requestParameters.asin, requestParameters.marketplaceId, options).then((request) => request(this.axios, this.basePath));
516
- }
517
- /**
518
- * Retrieve an item\'s ten most positive and ten most negative review topics.
519
- * @param {CustomerFeedbackApiGetItemReviewTopicsRequest} requestParameters Request parameters.
520
- * @param {*} [options] Override http request option.
521
- * @throws {RequiredError}
522
- */
523
- getItemReviewTopics(requestParameters, options) {
524
- return CustomerFeedbackApiFp(this.configuration).getItemReviewTopics(requestParameters.asin, requestParameters.marketplaceId, requestParameters.sortBy, options).then((request) => request(this.axios, this.basePath));
525
- }
526
- /**
527
- * Retrieve an item\'s positive and negative review trends for the past six months.
528
- * @param {CustomerFeedbackApiGetItemReviewTrendsRequest} requestParameters Request parameters.
529
- * @param {*} [options] Override http request option.
530
- * @throws {RequiredError}
531
- */
532
- getItemReviewTrends(requestParameters, options) {
533
- return CustomerFeedbackApiFp(this.configuration).getItemReviewTrends(requestParameters.asin, requestParameters.marketplaceId, options).then((request) => request(this.axios, this.basePath));
534
- }
497
+ /**
498
+ * Retrieve the topics that customers mention when they return items in a browse node.
499
+ * @param {CustomerFeedbackApiGetBrowseNodeReturnTopicsRequest} requestParameters Request parameters.
500
+ * @param {*} [options] Override http request option.
501
+ * @throws {RequiredError}
502
+ */
503
+ getBrowseNodeReturnTopics(requestParameters, options) {
504
+ return CustomerFeedbackApiFp(this.configuration).getBrowseNodeReturnTopics(requestParameters.browseNodeId, requestParameters.marketplaceId, options).then((request) => request(this.axios, this.basePath));
505
+ }
506
+ /**
507
+ * Retrieve the trends of topics that customers mention when they return items in a browse node.
508
+ * @param {CustomerFeedbackApiGetBrowseNodeReturnTrendsRequest} requestParameters Request parameters.
509
+ * @param {*} [options] Override http request option.
510
+ * @throws {RequiredError}
511
+ */
512
+ getBrowseNodeReturnTrends(requestParameters, options) {
513
+ return CustomerFeedbackApiFp(this.configuration).getBrowseNodeReturnTrends(requestParameters.browseNodeId, requestParameters.marketplaceId, options).then((request) => request(this.axios, this.basePath));
514
+ }
515
+ /**
516
+ * Retrieve a browse node\'s ten most positive and ten most negative review topics.
517
+ * @param {CustomerFeedbackApiGetBrowseNodeReviewTopicsRequest} requestParameters Request parameters.
518
+ * @param {*} [options] Override http request option.
519
+ * @throws {RequiredError}
520
+ */
521
+ getBrowseNodeReviewTopics(requestParameters, options) {
522
+ return CustomerFeedbackApiFp(this.configuration).getBrowseNodeReviewTopics(requestParameters.browseNodeId, requestParameters.marketplaceId, requestParameters.sortBy, options).then((request) => request(this.axios, this.basePath));
523
+ }
524
+ /**
525
+ * Retrieve the positive and negative review trends of items in a browse node for the past six months.
526
+ * @param {CustomerFeedbackApiGetBrowseNodeReviewTrendsRequest} requestParameters Request parameters.
527
+ * @param {*} [options] Override http request option.
528
+ * @throws {RequiredError}
529
+ */
530
+ getBrowseNodeReviewTrends(requestParameters, options) {
531
+ return CustomerFeedbackApiFp(this.configuration).getBrowseNodeReviewTrends(requestParameters.browseNodeId, requestParameters.marketplaceId, options).then((request) => request(this.axios, this.basePath));
532
+ }
533
+ /**
534
+ * This API returns the associated browse node of the requested ASIN. A browse node is a location in a browse tree that is used for navigation, product classification, and website content on the Amazon retail website.
535
+ * @param {CustomerFeedbackApiGetItemBrowseNodeRequest} requestParameters Request parameters.
536
+ * @param {*} [options] Override http request option.
537
+ * @throws {RequiredError}
538
+ */
539
+ getItemBrowseNode(requestParameters, options) {
540
+ return CustomerFeedbackApiFp(this.configuration).getItemBrowseNode(requestParameters.asin, requestParameters.marketplaceId, options).then((request) => request(this.axios, this.basePath));
541
+ }
542
+ /**
543
+ * Retrieve an item\'s ten most positive and ten most negative review topics.
544
+ * @param {CustomerFeedbackApiGetItemReviewTopicsRequest} requestParameters Request parameters.
545
+ * @param {*} [options] Override http request option.
546
+ * @throws {RequiredError}
547
+ */
548
+ getItemReviewTopics(requestParameters, options) {
549
+ return CustomerFeedbackApiFp(this.configuration).getItemReviewTopics(requestParameters.asin, requestParameters.marketplaceId, requestParameters.sortBy, options).then((request) => request(this.axios, this.basePath));
550
+ }
551
+ /**
552
+ * Retrieve an item\'s positive and negative review trends for the past six months.
553
+ * @param {CustomerFeedbackApiGetItemReviewTrendsRequest} requestParameters Request parameters.
554
+ * @param {*} [options] Override http request option.
555
+ * @throws {RequiredError}
556
+ */
557
+ getItemReviewTrends(requestParameters, options) {
558
+ return CustomerFeedbackApiFp(this.configuration).getItemReviewTrends(requestParameters.asin, requestParameters.marketplaceId, options).then((request) => request(this.axios, this.basePath));
559
+ }
535
560
  };
536
-
537
- // src/api-model/configuration.ts
561
+ //#endregion
562
+ //#region src/api-model/configuration.ts
538
563
  var Configuration = class {
539
- /**
540
- * parameter for apiKey security
541
- * @param name security name
542
- */
543
- apiKey;
544
- /**
545
- * parameter for basic security
546
- */
547
- username;
548
- /**
549
- * parameter for basic security
550
- */
551
- password;
552
- /**
553
- * parameter for oauth2 security
554
- * @param name security name
555
- * @param scopes oauth2 scope
556
- */
557
- accessToken;
558
- /**
559
- * parameter for aws4 signature security
560
- * @param {Object} AWS4Signature - AWS4 Signature security
561
- * @param {string} options.region - aws region
562
- * @param {string} options.service - name of the service.
563
- * @param {string} credentials.accessKeyId - aws access key id
564
- * @param {string} credentials.secretAccessKey - aws access key
565
- * @param {string} credentials.sessionToken - aws session token
566
- * @memberof Configuration
567
- */
568
- awsv4;
569
- /**
570
- * override base path
571
- */
572
- basePath;
573
- /**
574
- * override server index
575
- */
576
- serverIndex;
577
- /**
578
- * base options for axios calls
579
- */
580
- baseOptions;
581
- /**
582
- * The FormData constructor that will be used to create multipart form data
583
- * requests. You can inject this here so that execution environments that
584
- * do not support the FormData class can still run the generated client.
585
- *
586
- * @type {new () => FormData}
587
- */
588
- formDataCtor;
589
- constructor(param = {}) {
590
- this.apiKey = param.apiKey;
591
- this.username = param.username;
592
- this.password = param.password;
593
- this.accessToken = param.accessToken;
594
- this.awsv4 = param.awsv4;
595
- this.basePath = param.basePath;
596
- this.serverIndex = param.serverIndex;
597
- this.baseOptions = {
598
- ...param.baseOptions,
599
- headers: {
600
- ...param.baseOptions?.headers
601
- }
602
- };
603
- this.formDataCtor = param.formDataCtor;
604
- }
605
- /**
606
- * Check if the given MIME is a JSON MIME.
607
- * JSON MIME examples:
608
- * application/json
609
- * application/json; charset=UTF8
610
- * APPLICATION/JSON
611
- * application/vnd.company+json
612
- * @param mime - MIME (Multipurpose Internet Mail Extensions)
613
- * @return True if the given MIME is JSON, false otherwise.
614
- */
615
- isJsonMime(mime) {
616
- const jsonMime = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i;
617
- return mime !== null && jsonMime.test(mime);
618
- }
564
+ /**
565
+ * parameter for apiKey security
566
+ * @param name security name
567
+ */
568
+ apiKey;
569
+ /**
570
+ * parameter for basic security
571
+ */
572
+ username;
573
+ /**
574
+ * parameter for basic security
575
+ */
576
+ password;
577
+ /**
578
+ * parameter for oauth2 security
579
+ * @param name security name
580
+ * @param scopes oauth2 scope
581
+ */
582
+ accessToken;
583
+ /**
584
+ * parameter for aws4 signature security
585
+ * @param {Object} AWS4Signature - AWS4 Signature security
586
+ * @param {string} options.region - aws region
587
+ * @param {string} options.service - name of the service.
588
+ * @param {string} credentials.accessKeyId - aws access key id
589
+ * @param {string} credentials.secretAccessKey - aws access key
590
+ * @param {string} credentials.sessionToken - aws session token
591
+ * @memberof Configuration
592
+ */
593
+ awsv4;
594
+ /**
595
+ * override base path
596
+ */
597
+ basePath;
598
+ /**
599
+ * override server index
600
+ */
601
+ serverIndex;
602
+ /**
603
+ * base options for axios calls
604
+ */
605
+ baseOptions;
606
+ /**
607
+ * The FormData constructor that will be used to create multipart form data
608
+ * requests. You can inject this here so that execution environments that
609
+ * do not support the FormData class can still run the generated client.
610
+ *
611
+ * @type {new () => FormData}
612
+ */
613
+ formDataCtor;
614
+ constructor(param = {}) {
615
+ this.apiKey = param.apiKey;
616
+ this.username = param.username;
617
+ this.password = param.password;
618
+ this.accessToken = param.accessToken;
619
+ this.awsv4 = param.awsv4;
620
+ this.basePath = param.basePath;
621
+ this.serverIndex = param.serverIndex;
622
+ this.baseOptions = {
623
+ ...param.baseOptions,
624
+ headers: { ...param.baseOptions?.headers }
625
+ };
626
+ this.formDataCtor = param.formDataCtor;
627
+ }
628
+ /**
629
+ * Check if the given MIME is a JSON MIME.
630
+ * JSON MIME examples:
631
+ * application/json
632
+ * application/json; charset=UTF8
633
+ * APPLICATION/JSON
634
+ * application/vnd.company+json
635
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
636
+ * @return True if the given MIME is JSON, false otherwise.
637
+ */
638
+ isJsonMime(mime) {
639
+ return mime !== null && /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i.test(mime);
640
+ }
619
641
  };
620
-
621
- // src/client.ts
622
- var clientRateLimits = [];
642
+ //#endregion
643
+ //#region src/client.ts
644
+ const clientRateLimits = [];
623
645
  var CustomerFeedbackApiClient = class extends CustomerFeedbackApi {
624
- constructor(configuration) {
625
- const { axios, endpoint } = createAxiosInstance(configuration, clientRateLimits);
626
- super(new Configuration(), endpoint, axios);
627
- }
628
- };
629
- export {
630
- CustomerFeedbackApi,
631
- CustomerFeedbackApiAxiosParamCreator,
632
- CustomerFeedbackApiClient,
633
- CustomerFeedbackApiFactory,
634
- CustomerFeedbackApiFp,
635
- clientRateLimits
646
+ constructor(configuration) {
647
+ const { axios, endpoint } = createAxiosInstance(configuration, clientRateLimits);
648
+ super(new Configuration(), endpoint, axios);
649
+ }
636
650
  };
651
+ //#endregion
652
+ export { CustomerFeedbackApi, CustomerFeedbackApiAxiosParamCreator, CustomerFeedbackApiClient, CustomerFeedbackApiFactory, CustomerFeedbackApiFp, clientRateLimits };
653
+
637
654
  //# sourceMappingURL=index.js.map