@sp-api-sdk/external-fulfillment-inventory-api-2024-09-11 2.0.0 → 2.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 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
- "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
- 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
- constructor(configuration, basePath = BASE_PATH, axios = import_axios.default) {
55
- this.basePath = basePath;
56
- this.axios = axios;
57
- if (configuration) {
58
- this.configuration = configuration;
59
- this.basePath = configuration.basePath ?? basePath;
60
- }
61
- }
62
- basePath;
63
- axios;
64
- configuration;
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
- constructor(field, msg) {
68
- super(msg);
69
- this.field = field;
70
- this.name = "RequiredError";
71
- }
72
- field;
43
+ field;
44
+ constructor(field, msg) {
45
+ super(msg);
46
+ this.field = field;
47
+ this.name = "RequiredError";
48
+ }
73
49
  };
74
- var operationServerMap = {};
75
-
76
- // src/api-model/common.ts
77
- var DUMMY_BASE_URL = "https://example.com";
78
- var assertParamExists = function(functionName, paramName, paramValue) {
79
- if (paramValue === null || paramValue === void 0) {
80
- throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
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
- if (parameter == null) return;
85
- if (typeof parameter === "object") {
86
- if (Array.isArray(parameter) || parameter instanceof Set) {
87
- parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
88
- } else {
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
- var setSearchParams = function(url, ...objects) {
102
- const searchParams = new URLSearchParams(url.search);
103
- setFlattenedQueryParams(searchParams, objects);
104
- url.search = searchParams.toString();
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
- var replaceWithSerializableTypeIfNeeded = function(key, value) {
107
- if (value instanceof Set) {
108
- return Array.from(value);
109
- } else {
110
- return value;
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
- var serializeDataIfNeeded = function(value, requestOptions, configuration) {
114
- const nonString = typeof value !== "string";
115
- const needsSerialization = nonString && configuration && configuration.isJsonMime ? configuration.isJsonMime(requestOptions.headers["Content-Type"]) : nonString;
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
- var toPathString = function(url) {
119
- return url.pathname + url.search + url.hash;
86
+ const toPathString = function(url) {
87
+ return url.pathname + url.search + url.hash;
120
88
  };
121
- var createRequestFunction = function(axiosArgs, globalAxios3, BASE_PATH2, configuration) {
122
- return (axios = globalAxios3, basePath = BASE_PATH2) => {
123
- const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? "" : configuration?.basePath ?? basePath) + axiosArgs.url };
124
- return axios.request(axiosRequestArgs);
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
- // src/api-model/api/external-fulfillment-inventory-api.ts
129
- var ExternalFulfillmentInventoryApiAxiosParamCreator = function(configuration) {
130
- return {
131
- /**
132
- * 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.
133
- * @param {BatchInventoryRequest} body A list of inventory requests.
134
- * @param {*} [options] Override http request option.
135
- * @throws {RequiredError}
136
- */
137
- batchInventory: async (body, options = {}) => {
138
- assertParamExists("batchInventory", "body", body);
139
- const localVarPath = `/externalFulfillment/inventory/2024-09-11/inventories`;
140
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
141
- let baseOptions;
142
- if (configuration) {
143
- baseOptions = configuration.baseOptions;
144
- }
145
- const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
146
- const localVarHeaderParameter = {};
147
- const localVarQueryParameter = {};
148
- localVarHeaderParameter["Content-Type"] = "application/json";
149
- localVarHeaderParameter["Accept"] = "application/json";
150
- setSearchParams(localVarUrlObj, localVarQueryParameter);
151
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
152
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
153
- localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
154
- return {
155
- url: toPathString(localVarUrlObj),
156
- options: localVarRequestOptions
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
- var ExternalFulfillmentInventoryApiFp = function(configuration) {
162
- const localVarAxiosParamCreator = ExternalFulfillmentInventoryApiAxiosParamCreator(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 {BatchInventoryRequest} body A list of inventory requests.
167
- * @param {*} [options] Override http request option.
168
- * @throws {RequiredError}
169
- */
170
- async batchInventory(body, options) {
171
- const localVarAxiosArgs = await localVarAxiosParamCreator.batchInventory(body, options);
172
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
173
- const localVarOperationServerBasePath = operationServerMap["ExternalFulfillmentInventoryApi.batchInventory"]?.[localVarOperationServerIndex]?.url;
174
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, import_axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
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
- var ExternalFulfillmentInventoryApiFactory = function(configuration, basePath, axios) {
179
- const localVarFp = ExternalFulfillmentInventoryApiFp(configuration);
180
- return {
181
- /**
182
- * 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.
183
- * @param {ExternalFulfillmentInventoryApiBatchInventoryRequest} requestParameters Request parameters.
184
- * @param {*} [options] Override http request option.
185
- * @throws {RequiredError}
186
- */
187
- batchInventory(requestParameters, options) {
188
- return localVarFp.batchInventory(requestParameters.body, options).then((request) => request(axios, basePath));
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
- * 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.
195
- * @param {ExternalFulfillmentInventoryApiBatchInventoryRequest} requestParameters Request parameters.
196
- * @param {*} [options] Override http request option.
197
- * @throws {RequiredError}
198
- */
199
- batchInventory(requestParameters, options) {
200
- return ExternalFulfillmentInventoryApiFp(this.configuration).batchInventory(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
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
- // src/api-model/configuration.ts
188
+ //#endregion
189
+ //#region src/api-model/configuration.ts
205
190
  var Configuration = class {
206
- /**
207
- * parameter for apiKey security
208
- * @param name security name
209
- */
210
- apiKey;
211
- /**
212
- * parameter for basic security
213
- */
214
- username;
215
- /**
216
- * parameter for basic security
217
- */
218
- password;
219
- /**
220
- * parameter for oauth2 security
221
- * @param name security name
222
- * @param scopes oauth2 scope
223
- */
224
- accessToken;
225
- /**
226
- * parameter for aws4 signature security
227
- * @param {Object} AWS4Signature - AWS4 Signature security
228
- * @param {string} options.region - aws region
229
- * @param {string} options.service - name of the service.
230
- * @param {string} credentials.accessKeyId - aws access key id
231
- * @param {string} credentials.secretAccessKey - aws access key
232
- * @param {string} credentials.sessionToken - aws session token
233
- * @memberof Configuration
234
- */
235
- awsv4;
236
- /**
237
- * override base path
238
- */
239
- basePath;
240
- /**
241
- * override server index
242
- */
243
- serverIndex;
244
- /**
245
- * base options for axios calls
246
- */
247
- baseOptions;
248
- /**
249
- * The FormData constructor that will be used to create multipart form data
250
- * requests. You can inject this here so that execution environments that
251
- * do not support the FormData class can still run the generated client.
252
- *
253
- * @type {new () => FormData}
254
- */
255
- formDataCtor;
256
- constructor(param = {}) {
257
- this.apiKey = param.apiKey;
258
- this.username = param.username;
259
- this.password = param.password;
260
- this.accessToken = param.accessToken;
261
- this.awsv4 = param.awsv4;
262
- this.basePath = param.basePath;
263
- this.serverIndex = param.serverIndex;
264
- this.baseOptions = {
265
- ...param.baseOptions,
266
- headers: {
267
- ...param.baseOptions?.headers
268
- }
269
- };
270
- this.formDataCtor = param.formDataCtor;
271
- }
272
- /**
273
- * Check if the given MIME is a JSON MIME.
274
- * JSON MIME examples:
275
- * application/json
276
- * application/json; charset=UTF8
277
- * APPLICATION/JSON
278
- * application/vnd.company+json
279
- * @param mime - MIME (Multipurpose Internet Mail Extensions)
280
- * @return True if the given MIME is JSON, false otherwise.
281
- */
282
- isJsonMime(mime) {
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
- // src/api-model/models/http-method.ts
289
- var HttpMethod = {
290
- Get: "GET",
291
- Post: "POST"
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
- // src/api-model/models/marketplace-attributes.ts
295
- var MarketplaceAttributesChannelNameEnum = {
296
- Fba: "FBA",
297
- Mfn: "MFN",
298
- Df: "DF"
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
- // src/client.ts
302
- var clientRateLimits = [];
296
+ //#endregion
297
+ //#region src/client.ts
298
+ const clientRateLimits = [];
303
299
  var ExternalFulfillmentInventoryApiClient = class extends ExternalFulfillmentInventoryApi {
304
- constructor(configuration) {
305
- const { axios, endpoint } = (0, import_common2.createAxiosInstance)(configuration, clientRateLimits);
306
- super(new Configuration(), endpoint, axios);
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
- // Annotate the CommonJS export names for ESM import in node:
310
- 0 && (module.exports = {
311
- ExternalFulfillmentInventoryApi,
312
- ExternalFulfillmentInventoryApiAxiosParamCreator,
313
- ExternalFulfillmentInventoryApiClient,
314
- ExternalFulfillmentInventoryApiFactory,
315
- ExternalFulfillmentInventoryApiFp,
316
- HttpMethod,
317
- MarketplaceAttributesChannelNameEnum,
318
- clientRateLimits
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