@sp-api-sdk/easy-ship-api-2022-03-23 5.0.0 → 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,642 +1,715 @@
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
- Code: () => Code,
34
- EasyShipApi: () => EasyShipApi,
35
- EasyShipApiAxiosParamCreator: () => EasyShipApiAxiosParamCreator,
36
- EasyShipApiClient: () => EasyShipApiClient,
37
- EasyShipApiFactory: () => EasyShipApiFactory,
38
- EasyShipApiFp: () => EasyShipApiFp,
39
- HandoverMethod: () => HandoverMethod,
40
- LabelFormat: () => LabelFormat,
41
- PackageStatus: () => PackageStatus,
42
- UnitOfLength: () => UnitOfLength,
43
- UnitOfWeight: () => UnitOfWeight,
44
- clientRateLimits: () => clientRateLimits
45
- });
46
- module.exports = __toCommonJS(index_exports);
47
-
48
- // src/client.ts
49
- var import_common2 = require("@sp-api-sdk/common");
50
-
51
- // src/api-model/api/easy-ship-api.ts
52
- var import_axios2 = __toESM(require("axios"), 1);
53
-
54
- // src/api-model/base.ts
55
- var import_axios = __toESM(require("axios"), 1);
56
- 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(/\/+$/, "");
57
29
  var BaseAPI = class {
58
- constructor(configuration, basePath = BASE_PATH, axios = import_axios.default) {
59
- this.basePath = basePath;
60
- this.axios = axios;
61
- if (configuration) {
62
- this.configuration = configuration;
63
- this.basePath = configuration.basePath ?? basePath;
64
- }
65
- }
66
- basePath;
67
- axios;
68
- configuration;
30
+ basePath;
31
+ axios;
32
+ configuration;
33
+ constructor(configuration, basePath = BASE_PATH, axios$7 = axios.default) {
34
+ this.basePath = basePath;
35
+ this.axios = axios$7;
36
+ if (configuration) {
37
+ this.configuration = configuration;
38
+ this.basePath = configuration.basePath ?? basePath;
39
+ }
40
+ }
69
41
  };
70
42
  var RequiredError = class extends Error {
71
- constructor(field, msg) {
72
- super(msg);
73
- this.field = field;
74
- this.name = "RequiredError";
75
- }
76
- field;
43
+ field;
44
+ constructor(field, msg) {
45
+ super(msg);
46
+ this.field = field;
47
+ this.name = "RequiredError";
48
+ }
77
49
  };
78
- var operationServerMap = {};
79
-
80
- // src/api-model/common.ts
81
- var DUMMY_BASE_URL = "https://example.com";
82
- var assertParamExists = function(functionName, paramName, paramValue) {
83
- if (paramValue === null || paramValue === void 0) {
84
- throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
85
- }
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}.`);
86
60
  };
87
61
  function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
88
- if (parameter == null) return;
89
- if (typeof parameter === "object") {
90
- if (Array.isArray(parameter) || parameter instanceof Set) {
91
- parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
92
- } else {
93
- Object.keys(parameter).forEach(
94
- (currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`)
95
- );
96
- }
97
- } else {
98
- if (urlSearchParams.has(key)) {
99
- urlSearchParams.append(key, parameter);
100
- } else {
101
- urlSearchParams.set(key, parameter);
102
- }
103
- }
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);
104
67
  }
105
- var setSearchParams = function(url, ...objects) {
106
- const searchParams = new URLSearchParams(url.search);
107
- setFlattenedQueryParams(searchParams, objects);
108
- 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();
109
72
  };
110
- var replaceWithSerializableTypeIfNeeded = function(key, value) {
111
- if (value instanceof Set) {
112
- return Array.from(value);
113
- } else {
114
- return value;
115
- }
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;
116
81
  };
117
- var serializeDataIfNeeded = function(value, requestOptions, configuration) {
118
- const nonString = typeof value !== "string";
119
- const needsSerialization = nonString && configuration && configuration.isJsonMime ? configuration.isJsonMime(requestOptions.headers["Content-Type"]) : nonString;
120
- 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 || "";
121
85
  };
122
- var toPathString = function(url) {
123
- return url.pathname + url.search + url.hash;
86
+ const toPathString = function(url) {
87
+ return url.pathname + url.search + url.hash;
124
88
  };
125
- var createRequestFunction = function(axiosArgs, globalAxios3, BASE_PATH2, configuration) {
126
- return (axios = globalAxios3, basePath = BASE_PATH2) => {
127
- const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? "" : configuration?.basePath ?? basePath) + axiosArgs.url };
128
- return axios.request(axiosRequestArgs);
129
- };
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
+ };
130
97
  };
131
-
132
- // src/api-model/api/easy-ship-api.ts
133
- var EasyShipApiAxiosParamCreator = function(configuration) {
134
- return {
135
- /**
136
- * Schedules an Easy Ship order and returns the scheduled package information. This operation does the following: * Specifies the time slot and handover method for the order to be scheduled for delivery. * Updates the Easy Ship order status. * Generates a shipping label and an invoice. Calling `createScheduledPackage` also generates a warranty document if you specify a `SerialNumber` value. To get these documents, see [How to get invoice, shipping label, and warranty documents](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide). * Shows the status of Easy Ship orders when you call the `getOrders` operation of the Selling Partner API for Orders and examine the `EasyShipShipmentStatus` property in the response body. See the **Shipping Label**, **Invoice**, and **Warranty** columns in the [Marketplace Support Table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table) to see which documents are supported in each marketplace. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
137
- * @param {CreateScheduledPackageRequest} createScheduledPackageRequest The request schema for the &#x60;createScheduledPackage&#x60; operation.
138
- * @param {*} [options] Override http request option.
139
- * @throws {RequiredError}
140
- */
141
- createScheduledPackage: async (createScheduledPackageRequest, options = {}) => {
142
- assertParamExists("createScheduledPackage", "createScheduledPackageRequest", createScheduledPackageRequest);
143
- const localVarPath = `/easyShip/2022-03-23/package`;
144
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
145
- let baseOptions;
146
- if (configuration) {
147
- baseOptions = configuration.baseOptions;
148
- }
149
- const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
150
- const localVarHeaderParameter = {};
151
- const localVarQueryParameter = {};
152
- localVarHeaderParameter["Content-Type"] = "application/json";
153
- localVarHeaderParameter["Accept"] = "application/json";
154
- setSearchParams(localVarUrlObj, localVarQueryParameter);
155
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
156
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
157
- localVarRequestOptions.data = serializeDataIfNeeded(createScheduledPackageRequest, localVarRequestOptions, configuration);
158
- return {
159
- url: toPathString(localVarUrlObj),
160
- options: localVarRequestOptions
161
- };
162
- },
163
- /**
164
- * This operation automatically schedules a time slot for all the `amazonOrderId`s given as input, generating the associated shipping labels, along with other compliance documents according to the marketplace (refer to the [marketplace document support table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table)). Developers calling this operation may optionally assign a `packageDetails` object, allowing them to input a preferred time slot for each order in ther request. In this case, Amazon will try to schedule the respective packages using their optional settings. On the other hand, *i.e.*, if the time slot is not provided, Amazon will then pick the earliest time slot possible. Regarding the shipping label\'s file format, external developers are able to choose between PDF or ZPL, and Amazon will create the label accordingly. This operation returns an array composed of the scheduled packages, and a short-lived URL pointing to a zip file containing the generated shipping labels and the other documents enabled for your marketplace. If at least an order couldn\'t be scheduled, then Amazon adds the `rejectedOrders` list into the response, which contains an entry for each order we couldn\'t process. Each entry is composed of an error message describing the reason of the failure, so that sellers can take action. The table below displays the supported request and burst maximum rates: **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
165
- * @param {CreateScheduledPackagesRequest} createScheduledPackagesRequest The request schema for the &#x60;createScheduledPackageBulk&#x60; operation.
166
- * @param {*} [options] Override http request option.
167
- * @throws {RequiredError}
168
- */
169
- createScheduledPackageBulk: async (createScheduledPackagesRequest, options = {}) => {
170
- assertParamExists("createScheduledPackageBulk", "createScheduledPackagesRequest", createScheduledPackagesRequest);
171
- const localVarPath = `/easyShip/2022-03-23/packages/bulk`;
172
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
173
- let baseOptions;
174
- if (configuration) {
175
- baseOptions = configuration.baseOptions;
176
- }
177
- const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
178
- const localVarHeaderParameter = {};
179
- const localVarQueryParameter = {};
180
- localVarHeaderParameter["Content-Type"] = "application/json";
181
- localVarHeaderParameter["Accept"] = "application/json";
182
- setSearchParams(localVarUrlObj, localVarQueryParameter);
183
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
184
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
185
- localVarRequestOptions.data = serializeDataIfNeeded(createScheduledPackagesRequest, localVarRequestOptions, configuration);
186
- return {
187
- url: toPathString(localVarUrlObj),
188
- options: localVarRequestOptions
189
- };
190
- },
191
- /**
192
- * Returns information about a package, including dimensions, weight, time slot information for handover, invoice and item information, and status. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
193
- * @param {string} amazonOrderId An Amazon-defined order identifier. Identifies the order that the seller wants to deliver using Amazon Easy Ship.
194
- * @param {string} marketplaceId An identifier for the marketplace in which the seller is selling.
195
- * @param {*} [options] Override http request option.
196
- * @throws {RequiredError}
197
- */
198
- getScheduledPackage: async (amazonOrderId, marketplaceId, options = {}) => {
199
- assertParamExists("getScheduledPackage", "amazonOrderId", amazonOrderId);
200
- assertParamExists("getScheduledPackage", "marketplaceId", marketplaceId);
201
- const localVarPath = `/easyShip/2022-03-23/package`;
202
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
203
- let baseOptions;
204
- if (configuration) {
205
- baseOptions = configuration.baseOptions;
206
- }
207
- const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
208
- const localVarHeaderParameter = {};
209
- const localVarQueryParameter = {};
210
- if (amazonOrderId !== void 0) {
211
- localVarQueryParameter["amazonOrderId"] = amazonOrderId;
212
- }
213
- if (marketplaceId !== void 0) {
214
- localVarQueryParameter["marketplaceId"] = marketplaceId;
215
- }
216
- localVarHeaderParameter["Accept"] = "application/json";
217
- setSearchParams(localVarUrlObj, localVarQueryParameter);
218
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
219
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
220
- return {
221
- url: toPathString(localVarUrlObj),
222
- options: localVarRequestOptions
223
- };
224
- },
225
- /**
226
- * Returns time slots available for Easy Ship orders to be scheduled based on the package weight and dimensions that the seller specifies. This operation is available for scheduled and unscheduled orders based on marketplace support. See **Get Time Slots** in the [Marketplace Support Table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table). This operation can return time slots that have either pickup or drop-off handover methods - see **Supported Handover Methods** in the [Marketplace Support Table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
227
- * @param {ListHandoverSlotsRequest} [listHandoverSlotsRequest] The request schema for the &#x60;listHandoverSlots&#x60; operation.
228
- * @param {*} [options] Override http request option.
229
- * @throws {RequiredError}
230
- */
231
- listHandoverSlots: async (listHandoverSlotsRequest, options = {}) => {
232
- const localVarPath = `/easyShip/2022-03-23/timeSlot`;
233
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
234
- let baseOptions;
235
- if (configuration) {
236
- baseOptions = configuration.baseOptions;
237
- }
238
- const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
239
- const localVarHeaderParameter = {};
240
- const localVarQueryParameter = {};
241
- localVarHeaderParameter["Content-Type"] = "application/json";
242
- localVarHeaderParameter["Accept"] = "application/json";
243
- setSearchParams(localVarUrlObj, localVarQueryParameter);
244
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
245
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
246
- localVarRequestOptions.data = serializeDataIfNeeded(listHandoverSlotsRequest, localVarRequestOptions, configuration);
247
- return {
248
- url: toPathString(localVarUrlObj),
249
- options: localVarRequestOptions
250
- };
251
- },
252
- /**
253
- * Updates the time slot for handing over the package indicated by the specified `scheduledPackageId`. You can get the new `slotId` value for the time slot by calling the `listHandoverSlots` operation before making another `patch` call. See the **Update Package** column in the [Marketplace Support Table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table) to see which marketplaces this operation is supported in. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
254
- * @param {UpdateScheduledPackagesRequest} [updateScheduledPackagesRequest] The request schema for the &#x60;updateScheduledPackages&#x60; operation.
255
- * @param {*} [options] Override http request option.
256
- * @throws {RequiredError}
257
- */
258
- updateScheduledPackages: async (updateScheduledPackagesRequest, options = {}) => {
259
- const localVarPath = `/easyShip/2022-03-23/package`;
260
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
261
- let baseOptions;
262
- if (configuration) {
263
- baseOptions = configuration.baseOptions;
264
- }
265
- const localVarRequestOptions = { method: "PATCH", ...baseOptions, ...options };
266
- const localVarHeaderParameter = {};
267
- const localVarQueryParameter = {};
268
- localVarHeaderParameter["Content-Type"] = "application/json";
269
- localVarHeaderParameter["Accept"] = "application/json";
270
- setSearchParams(localVarUrlObj, localVarQueryParameter);
271
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
272
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
273
- localVarRequestOptions.data = serializeDataIfNeeded(updateScheduledPackagesRequest, localVarRequestOptions, configuration);
274
- return {
275
- url: toPathString(localVarUrlObj),
276
- options: localVarRequestOptions
277
- };
278
- }
279
- };
98
+ //#endregion
99
+ //#region src/api-model/api/easy-ship-api.ts
100
+ /**
101
+ * EasyShipApi - axios parameter creator
102
+ */
103
+ const EasyShipApiAxiosParamCreator = function(configuration) {
104
+ return {
105
+ /**
106
+ * Schedules an Easy Ship order and returns the scheduled package information. This operation does the following: * Specifies the time slot and handover method for the order to be scheduled for delivery. * Updates the Easy Ship order status. * Generates a shipping label and an invoice. Calling `createScheduledPackage` also generates a warranty document if you specify a `SerialNumber` value. To get these documents, see [How to get invoice, shipping label, and warranty documents](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide). * Shows the status of Easy Ship orders when you call the `getOrders` operation of the Selling Partner API for Orders and examine the `EasyShipShipmentStatus` property in the response body. See the **Shipping Label**, **Invoice**, and **Warranty** columns in the [Marketplace Support Table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table) to see which documents are supported in each marketplace. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
107
+ * @param {CreateScheduledPackageRequest} createScheduledPackageRequest The request schema for the &#x60;createScheduledPackage&#x60; operation.
108
+ * @param {*} [options] Override http request option.
109
+ * @throws {RequiredError}
110
+ */
111
+ createScheduledPackage: async (createScheduledPackageRequest, options = {}) => {
112
+ assertParamExists("createScheduledPackage", "createScheduledPackageRequest", createScheduledPackageRequest);
113
+ const localVarUrlObj = new URL(`/easyShip/2022-03-23/package`, DUMMY_BASE_URL);
114
+ let baseOptions;
115
+ if (configuration) baseOptions = configuration.baseOptions;
116
+ const localVarRequestOptions = {
117
+ method: "POST",
118
+ ...baseOptions,
119
+ ...options
120
+ };
121
+ const localVarHeaderParameter = {};
122
+ const localVarQueryParameter = {};
123
+ localVarHeaderParameter["Content-Type"] = "application/json";
124
+ localVarHeaderParameter["Accept"] = "application/json";
125
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
126
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
127
+ localVarRequestOptions.headers = {
128
+ ...localVarHeaderParameter,
129
+ ...headersFromBaseOptions,
130
+ ...options.headers
131
+ };
132
+ localVarRequestOptions.data = serializeDataIfNeeded(createScheduledPackageRequest, localVarRequestOptions, configuration);
133
+ return {
134
+ url: toPathString(localVarUrlObj),
135
+ options: localVarRequestOptions
136
+ };
137
+ },
138
+ /**
139
+ * This operation automatically schedules a time slot for all the `amazonOrderId`s given as input, generating the associated shipping labels, along with other compliance documents according to the marketplace (refer to the [marketplace document support table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table)). Developers calling this operation may optionally assign a `packageDetails` object, allowing them to input a preferred time slot for each order in ther request. In this case, Amazon will try to schedule the respective packages using their optional settings. On the other hand, *i.e.*, if the time slot is not provided, Amazon will then pick the earliest time slot possible. Regarding the shipping label\'s file format, external developers are able to choose between PDF or ZPL, and Amazon will create the label accordingly. This operation returns an array composed of the scheduled packages, and a short-lived URL pointing to a zip file containing the generated shipping labels and the other documents enabled for your marketplace. If at least an order couldn\'t be scheduled, then Amazon adds the `rejectedOrders` list into the response, which contains an entry for each order we couldn\'t process. Each entry is composed of an error message describing the reason of the failure, so that sellers can take action. The table below displays the supported request and burst maximum rates: **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
140
+ * @param {CreateScheduledPackagesRequest} createScheduledPackagesRequest The request schema for the &#x60;createScheduledPackageBulk&#x60; operation.
141
+ * @param {*} [options] Override http request option.
142
+ * @throws {RequiredError}
143
+ */
144
+ createScheduledPackageBulk: async (createScheduledPackagesRequest, options = {}) => {
145
+ assertParamExists("createScheduledPackageBulk", "createScheduledPackagesRequest", createScheduledPackagesRequest);
146
+ const localVarUrlObj = new URL(`/easyShip/2022-03-23/packages/bulk`, DUMMY_BASE_URL);
147
+ let baseOptions;
148
+ if (configuration) baseOptions = configuration.baseOptions;
149
+ const localVarRequestOptions = {
150
+ method: "POST",
151
+ ...baseOptions,
152
+ ...options
153
+ };
154
+ const localVarHeaderParameter = {};
155
+ const localVarQueryParameter = {};
156
+ localVarHeaderParameter["Content-Type"] = "application/json";
157
+ localVarHeaderParameter["Accept"] = "application/json";
158
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
159
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
160
+ localVarRequestOptions.headers = {
161
+ ...localVarHeaderParameter,
162
+ ...headersFromBaseOptions,
163
+ ...options.headers
164
+ };
165
+ localVarRequestOptions.data = serializeDataIfNeeded(createScheduledPackagesRequest, localVarRequestOptions, configuration);
166
+ return {
167
+ url: toPathString(localVarUrlObj),
168
+ options: localVarRequestOptions
169
+ };
170
+ },
171
+ /**
172
+ * Returns information about a package, including dimensions, weight, time slot information for handover, invoice and item information, and status. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
173
+ * @param {string} amazonOrderId An Amazon-defined order identifier. Identifies the order that the seller wants to deliver using Amazon Easy Ship.
174
+ * @param {string} marketplaceId An identifier for the marketplace in which the seller is selling.
175
+ * @param {*} [options] Override http request option.
176
+ * @throws {RequiredError}
177
+ */
178
+ getScheduledPackage: async (amazonOrderId, marketplaceId, options = {}) => {
179
+ assertParamExists("getScheduledPackage", "amazonOrderId", amazonOrderId);
180
+ assertParamExists("getScheduledPackage", "marketplaceId", marketplaceId);
181
+ const localVarUrlObj = new URL(`/easyShip/2022-03-23/package`, DUMMY_BASE_URL);
182
+ let baseOptions;
183
+ if (configuration) baseOptions = configuration.baseOptions;
184
+ const localVarRequestOptions = {
185
+ method: "GET",
186
+ ...baseOptions,
187
+ ...options
188
+ };
189
+ const localVarHeaderParameter = {};
190
+ const localVarQueryParameter = {};
191
+ if (amazonOrderId !== void 0) localVarQueryParameter["amazonOrderId"] = amazonOrderId;
192
+ if (marketplaceId !== void 0) localVarQueryParameter["marketplaceId"] = marketplaceId;
193
+ localVarHeaderParameter["Accept"] = "application/json";
194
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
195
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
196
+ localVarRequestOptions.headers = {
197
+ ...localVarHeaderParameter,
198
+ ...headersFromBaseOptions,
199
+ ...options.headers
200
+ };
201
+ return {
202
+ url: toPathString(localVarUrlObj),
203
+ options: localVarRequestOptions
204
+ };
205
+ },
206
+ /**
207
+ * Returns time slots available for Easy Ship orders to be scheduled based on the package weight and dimensions that the seller specifies. This operation is available for scheduled and unscheduled orders based on marketplace support. See **Get Time Slots** in the [Marketplace Support Table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table). This operation can return time slots that have either pickup or drop-off handover methods - see **Supported Handover Methods** in the [Marketplace Support Table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
208
+ * @param {ListHandoverSlotsRequest} [listHandoverSlotsRequest] The request schema for the &#x60;listHandoverSlots&#x60; operation.
209
+ * @param {*} [options] Override http request option.
210
+ * @throws {RequiredError}
211
+ */
212
+ listHandoverSlots: async (listHandoverSlotsRequest, options = {}) => {
213
+ const localVarUrlObj = new URL(`/easyShip/2022-03-23/timeSlot`, DUMMY_BASE_URL);
214
+ let baseOptions;
215
+ if (configuration) baseOptions = configuration.baseOptions;
216
+ const localVarRequestOptions = {
217
+ method: "POST",
218
+ ...baseOptions,
219
+ ...options
220
+ };
221
+ const localVarHeaderParameter = {};
222
+ const localVarQueryParameter = {};
223
+ localVarHeaderParameter["Content-Type"] = "application/json";
224
+ localVarHeaderParameter["Accept"] = "application/json";
225
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
226
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
227
+ localVarRequestOptions.headers = {
228
+ ...localVarHeaderParameter,
229
+ ...headersFromBaseOptions,
230
+ ...options.headers
231
+ };
232
+ localVarRequestOptions.data = serializeDataIfNeeded(listHandoverSlotsRequest, localVarRequestOptions, configuration);
233
+ return {
234
+ url: toPathString(localVarUrlObj),
235
+ options: localVarRequestOptions
236
+ };
237
+ },
238
+ /**
239
+ * Updates the time slot for handing over the package indicated by the specified `scheduledPackageId`. You can get the new `slotId` value for the time slot by calling the `listHandoverSlots` operation before making another `patch` call. See the **Update Package** column in the [Marketplace Support Table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table) to see which marketplaces this operation is supported in. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
240
+ * @param {UpdateScheduledPackagesRequest} [updateScheduledPackagesRequest] The request schema for the &#x60;updateScheduledPackages&#x60; operation.
241
+ * @param {*} [options] Override http request option.
242
+ * @throws {RequiredError}
243
+ */
244
+ updateScheduledPackages: async (updateScheduledPackagesRequest, options = {}) => {
245
+ const localVarUrlObj = new URL(`/easyShip/2022-03-23/package`, DUMMY_BASE_URL);
246
+ let baseOptions;
247
+ if (configuration) baseOptions = configuration.baseOptions;
248
+ const localVarRequestOptions = {
249
+ method: "PATCH",
250
+ ...baseOptions,
251
+ ...options
252
+ };
253
+ const localVarHeaderParameter = {};
254
+ const localVarQueryParameter = {};
255
+ localVarHeaderParameter["Content-Type"] = "application/json";
256
+ localVarHeaderParameter["Accept"] = "application/json";
257
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
258
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
259
+ localVarRequestOptions.headers = {
260
+ ...localVarHeaderParameter,
261
+ ...headersFromBaseOptions,
262
+ ...options.headers
263
+ };
264
+ localVarRequestOptions.data = serializeDataIfNeeded(updateScheduledPackagesRequest, localVarRequestOptions, configuration);
265
+ return {
266
+ url: toPathString(localVarUrlObj),
267
+ options: localVarRequestOptions
268
+ };
269
+ }
270
+ };
280
271
  };
281
- var EasyShipApiFp = function(configuration) {
282
- const localVarAxiosParamCreator = EasyShipApiAxiosParamCreator(configuration);
283
- return {
284
- /**
285
- * Schedules an Easy Ship order and returns the scheduled package information. This operation does the following: * Specifies the time slot and handover method for the order to be scheduled for delivery. * Updates the Easy Ship order status. * Generates a shipping label and an invoice. Calling `createScheduledPackage` also generates a warranty document if you specify a `SerialNumber` value. To get these documents, see [How to get invoice, shipping label, and warranty documents](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide). * Shows the status of Easy Ship orders when you call the `getOrders` operation of the Selling Partner API for Orders and examine the `EasyShipShipmentStatus` property in the response body. See the **Shipping Label**, **Invoice**, and **Warranty** columns in the [Marketplace Support Table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table) to see which documents are supported in each marketplace. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
286
- * @param {CreateScheduledPackageRequest} createScheduledPackageRequest The request schema for the &#x60;createScheduledPackage&#x60; operation.
287
- * @param {*} [options] Override http request option.
288
- * @throws {RequiredError}
289
- */
290
- async createScheduledPackage(createScheduledPackageRequest, options) {
291
- const localVarAxiosArgs = await localVarAxiosParamCreator.createScheduledPackage(createScheduledPackageRequest, options);
292
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
293
- const localVarOperationServerBasePath = operationServerMap["EasyShipApi.createScheduledPackage"]?.[localVarOperationServerIndex]?.url;
294
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, import_axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
295
- },
296
- /**
297
- * This operation automatically schedules a time slot for all the `amazonOrderId`s given as input, generating the associated shipping labels, along with other compliance documents according to the marketplace (refer to the [marketplace document support table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table)). Developers calling this operation may optionally assign a `packageDetails` object, allowing them to input a preferred time slot for each order in ther request. In this case, Amazon will try to schedule the respective packages using their optional settings. On the other hand, *i.e.*, if the time slot is not provided, Amazon will then pick the earliest time slot possible. Regarding the shipping label\'s file format, external developers are able to choose between PDF or ZPL, and Amazon will create the label accordingly. This operation returns an array composed of the scheduled packages, and a short-lived URL pointing to a zip file containing the generated shipping labels and the other documents enabled for your marketplace. If at least an order couldn\'t be scheduled, then Amazon adds the `rejectedOrders` list into the response, which contains an entry for each order we couldn\'t process. Each entry is composed of an error message describing the reason of the failure, so that sellers can take action. The table below displays the supported request and burst maximum rates: **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
298
- * @param {CreateScheduledPackagesRequest} createScheduledPackagesRequest The request schema for the &#x60;createScheduledPackageBulk&#x60; operation.
299
- * @param {*} [options] Override http request option.
300
- * @throws {RequiredError}
301
- */
302
- async createScheduledPackageBulk(createScheduledPackagesRequest, options) {
303
- const localVarAxiosArgs = await localVarAxiosParamCreator.createScheduledPackageBulk(createScheduledPackagesRequest, options);
304
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
305
- const localVarOperationServerBasePath = operationServerMap["EasyShipApi.createScheduledPackageBulk"]?.[localVarOperationServerIndex]?.url;
306
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, import_axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
307
- },
308
- /**
309
- * Returns information about a package, including dimensions, weight, time slot information for handover, invoice and item information, and status. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
310
- * @param {string} amazonOrderId An Amazon-defined order identifier. Identifies the order that the seller wants to deliver using Amazon Easy Ship.
311
- * @param {string} marketplaceId An identifier for the marketplace in which the seller is selling.
312
- * @param {*} [options] Override http request option.
313
- * @throws {RequiredError}
314
- */
315
- async getScheduledPackage(amazonOrderId, marketplaceId, options) {
316
- const localVarAxiosArgs = await localVarAxiosParamCreator.getScheduledPackage(amazonOrderId, marketplaceId, options);
317
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
318
- const localVarOperationServerBasePath = operationServerMap["EasyShipApi.getScheduledPackage"]?.[localVarOperationServerIndex]?.url;
319
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, import_axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
320
- },
321
- /**
322
- * Returns time slots available for Easy Ship orders to be scheduled based on the package weight and dimensions that the seller specifies. This operation is available for scheduled and unscheduled orders based on marketplace support. See **Get Time Slots** in the [Marketplace Support Table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table). This operation can return time slots that have either pickup or drop-off handover methods - see **Supported Handover Methods** in the [Marketplace Support Table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
323
- * @param {ListHandoverSlotsRequest} [listHandoverSlotsRequest] The request schema for the &#x60;listHandoverSlots&#x60; operation.
324
- * @param {*} [options] Override http request option.
325
- * @throws {RequiredError}
326
- */
327
- async listHandoverSlots(listHandoverSlotsRequest, options) {
328
- const localVarAxiosArgs = await localVarAxiosParamCreator.listHandoverSlots(listHandoverSlotsRequest, options);
329
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
330
- const localVarOperationServerBasePath = operationServerMap["EasyShipApi.listHandoverSlots"]?.[localVarOperationServerIndex]?.url;
331
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, import_axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
332
- },
333
- /**
334
- * Updates the time slot for handing over the package indicated by the specified `scheduledPackageId`. You can get the new `slotId` value for the time slot by calling the `listHandoverSlots` operation before making another `patch` call. See the **Update Package** column in the [Marketplace Support Table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table) to see which marketplaces this operation is supported in. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
335
- * @param {UpdateScheduledPackagesRequest} [updateScheduledPackagesRequest] The request schema for the &#x60;updateScheduledPackages&#x60; operation.
336
- * @param {*} [options] Override http request option.
337
- * @throws {RequiredError}
338
- */
339
- async updateScheduledPackages(updateScheduledPackagesRequest, options) {
340
- const localVarAxiosArgs = await localVarAxiosParamCreator.updateScheduledPackages(updateScheduledPackagesRequest, options);
341
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
342
- const localVarOperationServerBasePath = operationServerMap["EasyShipApi.updateScheduledPackages"]?.[localVarOperationServerIndex]?.url;
343
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, import_axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
344
- }
345
- };
272
+ /**
273
+ * EasyShipApi - functional programming interface
274
+ */
275
+ const EasyShipApiFp = function(configuration) {
276
+ const localVarAxiosParamCreator = EasyShipApiAxiosParamCreator(configuration);
277
+ return {
278
+ /**
279
+ * Schedules an Easy Ship order and returns the scheduled package information. This operation does the following: * Specifies the time slot and handover method for the order to be scheduled for delivery. * Updates the Easy Ship order status. * Generates a shipping label and an invoice. Calling `createScheduledPackage` also generates a warranty document if you specify a `SerialNumber` value. To get these documents, see [How to get invoice, shipping label, and warranty documents](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide). * Shows the status of Easy Ship orders when you call the `getOrders` operation of the Selling Partner API for Orders and examine the `EasyShipShipmentStatus` property in the response body. See the **Shipping Label**, **Invoice**, and **Warranty** columns in the [Marketplace Support Table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table) to see which documents are supported in each marketplace. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
280
+ * @param {CreateScheduledPackageRequest} createScheduledPackageRequest The request schema for the &#x60;createScheduledPackage&#x60; operation.
281
+ * @param {*} [options] Override http request option.
282
+ * @throws {RequiredError}
283
+ */
284
+ async createScheduledPackage(createScheduledPackageRequest, options) {
285
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createScheduledPackage(createScheduledPackageRequest, options);
286
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
287
+ const localVarOperationServerBasePath = operationServerMap["EasyShipApi.createScheduledPackage"]?.[localVarOperationServerIndex]?.url;
288
+ return (axios$1, basePath) => createRequestFunction(localVarAxiosArgs, axios.default, BASE_PATH, configuration)(axios$1, localVarOperationServerBasePath || basePath);
289
+ },
290
+ /**
291
+ * This operation automatically schedules a time slot for all the `amazonOrderId`s given as input, generating the associated shipping labels, along with other compliance documents according to the marketplace (refer to the [marketplace document support table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table)). Developers calling this operation may optionally assign a `packageDetails` object, allowing them to input a preferred time slot for each order in ther request. In this case, Amazon will try to schedule the respective packages using their optional settings. On the other hand, *i.e.*, if the time slot is not provided, Amazon will then pick the earliest time slot possible. Regarding the shipping label\'s file format, external developers are able to choose between PDF or ZPL, and Amazon will create the label accordingly. This operation returns an array composed of the scheduled packages, and a short-lived URL pointing to a zip file containing the generated shipping labels and the other documents enabled for your marketplace. If at least an order couldn\'t be scheduled, then Amazon adds the `rejectedOrders` list into the response, which contains an entry for each order we couldn\'t process. Each entry is composed of an error message describing the reason of the failure, so that sellers can take action. The table below displays the supported request and burst maximum rates: **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
292
+ * @param {CreateScheduledPackagesRequest} createScheduledPackagesRequest The request schema for the &#x60;createScheduledPackageBulk&#x60; operation.
293
+ * @param {*} [options] Override http request option.
294
+ * @throws {RequiredError}
295
+ */
296
+ async createScheduledPackageBulk(createScheduledPackagesRequest, options) {
297
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createScheduledPackageBulk(createScheduledPackagesRequest, options);
298
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
299
+ const localVarOperationServerBasePath = operationServerMap["EasyShipApi.createScheduledPackageBulk"]?.[localVarOperationServerIndex]?.url;
300
+ return (axios$2, basePath) => createRequestFunction(localVarAxiosArgs, axios.default, BASE_PATH, configuration)(axios$2, localVarOperationServerBasePath || basePath);
301
+ },
302
+ /**
303
+ * Returns information about a package, including dimensions, weight, time slot information for handover, invoice and item information, and status. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
304
+ * @param {string} amazonOrderId An Amazon-defined order identifier. Identifies the order that the seller wants to deliver using Amazon Easy Ship.
305
+ * @param {string} marketplaceId An identifier for the marketplace in which the seller is selling.
306
+ * @param {*} [options] Override http request option.
307
+ * @throws {RequiredError}
308
+ */
309
+ async getScheduledPackage(amazonOrderId, marketplaceId, options) {
310
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getScheduledPackage(amazonOrderId, marketplaceId, options);
311
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
312
+ const localVarOperationServerBasePath = operationServerMap["EasyShipApi.getScheduledPackage"]?.[localVarOperationServerIndex]?.url;
313
+ return (axios$3, basePath) => createRequestFunction(localVarAxiosArgs, axios.default, BASE_PATH, configuration)(axios$3, localVarOperationServerBasePath || basePath);
314
+ },
315
+ /**
316
+ * Returns time slots available for Easy Ship orders to be scheduled based on the package weight and dimensions that the seller specifies. This operation is available for scheduled and unscheduled orders based on marketplace support. See **Get Time Slots** in the [Marketplace Support Table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table). This operation can return time slots that have either pickup or drop-off handover methods - see **Supported Handover Methods** in the [Marketplace Support Table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
317
+ * @param {ListHandoverSlotsRequest} [listHandoverSlotsRequest] The request schema for the &#x60;listHandoverSlots&#x60; operation.
318
+ * @param {*} [options] Override http request option.
319
+ * @throws {RequiredError}
320
+ */
321
+ async listHandoverSlots(listHandoverSlotsRequest, options) {
322
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listHandoverSlots(listHandoverSlotsRequest, options);
323
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
324
+ const localVarOperationServerBasePath = operationServerMap["EasyShipApi.listHandoverSlots"]?.[localVarOperationServerIndex]?.url;
325
+ return (axios$4, basePath) => createRequestFunction(localVarAxiosArgs, axios.default, BASE_PATH, configuration)(axios$4, localVarOperationServerBasePath || basePath);
326
+ },
327
+ /**
328
+ * Updates the time slot for handing over the package indicated by the specified `scheduledPackageId`. You can get the new `slotId` value for the time slot by calling the `listHandoverSlots` operation before making another `patch` call. See the **Update Package** column in the [Marketplace Support Table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table) to see which marketplaces this operation is supported in. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
329
+ * @param {UpdateScheduledPackagesRequest} [updateScheduledPackagesRequest] The request schema for the &#x60;updateScheduledPackages&#x60; operation.
330
+ * @param {*} [options] Override http request option.
331
+ * @throws {RequiredError}
332
+ */
333
+ async updateScheduledPackages(updateScheduledPackagesRequest, options) {
334
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateScheduledPackages(updateScheduledPackagesRequest, options);
335
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
336
+ const localVarOperationServerBasePath = operationServerMap["EasyShipApi.updateScheduledPackages"]?.[localVarOperationServerIndex]?.url;
337
+ return (axios$5, basePath) => createRequestFunction(localVarAxiosArgs, axios.default, BASE_PATH, configuration)(axios$5, localVarOperationServerBasePath || basePath);
338
+ }
339
+ };
346
340
  };
347
- var EasyShipApiFactory = function(configuration, basePath, axios) {
348
- const localVarFp = EasyShipApiFp(configuration);
349
- return {
350
- /**
351
- * Schedules an Easy Ship order and returns the scheduled package information. This operation does the following: * Specifies the time slot and handover method for the order to be scheduled for delivery. * Updates the Easy Ship order status. * Generates a shipping label and an invoice. Calling `createScheduledPackage` also generates a warranty document if you specify a `SerialNumber` value. To get these documents, see [How to get invoice, shipping label, and warranty documents](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide). * Shows the status of Easy Ship orders when you call the `getOrders` operation of the Selling Partner API for Orders and examine the `EasyShipShipmentStatus` property in the response body. See the **Shipping Label**, **Invoice**, and **Warranty** columns in the [Marketplace Support Table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table) to see which documents are supported in each marketplace. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
352
- * @param {EasyShipApiCreateScheduledPackageRequest} requestParameters Request parameters.
353
- * @param {*} [options] Override http request option.
354
- * @throws {RequiredError}
355
- */
356
- createScheduledPackage(requestParameters, options) {
357
- return localVarFp.createScheduledPackage(requestParameters.createScheduledPackageRequest, options).then((request) => request(axios, basePath));
358
- },
359
- /**
360
- * This operation automatically schedules a time slot for all the `amazonOrderId`s given as input, generating the associated shipping labels, along with other compliance documents according to the marketplace (refer to the [marketplace document support table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table)). Developers calling this operation may optionally assign a `packageDetails` object, allowing them to input a preferred time slot for each order in ther request. In this case, Amazon will try to schedule the respective packages using their optional settings. On the other hand, *i.e.*, if the time slot is not provided, Amazon will then pick the earliest time slot possible. Regarding the shipping label\'s file format, external developers are able to choose between PDF or ZPL, and Amazon will create the label accordingly. This operation returns an array composed of the scheduled packages, and a short-lived URL pointing to a zip file containing the generated shipping labels and the other documents enabled for your marketplace. If at least an order couldn\'t be scheduled, then Amazon adds the `rejectedOrders` list into the response, which contains an entry for each order we couldn\'t process. Each entry is composed of an error message describing the reason of the failure, so that sellers can take action. The table below displays the supported request and burst maximum rates: **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
361
- * @param {EasyShipApiCreateScheduledPackageBulkRequest} requestParameters Request parameters.
362
- * @param {*} [options] Override http request option.
363
- * @throws {RequiredError}
364
- */
365
- createScheduledPackageBulk(requestParameters, options) {
366
- return localVarFp.createScheduledPackageBulk(requestParameters.createScheduledPackagesRequest, options).then((request) => request(axios, basePath));
367
- },
368
- /**
369
- * Returns information about a package, including dimensions, weight, time slot information for handover, invoice and item information, and status. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
370
- * @param {EasyShipApiGetScheduledPackageRequest} requestParameters Request parameters.
371
- * @param {*} [options] Override http request option.
372
- * @throws {RequiredError}
373
- */
374
- getScheduledPackage(requestParameters, options) {
375
- return localVarFp.getScheduledPackage(requestParameters.amazonOrderId, requestParameters.marketplaceId, options).then((request) => request(axios, basePath));
376
- },
377
- /**
378
- * Returns time slots available for Easy Ship orders to be scheduled based on the package weight and dimensions that the seller specifies. This operation is available for scheduled and unscheduled orders based on marketplace support. See **Get Time Slots** in the [Marketplace Support Table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table). This operation can return time slots that have either pickup or drop-off handover methods - see **Supported Handover Methods** in the [Marketplace Support Table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
379
- * @param {EasyShipApiListHandoverSlotsRequest} requestParameters Request parameters.
380
- * @param {*} [options] Override http request option.
381
- * @throws {RequiredError}
382
- */
383
- listHandoverSlots(requestParameters = {}, options) {
384
- return localVarFp.listHandoverSlots(requestParameters.listHandoverSlotsRequest, options).then((request) => request(axios, basePath));
385
- },
386
- /**
387
- * Updates the time slot for handing over the package indicated by the specified `scheduledPackageId`. You can get the new `slotId` value for the time slot by calling the `listHandoverSlots` operation before making another `patch` call. See the **Update Package** column in the [Marketplace Support Table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table) to see which marketplaces this operation is supported in. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
388
- * @param {EasyShipApiUpdateScheduledPackagesRequest} requestParameters Request parameters.
389
- * @param {*} [options] Override http request option.
390
- * @throws {RequiredError}
391
- */
392
- updateScheduledPackages(requestParameters = {}, options) {
393
- return localVarFp.updateScheduledPackages(requestParameters.updateScheduledPackagesRequest, options).then((request) => request(axios, basePath));
394
- }
395
- };
341
+ /**
342
+ * EasyShipApi - factory interface
343
+ */
344
+ const EasyShipApiFactory = function(configuration, basePath, axios$6) {
345
+ const localVarFp = EasyShipApiFp(configuration);
346
+ return {
347
+ /**
348
+ * Schedules an Easy Ship order and returns the scheduled package information. This operation does the following: * Specifies the time slot and handover method for the order to be scheduled for delivery. * Updates the Easy Ship order status. * Generates a shipping label and an invoice. Calling `createScheduledPackage` also generates a warranty document if you specify a `SerialNumber` value. To get these documents, see [How to get invoice, shipping label, and warranty documents](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide). * Shows the status of Easy Ship orders when you call the `getOrders` operation of the Selling Partner API for Orders and examine the `EasyShipShipmentStatus` property in the response body. See the **Shipping Label**, **Invoice**, and **Warranty** columns in the [Marketplace Support Table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table) to see which documents are supported in each marketplace. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
349
+ * @param {EasyShipApiCreateScheduledPackageRequest} requestParameters Request parameters.
350
+ * @param {*} [options] Override http request option.
351
+ * @throws {RequiredError}
352
+ */
353
+ createScheduledPackage(requestParameters, options) {
354
+ return localVarFp.createScheduledPackage(requestParameters.createScheduledPackageRequest, options).then((request) => request(axios$6, basePath));
355
+ },
356
+ /**
357
+ * This operation automatically schedules a time slot for all the `amazonOrderId`s given as input, generating the associated shipping labels, along with other compliance documents according to the marketplace (refer to the [marketplace document support table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table)). Developers calling this operation may optionally assign a `packageDetails` object, allowing them to input a preferred time slot for each order in ther request. In this case, Amazon will try to schedule the respective packages using their optional settings. On the other hand, *i.e.*, if the time slot is not provided, Amazon will then pick the earliest time slot possible. Regarding the shipping label\'s file format, external developers are able to choose between PDF or ZPL, and Amazon will create the label accordingly. This operation returns an array composed of the scheduled packages, and a short-lived URL pointing to a zip file containing the generated shipping labels and the other documents enabled for your marketplace. If at least an order couldn\'t be scheduled, then Amazon adds the `rejectedOrders` list into the response, which contains an entry for each order we couldn\'t process. Each entry is composed of an error message describing the reason of the failure, so that sellers can take action. The table below displays the supported request and burst maximum rates: **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
358
+ * @param {EasyShipApiCreateScheduledPackageBulkRequest} requestParameters Request parameters.
359
+ * @param {*} [options] Override http request option.
360
+ * @throws {RequiredError}
361
+ */
362
+ createScheduledPackageBulk(requestParameters, options) {
363
+ return localVarFp.createScheduledPackageBulk(requestParameters.createScheduledPackagesRequest, options).then((request) => request(axios$6, basePath));
364
+ },
365
+ /**
366
+ * Returns information about a package, including dimensions, weight, time slot information for handover, invoice and item information, and status. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
367
+ * @param {EasyShipApiGetScheduledPackageRequest} requestParameters Request parameters.
368
+ * @param {*} [options] Override http request option.
369
+ * @throws {RequiredError}
370
+ */
371
+ getScheduledPackage(requestParameters, options) {
372
+ return localVarFp.getScheduledPackage(requestParameters.amazonOrderId, requestParameters.marketplaceId, options).then((request) => request(axios$6, basePath));
373
+ },
374
+ /**
375
+ * Returns time slots available for Easy Ship orders to be scheduled based on the package weight and dimensions that the seller specifies. This operation is available for scheduled and unscheduled orders based on marketplace support. See **Get Time Slots** in the [Marketplace Support Table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table). This operation can return time slots that have either pickup or drop-off handover methods - see **Supported Handover Methods** in the [Marketplace Support Table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
376
+ * @param {EasyShipApiListHandoverSlotsRequest} requestParameters Request parameters.
377
+ * @param {*} [options] Override http request option.
378
+ * @throws {RequiredError}
379
+ */
380
+ listHandoverSlots(requestParameters = {}, options) {
381
+ return localVarFp.listHandoverSlots(requestParameters.listHandoverSlotsRequest, options).then((request) => request(axios$6, basePath));
382
+ },
383
+ /**
384
+ * Updates the time slot for handing over the package indicated by the specified `scheduledPackageId`. You can get the new `slotId` value for the time slot by calling the `listHandoverSlots` operation before making another `patch` call. See the **Update Package** column in the [Marketplace Support Table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table) to see which marketplaces this operation is supported in. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
385
+ * @param {EasyShipApiUpdateScheduledPackagesRequest} requestParameters Request parameters.
386
+ * @param {*} [options] Override http request option.
387
+ * @throws {RequiredError}
388
+ */
389
+ updateScheduledPackages(requestParameters = {}, options) {
390
+ return localVarFp.updateScheduledPackages(requestParameters.updateScheduledPackagesRequest, options).then((request) => request(axios$6, basePath));
391
+ }
392
+ };
396
393
  };
394
+ /**
395
+ * EasyShipApi - object-oriented interface
396
+ */
397
397
  var EasyShipApi = class extends BaseAPI {
398
- /**
399
- * Schedules an Easy Ship order and returns the scheduled package information. This operation does the following: * Specifies the time slot and handover method for the order to be scheduled for delivery. * Updates the Easy Ship order status. * Generates a shipping label and an invoice. Calling `createScheduledPackage` also generates a warranty document if you specify a `SerialNumber` value. To get these documents, see [How to get invoice, shipping label, and warranty documents](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide). * Shows the status of Easy Ship orders when you call the `getOrders` operation of the Selling Partner API for Orders and examine the `EasyShipShipmentStatus` property in the response body. See the **Shipping Label**, **Invoice**, and **Warranty** columns in the [Marketplace Support Table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table) to see which documents are supported in each marketplace. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
400
- * @param {EasyShipApiCreateScheduledPackageRequest} requestParameters Request parameters.
401
- * @param {*} [options] Override http request option.
402
- * @throws {RequiredError}
403
- */
404
- createScheduledPackage(requestParameters, options) {
405
- return EasyShipApiFp(this.configuration).createScheduledPackage(requestParameters.createScheduledPackageRequest, options).then((request) => request(this.axios, this.basePath));
406
- }
407
- /**
408
- * This operation automatically schedules a time slot for all the `amazonOrderId`s given as input, generating the associated shipping labels, along with other compliance documents according to the marketplace (refer to the [marketplace document support table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table)). Developers calling this operation may optionally assign a `packageDetails` object, allowing them to input a preferred time slot for each order in ther request. In this case, Amazon will try to schedule the respective packages using their optional settings. On the other hand, *i.e.*, if the time slot is not provided, Amazon will then pick the earliest time slot possible. Regarding the shipping label\'s file format, external developers are able to choose between PDF or ZPL, and Amazon will create the label accordingly. This operation returns an array composed of the scheduled packages, and a short-lived URL pointing to a zip file containing the generated shipping labels and the other documents enabled for your marketplace. If at least an order couldn\'t be scheduled, then Amazon adds the `rejectedOrders` list into the response, which contains an entry for each order we couldn\'t process. Each entry is composed of an error message describing the reason of the failure, so that sellers can take action. The table below displays the supported request and burst maximum rates: **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
409
- * @param {EasyShipApiCreateScheduledPackageBulkRequest} requestParameters Request parameters.
410
- * @param {*} [options] Override http request option.
411
- * @throws {RequiredError}
412
- */
413
- createScheduledPackageBulk(requestParameters, options) {
414
- return EasyShipApiFp(this.configuration).createScheduledPackageBulk(requestParameters.createScheduledPackagesRequest, options).then((request) => request(this.axios, this.basePath));
415
- }
416
- /**
417
- * Returns information about a package, including dimensions, weight, time slot information for handover, invoice and item information, and status. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
418
- * @param {EasyShipApiGetScheduledPackageRequest} requestParameters Request parameters.
419
- * @param {*} [options] Override http request option.
420
- * @throws {RequiredError}
421
- */
422
- getScheduledPackage(requestParameters, options) {
423
- return EasyShipApiFp(this.configuration).getScheduledPackage(requestParameters.amazonOrderId, requestParameters.marketplaceId, options).then((request) => request(this.axios, this.basePath));
424
- }
425
- /**
426
- * Returns time slots available for Easy Ship orders to be scheduled based on the package weight and dimensions that the seller specifies. This operation is available for scheduled and unscheduled orders based on marketplace support. See **Get Time Slots** in the [Marketplace Support Table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table). This operation can return time slots that have either pickup or drop-off handover methods - see **Supported Handover Methods** in the [Marketplace Support Table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
427
- * @param {EasyShipApiListHandoverSlotsRequest} requestParameters Request parameters.
428
- * @param {*} [options] Override http request option.
429
- * @throws {RequiredError}
430
- */
431
- listHandoverSlots(requestParameters = {}, options) {
432
- return EasyShipApiFp(this.configuration).listHandoverSlots(requestParameters.listHandoverSlotsRequest, options).then((request) => request(this.axios, this.basePath));
433
- }
434
- /**
435
- * Updates the time slot for handing over the package indicated by the specified `scheduledPackageId`. You can get the new `slotId` value for the time slot by calling the `listHandoverSlots` operation before making another `patch` call. See the **Update Package** column in the [Marketplace Support Table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table) to see which marketplaces this operation is supported in. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
436
- * @param {EasyShipApiUpdateScheduledPackagesRequest} requestParameters Request parameters.
437
- * @param {*} [options] Override http request option.
438
- * @throws {RequiredError}
439
- */
440
- updateScheduledPackages(requestParameters = {}, options) {
441
- return EasyShipApiFp(this.configuration).updateScheduledPackages(requestParameters.updateScheduledPackagesRequest, options).then((request) => request(this.axios, this.basePath));
442
- }
398
+ /**
399
+ * Schedules an Easy Ship order and returns the scheduled package information. This operation does the following: * Specifies the time slot and handover method for the order to be scheduled for delivery. * Updates the Easy Ship order status. * Generates a shipping label and an invoice. Calling `createScheduledPackage` also generates a warranty document if you specify a `SerialNumber` value. To get these documents, see [How to get invoice, shipping label, and warranty documents](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide). * Shows the status of Easy Ship orders when you call the `getOrders` operation of the Selling Partner API for Orders and examine the `EasyShipShipmentStatus` property in the response body. See the **Shipping Label**, **Invoice**, and **Warranty** columns in the [Marketplace Support Table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table) to see which documents are supported in each marketplace. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
400
+ * @param {EasyShipApiCreateScheduledPackageRequest} requestParameters Request parameters.
401
+ * @param {*} [options] Override http request option.
402
+ * @throws {RequiredError}
403
+ */
404
+ createScheduledPackage(requestParameters, options) {
405
+ return EasyShipApiFp(this.configuration).createScheduledPackage(requestParameters.createScheduledPackageRequest, options).then((request) => request(this.axios, this.basePath));
406
+ }
407
+ /**
408
+ * This operation automatically schedules a time slot for all the `amazonOrderId`s given as input, generating the associated shipping labels, along with other compliance documents according to the marketplace (refer to the [marketplace document support table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table)). Developers calling this operation may optionally assign a `packageDetails` object, allowing them to input a preferred time slot for each order in ther request. In this case, Amazon will try to schedule the respective packages using their optional settings. On the other hand, *i.e.*, if the time slot is not provided, Amazon will then pick the earliest time slot possible. Regarding the shipping label\'s file format, external developers are able to choose between PDF or ZPL, and Amazon will create the label accordingly. This operation returns an array composed of the scheduled packages, and a short-lived URL pointing to a zip file containing the generated shipping labels and the other documents enabled for your marketplace. If at least an order couldn\'t be scheduled, then Amazon adds the `rejectedOrders` list into the response, which contains an entry for each order we couldn\'t process. Each entry is composed of an error message describing the reason of the failure, so that sellers can take action. The table below displays the supported request and burst maximum rates: **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
409
+ * @param {EasyShipApiCreateScheduledPackageBulkRequest} requestParameters Request parameters.
410
+ * @param {*} [options] Override http request option.
411
+ * @throws {RequiredError}
412
+ */
413
+ createScheduledPackageBulk(requestParameters, options) {
414
+ return EasyShipApiFp(this.configuration).createScheduledPackageBulk(requestParameters.createScheduledPackagesRequest, options).then((request) => request(this.axios, this.basePath));
415
+ }
416
+ /**
417
+ * Returns information about a package, including dimensions, weight, time slot information for handover, invoice and item information, and status. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
418
+ * @param {EasyShipApiGetScheduledPackageRequest} requestParameters Request parameters.
419
+ * @param {*} [options] Override http request option.
420
+ * @throws {RequiredError}
421
+ */
422
+ getScheduledPackage(requestParameters, options) {
423
+ return EasyShipApiFp(this.configuration).getScheduledPackage(requestParameters.amazonOrderId, requestParameters.marketplaceId, options).then((request) => request(this.axios, this.basePath));
424
+ }
425
+ /**
426
+ * Returns time slots available for Easy Ship orders to be scheduled based on the package weight and dimensions that the seller specifies. This operation is available for scheduled and unscheduled orders based on marketplace support. See **Get Time Slots** in the [Marketplace Support Table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table). This operation can return time slots that have either pickup or drop-off handover methods - see **Supported Handover Methods** in the [Marketplace Support Table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
427
+ * @param {EasyShipApiListHandoverSlotsRequest} requestParameters Request parameters.
428
+ * @param {*} [options] Override http request option.
429
+ * @throws {RequiredError}
430
+ */
431
+ listHandoverSlots(requestParameters = {}, options) {
432
+ return EasyShipApiFp(this.configuration).listHandoverSlots(requestParameters.listHandoverSlotsRequest, options).then((request) => request(this.axios, this.basePath));
433
+ }
434
+ /**
435
+ * Updates the time slot for handing over the package indicated by the specified `scheduledPackageId`. You can get the new `slotId` value for the time slot by calling the `listHandoverSlots` operation before making another `patch` call. See the **Update Package** column in the [Marketplace Support Table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table) to see which marketplaces this operation is supported in. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
436
+ * @param {EasyShipApiUpdateScheduledPackagesRequest} requestParameters Request parameters.
437
+ * @param {*} [options] Override http request option.
438
+ * @throws {RequiredError}
439
+ */
440
+ updateScheduledPackages(requestParameters = {}, options) {
441
+ return EasyShipApiFp(this.configuration).updateScheduledPackages(requestParameters.updateScheduledPackagesRequest, options).then((request) => request(this.axios, this.basePath));
442
+ }
443
443
  };
444
-
445
- // src/api-model/configuration.ts
444
+ //#endregion
445
+ //#region src/api-model/configuration.ts
446
446
  var Configuration = class {
447
- /**
448
- * parameter for apiKey security
449
- * @param name security name
450
- */
451
- apiKey;
452
- /**
453
- * parameter for basic security
454
- */
455
- username;
456
- /**
457
- * parameter for basic security
458
- */
459
- password;
460
- /**
461
- * parameter for oauth2 security
462
- * @param name security name
463
- * @param scopes oauth2 scope
464
- */
465
- accessToken;
466
- /**
467
- * parameter for aws4 signature security
468
- * @param {Object} AWS4Signature - AWS4 Signature security
469
- * @param {string} options.region - aws region
470
- * @param {string} options.service - name of the service.
471
- * @param {string} credentials.accessKeyId - aws access key id
472
- * @param {string} credentials.secretAccessKey - aws access key
473
- * @param {string} credentials.sessionToken - aws session token
474
- * @memberof Configuration
475
- */
476
- awsv4;
477
- /**
478
- * override base path
479
- */
480
- basePath;
481
- /**
482
- * override server index
483
- */
484
- serverIndex;
485
- /**
486
- * base options for axios calls
487
- */
488
- baseOptions;
489
- /**
490
- * The FormData constructor that will be used to create multipart form data
491
- * requests. You can inject this here so that execution environments that
492
- * do not support the FormData class can still run the generated client.
493
- *
494
- * @type {new () => FormData}
495
- */
496
- formDataCtor;
497
- constructor(param = {}) {
498
- this.apiKey = param.apiKey;
499
- this.username = param.username;
500
- this.password = param.password;
501
- this.accessToken = param.accessToken;
502
- this.awsv4 = param.awsv4;
503
- this.basePath = param.basePath;
504
- this.serverIndex = param.serverIndex;
505
- this.baseOptions = {
506
- ...param.baseOptions,
507
- headers: {
508
- ...param.baseOptions?.headers
509
- }
510
- };
511
- this.formDataCtor = param.formDataCtor;
512
- }
513
- /**
514
- * Check if the given MIME is a JSON MIME.
515
- * JSON MIME examples:
516
- * application/json
517
- * application/json; charset=UTF8
518
- * APPLICATION/JSON
519
- * application/vnd.company+json
520
- * @param mime - MIME (Multipurpose Internet Mail Extensions)
521
- * @return True if the given MIME is JSON, false otherwise.
522
- */
523
- isJsonMime(mime) {
524
- const jsonMime = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i;
525
- return mime !== null && jsonMime.test(mime);
526
- }
447
+ /**
448
+ * parameter for apiKey security
449
+ * @param name security name
450
+ */
451
+ apiKey;
452
+ /**
453
+ * parameter for basic security
454
+ */
455
+ username;
456
+ /**
457
+ * parameter for basic security
458
+ */
459
+ password;
460
+ /**
461
+ * parameter for oauth2 security
462
+ * @param name security name
463
+ * @param scopes oauth2 scope
464
+ */
465
+ accessToken;
466
+ /**
467
+ * parameter for aws4 signature security
468
+ * @param {Object} AWS4Signature - AWS4 Signature security
469
+ * @param {string} options.region - aws region
470
+ * @param {string} options.service - name of the service.
471
+ * @param {string} credentials.accessKeyId - aws access key id
472
+ * @param {string} credentials.secretAccessKey - aws access key
473
+ * @param {string} credentials.sessionToken - aws session token
474
+ * @memberof Configuration
475
+ */
476
+ awsv4;
477
+ /**
478
+ * override base path
479
+ */
480
+ basePath;
481
+ /**
482
+ * override server index
483
+ */
484
+ serverIndex;
485
+ /**
486
+ * base options for axios calls
487
+ */
488
+ baseOptions;
489
+ /**
490
+ * The FormData constructor that will be used to create multipart form data
491
+ * requests. You can inject this here so that execution environments that
492
+ * do not support the FormData class can still run the generated client.
493
+ *
494
+ * @type {new () => FormData}
495
+ */
496
+ formDataCtor;
497
+ constructor(param = {}) {
498
+ this.apiKey = param.apiKey;
499
+ this.username = param.username;
500
+ this.password = param.password;
501
+ this.accessToken = param.accessToken;
502
+ this.awsv4 = param.awsv4;
503
+ this.basePath = param.basePath;
504
+ this.serverIndex = param.serverIndex;
505
+ this.baseOptions = {
506
+ ...param.baseOptions,
507
+ headers: { ...param.baseOptions?.headers }
508
+ };
509
+ this.formDataCtor = param.formDataCtor;
510
+ }
511
+ /**
512
+ * Check if the given MIME is a JSON MIME.
513
+ * JSON MIME examples:
514
+ * application/json
515
+ * application/json; charset=UTF8
516
+ * APPLICATION/JSON
517
+ * application/vnd.company+json
518
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
519
+ * @return True if the given MIME is JSON, false otherwise.
520
+ */
521
+ isJsonMime(mime) {
522
+ return mime !== null && /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i.test(mime);
523
+ }
527
524
  };
528
-
529
- // src/api-model/models/code.ts
530
- var Code = {
531
- InvalidInput: "InvalidInput",
532
- InvalidTimeSlotId: "InvalidTimeSlotId",
533
- ScheduledPackageAlreadyExists: "ScheduledPackageAlreadyExists",
534
- ScheduleWindowExpired: "ScheduleWindowExpired",
535
- RetryableAfterGettingNewSlots: "RetryableAfterGettingNewSlots",
536
- TimeSlotNotAvailable: "TimeSlotNotAvailable",
537
- ResourceNotFound: "ResourceNotFound",
538
- InvalidOrderState: "InvalidOrderState",
539
- RegionNotSupported: "RegionNotSupported",
540
- OrderNotEligibleForRescheduling: "OrderNotEligibleForRescheduling",
541
- InternalServerError: "InternalServerError"
525
+ //#endregion
526
+ //#region src/api-model/models/code.ts
527
+ /**
528
+ * Selling Partner API for Easy Ship
529
+ * Use the Selling Partner API for Easy Ship to build applications for sellers to manage and ship Amazon Easy Ship orders. With this API, you can get available time slots, schedule and reschedule Easy Ship orders, and print shipping labels, invoices, and warranties. To review the differences in Easy Ship operations by marketplace, refer to [Marketplace support](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support).
530
+ *
531
+ * The version of the OpenAPI document: 2022-03-23
532
+ *
533
+ *
534
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
535
+ * https://openapi-generator.tech
536
+ * Do not edit the class manually.
537
+ */
538
+ /**
539
+ * An error code that identifies the type of error that occurred. The error codes listed below are specific to the Easy Ship section.
540
+ */
541
+ const Code = {
542
+ InvalidInput: "InvalidInput",
543
+ InvalidTimeSlotId: "InvalidTimeSlotId",
544
+ ScheduledPackageAlreadyExists: "ScheduledPackageAlreadyExists",
545
+ ScheduleWindowExpired: "ScheduleWindowExpired",
546
+ RetryableAfterGettingNewSlots: "RetryableAfterGettingNewSlots",
547
+ TimeSlotNotAvailable: "TimeSlotNotAvailable",
548
+ ResourceNotFound: "ResourceNotFound",
549
+ InvalidOrderState: "InvalidOrderState",
550
+ RegionNotSupported: "RegionNotSupported",
551
+ OrderNotEligibleForRescheduling: "OrderNotEligibleForRescheduling",
552
+ InternalServerError: "InternalServerError"
542
553
  };
543
-
544
- // src/api-model/models/handover-method.ts
545
- var HandoverMethod = {
546
- Pickup: "PICKUP",
547
- Dropoff: "DROPOFF"
548
- };
549
-
550
- // src/api-model/models/label-format.ts
551
- var LabelFormat = {
552
- Pdf: "PDF",
553
- Zpl: "ZPL"
554
+ //#endregion
555
+ //#region src/api-model/models/handover-method.ts
556
+ /**
557
+ * Selling Partner API for Easy Ship
558
+ * Use the Selling Partner API for Easy Ship to build applications for sellers to manage and ship Amazon Easy Ship orders. With this API, you can get available time slots, schedule and reschedule Easy Ship orders, and print shipping labels, invoices, and warranties. To review the differences in Easy Ship operations by marketplace, refer to [Marketplace support](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support).
559
+ *
560
+ * The version of the OpenAPI document: 2022-03-23
561
+ *
562
+ *
563
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
564
+ * https://openapi-generator.tech
565
+ * Do not edit the class manually.
566
+ */
567
+ /**
568
+ * Identifies the method by which a seller will hand a package over to Amazon Logistics.
569
+ */
570
+ const HandoverMethod = {
571
+ Pickup: "PICKUP",
572
+ Dropoff: "DROPOFF"
554
573
  };
555
-
556
- // src/api-model/models/package-status.ts
557
- var PackageStatus = {
558
- ReadyForPickup: "ReadyForPickup",
559
- PickedUp: "PickedUp",
560
- AtOriginFc: "AtOriginFC",
561
- AtDestinationFc: "AtDestinationFC",
562
- Delivered: "Delivered",
563
- Rejected: "Rejected",
564
- Undeliverable: "Undeliverable",
565
- ReturnedToSeller: "ReturnedToSeller",
566
- LostInTransit: "LostInTransit",
567
- LabelCanceled: "LabelCanceled",
568
- DamagedInTransit: "DamagedInTransit",
569
- OutForDelivery: "OutForDelivery"
574
+ //#endregion
575
+ //#region src/api-model/models/label-format.ts
576
+ /**
577
+ * Selling Partner API for Easy Ship
578
+ * Use the Selling Partner API for Easy Ship to build applications for sellers to manage and ship Amazon Easy Ship orders. With this API, you can get available time slots, schedule and reschedule Easy Ship orders, and print shipping labels, invoices, and warranties. To review the differences in Easy Ship operations by marketplace, refer to [Marketplace support](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support).
579
+ *
580
+ * The version of the OpenAPI document: 2022-03-23
581
+ *
582
+ *
583
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
584
+ * https://openapi-generator.tech
585
+ * Do not edit the class manually.
586
+ */
587
+ /**
588
+ * The file format in which the shipping label will be created.
589
+ */
590
+ const LabelFormat = {
591
+ Pdf: "PDF",
592
+ Zpl: "ZPL"
570
593
  };
571
-
572
- // src/api-model/models/unit-of-length.ts
573
- var UnitOfLength = {
574
- Cm: "cm"
594
+ //#endregion
595
+ //#region src/api-model/models/package-status.ts
596
+ /**
597
+ * Selling Partner API for Easy Ship
598
+ * Use the Selling Partner API for Easy Ship to build applications for sellers to manage and ship Amazon Easy Ship orders. With this API, you can get available time slots, schedule and reschedule Easy Ship orders, and print shipping labels, invoices, and warranties. To review the differences in Easy Ship operations by marketplace, refer to [Marketplace support](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support).
599
+ *
600
+ * The version of the OpenAPI document: 2022-03-23
601
+ *
602
+ *
603
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
604
+ * https://openapi-generator.tech
605
+ * Do not edit the class manually.
606
+ */
607
+ /**
608
+ * The status of the package.
609
+ */
610
+ const PackageStatus = {
611
+ ReadyForPickup: "ReadyForPickup",
612
+ PickedUp: "PickedUp",
613
+ AtOriginFc: "AtOriginFC",
614
+ AtDestinationFc: "AtDestinationFC",
615
+ Delivered: "Delivered",
616
+ Rejected: "Rejected",
617
+ Undeliverable: "Undeliverable",
618
+ ReturnedToSeller: "ReturnedToSeller",
619
+ LostInTransit: "LostInTransit",
620
+ LabelCanceled: "LabelCanceled",
621
+ DamagedInTransit: "DamagedInTransit",
622
+ OutForDelivery: "OutForDelivery"
575
623
  };
576
-
577
- // src/api-model/models/unit-of-weight.ts
578
- var UnitOfWeight = {
579
- Grams: "grams",
580
- G: "g"
624
+ //#endregion
625
+ //#region src/api-model/models/unit-of-length.ts
626
+ /**
627
+ * Selling Partner API for Easy Ship
628
+ * Use the Selling Partner API for Easy Ship to build applications for sellers to manage and ship Amazon Easy Ship orders. With this API, you can get available time slots, schedule and reschedule Easy Ship orders, and print shipping labels, invoices, and warranties. To review the differences in Easy Ship operations by marketplace, refer to [Marketplace support](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support).
629
+ *
630
+ * The version of the OpenAPI document: 2022-03-23
631
+ *
632
+ *
633
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
634
+ * https://openapi-generator.tech
635
+ * Do not edit the class manually.
636
+ */
637
+ /**
638
+ * The unit of measurement used to measure the length.
639
+ */
640
+ const UnitOfLength = { Cm: "cm" };
641
+ //#endregion
642
+ //#region src/api-model/models/unit-of-weight.ts
643
+ /**
644
+ * Selling Partner API for Easy Ship
645
+ * Use the Selling Partner API for Easy Ship to build applications for sellers to manage and ship Amazon Easy Ship orders. With this API, you can get available time slots, schedule and reschedule Easy Ship orders, and print shipping labels, invoices, and warranties. To review the differences in Easy Ship operations by marketplace, refer to [Marketplace support](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support).
646
+ *
647
+ * The version of the OpenAPI document: 2022-03-23
648
+ *
649
+ *
650
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
651
+ * https://openapi-generator.tech
652
+ * Do not edit the class manually.
653
+ */
654
+ /**
655
+ * The unit of measurement used to measure the weight.
656
+ */
657
+ const UnitOfWeight = {
658
+ Grams: "grams",
659
+ G: "g"
581
660
  };
582
-
583
- // src/client.ts
584
- var clientRateLimits = [
585
- {
586
- method: "post",
587
- // eslint-disable-next-line prefer-regex-literals
588
- urlRegex: new RegExp("^/easyShip/2022-03-23/timeSlot$"),
589
- rate: 1,
590
- burst: 5
591
- },
592
- {
593
- method: "get",
594
- // eslint-disable-next-line prefer-regex-literals
595
- urlRegex: new RegExp("^/easyShip/2022-03-23/package$"),
596
- rate: 1,
597
- burst: 5
598
- },
599
- {
600
- method: "post",
601
- // eslint-disable-next-line prefer-regex-literals
602
- urlRegex: new RegExp("^/easyShip/2022-03-23/package$"),
603
- rate: 1,
604
- burst: 5
605
- },
606
- {
607
- method: "patch",
608
- // eslint-disable-next-line prefer-regex-literals
609
- urlRegex: new RegExp("^/easyShip/2022-03-23/package$"),
610
- rate: 1,
611
- burst: 5
612
- },
613
- {
614
- method: "post",
615
- // eslint-disable-next-line prefer-regex-literals
616
- urlRegex: new RegExp("^/easyShip/2022-03-23/packages/bulk$"),
617
- rate: 1,
618
- burst: 5
619
- }
661
+ //#endregion
662
+ //#region src/client.ts
663
+ const clientRateLimits = [
664
+ {
665
+ method: "post",
666
+ urlRegex: /^\/easyShip\/2022\u{2D}03\u{2D}23\/timeSlot$/v,
667
+ rate: 1,
668
+ burst: 5
669
+ },
670
+ {
671
+ method: "get",
672
+ urlRegex: /^\/easyShip\/2022\u{2D}03\u{2D}23\/package$/v,
673
+ rate: 1,
674
+ burst: 5
675
+ },
676
+ {
677
+ method: "post",
678
+ urlRegex: /^\/easyShip\/2022\u{2D}03\u{2D}23\/package$/v,
679
+ rate: 1,
680
+ burst: 5
681
+ },
682
+ {
683
+ method: "patch",
684
+ urlRegex: /^\/easyShip\/2022\u{2D}03\u{2D}23\/package$/v,
685
+ rate: 1,
686
+ burst: 5
687
+ },
688
+ {
689
+ method: "post",
690
+ urlRegex: /^\/easyShip\/2022\u{2D}03\u{2D}23\/packages\/bulk$/v,
691
+ rate: 1,
692
+ burst: 5
693
+ }
620
694
  ];
621
695
  var EasyShipApiClient = class extends EasyShipApi {
622
- constructor(configuration) {
623
- const { axios, endpoint } = (0, import_common2.createAxiosInstance)(configuration, clientRateLimits);
624
- super(new Configuration(), endpoint, axios);
625
- }
696
+ constructor(configuration) {
697
+ const { axios, endpoint } = (0, _sp_api_sdk_common.createAxiosInstance)(configuration, clientRateLimits);
698
+ super(new Configuration(), endpoint, axios);
699
+ }
626
700
  };
627
- // Annotate the CommonJS export names for ESM import in node:
628
- 0 && (module.exports = {
629
- Code,
630
- EasyShipApi,
631
- EasyShipApiAxiosParamCreator,
632
- EasyShipApiClient,
633
- EasyShipApiFactory,
634
- EasyShipApiFp,
635
- HandoverMethod,
636
- LabelFormat,
637
- PackageStatus,
638
- UnitOfLength,
639
- UnitOfWeight,
640
- clientRateLimits
641
- });
701
+ //#endregion
702
+ exports.Code = Code;
703
+ exports.EasyShipApi = EasyShipApi;
704
+ exports.EasyShipApiAxiosParamCreator = EasyShipApiAxiosParamCreator;
705
+ exports.EasyShipApiClient = EasyShipApiClient;
706
+ exports.EasyShipApiFactory = EasyShipApiFactory;
707
+ exports.EasyShipApiFp = EasyShipApiFp;
708
+ exports.HandoverMethod = HandoverMethod;
709
+ exports.LabelFormat = LabelFormat;
710
+ exports.PackageStatus = PackageStatus;
711
+ exports.UnitOfLength = UnitOfLength;
712
+ exports.UnitOfWeight = UnitOfWeight;
713
+ exports.clientRateLimits = clientRateLimits;
714
+
642
715
  //# sourceMappingURL=index.cjs.map