@sp-api-sdk/external-fulfillment-shipments-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/dist/index.cjs CHANGED
@@ -1,1238 +1,1325 @@
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
- CancellationCancellationTypeEnum: () => CancellationCancellationTypeEnum,
34
- ChargeChargeTypeEnum: () => ChargeChargeTypeEnum,
35
- CustomAttributeType: () => CustomAttributeType,
36
- DimensionDimensionUnitEnum: () => DimensionDimensionUnitEnum,
37
- DistanceDistanceUnitEnum: () => DistanceDistanceUnitEnum,
38
- DocumentFormatEnum: () => DocumentFormatEnum,
39
- ExternalFulfillmentShipmentsApi: () => ExternalFulfillmentShipmentsApi,
40
- ExternalFulfillmentShipmentsApiAxiosParamCreator: () => ExternalFulfillmentShipmentsApiAxiosParamCreator,
41
- ExternalFulfillmentShipmentsApiClient: () => ExternalFulfillmentShipmentsApiClient,
42
- ExternalFulfillmentShipmentsApiFactory: () => ExternalFulfillmentShipmentsApiFactory,
43
- ExternalFulfillmentShipmentsApiFp: () => ExternalFulfillmentShipmentsApiFp,
44
- GenerateShipLabelsOperationEnum: () => GenerateShipLabelsOperationEnum,
45
- GetShipmentsStatusEnum: () => GetShipmentsStatusEnum,
46
- InvoiceRequirementRequirementEnum: () => InvoiceRequirementRequirementEnum,
47
- InvoiceRequirementStatusEnum: () => InvoiceRequirementStatusEnum,
48
- LineItemWithReasonReasonEnum: () => LineItemWithReasonReasonEnum,
49
- MarketplaceAttributesCustomAttributesEnum: () => MarketplaceAttributesCustomAttributesEnum,
50
- PackagePackageHandlingRequirementsEnum: () => PackagePackageHandlingRequirementsEnum,
51
- PackageStatus: () => PackageStatus,
52
- PackageStatusEnum: () => PackageStatusEnum,
53
- PackageSubStatus: () => PackageSubStatus,
54
- PackingSlipRequirementRequirementEnum: () => PackingSlipRequirementRequirementEnum,
55
- PackingSlipRequirementStatusEnum: () => PackingSlipRequirementStatusEnum,
56
- PartyIdentificationInfoPartyTypeEnum: () => PartyIdentificationInfoPartyTypeEnum,
57
- PieceType: () => PieceType,
58
- PresenceStatus: () => PresenceStatus,
59
- Priority: () => Priority,
60
- ProcessShipmentOperationEnum: () => ProcessShipmentOperationEnum,
61
- RequirementLevel: () => RequirementLevel,
62
- ShipmentInfoPaymentMethodEnum: () => ShipmentInfoPaymentMethodEnum,
63
- ShipmentInfoProcessingSourceEnum: () => ShipmentInfoProcessingSourceEnum,
64
- ShipmentInfoShipmentTypeEnum: () => ShipmentInfoShipmentTypeEnum,
65
- ShipmentStatusEnum: () => ShipmentStatusEnum,
66
- ShipmentSubStatusEnum: () => ShipmentSubStatusEnum,
67
- ShippingInfoShippingTypeEnum: () => ShippingInfoShippingTypeEnum,
68
- ShippingOptionsShipByEnum: () => ShippingOptionsShipByEnum,
69
- Status: () => Status,
70
- TaxRegistrationInfoTypeEnum: () => TaxRegistrationInfoTypeEnum,
71
- TaxTypeEnum: () => TaxTypeEnum,
72
- TimeWindowHandoverMethodEnum: () => TimeWindowHandoverMethodEnum,
73
- UpdatePackageStatusStatusEnum: () => UpdatePackageStatusStatusEnum,
74
- WeightWeightUnitEnum: () => WeightWeightUnitEnum,
75
- clientRateLimits: () => clientRateLimits
76
- });
77
- module.exports = __toCommonJS(index_exports);
78
-
79
- // src/client.ts
80
- var import_common2 = require("@sp-api-sdk/common");
81
-
82
- // src/api-model/api/external-fulfillment-shipments-api.ts
83
- var import_axios2 = __toESM(require("axios"), 1);
84
-
85
- // src/api-model/base.ts
86
- var import_axios = __toESM(require("axios"), 1);
87
- 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(/\/+$/, "");
88
29
  var BaseAPI = class {
89
- constructor(configuration, basePath = BASE_PATH, axios = import_axios.default) {
90
- this.basePath = basePath;
91
- this.axios = axios;
92
- if (configuration) {
93
- this.configuration = configuration;
94
- this.basePath = configuration.basePath ?? basePath;
95
- }
96
- }
97
- basePath;
98
- axios;
99
- configuration;
30
+ basePath;
31
+ axios;
32
+ configuration;
33
+ constructor(configuration, basePath = BASE_PATH, axios$12 = axios.default) {
34
+ this.basePath = basePath;
35
+ this.axios = axios$12;
36
+ if (configuration) {
37
+ this.configuration = configuration;
38
+ this.basePath = configuration.basePath ?? basePath;
39
+ }
40
+ }
100
41
  };
101
42
  var RequiredError = class extends Error {
102
- constructor(field, msg) {
103
- super(msg);
104
- this.field = field;
105
- this.name = "RequiredError";
106
- }
107
- field;
43
+ field;
44
+ constructor(field, msg) {
45
+ super(msg);
46
+ this.field = field;
47
+ this.name = "RequiredError";
48
+ }
108
49
  };
109
- var operationServerMap = {};
110
-
111
- // src/api-model/common.ts
112
- var DUMMY_BASE_URL = "https://example.com";
113
- var assertParamExists = function(functionName, paramName, paramValue) {
114
- if (paramValue === null || paramValue === void 0) {
115
- throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
116
- }
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}.`);
117
60
  };
118
61
  function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
119
- if (parameter == null) return;
120
- if (typeof parameter === "object") {
121
- if (Array.isArray(parameter) || parameter instanceof Set) {
122
- parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
123
- } else {
124
- Object.keys(parameter).forEach(
125
- (currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`)
126
- );
127
- }
128
- } else {
129
- if (urlSearchParams.has(key)) {
130
- urlSearchParams.append(key, parameter);
131
- } else {
132
- urlSearchParams.set(key, parameter);
133
- }
134
- }
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);
135
67
  }
136
- var setSearchParams = function(url, ...objects) {
137
- const searchParams = new URLSearchParams(url.search);
138
- setFlattenedQueryParams(searchParams, objects);
139
- 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();
140
72
  };
141
- var replaceWithSerializableTypeIfNeeded = function(key, value) {
142
- if (value instanceof Set) {
143
- return Array.from(value);
144
- } else {
145
- return value;
146
- }
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;
147
81
  };
148
- var serializeDataIfNeeded = function(value, requestOptions, configuration) {
149
- const nonString = typeof value !== "string";
150
- const needsSerialization = nonString && configuration && configuration.isJsonMime ? configuration.isJsonMime(requestOptions.headers["Content-Type"]) : nonString;
151
- 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 || "";
152
85
  };
153
- var toPathString = function(url) {
154
- return url.pathname + url.search + url.hash;
86
+ const toPathString = function(url) {
87
+ return url.pathname + url.search + url.hash;
155
88
  };
156
- var createRequestFunction = function(axiosArgs, globalAxios3, BASE_PATH2, configuration) {
157
- return (axios = globalAxios3, basePath = BASE_PATH2) => {
158
- const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? "" : configuration?.basePath ?? basePath) + axiosArgs.url };
159
- return axios.request(axiosRequestArgs);
160
- };
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
+ };
161
97
  };
162
-
163
- // src/api-model/api/external-fulfillment-shipments-api.ts
164
- var ExternalFulfillmentShipmentsApiAxiosParamCreator = function(configuration) {
165
- return {
166
- /**
167
- * Provide details about the packages in the specified shipment.
168
- * @param {string} shipmentId The ID of the shipment.
169
- * @param {Packages} body A list of packages in the shipment.
170
- * @param {*} [options] Override http request option.
171
- * @throws {RequiredError}
172
- */
173
- createPackages: async (shipmentId, body, options = {}) => {
174
- assertParamExists("createPackages", "shipmentId", shipmentId);
175
- assertParamExists("createPackages", "body", body);
176
- const localVarPath = `/externalFulfillment/2024-09-11/shipments/{shipmentId}/packages`.replace("{shipmentId}", encodeURIComponent(String(shipmentId)));
177
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
178
- let baseOptions;
179
- if (configuration) {
180
- baseOptions = configuration.baseOptions;
181
- }
182
- const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
183
- const localVarHeaderParameter = {};
184
- const localVarQueryParameter = {};
185
- localVarHeaderParameter["Content-Type"] = "application/json";
186
- localVarHeaderParameter["Accept"] = "application/json";
187
- setSearchParams(localVarUrlObj, localVarQueryParameter);
188
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
189
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
190
- localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
191
- return {
192
- url: toPathString(localVarUrlObj),
193
- options: localVarRequestOptions
194
- };
195
- },
196
- /**
197
- * Get invoices for the shipment you specify.
198
- * @param {string} shipmentId The ID of the shipment whose invoice you want.
199
- * @param {*} [options] Override http request option.
200
- * @throws {RequiredError}
201
- */
202
- generateInvoice: async (shipmentId, options = {}) => {
203
- assertParamExists("generateInvoice", "shipmentId", shipmentId);
204
- const localVarPath = `/externalFulfillment/2024-09-11/shipments/{shipmentId}/invoice`.replace("{shipmentId}", encodeURIComponent(String(shipmentId)));
205
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
206
- let baseOptions;
207
- if (configuration) {
208
- baseOptions = configuration.baseOptions;
209
- }
210
- const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
211
- const localVarHeaderParameter = {};
212
- const localVarQueryParameter = {};
213
- localVarHeaderParameter["Accept"] = "application/json";
214
- setSearchParams(localVarUrlObj, localVarQueryParameter);
215
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
216
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
217
- return {
218
- url: toPathString(localVarUrlObj),
219
- options: localVarRequestOptions
220
- };
221
- },
222
- /**
223
- * Generate and retrieve all shipping labels for one or more packages in the shipment you specify.
224
- * @param {string} shipmentId The ID of the shipment whose shipping labels you want to generate and retrieve.
225
- * @param {GenerateShipLabelsOperationEnum} operation Specify whether you want to generate or regenerate a label.
226
- * @param {string} [shippingOptionId] The ID of the shipping option whose shipping labels you want.
227
- * @param {ShipLabelsInput} [body] Shipping details for when shipping is not done by the marketplace channel.
228
- * @param {*} [options] Override http request option.
229
- * @throws {RequiredError}
230
- */
231
- generateShipLabels: async (shipmentId, operation, shippingOptionId, body, options = {}) => {
232
- assertParamExists("generateShipLabels", "shipmentId", shipmentId);
233
- assertParamExists("generateShipLabels", "operation", operation);
234
- const localVarPath = `/externalFulfillment/2024-09-11/shipments/{shipmentId}/shipLabels`.replace("{shipmentId}", encodeURIComponent(String(shipmentId)));
235
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
236
- let baseOptions;
237
- if (configuration) {
238
- baseOptions = configuration.baseOptions;
239
- }
240
- const localVarRequestOptions = { method: "PUT", ...baseOptions, ...options };
241
- const localVarHeaderParameter = {};
242
- const localVarQueryParameter = {};
243
- if (shippingOptionId !== void 0) {
244
- localVarQueryParameter["shippingOptionId"] = shippingOptionId;
245
- }
246
- if (operation !== void 0) {
247
- localVarQueryParameter["operation"] = operation;
248
- }
249
- localVarHeaderParameter["Content-Type"] = "application/json";
250
- localVarHeaderParameter["Accept"] = "application/json";
251
- setSearchParams(localVarUrlObj, localVarQueryParameter);
252
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
253
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
254
- localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
255
- return {
256
- url: toPathString(localVarUrlObj),
257
- options: localVarRequestOptions
258
- };
259
- },
260
- /**
261
- * Get a single shipment with the ID you specify.
262
- * @param {string} shipmentId The ID of the shipment you want to retrieve.
263
- * @param {*} [options] Override http request option.
264
- * @throws {RequiredError}
265
- */
266
- getShipment: async (shipmentId, options = {}) => {
267
- assertParamExists("getShipment", "shipmentId", shipmentId);
268
- const localVarPath = `/externalFulfillment/2024-09-11/shipments/{shipmentId}`.replace("{shipmentId}", encodeURIComponent(String(shipmentId)));
269
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
270
- let baseOptions;
271
- if (configuration) {
272
- baseOptions = configuration.baseOptions;
273
- }
274
- const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
275
- const localVarHeaderParameter = {};
276
- const localVarQueryParameter = {};
277
- localVarHeaderParameter["Accept"] = "application/json";
278
- setSearchParams(localVarUrlObj, localVarQueryParameter);
279
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
280
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
281
- return {
282
- url: toPathString(localVarUrlObj),
283
- options: localVarRequestOptions
284
- };
285
- },
286
- /**
287
- * Get a list of shipments created for the seller in the status you specify. Shipments can be further filtered based on the fulfillment node or the time of the shipments\' last update.
288
- * @param {GetShipmentsStatusEnum} status The status of shipment you want to include in the response. To retrieve all new shipments, set this value to &#x60;CREATED&#x60; or &#x60;ACCEPTED&#x60;.
289
- * @param {string} [locationId] The Amazon channel location identifier for the shipments you want to retrieve.
290
- * @param {string} [marketplaceId] The marketplace ID associated with the location. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
291
- * @param {string} [channelName] The channel name associated with the location.
292
- * @param {string} [lastUpdatedAfter] The response includes shipments whose latest update is after the specified time. In [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
293
- * @param {string} [lastUpdatedBefore] The response includes shipments whose latest update is before the specified time. In [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
294
- * @param {number} [maxResults] The maximum number of shipments to include in the response.
295
- * @param {string} [paginationToken] A token that you use to retrieve the next page of results. The response includes &#x60;nextToken&#x60; when there are multiple pages of results. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until &#x60;nextToken&#x60; is null. Note that this operation can return empty pages.
296
- * @param {*} [options] Override http request option.
297
- * @throws {RequiredError}
298
- */
299
- getShipments: async (status, locationId, marketplaceId, channelName, lastUpdatedAfter, lastUpdatedBefore, maxResults, paginationToken, options = {}) => {
300
- assertParamExists("getShipments", "status", status);
301
- const localVarPath = `/externalFulfillment/2024-09-11/shipments`;
302
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
303
- let baseOptions;
304
- if (configuration) {
305
- baseOptions = configuration.baseOptions;
306
- }
307
- const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
308
- const localVarHeaderParameter = {};
309
- const localVarQueryParameter = {};
310
- if (locationId !== void 0) {
311
- localVarQueryParameter["locationId"] = locationId;
312
- }
313
- if (marketplaceId !== void 0) {
314
- localVarQueryParameter["marketplaceId"] = marketplaceId;
315
- }
316
- if (channelName !== void 0) {
317
- localVarQueryParameter["channelName"] = channelName;
318
- }
319
- if (status !== void 0) {
320
- localVarQueryParameter["status"] = status;
321
- }
322
- if (lastUpdatedAfter !== void 0) {
323
- localVarQueryParameter["lastUpdatedAfter"] = lastUpdatedAfter instanceof Date ? lastUpdatedAfter.toISOString() : lastUpdatedAfter;
324
- }
325
- if (lastUpdatedBefore !== void 0) {
326
- localVarQueryParameter["lastUpdatedBefore"] = lastUpdatedBefore instanceof Date ? lastUpdatedBefore.toISOString() : lastUpdatedBefore;
327
- }
328
- if (maxResults !== void 0) {
329
- localVarQueryParameter["maxResults"] = maxResults;
330
- }
331
- if (paginationToken !== void 0) {
332
- localVarQueryParameter["paginationToken"] = paginationToken;
333
- }
334
- localVarHeaderParameter["Accept"] = "application/json";
335
- setSearchParams(localVarUrlObj, localVarQueryParameter);
336
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
337
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
338
- return {
339
- url: toPathString(localVarUrlObj),
340
- options: localVarRequestOptions
341
- };
342
- },
343
- /**
344
- * Confirm or reject the specified shipment.
345
- * @param {string} shipmentId The ID of the shipment you want to confirm or reject.
346
- * @param {ProcessShipmentOperationEnum} operation The status of the shipment.
347
- * @param {ShipmentAcknowledgementRequest} [body] Information about the shipment and its line items.
348
- * @param {*} [options] Override http request option.
349
- * @throws {RequiredError}
350
- */
351
- processShipment: async (shipmentId, operation, body, options = {}) => {
352
- assertParamExists("processShipment", "shipmentId", shipmentId);
353
- assertParamExists("processShipment", "operation", operation);
354
- const localVarPath = `/externalFulfillment/2024-09-11/shipments/{shipmentId}`.replace("{shipmentId}", encodeURIComponent(String(shipmentId)));
355
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
356
- let baseOptions;
357
- if (configuration) {
358
- baseOptions = configuration.baseOptions;
359
- }
360
- const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
361
- const localVarHeaderParameter = {};
362
- const localVarQueryParameter = {};
363
- if (operation !== void 0) {
364
- localVarQueryParameter["operation"] = operation;
365
- }
366
- localVarHeaderParameter["Content-Type"] = "application/json";
367
- localVarHeaderParameter["Accept"] = "application/json";
368
- setSearchParams(localVarUrlObj, localVarQueryParameter);
369
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
370
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
371
- localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
372
- return {
373
- url: toPathString(localVarUrlObj),
374
- options: localVarRequestOptions
375
- };
376
- },
377
- /**
378
- * Retrieve invoices for the shipment you specify.
379
- * @param {string} shipmentId The ID of the shipment whose invoice you want to retrieve.
380
- * @param {*} [options] Override http request option.
381
- * @throws {RequiredError}
382
- */
383
- retrieveInvoice: async (shipmentId, options = {}) => {
384
- assertParamExists("retrieveInvoice", "shipmentId", shipmentId);
385
- const localVarPath = `/externalFulfillment/2024-09-11/shipments/{shipmentId}/invoice`.replace("{shipmentId}", encodeURIComponent(String(shipmentId)));
386
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
387
- let baseOptions;
388
- if (configuration) {
389
- baseOptions = configuration.baseOptions;
390
- }
391
- const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
392
- const localVarHeaderParameter = {};
393
- const localVarQueryParameter = {};
394
- localVarHeaderParameter["Accept"] = "application/json";
395
- setSearchParams(localVarUrlObj, localVarQueryParameter);
396
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
397
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
398
- return {
399
- url: toPathString(localVarUrlObj),
400
- options: localVarRequestOptions
401
- };
402
- },
403
- /**
404
- * Get a list of shipping options for a package in a shipment given the shipment\'s marketplace and channel. If the marketplace and channel have a pre-determined shipping option, then this operation returns an empty response.
405
- * @param {string} shipmentId The ID of the shipment to which the package belongs.
406
- * @param {string} packageId The ID of the package for which you want to retrieve shipping options.
407
- * @param {*} [options] Override http request option.
408
- * @throws {RequiredError}
409
- */
410
- retrieveShippingOptions: async (shipmentId, packageId, options = {}) => {
411
- assertParamExists("retrieveShippingOptions", "shipmentId", shipmentId);
412
- assertParamExists("retrieveShippingOptions", "packageId", packageId);
413
- const localVarPath = `/externalFulfillment/2024-09-11/shipments/{shipmentId}/shippingOptions`.replace("{shipmentId}", encodeURIComponent(String(shipmentId)));
414
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
415
- let baseOptions;
416
- if (configuration) {
417
- baseOptions = configuration.baseOptions;
418
- }
419
- const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
420
- const localVarHeaderParameter = {};
421
- const localVarQueryParameter = {};
422
- if (packageId !== void 0) {
423
- localVarQueryParameter["packageId"] = packageId;
424
- }
425
- localVarHeaderParameter["Accept"] = "application/json";
426
- setSearchParams(localVarUrlObj, localVarQueryParameter);
427
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
428
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
429
- return {
430
- url: toPathString(localVarUrlObj),
431
- options: localVarRequestOptions
432
- };
433
- },
434
- /**
435
- * Updates the details about the packages that will be used to fulfill the specified shipment.
436
- * @param {string} shipmentId The ID of the shipment to which the package belongs.
437
- * @param {string} packageId The ID of the package whose information you want to update.
438
- * @param {Package} body The body of the request.
439
- * @param {*} [options] Override http request option.
440
- * @throws {RequiredError}
441
- */
442
- updatePackage: async (shipmentId, packageId, body, options = {}) => {
443
- assertParamExists("updatePackage", "shipmentId", shipmentId);
444
- assertParamExists("updatePackage", "packageId", packageId);
445
- assertParamExists("updatePackage", "body", body);
446
- const localVarPath = `/externalFulfillment/2024-09-11/shipments/{shipmentId}/packages/{packageId}`.replace("{shipmentId}", encodeURIComponent(String(shipmentId))).replace("{packageId}", encodeURIComponent(String(packageId)));
447
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
448
- let baseOptions;
449
- if (configuration) {
450
- baseOptions = configuration.baseOptions;
451
- }
452
- const localVarRequestOptions = { method: "PUT", ...baseOptions, ...options };
453
- const localVarHeaderParameter = {};
454
- const localVarQueryParameter = {};
455
- localVarHeaderParameter["Content-Type"] = "application/json";
456
- localVarHeaderParameter["Accept"] = "application/json";
457
- setSearchParams(localVarUrlObj, localVarQueryParameter);
458
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
459
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
460
- localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
461
- return {
462
- url: toPathString(localVarUrlObj),
463
- options: localVarRequestOptions
464
- };
465
- },
466
- /**
467
- * Updates the status of the packages.
468
- * @param {string} shipmentId The ID of the shipment to which the package belongs.
469
- * @param {string} packageId The ID of the package whose status you want to update.
470
- * @param {UpdatePackageStatusStatusEnum} [status] **DEPRECATED**. Do not use. Package status is defined in the body parameter.
471
- * @param {PackageDeliveryStatus} [body] The body of the request.
472
- * @param {*} [options] Override http request option.
473
- * @throws {RequiredError}
474
- */
475
- updatePackageStatus: async (shipmentId, packageId, status, body, options = {}) => {
476
- assertParamExists("updatePackageStatus", "shipmentId", shipmentId);
477
- assertParamExists("updatePackageStatus", "packageId", packageId);
478
- const localVarPath = `/externalFulfillment/2024-09-11/shipments/{shipmentId}/packages/{packageId}`.replace("{shipmentId}", encodeURIComponent(String(shipmentId))).replace("{packageId}", encodeURIComponent(String(packageId)));
479
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
480
- let baseOptions;
481
- if (configuration) {
482
- baseOptions = configuration.baseOptions;
483
- }
484
- const localVarRequestOptions = { method: "PATCH", ...baseOptions, ...options };
485
- const localVarHeaderParameter = {};
486
- const localVarQueryParameter = {};
487
- if (status !== void 0) {
488
- localVarQueryParameter["status"] = status;
489
- }
490
- localVarHeaderParameter["Content-Type"] = "application/json";
491
- localVarHeaderParameter["Accept"] = "application/json";
492
- setSearchParams(localVarUrlObj, localVarQueryParameter);
493
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
494
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
495
- localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
496
- return {
497
- url: toPathString(localVarUrlObj),
498
- options: localVarRequestOptions
499
- };
500
- }
501
- };
98
+ //#endregion
99
+ //#region src/api-model/api/external-fulfillment-shipments-api.ts
100
+ /**
101
+ * ExternalFulfillmentShipmentsApi - axios parameter creator
102
+ */
103
+ const ExternalFulfillmentShipmentsApiAxiosParamCreator = function(configuration) {
104
+ return {
105
+ /**
106
+ * Provide details about the packages in the specified shipment.
107
+ * @param {string} shipmentId The ID of the shipment.
108
+ * @param {Packages} body A list of packages in the shipment.
109
+ * @param {*} [options] Override http request option.
110
+ * @throws {RequiredError}
111
+ */
112
+ createPackages: async (shipmentId, body, options = {}) => {
113
+ assertParamExists("createPackages", "shipmentId", shipmentId);
114
+ assertParamExists("createPackages", "body", body);
115
+ const localVarPath = `/externalFulfillment/2024-09-11/shipments/{shipmentId}/packages`.replace("{shipmentId}", encodeURIComponent(String(shipmentId)));
116
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
117
+ let baseOptions;
118
+ if (configuration) baseOptions = configuration.baseOptions;
119
+ const localVarRequestOptions = {
120
+ method: "POST",
121
+ ...baseOptions,
122
+ ...options
123
+ };
124
+ const localVarHeaderParameter = {};
125
+ const localVarQueryParameter = {};
126
+ localVarHeaderParameter["Content-Type"] = "application/json";
127
+ localVarHeaderParameter["Accept"] = "application/json";
128
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
129
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
130
+ localVarRequestOptions.headers = {
131
+ ...localVarHeaderParameter,
132
+ ...headersFromBaseOptions,
133
+ ...options.headers
134
+ };
135
+ localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
136
+ return {
137
+ url: toPathString(localVarUrlObj),
138
+ options: localVarRequestOptions
139
+ };
140
+ },
141
+ /**
142
+ * Get invoices for the shipment you specify.
143
+ * @param {string} shipmentId The ID of the shipment whose invoice you want.
144
+ * @param {*} [options] Override http request option.
145
+ * @throws {RequiredError}
146
+ */
147
+ generateInvoice: async (shipmentId, options = {}) => {
148
+ assertParamExists("generateInvoice", "shipmentId", shipmentId);
149
+ const localVarPath = `/externalFulfillment/2024-09-11/shipments/{shipmentId}/invoice`.replace("{shipmentId}", encodeURIComponent(String(shipmentId)));
150
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
151
+ let baseOptions;
152
+ if (configuration) baseOptions = configuration.baseOptions;
153
+ const localVarRequestOptions = {
154
+ method: "POST",
155
+ ...baseOptions,
156
+ ...options
157
+ };
158
+ const localVarHeaderParameter = {};
159
+ const localVarQueryParameter = {};
160
+ localVarHeaderParameter["Accept"] = "application/json";
161
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
162
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
163
+ localVarRequestOptions.headers = {
164
+ ...localVarHeaderParameter,
165
+ ...headersFromBaseOptions,
166
+ ...options.headers
167
+ };
168
+ return {
169
+ url: toPathString(localVarUrlObj),
170
+ options: localVarRequestOptions
171
+ };
172
+ },
173
+ /**
174
+ * Generate and retrieve all shipping labels for one or more packages in the shipment you specify.
175
+ * @param {string} shipmentId The ID of the shipment whose shipping labels you want to generate and retrieve.
176
+ * @param {GenerateShipLabelsOperationEnum} operation Specify whether you want to generate or regenerate a label.
177
+ * @param {string} [shippingOptionId] The ID of the shipping option whose shipping labels you want.
178
+ * @param {ShipLabelsInput} [body] Shipping details for when shipping is not done by the marketplace channel.
179
+ * @param {*} [options] Override http request option.
180
+ * @throws {RequiredError}
181
+ */
182
+ generateShipLabels: async (shipmentId, operation, shippingOptionId, body, options = {}) => {
183
+ assertParamExists("generateShipLabels", "shipmentId", shipmentId);
184
+ assertParamExists("generateShipLabels", "operation", operation);
185
+ const localVarPath = `/externalFulfillment/2024-09-11/shipments/{shipmentId}/shipLabels`.replace("{shipmentId}", encodeURIComponent(String(shipmentId)));
186
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
187
+ let baseOptions;
188
+ if (configuration) baseOptions = configuration.baseOptions;
189
+ const localVarRequestOptions = {
190
+ method: "PUT",
191
+ ...baseOptions,
192
+ ...options
193
+ };
194
+ const localVarHeaderParameter = {};
195
+ const localVarQueryParameter = {};
196
+ if (shippingOptionId !== void 0) localVarQueryParameter["shippingOptionId"] = shippingOptionId;
197
+ if (operation !== void 0) localVarQueryParameter["operation"] = operation;
198
+ localVarHeaderParameter["Content-Type"] = "application/json";
199
+ localVarHeaderParameter["Accept"] = "application/json";
200
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
201
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
202
+ localVarRequestOptions.headers = {
203
+ ...localVarHeaderParameter,
204
+ ...headersFromBaseOptions,
205
+ ...options.headers
206
+ };
207
+ localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
208
+ return {
209
+ url: toPathString(localVarUrlObj),
210
+ options: localVarRequestOptions
211
+ };
212
+ },
213
+ /**
214
+ * Get a single shipment with the ID you specify.
215
+ * @param {string} shipmentId The ID of the shipment you want to retrieve.
216
+ * @param {*} [options] Override http request option.
217
+ * @throws {RequiredError}
218
+ */
219
+ getShipment: async (shipmentId, options = {}) => {
220
+ assertParamExists("getShipment", "shipmentId", shipmentId);
221
+ const localVarPath = `/externalFulfillment/2024-09-11/shipments/{shipmentId}`.replace("{shipmentId}", encodeURIComponent(String(shipmentId)));
222
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
223
+ let baseOptions;
224
+ if (configuration) baseOptions = configuration.baseOptions;
225
+ const localVarRequestOptions = {
226
+ method: "GET",
227
+ ...baseOptions,
228
+ ...options
229
+ };
230
+ const localVarHeaderParameter = {};
231
+ const localVarQueryParameter = {};
232
+ localVarHeaderParameter["Accept"] = "application/json";
233
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
234
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
235
+ localVarRequestOptions.headers = {
236
+ ...localVarHeaderParameter,
237
+ ...headersFromBaseOptions,
238
+ ...options.headers
239
+ };
240
+ return {
241
+ url: toPathString(localVarUrlObj),
242
+ options: localVarRequestOptions
243
+ };
244
+ },
245
+ /**
246
+ * Get a list of shipments created for the seller in the status you specify. Shipments can be further filtered based on the fulfillment node or the time of the shipments\' last update.
247
+ * @param {GetShipmentsStatusEnum} status The status of shipment you want to include in the response. To retrieve all new shipments, set this value to &#x60;CREATED&#x60; or &#x60;ACCEPTED&#x60;.
248
+ * @param {string} [locationId] The Amazon channel location identifier for the shipments you want to retrieve.
249
+ * @param {string} [marketplaceId] The marketplace ID associated with the location. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
250
+ * @param {string} [channelName] The channel name associated with the location.
251
+ * @param {string} [lastUpdatedAfter] The response includes shipments whose latest update is after the specified time. In [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
252
+ * @param {string} [lastUpdatedBefore] The response includes shipments whose latest update is before the specified time. In [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
253
+ * @param {number} [maxResults] The maximum number of shipments to include in the response.
254
+ * @param {string} [paginationToken] A token that you use to retrieve the next page of results. The response includes &#x60;nextToken&#x60; when there are multiple pages of results. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until &#x60;nextToken&#x60; is null. Note that this operation can return empty pages.
255
+ * @param {*} [options] Override http request option.
256
+ * @throws {RequiredError}
257
+ */
258
+ getShipments: async (status, locationId, marketplaceId, channelName, lastUpdatedAfter, lastUpdatedBefore, maxResults, paginationToken, options = {}) => {
259
+ assertParamExists("getShipments", "status", status);
260
+ const localVarUrlObj = new URL(`/externalFulfillment/2024-09-11/shipments`, DUMMY_BASE_URL);
261
+ let baseOptions;
262
+ if (configuration) baseOptions = configuration.baseOptions;
263
+ const localVarRequestOptions = {
264
+ method: "GET",
265
+ ...baseOptions,
266
+ ...options
267
+ };
268
+ const localVarHeaderParameter = {};
269
+ const localVarQueryParameter = {};
270
+ if (locationId !== void 0) localVarQueryParameter["locationId"] = locationId;
271
+ if (marketplaceId !== void 0) localVarQueryParameter["marketplaceId"] = marketplaceId;
272
+ if (channelName !== void 0) localVarQueryParameter["channelName"] = channelName;
273
+ if (status !== void 0) localVarQueryParameter["status"] = status;
274
+ if (lastUpdatedAfter !== void 0) localVarQueryParameter["lastUpdatedAfter"] = lastUpdatedAfter instanceof Date ? lastUpdatedAfter.toISOString() : lastUpdatedAfter;
275
+ if (lastUpdatedBefore !== void 0) localVarQueryParameter["lastUpdatedBefore"] = lastUpdatedBefore instanceof Date ? lastUpdatedBefore.toISOString() : lastUpdatedBefore;
276
+ if (maxResults !== void 0) localVarQueryParameter["maxResults"] = maxResults;
277
+ if (paginationToken !== void 0) localVarQueryParameter["paginationToken"] = paginationToken;
278
+ localVarHeaderParameter["Accept"] = "application/json";
279
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
280
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
281
+ localVarRequestOptions.headers = {
282
+ ...localVarHeaderParameter,
283
+ ...headersFromBaseOptions,
284
+ ...options.headers
285
+ };
286
+ return {
287
+ url: toPathString(localVarUrlObj),
288
+ options: localVarRequestOptions
289
+ };
290
+ },
291
+ /**
292
+ * Confirm or reject the specified shipment.
293
+ * @param {string} shipmentId The ID of the shipment you want to confirm or reject.
294
+ * @param {ProcessShipmentOperationEnum} operation The status of the shipment.
295
+ * @param {ShipmentAcknowledgementRequest} [body] Information about the shipment and its line items.
296
+ * @param {*} [options] Override http request option.
297
+ * @throws {RequiredError}
298
+ */
299
+ processShipment: async (shipmentId, operation, body, options = {}) => {
300
+ assertParamExists("processShipment", "shipmentId", shipmentId);
301
+ assertParamExists("processShipment", "operation", operation);
302
+ const localVarPath = `/externalFulfillment/2024-09-11/shipments/{shipmentId}`.replace("{shipmentId}", encodeURIComponent(String(shipmentId)));
303
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
304
+ let baseOptions;
305
+ if (configuration) baseOptions = configuration.baseOptions;
306
+ const localVarRequestOptions = {
307
+ method: "POST",
308
+ ...baseOptions,
309
+ ...options
310
+ };
311
+ const localVarHeaderParameter = {};
312
+ const localVarQueryParameter = {};
313
+ if (operation !== void 0) localVarQueryParameter["operation"] = operation;
314
+ localVarHeaderParameter["Content-Type"] = "application/json";
315
+ localVarHeaderParameter["Accept"] = "application/json";
316
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
317
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
318
+ localVarRequestOptions.headers = {
319
+ ...localVarHeaderParameter,
320
+ ...headersFromBaseOptions,
321
+ ...options.headers
322
+ };
323
+ localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
324
+ return {
325
+ url: toPathString(localVarUrlObj),
326
+ options: localVarRequestOptions
327
+ };
328
+ },
329
+ /**
330
+ * Retrieve invoices for the shipment you specify.
331
+ * @param {string} shipmentId The ID of the shipment whose invoice you want to retrieve.
332
+ * @param {*} [options] Override http request option.
333
+ * @throws {RequiredError}
334
+ */
335
+ retrieveInvoice: async (shipmentId, options = {}) => {
336
+ assertParamExists("retrieveInvoice", "shipmentId", shipmentId);
337
+ const localVarPath = `/externalFulfillment/2024-09-11/shipments/{shipmentId}/invoice`.replace("{shipmentId}", encodeURIComponent(String(shipmentId)));
338
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
339
+ let baseOptions;
340
+ if (configuration) baseOptions = configuration.baseOptions;
341
+ const localVarRequestOptions = {
342
+ method: "GET",
343
+ ...baseOptions,
344
+ ...options
345
+ };
346
+ const localVarHeaderParameter = {};
347
+ const localVarQueryParameter = {};
348
+ localVarHeaderParameter["Accept"] = "application/json";
349
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
350
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
351
+ localVarRequestOptions.headers = {
352
+ ...localVarHeaderParameter,
353
+ ...headersFromBaseOptions,
354
+ ...options.headers
355
+ };
356
+ return {
357
+ url: toPathString(localVarUrlObj),
358
+ options: localVarRequestOptions
359
+ };
360
+ },
361
+ /**
362
+ * Get a list of shipping options for a package in a shipment given the shipment\'s marketplace and channel. If the marketplace and channel have a pre-determined shipping option, then this operation returns an empty response.
363
+ * @param {string} shipmentId The ID of the shipment to which the package belongs.
364
+ * @param {string} packageId The ID of the package for which you want to retrieve shipping options.
365
+ * @param {*} [options] Override http request option.
366
+ * @throws {RequiredError}
367
+ */
368
+ retrieveShippingOptions: async (shipmentId, packageId, options = {}) => {
369
+ assertParamExists("retrieveShippingOptions", "shipmentId", shipmentId);
370
+ assertParamExists("retrieveShippingOptions", "packageId", packageId);
371
+ const localVarPath = `/externalFulfillment/2024-09-11/shipments/{shipmentId}/shippingOptions`.replace("{shipmentId}", encodeURIComponent(String(shipmentId)));
372
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
373
+ let baseOptions;
374
+ if (configuration) baseOptions = configuration.baseOptions;
375
+ const localVarRequestOptions = {
376
+ method: "GET",
377
+ ...baseOptions,
378
+ ...options
379
+ };
380
+ const localVarHeaderParameter = {};
381
+ const localVarQueryParameter = {};
382
+ if (packageId !== void 0) localVarQueryParameter["packageId"] = packageId;
383
+ localVarHeaderParameter["Accept"] = "application/json";
384
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
385
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
386
+ localVarRequestOptions.headers = {
387
+ ...localVarHeaderParameter,
388
+ ...headersFromBaseOptions,
389
+ ...options.headers
390
+ };
391
+ return {
392
+ url: toPathString(localVarUrlObj),
393
+ options: localVarRequestOptions
394
+ };
395
+ },
396
+ /**
397
+ * Updates the details about the packages that will be used to fulfill the specified shipment.
398
+ * @param {string} shipmentId The ID of the shipment to which the package belongs.
399
+ * @param {string} packageId The ID of the package whose information you want to update.
400
+ * @param {Package} body The body of the request.
401
+ * @param {*} [options] Override http request option.
402
+ * @throws {RequiredError}
403
+ */
404
+ updatePackage: async (shipmentId, packageId, body, options = {}) => {
405
+ assertParamExists("updatePackage", "shipmentId", shipmentId);
406
+ assertParamExists("updatePackage", "packageId", packageId);
407
+ assertParamExists("updatePackage", "body", body);
408
+ const localVarPath = `/externalFulfillment/2024-09-11/shipments/{shipmentId}/packages/{packageId}`.replace("{shipmentId}", encodeURIComponent(String(shipmentId))).replace("{packageId}", encodeURIComponent(String(packageId)));
409
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
410
+ let baseOptions;
411
+ if (configuration) baseOptions = configuration.baseOptions;
412
+ const localVarRequestOptions = {
413
+ method: "PUT",
414
+ ...baseOptions,
415
+ ...options
416
+ };
417
+ const localVarHeaderParameter = {};
418
+ const localVarQueryParameter = {};
419
+ localVarHeaderParameter["Content-Type"] = "application/json";
420
+ localVarHeaderParameter["Accept"] = "application/json";
421
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
422
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
423
+ localVarRequestOptions.headers = {
424
+ ...localVarHeaderParameter,
425
+ ...headersFromBaseOptions,
426
+ ...options.headers
427
+ };
428
+ localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
429
+ return {
430
+ url: toPathString(localVarUrlObj),
431
+ options: localVarRequestOptions
432
+ };
433
+ },
434
+ /**
435
+ * Updates the status of the packages.
436
+ * @param {string} shipmentId The ID of the shipment to which the package belongs.
437
+ * @param {string} packageId The ID of the package whose status you want to update.
438
+ * @param {UpdatePackageStatusStatusEnum} [status] **DEPRECATED**. Do not use. Package status is defined in the body parameter.
439
+ * @param {PackageDeliveryStatus} [body] The body of the request.
440
+ * @param {*} [options] Override http request option.
441
+ * @throws {RequiredError}
442
+ */
443
+ updatePackageStatus: async (shipmentId, packageId, status, body, options = {}) => {
444
+ assertParamExists("updatePackageStatus", "shipmentId", shipmentId);
445
+ assertParamExists("updatePackageStatus", "packageId", packageId);
446
+ const localVarPath = `/externalFulfillment/2024-09-11/shipments/{shipmentId}/packages/{packageId}`.replace("{shipmentId}", encodeURIComponent(String(shipmentId))).replace("{packageId}", encodeURIComponent(String(packageId)));
447
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
448
+ let baseOptions;
449
+ if (configuration) baseOptions = configuration.baseOptions;
450
+ const localVarRequestOptions = {
451
+ method: "PATCH",
452
+ ...baseOptions,
453
+ ...options
454
+ };
455
+ const localVarHeaderParameter = {};
456
+ const localVarQueryParameter = {};
457
+ if (status !== void 0) localVarQueryParameter["status"] = status;
458
+ localVarHeaderParameter["Content-Type"] = "application/json";
459
+ localVarHeaderParameter["Accept"] = "application/json";
460
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
461
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
462
+ localVarRequestOptions.headers = {
463
+ ...localVarHeaderParameter,
464
+ ...headersFromBaseOptions,
465
+ ...options.headers
466
+ };
467
+ localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
468
+ return {
469
+ url: toPathString(localVarUrlObj),
470
+ options: localVarRequestOptions
471
+ };
472
+ }
473
+ };
502
474
  };
503
- var ExternalFulfillmentShipmentsApiFp = function(configuration) {
504
- const localVarAxiosParamCreator = ExternalFulfillmentShipmentsApiAxiosParamCreator(configuration);
505
- return {
506
- /**
507
- * Provide details about the packages in the specified shipment.
508
- * @param {string} shipmentId The ID of the shipment.
509
- * @param {Packages} body A list of packages in the shipment.
510
- * @param {*} [options] Override http request option.
511
- * @throws {RequiredError}
512
- */
513
- async createPackages(shipmentId, body, options) {
514
- const localVarAxiosArgs = await localVarAxiosParamCreator.createPackages(shipmentId, body, options);
515
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
516
- const localVarOperationServerBasePath = operationServerMap["ExternalFulfillmentShipmentsApi.createPackages"]?.[localVarOperationServerIndex]?.url;
517
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, import_axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
518
- },
519
- /**
520
- * Get invoices for the shipment you specify.
521
- * @param {string} shipmentId The ID of the shipment whose invoice you want.
522
- * @param {*} [options] Override http request option.
523
- * @throws {RequiredError}
524
- */
525
- async generateInvoice(shipmentId, options) {
526
- const localVarAxiosArgs = await localVarAxiosParamCreator.generateInvoice(shipmentId, options);
527
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
528
- const localVarOperationServerBasePath = operationServerMap["ExternalFulfillmentShipmentsApi.generateInvoice"]?.[localVarOperationServerIndex]?.url;
529
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, import_axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
530
- },
531
- /**
532
- * Generate and retrieve all shipping labels for one or more packages in the shipment you specify.
533
- * @param {string} shipmentId The ID of the shipment whose shipping labels you want to generate and retrieve.
534
- * @param {GenerateShipLabelsOperationEnum} operation Specify whether you want to generate or regenerate a label.
535
- * @param {string} [shippingOptionId] The ID of the shipping option whose shipping labels you want.
536
- * @param {ShipLabelsInput} [body] Shipping details for when shipping is not done by the marketplace channel.
537
- * @param {*} [options] Override http request option.
538
- * @throws {RequiredError}
539
- */
540
- async generateShipLabels(shipmentId, operation, shippingOptionId, body, options) {
541
- const localVarAxiosArgs = await localVarAxiosParamCreator.generateShipLabels(shipmentId, operation, shippingOptionId, body, options);
542
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
543
- const localVarOperationServerBasePath = operationServerMap["ExternalFulfillmentShipmentsApi.generateShipLabels"]?.[localVarOperationServerIndex]?.url;
544
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, import_axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
545
- },
546
- /**
547
- * Get a single shipment with the ID you specify.
548
- * @param {string} shipmentId The ID of the shipment you want to retrieve.
549
- * @param {*} [options] Override http request option.
550
- * @throws {RequiredError}
551
- */
552
- async getShipment(shipmentId, options) {
553
- const localVarAxiosArgs = await localVarAxiosParamCreator.getShipment(shipmentId, options);
554
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
555
- const localVarOperationServerBasePath = operationServerMap["ExternalFulfillmentShipmentsApi.getShipment"]?.[localVarOperationServerIndex]?.url;
556
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, import_axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
557
- },
558
- /**
559
- * Get a list of shipments created for the seller in the status you specify. Shipments can be further filtered based on the fulfillment node or the time of the shipments\' last update.
560
- * @param {GetShipmentsStatusEnum} status The status of shipment you want to include in the response. To retrieve all new shipments, set this value to &#x60;CREATED&#x60; or &#x60;ACCEPTED&#x60;.
561
- * @param {string} [locationId] The Amazon channel location identifier for the shipments you want to retrieve.
562
- * @param {string} [marketplaceId] The marketplace ID associated with the location. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
563
- * @param {string} [channelName] The channel name associated with the location.
564
- * @param {string} [lastUpdatedAfter] The response includes shipments whose latest update is after the specified time. In [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
565
- * @param {string} [lastUpdatedBefore] The response includes shipments whose latest update is before the specified time. In [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
566
- * @param {number} [maxResults] The maximum number of shipments to include in the response.
567
- * @param {string} [paginationToken] A token that you use to retrieve the next page of results. The response includes &#x60;nextToken&#x60; when there are multiple pages of results. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until &#x60;nextToken&#x60; is null. Note that this operation can return empty pages.
568
- * @param {*} [options] Override http request option.
569
- * @throws {RequiredError}
570
- */
571
- async getShipments(status, locationId, marketplaceId, channelName, lastUpdatedAfter, lastUpdatedBefore, maxResults, paginationToken, options) {
572
- const localVarAxiosArgs = await localVarAxiosParamCreator.getShipments(status, locationId, marketplaceId, channelName, lastUpdatedAfter, lastUpdatedBefore, maxResults, paginationToken, options);
573
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
574
- const localVarOperationServerBasePath = operationServerMap["ExternalFulfillmentShipmentsApi.getShipments"]?.[localVarOperationServerIndex]?.url;
575
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, import_axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
576
- },
577
- /**
578
- * Confirm or reject the specified shipment.
579
- * @param {string} shipmentId The ID of the shipment you want to confirm or reject.
580
- * @param {ProcessShipmentOperationEnum} operation The status of the shipment.
581
- * @param {ShipmentAcknowledgementRequest} [body] Information about the shipment and its line items.
582
- * @param {*} [options] Override http request option.
583
- * @throws {RequiredError}
584
- */
585
- async processShipment(shipmentId, operation, body, options) {
586
- const localVarAxiosArgs = await localVarAxiosParamCreator.processShipment(shipmentId, operation, body, options);
587
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
588
- const localVarOperationServerBasePath = operationServerMap["ExternalFulfillmentShipmentsApi.processShipment"]?.[localVarOperationServerIndex]?.url;
589
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, import_axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
590
- },
591
- /**
592
- * Retrieve invoices for the shipment you specify.
593
- * @param {string} shipmentId The ID of the shipment whose invoice you want to retrieve.
594
- * @param {*} [options] Override http request option.
595
- * @throws {RequiredError}
596
- */
597
- async retrieveInvoice(shipmentId, options) {
598
- const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveInvoice(shipmentId, options);
599
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
600
- const localVarOperationServerBasePath = operationServerMap["ExternalFulfillmentShipmentsApi.retrieveInvoice"]?.[localVarOperationServerIndex]?.url;
601
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, import_axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
602
- },
603
- /**
604
- * Get a list of shipping options for a package in a shipment given the shipment\'s marketplace and channel. If the marketplace and channel have a pre-determined shipping option, then this operation returns an empty response.
605
- * @param {string} shipmentId The ID of the shipment to which the package belongs.
606
- * @param {string} packageId The ID of the package for which you want to retrieve shipping options.
607
- * @param {*} [options] Override http request option.
608
- * @throws {RequiredError}
609
- */
610
- async retrieveShippingOptions(shipmentId, packageId, options) {
611
- const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveShippingOptions(shipmentId, packageId, options);
612
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
613
- const localVarOperationServerBasePath = operationServerMap["ExternalFulfillmentShipmentsApi.retrieveShippingOptions"]?.[localVarOperationServerIndex]?.url;
614
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, import_axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
615
- },
616
- /**
617
- * Updates the details about the packages that will be used to fulfill the specified shipment.
618
- * @param {string} shipmentId The ID of the shipment to which the package belongs.
619
- * @param {string} packageId The ID of the package whose information you want to update.
620
- * @param {Package} body The body of the request.
621
- * @param {*} [options] Override http request option.
622
- * @throws {RequiredError}
623
- */
624
- async updatePackage(shipmentId, packageId, body, options) {
625
- const localVarAxiosArgs = await localVarAxiosParamCreator.updatePackage(shipmentId, packageId, body, options);
626
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
627
- const localVarOperationServerBasePath = operationServerMap["ExternalFulfillmentShipmentsApi.updatePackage"]?.[localVarOperationServerIndex]?.url;
628
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, import_axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
629
- },
630
- /**
631
- * Updates the status of the packages.
632
- * @param {string} shipmentId The ID of the shipment to which the package belongs.
633
- * @param {string} packageId The ID of the package whose status you want to update.
634
- * @param {UpdatePackageStatusStatusEnum} [status] **DEPRECATED**. Do not use. Package status is defined in the body parameter.
635
- * @param {PackageDeliveryStatus} [body] The body of the request.
636
- * @param {*} [options] Override http request option.
637
- * @throws {RequiredError}
638
- */
639
- async updatePackageStatus(shipmentId, packageId, status, body, options) {
640
- const localVarAxiosArgs = await localVarAxiosParamCreator.updatePackageStatus(shipmentId, packageId, status, body, options);
641
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
642
- const localVarOperationServerBasePath = operationServerMap["ExternalFulfillmentShipmentsApi.updatePackageStatus"]?.[localVarOperationServerIndex]?.url;
643
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, import_axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
644
- }
645
- };
475
+ /**
476
+ * ExternalFulfillmentShipmentsApi - functional programming interface
477
+ */
478
+ const ExternalFulfillmentShipmentsApiFp = function(configuration) {
479
+ const localVarAxiosParamCreator = ExternalFulfillmentShipmentsApiAxiosParamCreator(configuration);
480
+ return {
481
+ /**
482
+ * Provide details about the packages in the specified shipment.
483
+ * @param {string} shipmentId The ID of the shipment.
484
+ * @param {Packages} body A list of packages in the shipment.
485
+ * @param {*} [options] Override http request option.
486
+ * @throws {RequiredError}
487
+ */
488
+ async createPackages(shipmentId, body, options) {
489
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createPackages(shipmentId, body, options);
490
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
491
+ const localVarOperationServerBasePath = operationServerMap["ExternalFulfillmentShipmentsApi.createPackages"]?.[localVarOperationServerIndex]?.url;
492
+ return (axios$1, basePath) => createRequestFunction(localVarAxiosArgs, axios.default, BASE_PATH, configuration)(axios$1, localVarOperationServerBasePath || basePath);
493
+ },
494
+ /**
495
+ * Get invoices for the shipment you specify.
496
+ * @param {string} shipmentId The ID of the shipment whose invoice you want.
497
+ * @param {*} [options] Override http request option.
498
+ * @throws {RequiredError}
499
+ */
500
+ async generateInvoice(shipmentId, options) {
501
+ const localVarAxiosArgs = await localVarAxiosParamCreator.generateInvoice(shipmentId, options);
502
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
503
+ const localVarOperationServerBasePath = operationServerMap["ExternalFulfillmentShipmentsApi.generateInvoice"]?.[localVarOperationServerIndex]?.url;
504
+ return (axios$2, basePath) => createRequestFunction(localVarAxiosArgs, axios.default, BASE_PATH, configuration)(axios$2, localVarOperationServerBasePath || basePath);
505
+ },
506
+ /**
507
+ * Generate and retrieve all shipping labels for one or more packages in the shipment you specify.
508
+ * @param {string} shipmentId The ID of the shipment whose shipping labels you want to generate and retrieve.
509
+ * @param {GenerateShipLabelsOperationEnum} operation Specify whether you want to generate or regenerate a label.
510
+ * @param {string} [shippingOptionId] The ID of the shipping option whose shipping labels you want.
511
+ * @param {ShipLabelsInput} [body] Shipping details for when shipping is not done by the marketplace channel.
512
+ * @param {*} [options] Override http request option.
513
+ * @throws {RequiredError}
514
+ */
515
+ async generateShipLabels(shipmentId, operation, shippingOptionId, body, options) {
516
+ const localVarAxiosArgs = await localVarAxiosParamCreator.generateShipLabels(shipmentId, operation, shippingOptionId, body, options);
517
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
518
+ const localVarOperationServerBasePath = operationServerMap["ExternalFulfillmentShipmentsApi.generateShipLabels"]?.[localVarOperationServerIndex]?.url;
519
+ return (axios$3, basePath) => createRequestFunction(localVarAxiosArgs, axios.default, BASE_PATH, configuration)(axios$3, localVarOperationServerBasePath || basePath);
520
+ },
521
+ /**
522
+ * Get a single shipment with the ID you specify.
523
+ * @param {string} shipmentId The ID of the shipment you want to retrieve.
524
+ * @param {*} [options] Override http request option.
525
+ * @throws {RequiredError}
526
+ */
527
+ async getShipment(shipmentId, options) {
528
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getShipment(shipmentId, options);
529
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
530
+ const localVarOperationServerBasePath = operationServerMap["ExternalFulfillmentShipmentsApi.getShipment"]?.[localVarOperationServerIndex]?.url;
531
+ return (axios$4, basePath) => createRequestFunction(localVarAxiosArgs, axios.default, BASE_PATH, configuration)(axios$4, localVarOperationServerBasePath || basePath);
532
+ },
533
+ /**
534
+ * Get a list of shipments created for the seller in the status you specify. Shipments can be further filtered based on the fulfillment node or the time of the shipments\' last update.
535
+ * @param {GetShipmentsStatusEnum} status The status of shipment you want to include in the response. To retrieve all new shipments, set this value to &#x60;CREATED&#x60; or &#x60;ACCEPTED&#x60;.
536
+ * @param {string} [locationId] The Amazon channel location identifier for the shipments you want to retrieve.
537
+ * @param {string} [marketplaceId] The marketplace ID associated with the location. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
538
+ * @param {string} [channelName] The channel name associated with the location.
539
+ * @param {string} [lastUpdatedAfter] The response includes shipments whose latest update is after the specified time. In [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
540
+ * @param {string} [lastUpdatedBefore] The response includes shipments whose latest update is before the specified time. In [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
541
+ * @param {number} [maxResults] The maximum number of shipments to include in the response.
542
+ * @param {string} [paginationToken] A token that you use to retrieve the next page of results. The response includes &#x60;nextToken&#x60; when there are multiple pages of results. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until &#x60;nextToken&#x60; is null. Note that this operation can return empty pages.
543
+ * @param {*} [options] Override http request option.
544
+ * @throws {RequiredError}
545
+ */
546
+ async getShipments(status, locationId, marketplaceId, channelName, lastUpdatedAfter, lastUpdatedBefore, maxResults, paginationToken, options) {
547
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getShipments(status, locationId, marketplaceId, channelName, lastUpdatedAfter, lastUpdatedBefore, maxResults, paginationToken, options);
548
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
549
+ const localVarOperationServerBasePath = operationServerMap["ExternalFulfillmentShipmentsApi.getShipments"]?.[localVarOperationServerIndex]?.url;
550
+ return (axios$5, basePath) => createRequestFunction(localVarAxiosArgs, axios.default, BASE_PATH, configuration)(axios$5, localVarOperationServerBasePath || basePath);
551
+ },
552
+ /**
553
+ * Confirm or reject the specified shipment.
554
+ * @param {string} shipmentId The ID of the shipment you want to confirm or reject.
555
+ * @param {ProcessShipmentOperationEnum} operation The status of the shipment.
556
+ * @param {ShipmentAcknowledgementRequest} [body] Information about the shipment and its line items.
557
+ * @param {*} [options] Override http request option.
558
+ * @throws {RequiredError}
559
+ */
560
+ async processShipment(shipmentId, operation, body, options) {
561
+ const localVarAxiosArgs = await localVarAxiosParamCreator.processShipment(shipmentId, operation, body, options);
562
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
563
+ const localVarOperationServerBasePath = operationServerMap["ExternalFulfillmentShipmentsApi.processShipment"]?.[localVarOperationServerIndex]?.url;
564
+ return (axios$6, basePath) => createRequestFunction(localVarAxiosArgs, axios.default, BASE_PATH, configuration)(axios$6, localVarOperationServerBasePath || basePath);
565
+ },
566
+ /**
567
+ * Retrieve invoices for the shipment you specify.
568
+ * @param {string} shipmentId The ID of the shipment whose invoice you want to retrieve.
569
+ * @param {*} [options] Override http request option.
570
+ * @throws {RequiredError}
571
+ */
572
+ async retrieveInvoice(shipmentId, options) {
573
+ const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveInvoice(shipmentId, options);
574
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
575
+ const localVarOperationServerBasePath = operationServerMap["ExternalFulfillmentShipmentsApi.retrieveInvoice"]?.[localVarOperationServerIndex]?.url;
576
+ return (axios$7, basePath) => createRequestFunction(localVarAxiosArgs, axios.default, BASE_PATH, configuration)(axios$7, localVarOperationServerBasePath || basePath);
577
+ },
578
+ /**
579
+ * Get a list of shipping options for a package in a shipment given the shipment\'s marketplace and channel. If the marketplace and channel have a pre-determined shipping option, then this operation returns an empty response.
580
+ * @param {string} shipmentId The ID of the shipment to which the package belongs.
581
+ * @param {string} packageId The ID of the package for which you want to retrieve shipping options.
582
+ * @param {*} [options] Override http request option.
583
+ * @throws {RequiredError}
584
+ */
585
+ async retrieveShippingOptions(shipmentId, packageId, options) {
586
+ const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveShippingOptions(shipmentId, packageId, options);
587
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
588
+ const localVarOperationServerBasePath = operationServerMap["ExternalFulfillmentShipmentsApi.retrieveShippingOptions"]?.[localVarOperationServerIndex]?.url;
589
+ return (axios$8, basePath) => createRequestFunction(localVarAxiosArgs, axios.default, BASE_PATH, configuration)(axios$8, localVarOperationServerBasePath || basePath);
590
+ },
591
+ /**
592
+ * Updates the details about the packages that will be used to fulfill the specified shipment.
593
+ * @param {string} shipmentId The ID of the shipment to which the package belongs.
594
+ * @param {string} packageId The ID of the package whose information you want to update.
595
+ * @param {Package} body The body of the request.
596
+ * @param {*} [options] Override http request option.
597
+ * @throws {RequiredError}
598
+ */
599
+ async updatePackage(shipmentId, packageId, body, options) {
600
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updatePackage(shipmentId, packageId, body, options);
601
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
602
+ const localVarOperationServerBasePath = operationServerMap["ExternalFulfillmentShipmentsApi.updatePackage"]?.[localVarOperationServerIndex]?.url;
603
+ return (axios$9, basePath) => createRequestFunction(localVarAxiosArgs, axios.default, BASE_PATH, configuration)(axios$9, localVarOperationServerBasePath || basePath);
604
+ },
605
+ /**
606
+ * Updates the status of the packages.
607
+ * @param {string} shipmentId The ID of the shipment to which the package belongs.
608
+ * @param {string} packageId The ID of the package whose status you want to update.
609
+ * @param {UpdatePackageStatusStatusEnum} [status] **DEPRECATED**. Do not use. Package status is defined in the body parameter.
610
+ * @param {PackageDeliveryStatus} [body] The body of the request.
611
+ * @param {*} [options] Override http request option.
612
+ * @throws {RequiredError}
613
+ */
614
+ async updatePackageStatus(shipmentId, packageId, status, body, options) {
615
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updatePackageStatus(shipmentId, packageId, status, body, options);
616
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
617
+ const localVarOperationServerBasePath = operationServerMap["ExternalFulfillmentShipmentsApi.updatePackageStatus"]?.[localVarOperationServerIndex]?.url;
618
+ return (axios$10, basePath) => createRequestFunction(localVarAxiosArgs, axios.default, BASE_PATH, configuration)(axios$10, localVarOperationServerBasePath || basePath);
619
+ }
620
+ };
646
621
  };
647
- var ExternalFulfillmentShipmentsApiFactory = function(configuration, basePath, axios) {
648
- const localVarFp = ExternalFulfillmentShipmentsApiFp(configuration);
649
- return {
650
- /**
651
- * Provide details about the packages in the specified shipment.
652
- * @param {ExternalFulfillmentShipmentsApiCreatePackagesRequest} requestParameters Request parameters.
653
- * @param {*} [options] Override http request option.
654
- * @throws {RequiredError}
655
- */
656
- createPackages(requestParameters, options) {
657
- return localVarFp.createPackages(requestParameters.shipmentId, requestParameters.body, options).then((request) => request(axios, basePath));
658
- },
659
- /**
660
- * Get invoices for the shipment you specify.
661
- * @param {ExternalFulfillmentShipmentsApiGenerateInvoiceRequest} requestParameters Request parameters.
662
- * @param {*} [options] Override http request option.
663
- * @throws {RequiredError}
664
- */
665
- generateInvoice(requestParameters, options) {
666
- return localVarFp.generateInvoice(requestParameters.shipmentId, options).then((request) => request(axios, basePath));
667
- },
668
- /**
669
- * Generate and retrieve all shipping labels for one or more packages in the shipment you specify.
670
- * @param {ExternalFulfillmentShipmentsApiGenerateShipLabelsRequest} requestParameters Request parameters.
671
- * @param {*} [options] Override http request option.
672
- * @throws {RequiredError}
673
- */
674
- generateShipLabels(requestParameters, options) {
675
- return localVarFp.generateShipLabels(requestParameters.shipmentId, requestParameters.operation, requestParameters.shippingOptionId, requestParameters.body, options).then((request) => request(axios, basePath));
676
- },
677
- /**
678
- * Get a single shipment with the ID you specify.
679
- * @param {ExternalFulfillmentShipmentsApiGetShipmentRequest} requestParameters Request parameters.
680
- * @param {*} [options] Override http request option.
681
- * @throws {RequiredError}
682
- */
683
- getShipment(requestParameters, options) {
684
- return localVarFp.getShipment(requestParameters.shipmentId, options).then((request) => request(axios, basePath));
685
- },
686
- /**
687
- * Get a list of shipments created for the seller in the status you specify. Shipments can be further filtered based on the fulfillment node or the time of the shipments\' last update.
688
- * @param {ExternalFulfillmentShipmentsApiGetShipmentsRequest} requestParameters Request parameters.
689
- * @param {*} [options] Override http request option.
690
- * @throws {RequiredError}
691
- */
692
- getShipments(requestParameters, options) {
693
- return localVarFp.getShipments(requestParameters.status, requestParameters.locationId, requestParameters.marketplaceId, requestParameters.channelName, requestParameters.lastUpdatedAfter, requestParameters.lastUpdatedBefore, requestParameters.maxResults, requestParameters.paginationToken, options).then((request) => request(axios, basePath));
694
- },
695
- /**
696
- * Confirm or reject the specified shipment.
697
- * @param {ExternalFulfillmentShipmentsApiProcessShipmentRequest} requestParameters Request parameters.
698
- * @param {*} [options] Override http request option.
699
- * @throws {RequiredError}
700
- */
701
- processShipment(requestParameters, options) {
702
- return localVarFp.processShipment(requestParameters.shipmentId, requestParameters.operation, requestParameters.body, options).then((request) => request(axios, basePath));
703
- },
704
- /**
705
- * Retrieve invoices for the shipment you specify.
706
- * @param {ExternalFulfillmentShipmentsApiRetrieveInvoiceRequest} requestParameters Request parameters.
707
- * @param {*} [options] Override http request option.
708
- * @throws {RequiredError}
709
- */
710
- retrieveInvoice(requestParameters, options) {
711
- return localVarFp.retrieveInvoice(requestParameters.shipmentId, options).then((request) => request(axios, basePath));
712
- },
713
- /**
714
- * Get a list of shipping options for a package in a shipment given the shipment\'s marketplace and channel. If the marketplace and channel have a pre-determined shipping option, then this operation returns an empty response.
715
- * @param {ExternalFulfillmentShipmentsApiRetrieveShippingOptionsRequest} requestParameters Request parameters.
716
- * @param {*} [options] Override http request option.
717
- * @throws {RequiredError}
718
- */
719
- retrieveShippingOptions(requestParameters, options) {
720
- return localVarFp.retrieveShippingOptions(requestParameters.shipmentId, requestParameters.packageId, options).then((request) => request(axios, basePath));
721
- },
722
- /**
723
- * Updates the details about the packages that will be used to fulfill the specified shipment.
724
- * @param {ExternalFulfillmentShipmentsApiUpdatePackageRequest} requestParameters Request parameters.
725
- * @param {*} [options] Override http request option.
726
- * @throws {RequiredError}
727
- */
728
- updatePackage(requestParameters, options) {
729
- return localVarFp.updatePackage(requestParameters.shipmentId, requestParameters.packageId, requestParameters.body, options).then((request) => request(axios, basePath));
730
- },
731
- /**
732
- * Updates the status of the packages.
733
- * @param {ExternalFulfillmentShipmentsApiUpdatePackageStatusRequest} requestParameters Request parameters.
734
- * @param {*} [options] Override http request option.
735
- * @throws {RequiredError}
736
- */
737
- updatePackageStatus(requestParameters, options) {
738
- return localVarFp.updatePackageStatus(requestParameters.shipmentId, requestParameters.packageId, requestParameters.status, requestParameters.body, options).then((request) => request(axios, basePath));
739
- }
740
- };
622
+ /**
623
+ * ExternalFulfillmentShipmentsApi - factory interface
624
+ */
625
+ const ExternalFulfillmentShipmentsApiFactory = function(configuration, basePath, axios$11) {
626
+ const localVarFp = ExternalFulfillmentShipmentsApiFp(configuration);
627
+ return {
628
+ /**
629
+ * Provide details about the packages in the specified shipment.
630
+ * @param {ExternalFulfillmentShipmentsApiCreatePackagesRequest} requestParameters Request parameters.
631
+ * @param {*} [options] Override http request option.
632
+ * @throws {RequiredError}
633
+ */
634
+ createPackages(requestParameters, options) {
635
+ return localVarFp.createPackages(requestParameters.shipmentId, requestParameters.body, options).then((request) => request(axios$11, basePath));
636
+ },
637
+ /**
638
+ * Get invoices for the shipment you specify.
639
+ * @param {ExternalFulfillmentShipmentsApiGenerateInvoiceRequest} requestParameters Request parameters.
640
+ * @param {*} [options] Override http request option.
641
+ * @throws {RequiredError}
642
+ */
643
+ generateInvoice(requestParameters, options) {
644
+ return localVarFp.generateInvoice(requestParameters.shipmentId, options).then((request) => request(axios$11, basePath));
645
+ },
646
+ /**
647
+ * Generate and retrieve all shipping labels for one or more packages in the shipment you specify.
648
+ * @param {ExternalFulfillmentShipmentsApiGenerateShipLabelsRequest} requestParameters Request parameters.
649
+ * @param {*} [options] Override http request option.
650
+ * @throws {RequiredError}
651
+ */
652
+ generateShipLabels(requestParameters, options) {
653
+ return localVarFp.generateShipLabels(requestParameters.shipmentId, requestParameters.operation, requestParameters.shippingOptionId, requestParameters.body, options).then((request) => request(axios$11, basePath));
654
+ },
655
+ /**
656
+ * Get a single shipment with the ID you specify.
657
+ * @param {ExternalFulfillmentShipmentsApiGetShipmentRequest} requestParameters Request parameters.
658
+ * @param {*} [options] Override http request option.
659
+ * @throws {RequiredError}
660
+ */
661
+ getShipment(requestParameters, options) {
662
+ return localVarFp.getShipment(requestParameters.shipmentId, options).then((request) => request(axios$11, basePath));
663
+ },
664
+ /**
665
+ * Get a list of shipments created for the seller in the status you specify. Shipments can be further filtered based on the fulfillment node or the time of the shipments\' last update.
666
+ * @param {ExternalFulfillmentShipmentsApiGetShipmentsRequest} requestParameters Request parameters.
667
+ * @param {*} [options] Override http request option.
668
+ * @throws {RequiredError}
669
+ */
670
+ getShipments(requestParameters, options) {
671
+ return localVarFp.getShipments(requestParameters.status, requestParameters.locationId, requestParameters.marketplaceId, requestParameters.channelName, requestParameters.lastUpdatedAfter, requestParameters.lastUpdatedBefore, requestParameters.maxResults, requestParameters.paginationToken, options).then((request) => request(axios$11, basePath));
672
+ },
673
+ /**
674
+ * Confirm or reject the specified shipment.
675
+ * @param {ExternalFulfillmentShipmentsApiProcessShipmentRequest} requestParameters Request parameters.
676
+ * @param {*} [options] Override http request option.
677
+ * @throws {RequiredError}
678
+ */
679
+ processShipment(requestParameters, options) {
680
+ return localVarFp.processShipment(requestParameters.shipmentId, requestParameters.operation, requestParameters.body, options).then((request) => request(axios$11, basePath));
681
+ },
682
+ /**
683
+ * Retrieve invoices for the shipment you specify.
684
+ * @param {ExternalFulfillmentShipmentsApiRetrieveInvoiceRequest} requestParameters Request parameters.
685
+ * @param {*} [options] Override http request option.
686
+ * @throws {RequiredError}
687
+ */
688
+ retrieveInvoice(requestParameters, options) {
689
+ return localVarFp.retrieveInvoice(requestParameters.shipmentId, options).then((request) => request(axios$11, basePath));
690
+ },
691
+ /**
692
+ * Get a list of shipping options for a package in a shipment given the shipment\'s marketplace and channel. If the marketplace and channel have a pre-determined shipping option, then this operation returns an empty response.
693
+ * @param {ExternalFulfillmentShipmentsApiRetrieveShippingOptionsRequest} requestParameters Request parameters.
694
+ * @param {*} [options] Override http request option.
695
+ * @throws {RequiredError}
696
+ */
697
+ retrieveShippingOptions(requestParameters, options) {
698
+ return localVarFp.retrieveShippingOptions(requestParameters.shipmentId, requestParameters.packageId, options).then((request) => request(axios$11, basePath));
699
+ },
700
+ /**
701
+ * Updates the details about the packages that will be used to fulfill the specified shipment.
702
+ * @param {ExternalFulfillmentShipmentsApiUpdatePackageRequest} requestParameters Request parameters.
703
+ * @param {*} [options] Override http request option.
704
+ * @throws {RequiredError}
705
+ */
706
+ updatePackage(requestParameters, options) {
707
+ return localVarFp.updatePackage(requestParameters.shipmentId, requestParameters.packageId, requestParameters.body, options).then((request) => request(axios$11, basePath));
708
+ },
709
+ /**
710
+ * Updates the status of the packages.
711
+ * @param {ExternalFulfillmentShipmentsApiUpdatePackageStatusRequest} requestParameters Request parameters.
712
+ * @param {*} [options] Override http request option.
713
+ * @throws {RequiredError}
714
+ */
715
+ updatePackageStatus(requestParameters, options) {
716
+ return localVarFp.updatePackageStatus(requestParameters.shipmentId, requestParameters.packageId, requestParameters.status, requestParameters.body, options).then((request) => request(axios$11, basePath));
717
+ }
718
+ };
741
719
  };
720
+ /**
721
+ * ExternalFulfillmentShipmentsApi - object-oriented interface
722
+ */
742
723
  var ExternalFulfillmentShipmentsApi = class extends BaseAPI {
743
- /**
744
- * Provide details about the packages in the specified shipment.
745
- * @param {ExternalFulfillmentShipmentsApiCreatePackagesRequest} requestParameters Request parameters.
746
- * @param {*} [options] Override http request option.
747
- * @throws {RequiredError}
748
- */
749
- createPackages(requestParameters, options) {
750
- return ExternalFulfillmentShipmentsApiFp(this.configuration).createPackages(requestParameters.shipmentId, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
751
- }
752
- /**
753
- * Get invoices for the shipment you specify.
754
- * @param {ExternalFulfillmentShipmentsApiGenerateInvoiceRequest} requestParameters Request parameters.
755
- * @param {*} [options] Override http request option.
756
- * @throws {RequiredError}
757
- */
758
- generateInvoice(requestParameters, options) {
759
- return ExternalFulfillmentShipmentsApiFp(this.configuration).generateInvoice(requestParameters.shipmentId, options).then((request) => request(this.axios, this.basePath));
760
- }
761
- /**
762
- * Generate and retrieve all shipping labels for one or more packages in the shipment you specify.
763
- * @param {ExternalFulfillmentShipmentsApiGenerateShipLabelsRequest} requestParameters Request parameters.
764
- * @param {*} [options] Override http request option.
765
- * @throws {RequiredError}
766
- */
767
- generateShipLabels(requestParameters, options) {
768
- return ExternalFulfillmentShipmentsApiFp(this.configuration).generateShipLabels(requestParameters.shipmentId, requestParameters.operation, requestParameters.shippingOptionId, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
769
- }
770
- /**
771
- * Get a single shipment with the ID you specify.
772
- * @param {ExternalFulfillmentShipmentsApiGetShipmentRequest} requestParameters Request parameters.
773
- * @param {*} [options] Override http request option.
774
- * @throws {RequiredError}
775
- */
776
- getShipment(requestParameters, options) {
777
- return ExternalFulfillmentShipmentsApiFp(this.configuration).getShipment(requestParameters.shipmentId, options).then((request) => request(this.axios, this.basePath));
778
- }
779
- /**
780
- * Get a list of shipments created for the seller in the status you specify. Shipments can be further filtered based on the fulfillment node or the time of the shipments\' last update.
781
- * @param {ExternalFulfillmentShipmentsApiGetShipmentsRequest} requestParameters Request parameters.
782
- * @param {*} [options] Override http request option.
783
- * @throws {RequiredError}
784
- */
785
- getShipments(requestParameters, options) {
786
- return ExternalFulfillmentShipmentsApiFp(this.configuration).getShipments(requestParameters.status, requestParameters.locationId, requestParameters.marketplaceId, requestParameters.channelName, requestParameters.lastUpdatedAfter, requestParameters.lastUpdatedBefore, requestParameters.maxResults, requestParameters.paginationToken, options).then((request) => request(this.axios, this.basePath));
787
- }
788
- /**
789
- * Confirm or reject the specified shipment.
790
- * @param {ExternalFulfillmentShipmentsApiProcessShipmentRequest} requestParameters Request parameters.
791
- * @param {*} [options] Override http request option.
792
- * @throws {RequiredError}
793
- */
794
- processShipment(requestParameters, options) {
795
- return ExternalFulfillmentShipmentsApiFp(this.configuration).processShipment(requestParameters.shipmentId, requestParameters.operation, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
796
- }
797
- /**
798
- * Retrieve invoices for the shipment you specify.
799
- * @param {ExternalFulfillmentShipmentsApiRetrieveInvoiceRequest} requestParameters Request parameters.
800
- * @param {*} [options] Override http request option.
801
- * @throws {RequiredError}
802
- */
803
- retrieveInvoice(requestParameters, options) {
804
- return ExternalFulfillmentShipmentsApiFp(this.configuration).retrieveInvoice(requestParameters.shipmentId, options).then((request) => request(this.axios, this.basePath));
805
- }
806
- /**
807
- * Get a list of shipping options for a package in a shipment given the shipment\'s marketplace and channel. If the marketplace and channel have a pre-determined shipping option, then this operation returns an empty response.
808
- * @param {ExternalFulfillmentShipmentsApiRetrieveShippingOptionsRequest} requestParameters Request parameters.
809
- * @param {*} [options] Override http request option.
810
- * @throws {RequiredError}
811
- */
812
- retrieveShippingOptions(requestParameters, options) {
813
- return ExternalFulfillmentShipmentsApiFp(this.configuration).retrieveShippingOptions(requestParameters.shipmentId, requestParameters.packageId, options).then((request) => request(this.axios, this.basePath));
814
- }
815
- /**
816
- * Updates the details about the packages that will be used to fulfill the specified shipment.
817
- * @param {ExternalFulfillmentShipmentsApiUpdatePackageRequest} requestParameters Request parameters.
818
- * @param {*} [options] Override http request option.
819
- * @throws {RequiredError}
820
- */
821
- updatePackage(requestParameters, options) {
822
- return ExternalFulfillmentShipmentsApiFp(this.configuration).updatePackage(requestParameters.shipmentId, requestParameters.packageId, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
823
- }
824
- /**
825
- * Updates the status of the packages.
826
- * @param {ExternalFulfillmentShipmentsApiUpdatePackageStatusRequest} requestParameters Request parameters.
827
- * @param {*} [options] Override http request option.
828
- * @throws {RequiredError}
829
- */
830
- updatePackageStatus(requestParameters, options) {
831
- return ExternalFulfillmentShipmentsApiFp(this.configuration).updatePackageStatus(requestParameters.shipmentId, requestParameters.packageId, requestParameters.status, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
832
- }
833
- };
834
- var GenerateShipLabelsOperationEnum = {
835
- Generate: "GENERATE",
836
- Regenerate: "REGENERATE"
724
+ /**
725
+ * Provide details about the packages in the specified shipment.
726
+ * @param {ExternalFulfillmentShipmentsApiCreatePackagesRequest} requestParameters Request parameters.
727
+ * @param {*} [options] Override http request option.
728
+ * @throws {RequiredError}
729
+ */
730
+ createPackages(requestParameters, options) {
731
+ return ExternalFulfillmentShipmentsApiFp(this.configuration).createPackages(requestParameters.shipmentId, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
732
+ }
733
+ /**
734
+ * Get invoices for the shipment you specify.
735
+ * @param {ExternalFulfillmentShipmentsApiGenerateInvoiceRequest} requestParameters Request parameters.
736
+ * @param {*} [options] Override http request option.
737
+ * @throws {RequiredError}
738
+ */
739
+ generateInvoice(requestParameters, options) {
740
+ return ExternalFulfillmentShipmentsApiFp(this.configuration).generateInvoice(requestParameters.shipmentId, options).then((request) => request(this.axios, this.basePath));
741
+ }
742
+ /**
743
+ * Generate and retrieve all shipping labels for one or more packages in the shipment you specify.
744
+ * @param {ExternalFulfillmentShipmentsApiGenerateShipLabelsRequest} requestParameters Request parameters.
745
+ * @param {*} [options] Override http request option.
746
+ * @throws {RequiredError}
747
+ */
748
+ generateShipLabels(requestParameters, options) {
749
+ return ExternalFulfillmentShipmentsApiFp(this.configuration).generateShipLabels(requestParameters.shipmentId, requestParameters.operation, requestParameters.shippingOptionId, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
750
+ }
751
+ /**
752
+ * Get a single shipment with the ID you specify.
753
+ * @param {ExternalFulfillmentShipmentsApiGetShipmentRequest} requestParameters Request parameters.
754
+ * @param {*} [options] Override http request option.
755
+ * @throws {RequiredError}
756
+ */
757
+ getShipment(requestParameters, options) {
758
+ return ExternalFulfillmentShipmentsApiFp(this.configuration).getShipment(requestParameters.shipmentId, options).then((request) => request(this.axios, this.basePath));
759
+ }
760
+ /**
761
+ * Get a list of shipments created for the seller in the status you specify. Shipments can be further filtered based on the fulfillment node or the time of the shipments\' last update.
762
+ * @param {ExternalFulfillmentShipmentsApiGetShipmentsRequest} requestParameters Request parameters.
763
+ * @param {*} [options] Override http request option.
764
+ * @throws {RequiredError}
765
+ */
766
+ getShipments(requestParameters, options) {
767
+ return ExternalFulfillmentShipmentsApiFp(this.configuration).getShipments(requestParameters.status, requestParameters.locationId, requestParameters.marketplaceId, requestParameters.channelName, requestParameters.lastUpdatedAfter, requestParameters.lastUpdatedBefore, requestParameters.maxResults, requestParameters.paginationToken, options).then((request) => request(this.axios, this.basePath));
768
+ }
769
+ /**
770
+ * Confirm or reject the specified shipment.
771
+ * @param {ExternalFulfillmentShipmentsApiProcessShipmentRequest} requestParameters Request parameters.
772
+ * @param {*} [options] Override http request option.
773
+ * @throws {RequiredError}
774
+ */
775
+ processShipment(requestParameters, options) {
776
+ return ExternalFulfillmentShipmentsApiFp(this.configuration).processShipment(requestParameters.shipmentId, requestParameters.operation, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
777
+ }
778
+ /**
779
+ * Retrieve invoices for the shipment you specify.
780
+ * @param {ExternalFulfillmentShipmentsApiRetrieveInvoiceRequest} requestParameters Request parameters.
781
+ * @param {*} [options] Override http request option.
782
+ * @throws {RequiredError}
783
+ */
784
+ retrieveInvoice(requestParameters, options) {
785
+ return ExternalFulfillmentShipmentsApiFp(this.configuration).retrieveInvoice(requestParameters.shipmentId, options).then((request) => request(this.axios, this.basePath));
786
+ }
787
+ /**
788
+ * Get a list of shipping options for a package in a shipment given the shipment\'s marketplace and channel. If the marketplace and channel have a pre-determined shipping option, then this operation returns an empty response.
789
+ * @param {ExternalFulfillmentShipmentsApiRetrieveShippingOptionsRequest} requestParameters Request parameters.
790
+ * @param {*} [options] Override http request option.
791
+ * @throws {RequiredError}
792
+ */
793
+ retrieveShippingOptions(requestParameters, options) {
794
+ return ExternalFulfillmentShipmentsApiFp(this.configuration).retrieveShippingOptions(requestParameters.shipmentId, requestParameters.packageId, options).then((request) => request(this.axios, this.basePath));
795
+ }
796
+ /**
797
+ * Updates the details about the packages that will be used to fulfill the specified shipment.
798
+ * @param {ExternalFulfillmentShipmentsApiUpdatePackageRequest} requestParameters Request parameters.
799
+ * @param {*} [options] Override http request option.
800
+ * @throws {RequiredError}
801
+ */
802
+ updatePackage(requestParameters, options) {
803
+ return ExternalFulfillmentShipmentsApiFp(this.configuration).updatePackage(requestParameters.shipmentId, requestParameters.packageId, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
804
+ }
805
+ /**
806
+ * Updates the status of the packages.
807
+ * @param {ExternalFulfillmentShipmentsApiUpdatePackageStatusRequest} requestParameters Request parameters.
808
+ * @param {*} [options] Override http request option.
809
+ * @throws {RequiredError}
810
+ */
811
+ updatePackageStatus(requestParameters, options) {
812
+ return ExternalFulfillmentShipmentsApiFp(this.configuration).updatePackageStatus(requestParameters.shipmentId, requestParameters.packageId, requestParameters.status, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
813
+ }
837
814
  };
838
- var GetShipmentsStatusEnum = {
839
- Created: "CREATED",
840
- Accepted: "ACCEPTED",
841
- Confirmed: "CONFIRMED",
842
- PackageCreated: "PACKAGE_CREATED",
843
- PickupSlotRetrieved: "PICKUP_SLOT_RETRIEVED",
844
- InvoiceGenerated: "INVOICE_GENERATED",
845
- ShiplabelGenerated: "SHIPLABEL_GENERATED",
846
- Cancelled: "CANCELLED",
847
- Shipped: "SHIPPED",
848
- Delivered: "DELIVERED"
815
+ const GenerateShipLabelsOperationEnum = {
816
+ Generate: "GENERATE",
817
+ Regenerate: "REGENERATE"
849
818
  };
850
- var ProcessShipmentOperationEnum = {
851
- Confirm: "CONFIRM",
852
- Reject: "REJECT"
819
+ const GetShipmentsStatusEnum = {
820
+ Created: "CREATED",
821
+ Accepted: "ACCEPTED",
822
+ Confirmed: "CONFIRMED",
823
+ PackageCreated: "PACKAGE_CREATED",
824
+ PickupSlotRetrieved: "PICKUP_SLOT_RETRIEVED",
825
+ InvoiceGenerated: "INVOICE_GENERATED",
826
+ ShiplabelGenerated: "SHIPLABEL_GENERATED",
827
+ Cancelled: "CANCELLED",
828
+ Shipped: "SHIPPED",
829
+ Delivered: "DELIVERED"
853
830
  };
854
- var UpdatePackageStatusStatusEnum = {
855
- Shipped: "SHIPPED"
831
+ const ProcessShipmentOperationEnum = {
832
+ Confirm: "CONFIRM",
833
+ Reject: "REJECT"
856
834
  };
857
-
858
- // src/api-model/configuration.ts
835
+ const UpdatePackageStatusStatusEnum = { Shipped: "SHIPPED" };
836
+ //#endregion
837
+ //#region src/api-model/configuration.ts
859
838
  var Configuration = class {
860
- /**
861
- * parameter for apiKey security
862
- * @param name security name
863
- */
864
- apiKey;
865
- /**
866
- * parameter for basic security
867
- */
868
- username;
869
- /**
870
- * parameter for basic security
871
- */
872
- password;
873
- /**
874
- * parameter for oauth2 security
875
- * @param name security name
876
- * @param scopes oauth2 scope
877
- */
878
- accessToken;
879
- /**
880
- * parameter for aws4 signature security
881
- * @param {Object} AWS4Signature - AWS4 Signature security
882
- * @param {string} options.region - aws region
883
- * @param {string} options.service - name of the service.
884
- * @param {string} credentials.accessKeyId - aws access key id
885
- * @param {string} credentials.secretAccessKey - aws access key
886
- * @param {string} credentials.sessionToken - aws session token
887
- * @memberof Configuration
888
- */
889
- awsv4;
890
- /**
891
- * override base path
892
- */
893
- basePath;
894
- /**
895
- * override server index
896
- */
897
- serverIndex;
898
- /**
899
- * base options for axios calls
900
- */
901
- baseOptions;
902
- /**
903
- * The FormData constructor that will be used to create multipart form data
904
- * requests. You can inject this here so that execution environments that
905
- * do not support the FormData class can still run the generated client.
906
- *
907
- * @type {new () => FormData}
908
- */
909
- formDataCtor;
910
- constructor(param = {}) {
911
- this.apiKey = param.apiKey;
912
- this.username = param.username;
913
- this.password = param.password;
914
- this.accessToken = param.accessToken;
915
- this.awsv4 = param.awsv4;
916
- this.basePath = param.basePath;
917
- this.serverIndex = param.serverIndex;
918
- this.baseOptions = {
919
- ...param.baseOptions,
920
- headers: {
921
- ...param.baseOptions?.headers
922
- }
923
- };
924
- this.formDataCtor = param.formDataCtor;
925
- }
926
- /**
927
- * Check if the given MIME is a JSON MIME.
928
- * JSON MIME examples:
929
- * application/json
930
- * application/json; charset=UTF8
931
- * APPLICATION/JSON
932
- * application/vnd.company+json
933
- * @param mime - MIME (Multipurpose Internet Mail Extensions)
934
- * @return True if the given MIME is JSON, false otherwise.
935
- */
936
- isJsonMime(mime) {
937
- const jsonMime = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i;
938
- return mime !== null && jsonMime.test(mime);
939
- }
839
+ /**
840
+ * parameter for apiKey security
841
+ * @param name security name
842
+ */
843
+ apiKey;
844
+ /**
845
+ * parameter for basic security
846
+ */
847
+ username;
848
+ /**
849
+ * parameter for basic security
850
+ */
851
+ password;
852
+ /**
853
+ * parameter for oauth2 security
854
+ * @param name security name
855
+ * @param scopes oauth2 scope
856
+ */
857
+ accessToken;
858
+ /**
859
+ * parameter for aws4 signature security
860
+ * @param {Object} AWS4Signature - AWS4 Signature security
861
+ * @param {string} options.region - aws region
862
+ * @param {string} options.service - name of the service.
863
+ * @param {string} credentials.accessKeyId - aws access key id
864
+ * @param {string} credentials.secretAccessKey - aws access key
865
+ * @param {string} credentials.sessionToken - aws session token
866
+ * @memberof Configuration
867
+ */
868
+ awsv4;
869
+ /**
870
+ * override base path
871
+ */
872
+ basePath;
873
+ /**
874
+ * override server index
875
+ */
876
+ serverIndex;
877
+ /**
878
+ * base options for axios calls
879
+ */
880
+ baseOptions;
881
+ /**
882
+ * The FormData constructor that will be used to create multipart form data
883
+ * requests. You can inject this here so that execution environments that
884
+ * do not support the FormData class can still run the generated client.
885
+ *
886
+ * @type {new () => FormData}
887
+ */
888
+ formDataCtor;
889
+ constructor(param = {}) {
890
+ this.apiKey = param.apiKey;
891
+ this.username = param.username;
892
+ this.password = param.password;
893
+ this.accessToken = param.accessToken;
894
+ this.awsv4 = param.awsv4;
895
+ this.basePath = param.basePath;
896
+ this.serverIndex = param.serverIndex;
897
+ this.baseOptions = {
898
+ ...param.baseOptions,
899
+ headers: { ...param.baseOptions?.headers }
900
+ };
901
+ this.formDataCtor = param.formDataCtor;
902
+ }
903
+ /**
904
+ * Check if the given MIME is a JSON MIME.
905
+ * JSON MIME examples:
906
+ * application/json
907
+ * application/json; charset=UTF8
908
+ * APPLICATION/JSON
909
+ * application/vnd.company+json
910
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
911
+ * @return True if the given MIME is JSON, false otherwise.
912
+ */
913
+ isJsonMime(mime) {
914
+ return mime !== null && /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i.test(mime);
915
+ }
940
916
  };
941
-
942
- // src/api-model/models/cancellation.ts
943
- var CancellationCancellationTypeEnum = {
944
- SellerRejected: "SELLER_REJECTED",
945
- MarketplaceCancelled: "MARKETPLACE_CANCELLED",
946
- SystemCancelled: "SYSTEM_CANCELLED"
917
+ //#endregion
918
+ //#region src/api-model/models/cancellation.ts
919
+ const CancellationCancellationTypeEnum = {
920
+ SellerRejected: "SELLER_REJECTED",
921
+ MarketplaceCancelled: "MARKETPLACE_CANCELLED",
922
+ SystemCancelled: "SYSTEM_CANCELLED"
947
923
  };
948
-
949
- // src/api-model/models/charge.ts
950
- var ChargeChargeTypeEnum = {
951
- Product: "PRODUCT",
952
- Shipping: "SHIPPING",
953
- GiftWrap: "GIFT_WRAP",
954
- Total: "TOTAL",
955
- Other: "OTHER"
924
+ //#endregion
925
+ //#region src/api-model/models/charge.ts
926
+ const ChargeChargeTypeEnum = {
927
+ Product: "PRODUCT",
928
+ Shipping: "SHIPPING",
929
+ GiftWrap: "GIFT_WRAP",
930
+ Total: "TOTAL",
931
+ Other: "OTHER"
956
932
  };
957
-
958
- // src/api-model/models/custom-attribute-type.ts
959
- var CustomAttributeType = {
960
- String: "STRING",
961
- Boolean: "BOOLEAN",
962
- Integer: "INTEGER",
963
- Double: "DOUBLE",
964
- JsonString: "JSON_STRING"
933
+ //#endregion
934
+ //#region src/api-model/models/custom-attribute-type.ts
935
+ /**
936
+ * The Selling Partner API for Amazon External Fulfillment Shipments Processing
937
+ * You can use the External Fulfillment Shipments API to retrieve, manage, and track shipments processed through Amazon\'s external fulfillment network. Use this API to get shipment details, monitor status changes, and access fulfillment requirements.
938
+ *
939
+ * The version of the OpenAPI document: 2024-09-11
940
+ * Contact: marketplaceapitest@amazon.com
941
+ *
942
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
943
+ * https://openapi-generator.tech
944
+ * Do not edit the class manually.
945
+ */
946
+ /**
947
+ * The data type of the custom attribute value to aid with parsing during deserialization.
948
+ */
949
+ const CustomAttributeType = {
950
+ String: "STRING",
951
+ Boolean: "BOOLEAN",
952
+ Integer: "INTEGER",
953
+ Double: "DOUBLE",
954
+ JsonString: "JSON_STRING"
965
955
  };
966
-
967
- // src/api-model/models/dimension.ts
968
- var DimensionDimensionUnitEnum = {
969
- Cm: "CM",
970
- M: "M",
971
- In: "IN"
956
+ //#endregion
957
+ //#region src/api-model/models/dimension.ts
958
+ const DimensionDimensionUnitEnum = {
959
+ Cm: "CM",
960
+ M: "M",
961
+ In: "IN"
972
962
  };
973
-
974
- // src/api-model/models/distance.ts
975
- var DistanceDistanceUnitEnum = {
976
- Mi: "MI",
977
- Km: "KM"
963
+ //#endregion
964
+ //#region src/api-model/models/distance.ts
965
+ const DistanceDistanceUnitEnum = {
966
+ Mi: "MI",
967
+ Km: "KM"
978
968
  };
979
-
980
- // src/api-model/models/document.ts
981
- var DocumentFormatEnum = {
982
- Zpl: "ZPL",
983
- Pdf: "PDF",
984
- Png: "PNG",
985
- PlainText: "PLAIN_TEXT"
969
+ //#endregion
970
+ //#region src/api-model/models/document.ts
971
+ const DocumentFormatEnum = {
972
+ Zpl: "ZPL",
973
+ Pdf: "PDF",
974
+ Png: "PNG",
975
+ PlainText: "PLAIN_TEXT"
986
976
  };
987
-
988
- // src/api-model/models/invoice-requirement.ts
989
- var InvoiceRequirementRequirementEnum = {
990
- Required: "REQUIRED",
991
- NotRequired: "NOT_REQUIRED"
977
+ //#endregion
978
+ //#region src/api-model/models/invoice-requirement.ts
979
+ const InvoiceRequirementRequirementEnum = {
980
+ Required: "REQUIRED",
981
+ NotRequired: "NOT_REQUIRED"
992
982
  };
993
- var InvoiceRequirementStatusEnum = {
994
- Pending: "PENDING",
995
- Available: "AVAILABLE",
996
- NotAvailable: "NOT_AVAILABLE"
983
+ const InvoiceRequirementStatusEnum = {
984
+ Pending: "PENDING",
985
+ Available: "AVAILABLE",
986
+ NotAvailable: "NOT_AVAILABLE"
997
987
  };
998
-
999
- // src/api-model/models/line-item-with-reason.ts
1000
- var LineItemWithReasonReasonEnum = {
1001
- OutOfStock: "OUT_OF_STOCK",
1002
- CustomerRequested: "CUSTOMER_REQUESTED"
988
+ //#endregion
989
+ //#region src/api-model/models/line-item-with-reason.ts
990
+ const LineItemWithReasonReasonEnum = {
991
+ OutOfStock: "OUT_OF_STOCK",
992
+ CustomerRequested: "CUSTOMER_REQUESTED"
1003
993
  };
1004
-
1005
- // src/api-model/models/marketplace-attributes.ts
1006
- var MarketplaceAttributesCustomAttributesEnum = {
1007
- Prime: "PRIME",
1008
- Fasttrack: "FASTTRACK"
994
+ //#endregion
995
+ //#region src/api-model/models/marketplace-attributes.ts
996
+ const MarketplaceAttributesCustomAttributesEnum = {
997
+ Prime: "PRIME",
998
+ Fasttrack: "FASTTRACK"
1009
999
  };
1010
-
1011
- // src/api-model/models/package.ts
1012
- var PackageStatusEnum = {
1013
- Created: "CREATED",
1014
- PickupSlotRetrieved: "PICKUP_SLOT_RETRIEVED",
1015
- InvoiceGenerated: "INVOICE_GENERATED",
1016
- ShiplabelGenerated: "SHIPLABEL_GENERATED",
1017
- Shipped: "SHIPPED",
1018
- Delivered: "DELIVERED",
1019
- Cancelled: "CANCELLED"
1000
+ //#endregion
1001
+ //#region src/api-model/models/package.ts
1002
+ const PackageStatusEnum = {
1003
+ Created: "CREATED",
1004
+ PickupSlotRetrieved: "PICKUP_SLOT_RETRIEVED",
1005
+ InvoiceGenerated: "INVOICE_GENERATED",
1006
+ ShiplabelGenerated: "SHIPLABEL_GENERATED",
1007
+ Shipped: "SHIPPED",
1008
+ Delivered: "DELIVERED",
1009
+ Cancelled: "CANCELLED"
1020
1010
  };
1021
- var PackagePackageHandlingRequirementsEnum = {
1022
- Normal: "NORMAL",
1023
- Fragile: "FRAGILE"
1011
+ const PackagePackageHandlingRequirementsEnum = {
1012
+ Normal: "NORMAL",
1013
+ Fragile: "FRAGILE"
1024
1014
  };
1025
-
1026
- // src/api-model/models/package-status.ts
1027
- var PackageStatus = {
1028
- Created: "CREATED",
1029
- PickupSlotRetrieved: "PICKUP_SLOT_RETRIEVED",
1030
- InvoiceGenerated: "INVOICE_GENERATED",
1031
- ShiplabelGenerated: "SHIPLABEL_GENERATED",
1032
- Shipped: "SHIPPED",
1033
- Delivered: "DELIVERED"
1015
+ //#endregion
1016
+ //#region src/api-model/models/package-status.ts
1017
+ /**
1018
+ * The Selling Partner API for Amazon External Fulfillment Shipments Processing
1019
+ * You can use the External Fulfillment Shipments API to retrieve, manage, and track shipments processed through Amazon\'s external fulfillment network. Use this API to get shipment details, monitor status changes, and access fulfillment requirements.
1020
+ *
1021
+ * The version of the OpenAPI document: 2024-09-11
1022
+ * Contact: marketplaceapitest@amazon.com
1023
+ *
1024
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1025
+ * https://openapi-generator.tech
1026
+ * Do not edit the class manually.
1027
+ */
1028
+ /**
1029
+ * The status of a package.
1030
+ */
1031
+ const PackageStatus = {
1032
+ Created: "CREATED",
1033
+ PickupSlotRetrieved: "PICKUP_SLOT_RETRIEVED",
1034
+ InvoiceGenerated: "INVOICE_GENERATED",
1035
+ ShiplabelGenerated: "SHIPLABEL_GENERATED",
1036
+ Shipped: "SHIPPED",
1037
+ Delivered: "DELIVERED"
1034
1038
  };
1035
-
1036
- // src/api-model/models/package-sub-status.ts
1037
- var PackageSubStatus = {
1038
- OutForDelivery: "OUT_FOR_DELIVERY",
1039
- Delivered: "DELIVERED",
1040
- NotDelivered: "NOT_DELIVERED",
1041
- Undeliverable: "UNDELIVERABLE"
1039
+ //#endregion
1040
+ //#region src/api-model/models/package-sub-status.ts
1041
+ /**
1042
+ * The Selling Partner API for Amazon External Fulfillment Shipments Processing
1043
+ * You can use the External Fulfillment Shipments API to retrieve, manage, and track shipments processed through Amazon\'s external fulfillment network. Use this API to get shipment details, monitor status changes, and access fulfillment requirements.
1044
+ *
1045
+ * The version of the OpenAPI document: 2024-09-11
1046
+ * Contact: marketplaceapitest@amazon.com
1047
+ *
1048
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1049
+ * https://openapi-generator.tech
1050
+ * Do not edit the class manually.
1051
+ */
1052
+ /**
1053
+ * The sub-status of a package.
1054
+ */
1055
+ const PackageSubStatus = {
1056
+ OutForDelivery: "OUT_FOR_DELIVERY",
1057
+ Delivered: "DELIVERED",
1058
+ NotDelivered: "NOT_DELIVERED",
1059
+ Undeliverable: "UNDELIVERABLE"
1042
1060
  };
1043
-
1044
- // src/api-model/models/packing-slip-requirement.ts
1045
- var PackingSlipRequirementRequirementEnum = {
1046
- Required: "REQUIRED",
1047
- NotRequired: "NOT_REQUIRED"
1061
+ //#endregion
1062
+ //#region src/api-model/models/packing-slip-requirement.ts
1063
+ const PackingSlipRequirementRequirementEnum = {
1064
+ Required: "REQUIRED",
1065
+ NotRequired: "NOT_REQUIRED"
1048
1066
  };
1049
- var PackingSlipRequirementStatusEnum = {
1050
- Generated: "GENERATED",
1051
- NotGenerated: "NOT_GENERATED"
1067
+ const PackingSlipRequirementStatusEnum = {
1068
+ Generated: "GENERATED",
1069
+ NotGenerated: "NOT_GENERATED"
1052
1070
  };
1053
-
1054
- // src/api-model/models/party-identification-info.ts
1055
- var PartyIdentificationInfoPartyTypeEnum = {
1056
- BillToParty: "BILL_TO_PARTY",
1057
- ShipToParty: "SHIP_TO_PARTY",
1058
- ShipFromParty: "SHIP_FROM_PARTY",
1059
- SellingParty: "SELLING_PARTY"
1071
+ //#endregion
1072
+ //#region src/api-model/models/party-identification-info.ts
1073
+ const PartyIdentificationInfoPartyTypeEnum = {
1074
+ BillToParty: "BILL_TO_PARTY",
1075
+ ShipToParty: "SHIP_TO_PARTY",
1076
+ ShipFromParty: "SHIP_FROM_PARTY",
1077
+ SellingParty: "SELLING_PARTY"
1060
1078
  };
1061
-
1062
- // src/api-model/models/piece-type.ts
1063
- var PieceType = {
1064
- Single: "SINGLE",
1065
- Multiple: "MULTIPLE"
1079
+ //#endregion
1080
+ //#region src/api-model/models/piece-type.ts
1081
+ /**
1082
+ * The Selling Partner API for Amazon External Fulfillment Shipments Processing
1083
+ * You can use the External Fulfillment Shipments API to retrieve, manage, and track shipments processed through Amazon\'s external fulfillment network. Use this API to get shipment details, monitor status changes, and access fulfillment requirements.
1084
+ *
1085
+ * The version of the OpenAPI document: 2024-09-11
1086
+ * Contact: marketplaceapitest@amazon.com
1087
+ *
1088
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1089
+ * https://openapi-generator.tech
1090
+ * Do not edit the class manually.
1091
+ */
1092
+ /**
1093
+ * Whether the item is a single piece or multiple pieces.
1094
+ */
1095
+ const PieceType = {
1096
+ Single: "SINGLE",
1097
+ Multiple: "MULTIPLE"
1066
1098
  };
1067
-
1068
- // src/api-model/models/presence-status.ts
1069
- var PresenceStatus = {
1070
- Absent: "ABSENT",
1071
- Present: "PRESENT"
1099
+ //#endregion
1100
+ //#region src/api-model/models/presence-status.ts
1101
+ /**
1102
+ * The Selling Partner API for Amazon External Fulfillment Shipments Processing
1103
+ * You can use the External Fulfillment Shipments API to retrieve, manage, and track shipments processed through Amazon\'s external fulfillment network. Use this API to get shipment details, monitor status changes, and access fulfillment requirements.
1104
+ *
1105
+ * The version of the OpenAPI document: 2024-09-11
1106
+ * Contact: marketplaceapitest@amazon.com
1107
+ *
1108
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1109
+ * https://openapi-generator.tech
1110
+ * Do not edit the class manually.
1111
+ */
1112
+ /**
1113
+ * Whether the element is present or absent.
1114
+ */
1115
+ const PresenceStatus = {
1116
+ Absent: "ABSENT",
1117
+ Present: "PRESENT"
1072
1118
  };
1073
-
1074
- // src/api-model/models/priority.ts
1075
- var Priority = {
1076
- High: "HIGH",
1077
- Low: "LOW"
1119
+ //#endregion
1120
+ //#region src/api-model/models/priority.ts
1121
+ /**
1122
+ * The Selling Partner API for Amazon External Fulfillment Shipments Processing
1123
+ * You can use the External Fulfillment Shipments API to retrieve, manage, and track shipments processed through Amazon\'s external fulfillment network. Use this API to get shipment details, monitor status changes, and access fulfillment requirements.
1124
+ *
1125
+ * The version of the OpenAPI document: 2024-09-11
1126
+ * Contact: marketplaceapitest@amazon.com
1127
+ *
1128
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1129
+ * https://openapi-generator.tech
1130
+ * Do not edit the class manually.
1131
+ */
1132
+ /**
1133
+ * The priority of the order.
1134
+ */
1135
+ const Priority = {
1136
+ High: "HIGH",
1137
+ Low: "LOW"
1078
1138
  };
1079
-
1080
- // src/api-model/models/requirement-level.ts
1081
- var RequirementLevel = {
1082
- Required: "REQUIRED",
1083
- Disallowed: "DISALLOWED"
1139
+ //#endregion
1140
+ //#region src/api-model/models/requirement-level.ts
1141
+ /**
1142
+ * The Selling Partner API for Amazon External Fulfillment Shipments Processing
1143
+ * You can use the External Fulfillment Shipments API to retrieve, manage, and track shipments processed through Amazon\'s external fulfillment network. Use this API to get shipment details, monitor status changes, and access fulfillment requirements.
1144
+ *
1145
+ * The version of the OpenAPI document: 2024-09-11
1146
+ * Contact: marketplaceapitest@amazon.com
1147
+ *
1148
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1149
+ * https://openapi-generator.tech
1150
+ * Do not edit the class manually.
1151
+ */
1152
+ /**
1153
+ * The requirement level for this field.
1154
+ */
1155
+ const RequirementLevel = {
1156
+ Required: "REQUIRED",
1157
+ Disallowed: "DISALLOWED"
1084
1158
  };
1085
-
1086
- // src/api-model/models/shipment.ts
1087
- var ShipmentStatusEnum = {
1088
- Created: "CREATED",
1089
- Accepted: "ACCEPTED",
1090
- Confirmed: "CONFIRMED",
1091
- PackageCreated: "PACKAGE_CREATED",
1092
- PickupSlotRetrieved: "PICKUP_SLOT_RETRIEVED",
1093
- InvoiceGenerated: "INVOICE_GENERATED",
1094
- ShiplabelGenerated: "SHIPLABEL_GENERATED",
1095
- Cancelled: "CANCELLED",
1096
- Shipped: "SHIPPED",
1097
- Delivered: "DELIVERED"
1159
+ //#endregion
1160
+ //#region src/api-model/models/shipment.ts
1161
+ const ShipmentStatusEnum = {
1162
+ Created: "CREATED",
1163
+ Accepted: "ACCEPTED",
1164
+ Confirmed: "CONFIRMED",
1165
+ PackageCreated: "PACKAGE_CREATED",
1166
+ PickupSlotRetrieved: "PICKUP_SLOT_RETRIEVED",
1167
+ InvoiceGenerated: "INVOICE_GENERATED",
1168
+ ShiplabelGenerated: "SHIPLABEL_GENERATED",
1169
+ Cancelled: "CANCELLED",
1170
+ Shipped: "SHIPPED",
1171
+ Delivered: "DELIVERED"
1098
1172
  };
1099
- var ShipmentSubStatusEnum = {
1100
- PendingSchedule: "PENDING_SCHEDULE",
1101
- PendingPickup: "PENDING_PICKUP",
1102
- PendingDropOff: "PENDING_DROP_OFF",
1103
- LabelCanceled: "LABEL_CANCELED",
1104
- PickedUp: "PICKED_UP",
1105
- DroppedOff: "DROPPED_OFF",
1106
- AtOriginFc: "AT_ORIGIN_FC",
1107
- AtDestinationFc: "AT_DESTINATION_FC",
1108
- Delivered: "DELIVERED",
1109
- NotDelivered: "NOT_DELIVERED",
1110
- Undeliverable: "UNDELIVERABLE",
1111
- Lost: "LOST",
1112
- OutForDelivery: "OUT_FOR_DELIVERY",
1113
- Damaged: "DAMAGED"
1173
+ const ShipmentSubStatusEnum = {
1174
+ PendingSchedule: "PENDING_SCHEDULE",
1175
+ PendingPickup: "PENDING_PICKUP",
1176
+ PendingDropOff: "PENDING_DROP_OFF",
1177
+ LabelCanceled: "LABEL_CANCELED",
1178
+ PickedUp: "PICKED_UP",
1179
+ DroppedOff: "DROPPED_OFF",
1180
+ AtOriginFc: "AT_ORIGIN_FC",
1181
+ AtDestinationFc: "AT_DESTINATION_FC",
1182
+ Delivered: "DELIVERED",
1183
+ NotDelivered: "NOT_DELIVERED",
1184
+ Undeliverable: "UNDELIVERABLE",
1185
+ Lost: "LOST",
1186
+ OutForDelivery: "OUT_FOR_DELIVERY",
1187
+ Damaged: "DAMAGED"
1114
1188
  };
1115
-
1116
- // src/api-model/models/shipment-info.ts
1117
- var ShipmentInfoShipmentTypeEnum = {
1118
- New: "NEW",
1119
- Exchange: "EXCHANGE",
1120
- Replacement: "REPLACEMENT"
1189
+ //#endregion
1190
+ //#region src/api-model/models/shipment-info.ts
1191
+ const ShipmentInfoShipmentTypeEnum = {
1192
+ New: "NEW",
1193
+ Exchange: "EXCHANGE",
1194
+ Replacement: "REPLACEMENT"
1121
1195
  };
1122
- var ShipmentInfoProcessingSourceEnum = {
1123
- ExternalPlatform: "EXTERNAL_PLATFORM",
1124
- InternalPlatform: "INTERNAL_PLATFORM"
1196
+ const ShipmentInfoProcessingSourceEnum = {
1197
+ ExternalPlatform: "EXTERNAL_PLATFORM",
1198
+ InternalPlatform: "INTERNAL_PLATFORM"
1125
1199
  };
1126
- var ShipmentInfoPaymentMethodEnum = {
1127
- CashOnDelivery: "CASH_ON_DELIVERY",
1128
- Prepaid: "PREPAID"
1200
+ const ShipmentInfoPaymentMethodEnum = {
1201
+ CashOnDelivery: "CASH_ON_DELIVERY",
1202
+ Prepaid: "PREPAID"
1129
1203
  };
1130
-
1131
- // src/api-model/models/shipping-info.ts
1132
- var ShippingInfoShippingTypeEnum = {
1133
- Marketplace: "MARKETPLACE",
1134
- Self: "SELF"
1204
+ //#endregion
1205
+ //#region src/api-model/models/shipping-info.ts
1206
+ const ShippingInfoShippingTypeEnum = {
1207
+ Marketplace: "MARKETPLACE",
1208
+ Self: "SELF"
1135
1209
  };
1136
-
1137
- // src/api-model/models/shipping-options.ts
1138
- var ShippingOptionsShipByEnum = {
1139
- Marketplace: "MARKETPLACE",
1140
- Seller: "SELLER",
1141
- ThirdPartyCarrier: "THIRD_PARTY_CARRIER",
1142
- Other: "OTHER"
1210
+ //#endregion
1211
+ //#region src/api-model/models/shipping-options.ts
1212
+ const ShippingOptionsShipByEnum = {
1213
+ Marketplace: "MARKETPLACE",
1214
+ Seller: "SELLER",
1215
+ ThirdPartyCarrier: "THIRD_PARTY_CARRIER",
1216
+ Other: "OTHER"
1143
1217
  };
1144
-
1145
- // src/api-model/models/status.ts
1146
- var Status = {
1147
- Success: "SUCCESS",
1148
- Failure: "FAILURE"
1218
+ //#endregion
1219
+ //#region src/api-model/models/status.ts
1220
+ /**
1221
+ * The Selling Partner API for Amazon External Fulfillment Shipments Processing
1222
+ * You can use the External Fulfillment Shipments API to retrieve, manage, and track shipments processed through Amazon\'s external fulfillment network. Use this API to get shipment details, monitor status changes, and access fulfillment requirements.
1223
+ *
1224
+ * The version of the OpenAPI document: 2024-09-11
1225
+ * Contact: marketplaceapitest@amazon.com
1226
+ *
1227
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1228
+ * https://openapi-generator.tech
1229
+ * Do not edit the class manually.
1230
+ */
1231
+ /**
1232
+ * The outcome of the operation.
1233
+ */
1234
+ const Status = {
1235
+ Success: "SUCCESS",
1236
+ Failure: "FAILURE"
1149
1237
  };
1150
-
1151
- // src/api-model/models/tax.ts
1152
- var TaxTypeEnum = {
1153
- Vat: "VAT",
1154
- Cst: "CST",
1155
- Igst: "IGST",
1156
- Sgst: "SGST",
1157
- Cgst: "CGST",
1158
- Utgst: "UTGST",
1159
- Cess: "CESS",
1160
- Other: "OTHER",
1161
- Total: "TOTAL"
1238
+ //#endregion
1239
+ //#region src/api-model/models/tax.ts
1240
+ const TaxTypeEnum = {
1241
+ Vat: "VAT",
1242
+ Cst: "CST",
1243
+ Igst: "IGST",
1244
+ Sgst: "SGST",
1245
+ Cgst: "CGST",
1246
+ Utgst: "UTGST",
1247
+ Cess: "CESS",
1248
+ Other: "OTHER",
1249
+ Total: "TOTAL"
1162
1250
  };
1163
-
1164
- // src/api-model/models/tax-registration-info.ts
1165
- var TaxRegistrationInfoTypeEnum = {
1166
- Vat: "VAT",
1167
- Gst: "GST"
1251
+ //#endregion
1252
+ //#region src/api-model/models/tax-registration-info.ts
1253
+ const TaxRegistrationInfoTypeEnum = {
1254
+ Vat: "VAT",
1255
+ Gst: "GST"
1168
1256
  };
1169
-
1170
- // src/api-model/models/time-window.ts
1171
- var TimeWindowHandoverMethodEnum = {
1172
- Pickup: "PICKUP",
1173
- Dropoff: "DROPOFF"
1257
+ //#endregion
1258
+ //#region src/api-model/models/time-window.ts
1259
+ const TimeWindowHandoverMethodEnum = {
1260
+ Pickup: "PICKUP",
1261
+ Dropoff: "DROPOFF"
1174
1262
  };
1175
-
1176
- // src/api-model/models/weight.ts
1177
- var WeightWeightUnitEnum = {
1178
- G: "G",
1179
- Kg: "KG",
1180
- Lb: "LB",
1181
- Oz: "OZ"
1263
+ //#endregion
1264
+ //#region src/api-model/models/weight.ts
1265
+ const WeightWeightUnitEnum = {
1266
+ G: "G",
1267
+ Kg: "KG",
1268
+ Lb: "LB",
1269
+ Oz: "OZ"
1182
1270
  };
1183
-
1184
- // src/client.ts
1185
- var clientRateLimits = [];
1271
+ //#endregion
1272
+ //#region src/client.ts
1273
+ const clientRateLimits = [];
1186
1274
  var ExternalFulfillmentShipmentsApiClient = class extends ExternalFulfillmentShipmentsApi {
1187
- constructor(configuration) {
1188
- const { axios, endpoint } = (0, import_common2.createAxiosInstance)(configuration, clientRateLimits);
1189
- super(new Configuration(), endpoint, axios);
1190
- }
1275
+ constructor(configuration) {
1276
+ const { axios, endpoint } = (0, _sp_api_sdk_common.createAxiosInstance)(configuration, clientRateLimits);
1277
+ super(new Configuration(), endpoint, axios);
1278
+ }
1191
1279
  };
1192
- // Annotate the CommonJS export names for ESM import in node:
1193
- 0 && (module.exports = {
1194
- CancellationCancellationTypeEnum,
1195
- ChargeChargeTypeEnum,
1196
- CustomAttributeType,
1197
- DimensionDimensionUnitEnum,
1198
- DistanceDistanceUnitEnum,
1199
- DocumentFormatEnum,
1200
- ExternalFulfillmentShipmentsApi,
1201
- ExternalFulfillmentShipmentsApiAxiosParamCreator,
1202
- ExternalFulfillmentShipmentsApiClient,
1203
- ExternalFulfillmentShipmentsApiFactory,
1204
- ExternalFulfillmentShipmentsApiFp,
1205
- GenerateShipLabelsOperationEnum,
1206
- GetShipmentsStatusEnum,
1207
- InvoiceRequirementRequirementEnum,
1208
- InvoiceRequirementStatusEnum,
1209
- LineItemWithReasonReasonEnum,
1210
- MarketplaceAttributesCustomAttributesEnum,
1211
- PackagePackageHandlingRequirementsEnum,
1212
- PackageStatus,
1213
- PackageStatusEnum,
1214
- PackageSubStatus,
1215
- PackingSlipRequirementRequirementEnum,
1216
- PackingSlipRequirementStatusEnum,
1217
- PartyIdentificationInfoPartyTypeEnum,
1218
- PieceType,
1219
- PresenceStatus,
1220
- Priority,
1221
- ProcessShipmentOperationEnum,
1222
- RequirementLevel,
1223
- ShipmentInfoPaymentMethodEnum,
1224
- ShipmentInfoProcessingSourceEnum,
1225
- ShipmentInfoShipmentTypeEnum,
1226
- ShipmentStatusEnum,
1227
- ShipmentSubStatusEnum,
1228
- ShippingInfoShippingTypeEnum,
1229
- ShippingOptionsShipByEnum,
1230
- Status,
1231
- TaxRegistrationInfoTypeEnum,
1232
- TaxTypeEnum,
1233
- TimeWindowHandoverMethodEnum,
1234
- UpdatePackageStatusStatusEnum,
1235
- WeightWeightUnitEnum,
1236
- clientRateLimits
1237
- });
1280
+ //#endregion
1281
+ exports.CancellationCancellationTypeEnum = CancellationCancellationTypeEnum;
1282
+ exports.ChargeChargeTypeEnum = ChargeChargeTypeEnum;
1283
+ exports.CustomAttributeType = CustomAttributeType;
1284
+ exports.DimensionDimensionUnitEnum = DimensionDimensionUnitEnum;
1285
+ exports.DistanceDistanceUnitEnum = DistanceDistanceUnitEnum;
1286
+ exports.DocumentFormatEnum = DocumentFormatEnum;
1287
+ exports.ExternalFulfillmentShipmentsApi = ExternalFulfillmentShipmentsApi;
1288
+ exports.ExternalFulfillmentShipmentsApiAxiosParamCreator = ExternalFulfillmentShipmentsApiAxiosParamCreator;
1289
+ exports.ExternalFulfillmentShipmentsApiClient = ExternalFulfillmentShipmentsApiClient;
1290
+ exports.ExternalFulfillmentShipmentsApiFactory = ExternalFulfillmentShipmentsApiFactory;
1291
+ exports.ExternalFulfillmentShipmentsApiFp = ExternalFulfillmentShipmentsApiFp;
1292
+ exports.GenerateShipLabelsOperationEnum = GenerateShipLabelsOperationEnum;
1293
+ exports.GetShipmentsStatusEnum = GetShipmentsStatusEnum;
1294
+ exports.InvoiceRequirementRequirementEnum = InvoiceRequirementRequirementEnum;
1295
+ exports.InvoiceRequirementStatusEnum = InvoiceRequirementStatusEnum;
1296
+ exports.LineItemWithReasonReasonEnum = LineItemWithReasonReasonEnum;
1297
+ exports.MarketplaceAttributesCustomAttributesEnum = MarketplaceAttributesCustomAttributesEnum;
1298
+ exports.PackagePackageHandlingRequirementsEnum = PackagePackageHandlingRequirementsEnum;
1299
+ exports.PackageStatus = PackageStatus;
1300
+ exports.PackageStatusEnum = PackageStatusEnum;
1301
+ exports.PackageSubStatus = PackageSubStatus;
1302
+ exports.PackingSlipRequirementRequirementEnum = PackingSlipRequirementRequirementEnum;
1303
+ exports.PackingSlipRequirementStatusEnum = PackingSlipRequirementStatusEnum;
1304
+ exports.PartyIdentificationInfoPartyTypeEnum = PartyIdentificationInfoPartyTypeEnum;
1305
+ exports.PieceType = PieceType;
1306
+ exports.PresenceStatus = PresenceStatus;
1307
+ exports.Priority = Priority;
1308
+ exports.ProcessShipmentOperationEnum = ProcessShipmentOperationEnum;
1309
+ exports.RequirementLevel = RequirementLevel;
1310
+ exports.ShipmentInfoPaymentMethodEnum = ShipmentInfoPaymentMethodEnum;
1311
+ exports.ShipmentInfoProcessingSourceEnum = ShipmentInfoProcessingSourceEnum;
1312
+ exports.ShipmentInfoShipmentTypeEnum = ShipmentInfoShipmentTypeEnum;
1313
+ exports.ShipmentStatusEnum = ShipmentStatusEnum;
1314
+ exports.ShipmentSubStatusEnum = ShipmentSubStatusEnum;
1315
+ exports.ShippingInfoShippingTypeEnum = ShippingInfoShippingTypeEnum;
1316
+ exports.ShippingOptionsShipByEnum = ShippingOptionsShipByEnum;
1317
+ exports.Status = Status;
1318
+ exports.TaxRegistrationInfoTypeEnum = TaxRegistrationInfoTypeEnum;
1319
+ exports.TaxTypeEnum = TaxTypeEnum;
1320
+ exports.TimeWindowHandoverMethodEnum = TimeWindowHandoverMethodEnum;
1321
+ exports.UpdatePackageStatusStatusEnum = UpdatePackageStatusStatusEnum;
1322
+ exports.WeightWeightUnitEnum = WeightWeightUnitEnum;
1323
+ exports.clientRateLimits = clientRateLimits;
1324
+
1238
1325
  //# sourceMappingURL=index.cjs.map