@sp-api-sdk/fba-inbound-eligibility-api-v1 4.2.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.
Files changed (44) hide show
  1. package/README.md +7 -8
  2. package/dist/index.cjs +346 -0
  3. package/dist/index.cjs.map +1 -0
  4. package/dist/index.d.cts +326 -0
  5. package/dist/index.d.ts +326 -0
  6. package/dist/index.js +314 -0
  7. package/dist/index.js.map +1 -0
  8. package/package.json +26 -12
  9. package/dist/cjs/api-model/api/fba-inbound-eligibility-api.js +0 -134
  10. package/dist/cjs/api-model/api.js +0 -30
  11. package/dist/cjs/api-model/base.js +0 -52
  12. package/dist/cjs/api-model/common.js +0 -123
  13. package/dist/cjs/api-model/configuration.js +0 -98
  14. package/dist/cjs/api-model/index.js +0 -32
  15. package/dist/cjs/api-model/models/get-item-eligibility-preview-response.js +0 -15
  16. package/dist/cjs/api-model/models/index.js +0 -19
  17. package/dist/cjs/api-model/models/item-eligibility-preview.js +0 -63
  18. package/dist/cjs/api-model/models/model-error.js +0 -15
  19. package/dist/cjs/client.js +0 -21
  20. package/dist/cjs/index.js +0 -19
  21. package/dist/es/api-model/api/fba-inbound-eligibility-api.js +0 -124
  22. package/dist/es/api-model/api.js +0 -14
  23. package/dist/es/api-model/base.js +0 -44
  24. package/dist/es/api-model/common.js +0 -110
  25. package/dist/es/api-model/configuration.js +0 -94
  26. package/dist/es/api-model/index.js +0 -16
  27. package/dist/es/api-model/models/get-item-eligibility-preview-response.js +0 -14
  28. package/dist/es/api-model/models/index.js +0 -3
  29. package/dist/es/api-model/models/item-eligibility-preview.js +0 -60
  30. package/dist/es/api-model/models/model-error.js +0 -14
  31. package/dist/es/client.js +0 -17
  32. package/dist/es/index.js +0 -3
  33. package/dist/types/api-model/api/fba-inbound-eligibility-api.d.ts +0 -90
  34. package/dist/types/api-model/api.d.ts +0 -12
  35. package/dist/types/api-model/base.d.ts +0 -42
  36. package/dist/types/api-model/common.d.ts +0 -34
  37. package/dist/types/api-model/configuration.d.ts +0 -98
  38. package/dist/types/api-model/index.d.ts +0 -14
  39. package/dist/types/api-model/models/get-item-eligibility-preview-response.d.ts +0 -22
  40. package/dist/types/api-model/models/index.d.ts +0 -3
  41. package/dist/types/api-model/models/item-eligibility-preview.d.ts +0 -85
  42. package/dist/types/api-model/models/model-error.d.ts +0 -28
  43. package/dist/types/client.d.ts +0 -6
  44. package/dist/types/index.d.ts +0 -3
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # `fba-inbound-eligibility-api-v1`
1
+ # `@sp-api-sdk/fba-inbound-eligibility-api-v1`
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/@sp-api-sdk/fba-inbound-eligibility-api-v1)](https://www.npmjs.com/package/@sp-api-sdk/fba-inbound-eligibility-api-v1)
4
4
  [![XO code style](https://img.shields.io/badge/code_style-xo-cyan)](https://github.com/xojs/xo)
@@ -25,10 +25,10 @@ npm install @sp-api-sdk/fba-inbound-eligibility-api-v1
25
25
  import {SellingPartnerApiAuth} from '@sp-api-sdk/auth'
26
26
  import {FbaInboundEligibilityApiClient} from '@sp-api-sdk/fba-inbound-eligibility-api-v1'
27
27
 
28
+ // `clientId` and `clientSecret` default to the `LWA_CLIENT_ID` and
29
+ // `LWA_CLIENT_SECRET` environment variables.
28
30
  const auth = new SellingPartnerApiAuth({
29
- clientId: process.env.LWA_CLIENT_ID,
30
- clientSecret: process.env.LWA_CLIENT_SECRET,
31
- refreshToken: 'Atzr|…',
31
+ refreshToken: await getRefreshTokenForSeller(sellerId),
32
32
  })
33
33
 
34
34
  const client = new FbaInboundEligibilityApiClient({
@@ -67,10 +67,10 @@ const client = new FbaInboundEligibilityApiClient({
67
67
  region: 'eu',
68
68
  logging: {
69
69
  request: {
70
- logger: console.debug
70
+ logger: console.debug,
71
71
  },
72
72
  response: {
73
- logger: console.debug
73
+ logger: console.debug,
74
74
  },
75
75
  error: true,
76
76
  },
@@ -81,14 +81,13 @@ Specifying `true` will use the default options, specifying an object will allow
81
81
  This uses [axios-logger](https://github.com/hg-pyun/axios-logger) under the hood.
82
82
  By default, if enabled, the `request` and `response` loggers will use `console.info` and the `error` logger will use `console.error`.
83
83
 
84
-
85
84
  ## License
86
85
 
87
86
  MIT
88
87
 
89
88
  ## Miscellaneous
90
89
 
91
- ```
90
+ ```text
92
91
  ╚⊙ ⊙╝
93
92
  ╚═(███)═╝
94
93
  ╚═(███)═╝
package/dist/index.cjs ADDED
@@ -0,0 +1,346 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ //#region \0rolldown/runtime.js
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
11
+ key = keys[i];
12
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
13
+ get: ((k) => from[k]).bind(null, key),
14
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
+ });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
20
+ value: mod,
21
+ enumerable: true
22
+ }) : target, mod));
23
+ //#endregion
24
+ let _sp_api_sdk_common = require("@sp-api-sdk/common");
25
+ let axios = require("axios");
26
+ axios = __toESM(axios, 1);
27
+ //#region src/api-model/base.ts
28
+ const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
29
+ const COLLECTION_FORMATS = {
30
+ csv: ",",
31
+ ssv: " ",
32
+ tsv: " ",
33
+ pipes: "|"
34
+ };
35
+ var BaseAPI = class {
36
+ basePath;
37
+ axios;
38
+ configuration;
39
+ constructor(configuration, basePath = BASE_PATH, axios$3 = axios.default) {
40
+ this.basePath = basePath;
41
+ this.axios = axios$3;
42
+ if (configuration) {
43
+ this.configuration = configuration;
44
+ this.basePath = configuration.basePath ?? basePath;
45
+ }
46
+ }
47
+ };
48
+ var RequiredError = class extends Error {
49
+ field;
50
+ constructor(field, msg) {
51
+ super(msg);
52
+ this.field = field;
53
+ this.name = "RequiredError";
54
+ }
55
+ };
56
+ const operationServerMap = {};
57
+ //#endregion
58
+ //#region src/api-model/common.ts
59
+ const DUMMY_BASE_URL = "https://example.com";
60
+ /**
61
+ *
62
+ * @throws {RequiredError}
63
+ */
64
+ const assertParamExists = function(functionName, paramName, paramValue) {
65
+ if (paramValue === null || paramValue === void 0) throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
66
+ };
67
+ function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
68
+ if (parameter == null) return;
69
+ if (typeof parameter === "object") if (Array.isArray(parameter) || parameter instanceof Set) parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
70
+ else Object.keys(parameter).forEach((currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`));
71
+ else if (urlSearchParams.has(key)) urlSearchParams.append(key, parameter);
72
+ else urlSearchParams.set(key, parameter);
73
+ }
74
+ const setSearchParams = function(url, ...objects) {
75
+ const searchParams = new URLSearchParams(url.search);
76
+ setFlattenedQueryParams(searchParams, objects);
77
+ url.search = searchParams.toString();
78
+ };
79
+ const toPathString = function(url) {
80
+ return url.pathname + url.search + url.hash;
81
+ };
82
+ const createRequestFunction = function(axiosArgs, globalAxios, BASE_PATH, configuration) {
83
+ return (axios = globalAxios, basePath = BASE_PATH) => {
84
+ const axiosRequestArgs = {
85
+ ...axiosArgs.options,
86
+ url: (axios.defaults.baseURL ? "" : configuration?.basePath ?? basePath) + axiosArgs.url
87
+ };
88
+ return axios.request(axiosRequestArgs);
89
+ };
90
+ };
91
+ //#endregion
92
+ //#region src/api-model/api/fba-inbound-eligibility-api.ts
93
+ /**
94
+ * FbaInboundEligibilityApi - axios parameter creator
95
+ */
96
+ const FbaInboundEligibilityApiAxiosParamCreator = function(configuration) {
97
+ return {
98
+ /**
99
+ * 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).
100
+ * @param {string} asin The ASIN of the item for which you want an eligibility preview.
101
+ * @param {GetItemEligibilityPreviewProgramEnum} program The program that you want to check eligibility against.
102
+ * @param {Array<string>} [marketplaceIds] The identifier for the marketplace in which you want to determine eligibility. Required only when program&#x3D;INBOUND.
103
+ * @param {*} [options] Override http request option.
104
+ * @throws {RequiredError}
105
+ */
106
+ getItemEligibilityPreview: async (asin, program, marketplaceIds, options = {}) => {
107
+ assertParamExists("getItemEligibilityPreview", "asin", asin);
108
+ assertParamExists("getItemEligibilityPreview", "program", program);
109
+ const localVarUrlObj = new URL(`/fba/inbound/v1/eligibility/itemPreview`, DUMMY_BASE_URL);
110
+ let baseOptions;
111
+ if (configuration) baseOptions = configuration.baseOptions;
112
+ const localVarRequestOptions = {
113
+ method: "GET",
114
+ ...baseOptions,
115
+ ...options
116
+ };
117
+ const localVarHeaderParameter = {};
118
+ const localVarQueryParameter = {};
119
+ if (marketplaceIds) localVarQueryParameter["marketplaceIds"] = marketplaceIds.join(COLLECTION_FORMATS.csv);
120
+ if (asin !== void 0) localVarQueryParameter["asin"] = asin;
121
+ if (program !== void 0) localVarQueryParameter["program"] = program;
122
+ localVarHeaderParameter["Accept"] = "application/json,ItemEligibilityPreview";
123
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
124
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
125
+ localVarRequestOptions.headers = {
126
+ ...localVarHeaderParameter,
127
+ ...headersFromBaseOptions,
128
+ ...options.headers
129
+ };
130
+ return {
131
+ url: toPathString(localVarUrlObj),
132
+ options: localVarRequestOptions
133
+ };
134
+ } };
135
+ };
136
+ /**
137
+ * FbaInboundEligibilityApi - functional programming interface
138
+ */
139
+ const FbaInboundEligibilityApiFp = function(configuration) {
140
+ const localVarAxiosParamCreator = FbaInboundEligibilityApiAxiosParamCreator(configuration);
141
+ return {
142
+ /**
143
+ * 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).
144
+ * @param {string} asin The ASIN of the item for which you want an eligibility preview.
145
+ * @param {GetItemEligibilityPreviewProgramEnum} program The program that you want to check eligibility against.
146
+ * @param {Array<string>} [marketplaceIds] The identifier for the marketplace in which you want to determine eligibility. Required only when program&#x3D;INBOUND.
147
+ * @param {*} [options] Override http request option.
148
+ * @throws {RequiredError}
149
+ */
150
+ async getItemEligibilityPreview(asin, program, marketplaceIds, options) {
151
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getItemEligibilityPreview(asin, program, marketplaceIds, options);
152
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
153
+ const localVarOperationServerBasePath = operationServerMap["FbaInboundEligibilityApi.getItemEligibilityPreview"]?.[localVarOperationServerIndex]?.url;
154
+ return (axios$1, basePath) => createRequestFunction(localVarAxiosArgs, axios.default, BASE_PATH, configuration)(axios$1, localVarOperationServerBasePath || basePath);
155
+ } };
156
+ };
157
+ /**
158
+ * FbaInboundEligibilityApi - factory interface
159
+ */
160
+ const FbaInboundEligibilityApiFactory = function(configuration, basePath, axios$2) {
161
+ const localVarFp = FbaInboundEligibilityApiFp(configuration);
162
+ return {
163
+ /**
164
+ * 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).
165
+ * @param {FbaInboundEligibilityApiGetItemEligibilityPreviewRequest} requestParameters Request parameters.
166
+ * @param {*} [options] Override http request option.
167
+ * @throws {RequiredError}
168
+ */
169
+ getItemEligibilityPreview(requestParameters, options) {
170
+ return localVarFp.getItemEligibilityPreview(requestParameters.asin, requestParameters.program, requestParameters.marketplaceIds, options).then((request) => request(axios$2, basePath));
171
+ } };
172
+ };
173
+ /**
174
+ * FbaInboundEligibilityApi - object-oriented interface
175
+ */
176
+ var FbaInboundEligibilityApi = class extends BaseAPI {
177
+ /**
178
+ * 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).
179
+ * @param {FbaInboundEligibilityApiGetItemEligibilityPreviewRequest} requestParameters Request parameters.
180
+ * @param {*} [options] Override http request option.
181
+ * @throws {RequiredError}
182
+ */
183
+ getItemEligibilityPreview(requestParameters, options) {
184
+ return FbaInboundEligibilityApiFp(this.configuration).getItemEligibilityPreview(requestParameters.asin, requestParameters.program, requestParameters.marketplaceIds, options).then((request) => request(this.axios, this.basePath));
185
+ }
186
+ };
187
+ const GetItemEligibilityPreviewProgramEnum = {
188
+ Inbound: "INBOUND",
189
+ Commingling: "COMMINGLING"
190
+ };
191
+ //#endregion
192
+ //#region src/api-model/configuration.ts
193
+ var Configuration = class {
194
+ /**
195
+ * parameter for apiKey security
196
+ * @param name security name
197
+ */
198
+ apiKey;
199
+ /**
200
+ * parameter for basic security
201
+ */
202
+ username;
203
+ /**
204
+ * parameter for basic security
205
+ */
206
+ password;
207
+ /**
208
+ * parameter for oauth2 security
209
+ * @param name security name
210
+ * @param scopes oauth2 scope
211
+ */
212
+ accessToken;
213
+ /**
214
+ * parameter for aws4 signature security
215
+ * @param {Object} AWS4Signature - AWS4 Signature security
216
+ * @param {string} options.region - aws region
217
+ * @param {string} options.service - name of the service.
218
+ * @param {string} credentials.accessKeyId - aws access key id
219
+ * @param {string} credentials.secretAccessKey - aws access key
220
+ * @param {string} credentials.sessionToken - aws session token
221
+ * @memberof Configuration
222
+ */
223
+ awsv4;
224
+ /**
225
+ * override base path
226
+ */
227
+ basePath;
228
+ /**
229
+ * override server index
230
+ */
231
+ serverIndex;
232
+ /**
233
+ * base options for axios calls
234
+ */
235
+ baseOptions;
236
+ /**
237
+ * The FormData constructor that will be used to create multipart form data
238
+ * requests. You can inject this here so that execution environments that
239
+ * do not support the FormData class can still run the generated client.
240
+ *
241
+ * @type {new () => FormData}
242
+ */
243
+ formDataCtor;
244
+ constructor(param = {}) {
245
+ this.apiKey = param.apiKey;
246
+ this.username = param.username;
247
+ this.password = param.password;
248
+ this.accessToken = param.accessToken;
249
+ this.awsv4 = param.awsv4;
250
+ this.basePath = param.basePath;
251
+ this.serverIndex = param.serverIndex;
252
+ this.baseOptions = {
253
+ ...param.baseOptions,
254
+ headers: { ...param.baseOptions?.headers }
255
+ };
256
+ this.formDataCtor = param.formDataCtor;
257
+ }
258
+ /**
259
+ * Check if the given MIME is a JSON MIME.
260
+ * JSON MIME examples:
261
+ * application/json
262
+ * application/json; charset=UTF8
263
+ * APPLICATION/JSON
264
+ * application/vnd.company+json
265
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
266
+ * @return True if the given MIME is JSON, false otherwise.
267
+ */
268
+ isJsonMime(mime) {
269
+ return mime !== null && /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i.test(mime);
270
+ }
271
+ };
272
+ //#endregion
273
+ //#region src/api-model/models/item-eligibility-preview.ts
274
+ const ItemEligibilityPreviewProgramEnum = {
275
+ Inbound: "INBOUND",
276
+ Commingling: "COMMINGLING"
277
+ };
278
+ const ItemEligibilityPreviewIneligibilityReasonListEnum = {
279
+ FbaInb0004: "FBA_INB_0004",
280
+ FbaInb0006: "FBA_INB_0006",
281
+ FbaInb0007: "FBA_INB_0007",
282
+ FbaInb0008: "FBA_INB_0008",
283
+ FbaInb0009: "FBA_INB_0009",
284
+ FbaInb0010: "FBA_INB_0010",
285
+ FbaInb0011: "FBA_INB_0011",
286
+ FbaInb0012: "FBA_INB_0012",
287
+ FbaInb0013: "FBA_INB_0013",
288
+ FbaInb0014: "FBA_INB_0014",
289
+ FbaInb0015: "FBA_INB_0015",
290
+ FbaInb0016: "FBA_INB_0016",
291
+ FbaInb0017: "FBA_INB_0017",
292
+ FbaInb0018: "FBA_INB_0018",
293
+ FbaInb0019: "FBA_INB_0019",
294
+ FbaInb0034: "FBA_INB_0034",
295
+ FbaInb0035: "FBA_INB_0035",
296
+ FbaInb0036: "FBA_INB_0036",
297
+ FbaInb0037: "FBA_INB_0037",
298
+ FbaInb0038: "FBA_INB_0038",
299
+ FbaInb0050: "FBA_INB_0050",
300
+ FbaInb0051: "FBA_INB_0051",
301
+ FbaInb0053: "FBA_INB_0053",
302
+ FbaInb0055: "FBA_INB_0055",
303
+ FbaInb0056: "FBA_INB_0056",
304
+ FbaInb0059: "FBA_INB_0059",
305
+ FbaInb0065: "FBA_INB_0065",
306
+ FbaInb0066: "FBA_INB_0066",
307
+ FbaInb0067: "FBA_INB_0067",
308
+ FbaInb0068: "FBA_INB_0068",
309
+ FbaInb0095: "FBA_INB_0095",
310
+ FbaInb0097: "FBA_INB_0097",
311
+ FbaInb0098: "FBA_INB_0098",
312
+ FbaInb0099: "FBA_INB_0099",
313
+ FbaInb0100: "FBA_INB_0100",
314
+ FbaInb0103: "FBA_INB_0103",
315
+ FbaInb0104: "FBA_INB_0104",
316
+ FbaInb0197: "FBA_INB_0197",
317
+ FbaInb0342: "FBA_INB_0342",
318
+ FbaInb0465: "FBA_INB_0465",
319
+ UnknownInbErrorCode: "UNKNOWN_INB_ERROR_CODE"
320
+ };
321
+ //#endregion
322
+ //#region src/client.ts
323
+ const clientRateLimits = [{
324
+ method: "get",
325
+ urlRegex: /^\/fba\/inbound\/v1\/eligibility\/itemPreview$/v,
326
+ rate: 1,
327
+ burst: 1
328
+ }];
329
+ var FbaInboundEligibilityApiClient = class extends FbaInboundEligibilityApi {
330
+ constructor(configuration) {
331
+ const { axios, endpoint } = (0, _sp_api_sdk_common.createAxiosInstance)(configuration, clientRateLimits);
332
+ super(new Configuration(), endpoint, axios);
333
+ }
334
+ };
335
+ //#endregion
336
+ exports.FbaInboundEligibilityApi = FbaInboundEligibilityApi;
337
+ exports.FbaInboundEligibilityApiAxiosParamCreator = FbaInboundEligibilityApiAxiosParamCreator;
338
+ exports.FbaInboundEligibilityApiClient = FbaInboundEligibilityApiClient;
339
+ exports.FbaInboundEligibilityApiFactory = FbaInboundEligibilityApiFactory;
340
+ exports.FbaInboundEligibilityApiFp = FbaInboundEligibilityApiFp;
341
+ exports.GetItemEligibilityPreviewProgramEnum = GetItemEligibilityPreviewProgramEnum;
342
+ exports.ItemEligibilityPreviewIneligibilityReasonListEnum = ItemEligibilityPreviewIneligibilityReasonListEnum;
343
+ exports.ItemEligibilityPreviewProgramEnum = ItemEligibilityPreviewProgramEnum;
344
+ exports.clientRateLimits = clientRateLimits;
345
+
346
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","names":["axios","globalAxios","globalAxios","axios"],"sources":["../src/api-model/base.ts","../src/api-model/common.ts","../src/api-model/api/fba-inbound-eligibility-api.ts","../src/api-model/configuration.ts","../src/api-model/models/item-eligibility-preview.ts","../src/client.ts"],"sourcesContent":["/* tslint:disable */\n/* eslint-disable */\n/**\n * Selling Partner API for FBA Inbound Eligibilty\n * With the FBA Inbound Eligibility API, you can build applications that let sellers get eligibility previews for items before shipping them to Amazon\\'s fulfillment centers. With this API you can find out if an item is eligible for inbound shipment to Amazon\\'s fulfillment centers in a specific marketplace. You can also find out if an item is eligible for using the manufacturer barcode for FBA inventory tracking. Sellers can use this information to inform their decisions about which items to ship Amazon\\'s fulfillment centers.\n *\n * The version of the OpenAPI document: v1\n * \n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\nimport type { Configuration } from './configuration.js';\n// Some imports not used depending on template conditions\n// @ts-ignore\nimport type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';\nimport globalAxios from 'axios';\n\nexport const BASE_PATH = \"https://sellingpartnerapi-na.amazon.com\".replace(/\\/+$/, \"\");\n\nexport const COLLECTION_FORMATS = {\n csv: \",\",\n ssv: \" \",\n tsv: \"\\t\",\n pipes: \"|\",\n};\n\nexport interface RequestArgs {\n url: string;\n options: RawAxiosRequestConfig;\n}\n\nexport class BaseAPI {\n protected configuration: Configuration | undefined;\n\n constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {\n if (configuration) {\n this.configuration = configuration;\n this.basePath = configuration.basePath ?? basePath;\n }\n }\n};\n\nexport class RequiredError extends Error {\n constructor(public field: string, msg?: string) {\n super(msg);\n this.name = \"RequiredError\"\n }\n}\n\ninterface ServerMap {\n [key: string]: {\n url: string,\n description: string,\n }[];\n}\n\nexport const operationServerMap: ServerMap = {\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * Selling Partner API for FBA Inbound Eligibilty\n * With the FBA Inbound Eligibility API, you can build applications that let sellers get eligibility previews for items before shipping them to Amazon\\'s fulfillment centers. With this API you can find out if an item is eligible for inbound shipment to Amazon\\'s fulfillment centers in a specific marketplace. You can also find out if an item is eligible for using the manufacturer barcode for FBA inventory tracking. Sellers can use this information to inform their decisions about which items to ship Amazon\\'s fulfillment centers.\n *\n * The version of the OpenAPI document: v1\n * \n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport type { Configuration } from \"./configuration.js\";\nimport type { RequestArgs } from \"./base.js\";\nimport type { AxiosInstance, AxiosResponse } from 'axios';\nimport { RequiredError } from \"./base.js\";\n\nexport const DUMMY_BASE_URL = 'https://example.com'\n\n/**\n *\n * @throws {RequiredError}\n */\nexport const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) {\n if (paramValue === null || paramValue === undefined) {\n throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);\n }\n}\n\nexport const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) {\n if (configuration && configuration.apiKey) {\n const localVarApiKeyValue = typeof configuration.apiKey === 'function'\n ? await configuration.apiKey(keyParamName)\n : await configuration.apiKey;\n object[keyParamName] = localVarApiKeyValue;\n }\n}\n\nexport const setBasicAuthToObject = function (object: any, configuration?: Configuration) {\n if (configuration && (configuration.username || configuration.password)) {\n object[\"auth\"] = { username: configuration.username, password: configuration.password };\n }\n}\n\nexport const setBearerAuthToObject = async function (object: any, configuration?: Configuration) {\n if (configuration && configuration.accessToken) {\n const accessToken = typeof configuration.accessToken === 'function'\n ? await configuration.accessToken()\n : await configuration.accessToken;\n object[\"Authorization\"] = \"Bearer \" + accessToken;\n }\n}\n\nexport const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) {\n if (configuration && configuration.accessToken) {\n const localVarAccessTokenValue = typeof configuration.accessToken === 'function'\n ? await configuration.accessToken(name, scopes)\n : await configuration.accessToken;\n object[\"Authorization\"] = \"Bearer \" + localVarAccessTokenValue;\n }\n}\n\n\nfunction setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = \"\"): void {\n if (parameter == null) return;\n if (typeof parameter === \"object\") {\n if (Array.isArray(parameter) || parameter instanceof Set) {\n (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));\n }\n else {\n Object.keys(parameter).forEach(currentKey =>\n setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`)\n );\n }\n }\n else {\n if (urlSearchParams.has(key)) {\n urlSearchParams.append(key, parameter);\n }\n else {\n urlSearchParams.set(key, parameter);\n }\n }\n}\n\nexport const setSearchParams = function (url: URL, ...objects: any[]) {\n const searchParams = new URLSearchParams(url.search);\n setFlattenedQueryParams(searchParams, objects);\n url.search = searchParams.toString();\n}\n\n/**\n * JSON serialization helper function which replaces instances of unserializable types with serializable ones.\n * This function will run for every key-value pair encountered by JSON.stringify while traversing an object.\n * Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.\n */\n// @ts-ignore\nexport const replaceWithSerializableTypeIfNeeded = function(key: string, value: any) {\n if (value instanceof Set) {\n return Array.from(value);\n } else {\n return value;\n }\n}\n\nexport const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) {\n const nonString = typeof value !== 'string';\n const needsSerialization = nonString && configuration && configuration.isJsonMime\n ? configuration.isJsonMime(requestOptions.headers['Content-Type'])\n : nonString;\n return needsSerialization\n ? JSON.stringify(value !== undefined ? value : {}, replaceWithSerializableTypeIfNeeded)\n : (value || \"\");\n}\n\nexport const toPathString = function (url: URL) {\n return url.pathname + url.search + url.hash\n}\n\nexport const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) {\n return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {\n const axiosRequestArgs = {...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url};\n return axios.request<T, R>(axiosRequestArgs);\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * Selling Partner API for FBA Inbound Eligibilty\n * With the FBA Inbound Eligibility API, you can build applications that let sellers get eligibility previews for items before shipping them to Amazon\\'s fulfillment centers. With this API you can find out if an item is eligible for inbound shipment to Amazon\\'s fulfillment centers in a specific marketplace. You can also find out if an item is eligible for using the manufacturer barcode for FBA inventory tracking. Sellers can use this information to inform their decisions about which items to ship Amazon\\'s fulfillment centers.\n *\n * The version of the OpenAPI document: v1\n * \n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\nimport type { Configuration } from '../configuration.js';\nimport type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';\nimport globalAxios from 'axios';\n// Some imports not used depending on template conditions\n// @ts-ignore\nimport { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from '../common.js';\n// @ts-ignore\nimport { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base.js';\n// @ts-ignore\nimport type { GetItemEligibilityPreviewResponse } from '../models/index.js';\n/**\n * FbaInboundEligibilityApi - axios parameter creator\n */\nexport const FbaInboundEligibilityApiAxiosParamCreator = function (configuration?: Configuration) {\n return {\n /**\n * 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).\n * @param {string} asin The ASIN of the item for which you want an eligibility preview.\n * @param {GetItemEligibilityPreviewProgramEnum} program The program that you want to check eligibility against.\n * @param {Array<string>} [marketplaceIds] The identifier for the marketplace in which you want to determine eligibility. Required only when program&#x3D;INBOUND.\n * @param {*} [options] Override http request option.\n * @throws {RequiredError}\n */\n getItemEligibilityPreview: async (asin: string, program: GetItemEligibilityPreviewProgramEnum, marketplaceIds?: Array<string>, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {\n // verify required parameter 'asin' is not null or undefined\n assertParamExists('getItemEligibilityPreview', 'asin', asin)\n // verify required parameter 'program' is not null or undefined\n assertParamExists('getItemEligibilityPreview', 'program', program)\n const localVarPath = `/fba/inbound/v1/eligibility/itemPreview`;\n // use dummy base URL string because the URL constructor only accepts absolute URLs.\n const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);\n let baseOptions;\n if (configuration) {\n baseOptions = configuration.baseOptions;\n }\n\n const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};\n const localVarHeaderParameter = {} as any;\n const localVarQueryParameter = {} as any;\n\n if (marketplaceIds) {\n localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(COLLECTION_FORMATS.csv);\n }\n\n if (asin !== undefined) {\n localVarQueryParameter['asin'] = asin;\n }\n\n if (program !== undefined) {\n localVarQueryParameter['program'] = program;\n }\n\n localVarHeaderParameter['Accept'] = 'application/json,ItemEligibilityPreview';\n\n setSearchParams(localVarUrlObj, localVarQueryParameter);\n let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};\n localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};\n\n return {\n url: toPathString(localVarUrlObj),\n options: localVarRequestOptions,\n };\n },\n }\n};\n\n/**\n * FbaInboundEligibilityApi - functional programming interface\n */\nexport const FbaInboundEligibilityApiFp = function(configuration?: Configuration) {\n const localVarAxiosParamCreator = FbaInboundEligibilityApiAxiosParamCreator(configuration)\n return {\n /**\n * 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).\n * @param {string} asin The ASIN of the item for which you want an eligibility preview.\n * @param {GetItemEligibilityPreviewProgramEnum} program The program that you want to check eligibility against.\n * @param {Array<string>} [marketplaceIds] The identifier for the marketplace in which you want to determine eligibility. Required only when program&#x3D;INBOUND.\n * @param {*} [options] Override http request option.\n * @throws {RequiredError}\n */\n async getItemEligibilityPreview(asin: string, program: GetItemEligibilityPreviewProgramEnum, marketplaceIds?: Array<string>, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetItemEligibilityPreviewResponse>> {\n const localVarAxiosArgs = await localVarAxiosParamCreator.getItemEligibilityPreview(asin, program, marketplaceIds, options);\n const localVarOperationServerIndex = configuration?.serverIndex ?? 0;\n const localVarOperationServerBasePath = operationServerMap['FbaInboundEligibilityApi.getItemEligibilityPreview']?.[localVarOperationServerIndex]?.url;\n return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);\n },\n }\n};\n\n/**\n * FbaInboundEligibilityApi - factory interface\n */\nexport const FbaInboundEligibilityApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {\n const localVarFp = FbaInboundEligibilityApiFp(configuration)\n return {\n /**\n * 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).\n * @param {FbaInboundEligibilityApiGetItemEligibilityPreviewRequest} requestParameters Request parameters.\n * @param {*} [options] Override http request option.\n * @throws {RequiredError}\n */\n getItemEligibilityPreview(requestParameters: FbaInboundEligibilityApiGetItemEligibilityPreviewRequest, options?: RawAxiosRequestConfig): AxiosPromise<GetItemEligibilityPreviewResponse> {\n return localVarFp.getItemEligibilityPreview(requestParameters.asin, requestParameters.program, requestParameters.marketplaceIds, options).then((request) => request(axios, basePath));\n },\n };\n};\n\n/**\n * Request parameters for getItemEligibilityPreview operation in FbaInboundEligibilityApi.\n */\nexport interface FbaInboundEligibilityApiGetItemEligibilityPreviewRequest {\n /**\n * The ASIN of the item for which you want an eligibility preview.\n */\n readonly asin: string\n\n /**\n * The program that you want to check eligibility against.\n */\n readonly program: GetItemEligibilityPreviewProgramEnum\n\n /**\n * The identifier for the marketplace in which you want to determine eligibility. Required only when program&#x3D;INBOUND.\n */\n readonly marketplaceIds?: Array<string>\n}\n\n/**\n * FbaInboundEligibilityApi - object-oriented interface\n */\nexport class FbaInboundEligibilityApi extends BaseAPI {\n /**\n * 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).\n * @param {FbaInboundEligibilityApiGetItemEligibilityPreviewRequest} requestParameters Request parameters.\n * @param {*} [options] Override http request option.\n * @throws {RequiredError}\n */\n public getItemEligibilityPreview(requestParameters: FbaInboundEligibilityApiGetItemEligibilityPreviewRequest, options?: RawAxiosRequestConfig) {\n return FbaInboundEligibilityApiFp(this.configuration).getItemEligibilityPreview(requestParameters.asin, requestParameters.program, requestParameters.marketplaceIds, options).then((request) => request(this.axios, this.basePath));\n }\n}\n\nexport const GetItemEligibilityPreviewProgramEnum = {\n Inbound: 'INBOUND',\n Commingling: 'COMMINGLING',\n} as const;\nexport type GetItemEligibilityPreviewProgramEnum = typeof GetItemEligibilityPreviewProgramEnum[keyof typeof GetItemEligibilityPreviewProgramEnum];\n","/* tslint:disable */\n/**\n * Selling Partner API for FBA Inbound Eligibilty\n * With the FBA Inbound Eligibility API, you can build applications that let sellers get eligibility previews for items before shipping them to Amazon\\'s fulfillment centers. With this API you can find out if an item is eligible for inbound shipment to Amazon\\'s fulfillment centers in a specific marketplace. You can also find out if an item is eligible for using the manufacturer barcode for FBA inventory tracking. Sellers can use this information to inform their decisions about which items to ship Amazon\\'s fulfillment centers.\n *\n * The version of the OpenAPI document: v1\n * \n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\ninterface AWSv4Configuration {\n options?: {\n region?: string\n service?: string\n }\n credentials?: {\n accessKeyId?: string\n secretAccessKey?: string,\n sessionToken?: string\n }\n}\n\nexport interface ConfigurationParameters {\n apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);\n username?: string;\n password?: string;\n accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);\n awsv4?: AWSv4Configuration;\n basePath?: string;\n serverIndex?: number;\n baseOptions?: any;\n formDataCtor?: new () => any;\n}\n\nexport class Configuration {\n /**\n * parameter for apiKey security\n * @param name security name\n */\n apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);\n /**\n * parameter for basic security\n */\n username?: string;\n /**\n * parameter for basic security\n */\n password?: string;\n /**\n * parameter for oauth2 security\n * @param name security name\n * @param scopes oauth2 scope\n */\n accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);\n /**\n * parameter for aws4 signature security\n * @param {Object} AWS4Signature - AWS4 Signature security\n * @param {string} options.region - aws region\n * @param {string} options.service - name of the service.\n * @param {string} credentials.accessKeyId - aws access key id\n * @param {string} credentials.secretAccessKey - aws access key\n * @param {string} credentials.sessionToken - aws session token\n * @memberof Configuration\n */\n awsv4?: AWSv4Configuration;\n /**\n * override base path\n */\n basePath?: string;\n /**\n * override server index\n */\n serverIndex?: number;\n /**\n * base options for axios calls\n */\n baseOptions?: any;\n /**\n * The FormData constructor that will be used to create multipart form data\n * requests. You can inject this here so that execution environments that\n * do not support the FormData class can still run the generated client.\n *\n * @type {new () => FormData}\n */\n formDataCtor?: new () => any;\n\n constructor(param: ConfigurationParameters = {}) {\n this.apiKey = param.apiKey;\n this.username = param.username;\n this.password = param.password;\n this.accessToken = param.accessToken;\n this.awsv4 = param.awsv4;\n this.basePath = param.basePath;\n this.serverIndex = param.serverIndex;\n this.baseOptions = {\n ...param.baseOptions,\n headers: {\n ...param.baseOptions?.headers,\n },\n };\n this.formDataCtor = param.formDataCtor;\n }\n\n /**\n * Check if the given MIME is a JSON MIME.\n * JSON MIME examples:\n * application/json\n * application/json; charset=UTF8\n * APPLICATION/JSON\n * application/vnd.company+json\n * @param mime - MIME (Multipurpose Internet Mail Extensions)\n * @return True if the given MIME is JSON, false otherwise.\n */\n public isJsonMime(mime: string): boolean {\n const jsonMime: RegExp = /^(application\\/json|[^;/ \\t]+\\/[^;/ \\t]+[+]json)[ \\t]*(;.*)?$/i;\n return mime !== null && jsonMime.test(mime);\n }\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * Selling Partner API for FBA Inbound Eligibilty\n * With the FBA Inbound Eligibility API, you can build applications that let sellers get eligibility previews for items before shipping them to Amazon\\'s fulfillment centers. With this API you can find out if an item is eligible for inbound shipment to Amazon\\'s fulfillment centers in a specific marketplace. You can also find out if an item is eligible for using the manufacturer barcode for FBA inventory tracking. Sellers can use this information to inform their decisions about which items to ship Amazon\\'s fulfillment centers.\n *\n * The version of the OpenAPI document: v1\n * \n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\n\n/**\n * The response object which contains the ASIN, marketplaceId if required, eligibility program, the eligibility status (boolean), and a list of ineligibility reason codes.\n */\nexport interface ItemEligibilityPreview {\n /**\n * The ASIN for which eligibility was determined.\n */\n 'asin': string;\n /**\n * The marketplace for which eligibility was determined.\n */\n 'marketplaceId'?: string;\n /**\n * The program for which eligibility was determined.\n */\n 'program': ItemEligibilityPreviewProgramEnum;\n /**\n * Indicates if the item is eligible for the program.\n */\n 'isEligibleForProgram': boolean;\n /**\n * Potential Ineligibility Reason Codes.\n */\n 'ineligibilityReasonList'?: Array<ItemEligibilityPreviewIneligibilityReasonListEnum>;\n}\n\nexport const ItemEligibilityPreviewProgramEnum = {\n Inbound: 'INBOUND',\n Commingling: 'COMMINGLING',\n} as const;\n\nexport type ItemEligibilityPreviewProgramEnum = typeof ItemEligibilityPreviewProgramEnum[keyof typeof ItemEligibilityPreviewProgramEnum];\nexport const ItemEligibilityPreviewIneligibilityReasonListEnum = {\n FbaInb0004: 'FBA_INB_0004',\n FbaInb0006: 'FBA_INB_0006',\n FbaInb0007: 'FBA_INB_0007',\n FbaInb0008: 'FBA_INB_0008',\n FbaInb0009: 'FBA_INB_0009',\n FbaInb0010: 'FBA_INB_0010',\n FbaInb0011: 'FBA_INB_0011',\n FbaInb0012: 'FBA_INB_0012',\n FbaInb0013: 'FBA_INB_0013',\n FbaInb0014: 'FBA_INB_0014',\n FbaInb0015: 'FBA_INB_0015',\n FbaInb0016: 'FBA_INB_0016',\n FbaInb0017: 'FBA_INB_0017',\n FbaInb0018: 'FBA_INB_0018',\n FbaInb0019: 'FBA_INB_0019',\n FbaInb0034: 'FBA_INB_0034',\n FbaInb0035: 'FBA_INB_0035',\n FbaInb0036: 'FBA_INB_0036',\n FbaInb0037: 'FBA_INB_0037',\n FbaInb0038: 'FBA_INB_0038',\n FbaInb0050: 'FBA_INB_0050',\n FbaInb0051: 'FBA_INB_0051',\n FbaInb0053: 'FBA_INB_0053',\n FbaInb0055: 'FBA_INB_0055',\n FbaInb0056: 'FBA_INB_0056',\n FbaInb0059: 'FBA_INB_0059',\n FbaInb0065: 'FBA_INB_0065',\n FbaInb0066: 'FBA_INB_0066',\n FbaInb0067: 'FBA_INB_0067',\n FbaInb0068: 'FBA_INB_0068',\n FbaInb0095: 'FBA_INB_0095',\n FbaInb0097: 'FBA_INB_0097',\n FbaInb0098: 'FBA_INB_0098',\n FbaInb0099: 'FBA_INB_0099',\n FbaInb0100: 'FBA_INB_0100',\n FbaInb0103: 'FBA_INB_0103',\n FbaInb0104: 'FBA_INB_0104',\n FbaInb0197: 'FBA_INB_0197',\n FbaInb0342: 'FBA_INB_0342',\n FbaInb0465: 'FBA_INB_0465',\n UnknownInbErrorCode: 'UNKNOWN_INB_ERROR_CODE',\n} as const;\n\nexport type ItemEligibilityPreviewIneligibilityReasonListEnum = typeof ItemEligibilityPreviewIneligibilityReasonListEnum[keyof typeof ItemEligibilityPreviewIneligibilityReasonListEnum];\n\n\n","import {type ClientConfiguration, createAxiosInstance, type RateLimit} from '@sp-api-sdk/common'\n\nimport {Configuration, FbaInboundEligibilityApi} from './api-model/index.js'\n\nexport const clientRateLimits: RateLimit[] = [\n {\n method: 'get',\n urlRegex: /^\\/fba\\/inbound\\/v1\\/eligibility\\/itemPreview$/v,\n rate: 1,\n burst: 1,\n },\n]\n\nexport class FbaInboundEligibilityApiClient extends FbaInboundEligibilityApi {\n constructor(configuration: ClientConfiguration) {\n const {axios, endpoint} = createAxiosInstance(configuration, clientRateLimits)\n\n super(new Configuration(), endpoint, axios)\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,MAAa,YAAY,0CAA0C,QAAQ,QAAQ,EAAE;AAErF,MAAa,qBAAqB;CAC9B,KAAK;CACL,KAAK;CACL,KAAK;CACL,OAAO;AACX;AAOA,IAAa,UAAb,MAAqB;CAGoC;CAAwC;CAF7F;CAEA,YAAY,eAA+B,WAA6B,WAAW,UAAiCC,MAAAA,SAAa;EAA5E,KAAA,WAAA;EAAwC,KAAA,QAAA;EACzF,IAAI,eAAe;GACf,KAAK,gBAAgB;GACrB,KAAK,WAAW,cAAc,YAAY;EAC9C;CACJ;AACJ;AAEA,IAAa,gBAAb,cAAmC,MAAM;CAClB;CAAnB,YAAY,OAAsB,KAAc;EAC5C,MAAM,GAAG;EADM,KAAA,QAAA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