@sp-api-sdk/fba-inbound-eligibility-api-v1 4.1.10 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/README.md +4 -4
  2. package/dist/index.cjs +376 -0
  3. package/dist/index.cjs.map +1 -0
  4. package/dist/index.d.cts +344 -0
  5. package/dist/index.d.ts +344 -0
  6. package/dist/index.js +331 -0
  7. package/dist/index.js.map +1 -0
  8. package/package.json +23 -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 -62
  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 -59
  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 -84
  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({
package/dist/index.cjs ADDED
@@ -0,0 +1,376 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/index.ts
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
+ FbaInboundEligibilityApi: () => FbaInboundEligibilityApi,
34
+ FbaInboundEligibilityApiAxiosParamCreator: () => FbaInboundEligibilityApiAxiosParamCreator,
35
+ FbaInboundEligibilityApiClient: () => FbaInboundEligibilityApiClient,
36
+ FbaInboundEligibilityApiFactory: () => FbaInboundEligibilityApiFactory,
37
+ FbaInboundEligibilityApiFp: () => FbaInboundEligibilityApiFp,
38
+ GetItemEligibilityPreviewProgramEnum: () => GetItemEligibilityPreviewProgramEnum,
39
+ ItemEligibilityPreviewIneligibilityReasonListEnum: () => ItemEligibilityPreviewIneligibilityReasonListEnum,
40
+ ItemEligibilityPreviewProgramEnum: () => ItemEligibilityPreviewProgramEnum,
41
+ clientRateLimits: () => clientRateLimits
42
+ });
43
+ module.exports = __toCommonJS(index_exports);
44
+
45
+ // src/client.ts
46
+ var import_common2 = require("@sp-api-sdk/common");
47
+
48
+ // src/api-model/api/fba-inbound-eligibility-api.ts
49
+ var import_axios2 = __toESM(require("axios"), 1);
50
+
51
+ // src/api-model/base.ts
52
+ var import_axios = __toESM(require("axios"), 1);
53
+ var BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
54
+ var COLLECTION_FORMATS = {
55
+ csv: ",",
56
+ ssv: " ",
57
+ tsv: " ",
58
+ pipes: "|"
59
+ };
60
+ var BaseAPI = class {
61
+ constructor(configuration, basePath = BASE_PATH, axios = import_axios.default) {
62
+ this.basePath = basePath;
63
+ this.axios = axios;
64
+ if (configuration) {
65
+ this.configuration = configuration;
66
+ this.basePath = configuration.basePath ?? basePath;
67
+ }
68
+ }
69
+ basePath;
70
+ axios;
71
+ configuration;
72
+ };
73
+ var RequiredError = class extends Error {
74
+ constructor(field, msg) {
75
+ super(msg);
76
+ this.field = field;
77
+ this.name = "RequiredError";
78
+ }
79
+ field;
80
+ };
81
+ var operationServerMap = {};
82
+
83
+ // src/api-model/common.ts
84
+ var DUMMY_BASE_URL = "https://example.com";
85
+ var assertParamExists = function(functionName, paramName, paramValue) {
86
+ if (paramValue === null || paramValue === void 0) {
87
+ throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
88
+ }
89
+ };
90
+ function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
91
+ if (parameter == null) return;
92
+ if (typeof parameter === "object") {
93
+ if (Array.isArray(parameter) || parameter instanceof Set) {
94
+ parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
95
+ } else {
96
+ Object.keys(parameter).forEach(
97
+ (currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`)
98
+ );
99
+ }
100
+ } else {
101
+ if (urlSearchParams.has(key)) {
102
+ urlSearchParams.append(key, parameter);
103
+ } else {
104
+ urlSearchParams.set(key, parameter);
105
+ }
106
+ }
107
+ }
108
+ var setSearchParams = function(url, ...objects) {
109
+ const searchParams = new URLSearchParams(url.search);
110
+ setFlattenedQueryParams(searchParams, objects);
111
+ url.search = searchParams.toString();
112
+ };
113
+ var toPathString = function(url) {
114
+ return url.pathname + url.search + url.hash;
115
+ };
116
+ var createRequestFunction = function(axiosArgs, globalAxios3, BASE_PATH2, configuration) {
117
+ return (axios = globalAxios3, basePath = BASE_PATH2) => {
118
+ const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? "" : configuration?.basePath ?? basePath) + axiosArgs.url };
119
+ return axios.request(axiosRequestArgs);
120
+ };
121
+ };
122
+
123
+ // src/api-model/api/fba-inbound-eligibility-api.ts
124
+ var FbaInboundEligibilityApiAxiosParamCreator = function(configuration) {
125
+ return {
126
+ /**
127
+ * 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).
128
+ * @param {string} asin The ASIN of the item for which you want an eligibility preview.
129
+ * @param {GetItemEligibilityPreviewProgramEnum} program The program that you want to check eligibility against.
130
+ * @param {Array<string>} [marketplaceIds] The identifier for the marketplace in which you want to determine eligibility. Required only when program&#x3D;INBOUND.
131
+ * @param {*} [options] Override http request option.
132
+ * @throws {RequiredError}
133
+ */
134
+ getItemEligibilityPreview: async (asin, program, marketplaceIds, options = {}) => {
135
+ assertParamExists("getItemEligibilityPreview", "asin", asin);
136
+ assertParamExists("getItemEligibilityPreview", "program", program);
137
+ const localVarPath = `/fba/inbound/v1/eligibility/itemPreview`;
138
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
139
+ let baseOptions;
140
+ if (configuration) {
141
+ baseOptions = configuration.baseOptions;
142
+ }
143
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
144
+ const localVarHeaderParameter = {};
145
+ const localVarQueryParameter = {};
146
+ if (marketplaceIds) {
147
+ localVarQueryParameter["marketplaceIds"] = marketplaceIds.join(COLLECTION_FORMATS.csv);
148
+ }
149
+ if (asin !== void 0) {
150
+ localVarQueryParameter["asin"] = asin;
151
+ }
152
+ if (program !== void 0) {
153
+ localVarQueryParameter["program"] = program;
154
+ }
155
+ localVarHeaderParameter["Accept"] = "application/json,ItemEligibilityPreview";
156
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
157
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
158
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
159
+ return {
160
+ url: toPathString(localVarUrlObj),
161
+ options: localVarRequestOptions
162
+ };
163
+ }
164
+ };
165
+ };
166
+ var FbaInboundEligibilityApiFp = function(configuration) {
167
+ const localVarAxiosParamCreator = FbaInboundEligibilityApiAxiosParamCreator(configuration);
168
+ return {
169
+ /**
170
+ * 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).
171
+ * @param {string} asin The ASIN of the item for which you want an eligibility preview.
172
+ * @param {GetItemEligibilityPreviewProgramEnum} program The program that you want to check eligibility against.
173
+ * @param {Array<string>} [marketplaceIds] The identifier for the marketplace in which you want to determine eligibility. Required only when program&#x3D;INBOUND.
174
+ * @param {*} [options] Override http request option.
175
+ * @throws {RequiredError}
176
+ */
177
+ async getItemEligibilityPreview(asin, program, marketplaceIds, options) {
178
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getItemEligibilityPreview(asin, program, marketplaceIds, options);
179
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
180
+ const localVarOperationServerBasePath = operationServerMap["FbaInboundEligibilityApi.getItemEligibilityPreview"]?.[localVarOperationServerIndex]?.url;
181
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, import_axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
182
+ }
183
+ };
184
+ };
185
+ var FbaInboundEligibilityApiFactory = function(configuration, basePath, axios) {
186
+ const localVarFp = FbaInboundEligibilityApiFp(configuration);
187
+ return {
188
+ /**
189
+ * 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).
190
+ * @param {FbaInboundEligibilityApiGetItemEligibilityPreviewRequest} requestParameters Request parameters.
191
+ * @param {*} [options] Override http request option.
192
+ * @throws {RequiredError}
193
+ */
194
+ getItemEligibilityPreview(requestParameters, options) {
195
+ return localVarFp.getItemEligibilityPreview(requestParameters.asin, requestParameters.program, requestParameters.marketplaceIds, options).then((request) => request(axios, basePath));
196
+ }
197
+ };
198
+ };
199
+ var FbaInboundEligibilityApi = class extends BaseAPI {
200
+ /**
201
+ * 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).
202
+ * @param {FbaInboundEligibilityApiGetItemEligibilityPreviewRequest} requestParameters Request parameters.
203
+ * @param {*} [options] Override http request option.
204
+ * @throws {RequiredError}
205
+ */
206
+ getItemEligibilityPreview(requestParameters, options) {
207
+ return FbaInboundEligibilityApiFp(this.configuration).getItemEligibilityPreview(requestParameters.asin, requestParameters.program, requestParameters.marketplaceIds, options).then((request) => request(this.axios, this.basePath));
208
+ }
209
+ };
210
+ var GetItemEligibilityPreviewProgramEnum = {
211
+ Inbound: "INBOUND",
212
+ Commingling: "COMMINGLING"
213
+ };
214
+
215
+ // src/api-model/configuration.ts
216
+ var Configuration = class {
217
+ /**
218
+ * parameter for apiKey security
219
+ * @param name security name
220
+ */
221
+ apiKey;
222
+ /**
223
+ * parameter for basic security
224
+ */
225
+ username;
226
+ /**
227
+ * parameter for basic security
228
+ */
229
+ password;
230
+ /**
231
+ * parameter for oauth2 security
232
+ * @param name security name
233
+ * @param scopes oauth2 scope
234
+ */
235
+ accessToken;
236
+ /**
237
+ * parameter for aws4 signature security
238
+ * @param {Object} AWS4Signature - AWS4 Signature security
239
+ * @param {string} options.region - aws region
240
+ * @param {string} options.service - name of the service.
241
+ * @param {string} credentials.accessKeyId - aws access key id
242
+ * @param {string} credentials.secretAccessKey - aws access key
243
+ * @param {string} credentials.sessionToken - aws session token
244
+ * @memberof Configuration
245
+ */
246
+ awsv4;
247
+ /**
248
+ * override base path
249
+ */
250
+ basePath;
251
+ /**
252
+ * override server index
253
+ */
254
+ serverIndex;
255
+ /**
256
+ * base options for axios calls
257
+ */
258
+ baseOptions;
259
+ /**
260
+ * The FormData constructor that will be used to create multipart form data
261
+ * requests. You can inject this here so that execution environments that
262
+ * do not support the FormData class can still run the generated client.
263
+ *
264
+ * @type {new () => FormData}
265
+ */
266
+ formDataCtor;
267
+ constructor(param = {}) {
268
+ this.apiKey = param.apiKey;
269
+ this.username = param.username;
270
+ this.password = param.password;
271
+ this.accessToken = param.accessToken;
272
+ this.awsv4 = param.awsv4;
273
+ this.basePath = param.basePath;
274
+ this.serverIndex = param.serverIndex;
275
+ this.baseOptions = {
276
+ ...param.baseOptions,
277
+ headers: {
278
+ ...param.baseOptions?.headers
279
+ }
280
+ };
281
+ this.formDataCtor = param.formDataCtor;
282
+ }
283
+ /**
284
+ * Check if the given MIME is a JSON MIME.
285
+ * JSON MIME examples:
286
+ * application/json
287
+ * application/json; charset=UTF8
288
+ * APPLICATION/JSON
289
+ * application/vnd.company+json
290
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
291
+ * @return True if the given MIME is JSON, false otherwise.
292
+ */
293
+ isJsonMime(mime) {
294
+ const jsonMime = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i;
295
+ return mime !== null && jsonMime.test(mime);
296
+ }
297
+ };
298
+
299
+ // src/api-model/models/item-eligibility-preview.ts
300
+ var ItemEligibilityPreviewProgramEnum = {
301
+ Inbound: "INBOUND",
302
+ Commingling: "COMMINGLING"
303
+ };
304
+ var ItemEligibilityPreviewIneligibilityReasonListEnum = {
305
+ FbaInb0004: "FBA_INB_0004",
306
+ FbaInb0006: "FBA_INB_0006",
307
+ FbaInb0007: "FBA_INB_0007",
308
+ FbaInb0008: "FBA_INB_0008",
309
+ FbaInb0009: "FBA_INB_0009",
310
+ FbaInb0010: "FBA_INB_0010",
311
+ FbaInb0011: "FBA_INB_0011",
312
+ FbaInb0012: "FBA_INB_0012",
313
+ FbaInb0013: "FBA_INB_0013",
314
+ FbaInb0014: "FBA_INB_0014",
315
+ FbaInb0015: "FBA_INB_0015",
316
+ FbaInb0016: "FBA_INB_0016",
317
+ FbaInb0017: "FBA_INB_0017",
318
+ FbaInb0018: "FBA_INB_0018",
319
+ FbaInb0019: "FBA_INB_0019",
320
+ FbaInb0034: "FBA_INB_0034",
321
+ FbaInb0035: "FBA_INB_0035",
322
+ FbaInb0036: "FBA_INB_0036",
323
+ FbaInb0037: "FBA_INB_0037",
324
+ FbaInb0038: "FBA_INB_0038",
325
+ FbaInb0050: "FBA_INB_0050",
326
+ FbaInb0051: "FBA_INB_0051",
327
+ FbaInb0053: "FBA_INB_0053",
328
+ FbaInb0055: "FBA_INB_0055",
329
+ FbaInb0056: "FBA_INB_0056",
330
+ FbaInb0059: "FBA_INB_0059",
331
+ FbaInb0065: "FBA_INB_0065",
332
+ FbaInb0066: "FBA_INB_0066",
333
+ FbaInb0067: "FBA_INB_0067",
334
+ FbaInb0068: "FBA_INB_0068",
335
+ FbaInb0095: "FBA_INB_0095",
336
+ FbaInb0097: "FBA_INB_0097",
337
+ FbaInb0098: "FBA_INB_0098",
338
+ FbaInb0099: "FBA_INB_0099",
339
+ FbaInb0100: "FBA_INB_0100",
340
+ FbaInb0103: "FBA_INB_0103",
341
+ FbaInb0104: "FBA_INB_0104",
342
+ FbaInb0197: "FBA_INB_0197",
343
+ FbaInb0342: "FBA_INB_0342",
344
+ FbaInb0465: "FBA_INB_0465",
345
+ UnknownInbErrorCode: "UNKNOWN_INB_ERROR_CODE"
346
+ };
347
+
348
+ // src/client.ts
349
+ var clientRateLimits = [
350
+ {
351
+ method: "get",
352
+ // eslint-disable-next-line prefer-regex-literals
353
+ urlRegex: new RegExp("^/fba/inbound/v1/eligibility/itemPreview$"),
354
+ rate: 1,
355
+ burst: 1
356
+ }
357
+ ];
358
+ var FbaInboundEligibilityApiClient = class extends FbaInboundEligibilityApi {
359
+ constructor(configuration) {
360
+ const { axios, endpoint } = (0, import_common2.createAxiosInstance)(configuration, clientRateLimits);
361
+ super(new Configuration(), endpoint, axios);
362
+ }
363
+ };
364
+ // Annotate the CommonJS export names for ESM import in node:
365
+ 0 && (module.exports = {
366
+ FbaInboundEligibilityApi,
367
+ FbaInboundEligibilityApiAxiosParamCreator,
368
+ FbaInboundEligibilityApiClient,
369
+ FbaInboundEligibilityApiFactory,
370
+ FbaInboundEligibilityApiFp,
371
+ GetItemEligibilityPreviewProgramEnum,
372
+ ItemEligibilityPreviewIneligibilityReasonListEnum,
373
+ ItemEligibilityPreviewProgramEnum,
374
+ clientRateLimits
375
+ });
376
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts","../src/client.ts","../src/api-model/api/fba-inbound-eligibility-api.ts","../src/api-model/base.ts","../src/api-model/common.ts","../src/api-model/configuration.ts","../src/api-model/models/item-eligibility-preview.ts"],"sourcesContent":["export * from './client.js'\nexport * from './api-model/api.js'\nexport * from './api-model/models/index.js'\n","import {type ClientConfiguration, createAxiosInstance, type RateLimit} from '@sp-api-sdk/common'\n\nimport {Configuration, FbaInboundEligibilityApi} from './api-model/index.js'\n\nexport const clientRateLimits: RateLimit[] = [\n {\n method: 'get',\n // eslint-disable-next-line prefer-regex-literals\n urlRegex: new RegExp('^/fba/inbound/v1/eligibility/itemPreview$'),\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","/* 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/* 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/**\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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,iBAA4E;;;ACiB5E,IAAAC,gBAAwB;;;ACExB,mBAAwB;AAEjB,IAAM,YAAY,0CAA0C,QAAQ,QAAQ,EAAE;AAE9E,IAAM,qBAAqB;AAAA,EAC9B,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,OAAO;AACX;AAOO,IAAM,UAAN,MAAc;AAAA,EAGjB,YAAY,eAAyC,WAAmB,WAAqB,QAAuB,aAAAC,SAAa;AAA5E;AAAwC;AACzF,QAAI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