@shipengine/alchemy 6.0.33 → 6.0.35
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 +252 -182
- package/index.mjs +251 -183
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -4905,41 +4905,33 @@ var _getHolder = getHolder$2;
|
|
|
4905
4905
|
|
|
4906
4906
|
/** Used as references for various `Number` constants. */
|
|
4907
4907
|
|
|
4908
|
-
var
|
|
4909
|
-
var hasRequired_isIndex;
|
|
4908
|
+
var MAX_SAFE_INTEGER$1 = 9007199254740991;
|
|
4910
4909
|
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
hasRequired_isIndex = 1;
|
|
4914
|
-
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
4910
|
+
/** Used to detect unsigned integer values. */
|
|
4911
|
+
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
4915
4912
|
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
function isIndex(value, length) {
|
|
4928
|
-
var type = typeof value;
|
|
4929
|
-
length = length == null ? MAX_SAFE_INTEGER : length;
|
|
4930
|
-
|
|
4931
|
-
return !!length &&
|
|
4932
|
-
(type == 'number' ||
|
|
4933
|
-
(type != 'symbol' && reIsUint.test(value))) &&
|
|
4934
|
-
(value > -1 && value % 1 == 0 && value < length);
|
|
4935
|
-
}
|
|
4913
|
+
/**
|
|
4914
|
+
* Checks if `value` is a valid array-like index.
|
|
4915
|
+
*
|
|
4916
|
+
* @private
|
|
4917
|
+
* @param {*} value The value to check.
|
|
4918
|
+
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
|
4919
|
+
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
|
4920
|
+
*/
|
|
4921
|
+
function isIndex$3(value, length) {
|
|
4922
|
+
var type = typeof value;
|
|
4923
|
+
length = length == null ? MAX_SAFE_INTEGER$1 : length;
|
|
4936
4924
|
|
|
4937
|
-
|
|
4938
|
-
|
|
4925
|
+
return !!length &&
|
|
4926
|
+
(type == 'number' ||
|
|
4927
|
+
(type != 'symbol' && reIsUint.test(value))) &&
|
|
4928
|
+
(value > -1 && value % 1 == 0 && value < length);
|
|
4939
4929
|
}
|
|
4940
4930
|
|
|
4931
|
+
var _isIndex = isIndex$3;
|
|
4932
|
+
|
|
4941
4933
|
var copyArray$2 = _copyArray,
|
|
4942
|
-
isIndex$2 =
|
|
4934
|
+
isIndex$2 = _isIndex;
|
|
4943
4935
|
|
|
4944
4936
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
4945
4937
|
var nativeMin$1 = Math.min;
|
|
@@ -6132,7 +6124,7 @@ var baseTimes = _baseTimes,
|
|
|
6132
6124
|
isArguments$2 = requireIsArguments(),
|
|
6133
6125
|
isArray$f = isArray_1,
|
|
6134
6126
|
isBuffer$4 = isBufferExports,
|
|
6135
|
-
isIndex$1 =
|
|
6127
|
+
isIndex$1 = _isIndex,
|
|
6136
6128
|
isTypedArray$1 = requireIsTypedArray();
|
|
6137
6129
|
|
|
6138
6130
|
/** Used for built-in method references. */
|
|
@@ -9463,7 +9455,7 @@ var _baseHasIn = baseHasIn$1;
|
|
|
9463
9455
|
var castPath = _castPath,
|
|
9464
9456
|
isArguments$1 = requireIsArguments(),
|
|
9465
9457
|
isArray$8 = isArray_1,
|
|
9466
|
-
isIndex =
|
|
9458
|
+
isIndex = _isIndex,
|
|
9467
9459
|
isLength = isLength_1,
|
|
9468
9460
|
toKey$3 = _toKey;
|
|
9469
9461
|
|
|
@@ -10353,7 +10345,7 @@ function require_isIterateeCall () {
|
|
|
10353
10345
|
hasRequired_isIterateeCall = 1;
|
|
10354
10346
|
var eq = requireEq(),
|
|
10355
10347
|
isArrayLike = isArrayLike_1,
|
|
10356
|
-
isIndex =
|
|
10348
|
+
isIndex = _isIndex,
|
|
10357
10349
|
isObject = isObject_1;
|
|
10358
10350
|
|
|
10359
10351
|
/**
|
|
@@ -10820,17 +10812,17 @@ var AccountBillingPlanChangeType = /* @__PURE__ */ ((AccountBillingPlanChangeTyp
|
|
|
10820
10812
|
return AccountBillingPlanChangeType2;
|
|
10821
10813
|
})(AccountBillingPlanChangeType || {});
|
|
10822
10814
|
|
|
10823
|
-
var __getOwnPropSymbols$
|
|
10824
|
-
var __hasOwnProp$
|
|
10825
|
-
var __propIsEnum$
|
|
10815
|
+
var __getOwnPropSymbols$J = Object.getOwnPropertySymbols;
|
|
10816
|
+
var __hasOwnProp$J = Object.prototype.hasOwnProperty;
|
|
10817
|
+
var __propIsEnum$J = Object.prototype.propertyIsEnumerable;
|
|
10826
10818
|
var __objRest$q = (source, exclude) => {
|
|
10827
10819
|
var target = {};
|
|
10828
10820
|
for (var prop in source)
|
|
10829
|
-
if (__hasOwnProp$
|
|
10821
|
+
if (__hasOwnProp$J.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
10830
10822
|
target[prop] = source[prop];
|
|
10831
|
-
if (source != null && __getOwnPropSymbols$
|
|
10832
|
-
for (var prop of __getOwnPropSymbols$
|
|
10833
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
10823
|
+
if (source != null && __getOwnPropSymbols$J)
|
|
10824
|
+
for (var prop of __getOwnPropSymbols$J(source)) {
|
|
10825
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$J.call(source, prop))
|
|
10834
10826
|
target[prop] = source[prop];
|
|
10835
10827
|
}
|
|
10836
10828
|
return target;
|
|
@@ -10965,17 +10957,17 @@ const types = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
10965
10957
|
RateCardStatus
|
|
10966
10958
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
10967
10959
|
|
|
10968
|
-
var __getOwnPropSymbols$
|
|
10969
|
-
var __hasOwnProp$
|
|
10970
|
-
var __propIsEnum$
|
|
10960
|
+
var __getOwnPropSymbols$I = Object.getOwnPropertySymbols;
|
|
10961
|
+
var __hasOwnProp$I = Object.prototype.hasOwnProperty;
|
|
10962
|
+
var __propIsEnum$I = Object.prototype.propertyIsEnumerable;
|
|
10971
10963
|
var __objRest$p = (source, exclude) => {
|
|
10972
10964
|
var target = {};
|
|
10973
10965
|
for (var prop in source)
|
|
10974
|
-
if (__hasOwnProp$
|
|
10966
|
+
if (__hasOwnProp$I.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
10975
10967
|
target[prop] = source[prop];
|
|
10976
|
-
if (source != null && __getOwnPropSymbols$
|
|
10977
|
-
for (var prop of __getOwnPropSymbols$
|
|
10978
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
10968
|
+
if (source != null && __getOwnPropSymbols$I)
|
|
10969
|
+
for (var prop of __getOwnPropSymbols$I(source)) {
|
|
10970
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$I.call(source, prop))
|
|
10979
10971
|
target[prop] = source[prop];
|
|
10980
10972
|
}
|
|
10981
10973
|
return target;
|
|
@@ -11050,6 +11042,22 @@ class AddressesAPI {
|
|
|
11050
11042
|
}
|
|
11051
11043
|
}
|
|
11052
11044
|
|
|
11045
|
+
class AuctanePayAPI {
|
|
11046
|
+
constructor(client) {
|
|
11047
|
+
this.client = client;
|
|
11048
|
+
/**
|
|
11049
|
+
* The `createSession` method creates a new payment session.
|
|
11050
|
+
*
|
|
11051
|
+
* @param request - The request object containing the session details
|
|
11052
|
+
* @returns a promise that resolves to the created session
|
|
11053
|
+
*/
|
|
11054
|
+
this.createSession = (request) => {
|
|
11055
|
+
return this.client.post("/internal/auctane_pay/sessions", request);
|
|
11056
|
+
};
|
|
11057
|
+
this.client = client;
|
|
11058
|
+
}
|
|
11059
|
+
}
|
|
11060
|
+
|
|
11053
11061
|
const isCodedErrors = (errs) => Array.isArray(errs) && errs.every((err) => isCodedError(err));
|
|
11054
11062
|
const isCodedError = (err) => !!err.errorCode;
|
|
11055
11063
|
const isDataCodedErrors = (data) => !!data.errors && isCodedErrors(data.errors);
|
|
@@ -13717,7 +13725,7 @@ var ipaddr = {
|
|
|
13717
13725
|
}).call(commonjsGlobal);
|
|
13718
13726
|
} (ipaddr));
|
|
13719
13727
|
|
|
13720
|
-
var __async$
|
|
13728
|
+
var __async$Z = (__this, __arguments, generator) => {
|
|
13721
13729
|
return new Promise((resolve, reject) => {
|
|
13722
13730
|
var fulfilled = (value) => {
|
|
13723
13731
|
try {
|
|
@@ -13737,7 +13745,7 @@ var __async$Y = (__this, __arguments, generator) => {
|
|
|
13737
13745
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
13738
13746
|
});
|
|
13739
13747
|
};
|
|
13740
|
-
const getEndUserIpAddress = () => __async$
|
|
13748
|
+
const getEndUserIpAddress = () => __async$Z(void 0, null, function* () {
|
|
13741
13749
|
try {
|
|
13742
13750
|
const response = yield axios.get("https://api.ipify.org/?format=json");
|
|
13743
13751
|
if (response.data.ip && ipaddrExports.isValid(response.data.ip)) {
|
|
@@ -13794,38 +13802,38 @@ const decamelizeKeys = (obj, separator = "_") => {
|
|
|
13794
13802
|
return obj;
|
|
13795
13803
|
};
|
|
13796
13804
|
|
|
13797
|
-
var __defProp$
|
|
13798
|
-
var __defProps$
|
|
13799
|
-
var __getOwnPropDescs$
|
|
13800
|
-
var __getOwnPropSymbols$
|
|
13801
|
-
var __hasOwnProp$
|
|
13802
|
-
var __propIsEnum$
|
|
13803
|
-
var __defNormalProp$
|
|
13804
|
-
var __spreadValues$
|
|
13805
|
+
var __defProp$w = Object.defineProperty;
|
|
13806
|
+
var __defProps$q = Object.defineProperties;
|
|
13807
|
+
var __getOwnPropDescs$q = Object.getOwnPropertyDescriptors;
|
|
13808
|
+
var __getOwnPropSymbols$H = Object.getOwnPropertySymbols;
|
|
13809
|
+
var __hasOwnProp$H = Object.prototype.hasOwnProperty;
|
|
13810
|
+
var __propIsEnum$H = Object.prototype.propertyIsEnumerable;
|
|
13811
|
+
var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13812
|
+
var __spreadValues$w = (a, b) => {
|
|
13805
13813
|
for (var prop in b || (b = {}))
|
|
13806
|
-
if (__hasOwnProp$
|
|
13807
|
-
__defNormalProp$
|
|
13808
|
-
if (__getOwnPropSymbols$
|
|
13809
|
-
for (var prop of __getOwnPropSymbols$
|
|
13810
|
-
if (__propIsEnum$
|
|
13811
|
-
__defNormalProp$
|
|
13814
|
+
if (__hasOwnProp$H.call(b, prop))
|
|
13815
|
+
__defNormalProp$w(a, prop, b[prop]);
|
|
13816
|
+
if (__getOwnPropSymbols$H)
|
|
13817
|
+
for (var prop of __getOwnPropSymbols$H(b)) {
|
|
13818
|
+
if (__propIsEnum$H.call(b, prop))
|
|
13819
|
+
__defNormalProp$w(a, prop, b[prop]);
|
|
13812
13820
|
}
|
|
13813
13821
|
return a;
|
|
13814
13822
|
};
|
|
13815
|
-
var __spreadProps$
|
|
13823
|
+
var __spreadProps$q = (a, b) => __defProps$q(a, __getOwnPropDescs$q(b));
|
|
13816
13824
|
var __objRest$o = (source, exclude) => {
|
|
13817
13825
|
var target = {};
|
|
13818
13826
|
for (var prop in source)
|
|
13819
|
-
if (__hasOwnProp$
|
|
13827
|
+
if (__hasOwnProp$H.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
13820
13828
|
target[prop] = source[prop];
|
|
13821
|
-
if (source != null && __getOwnPropSymbols$
|
|
13822
|
-
for (var prop of __getOwnPropSymbols$
|
|
13823
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
13829
|
+
if (source != null && __getOwnPropSymbols$H)
|
|
13830
|
+
for (var prop of __getOwnPropSymbols$H(source)) {
|
|
13831
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$H.call(source, prop))
|
|
13824
13832
|
target[prop] = source[prop];
|
|
13825
13833
|
}
|
|
13826
13834
|
return target;
|
|
13827
13835
|
};
|
|
13828
|
-
var __async$
|
|
13836
|
+
var __async$Y = (__this, __arguments, generator) => {
|
|
13829
13837
|
return new Promise((resolve, reject) => {
|
|
13830
13838
|
var fulfilled = (value) => {
|
|
13831
13839
|
try {
|
|
@@ -13865,12 +13873,12 @@ class CarriersAPI {
|
|
|
13865
13873
|
/**
|
|
13866
13874
|
* The `connect` method connects a carrier account to a user's ShipEngine account.
|
|
13867
13875
|
*/
|
|
13868
|
-
this.connect = (_a) => __async$
|
|
13876
|
+
this.connect = (_a) => __async$Y(this, null, function* () {
|
|
13869
13877
|
var _b = _a, { carrierCode } = _b, connection = __objRest$o(_b, ["carrierCode"]);
|
|
13870
13878
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
13871
13879
|
if (!endUserIpAddress)
|
|
13872
13880
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
13873
|
-
return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$
|
|
13881
|
+
return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$q(__spreadValues$w({}, connection), {
|
|
13874
13882
|
endUserIpAddress
|
|
13875
13883
|
}));
|
|
13876
13884
|
});
|
|
@@ -13956,7 +13964,7 @@ class CarriersAPI {
|
|
|
13956
13964
|
}
|
|
13957
13965
|
}
|
|
13958
13966
|
|
|
13959
|
-
var __async$
|
|
13967
|
+
var __async$X = (__this, __arguments, generator) => {
|
|
13960
13968
|
return new Promise((resolve, reject) => {
|
|
13961
13969
|
var fulfilled = (value) => {
|
|
13962
13970
|
try {
|
|
@@ -13998,7 +14006,7 @@ class ConnectionsAPI {
|
|
|
13998
14006
|
/**
|
|
13999
14007
|
* The `connectCarrier` method connects a carrier to account.
|
|
14000
14008
|
*/
|
|
14001
|
-
this.connectCarrier = (carrierName, formData) => __async$
|
|
14009
|
+
this.connectCarrier = (carrierName, formData) => __async$X(this, null, function* () {
|
|
14002
14010
|
return yield this.client.post(
|
|
14003
14011
|
`/v1/connections/carriers/${carrierName}`,
|
|
14004
14012
|
formData,
|
|
@@ -16173,23 +16181,23 @@ class CustomPackagesAPI {
|
|
|
16173
16181
|
}
|
|
16174
16182
|
}
|
|
16175
16183
|
|
|
16176
|
-
var __defProp$
|
|
16177
|
-
var __getOwnPropSymbols$
|
|
16178
|
-
var __hasOwnProp$
|
|
16179
|
-
var __propIsEnum$
|
|
16180
|
-
var __defNormalProp$
|
|
16181
|
-
var __spreadValues$
|
|
16184
|
+
var __defProp$v = Object.defineProperty;
|
|
16185
|
+
var __getOwnPropSymbols$G = Object.getOwnPropertySymbols;
|
|
16186
|
+
var __hasOwnProp$G = Object.prototype.hasOwnProperty;
|
|
16187
|
+
var __propIsEnum$G = Object.prototype.propertyIsEnumerable;
|
|
16188
|
+
var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16189
|
+
var __spreadValues$v = (a, b) => {
|
|
16182
16190
|
for (var prop in b || (b = {}))
|
|
16183
|
-
if (__hasOwnProp$
|
|
16184
|
-
__defNormalProp$
|
|
16185
|
-
if (__getOwnPropSymbols$
|
|
16186
|
-
for (var prop of __getOwnPropSymbols$
|
|
16187
|
-
if (__propIsEnum$
|
|
16188
|
-
__defNormalProp$
|
|
16191
|
+
if (__hasOwnProp$G.call(b, prop))
|
|
16192
|
+
__defNormalProp$v(a, prop, b[prop]);
|
|
16193
|
+
if (__getOwnPropSymbols$G)
|
|
16194
|
+
for (var prop of __getOwnPropSymbols$G(b)) {
|
|
16195
|
+
if (__propIsEnum$G.call(b, prop))
|
|
16196
|
+
__defNormalProp$v(a, prop, b[prop]);
|
|
16189
16197
|
}
|
|
16190
16198
|
return a;
|
|
16191
16199
|
};
|
|
16192
|
-
var __async$
|
|
16200
|
+
var __async$W = (__this, __arguments, generator) => {
|
|
16193
16201
|
return new Promise((resolve, reject) => {
|
|
16194
16202
|
var fulfilled = (value) => {
|
|
16195
16203
|
try {
|
|
@@ -16228,12 +16236,12 @@ class FundingSourcesAPI {
|
|
|
16228
16236
|
* The `create` method creates a new funding source for a given user. This requires
|
|
16229
16237
|
* payment information to be collected from the user.
|
|
16230
16238
|
*/
|
|
16231
|
-
this.create = (createFundingSource) => __async$
|
|
16239
|
+
this.create = (createFundingSource) => __async$W(this, null, function* () {
|
|
16232
16240
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16233
16241
|
if (!endUserIpAddress) {
|
|
16234
16242
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
16235
16243
|
}
|
|
16236
|
-
return yield this.client.post("/v1/funding_sources", __spreadValues$
|
|
16244
|
+
return yield this.client.post("/v1/funding_sources", __spreadValues$v({
|
|
16237
16245
|
endUserIpAddress
|
|
16238
16246
|
}, createFundingSource));
|
|
16239
16247
|
});
|
|
@@ -16242,7 +16250,7 @@ class FundingSourcesAPI {
|
|
|
16242
16250
|
* user to update the billing address or payment information associated with the
|
|
16243
16251
|
* funding source.
|
|
16244
16252
|
*/
|
|
16245
|
-
this.update = (billingInfo, creditCardInfo, auctanePayInfo, fundingSourceId) => __async$
|
|
16253
|
+
this.update = (billingInfo, creditCardInfo, auctanePayInfo, fundingSourceId) => __async$W(this, null, function* () {
|
|
16246
16254
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16247
16255
|
if (!endUserIpAddress) {
|
|
16248
16256
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
@@ -16252,7 +16260,7 @@ class FundingSourcesAPI {
|
|
|
16252
16260
|
{
|
|
16253
16261
|
billingInfo,
|
|
16254
16262
|
endUserIpAddress,
|
|
16255
|
-
paymentMethod: __spreadValues$
|
|
16263
|
+
paymentMethod: __spreadValues$v({
|
|
16256
16264
|
creditCardInfo
|
|
16257
16265
|
}, auctanePayInfo)
|
|
16258
16266
|
}
|
|
@@ -16262,19 +16270,19 @@ class FundingSourcesAPI {
|
|
|
16262
16270
|
* The `registerCarrier` method registers a carrier account and associates
|
|
16263
16271
|
* it with a given funding source.
|
|
16264
16272
|
*/
|
|
16265
|
-
this.registerCarrier = (carrier) => __async$
|
|
16273
|
+
this.registerCarrier = (carrier) => __async$W(this, null, function* () {
|
|
16266
16274
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16267
16275
|
if (!endUserIpAddress) {
|
|
16268
16276
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
16269
16277
|
}
|
|
16270
|
-
return yield this.client.post("/v1/registration/funding_source", __spreadValues$
|
|
16278
|
+
return yield this.client.post("/v1/registration/funding_source", __spreadValues$v({
|
|
16271
16279
|
endUserIpAddress
|
|
16272
16280
|
}, carrier));
|
|
16273
16281
|
});
|
|
16274
16282
|
/**
|
|
16275
16283
|
* The `addFunds` method allows you to add funds to a funding source.
|
|
16276
16284
|
*/
|
|
16277
|
-
this.addFunds = (amount, fundingSourceId) => __async$
|
|
16285
|
+
this.addFunds = (amount, fundingSourceId) => __async$W(this, null, function* () {
|
|
16278
16286
|
return yield this.client.put(
|
|
16279
16287
|
`/v1/funding_sources/${fundingSourceId}/add_funds`,
|
|
16280
16288
|
amount
|
|
@@ -16284,7 +16292,7 @@ class FundingSourcesAPI {
|
|
|
16284
16292
|
* The `metadata` method returns seller-specific requirements for creating funding sources
|
|
16285
16293
|
* and attaching carriers
|
|
16286
16294
|
*/
|
|
16287
|
-
this.metadata = () => __async$
|
|
16295
|
+
this.metadata = () => __async$W(this, null, function* () {
|
|
16288
16296
|
return yield this.client.get("/v1/funding_sources/metadata");
|
|
16289
16297
|
});
|
|
16290
16298
|
/**
|
|
@@ -16336,7 +16344,7 @@ class InsuranceAPI {
|
|
|
16336
16344
|
}
|
|
16337
16345
|
}
|
|
16338
16346
|
|
|
16339
|
-
var __async$
|
|
16347
|
+
var __async$V = (__this, __arguments, generator) => {
|
|
16340
16348
|
return new Promise((resolve, reject) => {
|
|
16341
16349
|
var fulfilled = (value) => {
|
|
16342
16350
|
try {
|
|
@@ -16368,13 +16376,13 @@ class InvoiceAddressAPI {
|
|
|
16368
16376
|
/**
|
|
16369
16377
|
* The `create` method creates a new invoice address for a given user.
|
|
16370
16378
|
*/
|
|
16371
|
-
this.create = (invoiceAddress) => __async$
|
|
16379
|
+
this.create = (invoiceAddress) => __async$V(this, null, function* () {
|
|
16372
16380
|
return yield this.client.post("/v1/invoice_address", invoiceAddress);
|
|
16373
16381
|
});
|
|
16374
16382
|
/**
|
|
16375
16383
|
* The `update` method updates a invoice address for a given user.
|
|
16376
16384
|
*/
|
|
16377
|
-
this.update = (invoiceAddress) => __async$
|
|
16385
|
+
this.update = (invoiceAddress) => __async$V(this, null, function* () {
|
|
16378
16386
|
return yield this.client.put("/v1/invoice_address", invoiceAddress);
|
|
16379
16387
|
});
|
|
16380
16388
|
this.client = client;
|
|
@@ -16416,17 +16424,17 @@ class LabelsAPI {
|
|
|
16416
16424
|
}
|
|
16417
16425
|
}
|
|
16418
16426
|
|
|
16419
|
-
var __getOwnPropSymbols$
|
|
16420
|
-
var __hasOwnProp$
|
|
16421
|
-
var __propIsEnum$
|
|
16427
|
+
var __getOwnPropSymbols$F = Object.getOwnPropertySymbols;
|
|
16428
|
+
var __hasOwnProp$F = Object.prototype.hasOwnProperty;
|
|
16429
|
+
var __propIsEnum$F = Object.prototype.propertyIsEnumerable;
|
|
16422
16430
|
var __objRest$n = (source, exclude) => {
|
|
16423
16431
|
var target = {};
|
|
16424
16432
|
for (var prop in source)
|
|
16425
|
-
if (__hasOwnProp$
|
|
16433
|
+
if (__hasOwnProp$F.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
16426
16434
|
target[prop] = source[prop];
|
|
16427
|
-
if (source != null && __getOwnPropSymbols$
|
|
16428
|
-
for (var prop of __getOwnPropSymbols$
|
|
16429
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
16435
|
+
if (source != null && __getOwnPropSymbols$F)
|
|
16436
|
+
for (var prop of __getOwnPropSymbols$F(source)) {
|
|
16437
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$F.call(source, prop))
|
|
16430
16438
|
target[prop] = source[prop];
|
|
16431
16439
|
}
|
|
16432
16440
|
return target;
|
|
@@ -16547,19 +16555,19 @@ class RateCardsAPI {
|
|
|
16547
16555
|
}
|
|
16548
16556
|
}
|
|
16549
16557
|
|
|
16550
|
-
var __defProp$
|
|
16551
|
-
var __getOwnPropSymbols$
|
|
16552
|
-
var __hasOwnProp$
|
|
16553
|
-
var __propIsEnum$
|
|
16554
|
-
var __defNormalProp$
|
|
16555
|
-
var __spreadValues$
|
|
16558
|
+
var __defProp$u = Object.defineProperty;
|
|
16559
|
+
var __getOwnPropSymbols$E = Object.getOwnPropertySymbols;
|
|
16560
|
+
var __hasOwnProp$E = Object.prototype.hasOwnProperty;
|
|
16561
|
+
var __propIsEnum$E = Object.prototype.propertyIsEnumerable;
|
|
16562
|
+
var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16563
|
+
var __spreadValues$u = (a, b) => {
|
|
16556
16564
|
for (var prop in b || (b = {}))
|
|
16557
|
-
if (__hasOwnProp$
|
|
16558
|
-
__defNormalProp$
|
|
16559
|
-
if (__getOwnPropSymbols$
|
|
16560
|
-
for (var prop of __getOwnPropSymbols$
|
|
16561
|
-
if (__propIsEnum$
|
|
16562
|
-
__defNormalProp$
|
|
16565
|
+
if (__hasOwnProp$E.call(b, prop))
|
|
16566
|
+
__defNormalProp$u(a, prop, b[prop]);
|
|
16567
|
+
if (__getOwnPropSymbols$E)
|
|
16568
|
+
for (var prop of __getOwnPropSymbols$E(b)) {
|
|
16569
|
+
if (__propIsEnum$E.call(b, prop))
|
|
16570
|
+
__defNormalProp$u(a, prop, b[prop]);
|
|
16563
16571
|
}
|
|
16564
16572
|
return a;
|
|
16565
16573
|
};
|
|
@@ -16581,7 +16589,7 @@ class RatesAPI {
|
|
|
16581
16589
|
* method.
|
|
16582
16590
|
*/
|
|
16583
16591
|
this.estimate = (params) => {
|
|
16584
|
-
return this.client.post("/v1/rates/estimate", __spreadValues$
|
|
16592
|
+
return this.client.post("/v1/rates/estimate", __spreadValues$u({}, params));
|
|
16585
16593
|
};
|
|
16586
16594
|
this.client = client;
|
|
16587
16595
|
}
|
|
@@ -16661,7 +16669,7 @@ class SalesOrdersAPI {
|
|
|
16661
16669
|
}
|
|
16662
16670
|
}
|
|
16663
16671
|
|
|
16664
|
-
var __async$
|
|
16672
|
+
var __async$U = (__this, __arguments, generator) => {
|
|
16665
16673
|
return new Promise((resolve, reject) => {
|
|
16666
16674
|
var fulfilled = (value) => {
|
|
16667
16675
|
try {
|
|
@@ -16719,7 +16727,7 @@ class SellersAPI {
|
|
|
16719
16727
|
/**
|
|
16720
16728
|
* Deletes an API Key
|
|
16721
16729
|
*/
|
|
16722
|
-
this.deleteSellerApiKey = (_0) => __async$
|
|
16730
|
+
this.deleteSellerApiKey = (_0) => __async$U(this, [_0], function* ({
|
|
16723
16731
|
encryptedApiKey,
|
|
16724
16732
|
sellerId,
|
|
16725
16733
|
isSandbox
|
|
@@ -16765,19 +16773,19 @@ class SellersAPI {
|
|
|
16765
16773
|
}
|
|
16766
16774
|
}
|
|
16767
16775
|
|
|
16768
|
-
var __defProp$
|
|
16769
|
-
var __getOwnPropSymbols$
|
|
16770
|
-
var __hasOwnProp$
|
|
16771
|
-
var __propIsEnum$
|
|
16772
|
-
var __defNormalProp$
|
|
16773
|
-
var __spreadValues$
|
|
16776
|
+
var __defProp$t = Object.defineProperty;
|
|
16777
|
+
var __getOwnPropSymbols$D = Object.getOwnPropertySymbols;
|
|
16778
|
+
var __hasOwnProp$D = Object.prototype.hasOwnProperty;
|
|
16779
|
+
var __propIsEnum$D = Object.prototype.propertyIsEnumerable;
|
|
16780
|
+
var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16781
|
+
var __spreadValues$t = (a, b) => {
|
|
16774
16782
|
for (var prop in b || (b = {}))
|
|
16775
|
-
if (__hasOwnProp$
|
|
16776
|
-
__defNormalProp$
|
|
16777
|
-
if (__getOwnPropSymbols$
|
|
16778
|
-
for (var prop of __getOwnPropSymbols$
|
|
16779
|
-
if (__propIsEnum$
|
|
16780
|
-
__defNormalProp$
|
|
16783
|
+
if (__hasOwnProp$D.call(b, prop))
|
|
16784
|
+
__defNormalProp$t(a, prop, b[prop]);
|
|
16785
|
+
if (__getOwnPropSymbols$D)
|
|
16786
|
+
for (var prop of __getOwnPropSymbols$D(b)) {
|
|
16787
|
+
if (__propIsEnum$D.call(b, prop))
|
|
16788
|
+
__defNormalProp$t(a, prop, b[prop]);
|
|
16781
16789
|
}
|
|
16782
16790
|
return a;
|
|
16783
16791
|
};
|
|
@@ -16789,7 +16797,7 @@ class ServicePointsAPI {
|
|
|
16789
16797
|
* Either an address, coordinates, or an address query
|
|
16790
16798
|
*/
|
|
16791
16799
|
this.list = (options) => {
|
|
16792
|
-
return this.client.post("/v1/service_points/list", __spreadValues$
|
|
16800
|
+
return this.client.post("/v1/service_points/list", __spreadValues$t({}, options));
|
|
16793
16801
|
};
|
|
16794
16802
|
/**
|
|
16795
16803
|
* Get a specific service point by its carrier code, country code, and id
|
|
@@ -16807,7 +16815,7 @@ class ServicePointsAPI {
|
|
|
16807
16815
|
}
|
|
16808
16816
|
}
|
|
16809
16817
|
|
|
16810
|
-
var __async$
|
|
16818
|
+
var __async$T = (__this, __arguments, generator) => {
|
|
16811
16819
|
return new Promise((resolve, reject) => {
|
|
16812
16820
|
var fulfilled = (value) => {
|
|
16813
16821
|
try {
|
|
@@ -16856,7 +16864,7 @@ class ShipmentsAPI {
|
|
|
16856
16864
|
* The `create` method allows for creating shipments based on a list of shipment
|
|
16857
16865
|
* items passed into this method.
|
|
16858
16866
|
*/
|
|
16859
|
-
this.create = (...shipments) => __async$
|
|
16867
|
+
this.create = (...shipments) => __async$T(this, null, function* () {
|
|
16860
16868
|
return this.client.post("/v1/shipments", {
|
|
16861
16869
|
shipments
|
|
16862
16870
|
});
|
|
@@ -34248,26 +34256,26 @@ class WebhooksAPI {
|
|
|
34248
34256
|
}
|
|
34249
34257
|
}
|
|
34250
34258
|
|
|
34251
|
-
var __defProp$
|
|
34252
|
-
var __defProps$
|
|
34253
|
-
var __getOwnPropDescs$
|
|
34254
|
-
var __getOwnPropSymbols$
|
|
34255
|
-
var __hasOwnProp$
|
|
34256
|
-
var __propIsEnum$
|
|
34257
|
-
var __defNormalProp$
|
|
34258
|
-
var __spreadValues$
|
|
34259
|
+
var __defProp$s = Object.defineProperty;
|
|
34260
|
+
var __defProps$p = Object.defineProperties;
|
|
34261
|
+
var __getOwnPropDescs$p = Object.getOwnPropertyDescriptors;
|
|
34262
|
+
var __getOwnPropSymbols$C = Object.getOwnPropertySymbols;
|
|
34263
|
+
var __hasOwnProp$C = Object.prototype.hasOwnProperty;
|
|
34264
|
+
var __propIsEnum$C = Object.prototype.propertyIsEnumerable;
|
|
34265
|
+
var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
34266
|
+
var __spreadValues$s = (a, b) => {
|
|
34259
34267
|
for (var prop in b || (b = {}))
|
|
34260
|
-
if (__hasOwnProp$
|
|
34261
|
-
__defNormalProp$
|
|
34262
|
-
if (__getOwnPropSymbols$
|
|
34263
|
-
for (var prop of __getOwnPropSymbols$
|
|
34264
|
-
if (__propIsEnum$
|
|
34265
|
-
__defNormalProp$
|
|
34268
|
+
if (__hasOwnProp$C.call(b, prop))
|
|
34269
|
+
__defNormalProp$s(a, prop, b[prop]);
|
|
34270
|
+
if (__getOwnPropSymbols$C)
|
|
34271
|
+
for (var prop of __getOwnPropSymbols$C(b)) {
|
|
34272
|
+
if (__propIsEnum$C.call(b, prop))
|
|
34273
|
+
__defNormalProp$s(a, prop, b[prop]);
|
|
34266
34274
|
}
|
|
34267
34275
|
return a;
|
|
34268
34276
|
};
|
|
34269
|
-
var __spreadProps$
|
|
34270
|
-
var __async$
|
|
34277
|
+
var __spreadProps$p = (a, b) => __defProps$p(a, __getOwnPropDescs$p(b));
|
|
34278
|
+
var __async$S = (__this, __arguments, generator) => {
|
|
34271
34279
|
return new Promise((resolve, reject) => {
|
|
34272
34280
|
var fulfilled = (value) => {
|
|
34273
34281
|
try {
|
|
@@ -34290,7 +34298,7 @@ var __async$R = (__this, __arguments, generator) => {
|
|
|
34290
34298
|
const logger$1 = E({
|
|
34291
34299
|
level: process.env.NODE_ENV === "production" ? "fatal" : "info",
|
|
34292
34300
|
name: "shipengine-api",
|
|
34293
|
-
serializers: __spreadProps$
|
|
34301
|
+
serializers: __spreadProps$p(__spreadValues$s({}, k), {
|
|
34294
34302
|
req: (req) => ({
|
|
34295
34303
|
headers: req.headers,
|
|
34296
34304
|
method: req.method,
|
|
@@ -34315,7 +34323,7 @@ class ShipEngineAPI {
|
|
|
34315
34323
|
this.getSandboxToken = getSandboxToken;
|
|
34316
34324
|
const client = axios.create({
|
|
34317
34325
|
baseURL,
|
|
34318
|
-
headers: __spreadProps$
|
|
34326
|
+
headers: __spreadProps$p(__spreadValues$s({}, headers), {
|
|
34319
34327
|
"Content-Type": "application/json"
|
|
34320
34328
|
}),
|
|
34321
34329
|
paramsSerializer: (params) => lib.stringify(decamelizeKeys(params), { arrayFormat: "brackets" }),
|
|
@@ -34350,7 +34358,7 @@ class ShipEngineAPI {
|
|
|
34350
34358
|
});
|
|
34351
34359
|
client.defaults.headers.common["Authorization"] = `Bearer ${token}`;
|
|
34352
34360
|
client.interceptors.request.use(
|
|
34353
|
-
(config) => __async$
|
|
34361
|
+
(config) => __async$S(this, null, function* () {
|
|
34354
34362
|
if (config.isSandbox) {
|
|
34355
34363
|
if (!this.sandboxToken) {
|
|
34356
34364
|
this.sandboxToken = yield getSandboxToken == null ? void 0 : getSandboxToken();
|
|
@@ -34377,7 +34385,7 @@ class ShipEngineAPI {
|
|
|
34377
34385
|
);
|
|
34378
34386
|
return res;
|
|
34379
34387
|
},
|
|
34380
|
-
(err) => __async$
|
|
34388
|
+
(err) => __async$S(this, null, function* () {
|
|
34381
34389
|
var _a, _b, _c, _d, _e;
|
|
34382
34390
|
logger$1.error(
|
|
34383
34391
|
{ err, req: err.config, res: err.response },
|
|
@@ -34424,7 +34432,7 @@ class ShipEngineAPI {
|
|
|
34424
34432
|
* that token (also known as Seller ID)
|
|
34425
34433
|
*/
|
|
34426
34434
|
getTenant(isSandbox) {
|
|
34427
|
-
return __async$
|
|
34435
|
+
return __async$S(this, null, function* () {
|
|
34428
34436
|
var _a;
|
|
34429
34437
|
if (!isSandbox) {
|
|
34430
34438
|
return this.getTenantFromToken(this.token);
|
|
@@ -34637,6 +34645,15 @@ class ShipEngineAPI {
|
|
|
34637
34645
|
get sellers() {
|
|
34638
34646
|
return new SellersAPI(this.client);
|
|
34639
34647
|
}
|
|
34648
|
+
/**
|
|
34649
|
+
* The `auctanePay` method provides access to the Auctane Pay endpoints in ShipEngine
|
|
34650
|
+
* API. e.g. Create Payment Session
|
|
34651
|
+
*
|
|
34652
|
+
* @see {@link AuctanePayAPI | The Auctane Pay API module}
|
|
34653
|
+
*/
|
|
34654
|
+
get auctanePay() {
|
|
34655
|
+
return new AuctanePayAPI(this.client);
|
|
34656
|
+
}
|
|
34640
34657
|
}
|
|
34641
34658
|
|
|
34642
34659
|
const ShipEngineContext = React.createContext(void 0);
|
|
@@ -34703,25 +34720,25 @@ const delay = (ms) => new Promise((resolve) => {
|
|
|
34703
34720
|
|
|
34704
34721
|
const onError = (_errors) => _default();
|
|
34705
34722
|
|
|
34706
|
-
var __defProp$
|
|
34707
|
-
var __defProps$
|
|
34708
|
-
var __getOwnPropDescs$
|
|
34709
|
-
var __getOwnPropSymbols$
|
|
34710
|
-
var __hasOwnProp$
|
|
34711
|
-
var __propIsEnum$
|
|
34712
|
-
var __defNormalProp$
|
|
34713
|
-
var __spreadValues$
|
|
34723
|
+
var __defProp$r = Object.defineProperty;
|
|
34724
|
+
var __defProps$o = Object.defineProperties;
|
|
34725
|
+
var __getOwnPropDescs$o = Object.getOwnPropertyDescriptors;
|
|
34726
|
+
var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
|
|
34727
|
+
var __hasOwnProp$B = Object.prototype.hasOwnProperty;
|
|
34728
|
+
var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
|
|
34729
|
+
var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
34730
|
+
var __spreadValues$r = (a, b) => {
|
|
34714
34731
|
for (var prop in b || (b = {}))
|
|
34715
|
-
if (__hasOwnProp$
|
|
34716
|
-
__defNormalProp$
|
|
34717
|
-
if (__getOwnPropSymbols$
|
|
34718
|
-
for (var prop of __getOwnPropSymbols$
|
|
34719
|
-
if (__propIsEnum$
|
|
34720
|
-
__defNormalProp$
|
|
34732
|
+
if (__hasOwnProp$B.call(b, prop))
|
|
34733
|
+
__defNormalProp$r(a, prop, b[prop]);
|
|
34734
|
+
if (__getOwnPropSymbols$B)
|
|
34735
|
+
for (var prop of __getOwnPropSymbols$B(b)) {
|
|
34736
|
+
if (__propIsEnum$B.call(b, prop))
|
|
34737
|
+
__defNormalProp$r(a, prop, b[prop]);
|
|
34721
34738
|
}
|
|
34722
34739
|
return a;
|
|
34723
34740
|
};
|
|
34724
|
-
var __spreadProps$
|
|
34741
|
+
var __spreadProps$o = (a, b) => __defProps$o(a, __getOwnPropDescs$o(b));
|
|
34725
34742
|
const streams = [];
|
|
34726
34743
|
if (process.env.NODE_ENV === "production") {
|
|
34727
34744
|
streams.push({
|
|
@@ -34730,7 +34747,7 @@ if (process.env.NODE_ENV === "production") {
|
|
|
34730
34747
|
}
|
|
34731
34748
|
const logger = E({
|
|
34732
34749
|
name: "shipengine",
|
|
34733
|
-
serializers: __spreadProps$
|
|
34750
|
+
serializers: __spreadProps$o(__spreadValues$r({}, k), {
|
|
34734
34751
|
req: (req) => ({
|
|
34735
34752
|
headers: req.headers,
|
|
34736
34753
|
method: req.method,
|
|
@@ -34755,7 +34772,7 @@ const retryUntil = (callbackFn, retries = 10, timeoutBetweenAttempts = 1e3) => P
|
|
|
34755
34772
|
throw error;
|
|
34756
34773
|
});
|
|
34757
34774
|
|
|
34758
|
-
var __async$
|
|
34775
|
+
var __async$R = (__this, __arguments, generator) => {
|
|
34759
34776
|
return new Promise((resolve, reject) => {
|
|
34760
34777
|
var fulfilled = (value) => {
|
|
34761
34778
|
try {
|
|
@@ -34778,7 +34795,7 @@ var __async$Q = (__this, __arguments, generator) => {
|
|
|
34778
34795
|
const useCreateAccountImage = () => {
|
|
34779
34796
|
const { client } = useShipEngine();
|
|
34780
34797
|
return reactQuery.useMutation({
|
|
34781
|
-
mutationFn: (data) => __async$
|
|
34798
|
+
mutationFn: (data) => __async$R(void 0, null, function* () {
|
|
34782
34799
|
const result = yield client.accountSettings.createImage(data);
|
|
34783
34800
|
return result.data;
|
|
34784
34801
|
}),
|
|
@@ -34787,7 +34804,7 @@ const useCreateAccountImage = () => {
|
|
|
34787
34804
|
});
|
|
34788
34805
|
};
|
|
34789
34806
|
|
|
34790
|
-
var __async$
|
|
34807
|
+
var __async$Q = (__this, __arguments, generator) => {
|
|
34791
34808
|
return new Promise((resolve, reject) => {
|
|
34792
34809
|
var fulfilled = (value) => {
|
|
34793
34810
|
try {
|
|
@@ -34810,7 +34827,7 @@ var __async$P = (__this, __arguments, generator) => {
|
|
|
34810
34827
|
const useDeleteAccountImage = () => {
|
|
34811
34828
|
const { client } = useShipEngine();
|
|
34812
34829
|
return reactQuery.useMutation({
|
|
34813
|
-
mutationFn: (labelImageId) => __async$
|
|
34830
|
+
mutationFn: (labelImageId) => __async$Q(void 0, null, function* () {
|
|
34814
34831
|
const result = yield client.accountSettings.deleteImage(labelImageId);
|
|
34815
34832
|
return result.data;
|
|
34816
34833
|
}),
|
|
@@ -34839,7 +34856,7 @@ const useGetAccountSettings = () => {
|
|
|
34839
34856
|
});
|
|
34840
34857
|
};
|
|
34841
34858
|
|
|
34842
|
-
var __async$
|
|
34859
|
+
var __async$P = (__this, __arguments, generator) => {
|
|
34843
34860
|
return new Promise((resolve, reject) => {
|
|
34844
34861
|
var fulfilled = (value) => {
|
|
34845
34862
|
try {
|
|
@@ -34862,7 +34879,7 @@ var __async$O = (__this, __arguments, generator) => {
|
|
|
34862
34879
|
const useUpdateAccountImage = () => {
|
|
34863
34880
|
const { client } = useShipEngine();
|
|
34864
34881
|
return reactQuery.useMutation({
|
|
34865
|
-
mutationFn: (data) => __async$
|
|
34882
|
+
mutationFn: (data) => __async$P(void 0, null, function* () {
|
|
34866
34883
|
const result = yield client.accountSettings.updateImage(data);
|
|
34867
34884
|
return result.data;
|
|
34868
34885
|
}),
|
|
@@ -34871,7 +34888,7 @@ const useUpdateAccountImage = () => {
|
|
|
34871
34888
|
});
|
|
34872
34889
|
};
|
|
34873
34890
|
|
|
34874
|
-
var __async$
|
|
34891
|
+
var __async$O = (__this, __arguments, generator) => {
|
|
34875
34892
|
return new Promise((resolve, reject) => {
|
|
34876
34893
|
var fulfilled = (value) => {
|
|
34877
34894
|
try {
|
|
@@ -34894,7 +34911,7 @@ var __async$N = (__this, __arguments, generator) => {
|
|
|
34894
34911
|
const useUpdateAccountSettings = () => {
|
|
34895
34912
|
const { client } = useShipEngine();
|
|
34896
34913
|
return reactQuery.useMutation({
|
|
34897
|
-
mutationFn: (settings) => __async$
|
|
34914
|
+
mutationFn: (settings) => __async$O(void 0, null, function* () {
|
|
34898
34915
|
const result = yield client.accountSettings.update(settings);
|
|
34899
34916
|
return result.data;
|
|
34900
34917
|
}),
|
|
@@ -34903,7 +34920,7 @@ const useUpdateAccountSettings = () => {
|
|
|
34903
34920
|
});
|
|
34904
34921
|
};
|
|
34905
34922
|
|
|
34906
|
-
var __async$
|
|
34923
|
+
var __async$N = (__this, __arguments, generator) => {
|
|
34907
34924
|
return new Promise((resolve, reject) => {
|
|
34908
34925
|
var fulfilled = (value) => {
|
|
34909
34926
|
try {
|
|
@@ -34926,7 +34943,7 @@ var __async$M = (__this, __arguments, generator) => {
|
|
|
34926
34943
|
const useParseAddress = () => {
|
|
34927
34944
|
const { client } = useShipEngine();
|
|
34928
34945
|
return reactQuery.useMutation({
|
|
34929
|
-
mutationFn: (_0) => __async$
|
|
34946
|
+
mutationFn: (_0) => __async$N(void 0, [_0], function* ({ address, text }) {
|
|
34930
34947
|
const result = yield client.addresses.parse(text, address);
|
|
34931
34948
|
return result.data;
|
|
34932
34949
|
}),
|
|
@@ -34935,7 +34952,7 @@ const useParseAddress = () => {
|
|
|
34935
34952
|
});
|
|
34936
34953
|
};
|
|
34937
34954
|
|
|
34938
|
-
var __async$
|
|
34955
|
+
var __async$M = (__this, __arguments, generator) => {
|
|
34939
34956
|
return new Promise((resolve, reject) => {
|
|
34940
34957
|
var fulfilled = (value) => {
|
|
34941
34958
|
try {
|
|
@@ -34958,7 +34975,7 @@ var __async$L = (__this, __arguments, generator) => {
|
|
|
34958
34975
|
const useValidateAddresses = () => {
|
|
34959
34976
|
const { client } = useShipEngine();
|
|
34960
34977
|
return reactQuery.useMutation({
|
|
34961
|
-
mutationFn: (addresses) => __async$
|
|
34978
|
+
mutationFn: (addresses) => __async$M(void 0, null, function* () {
|
|
34962
34979
|
const result = yield client.addresses.validate(addresses);
|
|
34963
34980
|
return result.data;
|
|
34964
34981
|
}),
|
|
@@ -34967,6 +34984,57 @@ const useValidateAddresses = () => {
|
|
|
34967
34984
|
});
|
|
34968
34985
|
};
|
|
34969
34986
|
|
|
34987
|
+
var __defProp$q = Object.defineProperty;
|
|
34988
|
+
var __defProps$n = Object.defineProperties;
|
|
34989
|
+
var __getOwnPropDescs$n = Object.getOwnPropertyDescriptors;
|
|
34990
|
+
var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
|
|
34991
|
+
var __hasOwnProp$A = Object.prototype.hasOwnProperty;
|
|
34992
|
+
var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
|
|
34993
|
+
var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
34994
|
+
var __spreadValues$q = (a, b) => {
|
|
34995
|
+
for (var prop in b || (b = {}))
|
|
34996
|
+
if (__hasOwnProp$A.call(b, prop))
|
|
34997
|
+
__defNormalProp$q(a, prop, b[prop]);
|
|
34998
|
+
if (__getOwnPropSymbols$A)
|
|
34999
|
+
for (var prop of __getOwnPropSymbols$A(b)) {
|
|
35000
|
+
if (__propIsEnum$A.call(b, prop))
|
|
35001
|
+
__defNormalProp$q(a, prop, b[prop]);
|
|
35002
|
+
}
|
|
35003
|
+
return a;
|
|
35004
|
+
};
|
|
35005
|
+
var __spreadProps$n = (a, b) => __defProps$n(a, __getOwnPropDescs$n(b));
|
|
35006
|
+
var __async$L = (__this, __arguments, generator) => {
|
|
35007
|
+
return new Promise((resolve, reject) => {
|
|
35008
|
+
var fulfilled = (value) => {
|
|
35009
|
+
try {
|
|
35010
|
+
step(generator.next(value));
|
|
35011
|
+
} catch (e) {
|
|
35012
|
+
reject(e);
|
|
35013
|
+
}
|
|
35014
|
+
};
|
|
35015
|
+
var rejected = (value) => {
|
|
35016
|
+
try {
|
|
35017
|
+
step(generator.throw(value));
|
|
35018
|
+
} catch (e) {
|
|
35019
|
+
reject(e);
|
|
35020
|
+
}
|
|
35021
|
+
};
|
|
35022
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
35023
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
35024
|
+
});
|
|
35025
|
+
};
|
|
35026
|
+
const useCreateAuctanePaySession = (params) => {
|
|
35027
|
+
const { client } = useShipEngine();
|
|
35028
|
+
return reactQuery.useMutation(__spreadProps$n(__spreadValues$q({}, params), {
|
|
35029
|
+
mutationFn: (request) => __async$L(void 0, null, function* () {
|
|
35030
|
+
const result = yield client.auctanePay.createSession(request);
|
|
35031
|
+
return result.data;
|
|
35032
|
+
}),
|
|
35033
|
+
mutationKey: ["useCreateAuctanePaySession"],
|
|
35034
|
+
onError
|
|
35035
|
+
}));
|
|
35036
|
+
};
|
|
35037
|
+
|
|
34970
35038
|
var __async$K = (__this, __arguments, generator) => {
|
|
34971
35039
|
return new Promise((resolve, reject) => {
|
|
34972
35040
|
var fulfilled = (value) => {
|
|
@@ -39068,6 +39136,7 @@ exports.AddressesAPI = AddressesAPI;
|
|
|
39068
39136
|
exports.AlchemyContext = AlchemyContext;
|
|
39069
39137
|
exports.AlchemyProvider = AlchemyProvider;
|
|
39070
39138
|
exports.AlchemyTestProvider = AlchemyTestProvider;
|
|
39139
|
+
exports.AuctanePayAPI = AuctanePayAPI;
|
|
39071
39140
|
exports.CarriersAPI = CarriersAPI;
|
|
39072
39141
|
exports.CodedError = CodedError;
|
|
39073
39142
|
exports.ConfirmationType = ConfirmationType;
|
|
@@ -39130,6 +39199,7 @@ exports.useCarrierConnectionsServicesList = useCarrierConnectionsServicesList;
|
|
|
39130
39199
|
exports.useConnectCarrier = useConnectCarrier;
|
|
39131
39200
|
exports.useConnectCarrierAccount = useConnectCarrierAccount;
|
|
39132
39201
|
exports.useCreateAccountImage = useCreateAccountImage;
|
|
39202
|
+
exports.useCreateAuctanePaySession = useCreateAuctanePaySession;
|
|
39133
39203
|
exports.useCreateFundingSource = useCreateFundingSource;
|
|
39134
39204
|
exports.useCreateInvoiceAddress = useCreateInvoiceAddress;
|
|
39135
39205
|
exports.useCreateLabel = useCreateLabel;
|