@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.
- package/index.js +230 -150
- package/index.mjs +229 -151
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -10790,17 +10790,17 @@ var AccountBillingPlanChangeType = /* @__PURE__ */ ((AccountBillingPlanChangeTyp
|
|
|
10790
10790
|
return AccountBillingPlanChangeType2;
|
|
10791
10791
|
})(AccountBillingPlanChangeType || {});
|
|
10792
10792
|
|
|
10793
|
-
var __getOwnPropSymbols$
|
|
10794
|
-
var __hasOwnProp$
|
|
10795
|
-
var __propIsEnum$
|
|
10793
|
+
var __getOwnPropSymbols$J = Object.getOwnPropertySymbols;
|
|
10794
|
+
var __hasOwnProp$J = Object.prototype.hasOwnProperty;
|
|
10795
|
+
var __propIsEnum$J = Object.prototype.propertyIsEnumerable;
|
|
10796
10796
|
var __objRest$q = (source, exclude) => {
|
|
10797
10797
|
var target = {};
|
|
10798
10798
|
for (var prop in source)
|
|
10799
|
-
if (__hasOwnProp$
|
|
10799
|
+
if (__hasOwnProp$J.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
10800
10800
|
target[prop] = source[prop];
|
|
10801
|
-
if (source != null && __getOwnPropSymbols$
|
|
10802
|
-
for (var prop of __getOwnPropSymbols$
|
|
10803
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
10801
|
+
if (source != null && __getOwnPropSymbols$J)
|
|
10802
|
+
for (var prop of __getOwnPropSymbols$J(source)) {
|
|
10803
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$J.call(source, prop))
|
|
10804
10804
|
target[prop] = source[prop];
|
|
10805
10805
|
}
|
|
10806
10806
|
return target;
|
|
@@ -10839,12 +10839,14 @@ var MetadataRequirement = /* @__PURE__ */ ((MetadataRequirement2) => {
|
|
|
10839
10839
|
MetadataRequirement2["Nickname"] = "nickname";
|
|
10840
10840
|
MetadataRequirement2["PaymentMethod"] = "payment_method";
|
|
10841
10841
|
MetadataRequirement2["PickupAddress"] = "pickup_address";
|
|
10842
|
+
MetadataRequirement2["RequestActivation"] = "request_activation";
|
|
10842
10843
|
MetadataRequirement2["Unknown"] = "unknown";
|
|
10843
10844
|
return MetadataRequirement2;
|
|
10844
10845
|
})(MetadataRequirement || {});
|
|
10845
10846
|
var MetadataSatisfyingFormTypes = /* @__PURE__ */ ((MetadataSatisfyingFormTypes2) => {
|
|
10846
10847
|
MetadataSatisfyingFormTypes2["Address"] = "address";
|
|
10847
10848
|
MetadataSatisfyingFormTypes2["CreditCard"] = "credit_card";
|
|
10849
|
+
MetadataSatisfyingFormTypes2["ExplicitIntent"] = "explicit_intent";
|
|
10848
10850
|
MetadataSatisfyingFormTypes2["StampsAccountCredentials"] = "stamps_account_credentials";
|
|
10849
10851
|
MetadataSatisfyingFormTypes2["StampsSellerLabelProvider"] = "stamps_seller_label_provider";
|
|
10850
10852
|
MetadataSatisfyingFormTypes2["Unknown"] = "unknown";
|
|
@@ -10933,17 +10935,17 @@ const types = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
10933
10935
|
RateCardStatus
|
|
10934
10936
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
10935
10937
|
|
|
10936
|
-
var __getOwnPropSymbols$
|
|
10937
|
-
var __hasOwnProp$
|
|
10938
|
-
var __propIsEnum$
|
|
10938
|
+
var __getOwnPropSymbols$I = Object.getOwnPropertySymbols;
|
|
10939
|
+
var __hasOwnProp$I = Object.prototype.hasOwnProperty;
|
|
10940
|
+
var __propIsEnum$I = Object.prototype.propertyIsEnumerable;
|
|
10939
10941
|
var __objRest$p = (source, exclude) => {
|
|
10940
10942
|
var target = {};
|
|
10941
10943
|
for (var prop in source)
|
|
10942
|
-
if (__hasOwnProp$
|
|
10944
|
+
if (__hasOwnProp$I.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
10943
10945
|
target[prop] = source[prop];
|
|
10944
|
-
if (source != null && __getOwnPropSymbols$
|
|
10945
|
-
for (var prop of __getOwnPropSymbols$
|
|
10946
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
10946
|
+
if (source != null && __getOwnPropSymbols$I)
|
|
10947
|
+
for (var prop of __getOwnPropSymbols$I(source)) {
|
|
10948
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$I.call(source, prop))
|
|
10947
10949
|
target[prop] = source[prop];
|
|
10948
10950
|
}
|
|
10949
10951
|
return target;
|
|
@@ -11018,6 +11020,22 @@ class AddressesAPI {
|
|
|
11018
11020
|
}
|
|
11019
11021
|
}
|
|
11020
11022
|
|
|
11023
|
+
class AuctanePayAPI {
|
|
11024
|
+
constructor(client) {
|
|
11025
|
+
this.client = client;
|
|
11026
|
+
/**
|
|
11027
|
+
* The `createSession` method creates a new payment session.
|
|
11028
|
+
*
|
|
11029
|
+
* @param request - The request object containing the session details
|
|
11030
|
+
* @returns a promise that resolves to the created session
|
|
11031
|
+
*/
|
|
11032
|
+
this.createSession = (request) => {
|
|
11033
|
+
return this.client.post("/internal/auctane_pay/sessions", request);
|
|
11034
|
+
};
|
|
11035
|
+
this.client = client;
|
|
11036
|
+
}
|
|
11037
|
+
}
|
|
11038
|
+
|
|
11021
11039
|
const isCodedErrors = (errs) => Array.isArray(errs) && errs.every((err) => isCodedError(err));
|
|
11022
11040
|
const isCodedError = (err) => !!err.errorCode;
|
|
11023
11041
|
const isDataCodedErrors = (data) => !!data.errors && isCodedErrors(data.errors);
|
|
@@ -13685,7 +13703,7 @@ var ipaddr = {
|
|
|
13685
13703
|
}).call(commonjsGlobal);
|
|
13686
13704
|
} (ipaddr));
|
|
13687
13705
|
|
|
13688
|
-
var __async$
|
|
13706
|
+
var __async$Z = (__this, __arguments, generator) => {
|
|
13689
13707
|
return new Promise((resolve, reject) => {
|
|
13690
13708
|
var fulfilled = (value) => {
|
|
13691
13709
|
try {
|
|
@@ -13705,7 +13723,7 @@ var __async$Y = (__this, __arguments, generator) => {
|
|
|
13705
13723
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
13706
13724
|
});
|
|
13707
13725
|
};
|
|
13708
|
-
const getEndUserIpAddress = () => __async$
|
|
13726
|
+
const getEndUserIpAddress = () => __async$Z(void 0, null, function* () {
|
|
13709
13727
|
try {
|
|
13710
13728
|
const response = yield axios.get("https://api.ipify.org/?format=json");
|
|
13711
13729
|
if (response.data.ip && ipaddrExports.isValid(response.data.ip)) {
|
|
@@ -13762,38 +13780,38 @@ const decamelizeKeys = (obj, separator = "_") => {
|
|
|
13762
13780
|
return obj;
|
|
13763
13781
|
};
|
|
13764
13782
|
|
|
13765
|
-
var __defProp$
|
|
13766
|
-
var __defProps$
|
|
13767
|
-
var __getOwnPropDescs$
|
|
13768
|
-
var __getOwnPropSymbols$
|
|
13769
|
-
var __hasOwnProp$
|
|
13770
|
-
var __propIsEnum$
|
|
13771
|
-
var __defNormalProp$
|
|
13772
|
-
var __spreadValues$
|
|
13783
|
+
var __defProp$w = Object.defineProperty;
|
|
13784
|
+
var __defProps$q = Object.defineProperties;
|
|
13785
|
+
var __getOwnPropDescs$q = Object.getOwnPropertyDescriptors;
|
|
13786
|
+
var __getOwnPropSymbols$H = Object.getOwnPropertySymbols;
|
|
13787
|
+
var __hasOwnProp$H = Object.prototype.hasOwnProperty;
|
|
13788
|
+
var __propIsEnum$H = Object.prototype.propertyIsEnumerable;
|
|
13789
|
+
var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13790
|
+
var __spreadValues$w = (a, b) => {
|
|
13773
13791
|
for (var prop in b || (b = {}))
|
|
13774
|
-
if (__hasOwnProp$
|
|
13775
|
-
__defNormalProp$
|
|
13776
|
-
if (__getOwnPropSymbols$
|
|
13777
|
-
for (var prop of __getOwnPropSymbols$
|
|
13778
|
-
if (__propIsEnum$
|
|
13779
|
-
__defNormalProp$
|
|
13792
|
+
if (__hasOwnProp$H.call(b, prop))
|
|
13793
|
+
__defNormalProp$w(a, prop, b[prop]);
|
|
13794
|
+
if (__getOwnPropSymbols$H)
|
|
13795
|
+
for (var prop of __getOwnPropSymbols$H(b)) {
|
|
13796
|
+
if (__propIsEnum$H.call(b, prop))
|
|
13797
|
+
__defNormalProp$w(a, prop, b[prop]);
|
|
13780
13798
|
}
|
|
13781
13799
|
return a;
|
|
13782
13800
|
};
|
|
13783
|
-
var __spreadProps$
|
|
13801
|
+
var __spreadProps$q = (a, b) => __defProps$q(a, __getOwnPropDescs$q(b));
|
|
13784
13802
|
var __objRest$o = (source, exclude) => {
|
|
13785
13803
|
var target = {};
|
|
13786
13804
|
for (var prop in source)
|
|
13787
|
-
if (__hasOwnProp$
|
|
13805
|
+
if (__hasOwnProp$H.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
13788
13806
|
target[prop] = source[prop];
|
|
13789
|
-
if (source != null && __getOwnPropSymbols$
|
|
13790
|
-
for (var prop of __getOwnPropSymbols$
|
|
13791
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
13807
|
+
if (source != null && __getOwnPropSymbols$H)
|
|
13808
|
+
for (var prop of __getOwnPropSymbols$H(source)) {
|
|
13809
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$H.call(source, prop))
|
|
13792
13810
|
target[prop] = source[prop];
|
|
13793
13811
|
}
|
|
13794
13812
|
return target;
|
|
13795
13813
|
};
|
|
13796
|
-
var __async$
|
|
13814
|
+
var __async$Y = (__this, __arguments, generator) => {
|
|
13797
13815
|
return new Promise((resolve, reject) => {
|
|
13798
13816
|
var fulfilled = (value) => {
|
|
13799
13817
|
try {
|
|
@@ -13833,12 +13851,12 @@ class CarriersAPI {
|
|
|
13833
13851
|
/**
|
|
13834
13852
|
* The `connect` method connects a carrier account to a user's ShipEngine account.
|
|
13835
13853
|
*/
|
|
13836
|
-
this.connect = (_a) => __async$
|
|
13854
|
+
this.connect = (_a) => __async$Y(this, null, function* () {
|
|
13837
13855
|
var _b = _a, { carrierCode } = _b, connection = __objRest$o(_b, ["carrierCode"]);
|
|
13838
13856
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
13839
13857
|
if (!endUserIpAddress)
|
|
13840
13858
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
13841
|
-
return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$
|
|
13859
|
+
return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$q(__spreadValues$w({}, connection), {
|
|
13842
13860
|
endUserIpAddress
|
|
13843
13861
|
}));
|
|
13844
13862
|
});
|
|
@@ -13924,7 +13942,7 @@ class CarriersAPI {
|
|
|
13924
13942
|
}
|
|
13925
13943
|
}
|
|
13926
13944
|
|
|
13927
|
-
var __async$
|
|
13945
|
+
var __async$X = (__this, __arguments, generator) => {
|
|
13928
13946
|
return new Promise((resolve, reject) => {
|
|
13929
13947
|
var fulfilled = (value) => {
|
|
13930
13948
|
try {
|
|
@@ -13966,7 +13984,7 @@ class ConnectionsAPI {
|
|
|
13966
13984
|
/**
|
|
13967
13985
|
* The `connectCarrier` method connects a carrier to account.
|
|
13968
13986
|
*/
|
|
13969
|
-
this.connectCarrier = (carrierName, formData) => __async$
|
|
13987
|
+
this.connectCarrier = (carrierName, formData) => __async$X(this, null, function* () {
|
|
13970
13988
|
return yield this.client.post(
|
|
13971
13989
|
`/v1/connections/carriers/${carrierName}`,
|
|
13972
13990
|
formData,
|
|
@@ -16141,23 +16159,23 @@ class CustomPackagesAPI {
|
|
|
16141
16159
|
}
|
|
16142
16160
|
}
|
|
16143
16161
|
|
|
16144
|
-
var __defProp$
|
|
16145
|
-
var __getOwnPropSymbols$
|
|
16146
|
-
var __hasOwnProp$
|
|
16147
|
-
var __propIsEnum$
|
|
16148
|
-
var __defNormalProp$
|
|
16149
|
-
var __spreadValues$
|
|
16162
|
+
var __defProp$v = Object.defineProperty;
|
|
16163
|
+
var __getOwnPropSymbols$G = Object.getOwnPropertySymbols;
|
|
16164
|
+
var __hasOwnProp$G = Object.prototype.hasOwnProperty;
|
|
16165
|
+
var __propIsEnum$G = Object.prototype.propertyIsEnumerable;
|
|
16166
|
+
var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16167
|
+
var __spreadValues$v = (a, b) => {
|
|
16150
16168
|
for (var prop in b || (b = {}))
|
|
16151
|
-
if (__hasOwnProp$
|
|
16152
|
-
__defNormalProp$
|
|
16153
|
-
if (__getOwnPropSymbols$
|
|
16154
|
-
for (var prop of __getOwnPropSymbols$
|
|
16155
|
-
if (__propIsEnum$
|
|
16156
|
-
__defNormalProp$
|
|
16169
|
+
if (__hasOwnProp$G.call(b, prop))
|
|
16170
|
+
__defNormalProp$v(a, prop, b[prop]);
|
|
16171
|
+
if (__getOwnPropSymbols$G)
|
|
16172
|
+
for (var prop of __getOwnPropSymbols$G(b)) {
|
|
16173
|
+
if (__propIsEnum$G.call(b, prop))
|
|
16174
|
+
__defNormalProp$v(a, prop, b[prop]);
|
|
16157
16175
|
}
|
|
16158
16176
|
return a;
|
|
16159
16177
|
};
|
|
16160
|
-
var __async$
|
|
16178
|
+
var __async$W = (__this, __arguments, generator) => {
|
|
16161
16179
|
return new Promise((resolve, reject) => {
|
|
16162
16180
|
var fulfilled = (value) => {
|
|
16163
16181
|
try {
|
|
@@ -16196,12 +16214,12 @@ class FundingSourcesAPI {
|
|
|
16196
16214
|
* The `create` method creates a new funding source for a given user. This requires
|
|
16197
16215
|
* payment information to be collected from the user.
|
|
16198
16216
|
*/
|
|
16199
|
-
this.create = (createFundingSource) => __async$
|
|
16217
|
+
this.create = (createFundingSource) => __async$W(this, null, function* () {
|
|
16200
16218
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16201
16219
|
if (!endUserIpAddress) {
|
|
16202
16220
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
16203
16221
|
}
|
|
16204
|
-
return yield this.client.post("/v1/funding_sources", __spreadValues$
|
|
16222
|
+
return yield this.client.post("/v1/funding_sources", __spreadValues$v({
|
|
16205
16223
|
endUserIpAddress
|
|
16206
16224
|
}, createFundingSource));
|
|
16207
16225
|
});
|
|
@@ -16210,7 +16228,7 @@ class FundingSourcesAPI {
|
|
|
16210
16228
|
* user to update the billing address or payment information associated with the
|
|
16211
16229
|
* funding source.
|
|
16212
16230
|
*/
|
|
16213
|
-
this.update = (billingInfo, creditCardInfo, auctanePayInfo, fundingSourceId) => __async$
|
|
16231
|
+
this.update = (billingInfo, creditCardInfo, auctanePayInfo, fundingSourceId) => __async$W(this, null, function* () {
|
|
16214
16232
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16215
16233
|
if (!endUserIpAddress) {
|
|
16216
16234
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
@@ -16220,7 +16238,7 @@ class FundingSourcesAPI {
|
|
|
16220
16238
|
{
|
|
16221
16239
|
billingInfo,
|
|
16222
16240
|
endUserIpAddress,
|
|
16223
|
-
paymentMethod: __spreadValues$
|
|
16241
|
+
paymentMethod: __spreadValues$v({
|
|
16224
16242
|
creditCardInfo
|
|
16225
16243
|
}, auctanePayInfo)
|
|
16226
16244
|
}
|
|
@@ -16230,19 +16248,19 @@ class FundingSourcesAPI {
|
|
|
16230
16248
|
* The `registerCarrier` method registers a carrier account and associates
|
|
16231
16249
|
* it with a given funding source.
|
|
16232
16250
|
*/
|
|
16233
|
-
this.registerCarrier = (carrier) => __async$
|
|
16251
|
+
this.registerCarrier = (carrier) => __async$W(this, null, function* () {
|
|
16234
16252
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16235
16253
|
if (!endUserIpAddress) {
|
|
16236
16254
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
16237
16255
|
}
|
|
16238
|
-
return yield this.client.post("/v1/registration/funding_source", __spreadValues$
|
|
16256
|
+
return yield this.client.post("/v1/registration/funding_source", __spreadValues$v({
|
|
16239
16257
|
endUserIpAddress
|
|
16240
16258
|
}, carrier));
|
|
16241
16259
|
});
|
|
16242
16260
|
/**
|
|
16243
16261
|
* The `addFunds` method allows you to add funds to a funding source.
|
|
16244
16262
|
*/
|
|
16245
|
-
this.addFunds = (amount, fundingSourceId) => __async$
|
|
16263
|
+
this.addFunds = (amount, fundingSourceId) => __async$W(this, null, function* () {
|
|
16246
16264
|
return yield this.client.put(
|
|
16247
16265
|
`/v1/funding_sources/${fundingSourceId}/add_funds`,
|
|
16248
16266
|
amount
|
|
@@ -16252,7 +16270,7 @@ class FundingSourcesAPI {
|
|
|
16252
16270
|
* The `metadata` method returns seller-specific requirements for creating funding sources
|
|
16253
16271
|
* and attaching carriers
|
|
16254
16272
|
*/
|
|
16255
|
-
this.metadata = () => __async$
|
|
16273
|
+
this.metadata = () => __async$W(this, null, function* () {
|
|
16256
16274
|
return yield this.client.get("/v1/funding_sources/metadata");
|
|
16257
16275
|
});
|
|
16258
16276
|
/**
|
|
@@ -16304,7 +16322,7 @@ class InsuranceAPI {
|
|
|
16304
16322
|
}
|
|
16305
16323
|
}
|
|
16306
16324
|
|
|
16307
|
-
var __async$
|
|
16325
|
+
var __async$V = (__this, __arguments, generator) => {
|
|
16308
16326
|
return new Promise((resolve, reject) => {
|
|
16309
16327
|
var fulfilled = (value) => {
|
|
16310
16328
|
try {
|
|
@@ -16336,13 +16354,13 @@ class InvoiceAddressAPI {
|
|
|
16336
16354
|
/**
|
|
16337
16355
|
* The `create` method creates a new invoice address for a given user.
|
|
16338
16356
|
*/
|
|
16339
|
-
this.create = (invoiceAddress) => __async$
|
|
16357
|
+
this.create = (invoiceAddress) => __async$V(this, null, function* () {
|
|
16340
16358
|
return yield this.client.post("/v1/invoice_address", invoiceAddress);
|
|
16341
16359
|
});
|
|
16342
16360
|
/**
|
|
16343
16361
|
* The `update` method updates a invoice address for a given user.
|
|
16344
16362
|
*/
|
|
16345
|
-
this.update = (invoiceAddress) => __async$
|
|
16363
|
+
this.update = (invoiceAddress) => __async$V(this, null, function* () {
|
|
16346
16364
|
return yield this.client.put("/v1/invoice_address", invoiceAddress);
|
|
16347
16365
|
});
|
|
16348
16366
|
this.client = client;
|
|
@@ -16384,17 +16402,17 @@ class LabelsAPI {
|
|
|
16384
16402
|
}
|
|
16385
16403
|
}
|
|
16386
16404
|
|
|
16387
|
-
var __getOwnPropSymbols$
|
|
16388
|
-
var __hasOwnProp$
|
|
16389
|
-
var __propIsEnum$
|
|
16405
|
+
var __getOwnPropSymbols$F = Object.getOwnPropertySymbols;
|
|
16406
|
+
var __hasOwnProp$F = Object.prototype.hasOwnProperty;
|
|
16407
|
+
var __propIsEnum$F = Object.prototype.propertyIsEnumerable;
|
|
16390
16408
|
var __objRest$n = (source, exclude) => {
|
|
16391
16409
|
var target = {};
|
|
16392
16410
|
for (var prop in source)
|
|
16393
|
-
if (__hasOwnProp$
|
|
16411
|
+
if (__hasOwnProp$F.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
16394
16412
|
target[prop] = source[prop];
|
|
16395
|
-
if (source != null && __getOwnPropSymbols$
|
|
16396
|
-
for (var prop of __getOwnPropSymbols$
|
|
16397
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
16413
|
+
if (source != null && __getOwnPropSymbols$F)
|
|
16414
|
+
for (var prop of __getOwnPropSymbols$F(source)) {
|
|
16415
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$F.call(source, prop))
|
|
16398
16416
|
target[prop] = source[prop];
|
|
16399
16417
|
}
|
|
16400
16418
|
return target;
|
|
@@ -16515,19 +16533,19 @@ class RateCardsAPI {
|
|
|
16515
16533
|
}
|
|
16516
16534
|
}
|
|
16517
16535
|
|
|
16518
|
-
var __defProp$
|
|
16519
|
-
var __getOwnPropSymbols$
|
|
16520
|
-
var __hasOwnProp$
|
|
16521
|
-
var __propIsEnum$
|
|
16522
|
-
var __defNormalProp$
|
|
16523
|
-
var __spreadValues$
|
|
16536
|
+
var __defProp$u = Object.defineProperty;
|
|
16537
|
+
var __getOwnPropSymbols$E = Object.getOwnPropertySymbols;
|
|
16538
|
+
var __hasOwnProp$E = Object.prototype.hasOwnProperty;
|
|
16539
|
+
var __propIsEnum$E = Object.prototype.propertyIsEnumerable;
|
|
16540
|
+
var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16541
|
+
var __spreadValues$u = (a, b) => {
|
|
16524
16542
|
for (var prop in b || (b = {}))
|
|
16525
|
-
if (__hasOwnProp$
|
|
16526
|
-
__defNormalProp$
|
|
16527
|
-
if (__getOwnPropSymbols$
|
|
16528
|
-
for (var prop of __getOwnPropSymbols$
|
|
16529
|
-
if (__propIsEnum$
|
|
16530
|
-
__defNormalProp$
|
|
16543
|
+
if (__hasOwnProp$E.call(b, prop))
|
|
16544
|
+
__defNormalProp$u(a, prop, b[prop]);
|
|
16545
|
+
if (__getOwnPropSymbols$E)
|
|
16546
|
+
for (var prop of __getOwnPropSymbols$E(b)) {
|
|
16547
|
+
if (__propIsEnum$E.call(b, prop))
|
|
16548
|
+
__defNormalProp$u(a, prop, b[prop]);
|
|
16531
16549
|
}
|
|
16532
16550
|
return a;
|
|
16533
16551
|
};
|
|
@@ -16549,7 +16567,7 @@ class RatesAPI {
|
|
|
16549
16567
|
* method.
|
|
16550
16568
|
*/
|
|
16551
16569
|
this.estimate = (params) => {
|
|
16552
|
-
return this.client.post("/v1/rates/estimate", __spreadValues$
|
|
16570
|
+
return this.client.post("/v1/rates/estimate", __spreadValues$u({}, params));
|
|
16553
16571
|
};
|
|
16554
16572
|
this.client = client;
|
|
16555
16573
|
}
|
|
@@ -16629,7 +16647,7 @@ class SalesOrdersAPI {
|
|
|
16629
16647
|
}
|
|
16630
16648
|
}
|
|
16631
16649
|
|
|
16632
|
-
var __async$
|
|
16650
|
+
var __async$U = (__this, __arguments, generator) => {
|
|
16633
16651
|
return new Promise((resolve, reject) => {
|
|
16634
16652
|
var fulfilled = (value) => {
|
|
16635
16653
|
try {
|
|
@@ -16687,7 +16705,7 @@ class SellersAPI {
|
|
|
16687
16705
|
/**
|
|
16688
16706
|
* Deletes an API Key
|
|
16689
16707
|
*/
|
|
16690
|
-
this.deleteSellerApiKey = (_0) => __async$
|
|
16708
|
+
this.deleteSellerApiKey = (_0) => __async$U(this, [_0], function* ({
|
|
16691
16709
|
encryptedApiKey,
|
|
16692
16710
|
sellerId,
|
|
16693
16711
|
isSandbox
|
|
@@ -16733,19 +16751,19 @@ class SellersAPI {
|
|
|
16733
16751
|
}
|
|
16734
16752
|
}
|
|
16735
16753
|
|
|
16736
|
-
var __defProp$
|
|
16737
|
-
var __getOwnPropSymbols$
|
|
16738
|
-
var __hasOwnProp$
|
|
16739
|
-
var __propIsEnum$
|
|
16740
|
-
var __defNormalProp$
|
|
16741
|
-
var __spreadValues$
|
|
16754
|
+
var __defProp$t = Object.defineProperty;
|
|
16755
|
+
var __getOwnPropSymbols$D = Object.getOwnPropertySymbols;
|
|
16756
|
+
var __hasOwnProp$D = Object.prototype.hasOwnProperty;
|
|
16757
|
+
var __propIsEnum$D = Object.prototype.propertyIsEnumerable;
|
|
16758
|
+
var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16759
|
+
var __spreadValues$t = (a, b) => {
|
|
16742
16760
|
for (var prop in b || (b = {}))
|
|
16743
|
-
if (__hasOwnProp$
|
|
16744
|
-
__defNormalProp$
|
|
16745
|
-
if (__getOwnPropSymbols$
|
|
16746
|
-
for (var prop of __getOwnPropSymbols$
|
|
16747
|
-
if (__propIsEnum$
|
|
16748
|
-
__defNormalProp$
|
|
16761
|
+
if (__hasOwnProp$D.call(b, prop))
|
|
16762
|
+
__defNormalProp$t(a, prop, b[prop]);
|
|
16763
|
+
if (__getOwnPropSymbols$D)
|
|
16764
|
+
for (var prop of __getOwnPropSymbols$D(b)) {
|
|
16765
|
+
if (__propIsEnum$D.call(b, prop))
|
|
16766
|
+
__defNormalProp$t(a, prop, b[prop]);
|
|
16749
16767
|
}
|
|
16750
16768
|
return a;
|
|
16751
16769
|
};
|
|
@@ -16757,7 +16775,7 @@ class ServicePointsAPI {
|
|
|
16757
16775
|
* Either an address, coordinates, or an address query
|
|
16758
16776
|
*/
|
|
16759
16777
|
this.list = (options) => {
|
|
16760
|
-
return this.client.post("/v1/service_points/list", __spreadValues$
|
|
16778
|
+
return this.client.post("/v1/service_points/list", __spreadValues$t({}, options));
|
|
16761
16779
|
};
|
|
16762
16780
|
/**
|
|
16763
16781
|
* Get a specific service point by its carrier code, country code, and id
|
|
@@ -16775,7 +16793,7 @@ class ServicePointsAPI {
|
|
|
16775
16793
|
}
|
|
16776
16794
|
}
|
|
16777
16795
|
|
|
16778
|
-
var __async$
|
|
16796
|
+
var __async$T = (__this, __arguments, generator) => {
|
|
16779
16797
|
return new Promise((resolve, reject) => {
|
|
16780
16798
|
var fulfilled = (value) => {
|
|
16781
16799
|
try {
|
|
@@ -16824,7 +16842,7 @@ class ShipmentsAPI {
|
|
|
16824
16842
|
* The `create` method allows for creating shipments based on a list of shipment
|
|
16825
16843
|
* items passed into this method.
|
|
16826
16844
|
*/
|
|
16827
|
-
this.create = (...shipments) => __async$
|
|
16845
|
+
this.create = (...shipments) => __async$T(this, null, function* () {
|
|
16828
16846
|
return this.client.post("/v1/shipments", {
|
|
16829
16847
|
shipments
|
|
16830
16848
|
});
|
|
@@ -34216,26 +34234,26 @@ class WebhooksAPI {
|
|
|
34216
34234
|
}
|
|
34217
34235
|
}
|
|
34218
34236
|
|
|
34219
|
-
var __defProp$
|
|
34220
|
-
var __defProps$
|
|
34221
|
-
var __getOwnPropDescs$
|
|
34222
|
-
var __getOwnPropSymbols$
|
|
34223
|
-
var __hasOwnProp$
|
|
34224
|
-
var __propIsEnum$
|
|
34225
|
-
var __defNormalProp$
|
|
34226
|
-
var __spreadValues$
|
|
34237
|
+
var __defProp$s = Object.defineProperty;
|
|
34238
|
+
var __defProps$p = Object.defineProperties;
|
|
34239
|
+
var __getOwnPropDescs$p = Object.getOwnPropertyDescriptors;
|
|
34240
|
+
var __getOwnPropSymbols$C = Object.getOwnPropertySymbols;
|
|
34241
|
+
var __hasOwnProp$C = Object.prototype.hasOwnProperty;
|
|
34242
|
+
var __propIsEnum$C = Object.prototype.propertyIsEnumerable;
|
|
34243
|
+
var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
34244
|
+
var __spreadValues$s = (a, b) => {
|
|
34227
34245
|
for (var prop in b || (b = {}))
|
|
34228
|
-
if (__hasOwnProp$
|
|
34229
|
-
__defNormalProp$
|
|
34230
|
-
if (__getOwnPropSymbols$
|
|
34231
|
-
for (var prop of __getOwnPropSymbols$
|
|
34232
|
-
if (__propIsEnum$
|
|
34233
|
-
__defNormalProp$
|
|
34246
|
+
if (__hasOwnProp$C.call(b, prop))
|
|
34247
|
+
__defNormalProp$s(a, prop, b[prop]);
|
|
34248
|
+
if (__getOwnPropSymbols$C)
|
|
34249
|
+
for (var prop of __getOwnPropSymbols$C(b)) {
|
|
34250
|
+
if (__propIsEnum$C.call(b, prop))
|
|
34251
|
+
__defNormalProp$s(a, prop, b[prop]);
|
|
34234
34252
|
}
|
|
34235
34253
|
return a;
|
|
34236
34254
|
};
|
|
34237
|
-
var __spreadProps$
|
|
34238
|
-
var __async$
|
|
34255
|
+
var __spreadProps$p = (a, b) => __defProps$p(a, __getOwnPropDescs$p(b));
|
|
34256
|
+
var __async$S = (__this, __arguments, generator) => {
|
|
34239
34257
|
return new Promise((resolve, reject) => {
|
|
34240
34258
|
var fulfilled = (value) => {
|
|
34241
34259
|
try {
|
|
@@ -34258,7 +34276,7 @@ var __async$R = (__this, __arguments, generator) => {
|
|
|
34258
34276
|
const logger$1 = E({
|
|
34259
34277
|
level: process.env.NODE_ENV === "production" ? "fatal" : "info",
|
|
34260
34278
|
name: "shipengine-api",
|
|
34261
|
-
serializers: __spreadProps$
|
|
34279
|
+
serializers: __spreadProps$p(__spreadValues$s({}, k), {
|
|
34262
34280
|
req: (req) => ({
|
|
34263
34281
|
headers: req.headers,
|
|
34264
34282
|
method: req.method,
|
|
@@ -34283,7 +34301,7 @@ class ShipEngineAPI {
|
|
|
34283
34301
|
this.getSandboxToken = getSandboxToken;
|
|
34284
34302
|
const client = axios.create({
|
|
34285
34303
|
baseURL,
|
|
34286
|
-
headers: __spreadProps$
|
|
34304
|
+
headers: __spreadProps$p(__spreadValues$s({}, headers), {
|
|
34287
34305
|
"Content-Type": "application/json"
|
|
34288
34306
|
}),
|
|
34289
34307
|
paramsSerializer: (params) => lib.stringify(decamelizeKeys(params), { arrayFormat: "brackets" }),
|
|
@@ -34318,7 +34336,7 @@ class ShipEngineAPI {
|
|
|
34318
34336
|
});
|
|
34319
34337
|
client.defaults.headers.common["Authorization"] = `Bearer ${token}`;
|
|
34320
34338
|
client.interceptors.request.use(
|
|
34321
|
-
(config) => __async$
|
|
34339
|
+
(config) => __async$S(this, null, function* () {
|
|
34322
34340
|
if (config.isSandbox) {
|
|
34323
34341
|
if (!this.sandboxToken) {
|
|
34324
34342
|
this.sandboxToken = yield getSandboxToken == null ? void 0 : getSandboxToken();
|
|
@@ -34345,7 +34363,7 @@ class ShipEngineAPI {
|
|
|
34345
34363
|
);
|
|
34346
34364
|
return res;
|
|
34347
34365
|
},
|
|
34348
|
-
(err) => __async$
|
|
34366
|
+
(err) => __async$S(this, null, function* () {
|
|
34349
34367
|
var _a, _b, _c, _d, _e;
|
|
34350
34368
|
logger$1.error(
|
|
34351
34369
|
{ err, req: err.config, res: err.response },
|
|
@@ -34392,7 +34410,7 @@ class ShipEngineAPI {
|
|
|
34392
34410
|
* that token (also known as Seller ID)
|
|
34393
34411
|
*/
|
|
34394
34412
|
getTenant(isSandbox) {
|
|
34395
|
-
return __async$
|
|
34413
|
+
return __async$S(this, null, function* () {
|
|
34396
34414
|
var _a;
|
|
34397
34415
|
if (!isSandbox) {
|
|
34398
34416
|
return this.getTenantFromToken(this.token);
|
|
@@ -34605,6 +34623,15 @@ class ShipEngineAPI {
|
|
|
34605
34623
|
get sellers() {
|
|
34606
34624
|
return new SellersAPI(this.client);
|
|
34607
34625
|
}
|
|
34626
|
+
/**
|
|
34627
|
+
* The `auctanePay` method provides access to the Auctane Pay endpoints in ShipEngine
|
|
34628
|
+
* API. e.g. Create Payment Session
|
|
34629
|
+
*
|
|
34630
|
+
* @see {@link AuctanePayAPI | The Auctane Pay API module}
|
|
34631
|
+
*/
|
|
34632
|
+
get auctanePay() {
|
|
34633
|
+
return new AuctanePayAPI(this.client);
|
|
34634
|
+
}
|
|
34608
34635
|
}
|
|
34609
34636
|
|
|
34610
34637
|
const ShipEngineContext = createContext(void 0);
|
|
@@ -34671,25 +34698,25 @@ const delay = (ms) => new Promise((resolve) => {
|
|
|
34671
34698
|
|
|
34672
34699
|
const onError = (_errors) => _default();
|
|
34673
34700
|
|
|
34674
|
-
var __defProp$
|
|
34675
|
-
var __defProps$
|
|
34676
|
-
var __getOwnPropDescs$
|
|
34677
|
-
var __getOwnPropSymbols$
|
|
34678
|
-
var __hasOwnProp$
|
|
34679
|
-
var __propIsEnum$
|
|
34680
|
-
var __defNormalProp$
|
|
34681
|
-
var __spreadValues$
|
|
34701
|
+
var __defProp$r = Object.defineProperty;
|
|
34702
|
+
var __defProps$o = Object.defineProperties;
|
|
34703
|
+
var __getOwnPropDescs$o = Object.getOwnPropertyDescriptors;
|
|
34704
|
+
var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
|
|
34705
|
+
var __hasOwnProp$B = Object.prototype.hasOwnProperty;
|
|
34706
|
+
var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
|
|
34707
|
+
var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
34708
|
+
var __spreadValues$r = (a, b) => {
|
|
34682
34709
|
for (var prop in b || (b = {}))
|
|
34683
|
-
if (__hasOwnProp$
|
|
34684
|
-
__defNormalProp$
|
|
34685
|
-
if (__getOwnPropSymbols$
|
|
34686
|
-
for (var prop of __getOwnPropSymbols$
|
|
34687
|
-
if (__propIsEnum$
|
|
34688
|
-
__defNormalProp$
|
|
34710
|
+
if (__hasOwnProp$B.call(b, prop))
|
|
34711
|
+
__defNormalProp$r(a, prop, b[prop]);
|
|
34712
|
+
if (__getOwnPropSymbols$B)
|
|
34713
|
+
for (var prop of __getOwnPropSymbols$B(b)) {
|
|
34714
|
+
if (__propIsEnum$B.call(b, prop))
|
|
34715
|
+
__defNormalProp$r(a, prop, b[prop]);
|
|
34689
34716
|
}
|
|
34690
34717
|
return a;
|
|
34691
34718
|
};
|
|
34692
|
-
var __spreadProps$
|
|
34719
|
+
var __spreadProps$o = (a, b) => __defProps$o(a, __getOwnPropDescs$o(b));
|
|
34693
34720
|
const streams = [];
|
|
34694
34721
|
if (process.env.NODE_ENV === "production") {
|
|
34695
34722
|
streams.push({
|
|
@@ -34698,7 +34725,7 @@ if (process.env.NODE_ENV === "production") {
|
|
|
34698
34725
|
}
|
|
34699
34726
|
const logger = E({
|
|
34700
34727
|
name: "shipengine",
|
|
34701
|
-
serializers: __spreadProps$
|
|
34728
|
+
serializers: __spreadProps$o(__spreadValues$r({}, k), {
|
|
34702
34729
|
req: (req) => ({
|
|
34703
34730
|
headers: req.headers,
|
|
34704
34731
|
method: req.method,
|
|
@@ -34723,7 +34750,7 @@ const retryUntil = (callbackFn, retries = 10, timeoutBetweenAttempts = 1e3) => P
|
|
|
34723
34750
|
throw error;
|
|
34724
34751
|
});
|
|
34725
34752
|
|
|
34726
|
-
var __async$
|
|
34753
|
+
var __async$R = (__this, __arguments, generator) => {
|
|
34727
34754
|
return new Promise((resolve, reject) => {
|
|
34728
34755
|
var fulfilled = (value) => {
|
|
34729
34756
|
try {
|
|
@@ -34746,7 +34773,7 @@ var __async$Q = (__this, __arguments, generator) => {
|
|
|
34746
34773
|
const useCreateAccountImage = () => {
|
|
34747
34774
|
const { client } = useShipEngine();
|
|
34748
34775
|
return useMutation({
|
|
34749
|
-
mutationFn: (data) => __async$
|
|
34776
|
+
mutationFn: (data) => __async$R(void 0, null, function* () {
|
|
34750
34777
|
const result = yield client.accountSettings.createImage(data);
|
|
34751
34778
|
return result.data;
|
|
34752
34779
|
}),
|
|
@@ -34755,7 +34782,7 @@ const useCreateAccountImage = () => {
|
|
|
34755
34782
|
});
|
|
34756
34783
|
};
|
|
34757
34784
|
|
|
34758
|
-
var __async$
|
|
34785
|
+
var __async$Q = (__this, __arguments, generator) => {
|
|
34759
34786
|
return new Promise((resolve, reject) => {
|
|
34760
34787
|
var fulfilled = (value) => {
|
|
34761
34788
|
try {
|
|
@@ -34778,7 +34805,7 @@ var __async$P = (__this, __arguments, generator) => {
|
|
|
34778
34805
|
const useDeleteAccountImage = () => {
|
|
34779
34806
|
const { client } = useShipEngine();
|
|
34780
34807
|
return useMutation({
|
|
34781
|
-
mutationFn: (labelImageId) => __async$
|
|
34808
|
+
mutationFn: (labelImageId) => __async$Q(void 0, null, function* () {
|
|
34782
34809
|
const result = yield client.accountSettings.deleteImage(labelImageId);
|
|
34783
34810
|
return result.data;
|
|
34784
34811
|
}),
|
|
@@ -34807,7 +34834,7 @@ const useGetAccountSettings = () => {
|
|
|
34807
34834
|
});
|
|
34808
34835
|
};
|
|
34809
34836
|
|
|
34810
|
-
var __async$
|
|
34837
|
+
var __async$P = (__this, __arguments, generator) => {
|
|
34811
34838
|
return new Promise((resolve, reject) => {
|
|
34812
34839
|
var fulfilled = (value) => {
|
|
34813
34840
|
try {
|
|
@@ -34830,7 +34857,7 @@ var __async$O = (__this, __arguments, generator) => {
|
|
|
34830
34857
|
const useUpdateAccountImage = () => {
|
|
34831
34858
|
const { client } = useShipEngine();
|
|
34832
34859
|
return useMutation({
|
|
34833
|
-
mutationFn: (data) => __async$
|
|
34860
|
+
mutationFn: (data) => __async$P(void 0, null, function* () {
|
|
34834
34861
|
const result = yield client.accountSettings.updateImage(data);
|
|
34835
34862
|
return result.data;
|
|
34836
34863
|
}),
|
|
@@ -34839,7 +34866,7 @@ const useUpdateAccountImage = () => {
|
|
|
34839
34866
|
});
|
|
34840
34867
|
};
|
|
34841
34868
|
|
|
34842
|
-
var __async$
|
|
34869
|
+
var __async$O = (__this, __arguments, generator) => {
|
|
34843
34870
|
return new Promise((resolve, reject) => {
|
|
34844
34871
|
var fulfilled = (value) => {
|
|
34845
34872
|
try {
|
|
@@ -34862,7 +34889,7 @@ var __async$N = (__this, __arguments, generator) => {
|
|
|
34862
34889
|
const useUpdateAccountSettings = () => {
|
|
34863
34890
|
const { client } = useShipEngine();
|
|
34864
34891
|
return useMutation({
|
|
34865
|
-
mutationFn: (settings) => __async$
|
|
34892
|
+
mutationFn: (settings) => __async$O(void 0, null, function* () {
|
|
34866
34893
|
const result = yield client.accountSettings.update(settings);
|
|
34867
34894
|
return result.data;
|
|
34868
34895
|
}),
|
|
@@ -34871,7 +34898,7 @@ const useUpdateAccountSettings = () => {
|
|
|
34871
34898
|
});
|
|
34872
34899
|
};
|
|
34873
34900
|
|
|
34874
|
-
var __async$
|
|
34901
|
+
var __async$N = (__this, __arguments, generator) => {
|
|
34875
34902
|
return new Promise((resolve, reject) => {
|
|
34876
34903
|
var fulfilled = (value) => {
|
|
34877
34904
|
try {
|
|
@@ -34894,7 +34921,7 @@ var __async$M = (__this, __arguments, generator) => {
|
|
|
34894
34921
|
const useParseAddress = () => {
|
|
34895
34922
|
const { client } = useShipEngine();
|
|
34896
34923
|
return useMutation({
|
|
34897
|
-
mutationFn: (_0) => __async$
|
|
34924
|
+
mutationFn: (_0) => __async$N(void 0, [_0], function* ({ address, text }) {
|
|
34898
34925
|
const result = yield client.addresses.parse(text, address);
|
|
34899
34926
|
return result.data;
|
|
34900
34927
|
}),
|
|
@@ -34903,7 +34930,7 @@ const useParseAddress = () => {
|
|
|
34903
34930
|
});
|
|
34904
34931
|
};
|
|
34905
34932
|
|
|
34906
|
-
var __async$
|
|
34933
|
+
var __async$M = (__this, __arguments, generator) => {
|
|
34907
34934
|
return new Promise((resolve, reject) => {
|
|
34908
34935
|
var fulfilled = (value) => {
|
|
34909
34936
|
try {
|
|
@@ -34926,7 +34953,7 @@ var __async$L = (__this, __arguments, generator) => {
|
|
|
34926
34953
|
const useValidateAddresses = () => {
|
|
34927
34954
|
const { client } = useShipEngine();
|
|
34928
34955
|
return useMutation({
|
|
34929
|
-
mutationFn: (addresses) => __async$
|
|
34956
|
+
mutationFn: (addresses) => __async$M(void 0, null, function* () {
|
|
34930
34957
|
const result = yield client.addresses.validate(addresses);
|
|
34931
34958
|
return result.data;
|
|
34932
34959
|
}),
|
|
@@ -34935,6 +34962,57 @@ const useValidateAddresses = () => {
|
|
|
34935
34962
|
});
|
|
34936
34963
|
};
|
|
34937
34964
|
|
|
34965
|
+
var __defProp$q = Object.defineProperty;
|
|
34966
|
+
var __defProps$n = Object.defineProperties;
|
|
34967
|
+
var __getOwnPropDescs$n = Object.getOwnPropertyDescriptors;
|
|
34968
|
+
var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
|
|
34969
|
+
var __hasOwnProp$A = Object.prototype.hasOwnProperty;
|
|
34970
|
+
var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
|
|
34971
|
+
var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
34972
|
+
var __spreadValues$q = (a, b) => {
|
|
34973
|
+
for (var prop in b || (b = {}))
|
|
34974
|
+
if (__hasOwnProp$A.call(b, prop))
|
|
34975
|
+
__defNormalProp$q(a, prop, b[prop]);
|
|
34976
|
+
if (__getOwnPropSymbols$A)
|
|
34977
|
+
for (var prop of __getOwnPropSymbols$A(b)) {
|
|
34978
|
+
if (__propIsEnum$A.call(b, prop))
|
|
34979
|
+
__defNormalProp$q(a, prop, b[prop]);
|
|
34980
|
+
}
|
|
34981
|
+
return a;
|
|
34982
|
+
};
|
|
34983
|
+
var __spreadProps$n = (a, b) => __defProps$n(a, __getOwnPropDescs$n(b));
|
|
34984
|
+
var __async$L = (__this, __arguments, generator) => {
|
|
34985
|
+
return new Promise((resolve, reject) => {
|
|
34986
|
+
var fulfilled = (value) => {
|
|
34987
|
+
try {
|
|
34988
|
+
step(generator.next(value));
|
|
34989
|
+
} catch (e) {
|
|
34990
|
+
reject(e);
|
|
34991
|
+
}
|
|
34992
|
+
};
|
|
34993
|
+
var rejected = (value) => {
|
|
34994
|
+
try {
|
|
34995
|
+
step(generator.throw(value));
|
|
34996
|
+
} catch (e) {
|
|
34997
|
+
reject(e);
|
|
34998
|
+
}
|
|
34999
|
+
};
|
|
35000
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
35001
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
35002
|
+
});
|
|
35003
|
+
};
|
|
35004
|
+
const useCreateSession = (params) => {
|
|
35005
|
+
const { client } = useShipEngine();
|
|
35006
|
+
return useMutation(__spreadProps$n(__spreadValues$q({}, params), {
|
|
35007
|
+
mutationFn: (request) => __async$L(void 0, null, function* () {
|
|
35008
|
+
const result = yield client.auctanePay.createSession(request);
|
|
35009
|
+
return result.data;
|
|
35010
|
+
}),
|
|
35011
|
+
mutationKey: ["useCreateSession"],
|
|
35012
|
+
onError
|
|
35013
|
+
}));
|
|
35014
|
+
};
|
|
35015
|
+
|
|
34938
35016
|
var __async$K = (__this, __arguments, generator) => {
|
|
34939
35017
|
return new Promise((resolve, reject) => {
|
|
34940
35018
|
var fulfilled = (value) => {
|
|
@@ -39031,4 +39109,4 @@ const alchemy = {
|
|
|
39031
39109
|
createElement
|
|
39032
39110
|
};
|
|
39033
39111
|
|
|
39034
|
-
export { AccountSettingsAPI, AddressesAPI, AlchemyContext, AlchemyProvider, AlchemyTestProvider, CarriersAPI, CodedError, ConfirmationType, ConnectionsAPI, CreditCardVendor, Currency, CustomPackagesAPI, CustomsContentsType, CustomsNonDeliveryType, Element, ErrorBoundary, FundingSourcesAPI, InsuranceAPI, InsuranceProviderType, InvoiceAddressAPI, LabelsAPI, MetadataCapability, MetadataRequirement, MetadataSatisfyingFormTypes, MovementIndicator, OrderSourcesAPI, RateCardStatus, RateCardsAPI, RatesAPI, types as SE, SalesOrderShipmentsAPI, SalesOrdersAPI, SellersAPI, ServicePointsAPI, ShipEngine, ShipEngineAPI, ShipEngineContext, ShipmentsAPI, ShippingRulesAPI, ThemesAPI, WarehousesAPI, WebhooksAPI, alchemy, camelizeKeys, decamelizeKeys, alchemy as default, delay, getEmotionCache, getEndUserIpAddress, isCodedError, isCodedErrors, isDataCodedErrors, isInvalidTokenError, logger, onError, parseError, retryUntil, useAddFunds, useAddInsuranceFunds, useAddSandboxCarriers, useAlchemy, useCalculateRates, useCancelShipment, useCarrierConnectionsServicesList, useConnectCarrier, useConnectCarrierAccount, useCreateAccountImage, useCreateFundingSource, useCreateInvoiceAddress, useCreateLabel, useCreateRateCard, useCreateSalesOrderShipment, useCreateSandboxSeller, useCreateSellerApiKey, useCreateShipment, useCreateShippingRule, useCreateWarehouse, useCreateWebhook, useDeactivateOrderSource, useDeleteAccountImage, useDeleteCarrier, useDeleteRateCard, useDeleteSellerApiKey, useDeleteShippingRule, useDeleteWarehouse, useDeleteWebhook, useDownloadRateCard, useEditShippingRule, useFundingSourcesAddFunds, useGetAccountBillingPlan, useGetAccountImages, useGetAccountSettings, useGetAutoFundingConfiguration, useGetCarrierById, useGetCarrierConnectionForm, useGetConnectionsCarrierSettings, useGetCountriesByCarrier, useGetCurrenciesByCarrier, useGetFundingSourceById, useGetFundingSourceMetadata, useGetFundingSourceTransactions, useGetHereToken, useGetInsuranceAccount, useGetInsuranceFundingSourceAcceptedTerms, useGetInvoiceAddress, useGetLabel, useGetPackageRatingGroupByCarrier, useGetRateCardById, useGetSalesOrder, useGetSalesOrderByExternalOrderId, useGetSalesOrderShipment, useGetServicePoint, useGetServicesByCarrier, useGetShipment, useGetShipmentByExternalId, useGetShipmentRates, useGetShippingRuleById, useGetShippingRuleConditionsOptions, useGetThemeById, useGetZonesByCarrier, useI18n, useListCarrierConnections, useListCarriers, useListCustomPackageTypes, useListFundingSources, useListLabels, useListLabelsInfinite, useListOrderSources, useListOrderSourcesConnections, useListRateCards, useListSalesOrderShipments, useListSalesOrderShipmentsByExternalOrderId, useListSalesOrders, useListSandboxSellerIds, useListSellerApiKeys, useListServicePoints, useListShipments, useListShippingRules, useListWarehouses, useListWebhooks, useLoadIcons, useNotifySalesOrderShipped, useParseAddress, usePublishRateCard, useRatesEstimate, useRefreshOrderSource, useRefreshOrderSourceAsync, useRegisterCarrier, useShipEngine, useUpdateAccountBillingPlan, useUpdateAccountImage, useUpdateAccountSettings, useUpdateAutoFunding, useUpdateConnectionsCarrierSettings, useUpdateFundingSource, useUpdateInvoiceAddress, useUpdateOrderSource, useUpdateRateCard, useUpdateSalesOrderShipment, useUpdateWarehouse, useUpdateWebhook, useUploadRateCard, useValidateAddresses, useVoidLabel };
|
|
39112
|
+
export { 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, WarehousesAPI, WebhooksAPI, alchemy, camelizeKeys, decamelizeKeys, alchemy as default, delay, getEmotionCache, getEndUserIpAddress, isCodedError, isCodedErrors, isDataCodedErrors, isInvalidTokenError, logger, onError, parseError, retryUntil, useAddFunds, useAddInsuranceFunds, useAddSandboxCarriers, useAlchemy, useCalculateRates, useCancelShipment, useCarrierConnectionsServicesList, useConnectCarrier, useConnectCarrierAccount, useCreateAccountImage, useCreateFundingSource, useCreateInvoiceAddress, useCreateLabel, useCreateRateCard, useCreateSalesOrderShipment, useCreateSandboxSeller, useCreateSellerApiKey, useCreateSession, useCreateShipment, useCreateShippingRule, useCreateWarehouse, useCreateWebhook, useDeactivateOrderSource, useDeleteAccountImage, useDeleteCarrier, useDeleteRateCard, useDeleteSellerApiKey, useDeleteShippingRule, useDeleteWarehouse, useDeleteWebhook, useDownloadRateCard, useEditShippingRule, useFundingSourcesAddFunds, useGetAccountBillingPlan, useGetAccountImages, useGetAccountSettings, useGetAutoFundingConfiguration, useGetCarrierById, useGetCarrierConnectionForm, useGetConnectionsCarrierSettings, useGetCountriesByCarrier, useGetCurrenciesByCarrier, useGetFundingSourceById, useGetFundingSourceMetadata, useGetFundingSourceTransactions, useGetHereToken, useGetInsuranceAccount, useGetInsuranceFundingSourceAcceptedTerms, useGetInvoiceAddress, useGetLabel, useGetPackageRatingGroupByCarrier, useGetRateCardById, useGetSalesOrder, useGetSalesOrderByExternalOrderId, useGetSalesOrderShipment, useGetServicePoint, useGetServicesByCarrier, useGetShipment, useGetShipmentByExternalId, useGetShipmentRates, useGetShippingRuleById, useGetShippingRuleConditionsOptions, useGetThemeById, useGetZonesByCarrier, useI18n, useListCarrierConnections, useListCarriers, useListCustomPackageTypes, useListFundingSources, useListLabels, useListLabelsInfinite, useListOrderSources, useListOrderSourcesConnections, useListRateCards, useListSalesOrderShipments, useListSalesOrderShipmentsByExternalOrderId, useListSalesOrders, useListSandboxSellerIds, useListSellerApiKeys, useListServicePoints, useListShipments, useListShippingRules, useListWarehouses, useListWebhooks, useLoadIcons, useNotifySalesOrderShipped, useParseAddress, usePublishRateCard, useRatesEstimate, useRefreshOrderSource, useRefreshOrderSourceAsync, useRegisterCarrier, useShipEngine, useUpdateAccountBillingPlan, useUpdateAccountImage, useUpdateAccountSettings, useUpdateAutoFunding, useUpdateConnectionsCarrierSettings, useUpdateFundingSource, useUpdateInvoiceAddress, useUpdateOrderSource, useUpdateRateCard, useUpdateSalesOrderShipment, useUpdateWarehouse, useUpdateWebhook, useUploadRateCard, useValidateAddresses, useVoidLabel };
|