@sp-api-sdk/fba-inbound-eligibility-api-v1 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,331 +1,314 @@
1
- // src/client.ts
2
1
  import { createAxiosInstance } from "@sp-api-sdk/common";
3
-
4
- // src/api-model/api/fba-inbound-eligibility-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/fba-inbound-eligibility-api.ts
80
- var FbaInboundEligibilityApiAxiosParamCreator = function(configuration) {
81
- return {
82
- /**
83
- * This operation gets an eligibility preview for an item that you specify. You can specify the type of eligibility preview that you want (INBOUND or COMMINGLING). For INBOUND previews, you can specify the marketplace in which you want to determine the item\'s eligibility. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
84
- * @param {string} asin The ASIN of the item for which you want an eligibility preview.
85
- * @param {GetItemEligibilityPreviewProgramEnum} program The program that you want to check eligibility against.
86
- * @param {Array<string>} [marketplaceIds] The identifier for the marketplace in which you want to determine eligibility. Required only when program&#x3D;INBOUND.
87
- * @param {*} [options] Override http request option.
88
- * @throws {RequiredError}
89
- */
90
- getItemEligibilityPreview: async (asin, program, marketplaceIds, options = {}) => {
91
- assertParamExists("getItemEligibilityPreview", "asin", asin);
92
- assertParamExists("getItemEligibilityPreview", "program", program);
93
- const localVarPath = `/fba/inbound/v1/eligibility/itemPreview`;
94
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
95
- let baseOptions;
96
- if (configuration) {
97
- baseOptions = configuration.baseOptions;
98
- }
99
- const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
100
- const localVarHeaderParameter = {};
101
- const localVarQueryParameter = {};
102
- if (marketplaceIds) {
103
- localVarQueryParameter["marketplaceIds"] = marketplaceIds.join(COLLECTION_FORMATS.csv);
104
- }
105
- if (asin !== void 0) {
106
- localVarQueryParameter["asin"] = asin;
107
- }
108
- if (program !== void 0) {
109
- localVarQueryParameter["program"] = program;
110
- }
111
- localVarHeaderParameter["Accept"] = "application/json,ItemEligibilityPreview";
112
- setSearchParams(localVarUrlObj, localVarQueryParameter);
113
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
114
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
115
- return {
116
- url: toPathString(localVarUrlObj),
117
- options: localVarRequestOptions
118
- };
119
- }
120
- };
67
+ //#endregion
68
+ //#region src/api-model/api/fba-inbound-eligibility-api.ts
69
+ /**
70
+ * FbaInboundEligibilityApi - axios parameter creator
71
+ */
72
+ const FbaInboundEligibilityApiAxiosParamCreator = function(configuration) {
73
+ return {
74
+ /**
75
+ * This operation gets an eligibility preview for an item that you specify. You can specify the type of eligibility preview that you want (INBOUND or COMMINGLING). For INBOUND previews, you can specify the marketplace in which you want to determine the item\'s eligibility. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
76
+ * @param {string} asin The ASIN of the item for which you want an eligibility preview.
77
+ * @param {GetItemEligibilityPreviewProgramEnum} program The program that you want to check eligibility against.
78
+ * @param {Array<string>} [marketplaceIds] The identifier for the marketplace in which you want to determine eligibility. Required only when program&#x3D;INBOUND.
79
+ * @param {*} [options] Override http request option.
80
+ * @throws {RequiredError}
81
+ */
82
+ getItemEligibilityPreview: async (asin, program, marketplaceIds, options = {}) => {
83
+ assertParamExists("getItemEligibilityPreview", "asin", asin);
84
+ assertParamExists("getItemEligibilityPreview", "program", program);
85
+ const localVarUrlObj = new URL(`/fba/inbound/v1/eligibility/itemPreview`, DUMMY_BASE_URL);
86
+ let baseOptions;
87
+ if (configuration) baseOptions = configuration.baseOptions;
88
+ const localVarRequestOptions = {
89
+ method: "GET",
90
+ ...baseOptions,
91
+ ...options
92
+ };
93
+ const localVarHeaderParameter = {};
94
+ const localVarQueryParameter = {};
95
+ if (marketplaceIds) localVarQueryParameter["marketplaceIds"] = marketplaceIds.join(COLLECTION_FORMATS.csv);
96
+ if (asin !== void 0) localVarQueryParameter["asin"] = asin;
97
+ if (program !== void 0) localVarQueryParameter["program"] = program;
98
+ localVarHeaderParameter["Accept"] = "application/json,ItemEligibilityPreview";
99
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
100
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
101
+ localVarRequestOptions.headers = {
102
+ ...localVarHeaderParameter,
103
+ ...headersFromBaseOptions,
104
+ ...options.headers
105
+ };
106
+ return {
107
+ url: toPathString(localVarUrlObj),
108
+ options: localVarRequestOptions
109
+ };
110
+ } };
121
111
  };
122
- var FbaInboundEligibilityApiFp = function(configuration) {
123
- const localVarAxiosParamCreator = FbaInboundEligibilityApiAxiosParamCreator(configuration);
124
- return {
125
- /**
126
- * This operation gets an eligibility preview for an item that you specify. You can specify the type of eligibility preview that you want (INBOUND or COMMINGLING). For INBOUND previews, you can specify the marketplace in which you want to determine the item\'s eligibility. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
127
- * @param {string} asin The ASIN of the item for which you want an eligibility preview.
128
- * @param {GetItemEligibilityPreviewProgramEnum} program The program that you want to check eligibility against.
129
- * @param {Array<string>} [marketplaceIds] The identifier for the marketplace in which you want to determine eligibility. Required only when program&#x3D;INBOUND.
130
- * @param {*} [options] Override http request option.
131
- * @throws {RequiredError}
132
- */
133
- async getItemEligibilityPreview(asin, program, marketplaceIds, options) {
134
- const localVarAxiosArgs = await localVarAxiosParamCreator.getItemEligibilityPreview(asin, program, marketplaceIds, options);
135
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
136
- const localVarOperationServerBasePath = operationServerMap["FbaInboundEligibilityApi.getItemEligibilityPreview"]?.[localVarOperationServerIndex]?.url;
137
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
138
- }
139
- };
112
+ /**
113
+ * FbaInboundEligibilityApi - functional programming interface
114
+ */
115
+ const FbaInboundEligibilityApiFp = function(configuration) {
116
+ const localVarAxiosParamCreator = FbaInboundEligibilityApiAxiosParamCreator(configuration);
117
+ return {
118
+ /**
119
+ * This operation gets an eligibility preview for an item that you specify. You can specify the type of eligibility preview that you want (INBOUND or COMMINGLING). For INBOUND previews, you can specify the marketplace in which you want to determine the item\'s eligibility. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
120
+ * @param {string} asin The ASIN of the item for which you want an eligibility preview.
121
+ * @param {GetItemEligibilityPreviewProgramEnum} program The program that you want to check eligibility against.
122
+ * @param {Array<string>} [marketplaceIds] The identifier for the marketplace in which you want to determine eligibility. Required only when program&#x3D;INBOUND.
123
+ * @param {*} [options] Override http request option.
124
+ * @throws {RequiredError}
125
+ */
126
+ async getItemEligibilityPreview(asin, program, marketplaceIds, options) {
127
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getItemEligibilityPreview(asin, program, marketplaceIds, options);
128
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
129
+ const localVarOperationServerBasePath = operationServerMap["FbaInboundEligibilityApi.getItemEligibilityPreview"]?.[localVarOperationServerIndex]?.url;
130
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
131
+ } };
140
132
  };
141
- var FbaInboundEligibilityApiFactory = function(configuration, basePath, axios) {
142
- const localVarFp = FbaInboundEligibilityApiFp(configuration);
143
- return {
144
- /**
145
- * This operation gets an eligibility preview for an item that you specify. You can specify the type of eligibility preview that you want (INBOUND or COMMINGLING). For INBOUND previews, you can specify the marketplace in which you want to determine the item\'s eligibility. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
146
- * @param {FbaInboundEligibilityApiGetItemEligibilityPreviewRequest} requestParameters Request parameters.
147
- * @param {*} [options] Override http request option.
148
- * @throws {RequiredError}
149
- */
150
- getItemEligibilityPreview(requestParameters, options) {
151
- return localVarFp.getItemEligibilityPreview(requestParameters.asin, requestParameters.program, requestParameters.marketplaceIds, options).then((request) => request(axios, basePath));
152
- }
153
- };
133
+ /**
134
+ * FbaInboundEligibilityApi - factory interface
135
+ */
136
+ const FbaInboundEligibilityApiFactory = function(configuration, basePath, axios) {
137
+ const localVarFp = FbaInboundEligibilityApiFp(configuration);
138
+ return {
139
+ /**
140
+ * This operation gets an eligibility preview for an item that you specify. You can specify the type of eligibility preview that you want (INBOUND or COMMINGLING). For INBOUND previews, you can specify the marketplace in which you want to determine the item\'s eligibility. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
141
+ * @param {FbaInboundEligibilityApiGetItemEligibilityPreviewRequest} requestParameters Request parameters.
142
+ * @param {*} [options] Override http request option.
143
+ * @throws {RequiredError}
144
+ */
145
+ getItemEligibilityPreview(requestParameters, options) {
146
+ return localVarFp.getItemEligibilityPreview(requestParameters.asin, requestParameters.program, requestParameters.marketplaceIds, options).then((request) => request(axios, basePath));
147
+ } };
154
148
  };
149
+ /**
150
+ * FbaInboundEligibilityApi - object-oriented interface
151
+ */
155
152
  var FbaInboundEligibilityApi = class extends BaseAPI {
156
- /**
157
- * This operation gets an eligibility preview for an item that you specify. You can specify the type of eligibility preview that you want (INBOUND or COMMINGLING). For INBOUND previews, you can specify the marketplace in which you want to determine the item\'s eligibility. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
158
- * @param {FbaInboundEligibilityApiGetItemEligibilityPreviewRequest} requestParameters Request parameters.
159
- * @param {*} [options] Override http request option.
160
- * @throws {RequiredError}
161
- */
162
- getItemEligibilityPreview(requestParameters, options) {
163
- return FbaInboundEligibilityApiFp(this.configuration).getItemEligibilityPreview(requestParameters.asin, requestParameters.program, requestParameters.marketplaceIds, options).then((request) => request(this.axios, this.basePath));
164
- }
153
+ /**
154
+ * This operation gets an eligibility preview for an item that you specify. You can specify the type of eligibility preview that you want (INBOUND or COMMINGLING). For INBOUND previews, you can specify the marketplace in which you want to determine the item\'s eligibility. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
155
+ * @param {FbaInboundEligibilityApiGetItemEligibilityPreviewRequest} requestParameters Request parameters.
156
+ * @param {*} [options] Override http request option.
157
+ * @throws {RequiredError}
158
+ */
159
+ getItemEligibilityPreview(requestParameters, options) {
160
+ return FbaInboundEligibilityApiFp(this.configuration).getItemEligibilityPreview(requestParameters.asin, requestParameters.program, requestParameters.marketplaceIds, options).then((request) => request(this.axios, this.basePath));
161
+ }
165
162
  };
166
- var GetItemEligibilityPreviewProgramEnum = {
167
- Inbound: "INBOUND",
168
- Commingling: "COMMINGLING"
163
+ const GetItemEligibilityPreviewProgramEnum = {
164
+ Inbound: "INBOUND",
165
+ Commingling: "COMMINGLING"
169
166
  };
170
-
171
- // src/api-model/configuration.ts
167
+ //#endregion
168
+ //#region src/api-model/configuration.ts
172
169
  var Configuration = class {
173
- /**
174
- * parameter for apiKey security
175
- * @param name security name
176
- */
177
- apiKey;
178
- /**
179
- * parameter for basic security
180
- */
181
- username;
182
- /**
183
- * parameter for basic security
184
- */
185
- password;
186
- /**
187
- * parameter for oauth2 security
188
- * @param name security name
189
- * @param scopes oauth2 scope
190
- */
191
- accessToken;
192
- /**
193
- * parameter for aws4 signature security
194
- * @param {Object} AWS4Signature - AWS4 Signature security
195
- * @param {string} options.region - aws region
196
- * @param {string} options.service - name of the service.
197
- * @param {string} credentials.accessKeyId - aws access key id
198
- * @param {string} credentials.secretAccessKey - aws access key
199
- * @param {string} credentials.sessionToken - aws session token
200
- * @memberof Configuration
201
- */
202
- awsv4;
203
- /**
204
- * override base path
205
- */
206
- basePath;
207
- /**
208
- * override server index
209
- */
210
- serverIndex;
211
- /**
212
- * base options for axios calls
213
- */
214
- baseOptions;
215
- /**
216
- * The FormData constructor that will be used to create multipart form data
217
- * requests. You can inject this here so that execution environments that
218
- * do not support the FormData class can still run the generated client.
219
- *
220
- * @type {new () => FormData}
221
- */
222
- formDataCtor;
223
- constructor(param = {}) {
224
- this.apiKey = param.apiKey;
225
- this.username = param.username;
226
- this.password = param.password;
227
- this.accessToken = param.accessToken;
228
- this.awsv4 = param.awsv4;
229
- this.basePath = param.basePath;
230
- this.serverIndex = param.serverIndex;
231
- this.baseOptions = {
232
- ...param.baseOptions,
233
- headers: {
234
- ...param.baseOptions?.headers
235
- }
236
- };
237
- this.formDataCtor = param.formDataCtor;
238
- }
239
- /**
240
- * Check if the given MIME is a JSON MIME.
241
- * JSON MIME examples:
242
- * application/json
243
- * application/json; charset=UTF8
244
- * APPLICATION/JSON
245
- * application/vnd.company+json
246
- * @param mime - MIME (Multipurpose Internet Mail Extensions)
247
- * @return True if the given MIME is JSON, false otherwise.
248
- */
249
- isJsonMime(mime) {
250
- const jsonMime = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i;
251
- return mime !== null && jsonMime.test(mime);
252
- }
170
+ /**
171
+ * parameter for apiKey security
172
+ * @param name security name
173
+ */
174
+ apiKey;
175
+ /**
176
+ * parameter for basic security
177
+ */
178
+ username;
179
+ /**
180
+ * parameter for basic security
181
+ */
182
+ password;
183
+ /**
184
+ * parameter for oauth2 security
185
+ * @param name security name
186
+ * @param scopes oauth2 scope
187
+ */
188
+ accessToken;
189
+ /**
190
+ * parameter for aws4 signature security
191
+ * @param {Object} AWS4Signature - AWS4 Signature security
192
+ * @param {string} options.region - aws region
193
+ * @param {string} options.service - name of the service.
194
+ * @param {string} credentials.accessKeyId - aws access key id
195
+ * @param {string} credentials.secretAccessKey - aws access key
196
+ * @param {string} credentials.sessionToken - aws session token
197
+ * @memberof Configuration
198
+ */
199
+ awsv4;
200
+ /**
201
+ * override base path
202
+ */
203
+ basePath;
204
+ /**
205
+ * override server index
206
+ */
207
+ serverIndex;
208
+ /**
209
+ * base options for axios calls
210
+ */
211
+ baseOptions;
212
+ /**
213
+ * The FormData constructor that will be used to create multipart form data
214
+ * requests. You can inject this here so that execution environments that
215
+ * do not support the FormData class can still run the generated client.
216
+ *
217
+ * @type {new () => FormData}
218
+ */
219
+ formDataCtor;
220
+ constructor(param = {}) {
221
+ this.apiKey = param.apiKey;
222
+ this.username = param.username;
223
+ this.password = param.password;
224
+ this.accessToken = param.accessToken;
225
+ this.awsv4 = param.awsv4;
226
+ this.basePath = param.basePath;
227
+ this.serverIndex = param.serverIndex;
228
+ this.baseOptions = {
229
+ ...param.baseOptions,
230
+ headers: { ...param.baseOptions?.headers }
231
+ };
232
+ this.formDataCtor = param.formDataCtor;
233
+ }
234
+ /**
235
+ * Check if the given MIME is a JSON MIME.
236
+ * JSON MIME examples:
237
+ * application/json
238
+ * application/json; charset=UTF8
239
+ * APPLICATION/JSON
240
+ * application/vnd.company+json
241
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
242
+ * @return True if the given MIME is JSON, false otherwise.
243
+ */
244
+ isJsonMime(mime) {
245
+ return mime !== null && /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i.test(mime);
246
+ }
253
247
  };
254
-
255
- // src/api-model/models/item-eligibility-preview.ts
256
- var ItemEligibilityPreviewProgramEnum = {
257
- Inbound: "INBOUND",
258
- Commingling: "COMMINGLING"
248
+ //#endregion
249
+ //#region src/api-model/models/item-eligibility-preview.ts
250
+ const ItemEligibilityPreviewProgramEnum = {
251
+ Inbound: "INBOUND",
252
+ Commingling: "COMMINGLING"
259
253
  };
260
- var ItemEligibilityPreviewIneligibilityReasonListEnum = {
261
- FbaInb0004: "FBA_INB_0004",
262
- FbaInb0006: "FBA_INB_0006",
263
- FbaInb0007: "FBA_INB_0007",
264
- FbaInb0008: "FBA_INB_0008",
265
- FbaInb0009: "FBA_INB_0009",
266
- FbaInb0010: "FBA_INB_0010",
267
- FbaInb0011: "FBA_INB_0011",
268
- FbaInb0012: "FBA_INB_0012",
269
- FbaInb0013: "FBA_INB_0013",
270
- FbaInb0014: "FBA_INB_0014",
271
- FbaInb0015: "FBA_INB_0015",
272
- FbaInb0016: "FBA_INB_0016",
273
- FbaInb0017: "FBA_INB_0017",
274
- FbaInb0018: "FBA_INB_0018",
275
- FbaInb0019: "FBA_INB_0019",
276
- FbaInb0034: "FBA_INB_0034",
277
- FbaInb0035: "FBA_INB_0035",
278
- FbaInb0036: "FBA_INB_0036",
279
- FbaInb0037: "FBA_INB_0037",
280
- FbaInb0038: "FBA_INB_0038",
281
- FbaInb0050: "FBA_INB_0050",
282
- FbaInb0051: "FBA_INB_0051",
283
- FbaInb0053: "FBA_INB_0053",
284
- FbaInb0055: "FBA_INB_0055",
285
- FbaInb0056: "FBA_INB_0056",
286
- FbaInb0059: "FBA_INB_0059",
287
- FbaInb0065: "FBA_INB_0065",
288
- FbaInb0066: "FBA_INB_0066",
289
- FbaInb0067: "FBA_INB_0067",
290
- FbaInb0068: "FBA_INB_0068",
291
- FbaInb0095: "FBA_INB_0095",
292
- FbaInb0097: "FBA_INB_0097",
293
- FbaInb0098: "FBA_INB_0098",
294
- FbaInb0099: "FBA_INB_0099",
295
- FbaInb0100: "FBA_INB_0100",
296
- FbaInb0103: "FBA_INB_0103",
297
- FbaInb0104: "FBA_INB_0104",
298
- FbaInb0197: "FBA_INB_0197",
299
- FbaInb0342: "FBA_INB_0342",
300
- FbaInb0465: "FBA_INB_0465",
301
- UnknownInbErrorCode: "UNKNOWN_INB_ERROR_CODE"
254
+ const ItemEligibilityPreviewIneligibilityReasonListEnum = {
255
+ FbaInb0004: "FBA_INB_0004",
256
+ FbaInb0006: "FBA_INB_0006",
257
+ FbaInb0007: "FBA_INB_0007",
258
+ FbaInb0008: "FBA_INB_0008",
259
+ FbaInb0009: "FBA_INB_0009",
260
+ FbaInb0010: "FBA_INB_0010",
261
+ FbaInb0011: "FBA_INB_0011",
262
+ FbaInb0012: "FBA_INB_0012",
263
+ FbaInb0013: "FBA_INB_0013",
264
+ FbaInb0014: "FBA_INB_0014",
265
+ FbaInb0015: "FBA_INB_0015",
266
+ FbaInb0016: "FBA_INB_0016",
267
+ FbaInb0017: "FBA_INB_0017",
268
+ FbaInb0018: "FBA_INB_0018",
269
+ FbaInb0019: "FBA_INB_0019",
270
+ FbaInb0034: "FBA_INB_0034",
271
+ FbaInb0035: "FBA_INB_0035",
272
+ FbaInb0036: "FBA_INB_0036",
273
+ FbaInb0037: "FBA_INB_0037",
274
+ FbaInb0038: "FBA_INB_0038",
275
+ FbaInb0050: "FBA_INB_0050",
276
+ FbaInb0051: "FBA_INB_0051",
277
+ FbaInb0053: "FBA_INB_0053",
278
+ FbaInb0055: "FBA_INB_0055",
279
+ FbaInb0056: "FBA_INB_0056",
280
+ FbaInb0059: "FBA_INB_0059",
281
+ FbaInb0065: "FBA_INB_0065",
282
+ FbaInb0066: "FBA_INB_0066",
283
+ FbaInb0067: "FBA_INB_0067",
284
+ FbaInb0068: "FBA_INB_0068",
285
+ FbaInb0095: "FBA_INB_0095",
286
+ FbaInb0097: "FBA_INB_0097",
287
+ FbaInb0098: "FBA_INB_0098",
288
+ FbaInb0099: "FBA_INB_0099",
289
+ FbaInb0100: "FBA_INB_0100",
290
+ FbaInb0103: "FBA_INB_0103",
291
+ FbaInb0104: "FBA_INB_0104",
292
+ FbaInb0197: "FBA_INB_0197",
293
+ FbaInb0342: "FBA_INB_0342",
294
+ FbaInb0465: "FBA_INB_0465",
295
+ UnknownInbErrorCode: "UNKNOWN_INB_ERROR_CODE"
302
296
  };
303
-
304
- // src/client.ts
305
- var clientRateLimits = [
306
- {
307
- method: "get",
308
- // eslint-disable-next-line prefer-regex-literals
309
- urlRegex: new RegExp("^/fba/inbound/v1/eligibility/itemPreview$"),
310
- rate: 1,
311
- burst: 1
312
- }
313
- ];
297
+ //#endregion
298
+ //#region src/client.ts
299
+ const clientRateLimits = [{
300
+ method: "get",
301
+ urlRegex: /^\/fba\/inbound\/v1\/eligibility\/itemPreview$/v,
302
+ rate: 1,
303
+ burst: 1
304
+ }];
314
305
  var FbaInboundEligibilityApiClient = class extends FbaInboundEligibilityApi {
315
- constructor(configuration) {
316
- const { axios, endpoint } = createAxiosInstance(configuration, clientRateLimits);
317
- super(new Configuration(), endpoint, axios);
318
- }
319
- };
320
- export {
321
- FbaInboundEligibilityApi,
322
- FbaInboundEligibilityApiAxiosParamCreator,
323
- FbaInboundEligibilityApiClient,
324
- FbaInboundEligibilityApiFactory,
325
- FbaInboundEligibilityApiFp,
326
- GetItemEligibilityPreviewProgramEnum,
327
- ItemEligibilityPreviewIneligibilityReasonListEnum,
328
- ItemEligibilityPreviewProgramEnum,
329
- clientRateLimits
306
+ constructor(configuration) {
307
+ const { axios, endpoint } = createAxiosInstance(configuration, clientRateLimits);
308
+ super(new Configuration(), endpoint, axios);
309
+ }
330
310
  };
311
+ //#endregion
312
+ export { FbaInboundEligibilityApi, FbaInboundEligibilityApiAxiosParamCreator, FbaInboundEligibilityApiClient, FbaInboundEligibilityApiFactory, FbaInboundEligibilityApiFp, GetItemEligibilityPreviewProgramEnum, ItemEligibilityPreviewIneligibilityReasonListEnum, ItemEligibilityPreviewProgramEnum, clientRateLimits };
313
+
331
314
  //# sourceMappingURL=index.js.map