@shipengine/alchemy 6.0.29 → 6.0.31

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 +444 -362
  2. package/index.mjs +445 -364
  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$H = Object.getOwnPropertySymbols;
10816
- var __hasOwnProp$H = Object.prototype.hasOwnProperty;
10817
- var __propIsEnum$H = Object.prototype.propertyIsEnumerable;
10818
- var __objRest$p = (source, exclude) => {
10815
+ var __getOwnPropSymbols$I = Object.getOwnPropertySymbols;
10816
+ var __hasOwnProp$I = Object.prototype.hasOwnProperty;
10817
+ var __propIsEnum$I = Object.prototype.propertyIsEnumerable;
10818
+ var __objRest$q = (source, exclude) => {
10819
10819
  var target = {};
10820
10820
  for (var prop in source)
10821
- if (__hasOwnProp$H.call(source, prop) && exclude.indexOf(prop) < 0)
10821
+ if (__hasOwnProp$I.call(source, prop) && exclude.indexOf(prop) < 0)
10822
10822
  target[prop] = 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))
10823
+ if (source != null && __getOwnPropSymbols$I)
10824
+ for (var prop of __getOwnPropSymbols$I(source)) {
10825
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$I.call(source, prop))
10826
10826
  target[prop] = source[prop];
10827
10827
  }
10828
10828
  return target;
@@ -10836,7 +10836,7 @@ class CodedError {
10836
10836
  this.message = message;
10837
10837
  }
10838
10838
  static fromObject(_a) {
10839
- var _b = _a, { message } = _b, options = __objRest$p(_b, ["message"]);
10839
+ var _b = _a, { message } = _b, options = __objRest$q(_b, ["message"]);
10840
10840
  return new CodedError(message, options);
10841
10841
  }
10842
10842
  }
@@ -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$G = Object.getOwnPropertySymbols;
10959
- var __hasOwnProp$G = Object.prototype.hasOwnProperty;
10960
- var __propIsEnum$G = Object.prototype.propertyIsEnumerable;
10961
- var __objRest$o = (source, exclude) => {
10958
+ var __getOwnPropSymbols$H = Object.getOwnPropertySymbols;
10959
+ var __hasOwnProp$H = Object.prototype.hasOwnProperty;
10960
+ var __propIsEnum$H = Object.prototype.propertyIsEnumerable;
10961
+ var __objRest$p = (source, exclude) => {
10962
10962
  var target = {};
10963
10963
  for (var prop in source)
10964
- if (__hasOwnProp$G.call(source, prop) && exclude.indexOf(prop) < 0)
10964
+ if (__hasOwnProp$H.call(source, prop) && exclude.indexOf(prop) < 0)
10965
10965
  target[prop] = 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))
10966
+ if (source != null && __getOwnPropSymbols$H)
10967
+ for (var prop of __getOwnPropSymbols$H(source)) {
10968
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$H.call(source, prop))
10969
10969
  target[prop] = source[prop];
10970
10970
  }
10971
10971
  return target;
@@ -10997,7 +10997,7 @@ class AccountSettingsAPI {
10997
10997
  * The `updateImage` method updates specific image data for a given image id.
10998
10998
  */
10999
10999
  this.updateImage = (_a) => {
11000
- var _b = _a, { labelImageId } = _b, data = __objRest$o(_b, ["labelImageId"]);
11000
+ var _b = _a, { labelImageId } = _b, data = __objRest$p(_b, ["labelImageId"]);
11001
11001
  return this.client.put(`/v1/account/settings/images/${labelImageId}`, data);
11002
11002
  };
11003
11003
  /**
@@ -13707,7 +13707,7 @@ var ipaddr = {
13707
13707
  }).call(commonjsGlobal);
13708
13708
  } (ipaddr));
13709
13709
 
13710
- var __async$X = (__this, __arguments, generator) => {
13710
+ var __async$Y = (__this, __arguments, generator) => {
13711
13711
  return new Promise((resolve, reject) => {
13712
13712
  var fulfilled = (value) => {
13713
13713
  try {
@@ -13727,7 +13727,7 @@ var __async$X = (__this, __arguments, generator) => {
13727
13727
  step((generator = generator.apply(__this, __arguments)).next());
13728
13728
  });
13729
13729
  };
13730
- const getEndUserIpAddress = () => __async$X(void 0, null, function* () {
13730
+ const getEndUserIpAddress = () => __async$Y(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)) {
@@ -13784,38 +13784,38 @@ const decamelizeKeys = (obj, separator = "_") => {
13784
13784
  return obj;
13785
13785
  };
13786
13786
 
13787
- var __defProp$u = Object.defineProperty;
13788
- var __defProps$o = Object.defineProperties;
13789
- var __getOwnPropDescs$o = Object.getOwnPropertyDescriptors;
13790
- var __getOwnPropSymbols$F = Object.getOwnPropertySymbols;
13791
- var __hasOwnProp$F = Object.prototype.hasOwnProperty;
13792
- var __propIsEnum$F = Object.prototype.propertyIsEnumerable;
13793
- var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13794
- var __spreadValues$u = (a, b) => {
13787
+ var __defProp$v = Object.defineProperty;
13788
+ var __defProps$p = Object.defineProperties;
13789
+ var __getOwnPropDescs$p = Object.getOwnPropertyDescriptors;
13790
+ var __getOwnPropSymbols$G = Object.getOwnPropertySymbols;
13791
+ var __hasOwnProp$G = Object.prototype.hasOwnProperty;
13792
+ var __propIsEnum$G = Object.prototype.propertyIsEnumerable;
13793
+ var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13794
+ var __spreadValues$v = (a, b) => {
13795
13795
  for (var prop in b || (b = {}))
13796
- if (__hasOwnProp$F.call(b, prop))
13797
- __defNormalProp$u(a, prop, b[prop]);
13798
- if (__getOwnPropSymbols$F)
13799
- for (var prop of __getOwnPropSymbols$F(b)) {
13800
- if (__propIsEnum$F.call(b, prop))
13801
- __defNormalProp$u(a, prop, b[prop]);
13796
+ if (__hasOwnProp$G.call(b, prop))
13797
+ __defNormalProp$v(a, prop, b[prop]);
13798
+ if (__getOwnPropSymbols$G)
13799
+ for (var prop of __getOwnPropSymbols$G(b)) {
13800
+ if (__propIsEnum$G.call(b, prop))
13801
+ __defNormalProp$v(a, prop, b[prop]);
13802
13802
  }
13803
13803
  return a;
13804
13804
  };
13805
- var __spreadProps$o = (a, b) => __defProps$o(a, __getOwnPropDescs$o(b));
13806
- var __objRest$n = (source, exclude) => {
13805
+ var __spreadProps$p = (a, b) => __defProps$p(a, __getOwnPropDescs$p(b));
13806
+ var __objRest$o = (source, exclude) => {
13807
13807
  var target = {};
13808
13808
  for (var prop in source)
13809
- if (__hasOwnProp$F.call(source, prop) && exclude.indexOf(prop) < 0)
13809
+ if (__hasOwnProp$G.call(source, prop) && exclude.indexOf(prop) < 0)
13810
13810
  target[prop] = source[prop];
13811
- if (source != null && __getOwnPropSymbols$F)
13812
- for (var prop of __getOwnPropSymbols$F(source)) {
13813
- if (exclude.indexOf(prop) < 0 && __propIsEnum$F.call(source, prop))
13811
+ if (source != null && __getOwnPropSymbols$G)
13812
+ for (var prop of __getOwnPropSymbols$G(source)) {
13813
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$G.call(source, prop))
13814
13814
  target[prop] = source[prop];
13815
13815
  }
13816
13816
  return target;
13817
13817
  };
13818
- var __async$W = (__this, __arguments, generator) => {
13818
+ var __async$X = (__this, __arguments, generator) => {
13819
13819
  return new Promise((resolve, reject) => {
13820
13820
  var fulfilled = (value) => {
13821
13821
  try {
@@ -13855,12 +13855,12 @@ class CarriersAPI {
13855
13855
  /**
13856
13856
  * The `connect` method connects a carrier account to a user's ShipEngine account.
13857
13857
  */
13858
- this.connect = (_a) => __async$W(this, null, function* () {
13859
- var _b = _a, { carrierCode } = _b, connection = __objRest$n(_b, ["carrierCode"]);
13858
+ this.connect = (_a) => __async$X(this, null, function* () {
13859
+ var _b = _a, { carrierCode } = _b, connection = __objRest$o(_b, ["carrierCode"]);
13860
13860
  const endUserIpAddress = yield getEndUserIpAddress();
13861
13861
  if (!endUserIpAddress)
13862
13862
  return Promise.reject([new CodedError("Unable to get IP address")]);
13863
- return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$o(__spreadValues$u({}, connection), {
13863
+ return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$p(__spreadValues$v({}, connection), {
13864
13864
  endUserIpAddress
13865
13865
  }));
13866
13866
  });
@@ -13946,7 +13946,7 @@ class CarriersAPI {
13946
13946
  }
13947
13947
  }
13948
13948
 
13949
- var __async$V = (__this, __arguments, generator) => {
13949
+ var __async$W = (__this, __arguments, generator) => {
13950
13950
  return new Promise((resolve, reject) => {
13951
13951
  var fulfilled = (value) => {
13952
13952
  try {
@@ -13988,7 +13988,7 @@ class ConnectionsAPI {
13988
13988
  /**
13989
13989
  * The `connectCarrier` method connects a carrier to account.
13990
13990
  */
13991
- this.connectCarrier = (carrierName, formData) => __async$V(this, null, function* () {
13991
+ this.connectCarrier = (carrierName, formData) => __async$W(this, null, function* () {
13992
13992
  return yield this.client.post(
13993
13993
  `/v1/connections/carriers/${carrierName}`,
13994
13994
  formData,
@@ -16163,23 +16163,23 @@ class CustomPackagesAPI {
16163
16163
  }
16164
16164
  }
16165
16165
 
16166
- var __defProp$t = Object.defineProperty;
16167
- var __getOwnPropSymbols$E = Object.getOwnPropertySymbols;
16168
- var __hasOwnProp$E = Object.prototype.hasOwnProperty;
16169
- var __propIsEnum$E = Object.prototype.propertyIsEnumerable;
16170
- var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16171
- var __spreadValues$t = (a, b) => {
16166
+ var __defProp$u = Object.defineProperty;
16167
+ var __getOwnPropSymbols$F = Object.getOwnPropertySymbols;
16168
+ var __hasOwnProp$F = Object.prototype.hasOwnProperty;
16169
+ var __propIsEnum$F = Object.prototype.propertyIsEnumerable;
16170
+ var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16171
+ var __spreadValues$u = (a, b) => {
16172
16172
  for (var prop in b || (b = {}))
16173
- if (__hasOwnProp$E.call(b, prop))
16174
- __defNormalProp$t(a, prop, b[prop]);
16175
- if (__getOwnPropSymbols$E)
16176
- for (var prop of __getOwnPropSymbols$E(b)) {
16177
- if (__propIsEnum$E.call(b, prop))
16178
- __defNormalProp$t(a, prop, b[prop]);
16173
+ if (__hasOwnProp$F.call(b, prop))
16174
+ __defNormalProp$u(a, prop, b[prop]);
16175
+ if (__getOwnPropSymbols$F)
16176
+ for (var prop of __getOwnPropSymbols$F(b)) {
16177
+ if (__propIsEnum$F.call(b, prop))
16178
+ __defNormalProp$u(a, prop, b[prop]);
16179
16179
  }
16180
16180
  return a;
16181
16181
  };
16182
- var __async$U = (__this, __arguments, generator) => {
16182
+ var __async$V = (__this, __arguments, generator) => {
16183
16183
  return new Promise((resolve, reject) => {
16184
16184
  var fulfilled = (value) => {
16185
16185
  try {
@@ -16218,12 +16218,12 @@ class FundingSourcesAPI {
16218
16218
  * The `create` method creates a new funding source for a given user. This requires
16219
16219
  * payment information to be collected from the user.
16220
16220
  */
16221
- this.create = (createFundingSource) => __async$U(this, null, function* () {
16221
+ this.create = (createFundingSource) => __async$V(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")]);
16225
16225
  }
16226
- return yield this.client.post("/v1/funding_sources", __spreadValues$t({
16226
+ return yield this.client.post("/v1/funding_sources", __spreadValues$u({
16227
16227
  endUserIpAddress
16228
16228
  }, createFundingSource));
16229
16229
  });
@@ -16232,7 +16232,7 @@ class FundingSourcesAPI {
16232
16232
  * user to update the billing address or payment information associated with the
16233
16233
  * funding source.
16234
16234
  */
16235
- this.update = (billingInfo, creditCardInfo, fundingSourceId) => __async$U(this, null, function* () {
16235
+ this.update = (billingInfo, creditCardInfo, auctanePayInfo, fundingSourceId) => __async$V(this, null, function* () {
16236
16236
  const endUserIpAddress = yield getEndUserIpAddress();
16237
16237
  if (!endUserIpAddress) {
16238
16238
  return Promise.reject([new CodedError("Unable to get IP address")]);
@@ -16242,7 +16242,9 @@ class FundingSourcesAPI {
16242
16242
  {
16243
16243
  billingInfo,
16244
16244
  endUserIpAddress,
16245
- paymentMethod: { creditCardInfo }
16245
+ paymentMethod: __spreadValues$u({
16246
+ creditCardInfo
16247
+ }, auctanePayInfo)
16246
16248
  }
16247
16249
  );
16248
16250
  });
@@ -16250,19 +16252,19 @@ class FundingSourcesAPI {
16250
16252
  * The `registerCarrier` method registers a carrier account and associates
16251
16253
  * it with a given funding source.
16252
16254
  */
16253
- this.registerCarrier = (carrier) => __async$U(this, null, function* () {
16255
+ this.registerCarrier = (carrier) => __async$V(this, null, function* () {
16254
16256
  const endUserIpAddress = yield getEndUserIpAddress();
16255
16257
  if (!endUserIpAddress) {
16256
16258
  return Promise.reject([new CodedError("Unable to get IP address")]);
16257
16259
  }
16258
- return yield this.client.post("/v1/registration/funding_source", __spreadValues$t({
16260
+ return yield this.client.post("/v1/registration/funding_source", __spreadValues$u({
16259
16261
  endUserIpAddress
16260
16262
  }, carrier));
16261
16263
  });
16262
16264
  /**
16263
16265
  * The `addFunds` method allows you to add funds to a funding source.
16264
16266
  */
16265
- this.addFunds = (amount, fundingSourceId) => __async$U(this, null, function* () {
16267
+ this.addFunds = (amount, fundingSourceId) => __async$V(this, null, function* () {
16266
16268
  return yield this.client.put(
16267
16269
  `/v1/funding_sources/${fundingSourceId}/add_funds`,
16268
16270
  amount
@@ -16272,7 +16274,7 @@ class FundingSourcesAPI {
16272
16274
  * The `metadata` method returns seller-specific requirements for creating funding sources
16273
16275
  * and attaching carriers
16274
16276
  */
16275
- this.metadata = () => __async$U(this, null, function* () {
16277
+ this.metadata = () => __async$V(this, null, function* () {
16276
16278
  return yield this.client.get("/v1/funding_sources/metadata");
16277
16279
  });
16278
16280
  /**
@@ -16324,7 +16326,7 @@ class InsuranceAPI {
16324
16326
  }
16325
16327
  }
16326
16328
 
16327
- var __async$T = (__this, __arguments, generator) => {
16329
+ var __async$U = (__this, __arguments, generator) => {
16328
16330
  return new Promise((resolve, reject) => {
16329
16331
  var fulfilled = (value) => {
16330
16332
  try {
@@ -16356,13 +16358,13 @@ class InvoiceAddressAPI {
16356
16358
  /**
16357
16359
  * The `create` method creates a new invoice address for a given user.
16358
16360
  */
16359
- this.create = (invoiceAddress) => __async$T(this, null, function* () {
16361
+ this.create = (invoiceAddress) => __async$U(this, null, function* () {
16360
16362
  return yield this.client.post("/v1/invoice_address", invoiceAddress);
16361
16363
  });
16362
16364
  /**
16363
16365
  * The `update` method updates a invoice address for a given user.
16364
16366
  */
16365
- this.update = (invoiceAddress) => __async$T(this, null, function* () {
16367
+ this.update = (invoiceAddress) => __async$U(this, null, function* () {
16366
16368
  return yield this.client.put("/v1/invoice_address", invoiceAddress);
16367
16369
  });
16368
16370
  this.client = client;
@@ -16404,17 +16406,17 @@ class LabelsAPI {
16404
16406
  }
16405
16407
  }
16406
16408
 
16407
- var __getOwnPropSymbols$D = Object.getOwnPropertySymbols;
16408
- var __hasOwnProp$D = Object.prototype.hasOwnProperty;
16409
- var __propIsEnum$D = Object.prototype.propertyIsEnumerable;
16410
- var __objRest$m = (source, exclude) => {
16409
+ var __getOwnPropSymbols$E = Object.getOwnPropertySymbols;
16410
+ var __hasOwnProp$E = Object.prototype.hasOwnProperty;
16411
+ var __propIsEnum$E = Object.prototype.propertyIsEnumerable;
16412
+ var __objRest$n = (source, exclude) => {
16411
16413
  var target = {};
16412
16414
  for (var prop in source)
16413
- if (__hasOwnProp$D.call(source, prop) && exclude.indexOf(prop) < 0)
16415
+ if (__hasOwnProp$E.call(source, prop) && exclude.indexOf(prop) < 0)
16414
16416
  target[prop] = source[prop];
16415
- if (source != null && __getOwnPropSymbols$D)
16416
- for (var prop of __getOwnPropSymbols$D(source)) {
16417
- if (exclude.indexOf(prop) < 0 && __propIsEnum$D.call(source, prop))
16417
+ if (source != null && __getOwnPropSymbols$E)
16418
+ for (var prop of __getOwnPropSymbols$E(source)) {
16419
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$E.call(source, prop))
16418
16420
  target[prop] = source[prop];
16419
16421
  }
16420
16422
  return target;
@@ -16446,7 +16448,7 @@ class OrderSourcesAPI {
16446
16448
  * The `update` method will allow the user to update a connected Order Source
16447
16449
  */
16448
16450
  this.update = (_a) => {
16449
- var _b = _a, { orderSourceId } = _b, rest = __objRest$m(_b, ["orderSourceId"]);
16451
+ var _b = _a, { orderSourceId } = _b, rest = __objRest$n(_b, ["orderSourceId"]);
16450
16452
  return this.client.put(`/v-beta/order_sources/${orderSourceId}`, rest);
16451
16453
  };
16452
16454
  /**
@@ -16535,19 +16537,19 @@ class RateCardsAPI {
16535
16537
  }
16536
16538
  }
16537
16539
 
16538
- var __defProp$s = Object.defineProperty;
16539
- var __getOwnPropSymbols$C = Object.getOwnPropertySymbols;
16540
- var __hasOwnProp$C = Object.prototype.hasOwnProperty;
16541
- var __propIsEnum$C = Object.prototype.propertyIsEnumerable;
16542
- var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16543
- var __spreadValues$s = (a, b) => {
16540
+ var __defProp$t = Object.defineProperty;
16541
+ var __getOwnPropSymbols$D = Object.getOwnPropertySymbols;
16542
+ var __hasOwnProp$D = Object.prototype.hasOwnProperty;
16543
+ var __propIsEnum$D = Object.prototype.propertyIsEnumerable;
16544
+ var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16545
+ var __spreadValues$t = (a, b) => {
16544
16546
  for (var prop in b || (b = {}))
16545
- if (__hasOwnProp$C.call(b, prop))
16546
- __defNormalProp$s(a, prop, b[prop]);
16547
- if (__getOwnPropSymbols$C)
16548
- for (var prop of __getOwnPropSymbols$C(b)) {
16549
- if (__propIsEnum$C.call(b, prop))
16550
- __defNormalProp$s(a, prop, b[prop]);
16547
+ if (__hasOwnProp$D.call(b, prop))
16548
+ __defNormalProp$t(a, prop, b[prop]);
16549
+ if (__getOwnPropSymbols$D)
16550
+ for (var prop of __getOwnPropSymbols$D(b)) {
16551
+ if (__propIsEnum$D.call(b, prop))
16552
+ __defNormalProp$t(a, prop, b[prop]);
16551
16553
  }
16552
16554
  return a;
16553
16555
  };
@@ -16569,7 +16571,7 @@ class RatesAPI {
16569
16571
  * method.
16570
16572
  */
16571
16573
  this.estimate = (params) => {
16572
- return this.client.post("/v1/rates/estimate", __spreadValues$s({}, params));
16574
+ return this.client.post("/v1/rates/estimate", __spreadValues$t({}, params));
16573
16575
  };
16574
16576
  this.client = client;
16575
16577
  }
@@ -16649,7 +16651,7 @@ class SalesOrdersAPI {
16649
16651
  }
16650
16652
  }
16651
16653
 
16652
- var __async$S = (__this, __arguments, generator) => {
16654
+ var __async$T = (__this, __arguments, generator) => {
16653
16655
  return new Promise((resolve, reject) => {
16654
16656
  var fulfilled = (value) => {
16655
16657
  try {
@@ -16707,7 +16709,7 @@ class SellersAPI {
16707
16709
  /**
16708
16710
  * Deletes an API Key
16709
16711
  */
16710
- this.deleteSellerApiKey = (_0) => __async$S(this, [_0], function* ({
16712
+ this.deleteSellerApiKey = (_0) => __async$T(this, [_0], function* ({
16711
16713
  encryptedApiKey,
16712
16714
  sellerId,
16713
16715
  isSandbox
@@ -16753,19 +16755,19 @@ class SellersAPI {
16753
16755
  }
16754
16756
  }
16755
16757
 
16756
- var __defProp$r = Object.defineProperty;
16757
- var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
16758
- var __hasOwnProp$B = Object.prototype.hasOwnProperty;
16759
- var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
16760
- var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16761
- var __spreadValues$r = (a, b) => {
16758
+ var __defProp$s = Object.defineProperty;
16759
+ var __getOwnPropSymbols$C = Object.getOwnPropertySymbols;
16760
+ var __hasOwnProp$C = Object.prototype.hasOwnProperty;
16761
+ var __propIsEnum$C = Object.prototype.propertyIsEnumerable;
16762
+ var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16763
+ var __spreadValues$s = (a, b) => {
16762
16764
  for (var prop in b || (b = {}))
16763
- if (__hasOwnProp$B.call(b, prop))
16764
- __defNormalProp$r(a, prop, b[prop]);
16765
- if (__getOwnPropSymbols$B)
16766
- for (var prop of __getOwnPropSymbols$B(b)) {
16767
- if (__propIsEnum$B.call(b, prop))
16768
- __defNormalProp$r(a, prop, b[prop]);
16765
+ if (__hasOwnProp$C.call(b, prop))
16766
+ __defNormalProp$s(a, prop, b[prop]);
16767
+ if (__getOwnPropSymbols$C)
16768
+ for (var prop of __getOwnPropSymbols$C(b)) {
16769
+ if (__propIsEnum$C.call(b, prop))
16770
+ __defNormalProp$s(a, prop, b[prop]);
16769
16771
  }
16770
16772
  return a;
16771
16773
  };
@@ -16777,7 +16779,7 @@ class ServicePointsAPI {
16777
16779
  * Either an address, coordinates, or an address query
16778
16780
  */
16779
16781
  this.list = (options) => {
16780
- return this.client.post("/v1/service_points/list", __spreadValues$r({}, options));
16782
+ return this.client.post("/v1/service_points/list", __spreadValues$s({}, options));
16781
16783
  };
16782
16784
  /**
16783
16785
  * Get a specific service point by its carrier code, country code, and id
@@ -16795,7 +16797,7 @@ class ServicePointsAPI {
16795
16797
  }
16796
16798
  }
16797
16799
 
16798
- var __async$R = (__this, __arguments, generator) => {
16800
+ var __async$S = (__this, __arguments, generator) => {
16799
16801
  return new Promise((resolve, reject) => {
16800
16802
  var fulfilled = (value) => {
16801
16803
  try {
@@ -16844,7 +16846,7 @@ class ShipmentsAPI {
16844
16846
  * The `create` method allows for creating shipments based on a list of shipment
16845
16847
  * items passed into this method.
16846
16848
  */
16847
- this.create = (...shipments) => __async$R(this, null, function* () {
16849
+ this.create = (...shipments) => __async$S(this, null, function* () {
16848
16850
  return this.client.post("/v1/shipments", {
16849
16851
  shipments
16850
16852
  });
@@ -34236,26 +34238,26 @@ class WebhooksAPI {
34236
34238
  }
34237
34239
  }
34238
34240
 
34239
- var __defProp$q = Object.defineProperty;
34240
- var __defProps$n = Object.defineProperties;
34241
- var __getOwnPropDescs$n = Object.getOwnPropertyDescriptors;
34242
- var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
34243
- var __hasOwnProp$A = Object.prototype.hasOwnProperty;
34244
- var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
34245
- var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
34246
- var __spreadValues$q = (a, b) => {
34241
+ var __defProp$r = Object.defineProperty;
34242
+ var __defProps$o = Object.defineProperties;
34243
+ var __getOwnPropDescs$o = Object.getOwnPropertyDescriptors;
34244
+ var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
34245
+ var __hasOwnProp$B = Object.prototype.hasOwnProperty;
34246
+ var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
34247
+ var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
34248
+ var __spreadValues$r = (a, b) => {
34247
34249
  for (var prop in b || (b = {}))
34248
- if (__hasOwnProp$A.call(b, prop))
34249
- __defNormalProp$q(a, prop, b[prop]);
34250
- if (__getOwnPropSymbols$A)
34251
- for (var prop of __getOwnPropSymbols$A(b)) {
34252
- if (__propIsEnum$A.call(b, prop))
34253
- __defNormalProp$q(a, prop, b[prop]);
34250
+ if (__hasOwnProp$B.call(b, prop))
34251
+ __defNormalProp$r(a, prop, b[prop]);
34252
+ if (__getOwnPropSymbols$B)
34253
+ for (var prop of __getOwnPropSymbols$B(b)) {
34254
+ if (__propIsEnum$B.call(b, prop))
34255
+ __defNormalProp$r(a, prop, b[prop]);
34254
34256
  }
34255
34257
  return a;
34256
34258
  };
34257
- var __spreadProps$n = (a, b) => __defProps$n(a, __getOwnPropDescs$n(b));
34258
- var __async$Q = (__this, __arguments, generator) => {
34259
+ var __spreadProps$o = (a, b) => __defProps$o(a, __getOwnPropDescs$o(b));
34260
+ var __async$R = (__this, __arguments, generator) => {
34259
34261
  return new Promise((resolve, reject) => {
34260
34262
  var fulfilled = (value) => {
34261
34263
  try {
@@ -34278,7 +34280,7 @@ var __async$Q = (__this, __arguments, generator) => {
34278
34280
  const logger$1 = E({
34279
34281
  level: process.env.NODE_ENV === "production" ? "fatal" : "info",
34280
34282
  name: "shipengine-api",
34281
- serializers: __spreadProps$n(__spreadValues$q({}, k), {
34283
+ serializers: __spreadProps$o(__spreadValues$r({}, k), {
34282
34284
  req: (req) => ({
34283
34285
  headers: req.headers,
34284
34286
  method: req.method,
@@ -34303,7 +34305,7 @@ class ShipEngineAPI {
34303
34305
  this.getSandboxToken = getSandboxToken;
34304
34306
  const client = axios.create({
34305
34307
  baseURL,
34306
- headers: __spreadProps$n(__spreadValues$q({}, headers), {
34308
+ headers: __spreadProps$o(__spreadValues$r({}, headers), {
34307
34309
  "Content-Type": "application/json"
34308
34310
  }),
34309
34311
  paramsSerializer: (params) => lib.stringify(decamelizeKeys(params), { arrayFormat: "brackets" }),
@@ -34338,7 +34340,7 @@ class ShipEngineAPI {
34338
34340
  });
34339
34341
  client.defaults.headers.common["Authorization"] = `Bearer ${token}`;
34340
34342
  client.interceptors.request.use(
34341
- (config) => __async$Q(this, null, function* () {
34343
+ (config) => __async$R(this, null, function* () {
34342
34344
  if (config.isSandbox) {
34343
34345
  if (!this.sandboxToken) {
34344
34346
  this.sandboxToken = yield getSandboxToken == null ? void 0 : getSandboxToken();
@@ -34365,7 +34367,7 @@ class ShipEngineAPI {
34365
34367
  );
34366
34368
  return res;
34367
34369
  },
34368
- (err) => __async$Q(this, null, function* () {
34370
+ (err) => __async$R(this, null, function* () {
34369
34371
  var _a, _b, _c, _d, _e;
34370
34372
  logger$1.error(
34371
34373
  { err, req: err.config, res: err.response },
@@ -34412,7 +34414,7 @@ class ShipEngineAPI {
34412
34414
  * that token (also known as Seller ID)
34413
34415
  */
34414
34416
  getTenant(isSandbox) {
34415
- return __async$Q(this, null, function* () {
34417
+ return __async$R(this, null, function* () {
34416
34418
  var _a;
34417
34419
  if (!isSandbox) {
34418
34420
  return this.getTenantFromToken(this.token);
@@ -34691,25 +34693,25 @@ const delay = (ms) => new Promise((resolve) => {
34691
34693
 
34692
34694
  const onError = (_errors) => _default();
34693
34695
 
34694
- var __defProp$p = Object.defineProperty;
34695
- var __defProps$m = Object.defineProperties;
34696
- var __getOwnPropDescs$m = Object.getOwnPropertyDescriptors;
34697
- var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
34698
- var __hasOwnProp$z = Object.prototype.hasOwnProperty;
34699
- var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
34700
- var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
34701
- var __spreadValues$p = (a, b) => {
34696
+ var __defProp$q = Object.defineProperty;
34697
+ var __defProps$n = Object.defineProperties;
34698
+ var __getOwnPropDescs$n = Object.getOwnPropertyDescriptors;
34699
+ var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
34700
+ var __hasOwnProp$A = Object.prototype.hasOwnProperty;
34701
+ var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
34702
+ var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
34703
+ var __spreadValues$q = (a, b) => {
34702
34704
  for (var prop in b || (b = {}))
34703
- if (__hasOwnProp$z.call(b, prop))
34704
- __defNormalProp$p(a, prop, b[prop]);
34705
- if (__getOwnPropSymbols$z)
34706
- for (var prop of __getOwnPropSymbols$z(b)) {
34707
- if (__propIsEnum$z.call(b, prop))
34708
- __defNormalProp$p(a, prop, b[prop]);
34705
+ if (__hasOwnProp$A.call(b, prop))
34706
+ __defNormalProp$q(a, prop, b[prop]);
34707
+ if (__getOwnPropSymbols$A)
34708
+ for (var prop of __getOwnPropSymbols$A(b)) {
34709
+ if (__propIsEnum$A.call(b, prop))
34710
+ __defNormalProp$q(a, prop, b[prop]);
34709
34711
  }
34710
34712
  return a;
34711
34713
  };
34712
- var __spreadProps$m = (a, b) => __defProps$m(a, __getOwnPropDescs$m(b));
34714
+ var __spreadProps$n = (a, b) => __defProps$n(a, __getOwnPropDescs$n(b));
34713
34715
  const streams = [];
34714
34716
  if (process.env.NODE_ENV === "production") {
34715
34717
  streams.push({
@@ -34718,7 +34720,7 @@ if (process.env.NODE_ENV === "production") {
34718
34720
  }
34719
34721
  const logger = E({
34720
34722
  name: "shipengine",
34721
- serializers: __spreadProps$m(__spreadValues$p({}, k), {
34723
+ serializers: __spreadProps$n(__spreadValues$q({}, k), {
34722
34724
  req: (req) => ({
34723
34725
  headers: req.headers,
34724
34726
  method: req.method,
@@ -34743,7 +34745,7 @@ const retryUntil = (callbackFn, retries = 10, timeoutBetweenAttempts = 1e3) => P
34743
34745
  throw error;
34744
34746
  });
34745
34747
 
34746
- var __async$P = (__this, __arguments, generator) => {
34748
+ var __async$Q = (__this, __arguments, generator) => {
34747
34749
  return new Promise((resolve, reject) => {
34748
34750
  var fulfilled = (value) => {
34749
34751
  try {
@@ -34766,7 +34768,7 @@ var __async$P = (__this, __arguments, generator) => {
34766
34768
  const useCreateAccountImage = () => {
34767
34769
  const { client } = useShipEngine();
34768
34770
  return reactQuery.useMutation({
34769
- mutationFn: (data) => __async$P(void 0, null, function* () {
34771
+ mutationFn: (data) => __async$Q(void 0, null, function* () {
34770
34772
  const result = yield client.accountSettings.createImage(data);
34771
34773
  return result.data;
34772
34774
  }),
@@ -34775,7 +34777,7 @@ const useCreateAccountImage = () => {
34775
34777
  });
34776
34778
  };
34777
34779
 
34778
- var __async$O = (__this, __arguments, generator) => {
34780
+ var __async$P = (__this, __arguments, generator) => {
34779
34781
  return new Promise((resolve, reject) => {
34780
34782
  var fulfilled = (value) => {
34781
34783
  try {
@@ -34798,7 +34800,7 @@ var __async$O = (__this, __arguments, generator) => {
34798
34800
  const useDeleteAccountImage = () => {
34799
34801
  const { client } = useShipEngine();
34800
34802
  return reactQuery.useMutation({
34801
- mutationFn: (labelImageId) => __async$O(void 0, null, function* () {
34803
+ mutationFn: (labelImageId) => __async$P(void 0, null, function* () {
34802
34804
  const result = yield client.accountSettings.deleteImage(labelImageId);
34803
34805
  return result.data;
34804
34806
  }),
@@ -34827,7 +34829,7 @@ const useGetAccountSettings = () => {
34827
34829
  });
34828
34830
  };
34829
34831
 
34830
- var __async$N = (__this, __arguments, generator) => {
34832
+ var __async$O = (__this, __arguments, generator) => {
34831
34833
  return new Promise((resolve, reject) => {
34832
34834
  var fulfilled = (value) => {
34833
34835
  try {
@@ -34850,7 +34852,7 @@ var __async$N = (__this, __arguments, generator) => {
34850
34852
  const useUpdateAccountImage = () => {
34851
34853
  const { client } = useShipEngine();
34852
34854
  return reactQuery.useMutation({
34853
- mutationFn: (data) => __async$N(void 0, null, function* () {
34855
+ mutationFn: (data) => __async$O(void 0, null, function* () {
34854
34856
  const result = yield client.accountSettings.updateImage(data);
34855
34857
  return result.data;
34856
34858
  }),
@@ -34859,7 +34861,7 @@ const useUpdateAccountImage = () => {
34859
34861
  });
34860
34862
  };
34861
34863
 
34862
- var __async$M = (__this, __arguments, generator) => {
34864
+ var __async$N = (__this, __arguments, generator) => {
34863
34865
  return new Promise((resolve, reject) => {
34864
34866
  var fulfilled = (value) => {
34865
34867
  try {
@@ -34882,7 +34884,7 @@ var __async$M = (__this, __arguments, generator) => {
34882
34884
  const useUpdateAccountSettings = () => {
34883
34885
  const { client } = useShipEngine();
34884
34886
  return reactQuery.useMutation({
34885
- mutationFn: (settings) => __async$M(void 0, null, function* () {
34887
+ mutationFn: (settings) => __async$N(void 0, null, function* () {
34886
34888
  const result = yield client.accountSettings.update(settings);
34887
34889
  return result.data;
34888
34890
  }),
@@ -34891,7 +34893,7 @@ const useUpdateAccountSettings = () => {
34891
34893
  });
34892
34894
  };
34893
34895
 
34894
- var __async$L = (__this, __arguments, generator) => {
34896
+ var __async$M = (__this, __arguments, generator) => {
34895
34897
  return new Promise((resolve, reject) => {
34896
34898
  var fulfilled = (value) => {
34897
34899
  try {
@@ -34914,7 +34916,7 @@ var __async$L = (__this, __arguments, generator) => {
34914
34916
  const useParseAddress = () => {
34915
34917
  const { client } = useShipEngine();
34916
34918
  return reactQuery.useMutation({
34917
- mutationFn: (_0) => __async$L(void 0, [_0], function* ({ address, text }) {
34919
+ mutationFn: (_0) => __async$M(void 0, [_0], function* ({ address, text }) {
34918
34920
  const result = yield client.addresses.parse(text, address);
34919
34921
  return result.data;
34920
34922
  }),
@@ -34923,7 +34925,7 @@ const useParseAddress = () => {
34923
34925
  });
34924
34926
  };
34925
34927
 
34926
- var __async$K = (__this, __arguments, generator) => {
34928
+ var __async$L = (__this, __arguments, generator) => {
34927
34929
  return new Promise((resolve, reject) => {
34928
34930
  var fulfilled = (value) => {
34929
34931
  try {
@@ -34946,7 +34948,7 @@ var __async$K = (__this, __arguments, generator) => {
34946
34948
  const useValidateAddresses = () => {
34947
34949
  const { client } = useShipEngine();
34948
34950
  return reactQuery.useMutation({
34949
- mutationFn: (addresses) => __async$K(void 0, null, function* () {
34951
+ mutationFn: (addresses) => __async$L(void 0, null, function* () {
34950
34952
  const result = yield client.addresses.validate(addresses);
34951
34953
  return result.data;
34952
34954
  }),
@@ -34955,7 +34957,7 @@ const useValidateAddresses = () => {
34955
34957
  });
34956
34958
  };
34957
34959
 
34958
- var __async$J = (__this, __arguments, generator) => {
34960
+ var __async$K = (__this, __arguments, generator) => {
34959
34961
  return new Promise((resolve, reject) => {
34960
34962
  var fulfilled = (value) => {
34961
34963
  try {
@@ -34978,7 +34980,7 @@ var __async$J = (__this, __arguments, generator) => {
34978
34980
  const useAddFunds = () => {
34979
34981
  const { client } = useShipEngine();
34980
34982
  return reactQuery.useMutation({
34981
- mutationFn: (_0) => __async$J(void 0, [_0], function* ({ carrierId, funds }) {
34983
+ mutationFn: (_0) => __async$K(void 0, [_0], function* ({ carrierId, funds }) {
34982
34984
  const result = yield client.carriers.addFunds(carrierId, funds);
34983
34985
  return result.data;
34984
34986
  }),
@@ -34987,7 +34989,7 @@ const useAddFunds = () => {
34987
34989
  });
34988
34990
  };
34989
34991
 
34990
- var __async$I = (__this, __arguments, generator) => {
34992
+ var __async$J = (__this, __arguments, generator) => {
34991
34993
  return new Promise((resolve, reject) => {
34992
34994
  var fulfilled = (value) => {
34993
34995
  try {
@@ -35010,7 +35012,7 @@ var __async$I = (__this, __arguments, generator) => {
35010
35012
  const useConnectCarrier = () => {
35011
35013
  const { client } = useShipEngine();
35012
35014
  return reactQuery.useMutation({
35013
- mutationFn: (params) => __async$I(void 0, null, function* () {
35015
+ mutationFn: (params) => __async$J(void 0, null, function* () {
35014
35016
  const result = yield client.carriers.connect(params);
35015
35017
  return result.data;
35016
35018
  }),
@@ -35119,41 +35121,41 @@ const useGetServicesByCarrier = (carrierId) => {
35119
35121
  });
35120
35122
  };
35121
35123
 
35122
- var __defProp$o = Object.defineProperty;
35123
- var __defProps$l = Object.defineProperties;
35124
- var __getOwnPropDescs$l = Object.getOwnPropertyDescriptors;
35125
- var __getOwnPropSymbols$y = Object.getOwnPropertySymbols;
35126
- var __hasOwnProp$y = Object.prototype.hasOwnProperty;
35127
- var __propIsEnum$y = Object.prototype.propertyIsEnumerable;
35128
- var __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35129
- var __spreadValues$o = (a, b) => {
35124
+ var __defProp$p = Object.defineProperty;
35125
+ var __defProps$m = Object.defineProperties;
35126
+ var __getOwnPropDescs$m = Object.getOwnPropertyDescriptors;
35127
+ var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
35128
+ var __hasOwnProp$z = Object.prototype.hasOwnProperty;
35129
+ var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
35130
+ var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35131
+ var __spreadValues$p = (a, b) => {
35130
35132
  for (var prop in b || (b = {}))
35131
- if (__hasOwnProp$y.call(b, prop))
35132
- __defNormalProp$o(a, prop, b[prop]);
35133
- if (__getOwnPropSymbols$y)
35134
- for (var prop of __getOwnPropSymbols$y(b)) {
35135
- if (__propIsEnum$y.call(b, prop))
35136
- __defNormalProp$o(a, prop, b[prop]);
35133
+ if (__hasOwnProp$z.call(b, prop))
35134
+ __defNormalProp$p(a, prop, b[prop]);
35135
+ if (__getOwnPropSymbols$z)
35136
+ for (var prop of __getOwnPropSymbols$z(b)) {
35137
+ if (__propIsEnum$z.call(b, prop))
35138
+ __defNormalProp$p(a, prop, b[prop]);
35137
35139
  }
35138
35140
  return a;
35139
35141
  };
35140
- var __spreadProps$l = (a, b) => __defProps$l(a, __getOwnPropDescs$l(b));
35141
- var __objRest$l = (source, exclude) => {
35142
+ var __spreadProps$m = (a, b) => __defProps$m(a, __getOwnPropDescs$m(b));
35143
+ var __objRest$m = (source, exclude) => {
35142
35144
  var target = {};
35143
35145
  for (var prop in source)
35144
- if (__hasOwnProp$y.call(source, prop) && exclude.indexOf(prop) < 0)
35146
+ if (__hasOwnProp$z.call(source, prop) && exclude.indexOf(prop) < 0)
35145
35147
  target[prop] = source[prop];
35146
- if (source != null && __getOwnPropSymbols$y)
35147
- for (var prop of __getOwnPropSymbols$y(source)) {
35148
- if (exclude.indexOf(prop) < 0 && __propIsEnum$y.call(source, prop))
35148
+ if (source != null && __getOwnPropSymbols$z)
35149
+ for (var prop of __getOwnPropSymbols$z(source)) {
35150
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$z.call(source, prop))
35149
35151
  target[prop] = source[prop];
35150
35152
  }
35151
35153
  return target;
35152
35154
  };
35153
35155
  const useListCarriers = (params) => {
35154
35156
  const { client } = useShipEngine();
35155
- const _a = __spreadValues$o({}, params), { queryFnParams } = _a, rest = __objRest$l(_a, ["queryFnParams"]);
35156
- return reactQuery.useQuery(__spreadProps$l(__spreadValues$o({}, rest), {
35157
+ const _a = __spreadValues$p({}, params), { queryFnParams } = _a, rest = __objRest$m(_a, ["queryFnParams"]);
35158
+ return reactQuery.useQuery(__spreadProps$m(__spreadValues$p({}, rest), {
35157
35159
  onError,
35158
35160
  queryFn: () => client.carriers.list(queryFnParams),
35159
35161
  queryKey: ["useListCarriers", queryFnParams],
@@ -35161,22 +35163,22 @@ const useListCarriers = (params) => {
35161
35163
  }));
35162
35164
  };
35163
35165
 
35164
- var __getOwnPropSymbols$x = Object.getOwnPropertySymbols;
35165
- var __hasOwnProp$x = Object.prototype.hasOwnProperty;
35166
- var __propIsEnum$x = Object.prototype.propertyIsEnumerable;
35167
- var __objRest$k = (source, exclude) => {
35166
+ var __getOwnPropSymbols$y = Object.getOwnPropertySymbols;
35167
+ var __hasOwnProp$y = Object.prototype.hasOwnProperty;
35168
+ var __propIsEnum$y = Object.prototype.propertyIsEnumerable;
35169
+ var __objRest$l = (source, exclude) => {
35168
35170
  var target = {};
35169
35171
  for (var prop in source)
35170
- if (__hasOwnProp$x.call(source, prop) && exclude.indexOf(prop) < 0)
35172
+ if (__hasOwnProp$y.call(source, prop) && exclude.indexOf(prop) < 0)
35171
35173
  target[prop] = source[prop];
35172
- if (source != null && __getOwnPropSymbols$x)
35173
- for (var prop of __getOwnPropSymbols$x(source)) {
35174
- if (exclude.indexOf(prop) < 0 && __propIsEnum$x.call(source, prop))
35174
+ if (source != null && __getOwnPropSymbols$y)
35175
+ for (var prop of __getOwnPropSymbols$y(source)) {
35176
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$y.call(source, prop))
35175
35177
  target[prop] = source[prop];
35176
35178
  }
35177
35179
  return target;
35178
35180
  };
35179
- var __async$H = (__this, __arguments, generator) => {
35181
+ var __async$I = (__this, __arguments, generator) => {
35180
35182
  return new Promise((resolve, reject) => {
35181
35183
  var fulfilled = (value) => {
35182
35184
  try {
@@ -35200,8 +35202,8 @@ const useUpdateAutoFunding = () => {
35200
35202
  const { client } = useShipEngine();
35201
35203
  const queryClient = reactQuery.useQueryClient();
35202
35204
  return reactQuery.useMutation({
35203
- mutationFn: (_a) => __async$H(void 0, null, function* () {
35204
- var _b = _a, { carrierId } = _b, options = __objRest$k(_b, ["carrierId"]);
35205
+ mutationFn: (_a) => __async$I(void 0, null, function* () {
35206
+ var _b = _a, { carrierId } = _b, options = __objRest$l(_b, ["carrierId"]);
35205
35207
  const result = yield client.carriers.updateAutoFunding(carrierId, options);
35206
35208
  return result.data;
35207
35209
  }),
@@ -35230,7 +35232,7 @@ const useGetZonesByCarrier = (carrierId) => {
35230
35232
  });
35231
35233
  };
35232
35234
 
35233
- var __async$G = (__this, __arguments, generator) => {
35235
+ var __async$H = (__this, __arguments, generator) => {
35234
35236
  return new Promise((resolve, reject) => {
35235
35237
  var fulfilled = (value) => {
35236
35238
  try {
@@ -35253,7 +35255,7 @@ var __async$G = (__this, __arguments, generator) => {
35253
35255
  const useDeleteCarrier = () => {
35254
35256
  const { client } = useShipEngine();
35255
35257
  return reactQuery.useMutation({
35256
- mutationFn: (carrierId) => __async$G(void 0, null, function* () {
35258
+ mutationFn: (carrierId) => __async$H(void 0, null, function* () {
35257
35259
  const result = yield client.carriers.delete(carrierId);
35258
35260
  return result.data;
35259
35261
  }),
@@ -35262,24 +35264,24 @@ const useDeleteCarrier = () => {
35262
35264
  });
35263
35265
  };
35264
35266
 
35265
- var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
35266
- var __hasOwnProp$w = Object.prototype.hasOwnProperty;
35267
- var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
35268
- var __objRest$j = (source, exclude) => {
35267
+ var __getOwnPropSymbols$x = Object.getOwnPropertySymbols;
35268
+ var __hasOwnProp$x = Object.prototype.hasOwnProperty;
35269
+ var __propIsEnum$x = Object.prototype.propertyIsEnumerable;
35270
+ var __objRest$k = (source, exclude) => {
35269
35271
  var target = {};
35270
35272
  for (var prop in source)
35271
- if (__hasOwnProp$w.call(source, prop) && exclude.indexOf(prop) < 0)
35273
+ if (__hasOwnProp$x.call(source, prop) && exclude.indexOf(prop) < 0)
35272
35274
  target[prop] = source[prop];
35273
- if (source != null && __getOwnPropSymbols$w)
35274
- for (var prop of __getOwnPropSymbols$w(source)) {
35275
- if (exclude.indexOf(prop) < 0 && __propIsEnum$w.call(source, prop))
35275
+ if (source != null && __getOwnPropSymbols$x)
35276
+ for (var prop of __getOwnPropSymbols$x(source)) {
35277
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$x.call(source, prop))
35276
35278
  target[prop] = source[prop];
35277
35279
  }
35278
35280
  return target;
35279
35281
  };
35280
35282
  const useGetCarrierConnectionForm = (_params) => {
35281
35283
  const { client } = useShipEngine();
35282
- const _a = _params || {}, { carrierName, enabled = true } = _a, params = __objRest$j(_a, ["carrierName", "enabled"]);
35284
+ const _a = _params || {}, { carrierName, enabled = true } = _a, params = __objRest$k(_a, ["carrierName", "enabled"]);
35283
35285
  return reactQuery.useQuery({
35284
35286
  enabled,
35285
35287
  onError,
@@ -35289,24 +35291,24 @@ const useGetCarrierConnectionForm = (_params) => {
35289
35291
  });
35290
35292
  };
35291
35293
 
35292
- var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
35293
- var __hasOwnProp$v = Object.prototype.hasOwnProperty;
35294
- var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
35295
- var __objRest$i = (source, exclude) => {
35294
+ var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
35295
+ var __hasOwnProp$w = Object.prototype.hasOwnProperty;
35296
+ var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
35297
+ var __objRest$j = (source, exclude) => {
35296
35298
  var target = {};
35297
35299
  for (var prop in source)
35298
- if (__hasOwnProp$v.call(source, prop) && exclude.indexOf(prop) < 0)
35300
+ if (__hasOwnProp$w.call(source, prop) && exclude.indexOf(prop) < 0)
35299
35301
  target[prop] = source[prop];
35300
- if (source != null && __getOwnPropSymbols$v)
35301
- for (var prop of __getOwnPropSymbols$v(source)) {
35302
- if (exclude.indexOf(prop) < 0 && __propIsEnum$v.call(source, prop))
35302
+ if (source != null && __getOwnPropSymbols$w)
35303
+ for (var prop of __getOwnPropSymbols$w(source)) {
35304
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$w.call(source, prop))
35303
35305
  target[prop] = source[prop];
35304
35306
  }
35305
35307
  return target;
35306
35308
  };
35307
35309
  const useListCarrierConnections = (_params) => {
35308
35310
  const { client } = useShipEngine();
35309
- const _a = _params || {}, { enabled = true } = _a, params = __objRest$i(_a, ["enabled"]);
35311
+ const _a = _params || {}, { enabled = true } = _a, params = __objRest$j(_a, ["enabled"]);
35310
35312
  return reactQuery.useQuery({
35311
35313
  enabled,
35312
35314
  onError,
@@ -35316,7 +35318,7 @@ const useListCarrierConnections = (_params) => {
35316
35318
  });
35317
35319
  };
35318
35320
 
35319
- var __async$F = (__this, __arguments, generator) => {
35321
+ var __async$G = (__this, __arguments, generator) => {
35320
35322
  return new Promise((resolve, reject) => {
35321
35323
  var fulfilled = (value) => {
35322
35324
  try {
@@ -35339,7 +35341,7 @@ var __async$F = (__this, __arguments, generator) => {
35339
35341
  const useConnectCarrierAccount = () => {
35340
35342
  const { client } = useShipEngine();
35341
35343
  return reactQuery.useMutation({
35342
- mutationFn: (_0) => __async$F(void 0, [_0], function* ({ carrierName, formData }) {
35344
+ mutationFn: (_0) => __async$G(void 0, [_0], function* ({ carrierName, formData }) {
35343
35345
  const result = yield client.connections.connectCarrier(carrierName, formData);
35344
35346
  return result.data;
35345
35347
  }),
@@ -35359,33 +35361,33 @@ const useCarrierConnectionsServicesList = (carrierCode) => {
35359
35361
  });
35360
35362
  };
35361
35363
 
35362
- var __defProp$n = Object.defineProperty;
35363
- var __defProps$k = Object.defineProperties;
35364
- var __getOwnPropDescs$k = Object.getOwnPropertyDescriptors;
35365
- var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
35366
- var __hasOwnProp$u = Object.prototype.hasOwnProperty;
35367
- var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
35368
- var __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35369
- var __spreadValues$n = (a, b) => {
35364
+ var __defProp$o = Object.defineProperty;
35365
+ var __defProps$l = Object.defineProperties;
35366
+ var __getOwnPropDescs$l = Object.getOwnPropertyDescriptors;
35367
+ var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
35368
+ var __hasOwnProp$v = Object.prototype.hasOwnProperty;
35369
+ var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
35370
+ var __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35371
+ var __spreadValues$o = (a, b) => {
35370
35372
  for (var prop in b || (b = {}))
35371
- if (__hasOwnProp$u.call(b, prop))
35372
- __defNormalProp$n(a, prop, b[prop]);
35373
- if (__getOwnPropSymbols$u)
35374
- for (var prop of __getOwnPropSymbols$u(b)) {
35375
- if (__propIsEnum$u.call(b, prop))
35376
- __defNormalProp$n(a, prop, b[prop]);
35373
+ if (__hasOwnProp$v.call(b, prop))
35374
+ __defNormalProp$o(a, prop, b[prop]);
35375
+ if (__getOwnPropSymbols$v)
35376
+ for (var prop of __getOwnPropSymbols$v(b)) {
35377
+ if (__propIsEnum$v.call(b, prop))
35378
+ __defNormalProp$o(a, prop, b[prop]);
35377
35379
  }
35378
35380
  return a;
35379
35381
  };
35380
- var __spreadProps$k = (a, b) => __defProps$k(a, __getOwnPropDescs$k(b));
35381
- var __objRest$h = (source, exclude) => {
35382
+ var __spreadProps$l = (a, b) => __defProps$l(a, __getOwnPropDescs$l(b));
35383
+ var __objRest$i = (source, exclude) => {
35382
35384
  var target = {};
35383
35385
  for (var prop in source)
35384
- if (__hasOwnProp$u.call(source, prop) && exclude.indexOf(prop) < 0)
35386
+ if (__hasOwnProp$v.call(source, prop) && exclude.indexOf(prop) < 0)
35385
35387
  target[prop] = source[prop];
35386
- if (source != null && __getOwnPropSymbols$u)
35387
- for (var prop of __getOwnPropSymbols$u(source)) {
35388
- if (exclude.indexOf(prop) < 0 && __propIsEnum$u.call(source, prop))
35388
+ if (source != null && __getOwnPropSymbols$v)
35389
+ for (var prop of __getOwnPropSymbols$v(source)) {
35390
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$v.call(source, prop))
35389
35391
  target[prop] = source[prop];
35390
35392
  }
35391
35393
  return target;
@@ -35393,12 +35395,12 @@ var __objRest$h = (source, exclude) => {
35393
35395
  const useGetConnectionsCarrierSettings = (_a) => {
35394
35396
  var _b = _a, {
35395
35397
  queryFnParams
35396
- } = _b, params = __objRest$h(_b, [
35398
+ } = _b, params = __objRest$i(_b, [
35397
35399
  "queryFnParams"
35398
35400
  ]);
35399
35401
  const { client } = useShipEngine();
35400
35402
  const { carrierName, carrierId } = queryFnParams;
35401
- return reactQuery.useQuery(__spreadProps$k(__spreadValues$n({}, params), {
35403
+ return reactQuery.useQuery(__spreadProps$l(__spreadValues$o({}, params), {
35402
35404
  onError,
35403
35405
  queryFn: () => client.connections.getCarrierSettings(carrierName, carrierId),
35404
35406
  queryKey: ["useGetConnectionsCarrierSettings", carrierName, carrierId],
@@ -35406,26 +35408,26 @@ const useGetConnectionsCarrierSettings = (_a) => {
35406
35408
  }));
35407
35409
  };
35408
35410
 
35409
- var __defProp$m = Object.defineProperty;
35410
- var __defProps$j = Object.defineProperties;
35411
- var __getOwnPropDescs$j = Object.getOwnPropertyDescriptors;
35412
- var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
35413
- var __hasOwnProp$t = Object.prototype.hasOwnProperty;
35414
- var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
35415
- var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35416
- var __spreadValues$m = (a, b) => {
35411
+ var __defProp$n = Object.defineProperty;
35412
+ var __defProps$k = Object.defineProperties;
35413
+ var __getOwnPropDescs$k = Object.getOwnPropertyDescriptors;
35414
+ var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
35415
+ var __hasOwnProp$u = Object.prototype.hasOwnProperty;
35416
+ var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
35417
+ var __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35418
+ var __spreadValues$n = (a, b) => {
35417
35419
  for (var prop in b || (b = {}))
35418
- if (__hasOwnProp$t.call(b, prop))
35419
- __defNormalProp$m(a, prop, b[prop]);
35420
- if (__getOwnPropSymbols$t)
35421
- for (var prop of __getOwnPropSymbols$t(b)) {
35422
- if (__propIsEnum$t.call(b, prop))
35423
- __defNormalProp$m(a, prop, b[prop]);
35420
+ if (__hasOwnProp$u.call(b, prop))
35421
+ __defNormalProp$n(a, prop, b[prop]);
35422
+ if (__getOwnPropSymbols$u)
35423
+ for (var prop of __getOwnPropSymbols$u(b)) {
35424
+ if (__propIsEnum$u.call(b, prop))
35425
+ __defNormalProp$n(a, prop, b[prop]);
35424
35426
  }
35425
35427
  return a;
35426
35428
  };
35427
- var __spreadProps$j = (a, b) => __defProps$j(a, __getOwnPropDescs$j(b));
35428
- var __async$E = (__this, __arguments, generator) => {
35429
+ var __spreadProps$k = (a, b) => __defProps$k(a, __getOwnPropDescs$k(b));
35430
+ var __async$F = (__this, __arguments, generator) => {
35429
35431
  return new Promise((resolve, reject) => {
35430
35432
  var fulfilled = (value) => {
35431
35433
  try {
@@ -35447,8 +35449,8 @@ var __async$E = (__this, __arguments, generator) => {
35447
35449
  };
35448
35450
  const useUpdateConnectionsCarrierSettings = (params) => {
35449
35451
  const { client } = useShipEngine();
35450
- return reactQuery.useMutation(__spreadProps$j(__spreadValues$m({}, params), {
35451
- mutationFn: (_0) => __async$E(void 0, [_0], function* ({
35452
+ return reactQuery.useMutation(__spreadProps$k(__spreadValues$n({}, params), {
35453
+ mutationFn: (_0) => __async$F(void 0, [_0], function* ({
35452
35454
  carrierName,
35453
35455
  carrierId,
35454
35456
  formData
@@ -35475,7 +35477,7 @@ const useListCustomPackageTypes = () => {
35475
35477
  });
35476
35478
  };
35477
35479
 
35478
- var __async$D = (__this, __arguments, generator) => {
35480
+ var __async$E = (__this, __arguments, generator) => {
35479
35481
  return new Promise((resolve, reject) => {
35480
35482
  var fulfilled = (value) => {
35481
35483
  try {
@@ -35498,7 +35500,7 @@ var __async$D = (__this, __arguments, generator) => {
35498
35500
  const useCreateFundingSource = () => {
35499
35501
  const { client } = useShipEngine();
35500
35502
  return reactQuery.useMutation({
35501
- mutationFn: (fundingSource) => __async$D(void 0, null, function* () {
35503
+ mutationFn: (fundingSource) => __async$E(void 0, null, function* () {
35502
35504
  const result = yield client.fundingSources.create(fundingSource);
35503
35505
  return result.data;
35504
35506
  }),
@@ -35507,7 +35509,7 @@ const useCreateFundingSource = () => {
35507
35509
  });
35508
35510
  };
35509
35511
 
35510
- var __async$C = (__this, __arguments, generator) => {
35512
+ var __async$D = (__this, __arguments, generator) => {
35511
35513
  return new Promise((resolve, reject) => {
35512
35514
  var fulfilled = (value) => {
35513
35515
  try {
@@ -35530,7 +35532,7 @@ var __async$C = (__this, __arguments, generator) => {
35530
35532
  const useFundingSourcesAddFunds = () => {
35531
35533
  const { client } = useShipEngine();
35532
35534
  return reactQuery.useMutation({
35533
- mutationFn: (_0) => __async$C(void 0, [_0], function* ({ funds, fundingSourceId }) {
35535
+ mutationFn: (_0) => __async$D(void 0, [_0], function* ({ funds, fundingSourceId }) {
35534
35536
  const result = yield client.fundingSources.addFunds(funds, fundingSourceId);
35535
35537
  return result.data;
35536
35538
  }),
@@ -35559,7 +35561,7 @@ const useListFundingSources = () => {
35559
35561
  });
35560
35562
  };
35561
35563
 
35562
- var __async$B = (__this, __arguments, generator) => {
35564
+ var __async$C = (__this, __arguments, generator) => {
35563
35565
  return new Promise((resolve, reject) => {
35564
35566
  var fulfilled = (value) => {
35565
35567
  try {
@@ -35582,7 +35584,7 @@ var __async$B = (__this, __arguments, generator) => {
35582
35584
  const useRegisterCarrier = () => {
35583
35585
  const { client } = useShipEngine();
35584
35586
  return reactQuery.useMutation({
35585
- mutationFn: (carrier) => __async$B(void 0, null, function* () {
35587
+ mutationFn: (carrier) => __async$C(void 0, null, function* () {
35586
35588
  const result = yield client.fundingSources.registerCarrier(carrier);
35587
35589
  return result.data;
35588
35590
  }),
@@ -35591,7 +35593,7 @@ const useRegisterCarrier = () => {
35591
35593
  });
35592
35594
  };
35593
35595
 
35594
- var __async$A = (__this, __arguments, generator) => {
35596
+ var __async$B = (__this, __arguments, generator) => {
35595
35597
  return new Promise((resolve, reject) => {
35596
35598
  var fulfilled = (value) => {
35597
35599
  try {
@@ -35614,14 +35616,16 @@ var __async$A = (__this, __arguments, generator) => {
35614
35616
  const useUpdateFundingSource = () => {
35615
35617
  const { client } = useShipEngine();
35616
35618
  return reactQuery.useMutation({
35617
- mutationFn: (_0) => __async$A(void 0, [_0], function* ({
35619
+ mutationFn: (_0) => __async$B(void 0, [_0], function* ({
35618
35620
  billingInfo,
35619
35621
  creditCardInfo,
35620
- fundingSourceId
35622
+ fundingSourceId,
35623
+ auctanePayInfo
35621
35624
  }) {
35622
35625
  const result = yield client.fundingSources.update(
35623
35626
  billingInfo,
35624
35627
  creditCardInfo,
35628
+ auctanePayInfo,
35625
35629
  fundingSourceId
35626
35630
  );
35627
35631
  return result.data;
@@ -35653,29 +35657,29 @@ const useGetFundingSourceTransactions = (fundingSourceId, params) => {
35653
35657
  });
35654
35658
  };
35655
35659
 
35656
- var __defProp$l = Object.defineProperty;
35657
- var __defProps$i = Object.defineProperties;
35658
- var __getOwnPropDescs$i = Object.getOwnPropertyDescriptors;
35659
- var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
35660
- var __hasOwnProp$s = Object.prototype.hasOwnProperty;
35661
- var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
35662
- var __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35663
- var __spreadValues$l = (a, b) => {
35660
+ var __defProp$m = Object.defineProperty;
35661
+ var __defProps$j = Object.defineProperties;
35662
+ var __getOwnPropDescs$j = Object.getOwnPropertyDescriptors;
35663
+ var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
35664
+ var __hasOwnProp$t = Object.prototype.hasOwnProperty;
35665
+ var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
35666
+ var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35667
+ var __spreadValues$m = (a, b) => {
35664
35668
  for (var prop in b || (b = {}))
35665
- if (__hasOwnProp$s.call(b, prop))
35666
- __defNormalProp$l(a, prop, b[prop]);
35667
- if (__getOwnPropSymbols$s)
35668
- for (var prop of __getOwnPropSymbols$s(b)) {
35669
- if (__propIsEnum$s.call(b, prop))
35670
- __defNormalProp$l(a, prop, b[prop]);
35669
+ if (__hasOwnProp$t.call(b, prop))
35670
+ __defNormalProp$m(a, prop, b[prop]);
35671
+ if (__getOwnPropSymbols$t)
35672
+ for (var prop of __getOwnPropSymbols$t(b)) {
35673
+ if (__propIsEnum$t.call(b, prop))
35674
+ __defNormalProp$m(a, prop, b[prop]);
35671
35675
  }
35672
35676
  return a;
35673
35677
  };
35674
- var __spreadProps$i = (a, b) => __defProps$i(a, __getOwnPropDescs$i(b));
35678
+ var __spreadProps$j = (a, b) => __defProps$j(a, __getOwnPropDescs$j(b));
35675
35679
  const useGetInsuranceFundingSourceAcceptedTerms = (params) => {
35676
35680
  const { client } = useShipEngine();
35677
- const queryParams = __spreadValues$l({}, params);
35678
- return reactQuery.useQuery(__spreadProps$i(__spreadValues$l({}, queryParams), {
35681
+ const queryParams = __spreadValues$m({}, params);
35682
+ return reactQuery.useQuery(__spreadProps$j(__spreadValues$m({}, queryParams), {
35679
35683
  onError,
35680
35684
  queryFn: () => client.fundingSources.insuranceAcceptedTerms(),
35681
35685
  queryKey: ["useGetInsuranceFundingSourceAcceptedTerms"],
@@ -35698,22 +35702,22 @@ const useGetInsuranceAccount = (insuranceProvider) => {
35698
35702
  });
35699
35703
  };
35700
35704
 
35701
- var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
35702
- var __hasOwnProp$r = Object.prototype.hasOwnProperty;
35703
- var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
35704
- var __objRest$g = (source, exclude) => {
35705
+ var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
35706
+ var __hasOwnProp$s = Object.prototype.hasOwnProperty;
35707
+ var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
35708
+ var __objRest$h = (source, exclude) => {
35705
35709
  var target = {};
35706
35710
  for (var prop in source)
35707
- if (__hasOwnProp$r.call(source, prop) && exclude.indexOf(prop) < 0)
35711
+ if (__hasOwnProp$s.call(source, prop) && exclude.indexOf(prop) < 0)
35708
35712
  target[prop] = source[prop];
35709
- if (source != null && __getOwnPropSymbols$r)
35710
- for (var prop of __getOwnPropSymbols$r(source)) {
35711
- if (exclude.indexOf(prop) < 0 && __propIsEnum$r.call(source, prop))
35713
+ if (source != null && __getOwnPropSymbols$s)
35714
+ for (var prop of __getOwnPropSymbols$s(source)) {
35715
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$s.call(source, prop))
35712
35716
  target[prop] = source[prop];
35713
35717
  }
35714
35718
  return target;
35715
35719
  };
35716
- var __async$z = (__this, __arguments, generator) => {
35720
+ var __async$A = (__this, __arguments, generator) => {
35717
35721
  return new Promise((resolve, reject) => {
35718
35722
  var fulfilled = (value) => {
35719
35723
  try {
@@ -35736,8 +35740,8 @@ var __async$z = (__this, __arguments, generator) => {
35736
35740
  const useAddInsuranceFunds = () => {
35737
35741
  const { client } = useShipEngine();
35738
35742
  return reactQuery.useMutation({
35739
- mutationFn: (_a) => __async$z(void 0, null, function* () {
35740
- var _b = _a, { insuranceProvider } = _b, rest = __objRest$g(_b, ["insuranceProvider"]);
35743
+ mutationFn: (_a) => __async$A(void 0, null, function* () {
35744
+ var _b = _a, { insuranceProvider } = _b, rest = __objRest$h(_b, ["insuranceProvider"]);
35741
35745
  const result = yield client.insurance.addFunds(insuranceProvider, rest);
35742
35746
  return result.data;
35743
35747
  }),
@@ -35746,6 +35750,57 @@ const useAddInsuranceFunds = () => {
35746
35750
  });
35747
35751
  };
35748
35752
 
35753
+ var __defProp$l = Object.defineProperty;
35754
+ var __defProps$i = Object.defineProperties;
35755
+ var __getOwnPropDescs$i = Object.getOwnPropertyDescriptors;
35756
+ var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
35757
+ var __hasOwnProp$r = Object.prototype.hasOwnProperty;
35758
+ var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
35759
+ var __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35760
+ var __spreadValues$l = (a, b) => {
35761
+ for (var prop in b || (b = {}))
35762
+ if (__hasOwnProp$r.call(b, prop))
35763
+ __defNormalProp$l(a, prop, b[prop]);
35764
+ if (__getOwnPropSymbols$r)
35765
+ for (var prop of __getOwnPropSymbols$r(b)) {
35766
+ if (__propIsEnum$r.call(b, prop))
35767
+ __defNormalProp$l(a, prop, b[prop]);
35768
+ }
35769
+ return a;
35770
+ };
35771
+ var __spreadProps$i = (a, b) => __defProps$i(a, __getOwnPropDescs$i(b));
35772
+ var __async$z = (__this, __arguments, generator) => {
35773
+ return new Promise((resolve, reject) => {
35774
+ var fulfilled = (value) => {
35775
+ try {
35776
+ step(generator.next(value));
35777
+ } catch (e) {
35778
+ reject(e);
35779
+ }
35780
+ };
35781
+ var rejected = (value) => {
35782
+ try {
35783
+ step(generator.throw(value));
35784
+ } catch (e) {
35785
+ reject(e);
35786
+ }
35787
+ };
35788
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
35789
+ step((generator = generator.apply(__this, __arguments)).next());
35790
+ });
35791
+ };
35792
+ const useCreateInvoiceAddress = (params) => {
35793
+ const { client } = useShipEngine();
35794
+ return reactQuery.useMutation(__spreadProps$i(__spreadValues$l({}, params), {
35795
+ mutationFn: (invoiceAddress) => __async$z(void 0, null, function* () {
35796
+ const result = yield client.invoiceAddress.create(invoiceAddress);
35797
+ return result.data;
35798
+ }),
35799
+ mutationKey: ["useCreateInvoiceAddress"],
35800
+ onError
35801
+ }));
35802
+ };
35803
+
35749
35804
  var __defProp$k = Object.defineProperty;
35750
35805
  var __defProps$h = Object.defineProperties;
35751
35806
  var __getOwnPropDescs$h = Object.getOwnPropertyDescriptors;
@@ -35785,14 +35840,14 @@ var __async$y = (__this, __arguments, generator) => {
35785
35840
  step((generator = generator.apply(__this, __arguments)).next());
35786
35841
  });
35787
35842
  };
35788
- const useCreateInvoiceAddress = (params) => {
35843
+ const useUpdateInvoiceAddress = (params) => {
35789
35844
  const { client } = useShipEngine();
35790
35845
  return reactQuery.useMutation(__spreadProps$h(__spreadValues$k({}, params), {
35791
35846
  mutationFn: (invoiceAddress) => __async$y(void 0, null, function* () {
35792
- const result = yield client.invoiceAddress.create(invoiceAddress);
35847
+ const result = yield client.invoiceAddress.update(invoiceAddress);
35793
35848
  return result.data;
35794
35849
  }),
35795
- mutationKey: ["useCreateInvoiceAddress"],
35850
+ mutationKey: ["useUpdateInvoiceAddress"],
35796
35851
  onError
35797
35852
  }));
35798
35853
  };
@@ -35816,6 +35871,31 @@ var __spreadValues$j = (a, b) => {
35816
35871
  return a;
35817
35872
  };
35818
35873
  var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
35874
+ const useGetInvoiceAddress = (params) => {
35875
+ const { client } = useShipEngine();
35876
+ return reactQuery.useQuery(__spreadProps$g(__spreadValues$j({}, params), {
35877
+ onError,
35878
+ queryFn: () => client.invoiceAddress.get(),
35879
+ queryKey: ["useGetInvoiceAddress"],
35880
+ select: (result) => result.data
35881
+ }));
35882
+ };
35883
+
35884
+ var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
35885
+ var __hasOwnProp$o = Object.prototype.hasOwnProperty;
35886
+ var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
35887
+ var __objRest$g = (source, exclude) => {
35888
+ var target = {};
35889
+ for (var prop in source)
35890
+ if (__hasOwnProp$o.call(source, prop) && exclude.indexOf(prop) < 0)
35891
+ target[prop] = source[prop];
35892
+ if (source != null && __getOwnPropSymbols$o)
35893
+ for (var prop of __getOwnPropSymbols$o(source)) {
35894
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$o.call(source, prop))
35895
+ target[prop] = source[prop];
35896
+ }
35897
+ return target;
35898
+ };
35819
35899
  var __async$x = (__this, __arguments, generator) => {
35820
35900
  return new Promise((resolve, reject) => {
35821
35901
  var fulfilled = (value) => {
@@ -35836,50 +35916,53 @@ var __async$x = (__this, __arguments, generator) => {
35836
35916
  step((generator = generator.apply(__this, __arguments)).next());
35837
35917
  });
35838
35918
  };
35839
- const useUpdateInvoiceAddress = (params) => {
35919
+ const useCreateLabel = () => {
35840
35920
  const { client } = useShipEngine();
35841
- return reactQuery.useMutation(__spreadProps$g(__spreadValues$j({}, params), {
35842
- mutationFn: (invoiceAddress) => __async$x(void 0, null, function* () {
35843
- const result = yield client.invoiceAddress.update(invoiceAddress);
35921
+ return reactQuery.useMutation({
35922
+ mutationFn: (_a) => __async$x(void 0, null, function* () {
35923
+ var _b = _a, { rateId } = _b, options = __objRest$g(_b, ["rateId"]);
35924
+ const result = yield client.labels.createByRateId(rateId, options);
35844
35925
  return result.data;
35845
35926
  }),
35846
- mutationKey: ["useUpdateInvoiceAddress"],
35927
+ mutationKey: ["useCreateLabel"],
35847
35928
  onError
35848
- }));
35929
+ });
35930
+ };
35931
+
35932
+ const useGetLabel = (labelId) => {
35933
+ const { client } = useShipEngine();
35934
+ return reactQuery.useQuery({
35935
+ enabled: labelId !== void 0,
35936
+ onError,
35937
+ queryFn: () => {
35938
+ if (labelId)
35939
+ return client.labels.get(labelId);
35940
+ return Promise.reject(new Error("labelId is require"));
35941
+ },
35942
+ queryKey: ["useGetLabel", labelId],
35943
+ select: (result) => result.data
35944
+ });
35849
35945
  };
35850
35946
 
35851
35947
  var __defProp$i = Object.defineProperty;
35852
35948
  var __defProps$f = Object.defineProperties;
35853
35949
  var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
35854
- var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
35855
- var __hasOwnProp$o = Object.prototype.hasOwnProperty;
35856
- var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
35950
+ var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
35951
+ var __hasOwnProp$n = Object.prototype.hasOwnProperty;
35952
+ var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
35857
35953
  var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35858
35954
  var __spreadValues$i = (a, b) => {
35859
35955
  for (var prop in b || (b = {}))
35860
- if (__hasOwnProp$o.call(b, prop))
35956
+ if (__hasOwnProp$n.call(b, prop))
35861
35957
  __defNormalProp$i(a, prop, b[prop]);
35862
- if (__getOwnPropSymbols$o)
35863
- for (var prop of __getOwnPropSymbols$o(b)) {
35864
- if (__propIsEnum$o.call(b, prop))
35958
+ if (__getOwnPropSymbols$n)
35959
+ for (var prop of __getOwnPropSymbols$n(b)) {
35960
+ if (__propIsEnum$n.call(b, prop))
35865
35961
  __defNormalProp$i(a, prop, b[prop]);
35866
35962
  }
35867
35963
  return a;
35868
35964
  };
35869
35965
  var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
35870
- const useGetInvoiceAddress = (params) => {
35871
- const { client } = useShipEngine();
35872
- return reactQuery.useQuery(__spreadProps$f(__spreadValues$i({}, params), {
35873
- onError,
35874
- queryFn: () => client.invoiceAddress.get(),
35875
- queryKey: ["useGetInvoiceAddress"],
35876
- select: (result) => result.data
35877
- }));
35878
- };
35879
-
35880
- var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
35881
- var __hasOwnProp$n = Object.prototype.hasOwnProperty;
35882
- var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
35883
35966
  var __objRest$f = (source, exclude) => {
35884
35967
  var target = {};
35885
35968
  for (var prop in source)
@@ -35892,6 +35975,17 @@ var __objRest$f = (source, exclude) => {
35892
35975
  }
35893
35976
  return target;
35894
35977
  };
35978
+ const useListLabels = (params) => {
35979
+ const { client } = useShipEngine();
35980
+ const _a = __spreadValues$i({}, params), { queryFnParams } = _a, rest = __objRest$f(_a, ["queryFnParams"]);
35981
+ return reactQuery.useQuery(__spreadProps$f(__spreadValues$i({}, rest), {
35982
+ onError,
35983
+ queryFn: () => client.labels.list(queryFnParams),
35984
+ queryKey: ["useListLabels", params],
35985
+ select: (result) => result.data
35986
+ }));
35987
+ };
35988
+
35895
35989
  var __async$w = (__this, __arguments, generator) => {
35896
35990
  return new Promise((resolve, reject) => {
35897
35991
  var fulfilled = (value) => {
@@ -35912,34 +36006,18 @@ var __async$w = (__this, __arguments, generator) => {
35912
36006
  step((generator = generator.apply(__this, __arguments)).next());
35913
36007
  });
35914
36008
  };
35915
- const useCreateLabel = () => {
36009
+ const useVoidLabel = () => {
35916
36010
  const { client } = useShipEngine();
35917
36011
  return reactQuery.useMutation({
35918
- mutationFn: (_a) => __async$w(void 0, null, function* () {
35919
- var _b = _a, { rateId } = _b, options = __objRest$f(_b, ["rateId"]);
35920
- const result = yield client.labels.createByRateId(rateId, options);
36012
+ mutationFn: (labelId) => __async$w(void 0, null, function* () {
36013
+ const result = yield client.labels.void(labelId);
35921
36014
  return result.data;
35922
36015
  }),
35923
- mutationKey: ["useCreateLabel"],
36016
+ mutationKey: ["useVoidLabel"],
35924
36017
  onError
35925
36018
  });
35926
36019
  };
35927
36020
 
35928
- const useGetLabel = (labelId) => {
35929
- const { client } = useShipEngine();
35930
- return reactQuery.useQuery({
35931
- enabled: labelId !== void 0,
35932
- onError,
35933
- queryFn: () => {
35934
- if (labelId)
35935
- return client.labels.get(labelId);
35936
- return Promise.reject(new Error("labelId is require"));
35937
- },
35938
- queryKey: ["useGetLabel", labelId],
35939
- select: (result) => result.data
35940
- });
35941
- };
35942
-
35943
36021
  var __defProp$h = Object.defineProperty;
35944
36022
  var __defProps$e = Object.defineProperties;
35945
36023
  var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
@@ -35971,17 +36049,6 @@ var __objRest$e = (source, exclude) => {
35971
36049
  }
35972
36050
  return target;
35973
36051
  };
35974
- const useListLabels = (params) => {
35975
- const { client } = useShipEngine();
35976
- const _a = __spreadValues$h({}, params), { queryFnParams } = _a, rest = __objRest$e(_a, ["queryFnParams"]);
35977
- return reactQuery.useQuery(__spreadProps$e(__spreadValues$h({}, rest), {
35978
- onError,
35979
- queryFn: () => client.labels.list(queryFnParams),
35980
- queryKey: ["useListLabels", params],
35981
- select: (result) => result.data
35982
- }));
35983
- };
35984
-
35985
36052
  var __async$v = (__this, __arguments, generator) => {
35986
36053
  return new Promise((resolve, reject) => {
35987
36054
  var fulfilled = (value) => {
@@ -36002,16 +36069,30 @@ var __async$v = (__this, __arguments, generator) => {
36002
36069
  step((generator = generator.apply(__this, __arguments)).next());
36003
36070
  });
36004
36071
  };
36005
- const useVoidLabel = () => {
36072
+ const useListLabelsInfinite = (params) => {
36006
36073
  const { client } = useShipEngine();
36007
- return reactQuery.useMutation({
36008
- mutationFn: (labelId) => __async$v(void 0, null, function* () {
36009
- const result = yield client.labels.void(labelId);
36010
- return result.data;
36074
+ const _a = __spreadValues$h({}, params), { queryFnParams } = _a, rest = __objRest$e(_a, ["queryFnParams"]);
36075
+ return reactQuery.useInfiniteQuery(__spreadProps$e(__spreadValues$h({}, rest), {
36076
+ getNextPageParam: (lastPage) => {
36077
+ if (lastPage.page < lastPage.pages) {
36078
+ return lastPage.page + 1;
36079
+ }
36080
+ return void 0;
36081
+ },
36082
+ onError,
36083
+ queryFn: (_0) => __async$v(void 0, [_0], function* ({ pageParam = 1 }) {
36084
+ const response = yield client.labels.list(__spreadProps$e(__spreadValues$h({}, queryFnParams), { page: pageParam }));
36085
+ return response.data;
36011
36086
  }),
36012
- mutationKey: ["useVoidLabel"],
36013
- onError
36014
- });
36087
+ queryKey: ["useListLabelsInfinite", params],
36088
+ select: (data) => {
36089
+ return {
36090
+ labels: data.pages.flatMap((page) => page.labels),
36091
+ pageParams: data.pageParams,
36092
+ pages: data.pages
36093
+ };
36094
+ }
36095
+ }));
36015
36096
  };
36016
36097
 
36017
36098
  var __defProp$g = Object.defineProperty;
@@ -39098,6 +39179,7 @@ exports.useListCarriers = useListCarriers;
39098
39179
  exports.useListCustomPackageTypes = useListCustomPackageTypes;
39099
39180
  exports.useListFundingSources = useListFundingSources;
39100
39181
  exports.useListLabels = useListLabels;
39182
+ exports.useListLabelsInfinite = useListLabelsInfinite;
39101
39183
  exports.useListOrderSources = useListOrderSources;
39102
39184
  exports.useListOrderSourcesConnections = useListOrderSourcesConnections;
39103
39185
  exports.useListRateCards = useListRateCards;