@sp-api-sdk/easy-ship-api-2022-03-23 4.3.12 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -8
- package/dist/index.cjs +715 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +877 -0
- package/dist/index.d.ts +877 -0
- package/dist/index.js +680 -0
- package/dist/index.js.map +1 -0
- package/package.json +26 -12
- package/dist/cjs/api-model/api/easy-ship-api.js +0 -361
- package/dist/cjs/api-model/api.js +0 -30
- package/dist/cjs/api-model/base.js +0 -52
- package/dist/cjs/api-model/common.js +0 -123
- package/dist/cjs/api-model/configuration.js +0 -98
- package/dist/cjs/api-model/index.js +0 -32
- package/dist/cjs/api-model/models/code.js +0 -32
- package/dist/cjs/api-model/models/create-scheduled-package-request.js +0 -15
- package/dist/cjs/api-model/models/create-scheduled-packages-request.js +0 -15
- package/dist/cjs/api-model/models/create-scheduled-packages-response.js +0 -15
- package/dist/cjs/api-model/models/dimensions.js +0 -15
- package/dist/cjs/api-model/models/error-list.js +0 -15
- package/dist/cjs/api-model/models/handover-method.js +0 -23
- package/dist/cjs/api-model/models/index.js +0 -43
- package/dist/cjs/api-model/models/invoice-data.js +0 -15
- package/dist/cjs/api-model/models/item.js +0 -15
- package/dist/cjs/api-model/models/label-format.js +0 -23
- package/dist/cjs/api-model/models/list-handover-slots-request.js +0 -15
- package/dist/cjs/api-model/models/list-handover-slots-response.js +0 -15
- package/dist/cjs/api-model/models/model-error.js +0 -15
- package/dist/cjs/api-model/models/order-schedule-details.js +0 -15
- package/dist/cjs/api-model/models/package-details.js +0 -15
- package/dist/cjs/api-model/models/package-status.js +0 -33
- package/dist/cjs/api-model/models/package.js +0 -15
- package/dist/cjs/api-model/models/packages.js +0 -15
- package/dist/cjs/api-model/models/rejected-order.js +0 -15
- package/dist/cjs/api-model/models/scheduled-package-id.js +0 -15
- package/dist/cjs/api-model/models/time-slot.js +0 -15
- package/dist/cjs/api-model/models/tracking-details.js +0 -15
- package/dist/cjs/api-model/models/unit-of-length.js +0 -22
- package/dist/cjs/api-model/models/unit-of-weight.js +0 -23
- package/dist/cjs/api-model/models/update-package-details.js +0 -15
- package/dist/cjs/api-model/models/update-scheduled-packages-request.js +0 -15
- package/dist/cjs/api-model/models/weight.js +0 -15
- package/dist/cjs/client.js +0 -49
- package/dist/cjs/index.js +0 -19
- package/dist/es/api-model/api/easy-ship-api.js +0 -351
- package/dist/es/api-model/api.js +0 -14
- package/dist/es/api-model/base.js +0 -44
- package/dist/es/api-model/common.js +0 -110
- package/dist/es/api-model/configuration.js +0 -94
- package/dist/es/api-model/index.js +0 -16
- package/dist/es/api-model/models/code.js +0 -29
- package/dist/es/api-model/models/create-scheduled-package-request.js +0 -14
- package/dist/es/api-model/models/create-scheduled-packages-request.js +0 -14
- package/dist/es/api-model/models/create-scheduled-packages-response.js +0 -14
- package/dist/es/api-model/models/dimensions.js +0 -14
- package/dist/es/api-model/models/error-list.js +0 -14
- package/dist/es/api-model/models/handover-method.js +0 -20
- package/dist/es/api-model/models/index.js +0 -27
- package/dist/es/api-model/models/invoice-data.js +0 -14
- package/dist/es/api-model/models/item.js +0 -14
- package/dist/es/api-model/models/label-format.js +0 -20
- package/dist/es/api-model/models/list-handover-slots-request.js +0 -14
- package/dist/es/api-model/models/list-handover-slots-response.js +0 -14
- package/dist/es/api-model/models/model-error.js +0 -14
- package/dist/es/api-model/models/order-schedule-details.js +0 -14
- package/dist/es/api-model/models/package-details.js +0 -14
- package/dist/es/api-model/models/package-status.js +0 -30
- package/dist/es/api-model/models/package.js +0 -14
- package/dist/es/api-model/models/packages.js +0 -14
- package/dist/es/api-model/models/rejected-order.js +0 -14
- package/dist/es/api-model/models/scheduled-package-id.js +0 -14
- package/dist/es/api-model/models/time-slot.js +0 -14
- package/dist/es/api-model/models/tracking-details.js +0 -14
- package/dist/es/api-model/models/unit-of-length.js +0 -19
- package/dist/es/api-model/models/unit-of-weight.js +0 -20
- package/dist/es/api-model/models/update-package-details.js +0 -14
- package/dist/es/api-model/models/update-scheduled-packages-request.js +0 -14
- package/dist/es/api-model/models/weight.js +0 -14
- package/dist/es/client.js +0 -45
- package/dist/es/index.js +0 -3
- package/dist/types/api-model/api/easy-ship-api.d.ts +0 -234
- package/dist/types/api-model/api.d.ts +0 -12
- package/dist/types/api-model/base.d.ts +0 -42
- package/dist/types/api-model/common.d.ts +0 -34
- package/dist/types/api-model/configuration.d.ts +0 -98
- package/dist/types/api-model/index.d.ts +0 -14
- package/dist/types/api-model/models/code.d.ts +0 -28
- package/dist/types/api-model/models/create-scheduled-package-request.d.ts +0 -26
- package/dist/types/api-model/models/create-scheduled-packages-request.d.ts +0 -27
- package/dist/types/api-model/models/create-scheduled-packages-response.d.ts +0 -30
- package/dist/types/api-model/models/dimensions.d.ts +0 -34
- package/dist/types/api-model/models/error-list.d.ts +0 -20
- package/dist/types/api-model/models/handover-method.d.ts +0 -19
- package/dist/types/api-model/models/index.d.ts +0 -27
- package/dist/types/api-model/models/invoice-data.d.ts +0 -24
- package/dist/types/api-model/models/item.d.ts +0 -24
- package/dist/types/api-model/models/label-format.d.ts +0 -19
- package/dist/types/api-model/models/list-handover-slots-request.d.ts +0 -28
- package/dist/types/api-model/models/list-handover-slots-response.d.ts +0 -25
- package/dist/types/api-model/models/model-error.d.ts +0 -28
- package/dist/types/api-model/models/order-schedule-details.d.ts +0 -22
- package/dist/types/api-model/models/package-details.d.ts +0 -27
- package/dist/types/api-model/models/package-status.d.ts +0 -29
- package/dist/types/api-model/models/package.d.ts +0 -39
- package/dist/types/api-model/models/packages.d.ts +0 -21
- package/dist/types/api-model/models/rejected-order.d.ts +0 -21
- package/dist/types/api-model/models/scheduled-package-id.d.ts +0 -24
- package/dist/types/api-model/models/time-slot.d.ts +0 -30
- package/dist/types/api-model/models/tracking-details.d.ts +0 -20
- package/dist/types/api-model/models/unit-of-length.d.ts +0 -18
- package/dist/types/api-model/models/unit-of-weight.d.ts +0 -19
- package/dist/types/api-model/models/update-package-details.d.ts +0 -20
- package/dist/types/api-model/models/update-scheduled-packages-request.d.ts +0 -25
- package/dist/types/api-model/models/weight.d.ts +0 -22
- package/dist/types/client.d.ts +0 -6
- package/dist/types/index.d.ts +0 -3
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,715 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region \0rolldown/runtime.js
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
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;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
20
|
+
value: mod,
|
|
21
|
+
enumerable: true
|
|
22
|
+
}) : target, mod));
|
|
23
|
+
//#endregion
|
|
24
|
+
let _sp_api_sdk_common = require("@sp-api-sdk/common");
|
|
25
|
+
let axios = require("axios");
|
|
26
|
+
axios = __toESM(axios, 1);
|
|
27
|
+
//#region src/api-model/base.ts
|
|
28
|
+
const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
|
|
29
|
+
var BaseAPI = class {
|
|
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
|
+
}
|
|
41
|
+
};
|
|
42
|
+
var RequiredError = class extends Error {
|
|
43
|
+
field;
|
|
44
|
+
constructor(field, msg) {
|
|
45
|
+
super(msg);
|
|
46
|
+
this.field = field;
|
|
47
|
+
this.name = "RequiredError";
|
|
48
|
+
}
|
|
49
|
+
};
|
|
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}.`);
|
|
60
|
+
};
|
|
61
|
+
function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
|
|
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);
|
|
67
|
+
}
|
|
68
|
+
const setSearchParams = function(url, ...objects) {
|
|
69
|
+
const searchParams = new URLSearchParams(url.search);
|
|
70
|
+
setFlattenedQueryParams(searchParams, objects);
|
|
71
|
+
url.search = searchParams.toString();
|
|
72
|
+
};
|
|
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;
|
|
81
|
+
};
|
|
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 || "";
|
|
85
|
+
};
|
|
86
|
+
const toPathString = function(url) {
|
|
87
|
+
return url.pathname + url.search + url.hash;
|
|
88
|
+
};
|
|
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
|
+
};
|
|
97
|
+
};
|
|
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 `createScheduledPackage` 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 `createScheduledPackageBulk` 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 `listHandoverSlots` 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 `updateScheduledPackages` 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
|
+
};
|
|
271
|
+
};
|
|
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 `createScheduledPackage` 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 `createScheduledPackageBulk` 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 `listHandoverSlots` 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 `updateScheduledPackages` 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
|
+
};
|
|
340
|
+
};
|
|
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
|
+
};
|
|
393
|
+
};
|
|
394
|
+
/**
|
|
395
|
+
* EasyShipApi - object-oriented interface
|
|
396
|
+
*/
|
|
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
|
+
}
|
|
443
|
+
};
|
|
444
|
+
//#endregion
|
|
445
|
+
//#region src/api-model/configuration.ts
|
|
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: { ...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
|
+
}
|
|
524
|
+
};
|
|
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"
|
|
553
|
+
};
|
|
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"
|
|
573
|
+
};
|
|
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"
|
|
593
|
+
};
|
|
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"
|
|
623
|
+
};
|
|
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"
|
|
660
|
+
};
|
|
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
|
+
}
|
|
694
|
+
];
|
|
695
|
+
var EasyShipApiClient = class extends EasyShipApi {
|
|
696
|
+
constructor(configuration) {
|
|
697
|
+
const { axios, endpoint } = (0, _sp_api_sdk_common.createAxiosInstance)(configuration, clientRateLimits);
|
|
698
|
+
super(new Configuration(), endpoint, axios);
|
|
699
|
+
}
|
|
700
|
+
};
|
|
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
|
+
|
|
715
|
+
//# sourceMappingURL=index.cjs.map
|