@shipengine/alchemy 6.0.32 → 6.0.34

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 +230 -150
  2. package/index.mjs +229 -151
  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$I = Object.getOwnPropertySymbols;
10816
- var __hasOwnProp$I = Object.prototype.hasOwnProperty;
10817
- var __propIsEnum$I = Object.prototype.propertyIsEnumerable;
10815
+ var __getOwnPropSymbols$J = Object.getOwnPropertySymbols;
10816
+ var __hasOwnProp$J = Object.prototype.hasOwnProperty;
10817
+ var __propIsEnum$J = Object.prototype.propertyIsEnumerable;
10818
10818
  var __objRest$q = (source, exclude) => {
10819
10819
  var target = {};
10820
10820
  for (var prop in source)
10821
- if (__hasOwnProp$I.call(source, prop) && exclude.indexOf(prop) < 0)
10821
+ if (__hasOwnProp$J.call(source, prop) && exclude.indexOf(prop) < 0)
10822
10822
  target[prop] = source[prop];
10823
- if (source != null && __getOwnPropSymbols$I)
10824
- for (var prop of __getOwnPropSymbols$I(source)) {
10825
- if (exclude.indexOf(prop) < 0 && __propIsEnum$I.call(source, prop))
10823
+ if (source != null && __getOwnPropSymbols$J)
10824
+ for (var prop of __getOwnPropSymbols$J(source)) {
10825
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$J.call(source, prop))
10826
10826
  target[prop] = source[prop];
10827
10827
  }
10828
10828
  return target;
@@ -10861,12 +10861,14 @@ var MetadataRequirement = /* @__PURE__ */ ((MetadataRequirement2) => {
10861
10861
  MetadataRequirement2["Nickname"] = "nickname";
10862
10862
  MetadataRequirement2["PaymentMethod"] = "payment_method";
10863
10863
  MetadataRequirement2["PickupAddress"] = "pickup_address";
10864
+ MetadataRequirement2["RequestActivation"] = "request_activation";
10864
10865
  MetadataRequirement2["Unknown"] = "unknown";
10865
10866
  return MetadataRequirement2;
10866
10867
  })(MetadataRequirement || {});
10867
10868
  var MetadataSatisfyingFormTypes = /* @__PURE__ */ ((MetadataSatisfyingFormTypes2) => {
10868
10869
  MetadataSatisfyingFormTypes2["Address"] = "address";
10869
10870
  MetadataSatisfyingFormTypes2["CreditCard"] = "credit_card";
10871
+ MetadataSatisfyingFormTypes2["ExplicitIntent"] = "explicit_intent";
10870
10872
  MetadataSatisfyingFormTypes2["StampsAccountCredentials"] = "stamps_account_credentials";
10871
10873
  MetadataSatisfyingFormTypes2["StampsSellerLabelProvider"] = "stamps_seller_label_provider";
10872
10874
  MetadataSatisfyingFormTypes2["Unknown"] = "unknown";
@@ -10955,17 +10957,17 @@ const types = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
10955
10957
  RateCardStatus
10956
10958
  }, Symbol.toStringTag, { value: 'Module' }));
10957
10959
 
10958
- var __getOwnPropSymbols$H = Object.getOwnPropertySymbols;
10959
- var __hasOwnProp$H = Object.prototype.hasOwnProperty;
10960
- var __propIsEnum$H = Object.prototype.propertyIsEnumerable;
10960
+ var __getOwnPropSymbols$I = Object.getOwnPropertySymbols;
10961
+ var __hasOwnProp$I = Object.prototype.hasOwnProperty;
10962
+ var __propIsEnum$I = Object.prototype.propertyIsEnumerable;
10961
10963
  var __objRest$p = (source, exclude) => {
10962
10964
  var target = {};
10963
10965
  for (var prop in source)
10964
- if (__hasOwnProp$H.call(source, prop) && exclude.indexOf(prop) < 0)
10966
+ if (__hasOwnProp$I.call(source, prop) && exclude.indexOf(prop) < 0)
10965
10967
  target[prop] = source[prop];
10966
- if (source != null && __getOwnPropSymbols$H)
10967
- for (var prop of __getOwnPropSymbols$H(source)) {
10968
- if (exclude.indexOf(prop) < 0 && __propIsEnum$H.call(source, prop))
10968
+ if (source != null && __getOwnPropSymbols$I)
10969
+ for (var prop of __getOwnPropSymbols$I(source)) {
10970
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$I.call(source, prop))
10969
10971
  target[prop] = source[prop];
10970
10972
  }
10971
10973
  return target;
@@ -11040,6 +11042,22 @@ class AddressesAPI {
11040
11042
  }
11041
11043
  }
11042
11044
 
11045
+ class AuctanePayAPI {
11046
+ constructor(client) {
11047
+ this.client = client;
11048
+ /**
11049
+ * The `createSession` method creates a new payment session.
11050
+ *
11051
+ * @param request - The request object containing the session details
11052
+ * @returns a promise that resolves to the created session
11053
+ */
11054
+ this.createSession = (request) => {
11055
+ return this.client.post("/internal/auctane_pay/sessions", request);
11056
+ };
11057
+ this.client = client;
11058
+ }
11059
+ }
11060
+
11043
11061
  const isCodedErrors = (errs) => Array.isArray(errs) && errs.every((err) => isCodedError(err));
11044
11062
  const isCodedError = (err) => !!err.errorCode;
11045
11063
  const isDataCodedErrors = (data) => !!data.errors && isCodedErrors(data.errors);
@@ -13707,7 +13725,7 @@ var ipaddr = {
13707
13725
  }).call(commonjsGlobal);
13708
13726
  } (ipaddr));
13709
13727
 
13710
- var __async$Y = (__this, __arguments, generator) => {
13728
+ var __async$Z = (__this, __arguments, generator) => {
13711
13729
  return new Promise((resolve, reject) => {
13712
13730
  var fulfilled = (value) => {
13713
13731
  try {
@@ -13727,7 +13745,7 @@ var __async$Y = (__this, __arguments, generator) => {
13727
13745
  step((generator = generator.apply(__this, __arguments)).next());
13728
13746
  });
13729
13747
  };
13730
- const getEndUserIpAddress = () => __async$Y(void 0, null, function* () {
13748
+ const getEndUserIpAddress = () => __async$Z(void 0, null, function* () {
13731
13749
  try {
13732
13750
  const response = yield axios.get("https://api.ipify.org/?format=json");
13733
13751
  if (response.data.ip && ipaddrExports.isValid(response.data.ip)) {
@@ -13784,38 +13802,38 @@ const decamelizeKeys = (obj, separator = "_") => {
13784
13802
  return obj;
13785
13803
  };
13786
13804
 
13787
- var __defProp$v = Object.defineProperty;
13788
- var __defProps$p = Object.defineProperties;
13789
- var __getOwnPropDescs$p = Object.getOwnPropertyDescriptors;
13790
- var __getOwnPropSymbols$G = Object.getOwnPropertySymbols;
13791
- var __hasOwnProp$G = Object.prototype.hasOwnProperty;
13792
- var __propIsEnum$G = Object.prototype.propertyIsEnumerable;
13793
- var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13794
- var __spreadValues$v = (a, b) => {
13805
+ var __defProp$w = Object.defineProperty;
13806
+ var __defProps$q = Object.defineProperties;
13807
+ var __getOwnPropDescs$q = Object.getOwnPropertyDescriptors;
13808
+ var __getOwnPropSymbols$H = Object.getOwnPropertySymbols;
13809
+ var __hasOwnProp$H = Object.prototype.hasOwnProperty;
13810
+ var __propIsEnum$H = Object.prototype.propertyIsEnumerable;
13811
+ var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13812
+ var __spreadValues$w = (a, b) => {
13795
13813
  for (var prop in b || (b = {}))
13796
- if (__hasOwnProp$G.call(b, prop))
13797
- __defNormalProp$v(a, prop, b[prop]);
13798
- if (__getOwnPropSymbols$G)
13799
- for (var prop of __getOwnPropSymbols$G(b)) {
13800
- if (__propIsEnum$G.call(b, prop))
13801
- __defNormalProp$v(a, prop, b[prop]);
13814
+ if (__hasOwnProp$H.call(b, prop))
13815
+ __defNormalProp$w(a, prop, b[prop]);
13816
+ if (__getOwnPropSymbols$H)
13817
+ for (var prop of __getOwnPropSymbols$H(b)) {
13818
+ if (__propIsEnum$H.call(b, prop))
13819
+ __defNormalProp$w(a, prop, b[prop]);
13802
13820
  }
13803
13821
  return a;
13804
13822
  };
13805
- var __spreadProps$p = (a, b) => __defProps$p(a, __getOwnPropDescs$p(b));
13823
+ var __spreadProps$q = (a, b) => __defProps$q(a, __getOwnPropDescs$q(b));
13806
13824
  var __objRest$o = (source, exclude) => {
13807
13825
  var target = {};
13808
13826
  for (var prop in source)
13809
- if (__hasOwnProp$G.call(source, prop) && exclude.indexOf(prop) < 0)
13827
+ if (__hasOwnProp$H.call(source, prop) && exclude.indexOf(prop) < 0)
13810
13828
  target[prop] = source[prop];
13811
- if (source != null && __getOwnPropSymbols$G)
13812
- for (var prop of __getOwnPropSymbols$G(source)) {
13813
- if (exclude.indexOf(prop) < 0 && __propIsEnum$G.call(source, prop))
13829
+ if (source != null && __getOwnPropSymbols$H)
13830
+ for (var prop of __getOwnPropSymbols$H(source)) {
13831
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$H.call(source, prop))
13814
13832
  target[prop] = source[prop];
13815
13833
  }
13816
13834
  return target;
13817
13835
  };
13818
- var __async$X = (__this, __arguments, generator) => {
13836
+ var __async$Y = (__this, __arguments, generator) => {
13819
13837
  return new Promise((resolve, reject) => {
13820
13838
  var fulfilled = (value) => {
13821
13839
  try {
@@ -13855,12 +13873,12 @@ class CarriersAPI {
13855
13873
  /**
13856
13874
  * The `connect` method connects a carrier account to a user's ShipEngine account.
13857
13875
  */
13858
- this.connect = (_a) => __async$X(this, null, function* () {
13876
+ this.connect = (_a) => __async$Y(this, null, function* () {
13859
13877
  var _b = _a, { carrierCode } = _b, connection = __objRest$o(_b, ["carrierCode"]);
13860
13878
  const endUserIpAddress = yield getEndUserIpAddress();
13861
13879
  if (!endUserIpAddress)
13862
13880
  return Promise.reject([new CodedError("Unable to get IP address")]);
13863
- return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$p(__spreadValues$v({}, connection), {
13881
+ return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$q(__spreadValues$w({}, connection), {
13864
13882
  endUserIpAddress
13865
13883
  }));
13866
13884
  });
@@ -13946,7 +13964,7 @@ class CarriersAPI {
13946
13964
  }
13947
13965
  }
13948
13966
 
13949
- var __async$W = (__this, __arguments, generator) => {
13967
+ var __async$X = (__this, __arguments, generator) => {
13950
13968
  return new Promise((resolve, reject) => {
13951
13969
  var fulfilled = (value) => {
13952
13970
  try {
@@ -13988,7 +14006,7 @@ class ConnectionsAPI {
13988
14006
  /**
13989
14007
  * The `connectCarrier` method connects a carrier to account.
13990
14008
  */
13991
- this.connectCarrier = (carrierName, formData) => __async$W(this, null, function* () {
14009
+ this.connectCarrier = (carrierName, formData) => __async$X(this, null, function* () {
13992
14010
  return yield this.client.post(
13993
14011
  `/v1/connections/carriers/${carrierName}`,
13994
14012
  formData,
@@ -16163,23 +16181,23 @@ class CustomPackagesAPI {
16163
16181
  }
16164
16182
  }
16165
16183
 
16166
- var __defProp$u = Object.defineProperty;
16167
- var __getOwnPropSymbols$F = Object.getOwnPropertySymbols;
16168
- var __hasOwnProp$F = Object.prototype.hasOwnProperty;
16169
- var __propIsEnum$F = Object.prototype.propertyIsEnumerable;
16170
- var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16171
- var __spreadValues$u = (a, b) => {
16184
+ var __defProp$v = Object.defineProperty;
16185
+ var __getOwnPropSymbols$G = Object.getOwnPropertySymbols;
16186
+ var __hasOwnProp$G = Object.prototype.hasOwnProperty;
16187
+ var __propIsEnum$G = Object.prototype.propertyIsEnumerable;
16188
+ var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16189
+ var __spreadValues$v = (a, b) => {
16172
16190
  for (var prop in b || (b = {}))
16173
- if (__hasOwnProp$F.call(b, prop))
16174
- __defNormalProp$u(a, prop, b[prop]);
16175
- if (__getOwnPropSymbols$F)
16176
- for (var prop of __getOwnPropSymbols$F(b)) {
16177
- if (__propIsEnum$F.call(b, prop))
16178
- __defNormalProp$u(a, prop, b[prop]);
16191
+ if (__hasOwnProp$G.call(b, prop))
16192
+ __defNormalProp$v(a, prop, b[prop]);
16193
+ if (__getOwnPropSymbols$G)
16194
+ for (var prop of __getOwnPropSymbols$G(b)) {
16195
+ if (__propIsEnum$G.call(b, prop))
16196
+ __defNormalProp$v(a, prop, b[prop]);
16179
16197
  }
16180
16198
  return a;
16181
16199
  };
16182
- var __async$V = (__this, __arguments, generator) => {
16200
+ var __async$W = (__this, __arguments, generator) => {
16183
16201
  return new Promise((resolve, reject) => {
16184
16202
  var fulfilled = (value) => {
16185
16203
  try {
@@ -16218,12 +16236,12 @@ class FundingSourcesAPI {
16218
16236
  * The `create` method creates a new funding source for a given user. This requires
16219
16237
  * payment information to be collected from the user.
16220
16238
  */
16221
- this.create = (createFundingSource) => __async$V(this, null, function* () {
16239
+ this.create = (createFundingSource) => __async$W(this, null, function* () {
16222
16240
  const endUserIpAddress = yield getEndUserIpAddress();
16223
16241
  if (!endUserIpAddress) {
16224
16242
  return Promise.reject([new CodedError("Unable to get IP address")]);
16225
16243
  }
16226
- return yield this.client.post("/v1/funding_sources", __spreadValues$u({
16244
+ return yield this.client.post("/v1/funding_sources", __spreadValues$v({
16227
16245
  endUserIpAddress
16228
16246
  }, createFundingSource));
16229
16247
  });
@@ -16232,7 +16250,7 @@ class FundingSourcesAPI {
16232
16250
  * user to update the billing address or payment information associated with the
16233
16251
  * funding source.
16234
16252
  */
16235
- this.update = (billingInfo, creditCardInfo, auctanePayInfo, fundingSourceId) => __async$V(this, null, function* () {
16253
+ this.update = (billingInfo, creditCardInfo, auctanePayInfo, fundingSourceId) => __async$W(this, null, function* () {
16236
16254
  const endUserIpAddress = yield getEndUserIpAddress();
16237
16255
  if (!endUserIpAddress) {
16238
16256
  return Promise.reject([new CodedError("Unable to get IP address")]);
@@ -16242,7 +16260,7 @@ class FundingSourcesAPI {
16242
16260
  {
16243
16261
  billingInfo,
16244
16262
  endUserIpAddress,
16245
- paymentMethod: __spreadValues$u({
16263
+ paymentMethod: __spreadValues$v({
16246
16264
  creditCardInfo
16247
16265
  }, auctanePayInfo)
16248
16266
  }
@@ -16252,19 +16270,19 @@ class FundingSourcesAPI {
16252
16270
  * The `registerCarrier` method registers a carrier account and associates
16253
16271
  * it with a given funding source.
16254
16272
  */
16255
- this.registerCarrier = (carrier) => __async$V(this, null, function* () {
16273
+ this.registerCarrier = (carrier) => __async$W(this, null, function* () {
16256
16274
  const endUserIpAddress = yield getEndUserIpAddress();
16257
16275
  if (!endUserIpAddress) {
16258
16276
  return Promise.reject([new CodedError("Unable to get IP address")]);
16259
16277
  }
16260
- return yield this.client.post("/v1/registration/funding_source", __spreadValues$u({
16278
+ return yield this.client.post("/v1/registration/funding_source", __spreadValues$v({
16261
16279
  endUserIpAddress
16262
16280
  }, carrier));
16263
16281
  });
16264
16282
  /**
16265
16283
  * The `addFunds` method allows you to add funds to a funding source.
16266
16284
  */
16267
- this.addFunds = (amount, fundingSourceId) => __async$V(this, null, function* () {
16285
+ this.addFunds = (amount, fundingSourceId) => __async$W(this, null, function* () {
16268
16286
  return yield this.client.put(
16269
16287
  `/v1/funding_sources/${fundingSourceId}/add_funds`,
16270
16288
  amount
@@ -16274,7 +16292,7 @@ class FundingSourcesAPI {
16274
16292
  * The `metadata` method returns seller-specific requirements for creating funding sources
16275
16293
  * and attaching carriers
16276
16294
  */
16277
- this.metadata = () => __async$V(this, null, function* () {
16295
+ this.metadata = () => __async$W(this, null, function* () {
16278
16296
  return yield this.client.get("/v1/funding_sources/metadata");
16279
16297
  });
16280
16298
  /**
@@ -16326,7 +16344,7 @@ class InsuranceAPI {
16326
16344
  }
16327
16345
  }
16328
16346
 
16329
- var __async$U = (__this, __arguments, generator) => {
16347
+ var __async$V = (__this, __arguments, generator) => {
16330
16348
  return new Promise((resolve, reject) => {
16331
16349
  var fulfilled = (value) => {
16332
16350
  try {
@@ -16358,13 +16376,13 @@ class InvoiceAddressAPI {
16358
16376
  /**
16359
16377
  * The `create` method creates a new invoice address for a given user.
16360
16378
  */
16361
- this.create = (invoiceAddress) => __async$U(this, null, function* () {
16379
+ this.create = (invoiceAddress) => __async$V(this, null, function* () {
16362
16380
  return yield this.client.post("/v1/invoice_address", invoiceAddress);
16363
16381
  });
16364
16382
  /**
16365
16383
  * The `update` method updates a invoice address for a given user.
16366
16384
  */
16367
- this.update = (invoiceAddress) => __async$U(this, null, function* () {
16385
+ this.update = (invoiceAddress) => __async$V(this, null, function* () {
16368
16386
  return yield this.client.put("/v1/invoice_address", invoiceAddress);
16369
16387
  });
16370
16388
  this.client = client;
@@ -16406,17 +16424,17 @@ class LabelsAPI {
16406
16424
  }
16407
16425
  }
16408
16426
 
16409
- var __getOwnPropSymbols$E = Object.getOwnPropertySymbols;
16410
- var __hasOwnProp$E = Object.prototype.hasOwnProperty;
16411
- var __propIsEnum$E = Object.prototype.propertyIsEnumerable;
16427
+ var __getOwnPropSymbols$F = Object.getOwnPropertySymbols;
16428
+ var __hasOwnProp$F = Object.prototype.hasOwnProperty;
16429
+ var __propIsEnum$F = Object.prototype.propertyIsEnumerable;
16412
16430
  var __objRest$n = (source, exclude) => {
16413
16431
  var target = {};
16414
16432
  for (var prop in source)
16415
- if (__hasOwnProp$E.call(source, prop) && exclude.indexOf(prop) < 0)
16433
+ if (__hasOwnProp$F.call(source, prop) && exclude.indexOf(prop) < 0)
16416
16434
  target[prop] = source[prop];
16417
- if (source != null && __getOwnPropSymbols$E)
16418
- for (var prop of __getOwnPropSymbols$E(source)) {
16419
- if (exclude.indexOf(prop) < 0 && __propIsEnum$E.call(source, prop))
16435
+ if (source != null && __getOwnPropSymbols$F)
16436
+ for (var prop of __getOwnPropSymbols$F(source)) {
16437
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$F.call(source, prop))
16420
16438
  target[prop] = source[prop];
16421
16439
  }
16422
16440
  return target;
@@ -16537,19 +16555,19 @@ class RateCardsAPI {
16537
16555
  }
16538
16556
  }
16539
16557
 
16540
- var __defProp$t = Object.defineProperty;
16541
- var __getOwnPropSymbols$D = Object.getOwnPropertySymbols;
16542
- var __hasOwnProp$D = Object.prototype.hasOwnProperty;
16543
- var __propIsEnum$D = Object.prototype.propertyIsEnumerable;
16544
- var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16545
- var __spreadValues$t = (a, b) => {
16558
+ var __defProp$u = Object.defineProperty;
16559
+ var __getOwnPropSymbols$E = Object.getOwnPropertySymbols;
16560
+ var __hasOwnProp$E = Object.prototype.hasOwnProperty;
16561
+ var __propIsEnum$E = Object.prototype.propertyIsEnumerable;
16562
+ var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16563
+ var __spreadValues$u = (a, b) => {
16546
16564
  for (var prop in b || (b = {}))
16547
- if (__hasOwnProp$D.call(b, prop))
16548
- __defNormalProp$t(a, prop, b[prop]);
16549
- if (__getOwnPropSymbols$D)
16550
- for (var prop of __getOwnPropSymbols$D(b)) {
16551
- if (__propIsEnum$D.call(b, prop))
16552
- __defNormalProp$t(a, prop, b[prop]);
16565
+ if (__hasOwnProp$E.call(b, prop))
16566
+ __defNormalProp$u(a, prop, b[prop]);
16567
+ if (__getOwnPropSymbols$E)
16568
+ for (var prop of __getOwnPropSymbols$E(b)) {
16569
+ if (__propIsEnum$E.call(b, prop))
16570
+ __defNormalProp$u(a, prop, b[prop]);
16553
16571
  }
16554
16572
  return a;
16555
16573
  };
@@ -16571,7 +16589,7 @@ class RatesAPI {
16571
16589
  * method.
16572
16590
  */
16573
16591
  this.estimate = (params) => {
16574
- return this.client.post("/v1/rates/estimate", __spreadValues$t({}, params));
16592
+ return this.client.post("/v1/rates/estimate", __spreadValues$u({}, params));
16575
16593
  };
16576
16594
  this.client = client;
16577
16595
  }
@@ -16651,7 +16669,7 @@ class SalesOrdersAPI {
16651
16669
  }
16652
16670
  }
16653
16671
 
16654
- var __async$T = (__this, __arguments, generator) => {
16672
+ var __async$U = (__this, __arguments, generator) => {
16655
16673
  return new Promise((resolve, reject) => {
16656
16674
  var fulfilled = (value) => {
16657
16675
  try {
@@ -16709,7 +16727,7 @@ class SellersAPI {
16709
16727
  /**
16710
16728
  * Deletes an API Key
16711
16729
  */
16712
- this.deleteSellerApiKey = (_0) => __async$T(this, [_0], function* ({
16730
+ this.deleteSellerApiKey = (_0) => __async$U(this, [_0], function* ({
16713
16731
  encryptedApiKey,
16714
16732
  sellerId,
16715
16733
  isSandbox
@@ -16755,19 +16773,19 @@ class SellersAPI {
16755
16773
  }
16756
16774
  }
16757
16775
 
16758
- var __defProp$s = Object.defineProperty;
16759
- var __getOwnPropSymbols$C = Object.getOwnPropertySymbols;
16760
- var __hasOwnProp$C = Object.prototype.hasOwnProperty;
16761
- var __propIsEnum$C = Object.prototype.propertyIsEnumerable;
16762
- var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16763
- var __spreadValues$s = (a, b) => {
16776
+ var __defProp$t = Object.defineProperty;
16777
+ var __getOwnPropSymbols$D = Object.getOwnPropertySymbols;
16778
+ var __hasOwnProp$D = Object.prototype.hasOwnProperty;
16779
+ var __propIsEnum$D = Object.prototype.propertyIsEnumerable;
16780
+ var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16781
+ var __spreadValues$t = (a, b) => {
16764
16782
  for (var prop in b || (b = {}))
16765
- if (__hasOwnProp$C.call(b, prop))
16766
- __defNormalProp$s(a, prop, b[prop]);
16767
- if (__getOwnPropSymbols$C)
16768
- for (var prop of __getOwnPropSymbols$C(b)) {
16769
- if (__propIsEnum$C.call(b, prop))
16770
- __defNormalProp$s(a, prop, b[prop]);
16783
+ if (__hasOwnProp$D.call(b, prop))
16784
+ __defNormalProp$t(a, prop, b[prop]);
16785
+ if (__getOwnPropSymbols$D)
16786
+ for (var prop of __getOwnPropSymbols$D(b)) {
16787
+ if (__propIsEnum$D.call(b, prop))
16788
+ __defNormalProp$t(a, prop, b[prop]);
16771
16789
  }
16772
16790
  return a;
16773
16791
  };
@@ -16779,7 +16797,7 @@ class ServicePointsAPI {
16779
16797
  * Either an address, coordinates, or an address query
16780
16798
  */
16781
16799
  this.list = (options) => {
16782
- return this.client.post("/v1/service_points/list", __spreadValues$s({}, options));
16800
+ return this.client.post("/v1/service_points/list", __spreadValues$t({}, options));
16783
16801
  };
16784
16802
  /**
16785
16803
  * Get a specific service point by its carrier code, country code, and id
@@ -16797,7 +16815,7 @@ class ServicePointsAPI {
16797
16815
  }
16798
16816
  }
16799
16817
 
16800
- var __async$S = (__this, __arguments, generator) => {
16818
+ var __async$T = (__this, __arguments, generator) => {
16801
16819
  return new Promise((resolve, reject) => {
16802
16820
  var fulfilled = (value) => {
16803
16821
  try {
@@ -16846,7 +16864,7 @@ class ShipmentsAPI {
16846
16864
  * The `create` method allows for creating shipments based on a list of shipment
16847
16865
  * items passed into this method.
16848
16866
  */
16849
- this.create = (...shipments) => __async$S(this, null, function* () {
16867
+ this.create = (...shipments) => __async$T(this, null, function* () {
16850
16868
  return this.client.post("/v1/shipments", {
16851
16869
  shipments
16852
16870
  });
@@ -34238,26 +34256,26 @@ class WebhooksAPI {
34238
34256
  }
34239
34257
  }
34240
34258
 
34241
- var __defProp$r = Object.defineProperty;
34242
- var __defProps$o = Object.defineProperties;
34243
- var __getOwnPropDescs$o = Object.getOwnPropertyDescriptors;
34244
- var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
34245
- var __hasOwnProp$B = Object.prototype.hasOwnProperty;
34246
- var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
34247
- var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
34248
- var __spreadValues$r = (a, b) => {
34259
+ var __defProp$s = Object.defineProperty;
34260
+ var __defProps$p = Object.defineProperties;
34261
+ var __getOwnPropDescs$p = Object.getOwnPropertyDescriptors;
34262
+ var __getOwnPropSymbols$C = Object.getOwnPropertySymbols;
34263
+ var __hasOwnProp$C = Object.prototype.hasOwnProperty;
34264
+ var __propIsEnum$C = Object.prototype.propertyIsEnumerable;
34265
+ var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
34266
+ var __spreadValues$s = (a, b) => {
34249
34267
  for (var prop in b || (b = {}))
34250
- if (__hasOwnProp$B.call(b, prop))
34251
- __defNormalProp$r(a, prop, b[prop]);
34252
- if (__getOwnPropSymbols$B)
34253
- for (var prop of __getOwnPropSymbols$B(b)) {
34254
- if (__propIsEnum$B.call(b, prop))
34255
- __defNormalProp$r(a, prop, b[prop]);
34268
+ if (__hasOwnProp$C.call(b, prop))
34269
+ __defNormalProp$s(a, prop, b[prop]);
34270
+ if (__getOwnPropSymbols$C)
34271
+ for (var prop of __getOwnPropSymbols$C(b)) {
34272
+ if (__propIsEnum$C.call(b, prop))
34273
+ __defNormalProp$s(a, prop, b[prop]);
34256
34274
  }
34257
34275
  return a;
34258
34276
  };
34259
- var __spreadProps$o = (a, b) => __defProps$o(a, __getOwnPropDescs$o(b));
34260
- var __async$R = (__this, __arguments, generator) => {
34277
+ var __spreadProps$p = (a, b) => __defProps$p(a, __getOwnPropDescs$p(b));
34278
+ var __async$S = (__this, __arguments, generator) => {
34261
34279
  return new Promise((resolve, reject) => {
34262
34280
  var fulfilled = (value) => {
34263
34281
  try {
@@ -34280,7 +34298,7 @@ var __async$R = (__this, __arguments, generator) => {
34280
34298
  const logger$1 = E({
34281
34299
  level: process.env.NODE_ENV === "production" ? "fatal" : "info",
34282
34300
  name: "shipengine-api",
34283
- serializers: __spreadProps$o(__spreadValues$r({}, k), {
34301
+ serializers: __spreadProps$p(__spreadValues$s({}, k), {
34284
34302
  req: (req) => ({
34285
34303
  headers: req.headers,
34286
34304
  method: req.method,
@@ -34305,7 +34323,7 @@ class ShipEngineAPI {
34305
34323
  this.getSandboxToken = getSandboxToken;
34306
34324
  const client = axios.create({
34307
34325
  baseURL,
34308
- headers: __spreadProps$o(__spreadValues$r({}, headers), {
34326
+ headers: __spreadProps$p(__spreadValues$s({}, headers), {
34309
34327
  "Content-Type": "application/json"
34310
34328
  }),
34311
34329
  paramsSerializer: (params) => lib.stringify(decamelizeKeys(params), { arrayFormat: "brackets" }),
@@ -34340,7 +34358,7 @@ class ShipEngineAPI {
34340
34358
  });
34341
34359
  client.defaults.headers.common["Authorization"] = `Bearer ${token}`;
34342
34360
  client.interceptors.request.use(
34343
- (config) => __async$R(this, null, function* () {
34361
+ (config) => __async$S(this, null, function* () {
34344
34362
  if (config.isSandbox) {
34345
34363
  if (!this.sandboxToken) {
34346
34364
  this.sandboxToken = yield getSandboxToken == null ? void 0 : getSandboxToken();
@@ -34367,7 +34385,7 @@ class ShipEngineAPI {
34367
34385
  );
34368
34386
  return res;
34369
34387
  },
34370
- (err) => __async$R(this, null, function* () {
34388
+ (err) => __async$S(this, null, function* () {
34371
34389
  var _a, _b, _c, _d, _e;
34372
34390
  logger$1.error(
34373
34391
  { err, req: err.config, res: err.response },
@@ -34414,7 +34432,7 @@ class ShipEngineAPI {
34414
34432
  * that token (also known as Seller ID)
34415
34433
  */
34416
34434
  getTenant(isSandbox) {
34417
- return __async$R(this, null, function* () {
34435
+ return __async$S(this, null, function* () {
34418
34436
  var _a;
34419
34437
  if (!isSandbox) {
34420
34438
  return this.getTenantFromToken(this.token);
@@ -34627,6 +34645,15 @@ class ShipEngineAPI {
34627
34645
  get sellers() {
34628
34646
  return new SellersAPI(this.client);
34629
34647
  }
34648
+ /**
34649
+ * The `auctanePay` method provides access to the Auctane Pay endpoints in ShipEngine
34650
+ * API. e.g. Create Payment Session
34651
+ *
34652
+ * @see {@link AuctanePayAPI | The Auctane Pay API module}
34653
+ */
34654
+ get auctanePay() {
34655
+ return new AuctanePayAPI(this.client);
34656
+ }
34630
34657
  }
34631
34658
 
34632
34659
  const ShipEngineContext = React.createContext(void 0);
@@ -34693,25 +34720,25 @@ const delay = (ms) => new Promise((resolve) => {
34693
34720
 
34694
34721
  const onError = (_errors) => _default();
34695
34722
 
34696
- var __defProp$q = Object.defineProperty;
34697
- var __defProps$n = Object.defineProperties;
34698
- var __getOwnPropDescs$n = Object.getOwnPropertyDescriptors;
34699
- var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
34700
- var __hasOwnProp$A = Object.prototype.hasOwnProperty;
34701
- var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
34702
- var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
34703
- var __spreadValues$q = (a, b) => {
34723
+ var __defProp$r = Object.defineProperty;
34724
+ var __defProps$o = Object.defineProperties;
34725
+ var __getOwnPropDescs$o = Object.getOwnPropertyDescriptors;
34726
+ var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
34727
+ var __hasOwnProp$B = Object.prototype.hasOwnProperty;
34728
+ var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
34729
+ var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
34730
+ var __spreadValues$r = (a, b) => {
34704
34731
  for (var prop in b || (b = {}))
34705
- if (__hasOwnProp$A.call(b, prop))
34706
- __defNormalProp$q(a, prop, b[prop]);
34707
- if (__getOwnPropSymbols$A)
34708
- for (var prop of __getOwnPropSymbols$A(b)) {
34709
- if (__propIsEnum$A.call(b, prop))
34710
- __defNormalProp$q(a, prop, b[prop]);
34732
+ if (__hasOwnProp$B.call(b, prop))
34733
+ __defNormalProp$r(a, prop, b[prop]);
34734
+ if (__getOwnPropSymbols$B)
34735
+ for (var prop of __getOwnPropSymbols$B(b)) {
34736
+ if (__propIsEnum$B.call(b, prop))
34737
+ __defNormalProp$r(a, prop, b[prop]);
34711
34738
  }
34712
34739
  return a;
34713
34740
  };
34714
- var __spreadProps$n = (a, b) => __defProps$n(a, __getOwnPropDescs$n(b));
34741
+ var __spreadProps$o = (a, b) => __defProps$o(a, __getOwnPropDescs$o(b));
34715
34742
  const streams = [];
34716
34743
  if (process.env.NODE_ENV === "production") {
34717
34744
  streams.push({
@@ -34720,7 +34747,7 @@ if (process.env.NODE_ENV === "production") {
34720
34747
  }
34721
34748
  const logger = E({
34722
34749
  name: "shipengine",
34723
- serializers: __spreadProps$n(__spreadValues$q({}, k), {
34750
+ serializers: __spreadProps$o(__spreadValues$r({}, k), {
34724
34751
  req: (req) => ({
34725
34752
  headers: req.headers,
34726
34753
  method: req.method,
@@ -34745,7 +34772,7 @@ const retryUntil = (callbackFn, retries = 10, timeoutBetweenAttempts = 1e3) => P
34745
34772
  throw error;
34746
34773
  });
34747
34774
 
34748
- var __async$Q = (__this, __arguments, generator) => {
34775
+ var __async$R = (__this, __arguments, generator) => {
34749
34776
  return new Promise((resolve, reject) => {
34750
34777
  var fulfilled = (value) => {
34751
34778
  try {
@@ -34768,7 +34795,7 @@ var __async$Q = (__this, __arguments, generator) => {
34768
34795
  const useCreateAccountImage = () => {
34769
34796
  const { client } = useShipEngine();
34770
34797
  return reactQuery.useMutation({
34771
- mutationFn: (data) => __async$Q(void 0, null, function* () {
34798
+ mutationFn: (data) => __async$R(void 0, null, function* () {
34772
34799
  const result = yield client.accountSettings.createImage(data);
34773
34800
  return result.data;
34774
34801
  }),
@@ -34777,7 +34804,7 @@ const useCreateAccountImage = () => {
34777
34804
  });
34778
34805
  };
34779
34806
 
34780
- var __async$P = (__this, __arguments, generator) => {
34807
+ var __async$Q = (__this, __arguments, generator) => {
34781
34808
  return new Promise((resolve, reject) => {
34782
34809
  var fulfilled = (value) => {
34783
34810
  try {
@@ -34800,7 +34827,7 @@ var __async$P = (__this, __arguments, generator) => {
34800
34827
  const useDeleteAccountImage = () => {
34801
34828
  const { client } = useShipEngine();
34802
34829
  return reactQuery.useMutation({
34803
- mutationFn: (labelImageId) => __async$P(void 0, null, function* () {
34830
+ mutationFn: (labelImageId) => __async$Q(void 0, null, function* () {
34804
34831
  const result = yield client.accountSettings.deleteImage(labelImageId);
34805
34832
  return result.data;
34806
34833
  }),
@@ -34829,7 +34856,7 @@ const useGetAccountSettings = () => {
34829
34856
  });
34830
34857
  };
34831
34858
 
34832
- var __async$O = (__this, __arguments, generator) => {
34859
+ var __async$P = (__this, __arguments, generator) => {
34833
34860
  return new Promise((resolve, reject) => {
34834
34861
  var fulfilled = (value) => {
34835
34862
  try {
@@ -34852,7 +34879,7 @@ var __async$O = (__this, __arguments, generator) => {
34852
34879
  const useUpdateAccountImage = () => {
34853
34880
  const { client } = useShipEngine();
34854
34881
  return reactQuery.useMutation({
34855
- mutationFn: (data) => __async$O(void 0, null, function* () {
34882
+ mutationFn: (data) => __async$P(void 0, null, function* () {
34856
34883
  const result = yield client.accountSettings.updateImage(data);
34857
34884
  return result.data;
34858
34885
  }),
@@ -34861,7 +34888,7 @@ const useUpdateAccountImage = () => {
34861
34888
  });
34862
34889
  };
34863
34890
 
34864
- var __async$N = (__this, __arguments, generator) => {
34891
+ var __async$O = (__this, __arguments, generator) => {
34865
34892
  return new Promise((resolve, reject) => {
34866
34893
  var fulfilled = (value) => {
34867
34894
  try {
@@ -34884,7 +34911,7 @@ var __async$N = (__this, __arguments, generator) => {
34884
34911
  const useUpdateAccountSettings = () => {
34885
34912
  const { client } = useShipEngine();
34886
34913
  return reactQuery.useMutation({
34887
- mutationFn: (settings) => __async$N(void 0, null, function* () {
34914
+ mutationFn: (settings) => __async$O(void 0, null, function* () {
34888
34915
  const result = yield client.accountSettings.update(settings);
34889
34916
  return result.data;
34890
34917
  }),
@@ -34893,7 +34920,7 @@ const useUpdateAccountSettings = () => {
34893
34920
  });
34894
34921
  };
34895
34922
 
34896
- var __async$M = (__this, __arguments, generator) => {
34923
+ var __async$N = (__this, __arguments, generator) => {
34897
34924
  return new Promise((resolve, reject) => {
34898
34925
  var fulfilled = (value) => {
34899
34926
  try {
@@ -34916,7 +34943,7 @@ var __async$M = (__this, __arguments, generator) => {
34916
34943
  const useParseAddress = () => {
34917
34944
  const { client } = useShipEngine();
34918
34945
  return reactQuery.useMutation({
34919
- mutationFn: (_0) => __async$M(void 0, [_0], function* ({ address, text }) {
34946
+ mutationFn: (_0) => __async$N(void 0, [_0], function* ({ address, text }) {
34920
34947
  const result = yield client.addresses.parse(text, address);
34921
34948
  return result.data;
34922
34949
  }),
@@ -34925,7 +34952,7 @@ const useParseAddress = () => {
34925
34952
  });
34926
34953
  };
34927
34954
 
34928
- var __async$L = (__this, __arguments, generator) => {
34955
+ var __async$M = (__this, __arguments, generator) => {
34929
34956
  return new Promise((resolve, reject) => {
34930
34957
  var fulfilled = (value) => {
34931
34958
  try {
@@ -34948,7 +34975,7 @@ var __async$L = (__this, __arguments, generator) => {
34948
34975
  const useValidateAddresses = () => {
34949
34976
  const { client } = useShipEngine();
34950
34977
  return reactQuery.useMutation({
34951
- mutationFn: (addresses) => __async$L(void 0, null, function* () {
34978
+ mutationFn: (addresses) => __async$M(void 0, null, function* () {
34952
34979
  const result = yield client.addresses.validate(addresses);
34953
34980
  return result.data;
34954
34981
  }),
@@ -34957,6 +34984,57 @@ const useValidateAddresses = () => {
34957
34984
  });
34958
34985
  };
34959
34986
 
34987
+ var __defProp$q = Object.defineProperty;
34988
+ var __defProps$n = Object.defineProperties;
34989
+ var __getOwnPropDescs$n = Object.getOwnPropertyDescriptors;
34990
+ var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
34991
+ var __hasOwnProp$A = Object.prototype.hasOwnProperty;
34992
+ var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
34993
+ var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
34994
+ var __spreadValues$q = (a, b) => {
34995
+ for (var prop in b || (b = {}))
34996
+ if (__hasOwnProp$A.call(b, prop))
34997
+ __defNormalProp$q(a, prop, b[prop]);
34998
+ if (__getOwnPropSymbols$A)
34999
+ for (var prop of __getOwnPropSymbols$A(b)) {
35000
+ if (__propIsEnum$A.call(b, prop))
35001
+ __defNormalProp$q(a, prop, b[prop]);
35002
+ }
35003
+ return a;
35004
+ };
35005
+ var __spreadProps$n = (a, b) => __defProps$n(a, __getOwnPropDescs$n(b));
35006
+ var __async$L = (__this, __arguments, generator) => {
35007
+ return new Promise((resolve, reject) => {
35008
+ var fulfilled = (value) => {
35009
+ try {
35010
+ step(generator.next(value));
35011
+ } catch (e) {
35012
+ reject(e);
35013
+ }
35014
+ };
35015
+ var rejected = (value) => {
35016
+ try {
35017
+ step(generator.throw(value));
35018
+ } catch (e) {
35019
+ reject(e);
35020
+ }
35021
+ };
35022
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
35023
+ step((generator = generator.apply(__this, __arguments)).next());
35024
+ });
35025
+ };
35026
+ const useCreateSession = (params) => {
35027
+ const { client } = useShipEngine();
35028
+ return reactQuery.useMutation(__spreadProps$n(__spreadValues$q({}, params), {
35029
+ mutationFn: (request) => __async$L(void 0, null, function* () {
35030
+ const result = yield client.auctanePay.createSession(request);
35031
+ return result.data;
35032
+ }),
35033
+ mutationKey: ["useCreateSession"],
35034
+ onError
35035
+ }));
35036
+ };
35037
+
34960
35038
  var __async$K = (__this, __arguments, generator) => {
34961
35039
  return new Promise((resolve, reject) => {
34962
35040
  var fulfilled = (value) => {
@@ -39058,6 +39136,7 @@ exports.AddressesAPI = AddressesAPI;
39058
39136
  exports.AlchemyContext = AlchemyContext;
39059
39137
  exports.AlchemyProvider = AlchemyProvider;
39060
39138
  exports.AlchemyTestProvider = AlchemyTestProvider;
39139
+ exports.AuctanePayAPI = AuctanePayAPI;
39061
39140
  exports.CarriersAPI = CarriersAPI;
39062
39141
  exports.CodedError = CodedError;
39063
39142
  exports.ConfirmationType = ConfirmationType;
@@ -39127,6 +39206,7 @@ exports.useCreateRateCard = useCreateRateCard;
39127
39206
  exports.useCreateSalesOrderShipment = useCreateSalesOrderShipment;
39128
39207
  exports.useCreateSandboxSeller = useCreateSandboxSeller;
39129
39208
  exports.useCreateSellerApiKey = useCreateSellerApiKey;
39209
+ exports.useCreateSession = useCreateSession;
39130
39210
  exports.useCreateShipment = useCreateShipment;
39131
39211
  exports.useCreateShippingRule = useCreateShippingRule;
39132
39212
  exports.useCreateWarehouse = useCreateWarehouse;