@sp-api-sdk/easy-ship-api-2022-03-23 3.0.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.
Files changed (111) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +107 -0
  3. package/dist/cjs/api-model/api/easy-ship-api.js +367 -0
  4. package/dist/cjs/api-model/api.js +30 -0
  5. package/dist/cjs/api-model/base.js +71 -0
  6. package/dist/cjs/api-model/common.js +145 -0
  7. package/dist/cjs/api-model/configuration.js +99 -0
  8. package/dist/cjs/api-model/index.js +32 -0
  9. package/dist/cjs/api-model/models/code.js +34 -0
  10. package/dist/cjs/api-model/models/create-scheduled-package-request.js +15 -0
  11. package/dist/cjs/api-model/models/create-scheduled-packages-request.js +15 -0
  12. package/dist/cjs/api-model/models/create-scheduled-packages-response.js +15 -0
  13. package/dist/cjs/api-model/models/dimensions.js +15 -0
  14. package/dist/cjs/api-model/models/error-list.js +15 -0
  15. package/dist/cjs/api-model/models/handover-method.js +25 -0
  16. package/dist/cjs/api-model/models/index.js +43 -0
  17. package/dist/cjs/api-model/models/invoice-data.js +15 -0
  18. package/dist/cjs/api-model/models/item.js +15 -0
  19. package/dist/cjs/api-model/models/label-format.js +25 -0
  20. package/dist/cjs/api-model/models/list-handover-slots-request.js +15 -0
  21. package/dist/cjs/api-model/models/list-handover-slots-response.js +15 -0
  22. package/dist/cjs/api-model/models/model-error.js +15 -0
  23. package/dist/cjs/api-model/models/order-schedule-details.js +15 -0
  24. package/dist/cjs/api-model/models/package-details.js +15 -0
  25. package/dist/cjs/api-model/models/package-status.js +35 -0
  26. package/dist/cjs/api-model/models/package.js +15 -0
  27. package/dist/cjs/api-model/models/packages.js +15 -0
  28. package/dist/cjs/api-model/models/rejected-order.js +15 -0
  29. package/dist/cjs/api-model/models/scheduled-package-id.js +15 -0
  30. package/dist/cjs/api-model/models/time-slot.js +15 -0
  31. package/dist/cjs/api-model/models/tracking-details.js +15 -0
  32. package/dist/cjs/api-model/models/unit-of-length.js +24 -0
  33. package/dist/cjs/api-model/models/unit-of-weight.js +25 -0
  34. package/dist/cjs/api-model/models/update-package-details.js +15 -0
  35. package/dist/cjs/api-model/models/update-scheduled-packages-request.js +15 -0
  36. package/dist/cjs/api-model/models/weight.js +15 -0
  37. package/dist/cjs/client.js +49 -0
  38. package/dist/cjs/index.js +19 -0
  39. package/dist/es/api-model/api/easy-ship-api.js +357 -0
  40. package/dist/es/api-model/api.js +14 -0
  41. package/dist/es/api-model/base.js +63 -0
  42. package/dist/es/api-model/common.js +133 -0
  43. package/dist/es/api-model/configuration.js +95 -0
  44. package/dist/es/api-model/index.js +16 -0
  45. package/dist/es/api-model/models/code.js +31 -0
  46. package/dist/es/api-model/models/create-scheduled-package-request.js +14 -0
  47. package/dist/es/api-model/models/create-scheduled-packages-request.js +14 -0
  48. package/dist/es/api-model/models/create-scheduled-packages-response.js +14 -0
  49. package/dist/es/api-model/models/dimensions.js +14 -0
  50. package/dist/es/api-model/models/error-list.js +14 -0
  51. package/dist/es/api-model/models/handover-method.js +22 -0
  52. package/dist/es/api-model/models/index.js +27 -0
  53. package/dist/es/api-model/models/invoice-data.js +14 -0
  54. package/dist/es/api-model/models/item.js +14 -0
  55. package/dist/es/api-model/models/label-format.js +22 -0
  56. package/dist/es/api-model/models/list-handover-slots-request.js +14 -0
  57. package/dist/es/api-model/models/list-handover-slots-response.js +14 -0
  58. package/dist/es/api-model/models/model-error.js +14 -0
  59. package/dist/es/api-model/models/order-schedule-details.js +14 -0
  60. package/dist/es/api-model/models/package-details.js +14 -0
  61. package/dist/es/api-model/models/package-status.js +32 -0
  62. package/dist/es/api-model/models/package.js +14 -0
  63. package/dist/es/api-model/models/packages.js +14 -0
  64. package/dist/es/api-model/models/rejected-order.js +14 -0
  65. package/dist/es/api-model/models/scheduled-package-id.js +14 -0
  66. package/dist/es/api-model/models/time-slot.js +14 -0
  67. package/dist/es/api-model/models/tracking-details.js +14 -0
  68. package/dist/es/api-model/models/unit-of-length.js +21 -0
  69. package/dist/es/api-model/models/unit-of-weight.js +22 -0
  70. package/dist/es/api-model/models/update-package-details.js +14 -0
  71. package/dist/es/api-model/models/update-scheduled-packages-request.js +14 -0
  72. package/dist/es/api-model/models/weight.js +14 -0
  73. package/dist/es/client.js +45 -0
  74. package/dist/es/index.js +3 -0
  75. package/dist/types/api-model/api/easy-ship-api.d.ts +267 -0
  76. package/dist/types/api-model/api.d.ts +12 -0
  77. package/dist/types/api-model/base.d.ts +66 -0
  78. package/dist/types/api-model/common.d.ts +65 -0
  79. package/dist/types/api-model/configuration.d.ts +91 -0
  80. package/dist/types/api-model/index.d.ts +14 -0
  81. package/dist/types/api-model/models/code.d.ts +30 -0
  82. package/dist/types/api-model/models/create-scheduled-package-request.d.ts +37 -0
  83. package/dist/types/api-model/models/create-scheduled-packages-request.d.ts +38 -0
  84. package/dist/types/api-model/models/create-scheduled-packages-response.d.ts +38 -0
  85. package/dist/types/api-model/models/dimensions.d.ts +49 -0
  86. package/dist/types/api-model/models/error-list.d.ts +24 -0
  87. package/dist/types/api-model/models/handover-method.d.ts +21 -0
  88. package/dist/types/api-model/models/index.d.ts +27 -0
  89. package/dist/types/api-model/models/invoice-data.d.ts +30 -0
  90. package/dist/types/api-model/models/item.d.ts +30 -0
  91. package/dist/types/api-model/models/label-format.d.ts +21 -0
  92. package/dist/types/api-model/models/list-handover-slots-request.d.ts +44 -0
  93. package/dist/types/api-model/models/list-handover-slots-response.d.ts +31 -0
  94. package/dist/types/api-model/models/model-error.d.ts +36 -0
  95. package/dist/types/api-model/models/order-schedule-details.d.ts +31 -0
  96. package/dist/types/api-model/models/package-details.d.ts +38 -0
  97. package/dist/types/api-model/models/package-status.d.ts +31 -0
  98. package/dist/types/api-model/models/package.d.ts +80 -0
  99. package/dist/types/api-model/models/packages.d.ts +25 -0
  100. package/dist/types/api-model/models/rejected-order.d.ts +30 -0
  101. package/dist/types/api-model/models/scheduled-package-id.d.ts +30 -0
  102. package/dist/types/api-model/models/time-slot.d.ts +43 -0
  103. package/dist/types/api-model/models/tracking-details.d.ts +24 -0
  104. package/dist/types/api-model/models/unit-of-length.d.ts +20 -0
  105. package/dist/types/api-model/models/unit-of-weight.d.ts +21 -0
  106. package/dist/types/api-model/models/update-package-details.d.ts +32 -0
  107. package/dist/types/api-model/models/update-scheduled-packages-request.d.ts +31 -0
  108. package/dist/types/api-model/models/weight.d.ts +31 -0
  109. package/dist/types/client.d.ts +6 -0
  110. package/dist/types/index.d.ts +3 -0
  111. package/package.json +44 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 Bizon
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,107 @@
1
+ # `easy-ship-api-2022-03-23`
2
+
3
+ The Selling Partner API for Easy Ship helps you build applications that help sellers manage and ship Amazon Easy Ship orders.
4
+
5
+ Your Easy Ship applications can:
6
+
7
+ * Get available time slots for packages to be scheduled for delivery.
8
+
9
+ * Schedule, reschedule, and cancel Easy Ship orders.
10
+
11
+ * Print labels, invoices, and warranties.
12
+
13
+ See the [Marketplace Support Table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table) for the differences in Easy Ship operations by marketplace.
14
+
15
+ [![npm version](https://badgen.net/npm/v/@sp-api-sdk/easy-ship-api-2022-03-23)](https://www.npmjs.com/package/@sp-api-sdk/easy-ship-api-2022-03-23)
16
+ [![XO code style](https://badgen.net/badge/code%20style/XO/cyan)](https://github.com/xojs/xo)
17
+
18
+ ## Documentation
19
+
20
+ Learn more about this Selling Partner API by visiting the [official documentation](https://developer-docs.amazon.com/sp-api/docs).
21
+
22
+ Also, see the [generated documentation](https://bizon.github.io/selling-partner-api-sdk/modules/_sp-api-sdk_easy-ship-api-2022-03-23.html) for this API client.
23
+
24
+ ## Installing
25
+
26
+ ```sh
27
+ npm install @sp-api-sdk/easy-ship-api-2022-03-23
28
+ ```
29
+
30
+ ## Getting Started
31
+
32
+ ```javascript
33
+ import {SellingPartnerApiAuth} from '@sp-api-sdk/auth'
34
+ import {EasyShipApiClient} from '@sp-api-sdk/easy-ship-api-2022-03-23'
35
+
36
+ const auth = new SellingPartnerApiAuth({
37
+ clientId: process.env.LWA_CLIENT_ID,
38
+ clientSecret: process.env.LWA_CLIENT_SECRET,
39
+ refreshToken: 'Atzr|…',
40
+ })
41
+
42
+ const client = new EasyShipApiClient({
43
+ auth,
44
+ region: 'eu',
45
+ })
46
+ ```
47
+
48
+ ## Rate Limiting
49
+
50
+ In order to retry rate limited requests (HTTP 429), you can configure the API client as such:
51
+
52
+ ```javascript
53
+ const client = new EasyShipApiClient({
54
+ auth,
55
+ region: 'eu',
56
+ rateLimiting: {
57
+ retry: true,
58
+ // Optionally specify a callback that will be called on every retry.
59
+ onRetry: (retryInfo) => {
60
+ console.log(retryInfo)
61
+ },
62
+ },
63
+ })
64
+ ```
65
+
66
+ The rate limits used for each route are specified in the [API documentation](https://developer-docs.amazon.com/sp-api/docs).
67
+
68
+ ## Logging
69
+
70
+ You can enable logging for both SP-API requests and responses by configuring the `logging.request` and `logging.response` properties.
71
+
72
+ ```javascript
73
+ const client = new EasyShipApiClient({
74
+ auth,
75
+ region: 'eu',
76
+ logging: {
77
+ request: {
78
+ logger: console.debug
79
+ },
80
+ response: {
81
+ logger: console.debug
82
+ },
83
+ error: true,
84
+ },
85
+ })
86
+ ```
87
+
88
+ Specifying `true` will use the default options, specifying an object will allow you to override the default options.
89
+ This uses [axios-logger](https://github.com/hg-pyun/axios-logger) under the hood.
90
+ By default, if enabled, the `request` and `response` loggers will use `console.info` and the `error` logger will use `console.error`.
91
+
92
+
93
+ ## License
94
+
95
+ MIT
96
+
97
+ ## Miscellaneous
98
+
99
+ ```
100
+ ╚⊙ ⊙╝
101
+ ╚═(███)═╝
102
+ ╚═(███)═╝
103
+ ╚═(███)═╝
104
+ ╚═(███)═╝
105
+ ╚═(███)═╝
106
+ ╚═(███)═╝
107
+ ```
@@ -0,0 +1,367 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Selling Partner API for Easy Ship
6
+ * The Selling Partner API for Easy Ship helps you build applications that help sellers manage and ship Amazon Easy Ship orders. Your Easy Ship applications can: * Get available time slots for packages to be scheduled for delivery. * Schedule, reschedule, and cancel Easy Ship orders. * Print labels, invoices, and warranties. See the [Marketplace Support Table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table) for the differences in Easy Ship operations by marketplace.
7
+ *
8
+ * The version of the OpenAPI document: 2022-03-23
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __importDefault = (this && this.__importDefault) || function (mod) {
16
+ return (mod && mod.__esModule) ? mod : { "default": mod };
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.EasyShipApi = exports.EasyShipApiFactory = exports.EasyShipApiFp = exports.EasyShipApiAxiosParamCreator = void 0;
20
+ const axios_1 = __importDefault(require("axios"));
21
+ // Some imports not used depending on template conditions
22
+ // @ts-ignore
23
+ const common_1 = require("../common");
24
+ // @ts-ignore
25
+ const base_1 = require("../base");
26
+ /**
27
+ * EasyShipApi - axios parameter creator
28
+ * @export
29
+ */
30
+ const EasyShipApiAxiosParamCreator = function (configuration) {
31
+ return {
32
+ /**
33
+ * 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).
34
+ * @param {CreateScheduledPackageRequest} createScheduledPackageRequest The request schema for the `createScheduledPackage` operation.
35
+ * @param {*} [options] Override http request option.
36
+ * @throws {RequiredError}
37
+ */
38
+ createScheduledPackage: async (createScheduledPackageRequest, options = {}) => {
39
+ // verify required parameter 'createScheduledPackageRequest' is not null or undefined
40
+ (0, common_1.assertParamExists)('createScheduledPackage', 'createScheduledPackageRequest', createScheduledPackageRequest);
41
+ const localVarPath = `/easyShip/2022-03-23/package`;
42
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
43
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
44
+ let baseOptions;
45
+ if (configuration) {
46
+ baseOptions = configuration.baseOptions;
47
+ }
48
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
49
+ const localVarHeaderParameter = {};
50
+ const localVarQueryParameter = {};
51
+ localVarHeaderParameter['Content-Type'] = 'application/json';
52
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
53
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
54
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
55
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createScheduledPackageRequest, localVarRequestOptions, configuration);
56
+ return {
57
+ url: (0, common_1.toPathString)(localVarUrlObj),
58
+ options: localVarRequestOptions,
59
+ };
60
+ },
61
+ /**
62
+ * This operation automatically schedules a time slot for all specified `amazonOrderId` values and generates the associated shipping labels and compliance documents based on the marketplace. For more information, refer to the [marketplace support table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table). You can optionally assign a `packageDetails` object to input a preferred time slot for each order in your request. In such cases, Amazon schedules the respective packages using the specified optional settings. If you don\'t specify a time slot, Amazon assigns the earliest available time slot. You can choose PDF or ZPL for your shipping label\'s file format and Amazon creates the label accordingly. This operation returns an array that contains the scheduled packages, and a temporary URL that you can use to access a ZIP file. The ZIP file includes the generated shipping labels and any other documents that are required for your marketplace. If an order can\'t be scheduled, Amazon adds the `rejectedOrders` list in the response. The response contains an entry for each order that could not be processed. Each entry contains an error message that describes the reason for the failure. The following table contains 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 are applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [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).
63
+ * @param {CreateScheduledPackagesRequest} createScheduledPackagesRequest The request schema for the `createScheduledPackageBulk` operation.
64
+ * @param {*} [options] Override http request option.
65
+ * @throws {RequiredError}
66
+ */
67
+ createScheduledPackageBulk: async (createScheduledPackagesRequest, options = {}) => {
68
+ // verify required parameter 'createScheduledPackagesRequest' is not null or undefined
69
+ (0, common_1.assertParamExists)('createScheduledPackageBulk', 'createScheduledPackagesRequest', createScheduledPackagesRequest);
70
+ const localVarPath = `/easyShip/2022-03-23/packages/bulk`;
71
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
72
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
73
+ let baseOptions;
74
+ if (configuration) {
75
+ baseOptions = configuration.baseOptions;
76
+ }
77
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
78
+ const localVarHeaderParameter = {};
79
+ const localVarQueryParameter = {};
80
+ localVarHeaderParameter['Content-Type'] = 'application/json';
81
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
82
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
83
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
84
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createScheduledPackagesRequest, localVarRequestOptions, configuration);
85
+ return {
86
+ url: (0, common_1.toPathString)(localVarUrlObj),
87
+ options: localVarRequestOptions,
88
+ };
89
+ },
90
+ /**
91
+ * 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).
92
+ * @param {string} amazonOrderId An Amazon-defined order identifier. Identifies the order that the seller wants to deliver using Amazon Easy Ship.
93
+ * @param {string} marketplaceId An identifier for the marketplace in which the seller is selling.
94
+ * @param {*} [options] Override http request option.
95
+ * @throws {RequiredError}
96
+ */
97
+ getScheduledPackage: async (amazonOrderId, marketplaceId, options = {}) => {
98
+ // verify required parameter 'amazonOrderId' is not null or undefined
99
+ (0, common_1.assertParamExists)('getScheduledPackage', 'amazonOrderId', amazonOrderId);
100
+ // verify required parameter 'marketplaceId' is not null or undefined
101
+ (0, common_1.assertParamExists)('getScheduledPackage', 'marketplaceId', marketplaceId);
102
+ const localVarPath = `/easyShip/2022-03-23/package`;
103
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
104
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
105
+ let baseOptions;
106
+ if (configuration) {
107
+ baseOptions = configuration.baseOptions;
108
+ }
109
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
110
+ const localVarHeaderParameter = {};
111
+ const localVarQueryParameter = {};
112
+ if (amazonOrderId !== undefined) {
113
+ localVarQueryParameter['amazonOrderId'] = amazonOrderId;
114
+ }
115
+ if (marketplaceId !== undefined) {
116
+ localVarQueryParameter['marketplaceId'] = marketplaceId;
117
+ }
118
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
119
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
120
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
121
+ return {
122
+ url: (0, common_1.toPathString)(localVarUrlObj),
123
+ options: localVarRequestOptions,
124
+ };
125
+ },
126
+ /**
127
+ * 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).
128
+ * @param {ListHandoverSlotsRequest} [listHandoverSlotsRequest] The request schema for the `listHandoverSlots` operation.
129
+ * @param {*} [options] Override http request option.
130
+ * @throws {RequiredError}
131
+ */
132
+ listHandoverSlots: async (listHandoverSlotsRequest, options = {}) => {
133
+ const localVarPath = `/easyShip/2022-03-23/timeSlot`;
134
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
135
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
136
+ let baseOptions;
137
+ if (configuration) {
138
+ baseOptions = configuration.baseOptions;
139
+ }
140
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
141
+ const localVarHeaderParameter = {};
142
+ const localVarQueryParameter = {};
143
+ localVarHeaderParameter['Content-Type'] = 'application/json';
144
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
145
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
146
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
147
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(listHandoverSlotsRequest, localVarRequestOptions, configuration);
148
+ return {
149
+ url: (0, common_1.toPathString)(localVarUrlObj),
150
+ options: localVarRequestOptions,
151
+ };
152
+ },
153
+ /**
154
+ * 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).
155
+ * @param {UpdateScheduledPackagesRequest} [updateScheduledPackagesRequest] The request schema for the `updateScheduledPackages` operation.
156
+ * @param {*} [options] Override http request option.
157
+ * @throws {RequiredError}
158
+ */
159
+ updateScheduledPackages: async (updateScheduledPackagesRequest, options = {}) => {
160
+ const localVarPath = `/easyShip/2022-03-23/package`;
161
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
162
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
163
+ let baseOptions;
164
+ if (configuration) {
165
+ baseOptions = configuration.baseOptions;
166
+ }
167
+ const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options };
168
+ const localVarHeaderParameter = {};
169
+ const localVarQueryParameter = {};
170
+ localVarHeaderParameter['Content-Type'] = 'application/json';
171
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
172
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
173
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
174
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateScheduledPackagesRequest, localVarRequestOptions, configuration);
175
+ return {
176
+ url: (0, common_1.toPathString)(localVarUrlObj),
177
+ options: localVarRequestOptions,
178
+ };
179
+ },
180
+ };
181
+ };
182
+ exports.EasyShipApiAxiosParamCreator = EasyShipApiAxiosParamCreator;
183
+ /**
184
+ * EasyShipApi - functional programming interface
185
+ * @export
186
+ */
187
+ const EasyShipApiFp = function (configuration) {
188
+ const localVarAxiosParamCreator = (0, exports.EasyShipApiAxiosParamCreator)(configuration);
189
+ return {
190
+ /**
191
+ * 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).
192
+ * @param {CreateScheduledPackageRequest} createScheduledPackageRequest The request schema for the `createScheduledPackage` operation.
193
+ * @param {*} [options] Override http request option.
194
+ * @throws {RequiredError}
195
+ */
196
+ async createScheduledPackage(createScheduledPackageRequest, options) {
197
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createScheduledPackage(createScheduledPackageRequest, options);
198
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
199
+ const localVarOperationServerBasePath = base_1.operationServerMap['EasyShipApi.createScheduledPackage']?.[localVarOperationServerIndex]?.url;
200
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
201
+ },
202
+ /**
203
+ * This operation automatically schedules a time slot for all specified `amazonOrderId` values and generates the associated shipping labels and compliance documents based on the marketplace. For more information, refer to the [marketplace support table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table). You can optionally assign a `packageDetails` object to input a preferred time slot for each order in your request. In such cases, Amazon schedules the respective packages using the specified optional settings. If you don\'t specify a time slot, Amazon assigns the earliest available time slot. You can choose PDF or ZPL for your shipping label\'s file format and Amazon creates the label accordingly. This operation returns an array that contains the scheduled packages, and a temporary URL that you can use to access a ZIP file. The ZIP file includes the generated shipping labels and any other documents that are required for your marketplace. If an order can\'t be scheduled, Amazon adds the `rejectedOrders` list in the response. The response contains an entry for each order that could not be processed. Each entry contains an error message that describes the reason for the failure. The following table contains 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 are applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [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).
204
+ * @param {CreateScheduledPackagesRequest} createScheduledPackagesRequest The request schema for the `createScheduledPackageBulk` operation.
205
+ * @param {*} [options] Override http request option.
206
+ * @throws {RequiredError}
207
+ */
208
+ async createScheduledPackageBulk(createScheduledPackagesRequest, options) {
209
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createScheduledPackageBulk(createScheduledPackagesRequest, options);
210
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
211
+ const localVarOperationServerBasePath = base_1.operationServerMap['EasyShipApi.createScheduledPackageBulk']?.[localVarOperationServerIndex]?.url;
212
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
213
+ },
214
+ /**
215
+ * 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).
216
+ * @param {string} amazonOrderId An Amazon-defined order identifier. Identifies the order that the seller wants to deliver using Amazon Easy Ship.
217
+ * @param {string} marketplaceId An identifier for the marketplace in which the seller is selling.
218
+ * @param {*} [options] Override http request option.
219
+ * @throws {RequiredError}
220
+ */
221
+ async getScheduledPackage(amazonOrderId, marketplaceId, options) {
222
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getScheduledPackage(amazonOrderId, marketplaceId, options);
223
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
224
+ const localVarOperationServerBasePath = base_1.operationServerMap['EasyShipApi.getScheduledPackage']?.[localVarOperationServerIndex]?.url;
225
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
226
+ },
227
+ /**
228
+ * 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).
229
+ * @param {ListHandoverSlotsRequest} [listHandoverSlotsRequest] The request schema for the `listHandoverSlots` operation.
230
+ * @param {*} [options] Override http request option.
231
+ * @throws {RequiredError}
232
+ */
233
+ async listHandoverSlots(listHandoverSlotsRequest, options) {
234
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listHandoverSlots(listHandoverSlotsRequest, options);
235
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
236
+ const localVarOperationServerBasePath = base_1.operationServerMap['EasyShipApi.listHandoverSlots']?.[localVarOperationServerIndex]?.url;
237
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
238
+ },
239
+ /**
240
+ * 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).
241
+ * @param {UpdateScheduledPackagesRequest} [updateScheduledPackagesRequest] The request schema for the `updateScheduledPackages` operation.
242
+ * @param {*} [options] Override http request option.
243
+ * @throws {RequiredError}
244
+ */
245
+ async updateScheduledPackages(updateScheduledPackagesRequest, options) {
246
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateScheduledPackages(updateScheduledPackagesRequest, options);
247
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
248
+ const localVarOperationServerBasePath = base_1.operationServerMap['EasyShipApi.updateScheduledPackages']?.[localVarOperationServerIndex]?.url;
249
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
250
+ },
251
+ };
252
+ };
253
+ exports.EasyShipApiFp = EasyShipApiFp;
254
+ /**
255
+ * EasyShipApi - factory interface
256
+ * @export
257
+ */
258
+ const EasyShipApiFactory = function (configuration, basePath, axios) {
259
+ const localVarFp = (0, exports.EasyShipApiFp)(configuration);
260
+ return {
261
+ /**
262
+ * 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).
263
+ * @param {EasyShipApiCreateScheduledPackageRequest} requestParameters Request parameters.
264
+ * @param {*} [options] Override http request option.
265
+ * @throws {RequiredError}
266
+ */
267
+ createScheduledPackage(requestParameters, options) {
268
+ return localVarFp.createScheduledPackage(requestParameters.createScheduledPackageRequest, options).then((request) => request(axios, basePath));
269
+ },
270
+ /**
271
+ * This operation automatically schedules a time slot for all specified `amazonOrderId` values and generates the associated shipping labels and compliance documents based on the marketplace. For more information, refer to the [marketplace support table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table). You can optionally assign a `packageDetails` object to input a preferred time slot for each order in your request. In such cases, Amazon schedules the respective packages using the specified optional settings. If you don\'t specify a time slot, Amazon assigns the earliest available time slot. You can choose PDF or ZPL for your shipping label\'s file format and Amazon creates the label accordingly. This operation returns an array that contains the scheduled packages, and a temporary URL that you can use to access a ZIP file. The ZIP file includes the generated shipping labels and any other documents that are required for your marketplace. If an order can\'t be scheduled, Amazon adds the `rejectedOrders` list in the response. The response contains an entry for each order that could not be processed. Each entry contains an error message that describes the reason for the failure. The following table contains 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 are applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [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).
272
+ * @param {EasyShipApiCreateScheduledPackageBulkRequest} requestParameters Request parameters.
273
+ * @param {*} [options] Override http request option.
274
+ * @throws {RequiredError}
275
+ */
276
+ createScheduledPackageBulk(requestParameters, options) {
277
+ return localVarFp.createScheduledPackageBulk(requestParameters.createScheduledPackagesRequest, options).then((request) => request(axios, basePath));
278
+ },
279
+ /**
280
+ * 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).
281
+ * @param {EasyShipApiGetScheduledPackageRequest} requestParameters Request parameters.
282
+ * @param {*} [options] Override http request option.
283
+ * @throws {RequiredError}
284
+ */
285
+ getScheduledPackage(requestParameters, options) {
286
+ return localVarFp.getScheduledPackage(requestParameters.amazonOrderId, requestParameters.marketplaceId, options).then((request) => request(axios, basePath));
287
+ },
288
+ /**
289
+ * 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).
290
+ * @param {EasyShipApiListHandoverSlotsRequest} requestParameters Request parameters.
291
+ * @param {*} [options] Override http request option.
292
+ * @throws {RequiredError}
293
+ */
294
+ listHandoverSlots(requestParameters = {}, options) {
295
+ return localVarFp.listHandoverSlots(requestParameters.listHandoverSlotsRequest, options).then((request) => request(axios, basePath));
296
+ },
297
+ /**
298
+ * 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).
299
+ * @param {EasyShipApiUpdateScheduledPackagesRequest} requestParameters Request parameters.
300
+ * @param {*} [options] Override http request option.
301
+ * @throws {RequiredError}
302
+ */
303
+ updateScheduledPackages(requestParameters = {}, options) {
304
+ return localVarFp.updateScheduledPackages(requestParameters.updateScheduledPackagesRequest, options).then((request) => request(axios, basePath));
305
+ },
306
+ };
307
+ };
308
+ exports.EasyShipApiFactory = EasyShipApiFactory;
309
+ /**
310
+ * EasyShipApi - object-oriented interface
311
+ * @export
312
+ * @class EasyShipApi
313
+ * @extends {BaseAPI}
314
+ */
315
+ class EasyShipApi extends base_1.BaseAPI {
316
+ /**
317
+ * 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).
318
+ * @param {EasyShipApiCreateScheduledPackageRequest} requestParameters Request parameters.
319
+ * @param {*} [options] Override http request option.
320
+ * @throws {RequiredError}
321
+ * @memberof EasyShipApi
322
+ */
323
+ createScheduledPackage(requestParameters, options) {
324
+ return (0, exports.EasyShipApiFp)(this.configuration).createScheduledPackage(requestParameters.createScheduledPackageRequest, options).then((request) => request(this.axios, this.basePath));
325
+ }
326
+ /**
327
+ * This operation automatically schedules a time slot for all specified `amazonOrderId` values and generates the associated shipping labels and compliance documents based on the marketplace. For more information, refer to the [marketplace support table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table). You can optionally assign a `packageDetails` object to input a preferred time slot for each order in your request. In such cases, Amazon schedules the respective packages using the specified optional settings. If you don\'t specify a time slot, Amazon assigns the earliest available time slot. You can choose PDF or ZPL for your shipping label\'s file format and Amazon creates the label accordingly. This operation returns an array that contains the scheduled packages, and a temporary URL that you can use to access a ZIP file. The ZIP file includes the generated shipping labels and any other documents that are required for your marketplace. If an order can\'t be scheduled, Amazon adds the `rejectedOrders` list in the response. The response contains an entry for each order that could not be processed. Each entry contains an error message that describes the reason for the failure. The following table contains 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 are applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [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).
328
+ * @param {EasyShipApiCreateScheduledPackageBulkRequest} requestParameters Request parameters.
329
+ * @param {*} [options] Override http request option.
330
+ * @throws {RequiredError}
331
+ * @memberof EasyShipApi
332
+ */
333
+ createScheduledPackageBulk(requestParameters, options) {
334
+ return (0, exports.EasyShipApiFp)(this.configuration).createScheduledPackageBulk(requestParameters.createScheduledPackagesRequest, options).then((request) => request(this.axios, this.basePath));
335
+ }
336
+ /**
337
+ * 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).
338
+ * @param {EasyShipApiGetScheduledPackageRequest} requestParameters Request parameters.
339
+ * @param {*} [options] Override http request option.
340
+ * @throws {RequiredError}
341
+ * @memberof EasyShipApi
342
+ */
343
+ getScheduledPackage(requestParameters, options) {
344
+ return (0, exports.EasyShipApiFp)(this.configuration).getScheduledPackage(requestParameters.amazonOrderId, requestParameters.marketplaceId, options).then((request) => request(this.axios, this.basePath));
345
+ }
346
+ /**
347
+ * 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).
348
+ * @param {EasyShipApiListHandoverSlotsRequest} requestParameters Request parameters.
349
+ * @param {*} [options] Override http request option.
350
+ * @throws {RequiredError}
351
+ * @memberof EasyShipApi
352
+ */
353
+ listHandoverSlots(requestParameters = {}, options) {
354
+ return (0, exports.EasyShipApiFp)(this.configuration).listHandoverSlots(requestParameters.listHandoverSlotsRequest, options).then((request) => request(this.axios, this.basePath));
355
+ }
356
+ /**
357
+ * 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).
358
+ * @param {EasyShipApiUpdateScheduledPackagesRequest} requestParameters Request parameters.
359
+ * @param {*} [options] Override http request option.
360
+ * @throws {RequiredError}
361
+ * @memberof EasyShipApi
362
+ */
363
+ updateScheduledPackages(requestParameters = {}, options) {
364
+ return (0, exports.EasyShipApiFp)(this.configuration).updateScheduledPackages(requestParameters.updateScheduledPackagesRequest, options).then((request) => request(this.axios, this.basePath));
365
+ }
366
+ }
367
+ exports.EasyShipApi = EasyShipApi;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Selling Partner API for Easy Ship
6
+ * The Selling Partner API for Easy Ship helps you build applications that help sellers manage and ship Amazon Easy Ship orders. Your Easy Ship applications can: * Get available time slots for packages to be scheduled for delivery. * Schedule, reschedule, and cancel Easy Ship orders. * Print labels, invoices, and warranties. See the [Marketplace Support Table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table) for the differences in Easy Ship operations by marketplace.
7
+ *
8
+ * The version of the OpenAPI document: 2022-03-23
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ var desc = Object.getOwnPropertyDescriptor(m, k);
18
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
19
+ desc = { enumerable: true, get: function() { return m[k]; } };
20
+ }
21
+ Object.defineProperty(o, k2, desc);
22
+ }) : (function(o, m, k, k2) {
23
+ if (k2 === undefined) k2 = k;
24
+ o[k2] = m[k];
25
+ }));
26
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
27
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
28
+ };
29
+ Object.defineProperty(exports, "__esModule", { value: true });
30
+ __exportStar(require("./api/easy-ship-api"), exports);
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Selling Partner API for Easy Ship
6
+ * The Selling Partner API for Easy Ship helps you build applications that help sellers manage and ship Amazon Easy Ship orders. Your Easy Ship applications can: * Get available time slots for packages to be scheduled for delivery. * Schedule, reschedule, and cancel Easy Ship orders. * Print labels, invoices, and warranties. See the [Marketplace Support Table](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support-table) for the differences in Easy Ship operations by marketplace.
7
+ *
8
+ * The version of the OpenAPI document: 2022-03-23
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __importDefault = (this && this.__importDefault) || function (mod) {
16
+ return (mod && mod.__esModule) ? mod : { "default": mod };
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.operationServerMap = exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
20
+ const axios_1 = __importDefault(require("axios"));
21
+ exports.BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
22
+ /**
23
+ *
24
+ * @export
25
+ */
26
+ exports.COLLECTION_FORMATS = {
27
+ csv: ",",
28
+ ssv: " ",
29
+ tsv: "\t",
30
+ pipes: "|",
31
+ };
32
+ /**
33
+ *
34
+ * @export
35
+ * @class BaseAPI
36
+ */
37
+ class BaseAPI {
38
+ basePath;
39
+ axios;
40
+ configuration;
41
+ constructor(configuration, basePath = exports.BASE_PATH, axios = axios_1.default) {
42
+ this.basePath = basePath;
43
+ this.axios = axios;
44
+ if (configuration) {
45
+ this.configuration = configuration;
46
+ this.basePath = configuration.basePath ?? basePath;
47
+ }
48
+ }
49
+ }
50
+ exports.BaseAPI = BaseAPI;
51
+ ;
52
+ /**
53
+ *
54
+ * @export
55
+ * @class RequiredError
56
+ * @extends {Error}
57
+ */
58
+ class RequiredError extends Error {
59
+ field;
60
+ constructor(field, msg) {
61
+ super(msg);
62
+ this.field = field;
63
+ this.name = "RequiredError";
64
+ }
65
+ }
66
+ exports.RequiredError = RequiredError;
67
+ /**
68
+ *
69
+ * @export
70
+ */
71
+ exports.operationServerMap = {};