@shipengine/alchemy 5.0.18 → 5.0.19

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 +80 -64
  2. package/index.mjs +80 -64
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -10786,17 +10786,17 @@ var AccountBillingPlanChangeType = /* @__PURE__ */ ((AccountBillingPlanChangeTyp
10786
10786
  return AccountBillingPlanChangeType2;
10787
10787
  })(AccountBillingPlanChangeType || {});
10788
10788
 
10789
- var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
10790
- var __hasOwnProp$e = Object.prototype.hasOwnProperty;
10791
- var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
10792
- var __objRest$9 = (source, exclude) => {
10789
+ var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
10790
+ var __hasOwnProp$f = Object.prototype.hasOwnProperty;
10791
+ var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
10792
+ var __objRest$a = (source, exclude) => {
10793
10793
  var target = {};
10794
10794
  for (var prop in source)
10795
- if (__hasOwnProp$e.call(source, prop) && exclude.indexOf(prop) < 0)
10795
+ if (__hasOwnProp$f.call(source, prop) && exclude.indexOf(prop) < 0)
10796
10796
  target[prop] = source[prop];
10797
- if (source != null && __getOwnPropSymbols$e)
10798
- for (var prop of __getOwnPropSymbols$e(source)) {
10799
- if (exclude.indexOf(prop) < 0 && __propIsEnum$e.call(source, prop))
10797
+ if (source != null && __getOwnPropSymbols$f)
10798
+ for (var prop of __getOwnPropSymbols$f(source)) {
10799
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$f.call(source, prop))
10800
10800
  target[prop] = source[prop];
10801
10801
  }
10802
10802
  return target;
@@ -10810,7 +10810,7 @@ class CodedError {
10810
10810
  this.message = message;
10811
10811
  }
10812
10812
  static fromObject(_a) {
10813
- var _b = _a, { message } = _b, options = __objRest$9(_b, ["message"]);
10813
+ var _b = _a, { message } = _b, options = __objRest$a(_b, ["message"]);
10814
10814
  return new CodedError(message, options);
10815
10815
  }
10816
10816
  }
@@ -10918,17 +10918,17 @@ const types = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
10918
10918
  RateCardStatus
10919
10919
  }, Symbol.toStringTag, { value: 'Module' }));
10920
10920
 
10921
- var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
10922
- var __hasOwnProp$d = Object.prototype.hasOwnProperty;
10923
- var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
10924
- var __objRest$8 = (source, exclude) => {
10921
+ var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
10922
+ var __hasOwnProp$e = Object.prototype.hasOwnProperty;
10923
+ var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
10924
+ var __objRest$9 = (source, exclude) => {
10925
10925
  var target = {};
10926
10926
  for (var prop in source)
10927
- if (__hasOwnProp$d.call(source, prop) && exclude.indexOf(prop) < 0)
10927
+ if (__hasOwnProp$e.call(source, prop) && exclude.indexOf(prop) < 0)
10928
10928
  target[prop] = source[prop];
10929
- if (source != null && __getOwnPropSymbols$d)
10930
- for (var prop of __getOwnPropSymbols$d(source)) {
10931
- if (exclude.indexOf(prop) < 0 && __propIsEnum$d.call(source, prop))
10929
+ if (source != null && __getOwnPropSymbols$e)
10930
+ for (var prop of __getOwnPropSymbols$e(source)) {
10931
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$e.call(source, prop))
10932
10932
  target[prop] = source[prop];
10933
10933
  }
10934
10934
  return target;
@@ -10960,7 +10960,7 @@ class AccountSettingsAPI {
10960
10960
  * The `updateImage` method updates specific image data for a given image id.
10961
10961
  */
10962
10962
  this.updateImage = (_a) => {
10963
- var _b = _a, { labelImageId } = _b, data = __objRest$8(_b, ["labelImageId"]);
10963
+ var _b = _a, { labelImageId } = _b, data = __objRest$9(_b, ["labelImageId"]);
10964
10964
  return this.client.put(`/v1/account/settings/images/${labelImageId}`, data);
10965
10965
  };
10966
10966
  /**
@@ -13675,30 +13675,30 @@ const getEndUserIpAddress = () => __async$C(void 0, null, function* () {
13675
13675
  var __defProp$6 = Object.defineProperty;
13676
13676
  var __defProps$3 = Object.defineProperties;
13677
13677
  var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
13678
- var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
13679
- var __hasOwnProp$c = Object.prototype.hasOwnProperty;
13680
- var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
13678
+ var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
13679
+ var __hasOwnProp$d = Object.prototype.hasOwnProperty;
13680
+ var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
13681
13681
  var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13682
13682
  var __spreadValues$6 = (a, b) => {
13683
13683
  for (var prop in b || (b = {}))
13684
- if (__hasOwnProp$c.call(b, prop))
13684
+ if (__hasOwnProp$d.call(b, prop))
13685
13685
  __defNormalProp$6(a, prop, b[prop]);
13686
- if (__getOwnPropSymbols$c)
13687
- for (var prop of __getOwnPropSymbols$c(b)) {
13688
- if (__propIsEnum$c.call(b, prop))
13686
+ if (__getOwnPropSymbols$d)
13687
+ for (var prop of __getOwnPropSymbols$d(b)) {
13688
+ if (__propIsEnum$d.call(b, prop))
13689
13689
  __defNormalProp$6(a, prop, b[prop]);
13690
13690
  }
13691
13691
  return a;
13692
13692
  };
13693
13693
  var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
13694
- var __objRest$7 = (source, exclude) => {
13694
+ var __objRest$8 = (source, exclude) => {
13695
13695
  var target = {};
13696
13696
  for (var prop in source)
13697
- if (__hasOwnProp$c.call(source, prop) && exclude.indexOf(prop) < 0)
13697
+ if (__hasOwnProp$d.call(source, prop) && exclude.indexOf(prop) < 0)
13698
13698
  target[prop] = source[prop];
13699
- if (source != null && __getOwnPropSymbols$c)
13700
- for (var prop of __getOwnPropSymbols$c(source)) {
13701
- if (exclude.indexOf(prop) < 0 && __propIsEnum$c.call(source, prop))
13699
+ if (source != null && __getOwnPropSymbols$d)
13700
+ for (var prop of __getOwnPropSymbols$d(source)) {
13701
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$d.call(source, prop))
13702
13702
  target[prop] = source[prop];
13703
13703
  }
13704
13704
  return target;
@@ -13742,7 +13742,7 @@ class CarriersAPI {
13742
13742
  * The `connect` method connects a carrier account to a user's ShipEngine account.
13743
13743
  */
13744
13744
  this.connect = (_a) => __async$B(this, null, function* () {
13745
- var _b = _a, { carrierCode } = _b, connection = __objRest$7(_b, ["carrierCode"]);
13745
+ var _b = _a, { carrierCode } = _b, connection = __objRest$8(_b, ["carrierCode"]);
13746
13746
  const endUserIpAddress = yield getEndUserIpAddress();
13747
13747
  if (!endUserIpAddress)
13748
13748
  return Promise.reject([new CodedError("Unable to get IP address")]);
@@ -16048,17 +16048,17 @@ class CustomPackagesAPI {
16048
16048
  }
16049
16049
 
16050
16050
  var __defProp$5 = Object.defineProperty;
16051
- var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
16052
- var __hasOwnProp$b = Object.prototype.hasOwnProperty;
16053
- var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
16051
+ var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
16052
+ var __hasOwnProp$c = Object.prototype.hasOwnProperty;
16053
+ var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
16054
16054
  var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16055
16055
  var __spreadValues$5 = (a, b) => {
16056
16056
  for (var prop in b || (b = {}))
16057
- if (__hasOwnProp$b.call(b, prop))
16057
+ if (__hasOwnProp$c.call(b, prop))
16058
16058
  __defNormalProp$5(a, prop, b[prop]);
16059
- if (__getOwnPropSymbols$b)
16060
- for (var prop of __getOwnPropSymbols$b(b)) {
16061
- if (__propIsEnum$b.call(b, prop))
16059
+ if (__getOwnPropSymbols$c)
16060
+ for (var prop of __getOwnPropSymbols$c(b)) {
16061
+ if (__propIsEnum$c.call(b, prop))
16062
16062
  __defNormalProp$5(a, prop, b[prop]);
16063
16063
  }
16064
16064
  return a;
@@ -16533,17 +16533,17 @@ class WarehousesAPI {
16533
16533
  var __defProp$4 = Object.defineProperty;
16534
16534
  var __defProps$2 = Object.defineProperties;
16535
16535
  var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
16536
- var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
16537
- var __hasOwnProp$a = Object.prototype.hasOwnProperty;
16538
- var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
16536
+ var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
16537
+ var __hasOwnProp$b = Object.prototype.hasOwnProperty;
16538
+ var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
16539
16539
  var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16540
16540
  var __spreadValues$4 = (a, b) => {
16541
16541
  for (var prop in b || (b = {}))
16542
- if (__hasOwnProp$a.call(b, prop))
16542
+ if (__hasOwnProp$b.call(b, prop))
16543
16543
  __defNormalProp$4(a, prop, b[prop]);
16544
- if (__getOwnPropSymbols$a)
16545
- for (var prop of __getOwnPropSymbols$a(b)) {
16546
- if (__propIsEnum$a.call(b, prop))
16544
+ if (__getOwnPropSymbols$b)
16545
+ for (var prop of __getOwnPropSymbols$b(b)) {
16546
+ if (__propIsEnum$b.call(b, prop))
16547
16547
  __defNormalProp$4(a, prop, b[prop]);
16548
16548
  }
16549
16549
  return a;
@@ -16889,17 +16889,17 @@ const onError = (errors) => errors.forEach(console.log);
16889
16889
  var __defProp$3 = Object.defineProperty;
16890
16890
  var __defProps$1 = Object.defineProperties;
16891
16891
  var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
16892
- var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
16893
- var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
16894
- var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
16892
+ var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
16893
+ var __hasOwnProp$a = Object.prototype.hasOwnProperty;
16894
+ var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
16895
16895
  var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16896
16896
  var __spreadValues$3 = (a, b) => {
16897
16897
  for (var prop in b || (b = {}))
16898
- if (__hasOwnProp$9.call(b, prop))
16898
+ if (__hasOwnProp$a.call(b, prop))
16899
16899
  __defNormalProp$3(a, prop, b[prop]);
16900
- if (__getOwnPropSymbols$9)
16901
- for (var prop of __getOwnPropSymbols$9(b)) {
16902
- if (__propIsEnum$9.call(b, prop))
16900
+ if (__getOwnPropSymbols$a)
16901
+ for (var prop of __getOwnPropSymbols$a(b)) {
16902
+ if (__propIsEnum$a.call(b, prop))
16903
16903
  __defNormalProp$3(a, prop, b[prop]);
16904
16904
  }
16905
16905
  return a;
@@ -17597,17 +17597,17 @@ const useGetInsuranceAccount = (insuranceProvider) => {
17597
17597
  });
17598
17598
  };
17599
17599
 
17600
- var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
17601
- var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
17602
- var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
17603
- var __objRest$6 = (source, exclude) => {
17600
+ var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
17601
+ var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
17602
+ var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
17603
+ var __objRest$7 = (source, exclude) => {
17604
17604
  var target = {};
17605
17605
  for (var prop in source)
17606
- if (__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0)
17606
+ if (__hasOwnProp$9.call(source, prop) && exclude.indexOf(prop) < 0)
17607
17607
  target[prop] = source[prop];
17608
- if (source != null && __getOwnPropSymbols$8)
17609
- for (var prop of __getOwnPropSymbols$8(source)) {
17610
- if (exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop))
17608
+ if (source != null && __getOwnPropSymbols$9)
17609
+ for (var prop of __getOwnPropSymbols$9(source)) {
17610
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$9.call(source, prop))
17611
17611
  target[prop] = source[prop];
17612
17612
  }
17613
17613
  return target;
@@ -17636,7 +17636,7 @@ const useCreateLabel = () => {
17636
17636
  const { client } = useShipEngine();
17637
17637
  return reactQuery.useMutation({
17638
17638
  mutationFn: (_a) => __async$k(void 0, null, function* () {
17639
- var _b = _a, { rateId } = _b, options = __objRest$6(_b, ["rateId"]);
17639
+ var _b = _a, { rateId } = _b, options = __objRest$7(_b, ["rateId"]);
17640
17640
  const result = yield client.labels.createByRateId(rateId, options);
17641
17641
  return result.data;
17642
17642
  }),
@@ -17660,14 +17660,30 @@ const useGetLabel = (labelId) => {
17660
17660
  });
17661
17661
  };
17662
17662
 
17663
- const useListLabels = (params) => {
17663
+ var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
17664
+ var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
17665
+ var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
17666
+ var __objRest$6 = (source, exclude) => {
17667
+ var target = {};
17668
+ for (var prop in source)
17669
+ if (__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0)
17670
+ target[prop] = source[prop];
17671
+ if (source != null && __getOwnPropSymbols$8)
17672
+ for (var prop of __getOwnPropSymbols$8(source)) {
17673
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop))
17674
+ target[prop] = source[prop];
17675
+ }
17676
+ return target;
17677
+ };
17678
+ const useListLabels = (_params) => {
17664
17679
  const { client } = useShipEngine();
17680
+ const _a = _params || {}, { enabled = true } = _a, params = __objRest$6(_a, ["enabled"]);
17665
17681
  return reactQuery.useQuery({
17666
- enabled: params && Object.values(params).some((v) => v !== void 0),
17682
+ enabled,
17667
17683
  onError,
17668
17684
  queryFn: () => client.labels.list(params),
17669
17685
  queryKey: ["useListLabels", params],
17670
- select: (result) => result.data.labels
17686
+ select: (result) => result.data
17671
17687
  });
17672
17688
  };
17673
17689
 
package/index.mjs CHANGED
@@ -10764,17 +10764,17 @@ var AccountBillingPlanChangeType = /* @__PURE__ */ ((AccountBillingPlanChangeTyp
10764
10764
  return AccountBillingPlanChangeType2;
10765
10765
  })(AccountBillingPlanChangeType || {});
10766
10766
 
10767
- var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
10768
- var __hasOwnProp$e = Object.prototype.hasOwnProperty;
10769
- var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
10770
- var __objRest$9 = (source, exclude) => {
10767
+ var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
10768
+ var __hasOwnProp$f = Object.prototype.hasOwnProperty;
10769
+ var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
10770
+ var __objRest$a = (source, exclude) => {
10771
10771
  var target = {};
10772
10772
  for (var prop in source)
10773
- if (__hasOwnProp$e.call(source, prop) && exclude.indexOf(prop) < 0)
10773
+ if (__hasOwnProp$f.call(source, prop) && exclude.indexOf(prop) < 0)
10774
10774
  target[prop] = source[prop];
10775
- if (source != null && __getOwnPropSymbols$e)
10776
- for (var prop of __getOwnPropSymbols$e(source)) {
10777
- if (exclude.indexOf(prop) < 0 && __propIsEnum$e.call(source, prop))
10775
+ if (source != null && __getOwnPropSymbols$f)
10776
+ for (var prop of __getOwnPropSymbols$f(source)) {
10777
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$f.call(source, prop))
10778
10778
  target[prop] = source[prop];
10779
10779
  }
10780
10780
  return target;
@@ -10788,7 +10788,7 @@ class CodedError {
10788
10788
  this.message = message;
10789
10789
  }
10790
10790
  static fromObject(_a) {
10791
- var _b = _a, { message } = _b, options = __objRest$9(_b, ["message"]);
10791
+ var _b = _a, { message } = _b, options = __objRest$a(_b, ["message"]);
10792
10792
  return new CodedError(message, options);
10793
10793
  }
10794
10794
  }
@@ -10896,17 +10896,17 @@ const types = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
10896
10896
  RateCardStatus
10897
10897
  }, Symbol.toStringTag, { value: 'Module' }));
10898
10898
 
10899
- var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
10900
- var __hasOwnProp$d = Object.prototype.hasOwnProperty;
10901
- var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
10902
- var __objRest$8 = (source, exclude) => {
10899
+ var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
10900
+ var __hasOwnProp$e = Object.prototype.hasOwnProperty;
10901
+ var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
10902
+ var __objRest$9 = (source, exclude) => {
10903
10903
  var target = {};
10904
10904
  for (var prop in source)
10905
- if (__hasOwnProp$d.call(source, prop) && exclude.indexOf(prop) < 0)
10905
+ if (__hasOwnProp$e.call(source, prop) && exclude.indexOf(prop) < 0)
10906
10906
  target[prop] = source[prop];
10907
- if (source != null && __getOwnPropSymbols$d)
10908
- for (var prop of __getOwnPropSymbols$d(source)) {
10909
- if (exclude.indexOf(prop) < 0 && __propIsEnum$d.call(source, prop))
10907
+ if (source != null && __getOwnPropSymbols$e)
10908
+ for (var prop of __getOwnPropSymbols$e(source)) {
10909
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$e.call(source, prop))
10910
10910
  target[prop] = source[prop];
10911
10911
  }
10912
10912
  return target;
@@ -10938,7 +10938,7 @@ class AccountSettingsAPI {
10938
10938
  * The `updateImage` method updates specific image data for a given image id.
10939
10939
  */
10940
10940
  this.updateImage = (_a) => {
10941
- var _b = _a, { labelImageId } = _b, data = __objRest$8(_b, ["labelImageId"]);
10941
+ var _b = _a, { labelImageId } = _b, data = __objRest$9(_b, ["labelImageId"]);
10942
10942
  return this.client.put(`/v1/account/settings/images/${labelImageId}`, data);
10943
10943
  };
10944
10944
  /**
@@ -13653,30 +13653,30 @@ const getEndUserIpAddress = () => __async$C(void 0, null, function* () {
13653
13653
  var __defProp$6 = Object.defineProperty;
13654
13654
  var __defProps$3 = Object.defineProperties;
13655
13655
  var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
13656
- var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
13657
- var __hasOwnProp$c = Object.prototype.hasOwnProperty;
13658
- var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
13656
+ var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
13657
+ var __hasOwnProp$d = Object.prototype.hasOwnProperty;
13658
+ var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
13659
13659
  var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13660
13660
  var __spreadValues$6 = (a, b) => {
13661
13661
  for (var prop in b || (b = {}))
13662
- if (__hasOwnProp$c.call(b, prop))
13662
+ if (__hasOwnProp$d.call(b, prop))
13663
13663
  __defNormalProp$6(a, prop, b[prop]);
13664
- if (__getOwnPropSymbols$c)
13665
- for (var prop of __getOwnPropSymbols$c(b)) {
13666
- if (__propIsEnum$c.call(b, prop))
13664
+ if (__getOwnPropSymbols$d)
13665
+ for (var prop of __getOwnPropSymbols$d(b)) {
13666
+ if (__propIsEnum$d.call(b, prop))
13667
13667
  __defNormalProp$6(a, prop, b[prop]);
13668
13668
  }
13669
13669
  return a;
13670
13670
  };
13671
13671
  var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
13672
- var __objRest$7 = (source, exclude) => {
13672
+ var __objRest$8 = (source, exclude) => {
13673
13673
  var target = {};
13674
13674
  for (var prop in source)
13675
- if (__hasOwnProp$c.call(source, prop) && exclude.indexOf(prop) < 0)
13675
+ if (__hasOwnProp$d.call(source, prop) && exclude.indexOf(prop) < 0)
13676
13676
  target[prop] = source[prop];
13677
- if (source != null && __getOwnPropSymbols$c)
13678
- for (var prop of __getOwnPropSymbols$c(source)) {
13679
- if (exclude.indexOf(prop) < 0 && __propIsEnum$c.call(source, prop))
13677
+ if (source != null && __getOwnPropSymbols$d)
13678
+ for (var prop of __getOwnPropSymbols$d(source)) {
13679
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$d.call(source, prop))
13680
13680
  target[prop] = source[prop];
13681
13681
  }
13682
13682
  return target;
@@ -13720,7 +13720,7 @@ class CarriersAPI {
13720
13720
  * The `connect` method connects a carrier account to a user's ShipEngine account.
13721
13721
  */
13722
13722
  this.connect = (_a) => __async$B(this, null, function* () {
13723
- var _b = _a, { carrierCode } = _b, connection = __objRest$7(_b, ["carrierCode"]);
13723
+ var _b = _a, { carrierCode } = _b, connection = __objRest$8(_b, ["carrierCode"]);
13724
13724
  const endUserIpAddress = yield getEndUserIpAddress();
13725
13725
  if (!endUserIpAddress)
13726
13726
  return Promise.reject([new CodedError("Unable to get IP address")]);
@@ -16026,17 +16026,17 @@ class CustomPackagesAPI {
16026
16026
  }
16027
16027
 
16028
16028
  var __defProp$5 = Object.defineProperty;
16029
- var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
16030
- var __hasOwnProp$b = Object.prototype.hasOwnProperty;
16031
- var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
16029
+ var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
16030
+ var __hasOwnProp$c = Object.prototype.hasOwnProperty;
16031
+ var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
16032
16032
  var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16033
16033
  var __spreadValues$5 = (a, b) => {
16034
16034
  for (var prop in b || (b = {}))
16035
- if (__hasOwnProp$b.call(b, prop))
16035
+ if (__hasOwnProp$c.call(b, prop))
16036
16036
  __defNormalProp$5(a, prop, b[prop]);
16037
- if (__getOwnPropSymbols$b)
16038
- for (var prop of __getOwnPropSymbols$b(b)) {
16039
- if (__propIsEnum$b.call(b, prop))
16037
+ if (__getOwnPropSymbols$c)
16038
+ for (var prop of __getOwnPropSymbols$c(b)) {
16039
+ if (__propIsEnum$c.call(b, prop))
16040
16040
  __defNormalProp$5(a, prop, b[prop]);
16041
16041
  }
16042
16042
  return a;
@@ -16511,17 +16511,17 @@ class WarehousesAPI {
16511
16511
  var __defProp$4 = Object.defineProperty;
16512
16512
  var __defProps$2 = Object.defineProperties;
16513
16513
  var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
16514
- var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
16515
- var __hasOwnProp$a = Object.prototype.hasOwnProperty;
16516
- var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
16514
+ var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
16515
+ var __hasOwnProp$b = Object.prototype.hasOwnProperty;
16516
+ var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
16517
16517
  var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16518
16518
  var __spreadValues$4 = (a, b) => {
16519
16519
  for (var prop in b || (b = {}))
16520
- if (__hasOwnProp$a.call(b, prop))
16520
+ if (__hasOwnProp$b.call(b, prop))
16521
16521
  __defNormalProp$4(a, prop, b[prop]);
16522
- if (__getOwnPropSymbols$a)
16523
- for (var prop of __getOwnPropSymbols$a(b)) {
16524
- if (__propIsEnum$a.call(b, prop))
16522
+ if (__getOwnPropSymbols$b)
16523
+ for (var prop of __getOwnPropSymbols$b(b)) {
16524
+ if (__propIsEnum$b.call(b, prop))
16525
16525
  __defNormalProp$4(a, prop, b[prop]);
16526
16526
  }
16527
16527
  return a;
@@ -16867,17 +16867,17 @@ const onError = (errors) => errors.forEach(console.log);
16867
16867
  var __defProp$3 = Object.defineProperty;
16868
16868
  var __defProps$1 = Object.defineProperties;
16869
16869
  var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
16870
- var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
16871
- var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
16872
- var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
16870
+ var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
16871
+ var __hasOwnProp$a = Object.prototype.hasOwnProperty;
16872
+ var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
16873
16873
  var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16874
16874
  var __spreadValues$3 = (a, b) => {
16875
16875
  for (var prop in b || (b = {}))
16876
- if (__hasOwnProp$9.call(b, prop))
16876
+ if (__hasOwnProp$a.call(b, prop))
16877
16877
  __defNormalProp$3(a, prop, b[prop]);
16878
- if (__getOwnPropSymbols$9)
16879
- for (var prop of __getOwnPropSymbols$9(b)) {
16880
- if (__propIsEnum$9.call(b, prop))
16878
+ if (__getOwnPropSymbols$a)
16879
+ for (var prop of __getOwnPropSymbols$a(b)) {
16880
+ if (__propIsEnum$a.call(b, prop))
16881
16881
  __defNormalProp$3(a, prop, b[prop]);
16882
16882
  }
16883
16883
  return a;
@@ -17575,17 +17575,17 @@ const useGetInsuranceAccount = (insuranceProvider) => {
17575
17575
  });
17576
17576
  };
17577
17577
 
17578
- var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
17579
- var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
17580
- var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
17581
- var __objRest$6 = (source, exclude) => {
17578
+ var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
17579
+ var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
17580
+ var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
17581
+ var __objRest$7 = (source, exclude) => {
17582
17582
  var target = {};
17583
17583
  for (var prop in source)
17584
- if (__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0)
17584
+ if (__hasOwnProp$9.call(source, prop) && exclude.indexOf(prop) < 0)
17585
17585
  target[prop] = source[prop];
17586
- if (source != null && __getOwnPropSymbols$8)
17587
- for (var prop of __getOwnPropSymbols$8(source)) {
17588
- if (exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop))
17586
+ if (source != null && __getOwnPropSymbols$9)
17587
+ for (var prop of __getOwnPropSymbols$9(source)) {
17588
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$9.call(source, prop))
17589
17589
  target[prop] = source[prop];
17590
17590
  }
17591
17591
  return target;
@@ -17614,7 +17614,7 @@ const useCreateLabel = () => {
17614
17614
  const { client } = useShipEngine();
17615
17615
  return useMutation({
17616
17616
  mutationFn: (_a) => __async$k(void 0, null, function* () {
17617
- var _b = _a, { rateId } = _b, options = __objRest$6(_b, ["rateId"]);
17617
+ var _b = _a, { rateId } = _b, options = __objRest$7(_b, ["rateId"]);
17618
17618
  const result = yield client.labels.createByRateId(rateId, options);
17619
17619
  return result.data;
17620
17620
  }),
@@ -17638,14 +17638,30 @@ const useGetLabel = (labelId) => {
17638
17638
  });
17639
17639
  };
17640
17640
 
17641
- const useListLabels = (params) => {
17641
+ var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
17642
+ var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
17643
+ var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
17644
+ var __objRest$6 = (source, exclude) => {
17645
+ var target = {};
17646
+ for (var prop in source)
17647
+ if (__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0)
17648
+ target[prop] = source[prop];
17649
+ if (source != null && __getOwnPropSymbols$8)
17650
+ for (var prop of __getOwnPropSymbols$8(source)) {
17651
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop))
17652
+ target[prop] = source[prop];
17653
+ }
17654
+ return target;
17655
+ };
17656
+ const useListLabels = (_params) => {
17642
17657
  const { client } = useShipEngine();
17658
+ const _a = _params || {}, { enabled = true } = _a, params = __objRest$6(_a, ["enabled"]);
17643
17659
  return useQuery({
17644
- enabled: params && Object.values(params).some((v) => v !== void 0),
17660
+ enabled,
17645
17661
  onError,
17646
17662
  queryFn: () => client.labels.list(params),
17647
17663
  queryKey: ["useListLabels", params],
17648
- select: (result) => result.data.labels
17664
+ select: (result) => result.data
17649
17665
  });
17650
17666
  };
17651
17667
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipengine/alchemy",
3
- "version": "5.0.18",
3
+ "version": "5.0.19",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {