@sp-api-sdk/external-fulfillment-inventory-api-2024-09-11 2.0.0 → 2.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/README.md +3 -4
- package/dist/index.cjs +283 -288
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +250 -319
- package/dist/index.d.ts +250 -319
- package/dist/index.js +258 -250
- package/dist/index.js.map +1 -1
- package/package.json +14 -6
package/README.md
CHANGED
|
@@ -67,10 +67,10 @@ const client = new ExternalFulfillmentInventoryApiClient({
|
|
|
67
67
|
region: 'eu',
|
|
68
68
|
logging: {
|
|
69
69
|
request: {
|
|
70
|
-
logger: console.debug
|
|
70
|
+
logger: console.debug,
|
|
71
71
|
},
|
|
72
72
|
response: {
|
|
73
|
-
logger: console.debug
|
|
73
|
+
logger: console.debug,
|
|
74
74
|
},
|
|
75
75
|
error: true,
|
|
76
76
|
},
|
|
@@ -81,14 +81,13 @@ Specifying `true` will use the default options, specifying an object will allow
|
|
|
81
81
|
This uses [axios-logger](https://github.com/hg-pyun/axios-logger) under the hood.
|
|
82
82
|
By default, if enabled, the `request` and `response` loggers will use `console.info` and the `error` logger will use `console.error`.
|
|
83
83
|
|
|
84
|
-
|
|
85
84
|
## License
|
|
86
85
|
|
|
87
86
|
MIT
|
|
88
87
|
|
|
89
88
|
## Miscellaneous
|
|
90
89
|
|
|
91
|
-
```
|
|
90
|
+
```text
|
|
92
91
|
╚⊙ ⊙╝
|
|
93
92
|
╚═(███)═╝
|
|
94
93
|
╚═(███)═╝
|
package/dist/index.cjs
CHANGED
|
@@ -1,320 +1,315 @@
|
|
|
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
|
-
// src/index.ts
|
|
31
|
-
var index_exports = {};
|
|
32
|
-
__export(index_exports, {
|
|
33
|
-
ExternalFulfillmentInventoryApi: () => ExternalFulfillmentInventoryApi,
|
|
34
|
-
ExternalFulfillmentInventoryApiAxiosParamCreator: () => ExternalFulfillmentInventoryApiAxiosParamCreator,
|
|
35
|
-
ExternalFulfillmentInventoryApiClient: () => ExternalFulfillmentInventoryApiClient,
|
|
36
|
-
ExternalFulfillmentInventoryApiFactory: () => ExternalFulfillmentInventoryApiFactory,
|
|
37
|
-
ExternalFulfillmentInventoryApiFp: () => ExternalFulfillmentInventoryApiFp,
|
|
38
|
-
HttpMethod: () => HttpMethod,
|
|
39
|
-
MarketplaceAttributesChannelNameEnum: () => MarketplaceAttributesChannelNameEnum,
|
|
40
|
-
clientRateLimits: () => clientRateLimits
|
|
41
|
-
});
|
|
42
|
-
module.exports = __toCommonJS(index_exports);
|
|
43
|
-
|
|
44
|
-
// src/client.ts
|
|
45
|
-
var import_common2 = require("@sp-api-sdk/common");
|
|
46
|
-
|
|
47
|
-
// src/api-model/api/external-fulfillment-inventory-api.ts
|
|
48
|
-
var import_axios2 = __toESM(require("axios"), 1);
|
|
49
|
-
|
|
50
|
-
// src/api-model/base.ts
|
|
51
|
-
var import_axios = __toESM(require("axios"), 1);
|
|
52
|
-
var BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
|
|
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(/\/+$/, "");
|
|
53
29
|
var BaseAPI = class {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
30
|
+
basePath;
|
|
31
|
+
axios;
|
|
32
|
+
configuration;
|
|
33
|
+
constructor(configuration, basePath = BASE_PATH, axios$3 = axios.default) {
|
|
34
|
+
this.basePath = basePath;
|
|
35
|
+
this.axios = axios$3;
|
|
36
|
+
if (configuration) {
|
|
37
|
+
this.configuration = configuration;
|
|
38
|
+
this.basePath = configuration.basePath ?? basePath;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
65
41
|
};
|
|
66
42
|
var RequiredError = class extends Error {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
43
|
+
field;
|
|
44
|
+
constructor(field, msg) {
|
|
45
|
+
super(msg);
|
|
46
|
+
this.field = field;
|
|
47
|
+
this.name = "RequiredError";
|
|
48
|
+
}
|
|
73
49
|
};
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
50
|
+
const operationServerMap = {};
|
|
51
|
+
//#endregion
|
|
52
|
+
//#region src/api-model/common.ts
|
|
53
|
+
const DUMMY_BASE_URL = "https://example.com";
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @throws {RequiredError}
|
|
57
|
+
*/
|
|
58
|
+
const assertParamExists = function(functionName, paramName, paramValue) {
|
|
59
|
+
if (paramValue === null || paramValue === void 0) throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
|
|
82
60
|
};
|
|
83
61
|
function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
Object.keys(parameter).forEach(
|
|
90
|
-
(currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`)
|
|
91
|
-
);
|
|
92
|
-
}
|
|
93
|
-
} else {
|
|
94
|
-
if (urlSearchParams.has(key)) {
|
|
95
|
-
urlSearchParams.append(key, parameter);
|
|
96
|
-
} else {
|
|
97
|
-
urlSearchParams.set(key, parameter);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
62
|
+
if (parameter == null) return;
|
|
63
|
+
if (typeof parameter === "object") if (Array.isArray(parameter) || parameter instanceof Set) parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
|
|
64
|
+
else Object.keys(parameter).forEach((currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`));
|
|
65
|
+
else if (urlSearchParams.has(key)) urlSearchParams.append(key, parameter);
|
|
66
|
+
else urlSearchParams.set(key, parameter);
|
|
100
67
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
68
|
+
const setSearchParams = function(url, ...objects) {
|
|
69
|
+
const searchParams = new URLSearchParams(url.search);
|
|
70
|
+
setFlattenedQueryParams(searchParams, objects);
|
|
71
|
+
url.search = searchParams.toString();
|
|
105
72
|
};
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
73
|
+
/**
|
|
74
|
+
* JSON serialization helper function which replaces instances of unserializable types with serializable ones.
|
|
75
|
+
* This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
|
|
76
|
+
* Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
|
|
77
|
+
*/
|
|
78
|
+
const replaceWithSerializableTypeIfNeeded = function(key, value) {
|
|
79
|
+
if (value instanceof Set) return Array.from(value);
|
|
80
|
+
else return value;
|
|
112
81
|
};
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
return needsSerialization ? JSON.stringify(value !== void 0 ? value : {}, replaceWithSerializableTypeIfNeeded) : value || "";
|
|
82
|
+
const serializeDataIfNeeded = function(value, requestOptions, configuration) {
|
|
83
|
+
const nonString = typeof value !== "string";
|
|
84
|
+
return (nonString && configuration && configuration.isJsonMime ? configuration.isJsonMime(requestOptions.headers["Content-Type"]) : nonString) ? JSON.stringify(value !== void 0 ? value : {}, replaceWithSerializableTypeIfNeeded) : value || "";
|
|
117
85
|
};
|
|
118
|
-
|
|
119
|
-
|
|
86
|
+
const toPathString = function(url) {
|
|
87
|
+
return url.pathname + url.search + url.hash;
|
|
120
88
|
};
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
89
|
+
const createRequestFunction = function(axiosArgs, globalAxios, BASE_PATH, configuration) {
|
|
90
|
+
return (axios = globalAxios, basePath = BASE_PATH) => {
|
|
91
|
+
const axiosRequestArgs = {
|
|
92
|
+
...axiosArgs.options,
|
|
93
|
+
url: (axios.defaults.baseURL ? "" : configuration?.basePath ?? basePath) + axiosArgs.url
|
|
94
|
+
};
|
|
95
|
+
return axios.request(axiosRequestArgs);
|
|
96
|
+
};
|
|
126
97
|
};
|
|
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
|
-
|
|
98
|
+
//#endregion
|
|
99
|
+
//#region src/api-model/api/external-fulfillment-inventory-api.ts
|
|
100
|
+
/**
|
|
101
|
+
* ExternalFulfillmentInventoryApi - axios parameter creator
|
|
102
|
+
*/
|
|
103
|
+
const ExternalFulfillmentInventoryApiAxiosParamCreator = function(configuration) {
|
|
104
|
+
return {
|
|
105
|
+
/**
|
|
106
|
+
* Make up to 10 inventory requests. The response includes the set of responses that correspond to requests. The response for each successful request in the set includes the inventory count for the provided `sku` and `locationId` pair.
|
|
107
|
+
* @param {BatchInventoryRequest} body A list of inventory requests.
|
|
108
|
+
* @param {*} [options] Override http request option.
|
|
109
|
+
* @throws {RequiredError}
|
|
110
|
+
*/
|
|
111
|
+
batchInventory: async (body, options = {}) => {
|
|
112
|
+
assertParamExists("batchInventory", "body", body);
|
|
113
|
+
const localVarUrlObj = new URL(`/externalFulfillment/inventory/2024-09-11/inventories`, DUMMY_BASE_URL);
|
|
114
|
+
let baseOptions;
|
|
115
|
+
if (configuration) baseOptions = configuration.baseOptions;
|
|
116
|
+
const localVarRequestOptions = {
|
|
117
|
+
method: "POST",
|
|
118
|
+
...baseOptions,
|
|
119
|
+
...options
|
|
120
|
+
};
|
|
121
|
+
const localVarHeaderParameter = {};
|
|
122
|
+
const localVarQueryParameter = {};
|
|
123
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
124
|
+
localVarHeaderParameter["Accept"] = "application/json";
|
|
125
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
126
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
127
|
+
localVarRequestOptions.headers = {
|
|
128
|
+
...localVarHeaderParameter,
|
|
129
|
+
...headersFromBaseOptions,
|
|
130
|
+
...options.headers
|
|
131
|
+
};
|
|
132
|
+
localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
|
|
133
|
+
return {
|
|
134
|
+
url: toPathString(localVarUrlObj),
|
|
135
|
+
options: localVarRequestOptions
|
|
136
|
+
};
|
|
137
|
+
} };
|
|
160
138
|
};
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
139
|
+
/**
|
|
140
|
+
* ExternalFulfillmentInventoryApi - functional programming interface
|
|
141
|
+
*/
|
|
142
|
+
const ExternalFulfillmentInventoryApiFp = function(configuration) {
|
|
143
|
+
const localVarAxiosParamCreator = ExternalFulfillmentInventoryApiAxiosParamCreator(configuration);
|
|
144
|
+
return {
|
|
145
|
+
/**
|
|
146
|
+
* Make up to 10 inventory requests. The response includes the set of responses that correspond to requests. The response for each successful request in the set includes the inventory count for the provided `sku` and `locationId` pair.
|
|
147
|
+
* @param {BatchInventoryRequest} body A list of inventory requests.
|
|
148
|
+
* @param {*} [options] Override http request option.
|
|
149
|
+
* @throws {RequiredError}
|
|
150
|
+
*/
|
|
151
|
+
async batchInventory(body, options) {
|
|
152
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.batchInventory(body, options);
|
|
153
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
154
|
+
const localVarOperationServerBasePath = operationServerMap["ExternalFulfillmentInventoryApi.batchInventory"]?.[localVarOperationServerIndex]?.url;
|
|
155
|
+
return (axios$1, basePath) => createRequestFunction(localVarAxiosArgs, axios.default, BASE_PATH, configuration)(axios$1, localVarOperationServerBasePath || basePath);
|
|
156
|
+
} };
|
|
177
157
|
};
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
158
|
+
/**
|
|
159
|
+
* ExternalFulfillmentInventoryApi - factory interface
|
|
160
|
+
*/
|
|
161
|
+
const ExternalFulfillmentInventoryApiFactory = function(configuration, basePath, axios$2) {
|
|
162
|
+
const localVarFp = ExternalFulfillmentInventoryApiFp(configuration);
|
|
163
|
+
return {
|
|
164
|
+
/**
|
|
165
|
+
* Make up to 10 inventory requests. The response includes the set of responses that correspond to requests. The response for each successful request in the set includes the inventory count for the provided `sku` and `locationId` pair.
|
|
166
|
+
* @param {ExternalFulfillmentInventoryApiBatchInventoryRequest} requestParameters Request parameters.
|
|
167
|
+
* @param {*} [options] Override http request option.
|
|
168
|
+
* @throws {RequiredError}
|
|
169
|
+
*/
|
|
170
|
+
batchInventory(requestParameters, options) {
|
|
171
|
+
return localVarFp.batchInventory(requestParameters.body, options).then((request) => request(axios$2, basePath));
|
|
172
|
+
} };
|
|
191
173
|
};
|
|
174
|
+
/**
|
|
175
|
+
* ExternalFulfillmentInventoryApi - object-oriented interface
|
|
176
|
+
*/
|
|
192
177
|
var ExternalFulfillmentInventoryApi = class extends BaseAPI {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
178
|
+
/**
|
|
179
|
+
* Make up to 10 inventory requests. The response includes the set of responses that correspond to requests. The response for each successful request in the set includes the inventory count for the provided `sku` and `locationId` pair.
|
|
180
|
+
* @param {ExternalFulfillmentInventoryApiBatchInventoryRequest} requestParameters Request parameters.
|
|
181
|
+
* @param {*} [options] Override http request option.
|
|
182
|
+
* @throws {RequiredError}
|
|
183
|
+
*/
|
|
184
|
+
batchInventory(requestParameters, options) {
|
|
185
|
+
return ExternalFulfillmentInventoryApiFp(this.configuration).batchInventory(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
|
|
186
|
+
}
|
|
202
187
|
};
|
|
203
|
-
|
|
204
|
-
|
|
188
|
+
//#endregion
|
|
189
|
+
//#region src/api-model/configuration.ts
|
|
205
190
|
var Configuration = class {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
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
|
-
const jsonMime = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i;
|
|
284
|
-
return mime !== null && jsonMime.test(mime);
|
|
285
|
-
}
|
|
191
|
+
/**
|
|
192
|
+
* parameter for apiKey security
|
|
193
|
+
* @param name security name
|
|
194
|
+
*/
|
|
195
|
+
apiKey;
|
|
196
|
+
/**
|
|
197
|
+
* parameter for basic security
|
|
198
|
+
*/
|
|
199
|
+
username;
|
|
200
|
+
/**
|
|
201
|
+
* parameter for basic security
|
|
202
|
+
*/
|
|
203
|
+
password;
|
|
204
|
+
/**
|
|
205
|
+
* parameter for oauth2 security
|
|
206
|
+
* @param name security name
|
|
207
|
+
* @param scopes oauth2 scope
|
|
208
|
+
*/
|
|
209
|
+
accessToken;
|
|
210
|
+
/**
|
|
211
|
+
* parameter for aws4 signature security
|
|
212
|
+
* @param {Object} AWS4Signature - AWS4 Signature security
|
|
213
|
+
* @param {string} options.region - aws region
|
|
214
|
+
* @param {string} options.service - name of the service.
|
|
215
|
+
* @param {string} credentials.accessKeyId - aws access key id
|
|
216
|
+
* @param {string} credentials.secretAccessKey - aws access key
|
|
217
|
+
* @param {string} credentials.sessionToken - aws session token
|
|
218
|
+
* @memberof Configuration
|
|
219
|
+
*/
|
|
220
|
+
awsv4;
|
|
221
|
+
/**
|
|
222
|
+
* override base path
|
|
223
|
+
*/
|
|
224
|
+
basePath;
|
|
225
|
+
/**
|
|
226
|
+
* override server index
|
|
227
|
+
*/
|
|
228
|
+
serverIndex;
|
|
229
|
+
/**
|
|
230
|
+
* base options for axios calls
|
|
231
|
+
*/
|
|
232
|
+
baseOptions;
|
|
233
|
+
/**
|
|
234
|
+
* The FormData constructor that will be used to create multipart form data
|
|
235
|
+
* requests. You can inject this here so that execution environments that
|
|
236
|
+
* do not support the FormData class can still run the generated client.
|
|
237
|
+
*
|
|
238
|
+
* @type {new () => FormData}
|
|
239
|
+
*/
|
|
240
|
+
formDataCtor;
|
|
241
|
+
constructor(param = {}) {
|
|
242
|
+
this.apiKey = param.apiKey;
|
|
243
|
+
this.username = param.username;
|
|
244
|
+
this.password = param.password;
|
|
245
|
+
this.accessToken = param.accessToken;
|
|
246
|
+
this.awsv4 = param.awsv4;
|
|
247
|
+
this.basePath = param.basePath;
|
|
248
|
+
this.serverIndex = param.serverIndex;
|
|
249
|
+
this.baseOptions = {
|
|
250
|
+
...param.baseOptions,
|
|
251
|
+
headers: { ...param.baseOptions?.headers }
|
|
252
|
+
};
|
|
253
|
+
this.formDataCtor = param.formDataCtor;
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Check if the given MIME is a JSON MIME.
|
|
257
|
+
* JSON MIME examples:
|
|
258
|
+
* application/json
|
|
259
|
+
* application/json; charset=UTF8
|
|
260
|
+
* APPLICATION/JSON
|
|
261
|
+
* application/vnd.company+json
|
|
262
|
+
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
263
|
+
* @return True if the given MIME is JSON, false otherwise.
|
|
264
|
+
*/
|
|
265
|
+
isJsonMime(mime) {
|
|
266
|
+
return mime !== null && /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i.test(mime);
|
|
267
|
+
}
|
|
286
268
|
};
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
269
|
+
//#endregion
|
|
270
|
+
//#region src/api-model/models/http-method.ts
|
|
271
|
+
/**
|
|
272
|
+
* The Selling Partner API for External Fulfillment Inventory Management
|
|
273
|
+
* You can use the Amazon External Fulfillment Inventory API to manage inventory operations in Amazon\'s External Fulfillment network, including batch inventory updates and retrievals.
|
|
274
|
+
*
|
|
275
|
+
* The version of the OpenAPI document: 2024-09-11
|
|
276
|
+
*
|
|
277
|
+
*
|
|
278
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
279
|
+
* https://openapi-generator.tech
|
|
280
|
+
* Do not edit the class manually.
|
|
281
|
+
*/
|
|
282
|
+
/**
|
|
283
|
+
* The HTTP method associated with an individual request within a batch.
|
|
284
|
+
*/
|
|
285
|
+
const HttpMethod = {
|
|
286
|
+
Get: "GET",
|
|
287
|
+
Post: "POST"
|
|
292
288
|
};
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
289
|
+
//#endregion
|
|
290
|
+
//#region src/api-model/models/marketplace-attributes.ts
|
|
291
|
+
const MarketplaceAttributesChannelNameEnum = {
|
|
292
|
+
Fba: "FBA",
|
|
293
|
+
Mfn: "MFN",
|
|
294
|
+
Df: "DF"
|
|
299
295
|
};
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
296
|
+
//#endregion
|
|
297
|
+
//#region src/client.ts
|
|
298
|
+
const clientRateLimits = [];
|
|
303
299
|
var ExternalFulfillmentInventoryApiClient = class extends ExternalFulfillmentInventoryApi {
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
300
|
+
constructor(configuration) {
|
|
301
|
+
const { axios, endpoint } = (0, _sp_api_sdk_common.createAxiosInstance)(configuration, clientRateLimits);
|
|
302
|
+
super(new Configuration(), endpoint, axios);
|
|
303
|
+
}
|
|
308
304
|
};
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
});
|
|
305
|
+
//#endregion
|
|
306
|
+
exports.ExternalFulfillmentInventoryApi = ExternalFulfillmentInventoryApi;
|
|
307
|
+
exports.ExternalFulfillmentInventoryApiAxiosParamCreator = ExternalFulfillmentInventoryApiAxiosParamCreator;
|
|
308
|
+
exports.ExternalFulfillmentInventoryApiClient = ExternalFulfillmentInventoryApiClient;
|
|
309
|
+
exports.ExternalFulfillmentInventoryApiFactory = ExternalFulfillmentInventoryApiFactory;
|
|
310
|
+
exports.ExternalFulfillmentInventoryApiFp = ExternalFulfillmentInventoryApiFp;
|
|
311
|
+
exports.HttpMethod = HttpMethod;
|
|
312
|
+
exports.MarketplaceAttributesChannelNameEnum = MarketplaceAttributesChannelNameEnum;
|
|
313
|
+
exports.clientRateLimits = clientRateLimits;
|
|
314
|
+
|
|
320
315
|
//# sourceMappingURL=index.cjs.map
|