@shipengine/alchemy 5.4.21 → 5.4.23

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 +346 -257
  2. package/index.mjs +346 -258
  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$t = Object.getOwnPropertySymbols;
10816
- var __hasOwnProp$t = Object.prototype.hasOwnProperty;
10817
- var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
10818
- var __objRest$g = (source, exclude) => {
10815
+ var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
10816
+ var __hasOwnProp$v = Object.prototype.hasOwnProperty;
10817
+ var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
10818
+ var __objRest$i = (source, exclude) => {
10819
10819
  var target = {};
10820
10820
  for (var prop in source)
10821
- if (__hasOwnProp$t.call(source, prop) && exclude.indexOf(prop) < 0)
10821
+ if (__hasOwnProp$v.call(source, prop) && exclude.indexOf(prop) < 0)
10822
10822
  target[prop] = 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))
10823
+ if (source != null && __getOwnPropSymbols$v)
10824
+ for (var prop of __getOwnPropSymbols$v(source)) {
10825
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$v.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$g(_b, ["message"]);
10839
+ var _b = _a, { message } = _b, options = __objRest$i(_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$s = Object.getOwnPropertySymbols;
10948
- var __hasOwnProp$s = Object.prototype.hasOwnProperty;
10949
- var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
10950
- var __objRest$f = (source, exclude) => {
10947
+ var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
10948
+ var __hasOwnProp$u = Object.prototype.hasOwnProperty;
10949
+ var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
10950
+ var __objRest$h = (source, exclude) => {
10951
10951
  var target = {};
10952
10952
  for (var prop in source)
10953
- if (__hasOwnProp$s.call(source, prop) && exclude.indexOf(prop) < 0)
10953
+ if (__hasOwnProp$u.call(source, prop) && exclude.indexOf(prop) < 0)
10954
10954
  target[prop] = 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))
10955
+ if (source != null && __getOwnPropSymbols$u)
10956
+ for (var prop of __getOwnPropSymbols$u(source)) {
10957
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$u.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$f(_b, ["labelImageId"]);
10989
+ var _b = _a, { labelImageId } = _b, data = __objRest$h(_b, ["labelImageId"]);
10990
10990
  return this.client.put(`/v1/account/settings/images/${labelImageId}`, data);
10991
10991
  };
10992
10992
  /**
@@ -13728,33 +13728,33 @@ const getEndUserIpAddress = () => __async$O(void 0, null, function* () {
13728
13728
  }
13729
13729
  });
13730
13730
 
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) => {
13731
+ var __defProp$i = Object.defineProperty;
13732
+ var __defProps$d = Object.defineProperties;
13733
+ var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
13734
+ var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
13735
+ var __hasOwnProp$t = Object.prototype.hasOwnProperty;
13736
+ var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
13737
+ var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13738
+ var __spreadValues$i = (a, b) => {
13739
13739
  for (var prop in b || (b = {}))
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]);
13740
+ if (__hasOwnProp$t.call(b, prop))
13741
+ __defNormalProp$i(a, prop, b[prop]);
13742
+ if (__getOwnPropSymbols$t)
13743
+ for (var prop of __getOwnPropSymbols$t(b)) {
13744
+ if (__propIsEnum$t.call(b, prop))
13745
+ __defNormalProp$i(a, prop, b[prop]);
13746
13746
  }
13747
13747
  return a;
13748
13748
  };
13749
- var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
13750
- var __objRest$e = (source, exclude) => {
13749
+ var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
13750
+ var __objRest$g = (source, exclude) => {
13751
13751
  var target = {};
13752
13752
  for (var prop in source)
13753
- if (__hasOwnProp$r.call(source, prop) && exclude.indexOf(prop) < 0)
13753
+ if (__hasOwnProp$t.call(source, prop) && exclude.indexOf(prop) < 0)
13754
13754
  target[prop] = 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))
13755
+ if (source != null && __getOwnPropSymbols$t)
13756
+ for (var prop of __getOwnPropSymbols$t(source)) {
13757
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$t.call(source, prop))
13758
13758
  target[prop] = source[prop];
13759
13759
  }
13760
13760
  return target;
@@ -13798,11 +13798,11 @@ class CarriersAPI {
13798
13798
  * The `connect` method connects a carrier account to a user's ShipEngine account.
13799
13799
  */
13800
13800
  this.connect = (_a) => __async$N(this, null, function* () {
13801
- var _b = _a, { carrierCode } = _b, connection = __objRest$e(_b, ["carrierCode"]);
13801
+ var _b = _a, { carrierCode } = _b, connection = __objRest$g(_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$b(__spreadValues$g({}, connection), {
13805
+ return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$d(__spreadValues$i({}, connection), {
13806
13806
  endUserIpAddress
13807
13807
  }));
13808
13808
  });
@@ -16185,19 +16185,19 @@ class CustomPackagesAPI {
16185
16185
  }
16186
16186
  }
16187
16187
 
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) => {
16188
+ var __defProp$h = Object.defineProperty;
16189
+ var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
16190
+ var __hasOwnProp$s = Object.prototype.hasOwnProperty;
16191
+ var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
16192
+ var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16193
+ var __spreadValues$h = (a, b) => {
16194
16194
  for (var prop in b || (b = {}))
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]);
16195
+ if (__hasOwnProp$s.call(b, prop))
16196
+ __defNormalProp$h(a, prop, b[prop]);
16197
+ if (__getOwnPropSymbols$s)
16198
+ for (var prop of __getOwnPropSymbols$s(b)) {
16199
+ if (__propIsEnum$s.call(b, prop))
16200
+ __defNormalProp$h(a, prop, b[prop]);
16201
16201
  }
16202
16202
  return a;
16203
16203
  };
@@ -16245,7 +16245,7 @@ class FundingSourcesAPI {
16245
16245
  if (!endUserIpAddress) {
16246
16246
  return Promise.reject([new CodedError("Unable to get IP address")]);
16247
16247
  }
16248
- return yield this.client.post("/v1/funding_sources", __spreadValues$f({
16248
+ return yield this.client.post("/v1/funding_sources", __spreadValues$h({
16249
16249
  endUserIpAddress
16250
16250
  }, createFundingSource));
16251
16251
  });
@@ -16277,7 +16277,7 @@ class FundingSourcesAPI {
16277
16277
  if (!endUserIpAddress) {
16278
16278
  return Promise.reject([new CodedError("Unable to get IP address")]);
16279
16279
  }
16280
- return yield this.client.post("/v1/registration/funding_source", __spreadValues$f({
16280
+ return yield this.client.post("/v1/registration/funding_source", __spreadValues$h({
16281
16281
  endUserIpAddress
16282
16282
  }, carrier));
16283
16283
  });
@@ -16482,19 +16482,19 @@ class RateCardsAPI {
16482
16482
  }
16483
16483
  }
16484
16484
 
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) => {
16485
+ var __defProp$g = Object.defineProperty;
16486
+ var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
16487
+ var __hasOwnProp$r = Object.prototype.hasOwnProperty;
16488
+ var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
16489
+ var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16490
+ var __spreadValues$g = (a, b) => {
16491
16491
  for (var prop in b || (b = {}))
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]);
16492
+ if (__hasOwnProp$r.call(b, prop))
16493
+ __defNormalProp$g(a, prop, b[prop]);
16494
+ if (__getOwnPropSymbols$r)
16495
+ for (var prop of __getOwnPropSymbols$r(b)) {
16496
+ if (__propIsEnum$r.call(b, prop))
16497
+ __defNormalProp$g(a, prop, b[prop]);
16498
16498
  }
16499
16499
  return a;
16500
16500
  };
@@ -16516,7 +16516,7 @@ class RatesAPI {
16516
16516
  * method.
16517
16517
  */
16518
16518
  this.estimate = (params) => {
16519
- return this.client.post("/v1/rates/estimate", __spreadValues$e({}, params));
16519
+ return this.client.post("/v1/rates/estimate", __spreadValues$g({}, params));
16520
16520
  };
16521
16521
  this.client = client;
16522
16522
  }
@@ -16614,19 +16614,19 @@ class SellersAPI {
16614
16614
  }
16615
16615
  }
16616
16616
 
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) => {
16617
+ var __defProp$f = Object.defineProperty;
16618
+ var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
16619
+ var __hasOwnProp$q = Object.prototype.hasOwnProperty;
16620
+ var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
16621
+ var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16622
+ var __spreadValues$f = (a, b) => {
16623
16623
  for (var prop in b || (b = {}))
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]);
16624
+ if (__hasOwnProp$q.call(b, prop))
16625
+ __defNormalProp$f(a, prop, b[prop]);
16626
+ if (__getOwnPropSymbols$q)
16627
+ for (var prop of __getOwnPropSymbols$q(b)) {
16628
+ if (__propIsEnum$q.call(b, prop))
16629
+ __defNormalProp$f(a, prop, b[prop]);
16630
16630
  }
16631
16631
  return a;
16632
16632
  };
@@ -16638,7 +16638,7 @@ class ServicePointsAPI {
16638
16638
  * Either an address, coordinates, or an address query
16639
16639
  */
16640
16640
  this.list = (options) => {
16641
- return this.client.post("/v1/service_points/list", __spreadValues$d({}, options));
16641
+ return this.client.post("/v1/service_points/list", __spreadValues$f({}, options));
16642
16642
  };
16643
16643
  /**
16644
16644
  * Get a specific service point by its carrier code, country code, and id
@@ -16695,6 +16695,12 @@ class ShipmentsAPI {
16695
16695
  this.list = (options) => {
16696
16696
  return this.client.get("/v1/shipments", { params: options });
16697
16697
  };
16698
+ /**
16699
+ * Retrieve a shipment using an external shipment Id
16700
+ */
16701
+ this.getByExternalId = (externalId) => {
16702
+ return this.client.get(`/v1/shipments/external_shipment_id/${externalId}`);
16703
+ };
16698
16704
  /**
16699
16705
  * The `create` method allows for creating shipments based on a list of shipment
16700
16706
  * items passed into this method.
@@ -34065,25 +34071,25 @@ class WebhooksAPI {
34065
34071
  }
34066
34072
  }
34067
34073
 
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) => {
34074
+ var __defProp$e = Object.defineProperty;
34075
+ var __defProps$c = Object.defineProperties;
34076
+ var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
34077
+ var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
34078
+ var __hasOwnProp$p = Object.prototype.hasOwnProperty;
34079
+ var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
34080
+ var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
34081
+ var __spreadValues$e = (a, b) => {
34076
34082
  for (var prop in b || (b = {}))
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]);
34083
+ if (__hasOwnProp$p.call(b, prop))
34084
+ __defNormalProp$e(a, prop, b[prop]);
34085
+ if (__getOwnPropSymbols$p)
34086
+ for (var prop of __getOwnPropSymbols$p(b)) {
34087
+ if (__propIsEnum$p.call(b, prop))
34088
+ __defNormalProp$e(a, prop, b[prop]);
34083
34089
  }
34084
34090
  return a;
34085
34091
  };
34086
- var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
34092
+ var __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
34087
34093
  var __async$J = (__this, __arguments, generator) => {
34088
34094
  return new Promise((resolve, reject) => {
34089
34095
  var fulfilled = (value) => {
@@ -34107,7 +34113,7 @@ var __async$J = (__this, __arguments, generator) => {
34107
34113
  const logger$1 = E({
34108
34114
  level: process.env.NODE_ENV === "production" ? "fatal" : "info",
34109
34115
  name: "shipengine-api",
34110
- serializers: __spreadProps$a(__spreadValues$c({}, k), {
34116
+ serializers: __spreadProps$c(__spreadValues$e({}, k), {
34111
34117
  req: (req) => ({
34112
34118
  headers: req.headers,
34113
34119
  method: req.method,
@@ -34131,7 +34137,7 @@ class ShipEngineAPI {
34131
34137
  constructor(token, { baseURL, headers, getToken, onApiError }) {
34132
34138
  const client = axios.create({
34133
34139
  baseURL,
34134
- headers: __spreadProps$a(__spreadValues$c({}, headers), {
34140
+ headers: __spreadProps$c(__spreadValues$e({}, headers), {
34135
34141
  "Content-Type": "application/json"
34136
34142
  }),
34137
34143
  paramsSerializer: (params) => lib.stringify(humpsExports.decamelizeKeys(params), { arrayFormat: "brackets" }),
@@ -34460,25 +34466,25 @@ const delay = (ms) => new Promise((resolve) => {
34460
34466
 
34461
34467
  const onError = (_errors) => _default();
34462
34468
 
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) => {
34469
+ var __defProp$d = Object.defineProperty;
34470
+ var __defProps$b = Object.defineProperties;
34471
+ var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
34472
+ var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
34473
+ var __hasOwnProp$o = Object.prototype.hasOwnProperty;
34474
+ var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
34475
+ var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
34476
+ var __spreadValues$d = (a, b) => {
34471
34477
  for (var prop in b || (b = {}))
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]);
34478
+ if (__hasOwnProp$o.call(b, prop))
34479
+ __defNormalProp$d(a, prop, b[prop]);
34480
+ if (__getOwnPropSymbols$o)
34481
+ for (var prop of __getOwnPropSymbols$o(b)) {
34482
+ if (__propIsEnum$o.call(b, prop))
34483
+ __defNormalProp$d(a, prop, b[prop]);
34478
34484
  }
34479
34485
  return a;
34480
34486
  };
34481
- var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
34487
+ var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
34482
34488
  const streams = [];
34483
34489
  if (process.env.NODE_ENV === "production") {
34484
34490
  streams.push({
@@ -34487,7 +34493,7 @@ if (process.env.NODE_ENV === "production") {
34487
34493
  }
34488
34494
  const logger = E({
34489
34495
  name: "shipengine",
34490
- serializers: __spreadProps$9(__spreadValues$b({}, k), {
34496
+ serializers: __spreadProps$b(__spreadValues$d({}, k), {
34491
34497
  req: (req) => ({
34492
34498
  headers: req.headers,
34493
34499
  method: req.method,
@@ -34898,17 +34904,17 @@ const useListCarriers = () => {
34898
34904
  });
34899
34905
  };
34900
34906
 
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) => {
34907
+ var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
34908
+ var __hasOwnProp$n = Object.prototype.hasOwnProperty;
34909
+ var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
34910
+ var __objRest$f = (source, exclude) => {
34905
34911
  var target = {};
34906
34912
  for (var prop in source)
34907
- if (__hasOwnProp$l.call(source, prop) && exclude.indexOf(prop) < 0)
34913
+ if (__hasOwnProp$n.call(source, prop) && exclude.indexOf(prop) < 0)
34908
34914
  target[prop] = 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))
34915
+ if (source != null && __getOwnPropSymbols$n)
34916
+ for (var prop of __getOwnPropSymbols$n(source)) {
34917
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$n.call(source, prop))
34912
34918
  target[prop] = source[prop];
34913
34919
  }
34914
34920
  return target;
@@ -34938,7 +34944,7 @@ const useUpdateAutoFunding = () => {
34938
34944
  const queryClient = reactQuery.useQueryClient();
34939
34945
  return reactQuery.useMutation({
34940
34946
  mutationFn: (_a) => __async$A(void 0, null, function* () {
34941
- var _b = _a, { carrierId } = _b, options = __objRest$d(_b, ["carrierId"]);
34947
+ var _b = _a, { carrierId } = _b, options = __objRest$f(_b, ["carrierId"]);
34942
34948
  const result = yield client.carriers.updateAutoFunding(carrierId, options);
34943
34949
  return result.data;
34944
34950
  }),
@@ -34999,24 +35005,24 @@ const useDeleteCarrier = () => {
34999
35005
  });
35000
35006
  };
35001
35007
 
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) => {
35008
+ var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
35009
+ var __hasOwnProp$m = Object.prototype.hasOwnProperty;
35010
+ var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
35011
+ var __objRest$e = (source, exclude) => {
35006
35012
  var target = {};
35007
35013
  for (var prop in source)
35008
- if (__hasOwnProp$k.call(source, prop) && exclude.indexOf(prop) < 0)
35014
+ if (__hasOwnProp$m.call(source, prop) && exclude.indexOf(prop) < 0)
35009
35015
  target[prop] = 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))
35016
+ if (source != null && __getOwnPropSymbols$m)
35017
+ for (var prop of __getOwnPropSymbols$m(source)) {
35018
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$m.call(source, prop))
35013
35019
  target[prop] = source[prop];
35014
35020
  }
35015
35021
  return target;
35016
35022
  };
35017
35023
  const useGetCarrierConnectionForm = (_params) => {
35018
35024
  const { client } = useShipEngine();
35019
- const _a = _params || {}, { carrierName, enabled = true } = _a, params = __objRest$c(_a, ["carrierName", "enabled"]);
35025
+ const _a = _params || {}, { carrierName, enabled = true } = _a, params = __objRest$e(_a, ["carrierName", "enabled"]);
35020
35026
  return reactQuery.useQuery({
35021
35027
  enabled,
35022
35028
  onError,
@@ -35026,24 +35032,24 @@ const useGetCarrierConnectionForm = (_params) => {
35026
35032
  });
35027
35033
  };
35028
35034
 
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) => {
35035
+ var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
35036
+ var __hasOwnProp$l = Object.prototype.hasOwnProperty;
35037
+ var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
35038
+ var __objRest$d = (source, exclude) => {
35033
35039
  var target = {};
35034
35040
  for (var prop in source)
35035
- if (__hasOwnProp$j.call(source, prop) && exclude.indexOf(prop) < 0)
35041
+ if (__hasOwnProp$l.call(source, prop) && exclude.indexOf(prop) < 0)
35036
35042
  target[prop] = 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))
35043
+ if (source != null && __getOwnPropSymbols$l)
35044
+ for (var prop of __getOwnPropSymbols$l(source)) {
35045
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$l.call(source, prop))
35040
35046
  target[prop] = source[prop];
35041
35047
  }
35042
35048
  return target;
35043
35049
  };
35044
35050
  const useListCarrierConnections = (_params) => {
35045
35051
  const { client } = useShipEngine();
35046
- const _a = _params || {}, { enabled = true } = _a, params = __objRest$b(_a, ["enabled"]);
35052
+ const _a = _params || {}, { enabled = true } = _a, params = __objRest$d(_a, ["enabled"]);
35047
35053
  return reactQuery.useQuery({
35048
35054
  enabled,
35049
35055
  onError,
@@ -35096,33 +35102,33 @@ const useCarrierConnectionsServicesList = (carrierCode) => {
35096
35102
  });
35097
35103
  };
35098
35104
 
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) => {
35105
+ var __defProp$c = Object.defineProperty;
35106
+ var __defProps$a = Object.defineProperties;
35107
+ var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
35108
+ var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
35109
+ var __hasOwnProp$k = Object.prototype.hasOwnProperty;
35110
+ var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
35111
+ var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35112
+ var __spreadValues$c = (a, b) => {
35107
35113
  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
+ if (__hasOwnProp$k.call(b, prop))
35115
+ __defNormalProp$c(a, prop, b[prop]);
35116
+ if (__getOwnPropSymbols$k)
35117
+ for (var prop of __getOwnPropSymbols$k(b)) {
35118
+ if (__propIsEnum$k.call(b, prop))
35119
+ __defNormalProp$c(a, prop, b[prop]);
35114
35120
  }
35115
35121
  return a;
35116
35122
  };
35117
- var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
35118
- var __objRest$a = (source, exclude) => {
35123
+ var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
35124
+ var __objRest$c = (source, exclude) => {
35119
35125
  var target = {};
35120
35126
  for (var prop in source)
35121
- if (__hasOwnProp$i.call(source, prop) && exclude.indexOf(prop) < 0)
35127
+ if (__hasOwnProp$k.call(source, prop) && exclude.indexOf(prop) < 0)
35122
35128
  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))
35129
+ if (source != null && __getOwnPropSymbols$k)
35130
+ for (var prop of __getOwnPropSymbols$k(source)) {
35131
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$k.call(source, prop))
35126
35132
  target[prop] = source[prop];
35127
35133
  }
35128
35134
  return target;
@@ -35130,12 +35136,12 @@ var __objRest$a = (source, exclude) => {
35130
35136
  const useGetConnectionsCarrierSettings = (_a) => {
35131
35137
  var _b = _a, {
35132
35138
  queryFnParams
35133
- } = _b, params = __objRest$a(_b, [
35139
+ } = _b, params = __objRest$c(_b, [
35134
35140
  "queryFnParams"
35135
35141
  ]);
35136
35142
  const { client } = useShipEngine();
35137
35143
  const { carrierName, carrierCode } = queryFnParams;
35138
- return reactQuery.useQuery(__spreadProps$8(__spreadValues$a({}, params), {
35144
+ return reactQuery.useQuery(__spreadProps$a(__spreadValues$c({}, params), {
35139
35145
  onError,
35140
35146
  queryFn: () => client.connections.getCarrierSettings(carrierName, carrierCode),
35141
35147
  queryKey: ["useGetConnectionsCarrierSettings", carrierName, carrierCode],
@@ -35143,25 +35149,25 @@ const useGetConnectionsCarrierSettings = (_a) => {
35143
35149
  }));
35144
35150
  };
35145
35151
 
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) => {
35152
+ var __defProp$b = Object.defineProperty;
35153
+ var __defProps$9 = Object.defineProperties;
35154
+ var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
35155
+ var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
35156
+ var __hasOwnProp$j = Object.prototype.hasOwnProperty;
35157
+ var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
35158
+ var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35159
+ var __spreadValues$b = (a, b) => {
35154
35160
  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
+ if (__hasOwnProp$j.call(b, prop))
35162
+ __defNormalProp$b(a, prop, b[prop]);
35163
+ if (__getOwnPropSymbols$j)
35164
+ for (var prop of __getOwnPropSymbols$j(b)) {
35165
+ if (__propIsEnum$j.call(b, prop))
35166
+ __defNormalProp$b(a, prop, b[prop]);
35161
35167
  }
35162
35168
  return a;
35163
35169
  };
35164
- var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
35170
+ var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
35165
35171
  var __async$x = (__this, __arguments, generator) => {
35166
35172
  return new Promise((resolve, reject) => {
35167
35173
  var fulfilled = (value) => {
@@ -35184,7 +35190,7 @@ var __async$x = (__this, __arguments, generator) => {
35184
35190
  };
35185
35191
  const useUpdateConnectionsCarrierSettings = (params) => {
35186
35192
  const { client } = useShipEngine();
35187
- return reactQuery.useMutation(__spreadProps$7(__spreadValues$9({}, params), {
35193
+ return reactQuery.useMutation(__spreadProps$9(__spreadValues$b({}, params), {
35188
35194
  mutationFn: (_0) => __async$x(void 0, [_0], function* ({
35189
35195
  carrierName,
35190
35196
  carrierCode,
@@ -35415,17 +35421,17 @@ const useGetInsuranceAccount = (insuranceProvider) => {
35415
35421
  });
35416
35422
  };
35417
35423
 
35418
- var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
35419
- var __hasOwnProp$g = Object.prototype.hasOwnProperty;
35420
- var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
35421
- var __objRest$9 = (source, exclude) => {
35424
+ var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
35425
+ var __hasOwnProp$i = Object.prototype.hasOwnProperty;
35426
+ var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
35427
+ var __objRest$b = (source, exclude) => {
35422
35428
  var target = {};
35423
35429
  for (var prop in source)
35424
- if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)
35430
+ if (__hasOwnProp$i.call(source, prop) && exclude.indexOf(prop) < 0)
35425
35431
  target[prop] = source[prop];
35426
- if (source != null && __getOwnPropSymbols$g)
35427
- for (var prop of __getOwnPropSymbols$g(source)) {
35428
- if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))
35432
+ if (source != null && __getOwnPropSymbols$i)
35433
+ for (var prop of __getOwnPropSymbols$i(source)) {
35434
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$i.call(source, prop))
35429
35435
  target[prop] = source[prop];
35430
35436
  }
35431
35437
  return target;
@@ -35454,7 +35460,7 @@ const useAddInsuranceFunds = () => {
35454
35460
  const { client } = useShipEngine();
35455
35461
  return reactQuery.useMutation({
35456
35462
  mutationFn: (_a) => __async$s(void 0, null, function* () {
35457
- var _b = _a, { insuranceProvider } = _b, rest = __objRest$9(_b, ["insuranceProvider"]);
35463
+ var _b = _a, { insuranceProvider } = _b, rest = __objRest$b(_b, ["insuranceProvider"]);
35458
35464
  const result = yield client.insurance.addFunds(insuranceProvider, rest);
35459
35465
  return result.data;
35460
35466
  }),
@@ -35463,17 +35469,17 @@ const useAddInsuranceFunds = () => {
35463
35469
  });
35464
35470
  };
35465
35471
 
35466
- var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
35467
- var __hasOwnProp$f = Object.prototype.hasOwnProperty;
35468
- var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
35469
- var __objRest$8 = (source, exclude) => {
35472
+ var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
35473
+ var __hasOwnProp$h = Object.prototype.hasOwnProperty;
35474
+ var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
35475
+ var __objRest$a = (source, exclude) => {
35470
35476
  var target = {};
35471
35477
  for (var prop in source)
35472
- if (__hasOwnProp$f.call(source, prop) && exclude.indexOf(prop) < 0)
35478
+ if (__hasOwnProp$h.call(source, prop) && exclude.indexOf(prop) < 0)
35473
35479
  target[prop] = source[prop];
35474
- if (source != null && __getOwnPropSymbols$f)
35475
- for (var prop of __getOwnPropSymbols$f(source)) {
35476
- if (exclude.indexOf(prop) < 0 && __propIsEnum$f.call(source, prop))
35480
+ if (source != null && __getOwnPropSymbols$h)
35481
+ for (var prop of __getOwnPropSymbols$h(source)) {
35482
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$h.call(source, prop))
35477
35483
  target[prop] = source[prop];
35478
35484
  }
35479
35485
  return target;
@@ -35502,7 +35508,7 @@ const useCreateLabel = () => {
35502
35508
  const { client } = useShipEngine();
35503
35509
  return reactQuery.useMutation({
35504
35510
  mutationFn: (_a) => __async$r(void 0, null, function* () {
35505
- var _b = _a, { rateId } = _b, options = __objRest$8(_b, ["rateId"]);
35511
+ var _b = _a, { rateId } = _b, options = __objRest$a(_b, ["rateId"]);
35506
35512
  const result = yield client.labels.createByRateId(rateId, options);
35507
35513
  return result.data;
35508
35514
  }),
@@ -35526,24 +35532,24 @@ const useGetLabel = (labelId) => {
35526
35532
  });
35527
35533
  };
35528
35534
 
35529
- var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
35530
- var __hasOwnProp$e = Object.prototype.hasOwnProperty;
35531
- var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
35532
- var __objRest$7 = (source, exclude) => {
35535
+ var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
35536
+ var __hasOwnProp$g = Object.prototype.hasOwnProperty;
35537
+ var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
35538
+ var __objRest$9 = (source, exclude) => {
35533
35539
  var target = {};
35534
35540
  for (var prop in source)
35535
- if (__hasOwnProp$e.call(source, prop) && exclude.indexOf(prop) < 0)
35541
+ if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)
35536
35542
  target[prop] = source[prop];
35537
- if (source != null && __getOwnPropSymbols$e)
35538
- for (var prop of __getOwnPropSymbols$e(source)) {
35539
- if (exclude.indexOf(prop) < 0 && __propIsEnum$e.call(source, prop))
35543
+ if (source != null && __getOwnPropSymbols$g)
35544
+ for (var prop of __getOwnPropSymbols$g(source)) {
35545
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))
35540
35546
  target[prop] = source[prop];
35541
35547
  }
35542
35548
  return target;
35543
35549
  };
35544
35550
  const useListLabels = (_params) => {
35545
35551
  const { client } = useShipEngine();
35546
- const _a = _params || {}, { enabled = true } = _a, params = __objRest$7(_a, ["enabled"]);
35552
+ const _a = _params || {}, { enabled = true } = _a, params = __objRest$9(_a, ["enabled"]);
35547
35553
  return reactQuery.useQuery({
35548
35554
  enabled,
35549
35555
  onError,
@@ -35964,17 +35970,17 @@ const useListSalesOrders = (params = {}) => {
35964
35970
  });
35965
35971
  };
35966
35972
 
35967
- var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
35968
- var __hasOwnProp$d = Object.prototype.hasOwnProperty;
35969
- var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
35970
- var __objRest$6 = (source, exclude) => {
35973
+ var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
35974
+ var __hasOwnProp$f = Object.prototype.hasOwnProperty;
35975
+ var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
35976
+ var __objRest$8 = (source, exclude) => {
35971
35977
  var target = {};
35972
35978
  for (var prop in source)
35973
- if (__hasOwnProp$d.call(source, prop) && exclude.indexOf(prop) < 0)
35979
+ if (__hasOwnProp$f.call(source, prop) && exclude.indexOf(prop) < 0)
35974
35980
  target[prop] = source[prop];
35975
- if (source != null && __getOwnPropSymbols$d)
35976
- for (var prop of __getOwnPropSymbols$d(source)) {
35977
- if (exclude.indexOf(prop) < 0 && __propIsEnum$d.call(source, prop))
35981
+ if (source != null && __getOwnPropSymbols$f)
35982
+ for (var prop of __getOwnPropSymbols$f(source)) {
35983
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$f.call(source, prop))
35978
35984
  target[prop] = source[prop];
35979
35985
  }
35980
35986
  return target;
@@ -36003,7 +36009,7 @@ const useNotifySalesOrderShipped = () => {
36003
36009
  const { client } = useShipEngine();
36004
36010
  return reactQuery.useMutation({
36005
36011
  mutationFn: (_a) => __async$g(void 0, null, function* () {
36006
- var _b = _a, { salesOrderId } = _b, tracking = __objRest$6(_b, ["salesOrderId"]);
36012
+ var _b = _a, { salesOrderId } = _b, tracking = __objRest$8(_b, ["salesOrderId"]);
36007
36013
  const result = yield client.salesOrders.notifyShipped(salesOrderId, tracking);
36008
36014
  return result.data;
36009
36015
  }),
@@ -36012,17 +36018,17 @@ const useNotifySalesOrderShipped = () => {
36012
36018
  });
36013
36019
  };
36014
36020
 
36015
- var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
36016
- var __hasOwnProp$c = Object.prototype.hasOwnProperty;
36017
- var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
36018
- var __objRest$5 = (source, exclude) => {
36021
+ var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
36022
+ var __hasOwnProp$e = Object.prototype.hasOwnProperty;
36023
+ var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
36024
+ var __objRest$7 = (source, exclude) => {
36019
36025
  var target = {};
36020
36026
  for (var prop in source)
36021
- if (__hasOwnProp$c.call(source, prop) && exclude.indexOf(prop) < 0)
36027
+ if (__hasOwnProp$e.call(source, prop) && exclude.indexOf(prop) < 0)
36022
36028
  target[prop] = source[prop];
36023
- if (source != null && __getOwnPropSymbols$c)
36024
- for (var prop of __getOwnPropSymbols$c(source)) {
36025
- if (exclude.indexOf(prop) < 0 && __propIsEnum$c.call(source, prop))
36029
+ if (source != null && __getOwnPropSymbols$e)
36030
+ for (var prop of __getOwnPropSymbols$e(source)) {
36031
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$e.call(source, prop))
36026
36032
  target[prop] = source[prop];
36027
36033
  }
36028
36034
  return target;
@@ -36051,7 +36057,7 @@ const useCreateSalesOrderShipment = () => {
36051
36057
  const { client } = useShipEngine();
36052
36058
  return reactQuery.useMutation({
36053
36059
  mutationFn: (_a) => __async$f(void 0, null, function* () {
36054
- var _b = _a, { salesOrderId } = _b, shipment = __objRest$5(_b, ["salesOrderId"]);
36060
+ var _b = _a, { salesOrderId } = _b, shipment = __objRest$7(_b, ["salesOrderId"]);
36055
36061
  const result = yield client.salesOrderShipments.create(salesOrderId, shipment);
36056
36062
  return result.data;
36057
36063
  }),
@@ -36086,17 +36092,17 @@ const useListSalesOrderShipments = (params) => {
36086
36092
  });
36087
36093
  };
36088
36094
 
36089
- var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
36090
- var __hasOwnProp$b = Object.prototype.hasOwnProperty;
36091
- var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
36092
- var __objRest$4 = (source, exclude) => {
36095
+ var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
36096
+ var __hasOwnProp$d = Object.prototype.hasOwnProperty;
36097
+ var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
36098
+ var __objRest$6 = (source, exclude) => {
36093
36099
  var target = {};
36094
36100
  for (var prop in source)
36095
- if (__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0)
36101
+ if (__hasOwnProp$d.call(source, prop) && exclude.indexOf(prop) < 0)
36096
36102
  target[prop] = source[prop];
36097
- if (source != null && __getOwnPropSymbols$b)
36098
- for (var prop of __getOwnPropSymbols$b(source)) {
36099
- if (exclude.indexOf(prop) < 0 && __propIsEnum$b.call(source, prop))
36103
+ if (source != null && __getOwnPropSymbols$d)
36104
+ for (var prop of __getOwnPropSymbols$d(source)) {
36105
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$d.call(source, prop))
36100
36106
  target[prop] = source[prop];
36101
36107
  }
36102
36108
  return target;
@@ -36125,7 +36131,7 @@ const useUpdateSalesOrderShipment = () => {
36125
36131
  const { client } = useShipEngine();
36126
36132
  return reactQuery.useMutation({
36127
36133
  mutationFn: (_a) => __async$e(void 0, null, function* () {
36128
- var _b = _a, { shipmentId } = _b, shipment = __objRest$4(_b, ["shipmentId"]);
36134
+ var _b = _a, { shipmentId } = _b, shipment = __objRest$6(_b, ["shipmentId"]);
36129
36135
  const result = yield client.salesOrderShipments.update(shipmentId, shipment);
36130
36136
  return result.data;
36131
36137
  }),
@@ -36134,25 +36140,25 @@ const useUpdateSalesOrderShipment = () => {
36134
36140
  });
36135
36141
  };
36136
36142
 
36137
- var __defProp$8 = Object.defineProperty;
36138
- var __defProps$6 = Object.defineProperties;
36139
- var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
36140
- var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
36141
- var __hasOwnProp$a = Object.prototype.hasOwnProperty;
36142
- var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
36143
- var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
36144
- var __spreadValues$8 = (a, b) => {
36143
+ var __defProp$a = Object.defineProperty;
36144
+ var __defProps$8 = Object.defineProperties;
36145
+ var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
36146
+ var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
36147
+ var __hasOwnProp$c = Object.prototype.hasOwnProperty;
36148
+ var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
36149
+ var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
36150
+ var __spreadValues$a = (a, b) => {
36145
36151
  for (var prop in b || (b = {}))
36146
- if (__hasOwnProp$a.call(b, prop))
36147
- __defNormalProp$8(a, prop, b[prop]);
36148
- if (__getOwnPropSymbols$a)
36149
- for (var prop of __getOwnPropSymbols$a(b)) {
36150
- if (__propIsEnum$a.call(b, prop))
36151
- __defNormalProp$8(a, prop, b[prop]);
36152
+ if (__hasOwnProp$c.call(b, prop))
36153
+ __defNormalProp$a(a, prop, b[prop]);
36154
+ if (__getOwnPropSymbols$c)
36155
+ for (var prop of __getOwnPropSymbols$c(b)) {
36156
+ if (__propIsEnum$c.call(b, prop))
36157
+ __defNormalProp$a(a, prop, b[prop]);
36152
36158
  }
36153
36159
  return a;
36154
36160
  };
36155
- var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
36161
+ var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
36156
36162
  var __async$d = (__this, __arguments, generator) => {
36157
36163
  return new Promise((resolve, reject) => {
36158
36164
  var fulfilled = (value) => {
@@ -36194,7 +36200,7 @@ const useCreateShipment = () => {
36194
36200
  postalCode: "",
36195
36201
  stateProvince: ""
36196
36202
  };
36197
- return (yield client.shipments.create(__spreadProps$6(__spreadValues$8({}, shipment), {
36203
+ return (yield client.shipments.create(__spreadProps$8(__spreadValues$a({}, shipment), {
36198
36204
  shipTo
36199
36205
  }))).data;
36200
36206
  }),
@@ -36219,9 +36225,49 @@ const useGetShipmentRates = (shipmentId, createdAtStart) => {
36219
36225
  });
36220
36226
  };
36221
36227
 
36222
- const useGetShipment = (shipmentId) => {
36228
+ var __defProp$9 = Object.defineProperty;
36229
+ var __defProps$7 = Object.defineProperties;
36230
+ var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
36231
+ var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
36232
+ var __hasOwnProp$b = Object.prototype.hasOwnProperty;
36233
+ var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
36234
+ var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
36235
+ var __spreadValues$9 = (a, b) => {
36236
+ for (var prop in b || (b = {}))
36237
+ if (__hasOwnProp$b.call(b, prop))
36238
+ __defNormalProp$9(a, prop, b[prop]);
36239
+ if (__getOwnPropSymbols$b)
36240
+ for (var prop of __getOwnPropSymbols$b(b)) {
36241
+ if (__propIsEnum$b.call(b, prop))
36242
+ __defNormalProp$9(a, prop, b[prop]);
36243
+ }
36244
+ return a;
36245
+ };
36246
+ var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
36247
+ var __objRest$5 = (source, exclude) => {
36248
+ var target = {};
36249
+ for (var prop in source)
36250
+ if (__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0)
36251
+ target[prop] = source[prop];
36252
+ if (source != null && __getOwnPropSymbols$b)
36253
+ for (var prop of __getOwnPropSymbols$b(source)) {
36254
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$b.call(source, prop))
36255
+ target[prop] = source[prop];
36256
+ }
36257
+ return target;
36258
+ };
36259
+ const useGetShipment = (params) => {
36260
+ var _a;
36223
36261
  const { client } = useShipEngine();
36224
- return reactQuery.useQuery({
36262
+ const shipmentId = typeof params === "string" ? params : (_a = params == null ? void 0 : params.queryFnParams) == null ? void 0 : _a.shipmentId;
36263
+ const getQueryProps = () => {
36264
+ if (typeof params !== "string") {
36265
+ const _a2 = params, rest = __objRest$5(_a2, ["queryFnParams"]);
36266
+ return rest;
36267
+ }
36268
+ return {};
36269
+ };
36270
+ return reactQuery.useQuery(__spreadProps$7(__spreadValues$9({}, getQueryProps()), {
36225
36271
  enabled: shipmentId !== void 0,
36226
36272
  onError,
36227
36273
  queryFn: () => {
@@ -36232,12 +36278,55 @@ const useGetShipment = (shipmentId) => {
36232
36278
  },
36233
36279
  queryKey: ["useGetShipment", shipmentId],
36234
36280
  select: (result) => result.data
36281
+ }));
36282
+ };
36283
+
36284
+ var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
36285
+ var __hasOwnProp$a = Object.prototype.hasOwnProperty;
36286
+ var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
36287
+ var __objRest$4 = (source, exclude) => {
36288
+ var target = {};
36289
+ for (var prop in source)
36290
+ if (__hasOwnProp$a.call(source, prop) && exclude.indexOf(prop) < 0)
36291
+ target[prop] = source[prop];
36292
+ if (source != null && __getOwnPropSymbols$a)
36293
+ for (var prop of __getOwnPropSymbols$a(source)) {
36294
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$a.call(source, prop))
36295
+ target[prop] = source[prop];
36296
+ }
36297
+ return target;
36298
+ };
36299
+ const useListShipments = (_params) => {
36300
+ const _a = _params || {}, { enabled = true } = _a, params = __objRest$4(_a, ["enabled"]);
36301
+ const { client } = useShipEngine();
36302
+ return reactQuery.useQuery({
36303
+ enabled,
36304
+ onError,
36305
+ queryFn: () => client.shipments.list(params),
36306
+ queryKey: ["useListShipments", params],
36307
+ select: (result) => result.data
36235
36308
  });
36236
36309
  };
36237
36310
 
36311
+ var __defProp$8 = Object.defineProperty;
36312
+ var __defProps$6 = Object.defineProperties;
36313
+ var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
36238
36314
  var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
36239
36315
  var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
36240
36316
  var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
36317
+ var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
36318
+ var __spreadValues$8 = (a, b) => {
36319
+ for (var prop in b || (b = {}))
36320
+ if (__hasOwnProp$9.call(b, prop))
36321
+ __defNormalProp$8(a, prop, b[prop]);
36322
+ if (__getOwnPropSymbols$9)
36323
+ for (var prop of __getOwnPropSymbols$9(b)) {
36324
+ if (__propIsEnum$9.call(b, prop))
36325
+ __defNormalProp$8(a, prop, b[prop]);
36326
+ }
36327
+ return a;
36328
+ };
36329
+ var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
36241
36330
  var __objRest$3 = (source, exclude) => {
36242
36331
  var target = {};
36243
36332
  for (var prop in source)
@@ -36250,16 +36339,15 @@ var __objRest$3 = (source, exclude) => {
36250
36339
  }
36251
36340
  return target;
36252
36341
  };
36253
- const useListShipments = (_params) => {
36254
- const _a = _params || {}, { enabled = true } = _a, params = __objRest$3(_a, ["enabled"]);
36342
+ const useGetShipmentByExternalId = (params) => {
36255
36343
  const { client } = useShipEngine();
36256
- return reactQuery.useQuery({
36257
- enabled,
36344
+ const _a = params, { queryFnParams } = _a, rest = __objRest$3(_a, ["queryFnParams"]);
36345
+ return reactQuery.useQuery(__spreadProps$6(__spreadValues$8({}, rest), {
36258
36346
  onError,
36259
- queryFn: () => client.shipments.list(params),
36260
- queryKey: ["useListShipments", params],
36347
+ queryFn: () => client.shipments.getByExternalId(queryFnParams.externalId),
36348
+ queryKey: ["useGetShipmentByExternalId", queryFnParams],
36261
36349
  select: (result) => result.data
36262
- });
36350
+ }));
36263
36351
  };
36264
36352
 
36265
36353
  var __defProp$7 = Object.defineProperty;
@@ -38166,6 +38254,7 @@ exports.useGetSalesOrderShipment = useGetSalesOrderShipment;
38166
38254
  exports.useGetServicePoint = useGetServicePoint;
38167
38255
  exports.useGetServicesByCarrier = useGetServicesByCarrier;
38168
38256
  exports.useGetShipment = useGetShipment;
38257
+ exports.useGetShipmentByExternalId = useGetShipmentByExternalId;
38169
38258
  exports.useGetShipmentRates = useGetShipmentRates;
38170
38259
  exports.useGetShippingRuleById = useGetShippingRuleById;
38171
38260
  exports.useGetShippingRuleConditionsOptions = useGetShippingRuleConditionsOptions;