@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.mjs
CHANGED
|
@@ -4883,41 +4883,33 @@ var _getHolder = getHolder$2;
|
|
|
4883
4883
|
|
|
4884
4884
|
/** Used as references for various `Number` constants. */
|
|
4885
4885
|
|
|
4886
|
-
var
|
|
4887
|
-
var hasRequired_isIndex;
|
|
4886
|
+
var MAX_SAFE_INTEGER$1 = 9007199254740991;
|
|
4888
4887
|
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
hasRequired_isIndex = 1;
|
|
4892
|
-
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
4888
|
+
/** Used to detect unsigned integer values. */
|
|
4889
|
+
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
4893
4890
|
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
function isIndex(value, length) {
|
|
4906
|
-
var type = typeof value;
|
|
4907
|
-
length = length == null ? MAX_SAFE_INTEGER : length;
|
|
4908
|
-
|
|
4909
|
-
return !!length &&
|
|
4910
|
-
(type == 'number' ||
|
|
4911
|
-
(type != 'symbol' && reIsUint.test(value))) &&
|
|
4912
|
-
(value > -1 && value % 1 == 0 && value < length);
|
|
4913
|
-
}
|
|
4891
|
+
/**
|
|
4892
|
+
* Checks if `value` is a valid array-like index.
|
|
4893
|
+
*
|
|
4894
|
+
* @private
|
|
4895
|
+
* @param {*} value The value to check.
|
|
4896
|
+
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
|
4897
|
+
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
|
4898
|
+
*/
|
|
4899
|
+
function isIndex$3(value, length) {
|
|
4900
|
+
var type = typeof value;
|
|
4901
|
+
length = length == null ? MAX_SAFE_INTEGER$1 : length;
|
|
4914
4902
|
|
|
4915
|
-
|
|
4916
|
-
|
|
4903
|
+
return !!length &&
|
|
4904
|
+
(type == 'number' ||
|
|
4905
|
+
(type != 'symbol' && reIsUint.test(value))) &&
|
|
4906
|
+
(value > -1 && value % 1 == 0 && value < length);
|
|
4917
4907
|
}
|
|
4918
4908
|
|
|
4909
|
+
var _isIndex = isIndex$3;
|
|
4910
|
+
|
|
4919
4911
|
var copyArray$2 = _copyArray,
|
|
4920
|
-
isIndex$2 =
|
|
4912
|
+
isIndex$2 = _isIndex;
|
|
4921
4913
|
|
|
4922
4914
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
4923
4915
|
var nativeMin$1 = Math.min;
|
|
@@ -6110,7 +6102,7 @@ var baseTimes = _baseTimes,
|
|
|
6110
6102
|
isArguments$2 = requireIsArguments(),
|
|
6111
6103
|
isArray$f = isArray_1,
|
|
6112
6104
|
isBuffer$4 = isBufferExports,
|
|
6113
|
-
isIndex$1 =
|
|
6105
|
+
isIndex$1 = _isIndex,
|
|
6114
6106
|
isTypedArray$1 = requireIsTypedArray();
|
|
6115
6107
|
|
|
6116
6108
|
/** Used for built-in method references. */
|
|
@@ -9441,7 +9433,7 @@ var _baseHasIn = baseHasIn$1;
|
|
|
9441
9433
|
var castPath = _castPath,
|
|
9442
9434
|
isArguments$1 = requireIsArguments(),
|
|
9443
9435
|
isArray$8 = isArray_1,
|
|
9444
|
-
isIndex =
|
|
9436
|
+
isIndex = _isIndex,
|
|
9445
9437
|
isLength = isLength_1,
|
|
9446
9438
|
toKey$3 = _toKey;
|
|
9447
9439
|
|
|
@@ -10331,7 +10323,7 @@ function require_isIterateeCall () {
|
|
|
10331
10323
|
hasRequired_isIterateeCall = 1;
|
|
10332
10324
|
var eq = requireEq(),
|
|
10333
10325
|
isArrayLike = isArrayLike_1,
|
|
10334
|
-
isIndex =
|
|
10326
|
+
isIndex = _isIndex,
|
|
10335
10327
|
isObject = isObject_1;
|
|
10336
10328
|
|
|
10337
10329
|
/**
|
|
@@ -10798,17 +10790,17 @@ var AccountBillingPlanChangeType = /* @__PURE__ */ ((AccountBillingPlanChangeTyp
|
|
|
10798
10790
|
return AccountBillingPlanChangeType2;
|
|
10799
10791
|
})(AccountBillingPlanChangeType || {});
|
|
10800
10792
|
|
|
10801
|
-
var __getOwnPropSymbols$
|
|
10802
|
-
var __hasOwnProp$
|
|
10803
|
-
var __propIsEnum$
|
|
10793
|
+
var __getOwnPropSymbols$J = Object.getOwnPropertySymbols;
|
|
10794
|
+
var __hasOwnProp$J = Object.prototype.hasOwnProperty;
|
|
10795
|
+
var __propIsEnum$J = Object.prototype.propertyIsEnumerable;
|
|
10804
10796
|
var __objRest$q = (source, exclude) => {
|
|
10805
10797
|
var target = {};
|
|
10806
10798
|
for (var prop in source)
|
|
10807
|
-
if (__hasOwnProp$
|
|
10799
|
+
if (__hasOwnProp$J.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
10808
10800
|
target[prop] = source[prop];
|
|
10809
|
-
if (source != null && __getOwnPropSymbols$
|
|
10810
|
-
for (var prop of __getOwnPropSymbols$
|
|
10811
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
10801
|
+
if (source != null && __getOwnPropSymbols$J)
|
|
10802
|
+
for (var prop of __getOwnPropSymbols$J(source)) {
|
|
10803
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$J.call(source, prop))
|
|
10812
10804
|
target[prop] = source[prop];
|
|
10813
10805
|
}
|
|
10814
10806
|
return target;
|
|
@@ -10943,17 +10935,17 @@ const types = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
10943
10935
|
RateCardStatus
|
|
10944
10936
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
10945
10937
|
|
|
10946
|
-
var __getOwnPropSymbols$
|
|
10947
|
-
var __hasOwnProp$
|
|
10948
|
-
var __propIsEnum$
|
|
10938
|
+
var __getOwnPropSymbols$I = Object.getOwnPropertySymbols;
|
|
10939
|
+
var __hasOwnProp$I = Object.prototype.hasOwnProperty;
|
|
10940
|
+
var __propIsEnum$I = Object.prototype.propertyIsEnumerable;
|
|
10949
10941
|
var __objRest$p = (source, exclude) => {
|
|
10950
10942
|
var target = {};
|
|
10951
10943
|
for (var prop in source)
|
|
10952
|
-
if (__hasOwnProp$
|
|
10944
|
+
if (__hasOwnProp$I.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
10953
10945
|
target[prop] = source[prop];
|
|
10954
|
-
if (source != null && __getOwnPropSymbols$
|
|
10955
|
-
for (var prop of __getOwnPropSymbols$
|
|
10956
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
10946
|
+
if (source != null && __getOwnPropSymbols$I)
|
|
10947
|
+
for (var prop of __getOwnPropSymbols$I(source)) {
|
|
10948
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$I.call(source, prop))
|
|
10957
10949
|
target[prop] = source[prop];
|
|
10958
10950
|
}
|
|
10959
10951
|
return target;
|
|
@@ -11028,6 +11020,22 @@ class AddressesAPI {
|
|
|
11028
11020
|
}
|
|
11029
11021
|
}
|
|
11030
11022
|
|
|
11023
|
+
class AuctanePayAPI {
|
|
11024
|
+
constructor(client) {
|
|
11025
|
+
this.client = client;
|
|
11026
|
+
/**
|
|
11027
|
+
* The `createSession` method creates a new payment session.
|
|
11028
|
+
*
|
|
11029
|
+
* @param request - The request object containing the session details
|
|
11030
|
+
* @returns a promise that resolves to the created session
|
|
11031
|
+
*/
|
|
11032
|
+
this.createSession = (request) => {
|
|
11033
|
+
return this.client.post("/internal/auctane_pay/sessions", request);
|
|
11034
|
+
};
|
|
11035
|
+
this.client = client;
|
|
11036
|
+
}
|
|
11037
|
+
}
|
|
11038
|
+
|
|
11031
11039
|
const isCodedErrors = (errs) => Array.isArray(errs) && errs.every((err) => isCodedError(err));
|
|
11032
11040
|
const isCodedError = (err) => !!err.errorCode;
|
|
11033
11041
|
const isDataCodedErrors = (data) => !!data.errors && isCodedErrors(data.errors);
|
|
@@ -13695,7 +13703,7 @@ var ipaddr = {
|
|
|
13695
13703
|
}).call(commonjsGlobal);
|
|
13696
13704
|
} (ipaddr));
|
|
13697
13705
|
|
|
13698
|
-
var __async$
|
|
13706
|
+
var __async$Z = (__this, __arguments, generator) => {
|
|
13699
13707
|
return new Promise((resolve, reject) => {
|
|
13700
13708
|
var fulfilled = (value) => {
|
|
13701
13709
|
try {
|
|
@@ -13715,7 +13723,7 @@ var __async$Y = (__this, __arguments, generator) => {
|
|
|
13715
13723
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
13716
13724
|
});
|
|
13717
13725
|
};
|
|
13718
|
-
const getEndUserIpAddress = () => __async$
|
|
13726
|
+
const getEndUserIpAddress = () => __async$Z(void 0, null, function* () {
|
|
13719
13727
|
try {
|
|
13720
13728
|
const response = yield axios.get("https://api.ipify.org/?format=json");
|
|
13721
13729
|
if (response.data.ip && ipaddrExports.isValid(response.data.ip)) {
|
|
@@ -13772,38 +13780,38 @@ const decamelizeKeys = (obj, separator = "_") => {
|
|
|
13772
13780
|
return obj;
|
|
13773
13781
|
};
|
|
13774
13782
|
|
|
13775
|
-
var __defProp$
|
|
13776
|
-
var __defProps$
|
|
13777
|
-
var __getOwnPropDescs$
|
|
13778
|
-
var __getOwnPropSymbols$
|
|
13779
|
-
var __hasOwnProp$
|
|
13780
|
-
var __propIsEnum$
|
|
13781
|
-
var __defNormalProp$
|
|
13782
|
-
var __spreadValues$
|
|
13783
|
+
var __defProp$w = Object.defineProperty;
|
|
13784
|
+
var __defProps$q = Object.defineProperties;
|
|
13785
|
+
var __getOwnPropDescs$q = Object.getOwnPropertyDescriptors;
|
|
13786
|
+
var __getOwnPropSymbols$H = Object.getOwnPropertySymbols;
|
|
13787
|
+
var __hasOwnProp$H = Object.prototype.hasOwnProperty;
|
|
13788
|
+
var __propIsEnum$H = Object.prototype.propertyIsEnumerable;
|
|
13789
|
+
var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13790
|
+
var __spreadValues$w = (a, b) => {
|
|
13783
13791
|
for (var prop in b || (b = {}))
|
|
13784
|
-
if (__hasOwnProp$
|
|
13785
|
-
__defNormalProp$
|
|
13786
|
-
if (__getOwnPropSymbols$
|
|
13787
|
-
for (var prop of __getOwnPropSymbols$
|
|
13788
|
-
if (__propIsEnum$
|
|
13789
|
-
__defNormalProp$
|
|
13792
|
+
if (__hasOwnProp$H.call(b, prop))
|
|
13793
|
+
__defNormalProp$w(a, prop, b[prop]);
|
|
13794
|
+
if (__getOwnPropSymbols$H)
|
|
13795
|
+
for (var prop of __getOwnPropSymbols$H(b)) {
|
|
13796
|
+
if (__propIsEnum$H.call(b, prop))
|
|
13797
|
+
__defNormalProp$w(a, prop, b[prop]);
|
|
13790
13798
|
}
|
|
13791
13799
|
return a;
|
|
13792
13800
|
};
|
|
13793
|
-
var __spreadProps$
|
|
13801
|
+
var __spreadProps$q = (a, b) => __defProps$q(a, __getOwnPropDescs$q(b));
|
|
13794
13802
|
var __objRest$o = (source, exclude) => {
|
|
13795
13803
|
var target = {};
|
|
13796
13804
|
for (var prop in source)
|
|
13797
|
-
if (__hasOwnProp$
|
|
13805
|
+
if (__hasOwnProp$H.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
13798
13806
|
target[prop] = source[prop];
|
|
13799
|
-
if (source != null && __getOwnPropSymbols$
|
|
13800
|
-
for (var prop of __getOwnPropSymbols$
|
|
13801
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
13807
|
+
if (source != null && __getOwnPropSymbols$H)
|
|
13808
|
+
for (var prop of __getOwnPropSymbols$H(source)) {
|
|
13809
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$H.call(source, prop))
|
|
13802
13810
|
target[prop] = source[prop];
|
|
13803
13811
|
}
|
|
13804
13812
|
return target;
|
|
13805
13813
|
};
|
|
13806
|
-
var __async$
|
|
13814
|
+
var __async$Y = (__this, __arguments, generator) => {
|
|
13807
13815
|
return new Promise((resolve, reject) => {
|
|
13808
13816
|
var fulfilled = (value) => {
|
|
13809
13817
|
try {
|
|
@@ -13843,12 +13851,12 @@ class CarriersAPI {
|
|
|
13843
13851
|
/**
|
|
13844
13852
|
* The `connect` method connects a carrier account to a user's ShipEngine account.
|
|
13845
13853
|
*/
|
|
13846
|
-
this.connect = (_a) => __async$
|
|
13854
|
+
this.connect = (_a) => __async$Y(this, null, function* () {
|
|
13847
13855
|
var _b = _a, { carrierCode } = _b, connection = __objRest$o(_b, ["carrierCode"]);
|
|
13848
13856
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
13849
13857
|
if (!endUserIpAddress)
|
|
13850
13858
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
13851
|
-
return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$
|
|
13859
|
+
return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$q(__spreadValues$w({}, connection), {
|
|
13852
13860
|
endUserIpAddress
|
|
13853
13861
|
}));
|
|
13854
13862
|
});
|
|
@@ -13934,7 +13942,7 @@ class CarriersAPI {
|
|
|
13934
13942
|
}
|
|
13935
13943
|
}
|
|
13936
13944
|
|
|
13937
|
-
var __async$
|
|
13945
|
+
var __async$X = (__this, __arguments, generator) => {
|
|
13938
13946
|
return new Promise((resolve, reject) => {
|
|
13939
13947
|
var fulfilled = (value) => {
|
|
13940
13948
|
try {
|
|
@@ -13976,7 +13984,7 @@ class ConnectionsAPI {
|
|
|
13976
13984
|
/**
|
|
13977
13985
|
* The `connectCarrier` method connects a carrier to account.
|
|
13978
13986
|
*/
|
|
13979
|
-
this.connectCarrier = (carrierName, formData) => __async$
|
|
13987
|
+
this.connectCarrier = (carrierName, formData) => __async$X(this, null, function* () {
|
|
13980
13988
|
return yield this.client.post(
|
|
13981
13989
|
`/v1/connections/carriers/${carrierName}`,
|
|
13982
13990
|
formData,
|
|
@@ -16151,23 +16159,23 @@ class CustomPackagesAPI {
|
|
|
16151
16159
|
}
|
|
16152
16160
|
}
|
|
16153
16161
|
|
|
16154
|
-
var __defProp$
|
|
16155
|
-
var __getOwnPropSymbols$
|
|
16156
|
-
var __hasOwnProp$
|
|
16157
|
-
var __propIsEnum$
|
|
16158
|
-
var __defNormalProp$
|
|
16159
|
-
var __spreadValues$
|
|
16162
|
+
var __defProp$v = Object.defineProperty;
|
|
16163
|
+
var __getOwnPropSymbols$G = Object.getOwnPropertySymbols;
|
|
16164
|
+
var __hasOwnProp$G = Object.prototype.hasOwnProperty;
|
|
16165
|
+
var __propIsEnum$G = Object.prototype.propertyIsEnumerable;
|
|
16166
|
+
var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16167
|
+
var __spreadValues$v = (a, b) => {
|
|
16160
16168
|
for (var prop in b || (b = {}))
|
|
16161
|
-
if (__hasOwnProp$
|
|
16162
|
-
__defNormalProp$
|
|
16163
|
-
if (__getOwnPropSymbols$
|
|
16164
|
-
for (var prop of __getOwnPropSymbols$
|
|
16165
|
-
if (__propIsEnum$
|
|
16166
|
-
__defNormalProp$
|
|
16169
|
+
if (__hasOwnProp$G.call(b, prop))
|
|
16170
|
+
__defNormalProp$v(a, prop, b[prop]);
|
|
16171
|
+
if (__getOwnPropSymbols$G)
|
|
16172
|
+
for (var prop of __getOwnPropSymbols$G(b)) {
|
|
16173
|
+
if (__propIsEnum$G.call(b, prop))
|
|
16174
|
+
__defNormalProp$v(a, prop, b[prop]);
|
|
16167
16175
|
}
|
|
16168
16176
|
return a;
|
|
16169
16177
|
};
|
|
16170
|
-
var __async$
|
|
16178
|
+
var __async$W = (__this, __arguments, generator) => {
|
|
16171
16179
|
return new Promise((resolve, reject) => {
|
|
16172
16180
|
var fulfilled = (value) => {
|
|
16173
16181
|
try {
|
|
@@ -16206,12 +16214,12 @@ class FundingSourcesAPI {
|
|
|
16206
16214
|
* The `create` method creates a new funding source for a given user. This requires
|
|
16207
16215
|
* payment information to be collected from the user.
|
|
16208
16216
|
*/
|
|
16209
|
-
this.create = (createFundingSource) => __async$
|
|
16217
|
+
this.create = (createFundingSource) => __async$W(this, null, function* () {
|
|
16210
16218
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16211
16219
|
if (!endUserIpAddress) {
|
|
16212
16220
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
16213
16221
|
}
|
|
16214
|
-
return yield this.client.post("/v1/funding_sources", __spreadValues$
|
|
16222
|
+
return yield this.client.post("/v1/funding_sources", __spreadValues$v({
|
|
16215
16223
|
endUserIpAddress
|
|
16216
16224
|
}, createFundingSource));
|
|
16217
16225
|
});
|
|
@@ -16220,7 +16228,7 @@ class FundingSourcesAPI {
|
|
|
16220
16228
|
* user to update the billing address or payment information associated with the
|
|
16221
16229
|
* funding source.
|
|
16222
16230
|
*/
|
|
16223
|
-
this.update = (billingInfo, creditCardInfo, auctanePayInfo, fundingSourceId) => __async$
|
|
16231
|
+
this.update = (billingInfo, creditCardInfo, auctanePayInfo, fundingSourceId) => __async$W(this, null, function* () {
|
|
16224
16232
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16225
16233
|
if (!endUserIpAddress) {
|
|
16226
16234
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
@@ -16230,7 +16238,7 @@ class FundingSourcesAPI {
|
|
|
16230
16238
|
{
|
|
16231
16239
|
billingInfo,
|
|
16232
16240
|
endUserIpAddress,
|
|
16233
|
-
paymentMethod: __spreadValues$
|
|
16241
|
+
paymentMethod: __spreadValues$v({
|
|
16234
16242
|
creditCardInfo
|
|
16235
16243
|
}, auctanePayInfo)
|
|
16236
16244
|
}
|
|
@@ -16240,19 +16248,19 @@ class FundingSourcesAPI {
|
|
|
16240
16248
|
* The `registerCarrier` method registers a carrier account and associates
|
|
16241
16249
|
* it with a given funding source.
|
|
16242
16250
|
*/
|
|
16243
|
-
this.registerCarrier = (carrier) => __async$
|
|
16251
|
+
this.registerCarrier = (carrier) => __async$W(this, null, function* () {
|
|
16244
16252
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16245
16253
|
if (!endUserIpAddress) {
|
|
16246
16254
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
16247
16255
|
}
|
|
16248
|
-
return yield this.client.post("/v1/registration/funding_source", __spreadValues$
|
|
16256
|
+
return yield this.client.post("/v1/registration/funding_source", __spreadValues$v({
|
|
16249
16257
|
endUserIpAddress
|
|
16250
16258
|
}, carrier));
|
|
16251
16259
|
});
|
|
16252
16260
|
/**
|
|
16253
16261
|
* The `addFunds` method allows you to add funds to a funding source.
|
|
16254
16262
|
*/
|
|
16255
|
-
this.addFunds = (amount, fundingSourceId) => __async$
|
|
16263
|
+
this.addFunds = (amount, fundingSourceId) => __async$W(this, null, function* () {
|
|
16256
16264
|
return yield this.client.put(
|
|
16257
16265
|
`/v1/funding_sources/${fundingSourceId}/add_funds`,
|
|
16258
16266
|
amount
|
|
@@ -16262,7 +16270,7 @@ class FundingSourcesAPI {
|
|
|
16262
16270
|
* The `metadata` method returns seller-specific requirements for creating funding sources
|
|
16263
16271
|
* and attaching carriers
|
|
16264
16272
|
*/
|
|
16265
|
-
this.metadata = () => __async$
|
|
16273
|
+
this.metadata = () => __async$W(this, null, function* () {
|
|
16266
16274
|
return yield this.client.get("/v1/funding_sources/metadata");
|
|
16267
16275
|
});
|
|
16268
16276
|
/**
|
|
@@ -16314,7 +16322,7 @@ class InsuranceAPI {
|
|
|
16314
16322
|
}
|
|
16315
16323
|
}
|
|
16316
16324
|
|
|
16317
|
-
var __async$
|
|
16325
|
+
var __async$V = (__this, __arguments, generator) => {
|
|
16318
16326
|
return new Promise((resolve, reject) => {
|
|
16319
16327
|
var fulfilled = (value) => {
|
|
16320
16328
|
try {
|
|
@@ -16346,13 +16354,13 @@ class InvoiceAddressAPI {
|
|
|
16346
16354
|
/**
|
|
16347
16355
|
* The `create` method creates a new invoice address for a given user.
|
|
16348
16356
|
*/
|
|
16349
|
-
this.create = (invoiceAddress) => __async$
|
|
16357
|
+
this.create = (invoiceAddress) => __async$V(this, null, function* () {
|
|
16350
16358
|
return yield this.client.post("/v1/invoice_address", invoiceAddress);
|
|
16351
16359
|
});
|
|
16352
16360
|
/**
|
|
16353
16361
|
* The `update` method updates a invoice address for a given user.
|
|
16354
16362
|
*/
|
|
16355
|
-
this.update = (invoiceAddress) => __async$
|
|
16363
|
+
this.update = (invoiceAddress) => __async$V(this, null, function* () {
|
|
16356
16364
|
return yield this.client.put("/v1/invoice_address", invoiceAddress);
|
|
16357
16365
|
});
|
|
16358
16366
|
this.client = client;
|
|
@@ -16394,17 +16402,17 @@ class LabelsAPI {
|
|
|
16394
16402
|
}
|
|
16395
16403
|
}
|
|
16396
16404
|
|
|
16397
|
-
var __getOwnPropSymbols$
|
|
16398
|
-
var __hasOwnProp$
|
|
16399
|
-
var __propIsEnum$
|
|
16405
|
+
var __getOwnPropSymbols$F = Object.getOwnPropertySymbols;
|
|
16406
|
+
var __hasOwnProp$F = Object.prototype.hasOwnProperty;
|
|
16407
|
+
var __propIsEnum$F = Object.prototype.propertyIsEnumerable;
|
|
16400
16408
|
var __objRest$n = (source, exclude) => {
|
|
16401
16409
|
var target = {};
|
|
16402
16410
|
for (var prop in source)
|
|
16403
|
-
if (__hasOwnProp$
|
|
16411
|
+
if (__hasOwnProp$F.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
16404
16412
|
target[prop] = source[prop];
|
|
16405
|
-
if (source != null && __getOwnPropSymbols$
|
|
16406
|
-
for (var prop of __getOwnPropSymbols$
|
|
16407
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
16413
|
+
if (source != null && __getOwnPropSymbols$F)
|
|
16414
|
+
for (var prop of __getOwnPropSymbols$F(source)) {
|
|
16415
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$F.call(source, prop))
|
|
16408
16416
|
target[prop] = source[prop];
|
|
16409
16417
|
}
|
|
16410
16418
|
return target;
|
|
@@ -16525,19 +16533,19 @@ class RateCardsAPI {
|
|
|
16525
16533
|
}
|
|
16526
16534
|
}
|
|
16527
16535
|
|
|
16528
|
-
var __defProp$
|
|
16529
|
-
var __getOwnPropSymbols$
|
|
16530
|
-
var __hasOwnProp$
|
|
16531
|
-
var __propIsEnum$
|
|
16532
|
-
var __defNormalProp$
|
|
16533
|
-
var __spreadValues$
|
|
16536
|
+
var __defProp$u = Object.defineProperty;
|
|
16537
|
+
var __getOwnPropSymbols$E = Object.getOwnPropertySymbols;
|
|
16538
|
+
var __hasOwnProp$E = Object.prototype.hasOwnProperty;
|
|
16539
|
+
var __propIsEnum$E = Object.prototype.propertyIsEnumerable;
|
|
16540
|
+
var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16541
|
+
var __spreadValues$u = (a, b) => {
|
|
16534
16542
|
for (var prop in b || (b = {}))
|
|
16535
|
-
if (__hasOwnProp$
|
|
16536
|
-
__defNormalProp$
|
|
16537
|
-
if (__getOwnPropSymbols$
|
|
16538
|
-
for (var prop of __getOwnPropSymbols$
|
|
16539
|
-
if (__propIsEnum$
|
|
16540
|
-
__defNormalProp$
|
|
16543
|
+
if (__hasOwnProp$E.call(b, prop))
|
|
16544
|
+
__defNormalProp$u(a, prop, b[prop]);
|
|
16545
|
+
if (__getOwnPropSymbols$E)
|
|
16546
|
+
for (var prop of __getOwnPropSymbols$E(b)) {
|
|
16547
|
+
if (__propIsEnum$E.call(b, prop))
|
|
16548
|
+
__defNormalProp$u(a, prop, b[prop]);
|
|
16541
16549
|
}
|
|
16542
16550
|
return a;
|
|
16543
16551
|
};
|
|
@@ -16559,7 +16567,7 @@ class RatesAPI {
|
|
|
16559
16567
|
* method.
|
|
16560
16568
|
*/
|
|
16561
16569
|
this.estimate = (params) => {
|
|
16562
|
-
return this.client.post("/v1/rates/estimate", __spreadValues$
|
|
16570
|
+
return this.client.post("/v1/rates/estimate", __spreadValues$u({}, params));
|
|
16563
16571
|
};
|
|
16564
16572
|
this.client = client;
|
|
16565
16573
|
}
|
|
@@ -16639,7 +16647,7 @@ class SalesOrdersAPI {
|
|
|
16639
16647
|
}
|
|
16640
16648
|
}
|
|
16641
16649
|
|
|
16642
|
-
var __async$
|
|
16650
|
+
var __async$U = (__this, __arguments, generator) => {
|
|
16643
16651
|
return new Promise((resolve, reject) => {
|
|
16644
16652
|
var fulfilled = (value) => {
|
|
16645
16653
|
try {
|
|
@@ -16697,7 +16705,7 @@ class SellersAPI {
|
|
|
16697
16705
|
/**
|
|
16698
16706
|
* Deletes an API Key
|
|
16699
16707
|
*/
|
|
16700
|
-
this.deleteSellerApiKey = (_0) => __async$
|
|
16708
|
+
this.deleteSellerApiKey = (_0) => __async$U(this, [_0], function* ({
|
|
16701
16709
|
encryptedApiKey,
|
|
16702
16710
|
sellerId,
|
|
16703
16711
|
isSandbox
|
|
@@ -16743,19 +16751,19 @@ class SellersAPI {
|
|
|
16743
16751
|
}
|
|
16744
16752
|
}
|
|
16745
16753
|
|
|
16746
|
-
var __defProp$
|
|
16747
|
-
var __getOwnPropSymbols$
|
|
16748
|
-
var __hasOwnProp$
|
|
16749
|
-
var __propIsEnum$
|
|
16750
|
-
var __defNormalProp$
|
|
16751
|
-
var __spreadValues$
|
|
16754
|
+
var __defProp$t = Object.defineProperty;
|
|
16755
|
+
var __getOwnPropSymbols$D = Object.getOwnPropertySymbols;
|
|
16756
|
+
var __hasOwnProp$D = Object.prototype.hasOwnProperty;
|
|
16757
|
+
var __propIsEnum$D = Object.prototype.propertyIsEnumerable;
|
|
16758
|
+
var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16759
|
+
var __spreadValues$t = (a, b) => {
|
|
16752
16760
|
for (var prop in b || (b = {}))
|
|
16753
|
-
if (__hasOwnProp$
|
|
16754
|
-
__defNormalProp$
|
|
16755
|
-
if (__getOwnPropSymbols$
|
|
16756
|
-
for (var prop of __getOwnPropSymbols$
|
|
16757
|
-
if (__propIsEnum$
|
|
16758
|
-
__defNormalProp$
|
|
16761
|
+
if (__hasOwnProp$D.call(b, prop))
|
|
16762
|
+
__defNormalProp$t(a, prop, b[prop]);
|
|
16763
|
+
if (__getOwnPropSymbols$D)
|
|
16764
|
+
for (var prop of __getOwnPropSymbols$D(b)) {
|
|
16765
|
+
if (__propIsEnum$D.call(b, prop))
|
|
16766
|
+
__defNormalProp$t(a, prop, b[prop]);
|
|
16759
16767
|
}
|
|
16760
16768
|
return a;
|
|
16761
16769
|
};
|
|
@@ -16767,7 +16775,7 @@ class ServicePointsAPI {
|
|
|
16767
16775
|
* Either an address, coordinates, or an address query
|
|
16768
16776
|
*/
|
|
16769
16777
|
this.list = (options) => {
|
|
16770
|
-
return this.client.post("/v1/service_points/list", __spreadValues$
|
|
16778
|
+
return this.client.post("/v1/service_points/list", __spreadValues$t({}, options));
|
|
16771
16779
|
};
|
|
16772
16780
|
/**
|
|
16773
16781
|
* Get a specific service point by its carrier code, country code, and id
|
|
@@ -16785,7 +16793,7 @@ class ServicePointsAPI {
|
|
|
16785
16793
|
}
|
|
16786
16794
|
}
|
|
16787
16795
|
|
|
16788
|
-
var __async$
|
|
16796
|
+
var __async$T = (__this, __arguments, generator) => {
|
|
16789
16797
|
return new Promise((resolve, reject) => {
|
|
16790
16798
|
var fulfilled = (value) => {
|
|
16791
16799
|
try {
|
|
@@ -16834,7 +16842,7 @@ class ShipmentsAPI {
|
|
|
16834
16842
|
* The `create` method allows for creating shipments based on a list of shipment
|
|
16835
16843
|
* items passed into this method.
|
|
16836
16844
|
*/
|
|
16837
|
-
this.create = (...shipments) => __async$
|
|
16845
|
+
this.create = (...shipments) => __async$T(this, null, function* () {
|
|
16838
16846
|
return this.client.post("/v1/shipments", {
|
|
16839
16847
|
shipments
|
|
16840
16848
|
});
|
|
@@ -34226,26 +34234,26 @@ class WebhooksAPI {
|
|
|
34226
34234
|
}
|
|
34227
34235
|
}
|
|
34228
34236
|
|
|
34229
|
-
var __defProp$
|
|
34230
|
-
var __defProps$
|
|
34231
|
-
var __getOwnPropDescs$
|
|
34232
|
-
var __getOwnPropSymbols$
|
|
34233
|
-
var __hasOwnProp$
|
|
34234
|
-
var __propIsEnum$
|
|
34235
|
-
var __defNormalProp$
|
|
34236
|
-
var __spreadValues$
|
|
34237
|
+
var __defProp$s = Object.defineProperty;
|
|
34238
|
+
var __defProps$p = Object.defineProperties;
|
|
34239
|
+
var __getOwnPropDescs$p = Object.getOwnPropertyDescriptors;
|
|
34240
|
+
var __getOwnPropSymbols$C = Object.getOwnPropertySymbols;
|
|
34241
|
+
var __hasOwnProp$C = Object.prototype.hasOwnProperty;
|
|
34242
|
+
var __propIsEnum$C = Object.prototype.propertyIsEnumerable;
|
|
34243
|
+
var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
34244
|
+
var __spreadValues$s = (a, b) => {
|
|
34237
34245
|
for (var prop in b || (b = {}))
|
|
34238
|
-
if (__hasOwnProp$
|
|
34239
|
-
__defNormalProp$
|
|
34240
|
-
if (__getOwnPropSymbols$
|
|
34241
|
-
for (var prop of __getOwnPropSymbols$
|
|
34242
|
-
if (__propIsEnum$
|
|
34243
|
-
__defNormalProp$
|
|
34246
|
+
if (__hasOwnProp$C.call(b, prop))
|
|
34247
|
+
__defNormalProp$s(a, prop, b[prop]);
|
|
34248
|
+
if (__getOwnPropSymbols$C)
|
|
34249
|
+
for (var prop of __getOwnPropSymbols$C(b)) {
|
|
34250
|
+
if (__propIsEnum$C.call(b, prop))
|
|
34251
|
+
__defNormalProp$s(a, prop, b[prop]);
|
|
34244
34252
|
}
|
|
34245
34253
|
return a;
|
|
34246
34254
|
};
|
|
34247
|
-
var __spreadProps$
|
|
34248
|
-
var __async$
|
|
34255
|
+
var __spreadProps$p = (a, b) => __defProps$p(a, __getOwnPropDescs$p(b));
|
|
34256
|
+
var __async$S = (__this, __arguments, generator) => {
|
|
34249
34257
|
return new Promise((resolve, reject) => {
|
|
34250
34258
|
var fulfilled = (value) => {
|
|
34251
34259
|
try {
|
|
@@ -34268,7 +34276,7 @@ var __async$R = (__this, __arguments, generator) => {
|
|
|
34268
34276
|
const logger$1 = E({
|
|
34269
34277
|
level: process.env.NODE_ENV === "production" ? "fatal" : "info",
|
|
34270
34278
|
name: "shipengine-api",
|
|
34271
|
-
serializers: __spreadProps$
|
|
34279
|
+
serializers: __spreadProps$p(__spreadValues$s({}, k), {
|
|
34272
34280
|
req: (req) => ({
|
|
34273
34281
|
headers: req.headers,
|
|
34274
34282
|
method: req.method,
|
|
@@ -34293,7 +34301,7 @@ class ShipEngineAPI {
|
|
|
34293
34301
|
this.getSandboxToken = getSandboxToken;
|
|
34294
34302
|
const client = axios.create({
|
|
34295
34303
|
baseURL,
|
|
34296
|
-
headers: __spreadProps$
|
|
34304
|
+
headers: __spreadProps$p(__spreadValues$s({}, headers), {
|
|
34297
34305
|
"Content-Type": "application/json"
|
|
34298
34306
|
}),
|
|
34299
34307
|
paramsSerializer: (params) => lib.stringify(decamelizeKeys(params), { arrayFormat: "brackets" }),
|
|
@@ -34328,7 +34336,7 @@ class ShipEngineAPI {
|
|
|
34328
34336
|
});
|
|
34329
34337
|
client.defaults.headers.common["Authorization"] = `Bearer ${token}`;
|
|
34330
34338
|
client.interceptors.request.use(
|
|
34331
|
-
(config) => __async$
|
|
34339
|
+
(config) => __async$S(this, null, function* () {
|
|
34332
34340
|
if (config.isSandbox) {
|
|
34333
34341
|
if (!this.sandboxToken) {
|
|
34334
34342
|
this.sandboxToken = yield getSandboxToken == null ? void 0 : getSandboxToken();
|
|
@@ -34355,7 +34363,7 @@ class ShipEngineAPI {
|
|
|
34355
34363
|
);
|
|
34356
34364
|
return res;
|
|
34357
34365
|
},
|
|
34358
|
-
(err) => __async$
|
|
34366
|
+
(err) => __async$S(this, null, function* () {
|
|
34359
34367
|
var _a, _b, _c, _d, _e;
|
|
34360
34368
|
logger$1.error(
|
|
34361
34369
|
{ err, req: err.config, res: err.response },
|
|
@@ -34402,7 +34410,7 @@ class ShipEngineAPI {
|
|
|
34402
34410
|
* that token (also known as Seller ID)
|
|
34403
34411
|
*/
|
|
34404
34412
|
getTenant(isSandbox) {
|
|
34405
|
-
return __async$
|
|
34413
|
+
return __async$S(this, null, function* () {
|
|
34406
34414
|
var _a;
|
|
34407
34415
|
if (!isSandbox) {
|
|
34408
34416
|
return this.getTenantFromToken(this.token);
|
|
@@ -34615,6 +34623,15 @@ class ShipEngineAPI {
|
|
|
34615
34623
|
get sellers() {
|
|
34616
34624
|
return new SellersAPI(this.client);
|
|
34617
34625
|
}
|
|
34626
|
+
/**
|
|
34627
|
+
* The `auctanePay` method provides access to the Auctane Pay endpoints in ShipEngine
|
|
34628
|
+
* API. e.g. Create Payment Session
|
|
34629
|
+
*
|
|
34630
|
+
* @see {@link AuctanePayAPI | The Auctane Pay API module}
|
|
34631
|
+
*/
|
|
34632
|
+
get auctanePay() {
|
|
34633
|
+
return new AuctanePayAPI(this.client);
|
|
34634
|
+
}
|
|
34618
34635
|
}
|
|
34619
34636
|
|
|
34620
34637
|
const ShipEngineContext = createContext(void 0);
|
|
@@ -34681,25 +34698,25 @@ const delay = (ms) => new Promise((resolve) => {
|
|
|
34681
34698
|
|
|
34682
34699
|
const onError = (_errors) => _default();
|
|
34683
34700
|
|
|
34684
|
-
var __defProp$
|
|
34685
|
-
var __defProps$
|
|
34686
|
-
var __getOwnPropDescs$
|
|
34687
|
-
var __getOwnPropSymbols$
|
|
34688
|
-
var __hasOwnProp$
|
|
34689
|
-
var __propIsEnum$
|
|
34690
|
-
var __defNormalProp$
|
|
34691
|
-
var __spreadValues$
|
|
34701
|
+
var __defProp$r = Object.defineProperty;
|
|
34702
|
+
var __defProps$o = Object.defineProperties;
|
|
34703
|
+
var __getOwnPropDescs$o = Object.getOwnPropertyDescriptors;
|
|
34704
|
+
var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
|
|
34705
|
+
var __hasOwnProp$B = Object.prototype.hasOwnProperty;
|
|
34706
|
+
var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
|
|
34707
|
+
var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
34708
|
+
var __spreadValues$r = (a, b) => {
|
|
34692
34709
|
for (var prop in b || (b = {}))
|
|
34693
|
-
if (__hasOwnProp$
|
|
34694
|
-
__defNormalProp$
|
|
34695
|
-
if (__getOwnPropSymbols$
|
|
34696
|
-
for (var prop of __getOwnPropSymbols$
|
|
34697
|
-
if (__propIsEnum$
|
|
34698
|
-
__defNormalProp$
|
|
34710
|
+
if (__hasOwnProp$B.call(b, prop))
|
|
34711
|
+
__defNormalProp$r(a, prop, b[prop]);
|
|
34712
|
+
if (__getOwnPropSymbols$B)
|
|
34713
|
+
for (var prop of __getOwnPropSymbols$B(b)) {
|
|
34714
|
+
if (__propIsEnum$B.call(b, prop))
|
|
34715
|
+
__defNormalProp$r(a, prop, b[prop]);
|
|
34699
34716
|
}
|
|
34700
34717
|
return a;
|
|
34701
34718
|
};
|
|
34702
|
-
var __spreadProps$
|
|
34719
|
+
var __spreadProps$o = (a, b) => __defProps$o(a, __getOwnPropDescs$o(b));
|
|
34703
34720
|
const streams = [];
|
|
34704
34721
|
if (process.env.NODE_ENV === "production") {
|
|
34705
34722
|
streams.push({
|
|
@@ -34708,7 +34725,7 @@ if (process.env.NODE_ENV === "production") {
|
|
|
34708
34725
|
}
|
|
34709
34726
|
const logger = E({
|
|
34710
34727
|
name: "shipengine",
|
|
34711
|
-
serializers: __spreadProps$
|
|
34728
|
+
serializers: __spreadProps$o(__spreadValues$r({}, k), {
|
|
34712
34729
|
req: (req) => ({
|
|
34713
34730
|
headers: req.headers,
|
|
34714
34731
|
method: req.method,
|
|
@@ -34733,7 +34750,7 @@ const retryUntil = (callbackFn, retries = 10, timeoutBetweenAttempts = 1e3) => P
|
|
|
34733
34750
|
throw error;
|
|
34734
34751
|
});
|
|
34735
34752
|
|
|
34736
|
-
var __async$
|
|
34753
|
+
var __async$R = (__this, __arguments, generator) => {
|
|
34737
34754
|
return new Promise((resolve, reject) => {
|
|
34738
34755
|
var fulfilled = (value) => {
|
|
34739
34756
|
try {
|
|
@@ -34756,7 +34773,7 @@ var __async$Q = (__this, __arguments, generator) => {
|
|
|
34756
34773
|
const useCreateAccountImage = () => {
|
|
34757
34774
|
const { client } = useShipEngine();
|
|
34758
34775
|
return useMutation({
|
|
34759
|
-
mutationFn: (data) => __async$
|
|
34776
|
+
mutationFn: (data) => __async$R(void 0, null, function* () {
|
|
34760
34777
|
const result = yield client.accountSettings.createImage(data);
|
|
34761
34778
|
return result.data;
|
|
34762
34779
|
}),
|
|
@@ -34765,7 +34782,7 @@ const useCreateAccountImage = () => {
|
|
|
34765
34782
|
});
|
|
34766
34783
|
};
|
|
34767
34784
|
|
|
34768
|
-
var __async$
|
|
34785
|
+
var __async$Q = (__this, __arguments, generator) => {
|
|
34769
34786
|
return new Promise((resolve, reject) => {
|
|
34770
34787
|
var fulfilled = (value) => {
|
|
34771
34788
|
try {
|
|
@@ -34788,7 +34805,7 @@ var __async$P = (__this, __arguments, generator) => {
|
|
|
34788
34805
|
const useDeleteAccountImage = () => {
|
|
34789
34806
|
const { client } = useShipEngine();
|
|
34790
34807
|
return useMutation({
|
|
34791
|
-
mutationFn: (labelImageId) => __async$
|
|
34808
|
+
mutationFn: (labelImageId) => __async$Q(void 0, null, function* () {
|
|
34792
34809
|
const result = yield client.accountSettings.deleteImage(labelImageId);
|
|
34793
34810
|
return result.data;
|
|
34794
34811
|
}),
|
|
@@ -34817,7 +34834,7 @@ const useGetAccountSettings = () => {
|
|
|
34817
34834
|
});
|
|
34818
34835
|
};
|
|
34819
34836
|
|
|
34820
|
-
var __async$
|
|
34837
|
+
var __async$P = (__this, __arguments, generator) => {
|
|
34821
34838
|
return new Promise((resolve, reject) => {
|
|
34822
34839
|
var fulfilled = (value) => {
|
|
34823
34840
|
try {
|
|
@@ -34840,7 +34857,7 @@ var __async$O = (__this, __arguments, generator) => {
|
|
|
34840
34857
|
const useUpdateAccountImage = () => {
|
|
34841
34858
|
const { client } = useShipEngine();
|
|
34842
34859
|
return useMutation({
|
|
34843
|
-
mutationFn: (data) => __async$
|
|
34860
|
+
mutationFn: (data) => __async$P(void 0, null, function* () {
|
|
34844
34861
|
const result = yield client.accountSettings.updateImage(data);
|
|
34845
34862
|
return result.data;
|
|
34846
34863
|
}),
|
|
@@ -34849,7 +34866,7 @@ const useUpdateAccountImage = () => {
|
|
|
34849
34866
|
});
|
|
34850
34867
|
};
|
|
34851
34868
|
|
|
34852
|
-
var __async$
|
|
34869
|
+
var __async$O = (__this, __arguments, generator) => {
|
|
34853
34870
|
return new Promise((resolve, reject) => {
|
|
34854
34871
|
var fulfilled = (value) => {
|
|
34855
34872
|
try {
|
|
@@ -34872,7 +34889,7 @@ var __async$N = (__this, __arguments, generator) => {
|
|
|
34872
34889
|
const useUpdateAccountSettings = () => {
|
|
34873
34890
|
const { client } = useShipEngine();
|
|
34874
34891
|
return useMutation({
|
|
34875
|
-
mutationFn: (settings) => __async$
|
|
34892
|
+
mutationFn: (settings) => __async$O(void 0, null, function* () {
|
|
34876
34893
|
const result = yield client.accountSettings.update(settings);
|
|
34877
34894
|
return result.data;
|
|
34878
34895
|
}),
|
|
@@ -34881,7 +34898,7 @@ const useUpdateAccountSettings = () => {
|
|
|
34881
34898
|
});
|
|
34882
34899
|
};
|
|
34883
34900
|
|
|
34884
|
-
var __async$
|
|
34901
|
+
var __async$N = (__this, __arguments, generator) => {
|
|
34885
34902
|
return new Promise((resolve, reject) => {
|
|
34886
34903
|
var fulfilled = (value) => {
|
|
34887
34904
|
try {
|
|
@@ -34904,7 +34921,7 @@ var __async$M = (__this, __arguments, generator) => {
|
|
|
34904
34921
|
const useParseAddress = () => {
|
|
34905
34922
|
const { client } = useShipEngine();
|
|
34906
34923
|
return useMutation({
|
|
34907
|
-
mutationFn: (_0) => __async$
|
|
34924
|
+
mutationFn: (_0) => __async$N(void 0, [_0], function* ({ address, text }) {
|
|
34908
34925
|
const result = yield client.addresses.parse(text, address);
|
|
34909
34926
|
return result.data;
|
|
34910
34927
|
}),
|
|
@@ -34913,7 +34930,7 @@ const useParseAddress = () => {
|
|
|
34913
34930
|
});
|
|
34914
34931
|
};
|
|
34915
34932
|
|
|
34916
|
-
var __async$
|
|
34933
|
+
var __async$M = (__this, __arguments, generator) => {
|
|
34917
34934
|
return new Promise((resolve, reject) => {
|
|
34918
34935
|
var fulfilled = (value) => {
|
|
34919
34936
|
try {
|
|
@@ -34936,7 +34953,7 @@ var __async$L = (__this, __arguments, generator) => {
|
|
|
34936
34953
|
const useValidateAddresses = () => {
|
|
34937
34954
|
const { client } = useShipEngine();
|
|
34938
34955
|
return useMutation({
|
|
34939
|
-
mutationFn: (addresses) => __async$
|
|
34956
|
+
mutationFn: (addresses) => __async$M(void 0, null, function* () {
|
|
34940
34957
|
const result = yield client.addresses.validate(addresses);
|
|
34941
34958
|
return result.data;
|
|
34942
34959
|
}),
|
|
@@ -34945,6 +34962,57 @@ const useValidateAddresses = () => {
|
|
|
34945
34962
|
});
|
|
34946
34963
|
};
|
|
34947
34964
|
|
|
34965
|
+
var __defProp$q = Object.defineProperty;
|
|
34966
|
+
var __defProps$n = Object.defineProperties;
|
|
34967
|
+
var __getOwnPropDescs$n = Object.getOwnPropertyDescriptors;
|
|
34968
|
+
var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
|
|
34969
|
+
var __hasOwnProp$A = Object.prototype.hasOwnProperty;
|
|
34970
|
+
var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
|
|
34971
|
+
var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
34972
|
+
var __spreadValues$q = (a, b) => {
|
|
34973
|
+
for (var prop in b || (b = {}))
|
|
34974
|
+
if (__hasOwnProp$A.call(b, prop))
|
|
34975
|
+
__defNormalProp$q(a, prop, b[prop]);
|
|
34976
|
+
if (__getOwnPropSymbols$A)
|
|
34977
|
+
for (var prop of __getOwnPropSymbols$A(b)) {
|
|
34978
|
+
if (__propIsEnum$A.call(b, prop))
|
|
34979
|
+
__defNormalProp$q(a, prop, b[prop]);
|
|
34980
|
+
}
|
|
34981
|
+
return a;
|
|
34982
|
+
};
|
|
34983
|
+
var __spreadProps$n = (a, b) => __defProps$n(a, __getOwnPropDescs$n(b));
|
|
34984
|
+
var __async$L = (__this, __arguments, generator) => {
|
|
34985
|
+
return new Promise((resolve, reject) => {
|
|
34986
|
+
var fulfilled = (value) => {
|
|
34987
|
+
try {
|
|
34988
|
+
step(generator.next(value));
|
|
34989
|
+
} catch (e) {
|
|
34990
|
+
reject(e);
|
|
34991
|
+
}
|
|
34992
|
+
};
|
|
34993
|
+
var rejected = (value) => {
|
|
34994
|
+
try {
|
|
34995
|
+
step(generator.throw(value));
|
|
34996
|
+
} catch (e) {
|
|
34997
|
+
reject(e);
|
|
34998
|
+
}
|
|
34999
|
+
};
|
|
35000
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
35001
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
35002
|
+
});
|
|
35003
|
+
};
|
|
35004
|
+
const useCreateAuctanePaySession = (params) => {
|
|
35005
|
+
const { client } = useShipEngine();
|
|
35006
|
+
return useMutation(__spreadProps$n(__spreadValues$q({}, params), {
|
|
35007
|
+
mutationFn: (request) => __async$L(void 0, null, function* () {
|
|
35008
|
+
const result = yield client.auctanePay.createSession(request);
|
|
35009
|
+
return result.data;
|
|
35010
|
+
}),
|
|
35011
|
+
mutationKey: ["useCreateAuctanePaySession"],
|
|
35012
|
+
onError
|
|
35013
|
+
}));
|
|
35014
|
+
};
|
|
35015
|
+
|
|
34948
35016
|
var __async$K = (__this, __arguments, generator) => {
|
|
34949
35017
|
return new Promise((resolve, reject) => {
|
|
34950
35018
|
var fulfilled = (value) => {
|
|
@@ -39041,4 +39109,4 @@ const alchemy = {
|
|
|
39041
39109
|
createElement
|
|
39042
39110
|
};
|
|
39043
39111
|
|
|
39044
|
-
export { AccountSettingsAPI, AddressesAPI, AlchemyContext, AlchemyProvider, AlchemyTestProvider, CarriersAPI, CodedError, ConfirmationType, ConnectionsAPI, CreditCardVendor, Currency, CustomPackagesAPI, CustomsContentsType, CustomsNonDeliveryType, Element, ErrorBoundary, FundingSourcesAPI, InsuranceAPI, InsuranceProviderType, InvoiceAddressAPI, LabelsAPI, MetadataCapability, MetadataRequirement, MetadataSatisfyingFormTypes, MovementIndicator, OrderSourcesAPI, RateCardStatus, RateCardsAPI, RatesAPI, types as SE, SalesOrderShipmentsAPI, SalesOrdersAPI, SellersAPI, ServicePointsAPI, ShipEngine, ShipEngineAPI, ShipEngineContext, ShipmentsAPI, ShippingRulesAPI, ThemesAPI, WarehousesAPI, WebhooksAPI, alchemy, camelizeKeys, decamelizeKeys, alchemy as default, delay, getEmotionCache, getEndUserIpAddress, isCodedError, isCodedErrors, isDataCodedErrors, isInvalidTokenError, logger, onError, parseError, retryUntil, useAddFunds, useAddInsuranceFunds, useAddSandboxCarriers, useAlchemy, useCalculateRates, useCancelShipment, useCarrierConnectionsServicesList, useConnectCarrier, useConnectCarrierAccount, useCreateAccountImage, useCreateFundingSource, useCreateInvoiceAddress, useCreateLabel, useCreateRateCard, useCreateSalesOrderShipment, useCreateSandboxSeller, useCreateSellerApiKey, useCreateShipment, useCreateShippingRule, useCreateWarehouse, useCreateWebhook, useDeactivateOrderSource, useDeleteAccountImage, useDeleteCarrier, useDeleteRateCard, useDeleteSellerApiKey, useDeleteShippingRule, useDeleteWarehouse, useDeleteWebhook, useDownloadRateCard, useEditShippingRule, useFundingSourcesAddFunds, useGetAccountBillingPlan, useGetAccountImages, useGetAccountSettings, useGetAutoFundingConfiguration, useGetCarrierById, useGetCarrierConnectionForm, useGetConnectionsCarrierSettings, useGetCountriesByCarrier, useGetCurrenciesByCarrier, useGetFundingSourceById, useGetFundingSourceMetadata, useGetFundingSourceTransactions, useGetHereToken, useGetInsuranceAccount, useGetInsuranceFundingSourceAcceptedTerms, useGetInvoiceAddress, useGetLabel, useGetPackageRatingGroupByCarrier, useGetRateCardById, useGetSalesOrder, useGetSalesOrderByExternalOrderId, useGetSalesOrderShipment, useGetServicePoint, useGetServicesByCarrier, useGetShipment, useGetShipmentByExternalId, useGetShipmentRates, useGetShippingRuleById, useGetShippingRuleConditionsOptions, useGetThemeById, useGetZonesByCarrier, useI18n, useListCarrierConnections, useListCarriers, useListCustomPackageTypes, useListFundingSources, useListLabels, useListLabelsInfinite, useListOrderSources, useListOrderSourcesConnections, useListRateCards, useListSalesOrderShipments, useListSalesOrderShipmentsByExternalOrderId, useListSalesOrders, useListSandboxSellerIds, useListSellerApiKeys, useListServicePoints, useListShipments, useListShippingRules, useListWarehouses, useListWebhooks, useLoadIcons, useNotifySalesOrderShipped, useParseAddress, usePublishRateCard, useRatesEstimate, useRefreshOrderSource, useRefreshOrderSourceAsync, useRegisterCarrier, useShipEngine, useUpdateAccountBillingPlan, useUpdateAccountImage, useUpdateAccountSettings, useUpdateAutoFunding, useUpdateConnectionsCarrierSettings, useUpdateFundingSource, useUpdateInvoiceAddress, useUpdateOrderSource, useUpdateRateCard, useUpdateSalesOrderShipment, useUpdateWarehouse, useUpdateWebhook, useUploadRateCard, useValidateAddresses, useVoidLabel };
|
|
39112
|
+
export { AccountSettingsAPI, AddressesAPI, AlchemyContext, AlchemyProvider, AlchemyTestProvider, AuctanePayAPI, CarriersAPI, CodedError, ConfirmationType, ConnectionsAPI, CreditCardVendor, Currency, CustomPackagesAPI, CustomsContentsType, CustomsNonDeliveryType, Element, ErrorBoundary, FundingSourcesAPI, InsuranceAPI, InsuranceProviderType, InvoiceAddressAPI, LabelsAPI, MetadataCapability, MetadataRequirement, MetadataSatisfyingFormTypes, MovementIndicator, OrderSourcesAPI, RateCardStatus, RateCardsAPI, RatesAPI, types as SE, SalesOrderShipmentsAPI, SalesOrdersAPI, SellersAPI, ServicePointsAPI, ShipEngine, ShipEngineAPI, ShipEngineContext, ShipmentsAPI, ShippingRulesAPI, ThemesAPI, WarehousesAPI, WebhooksAPI, alchemy, camelizeKeys, decamelizeKeys, alchemy as default, delay, getEmotionCache, getEndUserIpAddress, isCodedError, isCodedErrors, isDataCodedErrors, isInvalidTokenError, logger, onError, parseError, retryUntil, useAddFunds, useAddInsuranceFunds, useAddSandboxCarriers, useAlchemy, useCalculateRates, useCancelShipment, useCarrierConnectionsServicesList, useConnectCarrier, useConnectCarrierAccount, useCreateAccountImage, useCreateAuctanePaySession, useCreateFundingSource, useCreateInvoiceAddress, useCreateLabel, useCreateRateCard, useCreateSalesOrderShipment, useCreateSandboxSeller, useCreateSellerApiKey, useCreateShipment, useCreateShippingRule, useCreateWarehouse, useCreateWebhook, useDeactivateOrderSource, useDeleteAccountImage, useDeleteCarrier, useDeleteRateCard, useDeleteSellerApiKey, useDeleteShippingRule, useDeleteWarehouse, useDeleteWebhook, useDownloadRateCard, useEditShippingRule, useFundingSourcesAddFunds, useGetAccountBillingPlan, useGetAccountImages, useGetAccountSettings, useGetAutoFundingConfiguration, useGetCarrierById, useGetCarrierConnectionForm, useGetConnectionsCarrierSettings, useGetCountriesByCarrier, useGetCurrenciesByCarrier, useGetFundingSourceById, useGetFundingSourceMetadata, useGetFundingSourceTransactions, useGetHereToken, useGetInsuranceAccount, useGetInsuranceFundingSourceAcceptedTerms, useGetInvoiceAddress, useGetLabel, useGetPackageRatingGroupByCarrier, useGetRateCardById, useGetSalesOrder, useGetSalesOrderByExternalOrderId, useGetSalesOrderShipment, useGetServicePoint, useGetServicesByCarrier, useGetShipment, useGetShipmentByExternalId, useGetShipmentRates, useGetShippingRuleById, useGetShippingRuleConditionsOptions, useGetThemeById, useGetZonesByCarrier, useI18n, useListCarrierConnections, useListCarriers, useListCustomPackageTypes, useListFundingSources, useListLabels, useListLabelsInfinite, useListOrderSources, useListOrderSourcesConnections, useListRateCards, useListSalesOrderShipments, useListSalesOrderShipmentsByExternalOrderId, useListSalesOrders, useListSandboxSellerIds, useListSellerApiKeys, useListServicePoints, useListShipments, useListShippingRules, useListWarehouses, useListWebhooks, useLoadIcons, useNotifySalesOrderShipped, useParseAddress, usePublishRateCard, useRatesEstimate, useRefreshOrderSource, useRefreshOrderSourceAsync, useRegisterCarrier, useShipEngine, useUpdateAccountBillingPlan, useUpdateAccountImage, useUpdateAccountSettings, useUpdateAutoFunding, useUpdateConnectionsCarrierSettings, useUpdateFundingSource, useUpdateInvoiceAddress, useUpdateOrderSource, useUpdateRateCard, useUpdateSalesOrderShipment, useUpdateWarehouse, useUpdateWebhook, useUploadRateCard, useValidateAddresses, useVoidLabel };
|