@shipengine/alchemy 5.1.4 → 5.1.6

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 (3) hide show
  1. package/index.js +177 -119
  2. package/index.mjs +177 -120
  3. package/package.json +1 -1
package/index.mjs CHANGED
@@ -10764,17 +10764,17 @@ var AccountBillingPlanChangeType = /* @__PURE__ */ ((AccountBillingPlanChangeTyp
10764
10764
  return AccountBillingPlanChangeType2;
10765
10765
  })(AccountBillingPlanChangeType || {});
10766
10766
 
10767
- var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
10768
- var __hasOwnProp$i = Object.prototype.hasOwnProperty;
10769
- var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
10770
- var __objRest$d = (source, exclude) => {
10767
+ var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
10768
+ var __hasOwnProp$j = Object.prototype.hasOwnProperty;
10769
+ var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
10770
+ var __objRest$e = (source, exclude) => {
10771
10771
  var target = {};
10772
10772
  for (var prop in source)
10773
- if (__hasOwnProp$i.call(source, prop) && exclude.indexOf(prop) < 0)
10773
+ if (__hasOwnProp$j.call(source, prop) && exclude.indexOf(prop) < 0)
10774
10774
  target[prop] = source[prop];
10775
- if (source != null && __getOwnPropSymbols$i)
10776
- for (var prop of __getOwnPropSymbols$i(source)) {
10777
- if (exclude.indexOf(prop) < 0 && __propIsEnum$i.call(source, prop))
10775
+ if (source != null && __getOwnPropSymbols$j)
10776
+ for (var prop of __getOwnPropSymbols$j(source)) {
10777
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$j.call(source, prop))
10778
10778
  target[prop] = source[prop];
10779
10779
  }
10780
10780
  return target;
@@ -10788,7 +10788,7 @@ class CodedError {
10788
10788
  this.message = message;
10789
10789
  }
10790
10790
  static fromObject(_a) {
10791
- var _b = _a, { message } = _b, options = __objRest$d(_b, ["message"]);
10791
+ var _b = _a, { message } = _b, options = __objRest$e(_b, ["message"]);
10792
10792
  return new CodedError(message, options);
10793
10793
  }
10794
10794
  }
@@ -10896,17 +10896,17 @@ const types = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
10896
10896
  RateCardStatus
10897
10897
  }, Symbol.toStringTag, { value: 'Module' }));
10898
10898
 
10899
- var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
10900
- var __hasOwnProp$h = Object.prototype.hasOwnProperty;
10901
- var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
10902
- var __objRest$c = (source, exclude) => {
10899
+ var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
10900
+ var __hasOwnProp$i = Object.prototype.hasOwnProperty;
10901
+ var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
10902
+ var __objRest$d = (source, exclude) => {
10903
10903
  var target = {};
10904
10904
  for (var prop in source)
10905
- if (__hasOwnProp$h.call(source, prop) && exclude.indexOf(prop) < 0)
10905
+ if (__hasOwnProp$i.call(source, prop) && exclude.indexOf(prop) < 0)
10906
10906
  target[prop] = source[prop];
10907
- if (source != null && __getOwnPropSymbols$h)
10908
- for (var prop of __getOwnPropSymbols$h(source)) {
10909
- if (exclude.indexOf(prop) < 0 && __propIsEnum$h.call(source, prop))
10907
+ if (source != null && __getOwnPropSymbols$i)
10908
+ for (var prop of __getOwnPropSymbols$i(source)) {
10909
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$i.call(source, prop))
10910
10910
  target[prop] = source[prop];
10911
10911
  }
10912
10912
  return target;
@@ -10938,7 +10938,7 @@ class AccountSettingsAPI {
10938
10938
  * The `updateImage` method updates specific image data for a given image id.
10939
10939
  */
10940
10940
  this.updateImage = (_a) => {
10941
- var _b = _a, { labelImageId } = _b, data = __objRest$c(_b, ["labelImageId"]);
10941
+ var _b = _a, { labelImageId } = _b, data = __objRest$d(_b, ["labelImageId"]);
10942
10942
  return this.client.put(`/v1/account/settings/images/${labelImageId}`, data);
10943
10943
  };
10944
10944
  /**
@@ -13633,7 +13633,7 @@ var ipaddr = {
13633
13633
  }).call(commonjsGlobal);
13634
13634
  } (ipaddr));
13635
13635
 
13636
- var __async$D = (__this, __arguments, generator) => {
13636
+ var __async$E = (__this, __arguments, generator) => {
13637
13637
  return new Promise((resolve, reject) => {
13638
13638
  var fulfilled = (value) => {
13639
13639
  try {
@@ -13653,7 +13653,7 @@ var __async$D = (__this, __arguments, generator) => {
13653
13653
  step((generator = generator.apply(__this, __arguments)).next());
13654
13654
  });
13655
13655
  };
13656
- const getEndUserIpAddress = () => __async$D(void 0, null, function* () {
13656
+ const getEndUserIpAddress = () => __async$E(void 0, null, function* () {
13657
13657
  try {
13658
13658
  const response = yield axios.get("https://api.ipify.org/?format=json");
13659
13659
  if (response.data.ip && ipaddrExports.isValid(response.data.ip)) {
@@ -13668,35 +13668,35 @@ const getEndUserIpAddress = () => __async$D(void 0, null, function* () {
13668
13668
  var __defProp$6 = Object.defineProperty;
13669
13669
  var __defProps$3 = Object.defineProperties;
13670
13670
  var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
13671
- var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
13672
- var __hasOwnProp$g = Object.prototype.hasOwnProperty;
13673
- var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
13671
+ var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
13672
+ var __hasOwnProp$h = Object.prototype.hasOwnProperty;
13673
+ var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
13674
13674
  var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13675
13675
  var __spreadValues$6 = (a, b) => {
13676
13676
  for (var prop in b || (b = {}))
13677
- if (__hasOwnProp$g.call(b, prop))
13677
+ if (__hasOwnProp$h.call(b, prop))
13678
13678
  __defNormalProp$6(a, prop, b[prop]);
13679
- if (__getOwnPropSymbols$g)
13680
- for (var prop of __getOwnPropSymbols$g(b)) {
13681
- if (__propIsEnum$g.call(b, prop))
13679
+ if (__getOwnPropSymbols$h)
13680
+ for (var prop of __getOwnPropSymbols$h(b)) {
13681
+ if (__propIsEnum$h.call(b, prop))
13682
13682
  __defNormalProp$6(a, prop, b[prop]);
13683
13683
  }
13684
13684
  return a;
13685
13685
  };
13686
13686
  var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
13687
- var __objRest$b = (source, exclude) => {
13687
+ var __objRest$c = (source, exclude) => {
13688
13688
  var target = {};
13689
13689
  for (var prop in source)
13690
- if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)
13690
+ if (__hasOwnProp$h.call(source, prop) && exclude.indexOf(prop) < 0)
13691
13691
  target[prop] = source[prop];
13692
- if (source != null && __getOwnPropSymbols$g)
13693
- for (var prop of __getOwnPropSymbols$g(source)) {
13694
- if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))
13692
+ if (source != null && __getOwnPropSymbols$h)
13693
+ for (var prop of __getOwnPropSymbols$h(source)) {
13694
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$h.call(source, prop))
13695
13695
  target[prop] = source[prop];
13696
13696
  }
13697
13697
  return target;
13698
13698
  };
13699
- var __async$C = (__this, __arguments, generator) => {
13699
+ var __async$D = (__this, __arguments, generator) => {
13700
13700
  return new Promise((resolve, reject) => {
13701
13701
  var fulfilled = (value) => {
13702
13702
  try {
@@ -13734,8 +13734,8 @@ class CarriersAPI {
13734
13734
  /**
13735
13735
  * The `connect` method connects a carrier account to a user's ShipEngine account.
13736
13736
  */
13737
- this.connect = (_a) => __async$C(this, null, function* () {
13738
- var _b = _a, { carrierCode } = _b, connection = __objRest$b(_b, ["carrierCode"]);
13737
+ this.connect = (_a) => __async$D(this, null, function* () {
13738
+ var _b = _a, { carrierCode } = _b, connection = __objRest$c(_b, ["carrierCode"]);
13739
13739
  const endUserIpAddress = yield getEndUserIpAddress();
13740
13740
  if (!endUserIpAddress)
13741
13741
  return Promise.reject([new CodedError("Unable to get IP address")]);
@@ -16051,22 +16051,22 @@ class CustomPackagesAPI {
16051
16051
  }
16052
16052
 
16053
16053
  var __defProp$5 = Object.defineProperty;
16054
- var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
16055
- var __hasOwnProp$f = Object.prototype.hasOwnProperty;
16056
- var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
16054
+ var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
16055
+ var __hasOwnProp$g = Object.prototype.hasOwnProperty;
16056
+ var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
16057
16057
  var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16058
16058
  var __spreadValues$5 = (a, b) => {
16059
16059
  for (var prop in b || (b = {}))
16060
- if (__hasOwnProp$f.call(b, prop))
16060
+ if (__hasOwnProp$g.call(b, prop))
16061
16061
  __defNormalProp$5(a, prop, b[prop]);
16062
- if (__getOwnPropSymbols$f)
16063
- for (var prop of __getOwnPropSymbols$f(b)) {
16064
- if (__propIsEnum$f.call(b, prop))
16062
+ if (__getOwnPropSymbols$g)
16063
+ for (var prop of __getOwnPropSymbols$g(b)) {
16064
+ if (__propIsEnum$g.call(b, prop))
16065
16065
  __defNormalProp$5(a, prop, b[prop]);
16066
16066
  }
16067
16067
  return a;
16068
16068
  };
16069
- var __async$B = (__this, __arguments, generator) => {
16069
+ var __async$C = (__this, __arguments, generator) => {
16070
16070
  return new Promise((resolve, reject) => {
16071
16071
  var fulfilled = (value) => {
16072
16072
  try {
@@ -16105,7 +16105,7 @@ class FundingSourcesAPI {
16105
16105
  * The `create` method creates a new funding source for a given user. This requires
16106
16106
  * payment information to be collected from the user.
16107
16107
  */
16108
- this.create = (createFundingSource) => __async$B(this, null, function* () {
16108
+ this.create = (createFundingSource) => __async$C(this, null, function* () {
16109
16109
  const endUserIpAddress = yield getEndUserIpAddress();
16110
16110
  if (!endUserIpAddress)
16111
16111
  return Promise.reject([new CodedError("Unable to get IP address")]);
@@ -16118,7 +16118,7 @@ class FundingSourcesAPI {
16118
16118
  * user to update the billing address or payment information associated with the
16119
16119
  * funding source.
16120
16120
  */
16121
- this.update = (billingInfo, creditCardInfo, fundingSourceId) => __async$B(this, null, function* () {
16121
+ this.update = (billingInfo, creditCardInfo, fundingSourceId) => __async$C(this, null, function* () {
16122
16122
  const endUserIpAddress = yield getEndUserIpAddress();
16123
16123
  if (!endUserIpAddress)
16124
16124
  return Promise.reject([new CodedError("Unable to get IP address")]);
@@ -16135,7 +16135,7 @@ class FundingSourcesAPI {
16135
16135
  * The `registerCarrier` method registers a carrier account and associates
16136
16136
  * it with a given funding source.
16137
16137
  */
16138
- this.registerCarrier = (carrier) => __async$B(this, null, function* () {
16138
+ this.registerCarrier = (carrier) => __async$C(this, null, function* () {
16139
16139
  const endUserIpAddress = yield getEndUserIpAddress();
16140
16140
  if (!endUserIpAddress)
16141
16141
  return Promise.reject([new CodedError("Unable to get IP address")]);
@@ -16146,7 +16146,7 @@ class FundingSourcesAPI {
16146
16146
  /**
16147
16147
  * The `addFunds` method allows you to add funds to a funding source.
16148
16148
  */
16149
- this.addFunds = (amount, fundingSourceId) => __async$B(this, null, function* () {
16149
+ this.addFunds = (amount, fundingSourceId) => __async$C(this, null, function* () {
16150
16150
  return yield this.client.put(
16151
16151
  `/v1/funding_sources/${fundingSourceId}/add_funds`,
16152
16152
  amount
@@ -16156,7 +16156,7 @@ class FundingSourcesAPI {
16156
16156
  * The `metadata` method returns seller-specific requirements for creating funding sources
16157
16157
  * and attaching carriers
16158
16158
  */
16159
- this.metadata = () => __async$B(this, null, function* () {
16159
+ this.metadata = () => __async$C(this, null, function* () {
16160
16160
  return yield this.client.get("/v1/funding_sources/metadata");
16161
16161
  });
16162
16162
  /**
@@ -16185,6 +16185,15 @@ class InsuranceAPI {
16185
16185
  this.get = (insuranceProvider) => {
16186
16186
  return this.client.get(`/v1/insurance/${insuranceProvider}/balance`);
16187
16187
  };
16188
+ /**
16189
+ * The `addFunds` method add funds to the account balance of the given `insuranceProvider`.
16190
+ */
16191
+ this.addFunds = (insuranceProvider, params) => {
16192
+ return this.client.patch(
16193
+ `/v1/insurance/${insuranceProvider}/add_funds`,
16194
+ params
16195
+ );
16196
+ };
16188
16197
  this.client = client;
16189
16198
  }
16190
16199
  }
@@ -16405,7 +16414,7 @@ class SalesOrdersAPI {
16405
16414
  }
16406
16415
  }
16407
16416
 
16408
- var __async$A = (__this, __arguments, generator) => {
16417
+ var __async$B = (__this, __arguments, generator) => {
16409
16418
  return new Promise((resolve, reject) => {
16410
16419
  var fulfilled = (value) => {
16411
16420
  try {
@@ -16448,7 +16457,7 @@ class ShipmentsAPI {
16448
16457
  * The `create` method allows for creating shipments based on a list of shipment
16449
16458
  * items passed into this method.
16450
16459
  */
16451
- this.create = (...shipments) => __async$A(this, null, function* () {
16460
+ this.create = (...shipments) => __async$B(this, null, function* () {
16452
16461
  return this.client.post("/v1/shipments", {
16453
16462
  shipments
16454
16463
  });
@@ -16555,23 +16564,23 @@ class WarehousesAPI {
16555
16564
  var __defProp$4 = Object.defineProperty;
16556
16565
  var __defProps$2 = Object.defineProperties;
16557
16566
  var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
16558
- var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
16559
- var __hasOwnProp$e = Object.prototype.hasOwnProperty;
16560
- var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
16567
+ var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
16568
+ var __hasOwnProp$f = Object.prototype.hasOwnProperty;
16569
+ var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
16561
16570
  var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16562
16571
  var __spreadValues$4 = (a, b) => {
16563
16572
  for (var prop in b || (b = {}))
16564
- if (__hasOwnProp$e.call(b, prop))
16573
+ if (__hasOwnProp$f.call(b, prop))
16565
16574
  __defNormalProp$4(a, prop, b[prop]);
16566
- if (__getOwnPropSymbols$e)
16567
- for (var prop of __getOwnPropSymbols$e(b)) {
16568
- if (__propIsEnum$e.call(b, prop))
16575
+ if (__getOwnPropSymbols$f)
16576
+ for (var prop of __getOwnPropSymbols$f(b)) {
16577
+ if (__propIsEnum$f.call(b, prop))
16569
16578
  __defNormalProp$4(a, prop, b[prop]);
16570
16579
  }
16571
16580
  return a;
16572
16581
  };
16573
16582
  var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
16574
- var __async$z = (__this, __arguments, generator) => {
16583
+ var __async$A = (__this, __arguments, generator) => {
16575
16584
  return new Promise((resolve, reject) => {
16576
16585
  var fulfilled = (value) => {
16577
16586
  try {
@@ -16665,7 +16674,7 @@ class ShipEngineAPI {
16665
16674
  );
16666
16675
  return res;
16667
16676
  },
16668
- (err) => __async$z(this, null, function* () {
16677
+ (err) => __async$A(this, null, function* () {
16669
16678
  var _a, _b, _c, _d, _e, _f;
16670
16679
  logger$1.error(
16671
16680
  { err, req: err.config, res: err.response },
@@ -16923,17 +16932,17 @@ const onError = (_errors) => _default();
16923
16932
  var __defProp$3 = Object.defineProperty;
16924
16933
  var __defProps$1 = Object.defineProperties;
16925
16934
  var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
16926
- var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
16927
- var __hasOwnProp$d = Object.prototype.hasOwnProperty;
16928
- var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
16935
+ var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
16936
+ var __hasOwnProp$e = Object.prototype.hasOwnProperty;
16937
+ var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
16929
16938
  var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16930
16939
  var __spreadValues$3 = (a, b) => {
16931
16940
  for (var prop in b || (b = {}))
16932
- if (__hasOwnProp$d.call(b, prop))
16941
+ if (__hasOwnProp$e.call(b, prop))
16933
16942
  __defNormalProp$3(a, prop, b[prop]);
16934
- if (__getOwnPropSymbols$d)
16935
- for (var prop of __getOwnPropSymbols$d(b)) {
16936
- if (__propIsEnum$d.call(b, prop))
16943
+ if (__getOwnPropSymbols$e)
16944
+ for (var prop of __getOwnPropSymbols$e(b)) {
16945
+ if (__propIsEnum$e.call(b, prop))
16937
16946
  __defNormalProp$3(a, prop, b[prop]);
16938
16947
  }
16939
16948
  return a;
@@ -16972,7 +16981,7 @@ const retryUntil = (callbackFn, retries = 10, timeoutBetweenAttempts = 1e3) => P
16972
16981
  throw error;
16973
16982
  });
16974
16983
 
16975
- var __async$y = (__this, __arguments, generator) => {
16984
+ var __async$z = (__this, __arguments, generator) => {
16976
16985
  return new Promise((resolve, reject) => {
16977
16986
  var fulfilled = (value) => {
16978
16987
  try {
@@ -16995,7 +17004,7 @@ var __async$y = (__this, __arguments, generator) => {
16995
17004
  const useCreateAccountImage = () => {
16996
17005
  const { client } = useShipEngine();
16997
17006
  return useMutation({
16998
- mutationFn: (data) => __async$y(void 0, null, function* () {
17007
+ mutationFn: (data) => __async$z(void 0, null, function* () {
16999
17008
  const result = yield client.accountSettings.createImage(data);
17000
17009
  return result.data;
17001
17010
  }),
@@ -17004,7 +17013,7 @@ const useCreateAccountImage = () => {
17004
17013
  });
17005
17014
  };
17006
17015
 
17007
- var __async$x = (__this, __arguments, generator) => {
17016
+ var __async$y = (__this, __arguments, generator) => {
17008
17017
  return new Promise((resolve, reject) => {
17009
17018
  var fulfilled = (value) => {
17010
17019
  try {
@@ -17027,7 +17036,7 @@ var __async$x = (__this, __arguments, generator) => {
17027
17036
  const useDeleteAccountImage = () => {
17028
17037
  const { client } = useShipEngine();
17029
17038
  return useMutation({
17030
- mutationFn: (labelImageId) => __async$x(void 0, null, function* () {
17039
+ mutationFn: (labelImageId) => __async$y(void 0, null, function* () {
17031
17040
  const result = yield client.accountSettings.deleteImage(labelImageId);
17032
17041
  return result.data;
17033
17042
  }),
@@ -17056,7 +17065,7 @@ const useGetAccountSettings = () => {
17056
17065
  });
17057
17066
  };
17058
17067
 
17059
- var __async$w = (__this, __arguments, generator) => {
17068
+ var __async$x = (__this, __arguments, generator) => {
17060
17069
  return new Promise((resolve, reject) => {
17061
17070
  var fulfilled = (value) => {
17062
17071
  try {
@@ -17079,7 +17088,7 @@ var __async$w = (__this, __arguments, generator) => {
17079
17088
  const useUpdateAccountImage = () => {
17080
17089
  const { client } = useShipEngine();
17081
17090
  return useMutation({
17082
- mutationFn: (data) => __async$w(void 0, null, function* () {
17091
+ mutationFn: (data) => __async$x(void 0, null, function* () {
17083
17092
  const result = yield client.accountSettings.updateImage(data);
17084
17093
  return result.data;
17085
17094
  }),
@@ -17088,7 +17097,7 @@ const useUpdateAccountImage = () => {
17088
17097
  });
17089
17098
  };
17090
17099
 
17091
- var __async$v = (__this, __arguments, generator) => {
17100
+ var __async$w = (__this, __arguments, generator) => {
17092
17101
  return new Promise((resolve, reject) => {
17093
17102
  var fulfilled = (value) => {
17094
17103
  try {
@@ -17111,7 +17120,7 @@ var __async$v = (__this, __arguments, generator) => {
17111
17120
  const useUpdateAccountSettings = () => {
17112
17121
  const { client } = useShipEngine();
17113
17122
  return useMutation({
17114
- mutationFn: (settings) => __async$v(void 0, null, function* () {
17123
+ mutationFn: (settings) => __async$w(void 0, null, function* () {
17115
17124
  const result = yield client.accountSettings.update(settings);
17116
17125
  return result.data;
17117
17126
  }),
@@ -17120,7 +17129,7 @@ const useUpdateAccountSettings = () => {
17120
17129
  });
17121
17130
  };
17122
17131
 
17123
- var __async$u = (__this, __arguments, generator) => {
17132
+ var __async$v = (__this, __arguments, generator) => {
17124
17133
  return new Promise((resolve, reject) => {
17125
17134
  var fulfilled = (value) => {
17126
17135
  try {
@@ -17143,7 +17152,7 @@ var __async$u = (__this, __arguments, generator) => {
17143
17152
  const useParseAddress = () => {
17144
17153
  const { client } = useShipEngine();
17145
17154
  return useMutation({
17146
- mutationFn: (_0) => __async$u(void 0, [_0], function* ({ address, text }) {
17155
+ mutationFn: (_0) => __async$v(void 0, [_0], function* ({ address, text }) {
17147
17156
  const result = yield client.addresses.parse(text, address);
17148
17157
  return result.data;
17149
17158
  }),
@@ -17152,7 +17161,7 @@ const useParseAddress = () => {
17152
17161
  });
17153
17162
  };
17154
17163
 
17155
- var __async$t = (__this, __arguments, generator) => {
17164
+ var __async$u = (__this, __arguments, generator) => {
17156
17165
  return new Promise((resolve, reject) => {
17157
17166
  var fulfilled = (value) => {
17158
17167
  try {
@@ -17175,7 +17184,7 @@ var __async$t = (__this, __arguments, generator) => {
17175
17184
  const useValidateAddresses = () => {
17176
17185
  const { client } = useShipEngine();
17177
17186
  return useMutation({
17178
- mutationFn: (addresses) => __async$t(void 0, null, function* () {
17187
+ mutationFn: (addresses) => __async$u(void 0, null, function* () {
17179
17188
  const result = yield client.addresses.validate(addresses);
17180
17189
  return result.data;
17181
17190
  }),
@@ -17184,7 +17193,7 @@ const useValidateAddresses = () => {
17184
17193
  });
17185
17194
  };
17186
17195
 
17187
- var __async$s = (__this, __arguments, generator) => {
17196
+ var __async$t = (__this, __arguments, generator) => {
17188
17197
  return new Promise((resolve, reject) => {
17189
17198
  var fulfilled = (value) => {
17190
17199
  try {
@@ -17207,7 +17216,7 @@ var __async$s = (__this, __arguments, generator) => {
17207
17216
  const useAddFunds = () => {
17208
17217
  const { client } = useShipEngine();
17209
17218
  return useMutation({
17210
- mutationFn: (_0) => __async$s(void 0, [_0], function* ({ carrierId, funds }) {
17219
+ mutationFn: (_0) => __async$t(void 0, [_0], function* ({ carrierId, funds }) {
17211
17220
  const result = yield client.carriers.addFunds(carrierId, funds);
17212
17221
  return result.data;
17213
17222
  }),
@@ -17216,7 +17225,7 @@ const useAddFunds = () => {
17216
17225
  });
17217
17226
  };
17218
17227
 
17219
- var __async$r = (__this, __arguments, generator) => {
17228
+ var __async$s = (__this, __arguments, generator) => {
17220
17229
  return new Promise((resolve, reject) => {
17221
17230
  var fulfilled = (value) => {
17222
17231
  try {
@@ -17239,7 +17248,7 @@ var __async$r = (__this, __arguments, generator) => {
17239
17248
  const useConnectCarrier = () => {
17240
17249
  const { client } = useShipEngine();
17241
17250
  return useMutation({
17242
- mutationFn: (params) => __async$r(void 0, null, function* () {
17251
+ mutationFn: (params) => __async$s(void 0, null, function* () {
17243
17252
  const result = yield client.carriers.connect(params);
17244
17253
  return result.data;
17245
17254
  }),
@@ -17358,22 +17367,22 @@ const useListCarriers = () => {
17358
17367
  });
17359
17368
  };
17360
17369
 
17361
- var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
17362
- var __hasOwnProp$c = Object.prototype.hasOwnProperty;
17363
- var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
17364
- var __objRest$a = (source, exclude) => {
17370
+ var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
17371
+ var __hasOwnProp$d = Object.prototype.hasOwnProperty;
17372
+ var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
17373
+ var __objRest$b = (source, exclude) => {
17365
17374
  var target = {};
17366
17375
  for (var prop in source)
17367
- if (__hasOwnProp$c.call(source, prop) && exclude.indexOf(prop) < 0)
17376
+ if (__hasOwnProp$d.call(source, prop) && exclude.indexOf(prop) < 0)
17368
17377
  target[prop] = source[prop];
17369
- if (source != null && __getOwnPropSymbols$c)
17370
- for (var prop of __getOwnPropSymbols$c(source)) {
17371
- if (exclude.indexOf(prop) < 0 && __propIsEnum$c.call(source, prop))
17378
+ if (source != null && __getOwnPropSymbols$d)
17379
+ for (var prop of __getOwnPropSymbols$d(source)) {
17380
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$d.call(source, prop))
17372
17381
  target[prop] = source[prop];
17373
17382
  }
17374
17383
  return target;
17375
17384
  };
17376
- var __async$q = (__this, __arguments, generator) => {
17385
+ var __async$r = (__this, __arguments, generator) => {
17377
17386
  return new Promise((resolve, reject) => {
17378
17387
  var fulfilled = (value) => {
17379
17388
  try {
@@ -17397,8 +17406,8 @@ const useUpdateAutoFunding = () => {
17397
17406
  const { client } = useShipEngine();
17398
17407
  const queryClient = useQueryClient();
17399
17408
  return useMutation({
17400
- mutationFn: (_a) => __async$q(void 0, null, function* () {
17401
- var _b = _a, { carrierId } = _b, options = __objRest$a(_b, ["carrierId"]);
17409
+ mutationFn: (_a) => __async$r(void 0, null, function* () {
17410
+ var _b = _a, { carrierId } = _b, options = __objRest$b(_b, ["carrierId"]);
17402
17411
  const result = yield client.carriers.updateAutoFunding(carrierId, options);
17403
17412
  return result.data;
17404
17413
  }),
@@ -17427,24 +17436,24 @@ const useGetZonesByCarrier = (carrierId) => {
17427
17436
  });
17428
17437
  };
17429
17438
 
17430
- var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
17431
- var __hasOwnProp$b = Object.prototype.hasOwnProperty;
17432
- var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
17433
- var __objRest$9 = (source, exclude) => {
17439
+ var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
17440
+ var __hasOwnProp$c = Object.prototype.hasOwnProperty;
17441
+ var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
17442
+ var __objRest$a = (source, exclude) => {
17434
17443
  var target = {};
17435
17444
  for (var prop in source)
17436
- if (__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0)
17445
+ if (__hasOwnProp$c.call(source, prop) && exclude.indexOf(prop) < 0)
17437
17446
  target[prop] = source[prop];
17438
- if (source != null && __getOwnPropSymbols$b)
17439
- for (var prop of __getOwnPropSymbols$b(source)) {
17440
- if (exclude.indexOf(prop) < 0 && __propIsEnum$b.call(source, prop))
17447
+ if (source != null && __getOwnPropSymbols$c)
17448
+ for (var prop of __getOwnPropSymbols$c(source)) {
17449
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$c.call(source, prop))
17441
17450
  target[prop] = source[prop];
17442
17451
  }
17443
17452
  return target;
17444
17453
  };
17445
17454
  const useGetCarrierConnectionForm = (_params) => {
17446
17455
  const { client } = useShipEngine();
17447
- const _a = _params || {}, { carrierName, enabled = true } = _a, params = __objRest$9(_a, ["carrierName", "enabled"]);
17456
+ const _a = _params || {}, { carrierName, enabled = true } = _a, params = __objRest$a(_a, ["carrierName", "enabled"]);
17448
17457
  return useQuery({
17449
17458
  enabled,
17450
17459
  onError,
@@ -17454,24 +17463,24 @@ const useGetCarrierConnectionForm = (_params) => {
17454
17463
  });
17455
17464
  };
17456
17465
 
17457
- var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
17458
- var __hasOwnProp$a = Object.prototype.hasOwnProperty;
17459
- var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
17460
- var __objRest$8 = (source, exclude) => {
17466
+ var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
17467
+ var __hasOwnProp$b = Object.prototype.hasOwnProperty;
17468
+ var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
17469
+ var __objRest$9 = (source, exclude) => {
17461
17470
  var target = {};
17462
17471
  for (var prop in source)
17463
- if (__hasOwnProp$a.call(source, prop) && exclude.indexOf(prop) < 0)
17472
+ if (__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0)
17464
17473
  target[prop] = source[prop];
17465
- if (source != null && __getOwnPropSymbols$a)
17466
- for (var prop of __getOwnPropSymbols$a(source)) {
17467
- if (exclude.indexOf(prop) < 0 && __propIsEnum$a.call(source, prop))
17474
+ if (source != null && __getOwnPropSymbols$b)
17475
+ for (var prop of __getOwnPropSymbols$b(source)) {
17476
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$b.call(source, prop))
17468
17477
  target[prop] = source[prop];
17469
17478
  }
17470
17479
  return target;
17471
17480
  };
17472
17481
  const useListCarrierConnections = (_params) => {
17473
17482
  const { client } = useShipEngine();
17474
- const _a = _params || {}, { enabled = true } = _a, params = __objRest$8(_a, ["enabled"]);
17483
+ const _a = _params || {}, { enabled = true } = _a, params = __objRest$9(_a, ["enabled"]);
17475
17484
  return useQuery({
17476
17485
  enabled,
17477
17486
  onError,
@@ -17491,7 +17500,7 @@ const useListCustomPackageTypes = () => {
17491
17500
  });
17492
17501
  };
17493
17502
 
17494
- var __async$p = (__this, __arguments, generator) => {
17503
+ var __async$q = (__this, __arguments, generator) => {
17495
17504
  return new Promise((resolve, reject) => {
17496
17505
  var fulfilled = (value) => {
17497
17506
  try {
@@ -17514,7 +17523,7 @@ var __async$p = (__this, __arguments, generator) => {
17514
17523
  const useCreateFundingSource = () => {
17515
17524
  const { client } = useShipEngine();
17516
17525
  return useMutation({
17517
- mutationFn: (fundingSource) => __async$p(void 0, null, function* () {
17526
+ mutationFn: (fundingSource) => __async$q(void 0, null, function* () {
17518
17527
  const result = yield client.fundingSources.create(fundingSource);
17519
17528
  return result.data;
17520
17529
  }),
@@ -17523,7 +17532,7 @@ const useCreateFundingSource = () => {
17523
17532
  });
17524
17533
  };
17525
17534
 
17526
- var __async$o = (__this, __arguments, generator) => {
17535
+ var __async$p = (__this, __arguments, generator) => {
17527
17536
  return new Promise((resolve, reject) => {
17528
17537
  var fulfilled = (value) => {
17529
17538
  try {
@@ -17546,7 +17555,7 @@ var __async$o = (__this, __arguments, generator) => {
17546
17555
  const useFundingSourcesAddFunds = () => {
17547
17556
  const { client } = useShipEngine();
17548
17557
  return useMutation({
17549
- mutationFn: (_0) => __async$o(void 0, [_0], function* ({ funds, fundingSourceId }) {
17558
+ mutationFn: (_0) => __async$p(void 0, [_0], function* ({ funds, fundingSourceId }) {
17550
17559
  const result = yield client.fundingSources.addFunds(funds, fundingSourceId);
17551
17560
  return result.data;
17552
17561
  }),
@@ -17575,7 +17584,7 @@ const useListFundingSources = () => {
17575
17584
  });
17576
17585
  };
17577
17586
 
17578
- var __async$n = (__this, __arguments, generator) => {
17587
+ var __async$o = (__this, __arguments, generator) => {
17579
17588
  return new Promise((resolve, reject) => {
17580
17589
  var fulfilled = (value) => {
17581
17590
  try {
@@ -17598,7 +17607,7 @@ var __async$n = (__this, __arguments, generator) => {
17598
17607
  const useRegisterCarrier = () => {
17599
17608
  const { client } = useShipEngine();
17600
17609
  return useMutation({
17601
- mutationFn: (carrier) => __async$n(void 0, null, function* () {
17610
+ mutationFn: (carrier) => __async$o(void 0, null, function* () {
17602
17611
  const result = yield client.fundingSources.registerCarrier(carrier);
17603
17612
  return result.data;
17604
17613
  }),
@@ -17607,7 +17616,7 @@ const useRegisterCarrier = () => {
17607
17616
  });
17608
17617
  };
17609
17618
 
17610
- var __async$m = (__this, __arguments, generator) => {
17619
+ var __async$n = (__this, __arguments, generator) => {
17611
17620
  return new Promise((resolve, reject) => {
17612
17621
  var fulfilled = (value) => {
17613
17622
  try {
@@ -17630,7 +17639,7 @@ var __async$m = (__this, __arguments, generator) => {
17630
17639
  const useUpdateFundingSource = () => {
17631
17640
  const { client } = useShipEngine();
17632
17641
  return useMutation({
17633
- mutationFn: (_0) => __async$m(void 0, [_0], function* ({
17642
+ mutationFn: (_0) => __async$n(void 0, [_0], function* ({
17634
17643
  billingInfo,
17635
17644
  creditCardInfo,
17636
17645
  fundingSourceId
@@ -17684,6 +17693,54 @@ const useGetInsuranceAccount = (insuranceProvider) => {
17684
17693
  });
17685
17694
  };
17686
17695
 
17696
+ var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
17697
+ var __hasOwnProp$a = Object.prototype.hasOwnProperty;
17698
+ var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
17699
+ var __objRest$8 = (source, exclude) => {
17700
+ var target = {};
17701
+ for (var prop in source)
17702
+ if (__hasOwnProp$a.call(source, prop) && exclude.indexOf(prop) < 0)
17703
+ target[prop] = source[prop];
17704
+ if (source != null && __getOwnPropSymbols$a)
17705
+ for (var prop of __getOwnPropSymbols$a(source)) {
17706
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$a.call(source, prop))
17707
+ target[prop] = source[prop];
17708
+ }
17709
+ return target;
17710
+ };
17711
+ var __async$m = (__this, __arguments, generator) => {
17712
+ return new Promise((resolve, reject) => {
17713
+ var fulfilled = (value) => {
17714
+ try {
17715
+ step(generator.next(value));
17716
+ } catch (e) {
17717
+ reject(e);
17718
+ }
17719
+ };
17720
+ var rejected = (value) => {
17721
+ try {
17722
+ step(generator.throw(value));
17723
+ } catch (e) {
17724
+ reject(e);
17725
+ }
17726
+ };
17727
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
17728
+ step((generator = generator.apply(__this, __arguments)).next());
17729
+ });
17730
+ };
17731
+ const useAddInsuranceFunds = () => {
17732
+ const { client } = useShipEngine();
17733
+ return useMutation({
17734
+ mutationFn: (_a) => __async$m(void 0, null, function* () {
17735
+ var _b = _a, { insuranceProvider } = _b, rest = __objRest$8(_b, ["insuranceProvider"]);
17736
+ const result = yield client.insurance.addFunds(insuranceProvider, rest);
17737
+ return result.data;
17738
+ }),
17739
+ mutationKey: ["useAddInsuranceFunds"],
17740
+ onError
17741
+ });
17742
+ };
17743
+
17687
17744
  var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
17688
17745
  var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
17689
17746
  var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
@@ -19882,4 +19939,4 @@ const alchemy = {
19882
19939
  createElement
19883
19940
  };
19884
19941
 
19885
- export { AccountSettingsAPI, AddressesAPI, AlchemyContext, AlchemyProvider, AlchemyTestProvider, CarriersAPI, CodedError, ConfirmationType, ConnectionsAPI, CreditCardVendor, Currency, CustomPackagesAPI, CustomsContentsType, CustomsNonDeliveryType, Element, ErrorBoundary, FundingSourcesAPI, InsuranceAPI, InsuranceProviderType, LabelsAPI, MetadataCapability, MetadataRequirement, MetadataSatisfyingFormTypes, OrderSourcesAPI, RateCardStatus, RateCardsAPI, RatesAPI, types as SE, SalesOrderShipmentsAPI, SalesOrdersAPI, ShipEngine, ShipEngineAPI, ShipEngineContext, ShipmentsAPI, ShippingRulesAPI, ThemesAPI, WarehousesAPI, alchemy, alchemy as default, delay, getEmotionCache, getEndUserIpAddress, isCodedError, isCodedErrors, isDataCodedErrors, logger, onError, parseError, retryUntil, useAddFunds, useAlchemy, useCalculateRates, useConnectCarrier, useCreateAccountImage, useCreateFundingSource, useCreateLabel, useCreateRateCard, useCreateSalesOrderShipment, useCreateShipment, useCreateShippingRule, useCreateWarehouse, useDeactivateOrderSource, useDeleteAccountImage, useDeleteRateCard, useDeleteShippingRule, useDeleteWarehouse, useDownloadRateCard, useEditShippingRule, useFundingSourcesAddFunds, useGetAccountBillingPlan, useGetAccountImages, useGetAccountSettings, useGetAutoFundingConfiguration, useGetCarrierById, useGetCarrierConnectionForm, useGetCountriesByCarrier, useGetCurrenciesByCarrier, useGetFundingSourceById, useGetFundingSourceMetadata, useGetFundingSourceTransactions, useGetInsuranceAccount, useGetLabel, useGetPackageRatingGroupByCarrier, useGetRateCardById, useGetSalesOrder, useGetSalesOrderShipment, useGetServicesByCarrier, useGetShipment, useGetShipmentRates, useGetShippingRuleById, useGetShippingRuleConditionsOptions, useGetThemeById, useGetZonesByCarrier, useI18n, useListCarrierConnections, useListCarriers, useListCustomPackageTypes, useListFundingSources, useListLabels, useListOrderSources, useListRateCards, useListSalesOrderShipments, useListSalesOrders, useListShipments, useListShippingRules, useListWarehouses, useLoadIcons, useNotifySalesOrderShipped, useParseAddress, usePublishRateCard, useRefreshOrderSource, useRefreshOrderSourceAsync, useRegisterCarrier, useShipEngine, useUpdateAccountBillingPlan, useUpdateAccountImage, useUpdateAccountSettings, useUpdateAutoFunding, useUpdateFundingSource, useUpdateRateCard, useUpdateSalesOrderShipment, useUpdateWarehouse, useUploadRateCard, useValidateAddresses, useVoidLabel };
19942
+ export { AccountSettingsAPI, AddressesAPI, AlchemyContext, AlchemyProvider, AlchemyTestProvider, CarriersAPI, CodedError, ConfirmationType, ConnectionsAPI, CreditCardVendor, Currency, CustomPackagesAPI, CustomsContentsType, CustomsNonDeliveryType, Element, ErrorBoundary, FundingSourcesAPI, InsuranceAPI, InsuranceProviderType, LabelsAPI, MetadataCapability, MetadataRequirement, MetadataSatisfyingFormTypes, OrderSourcesAPI, RateCardStatus, RateCardsAPI, RatesAPI, types as SE, SalesOrderShipmentsAPI, SalesOrdersAPI, ShipEngine, ShipEngineAPI, ShipEngineContext, ShipmentsAPI, ShippingRulesAPI, ThemesAPI, WarehousesAPI, alchemy, alchemy as default, delay, getEmotionCache, getEndUserIpAddress, isCodedError, isCodedErrors, isDataCodedErrors, logger, onError, parseError, retryUntil, useAddFunds, useAddInsuranceFunds, useAlchemy, useCalculateRates, useConnectCarrier, useCreateAccountImage, useCreateFundingSource, useCreateLabel, useCreateRateCard, useCreateSalesOrderShipment, useCreateShipment, useCreateShippingRule, useCreateWarehouse, useDeactivateOrderSource, useDeleteAccountImage, useDeleteRateCard, useDeleteShippingRule, useDeleteWarehouse, useDownloadRateCard, useEditShippingRule, useFundingSourcesAddFunds, useGetAccountBillingPlan, useGetAccountImages, useGetAccountSettings, useGetAutoFundingConfiguration, useGetCarrierById, useGetCarrierConnectionForm, useGetCountriesByCarrier, useGetCurrenciesByCarrier, useGetFundingSourceById, useGetFundingSourceMetadata, useGetFundingSourceTransactions, useGetInsuranceAccount, useGetLabel, useGetPackageRatingGroupByCarrier, useGetRateCardById, useGetSalesOrder, useGetSalesOrderShipment, useGetServicesByCarrier, useGetShipment, useGetShipmentRates, useGetShippingRuleById, useGetShippingRuleConditionsOptions, useGetThemeById, useGetZonesByCarrier, useI18n, useListCarrierConnections, useListCarriers, useListCustomPackageTypes, useListFundingSources, useListLabels, useListOrderSources, useListRateCards, useListSalesOrderShipments, useListSalesOrders, useListShipments, useListShippingRules, useListWarehouses, useLoadIcons, useNotifySalesOrderShipped, useParseAddress, usePublishRateCard, useRefreshOrderSource, useRefreshOrderSourceAsync, useRegisterCarrier, useShipEngine, useUpdateAccountBillingPlan, useUpdateAccountImage, useUpdateAccountSettings, useUpdateAutoFunding, useUpdateFundingSource, useUpdateRateCard, useUpdateSalesOrderShipment, useUpdateWarehouse, useUploadRateCard, useValidateAddresses, useVoidLabel };