@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.
- package/index.js +306 -185
- package/index.mjs +305 -186
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -10822,17 +10822,17 @@ var AccountBillingPlanChangeType = /* @__PURE__ */ ((AccountBillingPlanChangeTyp
|
|
|
10822
10822
|
return AccountBillingPlanChangeType2;
|
|
10823
10823
|
})(AccountBillingPlanChangeType || {});
|
|
10824
10824
|
|
|
10825
|
-
var __getOwnPropSymbols$
|
|
10826
|
-
var __hasOwnProp$
|
|
10827
|
-
var __propIsEnum$
|
|
10825
|
+
var __getOwnPropSymbols$Y = Object.getOwnPropertySymbols;
|
|
10826
|
+
var __hasOwnProp$Y = Object.prototype.hasOwnProperty;
|
|
10827
|
+
var __propIsEnum$Y = Object.prototype.propertyIsEnumerable;
|
|
10828
10828
|
var __objRest$x = (source, exclude) => {
|
|
10829
10829
|
var target = {};
|
|
10830
10830
|
for (var prop in source)
|
|
10831
|
-
if (__hasOwnProp$
|
|
10831
|
+
if (__hasOwnProp$Y.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
10832
10832
|
target[prop] = source[prop];
|
|
10833
|
-
if (source != null && __getOwnPropSymbols$
|
|
10834
|
-
for (var prop of __getOwnPropSymbols$
|
|
10835
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
10833
|
+
if (source != null && __getOwnPropSymbols$Y)
|
|
10834
|
+
for (var prop of __getOwnPropSymbols$Y(source)) {
|
|
10835
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$Y.call(source, prop))
|
|
10836
10836
|
target[prop] = source[prop];
|
|
10837
10837
|
}
|
|
10838
10838
|
return target;
|
|
@@ -10967,17 +10967,17 @@ const types = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
10967
10967
|
RateCardStatus
|
|
10968
10968
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
10969
10969
|
|
|
10970
|
-
var __getOwnPropSymbols$
|
|
10971
|
-
var __hasOwnProp$
|
|
10972
|
-
var __propIsEnum$
|
|
10970
|
+
var __getOwnPropSymbols$X = Object.getOwnPropertySymbols;
|
|
10971
|
+
var __hasOwnProp$X = Object.prototype.hasOwnProperty;
|
|
10972
|
+
var __propIsEnum$X = Object.prototype.propertyIsEnumerable;
|
|
10973
10973
|
var __objRest$w = (source, exclude) => {
|
|
10974
10974
|
var target = {};
|
|
10975
10975
|
for (var prop in source)
|
|
10976
|
-
if (__hasOwnProp$
|
|
10976
|
+
if (__hasOwnProp$X.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
10977
10977
|
target[prop] = source[prop];
|
|
10978
|
-
if (source != null && __getOwnPropSymbols$
|
|
10979
|
-
for (var prop of __getOwnPropSymbols$
|
|
10980
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
10978
|
+
if (source != null && __getOwnPropSymbols$X)
|
|
10979
|
+
for (var prop of __getOwnPropSymbols$X(source)) {
|
|
10980
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$X.call(source, prop))
|
|
10981
10981
|
target[prop] = source[prop];
|
|
10982
10982
|
}
|
|
10983
10983
|
return target;
|
|
@@ -11091,6 +11091,23 @@ class AuctanePayAPI {
|
|
|
11091
11091
|
this.getPaymentMethods = () => {
|
|
11092
11092
|
return this.client.get("/v1/payments/payment_methods");
|
|
11093
11093
|
};
|
|
11094
|
+
/**
|
|
11095
|
+
* The `deletePaymentMethod` method deletes a Payment Method for a given user.
|
|
11096
|
+
* @docs https://auctane.atlassian.net/wiki/spaces/SEEU/pages/5906662077/AUCTANE+PAY+ENDPOINTS+FOR+SHIPSTATION+API#Delete-payment-method
|
|
11097
|
+
*/
|
|
11098
|
+
this.deletePaymentMethod = (paymentMethodId) => {
|
|
11099
|
+
return this.client.delete(`/v1/payments/payment_methods/${paymentMethodId}`);
|
|
11100
|
+
};
|
|
11101
|
+
/**
|
|
11102
|
+
* The `updatePaymentMethod` method allows to update a saved Payment Method
|
|
11103
|
+
* @docs https://auctane.atlassian.net/wiki/spaces/SEEU/pages/5906662077/AUCTANE+PAY+ENDPOINTS+FOR+SHIPSTATION+API#Auctane-Pay-available-endpoints-in-Shipstation-API
|
|
11104
|
+
*/
|
|
11105
|
+
this.updatePaymentMethod = (paymentMethodId, payload) => {
|
|
11106
|
+
return this.client.put(
|
|
11107
|
+
`/v1/payments/payment_methods/${paymentMethodId}`,
|
|
11108
|
+
payload
|
|
11109
|
+
);
|
|
11110
|
+
};
|
|
11094
11111
|
this.client = client;
|
|
11095
11112
|
}
|
|
11096
11113
|
}
|
|
@@ -13800,7 +13817,7 @@ var ipaddr = {
|
|
|
13800
13817
|
}).call(commonjsGlobal);
|
|
13801
13818
|
} (ipaddr));
|
|
13802
13819
|
|
|
13803
|
-
var __async$
|
|
13820
|
+
var __async$14 = (__this, __arguments, generator) => {
|
|
13804
13821
|
return new Promise((resolve, reject) => {
|
|
13805
13822
|
var fulfilled = (value) => {
|
|
13806
13823
|
try {
|
|
@@ -13820,7 +13837,7 @@ var __async$12 = (__this, __arguments, generator) => {
|
|
|
13820
13837
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
13821
13838
|
});
|
|
13822
13839
|
};
|
|
13823
|
-
const getEndUserIpAddress = () => __async$
|
|
13840
|
+
const getEndUserIpAddress = () => __async$14(void 0, null, function* () {
|
|
13824
13841
|
try {
|
|
13825
13842
|
const response = yield axios.get("https://api.ipify.org/?format=json");
|
|
13826
13843
|
if (response.data.ip && ipaddrExports.isValid(response.data.ip)) {
|
|
@@ -13881,38 +13898,38 @@ const decamelizeKeys = (obj, separator = "_") => {
|
|
|
13881
13898
|
return obj;
|
|
13882
13899
|
};
|
|
13883
13900
|
|
|
13884
|
-
var __defProp$
|
|
13885
|
-
var __defProps$
|
|
13886
|
-
var __getOwnPropDescs$
|
|
13887
|
-
var __getOwnPropSymbols$
|
|
13888
|
-
var __hasOwnProp$
|
|
13889
|
-
var __propIsEnum$
|
|
13890
|
-
var __defNormalProp$
|
|
13891
|
-
var __spreadValues$
|
|
13901
|
+
var __defProp$L = Object.defineProperty;
|
|
13902
|
+
var __defProps$F = Object.defineProperties;
|
|
13903
|
+
var __getOwnPropDescs$F = Object.getOwnPropertyDescriptors;
|
|
13904
|
+
var __getOwnPropSymbols$W = Object.getOwnPropertySymbols;
|
|
13905
|
+
var __hasOwnProp$W = Object.prototype.hasOwnProperty;
|
|
13906
|
+
var __propIsEnum$W = Object.prototype.propertyIsEnumerable;
|
|
13907
|
+
var __defNormalProp$L = (obj, key, value) => key in obj ? __defProp$L(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13908
|
+
var __spreadValues$L = (a, b) => {
|
|
13892
13909
|
for (var prop in b || (b = {}))
|
|
13893
|
-
if (__hasOwnProp$
|
|
13894
|
-
__defNormalProp$
|
|
13895
|
-
if (__getOwnPropSymbols$
|
|
13896
|
-
for (var prop of __getOwnPropSymbols$
|
|
13897
|
-
if (__propIsEnum$
|
|
13898
|
-
__defNormalProp$
|
|
13910
|
+
if (__hasOwnProp$W.call(b, prop))
|
|
13911
|
+
__defNormalProp$L(a, prop, b[prop]);
|
|
13912
|
+
if (__getOwnPropSymbols$W)
|
|
13913
|
+
for (var prop of __getOwnPropSymbols$W(b)) {
|
|
13914
|
+
if (__propIsEnum$W.call(b, prop))
|
|
13915
|
+
__defNormalProp$L(a, prop, b[prop]);
|
|
13899
13916
|
}
|
|
13900
13917
|
return a;
|
|
13901
13918
|
};
|
|
13902
|
-
var __spreadProps$
|
|
13919
|
+
var __spreadProps$F = (a, b) => __defProps$F(a, __getOwnPropDescs$F(b));
|
|
13903
13920
|
var __objRest$v = (source, exclude) => {
|
|
13904
13921
|
var target = {};
|
|
13905
13922
|
for (var prop in source)
|
|
13906
|
-
if (__hasOwnProp$
|
|
13923
|
+
if (__hasOwnProp$W.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
13907
13924
|
target[prop] = source[prop];
|
|
13908
|
-
if (source != null && __getOwnPropSymbols$
|
|
13909
|
-
for (var prop of __getOwnPropSymbols$
|
|
13910
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
13925
|
+
if (source != null && __getOwnPropSymbols$W)
|
|
13926
|
+
for (var prop of __getOwnPropSymbols$W(source)) {
|
|
13927
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$W.call(source, prop))
|
|
13911
13928
|
target[prop] = source[prop];
|
|
13912
13929
|
}
|
|
13913
13930
|
return target;
|
|
13914
13931
|
};
|
|
13915
|
-
var __async$
|
|
13932
|
+
var __async$13 = (__this, __arguments, generator) => {
|
|
13916
13933
|
return new Promise((resolve, reject) => {
|
|
13917
13934
|
var fulfilled = (value) => {
|
|
13918
13935
|
try {
|
|
@@ -13952,12 +13969,12 @@ class CarriersAPI {
|
|
|
13952
13969
|
/**
|
|
13953
13970
|
* The `connect` method connects a carrier account to a user's ShipEngine account.
|
|
13954
13971
|
*/
|
|
13955
|
-
this.connect = (_a) => __async$
|
|
13972
|
+
this.connect = (_a) => __async$13(this, null, function* () {
|
|
13956
13973
|
var _b = _a, { carrierCode } = _b, connection = __objRest$v(_b, ["carrierCode"]);
|
|
13957
13974
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
13958
13975
|
if (!endUserIpAddress)
|
|
13959
13976
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
13960
|
-
return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$
|
|
13977
|
+
return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$F(__spreadValues$L({}, connection), {
|
|
13961
13978
|
endUserIpAddress
|
|
13962
13979
|
}));
|
|
13963
13980
|
});
|
|
@@ -14041,22 +14058,22 @@ class CarriersAPI {
|
|
|
14041
14058
|
}
|
|
14042
14059
|
}
|
|
14043
14060
|
|
|
14044
|
-
var __getOwnPropSymbols$
|
|
14045
|
-
var __hasOwnProp$
|
|
14046
|
-
var __propIsEnum$
|
|
14061
|
+
var __getOwnPropSymbols$V = Object.getOwnPropertySymbols;
|
|
14062
|
+
var __hasOwnProp$V = Object.prototype.hasOwnProperty;
|
|
14063
|
+
var __propIsEnum$V = Object.prototype.propertyIsEnumerable;
|
|
14047
14064
|
var __objRest$u = (source, exclude) => {
|
|
14048
14065
|
var target = {};
|
|
14049
14066
|
for (var prop in source)
|
|
14050
|
-
if (__hasOwnProp$
|
|
14067
|
+
if (__hasOwnProp$V.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
14051
14068
|
target[prop] = source[prop];
|
|
14052
|
-
if (source != null && __getOwnPropSymbols$
|
|
14053
|
-
for (var prop of __getOwnPropSymbols$
|
|
14054
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
14069
|
+
if (source != null && __getOwnPropSymbols$V)
|
|
14070
|
+
for (var prop of __getOwnPropSymbols$V(source)) {
|
|
14071
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$V.call(source, prop))
|
|
14055
14072
|
target[prop] = source[prop];
|
|
14056
14073
|
}
|
|
14057
14074
|
return target;
|
|
14058
14075
|
};
|
|
14059
|
-
var __async$
|
|
14076
|
+
var __async$12 = (__this, __arguments, generator) => {
|
|
14060
14077
|
return new Promise((resolve, reject) => {
|
|
14061
14078
|
var fulfilled = (value) => {
|
|
14062
14079
|
try {
|
|
@@ -14098,7 +14115,7 @@ class ConnectionsAPI {
|
|
|
14098
14115
|
/**
|
|
14099
14116
|
* The `connectCarrier` method connects a carrier to account.
|
|
14100
14117
|
*/
|
|
14101
|
-
this.connectCarrier = (carrierName, formData) => __async$
|
|
14118
|
+
this.connectCarrier = (carrierName, formData) => __async$12(this, null, function* () {
|
|
14102
14119
|
return yield this.client.post(
|
|
14103
14120
|
`/v1/connections/carriers/${carrierName}`,
|
|
14104
14121
|
formData,
|
|
@@ -16266,23 +16283,23 @@ class CustomPackagesAPI {
|
|
|
16266
16283
|
}
|
|
16267
16284
|
}
|
|
16268
16285
|
|
|
16269
|
-
var __defProp$
|
|
16270
|
-
var __getOwnPropSymbols$
|
|
16271
|
-
var __hasOwnProp$
|
|
16272
|
-
var __propIsEnum$
|
|
16273
|
-
var __defNormalProp$
|
|
16274
|
-
var __spreadValues$
|
|
16286
|
+
var __defProp$K = Object.defineProperty;
|
|
16287
|
+
var __getOwnPropSymbols$U = Object.getOwnPropertySymbols;
|
|
16288
|
+
var __hasOwnProp$U = Object.prototype.hasOwnProperty;
|
|
16289
|
+
var __propIsEnum$U = Object.prototype.propertyIsEnumerable;
|
|
16290
|
+
var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16291
|
+
var __spreadValues$K = (a, b) => {
|
|
16275
16292
|
for (var prop in b || (b = {}))
|
|
16276
|
-
if (__hasOwnProp$
|
|
16277
|
-
__defNormalProp$
|
|
16278
|
-
if (__getOwnPropSymbols$
|
|
16279
|
-
for (var prop of __getOwnPropSymbols$
|
|
16280
|
-
if (__propIsEnum$
|
|
16281
|
-
__defNormalProp$
|
|
16293
|
+
if (__hasOwnProp$U.call(b, prop))
|
|
16294
|
+
__defNormalProp$K(a, prop, b[prop]);
|
|
16295
|
+
if (__getOwnPropSymbols$U)
|
|
16296
|
+
for (var prop of __getOwnPropSymbols$U(b)) {
|
|
16297
|
+
if (__propIsEnum$U.call(b, prop))
|
|
16298
|
+
__defNormalProp$K(a, prop, b[prop]);
|
|
16282
16299
|
}
|
|
16283
16300
|
return a;
|
|
16284
16301
|
};
|
|
16285
|
-
var __async
|
|
16302
|
+
var __async$11 = (__this, __arguments, generator) => {
|
|
16286
16303
|
return new Promise((resolve, reject) => {
|
|
16287
16304
|
var fulfilled = (value) => {
|
|
16288
16305
|
try {
|
|
@@ -16321,12 +16338,12 @@ class FundingSourcesAPI {
|
|
|
16321
16338
|
* The `create` method creates a new funding source for a given user. This requires
|
|
16322
16339
|
* payment information to be collected from the user.
|
|
16323
16340
|
*/
|
|
16324
|
-
this.create = (createFundingSource) => __async
|
|
16341
|
+
this.create = (createFundingSource) => __async$11(this, null, function* () {
|
|
16325
16342
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16326
16343
|
if (!endUserIpAddress) {
|
|
16327
16344
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
16328
16345
|
}
|
|
16329
|
-
return yield this.client.post("/v1/funding_sources", __spreadValues$
|
|
16346
|
+
return yield this.client.post("/v1/funding_sources", __spreadValues$K({
|
|
16330
16347
|
endUserIpAddress
|
|
16331
16348
|
}, createFundingSource));
|
|
16332
16349
|
});
|
|
@@ -16335,7 +16352,7 @@ class FundingSourcesAPI {
|
|
|
16335
16352
|
* user to update the billing address or payment information associated with the
|
|
16336
16353
|
* funding source.
|
|
16337
16354
|
*/
|
|
16338
|
-
this.update = (billingInfo, creditCardInfo, auctanePayInfo, fundingSourceId) => __async
|
|
16355
|
+
this.update = (billingInfo, creditCardInfo, auctanePayInfo, fundingSourceId) => __async$11(this, null, function* () {
|
|
16339
16356
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16340
16357
|
if (!endUserIpAddress) {
|
|
16341
16358
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
@@ -16345,7 +16362,7 @@ class FundingSourcesAPI {
|
|
|
16345
16362
|
{
|
|
16346
16363
|
billingInfo,
|
|
16347
16364
|
endUserIpAddress,
|
|
16348
|
-
paymentMethod: __spreadValues$
|
|
16365
|
+
paymentMethod: __spreadValues$K({
|
|
16349
16366
|
creditCardInfo
|
|
16350
16367
|
}, auctanePayInfo)
|
|
16351
16368
|
}
|
|
@@ -16355,19 +16372,19 @@ class FundingSourcesAPI {
|
|
|
16355
16372
|
* The `registerCarrier` method registers a carrier account and associates
|
|
16356
16373
|
* it with a given funding source.
|
|
16357
16374
|
*/
|
|
16358
|
-
this.registerCarrier = (carrier) => __async
|
|
16375
|
+
this.registerCarrier = (carrier) => __async$11(this, null, function* () {
|
|
16359
16376
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16360
16377
|
if (!endUserIpAddress) {
|
|
16361
16378
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
16362
16379
|
}
|
|
16363
|
-
return yield this.client.post("/v1/registration/funding_source", __spreadValues$
|
|
16380
|
+
return yield this.client.post("/v1/registration/funding_source", __spreadValues$K({
|
|
16364
16381
|
endUserIpAddress
|
|
16365
16382
|
}, carrier));
|
|
16366
16383
|
});
|
|
16367
16384
|
/**
|
|
16368
16385
|
* The `addFunds` method allows you to add funds to a funding source.
|
|
16369
16386
|
*/
|
|
16370
|
-
this.addFunds = (amount, fundingSourceId) => __async
|
|
16387
|
+
this.addFunds = (amount, fundingSourceId) => __async$11(this, null, function* () {
|
|
16371
16388
|
return yield this.client.put(
|
|
16372
16389
|
`/v1/funding_sources/${fundingSourceId}/add_funds`,
|
|
16373
16390
|
amount
|
|
@@ -16377,7 +16394,7 @@ class FundingSourcesAPI {
|
|
|
16377
16394
|
* The `metadata` method returns seller-specific requirements for creating funding sources
|
|
16378
16395
|
* and attaching carriers
|
|
16379
16396
|
*/
|
|
16380
|
-
this.metadata = () => __async
|
|
16397
|
+
this.metadata = () => __async$11(this, null, function* () {
|
|
16381
16398
|
return yield this.client.get("/v1/funding_sources/metadata");
|
|
16382
16399
|
});
|
|
16383
16400
|
/**
|
|
@@ -16429,7 +16446,7 @@ class InsuranceAPI {
|
|
|
16429
16446
|
}
|
|
16430
16447
|
}
|
|
16431
16448
|
|
|
16432
|
-
var __async$
|
|
16449
|
+
var __async$10 = (__this, __arguments, generator) => {
|
|
16433
16450
|
return new Promise((resolve, reject) => {
|
|
16434
16451
|
var fulfilled = (value) => {
|
|
16435
16452
|
try {
|
|
@@ -16461,13 +16478,13 @@ class InvoiceAddressAPI {
|
|
|
16461
16478
|
/**
|
|
16462
16479
|
* The `create` method creates a new invoice address for a given user.
|
|
16463
16480
|
*/
|
|
16464
|
-
this.create = (invoiceAddress) => __async$
|
|
16481
|
+
this.create = (invoiceAddress) => __async$10(this, null, function* () {
|
|
16465
16482
|
return yield this.client.post("/v1/invoice_address", invoiceAddress);
|
|
16466
16483
|
});
|
|
16467
16484
|
/**
|
|
16468
16485
|
* The `update` method updates a invoice address for a given user.
|
|
16469
16486
|
*/
|
|
16470
|
-
this.update = (invoiceAddress) => __async$
|
|
16487
|
+
this.update = (invoiceAddress) => __async$10(this, null, function* () {
|
|
16471
16488
|
return yield this.client.put("/v1/invoice_address", invoiceAddress);
|
|
16472
16489
|
});
|
|
16473
16490
|
this.client = client;
|
|
@@ -16529,17 +16546,17 @@ class LabelsAPI {
|
|
|
16529
16546
|
}
|
|
16530
16547
|
}
|
|
16531
16548
|
|
|
16532
|
-
var __getOwnPropSymbols$
|
|
16533
|
-
var __hasOwnProp$
|
|
16534
|
-
var __propIsEnum$
|
|
16549
|
+
var __getOwnPropSymbols$T = Object.getOwnPropertySymbols;
|
|
16550
|
+
var __hasOwnProp$T = Object.prototype.hasOwnProperty;
|
|
16551
|
+
var __propIsEnum$T = Object.prototype.propertyIsEnumerable;
|
|
16535
16552
|
var __objRest$t = (source, exclude) => {
|
|
16536
16553
|
var target = {};
|
|
16537
16554
|
for (var prop in source)
|
|
16538
|
-
if (__hasOwnProp$
|
|
16555
|
+
if (__hasOwnProp$T.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
16539
16556
|
target[prop] = source[prop];
|
|
16540
|
-
if (source != null && __getOwnPropSymbols$
|
|
16541
|
-
for (var prop of __getOwnPropSymbols$
|
|
16542
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
16557
|
+
if (source != null && __getOwnPropSymbols$T)
|
|
16558
|
+
for (var prop of __getOwnPropSymbols$T(source)) {
|
|
16559
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$T.call(source, prop))
|
|
16543
16560
|
target[prop] = source[prop];
|
|
16544
16561
|
}
|
|
16545
16562
|
return target;
|
|
@@ -16660,19 +16677,19 @@ class RateCardsAPI {
|
|
|
16660
16677
|
}
|
|
16661
16678
|
}
|
|
16662
16679
|
|
|
16663
|
-
var __defProp$
|
|
16664
|
-
var __getOwnPropSymbols$
|
|
16665
|
-
var __hasOwnProp$
|
|
16666
|
-
var __propIsEnum$
|
|
16667
|
-
var __defNormalProp$
|
|
16668
|
-
var __spreadValues$
|
|
16680
|
+
var __defProp$J = Object.defineProperty;
|
|
16681
|
+
var __getOwnPropSymbols$S = Object.getOwnPropertySymbols;
|
|
16682
|
+
var __hasOwnProp$S = Object.prototype.hasOwnProperty;
|
|
16683
|
+
var __propIsEnum$S = Object.prototype.propertyIsEnumerable;
|
|
16684
|
+
var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16685
|
+
var __spreadValues$J = (a, b) => {
|
|
16669
16686
|
for (var prop in b || (b = {}))
|
|
16670
|
-
if (__hasOwnProp$
|
|
16671
|
-
__defNormalProp$
|
|
16672
|
-
if (__getOwnPropSymbols$
|
|
16673
|
-
for (var prop of __getOwnPropSymbols$
|
|
16674
|
-
if (__propIsEnum$
|
|
16675
|
-
__defNormalProp$
|
|
16687
|
+
if (__hasOwnProp$S.call(b, prop))
|
|
16688
|
+
__defNormalProp$J(a, prop, b[prop]);
|
|
16689
|
+
if (__getOwnPropSymbols$S)
|
|
16690
|
+
for (var prop of __getOwnPropSymbols$S(b)) {
|
|
16691
|
+
if (__propIsEnum$S.call(b, prop))
|
|
16692
|
+
__defNormalProp$J(a, prop, b[prop]);
|
|
16676
16693
|
}
|
|
16677
16694
|
return a;
|
|
16678
16695
|
};
|
|
@@ -16694,7 +16711,7 @@ class RatesAPI {
|
|
|
16694
16711
|
* method.
|
|
16695
16712
|
*/
|
|
16696
16713
|
this.estimate = (params) => {
|
|
16697
|
-
return this.client.post("/v1/rates/estimate", __spreadValues$
|
|
16714
|
+
return this.client.post("/v1/rates/estimate", __spreadValues$J({}, params));
|
|
16698
16715
|
};
|
|
16699
16716
|
this.client = client;
|
|
16700
16717
|
}
|
|
@@ -16774,7 +16791,7 @@ class SalesOrdersAPI {
|
|
|
16774
16791
|
}
|
|
16775
16792
|
}
|
|
16776
16793
|
|
|
16777
|
-
var __async
|
|
16794
|
+
var __async$$ = (__this, __arguments, generator) => {
|
|
16778
16795
|
return new Promise((resolve, reject) => {
|
|
16779
16796
|
var fulfilled = (value) => {
|
|
16780
16797
|
try {
|
|
@@ -16832,7 +16849,7 @@ class SellersAPI {
|
|
|
16832
16849
|
/**
|
|
16833
16850
|
* Deletes an API Key
|
|
16834
16851
|
*/
|
|
16835
|
-
this.deleteSellerApiKey = (_0) => __async
|
|
16852
|
+
this.deleteSellerApiKey = (_0) => __async$$(this, [_0], function* ({
|
|
16836
16853
|
encryptedApiKey,
|
|
16837
16854
|
sellerId,
|
|
16838
16855
|
isSandbox
|
|
@@ -16878,19 +16895,19 @@ class SellersAPI {
|
|
|
16878
16895
|
}
|
|
16879
16896
|
}
|
|
16880
16897
|
|
|
16881
|
-
var __defProp$
|
|
16882
|
-
var __getOwnPropSymbols$
|
|
16883
|
-
var __hasOwnProp$
|
|
16884
|
-
var __propIsEnum$
|
|
16885
|
-
var __defNormalProp$
|
|
16886
|
-
var __spreadValues$
|
|
16898
|
+
var __defProp$I = Object.defineProperty;
|
|
16899
|
+
var __getOwnPropSymbols$R = Object.getOwnPropertySymbols;
|
|
16900
|
+
var __hasOwnProp$R = Object.prototype.hasOwnProperty;
|
|
16901
|
+
var __propIsEnum$R = Object.prototype.propertyIsEnumerable;
|
|
16902
|
+
var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16903
|
+
var __spreadValues$I = (a, b) => {
|
|
16887
16904
|
for (var prop in b || (b = {}))
|
|
16888
|
-
if (__hasOwnProp$
|
|
16889
|
-
__defNormalProp$
|
|
16890
|
-
if (__getOwnPropSymbols$
|
|
16891
|
-
for (var prop of __getOwnPropSymbols$
|
|
16892
|
-
if (__propIsEnum$
|
|
16893
|
-
__defNormalProp$
|
|
16905
|
+
if (__hasOwnProp$R.call(b, prop))
|
|
16906
|
+
__defNormalProp$I(a, prop, b[prop]);
|
|
16907
|
+
if (__getOwnPropSymbols$R)
|
|
16908
|
+
for (var prop of __getOwnPropSymbols$R(b)) {
|
|
16909
|
+
if (__propIsEnum$R.call(b, prop))
|
|
16910
|
+
__defNormalProp$I(a, prop, b[prop]);
|
|
16894
16911
|
}
|
|
16895
16912
|
return a;
|
|
16896
16913
|
};
|
|
@@ -16902,7 +16919,7 @@ class ServicePointsAPI {
|
|
|
16902
16919
|
* Either an address, coordinates, or an address query
|
|
16903
16920
|
*/
|
|
16904
16921
|
this.list = (options) => {
|
|
16905
|
-
return this.client.post("/v1/service_points/list", __spreadValues$
|
|
16922
|
+
return this.client.post("/v1/service_points/list", __spreadValues$I({}, options));
|
|
16906
16923
|
};
|
|
16907
16924
|
/**
|
|
16908
16925
|
* Get a specific service point by its carrier code, country code, and id
|
|
@@ -16920,7 +16937,7 @@ class ServicePointsAPI {
|
|
|
16920
16937
|
}
|
|
16921
16938
|
}
|
|
16922
16939
|
|
|
16923
|
-
var __async$
|
|
16940
|
+
var __async$_ = (__this, __arguments, generator) => {
|
|
16924
16941
|
return new Promise((resolve, reject) => {
|
|
16925
16942
|
var fulfilled = (value) => {
|
|
16926
16943
|
try {
|
|
@@ -16969,7 +16986,7 @@ class ShipmentsAPI {
|
|
|
16969
16986
|
* The `create` method allows for creating shipments based on a list of shipment
|
|
16970
16987
|
* items passed into this method.
|
|
16971
16988
|
*/
|
|
16972
|
-
this.create = (...shipments) => __async$
|
|
16989
|
+
this.create = (...shipments) => __async$_(this, null, function* () {
|
|
16973
16990
|
return this.client.post("/v1/shipments", {
|
|
16974
16991
|
shipments
|
|
16975
16992
|
});
|
|
@@ -34386,38 +34403,38 @@ class WebhooksAPI {
|
|
|
34386
34403
|
}
|
|
34387
34404
|
}
|
|
34388
34405
|
|
|
34389
|
-
var __defProp$
|
|
34390
|
-
var __defProps$
|
|
34391
|
-
var __getOwnPropDescs$
|
|
34392
|
-
var __getOwnPropSymbols$
|
|
34393
|
-
var __hasOwnProp$
|
|
34394
|
-
var __propIsEnum$
|
|
34395
|
-
var __defNormalProp$
|
|
34396
|
-
var __spreadValues$
|
|
34406
|
+
var __defProp$H = Object.defineProperty;
|
|
34407
|
+
var __defProps$E = Object.defineProperties;
|
|
34408
|
+
var __getOwnPropDescs$E = Object.getOwnPropertyDescriptors;
|
|
34409
|
+
var __getOwnPropSymbols$Q = Object.getOwnPropertySymbols;
|
|
34410
|
+
var __hasOwnProp$Q = Object.prototype.hasOwnProperty;
|
|
34411
|
+
var __propIsEnum$Q = Object.prototype.propertyIsEnumerable;
|
|
34412
|
+
var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
34413
|
+
var __spreadValues$H = (a, b) => {
|
|
34397
34414
|
for (var prop in b || (b = {}))
|
|
34398
|
-
if (__hasOwnProp$
|
|
34399
|
-
__defNormalProp$
|
|
34400
|
-
if (__getOwnPropSymbols$
|
|
34401
|
-
for (var prop of __getOwnPropSymbols$
|
|
34402
|
-
if (__propIsEnum$
|
|
34403
|
-
__defNormalProp$
|
|
34415
|
+
if (__hasOwnProp$Q.call(b, prop))
|
|
34416
|
+
__defNormalProp$H(a, prop, b[prop]);
|
|
34417
|
+
if (__getOwnPropSymbols$Q)
|
|
34418
|
+
for (var prop of __getOwnPropSymbols$Q(b)) {
|
|
34419
|
+
if (__propIsEnum$Q.call(b, prop))
|
|
34420
|
+
__defNormalProp$H(a, prop, b[prop]);
|
|
34404
34421
|
}
|
|
34405
34422
|
return a;
|
|
34406
34423
|
};
|
|
34407
|
-
var __spreadProps$
|
|
34424
|
+
var __spreadProps$E = (a, b) => __defProps$E(a, __getOwnPropDescs$E(b));
|
|
34408
34425
|
var __objRest$s = (source, exclude) => {
|
|
34409
34426
|
var target = {};
|
|
34410
34427
|
for (var prop in source)
|
|
34411
|
-
if (__hasOwnProp$
|
|
34428
|
+
if (__hasOwnProp$Q.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
34412
34429
|
target[prop] = source[prop];
|
|
34413
|
-
if (source != null && __getOwnPropSymbols$
|
|
34414
|
-
for (var prop of __getOwnPropSymbols$
|
|
34415
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
34430
|
+
if (source != null && __getOwnPropSymbols$Q)
|
|
34431
|
+
for (var prop of __getOwnPropSymbols$Q(source)) {
|
|
34432
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$Q.call(source, prop))
|
|
34416
34433
|
target[prop] = source[prop];
|
|
34417
34434
|
}
|
|
34418
34435
|
return target;
|
|
34419
34436
|
};
|
|
34420
|
-
var __async$
|
|
34437
|
+
var __async$Z = (__this, __arguments, generator) => {
|
|
34421
34438
|
return new Promise((resolve, reject) => {
|
|
34422
34439
|
var fulfilled = (value) => {
|
|
34423
34440
|
try {
|
|
@@ -34440,7 +34457,7 @@ var __async$X = (__this, __arguments, generator) => {
|
|
|
34440
34457
|
const logger$1 = E({
|
|
34441
34458
|
level: process.env.NODE_ENV === "production" ? "fatal" : "info",
|
|
34442
34459
|
name: "shipengine-api",
|
|
34443
|
-
serializers: __spreadProps$
|
|
34460
|
+
serializers: __spreadProps$E(__spreadValues$H({}, k), {
|
|
34444
34461
|
req: (req) => ({
|
|
34445
34462
|
headers: req.headers,
|
|
34446
34463
|
method: req.method,
|
|
@@ -34465,7 +34482,7 @@ class ShipEngineAPI {
|
|
|
34465
34482
|
this.getSandboxToken = getSandboxToken;
|
|
34466
34483
|
const client = axios.create({
|
|
34467
34484
|
baseURL,
|
|
34468
|
-
headers: __spreadProps$
|
|
34485
|
+
headers: __spreadProps$E(__spreadValues$H({}, headers), {
|
|
34469
34486
|
"Content-Type": "application/json"
|
|
34470
34487
|
}),
|
|
34471
34488
|
paramsSerializer: (params) => lib.stringify(decamelizeKeys(params), { arrayFormat: "brackets" }),
|
|
@@ -34505,7 +34522,7 @@ class ShipEngineAPI {
|
|
|
34505
34522
|
});
|
|
34506
34523
|
client.defaults.headers.common["Authorization"] = `Bearer ${token}`;
|
|
34507
34524
|
client.interceptors.request.use(
|
|
34508
|
-
(config) => __async$
|
|
34525
|
+
(config) => __async$Z(this, null, function* () {
|
|
34509
34526
|
if (config.isSandbox) {
|
|
34510
34527
|
if (!this.sandboxToken) {
|
|
34511
34528
|
this.sandboxToken = yield getSandboxToken == null ? void 0 : getSandboxToken();
|
|
@@ -34532,7 +34549,7 @@ class ShipEngineAPI {
|
|
|
34532
34549
|
);
|
|
34533
34550
|
return res;
|
|
34534
34551
|
},
|
|
34535
|
-
(err) => __async$
|
|
34552
|
+
(err) => __async$Z(this, null, function* () {
|
|
34536
34553
|
var _a, _b, _c, _d, _e;
|
|
34537
34554
|
logger$1.error(
|
|
34538
34555
|
{ err, req: err.config, res: err.response },
|
|
@@ -34579,7 +34596,7 @@ class ShipEngineAPI {
|
|
|
34579
34596
|
* that token (also known as Seller ID)
|
|
34580
34597
|
*/
|
|
34581
34598
|
getTenant(isSandbox) {
|
|
34582
|
-
return __async$
|
|
34599
|
+
return __async$Z(this, null, function* () {
|
|
34583
34600
|
var _a;
|
|
34584
34601
|
if (!isSandbox) {
|
|
34585
34602
|
return this.getTenantFromToken(this.token);
|
|
@@ -34882,25 +34899,25 @@ const delay = (ms) => new Promise((resolve) => {
|
|
|
34882
34899
|
|
|
34883
34900
|
const onError = (_errors) => _default();
|
|
34884
34901
|
|
|
34885
|
-
var __defProp$
|
|
34886
|
-
var __defProps$
|
|
34887
|
-
var __getOwnPropDescs$
|
|
34888
|
-
var __getOwnPropSymbols$
|
|
34889
|
-
var __hasOwnProp$
|
|
34890
|
-
var __propIsEnum$
|
|
34891
|
-
var __defNormalProp$
|
|
34892
|
-
var __spreadValues$
|
|
34902
|
+
var __defProp$G = Object.defineProperty;
|
|
34903
|
+
var __defProps$D = Object.defineProperties;
|
|
34904
|
+
var __getOwnPropDescs$D = Object.getOwnPropertyDescriptors;
|
|
34905
|
+
var __getOwnPropSymbols$P = Object.getOwnPropertySymbols;
|
|
34906
|
+
var __hasOwnProp$P = Object.prototype.hasOwnProperty;
|
|
34907
|
+
var __propIsEnum$P = Object.prototype.propertyIsEnumerable;
|
|
34908
|
+
var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
34909
|
+
var __spreadValues$G = (a, b) => {
|
|
34893
34910
|
for (var prop in b || (b = {}))
|
|
34894
|
-
if (__hasOwnProp$
|
|
34895
|
-
__defNormalProp$
|
|
34896
|
-
if (__getOwnPropSymbols$
|
|
34897
|
-
for (var prop of __getOwnPropSymbols$
|
|
34898
|
-
if (__propIsEnum$
|
|
34899
|
-
__defNormalProp$
|
|
34911
|
+
if (__hasOwnProp$P.call(b, prop))
|
|
34912
|
+
__defNormalProp$G(a, prop, b[prop]);
|
|
34913
|
+
if (__getOwnPropSymbols$P)
|
|
34914
|
+
for (var prop of __getOwnPropSymbols$P(b)) {
|
|
34915
|
+
if (__propIsEnum$P.call(b, prop))
|
|
34916
|
+
__defNormalProp$G(a, prop, b[prop]);
|
|
34900
34917
|
}
|
|
34901
34918
|
return a;
|
|
34902
34919
|
};
|
|
34903
|
-
var __spreadProps$
|
|
34920
|
+
var __spreadProps$D = (a, b) => __defProps$D(a, __getOwnPropDescs$D(b));
|
|
34904
34921
|
const streams = [];
|
|
34905
34922
|
if (process.env.NODE_ENV === "production") {
|
|
34906
34923
|
streams.push({
|
|
@@ -34909,7 +34926,7 @@ if (process.env.NODE_ENV === "production") {
|
|
|
34909
34926
|
}
|
|
34910
34927
|
const logger = E({
|
|
34911
34928
|
name: "shipengine",
|
|
34912
|
-
serializers: __spreadProps$
|
|
34929
|
+
serializers: __spreadProps$D(__spreadValues$G({}, k), {
|
|
34913
34930
|
req: (req) => ({
|
|
34914
34931
|
headers: req.headers,
|
|
34915
34932
|
method: req.method,
|
|
@@ -34934,7 +34951,7 @@ const retryUntil = (callbackFn, retries = 10, timeoutBetweenAttempts = 1e3) => P
|
|
|
34934
34951
|
throw error;
|
|
34935
34952
|
});
|
|
34936
34953
|
|
|
34937
|
-
var __async$
|
|
34954
|
+
var __async$Y = (__this, __arguments, generator) => {
|
|
34938
34955
|
return new Promise((resolve, reject) => {
|
|
34939
34956
|
var fulfilled = (value) => {
|
|
34940
34957
|
try {
|
|
@@ -34957,7 +34974,7 @@ var __async$W = (__this, __arguments, generator) => {
|
|
|
34957
34974
|
const useCreateAccountImage = () => {
|
|
34958
34975
|
const { client } = useShipEngine();
|
|
34959
34976
|
return reactQuery.useMutation({
|
|
34960
|
-
mutationFn: (data) => __async$
|
|
34977
|
+
mutationFn: (data) => __async$Y(void 0, null, function* () {
|
|
34961
34978
|
const result = yield client.accountSettings.createImage(data);
|
|
34962
34979
|
return result.data;
|
|
34963
34980
|
}),
|
|
@@ -34966,7 +34983,7 @@ const useCreateAccountImage = () => {
|
|
|
34966
34983
|
});
|
|
34967
34984
|
};
|
|
34968
34985
|
|
|
34969
|
-
var __async$
|
|
34986
|
+
var __async$X = (__this, __arguments, generator) => {
|
|
34970
34987
|
return new Promise((resolve, reject) => {
|
|
34971
34988
|
var fulfilled = (value) => {
|
|
34972
34989
|
try {
|
|
@@ -34989,7 +35006,7 @@ var __async$V = (__this, __arguments, generator) => {
|
|
|
34989
35006
|
const useDeleteAccountImage = () => {
|
|
34990
35007
|
const { client } = useShipEngine();
|
|
34991
35008
|
return reactQuery.useMutation({
|
|
34992
|
-
mutationFn: (labelImageId) => __async$
|
|
35009
|
+
mutationFn: (labelImageId) => __async$X(void 0, null, function* () {
|
|
34993
35010
|
const result = yield client.accountSettings.deleteImage(labelImageId);
|
|
34994
35011
|
return result.data;
|
|
34995
35012
|
}),
|
|
@@ -35018,7 +35035,7 @@ const useGetAccountSettings = () => {
|
|
|
35018
35035
|
});
|
|
35019
35036
|
};
|
|
35020
35037
|
|
|
35021
|
-
var __async$
|
|
35038
|
+
var __async$W = (__this, __arguments, generator) => {
|
|
35022
35039
|
return new Promise((resolve, reject) => {
|
|
35023
35040
|
var fulfilled = (value) => {
|
|
35024
35041
|
try {
|
|
@@ -35041,7 +35058,7 @@ var __async$U = (__this, __arguments, generator) => {
|
|
|
35041
35058
|
const useUpdateAccountImage = () => {
|
|
35042
35059
|
const { client } = useShipEngine();
|
|
35043
35060
|
return reactQuery.useMutation({
|
|
35044
|
-
mutationFn: (data) => __async$
|
|
35061
|
+
mutationFn: (data) => __async$W(void 0, null, function* () {
|
|
35045
35062
|
const result = yield client.accountSettings.updateImage(data);
|
|
35046
35063
|
return result.data;
|
|
35047
35064
|
}),
|
|
@@ -35050,7 +35067,7 @@ const useUpdateAccountImage = () => {
|
|
|
35050
35067
|
});
|
|
35051
35068
|
};
|
|
35052
35069
|
|
|
35053
|
-
var __async$
|
|
35070
|
+
var __async$V = (__this, __arguments, generator) => {
|
|
35054
35071
|
return new Promise((resolve, reject) => {
|
|
35055
35072
|
var fulfilled = (value) => {
|
|
35056
35073
|
try {
|
|
@@ -35073,7 +35090,7 @@ var __async$T = (__this, __arguments, generator) => {
|
|
|
35073
35090
|
const useUpdateAccountSettings = () => {
|
|
35074
35091
|
const { client } = useShipEngine();
|
|
35075
35092
|
return reactQuery.useMutation({
|
|
35076
|
-
mutationFn: (settings) => __async$
|
|
35093
|
+
mutationFn: (settings) => __async$V(void 0, null, function* () {
|
|
35077
35094
|
const result = yield client.accountSettings.update(settings);
|
|
35078
35095
|
return result.data;
|
|
35079
35096
|
}),
|
|
@@ -35082,7 +35099,7 @@ const useUpdateAccountSettings = () => {
|
|
|
35082
35099
|
});
|
|
35083
35100
|
};
|
|
35084
35101
|
|
|
35085
|
-
var __async$
|
|
35102
|
+
var __async$U = (__this, __arguments, generator) => {
|
|
35086
35103
|
return new Promise((resolve, reject) => {
|
|
35087
35104
|
var fulfilled = (value) => {
|
|
35088
35105
|
try {
|
|
@@ -35105,7 +35122,7 @@ var __async$S = (__this, __arguments, generator) => {
|
|
|
35105
35122
|
const useParseAddress = () => {
|
|
35106
35123
|
const { client } = useShipEngine();
|
|
35107
35124
|
return reactQuery.useMutation({
|
|
35108
|
-
mutationFn: (_0) => __async$
|
|
35125
|
+
mutationFn: (_0) => __async$U(void 0, [_0], function* ({ address, text }) {
|
|
35109
35126
|
const result = yield client.addresses.parse(text, address);
|
|
35110
35127
|
return result.data;
|
|
35111
35128
|
}),
|
|
@@ -35114,7 +35131,7 @@ const useParseAddress = () => {
|
|
|
35114
35131
|
});
|
|
35115
35132
|
};
|
|
35116
35133
|
|
|
35117
|
-
var __async$
|
|
35134
|
+
var __async$T = (__this, __arguments, generator) => {
|
|
35118
35135
|
return new Promise((resolve, reject) => {
|
|
35119
35136
|
var fulfilled = (value) => {
|
|
35120
35137
|
try {
|
|
@@ -35137,7 +35154,7 @@ var __async$R = (__this, __arguments, generator) => {
|
|
|
35137
35154
|
const useValidateAddresses = () => {
|
|
35138
35155
|
const { client } = useShipEngine();
|
|
35139
35156
|
return reactQuery.useMutation({
|
|
35140
|
-
mutationFn: (addresses) => __async$
|
|
35157
|
+
mutationFn: (addresses) => __async$T(void 0, null, function* () {
|
|
35141
35158
|
const result = yield client.addresses.validate(addresses);
|
|
35142
35159
|
return result.data;
|
|
35143
35160
|
}),
|
|
@@ -35146,6 +35163,87 @@ const useValidateAddresses = () => {
|
|
|
35146
35163
|
});
|
|
35147
35164
|
};
|
|
35148
35165
|
|
|
35166
|
+
var __defProp$F = Object.defineProperty;
|
|
35167
|
+
var __defProps$C = Object.defineProperties;
|
|
35168
|
+
var __getOwnPropDescs$C = Object.getOwnPropertyDescriptors;
|
|
35169
|
+
var __getOwnPropSymbols$O = Object.getOwnPropertySymbols;
|
|
35170
|
+
var __hasOwnProp$O = Object.prototype.hasOwnProperty;
|
|
35171
|
+
var __propIsEnum$O = Object.prototype.propertyIsEnumerable;
|
|
35172
|
+
var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
35173
|
+
var __spreadValues$F = (a, b) => {
|
|
35174
|
+
for (var prop in b || (b = {}))
|
|
35175
|
+
if (__hasOwnProp$O.call(b, prop))
|
|
35176
|
+
__defNormalProp$F(a, prop, b[prop]);
|
|
35177
|
+
if (__getOwnPropSymbols$O)
|
|
35178
|
+
for (var prop of __getOwnPropSymbols$O(b)) {
|
|
35179
|
+
if (__propIsEnum$O.call(b, prop))
|
|
35180
|
+
__defNormalProp$F(a, prop, b[prop]);
|
|
35181
|
+
}
|
|
35182
|
+
return a;
|
|
35183
|
+
};
|
|
35184
|
+
var __spreadProps$C = (a, b) => __defProps$C(a, __getOwnPropDescs$C(b));
|
|
35185
|
+
var __async$S = (__this, __arguments, generator) => {
|
|
35186
|
+
return new Promise((resolve, reject) => {
|
|
35187
|
+
var fulfilled = (value) => {
|
|
35188
|
+
try {
|
|
35189
|
+
step(generator.next(value));
|
|
35190
|
+
} catch (e) {
|
|
35191
|
+
reject(e);
|
|
35192
|
+
}
|
|
35193
|
+
};
|
|
35194
|
+
var rejected = (value) => {
|
|
35195
|
+
try {
|
|
35196
|
+
step(generator.throw(value));
|
|
35197
|
+
} catch (e) {
|
|
35198
|
+
reject(e);
|
|
35199
|
+
}
|
|
35200
|
+
};
|
|
35201
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
35202
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
35203
|
+
});
|
|
35204
|
+
};
|
|
35205
|
+
const useCreateAuctanePaySession = (params) => {
|
|
35206
|
+
const { client } = useShipEngine();
|
|
35207
|
+
return reactQuery.useMutation(__spreadProps$C(__spreadValues$F({}, params), {
|
|
35208
|
+
mutationFn: (request) => __async$S(void 0, null, function* () {
|
|
35209
|
+
const result = yield client.auctanePay.createSession(request);
|
|
35210
|
+
return result.data;
|
|
35211
|
+
}),
|
|
35212
|
+
mutationKey: ["useCreateAuctanePaySession"],
|
|
35213
|
+
onError
|
|
35214
|
+
}));
|
|
35215
|
+
};
|
|
35216
|
+
|
|
35217
|
+
var __defProp$E = Object.defineProperty;
|
|
35218
|
+
var __defProps$B = Object.defineProperties;
|
|
35219
|
+
var __getOwnPropDescs$B = Object.getOwnPropertyDescriptors;
|
|
35220
|
+
var __getOwnPropSymbols$N = Object.getOwnPropertySymbols;
|
|
35221
|
+
var __hasOwnProp$N = Object.prototype.hasOwnProperty;
|
|
35222
|
+
var __propIsEnum$N = Object.prototype.propertyIsEnumerable;
|
|
35223
|
+
var __defNormalProp$E = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
35224
|
+
var __spreadValues$E = (a, b) => {
|
|
35225
|
+
for (var prop in b || (b = {}))
|
|
35226
|
+
if (__hasOwnProp$N.call(b, prop))
|
|
35227
|
+
__defNormalProp$E(a, prop, b[prop]);
|
|
35228
|
+
if (__getOwnPropSymbols$N)
|
|
35229
|
+
for (var prop of __getOwnPropSymbols$N(b)) {
|
|
35230
|
+
if (__propIsEnum$N.call(b, prop))
|
|
35231
|
+
__defNormalProp$E(a, prop, b[prop]);
|
|
35232
|
+
}
|
|
35233
|
+
return a;
|
|
35234
|
+
};
|
|
35235
|
+
var __spreadProps$B = (a, b) => __defProps$B(a, __getOwnPropDescs$B(b));
|
|
35236
|
+
const useGetAuctanePayConfig = (params) => {
|
|
35237
|
+
const { client } = useShipEngine();
|
|
35238
|
+
const queryParams = __spreadValues$E({}, params);
|
|
35239
|
+
return reactQuery.useQuery(__spreadProps$B(__spreadValues$E({}, queryParams), {
|
|
35240
|
+
onError,
|
|
35241
|
+
queryFn: () => client.auctanePay.getConfig(),
|
|
35242
|
+
queryKey: ["useGetAuctanePayConfig"],
|
|
35243
|
+
select: (result) => result.data
|
|
35244
|
+
}));
|
|
35245
|
+
};
|
|
35246
|
+
|
|
35149
35247
|
var __defProp$D = Object.defineProperty;
|
|
35150
35248
|
var __defProps$A = Object.defineProperties;
|
|
35151
35249
|
var __getOwnPropDescs$A = Object.getOwnPropertyDescriptors;
|
|
@@ -35165,7 +35263,7 @@ var __spreadValues$D = (a, b) => {
|
|
|
35165
35263
|
return a;
|
|
35166
35264
|
};
|
|
35167
35265
|
var __spreadProps$A = (a, b) => __defProps$A(a, __getOwnPropDescs$A(b));
|
|
35168
|
-
var __async$
|
|
35266
|
+
var __async$R = (__this, __arguments, generator) => {
|
|
35169
35267
|
return new Promise((resolve, reject) => {
|
|
35170
35268
|
var fulfilled = (value) => {
|
|
35171
35269
|
try {
|
|
@@ -35185,14 +35283,18 @@ var __async$Q = (__this, __arguments, generator) => {
|
|
|
35185
35283
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
35186
35284
|
});
|
|
35187
35285
|
};
|
|
35188
|
-
const
|
|
35286
|
+
const usePreviewTransaction = (params) => {
|
|
35189
35287
|
const { client } = useShipEngine();
|
|
35190
35288
|
return reactQuery.useMutation(__spreadProps$A(__spreadValues$D({}, params), {
|
|
35191
|
-
mutationFn: (
|
|
35192
|
-
const
|
|
35289
|
+
mutationFn: (_0) => __async$R(void 0, [_0], function* ({ amount, transactionCategory = "add_funds" }) {
|
|
35290
|
+
const request = {
|
|
35291
|
+
amount,
|
|
35292
|
+
transactionCategory
|
|
35293
|
+
};
|
|
35294
|
+
const result = yield client.auctanePay.previewTransaction(request);
|
|
35193
35295
|
return result.data;
|
|
35194
35296
|
}),
|
|
35195
|
-
mutationKey: ["
|
|
35297
|
+
mutationKey: ["usePreviewTransaction"],
|
|
35196
35298
|
onError
|
|
35197
35299
|
}));
|
|
35198
35300
|
};
|
|
@@ -35216,13 +35318,13 @@ var __spreadValues$C = (a, b) => {
|
|
|
35216
35318
|
return a;
|
|
35217
35319
|
};
|
|
35218
35320
|
var __spreadProps$z = (a, b) => __defProps$z(a, __getOwnPropDescs$z(b));
|
|
35219
|
-
const
|
|
35321
|
+
const useGetPaymentMethods = (params) => {
|
|
35220
35322
|
const { client } = useShipEngine();
|
|
35221
35323
|
const queryParams = __spreadValues$C({}, params);
|
|
35222
35324
|
return reactQuery.useQuery(__spreadProps$z(__spreadValues$C({}, queryParams), {
|
|
35223
35325
|
onError,
|
|
35224
|
-
queryFn: () => client.auctanePay.
|
|
35225
|
-
queryKey: ["
|
|
35326
|
+
queryFn: () => client.auctanePay.getPaymentMethods(),
|
|
35327
|
+
queryKey: ["useGetPaymentMethods"],
|
|
35226
35328
|
select: (result) => result.data
|
|
35227
35329
|
}));
|
|
35228
35330
|
};
|
|
@@ -35246,7 +35348,7 @@ var __spreadValues$B = (a, b) => {
|
|
|
35246
35348
|
return a;
|
|
35247
35349
|
};
|
|
35248
35350
|
var __spreadProps$y = (a, b) => __defProps$y(a, __getOwnPropDescs$y(b));
|
|
35249
|
-
var __async$
|
|
35351
|
+
var __async$Q = (__this, __arguments, generator) => {
|
|
35250
35352
|
return new Promise((resolve, reject) => {
|
|
35251
35353
|
var fulfilled = (value) => {
|
|
35252
35354
|
try {
|
|
@@ -35266,18 +35368,14 @@ var __async$P = (__this, __arguments, generator) => {
|
|
|
35266
35368
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
35267
35369
|
});
|
|
35268
35370
|
};
|
|
35269
|
-
const
|
|
35371
|
+
const useDeletePaymentMethod = (params) => {
|
|
35270
35372
|
const { client } = useShipEngine();
|
|
35271
35373
|
return reactQuery.useMutation(__spreadProps$y(__spreadValues$B({}, params), {
|
|
35272
|
-
mutationFn: (
|
|
35273
|
-
const
|
|
35274
|
-
amount,
|
|
35275
|
-
transactionCategory
|
|
35276
|
-
};
|
|
35277
|
-
const result = yield client.auctanePay.previewTransaction(request);
|
|
35374
|
+
mutationFn: (paymentMethodId) => __async$Q(void 0, null, function* () {
|
|
35375
|
+
const result = yield client.auctanePay.deletePaymentMethod(paymentMethodId);
|
|
35278
35376
|
return result.data;
|
|
35279
35377
|
}),
|
|
35280
|
-
mutationKey: ["
|
|
35378
|
+
mutationKey: ["useDeletePaymentMethod"],
|
|
35281
35379
|
onError
|
|
35282
35380
|
}));
|
|
35283
35381
|
};
|
|
@@ -35301,14 +35399,35 @@ var __spreadValues$A = (a, b) => {
|
|
|
35301
35399
|
return a;
|
|
35302
35400
|
};
|
|
35303
35401
|
var __spreadProps$x = (a, b) => __defProps$x(a, __getOwnPropDescs$x(b));
|
|
35304
|
-
|
|
35402
|
+
var __async$P = (__this, __arguments, generator) => {
|
|
35403
|
+
return new Promise((resolve, reject) => {
|
|
35404
|
+
var fulfilled = (value) => {
|
|
35405
|
+
try {
|
|
35406
|
+
step(generator.next(value));
|
|
35407
|
+
} catch (e) {
|
|
35408
|
+
reject(e);
|
|
35409
|
+
}
|
|
35410
|
+
};
|
|
35411
|
+
var rejected = (value) => {
|
|
35412
|
+
try {
|
|
35413
|
+
step(generator.throw(value));
|
|
35414
|
+
} catch (e) {
|
|
35415
|
+
reject(e);
|
|
35416
|
+
}
|
|
35417
|
+
};
|
|
35418
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
35419
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
35420
|
+
});
|
|
35421
|
+
};
|
|
35422
|
+
const useUpdatePaymentMethod = (params) => {
|
|
35305
35423
|
const { client } = useShipEngine();
|
|
35306
|
-
|
|
35307
|
-
|
|
35308
|
-
|
|
35309
|
-
|
|
35310
|
-
|
|
35311
|
-
|
|
35424
|
+
return reactQuery.useMutation(__spreadProps$x(__spreadValues$A({}, params), {
|
|
35425
|
+
mutationFn: (_0) => __async$P(void 0, [_0], function* ({ paymentMethodId, payload }) {
|
|
35426
|
+
const result = yield client.auctanePay.updatePaymentMethod(paymentMethodId, payload);
|
|
35427
|
+
return result.data;
|
|
35428
|
+
}),
|
|
35429
|
+
mutationKey: ["useUpdatePaymentMethod"],
|
|
35430
|
+
onError
|
|
35312
35431
|
}));
|
|
35313
35432
|
};
|
|
35314
35433
|
|
|
@@ -39916,6 +40035,7 @@ exports.useCreateWebhook = useCreateWebhook;
|
|
|
39916
40035
|
exports.useDeactivateOrderSource = useDeactivateOrderSource;
|
|
39917
40036
|
exports.useDeleteAccountImage = useDeleteAccountImage;
|
|
39918
40037
|
exports.useDeleteCarrier = useDeleteCarrier;
|
|
40038
|
+
exports.useDeletePaymentMethod = useDeletePaymentMethod;
|
|
39919
40039
|
exports.useDeleteRateCard = useDeleteRateCard;
|
|
39920
40040
|
exports.useDeleteSellerApiKey = useDeleteSellerApiKey;
|
|
39921
40041
|
exports.useDeleteShippingRule = useDeleteShippingRule;
|
|
@@ -40000,6 +40120,7 @@ exports.useUpdateConnectionsCarrierSettings = useUpdateConnectionsCarrierSetting
|
|
|
40000
40120
|
exports.useUpdateFundingSource = useUpdateFundingSource;
|
|
40001
40121
|
exports.useUpdateInvoiceAddress = useUpdateInvoiceAddress;
|
|
40002
40122
|
exports.useUpdateOrderSource = useUpdateOrderSource;
|
|
40123
|
+
exports.useUpdatePaymentMethod = useUpdatePaymentMethod;
|
|
40003
40124
|
exports.useUpdateRateCard = useUpdateRateCard;
|
|
40004
40125
|
exports.useUpdateSalesOrderShipment = useUpdateSalesOrderShipment;
|
|
40005
40126
|
exports.useUpdateWarehouse = useUpdateWarehouse;
|