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