@shipengine/alchemy 6.0.78 → 6.0.79-next.0
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 +107 -59
- package/index.mjs +107 -60
- 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
|
/**
|
|
@@ -11070,6 +11078,13 @@ class AccountFeaturesAPI {
|
|
|
11070
11078
|
this.list = () => {
|
|
11071
11079
|
return this.client.get("/v1/account/features");
|
|
11072
11080
|
};
|
|
11081
|
+
/**
|
|
11082
|
+
* The `request` method allows a Seller (usually under Enterprise plan) to request
|
|
11083
|
+
* the activation of a Feature
|
|
11084
|
+
*/
|
|
11085
|
+
this.request = (request) => {
|
|
11086
|
+
return this.client.post("/v1/account/features/request", request);
|
|
11087
|
+
};
|
|
11073
11088
|
this.client = client;
|
|
11074
11089
|
}
|
|
11075
11090
|
}
|
|
@@ -13877,7 +13892,7 @@ var ipaddr = {
|
|
|
13877
13892
|
}).call(commonjsGlobal);
|
|
13878
13893
|
} (ipaddr));
|
|
13879
13894
|
|
|
13880
|
-
var __async$
|
|
13895
|
+
var __async$18 = (__this, __arguments, generator) => {
|
|
13881
13896
|
return new Promise((resolve, reject) => {
|
|
13882
13897
|
var fulfilled = (value) => {
|
|
13883
13898
|
try {
|
|
@@ -13897,7 +13912,7 @@ var __async$17 = (__this, __arguments, generator) => {
|
|
|
13897
13912
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
13898
13913
|
});
|
|
13899
13914
|
};
|
|
13900
|
-
const getEndUserIpAddress = () => __async$
|
|
13915
|
+
const getEndUserIpAddress = () => __async$18(void 0, null, function* () {
|
|
13901
13916
|
try {
|
|
13902
13917
|
const response = yield axios.get("https://api.ipify.org/?format=json");
|
|
13903
13918
|
if (response.data.ip && ipaddrExports.isValid(response.data.ip)) {
|
|
@@ -13989,7 +14004,7 @@ var __objRest$v = (source, exclude) => {
|
|
|
13989
14004
|
}
|
|
13990
14005
|
return target;
|
|
13991
14006
|
};
|
|
13992
|
-
var __async$
|
|
14007
|
+
var __async$17 = (__this, __arguments, generator) => {
|
|
13993
14008
|
return new Promise((resolve, reject) => {
|
|
13994
14009
|
var fulfilled = (value) => {
|
|
13995
14010
|
try {
|
|
@@ -14029,7 +14044,7 @@ class CarriersAPI {
|
|
|
14029
14044
|
/**
|
|
14030
14045
|
* The `connect` method connects a carrier account to a user's ShipEngine account.
|
|
14031
14046
|
*/
|
|
14032
|
-
this.connect = (_a) => __async$
|
|
14047
|
+
this.connect = (_a) => __async$17(this, null, function* () {
|
|
14033
14048
|
var _b = _a, { carrierCode } = _b, connection = __objRest$v(_b, ["carrierCode"]);
|
|
14034
14049
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
14035
14050
|
if (!endUserIpAddress)
|
|
@@ -14133,7 +14148,7 @@ var __objRest$u = (source, exclude) => {
|
|
|
14133
14148
|
}
|
|
14134
14149
|
return target;
|
|
14135
14150
|
};
|
|
14136
|
-
var __async$
|
|
14151
|
+
var __async$16 = (__this, __arguments, generator) => {
|
|
14137
14152
|
return new Promise((resolve, reject) => {
|
|
14138
14153
|
var fulfilled = (value) => {
|
|
14139
14154
|
try {
|
|
@@ -14175,7 +14190,7 @@ class ConnectionsAPI {
|
|
|
14175
14190
|
/**
|
|
14176
14191
|
* The `connectCarrier` method connects a carrier to account.
|
|
14177
14192
|
*/
|
|
14178
|
-
this.connectCarrier = (carrierName, formData) => __async$
|
|
14193
|
+
this.connectCarrier = (carrierName, formData) => __async$16(this, null, function* () {
|
|
14179
14194
|
return yield this.client.post(
|
|
14180
14195
|
`/v1/connections/carriers/${carrierName}`,
|
|
14181
14196
|
formData,
|
|
@@ -16359,7 +16374,7 @@ var __spreadValues$Q = (a, b) => {
|
|
|
16359
16374
|
}
|
|
16360
16375
|
return a;
|
|
16361
16376
|
};
|
|
16362
|
-
var __async$
|
|
16377
|
+
var __async$15 = (__this, __arguments, generator) => {
|
|
16363
16378
|
return new Promise((resolve, reject) => {
|
|
16364
16379
|
var fulfilled = (value) => {
|
|
16365
16380
|
try {
|
|
@@ -16398,7 +16413,7 @@ class FundingSourcesAPI {
|
|
|
16398
16413
|
* The `create` method creates a new funding source for a given user. This requires
|
|
16399
16414
|
* payment information to be collected from the user.
|
|
16400
16415
|
*/
|
|
16401
|
-
this.create = (createFundingSource) => __async$
|
|
16416
|
+
this.create = (createFundingSource) => __async$15(this, null, function* () {
|
|
16402
16417
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16403
16418
|
if (!endUserIpAddress) {
|
|
16404
16419
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
@@ -16412,7 +16427,7 @@ class FundingSourcesAPI {
|
|
|
16412
16427
|
* user to update the billing address or payment information associated with the
|
|
16413
16428
|
* funding source.
|
|
16414
16429
|
*/
|
|
16415
|
-
this.update = (billingInfo, creditCardInfo, auctanePayInfo, fundingSourceId) => __async$
|
|
16430
|
+
this.update = (billingInfo, creditCardInfo, auctanePayInfo, fundingSourceId) => __async$15(this, null, function* () {
|
|
16416
16431
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16417
16432
|
if (!endUserIpAddress) {
|
|
16418
16433
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
@@ -16432,7 +16447,7 @@ class FundingSourcesAPI {
|
|
|
16432
16447
|
* The `registerCarrier` method registers a carrier account and associates
|
|
16433
16448
|
* it with a given funding source.
|
|
16434
16449
|
*/
|
|
16435
|
-
this.registerCarrier = (carrier) => __async$
|
|
16450
|
+
this.registerCarrier = (carrier) => __async$15(this, null, function* () {
|
|
16436
16451
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16437
16452
|
if (!endUserIpAddress) {
|
|
16438
16453
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
@@ -16444,7 +16459,7 @@ class FundingSourcesAPI {
|
|
|
16444
16459
|
/**
|
|
16445
16460
|
* The `addFunds` method allows you to add funds to a funding source.
|
|
16446
16461
|
*/
|
|
16447
|
-
this.addFunds = (amount, fundingSourceId) => __async$
|
|
16462
|
+
this.addFunds = (amount, fundingSourceId) => __async$15(this, null, function* () {
|
|
16448
16463
|
return yield this.client.put(
|
|
16449
16464
|
`/v1/funding_sources/${fundingSourceId}/add_funds`,
|
|
16450
16465
|
amount
|
|
@@ -16454,7 +16469,7 @@ class FundingSourcesAPI {
|
|
|
16454
16469
|
* The `metadata` method returns seller-specific requirements for creating funding sources
|
|
16455
16470
|
* and attaching carriers
|
|
16456
16471
|
*/
|
|
16457
|
-
this.metadata = () => __async$
|
|
16472
|
+
this.metadata = () => __async$15(this, null, function* () {
|
|
16458
16473
|
return yield this.client.get("/v1/funding_sources/metadata");
|
|
16459
16474
|
});
|
|
16460
16475
|
/**
|
|
@@ -16506,7 +16521,7 @@ class InsuranceAPI {
|
|
|
16506
16521
|
}
|
|
16507
16522
|
}
|
|
16508
16523
|
|
|
16509
|
-
var __async$
|
|
16524
|
+
var __async$14 = (__this, __arguments, generator) => {
|
|
16510
16525
|
return new Promise((resolve, reject) => {
|
|
16511
16526
|
var fulfilled = (value) => {
|
|
16512
16527
|
try {
|
|
@@ -16538,13 +16553,13 @@ class InvoiceAddressAPI {
|
|
|
16538
16553
|
/**
|
|
16539
16554
|
* The `create` method creates a new invoice address for a given user.
|
|
16540
16555
|
*/
|
|
16541
|
-
this.create = (invoiceAddress) => __async$
|
|
16556
|
+
this.create = (invoiceAddress) => __async$14(this, null, function* () {
|
|
16542
16557
|
return yield this.client.post("/v1/invoice_address", invoiceAddress);
|
|
16543
16558
|
});
|
|
16544
16559
|
/**
|
|
16545
16560
|
* The `update` method updates a invoice address for a given user.
|
|
16546
16561
|
*/
|
|
16547
|
-
this.update = (invoiceAddress) => __async$
|
|
16562
|
+
this.update = (invoiceAddress) => __async$14(this, null, function* () {
|
|
16548
16563
|
return yield this.client.put("/v1/invoice_address", invoiceAddress);
|
|
16549
16564
|
});
|
|
16550
16565
|
this.client = client;
|
|
@@ -16851,7 +16866,7 @@ class SalesOrdersAPI {
|
|
|
16851
16866
|
}
|
|
16852
16867
|
}
|
|
16853
16868
|
|
|
16854
|
-
var __async$
|
|
16869
|
+
var __async$13 = (__this, __arguments, generator) => {
|
|
16855
16870
|
return new Promise((resolve, reject) => {
|
|
16856
16871
|
var fulfilled = (value) => {
|
|
16857
16872
|
try {
|
|
@@ -16909,7 +16924,7 @@ class SellersAPI {
|
|
|
16909
16924
|
/**
|
|
16910
16925
|
* Deletes an API Key
|
|
16911
16926
|
*/
|
|
16912
|
-
this.deleteSellerApiKey = (_0) => __async$
|
|
16927
|
+
this.deleteSellerApiKey = (_0) => __async$13(this, [_0], function* ({
|
|
16913
16928
|
encryptedApiKey,
|
|
16914
16929
|
sellerId,
|
|
16915
16930
|
isSandbox
|
|
@@ -16997,7 +17012,7 @@ class ServicePointsAPI {
|
|
|
16997
17012
|
}
|
|
16998
17013
|
}
|
|
16999
17014
|
|
|
17000
|
-
var __async$
|
|
17015
|
+
var __async$12 = (__this, __arguments, generator) => {
|
|
17001
17016
|
return new Promise((resolve, reject) => {
|
|
17002
17017
|
var fulfilled = (value) => {
|
|
17003
17018
|
try {
|
|
@@ -17046,7 +17061,7 @@ class ShipmentsAPI {
|
|
|
17046
17061
|
* The `create` method allows for creating shipments based on a list of shipment
|
|
17047
17062
|
* items passed into this method.
|
|
17048
17063
|
*/
|
|
17049
|
-
this.create = (...shipments) => __async$
|
|
17064
|
+
this.create = (...shipments) => __async$12(this, null, function* () {
|
|
17050
17065
|
return this.client.post("/v1/shipments", {
|
|
17051
17066
|
shipments
|
|
17052
17067
|
});
|
|
@@ -34494,7 +34509,7 @@ var __objRest$s = (source, exclude) => {
|
|
|
34494
34509
|
}
|
|
34495
34510
|
return target;
|
|
34496
34511
|
};
|
|
34497
|
-
var __async$
|
|
34512
|
+
var __async$11 = (__this, __arguments, generator) => {
|
|
34498
34513
|
return new Promise((resolve, reject) => {
|
|
34499
34514
|
var fulfilled = (value) => {
|
|
34500
34515
|
try {
|
|
@@ -34582,7 +34597,7 @@ class ShipEngineAPI {
|
|
|
34582
34597
|
});
|
|
34583
34598
|
client.defaults.headers.common["Authorization"] = `Bearer ${token}`;
|
|
34584
34599
|
client.interceptors.request.use(
|
|
34585
|
-
(config) => __async$
|
|
34600
|
+
(config) => __async$11(this, null, function* () {
|
|
34586
34601
|
if (config.isSandbox) {
|
|
34587
34602
|
if (!this.sandboxToken) {
|
|
34588
34603
|
this.sandboxToken = yield getSandboxToken == null ? void 0 : getSandboxToken();
|
|
@@ -34611,7 +34626,7 @@ class ShipEngineAPI {
|
|
|
34611
34626
|
}
|
|
34612
34627
|
return res;
|
|
34613
34628
|
},
|
|
34614
|
-
(err) => __async$
|
|
34629
|
+
(err) => __async$11(this, null, function* () {
|
|
34615
34630
|
var _a, _b, _c, _d, _e;
|
|
34616
34631
|
if (debug) {
|
|
34617
34632
|
logger$1.error(
|
|
@@ -34660,7 +34675,7 @@ class ShipEngineAPI {
|
|
|
34660
34675
|
* that token (also known as Seller ID)
|
|
34661
34676
|
*/
|
|
34662
34677
|
getTenant(isSandbox) {
|
|
34663
|
-
return __async$
|
|
34678
|
+
return __async$11(this, null, function* () {
|
|
34664
34679
|
var _a;
|
|
34665
34680
|
if (!isSandbox) {
|
|
34666
34681
|
return this.getTenantFromToken(this.token);
|
|
@@ -35031,7 +35046,7 @@ const retryUntil = (callbackFn, retries = 10, timeoutBetweenAttempts = 1e3) => P
|
|
|
35031
35046
|
throw error;
|
|
35032
35047
|
});
|
|
35033
35048
|
|
|
35034
|
-
var __async
|
|
35049
|
+
var __async$10 = (__this, __arguments, generator) => {
|
|
35035
35050
|
return new Promise((resolve, reject) => {
|
|
35036
35051
|
var fulfilled = (value) => {
|
|
35037
35052
|
try {
|
|
@@ -35054,7 +35069,7 @@ var __async$$ = (__this, __arguments, generator) => {
|
|
|
35054
35069
|
const useCreateAccountImage = () => {
|
|
35055
35070
|
const { client } = useShipEngine();
|
|
35056
35071
|
return reactQuery.useMutation({
|
|
35057
|
-
mutationFn: (data) => __async
|
|
35072
|
+
mutationFn: (data) => __async$10(void 0, null, function* () {
|
|
35058
35073
|
const result = yield client.accountSettings.createImage(data);
|
|
35059
35074
|
return result.data;
|
|
35060
35075
|
}),
|
|
@@ -35063,7 +35078,7 @@ const useCreateAccountImage = () => {
|
|
|
35063
35078
|
});
|
|
35064
35079
|
};
|
|
35065
35080
|
|
|
35066
|
-
var __async
|
|
35081
|
+
var __async$$ = (__this, __arguments, generator) => {
|
|
35067
35082
|
return new Promise((resolve, reject) => {
|
|
35068
35083
|
var fulfilled = (value) => {
|
|
35069
35084
|
try {
|
|
@@ -35086,7 +35101,7 @@ var __async$_ = (__this, __arguments, generator) => {
|
|
|
35086
35101
|
const useDeleteAccountImage = () => {
|
|
35087
35102
|
const { client } = useShipEngine();
|
|
35088
35103
|
return reactQuery.useMutation({
|
|
35089
|
-
mutationFn: (labelImageId) => __async
|
|
35104
|
+
mutationFn: (labelImageId) => __async$$(void 0, null, function* () {
|
|
35090
35105
|
const result = yield client.accountSettings.deleteImage(labelImageId);
|
|
35091
35106
|
return result.data;
|
|
35092
35107
|
}),
|
|
@@ -35115,7 +35130,7 @@ const useGetAccountSettings = () => {
|
|
|
35115
35130
|
});
|
|
35116
35131
|
};
|
|
35117
35132
|
|
|
35118
|
-
var __async$
|
|
35133
|
+
var __async$_ = (__this, __arguments, generator) => {
|
|
35119
35134
|
return new Promise((resolve, reject) => {
|
|
35120
35135
|
var fulfilled = (value) => {
|
|
35121
35136
|
try {
|
|
@@ -35138,7 +35153,7 @@ var __async$Z = (__this, __arguments, generator) => {
|
|
|
35138
35153
|
const useUpdateAccountImage = () => {
|
|
35139
35154
|
const { client } = useShipEngine();
|
|
35140
35155
|
return reactQuery.useMutation({
|
|
35141
|
-
mutationFn: (data) => __async$
|
|
35156
|
+
mutationFn: (data) => __async$_(void 0, null, function* () {
|
|
35142
35157
|
const result = yield client.accountSettings.updateImage(data);
|
|
35143
35158
|
return result.data;
|
|
35144
35159
|
}),
|
|
@@ -35147,7 +35162,7 @@ const useUpdateAccountImage = () => {
|
|
|
35147
35162
|
});
|
|
35148
35163
|
};
|
|
35149
35164
|
|
|
35150
|
-
var __async$
|
|
35165
|
+
var __async$Z = (__this, __arguments, generator) => {
|
|
35151
35166
|
return new Promise((resolve, reject) => {
|
|
35152
35167
|
var fulfilled = (value) => {
|
|
35153
35168
|
try {
|
|
@@ -35170,7 +35185,7 @@ var __async$Y = (__this, __arguments, generator) => {
|
|
|
35170
35185
|
const useUpdateAccountSettings = () => {
|
|
35171
35186
|
const { client } = useShipEngine();
|
|
35172
35187
|
return reactQuery.useMutation({
|
|
35173
|
-
mutationFn: (settings) => __async$
|
|
35188
|
+
mutationFn: (settings) => __async$Z(void 0, null, function* () {
|
|
35174
35189
|
const result = yield client.accountSettings.update(settings);
|
|
35175
35190
|
return result.data;
|
|
35176
35191
|
}),
|
|
@@ -35227,7 +35242,7 @@ var __spreadValues$K = (a, b) => {
|
|
|
35227
35242
|
return a;
|
|
35228
35243
|
};
|
|
35229
35244
|
var __spreadProps$H = (a, b) => __defProps$H(a, __getOwnPropDescs$H(b));
|
|
35230
|
-
var __async$
|
|
35245
|
+
var __async$Y = (__this, __arguments, generator) => {
|
|
35231
35246
|
return new Promise((resolve, reject) => {
|
|
35232
35247
|
var fulfilled = (value) => {
|
|
35233
35248
|
try {
|
|
@@ -35250,7 +35265,7 @@ var __async$X = (__this, __arguments, generator) => {
|
|
|
35250
35265
|
const useEnableAccountAddon = (params) => {
|
|
35251
35266
|
const { client } = useShipEngine();
|
|
35252
35267
|
return reactQuery.useMutation(__spreadProps$H(__spreadValues$K({}, params), {
|
|
35253
|
-
mutationFn: (addonType) => __async$
|
|
35268
|
+
mutationFn: (addonType) => __async$Y(void 0, null, function* () {
|
|
35254
35269
|
const result = yield client.accountAddons.enable(addonType);
|
|
35255
35270
|
return result.data;
|
|
35256
35271
|
}),
|
|
@@ -35278,7 +35293,7 @@ var __spreadValues$J = (a, b) => {
|
|
|
35278
35293
|
return a;
|
|
35279
35294
|
};
|
|
35280
35295
|
var __spreadProps$G = (a, b) => __defProps$G(a, __getOwnPropDescs$G(b));
|
|
35281
|
-
var __async$
|
|
35296
|
+
var __async$X = (__this, __arguments, generator) => {
|
|
35282
35297
|
return new Promise((resolve, reject) => {
|
|
35283
35298
|
var fulfilled = (value) => {
|
|
35284
35299
|
try {
|
|
@@ -35301,7 +35316,7 @@ var __async$W = (__this, __arguments, generator) => {
|
|
|
35301
35316
|
const useDisableAccountAddon = (params) => {
|
|
35302
35317
|
const { client } = useShipEngine();
|
|
35303
35318
|
return reactQuery.useMutation(__spreadProps$G(__spreadValues$J({}, params), {
|
|
35304
|
-
mutationFn: (addonType) => __async$
|
|
35319
|
+
mutationFn: (addonType) => __async$X(void 0, null, function* () {
|
|
35305
35320
|
const result = yield client.accountAddons.disable(addonType);
|
|
35306
35321
|
return result.data;
|
|
35307
35322
|
}),
|
|
@@ -35339,6 +35354,38 @@ const useListAccountFeatures = (params) => {
|
|
|
35339
35354
|
}));
|
|
35340
35355
|
};
|
|
35341
35356
|
|
|
35357
|
+
var __async$W = (__this, __arguments, generator) => {
|
|
35358
|
+
return new Promise((resolve, reject) => {
|
|
35359
|
+
var fulfilled = (value) => {
|
|
35360
|
+
try {
|
|
35361
|
+
step(generator.next(value));
|
|
35362
|
+
} catch (e) {
|
|
35363
|
+
reject(e);
|
|
35364
|
+
}
|
|
35365
|
+
};
|
|
35366
|
+
var rejected = (value) => {
|
|
35367
|
+
try {
|
|
35368
|
+
step(generator.throw(value));
|
|
35369
|
+
} catch (e) {
|
|
35370
|
+
reject(e);
|
|
35371
|
+
}
|
|
35372
|
+
};
|
|
35373
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
35374
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
35375
|
+
});
|
|
35376
|
+
};
|
|
35377
|
+
const useRequestAccountFeature = () => {
|
|
35378
|
+
const { client } = useShipEngine();
|
|
35379
|
+
return reactQuery.useMutation({
|
|
35380
|
+
mutationFn: (request) => __async$W(void 0, null, function* () {
|
|
35381
|
+
const result = yield client.accountFeatures.request(request);
|
|
35382
|
+
return result.data;
|
|
35383
|
+
}),
|
|
35384
|
+
mutationKey: ["useRequestAccountFeature"],
|
|
35385
|
+
onError
|
|
35386
|
+
});
|
|
35387
|
+
};
|
|
35388
|
+
|
|
35342
35389
|
var __async$V = (__this, __arguments, generator) => {
|
|
35343
35390
|
return new Promise((resolve, reject) => {
|
|
35344
35391
|
var fulfilled = (value) => {
|
|
@@ -40440,6 +40487,7 @@ exports.useRatesEstimate = useRatesEstimate;
|
|
|
40440
40487
|
exports.useRefreshOrderSource = useRefreshOrderSource;
|
|
40441
40488
|
exports.useRefreshOrderSourceAsync = useRefreshOrderSourceAsync;
|
|
40442
40489
|
exports.useRegisterCarrier = useRegisterCarrier;
|
|
40490
|
+
exports.useRequestAccountFeature = useRequestAccountFeature;
|
|
40443
40491
|
exports.useRequestStampsAccountUrls = useRequestStampsAccountUrls;
|
|
40444
40492
|
exports.useShipEngine = useShipEngine;
|
|
40445
40493
|
exports.useUpdateAccountBillingPlan = useUpdateAccountBillingPlan;
|
package/index.mjs
CHANGED
|
@@ -4883,33 +4883,41 @@ var _getHolder = getHolder$2;
|
|
|
4883
4883
|
|
|
4884
4884
|
/** Used as references for various `Number` constants. */
|
|
4885
4885
|
|
|
4886
|
-
var
|
|
4886
|
+
var _isIndex;
|
|
4887
|
+
var hasRequired_isIndex;
|
|
4887
4888
|
|
|
4888
|
-
|
|
4889
|
-
|
|
4889
|
+
function require_isIndex () {
|
|
4890
|
+
if (hasRequired_isIndex) return _isIndex;
|
|
4891
|
+
hasRequired_isIndex = 1;
|
|
4892
|
+
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
4890
4893
|
|
|
4891
|
-
/**
|
|
4892
|
-
|
|
4893
|
-
*
|
|
4894
|
-
* @private
|
|
4895
|
-
* @param {*} value The value to check.
|
|
4896
|
-
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
|
4897
|
-
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
|
4898
|
-
*/
|
|
4899
|
-
function isIndex$3(value, length) {
|
|
4900
|
-
var type = typeof value;
|
|
4901
|
-
length = length == null ? MAX_SAFE_INTEGER$1 : length;
|
|
4894
|
+
/** Used to detect unsigned integer values. */
|
|
4895
|
+
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
4902
4896
|
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
}
|
|
4897
|
+
/**
|
|
4898
|
+
* Checks if `value` is a valid array-like index.
|
|
4899
|
+
*
|
|
4900
|
+
* @private
|
|
4901
|
+
* @param {*} value The value to check.
|
|
4902
|
+
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
|
4903
|
+
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
|
4904
|
+
*/
|
|
4905
|
+
function isIndex(value, length) {
|
|
4906
|
+
var type = typeof value;
|
|
4907
|
+
length = length == null ? MAX_SAFE_INTEGER : length;
|
|
4908
4908
|
|
|
4909
|
-
|
|
4909
|
+
return !!length &&
|
|
4910
|
+
(type == 'number' ||
|
|
4911
|
+
(type != 'symbol' && reIsUint.test(value))) &&
|
|
4912
|
+
(value > -1 && value % 1 == 0 && value < length);
|
|
4913
|
+
}
|
|
4914
|
+
|
|
4915
|
+
_isIndex = isIndex;
|
|
4916
|
+
return _isIndex;
|
|
4917
|
+
}
|
|
4910
4918
|
|
|
4911
4919
|
var copyArray$2 = _copyArray,
|
|
4912
|
-
isIndex$2 =
|
|
4920
|
+
isIndex$2 = require_isIndex();
|
|
4913
4921
|
|
|
4914
4922
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
4915
4923
|
var nativeMin$1 = Math.min;
|
|
@@ -6102,7 +6110,7 @@ var baseTimes = _baseTimes,
|
|
|
6102
6110
|
isArguments$2 = requireIsArguments(),
|
|
6103
6111
|
isArray$f = isArray_1,
|
|
6104
6112
|
isBuffer$4 = isBufferExports,
|
|
6105
|
-
isIndex$1 =
|
|
6113
|
+
isIndex$1 = require_isIndex(),
|
|
6106
6114
|
isTypedArray$1 = requireIsTypedArray();
|
|
6107
6115
|
|
|
6108
6116
|
/** Used for built-in method references. */
|
|
@@ -9433,7 +9441,7 @@ var _baseHasIn = baseHasIn$1;
|
|
|
9433
9441
|
var castPath = _castPath,
|
|
9434
9442
|
isArguments$1 = requireIsArguments(),
|
|
9435
9443
|
isArray$8 = isArray_1,
|
|
9436
|
-
isIndex =
|
|
9444
|
+
isIndex = require_isIndex(),
|
|
9437
9445
|
isLength = isLength_1,
|
|
9438
9446
|
toKey$3 = _toKey;
|
|
9439
9447
|
|
|
@@ -10323,7 +10331,7 @@ function require_isIterateeCall () {
|
|
|
10323
10331
|
hasRequired_isIterateeCall = 1;
|
|
10324
10332
|
var eq = requireEq(),
|
|
10325
10333
|
isArrayLike = isArrayLike_1,
|
|
10326
|
-
isIndex =
|
|
10334
|
+
isIndex = require_isIndex(),
|
|
10327
10335
|
isObject = isObject_1;
|
|
10328
10336
|
|
|
10329
10337
|
/**
|
|
@@ -11048,6 +11056,13 @@ class AccountFeaturesAPI {
|
|
|
11048
11056
|
this.list = () => {
|
|
11049
11057
|
return this.client.get("/v1/account/features");
|
|
11050
11058
|
};
|
|
11059
|
+
/**
|
|
11060
|
+
* The `request` method allows a Seller (usually under Enterprise plan) to request
|
|
11061
|
+
* the activation of a Feature
|
|
11062
|
+
*/
|
|
11063
|
+
this.request = (request) => {
|
|
11064
|
+
return this.client.post("/v1/account/features/request", request);
|
|
11065
|
+
};
|
|
11051
11066
|
this.client = client;
|
|
11052
11067
|
}
|
|
11053
11068
|
}
|
|
@@ -13855,7 +13870,7 @@ var ipaddr = {
|
|
|
13855
13870
|
}).call(commonjsGlobal);
|
|
13856
13871
|
} (ipaddr));
|
|
13857
13872
|
|
|
13858
|
-
var __async$
|
|
13873
|
+
var __async$18 = (__this, __arguments, generator) => {
|
|
13859
13874
|
return new Promise((resolve, reject) => {
|
|
13860
13875
|
var fulfilled = (value) => {
|
|
13861
13876
|
try {
|
|
@@ -13875,7 +13890,7 @@ var __async$17 = (__this, __arguments, generator) => {
|
|
|
13875
13890
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
13876
13891
|
});
|
|
13877
13892
|
};
|
|
13878
|
-
const getEndUserIpAddress = () => __async$
|
|
13893
|
+
const getEndUserIpAddress = () => __async$18(void 0, null, function* () {
|
|
13879
13894
|
try {
|
|
13880
13895
|
const response = yield axios.get("https://api.ipify.org/?format=json");
|
|
13881
13896
|
if (response.data.ip && ipaddrExports.isValid(response.data.ip)) {
|
|
@@ -13967,7 +13982,7 @@ var __objRest$v = (source, exclude) => {
|
|
|
13967
13982
|
}
|
|
13968
13983
|
return target;
|
|
13969
13984
|
};
|
|
13970
|
-
var __async$
|
|
13985
|
+
var __async$17 = (__this, __arguments, generator) => {
|
|
13971
13986
|
return new Promise((resolve, reject) => {
|
|
13972
13987
|
var fulfilled = (value) => {
|
|
13973
13988
|
try {
|
|
@@ -14007,7 +14022,7 @@ class CarriersAPI {
|
|
|
14007
14022
|
/**
|
|
14008
14023
|
* The `connect` method connects a carrier account to a user's ShipEngine account.
|
|
14009
14024
|
*/
|
|
14010
|
-
this.connect = (_a) => __async$
|
|
14025
|
+
this.connect = (_a) => __async$17(this, null, function* () {
|
|
14011
14026
|
var _b = _a, { carrierCode } = _b, connection = __objRest$v(_b, ["carrierCode"]);
|
|
14012
14027
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
14013
14028
|
if (!endUserIpAddress)
|
|
@@ -14111,7 +14126,7 @@ var __objRest$u = (source, exclude) => {
|
|
|
14111
14126
|
}
|
|
14112
14127
|
return target;
|
|
14113
14128
|
};
|
|
14114
|
-
var __async$
|
|
14129
|
+
var __async$16 = (__this, __arguments, generator) => {
|
|
14115
14130
|
return new Promise((resolve, reject) => {
|
|
14116
14131
|
var fulfilled = (value) => {
|
|
14117
14132
|
try {
|
|
@@ -14153,7 +14168,7 @@ class ConnectionsAPI {
|
|
|
14153
14168
|
/**
|
|
14154
14169
|
* The `connectCarrier` method connects a carrier to account.
|
|
14155
14170
|
*/
|
|
14156
|
-
this.connectCarrier = (carrierName, formData) => __async$
|
|
14171
|
+
this.connectCarrier = (carrierName, formData) => __async$16(this, null, function* () {
|
|
14157
14172
|
return yield this.client.post(
|
|
14158
14173
|
`/v1/connections/carriers/${carrierName}`,
|
|
14159
14174
|
formData,
|
|
@@ -16337,7 +16352,7 @@ var __spreadValues$Q = (a, b) => {
|
|
|
16337
16352
|
}
|
|
16338
16353
|
return a;
|
|
16339
16354
|
};
|
|
16340
|
-
var __async$
|
|
16355
|
+
var __async$15 = (__this, __arguments, generator) => {
|
|
16341
16356
|
return new Promise((resolve, reject) => {
|
|
16342
16357
|
var fulfilled = (value) => {
|
|
16343
16358
|
try {
|
|
@@ -16376,7 +16391,7 @@ class FundingSourcesAPI {
|
|
|
16376
16391
|
* The `create` method creates a new funding source for a given user. This requires
|
|
16377
16392
|
* payment information to be collected from the user.
|
|
16378
16393
|
*/
|
|
16379
|
-
this.create = (createFundingSource) => __async$
|
|
16394
|
+
this.create = (createFundingSource) => __async$15(this, null, function* () {
|
|
16380
16395
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16381
16396
|
if (!endUserIpAddress) {
|
|
16382
16397
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
@@ -16390,7 +16405,7 @@ class FundingSourcesAPI {
|
|
|
16390
16405
|
* user to update the billing address or payment information associated with the
|
|
16391
16406
|
* funding source.
|
|
16392
16407
|
*/
|
|
16393
|
-
this.update = (billingInfo, creditCardInfo, auctanePayInfo, fundingSourceId) => __async$
|
|
16408
|
+
this.update = (billingInfo, creditCardInfo, auctanePayInfo, fundingSourceId) => __async$15(this, null, function* () {
|
|
16394
16409
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16395
16410
|
if (!endUserIpAddress) {
|
|
16396
16411
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
@@ -16410,7 +16425,7 @@ class FundingSourcesAPI {
|
|
|
16410
16425
|
* The `registerCarrier` method registers a carrier account and associates
|
|
16411
16426
|
* it with a given funding source.
|
|
16412
16427
|
*/
|
|
16413
|
-
this.registerCarrier = (carrier) => __async$
|
|
16428
|
+
this.registerCarrier = (carrier) => __async$15(this, null, function* () {
|
|
16414
16429
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16415
16430
|
if (!endUserIpAddress) {
|
|
16416
16431
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
@@ -16422,7 +16437,7 @@ class FundingSourcesAPI {
|
|
|
16422
16437
|
/**
|
|
16423
16438
|
* The `addFunds` method allows you to add funds to a funding source.
|
|
16424
16439
|
*/
|
|
16425
|
-
this.addFunds = (amount, fundingSourceId) => __async$
|
|
16440
|
+
this.addFunds = (amount, fundingSourceId) => __async$15(this, null, function* () {
|
|
16426
16441
|
return yield this.client.put(
|
|
16427
16442
|
`/v1/funding_sources/${fundingSourceId}/add_funds`,
|
|
16428
16443
|
amount
|
|
@@ -16432,7 +16447,7 @@ class FundingSourcesAPI {
|
|
|
16432
16447
|
* The `metadata` method returns seller-specific requirements for creating funding sources
|
|
16433
16448
|
* and attaching carriers
|
|
16434
16449
|
*/
|
|
16435
|
-
this.metadata = () => __async$
|
|
16450
|
+
this.metadata = () => __async$15(this, null, function* () {
|
|
16436
16451
|
return yield this.client.get("/v1/funding_sources/metadata");
|
|
16437
16452
|
});
|
|
16438
16453
|
/**
|
|
@@ -16484,7 +16499,7 @@ class InsuranceAPI {
|
|
|
16484
16499
|
}
|
|
16485
16500
|
}
|
|
16486
16501
|
|
|
16487
|
-
var __async$
|
|
16502
|
+
var __async$14 = (__this, __arguments, generator) => {
|
|
16488
16503
|
return new Promise((resolve, reject) => {
|
|
16489
16504
|
var fulfilled = (value) => {
|
|
16490
16505
|
try {
|
|
@@ -16516,13 +16531,13 @@ class InvoiceAddressAPI {
|
|
|
16516
16531
|
/**
|
|
16517
16532
|
* The `create` method creates a new invoice address for a given user.
|
|
16518
16533
|
*/
|
|
16519
|
-
this.create = (invoiceAddress) => __async$
|
|
16534
|
+
this.create = (invoiceAddress) => __async$14(this, null, function* () {
|
|
16520
16535
|
return yield this.client.post("/v1/invoice_address", invoiceAddress);
|
|
16521
16536
|
});
|
|
16522
16537
|
/**
|
|
16523
16538
|
* The `update` method updates a invoice address for a given user.
|
|
16524
16539
|
*/
|
|
16525
|
-
this.update = (invoiceAddress) => __async$
|
|
16540
|
+
this.update = (invoiceAddress) => __async$14(this, null, function* () {
|
|
16526
16541
|
return yield this.client.put("/v1/invoice_address", invoiceAddress);
|
|
16527
16542
|
});
|
|
16528
16543
|
this.client = client;
|
|
@@ -16829,7 +16844,7 @@ class SalesOrdersAPI {
|
|
|
16829
16844
|
}
|
|
16830
16845
|
}
|
|
16831
16846
|
|
|
16832
|
-
var __async$
|
|
16847
|
+
var __async$13 = (__this, __arguments, generator) => {
|
|
16833
16848
|
return new Promise((resolve, reject) => {
|
|
16834
16849
|
var fulfilled = (value) => {
|
|
16835
16850
|
try {
|
|
@@ -16887,7 +16902,7 @@ class SellersAPI {
|
|
|
16887
16902
|
/**
|
|
16888
16903
|
* Deletes an API Key
|
|
16889
16904
|
*/
|
|
16890
|
-
this.deleteSellerApiKey = (_0) => __async$
|
|
16905
|
+
this.deleteSellerApiKey = (_0) => __async$13(this, [_0], function* ({
|
|
16891
16906
|
encryptedApiKey,
|
|
16892
16907
|
sellerId,
|
|
16893
16908
|
isSandbox
|
|
@@ -16975,7 +16990,7 @@ class ServicePointsAPI {
|
|
|
16975
16990
|
}
|
|
16976
16991
|
}
|
|
16977
16992
|
|
|
16978
|
-
var __async$
|
|
16993
|
+
var __async$12 = (__this, __arguments, generator) => {
|
|
16979
16994
|
return new Promise((resolve, reject) => {
|
|
16980
16995
|
var fulfilled = (value) => {
|
|
16981
16996
|
try {
|
|
@@ -17024,7 +17039,7 @@ class ShipmentsAPI {
|
|
|
17024
17039
|
* The `create` method allows for creating shipments based on a list of shipment
|
|
17025
17040
|
* items passed into this method.
|
|
17026
17041
|
*/
|
|
17027
|
-
this.create = (...shipments) => __async$
|
|
17042
|
+
this.create = (...shipments) => __async$12(this, null, function* () {
|
|
17028
17043
|
return this.client.post("/v1/shipments", {
|
|
17029
17044
|
shipments
|
|
17030
17045
|
});
|
|
@@ -34472,7 +34487,7 @@ var __objRest$s = (source, exclude) => {
|
|
|
34472
34487
|
}
|
|
34473
34488
|
return target;
|
|
34474
34489
|
};
|
|
34475
|
-
var __async$
|
|
34490
|
+
var __async$11 = (__this, __arguments, generator) => {
|
|
34476
34491
|
return new Promise((resolve, reject) => {
|
|
34477
34492
|
var fulfilled = (value) => {
|
|
34478
34493
|
try {
|
|
@@ -34560,7 +34575,7 @@ class ShipEngineAPI {
|
|
|
34560
34575
|
});
|
|
34561
34576
|
client.defaults.headers.common["Authorization"] = `Bearer ${token}`;
|
|
34562
34577
|
client.interceptors.request.use(
|
|
34563
|
-
(config) => __async$
|
|
34578
|
+
(config) => __async$11(this, null, function* () {
|
|
34564
34579
|
if (config.isSandbox) {
|
|
34565
34580
|
if (!this.sandboxToken) {
|
|
34566
34581
|
this.sandboxToken = yield getSandboxToken == null ? void 0 : getSandboxToken();
|
|
@@ -34589,7 +34604,7 @@ class ShipEngineAPI {
|
|
|
34589
34604
|
}
|
|
34590
34605
|
return res;
|
|
34591
34606
|
},
|
|
34592
|
-
(err) => __async$
|
|
34607
|
+
(err) => __async$11(this, null, function* () {
|
|
34593
34608
|
var _a, _b, _c, _d, _e;
|
|
34594
34609
|
if (debug) {
|
|
34595
34610
|
logger$1.error(
|
|
@@ -34638,7 +34653,7 @@ class ShipEngineAPI {
|
|
|
34638
34653
|
* that token (also known as Seller ID)
|
|
34639
34654
|
*/
|
|
34640
34655
|
getTenant(isSandbox) {
|
|
34641
|
-
return __async$
|
|
34656
|
+
return __async$11(this, null, function* () {
|
|
34642
34657
|
var _a;
|
|
34643
34658
|
if (!isSandbox) {
|
|
34644
34659
|
return this.getTenantFromToken(this.token);
|
|
@@ -35009,7 +35024,7 @@ const retryUntil = (callbackFn, retries = 10, timeoutBetweenAttempts = 1e3) => P
|
|
|
35009
35024
|
throw error;
|
|
35010
35025
|
});
|
|
35011
35026
|
|
|
35012
|
-
var __async
|
|
35027
|
+
var __async$10 = (__this, __arguments, generator) => {
|
|
35013
35028
|
return new Promise((resolve, reject) => {
|
|
35014
35029
|
var fulfilled = (value) => {
|
|
35015
35030
|
try {
|
|
@@ -35032,7 +35047,7 @@ var __async$$ = (__this, __arguments, generator) => {
|
|
|
35032
35047
|
const useCreateAccountImage = () => {
|
|
35033
35048
|
const { client } = useShipEngine();
|
|
35034
35049
|
return useMutation({
|
|
35035
|
-
mutationFn: (data) => __async
|
|
35050
|
+
mutationFn: (data) => __async$10(void 0, null, function* () {
|
|
35036
35051
|
const result = yield client.accountSettings.createImage(data);
|
|
35037
35052
|
return result.data;
|
|
35038
35053
|
}),
|
|
@@ -35041,7 +35056,7 @@ const useCreateAccountImage = () => {
|
|
|
35041
35056
|
});
|
|
35042
35057
|
};
|
|
35043
35058
|
|
|
35044
|
-
var __async
|
|
35059
|
+
var __async$$ = (__this, __arguments, generator) => {
|
|
35045
35060
|
return new Promise((resolve, reject) => {
|
|
35046
35061
|
var fulfilled = (value) => {
|
|
35047
35062
|
try {
|
|
@@ -35064,7 +35079,7 @@ var __async$_ = (__this, __arguments, generator) => {
|
|
|
35064
35079
|
const useDeleteAccountImage = () => {
|
|
35065
35080
|
const { client } = useShipEngine();
|
|
35066
35081
|
return useMutation({
|
|
35067
|
-
mutationFn: (labelImageId) => __async
|
|
35082
|
+
mutationFn: (labelImageId) => __async$$(void 0, null, function* () {
|
|
35068
35083
|
const result = yield client.accountSettings.deleteImage(labelImageId);
|
|
35069
35084
|
return result.data;
|
|
35070
35085
|
}),
|
|
@@ -35093,7 +35108,7 @@ const useGetAccountSettings = () => {
|
|
|
35093
35108
|
});
|
|
35094
35109
|
};
|
|
35095
35110
|
|
|
35096
|
-
var __async$
|
|
35111
|
+
var __async$_ = (__this, __arguments, generator) => {
|
|
35097
35112
|
return new Promise((resolve, reject) => {
|
|
35098
35113
|
var fulfilled = (value) => {
|
|
35099
35114
|
try {
|
|
@@ -35116,7 +35131,7 @@ var __async$Z = (__this, __arguments, generator) => {
|
|
|
35116
35131
|
const useUpdateAccountImage = () => {
|
|
35117
35132
|
const { client } = useShipEngine();
|
|
35118
35133
|
return useMutation({
|
|
35119
|
-
mutationFn: (data) => __async$
|
|
35134
|
+
mutationFn: (data) => __async$_(void 0, null, function* () {
|
|
35120
35135
|
const result = yield client.accountSettings.updateImage(data);
|
|
35121
35136
|
return result.data;
|
|
35122
35137
|
}),
|
|
@@ -35125,7 +35140,7 @@ const useUpdateAccountImage = () => {
|
|
|
35125
35140
|
});
|
|
35126
35141
|
};
|
|
35127
35142
|
|
|
35128
|
-
var __async$
|
|
35143
|
+
var __async$Z = (__this, __arguments, generator) => {
|
|
35129
35144
|
return new Promise((resolve, reject) => {
|
|
35130
35145
|
var fulfilled = (value) => {
|
|
35131
35146
|
try {
|
|
@@ -35148,7 +35163,7 @@ var __async$Y = (__this, __arguments, generator) => {
|
|
|
35148
35163
|
const useUpdateAccountSettings = () => {
|
|
35149
35164
|
const { client } = useShipEngine();
|
|
35150
35165
|
return useMutation({
|
|
35151
|
-
mutationFn: (settings) => __async$
|
|
35166
|
+
mutationFn: (settings) => __async$Z(void 0, null, function* () {
|
|
35152
35167
|
const result = yield client.accountSettings.update(settings);
|
|
35153
35168
|
return result.data;
|
|
35154
35169
|
}),
|
|
@@ -35205,7 +35220,7 @@ var __spreadValues$K = (a, b) => {
|
|
|
35205
35220
|
return a;
|
|
35206
35221
|
};
|
|
35207
35222
|
var __spreadProps$H = (a, b) => __defProps$H(a, __getOwnPropDescs$H(b));
|
|
35208
|
-
var __async$
|
|
35223
|
+
var __async$Y = (__this, __arguments, generator) => {
|
|
35209
35224
|
return new Promise((resolve, reject) => {
|
|
35210
35225
|
var fulfilled = (value) => {
|
|
35211
35226
|
try {
|
|
@@ -35228,7 +35243,7 @@ var __async$X = (__this, __arguments, generator) => {
|
|
|
35228
35243
|
const useEnableAccountAddon = (params) => {
|
|
35229
35244
|
const { client } = useShipEngine();
|
|
35230
35245
|
return useMutation(__spreadProps$H(__spreadValues$K({}, params), {
|
|
35231
|
-
mutationFn: (addonType) => __async$
|
|
35246
|
+
mutationFn: (addonType) => __async$Y(void 0, null, function* () {
|
|
35232
35247
|
const result = yield client.accountAddons.enable(addonType);
|
|
35233
35248
|
return result.data;
|
|
35234
35249
|
}),
|
|
@@ -35256,7 +35271,7 @@ var __spreadValues$J = (a, b) => {
|
|
|
35256
35271
|
return a;
|
|
35257
35272
|
};
|
|
35258
35273
|
var __spreadProps$G = (a, b) => __defProps$G(a, __getOwnPropDescs$G(b));
|
|
35259
|
-
var __async$
|
|
35274
|
+
var __async$X = (__this, __arguments, generator) => {
|
|
35260
35275
|
return new Promise((resolve, reject) => {
|
|
35261
35276
|
var fulfilled = (value) => {
|
|
35262
35277
|
try {
|
|
@@ -35279,7 +35294,7 @@ var __async$W = (__this, __arguments, generator) => {
|
|
|
35279
35294
|
const useDisableAccountAddon = (params) => {
|
|
35280
35295
|
const { client } = useShipEngine();
|
|
35281
35296
|
return useMutation(__spreadProps$G(__spreadValues$J({}, params), {
|
|
35282
|
-
mutationFn: (addonType) => __async$
|
|
35297
|
+
mutationFn: (addonType) => __async$X(void 0, null, function* () {
|
|
35283
35298
|
const result = yield client.accountAddons.disable(addonType);
|
|
35284
35299
|
return result.data;
|
|
35285
35300
|
}),
|
|
@@ -35317,6 +35332,38 @@ const useListAccountFeatures = (params) => {
|
|
|
35317
35332
|
}));
|
|
35318
35333
|
};
|
|
35319
35334
|
|
|
35335
|
+
var __async$W = (__this, __arguments, generator) => {
|
|
35336
|
+
return new Promise((resolve, reject) => {
|
|
35337
|
+
var fulfilled = (value) => {
|
|
35338
|
+
try {
|
|
35339
|
+
step(generator.next(value));
|
|
35340
|
+
} catch (e) {
|
|
35341
|
+
reject(e);
|
|
35342
|
+
}
|
|
35343
|
+
};
|
|
35344
|
+
var rejected = (value) => {
|
|
35345
|
+
try {
|
|
35346
|
+
step(generator.throw(value));
|
|
35347
|
+
} catch (e) {
|
|
35348
|
+
reject(e);
|
|
35349
|
+
}
|
|
35350
|
+
};
|
|
35351
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
35352
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
35353
|
+
});
|
|
35354
|
+
};
|
|
35355
|
+
const useRequestAccountFeature = () => {
|
|
35356
|
+
const { client } = useShipEngine();
|
|
35357
|
+
return useMutation({
|
|
35358
|
+
mutationFn: (request) => __async$W(void 0, null, function* () {
|
|
35359
|
+
const result = yield client.accountFeatures.request(request);
|
|
35360
|
+
return result.data;
|
|
35361
|
+
}),
|
|
35362
|
+
mutationKey: ["useRequestAccountFeature"],
|
|
35363
|
+
onError
|
|
35364
|
+
});
|
|
35365
|
+
};
|
|
35366
|
+
|
|
35320
35367
|
var __async$V = (__this, __arguments, generator) => {
|
|
35321
35368
|
return new Promise((resolve, reject) => {
|
|
35322
35369
|
var fulfilled = (value) => {
|
|
@@ -40245,4 +40292,4 @@ const alchemy = {
|
|
|
40245
40292
|
createElement
|
|
40246
40293
|
};
|
|
40247
40294
|
|
|
40248
|
-
export { AccountAddonsAPI, AccountBillingAPI, AccountBillingPlanAPI, AccountBillingPlanChangeType, AccountFeaturesAPI, AccountSettingsAPI, AddressesAPI, AlchemyContext, AlchemyProvider, AlchemyTestProvider, AuctanePayAPI, CarriersAPI, CodedError, ConfirmationType, ConnectionsAPI, CreditCardVendor, Currency, CustomPackagesAPI, CustomsContentsType, CustomsNonDeliveryType, Element, ErrorBoundary, FeatureId, FundingSourcesAPI, InsuranceAPI, InsuranceProviderType, InvoiceAddressAPI, LabelsAPI, MetadataCapability, MetadataRequirement, MetadataSatisfyingFormTypes, MovementIndicator, OrderSourcesAPI, RateCardStatus, RateCardsAPI, RatesAPI, types as SE, SalesOrderShipmentsAPI, SalesOrdersAPI, SellersAPI, ServicePointsAPI, ShipEngine, ShipEngineAPI, ShipEngineContext, ShipmentsAPI, ShippingRulesAPI, ThemesAPI, UsersApi, WarehousesAPI, WebhooksAPI, alchemy, camelizeKeys, decamelizeKeys, alchemy as default, delay, getEmotionCache, getEndUserIpAddress, isCodedError, isCodedErrors, isDataCodedErrors, isInvalidTokenError, logger, onError, parseError, retryUntil, useAddFunds, useAddInsuranceFunds, useAddSandboxCarriers, useAlchemy, useCalculateRates, useCancelShipment, useCarrierConnectionsServicesList, useConnectCarrier, useConnectCarrierAccount, useCreateAccountImage, useCreateAuctanePaySession, useCreateFundingSource, useCreateInvoiceAddress, useCreateLabel, useCreateLabelByRateId, useCreateLabelByShipmentId, useCreateRateCard, useCreateSalesOrderShipment, useCreateSandboxSeller, useCreateSellerApiKey, useCreateShipment, useCreateShippingRule, useCreateWarehouse, useCreateWebhook, useDeactivateOrderSource, useDeleteAccountImage, useDeleteCarrier, useDeletePaymentMethod, useDeleteRateCard, useDeleteSellerApiKey, useDeleteShippingRule, useDeleteWarehouse, useDeleteWebhook, useDisableAccountAddon, useDownloadRateCard, useEditShippingRule, useEnableAccountAddon, useExportLabels, useExportShipments, useFundingSourcesAddFunds, useGetAccountBilling, useGetAccountBillingPlan, useGetAccountImages, useGetAccountSettings, useGetAuctanePayConfig, useGetAutoFundingConfiguration, useGetCarrierById, useGetCarrierConnectionForm, useGetConnectionsCarrierSettings, useGetCountriesByCarrier, useGetCurrenciesByCarrier, useGetFundingSourceById, useGetFundingSourceMetadata, useGetFundingSourceTransactions, useGetHereToken, useGetInsuranceAccount, useGetInsuranceFundingSourceAcceptedTerms, useGetInvoiceAddress, useGetLabel, useGetPackageRatingGroupByCarrier, useGetPaymentAccount, useGetPaymentMethods, useGetRateCardById, useGetSalesOrder, useGetSalesOrderByExternalOrderId, useGetSalesOrderShipment, useGetServicePoint, useGetServicesByCarrier, useGetShipment, useGetShipmentByExternalId, useGetShipmentRates, useGetShippingRuleById, useGetShippingRuleConditionsOptions, useGetThemeById, useGetZonesByCarrier, useI18n, useIdentityVerification, useListAccountAddons, useListAccountFeatures, useListCarrierConnections, useListCarriers, useListCustomPackageTypes, useListFundingSources, useListLabels, useListLabelsInfinite, useListOrderSources, useListOrderSourcesConnections, useListRateCards, useListSalesOrderShipments, useListSalesOrderShipmentsByExternalOrderId, useListSalesOrders, useListSandboxSellerIds, useListSellerApiKeys, useListServicePoints, useListShipments, useListShippingRules, useListUsers, useListWarehouses, useListWebhooks, useLoadIcons, useNotifySalesOrderShipped, useParseAddress, usePreviewTransaction, usePublishRateCard, useRatesEstimate, useRefreshOrderSource, useRefreshOrderSourceAsync, useRegisterCarrier, useRequestStampsAccountUrls, useShipEngine, useUpdateAccountBillingPlan, useUpdateAccountImage, useUpdateAccountSettings, useUpdateAutoFunding, useUpdateConnectionsCarrierSettings, useUpdateFundingSource, useUpdateInvoiceAddress, useUpdateOrderSource, useUpdatePaymentMethod, useUpdateRateCard, useUpdateSalesOrderShipment, useUpdateWarehouse, useUpdateWebhook, useUploadRateCard, useUpsertAccountBilling, useValidateAddresses, useVoidLabel };
|
|
40295
|
+
export { AccountAddonsAPI, AccountBillingAPI, AccountBillingPlanAPI, AccountBillingPlanChangeType, AccountFeaturesAPI, AccountSettingsAPI, AddressesAPI, AlchemyContext, AlchemyProvider, AlchemyTestProvider, AuctanePayAPI, CarriersAPI, CodedError, ConfirmationType, ConnectionsAPI, CreditCardVendor, Currency, CustomPackagesAPI, CustomsContentsType, CustomsNonDeliveryType, Element, ErrorBoundary, FeatureId, FundingSourcesAPI, InsuranceAPI, InsuranceProviderType, InvoiceAddressAPI, LabelsAPI, MetadataCapability, MetadataRequirement, MetadataSatisfyingFormTypes, MovementIndicator, OrderSourcesAPI, RateCardStatus, RateCardsAPI, RatesAPI, types as SE, SalesOrderShipmentsAPI, SalesOrdersAPI, SellersAPI, ServicePointsAPI, ShipEngine, ShipEngineAPI, ShipEngineContext, ShipmentsAPI, ShippingRulesAPI, ThemesAPI, UsersApi, WarehousesAPI, WebhooksAPI, alchemy, camelizeKeys, decamelizeKeys, alchemy as default, delay, getEmotionCache, getEndUserIpAddress, isCodedError, isCodedErrors, isDataCodedErrors, isInvalidTokenError, logger, onError, parseError, retryUntil, useAddFunds, useAddInsuranceFunds, useAddSandboxCarriers, useAlchemy, useCalculateRates, useCancelShipment, useCarrierConnectionsServicesList, useConnectCarrier, useConnectCarrierAccount, useCreateAccountImage, useCreateAuctanePaySession, useCreateFundingSource, useCreateInvoiceAddress, useCreateLabel, useCreateLabelByRateId, useCreateLabelByShipmentId, useCreateRateCard, useCreateSalesOrderShipment, useCreateSandboxSeller, useCreateSellerApiKey, useCreateShipment, useCreateShippingRule, useCreateWarehouse, useCreateWebhook, useDeactivateOrderSource, useDeleteAccountImage, useDeleteCarrier, useDeletePaymentMethod, useDeleteRateCard, useDeleteSellerApiKey, useDeleteShippingRule, useDeleteWarehouse, useDeleteWebhook, useDisableAccountAddon, useDownloadRateCard, useEditShippingRule, useEnableAccountAddon, useExportLabels, useExportShipments, useFundingSourcesAddFunds, useGetAccountBilling, useGetAccountBillingPlan, useGetAccountImages, useGetAccountSettings, useGetAuctanePayConfig, useGetAutoFundingConfiguration, useGetCarrierById, useGetCarrierConnectionForm, useGetConnectionsCarrierSettings, useGetCountriesByCarrier, useGetCurrenciesByCarrier, useGetFundingSourceById, useGetFundingSourceMetadata, useGetFundingSourceTransactions, useGetHereToken, useGetInsuranceAccount, useGetInsuranceFundingSourceAcceptedTerms, useGetInvoiceAddress, useGetLabel, useGetPackageRatingGroupByCarrier, useGetPaymentAccount, useGetPaymentMethods, useGetRateCardById, useGetSalesOrder, useGetSalesOrderByExternalOrderId, useGetSalesOrderShipment, useGetServicePoint, useGetServicesByCarrier, useGetShipment, useGetShipmentByExternalId, useGetShipmentRates, useGetShippingRuleById, useGetShippingRuleConditionsOptions, useGetThemeById, useGetZonesByCarrier, useI18n, useIdentityVerification, useListAccountAddons, useListAccountFeatures, useListCarrierConnections, useListCarriers, useListCustomPackageTypes, useListFundingSources, useListLabels, useListLabelsInfinite, useListOrderSources, useListOrderSourcesConnections, useListRateCards, useListSalesOrderShipments, useListSalesOrderShipmentsByExternalOrderId, useListSalesOrders, useListSandboxSellerIds, useListSellerApiKeys, useListServicePoints, useListShipments, useListShippingRules, useListUsers, useListWarehouses, useListWebhooks, useLoadIcons, useNotifySalesOrderShipped, useParseAddress, usePreviewTransaction, usePublishRateCard, useRatesEstimate, useRefreshOrderSource, useRefreshOrderSourceAsync, useRegisterCarrier, useRequestAccountFeature, useRequestStampsAccountUrls, useShipEngine, useUpdateAccountBillingPlan, useUpdateAccountImage, useUpdateAccountSettings, useUpdateAutoFunding, useUpdateConnectionsCarrierSettings, useUpdateFundingSource, useUpdateInvoiceAddress, useUpdateOrderSource, useUpdatePaymentMethod, useUpdateRateCard, useUpdateSalesOrderShipment, useUpdateWarehouse, useUpdateWebhook, useUploadRateCard, useUpsertAccountBilling, useValidateAddresses, useVoidLabel };
|