@shipengine/alchemy 6.0.22 → 6.0.24

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 +513 -280
  2. package/index.mjs +508 -281
  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$E = Object.getOwnPropertySymbols;
10816
- var __hasOwnProp$E = Object.prototype.hasOwnProperty;
10817
- var __propIsEnum$E = Object.prototype.propertyIsEnumerable;
10815
+ var __getOwnPropSymbols$H = Object.getOwnPropertySymbols;
10816
+ var __hasOwnProp$H = Object.prototype.hasOwnProperty;
10817
+ var __propIsEnum$H = Object.prototype.propertyIsEnumerable;
10818
10818
  var __objRest$p = (source, exclude) => {
10819
10819
  var target = {};
10820
10820
  for (var prop in source)
10821
- if (__hasOwnProp$E.call(source, prop) && exclude.indexOf(prop) < 0)
10821
+ if (__hasOwnProp$H.call(source, prop) && exclude.indexOf(prop) < 0)
10822
10822
  target[prop] = source[prop];
10823
- if (source != null && __getOwnPropSymbols$E)
10824
- for (var prop of __getOwnPropSymbols$E(source)) {
10825
- if (exclude.indexOf(prop) < 0 && __propIsEnum$E.call(source, prop))
10823
+ if (source != null && __getOwnPropSymbols$H)
10824
+ for (var prop of __getOwnPropSymbols$H(source)) {
10825
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$H.call(source, prop))
10826
10826
  target[prop] = source[prop];
10827
10827
  }
10828
10828
  return target;
@@ -10955,17 +10955,17 @@ const types = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
10955
10955
  RateCardStatus
10956
10956
  }, Symbol.toStringTag, { value: 'Module' }));
10957
10957
 
10958
- var __getOwnPropSymbols$D = Object.getOwnPropertySymbols;
10959
- var __hasOwnProp$D = Object.prototype.hasOwnProperty;
10960
- var __propIsEnum$D = Object.prototype.propertyIsEnumerable;
10958
+ var __getOwnPropSymbols$G = Object.getOwnPropertySymbols;
10959
+ var __hasOwnProp$G = Object.prototype.hasOwnProperty;
10960
+ var __propIsEnum$G = Object.prototype.propertyIsEnumerable;
10961
10961
  var __objRest$o = (source, exclude) => {
10962
10962
  var target = {};
10963
10963
  for (var prop in source)
10964
- if (__hasOwnProp$D.call(source, prop) && exclude.indexOf(prop) < 0)
10964
+ if (__hasOwnProp$G.call(source, prop) && exclude.indexOf(prop) < 0)
10965
10965
  target[prop] = source[prop];
10966
- if (source != null && __getOwnPropSymbols$D)
10967
- for (var prop of __getOwnPropSymbols$D(source)) {
10968
- if (exclude.indexOf(prop) < 0 && __propIsEnum$D.call(source, prop))
10966
+ if (source != null && __getOwnPropSymbols$G)
10967
+ for (var prop of __getOwnPropSymbols$G(source)) {
10968
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$G.call(source, prop))
10969
10969
  target[prop] = source[prop];
10970
10970
  }
10971
10971
  return target;
@@ -13707,7 +13707,7 @@ var ipaddr = {
13707
13707
  }).call(commonjsGlobal);
13708
13708
  } (ipaddr));
13709
13709
 
13710
- var __async$U = (__this, __arguments, generator) => {
13710
+ var __async$X = (__this, __arguments, generator) => {
13711
13711
  return new Promise((resolve, reject) => {
13712
13712
  var fulfilled = (value) => {
13713
13713
  try {
@@ -13727,7 +13727,7 @@ var __async$U = (__this, __arguments, generator) => {
13727
13727
  step((generator = generator.apply(__this, __arguments)).next());
13728
13728
  });
13729
13729
  };
13730
- const getEndUserIpAddress = () => __async$U(void 0, null, function* () {
13730
+ const getEndUserIpAddress = () => __async$X(void 0, null, function* () {
13731
13731
  try {
13732
13732
  const response = yield axios.get("https://api.ipify.org/?format=json");
13733
13733
  if (response.data.ip && ipaddrExports.isValid(response.data.ip)) {
@@ -13770,38 +13770,38 @@ const decamelizeKeys = (obj, separator = "_") => {
13770
13770
  return obj;
13771
13771
  };
13772
13772
 
13773
- var __defProp$r = Object.defineProperty;
13774
- var __defProps$l = Object.defineProperties;
13775
- var __getOwnPropDescs$l = Object.getOwnPropertyDescriptors;
13776
- var __getOwnPropSymbols$C = Object.getOwnPropertySymbols;
13777
- var __hasOwnProp$C = Object.prototype.hasOwnProperty;
13778
- var __propIsEnum$C = Object.prototype.propertyIsEnumerable;
13779
- var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13780
- var __spreadValues$r = (a, b) => {
13773
+ var __defProp$u = Object.defineProperty;
13774
+ var __defProps$o = Object.defineProperties;
13775
+ var __getOwnPropDescs$o = Object.getOwnPropertyDescriptors;
13776
+ var __getOwnPropSymbols$F = Object.getOwnPropertySymbols;
13777
+ var __hasOwnProp$F = Object.prototype.hasOwnProperty;
13778
+ var __propIsEnum$F = Object.prototype.propertyIsEnumerable;
13779
+ var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13780
+ var __spreadValues$u = (a, b) => {
13781
13781
  for (var prop in b || (b = {}))
13782
- if (__hasOwnProp$C.call(b, prop))
13783
- __defNormalProp$r(a, prop, b[prop]);
13784
- if (__getOwnPropSymbols$C)
13785
- for (var prop of __getOwnPropSymbols$C(b)) {
13786
- if (__propIsEnum$C.call(b, prop))
13787
- __defNormalProp$r(a, prop, b[prop]);
13782
+ if (__hasOwnProp$F.call(b, prop))
13783
+ __defNormalProp$u(a, prop, b[prop]);
13784
+ if (__getOwnPropSymbols$F)
13785
+ for (var prop of __getOwnPropSymbols$F(b)) {
13786
+ if (__propIsEnum$F.call(b, prop))
13787
+ __defNormalProp$u(a, prop, b[prop]);
13788
13788
  }
13789
13789
  return a;
13790
13790
  };
13791
- var __spreadProps$l = (a, b) => __defProps$l(a, __getOwnPropDescs$l(b));
13791
+ var __spreadProps$o = (a, b) => __defProps$o(a, __getOwnPropDescs$o(b));
13792
13792
  var __objRest$n = (source, exclude) => {
13793
13793
  var target = {};
13794
13794
  for (var prop in source)
13795
- if (__hasOwnProp$C.call(source, prop) && exclude.indexOf(prop) < 0)
13795
+ if (__hasOwnProp$F.call(source, prop) && exclude.indexOf(prop) < 0)
13796
13796
  target[prop] = source[prop];
13797
- if (source != null && __getOwnPropSymbols$C)
13798
- for (var prop of __getOwnPropSymbols$C(source)) {
13799
- if (exclude.indexOf(prop) < 0 && __propIsEnum$C.call(source, prop))
13797
+ if (source != null && __getOwnPropSymbols$F)
13798
+ for (var prop of __getOwnPropSymbols$F(source)) {
13799
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$F.call(source, prop))
13800
13800
  target[prop] = source[prop];
13801
13801
  }
13802
13802
  return target;
13803
13803
  };
13804
- var __async$T = (__this, __arguments, generator) => {
13804
+ var __async$W = (__this, __arguments, generator) => {
13805
13805
  return new Promise((resolve, reject) => {
13806
13806
  var fulfilled = (value) => {
13807
13807
  try {
@@ -13841,12 +13841,12 @@ class CarriersAPI {
13841
13841
  /**
13842
13842
  * The `connect` method connects a carrier account to a user's ShipEngine account.
13843
13843
  */
13844
- this.connect = (_a) => __async$T(this, null, function* () {
13844
+ this.connect = (_a) => __async$W(this, null, function* () {
13845
13845
  var _b = _a, { carrierCode } = _b, connection = __objRest$n(_b, ["carrierCode"]);
13846
13846
  const endUserIpAddress = yield getEndUserIpAddress();
13847
13847
  if (!endUserIpAddress)
13848
13848
  return Promise.reject([new CodedError("Unable to get IP address")]);
13849
- return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$l(__spreadValues$r({}, connection), {
13849
+ return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$o(__spreadValues$u({}, connection), {
13850
13850
  endUserIpAddress
13851
13851
  }));
13852
13852
  });
@@ -13932,7 +13932,7 @@ class CarriersAPI {
13932
13932
  }
13933
13933
  }
13934
13934
 
13935
- var __async$S = (__this, __arguments, generator) => {
13935
+ var __async$V = (__this, __arguments, generator) => {
13936
13936
  return new Promise((resolve, reject) => {
13937
13937
  var fulfilled = (value) => {
13938
13938
  try {
@@ -13974,7 +13974,7 @@ class ConnectionsAPI {
13974
13974
  /**
13975
13975
  * The `connectCarrier` method connects a carrier to account.
13976
13976
  */
13977
- this.connectCarrier = (carrierName, formData) => __async$S(this, null, function* () {
13977
+ this.connectCarrier = (carrierName, formData) => __async$V(this, null, function* () {
13978
13978
  return yield this.client.post(
13979
13979
  `/v1/connections/carriers/${carrierName}`,
13980
13980
  formData,
@@ -16149,23 +16149,23 @@ class CustomPackagesAPI {
16149
16149
  }
16150
16150
  }
16151
16151
 
16152
- var __defProp$q = Object.defineProperty;
16153
- var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
16154
- var __hasOwnProp$B = Object.prototype.hasOwnProperty;
16155
- var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
16156
- var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16157
- var __spreadValues$q = (a, b) => {
16152
+ var __defProp$t = Object.defineProperty;
16153
+ var __getOwnPropSymbols$E = Object.getOwnPropertySymbols;
16154
+ var __hasOwnProp$E = Object.prototype.hasOwnProperty;
16155
+ var __propIsEnum$E = Object.prototype.propertyIsEnumerable;
16156
+ var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16157
+ var __spreadValues$t = (a, b) => {
16158
16158
  for (var prop in b || (b = {}))
16159
- if (__hasOwnProp$B.call(b, prop))
16160
- __defNormalProp$q(a, prop, b[prop]);
16161
- if (__getOwnPropSymbols$B)
16162
- for (var prop of __getOwnPropSymbols$B(b)) {
16163
- if (__propIsEnum$B.call(b, prop))
16164
- __defNormalProp$q(a, prop, b[prop]);
16159
+ if (__hasOwnProp$E.call(b, prop))
16160
+ __defNormalProp$t(a, prop, b[prop]);
16161
+ if (__getOwnPropSymbols$E)
16162
+ for (var prop of __getOwnPropSymbols$E(b)) {
16163
+ if (__propIsEnum$E.call(b, prop))
16164
+ __defNormalProp$t(a, prop, b[prop]);
16165
16165
  }
16166
16166
  return a;
16167
16167
  };
16168
- var __async$R = (__this, __arguments, generator) => {
16168
+ var __async$U = (__this, __arguments, generator) => {
16169
16169
  return new Promise((resolve, reject) => {
16170
16170
  var fulfilled = (value) => {
16171
16171
  try {
@@ -16204,12 +16204,12 @@ class FundingSourcesAPI {
16204
16204
  * The `create` method creates a new funding source for a given user. This requires
16205
16205
  * payment information to be collected from the user.
16206
16206
  */
16207
- this.create = (createFundingSource) => __async$R(this, null, function* () {
16207
+ this.create = (createFundingSource) => __async$U(this, null, function* () {
16208
16208
  const endUserIpAddress = yield getEndUserIpAddress();
16209
16209
  if (!endUserIpAddress) {
16210
16210
  return Promise.reject([new CodedError("Unable to get IP address")]);
16211
16211
  }
16212
- return yield this.client.post("/v1/funding_sources", __spreadValues$q({
16212
+ return yield this.client.post("/v1/funding_sources", __spreadValues$t({
16213
16213
  endUserIpAddress
16214
16214
  }, createFundingSource));
16215
16215
  });
@@ -16218,7 +16218,7 @@ class FundingSourcesAPI {
16218
16218
  * user to update the billing address or payment information associated with the
16219
16219
  * funding source.
16220
16220
  */
16221
- this.update = (billingInfo, creditCardInfo, fundingSourceId) => __async$R(this, null, function* () {
16221
+ this.update = (billingInfo, creditCardInfo, fundingSourceId) => __async$U(this, null, function* () {
16222
16222
  const endUserIpAddress = yield getEndUserIpAddress();
16223
16223
  if (!endUserIpAddress) {
16224
16224
  return Promise.reject([new CodedError("Unable to get IP address")]);
@@ -16236,19 +16236,19 @@ class FundingSourcesAPI {
16236
16236
  * The `registerCarrier` method registers a carrier account and associates
16237
16237
  * it with a given funding source.
16238
16238
  */
16239
- this.registerCarrier = (carrier) => __async$R(this, null, function* () {
16239
+ this.registerCarrier = (carrier) => __async$U(this, null, function* () {
16240
16240
  const endUserIpAddress = yield getEndUserIpAddress();
16241
16241
  if (!endUserIpAddress) {
16242
16242
  return Promise.reject([new CodedError("Unable to get IP address")]);
16243
16243
  }
16244
- return yield this.client.post("/v1/registration/funding_source", __spreadValues$q({
16244
+ return yield this.client.post("/v1/registration/funding_source", __spreadValues$t({
16245
16245
  endUserIpAddress
16246
16246
  }, carrier));
16247
16247
  });
16248
16248
  /**
16249
16249
  * The `addFunds` method allows you to add funds to a funding source.
16250
16250
  */
16251
- this.addFunds = (amount, fundingSourceId) => __async$R(this, null, function* () {
16251
+ this.addFunds = (amount, fundingSourceId) => __async$U(this, null, function* () {
16252
16252
  return yield this.client.put(
16253
16253
  `/v1/funding_sources/${fundingSourceId}/add_funds`,
16254
16254
  amount
@@ -16258,7 +16258,7 @@ class FundingSourcesAPI {
16258
16258
  * The `metadata` method returns seller-specific requirements for creating funding sources
16259
16259
  * and attaching carriers
16260
16260
  */
16261
- this.metadata = () => __async$R(this, null, function* () {
16261
+ this.metadata = () => __async$U(this, null, function* () {
16262
16262
  return yield this.client.get("/v1/funding_sources/metadata");
16263
16263
  });
16264
16264
  /**
@@ -16310,6 +16310,51 @@ class InsuranceAPI {
16310
16310
  }
16311
16311
  }
16312
16312
 
16313
+ var __async$T = (__this, __arguments, generator) => {
16314
+ return new Promise((resolve, reject) => {
16315
+ var fulfilled = (value) => {
16316
+ try {
16317
+ step(generator.next(value));
16318
+ } catch (e) {
16319
+ reject(e);
16320
+ }
16321
+ };
16322
+ var rejected = (value) => {
16323
+ try {
16324
+ step(generator.throw(value));
16325
+ } catch (e) {
16326
+ reject(e);
16327
+ }
16328
+ };
16329
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
16330
+ step((generator = generator.apply(__this, __arguments)).next());
16331
+ });
16332
+ };
16333
+ class InvoiceAddressAPI {
16334
+ constructor(client) {
16335
+ this.client = client;
16336
+ /**
16337
+ * The `get` method retrieves the invoice address for a given user.
16338
+ */
16339
+ this.get = () => {
16340
+ return this.client.get("/v1/invoice_address");
16341
+ };
16342
+ /**
16343
+ * The `create` method creates a new invoice address for a given user.
16344
+ */
16345
+ this.create = (invoiceAddress) => __async$T(this, null, function* () {
16346
+ return yield this.client.post("/v1/invoice_address", invoiceAddress);
16347
+ });
16348
+ /**
16349
+ * The `update` method updates a invoice address for a given user.
16350
+ */
16351
+ this.update = (invoiceAddress) => __async$T(this, null, function* () {
16352
+ return yield this.client.put("/v1/invoice_address", invoiceAddress);
16353
+ });
16354
+ this.client = client;
16355
+ }
16356
+ }
16357
+
16313
16358
  class LabelsAPI {
16314
16359
  constructor(client) {
16315
16360
  this.client = client;
@@ -16345,17 +16390,17 @@ class LabelsAPI {
16345
16390
  }
16346
16391
  }
16347
16392
 
16348
- var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
16349
- var __hasOwnProp$A = Object.prototype.hasOwnProperty;
16350
- var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
16393
+ var __getOwnPropSymbols$D = Object.getOwnPropertySymbols;
16394
+ var __hasOwnProp$D = Object.prototype.hasOwnProperty;
16395
+ var __propIsEnum$D = Object.prototype.propertyIsEnumerable;
16351
16396
  var __objRest$m = (source, exclude) => {
16352
16397
  var target = {};
16353
16398
  for (var prop in source)
16354
- if (__hasOwnProp$A.call(source, prop) && exclude.indexOf(prop) < 0)
16399
+ if (__hasOwnProp$D.call(source, prop) && exclude.indexOf(prop) < 0)
16355
16400
  target[prop] = source[prop];
16356
- if (source != null && __getOwnPropSymbols$A)
16357
- for (var prop of __getOwnPropSymbols$A(source)) {
16358
- if (exclude.indexOf(prop) < 0 && __propIsEnum$A.call(source, prop))
16401
+ if (source != null && __getOwnPropSymbols$D)
16402
+ for (var prop of __getOwnPropSymbols$D(source)) {
16403
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$D.call(source, prop))
16359
16404
  target[prop] = source[prop];
16360
16405
  }
16361
16406
  return target;
@@ -16476,19 +16521,19 @@ class RateCardsAPI {
16476
16521
  }
16477
16522
  }
16478
16523
 
16479
- var __defProp$p = Object.defineProperty;
16480
- var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
16481
- var __hasOwnProp$z = Object.prototype.hasOwnProperty;
16482
- var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
16483
- var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16484
- var __spreadValues$p = (a, b) => {
16524
+ var __defProp$s = Object.defineProperty;
16525
+ var __getOwnPropSymbols$C = Object.getOwnPropertySymbols;
16526
+ var __hasOwnProp$C = Object.prototype.hasOwnProperty;
16527
+ var __propIsEnum$C = Object.prototype.propertyIsEnumerable;
16528
+ var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16529
+ var __spreadValues$s = (a, b) => {
16485
16530
  for (var prop in b || (b = {}))
16486
- if (__hasOwnProp$z.call(b, prop))
16487
- __defNormalProp$p(a, prop, b[prop]);
16488
- if (__getOwnPropSymbols$z)
16489
- for (var prop of __getOwnPropSymbols$z(b)) {
16490
- if (__propIsEnum$z.call(b, prop))
16491
- __defNormalProp$p(a, prop, b[prop]);
16531
+ if (__hasOwnProp$C.call(b, prop))
16532
+ __defNormalProp$s(a, prop, b[prop]);
16533
+ if (__getOwnPropSymbols$C)
16534
+ for (var prop of __getOwnPropSymbols$C(b)) {
16535
+ if (__propIsEnum$C.call(b, prop))
16536
+ __defNormalProp$s(a, prop, b[prop]);
16492
16537
  }
16493
16538
  return a;
16494
16539
  };
@@ -16510,7 +16555,7 @@ class RatesAPI {
16510
16555
  * method.
16511
16556
  */
16512
16557
  this.estimate = (params) => {
16513
- return this.client.post("/v1/rates/estimate", __spreadValues$p({}, params));
16558
+ return this.client.post("/v1/rates/estimate", __spreadValues$s({}, params));
16514
16559
  };
16515
16560
  this.client = client;
16516
16561
  }
@@ -16522,10 +16567,14 @@ class SalesOrderShipmentsAPI {
16522
16567
  /**
16523
16568
  * The `list` method retrieves a list of sales order shipments for a given user.
16524
16569
  */
16525
- this.list = (body = {}, params) => {
16526
- return this.client.post("/v-beta/shipments/list", body, {
16527
- params
16528
- });
16570
+ this.list = (body) => {
16571
+ return this.client.post("/v-beta/shipments/list", body);
16572
+ };
16573
+ /**
16574
+ * The `listShipmentsByExternalOrderId` method retrieves a list of shipments associated to a sales order that matches `externalOrderId`
16575
+ */
16576
+ this.listShipmentsByExternalOrderId = (externalOrderId) => {
16577
+ return this.client.get(`/v-beta/shipments/external_order_id/${externalOrderId}`);
16529
16578
  };
16530
16579
  /**
16531
16580
  * The `get` method retrieves a specific sales order shipment by `shipmentId`.
@@ -16567,6 +16616,13 @@ class SalesOrdersAPI {
16567
16616
  this.get = (salesOrderId) => {
16568
16617
  return this.client.get(`/v-beta/sales_orders/${salesOrderId}`);
16569
16618
  };
16619
+ /**
16620
+ * The `getByExternalId` method retrieves a specific sales order by its `externalOrderId`.
16621
+ * @param externalOrderId Id that matches that of the desired sales order.
16622
+ */
16623
+ this.getByExternalId = (externalOrderId) => {
16624
+ return this.client.get(`/v-beta/sales_orders/external_order_id/${externalOrderId}`);
16625
+ };
16570
16626
  /**
16571
16627
  * The `notifyShipped` method notifies order source that the order has been
16572
16628
  * shipped. Typically, the order source will then notify the user based on
@@ -16579,7 +16635,7 @@ class SalesOrdersAPI {
16579
16635
  }
16580
16636
  }
16581
16637
 
16582
- var __async$Q = (__this, __arguments, generator) => {
16638
+ var __async$S = (__this, __arguments, generator) => {
16583
16639
  return new Promise((resolve, reject) => {
16584
16640
  var fulfilled = (value) => {
16585
16641
  try {
@@ -16637,7 +16693,7 @@ class SellersAPI {
16637
16693
  /**
16638
16694
  * Deletes an API Key
16639
16695
  */
16640
- this.deleteSellerApiKey = (_0) => __async$Q(this, [_0], function* ({
16696
+ this.deleteSellerApiKey = (_0) => __async$S(this, [_0], function* ({
16641
16697
  encryptedApiKey,
16642
16698
  sellerId,
16643
16699
  isSandbox
@@ -16683,19 +16739,19 @@ class SellersAPI {
16683
16739
  }
16684
16740
  }
16685
16741
 
16686
- var __defProp$o = Object.defineProperty;
16687
- var __getOwnPropSymbols$y = Object.getOwnPropertySymbols;
16688
- var __hasOwnProp$y = Object.prototype.hasOwnProperty;
16689
- var __propIsEnum$y = Object.prototype.propertyIsEnumerable;
16690
- var __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16691
- var __spreadValues$o = (a, b) => {
16742
+ var __defProp$r = Object.defineProperty;
16743
+ var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
16744
+ var __hasOwnProp$B = Object.prototype.hasOwnProperty;
16745
+ var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
16746
+ var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16747
+ var __spreadValues$r = (a, b) => {
16692
16748
  for (var prop in b || (b = {}))
16693
- if (__hasOwnProp$y.call(b, prop))
16694
- __defNormalProp$o(a, prop, b[prop]);
16695
- if (__getOwnPropSymbols$y)
16696
- for (var prop of __getOwnPropSymbols$y(b)) {
16697
- if (__propIsEnum$y.call(b, prop))
16698
- __defNormalProp$o(a, prop, b[prop]);
16749
+ if (__hasOwnProp$B.call(b, prop))
16750
+ __defNormalProp$r(a, prop, b[prop]);
16751
+ if (__getOwnPropSymbols$B)
16752
+ for (var prop of __getOwnPropSymbols$B(b)) {
16753
+ if (__propIsEnum$B.call(b, prop))
16754
+ __defNormalProp$r(a, prop, b[prop]);
16699
16755
  }
16700
16756
  return a;
16701
16757
  };
@@ -16707,7 +16763,7 @@ class ServicePointsAPI {
16707
16763
  * Either an address, coordinates, or an address query
16708
16764
  */
16709
16765
  this.list = (options) => {
16710
- return this.client.post("/v1/service_points/list", __spreadValues$o({}, options));
16766
+ return this.client.post("/v1/service_points/list", __spreadValues$r({}, options));
16711
16767
  };
16712
16768
  /**
16713
16769
  * Get a specific service point by its carrier code, country code, and id
@@ -16725,7 +16781,7 @@ class ServicePointsAPI {
16725
16781
  }
16726
16782
  }
16727
16783
 
16728
- var __async$P = (__this, __arguments, generator) => {
16784
+ var __async$R = (__this, __arguments, generator) => {
16729
16785
  return new Promise((resolve, reject) => {
16730
16786
  var fulfilled = (value) => {
16731
16787
  try {
@@ -16774,7 +16830,7 @@ class ShipmentsAPI {
16774
16830
  * The `create` method allows for creating shipments based on a list of shipment
16775
16831
  * items passed into this method.
16776
16832
  */
16777
- this.create = (...shipments) => __async$P(this, null, function* () {
16833
+ this.create = (...shipments) => __async$R(this, null, function* () {
16778
16834
  return this.client.post("/v1/shipments", {
16779
16835
  shipments
16780
16836
  });
@@ -34166,26 +34222,26 @@ class WebhooksAPI {
34166
34222
  }
34167
34223
  }
34168
34224
 
34169
- var __defProp$n = Object.defineProperty;
34170
- var __defProps$k = Object.defineProperties;
34171
- var __getOwnPropDescs$k = Object.getOwnPropertyDescriptors;
34172
- var __getOwnPropSymbols$x = Object.getOwnPropertySymbols;
34173
- var __hasOwnProp$x = Object.prototype.hasOwnProperty;
34174
- var __propIsEnum$x = Object.prototype.propertyIsEnumerable;
34175
- var __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
34176
- var __spreadValues$n = (a, b) => {
34225
+ var __defProp$q = Object.defineProperty;
34226
+ var __defProps$n = Object.defineProperties;
34227
+ var __getOwnPropDescs$n = Object.getOwnPropertyDescriptors;
34228
+ var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
34229
+ var __hasOwnProp$A = Object.prototype.hasOwnProperty;
34230
+ var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
34231
+ var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
34232
+ var __spreadValues$q = (a, b) => {
34177
34233
  for (var prop in b || (b = {}))
34178
- if (__hasOwnProp$x.call(b, prop))
34179
- __defNormalProp$n(a, prop, b[prop]);
34180
- if (__getOwnPropSymbols$x)
34181
- for (var prop of __getOwnPropSymbols$x(b)) {
34182
- if (__propIsEnum$x.call(b, prop))
34183
- __defNormalProp$n(a, prop, b[prop]);
34234
+ if (__hasOwnProp$A.call(b, prop))
34235
+ __defNormalProp$q(a, prop, b[prop]);
34236
+ if (__getOwnPropSymbols$A)
34237
+ for (var prop of __getOwnPropSymbols$A(b)) {
34238
+ if (__propIsEnum$A.call(b, prop))
34239
+ __defNormalProp$q(a, prop, b[prop]);
34184
34240
  }
34185
34241
  return a;
34186
34242
  };
34187
- var __spreadProps$k = (a, b) => __defProps$k(a, __getOwnPropDescs$k(b));
34188
- var __async$O = (__this, __arguments, generator) => {
34243
+ var __spreadProps$n = (a, b) => __defProps$n(a, __getOwnPropDescs$n(b));
34244
+ var __async$Q = (__this, __arguments, generator) => {
34189
34245
  return new Promise((resolve, reject) => {
34190
34246
  var fulfilled = (value) => {
34191
34247
  try {
@@ -34208,7 +34264,7 @@ var __async$O = (__this, __arguments, generator) => {
34208
34264
  const logger$1 = E({
34209
34265
  level: process.env.NODE_ENV === "production" ? "fatal" : "info",
34210
34266
  name: "shipengine-api",
34211
- serializers: __spreadProps$k(__spreadValues$n({}, k), {
34267
+ serializers: __spreadProps$n(__spreadValues$q({}, k), {
34212
34268
  req: (req) => ({
34213
34269
  headers: req.headers,
34214
34270
  method: req.method,
@@ -34233,7 +34289,7 @@ class ShipEngineAPI {
34233
34289
  this.getSandboxToken = getSandboxToken;
34234
34290
  const client = axios.create({
34235
34291
  baseURL,
34236
- headers: __spreadProps$k(__spreadValues$n({}, headers), {
34292
+ headers: __spreadProps$n(__spreadValues$q({}, headers), {
34237
34293
  "Content-Type": "application/json"
34238
34294
  }),
34239
34295
  paramsSerializer: (params) => lib.stringify(decamelizeKeys(params), { arrayFormat: "brackets" }),
@@ -34268,7 +34324,7 @@ class ShipEngineAPI {
34268
34324
  });
34269
34325
  client.defaults.headers.common["Authorization"] = `Bearer ${token}`;
34270
34326
  client.interceptors.request.use(
34271
- (config) => __async$O(this, null, function* () {
34327
+ (config) => __async$Q(this, null, function* () {
34272
34328
  if (config.isSandbox) {
34273
34329
  if (!this.sandboxToken) {
34274
34330
  this.sandboxToken = yield getSandboxToken == null ? void 0 : getSandboxToken();
@@ -34295,7 +34351,7 @@ class ShipEngineAPI {
34295
34351
  );
34296
34352
  return res;
34297
34353
  },
34298
- (err) => __async$O(this, null, function* () {
34354
+ (err) => __async$Q(this, null, function* () {
34299
34355
  var _a, _b, _c, _d, _e;
34300
34356
  logger$1.error(
34301
34357
  { err, req: err.config, res: err.response },
@@ -34342,7 +34398,7 @@ class ShipEngineAPI {
34342
34398
  * that token (also known as Seller ID)
34343
34399
  */
34344
34400
  getTenant(isSandbox) {
34345
- return __async$O(this, null, function* () {
34401
+ return __async$Q(this, null, function* () {
34346
34402
  var _a;
34347
34403
  if (!isSandbox) {
34348
34404
  return this.getTenantFromToken(this.token);
@@ -34433,6 +34489,15 @@ class ShipEngineAPI {
34433
34489
  get insurance() {
34434
34490
  return new InsuranceAPI(this.client);
34435
34491
  }
34492
+ /**
34493
+ * The `invoiceAddress` method provides access to the Invoice Address endpoints
34494
+ * in ShipEngine API.
34495
+ *
34496
+ * @see {@link InvoiceAddress | The Invoice Address API module}
34497
+ */
34498
+ get invoiceAddress() {
34499
+ return new InvoiceAddressAPI(this.client);
34500
+ }
34436
34501
  /**
34437
34502
  * The `labels` method provides access to the Label endpoints in ShipEngine API.
34438
34503
  * e.g. Create Label, Get Label, Void Label, etc.
@@ -34612,25 +34677,25 @@ const delay = (ms) => new Promise((resolve) => {
34612
34677
 
34613
34678
  const onError = (_errors) => _default();
34614
34679
 
34615
- var __defProp$m = Object.defineProperty;
34616
- var __defProps$j = Object.defineProperties;
34617
- var __getOwnPropDescs$j = Object.getOwnPropertyDescriptors;
34618
- var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
34619
- var __hasOwnProp$w = Object.prototype.hasOwnProperty;
34620
- var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
34621
- var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
34622
- var __spreadValues$m = (a, b) => {
34680
+ var __defProp$p = Object.defineProperty;
34681
+ var __defProps$m = Object.defineProperties;
34682
+ var __getOwnPropDescs$m = Object.getOwnPropertyDescriptors;
34683
+ var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
34684
+ var __hasOwnProp$z = Object.prototype.hasOwnProperty;
34685
+ var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
34686
+ var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
34687
+ var __spreadValues$p = (a, b) => {
34623
34688
  for (var prop in b || (b = {}))
34624
- if (__hasOwnProp$w.call(b, prop))
34625
- __defNormalProp$m(a, prop, b[prop]);
34626
- if (__getOwnPropSymbols$w)
34627
- for (var prop of __getOwnPropSymbols$w(b)) {
34628
- if (__propIsEnum$w.call(b, prop))
34629
- __defNormalProp$m(a, prop, b[prop]);
34689
+ if (__hasOwnProp$z.call(b, prop))
34690
+ __defNormalProp$p(a, prop, b[prop]);
34691
+ if (__getOwnPropSymbols$z)
34692
+ for (var prop of __getOwnPropSymbols$z(b)) {
34693
+ if (__propIsEnum$z.call(b, prop))
34694
+ __defNormalProp$p(a, prop, b[prop]);
34630
34695
  }
34631
34696
  return a;
34632
34697
  };
34633
- var __spreadProps$j = (a, b) => __defProps$j(a, __getOwnPropDescs$j(b));
34698
+ var __spreadProps$m = (a, b) => __defProps$m(a, __getOwnPropDescs$m(b));
34634
34699
  const streams = [];
34635
34700
  if (process.env.NODE_ENV === "production") {
34636
34701
  streams.push({
@@ -34639,7 +34704,7 @@ if (process.env.NODE_ENV === "production") {
34639
34704
  }
34640
34705
  const logger = E({
34641
34706
  name: "shipengine",
34642
- serializers: __spreadProps$j(__spreadValues$m({}, k), {
34707
+ serializers: __spreadProps$m(__spreadValues$p({}, k), {
34643
34708
  req: (req) => ({
34644
34709
  headers: req.headers,
34645
34710
  method: req.method,
@@ -34664,7 +34729,7 @@ const retryUntil = (callbackFn, retries = 10, timeoutBetweenAttempts = 1e3) => P
34664
34729
  throw error;
34665
34730
  });
34666
34731
 
34667
- var __async$N = (__this, __arguments, generator) => {
34732
+ var __async$P = (__this, __arguments, generator) => {
34668
34733
  return new Promise((resolve, reject) => {
34669
34734
  var fulfilled = (value) => {
34670
34735
  try {
@@ -34687,7 +34752,7 @@ var __async$N = (__this, __arguments, generator) => {
34687
34752
  const useCreateAccountImage = () => {
34688
34753
  const { client } = useShipEngine();
34689
34754
  return reactQuery.useMutation({
34690
- mutationFn: (data) => __async$N(void 0, null, function* () {
34755
+ mutationFn: (data) => __async$P(void 0, null, function* () {
34691
34756
  const result = yield client.accountSettings.createImage(data);
34692
34757
  return result.data;
34693
34758
  }),
@@ -34696,7 +34761,7 @@ const useCreateAccountImage = () => {
34696
34761
  });
34697
34762
  };
34698
34763
 
34699
- var __async$M = (__this, __arguments, generator) => {
34764
+ var __async$O = (__this, __arguments, generator) => {
34700
34765
  return new Promise((resolve, reject) => {
34701
34766
  var fulfilled = (value) => {
34702
34767
  try {
@@ -34719,7 +34784,7 @@ var __async$M = (__this, __arguments, generator) => {
34719
34784
  const useDeleteAccountImage = () => {
34720
34785
  const { client } = useShipEngine();
34721
34786
  return reactQuery.useMutation({
34722
- mutationFn: (labelImageId) => __async$M(void 0, null, function* () {
34787
+ mutationFn: (labelImageId) => __async$O(void 0, null, function* () {
34723
34788
  const result = yield client.accountSettings.deleteImage(labelImageId);
34724
34789
  return result.data;
34725
34790
  }),
@@ -34748,7 +34813,7 @@ const useGetAccountSettings = () => {
34748
34813
  });
34749
34814
  };
34750
34815
 
34751
- var __async$L = (__this, __arguments, generator) => {
34816
+ var __async$N = (__this, __arguments, generator) => {
34752
34817
  return new Promise((resolve, reject) => {
34753
34818
  var fulfilled = (value) => {
34754
34819
  try {
@@ -34771,7 +34836,7 @@ var __async$L = (__this, __arguments, generator) => {
34771
34836
  const useUpdateAccountImage = () => {
34772
34837
  const { client } = useShipEngine();
34773
34838
  return reactQuery.useMutation({
34774
- mutationFn: (data) => __async$L(void 0, null, function* () {
34839
+ mutationFn: (data) => __async$N(void 0, null, function* () {
34775
34840
  const result = yield client.accountSettings.updateImage(data);
34776
34841
  return result.data;
34777
34842
  }),
@@ -34780,7 +34845,7 @@ const useUpdateAccountImage = () => {
34780
34845
  });
34781
34846
  };
34782
34847
 
34783
- var __async$K = (__this, __arguments, generator) => {
34848
+ var __async$M = (__this, __arguments, generator) => {
34784
34849
  return new Promise((resolve, reject) => {
34785
34850
  var fulfilled = (value) => {
34786
34851
  try {
@@ -34803,7 +34868,7 @@ var __async$K = (__this, __arguments, generator) => {
34803
34868
  const useUpdateAccountSettings = () => {
34804
34869
  const { client } = useShipEngine();
34805
34870
  return reactQuery.useMutation({
34806
- mutationFn: (settings) => __async$K(void 0, null, function* () {
34871
+ mutationFn: (settings) => __async$M(void 0, null, function* () {
34807
34872
  const result = yield client.accountSettings.update(settings);
34808
34873
  return result.data;
34809
34874
  }),
@@ -34812,7 +34877,7 @@ const useUpdateAccountSettings = () => {
34812
34877
  });
34813
34878
  };
34814
34879
 
34815
- var __async$J = (__this, __arguments, generator) => {
34880
+ var __async$L = (__this, __arguments, generator) => {
34816
34881
  return new Promise((resolve, reject) => {
34817
34882
  var fulfilled = (value) => {
34818
34883
  try {
@@ -34835,7 +34900,7 @@ var __async$J = (__this, __arguments, generator) => {
34835
34900
  const useParseAddress = () => {
34836
34901
  const { client } = useShipEngine();
34837
34902
  return reactQuery.useMutation({
34838
- mutationFn: (_0) => __async$J(void 0, [_0], function* ({ address, text }) {
34903
+ mutationFn: (_0) => __async$L(void 0, [_0], function* ({ address, text }) {
34839
34904
  const result = yield client.addresses.parse(text, address);
34840
34905
  return result.data;
34841
34906
  }),
@@ -34844,7 +34909,7 @@ const useParseAddress = () => {
34844
34909
  });
34845
34910
  };
34846
34911
 
34847
- var __async$I = (__this, __arguments, generator) => {
34912
+ var __async$K = (__this, __arguments, generator) => {
34848
34913
  return new Promise((resolve, reject) => {
34849
34914
  var fulfilled = (value) => {
34850
34915
  try {
@@ -34867,7 +34932,7 @@ var __async$I = (__this, __arguments, generator) => {
34867
34932
  const useValidateAddresses = () => {
34868
34933
  const { client } = useShipEngine();
34869
34934
  return reactQuery.useMutation({
34870
- mutationFn: (addresses) => __async$I(void 0, null, function* () {
34935
+ mutationFn: (addresses) => __async$K(void 0, null, function* () {
34871
34936
  const result = yield client.addresses.validate(addresses);
34872
34937
  return result.data;
34873
34938
  }),
@@ -34876,7 +34941,7 @@ const useValidateAddresses = () => {
34876
34941
  });
34877
34942
  };
34878
34943
 
34879
- var __async$H = (__this, __arguments, generator) => {
34944
+ var __async$J = (__this, __arguments, generator) => {
34880
34945
  return new Promise((resolve, reject) => {
34881
34946
  var fulfilled = (value) => {
34882
34947
  try {
@@ -34899,7 +34964,7 @@ var __async$H = (__this, __arguments, generator) => {
34899
34964
  const useAddFunds = () => {
34900
34965
  const { client } = useShipEngine();
34901
34966
  return reactQuery.useMutation({
34902
- mutationFn: (_0) => __async$H(void 0, [_0], function* ({ carrierId, funds }) {
34967
+ mutationFn: (_0) => __async$J(void 0, [_0], function* ({ carrierId, funds }) {
34903
34968
  const result = yield client.carriers.addFunds(carrierId, funds);
34904
34969
  return result.data;
34905
34970
  }),
@@ -34908,7 +34973,7 @@ const useAddFunds = () => {
34908
34973
  });
34909
34974
  };
34910
34975
 
34911
- var __async$G = (__this, __arguments, generator) => {
34976
+ var __async$I = (__this, __arguments, generator) => {
34912
34977
  return new Promise((resolve, reject) => {
34913
34978
  var fulfilled = (value) => {
34914
34979
  try {
@@ -34931,7 +34996,7 @@ var __async$G = (__this, __arguments, generator) => {
34931
34996
  const useConnectCarrier = () => {
34932
34997
  const { client } = useShipEngine();
34933
34998
  return reactQuery.useMutation({
34934
- mutationFn: (params) => __async$G(void 0, null, function* () {
34999
+ mutationFn: (params) => __async$I(void 0, null, function* () {
34935
35000
  const result = yield client.carriers.connect(params);
34936
35001
  return result.data;
34937
35002
  }),
@@ -35040,41 +35105,41 @@ const useGetServicesByCarrier = (carrierId) => {
35040
35105
  });
35041
35106
  };
35042
35107
 
35043
- var __defProp$l = Object.defineProperty;
35044
- var __defProps$i = Object.defineProperties;
35045
- var __getOwnPropDescs$i = Object.getOwnPropertyDescriptors;
35046
- var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
35047
- var __hasOwnProp$v = Object.prototype.hasOwnProperty;
35048
- var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
35049
- var __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35050
- var __spreadValues$l = (a, b) => {
35108
+ var __defProp$o = Object.defineProperty;
35109
+ var __defProps$l = Object.defineProperties;
35110
+ var __getOwnPropDescs$l = Object.getOwnPropertyDescriptors;
35111
+ var __getOwnPropSymbols$y = Object.getOwnPropertySymbols;
35112
+ var __hasOwnProp$y = Object.prototype.hasOwnProperty;
35113
+ var __propIsEnum$y = Object.prototype.propertyIsEnumerable;
35114
+ var __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35115
+ var __spreadValues$o = (a, b) => {
35051
35116
  for (var prop in b || (b = {}))
35052
- if (__hasOwnProp$v.call(b, prop))
35053
- __defNormalProp$l(a, prop, b[prop]);
35054
- if (__getOwnPropSymbols$v)
35055
- for (var prop of __getOwnPropSymbols$v(b)) {
35056
- if (__propIsEnum$v.call(b, prop))
35057
- __defNormalProp$l(a, prop, b[prop]);
35117
+ if (__hasOwnProp$y.call(b, prop))
35118
+ __defNormalProp$o(a, prop, b[prop]);
35119
+ if (__getOwnPropSymbols$y)
35120
+ for (var prop of __getOwnPropSymbols$y(b)) {
35121
+ if (__propIsEnum$y.call(b, prop))
35122
+ __defNormalProp$o(a, prop, b[prop]);
35058
35123
  }
35059
35124
  return a;
35060
35125
  };
35061
- var __spreadProps$i = (a, b) => __defProps$i(a, __getOwnPropDescs$i(b));
35126
+ var __spreadProps$l = (a, b) => __defProps$l(a, __getOwnPropDescs$l(b));
35062
35127
  var __objRest$l = (source, exclude) => {
35063
35128
  var target = {};
35064
35129
  for (var prop in source)
35065
- if (__hasOwnProp$v.call(source, prop) && exclude.indexOf(prop) < 0)
35130
+ if (__hasOwnProp$y.call(source, prop) && exclude.indexOf(prop) < 0)
35066
35131
  target[prop] = source[prop];
35067
- if (source != null && __getOwnPropSymbols$v)
35068
- for (var prop of __getOwnPropSymbols$v(source)) {
35069
- if (exclude.indexOf(prop) < 0 && __propIsEnum$v.call(source, prop))
35132
+ if (source != null && __getOwnPropSymbols$y)
35133
+ for (var prop of __getOwnPropSymbols$y(source)) {
35134
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$y.call(source, prop))
35070
35135
  target[prop] = source[prop];
35071
35136
  }
35072
35137
  return target;
35073
35138
  };
35074
35139
  const useListCarriers = (params) => {
35075
35140
  const { client } = useShipEngine();
35076
- const _a = __spreadValues$l({}, params), { queryFnParams } = _a, rest = __objRest$l(_a, ["queryFnParams"]);
35077
- return reactQuery.useQuery(__spreadProps$i(__spreadValues$l({}, rest), {
35141
+ const _a = __spreadValues$o({}, params), { queryFnParams } = _a, rest = __objRest$l(_a, ["queryFnParams"]);
35142
+ return reactQuery.useQuery(__spreadProps$l(__spreadValues$o({}, rest), {
35078
35143
  onError,
35079
35144
  queryFn: () => client.carriers.list(queryFnParams),
35080
35145
  queryKey: ["useListCarriers", queryFnParams],
@@ -35082,22 +35147,22 @@ const useListCarriers = (params) => {
35082
35147
  }));
35083
35148
  };
35084
35149
 
35085
- var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
35086
- var __hasOwnProp$u = Object.prototype.hasOwnProperty;
35087
- var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
35150
+ var __getOwnPropSymbols$x = Object.getOwnPropertySymbols;
35151
+ var __hasOwnProp$x = Object.prototype.hasOwnProperty;
35152
+ var __propIsEnum$x = Object.prototype.propertyIsEnumerable;
35088
35153
  var __objRest$k = (source, exclude) => {
35089
35154
  var target = {};
35090
35155
  for (var prop in source)
35091
- if (__hasOwnProp$u.call(source, prop) && exclude.indexOf(prop) < 0)
35156
+ if (__hasOwnProp$x.call(source, prop) && exclude.indexOf(prop) < 0)
35092
35157
  target[prop] = source[prop];
35093
- if (source != null && __getOwnPropSymbols$u)
35094
- for (var prop of __getOwnPropSymbols$u(source)) {
35095
- if (exclude.indexOf(prop) < 0 && __propIsEnum$u.call(source, prop))
35158
+ if (source != null && __getOwnPropSymbols$x)
35159
+ for (var prop of __getOwnPropSymbols$x(source)) {
35160
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$x.call(source, prop))
35096
35161
  target[prop] = source[prop];
35097
35162
  }
35098
35163
  return target;
35099
35164
  };
35100
- var __async$F = (__this, __arguments, generator) => {
35165
+ var __async$H = (__this, __arguments, generator) => {
35101
35166
  return new Promise((resolve, reject) => {
35102
35167
  var fulfilled = (value) => {
35103
35168
  try {
@@ -35121,7 +35186,7 @@ const useUpdateAutoFunding = () => {
35121
35186
  const { client } = useShipEngine();
35122
35187
  const queryClient = reactQuery.useQueryClient();
35123
35188
  return reactQuery.useMutation({
35124
- mutationFn: (_a) => __async$F(void 0, null, function* () {
35189
+ mutationFn: (_a) => __async$H(void 0, null, function* () {
35125
35190
  var _b = _a, { carrierId } = _b, options = __objRest$k(_b, ["carrierId"]);
35126
35191
  const result = yield client.carriers.updateAutoFunding(carrierId, options);
35127
35192
  return result.data;
@@ -35151,7 +35216,7 @@ const useGetZonesByCarrier = (carrierId) => {
35151
35216
  });
35152
35217
  };
35153
35218
 
35154
- var __async$E = (__this, __arguments, generator) => {
35219
+ var __async$G = (__this, __arguments, generator) => {
35155
35220
  return new Promise((resolve, reject) => {
35156
35221
  var fulfilled = (value) => {
35157
35222
  try {
@@ -35174,7 +35239,7 @@ var __async$E = (__this, __arguments, generator) => {
35174
35239
  const useDeleteCarrier = () => {
35175
35240
  const { client } = useShipEngine();
35176
35241
  return reactQuery.useMutation({
35177
- mutationFn: (carrierId) => __async$E(void 0, null, function* () {
35242
+ mutationFn: (carrierId) => __async$G(void 0, null, function* () {
35178
35243
  const result = yield client.carriers.delete(carrierId);
35179
35244
  return result.data;
35180
35245
  }),
@@ -35183,17 +35248,17 @@ const useDeleteCarrier = () => {
35183
35248
  });
35184
35249
  };
35185
35250
 
35186
- var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
35187
- var __hasOwnProp$t = Object.prototype.hasOwnProperty;
35188
- var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
35251
+ var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
35252
+ var __hasOwnProp$w = Object.prototype.hasOwnProperty;
35253
+ var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
35189
35254
  var __objRest$j = (source, exclude) => {
35190
35255
  var target = {};
35191
35256
  for (var prop in source)
35192
- if (__hasOwnProp$t.call(source, prop) && exclude.indexOf(prop) < 0)
35257
+ if (__hasOwnProp$w.call(source, prop) && exclude.indexOf(prop) < 0)
35193
35258
  target[prop] = source[prop];
35194
- if (source != null && __getOwnPropSymbols$t)
35195
- for (var prop of __getOwnPropSymbols$t(source)) {
35196
- if (exclude.indexOf(prop) < 0 && __propIsEnum$t.call(source, prop))
35259
+ if (source != null && __getOwnPropSymbols$w)
35260
+ for (var prop of __getOwnPropSymbols$w(source)) {
35261
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$w.call(source, prop))
35197
35262
  target[prop] = source[prop];
35198
35263
  }
35199
35264
  return target;
@@ -35210,17 +35275,17 @@ const useGetCarrierConnectionForm = (_params) => {
35210
35275
  });
35211
35276
  };
35212
35277
 
35213
- var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
35214
- var __hasOwnProp$s = Object.prototype.hasOwnProperty;
35215
- var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
35278
+ var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
35279
+ var __hasOwnProp$v = Object.prototype.hasOwnProperty;
35280
+ var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
35216
35281
  var __objRest$i = (source, exclude) => {
35217
35282
  var target = {};
35218
35283
  for (var prop in source)
35219
- if (__hasOwnProp$s.call(source, prop) && exclude.indexOf(prop) < 0)
35284
+ if (__hasOwnProp$v.call(source, prop) && exclude.indexOf(prop) < 0)
35220
35285
  target[prop] = source[prop];
35221
- if (source != null && __getOwnPropSymbols$s)
35222
- for (var prop of __getOwnPropSymbols$s(source)) {
35223
- if (exclude.indexOf(prop) < 0 && __propIsEnum$s.call(source, prop))
35286
+ if (source != null && __getOwnPropSymbols$v)
35287
+ for (var prop of __getOwnPropSymbols$v(source)) {
35288
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$v.call(source, prop))
35224
35289
  target[prop] = source[prop];
35225
35290
  }
35226
35291
  return target;
@@ -35237,7 +35302,7 @@ const useListCarrierConnections = (_params) => {
35237
35302
  });
35238
35303
  };
35239
35304
 
35240
- var __async$D = (__this, __arguments, generator) => {
35305
+ var __async$F = (__this, __arguments, generator) => {
35241
35306
  return new Promise((resolve, reject) => {
35242
35307
  var fulfilled = (value) => {
35243
35308
  try {
@@ -35260,7 +35325,7 @@ var __async$D = (__this, __arguments, generator) => {
35260
35325
  const useConnectCarrierAccount = () => {
35261
35326
  const { client } = useShipEngine();
35262
35327
  return reactQuery.useMutation({
35263
- mutationFn: (_0) => __async$D(void 0, [_0], function* ({ carrierName, formData }) {
35328
+ mutationFn: (_0) => __async$F(void 0, [_0], function* ({ carrierName, formData }) {
35264
35329
  const result = yield client.connections.connectCarrier(carrierName, formData);
35265
35330
  return result.data;
35266
35331
  }),
@@ -35280,33 +35345,33 @@ const useCarrierConnectionsServicesList = (carrierCode) => {
35280
35345
  });
35281
35346
  };
35282
35347
 
35283
- var __defProp$k = Object.defineProperty;
35284
- var __defProps$h = Object.defineProperties;
35285
- var __getOwnPropDescs$h = Object.getOwnPropertyDescriptors;
35286
- var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
35287
- var __hasOwnProp$r = Object.prototype.hasOwnProperty;
35288
- var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
35289
- var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35290
- var __spreadValues$k = (a, b) => {
35348
+ var __defProp$n = Object.defineProperty;
35349
+ var __defProps$k = Object.defineProperties;
35350
+ var __getOwnPropDescs$k = Object.getOwnPropertyDescriptors;
35351
+ var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
35352
+ var __hasOwnProp$u = Object.prototype.hasOwnProperty;
35353
+ var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
35354
+ var __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35355
+ var __spreadValues$n = (a, b) => {
35291
35356
  for (var prop in b || (b = {}))
35292
- if (__hasOwnProp$r.call(b, prop))
35293
- __defNormalProp$k(a, prop, b[prop]);
35294
- if (__getOwnPropSymbols$r)
35295
- for (var prop of __getOwnPropSymbols$r(b)) {
35296
- if (__propIsEnum$r.call(b, prop))
35297
- __defNormalProp$k(a, prop, b[prop]);
35357
+ if (__hasOwnProp$u.call(b, prop))
35358
+ __defNormalProp$n(a, prop, b[prop]);
35359
+ if (__getOwnPropSymbols$u)
35360
+ for (var prop of __getOwnPropSymbols$u(b)) {
35361
+ if (__propIsEnum$u.call(b, prop))
35362
+ __defNormalProp$n(a, prop, b[prop]);
35298
35363
  }
35299
35364
  return a;
35300
35365
  };
35301
- var __spreadProps$h = (a, b) => __defProps$h(a, __getOwnPropDescs$h(b));
35366
+ var __spreadProps$k = (a, b) => __defProps$k(a, __getOwnPropDescs$k(b));
35302
35367
  var __objRest$h = (source, exclude) => {
35303
35368
  var target = {};
35304
35369
  for (var prop in source)
35305
- if (__hasOwnProp$r.call(source, prop) && exclude.indexOf(prop) < 0)
35370
+ if (__hasOwnProp$u.call(source, prop) && exclude.indexOf(prop) < 0)
35306
35371
  target[prop] = source[prop];
35307
- if (source != null && __getOwnPropSymbols$r)
35308
- for (var prop of __getOwnPropSymbols$r(source)) {
35309
- if (exclude.indexOf(prop) < 0 && __propIsEnum$r.call(source, prop))
35372
+ if (source != null && __getOwnPropSymbols$u)
35373
+ for (var prop of __getOwnPropSymbols$u(source)) {
35374
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$u.call(source, prop))
35310
35375
  target[prop] = source[prop];
35311
35376
  }
35312
35377
  return target;
@@ -35319,7 +35384,7 @@ const useGetConnectionsCarrierSettings = (_a) => {
35319
35384
  ]);
35320
35385
  const { client } = useShipEngine();
35321
35386
  const { carrierName, carrierId } = queryFnParams;
35322
- return reactQuery.useQuery(__spreadProps$h(__spreadValues$k({}, params), {
35387
+ return reactQuery.useQuery(__spreadProps$k(__spreadValues$n({}, params), {
35323
35388
  onError,
35324
35389
  queryFn: () => client.connections.getCarrierSettings(carrierName, carrierId),
35325
35390
  queryKey: ["useGetConnectionsCarrierSettings", carrierName, carrierId],
@@ -35327,26 +35392,26 @@ const useGetConnectionsCarrierSettings = (_a) => {
35327
35392
  }));
35328
35393
  };
35329
35394
 
35330
- var __defProp$j = Object.defineProperty;
35331
- var __defProps$g = Object.defineProperties;
35332
- var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
35333
- var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
35334
- var __hasOwnProp$q = Object.prototype.hasOwnProperty;
35335
- var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
35336
- var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35337
- var __spreadValues$j = (a, b) => {
35395
+ var __defProp$m = Object.defineProperty;
35396
+ var __defProps$j = Object.defineProperties;
35397
+ var __getOwnPropDescs$j = Object.getOwnPropertyDescriptors;
35398
+ var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
35399
+ var __hasOwnProp$t = Object.prototype.hasOwnProperty;
35400
+ var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
35401
+ var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35402
+ var __spreadValues$m = (a, b) => {
35338
35403
  for (var prop in b || (b = {}))
35339
- if (__hasOwnProp$q.call(b, prop))
35340
- __defNormalProp$j(a, prop, b[prop]);
35341
- if (__getOwnPropSymbols$q)
35342
- for (var prop of __getOwnPropSymbols$q(b)) {
35343
- if (__propIsEnum$q.call(b, prop))
35344
- __defNormalProp$j(a, prop, b[prop]);
35404
+ if (__hasOwnProp$t.call(b, prop))
35405
+ __defNormalProp$m(a, prop, b[prop]);
35406
+ if (__getOwnPropSymbols$t)
35407
+ for (var prop of __getOwnPropSymbols$t(b)) {
35408
+ if (__propIsEnum$t.call(b, prop))
35409
+ __defNormalProp$m(a, prop, b[prop]);
35345
35410
  }
35346
35411
  return a;
35347
35412
  };
35348
- var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
35349
- var __async$C = (__this, __arguments, generator) => {
35413
+ var __spreadProps$j = (a, b) => __defProps$j(a, __getOwnPropDescs$j(b));
35414
+ var __async$E = (__this, __arguments, generator) => {
35350
35415
  return new Promise((resolve, reject) => {
35351
35416
  var fulfilled = (value) => {
35352
35417
  try {
@@ -35368,8 +35433,8 @@ var __async$C = (__this, __arguments, generator) => {
35368
35433
  };
35369
35434
  const useUpdateConnectionsCarrierSettings = (params) => {
35370
35435
  const { client } = useShipEngine();
35371
- return reactQuery.useMutation(__spreadProps$g(__spreadValues$j({}, params), {
35372
- mutationFn: (_0) => __async$C(void 0, [_0], function* ({
35436
+ return reactQuery.useMutation(__spreadProps$j(__spreadValues$m({}, params), {
35437
+ mutationFn: (_0) => __async$E(void 0, [_0], function* ({
35373
35438
  carrierName,
35374
35439
  carrierId,
35375
35440
  formData
@@ -35396,7 +35461,7 @@ const useListCustomPackageTypes = () => {
35396
35461
  });
35397
35462
  };
35398
35463
 
35399
- var __async$B = (__this, __arguments, generator) => {
35464
+ var __async$D = (__this, __arguments, generator) => {
35400
35465
  return new Promise((resolve, reject) => {
35401
35466
  var fulfilled = (value) => {
35402
35467
  try {
@@ -35419,7 +35484,7 @@ var __async$B = (__this, __arguments, generator) => {
35419
35484
  const useCreateFundingSource = () => {
35420
35485
  const { client } = useShipEngine();
35421
35486
  return reactQuery.useMutation({
35422
- mutationFn: (fundingSource) => __async$B(void 0, null, function* () {
35487
+ mutationFn: (fundingSource) => __async$D(void 0, null, function* () {
35423
35488
  const result = yield client.fundingSources.create(fundingSource);
35424
35489
  return result.data;
35425
35490
  }),
@@ -35428,7 +35493,7 @@ const useCreateFundingSource = () => {
35428
35493
  });
35429
35494
  };
35430
35495
 
35431
- var __async$A = (__this, __arguments, generator) => {
35496
+ var __async$C = (__this, __arguments, generator) => {
35432
35497
  return new Promise((resolve, reject) => {
35433
35498
  var fulfilled = (value) => {
35434
35499
  try {
@@ -35451,7 +35516,7 @@ var __async$A = (__this, __arguments, generator) => {
35451
35516
  const useFundingSourcesAddFunds = () => {
35452
35517
  const { client } = useShipEngine();
35453
35518
  return reactQuery.useMutation({
35454
- mutationFn: (_0) => __async$A(void 0, [_0], function* ({ funds, fundingSourceId }) {
35519
+ mutationFn: (_0) => __async$C(void 0, [_0], function* ({ funds, fundingSourceId }) {
35455
35520
  const result = yield client.fundingSources.addFunds(funds, fundingSourceId);
35456
35521
  return result.data;
35457
35522
  }),
@@ -35480,7 +35545,7 @@ const useListFundingSources = () => {
35480
35545
  });
35481
35546
  };
35482
35547
 
35483
- var __async$z = (__this, __arguments, generator) => {
35548
+ var __async$B = (__this, __arguments, generator) => {
35484
35549
  return new Promise((resolve, reject) => {
35485
35550
  var fulfilled = (value) => {
35486
35551
  try {
@@ -35503,7 +35568,7 @@ var __async$z = (__this, __arguments, generator) => {
35503
35568
  const useRegisterCarrier = () => {
35504
35569
  const { client } = useShipEngine();
35505
35570
  return reactQuery.useMutation({
35506
- mutationFn: (carrier) => __async$z(void 0, null, function* () {
35571
+ mutationFn: (carrier) => __async$B(void 0, null, function* () {
35507
35572
  const result = yield client.fundingSources.registerCarrier(carrier);
35508
35573
  return result.data;
35509
35574
  }),
@@ -35512,7 +35577,7 @@ const useRegisterCarrier = () => {
35512
35577
  });
35513
35578
  };
35514
35579
 
35515
- var __async$y = (__this, __arguments, generator) => {
35580
+ var __async$A = (__this, __arguments, generator) => {
35516
35581
  return new Promise((resolve, reject) => {
35517
35582
  var fulfilled = (value) => {
35518
35583
  try {
@@ -35535,7 +35600,7 @@ var __async$y = (__this, __arguments, generator) => {
35535
35600
  const useUpdateFundingSource = () => {
35536
35601
  const { client } = useShipEngine();
35537
35602
  return reactQuery.useMutation({
35538
- mutationFn: (_0) => __async$y(void 0, [_0], function* ({
35603
+ mutationFn: (_0) => __async$A(void 0, [_0], function* ({
35539
35604
  billingInfo,
35540
35605
  creditCardInfo,
35541
35606
  fundingSourceId
@@ -35574,29 +35639,29 @@ const useGetFundingSourceTransactions = (fundingSourceId, params) => {
35574
35639
  });
35575
35640
  };
35576
35641
 
35577
- var __defProp$i = Object.defineProperty;
35578
- var __defProps$f = Object.defineProperties;
35579
- var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
35580
- var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
35581
- var __hasOwnProp$p = Object.prototype.hasOwnProperty;
35582
- var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
35583
- var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35584
- var __spreadValues$i = (a, b) => {
35642
+ var __defProp$l = Object.defineProperty;
35643
+ var __defProps$i = Object.defineProperties;
35644
+ var __getOwnPropDescs$i = Object.getOwnPropertyDescriptors;
35645
+ var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
35646
+ var __hasOwnProp$s = Object.prototype.hasOwnProperty;
35647
+ var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
35648
+ var __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35649
+ var __spreadValues$l = (a, b) => {
35585
35650
  for (var prop in b || (b = {}))
35586
- if (__hasOwnProp$p.call(b, prop))
35587
- __defNormalProp$i(a, prop, b[prop]);
35588
- if (__getOwnPropSymbols$p)
35589
- for (var prop of __getOwnPropSymbols$p(b)) {
35590
- if (__propIsEnum$p.call(b, prop))
35591
- __defNormalProp$i(a, prop, b[prop]);
35651
+ if (__hasOwnProp$s.call(b, prop))
35652
+ __defNormalProp$l(a, prop, b[prop]);
35653
+ if (__getOwnPropSymbols$s)
35654
+ for (var prop of __getOwnPropSymbols$s(b)) {
35655
+ if (__propIsEnum$s.call(b, prop))
35656
+ __defNormalProp$l(a, prop, b[prop]);
35592
35657
  }
35593
35658
  return a;
35594
35659
  };
35595
- var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
35660
+ var __spreadProps$i = (a, b) => __defProps$i(a, __getOwnPropDescs$i(b));
35596
35661
  const useGetInsuranceFundingSourceAcceptedTerms = (params) => {
35597
35662
  const { client } = useShipEngine();
35598
- const queryParams = __spreadValues$i({}, params);
35599
- return reactQuery.useQuery(__spreadProps$f(__spreadValues$i({}, queryParams), {
35663
+ const queryParams = __spreadValues$l({}, params);
35664
+ return reactQuery.useQuery(__spreadProps$i(__spreadValues$l({}, queryParams), {
35600
35665
  onError,
35601
35666
  queryFn: () => client.fundingSources.insuranceAcceptedTerms(),
35602
35667
  queryKey: ["useGetInsuranceFundingSourceAcceptedTerms"],
@@ -35619,22 +35684,22 @@ const useGetInsuranceAccount = (insuranceProvider) => {
35619
35684
  });
35620
35685
  };
35621
35686
 
35622
- var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
35623
- var __hasOwnProp$o = Object.prototype.hasOwnProperty;
35624
- var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
35687
+ var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
35688
+ var __hasOwnProp$r = Object.prototype.hasOwnProperty;
35689
+ var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
35625
35690
  var __objRest$g = (source, exclude) => {
35626
35691
  var target = {};
35627
35692
  for (var prop in source)
35628
- if (__hasOwnProp$o.call(source, prop) && exclude.indexOf(prop) < 0)
35693
+ if (__hasOwnProp$r.call(source, prop) && exclude.indexOf(prop) < 0)
35629
35694
  target[prop] = source[prop];
35630
- if (source != null && __getOwnPropSymbols$o)
35631
- for (var prop of __getOwnPropSymbols$o(source)) {
35632
- if (exclude.indexOf(prop) < 0 && __propIsEnum$o.call(source, prop))
35695
+ if (source != null && __getOwnPropSymbols$r)
35696
+ for (var prop of __getOwnPropSymbols$r(source)) {
35697
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$r.call(source, prop))
35633
35698
  target[prop] = source[prop];
35634
35699
  }
35635
35700
  return target;
35636
35701
  };
35637
- var __async$x = (__this, __arguments, generator) => {
35702
+ var __async$z = (__this, __arguments, generator) => {
35638
35703
  return new Promise((resolve, reject) => {
35639
35704
  var fulfilled = (value) => {
35640
35705
  try {
@@ -35657,7 +35722,7 @@ var __async$x = (__this, __arguments, generator) => {
35657
35722
  const useAddInsuranceFunds = () => {
35658
35723
  const { client } = useShipEngine();
35659
35724
  return reactQuery.useMutation({
35660
- mutationFn: (_a) => __async$x(void 0, null, function* () {
35725
+ mutationFn: (_a) => __async$z(void 0, null, function* () {
35661
35726
  var _b = _a, { insuranceProvider } = _b, rest = __objRest$g(_b, ["insuranceProvider"]);
35662
35727
  const result = yield client.insurance.addFunds(insuranceProvider, rest);
35663
35728
  return result.data;
@@ -35667,6 +35732,137 @@ const useAddInsuranceFunds = () => {
35667
35732
  });
35668
35733
  };
35669
35734
 
35735
+ var __defProp$k = Object.defineProperty;
35736
+ var __defProps$h = Object.defineProperties;
35737
+ var __getOwnPropDescs$h = Object.getOwnPropertyDescriptors;
35738
+ var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
35739
+ var __hasOwnProp$q = Object.prototype.hasOwnProperty;
35740
+ var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
35741
+ var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35742
+ var __spreadValues$k = (a, b) => {
35743
+ for (var prop in b || (b = {}))
35744
+ if (__hasOwnProp$q.call(b, prop))
35745
+ __defNormalProp$k(a, prop, b[prop]);
35746
+ if (__getOwnPropSymbols$q)
35747
+ for (var prop of __getOwnPropSymbols$q(b)) {
35748
+ if (__propIsEnum$q.call(b, prop))
35749
+ __defNormalProp$k(a, prop, b[prop]);
35750
+ }
35751
+ return a;
35752
+ };
35753
+ var __spreadProps$h = (a, b) => __defProps$h(a, __getOwnPropDescs$h(b));
35754
+ var __async$y = (__this, __arguments, generator) => {
35755
+ return new Promise((resolve, reject) => {
35756
+ var fulfilled = (value) => {
35757
+ try {
35758
+ step(generator.next(value));
35759
+ } catch (e) {
35760
+ reject(e);
35761
+ }
35762
+ };
35763
+ var rejected = (value) => {
35764
+ try {
35765
+ step(generator.throw(value));
35766
+ } catch (e) {
35767
+ reject(e);
35768
+ }
35769
+ };
35770
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
35771
+ step((generator = generator.apply(__this, __arguments)).next());
35772
+ });
35773
+ };
35774
+ const useCreateInvoiceAddress = (params) => {
35775
+ const { client } = useShipEngine();
35776
+ return reactQuery.useMutation(__spreadProps$h(__spreadValues$k({}, params), {
35777
+ mutationFn: (invoiceAddress) => __async$y(void 0, null, function* () {
35778
+ const result = yield client.invoiceAddress.create(invoiceAddress);
35779
+ return result.data;
35780
+ }),
35781
+ mutationKey: ["useCreateInvoiceAddress"],
35782
+ onError
35783
+ }));
35784
+ };
35785
+
35786
+ var __defProp$j = Object.defineProperty;
35787
+ var __defProps$g = Object.defineProperties;
35788
+ var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
35789
+ var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
35790
+ var __hasOwnProp$p = Object.prototype.hasOwnProperty;
35791
+ var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
35792
+ var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35793
+ var __spreadValues$j = (a, b) => {
35794
+ for (var prop in b || (b = {}))
35795
+ if (__hasOwnProp$p.call(b, prop))
35796
+ __defNormalProp$j(a, prop, b[prop]);
35797
+ if (__getOwnPropSymbols$p)
35798
+ for (var prop of __getOwnPropSymbols$p(b)) {
35799
+ if (__propIsEnum$p.call(b, prop))
35800
+ __defNormalProp$j(a, prop, b[prop]);
35801
+ }
35802
+ return a;
35803
+ };
35804
+ var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
35805
+ var __async$x = (__this, __arguments, generator) => {
35806
+ return new Promise((resolve, reject) => {
35807
+ var fulfilled = (value) => {
35808
+ try {
35809
+ step(generator.next(value));
35810
+ } catch (e) {
35811
+ reject(e);
35812
+ }
35813
+ };
35814
+ var rejected = (value) => {
35815
+ try {
35816
+ step(generator.throw(value));
35817
+ } catch (e) {
35818
+ reject(e);
35819
+ }
35820
+ };
35821
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
35822
+ step((generator = generator.apply(__this, __arguments)).next());
35823
+ });
35824
+ };
35825
+ const useUpdateInvoiceAddress = (params) => {
35826
+ const { client } = useShipEngine();
35827
+ return reactQuery.useMutation(__spreadProps$g(__spreadValues$j({}, params), {
35828
+ mutationFn: (invoiceAddress) => __async$x(void 0, null, function* () {
35829
+ const result = yield client.invoiceAddress.update(invoiceAddress);
35830
+ return result.data;
35831
+ }),
35832
+ mutationKey: ["useUpdateInvoiceAddress"],
35833
+ onError
35834
+ }));
35835
+ };
35836
+
35837
+ var __defProp$i = Object.defineProperty;
35838
+ var __defProps$f = Object.defineProperties;
35839
+ var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
35840
+ var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
35841
+ var __hasOwnProp$o = Object.prototype.hasOwnProperty;
35842
+ var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
35843
+ var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35844
+ var __spreadValues$i = (a, b) => {
35845
+ for (var prop in b || (b = {}))
35846
+ if (__hasOwnProp$o.call(b, prop))
35847
+ __defNormalProp$i(a, prop, b[prop]);
35848
+ if (__getOwnPropSymbols$o)
35849
+ for (var prop of __getOwnPropSymbols$o(b)) {
35850
+ if (__propIsEnum$o.call(b, prop))
35851
+ __defNormalProp$i(a, prop, b[prop]);
35852
+ }
35853
+ return a;
35854
+ };
35855
+ var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
35856
+ const useGetInvoiceAddress = (params) => {
35857
+ const { client } = useShipEngine();
35858
+ return reactQuery.useQuery(__spreadProps$f(__spreadValues$i({}, params), {
35859
+ onError,
35860
+ queryFn: () => client.invoiceAddress.get(),
35861
+ queryKey: ["useGetInvoiceAddress"],
35862
+ select: (result) => result.data
35863
+ }));
35864
+ };
35865
+
35670
35866
  var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
35671
35867
  var __hasOwnProp$n = Object.prototype.hasOwnProperty;
35672
35868
  var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
@@ -36218,10 +36414,12 @@ const useRatesEstimate = () => {
36218
36414
  });
36219
36415
  };
36220
36416
 
36221
- const useGetSalesOrder = (salesOrderId) => {
36417
+ const useGetSalesOrder = (salesOrderId, config) => {
36418
+ var _a;
36222
36419
  const { client } = useShipEngine();
36420
+ const enabled = (_a = config == null ? void 0 : config.enabled) != null ? _a : true;
36223
36421
  return reactQuery.useQuery({
36224
- enabled: salesOrderId !== void 0,
36422
+ enabled: salesOrderId !== void 0 && enabled,
36225
36423
  onError,
36226
36424
  queryFn: () => {
36227
36425
  if (salesOrderId)
@@ -36233,6 +36431,23 @@ const useGetSalesOrder = (salesOrderId) => {
36233
36431
  });
36234
36432
  };
36235
36433
 
36434
+ const useGetSalesOrderByExternalOrderId = (externalOrderId, config) => {
36435
+ var _a;
36436
+ const { client } = useShipEngine();
36437
+ const enabled = (_a = config == null ? void 0 : config.enabled) != null ? _a : true;
36438
+ return reactQuery.useQuery({
36439
+ enabled: externalOrderId !== void 0 && enabled,
36440
+ onError,
36441
+ queryFn: () => {
36442
+ if (externalOrderId)
36443
+ return client.salesOrders.getByExternalId(externalOrderId);
36444
+ return Promise.reject(new Error("externalOrderId is required"));
36445
+ },
36446
+ queryKey: ["useGetSalesOrderByExternalOrderId", externalOrderId],
36447
+ select: (result) => result.data
36448
+ });
36449
+ };
36450
+
36236
36451
  const useListSalesOrders = (params = {}) => {
36237
36452
  const { client } = useShipEngine();
36238
36453
  return reactQuery.useQuery({
@@ -36355,13 +36570,14 @@ const useGetSalesOrderShipment = (shipmentId) => {
36355
36570
  });
36356
36571
  };
36357
36572
 
36358
- const useListSalesOrderShipments = (params) => {
36573
+ const useListSalesOrderShipments = (body) => {
36359
36574
  const { client } = useShipEngine();
36575
+ const { shipmentIds, salesOrderIds, externalOrderIds } = body;
36360
36576
  return reactQuery.useQuery({
36361
- enabled: params && Object.values(params).some((v) => v !== void 0),
36577
+ enabled: !!((shipmentIds == null ? void 0 : shipmentIds.length) || (salesOrderIds == null ? void 0 : salesOrderIds.length) || (externalOrderIds == null ? void 0 : externalOrderIds.length)),
36362
36578
  onError,
36363
- queryFn: () => client.salesOrderShipments.list(params),
36364
- queryKey: ["useListSalesOrderShipments", params],
36579
+ queryFn: () => client.salesOrderShipments.list(body),
36580
+ queryKey: ["useListSalesOrderShipments", body],
36365
36581
  select: (result) => result.data.shipments
36366
36582
  });
36367
36583
  };
@@ -36414,6 +36630,17 @@ const useUpdateSalesOrderShipment = () => {
36414
36630
  });
36415
36631
  };
36416
36632
 
36633
+ const useListSalesOrderShipmentsByExternalOrderId = (externalOrderId) => {
36634
+ const { client } = useShipEngine();
36635
+ return reactQuery.useQuery({
36636
+ enabled: externalOrderId !== null && externalOrderId.length > 0,
36637
+ onError,
36638
+ queryFn: () => client.salesOrderShipments.listShipmentsByExternalOrderId(externalOrderId),
36639
+ queryKey: ["useListSalesOrderShipments", externalOrderId],
36640
+ select: (result) => result.data.shipments
36641
+ });
36642
+ };
36643
+
36417
36644
  var __defProp$f = Object.defineProperty;
36418
36645
  var __defProps$c = Object.defineProperties;
36419
36646
  var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
@@ -38750,6 +38977,7 @@ exports.ErrorBoundary = ErrorBoundary;
38750
38977
  exports.FundingSourcesAPI = FundingSourcesAPI;
38751
38978
  exports.InsuranceAPI = InsuranceAPI;
38752
38979
  exports.InsuranceProviderType = InsuranceProviderType;
38980
+ exports.InvoiceAddressAPI = InvoiceAddressAPI;
38753
38981
  exports.LabelsAPI = LabelsAPI;
38754
38982
  exports.MetadataCapability = MetadataCapability;
38755
38983
  exports.MetadataRequirement = MetadataRequirement;
@@ -38798,6 +39026,7 @@ exports.useConnectCarrier = useConnectCarrier;
38798
39026
  exports.useConnectCarrierAccount = useConnectCarrierAccount;
38799
39027
  exports.useCreateAccountImage = useCreateAccountImage;
38800
39028
  exports.useCreateFundingSource = useCreateFundingSource;
39029
+ exports.useCreateInvoiceAddress = useCreateInvoiceAddress;
38801
39030
  exports.useCreateLabel = useCreateLabel;
38802
39031
  exports.useCreateRateCard = useCreateRateCard;
38803
39032
  exports.useCreateSalesOrderShipment = useCreateSalesOrderShipment;
@@ -38833,10 +39062,12 @@ exports.useGetFundingSourceTransactions = useGetFundingSourceTransactions;
38833
39062
  exports.useGetHereToken = useGetHereToken;
38834
39063
  exports.useGetInsuranceAccount = useGetInsuranceAccount;
38835
39064
  exports.useGetInsuranceFundingSourceAcceptedTerms = useGetInsuranceFundingSourceAcceptedTerms;
39065
+ exports.useGetInvoiceAddress = useGetInvoiceAddress;
38836
39066
  exports.useGetLabel = useGetLabel;
38837
39067
  exports.useGetPackageRatingGroupByCarrier = useGetPackageRatingGroupByCarrier;
38838
39068
  exports.useGetRateCardById = useGetRateCardById;
38839
39069
  exports.useGetSalesOrder = useGetSalesOrder;
39070
+ exports.useGetSalesOrderByExternalOrderId = useGetSalesOrderByExternalOrderId;
38840
39071
  exports.useGetSalesOrderShipment = useGetSalesOrderShipment;
38841
39072
  exports.useGetServicePoint = useGetServicePoint;
38842
39073
  exports.useGetServicesByCarrier = useGetServicesByCarrier;
@@ -38857,6 +39088,7 @@ exports.useListOrderSources = useListOrderSources;
38857
39088
  exports.useListOrderSourcesConnections = useListOrderSourcesConnections;
38858
39089
  exports.useListRateCards = useListRateCards;
38859
39090
  exports.useListSalesOrderShipments = useListSalesOrderShipments;
39091
+ exports.useListSalesOrderShipmentsByExternalOrderId = useListSalesOrderShipmentsByExternalOrderId;
38860
39092
  exports.useListSalesOrders = useListSalesOrders;
38861
39093
  exports.useListSandboxSellerIds = useListSandboxSellerIds;
38862
39094
  exports.useListSellerApiKeys = useListSellerApiKeys;
@@ -38880,6 +39112,7 @@ exports.useUpdateAccountSettings = useUpdateAccountSettings;
38880
39112
  exports.useUpdateAutoFunding = useUpdateAutoFunding;
38881
39113
  exports.useUpdateConnectionsCarrierSettings = useUpdateConnectionsCarrierSettings;
38882
39114
  exports.useUpdateFundingSource = useUpdateFundingSource;
39115
+ exports.useUpdateInvoiceAddress = useUpdateInvoiceAddress;
38883
39116
  exports.useUpdateOrderSource = useUpdateOrderSource;
38884
39117
  exports.useUpdateRateCard = useUpdateRateCard;
38885
39118
  exports.useUpdateSalesOrderShipment = useUpdateSalesOrderShipment;