@shipengine/alchemy 6.0.55 → 6.0.57
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 +286 -210
- package/index.mjs +286 -211
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -4883,33 +4883,41 @@ var _getHolder = getHolder$2;
|
|
|
4883
4883
|
|
|
4884
4884
|
/** Used as references for various `Number` constants. */
|
|
4885
4885
|
|
|
4886
|
-
var
|
|
4886
|
+
var _isIndex;
|
|
4887
|
+
var hasRequired_isIndex;
|
|
4887
4888
|
|
|
4888
|
-
|
|
4889
|
-
|
|
4889
|
+
function require_isIndex () {
|
|
4890
|
+
if (hasRequired_isIndex) return _isIndex;
|
|
4891
|
+
hasRequired_isIndex = 1;
|
|
4892
|
+
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
4890
4893
|
|
|
4891
|
-
/**
|
|
4892
|
-
|
|
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;
|
|
4894
|
+
/** Used to detect unsigned integer values. */
|
|
4895
|
+
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
4902
4896
|
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
}
|
|
4897
|
+
/**
|
|
4898
|
+
* Checks if `value` is a valid array-like index.
|
|
4899
|
+
*
|
|
4900
|
+
* @private
|
|
4901
|
+
* @param {*} value The value to check.
|
|
4902
|
+
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
|
4903
|
+
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
|
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
|
+
}
|
|
4908
4914
|
|
|
4909
|
-
|
|
4915
|
+
_isIndex = isIndex;
|
|
4916
|
+
return _isIndex;
|
|
4917
|
+
}
|
|
4910
4918
|
|
|
4911
4919
|
var copyArray$2 = _copyArray,
|
|
4912
|
-
isIndex$2 =
|
|
4920
|
+
isIndex$2 = require_isIndex();
|
|
4913
4921
|
|
|
4914
4922
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
4915
4923
|
var nativeMin$1 = Math.min;
|
|
@@ -6102,7 +6110,7 @@ var baseTimes = _baseTimes,
|
|
|
6102
6110
|
isArguments$2 = requireIsArguments(),
|
|
6103
6111
|
isArray$f = isArray_1,
|
|
6104
6112
|
isBuffer$4 = isBufferExports,
|
|
6105
|
-
isIndex$1 =
|
|
6113
|
+
isIndex$1 = require_isIndex(),
|
|
6106
6114
|
isTypedArray$1 = requireIsTypedArray();
|
|
6107
6115
|
|
|
6108
6116
|
/** Used for built-in method references. */
|
|
@@ -9433,7 +9441,7 @@ var _baseHasIn = baseHasIn$1;
|
|
|
9433
9441
|
var castPath = _castPath,
|
|
9434
9442
|
isArguments$1 = requireIsArguments(),
|
|
9435
9443
|
isArray$8 = isArray_1,
|
|
9436
|
-
isIndex =
|
|
9444
|
+
isIndex = require_isIndex(),
|
|
9437
9445
|
isLength = isLength_1,
|
|
9438
9446
|
toKey$3 = _toKey;
|
|
9439
9447
|
|
|
@@ -10323,7 +10331,7 @@ function require_isIterateeCall () {
|
|
|
10323
10331
|
hasRequired_isIterateeCall = 1;
|
|
10324
10332
|
var eq = requireEq(),
|
|
10325
10333
|
isArrayLike = isArrayLike_1,
|
|
10326
|
-
isIndex =
|
|
10334
|
+
isIndex = require_isIndex(),
|
|
10327
10335
|
isObject = isObject_1;
|
|
10328
10336
|
|
|
10329
10337
|
/**
|
|
@@ -10790,17 +10798,17 @@ var AccountBillingPlanChangeType = /* @__PURE__ */ ((AccountBillingPlanChangeTyp
|
|
|
10790
10798
|
return AccountBillingPlanChangeType2;
|
|
10791
10799
|
})(AccountBillingPlanChangeType || {});
|
|
10792
10800
|
|
|
10793
|
-
var __getOwnPropSymbols$
|
|
10794
|
-
var __hasOwnProp$
|
|
10795
|
-
var __propIsEnum$
|
|
10801
|
+
var __getOwnPropSymbols$V = Object.getOwnPropertySymbols;
|
|
10802
|
+
var __hasOwnProp$V = Object.prototype.hasOwnProperty;
|
|
10803
|
+
var __propIsEnum$V = Object.prototype.propertyIsEnumerable;
|
|
10796
10804
|
var __objRest$x = (source, exclude) => {
|
|
10797
10805
|
var target = {};
|
|
10798
10806
|
for (var prop in source)
|
|
10799
|
-
if (__hasOwnProp$
|
|
10807
|
+
if (__hasOwnProp$V.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
10800
10808
|
target[prop] = source[prop];
|
|
10801
|
-
if (source != null && __getOwnPropSymbols$
|
|
10802
|
-
for (var prop of __getOwnPropSymbols$
|
|
10803
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
10809
|
+
if (source != null && __getOwnPropSymbols$V)
|
|
10810
|
+
for (var prop of __getOwnPropSymbols$V(source)) {
|
|
10811
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$V.call(source, prop))
|
|
10804
10812
|
target[prop] = source[prop];
|
|
10805
10813
|
}
|
|
10806
10814
|
return target;
|
|
@@ -10935,17 +10943,17 @@ const types = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
10935
10943
|
RateCardStatus
|
|
10936
10944
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
10937
10945
|
|
|
10938
|
-
var __getOwnPropSymbols$
|
|
10939
|
-
var __hasOwnProp$
|
|
10940
|
-
var __propIsEnum$
|
|
10946
|
+
var __getOwnPropSymbols$U = Object.getOwnPropertySymbols;
|
|
10947
|
+
var __hasOwnProp$U = Object.prototype.hasOwnProperty;
|
|
10948
|
+
var __propIsEnum$U = Object.prototype.propertyIsEnumerable;
|
|
10941
10949
|
var __objRest$w = (source, exclude) => {
|
|
10942
10950
|
var target = {};
|
|
10943
10951
|
for (var prop in source)
|
|
10944
|
-
if (__hasOwnProp$
|
|
10952
|
+
if (__hasOwnProp$U.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
10945
10953
|
target[prop] = source[prop];
|
|
10946
|
-
if (source != null && __getOwnPropSymbols$
|
|
10947
|
-
for (var prop of __getOwnPropSymbols$
|
|
10948
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
10954
|
+
if (source != null && __getOwnPropSymbols$U)
|
|
10955
|
+
for (var prop of __getOwnPropSymbols$U(source)) {
|
|
10956
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$U.call(source, prop))
|
|
10949
10957
|
target[prop] = source[prop];
|
|
10950
10958
|
}
|
|
10951
10959
|
return target;
|
|
@@ -11040,6 +11048,18 @@ class AuctanePayAPI {
|
|
|
11040
11048
|
this.getConfig = () => {
|
|
11041
11049
|
return this.client.get("/v1/payments/config");
|
|
11042
11050
|
};
|
|
11051
|
+
/**
|
|
11052
|
+
* The `previewTransaction` method previews transaction costs including fees and surcharges
|
|
11053
|
+
* @docs https://auctane-pay-dev.kubedev.sslocal.com/swagger/index.html#tag/Transactions
|
|
11054
|
+
* @param request - The request object containing amount and transaction category
|
|
11055
|
+
* @returns a promise that resolves to the transaction preview with fees
|
|
11056
|
+
*/
|
|
11057
|
+
this.previewTransaction = (request) => {
|
|
11058
|
+
return this.client.post(
|
|
11059
|
+
"/v1/payments/transaction/preview",
|
|
11060
|
+
request
|
|
11061
|
+
);
|
|
11062
|
+
};
|
|
11043
11063
|
this.client = client;
|
|
11044
11064
|
}
|
|
11045
11065
|
}
|
|
@@ -13749,7 +13769,7 @@ var ipaddr = {
|
|
|
13749
13769
|
}).call(commonjsGlobal);
|
|
13750
13770
|
} (ipaddr));
|
|
13751
13771
|
|
|
13752
|
-
var __async$
|
|
13772
|
+
var __async$12 = (__this, __arguments, generator) => {
|
|
13753
13773
|
return new Promise((resolve, reject) => {
|
|
13754
13774
|
var fulfilled = (value) => {
|
|
13755
13775
|
try {
|
|
@@ -13769,7 +13789,7 @@ var __async$11 = (__this, __arguments, generator) => {
|
|
|
13769
13789
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
13770
13790
|
});
|
|
13771
13791
|
};
|
|
13772
|
-
const getEndUserIpAddress = () => __async$
|
|
13792
|
+
const getEndUserIpAddress = () => __async$12(void 0, null, function* () {
|
|
13773
13793
|
try {
|
|
13774
13794
|
const response = yield axios.get("https://api.ipify.org/?format=json");
|
|
13775
13795
|
if (response.data.ip && ipaddrExports.isValid(response.data.ip)) {
|
|
@@ -13830,38 +13850,38 @@ const decamelizeKeys = (obj, separator = "_") => {
|
|
|
13830
13850
|
return obj;
|
|
13831
13851
|
};
|
|
13832
13852
|
|
|
13833
|
-
var __defProp$
|
|
13834
|
-
var __defProps$
|
|
13835
|
-
var __getOwnPropDescs$
|
|
13836
|
-
var __getOwnPropSymbols$
|
|
13837
|
-
var __hasOwnProp$
|
|
13838
|
-
var __propIsEnum$
|
|
13839
|
-
var __defNormalProp$
|
|
13840
|
-
var __spreadValues$
|
|
13853
|
+
var __defProp$I = Object.defineProperty;
|
|
13854
|
+
var __defProps$C = Object.defineProperties;
|
|
13855
|
+
var __getOwnPropDescs$C = Object.getOwnPropertyDescriptors;
|
|
13856
|
+
var __getOwnPropSymbols$T = Object.getOwnPropertySymbols;
|
|
13857
|
+
var __hasOwnProp$T = Object.prototype.hasOwnProperty;
|
|
13858
|
+
var __propIsEnum$T = Object.prototype.propertyIsEnumerable;
|
|
13859
|
+
var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13860
|
+
var __spreadValues$I = (a, b) => {
|
|
13841
13861
|
for (var prop in b || (b = {}))
|
|
13842
|
-
if (__hasOwnProp$
|
|
13843
|
-
__defNormalProp$
|
|
13844
|
-
if (__getOwnPropSymbols$
|
|
13845
|
-
for (var prop of __getOwnPropSymbols$
|
|
13846
|
-
if (__propIsEnum$
|
|
13847
|
-
__defNormalProp$
|
|
13862
|
+
if (__hasOwnProp$T.call(b, prop))
|
|
13863
|
+
__defNormalProp$I(a, prop, b[prop]);
|
|
13864
|
+
if (__getOwnPropSymbols$T)
|
|
13865
|
+
for (var prop of __getOwnPropSymbols$T(b)) {
|
|
13866
|
+
if (__propIsEnum$T.call(b, prop))
|
|
13867
|
+
__defNormalProp$I(a, prop, b[prop]);
|
|
13848
13868
|
}
|
|
13849
13869
|
return a;
|
|
13850
13870
|
};
|
|
13851
|
-
var __spreadProps$
|
|
13871
|
+
var __spreadProps$C = (a, b) => __defProps$C(a, __getOwnPropDescs$C(b));
|
|
13852
13872
|
var __objRest$v = (source, exclude) => {
|
|
13853
13873
|
var target = {};
|
|
13854
13874
|
for (var prop in source)
|
|
13855
|
-
if (__hasOwnProp$
|
|
13875
|
+
if (__hasOwnProp$T.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
13856
13876
|
target[prop] = source[prop];
|
|
13857
|
-
if (source != null && __getOwnPropSymbols$
|
|
13858
|
-
for (var prop of __getOwnPropSymbols$
|
|
13859
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
13877
|
+
if (source != null && __getOwnPropSymbols$T)
|
|
13878
|
+
for (var prop of __getOwnPropSymbols$T(source)) {
|
|
13879
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$T.call(source, prop))
|
|
13860
13880
|
target[prop] = source[prop];
|
|
13861
13881
|
}
|
|
13862
13882
|
return target;
|
|
13863
13883
|
};
|
|
13864
|
-
var __async$
|
|
13884
|
+
var __async$11 = (__this, __arguments, generator) => {
|
|
13865
13885
|
return new Promise((resolve, reject) => {
|
|
13866
13886
|
var fulfilled = (value) => {
|
|
13867
13887
|
try {
|
|
@@ -13901,12 +13921,12 @@ class CarriersAPI {
|
|
|
13901
13921
|
/**
|
|
13902
13922
|
* The `connect` method connects a carrier account to a user's ShipEngine account.
|
|
13903
13923
|
*/
|
|
13904
|
-
this.connect = (_a) => __async$
|
|
13924
|
+
this.connect = (_a) => __async$11(this, null, function* () {
|
|
13905
13925
|
var _b = _a, { carrierCode } = _b, connection = __objRest$v(_b, ["carrierCode"]);
|
|
13906
13926
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
13907
13927
|
if (!endUserIpAddress)
|
|
13908
13928
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
13909
|
-
return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$
|
|
13929
|
+
return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$C(__spreadValues$I({}, connection), {
|
|
13910
13930
|
endUserIpAddress
|
|
13911
13931
|
}));
|
|
13912
13932
|
});
|
|
@@ -13992,22 +14012,22 @@ class CarriersAPI {
|
|
|
13992
14012
|
}
|
|
13993
14013
|
}
|
|
13994
14014
|
|
|
13995
|
-
var __getOwnPropSymbols$
|
|
13996
|
-
var __hasOwnProp$
|
|
13997
|
-
var __propIsEnum$
|
|
14015
|
+
var __getOwnPropSymbols$S = Object.getOwnPropertySymbols;
|
|
14016
|
+
var __hasOwnProp$S = Object.prototype.hasOwnProperty;
|
|
14017
|
+
var __propIsEnum$S = Object.prototype.propertyIsEnumerable;
|
|
13998
14018
|
var __objRest$u = (source, exclude) => {
|
|
13999
14019
|
var target = {};
|
|
14000
14020
|
for (var prop in source)
|
|
14001
|
-
if (__hasOwnProp$
|
|
14021
|
+
if (__hasOwnProp$S.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
14002
14022
|
target[prop] = source[prop];
|
|
14003
|
-
if (source != null && __getOwnPropSymbols$
|
|
14004
|
-
for (var prop of __getOwnPropSymbols$
|
|
14005
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
14023
|
+
if (source != null && __getOwnPropSymbols$S)
|
|
14024
|
+
for (var prop of __getOwnPropSymbols$S(source)) {
|
|
14025
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$S.call(source, prop))
|
|
14006
14026
|
target[prop] = source[prop];
|
|
14007
14027
|
}
|
|
14008
14028
|
return target;
|
|
14009
14029
|
};
|
|
14010
|
-
var __async
|
|
14030
|
+
var __async$10 = (__this, __arguments, generator) => {
|
|
14011
14031
|
return new Promise((resolve, reject) => {
|
|
14012
14032
|
var fulfilled = (value) => {
|
|
14013
14033
|
try {
|
|
@@ -14049,7 +14069,7 @@ class ConnectionsAPI {
|
|
|
14049
14069
|
/**
|
|
14050
14070
|
* The `connectCarrier` method connects a carrier to account.
|
|
14051
14071
|
*/
|
|
14052
|
-
this.connectCarrier = (carrierName, formData) => __async
|
|
14072
|
+
this.connectCarrier = (carrierName, formData) => __async$10(this, null, function* () {
|
|
14053
14073
|
return yield this.client.post(
|
|
14054
14074
|
`/v1/connections/carriers/${carrierName}`,
|
|
14055
14075
|
formData,
|
|
@@ -16217,23 +16237,23 @@ class CustomPackagesAPI {
|
|
|
16217
16237
|
}
|
|
16218
16238
|
}
|
|
16219
16239
|
|
|
16220
|
-
var __defProp$
|
|
16221
|
-
var __getOwnPropSymbols$
|
|
16222
|
-
var __hasOwnProp$
|
|
16223
|
-
var __propIsEnum$
|
|
16224
|
-
var __defNormalProp$
|
|
16225
|
-
var __spreadValues$
|
|
16240
|
+
var __defProp$H = Object.defineProperty;
|
|
16241
|
+
var __getOwnPropSymbols$R = Object.getOwnPropertySymbols;
|
|
16242
|
+
var __hasOwnProp$R = Object.prototype.hasOwnProperty;
|
|
16243
|
+
var __propIsEnum$R = Object.prototype.propertyIsEnumerable;
|
|
16244
|
+
var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16245
|
+
var __spreadValues$H = (a, b) => {
|
|
16226
16246
|
for (var prop in b || (b = {}))
|
|
16227
|
-
if (__hasOwnProp$
|
|
16228
|
-
__defNormalProp$
|
|
16229
|
-
if (__getOwnPropSymbols$
|
|
16230
|
-
for (var prop of __getOwnPropSymbols$
|
|
16231
|
-
if (__propIsEnum$
|
|
16232
|
-
__defNormalProp$
|
|
16247
|
+
if (__hasOwnProp$R.call(b, prop))
|
|
16248
|
+
__defNormalProp$H(a, prop, b[prop]);
|
|
16249
|
+
if (__getOwnPropSymbols$R)
|
|
16250
|
+
for (var prop of __getOwnPropSymbols$R(b)) {
|
|
16251
|
+
if (__propIsEnum$R.call(b, prop))
|
|
16252
|
+
__defNormalProp$H(a, prop, b[prop]);
|
|
16233
16253
|
}
|
|
16234
16254
|
return a;
|
|
16235
16255
|
};
|
|
16236
|
-
var __async
|
|
16256
|
+
var __async$$ = (__this, __arguments, generator) => {
|
|
16237
16257
|
return new Promise((resolve, reject) => {
|
|
16238
16258
|
var fulfilled = (value) => {
|
|
16239
16259
|
try {
|
|
@@ -16272,12 +16292,12 @@ class FundingSourcesAPI {
|
|
|
16272
16292
|
* The `create` method creates a new funding source for a given user. This requires
|
|
16273
16293
|
* payment information to be collected from the user.
|
|
16274
16294
|
*/
|
|
16275
|
-
this.create = (createFundingSource) => __async
|
|
16295
|
+
this.create = (createFundingSource) => __async$$(this, null, function* () {
|
|
16276
16296
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16277
16297
|
if (!endUserIpAddress) {
|
|
16278
16298
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
16279
16299
|
}
|
|
16280
|
-
return yield this.client.post("/v1/funding_sources", __spreadValues$
|
|
16300
|
+
return yield this.client.post("/v1/funding_sources", __spreadValues$H({
|
|
16281
16301
|
endUserIpAddress
|
|
16282
16302
|
}, createFundingSource));
|
|
16283
16303
|
});
|
|
@@ -16286,7 +16306,7 @@ class FundingSourcesAPI {
|
|
|
16286
16306
|
* user to update the billing address or payment information associated with the
|
|
16287
16307
|
* funding source.
|
|
16288
16308
|
*/
|
|
16289
|
-
this.update = (billingInfo, creditCardInfo, auctanePayInfo, fundingSourceId) => __async
|
|
16309
|
+
this.update = (billingInfo, creditCardInfo, auctanePayInfo, fundingSourceId) => __async$$(this, null, function* () {
|
|
16290
16310
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16291
16311
|
if (!endUserIpAddress) {
|
|
16292
16312
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
@@ -16296,7 +16316,7 @@ class FundingSourcesAPI {
|
|
|
16296
16316
|
{
|
|
16297
16317
|
billingInfo,
|
|
16298
16318
|
endUserIpAddress,
|
|
16299
|
-
paymentMethod: __spreadValues$
|
|
16319
|
+
paymentMethod: __spreadValues$H({
|
|
16300
16320
|
creditCardInfo
|
|
16301
16321
|
}, auctanePayInfo)
|
|
16302
16322
|
}
|
|
@@ -16306,19 +16326,19 @@ class FundingSourcesAPI {
|
|
|
16306
16326
|
* The `registerCarrier` method registers a carrier account and associates
|
|
16307
16327
|
* it with a given funding source.
|
|
16308
16328
|
*/
|
|
16309
|
-
this.registerCarrier = (carrier) => __async
|
|
16329
|
+
this.registerCarrier = (carrier) => __async$$(this, null, function* () {
|
|
16310
16330
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16311
16331
|
if (!endUserIpAddress) {
|
|
16312
16332
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
16313
16333
|
}
|
|
16314
|
-
return yield this.client.post("/v1/registration/funding_source", __spreadValues$
|
|
16334
|
+
return yield this.client.post("/v1/registration/funding_source", __spreadValues$H({
|
|
16315
16335
|
endUserIpAddress
|
|
16316
16336
|
}, carrier));
|
|
16317
16337
|
});
|
|
16318
16338
|
/**
|
|
16319
16339
|
* The `addFunds` method allows you to add funds to a funding source.
|
|
16320
16340
|
*/
|
|
16321
|
-
this.addFunds = (amount, fundingSourceId) => __async
|
|
16341
|
+
this.addFunds = (amount, fundingSourceId) => __async$$(this, null, function* () {
|
|
16322
16342
|
return yield this.client.put(
|
|
16323
16343
|
`/v1/funding_sources/${fundingSourceId}/add_funds`,
|
|
16324
16344
|
amount
|
|
@@ -16328,7 +16348,7 @@ class FundingSourcesAPI {
|
|
|
16328
16348
|
* The `metadata` method returns seller-specific requirements for creating funding sources
|
|
16329
16349
|
* and attaching carriers
|
|
16330
16350
|
*/
|
|
16331
|
-
this.metadata = () => __async
|
|
16351
|
+
this.metadata = () => __async$$(this, null, function* () {
|
|
16332
16352
|
return yield this.client.get("/v1/funding_sources/metadata");
|
|
16333
16353
|
});
|
|
16334
16354
|
/**
|
|
@@ -16380,7 +16400,7 @@ class InsuranceAPI {
|
|
|
16380
16400
|
}
|
|
16381
16401
|
}
|
|
16382
16402
|
|
|
16383
|
-
var __async$
|
|
16403
|
+
var __async$_ = (__this, __arguments, generator) => {
|
|
16384
16404
|
return new Promise((resolve, reject) => {
|
|
16385
16405
|
var fulfilled = (value) => {
|
|
16386
16406
|
try {
|
|
@@ -16412,13 +16432,13 @@ class InvoiceAddressAPI {
|
|
|
16412
16432
|
/**
|
|
16413
16433
|
* The `create` method creates a new invoice address for a given user.
|
|
16414
16434
|
*/
|
|
16415
|
-
this.create = (invoiceAddress) => __async$
|
|
16435
|
+
this.create = (invoiceAddress) => __async$_(this, null, function* () {
|
|
16416
16436
|
return yield this.client.post("/v1/invoice_address", invoiceAddress);
|
|
16417
16437
|
});
|
|
16418
16438
|
/**
|
|
16419
16439
|
* The `update` method updates a invoice address for a given user.
|
|
16420
16440
|
*/
|
|
16421
|
-
this.update = (invoiceAddress) => __async$
|
|
16441
|
+
this.update = (invoiceAddress) => __async$_(this, null, function* () {
|
|
16422
16442
|
return yield this.client.put("/v1/invoice_address", invoiceAddress);
|
|
16423
16443
|
});
|
|
16424
16444
|
this.client = client;
|
|
@@ -16480,17 +16500,17 @@ class LabelsAPI {
|
|
|
16480
16500
|
}
|
|
16481
16501
|
}
|
|
16482
16502
|
|
|
16483
|
-
var __getOwnPropSymbols$
|
|
16484
|
-
var __hasOwnProp$
|
|
16485
|
-
var __propIsEnum$
|
|
16503
|
+
var __getOwnPropSymbols$Q = Object.getOwnPropertySymbols;
|
|
16504
|
+
var __hasOwnProp$Q = Object.prototype.hasOwnProperty;
|
|
16505
|
+
var __propIsEnum$Q = Object.prototype.propertyIsEnumerable;
|
|
16486
16506
|
var __objRest$t = (source, exclude) => {
|
|
16487
16507
|
var target = {};
|
|
16488
16508
|
for (var prop in source)
|
|
16489
|
-
if (__hasOwnProp$
|
|
16509
|
+
if (__hasOwnProp$Q.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
16490
16510
|
target[prop] = source[prop];
|
|
16491
|
-
if (source != null && __getOwnPropSymbols$
|
|
16492
|
-
for (var prop of __getOwnPropSymbols$
|
|
16493
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
16511
|
+
if (source != null && __getOwnPropSymbols$Q)
|
|
16512
|
+
for (var prop of __getOwnPropSymbols$Q(source)) {
|
|
16513
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$Q.call(source, prop))
|
|
16494
16514
|
target[prop] = source[prop];
|
|
16495
16515
|
}
|
|
16496
16516
|
return target;
|
|
@@ -16611,19 +16631,19 @@ class RateCardsAPI {
|
|
|
16611
16631
|
}
|
|
16612
16632
|
}
|
|
16613
16633
|
|
|
16614
|
-
var __defProp$
|
|
16615
|
-
var __getOwnPropSymbols$
|
|
16616
|
-
var __hasOwnProp$
|
|
16617
|
-
var __propIsEnum$
|
|
16618
|
-
var __defNormalProp$
|
|
16619
|
-
var __spreadValues$
|
|
16634
|
+
var __defProp$G = Object.defineProperty;
|
|
16635
|
+
var __getOwnPropSymbols$P = Object.getOwnPropertySymbols;
|
|
16636
|
+
var __hasOwnProp$P = Object.prototype.hasOwnProperty;
|
|
16637
|
+
var __propIsEnum$P = Object.prototype.propertyIsEnumerable;
|
|
16638
|
+
var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16639
|
+
var __spreadValues$G = (a, b) => {
|
|
16620
16640
|
for (var prop in b || (b = {}))
|
|
16621
|
-
if (__hasOwnProp$
|
|
16622
|
-
__defNormalProp$
|
|
16623
|
-
if (__getOwnPropSymbols$
|
|
16624
|
-
for (var prop of __getOwnPropSymbols$
|
|
16625
|
-
if (__propIsEnum$
|
|
16626
|
-
__defNormalProp$
|
|
16641
|
+
if (__hasOwnProp$P.call(b, prop))
|
|
16642
|
+
__defNormalProp$G(a, prop, b[prop]);
|
|
16643
|
+
if (__getOwnPropSymbols$P)
|
|
16644
|
+
for (var prop of __getOwnPropSymbols$P(b)) {
|
|
16645
|
+
if (__propIsEnum$P.call(b, prop))
|
|
16646
|
+
__defNormalProp$G(a, prop, b[prop]);
|
|
16627
16647
|
}
|
|
16628
16648
|
return a;
|
|
16629
16649
|
};
|
|
@@ -16645,7 +16665,7 @@ class RatesAPI {
|
|
|
16645
16665
|
* method.
|
|
16646
16666
|
*/
|
|
16647
16667
|
this.estimate = (params) => {
|
|
16648
|
-
return this.client.post("/v1/rates/estimate", __spreadValues$
|
|
16668
|
+
return this.client.post("/v1/rates/estimate", __spreadValues$G({}, params));
|
|
16649
16669
|
};
|
|
16650
16670
|
this.client = client;
|
|
16651
16671
|
}
|
|
@@ -16725,7 +16745,7 @@ class SalesOrdersAPI {
|
|
|
16725
16745
|
}
|
|
16726
16746
|
}
|
|
16727
16747
|
|
|
16728
|
-
var __async$
|
|
16748
|
+
var __async$Z = (__this, __arguments, generator) => {
|
|
16729
16749
|
return new Promise((resolve, reject) => {
|
|
16730
16750
|
var fulfilled = (value) => {
|
|
16731
16751
|
try {
|
|
@@ -16783,7 +16803,7 @@ class SellersAPI {
|
|
|
16783
16803
|
/**
|
|
16784
16804
|
* Deletes an API Key
|
|
16785
16805
|
*/
|
|
16786
|
-
this.deleteSellerApiKey = (_0) => __async$
|
|
16806
|
+
this.deleteSellerApiKey = (_0) => __async$Z(this, [_0], function* ({
|
|
16787
16807
|
encryptedApiKey,
|
|
16788
16808
|
sellerId,
|
|
16789
16809
|
isSandbox
|
|
@@ -16829,19 +16849,19 @@ class SellersAPI {
|
|
|
16829
16849
|
}
|
|
16830
16850
|
}
|
|
16831
16851
|
|
|
16832
|
-
var __defProp$
|
|
16833
|
-
var __getOwnPropSymbols$
|
|
16834
|
-
var __hasOwnProp$
|
|
16835
|
-
var __propIsEnum$
|
|
16836
|
-
var __defNormalProp$
|
|
16837
|
-
var __spreadValues$
|
|
16852
|
+
var __defProp$F = Object.defineProperty;
|
|
16853
|
+
var __getOwnPropSymbols$O = Object.getOwnPropertySymbols;
|
|
16854
|
+
var __hasOwnProp$O = Object.prototype.hasOwnProperty;
|
|
16855
|
+
var __propIsEnum$O = Object.prototype.propertyIsEnumerable;
|
|
16856
|
+
var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16857
|
+
var __spreadValues$F = (a, b) => {
|
|
16838
16858
|
for (var prop in b || (b = {}))
|
|
16839
|
-
if (__hasOwnProp$
|
|
16840
|
-
__defNormalProp$
|
|
16841
|
-
if (__getOwnPropSymbols$
|
|
16842
|
-
for (var prop of __getOwnPropSymbols$
|
|
16843
|
-
if (__propIsEnum$
|
|
16844
|
-
__defNormalProp$
|
|
16859
|
+
if (__hasOwnProp$O.call(b, prop))
|
|
16860
|
+
__defNormalProp$F(a, prop, b[prop]);
|
|
16861
|
+
if (__getOwnPropSymbols$O)
|
|
16862
|
+
for (var prop of __getOwnPropSymbols$O(b)) {
|
|
16863
|
+
if (__propIsEnum$O.call(b, prop))
|
|
16864
|
+
__defNormalProp$F(a, prop, b[prop]);
|
|
16845
16865
|
}
|
|
16846
16866
|
return a;
|
|
16847
16867
|
};
|
|
@@ -16853,7 +16873,7 @@ class ServicePointsAPI {
|
|
|
16853
16873
|
* Either an address, coordinates, or an address query
|
|
16854
16874
|
*/
|
|
16855
16875
|
this.list = (options) => {
|
|
16856
|
-
return this.client.post("/v1/service_points/list", __spreadValues$
|
|
16876
|
+
return this.client.post("/v1/service_points/list", __spreadValues$F({}, options));
|
|
16857
16877
|
};
|
|
16858
16878
|
/**
|
|
16859
16879
|
* Get a specific service point by its carrier code, country code, and id
|
|
@@ -16871,7 +16891,7 @@ class ServicePointsAPI {
|
|
|
16871
16891
|
}
|
|
16872
16892
|
}
|
|
16873
16893
|
|
|
16874
|
-
var __async$
|
|
16894
|
+
var __async$Y = (__this, __arguments, generator) => {
|
|
16875
16895
|
return new Promise((resolve, reject) => {
|
|
16876
16896
|
var fulfilled = (value) => {
|
|
16877
16897
|
try {
|
|
@@ -16920,7 +16940,7 @@ class ShipmentsAPI {
|
|
|
16920
16940
|
* The `create` method allows for creating shipments based on a list of shipment
|
|
16921
16941
|
* items passed into this method.
|
|
16922
16942
|
*/
|
|
16923
|
-
this.create = (...shipments) => __async$
|
|
16943
|
+
this.create = (...shipments) => __async$Y(this, null, function* () {
|
|
16924
16944
|
return this.client.post("/v1/shipments", {
|
|
16925
16945
|
shipments
|
|
16926
16946
|
});
|
|
@@ -34337,38 +34357,38 @@ class WebhooksAPI {
|
|
|
34337
34357
|
}
|
|
34338
34358
|
}
|
|
34339
34359
|
|
|
34340
|
-
var __defProp$
|
|
34341
|
-
var __defProps$
|
|
34342
|
-
var __getOwnPropDescs$
|
|
34343
|
-
var __getOwnPropSymbols$
|
|
34344
|
-
var __hasOwnProp$
|
|
34345
|
-
var __propIsEnum$
|
|
34346
|
-
var __defNormalProp$
|
|
34347
|
-
var __spreadValues$
|
|
34360
|
+
var __defProp$E = Object.defineProperty;
|
|
34361
|
+
var __defProps$B = Object.defineProperties;
|
|
34362
|
+
var __getOwnPropDescs$B = Object.getOwnPropertyDescriptors;
|
|
34363
|
+
var __getOwnPropSymbols$N = Object.getOwnPropertySymbols;
|
|
34364
|
+
var __hasOwnProp$N = Object.prototype.hasOwnProperty;
|
|
34365
|
+
var __propIsEnum$N = Object.prototype.propertyIsEnumerable;
|
|
34366
|
+
var __defNormalProp$E = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
34367
|
+
var __spreadValues$E = (a, b) => {
|
|
34348
34368
|
for (var prop in b || (b = {}))
|
|
34349
|
-
if (__hasOwnProp$
|
|
34350
|
-
__defNormalProp$
|
|
34351
|
-
if (__getOwnPropSymbols$
|
|
34352
|
-
for (var prop of __getOwnPropSymbols$
|
|
34353
|
-
if (__propIsEnum$
|
|
34354
|
-
__defNormalProp$
|
|
34369
|
+
if (__hasOwnProp$N.call(b, prop))
|
|
34370
|
+
__defNormalProp$E(a, prop, b[prop]);
|
|
34371
|
+
if (__getOwnPropSymbols$N)
|
|
34372
|
+
for (var prop of __getOwnPropSymbols$N(b)) {
|
|
34373
|
+
if (__propIsEnum$N.call(b, prop))
|
|
34374
|
+
__defNormalProp$E(a, prop, b[prop]);
|
|
34355
34375
|
}
|
|
34356
34376
|
return a;
|
|
34357
34377
|
};
|
|
34358
|
-
var __spreadProps$
|
|
34378
|
+
var __spreadProps$B = (a, b) => __defProps$B(a, __getOwnPropDescs$B(b));
|
|
34359
34379
|
var __objRest$s = (source, exclude) => {
|
|
34360
34380
|
var target = {};
|
|
34361
34381
|
for (var prop in source)
|
|
34362
|
-
if (__hasOwnProp$
|
|
34382
|
+
if (__hasOwnProp$N.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
34363
34383
|
target[prop] = source[prop];
|
|
34364
|
-
if (source != null && __getOwnPropSymbols$
|
|
34365
|
-
for (var prop of __getOwnPropSymbols$
|
|
34366
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
34384
|
+
if (source != null && __getOwnPropSymbols$N)
|
|
34385
|
+
for (var prop of __getOwnPropSymbols$N(source)) {
|
|
34386
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$N.call(source, prop))
|
|
34367
34387
|
target[prop] = source[prop];
|
|
34368
34388
|
}
|
|
34369
34389
|
return target;
|
|
34370
34390
|
};
|
|
34371
|
-
var __async$
|
|
34391
|
+
var __async$X = (__this, __arguments, generator) => {
|
|
34372
34392
|
return new Promise((resolve, reject) => {
|
|
34373
34393
|
var fulfilled = (value) => {
|
|
34374
34394
|
try {
|
|
@@ -34391,7 +34411,7 @@ var __async$W = (__this, __arguments, generator) => {
|
|
|
34391
34411
|
const logger$1 = E({
|
|
34392
34412
|
level: process.env.NODE_ENV === "production" ? "fatal" : "info",
|
|
34393
34413
|
name: "shipengine-api",
|
|
34394
|
-
serializers: __spreadProps$
|
|
34414
|
+
serializers: __spreadProps$B(__spreadValues$E({}, k), {
|
|
34395
34415
|
req: (req) => ({
|
|
34396
34416
|
headers: req.headers,
|
|
34397
34417
|
method: req.method,
|
|
@@ -34416,7 +34436,7 @@ class ShipEngineAPI {
|
|
|
34416
34436
|
this.getSandboxToken = getSandboxToken;
|
|
34417
34437
|
const client = axios.create({
|
|
34418
34438
|
baseURL,
|
|
34419
|
-
headers: __spreadProps$
|
|
34439
|
+
headers: __spreadProps$B(__spreadValues$E({}, headers), {
|
|
34420
34440
|
"Content-Type": "application/json"
|
|
34421
34441
|
}),
|
|
34422
34442
|
paramsSerializer: (params) => lib.stringify(decamelizeKeys(params), { arrayFormat: "brackets" }),
|
|
@@ -34456,7 +34476,7 @@ class ShipEngineAPI {
|
|
|
34456
34476
|
});
|
|
34457
34477
|
client.defaults.headers.common["Authorization"] = `Bearer ${token}`;
|
|
34458
34478
|
client.interceptors.request.use(
|
|
34459
|
-
(config) => __async$
|
|
34479
|
+
(config) => __async$X(this, null, function* () {
|
|
34460
34480
|
if (config.isSandbox) {
|
|
34461
34481
|
if (!this.sandboxToken) {
|
|
34462
34482
|
this.sandboxToken = yield getSandboxToken == null ? void 0 : getSandboxToken();
|
|
@@ -34483,7 +34503,7 @@ class ShipEngineAPI {
|
|
|
34483
34503
|
);
|
|
34484
34504
|
return res;
|
|
34485
34505
|
},
|
|
34486
|
-
(err) => __async$
|
|
34506
|
+
(err) => __async$X(this, null, function* () {
|
|
34487
34507
|
var _a, _b, _c, _d, _e;
|
|
34488
34508
|
logger$1.error(
|
|
34489
34509
|
{ err, req: err.config, res: err.response },
|
|
@@ -34530,7 +34550,7 @@ class ShipEngineAPI {
|
|
|
34530
34550
|
* that token (also known as Seller ID)
|
|
34531
34551
|
*/
|
|
34532
34552
|
getTenant(isSandbox) {
|
|
34533
|
-
return __async$
|
|
34553
|
+
return __async$X(this, null, function* () {
|
|
34534
34554
|
var _a;
|
|
34535
34555
|
if (!isSandbox) {
|
|
34536
34556
|
return this.getTenantFromToken(this.token);
|
|
@@ -34833,25 +34853,25 @@ const delay = (ms) => new Promise((resolve) => {
|
|
|
34833
34853
|
|
|
34834
34854
|
const onError = (_errors) => _default();
|
|
34835
34855
|
|
|
34836
|
-
var __defProp$
|
|
34837
|
-
var __defProps$
|
|
34838
|
-
var __getOwnPropDescs$
|
|
34839
|
-
var __getOwnPropSymbols$
|
|
34840
|
-
var __hasOwnProp$
|
|
34841
|
-
var __propIsEnum$
|
|
34842
|
-
var __defNormalProp$
|
|
34843
|
-
var __spreadValues$
|
|
34856
|
+
var __defProp$D = Object.defineProperty;
|
|
34857
|
+
var __defProps$A = Object.defineProperties;
|
|
34858
|
+
var __getOwnPropDescs$A = Object.getOwnPropertyDescriptors;
|
|
34859
|
+
var __getOwnPropSymbols$M = Object.getOwnPropertySymbols;
|
|
34860
|
+
var __hasOwnProp$M = Object.prototype.hasOwnProperty;
|
|
34861
|
+
var __propIsEnum$M = Object.prototype.propertyIsEnumerable;
|
|
34862
|
+
var __defNormalProp$D = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
34863
|
+
var __spreadValues$D = (a, b) => {
|
|
34844
34864
|
for (var prop in b || (b = {}))
|
|
34845
|
-
if (__hasOwnProp$
|
|
34846
|
-
__defNormalProp$
|
|
34847
|
-
if (__getOwnPropSymbols$
|
|
34848
|
-
for (var prop of __getOwnPropSymbols$
|
|
34849
|
-
if (__propIsEnum$
|
|
34850
|
-
__defNormalProp$
|
|
34865
|
+
if (__hasOwnProp$M.call(b, prop))
|
|
34866
|
+
__defNormalProp$D(a, prop, b[prop]);
|
|
34867
|
+
if (__getOwnPropSymbols$M)
|
|
34868
|
+
for (var prop of __getOwnPropSymbols$M(b)) {
|
|
34869
|
+
if (__propIsEnum$M.call(b, prop))
|
|
34870
|
+
__defNormalProp$D(a, prop, b[prop]);
|
|
34851
34871
|
}
|
|
34852
34872
|
return a;
|
|
34853
34873
|
};
|
|
34854
|
-
var __spreadProps$
|
|
34874
|
+
var __spreadProps$A = (a, b) => __defProps$A(a, __getOwnPropDescs$A(b));
|
|
34855
34875
|
const streams = [];
|
|
34856
34876
|
if (process.env.NODE_ENV === "production") {
|
|
34857
34877
|
streams.push({
|
|
@@ -34860,7 +34880,7 @@ if (process.env.NODE_ENV === "production") {
|
|
|
34860
34880
|
}
|
|
34861
34881
|
const logger = E({
|
|
34862
34882
|
name: "shipengine",
|
|
34863
|
-
serializers: __spreadProps$
|
|
34883
|
+
serializers: __spreadProps$A(__spreadValues$D({}, k), {
|
|
34864
34884
|
req: (req) => ({
|
|
34865
34885
|
headers: req.headers,
|
|
34866
34886
|
method: req.method,
|
|
@@ -34885,7 +34905,7 @@ const retryUntil = (callbackFn, retries = 10, timeoutBetweenAttempts = 1e3) => P
|
|
|
34885
34905
|
throw error;
|
|
34886
34906
|
});
|
|
34887
34907
|
|
|
34888
|
-
var __async$
|
|
34908
|
+
var __async$W = (__this, __arguments, generator) => {
|
|
34889
34909
|
return new Promise((resolve, reject) => {
|
|
34890
34910
|
var fulfilled = (value) => {
|
|
34891
34911
|
try {
|
|
@@ -34908,7 +34928,7 @@ var __async$V = (__this, __arguments, generator) => {
|
|
|
34908
34928
|
const useCreateAccountImage = () => {
|
|
34909
34929
|
const { client } = useShipEngine();
|
|
34910
34930
|
return useMutation({
|
|
34911
|
-
mutationFn: (data) => __async$
|
|
34931
|
+
mutationFn: (data) => __async$W(void 0, null, function* () {
|
|
34912
34932
|
const result = yield client.accountSettings.createImage(data);
|
|
34913
34933
|
return result.data;
|
|
34914
34934
|
}),
|
|
@@ -34917,7 +34937,7 @@ const useCreateAccountImage = () => {
|
|
|
34917
34937
|
});
|
|
34918
34938
|
};
|
|
34919
34939
|
|
|
34920
|
-
var __async$
|
|
34940
|
+
var __async$V = (__this, __arguments, generator) => {
|
|
34921
34941
|
return new Promise((resolve, reject) => {
|
|
34922
34942
|
var fulfilled = (value) => {
|
|
34923
34943
|
try {
|
|
@@ -34940,7 +34960,7 @@ var __async$U = (__this, __arguments, generator) => {
|
|
|
34940
34960
|
const useDeleteAccountImage = () => {
|
|
34941
34961
|
const { client } = useShipEngine();
|
|
34942
34962
|
return useMutation({
|
|
34943
|
-
mutationFn: (labelImageId) => __async$
|
|
34963
|
+
mutationFn: (labelImageId) => __async$V(void 0, null, function* () {
|
|
34944
34964
|
const result = yield client.accountSettings.deleteImage(labelImageId);
|
|
34945
34965
|
return result.data;
|
|
34946
34966
|
}),
|
|
@@ -34969,7 +34989,7 @@ const useGetAccountSettings = () => {
|
|
|
34969
34989
|
});
|
|
34970
34990
|
};
|
|
34971
34991
|
|
|
34972
|
-
var __async$
|
|
34992
|
+
var __async$U = (__this, __arguments, generator) => {
|
|
34973
34993
|
return new Promise((resolve, reject) => {
|
|
34974
34994
|
var fulfilled = (value) => {
|
|
34975
34995
|
try {
|
|
@@ -34992,7 +35012,7 @@ var __async$T = (__this, __arguments, generator) => {
|
|
|
34992
35012
|
const useUpdateAccountImage = () => {
|
|
34993
35013
|
const { client } = useShipEngine();
|
|
34994
35014
|
return useMutation({
|
|
34995
|
-
mutationFn: (data) => __async$
|
|
35015
|
+
mutationFn: (data) => __async$U(void 0, null, function* () {
|
|
34996
35016
|
const result = yield client.accountSettings.updateImage(data);
|
|
34997
35017
|
return result.data;
|
|
34998
35018
|
}),
|
|
@@ -35001,7 +35021,7 @@ const useUpdateAccountImage = () => {
|
|
|
35001
35021
|
});
|
|
35002
35022
|
};
|
|
35003
35023
|
|
|
35004
|
-
var __async$
|
|
35024
|
+
var __async$T = (__this, __arguments, generator) => {
|
|
35005
35025
|
return new Promise((resolve, reject) => {
|
|
35006
35026
|
var fulfilled = (value) => {
|
|
35007
35027
|
try {
|
|
@@ -35024,7 +35044,7 @@ var __async$S = (__this, __arguments, generator) => {
|
|
|
35024
35044
|
const useUpdateAccountSettings = () => {
|
|
35025
35045
|
const { client } = useShipEngine();
|
|
35026
35046
|
return useMutation({
|
|
35027
|
-
mutationFn: (settings) => __async$
|
|
35047
|
+
mutationFn: (settings) => __async$T(void 0, null, function* () {
|
|
35028
35048
|
const result = yield client.accountSettings.update(settings);
|
|
35029
35049
|
return result.data;
|
|
35030
35050
|
}),
|
|
@@ -35033,7 +35053,7 @@ const useUpdateAccountSettings = () => {
|
|
|
35033
35053
|
});
|
|
35034
35054
|
};
|
|
35035
35055
|
|
|
35036
|
-
var __async$
|
|
35056
|
+
var __async$S = (__this, __arguments, generator) => {
|
|
35037
35057
|
return new Promise((resolve, reject) => {
|
|
35038
35058
|
var fulfilled = (value) => {
|
|
35039
35059
|
try {
|
|
@@ -35056,7 +35076,7 @@ var __async$R = (__this, __arguments, generator) => {
|
|
|
35056
35076
|
const useParseAddress = () => {
|
|
35057
35077
|
const { client } = useShipEngine();
|
|
35058
35078
|
return useMutation({
|
|
35059
|
-
mutationFn: (_0) => __async$
|
|
35079
|
+
mutationFn: (_0) => __async$S(void 0, [_0], function* ({ address, text }) {
|
|
35060
35080
|
const result = yield client.addresses.parse(text, address);
|
|
35061
35081
|
return result.data;
|
|
35062
35082
|
}),
|
|
@@ -35065,7 +35085,7 @@ const useParseAddress = () => {
|
|
|
35065
35085
|
});
|
|
35066
35086
|
};
|
|
35067
35087
|
|
|
35068
|
-
var __async$
|
|
35088
|
+
var __async$R = (__this, __arguments, generator) => {
|
|
35069
35089
|
return new Promise((resolve, reject) => {
|
|
35070
35090
|
var fulfilled = (value) => {
|
|
35071
35091
|
try {
|
|
@@ -35088,7 +35108,7 @@ var __async$Q = (__this, __arguments, generator) => {
|
|
|
35088
35108
|
const useValidateAddresses = () => {
|
|
35089
35109
|
const { client } = useShipEngine();
|
|
35090
35110
|
return useMutation({
|
|
35091
|
-
mutationFn: (addresses) => __async$
|
|
35111
|
+
mutationFn: (addresses) => __async$R(void 0, null, function* () {
|
|
35092
35112
|
const result = yield client.addresses.validate(addresses);
|
|
35093
35113
|
return result.data;
|
|
35094
35114
|
}),
|
|
@@ -35097,26 +35117,26 @@ const useValidateAddresses = () => {
|
|
|
35097
35117
|
});
|
|
35098
35118
|
};
|
|
35099
35119
|
|
|
35100
|
-
var __defProp$
|
|
35101
|
-
var __defProps$
|
|
35102
|
-
var __getOwnPropDescs$
|
|
35103
|
-
var __getOwnPropSymbols$
|
|
35104
|
-
var __hasOwnProp$
|
|
35105
|
-
var __propIsEnum$
|
|
35106
|
-
var __defNormalProp$
|
|
35107
|
-
var __spreadValues$
|
|
35120
|
+
var __defProp$C = Object.defineProperty;
|
|
35121
|
+
var __defProps$z = Object.defineProperties;
|
|
35122
|
+
var __getOwnPropDescs$z = Object.getOwnPropertyDescriptors;
|
|
35123
|
+
var __getOwnPropSymbols$L = Object.getOwnPropertySymbols;
|
|
35124
|
+
var __hasOwnProp$L = Object.prototype.hasOwnProperty;
|
|
35125
|
+
var __propIsEnum$L = Object.prototype.propertyIsEnumerable;
|
|
35126
|
+
var __defNormalProp$C = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
35127
|
+
var __spreadValues$C = (a, b) => {
|
|
35108
35128
|
for (var prop in b || (b = {}))
|
|
35109
|
-
if (__hasOwnProp$
|
|
35110
|
-
__defNormalProp$
|
|
35111
|
-
if (__getOwnPropSymbols$
|
|
35112
|
-
for (var prop of __getOwnPropSymbols$
|
|
35113
|
-
if (__propIsEnum$
|
|
35114
|
-
__defNormalProp$
|
|
35129
|
+
if (__hasOwnProp$L.call(b, prop))
|
|
35130
|
+
__defNormalProp$C(a, prop, b[prop]);
|
|
35131
|
+
if (__getOwnPropSymbols$L)
|
|
35132
|
+
for (var prop of __getOwnPropSymbols$L(b)) {
|
|
35133
|
+
if (__propIsEnum$L.call(b, prop))
|
|
35134
|
+
__defNormalProp$C(a, prop, b[prop]);
|
|
35115
35135
|
}
|
|
35116
35136
|
return a;
|
|
35117
35137
|
};
|
|
35118
|
-
var __spreadProps$
|
|
35119
|
-
var __async$
|
|
35138
|
+
var __spreadProps$z = (a, b) => __defProps$z(a, __getOwnPropDescs$z(b));
|
|
35139
|
+
var __async$Q = (__this, __arguments, generator) => {
|
|
35120
35140
|
return new Promise((resolve, reject) => {
|
|
35121
35141
|
var fulfilled = (value) => {
|
|
35122
35142
|
try {
|
|
@@ -35138,8 +35158,8 @@ var __async$P = (__this, __arguments, generator) => {
|
|
|
35138
35158
|
};
|
|
35139
35159
|
const useCreateAuctanePaySession = (params) => {
|
|
35140
35160
|
const { client } = useShipEngine();
|
|
35141
|
-
return useMutation(__spreadProps$
|
|
35142
|
-
mutationFn: (request) => __async$
|
|
35161
|
+
return useMutation(__spreadProps$z(__spreadValues$C({}, params), {
|
|
35162
|
+
mutationFn: (request) => __async$Q(void 0, null, function* () {
|
|
35143
35163
|
const result = yield client.auctanePay.createSession(request);
|
|
35144
35164
|
return result.data;
|
|
35145
35165
|
}),
|
|
@@ -35148,6 +35168,36 @@ const useCreateAuctanePaySession = (params) => {
|
|
|
35148
35168
|
}));
|
|
35149
35169
|
};
|
|
35150
35170
|
|
|
35171
|
+
var __defProp$B = Object.defineProperty;
|
|
35172
|
+
var __defProps$y = Object.defineProperties;
|
|
35173
|
+
var __getOwnPropDescs$y = Object.getOwnPropertyDescriptors;
|
|
35174
|
+
var __getOwnPropSymbols$K = Object.getOwnPropertySymbols;
|
|
35175
|
+
var __hasOwnProp$K = Object.prototype.hasOwnProperty;
|
|
35176
|
+
var __propIsEnum$K = Object.prototype.propertyIsEnumerable;
|
|
35177
|
+
var __defNormalProp$B = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
35178
|
+
var __spreadValues$B = (a, b) => {
|
|
35179
|
+
for (var prop in b || (b = {}))
|
|
35180
|
+
if (__hasOwnProp$K.call(b, prop))
|
|
35181
|
+
__defNormalProp$B(a, prop, b[prop]);
|
|
35182
|
+
if (__getOwnPropSymbols$K)
|
|
35183
|
+
for (var prop of __getOwnPropSymbols$K(b)) {
|
|
35184
|
+
if (__propIsEnum$K.call(b, prop))
|
|
35185
|
+
__defNormalProp$B(a, prop, b[prop]);
|
|
35186
|
+
}
|
|
35187
|
+
return a;
|
|
35188
|
+
};
|
|
35189
|
+
var __spreadProps$y = (a, b) => __defProps$y(a, __getOwnPropDescs$y(b));
|
|
35190
|
+
const useGetAuctanePayConfig = (params) => {
|
|
35191
|
+
const { client } = useShipEngine();
|
|
35192
|
+
const queryParams = __spreadValues$B({}, params);
|
|
35193
|
+
return useQuery(__spreadProps$y(__spreadValues$B({}, queryParams), {
|
|
35194
|
+
onError,
|
|
35195
|
+
queryFn: () => client.auctanePay.getConfig(),
|
|
35196
|
+
queryKey: ["useGetAuctanePayConfig"],
|
|
35197
|
+
select: (result) => result.data
|
|
35198
|
+
}));
|
|
35199
|
+
};
|
|
35200
|
+
|
|
35151
35201
|
var __defProp$A = Object.defineProperty;
|
|
35152
35202
|
var __defProps$x = Object.defineProperties;
|
|
35153
35203
|
var __getOwnPropDescs$x = Object.getOwnPropertyDescriptors;
|
|
@@ -35167,14 +35217,39 @@ var __spreadValues$A = (a, b) => {
|
|
|
35167
35217
|
return a;
|
|
35168
35218
|
};
|
|
35169
35219
|
var __spreadProps$x = (a, b) => __defProps$x(a, __getOwnPropDescs$x(b));
|
|
35170
|
-
|
|
35220
|
+
var __async$P = (__this, __arguments, generator) => {
|
|
35221
|
+
return new Promise((resolve, reject) => {
|
|
35222
|
+
var fulfilled = (value) => {
|
|
35223
|
+
try {
|
|
35224
|
+
step(generator.next(value));
|
|
35225
|
+
} catch (e) {
|
|
35226
|
+
reject(e);
|
|
35227
|
+
}
|
|
35228
|
+
};
|
|
35229
|
+
var rejected = (value) => {
|
|
35230
|
+
try {
|
|
35231
|
+
step(generator.throw(value));
|
|
35232
|
+
} catch (e) {
|
|
35233
|
+
reject(e);
|
|
35234
|
+
}
|
|
35235
|
+
};
|
|
35236
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
35237
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
35238
|
+
});
|
|
35239
|
+
};
|
|
35240
|
+
const usePreviewTransaction = (params) => {
|
|
35171
35241
|
const { client } = useShipEngine();
|
|
35172
|
-
|
|
35173
|
-
|
|
35174
|
-
|
|
35175
|
-
|
|
35176
|
-
|
|
35177
|
-
|
|
35242
|
+
return useMutation(__spreadProps$x(__spreadValues$A({}, params), {
|
|
35243
|
+
mutationFn: (_0) => __async$P(void 0, [_0], function* ({ amount, transactionCategory = "add_funds" }) {
|
|
35244
|
+
const request = {
|
|
35245
|
+
amount,
|
|
35246
|
+
transactionCategory
|
|
35247
|
+
};
|
|
35248
|
+
const result = yield client.auctanePay.previewTransaction(request);
|
|
35249
|
+
return result.data;
|
|
35250
|
+
}),
|
|
35251
|
+
mutationKey: ["usePreviewTransaction"],
|
|
35252
|
+
onError
|
|
35178
35253
|
}));
|
|
35179
35254
|
};
|
|
35180
35255
|
|
|
@@ -39693,4 +39768,4 @@ const alchemy = {
|
|
|
39693
39768
|
createElement
|
|
39694
39769
|
};
|
|
39695
39770
|
|
|
39696
|
-
export { 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, 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, useGetRateCardById, useGetSalesOrder, useGetSalesOrderByExternalOrderId, useGetSalesOrderShipment, useGetServicePoint, useGetServicesByCarrier, useGetShipment, useGetShipmentByExternalId, useGetShipmentRates, useGetShippingRuleById, useGetShippingRuleConditionsOptions, useGetThemeById, useGetZonesByCarrier, useI18n, useListCarrierConnections, useListCarriers, useListCustomPackageTypes, useListFundingSources, useListLabels, useListLabelsInfinite, useListOrderSources, useListOrderSourcesConnections, useListRateCards, useListSalesOrderShipments, useListSalesOrderShipmentsByExternalOrderId, useListSalesOrders, useListSandboxSellerIds, useListSellerApiKeys, useListServicePoints, useListShipments, useListShippingRules, useListUsers, useListWarehouses, useListWebhooks, useLoadIcons, useNotifySalesOrderShipped, useParseAddress, usePublishRateCard, useRatesEstimate, useRefreshOrderSource, useRefreshOrderSourceAsync, useRegisterCarrier, useRequestStampsAccountUrls, useShipEngine, useUpdateAccountBillingPlan, useUpdateAccountImage, useUpdateAccountSettings, useUpdateAutoFunding, useUpdateConnectionsCarrierSettings, useUpdateFundingSource, useUpdateInvoiceAddress, useUpdateOrderSource, useUpdateRateCard, useUpdateSalesOrderShipment, useUpdateWarehouse, useUpdateWebhook, useUploadRateCard, useUpsertAccountBilling, useValidateAddresses, useVoidLabel };
|
|
39771
|
+
export { 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, 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, useGetRateCardById, useGetSalesOrder, useGetSalesOrderByExternalOrderId, useGetSalesOrderShipment, useGetServicePoint, useGetServicesByCarrier, useGetShipment, useGetShipmentByExternalId, useGetShipmentRates, useGetShippingRuleById, useGetShippingRuleConditionsOptions, useGetThemeById, useGetZonesByCarrier, useI18n, 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, useUpdateRateCard, useUpdateSalesOrderShipment, useUpdateWarehouse, useUpdateWebhook, useUploadRateCard, useUpsertAccountBilling, useValidateAddresses, useVoidLabel };
|