@shipengine/alchemy 5.4.14 → 5.4.16

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 +305 -178
  2. package/index.mjs +304 -179
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -10812,17 +10812,17 @@ var AccountBillingPlanChangeType = /* @__PURE__ */ ((AccountBillingPlanChangeTyp
10812
10812
  return AccountBillingPlanChangeType2;
10813
10813
  })(AccountBillingPlanChangeType || {});
10814
10814
 
10815
- var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
10816
- var __hasOwnProp$r = Object.prototype.hasOwnProperty;
10817
- var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
10818
- var __objRest$f = (source, exclude) => {
10815
+ var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
10816
+ var __hasOwnProp$t = Object.prototype.hasOwnProperty;
10817
+ var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
10818
+ var __objRest$g = (source, exclude) => {
10819
10819
  var target = {};
10820
10820
  for (var prop in source)
10821
- if (__hasOwnProp$r.call(source, prop) && exclude.indexOf(prop) < 0)
10821
+ if (__hasOwnProp$t.call(source, prop) && exclude.indexOf(prop) < 0)
10822
10822
  target[prop] = source[prop];
10823
- if (source != null && __getOwnPropSymbols$r)
10824
- for (var prop of __getOwnPropSymbols$r(source)) {
10825
- if (exclude.indexOf(prop) < 0 && __propIsEnum$r.call(source, prop))
10823
+ if (source != null && __getOwnPropSymbols$t)
10824
+ for (var prop of __getOwnPropSymbols$t(source)) {
10825
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$t.call(source, prop))
10826
10826
  target[prop] = source[prop];
10827
10827
  }
10828
10828
  return target;
@@ -10836,7 +10836,7 @@ class CodedError {
10836
10836
  this.message = message;
10837
10837
  }
10838
10838
  static fromObject(_a) {
10839
- var _b = _a, { message } = _b, options = __objRest$f(_b, ["message"]);
10839
+ var _b = _a, { message } = _b, options = __objRest$g(_b, ["message"]);
10840
10840
  return new CodedError(message, options);
10841
10841
  }
10842
10842
  }
@@ -10944,17 +10944,17 @@ const types = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
10944
10944
  RateCardStatus
10945
10945
  }, Symbol.toStringTag, { value: 'Module' }));
10946
10946
 
10947
- var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
10948
- var __hasOwnProp$q = Object.prototype.hasOwnProperty;
10949
- var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
10950
- var __objRest$e = (source, exclude) => {
10947
+ var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
10948
+ var __hasOwnProp$s = Object.prototype.hasOwnProperty;
10949
+ var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
10950
+ var __objRest$f = (source, exclude) => {
10951
10951
  var target = {};
10952
10952
  for (var prop in source)
10953
- if (__hasOwnProp$q.call(source, prop) && exclude.indexOf(prop) < 0)
10953
+ if (__hasOwnProp$s.call(source, prop) && exclude.indexOf(prop) < 0)
10954
10954
  target[prop] = source[prop];
10955
- if (source != null && __getOwnPropSymbols$q)
10956
- for (var prop of __getOwnPropSymbols$q(source)) {
10957
- if (exclude.indexOf(prop) < 0 && __propIsEnum$q.call(source, prop))
10955
+ if (source != null && __getOwnPropSymbols$s)
10956
+ for (var prop of __getOwnPropSymbols$s(source)) {
10957
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$s.call(source, prop))
10958
10958
  target[prop] = source[prop];
10959
10959
  }
10960
10960
  return target;
@@ -10986,7 +10986,7 @@ class AccountSettingsAPI {
10986
10986
  * The `updateImage` method updates specific image data for a given image id.
10987
10987
  */
10988
10988
  this.updateImage = (_a) => {
10989
- var _b = _a, { labelImageId } = _b, data = __objRest$e(_b, ["labelImageId"]);
10989
+ var _b = _a, { labelImageId } = _b, data = __objRest$f(_b, ["labelImageId"]);
10990
10990
  return this.client.put(`/v1/account/settings/images/${labelImageId}`, data);
10991
10991
  };
10992
10992
  /**
@@ -13696,7 +13696,7 @@ var ipaddr = {
13696
13696
  }).call(commonjsGlobal);
13697
13697
  } (ipaddr));
13698
13698
 
13699
- var __async$N = (__this, __arguments, generator) => {
13699
+ var __async$O = (__this, __arguments, generator) => {
13700
13700
  return new Promise((resolve, reject) => {
13701
13701
  var fulfilled = (value) => {
13702
13702
  try {
@@ -13716,7 +13716,7 @@ var __async$N = (__this, __arguments, generator) => {
13716
13716
  step((generator = generator.apply(__this, __arguments)).next());
13717
13717
  });
13718
13718
  };
13719
- const getEndUserIpAddress = () => __async$N(void 0, null, function* () {
13719
+ const getEndUserIpAddress = () => __async$O(void 0, null, function* () {
13720
13720
  try {
13721
13721
  const response = yield axios.get("https://api.ipify.org/?format=json");
13722
13722
  if (response.data.ip && ipaddrExports.isValid(response.data.ip)) {
@@ -13728,38 +13728,38 @@ const getEndUserIpAddress = () => __async$N(void 0, null, function* () {
13728
13728
  }
13729
13729
  });
13730
13730
 
13731
- var __defProp$e = Object.defineProperty;
13732
- var __defProps$9 = Object.defineProperties;
13733
- var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
13734
- var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
13735
- var __hasOwnProp$p = Object.prototype.hasOwnProperty;
13736
- var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
13737
- var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13738
- var __spreadValues$e = (a, b) => {
13731
+ var __defProp$g = Object.defineProperty;
13732
+ var __defProps$b = Object.defineProperties;
13733
+ var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
13734
+ var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
13735
+ var __hasOwnProp$r = Object.prototype.hasOwnProperty;
13736
+ var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
13737
+ var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13738
+ var __spreadValues$g = (a, b) => {
13739
13739
  for (var prop in b || (b = {}))
13740
- if (__hasOwnProp$p.call(b, prop))
13741
- __defNormalProp$e(a, prop, b[prop]);
13742
- if (__getOwnPropSymbols$p)
13743
- for (var prop of __getOwnPropSymbols$p(b)) {
13744
- if (__propIsEnum$p.call(b, prop))
13745
- __defNormalProp$e(a, prop, b[prop]);
13740
+ if (__hasOwnProp$r.call(b, prop))
13741
+ __defNormalProp$g(a, prop, b[prop]);
13742
+ if (__getOwnPropSymbols$r)
13743
+ for (var prop of __getOwnPropSymbols$r(b)) {
13744
+ if (__propIsEnum$r.call(b, prop))
13745
+ __defNormalProp$g(a, prop, b[prop]);
13746
13746
  }
13747
13747
  return a;
13748
13748
  };
13749
- var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
13750
- var __objRest$d = (source, exclude) => {
13749
+ var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
13750
+ var __objRest$e = (source, exclude) => {
13751
13751
  var target = {};
13752
13752
  for (var prop in source)
13753
- if (__hasOwnProp$p.call(source, prop) && exclude.indexOf(prop) < 0)
13753
+ if (__hasOwnProp$r.call(source, prop) && exclude.indexOf(prop) < 0)
13754
13754
  target[prop] = source[prop];
13755
- if (source != null && __getOwnPropSymbols$p)
13756
- for (var prop of __getOwnPropSymbols$p(source)) {
13757
- if (exclude.indexOf(prop) < 0 && __propIsEnum$p.call(source, prop))
13755
+ if (source != null && __getOwnPropSymbols$r)
13756
+ for (var prop of __getOwnPropSymbols$r(source)) {
13757
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$r.call(source, prop))
13758
13758
  target[prop] = source[prop];
13759
13759
  }
13760
13760
  return target;
13761
13761
  };
13762
- var __async$M = (__this, __arguments, generator) => {
13762
+ var __async$N = (__this, __arguments, generator) => {
13763
13763
  return new Promise((resolve, reject) => {
13764
13764
  var fulfilled = (value) => {
13765
13765
  try {
@@ -13797,12 +13797,12 @@ class CarriersAPI {
13797
13797
  /**
13798
13798
  * The `connect` method connects a carrier account to a user's ShipEngine account.
13799
13799
  */
13800
- this.connect = (_a) => __async$M(this, null, function* () {
13801
- var _b = _a, { carrierCode } = _b, connection = __objRest$d(_b, ["carrierCode"]);
13800
+ this.connect = (_a) => __async$N(this, null, function* () {
13801
+ var _b = _a, { carrierCode } = _b, connection = __objRest$e(_b, ["carrierCode"]);
13802
13802
  const endUserIpAddress = yield getEndUserIpAddress();
13803
13803
  if (!endUserIpAddress)
13804
13804
  return Promise.reject([new CodedError("Unable to get IP address")]);
13805
- return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$9(__spreadValues$e({}, connection), {
13805
+ return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$b(__spreadValues$g({}, connection), {
13806
13806
  endUserIpAddress
13807
13807
  }));
13808
13808
  });
@@ -13888,7 +13888,7 @@ class CarriersAPI {
13888
13888
  }
13889
13889
  }
13890
13890
 
13891
- var __async$L = (__this, __arguments, generator) => {
13891
+ var __async$M = (__this, __arguments, generator) => {
13892
13892
  return new Promise((resolve, reject) => {
13893
13893
  var fulfilled = (value) => {
13894
13894
  try {
@@ -13930,7 +13930,7 @@ class ConnectionsAPI {
13930
13930
  /**
13931
13931
  * The `connectCarrier` method connects a carrier to account.
13932
13932
  */
13933
- this.connectCarrier = (carrierName, formData) => __async$L(this, null, function* () {
13933
+ this.connectCarrier = (carrierName, formData) => __async$M(this, null, function* () {
13934
13934
  return yield this.client.post(
13935
13935
  `/v1/connections/carriers/${carrierName}`,
13936
13936
  formData,
@@ -13953,6 +13953,25 @@ class ConnectionsAPI {
13953
13953
  `/v1/connections/carriers/${carrierCode}/services`
13954
13954
  );
13955
13955
  };
13956
+ /**
13957
+ * The `getCarrierSettings` method retrieves the settings for a given carrier,
13958
+ * identified by the `carrierName` and `carrierCode`.
13959
+ */
13960
+ this.getCarrierSettings = (carrierName, carrierCode) => {
13961
+ return this.client.get(
13962
+ `/v1/connections/carriers/${carrierName}/${carrierCode}/settings`
13963
+ );
13964
+ };
13965
+ /**
13966
+ * The `updateCarrierSettings` method updates the settings for a given carrier,
13967
+ * identified by the `carrierName` and `carrierCode`.
13968
+ */
13969
+ this.updateCarrierSettings = (carrierName, carrierCode, formData) => {
13970
+ return this.client.put(
13971
+ `/v1/connections/carriers/${carrierName}/${carrierCode}/settings`,
13972
+ formData
13973
+ );
13974
+ };
13956
13975
  this.client = client;
13957
13976
  }
13958
13977
  }
@@ -16166,23 +16185,23 @@ class CustomPackagesAPI {
16166
16185
  }
16167
16186
  }
16168
16187
 
16169
- var __defProp$d = Object.defineProperty;
16170
- var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
16171
- var __hasOwnProp$o = Object.prototype.hasOwnProperty;
16172
- var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
16173
- var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16174
- var __spreadValues$d = (a, b) => {
16188
+ var __defProp$f = Object.defineProperty;
16189
+ var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
16190
+ var __hasOwnProp$q = Object.prototype.hasOwnProperty;
16191
+ var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
16192
+ var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16193
+ var __spreadValues$f = (a, b) => {
16175
16194
  for (var prop in b || (b = {}))
16176
- if (__hasOwnProp$o.call(b, prop))
16177
- __defNormalProp$d(a, prop, b[prop]);
16178
- if (__getOwnPropSymbols$o)
16179
- for (var prop of __getOwnPropSymbols$o(b)) {
16180
- if (__propIsEnum$o.call(b, prop))
16181
- __defNormalProp$d(a, prop, b[prop]);
16195
+ if (__hasOwnProp$q.call(b, prop))
16196
+ __defNormalProp$f(a, prop, b[prop]);
16197
+ if (__getOwnPropSymbols$q)
16198
+ for (var prop of __getOwnPropSymbols$q(b)) {
16199
+ if (__propIsEnum$q.call(b, prop))
16200
+ __defNormalProp$f(a, prop, b[prop]);
16182
16201
  }
16183
16202
  return a;
16184
16203
  };
16185
- var __async$K = (__this, __arguments, generator) => {
16204
+ var __async$L = (__this, __arguments, generator) => {
16186
16205
  return new Promise((resolve, reject) => {
16187
16206
  var fulfilled = (value) => {
16188
16207
  try {
@@ -16221,12 +16240,12 @@ class FundingSourcesAPI {
16221
16240
  * The `create` method creates a new funding source for a given user. This requires
16222
16241
  * payment information to be collected from the user.
16223
16242
  */
16224
- this.create = (createFundingSource) => __async$K(this, null, function* () {
16243
+ this.create = (createFundingSource) => __async$L(this, null, function* () {
16225
16244
  const endUserIpAddress = yield getEndUserIpAddress();
16226
16245
  if (!endUserIpAddress) {
16227
16246
  return Promise.reject([new CodedError("Unable to get IP address")]);
16228
16247
  }
16229
- return yield this.client.post("/v1/funding_sources", __spreadValues$d({
16248
+ return yield this.client.post("/v1/funding_sources", __spreadValues$f({
16230
16249
  endUserIpAddress
16231
16250
  }, createFundingSource));
16232
16251
  });
@@ -16235,7 +16254,7 @@ class FundingSourcesAPI {
16235
16254
  * user to update the billing address or payment information associated with the
16236
16255
  * funding source.
16237
16256
  */
16238
- this.update = (billingInfo, creditCardInfo, fundingSourceId) => __async$K(this, null, function* () {
16257
+ this.update = (billingInfo, creditCardInfo, fundingSourceId) => __async$L(this, null, function* () {
16239
16258
  const endUserIpAddress = yield getEndUserIpAddress();
16240
16259
  if (!endUserIpAddress) {
16241
16260
  return Promise.reject([new CodedError("Unable to get IP address")]);
@@ -16253,19 +16272,19 @@ class FundingSourcesAPI {
16253
16272
  * The `registerCarrier` method registers a carrier account and associates
16254
16273
  * it with a given funding source.
16255
16274
  */
16256
- this.registerCarrier = (carrier) => __async$K(this, null, function* () {
16275
+ this.registerCarrier = (carrier) => __async$L(this, null, function* () {
16257
16276
  const endUserIpAddress = yield getEndUserIpAddress();
16258
16277
  if (!endUserIpAddress) {
16259
16278
  return Promise.reject([new CodedError("Unable to get IP address")]);
16260
16279
  }
16261
- return yield this.client.post("/v1/registration/funding_source", __spreadValues$d({
16280
+ return yield this.client.post("/v1/registration/funding_source", __spreadValues$f({
16262
16281
  endUserIpAddress
16263
16282
  }, carrier));
16264
16283
  });
16265
16284
  /**
16266
16285
  * The `addFunds` method allows you to add funds to a funding source.
16267
16286
  */
16268
- this.addFunds = (amount, fundingSourceId) => __async$K(this, null, function* () {
16287
+ this.addFunds = (amount, fundingSourceId) => __async$L(this, null, function* () {
16269
16288
  return yield this.client.put(
16270
16289
  `/v1/funding_sources/${fundingSourceId}/add_funds`,
16271
16290
  amount
@@ -16275,7 +16294,7 @@ class FundingSourcesAPI {
16275
16294
  * The `metadata` method returns seller-specific requirements for creating funding sources
16276
16295
  * and attaching carriers
16277
16296
  */
16278
- this.metadata = () => __async$K(this, null, function* () {
16297
+ this.metadata = () => __async$L(this, null, function* () {
16279
16298
  return yield this.client.get("/v1/funding_sources/metadata");
16280
16299
  });
16281
16300
  /**
@@ -16463,19 +16482,19 @@ class RateCardsAPI {
16463
16482
  }
16464
16483
  }
16465
16484
 
16466
- var __defProp$c = Object.defineProperty;
16467
- var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
16468
- var __hasOwnProp$n = Object.prototype.hasOwnProperty;
16469
- var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
16470
- var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16471
- var __spreadValues$c = (a, b) => {
16485
+ var __defProp$e = Object.defineProperty;
16486
+ var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
16487
+ var __hasOwnProp$p = Object.prototype.hasOwnProperty;
16488
+ var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
16489
+ var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16490
+ var __spreadValues$e = (a, b) => {
16472
16491
  for (var prop in b || (b = {}))
16473
- if (__hasOwnProp$n.call(b, prop))
16474
- __defNormalProp$c(a, prop, b[prop]);
16475
- if (__getOwnPropSymbols$n)
16476
- for (var prop of __getOwnPropSymbols$n(b)) {
16477
- if (__propIsEnum$n.call(b, prop))
16478
- __defNormalProp$c(a, prop, b[prop]);
16492
+ if (__hasOwnProp$p.call(b, prop))
16493
+ __defNormalProp$e(a, prop, b[prop]);
16494
+ if (__getOwnPropSymbols$p)
16495
+ for (var prop of __getOwnPropSymbols$p(b)) {
16496
+ if (__propIsEnum$p.call(b, prop))
16497
+ __defNormalProp$e(a, prop, b[prop]);
16479
16498
  }
16480
16499
  return a;
16481
16500
  };
@@ -16497,7 +16516,7 @@ class RatesAPI {
16497
16516
  * method.
16498
16517
  */
16499
16518
  this.estimate = (params) => {
16500
- return this.client.post("/v1/rates/estimate", __spreadValues$c({}, params));
16519
+ return this.client.post("/v1/rates/estimate", __spreadValues$e({}, params));
16501
16520
  };
16502
16521
  this.client = client;
16503
16522
  }
@@ -16595,19 +16614,19 @@ class SellersAPI {
16595
16614
  }
16596
16615
  }
16597
16616
 
16598
- var __defProp$b = Object.defineProperty;
16599
- var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
16600
- var __hasOwnProp$m = Object.prototype.hasOwnProperty;
16601
- var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
16602
- var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16603
- var __spreadValues$b = (a, b) => {
16617
+ var __defProp$d = Object.defineProperty;
16618
+ var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
16619
+ var __hasOwnProp$o = Object.prototype.hasOwnProperty;
16620
+ var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
16621
+ var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16622
+ var __spreadValues$d = (a, b) => {
16604
16623
  for (var prop in b || (b = {}))
16605
- if (__hasOwnProp$m.call(b, prop))
16606
- __defNormalProp$b(a, prop, b[prop]);
16607
- if (__getOwnPropSymbols$m)
16608
- for (var prop of __getOwnPropSymbols$m(b)) {
16609
- if (__propIsEnum$m.call(b, prop))
16610
- __defNormalProp$b(a, prop, b[prop]);
16624
+ if (__hasOwnProp$o.call(b, prop))
16625
+ __defNormalProp$d(a, prop, b[prop]);
16626
+ if (__getOwnPropSymbols$o)
16627
+ for (var prop of __getOwnPropSymbols$o(b)) {
16628
+ if (__propIsEnum$o.call(b, prop))
16629
+ __defNormalProp$d(a, prop, b[prop]);
16611
16630
  }
16612
16631
  return a;
16613
16632
  };
@@ -16619,7 +16638,7 @@ class ServicePointsAPI {
16619
16638
  * Either an address, coordinates, or an address query
16620
16639
  */
16621
16640
  this.list = (options) => {
16622
- return this.client.post("/v1/service_points/list", __spreadValues$b({}, options));
16641
+ return this.client.post("/v1/service_points/list", __spreadValues$d({}, options));
16623
16642
  };
16624
16643
  /**
16625
16644
  * Get a specific service point by its carrier code, country code, and id
@@ -16637,7 +16656,7 @@ class ServicePointsAPI {
16637
16656
  }
16638
16657
  }
16639
16658
 
16640
- var __async$J = (__this, __arguments, generator) => {
16659
+ var __async$K = (__this, __arguments, generator) => {
16641
16660
  return new Promise((resolve, reject) => {
16642
16661
  var fulfilled = (value) => {
16643
16662
  try {
@@ -16680,7 +16699,7 @@ class ShipmentsAPI {
16680
16699
  * The `create` method allows for creating shipments based on a list of shipment
16681
16700
  * items passed into this method.
16682
16701
  */
16683
- this.create = (...shipments) => __async$J(this, null, function* () {
16702
+ this.create = (...shipments) => __async$K(this, null, function* () {
16684
16703
  return this.client.post("/v1/shipments", {
16685
16704
  shipments
16686
16705
  });
@@ -34046,26 +34065,26 @@ class WebhooksAPI {
34046
34065
  }
34047
34066
  }
34048
34067
 
34049
- var __defProp$a = Object.defineProperty;
34050
- var __defProps$8 = Object.defineProperties;
34051
- var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
34052
- var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
34053
- var __hasOwnProp$l = Object.prototype.hasOwnProperty;
34054
- var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
34055
- var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
34056
- var __spreadValues$a = (a, b) => {
34068
+ var __defProp$c = Object.defineProperty;
34069
+ var __defProps$a = Object.defineProperties;
34070
+ var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
34071
+ var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
34072
+ var __hasOwnProp$n = Object.prototype.hasOwnProperty;
34073
+ var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
34074
+ var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
34075
+ var __spreadValues$c = (a, b) => {
34057
34076
  for (var prop in b || (b = {}))
34058
- if (__hasOwnProp$l.call(b, prop))
34059
- __defNormalProp$a(a, prop, b[prop]);
34060
- if (__getOwnPropSymbols$l)
34061
- for (var prop of __getOwnPropSymbols$l(b)) {
34062
- if (__propIsEnum$l.call(b, prop))
34063
- __defNormalProp$a(a, prop, b[prop]);
34077
+ if (__hasOwnProp$n.call(b, prop))
34078
+ __defNormalProp$c(a, prop, b[prop]);
34079
+ if (__getOwnPropSymbols$n)
34080
+ for (var prop of __getOwnPropSymbols$n(b)) {
34081
+ if (__propIsEnum$n.call(b, prop))
34082
+ __defNormalProp$c(a, prop, b[prop]);
34064
34083
  }
34065
34084
  return a;
34066
34085
  };
34067
- var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
34068
- var __async$I = (__this, __arguments, generator) => {
34086
+ var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
34087
+ var __async$J = (__this, __arguments, generator) => {
34069
34088
  return new Promise((resolve, reject) => {
34070
34089
  var fulfilled = (value) => {
34071
34090
  try {
@@ -34088,7 +34107,7 @@ var __async$I = (__this, __arguments, generator) => {
34088
34107
  const logger$1 = E({
34089
34108
  level: process.env.NODE_ENV === "production" ? "fatal" : "info",
34090
34109
  name: "shipengine-api",
34091
- serializers: __spreadProps$8(__spreadValues$a({}, k), {
34110
+ serializers: __spreadProps$a(__spreadValues$c({}, k), {
34092
34111
  req: (req) => ({
34093
34112
  headers: req.headers,
34094
34113
  method: req.method,
@@ -34112,7 +34131,7 @@ class ShipEngineAPI {
34112
34131
  constructor(token, { baseURL, headers, getToken, onApiError }) {
34113
34132
  const client = axios.create({
34114
34133
  baseURL,
34115
- headers: __spreadProps$8(__spreadValues$a({}, headers), {
34134
+ headers: __spreadProps$a(__spreadValues$c({}, headers), {
34116
34135
  "Content-Type": "application/json"
34117
34136
  }),
34118
34137
  paramsSerializer: (params) => lib.stringify(humpsExports.decamelizeKeys(params), { arrayFormat: "brackets" }),
@@ -34159,7 +34178,7 @@ class ShipEngineAPI {
34159
34178
  );
34160
34179
  return res;
34161
34180
  },
34162
- (err) => __async$I(this, null, function* () {
34181
+ (err) => __async$J(this, null, function* () {
34163
34182
  var _a, _b, _c, _d, _e;
34164
34183
  logger$1.error(
34165
34184
  { err, req: err.config, res: err.response },
@@ -34441,25 +34460,25 @@ const delay = (ms) => new Promise((resolve) => {
34441
34460
 
34442
34461
  const onError = (_errors) => _default();
34443
34462
 
34444
- var __defProp$9 = Object.defineProperty;
34445
- var __defProps$7 = Object.defineProperties;
34446
- var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
34447
- var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
34448
- var __hasOwnProp$k = Object.prototype.hasOwnProperty;
34449
- var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
34450
- var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
34451
- var __spreadValues$9 = (a, b) => {
34463
+ var __defProp$b = Object.defineProperty;
34464
+ var __defProps$9 = Object.defineProperties;
34465
+ var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
34466
+ var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
34467
+ var __hasOwnProp$m = Object.prototype.hasOwnProperty;
34468
+ var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
34469
+ var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
34470
+ var __spreadValues$b = (a, b) => {
34452
34471
  for (var prop in b || (b = {}))
34453
- if (__hasOwnProp$k.call(b, prop))
34454
- __defNormalProp$9(a, prop, b[prop]);
34455
- if (__getOwnPropSymbols$k)
34456
- for (var prop of __getOwnPropSymbols$k(b)) {
34457
- if (__propIsEnum$k.call(b, prop))
34458
- __defNormalProp$9(a, prop, b[prop]);
34472
+ if (__hasOwnProp$m.call(b, prop))
34473
+ __defNormalProp$b(a, prop, b[prop]);
34474
+ if (__getOwnPropSymbols$m)
34475
+ for (var prop of __getOwnPropSymbols$m(b)) {
34476
+ if (__propIsEnum$m.call(b, prop))
34477
+ __defNormalProp$b(a, prop, b[prop]);
34459
34478
  }
34460
34479
  return a;
34461
34480
  };
34462
- var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
34481
+ var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
34463
34482
  const streams = [];
34464
34483
  if (process.env.NODE_ENV === "production") {
34465
34484
  streams.push({
@@ -34468,7 +34487,7 @@ if (process.env.NODE_ENV === "production") {
34468
34487
  }
34469
34488
  const logger = E({
34470
34489
  name: "shipengine",
34471
- serializers: __spreadProps$7(__spreadValues$9({}, k), {
34490
+ serializers: __spreadProps$9(__spreadValues$b({}, k), {
34472
34491
  req: (req) => ({
34473
34492
  headers: req.headers,
34474
34493
  method: req.method,
@@ -34493,7 +34512,7 @@ const retryUntil = (callbackFn, retries = 10, timeoutBetweenAttempts = 1e3) => P
34493
34512
  throw error;
34494
34513
  });
34495
34514
 
34496
- var __async$H = (__this, __arguments, generator) => {
34515
+ var __async$I = (__this, __arguments, generator) => {
34497
34516
  return new Promise((resolve, reject) => {
34498
34517
  var fulfilled = (value) => {
34499
34518
  try {
@@ -34516,7 +34535,7 @@ var __async$H = (__this, __arguments, generator) => {
34516
34535
  const useCreateAccountImage = () => {
34517
34536
  const { client } = useShipEngine();
34518
34537
  return reactQuery.useMutation({
34519
- mutationFn: (data) => __async$H(void 0, null, function* () {
34538
+ mutationFn: (data) => __async$I(void 0, null, function* () {
34520
34539
  const result = yield client.accountSettings.createImage(data);
34521
34540
  return result.data;
34522
34541
  }),
@@ -34525,7 +34544,7 @@ const useCreateAccountImage = () => {
34525
34544
  });
34526
34545
  };
34527
34546
 
34528
- var __async$G = (__this, __arguments, generator) => {
34547
+ var __async$H = (__this, __arguments, generator) => {
34529
34548
  return new Promise((resolve, reject) => {
34530
34549
  var fulfilled = (value) => {
34531
34550
  try {
@@ -34548,7 +34567,7 @@ var __async$G = (__this, __arguments, generator) => {
34548
34567
  const useDeleteAccountImage = () => {
34549
34568
  const { client } = useShipEngine();
34550
34569
  return reactQuery.useMutation({
34551
- mutationFn: (labelImageId) => __async$G(void 0, null, function* () {
34570
+ mutationFn: (labelImageId) => __async$H(void 0, null, function* () {
34552
34571
  const result = yield client.accountSettings.deleteImage(labelImageId);
34553
34572
  return result.data;
34554
34573
  }),
@@ -34577,7 +34596,7 @@ const useGetAccountSettings = () => {
34577
34596
  });
34578
34597
  };
34579
34598
 
34580
- var __async$F = (__this, __arguments, generator) => {
34599
+ var __async$G = (__this, __arguments, generator) => {
34581
34600
  return new Promise((resolve, reject) => {
34582
34601
  var fulfilled = (value) => {
34583
34602
  try {
@@ -34600,7 +34619,7 @@ var __async$F = (__this, __arguments, generator) => {
34600
34619
  const useUpdateAccountImage = () => {
34601
34620
  const { client } = useShipEngine();
34602
34621
  return reactQuery.useMutation({
34603
- mutationFn: (data) => __async$F(void 0, null, function* () {
34622
+ mutationFn: (data) => __async$G(void 0, null, function* () {
34604
34623
  const result = yield client.accountSettings.updateImage(data);
34605
34624
  return result.data;
34606
34625
  }),
@@ -34609,7 +34628,7 @@ const useUpdateAccountImage = () => {
34609
34628
  });
34610
34629
  };
34611
34630
 
34612
- var __async$E = (__this, __arguments, generator) => {
34631
+ var __async$F = (__this, __arguments, generator) => {
34613
34632
  return new Promise((resolve, reject) => {
34614
34633
  var fulfilled = (value) => {
34615
34634
  try {
@@ -34632,7 +34651,7 @@ var __async$E = (__this, __arguments, generator) => {
34632
34651
  const useUpdateAccountSettings = () => {
34633
34652
  const { client } = useShipEngine();
34634
34653
  return reactQuery.useMutation({
34635
- mutationFn: (settings) => __async$E(void 0, null, function* () {
34654
+ mutationFn: (settings) => __async$F(void 0, null, function* () {
34636
34655
  const result = yield client.accountSettings.update(settings);
34637
34656
  return result.data;
34638
34657
  }),
@@ -34641,7 +34660,7 @@ const useUpdateAccountSettings = () => {
34641
34660
  });
34642
34661
  };
34643
34662
 
34644
- var __async$D = (__this, __arguments, generator) => {
34663
+ var __async$E = (__this, __arguments, generator) => {
34645
34664
  return new Promise((resolve, reject) => {
34646
34665
  var fulfilled = (value) => {
34647
34666
  try {
@@ -34664,7 +34683,7 @@ var __async$D = (__this, __arguments, generator) => {
34664
34683
  const useParseAddress = () => {
34665
34684
  const { client } = useShipEngine();
34666
34685
  return reactQuery.useMutation({
34667
- mutationFn: (_0) => __async$D(void 0, [_0], function* ({ address, text }) {
34686
+ mutationFn: (_0) => __async$E(void 0, [_0], function* ({ address, text }) {
34668
34687
  const result = yield client.addresses.parse(text, address);
34669
34688
  return result.data;
34670
34689
  }),
@@ -34673,7 +34692,7 @@ const useParseAddress = () => {
34673
34692
  });
34674
34693
  };
34675
34694
 
34676
- var __async$C = (__this, __arguments, generator) => {
34695
+ var __async$D = (__this, __arguments, generator) => {
34677
34696
  return new Promise((resolve, reject) => {
34678
34697
  var fulfilled = (value) => {
34679
34698
  try {
@@ -34696,7 +34715,7 @@ var __async$C = (__this, __arguments, generator) => {
34696
34715
  const useValidateAddresses = () => {
34697
34716
  const { client } = useShipEngine();
34698
34717
  return reactQuery.useMutation({
34699
- mutationFn: (addresses) => __async$C(void 0, null, function* () {
34718
+ mutationFn: (addresses) => __async$D(void 0, null, function* () {
34700
34719
  const result = yield client.addresses.validate(addresses);
34701
34720
  return result.data;
34702
34721
  }),
@@ -34705,7 +34724,7 @@ const useValidateAddresses = () => {
34705
34724
  });
34706
34725
  };
34707
34726
 
34708
- var __async$B = (__this, __arguments, generator) => {
34727
+ var __async$C = (__this, __arguments, generator) => {
34709
34728
  return new Promise((resolve, reject) => {
34710
34729
  var fulfilled = (value) => {
34711
34730
  try {
@@ -34728,7 +34747,7 @@ var __async$B = (__this, __arguments, generator) => {
34728
34747
  const useAddFunds = () => {
34729
34748
  const { client } = useShipEngine();
34730
34749
  return reactQuery.useMutation({
34731
- mutationFn: (_0) => __async$B(void 0, [_0], function* ({ carrierId, funds }) {
34750
+ mutationFn: (_0) => __async$C(void 0, [_0], function* ({ carrierId, funds }) {
34732
34751
  const result = yield client.carriers.addFunds(carrierId, funds);
34733
34752
  return result.data;
34734
34753
  }),
@@ -34737,7 +34756,7 @@ const useAddFunds = () => {
34737
34756
  });
34738
34757
  };
34739
34758
 
34740
- var __async$A = (__this, __arguments, generator) => {
34759
+ var __async$B = (__this, __arguments, generator) => {
34741
34760
  return new Promise((resolve, reject) => {
34742
34761
  var fulfilled = (value) => {
34743
34762
  try {
@@ -34760,7 +34779,7 @@ var __async$A = (__this, __arguments, generator) => {
34760
34779
  const useConnectCarrier = () => {
34761
34780
  const { client } = useShipEngine();
34762
34781
  return reactQuery.useMutation({
34763
- mutationFn: (params) => __async$A(void 0, null, function* () {
34782
+ mutationFn: (params) => __async$B(void 0, null, function* () {
34764
34783
  const result = yield client.carriers.connect(params);
34765
34784
  return result.data;
34766
34785
  }),
@@ -34879,22 +34898,22 @@ const useListCarriers = () => {
34879
34898
  });
34880
34899
  };
34881
34900
 
34882
- var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
34883
- var __hasOwnProp$j = Object.prototype.hasOwnProperty;
34884
- var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
34885
- var __objRest$c = (source, exclude) => {
34901
+ var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
34902
+ var __hasOwnProp$l = Object.prototype.hasOwnProperty;
34903
+ var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
34904
+ var __objRest$d = (source, exclude) => {
34886
34905
  var target = {};
34887
34906
  for (var prop in source)
34888
- if (__hasOwnProp$j.call(source, prop) && exclude.indexOf(prop) < 0)
34907
+ if (__hasOwnProp$l.call(source, prop) && exclude.indexOf(prop) < 0)
34889
34908
  target[prop] = source[prop];
34890
- if (source != null && __getOwnPropSymbols$j)
34891
- for (var prop of __getOwnPropSymbols$j(source)) {
34892
- if (exclude.indexOf(prop) < 0 && __propIsEnum$j.call(source, prop))
34909
+ if (source != null && __getOwnPropSymbols$l)
34910
+ for (var prop of __getOwnPropSymbols$l(source)) {
34911
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$l.call(source, prop))
34893
34912
  target[prop] = source[prop];
34894
34913
  }
34895
34914
  return target;
34896
34915
  };
34897
- var __async$z = (__this, __arguments, generator) => {
34916
+ var __async$A = (__this, __arguments, generator) => {
34898
34917
  return new Promise((resolve, reject) => {
34899
34918
  var fulfilled = (value) => {
34900
34919
  try {
@@ -34918,8 +34937,8 @@ const useUpdateAutoFunding = () => {
34918
34937
  const { client } = useShipEngine();
34919
34938
  const queryClient = reactQuery.useQueryClient();
34920
34939
  return reactQuery.useMutation({
34921
- mutationFn: (_a) => __async$z(void 0, null, function* () {
34922
- var _b = _a, { carrierId } = _b, options = __objRest$c(_b, ["carrierId"]);
34940
+ mutationFn: (_a) => __async$A(void 0, null, function* () {
34941
+ var _b = _a, { carrierId } = _b, options = __objRest$d(_b, ["carrierId"]);
34923
34942
  const result = yield client.carriers.updateAutoFunding(carrierId, options);
34924
34943
  return result.data;
34925
34944
  }),
@@ -34948,7 +34967,7 @@ const useGetZonesByCarrier = (carrierId) => {
34948
34967
  });
34949
34968
  };
34950
34969
 
34951
- var __async$y = (__this, __arguments, generator) => {
34970
+ var __async$z = (__this, __arguments, generator) => {
34952
34971
  return new Promise((resolve, reject) => {
34953
34972
  var fulfilled = (value) => {
34954
34973
  try {
@@ -34971,7 +34990,7 @@ var __async$y = (__this, __arguments, generator) => {
34971
34990
  const useDeleteCarrier = () => {
34972
34991
  const { client } = useShipEngine();
34973
34992
  return reactQuery.useMutation({
34974
- mutationFn: (carrierId) => __async$y(void 0, null, function* () {
34993
+ mutationFn: (carrierId) => __async$z(void 0, null, function* () {
34975
34994
  const result = yield client.carriers.delete(carrierId);
34976
34995
  return result.data;
34977
34996
  }),
@@ -34980,24 +34999,24 @@ const useDeleteCarrier = () => {
34980
34999
  });
34981
35000
  };
34982
35001
 
34983
- var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
34984
- var __hasOwnProp$i = Object.prototype.hasOwnProperty;
34985
- var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
34986
- var __objRest$b = (source, exclude) => {
35002
+ var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
35003
+ var __hasOwnProp$k = Object.prototype.hasOwnProperty;
35004
+ var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
35005
+ var __objRest$c = (source, exclude) => {
34987
35006
  var target = {};
34988
35007
  for (var prop in source)
34989
- if (__hasOwnProp$i.call(source, prop) && exclude.indexOf(prop) < 0)
35008
+ if (__hasOwnProp$k.call(source, prop) && exclude.indexOf(prop) < 0)
34990
35009
  target[prop] = source[prop];
34991
- if (source != null && __getOwnPropSymbols$i)
34992
- for (var prop of __getOwnPropSymbols$i(source)) {
34993
- if (exclude.indexOf(prop) < 0 && __propIsEnum$i.call(source, prop))
35010
+ if (source != null && __getOwnPropSymbols$k)
35011
+ for (var prop of __getOwnPropSymbols$k(source)) {
35012
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$k.call(source, prop))
34994
35013
  target[prop] = source[prop];
34995
35014
  }
34996
35015
  return target;
34997
35016
  };
34998
35017
  const useGetCarrierConnectionForm = (_params) => {
34999
35018
  const { client } = useShipEngine();
35000
- const _a = _params || {}, { carrierName, enabled = true } = _a, params = __objRest$b(_a, ["carrierName", "enabled"]);
35019
+ const _a = _params || {}, { carrierName, enabled = true } = _a, params = __objRest$c(_a, ["carrierName", "enabled"]);
35001
35020
  return reactQuery.useQuery({
35002
35021
  enabled,
35003
35022
  onError,
@@ -35007,24 +35026,24 @@ const useGetCarrierConnectionForm = (_params) => {
35007
35026
  });
35008
35027
  };
35009
35028
 
35010
- var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
35011
- var __hasOwnProp$h = Object.prototype.hasOwnProperty;
35012
- var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
35013
- var __objRest$a = (source, exclude) => {
35029
+ var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
35030
+ var __hasOwnProp$j = Object.prototype.hasOwnProperty;
35031
+ var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
35032
+ var __objRest$b = (source, exclude) => {
35014
35033
  var target = {};
35015
35034
  for (var prop in source)
35016
- if (__hasOwnProp$h.call(source, prop) && exclude.indexOf(prop) < 0)
35035
+ if (__hasOwnProp$j.call(source, prop) && exclude.indexOf(prop) < 0)
35017
35036
  target[prop] = source[prop];
35018
- if (source != null && __getOwnPropSymbols$h)
35019
- for (var prop of __getOwnPropSymbols$h(source)) {
35020
- if (exclude.indexOf(prop) < 0 && __propIsEnum$h.call(source, prop))
35037
+ if (source != null && __getOwnPropSymbols$j)
35038
+ for (var prop of __getOwnPropSymbols$j(source)) {
35039
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$j.call(source, prop))
35021
35040
  target[prop] = source[prop];
35022
35041
  }
35023
35042
  return target;
35024
35043
  };
35025
35044
  const useListCarrierConnections = (_params) => {
35026
35045
  const { client } = useShipEngine();
35027
- const _a = _params || {}, { enabled = true } = _a, params = __objRest$a(_a, ["enabled"]);
35046
+ const _a = _params || {}, { enabled = true } = _a, params = __objRest$b(_a, ["enabled"]);
35028
35047
  return reactQuery.useQuery({
35029
35048
  enabled,
35030
35049
  onError,
@@ -35034,7 +35053,7 @@ const useListCarrierConnections = (_params) => {
35034
35053
  });
35035
35054
  };
35036
35055
 
35037
- var __async$x = (__this, __arguments, generator) => {
35056
+ var __async$y = (__this, __arguments, generator) => {
35038
35057
  return new Promise((resolve, reject) => {
35039
35058
  var fulfilled = (value) => {
35040
35059
  try {
@@ -35057,7 +35076,7 @@ var __async$x = (__this, __arguments, generator) => {
35057
35076
  const useConnectCarrierAccount = () => {
35058
35077
  const { client } = useShipEngine();
35059
35078
  return reactQuery.useMutation({
35060
- mutationFn: (_0) => __async$x(void 0, [_0], function* ({ carrierName, formData }) {
35079
+ mutationFn: (_0) => __async$y(void 0, [_0], function* ({ carrierName, formData }) {
35061
35080
  const result = yield client.connections.connectCarrier(carrierName, formData);
35062
35081
  return result.data;
35063
35082
  }),
@@ -35077,6 +35096,112 @@ const useCarrierConnectionsServicesList = (carrierCode) => {
35077
35096
  });
35078
35097
  };
35079
35098
 
35099
+ var __defProp$a = Object.defineProperty;
35100
+ var __defProps$8 = Object.defineProperties;
35101
+ var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
35102
+ var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
35103
+ var __hasOwnProp$i = Object.prototype.hasOwnProperty;
35104
+ var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
35105
+ var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35106
+ var __spreadValues$a = (a, b) => {
35107
+ for (var prop in b || (b = {}))
35108
+ if (__hasOwnProp$i.call(b, prop))
35109
+ __defNormalProp$a(a, prop, b[prop]);
35110
+ if (__getOwnPropSymbols$i)
35111
+ for (var prop of __getOwnPropSymbols$i(b)) {
35112
+ if (__propIsEnum$i.call(b, prop))
35113
+ __defNormalProp$a(a, prop, b[prop]);
35114
+ }
35115
+ return a;
35116
+ };
35117
+ var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
35118
+ var __objRest$a = (source, exclude) => {
35119
+ var target = {};
35120
+ for (var prop in source)
35121
+ if (__hasOwnProp$i.call(source, prop) && exclude.indexOf(prop) < 0)
35122
+ target[prop] = source[prop];
35123
+ if (source != null && __getOwnPropSymbols$i)
35124
+ for (var prop of __getOwnPropSymbols$i(source)) {
35125
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$i.call(source, prop))
35126
+ target[prop] = source[prop];
35127
+ }
35128
+ return target;
35129
+ };
35130
+ const useGetConnectionsCarrierSettings = (_a) => {
35131
+ var _b = _a, {
35132
+ queryFnParams
35133
+ } = _b, params = __objRest$a(_b, [
35134
+ "queryFnParams"
35135
+ ]);
35136
+ const { client } = useShipEngine();
35137
+ const { carrierName, carrierCode } = queryFnParams;
35138
+ return reactQuery.useQuery(__spreadProps$8(__spreadValues$a({}, params), {
35139
+ onError,
35140
+ queryFn: () => client.connections.getCarrierSettings(carrierName, carrierCode),
35141
+ queryKey: ["useGetConnectionsCarrierSettings", carrierName, carrierCode],
35142
+ select: (result) => result.data
35143
+ }));
35144
+ };
35145
+
35146
+ var __defProp$9 = Object.defineProperty;
35147
+ var __defProps$7 = Object.defineProperties;
35148
+ var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
35149
+ var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
35150
+ var __hasOwnProp$h = Object.prototype.hasOwnProperty;
35151
+ var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
35152
+ var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35153
+ var __spreadValues$9 = (a, b) => {
35154
+ for (var prop in b || (b = {}))
35155
+ if (__hasOwnProp$h.call(b, prop))
35156
+ __defNormalProp$9(a, prop, b[prop]);
35157
+ if (__getOwnPropSymbols$h)
35158
+ for (var prop of __getOwnPropSymbols$h(b)) {
35159
+ if (__propIsEnum$h.call(b, prop))
35160
+ __defNormalProp$9(a, prop, b[prop]);
35161
+ }
35162
+ return a;
35163
+ };
35164
+ var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
35165
+ var __async$x = (__this, __arguments, generator) => {
35166
+ return new Promise((resolve, reject) => {
35167
+ var fulfilled = (value) => {
35168
+ try {
35169
+ step(generator.next(value));
35170
+ } catch (e) {
35171
+ reject(e);
35172
+ }
35173
+ };
35174
+ var rejected = (value) => {
35175
+ try {
35176
+ step(generator.throw(value));
35177
+ } catch (e) {
35178
+ reject(e);
35179
+ }
35180
+ };
35181
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
35182
+ step((generator = generator.apply(__this, __arguments)).next());
35183
+ });
35184
+ };
35185
+ const useUpdateConnectionsCarrierSettings = (params) => {
35186
+ const { client } = useShipEngine();
35187
+ return reactQuery.useMutation(__spreadProps$7(__spreadValues$9({}, params), {
35188
+ mutationFn: (_0) => __async$x(void 0, [_0], function* ({
35189
+ carrierName,
35190
+ carrierCode,
35191
+ formData
35192
+ }) {
35193
+ const result = yield client.connections.updateCarrierSettings(
35194
+ carrierName,
35195
+ carrierCode,
35196
+ formData
35197
+ );
35198
+ return result.data;
35199
+ }),
35200
+ mutationKey: ["useUpdateConnectionsCarrierSettings"],
35201
+ onError
35202
+ }));
35203
+ };
35204
+
35080
35205
  const useListCustomPackageTypes = () => {
35081
35206
  const { client } = useShipEngine();
35082
35207
  return reactQuery.useQuery({
@@ -38024,6 +38149,7 @@ exports.useGetAccountSettings = useGetAccountSettings;
38024
38149
  exports.useGetAutoFundingConfiguration = useGetAutoFundingConfiguration;
38025
38150
  exports.useGetCarrierById = useGetCarrierById;
38026
38151
  exports.useGetCarrierConnectionForm = useGetCarrierConnectionForm;
38152
+ exports.useGetConnectionsCarrierSettings = useGetConnectionsCarrierSettings;
38027
38153
  exports.useGetCountriesByCarrier = useGetCountriesByCarrier;
38028
38154
  exports.useGetCurrenciesByCarrier = useGetCurrenciesByCarrier;
38029
38155
  exports.useGetFundingSourceById = useGetFundingSourceById;
@@ -38074,6 +38200,7 @@ exports.useUpdateAccountBillingPlan = useUpdateAccountBillingPlan;
38074
38200
  exports.useUpdateAccountImage = useUpdateAccountImage;
38075
38201
  exports.useUpdateAccountSettings = useUpdateAccountSettings;
38076
38202
  exports.useUpdateAutoFunding = useUpdateAutoFunding;
38203
+ exports.useUpdateConnectionsCarrierSettings = useUpdateConnectionsCarrierSettings;
38077
38204
  exports.useUpdateFundingSource = useUpdateFundingSource;
38078
38205
  exports.useUpdateRateCard = useUpdateRateCard;
38079
38206
  exports.useUpdateSalesOrderShipment = useUpdateSalesOrderShipment;