@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.js
CHANGED
|
@@ -4905,33 +4905,41 @@ var _getHolder = getHolder$2;
|
|
|
4905
4905
|
|
|
4906
4906
|
/** Used as references for various `Number` constants. */
|
|
4907
4907
|
|
|
4908
|
-
var
|
|
4908
|
+
var _isIndex;
|
|
4909
|
+
var hasRequired_isIndex;
|
|
4909
4910
|
|
|
4910
|
-
|
|
4911
|
-
|
|
4911
|
+
function require_isIndex () {
|
|
4912
|
+
if (hasRequired_isIndex) return _isIndex;
|
|
4913
|
+
hasRequired_isIndex = 1;
|
|
4914
|
+
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
4912
4915
|
|
|
4913
|
-
/**
|
|
4914
|
-
|
|
4915
|
-
*
|
|
4916
|
-
* @private
|
|
4917
|
-
* @param {*} value The value to check.
|
|
4918
|
-
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
|
4919
|
-
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
|
4920
|
-
*/
|
|
4921
|
-
function isIndex$3(value, length) {
|
|
4922
|
-
var type = typeof value;
|
|
4923
|
-
length = length == null ? MAX_SAFE_INTEGER$1 : length;
|
|
4916
|
+
/** Used to detect unsigned integer values. */
|
|
4917
|
+
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
4924
4918
|
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
}
|
|
4919
|
+
/**
|
|
4920
|
+
* Checks if `value` is a valid array-like index.
|
|
4921
|
+
*
|
|
4922
|
+
* @private
|
|
4923
|
+
* @param {*} value The value to check.
|
|
4924
|
+
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
|
4925
|
+
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
|
4926
|
+
*/
|
|
4927
|
+
function isIndex(value, length) {
|
|
4928
|
+
var type = typeof value;
|
|
4929
|
+
length = length == null ? MAX_SAFE_INTEGER : length;
|
|
4930
|
+
|
|
4931
|
+
return !!length &&
|
|
4932
|
+
(type == 'number' ||
|
|
4933
|
+
(type != 'symbol' && reIsUint.test(value))) &&
|
|
4934
|
+
(value > -1 && value % 1 == 0 && value < length);
|
|
4935
|
+
}
|
|
4930
4936
|
|
|
4931
|
-
|
|
4937
|
+
_isIndex = isIndex;
|
|
4938
|
+
return _isIndex;
|
|
4939
|
+
}
|
|
4932
4940
|
|
|
4933
4941
|
var copyArray$2 = _copyArray,
|
|
4934
|
-
isIndex$2 =
|
|
4942
|
+
isIndex$2 = require_isIndex();
|
|
4935
4943
|
|
|
4936
4944
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
4937
4945
|
var nativeMin$1 = Math.min;
|
|
@@ -6124,7 +6132,7 @@ var baseTimes = _baseTimes,
|
|
|
6124
6132
|
isArguments$2 = requireIsArguments(),
|
|
6125
6133
|
isArray$f = isArray_1,
|
|
6126
6134
|
isBuffer$4 = isBufferExports,
|
|
6127
|
-
isIndex$1 =
|
|
6135
|
+
isIndex$1 = require_isIndex(),
|
|
6128
6136
|
isTypedArray$1 = requireIsTypedArray();
|
|
6129
6137
|
|
|
6130
6138
|
/** Used for built-in method references. */
|
|
@@ -9455,7 +9463,7 @@ var _baseHasIn = baseHasIn$1;
|
|
|
9455
9463
|
var castPath = _castPath,
|
|
9456
9464
|
isArguments$1 = requireIsArguments(),
|
|
9457
9465
|
isArray$8 = isArray_1,
|
|
9458
|
-
isIndex =
|
|
9466
|
+
isIndex = require_isIndex(),
|
|
9459
9467
|
isLength = isLength_1,
|
|
9460
9468
|
toKey$3 = _toKey;
|
|
9461
9469
|
|
|
@@ -10345,7 +10353,7 @@ function require_isIterateeCall () {
|
|
|
10345
10353
|
hasRequired_isIterateeCall = 1;
|
|
10346
10354
|
var eq = requireEq(),
|
|
10347
10355
|
isArrayLike = isArrayLike_1,
|
|
10348
|
-
isIndex =
|
|
10356
|
+
isIndex = require_isIndex(),
|
|
10349
10357
|
isObject = isObject_1;
|
|
10350
10358
|
|
|
10351
10359
|
/**
|
|
@@ -10812,17 +10820,17 @@ var AccountBillingPlanChangeType = /* @__PURE__ */ ((AccountBillingPlanChangeTyp
|
|
|
10812
10820
|
return AccountBillingPlanChangeType2;
|
|
10813
10821
|
})(AccountBillingPlanChangeType || {});
|
|
10814
10822
|
|
|
10815
|
-
var __getOwnPropSymbols$
|
|
10816
|
-
var __hasOwnProp$
|
|
10817
|
-
var __propIsEnum$
|
|
10823
|
+
var __getOwnPropSymbols$V = Object.getOwnPropertySymbols;
|
|
10824
|
+
var __hasOwnProp$V = Object.prototype.hasOwnProperty;
|
|
10825
|
+
var __propIsEnum$V = Object.prototype.propertyIsEnumerable;
|
|
10818
10826
|
var __objRest$x = (source, exclude) => {
|
|
10819
10827
|
var target = {};
|
|
10820
10828
|
for (var prop in source)
|
|
10821
|
-
if (__hasOwnProp$
|
|
10829
|
+
if (__hasOwnProp$V.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
10822
10830
|
target[prop] = source[prop];
|
|
10823
|
-
if (source != null && __getOwnPropSymbols$
|
|
10824
|
-
for (var prop of __getOwnPropSymbols$
|
|
10825
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
10831
|
+
if (source != null && __getOwnPropSymbols$V)
|
|
10832
|
+
for (var prop of __getOwnPropSymbols$V(source)) {
|
|
10833
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$V.call(source, prop))
|
|
10826
10834
|
target[prop] = source[prop];
|
|
10827
10835
|
}
|
|
10828
10836
|
return target;
|
|
@@ -10957,17 +10965,17 @@ const types = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
10957
10965
|
RateCardStatus
|
|
10958
10966
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
10959
10967
|
|
|
10960
|
-
var __getOwnPropSymbols$
|
|
10961
|
-
var __hasOwnProp$
|
|
10962
|
-
var __propIsEnum$
|
|
10968
|
+
var __getOwnPropSymbols$U = Object.getOwnPropertySymbols;
|
|
10969
|
+
var __hasOwnProp$U = Object.prototype.hasOwnProperty;
|
|
10970
|
+
var __propIsEnum$U = Object.prototype.propertyIsEnumerable;
|
|
10963
10971
|
var __objRest$w = (source, exclude) => {
|
|
10964
10972
|
var target = {};
|
|
10965
10973
|
for (var prop in source)
|
|
10966
|
-
if (__hasOwnProp$
|
|
10974
|
+
if (__hasOwnProp$U.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
10967
10975
|
target[prop] = source[prop];
|
|
10968
|
-
if (source != null && __getOwnPropSymbols$
|
|
10969
|
-
for (var prop of __getOwnPropSymbols$
|
|
10970
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
10976
|
+
if (source != null && __getOwnPropSymbols$U)
|
|
10977
|
+
for (var prop of __getOwnPropSymbols$U(source)) {
|
|
10978
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$U.call(source, prop))
|
|
10971
10979
|
target[prop] = source[prop];
|
|
10972
10980
|
}
|
|
10973
10981
|
return target;
|
|
@@ -11062,6 +11070,18 @@ class AuctanePayAPI {
|
|
|
11062
11070
|
this.getConfig = () => {
|
|
11063
11071
|
return this.client.get("/v1/payments/config");
|
|
11064
11072
|
};
|
|
11073
|
+
/**
|
|
11074
|
+
* The `previewTransaction` method previews transaction costs including fees and surcharges
|
|
11075
|
+
* @docs https://auctane-pay-dev.kubedev.sslocal.com/swagger/index.html#tag/Transactions
|
|
11076
|
+
* @param request - The request object containing amount and transaction category
|
|
11077
|
+
* @returns a promise that resolves to the transaction preview with fees
|
|
11078
|
+
*/
|
|
11079
|
+
this.previewTransaction = (request) => {
|
|
11080
|
+
return this.client.post(
|
|
11081
|
+
"/v1/payments/transaction/preview",
|
|
11082
|
+
request
|
|
11083
|
+
);
|
|
11084
|
+
};
|
|
11065
11085
|
this.client = client;
|
|
11066
11086
|
}
|
|
11067
11087
|
}
|
|
@@ -13771,7 +13791,7 @@ var ipaddr = {
|
|
|
13771
13791
|
}).call(commonjsGlobal);
|
|
13772
13792
|
} (ipaddr));
|
|
13773
13793
|
|
|
13774
|
-
var __async$
|
|
13794
|
+
var __async$12 = (__this, __arguments, generator) => {
|
|
13775
13795
|
return new Promise((resolve, reject) => {
|
|
13776
13796
|
var fulfilled = (value) => {
|
|
13777
13797
|
try {
|
|
@@ -13791,7 +13811,7 @@ var __async$11 = (__this, __arguments, generator) => {
|
|
|
13791
13811
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
13792
13812
|
});
|
|
13793
13813
|
};
|
|
13794
|
-
const getEndUserIpAddress = () => __async$
|
|
13814
|
+
const getEndUserIpAddress = () => __async$12(void 0, null, function* () {
|
|
13795
13815
|
try {
|
|
13796
13816
|
const response = yield axios.get("https://api.ipify.org/?format=json");
|
|
13797
13817
|
if (response.data.ip && ipaddrExports.isValid(response.data.ip)) {
|
|
@@ -13852,38 +13872,38 @@ const decamelizeKeys = (obj, separator = "_") => {
|
|
|
13852
13872
|
return obj;
|
|
13853
13873
|
};
|
|
13854
13874
|
|
|
13855
|
-
var __defProp$
|
|
13856
|
-
var __defProps$
|
|
13857
|
-
var __getOwnPropDescs$
|
|
13858
|
-
var __getOwnPropSymbols$
|
|
13859
|
-
var __hasOwnProp$
|
|
13860
|
-
var __propIsEnum$
|
|
13861
|
-
var __defNormalProp$
|
|
13862
|
-
var __spreadValues$
|
|
13875
|
+
var __defProp$I = Object.defineProperty;
|
|
13876
|
+
var __defProps$C = Object.defineProperties;
|
|
13877
|
+
var __getOwnPropDescs$C = Object.getOwnPropertyDescriptors;
|
|
13878
|
+
var __getOwnPropSymbols$T = Object.getOwnPropertySymbols;
|
|
13879
|
+
var __hasOwnProp$T = Object.prototype.hasOwnProperty;
|
|
13880
|
+
var __propIsEnum$T = Object.prototype.propertyIsEnumerable;
|
|
13881
|
+
var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13882
|
+
var __spreadValues$I = (a, b) => {
|
|
13863
13883
|
for (var prop in b || (b = {}))
|
|
13864
|
-
if (__hasOwnProp$
|
|
13865
|
-
__defNormalProp$
|
|
13866
|
-
if (__getOwnPropSymbols$
|
|
13867
|
-
for (var prop of __getOwnPropSymbols$
|
|
13868
|
-
if (__propIsEnum$
|
|
13869
|
-
__defNormalProp$
|
|
13884
|
+
if (__hasOwnProp$T.call(b, prop))
|
|
13885
|
+
__defNormalProp$I(a, prop, b[prop]);
|
|
13886
|
+
if (__getOwnPropSymbols$T)
|
|
13887
|
+
for (var prop of __getOwnPropSymbols$T(b)) {
|
|
13888
|
+
if (__propIsEnum$T.call(b, prop))
|
|
13889
|
+
__defNormalProp$I(a, prop, b[prop]);
|
|
13870
13890
|
}
|
|
13871
13891
|
return a;
|
|
13872
13892
|
};
|
|
13873
|
-
var __spreadProps$
|
|
13893
|
+
var __spreadProps$C = (a, b) => __defProps$C(a, __getOwnPropDescs$C(b));
|
|
13874
13894
|
var __objRest$v = (source, exclude) => {
|
|
13875
13895
|
var target = {};
|
|
13876
13896
|
for (var prop in source)
|
|
13877
|
-
if (__hasOwnProp$
|
|
13897
|
+
if (__hasOwnProp$T.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
13878
13898
|
target[prop] = source[prop];
|
|
13879
|
-
if (source != null && __getOwnPropSymbols$
|
|
13880
|
-
for (var prop of __getOwnPropSymbols$
|
|
13881
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
13899
|
+
if (source != null && __getOwnPropSymbols$T)
|
|
13900
|
+
for (var prop of __getOwnPropSymbols$T(source)) {
|
|
13901
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$T.call(source, prop))
|
|
13882
13902
|
target[prop] = source[prop];
|
|
13883
13903
|
}
|
|
13884
13904
|
return target;
|
|
13885
13905
|
};
|
|
13886
|
-
var __async$
|
|
13906
|
+
var __async$11 = (__this, __arguments, generator) => {
|
|
13887
13907
|
return new Promise((resolve, reject) => {
|
|
13888
13908
|
var fulfilled = (value) => {
|
|
13889
13909
|
try {
|
|
@@ -13923,12 +13943,12 @@ class CarriersAPI {
|
|
|
13923
13943
|
/**
|
|
13924
13944
|
* The `connect` method connects a carrier account to a user's ShipEngine account.
|
|
13925
13945
|
*/
|
|
13926
|
-
this.connect = (_a) => __async$
|
|
13946
|
+
this.connect = (_a) => __async$11(this, null, function* () {
|
|
13927
13947
|
var _b = _a, { carrierCode } = _b, connection = __objRest$v(_b, ["carrierCode"]);
|
|
13928
13948
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
13929
13949
|
if (!endUserIpAddress)
|
|
13930
13950
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
13931
|
-
return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$
|
|
13951
|
+
return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$C(__spreadValues$I({}, connection), {
|
|
13932
13952
|
endUserIpAddress
|
|
13933
13953
|
}));
|
|
13934
13954
|
});
|
|
@@ -14014,22 +14034,22 @@ class CarriersAPI {
|
|
|
14014
14034
|
}
|
|
14015
14035
|
}
|
|
14016
14036
|
|
|
14017
|
-
var __getOwnPropSymbols$
|
|
14018
|
-
var __hasOwnProp$
|
|
14019
|
-
var __propIsEnum$
|
|
14037
|
+
var __getOwnPropSymbols$S = Object.getOwnPropertySymbols;
|
|
14038
|
+
var __hasOwnProp$S = Object.prototype.hasOwnProperty;
|
|
14039
|
+
var __propIsEnum$S = Object.prototype.propertyIsEnumerable;
|
|
14020
14040
|
var __objRest$u = (source, exclude) => {
|
|
14021
14041
|
var target = {};
|
|
14022
14042
|
for (var prop in source)
|
|
14023
|
-
if (__hasOwnProp$
|
|
14043
|
+
if (__hasOwnProp$S.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
14024
14044
|
target[prop] = source[prop];
|
|
14025
|
-
if (source != null && __getOwnPropSymbols$
|
|
14026
|
-
for (var prop of __getOwnPropSymbols$
|
|
14027
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
14045
|
+
if (source != null && __getOwnPropSymbols$S)
|
|
14046
|
+
for (var prop of __getOwnPropSymbols$S(source)) {
|
|
14047
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$S.call(source, prop))
|
|
14028
14048
|
target[prop] = source[prop];
|
|
14029
14049
|
}
|
|
14030
14050
|
return target;
|
|
14031
14051
|
};
|
|
14032
|
-
var __async
|
|
14052
|
+
var __async$10 = (__this, __arguments, generator) => {
|
|
14033
14053
|
return new Promise((resolve, reject) => {
|
|
14034
14054
|
var fulfilled = (value) => {
|
|
14035
14055
|
try {
|
|
@@ -14071,7 +14091,7 @@ class ConnectionsAPI {
|
|
|
14071
14091
|
/**
|
|
14072
14092
|
* The `connectCarrier` method connects a carrier to account.
|
|
14073
14093
|
*/
|
|
14074
|
-
this.connectCarrier = (carrierName, formData) => __async
|
|
14094
|
+
this.connectCarrier = (carrierName, formData) => __async$10(this, null, function* () {
|
|
14075
14095
|
return yield this.client.post(
|
|
14076
14096
|
`/v1/connections/carriers/${carrierName}`,
|
|
14077
14097
|
formData,
|
|
@@ -16239,23 +16259,23 @@ class CustomPackagesAPI {
|
|
|
16239
16259
|
}
|
|
16240
16260
|
}
|
|
16241
16261
|
|
|
16242
|
-
var __defProp$
|
|
16243
|
-
var __getOwnPropSymbols$
|
|
16244
|
-
var __hasOwnProp$
|
|
16245
|
-
var __propIsEnum$
|
|
16246
|
-
var __defNormalProp$
|
|
16247
|
-
var __spreadValues$
|
|
16262
|
+
var __defProp$H = Object.defineProperty;
|
|
16263
|
+
var __getOwnPropSymbols$R = Object.getOwnPropertySymbols;
|
|
16264
|
+
var __hasOwnProp$R = Object.prototype.hasOwnProperty;
|
|
16265
|
+
var __propIsEnum$R = Object.prototype.propertyIsEnumerable;
|
|
16266
|
+
var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16267
|
+
var __spreadValues$H = (a, b) => {
|
|
16248
16268
|
for (var prop in b || (b = {}))
|
|
16249
|
-
if (__hasOwnProp$
|
|
16250
|
-
__defNormalProp$
|
|
16251
|
-
if (__getOwnPropSymbols$
|
|
16252
|
-
for (var prop of __getOwnPropSymbols$
|
|
16253
|
-
if (__propIsEnum$
|
|
16254
|
-
__defNormalProp$
|
|
16269
|
+
if (__hasOwnProp$R.call(b, prop))
|
|
16270
|
+
__defNormalProp$H(a, prop, b[prop]);
|
|
16271
|
+
if (__getOwnPropSymbols$R)
|
|
16272
|
+
for (var prop of __getOwnPropSymbols$R(b)) {
|
|
16273
|
+
if (__propIsEnum$R.call(b, prop))
|
|
16274
|
+
__defNormalProp$H(a, prop, b[prop]);
|
|
16255
16275
|
}
|
|
16256
16276
|
return a;
|
|
16257
16277
|
};
|
|
16258
|
-
var __async
|
|
16278
|
+
var __async$$ = (__this, __arguments, generator) => {
|
|
16259
16279
|
return new Promise((resolve, reject) => {
|
|
16260
16280
|
var fulfilled = (value) => {
|
|
16261
16281
|
try {
|
|
@@ -16294,12 +16314,12 @@ class FundingSourcesAPI {
|
|
|
16294
16314
|
* The `create` method creates a new funding source for a given user. This requires
|
|
16295
16315
|
* payment information to be collected from the user.
|
|
16296
16316
|
*/
|
|
16297
|
-
this.create = (createFundingSource) => __async
|
|
16317
|
+
this.create = (createFundingSource) => __async$$(this, null, function* () {
|
|
16298
16318
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16299
16319
|
if (!endUserIpAddress) {
|
|
16300
16320
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
16301
16321
|
}
|
|
16302
|
-
return yield this.client.post("/v1/funding_sources", __spreadValues$
|
|
16322
|
+
return yield this.client.post("/v1/funding_sources", __spreadValues$H({
|
|
16303
16323
|
endUserIpAddress
|
|
16304
16324
|
}, createFundingSource));
|
|
16305
16325
|
});
|
|
@@ -16308,7 +16328,7 @@ class FundingSourcesAPI {
|
|
|
16308
16328
|
* user to update the billing address or payment information associated with the
|
|
16309
16329
|
* funding source.
|
|
16310
16330
|
*/
|
|
16311
|
-
this.update = (billingInfo, creditCardInfo, auctanePayInfo, fundingSourceId) => __async
|
|
16331
|
+
this.update = (billingInfo, creditCardInfo, auctanePayInfo, fundingSourceId) => __async$$(this, null, function* () {
|
|
16312
16332
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16313
16333
|
if (!endUserIpAddress) {
|
|
16314
16334
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
@@ -16318,7 +16338,7 @@ class FundingSourcesAPI {
|
|
|
16318
16338
|
{
|
|
16319
16339
|
billingInfo,
|
|
16320
16340
|
endUserIpAddress,
|
|
16321
|
-
paymentMethod: __spreadValues$
|
|
16341
|
+
paymentMethod: __spreadValues$H({
|
|
16322
16342
|
creditCardInfo
|
|
16323
16343
|
}, auctanePayInfo)
|
|
16324
16344
|
}
|
|
@@ -16328,19 +16348,19 @@ class FundingSourcesAPI {
|
|
|
16328
16348
|
* The `registerCarrier` method registers a carrier account and associates
|
|
16329
16349
|
* it with a given funding source.
|
|
16330
16350
|
*/
|
|
16331
|
-
this.registerCarrier = (carrier) => __async
|
|
16351
|
+
this.registerCarrier = (carrier) => __async$$(this, null, function* () {
|
|
16332
16352
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16333
16353
|
if (!endUserIpAddress) {
|
|
16334
16354
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
16335
16355
|
}
|
|
16336
|
-
return yield this.client.post("/v1/registration/funding_source", __spreadValues$
|
|
16356
|
+
return yield this.client.post("/v1/registration/funding_source", __spreadValues$H({
|
|
16337
16357
|
endUserIpAddress
|
|
16338
16358
|
}, carrier));
|
|
16339
16359
|
});
|
|
16340
16360
|
/**
|
|
16341
16361
|
* The `addFunds` method allows you to add funds to a funding source.
|
|
16342
16362
|
*/
|
|
16343
|
-
this.addFunds = (amount, fundingSourceId) => __async
|
|
16363
|
+
this.addFunds = (amount, fundingSourceId) => __async$$(this, null, function* () {
|
|
16344
16364
|
return yield this.client.put(
|
|
16345
16365
|
`/v1/funding_sources/${fundingSourceId}/add_funds`,
|
|
16346
16366
|
amount
|
|
@@ -16350,7 +16370,7 @@ class FundingSourcesAPI {
|
|
|
16350
16370
|
* The `metadata` method returns seller-specific requirements for creating funding sources
|
|
16351
16371
|
* and attaching carriers
|
|
16352
16372
|
*/
|
|
16353
|
-
this.metadata = () => __async
|
|
16373
|
+
this.metadata = () => __async$$(this, null, function* () {
|
|
16354
16374
|
return yield this.client.get("/v1/funding_sources/metadata");
|
|
16355
16375
|
});
|
|
16356
16376
|
/**
|
|
@@ -16402,7 +16422,7 @@ class InsuranceAPI {
|
|
|
16402
16422
|
}
|
|
16403
16423
|
}
|
|
16404
16424
|
|
|
16405
|
-
var __async$
|
|
16425
|
+
var __async$_ = (__this, __arguments, generator) => {
|
|
16406
16426
|
return new Promise((resolve, reject) => {
|
|
16407
16427
|
var fulfilled = (value) => {
|
|
16408
16428
|
try {
|
|
@@ -16434,13 +16454,13 @@ class InvoiceAddressAPI {
|
|
|
16434
16454
|
/**
|
|
16435
16455
|
* The `create` method creates a new invoice address for a given user.
|
|
16436
16456
|
*/
|
|
16437
|
-
this.create = (invoiceAddress) => __async$
|
|
16457
|
+
this.create = (invoiceAddress) => __async$_(this, null, function* () {
|
|
16438
16458
|
return yield this.client.post("/v1/invoice_address", invoiceAddress);
|
|
16439
16459
|
});
|
|
16440
16460
|
/**
|
|
16441
16461
|
* The `update` method updates a invoice address for a given user.
|
|
16442
16462
|
*/
|
|
16443
|
-
this.update = (invoiceAddress) => __async$
|
|
16463
|
+
this.update = (invoiceAddress) => __async$_(this, null, function* () {
|
|
16444
16464
|
return yield this.client.put("/v1/invoice_address", invoiceAddress);
|
|
16445
16465
|
});
|
|
16446
16466
|
this.client = client;
|
|
@@ -16502,17 +16522,17 @@ class LabelsAPI {
|
|
|
16502
16522
|
}
|
|
16503
16523
|
}
|
|
16504
16524
|
|
|
16505
|
-
var __getOwnPropSymbols$
|
|
16506
|
-
var __hasOwnProp$
|
|
16507
|
-
var __propIsEnum$
|
|
16525
|
+
var __getOwnPropSymbols$Q = Object.getOwnPropertySymbols;
|
|
16526
|
+
var __hasOwnProp$Q = Object.prototype.hasOwnProperty;
|
|
16527
|
+
var __propIsEnum$Q = Object.prototype.propertyIsEnumerable;
|
|
16508
16528
|
var __objRest$t = (source, exclude) => {
|
|
16509
16529
|
var target = {};
|
|
16510
16530
|
for (var prop in source)
|
|
16511
|
-
if (__hasOwnProp$
|
|
16531
|
+
if (__hasOwnProp$Q.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
16512
16532
|
target[prop] = source[prop];
|
|
16513
|
-
if (source != null && __getOwnPropSymbols$
|
|
16514
|
-
for (var prop of __getOwnPropSymbols$
|
|
16515
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
16533
|
+
if (source != null && __getOwnPropSymbols$Q)
|
|
16534
|
+
for (var prop of __getOwnPropSymbols$Q(source)) {
|
|
16535
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$Q.call(source, prop))
|
|
16516
16536
|
target[prop] = source[prop];
|
|
16517
16537
|
}
|
|
16518
16538
|
return target;
|
|
@@ -16633,19 +16653,19 @@ class RateCardsAPI {
|
|
|
16633
16653
|
}
|
|
16634
16654
|
}
|
|
16635
16655
|
|
|
16636
|
-
var __defProp$
|
|
16637
|
-
var __getOwnPropSymbols$
|
|
16638
|
-
var __hasOwnProp$
|
|
16639
|
-
var __propIsEnum$
|
|
16640
|
-
var __defNormalProp$
|
|
16641
|
-
var __spreadValues$
|
|
16656
|
+
var __defProp$G = Object.defineProperty;
|
|
16657
|
+
var __getOwnPropSymbols$P = Object.getOwnPropertySymbols;
|
|
16658
|
+
var __hasOwnProp$P = Object.prototype.hasOwnProperty;
|
|
16659
|
+
var __propIsEnum$P = Object.prototype.propertyIsEnumerable;
|
|
16660
|
+
var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16661
|
+
var __spreadValues$G = (a, b) => {
|
|
16642
16662
|
for (var prop in b || (b = {}))
|
|
16643
|
-
if (__hasOwnProp$
|
|
16644
|
-
__defNormalProp$
|
|
16645
|
-
if (__getOwnPropSymbols$
|
|
16646
|
-
for (var prop of __getOwnPropSymbols$
|
|
16647
|
-
if (__propIsEnum$
|
|
16648
|
-
__defNormalProp$
|
|
16663
|
+
if (__hasOwnProp$P.call(b, prop))
|
|
16664
|
+
__defNormalProp$G(a, prop, b[prop]);
|
|
16665
|
+
if (__getOwnPropSymbols$P)
|
|
16666
|
+
for (var prop of __getOwnPropSymbols$P(b)) {
|
|
16667
|
+
if (__propIsEnum$P.call(b, prop))
|
|
16668
|
+
__defNormalProp$G(a, prop, b[prop]);
|
|
16649
16669
|
}
|
|
16650
16670
|
return a;
|
|
16651
16671
|
};
|
|
@@ -16667,7 +16687,7 @@ class RatesAPI {
|
|
|
16667
16687
|
* method.
|
|
16668
16688
|
*/
|
|
16669
16689
|
this.estimate = (params) => {
|
|
16670
|
-
return this.client.post("/v1/rates/estimate", __spreadValues$
|
|
16690
|
+
return this.client.post("/v1/rates/estimate", __spreadValues$G({}, params));
|
|
16671
16691
|
};
|
|
16672
16692
|
this.client = client;
|
|
16673
16693
|
}
|
|
@@ -16747,7 +16767,7 @@ class SalesOrdersAPI {
|
|
|
16747
16767
|
}
|
|
16748
16768
|
}
|
|
16749
16769
|
|
|
16750
|
-
var __async$
|
|
16770
|
+
var __async$Z = (__this, __arguments, generator) => {
|
|
16751
16771
|
return new Promise((resolve, reject) => {
|
|
16752
16772
|
var fulfilled = (value) => {
|
|
16753
16773
|
try {
|
|
@@ -16805,7 +16825,7 @@ class SellersAPI {
|
|
|
16805
16825
|
/**
|
|
16806
16826
|
* Deletes an API Key
|
|
16807
16827
|
*/
|
|
16808
|
-
this.deleteSellerApiKey = (_0) => __async$
|
|
16828
|
+
this.deleteSellerApiKey = (_0) => __async$Z(this, [_0], function* ({
|
|
16809
16829
|
encryptedApiKey,
|
|
16810
16830
|
sellerId,
|
|
16811
16831
|
isSandbox
|
|
@@ -16851,19 +16871,19 @@ class SellersAPI {
|
|
|
16851
16871
|
}
|
|
16852
16872
|
}
|
|
16853
16873
|
|
|
16854
|
-
var __defProp$
|
|
16855
|
-
var __getOwnPropSymbols$
|
|
16856
|
-
var __hasOwnProp$
|
|
16857
|
-
var __propIsEnum$
|
|
16858
|
-
var __defNormalProp$
|
|
16859
|
-
var __spreadValues$
|
|
16874
|
+
var __defProp$F = Object.defineProperty;
|
|
16875
|
+
var __getOwnPropSymbols$O = Object.getOwnPropertySymbols;
|
|
16876
|
+
var __hasOwnProp$O = Object.prototype.hasOwnProperty;
|
|
16877
|
+
var __propIsEnum$O = Object.prototype.propertyIsEnumerable;
|
|
16878
|
+
var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16879
|
+
var __spreadValues$F = (a, b) => {
|
|
16860
16880
|
for (var prop in b || (b = {}))
|
|
16861
|
-
if (__hasOwnProp$
|
|
16862
|
-
__defNormalProp$
|
|
16863
|
-
if (__getOwnPropSymbols$
|
|
16864
|
-
for (var prop of __getOwnPropSymbols$
|
|
16865
|
-
if (__propIsEnum$
|
|
16866
|
-
__defNormalProp$
|
|
16881
|
+
if (__hasOwnProp$O.call(b, prop))
|
|
16882
|
+
__defNormalProp$F(a, prop, b[prop]);
|
|
16883
|
+
if (__getOwnPropSymbols$O)
|
|
16884
|
+
for (var prop of __getOwnPropSymbols$O(b)) {
|
|
16885
|
+
if (__propIsEnum$O.call(b, prop))
|
|
16886
|
+
__defNormalProp$F(a, prop, b[prop]);
|
|
16867
16887
|
}
|
|
16868
16888
|
return a;
|
|
16869
16889
|
};
|
|
@@ -16875,7 +16895,7 @@ class ServicePointsAPI {
|
|
|
16875
16895
|
* Either an address, coordinates, or an address query
|
|
16876
16896
|
*/
|
|
16877
16897
|
this.list = (options) => {
|
|
16878
|
-
return this.client.post("/v1/service_points/list", __spreadValues$
|
|
16898
|
+
return this.client.post("/v1/service_points/list", __spreadValues$F({}, options));
|
|
16879
16899
|
};
|
|
16880
16900
|
/**
|
|
16881
16901
|
* Get a specific service point by its carrier code, country code, and id
|
|
@@ -16893,7 +16913,7 @@ class ServicePointsAPI {
|
|
|
16893
16913
|
}
|
|
16894
16914
|
}
|
|
16895
16915
|
|
|
16896
|
-
var __async$
|
|
16916
|
+
var __async$Y = (__this, __arguments, generator) => {
|
|
16897
16917
|
return new Promise((resolve, reject) => {
|
|
16898
16918
|
var fulfilled = (value) => {
|
|
16899
16919
|
try {
|
|
@@ -16942,7 +16962,7 @@ class ShipmentsAPI {
|
|
|
16942
16962
|
* The `create` method allows for creating shipments based on a list of shipment
|
|
16943
16963
|
* items passed into this method.
|
|
16944
16964
|
*/
|
|
16945
|
-
this.create = (...shipments) => __async$
|
|
16965
|
+
this.create = (...shipments) => __async$Y(this, null, function* () {
|
|
16946
16966
|
return this.client.post("/v1/shipments", {
|
|
16947
16967
|
shipments
|
|
16948
16968
|
});
|
|
@@ -34359,38 +34379,38 @@ class WebhooksAPI {
|
|
|
34359
34379
|
}
|
|
34360
34380
|
}
|
|
34361
34381
|
|
|
34362
|
-
var __defProp$
|
|
34363
|
-
var __defProps$
|
|
34364
|
-
var __getOwnPropDescs$
|
|
34365
|
-
var __getOwnPropSymbols$
|
|
34366
|
-
var __hasOwnProp$
|
|
34367
|
-
var __propIsEnum$
|
|
34368
|
-
var __defNormalProp$
|
|
34369
|
-
var __spreadValues$
|
|
34382
|
+
var __defProp$E = Object.defineProperty;
|
|
34383
|
+
var __defProps$B = Object.defineProperties;
|
|
34384
|
+
var __getOwnPropDescs$B = Object.getOwnPropertyDescriptors;
|
|
34385
|
+
var __getOwnPropSymbols$N = Object.getOwnPropertySymbols;
|
|
34386
|
+
var __hasOwnProp$N = Object.prototype.hasOwnProperty;
|
|
34387
|
+
var __propIsEnum$N = Object.prototype.propertyIsEnumerable;
|
|
34388
|
+
var __defNormalProp$E = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
34389
|
+
var __spreadValues$E = (a, b) => {
|
|
34370
34390
|
for (var prop in b || (b = {}))
|
|
34371
|
-
if (__hasOwnProp$
|
|
34372
|
-
__defNormalProp$
|
|
34373
|
-
if (__getOwnPropSymbols$
|
|
34374
|
-
for (var prop of __getOwnPropSymbols$
|
|
34375
|
-
if (__propIsEnum$
|
|
34376
|
-
__defNormalProp$
|
|
34391
|
+
if (__hasOwnProp$N.call(b, prop))
|
|
34392
|
+
__defNormalProp$E(a, prop, b[prop]);
|
|
34393
|
+
if (__getOwnPropSymbols$N)
|
|
34394
|
+
for (var prop of __getOwnPropSymbols$N(b)) {
|
|
34395
|
+
if (__propIsEnum$N.call(b, prop))
|
|
34396
|
+
__defNormalProp$E(a, prop, b[prop]);
|
|
34377
34397
|
}
|
|
34378
34398
|
return a;
|
|
34379
34399
|
};
|
|
34380
|
-
var __spreadProps$
|
|
34400
|
+
var __spreadProps$B = (a, b) => __defProps$B(a, __getOwnPropDescs$B(b));
|
|
34381
34401
|
var __objRest$s = (source, exclude) => {
|
|
34382
34402
|
var target = {};
|
|
34383
34403
|
for (var prop in source)
|
|
34384
|
-
if (__hasOwnProp$
|
|
34404
|
+
if (__hasOwnProp$N.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
34385
34405
|
target[prop] = source[prop];
|
|
34386
|
-
if (source != null && __getOwnPropSymbols$
|
|
34387
|
-
for (var prop of __getOwnPropSymbols$
|
|
34388
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
34406
|
+
if (source != null && __getOwnPropSymbols$N)
|
|
34407
|
+
for (var prop of __getOwnPropSymbols$N(source)) {
|
|
34408
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$N.call(source, prop))
|
|
34389
34409
|
target[prop] = source[prop];
|
|
34390
34410
|
}
|
|
34391
34411
|
return target;
|
|
34392
34412
|
};
|
|
34393
|
-
var __async$
|
|
34413
|
+
var __async$X = (__this, __arguments, generator) => {
|
|
34394
34414
|
return new Promise((resolve, reject) => {
|
|
34395
34415
|
var fulfilled = (value) => {
|
|
34396
34416
|
try {
|
|
@@ -34413,7 +34433,7 @@ var __async$W = (__this, __arguments, generator) => {
|
|
|
34413
34433
|
const logger$1 = E({
|
|
34414
34434
|
level: process.env.NODE_ENV === "production" ? "fatal" : "info",
|
|
34415
34435
|
name: "shipengine-api",
|
|
34416
|
-
serializers: __spreadProps$
|
|
34436
|
+
serializers: __spreadProps$B(__spreadValues$E({}, k), {
|
|
34417
34437
|
req: (req) => ({
|
|
34418
34438
|
headers: req.headers,
|
|
34419
34439
|
method: req.method,
|
|
@@ -34438,7 +34458,7 @@ class ShipEngineAPI {
|
|
|
34438
34458
|
this.getSandboxToken = getSandboxToken;
|
|
34439
34459
|
const client = axios.create({
|
|
34440
34460
|
baseURL,
|
|
34441
|
-
headers: __spreadProps$
|
|
34461
|
+
headers: __spreadProps$B(__spreadValues$E({}, headers), {
|
|
34442
34462
|
"Content-Type": "application/json"
|
|
34443
34463
|
}),
|
|
34444
34464
|
paramsSerializer: (params) => lib.stringify(decamelizeKeys(params), { arrayFormat: "brackets" }),
|
|
@@ -34478,7 +34498,7 @@ class ShipEngineAPI {
|
|
|
34478
34498
|
});
|
|
34479
34499
|
client.defaults.headers.common["Authorization"] = `Bearer ${token}`;
|
|
34480
34500
|
client.interceptors.request.use(
|
|
34481
|
-
(config) => __async$
|
|
34501
|
+
(config) => __async$X(this, null, function* () {
|
|
34482
34502
|
if (config.isSandbox) {
|
|
34483
34503
|
if (!this.sandboxToken) {
|
|
34484
34504
|
this.sandboxToken = yield getSandboxToken == null ? void 0 : getSandboxToken();
|
|
@@ -34505,7 +34525,7 @@ class ShipEngineAPI {
|
|
|
34505
34525
|
);
|
|
34506
34526
|
return res;
|
|
34507
34527
|
},
|
|
34508
|
-
(err) => __async$
|
|
34528
|
+
(err) => __async$X(this, null, function* () {
|
|
34509
34529
|
var _a, _b, _c, _d, _e;
|
|
34510
34530
|
logger$1.error(
|
|
34511
34531
|
{ err, req: err.config, res: err.response },
|
|
@@ -34552,7 +34572,7 @@ class ShipEngineAPI {
|
|
|
34552
34572
|
* that token (also known as Seller ID)
|
|
34553
34573
|
*/
|
|
34554
34574
|
getTenant(isSandbox) {
|
|
34555
|
-
return __async$
|
|
34575
|
+
return __async$X(this, null, function* () {
|
|
34556
34576
|
var _a;
|
|
34557
34577
|
if (!isSandbox) {
|
|
34558
34578
|
return this.getTenantFromToken(this.token);
|
|
@@ -34855,25 +34875,25 @@ const delay = (ms) => new Promise((resolve) => {
|
|
|
34855
34875
|
|
|
34856
34876
|
const onError = (_errors) => _default();
|
|
34857
34877
|
|
|
34858
|
-
var __defProp$
|
|
34859
|
-
var __defProps$
|
|
34860
|
-
var __getOwnPropDescs$
|
|
34861
|
-
var __getOwnPropSymbols$
|
|
34862
|
-
var __hasOwnProp$
|
|
34863
|
-
var __propIsEnum$
|
|
34864
|
-
var __defNormalProp$
|
|
34865
|
-
var __spreadValues$
|
|
34878
|
+
var __defProp$D = Object.defineProperty;
|
|
34879
|
+
var __defProps$A = Object.defineProperties;
|
|
34880
|
+
var __getOwnPropDescs$A = Object.getOwnPropertyDescriptors;
|
|
34881
|
+
var __getOwnPropSymbols$M = Object.getOwnPropertySymbols;
|
|
34882
|
+
var __hasOwnProp$M = Object.prototype.hasOwnProperty;
|
|
34883
|
+
var __propIsEnum$M = Object.prototype.propertyIsEnumerable;
|
|
34884
|
+
var __defNormalProp$D = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
34885
|
+
var __spreadValues$D = (a, b) => {
|
|
34866
34886
|
for (var prop in b || (b = {}))
|
|
34867
|
-
if (__hasOwnProp$
|
|
34868
|
-
__defNormalProp$
|
|
34869
|
-
if (__getOwnPropSymbols$
|
|
34870
|
-
for (var prop of __getOwnPropSymbols$
|
|
34871
|
-
if (__propIsEnum$
|
|
34872
|
-
__defNormalProp$
|
|
34887
|
+
if (__hasOwnProp$M.call(b, prop))
|
|
34888
|
+
__defNormalProp$D(a, prop, b[prop]);
|
|
34889
|
+
if (__getOwnPropSymbols$M)
|
|
34890
|
+
for (var prop of __getOwnPropSymbols$M(b)) {
|
|
34891
|
+
if (__propIsEnum$M.call(b, prop))
|
|
34892
|
+
__defNormalProp$D(a, prop, b[prop]);
|
|
34873
34893
|
}
|
|
34874
34894
|
return a;
|
|
34875
34895
|
};
|
|
34876
|
-
var __spreadProps$
|
|
34896
|
+
var __spreadProps$A = (a, b) => __defProps$A(a, __getOwnPropDescs$A(b));
|
|
34877
34897
|
const streams = [];
|
|
34878
34898
|
if (process.env.NODE_ENV === "production") {
|
|
34879
34899
|
streams.push({
|
|
@@ -34882,7 +34902,7 @@ if (process.env.NODE_ENV === "production") {
|
|
|
34882
34902
|
}
|
|
34883
34903
|
const logger = E({
|
|
34884
34904
|
name: "shipengine",
|
|
34885
|
-
serializers: __spreadProps$
|
|
34905
|
+
serializers: __spreadProps$A(__spreadValues$D({}, k), {
|
|
34886
34906
|
req: (req) => ({
|
|
34887
34907
|
headers: req.headers,
|
|
34888
34908
|
method: req.method,
|
|
@@ -34907,7 +34927,7 @@ const retryUntil = (callbackFn, retries = 10, timeoutBetweenAttempts = 1e3) => P
|
|
|
34907
34927
|
throw error;
|
|
34908
34928
|
});
|
|
34909
34929
|
|
|
34910
|
-
var __async$
|
|
34930
|
+
var __async$W = (__this, __arguments, generator) => {
|
|
34911
34931
|
return new Promise((resolve, reject) => {
|
|
34912
34932
|
var fulfilled = (value) => {
|
|
34913
34933
|
try {
|
|
@@ -34930,7 +34950,7 @@ var __async$V = (__this, __arguments, generator) => {
|
|
|
34930
34950
|
const useCreateAccountImage = () => {
|
|
34931
34951
|
const { client } = useShipEngine();
|
|
34932
34952
|
return reactQuery.useMutation({
|
|
34933
|
-
mutationFn: (data) => __async$
|
|
34953
|
+
mutationFn: (data) => __async$W(void 0, null, function* () {
|
|
34934
34954
|
const result = yield client.accountSettings.createImage(data);
|
|
34935
34955
|
return result.data;
|
|
34936
34956
|
}),
|
|
@@ -34939,7 +34959,7 @@ const useCreateAccountImage = () => {
|
|
|
34939
34959
|
});
|
|
34940
34960
|
};
|
|
34941
34961
|
|
|
34942
|
-
var __async$
|
|
34962
|
+
var __async$V = (__this, __arguments, generator) => {
|
|
34943
34963
|
return new Promise((resolve, reject) => {
|
|
34944
34964
|
var fulfilled = (value) => {
|
|
34945
34965
|
try {
|
|
@@ -34962,7 +34982,7 @@ var __async$U = (__this, __arguments, generator) => {
|
|
|
34962
34982
|
const useDeleteAccountImage = () => {
|
|
34963
34983
|
const { client } = useShipEngine();
|
|
34964
34984
|
return reactQuery.useMutation({
|
|
34965
|
-
mutationFn: (labelImageId) => __async$
|
|
34985
|
+
mutationFn: (labelImageId) => __async$V(void 0, null, function* () {
|
|
34966
34986
|
const result = yield client.accountSettings.deleteImage(labelImageId);
|
|
34967
34987
|
return result.data;
|
|
34968
34988
|
}),
|
|
@@ -34991,7 +35011,7 @@ const useGetAccountSettings = () => {
|
|
|
34991
35011
|
});
|
|
34992
35012
|
};
|
|
34993
35013
|
|
|
34994
|
-
var __async$
|
|
35014
|
+
var __async$U = (__this, __arguments, generator) => {
|
|
34995
35015
|
return new Promise((resolve, reject) => {
|
|
34996
35016
|
var fulfilled = (value) => {
|
|
34997
35017
|
try {
|
|
@@ -35014,7 +35034,7 @@ var __async$T = (__this, __arguments, generator) => {
|
|
|
35014
35034
|
const useUpdateAccountImage = () => {
|
|
35015
35035
|
const { client } = useShipEngine();
|
|
35016
35036
|
return reactQuery.useMutation({
|
|
35017
|
-
mutationFn: (data) => __async$
|
|
35037
|
+
mutationFn: (data) => __async$U(void 0, null, function* () {
|
|
35018
35038
|
const result = yield client.accountSettings.updateImage(data);
|
|
35019
35039
|
return result.data;
|
|
35020
35040
|
}),
|
|
@@ -35023,7 +35043,7 @@ const useUpdateAccountImage = () => {
|
|
|
35023
35043
|
});
|
|
35024
35044
|
};
|
|
35025
35045
|
|
|
35026
|
-
var __async$
|
|
35046
|
+
var __async$T = (__this, __arguments, generator) => {
|
|
35027
35047
|
return new Promise((resolve, reject) => {
|
|
35028
35048
|
var fulfilled = (value) => {
|
|
35029
35049
|
try {
|
|
@@ -35046,7 +35066,7 @@ var __async$S = (__this, __arguments, generator) => {
|
|
|
35046
35066
|
const useUpdateAccountSettings = () => {
|
|
35047
35067
|
const { client } = useShipEngine();
|
|
35048
35068
|
return reactQuery.useMutation({
|
|
35049
|
-
mutationFn: (settings) => __async$
|
|
35069
|
+
mutationFn: (settings) => __async$T(void 0, null, function* () {
|
|
35050
35070
|
const result = yield client.accountSettings.update(settings);
|
|
35051
35071
|
return result.data;
|
|
35052
35072
|
}),
|
|
@@ -35055,7 +35075,7 @@ const useUpdateAccountSettings = () => {
|
|
|
35055
35075
|
});
|
|
35056
35076
|
};
|
|
35057
35077
|
|
|
35058
|
-
var __async$
|
|
35078
|
+
var __async$S = (__this, __arguments, generator) => {
|
|
35059
35079
|
return new Promise((resolve, reject) => {
|
|
35060
35080
|
var fulfilled = (value) => {
|
|
35061
35081
|
try {
|
|
@@ -35078,7 +35098,7 @@ var __async$R = (__this, __arguments, generator) => {
|
|
|
35078
35098
|
const useParseAddress = () => {
|
|
35079
35099
|
const { client } = useShipEngine();
|
|
35080
35100
|
return reactQuery.useMutation({
|
|
35081
|
-
mutationFn: (_0) => __async$
|
|
35101
|
+
mutationFn: (_0) => __async$S(void 0, [_0], function* ({ address, text }) {
|
|
35082
35102
|
const result = yield client.addresses.parse(text, address);
|
|
35083
35103
|
return result.data;
|
|
35084
35104
|
}),
|
|
@@ -35087,7 +35107,7 @@ const useParseAddress = () => {
|
|
|
35087
35107
|
});
|
|
35088
35108
|
};
|
|
35089
35109
|
|
|
35090
|
-
var __async$
|
|
35110
|
+
var __async$R = (__this, __arguments, generator) => {
|
|
35091
35111
|
return new Promise((resolve, reject) => {
|
|
35092
35112
|
var fulfilled = (value) => {
|
|
35093
35113
|
try {
|
|
@@ -35110,7 +35130,7 @@ var __async$Q = (__this, __arguments, generator) => {
|
|
|
35110
35130
|
const useValidateAddresses = () => {
|
|
35111
35131
|
const { client } = useShipEngine();
|
|
35112
35132
|
return reactQuery.useMutation({
|
|
35113
|
-
mutationFn: (addresses) => __async$
|
|
35133
|
+
mutationFn: (addresses) => __async$R(void 0, null, function* () {
|
|
35114
35134
|
const result = yield client.addresses.validate(addresses);
|
|
35115
35135
|
return result.data;
|
|
35116
35136
|
}),
|
|
@@ -35119,26 +35139,26 @@ const useValidateAddresses = () => {
|
|
|
35119
35139
|
});
|
|
35120
35140
|
};
|
|
35121
35141
|
|
|
35122
|
-
var __defProp$
|
|
35123
|
-
var __defProps$
|
|
35124
|
-
var __getOwnPropDescs$
|
|
35125
|
-
var __getOwnPropSymbols$
|
|
35126
|
-
var __hasOwnProp$
|
|
35127
|
-
var __propIsEnum$
|
|
35128
|
-
var __defNormalProp$
|
|
35129
|
-
var __spreadValues$
|
|
35142
|
+
var __defProp$C = Object.defineProperty;
|
|
35143
|
+
var __defProps$z = Object.defineProperties;
|
|
35144
|
+
var __getOwnPropDescs$z = Object.getOwnPropertyDescriptors;
|
|
35145
|
+
var __getOwnPropSymbols$L = Object.getOwnPropertySymbols;
|
|
35146
|
+
var __hasOwnProp$L = Object.prototype.hasOwnProperty;
|
|
35147
|
+
var __propIsEnum$L = Object.prototype.propertyIsEnumerable;
|
|
35148
|
+
var __defNormalProp$C = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
35149
|
+
var __spreadValues$C = (a, b) => {
|
|
35130
35150
|
for (var prop in b || (b = {}))
|
|
35131
|
-
if (__hasOwnProp$
|
|
35132
|
-
__defNormalProp$
|
|
35133
|
-
if (__getOwnPropSymbols$
|
|
35134
|
-
for (var prop of __getOwnPropSymbols$
|
|
35135
|
-
if (__propIsEnum$
|
|
35136
|
-
__defNormalProp$
|
|
35151
|
+
if (__hasOwnProp$L.call(b, prop))
|
|
35152
|
+
__defNormalProp$C(a, prop, b[prop]);
|
|
35153
|
+
if (__getOwnPropSymbols$L)
|
|
35154
|
+
for (var prop of __getOwnPropSymbols$L(b)) {
|
|
35155
|
+
if (__propIsEnum$L.call(b, prop))
|
|
35156
|
+
__defNormalProp$C(a, prop, b[prop]);
|
|
35137
35157
|
}
|
|
35138
35158
|
return a;
|
|
35139
35159
|
};
|
|
35140
|
-
var __spreadProps$
|
|
35141
|
-
var __async$
|
|
35160
|
+
var __spreadProps$z = (a, b) => __defProps$z(a, __getOwnPropDescs$z(b));
|
|
35161
|
+
var __async$Q = (__this, __arguments, generator) => {
|
|
35142
35162
|
return new Promise((resolve, reject) => {
|
|
35143
35163
|
var fulfilled = (value) => {
|
|
35144
35164
|
try {
|
|
@@ -35160,8 +35180,8 @@ var __async$P = (__this, __arguments, generator) => {
|
|
|
35160
35180
|
};
|
|
35161
35181
|
const useCreateAuctanePaySession = (params) => {
|
|
35162
35182
|
const { client } = useShipEngine();
|
|
35163
|
-
return reactQuery.useMutation(__spreadProps$
|
|
35164
|
-
mutationFn: (request) => __async$
|
|
35183
|
+
return reactQuery.useMutation(__spreadProps$z(__spreadValues$C({}, params), {
|
|
35184
|
+
mutationFn: (request) => __async$Q(void 0, null, function* () {
|
|
35165
35185
|
const result = yield client.auctanePay.createSession(request);
|
|
35166
35186
|
return result.data;
|
|
35167
35187
|
}),
|
|
@@ -35170,6 +35190,36 @@ const useCreateAuctanePaySession = (params) => {
|
|
|
35170
35190
|
}));
|
|
35171
35191
|
};
|
|
35172
35192
|
|
|
35193
|
+
var __defProp$B = Object.defineProperty;
|
|
35194
|
+
var __defProps$y = Object.defineProperties;
|
|
35195
|
+
var __getOwnPropDescs$y = Object.getOwnPropertyDescriptors;
|
|
35196
|
+
var __getOwnPropSymbols$K = Object.getOwnPropertySymbols;
|
|
35197
|
+
var __hasOwnProp$K = Object.prototype.hasOwnProperty;
|
|
35198
|
+
var __propIsEnum$K = Object.prototype.propertyIsEnumerable;
|
|
35199
|
+
var __defNormalProp$B = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
35200
|
+
var __spreadValues$B = (a, b) => {
|
|
35201
|
+
for (var prop in b || (b = {}))
|
|
35202
|
+
if (__hasOwnProp$K.call(b, prop))
|
|
35203
|
+
__defNormalProp$B(a, prop, b[prop]);
|
|
35204
|
+
if (__getOwnPropSymbols$K)
|
|
35205
|
+
for (var prop of __getOwnPropSymbols$K(b)) {
|
|
35206
|
+
if (__propIsEnum$K.call(b, prop))
|
|
35207
|
+
__defNormalProp$B(a, prop, b[prop]);
|
|
35208
|
+
}
|
|
35209
|
+
return a;
|
|
35210
|
+
};
|
|
35211
|
+
var __spreadProps$y = (a, b) => __defProps$y(a, __getOwnPropDescs$y(b));
|
|
35212
|
+
const useGetAuctanePayConfig = (params) => {
|
|
35213
|
+
const { client } = useShipEngine();
|
|
35214
|
+
const queryParams = __spreadValues$B({}, params);
|
|
35215
|
+
return reactQuery.useQuery(__spreadProps$y(__spreadValues$B({}, queryParams), {
|
|
35216
|
+
onError,
|
|
35217
|
+
queryFn: () => client.auctanePay.getConfig(),
|
|
35218
|
+
queryKey: ["useGetAuctanePayConfig"],
|
|
35219
|
+
select: (result) => result.data
|
|
35220
|
+
}));
|
|
35221
|
+
};
|
|
35222
|
+
|
|
35173
35223
|
var __defProp$A = Object.defineProperty;
|
|
35174
35224
|
var __defProps$x = Object.defineProperties;
|
|
35175
35225
|
var __getOwnPropDescs$x = Object.getOwnPropertyDescriptors;
|
|
@@ -35189,14 +35239,39 @@ var __spreadValues$A = (a, b) => {
|
|
|
35189
35239
|
return a;
|
|
35190
35240
|
};
|
|
35191
35241
|
var __spreadProps$x = (a, b) => __defProps$x(a, __getOwnPropDescs$x(b));
|
|
35192
|
-
|
|
35242
|
+
var __async$P = (__this, __arguments, generator) => {
|
|
35243
|
+
return new Promise((resolve, reject) => {
|
|
35244
|
+
var fulfilled = (value) => {
|
|
35245
|
+
try {
|
|
35246
|
+
step(generator.next(value));
|
|
35247
|
+
} catch (e) {
|
|
35248
|
+
reject(e);
|
|
35249
|
+
}
|
|
35250
|
+
};
|
|
35251
|
+
var rejected = (value) => {
|
|
35252
|
+
try {
|
|
35253
|
+
step(generator.throw(value));
|
|
35254
|
+
} catch (e) {
|
|
35255
|
+
reject(e);
|
|
35256
|
+
}
|
|
35257
|
+
};
|
|
35258
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
35259
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
35260
|
+
});
|
|
35261
|
+
};
|
|
35262
|
+
const usePreviewTransaction = (params) => {
|
|
35193
35263
|
const { client } = useShipEngine();
|
|
35194
|
-
|
|
35195
|
-
|
|
35196
|
-
|
|
35197
|
-
|
|
35198
|
-
|
|
35199
|
-
|
|
35264
|
+
return reactQuery.useMutation(__spreadProps$x(__spreadValues$A({}, params), {
|
|
35265
|
+
mutationFn: (_0) => __async$P(void 0, [_0], function* ({ amount, transactionCategory = "add_funds" }) {
|
|
35266
|
+
const request = {
|
|
35267
|
+
amount,
|
|
35268
|
+
transactionCategory
|
|
35269
|
+
};
|
|
35270
|
+
const result = yield client.auctanePay.previewTransaction(request);
|
|
35271
|
+
return result.data;
|
|
35272
|
+
}),
|
|
35273
|
+
mutationKey: ["usePreviewTransaction"],
|
|
35274
|
+
onError
|
|
35200
35275
|
}));
|
|
35201
35276
|
};
|
|
35202
35277
|
|
|
@@ -39871,6 +39946,7 @@ exports.useListWebhooks = useListWebhooks;
|
|
|
39871
39946
|
exports.useLoadIcons = useLoadIcons;
|
|
39872
39947
|
exports.useNotifySalesOrderShipped = useNotifySalesOrderShipped;
|
|
39873
39948
|
exports.useParseAddress = useParseAddress;
|
|
39949
|
+
exports.usePreviewTransaction = usePreviewTransaction;
|
|
39874
39950
|
exports.usePublishRateCard = usePublishRateCard;
|
|
39875
39951
|
exports.useRatesEstimate = useRatesEstimate;
|
|
39876
39952
|
exports.useRefreshOrderSource = useRefreshOrderSource;
|