@shipengine/alchemy 6.0.13 → 6.0.15
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 +372 -309
- package/index.mjs +372 -310
- 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$B = Object.getOwnPropertySymbols;
|
|
10816
|
+
var __hasOwnProp$B = Object.prototype.hasOwnProperty;
|
|
10817
|
+
var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
|
|
10818
10818
|
var __objRest$n = (source, exclude) => {
|
|
10819
10819
|
var target = {};
|
|
10820
10820
|
for (var prop in source)
|
|
10821
|
-
if (__hasOwnProp$
|
|
10821
|
+
if (__hasOwnProp$B.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$B)
|
|
10824
|
+
for (var prop of __getOwnPropSymbols$B(source)) {
|
|
10825
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$B.call(source, prop))
|
|
10826
10826
|
target[prop] = source[prop];
|
|
10827
10827
|
}
|
|
10828
10828
|
return target;
|
|
@@ -10955,17 +10955,17 @@ const types = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
10955
10955
|
RateCardStatus
|
|
10956
10956
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
10957
10957
|
|
|
10958
|
-
var __getOwnPropSymbols$
|
|
10959
|
-
var __hasOwnProp$
|
|
10960
|
-
var __propIsEnum$
|
|
10958
|
+
var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
|
|
10959
|
+
var __hasOwnProp$A = Object.prototype.hasOwnProperty;
|
|
10960
|
+
var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
|
|
10961
10961
|
var __objRest$m = (source, exclude) => {
|
|
10962
10962
|
var target = {};
|
|
10963
10963
|
for (var prop in source)
|
|
10964
|
-
if (__hasOwnProp$
|
|
10964
|
+
if (__hasOwnProp$A.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
10965
10965
|
target[prop] = source[prop];
|
|
10966
|
-
if (source != null && __getOwnPropSymbols$
|
|
10967
|
-
for (var prop of __getOwnPropSymbols$
|
|
10968
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
10966
|
+
if (source != null && __getOwnPropSymbols$A)
|
|
10967
|
+
for (var prop of __getOwnPropSymbols$A(source)) {
|
|
10968
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$A.call(source, prop))
|
|
10969
10969
|
target[prop] = source[prop];
|
|
10970
10970
|
}
|
|
10971
10971
|
return target;
|
|
@@ -13707,7 +13707,7 @@ var ipaddr = {
|
|
|
13707
13707
|
}).call(commonjsGlobal);
|
|
13708
13708
|
} (ipaddr));
|
|
13709
13709
|
|
|
13710
|
-
var __async$
|
|
13710
|
+
var __async$T = (__this, __arguments, generator) => {
|
|
13711
13711
|
return new Promise((resolve, reject) => {
|
|
13712
13712
|
var fulfilled = (value) => {
|
|
13713
13713
|
try {
|
|
@@ -13727,7 +13727,7 @@ var __async$S = (__this, __arguments, generator) => {
|
|
|
13727
13727
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
13728
13728
|
});
|
|
13729
13729
|
};
|
|
13730
|
-
const getEndUserIpAddress = () => __async$
|
|
13730
|
+
const getEndUserIpAddress = () => __async$T(void 0, null, function* () {
|
|
13731
13731
|
try {
|
|
13732
13732
|
const response = yield axios.get("https://api.ipify.org/?format=json");
|
|
13733
13733
|
if (response.data.ip && ipaddrExports.isValid(response.data.ip)) {
|
|
@@ -13739,38 +13739,38 @@ const getEndUserIpAddress = () => __async$S(void 0, null, function* () {
|
|
|
13739
13739
|
}
|
|
13740
13740
|
});
|
|
13741
13741
|
|
|
13742
|
-
var __defProp$
|
|
13743
|
-
var __defProps$
|
|
13744
|
-
var __getOwnPropDescs$
|
|
13745
|
-
var __getOwnPropSymbols$
|
|
13746
|
-
var __hasOwnProp$
|
|
13747
|
-
var __propIsEnum$
|
|
13748
|
-
var __defNormalProp$
|
|
13749
|
-
var __spreadValues$
|
|
13742
|
+
var __defProp$p = Object.defineProperty;
|
|
13743
|
+
var __defProps$j = Object.defineProperties;
|
|
13744
|
+
var __getOwnPropDescs$j = Object.getOwnPropertyDescriptors;
|
|
13745
|
+
var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
|
|
13746
|
+
var __hasOwnProp$z = Object.prototype.hasOwnProperty;
|
|
13747
|
+
var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
|
|
13748
|
+
var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13749
|
+
var __spreadValues$p = (a, b) => {
|
|
13750
13750
|
for (var prop in b || (b = {}))
|
|
13751
|
-
if (__hasOwnProp$
|
|
13752
|
-
__defNormalProp$
|
|
13753
|
-
if (__getOwnPropSymbols$
|
|
13754
|
-
for (var prop of __getOwnPropSymbols$
|
|
13755
|
-
if (__propIsEnum$
|
|
13756
|
-
__defNormalProp$
|
|
13751
|
+
if (__hasOwnProp$z.call(b, prop))
|
|
13752
|
+
__defNormalProp$p(a, prop, b[prop]);
|
|
13753
|
+
if (__getOwnPropSymbols$z)
|
|
13754
|
+
for (var prop of __getOwnPropSymbols$z(b)) {
|
|
13755
|
+
if (__propIsEnum$z.call(b, prop))
|
|
13756
|
+
__defNormalProp$p(a, prop, b[prop]);
|
|
13757
13757
|
}
|
|
13758
13758
|
return a;
|
|
13759
13759
|
};
|
|
13760
|
-
var __spreadProps$
|
|
13760
|
+
var __spreadProps$j = (a, b) => __defProps$j(a, __getOwnPropDescs$j(b));
|
|
13761
13761
|
var __objRest$l = (source, exclude) => {
|
|
13762
13762
|
var target = {};
|
|
13763
13763
|
for (var prop in source)
|
|
13764
|
-
if (__hasOwnProp$
|
|
13764
|
+
if (__hasOwnProp$z.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
13765
13765
|
target[prop] = source[prop];
|
|
13766
|
-
if (source != null && __getOwnPropSymbols$
|
|
13767
|
-
for (var prop of __getOwnPropSymbols$
|
|
13768
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
13766
|
+
if (source != null && __getOwnPropSymbols$z)
|
|
13767
|
+
for (var prop of __getOwnPropSymbols$z(source)) {
|
|
13768
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$z.call(source, prop))
|
|
13769
13769
|
target[prop] = source[prop];
|
|
13770
13770
|
}
|
|
13771
13771
|
return target;
|
|
13772
13772
|
};
|
|
13773
|
-
var __async$
|
|
13773
|
+
var __async$S = (__this, __arguments, generator) => {
|
|
13774
13774
|
return new Promise((resolve, reject) => {
|
|
13775
13775
|
var fulfilled = (value) => {
|
|
13776
13776
|
try {
|
|
@@ -13810,12 +13810,12 @@ class CarriersAPI {
|
|
|
13810
13810
|
/**
|
|
13811
13811
|
* The `connect` method connects a carrier account to a user's ShipEngine account.
|
|
13812
13812
|
*/
|
|
13813
|
-
this.connect = (_a) => __async$
|
|
13813
|
+
this.connect = (_a) => __async$S(this, null, function* () {
|
|
13814
13814
|
var _b = _a, { carrierCode } = _b, connection = __objRest$l(_b, ["carrierCode"]);
|
|
13815
13815
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
13816
13816
|
if (!endUserIpAddress)
|
|
13817
13817
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
13818
|
-
return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$
|
|
13818
|
+
return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$j(__spreadValues$p({}, connection), {
|
|
13819
13819
|
endUserIpAddress
|
|
13820
13820
|
}));
|
|
13821
13821
|
});
|
|
@@ -13901,7 +13901,7 @@ class CarriersAPI {
|
|
|
13901
13901
|
}
|
|
13902
13902
|
}
|
|
13903
13903
|
|
|
13904
|
-
var __async$
|
|
13904
|
+
var __async$R = (__this, __arguments, generator) => {
|
|
13905
13905
|
return new Promise((resolve, reject) => {
|
|
13906
13906
|
var fulfilled = (value) => {
|
|
13907
13907
|
try {
|
|
@@ -13943,7 +13943,7 @@ class ConnectionsAPI {
|
|
|
13943
13943
|
/**
|
|
13944
13944
|
* The `connectCarrier` method connects a carrier to account.
|
|
13945
13945
|
*/
|
|
13946
|
-
this.connectCarrier = (carrierName, formData) => __async$
|
|
13946
|
+
this.connectCarrier = (carrierName, formData) => __async$R(this, null, function* () {
|
|
13947
13947
|
return yield this.client.post(
|
|
13948
13948
|
`/v1/connections/carriers/${carrierName}`,
|
|
13949
13949
|
formData,
|
|
@@ -16256,23 +16256,23 @@ class CustomPackagesAPI {
|
|
|
16256
16256
|
}
|
|
16257
16257
|
}
|
|
16258
16258
|
|
|
16259
|
-
var __defProp$
|
|
16260
|
-
var __getOwnPropSymbols$
|
|
16261
|
-
var __hasOwnProp$
|
|
16262
|
-
var __propIsEnum$
|
|
16263
|
-
var __defNormalProp$
|
|
16264
|
-
var __spreadValues$
|
|
16259
|
+
var __defProp$o = Object.defineProperty;
|
|
16260
|
+
var __getOwnPropSymbols$y = Object.getOwnPropertySymbols;
|
|
16261
|
+
var __hasOwnProp$y = Object.prototype.hasOwnProperty;
|
|
16262
|
+
var __propIsEnum$y = Object.prototype.propertyIsEnumerable;
|
|
16263
|
+
var __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16264
|
+
var __spreadValues$o = (a, b) => {
|
|
16265
16265
|
for (var prop in b || (b = {}))
|
|
16266
|
-
if (__hasOwnProp$
|
|
16267
|
-
__defNormalProp$
|
|
16268
|
-
if (__getOwnPropSymbols$
|
|
16269
|
-
for (var prop of __getOwnPropSymbols$
|
|
16270
|
-
if (__propIsEnum$
|
|
16271
|
-
__defNormalProp$
|
|
16266
|
+
if (__hasOwnProp$y.call(b, prop))
|
|
16267
|
+
__defNormalProp$o(a, prop, b[prop]);
|
|
16268
|
+
if (__getOwnPropSymbols$y)
|
|
16269
|
+
for (var prop of __getOwnPropSymbols$y(b)) {
|
|
16270
|
+
if (__propIsEnum$y.call(b, prop))
|
|
16271
|
+
__defNormalProp$o(a, prop, b[prop]);
|
|
16272
16272
|
}
|
|
16273
16273
|
return a;
|
|
16274
16274
|
};
|
|
16275
|
-
var __async$
|
|
16275
|
+
var __async$Q = (__this, __arguments, generator) => {
|
|
16276
16276
|
return new Promise((resolve, reject) => {
|
|
16277
16277
|
var fulfilled = (value) => {
|
|
16278
16278
|
try {
|
|
@@ -16311,12 +16311,12 @@ class FundingSourcesAPI {
|
|
|
16311
16311
|
* The `create` method creates a new funding source for a given user. This requires
|
|
16312
16312
|
* payment information to be collected from the user.
|
|
16313
16313
|
*/
|
|
16314
|
-
this.create = (createFundingSource) => __async$
|
|
16314
|
+
this.create = (createFundingSource) => __async$Q(this, null, function* () {
|
|
16315
16315
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16316
16316
|
if (!endUserIpAddress) {
|
|
16317
16317
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
16318
16318
|
}
|
|
16319
|
-
return yield this.client.post("/v1/funding_sources", __spreadValues$
|
|
16319
|
+
return yield this.client.post("/v1/funding_sources", __spreadValues$o({
|
|
16320
16320
|
endUserIpAddress
|
|
16321
16321
|
}, createFundingSource));
|
|
16322
16322
|
});
|
|
@@ -16325,7 +16325,7 @@ class FundingSourcesAPI {
|
|
|
16325
16325
|
* user to update the billing address or payment information associated with the
|
|
16326
16326
|
* funding source.
|
|
16327
16327
|
*/
|
|
16328
|
-
this.update = (billingInfo, creditCardInfo, fundingSourceId) => __async$
|
|
16328
|
+
this.update = (billingInfo, creditCardInfo, fundingSourceId) => __async$Q(this, null, function* () {
|
|
16329
16329
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16330
16330
|
if (!endUserIpAddress) {
|
|
16331
16331
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
@@ -16343,19 +16343,19 @@ class FundingSourcesAPI {
|
|
|
16343
16343
|
* The `registerCarrier` method registers a carrier account and associates
|
|
16344
16344
|
* it with a given funding source.
|
|
16345
16345
|
*/
|
|
16346
|
-
this.registerCarrier = (carrier) => __async$
|
|
16346
|
+
this.registerCarrier = (carrier) => __async$Q(this, null, function* () {
|
|
16347
16347
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16348
16348
|
if (!endUserIpAddress) {
|
|
16349
16349
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
16350
16350
|
}
|
|
16351
|
-
return yield this.client.post("/v1/registration/funding_source", __spreadValues$
|
|
16351
|
+
return yield this.client.post("/v1/registration/funding_source", __spreadValues$o({
|
|
16352
16352
|
endUserIpAddress
|
|
16353
16353
|
}, carrier));
|
|
16354
16354
|
});
|
|
16355
16355
|
/**
|
|
16356
16356
|
* The `addFunds` method allows you to add funds to a funding source.
|
|
16357
16357
|
*/
|
|
16358
|
-
this.addFunds = (amount, fundingSourceId) => __async$
|
|
16358
|
+
this.addFunds = (amount, fundingSourceId) => __async$Q(this, null, function* () {
|
|
16359
16359
|
return yield this.client.put(
|
|
16360
16360
|
`/v1/funding_sources/${fundingSourceId}/add_funds`,
|
|
16361
16361
|
amount
|
|
@@ -16365,7 +16365,7 @@ class FundingSourcesAPI {
|
|
|
16365
16365
|
* The `metadata` method returns seller-specific requirements for creating funding sources
|
|
16366
16366
|
* and attaching carriers
|
|
16367
16367
|
*/
|
|
16368
|
-
this.metadata = () => __async$
|
|
16368
|
+
this.metadata = () => __async$Q(this, null, function* () {
|
|
16369
16369
|
return yield this.client.get("/v1/funding_sources/metadata");
|
|
16370
16370
|
});
|
|
16371
16371
|
/**
|
|
@@ -16561,19 +16561,19 @@ class RateCardsAPI {
|
|
|
16561
16561
|
}
|
|
16562
16562
|
}
|
|
16563
16563
|
|
|
16564
|
-
var __defProp$
|
|
16565
|
-
var __getOwnPropSymbols$
|
|
16566
|
-
var __hasOwnProp$
|
|
16567
|
-
var __propIsEnum$
|
|
16568
|
-
var __defNormalProp$
|
|
16569
|
-
var __spreadValues$
|
|
16564
|
+
var __defProp$n = Object.defineProperty;
|
|
16565
|
+
var __getOwnPropSymbols$x = Object.getOwnPropertySymbols;
|
|
16566
|
+
var __hasOwnProp$x = Object.prototype.hasOwnProperty;
|
|
16567
|
+
var __propIsEnum$x = Object.prototype.propertyIsEnumerable;
|
|
16568
|
+
var __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16569
|
+
var __spreadValues$n = (a, b) => {
|
|
16570
16570
|
for (var prop in b || (b = {}))
|
|
16571
|
-
if (__hasOwnProp$
|
|
16572
|
-
__defNormalProp$
|
|
16573
|
-
if (__getOwnPropSymbols$
|
|
16574
|
-
for (var prop of __getOwnPropSymbols$
|
|
16575
|
-
if (__propIsEnum$
|
|
16576
|
-
__defNormalProp$
|
|
16571
|
+
if (__hasOwnProp$x.call(b, prop))
|
|
16572
|
+
__defNormalProp$n(a, prop, b[prop]);
|
|
16573
|
+
if (__getOwnPropSymbols$x)
|
|
16574
|
+
for (var prop of __getOwnPropSymbols$x(b)) {
|
|
16575
|
+
if (__propIsEnum$x.call(b, prop))
|
|
16576
|
+
__defNormalProp$n(a, prop, b[prop]);
|
|
16577
16577
|
}
|
|
16578
16578
|
return a;
|
|
16579
16579
|
};
|
|
@@ -16595,7 +16595,7 @@ class RatesAPI {
|
|
|
16595
16595
|
* method.
|
|
16596
16596
|
*/
|
|
16597
16597
|
this.estimate = (params) => {
|
|
16598
|
-
return this.client.post("/v1/rates/estimate", __spreadValues$
|
|
16598
|
+
return this.client.post("/v1/rates/estimate", __spreadValues$n({}, params));
|
|
16599
16599
|
};
|
|
16600
16600
|
this.client = client;
|
|
16601
16601
|
}
|
|
@@ -16664,7 +16664,7 @@ class SalesOrdersAPI {
|
|
|
16664
16664
|
}
|
|
16665
16665
|
}
|
|
16666
16666
|
|
|
16667
|
-
var __async$
|
|
16667
|
+
var __async$P = (__this, __arguments, generator) => {
|
|
16668
16668
|
return new Promise((resolve, reject) => {
|
|
16669
16669
|
var fulfilled = (value) => {
|
|
16670
16670
|
try {
|
|
@@ -16722,7 +16722,7 @@ class SellersAPI {
|
|
|
16722
16722
|
/**
|
|
16723
16723
|
* Deletes an API Key
|
|
16724
16724
|
*/
|
|
16725
|
-
this.deleteSellerApiKey = (_0) => __async$
|
|
16725
|
+
this.deleteSellerApiKey = (_0) => __async$P(this, [_0], function* ({
|
|
16726
16726
|
encryptedApiKey,
|
|
16727
16727
|
sellerId,
|
|
16728
16728
|
isSandbox
|
|
@@ -16768,19 +16768,19 @@ class SellersAPI {
|
|
|
16768
16768
|
}
|
|
16769
16769
|
}
|
|
16770
16770
|
|
|
16771
|
-
var __defProp$
|
|
16772
|
-
var __getOwnPropSymbols$
|
|
16773
|
-
var __hasOwnProp$
|
|
16774
|
-
var __propIsEnum$
|
|
16775
|
-
var __defNormalProp$
|
|
16776
|
-
var __spreadValues$
|
|
16771
|
+
var __defProp$m = Object.defineProperty;
|
|
16772
|
+
var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
|
|
16773
|
+
var __hasOwnProp$w = Object.prototype.hasOwnProperty;
|
|
16774
|
+
var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
|
|
16775
|
+
var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16776
|
+
var __spreadValues$m = (a, b) => {
|
|
16777
16777
|
for (var prop in b || (b = {}))
|
|
16778
|
-
if (__hasOwnProp$
|
|
16779
|
-
__defNormalProp$
|
|
16780
|
-
if (__getOwnPropSymbols$
|
|
16781
|
-
for (var prop of __getOwnPropSymbols$
|
|
16782
|
-
if (__propIsEnum$
|
|
16783
|
-
__defNormalProp$
|
|
16778
|
+
if (__hasOwnProp$w.call(b, prop))
|
|
16779
|
+
__defNormalProp$m(a, prop, b[prop]);
|
|
16780
|
+
if (__getOwnPropSymbols$w)
|
|
16781
|
+
for (var prop of __getOwnPropSymbols$w(b)) {
|
|
16782
|
+
if (__propIsEnum$w.call(b, prop))
|
|
16783
|
+
__defNormalProp$m(a, prop, b[prop]);
|
|
16784
16784
|
}
|
|
16785
16785
|
return a;
|
|
16786
16786
|
};
|
|
@@ -16792,7 +16792,7 @@ class ServicePointsAPI {
|
|
|
16792
16792
|
* Either an address, coordinates, or an address query
|
|
16793
16793
|
*/
|
|
16794
16794
|
this.list = (options) => {
|
|
16795
|
-
return this.client.post("/v1/service_points/list", __spreadValues$
|
|
16795
|
+
return this.client.post("/v1/service_points/list", __spreadValues$m({}, options));
|
|
16796
16796
|
};
|
|
16797
16797
|
/**
|
|
16798
16798
|
* Get a specific service point by its carrier code, country code, and id
|
|
@@ -16810,7 +16810,7 @@ class ServicePointsAPI {
|
|
|
16810
16810
|
}
|
|
16811
16811
|
}
|
|
16812
16812
|
|
|
16813
|
-
var __async$
|
|
16813
|
+
var __async$O = (__this, __arguments, generator) => {
|
|
16814
16814
|
return new Promise((resolve, reject) => {
|
|
16815
16815
|
var fulfilled = (value) => {
|
|
16816
16816
|
try {
|
|
@@ -16859,11 +16859,22 @@ class ShipmentsAPI {
|
|
|
16859
16859
|
* The `create` method allows for creating shipments based on a list of shipment
|
|
16860
16860
|
* items passed into this method.
|
|
16861
16861
|
*/
|
|
16862
|
-
this.create = (...shipments) => __async$
|
|
16862
|
+
this.create = (...shipments) => __async$O(this, null, function* () {
|
|
16863
16863
|
return this.client.post("/v1/shipments", {
|
|
16864
16864
|
shipments
|
|
16865
16865
|
});
|
|
16866
16866
|
});
|
|
16867
|
+
/**
|
|
16868
|
+
* The `cancel` method by `shipmentId`
|
|
16869
|
+
* Marks a shipment cancelled, if it is no longer needed or being used by your organization.
|
|
16870
|
+
* Any label associated with the shipment needs to be voided first
|
|
16871
|
+
* An example use case would be if a batch label creation job is going to run at a set time and only queries pending shipments.
|
|
16872
|
+
* Marking a shipment as cancelled would remove it from this process
|
|
16873
|
+
* https://shipengine.github.io/shipengine-openapi/#operation/cancel_shipments
|
|
16874
|
+
*/
|
|
16875
|
+
this.cancel = (shipmentId) => {
|
|
16876
|
+
return this.client.put(`/v1/shipments/${shipmentId}/cancel`);
|
|
16877
|
+
};
|
|
16867
16878
|
this.client = client;
|
|
16868
16879
|
}
|
|
16869
16880
|
}
|
|
@@ -34240,26 +34251,26 @@ class WebhooksAPI {
|
|
|
34240
34251
|
}
|
|
34241
34252
|
}
|
|
34242
34253
|
|
|
34243
|
-
var __defProp$
|
|
34244
|
-
var __defProps$
|
|
34245
|
-
var __getOwnPropDescs$
|
|
34246
|
-
var __getOwnPropSymbols$
|
|
34247
|
-
var __hasOwnProp$
|
|
34248
|
-
var __propIsEnum$
|
|
34249
|
-
var __defNormalProp$
|
|
34250
|
-
var __spreadValues$
|
|
34254
|
+
var __defProp$l = Object.defineProperty;
|
|
34255
|
+
var __defProps$i = Object.defineProperties;
|
|
34256
|
+
var __getOwnPropDescs$i = Object.getOwnPropertyDescriptors;
|
|
34257
|
+
var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
|
|
34258
|
+
var __hasOwnProp$v = Object.prototype.hasOwnProperty;
|
|
34259
|
+
var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
|
|
34260
|
+
var __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
34261
|
+
var __spreadValues$l = (a, b) => {
|
|
34251
34262
|
for (var prop in b || (b = {}))
|
|
34252
|
-
if (__hasOwnProp$
|
|
34253
|
-
__defNormalProp$
|
|
34254
|
-
if (__getOwnPropSymbols$
|
|
34255
|
-
for (var prop of __getOwnPropSymbols$
|
|
34256
|
-
if (__propIsEnum$
|
|
34257
|
-
__defNormalProp$
|
|
34263
|
+
if (__hasOwnProp$v.call(b, prop))
|
|
34264
|
+
__defNormalProp$l(a, prop, b[prop]);
|
|
34265
|
+
if (__getOwnPropSymbols$v)
|
|
34266
|
+
for (var prop of __getOwnPropSymbols$v(b)) {
|
|
34267
|
+
if (__propIsEnum$v.call(b, prop))
|
|
34268
|
+
__defNormalProp$l(a, prop, b[prop]);
|
|
34258
34269
|
}
|
|
34259
34270
|
return a;
|
|
34260
34271
|
};
|
|
34261
|
-
var __spreadProps$
|
|
34262
|
-
var __async$
|
|
34272
|
+
var __spreadProps$i = (a, b) => __defProps$i(a, __getOwnPropDescs$i(b));
|
|
34273
|
+
var __async$N = (__this, __arguments, generator) => {
|
|
34263
34274
|
return new Promise((resolve, reject) => {
|
|
34264
34275
|
var fulfilled = (value) => {
|
|
34265
34276
|
try {
|
|
@@ -34282,7 +34293,7 @@ var __async$M = (__this, __arguments, generator) => {
|
|
|
34282
34293
|
const logger$1 = E({
|
|
34283
34294
|
level: process.env.NODE_ENV === "production" ? "fatal" : "info",
|
|
34284
34295
|
name: "shipengine-api",
|
|
34285
|
-
serializers: __spreadProps$
|
|
34296
|
+
serializers: __spreadProps$i(__spreadValues$l({}, k), {
|
|
34286
34297
|
req: (req) => ({
|
|
34287
34298
|
headers: req.headers,
|
|
34288
34299
|
method: req.method,
|
|
@@ -34307,7 +34318,7 @@ class ShipEngineAPI {
|
|
|
34307
34318
|
this.getSandboxToken = getSandboxToken;
|
|
34308
34319
|
const client = axios.create({
|
|
34309
34320
|
baseURL,
|
|
34310
|
-
headers: __spreadProps$
|
|
34321
|
+
headers: __spreadProps$i(__spreadValues$l({}, headers), {
|
|
34311
34322
|
"Content-Type": "application/json"
|
|
34312
34323
|
}),
|
|
34313
34324
|
paramsSerializer: (params) => lib.stringify(humpsExports.decamelizeKeys(params), { arrayFormat: "brackets" }),
|
|
@@ -34342,7 +34353,7 @@ class ShipEngineAPI {
|
|
|
34342
34353
|
});
|
|
34343
34354
|
client.defaults.headers.common["Authorization"] = `Bearer ${token}`;
|
|
34344
34355
|
client.interceptors.request.use(
|
|
34345
|
-
(config) => __async$
|
|
34356
|
+
(config) => __async$N(this, null, function* () {
|
|
34346
34357
|
if (config.isSandbox) {
|
|
34347
34358
|
if (!this.sandboxToken) {
|
|
34348
34359
|
this.sandboxToken = yield getSandboxToken == null ? void 0 : getSandboxToken();
|
|
@@ -34369,7 +34380,7 @@ class ShipEngineAPI {
|
|
|
34369
34380
|
);
|
|
34370
34381
|
return res;
|
|
34371
34382
|
},
|
|
34372
|
-
(err) => __async$
|
|
34383
|
+
(err) => __async$N(this, null, function* () {
|
|
34373
34384
|
var _a, _b, _c, _d, _e;
|
|
34374
34385
|
logger$1.error(
|
|
34375
34386
|
{ err, req: err.config, res: err.response },
|
|
@@ -34416,7 +34427,7 @@ class ShipEngineAPI {
|
|
|
34416
34427
|
* that token (also known as Seller ID)
|
|
34417
34428
|
*/
|
|
34418
34429
|
getTenant(isSandbox) {
|
|
34419
|
-
return __async$
|
|
34430
|
+
return __async$N(this, null, function* () {
|
|
34420
34431
|
var _a;
|
|
34421
34432
|
if (!isSandbox) {
|
|
34422
34433
|
return this.getTenantFromToken(this.token);
|
|
@@ -34686,25 +34697,25 @@ const delay = (ms) => new Promise((resolve) => {
|
|
|
34686
34697
|
|
|
34687
34698
|
const onError = (_errors) => _default();
|
|
34688
34699
|
|
|
34689
|
-
var __defProp$
|
|
34690
|
-
var __defProps$
|
|
34691
|
-
var __getOwnPropDescs$
|
|
34692
|
-
var __getOwnPropSymbols$
|
|
34693
|
-
var __hasOwnProp$
|
|
34694
|
-
var __propIsEnum$
|
|
34695
|
-
var __defNormalProp$
|
|
34696
|
-
var __spreadValues$
|
|
34700
|
+
var __defProp$k = Object.defineProperty;
|
|
34701
|
+
var __defProps$h = Object.defineProperties;
|
|
34702
|
+
var __getOwnPropDescs$h = Object.getOwnPropertyDescriptors;
|
|
34703
|
+
var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
|
|
34704
|
+
var __hasOwnProp$u = Object.prototype.hasOwnProperty;
|
|
34705
|
+
var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
|
|
34706
|
+
var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
34707
|
+
var __spreadValues$k = (a, b) => {
|
|
34697
34708
|
for (var prop in b || (b = {}))
|
|
34698
|
-
if (__hasOwnProp$
|
|
34699
|
-
__defNormalProp$
|
|
34700
|
-
if (__getOwnPropSymbols$
|
|
34701
|
-
for (var prop of __getOwnPropSymbols$
|
|
34702
|
-
if (__propIsEnum$
|
|
34703
|
-
__defNormalProp$
|
|
34709
|
+
if (__hasOwnProp$u.call(b, prop))
|
|
34710
|
+
__defNormalProp$k(a, prop, b[prop]);
|
|
34711
|
+
if (__getOwnPropSymbols$u)
|
|
34712
|
+
for (var prop of __getOwnPropSymbols$u(b)) {
|
|
34713
|
+
if (__propIsEnum$u.call(b, prop))
|
|
34714
|
+
__defNormalProp$k(a, prop, b[prop]);
|
|
34704
34715
|
}
|
|
34705
34716
|
return a;
|
|
34706
34717
|
};
|
|
34707
|
-
var __spreadProps$
|
|
34718
|
+
var __spreadProps$h = (a, b) => __defProps$h(a, __getOwnPropDescs$h(b));
|
|
34708
34719
|
const streams = [];
|
|
34709
34720
|
if (process.env.NODE_ENV === "production") {
|
|
34710
34721
|
streams.push({
|
|
@@ -34713,7 +34724,7 @@ if (process.env.NODE_ENV === "production") {
|
|
|
34713
34724
|
}
|
|
34714
34725
|
const logger = E({
|
|
34715
34726
|
name: "shipengine",
|
|
34716
|
-
serializers: __spreadProps$
|
|
34727
|
+
serializers: __spreadProps$h(__spreadValues$k({}, k), {
|
|
34717
34728
|
req: (req) => ({
|
|
34718
34729
|
headers: req.headers,
|
|
34719
34730
|
method: req.method,
|
|
@@ -34738,7 +34749,7 @@ const retryUntil = (callbackFn, retries = 10, timeoutBetweenAttempts = 1e3) => P
|
|
|
34738
34749
|
throw error;
|
|
34739
34750
|
});
|
|
34740
34751
|
|
|
34741
|
-
var __async$
|
|
34752
|
+
var __async$M = (__this, __arguments, generator) => {
|
|
34742
34753
|
return new Promise((resolve, reject) => {
|
|
34743
34754
|
var fulfilled = (value) => {
|
|
34744
34755
|
try {
|
|
@@ -34761,7 +34772,7 @@ var __async$L = (__this, __arguments, generator) => {
|
|
|
34761
34772
|
const useCreateAccountImage = () => {
|
|
34762
34773
|
const { client } = useShipEngine();
|
|
34763
34774
|
return reactQuery.useMutation({
|
|
34764
|
-
mutationFn: (data) => __async$
|
|
34775
|
+
mutationFn: (data) => __async$M(void 0, null, function* () {
|
|
34765
34776
|
const result = yield client.accountSettings.createImage(data);
|
|
34766
34777
|
return result.data;
|
|
34767
34778
|
}),
|
|
@@ -34770,7 +34781,7 @@ const useCreateAccountImage = () => {
|
|
|
34770
34781
|
});
|
|
34771
34782
|
};
|
|
34772
34783
|
|
|
34773
|
-
var __async$
|
|
34784
|
+
var __async$L = (__this, __arguments, generator) => {
|
|
34774
34785
|
return new Promise((resolve, reject) => {
|
|
34775
34786
|
var fulfilled = (value) => {
|
|
34776
34787
|
try {
|
|
@@ -34793,7 +34804,7 @@ var __async$K = (__this, __arguments, generator) => {
|
|
|
34793
34804
|
const useDeleteAccountImage = () => {
|
|
34794
34805
|
const { client } = useShipEngine();
|
|
34795
34806
|
return reactQuery.useMutation({
|
|
34796
|
-
mutationFn: (labelImageId) => __async$
|
|
34807
|
+
mutationFn: (labelImageId) => __async$L(void 0, null, function* () {
|
|
34797
34808
|
const result = yield client.accountSettings.deleteImage(labelImageId);
|
|
34798
34809
|
return result.data;
|
|
34799
34810
|
}),
|
|
@@ -34822,7 +34833,7 @@ const useGetAccountSettings = () => {
|
|
|
34822
34833
|
});
|
|
34823
34834
|
};
|
|
34824
34835
|
|
|
34825
|
-
var __async$
|
|
34836
|
+
var __async$K = (__this, __arguments, generator) => {
|
|
34826
34837
|
return new Promise((resolve, reject) => {
|
|
34827
34838
|
var fulfilled = (value) => {
|
|
34828
34839
|
try {
|
|
@@ -34845,7 +34856,7 @@ var __async$J = (__this, __arguments, generator) => {
|
|
|
34845
34856
|
const useUpdateAccountImage = () => {
|
|
34846
34857
|
const { client } = useShipEngine();
|
|
34847
34858
|
return reactQuery.useMutation({
|
|
34848
|
-
mutationFn: (data) => __async$
|
|
34859
|
+
mutationFn: (data) => __async$K(void 0, null, function* () {
|
|
34849
34860
|
const result = yield client.accountSettings.updateImage(data);
|
|
34850
34861
|
return result.data;
|
|
34851
34862
|
}),
|
|
@@ -34854,7 +34865,7 @@ const useUpdateAccountImage = () => {
|
|
|
34854
34865
|
});
|
|
34855
34866
|
};
|
|
34856
34867
|
|
|
34857
|
-
var __async$
|
|
34868
|
+
var __async$J = (__this, __arguments, generator) => {
|
|
34858
34869
|
return new Promise((resolve, reject) => {
|
|
34859
34870
|
var fulfilled = (value) => {
|
|
34860
34871
|
try {
|
|
@@ -34877,7 +34888,7 @@ var __async$I = (__this, __arguments, generator) => {
|
|
|
34877
34888
|
const useUpdateAccountSettings = () => {
|
|
34878
34889
|
const { client } = useShipEngine();
|
|
34879
34890
|
return reactQuery.useMutation({
|
|
34880
|
-
mutationFn: (settings) => __async$
|
|
34891
|
+
mutationFn: (settings) => __async$J(void 0, null, function* () {
|
|
34881
34892
|
const result = yield client.accountSettings.update(settings);
|
|
34882
34893
|
return result.data;
|
|
34883
34894
|
}),
|
|
@@ -34886,7 +34897,7 @@ const useUpdateAccountSettings = () => {
|
|
|
34886
34897
|
});
|
|
34887
34898
|
};
|
|
34888
34899
|
|
|
34889
|
-
var __async$
|
|
34900
|
+
var __async$I = (__this, __arguments, generator) => {
|
|
34890
34901
|
return new Promise((resolve, reject) => {
|
|
34891
34902
|
var fulfilled = (value) => {
|
|
34892
34903
|
try {
|
|
@@ -34909,7 +34920,7 @@ var __async$H = (__this, __arguments, generator) => {
|
|
|
34909
34920
|
const useParseAddress = () => {
|
|
34910
34921
|
const { client } = useShipEngine();
|
|
34911
34922
|
return reactQuery.useMutation({
|
|
34912
|
-
mutationFn: (_0) => __async$
|
|
34923
|
+
mutationFn: (_0) => __async$I(void 0, [_0], function* ({ address, text }) {
|
|
34913
34924
|
const result = yield client.addresses.parse(text, address);
|
|
34914
34925
|
return result.data;
|
|
34915
34926
|
}),
|
|
@@ -34918,7 +34929,7 @@ const useParseAddress = () => {
|
|
|
34918
34929
|
});
|
|
34919
34930
|
};
|
|
34920
34931
|
|
|
34921
|
-
var __async$
|
|
34932
|
+
var __async$H = (__this, __arguments, generator) => {
|
|
34922
34933
|
return new Promise((resolve, reject) => {
|
|
34923
34934
|
var fulfilled = (value) => {
|
|
34924
34935
|
try {
|
|
@@ -34941,7 +34952,7 @@ var __async$G = (__this, __arguments, generator) => {
|
|
|
34941
34952
|
const useValidateAddresses = () => {
|
|
34942
34953
|
const { client } = useShipEngine();
|
|
34943
34954
|
return reactQuery.useMutation({
|
|
34944
|
-
mutationFn: (addresses) => __async$
|
|
34955
|
+
mutationFn: (addresses) => __async$H(void 0, null, function* () {
|
|
34945
34956
|
const result = yield client.addresses.validate(addresses);
|
|
34946
34957
|
return result.data;
|
|
34947
34958
|
}),
|
|
@@ -34950,7 +34961,7 @@ const useValidateAddresses = () => {
|
|
|
34950
34961
|
});
|
|
34951
34962
|
};
|
|
34952
34963
|
|
|
34953
|
-
var __async$
|
|
34964
|
+
var __async$G = (__this, __arguments, generator) => {
|
|
34954
34965
|
return new Promise((resolve, reject) => {
|
|
34955
34966
|
var fulfilled = (value) => {
|
|
34956
34967
|
try {
|
|
@@ -34973,7 +34984,7 @@ var __async$F = (__this, __arguments, generator) => {
|
|
|
34973
34984
|
const useAddFunds = () => {
|
|
34974
34985
|
const { client } = useShipEngine();
|
|
34975
34986
|
return reactQuery.useMutation({
|
|
34976
|
-
mutationFn: (_0) => __async$
|
|
34987
|
+
mutationFn: (_0) => __async$G(void 0, [_0], function* ({ carrierId, funds }) {
|
|
34977
34988
|
const result = yield client.carriers.addFunds(carrierId, funds);
|
|
34978
34989
|
return result.data;
|
|
34979
34990
|
}),
|
|
@@ -34982,7 +34993,7 @@ const useAddFunds = () => {
|
|
|
34982
34993
|
});
|
|
34983
34994
|
};
|
|
34984
34995
|
|
|
34985
|
-
var __async$
|
|
34996
|
+
var __async$F = (__this, __arguments, generator) => {
|
|
34986
34997
|
return new Promise((resolve, reject) => {
|
|
34987
34998
|
var fulfilled = (value) => {
|
|
34988
34999
|
try {
|
|
@@ -35005,7 +35016,7 @@ var __async$E = (__this, __arguments, generator) => {
|
|
|
35005
35016
|
const useConnectCarrier = () => {
|
|
35006
35017
|
const { client } = useShipEngine();
|
|
35007
35018
|
return reactQuery.useMutation({
|
|
35008
|
-
mutationFn: (params) => __async$
|
|
35019
|
+
mutationFn: (params) => __async$F(void 0, null, function* () {
|
|
35009
35020
|
const result = yield client.carriers.connect(params);
|
|
35010
35021
|
return result.data;
|
|
35011
35022
|
}),
|
|
@@ -35114,41 +35125,41 @@ const useGetServicesByCarrier = (carrierId) => {
|
|
|
35114
35125
|
});
|
|
35115
35126
|
};
|
|
35116
35127
|
|
|
35117
|
-
var __defProp$
|
|
35118
|
-
var __defProps$
|
|
35119
|
-
var __getOwnPropDescs$
|
|
35120
|
-
var __getOwnPropSymbols$
|
|
35121
|
-
var __hasOwnProp$
|
|
35122
|
-
var __propIsEnum$
|
|
35123
|
-
var __defNormalProp$
|
|
35124
|
-
var __spreadValues$
|
|
35128
|
+
var __defProp$j = Object.defineProperty;
|
|
35129
|
+
var __defProps$g = Object.defineProperties;
|
|
35130
|
+
var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
|
|
35131
|
+
var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
|
|
35132
|
+
var __hasOwnProp$t = Object.prototype.hasOwnProperty;
|
|
35133
|
+
var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
|
|
35134
|
+
var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
35135
|
+
var __spreadValues$j = (a, b) => {
|
|
35125
35136
|
for (var prop in b || (b = {}))
|
|
35126
|
-
if (__hasOwnProp$
|
|
35127
|
-
__defNormalProp$
|
|
35128
|
-
if (__getOwnPropSymbols$
|
|
35129
|
-
for (var prop of __getOwnPropSymbols$
|
|
35130
|
-
if (__propIsEnum$
|
|
35131
|
-
__defNormalProp$
|
|
35137
|
+
if (__hasOwnProp$t.call(b, prop))
|
|
35138
|
+
__defNormalProp$j(a, prop, b[prop]);
|
|
35139
|
+
if (__getOwnPropSymbols$t)
|
|
35140
|
+
for (var prop of __getOwnPropSymbols$t(b)) {
|
|
35141
|
+
if (__propIsEnum$t.call(b, prop))
|
|
35142
|
+
__defNormalProp$j(a, prop, b[prop]);
|
|
35132
35143
|
}
|
|
35133
35144
|
return a;
|
|
35134
35145
|
};
|
|
35135
|
-
var __spreadProps$
|
|
35146
|
+
var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
|
|
35136
35147
|
var __objRest$k = (source, exclude) => {
|
|
35137
35148
|
var target = {};
|
|
35138
35149
|
for (var prop in source)
|
|
35139
|
-
if (__hasOwnProp$
|
|
35150
|
+
if (__hasOwnProp$t.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
35140
35151
|
target[prop] = source[prop];
|
|
35141
|
-
if (source != null && __getOwnPropSymbols$
|
|
35142
|
-
for (var prop of __getOwnPropSymbols$
|
|
35143
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
35152
|
+
if (source != null && __getOwnPropSymbols$t)
|
|
35153
|
+
for (var prop of __getOwnPropSymbols$t(source)) {
|
|
35154
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$t.call(source, prop))
|
|
35144
35155
|
target[prop] = source[prop];
|
|
35145
35156
|
}
|
|
35146
35157
|
return target;
|
|
35147
35158
|
};
|
|
35148
35159
|
const useListCarriers = (params) => {
|
|
35149
35160
|
const { client } = useShipEngine();
|
|
35150
|
-
const _a = __spreadValues$
|
|
35151
|
-
return reactQuery.useQuery(__spreadProps$
|
|
35161
|
+
const _a = __spreadValues$j({}, params), { queryFnParams } = _a, rest = __objRest$k(_a, ["queryFnParams"]);
|
|
35162
|
+
return reactQuery.useQuery(__spreadProps$g(__spreadValues$j({}, rest), {
|
|
35152
35163
|
onError,
|
|
35153
35164
|
queryFn: () => client.carriers.list(queryFnParams),
|
|
35154
35165
|
queryKey: ["useListCarriers", queryFnParams],
|
|
@@ -35156,22 +35167,22 @@ const useListCarriers = (params) => {
|
|
|
35156
35167
|
}));
|
|
35157
35168
|
};
|
|
35158
35169
|
|
|
35159
|
-
var __getOwnPropSymbols$
|
|
35160
|
-
var __hasOwnProp$
|
|
35161
|
-
var __propIsEnum$
|
|
35170
|
+
var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
|
|
35171
|
+
var __hasOwnProp$s = Object.prototype.hasOwnProperty;
|
|
35172
|
+
var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
|
|
35162
35173
|
var __objRest$j = (source, exclude) => {
|
|
35163
35174
|
var target = {};
|
|
35164
35175
|
for (var prop in source)
|
|
35165
|
-
if (__hasOwnProp$
|
|
35176
|
+
if (__hasOwnProp$s.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
35166
35177
|
target[prop] = source[prop];
|
|
35167
|
-
if (source != null && __getOwnPropSymbols$
|
|
35168
|
-
for (var prop of __getOwnPropSymbols$
|
|
35169
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
35178
|
+
if (source != null && __getOwnPropSymbols$s)
|
|
35179
|
+
for (var prop of __getOwnPropSymbols$s(source)) {
|
|
35180
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$s.call(source, prop))
|
|
35170
35181
|
target[prop] = source[prop];
|
|
35171
35182
|
}
|
|
35172
35183
|
return target;
|
|
35173
35184
|
};
|
|
35174
|
-
var __async$
|
|
35185
|
+
var __async$E = (__this, __arguments, generator) => {
|
|
35175
35186
|
return new Promise((resolve, reject) => {
|
|
35176
35187
|
var fulfilled = (value) => {
|
|
35177
35188
|
try {
|
|
@@ -35195,7 +35206,7 @@ const useUpdateAutoFunding = () => {
|
|
|
35195
35206
|
const { client } = useShipEngine();
|
|
35196
35207
|
const queryClient = reactQuery.useQueryClient();
|
|
35197
35208
|
return reactQuery.useMutation({
|
|
35198
|
-
mutationFn: (_a) => __async$
|
|
35209
|
+
mutationFn: (_a) => __async$E(void 0, null, function* () {
|
|
35199
35210
|
var _b = _a, { carrierId } = _b, options = __objRest$j(_b, ["carrierId"]);
|
|
35200
35211
|
const result = yield client.carriers.updateAutoFunding(carrierId, options);
|
|
35201
35212
|
return result.data;
|
|
@@ -35225,7 +35236,7 @@ const useGetZonesByCarrier = (carrierId) => {
|
|
|
35225
35236
|
});
|
|
35226
35237
|
};
|
|
35227
35238
|
|
|
35228
|
-
var __async$
|
|
35239
|
+
var __async$D = (__this, __arguments, generator) => {
|
|
35229
35240
|
return new Promise((resolve, reject) => {
|
|
35230
35241
|
var fulfilled = (value) => {
|
|
35231
35242
|
try {
|
|
@@ -35248,7 +35259,7 @@ var __async$C = (__this, __arguments, generator) => {
|
|
|
35248
35259
|
const useDeleteCarrier = () => {
|
|
35249
35260
|
const { client } = useShipEngine();
|
|
35250
35261
|
return reactQuery.useMutation({
|
|
35251
|
-
mutationFn: (carrierId) => __async$
|
|
35262
|
+
mutationFn: (carrierId) => __async$D(void 0, null, function* () {
|
|
35252
35263
|
const result = yield client.carriers.delete(carrierId);
|
|
35253
35264
|
return result.data;
|
|
35254
35265
|
}),
|
|
@@ -35257,17 +35268,17 @@ const useDeleteCarrier = () => {
|
|
|
35257
35268
|
});
|
|
35258
35269
|
};
|
|
35259
35270
|
|
|
35260
|
-
var __getOwnPropSymbols$
|
|
35261
|
-
var __hasOwnProp$
|
|
35262
|
-
var __propIsEnum$
|
|
35271
|
+
var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
|
|
35272
|
+
var __hasOwnProp$r = Object.prototype.hasOwnProperty;
|
|
35273
|
+
var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
|
|
35263
35274
|
var __objRest$i = (source, exclude) => {
|
|
35264
35275
|
var target = {};
|
|
35265
35276
|
for (var prop in source)
|
|
35266
|
-
if (__hasOwnProp$
|
|
35277
|
+
if (__hasOwnProp$r.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
35267
35278
|
target[prop] = source[prop];
|
|
35268
|
-
if (source != null && __getOwnPropSymbols$
|
|
35269
|
-
for (var prop of __getOwnPropSymbols$
|
|
35270
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
35279
|
+
if (source != null && __getOwnPropSymbols$r)
|
|
35280
|
+
for (var prop of __getOwnPropSymbols$r(source)) {
|
|
35281
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$r.call(source, prop))
|
|
35271
35282
|
target[prop] = source[prop];
|
|
35272
35283
|
}
|
|
35273
35284
|
return target;
|
|
@@ -35284,17 +35295,17 @@ const useGetCarrierConnectionForm = (_params) => {
|
|
|
35284
35295
|
});
|
|
35285
35296
|
};
|
|
35286
35297
|
|
|
35287
|
-
var __getOwnPropSymbols$
|
|
35288
|
-
var __hasOwnProp$
|
|
35289
|
-
var __propIsEnum$
|
|
35298
|
+
var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
|
|
35299
|
+
var __hasOwnProp$q = Object.prototype.hasOwnProperty;
|
|
35300
|
+
var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
|
|
35290
35301
|
var __objRest$h = (source, exclude) => {
|
|
35291
35302
|
var target = {};
|
|
35292
35303
|
for (var prop in source)
|
|
35293
|
-
if (__hasOwnProp$
|
|
35304
|
+
if (__hasOwnProp$q.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
35294
35305
|
target[prop] = source[prop];
|
|
35295
|
-
if (source != null && __getOwnPropSymbols$
|
|
35296
|
-
for (var prop of __getOwnPropSymbols$
|
|
35297
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
35306
|
+
if (source != null && __getOwnPropSymbols$q)
|
|
35307
|
+
for (var prop of __getOwnPropSymbols$q(source)) {
|
|
35308
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$q.call(source, prop))
|
|
35298
35309
|
target[prop] = source[prop];
|
|
35299
35310
|
}
|
|
35300
35311
|
return target;
|
|
@@ -35311,7 +35322,7 @@ const useListCarrierConnections = (_params) => {
|
|
|
35311
35322
|
});
|
|
35312
35323
|
};
|
|
35313
35324
|
|
|
35314
|
-
var __async$
|
|
35325
|
+
var __async$C = (__this, __arguments, generator) => {
|
|
35315
35326
|
return new Promise((resolve, reject) => {
|
|
35316
35327
|
var fulfilled = (value) => {
|
|
35317
35328
|
try {
|
|
@@ -35334,7 +35345,7 @@ var __async$B = (__this, __arguments, generator) => {
|
|
|
35334
35345
|
const useConnectCarrierAccount = () => {
|
|
35335
35346
|
const { client } = useShipEngine();
|
|
35336
35347
|
return reactQuery.useMutation({
|
|
35337
|
-
mutationFn: (_0) => __async$
|
|
35348
|
+
mutationFn: (_0) => __async$C(void 0, [_0], function* ({ carrierName, formData }) {
|
|
35338
35349
|
const result = yield client.connections.connectCarrier(carrierName, formData);
|
|
35339
35350
|
return result.data;
|
|
35340
35351
|
}),
|
|
@@ -35354,33 +35365,33 @@ const useCarrierConnectionsServicesList = (carrierCode) => {
|
|
|
35354
35365
|
});
|
|
35355
35366
|
};
|
|
35356
35367
|
|
|
35357
|
-
var __defProp$
|
|
35358
|
-
var __defProps$
|
|
35359
|
-
var __getOwnPropDescs$
|
|
35360
|
-
var __getOwnPropSymbols$
|
|
35361
|
-
var __hasOwnProp$
|
|
35362
|
-
var __propIsEnum$
|
|
35363
|
-
var __defNormalProp$
|
|
35364
|
-
var __spreadValues$
|
|
35368
|
+
var __defProp$i = Object.defineProperty;
|
|
35369
|
+
var __defProps$f = Object.defineProperties;
|
|
35370
|
+
var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
|
|
35371
|
+
var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
|
|
35372
|
+
var __hasOwnProp$p = Object.prototype.hasOwnProperty;
|
|
35373
|
+
var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
|
|
35374
|
+
var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
35375
|
+
var __spreadValues$i = (a, b) => {
|
|
35365
35376
|
for (var prop in b || (b = {}))
|
|
35366
|
-
if (__hasOwnProp$
|
|
35367
|
-
__defNormalProp$
|
|
35368
|
-
if (__getOwnPropSymbols$
|
|
35369
|
-
for (var prop of __getOwnPropSymbols$
|
|
35370
|
-
if (__propIsEnum$
|
|
35371
|
-
__defNormalProp$
|
|
35377
|
+
if (__hasOwnProp$p.call(b, prop))
|
|
35378
|
+
__defNormalProp$i(a, prop, b[prop]);
|
|
35379
|
+
if (__getOwnPropSymbols$p)
|
|
35380
|
+
for (var prop of __getOwnPropSymbols$p(b)) {
|
|
35381
|
+
if (__propIsEnum$p.call(b, prop))
|
|
35382
|
+
__defNormalProp$i(a, prop, b[prop]);
|
|
35372
35383
|
}
|
|
35373
35384
|
return a;
|
|
35374
35385
|
};
|
|
35375
|
-
var __spreadProps$
|
|
35386
|
+
var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
|
|
35376
35387
|
var __objRest$g = (source, exclude) => {
|
|
35377
35388
|
var target = {};
|
|
35378
35389
|
for (var prop in source)
|
|
35379
|
-
if (__hasOwnProp$
|
|
35390
|
+
if (__hasOwnProp$p.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
35380
35391
|
target[prop] = source[prop];
|
|
35381
|
-
if (source != null && __getOwnPropSymbols$
|
|
35382
|
-
for (var prop of __getOwnPropSymbols$
|
|
35383
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
35392
|
+
if (source != null && __getOwnPropSymbols$p)
|
|
35393
|
+
for (var prop of __getOwnPropSymbols$p(source)) {
|
|
35394
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$p.call(source, prop))
|
|
35384
35395
|
target[prop] = source[prop];
|
|
35385
35396
|
}
|
|
35386
35397
|
return target;
|
|
@@ -35393,7 +35404,7 @@ const useGetConnectionsCarrierSettings = (_a) => {
|
|
|
35393
35404
|
]);
|
|
35394
35405
|
const { client } = useShipEngine();
|
|
35395
35406
|
const { carrierName, carrierId } = queryFnParams;
|
|
35396
|
-
return reactQuery.useQuery(__spreadProps$
|
|
35407
|
+
return reactQuery.useQuery(__spreadProps$f(__spreadValues$i({}, params), {
|
|
35397
35408
|
onError,
|
|
35398
35409
|
queryFn: () => client.connections.getCarrierSettings(carrierName, carrierId),
|
|
35399
35410
|
queryKey: ["useGetConnectionsCarrierSettings", carrierName, carrierId],
|
|
@@ -35401,26 +35412,26 @@ const useGetConnectionsCarrierSettings = (_a) => {
|
|
|
35401
35412
|
}));
|
|
35402
35413
|
};
|
|
35403
35414
|
|
|
35404
|
-
var __defProp$
|
|
35405
|
-
var __defProps$
|
|
35406
|
-
var __getOwnPropDescs$
|
|
35407
|
-
var __getOwnPropSymbols$
|
|
35408
|
-
var __hasOwnProp$
|
|
35409
|
-
var __propIsEnum$
|
|
35410
|
-
var __defNormalProp$
|
|
35411
|
-
var __spreadValues$
|
|
35415
|
+
var __defProp$h = Object.defineProperty;
|
|
35416
|
+
var __defProps$e = Object.defineProperties;
|
|
35417
|
+
var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
|
|
35418
|
+
var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
|
|
35419
|
+
var __hasOwnProp$o = Object.prototype.hasOwnProperty;
|
|
35420
|
+
var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
|
|
35421
|
+
var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
35422
|
+
var __spreadValues$h = (a, b) => {
|
|
35412
35423
|
for (var prop in b || (b = {}))
|
|
35413
|
-
if (__hasOwnProp$
|
|
35414
|
-
__defNormalProp$
|
|
35415
|
-
if (__getOwnPropSymbols$
|
|
35416
|
-
for (var prop of __getOwnPropSymbols$
|
|
35417
|
-
if (__propIsEnum$
|
|
35418
|
-
__defNormalProp$
|
|
35424
|
+
if (__hasOwnProp$o.call(b, prop))
|
|
35425
|
+
__defNormalProp$h(a, prop, b[prop]);
|
|
35426
|
+
if (__getOwnPropSymbols$o)
|
|
35427
|
+
for (var prop of __getOwnPropSymbols$o(b)) {
|
|
35428
|
+
if (__propIsEnum$o.call(b, prop))
|
|
35429
|
+
__defNormalProp$h(a, prop, b[prop]);
|
|
35419
35430
|
}
|
|
35420
35431
|
return a;
|
|
35421
35432
|
};
|
|
35422
|
-
var __spreadProps$
|
|
35423
|
-
var __async$
|
|
35433
|
+
var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
|
|
35434
|
+
var __async$B = (__this, __arguments, generator) => {
|
|
35424
35435
|
return new Promise((resolve, reject) => {
|
|
35425
35436
|
var fulfilled = (value) => {
|
|
35426
35437
|
try {
|
|
@@ -35442,8 +35453,8 @@ var __async$A = (__this, __arguments, generator) => {
|
|
|
35442
35453
|
};
|
|
35443
35454
|
const useUpdateConnectionsCarrierSettings = (params) => {
|
|
35444
35455
|
const { client } = useShipEngine();
|
|
35445
|
-
return reactQuery.useMutation(__spreadProps$
|
|
35446
|
-
mutationFn: (_0) => __async$
|
|
35456
|
+
return reactQuery.useMutation(__spreadProps$e(__spreadValues$h({}, params), {
|
|
35457
|
+
mutationFn: (_0) => __async$B(void 0, [_0], function* ({
|
|
35447
35458
|
carrierName,
|
|
35448
35459
|
carrierId,
|
|
35449
35460
|
formData
|
|
@@ -35470,7 +35481,7 @@ const useListCustomPackageTypes = () => {
|
|
|
35470
35481
|
});
|
|
35471
35482
|
};
|
|
35472
35483
|
|
|
35473
|
-
var __async$
|
|
35484
|
+
var __async$A = (__this, __arguments, generator) => {
|
|
35474
35485
|
return new Promise((resolve, reject) => {
|
|
35475
35486
|
var fulfilled = (value) => {
|
|
35476
35487
|
try {
|
|
@@ -35493,7 +35504,7 @@ var __async$z = (__this, __arguments, generator) => {
|
|
|
35493
35504
|
const useCreateFundingSource = () => {
|
|
35494
35505
|
const { client } = useShipEngine();
|
|
35495
35506
|
return reactQuery.useMutation({
|
|
35496
|
-
mutationFn: (fundingSource) => __async$
|
|
35507
|
+
mutationFn: (fundingSource) => __async$A(void 0, null, function* () {
|
|
35497
35508
|
const result = yield client.fundingSources.create(fundingSource);
|
|
35498
35509
|
return result.data;
|
|
35499
35510
|
}),
|
|
@@ -35502,7 +35513,7 @@ const useCreateFundingSource = () => {
|
|
|
35502
35513
|
});
|
|
35503
35514
|
};
|
|
35504
35515
|
|
|
35505
|
-
var __async$
|
|
35516
|
+
var __async$z = (__this, __arguments, generator) => {
|
|
35506
35517
|
return new Promise((resolve, reject) => {
|
|
35507
35518
|
var fulfilled = (value) => {
|
|
35508
35519
|
try {
|
|
@@ -35525,7 +35536,7 @@ var __async$y = (__this, __arguments, generator) => {
|
|
|
35525
35536
|
const useFundingSourcesAddFunds = () => {
|
|
35526
35537
|
const { client } = useShipEngine();
|
|
35527
35538
|
return reactQuery.useMutation({
|
|
35528
|
-
mutationFn: (_0) => __async$
|
|
35539
|
+
mutationFn: (_0) => __async$z(void 0, [_0], function* ({ funds, fundingSourceId }) {
|
|
35529
35540
|
const result = yield client.fundingSources.addFunds(funds, fundingSourceId);
|
|
35530
35541
|
return result.data;
|
|
35531
35542
|
}),
|
|
@@ -35554,7 +35565,7 @@ const useListFundingSources = () => {
|
|
|
35554
35565
|
});
|
|
35555
35566
|
};
|
|
35556
35567
|
|
|
35557
|
-
var __async$
|
|
35568
|
+
var __async$y = (__this, __arguments, generator) => {
|
|
35558
35569
|
return new Promise((resolve, reject) => {
|
|
35559
35570
|
var fulfilled = (value) => {
|
|
35560
35571
|
try {
|
|
@@ -35577,7 +35588,7 @@ var __async$x = (__this, __arguments, generator) => {
|
|
|
35577
35588
|
const useRegisterCarrier = () => {
|
|
35578
35589
|
const { client } = useShipEngine();
|
|
35579
35590
|
return reactQuery.useMutation({
|
|
35580
|
-
mutationFn: (carrier) => __async$
|
|
35591
|
+
mutationFn: (carrier) => __async$y(void 0, null, function* () {
|
|
35581
35592
|
const result = yield client.fundingSources.registerCarrier(carrier);
|
|
35582
35593
|
return result.data;
|
|
35583
35594
|
}),
|
|
@@ -35586,7 +35597,7 @@ const useRegisterCarrier = () => {
|
|
|
35586
35597
|
});
|
|
35587
35598
|
};
|
|
35588
35599
|
|
|
35589
|
-
var __async$
|
|
35600
|
+
var __async$x = (__this, __arguments, generator) => {
|
|
35590
35601
|
return new Promise((resolve, reject) => {
|
|
35591
35602
|
var fulfilled = (value) => {
|
|
35592
35603
|
try {
|
|
@@ -35609,7 +35620,7 @@ var __async$w = (__this, __arguments, generator) => {
|
|
|
35609
35620
|
const useUpdateFundingSource = () => {
|
|
35610
35621
|
const { client } = useShipEngine();
|
|
35611
35622
|
return reactQuery.useMutation({
|
|
35612
|
-
mutationFn: (_0) => __async$
|
|
35623
|
+
mutationFn: (_0) => __async$x(void 0, [_0], function* ({
|
|
35613
35624
|
billingInfo,
|
|
35614
35625
|
creditCardInfo,
|
|
35615
35626
|
fundingSourceId
|
|
@@ -35673,22 +35684,22 @@ const useGetInsuranceAccount = (insuranceProvider) => {
|
|
|
35673
35684
|
});
|
|
35674
35685
|
};
|
|
35675
35686
|
|
|
35676
|
-
var __getOwnPropSymbols$
|
|
35677
|
-
var __hasOwnProp$
|
|
35678
|
-
var __propIsEnum$
|
|
35687
|
+
var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
|
|
35688
|
+
var __hasOwnProp$n = Object.prototype.hasOwnProperty;
|
|
35689
|
+
var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
|
|
35679
35690
|
var __objRest$f = (source, exclude) => {
|
|
35680
35691
|
var target = {};
|
|
35681
35692
|
for (var prop in source)
|
|
35682
|
-
if (__hasOwnProp$
|
|
35693
|
+
if (__hasOwnProp$n.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
35683
35694
|
target[prop] = source[prop];
|
|
35684
|
-
if (source != null && __getOwnPropSymbols$
|
|
35685
|
-
for (var prop of __getOwnPropSymbols$
|
|
35686
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
35695
|
+
if (source != null && __getOwnPropSymbols$n)
|
|
35696
|
+
for (var prop of __getOwnPropSymbols$n(source)) {
|
|
35697
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$n.call(source, prop))
|
|
35687
35698
|
target[prop] = source[prop];
|
|
35688
35699
|
}
|
|
35689
35700
|
return target;
|
|
35690
35701
|
};
|
|
35691
|
-
var __async$
|
|
35702
|
+
var __async$w = (__this, __arguments, generator) => {
|
|
35692
35703
|
return new Promise((resolve, reject) => {
|
|
35693
35704
|
var fulfilled = (value) => {
|
|
35694
35705
|
try {
|
|
@@ -35711,7 +35722,7 @@ var __async$v = (__this, __arguments, generator) => {
|
|
|
35711
35722
|
const useAddInsuranceFunds = () => {
|
|
35712
35723
|
const { client } = useShipEngine();
|
|
35713
35724
|
return reactQuery.useMutation({
|
|
35714
|
-
mutationFn: (_a) => __async$
|
|
35725
|
+
mutationFn: (_a) => __async$w(void 0, null, function* () {
|
|
35715
35726
|
var _b = _a, { insuranceProvider } = _b, rest = __objRest$f(_b, ["insuranceProvider"]);
|
|
35716
35727
|
const result = yield client.insurance.addFunds(insuranceProvider, rest);
|
|
35717
35728
|
return result.data;
|
|
@@ -35721,22 +35732,22 @@ const useAddInsuranceFunds = () => {
|
|
|
35721
35732
|
});
|
|
35722
35733
|
};
|
|
35723
35734
|
|
|
35724
|
-
var __getOwnPropSymbols$
|
|
35725
|
-
var __hasOwnProp$
|
|
35726
|
-
var __propIsEnum$
|
|
35735
|
+
var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
|
|
35736
|
+
var __hasOwnProp$m = Object.prototype.hasOwnProperty;
|
|
35737
|
+
var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
|
|
35727
35738
|
var __objRest$e = (source, exclude) => {
|
|
35728
35739
|
var target = {};
|
|
35729
35740
|
for (var prop in source)
|
|
35730
|
-
if (__hasOwnProp$
|
|
35741
|
+
if (__hasOwnProp$m.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
35731
35742
|
target[prop] = source[prop];
|
|
35732
|
-
if (source != null && __getOwnPropSymbols$
|
|
35733
|
-
for (var prop of __getOwnPropSymbols$
|
|
35734
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
35743
|
+
if (source != null && __getOwnPropSymbols$m)
|
|
35744
|
+
for (var prop of __getOwnPropSymbols$m(source)) {
|
|
35745
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$m.call(source, prop))
|
|
35735
35746
|
target[prop] = source[prop];
|
|
35736
35747
|
}
|
|
35737
35748
|
return target;
|
|
35738
35749
|
};
|
|
35739
|
-
var __async$
|
|
35750
|
+
var __async$v = (__this, __arguments, generator) => {
|
|
35740
35751
|
return new Promise((resolve, reject) => {
|
|
35741
35752
|
var fulfilled = (value) => {
|
|
35742
35753
|
try {
|
|
@@ -35759,7 +35770,7 @@ var __async$u = (__this, __arguments, generator) => {
|
|
|
35759
35770
|
const useCreateLabel = () => {
|
|
35760
35771
|
const { client } = useShipEngine();
|
|
35761
35772
|
return reactQuery.useMutation({
|
|
35762
|
-
mutationFn: (_a) => __async$
|
|
35773
|
+
mutationFn: (_a) => __async$v(void 0, null, function* () {
|
|
35763
35774
|
var _b = _a, { rateId } = _b, options = __objRest$e(_b, ["rateId"]);
|
|
35764
35775
|
const result = yield client.labels.createByRateId(rateId, options);
|
|
35765
35776
|
return result.data;
|
|
@@ -35784,41 +35795,41 @@ const useGetLabel = (labelId) => {
|
|
|
35784
35795
|
});
|
|
35785
35796
|
};
|
|
35786
35797
|
|
|
35787
|
-
var __defProp$
|
|
35788
|
-
var __defProps$
|
|
35789
|
-
var __getOwnPropDescs$
|
|
35790
|
-
var __getOwnPropSymbols$
|
|
35791
|
-
var __hasOwnProp$
|
|
35792
|
-
var __propIsEnum$
|
|
35793
|
-
var __defNormalProp$
|
|
35794
|
-
var __spreadValues$
|
|
35798
|
+
var __defProp$g = Object.defineProperty;
|
|
35799
|
+
var __defProps$d = Object.defineProperties;
|
|
35800
|
+
var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
|
|
35801
|
+
var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
|
|
35802
|
+
var __hasOwnProp$l = Object.prototype.hasOwnProperty;
|
|
35803
|
+
var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
|
|
35804
|
+
var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
35805
|
+
var __spreadValues$g = (a, b) => {
|
|
35795
35806
|
for (var prop in b || (b = {}))
|
|
35796
|
-
if (__hasOwnProp$
|
|
35797
|
-
__defNormalProp$
|
|
35798
|
-
if (__getOwnPropSymbols$
|
|
35799
|
-
for (var prop of __getOwnPropSymbols$
|
|
35800
|
-
if (__propIsEnum$
|
|
35801
|
-
__defNormalProp$
|
|
35807
|
+
if (__hasOwnProp$l.call(b, prop))
|
|
35808
|
+
__defNormalProp$g(a, prop, b[prop]);
|
|
35809
|
+
if (__getOwnPropSymbols$l)
|
|
35810
|
+
for (var prop of __getOwnPropSymbols$l(b)) {
|
|
35811
|
+
if (__propIsEnum$l.call(b, prop))
|
|
35812
|
+
__defNormalProp$g(a, prop, b[prop]);
|
|
35802
35813
|
}
|
|
35803
35814
|
return a;
|
|
35804
35815
|
};
|
|
35805
|
-
var __spreadProps$
|
|
35816
|
+
var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
|
|
35806
35817
|
var __objRest$d = (source, exclude) => {
|
|
35807
35818
|
var target = {};
|
|
35808
35819
|
for (var prop in source)
|
|
35809
|
-
if (__hasOwnProp$
|
|
35820
|
+
if (__hasOwnProp$l.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
35810
35821
|
target[prop] = source[prop];
|
|
35811
|
-
if (source != null && __getOwnPropSymbols$
|
|
35812
|
-
for (var prop of __getOwnPropSymbols$
|
|
35813
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
35822
|
+
if (source != null && __getOwnPropSymbols$l)
|
|
35823
|
+
for (var prop of __getOwnPropSymbols$l(source)) {
|
|
35824
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$l.call(source, prop))
|
|
35814
35825
|
target[prop] = source[prop];
|
|
35815
35826
|
}
|
|
35816
35827
|
return target;
|
|
35817
35828
|
};
|
|
35818
35829
|
const useListLabels = (params) => {
|
|
35819
35830
|
const { client } = useShipEngine();
|
|
35820
|
-
const _a = __spreadValues$
|
|
35821
|
-
return reactQuery.useQuery(__spreadProps$
|
|
35831
|
+
const _a = __spreadValues$g({}, params), { queryFnParams } = _a, rest = __objRest$d(_a, ["queryFnParams"]);
|
|
35832
|
+
return reactQuery.useQuery(__spreadProps$d(__spreadValues$g({}, rest), {
|
|
35822
35833
|
onError,
|
|
35823
35834
|
queryFn: () => client.labels.list(queryFnParams),
|
|
35824
35835
|
queryKey: ["useListLabels", params],
|
|
@@ -35826,7 +35837,7 @@ const useListLabels = (params) => {
|
|
|
35826
35837
|
}));
|
|
35827
35838
|
};
|
|
35828
35839
|
|
|
35829
|
-
var __async$
|
|
35840
|
+
var __async$u = (__this, __arguments, generator) => {
|
|
35830
35841
|
return new Promise((resolve, reject) => {
|
|
35831
35842
|
var fulfilled = (value) => {
|
|
35832
35843
|
try {
|
|
@@ -35849,7 +35860,7 @@ var __async$t = (__this, __arguments, generator) => {
|
|
|
35849
35860
|
const useVoidLabel = () => {
|
|
35850
35861
|
const { client } = useShipEngine();
|
|
35851
35862
|
return reactQuery.useMutation({
|
|
35852
|
-
mutationFn: (labelId) => __async$
|
|
35863
|
+
mutationFn: (labelId) => __async$u(void 0, null, function* () {
|
|
35853
35864
|
const result = yield client.labels.void(labelId);
|
|
35854
35865
|
return result.data;
|
|
35855
35866
|
}),
|
|
@@ -35858,17 +35869,36 @@ const useVoidLabel = () => {
|
|
|
35858
35869
|
});
|
|
35859
35870
|
};
|
|
35860
35871
|
|
|
35861
|
-
|
|
35872
|
+
var __defProp$f = Object.defineProperty;
|
|
35873
|
+
var __defProps$c = Object.defineProperties;
|
|
35874
|
+
var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
|
|
35875
|
+
var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
|
|
35876
|
+
var __hasOwnProp$k = Object.prototype.hasOwnProperty;
|
|
35877
|
+
var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
|
|
35878
|
+
var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
35879
|
+
var __spreadValues$f = (a, b) => {
|
|
35880
|
+
for (var prop in b || (b = {}))
|
|
35881
|
+
if (__hasOwnProp$k.call(b, prop))
|
|
35882
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
35883
|
+
if (__getOwnPropSymbols$k)
|
|
35884
|
+
for (var prop of __getOwnPropSymbols$k(b)) {
|
|
35885
|
+
if (__propIsEnum$k.call(b, prop))
|
|
35886
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
35887
|
+
}
|
|
35888
|
+
return a;
|
|
35889
|
+
};
|
|
35890
|
+
var __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
|
|
35891
|
+
const useListOrderSources = (params) => {
|
|
35862
35892
|
const { client } = useShipEngine();
|
|
35863
|
-
return reactQuery.useQuery({
|
|
35893
|
+
return reactQuery.useQuery(__spreadProps$c(__spreadValues$f({}, params), {
|
|
35864
35894
|
onError,
|
|
35865
35895
|
queryFn: () => client.orderSources.list(),
|
|
35866
35896
|
queryKey: ["useListOrderSources"],
|
|
35867
35897
|
select: (result) => result.data.orderSources
|
|
35868
|
-
});
|
|
35898
|
+
}));
|
|
35869
35899
|
};
|
|
35870
35900
|
|
|
35871
|
-
var __async$
|
|
35901
|
+
var __async$t = (__this, __arguments, generator) => {
|
|
35872
35902
|
return new Promise((resolve, reject) => {
|
|
35873
35903
|
var fulfilled = (value) => {
|
|
35874
35904
|
try {
|
|
@@ -35891,7 +35921,7 @@ var __async$s = (__this, __arguments, generator) => {
|
|
|
35891
35921
|
const useRefreshOrderSourceAsync = () => {
|
|
35892
35922
|
const { client } = useShipEngine();
|
|
35893
35923
|
return reactQuery.useMutation({
|
|
35894
|
-
mutationFn: (orderSourceId) => __async$
|
|
35924
|
+
mutationFn: (orderSourceId) => __async$t(void 0, null, function* () {
|
|
35895
35925
|
const result = yield client.orderSources.refresh(orderSourceId);
|
|
35896
35926
|
return result.data;
|
|
35897
35927
|
}),
|
|
@@ -35902,9 +35932,9 @@ const useRefreshOrderSource = () => {
|
|
|
35902
35932
|
const { client } = useShipEngine();
|
|
35903
35933
|
const { mutateAsync: refreshOrderSourceAsync } = useRefreshOrderSourceAsync();
|
|
35904
35934
|
return reactQuery.useMutation({
|
|
35905
|
-
mutationFn: (orderSourceId) => __async$
|
|
35935
|
+
mutationFn: (orderSourceId) => __async$t(void 0, null, function* () {
|
|
35906
35936
|
yield refreshOrderSourceAsync(orderSourceId);
|
|
35907
|
-
const waitResult = yield retryUntil(() => __async$
|
|
35937
|
+
const waitResult = yield retryUntil(() => __async$t(void 0, null, function* () {
|
|
35908
35938
|
const { data: checkResult } = yield client.orderSources.get(orderSourceId);
|
|
35909
35939
|
if (["preparing_update", "updating"].includes(checkResult.refreshInfo.status)) {
|
|
35910
35940
|
throw new CodedError("Order source is still refreshing");
|
|
@@ -35918,7 +35948,7 @@ const useRefreshOrderSource = () => {
|
|
|
35918
35948
|
});
|
|
35919
35949
|
};
|
|
35920
35950
|
|
|
35921
|
-
var __async$
|
|
35951
|
+
var __async$s = (__this, __arguments, generator) => {
|
|
35922
35952
|
return new Promise((resolve, reject) => {
|
|
35923
35953
|
var fulfilled = (value) => {
|
|
35924
35954
|
try {
|
|
@@ -35941,7 +35971,7 @@ var __async$r = (__this, __arguments, generator) => {
|
|
|
35941
35971
|
const useDeactivateOrderSource = () => {
|
|
35942
35972
|
const { client } = useShipEngine();
|
|
35943
35973
|
return reactQuery.useMutation({
|
|
35944
|
-
mutationFn: (orderSourceId) => __async$
|
|
35974
|
+
mutationFn: (orderSourceId) => __async$s(void 0, null, function* () {
|
|
35945
35975
|
const result = yield client.orderSources.deactivate(orderSourceId);
|
|
35946
35976
|
return result.data;
|
|
35947
35977
|
}),
|
|
@@ -35960,7 +35990,7 @@ const useListOrderSourcesConnections = () => {
|
|
|
35960
35990
|
});
|
|
35961
35991
|
};
|
|
35962
35992
|
|
|
35963
|
-
var __async$
|
|
35993
|
+
var __async$r = (__this, __arguments, generator) => {
|
|
35964
35994
|
return new Promise((resolve, reject) => {
|
|
35965
35995
|
var fulfilled = (value) => {
|
|
35966
35996
|
try {
|
|
@@ -35983,7 +36013,7 @@ var __async$q = (__this, __arguments, generator) => {
|
|
|
35983
36013
|
const useCreateRateCard = () => {
|
|
35984
36014
|
const { client } = useShipEngine();
|
|
35985
36015
|
return reactQuery.useMutation({
|
|
35986
|
-
mutationFn: (rateCard) => __async$
|
|
36016
|
+
mutationFn: (rateCard) => __async$r(void 0, null, function* () {
|
|
35987
36017
|
const result = yield client.rateCards.create(rateCard);
|
|
35988
36018
|
return result.data;
|
|
35989
36019
|
}),
|
|
@@ -36030,7 +36060,7 @@ const useListRateCards = (carrierIds) => {
|
|
|
36030
36060
|
});
|
|
36031
36061
|
};
|
|
36032
36062
|
|
|
36033
|
-
var __async$
|
|
36063
|
+
var __async$q = (__this, __arguments, generator) => {
|
|
36034
36064
|
return new Promise((resolve, reject) => {
|
|
36035
36065
|
var fulfilled = (value) => {
|
|
36036
36066
|
try {
|
|
@@ -36053,7 +36083,7 @@ var __async$p = (__this, __arguments, generator) => {
|
|
|
36053
36083
|
const usePublishRateCard = () => {
|
|
36054
36084
|
const { client } = useShipEngine();
|
|
36055
36085
|
return reactQuery.useMutation({
|
|
36056
|
-
mutationFn: (rateCardId) => __async$
|
|
36086
|
+
mutationFn: (rateCardId) => __async$q(void 0, null, function* () {
|
|
36057
36087
|
return yield client.rateCards.publish(rateCardId);
|
|
36058
36088
|
}),
|
|
36059
36089
|
mutationKey: ["usePublishRateCard"],
|
|
@@ -36061,7 +36091,7 @@ const usePublishRateCard = () => {
|
|
|
36061
36091
|
});
|
|
36062
36092
|
};
|
|
36063
36093
|
|
|
36064
|
-
var __async$
|
|
36094
|
+
var __async$p = (__this, __arguments, generator) => {
|
|
36065
36095
|
return new Promise((resolve, reject) => {
|
|
36066
36096
|
var fulfilled = (value) => {
|
|
36067
36097
|
try {
|
|
@@ -36084,7 +36114,7 @@ var __async$o = (__this, __arguments, generator) => {
|
|
|
36084
36114
|
const useUpdateRateCard = () => {
|
|
36085
36115
|
const { client } = useShipEngine();
|
|
36086
36116
|
return reactQuery.useMutation({
|
|
36087
|
-
mutationFn: (rateCard) => __async$
|
|
36117
|
+
mutationFn: (rateCard) => __async$p(void 0, null, function* () {
|
|
36088
36118
|
const result = yield client.rateCards.update(rateCard);
|
|
36089
36119
|
return result.data;
|
|
36090
36120
|
}),
|
|
@@ -36093,7 +36123,7 @@ const useUpdateRateCard = () => {
|
|
|
36093
36123
|
});
|
|
36094
36124
|
};
|
|
36095
36125
|
|
|
36096
|
-
var __async$
|
|
36126
|
+
var __async$o = (__this, __arguments, generator) => {
|
|
36097
36127
|
return new Promise((resolve, reject) => {
|
|
36098
36128
|
var fulfilled = (value) => {
|
|
36099
36129
|
try {
|
|
@@ -36116,7 +36146,7 @@ var __async$n = (__this, __arguments, generator) => {
|
|
|
36116
36146
|
const useUploadRateCard = () => {
|
|
36117
36147
|
const { client } = useShipEngine();
|
|
36118
36148
|
return reactQuery.useMutation({
|
|
36119
|
-
mutationFn: (_0) => __async$
|
|
36149
|
+
mutationFn: (_0) => __async$o(void 0, [_0], function* ({ rateCardId, file }) {
|
|
36120
36150
|
const result = yield client.rateCards.upload(rateCardId, file);
|
|
36121
36151
|
return result.data;
|
|
36122
36152
|
}),
|
|
@@ -36125,7 +36155,7 @@ const useUploadRateCard = () => {
|
|
|
36125
36155
|
});
|
|
36126
36156
|
};
|
|
36127
36157
|
|
|
36128
|
-
var __async$
|
|
36158
|
+
var __async$n = (__this, __arguments, generator) => {
|
|
36129
36159
|
return new Promise((resolve, reject) => {
|
|
36130
36160
|
var fulfilled = (value) => {
|
|
36131
36161
|
try {
|
|
@@ -36148,7 +36178,7 @@ var __async$m = (__this, __arguments, generator) => {
|
|
|
36148
36178
|
const useDeleteRateCard = () => {
|
|
36149
36179
|
const { client } = useShipEngine();
|
|
36150
36180
|
return reactQuery.useMutation({
|
|
36151
|
-
mutationFn: (rateCardId) => __async$
|
|
36181
|
+
mutationFn: (rateCardId) => __async$n(void 0, null, function* () {
|
|
36152
36182
|
const result = yield client.rateCards.delete(rateCardId);
|
|
36153
36183
|
return result.data;
|
|
36154
36184
|
}),
|
|
@@ -36157,7 +36187,7 @@ const useDeleteRateCard = () => {
|
|
|
36157
36187
|
});
|
|
36158
36188
|
};
|
|
36159
36189
|
|
|
36160
|
-
var __async$
|
|
36190
|
+
var __async$m = (__this, __arguments, generator) => {
|
|
36161
36191
|
return new Promise((resolve, reject) => {
|
|
36162
36192
|
var fulfilled = (value) => {
|
|
36163
36193
|
try {
|
|
@@ -36180,7 +36210,7 @@ var __async$l = (__this, __arguments, generator) => {
|
|
|
36180
36210
|
const useCalculateRates = () => {
|
|
36181
36211
|
const { client } = useShipEngine();
|
|
36182
36212
|
return reactQuery.useMutation({
|
|
36183
|
-
mutationFn: (_0) => __async$
|
|
36213
|
+
mutationFn: (_0) => __async$m(void 0, [_0], function* ({ rateOptions, shipmentId }) {
|
|
36184
36214
|
const result = yield client.rates.calculateByShipmentId(shipmentId, rateOptions);
|
|
36185
36215
|
return result.data;
|
|
36186
36216
|
}),
|
|
@@ -36189,7 +36219,7 @@ const useCalculateRates = () => {
|
|
|
36189
36219
|
});
|
|
36190
36220
|
};
|
|
36191
36221
|
|
|
36192
|
-
var __async$
|
|
36222
|
+
var __async$l = (__this, __arguments, generator) => {
|
|
36193
36223
|
return new Promise((resolve, reject) => {
|
|
36194
36224
|
var fulfilled = (value) => {
|
|
36195
36225
|
try {
|
|
@@ -36212,7 +36242,7 @@ var __async$k = (__this, __arguments, generator) => {
|
|
|
36212
36242
|
const useRatesEstimate = () => {
|
|
36213
36243
|
const { client } = useShipEngine();
|
|
36214
36244
|
return reactQuery.useMutation({
|
|
36215
|
-
mutationFn: (_0) => __async$
|
|
36245
|
+
mutationFn: (_0) => __async$l(void 0, [_0], function* ({ rateParams }) {
|
|
36216
36246
|
const result = yield client.rates.estimate(rateParams);
|
|
36217
36247
|
return result.data;
|
|
36218
36248
|
}),
|
|
@@ -36262,7 +36292,7 @@ var __objRest$c = (source, exclude) => {
|
|
|
36262
36292
|
}
|
|
36263
36293
|
return target;
|
|
36264
36294
|
};
|
|
36265
|
-
var __async$
|
|
36295
|
+
var __async$k = (__this, __arguments, generator) => {
|
|
36266
36296
|
return new Promise((resolve, reject) => {
|
|
36267
36297
|
var fulfilled = (value) => {
|
|
36268
36298
|
try {
|
|
@@ -36285,7 +36315,7 @@ var __async$j = (__this, __arguments, generator) => {
|
|
|
36285
36315
|
const useNotifySalesOrderShipped = () => {
|
|
36286
36316
|
const { client } = useShipEngine();
|
|
36287
36317
|
return reactQuery.useMutation({
|
|
36288
|
-
mutationFn: (_a) => __async$
|
|
36318
|
+
mutationFn: (_a) => __async$k(void 0, null, function* () {
|
|
36289
36319
|
var _b = _a, { salesOrderId } = _b, tracking = __objRest$c(_b, ["salesOrderId"]);
|
|
36290
36320
|
const result = yield client.salesOrders.notifyShipped(salesOrderId, tracking);
|
|
36291
36321
|
return result.data;
|
|
@@ -36310,7 +36340,7 @@ var __objRest$b = (source, exclude) => {
|
|
|
36310
36340
|
}
|
|
36311
36341
|
return target;
|
|
36312
36342
|
};
|
|
36313
|
-
var __async$
|
|
36343
|
+
var __async$j = (__this, __arguments, generator) => {
|
|
36314
36344
|
return new Promise((resolve, reject) => {
|
|
36315
36345
|
var fulfilled = (value) => {
|
|
36316
36346
|
try {
|
|
@@ -36333,7 +36363,7 @@ var __async$i = (__this, __arguments, generator) => {
|
|
|
36333
36363
|
const useCreateSalesOrderShipment = () => {
|
|
36334
36364
|
const { client } = useShipEngine();
|
|
36335
36365
|
return reactQuery.useMutation({
|
|
36336
|
-
mutationFn: (_a) => __async$
|
|
36366
|
+
mutationFn: (_a) => __async$j(void 0, null, function* () {
|
|
36337
36367
|
var _b = _a, { salesOrderId } = _b, shipment = __objRest$b(_b, ["salesOrderId"]);
|
|
36338
36368
|
const result = yield client.salesOrderShipments.create(salesOrderId, shipment);
|
|
36339
36369
|
return result.data;
|
|
@@ -36384,7 +36414,7 @@ var __objRest$a = (source, exclude) => {
|
|
|
36384
36414
|
}
|
|
36385
36415
|
return target;
|
|
36386
36416
|
};
|
|
36387
|
-
var __async$
|
|
36417
|
+
var __async$i = (__this, __arguments, generator) => {
|
|
36388
36418
|
return new Promise((resolve, reject) => {
|
|
36389
36419
|
var fulfilled = (value) => {
|
|
36390
36420
|
try {
|
|
@@ -36407,7 +36437,7 @@ var __async$h = (__this, __arguments, generator) => {
|
|
|
36407
36437
|
const useUpdateSalesOrderShipment = () => {
|
|
36408
36438
|
const { client } = useShipEngine();
|
|
36409
36439
|
return reactQuery.useMutation({
|
|
36410
|
-
mutationFn: (_a) => __async$
|
|
36440
|
+
mutationFn: (_a) => __async$i(void 0, null, function* () {
|
|
36411
36441
|
var _b = _a, { shipmentId } = _b, shipment = __objRest$a(_b, ["shipmentId"]);
|
|
36412
36442
|
const result = yield client.salesOrderShipments.update(shipmentId, shipment);
|
|
36413
36443
|
return result.data;
|
|
@@ -36436,7 +36466,7 @@ var __spreadValues$e = (a, b) => {
|
|
|
36436
36466
|
return a;
|
|
36437
36467
|
};
|
|
36438
36468
|
var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
|
|
36439
|
-
var __async$
|
|
36469
|
+
var __async$h = (__this, __arguments, generator) => {
|
|
36440
36470
|
return new Promise((resolve, reject) => {
|
|
36441
36471
|
var fulfilled = (value) => {
|
|
36442
36472
|
try {
|
|
@@ -36459,7 +36489,7 @@ var __async$g = (__this, __arguments, generator) => {
|
|
|
36459
36489
|
const useCreateShipment = () => {
|
|
36460
36490
|
const { client } = useShipEngine();
|
|
36461
36491
|
return reactQuery.useMutation({
|
|
36462
|
-
mutationFn: (shipment) => __async$
|
|
36492
|
+
mutationFn: (shipment) => __async$h(void 0, null, function* () {
|
|
36463
36493
|
var _a;
|
|
36464
36494
|
if (shipment.warehouseId === void 0 && shipment.shipFrom === void 0) {
|
|
36465
36495
|
throw new CodedError("errorMessages.noWarehouses", {
|
|
@@ -36627,6 +36657,38 @@ const useGetShipmentByExternalId = (params) => {
|
|
|
36627
36657
|
}));
|
|
36628
36658
|
};
|
|
36629
36659
|
|
|
36660
|
+
var __async$g = (__this, __arguments, generator) => {
|
|
36661
|
+
return new Promise((resolve, reject) => {
|
|
36662
|
+
var fulfilled = (value) => {
|
|
36663
|
+
try {
|
|
36664
|
+
step(generator.next(value));
|
|
36665
|
+
} catch (e) {
|
|
36666
|
+
reject(e);
|
|
36667
|
+
}
|
|
36668
|
+
};
|
|
36669
|
+
var rejected = (value) => {
|
|
36670
|
+
try {
|
|
36671
|
+
step(generator.throw(value));
|
|
36672
|
+
} catch (e) {
|
|
36673
|
+
reject(e);
|
|
36674
|
+
}
|
|
36675
|
+
};
|
|
36676
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
36677
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
36678
|
+
});
|
|
36679
|
+
};
|
|
36680
|
+
const useCancelShipment = () => {
|
|
36681
|
+
const { client } = useShipEngine();
|
|
36682
|
+
return reactQuery.useMutation({
|
|
36683
|
+
mutationFn: (shipmentId) => __async$g(void 0, null, function* () {
|
|
36684
|
+
const result = yield client.shipments.cancel(shipmentId);
|
|
36685
|
+
return result.data;
|
|
36686
|
+
}),
|
|
36687
|
+
mutationKey: ["useCancelShipment"],
|
|
36688
|
+
onError
|
|
36689
|
+
});
|
|
36690
|
+
};
|
|
36691
|
+
|
|
36630
36692
|
var __defProp$b = Object.defineProperty;
|
|
36631
36693
|
var __defProps$8 = Object.defineProperties;
|
|
36632
36694
|
var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
|
|
@@ -38726,6 +38788,7 @@ exports.useAddInsuranceFunds = useAddInsuranceFunds;
|
|
|
38726
38788
|
exports.useAddSandboxCarriers = useAddSandboxCarriers;
|
|
38727
38789
|
exports.useAlchemy = useAlchemy;
|
|
38728
38790
|
exports.useCalculateRates = useCalculateRates;
|
|
38791
|
+
exports.useCancelShipment = useCancelShipment;
|
|
38729
38792
|
exports.useCarrierConnectionsServicesList = useCarrierConnectionsServicesList;
|
|
38730
38793
|
exports.useConnectCarrier = useConnectCarrier;
|
|
38731
38794
|
exports.useConnectCarrierAccount = useConnectCarrierAccount;
|