@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.mjs CHANGED
@@ -10790,17 +10790,17 @@ var AccountBillingPlanChangeType = /* @__PURE__ */ ((AccountBillingPlanChangeTyp
10790
10790
  return AccountBillingPlanChangeType2;
10791
10791
  })(AccountBillingPlanChangeType || {});
10792
10792
 
10793
- var __getOwnPropSymbols$E = Object.getOwnPropertySymbols;
10794
- var __hasOwnProp$E = Object.prototype.hasOwnProperty;
10795
- var __propIsEnum$E = Object.prototype.propertyIsEnumerable;
10793
+ var __getOwnPropSymbols$H = Object.getOwnPropertySymbols;
10794
+ var __hasOwnProp$H = Object.prototype.hasOwnProperty;
10795
+ var __propIsEnum$H = Object.prototype.propertyIsEnumerable;
10796
10796
  var __objRest$p = (source, exclude) => {
10797
10797
  var target = {};
10798
10798
  for (var prop in source)
10799
- if (__hasOwnProp$E.call(source, prop) && exclude.indexOf(prop) < 0)
10799
+ if (__hasOwnProp$H.call(source, prop) && exclude.indexOf(prop) < 0)
10800
10800
  target[prop] = source[prop];
10801
- if (source != null && __getOwnPropSymbols$E)
10802
- for (var prop of __getOwnPropSymbols$E(source)) {
10803
- if (exclude.indexOf(prop) < 0 && __propIsEnum$E.call(source, prop))
10801
+ if (source != null && __getOwnPropSymbols$H)
10802
+ for (var prop of __getOwnPropSymbols$H(source)) {
10803
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$H.call(source, prop))
10804
10804
  target[prop] = source[prop];
10805
10805
  }
10806
10806
  return target;
@@ -10933,17 +10933,17 @@ const types = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
10933
10933
  RateCardStatus
10934
10934
  }, Symbol.toStringTag, { value: 'Module' }));
10935
10935
 
10936
- var __getOwnPropSymbols$D = Object.getOwnPropertySymbols;
10937
- var __hasOwnProp$D = Object.prototype.hasOwnProperty;
10938
- var __propIsEnum$D = Object.prototype.propertyIsEnumerable;
10936
+ var __getOwnPropSymbols$G = Object.getOwnPropertySymbols;
10937
+ var __hasOwnProp$G = Object.prototype.hasOwnProperty;
10938
+ var __propIsEnum$G = Object.prototype.propertyIsEnumerable;
10939
10939
  var __objRest$o = (source, exclude) => {
10940
10940
  var target = {};
10941
10941
  for (var prop in source)
10942
- if (__hasOwnProp$D.call(source, prop) && exclude.indexOf(prop) < 0)
10942
+ if (__hasOwnProp$G.call(source, prop) && exclude.indexOf(prop) < 0)
10943
10943
  target[prop] = source[prop];
10944
- if (source != null && __getOwnPropSymbols$D)
10945
- for (var prop of __getOwnPropSymbols$D(source)) {
10946
- if (exclude.indexOf(prop) < 0 && __propIsEnum$D.call(source, prop))
10944
+ if (source != null && __getOwnPropSymbols$G)
10945
+ for (var prop of __getOwnPropSymbols$G(source)) {
10946
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$G.call(source, prop))
10947
10947
  target[prop] = source[prop];
10948
10948
  }
10949
10949
  return target;
@@ -13685,7 +13685,7 @@ var ipaddr = {
13685
13685
  }).call(commonjsGlobal);
13686
13686
  } (ipaddr));
13687
13687
 
13688
- var __async$U = (__this, __arguments, generator) => {
13688
+ var __async$X = (__this, __arguments, generator) => {
13689
13689
  return new Promise((resolve, reject) => {
13690
13690
  var fulfilled = (value) => {
13691
13691
  try {
@@ -13705,7 +13705,7 @@ var __async$U = (__this, __arguments, generator) => {
13705
13705
  step((generator = generator.apply(__this, __arguments)).next());
13706
13706
  });
13707
13707
  };
13708
- const getEndUserIpAddress = () => __async$U(void 0, null, function* () {
13708
+ const getEndUserIpAddress = () => __async$X(void 0, null, function* () {
13709
13709
  try {
13710
13710
  const response = yield axios.get("https://api.ipify.org/?format=json");
13711
13711
  if (response.data.ip && ipaddrExports.isValid(response.data.ip)) {
@@ -13748,38 +13748,38 @@ const decamelizeKeys = (obj, separator = "_") => {
13748
13748
  return obj;
13749
13749
  };
13750
13750
 
13751
- var __defProp$r = Object.defineProperty;
13752
- var __defProps$l = Object.defineProperties;
13753
- var __getOwnPropDescs$l = Object.getOwnPropertyDescriptors;
13754
- var __getOwnPropSymbols$C = Object.getOwnPropertySymbols;
13755
- var __hasOwnProp$C = Object.prototype.hasOwnProperty;
13756
- var __propIsEnum$C = Object.prototype.propertyIsEnumerable;
13757
- var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13758
- var __spreadValues$r = (a, b) => {
13751
+ var __defProp$u = Object.defineProperty;
13752
+ var __defProps$o = Object.defineProperties;
13753
+ var __getOwnPropDescs$o = Object.getOwnPropertyDescriptors;
13754
+ var __getOwnPropSymbols$F = Object.getOwnPropertySymbols;
13755
+ var __hasOwnProp$F = Object.prototype.hasOwnProperty;
13756
+ var __propIsEnum$F = Object.prototype.propertyIsEnumerable;
13757
+ var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13758
+ var __spreadValues$u = (a, b) => {
13759
13759
  for (var prop in b || (b = {}))
13760
- if (__hasOwnProp$C.call(b, prop))
13761
- __defNormalProp$r(a, prop, b[prop]);
13762
- if (__getOwnPropSymbols$C)
13763
- for (var prop of __getOwnPropSymbols$C(b)) {
13764
- if (__propIsEnum$C.call(b, prop))
13765
- __defNormalProp$r(a, prop, b[prop]);
13760
+ if (__hasOwnProp$F.call(b, prop))
13761
+ __defNormalProp$u(a, prop, b[prop]);
13762
+ if (__getOwnPropSymbols$F)
13763
+ for (var prop of __getOwnPropSymbols$F(b)) {
13764
+ if (__propIsEnum$F.call(b, prop))
13765
+ __defNormalProp$u(a, prop, b[prop]);
13766
13766
  }
13767
13767
  return a;
13768
13768
  };
13769
- var __spreadProps$l = (a, b) => __defProps$l(a, __getOwnPropDescs$l(b));
13769
+ var __spreadProps$o = (a, b) => __defProps$o(a, __getOwnPropDescs$o(b));
13770
13770
  var __objRest$n = (source, exclude) => {
13771
13771
  var target = {};
13772
13772
  for (var prop in source)
13773
- if (__hasOwnProp$C.call(source, prop) && exclude.indexOf(prop) < 0)
13773
+ if (__hasOwnProp$F.call(source, prop) && exclude.indexOf(prop) < 0)
13774
13774
  target[prop] = source[prop];
13775
- if (source != null && __getOwnPropSymbols$C)
13776
- for (var prop of __getOwnPropSymbols$C(source)) {
13777
- if (exclude.indexOf(prop) < 0 && __propIsEnum$C.call(source, prop))
13775
+ if (source != null && __getOwnPropSymbols$F)
13776
+ for (var prop of __getOwnPropSymbols$F(source)) {
13777
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$F.call(source, prop))
13778
13778
  target[prop] = source[prop];
13779
13779
  }
13780
13780
  return target;
13781
13781
  };
13782
- var __async$T = (__this, __arguments, generator) => {
13782
+ var __async$W = (__this, __arguments, generator) => {
13783
13783
  return new Promise((resolve, reject) => {
13784
13784
  var fulfilled = (value) => {
13785
13785
  try {
@@ -13819,12 +13819,12 @@ class CarriersAPI {
13819
13819
  /**
13820
13820
  * The `connect` method connects a carrier account to a user's ShipEngine account.
13821
13821
  */
13822
- this.connect = (_a) => __async$T(this, null, function* () {
13822
+ this.connect = (_a) => __async$W(this, null, function* () {
13823
13823
  var _b = _a, { carrierCode } = _b, connection = __objRest$n(_b, ["carrierCode"]);
13824
13824
  const endUserIpAddress = yield getEndUserIpAddress();
13825
13825
  if (!endUserIpAddress)
13826
13826
  return Promise.reject([new CodedError("Unable to get IP address")]);
13827
- return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$l(__spreadValues$r({}, connection), {
13827
+ return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$o(__spreadValues$u({}, connection), {
13828
13828
  endUserIpAddress
13829
13829
  }));
13830
13830
  });
@@ -13910,7 +13910,7 @@ class CarriersAPI {
13910
13910
  }
13911
13911
  }
13912
13912
 
13913
- var __async$S = (__this, __arguments, generator) => {
13913
+ var __async$V = (__this, __arguments, generator) => {
13914
13914
  return new Promise((resolve, reject) => {
13915
13915
  var fulfilled = (value) => {
13916
13916
  try {
@@ -13952,7 +13952,7 @@ class ConnectionsAPI {
13952
13952
  /**
13953
13953
  * The `connectCarrier` method connects a carrier to account.
13954
13954
  */
13955
- this.connectCarrier = (carrierName, formData) => __async$S(this, null, function* () {
13955
+ this.connectCarrier = (carrierName, formData) => __async$V(this, null, function* () {
13956
13956
  return yield this.client.post(
13957
13957
  `/v1/connections/carriers/${carrierName}`,
13958
13958
  formData,
@@ -16127,23 +16127,23 @@ class CustomPackagesAPI {
16127
16127
  }
16128
16128
  }
16129
16129
 
16130
- var __defProp$q = Object.defineProperty;
16131
- var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
16132
- var __hasOwnProp$B = Object.prototype.hasOwnProperty;
16133
- var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
16134
- var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16135
- var __spreadValues$q = (a, b) => {
16130
+ var __defProp$t = Object.defineProperty;
16131
+ var __getOwnPropSymbols$E = Object.getOwnPropertySymbols;
16132
+ var __hasOwnProp$E = Object.prototype.hasOwnProperty;
16133
+ var __propIsEnum$E = Object.prototype.propertyIsEnumerable;
16134
+ var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16135
+ var __spreadValues$t = (a, b) => {
16136
16136
  for (var prop in b || (b = {}))
16137
- if (__hasOwnProp$B.call(b, prop))
16138
- __defNormalProp$q(a, prop, b[prop]);
16139
- if (__getOwnPropSymbols$B)
16140
- for (var prop of __getOwnPropSymbols$B(b)) {
16141
- if (__propIsEnum$B.call(b, prop))
16142
- __defNormalProp$q(a, prop, b[prop]);
16137
+ if (__hasOwnProp$E.call(b, prop))
16138
+ __defNormalProp$t(a, prop, b[prop]);
16139
+ if (__getOwnPropSymbols$E)
16140
+ for (var prop of __getOwnPropSymbols$E(b)) {
16141
+ if (__propIsEnum$E.call(b, prop))
16142
+ __defNormalProp$t(a, prop, b[prop]);
16143
16143
  }
16144
16144
  return a;
16145
16145
  };
16146
- var __async$R = (__this, __arguments, generator) => {
16146
+ var __async$U = (__this, __arguments, generator) => {
16147
16147
  return new Promise((resolve, reject) => {
16148
16148
  var fulfilled = (value) => {
16149
16149
  try {
@@ -16182,12 +16182,12 @@ class FundingSourcesAPI {
16182
16182
  * The `create` method creates a new funding source for a given user. This requires
16183
16183
  * payment information to be collected from the user.
16184
16184
  */
16185
- this.create = (createFundingSource) => __async$R(this, null, function* () {
16185
+ this.create = (createFundingSource) => __async$U(this, null, function* () {
16186
16186
  const endUserIpAddress = yield getEndUserIpAddress();
16187
16187
  if (!endUserIpAddress) {
16188
16188
  return Promise.reject([new CodedError("Unable to get IP address")]);
16189
16189
  }
16190
- return yield this.client.post("/v1/funding_sources", __spreadValues$q({
16190
+ return yield this.client.post("/v1/funding_sources", __spreadValues$t({
16191
16191
  endUserIpAddress
16192
16192
  }, createFundingSource));
16193
16193
  });
@@ -16196,7 +16196,7 @@ class FundingSourcesAPI {
16196
16196
  * user to update the billing address or payment information associated with the
16197
16197
  * funding source.
16198
16198
  */
16199
- this.update = (billingInfo, creditCardInfo, fundingSourceId) => __async$R(this, null, function* () {
16199
+ this.update = (billingInfo, creditCardInfo, fundingSourceId) => __async$U(this, null, function* () {
16200
16200
  const endUserIpAddress = yield getEndUserIpAddress();
16201
16201
  if (!endUserIpAddress) {
16202
16202
  return Promise.reject([new CodedError("Unable to get IP address")]);
@@ -16214,19 +16214,19 @@ class FundingSourcesAPI {
16214
16214
  * The `registerCarrier` method registers a carrier account and associates
16215
16215
  * it with a given funding source.
16216
16216
  */
16217
- this.registerCarrier = (carrier) => __async$R(this, null, function* () {
16217
+ this.registerCarrier = (carrier) => __async$U(this, null, function* () {
16218
16218
  const endUserIpAddress = yield getEndUserIpAddress();
16219
16219
  if (!endUserIpAddress) {
16220
16220
  return Promise.reject([new CodedError("Unable to get IP address")]);
16221
16221
  }
16222
- return yield this.client.post("/v1/registration/funding_source", __spreadValues$q({
16222
+ return yield this.client.post("/v1/registration/funding_source", __spreadValues$t({
16223
16223
  endUserIpAddress
16224
16224
  }, carrier));
16225
16225
  });
16226
16226
  /**
16227
16227
  * The `addFunds` method allows you to add funds to a funding source.
16228
16228
  */
16229
- this.addFunds = (amount, fundingSourceId) => __async$R(this, null, function* () {
16229
+ this.addFunds = (amount, fundingSourceId) => __async$U(this, null, function* () {
16230
16230
  return yield this.client.put(
16231
16231
  `/v1/funding_sources/${fundingSourceId}/add_funds`,
16232
16232
  amount
@@ -16236,7 +16236,7 @@ class FundingSourcesAPI {
16236
16236
  * The `metadata` method returns seller-specific requirements for creating funding sources
16237
16237
  * and attaching carriers
16238
16238
  */
16239
- this.metadata = () => __async$R(this, null, function* () {
16239
+ this.metadata = () => __async$U(this, null, function* () {
16240
16240
  return yield this.client.get("/v1/funding_sources/metadata");
16241
16241
  });
16242
16242
  /**
@@ -16288,6 +16288,51 @@ class InsuranceAPI {
16288
16288
  }
16289
16289
  }
16290
16290
 
16291
+ var __async$T = (__this, __arguments, generator) => {
16292
+ return new Promise((resolve, reject) => {
16293
+ var fulfilled = (value) => {
16294
+ try {
16295
+ step(generator.next(value));
16296
+ } catch (e) {
16297
+ reject(e);
16298
+ }
16299
+ };
16300
+ var rejected = (value) => {
16301
+ try {
16302
+ step(generator.throw(value));
16303
+ } catch (e) {
16304
+ reject(e);
16305
+ }
16306
+ };
16307
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
16308
+ step((generator = generator.apply(__this, __arguments)).next());
16309
+ });
16310
+ };
16311
+ class InvoiceAddressAPI {
16312
+ constructor(client) {
16313
+ this.client = client;
16314
+ /**
16315
+ * The `get` method retrieves the invoice address for a given user.
16316
+ */
16317
+ this.get = () => {
16318
+ return this.client.get("/v1/invoice_address");
16319
+ };
16320
+ /**
16321
+ * The `create` method creates a new invoice address for a given user.
16322
+ */
16323
+ this.create = (invoiceAddress) => __async$T(this, null, function* () {
16324
+ return yield this.client.post("/v1/invoice_address", invoiceAddress);
16325
+ });
16326
+ /**
16327
+ * The `update` method updates a invoice address for a given user.
16328
+ */
16329
+ this.update = (invoiceAddress) => __async$T(this, null, function* () {
16330
+ return yield this.client.put("/v1/invoice_address", invoiceAddress);
16331
+ });
16332
+ this.client = client;
16333
+ }
16334
+ }
16335
+
16291
16336
  class LabelsAPI {
16292
16337
  constructor(client) {
16293
16338
  this.client = client;
@@ -16323,17 +16368,17 @@ class LabelsAPI {
16323
16368
  }
16324
16369
  }
16325
16370
 
16326
- var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
16327
- var __hasOwnProp$A = Object.prototype.hasOwnProperty;
16328
- var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
16371
+ var __getOwnPropSymbols$D = Object.getOwnPropertySymbols;
16372
+ var __hasOwnProp$D = Object.prototype.hasOwnProperty;
16373
+ var __propIsEnum$D = Object.prototype.propertyIsEnumerable;
16329
16374
  var __objRest$m = (source, exclude) => {
16330
16375
  var target = {};
16331
16376
  for (var prop in source)
16332
- if (__hasOwnProp$A.call(source, prop) && exclude.indexOf(prop) < 0)
16377
+ if (__hasOwnProp$D.call(source, prop) && exclude.indexOf(prop) < 0)
16333
16378
  target[prop] = source[prop];
16334
- if (source != null && __getOwnPropSymbols$A)
16335
- for (var prop of __getOwnPropSymbols$A(source)) {
16336
- if (exclude.indexOf(prop) < 0 && __propIsEnum$A.call(source, prop))
16379
+ if (source != null && __getOwnPropSymbols$D)
16380
+ for (var prop of __getOwnPropSymbols$D(source)) {
16381
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$D.call(source, prop))
16337
16382
  target[prop] = source[prop];
16338
16383
  }
16339
16384
  return target;
@@ -16454,19 +16499,19 @@ class RateCardsAPI {
16454
16499
  }
16455
16500
  }
16456
16501
 
16457
- var __defProp$p = Object.defineProperty;
16458
- var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
16459
- var __hasOwnProp$z = Object.prototype.hasOwnProperty;
16460
- var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
16461
- var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16462
- var __spreadValues$p = (a, b) => {
16502
+ var __defProp$s = Object.defineProperty;
16503
+ var __getOwnPropSymbols$C = Object.getOwnPropertySymbols;
16504
+ var __hasOwnProp$C = Object.prototype.hasOwnProperty;
16505
+ var __propIsEnum$C = Object.prototype.propertyIsEnumerable;
16506
+ var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16507
+ var __spreadValues$s = (a, b) => {
16463
16508
  for (var prop in b || (b = {}))
16464
- if (__hasOwnProp$z.call(b, prop))
16465
- __defNormalProp$p(a, prop, b[prop]);
16466
- if (__getOwnPropSymbols$z)
16467
- for (var prop of __getOwnPropSymbols$z(b)) {
16468
- if (__propIsEnum$z.call(b, prop))
16469
- __defNormalProp$p(a, prop, b[prop]);
16509
+ if (__hasOwnProp$C.call(b, prop))
16510
+ __defNormalProp$s(a, prop, b[prop]);
16511
+ if (__getOwnPropSymbols$C)
16512
+ for (var prop of __getOwnPropSymbols$C(b)) {
16513
+ if (__propIsEnum$C.call(b, prop))
16514
+ __defNormalProp$s(a, prop, b[prop]);
16470
16515
  }
16471
16516
  return a;
16472
16517
  };
@@ -16488,7 +16533,7 @@ class RatesAPI {
16488
16533
  * method.
16489
16534
  */
16490
16535
  this.estimate = (params) => {
16491
- return this.client.post("/v1/rates/estimate", __spreadValues$p({}, params));
16536
+ return this.client.post("/v1/rates/estimate", __spreadValues$s({}, params));
16492
16537
  };
16493
16538
  this.client = client;
16494
16539
  }
@@ -16500,10 +16545,14 @@ class SalesOrderShipmentsAPI {
16500
16545
  /**
16501
16546
  * The `list` method retrieves a list of sales order shipments for a given user.
16502
16547
  */
16503
- this.list = (body = {}, params) => {
16504
- return this.client.post("/v-beta/shipments/list", body, {
16505
- params
16506
- });
16548
+ this.list = (body) => {
16549
+ return this.client.post("/v-beta/shipments/list", body);
16550
+ };
16551
+ /**
16552
+ * The `listShipmentsByExternalOrderId` method retrieves a list of shipments associated to a sales order that matches `externalOrderId`
16553
+ */
16554
+ this.listShipmentsByExternalOrderId = (externalOrderId) => {
16555
+ return this.client.get(`/v-beta/shipments/external_order_id/${externalOrderId}`);
16507
16556
  };
16508
16557
  /**
16509
16558
  * The `get` method retrieves a specific sales order shipment by `shipmentId`.
@@ -16545,6 +16594,13 @@ class SalesOrdersAPI {
16545
16594
  this.get = (salesOrderId) => {
16546
16595
  return this.client.get(`/v-beta/sales_orders/${salesOrderId}`);
16547
16596
  };
16597
+ /**
16598
+ * The `getByExternalId` method retrieves a specific sales order by its `externalOrderId`.
16599
+ * @param externalOrderId Id that matches that of the desired sales order.
16600
+ */
16601
+ this.getByExternalId = (externalOrderId) => {
16602
+ return this.client.get(`/v-beta/sales_orders/external_order_id/${externalOrderId}`);
16603
+ };
16548
16604
  /**
16549
16605
  * The `notifyShipped` method notifies order source that the order has been
16550
16606
  * shipped. Typically, the order source will then notify the user based on
@@ -16557,7 +16613,7 @@ class SalesOrdersAPI {
16557
16613
  }
16558
16614
  }
16559
16615
 
16560
- var __async$Q = (__this, __arguments, generator) => {
16616
+ var __async$S = (__this, __arguments, generator) => {
16561
16617
  return new Promise((resolve, reject) => {
16562
16618
  var fulfilled = (value) => {
16563
16619
  try {
@@ -16615,7 +16671,7 @@ class SellersAPI {
16615
16671
  /**
16616
16672
  * Deletes an API Key
16617
16673
  */
16618
- this.deleteSellerApiKey = (_0) => __async$Q(this, [_0], function* ({
16674
+ this.deleteSellerApiKey = (_0) => __async$S(this, [_0], function* ({
16619
16675
  encryptedApiKey,
16620
16676
  sellerId,
16621
16677
  isSandbox
@@ -16661,19 +16717,19 @@ class SellersAPI {
16661
16717
  }
16662
16718
  }
16663
16719
 
16664
- var __defProp$o = Object.defineProperty;
16665
- var __getOwnPropSymbols$y = Object.getOwnPropertySymbols;
16666
- var __hasOwnProp$y = Object.prototype.hasOwnProperty;
16667
- var __propIsEnum$y = Object.prototype.propertyIsEnumerable;
16668
- var __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16669
- var __spreadValues$o = (a, b) => {
16720
+ var __defProp$r = Object.defineProperty;
16721
+ var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
16722
+ var __hasOwnProp$B = Object.prototype.hasOwnProperty;
16723
+ var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
16724
+ var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16725
+ var __spreadValues$r = (a, b) => {
16670
16726
  for (var prop in b || (b = {}))
16671
- if (__hasOwnProp$y.call(b, prop))
16672
- __defNormalProp$o(a, prop, b[prop]);
16673
- if (__getOwnPropSymbols$y)
16674
- for (var prop of __getOwnPropSymbols$y(b)) {
16675
- if (__propIsEnum$y.call(b, prop))
16676
- __defNormalProp$o(a, prop, b[prop]);
16727
+ if (__hasOwnProp$B.call(b, prop))
16728
+ __defNormalProp$r(a, prop, b[prop]);
16729
+ if (__getOwnPropSymbols$B)
16730
+ for (var prop of __getOwnPropSymbols$B(b)) {
16731
+ if (__propIsEnum$B.call(b, prop))
16732
+ __defNormalProp$r(a, prop, b[prop]);
16677
16733
  }
16678
16734
  return a;
16679
16735
  };
@@ -16685,7 +16741,7 @@ class ServicePointsAPI {
16685
16741
  * Either an address, coordinates, or an address query
16686
16742
  */
16687
16743
  this.list = (options) => {
16688
- return this.client.post("/v1/service_points/list", __spreadValues$o({}, options));
16744
+ return this.client.post("/v1/service_points/list", __spreadValues$r({}, options));
16689
16745
  };
16690
16746
  /**
16691
16747
  * Get a specific service point by its carrier code, country code, and id
@@ -16703,7 +16759,7 @@ class ServicePointsAPI {
16703
16759
  }
16704
16760
  }
16705
16761
 
16706
- var __async$P = (__this, __arguments, generator) => {
16762
+ var __async$R = (__this, __arguments, generator) => {
16707
16763
  return new Promise((resolve, reject) => {
16708
16764
  var fulfilled = (value) => {
16709
16765
  try {
@@ -16752,7 +16808,7 @@ class ShipmentsAPI {
16752
16808
  * The `create` method allows for creating shipments based on a list of shipment
16753
16809
  * items passed into this method.
16754
16810
  */
16755
- this.create = (...shipments) => __async$P(this, null, function* () {
16811
+ this.create = (...shipments) => __async$R(this, null, function* () {
16756
16812
  return this.client.post("/v1/shipments", {
16757
16813
  shipments
16758
16814
  });
@@ -34144,26 +34200,26 @@ class WebhooksAPI {
34144
34200
  }
34145
34201
  }
34146
34202
 
34147
- var __defProp$n = Object.defineProperty;
34148
- var __defProps$k = Object.defineProperties;
34149
- var __getOwnPropDescs$k = Object.getOwnPropertyDescriptors;
34150
- var __getOwnPropSymbols$x = Object.getOwnPropertySymbols;
34151
- var __hasOwnProp$x = Object.prototype.hasOwnProperty;
34152
- var __propIsEnum$x = Object.prototype.propertyIsEnumerable;
34153
- var __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
34154
- var __spreadValues$n = (a, b) => {
34203
+ var __defProp$q = Object.defineProperty;
34204
+ var __defProps$n = Object.defineProperties;
34205
+ var __getOwnPropDescs$n = Object.getOwnPropertyDescriptors;
34206
+ var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
34207
+ var __hasOwnProp$A = Object.prototype.hasOwnProperty;
34208
+ var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
34209
+ var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
34210
+ var __spreadValues$q = (a, b) => {
34155
34211
  for (var prop in b || (b = {}))
34156
- if (__hasOwnProp$x.call(b, prop))
34157
- __defNormalProp$n(a, prop, b[prop]);
34158
- if (__getOwnPropSymbols$x)
34159
- for (var prop of __getOwnPropSymbols$x(b)) {
34160
- if (__propIsEnum$x.call(b, prop))
34161
- __defNormalProp$n(a, prop, b[prop]);
34212
+ if (__hasOwnProp$A.call(b, prop))
34213
+ __defNormalProp$q(a, prop, b[prop]);
34214
+ if (__getOwnPropSymbols$A)
34215
+ for (var prop of __getOwnPropSymbols$A(b)) {
34216
+ if (__propIsEnum$A.call(b, prop))
34217
+ __defNormalProp$q(a, prop, b[prop]);
34162
34218
  }
34163
34219
  return a;
34164
34220
  };
34165
- var __spreadProps$k = (a, b) => __defProps$k(a, __getOwnPropDescs$k(b));
34166
- var __async$O = (__this, __arguments, generator) => {
34221
+ var __spreadProps$n = (a, b) => __defProps$n(a, __getOwnPropDescs$n(b));
34222
+ var __async$Q = (__this, __arguments, generator) => {
34167
34223
  return new Promise((resolve, reject) => {
34168
34224
  var fulfilled = (value) => {
34169
34225
  try {
@@ -34186,7 +34242,7 @@ var __async$O = (__this, __arguments, generator) => {
34186
34242
  const logger$1 = E({
34187
34243
  level: process.env.NODE_ENV === "production" ? "fatal" : "info",
34188
34244
  name: "shipengine-api",
34189
- serializers: __spreadProps$k(__spreadValues$n({}, k), {
34245
+ serializers: __spreadProps$n(__spreadValues$q({}, k), {
34190
34246
  req: (req) => ({
34191
34247
  headers: req.headers,
34192
34248
  method: req.method,
@@ -34211,7 +34267,7 @@ class ShipEngineAPI {
34211
34267
  this.getSandboxToken = getSandboxToken;
34212
34268
  const client = axios.create({
34213
34269
  baseURL,
34214
- headers: __spreadProps$k(__spreadValues$n({}, headers), {
34270
+ headers: __spreadProps$n(__spreadValues$q({}, headers), {
34215
34271
  "Content-Type": "application/json"
34216
34272
  }),
34217
34273
  paramsSerializer: (params) => lib.stringify(decamelizeKeys(params), { arrayFormat: "brackets" }),
@@ -34246,7 +34302,7 @@ class ShipEngineAPI {
34246
34302
  });
34247
34303
  client.defaults.headers.common["Authorization"] = `Bearer ${token}`;
34248
34304
  client.interceptors.request.use(
34249
- (config) => __async$O(this, null, function* () {
34305
+ (config) => __async$Q(this, null, function* () {
34250
34306
  if (config.isSandbox) {
34251
34307
  if (!this.sandboxToken) {
34252
34308
  this.sandboxToken = yield getSandboxToken == null ? void 0 : getSandboxToken();
@@ -34273,7 +34329,7 @@ class ShipEngineAPI {
34273
34329
  );
34274
34330
  return res;
34275
34331
  },
34276
- (err) => __async$O(this, null, function* () {
34332
+ (err) => __async$Q(this, null, function* () {
34277
34333
  var _a, _b, _c, _d, _e;
34278
34334
  logger$1.error(
34279
34335
  { err, req: err.config, res: err.response },
@@ -34320,7 +34376,7 @@ class ShipEngineAPI {
34320
34376
  * that token (also known as Seller ID)
34321
34377
  */
34322
34378
  getTenant(isSandbox) {
34323
- return __async$O(this, null, function* () {
34379
+ return __async$Q(this, null, function* () {
34324
34380
  var _a;
34325
34381
  if (!isSandbox) {
34326
34382
  return this.getTenantFromToken(this.token);
@@ -34411,6 +34467,15 @@ class ShipEngineAPI {
34411
34467
  get insurance() {
34412
34468
  return new InsuranceAPI(this.client);
34413
34469
  }
34470
+ /**
34471
+ * The `invoiceAddress` method provides access to the Invoice Address endpoints
34472
+ * in ShipEngine API.
34473
+ *
34474
+ * @see {@link InvoiceAddress | The Invoice Address API module}
34475
+ */
34476
+ get invoiceAddress() {
34477
+ return new InvoiceAddressAPI(this.client);
34478
+ }
34414
34479
  /**
34415
34480
  * The `labels` method provides access to the Label endpoints in ShipEngine API.
34416
34481
  * e.g. Create Label, Get Label, Void Label, etc.
@@ -34590,25 +34655,25 @@ const delay = (ms) => new Promise((resolve) => {
34590
34655
 
34591
34656
  const onError = (_errors) => _default();
34592
34657
 
34593
- var __defProp$m = Object.defineProperty;
34594
- var __defProps$j = Object.defineProperties;
34595
- var __getOwnPropDescs$j = Object.getOwnPropertyDescriptors;
34596
- var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
34597
- var __hasOwnProp$w = Object.prototype.hasOwnProperty;
34598
- var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
34599
- var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
34600
- var __spreadValues$m = (a, b) => {
34658
+ var __defProp$p = Object.defineProperty;
34659
+ var __defProps$m = Object.defineProperties;
34660
+ var __getOwnPropDescs$m = Object.getOwnPropertyDescriptors;
34661
+ var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
34662
+ var __hasOwnProp$z = Object.prototype.hasOwnProperty;
34663
+ var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
34664
+ var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
34665
+ var __spreadValues$p = (a, b) => {
34601
34666
  for (var prop in b || (b = {}))
34602
- if (__hasOwnProp$w.call(b, prop))
34603
- __defNormalProp$m(a, prop, b[prop]);
34604
- if (__getOwnPropSymbols$w)
34605
- for (var prop of __getOwnPropSymbols$w(b)) {
34606
- if (__propIsEnum$w.call(b, prop))
34607
- __defNormalProp$m(a, prop, b[prop]);
34667
+ if (__hasOwnProp$z.call(b, prop))
34668
+ __defNormalProp$p(a, prop, b[prop]);
34669
+ if (__getOwnPropSymbols$z)
34670
+ for (var prop of __getOwnPropSymbols$z(b)) {
34671
+ if (__propIsEnum$z.call(b, prop))
34672
+ __defNormalProp$p(a, prop, b[prop]);
34608
34673
  }
34609
34674
  return a;
34610
34675
  };
34611
- var __spreadProps$j = (a, b) => __defProps$j(a, __getOwnPropDescs$j(b));
34676
+ var __spreadProps$m = (a, b) => __defProps$m(a, __getOwnPropDescs$m(b));
34612
34677
  const streams = [];
34613
34678
  if (process.env.NODE_ENV === "production") {
34614
34679
  streams.push({
@@ -34617,7 +34682,7 @@ if (process.env.NODE_ENV === "production") {
34617
34682
  }
34618
34683
  const logger = E({
34619
34684
  name: "shipengine",
34620
- serializers: __spreadProps$j(__spreadValues$m({}, k), {
34685
+ serializers: __spreadProps$m(__spreadValues$p({}, k), {
34621
34686
  req: (req) => ({
34622
34687
  headers: req.headers,
34623
34688
  method: req.method,
@@ -34642,7 +34707,7 @@ const retryUntil = (callbackFn, retries = 10, timeoutBetweenAttempts = 1e3) => P
34642
34707
  throw error;
34643
34708
  });
34644
34709
 
34645
- var __async$N = (__this, __arguments, generator) => {
34710
+ var __async$P = (__this, __arguments, generator) => {
34646
34711
  return new Promise((resolve, reject) => {
34647
34712
  var fulfilled = (value) => {
34648
34713
  try {
@@ -34665,7 +34730,7 @@ var __async$N = (__this, __arguments, generator) => {
34665
34730
  const useCreateAccountImage = () => {
34666
34731
  const { client } = useShipEngine();
34667
34732
  return useMutation({
34668
- mutationFn: (data) => __async$N(void 0, null, function* () {
34733
+ mutationFn: (data) => __async$P(void 0, null, function* () {
34669
34734
  const result = yield client.accountSettings.createImage(data);
34670
34735
  return result.data;
34671
34736
  }),
@@ -34674,7 +34739,7 @@ const useCreateAccountImage = () => {
34674
34739
  });
34675
34740
  };
34676
34741
 
34677
- var __async$M = (__this, __arguments, generator) => {
34742
+ var __async$O = (__this, __arguments, generator) => {
34678
34743
  return new Promise((resolve, reject) => {
34679
34744
  var fulfilled = (value) => {
34680
34745
  try {
@@ -34697,7 +34762,7 @@ var __async$M = (__this, __arguments, generator) => {
34697
34762
  const useDeleteAccountImage = () => {
34698
34763
  const { client } = useShipEngine();
34699
34764
  return useMutation({
34700
- mutationFn: (labelImageId) => __async$M(void 0, null, function* () {
34765
+ mutationFn: (labelImageId) => __async$O(void 0, null, function* () {
34701
34766
  const result = yield client.accountSettings.deleteImage(labelImageId);
34702
34767
  return result.data;
34703
34768
  }),
@@ -34726,7 +34791,7 @@ const useGetAccountSettings = () => {
34726
34791
  });
34727
34792
  };
34728
34793
 
34729
- var __async$L = (__this, __arguments, generator) => {
34794
+ var __async$N = (__this, __arguments, generator) => {
34730
34795
  return new Promise((resolve, reject) => {
34731
34796
  var fulfilled = (value) => {
34732
34797
  try {
@@ -34749,7 +34814,7 @@ var __async$L = (__this, __arguments, generator) => {
34749
34814
  const useUpdateAccountImage = () => {
34750
34815
  const { client } = useShipEngine();
34751
34816
  return useMutation({
34752
- mutationFn: (data) => __async$L(void 0, null, function* () {
34817
+ mutationFn: (data) => __async$N(void 0, null, function* () {
34753
34818
  const result = yield client.accountSettings.updateImage(data);
34754
34819
  return result.data;
34755
34820
  }),
@@ -34758,7 +34823,7 @@ const useUpdateAccountImage = () => {
34758
34823
  });
34759
34824
  };
34760
34825
 
34761
- var __async$K = (__this, __arguments, generator) => {
34826
+ var __async$M = (__this, __arguments, generator) => {
34762
34827
  return new Promise((resolve, reject) => {
34763
34828
  var fulfilled = (value) => {
34764
34829
  try {
@@ -34781,7 +34846,7 @@ var __async$K = (__this, __arguments, generator) => {
34781
34846
  const useUpdateAccountSettings = () => {
34782
34847
  const { client } = useShipEngine();
34783
34848
  return useMutation({
34784
- mutationFn: (settings) => __async$K(void 0, null, function* () {
34849
+ mutationFn: (settings) => __async$M(void 0, null, function* () {
34785
34850
  const result = yield client.accountSettings.update(settings);
34786
34851
  return result.data;
34787
34852
  }),
@@ -34790,7 +34855,7 @@ const useUpdateAccountSettings = () => {
34790
34855
  });
34791
34856
  };
34792
34857
 
34793
- var __async$J = (__this, __arguments, generator) => {
34858
+ var __async$L = (__this, __arguments, generator) => {
34794
34859
  return new Promise((resolve, reject) => {
34795
34860
  var fulfilled = (value) => {
34796
34861
  try {
@@ -34813,7 +34878,7 @@ var __async$J = (__this, __arguments, generator) => {
34813
34878
  const useParseAddress = () => {
34814
34879
  const { client } = useShipEngine();
34815
34880
  return useMutation({
34816
- mutationFn: (_0) => __async$J(void 0, [_0], function* ({ address, text }) {
34881
+ mutationFn: (_0) => __async$L(void 0, [_0], function* ({ address, text }) {
34817
34882
  const result = yield client.addresses.parse(text, address);
34818
34883
  return result.data;
34819
34884
  }),
@@ -34822,7 +34887,7 @@ const useParseAddress = () => {
34822
34887
  });
34823
34888
  };
34824
34889
 
34825
- var __async$I = (__this, __arguments, generator) => {
34890
+ var __async$K = (__this, __arguments, generator) => {
34826
34891
  return new Promise((resolve, reject) => {
34827
34892
  var fulfilled = (value) => {
34828
34893
  try {
@@ -34845,7 +34910,7 @@ var __async$I = (__this, __arguments, generator) => {
34845
34910
  const useValidateAddresses = () => {
34846
34911
  const { client } = useShipEngine();
34847
34912
  return useMutation({
34848
- mutationFn: (addresses) => __async$I(void 0, null, function* () {
34913
+ mutationFn: (addresses) => __async$K(void 0, null, function* () {
34849
34914
  const result = yield client.addresses.validate(addresses);
34850
34915
  return result.data;
34851
34916
  }),
@@ -34854,7 +34919,7 @@ const useValidateAddresses = () => {
34854
34919
  });
34855
34920
  };
34856
34921
 
34857
- var __async$H = (__this, __arguments, generator) => {
34922
+ var __async$J = (__this, __arguments, generator) => {
34858
34923
  return new Promise((resolve, reject) => {
34859
34924
  var fulfilled = (value) => {
34860
34925
  try {
@@ -34877,7 +34942,7 @@ var __async$H = (__this, __arguments, generator) => {
34877
34942
  const useAddFunds = () => {
34878
34943
  const { client } = useShipEngine();
34879
34944
  return useMutation({
34880
- mutationFn: (_0) => __async$H(void 0, [_0], function* ({ carrierId, funds }) {
34945
+ mutationFn: (_0) => __async$J(void 0, [_0], function* ({ carrierId, funds }) {
34881
34946
  const result = yield client.carriers.addFunds(carrierId, funds);
34882
34947
  return result.data;
34883
34948
  }),
@@ -34886,7 +34951,7 @@ const useAddFunds = () => {
34886
34951
  });
34887
34952
  };
34888
34953
 
34889
- var __async$G = (__this, __arguments, generator) => {
34954
+ var __async$I = (__this, __arguments, generator) => {
34890
34955
  return new Promise((resolve, reject) => {
34891
34956
  var fulfilled = (value) => {
34892
34957
  try {
@@ -34909,7 +34974,7 @@ var __async$G = (__this, __arguments, generator) => {
34909
34974
  const useConnectCarrier = () => {
34910
34975
  const { client } = useShipEngine();
34911
34976
  return useMutation({
34912
- mutationFn: (params) => __async$G(void 0, null, function* () {
34977
+ mutationFn: (params) => __async$I(void 0, null, function* () {
34913
34978
  const result = yield client.carriers.connect(params);
34914
34979
  return result.data;
34915
34980
  }),
@@ -35018,41 +35083,41 @@ const useGetServicesByCarrier = (carrierId) => {
35018
35083
  });
35019
35084
  };
35020
35085
 
35021
- var __defProp$l = Object.defineProperty;
35022
- var __defProps$i = Object.defineProperties;
35023
- var __getOwnPropDescs$i = Object.getOwnPropertyDescriptors;
35024
- var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
35025
- var __hasOwnProp$v = Object.prototype.hasOwnProperty;
35026
- var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
35027
- var __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35028
- var __spreadValues$l = (a, b) => {
35086
+ var __defProp$o = Object.defineProperty;
35087
+ var __defProps$l = Object.defineProperties;
35088
+ var __getOwnPropDescs$l = Object.getOwnPropertyDescriptors;
35089
+ var __getOwnPropSymbols$y = Object.getOwnPropertySymbols;
35090
+ var __hasOwnProp$y = Object.prototype.hasOwnProperty;
35091
+ var __propIsEnum$y = Object.prototype.propertyIsEnumerable;
35092
+ var __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35093
+ var __spreadValues$o = (a, b) => {
35029
35094
  for (var prop in b || (b = {}))
35030
- if (__hasOwnProp$v.call(b, prop))
35031
- __defNormalProp$l(a, prop, b[prop]);
35032
- if (__getOwnPropSymbols$v)
35033
- for (var prop of __getOwnPropSymbols$v(b)) {
35034
- if (__propIsEnum$v.call(b, prop))
35035
- __defNormalProp$l(a, prop, b[prop]);
35095
+ if (__hasOwnProp$y.call(b, prop))
35096
+ __defNormalProp$o(a, prop, b[prop]);
35097
+ if (__getOwnPropSymbols$y)
35098
+ for (var prop of __getOwnPropSymbols$y(b)) {
35099
+ if (__propIsEnum$y.call(b, prop))
35100
+ __defNormalProp$o(a, prop, b[prop]);
35036
35101
  }
35037
35102
  return a;
35038
35103
  };
35039
- var __spreadProps$i = (a, b) => __defProps$i(a, __getOwnPropDescs$i(b));
35104
+ var __spreadProps$l = (a, b) => __defProps$l(a, __getOwnPropDescs$l(b));
35040
35105
  var __objRest$l = (source, exclude) => {
35041
35106
  var target = {};
35042
35107
  for (var prop in source)
35043
- if (__hasOwnProp$v.call(source, prop) && exclude.indexOf(prop) < 0)
35108
+ if (__hasOwnProp$y.call(source, prop) && exclude.indexOf(prop) < 0)
35044
35109
  target[prop] = source[prop];
35045
- if (source != null && __getOwnPropSymbols$v)
35046
- for (var prop of __getOwnPropSymbols$v(source)) {
35047
- if (exclude.indexOf(prop) < 0 && __propIsEnum$v.call(source, prop))
35110
+ if (source != null && __getOwnPropSymbols$y)
35111
+ for (var prop of __getOwnPropSymbols$y(source)) {
35112
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$y.call(source, prop))
35048
35113
  target[prop] = source[prop];
35049
35114
  }
35050
35115
  return target;
35051
35116
  };
35052
35117
  const useListCarriers = (params) => {
35053
35118
  const { client } = useShipEngine();
35054
- const _a = __spreadValues$l({}, params), { queryFnParams } = _a, rest = __objRest$l(_a, ["queryFnParams"]);
35055
- return useQuery(__spreadProps$i(__spreadValues$l({}, rest), {
35119
+ const _a = __spreadValues$o({}, params), { queryFnParams } = _a, rest = __objRest$l(_a, ["queryFnParams"]);
35120
+ return useQuery(__spreadProps$l(__spreadValues$o({}, rest), {
35056
35121
  onError,
35057
35122
  queryFn: () => client.carriers.list(queryFnParams),
35058
35123
  queryKey: ["useListCarriers", queryFnParams],
@@ -35060,22 +35125,22 @@ const useListCarriers = (params) => {
35060
35125
  }));
35061
35126
  };
35062
35127
 
35063
- var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
35064
- var __hasOwnProp$u = Object.prototype.hasOwnProperty;
35065
- var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
35128
+ var __getOwnPropSymbols$x = Object.getOwnPropertySymbols;
35129
+ var __hasOwnProp$x = Object.prototype.hasOwnProperty;
35130
+ var __propIsEnum$x = Object.prototype.propertyIsEnumerable;
35066
35131
  var __objRest$k = (source, exclude) => {
35067
35132
  var target = {};
35068
35133
  for (var prop in source)
35069
- if (__hasOwnProp$u.call(source, prop) && exclude.indexOf(prop) < 0)
35134
+ if (__hasOwnProp$x.call(source, prop) && exclude.indexOf(prop) < 0)
35070
35135
  target[prop] = source[prop];
35071
- if (source != null && __getOwnPropSymbols$u)
35072
- for (var prop of __getOwnPropSymbols$u(source)) {
35073
- if (exclude.indexOf(prop) < 0 && __propIsEnum$u.call(source, prop))
35136
+ if (source != null && __getOwnPropSymbols$x)
35137
+ for (var prop of __getOwnPropSymbols$x(source)) {
35138
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$x.call(source, prop))
35074
35139
  target[prop] = source[prop];
35075
35140
  }
35076
35141
  return target;
35077
35142
  };
35078
- var __async$F = (__this, __arguments, generator) => {
35143
+ var __async$H = (__this, __arguments, generator) => {
35079
35144
  return new Promise((resolve, reject) => {
35080
35145
  var fulfilled = (value) => {
35081
35146
  try {
@@ -35099,7 +35164,7 @@ const useUpdateAutoFunding = () => {
35099
35164
  const { client } = useShipEngine();
35100
35165
  const queryClient = useQueryClient();
35101
35166
  return useMutation({
35102
- mutationFn: (_a) => __async$F(void 0, null, function* () {
35167
+ mutationFn: (_a) => __async$H(void 0, null, function* () {
35103
35168
  var _b = _a, { carrierId } = _b, options = __objRest$k(_b, ["carrierId"]);
35104
35169
  const result = yield client.carriers.updateAutoFunding(carrierId, options);
35105
35170
  return result.data;
@@ -35129,7 +35194,7 @@ const useGetZonesByCarrier = (carrierId) => {
35129
35194
  });
35130
35195
  };
35131
35196
 
35132
- var __async$E = (__this, __arguments, generator) => {
35197
+ var __async$G = (__this, __arguments, generator) => {
35133
35198
  return new Promise((resolve, reject) => {
35134
35199
  var fulfilled = (value) => {
35135
35200
  try {
@@ -35152,7 +35217,7 @@ var __async$E = (__this, __arguments, generator) => {
35152
35217
  const useDeleteCarrier = () => {
35153
35218
  const { client } = useShipEngine();
35154
35219
  return useMutation({
35155
- mutationFn: (carrierId) => __async$E(void 0, null, function* () {
35220
+ mutationFn: (carrierId) => __async$G(void 0, null, function* () {
35156
35221
  const result = yield client.carriers.delete(carrierId);
35157
35222
  return result.data;
35158
35223
  }),
@@ -35161,17 +35226,17 @@ const useDeleteCarrier = () => {
35161
35226
  });
35162
35227
  };
35163
35228
 
35164
- var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
35165
- var __hasOwnProp$t = Object.prototype.hasOwnProperty;
35166
- var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
35229
+ var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
35230
+ var __hasOwnProp$w = Object.prototype.hasOwnProperty;
35231
+ var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
35167
35232
  var __objRest$j = (source, exclude) => {
35168
35233
  var target = {};
35169
35234
  for (var prop in source)
35170
- if (__hasOwnProp$t.call(source, prop) && exclude.indexOf(prop) < 0)
35235
+ if (__hasOwnProp$w.call(source, prop) && exclude.indexOf(prop) < 0)
35171
35236
  target[prop] = source[prop];
35172
- if (source != null && __getOwnPropSymbols$t)
35173
- for (var prop of __getOwnPropSymbols$t(source)) {
35174
- if (exclude.indexOf(prop) < 0 && __propIsEnum$t.call(source, prop))
35237
+ if (source != null && __getOwnPropSymbols$w)
35238
+ for (var prop of __getOwnPropSymbols$w(source)) {
35239
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$w.call(source, prop))
35175
35240
  target[prop] = source[prop];
35176
35241
  }
35177
35242
  return target;
@@ -35188,17 +35253,17 @@ const useGetCarrierConnectionForm = (_params) => {
35188
35253
  });
35189
35254
  };
35190
35255
 
35191
- var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
35192
- var __hasOwnProp$s = Object.prototype.hasOwnProperty;
35193
- var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
35256
+ var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
35257
+ var __hasOwnProp$v = Object.prototype.hasOwnProperty;
35258
+ var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
35194
35259
  var __objRest$i = (source, exclude) => {
35195
35260
  var target = {};
35196
35261
  for (var prop in source)
35197
- if (__hasOwnProp$s.call(source, prop) && exclude.indexOf(prop) < 0)
35262
+ if (__hasOwnProp$v.call(source, prop) && exclude.indexOf(prop) < 0)
35198
35263
  target[prop] = source[prop];
35199
- if (source != null && __getOwnPropSymbols$s)
35200
- for (var prop of __getOwnPropSymbols$s(source)) {
35201
- if (exclude.indexOf(prop) < 0 && __propIsEnum$s.call(source, prop))
35264
+ if (source != null && __getOwnPropSymbols$v)
35265
+ for (var prop of __getOwnPropSymbols$v(source)) {
35266
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$v.call(source, prop))
35202
35267
  target[prop] = source[prop];
35203
35268
  }
35204
35269
  return target;
@@ -35215,7 +35280,7 @@ const useListCarrierConnections = (_params) => {
35215
35280
  });
35216
35281
  };
35217
35282
 
35218
- var __async$D = (__this, __arguments, generator) => {
35283
+ var __async$F = (__this, __arguments, generator) => {
35219
35284
  return new Promise((resolve, reject) => {
35220
35285
  var fulfilled = (value) => {
35221
35286
  try {
@@ -35238,7 +35303,7 @@ var __async$D = (__this, __arguments, generator) => {
35238
35303
  const useConnectCarrierAccount = () => {
35239
35304
  const { client } = useShipEngine();
35240
35305
  return useMutation({
35241
- mutationFn: (_0) => __async$D(void 0, [_0], function* ({ carrierName, formData }) {
35306
+ mutationFn: (_0) => __async$F(void 0, [_0], function* ({ carrierName, formData }) {
35242
35307
  const result = yield client.connections.connectCarrier(carrierName, formData);
35243
35308
  return result.data;
35244
35309
  }),
@@ -35258,33 +35323,33 @@ const useCarrierConnectionsServicesList = (carrierCode) => {
35258
35323
  });
35259
35324
  };
35260
35325
 
35261
- var __defProp$k = Object.defineProperty;
35262
- var __defProps$h = Object.defineProperties;
35263
- var __getOwnPropDescs$h = Object.getOwnPropertyDescriptors;
35264
- var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
35265
- var __hasOwnProp$r = Object.prototype.hasOwnProperty;
35266
- var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
35267
- var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35268
- var __spreadValues$k = (a, b) => {
35326
+ var __defProp$n = Object.defineProperty;
35327
+ var __defProps$k = Object.defineProperties;
35328
+ var __getOwnPropDescs$k = Object.getOwnPropertyDescriptors;
35329
+ var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
35330
+ var __hasOwnProp$u = Object.prototype.hasOwnProperty;
35331
+ var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
35332
+ var __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35333
+ var __spreadValues$n = (a, b) => {
35269
35334
  for (var prop in b || (b = {}))
35270
- if (__hasOwnProp$r.call(b, prop))
35271
- __defNormalProp$k(a, prop, b[prop]);
35272
- if (__getOwnPropSymbols$r)
35273
- for (var prop of __getOwnPropSymbols$r(b)) {
35274
- if (__propIsEnum$r.call(b, prop))
35275
- __defNormalProp$k(a, prop, b[prop]);
35335
+ if (__hasOwnProp$u.call(b, prop))
35336
+ __defNormalProp$n(a, prop, b[prop]);
35337
+ if (__getOwnPropSymbols$u)
35338
+ for (var prop of __getOwnPropSymbols$u(b)) {
35339
+ if (__propIsEnum$u.call(b, prop))
35340
+ __defNormalProp$n(a, prop, b[prop]);
35276
35341
  }
35277
35342
  return a;
35278
35343
  };
35279
- var __spreadProps$h = (a, b) => __defProps$h(a, __getOwnPropDescs$h(b));
35344
+ var __spreadProps$k = (a, b) => __defProps$k(a, __getOwnPropDescs$k(b));
35280
35345
  var __objRest$h = (source, exclude) => {
35281
35346
  var target = {};
35282
35347
  for (var prop in source)
35283
- if (__hasOwnProp$r.call(source, prop) && exclude.indexOf(prop) < 0)
35348
+ if (__hasOwnProp$u.call(source, prop) && exclude.indexOf(prop) < 0)
35284
35349
  target[prop] = source[prop];
35285
- if (source != null && __getOwnPropSymbols$r)
35286
- for (var prop of __getOwnPropSymbols$r(source)) {
35287
- if (exclude.indexOf(prop) < 0 && __propIsEnum$r.call(source, prop))
35350
+ if (source != null && __getOwnPropSymbols$u)
35351
+ for (var prop of __getOwnPropSymbols$u(source)) {
35352
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$u.call(source, prop))
35288
35353
  target[prop] = source[prop];
35289
35354
  }
35290
35355
  return target;
@@ -35297,7 +35362,7 @@ const useGetConnectionsCarrierSettings = (_a) => {
35297
35362
  ]);
35298
35363
  const { client } = useShipEngine();
35299
35364
  const { carrierName, carrierId } = queryFnParams;
35300
- return useQuery(__spreadProps$h(__spreadValues$k({}, params), {
35365
+ return useQuery(__spreadProps$k(__spreadValues$n({}, params), {
35301
35366
  onError,
35302
35367
  queryFn: () => client.connections.getCarrierSettings(carrierName, carrierId),
35303
35368
  queryKey: ["useGetConnectionsCarrierSettings", carrierName, carrierId],
@@ -35305,26 +35370,26 @@ const useGetConnectionsCarrierSettings = (_a) => {
35305
35370
  }));
35306
35371
  };
35307
35372
 
35308
- var __defProp$j = Object.defineProperty;
35309
- var __defProps$g = Object.defineProperties;
35310
- var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
35311
- var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
35312
- var __hasOwnProp$q = Object.prototype.hasOwnProperty;
35313
- var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
35314
- var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35315
- var __spreadValues$j = (a, b) => {
35373
+ var __defProp$m = Object.defineProperty;
35374
+ var __defProps$j = Object.defineProperties;
35375
+ var __getOwnPropDescs$j = Object.getOwnPropertyDescriptors;
35376
+ var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
35377
+ var __hasOwnProp$t = Object.prototype.hasOwnProperty;
35378
+ var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
35379
+ var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35380
+ var __spreadValues$m = (a, b) => {
35316
35381
  for (var prop in b || (b = {}))
35317
- if (__hasOwnProp$q.call(b, prop))
35318
- __defNormalProp$j(a, prop, b[prop]);
35319
- if (__getOwnPropSymbols$q)
35320
- for (var prop of __getOwnPropSymbols$q(b)) {
35321
- if (__propIsEnum$q.call(b, prop))
35322
- __defNormalProp$j(a, prop, b[prop]);
35382
+ if (__hasOwnProp$t.call(b, prop))
35383
+ __defNormalProp$m(a, prop, b[prop]);
35384
+ if (__getOwnPropSymbols$t)
35385
+ for (var prop of __getOwnPropSymbols$t(b)) {
35386
+ if (__propIsEnum$t.call(b, prop))
35387
+ __defNormalProp$m(a, prop, b[prop]);
35323
35388
  }
35324
35389
  return a;
35325
35390
  };
35326
- var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
35327
- var __async$C = (__this, __arguments, generator) => {
35391
+ var __spreadProps$j = (a, b) => __defProps$j(a, __getOwnPropDescs$j(b));
35392
+ var __async$E = (__this, __arguments, generator) => {
35328
35393
  return new Promise((resolve, reject) => {
35329
35394
  var fulfilled = (value) => {
35330
35395
  try {
@@ -35346,8 +35411,8 @@ var __async$C = (__this, __arguments, generator) => {
35346
35411
  };
35347
35412
  const useUpdateConnectionsCarrierSettings = (params) => {
35348
35413
  const { client } = useShipEngine();
35349
- return useMutation(__spreadProps$g(__spreadValues$j({}, params), {
35350
- mutationFn: (_0) => __async$C(void 0, [_0], function* ({
35414
+ return useMutation(__spreadProps$j(__spreadValues$m({}, params), {
35415
+ mutationFn: (_0) => __async$E(void 0, [_0], function* ({
35351
35416
  carrierName,
35352
35417
  carrierId,
35353
35418
  formData
@@ -35374,7 +35439,7 @@ const useListCustomPackageTypes = () => {
35374
35439
  });
35375
35440
  };
35376
35441
 
35377
- var __async$B = (__this, __arguments, generator) => {
35442
+ var __async$D = (__this, __arguments, generator) => {
35378
35443
  return new Promise((resolve, reject) => {
35379
35444
  var fulfilled = (value) => {
35380
35445
  try {
@@ -35397,7 +35462,7 @@ var __async$B = (__this, __arguments, generator) => {
35397
35462
  const useCreateFundingSource = () => {
35398
35463
  const { client } = useShipEngine();
35399
35464
  return useMutation({
35400
- mutationFn: (fundingSource) => __async$B(void 0, null, function* () {
35465
+ mutationFn: (fundingSource) => __async$D(void 0, null, function* () {
35401
35466
  const result = yield client.fundingSources.create(fundingSource);
35402
35467
  return result.data;
35403
35468
  }),
@@ -35406,7 +35471,7 @@ const useCreateFundingSource = () => {
35406
35471
  });
35407
35472
  };
35408
35473
 
35409
- var __async$A = (__this, __arguments, generator) => {
35474
+ var __async$C = (__this, __arguments, generator) => {
35410
35475
  return new Promise((resolve, reject) => {
35411
35476
  var fulfilled = (value) => {
35412
35477
  try {
@@ -35429,7 +35494,7 @@ var __async$A = (__this, __arguments, generator) => {
35429
35494
  const useFundingSourcesAddFunds = () => {
35430
35495
  const { client } = useShipEngine();
35431
35496
  return useMutation({
35432
- mutationFn: (_0) => __async$A(void 0, [_0], function* ({ funds, fundingSourceId }) {
35497
+ mutationFn: (_0) => __async$C(void 0, [_0], function* ({ funds, fundingSourceId }) {
35433
35498
  const result = yield client.fundingSources.addFunds(funds, fundingSourceId);
35434
35499
  return result.data;
35435
35500
  }),
@@ -35458,7 +35523,7 @@ const useListFundingSources = () => {
35458
35523
  });
35459
35524
  };
35460
35525
 
35461
- var __async$z = (__this, __arguments, generator) => {
35526
+ var __async$B = (__this, __arguments, generator) => {
35462
35527
  return new Promise((resolve, reject) => {
35463
35528
  var fulfilled = (value) => {
35464
35529
  try {
@@ -35481,7 +35546,7 @@ var __async$z = (__this, __arguments, generator) => {
35481
35546
  const useRegisterCarrier = () => {
35482
35547
  const { client } = useShipEngine();
35483
35548
  return useMutation({
35484
- mutationFn: (carrier) => __async$z(void 0, null, function* () {
35549
+ mutationFn: (carrier) => __async$B(void 0, null, function* () {
35485
35550
  const result = yield client.fundingSources.registerCarrier(carrier);
35486
35551
  return result.data;
35487
35552
  }),
@@ -35490,7 +35555,7 @@ const useRegisterCarrier = () => {
35490
35555
  });
35491
35556
  };
35492
35557
 
35493
- var __async$y = (__this, __arguments, generator) => {
35558
+ var __async$A = (__this, __arguments, generator) => {
35494
35559
  return new Promise((resolve, reject) => {
35495
35560
  var fulfilled = (value) => {
35496
35561
  try {
@@ -35513,7 +35578,7 @@ var __async$y = (__this, __arguments, generator) => {
35513
35578
  const useUpdateFundingSource = () => {
35514
35579
  const { client } = useShipEngine();
35515
35580
  return useMutation({
35516
- mutationFn: (_0) => __async$y(void 0, [_0], function* ({
35581
+ mutationFn: (_0) => __async$A(void 0, [_0], function* ({
35517
35582
  billingInfo,
35518
35583
  creditCardInfo,
35519
35584
  fundingSourceId
@@ -35552,29 +35617,29 @@ const useGetFundingSourceTransactions = (fundingSourceId, params) => {
35552
35617
  });
35553
35618
  };
35554
35619
 
35555
- var __defProp$i = Object.defineProperty;
35556
- var __defProps$f = Object.defineProperties;
35557
- var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
35558
- var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
35559
- var __hasOwnProp$p = Object.prototype.hasOwnProperty;
35560
- var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
35561
- var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35562
- var __spreadValues$i = (a, b) => {
35620
+ var __defProp$l = Object.defineProperty;
35621
+ var __defProps$i = Object.defineProperties;
35622
+ var __getOwnPropDescs$i = Object.getOwnPropertyDescriptors;
35623
+ var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
35624
+ var __hasOwnProp$s = Object.prototype.hasOwnProperty;
35625
+ var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
35626
+ var __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35627
+ var __spreadValues$l = (a, b) => {
35563
35628
  for (var prop in b || (b = {}))
35564
- if (__hasOwnProp$p.call(b, prop))
35565
- __defNormalProp$i(a, prop, b[prop]);
35566
- if (__getOwnPropSymbols$p)
35567
- for (var prop of __getOwnPropSymbols$p(b)) {
35568
- if (__propIsEnum$p.call(b, prop))
35569
- __defNormalProp$i(a, prop, b[prop]);
35629
+ if (__hasOwnProp$s.call(b, prop))
35630
+ __defNormalProp$l(a, prop, b[prop]);
35631
+ if (__getOwnPropSymbols$s)
35632
+ for (var prop of __getOwnPropSymbols$s(b)) {
35633
+ if (__propIsEnum$s.call(b, prop))
35634
+ __defNormalProp$l(a, prop, b[prop]);
35570
35635
  }
35571
35636
  return a;
35572
35637
  };
35573
- var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
35638
+ var __spreadProps$i = (a, b) => __defProps$i(a, __getOwnPropDescs$i(b));
35574
35639
  const useGetInsuranceFundingSourceAcceptedTerms = (params) => {
35575
35640
  const { client } = useShipEngine();
35576
- const queryParams = __spreadValues$i({}, params);
35577
- return useQuery(__spreadProps$f(__spreadValues$i({}, queryParams), {
35641
+ const queryParams = __spreadValues$l({}, params);
35642
+ return useQuery(__spreadProps$i(__spreadValues$l({}, queryParams), {
35578
35643
  onError,
35579
35644
  queryFn: () => client.fundingSources.insuranceAcceptedTerms(),
35580
35645
  queryKey: ["useGetInsuranceFundingSourceAcceptedTerms"],
@@ -35597,22 +35662,22 @@ const useGetInsuranceAccount = (insuranceProvider) => {
35597
35662
  });
35598
35663
  };
35599
35664
 
35600
- var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
35601
- var __hasOwnProp$o = Object.prototype.hasOwnProperty;
35602
- var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
35665
+ var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
35666
+ var __hasOwnProp$r = Object.prototype.hasOwnProperty;
35667
+ var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
35603
35668
  var __objRest$g = (source, exclude) => {
35604
35669
  var target = {};
35605
35670
  for (var prop in source)
35606
- if (__hasOwnProp$o.call(source, prop) && exclude.indexOf(prop) < 0)
35671
+ if (__hasOwnProp$r.call(source, prop) && exclude.indexOf(prop) < 0)
35607
35672
  target[prop] = source[prop];
35608
- if (source != null && __getOwnPropSymbols$o)
35609
- for (var prop of __getOwnPropSymbols$o(source)) {
35610
- if (exclude.indexOf(prop) < 0 && __propIsEnum$o.call(source, prop))
35673
+ if (source != null && __getOwnPropSymbols$r)
35674
+ for (var prop of __getOwnPropSymbols$r(source)) {
35675
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$r.call(source, prop))
35611
35676
  target[prop] = source[prop];
35612
35677
  }
35613
35678
  return target;
35614
35679
  };
35615
- var __async$x = (__this, __arguments, generator) => {
35680
+ var __async$z = (__this, __arguments, generator) => {
35616
35681
  return new Promise((resolve, reject) => {
35617
35682
  var fulfilled = (value) => {
35618
35683
  try {
@@ -35635,7 +35700,7 @@ var __async$x = (__this, __arguments, generator) => {
35635
35700
  const useAddInsuranceFunds = () => {
35636
35701
  const { client } = useShipEngine();
35637
35702
  return useMutation({
35638
- mutationFn: (_a) => __async$x(void 0, null, function* () {
35703
+ mutationFn: (_a) => __async$z(void 0, null, function* () {
35639
35704
  var _b = _a, { insuranceProvider } = _b, rest = __objRest$g(_b, ["insuranceProvider"]);
35640
35705
  const result = yield client.insurance.addFunds(insuranceProvider, rest);
35641
35706
  return result.data;
@@ -35645,6 +35710,137 @@ const useAddInsuranceFunds = () => {
35645
35710
  });
35646
35711
  };
35647
35712
 
35713
+ var __defProp$k = Object.defineProperty;
35714
+ var __defProps$h = Object.defineProperties;
35715
+ var __getOwnPropDescs$h = Object.getOwnPropertyDescriptors;
35716
+ var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
35717
+ var __hasOwnProp$q = Object.prototype.hasOwnProperty;
35718
+ var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
35719
+ var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35720
+ var __spreadValues$k = (a, b) => {
35721
+ for (var prop in b || (b = {}))
35722
+ if (__hasOwnProp$q.call(b, prop))
35723
+ __defNormalProp$k(a, prop, b[prop]);
35724
+ if (__getOwnPropSymbols$q)
35725
+ for (var prop of __getOwnPropSymbols$q(b)) {
35726
+ if (__propIsEnum$q.call(b, prop))
35727
+ __defNormalProp$k(a, prop, b[prop]);
35728
+ }
35729
+ return a;
35730
+ };
35731
+ var __spreadProps$h = (a, b) => __defProps$h(a, __getOwnPropDescs$h(b));
35732
+ var __async$y = (__this, __arguments, generator) => {
35733
+ return new Promise((resolve, reject) => {
35734
+ var fulfilled = (value) => {
35735
+ try {
35736
+ step(generator.next(value));
35737
+ } catch (e) {
35738
+ reject(e);
35739
+ }
35740
+ };
35741
+ var rejected = (value) => {
35742
+ try {
35743
+ step(generator.throw(value));
35744
+ } catch (e) {
35745
+ reject(e);
35746
+ }
35747
+ };
35748
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
35749
+ step((generator = generator.apply(__this, __arguments)).next());
35750
+ });
35751
+ };
35752
+ const useCreateInvoiceAddress = (params) => {
35753
+ const { client } = useShipEngine();
35754
+ return useMutation(__spreadProps$h(__spreadValues$k({}, params), {
35755
+ mutationFn: (invoiceAddress) => __async$y(void 0, null, function* () {
35756
+ const result = yield client.invoiceAddress.create(invoiceAddress);
35757
+ return result.data;
35758
+ }),
35759
+ mutationKey: ["useCreateInvoiceAddress"],
35760
+ onError
35761
+ }));
35762
+ };
35763
+
35764
+ var __defProp$j = Object.defineProperty;
35765
+ var __defProps$g = Object.defineProperties;
35766
+ var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
35767
+ var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
35768
+ var __hasOwnProp$p = Object.prototype.hasOwnProperty;
35769
+ var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
35770
+ var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35771
+ var __spreadValues$j = (a, b) => {
35772
+ for (var prop in b || (b = {}))
35773
+ if (__hasOwnProp$p.call(b, prop))
35774
+ __defNormalProp$j(a, prop, b[prop]);
35775
+ if (__getOwnPropSymbols$p)
35776
+ for (var prop of __getOwnPropSymbols$p(b)) {
35777
+ if (__propIsEnum$p.call(b, prop))
35778
+ __defNormalProp$j(a, prop, b[prop]);
35779
+ }
35780
+ return a;
35781
+ };
35782
+ var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
35783
+ var __async$x = (__this, __arguments, generator) => {
35784
+ return new Promise((resolve, reject) => {
35785
+ var fulfilled = (value) => {
35786
+ try {
35787
+ step(generator.next(value));
35788
+ } catch (e) {
35789
+ reject(e);
35790
+ }
35791
+ };
35792
+ var rejected = (value) => {
35793
+ try {
35794
+ step(generator.throw(value));
35795
+ } catch (e) {
35796
+ reject(e);
35797
+ }
35798
+ };
35799
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
35800
+ step((generator = generator.apply(__this, __arguments)).next());
35801
+ });
35802
+ };
35803
+ const useUpdateInvoiceAddress = (params) => {
35804
+ const { client } = useShipEngine();
35805
+ return useMutation(__spreadProps$g(__spreadValues$j({}, params), {
35806
+ mutationFn: (invoiceAddress) => __async$x(void 0, null, function* () {
35807
+ const result = yield client.invoiceAddress.update(invoiceAddress);
35808
+ return result.data;
35809
+ }),
35810
+ mutationKey: ["useUpdateInvoiceAddress"],
35811
+ onError
35812
+ }));
35813
+ };
35814
+
35815
+ var __defProp$i = Object.defineProperty;
35816
+ var __defProps$f = Object.defineProperties;
35817
+ var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
35818
+ var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
35819
+ var __hasOwnProp$o = Object.prototype.hasOwnProperty;
35820
+ var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
35821
+ var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35822
+ var __spreadValues$i = (a, b) => {
35823
+ for (var prop in b || (b = {}))
35824
+ if (__hasOwnProp$o.call(b, prop))
35825
+ __defNormalProp$i(a, prop, b[prop]);
35826
+ if (__getOwnPropSymbols$o)
35827
+ for (var prop of __getOwnPropSymbols$o(b)) {
35828
+ if (__propIsEnum$o.call(b, prop))
35829
+ __defNormalProp$i(a, prop, b[prop]);
35830
+ }
35831
+ return a;
35832
+ };
35833
+ var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
35834
+ const useGetInvoiceAddress = (params) => {
35835
+ const { client } = useShipEngine();
35836
+ return useQuery(__spreadProps$f(__spreadValues$i({}, params), {
35837
+ onError,
35838
+ queryFn: () => client.invoiceAddress.get(),
35839
+ queryKey: ["useGetInvoiceAddress"],
35840
+ select: (result) => result.data
35841
+ }));
35842
+ };
35843
+
35648
35844
  var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
35649
35845
  var __hasOwnProp$n = Object.prototype.hasOwnProperty;
35650
35846
  var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
@@ -36196,10 +36392,12 @@ const useRatesEstimate = () => {
36196
36392
  });
36197
36393
  };
36198
36394
 
36199
- const useGetSalesOrder = (salesOrderId) => {
36395
+ const useGetSalesOrder = (salesOrderId, config) => {
36396
+ var _a;
36200
36397
  const { client } = useShipEngine();
36398
+ const enabled = (_a = config == null ? void 0 : config.enabled) != null ? _a : true;
36201
36399
  return useQuery({
36202
- enabled: salesOrderId !== void 0,
36400
+ enabled: salesOrderId !== void 0 && enabled,
36203
36401
  onError,
36204
36402
  queryFn: () => {
36205
36403
  if (salesOrderId)
@@ -36211,6 +36409,23 @@ const useGetSalesOrder = (salesOrderId) => {
36211
36409
  });
36212
36410
  };
36213
36411
 
36412
+ const useGetSalesOrderByExternalOrderId = (externalOrderId, config) => {
36413
+ var _a;
36414
+ const { client } = useShipEngine();
36415
+ const enabled = (_a = config == null ? void 0 : config.enabled) != null ? _a : true;
36416
+ return useQuery({
36417
+ enabled: externalOrderId !== void 0 && enabled,
36418
+ onError,
36419
+ queryFn: () => {
36420
+ if (externalOrderId)
36421
+ return client.salesOrders.getByExternalId(externalOrderId);
36422
+ return Promise.reject(new Error("externalOrderId is required"));
36423
+ },
36424
+ queryKey: ["useGetSalesOrderByExternalOrderId", externalOrderId],
36425
+ select: (result) => result.data
36426
+ });
36427
+ };
36428
+
36214
36429
  const useListSalesOrders = (params = {}) => {
36215
36430
  const { client } = useShipEngine();
36216
36431
  return useQuery({
@@ -36333,13 +36548,14 @@ const useGetSalesOrderShipment = (shipmentId) => {
36333
36548
  });
36334
36549
  };
36335
36550
 
36336
- const useListSalesOrderShipments = (params) => {
36551
+ const useListSalesOrderShipments = (body) => {
36337
36552
  const { client } = useShipEngine();
36553
+ const { shipmentIds, salesOrderIds, externalOrderIds } = body;
36338
36554
  return useQuery({
36339
- enabled: params && Object.values(params).some((v) => v !== void 0),
36555
+ enabled: !!((shipmentIds == null ? void 0 : shipmentIds.length) || (salesOrderIds == null ? void 0 : salesOrderIds.length) || (externalOrderIds == null ? void 0 : externalOrderIds.length)),
36340
36556
  onError,
36341
- queryFn: () => client.salesOrderShipments.list(params),
36342
- queryKey: ["useListSalesOrderShipments", params],
36557
+ queryFn: () => client.salesOrderShipments.list(body),
36558
+ queryKey: ["useListSalesOrderShipments", body],
36343
36559
  select: (result) => result.data.shipments
36344
36560
  });
36345
36561
  };
@@ -36392,6 +36608,17 @@ const useUpdateSalesOrderShipment = () => {
36392
36608
  });
36393
36609
  };
36394
36610
 
36611
+ const useListSalesOrderShipmentsByExternalOrderId = (externalOrderId) => {
36612
+ const { client } = useShipEngine();
36613
+ return useQuery({
36614
+ enabled: externalOrderId !== null && externalOrderId.length > 0,
36615
+ onError,
36616
+ queryFn: () => client.salesOrderShipments.listShipmentsByExternalOrderId(externalOrderId),
36617
+ queryKey: ["useListSalesOrderShipments", externalOrderId],
36618
+ select: (result) => result.data.shipments
36619
+ });
36620
+ };
36621
+
36395
36622
  var __defProp$f = Object.defineProperty;
36396
36623
  var __defProps$c = Object.defineProperties;
36397
36624
  var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
@@ -38709,4 +38936,4 @@ const alchemy = {
38709
38936
  createElement
38710
38937
  };
38711
38938
 
38712
- export { AccountSettingsAPI, AddressesAPI, AlchemyContext, AlchemyProvider, AlchemyTestProvider, CarriersAPI, CodedError, ConfirmationType, ConnectionsAPI, CreditCardVendor, Currency, CustomPackagesAPI, CustomsContentsType, CustomsNonDeliveryType, Element, ErrorBoundary, FundingSourcesAPI, InsuranceAPI, InsuranceProviderType, LabelsAPI, MetadataCapability, MetadataRequirement, MetadataSatisfyingFormTypes, MovementIndicator, OrderSourcesAPI, RateCardStatus, RateCardsAPI, RatesAPI, types as SE, SalesOrderShipmentsAPI, SalesOrdersAPI, SellersAPI, ServicePointsAPI, ShipEngine, ShipEngineAPI, ShipEngineContext, ShipmentsAPI, ShippingRulesAPI, ThemesAPI, WarehousesAPI, WebhooksAPI, alchemy, camelizeKeys, decamelizeKeys, alchemy as default, delay, getEmotionCache, getEndUserIpAddress, isCodedError, isCodedErrors, isDataCodedErrors, isInvalidTokenError, logger, onError, parseError, retryUntil, useAddFunds, useAddInsuranceFunds, useAddSandboxCarriers, useAlchemy, useCalculateRates, useCancelShipment, useCarrierConnectionsServicesList, useConnectCarrier, useConnectCarrierAccount, useCreateAccountImage, useCreateFundingSource, useCreateLabel, useCreateRateCard, useCreateSalesOrderShipment, useCreateSandboxSeller, useCreateSellerApiKey, useCreateShipment, useCreateShippingRule, useCreateWarehouse, useCreateWebhook, useDeactivateOrderSource, useDeleteAccountImage, useDeleteCarrier, useDeleteRateCard, useDeleteSellerApiKey, useDeleteShippingRule, useDeleteWarehouse, useDeleteWebhook, useDownloadRateCard, useEditShippingRule, useFundingSourcesAddFunds, useGetAccountBillingPlan, useGetAccountImages, useGetAccountSettings, useGetAutoFundingConfiguration, useGetCarrierById, useGetCarrierConnectionForm, useGetConnectionsCarrierSettings, useGetCountriesByCarrier, useGetCurrenciesByCarrier, useGetFundingSourceById, useGetFundingSourceMetadata, useGetFundingSourceTransactions, useGetHereToken, useGetInsuranceAccount, useGetInsuranceFundingSourceAcceptedTerms, useGetLabel, useGetPackageRatingGroupByCarrier, useGetRateCardById, useGetSalesOrder, useGetSalesOrderShipment, useGetServicePoint, useGetServicesByCarrier, useGetShipment, useGetShipmentByExternalId, useGetShipmentRates, useGetShippingRuleById, useGetShippingRuleConditionsOptions, useGetThemeById, useGetZonesByCarrier, useI18n, useListCarrierConnections, useListCarriers, useListCustomPackageTypes, useListFundingSources, useListLabels, useListOrderSources, useListOrderSourcesConnections, useListRateCards, useListSalesOrderShipments, useListSalesOrders, useListSandboxSellerIds, useListSellerApiKeys, useListServicePoints, useListShipments, useListShippingRules, useListWarehouses, useListWebhooks, useLoadIcons, useNotifySalesOrderShipped, useParseAddress, usePublishRateCard, useRatesEstimate, useRefreshOrderSource, useRefreshOrderSourceAsync, useRegisterCarrier, useShipEngine, useUpdateAccountBillingPlan, useUpdateAccountImage, useUpdateAccountSettings, useUpdateAutoFunding, useUpdateConnectionsCarrierSettings, useUpdateFundingSource, useUpdateOrderSource, useUpdateRateCard, useUpdateSalesOrderShipment, useUpdateWarehouse, useUpdateWebhook, useUploadRateCard, useValidateAddresses, useVoidLabel };
38939
+ export { AccountSettingsAPI, AddressesAPI, AlchemyContext, AlchemyProvider, AlchemyTestProvider, CarriersAPI, CodedError, ConfirmationType, ConnectionsAPI, CreditCardVendor, Currency, CustomPackagesAPI, CustomsContentsType, CustomsNonDeliveryType, Element, ErrorBoundary, FundingSourcesAPI, InsuranceAPI, InsuranceProviderType, InvoiceAddressAPI, LabelsAPI, MetadataCapability, MetadataRequirement, MetadataSatisfyingFormTypes, MovementIndicator, OrderSourcesAPI, RateCardStatus, RateCardsAPI, RatesAPI, types as SE, SalesOrderShipmentsAPI, SalesOrdersAPI, SellersAPI, ServicePointsAPI, ShipEngine, ShipEngineAPI, ShipEngineContext, ShipmentsAPI, ShippingRulesAPI, ThemesAPI, WarehousesAPI, WebhooksAPI, alchemy, camelizeKeys, decamelizeKeys, alchemy as default, delay, getEmotionCache, getEndUserIpAddress, isCodedError, isCodedErrors, isDataCodedErrors, isInvalidTokenError, logger, onError, parseError, retryUntil, useAddFunds, useAddInsuranceFunds, useAddSandboxCarriers, useAlchemy, useCalculateRates, useCancelShipment, useCarrierConnectionsServicesList, useConnectCarrier, useConnectCarrierAccount, useCreateAccountImage, useCreateFundingSource, useCreateInvoiceAddress, useCreateLabel, useCreateRateCard, useCreateSalesOrderShipment, useCreateSandboxSeller, useCreateSellerApiKey, useCreateShipment, useCreateShippingRule, useCreateWarehouse, useCreateWebhook, useDeactivateOrderSource, useDeleteAccountImage, useDeleteCarrier, useDeleteRateCard, useDeleteSellerApiKey, useDeleteShippingRule, useDeleteWarehouse, useDeleteWebhook, useDownloadRateCard, useEditShippingRule, useFundingSourcesAddFunds, useGetAccountBillingPlan, useGetAccountImages, useGetAccountSettings, useGetAutoFundingConfiguration, useGetCarrierById, useGetCarrierConnectionForm, useGetConnectionsCarrierSettings, useGetCountriesByCarrier, useGetCurrenciesByCarrier, useGetFundingSourceById, useGetFundingSourceMetadata, useGetFundingSourceTransactions, useGetHereToken, useGetInsuranceAccount, useGetInsuranceFundingSourceAcceptedTerms, useGetInvoiceAddress, useGetLabel, useGetPackageRatingGroupByCarrier, useGetRateCardById, useGetSalesOrder, useGetSalesOrderByExternalOrderId, useGetSalesOrderShipment, useGetServicePoint, useGetServicesByCarrier, useGetShipment, useGetShipmentByExternalId, useGetShipmentRates, useGetShippingRuleById, useGetShippingRuleConditionsOptions, useGetThemeById, useGetZonesByCarrier, useI18n, useListCarrierConnections, useListCarriers, useListCustomPackageTypes, useListFundingSources, useListLabels, useListOrderSources, useListOrderSourcesConnections, useListRateCards, useListSalesOrderShipments, useListSalesOrderShipmentsByExternalOrderId, useListSalesOrders, useListSandboxSellerIds, useListSellerApiKeys, useListServicePoints, useListShipments, useListShippingRules, useListWarehouses, useListWebhooks, useLoadIcons, useNotifySalesOrderShipped, useParseAddress, usePublishRateCard, useRatesEstimate, useRefreshOrderSource, useRefreshOrderSourceAsync, useRegisterCarrier, useShipEngine, useUpdateAccountBillingPlan, useUpdateAccountImage, useUpdateAccountSettings, useUpdateAutoFunding, useUpdateConnectionsCarrierSettings, useUpdateFundingSource, useUpdateInvoiceAddress, useUpdateOrderSource, useUpdateRateCard, useUpdateSalesOrderShipment, useUpdateWarehouse, useUpdateWebhook, useUploadRateCard, useValidateAddresses, useVoidLabel };