@shipengine/alchemy 6.0.67 → 6.0.69
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 +245 -195
- package/index.mjs +245 -196
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -4883,41 +4883,33 @@ var _getHolder = getHolder$2;
|
|
|
4883
4883
|
|
|
4884
4884
|
/** Used as references for various `Number` constants. */
|
|
4885
4885
|
|
|
4886
|
-
var
|
|
4887
|
-
var hasRequired_isIndex;
|
|
4886
|
+
var MAX_SAFE_INTEGER$1 = 9007199254740991;
|
|
4888
4887
|
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
hasRequired_isIndex = 1;
|
|
4892
|
-
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
4888
|
+
/** Used to detect unsigned integer values. */
|
|
4889
|
+
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
4893
4890
|
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
function isIndex(value, length) {
|
|
4906
|
-
var type = typeof value;
|
|
4907
|
-
length = length == null ? MAX_SAFE_INTEGER : length;
|
|
4908
|
-
|
|
4909
|
-
return !!length &&
|
|
4910
|
-
(type == 'number' ||
|
|
4911
|
-
(type != 'symbol' && reIsUint.test(value))) &&
|
|
4912
|
-
(value > -1 && value % 1 == 0 && value < length);
|
|
4913
|
-
}
|
|
4891
|
+
/**
|
|
4892
|
+
* Checks if `value` is a valid array-like index.
|
|
4893
|
+
*
|
|
4894
|
+
* @private
|
|
4895
|
+
* @param {*} value The value to check.
|
|
4896
|
+
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
|
4897
|
+
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
|
4898
|
+
*/
|
|
4899
|
+
function isIndex$3(value, length) {
|
|
4900
|
+
var type = typeof value;
|
|
4901
|
+
length = length == null ? MAX_SAFE_INTEGER$1 : length;
|
|
4914
4902
|
|
|
4915
|
-
|
|
4916
|
-
|
|
4903
|
+
return !!length &&
|
|
4904
|
+
(type == 'number' ||
|
|
4905
|
+
(type != 'symbol' && reIsUint.test(value))) &&
|
|
4906
|
+
(value > -1 && value % 1 == 0 && value < length);
|
|
4917
4907
|
}
|
|
4918
4908
|
|
|
4909
|
+
var _isIndex = isIndex$3;
|
|
4910
|
+
|
|
4919
4911
|
var copyArray$2 = _copyArray,
|
|
4920
|
-
isIndex$2 =
|
|
4912
|
+
isIndex$2 = _isIndex;
|
|
4921
4913
|
|
|
4922
4914
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
4923
4915
|
var nativeMin$1 = Math.min;
|
|
@@ -6110,7 +6102,7 @@ var baseTimes = _baseTimes,
|
|
|
6110
6102
|
isArguments$2 = requireIsArguments(),
|
|
6111
6103
|
isArray$f = isArray_1,
|
|
6112
6104
|
isBuffer$4 = isBufferExports,
|
|
6113
|
-
isIndex$1 =
|
|
6105
|
+
isIndex$1 = _isIndex,
|
|
6114
6106
|
isTypedArray$1 = requireIsTypedArray();
|
|
6115
6107
|
|
|
6116
6108
|
/** Used for built-in method references. */
|
|
@@ -9441,7 +9433,7 @@ var _baseHasIn = baseHasIn$1;
|
|
|
9441
9433
|
var castPath = _castPath,
|
|
9442
9434
|
isArguments$1 = requireIsArguments(),
|
|
9443
9435
|
isArray$8 = isArray_1,
|
|
9444
|
-
isIndex =
|
|
9436
|
+
isIndex = _isIndex,
|
|
9445
9437
|
isLength = isLength_1,
|
|
9446
9438
|
toKey$3 = _toKey;
|
|
9447
9439
|
|
|
@@ -10331,7 +10323,7 @@ function require_isIterateeCall () {
|
|
|
10331
10323
|
hasRequired_isIterateeCall = 1;
|
|
10332
10324
|
var eq = requireEq(),
|
|
10333
10325
|
isArrayLike = isArrayLike_1,
|
|
10334
|
-
isIndex =
|
|
10326
|
+
isIndex = _isIndex,
|
|
10335
10327
|
isObject = isObject_1;
|
|
10336
10328
|
|
|
10337
10329
|
/**
|
|
@@ -10808,17 +10800,17 @@ var AccountBillingPlanChangeType = /* @__PURE__ */ ((AccountBillingPlanChangeTyp
|
|
|
10808
10800
|
return AccountBillingPlanChangeType2;
|
|
10809
10801
|
})(AccountBillingPlanChangeType || {});
|
|
10810
10802
|
|
|
10811
|
-
var __getOwnPropSymbols
|
|
10812
|
-
var __hasOwnProp
|
|
10813
|
-
var __propIsEnum
|
|
10803
|
+
var __getOwnPropSymbols$10 = Object.getOwnPropertySymbols;
|
|
10804
|
+
var __hasOwnProp$10 = Object.prototype.hasOwnProperty;
|
|
10805
|
+
var __propIsEnum$10 = Object.prototype.propertyIsEnumerable;
|
|
10814
10806
|
var __objRest$x = (source, exclude) => {
|
|
10815
10807
|
var target = {};
|
|
10816
10808
|
for (var prop in source)
|
|
10817
|
-
if (__hasOwnProp
|
|
10809
|
+
if (__hasOwnProp$10.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
10818
10810
|
target[prop] = source[prop];
|
|
10819
|
-
if (source != null && __getOwnPropSymbols
|
|
10820
|
-
for (var prop of __getOwnPropSymbols
|
|
10821
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum
|
|
10811
|
+
if (source != null && __getOwnPropSymbols$10)
|
|
10812
|
+
for (var prop of __getOwnPropSymbols$10(source)) {
|
|
10813
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$10.call(source, prop))
|
|
10822
10814
|
target[prop] = source[prop];
|
|
10823
10815
|
}
|
|
10824
10816
|
return target;
|
|
@@ -10953,17 +10945,17 @@ const types = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
10953
10945
|
RateCardStatus
|
|
10954
10946
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
10955
10947
|
|
|
10956
|
-
var __getOwnPropSymbols
|
|
10957
|
-
var __hasOwnProp
|
|
10958
|
-
var __propIsEnum
|
|
10948
|
+
var __getOwnPropSymbols$$ = Object.getOwnPropertySymbols;
|
|
10949
|
+
var __hasOwnProp$$ = Object.prototype.hasOwnProperty;
|
|
10950
|
+
var __propIsEnum$$ = Object.prototype.propertyIsEnumerable;
|
|
10959
10951
|
var __objRest$w = (source, exclude) => {
|
|
10960
10952
|
var target = {};
|
|
10961
10953
|
for (var prop in source)
|
|
10962
|
-
if (__hasOwnProp
|
|
10954
|
+
if (__hasOwnProp$$.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
10963
10955
|
target[prop] = source[prop];
|
|
10964
|
-
if (source != null && __getOwnPropSymbols
|
|
10965
|
-
for (var prop of __getOwnPropSymbols
|
|
10966
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum
|
|
10956
|
+
if (source != null && __getOwnPropSymbols$$)
|
|
10957
|
+
for (var prop of __getOwnPropSymbols$$(source)) {
|
|
10958
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$$.call(source, prop))
|
|
10967
10959
|
target[prop] = source[prop];
|
|
10968
10960
|
}
|
|
10969
10961
|
return target;
|
|
@@ -11024,6 +11016,12 @@ class AccountAddonsAPI {
|
|
|
11024
11016
|
this.list = () => {
|
|
11025
11017
|
return this.client.get("/v1/account/addons");
|
|
11026
11018
|
};
|
|
11019
|
+
/**
|
|
11020
|
+
* The `enable` method allows to enable an AddOn for the current user
|
|
11021
|
+
*/
|
|
11022
|
+
this.enable = (addonCode) => {
|
|
11023
|
+
return this.client.post(`/v1/account/addons/${addonCode}/enable`);
|
|
11024
|
+
};
|
|
11027
11025
|
this.client = client;
|
|
11028
11026
|
}
|
|
11029
11027
|
}
|
|
@@ -13831,7 +13829,7 @@ var ipaddr = {
|
|
|
13831
13829
|
}).call(commonjsGlobal);
|
|
13832
13830
|
} (ipaddr));
|
|
13833
13831
|
|
|
13834
|
-
var __async$
|
|
13832
|
+
var __async$16 = (__this, __arguments, generator) => {
|
|
13835
13833
|
return new Promise((resolve, reject) => {
|
|
13836
13834
|
var fulfilled = (value) => {
|
|
13837
13835
|
try {
|
|
@@ -13851,7 +13849,7 @@ var __async$15 = (__this, __arguments, generator) => {
|
|
|
13851
13849
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
13852
13850
|
});
|
|
13853
13851
|
};
|
|
13854
|
-
const getEndUserIpAddress = () => __async$
|
|
13852
|
+
const getEndUserIpAddress = () => __async$16(void 0, null, function* () {
|
|
13855
13853
|
try {
|
|
13856
13854
|
const response = yield axios.get("https://api.ipify.org/?format=json");
|
|
13857
13855
|
if (response.data.ip && ipaddrExports.isValid(response.data.ip)) {
|
|
@@ -13912,38 +13910,38 @@ const decamelizeKeys = (obj, separator = "_") => {
|
|
|
13912
13910
|
return obj;
|
|
13913
13911
|
};
|
|
13914
13912
|
|
|
13915
|
-
var __defProp$
|
|
13916
|
-
var __defProps$
|
|
13917
|
-
var __getOwnPropDescs$
|
|
13918
|
-
var __getOwnPropSymbols$
|
|
13919
|
-
var __hasOwnProp$
|
|
13920
|
-
var __propIsEnum$
|
|
13921
|
-
var __defNormalProp$
|
|
13922
|
-
var __spreadValues$
|
|
13913
|
+
var __defProp$P = Object.defineProperty;
|
|
13914
|
+
var __defProps$J = Object.defineProperties;
|
|
13915
|
+
var __getOwnPropDescs$J = Object.getOwnPropertyDescriptors;
|
|
13916
|
+
var __getOwnPropSymbols$_ = Object.getOwnPropertySymbols;
|
|
13917
|
+
var __hasOwnProp$_ = Object.prototype.hasOwnProperty;
|
|
13918
|
+
var __propIsEnum$_ = Object.prototype.propertyIsEnumerable;
|
|
13919
|
+
var __defNormalProp$P = (obj, key, value) => key in obj ? __defProp$P(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13920
|
+
var __spreadValues$P = (a, b) => {
|
|
13923
13921
|
for (var prop in b || (b = {}))
|
|
13924
|
-
if (__hasOwnProp$
|
|
13925
|
-
__defNormalProp$
|
|
13926
|
-
if (__getOwnPropSymbols$
|
|
13927
|
-
for (var prop of __getOwnPropSymbols$
|
|
13928
|
-
if (__propIsEnum$
|
|
13929
|
-
__defNormalProp$
|
|
13922
|
+
if (__hasOwnProp$_.call(b, prop))
|
|
13923
|
+
__defNormalProp$P(a, prop, b[prop]);
|
|
13924
|
+
if (__getOwnPropSymbols$_)
|
|
13925
|
+
for (var prop of __getOwnPropSymbols$_(b)) {
|
|
13926
|
+
if (__propIsEnum$_.call(b, prop))
|
|
13927
|
+
__defNormalProp$P(a, prop, b[prop]);
|
|
13930
13928
|
}
|
|
13931
13929
|
return a;
|
|
13932
13930
|
};
|
|
13933
|
-
var __spreadProps$
|
|
13931
|
+
var __spreadProps$J = (a, b) => __defProps$J(a, __getOwnPropDescs$J(b));
|
|
13934
13932
|
var __objRest$v = (source, exclude) => {
|
|
13935
13933
|
var target = {};
|
|
13936
13934
|
for (var prop in source)
|
|
13937
|
-
if (__hasOwnProp$
|
|
13935
|
+
if (__hasOwnProp$_.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
13938
13936
|
target[prop] = source[prop];
|
|
13939
|
-
if (source != null && __getOwnPropSymbols$
|
|
13940
|
-
for (var prop of __getOwnPropSymbols$
|
|
13941
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
13937
|
+
if (source != null && __getOwnPropSymbols$_)
|
|
13938
|
+
for (var prop of __getOwnPropSymbols$_(source)) {
|
|
13939
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$_.call(source, prop))
|
|
13942
13940
|
target[prop] = source[prop];
|
|
13943
13941
|
}
|
|
13944
13942
|
return target;
|
|
13945
13943
|
};
|
|
13946
|
-
var __async$
|
|
13944
|
+
var __async$15 = (__this, __arguments, generator) => {
|
|
13947
13945
|
return new Promise((resolve, reject) => {
|
|
13948
13946
|
var fulfilled = (value) => {
|
|
13949
13947
|
try {
|
|
@@ -13983,12 +13981,12 @@ class CarriersAPI {
|
|
|
13983
13981
|
/**
|
|
13984
13982
|
* The `connect` method connects a carrier account to a user's ShipEngine account.
|
|
13985
13983
|
*/
|
|
13986
|
-
this.connect = (_a) => __async$
|
|
13984
|
+
this.connect = (_a) => __async$15(this, null, function* () {
|
|
13987
13985
|
var _b = _a, { carrierCode } = _b, connection = __objRest$v(_b, ["carrierCode"]);
|
|
13988
13986
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
13989
13987
|
if (!endUserIpAddress)
|
|
13990
13988
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
13991
|
-
return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$
|
|
13989
|
+
return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$J(__spreadValues$P({}, connection), {
|
|
13992
13990
|
endUserIpAddress
|
|
13993
13991
|
}));
|
|
13994
13992
|
});
|
|
@@ -14072,22 +14070,22 @@ class CarriersAPI {
|
|
|
14072
14070
|
}
|
|
14073
14071
|
}
|
|
14074
14072
|
|
|
14075
|
-
var __getOwnPropSymbols$
|
|
14076
|
-
var __hasOwnProp$
|
|
14077
|
-
var __propIsEnum$
|
|
14073
|
+
var __getOwnPropSymbols$Z = Object.getOwnPropertySymbols;
|
|
14074
|
+
var __hasOwnProp$Z = Object.prototype.hasOwnProperty;
|
|
14075
|
+
var __propIsEnum$Z = Object.prototype.propertyIsEnumerable;
|
|
14078
14076
|
var __objRest$u = (source, exclude) => {
|
|
14079
14077
|
var target = {};
|
|
14080
14078
|
for (var prop in source)
|
|
14081
|
-
if (__hasOwnProp$
|
|
14079
|
+
if (__hasOwnProp$Z.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
14082
14080
|
target[prop] = source[prop];
|
|
14083
|
-
if (source != null && __getOwnPropSymbols$
|
|
14084
|
-
for (var prop of __getOwnPropSymbols$
|
|
14085
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
14081
|
+
if (source != null && __getOwnPropSymbols$Z)
|
|
14082
|
+
for (var prop of __getOwnPropSymbols$Z(source)) {
|
|
14083
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$Z.call(source, prop))
|
|
14086
14084
|
target[prop] = source[prop];
|
|
14087
14085
|
}
|
|
14088
14086
|
return target;
|
|
14089
14087
|
};
|
|
14090
|
-
var __async$
|
|
14088
|
+
var __async$14 = (__this, __arguments, generator) => {
|
|
14091
14089
|
return new Promise((resolve, reject) => {
|
|
14092
14090
|
var fulfilled = (value) => {
|
|
14093
14091
|
try {
|
|
@@ -14129,7 +14127,7 @@ class ConnectionsAPI {
|
|
|
14129
14127
|
/**
|
|
14130
14128
|
* The `connectCarrier` method connects a carrier to account.
|
|
14131
14129
|
*/
|
|
14132
|
-
this.connectCarrier = (carrierName, formData) => __async$
|
|
14130
|
+
this.connectCarrier = (carrierName, formData) => __async$14(this, null, function* () {
|
|
14133
14131
|
return yield this.client.post(
|
|
14134
14132
|
`/v1/connections/carriers/${carrierName}`,
|
|
14135
14133
|
formData,
|
|
@@ -16297,23 +16295,23 @@ class CustomPackagesAPI {
|
|
|
16297
16295
|
}
|
|
16298
16296
|
}
|
|
16299
16297
|
|
|
16300
|
-
var __defProp$
|
|
16301
|
-
var __getOwnPropSymbols$
|
|
16302
|
-
var __hasOwnProp$
|
|
16303
|
-
var __propIsEnum$
|
|
16304
|
-
var __defNormalProp$
|
|
16305
|
-
var __spreadValues$
|
|
16298
|
+
var __defProp$O = Object.defineProperty;
|
|
16299
|
+
var __getOwnPropSymbols$Y = Object.getOwnPropertySymbols;
|
|
16300
|
+
var __hasOwnProp$Y = Object.prototype.hasOwnProperty;
|
|
16301
|
+
var __propIsEnum$Y = Object.prototype.propertyIsEnumerable;
|
|
16302
|
+
var __defNormalProp$O = (obj, key, value) => key in obj ? __defProp$O(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16303
|
+
var __spreadValues$O = (a, b) => {
|
|
16306
16304
|
for (var prop in b || (b = {}))
|
|
16307
|
-
if (__hasOwnProp$
|
|
16308
|
-
__defNormalProp$
|
|
16309
|
-
if (__getOwnPropSymbols$
|
|
16310
|
-
for (var prop of __getOwnPropSymbols$
|
|
16311
|
-
if (__propIsEnum$
|
|
16312
|
-
__defNormalProp$
|
|
16305
|
+
if (__hasOwnProp$Y.call(b, prop))
|
|
16306
|
+
__defNormalProp$O(a, prop, b[prop]);
|
|
16307
|
+
if (__getOwnPropSymbols$Y)
|
|
16308
|
+
for (var prop of __getOwnPropSymbols$Y(b)) {
|
|
16309
|
+
if (__propIsEnum$Y.call(b, prop))
|
|
16310
|
+
__defNormalProp$O(a, prop, b[prop]);
|
|
16313
16311
|
}
|
|
16314
16312
|
return a;
|
|
16315
16313
|
};
|
|
16316
|
-
var __async$
|
|
16314
|
+
var __async$13 = (__this, __arguments, generator) => {
|
|
16317
16315
|
return new Promise((resolve, reject) => {
|
|
16318
16316
|
var fulfilled = (value) => {
|
|
16319
16317
|
try {
|
|
@@ -16352,12 +16350,12 @@ class FundingSourcesAPI {
|
|
|
16352
16350
|
* The `create` method creates a new funding source for a given user. This requires
|
|
16353
16351
|
* payment information to be collected from the user.
|
|
16354
16352
|
*/
|
|
16355
|
-
this.create = (createFundingSource) => __async$
|
|
16353
|
+
this.create = (createFundingSource) => __async$13(this, null, function* () {
|
|
16356
16354
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16357
16355
|
if (!endUserIpAddress) {
|
|
16358
16356
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
16359
16357
|
}
|
|
16360
|
-
return yield this.client.post("/v1/funding_sources", __spreadValues$
|
|
16358
|
+
return yield this.client.post("/v1/funding_sources", __spreadValues$O({
|
|
16361
16359
|
endUserIpAddress
|
|
16362
16360
|
}, createFundingSource));
|
|
16363
16361
|
});
|
|
@@ -16366,7 +16364,7 @@ class FundingSourcesAPI {
|
|
|
16366
16364
|
* user to update the billing address or payment information associated with the
|
|
16367
16365
|
* funding source.
|
|
16368
16366
|
*/
|
|
16369
|
-
this.update = (billingInfo, creditCardInfo, auctanePayInfo, fundingSourceId) => __async$
|
|
16367
|
+
this.update = (billingInfo, creditCardInfo, auctanePayInfo, fundingSourceId) => __async$13(this, null, function* () {
|
|
16370
16368
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16371
16369
|
if (!endUserIpAddress) {
|
|
16372
16370
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
@@ -16376,7 +16374,7 @@ class FundingSourcesAPI {
|
|
|
16376
16374
|
{
|
|
16377
16375
|
billingInfo,
|
|
16378
16376
|
endUserIpAddress,
|
|
16379
|
-
paymentMethod: __spreadValues$
|
|
16377
|
+
paymentMethod: __spreadValues$O({
|
|
16380
16378
|
creditCardInfo
|
|
16381
16379
|
}, auctanePayInfo)
|
|
16382
16380
|
}
|
|
@@ -16386,19 +16384,19 @@ class FundingSourcesAPI {
|
|
|
16386
16384
|
* The `registerCarrier` method registers a carrier account and associates
|
|
16387
16385
|
* it with a given funding source.
|
|
16388
16386
|
*/
|
|
16389
|
-
this.registerCarrier = (carrier) => __async$
|
|
16387
|
+
this.registerCarrier = (carrier) => __async$13(this, null, function* () {
|
|
16390
16388
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16391
16389
|
if (!endUserIpAddress) {
|
|
16392
16390
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
16393
16391
|
}
|
|
16394
|
-
return yield this.client.post("/v1/registration/funding_source", __spreadValues$
|
|
16392
|
+
return yield this.client.post("/v1/registration/funding_source", __spreadValues$O({
|
|
16395
16393
|
endUserIpAddress
|
|
16396
16394
|
}, carrier));
|
|
16397
16395
|
});
|
|
16398
16396
|
/**
|
|
16399
16397
|
* The `addFunds` method allows you to add funds to a funding source.
|
|
16400
16398
|
*/
|
|
16401
|
-
this.addFunds = (amount, fundingSourceId) => __async$
|
|
16399
|
+
this.addFunds = (amount, fundingSourceId) => __async$13(this, null, function* () {
|
|
16402
16400
|
return yield this.client.put(
|
|
16403
16401
|
`/v1/funding_sources/${fundingSourceId}/add_funds`,
|
|
16404
16402
|
amount
|
|
@@ -16408,7 +16406,7 @@ class FundingSourcesAPI {
|
|
|
16408
16406
|
* The `metadata` method returns seller-specific requirements for creating funding sources
|
|
16409
16407
|
* and attaching carriers
|
|
16410
16408
|
*/
|
|
16411
|
-
this.metadata = () => __async$
|
|
16409
|
+
this.metadata = () => __async$13(this, null, function* () {
|
|
16412
16410
|
return yield this.client.get("/v1/funding_sources/metadata");
|
|
16413
16411
|
});
|
|
16414
16412
|
/**
|
|
@@ -16460,7 +16458,7 @@ class InsuranceAPI {
|
|
|
16460
16458
|
}
|
|
16461
16459
|
}
|
|
16462
16460
|
|
|
16463
|
-
var __async$
|
|
16461
|
+
var __async$12 = (__this, __arguments, generator) => {
|
|
16464
16462
|
return new Promise((resolve, reject) => {
|
|
16465
16463
|
var fulfilled = (value) => {
|
|
16466
16464
|
try {
|
|
@@ -16492,13 +16490,13 @@ class InvoiceAddressAPI {
|
|
|
16492
16490
|
/**
|
|
16493
16491
|
* The `create` method creates a new invoice address for a given user.
|
|
16494
16492
|
*/
|
|
16495
|
-
this.create = (invoiceAddress) => __async$
|
|
16493
|
+
this.create = (invoiceAddress) => __async$12(this, null, function* () {
|
|
16496
16494
|
return yield this.client.post("/v1/invoice_address", invoiceAddress);
|
|
16497
16495
|
});
|
|
16498
16496
|
/**
|
|
16499
16497
|
* The `update` method updates a invoice address for a given user.
|
|
16500
16498
|
*/
|
|
16501
|
-
this.update = (invoiceAddress) => __async$
|
|
16499
|
+
this.update = (invoiceAddress) => __async$12(this, null, function* () {
|
|
16502
16500
|
return yield this.client.put("/v1/invoice_address", invoiceAddress);
|
|
16503
16501
|
});
|
|
16504
16502
|
this.client = client;
|
|
@@ -16560,17 +16558,17 @@ class LabelsAPI {
|
|
|
16560
16558
|
}
|
|
16561
16559
|
}
|
|
16562
16560
|
|
|
16563
|
-
var __getOwnPropSymbols$
|
|
16564
|
-
var __hasOwnProp$
|
|
16565
|
-
var __propIsEnum$
|
|
16561
|
+
var __getOwnPropSymbols$X = Object.getOwnPropertySymbols;
|
|
16562
|
+
var __hasOwnProp$X = Object.prototype.hasOwnProperty;
|
|
16563
|
+
var __propIsEnum$X = Object.prototype.propertyIsEnumerable;
|
|
16566
16564
|
var __objRest$t = (source, exclude) => {
|
|
16567
16565
|
var target = {};
|
|
16568
16566
|
for (var prop in source)
|
|
16569
|
-
if (__hasOwnProp$
|
|
16567
|
+
if (__hasOwnProp$X.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
16570
16568
|
target[prop] = source[prop];
|
|
16571
|
-
if (source != null && __getOwnPropSymbols$
|
|
16572
|
-
for (var prop of __getOwnPropSymbols$
|
|
16573
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
16569
|
+
if (source != null && __getOwnPropSymbols$X)
|
|
16570
|
+
for (var prop of __getOwnPropSymbols$X(source)) {
|
|
16571
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$X.call(source, prop))
|
|
16574
16572
|
target[prop] = source[prop];
|
|
16575
16573
|
}
|
|
16576
16574
|
return target;
|
|
@@ -16691,19 +16689,19 @@ class RateCardsAPI {
|
|
|
16691
16689
|
}
|
|
16692
16690
|
}
|
|
16693
16691
|
|
|
16694
|
-
var __defProp$
|
|
16695
|
-
var __getOwnPropSymbols$
|
|
16696
|
-
var __hasOwnProp$
|
|
16697
|
-
var __propIsEnum$
|
|
16698
|
-
var __defNormalProp$
|
|
16699
|
-
var __spreadValues$
|
|
16692
|
+
var __defProp$N = Object.defineProperty;
|
|
16693
|
+
var __getOwnPropSymbols$W = Object.getOwnPropertySymbols;
|
|
16694
|
+
var __hasOwnProp$W = Object.prototype.hasOwnProperty;
|
|
16695
|
+
var __propIsEnum$W = Object.prototype.propertyIsEnumerable;
|
|
16696
|
+
var __defNormalProp$N = (obj, key, value) => key in obj ? __defProp$N(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16697
|
+
var __spreadValues$N = (a, b) => {
|
|
16700
16698
|
for (var prop in b || (b = {}))
|
|
16701
|
-
if (__hasOwnProp$
|
|
16702
|
-
__defNormalProp$
|
|
16703
|
-
if (__getOwnPropSymbols$
|
|
16704
|
-
for (var prop of __getOwnPropSymbols$
|
|
16705
|
-
if (__propIsEnum$
|
|
16706
|
-
__defNormalProp$
|
|
16699
|
+
if (__hasOwnProp$W.call(b, prop))
|
|
16700
|
+
__defNormalProp$N(a, prop, b[prop]);
|
|
16701
|
+
if (__getOwnPropSymbols$W)
|
|
16702
|
+
for (var prop of __getOwnPropSymbols$W(b)) {
|
|
16703
|
+
if (__propIsEnum$W.call(b, prop))
|
|
16704
|
+
__defNormalProp$N(a, prop, b[prop]);
|
|
16707
16705
|
}
|
|
16708
16706
|
return a;
|
|
16709
16707
|
};
|
|
@@ -16725,7 +16723,7 @@ class RatesAPI {
|
|
|
16725
16723
|
* method.
|
|
16726
16724
|
*/
|
|
16727
16725
|
this.estimate = (params) => {
|
|
16728
|
-
return this.client.post("/v1/rates/estimate", __spreadValues$
|
|
16726
|
+
return this.client.post("/v1/rates/estimate", __spreadValues$N({}, params));
|
|
16729
16727
|
};
|
|
16730
16728
|
this.client = client;
|
|
16731
16729
|
}
|
|
@@ -16805,7 +16803,7 @@ class SalesOrdersAPI {
|
|
|
16805
16803
|
}
|
|
16806
16804
|
}
|
|
16807
16805
|
|
|
16808
|
-
var __async$
|
|
16806
|
+
var __async$11 = (__this, __arguments, generator) => {
|
|
16809
16807
|
return new Promise((resolve, reject) => {
|
|
16810
16808
|
var fulfilled = (value) => {
|
|
16811
16809
|
try {
|
|
@@ -16863,7 +16861,7 @@ class SellersAPI {
|
|
|
16863
16861
|
/**
|
|
16864
16862
|
* Deletes an API Key
|
|
16865
16863
|
*/
|
|
16866
|
-
this.deleteSellerApiKey = (_0) => __async$
|
|
16864
|
+
this.deleteSellerApiKey = (_0) => __async$11(this, [_0], function* ({
|
|
16867
16865
|
encryptedApiKey,
|
|
16868
16866
|
sellerId,
|
|
16869
16867
|
isSandbox
|
|
@@ -16909,19 +16907,19 @@ class SellersAPI {
|
|
|
16909
16907
|
}
|
|
16910
16908
|
}
|
|
16911
16909
|
|
|
16912
|
-
var __defProp$
|
|
16913
|
-
var __getOwnPropSymbols$
|
|
16914
|
-
var __hasOwnProp$
|
|
16915
|
-
var __propIsEnum$
|
|
16916
|
-
var __defNormalProp$
|
|
16917
|
-
var __spreadValues$
|
|
16910
|
+
var __defProp$M = Object.defineProperty;
|
|
16911
|
+
var __getOwnPropSymbols$V = Object.getOwnPropertySymbols;
|
|
16912
|
+
var __hasOwnProp$V = Object.prototype.hasOwnProperty;
|
|
16913
|
+
var __propIsEnum$V = Object.prototype.propertyIsEnumerable;
|
|
16914
|
+
var __defNormalProp$M = (obj, key, value) => key in obj ? __defProp$M(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16915
|
+
var __spreadValues$M = (a, b) => {
|
|
16918
16916
|
for (var prop in b || (b = {}))
|
|
16919
|
-
if (__hasOwnProp$
|
|
16920
|
-
__defNormalProp$
|
|
16921
|
-
if (__getOwnPropSymbols$
|
|
16922
|
-
for (var prop of __getOwnPropSymbols$
|
|
16923
|
-
if (__propIsEnum$
|
|
16924
|
-
__defNormalProp$
|
|
16917
|
+
if (__hasOwnProp$V.call(b, prop))
|
|
16918
|
+
__defNormalProp$M(a, prop, b[prop]);
|
|
16919
|
+
if (__getOwnPropSymbols$V)
|
|
16920
|
+
for (var prop of __getOwnPropSymbols$V(b)) {
|
|
16921
|
+
if (__propIsEnum$V.call(b, prop))
|
|
16922
|
+
__defNormalProp$M(a, prop, b[prop]);
|
|
16925
16923
|
}
|
|
16926
16924
|
return a;
|
|
16927
16925
|
};
|
|
@@ -16933,7 +16931,7 @@ class ServicePointsAPI {
|
|
|
16933
16931
|
* Either an address, coordinates, or an address query
|
|
16934
16932
|
*/
|
|
16935
16933
|
this.list = (options) => {
|
|
16936
|
-
return this.client.post("/v1/service_points/list", __spreadValues$
|
|
16934
|
+
return this.client.post("/v1/service_points/list", __spreadValues$M({}, options));
|
|
16937
16935
|
};
|
|
16938
16936
|
/**
|
|
16939
16937
|
* Get a specific service point by its carrier code, country code, and id
|
|
@@ -16951,7 +16949,7 @@ class ServicePointsAPI {
|
|
|
16951
16949
|
}
|
|
16952
16950
|
}
|
|
16953
16951
|
|
|
16954
|
-
var __async
|
|
16952
|
+
var __async$10 = (__this, __arguments, generator) => {
|
|
16955
16953
|
return new Promise((resolve, reject) => {
|
|
16956
16954
|
var fulfilled = (value) => {
|
|
16957
16955
|
try {
|
|
@@ -17000,7 +16998,7 @@ class ShipmentsAPI {
|
|
|
17000
16998
|
* The `create` method allows for creating shipments based on a list of shipment
|
|
17001
16999
|
* items passed into this method.
|
|
17002
17000
|
*/
|
|
17003
|
-
this.create = (...shipments) => __async
|
|
17001
|
+
this.create = (...shipments) => __async$10(this, null, function* () {
|
|
17004
17002
|
return this.client.post("/v1/shipments", {
|
|
17005
17003
|
shipments
|
|
17006
17004
|
});
|
|
@@ -34417,38 +34415,38 @@ class WebhooksAPI {
|
|
|
34417
34415
|
}
|
|
34418
34416
|
}
|
|
34419
34417
|
|
|
34420
|
-
var __defProp$
|
|
34421
|
-
var __defProps$
|
|
34422
|
-
var __getOwnPropDescs$
|
|
34423
|
-
var __getOwnPropSymbols$
|
|
34424
|
-
var __hasOwnProp$
|
|
34425
|
-
var __propIsEnum$
|
|
34426
|
-
var __defNormalProp$
|
|
34427
|
-
var __spreadValues$
|
|
34418
|
+
var __defProp$L = Object.defineProperty;
|
|
34419
|
+
var __defProps$I = Object.defineProperties;
|
|
34420
|
+
var __getOwnPropDescs$I = Object.getOwnPropertyDescriptors;
|
|
34421
|
+
var __getOwnPropSymbols$U = Object.getOwnPropertySymbols;
|
|
34422
|
+
var __hasOwnProp$U = Object.prototype.hasOwnProperty;
|
|
34423
|
+
var __propIsEnum$U = Object.prototype.propertyIsEnumerable;
|
|
34424
|
+
var __defNormalProp$L = (obj, key, value) => key in obj ? __defProp$L(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
34425
|
+
var __spreadValues$L = (a, b) => {
|
|
34428
34426
|
for (var prop in b || (b = {}))
|
|
34429
|
-
if (__hasOwnProp$
|
|
34430
|
-
__defNormalProp$
|
|
34431
|
-
if (__getOwnPropSymbols$
|
|
34432
|
-
for (var prop of __getOwnPropSymbols$
|
|
34433
|
-
if (__propIsEnum$
|
|
34434
|
-
__defNormalProp$
|
|
34427
|
+
if (__hasOwnProp$U.call(b, prop))
|
|
34428
|
+
__defNormalProp$L(a, prop, b[prop]);
|
|
34429
|
+
if (__getOwnPropSymbols$U)
|
|
34430
|
+
for (var prop of __getOwnPropSymbols$U(b)) {
|
|
34431
|
+
if (__propIsEnum$U.call(b, prop))
|
|
34432
|
+
__defNormalProp$L(a, prop, b[prop]);
|
|
34435
34433
|
}
|
|
34436
34434
|
return a;
|
|
34437
34435
|
};
|
|
34438
|
-
var __spreadProps$
|
|
34436
|
+
var __spreadProps$I = (a, b) => __defProps$I(a, __getOwnPropDescs$I(b));
|
|
34439
34437
|
var __objRest$s = (source, exclude) => {
|
|
34440
34438
|
var target = {};
|
|
34441
34439
|
for (var prop in source)
|
|
34442
|
-
if (__hasOwnProp$
|
|
34440
|
+
if (__hasOwnProp$U.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
34443
34441
|
target[prop] = source[prop];
|
|
34444
|
-
if (source != null && __getOwnPropSymbols$
|
|
34445
|
-
for (var prop of __getOwnPropSymbols$
|
|
34446
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
34442
|
+
if (source != null && __getOwnPropSymbols$U)
|
|
34443
|
+
for (var prop of __getOwnPropSymbols$U(source)) {
|
|
34444
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$U.call(source, prop))
|
|
34447
34445
|
target[prop] = source[prop];
|
|
34448
34446
|
}
|
|
34449
34447
|
return target;
|
|
34450
34448
|
};
|
|
34451
|
-
var __async
|
|
34449
|
+
var __async$$ = (__this, __arguments, generator) => {
|
|
34452
34450
|
return new Promise((resolve, reject) => {
|
|
34453
34451
|
var fulfilled = (value) => {
|
|
34454
34452
|
try {
|
|
@@ -34471,7 +34469,7 @@ var __async$_ = (__this, __arguments, generator) => {
|
|
|
34471
34469
|
const logger$1 = E({
|
|
34472
34470
|
level: process.env.NODE_ENV === "production" ? "fatal" : "info",
|
|
34473
34471
|
name: "shipengine-api",
|
|
34474
|
-
serializers: __spreadProps$
|
|
34472
|
+
serializers: __spreadProps$I(__spreadValues$L({}, k), {
|
|
34475
34473
|
req: (req) => ({
|
|
34476
34474
|
headers: req.headers,
|
|
34477
34475
|
method: req.method,
|
|
@@ -34496,7 +34494,7 @@ class ShipEngineAPI {
|
|
|
34496
34494
|
this.getSandboxToken = getSandboxToken;
|
|
34497
34495
|
const client = axios.create({
|
|
34498
34496
|
baseURL,
|
|
34499
|
-
headers: __spreadProps$
|
|
34497
|
+
headers: __spreadProps$I(__spreadValues$L({}, headers), {
|
|
34500
34498
|
"Content-Type": "application/json"
|
|
34501
34499
|
}),
|
|
34502
34500
|
paramsSerializer: (params) => lib.stringify(decamelizeKeys(params), { arrayFormat: "brackets" }),
|
|
@@ -34536,7 +34534,7 @@ class ShipEngineAPI {
|
|
|
34536
34534
|
});
|
|
34537
34535
|
client.defaults.headers.common["Authorization"] = `Bearer ${token}`;
|
|
34538
34536
|
client.interceptors.request.use(
|
|
34539
|
-
(config) => __async
|
|
34537
|
+
(config) => __async$$(this, null, function* () {
|
|
34540
34538
|
if (config.isSandbox) {
|
|
34541
34539
|
if (!this.sandboxToken) {
|
|
34542
34540
|
this.sandboxToken = yield getSandboxToken == null ? void 0 : getSandboxToken();
|
|
@@ -34563,7 +34561,7 @@ class ShipEngineAPI {
|
|
|
34563
34561
|
);
|
|
34564
34562
|
return res;
|
|
34565
34563
|
},
|
|
34566
|
-
(err) => __async
|
|
34564
|
+
(err) => __async$$(this, null, function* () {
|
|
34567
34565
|
var _a, _b, _c, _d, _e;
|
|
34568
34566
|
logger$1.error(
|
|
34569
34567
|
{ err, req: err.config, res: err.response },
|
|
@@ -34610,7 +34608,7 @@ class ShipEngineAPI {
|
|
|
34610
34608
|
* that token (also known as Seller ID)
|
|
34611
34609
|
*/
|
|
34612
34610
|
getTenant(isSandbox) {
|
|
34613
|
-
return __async
|
|
34611
|
+
return __async$$(this, null, function* () {
|
|
34614
34612
|
var _a;
|
|
34615
34613
|
if (!isSandbox) {
|
|
34616
34614
|
return this.getTenantFromToken(this.token);
|
|
@@ -34920,25 +34918,25 @@ const delay = (ms) => new Promise((resolve) => {
|
|
|
34920
34918
|
|
|
34921
34919
|
const onError = (_errors) => _default();
|
|
34922
34920
|
|
|
34923
|
-
var __defProp$
|
|
34924
|
-
var __defProps$
|
|
34925
|
-
var __getOwnPropDescs$
|
|
34926
|
-
var __getOwnPropSymbols$
|
|
34927
|
-
var __hasOwnProp$
|
|
34928
|
-
var __propIsEnum$
|
|
34929
|
-
var __defNormalProp$
|
|
34930
|
-
var __spreadValues$
|
|
34921
|
+
var __defProp$K = Object.defineProperty;
|
|
34922
|
+
var __defProps$H = Object.defineProperties;
|
|
34923
|
+
var __getOwnPropDescs$H = Object.getOwnPropertyDescriptors;
|
|
34924
|
+
var __getOwnPropSymbols$T = Object.getOwnPropertySymbols;
|
|
34925
|
+
var __hasOwnProp$T = Object.prototype.hasOwnProperty;
|
|
34926
|
+
var __propIsEnum$T = Object.prototype.propertyIsEnumerable;
|
|
34927
|
+
var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
34928
|
+
var __spreadValues$K = (a, b) => {
|
|
34931
34929
|
for (var prop in b || (b = {}))
|
|
34932
|
-
if (__hasOwnProp$
|
|
34933
|
-
__defNormalProp$
|
|
34934
|
-
if (__getOwnPropSymbols$
|
|
34935
|
-
for (var prop of __getOwnPropSymbols$
|
|
34936
|
-
if (__propIsEnum$
|
|
34937
|
-
__defNormalProp$
|
|
34930
|
+
if (__hasOwnProp$T.call(b, prop))
|
|
34931
|
+
__defNormalProp$K(a, prop, b[prop]);
|
|
34932
|
+
if (__getOwnPropSymbols$T)
|
|
34933
|
+
for (var prop of __getOwnPropSymbols$T(b)) {
|
|
34934
|
+
if (__propIsEnum$T.call(b, prop))
|
|
34935
|
+
__defNormalProp$K(a, prop, b[prop]);
|
|
34938
34936
|
}
|
|
34939
34937
|
return a;
|
|
34940
34938
|
};
|
|
34941
|
-
var __spreadProps$
|
|
34939
|
+
var __spreadProps$H = (a, b) => __defProps$H(a, __getOwnPropDescs$H(b));
|
|
34942
34940
|
const streams = [];
|
|
34943
34941
|
if (process.env.NODE_ENV === "production") {
|
|
34944
34942
|
streams.push({
|
|
@@ -34947,7 +34945,7 @@ if (process.env.NODE_ENV === "production") {
|
|
|
34947
34945
|
}
|
|
34948
34946
|
const logger = E({
|
|
34949
34947
|
name: "shipengine",
|
|
34950
|
-
serializers: __spreadProps$
|
|
34948
|
+
serializers: __spreadProps$H(__spreadValues$K({}, k), {
|
|
34951
34949
|
req: (req) => ({
|
|
34952
34950
|
headers: req.headers,
|
|
34953
34951
|
method: req.method,
|
|
@@ -34972,7 +34970,7 @@ const retryUntil = (callbackFn, retries = 10, timeoutBetweenAttempts = 1e3) => P
|
|
|
34972
34970
|
throw error;
|
|
34973
34971
|
});
|
|
34974
34972
|
|
|
34975
|
-
var __async$
|
|
34973
|
+
var __async$_ = (__this, __arguments, generator) => {
|
|
34976
34974
|
return new Promise((resolve, reject) => {
|
|
34977
34975
|
var fulfilled = (value) => {
|
|
34978
34976
|
try {
|
|
@@ -34995,7 +34993,7 @@ var __async$Z = (__this, __arguments, generator) => {
|
|
|
34995
34993
|
const useCreateAccountImage = () => {
|
|
34996
34994
|
const { client } = useShipEngine();
|
|
34997
34995
|
return useMutation({
|
|
34998
|
-
mutationFn: (data) => __async$
|
|
34996
|
+
mutationFn: (data) => __async$_(void 0, null, function* () {
|
|
34999
34997
|
const result = yield client.accountSettings.createImage(data);
|
|
35000
34998
|
return result.data;
|
|
35001
34999
|
}),
|
|
@@ -35004,7 +35002,7 @@ const useCreateAccountImage = () => {
|
|
|
35004
35002
|
});
|
|
35005
35003
|
};
|
|
35006
35004
|
|
|
35007
|
-
var __async$
|
|
35005
|
+
var __async$Z = (__this, __arguments, generator) => {
|
|
35008
35006
|
return new Promise((resolve, reject) => {
|
|
35009
35007
|
var fulfilled = (value) => {
|
|
35010
35008
|
try {
|
|
@@ -35027,7 +35025,7 @@ var __async$Y = (__this, __arguments, generator) => {
|
|
|
35027
35025
|
const useDeleteAccountImage = () => {
|
|
35028
35026
|
const { client } = useShipEngine();
|
|
35029
35027
|
return useMutation({
|
|
35030
|
-
mutationFn: (labelImageId) => __async$
|
|
35028
|
+
mutationFn: (labelImageId) => __async$Z(void 0, null, function* () {
|
|
35031
35029
|
const result = yield client.accountSettings.deleteImage(labelImageId);
|
|
35032
35030
|
return result.data;
|
|
35033
35031
|
}),
|
|
@@ -35056,7 +35054,7 @@ const useGetAccountSettings = () => {
|
|
|
35056
35054
|
});
|
|
35057
35055
|
};
|
|
35058
35056
|
|
|
35059
|
-
var __async$
|
|
35057
|
+
var __async$Y = (__this, __arguments, generator) => {
|
|
35060
35058
|
return new Promise((resolve, reject) => {
|
|
35061
35059
|
var fulfilled = (value) => {
|
|
35062
35060
|
try {
|
|
@@ -35079,7 +35077,7 @@ var __async$X = (__this, __arguments, generator) => {
|
|
|
35079
35077
|
const useUpdateAccountImage = () => {
|
|
35080
35078
|
const { client } = useShipEngine();
|
|
35081
35079
|
return useMutation({
|
|
35082
|
-
mutationFn: (data) => __async$
|
|
35080
|
+
mutationFn: (data) => __async$Y(void 0, null, function* () {
|
|
35083
35081
|
const result = yield client.accountSettings.updateImage(data);
|
|
35084
35082
|
return result.data;
|
|
35085
35083
|
}),
|
|
@@ -35088,7 +35086,7 @@ const useUpdateAccountImage = () => {
|
|
|
35088
35086
|
});
|
|
35089
35087
|
};
|
|
35090
35088
|
|
|
35091
|
-
var __async$
|
|
35089
|
+
var __async$X = (__this, __arguments, generator) => {
|
|
35092
35090
|
return new Promise((resolve, reject) => {
|
|
35093
35091
|
var fulfilled = (value) => {
|
|
35094
35092
|
try {
|
|
@@ -35111,7 +35109,7 @@ var __async$W = (__this, __arguments, generator) => {
|
|
|
35111
35109
|
const useUpdateAccountSettings = () => {
|
|
35112
35110
|
const { client } = useShipEngine();
|
|
35113
35111
|
return useMutation({
|
|
35114
|
-
mutationFn: (settings) => __async$
|
|
35112
|
+
mutationFn: (settings) => __async$X(void 0, null, function* () {
|
|
35115
35113
|
const result = yield client.accountSettings.update(settings);
|
|
35116
35114
|
return result.data;
|
|
35117
35115
|
}),
|
|
@@ -35120,6 +35118,35 @@ const useUpdateAccountSettings = () => {
|
|
|
35120
35118
|
});
|
|
35121
35119
|
};
|
|
35122
35120
|
|
|
35121
|
+
var __defProp$J = Object.defineProperty;
|
|
35122
|
+
var __defProps$G = Object.defineProperties;
|
|
35123
|
+
var __getOwnPropDescs$G = Object.getOwnPropertyDescriptors;
|
|
35124
|
+
var __getOwnPropSymbols$S = Object.getOwnPropertySymbols;
|
|
35125
|
+
var __hasOwnProp$S = Object.prototype.hasOwnProperty;
|
|
35126
|
+
var __propIsEnum$S = Object.prototype.propertyIsEnumerable;
|
|
35127
|
+
var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
35128
|
+
var __spreadValues$J = (a, b) => {
|
|
35129
|
+
for (var prop in b || (b = {}))
|
|
35130
|
+
if (__hasOwnProp$S.call(b, prop))
|
|
35131
|
+
__defNormalProp$J(a, prop, b[prop]);
|
|
35132
|
+
if (__getOwnPropSymbols$S)
|
|
35133
|
+
for (var prop of __getOwnPropSymbols$S(b)) {
|
|
35134
|
+
if (__propIsEnum$S.call(b, prop))
|
|
35135
|
+
__defNormalProp$J(a, prop, b[prop]);
|
|
35136
|
+
}
|
|
35137
|
+
return a;
|
|
35138
|
+
};
|
|
35139
|
+
var __spreadProps$G = (a, b) => __defProps$G(a, __getOwnPropDescs$G(b));
|
|
35140
|
+
const useListAccountAddons = (params) => {
|
|
35141
|
+
const { client } = useShipEngine();
|
|
35142
|
+
return useQuery(__spreadProps$G(__spreadValues$J({}, params), {
|
|
35143
|
+
onError,
|
|
35144
|
+
queryFn: () => client.accountAddons.list(),
|
|
35145
|
+
queryKey: ["useListAccountAddons"],
|
|
35146
|
+
select: (result) => result.data.addons
|
|
35147
|
+
}));
|
|
35148
|
+
};
|
|
35149
|
+
|
|
35123
35150
|
var __defProp$I = Object.defineProperty;
|
|
35124
35151
|
var __defProps$F = Object.defineProperties;
|
|
35125
35152
|
var __getOwnPropDescs$F = Object.getOwnPropertyDescriptors;
|
|
@@ -35139,13 +35166,35 @@ var __spreadValues$I = (a, b) => {
|
|
|
35139
35166
|
return a;
|
|
35140
35167
|
};
|
|
35141
35168
|
var __spreadProps$F = (a, b) => __defProps$F(a, __getOwnPropDescs$F(b));
|
|
35142
|
-
|
|
35169
|
+
var __async$W = (__this, __arguments, generator) => {
|
|
35170
|
+
return new Promise((resolve, reject) => {
|
|
35171
|
+
var fulfilled = (value) => {
|
|
35172
|
+
try {
|
|
35173
|
+
step(generator.next(value));
|
|
35174
|
+
} catch (e) {
|
|
35175
|
+
reject(e);
|
|
35176
|
+
}
|
|
35177
|
+
};
|
|
35178
|
+
var rejected = (value) => {
|
|
35179
|
+
try {
|
|
35180
|
+
step(generator.throw(value));
|
|
35181
|
+
} catch (e) {
|
|
35182
|
+
reject(e);
|
|
35183
|
+
}
|
|
35184
|
+
};
|
|
35185
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
35186
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
35187
|
+
});
|
|
35188
|
+
};
|
|
35189
|
+
const useEnableAccountAddon = (params) => {
|
|
35143
35190
|
const { client } = useShipEngine();
|
|
35144
|
-
return
|
|
35145
|
-
|
|
35146
|
-
|
|
35147
|
-
|
|
35148
|
-
|
|
35191
|
+
return useMutation(__spreadProps$F(__spreadValues$I({}, params), {
|
|
35192
|
+
mutationFn: (addonType) => __async$W(void 0, null, function* () {
|
|
35193
|
+
const result = yield client.accountAddons.enable(addonType);
|
|
35194
|
+
return result.data;
|
|
35195
|
+
}),
|
|
35196
|
+
mutationKey: ["useEnableAccountAddon"],
|
|
35197
|
+
onError
|
|
35149
35198
|
}));
|
|
35150
35199
|
};
|
|
35151
35200
|
|
|
@@ -40077,4 +40126,4 @@ const alchemy = {
|
|
|
40077
40126
|
createElement
|
|
40078
40127
|
};
|
|
40079
40128
|
|
|
40080
|
-
export { AccountAddonsAPI, AccountBillingAPI, AccountBillingPlanAPI, AccountBillingPlanChangeType, AccountSettingsAPI, AddressesAPI, AlchemyContext, AlchemyProvider, AlchemyTestProvider, AuctanePayAPI, CarriersAPI, CodedError, ConfirmationType, ConnectionsAPI, CreditCardVendor, Currency, CustomPackagesAPI, CustomsContentsType, CustomsNonDeliveryType, Element, ErrorBoundary, FundingSourcesAPI, InsuranceAPI, InsuranceProviderType, InvoiceAddressAPI, LabelsAPI, MetadataCapability, MetadataRequirement, MetadataSatisfyingFormTypes, MovementIndicator, OrderSourcesAPI, RateCardStatus, RateCardsAPI, RatesAPI, types as SE, SalesOrderShipmentsAPI, SalesOrdersAPI, SellersAPI, ServicePointsAPI, ShipEngine, ShipEngineAPI, ShipEngineContext, ShipmentsAPI, ShippingRulesAPI, ThemesAPI, UsersApi, WarehousesAPI, WebhooksAPI, alchemy, camelizeKeys, decamelizeKeys, alchemy as default, delay, getEmotionCache, getEndUserIpAddress, isCodedError, isCodedErrors, isDataCodedErrors, isInvalidTokenError, logger, onError, parseError, retryUntil, useAddFunds, useAddInsuranceFunds, useAddSandboxCarriers, useAlchemy, useCalculateRates, useCancelShipment, useCarrierConnectionsServicesList, useConnectCarrier, useConnectCarrierAccount, useCreateAccountImage, useCreateAuctanePaySession, useCreateFundingSource, useCreateInvoiceAddress, useCreateLabel, useCreateLabelByRateId, useCreateLabelByShipmentId, useCreateRateCard, useCreateSalesOrderShipment, useCreateSandboxSeller, useCreateSellerApiKey, useCreateShipment, useCreateShippingRule, useCreateWarehouse, useCreateWebhook, useDeactivateOrderSource, useDeleteAccountImage, useDeleteCarrier, useDeletePaymentMethod, useDeleteRateCard, useDeleteSellerApiKey, useDeleteShippingRule, useDeleteWarehouse, useDeleteWebhook, useDownloadRateCard, useEditShippingRule, useExportLabels, useExportShipments, useFundingSourcesAddFunds, useGetAccountBilling, useGetAccountBillingPlan, useGetAccountImages, useGetAccountSettings, useGetAuctanePayConfig, useGetAutoFundingConfiguration, useGetCarrierById, useGetCarrierConnectionForm, useGetConnectionsCarrierSettings, useGetCountriesByCarrier, useGetCurrenciesByCarrier, useGetFundingSourceById, useGetFundingSourceMetadata, useGetFundingSourceTransactions, useGetHereToken, useGetInsuranceAccount, useGetInsuranceFundingSourceAcceptedTerms, useGetInvoiceAddress, useGetLabel, useGetPackageRatingGroupByCarrier, useGetPaymentAccount, useGetPaymentMethods, useGetRateCardById, useGetSalesOrder, useGetSalesOrderByExternalOrderId, useGetSalesOrderShipment, useGetServicePoint, useGetServicesByCarrier, useGetShipment, useGetShipmentByExternalId, useGetShipmentRates, useGetShippingRuleById, useGetShippingRuleConditionsOptions, useGetThemeById, useGetZonesByCarrier, useI18n, useIdentityVerification, useListAccountAddons, useListCarrierConnections, useListCarriers, useListCustomPackageTypes, useListFundingSources, useListLabels, useListLabelsInfinite, useListOrderSources, useListOrderSourcesConnections, useListRateCards, useListSalesOrderShipments, useListSalesOrderShipmentsByExternalOrderId, useListSalesOrders, useListSandboxSellerIds, useListSellerApiKeys, useListServicePoints, useListShipments, useListShippingRules, useListUsers, useListWarehouses, useListWebhooks, useLoadIcons, useNotifySalesOrderShipped, useParseAddress, usePreviewTransaction, usePublishRateCard, useRatesEstimate, useRefreshOrderSource, useRefreshOrderSourceAsync, useRegisterCarrier, useRequestStampsAccountUrls, useShipEngine, useUpdateAccountBillingPlan, useUpdateAccountImage, useUpdateAccountSettings, useUpdateAutoFunding, useUpdateConnectionsCarrierSettings, useUpdateFundingSource, useUpdateInvoiceAddress, useUpdateOrderSource, useUpdatePaymentMethod, useUpdateRateCard, useUpdateSalesOrderShipment, useUpdateWarehouse, useUpdateWebhook, useUploadRateCard, useUpsertAccountBilling, useValidateAddresses, useVoidLabel };
|
|
40129
|
+
export { AccountAddonsAPI, AccountBillingAPI, AccountBillingPlanAPI, AccountBillingPlanChangeType, AccountSettingsAPI, AddressesAPI, AlchemyContext, AlchemyProvider, AlchemyTestProvider, AuctanePayAPI, CarriersAPI, CodedError, ConfirmationType, ConnectionsAPI, CreditCardVendor, Currency, CustomPackagesAPI, CustomsContentsType, CustomsNonDeliveryType, Element, ErrorBoundary, FundingSourcesAPI, InsuranceAPI, InsuranceProviderType, InvoiceAddressAPI, LabelsAPI, MetadataCapability, MetadataRequirement, MetadataSatisfyingFormTypes, MovementIndicator, OrderSourcesAPI, RateCardStatus, RateCardsAPI, RatesAPI, types as SE, SalesOrderShipmentsAPI, SalesOrdersAPI, SellersAPI, ServicePointsAPI, ShipEngine, ShipEngineAPI, ShipEngineContext, ShipmentsAPI, ShippingRulesAPI, ThemesAPI, UsersApi, WarehousesAPI, WebhooksAPI, alchemy, camelizeKeys, decamelizeKeys, alchemy as default, delay, getEmotionCache, getEndUserIpAddress, isCodedError, isCodedErrors, isDataCodedErrors, isInvalidTokenError, logger, onError, parseError, retryUntil, useAddFunds, useAddInsuranceFunds, useAddSandboxCarriers, useAlchemy, useCalculateRates, useCancelShipment, useCarrierConnectionsServicesList, useConnectCarrier, useConnectCarrierAccount, useCreateAccountImage, useCreateAuctanePaySession, useCreateFundingSource, useCreateInvoiceAddress, useCreateLabel, useCreateLabelByRateId, useCreateLabelByShipmentId, useCreateRateCard, useCreateSalesOrderShipment, useCreateSandboxSeller, useCreateSellerApiKey, useCreateShipment, useCreateShippingRule, useCreateWarehouse, useCreateWebhook, useDeactivateOrderSource, useDeleteAccountImage, useDeleteCarrier, useDeletePaymentMethod, useDeleteRateCard, useDeleteSellerApiKey, useDeleteShippingRule, useDeleteWarehouse, useDeleteWebhook, useDownloadRateCard, useEditShippingRule, useEnableAccountAddon, useExportLabels, useExportShipments, useFundingSourcesAddFunds, useGetAccountBilling, useGetAccountBillingPlan, useGetAccountImages, useGetAccountSettings, useGetAuctanePayConfig, useGetAutoFundingConfiguration, useGetCarrierById, useGetCarrierConnectionForm, useGetConnectionsCarrierSettings, useGetCountriesByCarrier, useGetCurrenciesByCarrier, useGetFundingSourceById, useGetFundingSourceMetadata, useGetFundingSourceTransactions, useGetHereToken, useGetInsuranceAccount, useGetInsuranceFundingSourceAcceptedTerms, useGetInvoiceAddress, useGetLabel, useGetPackageRatingGroupByCarrier, useGetPaymentAccount, useGetPaymentMethods, useGetRateCardById, useGetSalesOrder, useGetSalesOrderByExternalOrderId, useGetSalesOrderShipment, useGetServicePoint, useGetServicesByCarrier, useGetShipment, useGetShipmentByExternalId, useGetShipmentRates, useGetShippingRuleById, useGetShippingRuleConditionsOptions, useGetThemeById, useGetZonesByCarrier, useI18n, useIdentityVerification, useListAccountAddons, useListCarrierConnections, useListCarriers, useListCustomPackageTypes, useListFundingSources, useListLabels, useListLabelsInfinite, useListOrderSources, useListOrderSourcesConnections, useListRateCards, useListSalesOrderShipments, useListSalesOrderShipmentsByExternalOrderId, useListSalesOrders, useListSandboxSellerIds, useListSellerApiKeys, useListServicePoints, useListShipments, useListShippingRules, useListUsers, useListWarehouses, useListWebhooks, useLoadIcons, useNotifySalesOrderShipped, useParseAddress, usePreviewTransaction, usePublishRateCard, useRatesEstimate, useRefreshOrderSource, useRefreshOrderSourceAsync, useRegisterCarrier, useRequestStampsAccountUrls, useShipEngine, useUpdateAccountBillingPlan, useUpdateAccountImage, useUpdateAccountSettings, useUpdateAutoFunding, useUpdateConnectionsCarrierSettings, useUpdateFundingSource, useUpdateInvoiceAddress, useUpdateOrderSource, useUpdatePaymentMethod, useUpdateRateCard, useUpdateSalesOrderShipment, useUpdateWarehouse, useUpdateWebhook, useUploadRateCard, useUpsertAccountBilling, useValidateAddresses, useVoidLabel };
|