@shipengine/alchemy 5.4.12 → 5.4.14
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 +171 -115
- package/index.mjs +171 -116
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -10812,17 +10812,17 @@ var AccountBillingPlanChangeType = /* @__PURE__ */ ((AccountBillingPlanChangeTyp
|
|
|
10812
10812
|
return AccountBillingPlanChangeType2;
|
|
10813
10813
|
})(AccountBillingPlanChangeType || {});
|
|
10814
10814
|
|
|
10815
|
-
var __getOwnPropSymbols$
|
|
10816
|
-
var __hasOwnProp$
|
|
10817
|
-
var __propIsEnum$
|
|
10815
|
+
var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
|
|
10816
|
+
var __hasOwnProp$r = Object.prototype.hasOwnProperty;
|
|
10817
|
+
var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
|
|
10818
10818
|
var __objRest$f = (source, exclude) => {
|
|
10819
10819
|
var target = {};
|
|
10820
10820
|
for (var prop in source)
|
|
10821
|
-
if (__hasOwnProp$
|
|
10821
|
+
if (__hasOwnProp$r.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
10822
10822
|
target[prop] = source[prop];
|
|
10823
|
-
if (source != null && __getOwnPropSymbols$
|
|
10824
|
-
for (var prop of __getOwnPropSymbols$
|
|
10825
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
10823
|
+
if (source != null && __getOwnPropSymbols$r)
|
|
10824
|
+
for (var prop of __getOwnPropSymbols$r(source)) {
|
|
10825
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$r.call(source, prop))
|
|
10826
10826
|
target[prop] = source[prop];
|
|
10827
10827
|
}
|
|
10828
10828
|
return target;
|
|
@@ -10944,17 +10944,17 @@ const types = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
10944
10944
|
RateCardStatus
|
|
10945
10945
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
10946
10946
|
|
|
10947
|
-
var __getOwnPropSymbols$
|
|
10948
|
-
var __hasOwnProp$
|
|
10949
|
-
var __propIsEnum$
|
|
10947
|
+
var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
|
|
10948
|
+
var __hasOwnProp$q = Object.prototype.hasOwnProperty;
|
|
10949
|
+
var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
|
|
10950
10950
|
var __objRest$e = (source, exclude) => {
|
|
10951
10951
|
var target = {};
|
|
10952
10952
|
for (var prop in source)
|
|
10953
|
-
if (__hasOwnProp$
|
|
10953
|
+
if (__hasOwnProp$q.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
10954
10954
|
target[prop] = source[prop];
|
|
10955
|
-
if (source != null && __getOwnPropSymbols$
|
|
10956
|
-
for (var prop of __getOwnPropSymbols$
|
|
10957
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
10955
|
+
if (source != null && __getOwnPropSymbols$q)
|
|
10956
|
+
for (var prop of __getOwnPropSymbols$q(source)) {
|
|
10957
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$q.call(source, prop))
|
|
10958
10958
|
target[prop] = source[prop];
|
|
10959
10959
|
}
|
|
10960
10960
|
return target;
|
|
@@ -13696,7 +13696,7 @@ var ipaddr = {
|
|
|
13696
13696
|
}).call(commonjsGlobal);
|
|
13697
13697
|
} (ipaddr));
|
|
13698
13698
|
|
|
13699
|
-
var __async$
|
|
13699
|
+
var __async$N = (__this, __arguments, generator) => {
|
|
13700
13700
|
return new Promise((resolve, reject) => {
|
|
13701
13701
|
var fulfilled = (value) => {
|
|
13702
13702
|
try {
|
|
@@ -13716,7 +13716,7 @@ var __async$M = (__this, __arguments, generator) => {
|
|
|
13716
13716
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
13717
13717
|
});
|
|
13718
13718
|
};
|
|
13719
|
-
const getEndUserIpAddress = () => __async$
|
|
13719
|
+
const getEndUserIpAddress = () => __async$N(void 0, null, function* () {
|
|
13720
13720
|
try {
|
|
13721
13721
|
const response = yield axios.get("https://api.ipify.org/?format=json");
|
|
13722
13722
|
if (response.data.ip && ipaddrExports.isValid(response.data.ip)) {
|
|
@@ -13728,21 +13728,21 @@ const getEndUserIpAddress = () => __async$M(void 0, null, function* () {
|
|
|
13728
13728
|
}
|
|
13729
13729
|
});
|
|
13730
13730
|
|
|
13731
|
-
var __defProp$
|
|
13731
|
+
var __defProp$e = Object.defineProperty;
|
|
13732
13732
|
var __defProps$9 = Object.defineProperties;
|
|
13733
13733
|
var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
|
|
13734
|
-
var __getOwnPropSymbols$
|
|
13735
|
-
var __hasOwnProp$
|
|
13736
|
-
var __propIsEnum$
|
|
13737
|
-
var __defNormalProp$
|
|
13738
|
-
var __spreadValues$
|
|
13734
|
+
var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
|
|
13735
|
+
var __hasOwnProp$p = Object.prototype.hasOwnProperty;
|
|
13736
|
+
var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
|
|
13737
|
+
var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13738
|
+
var __spreadValues$e = (a, b) => {
|
|
13739
13739
|
for (var prop in b || (b = {}))
|
|
13740
|
-
if (__hasOwnProp$
|
|
13741
|
-
__defNormalProp$
|
|
13742
|
-
if (__getOwnPropSymbols$
|
|
13743
|
-
for (var prop of __getOwnPropSymbols$
|
|
13744
|
-
if (__propIsEnum$
|
|
13745
|
-
__defNormalProp$
|
|
13740
|
+
if (__hasOwnProp$p.call(b, prop))
|
|
13741
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
13742
|
+
if (__getOwnPropSymbols$p)
|
|
13743
|
+
for (var prop of __getOwnPropSymbols$p(b)) {
|
|
13744
|
+
if (__propIsEnum$p.call(b, prop))
|
|
13745
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
13746
13746
|
}
|
|
13747
13747
|
return a;
|
|
13748
13748
|
};
|
|
@@ -13750,16 +13750,16 @@ var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
|
|
|
13750
13750
|
var __objRest$d = (source, exclude) => {
|
|
13751
13751
|
var target = {};
|
|
13752
13752
|
for (var prop in source)
|
|
13753
|
-
if (__hasOwnProp$
|
|
13753
|
+
if (__hasOwnProp$p.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
13754
13754
|
target[prop] = source[prop];
|
|
13755
|
-
if (source != null && __getOwnPropSymbols$
|
|
13756
|
-
for (var prop of __getOwnPropSymbols$
|
|
13757
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
13755
|
+
if (source != null && __getOwnPropSymbols$p)
|
|
13756
|
+
for (var prop of __getOwnPropSymbols$p(source)) {
|
|
13757
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$p.call(source, prop))
|
|
13758
13758
|
target[prop] = source[prop];
|
|
13759
13759
|
}
|
|
13760
13760
|
return target;
|
|
13761
13761
|
};
|
|
13762
|
-
var __async$
|
|
13762
|
+
var __async$M = (__this, __arguments, generator) => {
|
|
13763
13763
|
return new Promise((resolve, reject) => {
|
|
13764
13764
|
var fulfilled = (value) => {
|
|
13765
13765
|
try {
|
|
@@ -13797,12 +13797,12 @@ class CarriersAPI {
|
|
|
13797
13797
|
/**
|
|
13798
13798
|
* The `connect` method connects a carrier account to a user's ShipEngine account.
|
|
13799
13799
|
*/
|
|
13800
|
-
this.connect = (_a) => __async$
|
|
13800
|
+
this.connect = (_a) => __async$M(this, null, function* () {
|
|
13801
13801
|
var _b = _a, { carrierCode } = _b, connection = __objRest$d(_b, ["carrierCode"]);
|
|
13802
13802
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
13803
13803
|
if (!endUserIpAddress)
|
|
13804
13804
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
13805
|
-
return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$9(__spreadValues$
|
|
13805
|
+
return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$9(__spreadValues$e({}, connection), {
|
|
13806
13806
|
endUserIpAddress
|
|
13807
13807
|
}));
|
|
13808
13808
|
});
|
|
@@ -13888,7 +13888,7 @@ class CarriersAPI {
|
|
|
13888
13888
|
}
|
|
13889
13889
|
}
|
|
13890
13890
|
|
|
13891
|
-
var __async$
|
|
13891
|
+
var __async$L = (__this, __arguments, generator) => {
|
|
13892
13892
|
return new Promise((resolve, reject) => {
|
|
13893
13893
|
var fulfilled = (value) => {
|
|
13894
13894
|
try {
|
|
@@ -13930,7 +13930,7 @@ class ConnectionsAPI {
|
|
|
13930
13930
|
/**
|
|
13931
13931
|
* The `connectCarrier` method connects a carrier to account.
|
|
13932
13932
|
*/
|
|
13933
|
-
this.connectCarrier = (carrierName, formData) => __async$
|
|
13933
|
+
this.connectCarrier = (carrierName, formData) => __async$L(this, null, function* () {
|
|
13934
13934
|
return yield this.client.post(
|
|
13935
13935
|
`/v1/connections/carriers/${carrierName}`,
|
|
13936
13936
|
formData,
|
|
@@ -16166,23 +16166,23 @@ class CustomPackagesAPI {
|
|
|
16166
16166
|
}
|
|
16167
16167
|
}
|
|
16168
16168
|
|
|
16169
|
-
var __defProp$
|
|
16170
|
-
var __getOwnPropSymbols$
|
|
16171
|
-
var __hasOwnProp$
|
|
16172
|
-
var __propIsEnum$
|
|
16173
|
-
var __defNormalProp$
|
|
16174
|
-
var __spreadValues$
|
|
16169
|
+
var __defProp$d = Object.defineProperty;
|
|
16170
|
+
var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
|
|
16171
|
+
var __hasOwnProp$o = Object.prototype.hasOwnProperty;
|
|
16172
|
+
var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
|
|
16173
|
+
var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16174
|
+
var __spreadValues$d = (a, b) => {
|
|
16175
16175
|
for (var prop in b || (b = {}))
|
|
16176
|
-
if (__hasOwnProp$
|
|
16177
|
-
__defNormalProp$
|
|
16178
|
-
if (__getOwnPropSymbols$
|
|
16179
|
-
for (var prop of __getOwnPropSymbols$
|
|
16180
|
-
if (__propIsEnum$
|
|
16181
|
-
__defNormalProp$
|
|
16176
|
+
if (__hasOwnProp$o.call(b, prop))
|
|
16177
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
16178
|
+
if (__getOwnPropSymbols$o)
|
|
16179
|
+
for (var prop of __getOwnPropSymbols$o(b)) {
|
|
16180
|
+
if (__propIsEnum$o.call(b, prop))
|
|
16181
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
16182
16182
|
}
|
|
16183
16183
|
return a;
|
|
16184
16184
|
};
|
|
16185
|
-
var __async$
|
|
16185
|
+
var __async$K = (__this, __arguments, generator) => {
|
|
16186
16186
|
return new Promise((resolve, reject) => {
|
|
16187
16187
|
var fulfilled = (value) => {
|
|
16188
16188
|
try {
|
|
@@ -16221,12 +16221,12 @@ class FundingSourcesAPI {
|
|
|
16221
16221
|
* The `create` method creates a new funding source for a given user. This requires
|
|
16222
16222
|
* payment information to be collected from the user.
|
|
16223
16223
|
*/
|
|
16224
|
-
this.create = (createFundingSource) => __async$
|
|
16224
|
+
this.create = (createFundingSource) => __async$K(this, null, function* () {
|
|
16225
16225
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16226
16226
|
if (!endUserIpAddress) {
|
|
16227
16227
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
16228
16228
|
}
|
|
16229
|
-
return yield this.client.post("/v1/funding_sources", __spreadValues$
|
|
16229
|
+
return yield this.client.post("/v1/funding_sources", __spreadValues$d({
|
|
16230
16230
|
endUserIpAddress
|
|
16231
16231
|
}, createFundingSource));
|
|
16232
16232
|
});
|
|
@@ -16235,7 +16235,7 @@ class FundingSourcesAPI {
|
|
|
16235
16235
|
* user to update the billing address or payment information associated with the
|
|
16236
16236
|
* funding source.
|
|
16237
16237
|
*/
|
|
16238
|
-
this.update = (billingInfo, creditCardInfo, fundingSourceId) => __async$
|
|
16238
|
+
this.update = (billingInfo, creditCardInfo, fundingSourceId) => __async$K(this, null, function* () {
|
|
16239
16239
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16240
16240
|
if (!endUserIpAddress) {
|
|
16241
16241
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
@@ -16253,19 +16253,19 @@ class FundingSourcesAPI {
|
|
|
16253
16253
|
* The `registerCarrier` method registers a carrier account and associates
|
|
16254
16254
|
* it with a given funding source.
|
|
16255
16255
|
*/
|
|
16256
|
-
this.registerCarrier = (carrier) => __async$
|
|
16256
|
+
this.registerCarrier = (carrier) => __async$K(this, null, function* () {
|
|
16257
16257
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16258
16258
|
if (!endUserIpAddress) {
|
|
16259
16259
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
16260
16260
|
}
|
|
16261
|
-
return yield this.client.post("/v1/registration/funding_source", __spreadValues$
|
|
16261
|
+
return yield this.client.post("/v1/registration/funding_source", __spreadValues$d({
|
|
16262
16262
|
endUserIpAddress
|
|
16263
16263
|
}, carrier));
|
|
16264
16264
|
});
|
|
16265
16265
|
/**
|
|
16266
16266
|
* The `addFunds` method allows you to add funds to a funding source.
|
|
16267
16267
|
*/
|
|
16268
|
-
this.addFunds = (amount, fundingSourceId) => __async$
|
|
16268
|
+
this.addFunds = (amount, fundingSourceId) => __async$K(this, null, function* () {
|
|
16269
16269
|
return yield this.client.put(
|
|
16270
16270
|
`/v1/funding_sources/${fundingSourceId}/add_funds`,
|
|
16271
16271
|
amount
|
|
@@ -16275,7 +16275,7 @@ class FundingSourcesAPI {
|
|
|
16275
16275
|
* The `metadata` method returns seller-specific requirements for creating funding sources
|
|
16276
16276
|
* and attaching carriers
|
|
16277
16277
|
*/
|
|
16278
|
-
this.metadata = () => __async$
|
|
16278
|
+
this.metadata = () => __async$K(this, null, function* () {
|
|
16279
16279
|
return yield this.client.get("/v1/funding_sources/metadata");
|
|
16280
16280
|
});
|
|
16281
16281
|
/**
|
|
@@ -16463,6 +16463,22 @@ class RateCardsAPI {
|
|
|
16463
16463
|
}
|
|
16464
16464
|
}
|
|
16465
16465
|
|
|
16466
|
+
var __defProp$c = Object.defineProperty;
|
|
16467
|
+
var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
|
|
16468
|
+
var __hasOwnProp$n = Object.prototype.hasOwnProperty;
|
|
16469
|
+
var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
|
|
16470
|
+
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16471
|
+
var __spreadValues$c = (a, b) => {
|
|
16472
|
+
for (var prop in b || (b = {}))
|
|
16473
|
+
if (__hasOwnProp$n.call(b, prop))
|
|
16474
|
+
__defNormalProp$c(a, prop, b[prop]);
|
|
16475
|
+
if (__getOwnPropSymbols$n)
|
|
16476
|
+
for (var prop of __getOwnPropSymbols$n(b)) {
|
|
16477
|
+
if (__propIsEnum$n.call(b, prop))
|
|
16478
|
+
__defNormalProp$c(a, prop, b[prop]);
|
|
16479
|
+
}
|
|
16480
|
+
return a;
|
|
16481
|
+
};
|
|
16466
16482
|
class RatesAPI {
|
|
16467
16483
|
constructor(client) {
|
|
16468
16484
|
this.client = client;
|
|
@@ -16476,6 +16492,13 @@ class RatesAPI {
|
|
|
16476
16492
|
shipmentId
|
|
16477
16493
|
});
|
|
16478
16494
|
};
|
|
16495
|
+
/**
|
|
16496
|
+
* The `estimate` endpoint allows us to obtain estimated rates based on the payload that is attached to the POST
|
|
16497
|
+
* method.
|
|
16498
|
+
*/
|
|
16499
|
+
this.estimate = (params) => {
|
|
16500
|
+
return this.client.post("/v1/rates/estimate", __spreadValues$c({}, params));
|
|
16501
|
+
};
|
|
16479
16502
|
this.client = client;
|
|
16480
16503
|
}
|
|
16481
16504
|
}
|
|
@@ -16614,7 +16637,7 @@ class ServicePointsAPI {
|
|
|
16614
16637
|
}
|
|
16615
16638
|
}
|
|
16616
16639
|
|
|
16617
|
-
var __async$
|
|
16640
|
+
var __async$J = (__this, __arguments, generator) => {
|
|
16618
16641
|
return new Promise((resolve, reject) => {
|
|
16619
16642
|
var fulfilled = (value) => {
|
|
16620
16643
|
try {
|
|
@@ -16657,7 +16680,7 @@ class ShipmentsAPI {
|
|
|
16657
16680
|
* The `create` method allows for creating shipments based on a list of shipment
|
|
16658
16681
|
* items passed into this method.
|
|
16659
16682
|
*/
|
|
16660
|
-
this.create = (...shipments) => __async$
|
|
16683
|
+
this.create = (...shipments) => __async$J(this, null, function* () {
|
|
16661
16684
|
return this.client.post("/v1/shipments", {
|
|
16662
16685
|
shipments
|
|
16663
16686
|
});
|
|
@@ -34042,7 +34065,7 @@ var __spreadValues$a = (a, b) => {
|
|
|
34042
34065
|
return a;
|
|
34043
34066
|
};
|
|
34044
34067
|
var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
|
|
34045
|
-
var __async$
|
|
34068
|
+
var __async$I = (__this, __arguments, generator) => {
|
|
34046
34069
|
return new Promise((resolve, reject) => {
|
|
34047
34070
|
var fulfilled = (value) => {
|
|
34048
34071
|
try {
|
|
@@ -34136,7 +34159,7 @@ class ShipEngineAPI {
|
|
|
34136
34159
|
);
|
|
34137
34160
|
return res;
|
|
34138
34161
|
},
|
|
34139
|
-
(err) => __async$
|
|
34162
|
+
(err) => __async$I(this, null, function* () {
|
|
34140
34163
|
var _a, _b, _c, _d, _e;
|
|
34141
34164
|
logger$1.error(
|
|
34142
34165
|
{ err, req: err.config, res: err.response },
|
|
@@ -34470,7 +34493,7 @@ const retryUntil = (callbackFn, retries = 10, timeoutBetweenAttempts = 1e3) => P
|
|
|
34470
34493
|
throw error;
|
|
34471
34494
|
});
|
|
34472
34495
|
|
|
34473
|
-
var __async$
|
|
34496
|
+
var __async$H = (__this, __arguments, generator) => {
|
|
34474
34497
|
return new Promise((resolve, reject) => {
|
|
34475
34498
|
var fulfilled = (value) => {
|
|
34476
34499
|
try {
|
|
@@ -34493,7 +34516,7 @@ var __async$G = (__this, __arguments, generator) => {
|
|
|
34493
34516
|
const useCreateAccountImage = () => {
|
|
34494
34517
|
const { client } = useShipEngine();
|
|
34495
34518
|
return reactQuery.useMutation({
|
|
34496
|
-
mutationFn: (data) => __async$
|
|
34519
|
+
mutationFn: (data) => __async$H(void 0, null, function* () {
|
|
34497
34520
|
const result = yield client.accountSettings.createImage(data);
|
|
34498
34521
|
return result.data;
|
|
34499
34522
|
}),
|
|
@@ -34502,7 +34525,7 @@ const useCreateAccountImage = () => {
|
|
|
34502
34525
|
});
|
|
34503
34526
|
};
|
|
34504
34527
|
|
|
34505
|
-
var __async$
|
|
34528
|
+
var __async$G = (__this, __arguments, generator) => {
|
|
34506
34529
|
return new Promise((resolve, reject) => {
|
|
34507
34530
|
var fulfilled = (value) => {
|
|
34508
34531
|
try {
|
|
@@ -34525,7 +34548,7 @@ var __async$F = (__this, __arguments, generator) => {
|
|
|
34525
34548
|
const useDeleteAccountImage = () => {
|
|
34526
34549
|
const { client } = useShipEngine();
|
|
34527
34550
|
return reactQuery.useMutation({
|
|
34528
|
-
mutationFn: (labelImageId) => __async$
|
|
34551
|
+
mutationFn: (labelImageId) => __async$G(void 0, null, function* () {
|
|
34529
34552
|
const result = yield client.accountSettings.deleteImage(labelImageId);
|
|
34530
34553
|
return result.data;
|
|
34531
34554
|
}),
|
|
@@ -34554,7 +34577,7 @@ const useGetAccountSettings = () => {
|
|
|
34554
34577
|
});
|
|
34555
34578
|
};
|
|
34556
34579
|
|
|
34557
|
-
var __async$
|
|
34580
|
+
var __async$F = (__this, __arguments, generator) => {
|
|
34558
34581
|
return new Promise((resolve, reject) => {
|
|
34559
34582
|
var fulfilled = (value) => {
|
|
34560
34583
|
try {
|
|
@@ -34577,7 +34600,7 @@ var __async$E = (__this, __arguments, generator) => {
|
|
|
34577
34600
|
const useUpdateAccountImage = () => {
|
|
34578
34601
|
const { client } = useShipEngine();
|
|
34579
34602
|
return reactQuery.useMutation({
|
|
34580
|
-
mutationFn: (data) => __async$
|
|
34603
|
+
mutationFn: (data) => __async$F(void 0, null, function* () {
|
|
34581
34604
|
const result = yield client.accountSettings.updateImage(data);
|
|
34582
34605
|
return result.data;
|
|
34583
34606
|
}),
|
|
@@ -34586,7 +34609,7 @@ const useUpdateAccountImage = () => {
|
|
|
34586
34609
|
});
|
|
34587
34610
|
};
|
|
34588
34611
|
|
|
34589
|
-
var __async$
|
|
34612
|
+
var __async$E = (__this, __arguments, generator) => {
|
|
34590
34613
|
return new Promise((resolve, reject) => {
|
|
34591
34614
|
var fulfilled = (value) => {
|
|
34592
34615
|
try {
|
|
@@ -34609,7 +34632,7 @@ var __async$D = (__this, __arguments, generator) => {
|
|
|
34609
34632
|
const useUpdateAccountSettings = () => {
|
|
34610
34633
|
const { client } = useShipEngine();
|
|
34611
34634
|
return reactQuery.useMutation({
|
|
34612
|
-
mutationFn: (settings) => __async$
|
|
34635
|
+
mutationFn: (settings) => __async$E(void 0, null, function* () {
|
|
34613
34636
|
const result = yield client.accountSettings.update(settings);
|
|
34614
34637
|
return result.data;
|
|
34615
34638
|
}),
|
|
@@ -34618,7 +34641,7 @@ const useUpdateAccountSettings = () => {
|
|
|
34618
34641
|
});
|
|
34619
34642
|
};
|
|
34620
34643
|
|
|
34621
|
-
var __async$
|
|
34644
|
+
var __async$D = (__this, __arguments, generator) => {
|
|
34622
34645
|
return new Promise((resolve, reject) => {
|
|
34623
34646
|
var fulfilled = (value) => {
|
|
34624
34647
|
try {
|
|
@@ -34641,7 +34664,7 @@ var __async$C = (__this, __arguments, generator) => {
|
|
|
34641
34664
|
const useParseAddress = () => {
|
|
34642
34665
|
const { client } = useShipEngine();
|
|
34643
34666
|
return reactQuery.useMutation({
|
|
34644
|
-
mutationFn: (_0) => __async$
|
|
34667
|
+
mutationFn: (_0) => __async$D(void 0, [_0], function* ({ address, text }) {
|
|
34645
34668
|
const result = yield client.addresses.parse(text, address);
|
|
34646
34669
|
return result.data;
|
|
34647
34670
|
}),
|
|
@@ -34650,7 +34673,7 @@ const useParseAddress = () => {
|
|
|
34650
34673
|
});
|
|
34651
34674
|
};
|
|
34652
34675
|
|
|
34653
|
-
var __async$
|
|
34676
|
+
var __async$C = (__this, __arguments, generator) => {
|
|
34654
34677
|
return new Promise((resolve, reject) => {
|
|
34655
34678
|
var fulfilled = (value) => {
|
|
34656
34679
|
try {
|
|
@@ -34673,7 +34696,7 @@ var __async$B = (__this, __arguments, generator) => {
|
|
|
34673
34696
|
const useValidateAddresses = () => {
|
|
34674
34697
|
const { client } = useShipEngine();
|
|
34675
34698
|
return reactQuery.useMutation({
|
|
34676
|
-
mutationFn: (addresses) => __async$
|
|
34699
|
+
mutationFn: (addresses) => __async$C(void 0, null, function* () {
|
|
34677
34700
|
const result = yield client.addresses.validate(addresses);
|
|
34678
34701
|
return result.data;
|
|
34679
34702
|
}),
|
|
@@ -34682,7 +34705,7 @@ const useValidateAddresses = () => {
|
|
|
34682
34705
|
});
|
|
34683
34706
|
};
|
|
34684
34707
|
|
|
34685
|
-
var __async$
|
|
34708
|
+
var __async$B = (__this, __arguments, generator) => {
|
|
34686
34709
|
return new Promise((resolve, reject) => {
|
|
34687
34710
|
var fulfilled = (value) => {
|
|
34688
34711
|
try {
|
|
@@ -34705,7 +34728,7 @@ var __async$A = (__this, __arguments, generator) => {
|
|
|
34705
34728
|
const useAddFunds = () => {
|
|
34706
34729
|
const { client } = useShipEngine();
|
|
34707
34730
|
return reactQuery.useMutation({
|
|
34708
|
-
mutationFn: (_0) => __async$
|
|
34731
|
+
mutationFn: (_0) => __async$B(void 0, [_0], function* ({ carrierId, funds }) {
|
|
34709
34732
|
const result = yield client.carriers.addFunds(carrierId, funds);
|
|
34710
34733
|
return result.data;
|
|
34711
34734
|
}),
|
|
@@ -34714,7 +34737,7 @@ const useAddFunds = () => {
|
|
|
34714
34737
|
});
|
|
34715
34738
|
};
|
|
34716
34739
|
|
|
34717
|
-
var __async$
|
|
34740
|
+
var __async$A = (__this, __arguments, generator) => {
|
|
34718
34741
|
return new Promise((resolve, reject) => {
|
|
34719
34742
|
var fulfilled = (value) => {
|
|
34720
34743
|
try {
|
|
@@ -34737,7 +34760,7 @@ var __async$z = (__this, __arguments, generator) => {
|
|
|
34737
34760
|
const useConnectCarrier = () => {
|
|
34738
34761
|
const { client } = useShipEngine();
|
|
34739
34762
|
return reactQuery.useMutation({
|
|
34740
|
-
mutationFn: (params) => __async$
|
|
34763
|
+
mutationFn: (params) => __async$A(void 0, null, function* () {
|
|
34741
34764
|
const result = yield client.carriers.connect(params);
|
|
34742
34765
|
return result.data;
|
|
34743
34766
|
}),
|
|
@@ -34871,7 +34894,7 @@ var __objRest$c = (source, exclude) => {
|
|
|
34871
34894
|
}
|
|
34872
34895
|
return target;
|
|
34873
34896
|
};
|
|
34874
|
-
var __async$
|
|
34897
|
+
var __async$z = (__this, __arguments, generator) => {
|
|
34875
34898
|
return new Promise((resolve, reject) => {
|
|
34876
34899
|
var fulfilled = (value) => {
|
|
34877
34900
|
try {
|
|
@@ -34895,7 +34918,7 @@ const useUpdateAutoFunding = () => {
|
|
|
34895
34918
|
const { client } = useShipEngine();
|
|
34896
34919
|
const queryClient = reactQuery.useQueryClient();
|
|
34897
34920
|
return reactQuery.useMutation({
|
|
34898
|
-
mutationFn: (_a) => __async$
|
|
34921
|
+
mutationFn: (_a) => __async$z(void 0, null, function* () {
|
|
34899
34922
|
var _b = _a, { carrierId } = _b, options = __objRest$c(_b, ["carrierId"]);
|
|
34900
34923
|
const result = yield client.carriers.updateAutoFunding(carrierId, options);
|
|
34901
34924
|
return result.data;
|
|
@@ -34925,7 +34948,7 @@ const useGetZonesByCarrier = (carrierId) => {
|
|
|
34925
34948
|
});
|
|
34926
34949
|
};
|
|
34927
34950
|
|
|
34928
|
-
var __async$
|
|
34951
|
+
var __async$y = (__this, __arguments, generator) => {
|
|
34929
34952
|
return new Promise((resolve, reject) => {
|
|
34930
34953
|
var fulfilled = (value) => {
|
|
34931
34954
|
try {
|
|
@@ -34948,7 +34971,7 @@ var __async$x = (__this, __arguments, generator) => {
|
|
|
34948
34971
|
const useDeleteCarrier = () => {
|
|
34949
34972
|
const { client } = useShipEngine();
|
|
34950
34973
|
return reactQuery.useMutation({
|
|
34951
|
-
mutationFn: (carrierId) => __async$
|
|
34974
|
+
mutationFn: (carrierId) => __async$y(void 0, null, function* () {
|
|
34952
34975
|
const result = yield client.carriers.delete(carrierId);
|
|
34953
34976
|
return result.data;
|
|
34954
34977
|
}),
|
|
@@ -35011,7 +35034,7 @@ const useListCarrierConnections = (_params) => {
|
|
|
35011
35034
|
});
|
|
35012
35035
|
};
|
|
35013
35036
|
|
|
35014
|
-
var __async$
|
|
35037
|
+
var __async$x = (__this, __arguments, generator) => {
|
|
35015
35038
|
return new Promise((resolve, reject) => {
|
|
35016
35039
|
var fulfilled = (value) => {
|
|
35017
35040
|
try {
|
|
@@ -35034,7 +35057,7 @@ var __async$w = (__this, __arguments, generator) => {
|
|
|
35034
35057
|
const useConnectCarrierAccount = () => {
|
|
35035
35058
|
const { client } = useShipEngine();
|
|
35036
35059
|
return reactQuery.useMutation({
|
|
35037
|
-
mutationFn: (_0) => __async$
|
|
35060
|
+
mutationFn: (_0) => __async$x(void 0, [_0], function* ({ carrierName, formData }) {
|
|
35038
35061
|
const result = yield client.connections.connectCarrier(carrierName, formData);
|
|
35039
35062
|
return result.data;
|
|
35040
35063
|
}),
|
|
@@ -35064,7 +35087,7 @@ const useListCustomPackageTypes = () => {
|
|
|
35064
35087
|
});
|
|
35065
35088
|
};
|
|
35066
35089
|
|
|
35067
|
-
var __async$
|
|
35090
|
+
var __async$w = (__this, __arguments, generator) => {
|
|
35068
35091
|
return new Promise((resolve, reject) => {
|
|
35069
35092
|
var fulfilled = (value) => {
|
|
35070
35093
|
try {
|
|
@@ -35087,7 +35110,7 @@ var __async$v = (__this, __arguments, generator) => {
|
|
|
35087
35110
|
const useCreateFundingSource = () => {
|
|
35088
35111
|
const { client } = useShipEngine();
|
|
35089
35112
|
return reactQuery.useMutation({
|
|
35090
|
-
mutationFn: (fundingSource) => __async$
|
|
35113
|
+
mutationFn: (fundingSource) => __async$w(void 0, null, function* () {
|
|
35091
35114
|
const result = yield client.fundingSources.create(fundingSource);
|
|
35092
35115
|
return result.data;
|
|
35093
35116
|
}),
|
|
@@ -35096,7 +35119,7 @@ const useCreateFundingSource = () => {
|
|
|
35096
35119
|
});
|
|
35097
35120
|
};
|
|
35098
35121
|
|
|
35099
|
-
var __async$
|
|
35122
|
+
var __async$v = (__this, __arguments, generator) => {
|
|
35100
35123
|
return new Promise((resolve, reject) => {
|
|
35101
35124
|
var fulfilled = (value) => {
|
|
35102
35125
|
try {
|
|
@@ -35119,7 +35142,7 @@ var __async$u = (__this, __arguments, generator) => {
|
|
|
35119
35142
|
const useFundingSourcesAddFunds = () => {
|
|
35120
35143
|
const { client } = useShipEngine();
|
|
35121
35144
|
return reactQuery.useMutation({
|
|
35122
|
-
mutationFn: (_0) => __async$
|
|
35145
|
+
mutationFn: (_0) => __async$v(void 0, [_0], function* ({ funds, fundingSourceId }) {
|
|
35123
35146
|
const result = yield client.fundingSources.addFunds(funds, fundingSourceId);
|
|
35124
35147
|
return result.data;
|
|
35125
35148
|
}),
|
|
@@ -35148,7 +35171,7 @@ const useListFundingSources = () => {
|
|
|
35148
35171
|
});
|
|
35149
35172
|
};
|
|
35150
35173
|
|
|
35151
|
-
var __async$
|
|
35174
|
+
var __async$u = (__this, __arguments, generator) => {
|
|
35152
35175
|
return new Promise((resolve, reject) => {
|
|
35153
35176
|
var fulfilled = (value) => {
|
|
35154
35177
|
try {
|
|
@@ -35171,7 +35194,7 @@ var __async$t = (__this, __arguments, generator) => {
|
|
|
35171
35194
|
const useRegisterCarrier = () => {
|
|
35172
35195
|
const { client } = useShipEngine();
|
|
35173
35196
|
return reactQuery.useMutation({
|
|
35174
|
-
mutationFn: (carrier) => __async$
|
|
35197
|
+
mutationFn: (carrier) => __async$u(void 0, null, function* () {
|
|
35175
35198
|
const result = yield client.fundingSources.registerCarrier(carrier);
|
|
35176
35199
|
return result.data;
|
|
35177
35200
|
}),
|
|
@@ -35180,7 +35203,7 @@ const useRegisterCarrier = () => {
|
|
|
35180
35203
|
});
|
|
35181
35204
|
};
|
|
35182
35205
|
|
|
35183
|
-
var __async$
|
|
35206
|
+
var __async$t = (__this, __arguments, generator) => {
|
|
35184
35207
|
return new Promise((resolve, reject) => {
|
|
35185
35208
|
var fulfilled = (value) => {
|
|
35186
35209
|
try {
|
|
@@ -35203,7 +35226,7 @@ var __async$s = (__this, __arguments, generator) => {
|
|
|
35203
35226
|
const useUpdateFundingSource = () => {
|
|
35204
35227
|
const { client } = useShipEngine();
|
|
35205
35228
|
return reactQuery.useMutation({
|
|
35206
|
-
mutationFn: (_0) => __async$
|
|
35229
|
+
mutationFn: (_0) => __async$t(void 0, [_0], function* ({
|
|
35207
35230
|
billingInfo,
|
|
35208
35231
|
creditCardInfo,
|
|
35209
35232
|
fundingSourceId
|
|
@@ -35282,7 +35305,7 @@ var __objRest$9 = (source, exclude) => {
|
|
|
35282
35305
|
}
|
|
35283
35306
|
return target;
|
|
35284
35307
|
};
|
|
35285
|
-
var __async$
|
|
35308
|
+
var __async$s = (__this, __arguments, generator) => {
|
|
35286
35309
|
return new Promise((resolve, reject) => {
|
|
35287
35310
|
var fulfilled = (value) => {
|
|
35288
35311
|
try {
|
|
@@ -35305,7 +35328,7 @@ var __async$r = (__this, __arguments, generator) => {
|
|
|
35305
35328
|
const useAddInsuranceFunds = () => {
|
|
35306
35329
|
const { client } = useShipEngine();
|
|
35307
35330
|
return reactQuery.useMutation({
|
|
35308
|
-
mutationFn: (_a) => __async$
|
|
35331
|
+
mutationFn: (_a) => __async$s(void 0, null, function* () {
|
|
35309
35332
|
var _b = _a, { insuranceProvider } = _b, rest = __objRest$9(_b, ["insuranceProvider"]);
|
|
35310
35333
|
const result = yield client.insurance.addFunds(insuranceProvider, rest);
|
|
35311
35334
|
return result.data;
|
|
@@ -35330,7 +35353,7 @@ var __objRest$8 = (source, exclude) => {
|
|
|
35330
35353
|
}
|
|
35331
35354
|
return target;
|
|
35332
35355
|
};
|
|
35333
|
-
var __async$
|
|
35356
|
+
var __async$r = (__this, __arguments, generator) => {
|
|
35334
35357
|
return new Promise((resolve, reject) => {
|
|
35335
35358
|
var fulfilled = (value) => {
|
|
35336
35359
|
try {
|
|
@@ -35353,7 +35376,7 @@ var __async$q = (__this, __arguments, generator) => {
|
|
|
35353
35376
|
const useCreateLabel = () => {
|
|
35354
35377
|
const { client } = useShipEngine();
|
|
35355
35378
|
return reactQuery.useMutation({
|
|
35356
|
-
mutationFn: (_a) => __async$
|
|
35379
|
+
mutationFn: (_a) => __async$r(void 0, null, function* () {
|
|
35357
35380
|
var _b = _a, { rateId } = _b, options = __objRest$8(_b, ["rateId"]);
|
|
35358
35381
|
const result = yield client.labels.createByRateId(rateId, options);
|
|
35359
35382
|
return result.data;
|
|
@@ -35405,7 +35428,7 @@ const useListLabels = (_params) => {
|
|
|
35405
35428
|
});
|
|
35406
35429
|
};
|
|
35407
35430
|
|
|
35408
|
-
var __async$
|
|
35431
|
+
var __async$q = (__this, __arguments, generator) => {
|
|
35409
35432
|
return new Promise((resolve, reject) => {
|
|
35410
35433
|
var fulfilled = (value) => {
|
|
35411
35434
|
try {
|
|
@@ -35428,7 +35451,7 @@ var __async$p = (__this, __arguments, generator) => {
|
|
|
35428
35451
|
const useVoidLabel = () => {
|
|
35429
35452
|
const { client } = useShipEngine();
|
|
35430
35453
|
return reactQuery.useMutation({
|
|
35431
|
-
mutationFn: (labelId) => __async$
|
|
35454
|
+
mutationFn: (labelId) => __async$q(void 0, null, function* () {
|
|
35432
35455
|
const result = yield client.labels.void(labelId);
|
|
35433
35456
|
return result.data;
|
|
35434
35457
|
}),
|
|
@@ -35447,7 +35470,7 @@ const useListOrderSources = () => {
|
|
|
35447
35470
|
});
|
|
35448
35471
|
};
|
|
35449
35472
|
|
|
35450
|
-
var __async$
|
|
35473
|
+
var __async$p = (__this, __arguments, generator) => {
|
|
35451
35474
|
return new Promise((resolve, reject) => {
|
|
35452
35475
|
var fulfilled = (value) => {
|
|
35453
35476
|
try {
|
|
@@ -35470,7 +35493,7 @@ var __async$o = (__this, __arguments, generator) => {
|
|
|
35470
35493
|
const useRefreshOrderSourceAsync = () => {
|
|
35471
35494
|
const { client } = useShipEngine();
|
|
35472
35495
|
return reactQuery.useMutation({
|
|
35473
|
-
mutationFn: (orderSourceId) => __async$
|
|
35496
|
+
mutationFn: (orderSourceId) => __async$p(void 0, null, function* () {
|
|
35474
35497
|
const result = yield client.orderSources.refresh(orderSourceId);
|
|
35475
35498
|
return result.data;
|
|
35476
35499
|
}),
|
|
@@ -35481,9 +35504,9 @@ const useRefreshOrderSource = () => {
|
|
|
35481
35504
|
const { client } = useShipEngine();
|
|
35482
35505
|
const { mutateAsync: refreshOrderSourceAsync } = useRefreshOrderSourceAsync();
|
|
35483
35506
|
return reactQuery.useMutation({
|
|
35484
|
-
mutationFn: (orderSourceId) => __async$
|
|
35507
|
+
mutationFn: (orderSourceId) => __async$p(void 0, null, function* () {
|
|
35485
35508
|
yield refreshOrderSourceAsync(orderSourceId);
|
|
35486
|
-
const waitResult = yield retryUntil(() => __async$
|
|
35509
|
+
const waitResult = yield retryUntil(() => __async$p(void 0, null, function* () {
|
|
35487
35510
|
const { data: checkResult } = yield client.orderSources.get(orderSourceId);
|
|
35488
35511
|
if (["preparing_update", "updating"].includes(checkResult.refreshInfo.status)) {
|
|
35489
35512
|
throw new CodedError("Order source is still refreshing");
|
|
@@ -35497,7 +35520,7 @@ const useRefreshOrderSource = () => {
|
|
|
35497
35520
|
});
|
|
35498
35521
|
};
|
|
35499
35522
|
|
|
35500
|
-
var __async$
|
|
35523
|
+
var __async$o = (__this, __arguments, generator) => {
|
|
35501
35524
|
return new Promise((resolve, reject) => {
|
|
35502
35525
|
var fulfilled = (value) => {
|
|
35503
35526
|
try {
|
|
@@ -35520,7 +35543,7 @@ var __async$n = (__this, __arguments, generator) => {
|
|
|
35520
35543
|
const useDeactivateOrderSource = () => {
|
|
35521
35544
|
const { client } = useShipEngine();
|
|
35522
35545
|
return reactQuery.useMutation({
|
|
35523
|
-
mutationFn: (orderSourceId) => __async$
|
|
35546
|
+
mutationFn: (orderSourceId) => __async$o(void 0, null, function* () {
|
|
35524
35547
|
const result = yield client.orderSources.deactivate(orderSourceId);
|
|
35525
35548
|
return result.data;
|
|
35526
35549
|
}),
|
|
@@ -35529,7 +35552,7 @@ const useDeactivateOrderSource = () => {
|
|
|
35529
35552
|
});
|
|
35530
35553
|
};
|
|
35531
35554
|
|
|
35532
|
-
var __async$
|
|
35555
|
+
var __async$n = (__this, __arguments, generator) => {
|
|
35533
35556
|
return new Promise((resolve, reject) => {
|
|
35534
35557
|
var fulfilled = (value) => {
|
|
35535
35558
|
try {
|
|
@@ -35552,7 +35575,7 @@ var __async$m = (__this, __arguments, generator) => {
|
|
|
35552
35575
|
const useCreateRateCard = () => {
|
|
35553
35576
|
const { client } = useShipEngine();
|
|
35554
35577
|
return reactQuery.useMutation({
|
|
35555
|
-
mutationFn: (rateCard) => __async$
|
|
35578
|
+
mutationFn: (rateCard) => __async$n(void 0, null, function* () {
|
|
35556
35579
|
const result = yield client.rateCards.create(rateCard);
|
|
35557
35580
|
return result.data;
|
|
35558
35581
|
}),
|
|
@@ -35599,7 +35622,7 @@ const useListRateCards = (carrierIds) => {
|
|
|
35599
35622
|
});
|
|
35600
35623
|
};
|
|
35601
35624
|
|
|
35602
|
-
var __async$
|
|
35625
|
+
var __async$m = (__this, __arguments, generator) => {
|
|
35603
35626
|
return new Promise((resolve, reject) => {
|
|
35604
35627
|
var fulfilled = (value) => {
|
|
35605
35628
|
try {
|
|
@@ -35622,7 +35645,7 @@ var __async$l = (__this, __arguments, generator) => {
|
|
|
35622
35645
|
const usePublishRateCard = () => {
|
|
35623
35646
|
const { client } = useShipEngine();
|
|
35624
35647
|
return reactQuery.useMutation({
|
|
35625
|
-
mutationFn: (rateCardId) => __async$
|
|
35648
|
+
mutationFn: (rateCardId) => __async$m(void 0, null, function* () {
|
|
35626
35649
|
return yield client.rateCards.publish(rateCardId);
|
|
35627
35650
|
}),
|
|
35628
35651
|
mutationKey: ["usePublishRateCard"],
|
|
@@ -35630,7 +35653,7 @@ const usePublishRateCard = () => {
|
|
|
35630
35653
|
});
|
|
35631
35654
|
};
|
|
35632
35655
|
|
|
35633
|
-
var __async$
|
|
35656
|
+
var __async$l = (__this, __arguments, generator) => {
|
|
35634
35657
|
return new Promise((resolve, reject) => {
|
|
35635
35658
|
var fulfilled = (value) => {
|
|
35636
35659
|
try {
|
|
@@ -35653,7 +35676,7 @@ var __async$k = (__this, __arguments, generator) => {
|
|
|
35653
35676
|
const useUpdateRateCard = () => {
|
|
35654
35677
|
const { client } = useShipEngine();
|
|
35655
35678
|
return reactQuery.useMutation({
|
|
35656
|
-
mutationFn: (rateCard) => __async$
|
|
35679
|
+
mutationFn: (rateCard) => __async$l(void 0, null, function* () {
|
|
35657
35680
|
const result = yield client.rateCards.update(rateCard);
|
|
35658
35681
|
return result.data;
|
|
35659
35682
|
}),
|
|
@@ -35662,7 +35685,7 @@ const useUpdateRateCard = () => {
|
|
|
35662
35685
|
});
|
|
35663
35686
|
};
|
|
35664
35687
|
|
|
35665
|
-
var __async$
|
|
35688
|
+
var __async$k = (__this, __arguments, generator) => {
|
|
35666
35689
|
return new Promise((resolve, reject) => {
|
|
35667
35690
|
var fulfilled = (value) => {
|
|
35668
35691
|
try {
|
|
@@ -35685,7 +35708,7 @@ var __async$j = (__this, __arguments, generator) => {
|
|
|
35685
35708
|
const useUploadRateCard = () => {
|
|
35686
35709
|
const { client } = useShipEngine();
|
|
35687
35710
|
return reactQuery.useMutation({
|
|
35688
|
-
mutationFn: (_0) => __async$
|
|
35711
|
+
mutationFn: (_0) => __async$k(void 0, [_0], function* ({ rateCardId, file }) {
|
|
35689
35712
|
const result = yield client.rateCards.upload(rateCardId, file);
|
|
35690
35713
|
return result.data;
|
|
35691
35714
|
}),
|
|
@@ -35694,7 +35717,7 @@ const useUploadRateCard = () => {
|
|
|
35694
35717
|
});
|
|
35695
35718
|
};
|
|
35696
35719
|
|
|
35697
|
-
var __async$
|
|
35720
|
+
var __async$j = (__this, __arguments, generator) => {
|
|
35698
35721
|
return new Promise((resolve, reject) => {
|
|
35699
35722
|
var fulfilled = (value) => {
|
|
35700
35723
|
try {
|
|
@@ -35717,7 +35740,7 @@ var __async$i = (__this, __arguments, generator) => {
|
|
|
35717
35740
|
const useDeleteRateCard = () => {
|
|
35718
35741
|
const { client } = useShipEngine();
|
|
35719
35742
|
return reactQuery.useMutation({
|
|
35720
|
-
mutationFn: (rateCardId) => __async$
|
|
35743
|
+
mutationFn: (rateCardId) => __async$j(void 0, null, function* () {
|
|
35721
35744
|
const result = yield client.rateCards.delete(rateCardId);
|
|
35722
35745
|
return result.data;
|
|
35723
35746
|
}),
|
|
@@ -35726,7 +35749,7 @@ const useDeleteRateCard = () => {
|
|
|
35726
35749
|
});
|
|
35727
35750
|
};
|
|
35728
35751
|
|
|
35729
|
-
var __async$
|
|
35752
|
+
var __async$i = (__this, __arguments, generator) => {
|
|
35730
35753
|
return new Promise((resolve, reject) => {
|
|
35731
35754
|
var fulfilled = (value) => {
|
|
35732
35755
|
try {
|
|
@@ -35749,7 +35772,7 @@ var __async$h = (__this, __arguments, generator) => {
|
|
|
35749
35772
|
const useCalculateRates = () => {
|
|
35750
35773
|
const { client } = useShipEngine();
|
|
35751
35774
|
return reactQuery.useMutation({
|
|
35752
|
-
mutationFn: (_0) => __async$
|
|
35775
|
+
mutationFn: (_0) => __async$i(void 0, [_0], function* ({ rateOptions, shipmentId }) {
|
|
35753
35776
|
const result = yield client.rates.calculateByShipmentId(shipmentId, rateOptions);
|
|
35754
35777
|
return result.data;
|
|
35755
35778
|
}),
|
|
@@ -35758,6 +35781,38 @@ const useCalculateRates = () => {
|
|
|
35758
35781
|
});
|
|
35759
35782
|
};
|
|
35760
35783
|
|
|
35784
|
+
var __async$h = (__this, __arguments, generator) => {
|
|
35785
|
+
return new Promise((resolve, reject) => {
|
|
35786
|
+
var fulfilled = (value) => {
|
|
35787
|
+
try {
|
|
35788
|
+
step(generator.next(value));
|
|
35789
|
+
} catch (e) {
|
|
35790
|
+
reject(e);
|
|
35791
|
+
}
|
|
35792
|
+
};
|
|
35793
|
+
var rejected = (value) => {
|
|
35794
|
+
try {
|
|
35795
|
+
step(generator.throw(value));
|
|
35796
|
+
} catch (e) {
|
|
35797
|
+
reject(e);
|
|
35798
|
+
}
|
|
35799
|
+
};
|
|
35800
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
35801
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
35802
|
+
});
|
|
35803
|
+
};
|
|
35804
|
+
const useRatesEstimate = () => {
|
|
35805
|
+
const { client } = useShipEngine();
|
|
35806
|
+
return reactQuery.useMutation({
|
|
35807
|
+
mutationFn: (_0) => __async$h(void 0, [_0], function* ({ rateParams }) {
|
|
35808
|
+
const result = yield client.rates.estimate(rateParams);
|
|
35809
|
+
return result.data;
|
|
35810
|
+
}),
|
|
35811
|
+
mutationKey: ["useRatesEstimate"],
|
|
35812
|
+
onError
|
|
35813
|
+
});
|
|
35814
|
+
};
|
|
35815
|
+
|
|
35761
35816
|
const useGetSalesOrder = (salesOrderId) => {
|
|
35762
35817
|
const { client } = useShipEngine();
|
|
35763
35818
|
return reactQuery.useQuery({
|
|
@@ -38010,6 +38065,7 @@ exports.useLoadIcons = useLoadIcons;
|
|
|
38010
38065
|
exports.useNotifySalesOrderShipped = useNotifySalesOrderShipped;
|
|
38011
38066
|
exports.useParseAddress = useParseAddress;
|
|
38012
38067
|
exports.usePublishRateCard = usePublishRateCard;
|
|
38068
|
+
exports.useRatesEstimate = useRatesEstimate;
|
|
38013
38069
|
exports.useRefreshOrderSource = useRefreshOrderSource;
|
|
38014
38070
|
exports.useRefreshOrderSourceAsync = useRefreshOrderSourceAsync;
|
|
38015
38071
|
exports.useRegisterCarrier = useRegisterCarrier;
|