@shipengine/alchemy 6.0.28 → 6.0.30
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 +462 -392
- package/index.mjs +463 -394
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -4905,41 +4905,33 @@ var _getHolder = getHolder$2;
|
|
|
4905
4905
|
|
|
4906
4906
|
/** Used as references for various `Number` constants. */
|
|
4907
4907
|
|
|
4908
|
-
var
|
|
4909
|
-
var hasRequired_isIndex;
|
|
4908
|
+
var MAX_SAFE_INTEGER$1 = 9007199254740991;
|
|
4910
4909
|
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
hasRequired_isIndex = 1;
|
|
4914
|
-
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
4910
|
+
/** Used to detect unsigned integer values. */
|
|
4911
|
+
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
4915
4912
|
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
function isIndex(value, length) {
|
|
4928
|
-
var type = typeof value;
|
|
4929
|
-
length = length == null ? MAX_SAFE_INTEGER : length;
|
|
4930
|
-
|
|
4931
|
-
return !!length &&
|
|
4932
|
-
(type == 'number' ||
|
|
4933
|
-
(type != 'symbol' && reIsUint.test(value))) &&
|
|
4934
|
-
(value > -1 && value % 1 == 0 && value < length);
|
|
4935
|
-
}
|
|
4913
|
+
/**
|
|
4914
|
+
* Checks if `value` is a valid array-like index.
|
|
4915
|
+
*
|
|
4916
|
+
* @private
|
|
4917
|
+
* @param {*} value The value to check.
|
|
4918
|
+
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
|
4919
|
+
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
|
4920
|
+
*/
|
|
4921
|
+
function isIndex$3(value, length) {
|
|
4922
|
+
var type = typeof value;
|
|
4923
|
+
length = length == null ? MAX_SAFE_INTEGER$1 : length;
|
|
4936
4924
|
|
|
4937
|
-
|
|
4938
|
-
|
|
4925
|
+
return !!length &&
|
|
4926
|
+
(type == 'number' ||
|
|
4927
|
+
(type != 'symbol' && reIsUint.test(value))) &&
|
|
4928
|
+
(value > -1 && value % 1 == 0 && value < length);
|
|
4939
4929
|
}
|
|
4940
4930
|
|
|
4931
|
+
var _isIndex = isIndex$3;
|
|
4932
|
+
|
|
4941
4933
|
var copyArray$2 = _copyArray,
|
|
4942
|
-
isIndex$2 =
|
|
4934
|
+
isIndex$2 = _isIndex;
|
|
4943
4935
|
|
|
4944
4936
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
4945
4937
|
var nativeMin$1 = Math.min;
|
|
@@ -6132,7 +6124,7 @@ var baseTimes = _baseTimes,
|
|
|
6132
6124
|
isArguments$2 = requireIsArguments(),
|
|
6133
6125
|
isArray$f = isArray_1,
|
|
6134
6126
|
isBuffer$4 = isBufferExports,
|
|
6135
|
-
isIndex$1 =
|
|
6127
|
+
isIndex$1 = _isIndex,
|
|
6136
6128
|
isTypedArray$1 = requireIsTypedArray();
|
|
6137
6129
|
|
|
6138
6130
|
/** Used for built-in method references. */
|
|
@@ -9463,7 +9455,7 @@ var _baseHasIn = baseHasIn$1;
|
|
|
9463
9455
|
var castPath = _castPath,
|
|
9464
9456
|
isArguments$1 = requireIsArguments(),
|
|
9465
9457
|
isArray$8 = isArray_1,
|
|
9466
|
-
isIndex =
|
|
9458
|
+
isIndex = _isIndex,
|
|
9467
9459
|
isLength = isLength_1,
|
|
9468
9460
|
toKey$3 = _toKey;
|
|
9469
9461
|
|
|
@@ -10353,7 +10345,7 @@ function require_isIterateeCall () {
|
|
|
10353
10345
|
hasRequired_isIterateeCall = 1;
|
|
10354
10346
|
var eq = requireEq(),
|
|
10355
10347
|
isArrayLike = isArrayLike_1,
|
|
10356
|
-
isIndex =
|
|
10348
|
+
isIndex = _isIndex,
|
|
10357
10349
|
isObject = isObject_1;
|
|
10358
10350
|
|
|
10359
10351
|
/**
|
|
@@ -10820,17 +10812,17 @@ var AccountBillingPlanChangeType = /* @__PURE__ */ ((AccountBillingPlanChangeTyp
|
|
|
10820
10812
|
return AccountBillingPlanChangeType2;
|
|
10821
10813
|
})(AccountBillingPlanChangeType || {});
|
|
10822
10814
|
|
|
10823
|
-
var __getOwnPropSymbols$
|
|
10824
|
-
var __hasOwnProp$
|
|
10825
|
-
var __propIsEnum$
|
|
10826
|
-
var __objRest$
|
|
10815
|
+
var __getOwnPropSymbols$I = Object.getOwnPropertySymbols;
|
|
10816
|
+
var __hasOwnProp$I = Object.prototype.hasOwnProperty;
|
|
10817
|
+
var __propIsEnum$I = Object.prototype.propertyIsEnumerable;
|
|
10818
|
+
var __objRest$q = (source, exclude) => {
|
|
10827
10819
|
var target = {};
|
|
10828
10820
|
for (var prop in source)
|
|
10829
|
-
if (__hasOwnProp$
|
|
10821
|
+
if (__hasOwnProp$I.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
10830
10822
|
target[prop] = source[prop];
|
|
10831
|
-
if (source != null && __getOwnPropSymbols$
|
|
10832
|
-
for (var prop of __getOwnPropSymbols$
|
|
10833
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
10823
|
+
if (source != null && __getOwnPropSymbols$I)
|
|
10824
|
+
for (var prop of __getOwnPropSymbols$I(source)) {
|
|
10825
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$I.call(source, prop))
|
|
10834
10826
|
target[prop] = source[prop];
|
|
10835
10827
|
}
|
|
10836
10828
|
return target;
|
|
@@ -10844,7 +10836,7 @@ class CodedError {
|
|
|
10844
10836
|
this.message = message;
|
|
10845
10837
|
}
|
|
10846
10838
|
static fromObject(_a) {
|
|
10847
|
-
var _b = _a, { message } = _b, options = __objRest$
|
|
10839
|
+
var _b = _a, { message } = _b, options = __objRest$q(_b, ["message"]);
|
|
10848
10840
|
return new CodedError(message, options);
|
|
10849
10841
|
}
|
|
10850
10842
|
}
|
|
@@ -10963,17 +10955,17 @@ const types = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
10963
10955
|
RateCardStatus
|
|
10964
10956
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
10965
10957
|
|
|
10966
|
-
var __getOwnPropSymbols$
|
|
10967
|
-
var __hasOwnProp$
|
|
10968
|
-
var __propIsEnum$
|
|
10969
|
-
var __objRest$
|
|
10958
|
+
var __getOwnPropSymbols$H = Object.getOwnPropertySymbols;
|
|
10959
|
+
var __hasOwnProp$H = Object.prototype.hasOwnProperty;
|
|
10960
|
+
var __propIsEnum$H = Object.prototype.propertyIsEnumerable;
|
|
10961
|
+
var __objRest$p = (source, exclude) => {
|
|
10970
10962
|
var target = {};
|
|
10971
10963
|
for (var prop in source)
|
|
10972
|
-
if (__hasOwnProp$
|
|
10964
|
+
if (__hasOwnProp$H.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
10973
10965
|
target[prop] = source[prop];
|
|
10974
|
-
if (source != null && __getOwnPropSymbols$
|
|
10975
|
-
for (var prop of __getOwnPropSymbols$
|
|
10976
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
10966
|
+
if (source != null && __getOwnPropSymbols$H)
|
|
10967
|
+
for (var prop of __getOwnPropSymbols$H(source)) {
|
|
10968
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$H.call(source, prop))
|
|
10977
10969
|
target[prop] = source[prop];
|
|
10978
10970
|
}
|
|
10979
10971
|
return target;
|
|
@@ -11005,7 +10997,7 @@ class AccountSettingsAPI {
|
|
|
11005
10997
|
* The `updateImage` method updates specific image data for a given image id.
|
|
11006
10998
|
*/
|
|
11007
10999
|
this.updateImage = (_a) => {
|
|
11008
|
-
var _b = _a, { labelImageId } = _b, data = __objRest$
|
|
11000
|
+
var _b = _a, { labelImageId } = _b, data = __objRest$p(_b, ["labelImageId"]);
|
|
11009
11001
|
return this.client.put(`/v1/account/settings/images/${labelImageId}`, data);
|
|
11010
11002
|
};
|
|
11011
11003
|
/**
|
|
@@ -13715,7 +13707,7 @@ var ipaddr = {
|
|
|
13715
13707
|
}).call(commonjsGlobal);
|
|
13716
13708
|
} (ipaddr));
|
|
13717
13709
|
|
|
13718
|
-
var __async$
|
|
13710
|
+
var __async$Y = (__this, __arguments, generator) => {
|
|
13719
13711
|
return new Promise((resolve, reject) => {
|
|
13720
13712
|
var fulfilled = (value) => {
|
|
13721
13713
|
try {
|
|
@@ -13735,7 +13727,7 @@ var __async$X = (__this, __arguments, generator) => {
|
|
|
13735
13727
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
13736
13728
|
});
|
|
13737
13729
|
};
|
|
13738
|
-
const getEndUserIpAddress = () => __async$
|
|
13730
|
+
const getEndUserIpAddress = () => __async$Y(void 0, null, function* () {
|
|
13739
13731
|
try {
|
|
13740
13732
|
const response = yield axios.get("https://api.ipify.org/?format=json");
|
|
13741
13733
|
if (response.data.ip && ipaddrExports.isValid(response.data.ip)) {
|
|
@@ -13792,38 +13784,38 @@ const decamelizeKeys = (obj, separator = "_") => {
|
|
|
13792
13784
|
return obj;
|
|
13793
13785
|
};
|
|
13794
13786
|
|
|
13795
|
-
var __defProp$
|
|
13796
|
-
var __defProps$
|
|
13797
|
-
var __getOwnPropDescs$
|
|
13798
|
-
var __getOwnPropSymbols$
|
|
13799
|
-
var __hasOwnProp$
|
|
13800
|
-
var __propIsEnum$
|
|
13801
|
-
var __defNormalProp$
|
|
13802
|
-
var __spreadValues$
|
|
13787
|
+
var __defProp$v = Object.defineProperty;
|
|
13788
|
+
var __defProps$p = Object.defineProperties;
|
|
13789
|
+
var __getOwnPropDescs$p = Object.getOwnPropertyDescriptors;
|
|
13790
|
+
var __getOwnPropSymbols$G = Object.getOwnPropertySymbols;
|
|
13791
|
+
var __hasOwnProp$G = Object.prototype.hasOwnProperty;
|
|
13792
|
+
var __propIsEnum$G = Object.prototype.propertyIsEnumerable;
|
|
13793
|
+
var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13794
|
+
var __spreadValues$v = (a, b) => {
|
|
13803
13795
|
for (var prop in b || (b = {}))
|
|
13804
|
-
if (__hasOwnProp$
|
|
13805
|
-
__defNormalProp$
|
|
13806
|
-
if (__getOwnPropSymbols$
|
|
13807
|
-
for (var prop of __getOwnPropSymbols$
|
|
13808
|
-
if (__propIsEnum$
|
|
13809
|
-
__defNormalProp$
|
|
13796
|
+
if (__hasOwnProp$G.call(b, prop))
|
|
13797
|
+
__defNormalProp$v(a, prop, b[prop]);
|
|
13798
|
+
if (__getOwnPropSymbols$G)
|
|
13799
|
+
for (var prop of __getOwnPropSymbols$G(b)) {
|
|
13800
|
+
if (__propIsEnum$G.call(b, prop))
|
|
13801
|
+
__defNormalProp$v(a, prop, b[prop]);
|
|
13810
13802
|
}
|
|
13811
13803
|
return a;
|
|
13812
13804
|
};
|
|
13813
|
-
var __spreadProps$
|
|
13814
|
-
var __objRest$
|
|
13805
|
+
var __spreadProps$p = (a, b) => __defProps$p(a, __getOwnPropDescs$p(b));
|
|
13806
|
+
var __objRest$o = (source, exclude) => {
|
|
13815
13807
|
var target = {};
|
|
13816
13808
|
for (var prop in source)
|
|
13817
|
-
if (__hasOwnProp$
|
|
13809
|
+
if (__hasOwnProp$G.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
13818
13810
|
target[prop] = source[prop];
|
|
13819
|
-
if (source != null && __getOwnPropSymbols$
|
|
13820
|
-
for (var prop of __getOwnPropSymbols$
|
|
13821
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
13811
|
+
if (source != null && __getOwnPropSymbols$G)
|
|
13812
|
+
for (var prop of __getOwnPropSymbols$G(source)) {
|
|
13813
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$G.call(source, prop))
|
|
13822
13814
|
target[prop] = source[prop];
|
|
13823
13815
|
}
|
|
13824
13816
|
return target;
|
|
13825
13817
|
};
|
|
13826
|
-
var __async$
|
|
13818
|
+
var __async$X = (__this, __arguments, generator) => {
|
|
13827
13819
|
return new Promise((resolve, reject) => {
|
|
13828
13820
|
var fulfilled = (value) => {
|
|
13829
13821
|
try {
|
|
@@ -13863,12 +13855,12 @@ class CarriersAPI {
|
|
|
13863
13855
|
/**
|
|
13864
13856
|
* The `connect` method connects a carrier account to a user's ShipEngine account.
|
|
13865
13857
|
*/
|
|
13866
|
-
this.connect = (_a) => __async$
|
|
13867
|
-
var _b = _a, { carrierCode } = _b, connection = __objRest$
|
|
13858
|
+
this.connect = (_a) => __async$X(this, null, function* () {
|
|
13859
|
+
var _b = _a, { carrierCode } = _b, connection = __objRest$o(_b, ["carrierCode"]);
|
|
13868
13860
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
13869
13861
|
if (!endUserIpAddress)
|
|
13870
13862
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
13871
|
-
return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$
|
|
13863
|
+
return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$p(__spreadValues$v({}, connection), {
|
|
13872
13864
|
endUserIpAddress
|
|
13873
13865
|
}));
|
|
13874
13866
|
});
|
|
@@ -13954,7 +13946,7 @@ class CarriersAPI {
|
|
|
13954
13946
|
}
|
|
13955
13947
|
}
|
|
13956
13948
|
|
|
13957
|
-
var __async$
|
|
13949
|
+
var __async$W = (__this, __arguments, generator) => {
|
|
13958
13950
|
return new Promise((resolve, reject) => {
|
|
13959
13951
|
var fulfilled = (value) => {
|
|
13960
13952
|
try {
|
|
@@ -13996,7 +13988,7 @@ class ConnectionsAPI {
|
|
|
13996
13988
|
/**
|
|
13997
13989
|
* The `connectCarrier` method connects a carrier to account.
|
|
13998
13990
|
*/
|
|
13999
|
-
this.connectCarrier = (carrierName, formData) => __async$
|
|
13991
|
+
this.connectCarrier = (carrierName, formData) => __async$W(this, null, function* () {
|
|
14000
13992
|
return yield this.client.post(
|
|
14001
13993
|
`/v1/connections/carriers/${carrierName}`,
|
|
14002
13994
|
formData,
|
|
@@ -16171,23 +16163,23 @@ class CustomPackagesAPI {
|
|
|
16171
16163
|
}
|
|
16172
16164
|
}
|
|
16173
16165
|
|
|
16174
|
-
var __defProp$
|
|
16175
|
-
var __getOwnPropSymbols$
|
|
16176
|
-
var __hasOwnProp$
|
|
16177
|
-
var __propIsEnum$
|
|
16178
|
-
var __defNormalProp$
|
|
16179
|
-
var __spreadValues$
|
|
16166
|
+
var __defProp$u = Object.defineProperty;
|
|
16167
|
+
var __getOwnPropSymbols$F = Object.getOwnPropertySymbols;
|
|
16168
|
+
var __hasOwnProp$F = Object.prototype.hasOwnProperty;
|
|
16169
|
+
var __propIsEnum$F = Object.prototype.propertyIsEnumerable;
|
|
16170
|
+
var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16171
|
+
var __spreadValues$u = (a, b) => {
|
|
16180
16172
|
for (var prop in b || (b = {}))
|
|
16181
|
-
if (__hasOwnProp$
|
|
16182
|
-
__defNormalProp$
|
|
16183
|
-
if (__getOwnPropSymbols$
|
|
16184
|
-
for (var prop of __getOwnPropSymbols$
|
|
16185
|
-
if (__propIsEnum$
|
|
16186
|
-
__defNormalProp$
|
|
16173
|
+
if (__hasOwnProp$F.call(b, prop))
|
|
16174
|
+
__defNormalProp$u(a, prop, b[prop]);
|
|
16175
|
+
if (__getOwnPropSymbols$F)
|
|
16176
|
+
for (var prop of __getOwnPropSymbols$F(b)) {
|
|
16177
|
+
if (__propIsEnum$F.call(b, prop))
|
|
16178
|
+
__defNormalProp$u(a, prop, b[prop]);
|
|
16187
16179
|
}
|
|
16188
16180
|
return a;
|
|
16189
16181
|
};
|
|
16190
|
-
var __async$
|
|
16182
|
+
var __async$V = (__this, __arguments, generator) => {
|
|
16191
16183
|
return new Promise((resolve, reject) => {
|
|
16192
16184
|
var fulfilled = (value) => {
|
|
16193
16185
|
try {
|
|
@@ -16226,12 +16218,12 @@ class FundingSourcesAPI {
|
|
|
16226
16218
|
* The `create` method creates a new funding source for a given user. This requires
|
|
16227
16219
|
* payment information to be collected from the user.
|
|
16228
16220
|
*/
|
|
16229
|
-
this.create = (createFundingSource) => __async$
|
|
16221
|
+
this.create = (createFundingSource) => __async$V(this, null, function* () {
|
|
16230
16222
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16231
16223
|
if (!endUserIpAddress) {
|
|
16232
16224
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
16233
16225
|
}
|
|
16234
|
-
return yield this.client.post("/v1/funding_sources", __spreadValues$
|
|
16226
|
+
return yield this.client.post("/v1/funding_sources", __spreadValues$u({
|
|
16235
16227
|
endUserIpAddress
|
|
16236
16228
|
}, createFundingSource));
|
|
16237
16229
|
});
|
|
@@ -16240,7 +16232,7 @@ class FundingSourcesAPI {
|
|
|
16240
16232
|
* user to update the billing address or payment information associated with the
|
|
16241
16233
|
* funding source.
|
|
16242
16234
|
*/
|
|
16243
|
-
this.update = (billingInfo, creditCardInfo, fundingSourceId) => __async$
|
|
16235
|
+
this.update = (billingInfo, creditCardInfo, fundingSourceId) => __async$V(this, null, function* () {
|
|
16244
16236
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16245
16237
|
if (!endUserIpAddress) {
|
|
16246
16238
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
@@ -16258,19 +16250,19 @@ class FundingSourcesAPI {
|
|
|
16258
16250
|
* The `registerCarrier` method registers a carrier account and associates
|
|
16259
16251
|
* it with a given funding source.
|
|
16260
16252
|
*/
|
|
16261
|
-
this.registerCarrier = (carrier) => __async$
|
|
16253
|
+
this.registerCarrier = (carrier) => __async$V(this, null, function* () {
|
|
16262
16254
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16263
16255
|
if (!endUserIpAddress) {
|
|
16264
16256
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
16265
16257
|
}
|
|
16266
|
-
return yield this.client.post("/v1/registration/funding_source", __spreadValues$
|
|
16258
|
+
return yield this.client.post("/v1/registration/funding_source", __spreadValues$u({
|
|
16267
16259
|
endUserIpAddress
|
|
16268
16260
|
}, carrier));
|
|
16269
16261
|
});
|
|
16270
16262
|
/**
|
|
16271
16263
|
* The `addFunds` method allows you to add funds to a funding source.
|
|
16272
16264
|
*/
|
|
16273
|
-
this.addFunds = (amount, fundingSourceId) => __async$
|
|
16265
|
+
this.addFunds = (amount, fundingSourceId) => __async$V(this, null, function* () {
|
|
16274
16266
|
return yield this.client.put(
|
|
16275
16267
|
`/v1/funding_sources/${fundingSourceId}/add_funds`,
|
|
16276
16268
|
amount
|
|
@@ -16280,7 +16272,7 @@ class FundingSourcesAPI {
|
|
|
16280
16272
|
* The `metadata` method returns seller-specific requirements for creating funding sources
|
|
16281
16273
|
* and attaching carriers
|
|
16282
16274
|
*/
|
|
16283
|
-
this.metadata = () => __async$
|
|
16275
|
+
this.metadata = () => __async$V(this, null, function* () {
|
|
16284
16276
|
return yield this.client.get("/v1/funding_sources/metadata");
|
|
16285
16277
|
});
|
|
16286
16278
|
/**
|
|
@@ -16332,7 +16324,7 @@ class InsuranceAPI {
|
|
|
16332
16324
|
}
|
|
16333
16325
|
}
|
|
16334
16326
|
|
|
16335
|
-
var __async$
|
|
16327
|
+
var __async$U = (__this, __arguments, generator) => {
|
|
16336
16328
|
return new Promise((resolve, reject) => {
|
|
16337
16329
|
var fulfilled = (value) => {
|
|
16338
16330
|
try {
|
|
@@ -16364,13 +16356,13 @@ class InvoiceAddressAPI {
|
|
|
16364
16356
|
/**
|
|
16365
16357
|
* The `create` method creates a new invoice address for a given user.
|
|
16366
16358
|
*/
|
|
16367
|
-
this.create = (invoiceAddress) => __async$
|
|
16359
|
+
this.create = (invoiceAddress) => __async$U(this, null, function* () {
|
|
16368
16360
|
return yield this.client.post("/v1/invoice_address", invoiceAddress);
|
|
16369
16361
|
});
|
|
16370
16362
|
/**
|
|
16371
16363
|
* The `update` method updates a invoice address for a given user.
|
|
16372
16364
|
*/
|
|
16373
|
-
this.update = (invoiceAddress) => __async$
|
|
16365
|
+
this.update = (invoiceAddress) => __async$U(this, null, function* () {
|
|
16374
16366
|
return yield this.client.put("/v1/invoice_address", invoiceAddress);
|
|
16375
16367
|
});
|
|
16376
16368
|
this.client = client;
|
|
@@ -16412,17 +16404,17 @@ class LabelsAPI {
|
|
|
16412
16404
|
}
|
|
16413
16405
|
}
|
|
16414
16406
|
|
|
16415
|
-
var __getOwnPropSymbols$
|
|
16416
|
-
var __hasOwnProp$
|
|
16417
|
-
var __propIsEnum$
|
|
16418
|
-
var __objRest$
|
|
16407
|
+
var __getOwnPropSymbols$E = Object.getOwnPropertySymbols;
|
|
16408
|
+
var __hasOwnProp$E = Object.prototype.hasOwnProperty;
|
|
16409
|
+
var __propIsEnum$E = Object.prototype.propertyIsEnumerable;
|
|
16410
|
+
var __objRest$n = (source, exclude) => {
|
|
16419
16411
|
var target = {};
|
|
16420
16412
|
for (var prop in source)
|
|
16421
|
-
if (__hasOwnProp$
|
|
16413
|
+
if (__hasOwnProp$E.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
16422
16414
|
target[prop] = source[prop];
|
|
16423
|
-
if (source != null && __getOwnPropSymbols$
|
|
16424
|
-
for (var prop of __getOwnPropSymbols$
|
|
16425
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
16415
|
+
if (source != null && __getOwnPropSymbols$E)
|
|
16416
|
+
for (var prop of __getOwnPropSymbols$E(source)) {
|
|
16417
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$E.call(source, prop))
|
|
16426
16418
|
target[prop] = source[prop];
|
|
16427
16419
|
}
|
|
16428
16420
|
return target;
|
|
@@ -16454,7 +16446,7 @@ class OrderSourcesAPI {
|
|
|
16454
16446
|
* The `update` method will allow the user to update a connected Order Source
|
|
16455
16447
|
*/
|
|
16456
16448
|
this.update = (_a) => {
|
|
16457
|
-
var _b = _a, { orderSourceId } = _b, rest = __objRest$
|
|
16449
|
+
var _b = _a, { orderSourceId } = _b, rest = __objRest$n(_b, ["orderSourceId"]);
|
|
16458
16450
|
return this.client.put(`/v-beta/order_sources/${orderSourceId}`, rest);
|
|
16459
16451
|
};
|
|
16460
16452
|
/**
|
|
@@ -16543,19 +16535,19 @@ class RateCardsAPI {
|
|
|
16543
16535
|
}
|
|
16544
16536
|
}
|
|
16545
16537
|
|
|
16546
|
-
var __defProp$
|
|
16547
|
-
var __getOwnPropSymbols$
|
|
16548
|
-
var __hasOwnProp$
|
|
16549
|
-
var __propIsEnum$
|
|
16550
|
-
var __defNormalProp$
|
|
16551
|
-
var __spreadValues$
|
|
16538
|
+
var __defProp$t = Object.defineProperty;
|
|
16539
|
+
var __getOwnPropSymbols$D = Object.getOwnPropertySymbols;
|
|
16540
|
+
var __hasOwnProp$D = Object.prototype.hasOwnProperty;
|
|
16541
|
+
var __propIsEnum$D = Object.prototype.propertyIsEnumerable;
|
|
16542
|
+
var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16543
|
+
var __spreadValues$t = (a, b) => {
|
|
16552
16544
|
for (var prop in b || (b = {}))
|
|
16553
|
-
if (__hasOwnProp$
|
|
16554
|
-
__defNormalProp$
|
|
16555
|
-
if (__getOwnPropSymbols$
|
|
16556
|
-
for (var prop of __getOwnPropSymbols$
|
|
16557
|
-
if (__propIsEnum$
|
|
16558
|
-
__defNormalProp$
|
|
16545
|
+
if (__hasOwnProp$D.call(b, prop))
|
|
16546
|
+
__defNormalProp$t(a, prop, b[prop]);
|
|
16547
|
+
if (__getOwnPropSymbols$D)
|
|
16548
|
+
for (var prop of __getOwnPropSymbols$D(b)) {
|
|
16549
|
+
if (__propIsEnum$D.call(b, prop))
|
|
16550
|
+
__defNormalProp$t(a, prop, b[prop]);
|
|
16559
16551
|
}
|
|
16560
16552
|
return a;
|
|
16561
16553
|
};
|
|
@@ -16577,7 +16569,7 @@ class RatesAPI {
|
|
|
16577
16569
|
* method.
|
|
16578
16570
|
*/
|
|
16579
16571
|
this.estimate = (params) => {
|
|
16580
|
-
return this.client.post("/v1/rates/estimate", __spreadValues$
|
|
16572
|
+
return this.client.post("/v1/rates/estimate", __spreadValues$t({}, params));
|
|
16581
16573
|
};
|
|
16582
16574
|
this.client = client;
|
|
16583
16575
|
}
|
|
@@ -16657,7 +16649,7 @@ class SalesOrdersAPI {
|
|
|
16657
16649
|
}
|
|
16658
16650
|
}
|
|
16659
16651
|
|
|
16660
|
-
var __async$
|
|
16652
|
+
var __async$T = (__this, __arguments, generator) => {
|
|
16661
16653
|
return new Promise((resolve, reject) => {
|
|
16662
16654
|
var fulfilled = (value) => {
|
|
16663
16655
|
try {
|
|
@@ -16715,7 +16707,7 @@ class SellersAPI {
|
|
|
16715
16707
|
/**
|
|
16716
16708
|
* Deletes an API Key
|
|
16717
16709
|
*/
|
|
16718
|
-
this.deleteSellerApiKey = (_0) => __async$
|
|
16710
|
+
this.deleteSellerApiKey = (_0) => __async$T(this, [_0], function* ({
|
|
16719
16711
|
encryptedApiKey,
|
|
16720
16712
|
sellerId,
|
|
16721
16713
|
isSandbox
|
|
@@ -16761,19 +16753,19 @@ class SellersAPI {
|
|
|
16761
16753
|
}
|
|
16762
16754
|
}
|
|
16763
16755
|
|
|
16764
|
-
var __defProp$
|
|
16765
|
-
var __getOwnPropSymbols$
|
|
16766
|
-
var __hasOwnProp$
|
|
16767
|
-
var __propIsEnum$
|
|
16768
|
-
var __defNormalProp$
|
|
16769
|
-
var __spreadValues$
|
|
16756
|
+
var __defProp$s = Object.defineProperty;
|
|
16757
|
+
var __getOwnPropSymbols$C = Object.getOwnPropertySymbols;
|
|
16758
|
+
var __hasOwnProp$C = Object.prototype.hasOwnProperty;
|
|
16759
|
+
var __propIsEnum$C = Object.prototype.propertyIsEnumerable;
|
|
16760
|
+
var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16761
|
+
var __spreadValues$s = (a, b) => {
|
|
16770
16762
|
for (var prop in b || (b = {}))
|
|
16771
|
-
if (__hasOwnProp$
|
|
16772
|
-
__defNormalProp$
|
|
16773
|
-
if (__getOwnPropSymbols$
|
|
16774
|
-
for (var prop of __getOwnPropSymbols$
|
|
16775
|
-
if (__propIsEnum$
|
|
16776
|
-
__defNormalProp$
|
|
16763
|
+
if (__hasOwnProp$C.call(b, prop))
|
|
16764
|
+
__defNormalProp$s(a, prop, b[prop]);
|
|
16765
|
+
if (__getOwnPropSymbols$C)
|
|
16766
|
+
for (var prop of __getOwnPropSymbols$C(b)) {
|
|
16767
|
+
if (__propIsEnum$C.call(b, prop))
|
|
16768
|
+
__defNormalProp$s(a, prop, b[prop]);
|
|
16777
16769
|
}
|
|
16778
16770
|
return a;
|
|
16779
16771
|
};
|
|
@@ -16785,7 +16777,7 @@ class ServicePointsAPI {
|
|
|
16785
16777
|
* Either an address, coordinates, or an address query
|
|
16786
16778
|
*/
|
|
16787
16779
|
this.list = (options) => {
|
|
16788
|
-
return this.client.post("/v1/service_points/list", __spreadValues$
|
|
16780
|
+
return this.client.post("/v1/service_points/list", __spreadValues$s({}, options));
|
|
16789
16781
|
};
|
|
16790
16782
|
/**
|
|
16791
16783
|
* Get a specific service point by its carrier code, country code, and id
|
|
@@ -16803,7 +16795,7 @@ class ServicePointsAPI {
|
|
|
16803
16795
|
}
|
|
16804
16796
|
}
|
|
16805
16797
|
|
|
16806
|
-
var __async$
|
|
16798
|
+
var __async$S = (__this, __arguments, generator) => {
|
|
16807
16799
|
return new Promise((resolve, reject) => {
|
|
16808
16800
|
var fulfilled = (value) => {
|
|
16809
16801
|
try {
|
|
@@ -16852,7 +16844,7 @@ class ShipmentsAPI {
|
|
|
16852
16844
|
* The `create` method allows for creating shipments based on a list of shipment
|
|
16853
16845
|
* items passed into this method.
|
|
16854
16846
|
*/
|
|
16855
|
-
this.create = (...shipments) => __async$
|
|
16847
|
+
this.create = (...shipments) => __async$S(this, null, function* () {
|
|
16856
16848
|
return this.client.post("/v1/shipments", {
|
|
16857
16849
|
shipments
|
|
16858
16850
|
});
|
|
@@ -34244,26 +34236,26 @@ class WebhooksAPI {
|
|
|
34244
34236
|
}
|
|
34245
34237
|
}
|
|
34246
34238
|
|
|
34247
|
-
var __defProp$
|
|
34248
|
-
var __defProps$
|
|
34249
|
-
var __getOwnPropDescs$
|
|
34250
|
-
var __getOwnPropSymbols$
|
|
34251
|
-
var __hasOwnProp$
|
|
34252
|
-
var __propIsEnum$
|
|
34253
|
-
var __defNormalProp$
|
|
34254
|
-
var __spreadValues$
|
|
34239
|
+
var __defProp$r = Object.defineProperty;
|
|
34240
|
+
var __defProps$o = Object.defineProperties;
|
|
34241
|
+
var __getOwnPropDescs$o = Object.getOwnPropertyDescriptors;
|
|
34242
|
+
var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
|
|
34243
|
+
var __hasOwnProp$B = Object.prototype.hasOwnProperty;
|
|
34244
|
+
var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
|
|
34245
|
+
var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
34246
|
+
var __spreadValues$r = (a, b) => {
|
|
34255
34247
|
for (var prop in b || (b = {}))
|
|
34256
|
-
if (__hasOwnProp$
|
|
34257
|
-
__defNormalProp$
|
|
34258
|
-
if (__getOwnPropSymbols$
|
|
34259
|
-
for (var prop of __getOwnPropSymbols$
|
|
34260
|
-
if (__propIsEnum$
|
|
34261
|
-
__defNormalProp$
|
|
34248
|
+
if (__hasOwnProp$B.call(b, prop))
|
|
34249
|
+
__defNormalProp$r(a, prop, b[prop]);
|
|
34250
|
+
if (__getOwnPropSymbols$B)
|
|
34251
|
+
for (var prop of __getOwnPropSymbols$B(b)) {
|
|
34252
|
+
if (__propIsEnum$B.call(b, prop))
|
|
34253
|
+
__defNormalProp$r(a, prop, b[prop]);
|
|
34262
34254
|
}
|
|
34263
34255
|
return a;
|
|
34264
34256
|
};
|
|
34265
|
-
var __spreadProps$
|
|
34266
|
-
var __async$
|
|
34257
|
+
var __spreadProps$o = (a, b) => __defProps$o(a, __getOwnPropDescs$o(b));
|
|
34258
|
+
var __async$R = (__this, __arguments, generator) => {
|
|
34267
34259
|
return new Promise((resolve, reject) => {
|
|
34268
34260
|
var fulfilled = (value) => {
|
|
34269
34261
|
try {
|
|
@@ -34286,7 +34278,7 @@ var __async$Q = (__this, __arguments, generator) => {
|
|
|
34286
34278
|
const logger$1 = E({
|
|
34287
34279
|
level: process.env.NODE_ENV === "production" ? "fatal" : "info",
|
|
34288
34280
|
name: "shipengine-api",
|
|
34289
|
-
serializers: __spreadProps$
|
|
34281
|
+
serializers: __spreadProps$o(__spreadValues$r({}, k), {
|
|
34290
34282
|
req: (req) => ({
|
|
34291
34283
|
headers: req.headers,
|
|
34292
34284
|
method: req.method,
|
|
@@ -34311,7 +34303,7 @@ class ShipEngineAPI {
|
|
|
34311
34303
|
this.getSandboxToken = getSandboxToken;
|
|
34312
34304
|
const client = axios.create({
|
|
34313
34305
|
baseURL,
|
|
34314
|
-
headers: __spreadProps$
|
|
34306
|
+
headers: __spreadProps$o(__spreadValues$r({}, headers), {
|
|
34315
34307
|
"Content-Type": "application/json"
|
|
34316
34308
|
}),
|
|
34317
34309
|
paramsSerializer: (params) => lib.stringify(decamelizeKeys(params), { arrayFormat: "brackets" }),
|
|
@@ -34346,7 +34338,7 @@ class ShipEngineAPI {
|
|
|
34346
34338
|
});
|
|
34347
34339
|
client.defaults.headers.common["Authorization"] = `Bearer ${token}`;
|
|
34348
34340
|
client.interceptors.request.use(
|
|
34349
|
-
(config) => __async$
|
|
34341
|
+
(config) => __async$R(this, null, function* () {
|
|
34350
34342
|
if (config.isSandbox) {
|
|
34351
34343
|
if (!this.sandboxToken) {
|
|
34352
34344
|
this.sandboxToken = yield getSandboxToken == null ? void 0 : getSandboxToken();
|
|
@@ -34373,7 +34365,7 @@ class ShipEngineAPI {
|
|
|
34373
34365
|
);
|
|
34374
34366
|
return res;
|
|
34375
34367
|
},
|
|
34376
|
-
(err) => __async$
|
|
34368
|
+
(err) => __async$R(this, null, function* () {
|
|
34377
34369
|
var _a, _b, _c, _d, _e;
|
|
34378
34370
|
logger$1.error(
|
|
34379
34371
|
{ err, req: err.config, res: err.response },
|
|
@@ -34420,7 +34412,7 @@ class ShipEngineAPI {
|
|
|
34420
34412
|
* that token (also known as Seller ID)
|
|
34421
34413
|
*/
|
|
34422
34414
|
getTenant(isSandbox) {
|
|
34423
|
-
return __async$
|
|
34415
|
+
return __async$R(this, null, function* () {
|
|
34424
34416
|
var _a;
|
|
34425
34417
|
if (!isSandbox) {
|
|
34426
34418
|
return this.getTenantFromToken(this.token);
|
|
@@ -34699,25 +34691,25 @@ const delay = (ms) => new Promise((resolve) => {
|
|
|
34699
34691
|
|
|
34700
34692
|
const onError = (_errors) => _default();
|
|
34701
34693
|
|
|
34702
|
-
var __defProp$
|
|
34703
|
-
var __defProps$
|
|
34704
|
-
var __getOwnPropDescs$
|
|
34705
|
-
var __getOwnPropSymbols$
|
|
34706
|
-
var __hasOwnProp$
|
|
34707
|
-
var __propIsEnum$
|
|
34708
|
-
var __defNormalProp$
|
|
34709
|
-
var __spreadValues$
|
|
34694
|
+
var __defProp$q = Object.defineProperty;
|
|
34695
|
+
var __defProps$n = Object.defineProperties;
|
|
34696
|
+
var __getOwnPropDescs$n = Object.getOwnPropertyDescriptors;
|
|
34697
|
+
var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
|
|
34698
|
+
var __hasOwnProp$A = Object.prototype.hasOwnProperty;
|
|
34699
|
+
var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
|
|
34700
|
+
var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
34701
|
+
var __spreadValues$q = (a, b) => {
|
|
34710
34702
|
for (var prop in b || (b = {}))
|
|
34711
|
-
if (__hasOwnProp$
|
|
34712
|
-
__defNormalProp$
|
|
34713
|
-
if (__getOwnPropSymbols$
|
|
34714
|
-
for (var prop of __getOwnPropSymbols$
|
|
34715
|
-
if (__propIsEnum$
|
|
34716
|
-
__defNormalProp$
|
|
34703
|
+
if (__hasOwnProp$A.call(b, prop))
|
|
34704
|
+
__defNormalProp$q(a, prop, b[prop]);
|
|
34705
|
+
if (__getOwnPropSymbols$A)
|
|
34706
|
+
for (var prop of __getOwnPropSymbols$A(b)) {
|
|
34707
|
+
if (__propIsEnum$A.call(b, prop))
|
|
34708
|
+
__defNormalProp$q(a, prop, b[prop]);
|
|
34717
34709
|
}
|
|
34718
34710
|
return a;
|
|
34719
34711
|
};
|
|
34720
|
-
var __spreadProps$
|
|
34712
|
+
var __spreadProps$n = (a, b) => __defProps$n(a, __getOwnPropDescs$n(b));
|
|
34721
34713
|
const streams = [];
|
|
34722
34714
|
if (process.env.NODE_ENV === "production") {
|
|
34723
34715
|
streams.push({
|
|
@@ -34726,7 +34718,7 @@ if (process.env.NODE_ENV === "production") {
|
|
|
34726
34718
|
}
|
|
34727
34719
|
const logger = E({
|
|
34728
34720
|
name: "shipengine",
|
|
34729
|
-
serializers: __spreadProps$
|
|
34721
|
+
serializers: __spreadProps$n(__spreadValues$q({}, k), {
|
|
34730
34722
|
req: (req) => ({
|
|
34731
34723
|
headers: req.headers,
|
|
34732
34724
|
method: req.method,
|
|
@@ -34751,7 +34743,7 @@ const retryUntil = (callbackFn, retries = 10, timeoutBetweenAttempts = 1e3) => P
|
|
|
34751
34743
|
throw error;
|
|
34752
34744
|
});
|
|
34753
34745
|
|
|
34754
|
-
var __async$
|
|
34746
|
+
var __async$Q = (__this, __arguments, generator) => {
|
|
34755
34747
|
return new Promise((resolve, reject) => {
|
|
34756
34748
|
var fulfilled = (value) => {
|
|
34757
34749
|
try {
|
|
@@ -34774,7 +34766,7 @@ var __async$P = (__this, __arguments, generator) => {
|
|
|
34774
34766
|
const useCreateAccountImage = () => {
|
|
34775
34767
|
const { client } = useShipEngine();
|
|
34776
34768
|
return reactQuery.useMutation({
|
|
34777
|
-
mutationFn: (data) => __async$
|
|
34769
|
+
mutationFn: (data) => __async$Q(void 0, null, function* () {
|
|
34778
34770
|
const result = yield client.accountSettings.createImage(data);
|
|
34779
34771
|
return result.data;
|
|
34780
34772
|
}),
|
|
@@ -34783,7 +34775,7 @@ const useCreateAccountImage = () => {
|
|
|
34783
34775
|
});
|
|
34784
34776
|
};
|
|
34785
34777
|
|
|
34786
|
-
var __async$
|
|
34778
|
+
var __async$P = (__this, __arguments, generator) => {
|
|
34787
34779
|
return new Promise((resolve, reject) => {
|
|
34788
34780
|
var fulfilled = (value) => {
|
|
34789
34781
|
try {
|
|
@@ -34806,7 +34798,7 @@ var __async$O = (__this, __arguments, generator) => {
|
|
|
34806
34798
|
const useDeleteAccountImage = () => {
|
|
34807
34799
|
const { client } = useShipEngine();
|
|
34808
34800
|
return reactQuery.useMutation({
|
|
34809
|
-
mutationFn: (labelImageId) => __async$
|
|
34801
|
+
mutationFn: (labelImageId) => __async$P(void 0, null, function* () {
|
|
34810
34802
|
const result = yield client.accountSettings.deleteImage(labelImageId);
|
|
34811
34803
|
return result.data;
|
|
34812
34804
|
}),
|
|
@@ -34835,7 +34827,7 @@ const useGetAccountSettings = () => {
|
|
|
34835
34827
|
});
|
|
34836
34828
|
};
|
|
34837
34829
|
|
|
34838
|
-
var __async$
|
|
34830
|
+
var __async$O = (__this, __arguments, generator) => {
|
|
34839
34831
|
return new Promise((resolve, reject) => {
|
|
34840
34832
|
var fulfilled = (value) => {
|
|
34841
34833
|
try {
|
|
@@ -34858,7 +34850,7 @@ var __async$N = (__this, __arguments, generator) => {
|
|
|
34858
34850
|
const useUpdateAccountImage = () => {
|
|
34859
34851
|
const { client } = useShipEngine();
|
|
34860
34852
|
return reactQuery.useMutation({
|
|
34861
|
-
mutationFn: (data) => __async$
|
|
34853
|
+
mutationFn: (data) => __async$O(void 0, null, function* () {
|
|
34862
34854
|
const result = yield client.accountSettings.updateImage(data);
|
|
34863
34855
|
return result.data;
|
|
34864
34856
|
}),
|
|
@@ -34867,7 +34859,7 @@ const useUpdateAccountImage = () => {
|
|
|
34867
34859
|
});
|
|
34868
34860
|
};
|
|
34869
34861
|
|
|
34870
|
-
var __async$
|
|
34862
|
+
var __async$N = (__this, __arguments, generator) => {
|
|
34871
34863
|
return new Promise((resolve, reject) => {
|
|
34872
34864
|
var fulfilled = (value) => {
|
|
34873
34865
|
try {
|
|
@@ -34890,7 +34882,7 @@ var __async$M = (__this, __arguments, generator) => {
|
|
|
34890
34882
|
const useUpdateAccountSettings = () => {
|
|
34891
34883
|
const { client } = useShipEngine();
|
|
34892
34884
|
return reactQuery.useMutation({
|
|
34893
|
-
mutationFn: (settings) => __async$
|
|
34885
|
+
mutationFn: (settings) => __async$N(void 0, null, function* () {
|
|
34894
34886
|
const result = yield client.accountSettings.update(settings);
|
|
34895
34887
|
return result.data;
|
|
34896
34888
|
}),
|
|
@@ -34899,7 +34891,7 @@ const useUpdateAccountSettings = () => {
|
|
|
34899
34891
|
});
|
|
34900
34892
|
};
|
|
34901
34893
|
|
|
34902
|
-
var __async$
|
|
34894
|
+
var __async$M = (__this, __arguments, generator) => {
|
|
34903
34895
|
return new Promise((resolve, reject) => {
|
|
34904
34896
|
var fulfilled = (value) => {
|
|
34905
34897
|
try {
|
|
@@ -34922,7 +34914,7 @@ var __async$L = (__this, __arguments, generator) => {
|
|
|
34922
34914
|
const useParseAddress = () => {
|
|
34923
34915
|
const { client } = useShipEngine();
|
|
34924
34916
|
return reactQuery.useMutation({
|
|
34925
|
-
mutationFn: (_0) => __async$
|
|
34917
|
+
mutationFn: (_0) => __async$M(void 0, [_0], function* ({ address, text }) {
|
|
34926
34918
|
const result = yield client.addresses.parse(text, address);
|
|
34927
34919
|
return result.data;
|
|
34928
34920
|
}),
|
|
@@ -34931,7 +34923,7 @@ const useParseAddress = () => {
|
|
|
34931
34923
|
});
|
|
34932
34924
|
};
|
|
34933
34925
|
|
|
34934
|
-
var __async$
|
|
34926
|
+
var __async$L = (__this, __arguments, generator) => {
|
|
34935
34927
|
return new Promise((resolve, reject) => {
|
|
34936
34928
|
var fulfilled = (value) => {
|
|
34937
34929
|
try {
|
|
@@ -34954,7 +34946,7 @@ var __async$K = (__this, __arguments, generator) => {
|
|
|
34954
34946
|
const useValidateAddresses = () => {
|
|
34955
34947
|
const { client } = useShipEngine();
|
|
34956
34948
|
return reactQuery.useMutation({
|
|
34957
|
-
mutationFn: (addresses) => __async$
|
|
34949
|
+
mutationFn: (addresses) => __async$L(void 0, null, function* () {
|
|
34958
34950
|
const result = yield client.addresses.validate(addresses);
|
|
34959
34951
|
return result.data;
|
|
34960
34952
|
}),
|
|
@@ -34963,7 +34955,7 @@ const useValidateAddresses = () => {
|
|
|
34963
34955
|
});
|
|
34964
34956
|
};
|
|
34965
34957
|
|
|
34966
|
-
var __async$
|
|
34958
|
+
var __async$K = (__this, __arguments, generator) => {
|
|
34967
34959
|
return new Promise((resolve, reject) => {
|
|
34968
34960
|
var fulfilled = (value) => {
|
|
34969
34961
|
try {
|
|
@@ -34986,7 +34978,7 @@ var __async$J = (__this, __arguments, generator) => {
|
|
|
34986
34978
|
const useAddFunds = () => {
|
|
34987
34979
|
const { client } = useShipEngine();
|
|
34988
34980
|
return reactQuery.useMutation({
|
|
34989
|
-
mutationFn: (_0) => __async$
|
|
34981
|
+
mutationFn: (_0) => __async$K(void 0, [_0], function* ({ carrierId, funds }) {
|
|
34990
34982
|
const result = yield client.carriers.addFunds(carrierId, funds);
|
|
34991
34983
|
return result.data;
|
|
34992
34984
|
}),
|
|
@@ -34995,7 +34987,7 @@ const useAddFunds = () => {
|
|
|
34995
34987
|
});
|
|
34996
34988
|
};
|
|
34997
34989
|
|
|
34998
|
-
var __async$
|
|
34990
|
+
var __async$J = (__this, __arguments, generator) => {
|
|
34999
34991
|
return new Promise((resolve, reject) => {
|
|
35000
34992
|
var fulfilled = (value) => {
|
|
35001
34993
|
try {
|
|
@@ -35018,7 +35010,7 @@ var __async$I = (__this, __arguments, generator) => {
|
|
|
35018
35010
|
const useConnectCarrier = () => {
|
|
35019
35011
|
const { client } = useShipEngine();
|
|
35020
35012
|
return reactQuery.useMutation({
|
|
35021
|
-
mutationFn: (params) => __async$
|
|
35013
|
+
mutationFn: (params) => __async$J(void 0, null, function* () {
|
|
35022
35014
|
const result = yield client.carriers.connect(params);
|
|
35023
35015
|
return result.data;
|
|
35024
35016
|
}),
|
|
@@ -35127,41 +35119,41 @@ const useGetServicesByCarrier = (carrierId) => {
|
|
|
35127
35119
|
});
|
|
35128
35120
|
};
|
|
35129
35121
|
|
|
35130
|
-
var __defProp$
|
|
35131
|
-
var __defProps$
|
|
35132
|
-
var __getOwnPropDescs$
|
|
35133
|
-
var __getOwnPropSymbols$
|
|
35134
|
-
var __hasOwnProp$
|
|
35135
|
-
var __propIsEnum$
|
|
35136
|
-
var __defNormalProp$
|
|
35137
|
-
var __spreadValues$
|
|
35122
|
+
var __defProp$p = Object.defineProperty;
|
|
35123
|
+
var __defProps$m = Object.defineProperties;
|
|
35124
|
+
var __getOwnPropDescs$m = Object.getOwnPropertyDescriptors;
|
|
35125
|
+
var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
|
|
35126
|
+
var __hasOwnProp$z = Object.prototype.hasOwnProperty;
|
|
35127
|
+
var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
|
|
35128
|
+
var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
35129
|
+
var __spreadValues$p = (a, b) => {
|
|
35138
35130
|
for (var prop in b || (b = {}))
|
|
35139
|
-
if (__hasOwnProp$
|
|
35140
|
-
__defNormalProp$
|
|
35141
|
-
if (__getOwnPropSymbols$
|
|
35142
|
-
for (var prop of __getOwnPropSymbols$
|
|
35143
|
-
if (__propIsEnum$
|
|
35144
|
-
__defNormalProp$
|
|
35131
|
+
if (__hasOwnProp$z.call(b, prop))
|
|
35132
|
+
__defNormalProp$p(a, prop, b[prop]);
|
|
35133
|
+
if (__getOwnPropSymbols$z)
|
|
35134
|
+
for (var prop of __getOwnPropSymbols$z(b)) {
|
|
35135
|
+
if (__propIsEnum$z.call(b, prop))
|
|
35136
|
+
__defNormalProp$p(a, prop, b[prop]);
|
|
35145
35137
|
}
|
|
35146
35138
|
return a;
|
|
35147
35139
|
};
|
|
35148
|
-
var __spreadProps$
|
|
35149
|
-
var __objRest$
|
|
35140
|
+
var __spreadProps$m = (a, b) => __defProps$m(a, __getOwnPropDescs$m(b));
|
|
35141
|
+
var __objRest$m = (source, exclude) => {
|
|
35150
35142
|
var target = {};
|
|
35151
35143
|
for (var prop in source)
|
|
35152
|
-
if (__hasOwnProp$
|
|
35144
|
+
if (__hasOwnProp$z.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
35153
35145
|
target[prop] = source[prop];
|
|
35154
|
-
if (source != null && __getOwnPropSymbols$
|
|
35155
|
-
for (var prop of __getOwnPropSymbols$
|
|
35156
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
35146
|
+
if (source != null && __getOwnPropSymbols$z)
|
|
35147
|
+
for (var prop of __getOwnPropSymbols$z(source)) {
|
|
35148
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$z.call(source, prop))
|
|
35157
35149
|
target[prop] = source[prop];
|
|
35158
35150
|
}
|
|
35159
35151
|
return target;
|
|
35160
35152
|
};
|
|
35161
35153
|
const useListCarriers = (params) => {
|
|
35162
35154
|
const { client } = useShipEngine();
|
|
35163
|
-
const _a = __spreadValues$
|
|
35164
|
-
return reactQuery.useQuery(__spreadProps$
|
|
35155
|
+
const _a = __spreadValues$p({}, params), { queryFnParams } = _a, rest = __objRest$m(_a, ["queryFnParams"]);
|
|
35156
|
+
return reactQuery.useQuery(__spreadProps$m(__spreadValues$p({}, rest), {
|
|
35165
35157
|
onError,
|
|
35166
35158
|
queryFn: () => client.carriers.list(queryFnParams),
|
|
35167
35159
|
queryKey: ["useListCarriers", queryFnParams],
|
|
@@ -35169,22 +35161,22 @@ const useListCarriers = (params) => {
|
|
|
35169
35161
|
}));
|
|
35170
35162
|
};
|
|
35171
35163
|
|
|
35172
|
-
var __getOwnPropSymbols$
|
|
35173
|
-
var __hasOwnProp$
|
|
35174
|
-
var __propIsEnum$
|
|
35175
|
-
var __objRest$
|
|
35164
|
+
var __getOwnPropSymbols$y = Object.getOwnPropertySymbols;
|
|
35165
|
+
var __hasOwnProp$y = Object.prototype.hasOwnProperty;
|
|
35166
|
+
var __propIsEnum$y = Object.prototype.propertyIsEnumerable;
|
|
35167
|
+
var __objRest$l = (source, exclude) => {
|
|
35176
35168
|
var target = {};
|
|
35177
35169
|
for (var prop in source)
|
|
35178
|
-
if (__hasOwnProp$
|
|
35170
|
+
if (__hasOwnProp$y.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
35179
35171
|
target[prop] = source[prop];
|
|
35180
|
-
if (source != null && __getOwnPropSymbols$
|
|
35181
|
-
for (var prop of __getOwnPropSymbols$
|
|
35182
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
35172
|
+
if (source != null && __getOwnPropSymbols$y)
|
|
35173
|
+
for (var prop of __getOwnPropSymbols$y(source)) {
|
|
35174
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$y.call(source, prop))
|
|
35183
35175
|
target[prop] = source[prop];
|
|
35184
35176
|
}
|
|
35185
35177
|
return target;
|
|
35186
35178
|
};
|
|
35187
|
-
var __async$
|
|
35179
|
+
var __async$I = (__this, __arguments, generator) => {
|
|
35188
35180
|
return new Promise((resolve, reject) => {
|
|
35189
35181
|
var fulfilled = (value) => {
|
|
35190
35182
|
try {
|
|
@@ -35208,8 +35200,8 @@ const useUpdateAutoFunding = () => {
|
|
|
35208
35200
|
const { client } = useShipEngine();
|
|
35209
35201
|
const queryClient = reactQuery.useQueryClient();
|
|
35210
35202
|
return reactQuery.useMutation({
|
|
35211
|
-
mutationFn: (_a) => __async$
|
|
35212
|
-
var _b = _a, { carrierId } = _b, options = __objRest$
|
|
35203
|
+
mutationFn: (_a) => __async$I(void 0, null, function* () {
|
|
35204
|
+
var _b = _a, { carrierId } = _b, options = __objRest$l(_b, ["carrierId"]);
|
|
35213
35205
|
const result = yield client.carriers.updateAutoFunding(carrierId, options);
|
|
35214
35206
|
return result.data;
|
|
35215
35207
|
}),
|
|
@@ -35238,7 +35230,7 @@ const useGetZonesByCarrier = (carrierId) => {
|
|
|
35238
35230
|
});
|
|
35239
35231
|
};
|
|
35240
35232
|
|
|
35241
|
-
var __async$
|
|
35233
|
+
var __async$H = (__this, __arguments, generator) => {
|
|
35242
35234
|
return new Promise((resolve, reject) => {
|
|
35243
35235
|
var fulfilled = (value) => {
|
|
35244
35236
|
try {
|
|
@@ -35261,7 +35253,7 @@ var __async$G = (__this, __arguments, generator) => {
|
|
|
35261
35253
|
const useDeleteCarrier = () => {
|
|
35262
35254
|
const { client } = useShipEngine();
|
|
35263
35255
|
return reactQuery.useMutation({
|
|
35264
|
-
mutationFn: (carrierId) => __async$
|
|
35256
|
+
mutationFn: (carrierId) => __async$H(void 0, null, function* () {
|
|
35265
35257
|
const result = yield client.carriers.delete(carrierId);
|
|
35266
35258
|
return result.data;
|
|
35267
35259
|
}),
|
|
@@ -35270,24 +35262,24 @@ const useDeleteCarrier = () => {
|
|
|
35270
35262
|
});
|
|
35271
35263
|
};
|
|
35272
35264
|
|
|
35273
|
-
var __getOwnPropSymbols$
|
|
35274
|
-
var __hasOwnProp$
|
|
35275
|
-
var __propIsEnum$
|
|
35276
|
-
var __objRest$
|
|
35265
|
+
var __getOwnPropSymbols$x = Object.getOwnPropertySymbols;
|
|
35266
|
+
var __hasOwnProp$x = Object.prototype.hasOwnProperty;
|
|
35267
|
+
var __propIsEnum$x = Object.prototype.propertyIsEnumerable;
|
|
35268
|
+
var __objRest$k = (source, exclude) => {
|
|
35277
35269
|
var target = {};
|
|
35278
35270
|
for (var prop in source)
|
|
35279
|
-
if (__hasOwnProp$
|
|
35271
|
+
if (__hasOwnProp$x.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
35280
35272
|
target[prop] = source[prop];
|
|
35281
|
-
if (source != null && __getOwnPropSymbols$
|
|
35282
|
-
for (var prop of __getOwnPropSymbols$
|
|
35283
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
35273
|
+
if (source != null && __getOwnPropSymbols$x)
|
|
35274
|
+
for (var prop of __getOwnPropSymbols$x(source)) {
|
|
35275
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$x.call(source, prop))
|
|
35284
35276
|
target[prop] = source[prop];
|
|
35285
35277
|
}
|
|
35286
35278
|
return target;
|
|
35287
35279
|
};
|
|
35288
35280
|
const useGetCarrierConnectionForm = (_params) => {
|
|
35289
35281
|
const { client } = useShipEngine();
|
|
35290
|
-
const _a = _params || {}, { carrierName, enabled = true } = _a, params = __objRest$
|
|
35282
|
+
const _a = _params || {}, { carrierName, enabled = true } = _a, params = __objRest$k(_a, ["carrierName", "enabled"]);
|
|
35291
35283
|
return reactQuery.useQuery({
|
|
35292
35284
|
enabled,
|
|
35293
35285
|
onError,
|
|
@@ -35297,24 +35289,24 @@ const useGetCarrierConnectionForm = (_params) => {
|
|
|
35297
35289
|
});
|
|
35298
35290
|
};
|
|
35299
35291
|
|
|
35300
|
-
var __getOwnPropSymbols$
|
|
35301
|
-
var __hasOwnProp$
|
|
35302
|
-
var __propIsEnum$
|
|
35303
|
-
var __objRest$
|
|
35292
|
+
var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
|
|
35293
|
+
var __hasOwnProp$w = Object.prototype.hasOwnProperty;
|
|
35294
|
+
var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
|
|
35295
|
+
var __objRest$j = (source, exclude) => {
|
|
35304
35296
|
var target = {};
|
|
35305
35297
|
for (var prop in source)
|
|
35306
|
-
if (__hasOwnProp$
|
|
35298
|
+
if (__hasOwnProp$w.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
35307
35299
|
target[prop] = source[prop];
|
|
35308
|
-
if (source != null && __getOwnPropSymbols$
|
|
35309
|
-
for (var prop of __getOwnPropSymbols$
|
|
35310
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
35300
|
+
if (source != null && __getOwnPropSymbols$w)
|
|
35301
|
+
for (var prop of __getOwnPropSymbols$w(source)) {
|
|
35302
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$w.call(source, prop))
|
|
35311
35303
|
target[prop] = source[prop];
|
|
35312
35304
|
}
|
|
35313
35305
|
return target;
|
|
35314
35306
|
};
|
|
35315
35307
|
const useListCarrierConnections = (_params) => {
|
|
35316
35308
|
const { client } = useShipEngine();
|
|
35317
|
-
const _a = _params || {}, { enabled = true } = _a, params = __objRest$
|
|
35309
|
+
const _a = _params || {}, { enabled = true } = _a, params = __objRest$j(_a, ["enabled"]);
|
|
35318
35310
|
return reactQuery.useQuery({
|
|
35319
35311
|
enabled,
|
|
35320
35312
|
onError,
|
|
@@ -35324,7 +35316,7 @@ const useListCarrierConnections = (_params) => {
|
|
|
35324
35316
|
});
|
|
35325
35317
|
};
|
|
35326
35318
|
|
|
35327
|
-
var __async$
|
|
35319
|
+
var __async$G = (__this, __arguments, generator) => {
|
|
35328
35320
|
return new Promise((resolve, reject) => {
|
|
35329
35321
|
var fulfilled = (value) => {
|
|
35330
35322
|
try {
|
|
@@ -35347,7 +35339,7 @@ var __async$F = (__this, __arguments, generator) => {
|
|
|
35347
35339
|
const useConnectCarrierAccount = () => {
|
|
35348
35340
|
const { client } = useShipEngine();
|
|
35349
35341
|
return reactQuery.useMutation({
|
|
35350
|
-
mutationFn: (_0) => __async$
|
|
35342
|
+
mutationFn: (_0) => __async$G(void 0, [_0], function* ({ carrierName, formData }) {
|
|
35351
35343
|
const result = yield client.connections.connectCarrier(carrierName, formData);
|
|
35352
35344
|
return result.data;
|
|
35353
35345
|
}),
|
|
@@ -35367,33 +35359,33 @@ const useCarrierConnectionsServicesList = (carrierCode) => {
|
|
|
35367
35359
|
});
|
|
35368
35360
|
};
|
|
35369
35361
|
|
|
35370
|
-
var __defProp$
|
|
35371
|
-
var __defProps$
|
|
35372
|
-
var __getOwnPropDescs$
|
|
35373
|
-
var __getOwnPropSymbols$
|
|
35374
|
-
var __hasOwnProp$
|
|
35375
|
-
var __propIsEnum$
|
|
35376
|
-
var __defNormalProp$
|
|
35377
|
-
var __spreadValues$
|
|
35362
|
+
var __defProp$o = Object.defineProperty;
|
|
35363
|
+
var __defProps$l = Object.defineProperties;
|
|
35364
|
+
var __getOwnPropDescs$l = Object.getOwnPropertyDescriptors;
|
|
35365
|
+
var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
|
|
35366
|
+
var __hasOwnProp$v = Object.prototype.hasOwnProperty;
|
|
35367
|
+
var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
|
|
35368
|
+
var __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
35369
|
+
var __spreadValues$o = (a, b) => {
|
|
35378
35370
|
for (var prop in b || (b = {}))
|
|
35379
|
-
if (__hasOwnProp$
|
|
35380
|
-
__defNormalProp$
|
|
35381
|
-
if (__getOwnPropSymbols$
|
|
35382
|
-
for (var prop of __getOwnPropSymbols$
|
|
35383
|
-
if (__propIsEnum$
|
|
35384
|
-
__defNormalProp$
|
|
35371
|
+
if (__hasOwnProp$v.call(b, prop))
|
|
35372
|
+
__defNormalProp$o(a, prop, b[prop]);
|
|
35373
|
+
if (__getOwnPropSymbols$v)
|
|
35374
|
+
for (var prop of __getOwnPropSymbols$v(b)) {
|
|
35375
|
+
if (__propIsEnum$v.call(b, prop))
|
|
35376
|
+
__defNormalProp$o(a, prop, b[prop]);
|
|
35385
35377
|
}
|
|
35386
35378
|
return a;
|
|
35387
35379
|
};
|
|
35388
|
-
var __spreadProps$
|
|
35389
|
-
var __objRest$
|
|
35380
|
+
var __spreadProps$l = (a, b) => __defProps$l(a, __getOwnPropDescs$l(b));
|
|
35381
|
+
var __objRest$i = (source, exclude) => {
|
|
35390
35382
|
var target = {};
|
|
35391
35383
|
for (var prop in source)
|
|
35392
|
-
if (__hasOwnProp$
|
|
35384
|
+
if (__hasOwnProp$v.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
35393
35385
|
target[prop] = source[prop];
|
|
35394
|
-
if (source != null && __getOwnPropSymbols$
|
|
35395
|
-
for (var prop of __getOwnPropSymbols$
|
|
35396
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
35386
|
+
if (source != null && __getOwnPropSymbols$v)
|
|
35387
|
+
for (var prop of __getOwnPropSymbols$v(source)) {
|
|
35388
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$v.call(source, prop))
|
|
35397
35389
|
target[prop] = source[prop];
|
|
35398
35390
|
}
|
|
35399
35391
|
return target;
|
|
@@ -35401,12 +35393,12 @@ var __objRest$h = (source, exclude) => {
|
|
|
35401
35393
|
const useGetConnectionsCarrierSettings = (_a) => {
|
|
35402
35394
|
var _b = _a, {
|
|
35403
35395
|
queryFnParams
|
|
35404
|
-
} = _b, params = __objRest$
|
|
35396
|
+
} = _b, params = __objRest$i(_b, [
|
|
35405
35397
|
"queryFnParams"
|
|
35406
35398
|
]);
|
|
35407
35399
|
const { client } = useShipEngine();
|
|
35408
35400
|
const { carrierName, carrierId } = queryFnParams;
|
|
35409
|
-
return reactQuery.useQuery(__spreadProps$
|
|
35401
|
+
return reactQuery.useQuery(__spreadProps$l(__spreadValues$o({}, params), {
|
|
35410
35402
|
onError,
|
|
35411
35403
|
queryFn: () => client.connections.getCarrierSettings(carrierName, carrierId),
|
|
35412
35404
|
queryKey: ["useGetConnectionsCarrierSettings", carrierName, carrierId],
|
|
@@ -35414,26 +35406,26 @@ const useGetConnectionsCarrierSettings = (_a) => {
|
|
|
35414
35406
|
}));
|
|
35415
35407
|
};
|
|
35416
35408
|
|
|
35417
|
-
var __defProp$
|
|
35418
|
-
var __defProps$
|
|
35419
|
-
var __getOwnPropDescs$
|
|
35420
|
-
var __getOwnPropSymbols$
|
|
35421
|
-
var __hasOwnProp$
|
|
35422
|
-
var __propIsEnum$
|
|
35423
|
-
var __defNormalProp$
|
|
35424
|
-
var __spreadValues$
|
|
35409
|
+
var __defProp$n = Object.defineProperty;
|
|
35410
|
+
var __defProps$k = Object.defineProperties;
|
|
35411
|
+
var __getOwnPropDescs$k = Object.getOwnPropertyDescriptors;
|
|
35412
|
+
var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
|
|
35413
|
+
var __hasOwnProp$u = Object.prototype.hasOwnProperty;
|
|
35414
|
+
var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
|
|
35415
|
+
var __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
35416
|
+
var __spreadValues$n = (a, b) => {
|
|
35425
35417
|
for (var prop in b || (b = {}))
|
|
35426
|
-
if (__hasOwnProp$
|
|
35427
|
-
__defNormalProp$
|
|
35428
|
-
if (__getOwnPropSymbols$
|
|
35429
|
-
for (var prop of __getOwnPropSymbols$
|
|
35430
|
-
if (__propIsEnum$
|
|
35431
|
-
__defNormalProp$
|
|
35418
|
+
if (__hasOwnProp$u.call(b, prop))
|
|
35419
|
+
__defNormalProp$n(a, prop, b[prop]);
|
|
35420
|
+
if (__getOwnPropSymbols$u)
|
|
35421
|
+
for (var prop of __getOwnPropSymbols$u(b)) {
|
|
35422
|
+
if (__propIsEnum$u.call(b, prop))
|
|
35423
|
+
__defNormalProp$n(a, prop, b[prop]);
|
|
35432
35424
|
}
|
|
35433
35425
|
return a;
|
|
35434
35426
|
};
|
|
35435
|
-
var __spreadProps$
|
|
35436
|
-
var __async$
|
|
35427
|
+
var __spreadProps$k = (a, b) => __defProps$k(a, __getOwnPropDescs$k(b));
|
|
35428
|
+
var __async$F = (__this, __arguments, generator) => {
|
|
35437
35429
|
return new Promise((resolve, reject) => {
|
|
35438
35430
|
var fulfilled = (value) => {
|
|
35439
35431
|
try {
|
|
@@ -35455,8 +35447,8 @@ var __async$E = (__this, __arguments, generator) => {
|
|
|
35455
35447
|
};
|
|
35456
35448
|
const useUpdateConnectionsCarrierSettings = (params) => {
|
|
35457
35449
|
const { client } = useShipEngine();
|
|
35458
|
-
return reactQuery.useMutation(__spreadProps$
|
|
35459
|
-
mutationFn: (_0) => __async$
|
|
35450
|
+
return reactQuery.useMutation(__spreadProps$k(__spreadValues$n({}, params), {
|
|
35451
|
+
mutationFn: (_0) => __async$F(void 0, [_0], function* ({
|
|
35460
35452
|
carrierName,
|
|
35461
35453
|
carrierId,
|
|
35462
35454
|
formData
|
|
@@ -35483,7 +35475,7 @@ const useListCustomPackageTypes = () => {
|
|
|
35483
35475
|
});
|
|
35484
35476
|
};
|
|
35485
35477
|
|
|
35486
|
-
var __async$
|
|
35478
|
+
var __async$E = (__this, __arguments, generator) => {
|
|
35487
35479
|
return new Promise((resolve, reject) => {
|
|
35488
35480
|
var fulfilled = (value) => {
|
|
35489
35481
|
try {
|
|
@@ -35506,7 +35498,7 @@ var __async$D = (__this, __arguments, generator) => {
|
|
|
35506
35498
|
const useCreateFundingSource = () => {
|
|
35507
35499
|
const { client } = useShipEngine();
|
|
35508
35500
|
return reactQuery.useMutation({
|
|
35509
|
-
mutationFn: (fundingSource) => __async$
|
|
35501
|
+
mutationFn: (fundingSource) => __async$E(void 0, null, function* () {
|
|
35510
35502
|
const result = yield client.fundingSources.create(fundingSource);
|
|
35511
35503
|
return result.data;
|
|
35512
35504
|
}),
|
|
@@ -35515,7 +35507,7 @@ const useCreateFundingSource = () => {
|
|
|
35515
35507
|
});
|
|
35516
35508
|
};
|
|
35517
35509
|
|
|
35518
|
-
var __async$
|
|
35510
|
+
var __async$D = (__this, __arguments, generator) => {
|
|
35519
35511
|
return new Promise((resolve, reject) => {
|
|
35520
35512
|
var fulfilled = (value) => {
|
|
35521
35513
|
try {
|
|
@@ -35538,7 +35530,7 @@ var __async$C = (__this, __arguments, generator) => {
|
|
|
35538
35530
|
const useFundingSourcesAddFunds = () => {
|
|
35539
35531
|
const { client } = useShipEngine();
|
|
35540
35532
|
return reactQuery.useMutation({
|
|
35541
|
-
mutationFn: (_0) => __async$
|
|
35533
|
+
mutationFn: (_0) => __async$D(void 0, [_0], function* ({ funds, fundingSourceId }) {
|
|
35542
35534
|
const result = yield client.fundingSources.addFunds(funds, fundingSourceId);
|
|
35543
35535
|
return result.data;
|
|
35544
35536
|
}),
|
|
@@ -35567,7 +35559,7 @@ const useListFundingSources = () => {
|
|
|
35567
35559
|
});
|
|
35568
35560
|
};
|
|
35569
35561
|
|
|
35570
|
-
var __async$
|
|
35562
|
+
var __async$C = (__this, __arguments, generator) => {
|
|
35571
35563
|
return new Promise((resolve, reject) => {
|
|
35572
35564
|
var fulfilled = (value) => {
|
|
35573
35565
|
try {
|
|
@@ -35590,7 +35582,7 @@ var __async$B = (__this, __arguments, generator) => {
|
|
|
35590
35582
|
const useRegisterCarrier = () => {
|
|
35591
35583
|
const { client } = useShipEngine();
|
|
35592
35584
|
return reactQuery.useMutation({
|
|
35593
|
-
mutationFn: (carrier) => __async$
|
|
35585
|
+
mutationFn: (carrier) => __async$C(void 0, null, function* () {
|
|
35594
35586
|
const result = yield client.fundingSources.registerCarrier(carrier);
|
|
35595
35587
|
return result.data;
|
|
35596
35588
|
}),
|
|
@@ -35599,7 +35591,7 @@ const useRegisterCarrier = () => {
|
|
|
35599
35591
|
});
|
|
35600
35592
|
};
|
|
35601
35593
|
|
|
35602
|
-
var __async$
|
|
35594
|
+
var __async$B = (__this, __arguments, generator) => {
|
|
35603
35595
|
return new Promise((resolve, reject) => {
|
|
35604
35596
|
var fulfilled = (value) => {
|
|
35605
35597
|
try {
|
|
@@ -35622,7 +35614,7 @@ var __async$A = (__this, __arguments, generator) => {
|
|
|
35622
35614
|
const useUpdateFundingSource = () => {
|
|
35623
35615
|
const { client } = useShipEngine();
|
|
35624
35616
|
return reactQuery.useMutation({
|
|
35625
|
-
mutationFn: (_0) => __async$
|
|
35617
|
+
mutationFn: (_0) => __async$B(void 0, [_0], function* ({
|
|
35626
35618
|
billingInfo,
|
|
35627
35619
|
creditCardInfo,
|
|
35628
35620
|
fundingSourceId
|
|
@@ -35661,29 +35653,29 @@ const useGetFundingSourceTransactions = (fundingSourceId, params) => {
|
|
|
35661
35653
|
});
|
|
35662
35654
|
};
|
|
35663
35655
|
|
|
35664
|
-
var __defProp$
|
|
35665
|
-
var __defProps$
|
|
35666
|
-
var __getOwnPropDescs$
|
|
35667
|
-
var __getOwnPropSymbols$
|
|
35668
|
-
var __hasOwnProp$
|
|
35669
|
-
var __propIsEnum$
|
|
35670
|
-
var __defNormalProp$
|
|
35671
|
-
var __spreadValues$
|
|
35656
|
+
var __defProp$m = Object.defineProperty;
|
|
35657
|
+
var __defProps$j = Object.defineProperties;
|
|
35658
|
+
var __getOwnPropDescs$j = Object.getOwnPropertyDescriptors;
|
|
35659
|
+
var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
|
|
35660
|
+
var __hasOwnProp$t = Object.prototype.hasOwnProperty;
|
|
35661
|
+
var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
|
|
35662
|
+
var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
35663
|
+
var __spreadValues$m = (a, b) => {
|
|
35672
35664
|
for (var prop in b || (b = {}))
|
|
35673
|
-
if (__hasOwnProp$
|
|
35674
|
-
__defNormalProp$
|
|
35675
|
-
if (__getOwnPropSymbols$
|
|
35676
|
-
for (var prop of __getOwnPropSymbols$
|
|
35677
|
-
if (__propIsEnum$
|
|
35678
|
-
__defNormalProp$
|
|
35665
|
+
if (__hasOwnProp$t.call(b, prop))
|
|
35666
|
+
__defNormalProp$m(a, prop, b[prop]);
|
|
35667
|
+
if (__getOwnPropSymbols$t)
|
|
35668
|
+
for (var prop of __getOwnPropSymbols$t(b)) {
|
|
35669
|
+
if (__propIsEnum$t.call(b, prop))
|
|
35670
|
+
__defNormalProp$m(a, prop, b[prop]);
|
|
35679
35671
|
}
|
|
35680
35672
|
return a;
|
|
35681
35673
|
};
|
|
35682
|
-
var __spreadProps$
|
|
35674
|
+
var __spreadProps$j = (a, b) => __defProps$j(a, __getOwnPropDescs$j(b));
|
|
35683
35675
|
const useGetInsuranceFundingSourceAcceptedTerms = (params) => {
|
|
35684
35676
|
const { client } = useShipEngine();
|
|
35685
|
-
const queryParams = __spreadValues$
|
|
35686
|
-
return reactQuery.useQuery(__spreadProps$
|
|
35677
|
+
const queryParams = __spreadValues$m({}, params);
|
|
35678
|
+
return reactQuery.useQuery(__spreadProps$j(__spreadValues$m({}, queryParams), {
|
|
35687
35679
|
onError,
|
|
35688
35680
|
queryFn: () => client.fundingSources.insuranceAcceptedTerms(),
|
|
35689
35681
|
queryKey: ["useGetInsuranceFundingSourceAcceptedTerms"],
|
|
@@ -35706,22 +35698,22 @@ const useGetInsuranceAccount = (insuranceProvider) => {
|
|
|
35706
35698
|
});
|
|
35707
35699
|
};
|
|
35708
35700
|
|
|
35709
|
-
var __getOwnPropSymbols$
|
|
35710
|
-
var __hasOwnProp$
|
|
35711
|
-
var __propIsEnum$
|
|
35712
|
-
var __objRest$
|
|
35701
|
+
var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
|
|
35702
|
+
var __hasOwnProp$s = Object.prototype.hasOwnProperty;
|
|
35703
|
+
var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
|
|
35704
|
+
var __objRest$h = (source, exclude) => {
|
|
35713
35705
|
var target = {};
|
|
35714
35706
|
for (var prop in source)
|
|
35715
|
-
if (__hasOwnProp$
|
|
35707
|
+
if (__hasOwnProp$s.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
35716
35708
|
target[prop] = source[prop];
|
|
35717
|
-
if (source != null && __getOwnPropSymbols$
|
|
35718
|
-
for (var prop of __getOwnPropSymbols$
|
|
35719
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
35709
|
+
if (source != null && __getOwnPropSymbols$s)
|
|
35710
|
+
for (var prop of __getOwnPropSymbols$s(source)) {
|
|
35711
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$s.call(source, prop))
|
|
35720
35712
|
target[prop] = source[prop];
|
|
35721
35713
|
}
|
|
35722
35714
|
return target;
|
|
35723
35715
|
};
|
|
35724
|
-
var __async$
|
|
35716
|
+
var __async$A = (__this, __arguments, generator) => {
|
|
35725
35717
|
return new Promise((resolve, reject) => {
|
|
35726
35718
|
var fulfilled = (value) => {
|
|
35727
35719
|
try {
|
|
@@ -35744,8 +35736,8 @@ var __async$z = (__this, __arguments, generator) => {
|
|
|
35744
35736
|
const useAddInsuranceFunds = () => {
|
|
35745
35737
|
const { client } = useShipEngine();
|
|
35746
35738
|
return reactQuery.useMutation({
|
|
35747
|
-
mutationFn: (_a) => __async$
|
|
35748
|
-
var _b = _a, { insuranceProvider } = _b, rest = __objRest$
|
|
35739
|
+
mutationFn: (_a) => __async$A(void 0, null, function* () {
|
|
35740
|
+
var _b = _a, { insuranceProvider } = _b, rest = __objRest$h(_b, ["insuranceProvider"]);
|
|
35749
35741
|
const result = yield client.insurance.addFunds(insuranceProvider, rest);
|
|
35750
35742
|
return result.data;
|
|
35751
35743
|
}),
|
|
@@ -35754,6 +35746,57 @@ const useAddInsuranceFunds = () => {
|
|
|
35754
35746
|
});
|
|
35755
35747
|
};
|
|
35756
35748
|
|
|
35749
|
+
var __defProp$l = Object.defineProperty;
|
|
35750
|
+
var __defProps$i = Object.defineProperties;
|
|
35751
|
+
var __getOwnPropDescs$i = Object.getOwnPropertyDescriptors;
|
|
35752
|
+
var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
|
|
35753
|
+
var __hasOwnProp$r = Object.prototype.hasOwnProperty;
|
|
35754
|
+
var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
|
|
35755
|
+
var __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
35756
|
+
var __spreadValues$l = (a, b) => {
|
|
35757
|
+
for (var prop in b || (b = {}))
|
|
35758
|
+
if (__hasOwnProp$r.call(b, prop))
|
|
35759
|
+
__defNormalProp$l(a, prop, b[prop]);
|
|
35760
|
+
if (__getOwnPropSymbols$r)
|
|
35761
|
+
for (var prop of __getOwnPropSymbols$r(b)) {
|
|
35762
|
+
if (__propIsEnum$r.call(b, prop))
|
|
35763
|
+
__defNormalProp$l(a, prop, b[prop]);
|
|
35764
|
+
}
|
|
35765
|
+
return a;
|
|
35766
|
+
};
|
|
35767
|
+
var __spreadProps$i = (a, b) => __defProps$i(a, __getOwnPropDescs$i(b));
|
|
35768
|
+
var __async$z = (__this, __arguments, generator) => {
|
|
35769
|
+
return new Promise((resolve, reject) => {
|
|
35770
|
+
var fulfilled = (value) => {
|
|
35771
|
+
try {
|
|
35772
|
+
step(generator.next(value));
|
|
35773
|
+
} catch (e) {
|
|
35774
|
+
reject(e);
|
|
35775
|
+
}
|
|
35776
|
+
};
|
|
35777
|
+
var rejected = (value) => {
|
|
35778
|
+
try {
|
|
35779
|
+
step(generator.throw(value));
|
|
35780
|
+
} catch (e) {
|
|
35781
|
+
reject(e);
|
|
35782
|
+
}
|
|
35783
|
+
};
|
|
35784
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
35785
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
35786
|
+
});
|
|
35787
|
+
};
|
|
35788
|
+
const useCreateInvoiceAddress = (params) => {
|
|
35789
|
+
const { client } = useShipEngine();
|
|
35790
|
+
return reactQuery.useMutation(__spreadProps$i(__spreadValues$l({}, params), {
|
|
35791
|
+
mutationFn: (invoiceAddress) => __async$z(void 0, null, function* () {
|
|
35792
|
+
const result = yield client.invoiceAddress.create(invoiceAddress);
|
|
35793
|
+
return result.data;
|
|
35794
|
+
}),
|
|
35795
|
+
mutationKey: ["useCreateInvoiceAddress"],
|
|
35796
|
+
onError
|
|
35797
|
+
}));
|
|
35798
|
+
};
|
|
35799
|
+
|
|
35757
35800
|
var __defProp$k = Object.defineProperty;
|
|
35758
35801
|
var __defProps$h = Object.defineProperties;
|
|
35759
35802
|
var __getOwnPropDescs$h = Object.getOwnPropertyDescriptors;
|
|
@@ -35793,14 +35836,14 @@ var __async$y = (__this, __arguments, generator) => {
|
|
|
35793
35836
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
35794
35837
|
});
|
|
35795
35838
|
};
|
|
35796
|
-
const
|
|
35839
|
+
const useUpdateInvoiceAddress = (params) => {
|
|
35797
35840
|
const { client } = useShipEngine();
|
|
35798
35841
|
return reactQuery.useMutation(__spreadProps$h(__spreadValues$k({}, params), {
|
|
35799
35842
|
mutationFn: (invoiceAddress) => __async$y(void 0, null, function* () {
|
|
35800
|
-
const result = yield client.invoiceAddress.
|
|
35843
|
+
const result = yield client.invoiceAddress.update(invoiceAddress);
|
|
35801
35844
|
return result.data;
|
|
35802
35845
|
}),
|
|
35803
|
-
mutationKey: ["
|
|
35846
|
+
mutationKey: ["useUpdateInvoiceAddress"],
|
|
35804
35847
|
onError
|
|
35805
35848
|
}));
|
|
35806
35849
|
};
|
|
@@ -35824,6 +35867,31 @@ var __spreadValues$j = (a, b) => {
|
|
|
35824
35867
|
return a;
|
|
35825
35868
|
};
|
|
35826
35869
|
var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
|
|
35870
|
+
const useGetInvoiceAddress = (params) => {
|
|
35871
|
+
const { client } = useShipEngine();
|
|
35872
|
+
return reactQuery.useQuery(__spreadProps$g(__spreadValues$j({}, params), {
|
|
35873
|
+
onError,
|
|
35874
|
+
queryFn: () => client.invoiceAddress.get(),
|
|
35875
|
+
queryKey: ["useGetInvoiceAddress"],
|
|
35876
|
+
select: (result) => result.data
|
|
35877
|
+
}));
|
|
35878
|
+
};
|
|
35879
|
+
|
|
35880
|
+
var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
|
|
35881
|
+
var __hasOwnProp$o = Object.prototype.hasOwnProperty;
|
|
35882
|
+
var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
|
|
35883
|
+
var __objRest$g = (source, exclude) => {
|
|
35884
|
+
var target = {};
|
|
35885
|
+
for (var prop in source)
|
|
35886
|
+
if (__hasOwnProp$o.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
35887
|
+
target[prop] = source[prop];
|
|
35888
|
+
if (source != null && __getOwnPropSymbols$o)
|
|
35889
|
+
for (var prop of __getOwnPropSymbols$o(source)) {
|
|
35890
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$o.call(source, prop))
|
|
35891
|
+
target[prop] = source[prop];
|
|
35892
|
+
}
|
|
35893
|
+
return target;
|
|
35894
|
+
};
|
|
35827
35895
|
var __async$x = (__this, __arguments, generator) => {
|
|
35828
35896
|
return new Promise((resolve, reject) => {
|
|
35829
35897
|
var fulfilled = (value) => {
|
|
@@ -35844,50 +35912,53 @@ var __async$x = (__this, __arguments, generator) => {
|
|
|
35844
35912
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
35845
35913
|
});
|
|
35846
35914
|
};
|
|
35847
|
-
const
|
|
35915
|
+
const useCreateLabel = () => {
|
|
35848
35916
|
const { client } = useShipEngine();
|
|
35849
|
-
return reactQuery.useMutation(
|
|
35850
|
-
mutationFn: (
|
|
35851
|
-
|
|
35917
|
+
return reactQuery.useMutation({
|
|
35918
|
+
mutationFn: (_a) => __async$x(void 0, null, function* () {
|
|
35919
|
+
var _b = _a, { rateId } = _b, options = __objRest$g(_b, ["rateId"]);
|
|
35920
|
+
const result = yield client.labels.createByRateId(rateId, options);
|
|
35852
35921
|
return result.data;
|
|
35853
35922
|
}),
|
|
35854
|
-
mutationKey: ["
|
|
35923
|
+
mutationKey: ["useCreateLabel"],
|
|
35855
35924
|
onError
|
|
35856
|
-
})
|
|
35925
|
+
});
|
|
35926
|
+
};
|
|
35927
|
+
|
|
35928
|
+
const useGetLabel = (labelId) => {
|
|
35929
|
+
const { client } = useShipEngine();
|
|
35930
|
+
return reactQuery.useQuery({
|
|
35931
|
+
enabled: labelId !== void 0,
|
|
35932
|
+
onError,
|
|
35933
|
+
queryFn: () => {
|
|
35934
|
+
if (labelId)
|
|
35935
|
+
return client.labels.get(labelId);
|
|
35936
|
+
return Promise.reject(new Error("labelId is require"));
|
|
35937
|
+
},
|
|
35938
|
+
queryKey: ["useGetLabel", labelId],
|
|
35939
|
+
select: (result) => result.data
|
|
35940
|
+
});
|
|
35857
35941
|
};
|
|
35858
35942
|
|
|
35859
35943
|
var __defProp$i = Object.defineProperty;
|
|
35860
35944
|
var __defProps$f = Object.defineProperties;
|
|
35861
35945
|
var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
|
|
35862
|
-
var __getOwnPropSymbols$
|
|
35863
|
-
var __hasOwnProp$
|
|
35864
|
-
var __propIsEnum$
|
|
35946
|
+
var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
|
|
35947
|
+
var __hasOwnProp$n = Object.prototype.hasOwnProperty;
|
|
35948
|
+
var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
|
|
35865
35949
|
var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
35866
35950
|
var __spreadValues$i = (a, b) => {
|
|
35867
35951
|
for (var prop in b || (b = {}))
|
|
35868
|
-
if (__hasOwnProp$
|
|
35952
|
+
if (__hasOwnProp$n.call(b, prop))
|
|
35869
35953
|
__defNormalProp$i(a, prop, b[prop]);
|
|
35870
|
-
if (__getOwnPropSymbols$
|
|
35871
|
-
for (var prop of __getOwnPropSymbols$
|
|
35872
|
-
if (__propIsEnum$
|
|
35954
|
+
if (__getOwnPropSymbols$n)
|
|
35955
|
+
for (var prop of __getOwnPropSymbols$n(b)) {
|
|
35956
|
+
if (__propIsEnum$n.call(b, prop))
|
|
35873
35957
|
__defNormalProp$i(a, prop, b[prop]);
|
|
35874
35958
|
}
|
|
35875
35959
|
return a;
|
|
35876
35960
|
};
|
|
35877
35961
|
var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
|
|
35878
|
-
const useGetInvoiceAddress = (params) => {
|
|
35879
|
-
const { client } = useShipEngine();
|
|
35880
|
-
return reactQuery.useQuery(__spreadProps$f(__spreadValues$i({}, params), {
|
|
35881
|
-
onError,
|
|
35882
|
-
queryFn: () => client.invoiceAddress.get(),
|
|
35883
|
-
queryKey: ["useGetInvoiceAddress"],
|
|
35884
|
-
select: (result) => result.data
|
|
35885
|
-
}));
|
|
35886
|
-
};
|
|
35887
|
-
|
|
35888
|
-
var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
|
|
35889
|
-
var __hasOwnProp$n = Object.prototype.hasOwnProperty;
|
|
35890
|
-
var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
|
|
35891
35962
|
var __objRest$f = (source, exclude) => {
|
|
35892
35963
|
var target = {};
|
|
35893
35964
|
for (var prop in source)
|
|
@@ -35900,6 +35971,17 @@ var __objRest$f = (source, exclude) => {
|
|
|
35900
35971
|
}
|
|
35901
35972
|
return target;
|
|
35902
35973
|
};
|
|
35974
|
+
const useListLabels = (params) => {
|
|
35975
|
+
const { client } = useShipEngine();
|
|
35976
|
+
const _a = __spreadValues$i({}, params), { queryFnParams } = _a, rest = __objRest$f(_a, ["queryFnParams"]);
|
|
35977
|
+
return reactQuery.useQuery(__spreadProps$f(__spreadValues$i({}, rest), {
|
|
35978
|
+
onError,
|
|
35979
|
+
queryFn: () => client.labels.list(queryFnParams),
|
|
35980
|
+
queryKey: ["useListLabels", params],
|
|
35981
|
+
select: (result) => result.data
|
|
35982
|
+
}));
|
|
35983
|
+
};
|
|
35984
|
+
|
|
35903
35985
|
var __async$w = (__this, __arguments, generator) => {
|
|
35904
35986
|
return new Promise((resolve, reject) => {
|
|
35905
35987
|
var fulfilled = (value) => {
|
|
@@ -35920,34 +36002,18 @@ var __async$w = (__this, __arguments, generator) => {
|
|
|
35920
36002
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
35921
36003
|
});
|
|
35922
36004
|
};
|
|
35923
|
-
const
|
|
36005
|
+
const useVoidLabel = () => {
|
|
35924
36006
|
const { client } = useShipEngine();
|
|
35925
36007
|
return reactQuery.useMutation({
|
|
35926
|
-
mutationFn: (
|
|
35927
|
-
|
|
35928
|
-
const result = yield client.labels.createByRateId(rateId, options);
|
|
36008
|
+
mutationFn: (labelId) => __async$w(void 0, null, function* () {
|
|
36009
|
+
const result = yield client.labels.void(labelId);
|
|
35929
36010
|
return result.data;
|
|
35930
36011
|
}),
|
|
35931
|
-
mutationKey: ["
|
|
36012
|
+
mutationKey: ["useVoidLabel"],
|
|
35932
36013
|
onError
|
|
35933
36014
|
});
|
|
35934
36015
|
};
|
|
35935
36016
|
|
|
35936
|
-
const useGetLabel = (labelId) => {
|
|
35937
|
-
const { client } = useShipEngine();
|
|
35938
|
-
return reactQuery.useQuery({
|
|
35939
|
-
enabled: labelId !== void 0,
|
|
35940
|
-
onError,
|
|
35941
|
-
queryFn: () => {
|
|
35942
|
-
if (labelId)
|
|
35943
|
-
return client.labels.get(labelId);
|
|
35944
|
-
return Promise.reject(new Error("labelId is require"));
|
|
35945
|
-
},
|
|
35946
|
-
queryKey: ["useGetLabel", labelId],
|
|
35947
|
-
select: (result) => result.data
|
|
35948
|
-
});
|
|
35949
|
-
};
|
|
35950
|
-
|
|
35951
36017
|
var __defProp$h = Object.defineProperty;
|
|
35952
36018
|
var __defProps$e = Object.defineProperties;
|
|
35953
36019
|
var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
|
|
@@ -35979,17 +36045,6 @@ var __objRest$e = (source, exclude) => {
|
|
|
35979
36045
|
}
|
|
35980
36046
|
return target;
|
|
35981
36047
|
};
|
|
35982
|
-
const useListLabels = (params) => {
|
|
35983
|
-
const { client } = useShipEngine();
|
|
35984
|
-
const _a = __spreadValues$h({}, params), { queryFnParams } = _a, rest = __objRest$e(_a, ["queryFnParams"]);
|
|
35985
|
-
return reactQuery.useQuery(__spreadProps$e(__spreadValues$h({}, rest), {
|
|
35986
|
-
onError,
|
|
35987
|
-
queryFn: () => client.labels.list(queryFnParams),
|
|
35988
|
-
queryKey: ["useListLabels", params],
|
|
35989
|
-
select: (result) => result.data
|
|
35990
|
-
}));
|
|
35991
|
-
};
|
|
35992
|
-
|
|
35993
36048
|
var __async$v = (__this, __arguments, generator) => {
|
|
35994
36049
|
return new Promise((resolve, reject) => {
|
|
35995
36050
|
var fulfilled = (value) => {
|
|
@@ -36010,16 +36065,30 @@ var __async$v = (__this, __arguments, generator) => {
|
|
|
36010
36065
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
36011
36066
|
});
|
|
36012
36067
|
};
|
|
36013
|
-
const
|
|
36068
|
+
const useListLabelsInfinite = (params) => {
|
|
36014
36069
|
const { client } = useShipEngine();
|
|
36015
|
-
|
|
36016
|
-
|
|
36017
|
-
|
|
36018
|
-
|
|
36070
|
+
const _a = __spreadValues$h({}, params), { queryFnParams } = _a, rest = __objRest$e(_a, ["queryFnParams"]);
|
|
36071
|
+
return reactQuery.useInfiniteQuery(__spreadProps$e(__spreadValues$h({}, rest), {
|
|
36072
|
+
getNextPageParam: (lastPage) => {
|
|
36073
|
+
if (lastPage.page < lastPage.pages) {
|
|
36074
|
+
return lastPage.page + 1;
|
|
36075
|
+
}
|
|
36076
|
+
return void 0;
|
|
36077
|
+
},
|
|
36078
|
+
onError,
|
|
36079
|
+
queryFn: (_0) => __async$v(void 0, [_0], function* ({ pageParam = 1 }) {
|
|
36080
|
+
const response = yield client.labels.list(__spreadProps$e(__spreadValues$h({}, queryFnParams), { page: pageParam }));
|
|
36081
|
+
return response.data;
|
|
36019
36082
|
}),
|
|
36020
|
-
|
|
36021
|
-
|
|
36022
|
-
|
|
36083
|
+
queryKey: ["useListLabelsInfinite", params],
|
|
36084
|
+
select: (data) => {
|
|
36085
|
+
return {
|
|
36086
|
+
labels: data.pages.flatMap((page) => page.labels),
|
|
36087
|
+
pageParams: data.pageParams,
|
|
36088
|
+
pages: data.pages
|
|
36089
|
+
};
|
|
36090
|
+
}
|
|
36091
|
+
}));
|
|
36023
36092
|
};
|
|
36024
36093
|
|
|
36025
36094
|
var __defProp$g = Object.defineProperty;
|
|
@@ -39106,6 +39175,7 @@ exports.useListCarriers = useListCarriers;
|
|
|
39106
39175
|
exports.useListCustomPackageTypes = useListCustomPackageTypes;
|
|
39107
39176
|
exports.useListFundingSources = useListFundingSources;
|
|
39108
39177
|
exports.useListLabels = useListLabels;
|
|
39178
|
+
exports.useListLabelsInfinite = useListLabelsInfinite;
|
|
39109
39179
|
exports.useListOrderSources = useListOrderSources;
|
|
39110
39180
|
exports.useListOrderSourcesConnections = useListOrderSourcesConnections;
|
|
39111
39181
|
exports.useListRateCards = useListRateCards;
|