@shipengine/alchemy 6.0.77 → 6.0.78
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 +224 -166
- package/index.mjs +224 -167
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -10827,17 +10827,17 @@ var FeatureId = /* @__PURE__ */ ((FeatureId2) => {
|
|
|
10827
10827
|
return FeatureId2;
|
|
10828
10828
|
})(FeatureId || {});
|
|
10829
10829
|
|
|
10830
|
-
var __getOwnPropSymbols$
|
|
10831
|
-
var __hasOwnProp$
|
|
10832
|
-
var __propIsEnum$
|
|
10830
|
+
var __getOwnPropSymbols$12 = Object.getOwnPropertySymbols;
|
|
10831
|
+
var __hasOwnProp$12 = Object.prototype.hasOwnProperty;
|
|
10832
|
+
var __propIsEnum$12 = Object.prototype.propertyIsEnumerable;
|
|
10833
10833
|
var __objRest$x = (source, exclude) => {
|
|
10834
10834
|
var target = {};
|
|
10835
10835
|
for (var prop in source)
|
|
10836
|
-
if (__hasOwnProp$
|
|
10836
|
+
if (__hasOwnProp$12.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
10837
10837
|
target[prop] = source[prop];
|
|
10838
|
-
if (source != null && __getOwnPropSymbols$
|
|
10839
|
-
for (var prop of __getOwnPropSymbols$
|
|
10840
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
10838
|
+
if (source != null && __getOwnPropSymbols$12)
|
|
10839
|
+
for (var prop of __getOwnPropSymbols$12(source)) {
|
|
10840
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$12.call(source, prop))
|
|
10841
10841
|
target[prop] = source[prop];
|
|
10842
10842
|
}
|
|
10843
10843
|
return target;
|
|
@@ -10973,17 +10973,17 @@ const types = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
10973
10973
|
RateCardStatus
|
|
10974
10974
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
10975
10975
|
|
|
10976
|
-
var __getOwnPropSymbols$
|
|
10977
|
-
var __hasOwnProp$
|
|
10978
|
-
var __propIsEnum$
|
|
10976
|
+
var __getOwnPropSymbols$11 = Object.getOwnPropertySymbols;
|
|
10977
|
+
var __hasOwnProp$11 = Object.prototype.hasOwnProperty;
|
|
10978
|
+
var __propIsEnum$11 = Object.prototype.propertyIsEnumerable;
|
|
10979
10979
|
var __objRest$w = (source, exclude) => {
|
|
10980
10980
|
var target = {};
|
|
10981
10981
|
for (var prop in source)
|
|
10982
|
-
if (__hasOwnProp$
|
|
10982
|
+
if (__hasOwnProp$11.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
10983
10983
|
target[prop] = source[prop];
|
|
10984
|
-
if (source != null && __getOwnPropSymbols$
|
|
10985
|
-
for (var prop of __getOwnPropSymbols$
|
|
10986
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
10984
|
+
if (source != null && __getOwnPropSymbols$11)
|
|
10985
|
+
for (var prop of __getOwnPropSymbols$11(source)) {
|
|
10986
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$11.call(source, prop))
|
|
10987
10987
|
target[prop] = source[prop];
|
|
10988
10988
|
}
|
|
10989
10989
|
return target;
|
|
@@ -11050,6 +11050,12 @@ class AccountAddonsAPI {
|
|
|
11050
11050
|
this.enable = (addonCode) => {
|
|
11051
11051
|
return this.client.post(`/v1/account/addons/${addonCode}/enable`);
|
|
11052
11052
|
};
|
|
11053
|
+
/**
|
|
11054
|
+
* The `disable` method allows to disable an AddOn for the current user
|
|
11055
|
+
*/
|
|
11056
|
+
this.disable = (addonCode) => {
|
|
11057
|
+
return this.client.post(`/v1/account/addons/${addonCode}/disable`);
|
|
11058
|
+
};
|
|
11053
11059
|
this.client = client;
|
|
11054
11060
|
}
|
|
11055
11061
|
}
|
|
@@ -13871,7 +13877,7 @@ var ipaddr = {
|
|
|
13871
13877
|
}).call(commonjsGlobal);
|
|
13872
13878
|
} (ipaddr));
|
|
13873
13879
|
|
|
13874
|
-
var __async$
|
|
13880
|
+
var __async$17 = (__this, __arguments, generator) => {
|
|
13875
13881
|
return new Promise((resolve, reject) => {
|
|
13876
13882
|
var fulfilled = (value) => {
|
|
13877
13883
|
try {
|
|
@@ -13891,7 +13897,7 @@ var __async$16 = (__this, __arguments, generator) => {
|
|
|
13891
13897
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
13892
13898
|
});
|
|
13893
13899
|
};
|
|
13894
|
-
const getEndUserIpAddress = () => __async$
|
|
13900
|
+
const getEndUserIpAddress = () => __async$17(void 0, null, function* () {
|
|
13895
13901
|
try {
|
|
13896
13902
|
const response = yield axios.get("https://api.ipify.org/?format=json");
|
|
13897
13903
|
if (response.data.ip && ipaddrExports.isValid(response.data.ip)) {
|
|
@@ -13952,38 +13958,38 @@ const decamelizeKeys = (obj, separator = "_") => {
|
|
|
13952
13958
|
return obj;
|
|
13953
13959
|
};
|
|
13954
13960
|
|
|
13955
|
-
var __defProp$
|
|
13956
|
-
var __defProps$
|
|
13957
|
-
var __getOwnPropDescs$
|
|
13958
|
-
var __getOwnPropSymbols
|
|
13959
|
-
var __hasOwnProp
|
|
13960
|
-
var __propIsEnum
|
|
13961
|
-
var __defNormalProp$
|
|
13962
|
-
var __spreadValues$
|
|
13961
|
+
var __defProp$R = Object.defineProperty;
|
|
13962
|
+
var __defProps$L = Object.defineProperties;
|
|
13963
|
+
var __getOwnPropDescs$L = Object.getOwnPropertyDescriptors;
|
|
13964
|
+
var __getOwnPropSymbols$10 = Object.getOwnPropertySymbols;
|
|
13965
|
+
var __hasOwnProp$10 = Object.prototype.hasOwnProperty;
|
|
13966
|
+
var __propIsEnum$10 = Object.prototype.propertyIsEnumerable;
|
|
13967
|
+
var __defNormalProp$R = (obj, key, value) => key in obj ? __defProp$R(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13968
|
+
var __spreadValues$R = (a, b) => {
|
|
13963
13969
|
for (var prop in b || (b = {}))
|
|
13964
|
-
if (__hasOwnProp
|
|
13965
|
-
__defNormalProp$
|
|
13966
|
-
if (__getOwnPropSymbols
|
|
13967
|
-
for (var prop of __getOwnPropSymbols
|
|
13968
|
-
if (__propIsEnum
|
|
13969
|
-
__defNormalProp$
|
|
13970
|
+
if (__hasOwnProp$10.call(b, prop))
|
|
13971
|
+
__defNormalProp$R(a, prop, b[prop]);
|
|
13972
|
+
if (__getOwnPropSymbols$10)
|
|
13973
|
+
for (var prop of __getOwnPropSymbols$10(b)) {
|
|
13974
|
+
if (__propIsEnum$10.call(b, prop))
|
|
13975
|
+
__defNormalProp$R(a, prop, b[prop]);
|
|
13970
13976
|
}
|
|
13971
13977
|
return a;
|
|
13972
13978
|
};
|
|
13973
|
-
var __spreadProps$
|
|
13979
|
+
var __spreadProps$L = (a, b) => __defProps$L(a, __getOwnPropDescs$L(b));
|
|
13974
13980
|
var __objRest$v = (source, exclude) => {
|
|
13975
13981
|
var target = {};
|
|
13976
13982
|
for (var prop in source)
|
|
13977
|
-
if (__hasOwnProp
|
|
13983
|
+
if (__hasOwnProp$10.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
13978
13984
|
target[prop] = source[prop];
|
|
13979
|
-
if (source != null && __getOwnPropSymbols
|
|
13980
|
-
for (var prop of __getOwnPropSymbols
|
|
13981
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum
|
|
13985
|
+
if (source != null && __getOwnPropSymbols$10)
|
|
13986
|
+
for (var prop of __getOwnPropSymbols$10(source)) {
|
|
13987
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$10.call(source, prop))
|
|
13982
13988
|
target[prop] = source[prop];
|
|
13983
13989
|
}
|
|
13984
13990
|
return target;
|
|
13985
13991
|
};
|
|
13986
|
-
var __async$
|
|
13992
|
+
var __async$16 = (__this, __arguments, generator) => {
|
|
13987
13993
|
return new Promise((resolve, reject) => {
|
|
13988
13994
|
var fulfilled = (value) => {
|
|
13989
13995
|
try {
|
|
@@ -14023,12 +14029,12 @@ class CarriersAPI {
|
|
|
14023
14029
|
/**
|
|
14024
14030
|
* The `connect` method connects a carrier account to a user's ShipEngine account.
|
|
14025
14031
|
*/
|
|
14026
|
-
this.connect = (_a) => __async$
|
|
14032
|
+
this.connect = (_a) => __async$16(this, null, function* () {
|
|
14027
14033
|
var _b = _a, { carrierCode } = _b, connection = __objRest$v(_b, ["carrierCode"]);
|
|
14028
14034
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
14029
14035
|
if (!endUserIpAddress)
|
|
14030
14036
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
14031
|
-
return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$
|
|
14037
|
+
return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$L(__spreadValues$R({}, connection), {
|
|
14032
14038
|
endUserIpAddress
|
|
14033
14039
|
}));
|
|
14034
14040
|
});
|
|
@@ -14112,22 +14118,22 @@ class CarriersAPI {
|
|
|
14112
14118
|
}
|
|
14113
14119
|
}
|
|
14114
14120
|
|
|
14115
|
-
var __getOwnPropSymbols
|
|
14116
|
-
var __hasOwnProp
|
|
14117
|
-
var __propIsEnum
|
|
14121
|
+
var __getOwnPropSymbols$$ = Object.getOwnPropertySymbols;
|
|
14122
|
+
var __hasOwnProp$$ = Object.prototype.hasOwnProperty;
|
|
14123
|
+
var __propIsEnum$$ = Object.prototype.propertyIsEnumerable;
|
|
14118
14124
|
var __objRest$u = (source, exclude) => {
|
|
14119
14125
|
var target = {};
|
|
14120
14126
|
for (var prop in source)
|
|
14121
|
-
if (__hasOwnProp
|
|
14127
|
+
if (__hasOwnProp$$.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
14122
14128
|
target[prop] = source[prop];
|
|
14123
|
-
if (source != null && __getOwnPropSymbols
|
|
14124
|
-
for (var prop of __getOwnPropSymbols
|
|
14125
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum
|
|
14129
|
+
if (source != null && __getOwnPropSymbols$$)
|
|
14130
|
+
for (var prop of __getOwnPropSymbols$$(source)) {
|
|
14131
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$$.call(source, prop))
|
|
14126
14132
|
target[prop] = source[prop];
|
|
14127
14133
|
}
|
|
14128
14134
|
return target;
|
|
14129
14135
|
};
|
|
14130
|
-
var __async$
|
|
14136
|
+
var __async$15 = (__this, __arguments, generator) => {
|
|
14131
14137
|
return new Promise((resolve, reject) => {
|
|
14132
14138
|
var fulfilled = (value) => {
|
|
14133
14139
|
try {
|
|
@@ -14169,7 +14175,7 @@ class ConnectionsAPI {
|
|
|
14169
14175
|
/**
|
|
14170
14176
|
* The `connectCarrier` method connects a carrier to account.
|
|
14171
14177
|
*/
|
|
14172
|
-
this.connectCarrier = (carrierName, formData) => __async$
|
|
14178
|
+
this.connectCarrier = (carrierName, formData) => __async$15(this, null, function* () {
|
|
14173
14179
|
return yield this.client.post(
|
|
14174
14180
|
`/v1/connections/carriers/${carrierName}`,
|
|
14175
14181
|
formData,
|
|
@@ -16337,23 +16343,23 @@ class CustomPackagesAPI {
|
|
|
16337
16343
|
}
|
|
16338
16344
|
}
|
|
16339
16345
|
|
|
16340
|
-
var __defProp$
|
|
16341
|
-
var __getOwnPropSymbols$
|
|
16342
|
-
var __hasOwnProp$
|
|
16343
|
-
var __propIsEnum$
|
|
16344
|
-
var __defNormalProp$
|
|
16345
|
-
var __spreadValues$
|
|
16346
|
+
var __defProp$Q = Object.defineProperty;
|
|
16347
|
+
var __getOwnPropSymbols$_ = Object.getOwnPropertySymbols;
|
|
16348
|
+
var __hasOwnProp$_ = Object.prototype.hasOwnProperty;
|
|
16349
|
+
var __propIsEnum$_ = Object.prototype.propertyIsEnumerable;
|
|
16350
|
+
var __defNormalProp$Q = (obj, key, value) => key in obj ? __defProp$Q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16351
|
+
var __spreadValues$Q = (a, b) => {
|
|
16346
16352
|
for (var prop in b || (b = {}))
|
|
16347
|
-
if (__hasOwnProp$
|
|
16348
|
-
__defNormalProp$
|
|
16349
|
-
if (__getOwnPropSymbols$
|
|
16350
|
-
for (var prop of __getOwnPropSymbols$
|
|
16351
|
-
if (__propIsEnum$
|
|
16352
|
-
__defNormalProp$
|
|
16353
|
+
if (__hasOwnProp$_.call(b, prop))
|
|
16354
|
+
__defNormalProp$Q(a, prop, b[prop]);
|
|
16355
|
+
if (__getOwnPropSymbols$_)
|
|
16356
|
+
for (var prop of __getOwnPropSymbols$_(b)) {
|
|
16357
|
+
if (__propIsEnum$_.call(b, prop))
|
|
16358
|
+
__defNormalProp$Q(a, prop, b[prop]);
|
|
16353
16359
|
}
|
|
16354
16360
|
return a;
|
|
16355
16361
|
};
|
|
16356
|
-
var __async$
|
|
16362
|
+
var __async$14 = (__this, __arguments, generator) => {
|
|
16357
16363
|
return new Promise((resolve, reject) => {
|
|
16358
16364
|
var fulfilled = (value) => {
|
|
16359
16365
|
try {
|
|
@@ -16392,12 +16398,12 @@ class FundingSourcesAPI {
|
|
|
16392
16398
|
* The `create` method creates a new funding source for a given user. This requires
|
|
16393
16399
|
* payment information to be collected from the user.
|
|
16394
16400
|
*/
|
|
16395
|
-
this.create = (createFundingSource) => __async$
|
|
16401
|
+
this.create = (createFundingSource) => __async$14(this, null, function* () {
|
|
16396
16402
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16397
16403
|
if (!endUserIpAddress) {
|
|
16398
16404
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
16399
16405
|
}
|
|
16400
|
-
return yield this.client.post("/v1/funding_sources", __spreadValues$
|
|
16406
|
+
return yield this.client.post("/v1/funding_sources", __spreadValues$Q({
|
|
16401
16407
|
endUserIpAddress
|
|
16402
16408
|
}, createFundingSource));
|
|
16403
16409
|
});
|
|
@@ -16406,7 +16412,7 @@ class FundingSourcesAPI {
|
|
|
16406
16412
|
* user to update the billing address or payment information associated with the
|
|
16407
16413
|
* funding source.
|
|
16408
16414
|
*/
|
|
16409
|
-
this.update = (billingInfo, creditCardInfo, auctanePayInfo, fundingSourceId) => __async$
|
|
16415
|
+
this.update = (billingInfo, creditCardInfo, auctanePayInfo, fundingSourceId) => __async$14(this, null, function* () {
|
|
16410
16416
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16411
16417
|
if (!endUserIpAddress) {
|
|
16412
16418
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
@@ -16416,7 +16422,7 @@ class FundingSourcesAPI {
|
|
|
16416
16422
|
{
|
|
16417
16423
|
billingInfo,
|
|
16418
16424
|
endUserIpAddress,
|
|
16419
|
-
paymentMethod: __spreadValues$
|
|
16425
|
+
paymentMethod: __spreadValues$Q({
|
|
16420
16426
|
creditCardInfo
|
|
16421
16427
|
}, auctanePayInfo)
|
|
16422
16428
|
}
|
|
@@ -16426,19 +16432,19 @@ class FundingSourcesAPI {
|
|
|
16426
16432
|
* The `registerCarrier` method registers a carrier account and associates
|
|
16427
16433
|
* it with a given funding source.
|
|
16428
16434
|
*/
|
|
16429
|
-
this.registerCarrier = (carrier) => __async$
|
|
16435
|
+
this.registerCarrier = (carrier) => __async$14(this, null, function* () {
|
|
16430
16436
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16431
16437
|
if (!endUserIpAddress) {
|
|
16432
16438
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
16433
16439
|
}
|
|
16434
|
-
return yield this.client.post("/v1/registration/funding_source", __spreadValues$
|
|
16440
|
+
return yield this.client.post("/v1/registration/funding_source", __spreadValues$Q({
|
|
16435
16441
|
endUserIpAddress
|
|
16436
16442
|
}, carrier));
|
|
16437
16443
|
});
|
|
16438
16444
|
/**
|
|
16439
16445
|
* The `addFunds` method allows you to add funds to a funding source.
|
|
16440
16446
|
*/
|
|
16441
|
-
this.addFunds = (amount, fundingSourceId) => __async$
|
|
16447
|
+
this.addFunds = (amount, fundingSourceId) => __async$14(this, null, function* () {
|
|
16442
16448
|
return yield this.client.put(
|
|
16443
16449
|
`/v1/funding_sources/${fundingSourceId}/add_funds`,
|
|
16444
16450
|
amount
|
|
@@ -16448,7 +16454,7 @@ class FundingSourcesAPI {
|
|
|
16448
16454
|
* The `metadata` method returns seller-specific requirements for creating funding sources
|
|
16449
16455
|
* and attaching carriers
|
|
16450
16456
|
*/
|
|
16451
|
-
this.metadata = () => __async$
|
|
16457
|
+
this.metadata = () => __async$14(this, null, function* () {
|
|
16452
16458
|
return yield this.client.get("/v1/funding_sources/metadata");
|
|
16453
16459
|
});
|
|
16454
16460
|
/**
|
|
@@ -16500,7 +16506,7 @@ class InsuranceAPI {
|
|
|
16500
16506
|
}
|
|
16501
16507
|
}
|
|
16502
16508
|
|
|
16503
|
-
var __async$
|
|
16509
|
+
var __async$13 = (__this, __arguments, generator) => {
|
|
16504
16510
|
return new Promise((resolve, reject) => {
|
|
16505
16511
|
var fulfilled = (value) => {
|
|
16506
16512
|
try {
|
|
@@ -16532,13 +16538,13 @@ class InvoiceAddressAPI {
|
|
|
16532
16538
|
/**
|
|
16533
16539
|
* The `create` method creates a new invoice address for a given user.
|
|
16534
16540
|
*/
|
|
16535
|
-
this.create = (invoiceAddress) => __async$
|
|
16541
|
+
this.create = (invoiceAddress) => __async$13(this, null, function* () {
|
|
16536
16542
|
return yield this.client.post("/v1/invoice_address", invoiceAddress);
|
|
16537
16543
|
});
|
|
16538
16544
|
/**
|
|
16539
16545
|
* The `update` method updates a invoice address for a given user.
|
|
16540
16546
|
*/
|
|
16541
|
-
this.update = (invoiceAddress) => __async$
|
|
16547
|
+
this.update = (invoiceAddress) => __async$13(this, null, function* () {
|
|
16542
16548
|
return yield this.client.put("/v1/invoice_address", invoiceAddress);
|
|
16543
16549
|
});
|
|
16544
16550
|
this.client = client;
|
|
@@ -16600,17 +16606,17 @@ class LabelsAPI {
|
|
|
16600
16606
|
}
|
|
16601
16607
|
}
|
|
16602
16608
|
|
|
16603
|
-
var __getOwnPropSymbols$
|
|
16604
|
-
var __hasOwnProp$
|
|
16605
|
-
var __propIsEnum$
|
|
16609
|
+
var __getOwnPropSymbols$Z = Object.getOwnPropertySymbols;
|
|
16610
|
+
var __hasOwnProp$Z = Object.prototype.hasOwnProperty;
|
|
16611
|
+
var __propIsEnum$Z = Object.prototype.propertyIsEnumerable;
|
|
16606
16612
|
var __objRest$t = (source, exclude) => {
|
|
16607
16613
|
var target = {};
|
|
16608
16614
|
for (var prop in source)
|
|
16609
|
-
if (__hasOwnProp$
|
|
16615
|
+
if (__hasOwnProp$Z.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
16610
16616
|
target[prop] = source[prop];
|
|
16611
|
-
if (source != null && __getOwnPropSymbols$
|
|
16612
|
-
for (var prop of __getOwnPropSymbols$
|
|
16613
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
16617
|
+
if (source != null && __getOwnPropSymbols$Z)
|
|
16618
|
+
for (var prop of __getOwnPropSymbols$Z(source)) {
|
|
16619
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$Z.call(source, prop))
|
|
16614
16620
|
target[prop] = source[prop];
|
|
16615
16621
|
}
|
|
16616
16622
|
return target;
|
|
@@ -16731,19 +16737,19 @@ class RateCardsAPI {
|
|
|
16731
16737
|
}
|
|
16732
16738
|
}
|
|
16733
16739
|
|
|
16734
|
-
var __defProp$
|
|
16735
|
-
var __getOwnPropSymbols$
|
|
16736
|
-
var __hasOwnProp$
|
|
16737
|
-
var __propIsEnum$
|
|
16738
|
-
var __defNormalProp$
|
|
16739
|
-
var __spreadValues$
|
|
16740
|
+
var __defProp$P = Object.defineProperty;
|
|
16741
|
+
var __getOwnPropSymbols$Y = Object.getOwnPropertySymbols;
|
|
16742
|
+
var __hasOwnProp$Y = Object.prototype.hasOwnProperty;
|
|
16743
|
+
var __propIsEnum$Y = Object.prototype.propertyIsEnumerable;
|
|
16744
|
+
var __defNormalProp$P = (obj, key, value) => key in obj ? __defProp$P(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16745
|
+
var __spreadValues$P = (a, b) => {
|
|
16740
16746
|
for (var prop in b || (b = {}))
|
|
16741
|
-
if (__hasOwnProp$
|
|
16742
|
-
__defNormalProp$
|
|
16743
|
-
if (__getOwnPropSymbols$
|
|
16744
|
-
for (var prop of __getOwnPropSymbols$
|
|
16745
|
-
if (__propIsEnum$
|
|
16746
|
-
__defNormalProp$
|
|
16747
|
+
if (__hasOwnProp$Y.call(b, prop))
|
|
16748
|
+
__defNormalProp$P(a, prop, b[prop]);
|
|
16749
|
+
if (__getOwnPropSymbols$Y)
|
|
16750
|
+
for (var prop of __getOwnPropSymbols$Y(b)) {
|
|
16751
|
+
if (__propIsEnum$Y.call(b, prop))
|
|
16752
|
+
__defNormalProp$P(a, prop, b[prop]);
|
|
16747
16753
|
}
|
|
16748
16754
|
return a;
|
|
16749
16755
|
};
|
|
@@ -16765,7 +16771,7 @@ class RatesAPI {
|
|
|
16765
16771
|
* method.
|
|
16766
16772
|
*/
|
|
16767
16773
|
this.estimate = (params) => {
|
|
16768
|
-
return this.client.post("/v1/rates/estimate", __spreadValues$
|
|
16774
|
+
return this.client.post("/v1/rates/estimate", __spreadValues$P({}, params));
|
|
16769
16775
|
};
|
|
16770
16776
|
this.client = client;
|
|
16771
16777
|
}
|
|
@@ -16845,7 +16851,7 @@ class SalesOrdersAPI {
|
|
|
16845
16851
|
}
|
|
16846
16852
|
}
|
|
16847
16853
|
|
|
16848
|
-
var __async$
|
|
16854
|
+
var __async$12 = (__this, __arguments, generator) => {
|
|
16849
16855
|
return new Promise((resolve, reject) => {
|
|
16850
16856
|
var fulfilled = (value) => {
|
|
16851
16857
|
try {
|
|
@@ -16903,7 +16909,7 @@ class SellersAPI {
|
|
|
16903
16909
|
/**
|
|
16904
16910
|
* Deletes an API Key
|
|
16905
16911
|
*/
|
|
16906
|
-
this.deleteSellerApiKey = (_0) => __async$
|
|
16912
|
+
this.deleteSellerApiKey = (_0) => __async$12(this, [_0], function* ({
|
|
16907
16913
|
encryptedApiKey,
|
|
16908
16914
|
sellerId,
|
|
16909
16915
|
isSandbox
|
|
@@ -16949,19 +16955,19 @@ class SellersAPI {
|
|
|
16949
16955
|
}
|
|
16950
16956
|
}
|
|
16951
16957
|
|
|
16952
|
-
var __defProp$
|
|
16953
|
-
var __getOwnPropSymbols$
|
|
16954
|
-
var __hasOwnProp$
|
|
16955
|
-
var __propIsEnum$
|
|
16956
|
-
var __defNormalProp$
|
|
16957
|
-
var __spreadValues$
|
|
16958
|
+
var __defProp$O = Object.defineProperty;
|
|
16959
|
+
var __getOwnPropSymbols$X = Object.getOwnPropertySymbols;
|
|
16960
|
+
var __hasOwnProp$X = Object.prototype.hasOwnProperty;
|
|
16961
|
+
var __propIsEnum$X = Object.prototype.propertyIsEnumerable;
|
|
16962
|
+
var __defNormalProp$O = (obj, key, value) => key in obj ? __defProp$O(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16963
|
+
var __spreadValues$O = (a, b) => {
|
|
16958
16964
|
for (var prop in b || (b = {}))
|
|
16959
|
-
if (__hasOwnProp$
|
|
16960
|
-
__defNormalProp$
|
|
16961
|
-
if (__getOwnPropSymbols$
|
|
16962
|
-
for (var prop of __getOwnPropSymbols$
|
|
16963
|
-
if (__propIsEnum$
|
|
16964
|
-
__defNormalProp$
|
|
16965
|
+
if (__hasOwnProp$X.call(b, prop))
|
|
16966
|
+
__defNormalProp$O(a, prop, b[prop]);
|
|
16967
|
+
if (__getOwnPropSymbols$X)
|
|
16968
|
+
for (var prop of __getOwnPropSymbols$X(b)) {
|
|
16969
|
+
if (__propIsEnum$X.call(b, prop))
|
|
16970
|
+
__defNormalProp$O(a, prop, b[prop]);
|
|
16965
16971
|
}
|
|
16966
16972
|
return a;
|
|
16967
16973
|
};
|
|
@@ -16973,7 +16979,7 @@ class ServicePointsAPI {
|
|
|
16973
16979
|
* Either an address, coordinates, or an address query
|
|
16974
16980
|
*/
|
|
16975
16981
|
this.list = (options) => {
|
|
16976
|
-
return this.client.post("/v1/service_points/list", __spreadValues$
|
|
16982
|
+
return this.client.post("/v1/service_points/list", __spreadValues$O({}, options));
|
|
16977
16983
|
};
|
|
16978
16984
|
/**
|
|
16979
16985
|
* Get a specific service point by its carrier code, country code, and id
|
|
@@ -16991,7 +16997,7 @@ class ServicePointsAPI {
|
|
|
16991
16997
|
}
|
|
16992
16998
|
}
|
|
16993
16999
|
|
|
16994
|
-
var __async$
|
|
17000
|
+
var __async$11 = (__this, __arguments, generator) => {
|
|
16995
17001
|
return new Promise((resolve, reject) => {
|
|
16996
17002
|
var fulfilled = (value) => {
|
|
16997
17003
|
try {
|
|
@@ -17040,7 +17046,7 @@ class ShipmentsAPI {
|
|
|
17040
17046
|
* The `create` method allows for creating shipments based on a list of shipment
|
|
17041
17047
|
* items passed into this method.
|
|
17042
17048
|
*/
|
|
17043
|
-
this.create = (...shipments) => __async$
|
|
17049
|
+
this.create = (...shipments) => __async$11(this, null, function* () {
|
|
17044
17050
|
return this.client.post("/v1/shipments", {
|
|
17045
17051
|
shipments
|
|
17046
17052
|
});
|
|
@@ -34457,38 +34463,38 @@ class WebhooksAPI {
|
|
|
34457
34463
|
}
|
|
34458
34464
|
}
|
|
34459
34465
|
|
|
34460
|
-
var __defProp$
|
|
34461
|
-
var __defProps$
|
|
34462
|
-
var __getOwnPropDescs$
|
|
34463
|
-
var __getOwnPropSymbols$
|
|
34464
|
-
var __hasOwnProp$
|
|
34465
|
-
var __propIsEnum$
|
|
34466
|
-
var __defNormalProp$
|
|
34467
|
-
var __spreadValues$
|
|
34466
|
+
var __defProp$N = Object.defineProperty;
|
|
34467
|
+
var __defProps$K = Object.defineProperties;
|
|
34468
|
+
var __getOwnPropDescs$K = Object.getOwnPropertyDescriptors;
|
|
34469
|
+
var __getOwnPropSymbols$W = Object.getOwnPropertySymbols;
|
|
34470
|
+
var __hasOwnProp$W = Object.prototype.hasOwnProperty;
|
|
34471
|
+
var __propIsEnum$W = Object.prototype.propertyIsEnumerable;
|
|
34472
|
+
var __defNormalProp$N = (obj, key, value) => key in obj ? __defProp$N(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
34473
|
+
var __spreadValues$N = (a, b) => {
|
|
34468
34474
|
for (var prop in b || (b = {}))
|
|
34469
|
-
if (__hasOwnProp$
|
|
34470
|
-
__defNormalProp$
|
|
34471
|
-
if (__getOwnPropSymbols$
|
|
34472
|
-
for (var prop of __getOwnPropSymbols$
|
|
34473
|
-
if (__propIsEnum$
|
|
34474
|
-
__defNormalProp$
|
|
34475
|
+
if (__hasOwnProp$W.call(b, prop))
|
|
34476
|
+
__defNormalProp$N(a, prop, b[prop]);
|
|
34477
|
+
if (__getOwnPropSymbols$W)
|
|
34478
|
+
for (var prop of __getOwnPropSymbols$W(b)) {
|
|
34479
|
+
if (__propIsEnum$W.call(b, prop))
|
|
34480
|
+
__defNormalProp$N(a, prop, b[prop]);
|
|
34475
34481
|
}
|
|
34476
34482
|
return a;
|
|
34477
34483
|
};
|
|
34478
|
-
var __spreadProps$
|
|
34484
|
+
var __spreadProps$K = (a, b) => __defProps$K(a, __getOwnPropDescs$K(b));
|
|
34479
34485
|
var __objRest$s = (source, exclude) => {
|
|
34480
34486
|
var target = {};
|
|
34481
34487
|
for (var prop in source)
|
|
34482
|
-
if (__hasOwnProp$
|
|
34488
|
+
if (__hasOwnProp$W.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
34483
34489
|
target[prop] = source[prop];
|
|
34484
|
-
if (source != null && __getOwnPropSymbols$
|
|
34485
|
-
for (var prop of __getOwnPropSymbols$
|
|
34486
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
34490
|
+
if (source != null && __getOwnPropSymbols$W)
|
|
34491
|
+
for (var prop of __getOwnPropSymbols$W(source)) {
|
|
34492
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$W.call(source, prop))
|
|
34487
34493
|
target[prop] = source[prop];
|
|
34488
34494
|
}
|
|
34489
34495
|
return target;
|
|
34490
34496
|
};
|
|
34491
|
-
var __async
|
|
34497
|
+
var __async$10 = (__this, __arguments, generator) => {
|
|
34492
34498
|
return new Promise((resolve, reject) => {
|
|
34493
34499
|
var fulfilled = (value) => {
|
|
34494
34500
|
try {
|
|
@@ -34511,7 +34517,7 @@ var __async$$ = (__this, __arguments, generator) => {
|
|
|
34511
34517
|
const logger$1 = E({
|
|
34512
34518
|
level: process.env.NODE_ENV === "production" ? "fatal" : "info",
|
|
34513
34519
|
name: "shipengine-api",
|
|
34514
|
-
serializers: __spreadProps$
|
|
34520
|
+
serializers: __spreadProps$K(__spreadValues$N({}, k), {
|
|
34515
34521
|
req: (req) => ({
|
|
34516
34522
|
headers: req.headers,
|
|
34517
34523
|
method: req.method,
|
|
@@ -34536,7 +34542,7 @@ class ShipEngineAPI {
|
|
|
34536
34542
|
this.getSandboxToken = getSandboxToken;
|
|
34537
34543
|
const client = axios.create({
|
|
34538
34544
|
baseURL,
|
|
34539
|
-
headers: __spreadProps$
|
|
34545
|
+
headers: __spreadProps$K(__spreadValues$N({}, headers), {
|
|
34540
34546
|
"Content-Type": "application/json"
|
|
34541
34547
|
}),
|
|
34542
34548
|
paramsSerializer: (params) => lib.stringify(decamelizeKeys(params), { arrayFormat: "brackets" }),
|
|
@@ -34576,7 +34582,7 @@ class ShipEngineAPI {
|
|
|
34576
34582
|
});
|
|
34577
34583
|
client.defaults.headers.common["Authorization"] = `Bearer ${token}`;
|
|
34578
34584
|
client.interceptors.request.use(
|
|
34579
|
-
(config) => __async
|
|
34585
|
+
(config) => __async$10(this, null, function* () {
|
|
34580
34586
|
if (config.isSandbox) {
|
|
34581
34587
|
if (!this.sandboxToken) {
|
|
34582
34588
|
this.sandboxToken = yield getSandboxToken == null ? void 0 : getSandboxToken();
|
|
@@ -34605,7 +34611,7 @@ class ShipEngineAPI {
|
|
|
34605
34611
|
}
|
|
34606
34612
|
return res;
|
|
34607
34613
|
},
|
|
34608
|
-
(err) => __async
|
|
34614
|
+
(err) => __async$10(this, null, function* () {
|
|
34609
34615
|
var _a, _b, _c, _d, _e;
|
|
34610
34616
|
if (debug) {
|
|
34611
34617
|
logger$1.error(
|
|
@@ -34654,7 +34660,7 @@ class ShipEngineAPI {
|
|
|
34654
34660
|
* that token (also known as Seller ID)
|
|
34655
34661
|
*/
|
|
34656
34662
|
getTenant(isSandbox) {
|
|
34657
|
-
return __async
|
|
34663
|
+
return __async$10(this, null, function* () {
|
|
34658
34664
|
var _a;
|
|
34659
34665
|
if (!isSandbox) {
|
|
34660
34666
|
return this.getTenantFromToken(this.token);
|
|
@@ -34973,25 +34979,25 @@ const delay = (ms) => new Promise((resolve) => {
|
|
|
34973
34979
|
|
|
34974
34980
|
const onError = (_errors) => _default();
|
|
34975
34981
|
|
|
34976
|
-
var __defProp$
|
|
34977
|
-
var __defProps$
|
|
34978
|
-
var __getOwnPropDescs$
|
|
34979
|
-
var __getOwnPropSymbols$
|
|
34980
|
-
var __hasOwnProp$
|
|
34981
|
-
var __propIsEnum$
|
|
34982
|
-
var __defNormalProp$
|
|
34983
|
-
var __spreadValues$
|
|
34982
|
+
var __defProp$M = Object.defineProperty;
|
|
34983
|
+
var __defProps$J = Object.defineProperties;
|
|
34984
|
+
var __getOwnPropDescs$J = Object.getOwnPropertyDescriptors;
|
|
34985
|
+
var __getOwnPropSymbols$V = Object.getOwnPropertySymbols;
|
|
34986
|
+
var __hasOwnProp$V = Object.prototype.hasOwnProperty;
|
|
34987
|
+
var __propIsEnum$V = Object.prototype.propertyIsEnumerable;
|
|
34988
|
+
var __defNormalProp$M = (obj, key, value) => key in obj ? __defProp$M(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
34989
|
+
var __spreadValues$M = (a, b) => {
|
|
34984
34990
|
for (var prop in b || (b = {}))
|
|
34985
|
-
if (__hasOwnProp$
|
|
34986
|
-
__defNormalProp$
|
|
34987
|
-
if (__getOwnPropSymbols$
|
|
34988
|
-
for (var prop of __getOwnPropSymbols$
|
|
34989
|
-
if (__propIsEnum$
|
|
34990
|
-
__defNormalProp$
|
|
34991
|
+
if (__hasOwnProp$V.call(b, prop))
|
|
34992
|
+
__defNormalProp$M(a, prop, b[prop]);
|
|
34993
|
+
if (__getOwnPropSymbols$V)
|
|
34994
|
+
for (var prop of __getOwnPropSymbols$V(b)) {
|
|
34995
|
+
if (__propIsEnum$V.call(b, prop))
|
|
34996
|
+
__defNormalProp$M(a, prop, b[prop]);
|
|
34991
34997
|
}
|
|
34992
34998
|
return a;
|
|
34993
34999
|
};
|
|
34994
|
-
var __spreadProps$
|
|
35000
|
+
var __spreadProps$J = (a, b) => __defProps$J(a, __getOwnPropDescs$J(b));
|
|
34995
35001
|
const streams = [];
|
|
34996
35002
|
if (process.env.NODE_ENV === "production") {
|
|
34997
35003
|
streams.push({
|
|
@@ -35000,7 +35006,7 @@ if (process.env.NODE_ENV === "production") {
|
|
|
35000
35006
|
}
|
|
35001
35007
|
const logger = E({
|
|
35002
35008
|
name: "shipengine",
|
|
35003
|
-
serializers: __spreadProps$
|
|
35009
|
+
serializers: __spreadProps$J(__spreadValues$M({}, k), {
|
|
35004
35010
|
req: (req) => ({
|
|
35005
35011
|
headers: req.headers,
|
|
35006
35012
|
method: req.method,
|
|
@@ -35025,7 +35031,7 @@ const retryUntil = (callbackFn, retries = 10, timeoutBetweenAttempts = 1e3) => P
|
|
|
35025
35031
|
throw error;
|
|
35026
35032
|
});
|
|
35027
35033
|
|
|
35028
|
-
var __async
|
|
35034
|
+
var __async$$ = (__this, __arguments, generator) => {
|
|
35029
35035
|
return new Promise((resolve, reject) => {
|
|
35030
35036
|
var fulfilled = (value) => {
|
|
35031
35037
|
try {
|
|
@@ -35048,7 +35054,7 @@ var __async$_ = (__this, __arguments, generator) => {
|
|
|
35048
35054
|
const useCreateAccountImage = () => {
|
|
35049
35055
|
const { client } = useShipEngine();
|
|
35050
35056
|
return reactQuery.useMutation({
|
|
35051
|
-
mutationFn: (data) => __async
|
|
35057
|
+
mutationFn: (data) => __async$$(void 0, null, function* () {
|
|
35052
35058
|
const result = yield client.accountSettings.createImage(data);
|
|
35053
35059
|
return result.data;
|
|
35054
35060
|
}),
|
|
@@ -35057,7 +35063,7 @@ const useCreateAccountImage = () => {
|
|
|
35057
35063
|
});
|
|
35058
35064
|
};
|
|
35059
35065
|
|
|
35060
|
-
var __async$
|
|
35066
|
+
var __async$_ = (__this, __arguments, generator) => {
|
|
35061
35067
|
return new Promise((resolve, reject) => {
|
|
35062
35068
|
var fulfilled = (value) => {
|
|
35063
35069
|
try {
|
|
@@ -35080,7 +35086,7 @@ var __async$Z = (__this, __arguments, generator) => {
|
|
|
35080
35086
|
const useDeleteAccountImage = () => {
|
|
35081
35087
|
const { client } = useShipEngine();
|
|
35082
35088
|
return reactQuery.useMutation({
|
|
35083
|
-
mutationFn: (labelImageId) => __async$
|
|
35089
|
+
mutationFn: (labelImageId) => __async$_(void 0, null, function* () {
|
|
35084
35090
|
const result = yield client.accountSettings.deleteImage(labelImageId);
|
|
35085
35091
|
return result.data;
|
|
35086
35092
|
}),
|
|
@@ -35109,7 +35115,7 @@ const useGetAccountSettings = () => {
|
|
|
35109
35115
|
});
|
|
35110
35116
|
};
|
|
35111
35117
|
|
|
35112
|
-
var __async$
|
|
35118
|
+
var __async$Z = (__this, __arguments, generator) => {
|
|
35113
35119
|
return new Promise((resolve, reject) => {
|
|
35114
35120
|
var fulfilled = (value) => {
|
|
35115
35121
|
try {
|
|
@@ -35132,7 +35138,7 @@ var __async$Y = (__this, __arguments, generator) => {
|
|
|
35132
35138
|
const useUpdateAccountImage = () => {
|
|
35133
35139
|
const { client } = useShipEngine();
|
|
35134
35140
|
return reactQuery.useMutation({
|
|
35135
|
-
mutationFn: (data) => __async$
|
|
35141
|
+
mutationFn: (data) => __async$Z(void 0, null, function* () {
|
|
35136
35142
|
const result = yield client.accountSettings.updateImage(data);
|
|
35137
35143
|
return result.data;
|
|
35138
35144
|
}),
|
|
@@ -35141,7 +35147,7 @@ const useUpdateAccountImage = () => {
|
|
|
35141
35147
|
});
|
|
35142
35148
|
};
|
|
35143
35149
|
|
|
35144
|
-
var __async$
|
|
35150
|
+
var __async$Y = (__this, __arguments, generator) => {
|
|
35145
35151
|
return new Promise((resolve, reject) => {
|
|
35146
35152
|
var fulfilled = (value) => {
|
|
35147
35153
|
try {
|
|
@@ -35164,7 +35170,7 @@ var __async$X = (__this, __arguments, generator) => {
|
|
|
35164
35170
|
const useUpdateAccountSettings = () => {
|
|
35165
35171
|
const { client } = useShipEngine();
|
|
35166
35172
|
return reactQuery.useMutation({
|
|
35167
|
-
mutationFn: (settings) => __async$
|
|
35173
|
+
mutationFn: (settings) => __async$Y(void 0, null, function* () {
|
|
35168
35174
|
const result = yield client.accountSettings.update(settings);
|
|
35169
35175
|
return result.data;
|
|
35170
35176
|
}),
|
|
@@ -35173,6 +35179,35 @@ const useUpdateAccountSettings = () => {
|
|
|
35173
35179
|
});
|
|
35174
35180
|
};
|
|
35175
35181
|
|
|
35182
|
+
var __defProp$L = Object.defineProperty;
|
|
35183
|
+
var __defProps$I = Object.defineProperties;
|
|
35184
|
+
var __getOwnPropDescs$I = Object.getOwnPropertyDescriptors;
|
|
35185
|
+
var __getOwnPropSymbols$U = Object.getOwnPropertySymbols;
|
|
35186
|
+
var __hasOwnProp$U = Object.prototype.hasOwnProperty;
|
|
35187
|
+
var __propIsEnum$U = Object.prototype.propertyIsEnumerable;
|
|
35188
|
+
var __defNormalProp$L = (obj, key, value) => key in obj ? __defProp$L(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
35189
|
+
var __spreadValues$L = (a, b) => {
|
|
35190
|
+
for (var prop in b || (b = {}))
|
|
35191
|
+
if (__hasOwnProp$U.call(b, prop))
|
|
35192
|
+
__defNormalProp$L(a, prop, b[prop]);
|
|
35193
|
+
if (__getOwnPropSymbols$U)
|
|
35194
|
+
for (var prop of __getOwnPropSymbols$U(b)) {
|
|
35195
|
+
if (__propIsEnum$U.call(b, prop))
|
|
35196
|
+
__defNormalProp$L(a, prop, b[prop]);
|
|
35197
|
+
}
|
|
35198
|
+
return a;
|
|
35199
|
+
};
|
|
35200
|
+
var __spreadProps$I = (a, b) => __defProps$I(a, __getOwnPropDescs$I(b));
|
|
35201
|
+
const useListAccountAddons = (params) => {
|
|
35202
|
+
const { client } = useShipEngine();
|
|
35203
|
+
return reactQuery.useQuery(__spreadProps$I(__spreadValues$L({}, params), {
|
|
35204
|
+
onError,
|
|
35205
|
+
queryFn: () => client.accountAddons.list(),
|
|
35206
|
+
queryKey: ["useListAccountAddons"],
|
|
35207
|
+
select: (result) => result.data.addons
|
|
35208
|
+
}));
|
|
35209
|
+
};
|
|
35210
|
+
|
|
35176
35211
|
var __defProp$K = Object.defineProperty;
|
|
35177
35212
|
var __defProps$H = Object.defineProperties;
|
|
35178
35213
|
var __getOwnPropDescs$H = Object.getOwnPropertyDescriptors;
|
|
@@ -35192,13 +35227,35 @@ var __spreadValues$K = (a, b) => {
|
|
|
35192
35227
|
return a;
|
|
35193
35228
|
};
|
|
35194
35229
|
var __spreadProps$H = (a, b) => __defProps$H(a, __getOwnPropDescs$H(b));
|
|
35195
|
-
|
|
35230
|
+
var __async$X = (__this, __arguments, generator) => {
|
|
35231
|
+
return new Promise((resolve, reject) => {
|
|
35232
|
+
var fulfilled = (value) => {
|
|
35233
|
+
try {
|
|
35234
|
+
step(generator.next(value));
|
|
35235
|
+
} catch (e) {
|
|
35236
|
+
reject(e);
|
|
35237
|
+
}
|
|
35238
|
+
};
|
|
35239
|
+
var rejected = (value) => {
|
|
35240
|
+
try {
|
|
35241
|
+
step(generator.throw(value));
|
|
35242
|
+
} catch (e) {
|
|
35243
|
+
reject(e);
|
|
35244
|
+
}
|
|
35245
|
+
};
|
|
35246
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
35247
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
35248
|
+
});
|
|
35249
|
+
};
|
|
35250
|
+
const useEnableAccountAddon = (params) => {
|
|
35196
35251
|
const { client } = useShipEngine();
|
|
35197
|
-
return reactQuery.
|
|
35198
|
-
|
|
35199
|
-
|
|
35200
|
-
|
|
35201
|
-
|
|
35252
|
+
return reactQuery.useMutation(__spreadProps$H(__spreadValues$K({}, params), {
|
|
35253
|
+
mutationFn: (addonType) => __async$X(void 0, null, function* () {
|
|
35254
|
+
const result = yield client.accountAddons.enable(addonType);
|
|
35255
|
+
return result.data;
|
|
35256
|
+
}),
|
|
35257
|
+
mutationKey: ["useEnableAccountAddon"],
|
|
35258
|
+
onError
|
|
35202
35259
|
}));
|
|
35203
35260
|
};
|
|
35204
35261
|
|
|
@@ -35241,14 +35298,14 @@ var __async$W = (__this, __arguments, generator) => {
|
|
|
35241
35298
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
35242
35299
|
});
|
|
35243
35300
|
};
|
|
35244
|
-
const
|
|
35301
|
+
const useDisableAccountAddon = (params) => {
|
|
35245
35302
|
const { client } = useShipEngine();
|
|
35246
35303
|
return reactQuery.useMutation(__spreadProps$G(__spreadValues$J({}, params), {
|
|
35247
35304
|
mutationFn: (addonType) => __async$W(void 0, null, function* () {
|
|
35248
|
-
const result = yield client.accountAddons.
|
|
35305
|
+
const result = yield client.accountAddons.disable(addonType);
|
|
35249
35306
|
return result.data;
|
|
35250
35307
|
}),
|
|
35251
|
-
mutationKey: ["
|
|
35308
|
+
mutationKey: ["useDisableAccountAddon"],
|
|
35252
35309
|
onError
|
|
35253
35310
|
}));
|
|
35254
35311
|
};
|
|
@@ -40308,6 +40365,7 @@ exports.useDeleteSellerApiKey = useDeleteSellerApiKey;
|
|
|
40308
40365
|
exports.useDeleteShippingRule = useDeleteShippingRule;
|
|
40309
40366
|
exports.useDeleteWarehouse = useDeleteWarehouse;
|
|
40310
40367
|
exports.useDeleteWebhook = useDeleteWebhook;
|
|
40368
|
+
exports.useDisableAccountAddon = useDisableAccountAddon;
|
|
40311
40369
|
exports.useDownloadRateCard = useDownloadRateCard;
|
|
40312
40370
|
exports.useEditShippingRule = useEditShippingRule;
|
|
40313
40371
|
exports.useEnableAccountAddon = useEnableAccountAddon;
|