@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.mjs CHANGED
@@ -10790,17 +10790,17 @@ var AccountBillingPlanChangeType = /* @__PURE__ */ ((AccountBillingPlanChangeTyp
10790
10790
  return AccountBillingPlanChangeType2;
10791
10791
  })(AccountBillingPlanChangeType || {});
10792
10792
 
10793
- var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
10794
- var __hasOwnProp$r = Object.prototype.hasOwnProperty;
10795
- var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
10796
- var __objRest$f = (source, exclude) => {
10793
+ var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
10794
+ var __hasOwnProp$t = Object.prototype.hasOwnProperty;
10795
+ var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
10796
+ var __objRest$g = (source, exclude) => {
10797
10797
  var target = {};
10798
10798
  for (var prop in source)
10799
- if (__hasOwnProp$r.call(source, prop) && exclude.indexOf(prop) < 0)
10799
+ if (__hasOwnProp$t.call(source, prop) && exclude.indexOf(prop) < 0)
10800
10800
  target[prop] = source[prop];
10801
- if (source != null && __getOwnPropSymbols$r)
10802
- for (var prop of __getOwnPropSymbols$r(source)) {
10803
- if (exclude.indexOf(prop) < 0 && __propIsEnum$r.call(source, prop))
10801
+ if (source != null && __getOwnPropSymbols$t)
10802
+ for (var prop of __getOwnPropSymbols$t(source)) {
10803
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$t.call(source, prop))
10804
10804
  target[prop] = source[prop];
10805
10805
  }
10806
10806
  return target;
@@ -10814,7 +10814,7 @@ class CodedError {
10814
10814
  this.message = message;
10815
10815
  }
10816
10816
  static fromObject(_a) {
10817
- var _b = _a, { message } = _b, options = __objRest$f(_b, ["message"]);
10817
+ var _b = _a, { message } = _b, options = __objRest$g(_b, ["message"]);
10818
10818
  return new CodedError(message, options);
10819
10819
  }
10820
10820
  }
@@ -10922,17 +10922,17 @@ const types = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
10922
10922
  RateCardStatus
10923
10923
  }, Symbol.toStringTag, { value: 'Module' }));
10924
10924
 
10925
- var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
10926
- var __hasOwnProp$q = Object.prototype.hasOwnProperty;
10927
- var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
10928
- var __objRest$e = (source, exclude) => {
10925
+ var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
10926
+ var __hasOwnProp$s = Object.prototype.hasOwnProperty;
10927
+ var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
10928
+ var __objRest$f = (source, exclude) => {
10929
10929
  var target = {};
10930
10930
  for (var prop in source)
10931
- if (__hasOwnProp$q.call(source, prop) && exclude.indexOf(prop) < 0)
10931
+ if (__hasOwnProp$s.call(source, prop) && exclude.indexOf(prop) < 0)
10932
10932
  target[prop] = source[prop];
10933
- if (source != null && __getOwnPropSymbols$q)
10934
- for (var prop of __getOwnPropSymbols$q(source)) {
10935
- if (exclude.indexOf(prop) < 0 && __propIsEnum$q.call(source, prop))
10933
+ if (source != null && __getOwnPropSymbols$s)
10934
+ for (var prop of __getOwnPropSymbols$s(source)) {
10935
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$s.call(source, prop))
10936
10936
  target[prop] = source[prop];
10937
10937
  }
10938
10938
  return target;
@@ -10964,7 +10964,7 @@ class AccountSettingsAPI {
10964
10964
  * The `updateImage` method updates specific image data for a given image id.
10965
10965
  */
10966
10966
  this.updateImage = (_a) => {
10967
- var _b = _a, { labelImageId } = _b, data = __objRest$e(_b, ["labelImageId"]);
10967
+ var _b = _a, { labelImageId } = _b, data = __objRest$f(_b, ["labelImageId"]);
10968
10968
  return this.client.put(`/v1/account/settings/images/${labelImageId}`, data);
10969
10969
  };
10970
10970
  /**
@@ -13674,7 +13674,7 @@ var ipaddr = {
13674
13674
  }).call(commonjsGlobal);
13675
13675
  } (ipaddr));
13676
13676
 
13677
- var __async$N = (__this, __arguments, generator) => {
13677
+ var __async$O = (__this, __arguments, generator) => {
13678
13678
  return new Promise((resolve, reject) => {
13679
13679
  var fulfilled = (value) => {
13680
13680
  try {
@@ -13694,7 +13694,7 @@ var __async$N = (__this, __arguments, generator) => {
13694
13694
  step((generator = generator.apply(__this, __arguments)).next());
13695
13695
  });
13696
13696
  };
13697
- const getEndUserIpAddress = () => __async$N(void 0, null, function* () {
13697
+ const getEndUserIpAddress = () => __async$O(void 0, null, function* () {
13698
13698
  try {
13699
13699
  const response = yield axios.get("https://api.ipify.org/?format=json");
13700
13700
  if (response.data.ip && ipaddrExports.isValid(response.data.ip)) {
@@ -13706,38 +13706,38 @@ const getEndUserIpAddress = () => __async$N(void 0, null, function* () {
13706
13706
  }
13707
13707
  });
13708
13708
 
13709
- var __defProp$e = Object.defineProperty;
13710
- var __defProps$9 = Object.defineProperties;
13711
- var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
13712
- var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
13713
- var __hasOwnProp$p = Object.prototype.hasOwnProperty;
13714
- var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
13715
- var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13716
- var __spreadValues$e = (a, b) => {
13709
+ var __defProp$g = Object.defineProperty;
13710
+ var __defProps$b = Object.defineProperties;
13711
+ var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
13712
+ var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
13713
+ var __hasOwnProp$r = Object.prototype.hasOwnProperty;
13714
+ var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
13715
+ var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13716
+ var __spreadValues$g = (a, b) => {
13717
13717
  for (var prop in b || (b = {}))
13718
- if (__hasOwnProp$p.call(b, prop))
13719
- __defNormalProp$e(a, prop, b[prop]);
13720
- if (__getOwnPropSymbols$p)
13721
- for (var prop of __getOwnPropSymbols$p(b)) {
13722
- if (__propIsEnum$p.call(b, prop))
13723
- __defNormalProp$e(a, prop, b[prop]);
13718
+ if (__hasOwnProp$r.call(b, prop))
13719
+ __defNormalProp$g(a, prop, b[prop]);
13720
+ if (__getOwnPropSymbols$r)
13721
+ for (var prop of __getOwnPropSymbols$r(b)) {
13722
+ if (__propIsEnum$r.call(b, prop))
13723
+ __defNormalProp$g(a, prop, b[prop]);
13724
13724
  }
13725
13725
  return a;
13726
13726
  };
13727
- var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
13728
- var __objRest$d = (source, exclude) => {
13727
+ var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
13728
+ var __objRest$e = (source, exclude) => {
13729
13729
  var target = {};
13730
13730
  for (var prop in source)
13731
- if (__hasOwnProp$p.call(source, prop) && exclude.indexOf(prop) < 0)
13731
+ if (__hasOwnProp$r.call(source, prop) && exclude.indexOf(prop) < 0)
13732
13732
  target[prop] = source[prop];
13733
- if (source != null && __getOwnPropSymbols$p)
13734
- for (var prop of __getOwnPropSymbols$p(source)) {
13735
- if (exclude.indexOf(prop) < 0 && __propIsEnum$p.call(source, prop))
13733
+ if (source != null && __getOwnPropSymbols$r)
13734
+ for (var prop of __getOwnPropSymbols$r(source)) {
13735
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$r.call(source, prop))
13736
13736
  target[prop] = source[prop];
13737
13737
  }
13738
13738
  return target;
13739
13739
  };
13740
- var __async$M = (__this, __arguments, generator) => {
13740
+ var __async$N = (__this, __arguments, generator) => {
13741
13741
  return new Promise((resolve, reject) => {
13742
13742
  var fulfilled = (value) => {
13743
13743
  try {
@@ -13775,12 +13775,12 @@ class CarriersAPI {
13775
13775
  /**
13776
13776
  * The `connect` method connects a carrier account to a user's ShipEngine account.
13777
13777
  */
13778
- this.connect = (_a) => __async$M(this, null, function* () {
13779
- var _b = _a, { carrierCode } = _b, connection = __objRest$d(_b, ["carrierCode"]);
13778
+ this.connect = (_a) => __async$N(this, null, function* () {
13779
+ var _b = _a, { carrierCode } = _b, connection = __objRest$e(_b, ["carrierCode"]);
13780
13780
  const endUserIpAddress = yield getEndUserIpAddress();
13781
13781
  if (!endUserIpAddress)
13782
13782
  return Promise.reject([new CodedError("Unable to get IP address")]);
13783
- return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$9(__spreadValues$e({}, connection), {
13783
+ return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$b(__spreadValues$g({}, connection), {
13784
13784
  endUserIpAddress
13785
13785
  }));
13786
13786
  });
@@ -13866,7 +13866,7 @@ class CarriersAPI {
13866
13866
  }
13867
13867
  }
13868
13868
 
13869
- var __async$L = (__this, __arguments, generator) => {
13869
+ var __async$M = (__this, __arguments, generator) => {
13870
13870
  return new Promise((resolve, reject) => {
13871
13871
  var fulfilled = (value) => {
13872
13872
  try {
@@ -13908,7 +13908,7 @@ class ConnectionsAPI {
13908
13908
  /**
13909
13909
  * The `connectCarrier` method connects a carrier to account.
13910
13910
  */
13911
- this.connectCarrier = (carrierName, formData) => __async$L(this, null, function* () {
13911
+ this.connectCarrier = (carrierName, formData) => __async$M(this, null, function* () {
13912
13912
  return yield this.client.post(
13913
13913
  `/v1/connections/carriers/${carrierName}`,
13914
13914
  formData,
@@ -13931,6 +13931,25 @@ class ConnectionsAPI {
13931
13931
  `/v1/connections/carriers/${carrierCode}/services`
13932
13932
  );
13933
13933
  };
13934
+ /**
13935
+ * The `getCarrierSettings` method retrieves the settings for a given carrier,
13936
+ * identified by the `carrierName` and `carrierCode`.
13937
+ */
13938
+ this.getCarrierSettings = (carrierName, carrierCode) => {
13939
+ return this.client.get(
13940
+ `/v1/connections/carriers/${carrierName}/${carrierCode}/settings`
13941
+ );
13942
+ };
13943
+ /**
13944
+ * The `updateCarrierSettings` method updates the settings for a given carrier,
13945
+ * identified by the `carrierName` and `carrierCode`.
13946
+ */
13947
+ this.updateCarrierSettings = (carrierName, carrierCode, formData) => {
13948
+ return this.client.put(
13949
+ `/v1/connections/carriers/${carrierName}/${carrierCode}/settings`,
13950
+ formData
13951
+ );
13952
+ };
13934
13953
  this.client = client;
13935
13954
  }
13936
13955
  }
@@ -16144,23 +16163,23 @@ class CustomPackagesAPI {
16144
16163
  }
16145
16164
  }
16146
16165
 
16147
- var __defProp$d = Object.defineProperty;
16148
- var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
16149
- var __hasOwnProp$o = Object.prototype.hasOwnProperty;
16150
- var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
16151
- var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16152
- var __spreadValues$d = (a, b) => {
16166
+ var __defProp$f = Object.defineProperty;
16167
+ var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
16168
+ var __hasOwnProp$q = Object.prototype.hasOwnProperty;
16169
+ var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
16170
+ var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16171
+ var __spreadValues$f = (a, b) => {
16153
16172
  for (var prop in b || (b = {}))
16154
- if (__hasOwnProp$o.call(b, prop))
16155
- __defNormalProp$d(a, prop, b[prop]);
16156
- if (__getOwnPropSymbols$o)
16157
- for (var prop of __getOwnPropSymbols$o(b)) {
16158
- if (__propIsEnum$o.call(b, prop))
16159
- __defNormalProp$d(a, prop, b[prop]);
16173
+ if (__hasOwnProp$q.call(b, prop))
16174
+ __defNormalProp$f(a, prop, b[prop]);
16175
+ if (__getOwnPropSymbols$q)
16176
+ for (var prop of __getOwnPropSymbols$q(b)) {
16177
+ if (__propIsEnum$q.call(b, prop))
16178
+ __defNormalProp$f(a, prop, b[prop]);
16160
16179
  }
16161
16180
  return a;
16162
16181
  };
16163
- var __async$K = (__this, __arguments, generator) => {
16182
+ var __async$L = (__this, __arguments, generator) => {
16164
16183
  return new Promise((resolve, reject) => {
16165
16184
  var fulfilled = (value) => {
16166
16185
  try {
@@ -16199,12 +16218,12 @@ class FundingSourcesAPI {
16199
16218
  * The `create` method creates a new funding source for a given user. This requires
16200
16219
  * payment information to be collected from the user.
16201
16220
  */
16202
- this.create = (createFundingSource) => __async$K(this, null, function* () {
16221
+ this.create = (createFundingSource) => __async$L(this, null, function* () {
16203
16222
  const endUserIpAddress = yield getEndUserIpAddress();
16204
16223
  if (!endUserIpAddress) {
16205
16224
  return Promise.reject([new CodedError("Unable to get IP address")]);
16206
16225
  }
16207
- return yield this.client.post("/v1/funding_sources", __spreadValues$d({
16226
+ return yield this.client.post("/v1/funding_sources", __spreadValues$f({
16208
16227
  endUserIpAddress
16209
16228
  }, createFundingSource));
16210
16229
  });
@@ -16213,7 +16232,7 @@ class FundingSourcesAPI {
16213
16232
  * user to update the billing address or payment information associated with the
16214
16233
  * funding source.
16215
16234
  */
16216
- this.update = (billingInfo, creditCardInfo, fundingSourceId) => __async$K(this, null, function* () {
16235
+ this.update = (billingInfo, creditCardInfo, fundingSourceId) => __async$L(this, null, function* () {
16217
16236
  const endUserIpAddress = yield getEndUserIpAddress();
16218
16237
  if (!endUserIpAddress) {
16219
16238
  return Promise.reject([new CodedError("Unable to get IP address")]);
@@ -16231,19 +16250,19 @@ class FundingSourcesAPI {
16231
16250
  * The `registerCarrier` method registers a carrier account and associates
16232
16251
  * it with a given funding source.
16233
16252
  */
16234
- this.registerCarrier = (carrier) => __async$K(this, null, function* () {
16253
+ this.registerCarrier = (carrier) => __async$L(this, null, function* () {
16235
16254
  const endUserIpAddress = yield getEndUserIpAddress();
16236
16255
  if (!endUserIpAddress) {
16237
16256
  return Promise.reject([new CodedError("Unable to get IP address")]);
16238
16257
  }
16239
- return yield this.client.post("/v1/registration/funding_source", __spreadValues$d({
16258
+ return yield this.client.post("/v1/registration/funding_source", __spreadValues$f({
16240
16259
  endUserIpAddress
16241
16260
  }, carrier));
16242
16261
  });
16243
16262
  /**
16244
16263
  * The `addFunds` method allows you to add funds to a funding source.
16245
16264
  */
16246
- this.addFunds = (amount, fundingSourceId) => __async$K(this, null, function* () {
16265
+ this.addFunds = (amount, fundingSourceId) => __async$L(this, null, function* () {
16247
16266
  return yield this.client.put(
16248
16267
  `/v1/funding_sources/${fundingSourceId}/add_funds`,
16249
16268
  amount
@@ -16253,7 +16272,7 @@ class FundingSourcesAPI {
16253
16272
  * The `metadata` method returns seller-specific requirements for creating funding sources
16254
16273
  * and attaching carriers
16255
16274
  */
16256
- this.metadata = () => __async$K(this, null, function* () {
16275
+ this.metadata = () => __async$L(this, null, function* () {
16257
16276
  return yield this.client.get("/v1/funding_sources/metadata");
16258
16277
  });
16259
16278
  /**
@@ -16441,19 +16460,19 @@ class RateCardsAPI {
16441
16460
  }
16442
16461
  }
16443
16462
 
16444
- var __defProp$c = Object.defineProperty;
16445
- var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
16446
- var __hasOwnProp$n = Object.prototype.hasOwnProperty;
16447
- var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
16448
- var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16449
- var __spreadValues$c = (a, b) => {
16463
+ var __defProp$e = Object.defineProperty;
16464
+ var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
16465
+ var __hasOwnProp$p = Object.prototype.hasOwnProperty;
16466
+ var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
16467
+ var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16468
+ var __spreadValues$e = (a, b) => {
16450
16469
  for (var prop in b || (b = {}))
16451
- if (__hasOwnProp$n.call(b, prop))
16452
- __defNormalProp$c(a, prop, b[prop]);
16453
- if (__getOwnPropSymbols$n)
16454
- for (var prop of __getOwnPropSymbols$n(b)) {
16455
- if (__propIsEnum$n.call(b, prop))
16456
- __defNormalProp$c(a, prop, b[prop]);
16470
+ if (__hasOwnProp$p.call(b, prop))
16471
+ __defNormalProp$e(a, prop, b[prop]);
16472
+ if (__getOwnPropSymbols$p)
16473
+ for (var prop of __getOwnPropSymbols$p(b)) {
16474
+ if (__propIsEnum$p.call(b, prop))
16475
+ __defNormalProp$e(a, prop, b[prop]);
16457
16476
  }
16458
16477
  return a;
16459
16478
  };
@@ -16475,7 +16494,7 @@ class RatesAPI {
16475
16494
  * method.
16476
16495
  */
16477
16496
  this.estimate = (params) => {
16478
- return this.client.post("/v1/rates/estimate", __spreadValues$c({}, params));
16497
+ return this.client.post("/v1/rates/estimate", __spreadValues$e({}, params));
16479
16498
  };
16480
16499
  this.client = client;
16481
16500
  }
@@ -16573,19 +16592,19 @@ class SellersAPI {
16573
16592
  }
16574
16593
  }
16575
16594
 
16576
- var __defProp$b = Object.defineProperty;
16577
- var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
16578
- var __hasOwnProp$m = Object.prototype.hasOwnProperty;
16579
- var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
16580
- var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16581
- var __spreadValues$b = (a, b) => {
16595
+ var __defProp$d = Object.defineProperty;
16596
+ var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
16597
+ var __hasOwnProp$o = Object.prototype.hasOwnProperty;
16598
+ var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
16599
+ var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16600
+ var __spreadValues$d = (a, b) => {
16582
16601
  for (var prop in b || (b = {}))
16583
- if (__hasOwnProp$m.call(b, prop))
16584
- __defNormalProp$b(a, prop, b[prop]);
16585
- if (__getOwnPropSymbols$m)
16586
- for (var prop of __getOwnPropSymbols$m(b)) {
16587
- if (__propIsEnum$m.call(b, prop))
16588
- __defNormalProp$b(a, prop, b[prop]);
16602
+ if (__hasOwnProp$o.call(b, prop))
16603
+ __defNormalProp$d(a, prop, b[prop]);
16604
+ if (__getOwnPropSymbols$o)
16605
+ for (var prop of __getOwnPropSymbols$o(b)) {
16606
+ if (__propIsEnum$o.call(b, prop))
16607
+ __defNormalProp$d(a, prop, b[prop]);
16589
16608
  }
16590
16609
  return a;
16591
16610
  };
@@ -16597,7 +16616,7 @@ class ServicePointsAPI {
16597
16616
  * Either an address, coordinates, or an address query
16598
16617
  */
16599
16618
  this.list = (options) => {
16600
- return this.client.post("/v1/service_points/list", __spreadValues$b({}, options));
16619
+ return this.client.post("/v1/service_points/list", __spreadValues$d({}, options));
16601
16620
  };
16602
16621
  /**
16603
16622
  * Get a specific service point by its carrier code, country code, and id
@@ -16615,7 +16634,7 @@ class ServicePointsAPI {
16615
16634
  }
16616
16635
  }
16617
16636
 
16618
- var __async$J = (__this, __arguments, generator) => {
16637
+ var __async$K = (__this, __arguments, generator) => {
16619
16638
  return new Promise((resolve, reject) => {
16620
16639
  var fulfilled = (value) => {
16621
16640
  try {
@@ -16658,7 +16677,7 @@ class ShipmentsAPI {
16658
16677
  * The `create` method allows for creating shipments based on a list of shipment
16659
16678
  * items passed into this method.
16660
16679
  */
16661
- this.create = (...shipments) => __async$J(this, null, function* () {
16680
+ this.create = (...shipments) => __async$K(this, null, function* () {
16662
16681
  return this.client.post("/v1/shipments", {
16663
16682
  shipments
16664
16683
  });
@@ -34024,26 +34043,26 @@ class WebhooksAPI {
34024
34043
  }
34025
34044
  }
34026
34045
 
34027
- var __defProp$a = Object.defineProperty;
34028
- var __defProps$8 = Object.defineProperties;
34029
- var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
34030
- var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
34031
- var __hasOwnProp$l = Object.prototype.hasOwnProperty;
34032
- var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
34033
- var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
34034
- var __spreadValues$a = (a, b) => {
34046
+ var __defProp$c = Object.defineProperty;
34047
+ var __defProps$a = Object.defineProperties;
34048
+ var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
34049
+ var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
34050
+ var __hasOwnProp$n = Object.prototype.hasOwnProperty;
34051
+ var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
34052
+ var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
34053
+ var __spreadValues$c = (a, b) => {
34035
34054
  for (var prop in b || (b = {}))
34036
- if (__hasOwnProp$l.call(b, prop))
34037
- __defNormalProp$a(a, prop, b[prop]);
34038
- if (__getOwnPropSymbols$l)
34039
- for (var prop of __getOwnPropSymbols$l(b)) {
34040
- if (__propIsEnum$l.call(b, prop))
34041
- __defNormalProp$a(a, prop, b[prop]);
34055
+ if (__hasOwnProp$n.call(b, prop))
34056
+ __defNormalProp$c(a, prop, b[prop]);
34057
+ if (__getOwnPropSymbols$n)
34058
+ for (var prop of __getOwnPropSymbols$n(b)) {
34059
+ if (__propIsEnum$n.call(b, prop))
34060
+ __defNormalProp$c(a, prop, b[prop]);
34042
34061
  }
34043
34062
  return a;
34044
34063
  };
34045
- var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
34046
- var __async$I = (__this, __arguments, generator) => {
34064
+ var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
34065
+ var __async$J = (__this, __arguments, generator) => {
34047
34066
  return new Promise((resolve, reject) => {
34048
34067
  var fulfilled = (value) => {
34049
34068
  try {
@@ -34066,7 +34085,7 @@ var __async$I = (__this, __arguments, generator) => {
34066
34085
  const logger$1 = E({
34067
34086
  level: process.env.NODE_ENV === "production" ? "fatal" : "info",
34068
34087
  name: "shipengine-api",
34069
- serializers: __spreadProps$8(__spreadValues$a({}, k), {
34088
+ serializers: __spreadProps$a(__spreadValues$c({}, k), {
34070
34089
  req: (req) => ({
34071
34090
  headers: req.headers,
34072
34091
  method: req.method,
@@ -34090,7 +34109,7 @@ class ShipEngineAPI {
34090
34109
  constructor(token, { baseURL, headers, getToken, onApiError }) {
34091
34110
  const client = axios.create({
34092
34111
  baseURL,
34093
- headers: __spreadProps$8(__spreadValues$a({}, headers), {
34112
+ headers: __spreadProps$a(__spreadValues$c({}, headers), {
34094
34113
  "Content-Type": "application/json"
34095
34114
  }),
34096
34115
  paramsSerializer: (params) => lib.stringify(humpsExports.decamelizeKeys(params), { arrayFormat: "brackets" }),
@@ -34137,7 +34156,7 @@ class ShipEngineAPI {
34137
34156
  );
34138
34157
  return res;
34139
34158
  },
34140
- (err) => __async$I(this, null, function* () {
34159
+ (err) => __async$J(this, null, function* () {
34141
34160
  var _a, _b, _c, _d, _e;
34142
34161
  logger$1.error(
34143
34162
  { err, req: err.config, res: err.response },
@@ -34419,25 +34438,25 @@ const delay = (ms) => new Promise((resolve) => {
34419
34438
 
34420
34439
  const onError = (_errors) => _default();
34421
34440
 
34422
- var __defProp$9 = Object.defineProperty;
34423
- var __defProps$7 = Object.defineProperties;
34424
- var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
34425
- var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
34426
- var __hasOwnProp$k = Object.prototype.hasOwnProperty;
34427
- var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
34428
- var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
34429
- var __spreadValues$9 = (a, b) => {
34441
+ var __defProp$b = Object.defineProperty;
34442
+ var __defProps$9 = Object.defineProperties;
34443
+ var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
34444
+ var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
34445
+ var __hasOwnProp$m = Object.prototype.hasOwnProperty;
34446
+ var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
34447
+ var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
34448
+ var __spreadValues$b = (a, b) => {
34430
34449
  for (var prop in b || (b = {}))
34431
- if (__hasOwnProp$k.call(b, prop))
34432
- __defNormalProp$9(a, prop, b[prop]);
34433
- if (__getOwnPropSymbols$k)
34434
- for (var prop of __getOwnPropSymbols$k(b)) {
34435
- if (__propIsEnum$k.call(b, prop))
34436
- __defNormalProp$9(a, prop, b[prop]);
34450
+ if (__hasOwnProp$m.call(b, prop))
34451
+ __defNormalProp$b(a, prop, b[prop]);
34452
+ if (__getOwnPropSymbols$m)
34453
+ for (var prop of __getOwnPropSymbols$m(b)) {
34454
+ if (__propIsEnum$m.call(b, prop))
34455
+ __defNormalProp$b(a, prop, b[prop]);
34437
34456
  }
34438
34457
  return a;
34439
34458
  };
34440
- var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
34459
+ var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
34441
34460
  const streams = [];
34442
34461
  if (process.env.NODE_ENV === "production") {
34443
34462
  streams.push({
@@ -34446,7 +34465,7 @@ if (process.env.NODE_ENV === "production") {
34446
34465
  }
34447
34466
  const logger = E({
34448
34467
  name: "shipengine",
34449
- serializers: __spreadProps$7(__spreadValues$9({}, k), {
34468
+ serializers: __spreadProps$9(__spreadValues$b({}, k), {
34450
34469
  req: (req) => ({
34451
34470
  headers: req.headers,
34452
34471
  method: req.method,
@@ -34471,7 +34490,7 @@ const retryUntil = (callbackFn, retries = 10, timeoutBetweenAttempts = 1e3) => P
34471
34490
  throw error;
34472
34491
  });
34473
34492
 
34474
- var __async$H = (__this, __arguments, generator) => {
34493
+ var __async$I = (__this, __arguments, generator) => {
34475
34494
  return new Promise((resolve, reject) => {
34476
34495
  var fulfilled = (value) => {
34477
34496
  try {
@@ -34494,7 +34513,7 @@ var __async$H = (__this, __arguments, generator) => {
34494
34513
  const useCreateAccountImage = () => {
34495
34514
  const { client } = useShipEngine();
34496
34515
  return useMutation({
34497
- mutationFn: (data) => __async$H(void 0, null, function* () {
34516
+ mutationFn: (data) => __async$I(void 0, null, function* () {
34498
34517
  const result = yield client.accountSettings.createImage(data);
34499
34518
  return result.data;
34500
34519
  }),
@@ -34503,7 +34522,7 @@ const useCreateAccountImage = () => {
34503
34522
  });
34504
34523
  };
34505
34524
 
34506
- var __async$G = (__this, __arguments, generator) => {
34525
+ var __async$H = (__this, __arguments, generator) => {
34507
34526
  return new Promise((resolve, reject) => {
34508
34527
  var fulfilled = (value) => {
34509
34528
  try {
@@ -34526,7 +34545,7 @@ var __async$G = (__this, __arguments, generator) => {
34526
34545
  const useDeleteAccountImage = () => {
34527
34546
  const { client } = useShipEngine();
34528
34547
  return useMutation({
34529
- mutationFn: (labelImageId) => __async$G(void 0, null, function* () {
34548
+ mutationFn: (labelImageId) => __async$H(void 0, null, function* () {
34530
34549
  const result = yield client.accountSettings.deleteImage(labelImageId);
34531
34550
  return result.data;
34532
34551
  }),
@@ -34555,7 +34574,7 @@ const useGetAccountSettings = () => {
34555
34574
  });
34556
34575
  };
34557
34576
 
34558
- var __async$F = (__this, __arguments, generator) => {
34577
+ var __async$G = (__this, __arguments, generator) => {
34559
34578
  return new Promise((resolve, reject) => {
34560
34579
  var fulfilled = (value) => {
34561
34580
  try {
@@ -34578,7 +34597,7 @@ var __async$F = (__this, __arguments, generator) => {
34578
34597
  const useUpdateAccountImage = () => {
34579
34598
  const { client } = useShipEngine();
34580
34599
  return useMutation({
34581
- mutationFn: (data) => __async$F(void 0, null, function* () {
34600
+ mutationFn: (data) => __async$G(void 0, null, function* () {
34582
34601
  const result = yield client.accountSettings.updateImage(data);
34583
34602
  return result.data;
34584
34603
  }),
@@ -34587,7 +34606,7 @@ const useUpdateAccountImage = () => {
34587
34606
  });
34588
34607
  };
34589
34608
 
34590
- var __async$E = (__this, __arguments, generator) => {
34609
+ var __async$F = (__this, __arguments, generator) => {
34591
34610
  return new Promise((resolve, reject) => {
34592
34611
  var fulfilled = (value) => {
34593
34612
  try {
@@ -34610,7 +34629,7 @@ var __async$E = (__this, __arguments, generator) => {
34610
34629
  const useUpdateAccountSettings = () => {
34611
34630
  const { client } = useShipEngine();
34612
34631
  return useMutation({
34613
- mutationFn: (settings) => __async$E(void 0, null, function* () {
34632
+ mutationFn: (settings) => __async$F(void 0, null, function* () {
34614
34633
  const result = yield client.accountSettings.update(settings);
34615
34634
  return result.data;
34616
34635
  }),
@@ -34619,7 +34638,7 @@ const useUpdateAccountSettings = () => {
34619
34638
  });
34620
34639
  };
34621
34640
 
34622
- var __async$D = (__this, __arguments, generator) => {
34641
+ var __async$E = (__this, __arguments, generator) => {
34623
34642
  return new Promise((resolve, reject) => {
34624
34643
  var fulfilled = (value) => {
34625
34644
  try {
@@ -34642,7 +34661,7 @@ var __async$D = (__this, __arguments, generator) => {
34642
34661
  const useParseAddress = () => {
34643
34662
  const { client } = useShipEngine();
34644
34663
  return useMutation({
34645
- mutationFn: (_0) => __async$D(void 0, [_0], function* ({ address, text }) {
34664
+ mutationFn: (_0) => __async$E(void 0, [_0], function* ({ address, text }) {
34646
34665
  const result = yield client.addresses.parse(text, address);
34647
34666
  return result.data;
34648
34667
  }),
@@ -34651,7 +34670,7 @@ const useParseAddress = () => {
34651
34670
  });
34652
34671
  };
34653
34672
 
34654
- var __async$C = (__this, __arguments, generator) => {
34673
+ var __async$D = (__this, __arguments, generator) => {
34655
34674
  return new Promise((resolve, reject) => {
34656
34675
  var fulfilled = (value) => {
34657
34676
  try {
@@ -34674,7 +34693,7 @@ var __async$C = (__this, __arguments, generator) => {
34674
34693
  const useValidateAddresses = () => {
34675
34694
  const { client } = useShipEngine();
34676
34695
  return useMutation({
34677
- mutationFn: (addresses) => __async$C(void 0, null, function* () {
34696
+ mutationFn: (addresses) => __async$D(void 0, null, function* () {
34678
34697
  const result = yield client.addresses.validate(addresses);
34679
34698
  return result.data;
34680
34699
  }),
@@ -34683,7 +34702,7 @@ const useValidateAddresses = () => {
34683
34702
  });
34684
34703
  };
34685
34704
 
34686
- var __async$B = (__this, __arguments, generator) => {
34705
+ var __async$C = (__this, __arguments, generator) => {
34687
34706
  return new Promise((resolve, reject) => {
34688
34707
  var fulfilled = (value) => {
34689
34708
  try {
@@ -34706,7 +34725,7 @@ var __async$B = (__this, __arguments, generator) => {
34706
34725
  const useAddFunds = () => {
34707
34726
  const { client } = useShipEngine();
34708
34727
  return useMutation({
34709
- mutationFn: (_0) => __async$B(void 0, [_0], function* ({ carrierId, funds }) {
34728
+ mutationFn: (_0) => __async$C(void 0, [_0], function* ({ carrierId, funds }) {
34710
34729
  const result = yield client.carriers.addFunds(carrierId, funds);
34711
34730
  return result.data;
34712
34731
  }),
@@ -34715,7 +34734,7 @@ const useAddFunds = () => {
34715
34734
  });
34716
34735
  };
34717
34736
 
34718
- var __async$A = (__this, __arguments, generator) => {
34737
+ var __async$B = (__this, __arguments, generator) => {
34719
34738
  return new Promise((resolve, reject) => {
34720
34739
  var fulfilled = (value) => {
34721
34740
  try {
@@ -34738,7 +34757,7 @@ var __async$A = (__this, __arguments, generator) => {
34738
34757
  const useConnectCarrier = () => {
34739
34758
  const { client } = useShipEngine();
34740
34759
  return useMutation({
34741
- mutationFn: (params) => __async$A(void 0, null, function* () {
34760
+ mutationFn: (params) => __async$B(void 0, null, function* () {
34742
34761
  const result = yield client.carriers.connect(params);
34743
34762
  return result.data;
34744
34763
  }),
@@ -34857,22 +34876,22 @@ const useListCarriers = () => {
34857
34876
  });
34858
34877
  };
34859
34878
 
34860
- var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
34861
- var __hasOwnProp$j = Object.prototype.hasOwnProperty;
34862
- var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
34863
- var __objRest$c = (source, exclude) => {
34879
+ var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
34880
+ var __hasOwnProp$l = Object.prototype.hasOwnProperty;
34881
+ var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
34882
+ var __objRest$d = (source, exclude) => {
34864
34883
  var target = {};
34865
34884
  for (var prop in source)
34866
- if (__hasOwnProp$j.call(source, prop) && exclude.indexOf(prop) < 0)
34885
+ if (__hasOwnProp$l.call(source, prop) && exclude.indexOf(prop) < 0)
34867
34886
  target[prop] = source[prop];
34868
- if (source != null && __getOwnPropSymbols$j)
34869
- for (var prop of __getOwnPropSymbols$j(source)) {
34870
- if (exclude.indexOf(prop) < 0 && __propIsEnum$j.call(source, prop))
34887
+ if (source != null && __getOwnPropSymbols$l)
34888
+ for (var prop of __getOwnPropSymbols$l(source)) {
34889
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$l.call(source, prop))
34871
34890
  target[prop] = source[prop];
34872
34891
  }
34873
34892
  return target;
34874
34893
  };
34875
- var __async$z = (__this, __arguments, generator) => {
34894
+ var __async$A = (__this, __arguments, generator) => {
34876
34895
  return new Promise((resolve, reject) => {
34877
34896
  var fulfilled = (value) => {
34878
34897
  try {
@@ -34896,8 +34915,8 @@ const useUpdateAutoFunding = () => {
34896
34915
  const { client } = useShipEngine();
34897
34916
  const queryClient = useQueryClient();
34898
34917
  return useMutation({
34899
- mutationFn: (_a) => __async$z(void 0, null, function* () {
34900
- var _b = _a, { carrierId } = _b, options = __objRest$c(_b, ["carrierId"]);
34918
+ mutationFn: (_a) => __async$A(void 0, null, function* () {
34919
+ var _b = _a, { carrierId } = _b, options = __objRest$d(_b, ["carrierId"]);
34901
34920
  const result = yield client.carriers.updateAutoFunding(carrierId, options);
34902
34921
  return result.data;
34903
34922
  }),
@@ -34926,7 +34945,7 @@ const useGetZonesByCarrier = (carrierId) => {
34926
34945
  });
34927
34946
  };
34928
34947
 
34929
- var __async$y = (__this, __arguments, generator) => {
34948
+ var __async$z = (__this, __arguments, generator) => {
34930
34949
  return new Promise((resolve, reject) => {
34931
34950
  var fulfilled = (value) => {
34932
34951
  try {
@@ -34949,7 +34968,7 @@ var __async$y = (__this, __arguments, generator) => {
34949
34968
  const useDeleteCarrier = () => {
34950
34969
  const { client } = useShipEngine();
34951
34970
  return useMutation({
34952
- mutationFn: (carrierId) => __async$y(void 0, null, function* () {
34971
+ mutationFn: (carrierId) => __async$z(void 0, null, function* () {
34953
34972
  const result = yield client.carriers.delete(carrierId);
34954
34973
  return result.data;
34955
34974
  }),
@@ -34958,24 +34977,24 @@ const useDeleteCarrier = () => {
34958
34977
  });
34959
34978
  };
34960
34979
 
34961
- var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
34962
- var __hasOwnProp$i = Object.prototype.hasOwnProperty;
34963
- var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
34964
- var __objRest$b = (source, exclude) => {
34980
+ var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
34981
+ var __hasOwnProp$k = Object.prototype.hasOwnProperty;
34982
+ var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
34983
+ var __objRest$c = (source, exclude) => {
34965
34984
  var target = {};
34966
34985
  for (var prop in source)
34967
- if (__hasOwnProp$i.call(source, prop) && exclude.indexOf(prop) < 0)
34986
+ if (__hasOwnProp$k.call(source, prop) && exclude.indexOf(prop) < 0)
34968
34987
  target[prop] = source[prop];
34969
- if (source != null && __getOwnPropSymbols$i)
34970
- for (var prop of __getOwnPropSymbols$i(source)) {
34971
- if (exclude.indexOf(prop) < 0 && __propIsEnum$i.call(source, prop))
34988
+ if (source != null && __getOwnPropSymbols$k)
34989
+ for (var prop of __getOwnPropSymbols$k(source)) {
34990
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$k.call(source, prop))
34972
34991
  target[prop] = source[prop];
34973
34992
  }
34974
34993
  return target;
34975
34994
  };
34976
34995
  const useGetCarrierConnectionForm = (_params) => {
34977
34996
  const { client } = useShipEngine();
34978
- const _a = _params || {}, { carrierName, enabled = true } = _a, params = __objRest$b(_a, ["carrierName", "enabled"]);
34997
+ const _a = _params || {}, { carrierName, enabled = true } = _a, params = __objRest$c(_a, ["carrierName", "enabled"]);
34979
34998
  return useQuery({
34980
34999
  enabled,
34981
35000
  onError,
@@ -34985,24 +35004,24 @@ const useGetCarrierConnectionForm = (_params) => {
34985
35004
  });
34986
35005
  };
34987
35006
 
34988
- var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
34989
- var __hasOwnProp$h = Object.prototype.hasOwnProperty;
34990
- var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
34991
- var __objRest$a = (source, exclude) => {
35007
+ var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
35008
+ var __hasOwnProp$j = Object.prototype.hasOwnProperty;
35009
+ var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
35010
+ var __objRest$b = (source, exclude) => {
34992
35011
  var target = {};
34993
35012
  for (var prop in source)
34994
- if (__hasOwnProp$h.call(source, prop) && exclude.indexOf(prop) < 0)
35013
+ if (__hasOwnProp$j.call(source, prop) && exclude.indexOf(prop) < 0)
34995
35014
  target[prop] = source[prop];
34996
- if (source != null && __getOwnPropSymbols$h)
34997
- for (var prop of __getOwnPropSymbols$h(source)) {
34998
- if (exclude.indexOf(prop) < 0 && __propIsEnum$h.call(source, prop))
35015
+ if (source != null && __getOwnPropSymbols$j)
35016
+ for (var prop of __getOwnPropSymbols$j(source)) {
35017
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$j.call(source, prop))
34999
35018
  target[prop] = source[prop];
35000
35019
  }
35001
35020
  return target;
35002
35021
  };
35003
35022
  const useListCarrierConnections = (_params) => {
35004
35023
  const { client } = useShipEngine();
35005
- const _a = _params || {}, { enabled = true } = _a, params = __objRest$a(_a, ["enabled"]);
35024
+ const _a = _params || {}, { enabled = true } = _a, params = __objRest$b(_a, ["enabled"]);
35006
35025
  return useQuery({
35007
35026
  enabled,
35008
35027
  onError,
@@ -35012,7 +35031,7 @@ const useListCarrierConnections = (_params) => {
35012
35031
  });
35013
35032
  };
35014
35033
 
35015
- var __async$x = (__this, __arguments, generator) => {
35034
+ var __async$y = (__this, __arguments, generator) => {
35016
35035
  return new Promise((resolve, reject) => {
35017
35036
  var fulfilled = (value) => {
35018
35037
  try {
@@ -35035,7 +35054,7 @@ var __async$x = (__this, __arguments, generator) => {
35035
35054
  const useConnectCarrierAccount = () => {
35036
35055
  const { client } = useShipEngine();
35037
35056
  return useMutation({
35038
- mutationFn: (_0) => __async$x(void 0, [_0], function* ({ carrierName, formData }) {
35057
+ mutationFn: (_0) => __async$y(void 0, [_0], function* ({ carrierName, formData }) {
35039
35058
  const result = yield client.connections.connectCarrier(carrierName, formData);
35040
35059
  return result.data;
35041
35060
  }),
@@ -35055,6 +35074,112 @@ const useCarrierConnectionsServicesList = (carrierCode) => {
35055
35074
  });
35056
35075
  };
35057
35076
 
35077
+ var __defProp$a = Object.defineProperty;
35078
+ var __defProps$8 = Object.defineProperties;
35079
+ var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
35080
+ var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
35081
+ var __hasOwnProp$i = Object.prototype.hasOwnProperty;
35082
+ var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
35083
+ var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35084
+ var __spreadValues$a = (a, b) => {
35085
+ for (var prop in b || (b = {}))
35086
+ if (__hasOwnProp$i.call(b, prop))
35087
+ __defNormalProp$a(a, prop, b[prop]);
35088
+ if (__getOwnPropSymbols$i)
35089
+ for (var prop of __getOwnPropSymbols$i(b)) {
35090
+ if (__propIsEnum$i.call(b, prop))
35091
+ __defNormalProp$a(a, prop, b[prop]);
35092
+ }
35093
+ return a;
35094
+ };
35095
+ var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
35096
+ var __objRest$a = (source, exclude) => {
35097
+ var target = {};
35098
+ for (var prop in source)
35099
+ if (__hasOwnProp$i.call(source, prop) && exclude.indexOf(prop) < 0)
35100
+ target[prop] = source[prop];
35101
+ if (source != null && __getOwnPropSymbols$i)
35102
+ for (var prop of __getOwnPropSymbols$i(source)) {
35103
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$i.call(source, prop))
35104
+ target[prop] = source[prop];
35105
+ }
35106
+ return target;
35107
+ };
35108
+ const useGetConnectionsCarrierSettings = (_a) => {
35109
+ var _b = _a, {
35110
+ queryFnParams
35111
+ } = _b, params = __objRest$a(_b, [
35112
+ "queryFnParams"
35113
+ ]);
35114
+ const { client } = useShipEngine();
35115
+ const { carrierName, carrierCode } = queryFnParams;
35116
+ return useQuery(__spreadProps$8(__spreadValues$a({}, params), {
35117
+ onError,
35118
+ queryFn: () => client.connections.getCarrierSettings(carrierName, carrierCode),
35119
+ queryKey: ["useGetConnectionsCarrierSettings", carrierName, carrierCode],
35120
+ select: (result) => result.data
35121
+ }));
35122
+ };
35123
+
35124
+ var __defProp$9 = Object.defineProperty;
35125
+ var __defProps$7 = Object.defineProperties;
35126
+ var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
35127
+ var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
35128
+ var __hasOwnProp$h = Object.prototype.hasOwnProperty;
35129
+ var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
35130
+ var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35131
+ var __spreadValues$9 = (a, b) => {
35132
+ for (var prop in b || (b = {}))
35133
+ if (__hasOwnProp$h.call(b, prop))
35134
+ __defNormalProp$9(a, prop, b[prop]);
35135
+ if (__getOwnPropSymbols$h)
35136
+ for (var prop of __getOwnPropSymbols$h(b)) {
35137
+ if (__propIsEnum$h.call(b, prop))
35138
+ __defNormalProp$9(a, prop, b[prop]);
35139
+ }
35140
+ return a;
35141
+ };
35142
+ var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
35143
+ var __async$x = (__this, __arguments, generator) => {
35144
+ return new Promise((resolve, reject) => {
35145
+ var fulfilled = (value) => {
35146
+ try {
35147
+ step(generator.next(value));
35148
+ } catch (e) {
35149
+ reject(e);
35150
+ }
35151
+ };
35152
+ var rejected = (value) => {
35153
+ try {
35154
+ step(generator.throw(value));
35155
+ } catch (e) {
35156
+ reject(e);
35157
+ }
35158
+ };
35159
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
35160
+ step((generator = generator.apply(__this, __arguments)).next());
35161
+ });
35162
+ };
35163
+ const useUpdateConnectionsCarrierSettings = (params) => {
35164
+ const { client } = useShipEngine();
35165
+ return useMutation(__spreadProps$7(__spreadValues$9({}, params), {
35166
+ mutationFn: (_0) => __async$x(void 0, [_0], function* ({
35167
+ carrierName,
35168
+ carrierCode,
35169
+ formData
35170
+ }) {
35171
+ const result = yield client.connections.updateCarrierSettings(
35172
+ carrierName,
35173
+ carrierCode,
35174
+ formData
35175
+ );
35176
+ return result.data;
35177
+ }),
35178
+ mutationKey: ["useUpdateConnectionsCarrierSettings"],
35179
+ onError
35180
+ }));
35181
+ };
35182
+
35058
35183
  const useListCustomPackageTypes = () => {
35059
35184
  const { client } = useShipEngine();
35060
35185
  return useQuery({
@@ -37915,4 +38040,4 @@ const alchemy = {
37915
38040
  createElement
37916
38041
  };
37917
38042
 
37918
- 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, SellersAPI, ServicePointsAPI, ShipEngine, ShipEngineAPI, ShipEngineContext, ShipmentsAPI, ShippingRulesAPI, ThemesAPI, WarehousesAPI, WebhooksAPI, alchemy, alchemy as default, delay, getEmotionCache, getEndUserIpAddress, isCodedError, isCodedErrors, isDataCodedErrors, isInvalidTokenError, logger, onError, parseError, retryUntil, useAddFunds, useAddInsuranceFunds, useAddSandboxCarriers, useAlchemy, useCalculateRates, useCarrierConnectionsServicesList, useConnectCarrier, useConnectCarrierAccount, useCreateAccountImage, useCreateFundingSource, useCreateLabel, useCreateRateCard, useCreateSalesOrderShipment, useCreateSandboxSeller, useCreateShipment, useCreateShippingRule, useCreateWarehouse, useCreateWebhook, useDeactivateOrderSource, useDeleteAccountImage, useDeleteCarrier, useDeleteRateCard, useDeleteShippingRule, useDeleteWarehouse, useDeleteWebhook, useDownloadRateCard, useEditShippingRule, useFundingSourcesAddFunds, useGetAccountBillingPlan, useGetAccountImages, useGetAccountSettings, useGetAutoFundingConfiguration, useGetCarrierById, useGetCarrierConnectionForm, useGetCountriesByCarrier, useGetCurrenciesByCarrier, useGetFundingSourceById, useGetFundingSourceMetadata, useGetFundingSourceTransactions, useGetHereToken, useGetInsuranceAccount, useGetInsuranceFundingSourceAcceptedTerms, useGetLabel, useGetPackageRatingGroupByCarrier, useGetRateCardById, useGetSalesOrder, useGetSalesOrderShipment, useGetServicePoint, useGetServicesByCarrier, useGetShipment, useGetShipmentRates, useGetShippingRuleById, useGetShippingRuleConditionsOptions, useGetThemeById, useGetZonesByCarrier, useI18n, useListCarrierConnections, useListCarriers, useListCustomPackageTypes, useListFundingSources, useListLabels, useListOrderSources, useListRateCards, useListSalesOrderShipments, useListSalesOrders, useListSandboxSellerIds, useListServicePoints, useListShipments, useListShippingRules, useListWarehouses, useListWebhooks, useLoadIcons, useNotifySalesOrderShipped, useParseAddress, usePublishRateCard, useRatesEstimate, useRefreshOrderSource, useRefreshOrderSourceAsync, useRegisterCarrier, useShipEngine, useUpdateAccountBillingPlan, useUpdateAccountImage, useUpdateAccountSettings, useUpdateAutoFunding, useUpdateFundingSource, useUpdateRateCard, useUpdateSalesOrderShipment, useUpdateWarehouse, useUpdateWebhook, useUploadRateCard, useValidateAddresses, useVoidLabel };
38043
+ 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, SellersAPI, ServicePointsAPI, ShipEngine, ShipEngineAPI, ShipEngineContext, ShipmentsAPI, ShippingRulesAPI, ThemesAPI, WarehousesAPI, WebhooksAPI, alchemy, alchemy as default, delay, getEmotionCache, getEndUserIpAddress, isCodedError, isCodedErrors, isDataCodedErrors, isInvalidTokenError, logger, onError, parseError, retryUntil, useAddFunds, useAddInsuranceFunds, useAddSandboxCarriers, useAlchemy, useCalculateRates, useCarrierConnectionsServicesList, useConnectCarrier, useConnectCarrierAccount, useCreateAccountImage, useCreateFundingSource, useCreateLabel, useCreateRateCard, useCreateSalesOrderShipment, useCreateSandboxSeller, useCreateShipment, useCreateShippingRule, useCreateWarehouse, useCreateWebhook, useDeactivateOrderSource, useDeleteAccountImage, useDeleteCarrier, useDeleteRateCard, useDeleteShippingRule, useDeleteWarehouse, useDeleteWebhook, useDownloadRateCard, useEditShippingRule, useFundingSourcesAddFunds, useGetAccountBillingPlan, useGetAccountImages, useGetAccountSettings, useGetAutoFundingConfiguration, useGetCarrierById, useGetCarrierConnectionForm, useGetConnectionsCarrierSettings, useGetCountriesByCarrier, useGetCurrenciesByCarrier, useGetFundingSourceById, useGetFundingSourceMetadata, useGetFundingSourceTransactions, useGetHereToken, useGetInsuranceAccount, useGetInsuranceFundingSourceAcceptedTerms, useGetLabel, useGetPackageRatingGroupByCarrier, useGetRateCardById, useGetSalesOrder, useGetSalesOrderShipment, useGetServicePoint, useGetServicesByCarrier, useGetShipment, useGetShipmentRates, useGetShippingRuleById, useGetShippingRuleConditionsOptions, useGetThemeById, useGetZonesByCarrier, useI18n, useListCarrierConnections, useListCarriers, useListCustomPackageTypes, useListFundingSources, useListLabels, useListOrderSources, useListRateCards, useListSalesOrderShipments, useListSalesOrders, useListSandboxSellerIds, useListServicePoints, useListShipments, useListShippingRules, useListWarehouses, useListWebhooks, useLoadIcons, useNotifySalesOrderShipped, useParseAddress, usePublishRateCard, useRatesEstimate, useRefreshOrderSource, useRefreshOrderSourceAsync, useRegisterCarrier, useShipEngine, useUpdateAccountBillingPlan, useUpdateAccountImage, useUpdateAccountSettings, useUpdateAutoFunding, useUpdateConnectionsCarrierSettings, useUpdateFundingSource, useUpdateRateCard, useUpdateSalesOrderShipment, useUpdateWarehouse, useUpdateWebhook, useUploadRateCard, useValidateAddresses, useVoidLabel };