@shipengine/alchemy 6.0.41 → 6.0.43

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 +560 -441
  2. package/index.mjs +559 -442
  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$N = Object.getOwnPropertySymbols;
10816
- var __hasOwnProp$N = Object.prototype.hasOwnProperty;
10817
- var __propIsEnum$N = Object.prototype.propertyIsEnumerable;
10818
- var __objRest$r = (source, exclude) => {
10815
+ var __getOwnPropSymbols$P = Object.getOwnPropertySymbols;
10816
+ var __hasOwnProp$P = Object.prototype.hasOwnProperty;
10817
+ var __propIsEnum$P = Object.prototype.propertyIsEnumerable;
10818
+ var __objRest$t = (source, exclude) => {
10819
10819
  var target = {};
10820
10820
  for (var prop in source)
10821
- if (__hasOwnProp$N.call(source, prop) && exclude.indexOf(prop) < 0)
10821
+ if (__hasOwnProp$P.call(source, prop) && exclude.indexOf(prop) < 0)
10822
10822
  target[prop] = source[prop];
10823
- if (source != null && __getOwnPropSymbols$N)
10824
- for (var prop of __getOwnPropSymbols$N(source)) {
10825
- if (exclude.indexOf(prop) < 0 && __propIsEnum$N.call(source, prop))
10823
+ if (source != null && __getOwnPropSymbols$P)
10824
+ for (var prop of __getOwnPropSymbols$P(source)) {
10825
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$P.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$r(_b, ["message"]);
10839
+ var _b = _a, { message } = _b, options = __objRest$t(_b, ["message"]);
10840
10840
  return new CodedError(message, options);
10841
10841
  }
10842
10842
  }
@@ -10957,17 +10957,17 @@ const types = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
10957
10957
  RateCardStatus
10958
10958
  }, Symbol.toStringTag, { value: 'Module' }));
10959
10959
 
10960
- var __getOwnPropSymbols$M = Object.getOwnPropertySymbols;
10961
- var __hasOwnProp$M = Object.prototype.hasOwnProperty;
10962
- var __propIsEnum$M = Object.prototype.propertyIsEnumerable;
10963
- var __objRest$q = (source, exclude) => {
10960
+ var __getOwnPropSymbols$O = Object.getOwnPropertySymbols;
10961
+ var __hasOwnProp$O = Object.prototype.hasOwnProperty;
10962
+ var __propIsEnum$O = Object.prototype.propertyIsEnumerable;
10963
+ var __objRest$s = (source, exclude) => {
10964
10964
  var target = {};
10965
10965
  for (var prop in source)
10966
- if (__hasOwnProp$M.call(source, prop) && exclude.indexOf(prop) < 0)
10966
+ if (__hasOwnProp$O.call(source, prop) && exclude.indexOf(prop) < 0)
10967
10967
  target[prop] = source[prop];
10968
- if (source != null && __getOwnPropSymbols$M)
10969
- for (var prop of __getOwnPropSymbols$M(source)) {
10970
- if (exclude.indexOf(prop) < 0 && __propIsEnum$M.call(source, prop))
10968
+ if (source != null && __getOwnPropSymbols$O)
10969
+ for (var prop of __getOwnPropSymbols$O(source)) {
10970
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$O.call(source, prop))
10971
10971
  target[prop] = source[prop];
10972
10972
  }
10973
10973
  return target;
@@ -10999,7 +10999,7 @@ class AccountSettingsAPI {
10999
10999
  * The `updateImage` method updates specific image data for a given image id.
11000
11000
  */
11001
11001
  this.updateImage = (_a) => {
11002
- var _b = _a, { labelImageId } = _b, data = __objRest$q(_b, ["labelImageId"]);
11002
+ var _b = _a, { labelImageId } = _b, data = __objRest$s(_b, ["labelImageId"]);
11003
11003
  return this.client.put(`/v1/account/settings/images/${labelImageId}`, data);
11004
11004
  };
11005
11005
  /**
@@ -13771,7 +13771,7 @@ var ipaddr = {
13771
13771
  }).call(commonjsGlobal);
13772
13772
  } (ipaddr));
13773
13773
 
13774
- var __async$$ = (__this, __arguments, generator) => {
13774
+ var __async$10 = (__this, __arguments, generator) => {
13775
13775
  return new Promise((resolve, reject) => {
13776
13776
  var fulfilled = (value) => {
13777
13777
  try {
@@ -13791,7 +13791,7 @@ var __async$$ = (__this, __arguments, generator) => {
13791
13791
  step((generator = generator.apply(__this, __arguments)).next());
13792
13792
  });
13793
13793
  };
13794
- const getEndUserIpAddress = () => __async$$(void 0, null, function* () {
13794
+ const getEndUserIpAddress = () => __async$10(void 0, null, function* () {
13795
13795
  try {
13796
13796
  const response = yield axios.get("https://api.ipify.org/?format=json");
13797
13797
  if (response.data.ip && ipaddrExports.isValid(response.data.ip)) {
@@ -13848,38 +13848,38 @@ const decamelizeKeys = (obj, separator = "_") => {
13848
13848
  return obj;
13849
13849
  };
13850
13850
 
13851
- var __defProp$B = Object.defineProperty;
13852
- var __defProps$v = Object.defineProperties;
13853
- var __getOwnPropDescs$v = Object.getOwnPropertyDescriptors;
13854
- var __getOwnPropSymbols$L = Object.getOwnPropertySymbols;
13855
- var __hasOwnProp$L = Object.prototype.hasOwnProperty;
13856
- var __propIsEnum$L = Object.prototype.propertyIsEnumerable;
13857
- var __defNormalProp$B = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13858
- var __spreadValues$B = (a, b) => {
13851
+ var __defProp$D = Object.defineProperty;
13852
+ var __defProps$x = Object.defineProperties;
13853
+ var __getOwnPropDescs$x = Object.getOwnPropertyDescriptors;
13854
+ var __getOwnPropSymbols$N = Object.getOwnPropertySymbols;
13855
+ var __hasOwnProp$N = Object.prototype.hasOwnProperty;
13856
+ var __propIsEnum$N = Object.prototype.propertyIsEnumerable;
13857
+ var __defNormalProp$D = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13858
+ var __spreadValues$D = (a, b) => {
13859
13859
  for (var prop in b || (b = {}))
13860
- if (__hasOwnProp$L.call(b, prop))
13861
- __defNormalProp$B(a, prop, b[prop]);
13862
- if (__getOwnPropSymbols$L)
13863
- for (var prop of __getOwnPropSymbols$L(b)) {
13864
- if (__propIsEnum$L.call(b, prop))
13865
- __defNormalProp$B(a, prop, b[prop]);
13860
+ if (__hasOwnProp$N.call(b, prop))
13861
+ __defNormalProp$D(a, prop, b[prop]);
13862
+ if (__getOwnPropSymbols$N)
13863
+ for (var prop of __getOwnPropSymbols$N(b)) {
13864
+ if (__propIsEnum$N.call(b, prop))
13865
+ __defNormalProp$D(a, prop, b[prop]);
13866
13866
  }
13867
13867
  return a;
13868
13868
  };
13869
- var __spreadProps$v = (a, b) => __defProps$v(a, __getOwnPropDescs$v(b));
13870
- var __objRest$p = (source, exclude) => {
13869
+ var __spreadProps$x = (a, b) => __defProps$x(a, __getOwnPropDescs$x(b));
13870
+ var __objRest$r = (source, exclude) => {
13871
13871
  var target = {};
13872
13872
  for (var prop in source)
13873
- if (__hasOwnProp$L.call(source, prop) && exclude.indexOf(prop) < 0)
13873
+ if (__hasOwnProp$N.call(source, prop) && exclude.indexOf(prop) < 0)
13874
13874
  target[prop] = source[prop];
13875
- if (source != null && __getOwnPropSymbols$L)
13876
- for (var prop of __getOwnPropSymbols$L(source)) {
13877
- if (exclude.indexOf(prop) < 0 && __propIsEnum$L.call(source, prop))
13875
+ if (source != null && __getOwnPropSymbols$N)
13876
+ for (var prop of __getOwnPropSymbols$N(source)) {
13877
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$N.call(source, prop))
13878
13878
  target[prop] = source[prop];
13879
13879
  }
13880
13880
  return target;
13881
13881
  };
13882
- var __async$_ = (__this, __arguments, generator) => {
13882
+ var __async$$ = (__this, __arguments, generator) => {
13883
13883
  return new Promise((resolve, reject) => {
13884
13884
  var fulfilled = (value) => {
13885
13885
  try {
@@ -13919,12 +13919,12 @@ class CarriersAPI {
13919
13919
  /**
13920
13920
  * The `connect` method connects a carrier account to a user's ShipEngine account.
13921
13921
  */
13922
- this.connect = (_a) => __async$_(this, null, function* () {
13923
- var _b = _a, { carrierCode } = _b, connection = __objRest$p(_b, ["carrierCode"]);
13922
+ this.connect = (_a) => __async$$(this, null, function* () {
13923
+ var _b = _a, { carrierCode } = _b, connection = __objRest$r(_b, ["carrierCode"]);
13924
13924
  const endUserIpAddress = yield getEndUserIpAddress();
13925
13925
  if (!endUserIpAddress)
13926
13926
  return Promise.reject([new CodedError("Unable to get IP address")]);
13927
- return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$v(__spreadValues$B({}, connection), {
13927
+ return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$x(__spreadValues$D({}, connection), {
13928
13928
  endUserIpAddress
13929
13929
  }));
13930
13930
  });
@@ -14010,7 +14010,7 @@ class CarriersAPI {
14010
14010
  }
14011
14011
  }
14012
14012
 
14013
- var __async$Z = (__this, __arguments, generator) => {
14013
+ var __async$_ = (__this, __arguments, generator) => {
14014
14014
  return new Promise((resolve, reject) => {
14015
14015
  var fulfilled = (value) => {
14016
14016
  try {
@@ -14052,7 +14052,7 @@ class ConnectionsAPI {
14052
14052
  /**
14053
14053
  * The `connectCarrier` method connects a carrier to account.
14054
14054
  */
14055
- this.connectCarrier = (carrierName, formData) => __async$Z(this, null, function* () {
14055
+ this.connectCarrier = (carrierName, formData) => __async$_(this, null, function* () {
14056
14056
  return yield this.client.post(
14057
14057
  `/v1/connections/carriers/${carrierName}`,
14058
14058
  formData,
@@ -16208,23 +16208,23 @@ class CustomPackagesAPI {
16208
16208
  }
16209
16209
  }
16210
16210
 
16211
- var __defProp$A = Object.defineProperty;
16212
- var __getOwnPropSymbols$K = Object.getOwnPropertySymbols;
16213
- var __hasOwnProp$K = Object.prototype.hasOwnProperty;
16214
- var __propIsEnum$K = Object.prototype.propertyIsEnumerable;
16215
- var __defNormalProp$A = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16216
- var __spreadValues$A = (a, b) => {
16211
+ var __defProp$C = Object.defineProperty;
16212
+ var __getOwnPropSymbols$M = Object.getOwnPropertySymbols;
16213
+ var __hasOwnProp$M = Object.prototype.hasOwnProperty;
16214
+ var __propIsEnum$M = Object.prototype.propertyIsEnumerable;
16215
+ var __defNormalProp$C = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16216
+ var __spreadValues$C = (a, b) => {
16217
16217
  for (var prop in b || (b = {}))
16218
- if (__hasOwnProp$K.call(b, prop))
16219
- __defNormalProp$A(a, prop, b[prop]);
16220
- if (__getOwnPropSymbols$K)
16221
- for (var prop of __getOwnPropSymbols$K(b)) {
16222
- if (__propIsEnum$K.call(b, prop))
16223
- __defNormalProp$A(a, prop, b[prop]);
16218
+ if (__hasOwnProp$M.call(b, prop))
16219
+ __defNormalProp$C(a, prop, b[prop]);
16220
+ if (__getOwnPropSymbols$M)
16221
+ for (var prop of __getOwnPropSymbols$M(b)) {
16222
+ if (__propIsEnum$M.call(b, prop))
16223
+ __defNormalProp$C(a, prop, b[prop]);
16224
16224
  }
16225
16225
  return a;
16226
16226
  };
16227
- var __async$Y = (__this, __arguments, generator) => {
16227
+ var __async$Z = (__this, __arguments, generator) => {
16228
16228
  return new Promise((resolve, reject) => {
16229
16229
  var fulfilled = (value) => {
16230
16230
  try {
@@ -16263,12 +16263,12 @@ class FundingSourcesAPI {
16263
16263
  * The `create` method creates a new funding source for a given user. This requires
16264
16264
  * payment information to be collected from the user.
16265
16265
  */
16266
- this.create = (createFundingSource) => __async$Y(this, null, function* () {
16266
+ this.create = (createFundingSource) => __async$Z(this, null, function* () {
16267
16267
  const endUserIpAddress = yield getEndUserIpAddress();
16268
16268
  if (!endUserIpAddress) {
16269
16269
  return Promise.reject([new CodedError("Unable to get IP address")]);
16270
16270
  }
16271
- return yield this.client.post("/v1/funding_sources", __spreadValues$A({
16271
+ return yield this.client.post("/v1/funding_sources", __spreadValues$C({
16272
16272
  endUserIpAddress
16273
16273
  }, createFundingSource));
16274
16274
  });
@@ -16277,7 +16277,7 @@ class FundingSourcesAPI {
16277
16277
  * user to update the billing address or payment information associated with the
16278
16278
  * funding source.
16279
16279
  */
16280
- this.update = (billingInfo, creditCardInfo, auctanePayInfo, fundingSourceId) => __async$Y(this, null, function* () {
16280
+ this.update = (billingInfo, creditCardInfo, auctanePayInfo, fundingSourceId) => __async$Z(this, null, function* () {
16281
16281
  const endUserIpAddress = yield getEndUserIpAddress();
16282
16282
  if (!endUserIpAddress) {
16283
16283
  return Promise.reject([new CodedError("Unable to get IP address")]);
@@ -16287,7 +16287,7 @@ class FundingSourcesAPI {
16287
16287
  {
16288
16288
  billingInfo,
16289
16289
  endUserIpAddress,
16290
- paymentMethod: __spreadValues$A({
16290
+ paymentMethod: __spreadValues$C({
16291
16291
  creditCardInfo
16292
16292
  }, auctanePayInfo)
16293
16293
  }
@@ -16297,19 +16297,19 @@ class FundingSourcesAPI {
16297
16297
  * The `registerCarrier` method registers a carrier account and associates
16298
16298
  * it with a given funding source.
16299
16299
  */
16300
- this.registerCarrier = (carrier) => __async$Y(this, null, function* () {
16300
+ this.registerCarrier = (carrier) => __async$Z(this, null, function* () {
16301
16301
  const endUserIpAddress = yield getEndUserIpAddress();
16302
16302
  if (!endUserIpAddress) {
16303
16303
  return Promise.reject([new CodedError("Unable to get IP address")]);
16304
16304
  }
16305
- return yield this.client.post("/v1/registration/funding_source", __spreadValues$A({
16305
+ return yield this.client.post("/v1/registration/funding_source", __spreadValues$C({
16306
16306
  endUserIpAddress
16307
16307
  }, carrier));
16308
16308
  });
16309
16309
  /**
16310
16310
  * The `addFunds` method allows you to add funds to a funding source.
16311
16311
  */
16312
- this.addFunds = (amount, fundingSourceId) => __async$Y(this, null, function* () {
16312
+ this.addFunds = (amount, fundingSourceId) => __async$Z(this, null, function* () {
16313
16313
  return yield this.client.put(
16314
16314
  `/v1/funding_sources/${fundingSourceId}/add_funds`,
16315
16315
  amount
@@ -16319,7 +16319,7 @@ class FundingSourcesAPI {
16319
16319
  * The `metadata` method returns seller-specific requirements for creating funding sources
16320
16320
  * and attaching carriers
16321
16321
  */
16322
- this.metadata = () => __async$Y(this, null, function* () {
16322
+ this.metadata = () => __async$Z(this, null, function* () {
16323
16323
  return yield this.client.get("/v1/funding_sources/metadata");
16324
16324
  });
16325
16325
  /**
@@ -16371,7 +16371,7 @@ class InsuranceAPI {
16371
16371
  }
16372
16372
  }
16373
16373
 
16374
- var __async$X = (__this, __arguments, generator) => {
16374
+ var __async$Y = (__this, __arguments, generator) => {
16375
16375
  return new Promise((resolve, reject) => {
16376
16376
  var fulfilled = (value) => {
16377
16377
  try {
@@ -16403,13 +16403,13 @@ class InvoiceAddressAPI {
16403
16403
  /**
16404
16404
  * The `create` method creates a new invoice address for a given user.
16405
16405
  */
16406
- this.create = (invoiceAddress) => __async$X(this, null, function* () {
16406
+ this.create = (invoiceAddress) => __async$Y(this, null, function* () {
16407
16407
  return yield this.client.post("/v1/invoice_address", invoiceAddress);
16408
16408
  });
16409
16409
  /**
16410
16410
  * The `update` method updates a invoice address for a given user.
16411
16411
  */
16412
- this.update = (invoiceAddress) => __async$X(this, null, function* () {
16412
+ this.update = (invoiceAddress) => __async$Y(this, null, function* () {
16413
16413
  return yield this.client.put("/v1/invoice_address", invoiceAddress);
16414
16414
  });
16415
16415
  this.client = client;
@@ -16455,21 +16455,33 @@ class LabelsAPI {
16455
16455
  this.void = (labelId) => {
16456
16456
  return this.client.put(`/v1/labels/${labelId}/void`);
16457
16457
  };
16458
+ /**
16459
+ * The `download` method allows for downloading a CSV document of labels based on the provided parameters.
16460
+ */
16461
+ this.download = (params) => {
16462
+ return this.client.get("/v1/labels/downloads", {
16463
+ headers: {
16464
+ Accept: "text/csv"
16465
+ },
16466
+ params,
16467
+ responseType: "blob"
16468
+ });
16469
+ };
16458
16470
  this.client = client;
16459
16471
  }
16460
16472
  }
16461
16473
 
16462
- var __getOwnPropSymbols$J = Object.getOwnPropertySymbols;
16463
- var __hasOwnProp$J = Object.prototype.hasOwnProperty;
16464
- var __propIsEnum$J = Object.prototype.propertyIsEnumerable;
16465
- var __objRest$o = (source, exclude) => {
16474
+ var __getOwnPropSymbols$L = Object.getOwnPropertySymbols;
16475
+ var __hasOwnProp$L = Object.prototype.hasOwnProperty;
16476
+ var __propIsEnum$L = Object.prototype.propertyIsEnumerable;
16477
+ var __objRest$q = (source, exclude) => {
16466
16478
  var target = {};
16467
16479
  for (var prop in source)
16468
- if (__hasOwnProp$J.call(source, prop) && exclude.indexOf(prop) < 0)
16480
+ if (__hasOwnProp$L.call(source, prop) && exclude.indexOf(prop) < 0)
16469
16481
  target[prop] = source[prop];
16470
- if (source != null && __getOwnPropSymbols$J)
16471
- for (var prop of __getOwnPropSymbols$J(source)) {
16472
- if (exclude.indexOf(prop) < 0 && __propIsEnum$J.call(source, prop))
16482
+ if (source != null && __getOwnPropSymbols$L)
16483
+ for (var prop of __getOwnPropSymbols$L(source)) {
16484
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$L.call(source, prop))
16473
16485
  target[prop] = source[prop];
16474
16486
  }
16475
16487
  return target;
@@ -16501,7 +16513,7 @@ class OrderSourcesAPI {
16501
16513
  * The `update` method will allow the user to update a connected Order Source
16502
16514
  */
16503
16515
  this.update = (_a) => {
16504
- var _b = _a, { orderSourceId } = _b, rest = __objRest$o(_b, ["orderSourceId"]);
16516
+ var _b = _a, { orderSourceId } = _b, rest = __objRest$q(_b, ["orderSourceId"]);
16505
16517
  return this.client.put(`/v-beta/order_sources/${orderSourceId}`, rest);
16506
16518
  };
16507
16519
  /**
@@ -16590,19 +16602,19 @@ class RateCardsAPI {
16590
16602
  }
16591
16603
  }
16592
16604
 
16593
- var __defProp$z = Object.defineProperty;
16594
- var __getOwnPropSymbols$I = Object.getOwnPropertySymbols;
16595
- var __hasOwnProp$I = Object.prototype.hasOwnProperty;
16596
- var __propIsEnum$I = Object.prototype.propertyIsEnumerable;
16597
- var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16598
- var __spreadValues$z = (a, b) => {
16605
+ var __defProp$B = Object.defineProperty;
16606
+ var __getOwnPropSymbols$K = Object.getOwnPropertySymbols;
16607
+ var __hasOwnProp$K = Object.prototype.hasOwnProperty;
16608
+ var __propIsEnum$K = Object.prototype.propertyIsEnumerable;
16609
+ var __defNormalProp$B = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16610
+ var __spreadValues$B = (a, b) => {
16599
16611
  for (var prop in b || (b = {}))
16600
- if (__hasOwnProp$I.call(b, prop))
16601
- __defNormalProp$z(a, prop, b[prop]);
16602
- if (__getOwnPropSymbols$I)
16603
- for (var prop of __getOwnPropSymbols$I(b)) {
16604
- if (__propIsEnum$I.call(b, prop))
16605
- __defNormalProp$z(a, prop, b[prop]);
16612
+ if (__hasOwnProp$K.call(b, prop))
16613
+ __defNormalProp$B(a, prop, b[prop]);
16614
+ if (__getOwnPropSymbols$K)
16615
+ for (var prop of __getOwnPropSymbols$K(b)) {
16616
+ if (__propIsEnum$K.call(b, prop))
16617
+ __defNormalProp$B(a, prop, b[prop]);
16606
16618
  }
16607
16619
  return a;
16608
16620
  };
@@ -16624,7 +16636,7 @@ class RatesAPI {
16624
16636
  * method.
16625
16637
  */
16626
16638
  this.estimate = (params) => {
16627
- return this.client.post("/v1/rates/estimate", __spreadValues$z({}, params));
16639
+ return this.client.post("/v1/rates/estimate", __spreadValues$B({}, params));
16628
16640
  };
16629
16641
  this.client = client;
16630
16642
  }
@@ -16704,7 +16716,7 @@ class SalesOrdersAPI {
16704
16716
  }
16705
16717
  }
16706
16718
 
16707
- var __async$W = (__this, __arguments, generator) => {
16719
+ var __async$X = (__this, __arguments, generator) => {
16708
16720
  return new Promise((resolve, reject) => {
16709
16721
  var fulfilled = (value) => {
16710
16722
  try {
@@ -16762,7 +16774,7 @@ class SellersAPI {
16762
16774
  /**
16763
16775
  * Deletes an API Key
16764
16776
  */
16765
- this.deleteSellerApiKey = (_0) => __async$W(this, [_0], function* ({
16777
+ this.deleteSellerApiKey = (_0) => __async$X(this, [_0], function* ({
16766
16778
  encryptedApiKey,
16767
16779
  sellerId,
16768
16780
  isSandbox
@@ -16808,19 +16820,19 @@ class SellersAPI {
16808
16820
  }
16809
16821
  }
16810
16822
 
16811
- var __defProp$y = Object.defineProperty;
16812
- var __getOwnPropSymbols$H = Object.getOwnPropertySymbols;
16813
- var __hasOwnProp$H = Object.prototype.hasOwnProperty;
16814
- var __propIsEnum$H = Object.prototype.propertyIsEnumerable;
16815
- var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16816
- var __spreadValues$y = (a, b) => {
16823
+ var __defProp$A = Object.defineProperty;
16824
+ var __getOwnPropSymbols$J = Object.getOwnPropertySymbols;
16825
+ var __hasOwnProp$J = Object.prototype.hasOwnProperty;
16826
+ var __propIsEnum$J = Object.prototype.propertyIsEnumerable;
16827
+ var __defNormalProp$A = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16828
+ var __spreadValues$A = (a, b) => {
16817
16829
  for (var prop in b || (b = {}))
16818
- if (__hasOwnProp$H.call(b, prop))
16819
- __defNormalProp$y(a, prop, b[prop]);
16820
- if (__getOwnPropSymbols$H)
16821
- for (var prop of __getOwnPropSymbols$H(b)) {
16822
- if (__propIsEnum$H.call(b, prop))
16823
- __defNormalProp$y(a, prop, b[prop]);
16830
+ if (__hasOwnProp$J.call(b, prop))
16831
+ __defNormalProp$A(a, prop, b[prop]);
16832
+ if (__getOwnPropSymbols$J)
16833
+ for (var prop of __getOwnPropSymbols$J(b)) {
16834
+ if (__propIsEnum$J.call(b, prop))
16835
+ __defNormalProp$A(a, prop, b[prop]);
16824
16836
  }
16825
16837
  return a;
16826
16838
  };
@@ -16832,7 +16844,7 @@ class ServicePointsAPI {
16832
16844
  * Either an address, coordinates, or an address query
16833
16845
  */
16834
16846
  this.list = (options) => {
16835
- return this.client.post("/v1/service_points/list", __spreadValues$y({}, options));
16847
+ return this.client.post("/v1/service_points/list", __spreadValues$A({}, options));
16836
16848
  };
16837
16849
  /**
16838
16850
  * Get a specific service point by its carrier code, country code, and id
@@ -16850,7 +16862,7 @@ class ServicePointsAPI {
16850
16862
  }
16851
16863
  }
16852
16864
 
16853
- var __async$V = (__this, __arguments, generator) => {
16865
+ var __async$W = (__this, __arguments, generator) => {
16854
16866
  return new Promise((resolve, reject) => {
16855
16867
  var fulfilled = (value) => {
16856
16868
  try {
@@ -16899,7 +16911,7 @@ class ShipmentsAPI {
16899
16911
  * The `create` method allows for creating shipments based on a list of shipment
16900
16912
  * items passed into this method.
16901
16913
  */
16902
- this.create = (...shipments) => __async$V(this, null, function* () {
16914
+ this.create = (...shipments) => __async$W(this, null, function* () {
16903
16915
  return this.client.post("/v1/shipments", {
16904
16916
  shipments
16905
16917
  });
@@ -34291,26 +34303,26 @@ class WebhooksAPI {
34291
34303
  }
34292
34304
  }
34293
34305
 
34294
- var __defProp$x = Object.defineProperty;
34295
- var __defProps$u = Object.defineProperties;
34296
- var __getOwnPropDescs$u = Object.getOwnPropertyDescriptors;
34297
- var __getOwnPropSymbols$G = Object.getOwnPropertySymbols;
34298
- var __hasOwnProp$G = Object.prototype.hasOwnProperty;
34299
- var __propIsEnum$G = Object.prototype.propertyIsEnumerable;
34300
- var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
34301
- var __spreadValues$x = (a, b) => {
34306
+ var __defProp$z = Object.defineProperty;
34307
+ var __defProps$w = Object.defineProperties;
34308
+ var __getOwnPropDescs$w = Object.getOwnPropertyDescriptors;
34309
+ var __getOwnPropSymbols$I = Object.getOwnPropertySymbols;
34310
+ var __hasOwnProp$I = Object.prototype.hasOwnProperty;
34311
+ var __propIsEnum$I = Object.prototype.propertyIsEnumerable;
34312
+ var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
34313
+ var __spreadValues$z = (a, b) => {
34302
34314
  for (var prop in b || (b = {}))
34303
- if (__hasOwnProp$G.call(b, prop))
34304
- __defNormalProp$x(a, prop, b[prop]);
34305
- if (__getOwnPropSymbols$G)
34306
- for (var prop of __getOwnPropSymbols$G(b)) {
34307
- if (__propIsEnum$G.call(b, prop))
34308
- __defNormalProp$x(a, prop, b[prop]);
34315
+ if (__hasOwnProp$I.call(b, prop))
34316
+ __defNormalProp$z(a, prop, b[prop]);
34317
+ if (__getOwnPropSymbols$I)
34318
+ for (var prop of __getOwnPropSymbols$I(b)) {
34319
+ if (__propIsEnum$I.call(b, prop))
34320
+ __defNormalProp$z(a, prop, b[prop]);
34309
34321
  }
34310
34322
  return a;
34311
34323
  };
34312
- var __spreadProps$u = (a, b) => __defProps$u(a, __getOwnPropDescs$u(b));
34313
- var __async$U = (__this, __arguments, generator) => {
34324
+ var __spreadProps$w = (a, b) => __defProps$w(a, __getOwnPropDescs$w(b));
34325
+ var __async$V = (__this, __arguments, generator) => {
34314
34326
  return new Promise((resolve, reject) => {
34315
34327
  var fulfilled = (value) => {
34316
34328
  try {
@@ -34333,7 +34345,7 @@ var __async$U = (__this, __arguments, generator) => {
34333
34345
  const logger$1 = E({
34334
34346
  level: process.env.NODE_ENV === "production" ? "fatal" : "info",
34335
34347
  name: "shipengine-api",
34336
- serializers: __spreadProps$u(__spreadValues$x({}, k), {
34348
+ serializers: __spreadProps$w(__spreadValues$z({}, k), {
34337
34349
  req: (req) => ({
34338
34350
  headers: req.headers,
34339
34351
  method: req.method,
@@ -34358,7 +34370,7 @@ class ShipEngineAPI {
34358
34370
  this.getSandboxToken = getSandboxToken;
34359
34371
  const client = axios.create({
34360
34372
  baseURL,
34361
- headers: __spreadProps$u(__spreadValues$x({}, headers), {
34373
+ headers: __spreadProps$w(__spreadValues$z({}, headers), {
34362
34374
  "Content-Type": "application/json"
34363
34375
  }),
34364
34376
  paramsSerializer: (params) => lib.stringify(decamelizeKeys(params), { arrayFormat: "brackets" }),
@@ -34393,7 +34405,7 @@ class ShipEngineAPI {
34393
34405
  });
34394
34406
  client.defaults.headers.common["Authorization"] = `Bearer ${token}`;
34395
34407
  client.interceptors.request.use(
34396
- (config) => __async$U(this, null, function* () {
34408
+ (config) => __async$V(this, null, function* () {
34397
34409
  if (config.isSandbox) {
34398
34410
  if (!this.sandboxToken) {
34399
34411
  this.sandboxToken = yield getSandboxToken == null ? void 0 : getSandboxToken();
@@ -34420,7 +34432,7 @@ class ShipEngineAPI {
34420
34432
  );
34421
34433
  return res;
34422
34434
  },
34423
- (err) => __async$U(this, null, function* () {
34435
+ (err) => __async$V(this, null, function* () {
34424
34436
  var _a, _b, _c, _d, _e;
34425
34437
  logger$1.error(
34426
34438
  { err, req: err.config, res: err.response },
@@ -34467,7 +34479,7 @@ class ShipEngineAPI {
34467
34479
  * that token (also known as Seller ID)
34468
34480
  */
34469
34481
  getTenant(isSandbox) {
34470
- return __async$U(this, null, function* () {
34482
+ return __async$V(this, null, function* () {
34471
34483
  var _a;
34472
34484
  if (!isSandbox) {
34473
34485
  return this.getTenantFromToken(this.token);
@@ -34762,25 +34774,25 @@ const delay = (ms) => new Promise((resolve) => {
34762
34774
 
34763
34775
  const onError = (_errors) => _default();
34764
34776
 
34765
- var __defProp$w = Object.defineProperty;
34766
- var __defProps$t = Object.defineProperties;
34767
- var __getOwnPropDescs$t = Object.getOwnPropertyDescriptors;
34768
- var __getOwnPropSymbols$F = Object.getOwnPropertySymbols;
34769
- var __hasOwnProp$F = Object.prototype.hasOwnProperty;
34770
- var __propIsEnum$F = Object.prototype.propertyIsEnumerable;
34771
- var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
34772
- var __spreadValues$w = (a, b) => {
34777
+ var __defProp$y = Object.defineProperty;
34778
+ var __defProps$v = Object.defineProperties;
34779
+ var __getOwnPropDescs$v = Object.getOwnPropertyDescriptors;
34780
+ var __getOwnPropSymbols$H = Object.getOwnPropertySymbols;
34781
+ var __hasOwnProp$H = Object.prototype.hasOwnProperty;
34782
+ var __propIsEnum$H = Object.prototype.propertyIsEnumerable;
34783
+ var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
34784
+ var __spreadValues$y = (a, b) => {
34773
34785
  for (var prop in b || (b = {}))
34774
- if (__hasOwnProp$F.call(b, prop))
34775
- __defNormalProp$w(a, prop, b[prop]);
34776
- if (__getOwnPropSymbols$F)
34777
- for (var prop of __getOwnPropSymbols$F(b)) {
34778
- if (__propIsEnum$F.call(b, prop))
34779
- __defNormalProp$w(a, prop, b[prop]);
34786
+ if (__hasOwnProp$H.call(b, prop))
34787
+ __defNormalProp$y(a, prop, b[prop]);
34788
+ if (__getOwnPropSymbols$H)
34789
+ for (var prop of __getOwnPropSymbols$H(b)) {
34790
+ if (__propIsEnum$H.call(b, prop))
34791
+ __defNormalProp$y(a, prop, b[prop]);
34780
34792
  }
34781
34793
  return a;
34782
34794
  };
34783
- var __spreadProps$t = (a, b) => __defProps$t(a, __getOwnPropDescs$t(b));
34795
+ var __spreadProps$v = (a, b) => __defProps$v(a, __getOwnPropDescs$v(b));
34784
34796
  const streams = [];
34785
34797
  if (process.env.NODE_ENV === "production") {
34786
34798
  streams.push({
@@ -34789,7 +34801,7 @@ if (process.env.NODE_ENV === "production") {
34789
34801
  }
34790
34802
  const logger = E({
34791
34803
  name: "shipengine",
34792
- serializers: __spreadProps$t(__spreadValues$w({}, k), {
34804
+ serializers: __spreadProps$v(__spreadValues$y({}, k), {
34793
34805
  req: (req) => ({
34794
34806
  headers: req.headers,
34795
34807
  method: req.method,
@@ -34814,7 +34826,7 @@ const retryUntil = (callbackFn, retries = 10, timeoutBetweenAttempts = 1e3) => P
34814
34826
  throw error;
34815
34827
  });
34816
34828
 
34817
- var __async$T = (__this, __arguments, generator) => {
34829
+ var __async$U = (__this, __arguments, generator) => {
34818
34830
  return new Promise((resolve, reject) => {
34819
34831
  var fulfilled = (value) => {
34820
34832
  try {
@@ -34837,7 +34849,7 @@ var __async$T = (__this, __arguments, generator) => {
34837
34849
  const useCreateAccountImage = () => {
34838
34850
  const { client } = useShipEngine();
34839
34851
  return reactQuery.useMutation({
34840
- mutationFn: (data) => __async$T(void 0, null, function* () {
34852
+ mutationFn: (data) => __async$U(void 0, null, function* () {
34841
34853
  const result = yield client.accountSettings.createImage(data);
34842
34854
  return result.data;
34843
34855
  }),
@@ -34846,7 +34858,7 @@ const useCreateAccountImage = () => {
34846
34858
  });
34847
34859
  };
34848
34860
 
34849
- var __async$S = (__this, __arguments, generator) => {
34861
+ var __async$T = (__this, __arguments, generator) => {
34850
34862
  return new Promise((resolve, reject) => {
34851
34863
  var fulfilled = (value) => {
34852
34864
  try {
@@ -34869,7 +34881,7 @@ var __async$S = (__this, __arguments, generator) => {
34869
34881
  const useDeleteAccountImage = () => {
34870
34882
  const { client } = useShipEngine();
34871
34883
  return reactQuery.useMutation({
34872
- mutationFn: (labelImageId) => __async$S(void 0, null, function* () {
34884
+ mutationFn: (labelImageId) => __async$T(void 0, null, function* () {
34873
34885
  const result = yield client.accountSettings.deleteImage(labelImageId);
34874
34886
  return result.data;
34875
34887
  }),
@@ -34898,7 +34910,7 @@ const useGetAccountSettings = () => {
34898
34910
  });
34899
34911
  };
34900
34912
 
34901
- var __async$R = (__this, __arguments, generator) => {
34913
+ var __async$S = (__this, __arguments, generator) => {
34902
34914
  return new Promise((resolve, reject) => {
34903
34915
  var fulfilled = (value) => {
34904
34916
  try {
@@ -34921,7 +34933,7 @@ var __async$R = (__this, __arguments, generator) => {
34921
34933
  const useUpdateAccountImage = () => {
34922
34934
  const { client } = useShipEngine();
34923
34935
  return reactQuery.useMutation({
34924
- mutationFn: (data) => __async$R(void 0, null, function* () {
34936
+ mutationFn: (data) => __async$S(void 0, null, function* () {
34925
34937
  const result = yield client.accountSettings.updateImage(data);
34926
34938
  return result.data;
34927
34939
  }),
@@ -34930,7 +34942,7 @@ const useUpdateAccountImage = () => {
34930
34942
  });
34931
34943
  };
34932
34944
 
34933
- var __async$Q = (__this, __arguments, generator) => {
34945
+ var __async$R = (__this, __arguments, generator) => {
34934
34946
  return new Promise((resolve, reject) => {
34935
34947
  var fulfilled = (value) => {
34936
34948
  try {
@@ -34953,7 +34965,7 @@ var __async$Q = (__this, __arguments, generator) => {
34953
34965
  const useUpdateAccountSettings = () => {
34954
34966
  const { client } = useShipEngine();
34955
34967
  return reactQuery.useMutation({
34956
- mutationFn: (settings) => __async$Q(void 0, null, function* () {
34968
+ mutationFn: (settings) => __async$R(void 0, null, function* () {
34957
34969
  const result = yield client.accountSettings.update(settings);
34958
34970
  return result.data;
34959
34971
  }),
@@ -34962,7 +34974,7 @@ const useUpdateAccountSettings = () => {
34962
34974
  });
34963
34975
  };
34964
34976
 
34965
- var __async$P = (__this, __arguments, generator) => {
34977
+ var __async$Q = (__this, __arguments, generator) => {
34966
34978
  return new Promise((resolve, reject) => {
34967
34979
  var fulfilled = (value) => {
34968
34980
  try {
@@ -34985,7 +34997,7 @@ var __async$P = (__this, __arguments, generator) => {
34985
34997
  const useParseAddress = () => {
34986
34998
  const { client } = useShipEngine();
34987
34999
  return reactQuery.useMutation({
34988
- mutationFn: (_0) => __async$P(void 0, [_0], function* ({ address, text }) {
35000
+ mutationFn: (_0) => __async$Q(void 0, [_0], function* ({ address, text }) {
34989
35001
  const result = yield client.addresses.parse(text, address);
34990
35002
  return result.data;
34991
35003
  }),
@@ -34994,7 +35006,7 @@ const useParseAddress = () => {
34994
35006
  });
34995
35007
  };
34996
35008
 
34997
- var __async$O = (__this, __arguments, generator) => {
35009
+ var __async$P = (__this, __arguments, generator) => {
34998
35010
  return new Promise((resolve, reject) => {
34999
35011
  var fulfilled = (value) => {
35000
35012
  try {
@@ -35017,7 +35029,7 @@ var __async$O = (__this, __arguments, generator) => {
35017
35029
  const useValidateAddresses = () => {
35018
35030
  const { client } = useShipEngine();
35019
35031
  return reactQuery.useMutation({
35020
- mutationFn: (addresses) => __async$O(void 0, null, function* () {
35032
+ mutationFn: (addresses) => __async$P(void 0, null, function* () {
35021
35033
  const result = yield client.addresses.validate(addresses);
35022
35034
  return result.data;
35023
35035
  }),
@@ -35026,26 +35038,26 @@ const useValidateAddresses = () => {
35026
35038
  });
35027
35039
  };
35028
35040
 
35029
- var __defProp$v = Object.defineProperty;
35030
- var __defProps$s = Object.defineProperties;
35031
- var __getOwnPropDescs$s = Object.getOwnPropertyDescriptors;
35032
- var __getOwnPropSymbols$E = Object.getOwnPropertySymbols;
35033
- var __hasOwnProp$E = Object.prototype.hasOwnProperty;
35034
- var __propIsEnum$E = Object.prototype.propertyIsEnumerable;
35035
- var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35036
- var __spreadValues$v = (a, b) => {
35041
+ var __defProp$x = Object.defineProperty;
35042
+ var __defProps$u = Object.defineProperties;
35043
+ var __getOwnPropDescs$u = Object.getOwnPropertyDescriptors;
35044
+ var __getOwnPropSymbols$G = Object.getOwnPropertySymbols;
35045
+ var __hasOwnProp$G = Object.prototype.hasOwnProperty;
35046
+ var __propIsEnum$G = Object.prototype.propertyIsEnumerable;
35047
+ var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35048
+ var __spreadValues$x = (a, b) => {
35037
35049
  for (var prop in b || (b = {}))
35038
- if (__hasOwnProp$E.call(b, prop))
35039
- __defNormalProp$v(a, prop, b[prop]);
35040
- if (__getOwnPropSymbols$E)
35041
- for (var prop of __getOwnPropSymbols$E(b)) {
35042
- if (__propIsEnum$E.call(b, prop))
35043
- __defNormalProp$v(a, prop, b[prop]);
35050
+ if (__hasOwnProp$G.call(b, prop))
35051
+ __defNormalProp$x(a, prop, b[prop]);
35052
+ if (__getOwnPropSymbols$G)
35053
+ for (var prop of __getOwnPropSymbols$G(b)) {
35054
+ if (__propIsEnum$G.call(b, prop))
35055
+ __defNormalProp$x(a, prop, b[prop]);
35044
35056
  }
35045
35057
  return a;
35046
35058
  };
35047
- var __spreadProps$s = (a, b) => __defProps$s(a, __getOwnPropDescs$s(b));
35048
- var __async$N = (__this, __arguments, generator) => {
35059
+ var __spreadProps$u = (a, b) => __defProps$u(a, __getOwnPropDescs$u(b));
35060
+ var __async$O = (__this, __arguments, generator) => {
35049
35061
  return new Promise((resolve, reject) => {
35050
35062
  var fulfilled = (value) => {
35051
35063
  try {
@@ -35067,8 +35079,8 @@ var __async$N = (__this, __arguments, generator) => {
35067
35079
  };
35068
35080
  const useCreateAuctanePaySession = (params) => {
35069
35081
  const { client } = useShipEngine();
35070
- return reactQuery.useMutation(__spreadProps$s(__spreadValues$v({}, params), {
35071
- mutationFn: (request) => __async$N(void 0, null, function* () {
35082
+ return reactQuery.useMutation(__spreadProps$u(__spreadValues$x({}, params), {
35083
+ mutationFn: (request) => __async$O(void 0, null, function* () {
35072
35084
  const result = yield client.auctanePay.createSession(request);
35073
35085
  return result.data;
35074
35086
  }),
@@ -35077,29 +35089,29 @@ const useCreateAuctanePaySession = (params) => {
35077
35089
  }));
35078
35090
  };
35079
35091
 
35080
- var __defProp$u = Object.defineProperty;
35081
- var __defProps$r = Object.defineProperties;
35082
- var __getOwnPropDescs$r = Object.getOwnPropertyDescriptors;
35083
- var __getOwnPropSymbols$D = Object.getOwnPropertySymbols;
35084
- var __hasOwnProp$D = Object.prototype.hasOwnProperty;
35085
- var __propIsEnum$D = Object.prototype.propertyIsEnumerable;
35086
- var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35087
- var __spreadValues$u = (a, b) => {
35092
+ var __defProp$w = Object.defineProperty;
35093
+ var __defProps$t = Object.defineProperties;
35094
+ var __getOwnPropDescs$t = Object.getOwnPropertyDescriptors;
35095
+ var __getOwnPropSymbols$F = Object.getOwnPropertySymbols;
35096
+ var __hasOwnProp$F = Object.prototype.hasOwnProperty;
35097
+ var __propIsEnum$F = Object.prototype.propertyIsEnumerable;
35098
+ var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35099
+ var __spreadValues$w = (a, b) => {
35088
35100
  for (var prop in b || (b = {}))
35089
- if (__hasOwnProp$D.call(b, prop))
35090
- __defNormalProp$u(a, prop, b[prop]);
35091
- if (__getOwnPropSymbols$D)
35092
- for (var prop of __getOwnPropSymbols$D(b)) {
35093
- if (__propIsEnum$D.call(b, prop))
35094
- __defNormalProp$u(a, prop, b[prop]);
35101
+ if (__hasOwnProp$F.call(b, prop))
35102
+ __defNormalProp$w(a, prop, b[prop]);
35103
+ if (__getOwnPropSymbols$F)
35104
+ for (var prop of __getOwnPropSymbols$F(b)) {
35105
+ if (__propIsEnum$F.call(b, prop))
35106
+ __defNormalProp$w(a, prop, b[prop]);
35095
35107
  }
35096
35108
  return a;
35097
35109
  };
35098
- var __spreadProps$r = (a, b) => __defProps$r(a, __getOwnPropDescs$r(b));
35110
+ var __spreadProps$t = (a, b) => __defProps$t(a, __getOwnPropDescs$t(b));
35099
35111
  const useGetAuctanePayConfig = (params) => {
35100
35112
  const { client } = useShipEngine();
35101
- const queryParams = __spreadValues$u({}, params);
35102
- return reactQuery.useQuery(__spreadProps$r(__spreadValues$u({}, queryParams), {
35113
+ const queryParams = __spreadValues$w({}, params);
35114
+ return reactQuery.useQuery(__spreadProps$t(__spreadValues$w({}, queryParams), {
35103
35115
  onError,
35104
35116
  queryFn: () => client.auctanePay.getConfig(),
35105
35117
  queryKey: ["useGetAuctanePayConfig"],
@@ -35107,7 +35119,7 @@ const useGetAuctanePayConfig = (params) => {
35107
35119
  }));
35108
35120
  };
35109
35121
 
35110
- var __async$M = (__this, __arguments, generator) => {
35122
+ var __async$N = (__this, __arguments, generator) => {
35111
35123
  return new Promise((resolve, reject) => {
35112
35124
  var fulfilled = (value) => {
35113
35125
  try {
@@ -35130,7 +35142,7 @@ var __async$M = (__this, __arguments, generator) => {
35130
35142
  const useAddFunds = () => {
35131
35143
  const { client } = useShipEngine();
35132
35144
  return reactQuery.useMutation({
35133
- mutationFn: (_0) => __async$M(void 0, [_0], function* ({ carrierId, funds }) {
35145
+ mutationFn: (_0) => __async$N(void 0, [_0], function* ({ carrierId, funds }) {
35134
35146
  const result = yield client.carriers.addFunds(carrierId, funds);
35135
35147
  return result.data;
35136
35148
  }),
@@ -35139,7 +35151,7 @@ const useAddFunds = () => {
35139
35151
  });
35140
35152
  };
35141
35153
 
35142
- var __async$L = (__this, __arguments, generator) => {
35154
+ var __async$M = (__this, __arguments, generator) => {
35143
35155
  return new Promise((resolve, reject) => {
35144
35156
  var fulfilled = (value) => {
35145
35157
  try {
@@ -35162,7 +35174,7 @@ var __async$L = (__this, __arguments, generator) => {
35162
35174
  const useConnectCarrier = () => {
35163
35175
  const { client } = useShipEngine();
35164
35176
  return reactQuery.useMutation({
35165
- mutationFn: (params) => __async$L(void 0, null, function* () {
35177
+ mutationFn: (params) => __async$M(void 0, null, function* () {
35166
35178
  const result = yield client.carriers.connect(params);
35167
35179
  return result.data;
35168
35180
  }),
@@ -35271,41 +35283,41 @@ const useGetServicesByCarrier = (carrierId) => {
35271
35283
  });
35272
35284
  };
35273
35285
 
35274
- var __defProp$t = Object.defineProperty;
35275
- var __defProps$q = Object.defineProperties;
35276
- var __getOwnPropDescs$q = Object.getOwnPropertyDescriptors;
35277
- var __getOwnPropSymbols$C = Object.getOwnPropertySymbols;
35278
- var __hasOwnProp$C = Object.prototype.hasOwnProperty;
35279
- var __propIsEnum$C = Object.prototype.propertyIsEnumerable;
35280
- var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35281
- var __spreadValues$t = (a, b) => {
35286
+ var __defProp$v = Object.defineProperty;
35287
+ var __defProps$s = Object.defineProperties;
35288
+ var __getOwnPropDescs$s = Object.getOwnPropertyDescriptors;
35289
+ var __getOwnPropSymbols$E = Object.getOwnPropertySymbols;
35290
+ var __hasOwnProp$E = Object.prototype.hasOwnProperty;
35291
+ var __propIsEnum$E = Object.prototype.propertyIsEnumerable;
35292
+ var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35293
+ var __spreadValues$v = (a, b) => {
35282
35294
  for (var prop in b || (b = {}))
35283
- if (__hasOwnProp$C.call(b, prop))
35284
- __defNormalProp$t(a, prop, b[prop]);
35285
- if (__getOwnPropSymbols$C)
35286
- for (var prop of __getOwnPropSymbols$C(b)) {
35287
- if (__propIsEnum$C.call(b, prop))
35288
- __defNormalProp$t(a, prop, b[prop]);
35295
+ if (__hasOwnProp$E.call(b, prop))
35296
+ __defNormalProp$v(a, prop, b[prop]);
35297
+ if (__getOwnPropSymbols$E)
35298
+ for (var prop of __getOwnPropSymbols$E(b)) {
35299
+ if (__propIsEnum$E.call(b, prop))
35300
+ __defNormalProp$v(a, prop, b[prop]);
35289
35301
  }
35290
35302
  return a;
35291
35303
  };
35292
- var __spreadProps$q = (a, b) => __defProps$q(a, __getOwnPropDescs$q(b));
35293
- var __objRest$n = (source, exclude) => {
35304
+ var __spreadProps$s = (a, b) => __defProps$s(a, __getOwnPropDescs$s(b));
35305
+ var __objRest$p = (source, exclude) => {
35294
35306
  var target = {};
35295
35307
  for (var prop in source)
35296
- if (__hasOwnProp$C.call(source, prop) && exclude.indexOf(prop) < 0)
35308
+ if (__hasOwnProp$E.call(source, prop) && exclude.indexOf(prop) < 0)
35297
35309
  target[prop] = source[prop];
35298
- if (source != null && __getOwnPropSymbols$C)
35299
- for (var prop of __getOwnPropSymbols$C(source)) {
35300
- if (exclude.indexOf(prop) < 0 && __propIsEnum$C.call(source, prop))
35310
+ if (source != null && __getOwnPropSymbols$E)
35311
+ for (var prop of __getOwnPropSymbols$E(source)) {
35312
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$E.call(source, prop))
35301
35313
  target[prop] = source[prop];
35302
35314
  }
35303
35315
  return target;
35304
35316
  };
35305
35317
  const useListCarriers = (params) => {
35306
35318
  const { client } = useShipEngine();
35307
- const _a = __spreadValues$t({}, params), { queryFnParams } = _a, rest = __objRest$n(_a, ["queryFnParams"]);
35308
- return reactQuery.useQuery(__spreadProps$q(__spreadValues$t({}, rest), {
35319
+ const _a = __spreadValues$v({}, params), { queryFnParams } = _a, rest = __objRest$p(_a, ["queryFnParams"]);
35320
+ return reactQuery.useQuery(__spreadProps$s(__spreadValues$v({}, rest), {
35309
35321
  onError,
35310
35322
  queryFn: () => client.carriers.list(queryFnParams),
35311
35323
  queryKey: ["useListCarriers", queryFnParams],
@@ -35313,22 +35325,22 @@ const useListCarriers = (params) => {
35313
35325
  }));
35314
35326
  };
35315
35327
 
35316
- var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
35317
- var __hasOwnProp$B = Object.prototype.hasOwnProperty;
35318
- var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
35319
- var __objRest$m = (source, exclude) => {
35328
+ var __getOwnPropSymbols$D = Object.getOwnPropertySymbols;
35329
+ var __hasOwnProp$D = Object.prototype.hasOwnProperty;
35330
+ var __propIsEnum$D = Object.prototype.propertyIsEnumerable;
35331
+ var __objRest$o = (source, exclude) => {
35320
35332
  var target = {};
35321
35333
  for (var prop in source)
35322
- if (__hasOwnProp$B.call(source, prop) && exclude.indexOf(prop) < 0)
35334
+ if (__hasOwnProp$D.call(source, prop) && exclude.indexOf(prop) < 0)
35323
35335
  target[prop] = source[prop];
35324
- if (source != null && __getOwnPropSymbols$B)
35325
- for (var prop of __getOwnPropSymbols$B(source)) {
35326
- if (exclude.indexOf(prop) < 0 && __propIsEnum$B.call(source, prop))
35336
+ if (source != null && __getOwnPropSymbols$D)
35337
+ for (var prop of __getOwnPropSymbols$D(source)) {
35338
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$D.call(source, prop))
35327
35339
  target[prop] = source[prop];
35328
35340
  }
35329
35341
  return target;
35330
35342
  };
35331
- var __async$K = (__this, __arguments, generator) => {
35343
+ var __async$L = (__this, __arguments, generator) => {
35332
35344
  return new Promise((resolve, reject) => {
35333
35345
  var fulfilled = (value) => {
35334
35346
  try {
@@ -35352,8 +35364,8 @@ const useUpdateAutoFunding = () => {
35352
35364
  const { client } = useShipEngine();
35353
35365
  const queryClient = reactQuery.useQueryClient();
35354
35366
  return reactQuery.useMutation({
35355
- mutationFn: (_a) => __async$K(void 0, null, function* () {
35356
- var _b = _a, { carrierId } = _b, options = __objRest$m(_b, ["carrierId"]);
35367
+ mutationFn: (_a) => __async$L(void 0, null, function* () {
35368
+ var _b = _a, { carrierId } = _b, options = __objRest$o(_b, ["carrierId"]);
35357
35369
  const result = yield client.carriers.updateAutoFunding(carrierId, options);
35358
35370
  return result.data;
35359
35371
  }),
@@ -35382,7 +35394,7 @@ const useGetZonesByCarrier = (carrierId) => {
35382
35394
  });
35383
35395
  };
35384
35396
 
35385
- var __async$J = (__this, __arguments, generator) => {
35397
+ var __async$K = (__this, __arguments, generator) => {
35386
35398
  return new Promise((resolve, reject) => {
35387
35399
  var fulfilled = (value) => {
35388
35400
  try {
@@ -35405,7 +35417,7 @@ var __async$J = (__this, __arguments, generator) => {
35405
35417
  const useDeleteCarrier = () => {
35406
35418
  const { client } = useShipEngine();
35407
35419
  return reactQuery.useMutation({
35408
- mutationFn: (carrierId) => __async$J(void 0, null, function* () {
35420
+ mutationFn: (carrierId) => __async$K(void 0, null, function* () {
35409
35421
  const result = yield client.carriers.delete(carrierId);
35410
35422
  return result.data;
35411
35423
  }),
@@ -35414,24 +35426,24 @@ const useDeleteCarrier = () => {
35414
35426
  });
35415
35427
  };
35416
35428
 
35417
- var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
35418
- var __hasOwnProp$A = Object.prototype.hasOwnProperty;
35419
- var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
35420
- var __objRest$l = (source, exclude) => {
35429
+ var __getOwnPropSymbols$C = Object.getOwnPropertySymbols;
35430
+ var __hasOwnProp$C = Object.prototype.hasOwnProperty;
35431
+ var __propIsEnum$C = Object.prototype.propertyIsEnumerable;
35432
+ var __objRest$n = (source, exclude) => {
35421
35433
  var target = {};
35422
35434
  for (var prop in source)
35423
- if (__hasOwnProp$A.call(source, prop) && exclude.indexOf(prop) < 0)
35435
+ if (__hasOwnProp$C.call(source, prop) && exclude.indexOf(prop) < 0)
35424
35436
  target[prop] = source[prop];
35425
- if (source != null && __getOwnPropSymbols$A)
35426
- for (var prop of __getOwnPropSymbols$A(source)) {
35427
- if (exclude.indexOf(prop) < 0 && __propIsEnum$A.call(source, prop))
35437
+ if (source != null && __getOwnPropSymbols$C)
35438
+ for (var prop of __getOwnPropSymbols$C(source)) {
35439
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$C.call(source, prop))
35428
35440
  target[prop] = source[prop];
35429
35441
  }
35430
35442
  return target;
35431
35443
  };
35432
35444
  const useGetCarrierConnectionForm = (_params) => {
35433
35445
  const { client } = useShipEngine();
35434
- const _a = _params || {}, { carrierName, enabled = true } = _a, params = __objRest$l(_a, ["carrierName", "enabled"]);
35446
+ const _a = _params || {}, { carrierName, enabled = true } = _a, params = __objRest$n(_a, ["carrierName", "enabled"]);
35435
35447
  return reactQuery.useQuery({
35436
35448
  enabled,
35437
35449
  onError,
@@ -35441,24 +35453,24 @@ const useGetCarrierConnectionForm = (_params) => {
35441
35453
  });
35442
35454
  };
35443
35455
 
35444
- var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
35445
- var __hasOwnProp$z = Object.prototype.hasOwnProperty;
35446
- var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
35447
- var __objRest$k = (source, exclude) => {
35456
+ var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
35457
+ var __hasOwnProp$B = Object.prototype.hasOwnProperty;
35458
+ var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
35459
+ var __objRest$m = (source, exclude) => {
35448
35460
  var target = {};
35449
35461
  for (var prop in source)
35450
- if (__hasOwnProp$z.call(source, prop) && exclude.indexOf(prop) < 0)
35462
+ if (__hasOwnProp$B.call(source, prop) && exclude.indexOf(prop) < 0)
35451
35463
  target[prop] = source[prop];
35452
- if (source != null && __getOwnPropSymbols$z)
35453
- for (var prop of __getOwnPropSymbols$z(source)) {
35454
- if (exclude.indexOf(prop) < 0 && __propIsEnum$z.call(source, prop))
35464
+ if (source != null && __getOwnPropSymbols$B)
35465
+ for (var prop of __getOwnPropSymbols$B(source)) {
35466
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$B.call(source, prop))
35455
35467
  target[prop] = source[prop];
35456
35468
  }
35457
35469
  return target;
35458
35470
  };
35459
35471
  const useListCarrierConnections = (_params) => {
35460
35472
  const { client } = useShipEngine();
35461
- const _a = _params || {}, { enabled = true } = _a, params = __objRest$k(_a, ["enabled"]);
35473
+ const _a = _params || {}, { enabled = true } = _a, params = __objRest$m(_a, ["enabled"]);
35462
35474
  return reactQuery.useQuery({
35463
35475
  enabled,
35464
35476
  onError,
@@ -35468,7 +35480,7 @@ const useListCarrierConnections = (_params) => {
35468
35480
  });
35469
35481
  };
35470
35482
 
35471
- var __async$I = (__this, __arguments, generator) => {
35483
+ var __async$J = (__this, __arguments, generator) => {
35472
35484
  return new Promise((resolve, reject) => {
35473
35485
  var fulfilled = (value) => {
35474
35486
  try {
@@ -35491,7 +35503,7 @@ var __async$I = (__this, __arguments, generator) => {
35491
35503
  const useConnectCarrierAccount = () => {
35492
35504
  const { client } = useShipEngine();
35493
35505
  return reactQuery.useMutation({
35494
- mutationFn: (_0) => __async$I(void 0, [_0], function* ({ carrierName, formData }) {
35506
+ mutationFn: (_0) => __async$J(void 0, [_0], function* ({ carrierName, formData }) {
35495
35507
  const result = yield client.connections.connectCarrier(carrierName, formData);
35496
35508
  return result.data;
35497
35509
  }),
@@ -35511,33 +35523,33 @@ const useCarrierConnectionsServicesList = (carrierCode) => {
35511
35523
  });
35512
35524
  };
35513
35525
 
35514
- var __defProp$s = Object.defineProperty;
35515
- var __defProps$p = Object.defineProperties;
35516
- var __getOwnPropDescs$p = Object.getOwnPropertyDescriptors;
35517
- var __getOwnPropSymbols$y = Object.getOwnPropertySymbols;
35518
- var __hasOwnProp$y = Object.prototype.hasOwnProperty;
35519
- var __propIsEnum$y = Object.prototype.propertyIsEnumerable;
35520
- var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35521
- var __spreadValues$s = (a, b) => {
35526
+ var __defProp$u = Object.defineProperty;
35527
+ var __defProps$r = Object.defineProperties;
35528
+ var __getOwnPropDescs$r = Object.getOwnPropertyDescriptors;
35529
+ var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
35530
+ var __hasOwnProp$A = Object.prototype.hasOwnProperty;
35531
+ var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
35532
+ var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35533
+ var __spreadValues$u = (a, b) => {
35522
35534
  for (var prop in b || (b = {}))
35523
- if (__hasOwnProp$y.call(b, prop))
35524
- __defNormalProp$s(a, prop, b[prop]);
35525
- if (__getOwnPropSymbols$y)
35526
- for (var prop of __getOwnPropSymbols$y(b)) {
35527
- if (__propIsEnum$y.call(b, prop))
35528
- __defNormalProp$s(a, prop, b[prop]);
35535
+ if (__hasOwnProp$A.call(b, prop))
35536
+ __defNormalProp$u(a, prop, b[prop]);
35537
+ if (__getOwnPropSymbols$A)
35538
+ for (var prop of __getOwnPropSymbols$A(b)) {
35539
+ if (__propIsEnum$A.call(b, prop))
35540
+ __defNormalProp$u(a, prop, b[prop]);
35529
35541
  }
35530
35542
  return a;
35531
35543
  };
35532
- var __spreadProps$p = (a, b) => __defProps$p(a, __getOwnPropDescs$p(b));
35533
- var __objRest$j = (source, exclude) => {
35544
+ var __spreadProps$r = (a, b) => __defProps$r(a, __getOwnPropDescs$r(b));
35545
+ var __objRest$l = (source, exclude) => {
35534
35546
  var target = {};
35535
35547
  for (var prop in source)
35536
- if (__hasOwnProp$y.call(source, prop) && exclude.indexOf(prop) < 0)
35548
+ if (__hasOwnProp$A.call(source, prop) && exclude.indexOf(prop) < 0)
35537
35549
  target[prop] = source[prop];
35538
- if (source != null && __getOwnPropSymbols$y)
35539
- for (var prop of __getOwnPropSymbols$y(source)) {
35540
- if (exclude.indexOf(prop) < 0 && __propIsEnum$y.call(source, prop))
35550
+ if (source != null && __getOwnPropSymbols$A)
35551
+ for (var prop of __getOwnPropSymbols$A(source)) {
35552
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$A.call(source, prop))
35541
35553
  target[prop] = source[prop];
35542
35554
  }
35543
35555
  return target;
@@ -35545,12 +35557,12 @@ var __objRest$j = (source, exclude) => {
35545
35557
  const useGetConnectionsCarrierSettings = (_a) => {
35546
35558
  var _b = _a, {
35547
35559
  queryFnParams
35548
- } = _b, params = __objRest$j(_b, [
35560
+ } = _b, params = __objRest$l(_b, [
35549
35561
  "queryFnParams"
35550
35562
  ]);
35551
35563
  const { client } = useShipEngine();
35552
35564
  const { carrierName, carrierId } = queryFnParams;
35553
- return reactQuery.useQuery(__spreadProps$p(__spreadValues$s({}, params), {
35565
+ return reactQuery.useQuery(__spreadProps$r(__spreadValues$u({}, params), {
35554
35566
  onError,
35555
35567
  queryFn: () => client.connections.getCarrierSettings(carrierName, carrierId),
35556
35568
  queryKey: ["useGetConnectionsCarrierSettings", carrierName, carrierId],
@@ -35558,26 +35570,26 @@ const useGetConnectionsCarrierSettings = (_a) => {
35558
35570
  }));
35559
35571
  };
35560
35572
 
35561
- var __defProp$r = Object.defineProperty;
35562
- var __defProps$o = Object.defineProperties;
35563
- var __getOwnPropDescs$o = Object.getOwnPropertyDescriptors;
35564
- var __getOwnPropSymbols$x = Object.getOwnPropertySymbols;
35565
- var __hasOwnProp$x = Object.prototype.hasOwnProperty;
35566
- var __propIsEnum$x = Object.prototype.propertyIsEnumerable;
35567
- var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35568
- var __spreadValues$r = (a, b) => {
35573
+ var __defProp$t = Object.defineProperty;
35574
+ var __defProps$q = Object.defineProperties;
35575
+ var __getOwnPropDescs$q = Object.getOwnPropertyDescriptors;
35576
+ var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
35577
+ var __hasOwnProp$z = Object.prototype.hasOwnProperty;
35578
+ var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
35579
+ var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35580
+ var __spreadValues$t = (a, b) => {
35569
35581
  for (var prop in b || (b = {}))
35570
- if (__hasOwnProp$x.call(b, prop))
35571
- __defNormalProp$r(a, prop, b[prop]);
35572
- if (__getOwnPropSymbols$x)
35573
- for (var prop of __getOwnPropSymbols$x(b)) {
35574
- if (__propIsEnum$x.call(b, prop))
35575
- __defNormalProp$r(a, prop, b[prop]);
35582
+ if (__hasOwnProp$z.call(b, prop))
35583
+ __defNormalProp$t(a, prop, b[prop]);
35584
+ if (__getOwnPropSymbols$z)
35585
+ for (var prop of __getOwnPropSymbols$z(b)) {
35586
+ if (__propIsEnum$z.call(b, prop))
35587
+ __defNormalProp$t(a, prop, b[prop]);
35576
35588
  }
35577
35589
  return a;
35578
35590
  };
35579
- var __spreadProps$o = (a, b) => __defProps$o(a, __getOwnPropDescs$o(b));
35580
- var __async$H = (__this, __arguments, generator) => {
35591
+ var __spreadProps$q = (a, b) => __defProps$q(a, __getOwnPropDescs$q(b));
35592
+ var __async$I = (__this, __arguments, generator) => {
35581
35593
  return new Promise((resolve, reject) => {
35582
35594
  var fulfilled = (value) => {
35583
35595
  try {
@@ -35599,8 +35611,8 @@ var __async$H = (__this, __arguments, generator) => {
35599
35611
  };
35600
35612
  const useUpdateConnectionsCarrierSettings = (params) => {
35601
35613
  const { client } = useShipEngine();
35602
- return reactQuery.useMutation(__spreadProps$o(__spreadValues$r({}, params), {
35603
- mutationFn: (_0) => __async$H(void 0, [_0], function* ({
35614
+ return reactQuery.useMutation(__spreadProps$q(__spreadValues$t({}, params), {
35615
+ mutationFn: (_0) => __async$I(void 0, [_0], function* ({
35604
35616
  carrierName,
35605
35617
  carrierId,
35606
35618
  formData
@@ -35627,7 +35639,7 @@ const useListCustomPackageTypes = () => {
35627
35639
  });
35628
35640
  };
35629
35641
 
35630
- var __async$G = (__this, __arguments, generator) => {
35642
+ var __async$H = (__this, __arguments, generator) => {
35631
35643
  return new Promise((resolve, reject) => {
35632
35644
  var fulfilled = (value) => {
35633
35645
  try {
@@ -35650,7 +35662,7 @@ var __async$G = (__this, __arguments, generator) => {
35650
35662
  const useCreateFundingSource = () => {
35651
35663
  const { client } = useShipEngine();
35652
35664
  return reactQuery.useMutation({
35653
- mutationFn: (fundingSource) => __async$G(void 0, null, function* () {
35665
+ mutationFn: (fundingSource) => __async$H(void 0, null, function* () {
35654
35666
  const result = yield client.fundingSources.create(fundingSource);
35655
35667
  return result.data;
35656
35668
  }),
@@ -35659,7 +35671,7 @@ const useCreateFundingSource = () => {
35659
35671
  });
35660
35672
  };
35661
35673
 
35662
- var __async$F = (__this, __arguments, generator) => {
35674
+ var __async$G = (__this, __arguments, generator) => {
35663
35675
  return new Promise((resolve, reject) => {
35664
35676
  var fulfilled = (value) => {
35665
35677
  try {
@@ -35682,7 +35694,7 @@ var __async$F = (__this, __arguments, generator) => {
35682
35694
  const useFundingSourcesAddFunds = () => {
35683
35695
  const { client } = useShipEngine();
35684
35696
  return reactQuery.useMutation({
35685
- mutationFn: (_0) => __async$F(void 0, [_0], function* ({ funds, fundingSourceId }) {
35697
+ mutationFn: (_0) => __async$G(void 0, [_0], function* ({ funds, fundingSourceId }) {
35686
35698
  const result = yield client.fundingSources.addFunds(funds, fundingSourceId);
35687
35699
  return result.data;
35688
35700
  }),
@@ -35711,7 +35723,7 @@ const useListFundingSources = () => {
35711
35723
  });
35712
35724
  };
35713
35725
 
35714
- var __async$E = (__this, __arguments, generator) => {
35726
+ var __async$F = (__this, __arguments, generator) => {
35715
35727
  return new Promise((resolve, reject) => {
35716
35728
  var fulfilled = (value) => {
35717
35729
  try {
@@ -35734,7 +35746,7 @@ var __async$E = (__this, __arguments, generator) => {
35734
35746
  const useRegisterCarrier = () => {
35735
35747
  const { client } = useShipEngine();
35736
35748
  return reactQuery.useMutation({
35737
- mutationFn: (carrier) => __async$E(void 0, null, function* () {
35749
+ mutationFn: (carrier) => __async$F(void 0, null, function* () {
35738
35750
  const result = yield client.fundingSources.registerCarrier(carrier);
35739
35751
  return result.data;
35740
35752
  }),
@@ -35743,7 +35755,7 @@ const useRegisterCarrier = () => {
35743
35755
  });
35744
35756
  };
35745
35757
 
35746
- var __async$D = (__this, __arguments, generator) => {
35758
+ var __async$E = (__this, __arguments, generator) => {
35747
35759
  return new Promise((resolve, reject) => {
35748
35760
  var fulfilled = (value) => {
35749
35761
  try {
@@ -35766,7 +35778,7 @@ var __async$D = (__this, __arguments, generator) => {
35766
35778
  const useUpdateFundingSource = () => {
35767
35779
  const { client } = useShipEngine();
35768
35780
  return reactQuery.useMutation({
35769
- mutationFn: (_0) => __async$D(void 0, [_0], function* ({
35781
+ mutationFn: (_0) => __async$E(void 0, [_0], function* ({
35770
35782
  billingInfo,
35771
35783
  creditCardInfo,
35772
35784
  fundingSourceId,
@@ -35807,29 +35819,29 @@ const useGetFundingSourceTransactions = (fundingSourceId, params) => {
35807
35819
  });
35808
35820
  };
35809
35821
 
35810
- var __defProp$q = Object.defineProperty;
35811
- var __defProps$n = Object.defineProperties;
35812
- var __getOwnPropDescs$n = Object.getOwnPropertyDescriptors;
35813
- var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
35814
- var __hasOwnProp$w = Object.prototype.hasOwnProperty;
35815
- var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
35816
- var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35817
- var __spreadValues$q = (a, b) => {
35822
+ var __defProp$s = Object.defineProperty;
35823
+ var __defProps$p = Object.defineProperties;
35824
+ var __getOwnPropDescs$p = Object.getOwnPropertyDescriptors;
35825
+ var __getOwnPropSymbols$y = Object.getOwnPropertySymbols;
35826
+ var __hasOwnProp$y = Object.prototype.hasOwnProperty;
35827
+ var __propIsEnum$y = Object.prototype.propertyIsEnumerable;
35828
+ var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35829
+ var __spreadValues$s = (a, b) => {
35818
35830
  for (var prop in b || (b = {}))
35819
- if (__hasOwnProp$w.call(b, prop))
35820
- __defNormalProp$q(a, prop, b[prop]);
35821
- if (__getOwnPropSymbols$w)
35822
- for (var prop of __getOwnPropSymbols$w(b)) {
35823
- if (__propIsEnum$w.call(b, prop))
35824
- __defNormalProp$q(a, prop, b[prop]);
35831
+ if (__hasOwnProp$y.call(b, prop))
35832
+ __defNormalProp$s(a, prop, b[prop]);
35833
+ if (__getOwnPropSymbols$y)
35834
+ for (var prop of __getOwnPropSymbols$y(b)) {
35835
+ if (__propIsEnum$y.call(b, prop))
35836
+ __defNormalProp$s(a, prop, b[prop]);
35825
35837
  }
35826
35838
  return a;
35827
35839
  };
35828
- var __spreadProps$n = (a, b) => __defProps$n(a, __getOwnPropDescs$n(b));
35840
+ var __spreadProps$p = (a, b) => __defProps$p(a, __getOwnPropDescs$p(b));
35829
35841
  const useGetInsuranceFundingSourceAcceptedTerms = (params) => {
35830
35842
  const { client } = useShipEngine();
35831
- const queryParams = __spreadValues$q({}, params);
35832
- return reactQuery.useQuery(__spreadProps$n(__spreadValues$q({}, queryParams), {
35843
+ const queryParams = __spreadValues$s({}, params);
35844
+ return reactQuery.useQuery(__spreadProps$p(__spreadValues$s({}, queryParams), {
35833
35845
  onError,
35834
35846
  queryFn: () => client.fundingSources.insuranceAcceptedTerms(),
35835
35847
  queryKey: ["useGetInsuranceFundingSourceAcceptedTerms"],
@@ -35852,22 +35864,22 @@ const useGetInsuranceAccount = (insuranceProvider) => {
35852
35864
  });
35853
35865
  };
35854
35866
 
35855
- var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
35856
- var __hasOwnProp$v = Object.prototype.hasOwnProperty;
35857
- var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
35858
- var __objRest$i = (source, exclude) => {
35867
+ var __getOwnPropSymbols$x = Object.getOwnPropertySymbols;
35868
+ var __hasOwnProp$x = Object.prototype.hasOwnProperty;
35869
+ var __propIsEnum$x = Object.prototype.propertyIsEnumerable;
35870
+ var __objRest$k = (source, exclude) => {
35859
35871
  var target = {};
35860
35872
  for (var prop in source)
35861
- if (__hasOwnProp$v.call(source, prop) && exclude.indexOf(prop) < 0)
35873
+ if (__hasOwnProp$x.call(source, prop) && exclude.indexOf(prop) < 0)
35862
35874
  target[prop] = source[prop];
35863
- if (source != null && __getOwnPropSymbols$v)
35864
- for (var prop of __getOwnPropSymbols$v(source)) {
35865
- if (exclude.indexOf(prop) < 0 && __propIsEnum$v.call(source, prop))
35875
+ if (source != null && __getOwnPropSymbols$x)
35876
+ for (var prop of __getOwnPropSymbols$x(source)) {
35877
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$x.call(source, prop))
35866
35878
  target[prop] = source[prop];
35867
35879
  }
35868
35880
  return target;
35869
35881
  };
35870
- var __async$C = (__this, __arguments, generator) => {
35882
+ var __async$D = (__this, __arguments, generator) => {
35871
35883
  return new Promise((resolve, reject) => {
35872
35884
  var fulfilled = (value) => {
35873
35885
  try {
@@ -35890,8 +35902,8 @@ var __async$C = (__this, __arguments, generator) => {
35890
35902
  const useAddInsuranceFunds = () => {
35891
35903
  const { client } = useShipEngine();
35892
35904
  return reactQuery.useMutation({
35893
- mutationFn: (_a) => __async$C(void 0, null, function* () {
35894
- var _b = _a, { insuranceProvider } = _b, rest = __objRest$i(_b, ["insuranceProvider"]);
35905
+ mutationFn: (_a) => __async$D(void 0, null, function* () {
35906
+ var _b = _a, { insuranceProvider } = _b, rest = __objRest$k(_b, ["insuranceProvider"]);
35895
35907
  const result = yield client.insurance.addFunds(insuranceProvider, rest);
35896
35908
  return result.data;
35897
35909
  }),
@@ -35900,26 +35912,26 @@ const useAddInsuranceFunds = () => {
35900
35912
  });
35901
35913
  };
35902
35914
 
35903
- var __defProp$p = Object.defineProperty;
35904
- var __defProps$m = Object.defineProperties;
35905
- var __getOwnPropDescs$m = Object.getOwnPropertyDescriptors;
35906
- var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
35907
- var __hasOwnProp$u = Object.prototype.hasOwnProperty;
35908
- var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
35909
- var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35910
- var __spreadValues$p = (a, b) => {
35915
+ var __defProp$r = Object.defineProperty;
35916
+ var __defProps$o = Object.defineProperties;
35917
+ var __getOwnPropDescs$o = Object.getOwnPropertyDescriptors;
35918
+ var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
35919
+ var __hasOwnProp$w = Object.prototype.hasOwnProperty;
35920
+ var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
35921
+ var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35922
+ var __spreadValues$r = (a, b) => {
35911
35923
  for (var prop in b || (b = {}))
35912
- if (__hasOwnProp$u.call(b, prop))
35913
- __defNormalProp$p(a, prop, b[prop]);
35914
- if (__getOwnPropSymbols$u)
35915
- for (var prop of __getOwnPropSymbols$u(b)) {
35916
- if (__propIsEnum$u.call(b, prop))
35917
- __defNormalProp$p(a, prop, b[prop]);
35924
+ if (__hasOwnProp$w.call(b, prop))
35925
+ __defNormalProp$r(a, prop, b[prop]);
35926
+ if (__getOwnPropSymbols$w)
35927
+ for (var prop of __getOwnPropSymbols$w(b)) {
35928
+ if (__propIsEnum$w.call(b, prop))
35929
+ __defNormalProp$r(a, prop, b[prop]);
35918
35930
  }
35919
35931
  return a;
35920
35932
  };
35921
- var __spreadProps$m = (a, b) => __defProps$m(a, __getOwnPropDescs$m(b));
35922
- var __async$B = (__this, __arguments, generator) => {
35933
+ var __spreadProps$o = (a, b) => __defProps$o(a, __getOwnPropDescs$o(b));
35934
+ var __async$C = (__this, __arguments, generator) => {
35923
35935
  return new Promise((resolve, reject) => {
35924
35936
  var fulfilled = (value) => {
35925
35937
  try {
@@ -35941,8 +35953,8 @@ var __async$B = (__this, __arguments, generator) => {
35941
35953
  };
35942
35954
  const useCreateInvoiceAddress = (params) => {
35943
35955
  const { client } = useShipEngine();
35944
- return reactQuery.useMutation(__spreadProps$m(__spreadValues$p({}, params), {
35945
- mutationFn: (invoiceAddress) => __async$B(void 0, null, function* () {
35956
+ return reactQuery.useMutation(__spreadProps$o(__spreadValues$r({}, params), {
35957
+ mutationFn: (invoiceAddress) => __async$C(void 0, null, function* () {
35946
35958
  const result = yield client.invoiceAddress.create(invoiceAddress);
35947
35959
  return result.data;
35948
35960
  }),
@@ -35951,6 +35963,86 @@ const useCreateInvoiceAddress = (params) => {
35951
35963
  }));
35952
35964
  };
35953
35965
 
35966
+ var __defProp$q = Object.defineProperty;
35967
+ var __defProps$n = Object.defineProperties;
35968
+ var __getOwnPropDescs$n = Object.getOwnPropertyDescriptors;
35969
+ var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
35970
+ var __hasOwnProp$v = Object.prototype.hasOwnProperty;
35971
+ var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
35972
+ var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35973
+ var __spreadValues$q = (a, b) => {
35974
+ for (var prop in b || (b = {}))
35975
+ if (__hasOwnProp$v.call(b, prop))
35976
+ __defNormalProp$q(a, prop, b[prop]);
35977
+ if (__getOwnPropSymbols$v)
35978
+ for (var prop of __getOwnPropSymbols$v(b)) {
35979
+ if (__propIsEnum$v.call(b, prop))
35980
+ __defNormalProp$q(a, prop, b[prop]);
35981
+ }
35982
+ return a;
35983
+ };
35984
+ var __spreadProps$n = (a, b) => __defProps$n(a, __getOwnPropDescs$n(b));
35985
+ var __async$B = (__this, __arguments, generator) => {
35986
+ return new Promise((resolve, reject) => {
35987
+ var fulfilled = (value) => {
35988
+ try {
35989
+ step(generator.next(value));
35990
+ } catch (e) {
35991
+ reject(e);
35992
+ }
35993
+ };
35994
+ var rejected = (value) => {
35995
+ try {
35996
+ step(generator.throw(value));
35997
+ } catch (e) {
35998
+ reject(e);
35999
+ }
36000
+ };
36001
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
36002
+ step((generator = generator.apply(__this, __arguments)).next());
36003
+ });
36004
+ };
36005
+ const useUpdateInvoiceAddress = (params) => {
36006
+ const { client } = useShipEngine();
36007
+ return reactQuery.useMutation(__spreadProps$n(__spreadValues$q({}, params), {
36008
+ mutationFn: (invoiceAddress) => __async$B(void 0, null, function* () {
36009
+ const result = yield client.invoiceAddress.update(invoiceAddress);
36010
+ return result.data;
36011
+ }),
36012
+ mutationKey: ["useUpdateInvoiceAddress"],
36013
+ onError
36014
+ }));
36015
+ };
36016
+
36017
+ var __defProp$p = Object.defineProperty;
36018
+ var __defProps$m = Object.defineProperties;
36019
+ var __getOwnPropDescs$m = Object.getOwnPropertyDescriptors;
36020
+ var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
36021
+ var __hasOwnProp$u = Object.prototype.hasOwnProperty;
36022
+ var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
36023
+ var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
36024
+ var __spreadValues$p = (a, b) => {
36025
+ for (var prop in b || (b = {}))
36026
+ if (__hasOwnProp$u.call(b, prop))
36027
+ __defNormalProp$p(a, prop, b[prop]);
36028
+ if (__getOwnPropSymbols$u)
36029
+ for (var prop of __getOwnPropSymbols$u(b)) {
36030
+ if (__propIsEnum$u.call(b, prop))
36031
+ __defNormalProp$p(a, prop, b[prop]);
36032
+ }
36033
+ return a;
36034
+ };
36035
+ var __spreadProps$m = (a, b) => __defProps$m(a, __getOwnPropDescs$m(b));
36036
+ const useGetInvoiceAddress = (params) => {
36037
+ const { client } = useShipEngine();
36038
+ return reactQuery.useQuery(__spreadProps$m(__spreadValues$p({}, params), {
36039
+ onError,
36040
+ queryFn: () => client.invoiceAddress.get(),
36041
+ queryKey: ["useGetInvoiceAddress"],
36042
+ select: (result) => result.data
36043
+ }));
36044
+ };
36045
+
35954
36046
  var __defProp$o = Object.defineProperty;
35955
36047
  var __defProps$l = Object.defineProperties;
35956
36048
  var __getOwnPropDescs$l = Object.getOwnPropertyDescriptors;
@@ -35970,6 +36062,18 @@ var __spreadValues$o = (a, b) => {
35970
36062
  return a;
35971
36063
  };
35972
36064
  var __spreadProps$l = (a, b) => __defProps$l(a, __getOwnPropDescs$l(b));
36065
+ var __objRest$j = (source, exclude) => {
36066
+ var target = {};
36067
+ for (var prop in source)
36068
+ if (__hasOwnProp$t.call(source, prop) && exclude.indexOf(prop) < 0)
36069
+ target[prop] = source[prop];
36070
+ if (source != null && __getOwnPropSymbols$t)
36071
+ for (var prop of __getOwnPropSymbols$t(source)) {
36072
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$t.call(source, prop))
36073
+ target[prop] = source[prop];
36074
+ }
36075
+ return target;
36076
+ };
35973
36077
  var __async$A = (__this, __arguments, generator) => {
35974
36078
  return new Promise((resolve, reject) => {
35975
36079
  var fulfilled = (value) => {
@@ -35990,14 +36094,15 @@ var __async$A = (__this, __arguments, generator) => {
35990
36094
  step((generator = generator.apply(__this, __arguments)).next());
35991
36095
  });
35992
36096
  };
35993
- const useUpdateInvoiceAddress = (params) => {
36097
+ const useCreateLabelByRateId = (params) => {
35994
36098
  const { client } = useShipEngine();
35995
36099
  return reactQuery.useMutation(__spreadProps$l(__spreadValues$o({}, params), {
35996
- mutationFn: (invoiceAddress) => __async$A(void 0, null, function* () {
35997
- const result = yield client.invoiceAddress.update(invoiceAddress);
36100
+ mutationFn: (_a) => __async$A(void 0, null, function* () {
36101
+ var _b = _a, { rateId } = _b, options = __objRest$j(_b, ["rateId"]);
36102
+ const result = yield client.labels.createByRateId(rateId, options);
35998
36103
  return result.data;
35999
36104
  }),
36000
- mutationKey: ["useUpdateInvoiceAddress"],
36105
+ mutationKey: ["useCreateLabelByRateId"],
36001
36106
  onError
36002
36107
  }));
36003
36108
  };
@@ -36021,13 +36126,48 @@ var __spreadValues$n = (a, b) => {
36021
36126
  return a;
36022
36127
  };
36023
36128
  var __spreadProps$k = (a, b) => __defProps$k(a, __getOwnPropDescs$k(b));
36024
- const useGetInvoiceAddress = (params) => {
36129
+ var __objRest$i = (source, exclude) => {
36130
+ var target = {};
36131
+ for (var prop in source)
36132
+ if (__hasOwnProp$s.call(source, prop) && exclude.indexOf(prop) < 0)
36133
+ target[prop] = source[prop];
36134
+ if (source != null && __getOwnPropSymbols$s)
36135
+ for (var prop of __getOwnPropSymbols$s(source)) {
36136
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$s.call(source, prop))
36137
+ target[prop] = source[prop];
36138
+ }
36139
+ return target;
36140
+ };
36141
+ var __async$z = (__this, __arguments, generator) => {
36142
+ return new Promise((resolve, reject) => {
36143
+ var fulfilled = (value) => {
36144
+ try {
36145
+ step(generator.next(value));
36146
+ } catch (e) {
36147
+ reject(e);
36148
+ }
36149
+ };
36150
+ var rejected = (value) => {
36151
+ try {
36152
+ step(generator.throw(value));
36153
+ } catch (e) {
36154
+ reject(e);
36155
+ }
36156
+ };
36157
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
36158
+ step((generator = generator.apply(__this, __arguments)).next());
36159
+ });
36160
+ };
36161
+ const useCreateLabelByShipmentId = (params) => {
36025
36162
  const { client } = useShipEngine();
36026
- return reactQuery.useQuery(__spreadProps$k(__spreadValues$n({}, params), {
36027
- onError,
36028
- queryFn: () => client.invoiceAddress.get(),
36029
- queryKey: ["useGetInvoiceAddress"],
36030
- select: (result) => result.data
36163
+ return reactQuery.useMutation(__spreadProps$k(__spreadValues$n({}, params), {
36164
+ mutationFn: (_a) => __async$z(void 0, null, function* () {
36165
+ var _b = _a, { shipmentId } = _b, options = __objRest$i(_b, ["shipmentId"]);
36166
+ const result = yield client.labels.createByShipmentId(shipmentId, options);
36167
+ return result.data;
36168
+ }),
36169
+ mutationKey: ["useCreateLabelByShipmentId"],
36170
+ onError
36031
36171
  }));
36032
36172
  };
36033
36173
 
@@ -36062,7 +36202,7 @@ var __objRest$h = (source, exclude) => {
36062
36202
  }
36063
36203
  return target;
36064
36204
  };
36065
- var __async$z = (__this, __arguments, generator) => {
36205
+ var __async$y = (__this, __arguments, generator) => {
36066
36206
  return new Promise((resolve, reject) => {
36067
36207
  var fulfilled = (value) => {
36068
36208
  try {
@@ -36082,10 +36222,10 @@ var __async$z = (__this, __arguments, generator) => {
36082
36222
  step((generator = generator.apply(__this, __arguments)).next());
36083
36223
  });
36084
36224
  };
36085
- const useCreateLabelByRateId = (params) => {
36225
+ const useCreateLabel = (params) => {
36086
36226
  const { client } = useShipEngine();
36087
36227
  return reactQuery.useMutation(__spreadProps$j(__spreadValues$m({}, params), {
36088
- mutationFn: (_a) => __async$z(void 0, null, function* () {
36228
+ mutationFn: (_a) => __async$y(void 0, null, function* () {
36089
36229
  var _b = _a, { rateId } = _b, options = __objRest$h(_b, ["rateId"]);
36090
36230
  const result = yield client.labels.createByRateId(rateId, options);
36091
36231
  return result.data;
@@ -36095,6 +36235,21 @@ const useCreateLabelByRateId = (params) => {
36095
36235
  }));
36096
36236
  };
36097
36237
 
36238
+ const useGetLabel = (labelId) => {
36239
+ const { client } = useShipEngine();
36240
+ return reactQuery.useQuery({
36241
+ enabled: labelId !== void 0,
36242
+ onError,
36243
+ queryFn: () => {
36244
+ if (labelId)
36245
+ return client.labels.get(labelId);
36246
+ return Promise.reject(new Error("labelId is require"));
36247
+ },
36248
+ queryKey: ["useGetLabel", labelId],
36249
+ select: (result) => result.data
36250
+ });
36251
+ };
36252
+
36098
36253
  var __defProp$l = Object.defineProperty;
36099
36254
  var __defProps$i = Object.defineProperties;
36100
36255
  var __getOwnPropDescs$i = Object.getOwnPropertyDescriptors;
@@ -36126,7 +36281,18 @@ var __objRest$g = (source, exclude) => {
36126
36281
  }
36127
36282
  return target;
36128
36283
  };
36129
- var __async$y = (__this, __arguments, generator) => {
36284
+ const useListLabels = (params) => {
36285
+ const { client } = useShipEngine();
36286
+ const _a = __spreadValues$l({}, params), { queryFnParams } = _a, rest = __objRest$g(_a, ["queryFnParams"]);
36287
+ return reactQuery.useQuery(__spreadProps$i(__spreadValues$l({}, rest), {
36288
+ onError,
36289
+ queryFn: () => client.labels.list(queryFnParams),
36290
+ queryKey: ["useListLabels", params],
36291
+ select: (result) => result.data
36292
+ }));
36293
+ };
36294
+
36295
+ var __async$x = (__this, __arguments, generator) => {
36130
36296
  return new Promise((resolve, reject) => {
36131
36297
  var fulfilled = (value) => {
36132
36298
  try {
@@ -36146,31 +36312,15 @@ var __async$y = (__this, __arguments, generator) => {
36146
36312
  step((generator = generator.apply(__this, __arguments)).next());
36147
36313
  });
36148
36314
  };
36149
- const useCreateLabelByShipmentId = (params) => {
36315
+ const useVoidLabel = () => {
36150
36316
  const { client } = useShipEngine();
36151
- return reactQuery.useMutation(__spreadProps$i(__spreadValues$l({}, params), {
36152
- mutationFn: (_a) => __async$y(void 0, null, function* () {
36153
- var _b = _a, { shipmentId } = _b, options = __objRest$g(_b, ["shipmentId"]);
36154
- const result = yield client.labels.createByShipmentId(shipmentId, options);
36317
+ return reactQuery.useMutation({
36318
+ mutationFn: (labelId) => __async$x(void 0, null, function* () {
36319
+ const result = yield client.labels.void(labelId);
36155
36320
  return result.data;
36156
36321
  }),
36157
- mutationKey: ["useCreateLabelForShipment"],
36322
+ mutationKey: ["useVoidLabel"],
36158
36323
  onError
36159
- }));
36160
- };
36161
-
36162
- const useGetLabel = (labelId) => {
36163
- const { client } = useShipEngine();
36164
- return reactQuery.useQuery({
36165
- enabled: labelId !== void 0,
36166
- onError,
36167
- queryFn: () => {
36168
- if (labelId)
36169
- return client.labels.get(labelId);
36170
- return Promise.reject(new Error("labelId is require"));
36171
- },
36172
- queryKey: ["useGetLabel", labelId],
36173
- select: (result) => result.data
36174
36324
  });
36175
36325
  };
36176
36326
 
@@ -36205,18 +36355,7 @@ var __objRest$f = (source, exclude) => {
36205
36355
  }
36206
36356
  return target;
36207
36357
  };
36208
- const useListLabels = (params) => {
36209
- const { client } = useShipEngine();
36210
- const _a = __spreadValues$k({}, params), { queryFnParams } = _a, rest = __objRest$f(_a, ["queryFnParams"]);
36211
- return reactQuery.useQuery(__spreadProps$h(__spreadValues$k({}, rest), {
36212
- onError,
36213
- queryFn: () => client.labels.list(queryFnParams),
36214
- queryKey: ["useListLabels", params],
36215
- select: (result) => result.data
36216
- }));
36217
- };
36218
-
36219
- var __async$x = (__this, __arguments, generator) => {
36358
+ var __async$w = (__this, __arguments, generator) => {
36220
36359
  return new Promise((resolve, reject) => {
36221
36360
  var fulfilled = (value) => {
36222
36361
  try {
@@ -36236,16 +36375,30 @@ var __async$x = (__this, __arguments, generator) => {
36236
36375
  step((generator = generator.apply(__this, __arguments)).next());
36237
36376
  });
36238
36377
  };
36239
- const useVoidLabel = () => {
36378
+ const useListLabelsInfinite = (params) => {
36240
36379
  const { client } = useShipEngine();
36241
- return reactQuery.useMutation({
36242
- mutationFn: (labelId) => __async$x(void 0, null, function* () {
36243
- const result = yield client.labels.void(labelId);
36244
- return result.data;
36380
+ const _a = __spreadValues$k({}, params), { queryFnParams } = _a, rest = __objRest$f(_a, ["queryFnParams"]);
36381
+ return reactQuery.useInfiniteQuery(__spreadProps$h(__spreadValues$k({}, rest), {
36382
+ getNextPageParam: (lastPage) => {
36383
+ if (lastPage.page < lastPage.pages) {
36384
+ return lastPage.page + 1;
36385
+ }
36386
+ return void 0;
36387
+ },
36388
+ onError,
36389
+ queryFn: (_0) => __async$w(void 0, [_0], function* ({ pageParam = 1 }) {
36390
+ const response = yield client.labels.list(__spreadProps$h(__spreadValues$k({}, queryFnParams), { page: pageParam }));
36391
+ return response.data;
36245
36392
  }),
36246
- mutationKey: ["useVoidLabel"],
36247
- onError
36248
- });
36393
+ queryKey: ["useListLabelsInfinite", params],
36394
+ select: (data) => {
36395
+ return {
36396
+ labels: data.pages.flatMap((page) => page.labels),
36397
+ pageParams: data.pageParams,
36398
+ pages: data.pages
36399
+ };
36400
+ }
36401
+ }));
36249
36402
  };
36250
36403
 
36251
36404
  var __defProp$j = Object.defineProperty;
@@ -36279,49 +36432,13 @@ var __objRest$e = (source, exclude) => {
36279
36432
  }
36280
36433
  return target;
36281
36434
  };
36282
- var __async$w = (__this, __arguments, generator) => {
36283
- return new Promise((resolve, reject) => {
36284
- var fulfilled = (value) => {
36285
- try {
36286
- step(generator.next(value));
36287
- } catch (e) {
36288
- reject(e);
36289
- }
36290
- };
36291
- var rejected = (value) => {
36292
- try {
36293
- step(generator.throw(value));
36294
- } catch (e) {
36295
- reject(e);
36296
- }
36297
- };
36298
- var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
36299
- step((generator = generator.apply(__this, __arguments)).next());
36300
- });
36301
- };
36302
- const useListLabelsInfinite = (params) => {
36435
+ const useDownloadLabels = (params) => {
36303
36436
  const { client } = useShipEngine();
36304
36437
  const _a = __spreadValues$j({}, params), { queryFnParams } = _a, rest = __objRest$e(_a, ["queryFnParams"]);
36305
- return reactQuery.useInfiniteQuery(__spreadProps$g(__spreadValues$j({}, rest), {
36306
- getNextPageParam: (lastPage) => {
36307
- if (lastPage.page < lastPage.pages) {
36308
- return lastPage.page + 1;
36309
- }
36310
- return void 0;
36311
- },
36438
+ return reactQuery.useQuery(__spreadProps$g(__spreadValues$j({}, rest), {
36312
36439
  onError,
36313
- queryFn: (_0) => __async$w(void 0, [_0], function* ({ pageParam = 1 }) {
36314
- const response = yield client.labels.list(__spreadProps$g(__spreadValues$j({}, queryFnParams), { page: pageParam }));
36315
- return response.data;
36316
- }),
36317
- queryKey: ["useListLabelsInfinite", params],
36318
- select: (data) => {
36319
- return {
36320
- labels: data.pages.flatMap((page) => page.labels),
36321
- pageParams: data.pageParams,
36322
- pages: data.pages
36323
- };
36324
- }
36440
+ queryFn: () => client.labels.download(queryFnParams),
36441
+ queryKey: ["useDownloadLabels", params]
36325
36442
  }));
36326
36443
  };
36327
36444
 
@@ -39437,6 +39554,7 @@ exports.useCreateAccountImage = useCreateAccountImage;
39437
39554
  exports.useCreateAuctanePaySession = useCreateAuctanePaySession;
39438
39555
  exports.useCreateFundingSource = useCreateFundingSource;
39439
39556
  exports.useCreateInvoiceAddress = useCreateInvoiceAddress;
39557
+ exports.useCreateLabel = useCreateLabel;
39440
39558
  exports.useCreateLabelByRateId = useCreateLabelByRateId;
39441
39559
  exports.useCreateLabelByShipmentId = useCreateLabelByShipmentId;
39442
39560
  exports.useCreateRateCard = useCreateRateCard;
@@ -39455,6 +39573,7 @@ exports.useDeleteSellerApiKey = useDeleteSellerApiKey;
39455
39573
  exports.useDeleteShippingRule = useDeleteShippingRule;
39456
39574
  exports.useDeleteWarehouse = useDeleteWarehouse;
39457
39575
  exports.useDeleteWebhook = useDeleteWebhook;
39576
+ exports.useDownloadLabels = useDownloadLabels;
39458
39577
  exports.useDownloadRateCard = useDownloadRateCard;
39459
39578
  exports.useEditShippingRule = useEditShippingRule;
39460
39579
  exports.useFundingSourcesAddFunds = useFundingSourcesAddFunds;