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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,376 +1,346 @@
1
- "use strict";
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ //#region \0rolldown/runtime.js
2
3
  var __create = Object.create;
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
7
  var __getProtoOf = Object.getPrototypeOf;
7
8
  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
9
  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;
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;
19
18
  };
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: "|"
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: "|"
59
34
  };
60
35
  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;
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
+ }
72
47
  };
73
48
  var RequiredError = class extends Error {
74
- constructor(field, msg) {
75
- super(msg);
76
- this.field = field;
77
- this.name = "RequiredError";
78
- }
79
- field;
49
+ field;
50
+ constructor(field, msg) {
51
+ super(msg);
52
+ this.field = field;
53
+ this.name = "RequiredError";
54
+ }
80
55
  };
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
- }
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}.`);
89
66
  };
90
67
  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
- }
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);
107
73
  }
108
- var setSearchParams = function(url, ...objects) {
109
- const searchParams = new URLSearchParams(url.search);
110
- setFlattenedQueryParams(searchParams, objects);
111
- url.search = searchParams.toString();
74
+ const setSearchParams = function(url, ...objects) {
75
+ const searchParams = new URLSearchParams(url.search);
76
+ setFlattenedQueryParams(searchParams, objects);
77
+ url.search = searchParams.toString();
112
78
  };
113
- var toPathString = function(url) {
114
- return url.pathname + url.search + url.hash;
79
+ const toPathString = function(url) {
80
+ return url.pathname + url.search + url.hash;
115
81
  };
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
- };
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
+ };
121
90
  };
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
- };
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
+ } };
165
135
  };
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
- };
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
+ } };
184
156
  };
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
- };
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
+ } };
198
172
  };
173
+ /**
174
+ * FbaInboundEligibilityApi - object-oriented interface
175
+ */
199
176
  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
- }
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
+ }
209
186
  };
210
- var GetItemEligibilityPreviewProgramEnum = {
211
- Inbound: "INBOUND",
212
- Commingling: "COMMINGLING"
187
+ const GetItemEligibilityPreviewProgramEnum = {
188
+ Inbound: "INBOUND",
189
+ Commingling: "COMMINGLING"
213
190
  };
214
-
215
- // src/api-model/configuration.ts
191
+ //#endregion
192
+ //#region src/api-model/configuration.ts
216
193
  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
- }
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
+ }
297
271
  };
298
-
299
- // src/api-model/models/item-eligibility-preview.ts
300
- var ItemEligibilityPreviewProgramEnum = {
301
- Inbound: "INBOUND",
302
- Commingling: "COMMINGLING"
272
+ //#endregion
273
+ //#region src/api-model/models/item-eligibility-preview.ts
274
+ const ItemEligibilityPreviewProgramEnum = {
275
+ Inbound: "INBOUND",
276
+ Commingling: "COMMINGLING"
303
277
  };
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"
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"
346
320
  };
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
- ];
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
+ }];
358
329
  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
- }
330
+ constructor(configuration) {
331
+ const { axios, endpoint } = (0, _sp_api_sdk_common.createAxiosInstance)(configuration, clientRateLimits);
332
+ super(new Configuration(), endpoint, axios);
333
+ }
363
334
  };
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
- });
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
+
376
346
  //# sourceMappingURL=index.cjs.map