@sp-api-sdk/fba-inbound-eligibility-api-v1 5.0.0 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -4
- package/dist/index.cjs +314 -344
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +231 -249
- package/dist/index.d.ts +231 -249
- package/dist/index.js +288 -305
- package/dist/index.js.map +1 -1
- package/package.json +7 -4
package/dist/index.cjs
CHANGED
|
@@ -1,376 +1,346 @@
|
|
|
1
|
-
"
|
|
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
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
)
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
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
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
49
|
+
field;
|
|
50
|
+
constructor(field, msg) {
|
|
51
|
+
super(msg);
|
|
52
|
+
this.field = field;
|
|
53
|
+
this.name = "RequiredError";
|
|
54
|
+
}
|
|
80
55
|
};
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
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
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
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
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
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
|
-
|
|
114
|
-
|
|
79
|
+
const toPathString = function(url) {
|
|
80
|
+
return url.pathname + url.search + url.hash;
|
|
115
81
|
};
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
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
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
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=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
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
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=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
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
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
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
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
|
-
|
|
211
|
-
|
|
212
|
-
|
|
187
|
+
const GetItemEligibilityPreviewProgramEnum = {
|
|
188
|
+
Inbound: "INBOUND",
|
|
189
|
+
Commingling: "COMMINGLING"
|
|
213
190
|
};
|
|
214
|
-
|
|
215
|
-
|
|
191
|
+
//#endregion
|
|
192
|
+
//#region src/api-model/configuration.ts
|
|
216
193
|
var Configuration = class {
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
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
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
272
|
+
//#endregion
|
|
273
|
+
//#region src/api-model/models/item-eligibility-preview.ts
|
|
274
|
+
const ItemEligibilityPreviewProgramEnum = {
|
|
275
|
+
Inbound: "INBOUND",
|
|
276
|
+
Commingling: "COMMINGLING"
|
|
303
277
|
};
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
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
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
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
|
-
|
|
360
|
-
|
|
361
|
-
|
|
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
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
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
|