@sp-api-sdk/external-fulfillment-shipments-api-2024-09-11 1.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.
Files changed (201) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +99 -0
  3. package/dist/cjs/api-model/api/external-fulfillment-shipments-api.js +766 -0
  4. package/dist/cjs/api-model/api.js +30 -0
  5. package/dist/cjs/api-model/base.js +52 -0
  6. package/dist/cjs/api-model/common.js +108 -0
  7. package/dist/cjs/api-model/configuration.js +87 -0
  8. package/dist/cjs/api-model/index.js +32 -0
  9. package/dist/cjs/api-model/models/address.js +15 -0
  10. package/dist/cjs/api-model/models/amount.js +15 -0
  11. package/dist/cjs/api-model/models/cancellation.js +21 -0
  12. package/dist/cjs/api-model/models/charge-breakup.js +15 -0
  13. package/dist/cjs/api-model/models/charge.js +23 -0
  14. package/dist/cjs/api-model/models/compliance-attributes.js +15 -0
  15. package/dist/cjs/api-model/models/courier-supported-attributes.js +15 -0
  16. package/dist/cjs/api-model/models/custom-attribute-type.js +26 -0
  17. package/dist/cjs/api-model/models/custom-attribute.js +15 -0
  18. package/dist/cjs/api-model/models/dimension.js +20 -0
  19. package/dist/cjs/api-model/models/document-v2.js +15 -0
  20. package/dist/cjs/api-model/models/document.js +22 -0
  21. package/dist/cjs/api-model/models/error-list.js +15 -0
  22. package/dist/cjs/api-model/models/gift-attributes.js +15 -0
  23. package/dist/cjs/api-model/models/index.js +73 -0
  24. package/dist/cjs/api-model/models/invoice-info.js +15 -0
  25. package/dist/cjs/api-model/models/invoice-requirement.js +25 -0
  26. package/dist/cjs/api-model/models/invoice-response.js +15 -0
  27. package/dist/cjs/api-model/models/line-item-with-reason.js +20 -0
  28. package/dist/cjs/api-model/models/line-item.js +15 -0
  29. package/dist/cjs/api-model/models/marketplace-attributes.js +20 -0
  30. package/dist/cjs/api-model/models/model-error.js +15 -0
  31. package/dist/cjs/api-model/models/original-line-item.js +15 -0
  32. package/dist/cjs/api-model/models/package-delivery-status.js +15 -0
  33. package/dist/cjs/api-model/models/package-dimensions.js +15 -0
  34. package/dist/cjs/api-model/models/package-line-item.js +15 -0
  35. package/dist/cjs/api-model/models/package-ship-label.js +15 -0
  36. package/dist/cjs/api-model/models/package-status.js +27 -0
  37. package/dist/cjs/api-model/models/package-sub-status.js +25 -0
  38. package/dist/cjs/api-model/models/package.js +29 -0
  39. package/dist/cjs/api-model/models/packages.js +15 -0
  40. package/dist/cjs/api-model/models/packing-slip-requirement.js +24 -0
  41. package/dist/cjs/api-model/models/pagination.js +15 -0
  42. package/dist/cjs/api-model/models/party-identification-info.js +22 -0
  43. package/dist/cjs/api-model/models/piece-type.js +23 -0
  44. package/dist/cjs/api-model/models/presence-status.js +23 -0
  45. package/dist/cjs/api-model/models/priority.js +23 -0
  46. package/dist/cjs/api-model/models/recommended-package-line-item.js +15 -0
  47. package/dist/cjs/api-model/models/recommended-package.js +15 -0
  48. package/dist/cjs/api-model/models/replaced-shipment-info.js +15 -0
  49. package/dist/cjs/api-model/models/requirement-level.js +23 -0
  50. package/dist/cjs/api-model/models/ship-label-metadata.js +15 -0
  51. package/dist/cjs/api-model/models/ship-labels-input.js +15 -0
  52. package/dist/cjs/api-model/models/ship-labels-response.js +15 -0
  53. package/dist/cjs/api-model/models/shipment-acknowledgement-request.js +15 -0
  54. package/dist/cjs/api-model/models/shipment-info.js +25 -0
  55. package/dist/cjs/api-model/models/shipment-line-item.js +15 -0
  56. package/dist/cjs/api-model/models/shipment-requirements.js +15 -0
  57. package/dist/cjs/api-model/models/shipment.js +44 -0
  58. package/dist/cjs/api-model/models/shipments-response.js +15 -0
  59. package/dist/cjs/api-model/models/shipping-info.js +20 -0
  60. package/dist/cjs/api-model/models/shipping-options-response.js +15 -0
  61. package/dist/cjs/api-model/models/shipping-options.js +22 -0
  62. package/dist/cjs/api-model/models/status.js +23 -0
  63. package/dist/cjs/api-model/models/tax-registration-info.js +20 -0
  64. package/dist/cjs/api-model/models/tax.js +27 -0
  65. package/dist/cjs/api-model/models/time-window.js +20 -0
  66. package/dist/cjs/api-model/models/weight.js +20 -0
  67. package/dist/cjs/client.js +13 -0
  68. package/dist/cjs/index.js +19 -0
  69. package/dist/es/api-model/api/external-fulfillment-shipments-api.js +756 -0
  70. package/dist/es/api-model/api.js +14 -0
  71. package/dist/es/api-model/base.js +44 -0
  72. package/dist/es/api-model/common.js +96 -0
  73. package/dist/es/api-model/configuration.js +83 -0
  74. package/dist/es/api-model/index.js +16 -0
  75. package/dist/es/api-model/models/address.js +14 -0
  76. package/dist/es/api-model/models/amount.js +14 -0
  77. package/dist/es/api-model/models/cancellation.js +18 -0
  78. package/dist/es/api-model/models/charge-breakup.js +14 -0
  79. package/dist/es/api-model/models/charge.js +20 -0
  80. package/dist/es/api-model/models/compliance-attributes.js +14 -0
  81. package/dist/es/api-model/models/courier-supported-attributes.js +14 -0
  82. package/dist/es/api-model/models/custom-attribute-type.js +23 -0
  83. package/dist/es/api-model/models/custom-attribute.js +14 -0
  84. package/dist/es/api-model/models/dimension.js +17 -0
  85. package/dist/es/api-model/models/document-v2.js +14 -0
  86. package/dist/es/api-model/models/document.js +19 -0
  87. package/dist/es/api-model/models/error-list.js +14 -0
  88. package/dist/es/api-model/models/gift-attributes.js +14 -0
  89. package/dist/es/api-model/models/index.js +57 -0
  90. package/dist/es/api-model/models/invoice-info.js +14 -0
  91. package/dist/es/api-model/models/invoice-requirement.js +22 -0
  92. package/dist/es/api-model/models/invoice-response.js +14 -0
  93. package/dist/es/api-model/models/line-item-with-reason.js +17 -0
  94. package/dist/es/api-model/models/line-item.js +14 -0
  95. package/dist/es/api-model/models/marketplace-attributes.js +17 -0
  96. package/dist/es/api-model/models/model-error.js +14 -0
  97. package/dist/es/api-model/models/original-line-item.js +14 -0
  98. package/dist/es/api-model/models/package-delivery-status.js +14 -0
  99. package/dist/es/api-model/models/package-dimensions.js +14 -0
  100. package/dist/es/api-model/models/package-line-item.js +14 -0
  101. package/dist/es/api-model/models/package-ship-label.js +14 -0
  102. package/dist/es/api-model/models/package-status.js +24 -0
  103. package/dist/es/api-model/models/package-sub-status.js +22 -0
  104. package/dist/es/api-model/models/package.js +26 -0
  105. package/dist/es/api-model/models/packages.js +14 -0
  106. package/dist/es/api-model/models/packing-slip-requirement.js +21 -0
  107. package/dist/es/api-model/models/pagination.js +14 -0
  108. package/dist/es/api-model/models/party-identification-info.js +19 -0
  109. package/dist/es/api-model/models/piece-type.js +20 -0
  110. package/dist/es/api-model/models/presence-status.js +20 -0
  111. package/dist/es/api-model/models/priority.js +20 -0
  112. package/dist/es/api-model/models/recommended-package-line-item.js +14 -0
  113. package/dist/es/api-model/models/recommended-package.js +14 -0
  114. package/dist/es/api-model/models/replaced-shipment-info.js +14 -0
  115. package/dist/es/api-model/models/requirement-level.js +20 -0
  116. package/dist/es/api-model/models/ship-label-metadata.js +14 -0
  117. package/dist/es/api-model/models/ship-labels-input.js +14 -0
  118. package/dist/es/api-model/models/ship-labels-response.js +14 -0
  119. package/dist/es/api-model/models/shipment-acknowledgement-request.js +14 -0
  120. package/dist/es/api-model/models/shipment-info.js +22 -0
  121. package/dist/es/api-model/models/shipment-line-item.js +14 -0
  122. package/dist/es/api-model/models/shipment-requirements.js +14 -0
  123. package/dist/es/api-model/models/shipment.js +41 -0
  124. package/dist/es/api-model/models/shipments-response.js +14 -0
  125. package/dist/es/api-model/models/shipping-info.js +17 -0
  126. package/dist/es/api-model/models/shipping-options-response.js +14 -0
  127. package/dist/es/api-model/models/shipping-options.js +19 -0
  128. package/dist/es/api-model/models/status.js +20 -0
  129. package/dist/es/api-model/models/tax-registration-info.js +17 -0
  130. package/dist/es/api-model/models/tax.js +24 -0
  131. package/dist/es/api-model/models/time-window.js +17 -0
  132. package/dist/es/api-model/models/weight.js +17 -0
  133. package/dist/es/client.js +9 -0
  134. package/dist/es/index.js +3 -0
  135. package/dist/types/api-model/api/external-fulfillment-shipments-api.d.ts +556 -0
  136. package/dist/types/api-model/api.d.ts +12 -0
  137. package/dist/types/api-model/base.d.ts +42 -0
  138. package/dist/types/api-model/common.d.ts +28 -0
  139. package/dist/types/api-model/configuration.d.ts +74 -0
  140. package/dist/types/api-model/index.d.ts +14 -0
  141. package/dist/types/api-model/models/address.d.ts +72 -0
  142. package/dist/types/api-model/models/amount.d.ts +24 -0
  143. package/dist/types/api-model/models/cancellation.d.ts +38 -0
  144. package/dist/types/api-model/models/charge-breakup.d.ts +20 -0
  145. package/dist/types/api-model/models/charge.d.ts +37 -0
  146. package/dist/types/api-model/models/compliance-attributes.d.ts +21 -0
  147. package/dist/types/api-model/models/courier-supported-attributes.d.ts +24 -0
  148. package/dist/types/api-model/models/custom-attribute-type.d.ts +22 -0
  149. package/dist/types/api-model/models/custom-attribute.d.ts +26 -0
  150. package/dist/types/api-model/models/dimension.d.ts +29 -0
  151. package/dist/types/api-model/models/document-v2.d.ts +20 -0
  152. package/dist/types/api-model/models/document.d.ts +31 -0
  153. package/dist/types/api-model/models/error-list.d.ts +20 -0
  154. package/dist/types/api-model/models/gift-attributes.d.ts +26 -0
  155. package/dist/types/api-model/models/index.d.ts +57 -0
  156. package/dist/types/api-model/models/invoice-info.d.ts +24 -0
  157. package/dist/types/api-model/models/invoice-requirement.d.ts +35 -0
  158. package/dist/types/api-model/models/invoice-response.d.ts +18 -0
  159. package/dist/types/api-model/models/line-item-with-reason.d.ts +27 -0
  160. package/dist/types/api-model/models/line-item.d.ts +24 -0
  161. package/dist/types/api-model/models/marketplace-attributes.d.ts +37 -0
  162. package/dist/types/api-model/models/model-error.d.ts +28 -0
  163. package/dist/types/api-model/models/original-line-item.d.ts +29 -0
  164. package/dist/types/api-model/models/package-delivery-status.d.ts +24 -0
  165. package/dist/types/api-model/models/package-dimensions.d.ts +20 -0
  166. package/dist/types/api-model/models/package-line-item.d.ts +38 -0
  167. package/dist/types/api-model/models/package-ship-label.d.ts +27 -0
  168. package/dist/types/api-model/models/package-status.d.ts +23 -0
  169. package/dist/types/api-model/models/package-sub-status.d.ts +21 -0
  170. package/dist/types/api-model/models/package.d.ts +56 -0
  171. package/dist/types/api-model/models/packages.d.ts +21 -0
  172. package/dist/types/api-model/models/packing-slip-requirement.d.ts +34 -0
  173. package/dist/types/api-model/models/pagination.d.ts +20 -0
  174. package/dist/types/api-model/models/party-identification-info.d.ts +35 -0
  175. package/dist/types/api-model/models/piece-type.d.ts +19 -0
  176. package/dist/types/api-model/models/presence-status.d.ts +19 -0
  177. package/dist/types/api-model/models/priority.d.ts +19 -0
  178. package/dist/types/api-model/models/recommended-package-line-item.d.ts +20 -0
  179. package/dist/types/api-model/models/recommended-package.d.ts +25 -0
  180. package/dist/types/api-model/models/replaced-shipment-info.d.ts +31 -0
  181. package/dist/types/api-model/models/requirement-level.d.ts +19 -0
  182. package/dist/types/api-model/models/ship-label-metadata.d.ts +31 -0
  183. package/dist/types/api-model/models/ship-labels-input.d.ts +22 -0
  184. package/dist/types/api-model/models/ship-labels-response.d.ts +21 -0
  185. package/dist/types/api-model/models/shipment-acknowledgement-request.d.ts +25 -0
  186. package/dist/types/api-model/models/shipment-info.d.ts +55 -0
  187. package/dist/types/api-model/models/shipment-line-item.d.ts +75 -0
  188. package/dist/types/api-model/models/shipment-requirements.d.ts +20 -0
  189. package/dist/types/api-model/models/shipment.d.ts +104 -0
  190. package/dist/types/api-model/models/shipments-response.d.ts +23 -0
  191. package/dist/types/api-model/models/shipping-info.d.ts +40 -0
  192. package/dist/types/api-model/models/shipping-options-response.d.ts +22 -0
  193. package/dist/types/api-model/models/shipping-options.d.ts +38 -0
  194. package/dist/types/api-model/models/status.d.ts +19 -0
  195. package/dist/types/api-model/models/tax-registration-info.d.ts +35 -0
  196. package/dist/types/api-model/models/tax.d.ts +38 -0
  197. package/dist/types/api-model/models/time-window.d.ts +33 -0
  198. package/dist/types/api-model/models/weight.d.ts +29 -0
  199. package/dist/types/client.d.ts +6 -0
  200. package/dist/types/index.d.ts +3 -0
  201. package/package.json +44 -0
@@ -0,0 +1,766 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * The Selling Partner API for Amazon External Fulfillment Shipments Processing
6
+ * You can use the External Fulfillment Shipments API to retrieve, manage, and track shipments processed through Amazon\'s external fulfillment network. Use this API to get shipment details, monitor status changes, and access fulfillment requirements.
7
+ *
8
+ * The version of the OpenAPI document: 2024-09-11
9
+ * Contact: marketplaceapitest@amazon.com
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.UpdatePackageStatusStatusEnum = exports.ProcessShipmentOperationEnum = exports.GetShipmentsStatusEnum = exports.GenerateShipLabelsOperationEnum = exports.ExternalFulfillmentShipmentsApi = exports.ExternalFulfillmentShipmentsApiFactory = exports.ExternalFulfillmentShipmentsApiFp = exports.ExternalFulfillmentShipmentsApiAxiosParamCreator = 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
+ * ExternalFulfillmentShipmentsApi - axios parameter creator
28
+ */
29
+ const ExternalFulfillmentShipmentsApiAxiosParamCreator = function (configuration) {
30
+ return {
31
+ /**
32
+ * Provide details about the packages in the specified shipment.
33
+ * @param {string} shipmentId The ID of the shipment.
34
+ * @param {Packages} body A list of packages in the shipment.
35
+ * @param {*} [options] Override http request option.
36
+ * @throws {RequiredError}
37
+ */
38
+ createPackages: async (shipmentId, body, options = {}) => {
39
+ // verify required parameter 'shipmentId' is not null or undefined
40
+ (0, common_1.assertParamExists)('createPackages', 'shipmentId', shipmentId);
41
+ // verify required parameter 'body' is not null or undefined
42
+ (0, common_1.assertParamExists)('createPackages', 'body', body);
43
+ const localVarPath = `/externalFulfillment/2024-09-11/shipments/{shipmentId}/packages`
44
+ .replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId)));
45
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
46
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
47
+ let baseOptions;
48
+ if (configuration) {
49
+ baseOptions = configuration.baseOptions;
50
+ }
51
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
52
+ const localVarHeaderParameter = {};
53
+ const localVarQueryParameter = {};
54
+ localVarHeaderParameter['Content-Type'] = 'application/json';
55
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
56
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
57
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
58
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
59
+ return {
60
+ url: (0, common_1.toPathString)(localVarUrlObj),
61
+ options: localVarRequestOptions,
62
+ };
63
+ },
64
+ /**
65
+ * Get invoices for the shipment you specify.
66
+ * @param {string} shipmentId The ID of the shipment whose invoice you want.
67
+ * @param {*} [options] Override http request option.
68
+ * @throws {RequiredError}
69
+ */
70
+ generateInvoice: async (shipmentId, options = {}) => {
71
+ // verify required parameter 'shipmentId' is not null or undefined
72
+ (0, common_1.assertParamExists)('generateInvoice', 'shipmentId', shipmentId);
73
+ const localVarPath = `/externalFulfillment/2024-09-11/shipments/{shipmentId}/invoice`
74
+ .replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId)));
75
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
76
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
77
+ let baseOptions;
78
+ if (configuration) {
79
+ baseOptions = configuration.baseOptions;
80
+ }
81
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
82
+ const localVarHeaderParameter = {};
83
+ const localVarQueryParameter = {};
84
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
85
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
86
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
87
+ return {
88
+ url: (0, common_1.toPathString)(localVarUrlObj),
89
+ options: localVarRequestOptions,
90
+ };
91
+ },
92
+ /**
93
+ * Generate and retrieve all shipping labels for one or more packages in the shipment you specify.
94
+ * @param {string} shipmentId The ID of the shipment whose shipping labels you want to generate and retrieve.
95
+ * @param {GenerateShipLabelsOperationEnum} operation Specify whether you want to generate or regenerate a label.
96
+ * @param {string} [shippingOptionId] The ID of the shipping option whose shipping labels you want.
97
+ * @param {ShipLabelsInput} [body] Shipping details for when shipping is not done by the marketplace channel.
98
+ * @param {*} [options] Override http request option.
99
+ * @throws {RequiredError}
100
+ */
101
+ generateShipLabels: async (shipmentId, operation, shippingOptionId, body, options = {}) => {
102
+ // verify required parameter 'shipmentId' is not null or undefined
103
+ (0, common_1.assertParamExists)('generateShipLabels', 'shipmentId', shipmentId);
104
+ // verify required parameter 'operation' is not null or undefined
105
+ (0, common_1.assertParamExists)('generateShipLabels', 'operation', operation);
106
+ const localVarPath = `/externalFulfillment/2024-09-11/shipments/{shipmentId}/shipLabels`
107
+ .replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId)));
108
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
109
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
110
+ let baseOptions;
111
+ if (configuration) {
112
+ baseOptions = configuration.baseOptions;
113
+ }
114
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options };
115
+ const localVarHeaderParameter = {};
116
+ const localVarQueryParameter = {};
117
+ if (shippingOptionId !== undefined) {
118
+ localVarQueryParameter['shippingOptionId'] = shippingOptionId;
119
+ }
120
+ if (operation !== undefined) {
121
+ localVarQueryParameter['operation'] = operation;
122
+ }
123
+ localVarHeaderParameter['Content-Type'] = 'application/json';
124
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
125
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
126
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
127
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
128
+ return {
129
+ url: (0, common_1.toPathString)(localVarUrlObj),
130
+ options: localVarRequestOptions,
131
+ };
132
+ },
133
+ /**
134
+ * Get a single shipment with the ID you specify.
135
+ * @param {string} shipmentId The ID of the shipment you want to retrieve.
136
+ * @param {*} [options] Override http request option.
137
+ * @throws {RequiredError}
138
+ */
139
+ getShipment: async (shipmentId, options = {}) => {
140
+ // verify required parameter 'shipmentId' is not null or undefined
141
+ (0, common_1.assertParamExists)('getShipment', 'shipmentId', shipmentId);
142
+ const localVarPath = `/externalFulfillment/2024-09-11/shipments/{shipmentId}`
143
+ .replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId)));
144
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
145
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
146
+ let baseOptions;
147
+ if (configuration) {
148
+ baseOptions = configuration.baseOptions;
149
+ }
150
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
151
+ const localVarHeaderParameter = {};
152
+ const localVarQueryParameter = {};
153
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
154
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
155
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
156
+ return {
157
+ url: (0, common_1.toPathString)(localVarUrlObj),
158
+ options: localVarRequestOptions,
159
+ };
160
+ },
161
+ /**
162
+ * Get a list of shipments created for the seller in the status you specify. Shipments can be further filtered based on the fulfillment node or the time of the shipments\' last update.
163
+ * @param {GetShipmentsStatusEnum} status The status of shipment you want to include in the response. To retrieve all new shipments, set this value to `ACCEPTED`.
164
+ * @param {string} [locationId] The Amazon channel location identifier for the shipments you want to retrieve.
165
+ * @param {string} [marketplaceId] The marketplace ID associated with the location. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
166
+ * @param {string} [channelName] The channel name associated with the location.
167
+ * @param {string} [lastUpdatedAfter] The response includes shipments whose latest update is after the specified time. In [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
168
+ * @param {string} [lastUpdatedBefore] The response includes shipments whose latest update is before the specified time. In [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
169
+ * @param {number} [maxResults] The maximum number of shipments to include in the response.
170
+ * @param {string} [paginationToken] A token that you use to retrieve the next page of results. The response includes `nextToken` when there are multiple pages of results. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until `nextToken` is null. Note that this operation can return empty pages.
171
+ * @param {*} [options] Override http request option.
172
+ * @throws {RequiredError}
173
+ */
174
+ getShipments: async (status, locationId, marketplaceId, channelName, lastUpdatedAfter, lastUpdatedBefore, maxResults, paginationToken, options = {}) => {
175
+ // verify required parameter 'status' is not null or undefined
176
+ (0, common_1.assertParamExists)('getShipments', 'status', status);
177
+ const localVarPath = `/externalFulfillment/2024-09-11/shipments`;
178
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
179
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
180
+ let baseOptions;
181
+ if (configuration) {
182
+ baseOptions = configuration.baseOptions;
183
+ }
184
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
185
+ const localVarHeaderParameter = {};
186
+ const localVarQueryParameter = {};
187
+ if (locationId !== undefined) {
188
+ localVarQueryParameter['locationId'] = locationId;
189
+ }
190
+ if (marketplaceId !== undefined) {
191
+ localVarQueryParameter['marketplaceId'] = marketplaceId;
192
+ }
193
+ if (channelName !== undefined) {
194
+ localVarQueryParameter['channelName'] = channelName;
195
+ }
196
+ if (status !== undefined) {
197
+ localVarQueryParameter['status'] = status;
198
+ }
199
+ if (lastUpdatedAfter !== undefined) {
200
+ localVarQueryParameter['lastUpdatedAfter'] = (lastUpdatedAfter instanceof Date) ?
201
+ lastUpdatedAfter.toISOString() :
202
+ lastUpdatedAfter;
203
+ }
204
+ if (lastUpdatedBefore !== undefined) {
205
+ localVarQueryParameter['lastUpdatedBefore'] = (lastUpdatedBefore instanceof Date) ?
206
+ lastUpdatedBefore.toISOString() :
207
+ lastUpdatedBefore;
208
+ }
209
+ if (maxResults !== undefined) {
210
+ localVarQueryParameter['maxResults'] = maxResults;
211
+ }
212
+ if (paginationToken !== undefined) {
213
+ localVarQueryParameter['paginationToken'] = paginationToken;
214
+ }
215
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
216
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
217
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
218
+ return {
219
+ url: (0, common_1.toPathString)(localVarUrlObj),
220
+ options: localVarRequestOptions,
221
+ };
222
+ },
223
+ /**
224
+ * Confirm or reject the specified shipment.
225
+ * @param {string} shipmentId The ID of the shipment you want to confirm or reject.
226
+ * @param {ProcessShipmentOperationEnum} operation The status of the shipment.
227
+ * @param {ShipmentAcknowledgementRequest} [body] Information about the shipment and its line items.
228
+ * @param {*} [options] Override http request option.
229
+ * @throws {RequiredError}
230
+ */
231
+ processShipment: async (shipmentId, operation, body, options = {}) => {
232
+ // verify required parameter 'shipmentId' is not null or undefined
233
+ (0, common_1.assertParamExists)('processShipment', 'shipmentId', shipmentId);
234
+ // verify required parameter 'operation' is not null or undefined
235
+ (0, common_1.assertParamExists)('processShipment', 'operation', operation);
236
+ const localVarPath = `/externalFulfillment/2024-09-11/shipments/{shipmentId}`
237
+ .replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId)));
238
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
239
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
240
+ let baseOptions;
241
+ if (configuration) {
242
+ baseOptions = configuration.baseOptions;
243
+ }
244
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
245
+ const localVarHeaderParameter = {};
246
+ const localVarQueryParameter = {};
247
+ if (operation !== undefined) {
248
+ localVarQueryParameter['operation'] = operation;
249
+ }
250
+ localVarHeaderParameter['Content-Type'] = 'application/json';
251
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
252
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
253
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
254
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
255
+ return {
256
+ url: (0, common_1.toPathString)(localVarUrlObj),
257
+ options: localVarRequestOptions,
258
+ };
259
+ },
260
+ /**
261
+ * Retrieve invoices for the shipment you specify.
262
+ * @param {string} shipmentId The ID of the shipment whose invoice you want to retrieve.
263
+ * @param {*} [options] Override http request option.
264
+ * @throws {RequiredError}
265
+ */
266
+ retrieveInvoice: async (shipmentId, options = {}) => {
267
+ // verify required parameter 'shipmentId' is not null or undefined
268
+ (0, common_1.assertParamExists)('retrieveInvoice', 'shipmentId', shipmentId);
269
+ const localVarPath = `/externalFulfillment/2024-09-11/shipments/{shipmentId}/invoice`
270
+ .replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId)));
271
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
272
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
273
+ let baseOptions;
274
+ if (configuration) {
275
+ baseOptions = configuration.baseOptions;
276
+ }
277
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
278
+ const localVarHeaderParameter = {};
279
+ const localVarQueryParameter = {};
280
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
281
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
282
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
283
+ return {
284
+ url: (0, common_1.toPathString)(localVarUrlObj),
285
+ options: localVarRequestOptions,
286
+ };
287
+ },
288
+ /**
289
+ * Get a list of shipping options for a package in a shipment given the shipment\'s marketplace and channel. If the marketplace and channel have a pre-determined shipping option, then this operation returns an empty response.
290
+ * @param {string} shipmentId The ID of the shipment to which the package belongs.
291
+ * @param {string} packageId The ID of the package for which you want to retrieve shipping options.
292
+ * @param {*} [options] Override http request option.
293
+ * @throws {RequiredError}
294
+ */
295
+ retrieveShippingOptions: async (shipmentId, packageId, options = {}) => {
296
+ // verify required parameter 'shipmentId' is not null or undefined
297
+ (0, common_1.assertParamExists)('retrieveShippingOptions', 'shipmentId', shipmentId);
298
+ // verify required parameter 'packageId' is not null or undefined
299
+ (0, common_1.assertParamExists)('retrieveShippingOptions', 'packageId', packageId);
300
+ const localVarPath = `/externalFulfillment/2024-09-11/shipments/{shipmentId}/shippingOptions`
301
+ .replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId)));
302
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
303
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
304
+ let baseOptions;
305
+ if (configuration) {
306
+ baseOptions = configuration.baseOptions;
307
+ }
308
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
309
+ const localVarHeaderParameter = {};
310
+ const localVarQueryParameter = {};
311
+ if (packageId !== undefined) {
312
+ localVarQueryParameter['packageId'] = packageId;
313
+ }
314
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
315
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
316
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
317
+ return {
318
+ url: (0, common_1.toPathString)(localVarUrlObj),
319
+ options: localVarRequestOptions,
320
+ };
321
+ },
322
+ /**
323
+ * Updates the details about the packages that will be used to fulfill the specified shipment.
324
+ * @param {string} shipmentId The ID of the shipment to which the package belongs.
325
+ * @param {string} packageId The ID of the package whose information you want to update.
326
+ * @param {Package} body The body of the request.
327
+ * @param {*} [options] Override http request option.
328
+ * @throws {RequiredError}
329
+ */
330
+ updatePackage: async (shipmentId, packageId, body, options = {}) => {
331
+ // verify required parameter 'shipmentId' is not null or undefined
332
+ (0, common_1.assertParamExists)('updatePackage', 'shipmentId', shipmentId);
333
+ // verify required parameter 'packageId' is not null or undefined
334
+ (0, common_1.assertParamExists)('updatePackage', 'packageId', packageId);
335
+ // verify required parameter 'body' is not null or undefined
336
+ (0, common_1.assertParamExists)('updatePackage', 'body', body);
337
+ const localVarPath = `/externalFulfillment/2024-09-11/shipments/{shipmentId}/packages/{packageId}`
338
+ .replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId)))
339
+ .replace(`{${"packageId"}}`, encodeURIComponent(String(packageId)));
340
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
341
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
342
+ let baseOptions;
343
+ if (configuration) {
344
+ baseOptions = configuration.baseOptions;
345
+ }
346
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options };
347
+ const localVarHeaderParameter = {};
348
+ const localVarQueryParameter = {};
349
+ localVarHeaderParameter['Content-Type'] = 'application/json';
350
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
351
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
352
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
353
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
354
+ return {
355
+ url: (0, common_1.toPathString)(localVarUrlObj),
356
+ options: localVarRequestOptions,
357
+ };
358
+ },
359
+ /**
360
+ * Updates the status of the packages.
361
+ * @param {string} shipmentId The ID of the shipment to which the package belongs.
362
+ * @param {string} packageId The ID of the package whose status you want to update.
363
+ * @param {UpdatePackageStatusStatusEnum} [status] **DEPRECATED**. Do not use. Package status is defined in the body parameter.
364
+ * @param {PackageDeliveryStatus} [body] The body of the request.
365
+ * @param {*} [options] Override http request option.
366
+ * @throws {RequiredError}
367
+ */
368
+ updatePackageStatus: async (shipmentId, packageId, status, body, options = {}) => {
369
+ // verify required parameter 'shipmentId' is not null or undefined
370
+ (0, common_1.assertParamExists)('updatePackageStatus', 'shipmentId', shipmentId);
371
+ // verify required parameter 'packageId' is not null or undefined
372
+ (0, common_1.assertParamExists)('updatePackageStatus', 'packageId', packageId);
373
+ const localVarPath = `/externalFulfillment/2024-09-11/shipments/{shipmentId}/packages/{packageId}`
374
+ .replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId)))
375
+ .replace(`{${"packageId"}}`, encodeURIComponent(String(packageId)));
376
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
377
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
378
+ let baseOptions;
379
+ if (configuration) {
380
+ baseOptions = configuration.baseOptions;
381
+ }
382
+ const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options };
383
+ const localVarHeaderParameter = {};
384
+ const localVarQueryParameter = {};
385
+ if (status !== undefined) {
386
+ localVarQueryParameter['status'] = status;
387
+ }
388
+ localVarHeaderParameter['Content-Type'] = 'application/json';
389
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
390
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
391
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
392
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
393
+ return {
394
+ url: (0, common_1.toPathString)(localVarUrlObj),
395
+ options: localVarRequestOptions,
396
+ };
397
+ },
398
+ };
399
+ };
400
+ exports.ExternalFulfillmentShipmentsApiAxiosParamCreator = ExternalFulfillmentShipmentsApiAxiosParamCreator;
401
+ /**
402
+ * ExternalFulfillmentShipmentsApi - functional programming interface
403
+ */
404
+ const ExternalFulfillmentShipmentsApiFp = function (configuration) {
405
+ const localVarAxiosParamCreator = (0, exports.ExternalFulfillmentShipmentsApiAxiosParamCreator)(configuration);
406
+ return {
407
+ /**
408
+ * Provide details about the packages in the specified shipment.
409
+ * @param {string} shipmentId The ID of the shipment.
410
+ * @param {Packages} body A list of packages in the shipment.
411
+ * @param {*} [options] Override http request option.
412
+ * @throws {RequiredError}
413
+ */
414
+ async createPackages(shipmentId, body, options) {
415
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createPackages(shipmentId, body, options);
416
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
417
+ const localVarOperationServerBasePath = base_1.operationServerMap['ExternalFulfillmentShipmentsApi.createPackages']?.[localVarOperationServerIndex]?.url;
418
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
419
+ },
420
+ /**
421
+ * Get invoices for the shipment you specify.
422
+ * @param {string} shipmentId The ID of the shipment whose invoice you want.
423
+ * @param {*} [options] Override http request option.
424
+ * @throws {RequiredError}
425
+ */
426
+ async generateInvoice(shipmentId, options) {
427
+ const localVarAxiosArgs = await localVarAxiosParamCreator.generateInvoice(shipmentId, options);
428
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
429
+ const localVarOperationServerBasePath = base_1.operationServerMap['ExternalFulfillmentShipmentsApi.generateInvoice']?.[localVarOperationServerIndex]?.url;
430
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
431
+ },
432
+ /**
433
+ * Generate and retrieve all shipping labels for one or more packages in the shipment you specify.
434
+ * @param {string} shipmentId The ID of the shipment whose shipping labels you want to generate and retrieve.
435
+ * @param {GenerateShipLabelsOperationEnum} operation Specify whether you want to generate or regenerate a label.
436
+ * @param {string} [shippingOptionId] The ID of the shipping option whose shipping labels you want.
437
+ * @param {ShipLabelsInput} [body] Shipping details for when shipping is not done by the marketplace channel.
438
+ * @param {*} [options] Override http request option.
439
+ * @throws {RequiredError}
440
+ */
441
+ async generateShipLabels(shipmentId, operation, shippingOptionId, body, options) {
442
+ const localVarAxiosArgs = await localVarAxiosParamCreator.generateShipLabels(shipmentId, operation, shippingOptionId, body, options);
443
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
444
+ const localVarOperationServerBasePath = base_1.operationServerMap['ExternalFulfillmentShipmentsApi.generateShipLabels']?.[localVarOperationServerIndex]?.url;
445
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
446
+ },
447
+ /**
448
+ * Get a single shipment with the ID you specify.
449
+ * @param {string} shipmentId The ID of the shipment you want to retrieve.
450
+ * @param {*} [options] Override http request option.
451
+ * @throws {RequiredError}
452
+ */
453
+ async getShipment(shipmentId, options) {
454
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getShipment(shipmentId, options);
455
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
456
+ const localVarOperationServerBasePath = base_1.operationServerMap['ExternalFulfillmentShipmentsApi.getShipment']?.[localVarOperationServerIndex]?.url;
457
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
458
+ },
459
+ /**
460
+ * Get a list of shipments created for the seller in the status you specify. Shipments can be further filtered based on the fulfillment node or the time of the shipments\' last update.
461
+ * @param {GetShipmentsStatusEnum} status The status of shipment you want to include in the response. To retrieve all new shipments, set this value to `ACCEPTED`.
462
+ * @param {string} [locationId] The Amazon channel location identifier for the shipments you want to retrieve.
463
+ * @param {string} [marketplaceId] The marketplace ID associated with the location. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
464
+ * @param {string} [channelName] The channel name associated with the location.
465
+ * @param {string} [lastUpdatedAfter] The response includes shipments whose latest update is after the specified time. In [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
466
+ * @param {string} [lastUpdatedBefore] The response includes shipments whose latest update is before the specified time. In [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
467
+ * @param {number} [maxResults] The maximum number of shipments to include in the response.
468
+ * @param {string} [paginationToken] A token that you use to retrieve the next page of results. The response includes `nextToken` when there are multiple pages of results. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until `nextToken` is null. Note that this operation can return empty pages.
469
+ * @param {*} [options] Override http request option.
470
+ * @throws {RequiredError}
471
+ */
472
+ async getShipments(status, locationId, marketplaceId, channelName, lastUpdatedAfter, lastUpdatedBefore, maxResults, paginationToken, options) {
473
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getShipments(status, locationId, marketplaceId, channelName, lastUpdatedAfter, lastUpdatedBefore, maxResults, paginationToken, options);
474
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
475
+ const localVarOperationServerBasePath = base_1.operationServerMap['ExternalFulfillmentShipmentsApi.getShipments']?.[localVarOperationServerIndex]?.url;
476
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
477
+ },
478
+ /**
479
+ * Confirm or reject the specified shipment.
480
+ * @param {string} shipmentId The ID of the shipment you want to confirm or reject.
481
+ * @param {ProcessShipmentOperationEnum} operation The status of the shipment.
482
+ * @param {ShipmentAcknowledgementRequest} [body] Information about the shipment and its line items.
483
+ * @param {*} [options] Override http request option.
484
+ * @throws {RequiredError}
485
+ */
486
+ async processShipment(shipmentId, operation, body, options) {
487
+ const localVarAxiosArgs = await localVarAxiosParamCreator.processShipment(shipmentId, operation, body, options);
488
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
489
+ const localVarOperationServerBasePath = base_1.operationServerMap['ExternalFulfillmentShipmentsApi.processShipment']?.[localVarOperationServerIndex]?.url;
490
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
491
+ },
492
+ /**
493
+ * Retrieve invoices for the shipment you specify.
494
+ * @param {string} shipmentId The ID of the shipment whose invoice you want to retrieve.
495
+ * @param {*} [options] Override http request option.
496
+ * @throws {RequiredError}
497
+ */
498
+ async retrieveInvoice(shipmentId, options) {
499
+ const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveInvoice(shipmentId, options);
500
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
501
+ const localVarOperationServerBasePath = base_1.operationServerMap['ExternalFulfillmentShipmentsApi.retrieveInvoice']?.[localVarOperationServerIndex]?.url;
502
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
503
+ },
504
+ /**
505
+ * Get a list of shipping options for a package in a shipment given the shipment\'s marketplace and channel. If the marketplace and channel have a pre-determined shipping option, then this operation returns an empty response.
506
+ * @param {string} shipmentId The ID of the shipment to which the package belongs.
507
+ * @param {string} packageId The ID of the package for which you want to retrieve shipping options.
508
+ * @param {*} [options] Override http request option.
509
+ * @throws {RequiredError}
510
+ */
511
+ async retrieveShippingOptions(shipmentId, packageId, options) {
512
+ const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveShippingOptions(shipmentId, packageId, options);
513
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
514
+ const localVarOperationServerBasePath = base_1.operationServerMap['ExternalFulfillmentShipmentsApi.retrieveShippingOptions']?.[localVarOperationServerIndex]?.url;
515
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
516
+ },
517
+ /**
518
+ * Updates the details about the packages that will be used to fulfill the specified shipment.
519
+ * @param {string} shipmentId The ID of the shipment to which the package belongs.
520
+ * @param {string} packageId The ID of the package whose information you want to update.
521
+ * @param {Package} body The body of the request.
522
+ * @param {*} [options] Override http request option.
523
+ * @throws {RequiredError}
524
+ */
525
+ async updatePackage(shipmentId, packageId, body, options) {
526
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updatePackage(shipmentId, packageId, body, options);
527
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
528
+ const localVarOperationServerBasePath = base_1.operationServerMap['ExternalFulfillmentShipmentsApi.updatePackage']?.[localVarOperationServerIndex]?.url;
529
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
530
+ },
531
+ /**
532
+ * Updates the status of the packages.
533
+ * @param {string} shipmentId The ID of the shipment to which the package belongs.
534
+ * @param {string} packageId The ID of the package whose status you want to update.
535
+ * @param {UpdatePackageStatusStatusEnum} [status] **DEPRECATED**. Do not use. Package status is defined in the body parameter.
536
+ * @param {PackageDeliveryStatus} [body] The body of the request.
537
+ * @param {*} [options] Override http request option.
538
+ * @throws {RequiredError}
539
+ */
540
+ async updatePackageStatus(shipmentId, packageId, status, body, options) {
541
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updatePackageStatus(shipmentId, packageId, status, body, options);
542
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
543
+ const localVarOperationServerBasePath = base_1.operationServerMap['ExternalFulfillmentShipmentsApi.updatePackageStatus']?.[localVarOperationServerIndex]?.url;
544
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
545
+ },
546
+ };
547
+ };
548
+ exports.ExternalFulfillmentShipmentsApiFp = ExternalFulfillmentShipmentsApiFp;
549
+ /**
550
+ * ExternalFulfillmentShipmentsApi - factory interface
551
+ */
552
+ const ExternalFulfillmentShipmentsApiFactory = function (configuration, basePath, axios) {
553
+ const localVarFp = (0, exports.ExternalFulfillmentShipmentsApiFp)(configuration);
554
+ return {
555
+ /**
556
+ * Provide details about the packages in the specified shipment.
557
+ * @param {ExternalFulfillmentShipmentsApiCreatePackagesRequest} requestParameters Request parameters.
558
+ * @param {*} [options] Override http request option.
559
+ * @throws {RequiredError}
560
+ */
561
+ createPackages(requestParameters, options) {
562
+ return localVarFp.createPackages(requestParameters.shipmentId, requestParameters.body, options).then((request) => request(axios, basePath));
563
+ },
564
+ /**
565
+ * Get invoices for the shipment you specify.
566
+ * @param {ExternalFulfillmentShipmentsApiGenerateInvoiceRequest} requestParameters Request parameters.
567
+ * @param {*} [options] Override http request option.
568
+ * @throws {RequiredError}
569
+ */
570
+ generateInvoice(requestParameters, options) {
571
+ return localVarFp.generateInvoice(requestParameters.shipmentId, options).then((request) => request(axios, basePath));
572
+ },
573
+ /**
574
+ * Generate and retrieve all shipping labels for one or more packages in the shipment you specify.
575
+ * @param {ExternalFulfillmentShipmentsApiGenerateShipLabelsRequest} requestParameters Request parameters.
576
+ * @param {*} [options] Override http request option.
577
+ * @throws {RequiredError}
578
+ */
579
+ generateShipLabels(requestParameters, options) {
580
+ return localVarFp.generateShipLabels(requestParameters.shipmentId, requestParameters.operation, requestParameters.shippingOptionId, requestParameters.body, options).then((request) => request(axios, basePath));
581
+ },
582
+ /**
583
+ * Get a single shipment with the ID you specify.
584
+ * @param {ExternalFulfillmentShipmentsApiGetShipmentRequest} requestParameters Request parameters.
585
+ * @param {*} [options] Override http request option.
586
+ * @throws {RequiredError}
587
+ */
588
+ getShipment(requestParameters, options) {
589
+ return localVarFp.getShipment(requestParameters.shipmentId, options).then((request) => request(axios, basePath));
590
+ },
591
+ /**
592
+ * Get a list of shipments created for the seller in the status you specify. Shipments can be further filtered based on the fulfillment node or the time of the shipments\' last update.
593
+ * @param {ExternalFulfillmentShipmentsApiGetShipmentsRequest} requestParameters Request parameters.
594
+ * @param {*} [options] Override http request option.
595
+ * @throws {RequiredError}
596
+ */
597
+ getShipments(requestParameters, options) {
598
+ return localVarFp.getShipments(requestParameters.status, requestParameters.locationId, requestParameters.marketplaceId, requestParameters.channelName, requestParameters.lastUpdatedAfter, requestParameters.lastUpdatedBefore, requestParameters.maxResults, requestParameters.paginationToken, options).then((request) => request(axios, basePath));
599
+ },
600
+ /**
601
+ * Confirm or reject the specified shipment.
602
+ * @param {ExternalFulfillmentShipmentsApiProcessShipmentRequest} requestParameters Request parameters.
603
+ * @param {*} [options] Override http request option.
604
+ * @throws {RequiredError}
605
+ */
606
+ processShipment(requestParameters, options) {
607
+ return localVarFp.processShipment(requestParameters.shipmentId, requestParameters.operation, requestParameters.body, options).then((request) => request(axios, basePath));
608
+ },
609
+ /**
610
+ * Retrieve invoices for the shipment you specify.
611
+ * @param {ExternalFulfillmentShipmentsApiRetrieveInvoiceRequest} requestParameters Request parameters.
612
+ * @param {*} [options] Override http request option.
613
+ * @throws {RequiredError}
614
+ */
615
+ retrieveInvoice(requestParameters, options) {
616
+ return localVarFp.retrieveInvoice(requestParameters.shipmentId, options).then((request) => request(axios, basePath));
617
+ },
618
+ /**
619
+ * Get a list of shipping options for a package in a shipment given the shipment\'s marketplace and channel. If the marketplace and channel have a pre-determined shipping option, then this operation returns an empty response.
620
+ * @param {ExternalFulfillmentShipmentsApiRetrieveShippingOptionsRequest} requestParameters Request parameters.
621
+ * @param {*} [options] Override http request option.
622
+ * @throws {RequiredError}
623
+ */
624
+ retrieveShippingOptions(requestParameters, options) {
625
+ return localVarFp.retrieveShippingOptions(requestParameters.shipmentId, requestParameters.packageId, options).then((request) => request(axios, basePath));
626
+ },
627
+ /**
628
+ * Updates the details about the packages that will be used to fulfill the specified shipment.
629
+ * @param {ExternalFulfillmentShipmentsApiUpdatePackageRequest} requestParameters Request parameters.
630
+ * @param {*} [options] Override http request option.
631
+ * @throws {RequiredError}
632
+ */
633
+ updatePackage(requestParameters, options) {
634
+ return localVarFp.updatePackage(requestParameters.shipmentId, requestParameters.packageId, requestParameters.body, options).then((request) => request(axios, basePath));
635
+ },
636
+ /**
637
+ * Updates the status of the packages.
638
+ * @param {ExternalFulfillmentShipmentsApiUpdatePackageStatusRequest} requestParameters Request parameters.
639
+ * @param {*} [options] Override http request option.
640
+ * @throws {RequiredError}
641
+ */
642
+ updatePackageStatus(requestParameters, options) {
643
+ return localVarFp.updatePackageStatus(requestParameters.shipmentId, requestParameters.packageId, requestParameters.status, requestParameters.body, options).then((request) => request(axios, basePath));
644
+ },
645
+ };
646
+ };
647
+ exports.ExternalFulfillmentShipmentsApiFactory = ExternalFulfillmentShipmentsApiFactory;
648
+ /**
649
+ * ExternalFulfillmentShipmentsApi - object-oriented interface
650
+ */
651
+ class ExternalFulfillmentShipmentsApi extends base_1.BaseAPI {
652
+ /**
653
+ * Provide details about the packages in the specified shipment.
654
+ * @param {ExternalFulfillmentShipmentsApiCreatePackagesRequest} requestParameters Request parameters.
655
+ * @param {*} [options] Override http request option.
656
+ * @throws {RequiredError}
657
+ */
658
+ createPackages(requestParameters, options) {
659
+ return (0, exports.ExternalFulfillmentShipmentsApiFp)(this.configuration).createPackages(requestParameters.shipmentId, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
660
+ }
661
+ /**
662
+ * Get invoices for the shipment you specify.
663
+ * @param {ExternalFulfillmentShipmentsApiGenerateInvoiceRequest} requestParameters Request parameters.
664
+ * @param {*} [options] Override http request option.
665
+ * @throws {RequiredError}
666
+ */
667
+ generateInvoice(requestParameters, options) {
668
+ return (0, exports.ExternalFulfillmentShipmentsApiFp)(this.configuration).generateInvoice(requestParameters.shipmentId, options).then((request) => request(this.axios, this.basePath));
669
+ }
670
+ /**
671
+ * Generate and retrieve all shipping labels for one or more packages in the shipment you specify.
672
+ * @param {ExternalFulfillmentShipmentsApiGenerateShipLabelsRequest} requestParameters Request parameters.
673
+ * @param {*} [options] Override http request option.
674
+ * @throws {RequiredError}
675
+ */
676
+ generateShipLabels(requestParameters, options) {
677
+ return (0, exports.ExternalFulfillmentShipmentsApiFp)(this.configuration).generateShipLabels(requestParameters.shipmentId, requestParameters.operation, requestParameters.shippingOptionId, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
678
+ }
679
+ /**
680
+ * Get a single shipment with the ID you specify.
681
+ * @param {ExternalFulfillmentShipmentsApiGetShipmentRequest} requestParameters Request parameters.
682
+ * @param {*} [options] Override http request option.
683
+ * @throws {RequiredError}
684
+ */
685
+ getShipment(requestParameters, options) {
686
+ return (0, exports.ExternalFulfillmentShipmentsApiFp)(this.configuration).getShipment(requestParameters.shipmentId, options).then((request) => request(this.axios, this.basePath));
687
+ }
688
+ /**
689
+ * Get a list of shipments created for the seller in the status you specify. Shipments can be further filtered based on the fulfillment node or the time of the shipments\' last update.
690
+ * @param {ExternalFulfillmentShipmentsApiGetShipmentsRequest} requestParameters Request parameters.
691
+ * @param {*} [options] Override http request option.
692
+ * @throws {RequiredError}
693
+ */
694
+ getShipments(requestParameters, options) {
695
+ return (0, exports.ExternalFulfillmentShipmentsApiFp)(this.configuration).getShipments(requestParameters.status, requestParameters.locationId, requestParameters.marketplaceId, requestParameters.channelName, requestParameters.lastUpdatedAfter, requestParameters.lastUpdatedBefore, requestParameters.maxResults, requestParameters.paginationToken, options).then((request) => request(this.axios, this.basePath));
696
+ }
697
+ /**
698
+ * Confirm or reject the specified shipment.
699
+ * @param {ExternalFulfillmentShipmentsApiProcessShipmentRequest} requestParameters Request parameters.
700
+ * @param {*} [options] Override http request option.
701
+ * @throws {RequiredError}
702
+ */
703
+ processShipment(requestParameters, options) {
704
+ return (0, exports.ExternalFulfillmentShipmentsApiFp)(this.configuration).processShipment(requestParameters.shipmentId, requestParameters.operation, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
705
+ }
706
+ /**
707
+ * Retrieve invoices for the shipment you specify.
708
+ * @param {ExternalFulfillmentShipmentsApiRetrieveInvoiceRequest} requestParameters Request parameters.
709
+ * @param {*} [options] Override http request option.
710
+ * @throws {RequiredError}
711
+ */
712
+ retrieveInvoice(requestParameters, options) {
713
+ return (0, exports.ExternalFulfillmentShipmentsApiFp)(this.configuration).retrieveInvoice(requestParameters.shipmentId, options).then((request) => request(this.axios, this.basePath));
714
+ }
715
+ /**
716
+ * Get a list of shipping options for a package in a shipment given the shipment\'s marketplace and channel. If the marketplace and channel have a pre-determined shipping option, then this operation returns an empty response.
717
+ * @param {ExternalFulfillmentShipmentsApiRetrieveShippingOptionsRequest} requestParameters Request parameters.
718
+ * @param {*} [options] Override http request option.
719
+ * @throws {RequiredError}
720
+ */
721
+ retrieveShippingOptions(requestParameters, options) {
722
+ return (0, exports.ExternalFulfillmentShipmentsApiFp)(this.configuration).retrieveShippingOptions(requestParameters.shipmentId, requestParameters.packageId, options).then((request) => request(this.axios, this.basePath));
723
+ }
724
+ /**
725
+ * Updates the details about the packages that will be used to fulfill the specified shipment.
726
+ * @param {ExternalFulfillmentShipmentsApiUpdatePackageRequest} requestParameters Request parameters.
727
+ * @param {*} [options] Override http request option.
728
+ * @throws {RequiredError}
729
+ */
730
+ updatePackage(requestParameters, options) {
731
+ return (0, exports.ExternalFulfillmentShipmentsApiFp)(this.configuration).updatePackage(requestParameters.shipmentId, requestParameters.packageId, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
732
+ }
733
+ /**
734
+ * Updates the status of the packages.
735
+ * @param {ExternalFulfillmentShipmentsApiUpdatePackageStatusRequest} requestParameters Request parameters.
736
+ * @param {*} [options] Override http request option.
737
+ * @throws {RequiredError}
738
+ */
739
+ updatePackageStatus(requestParameters, options) {
740
+ return (0, exports.ExternalFulfillmentShipmentsApiFp)(this.configuration).updatePackageStatus(requestParameters.shipmentId, requestParameters.packageId, requestParameters.status, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
741
+ }
742
+ }
743
+ exports.ExternalFulfillmentShipmentsApi = ExternalFulfillmentShipmentsApi;
744
+ exports.GenerateShipLabelsOperationEnum = {
745
+ Generate: 'GENERATE',
746
+ Regenerate: 'REGENERATE'
747
+ };
748
+ exports.GetShipmentsStatusEnum = {
749
+ Created: 'CREATED',
750
+ Accepted: 'ACCEPTED',
751
+ Confirmed: 'CONFIRMED',
752
+ PackageCreated: 'PACKAGE_CREATED',
753
+ PickupSlotRetrieved: 'PICKUP_SLOT_RETRIEVED',
754
+ InvoiceGenerated: 'INVOICE_GENERATED',
755
+ ShiplabelGenerated: 'SHIPLABEL_GENERATED',
756
+ Cancelled: 'CANCELLED',
757
+ Shipped: 'SHIPPED',
758
+ Delivered: 'DELIVERED'
759
+ };
760
+ exports.ProcessShipmentOperationEnum = {
761
+ Confirm: 'CONFIRM',
762
+ Reject: 'REJECT'
763
+ };
764
+ exports.UpdatePackageStatusStatusEnum = {
765
+ Shipped: 'SHIPPED'
766
+ };