@sp-api-sdk/merchant-fulfillment-api-v0 3.1.11 → 4.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 (212) hide show
  1. package/README.md +4 -4
  2. package/dist/index.cjs +775 -0
  3. package/dist/index.cjs.map +1 -0
  4. package/dist/index.d.cts +2022 -0
  5. package/dist/index.d.ts +2022 -0
  6. package/dist/index.js +716 -0
  7. package/dist/index.js.map +1 -0
  8. package/package.json +23 -12
  9. package/dist/cjs/api-model/api/merchant-fulfillment-api.js +0 -355
  10. package/dist/cjs/api-model/api.js +0 -30
  11. package/dist/cjs/api-model/base.js +0 -52
  12. package/dist/cjs/api-model/common.js +0 -123
  13. package/dist/cjs/api-model/configuration.js +0 -98
  14. package/dist/cjs/api-model/index.js +0 -32
  15. package/dist/cjs/api-model/models/additional-inputs.js +0 -15
  16. package/dist/cjs/api-model/models/additional-seller-input.js +0 -15
  17. package/dist/cjs/api-model/models/additional-seller-inputs.js +0 -15
  18. package/dist/cjs/api-model/models/address.js +0 -15
  19. package/dist/cjs/api-model/models/available-carrier-will-pick-up-option.js +0 -15
  20. package/dist/cjs/api-model/models/available-delivery-experience-option.js +0 -15
  21. package/dist/cjs/api-model/models/available-shipping-service-options.js +0 -15
  22. package/dist/cjs/api-model/models/benefits.js +0 -15
  23. package/dist/cjs/api-model/models/cancel-shipment-response.js +0 -15
  24. package/dist/cjs/api-model/models/carrier-will-pick-up-option.js +0 -24
  25. package/dist/cjs/api-model/models/constraint.js +0 -15
  26. package/dist/cjs/api-model/models/create-shipment-request.js +0 -15
  27. package/dist/cjs/api-model/models/create-shipment-response.js +0 -15
  28. package/dist/cjs/api-model/models/currency-amount.js +0 -15
  29. package/dist/cjs/api-model/models/dangerous-goods-details.js +0 -36
  30. package/dist/cjs/api-model/models/delivery-experience-option.js +0 -26
  31. package/dist/cjs/api-model/models/delivery-experience-type.js +0 -25
  32. package/dist/cjs/api-model/models/excluded-benefit.js +0 -15
  33. package/dist/cjs/api-model/models/file-contents.js +0 -15
  34. package/dist/cjs/api-model/models/file-type.js +0 -24
  35. package/dist/cjs/api-model/models/get-additional-seller-inputs-request.js +0 -15
  36. package/dist/cjs/api-model/models/get-additional-seller-inputs-response.js +0 -15
  37. package/dist/cjs/api-model/models/get-additional-seller-inputs-result.js +0 -15
  38. package/dist/cjs/api-model/models/get-eligible-shipment-services-request.js +0 -15
  39. package/dist/cjs/api-model/models/get-eligible-shipment-services-response.js +0 -15
  40. package/dist/cjs/api-model/models/get-eligible-shipment-services-result.js +0 -15
  41. package/dist/cjs/api-model/models/get-shipment-response.js +0 -15
  42. package/dist/cjs/api-model/models/hazmat-type.js +0 -23
  43. package/dist/cjs/api-model/models/index.js +0 -75
  44. package/dist/cjs/api-model/models/input-target-type.js +0 -23
  45. package/dist/cjs/api-model/models/item-level-fields.js +0 -15
  46. package/dist/cjs/api-model/models/item.js +0 -15
  47. package/dist/cjs/api-model/models/label-customization.js +0 -15
  48. package/dist/cjs/api-model/models/label-dimensions.js +0 -15
  49. package/dist/cjs/api-model/models/label-format-option-request.js +0 -15
  50. package/dist/cjs/api-model/models/label-format-option.js +0 -15
  51. package/dist/cjs/api-model/models/label-format.js +0 -26
  52. package/dist/cjs/api-model/models/label.js +0 -15
  53. package/dist/cjs/api-model/models/length.js +0 -15
  54. package/dist/cjs/api-model/models/liquid-volume.js +0 -25
  55. package/dist/cjs/api-model/models/model-error.js +0 -15
  56. package/dist/cjs/api-model/models/package-dimensions.js +0 -15
  57. package/dist/cjs/api-model/models/predefined-package-dimensions.js +0 -71
  58. package/dist/cjs/api-model/models/rate-item-id.js +0 -22
  59. package/dist/cjs/api-model/models/rate-item-type.js +0 -22
  60. package/dist/cjs/api-model/models/rate-item.js +0 -15
  61. package/dist/cjs/api-model/models/rejected-shipping-service.js +0 -15
  62. package/dist/cjs/api-model/models/seller-input-definition.js +0 -15
  63. package/dist/cjs/api-model/models/shipment-request-details.js +0 -15
  64. package/dist/cjs/api-model/models/shipment-status.js +0 -25
  65. package/dist/cjs/api-model/models/shipment.js +0 -15
  66. package/dist/cjs/api-model/models/shipping-offering-filter.js +0 -15
  67. package/dist/cjs/api-model/models/shipping-service-options.js +0 -15
  68. package/dist/cjs/api-model/models/shipping-service.js +0 -15
  69. package/dist/cjs/api-model/models/standard-id-for-label.js +0 -22
  70. package/dist/cjs/api-model/models/temporarily-unavailable-carrier.js +0 -15
  71. package/dist/cjs/api-model/models/terms-and-conditions-not-accepted-carrier.js +0 -15
  72. package/dist/cjs/api-model/models/unit-of-length.js +0 -23
  73. package/dist/cjs/api-model/models/unit-of-weight.js +0 -23
  74. package/dist/cjs/api-model/models/weight.js +0 -15
  75. package/dist/cjs/client.js +0 -49
  76. package/dist/cjs/index.js +0 -19
  77. package/dist/es/api-model/api/merchant-fulfillment-api.js +0 -345
  78. package/dist/es/api-model/api.js +0 -14
  79. package/dist/es/api-model/base.js +0 -44
  80. package/dist/es/api-model/common.js +0 -110
  81. package/dist/es/api-model/configuration.js +0 -94
  82. package/dist/es/api-model/index.js +0 -16
  83. package/dist/es/api-model/models/additional-inputs.js +0 -14
  84. package/dist/es/api-model/models/additional-seller-input.js +0 -14
  85. package/dist/es/api-model/models/additional-seller-inputs.js +0 -14
  86. package/dist/es/api-model/models/address.js +0 -14
  87. package/dist/es/api-model/models/available-carrier-will-pick-up-option.js +0 -14
  88. package/dist/es/api-model/models/available-delivery-experience-option.js +0 -14
  89. package/dist/es/api-model/models/available-shipping-service-options.js +0 -14
  90. package/dist/es/api-model/models/benefits.js +0 -14
  91. package/dist/es/api-model/models/cancel-shipment-response.js +0 -14
  92. package/dist/es/api-model/models/carrier-will-pick-up-option.js +0 -21
  93. package/dist/es/api-model/models/constraint.js +0 -14
  94. package/dist/es/api-model/models/create-shipment-request.js +0 -14
  95. package/dist/es/api-model/models/create-shipment-response.js +0 -14
  96. package/dist/es/api-model/models/currency-amount.js +0 -14
  97. package/dist/es/api-model/models/dangerous-goods-details.js +0 -33
  98. package/dist/es/api-model/models/delivery-experience-option.js +0 -23
  99. package/dist/es/api-model/models/delivery-experience-type.js +0 -22
  100. package/dist/es/api-model/models/excluded-benefit.js +0 -14
  101. package/dist/es/api-model/models/file-contents.js +0 -14
  102. package/dist/es/api-model/models/file-type.js +0 -21
  103. package/dist/es/api-model/models/get-additional-seller-inputs-request.js +0 -14
  104. package/dist/es/api-model/models/get-additional-seller-inputs-response.js +0 -14
  105. package/dist/es/api-model/models/get-additional-seller-inputs-result.js +0 -14
  106. package/dist/es/api-model/models/get-eligible-shipment-services-request.js +0 -14
  107. package/dist/es/api-model/models/get-eligible-shipment-services-response.js +0 -14
  108. package/dist/es/api-model/models/get-eligible-shipment-services-result.js +0 -14
  109. package/dist/es/api-model/models/get-shipment-response.js +0 -14
  110. package/dist/es/api-model/models/hazmat-type.js +0 -20
  111. package/dist/es/api-model/models/index.js +0 -59
  112. package/dist/es/api-model/models/input-target-type.js +0 -20
  113. package/dist/es/api-model/models/item-level-fields.js +0 -14
  114. package/dist/es/api-model/models/item.js +0 -14
  115. package/dist/es/api-model/models/label-customization.js +0 -14
  116. package/dist/es/api-model/models/label-dimensions.js +0 -14
  117. package/dist/es/api-model/models/label-format-option-request.js +0 -14
  118. package/dist/es/api-model/models/label-format-option.js +0 -14
  119. package/dist/es/api-model/models/label-format.js +0 -23
  120. package/dist/es/api-model/models/label.js +0 -14
  121. package/dist/es/api-model/models/length.js +0 -14
  122. package/dist/es/api-model/models/liquid-volume.js +0 -22
  123. package/dist/es/api-model/models/model-error.js +0 -14
  124. package/dist/es/api-model/models/package-dimensions.js +0 -14
  125. package/dist/es/api-model/models/predefined-package-dimensions.js +0 -68
  126. package/dist/es/api-model/models/rate-item-id.js +0 -19
  127. package/dist/es/api-model/models/rate-item-type.js +0 -19
  128. package/dist/es/api-model/models/rate-item.js +0 -14
  129. package/dist/es/api-model/models/rejected-shipping-service.js +0 -14
  130. package/dist/es/api-model/models/seller-input-definition.js +0 -14
  131. package/dist/es/api-model/models/shipment-request-details.js +0 -14
  132. package/dist/es/api-model/models/shipment-status.js +0 -22
  133. package/dist/es/api-model/models/shipment.js +0 -14
  134. package/dist/es/api-model/models/shipping-offering-filter.js +0 -14
  135. package/dist/es/api-model/models/shipping-service-options.js +0 -14
  136. package/dist/es/api-model/models/shipping-service.js +0 -14
  137. package/dist/es/api-model/models/standard-id-for-label.js +0 -19
  138. package/dist/es/api-model/models/temporarily-unavailable-carrier.js +0 -14
  139. package/dist/es/api-model/models/terms-and-conditions-not-accepted-carrier.js +0 -14
  140. package/dist/es/api-model/models/unit-of-length.js +0 -20
  141. package/dist/es/api-model/models/unit-of-weight.js +0 -20
  142. package/dist/es/api-model/models/weight.js +0 -14
  143. package/dist/es/client.js +0 -45
  144. package/dist/es/index.js +0 -3
  145. package/dist/types/api-model/api/merchant-fulfillment-api.d.ts +0 -228
  146. package/dist/types/api-model/api.d.ts +0 -12
  147. package/dist/types/api-model/base.d.ts +0 -42
  148. package/dist/types/api-model/common.d.ts +0 -34
  149. package/dist/types/api-model/configuration.d.ts +0 -98
  150. package/dist/types/api-model/index.d.ts +0 -14
  151. package/dist/types/api-model/models/additional-inputs.d.ts +0 -22
  152. package/dist/types/api-model/models/additional-seller-input.d.ts +0 -44
  153. package/dist/types/api-model/models/additional-seller-inputs.d.ts +0 -22
  154. package/dist/types/api-model/models/address.d.ts +0 -60
  155. package/dist/types/api-model/models/available-carrier-will-pick-up-option.d.ts +0 -20
  156. package/dist/types/api-model/models/available-delivery-experience-option.d.ts +0 -20
  157. package/dist/types/api-model/models/available-shipping-service-options.d.ts +0 -26
  158. package/dist/types/api-model/models/benefits.d.ts +0 -25
  159. package/dist/types/api-model/models/cancel-shipment-response.d.ts +0 -22
  160. package/dist/types/api-model/models/carrier-will-pick-up-option.d.ts +0 -20
  161. package/dist/types/api-model/models/constraint.d.ts +0 -24
  162. package/dist/types/api-model/models/create-shipment-request.d.ts +0 -35
  163. package/dist/types/api-model/models/create-shipment-response.d.ts +0 -22
  164. package/dist/types/api-model/models/currency-amount.d.ts +0 -24
  165. package/dist/types/api-model/models/dangerous-goods-details.d.ts +0 -54
  166. package/dist/types/api-model/models/delivery-experience-option.d.ts +0 -22
  167. package/dist/types/api-model/models/delivery-experience-type.d.ts +0 -21
  168. package/dist/types/api-model/models/excluded-benefit.d.ts +0 -24
  169. package/dist/types/api-model/models/file-contents.d.ts +0 -26
  170. package/dist/types/api-model/models/file-type.d.ts +0 -20
  171. package/dist/types/api-model/models/get-additional-seller-inputs-request.d.ts +0 -26
  172. package/dist/types/api-model/models/get-additional-seller-inputs-response.d.ts +0 -22
  173. package/dist/types/api-model/models/get-additional-seller-inputs-result.d.ts +0 -26
  174. package/dist/types/api-model/models/get-eligible-shipment-services-request.d.ts +0 -20
  175. package/dist/types/api-model/models/get-eligible-shipment-services-response.d.ts +0 -22
  176. package/dist/types/api-model/models/get-eligible-shipment-services-result.d.ts +0 -36
  177. package/dist/types/api-model/models/get-shipment-response.d.ts +0 -22
  178. package/dist/types/api-model/models/hazmat-type.d.ts +0 -19
  179. package/dist/types/api-model/models/index.d.ts +0 -59
  180. package/dist/types/api-model/models/input-target-type.d.ts +0 -19
  181. package/dist/types/api-model/models/item-level-fields.d.ts +0 -25
  182. package/dist/types/api-model/models/item.d.ts +0 -47
  183. package/dist/types/api-model/models/label-customization.d.ts +0 -22
  184. package/dist/types/api-model/models/label-dimensions.d.ts +0 -26
  185. package/dist/types/api-model/models/label-format-option-request.d.ts +0 -20
  186. package/dist/types/api-model/models/label-format-option.d.ts +0 -22
  187. package/dist/types/api-model/models/label-format.d.ts +0 -22
  188. package/dist/types/api-model/models/label.d.ts +0 -28
  189. package/dist/types/api-model/models/length.d.ts +0 -22
  190. package/dist/types/api-model/models/liquid-volume.d.ts +0 -34
  191. package/dist/types/api-model/models/model-error.d.ts +0 -28
  192. package/dist/types/api-model/models/package-dimensions.d.ts +0 -32
  193. package/dist/types/api-model/models/predefined-package-dimensions.d.ts +0 -67
  194. package/dist/types/api-model/models/rate-item-id.d.ts +0 -18
  195. package/dist/types/api-model/models/rate-item-type.d.ts +0 -18
  196. package/dist/types/api-model/models/rate-item.d.ts +0 -26
  197. package/dist/types/api-model/models/rejected-shipping-service.d.ts +0 -36
  198. package/dist/types/api-model/models/seller-input-definition.d.ts +0 -41
  199. package/dist/types/api-model/models/shipment-request-details.d.ts +0 -47
  200. package/dist/types/api-model/models/shipment-status.d.ts +0 -21
  201. package/dist/types/api-model/models/shipment.d.ts +0 -60
  202. package/dist/types/api-model/models/shipping-offering-filter.d.ts +0 -28
  203. package/dist/types/api-model/models/shipping-service-options.d.ts +0 -28
  204. package/dist/types/api-model/models/shipping-service.d.ts +0 -72
  205. package/dist/types/api-model/models/standard-id-for-label.d.ts +0 -18
  206. package/dist/types/api-model/models/temporarily-unavailable-carrier.d.ts +0 -20
  207. package/dist/types/api-model/models/terms-and-conditions-not-accepted-carrier.d.ts +0 -20
  208. package/dist/types/api-model/models/unit-of-length.d.ts +0 -19
  209. package/dist/types/api-model/models/unit-of-weight.d.ts +0 -19
  210. package/dist/types/api-model/models/weight.d.ts +0 -22
  211. package/dist/types/client.d.ts +0 -6
  212. package/dist/types/index.d.ts +0 -3
package/dist/index.js ADDED
@@ -0,0 +1,716 @@
1
+ // src/client.ts
2
+ import { createAxiosInstance } from "@sp-api-sdk/common";
3
+
4
+ // src/api-model/api/merchant-fulfillment-api.ts
5
+ import globalAxios2 from "axios";
6
+
7
+ // src/api-model/base.ts
8
+ import globalAxios from "axios";
9
+ var BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
10
+ var BaseAPI = class {
11
+ constructor(configuration, basePath = BASE_PATH, axios = globalAxios) {
12
+ this.basePath = basePath;
13
+ this.axios = axios;
14
+ if (configuration) {
15
+ this.configuration = configuration;
16
+ this.basePath = configuration.basePath ?? basePath;
17
+ }
18
+ }
19
+ basePath;
20
+ axios;
21
+ configuration;
22
+ };
23
+ var RequiredError = class extends Error {
24
+ constructor(field, msg) {
25
+ super(msg);
26
+ this.field = field;
27
+ this.name = "RequiredError";
28
+ }
29
+ field;
30
+ };
31
+ var operationServerMap = {};
32
+
33
+ // src/api-model/common.ts
34
+ var DUMMY_BASE_URL = "https://example.com";
35
+ var assertParamExists = function(functionName, paramName, paramValue) {
36
+ if (paramValue === null || paramValue === void 0) {
37
+ throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
38
+ }
39
+ };
40
+ function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
41
+ if (parameter == null) return;
42
+ if (typeof parameter === "object") {
43
+ if (Array.isArray(parameter) || parameter instanceof Set) {
44
+ parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
45
+ } else {
46
+ Object.keys(parameter).forEach(
47
+ (currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`)
48
+ );
49
+ }
50
+ } else {
51
+ if (urlSearchParams.has(key)) {
52
+ urlSearchParams.append(key, parameter);
53
+ } else {
54
+ urlSearchParams.set(key, parameter);
55
+ }
56
+ }
57
+ }
58
+ var setSearchParams = function(url, ...objects) {
59
+ const searchParams = new URLSearchParams(url.search);
60
+ setFlattenedQueryParams(searchParams, objects);
61
+ url.search = searchParams.toString();
62
+ };
63
+ var replaceWithSerializableTypeIfNeeded = function(key, value) {
64
+ if (value instanceof Set) {
65
+ return Array.from(value);
66
+ } else {
67
+ return value;
68
+ }
69
+ };
70
+ var serializeDataIfNeeded = function(value, requestOptions, configuration) {
71
+ const nonString = typeof value !== "string";
72
+ const needsSerialization = nonString && configuration && configuration.isJsonMime ? configuration.isJsonMime(requestOptions.headers["Content-Type"]) : nonString;
73
+ return needsSerialization ? JSON.stringify(value !== void 0 ? value : {}, replaceWithSerializableTypeIfNeeded) : value || "";
74
+ };
75
+ var toPathString = function(url) {
76
+ return url.pathname + url.search + url.hash;
77
+ };
78
+ var createRequestFunction = function(axiosArgs, globalAxios3, BASE_PATH2, configuration) {
79
+ return (axios = globalAxios3, basePath = BASE_PATH2) => {
80
+ const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? "" : configuration?.basePath ?? basePath) + axiosArgs.url };
81
+ return axios.request(axiosRequestArgs);
82
+ };
83
+ };
84
+
85
+ // src/api-model/api/merchant-fulfillment-api.ts
86
+ var MerchantFulfillmentApiAxiosParamCreator = function(configuration) {
87
+ return {
88
+ /**
89
+ * Cancel the shipment indicated by the specified shipment identifier. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | 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 indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the SP-API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
90
+ * @param {string} shipmentId The Amazon-defined shipment identifier for the shipment to cancel.
91
+ * @param {*} [options] Override http request option.
92
+ * @throws {RequiredError}
93
+ */
94
+ cancelShipment: async (shipmentId, options = {}) => {
95
+ assertParamExists("cancelShipment", "shipmentId", shipmentId);
96
+ const localVarPath = `/mfn/v0/shipments/{shipmentId}`.replace("{shipmentId}", encodeURIComponent(String(shipmentId)));
97
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
98
+ let baseOptions;
99
+ if (configuration) {
100
+ baseOptions = configuration.baseOptions;
101
+ }
102
+ const localVarRequestOptions = { method: "DELETE", ...baseOptions, ...options };
103
+ const localVarHeaderParameter = {};
104
+ const localVarQueryParameter = {};
105
+ localVarHeaderParameter["Accept"] = "application/json";
106
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
107
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
108
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
109
+ return {
110
+ url: toPathString(localVarUrlObj),
111
+ options: localVarRequestOptions
112
+ };
113
+ },
114
+ /**
115
+ * Create a shipment with the information provided. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | 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 indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the SP-API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
116
+ * @param {CreateShipmentRequest} body The request schema for the `CreateShipment` operation.
117
+ * @param {*} [options] Override http request option.
118
+ * @throws {RequiredError}
119
+ */
120
+ createShipment: async (body, options = {}) => {
121
+ assertParamExists("createShipment", "body", body);
122
+ const localVarPath = `/mfn/v0/shipments`;
123
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
124
+ let baseOptions;
125
+ if (configuration) {
126
+ baseOptions = configuration.baseOptions;
127
+ }
128
+ const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
129
+ const localVarHeaderParameter = {};
130
+ const localVarQueryParameter = {};
131
+ localVarHeaderParameter["Content-Type"] = "application/json";
132
+ localVarHeaderParameter["Accept"] = "application/json";
133
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
134
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
135
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
136
+ localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
137
+ return {
138
+ url: toPathString(localVarUrlObj),
139
+ options: localVarRequestOptions
140
+ };
141
+ },
142
+ /**
143
+ * Gets a list of additional seller inputs required for a ship method. This is generally used for international shipping. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | 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 indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the SP-API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
144
+ * @param {GetAdditionalSellerInputsRequest} body The request schema for the `GetAdditionalSellerInputs` operation.
145
+ * @param {*} [options] Override http request option.
146
+ * @throws {RequiredError}
147
+ */
148
+ getAdditionalSellerInputs: async (body, options = {}) => {
149
+ assertParamExists("getAdditionalSellerInputs", "body", body);
150
+ const localVarPath = `/mfn/v0/additionalSellerInputs`;
151
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
152
+ let baseOptions;
153
+ if (configuration) {
154
+ baseOptions = configuration.baseOptions;
155
+ }
156
+ const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
157
+ const localVarHeaderParameter = {};
158
+ const localVarQueryParameter = {};
159
+ localVarHeaderParameter["Content-Type"] = "application/json";
160
+ localVarHeaderParameter["Accept"] = "application/json";
161
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
162
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
163
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
164
+ localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
165
+ return {
166
+ url: toPathString(localVarUrlObj),
167
+ options: localVarRequestOptions
168
+ };
169
+ },
170
+ /**
171
+ * Returns a list of shipping service offers that satisfy the specified shipment request details. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 6 | 12 | 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 indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the SP-API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
172
+ * @param {GetEligibleShipmentServicesRequest} body The request schema for the `GetEligibleShipmentServices` operation.
173
+ * @param {*} [options] Override http request option.
174
+ * @throws {RequiredError}
175
+ */
176
+ getEligibleShipmentServices: async (body, options = {}) => {
177
+ assertParamExists("getEligibleShipmentServices", "body", body);
178
+ const localVarPath = `/mfn/v0/eligibleShippingServices`;
179
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
180
+ let baseOptions;
181
+ if (configuration) {
182
+ baseOptions = configuration.baseOptions;
183
+ }
184
+ const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
185
+ const localVarHeaderParameter = {};
186
+ const localVarQueryParameter = {};
187
+ localVarHeaderParameter["Content-Type"] = "application/json";
188
+ localVarHeaderParameter["Accept"] = "application/json";
189
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
190
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
191
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
192
+ localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
193
+ return {
194
+ url: toPathString(localVarUrlObj),
195
+ options: localVarRequestOptions
196
+ };
197
+ },
198
+ /**
199
+ * Returns the shipment information for an existing shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | 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 indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the SP-API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
200
+ * @param {string} shipmentId The Amazon-defined shipment identifier for the shipment.
201
+ * @param {*} [options] Override http request option.
202
+ * @throws {RequiredError}
203
+ */
204
+ getShipment: async (shipmentId, options = {}) => {
205
+ assertParamExists("getShipment", "shipmentId", shipmentId);
206
+ const localVarPath = `/mfn/v0/shipments/{shipmentId}`.replace("{shipmentId}", encodeURIComponent(String(shipmentId)));
207
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
208
+ let baseOptions;
209
+ if (configuration) {
210
+ baseOptions = configuration.baseOptions;
211
+ }
212
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
213
+ const localVarHeaderParameter = {};
214
+ const localVarQueryParameter = {};
215
+ localVarHeaderParameter["Accept"] = "application/json";
216
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
217
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
218
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
219
+ return {
220
+ url: toPathString(localVarUrlObj),
221
+ options: localVarRequestOptions
222
+ };
223
+ }
224
+ };
225
+ };
226
+ var MerchantFulfillmentApiFp = function(configuration) {
227
+ const localVarAxiosParamCreator = MerchantFulfillmentApiAxiosParamCreator(configuration);
228
+ return {
229
+ /**
230
+ * Cancel the shipment indicated by the specified shipment identifier. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | 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 indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the SP-API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
231
+ * @param {string} shipmentId The Amazon-defined shipment identifier for the shipment to cancel.
232
+ * @param {*} [options] Override http request option.
233
+ * @throws {RequiredError}
234
+ */
235
+ async cancelShipment(shipmentId, options) {
236
+ const localVarAxiosArgs = await localVarAxiosParamCreator.cancelShipment(shipmentId, options);
237
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
238
+ const localVarOperationServerBasePath = operationServerMap["MerchantFulfillmentApi.cancelShipment"]?.[localVarOperationServerIndex]?.url;
239
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
240
+ },
241
+ /**
242
+ * Create a shipment with the information provided. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | 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 indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the SP-API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
243
+ * @param {CreateShipmentRequest} body The request schema for the `CreateShipment` operation.
244
+ * @param {*} [options] Override http request option.
245
+ * @throws {RequiredError}
246
+ */
247
+ async createShipment(body, options) {
248
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createShipment(body, options);
249
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
250
+ const localVarOperationServerBasePath = operationServerMap["MerchantFulfillmentApi.createShipment"]?.[localVarOperationServerIndex]?.url;
251
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
252
+ },
253
+ /**
254
+ * Gets a list of additional seller inputs required for a ship method. This is generally used for international shipping. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | 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 indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the SP-API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
255
+ * @param {GetAdditionalSellerInputsRequest} body The request schema for the `GetAdditionalSellerInputs` operation.
256
+ * @param {*} [options] Override http request option.
257
+ * @throws {RequiredError}
258
+ */
259
+ async getAdditionalSellerInputs(body, options) {
260
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getAdditionalSellerInputs(body, options);
261
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
262
+ const localVarOperationServerBasePath = operationServerMap["MerchantFulfillmentApi.getAdditionalSellerInputs"]?.[localVarOperationServerIndex]?.url;
263
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
264
+ },
265
+ /**
266
+ * Returns a list of shipping service offers that satisfy the specified shipment request details. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 6 | 12 | 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 indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the SP-API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
267
+ * @param {GetEligibleShipmentServicesRequest} body The request schema for the `GetEligibleShipmentServices` operation.
268
+ * @param {*} [options] Override http request option.
269
+ * @throws {RequiredError}
270
+ */
271
+ async getEligibleShipmentServices(body, options) {
272
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getEligibleShipmentServices(body, options);
273
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
274
+ const localVarOperationServerBasePath = operationServerMap["MerchantFulfillmentApi.getEligibleShipmentServices"]?.[localVarOperationServerIndex]?.url;
275
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
276
+ },
277
+ /**
278
+ * Returns the shipment information for an existing shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | 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 indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the SP-API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
279
+ * @param {string} shipmentId The Amazon-defined shipment identifier for the shipment.
280
+ * @param {*} [options] Override http request option.
281
+ * @throws {RequiredError}
282
+ */
283
+ async getShipment(shipmentId, options) {
284
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getShipment(shipmentId, options);
285
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
286
+ const localVarOperationServerBasePath = operationServerMap["MerchantFulfillmentApi.getShipment"]?.[localVarOperationServerIndex]?.url;
287
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
288
+ }
289
+ };
290
+ };
291
+ var MerchantFulfillmentApiFactory = function(configuration, basePath, axios) {
292
+ const localVarFp = MerchantFulfillmentApiFp(configuration);
293
+ return {
294
+ /**
295
+ * Cancel the shipment indicated by the specified shipment identifier. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | 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 indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the SP-API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
296
+ * @param {MerchantFulfillmentApiCancelShipmentRequest} requestParameters Request parameters.
297
+ * @param {*} [options] Override http request option.
298
+ * @throws {RequiredError}
299
+ */
300
+ cancelShipment(requestParameters, options) {
301
+ return localVarFp.cancelShipment(requestParameters.shipmentId, options).then((request) => request(axios, basePath));
302
+ },
303
+ /**
304
+ * Create a shipment with the information provided. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | 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 indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the SP-API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
305
+ * @param {MerchantFulfillmentApiCreateShipmentRequest} requestParameters Request parameters.
306
+ * @param {*} [options] Override http request option.
307
+ * @throws {RequiredError}
308
+ */
309
+ createShipment(requestParameters, options) {
310
+ return localVarFp.createShipment(requestParameters.body, options).then((request) => request(axios, basePath));
311
+ },
312
+ /**
313
+ * Gets a list of additional seller inputs required for a ship method. This is generally used for international shipping. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | 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 indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the SP-API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
314
+ * @param {MerchantFulfillmentApiGetAdditionalSellerInputsRequest} requestParameters Request parameters.
315
+ * @param {*} [options] Override http request option.
316
+ * @throws {RequiredError}
317
+ */
318
+ getAdditionalSellerInputs(requestParameters, options) {
319
+ return localVarFp.getAdditionalSellerInputs(requestParameters.body, options).then((request) => request(axios, basePath));
320
+ },
321
+ /**
322
+ * Returns a list of shipping service offers that satisfy the specified shipment request details. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 6 | 12 | 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 indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the SP-API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
323
+ * @param {MerchantFulfillmentApiGetEligibleShipmentServicesRequest} requestParameters Request parameters.
324
+ * @param {*} [options] Override http request option.
325
+ * @throws {RequiredError}
326
+ */
327
+ getEligibleShipmentServices(requestParameters, options) {
328
+ return localVarFp.getEligibleShipmentServices(requestParameters.body, options).then((request) => request(axios, basePath));
329
+ },
330
+ /**
331
+ * Returns the shipment information for an existing shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | 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 indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the SP-API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
332
+ * @param {MerchantFulfillmentApiGetShipmentRequest} requestParameters Request parameters.
333
+ * @param {*} [options] Override http request option.
334
+ * @throws {RequiredError}
335
+ */
336
+ getShipment(requestParameters, options) {
337
+ return localVarFp.getShipment(requestParameters.shipmentId, options).then((request) => request(axios, basePath));
338
+ }
339
+ };
340
+ };
341
+ var MerchantFulfillmentApi = class extends BaseAPI {
342
+ /**
343
+ * Cancel the shipment indicated by the specified shipment identifier. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | 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 indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the SP-API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
344
+ * @param {MerchantFulfillmentApiCancelShipmentRequest} requestParameters Request parameters.
345
+ * @param {*} [options] Override http request option.
346
+ * @throws {RequiredError}
347
+ */
348
+ cancelShipment(requestParameters, options) {
349
+ return MerchantFulfillmentApiFp(this.configuration).cancelShipment(requestParameters.shipmentId, options).then((request) => request(this.axios, this.basePath));
350
+ }
351
+ /**
352
+ * Create a shipment with the information provided. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | 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 indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the SP-API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
353
+ * @param {MerchantFulfillmentApiCreateShipmentRequest} requestParameters Request parameters.
354
+ * @param {*} [options] Override http request option.
355
+ * @throws {RequiredError}
356
+ */
357
+ createShipment(requestParameters, options) {
358
+ return MerchantFulfillmentApiFp(this.configuration).createShipment(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
359
+ }
360
+ /**
361
+ * Gets a list of additional seller inputs required for a ship method. This is generally used for international shipping. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | 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 indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the SP-API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
362
+ * @param {MerchantFulfillmentApiGetAdditionalSellerInputsRequest} requestParameters Request parameters.
363
+ * @param {*} [options] Override http request option.
364
+ * @throws {RequiredError}
365
+ */
366
+ getAdditionalSellerInputs(requestParameters, options) {
367
+ return MerchantFulfillmentApiFp(this.configuration).getAdditionalSellerInputs(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
368
+ }
369
+ /**
370
+ * Returns a list of shipping service offers that satisfy the specified shipment request details. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 6 | 12 | 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 indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the SP-API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
371
+ * @param {MerchantFulfillmentApiGetEligibleShipmentServicesRequest} requestParameters Request parameters.
372
+ * @param {*} [options] Override http request option.
373
+ * @throws {RequiredError}
374
+ */
375
+ getEligibleShipmentServices(requestParameters, options) {
376
+ return MerchantFulfillmentApiFp(this.configuration).getEligibleShipmentServices(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
377
+ }
378
+ /**
379
+ * Returns the shipment information for an existing shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | 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 indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the SP-API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
380
+ * @param {MerchantFulfillmentApiGetShipmentRequest} requestParameters Request parameters.
381
+ * @param {*} [options] Override http request option.
382
+ * @throws {RequiredError}
383
+ */
384
+ getShipment(requestParameters, options) {
385
+ return MerchantFulfillmentApiFp(this.configuration).getShipment(requestParameters.shipmentId, options).then((request) => request(this.axios, this.basePath));
386
+ }
387
+ };
388
+
389
+ // src/api-model/configuration.ts
390
+ var Configuration = class {
391
+ /**
392
+ * parameter for apiKey security
393
+ * @param name security name
394
+ */
395
+ apiKey;
396
+ /**
397
+ * parameter for basic security
398
+ */
399
+ username;
400
+ /**
401
+ * parameter for basic security
402
+ */
403
+ password;
404
+ /**
405
+ * parameter for oauth2 security
406
+ * @param name security name
407
+ * @param scopes oauth2 scope
408
+ */
409
+ accessToken;
410
+ /**
411
+ * parameter for aws4 signature security
412
+ * @param {Object} AWS4Signature - AWS4 Signature security
413
+ * @param {string} options.region - aws region
414
+ * @param {string} options.service - name of the service.
415
+ * @param {string} credentials.accessKeyId - aws access key id
416
+ * @param {string} credentials.secretAccessKey - aws access key
417
+ * @param {string} credentials.sessionToken - aws session token
418
+ * @memberof Configuration
419
+ */
420
+ awsv4;
421
+ /**
422
+ * override base path
423
+ */
424
+ basePath;
425
+ /**
426
+ * override server index
427
+ */
428
+ serverIndex;
429
+ /**
430
+ * base options for axios calls
431
+ */
432
+ baseOptions;
433
+ /**
434
+ * The FormData constructor that will be used to create multipart form data
435
+ * requests. You can inject this here so that execution environments that
436
+ * do not support the FormData class can still run the generated client.
437
+ *
438
+ * @type {new () => FormData}
439
+ */
440
+ formDataCtor;
441
+ constructor(param = {}) {
442
+ this.apiKey = param.apiKey;
443
+ this.username = param.username;
444
+ this.password = param.password;
445
+ this.accessToken = param.accessToken;
446
+ this.awsv4 = param.awsv4;
447
+ this.basePath = param.basePath;
448
+ this.serverIndex = param.serverIndex;
449
+ this.baseOptions = {
450
+ ...param.baseOptions,
451
+ headers: {
452
+ ...param.baseOptions?.headers
453
+ }
454
+ };
455
+ this.formDataCtor = param.formDataCtor;
456
+ }
457
+ /**
458
+ * Check if the given MIME is a JSON MIME.
459
+ * JSON MIME examples:
460
+ * application/json
461
+ * application/json; charset=UTF8
462
+ * APPLICATION/JSON
463
+ * application/vnd.company+json
464
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
465
+ * @return True if the given MIME is JSON, false otherwise.
466
+ */
467
+ isJsonMime(mime) {
468
+ const jsonMime = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i;
469
+ return mime !== null && jsonMime.test(mime);
470
+ }
471
+ };
472
+
473
+ // src/api-model/models/carrier-will-pick-up-option.ts
474
+ var CarrierWillPickUpOption = {
475
+ CarrierWillPickUp: "CarrierWillPickUp",
476
+ ShipperWillDropOff: "ShipperWillDropOff",
477
+ NoPreference: "NoPreference"
478
+ };
479
+
480
+ // src/api-model/models/dangerous-goods-details.ts
481
+ var DangerousGoodsDetailsPackingGroupEnum = {
482
+ I: "I",
483
+ Ii: "II",
484
+ Iii: "III"
485
+ };
486
+ var DangerousGoodsDetailsPackingInstructionEnum = {
487
+ Pi965SectionIa: "PI965_SECTION_IA",
488
+ Pi965SectionIb: "PI965_SECTION_IB",
489
+ Pi965SectionIi: "PI965_SECTION_II",
490
+ Pi966SectionI: "PI966_SECTION_I",
491
+ Pi966SectionIi: "PI966_SECTION_II",
492
+ Pi967SectionI: "PI967_SECTION_I",
493
+ Pi967SectionIi: "PI967_SECTION_II",
494
+ Pi968SectionIa: "PI968_SECTION_IA",
495
+ Pi968SectionIb: "PI968_SECTION_IB",
496
+ Pi969SectionI: "PI969_SECTION_I",
497
+ Pi969SectionIi: "PI969_SECTION_II",
498
+ Pi970SectionI: "PI970_SECTION_I",
499
+ Pi970SectionIi: "PI970_SECTION_II"
500
+ };
501
+
502
+ // src/api-model/models/delivery-experience-option.ts
503
+ var DeliveryExperienceOption = {
504
+ DeliveryConfirmationWithAdultSignature: "DeliveryConfirmationWithAdultSignature",
505
+ DeliveryConfirmationWithSignature: "DeliveryConfirmationWithSignature",
506
+ DeliveryConfirmationWithoutSignature: "DeliveryConfirmationWithoutSignature",
507
+ NoTracking: "NoTracking",
508
+ NoPreference: "NoPreference"
509
+ };
510
+
511
+ // src/api-model/models/delivery-experience-type.ts
512
+ var DeliveryExperienceType = {
513
+ DeliveryConfirmationWithAdultSignature: "DeliveryConfirmationWithAdultSignature",
514
+ DeliveryConfirmationWithSignature: "DeliveryConfirmationWithSignature",
515
+ DeliveryConfirmationWithoutSignature: "DeliveryConfirmationWithoutSignature",
516
+ NoTracking: "NoTracking"
517
+ };
518
+
519
+ // src/api-model/models/file-type.ts
520
+ var FileType = {
521
+ ApplicationPdf: "application/pdf",
522
+ ApplicationZpl: "application/zpl",
523
+ ImagePng: "image/png"
524
+ };
525
+
526
+ // src/api-model/models/hazmat-type.ts
527
+ var HazmatType = {
528
+ None: "None",
529
+ LqHazmat: "LQHazmat"
530
+ };
531
+
532
+ // src/api-model/models/input-target-type.ts
533
+ var InputTargetType = {
534
+ ShipmentLevel: "SHIPMENT_LEVEL",
535
+ ItemLevel: "ITEM_LEVEL"
536
+ };
537
+
538
+ // src/api-model/models/label-format.ts
539
+ var LabelFormat = {
540
+ Pdf: "PDF",
541
+ Png: "PNG",
542
+ Zpl203: "ZPL203",
543
+ Zpl300: "ZPL300",
544
+ ShippingServiceDefault: "ShippingServiceDefault"
545
+ };
546
+
547
+ // src/api-model/models/liquid-volume.ts
548
+ var LiquidVolumeUnitEnum = {
549
+ Ml: "ML",
550
+ L: "L",
551
+ FlOz: "FL_OZ",
552
+ Gal: "GAL",
553
+ Pt: "PT",
554
+ Qt: "QT",
555
+ C: "C"
556
+ };
557
+
558
+ // src/api-model/models/predefined-package-dimensions.ts
559
+ var PredefinedPackageDimensions = {
560
+ FedExBox10kg: "FedEx_Box_10kg",
561
+ FedExBox25kg: "FedEx_Box_25kg",
562
+ FedExBoxExtraLarge1: "FedEx_Box_Extra_Large_1",
563
+ FedExBoxExtraLarge2: "FedEx_Box_Extra_Large_2",
564
+ FedExBoxLarge1: "FedEx_Box_Large_1",
565
+ FedExBoxLarge2: "FedEx_Box_Large_2",
566
+ FedExBoxMedium1: "FedEx_Box_Medium_1",
567
+ FedExBoxMedium2: "FedEx_Box_Medium_2",
568
+ FedExBoxSmall1: "FedEx_Box_Small_1",
569
+ FedExBoxSmall2: "FedEx_Box_Small_2",
570
+ FedExEnvelope: "FedEx_Envelope",
571
+ FedExPaddedPak: "FedEx_Padded_Pak",
572
+ FedExPak1: "FedEx_Pak_1",
573
+ FedExPak2: "FedEx_Pak_2",
574
+ FedExTube: "FedEx_Tube",
575
+ FedExXlPak: "FedEx_XL_Pak",
576
+ UpsBox10kg: "UPS_Box_10kg",
577
+ UpsBox25kg: "UPS_Box_25kg",
578
+ UpsExpressBox: "UPS_Express_Box",
579
+ UpsExpressBoxLarge: "UPS_Express_Box_Large",
580
+ UpsExpressBoxMedium: "UPS_Express_Box_Medium",
581
+ UpsExpressBoxSmall: "UPS_Express_Box_Small",
582
+ UpsExpressEnvelope: "UPS_Express_Envelope",
583
+ UpsExpressHardPak: "UPS_Express_Hard_Pak",
584
+ UpsExpressLegalEnvelope: "UPS_Express_Legal_Envelope",
585
+ UpsExpressPak: "UPS_Express_Pak",
586
+ UpsExpressTube: "UPS_Express_Tube",
587
+ UpsLaboratoryPak: "UPS_Laboratory_Pak",
588
+ UpsPadPak: "UPS_Pad_Pak",
589
+ UpsPallet: "UPS_Pallet",
590
+ UspsCard: "USPS_Card",
591
+ UspsFlat: "USPS_Flat",
592
+ UspsFlatRateCardboardEnvelope: "USPS_FlatRateCardboardEnvelope",
593
+ UspsFlatRateEnvelope: "USPS_FlatRateEnvelope",
594
+ UspsFlatRateGiftCardEnvelope: "USPS_FlatRateGiftCardEnvelope",
595
+ UspsFlatRateLegalEnvelope: "USPS_FlatRateLegalEnvelope",
596
+ UspsFlatRatePaddedEnvelope: "USPS_FlatRatePaddedEnvelope",
597
+ UspsFlatRateWindowEnvelope: "USPS_FlatRateWindowEnvelope",
598
+ UspsLargeFlatRateBoardGameBox: "USPS_LargeFlatRateBoardGameBox",
599
+ UspsLargeFlatRateBox: "USPS_LargeFlatRateBox",
600
+ UspsLetter: "USPS_Letter",
601
+ UspsMediumFlatRateBox1: "USPS_MediumFlatRateBox1",
602
+ UspsMediumFlatRateBox2: "USPS_MediumFlatRateBox2",
603
+ UspsRegionalRateBoxA1: "USPS_RegionalRateBoxA1",
604
+ UspsRegionalRateBoxA2: "USPS_RegionalRateBoxA2",
605
+ UspsRegionalRateBoxB1: "USPS_RegionalRateBoxB1",
606
+ UspsRegionalRateBoxB2: "USPS_RegionalRateBoxB2",
607
+ UspsRegionalRateBoxC: "USPS_RegionalRateBoxC",
608
+ UspsSmallFlatRateBox: "USPS_SmallFlatRateBox",
609
+ UspsSmallFlatRateEnvelope: "USPS_SmallFlatRateEnvelope"
610
+ };
611
+
612
+ // src/api-model/models/rate-item-id.ts
613
+ var RateItemID = {
614
+ FbmShipPlusCredit: "FBM_SHIP_PLUS_CREDIT"
615
+ };
616
+
617
+ // src/api-model/models/rate-item-type.ts
618
+ var RateItemType = {
619
+ Included: "INCLUDED"
620
+ };
621
+
622
+ // src/api-model/models/shipment-status.ts
623
+ var ShipmentStatus = {
624
+ Purchased: "Purchased",
625
+ RefundPending: "RefundPending",
626
+ RefundRejected: "RefundRejected",
627
+ RefundApplied: "RefundApplied"
628
+ };
629
+
630
+ // src/api-model/models/standard-id-for-label.ts
631
+ var StandardIdForLabel = {
632
+ AmazonOrderId: "AmazonOrderId"
633
+ };
634
+
635
+ // src/api-model/models/unit-of-length.ts
636
+ var UnitOfLength = {
637
+ Inches: "inches",
638
+ Centimeters: "centimeters"
639
+ };
640
+
641
+ // src/api-model/models/unit-of-weight.ts
642
+ var UnitOfWeight = {
643
+ Oz: "oz",
644
+ G: "g"
645
+ };
646
+
647
+ // src/client.ts
648
+ var clientRateLimits = [
649
+ {
650
+ method: "post",
651
+ // eslint-disable-next-line prefer-regex-literals
652
+ urlRegex: new RegExp("^/mfn/v0/eligibleShippingServices$"),
653
+ rate: 6,
654
+ burst: 12
655
+ },
656
+ {
657
+ method: "get",
658
+ // eslint-disable-next-line prefer-regex-literals
659
+ urlRegex: new RegExp("^/mfn/v0/shipments/[^/]*$"),
660
+ rate: 1,
661
+ burst: 1
662
+ },
663
+ {
664
+ method: "delete",
665
+ // eslint-disable-next-line prefer-regex-literals
666
+ urlRegex: new RegExp("^/mfn/v0/shipments/[^/]*$"),
667
+ rate: 1,
668
+ burst: 1
669
+ },
670
+ {
671
+ method: "post",
672
+ // eslint-disable-next-line prefer-regex-literals
673
+ urlRegex: new RegExp("^/mfn/v0/shipments$"),
674
+ rate: 2,
675
+ burst: 2
676
+ },
677
+ {
678
+ method: "post",
679
+ // eslint-disable-next-line prefer-regex-literals
680
+ urlRegex: new RegExp("^/mfn/v0/additionalSellerInputs$"),
681
+ rate: 1,
682
+ burst: 1
683
+ }
684
+ ];
685
+ var MerchantFulfillmentApiClient = class extends MerchantFulfillmentApi {
686
+ constructor(configuration) {
687
+ const { axios, endpoint } = createAxiosInstance(configuration, clientRateLimits);
688
+ super(new Configuration(), endpoint, axios);
689
+ }
690
+ };
691
+ export {
692
+ CarrierWillPickUpOption,
693
+ DangerousGoodsDetailsPackingGroupEnum,
694
+ DangerousGoodsDetailsPackingInstructionEnum,
695
+ DeliveryExperienceOption,
696
+ DeliveryExperienceType,
697
+ FileType,
698
+ HazmatType,
699
+ InputTargetType,
700
+ LabelFormat,
701
+ LiquidVolumeUnitEnum,
702
+ MerchantFulfillmentApi,
703
+ MerchantFulfillmentApiAxiosParamCreator,
704
+ MerchantFulfillmentApiClient,
705
+ MerchantFulfillmentApiFactory,
706
+ MerchantFulfillmentApiFp,
707
+ PredefinedPackageDimensions,
708
+ RateItemID,
709
+ RateItemType,
710
+ ShipmentStatus,
711
+ StandardIdForLabel,
712
+ UnitOfLength,
713
+ UnitOfWeight,
714
+ clientRateLimits
715
+ };
716
+ //# sourceMappingURL=index.js.map