@shipengine/alchemy 6.0.65 → 6.0.67
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 +361 -256
- package/index.mjs +360 -257
- 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
4930
|
|
|
4931
|
-
|
|
4931
|
+
return !!length &&
|
|
4932
|
+
(type == 'number' ||
|
|
4933
|
+
(type != 'symbol' && reIsUint.test(value))) &&
|
|
4934
|
+
(value > -1 && value % 1 == 0 && value < length);
|
|
4935
|
+
}
|
|
4936
|
+
|
|
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
|
/**
|
|
@@ -10822,17 +10830,17 @@ var AccountBillingPlanChangeType = /* @__PURE__ */ ((AccountBillingPlanChangeTyp
|
|
|
10822
10830
|
return AccountBillingPlanChangeType2;
|
|
10823
10831
|
})(AccountBillingPlanChangeType || {});
|
|
10824
10832
|
|
|
10825
|
-
var __getOwnPropSymbols
|
|
10826
|
-
var __hasOwnProp
|
|
10827
|
-
var __propIsEnum
|
|
10833
|
+
var __getOwnPropSymbols$$ = Object.getOwnPropertySymbols;
|
|
10834
|
+
var __hasOwnProp$$ = Object.prototype.hasOwnProperty;
|
|
10835
|
+
var __propIsEnum$$ = Object.prototype.propertyIsEnumerable;
|
|
10828
10836
|
var __objRest$x = (source, exclude) => {
|
|
10829
10837
|
var target = {};
|
|
10830
10838
|
for (var prop in source)
|
|
10831
|
-
if (__hasOwnProp
|
|
10839
|
+
if (__hasOwnProp$$.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
10832
10840
|
target[prop] = source[prop];
|
|
10833
|
-
if (source != null && __getOwnPropSymbols
|
|
10834
|
-
for (var prop of __getOwnPropSymbols
|
|
10835
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum
|
|
10841
|
+
if (source != null && __getOwnPropSymbols$$)
|
|
10842
|
+
for (var prop of __getOwnPropSymbols$$(source)) {
|
|
10843
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$$.call(source, prop))
|
|
10836
10844
|
target[prop] = source[prop];
|
|
10837
10845
|
}
|
|
10838
10846
|
return target;
|
|
@@ -10967,17 +10975,17 @@ const types = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
10967
10975
|
RateCardStatus
|
|
10968
10976
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
10969
10977
|
|
|
10970
|
-
var __getOwnPropSymbols$
|
|
10971
|
-
var __hasOwnProp$
|
|
10972
|
-
var __propIsEnum$
|
|
10978
|
+
var __getOwnPropSymbols$_ = Object.getOwnPropertySymbols;
|
|
10979
|
+
var __hasOwnProp$_ = Object.prototype.hasOwnProperty;
|
|
10980
|
+
var __propIsEnum$_ = Object.prototype.propertyIsEnumerable;
|
|
10973
10981
|
var __objRest$w = (source, exclude) => {
|
|
10974
10982
|
var target = {};
|
|
10975
10983
|
for (var prop in source)
|
|
10976
|
-
if (__hasOwnProp$
|
|
10984
|
+
if (__hasOwnProp$_.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
10977
10985
|
target[prop] = source[prop];
|
|
10978
|
-
if (source != null && __getOwnPropSymbols$
|
|
10979
|
-
for (var prop of __getOwnPropSymbols$
|
|
10980
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
10986
|
+
if (source != null && __getOwnPropSymbols$_)
|
|
10987
|
+
for (var prop of __getOwnPropSymbols$_(source)) {
|
|
10988
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$_.call(source, prop))
|
|
10981
10989
|
target[prop] = source[prop];
|
|
10982
10990
|
}
|
|
10983
10991
|
return target;
|
|
@@ -11122,6 +11130,20 @@ class AuctanePayAPI {
|
|
|
11122
11130
|
payload
|
|
11123
11131
|
);
|
|
11124
11132
|
};
|
|
11133
|
+
/**
|
|
11134
|
+
* The `identityVerification` method returns a Plaid IDV verification URL for a given user
|
|
11135
|
+
* @docs https://auctane.atlassian.net/wiki/spaces/SEEU/pages/5906662077/AUCTANE+PAY+ENDPOINTS+FOR+SHIPSTATION+API#Identity-verification
|
|
11136
|
+
*/
|
|
11137
|
+
this.identityVerification = () => {
|
|
11138
|
+
return this.client.post("/v1/payments/identity_verification");
|
|
11139
|
+
};
|
|
11140
|
+
/**
|
|
11141
|
+
* The `getPaymentAccount` method returns the Payment Account data for a given user
|
|
11142
|
+
* @docs https://auctane.atlassian.net/wiki/spaces/SEEU/pages/5906662077/AUCTANE+PAY+ENDPOINTS+FOR+SHIPSTATION+API
|
|
11143
|
+
*/
|
|
11144
|
+
this.getPaymentAccount = () => {
|
|
11145
|
+
return this.client.get("/v1/payments/account");
|
|
11146
|
+
};
|
|
11125
11147
|
this.client = client;
|
|
11126
11148
|
}
|
|
11127
11149
|
}
|
|
@@ -13831,7 +13853,7 @@ var ipaddr = {
|
|
|
13831
13853
|
}).call(commonjsGlobal);
|
|
13832
13854
|
} (ipaddr));
|
|
13833
13855
|
|
|
13834
|
-
var __async$
|
|
13856
|
+
var __async$15 = (__this, __arguments, generator) => {
|
|
13835
13857
|
return new Promise((resolve, reject) => {
|
|
13836
13858
|
var fulfilled = (value) => {
|
|
13837
13859
|
try {
|
|
@@ -13851,7 +13873,7 @@ var __async$14 = (__this, __arguments, generator) => {
|
|
|
13851
13873
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
13852
13874
|
});
|
|
13853
13875
|
};
|
|
13854
|
-
const getEndUserIpAddress = () => __async$
|
|
13876
|
+
const getEndUserIpAddress = () => __async$15(void 0, null, function* () {
|
|
13855
13877
|
try {
|
|
13856
13878
|
const response = yield axios.get("https://api.ipify.org/?format=json");
|
|
13857
13879
|
if (response.data.ip && ipaddrExports.isValid(response.data.ip)) {
|
|
@@ -13912,38 +13934,38 @@ const decamelizeKeys = (obj, separator = "_") => {
|
|
|
13912
13934
|
return obj;
|
|
13913
13935
|
};
|
|
13914
13936
|
|
|
13915
|
-
var __defProp$
|
|
13916
|
-
var __defProps$
|
|
13917
|
-
var __getOwnPropDescs$
|
|
13918
|
-
var __getOwnPropSymbols$
|
|
13919
|
-
var __hasOwnProp$
|
|
13920
|
-
var __propIsEnum$
|
|
13921
|
-
var __defNormalProp$
|
|
13922
|
-
var __spreadValues$
|
|
13937
|
+
var __defProp$O = Object.defineProperty;
|
|
13938
|
+
var __defProps$I = Object.defineProperties;
|
|
13939
|
+
var __getOwnPropDescs$I = Object.getOwnPropertyDescriptors;
|
|
13940
|
+
var __getOwnPropSymbols$Z = Object.getOwnPropertySymbols;
|
|
13941
|
+
var __hasOwnProp$Z = Object.prototype.hasOwnProperty;
|
|
13942
|
+
var __propIsEnum$Z = Object.prototype.propertyIsEnumerable;
|
|
13943
|
+
var __defNormalProp$O = (obj, key, value) => key in obj ? __defProp$O(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13944
|
+
var __spreadValues$O = (a, b) => {
|
|
13923
13945
|
for (var prop in b || (b = {}))
|
|
13924
|
-
if (__hasOwnProp$
|
|
13925
|
-
__defNormalProp$
|
|
13926
|
-
if (__getOwnPropSymbols$
|
|
13927
|
-
for (var prop of __getOwnPropSymbols$
|
|
13928
|
-
if (__propIsEnum$
|
|
13929
|
-
__defNormalProp$
|
|
13946
|
+
if (__hasOwnProp$Z.call(b, prop))
|
|
13947
|
+
__defNormalProp$O(a, prop, b[prop]);
|
|
13948
|
+
if (__getOwnPropSymbols$Z)
|
|
13949
|
+
for (var prop of __getOwnPropSymbols$Z(b)) {
|
|
13950
|
+
if (__propIsEnum$Z.call(b, prop))
|
|
13951
|
+
__defNormalProp$O(a, prop, b[prop]);
|
|
13930
13952
|
}
|
|
13931
13953
|
return a;
|
|
13932
13954
|
};
|
|
13933
|
-
var __spreadProps$
|
|
13955
|
+
var __spreadProps$I = (a, b) => __defProps$I(a, __getOwnPropDescs$I(b));
|
|
13934
13956
|
var __objRest$v = (source, exclude) => {
|
|
13935
13957
|
var target = {};
|
|
13936
13958
|
for (var prop in source)
|
|
13937
|
-
if (__hasOwnProp$
|
|
13959
|
+
if (__hasOwnProp$Z.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
13938
13960
|
target[prop] = source[prop];
|
|
13939
|
-
if (source != null && __getOwnPropSymbols$
|
|
13940
|
-
for (var prop of __getOwnPropSymbols$
|
|
13941
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
13961
|
+
if (source != null && __getOwnPropSymbols$Z)
|
|
13962
|
+
for (var prop of __getOwnPropSymbols$Z(source)) {
|
|
13963
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$Z.call(source, prop))
|
|
13942
13964
|
target[prop] = source[prop];
|
|
13943
13965
|
}
|
|
13944
13966
|
return target;
|
|
13945
13967
|
};
|
|
13946
|
-
var __async$
|
|
13968
|
+
var __async$14 = (__this, __arguments, generator) => {
|
|
13947
13969
|
return new Promise((resolve, reject) => {
|
|
13948
13970
|
var fulfilled = (value) => {
|
|
13949
13971
|
try {
|
|
@@ -13983,12 +14005,12 @@ class CarriersAPI {
|
|
|
13983
14005
|
/**
|
|
13984
14006
|
* The `connect` method connects a carrier account to a user's ShipEngine account.
|
|
13985
14007
|
*/
|
|
13986
|
-
this.connect = (_a) => __async$
|
|
14008
|
+
this.connect = (_a) => __async$14(this, null, function* () {
|
|
13987
14009
|
var _b = _a, { carrierCode } = _b, connection = __objRest$v(_b, ["carrierCode"]);
|
|
13988
14010
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
13989
14011
|
if (!endUserIpAddress)
|
|
13990
14012
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
13991
|
-
return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$
|
|
14013
|
+
return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$I(__spreadValues$O({}, connection), {
|
|
13992
14014
|
endUserIpAddress
|
|
13993
14015
|
}));
|
|
13994
14016
|
});
|
|
@@ -14072,22 +14094,22 @@ class CarriersAPI {
|
|
|
14072
14094
|
}
|
|
14073
14095
|
}
|
|
14074
14096
|
|
|
14075
|
-
var __getOwnPropSymbols$
|
|
14076
|
-
var __hasOwnProp$
|
|
14077
|
-
var __propIsEnum$
|
|
14097
|
+
var __getOwnPropSymbols$Y = Object.getOwnPropertySymbols;
|
|
14098
|
+
var __hasOwnProp$Y = Object.prototype.hasOwnProperty;
|
|
14099
|
+
var __propIsEnum$Y = Object.prototype.propertyIsEnumerable;
|
|
14078
14100
|
var __objRest$u = (source, exclude) => {
|
|
14079
14101
|
var target = {};
|
|
14080
14102
|
for (var prop in source)
|
|
14081
|
-
if (__hasOwnProp$
|
|
14103
|
+
if (__hasOwnProp$Y.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
14082
14104
|
target[prop] = source[prop];
|
|
14083
|
-
if (source != null && __getOwnPropSymbols$
|
|
14084
|
-
for (var prop of __getOwnPropSymbols$
|
|
14085
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
14105
|
+
if (source != null && __getOwnPropSymbols$Y)
|
|
14106
|
+
for (var prop of __getOwnPropSymbols$Y(source)) {
|
|
14107
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$Y.call(source, prop))
|
|
14086
14108
|
target[prop] = source[prop];
|
|
14087
14109
|
}
|
|
14088
14110
|
return target;
|
|
14089
14111
|
};
|
|
14090
|
-
var __async$
|
|
14112
|
+
var __async$13 = (__this, __arguments, generator) => {
|
|
14091
14113
|
return new Promise((resolve, reject) => {
|
|
14092
14114
|
var fulfilled = (value) => {
|
|
14093
14115
|
try {
|
|
@@ -14129,7 +14151,7 @@ class ConnectionsAPI {
|
|
|
14129
14151
|
/**
|
|
14130
14152
|
* The `connectCarrier` method connects a carrier to account.
|
|
14131
14153
|
*/
|
|
14132
|
-
this.connectCarrier = (carrierName, formData) => __async$
|
|
14154
|
+
this.connectCarrier = (carrierName, formData) => __async$13(this, null, function* () {
|
|
14133
14155
|
return yield this.client.post(
|
|
14134
14156
|
`/v1/connections/carriers/${carrierName}`,
|
|
14135
14157
|
formData,
|
|
@@ -16297,23 +16319,23 @@ class CustomPackagesAPI {
|
|
|
16297
16319
|
}
|
|
16298
16320
|
}
|
|
16299
16321
|
|
|
16300
|
-
var __defProp$
|
|
16301
|
-
var __getOwnPropSymbols$
|
|
16302
|
-
var __hasOwnProp$
|
|
16303
|
-
var __propIsEnum$
|
|
16304
|
-
var __defNormalProp$
|
|
16305
|
-
var __spreadValues$
|
|
16322
|
+
var __defProp$N = Object.defineProperty;
|
|
16323
|
+
var __getOwnPropSymbols$X = Object.getOwnPropertySymbols;
|
|
16324
|
+
var __hasOwnProp$X = Object.prototype.hasOwnProperty;
|
|
16325
|
+
var __propIsEnum$X = Object.prototype.propertyIsEnumerable;
|
|
16326
|
+
var __defNormalProp$N = (obj, key, value) => key in obj ? __defProp$N(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16327
|
+
var __spreadValues$N = (a, b) => {
|
|
16306
16328
|
for (var prop in b || (b = {}))
|
|
16307
|
-
if (__hasOwnProp$
|
|
16308
|
-
__defNormalProp$
|
|
16309
|
-
if (__getOwnPropSymbols$
|
|
16310
|
-
for (var prop of __getOwnPropSymbols$
|
|
16311
|
-
if (__propIsEnum$
|
|
16312
|
-
__defNormalProp$
|
|
16329
|
+
if (__hasOwnProp$X.call(b, prop))
|
|
16330
|
+
__defNormalProp$N(a, prop, b[prop]);
|
|
16331
|
+
if (__getOwnPropSymbols$X)
|
|
16332
|
+
for (var prop of __getOwnPropSymbols$X(b)) {
|
|
16333
|
+
if (__propIsEnum$X.call(b, prop))
|
|
16334
|
+
__defNormalProp$N(a, prop, b[prop]);
|
|
16313
16335
|
}
|
|
16314
16336
|
return a;
|
|
16315
16337
|
};
|
|
16316
|
-
var __async$
|
|
16338
|
+
var __async$12 = (__this, __arguments, generator) => {
|
|
16317
16339
|
return new Promise((resolve, reject) => {
|
|
16318
16340
|
var fulfilled = (value) => {
|
|
16319
16341
|
try {
|
|
@@ -16352,12 +16374,12 @@ class FundingSourcesAPI {
|
|
|
16352
16374
|
* The `create` method creates a new funding source for a given user. This requires
|
|
16353
16375
|
* payment information to be collected from the user.
|
|
16354
16376
|
*/
|
|
16355
|
-
this.create = (createFundingSource) => __async$
|
|
16377
|
+
this.create = (createFundingSource) => __async$12(this, null, function* () {
|
|
16356
16378
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16357
16379
|
if (!endUserIpAddress) {
|
|
16358
16380
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
16359
16381
|
}
|
|
16360
|
-
return yield this.client.post("/v1/funding_sources", __spreadValues$
|
|
16382
|
+
return yield this.client.post("/v1/funding_sources", __spreadValues$N({
|
|
16361
16383
|
endUserIpAddress
|
|
16362
16384
|
}, createFundingSource));
|
|
16363
16385
|
});
|
|
@@ -16366,7 +16388,7 @@ class FundingSourcesAPI {
|
|
|
16366
16388
|
* user to update the billing address or payment information associated with the
|
|
16367
16389
|
* funding source.
|
|
16368
16390
|
*/
|
|
16369
|
-
this.update = (billingInfo, creditCardInfo, auctanePayInfo, fundingSourceId) => __async$
|
|
16391
|
+
this.update = (billingInfo, creditCardInfo, auctanePayInfo, fundingSourceId) => __async$12(this, null, function* () {
|
|
16370
16392
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16371
16393
|
if (!endUserIpAddress) {
|
|
16372
16394
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
@@ -16376,7 +16398,7 @@ class FundingSourcesAPI {
|
|
|
16376
16398
|
{
|
|
16377
16399
|
billingInfo,
|
|
16378
16400
|
endUserIpAddress,
|
|
16379
|
-
paymentMethod: __spreadValues$
|
|
16401
|
+
paymentMethod: __spreadValues$N({
|
|
16380
16402
|
creditCardInfo
|
|
16381
16403
|
}, auctanePayInfo)
|
|
16382
16404
|
}
|
|
@@ -16386,19 +16408,19 @@ class FundingSourcesAPI {
|
|
|
16386
16408
|
* The `registerCarrier` method registers a carrier account and associates
|
|
16387
16409
|
* it with a given funding source.
|
|
16388
16410
|
*/
|
|
16389
|
-
this.registerCarrier = (carrier) => __async$
|
|
16411
|
+
this.registerCarrier = (carrier) => __async$12(this, null, function* () {
|
|
16390
16412
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16391
16413
|
if (!endUserIpAddress) {
|
|
16392
16414
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
16393
16415
|
}
|
|
16394
|
-
return yield this.client.post("/v1/registration/funding_source", __spreadValues$
|
|
16416
|
+
return yield this.client.post("/v1/registration/funding_source", __spreadValues$N({
|
|
16395
16417
|
endUserIpAddress
|
|
16396
16418
|
}, carrier));
|
|
16397
16419
|
});
|
|
16398
16420
|
/**
|
|
16399
16421
|
* The `addFunds` method allows you to add funds to a funding source.
|
|
16400
16422
|
*/
|
|
16401
|
-
this.addFunds = (amount, fundingSourceId) => __async$
|
|
16423
|
+
this.addFunds = (amount, fundingSourceId) => __async$12(this, null, function* () {
|
|
16402
16424
|
return yield this.client.put(
|
|
16403
16425
|
`/v1/funding_sources/${fundingSourceId}/add_funds`,
|
|
16404
16426
|
amount
|
|
@@ -16408,7 +16430,7 @@ class FundingSourcesAPI {
|
|
|
16408
16430
|
* The `metadata` method returns seller-specific requirements for creating funding sources
|
|
16409
16431
|
* and attaching carriers
|
|
16410
16432
|
*/
|
|
16411
|
-
this.metadata = () => __async$
|
|
16433
|
+
this.metadata = () => __async$12(this, null, function* () {
|
|
16412
16434
|
return yield this.client.get("/v1/funding_sources/metadata");
|
|
16413
16435
|
});
|
|
16414
16436
|
/**
|
|
@@ -16460,7 +16482,7 @@ class InsuranceAPI {
|
|
|
16460
16482
|
}
|
|
16461
16483
|
}
|
|
16462
16484
|
|
|
16463
|
-
var __async$
|
|
16485
|
+
var __async$11 = (__this, __arguments, generator) => {
|
|
16464
16486
|
return new Promise((resolve, reject) => {
|
|
16465
16487
|
var fulfilled = (value) => {
|
|
16466
16488
|
try {
|
|
@@ -16492,13 +16514,13 @@ class InvoiceAddressAPI {
|
|
|
16492
16514
|
/**
|
|
16493
16515
|
* The `create` method creates a new invoice address for a given user.
|
|
16494
16516
|
*/
|
|
16495
|
-
this.create = (invoiceAddress) => __async$
|
|
16517
|
+
this.create = (invoiceAddress) => __async$11(this, null, function* () {
|
|
16496
16518
|
return yield this.client.post("/v1/invoice_address", invoiceAddress);
|
|
16497
16519
|
});
|
|
16498
16520
|
/**
|
|
16499
16521
|
* The `update` method updates a invoice address for a given user.
|
|
16500
16522
|
*/
|
|
16501
|
-
this.update = (invoiceAddress) => __async$
|
|
16523
|
+
this.update = (invoiceAddress) => __async$11(this, null, function* () {
|
|
16502
16524
|
return yield this.client.put("/v1/invoice_address", invoiceAddress);
|
|
16503
16525
|
});
|
|
16504
16526
|
this.client = client;
|
|
@@ -16560,17 +16582,17 @@ class LabelsAPI {
|
|
|
16560
16582
|
}
|
|
16561
16583
|
}
|
|
16562
16584
|
|
|
16563
|
-
var __getOwnPropSymbols$
|
|
16564
|
-
var __hasOwnProp$
|
|
16565
|
-
var __propIsEnum$
|
|
16585
|
+
var __getOwnPropSymbols$W = Object.getOwnPropertySymbols;
|
|
16586
|
+
var __hasOwnProp$W = Object.prototype.hasOwnProperty;
|
|
16587
|
+
var __propIsEnum$W = Object.prototype.propertyIsEnumerable;
|
|
16566
16588
|
var __objRest$t = (source, exclude) => {
|
|
16567
16589
|
var target = {};
|
|
16568
16590
|
for (var prop in source)
|
|
16569
|
-
if (__hasOwnProp$
|
|
16591
|
+
if (__hasOwnProp$W.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
16570
16592
|
target[prop] = source[prop];
|
|
16571
|
-
if (source != null && __getOwnPropSymbols$
|
|
16572
|
-
for (var prop of __getOwnPropSymbols$
|
|
16573
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
16593
|
+
if (source != null && __getOwnPropSymbols$W)
|
|
16594
|
+
for (var prop of __getOwnPropSymbols$W(source)) {
|
|
16595
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$W.call(source, prop))
|
|
16574
16596
|
target[prop] = source[prop];
|
|
16575
16597
|
}
|
|
16576
16598
|
return target;
|
|
@@ -16691,19 +16713,19 @@ class RateCardsAPI {
|
|
|
16691
16713
|
}
|
|
16692
16714
|
}
|
|
16693
16715
|
|
|
16694
|
-
var __defProp$
|
|
16695
|
-
var __getOwnPropSymbols$
|
|
16696
|
-
var __hasOwnProp$
|
|
16697
|
-
var __propIsEnum$
|
|
16698
|
-
var __defNormalProp$
|
|
16699
|
-
var __spreadValues$
|
|
16716
|
+
var __defProp$M = Object.defineProperty;
|
|
16717
|
+
var __getOwnPropSymbols$V = Object.getOwnPropertySymbols;
|
|
16718
|
+
var __hasOwnProp$V = Object.prototype.hasOwnProperty;
|
|
16719
|
+
var __propIsEnum$V = Object.prototype.propertyIsEnumerable;
|
|
16720
|
+
var __defNormalProp$M = (obj, key, value) => key in obj ? __defProp$M(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16721
|
+
var __spreadValues$M = (a, b) => {
|
|
16700
16722
|
for (var prop in b || (b = {}))
|
|
16701
|
-
if (__hasOwnProp$
|
|
16702
|
-
__defNormalProp$
|
|
16703
|
-
if (__getOwnPropSymbols$
|
|
16704
|
-
for (var prop of __getOwnPropSymbols$
|
|
16705
|
-
if (__propIsEnum$
|
|
16706
|
-
__defNormalProp$
|
|
16723
|
+
if (__hasOwnProp$V.call(b, prop))
|
|
16724
|
+
__defNormalProp$M(a, prop, b[prop]);
|
|
16725
|
+
if (__getOwnPropSymbols$V)
|
|
16726
|
+
for (var prop of __getOwnPropSymbols$V(b)) {
|
|
16727
|
+
if (__propIsEnum$V.call(b, prop))
|
|
16728
|
+
__defNormalProp$M(a, prop, b[prop]);
|
|
16707
16729
|
}
|
|
16708
16730
|
return a;
|
|
16709
16731
|
};
|
|
@@ -16725,7 +16747,7 @@ class RatesAPI {
|
|
|
16725
16747
|
* method.
|
|
16726
16748
|
*/
|
|
16727
16749
|
this.estimate = (params) => {
|
|
16728
|
-
return this.client.post("/v1/rates/estimate", __spreadValues$
|
|
16750
|
+
return this.client.post("/v1/rates/estimate", __spreadValues$M({}, params));
|
|
16729
16751
|
};
|
|
16730
16752
|
this.client = client;
|
|
16731
16753
|
}
|
|
@@ -16805,7 +16827,7 @@ class SalesOrdersAPI {
|
|
|
16805
16827
|
}
|
|
16806
16828
|
}
|
|
16807
16829
|
|
|
16808
|
-
var __async
|
|
16830
|
+
var __async$10 = (__this, __arguments, generator) => {
|
|
16809
16831
|
return new Promise((resolve, reject) => {
|
|
16810
16832
|
var fulfilled = (value) => {
|
|
16811
16833
|
try {
|
|
@@ -16863,7 +16885,7 @@ class SellersAPI {
|
|
|
16863
16885
|
/**
|
|
16864
16886
|
* Deletes an API Key
|
|
16865
16887
|
*/
|
|
16866
|
-
this.deleteSellerApiKey = (_0) => __async
|
|
16888
|
+
this.deleteSellerApiKey = (_0) => __async$10(this, [_0], function* ({
|
|
16867
16889
|
encryptedApiKey,
|
|
16868
16890
|
sellerId,
|
|
16869
16891
|
isSandbox
|
|
@@ -16909,19 +16931,19 @@ class SellersAPI {
|
|
|
16909
16931
|
}
|
|
16910
16932
|
}
|
|
16911
16933
|
|
|
16912
|
-
var __defProp$
|
|
16913
|
-
var __getOwnPropSymbols$
|
|
16914
|
-
var __hasOwnProp$
|
|
16915
|
-
var __propIsEnum$
|
|
16916
|
-
var __defNormalProp$
|
|
16917
|
-
var __spreadValues$
|
|
16934
|
+
var __defProp$L = Object.defineProperty;
|
|
16935
|
+
var __getOwnPropSymbols$U = Object.getOwnPropertySymbols;
|
|
16936
|
+
var __hasOwnProp$U = Object.prototype.hasOwnProperty;
|
|
16937
|
+
var __propIsEnum$U = Object.prototype.propertyIsEnumerable;
|
|
16938
|
+
var __defNormalProp$L = (obj, key, value) => key in obj ? __defProp$L(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16939
|
+
var __spreadValues$L = (a, b) => {
|
|
16918
16940
|
for (var prop in b || (b = {}))
|
|
16919
|
-
if (__hasOwnProp$
|
|
16920
|
-
__defNormalProp$
|
|
16921
|
-
if (__getOwnPropSymbols$
|
|
16922
|
-
for (var prop of __getOwnPropSymbols$
|
|
16923
|
-
if (__propIsEnum$
|
|
16924
|
-
__defNormalProp$
|
|
16941
|
+
if (__hasOwnProp$U.call(b, prop))
|
|
16942
|
+
__defNormalProp$L(a, prop, b[prop]);
|
|
16943
|
+
if (__getOwnPropSymbols$U)
|
|
16944
|
+
for (var prop of __getOwnPropSymbols$U(b)) {
|
|
16945
|
+
if (__propIsEnum$U.call(b, prop))
|
|
16946
|
+
__defNormalProp$L(a, prop, b[prop]);
|
|
16925
16947
|
}
|
|
16926
16948
|
return a;
|
|
16927
16949
|
};
|
|
@@ -16933,7 +16955,7 @@ class ServicePointsAPI {
|
|
|
16933
16955
|
* Either an address, coordinates, or an address query
|
|
16934
16956
|
*/
|
|
16935
16957
|
this.list = (options) => {
|
|
16936
|
-
return this.client.post("/v1/service_points/list", __spreadValues$
|
|
16958
|
+
return this.client.post("/v1/service_points/list", __spreadValues$L({}, options));
|
|
16937
16959
|
};
|
|
16938
16960
|
/**
|
|
16939
16961
|
* Get a specific service point by its carrier code, country code, and id
|
|
@@ -16951,7 +16973,7 @@ class ServicePointsAPI {
|
|
|
16951
16973
|
}
|
|
16952
16974
|
}
|
|
16953
16975
|
|
|
16954
|
-
var __async
|
|
16976
|
+
var __async$$ = (__this, __arguments, generator) => {
|
|
16955
16977
|
return new Promise((resolve, reject) => {
|
|
16956
16978
|
var fulfilled = (value) => {
|
|
16957
16979
|
try {
|
|
@@ -17000,7 +17022,7 @@ class ShipmentsAPI {
|
|
|
17000
17022
|
* The `create` method allows for creating shipments based on a list of shipment
|
|
17001
17023
|
* items passed into this method.
|
|
17002
17024
|
*/
|
|
17003
|
-
this.create = (...shipments) => __async
|
|
17025
|
+
this.create = (...shipments) => __async$$(this, null, function* () {
|
|
17004
17026
|
return this.client.post("/v1/shipments", {
|
|
17005
17027
|
shipments
|
|
17006
17028
|
});
|
|
@@ -34417,38 +34439,38 @@ class WebhooksAPI {
|
|
|
34417
34439
|
}
|
|
34418
34440
|
}
|
|
34419
34441
|
|
|
34420
|
-
var __defProp$
|
|
34421
|
-
var __defProps$
|
|
34422
|
-
var __getOwnPropDescs$
|
|
34423
|
-
var __getOwnPropSymbols$
|
|
34424
|
-
var __hasOwnProp$
|
|
34425
|
-
var __propIsEnum$
|
|
34426
|
-
var __defNormalProp$
|
|
34427
|
-
var __spreadValues$
|
|
34442
|
+
var __defProp$K = Object.defineProperty;
|
|
34443
|
+
var __defProps$H = Object.defineProperties;
|
|
34444
|
+
var __getOwnPropDescs$H = Object.getOwnPropertyDescriptors;
|
|
34445
|
+
var __getOwnPropSymbols$T = Object.getOwnPropertySymbols;
|
|
34446
|
+
var __hasOwnProp$T = Object.prototype.hasOwnProperty;
|
|
34447
|
+
var __propIsEnum$T = Object.prototype.propertyIsEnumerable;
|
|
34448
|
+
var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
34449
|
+
var __spreadValues$K = (a, b) => {
|
|
34428
34450
|
for (var prop in b || (b = {}))
|
|
34429
|
-
if (__hasOwnProp$
|
|
34430
|
-
__defNormalProp$
|
|
34431
|
-
if (__getOwnPropSymbols$
|
|
34432
|
-
for (var prop of __getOwnPropSymbols$
|
|
34433
|
-
if (__propIsEnum$
|
|
34434
|
-
__defNormalProp$
|
|
34451
|
+
if (__hasOwnProp$T.call(b, prop))
|
|
34452
|
+
__defNormalProp$K(a, prop, b[prop]);
|
|
34453
|
+
if (__getOwnPropSymbols$T)
|
|
34454
|
+
for (var prop of __getOwnPropSymbols$T(b)) {
|
|
34455
|
+
if (__propIsEnum$T.call(b, prop))
|
|
34456
|
+
__defNormalProp$K(a, prop, b[prop]);
|
|
34435
34457
|
}
|
|
34436
34458
|
return a;
|
|
34437
34459
|
};
|
|
34438
|
-
var __spreadProps$
|
|
34460
|
+
var __spreadProps$H = (a, b) => __defProps$H(a, __getOwnPropDescs$H(b));
|
|
34439
34461
|
var __objRest$s = (source, exclude) => {
|
|
34440
34462
|
var target = {};
|
|
34441
34463
|
for (var prop in source)
|
|
34442
|
-
if (__hasOwnProp$
|
|
34464
|
+
if (__hasOwnProp$T.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
34443
34465
|
target[prop] = source[prop];
|
|
34444
|
-
if (source != null && __getOwnPropSymbols$
|
|
34445
|
-
for (var prop of __getOwnPropSymbols$
|
|
34446
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
34466
|
+
if (source != null && __getOwnPropSymbols$T)
|
|
34467
|
+
for (var prop of __getOwnPropSymbols$T(source)) {
|
|
34468
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$T.call(source, prop))
|
|
34447
34469
|
target[prop] = source[prop];
|
|
34448
34470
|
}
|
|
34449
34471
|
return target;
|
|
34450
34472
|
};
|
|
34451
|
-
var __async$
|
|
34473
|
+
var __async$_ = (__this, __arguments, generator) => {
|
|
34452
34474
|
return new Promise((resolve, reject) => {
|
|
34453
34475
|
var fulfilled = (value) => {
|
|
34454
34476
|
try {
|
|
@@ -34471,7 +34493,7 @@ var __async$Z = (__this, __arguments, generator) => {
|
|
|
34471
34493
|
const logger$1 = E({
|
|
34472
34494
|
level: process.env.NODE_ENV === "production" ? "fatal" : "info",
|
|
34473
34495
|
name: "shipengine-api",
|
|
34474
|
-
serializers: __spreadProps$
|
|
34496
|
+
serializers: __spreadProps$H(__spreadValues$K({}, k), {
|
|
34475
34497
|
req: (req) => ({
|
|
34476
34498
|
headers: req.headers,
|
|
34477
34499
|
method: req.method,
|
|
@@ -34496,7 +34518,7 @@ class ShipEngineAPI {
|
|
|
34496
34518
|
this.getSandboxToken = getSandboxToken;
|
|
34497
34519
|
const client = axios.create({
|
|
34498
34520
|
baseURL,
|
|
34499
|
-
headers: __spreadProps$
|
|
34521
|
+
headers: __spreadProps$H(__spreadValues$K({}, headers), {
|
|
34500
34522
|
"Content-Type": "application/json"
|
|
34501
34523
|
}),
|
|
34502
34524
|
paramsSerializer: (params) => lib.stringify(decamelizeKeys(params), { arrayFormat: "brackets" }),
|
|
@@ -34536,7 +34558,7 @@ class ShipEngineAPI {
|
|
|
34536
34558
|
});
|
|
34537
34559
|
client.defaults.headers.common["Authorization"] = `Bearer ${token}`;
|
|
34538
34560
|
client.interceptors.request.use(
|
|
34539
|
-
(config) => __async$
|
|
34561
|
+
(config) => __async$_(this, null, function* () {
|
|
34540
34562
|
if (config.isSandbox) {
|
|
34541
34563
|
if (!this.sandboxToken) {
|
|
34542
34564
|
this.sandboxToken = yield getSandboxToken == null ? void 0 : getSandboxToken();
|
|
@@ -34563,7 +34585,7 @@ class ShipEngineAPI {
|
|
|
34563
34585
|
);
|
|
34564
34586
|
return res;
|
|
34565
34587
|
},
|
|
34566
|
-
(err) => __async$
|
|
34588
|
+
(err) => __async$_(this, null, function* () {
|
|
34567
34589
|
var _a, _b, _c, _d, _e;
|
|
34568
34590
|
logger$1.error(
|
|
34569
34591
|
{ err, req: err.config, res: err.response },
|
|
@@ -34610,7 +34632,7 @@ class ShipEngineAPI {
|
|
|
34610
34632
|
* that token (also known as Seller ID)
|
|
34611
34633
|
*/
|
|
34612
34634
|
getTenant(isSandbox) {
|
|
34613
|
-
return __async$
|
|
34635
|
+
return __async$_(this, null, function* () {
|
|
34614
34636
|
var _a;
|
|
34615
34637
|
if (!isSandbox) {
|
|
34616
34638
|
return this.getTenantFromToken(this.token);
|
|
@@ -34920,25 +34942,25 @@ const delay = (ms) => new Promise((resolve) => {
|
|
|
34920
34942
|
|
|
34921
34943
|
const onError = (_errors) => _default();
|
|
34922
34944
|
|
|
34923
|
-
var __defProp$
|
|
34924
|
-
var __defProps$
|
|
34925
|
-
var __getOwnPropDescs$
|
|
34926
|
-
var __getOwnPropSymbols$
|
|
34927
|
-
var __hasOwnProp$
|
|
34928
|
-
var __propIsEnum$
|
|
34929
|
-
var __defNormalProp$
|
|
34930
|
-
var __spreadValues$
|
|
34945
|
+
var __defProp$J = Object.defineProperty;
|
|
34946
|
+
var __defProps$G = Object.defineProperties;
|
|
34947
|
+
var __getOwnPropDescs$G = Object.getOwnPropertyDescriptors;
|
|
34948
|
+
var __getOwnPropSymbols$S = Object.getOwnPropertySymbols;
|
|
34949
|
+
var __hasOwnProp$S = Object.prototype.hasOwnProperty;
|
|
34950
|
+
var __propIsEnum$S = Object.prototype.propertyIsEnumerable;
|
|
34951
|
+
var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
34952
|
+
var __spreadValues$J = (a, b) => {
|
|
34931
34953
|
for (var prop in b || (b = {}))
|
|
34932
|
-
if (__hasOwnProp$
|
|
34933
|
-
__defNormalProp$
|
|
34934
|
-
if (__getOwnPropSymbols$
|
|
34935
|
-
for (var prop of __getOwnPropSymbols$
|
|
34936
|
-
if (__propIsEnum$
|
|
34937
|
-
__defNormalProp$
|
|
34954
|
+
if (__hasOwnProp$S.call(b, prop))
|
|
34955
|
+
__defNormalProp$J(a, prop, b[prop]);
|
|
34956
|
+
if (__getOwnPropSymbols$S)
|
|
34957
|
+
for (var prop of __getOwnPropSymbols$S(b)) {
|
|
34958
|
+
if (__propIsEnum$S.call(b, prop))
|
|
34959
|
+
__defNormalProp$J(a, prop, b[prop]);
|
|
34938
34960
|
}
|
|
34939
34961
|
return a;
|
|
34940
34962
|
};
|
|
34941
|
-
var __spreadProps$
|
|
34963
|
+
var __spreadProps$G = (a, b) => __defProps$G(a, __getOwnPropDescs$G(b));
|
|
34942
34964
|
const streams = [];
|
|
34943
34965
|
if (process.env.NODE_ENV === "production") {
|
|
34944
34966
|
streams.push({
|
|
@@ -34947,7 +34969,7 @@ if (process.env.NODE_ENV === "production") {
|
|
|
34947
34969
|
}
|
|
34948
34970
|
const logger = E({
|
|
34949
34971
|
name: "shipengine",
|
|
34950
|
-
serializers: __spreadProps$
|
|
34972
|
+
serializers: __spreadProps$G(__spreadValues$J({}, k), {
|
|
34951
34973
|
req: (req) => ({
|
|
34952
34974
|
headers: req.headers,
|
|
34953
34975
|
method: req.method,
|
|
@@ -34972,7 +34994,7 @@ const retryUntil = (callbackFn, retries = 10, timeoutBetweenAttempts = 1e3) => P
|
|
|
34972
34994
|
throw error;
|
|
34973
34995
|
});
|
|
34974
34996
|
|
|
34975
|
-
var __async$
|
|
34997
|
+
var __async$Z = (__this, __arguments, generator) => {
|
|
34976
34998
|
return new Promise((resolve, reject) => {
|
|
34977
34999
|
var fulfilled = (value) => {
|
|
34978
35000
|
try {
|
|
@@ -34995,7 +35017,7 @@ var __async$Y = (__this, __arguments, generator) => {
|
|
|
34995
35017
|
const useCreateAccountImage = () => {
|
|
34996
35018
|
const { client } = useShipEngine();
|
|
34997
35019
|
return reactQuery.useMutation({
|
|
34998
|
-
mutationFn: (data) => __async$
|
|
35020
|
+
mutationFn: (data) => __async$Z(void 0, null, function* () {
|
|
34999
35021
|
const result = yield client.accountSettings.createImage(data);
|
|
35000
35022
|
return result.data;
|
|
35001
35023
|
}),
|
|
@@ -35004,7 +35026,7 @@ const useCreateAccountImage = () => {
|
|
|
35004
35026
|
});
|
|
35005
35027
|
};
|
|
35006
35028
|
|
|
35007
|
-
var __async$
|
|
35029
|
+
var __async$Y = (__this, __arguments, generator) => {
|
|
35008
35030
|
return new Promise((resolve, reject) => {
|
|
35009
35031
|
var fulfilled = (value) => {
|
|
35010
35032
|
try {
|
|
@@ -35027,7 +35049,7 @@ var __async$X = (__this, __arguments, generator) => {
|
|
|
35027
35049
|
const useDeleteAccountImage = () => {
|
|
35028
35050
|
const { client } = useShipEngine();
|
|
35029
35051
|
return reactQuery.useMutation({
|
|
35030
|
-
mutationFn: (labelImageId) => __async$
|
|
35052
|
+
mutationFn: (labelImageId) => __async$Y(void 0, null, function* () {
|
|
35031
35053
|
const result = yield client.accountSettings.deleteImage(labelImageId);
|
|
35032
35054
|
return result.data;
|
|
35033
35055
|
}),
|
|
@@ -35056,7 +35078,7 @@ const useGetAccountSettings = () => {
|
|
|
35056
35078
|
});
|
|
35057
35079
|
};
|
|
35058
35080
|
|
|
35059
|
-
var __async$
|
|
35081
|
+
var __async$X = (__this, __arguments, generator) => {
|
|
35060
35082
|
return new Promise((resolve, reject) => {
|
|
35061
35083
|
var fulfilled = (value) => {
|
|
35062
35084
|
try {
|
|
@@ -35079,7 +35101,7 @@ var __async$W = (__this, __arguments, generator) => {
|
|
|
35079
35101
|
const useUpdateAccountImage = () => {
|
|
35080
35102
|
const { client } = useShipEngine();
|
|
35081
35103
|
return reactQuery.useMutation({
|
|
35082
|
-
mutationFn: (data) => __async$
|
|
35104
|
+
mutationFn: (data) => __async$X(void 0, null, function* () {
|
|
35083
35105
|
const result = yield client.accountSettings.updateImage(data);
|
|
35084
35106
|
return result.data;
|
|
35085
35107
|
}),
|
|
@@ -35088,7 +35110,7 @@ const useUpdateAccountImage = () => {
|
|
|
35088
35110
|
});
|
|
35089
35111
|
};
|
|
35090
35112
|
|
|
35091
|
-
var __async$
|
|
35113
|
+
var __async$W = (__this, __arguments, generator) => {
|
|
35092
35114
|
return new Promise((resolve, reject) => {
|
|
35093
35115
|
var fulfilled = (value) => {
|
|
35094
35116
|
try {
|
|
@@ -35111,7 +35133,7 @@ var __async$V = (__this, __arguments, generator) => {
|
|
|
35111
35133
|
const useUpdateAccountSettings = () => {
|
|
35112
35134
|
const { client } = useShipEngine();
|
|
35113
35135
|
return reactQuery.useMutation({
|
|
35114
|
-
mutationFn: (settings) => __async$
|
|
35136
|
+
mutationFn: (settings) => __async$W(void 0, null, function* () {
|
|
35115
35137
|
const result = yield client.accountSettings.update(settings);
|
|
35116
35138
|
return result.data;
|
|
35117
35139
|
}),
|
|
@@ -35120,28 +35142,28 @@ const useUpdateAccountSettings = () => {
|
|
|
35120
35142
|
});
|
|
35121
35143
|
};
|
|
35122
35144
|
|
|
35123
|
-
var __defProp$
|
|
35124
|
-
var __defProps$
|
|
35125
|
-
var __getOwnPropDescs$
|
|
35126
|
-
var __getOwnPropSymbols$
|
|
35127
|
-
var __hasOwnProp$
|
|
35128
|
-
var __propIsEnum$
|
|
35129
|
-
var __defNormalProp$
|
|
35130
|
-
var __spreadValues$
|
|
35145
|
+
var __defProp$I = Object.defineProperty;
|
|
35146
|
+
var __defProps$F = Object.defineProperties;
|
|
35147
|
+
var __getOwnPropDescs$F = Object.getOwnPropertyDescriptors;
|
|
35148
|
+
var __getOwnPropSymbols$R = Object.getOwnPropertySymbols;
|
|
35149
|
+
var __hasOwnProp$R = Object.prototype.hasOwnProperty;
|
|
35150
|
+
var __propIsEnum$R = Object.prototype.propertyIsEnumerable;
|
|
35151
|
+
var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
35152
|
+
var __spreadValues$I = (a, b) => {
|
|
35131
35153
|
for (var prop in b || (b = {}))
|
|
35132
|
-
if (__hasOwnProp$
|
|
35133
|
-
__defNormalProp$
|
|
35134
|
-
if (__getOwnPropSymbols$
|
|
35135
|
-
for (var prop of __getOwnPropSymbols$
|
|
35136
|
-
if (__propIsEnum$
|
|
35137
|
-
__defNormalProp$
|
|
35154
|
+
if (__hasOwnProp$R.call(b, prop))
|
|
35155
|
+
__defNormalProp$I(a, prop, b[prop]);
|
|
35156
|
+
if (__getOwnPropSymbols$R)
|
|
35157
|
+
for (var prop of __getOwnPropSymbols$R(b)) {
|
|
35158
|
+
if (__propIsEnum$R.call(b, prop))
|
|
35159
|
+
__defNormalProp$I(a, prop, b[prop]);
|
|
35138
35160
|
}
|
|
35139
35161
|
return a;
|
|
35140
35162
|
};
|
|
35141
|
-
var __spreadProps$
|
|
35163
|
+
var __spreadProps$F = (a, b) => __defProps$F(a, __getOwnPropDescs$F(b));
|
|
35142
35164
|
const useListAccountAddons = (params) => {
|
|
35143
35165
|
const { client } = useShipEngine();
|
|
35144
|
-
return reactQuery.useQuery(__spreadProps$
|
|
35166
|
+
return reactQuery.useQuery(__spreadProps$F(__spreadValues$I({}, params), {
|
|
35145
35167
|
onError,
|
|
35146
35168
|
queryFn: () => client.accountAddons.list(),
|
|
35147
35169
|
queryKey: ["useListAccountAddons"],
|
|
@@ -35149,7 +35171,7 @@ const useListAccountAddons = (params) => {
|
|
|
35149
35171
|
}));
|
|
35150
35172
|
};
|
|
35151
35173
|
|
|
35152
|
-
var __async$
|
|
35174
|
+
var __async$V = (__this, __arguments, generator) => {
|
|
35153
35175
|
return new Promise((resolve, reject) => {
|
|
35154
35176
|
var fulfilled = (value) => {
|
|
35155
35177
|
try {
|
|
@@ -35172,7 +35194,7 @@ var __async$U = (__this, __arguments, generator) => {
|
|
|
35172
35194
|
const useParseAddress = () => {
|
|
35173
35195
|
const { client } = useShipEngine();
|
|
35174
35196
|
return reactQuery.useMutation({
|
|
35175
|
-
mutationFn: (_0) => __async$
|
|
35197
|
+
mutationFn: (_0) => __async$V(void 0, [_0], function* ({ address, text }) {
|
|
35176
35198
|
const result = yield client.addresses.parse(text, address);
|
|
35177
35199
|
return result.data;
|
|
35178
35200
|
}),
|
|
@@ -35181,7 +35203,7 @@ const useParseAddress = () => {
|
|
|
35181
35203
|
});
|
|
35182
35204
|
};
|
|
35183
35205
|
|
|
35184
|
-
var __async$
|
|
35206
|
+
var __async$U = (__this, __arguments, generator) => {
|
|
35185
35207
|
return new Promise((resolve, reject) => {
|
|
35186
35208
|
var fulfilled = (value) => {
|
|
35187
35209
|
try {
|
|
@@ -35204,7 +35226,7 @@ var __async$T = (__this, __arguments, generator) => {
|
|
|
35204
35226
|
const useValidateAddresses = () => {
|
|
35205
35227
|
const { client } = useShipEngine();
|
|
35206
35228
|
return reactQuery.useMutation({
|
|
35207
|
-
mutationFn: (addresses) => __async$
|
|
35229
|
+
mutationFn: (addresses) => __async$U(void 0, null, function* () {
|
|
35208
35230
|
const result = yield client.addresses.validate(addresses);
|
|
35209
35231
|
return result.data;
|
|
35210
35232
|
}),
|
|
@@ -35213,6 +35235,87 @@ const useValidateAddresses = () => {
|
|
|
35213
35235
|
});
|
|
35214
35236
|
};
|
|
35215
35237
|
|
|
35238
|
+
var __defProp$H = Object.defineProperty;
|
|
35239
|
+
var __defProps$E = Object.defineProperties;
|
|
35240
|
+
var __getOwnPropDescs$E = Object.getOwnPropertyDescriptors;
|
|
35241
|
+
var __getOwnPropSymbols$Q = Object.getOwnPropertySymbols;
|
|
35242
|
+
var __hasOwnProp$Q = Object.prototype.hasOwnProperty;
|
|
35243
|
+
var __propIsEnum$Q = Object.prototype.propertyIsEnumerable;
|
|
35244
|
+
var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
35245
|
+
var __spreadValues$H = (a, b) => {
|
|
35246
|
+
for (var prop in b || (b = {}))
|
|
35247
|
+
if (__hasOwnProp$Q.call(b, prop))
|
|
35248
|
+
__defNormalProp$H(a, prop, b[prop]);
|
|
35249
|
+
if (__getOwnPropSymbols$Q)
|
|
35250
|
+
for (var prop of __getOwnPropSymbols$Q(b)) {
|
|
35251
|
+
if (__propIsEnum$Q.call(b, prop))
|
|
35252
|
+
__defNormalProp$H(a, prop, b[prop]);
|
|
35253
|
+
}
|
|
35254
|
+
return a;
|
|
35255
|
+
};
|
|
35256
|
+
var __spreadProps$E = (a, b) => __defProps$E(a, __getOwnPropDescs$E(b));
|
|
35257
|
+
var __async$T = (__this, __arguments, generator) => {
|
|
35258
|
+
return new Promise((resolve, reject) => {
|
|
35259
|
+
var fulfilled = (value) => {
|
|
35260
|
+
try {
|
|
35261
|
+
step(generator.next(value));
|
|
35262
|
+
} catch (e) {
|
|
35263
|
+
reject(e);
|
|
35264
|
+
}
|
|
35265
|
+
};
|
|
35266
|
+
var rejected = (value) => {
|
|
35267
|
+
try {
|
|
35268
|
+
step(generator.throw(value));
|
|
35269
|
+
} catch (e) {
|
|
35270
|
+
reject(e);
|
|
35271
|
+
}
|
|
35272
|
+
};
|
|
35273
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
35274
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
35275
|
+
});
|
|
35276
|
+
};
|
|
35277
|
+
const useCreateAuctanePaySession = (params) => {
|
|
35278
|
+
const { client } = useShipEngine();
|
|
35279
|
+
return reactQuery.useMutation(__spreadProps$E(__spreadValues$H({}, params), {
|
|
35280
|
+
mutationFn: (request) => __async$T(void 0, null, function* () {
|
|
35281
|
+
const result = yield client.auctanePay.createSession(request);
|
|
35282
|
+
return result.data;
|
|
35283
|
+
}),
|
|
35284
|
+
mutationKey: ["useCreateAuctanePaySession"],
|
|
35285
|
+
onError
|
|
35286
|
+
}));
|
|
35287
|
+
};
|
|
35288
|
+
|
|
35289
|
+
var __defProp$G = Object.defineProperty;
|
|
35290
|
+
var __defProps$D = Object.defineProperties;
|
|
35291
|
+
var __getOwnPropDescs$D = Object.getOwnPropertyDescriptors;
|
|
35292
|
+
var __getOwnPropSymbols$P = Object.getOwnPropertySymbols;
|
|
35293
|
+
var __hasOwnProp$P = Object.prototype.hasOwnProperty;
|
|
35294
|
+
var __propIsEnum$P = Object.prototype.propertyIsEnumerable;
|
|
35295
|
+
var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
35296
|
+
var __spreadValues$G = (a, b) => {
|
|
35297
|
+
for (var prop in b || (b = {}))
|
|
35298
|
+
if (__hasOwnProp$P.call(b, prop))
|
|
35299
|
+
__defNormalProp$G(a, prop, b[prop]);
|
|
35300
|
+
if (__getOwnPropSymbols$P)
|
|
35301
|
+
for (var prop of __getOwnPropSymbols$P(b)) {
|
|
35302
|
+
if (__propIsEnum$P.call(b, prop))
|
|
35303
|
+
__defNormalProp$G(a, prop, b[prop]);
|
|
35304
|
+
}
|
|
35305
|
+
return a;
|
|
35306
|
+
};
|
|
35307
|
+
var __spreadProps$D = (a, b) => __defProps$D(a, __getOwnPropDescs$D(b));
|
|
35308
|
+
const useGetAuctanePayConfig = (params) => {
|
|
35309
|
+
const { client } = useShipEngine();
|
|
35310
|
+
const queryParams = __spreadValues$G({}, params);
|
|
35311
|
+
return reactQuery.useQuery(__spreadProps$D(__spreadValues$G({}, queryParams), {
|
|
35312
|
+
onError,
|
|
35313
|
+
queryFn: () => client.auctanePay.getConfig(),
|
|
35314
|
+
queryKey: ["useGetAuctanePayConfig"],
|
|
35315
|
+
select: (result) => result.data
|
|
35316
|
+
}));
|
|
35317
|
+
};
|
|
35318
|
+
|
|
35216
35319
|
var __defProp$F = Object.defineProperty;
|
|
35217
35320
|
var __defProps$C = Object.defineProperties;
|
|
35218
35321
|
var __getOwnPropDescs$C = Object.getOwnPropertyDescriptors;
|
|
@@ -35252,14 +35355,18 @@ var __async$S = (__this, __arguments, generator) => {
|
|
|
35252
35355
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
35253
35356
|
});
|
|
35254
35357
|
};
|
|
35255
|
-
const
|
|
35358
|
+
const usePreviewTransaction = (params) => {
|
|
35256
35359
|
const { client } = useShipEngine();
|
|
35257
35360
|
return reactQuery.useMutation(__spreadProps$C(__spreadValues$F({}, params), {
|
|
35258
|
-
mutationFn: (
|
|
35259
|
-
const
|
|
35361
|
+
mutationFn: (_0) => __async$S(void 0, [_0], function* ({ amount, transactionCategory = "add_funds" }) {
|
|
35362
|
+
const request = {
|
|
35363
|
+
amount,
|
|
35364
|
+
transactionCategory
|
|
35365
|
+
};
|
|
35366
|
+
const result = yield client.auctanePay.previewTransaction(request);
|
|
35260
35367
|
return result.data;
|
|
35261
35368
|
}),
|
|
35262
|
-
mutationKey: ["
|
|
35369
|
+
mutationKey: ["usePreviewTransaction"],
|
|
35263
35370
|
onError
|
|
35264
35371
|
}));
|
|
35265
35372
|
};
|
|
@@ -35283,13 +35390,13 @@ var __spreadValues$E = (a, b) => {
|
|
|
35283
35390
|
return a;
|
|
35284
35391
|
};
|
|
35285
35392
|
var __spreadProps$B = (a, b) => __defProps$B(a, __getOwnPropDescs$B(b));
|
|
35286
|
-
const
|
|
35393
|
+
const useGetPaymentMethods = (params) => {
|
|
35287
35394
|
const { client } = useShipEngine();
|
|
35288
35395
|
const queryParams = __spreadValues$E({}, params);
|
|
35289
35396
|
return reactQuery.useQuery(__spreadProps$B(__spreadValues$E({}, queryParams), {
|
|
35290
35397
|
onError,
|
|
35291
|
-
queryFn: () => client.auctanePay.
|
|
35292
|
-
queryKey: ["
|
|
35398
|
+
queryFn: () => client.auctanePay.getPaymentMethods(),
|
|
35399
|
+
queryKey: ["useGetPaymentMethods"],
|
|
35293
35400
|
select: (result) => result.data
|
|
35294
35401
|
}));
|
|
35295
35402
|
};
|
|
@@ -35333,18 +35440,14 @@ var __async$R = (__this, __arguments, generator) => {
|
|
|
35333
35440
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
35334
35441
|
});
|
|
35335
35442
|
};
|
|
35336
|
-
const
|
|
35443
|
+
const useDeletePaymentMethod = (params) => {
|
|
35337
35444
|
const { client } = useShipEngine();
|
|
35338
35445
|
return reactQuery.useMutation(__spreadProps$A(__spreadValues$D({}, params), {
|
|
35339
|
-
mutationFn: (
|
|
35340
|
-
const
|
|
35341
|
-
amount,
|
|
35342
|
-
transactionCategory
|
|
35343
|
-
};
|
|
35344
|
-
const result = yield client.auctanePay.previewTransaction(request);
|
|
35446
|
+
mutationFn: (paymentMethodId) => __async$R(void 0, null, function* () {
|
|
35447
|
+
const result = yield client.auctanePay.deletePaymentMethod(paymentMethodId);
|
|
35345
35448
|
return result.data;
|
|
35346
35449
|
}),
|
|
35347
|
-
mutationKey: ["
|
|
35450
|
+
mutationKey: ["useDeletePaymentMethod"],
|
|
35348
35451
|
onError
|
|
35349
35452
|
}));
|
|
35350
35453
|
};
|
|
@@ -35368,14 +35471,35 @@ var __spreadValues$C = (a, b) => {
|
|
|
35368
35471
|
return a;
|
|
35369
35472
|
};
|
|
35370
35473
|
var __spreadProps$z = (a, b) => __defProps$z(a, __getOwnPropDescs$z(b));
|
|
35371
|
-
|
|
35474
|
+
var __async$Q = (__this, __arguments, generator) => {
|
|
35475
|
+
return new Promise((resolve, reject) => {
|
|
35476
|
+
var fulfilled = (value) => {
|
|
35477
|
+
try {
|
|
35478
|
+
step(generator.next(value));
|
|
35479
|
+
} catch (e) {
|
|
35480
|
+
reject(e);
|
|
35481
|
+
}
|
|
35482
|
+
};
|
|
35483
|
+
var rejected = (value) => {
|
|
35484
|
+
try {
|
|
35485
|
+
step(generator.throw(value));
|
|
35486
|
+
} catch (e) {
|
|
35487
|
+
reject(e);
|
|
35488
|
+
}
|
|
35489
|
+
};
|
|
35490
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
35491
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
35492
|
+
});
|
|
35493
|
+
};
|
|
35494
|
+
const useUpdatePaymentMethod = (params) => {
|
|
35372
35495
|
const { client } = useShipEngine();
|
|
35373
|
-
|
|
35374
|
-
|
|
35375
|
-
|
|
35376
|
-
|
|
35377
|
-
|
|
35378
|
-
|
|
35496
|
+
return reactQuery.useMutation(__spreadProps$z(__spreadValues$C({}, params), {
|
|
35497
|
+
mutationFn: (_0) => __async$Q(void 0, [_0], function* ({ paymentMethodId, payload }) {
|
|
35498
|
+
const result = yield client.auctanePay.updatePaymentMethod(paymentMethodId, payload);
|
|
35499
|
+
return result.data;
|
|
35500
|
+
}),
|
|
35501
|
+
mutationKey: ["useUpdatePaymentMethod"],
|
|
35502
|
+
onError
|
|
35379
35503
|
}));
|
|
35380
35504
|
};
|
|
35381
35505
|
|
|
@@ -35398,7 +35522,7 @@ var __spreadValues$B = (a, b) => {
|
|
|
35398
35522
|
return a;
|
|
35399
35523
|
};
|
|
35400
35524
|
var __spreadProps$y = (a, b) => __defProps$y(a, __getOwnPropDescs$y(b));
|
|
35401
|
-
var __async$
|
|
35525
|
+
var __async$P = (__this, __arguments, generator) => {
|
|
35402
35526
|
return new Promise((resolve, reject) => {
|
|
35403
35527
|
var fulfilled = (value) => {
|
|
35404
35528
|
try {
|
|
@@ -35418,14 +35542,14 @@ var __async$Q = (__this, __arguments, generator) => {
|
|
|
35418
35542
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
35419
35543
|
});
|
|
35420
35544
|
};
|
|
35421
|
-
const
|
|
35545
|
+
const useIdentityVerification = (params) => {
|
|
35422
35546
|
const { client } = useShipEngine();
|
|
35423
35547
|
return reactQuery.useMutation(__spreadProps$y(__spreadValues$B({}, params), {
|
|
35424
|
-
mutationFn: (
|
|
35425
|
-
const result = yield client.auctanePay.
|
|
35548
|
+
mutationFn: () => __async$P(void 0, null, function* () {
|
|
35549
|
+
const result = yield client.auctanePay.identityVerification();
|
|
35426
35550
|
return result.data;
|
|
35427
35551
|
}),
|
|
35428
|
-
mutationKey: ["
|
|
35552
|
+
mutationKey: ["useIdentityVerification"],
|
|
35429
35553
|
onError
|
|
35430
35554
|
}));
|
|
35431
35555
|
};
|
|
@@ -35449,35 +35573,14 @@ var __spreadValues$A = (a, b) => {
|
|
|
35449
35573
|
return a;
|
|
35450
35574
|
};
|
|
35451
35575
|
var __spreadProps$x = (a, b) => __defProps$x(a, __getOwnPropDescs$x(b));
|
|
35452
|
-
|
|
35453
|
-
return new Promise((resolve, reject) => {
|
|
35454
|
-
var fulfilled = (value) => {
|
|
35455
|
-
try {
|
|
35456
|
-
step(generator.next(value));
|
|
35457
|
-
} catch (e) {
|
|
35458
|
-
reject(e);
|
|
35459
|
-
}
|
|
35460
|
-
};
|
|
35461
|
-
var rejected = (value) => {
|
|
35462
|
-
try {
|
|
35463
|
-
step(generator.throw(value));
|
|
35464
|
-
} catch (e) {
|
|
35465
|
-
reject(e);
|
|
35466
|
-
}
|
|
35467
|
-
};
|
|
35468
|
-
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
35469
|
-
step((generator = generator.apply(__this, __arguments)).next());
|
|
35470
|
-
});
|
|
35471
|
-
};
|
|
35472
|
-
const useUpdatePaymentMethod = (params) => {
|
|
35576
|
+
const useGetPaymentAccount = (params) => {
|
|
35473
35577
|
const { client } = useShipEngine();
|
|
35474
|
-
|
|
35475
|
-
|
|
35476
|
-
|
|
35477
|
-
|
|
35478
|
-
|
|
35479
|
-
|
|
35480
|
-
onError
|
|
35578
|
+
const queryParams = __spreadValues$A({}, params);
|
|
35579
|
+
return reactQuery.useQuery(__spreadProps$x(__spreadValues$A({}, queryParams), {
|
|
35580
|
+
onError,
|
|
35581
|
+
queryFn: () => client.auctanePay.getPaymentAccount(),
|
|
35582
|
+
queryKey: ["useGetPaymentAccount"],
|
|
35583
|
+
select: (result) => result.data
|
|
35481
35584
|
}));
|
|
35482
35585
|
};
|
|
35483
35586
|
|
|
@@ -40117,6 +40220,7 @@ exports.useGetInsuranceFundingSourceAcceptedTerms = useGetInsuranceFundingSource
|
|
|
40117
40220
|
exports.useGetInvoiceAddress = useGetInvoiceAddress;
|
|
40118
40221
|
exports.useGetLabel = useGetLabel;
|
|
40119
40222
|
exports.useGetPackageRatingGroupByCarrier = useGetPackageRatingGroupByCarrier;
|
|
40223
|
+
exports.useGetPaymentAccount = useGetPaymentAccount;
|
|
40120
40224
|
exports.useGetPaymentMethods = useGetPaymentMethods;
|
|
40121
40225
|
exports.useGetRateCardById = useGetRateCardById;
|
|
40122
40226
|
exports.useGetSalesOrder = useGetSalesOrder;
|
|
@@ -40132,6 +40236,7 @@ exports.useGetShippingRuleConditionsOptions = useGetShippingRuleConditionsOption
|
|
|
40132
40236
|
exports.useGetThemeById = useGetThemeById;
|
|
40133
40237
|
exports.useGetZonesByCarrier = useGetZonesByCarrier;
|
|
40134
40238
|
exports.useI18n = useI18n;
|
|
40239
|
+
exports.useIdentityVerification = useIdentityVerification;
|
|
40135
40240
|
exports.useListAccountAddons = useListAccountAddons;
|
|
40136
40241
|
exports.useListCarrierConnections = useListCarrierConnections;
|
|
40137
40242
|
exports.useListCarriers = useListCarriers;
|