@shipengine/alchemy 6.0.61 → 6.0.63

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 +306 -185
  2. package/index.mjs +305 -186
  3. package/package.json +1 -1
package/index.mjs CHANGED
@@ -10800,17 +10800,17 @@ var AccountBillingPlanChangeType = /* @__PURE__ */ ((AccountBillingPlanChangeTyp
10800
10800
  return AccountBillingPlanChangeType2;
10801
10801
  })(AccountBillingPlanChangeType || {});
10802
10802
 
10803
- var __getOwnPropSymbols$W = Object.getOwnPropertySymbols;
10804
- var __hasOwnProp$W = Object.prototype.hasOwnProperty;
10805
- var __propIsEnum$W = Object.prototype.propertyIsEnumerable;
10803
+ var __getOwnPropSymbols$Y = Object.getOwnPropertySymbols;
10804
+ var __hasOwnProp$Y = Object.prototype.hasOwnProperty;
10805
+ var __propIsEnum$Y = Object.prototype.propertyIsEnumerable;
10806
10806
  var __objRest$x = (source, exclude) => {
10807
10807
  var target = {};
10808
10808
  for (var prop in source)
10809
- if (__hasOwnProp$W.call(source, prop) && exclude.indexOf(prop) < 0)
10809
+ if (__hasOwnProp$Y.call(source, prop) && exclude.indexOf(prop) < 0)
10810
10810
  target[prop] = source[prop];
10811
- if (source != null && __getOwnPropSymbols$W)
10812
- for (var prop of __getOwnPropSymbols$W(source)) {
10813
- if (exclude.indexOf(prop) < 0 && __propIsEnum$W.call(source, prop))
10811
+ if (source != null && __getOwnPropSymbols$Y)
10812
+ for (var prop of __getOwnPropSymbols$Y(source)) {
10813
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$Y.call(source, prop))
10814
10814
  target[prop] = source[prop];
10815
10815
  }
10816
10816
  return target;
@@ -10945,17 +10945,17 @@ const types = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
10945
10945
  RateCardStatus
10946
10946
  }, Symbol.toStringTag, { value: 'Module' }));
10947
10947
 
10948
- var __getOwnPropSymbols$V = Object.getOwnPropertySymbols;
10949
- var __hasOwnProp$V = Object.prototype.hasOwnProperty;
10950
- var __propIsEnum$V = Object.prototype.propertyIsEnumerable;
10948
+ var __getOwnPropSymbols$X = Object.getOwnPropertySymbols;
10949
+ var __hasOwnProp$X = Object.prototype.hasOwnProperty;
10950
+ var __propIsEnum$X = Object.prototype.propertyIsEnumerable;
10951
10951
  var __objRest$w = (source, exclude) => {
10952
10952
  var target = {};
10953
10953
  for (var prop in source)
10954
- if (__hasOwnProp$V.call(source, prop) && exclude.indexOf(prop) < 0)
10954
+ if (__hasOwnProp$X.call(source, prop) && exclude.indexOf(prop) < 0)
10955
10955
  target[prop] = source[prop];
10956
- if (source != null && __getOwnPropSymbols$V)
10957
- for (var prop of __getOwnPropSymbols$V(source)) {
10958
- if (exclude.indexOf(prop) < 0 && __propIsEnum$V.call(source, prop))
10956
+ if (source != null && __getOwnPropSymbols$X)
10957
+ for (var prop of __getOwnPropSymbols$X(source)) {
10958
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$X.call(source, prop))
10959
10959
  target[prop] = source[prop];
10960
10960
  }
10961
10961
  return target;
@@ -11069,6 +11069,23 @@ class AuctanePayAPI {
11069
11069
  this.getPaymentMethods = () => {
11070
11070
  return this.client.get("/v1/payments/payment_methods");
11071
11071
  };
11072
+ /**
11073
+ * The `deletePaymentMethod` method deletes a Payment Method for a given user.
11074
+ * @docs https://auctane.atlassian.net/wiki/spaces/SEEU/pages/5906662077/AUCTANE+PAY+ENDPOINTS+FOR+SHIPSTATION+API#Delete-payment-method
11075
+ */
11076
+ this.deletePaymentMethod = (paymentMethodId) => {
11077
+ return this.client.delete(`/v1/payments/payment_methods/${paymentMethodId}`);
11078
+ };
11079
+ /**
11080
+ * The `updatePaymentMethod` method allows to update a saved Payment Method
11081
+ * @docs https://auctane.atlassian.net/wiki/spaces/SEEU/pages/5906662077/AUCTANE+PAY+ENDPOINTS+FOR+SHIPSTATION+API#Auctane-Pay-available-endpoints-in-Shipstation-API
11082
+ */
11083
+ this.updatePaymentMethod = (paymentMethodId, payload) => {
11084
+ return this.client.put(
11085
+ `/v1/payments/payment_methods/${paymentMethodId}`,
11086
+ payload
11087
+ );
11088
+ };
11072
11089
  this.client = client;
11073
11090
  }
11074
11091
  }
@@ -13778,7 +13795,7 @@ var ipaddr = {
13778
13795
  }).call(commonjsGlobal);
13779
13796
  } (ipaddr));
13780
13797
 
13781
- var __async$12 = (__this, __arguments, generator) => {
13798
+ var __async$14 = (__this, __arguments, generator) => {
13782
13799
  return new Promise((resolve, reject) => {
13783
13800
  var fulfilled = (value) => {
13784
13801
  try {
@@ -13798,7 +13815,7 @@ var __async$12 = (__this, __arguments, generator) => {
13798
13815
  step((generator = generator.apply(__this, __arguments)).next());
13799
13816
  });
13800
13817
  };
13801
- const getEndUserIpAddress = () => __async$12(void 0, null, function* () {
13818
+ const getEndUserIpAddress = () => __async$14(void 0, null, function* () {
13802
13819
  try {
13803
13820
  const response = yield axios.get("https://api.ipify.org/?format=json");
13804
13821
  if (response.data.ip && ipaddrExports.isValid(response.data.ip)) {
@@ -13859,38 +13876,38 @@ const decamelizeKeys = (obj, separator = "_") => {
13859
13876
  return obj;
13860
13877
  };
13861
13878
 
13862
- var __defProp$J = Object.defineProperty;
13863
- var __defProps$D = Object.defineProperties;
13864
- var __getOwnPropDescs$D = Object.getOwnPropertyDescriptors;
13865
- var __getOwnPropSymbols$U = Object.getOwnPropertySymbols;
13866
- var __hasOwnProp$U = Object.prototype.hasOwnProperty;
13867
- var __propIsEnum$U = Object.prototype.propertyIsEnumerable;
13868
- var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13869
- var __spreadValues$J = (a, b) => {
13879
+ var __defProp$L = Object.defineProperty;
13880
+ var __defProps$F = Object.defineProperties;
13881
+ var __getOwnPropDescs$F = Object.getOwnPropertyDescriptors;
13882
+ var __getOwnPropSymbols$W = Object.getOwnPropertySymbols;
13883
+ var __hasOwnProp$W = Object.prototype.hasOwnProperty;
13884
+ var __propIsEnum$W = Object.prototype.propertyIsEnumerable;
13885
+ var __defNormalProp$L = (obj, key, value) => key in obj ? __defProp$L(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13886
+ var __spreadValues$L = (a, b) => {
13870
13887
  for (var prop in b || (b = {}))
13871
- if (__hasOwnProp$U.call(b, prop))
13872
- __defNormalProp$J(a, prop, b[prop]);
13873
- if (__getOwnPropSymbols$U)
13874
- for (var prop of __getOwnPropSymbols$U(b)) {
13875
- if (__propIsEnum$U.call(b, prop))
13876
- __defNormalProp$J(a, prop, b[prop]);
13888
+ if (__hasOwnProp$W.call(b, prop))
13889
+ __defNormalProp$L(a, prop, b[prop]);
13890
+ if (__getOwnPropSymbols$W)
13891
+ for (var prop of __getOwnPropSymbols$W(b)) {
13892
+ if (__propIsEnum$W.call(b, prop))
13893
+ __defNormalProp$L(a, prop, b[prop]);
13877
13894
  }
13878
13895
  return a;
13879
13896
  };
13880
- var __spreadProps$D = (a, b) => __defProps$D(a, __getOwnPropDescs$D(b));
13897
+ var __spreadProps$F = (a, b) => __defProps$F(a, __getOwnPropDescs$F(b));
13881
13898
  var __objRest$v = (source, exclude) => {
13882
13899
  var target = {};
13883
13900
  for (var prop in source)
13884
- if (__hasOwnProp$U.call(source, prop) && exclude.indexOf(prop) < 0)
13901
+ if (__hasOwnProp$W.call(source, prop) && exclude.indexOf(prop) < 0)
13885
13902
  target[prop] = source[prop];
13886
- if (source != null && __getOwnPropSymbols$U)
13887
- for (var prop of __getOwnPropSymbols$U(source)) {
13888
- if (exclude.indexOf(prop) < 0 && __propIsEnum$U.call(source, prop))
13903
+ if (source != null && __getOwnPropSymbols$W)
13904
+ for (var prop of __getOwnPropSymbols$W(source)) {
13905
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$W.call(source, prop))
13889
13906
  target[prop] = source[prop];
13890
13907
  }
13891
13908
  return target;
13892
13909
  };
13893
- var __async$11 = (__this, __arguments, generator) => {
13910
+ var __async$13 = (__this, __arguments, generator) => {
13894
13911
  return new Promise((resolve, reject) => {
13895
13912
  var fulfilled = (value) => {
13896
13913
  try {
@@ -13930,12 +13947,12 @@ class CarriersAPI {
13930
13947
  /**
13931
13948
  * The `connect` method connects a carrier account to a user's ShipEngine account.
13932
13949
  */
13933
- this.connect = (_a) => __async$11(this, null, function* () {
13950
+ this.connect = (_a) => __async$13(this, null, function* () {
13934
13951
  var _b = _a, { carrierCode } = _b, connection = __objRest$v(_b, ["carrierCode"]);
13935
13952
  const endUserIpAddress = yield getEndUserIpAddress();
13936
13953
  if (!endUserIpAddress)
13937
13954
  return Promise.reject([new CodedError("Unable to get IP address")]);
13938
- return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$D(__spreadValues$J({}, connection), {
13955
+ return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$F(__spreadValues$L({}, connection), {
13939
13956
  endUserIpAddress
13940
13957
  }));
13941
13958
  });
@@ -14019,22 +14036,22 @@ class CarriersAPI {
14019
14036
  }
14020
14037
  }
14021
14038
 
14022
- var __getOwnPropSymbols$T = Object.getOwnPropertySymbols;
14023
- var __hasOwnProp$T = Object.prototype.hasOwnProperty;
14024
- var __propIsEnum$T = Object.prototype.propertyIsEnumerable;
14039
+ var __getOwnPropSymbols$V = Object.getOwnPropertySymbols;
14040
+ var __hasOwnProp$V = Object.prototype.hasOwnProperty;
14041
+ var __propIsEnum$V = Object.prototype.propertyIsEnumerable;
14025
14042
  var __objRest$u = (source, exclude) => {
14026
14043
  var target = {};
14027
14044
  for (var prop in source)
14028
- if (__hasOwnProp$T.call(source, prop) && exclude.indexOf(prop) < 0)
14045
+ if (__hasOwnProp$V.call(source, prop) && exclude.indexOf(prop) < 0)
14029
14046
  target[prop] = source[prop];
14030
- if (source != null && __getOwnPropSymbols$T)
14031
- for (var prop of __getOwnPropSymbols$T(source)) {
14032
- if (exclude.indexOf(prop) < 0 && __propIsEnum$T.call(source, prop))
14047
+ if (source != null && __getOwnPropSymbols$V)
14048
+ for (var prop of __getOwnPropSymbols$V(source)) {
14049
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$V.call(source, prop))
14033
14050
  target[prop] = source[prop];
14034
14051
  }
14035
14052
  return target;
14036
14053
  };
14037
- var __async$10 = (__this, __arguments, generator) => {
14054
+ var __async$12 = (__this, __arguments, generator) => {
14038
14055
  return new Promise((resolve, reject) => {
14039
14056
  var fulfilled = (value) => {
14040
14057
  try {
@@ -14076,7 +14093,7 @@ class ConnectionsAPI {
14076
14093
  /**
14077
14094
  * The `connectCarrier` method connects a carrier to account.
14078
14095
  */
14079
- this.connectCarrier = (carrierName, formData) => __async$10(this, null, function* () {
14096
+ this.connectCarrier = (carrierName, formData) => __async$12(this, null, function* () {
14080
14097
  return yield this.client.post(
14081
14098
  `/v1/connections/carriers/${carrierName}`,
14082
14099
  formData,
@@ -16244,23 +16261,23 @@ class CustomPackagesAPI {
16244
16261
  }
16245
16262
  }
16246
16263
 
16247
- var __defProp$I = Object.defineProperty;
16248
- var __getOwnPropSymbols$S = Object.getOwnPropertySymbols;
16249
- var __hasOwnProp$S = Object.prototype.hasOwnProperty;
16250
- var __propIsEnum$S = Object.prototype.propertyIsEnumerable;
16251
- var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16252
- var __spreadValues$I = (a, b) => {
16264
+ var __defProp$K = Object.defineProperty;
16265
+ var __getOwnPropSymbols$U = Object.getOwnPropertySymbols;
16266
+ var __hasOwnProp$U = Object.prototype.hasOwnProperty;
16267
+ var __propIsEnum$U = Object.prototype.propertyIsEnumerable;
16268
+ var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16269
+ var __spreadValues$K = (a, b) => {
16253
16270
  for (var prop in b || (b = {}))
16254
- if (__hasOwnProp$S.call(b, prop))
16255
- __defNormalProp$I(a, prop, b[prop]);
16256
- if (__getOwnPropSymbols$S)
16257
- for (var prop of __getOwnPropSymbols$S(b)) {
16258
- if (__propIsEnum$S.call(b, prop))
16259
- __defNormalProp$I(a, prop, b[prop]);
16271
+ if (__hasOwnProp$U.call(b, prop))
16272
+ __defNormalProp$K(a, prop, b[prop]);
16273
+ if (__getOwnPropSymbols$U)
16274
+ for (var prop of __getOwnPropSymbols$U(b)) {
16275
+ if (__propIsEnum$U.call(b, prop))
16276
+ __defNormalProp$K(a, prop, b[prop]);
16260
16277
  }
16261
16278
  return a;
16262
16279
  };
16263
- var __async$$ = (__this, __arguments, generator) => {
16280
+ var __async$11 = (__this, __arguments, generator) => {
16264
16281
  return new Promise((resolve, reject) => {
16265
16282
  var fulfilled = (value) => {
16266
16283
  try {
@@ -16299,12 +16316,12 @@ class FundingSourcesAPI {
16299
16316
  * The `create` method creates a new funding source for a given user. This requires
16300
16317
  * payment information to be collected from the user.
16301
16318
  */
16302
- this.create = (createFundingSource) => __async$$(this, null, function* () {
16319
+ this.create = (createFundingSource) => __async$11(this, null, function* () {
16303
16320
  const endUserIpAddress = yield getEndUserIpAddress();
16304
16321
  if (!endUserIpAddress) {
16305
16322
  return Promise.reject([new CodedError("Unable to get IP address")]);
16306
16323
  }
16307
- return yield this.client.post("/v1/funding_sources", __spreadValues$I({
16324
+ return yield this.client.post("/v1/funding_sources", __spreadValues$K({
16308
16325
  endUserIpAddress
16309
16326
  }, createFundingSource));
16310
16327
  });
@@ -16313,7 +16330,7 @@ class FundingSourcesAPI {
16313
16330
  * user to update the billing address or payment information associated with the
16314
16331
  * funding source.
16315
16332
  */
16316
- this.update = (billingInfo, creditCardInfo, auctanePayInfo, fundingSourceId) => __async$$(this, null, function* () {
16333
+ this.update = (billingInfo, creditCardInfo, auctanePayInfo, fundingSourceId) => __async$11(this, null, function* () {
16317
16334
  const endUserIpAddress = yield getEndUserIpAddress();
16318
16335
  if (!endUserIpAddress) {
16319
16336
  return Promise.reject([new CodedError("Unable to get IP address")]);
@@ -16323,7 +16340,7 @@ class FundingSourcesAPI {
16323
16340
  {
16324
16341
  billingInfo,
16325
16342
  endUserIpAddress,
16326
- paymentMethod: __spreadValues$I({
16343
+ paymentMethod: __spreadValues$K({
16327
16344
  creditCardInfo
16328
16345
  }, auctanePayInfo)
16329
16346
  }
@@ -16333,19 +16350,19 @@ class FundingSourcesAPI {
16333
16350
  * The `registerCarrier` method registers a carrier account and associates
16334
16351
  * it with a given funding source.
16335
16352
  */
16336
- this.registerCarrier = (carrier) => __async$$(this, null, function* () {
16353
+ this.registerCarrier = (carrier) => __async$11(this, null, function* () {
16337
16354
  const endUserIpAddress = yield getEndUserIpAddress();
16338
16355
  if (!endUserIpAddress) {
16339
16356
  return Promise.reject([new CodedError("Unable to get IP address")]);
16340
16357
  }
16341
- return yield this.client.post("/v1/registration/funding_source", __spreadValues$I({
16358
+ return yield this.client.post("/v1/registration/funding_source", __spreadValues$K({
16342
16359
  endUserIpAddress
16343
16360
  }, carrier));
16344
16361
  });
16345
16362
  /**
16346
16363
  * The `addFunds` method allows you to add funds to a funding source.
16347
16364
  */
16348
- this.addFunds = (amount, fundingSourceId) => __async$$(this, null, function* () {
16365
+ this.addFunds = (amount, fundingSourceId) => __async$11(this, null, function* () {
16349
16366
  return yield this.client.put(
16350
16367
  `/v1/funding_sources/${fundingSourceId}/add_funds`,
16351
16368
  amount
@@ -16355,7 +16372,7 @@ class FundingSourcesAPI {
16355
16372
  * The `metadata` method returns seller-specific requirements for creating funding sources
16356
16373
  * and attaching carriers
16357
16374
  */
16358
- this.metadata = () => __async$$(this, null, function* () {
16375
+ this.metadata = () => __async$11(this, null, function* () {
16359
16376
  return yield this.client.get("/v1/funding_sources/metadata");
16360
16377
  });
16361
16378
  /**
@@ -16407,7 +16424,7 @@ class InsuranceAPI {
16407
16424
  }
16408
16425
  }
16409
16426
 
16410
- var __async$_ = (__this, __arguments, generator) => {
16427
+ var __async$10 = (__this, __arguments, generator) => {
16411
16428
  return new Promise((resolve, reject) => {
16412
16429
  var fulfilled = (value) => {
16413
16430
  try {
@@ -16439,13 +16456,13 @@ class InvoiceAddressAPI {
16439
16456
  /**
16440
16457
  * The `create` method creates a new invoice address for a given user.
16441
16458
  */
16442
- this.create = (invoiceAddress) => __async$_(this, null, function* () {
16459
+ this.create = (invoiceAddress) => __async$10(this, null, function* () {
16443
16460
  return yield this.client.post("/v1/invoice_address", invoiceAddress);
16444
16461
  });
16445
16462
  /**
16446
16463
  * The `update` method updates a invoice address for a given user.
16447
16464
  */
16448
- this.update = (invoiceAddress) => __async$_(this, null, function* () {
16465
+ this.update = (invoiceAddress) => __async$10(this, null, function* () {
16449
16466
  return yield this.client.put("/v1/invoice_address", invoiceAddress);
16450
16467
  });
16451
16468
  this.client = client;
@@ -16507,17 +16524,17 @@ class LabelsAPI {
16507
16524
  }
16508
16525
  }
16509
16526
 
16510
- var __getOwnPropSymbols$R = Object.getOwnPropertySymbols;
16511
- var __hasOwnProp$R = Object.prototype.hasOwnProperty;
16512
- var __propIsEnum$R = Object.prototype.propertyIsEnumerable;
16527
+ var __getOwnPropSymbols$T = Object.getOwnPropertySymbols;
16528
+ var __hasOwnProp$T = Object.prototype.hasOwnProperty;
16529
+ var __propIsEnum$T = Object.prototype.propertyIsEnumerable;
16513
16530
  var __objRest$t = (source, exclude) => {
16514
16531
  var target = {};
16515
16532
  for (var prop in source)
16516
- if (__hasOwnProp$R.call(source, prop) && exclude.indexOf(prop) < 0)
16533
+ if (__hasOwnProp$T.call(source, prop) && exclude.indexOf(prop) < 0)
16517
16534
  target[prop] = source[prop];
16518
- if (source != null && __getOwnPropSymbols$R)
16519
- for (var prop of __getOwnPropSymbols$R(source)) {
16520
- if (exclude.indexOf(prop) < 0 && __propIsEnum$R.call(source, prop))
16535
+ if (source != null && __getOwnPropSymbols$T)
16536
+ for (var prop of __getOwnPropSymbols$T(source)) {
16537
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$T.call(source, prop))
16521
16538
  target[prop] = source[prop];
16522
16539
  }
16523
16540
  return target;
@@ -16638,19 +16655,19 @@ class RateCardsAPI {
16638
16655
  }
16639
16656
  }
16640
16657
 
16641
- var __defProp$H = Object.defineProperty;
16642
- var __getOwnPropSymbols$Q = Object.getOwnPropertySymbols;
16643
- var __hasOwnProp$Q = Object.prototype.hasOwnProperty;
16644
- var __propIsEnum$Q = Object.prototype.propertyIsEnumerable;
16645
- var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16646
- var __spreadValues$H = (a, b) => {
16658
+ var __defProp$J = Object.defineProperty;
16659
+ var __getOwnPropSymbols$S = Object.getOwnPropertySymbols;
16660
+ var __hasOwnProp$S = Object.prototype.hasOwnProperty;
16661
+ var __propIsEnum$S = Object.prototype.propertyIsEnumerable;
16662
+ var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16663
+ var __spreadValues$J = (a, b) => {
16647
16664
  for (var prop in b || (b = {}))
16648
- if (__hasOwnProp$Q.call(b, prop))
16649
- __defNormalProp$H(a, prop, b[prop]);
16650
- if (__getOwnPropSymbols$Q)
16651
- for (var prop of __getOwnPropSymbols$Q(b)) {
16652
- if (__propIsEnum$Q.call(b, prop))
16653
- __defNormalProp$H(a, prop, b[prop]);
16665
+ if (__hasOwnProp$S.call(b, prop))
16666
+ __defNormalProp$J(a, prop, b[prop]);
16667
+ if (__getOwnPropSymbols$S)
16668
+ for (var prop of __getOwnPropSymbols$S(b)) {
16669
+ if (__propIsEnum$S.call(b, prop))
16670
+ __defNormalProp$J(a, prop, b[prop]);
16654
16671
  }
16655
16672
  return a;
16656
16673
  };
@@ -16672,7 +16689,7 @@ class RatesAPI {
16672
16689
  * method.
16673
16690
  */
16674
16691
  this.estimate = (params) => {
16675
- return this.client.post("/v1/rates/estimate", __spreadValues$H({}, params));
16692
+ return this.client.post("/v1/rates/estimate", __spreadValues$J({}, params));
16676
16693
  };
16677
16694
  this.client = client;
16678
16695
  }
@@ -16752,7 +16769,7 @@ class SalesOrdersAPI {
16752
16769
  }
16753
16770
  }
16754
16771
 
16755
- var __async$Z = (__this, __arguments, generator) => {
16772
+ var __async$$ = (__this, __arguments, generator) => {
16756
16773
  return new Promise((resolve, reject) => {
16757
16774
  var fulfilled = (value) => {
16758
16775
  try {
@@ -16810,7 +16827,7 @@ class SellersAPI {
16810
16827
  /**
16811
16828
  * Deletes an API Key
16812
16829
  */
16813
- this.deleteSellerApiKey = (_0) => __async$Z(this, [_0], function* ({
16830
+ this.deleteSellerApiKey = (_0) => __async$$(this, [_0], function* ({
16814
16831
  encryptedApiKey,
16815
16832
  sellerId,
16816
16833
  isSandbox
@@ -16856,19 +16873,19 @@ class SellersAPI {
16856
16873
  }
16857
16874
  }
16858
16875
 
16859
- var __defProp$G = Object.defineProperty;
16860
- var __getOwnPropSymbols$P = Object.getOwnPropertySymbols;
16861
- var __hasOwnProp$P = Object.prototype.hasOwnProperty;
16862
- var __propIsEnum$P = Object.prototype.propertyIsEnumerable;
16863
- var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16864
- var __spreadValues$G = (a, b) => {
16876
+ var __defProp$I = Object.defineProperty;
16877
+ var __getOwnPropSymbols$R = Object.getOwnPropertySymbols;
16878
+ var __hasOwnProp$R = Object.prototype.hasOwnProperty;
16879
+ var __propIsEnum$R = Object.prototype.propertyIsEnumerable;
16880
+ var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16881
+ var __spreadValues$I = (a, b) => {
16865
16882
  for (var prop in b || (b = {}))
16866
- if (__hasOwnProp$P.call(b, prop))
16867
- __defNormalProp$G(a, prop, b[prop]);
16868
- if (__getOwnPropSymbols$P)
16869
- for (var prop of __getOwnPropSymbols$P(b)) {
16870
- if (__propIsEnum$P.call(b, prop))
16871
- __defNormalProp$G(a, prop, b[prop]);
16883
+ if (__hasOwnProp$R.call(b, prop))
16884
+ __defNormalProp$I(a, prop, b[prop]);
16885
+ if (__getOwnPropSymbols$R)
16886
+ for (var prop of __getOwnPropSymbols$R(b)) {
16887
+ if (__propIsEnum$R.call(b, prop))
16888
+ __defNormalProp$I(a, prop, b[prop]);
16872
16889
  }
16873
16890
  return a;
16874
16891
  };
@@ -16880,7 +16897,7 @@ class ServicePointsAPI {
16880
16897
  * Either an address, coordinates, or an address query
16881
16898
  */
16882
16899
  this.list = (options) => {
16883
- return this.client.post("/v1/service_points/list", __spreadValues$G({}, options));
16900
+ return this.client.post("/v1/service_points/list", __spreadValues$I({}, options));
16884
16901
  };
16885
16902
  /**
16886
16903
  * Get a specific service point by its carrier code, country code, and id
@@ -16898,7 +16915,7 @@ class ServicePointsAPI {
16898
16915
  }
16899
16916
  }
16900
16917
 
16901
- var __async$Y = (__this, __arguments, generator) => {
16918
+ var __async$_ = (__this, __arguments, generator) => {
16902
16919
  return new Promise((resolve, reject) => {
16903
16920
  var fulfilled = (value) => {
16904
16921
  try {
@@ -16947,7 +16964,7 @@ class ShipmentsAPI {
16947
16964
  * The `create` method allows for creating shipments based on a list of shipment
16948
16965
  * items passed into this method.
16949
16966
  */
16950
- this.create = (...shipments) => __async$Y(this, null, function* () {
16967
+ this.create = (...shipments) => __async$_(this, null, function* () {
16951
16968
  return this.client.post("/v1/shipments", {
16952
16969
  shipments
16953
16970
  });
@@ -34364,38 +34381,38 @@ class WebhooksAPI {
34364
34381
  }
34365
34382
  }
34366
34383
 
34367
- var __defProp$F = Object.defineProperty;
34368
- var __defProps$C = Object.defineProperties;
34369
- var __getOwnPropDescs$C = Object.getOwnPropertyDescriptors;
34370
- var __getOwnPropSymbols$O = Object.getOwnPropertySymbols;
34371
- var __hasOwnProp$O = Object.prototype.hasOwnProperty;
34372
- var __propIsEnum$O = Object.prototype.propertyIsEnumerable;
34373
- var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
34374
- var __spreadValues$F = (a, b) => {
34384
+ var __defProp$H = Object.defineProperty;
34385
+ var __defProps$E = Object.defineProperties;
34386
+ var __getOwnPropDescs$E = Object.getOwnPropertyDescriptors;
34387
+ var __getOwnPropSymbols$Q = Object.getOwnPropertySymbols;
34388
+ var __hasOwnProp$Q = Object.prototype.hasOwnProperty;
34389
+ var __propIsEnum$Q = Object.prototype.propertyIsEnumerable;
34390
+ var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
34391
+ var __spreadValues$H = (a, b) => {
34375
34392
  for (var prop in b || (b = {}))
34376
- if (__hasOwnProp$O.call(b, prop))
34377
- __defNormalProp$F(a, prop, b[prop]);
34378
- if (__getOwnPropSymbols$O)
34379
- for (var prop of __getOwnPropSymbols$O(b)) {
34380
- if (__propIsEnum$O.call(b, prop))
34381
- __defNormalProp$F(a, prop, b[prop]);
34393
+ if (__hasOwnProp$Q.call(b, prop))
34394
+ __defNormalProp$H(a, prop, b[prop]);
34395
+ if (__getOwnPropSymbols$Q)
34396
+ for (var prop of __getOwnPropSymbols$Q(b)) {
34397
+ if (__propIsEnum$Q.call(b, prop))
34398
+ __defNormalProp$H(a, prop, b[prop]);
34382
34399
  }
34383
34400
  return a;
34384
34401
  };
34385
- var __spreadProps$C = (a, b) => __defProps$C(a, __getOwnPropDescs$C(b));
34402
+ var __spreadProps$E = (a, b) => __defProps$E(a, __getOwnPropDescs$E(b));
34386
34403
  var __objRest$s = (source, exclude) => {
34387
34404
  var target = {};
34388
34405
  for (var prop in source)
34389
- if (__hasOwnProp$O.call(source, prop) && exclude.indexOf(prop) < 0)
34406
+ if (__hasOwnProp$Q.call(source, prop) && exclude.indexOf(prop) < 0)
34390
34407
  target[prop] = source[prop];
34391
- if (source != null && __getOwnPropSymbols$O)
34392
- for (var prop of __getOwnPropSymbols$O(source)) {
34393
- if (exclude.indexOf(prop) < 0 && __propIsEnum$O.call(source, prop))
34408
+ if (source != null && __getOwnPropSymbols$Q)
34409
+ for (var prop of __getOwnPropSymbols$Q(source)) {
34410
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$Q.call(source, prop))
34394
34411
  target[prop] = source[prop];
34395
34412
  }
34396
34413
  return target;
34397
34414
  };
34398
- var __async$X = (__this, __arguments, generator) => {
34415
+ var __async$Z = (__this, __arguments, generator) => {
34399
34416
  return new Promise((resolve, reject) => {
34400
34417
  var fulfilled = (value) => {
34401
34418
  try {
@@ -34418,7 +34435,7 @@ var __async$X = (__this, __arguments, generator) => {
34418
34435
  const logger$1 = E({
34419
34436
  level: process.env.NODE_ENV === "production" ? "fatal" : "info",
34420
34437
  name: "shipengine-api",
34421
- serializers: __spreadProps$C(__spreadValues$F({}, k), {
34438
+ serializers: __spreadProps$E(__spreadValues$H({}, k), {
34422
34439
  req: (req) => ({
34423
34440
  headers: req.headers,
34424
34441
  method: req.method,
@@ -34443,7 +34460,7 @@ class ShipEngineAPI {
34443
34460
  this.getSandboxToken = getSandboxToken;
34444
34461
  const client = axios.create({
34445
34462
  baseURL,
34446
- headers: __spreadProps$C(__spreadValues$F({}, headers), {
34463
+ headers: __spreadProps$E(__spreadValues$H({}, headers), {
34447
34464
  "Content-Type": "application/json"
34448
34465
  }),
34449
34466
  paramsSerializer: (params) => lib.stringify(decamelizeKeys(params), { arrayFormat: "brackets" }),
@@ -34483,7 +34500,7 @@ class ShipEngineAPI {
34483
34500
  });
34484
34501
  client.defaults.headers.common["Authorization"] = `Bearer ${token}`;
34485
34502
  client.interceptors.request.use(
34486
- (config) => __async$X(this, null, function* () {
34503
+ (config) => __async$Z(this, null, function* () {
34487
34504
  if (config.isSandbox) {
34488
34505
  if (!this.sandboxToken) {
34489
34506
  this.sandboxToken = yield getSandboxToken == null ? void 0 : getSandboxToken();
@@ -34510,7 +34527,7 @@ class ShipEngineAPI {
34510
34527
  );
34511
34528
  return res;
34512
34529
  },
34513
- (err) => __async$X(this, null, function* () {
34530
+ (err) => __async$Z(this, null, function* () {
34514
34531
  var _a, _b, _c, _d, _e;
34515
34532
  logger$1.error(
34516
34533
  { err, req: err.config, res: err.response },
@@ -34557,7 +34574,7 @@ class ShipEngineAPI {
34557
34574
  * that token (also known as Seller ID)
34558
34575
  */
34559
34576
  getTenant(isSandbox) {
34560
- return __async$X(this, null, function* () {
34577
+ return __async$Z(this, null, function* () {
34561
34578
  var _a;
34562
34579
  if (!isSandbox) {
34563
34580
  return this.getTenantFromToken(this.token);
@@ -34860,25 +34877,25 @@ const delay = (ms) => new Promise((resolve) => {
34860
34877
 
34861
34878
  const onError = (_errors) => _default();
34862
34879
 
34863
- var __defProp$E = Object.defineProperty;
34864
- var __defProps$B = Object.defineProperties;
34865
- var __getOwnPropDescs$B = Object.getOwnPropertyDescriptors;
34866
- var __getOwnPropSymbols$N = Object.getOwnPropertySymbols;
34867
- var __hasOwnProp$N = Object.prototype.hasOwnProperty;
34868
- var __propIsEnum$N = Object.prototype.propertyIsEnumerable;
34869
- var __defNormalProp$E = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
34870
- var __spreadValues$E = (a, b) => {
34880
+ var __defProp$G = Object.defineProperty;
34881
+ var __defProps$D = Object.defineProperties;
34882
+ var __getOwnPropDescs$D = Object.getOwnPropertyDescriptors;
34883
+ var __getOwnPropSymbols$P = Object.getOwnPropertySymbols;
34884
+ var __hasOwnProp$P = Object.prototype.hasOwnProperty;
34885
+ var __propIsEnum$P = Object.prototype.propertyIsEnumerable;
34886
+ var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
34887
+ var __spreadValues$G = (a, b) => {
34871
34888
  for (var prop in b || (b = {}))
34872
- if (__hasOwnProp$N.call(b, prop))
34873
- __defNormalProp$E(a, prop, b[prop]);
34874
- if (__getOwnPropSymbols$N)
34875
- for (var prop of __getOwnPropSymbols$N(b)) {
34876
- if (__propIsEnum$N.call(b, prop))
34877
- __defNormalProp$E(a, prop, b[prop]);
34889
+ if (__hasOwnProp$P.call(b, prop))
34890
+ __defNormalProp$G(a, prop, b[prop]);
34891
+ if (__getOwnPropSymbols$P)
34892
+ for (var prop of __getOwnPropSymbols$P(b)) {
34893
+ if (__propIsEnum$P.call(b, prop))
34894
+ __defNormalProp$G(a, prop, b[prop]);
34878
34895
  }
34879
34896
  return a;
34880
34897
  };
34881
- var __spreadProps$B = (a, b) => __defProps$B(a, __getOwnPropDescs$B(b));
34898
+ var __spreadProps$D = (a, b) => __defProps$D(a, __getOwnPropDescs$D(b));
34882
34899
  const streams = [];
34883
34900
  if (process.env.NODE_ENV === "production") {
34884
34901
  streams.push({
@@ -34887,7 +34904,7 @@ if (process.env.NODE_ENV === "production") {
34887
34904
  }
34888
34905
  const logger = E({
34889
34906
  name: "shipengine",
34890
- serializers: __spreadProps$B(__spreadValues$E({}, k), {
34907
+ serializers: __spreadProps$D(__spreadValues$G({}, k), {
34891
34908
  req: (req) => ({
34892
34909
  headers: req.headers,
34893
34910
  method: req.method,
@@ -34912,7 +34929,7 @@ const retryUntil = (callbackFn, retries = 10, timeoutBetweenAttempts = 1e3) => P
34912
34929
  throw error;
34913
34930
  });
34914
34931
 
34915
- var __async$W = (__this, __arguments, generator) => {
34932
+ var __async$Y = (__this, __arguments, generator) => {
34916
34933
  return new Promise((resolve, reject) => {
34917
34934
  var fulfilled = (value) => {
34918
34935
  try {
@@ -34935,7 +34952,7 @@ var __async$W = (__this, __arguments, generator) => {
34935
34952
  const useCreateAccountImage = () => {
34936
34953
  const { client } = useShipEngine();
34937
34954
  return useMutation({
34938
- mutationFn: (data) => __async$W(void 0, null, function* () {
34955
+ mutationFn: (data) => __async$Y(void 0, null, function* () {
34939
34956
  const result = yield client.accountSettings.createImage(data);
34940
34957
  return result.data;
34941
34958
  }),
@@ -34944,7 +34961,7 @@ const useCreateAccountImage = () => {
34944
34961
  });
34945
34962
  };
34946
34963
 
34947
- var __async$V = (__this, __arguments, generator) => {
34964
+ var __async$X = (__this, __arguments, generator) => {
34948
34965
  return new Promise((resolve, reject) => {
34949
34966
  var fulfilled = (value) => {
34950
34967
  try {
@@ -34967,7 +34984,7 @@ var __async$V = (__this, __arguments, generator) => {
34967
34984
  const useDeleteAccountImage = () => {
34968
34985
  const { client } = useShipEngine();
34969
34986
  return useMutation({
34970
- mutationFn: (labelImageId) => __async$V(void 0, null, function* () {
34987
+ mutationFn: (labelImageId) => __async$X(void 0, null, function* () {
34971
34988
  const result = yield client.accountSettings.deleteImage(labelImageId);
34972
34989
  return result.data;
34973
34990
  }),
@@ -34996,7 +35013,7 @@ const useGetAccountSettings = () => {
34996
35013
  });
34997
35014
  };
34998
35015
 
34999
- var __async$U = (__this, __arguments, generator) => {
35016
+ var __async$W = (__this, __arguments, generator) => {
35000
35017
  return new Promise((resolve, reject) => {
35001
35018
  var fulfilled = (value) => {
35002
35019
  try {
@@ -35019,7 +35036,7 @@ var __async$U = (__this, __arguments, generator) => {
35019
35036
  const useUpdateAccountImage = () => {
35020
35037
  const { client } = useShipEngine();
35021
35038
  return useMutation({
35022
- mutationFn: (data) => __async$U(void 0, null, function* () {
35039
+ mutationFn: (data) => __async$W(void 0, null, function* () {
35023
35040
  const result = yield client.accountSettings.updateImage(data);
35024
35041
  return result.data;
35025
35042
  }),
@@ -35028,7 +35045,7 @@ const useUpdateAccountImage = () => {
35028
35045
  });
35029
35046
  };
35030
35047
 
35031
- var __async$T = (__this, __arguments, generator) => {
35048
+ var __async$V = (__this, __arguments, generator) => {
35032
35049
  return new Promise((resolve, reject) => {
35033
35050
  var fulfilled = (value) => {
35034
35051
  try {
@@ -35051,7 +35068,7 @@ var __async$T = (__this, __arguments, generator) => {
35051
35068
  const useUpdateAccountSettings = () => {
35052
35069
  const { client } = useShipEngine();
35053
35070
  return useMutation({
35054
- mutationFn: (settings) => __async$T(void 0, null, function* () {
35071
+ mutationFn: (settings) => __async$V(void 0, null, function* () {
35055
35072
  const result = yield client.accountSettings.update(settings);
35056
35073
  return result.data;
35057
35074
  }),
@@ -35060,7 +35077,7 @@ const useUpdateAccountSettings = () => {
35060
35077
  });
35061
35078
  };
35062
35079
 
35063
- var __async$S = (__this, __arguments, generator) => {
35080
+ var __async$U = (__this, __arguments, generator) => {
35064
35081
  return new Promise((resolve, reject) => {
35065
35082
  var fulfilled = (value) => {
35066
35083
  try {
@@ -35083,7 +35100,7 @@ var __async$S = (__this, __arguments, generator) => {
35083
35100
  const useParseAddress = () => {
35084
35101
  const { client } = useShipEngine();
35085
35102
  return useMutation({
35086
- mutationFn: (_0) => __async$S(void 0, [_0], function* ({ address, text }) {
35103
+ mutationFn: (_0) => __async$U(void 0, [_0], function* ({ address, text }) {
35087
35104
  const result = yield client.addresses.parse(text, address);
35088
35105
  return result.data;
35089
35106
  }),
@@ -35092,7 +35109,7 @@ const useParseAddress = () => {
35092
35109
  });
35093
35110
  };
35094
35111
 
35095
- var __async$R = (__this, __arguments, generator) => {
35112
+ var __async$T = (__this, __arguments, generator) => {
35096
35113
  return new Promise((resolve, reject) => {
35097
35114
  var fulfilled = (value) => {
35098
35115
  try {
@@ -35115,7 +35132,7 @@ var __async$R = (__this, __arguments, generator) => {
35115
35132
  const useValidateAddresses = () => {
35116
35133
  const { client } = useShipEngine();
35117
35134
  return useMutation({
35118
- mutationFn: (addresses) => __async$R(void 0, null, function* () {
35135
+ mutationFn: (addresses) => __async$T(void 0, null, function* () {
35119
35136
  const result = yield client.addresses.validate(addresses);
35120
35137
  return result.data;
35121
35138
  }),
@@ -35124,6 +35141,87 @@ const useValidateAddresses = () => {
35124
35141
  });
35125
35142
  };
35126
35143
 
35144
+ var __defProp$F = Object.defineProperty;
35145
+ var __defProps$C = Object.defineProperties;
35146
+ var __getOwnPropDescs$C = Object.getOwnPropertyDescriptors;
35147
+ var __getOwnPropSymbols$O = Object.getOwnPropertySymbols;
35148
+ var __hasOwnProp$O = Object.prototype.hasOwnProperty;
35149
+ var __propIsEnum$O = Object.prototype.propertyIsEnumerable;
35150
+ var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35151
+ var __spreadValues$F = (a, b) => {
35152
+ for (var prop in b || (b = {}))
35153
+ if (__hasOwnProp$O.call(b, prop))
35154
+ __defNormalProp$F(a, prop, b[prop]);
35155
+ if (__getOwnPropSymbols$O)
35156
+ for (var prop of __getOwnPropSymbols$O(b)) {
35157
+ if (__propIsEnum$O.call(b, prop))
35158
+ __defNormalProp$F(a, prop, b[prop]);
35159
+ }
35160
+ return a;
35161
+ };
35162
+ var __spreadProps$C = (a, b) => __defProps$C(a, __getOwnPropDescs$C(b));
35163
+ var __async$S = (__this, __arguments, generator) => {
35164
+ return new Promise((resolve, reject) => {
35165
+ var fulfilled = (value) => {
35166
+ try {
35167
+ step(generator.next(value));
35168
+ } catch (e) {
35169
+ reject(e);
35170
+ }
35171
+ };
35172
+ var rejected = (value) => {
35173
+ try {
35174
+ step(generator.throw(value));
35175
+ } catch (e) {
35176
+ reject(e);
35177
+ }
35178
+ };
35179
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
35180
+ step((generator = generator.apply(__this, __arguments)).next());
35181
+ });
35182
+ };
35183
+ const useCreateAuctanePaySession = (params) => {
35184
+ const { client } = useShipEngine();
35185
+ return useMutation(__spreadProps$C(__spreadValues$F({}, params), {
35186
+ mutationFn: (request) => __async$S(void 0, null, function* () {
35187
+ const result = yield client.auctanePay.createSession(request);
35188
+ return result.data;
35189
+ }),
35190
+ mutationKey: ["useCreateAuctanePaySession"],
35191
+ onError
35192
+ }));
35193
+ };
35194
+
35195
+ var __defProp$E = Object.defineProperty;
35196
+ var __defProps$B = Object.defineProperties;
35197
+ var __getOwnPropDescs$B = Object.getOwnPropertyDescriptors;
35198
+ var __getOwnPropSymbols$N = Object.getOwnPropertySymbols;
35199
+ var __hasOwnProp$N = Object.prototype.hasOwnProperty;
35200
+ var __propIsEnum$N = Object.prototype.propertyIsEnumerable;
35201
+ var __defNormalProp$E = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35202
+ var __spreadValues$E = (a, b) => {
35203
+ for (var prop in b || (b = {}))
35204
+ if (__hasOwnProp$N.call(b, prop))
35205
+ __defNormalProp$E(a, prop, b[prop]);
35206
+ if (__getOwnPropSymbols$N)
35207
+ for (var prop of __getOwnPropSymbols$N(b)) {
35208
+ if (__propIsEnum$N.call(b, prop))
35209
+ __defNormalProp$E(a, prop, b[prop]);
35210
+ }
35211
+ return a;
35212
+ };
35213
+ var __spreadProps$B = (a, b) => __defProps$B(a, __getOwnPropDescs$B(b));
35214
+ const useGetAuctanePayConfig = (params) => {
35215
+ const { client } = useShipEngine();
35216
+ const queryParams = __spreadValues$E({}, params);
35217
+ return useQuery(__spreadProps$B(__spreadValues$E({}, queryParams), {
35218
+ onError,
35219
+ queryFn: () => client.auctanePay.getConfig(),
35220
+ queryKey: ["useGetAuctanePayConfig"],
35221
+ select: (result) => result.data
35222
+ }));
35223
+ };
35224
+
35127
35225
  var __defProp$D = Object.defineProperty;
35128
35226
  var __defProps$A = Object.defineProperties;
35129
35227
  var __getOwnPropDescs$A = Object.getOwnPropertyDescriptors;
@@ -35143,7 +35241,7 @@ var __spreadValues$D = (a, b) => {
35143
35241
  return a;
35144
35242
  };
35145
35243
  var __spreadProps$A = (a, b) => __defProps$A(a, __getOwnPropDescs$A(b));
35146
- var __async$Q = (__this, __arguments, generator) => {
35244
+ var __async$R = (__this, __arguments, generator) => {
35147
35245
  return new Promise((resolve, reject) => {
35148
35246
  var fulfilled = (value) => {
35149
35247
  try {
@@ -35163,14 +35261,18 @@ var __async$Q = (__this, __arguments, generator) => {
35163
35261
  step((generator = generator.apply(__this, __arguments)).next());
35164
35262
  });
35165
35263
  };
35166
- const useCreateAuctanePaySession = (params) => {
35264
+ const usePreviewTransaction = (params) => {
35167
35265
  const { client } = useShipEngine();
35168
35266
  return useMutation(__spreadProps$A(__spreadValues$D({}, params), {
35169
- mutationFn: (request) => __async$Q(void 0, null, function* () {
35170
- const result = yield client.auctanePay.createSession(request);
35267
+ mutationFn: (_0) => __async$R(void 0, [_0], function* ({ amount, transactionCategory = "add_funds" }) {
35268
+ const request = {
35269
+ amount,
35270
+ transactionCategory
35271
+ };
35272
+ const result = yield client.auctanePay.previewTransaction(request);
35171
35273
  return result.data;
35172
35274
  }),
35173
- mutationKey: ["useCreateAuctanePaySession"],
35275
+ mutationKey: ["usePreviewTransaction"],
35174
35276
  onError
35175
35277
  }));
35176
35278
  };
@@ -35194,13 +35296,13 @@ var __spreadValues$C = (a, b) => {
35194
35296
  return a;
35195
35297
  };
35196
35298
  var __spreadProps$z = (a, b) => __defProps$z(a, __getOwnPropDescs$z(b));
35197
- const useGetAuctanePayConfig = (params) => {
35299
+ const useGetPaymentMethods = (params) => {
35198
35300
  const { client } = useShipEngine();
35199
35301
  const queryParams = __spreadValues$C({}, params);
35200
35302
  return useQuery(__spreadProps$z(__spreadValues$C({}, queryParams), {
35201
35303
  onError,
35202
- queryFn: () => client.auctanePay.getConfig(),
35203
- queryKey: ["useGetAuctanePayConfig"],
35304
+ queryFn: () => client.auctanePay.getPaymentMethods(),
35305
+ queryKey: ["useGetPaymentMethods"],
35204
35306
  select: (result) => result.data
35205
35307
  }));
35206
35308
  };
@@ -35224,7 +35326,7 @@ var __spreadValues$B = (a, b) => {
35224
35326
  return a;
35225
35327
  };
35226
35328
  var __spreadProps$y = (a, b) => __defProps$y(a, __getOwnPropDescs$y(b));
35227
- var __async$P = (__this, __arguments, generator) => {
35329
+ var __async$Q = (__this, __arguments, generator) => {
35228
35330
  return new Promise((resolve, reject) => {
35229
35331
  var fulfilled = (value) => {
35230
35332
  try {
@@ -35244,18 +35346,14 @@ var __async$P = (__this, __arguments, generator) => {
35244
35346
  step((generator = generator.apply(__this, __arguments)).next());
35245
35347
  });
35246
35348
  };
35247
- const usePreviewTransaction = (params) => {
35349
+ const useDeletePaymentMethod = (params) => {
35248
35350
  const { client } = useShipEngine();
35249
35351
  return useMutation(__spreadProps$y(__spreadValues$B({}, params), {
35250
- mutationFn: (_0) => __async$P(void 0, [_0], function* ({ amount, transactionCategory = "add_funds" }) {
35251
- const request = {
35252
- amount,
35253
- transactionCategory
35254
- };
35255
- const result = yield client.auctanePay.previewTransaction(request);
35352
+ mutationFn: (paymentMethodId) => __async$Q(void 0, null, function* () {
35353
+ const result = yield client.auctanePay.deletePaymentMethod(paymentMethodId);
35256
35354
  return result.data;
35257
35355
  }),
35258
- mutationKey: ["usePreviewTransaction"],
35356
+ mutationKey: ["useDeletePaymentMethod"],
35259
35357
  onError
35260
35358
  }));
35261
35359
  };
@@ -35279,14 +35377,35 @@ var __spreadValues$A = (a, b) => {
35279
35377
  return a;
35280
35378
  };
35281
35379
  var __spreadProps$x = (a, b) => __defProps$x(a, __getOwnPropDescs$x(b));
35282
- const useGetPaymentMethods = (params) => {
35380
+ var __async$P = (__this, __arguments, generator) => {
35381
+ return new Promise((resolve, reject) => {
35382
+ var fulfilled = (value) => {
35383
+ try {
35384
+ step(generator.next(value));
35385
+ } catch (e) {
35386
+ reject(e);
35387
+ }
35388
+ };
35389
+ var rejected = (value) => {
35390
+ try {
35391
+ step(generator.throw(value));
35392
+ } catch (e) {
35393
+ reject(e);
35394
+ }
35395
+ };
35396
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
35397
+ step((generator = generator.apply(__this, __arguments)).next());
35398
+ });
35399
+ };
35400
+ const useUpdatePaymentMethod = (params) => {
35283
35401
  const { client } = useShipEngine();
35284
- const queryParams = __spreadValues$A({}, params);
35285
- return useQuery(__spreadProps$x(__spreadValues$A({}, queryParams), {
35286
- onError,
35287
- queryFn: () => client.auctanePay.getPaymentMethods(),
35288
- queryKey: ["useGetPaymentMethods"],
35289
- select: (result) => result.data
35402
+ return useMutation(__spreadProps$x(__spreadValues$A({}, params), {
35403
+ mutationFn: (_0) => __async$P(void 0, [_0], function* ({ paymentMethodId, payload }) {
35404
+ const result = yield client.auctanePay.updatePaymentMethod(paymentMethodId, payload);
35405
+ return result.data;
35406
+ }),
35407
+ mutationKey: ["useUpdatePaymentMethod"],
35408
+ onError
35290
35409
  }));
35291
35410
  };
35292
35411
 
@@ -39805,4 +39924,4 @@ const alchemy = {
39805
39924
  createElement
39806
39925
  };
39807
39926
 
39808
- export { AccountBillingAPI, AccountBillingPlanAPI, AccountBillingPlanChangeType, AccountSettingsAPI, AddressesAPI, AlchemyContext, AlchemyProvider, AlchemyTestProvider, AuctanePayAPI, CarriersAPI, CodedError, ConfirmationType, ConnectionsAPI, CreditCardVendor, Currency, CustomPackagesAPI, CustomsContentsType, CustomsNonDeliveryType, Element, ErrorBoundary, FundingSourcesAPI, InsuranceAPI, InsuranceProviderType, InvoiceAddressAPI, LabelsAPI, MetadataCapability, MetadataRequirement, MetadataSatisfyingFormTypes, MovementIndicator, OrderSourcesAPI, RateCardStatus, RateCardsAPI, RatesAPI, types as SE, SalesOrderShipmentsAPI, SalesOrdersAPI, SellersAPI, ServicePointsAPI, ShipEngine, ShipEngineAPI, ShipEngineContext, ShipmentsAPI, ShippingRulesAPI, ThemesAPI, UsersApi, WarehousesAPI, WebhooksAPI, alchemy, camelizeKeys, decamelizeKeys, alchemy as default, delay, getEmotionCache, getEndUserIpAddress, isCodedError, isCodedErrors, isDataCodedErrors, isInvalidTokenError, logger, onError, parseError, retryUntil, useAddFunds, useAddInsuranceFunds, useAddSandboxCarriers, useAlchemy, useCalculateRates, useCancelShipment, useCarrierConnectionsServicesList, useConnectCarrier, useConnectCarrierAccount, useCreateAccountImage, useCreateAuctanePaySession, useCreateFundingSource, useCreateInvoiceAddress, useCreateLabel, useCreateLabelByRateId, useCreateLabelByShipmentId, useCreateRateCard, useCreateSalesOrderShipment, useCreateSandboxSeller, useCreateSellerApiKey, useCreateShipment, useCreateShippingRule, useCreateWarehouse, useCreateWebhook, useDeactivateOrderSource, useDeleteAccountImage, useDeleteCarrier, useDeleteRateCard, useDeleteSellerApiKey, useDeleteShippingRule, useDeleteWarehouse, useDeleteWebhook, useDownloadRateCard, useEditShippingRule, useExportLabels, useExportShipments, useFundingSourcesAddFunds, useGetAccountBilling, useGetAccountBillingPlan, useGetAccountImages, useGetAccountSettings, useGetAuctanePayConfig, useGetAutoFundingConfiguration, useGetCarrierById, useGetCarrierConnectionForm, useGetConnectionsCarrierSettings, useGetCountriesByCarrier, useGetCurrenciesByCarrier, useGetFundingSourceById, useGetFundingSourceMetadata, useGetFundingSourceTransactions, useGetHereToken, useGetInsuranceAccount, useGetInsuranceFundingSourceAcceptedTerms, useGetInvoiceAddress, useGetLabel, useGetPackageRatingGroupByCarrier, useGetPaymentMethods, useGetRateCardById, useGetSalesOrder, useGetSalesOrderByExternalOrderId, useGetSalesOrderShipment, useGetServicePoint, useGetServicesByCarrier, useGetShipment, useGetShipmentByExternalId, useGetShipmentRates, useGetShippingRuleById, useGetShippingRuleConditionsOptions, useGetThemeById, useGetZonesByCarrier, useI18n, useListCarrierConnections, useListCarriers, useListCustomPackageTypes, useListFundingSources, useListLabels, useListLabelsInfinite, useListOrderSources, useListOrderSourcesConnections, useListRateCards, useListSalesOrderShipments, useListSalesOrderShipmentsByExternalOrderId, useListSalesOrders, useListSandboxSellerIds, useListSellerApiKeys, useListServicePoints, useListShipments, useListShippingRules, useListUsers, useListWarehouses, useListWebhooks, useLoadIcons, useNotifySalesOrderShipped, useParseAddress, usePreviewTransaction, usePublishRateCard, useRatesEstimate, useRefreshOrderSource, useRefreshOrderSourceAsync, useRegisterCarrier, useRequestStampsAccountUrls, useShipEngine, useUpdateAccountBillingPlan, useUpdateAccountImage, useUpdateAccountSettings, useUpdateAutoFunding, useUpdateConnectionsCarrierSettings, useUpdateFundingSource, useUpdateInvoiceAddress, useUpdateOrderSource, useUpdateRateCard, useUpdateSalesOrderShipment, useUpdateWarehouse, useUpdateWebhook, useUploadRateCard, useUpsertAccountBilling, useValidateAddresses, useVoidLabel };
39927
+ export { AccountBillingAPI, AccountBillingPlanAPI, AccountBillingPlanChangeType, AccountSettingsAPI, AddressesAPI, AlchemyContext, AlchemyProvider, AlchemyTestProvider, AuctanePayAPI, CarriersAPI, CodedError, ConfirmationType, ConnectionsAPI, CreditCardVendor, Currency, CustomPackagesAPI, CustomsContentsType, CustomsNonDeliveryType, Element, ErrorBoundary, FundingSourcesAPI, InsuranceAPI, InsuranceProviderType, InvoiceAddressAPI, LabelsAPI, MetadataCapability, MetadataRequirement, MetadataSatisfyingFormTypes, MovementIndicator, OrderSourcesAPI, RateCardStatus, RateCardsAPI, RatesAPI, types as SE, SalesOrderShipmentsAPI, SalesOrdersAPI, SellersAPI, ServicePointsAPI, ShipEngine, ShipEngineAPI, ShipEngineContext, ShipmentsAPI, ShippingRulesAPI, ThemesAPI, UsersApi, WarehousesAPI, WebhooksAPI, alchemy, camelizeKeys, decamelizeKeys, alchemy as default, delay, getEmotionCache, getEndUserIpAddress, isCodedError, isCodedErrors, isDataCodedErrors, isInvalidTokenError, logger, onError, parseError, retryUntil, useAddFunds, useAddInsuranceFunds, useAddSandboxCarriers, useAlchemy, useCalculateRates, useCancelShipment, useCarrierConnectionsServicesList, useConnectCarrier, useConnectCarrierAccount, useCreateAccountImage, useCreateAuctanePaySession, useCreateFundingSource, useCreateInvoiceAddress, useCreateLabel, useCreateLabelByRateId, useCreateLabelByShipmentId, useCreateRateCard, useCreateSalesOrderShipment, useCreateSandboxSeller, useCreateSellerApiKey, useCreateShipment, useCreateShippingRule, useCreateWarehouse, useCreateWebhook, useDeactivateOrderSource, useDeleteAccountImage, useDeleteCarrier, useDeletePaymentMethod, useDeleteRateCard, useDeleteSellerApiKey, useDeleteShippingRule, useDeleteWarehouse, useDeleteWebhook, useDownloadRateCard, useEditShippingRule, useExportLabels, useExportShipments, useFundingSourcesAddFunds, useGetAccountBilling, useGetAccountBillingPlan, useGetAccountImages, useGetAccountSettings, useGetAuctanePayConfig, useGetAutoFundingConfiguration, useGetCarrierById, useGetCarrierConnectionForm, useGetConnectionsCarrierSettings, useGetCountriesByCarrier, useGetCurrenciesByCarrier, useGetFundingSourceById, useGetFundingSourceMetadata, useGetFundingSourceTransactions, useGetHereToken, useGetInsuranceAccount, useGetInsuranceFundingSourceAcceptedTerms, useGetInvoiceAddress, useGetLabel, useGetPackageRatingGroupByCarrier, useGetPaymentMethods, useGetRateCardById, useGetSalesOrder, useGetSalesOrderByExternalOrderId, useGetSalesOrderShipment, useGetServicePoint, useGetServicesByCarrier, useGetShipment, useGetShipmentByExternalId, useGetShipmentRates, useGetShippingRuleById, useGetShippingRuleConditionsOptions, useGetThemeById, useGetZonesByCarrier, useI18n, useListCarrierConnections, useListCarriers, useListCustomPackageTypes, useListFundingSources, useListLabels, useListLabelsInfinite, useListOrderSources, useListOrderSourcesConnections, useListRateCards, useListSalesOrderShipments, useListSalesOrderShipmentsByExternalOrderId, useListSalesOrders, useListSandboxSellerIds, useListSellerApiKeys, useListServicePoints, useListShipments, useListShippingRules, useListUsers, useListWarehouses, useListWebhooks, useLoadIcons, useNotifySalesOrderShipped, useParseAddress, usePreviewTransaction, usePublishRateCard, useRatesEstimate, useRefreshOrderSource, useRefreshOrderSourceAsync, useRegisterCarrier, useRequestStampsAccountUrls, useShipEngine, useUpdateAccountBillingPlan, useUpdateAccountImage, useUpdateAccountSettings, useUpdateAutoFunding, useUpdateConnectionsCarrierSettings, useUpdateFundingSource, useUpdateInvoiceAddress, useUpdateOrderSource, useUpdatePaymentMethod, useUpdateRateCard, useUpdateSalesOrderShipment, useUpdateWarehouse, useUpdateWebhook, useUploadRateCard, useUpsertAccountBilling, useValidateAddresses, useVoidLabel };