@shipengine/alchemy 6.0.36 → 6.0.38
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 +788 -677
- package/index.mjs +784 -678
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -10812,17 +10812,17 @@ var AccountBillingPlanChangeType = /* @__PURE__ */ ((AccountBillingPlanChangeTyp
|
|
|
10812
10812
|
return AccountBillingPlanChangeType2;
|
|
10813
10813
|
})(AccountBillingPlanChangeType || {});
|
|
10814
10814
|
|
|
10815
|
-
var __getOwnPropSymbols$
|
|
10816
|
-
var __hasOwnProp$
|
|
10817
|
-
var __propIsEnum$
|
|
10815
|
+
var __getOwnPropSymbols$L = Object.getOwnPropertySymbols;
|
|
10816
|
+
var __hasOwnProp$L = Object.prototype.hasOwnProperty;
|
|
10817
|
+
var __propIsEnum$L = Object.prototype.propertyIsEnumerable;
|
|
10818
10818
|
var __objRest$q = (source, exclude) => {
|
|
10819
10819
|
var target = {};
|
|
10820
10820
|
for (var prop in source)
|
|
10821
|
-
if (__hasOwnProp$
|
|
10821
|
+
if (__hasOwnProp$L.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
10822
10822
|
target[prop] = source[prop];
|
|
10823
|
-
if (source != null && __getOwnPropSymbols$
|
|
10824
|
-
for (var prop of __getOwnPropSymbols$
|
|
10825
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
10823
|
+
if (source != null && __getOwnPropSymbols$L)
|
|
10824
|
+
for (var prop of __getOwnPropSymbols$L(source)) {
|
|
10825
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$L.call(source, prop))
|
|
10826
10826
|
target[prop] = source[prop];
|
|
10827
10827
|
}
|
|
10828
10828
|
return target;
|
|
@@ -10957,17 +10957,17 @@ const types = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
10957
10957
|
RateCardStatus
|
|
10958
10958
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
10959
10959
|
|
|
10960
|
-
var __getOwnPropSymbols$
|
|
10961
|
-
var __hasOwnProp$
|
|
10962
|
-
var __propIsEnum$
|
|
10960
|
+
var __getOwnPropSymbols$K = Object.getOwnPropertySymbols;
|
|
10961
|
+
var __hasOwnProp$K = Object.prototype.hasOwnProperty;
|
|
10962
|
+
var __propIsEnum$K = Object.prototype.propertyIsEnumerable;
|
|
10963
10963
|
var __objRest$p = (source, exclude) => {
|
|
10964
10964
|
var target = {};
|
|
10965
10965
|
for (var prop in source)
|
|
10966
|
-
if (__hasOwnProp$
|
|
10966
|
+
if (__hasOwnProp$K.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
10967
10967
|
target[prop] = source[prop];
|
|
10968
|
-
if (source != null && __getOwnPropSymbols$
|
|
10969
|
-
for (var prop of __getOwnPropSymbols$
|
|
10970
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
10968
|
+
if (source != null && __getOwnPropSymbols$K)
|
|
10969
|
+
for (var prop of __getOwnPropSymbols$K(source)) {
|
|
10970
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$K.call(source, prop))
|
|
10971
10971
|
target[prop] = source[prop];
|
|
10972
10972
|
}
|
|
10973
10973
|
return target;
|
|
@@ -11058,6 +11058,44 @@ class AuctanePayAPI {
|
|
|
11058
11058
|
}
|
|
11059
11059
|
}
|
|
11060
11060
|
|
|
11061
|
+
class AccountBillingPlanAPI {
|
|
11062
|
+
constructor(client) {
|
|
11063
|
+
this.client = client;
|
|
11064
|
+
/**
|
|
11065
|
+
* The `get` method retrieves the account billing plan for the current user.
|
|
11066
|
+
*/
|
|
11067
|
+
this.get = () => {
|
|
11068
|
+
return this.client.get("/v1/account/billing_plan");
|
|
11069
|
+
};
|
|
11070
|
+
/**
|
|
11071
|
+
* The `update` method updates the code of the account billing plan
|
|
11072
|
+
*/
|
|
11073
|
+
this.update = (reqBody) => {
|
|
11074
|
+
return this.client.put(`/v1/account/billing_plan`, reqBody);
|
|
11075
|
+
};
|
|
11076
|
+
this.client = client;
|
|
11077
|
+
}
|
|
11078
|
+
}
|
|
11079
|
+
|
|
11080
|
+
class AccountBillingAPI {
|
|
11081
|
+
constructor(client) {
|
|
11082
|
+
this.client = client;
|
|
11083
|
+
/**
|
|
11084
|
+
* The `get` method retrieves the account billing for the current user.
|
|
11085
|
+
*/
|
|
11086
|
+
this.get = () => {
|
|
11087
|
+
return this.client.get("/v1/account/billing");
|
|
11088
|
+
};
|
|
11089
|
+
/**
|
|
11090
|
+
* The `put` method updates (or create) the Billing Info for the current user.
|
|
11091
|
+
*/
|
|
11092
|
+
this.put = (reqBody) => {
|
|
11093
|
+
return this.client.put("/v1/account/billing", reqBody);
|
|
11094
|
+
};
|
|
11095
|
+
this.client = client;
|
|
11096
|
+
}
|
|
11097
|
+
}
|
|
11098
|
+
|
|
11061
11099
|
const isCodedErrors = (errs) => Array.isArray(errs) && errs.every((err) => isCodedError(err));
|
|
11062
11100
|
const isCodedError = (err) => !!err.errorCode;
|
|
11063
11101
|
const isDataCodedErrors = (data) => !!data.errors && isCodedErrors(data.errors);
|
|
@@ -13725,7 +13763,7 @@ var ipaddr = {
|
|
|
13725
13763
|
}).call(commonjsGlobal);
|
|
13726
13764
|
} (ipaddr));
|
|
13727
13765
|
|
|
13728
|
-
var __async$
|
|
13766
|
+
var __async$_ = (__this, __arguments, generator) => {
|
|
13729
13767
|
return new Promise((resolve, reject) => {
|
|
13730
13768
|
var fulfilled = (value) => {
|
|
13731
13769
|
try {
|
|
@@ -13745,7 +13783,7 @@ var __async$Z = (__this, __arguments, generator) => {
|
|
|
13745
13783
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
13746
13784
|
});
|
|
13747
13785
|
};
|
|
13748
|
-
const getEndUserIpAddress = () => __async$
|
|
13786
|
+
const getEndUserIpAddress = () => __async$_(void 0, null, function* () {
|
|
13749
13787
|
try {
|
|
13750
13788
|
const response = yield axios.get("https://api.ipify.org/?format=json");
|
|
13751
13789
|
if (response.data.ip && ipaddrExports.isValid(response.data.ip)) {
|
|
@@ -13802,38 +13840,38 @@ const decamelizeKeys = (obj, separator = "_") => {
|
|
|
13802
13840
|
return obj;
|
|
13803
13841
|
};
|
|
13804
13842
|
|
|
13805
|
-
var __defProp$
|
|
13806
|
-
var __defProps$
|
|
13807
|
-
var __getOwnPropDescs$
|
|
13808
|
-
var __getOwnPropSymbols$
|
|
13809
|
-
var __hasOwnProp$
|
|
13810
|
-
var __propIsEnum$
|
|
13811
|
-
var __defNormalProp$
|
|
13812
|
-
var __spreadValues$
|
|
13843
|
+
var __defProp$y = Object.defineProperty;
|
|
13844
|
+
var __defProps$s = Object.defineProperties;
|
|
13845
|
+
var __getOwnPropDescs$s = Object.getOwnPropertyDescriptors;
|
|
13846
|
+
var __getOwnPropSymbols$J = Object.getOwnPropertySymbols;
|
|
13847
|
+
var __hasOwnProp$J = Object.prototype.hasOwnProperty;
|
|
13848
|
+
var __propIsEnum$J = Object.prototype.propertyIsEnumerable;
|
|
13849
|
+
var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13850
|
+
var __spreadValues$y = (a, b) => {
|
|
13813
13851
|
for (var prop in b || (b = {}))
|
|
13814
|
-
if (__hasOwnProp$
|
|
13815
|
-
__defNormalProp$
|
|
13816
|
-
if (__getOwnPropSymbols$
|
|
13817
|
-
for (var prop of __getOwnPropSymbols$
|
|
13818
|
-
if (__propIsEnum$
|
|
13819
|
-
__defNormalProp$
|
|
13852
|
+
if (__hasOwnProp$J.call(b, prop))
|
|
13853
|
+
__defNormalProp$y(a, prop, b[prop]);
|
|
13854
|
+
if (__getOwnPropSymbols$J)
|
|
13855
|
+
for (var prop of __getOwnPropSymbols$J(b)) {
|
|
13856
|
+
if (__propIsEnum$J.call(b, prop))
|
|
13857
|
+
__defNormalProp$y(a, prop, b[prop]);
|
|
13820
13858
|
}
|
|
13821
13859
|
return a;
|
|
13822
13860
|
};
|
|
13823
|
-
var __spreadProps$
|
|
13861
|
+
var __spreadProps$s = (a, b) => __defProps$s(a, __getOwnPropDescs$s(b));
|
|
13824
13862
|
var __objRest$o = (source, exclude) => {
|
|
13825
13863
|
var target = {};
|
|
13826
13864
|
for (var prop in source)
|
|
13827
|
-
if (__hasOwnProp$
|
|
13865
|
+
if (__hasOwnProp$J.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
13828
13866
|
target[prop] = source[prop];
|
|
13829
|
-
if (source != null && __getOwnPropSymbols$
|
|
13830
|
-
for (var prop of __getOwnPropSymbols$
|
|
13831
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
13867
|
+
if (source != null && __getOwnPropSymbols$J)
|
|
13868
|
+
for (var prop of __getOwnPropSymbols$J(source)) {
|
|
13869
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$J.call(source, prop))
|
|
13832
13870
|
target[prop] = source[prop];
|
|
13833
13871
|
}
|
|
13834
13872
|
return target;
|
|
13835
13873
|
};
|
|
13836
|
-
var __async$
|
|
13874
|
+
var __async$Z = (__this, __arguments, generator) => {
|
|
13837
13875
|
return new Promise((resolve, reject) => {
|
|
13838
13876
|
var fulfilled = (value) => {
|
|
13839
13877
|
try {
|
|
@@ -13873,12 +13911,12 @@ class CarriersAPI {
|
|
|
13873
13911
|
/**
|
|
13874
13912
|
* The `connect` method connects a carrier account to a user's ShipEngine account.
|
|
13875
13913
|
*/
|
|
13876
|
-
this.connect = (_a) => __async$
|
|
13914
|
+
this.connect = (_a) => __async$Z(this, null, function* () {
|
|
13877
13915
|
var _b = _a, { carrierCode } = _b, connection = __objRest$o(_b, ["carrierCode"]);
|
|
13878
13916
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
13879
13917
|
if (!endUserIpAddress)
|
|
13880
13918
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
13881
|
-
return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$
|
|
13919
|
+
return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$s(__spreadValues$y({}, connection), {
|
|
13882
13920
|
endUserIpAddress
|
|
13883
13921
|
}));
|
|
13884
13922
|
});
|
|
@@ -13964,7 +14002,7 @@ class CarriersAPI {
|
|
|
13964
14002
|
}
|
|
13965
14003
|
}
|
|
13966
14004
|
|
|
13967
|
-
var __async$
|
|
14005
|
+
var __async$Y = (__this, __arguments, generator) => {
|
|
13968
14006
|
return new Promise((resolve, reject) => {
|
|
13969
14007
|
var fulfilled = (value) => {
|
|
13970
14008
|
try {
|
|
@@ -14006,7 +14044,7 @@ class ConnectionsAPI {
|
|
|
14006
14044
|
/**
|
|
14007
14045
|
* The `connectCarrier` method connects a carrier to account.
|
|
14008
14046
|
*/
|
|
14009
|
-
this.connectCarrier = (carrierName, formData) => __async$
|
|
14047
|
+
this.connectCarrier = (carrierName, formData) => __async$Y(this, null, function* () {
|
|
14010
14048
|
return yield this.client.post(
|
|
14011
14049
|
`/v1/connections/carriers/${carrierName}`,
|
|
14012
14050
|
formData,
|
|
@@ -16149,25 +16187,6 @@ var lib = {
|
|
|
16149
16187
|
stringify: stringify
|
|
16150
16188
|
};
|
|
16151
16189
|
|
|
16152
|
-
class AccountBillingPlanAPI {
|
|
16153
|
-
constructor(client) {
|
|
16154
|
-
this.client = client;
|
|
16155
|
-
/**
|
|
16156
|
-
* The `get` method retrieves the account billing plan for the current user.
|
|
16157
|
-
*/
|
|
16158
|
-
this.get = () => {
|
|
16159
|
-
return this.client.get("/v1/account/billing_plan");
|
|
16160
|
-
};
|
|
16161
|
-
/**
|
|
16162
|
-
* The `update` method updates the code of the account billing plan
|
|
16163
|
-
*/
|
|
16164
|
-
this.update = (reqBody) => {
|
|
16165
|
-
return this.client.put(`/v1/account/billing_plan`, reqBody);
|
|
16166
|
-
};
|
|
16167
|
-
this.client = client;
|
|
16168
|
-
}
|
|
16169
|
-
}
|
|
16170
|
-
|
|
16171
16190
|
class CustomPackagesAPI {
|
|
16172
16191
|
constructor(client) {
|
|
16173
16192
|
this.client = client;
|
|
@@ -16181,23 +16200,23 @@ class CustomPackagesAPI {
|
|
|
16181
16200
|
}
|
|
16182
16201
|
}
|
|
16183
16202
|
|
|
16184
|
-
var __defProp$
|
|
16185
|
-
var __getOwnPropSymbols$
|
|
16186
|
-
var __hasOwnProp$
|
|
16187
|
-
var __propIsEnum$
|
|
16188
|
-
var __defNormalProp$
|
|
16189
|
-
var __spreadValues$
|
|
16203
|
+
var __defProp$x = Object.defineProperty;
|
|
16204
|
+
var __getOwnPropSymbols$I = Object.getOwnPropertySymbols;
|
|
16205
|
+
var __hasOwnProp$I = Object.prototype.hasOwnProperty;
|
|
16206
|
+
var __propIsEnum$I = Object.prototype.propertyIsEnumerable;
|
|
16207
|
+
var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16208
|
+
var __spreadValues$x = (a, b) => {
|
|
16190
16209
|
for (var prop in b || (b = {}))
|
|
16191
|
-
if (__hasOwnProp$
|
|
16192
|
-
__defNormalProp$
|
|
16193
|
-
if (__getOwnPropSymbols$
|
|
16194
|
-
for (var prop of __getOwnPropSymbols$
|
|
16195
|
-
if (__propIsEnum$
|
|
16196
|
-
__defNormalProp$
|
|
16210
|
+
if (__hasOwnProp$I.call(b, prop))
|
|
16211
|
+
__defNormalProp$x(a, prop, b[prop]);
|
|
16212
|
+
if (__getOwnPropSymbols$I)
|
|
16213
|
+
for (var prop of __getOwnPropSymbols$I(b)) {
|
|
16214
|
+
if (__propIsEnum$I.call(b, prop))
|
|
16215
|
+
__defNormalProp$x(a, prop, b[prop]);
|
|
16197
16216
|
}
|
|
16198
16217
|
return a;
|
|
16199
16218
|
};
|
|
16200
|
-
var __async$
|
|
16219
|
+
var __async$X = (__this, __arguments, generator) => {
|
|
16201
16220
|
return new Promise((resolve, reject) => {
|
|
16202
16221
|
var fulfilled = (value) => {
|
|
16203
16222
|
try {
|
|
@@ -16236,12 +16255,12 @@ class FundingSourcesAPI {
|
|
|
16236
16255
|
* The `create` method creates a new funding source for a given user. This requires
|
|
16237
16256
|
* payment information to be collected from the user.
|
|
16238
16257
|
*/
|
|
16239
|
-
this.create = (createFundingSource) => __async$
|
|
16258
|
+
this.create = (createFundingSource) => __async$X(this, null, function* () {
|
|
16240
16259
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16241
16260
|
if (!endUserIpAddress) {
|
|
16242
16261
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
16243
16262
|
}
|
|
16244
|
-
return yield this.client.post("/v1/funding_sources", __spreadValues$
|
|
16263
|
+
return yield this.client.post("/v1/funding_sources", __spreadValues$x({
|
|
16245
16264
|
endUserIpAddress
|
|
16246
16265
|
}, createFundingSource));
|
|
16247
16266
|
});
|
|
@@ -16250,7 +16269,7 @@ class FundingSourcesAPI {
|
|
|
16250
16269
|
* user to update the billing address or payment information associated with the
|
|
16251
16270
|
* funding source.
|
|
16252
16271
|
*/
|
|
16253
|
-
this.update = (billingInfo, creditCardInfo, auctanePayInfo, fundingSourceId) => __async$
|
|
16272
|
+
this.update = (billingInfo, creditCardInfo, auctanePayInfo, fundingSourceId) => __async$X(this, null, function* () {
|
|
16254
16273
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16255
16274
|
if (!endUserIpAddress) {
|
|
16256
16275
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
@@ -16260,7 +16279,7 @@ class FundingSourcesAPI {
|
|
|
16260
16279
|
{
|
|
16261
16280
|
billingInfo,
|
|
16262
16281
|
endUserIpAddress,
|
|
16263
|
-
paymentMethod: __spreadValues$
|
|
16282
|
+
paymentMethod: __spreadValues$x({
|
|
16264
16283
|
creditCardInfo
|
|
16265
16284
|
}, auctanePayInfo)
|
|
16266
16285
|
}
|
|
@@ -16270,19 +16289,19 @@ class FundingSourcesAPI {
|
|
|
16270
16289
|
* The `registerCarrier` method registers a carrier account and associates
|
|
16271
16290
|
* it with a given funding source.
|
|
16272
16291
|
*/
|
|
16273
|
-
this.registerCarrier = (carrier) => __async$
|
|
16292
|
+
this.registerCarrier = (carrier) => __async$X(this, null, function* () {
|
|
16274
16293
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16275
16294
|
if (!endUserIpAddress) {
|
|
16276
16295
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
16277
16296
|
}
|
|
16278
|
-
return yield this.client.post("/v1/registration/funding_source", __spreadValues$
|
|
16297
|
+
return yield this.client.post("/v1/registration/funding_source", __spreadValues$x({
|
|
16279
16298
|
endUserIpAddress
|
|
16280
16299
|
}, carrier));
|
|
16281
16300
|
});
|
|
16282
16301
|
/**
|
|
16283
16302
|
* The `addFunds` method allows you to add funds to a funding source.
|
|
16284
16303
|
*/
|
|
16285
|
-
this.addFunds = (amount, fundingSourceId) => __async$
|
|
16304
|
+
this.addFunds = (amount, fundingSourceId) => __async$X(this, null, function* () {
|
|
16286
16305
|
return yield this.client.put(
|
|
16287
16306
|
`/v1/funding_sources/${fundingSourceId}/add_funds`,
|
|
16288
16307
|
amount
|
|
@@ -16292,7 +16311,7 @@ class FundingSourcesAPI {
|
|
|
16292
16311
|
* The `metadata` method returns seller-specific requirements for creating funding sources
|
|
16293
16312
|
* and attaching carriers
|
|
16294
16313
|
*/
|
|
16295
|
-
this.metadata = () => __async$
|
|
16314
|
+
this.metadata = () => __async$X(this, null, function* () {
|
|
16296
16315
|
return yield this.client.get("/v1/funding_sources/metadata");
|
|
16297
16316
|
});
|
|
16298
16317
|
/**
|
|
@@ -16344,7 +16363,7 @@ class InsuranceAPI {
|
|
|
16344
16363
|
}
|
|
16345
16364
|
}
|
|
16346
16365
|
|
|
16347
|
-
var __async$
|
|
16366
|
+
var __async$W = (__this, __arguments, generator) => {
|
|
16348
16367
|
return new Promise((resolve, reject) => {
|
|
16349
16368
|
var fulfilled = (value) => {
|
|
16350
16369
|
try {
|
|
@@ -16376,13 +16395,13 @@ class InvoiceAddressAPI {
|
|
|
16376
16395
|
/**
|
|
16377
16396
|
* The `create` method creates a new invoice address for a given user.
|
|
16378
16397
|
*/
|
|
16379
|
-
this.create = (invoiceAddress) => __async$
|
|
16398
|
+
this.create = (invoiceAddress) => __async$W(this, null, function* () {
|
|
16380
16399
|
return yield this.client.post("/v1/invoice_address", invoiceAddress);
|
|
16381
16400
|
});
|
|
16382
16401
|
/**
|
|
16383
16402
|
* The `update` method updates a invoice address for a given user.
|
|
16384
16403
|
*/
|
|
16385
|
-
this.update = (invoiceAddress) => __async$
|
|
16404
|
+
this.update = (invoiceAddress) => __async$W(this, null, function* () {
|
|
16386
16405
|
return yield this.client.put("/v1/invoice_address", invoiceAddress);
|
|
16387
16406
|
});
|
|
16388
16407
|
this.client = client;
|
|
@@ -16424,17 +16443,17 @@ class LabelsAPI {
|
|
|
16424
16443
|
}
|
|
16425
16444
|
}
|
|
16426
16445
|
|
|
16427
|
-
var __getOwnPropSymbols$
|
|
16428
|
-
var __hasOwnProp$
|
|
16429
|
-
var __propIsEnum$
|
|
16446
|
+
var __getOwnPropSymbols$H = Object.getOwnPropertySymbols;
|
|
16447
|
+
var __hasOwnProp$H = Object.prototype.hasOwnProperty;
|
|
16448
|
+
var __propIsEnum$H = Object.prototype.propertyIsEnumerable;
|
|
16430
16449
|
var __objRest$n = (source, exclude) => {
|
|
16431
16450
|
var target = {};
|
|
16432
16451
|
for (var prop in source)
|
|
16433
|
-
if (__hasOwnProp$
|
|
16452
|
+
if (__hasOwnProp$H.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
16434
16453
|
target[prop] = source[prop];
|
|
16435
|
-
if (source != null && __getOwnPropSymbols$
|
|
16436
|
-
for (var prop of __getOwnPropSymbols$
|
|
16437
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
16454
|
+
if (source != null && __getOwnPropSymbols$H)
|
|
16455
|
+
for (var prop of __getOwnPropSymbols$H(source)) {
|
|
16456
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$H.call(source, prop))
|
|
16438
16457
|
target[prop] = source[prop];
|
|
16439
16458
|
}
|
|
16440
16459
|
return target;
|
|
@@ -16555,19 +16574,19 @@ class RateCardsAPI {
|
|
|
16555
16574
|
}
|
|
16556
16575
|
}
|
|
16557
16576
|
|
|
16558
|
-
var __defProp$
|
|
16559
|
-
var __getOwnPropSymbols$
|
|
16560
|
-
var __hasOwnProp$
|
|
16561
|
-
var __propIsEnum$
|
|
16562
|
-
var __defNormalProp$
|
|
16563
|
-
var __spreadValues$
|
|
16577
|
+
var __defProp$w = Object.defineProperty;
|
|
16578
|
+
var __getOwnPropSymbols$G = Object.getOwnPropertySymbols;
|
|
16579
|
+
var __hasOwnProp$G = Object.prototype.hasOwnProperty;
|
|
16580
|
+
var __propIsEnum$G = Object.prototype.propertyIsEnumerable;
|
|
16581
|
+
var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16582
|
+
var __spreadValues$w = (a, b) => {
|
|
16564
16583
|
for (var prop in b || (b = {}))
|
|
16565
|
-
if (__hasOwnProp$
|
|
16566
|
-
__defNormalProp$
|
|
16567
|
-
if (__getOwnPropSymbols$
|
|
16568
|
-
for (var prop of __getOwnPropSymbols$
|
|
16569
|
-
if (__propIsEnum$
|
|
16570
|
-
__defNormalProp$
|
|
16584
|
+
if (__hasOwnProp$G.call(b, prop))
|
|
16585
|
+
__defNormalProp$w(a, prop, b[prop]);
|
|
16586
|
+
if (__getOwnPropSymbols$G)
|
|
16587
|
+
for (var prop of __getOwnPropSymbols$G(b)) {
|
|
16588
|
+
if (__propIsEnum$G.call(b, prop))
|
|
16589
|
+
__defNormalProp$w(a, prop, b[prop]);
|
|
16571
16590
|
}
|
|
16572
16591
|
return a;
|
|
16573
16592
|
};
|
|
@@ -16589,7 +16608,7 @@ class RatesAPI {
|
|
|
16589
16608
|
* method.
|
|
16590
16609
|
*/
|
|
16591
16610
|
this.estimate = (params) => {
|
|
16592
|
-
return this.client.post("/v1/rates/estimate", __spreadValues$
|
|
16611
|
+
return this.client.post("/v1/rates/estimate", __spreadValues$w({}, params));
|
|
16593
16612
|
};
|
|
16594
16613
|
this.client = client;
|
|
16595
16614
|
}
|
|
@@ -16669,7 +16688,7 @@ class SalesOrdersAPI {
|
|
|
16669
16688
|
}
|
|
16670
16689
|
}
|
|
16671
16690
|
|
|
16672
|
-
var __async$
|
|
16691
|
+
var __async$V = (__this, __arguments, generator) => {
|
|
16673
16692
|
return new Promise((resolve, reject) => {
|
|
16674
16693
|
var fulfilled = (value) => {
|
|
16675
16694
|
try {
|
|
@@ -16727,7 +16746,7 @@ class SellersAPI {
|
|
|
16727
16746
|
/**
|
|
16728
16747
|
* Deletes an API Key
|
|
16729
16748
|
*/
|
|
16730
|
-
this.deleteSellerApiKey = (_0) => __async$
|
|
16749
|
+
this.deleteSellerApiKey = (_0) => __async$V(this, [_0], function* ({
|
|
16731
16750
|
encryptedApiKey,
|
|
16732
16751
|
sellerId,
|
|
16733
16752
|
isSandbox
|
|
@@ -16773,19 +16792,19 @@ class SellersAPI {
|
|
|
16773
16792
|
}
|
|
16774
16793
|
}
|
|
16775
16794
|
|
|
16776
|
-
var __defProp$
|
|
16777
|
-
var __getOwnPropSymbols$
|
|
16778
|
-
var __hasOwnProp$
|
|
16779
|
-
var __propIsEnum$
|
|
16780
|
-
var __defNormalProp$
|
|
16781
|
-
var __spreadValues$
|
|
16795
|
+
var __defProp$v = Object.defineProperty;
|
|
16796
|
+
var __getOwnPropSymbols$F = Object.getOwnPropertySymbols;
|
|
16797
|
+
var __hasOwnProp$F = Object.prototype.hasOwnProperty;
|
|
16798
|
+
var __propIsEnum$F = Object.prototype.propertyIsEnumerable;
|
|
16799
|
+
var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16800
|
+
var __spreadValues$v = (a, b) => {
|
|
16782
16801
|
for (var prop in b || (b = {}))
|
|
16783
|
-
if (__hasOwnProp$
|
|
16784
|
-
__defNormalProp$
|
|
16785
|
-
if (__getOwnPropSymbols$
|
|
16786
|
-
for (var prop of __getOwnPropSymbols$
|
|
16787
|
-
if (__propIsEnum$
|
|
16788
|
-
__defNormalProp$
|
|
16802
|
+
if (__hasOwnProp$F.call(b, prop))
|
|
16803
|
+
__defNormalProp$v(a, prop, b[prop]);
|
|
16804
|
+
if (__getOwnPropSymbols$F)
|
|
16805
|
+
for (var prop of __getOwnPropSymbols$F(b)) {
|
|
16806
|
+
if (__propIsEnum$F.call(b, prop))
|
|
16807
|
+
__defNormalProp$v(a, prop, b[prop]);
|
|
16789
16808
|
}
|
|
16790
16809
|
return a;
|
|
16791
16810
|
};
|
|
@@ -16797,7 +16816,7 @@ class ServicePointsAPI {
|
|
|
16797
16816
|
* Either an address, coordinates, or an address query
|
|
16798
16817
|
*/
|
|
16799
16818
|
this.list = (options) => {
|
|
16800
|
-
return this.client.post("/v1/service_points/list", __spreadValues$
|
|
16819
|
+
return this.client.post("/v1/service_points/list", __spreadValues$v({}, options));
|
|
16801
16820
|
};
|
|
16802
16821
|
/**
|
|
16803
16822
|
* Get a specific service point by its carrier code, country code, and id
|
|
@@ -16815,7 +16834,7 @@ class ServicePointsAPI {
|
|
|
16815
16834
|
}
|
|
16816
16835
|
}
|
|
16817
16836
|
|
|
16818
|
-
var __async$
|
|
16837
|
+
var __async$U = (__this, __arguments, generator) => {
|
|
16819
16838
|
return new Promise((resolve, reject) => {
|
|
16820
16839
|
var fulfilled = (value) => {
|
|
16821
16840
|
try {
|
|
@@ -16864,7 +16883,7 @@ class ShipmentsAPI {
|
|
|
16864
16883
|
* The `create` method allows for creating shipments based on a list of shipment
|
|
16865
16884
|
* items passed into this method.
|
|
16866
16885
|
*/
|
|
16867
|
-
this.create = (...shipments) => __async$
|
|
16886
|
+
this.create = (...shipments) => __async$U(this, null, function* () {
|
|
16868
16887
|
return this.client.post("/v1/shipments", {
|
|
16869
16888
|
shipments
|
|
16870
16889
|
});
|
|
@@ -34256,26 +34275,26 @@ class WebhooksAPI {
|
|
|
34256
34275
|
}
|
|
34257
34276
|
}
|
|
34258
34277
|
|
|
34259
|
-
var __defProp$
|
|
34260
|
-
var __defProps$
|
|
34261
|
-
var __getOwnPropDescs$
|
|
34262
|
-
var __getOwnPropSymbols$
|
|
34263
|
-
var __hasOwnProp$
|
|
34264
|
-
var __propIsEnum$
|
|
34265
|
-
var __defNormalProp$
|
|
34266
|
-
var __spreadValues$
|
|
34278
|
+
var __defProp$u = Object.defineProperty;
|
|
34279
|
+
var __defProps$r = Object.defineProperties;
|
|
34280
|
+
var __getOwnPropDescs$r = Object.getOwnPropertyDescriptors;
|
|
34281
|
+
var __getOwnPropSymbols$E = Object.getOwnPropertySymbols;
|
|
34282
|
+
var __hasOwnProp$E = Object.prototype.hasOwnProperty;
|
|
34283
|
+
var __propIsEnum$E = Object.prototype.propertyIsEnumerable;
|
|
34284
|
+
var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
34285
|
+
var __spreadValues$u = (a, b) => {
|
|
34267
34286
|
for (var prop in b || (b = {}))
|
|
34268
|
-
if (__hasOwnProp$
|
|
34269
|
-
__defNormalProp$
|
|
34270
|
-
if (__getOwnPropSymbols$
|
|
34271
|
-
for (var prop of __getOwnPropSymbols$
|
|
34272
|
-
if (__propIsEnum$
|
|
34273
|
-
__defNormalProp$
|
|
34287
|
+
if (__hasOwnProp$E.call(b, prop))
|
|
34288
|
+
__defNormalProp$u(a, prop, b[prop]);
|
|
34289
|
+
if (__getOwnPropSymbols$E)
|
|
34290
|
+
for (var prop of __getOwnPropSymbols$E(b)) {
|
|
34291
|
+
if (__propIsEnum$E.call(b, prop))
|
|
34292
|
+
__defNormalProp$u(a, prop, b[prop]);
|
|
34274
34293
|
}
|
|
34275
34294
|
return a;
|
|
34276
34295
|
};
|
|
34277
|
-
var __spreadProps$
|
|
34278
|
-
var __async$
|
|
34296
|
+
var __spreadProps$r = (a, b) => __defProps$r(a, __getOwnPropDescs$r(b));
|
|
34297
|
+
var __async$T = (__this, __arguments, generator) => {
|
|
34279
34298
|
return new Promise((resolve, reject) => {
|
|
34280
34299
|
var fulfilled = (value) => {
|
|
34281
34300
|
try {
|
|
@@ -34298,7 +34317,7 @@ var __async$S = (__this, __arguments, generator) => {
|
|
|
34298
34317
|
const logger$1 = E({
|
|
34299
34318
|
level: process.env.NODE_ENV === "production" ? "fatal" : "info",
|
|
34300
34319
|
name: "shipengine-api",
|
|
34301
|
-
serializers: __spreadProps$
|
|
34320
|
+
serializers: __spreadProps$r(__spreadValues$u({}, k), {
|
|
34302
34321
|
req: (req) => ({
|
|
34303
34322
|
headers: req.headers,
|
|
34304
34323
|
method: req.method,
|
|
@@ -34323,7 +34342,7 @@ class ShipEngineAPI {
|
|
|
34323
34342
|
this.getSandboxToken = getSandboxToken;
|
|
34324
34343
|
const client = axios.create({
|
|
34325
34344
|
baseURL,
|
|
34326
|
-
headers: __spreadProps$
|
|
34345
|
+
headers: __spreadProps$r(__spreadValues$u({}, headers), {
|
|
34327
34346
|
"Content-Type": "application/json"
|
|
34328
34347
|
}),
|
|
34329
34348
|
paramsSerializer: (params) => lib.stringify(decamelizeKeys(params), { arrayFormat: "brackets" }),
|
|
@@ -34358,7 +34377,7 @@ class ShipEngineAPI {
|
|
|
34358
34377
|
});
|
|
34359
34378
|
client.defaults.headers.common["Authorization"] = `Bearer ${token}`;
|
|
34360
34379
|
client.interceptors.request.use(
|
|
34361
|
-
(config) => __async$
|
|
34380
|
+
(config) => __async$T(this, null, function* () {
|
|
34362
34381
|
if (config.isSandbox) {
|
|
34363
34382
|
if (!this.sandboxToken) {
|
|
34364
34383
|
this.sandboxToken = yield getSandboxToken == null ? void 0 : getSandboxToken();
|
|
@@ -34385,7 +34404,7 @@ class ShipEngineAPI {
|
|
|
34385
34404
|
);
|
|
34386
34405
|
return res;
|
|
34387
34406
|
},
|
|
34388
|
-
(err) => __async$
|
|
34407
|
+
(err) => __async$T(this, null, function* () {
|
|
34389
34408
|
var _a, _b, _c, _d, _e;
|
|
34390
34409
|
logger$1.error(
|
|
34391
34410
|
{ err, req: err.config, res: err.response },
|
|
@@ -34432,7 +34451,7 @@ class ShipEngineAPI {
|
|
|
34432
34451
|
* that token (also known as Seller ID)
|
|
34433
34452
|
*/
|
|
34434
34453
|
getTenant(isSandbox) {
|
|
34435
|
-
return __async$
|
|
34454
|
+
return __async$T(this, null, function* () {
|
|
34436
34455
|
var _a;
|
|
34437
34456
|
if (!isSandbox) {
|
|
34438
34457
|
return this.getTenantFromToken(this.token);
|
|
@@ -34469,6 +34488,13 @@ class ShipEngineAPI {
|
|
|
34469
34488
|
get accountBillingPlan() {
|
|
34470
34489
|
return new AccountBillingPlanAPI(this.client);
|
|
34471
34490
|
}
|
|
34491
|
+
/**
|
|
34492
|
+
* The `accountBilling` method provides access to the Account Billing (Recurly) endpoints
|
|
34493
|
+
* in ShipEngine API.
|
|
34494
|
+
*/
|
|
34495
|
+
get accountBilling() {
|
|
34496
|
+
return new AccountBillingAPI(this.client);
|
|
34497
|
+
}
|
|
34472
34498
|
/**
|
|
34473
34499
|
* The `addresses` method provides access to the Address Validation endpoints
|
|
34474
34500
|
* in ShipEngine API. e.g. Validate Addresses, Parse Addresses, etc.
|
|
@@ -34720,25 +34746,25 @@ const delay = (ms) => new Promise((resolve) => {
|
|
|
34720
34746
|
|
|
34721
34747
|
const onError = (_errors) => _default();
|
|
34722
34748
|
|
|
34723
|
-
var __defProp$
|
|
34724
|
-
var __defProps$
|
|
34725
|
-
var __getOwnPropDescs$
|
|
34726
|
-
var __getOwnPropSymbols$
|
|
34727
|
-
var __hasOwnProp$
|
|
34728
|
-
var __propIsEnum$
|
|
34729
|
-
var __defNormalProp$
|
|
34730
|
-
var __spreadValues$
|
|
34749
|
+
var __defProp$t = Object.defineProperty;
|
|
34750
|
+
var __defProps$q = Object.defineProperties;
|
|
34751
|
+
var __getOwnPropDescs$q = Object.getOwnPropertyDescriptors;
|
|
34752
|
+
var __getOwnPropSymbols$D = Object.getOwnPropertySymbols;
|
|
34753
|
+
var __hasOwnProp$D = Object.prototype.hasOwnProperty;
|
|
34754
|
+
var __propIsEnum$D = Object.prototype.propertyIsEnumerable;
|
|
34755
|
+
var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
34756
|
+
var __spreadValues$t = (a, b) => {
|
|
34731
34757
|
for (var prop in b || (b = {}))
|
|
34732
|
-
if (__hasOwnProp$
|
|
34733
|
-
__defNormalProp$
|
|
34734
|
-
if (__getOwnPropSymbols$
|
|
34735
|
-
for (var prop of __getOwnPropSymbols$
|
|
34736
|
-
if (__propIsEnum$
|
|
34737
|
-
__defNormalProp$
|
|
34758
|
+
if (__hasOwnProp$D.call(b, prop))
|
|
34759
|
+
__defNormalProp$t(a, prop, b[prop]);
|
|
34760
|
+
if (__getOwnPropSymbols$D)
|
|
34761
|
+
for (var prop of __getOwnPropSymbols$D(b)) {
|
|
34762
|
+
if (__propIsEnum$D.call(b, prop))
|
|
34763
|
+
__defNormalProp$t(a, prop, b[prop]);
|
|
34738
34764
|
}
|
|
34739
34765
|
return a;
|
|
34740
34766
|
};
|
|
34741
|
-
var __spreadProps$
|
|
34767
|
+
var __spreadProps$q = (a, b) => __defProps$q(a, __getOwnPropDescs$q(b));
|
|
34742
34768
|
const streams = [];
|
|
34743
34769
|
if (process.env.NODE_ENV === "production") {
|
|
34744
34770
|
streams.push({
|
|
@@ -34747,7 +34773,7 @@ if (process.env.NODE_ENV === "production") {
|
|
|
34747
34773
|
}
|
|
34748
34774
|
const logger = E({
|
|
34749
34775
|
name: "shipengine",
|
|
34750
|
-
serializers: __spreadProps$
|
|
34776
|
+
serializers: __spreadProps$q(__spreadValues$t({}, k), {
|
|
34751
34777
|
req: (req) => ({
|
|
34752
34778
|
headers: req.headers,
|
|
34753
34779
|
method: req.method,
|
|
@@ -34772,7 +34798,7 @@ const retryUntil = (callbackFn, retries = 10, timeoutBetweenAttempts = 1e3) => P
|
|
|
34772
34798
|
throw error;
|
|
34773
34799
|
});
|
|
34774
34800
|
|
|
34775
|
-
var __async$
|
|
34801
|
+
var __async$S = (__this, __arguments, generator) => {
|
|
34776
34802
|
return new Promise((resolve, reject) => {
|
|
34777
34803
|
var fulfilled = (value) => {
|
|
34778
34804
|
try {
|
|
@@ -34795,7 +34821,7 @@ var __async$R = (__this, __arguments, generator) => {
|
|
|
34795
34821
|
const useCreateAccountImage = () => {
|
|
34796
34822
|
const { client } = useShipEngine();
|
|
34797
34823
|
return reactQuery.useMutation({
|
|
34798
|
-
mutationFn: (data) => __async$
|
|
34824
|
+
mutationFn: (data) => __async$S(void 0, null, function* () {
|
|
34799
34825
|
const result = yield client.accountSettings.createImage(data);
|
|
34800
34826
|
return result.data;
|
|
34801
34827
|
}),
|
|
@@ -34804,7 +34830,7 @@ const useCreateAccountImage = () => {
|
|
|
34804
34830
|
});
|
|
34805
34831
|
};
|
|
34806
34832
|
|
|
34807
|
-
var __async$
|
|
34833
|
+
var __async$R = (__this, __arguments, generator) => {
|
|
34808
34834
|
return new Promise((resolve, reject) => {
|
|
34809
34835
|
var fulfilled = (value) => {
|
|
34810
34836
|
try {
|
|
@@ -34827,7 +34853,7 @@ var __async$Q = (__this, __arguments, generator) => {
|
|
|
34827
34853
|
const useDeleteAccountImage = () => {
|
|
34828
34854
|
const { client } = useShipEngine();
|
|
34829
34855
|
return reactQuery.useMutation({
|
|
34830
|
-
mutationFn: (labelImageId) => __async$
|
|
34856
|
+
mutationFn: (labelImageId) => __async$R(void 0, null, function* () {
|
|
34831
34857
|
const result = yield client.accountSettings.deleteImage(labelImageId);
|
|
34832
34858
|
return result.data;
|
|
34833
34859
|
}),
|
|
@@ -34856,7 +34882,7 @@ const useGetAccountSettings = () => {
|
|
|
34856
34882
|
});
|
|
34857
34883
|
};
|
|
34858
34884
|
|
|
34859
|
-
var __async$
|
|
34885
|
+
var __async$Q = (__this, __arguments, generator) => {
|
|
34860
34886
|
return new Promise((resolve, reject) => {
|
|
34861
34887
|
var fulfilled = (value) => {
|
|
34862
34888
|
try {
|
|
@@ -34879,7 +34905,7 @@ var __async$P = (__this, __arguments, generator) => {
|
|
|
34879
34905
|
const useUpdateAccountImage = () => {
|
|
34880
34906
|
const { client } = useShipEngine();
|
|
34881
34907
|
return reactQuery.useMutation({
|
|
34882
|
-
mutationFn: (data) => __async$
|
|
34908
|
+
mutationFn: (data) => __async$Q(void 0, null, function* () {
|
|
34883
34909
|
const result = yield client.accountSettings.updateImage(data);
|
|
34884
34910
|
return result.data;
|
|
34885
34911
|
}),
|
|
@@ -34888,7 +34914,7 @@ const useUpdateAccountImage = () => {
|
|
|
34888
34914
|
});
|
|
34889
34915
|
};
|
|
34890
34916
|
|
|
34891
|
-
var __async$
|
|
34917
|
+
var __async$P = (__this, __arguments, generator) => {
|
|
34892
34918
|
return new Promise((resolve, reject) => {
|
|
34893
34919
|
var fulfilled = (value) => {
|
|
34894
34920
|
try {
|
|
@@ -34911,7 +34937,7 @@ var __async$O = (__this, __arguments, generator) => {
|
|
|
34911
34937
|
const useUpdateAccountSettings = () => {
|
|
34912
34938
|
const { client } = useShipEngine();
|
|
34913
34939
|
return reactQuery.useMutation({
|
|
34914
|
-
mutationFn: (settings) => __async$
|
|
34940
|
+
mutationFn: (settings) => __async$P(void 0, null, function* () {
|
|
34915
34941
|
const result = yield client.accountSettings.update(settings);
|
|
34916
34942
|
return result.data;
|
|
34917
34943
|
}),
|
|
@@ -34920,7 +34946,7 @@ const useUpdateAccountSettings = () => {
|
|
|
34920
34946
|
});
|
|
34921
34947
|
};
|
|
34922
34948
|
|
|
34923
|
-
var __async$
|
|
34949
|
+
var __async$O = (__this, __arguments, generator) => {
|
|
34924
34950
|
return new Promise((resolve, reject) => {
|
|
34925
34951
|
var fulfilled = (value) => {
|
|
34926
34952
|
try {
|
|
@@ -34943,7 +34969,7 @@ var __async$N = (__this, __arguments, generator) => {
|
|
|
34943
34969
|
const useParseAddress = () => {
|
|
34944
34970
|
const { client } = useShipEngine();
|
|
34945
34971
|
return reactQuery.useMutation({
|
|
34946
|
-
mutationFn: (_0) => __async$
|
|
34972
|
+
mutationFn: (_0) => __async$O(void 0, [_0], function* ({ address, text }) {
|
|
34947
34973
|
const result = yield client.addresses.parse(text, address);
|
|
34948
34974
|
return result.data;
|
|
34949
34975
|
}),
|
|
@@ -34952,7 +34978,7 @@ const useParseAddress = () => {
|
|
|
34952
34978
|
});
|
|
34953
34979
|
};
|
|
34954
34980
|
|
|
34955
|
-
var __async$
|
|
34981
|
+
var __async$N = (__this, __arguments, generator) => {
|
|
34956
34982
|
return new Promise((resolve, reject) => {
|
|
34957
34983
|
var fulfilled = (value) => {
|
|
34958
34984
|
try {
|
|
@@ -34975,7 +35001,7 @@ var __async$M = (__this, __arguments, generator) => {
|
|
|
34975
35001
|
const useValidateAddresses = () => {
|
|
34976
35002
|
const { client } = useShipEngine();
|
|
34977
35003
|
return reactQuery.useMutation({
|
|
34978
|
-
mutationFn: (addresses) => __async$
|
|
35004
|
+
mutationFn: (addresses) => __async$N(void 0, null, function* () {
|
|
34979
35005
|
const result = yield client.addresses.validate(addresses);
|
|
34980
35006
|
return result.data;
|
|
34981
35007
|
}),
|
|
@@ -34984,26 +35010,26 @@ const useValidateAddresses = () => {
|
|
|
34984
35010
|
});
|
|
34985
35011
|
};
|
|
34986
35012
|
|
|
34987
|
-
var __defProp$
|
|
34988
|
-
var __defProps$
|
|
34989
|
-
var __getOwnPropDescs$
|
|
34990
|
-
var __getOwnPropSymbols$
|
|
34991
|
-
var __hasOwnProp$
|
|
34992
|
-
var __propIsEnum$
|
|
34993
|
-
var __defNormalProp$
|
|
34994
|
-
var __spreadValues$
|
|
35013
|
+
var __defProp$s = Object.defineProperty;
|
|
35014
|
+
var __defProps$p = Object.defineProperties;
|
|
35015
|
+
var __getOwnPropDescs$p = Object.getOwnPropertyDescriptors;
|
|
35016
|
+
var __getOwnPropSymbols$C = Object.getOwnPropertySymbols;
|
|
35017
|
+
var __hasOwnProp$C = Object.prototype.hasOwnProperty;
|
|
35018
|
+
var __propIsEnum$C = Object.prototype.propertyIsEnumerable;
|
|
35019
|
+
var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
35020
|
+
var __spreadValues$s = (a, b) => {
|
|
34995
35021
|
for (var prop in b || (b = {}))
|
|
34996
|
-
if (__hasOwnProp$
|
|
34997
|
-
__defNormalProp$
|
|
34998
|
-
if (__getOwnPropSymbols$
|
|
34999
|
-
for (var prop of __getOwnPropSymbols$
|
|
35000
|
-
if (__propIsEnum$
|
|
35001
|
-
__defNormalProp$
|
|
35022
|
+
if (__hasOwnProp$C.call(b, prop))
|
|
35023
|
+
__defNormalProp$s(a, prop, b[prop]);
|
|
35024
|
+
if (__getOwnPropSymbols$C)
|
|
35025
|
+
for (var prop of __getOwnPropSymbols$C(b)) {
|
|
35026
|
+
if (__propIsEnum$C.call(b, prop))
|
|
35027
|
+
__defNormalProp$s(a, prop, b[prop]);
|
|
35002
35028
|
}
|
|
35003
35029
|
return a;
|
|
35004
35030
|
};
|
|
35005
|
-
var __spreadProps$
|
|
35006
|
-
var __async$
|
|
35031
|
+
var __spreadProps$p = (a, b) => __defProps$p(a, __getOwnPropDescs$p(b));
|
|
35032
|
+
var __async$M = (__this, __arguments, generator) => {
|
|
35007
35033
|
return new Promise((resolve, reject) => {
|
|
35008
35034
|
var fulfilled = (value) => {
|
|
35009
35035
|
try {
|
|
@@ -35025,8 +35051,8 @@ var __async$L = (__this, __arguments, generator) => {
|
|
|
35025
35051
|
};
|
|
35026
35052
|
const useCreateAuctanePaySession = (params) => {
|
|
35027
35053
|
const { client } = useShipEngine();
|
|
35028
|
-
return reactQuery.useMutation(__spreadProps$
|
|
35029
|
-
mutationFn: (request) => __async$
|
|
35054
|
+
return reactQuery.useMutation(__spreadProps$p(__spreadValues$s({}, params), {
|
|
35055
|
+
mutationFn: (request) => __async$M(void 0, null, function* () {
|
|
35030
35056
|
const result = yield client.auctanePay.createSession(request);
|
|
35031
35057
|
return result.data;
|
|
35032
35058
|
}),
|
|
@@ -35035,7 +35061,7 @@ const useCreateAuctanePaySession = (params) => {
|
|
|
35035
35061
|
}));
|
|
35036
35062
|
};
|
|
35037
35063
|
|
|
35038
|
-
var __async$
|
|
35064
|
+
var __async$L = (__this, __arguments, generator) => {
|
|
35039
35065
|
return new Promise((resolve, reject) => {
|
|
35040
35066
|
var fulfilled = (value) => {
|
|
35041
35067
|
try {
|
|
@@ -35058,7 +35084,7 @@ var __async$K = (__this, __arguments, generator) => {
|
|
|
35058
35084
|
const useAddFunds = () => {
|
|
35059
35085
|
const { client } = useShipEngine();
|
|
35060
35086
|
return reactQuery.useMutation({
|
|
35061
|
-
mutationFn: (_0) => __async$
|
|
35087
|
+
mutationFn: (_0) => __async$L(void 0, [_0], function* ({ carrierId, funds }) {
|
|
35062
35088
|
const result = yield client.carriers.addFunds(carrierId, funds);
|
|
35063
35089
|
return result.data;
|
|
35064
35090
|
}),
|
|
@@ -35067,7 +35093,7 @@ const useAddFunds = () => {
|
|
|
35067
35093
|
});
|
|
35068
35094
|
};
|
|
35069
35095
|
|
|
35070
|
-
var __async$
|
|
35096
|
+
var __async$K = (__this, __arguments, generator) => {
|
|
35071
35097
|
return new Promise((resolve, reject) => {
|
|
35072
35098
|
var fulfilled = (value) => {
|
|
35073
35099
|
try {
|
|
@@ -35090,7 +35116,7 @@ var __async$J = (__this, __arguments, generator) => {
|
|
|
35090
35116
|
const useConnectCarrier = () => {
|
|
35091
35117
|
const { client } = useShipEngine();
|
|
35092
35118
|
return reactQuery.useMutation({
|
|
35093
|
-
mutationFn: (params) => __async$
|
|
35119
|
+
mutationFn: (params) => __async$K(void 0, null, function* () {
|
|
35094
35120
|
const result = yield client.carriers.connect(params);
|
|
35095
35121
|
return result.data;
|
|
35096
35122
|
}),
|
|
@@ -35199,41 +35225,41 @@ const useGetServicesByCarrier = (carrierId) => {
|
|
|
35199
35225
|
});
|
|
35200
35226
|
};
|
|
35201
35227
|
|
|
35202
|
-
var __defProp$
|
|
35203
|
-
var __defProps$
|
|
35204
|
-
var __getOwnPropDescs$
|
|
35205
|
-
var __getOwnPropSymbols$
|
|
35206
|
-
var __hasOwnProp$
|
|
35207
|
-
var __propIsEnum$
|
|
35208
|
-
var __defNormalProp$
|
|
35209
|
-
var __spreadValues$
|
|
35228
|
+
var __defProp$r = Object.defineProperty;
|
|
35229
|
+
var __defProps$o = Object.defineProperties;
|
|
35230
|
+
var __getOwnPropDescs$o = Object.getOwnPropertyDescriptors;
|
|
35231
|
+
var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
|
|
35232
|
+
var __hasOwnProp$B = Object.prototype.hasOwnProperty;
|
|
35233
|
+
var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
|
|
35234
|
+
var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
35235
|
+
var __spreadValues$r = (a, b) => {
|
|
35210
35236
|
for (var prop in b || (b = {}))
|
|
35211
|
-
if (__hasOwnProp$
|
|
35212
|
-
__defNormalProp$
|
|
35213
|
-
if (__getOwnPropSymbols$
|
|
35214
|
-
for (var prop of __getOwnPropSymbols$
|
|
35215
|
-
if (__propIsEnum$
|
|
35216
|
-
__defNormalProp$
|
|
35237
|
+
if (__hasOwnProp$B.call(b, prop))
|
|
35238
|
+
__defNormalProp$r(a, prop, b[prop]);
|
|
35239
|
+
if (__getOwnPropSymbols$B)
|
|
35240
|
+
for (var prop of __getOwnPropSymbols$B(b)) {
|
|
35241
|
+
if (__propIsEnum$B.call(b, prop))
|
|
35242
|
+
__defNormalProp$r(a, prop, b[prop]);
|
|
35217
35243
|
}
|
|
35218
35244
|
return a;
|
|
35219
35245
|
};
|
|
35220
|
-
var __spreadProps$
|
|
35246
|
+
var __spreadProps$o = (a, b) => __defProps$o(a, __getOwnPropDescs$o(b));
|
|
35221
35247
|
var __objRest$m = (source, exclude) => {
|
|
35222
35248
|
var target = {};
|
|
35223
35249
|
for (var prop in source)
|
|
35224
|
-
if (__hasOwnProp$
|
|
35250
|
+
if (__hasOwnProp$B.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
35225
35251
|
target[prop] = source[prop];
|
|
35226
|
-
if (source != null && __getOwnPropSymbols$
|
|
35227
|
-
for (var prop of __getOwnPropSymbols$
|
|
35228
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
35252
|
+
if (source != null && __getOwnPropSymbols$B)
|
|
35253
|
+
for (var prop of __getOwnPropSymbols$B(source)) {
|
|
35254
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$B.call(source, prop))
|
|
35229
35255
|
target[prop] = source[prop];
|
|
35230
35256
|
}
|
|
35231
35257
|
return target;
|
|
35232
35258
|
};
|
|
35233
35259
|
const useListCarriers = (params) => {
|
|
35234
35260
|
const { client } = useShipEngine();
|
|
35235
|
-
const _a = __spreadValues$
|
|
35236
|
-
return reactQuery.useQuery(__spreadProps$
|
|
35261
|
+
const _a = __spreadValues$r({}, params), { queryFnParams } = _a, rest = __objRest$m(_a, ["queryFnParams"]);
|
|
35262
|
+
return reactQuery.useQuery(__spreadProps$o(__spreadValues$r({}, rest), {
|
|
35237
35263
|
onError,
|
|
35238
35264
|
queryFn: () => client.carriers.list(queryFnParams),
|
|
35239
35265
|
queryKey: ["useListCarriers", queryFnParams],
|
|
@@ -35241,22 +35267,22 @@ const useListCarriers = (params) => {
|
|
|
35241
35267
|
}));
|
|
35242
35268
|
};
|
|
35243
35269
|
|
|
35244
|
-
var __getOwnPropSymbols$
|
|
35245
|
-
var __hasOwnProp$
|
|
35246
|
-
var __propIsEnum$
|
|
35270
|
+
var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
|
|
35271
|
+
var __hasOwnProp$A = Object.prototype.hasOwnProperty;
|
|
35272
|
+
var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
|
|
35247
35273
|
var __objRest$l = (source, exclude) => {
|
|
35248
35274
|
var target = {};
|
|
35249
35275
|
for (var prop in source)
|
|
35250
|
-
if (__hasOwnProp$
|
|
35276
|
+
if (__hasOwnProp$A.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
35251
35277
|
target[prop] = source[prop];
|
|
35252
|
-
if (source != null && __getOwnPropSymbols$
|
|
35253
|
-
for (var prop of __getOwnPropSymbols$
|
|
35254
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
35278
|
+
if (source != null && __getOwnPropSymbols$A)
|
|
35279
|
+
for (var prop of __getOwnPropSymbols$A(source)) {
|
|
35280
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$A.call(source, prop))
|
|
35255
35281
|
target[prop] = source[prop];
|
|
35256
35282
|
}
|
|
35257
35283
|
return target;
|
|
35258
35284
|
};
|
|
35259
|
-
var __async$
|
|
35285
|
+
var __async$J = (__this, __arguments, generator) => {
|
|
35260
35286
|
return new Promise((resolve, reject) => {
|
|
35261
35287
|
var fulfilled = (value) => {
|
|
35262
35288
|
try {
|
|
@@ -35280,7 +35306,7 @@ const useUpdateAutoFunding = () => {
|
|
|
35280
35306
|
const { client } = useShipEngine();
|
|
35281
35307
|
const queryClient = reactQuery.useQueryClient();
|
|
35282
35308
|
return reactQuery.useMutation({
|
|
35283
|
-
mutationFn: (_a) => __async$
|
|
35309
|
+
mutationFn: (_a) => __async$J(void 0, null, function* () {
|
|
35284
35310
|
var _b = _a, { carrierId } = _b, options = __objRest$l(_b, ["carrierId"]);
|
|
35285
35311
|
const result = yield client.carriers.updateAutoFunding(carrierId, options);
|
|
35286
35312
|
return result.data;
|
|
@@ -35310,7 +35336,7 @@ const useGetZonesByCarrier = (carrierId) => {
|
|
|
35310
35336
|
});
|
|
35311
35337
|
};
|
|
35312
35338
|
|
|
35313
|
-
var __async$
|
|
35339
|
+
var __async$I = (__this, __arguments, generator) => {
|
|
35314
35340
|
return new Promise((resolve, reject) => {
|
|
35315
35341
|
var fulfilled = (value) => {
|
|
35316
35342
|
try {
|
|
@@ -35333,7 +35359,7 @@ var __async$H = (__this, __arguments, generator) => {
|
|
|
35333
35359
|
const useDeleteCarrier = () => {
|
|
35334
35360
|
const { client } = useShipEngine();
|
|
35335
35361
|
return reactQuery.useMutation({
|
|
35336
|
-
mutationFn: (carrierId) => __async$
|
|
35362
|
+
mutationFn: (carrierId) => __async$I(void 0, null, function* () {
|
|
35337
35363
|
const result = yield client.carriers.delete(carrierId);
|
|
35338
35364
|
return result.data;
|
|
35339
35365
|
}),
|
|
@@ -35342,17 +35368,17 @@ const useDeleteCarrier = () => {
|
|
|
35342
35368
|
});
|
|
35343
35369
|
};
|
|
35344
35370
|
|
|
35345
|
-
var __getOwnPropSymbols$
|
|
35346
|
-
var __hasOwnProp$
|
|
35347
|
-
var __propIsEnum$
|
|
35371
|
+
var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
|
|
35372
|
+
var __hasOwnProp$z = Object.prototype.hasOwnProperty;
|
|
35373
|
+
var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
|
|
35348
35374
|
var __objRest$k = (source, exclude) => {
|
|
35349
35375
|
var target = {};
|
|
35350
35376
|
for (var prop in source)
|
|
35351
|
-
if (__hasOwnProp$
|
|
35377
|
+
if (__hasOwnProp$z.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
35352
35378
|
target[prop] = source[prop];
|
|
35353
|
-
if (source != null && __getOwnPropSymbols$
|
|
35354
|
-
for (var prop of __getOwnPropSymbols$
|
|
35355
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
35379
|
+
if (source != null && __getOwnPropSymbols$z)
|
|
35380
|
+
for (var prop of __getOwnPropSymbols$z(source)) {
|
|
35381
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$z.call(source, prop))
|
|
35356
35382
|
target[prop] = source[prop];
|
|
35357
35383
|
}
|
|
35358
35384
|
return target;
|
|
@@ -35369,17 +35395,17 @@ const useGetCarrierConnectionForm = (_params) => {
|
|
|
35369
35395
|
});
|
|
35370
35396
|
};
|
|
35371
35397
|
|
|
35372
|
-
var __getOwnPropSymbols$
|
|
35373
|
-
var __hasOwnProp$
|
|
35374
|
-
var __propIsEnum$
|
|
35398
|
+
var __getOwnPropSymbols$y = Object.getOwnPropertySymbols;
|
|
35399
|
+
var __hasOwnProp$y = Object.prototype.hasOwnProperty;
|
|
35400
|
+
var __propIsEnum$y = Object.prototype.propertyIsEnumerable;
|
|
35375
35401
|
var __objRest$j = (source, exclude) => {
|
|
35376
35402
|
var target = {};
|
|
35377
35403
|
for (var prop in source)
|
|
35378
|
-
if (__hasOwnProp$
|
|
35404
|
+
if (__hasOwnProp$y.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
35379
35405
|
target[prop] = source[prop];
|
|
35380
|
-
if (source != null && __getOwnPropSymbols$
|
|
35381
|
-
for (var prop of __getOwnPropSymbols$
|
|
35382
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
35406
|
+
if (source != null && __getOwnPropSymbols$y)
|
|
35407
|
+
for (var prop of __getOwnPropSymbols$y(source)) {
|
|
35408
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$y.call(source, prop))
|
|
35383
35409
|
target[prop] = source[prop];
|
|
35384
35410
|
}
|
|
35385
35411
|
return target;
|
|
@@ -35396,7 +35422,7 @@ const useListCarrierConnections = (_params) => {
|
|
|
35396
35422
|
});
|
|
35397
35423
|
};
|
|
35398
35424
|
|
|
35399
|
-
var __async$
|
|
35425
|
+
var __async$H = (__this, __arguments, generator) => {
|
|
35400
35426
|
return new Promise((resolve, reject) => {
|
|
35401
35427
|
var fulfilled = (value) => {
|
|
35402
35428
|
try {
|
|
@@ -35419,7 +35445,7 @@ var __async$G = (__this, __arguments, generator) => {
|
|
|
35419
35445
|
const useConnectCarrierAccount = () => {
|
|
35420
35446
|
const { client } = useShipEngine();
|
|
35421
35447
|
return reactQuery.useMutation({
|
|
35422
|
-
mutationFn: (_0) => __async$
|
|
35448
|
+
mutationFn: (_0) => __async$H(void 0, [_0], function* ({ carrierName, formData }) {
|
|
35423
35449
|
const result = yield client.connections.connectCarrier(carrierName, formData);
|
|
35424
35450
|
return result.data;
|
|
35425
35451
|
}),
|
|
@@ -35439,33 +35465,33 @@ const useCarrierConnectionsServicesList = (carrierCode) => {
|
|
|
35439
35465
|
});
|
|
35440
35466
|
};
|
|
35441
35467
|
|
|
35442
|
-
var __defProp$
|
|
35443
|
-
var __defProps$
|
|
35444
|
-
var __getOwnPropDescs$
|
|
35445
|
-
var __getOwnPropSymbols$
|
|
35446
|
-
var __hasOwnProp$
|
|
35447
|
-
var __propIsEnum$
|
|
35448
|
-
var __defNormalProp$
|
|
35449
|
-
var __spreadValues$
|
|
35468
|
+
var __defProp$q = Object.defineProperty;
|
|
35469
|
+
var __defProps$n = Object.defineProperties;
|
|
35470
|
+
var __getOwnPropDescs$n = Object.getOwnPropertyDescriptors;
|
|
35471
|
+
var __getOwnPropSymbols$x = Object.getOwnPropertySymbols;
|
|
35472
|
+
var __hasOwnProp$x = Object.prototype.hasOwnProperty;
|
|
35473
|
+
var __propIsEnum$x = Object.prototype.propertyIsEnumerable;
|
|
35474
|
+
var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
35475
|
+
var __spreadValues$q = (a, b) => {
|
|
35450
35476
|
for (var prop in b || (b = {}))
|
|
35451
|
-
if (__hasOwnProp$
|
|
35452
|
-
__defNormalProp$
|
|
35453
|
-
if (__getOwnPropSymbols$
|
|
35454
|
-
for (var prop of __getOwnPropSymbols$
|
|
35455
|
-
if (__propIsEnum$
|
|
35456
|
-
__defNormalProp$
|
|
35477
|
+
if (__hasOwnProp$x.call(b, prop))
|
|
35478
|
+
__defNormalProp$q(a, prop, b[prop]);
|
|
35479
|
+
if (__getOwnPropSymbols$x)
|
|
35480
|
+
for (var prop of __getOwnPropSymbols$x(b)) {
|
|
35481
|
+
if (__propIsEnum$x.call(b, prop))
|
|
35482
|
+
__defNormalProp$q(a, prop, b[prop]);
|
|
35457
35483
|
}
|
|
35458
35484
|
return a;
|
|
35459
35485
|
};
|
|
35460
|
-
var __spreadProps$
|
|
35486
|
+
var __spreadProps$n = (a, b) => __defProps$n(a, __getOwnPropDescs$n(b));
|
|
35461
35487
|
var __objRest$i = (source, exclude) => {
|
|
35462
35488
|
var target = {};
|
|
35463
35489
|
for (var prop in source)
|
|
35464
|
-
if (__hasOwnProp$
|
|
35490
|
+
if (__hasOwnProp$x.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
35465
35491
|
target[prop] = source[prop];
|
|
35466
|
-
if (source != null && __getOwnPropSymbols$
|
|
35467
|
-
for (var prop of __getOwnPropSymbols$
|
|
35468
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
35492
|
+
if (source != null && __getOwnPropSymbols$x)
|
|
35493
|
+
for (var prop of __getOwnPropSymbols$x(source)) {
|
|
35494
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$x.call(source, prop))
|
|
35469
35495
|
target[prop] = source[prop];
|
|
35470
35496
|
}
|
|
35471
35497
|
return target;
|
|
@@ -35478,7 +35504,7 @@ const useGetConnectionsCarrierSettings = (_a) => {
|
|
|
35478
35504
|
]);
|
|
35479
35505
|
const { client } = useShipEngine();
|
|
35480
35506
|
const { carrierName, carrierId } = queryFnParams;
|
|
35481
|
-
return reactQuery.useQuery(__spreadProps$
|
|
35507
|
+
return reactQuery.useQuery(__spreadProps$n(__spreadValues$q({}, params), {
|
|
35482
35508
|
onError,
|
|
35483
35509
|
queryFn: () => client.connections.getCarrierSettings(carrierName, carrierId),
|
|
35484
35510
|
queryKey: ["useGetConnectionsCarrierSettings", carrierName, carrierId],
|
|
@@ -35486,26 +35512,26 @@ const useGetConnectionsCarrierSettings = (_a) => {
|
|
|
35486
35512
|
}));
|
|
35487
35513
|
};
|
|
35488
35514
|
|
|
35489
|
-
var __defProp$
|
|
35490
|
-
var __defProps$
|
|
35491
|
-
var __getOwnPropDescs$
|
|
35492
|
-
var __getOwnPropSymbols$
|
|
35493
|
-
var __hasOwnProp$
|
|
35494
|
-
var __propIsEnum$
|
|
35495
|
-
var __defNormalProp$
|
|
35496
|
-
var __spreadValues$
|
|
35515
|
+
var __defProp$p = Object.defineProperty;
|
|
35516
|
+
var __defProps$m = Object.defineProperties;
|
|
35517
|
+
var __getOwnPropDescs$m = Object.getOwnPropertyDescriptors;
|
|
35518
|
+
var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
|
|
35519
|
+
var __hasOwnProp$w = Object.prototype.hasOwnProperty;
|
|
35520
|
+
var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
|
|
35521
|
+
var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
35522
|
+
var __spreadValues$p = (a, b) => {
|
|
35497
35523
|
for (var prop in b || (b = {}))
|
|
35498
|
-
if (__hasOwnProp$
|
|
35499
|
-
__defNormalProp$
|
|
35500
|
-
if (__getOwnPropSymbols$
|
|
35501
|
-
for (var prop of __getOwnPropSymbols$
|
|
35502
|
-
if (__propIsEnum$
|
|
35503
|
-
__defNormalProp$
|
|
35524
|
+
if (__hasOwnProp$w.call(b, prop))
|
|
35525
|
+
__defNormalProp$p(a, prop, b[prop]);
|
|
35526
|
+
if (__getOwnPropSymbols$w)
|
|
35527
|
+
for (var prop of __getOwnPropSymbols$w(b)) {
|
|
35528
|
+
if (__propIsEnum$w.call(b, prop))
|
|
35529
|
+
__defNormalProp$p(a, prop, b[prop]);
|
|
35504
35530
|
}
|
|
35505
35531
|
return a;
|
|
35506
35532
|
};
|
|
35507
|
-
var __spreadProps$
|
|
35508
|
-
var __async$
|
|
35533
|
+
var __spreadProps$m = (a, b) => __defProps$m(a, __getOwnPropDescs$m(b));
|
|
35534
|
+
var __async$G = (__this, __arguments, generator) => {
|
|
35509
35535
|
return new Promise((resolve, reject) => {
|
|
35510
35536
|
var fulfilled = (value) => {
|
|
35511
35537
|
try {
|
|
@@ -35527,8 +35553,8 @@ var __async$F = (__this, __arguments, generator) => {
|
|
|
35527
35553
|
};
|
|
35528
35554
|
const useUpdateConnectionsCarrierSettings = (params) => {
|
|
35529
35555
|
const { client } = useShipEngine();
|
|
35530
|
-
return reactQuery.useMutation(__spreadProps$
|
|
35531
|
-
mutationFn: (_0) => __async$
|
|
35556
|
+
return reactQuery.useMutation(__spreadProps$m(__spreadValues$p({}, params), {
|
|
35557
|
+
mutationFn: (_0) => __async$G(void 0, [_0], function* ({
|
|
35532
35558
|
carrierName,
|
|
35533
35559
|
carrierId,
|
|
35534
35560
|
formData
|
|
@@ -35555,7 +35581,7 @@ const useListCustomPackageTypes = () => {
|
|
|
35555
35581
|
});
|
|
35556
35582
|
};
|
|
35557
35583
|
|
|
35558
|
-
var __async$
|
|
35584
|
+
var __async$F = (__this, __arguments, generator) => {
|
|
35559
35585
|
return new Promise((resolve, reject) => {
|
|
35560
35586
|
var fulfilled = (value) => {
|
|
35561
35587
|
try {
|
|
@@ -35578,7 +35604,7 @@ var __async$E = (__this, __arguments, generator) => {
|
|
|
35578
35604
|
const useCreateFundingSource = () => {
|
|
35579
35605
|
const { client } = useShipEngine();
|
|
35580
35606
|
return reactQuery.useMutation({
|
|
35581
|
-
mutationFn: (fundingSource) => __async$
|
|
35607
|
+
mutationFn: (fundingSource) => __async$F(void 0, null, function* () {
|
|
35582
35608
|
const result = yield client.fundingSources.create(fundingSource);
|
|
35583
35609
|
return result.data;
|
|
35584
35610
|
}),
|
|
@@ -35587,7 +35613,7 @@ const useCreateFundingSource = () => {
|
|
|
35587
35613
|
});
|
|
35588
35614
|
};
|
|
35589
35615
|
|
|
35590
|
-
var __async$
|
|
35616
|
+
var __async$E = (__this, __arguments, generator) => {
|
|
35591
35617
|
return new Promise((resolve, reject) => {
|
|
35592
35618
|
var fulfilled = (value) => {
|
|
35593
35619
|
try {
|
|
@@ -35610,7 +35636,7 @@ var __async$D = (__this, __arguments, generator) => {
|
|
|
35610
35636
|
const useFundingSourcesAddFunds = () => {
|
|
35611
35637
|
const { client } = useShipEngine();
|
|
35612
35638
|
return reactQuery.useMutation({
|
|
35613
|
-
mutationFn: (_0) => __async$
|
|
35639
|
+
mutationFn: (_0) => __async$E(void 0, [_0], function* ({ funds, fundingSourceId }) {
|
|
35614
35640
|
const result = yield client.fundingSources.addFunds(funds, fundingSourceId);
|
|
35615
35641
|
return result.data;
|
|
35616
35642
|
}),
|
|
@@ -35639,7 +35665,7 @@ const useListFundingSources = () => {
|
|
|
35639
35665
|
});
|
|
35640
35666
|
};
|
|
35641
35667
|
|
|
35642
|
-
var __async$
|
|
35668
|
+
var __async$D = (__this, __arguments, generator) => {
|
|
35643
35669
|
return new Promise((resolve, reject) => {
|
|
35644
35670
|
var fulfilled = (value) => {
|
|
35645
35671
|
try {
|
|
@@ -35662,7 +35688,7 @@ var __async$C = (__this, __arguments, generator) => {
|
|
|
35662
35688
|
const useRegisterCarrier = () => {
|
|
35663
35689
|
const { client } = useShipEngine();
|
|
35664
35690
|
return reactQuery.useMutation({
|
|
35665
|
-
mutationFn: (carrier) => __async$
|
|
35691
|
+
mutationFn: (carrier) => __async$D(void 0, null, function* () {
|
|
35666
35692
|
const result = yield client.fundingSources.registerCarrier(carrier);
|
|
35667
35693
|
return result.data;
|
|
35668
35694
|
}),
|
|
@@ -35671,7 +35697,7 @@ const useRegisterCarrier = () => {
|
|
|
35671
35697
|
});
|
|
35672
35698
|
};
|
|
35673
35699
|
|
|
35674
|
-
var __async$
|
|
35700
|
+
var __async$C = (__this, __arguments, generator) => {
|
|
35675
35701
|
return new Promise((resolve, reject) => {
|
|
35676
35702
|
var fulfilled = (value) => {
|
|
35677
35703
|
try {
|
|
@@ -35694,7 +35720,7 @@ var __async$B = (__this, __arguments, generator) => {
|
|
|
35694
35720
|
const useUpdateFundingSource = () => {
|
|
35695
35721
|
const { client } = useShipEngine();
|
|
35696
35722
|
return reactQuery.useMutation({
|
|
35697
|
-
mutationFn: (_0) => __async$
|
|
35723
|
+
mutationFn: (_0) => __async$C(void 0, [_0], function* ({
|
|
35698
35724
|
billingInfo,
|
|
35699
35725
|
creditCardInfo,
|
|
35700
35726
|
fundingSourceId,
|
|
@@ -35735,29 +35761,29 @@ const useGetFundingSourceTransactions = (fundingSourceId, params) => {
|
|
|
35735
35761
|
});
|
|
35736
35762
|
};
|
|
35737
35763
|
|
|
35738
|
-
var __defProp$
|
|
35739
|
-
var __defProps$
|
|
35740
|
-
var __getOwnPropDescs$
|
|
35741
|
-
var __getOwnPropSymbols$
|
|
35742
|
-
var __hasOwnProp$
|
|
35743
|
-
var __propIsEnum$
|
|
35744
|
-
var __defNormalProp$
|
|
35745
|
-
var __spreadValues$
|
|
35764
|
+
var __defProp$o = Object.defineProperty;
|
|
35765
|
+
var __defProps$l = Object.defineProperties;
|
|
35766
|
+
var __getOwnPropDescs$l = Object.getOwnPropertyDescriptors;
|
|
35767
|
+
var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
|
|
35768
|
+
var __hasOwnProp$v = Object.prototype.hasOwnProperty;
|
|
35769
|
+
var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
|
|
35770
|
+
var __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
35771
|
+
var __spreadValues$o = (a, b) => {
|
|
35746
35772
|
for (var prop in b || (b = {}))
|
|
35747
|
-
if (__hasOwnProp$
|
|
35748
|
-
__defNormalProp$
|
|
35749
|
-
if (__getOwnPropSymbols$
|
|
35750
|
-
for (var prop of __getOwnPropSymbols$
|
|
35751
|
-
if (__propIsEnum$
|
|
35752
|
-
__defNormalProp$
|
|
35773
|
+
if (__hasOwnProp$v.call(b, prop))
|
|
35774
|
+
__defNormalProp$o(a, prop, b[prop]);
|
|
35775
|
+
if (__getOwnPropSymbols$v)
|
|
35776
|
+
for (var prop of __getOwnPropSymbols$v(b)) {
|
|
35777
|
+
if (__propIsEnum$v.call(b, prop))
|
|
35778
|
+
__defNormalProp$o(a, prop, b[prop]);
|
|
35753
35779
|
}
|
|
35754
35780
|
return a;
|
|
35755
35781
|
};
|
|
35756
|
-
var __spreadProps$
|
|
35782
|
+
var __spreadProps$l = (a, b) => __defProps$l(a, __getOwnPropDescs$l(b));
|
|
35757
35783
|
const useGetInsuranceFundingSourceAcceptedTerms = (params) => {
|
|
35758
35784
|
const { client } = useShipEngine();
|
|
35759
|
-
const queryParams = __spreadValues$
|
|
35760
|
-
return reactQuery.useQuery(__spreadProps$
|
|
35785
|
+
const queryParams = __spreadValues$o({}, params);
|
|
35786
|
+
return reactQuery.useQuery(__spreadProps$l(__spreadValues$o({}, queryParams), {
|
|
35761
35787
|
onError,
|
|
35762
35788
|
queryFn: () => client.fundingSources.insuranceAcceptedTerms(),
|
|
35763
35789
|
queryKey: ["useGetInsuranceFundingSourceAcceptedTerms"],
|
|
@@ -35780,22 +35806,22 @@ const useGetInsuranceAccount = (insuranceProvider) => {
|
|
|
35780
35806
|
});
|
|
35781
35807
|
};
|
|
35782
35808
|
|
|
35783
|
-
var __getOwnPropSymbols$
|
|
35784
|
-
var __hasOwnProp$
|
|
35785
|
-
var __propIsEnum$
|
|
35809
|
+
var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
|
|
35810
|
+
var __hasOwnProp$u = Object.prototype.hasOwnProperty;
|
|
35811
|
+
var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
|
|
35786
35812
|
var __objRest$h = (source, exclude) => {
|
|
35787
35813
|
var target = {};
|
|
35788
35814
|
for (var prop in source)
|
|
35789
|
-
if (__hasOwnProp$
|
|
35815
|
+
if (__hasOwnProp$u.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
35790
35816
|
target[prop] = source[prop];
|
|
35791
|
-
if (source != null && __getOwnPropSymbols$
|
|
35792
|
-
for (var prop of __getOwnPropSymbols$
|
|
35793
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
35817
|
+
if (source != null && __getOwnPropSymbols$u)
|
|
35818
|
+
for (var prop of __getOwnPropSymbols$u(source)) {
|
|
35819
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$u.call(source, prop))
|
|
35794
35820
|
target[prop] = source[prop];
|
|
35795
35821
|
}
|
|
35796
35822
|
return target;
|
|
35797
35823
|
};
|
|
35798
|
-
var __async$
|
|
35824
|
+
var __async$B = (__this, __arguments, generator) => {
|
|
35799
35825
|
return new Promise((resolve, reject) => {
|
|
35800
35826
|
var fulfilled = (value) => {
|
|
35801
35827
|
try {
|
|
@@ -35818,7 +35844,7 @@ var __async$A = (__this, __arguments, generator) => {
|
|
|
35818
35844
|
const useAddInsuranceFunds = () => {
|
|
35819
35845
|
const { client } = useShipEngine();
|
|
35820
35846
|
return reactQuery.useMutation({
|
|
35821
|
-
mutationFn: (_a) => __async$
|
|
35847
|
+
mutationFn: (_a) => __async$B(void 0, null, function* () {
|
|
35822
35848
|
var _b = _a, { insuranceProvider } = _b, rest = __objRest$h(_b, ["insuranceProvider"]);
|
|
35823
35849
|
const result = yield client.insurance.addFunds(insuranceProvider, rest);
|
|
35824
35850
|
return result.data;
|
|
@@ -35828,26 +35854,26 @@ const useAddInsuranceFunds = () => {
|
|
|
35828
35854
|
});
|
|
35829
35855
|
};
|
|
35830
35856
|
|
|
35831
|
-
var __defProp$
|
|
35832
|
-
var __defProps$
|
|
35833
|
-
var __getOwnPropDescs$
|
|
35834
|
-
var __getOwnPropSymbols$
|
|
35835
|
-
var __hasOwnProp$
|
|
35836
|
-
var __propIsEnum$
|
|
35837
|
-
var __defNormalProp$
|
|
35838
|
-
var __spreadValues$
|
|
35857
|
+
var __defProp$n = Object.defineProperty;
|
|
35858
|
+
var __defProps$k = Object.defineProperties;
|
|
35859
|
+
var __getOwnPropDescs$k = Object.getOwnPropertyDescriptors;
|
|
35860
|
+
var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
|
|
35861
|
+
var __hasOwnProp$t = Object.prototype.hasOwnProperty;
|
|
35862
|
+
var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
|
|
35863
|
+
var __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
35864
|
+
var __spreadValues$n = (a, b) => {
|
|
35839
35865
|
for (var prop in b || (b = {}))
|
|
35840
|
-
if (__hasOwnProp$
|
|
35841
|
-
__defNormalProp$
|
|
35842
|
-
if (__getOwnPropSymbols$
|
|
35843
|
-
for (var prop of __getOwnPropSymbols$
|
|
35844
|
-
if (__propIsEnum$
|
|
35845
|
-
__defNormalProp$
|
|
35866
|
+
if (__hasOwnProp$t.call(b, prop))
|
|
35867
|
+
__defNormalProp$n(a, prop, b[prop]);
|
|
35868
|
+
if (__getOwnPropSymbols$t)
|
|
35869
|
+
for (var prop of __getOwnPropSymbols$t(b)) {
|
|
35870
|
+
if (__propIsEnum$t.call(b, prop))
|
|
35871
|
+
__defNormalProp$n(a, prop, b[prop]);
|
|
35846
35872
|
}
|
|
35847
35873
|
return a;
|
|
35848
35874
|
};
|
|
35849
|
-
var __spreadProps$
|
|
35850
|
-
var __async$
|
|
35875
|
+
var __spreadProps$k = (a, b) => __defProps$k(a, __getOwnPropDescs$k(b));
|
|
35876
|
+
var __async$A = (__this, __arguments, generator) => {
|
|
35851
35877
|
return new Promise((resolve, reject) => {
|
|
35852
35878
|
var fulfilled = (value) => {
|
|
35853
35879
|
try {
|
|
@@ -35869,8 +35895,8 @@ var __async$z = (__this, __arguments, generator) => {
|
|
|
35869
35895
|
};
|
|
35870
35896
|
const useCreateInvoiceAddress = (params) => {
|
|
35871
35897
|
const { client } = useShipEngine();
|
|
35872
|
-
return reactQuery.useMutation(__spreadProps$
|
|
35873
|
-
mutationFn: (invoiceAddress) => __async$
|
|
35898
|
+
return reactQuery.useMutation(__spreadProps$k(__spreadValues$n({}, params), {
|
|
35899
|
+
mutationFn: (invoiceAddress) => __async$A(void 0, null, function* () {
|
|
35874
35900
|
const result = yield client.invoiceAddress.create(invoiceAddress);
|
|
35875
35901
|
return result.data;
|
|
35876
35902
|
}),
|
|
@@ -35879,26 +35905,26 @@ const useCreateInvoiceAddress = (params) => {
|
|
|
35879
35905
|
}));
|
|
35880
35906
|
};
|
|
35881
35907
|
|
|
35882
|
-
var __defProp$
|
|
35883
|
-
var __defProps$
|
|
35884
|
-
var __getOwnPropDescs$
|
|
35885
|
-
var __getOwnPropSymbols$
|
|
35886
|
-
var __hasOwnProp$
|
|
35887
|
-
var __propIsEnum$
|
|
35888
|
-
var __defNormalProp$
|
|
35889
|
-
var __spreadValues$
|
|
35908
|
+
var __defProp$m = Object.defineProperty;
|
|
35909
|
+
var __defProps$j = Object.defineProperties;
|
|
35910
|
+
var __getOwnPropDescs$j = Object.getOwnPropertyDescriptors;
|
|
35911
|
+
var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
|
|
35912
|
+
var __hasOwnProp$s = Object.prototype.hasOwnProperty;
|
|
35913
|
+
var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
|
|
35914
|
+
var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
35915
|
+
var __spreadValues$m = (a, b) => {
|
|
35890
35916
|
for (var prop in b || (b = {}))
|
|
35891
|
-
if (__hasOwnProp$
|
|
35892
|
-
__defNormalProp$
|
|
35893
|
-
if (__getOwnPropSymbols$
|
|
35894
|
-
for (var prop of __getOwnPropSymbols$
|
|
35895
|
-
if (__propIsEnum$
|
|
35896
|
-
__defNormalProp$
|
|
35917
|
+
if (__hasOwnProp$s.call(b, prop))
|
|
35918
|
+
__defNormalProp$m(a, prop, b[prop]);
|
|
35919
|
+
if (__getOwnPropSymbols$s)
|
|
35920
|
+
for (var prop of __getOwnPropSymbols$s(b)) {
|
|
35921
|
+
if (__propIsEnum$s.call(b, prop))
|
|
35922
|
+
__defNormalProp$m(a, prop, b[prop]);
|
|
35897
35923
|
}
|
|
35898
35924
|
return a;
|
|
35899
35925
|
};
|
|
35900
|
-
var __spreadProps$
|
|
35901
|
-
var __async$
|
|
35926
|
+
var __spreadProps$j = (a, b) => __defProps$j(a, __getOwnPropDescs$j(b));
|
|
35927
|
+
var __async$z = (__this, __arguments, generator) => {
|
|
35902
35928
|
return new Promise((resolve, reject) => {
|
|
35903
35929
|
var fulfilled = (value) => {
|
|
35904
35930
|
try {
|
|
@@ -35920,8 +35946,8 @@ var __async$y = (__this, __arguments, generator) => {
|
|
|
35920
35946
|
};
|
|
35921
35947
|
const useUpdateInvoiceAddress = (params) => {
|
|
35922
35948
|
const { client } = useShipEngine();
|
|
35923
|
-
return reactQuery.useMutation(__spreadProps$
|
|
35924
|
-
mutationFn: (invoiceAddress) => __async$
|
|
35949
|
+
return reactQuery.useMutation(__spreadProps$j(__spreadValues$m({}, params), {
|
|
35950
|
+
mutationFn: (invoiceAddress) => __async$z(void 0, null, function* () {
|
|
35925
35951
|
const result = yield client.invoiceAddress.update(invoiceAddress);
|
|
35926
35952
|
return result.data;
|
|
35927
35953
|
}),
|
|
@@ -35930,28 +35956,28 @@ const useUpdateInvoiceAddress = (params) => {
|
|
|
35930
35956
|
}));
|
|
35931
35957
|
};
|
|
35932
35958
|
|
|
35933
|
-
var __defProp$
|
|
35934
|
-
var __defProps$
|
|
35935
|
-
var __getOwnPropDescs$
|
|
35936
|
-
var __getOwnPropSymbols$
|
|
35937
|
-
var __hasOwnProp$
|
|
35938
|
-
var __propIsEnum$
|
|
35939
|
-
var __defNormalProp$
|
|
35940
|
-
var __spreadValues$
|
|
35941
|
-
for (var prop in b || (b = {}))
|
|
35942
|
-
if (__hasOwnProp$
|
|
35943
|
-
__defNormalProp$
|
|
35944
|
-
if (__getOwnPropSymbols$
|
|
35945
|
-
for (var prop of __getOwnPropSymbols$
|
|
35946
|
-
if (__propIsEnum$
|
|
35947
|
-
__defNormalProp$
|
|
35959
|
+
var __defProp$l = Object.defineProperty;
|
|
35960
|
+
var __defProps$i = Object.defineProperties;
|
|
35961
|
+
var __getOwnPropDescs$i = Object.getOwnPropertyDescriptors;
|
|
35962
|
+
var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
|
|
35963
|
+
var __hasOwnProp$r = Object.prototype.hasOwnProperty;
|
|
35964
|
+
var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
|
|
35965
|
+
var __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
35966
|
+
var __spreadValues$l = (a, b) => {
|
|
35967
|
+
for (var prop in b || (b = {}))
|
|
35968
|
+
if (__hasOwnProp$r.call(b, prop))
|
|
35969
|
+
__defNormalProp$l(a, prop, b[prop]);
|
|
35970
|
+
if (__getOwnPropSymbols$r)
|
|
35971
|
+
for (var prop of __getOwnPropSymbols$r(b)) {
|
|
35972
|
+
if (__propIsEnum$r.call(b, prop))
|
|
35973
|
+
__defNormalProp$l(a, prop, b[prop]);
|
|
35948
35974
|
}
|
|
35949
35975
|
return a;
|
|
35950
35976
|
};
|
|
35951
|
-
var __spreadProps$
|
|
35977
|
+
var __spreadProps$i = (a, b) => __defProps$i(a, __getOwnPropDescs$i(b));
|
|
35952
35978
|
const useGetInvoiceAddress = (params) => {
|
|
35953
35979
|
const { client } = useShipEngine();
|
|
35954
|
-
return reactQuery.useQuery(__spreadProps$
|
|
35980
|
+
return reactQuery.useQuery(__spreadProps$i(__spreadValues$l({}, params), {
|
|
35955
35981
|
onError,
|
|
35956
35982
|
queryFn: () => client.invoiceAddress.get(),
|
|
35957
35983
|
queryKey: ["useGetInvoiceAddress"],
|
|
@@ -35959,22 +35985,22 @@ const useGetInvoiceAddress = (params) => {
|
|
|
35959
35985
|
}));
|
|
35960
35986
|
};
|
|
35961
35987
|
|
|
35962
|
-
var __getOwnPropSymbols$
|
|
35963
|
-
var __hasOwnProp$
|
|
35964
|
-
var __propIsEnum$
|
|
35988
|
+
var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
|
|
35989
|
+
var __hasOwnProp$q = Object.prototype.hasOwnProperty;
|
|
35990
|
+
var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
|
|
35965
35991
|
var __objRest$g = (source, exclude) => {
|
|
35966
35992
|
var target = {};
|
|
35967
35993
|
for (var prop in source)
|
|
35968
|
-
if (__hasOwnProp$
|
|
35994
|
+
if (__hasOwnProp$q.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
35969
35995
|
target[prop] = source[prop];
|
|
35970
|
-
if (source != null && __getOwnPropSymbols$
|
|
35971
|
-
for (var prop of __getOwnPropSymbols$
|
|
35972
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
35996
|
+
if (source != null && __getOwnPropSymbols$q)
|
|
35997
|
+
for (var prop of __getOwnPropSymbols$q(source)) {
|
|
35998
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$q.call(source, prop))
|
|
35973
35999
|
target[prop] = source[prop];
|
|
35974
36000
|
}
|
|
35975
36001
|
return target;
|
|
35976
36002
|
};
|
|
35977
|
-
var __async$
|
|
36003
|
+
var __async$y = (__this, __arguments, generator) => {
|
|
35978
36004
|
return new Promise((resolve, reject) => {
|
|
35979
36005
|
var fulfilled = (value) => {
|
|
35980
36006
|
try {
|
|
@@ -35997,7 +36023,7 @@ var __async$x = (__this, __arguments, generator) => {
|
|
|
35997
36023
|
const useCreateLabel = () => {
|
|
35998
36024
|
const { client } = useShipEngine();
|
|
35999
36025
|
return reactQuery.useMutation({
|
|
36000
|
-
mutationFn: (_a) => __async$
|
|
36026
|
+
mutationFn: (_a) => __async$y(void 0, null, function* () {
|
|
36001
36027
|
var _b = _a, { rateId } = _b, options = __objRest$g(_b, ["rateId"]);
|
|
36002
36028
|
const result = yield client.labels.createByRateId(rateId, options);
|
|
36003
36029
|
return result.data;
|
|
@@ -36022,41 +36048,41 @@ const useGetLabel = (labelId) => {
|
|
|
36022
36048
|
});
|
|
36023
36049
|
};
|
|
36024
36050
|
|
|
36025
|
-
var __defProp$
|
|
36026
|
-
var __defProps$
|
|
36027
|
-
var __getOwnPropDescs$
|
|
36028
|
-
var __getOwnPropSymbols$
|
|
36029
|
-
var __hasOwnProp$
|
|
36030
|
-
var __propIsEnum$
|
|
36031
|
-
var __defNormalProp$
|
|
36032
|
-
var __spreadValues$
|
|
36051
|
+
var __defProp$k = Object.defineProperty;
|
|
36052
|
+
var __defProps$h = Object.defineProperties;
|
|
36053
|
+
var __getOwnPropDescs$h = Object.getOwnPropertyDescriptors;
|
|
36054
|
+
var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
|
|
36055
|
+
var __hasOwnProp$p = Object.prototype.hasOwnProperty;
|
|
36056
|
+
var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
|
|
36057
|
+
var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
36058
|
+
var __spreadValues$k = (a, b) => {
|
|
36033
36059
|
for (var prop in b || (b = {}))
|
|
36034
|
-
if (__hasOwnProp$
|
|
36035
|
-
__defNormalProp$
|
|
36036
|
-
if (__getOwnPropSymbols$
|
|
36037
|
-
for (var prop of __getOwnPropSymbols$
|
|
36038
|
-
if (__propIsEnum$
|
|
36039
|
-
__defNormalProp$
|
|
36060
|
+
if (__hasOwnProp$p.call(b, prop))
|
|
36061
|
+
__defNormalProp$k(a, prop, b[prop]);
|
|
36062
|
+
if (__getOwnPropSymbols$p)
|
|
36063
|
+
for (var prop of __getOwnPropSymbols$p(b)) {
|
|
36064
|
+
if (__propIsEnum$p.call(b, prop))
|
|
36065
|
+
__defNormalProp$k(a, prop, b[prop]);
|
|
36040
36066
|
}
|
|
36041
36067
|
return a;
|
|
36042
36068
|
};
|
|
36043
|
-
var __spreadProps$
|
|
36069
|
+
var __spreadProps$h = (a, b) => __defProps$h(a, __getOwnPropDescs$h(b));
|
|
36044
36070
|
var __objRest$f = (source, exclude) => {
|
|
36045
36071
|
var target = {};
|
|
36046
36072
|
for (var prop in source)
|
|
36047
|
-
if (__hasOwnProp$
|
|
36073
|
+
if (__hasOwnProp$p.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
36048
36074
|
target[prop] = source[prop];
|
|
36049
|
-
if (source != null && __getOwnPropSymbols$
|
|
36050
|
-
for (var prop of __getOwnPropSymbols$
|
|
36051
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
36075
|
+
if (source != null && __getOwnPropSymbols$p)
|
|
36076
|
+
for (var prop of __getOwnPropSymbols$p(source)) {
|
|
36077
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$p.call(source, prop))
|
|
36052
36078
|
target[prop] = source[prop];
|
|
36053
36079
|
}
|
|
36054
36080
|
return target;
|
|
36055
36081
|
};
|
|
36056
36082
|
const useListLabels = (params) => {
|
|
36057
36083
|
const { client } = useShipEngine();
|
|
36058
|
-
const _a = __spreadValues$
|
|
36059
|
-
return reactQuery.useQuery(__spreadProps$
|
|
36084
|
+
const _a = __spreadValues$k({}, params), { queryFnParams } = _a, rest = __objRest$f(_a, ["queryFnParams"]);
|
|
36085
|
+
return reactQuery.useQuery(__spreadProps$h(__spreadValues$k({}, rest), {
|
|
36060
36086
|
onError,
|
|
36061
36087
|
queryFn: () => client.labels.list(queryFnParams),
|
|
36062
36088
|
queryKey: ["useListLabels", params],
|
|
@@ -36064,7 +36090,7 @@ const useListLabels = (params) => {
|
|
|
36064
36090
|
}));
|
|
36065
36091
|
};
|
|
36066
36092
|
|
|
36067
|
-
var __async$
|
|
36093
|
+
var __async$x = (__this, __arguments, generator) => {
|
|
36068
36094
|
return new Promise((resolve, reject) => {
|
|
36069
36095
|
var fulfilled = (value) => {
|
|
36070
36096
|
try {
|
|
@@ -36087,7 +36113,7 @@ var __async$w = (__this, __arguments, generator) => {
|
|
|
36087
36113
|
const useVoidLabel = () => {
|
|
36088
36114
|
const { client } = useShipEngine();
|
|
36089
36115
|
return reactQuery.useMutation({
|
|
36090
|
-
mutationFn: (labelId) => __async$
|
|
36116
|
+
mutationFn: (labelId) => __async$x(void 0, null, function* () {
|
|
36091
36117
|
const result = yield client.labels.void(labelId);
|
|
36092
36118
|
return result.data;
|
|
36093
36119
|
}),
|
|
@@ -36096,38 +36122,38 @@ const useVoidLabel = () => {
|
|
|
36096
36122
|
});
|
|
36097
36123
|
};
|
|
36098
36124
|
|
|
36099
|
-
var __defProp$
|
|
36100
|
-
var __defProps$
|
|
36101
|
-
var __getOwnPropDescs$
|
|
36102
|
-
var __getOwnPropSymbols$
|
|
36103
|
-
var __hasOwnProp$
|
|
36104
|
-
var __propIsEnum$
|
|
36105
|
-
var __defNormalProp$
|
|
36106
|
-
var __spreadValues$
|
|
36125
|
+
var __defProp$j = Object.defineProperty;
|
|
36126
|
+
var __defProps$g = Object.defineProperties;
|
|
36127
|
+
var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
|
|
36128
|
+
var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
|
|
36129
|
+
var __hasOwnProp$o = Object.prototype.hasOwnProperty;
|
|
36130
|
+
var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
|
|
36131
|
+
var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
36132
|
+
var __spreadValues$j = (a, b) => {
|
|
36107
36133
|
for (var prop in b || (b = {}))
|
|
36108
|
-
if (__hasOwnProp$
|
|
36109
|
-
__defNormalProp$
|
|
36110
|
-
if (__getOwnPropSymbols$
|
|
36111
|
-
for (var prop of __getOwnPropSymbols$
|
|
36112
|
-
if (__propIsEnum$
|
|
36113
|
-
__defNormalProp$
|
|
36134
|
+
if (__hasOwnProp$o.call(b, prop))
|
|
36135
|
+
__defNormalProp$j(a, prop, b[prop]);
|
|
36136
|
+
if (__getOwnPropSymbols$o)
|
|
36137
|
+
for (var prop of __getOwnPropSymbols$o(b)) {
|
|
36138
|
+
if (__propIsEnum$o.call(b, prop))
|
|
36139
|
+
__defNormalProp$j(a, prop, b[prop]);
|
|
36114
36140
|
}
|
|
36115
36141
|
return a;
|
|
36116
36142
|
};
|
|
36117
|
-
var __spreadProps$
|
|
36143
|
+
var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
|
|
36118
36144
|
var __objRest$e = (source, exclude) => {
|
|
36119
36145
|
var target = {};
|
|
36120
36146
|
for (var prop in source)
|
|
36121
|
-
if (__hasOwnProp$
|
|
36147
|
+
if (__hasOwnProp$o.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
36122
36148
|
target[prop] = source[prop];
|
|
36123
|
-
if (source != null && __getOwnPropSymbols$
|
|
36124
|
-
for (var prop of __getOwnPropSymbols$
|
|
36125
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
36149
|
+
if (source != null && __getOwnPropSymbols$o)
|
|
36150
|
+
for (var prop of __getOwnPropSymbols$o(source)) {
|
|
36151
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$o.call(source, prop))
|
|
36126
36152
|
target[prop] = source[prop];
|
|
36127
36153
|
}
|
|
36128
36154
|
return target;
|
|
36129
36155
|
};
|
|
36130
|
-
var __async$
|
|
36156
|
+
var __async$w = (__this, __arguments, generator) => {
|
|
36131
36157
|
return new Promise((resolve, reject) => {
|
|
36132
36158
|
var fulfilled = (value) => {
|
|
36133
36159
|
try {
|
|
@@ -36149,8 +36175,8 @@ var __async$v = (__this, __arguments, generator) => {
|
|
|
36149
36175
|
};
|
|
36150
36176
|
const useListLabelsInfinite = (params) => {
|
|
36151
36177
|
const { client } = useShipEngine();
|
|
36152
|
-
const _a = __spreadValues$
|
|
36153
|
-
return reactQuery.useInfiniteQuery(__spreadProps$
|
|
36178
|
+
const _a = __spreadValues$j({}, params), { queryFnParams } = _a, rest = __objRest$e(_a, ["queryFnParams"]);
|
|
36179
|
+
return reactQuery.useInfiniteQuery(__spreadProps$g(__spreadValues$j({}, rest), {
|
|
36154
36180
|
getNextPageParam: (lastPage) => {
|
|
36155
36181
|
if (lastPage.page < lastPage.pages) {
|
|
36156
36182
|
return lastPage.page + 1;
|
|
@@ -36158,8 +36184,8 @@ const useListLabelsInfinite = (params) => {
|
|
|
36158
36184
|
return void 0;
|
|
36159
36185
|
},
|
|
36160
36186
|
onError,
|
|
36161
|
-
queryFn: (_0) => __async$
|
|
36162
|
-
const response = yield client.labels.list(__spreadProps$
|
|
36187
|
+
queryFn: (_0) => __async$w(void 0, [_0], function* ({ pageParam = 1 }) {
|
|
36188
|
+
const response = yield client.labels.list(__spreadProps$g(__spreadValues$j({}, queryFnParams), { page: pageParam }));
|
|
36163
36189
|
return response.data;
|
|
36164
36190
|
}),
|
|
36165
36191
|
queryKey: ["useListLabelsInfinite", params],
|
|
@@ -36173,28 +36199,28 @@ const useListLabelsInfinite = (params) => {
|
|
|
36173
36199
|
}));
|
|
36174
36200
|
};
|
|
36175
36201
|
|
|
36176
|
-
var __defProp$
|
|
36177
|
-
var __defProps$
|
|
36178
|
-
var __getOwnPropDescs$
|
|
36179
|
-
var __getOwnPropSymbols$
|
|
36180
|
-
var __hasOwnProp$
|
|
36181
|
-
var __propIsEnum$
|
|
36182
|
-
var __defNormalProp$
|
|
36183
|
-
var __spreadValues$
|
|
36202
|
+
var __defProp$i = Object.defineProperty;
|
|
36203
|
+
var __defProps$f = Object.defineProperties;
|
|
36204
|
+
var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
|
|
36205
|
+
var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
|
|
36206
|
+
var __hasOwnProp$n = Object.prototype.hasOwnProperty;
|
|
36207
|
+
var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
|
|
36208
|
+
var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
36209
|
+
var __spreadValues$i = (a, b) => {
|
|
36184
36210
|
for (var prop in b || (b = {}))
|
|
36185
|
-
if (__hasOwnProp$
|
|
36186
|
-
__defNormalProp$
|
|
36187
|
-
if (__getOwnPropSymbols$
|
|
36188
|
-
for (var prop of __getOwnPropSymbols$
|
|
36189
|
-
if (__propIsEnum$
|
|
36190
|
-
__defNormalProp$
|
|
36211
|
+
if (__hasOwnProp$n.call(b, prop))
|
|
36212
|
+
__defNormalProp$i(a, prop, b[prop]);
|
|
36213
|
+
if (__getOwnPropSymbols$n)
|
|
36214
|
+
for (var prop of __getOwnPropSymbols$n(b)) {
|
|
36215
|
+
if (__propIsEnum$n.call(b, prop))
|
|
36216
|
+
__defNormalProp$i(a, prop, b[prop]);
|
|
36191
36217
|
}
|
|
36192
36218
|
return a;
|
|
36193
36219
|
};
|
|
36194
|
-
var __spreadProps$
|
|
36220
|
+
var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
|
|
36195
36221
|
const useListOrderSources = (params) => {
|
|
36196
36222
|
const { client } = useShipEngine();
|
|
36197
|
-
return reactQuery.useQuery(__spreadProps$
|
|
36223
|
+
return reactQuery.useQuery(__spreadProps$f(__spreadValues$i({}, params), {
|
|
36198
36224
|
onError,
|
|
36199
36225
|
queryFn: () => client.orderSources.list(),
|
|
36200
36226
|
queryKey: ["useListOrderSources"],
|
|
@@ -36202,7 +36228,7 @@ const useListOrderSources = (params) => {
|
|
|
36202
36228
|
}));
|
|
36203
36229
|
};
|
|
36204
36230
|
|
|
36205
|
-
var __async$
|
|
36231
|
+
var __async$v = (__this, __arguments, generator) => {
|
|
36206
36232
|
return new Promise((resolve, reject) => {
|
|
36207
36233
|
var fulfilled = (value) => {
|
|
36208
36234
|
try {
|
|
@@ -36225,7 +36251,7 @@ var __async$u = (__this, __arguments, generator) => {
|
|
|
36225
36251
|
const useRefreshOrderSourceAsync = () => {
|
|
36226
36252
|
const { client } = useShipEngine();
|
|
36227
36253
|
return reactQuery.useMutation({
|
|
36228
|
-
mutationFn: (orderSourceId) => __async$
|
|
36254
|
+
mutationFn: (orderSourceId) => __async$v(void 0, null, function* () {
|
|
36229
36255
|
const result = yield client.orderSources.refresh(orderSourceId);
|
|
36230
36256
|
return result.data;
|
|
36231
36257
|
}),
|
|
@@ -36236,9 +36262,9 @@ const useRefreshOrderSource = () => {
|
|
|
36236
36262
|
const { client } = useShipEngine();
|
|
36237
36263
|
const { mutateAsync: refreshOrderSourceAsync } = useRefreshOrderSourceAsync();
|
|
36238
36264
|
return reactQuery.useMutation({
|
|
36239
|
-
mutationFn: (orderSourceId) => __async$
|
|
36265
|
+
mutationFn: (orderSourceId) => __async$v(void 0, null, function* () {
|
|
36240
36266
|
yield refreshOrderSourceAsync(orderSourceId);
|
|
36241
|
-
const waitResult = yield retryUntil(() => __async$
|
|
36267
|
+
const waitResult = yield retryUntil(() => __async$v(void 0, null, function* () {
|
|
36242
36268
|
const { data: checkResult } = yield client.orderSources.get(orderSourceId);
|
|
36243
36269
|
if (["preparing_update", "updating"].includes(checkResult.refreshInfo.status)) {
|
|
36244
36270
|
throw new CodedError("Order source is still refreshing");
|
|
@@ -36252,7 +36278,7 @@ const useRefreshOrderSource = () => {
|
|
|
36252
36278
|
});
|
|
36253
36279
|
};
|
|
36254
36280
|
|
|
36255
|
-
var __async$
|
|
36281
|
+
var __async$u = (__this, __arguments, generator) => {
|
|
36256
36282
|
return new Promise((resolve, reject) => {
|
|
36257
36283
|
var fulfilled = (value) => {
|
|
36258
36284
|
try {
|
|
@@ -36275,7 +36301,7 @@ var __async$t = (__this, __arguments, generator) => {
|
|
|
36275
36301
|
const useDeactivateOrderSource = () => {
|
|
36276
36302
|
const { client } = useShipEngine();
|
|
36277
36303
|
return reactQuery.useMutation({
|
|
36278
|
-
mutationFn: (orderSourceId) => __async$
|
|
36304
|
+
mutationFn: (orderSourceId) => __async$u(void 0, null, function* () {
|
|
36279
36305
|
const result = yield client.orderSources.deactivate(orderSourceId);
|
|
36280
36306
|
return result.data;
|
|
36281
36307
|
}),
|
|
@@ -36294,7 +36320,7 @@ const useListOrderSourcesConnections = () => {
|
|
|
36294
36320
|
});
|
|
36295
36321
|
};
|
|
36296
36322
|
|
|
36297
|
-
var __async$
|
|
36323
|
+
var __async$t = (__this, __arguments, generator) => {
|
|
36298
36324
|
return new Promise((resolve, reject) => {
|
|
36299
36325
|
var fulfilled = (value) => {
|
|
36300
36326
|
try {
|
|
@@ -36317,7 +36343,7 @@ var __async$s = (__this, __arguments, generator) => {
|
|
|
36317
36343
|
const useUpdateOrderSource = () => {
|
|
36318
36344
|
const { client } = useShipEngine();
|
|
36319
36345
|
return reactQuery.useMutation({
|
|
36320
|
-
mutationFn: (params) => __async$
|
|
36346
|
+
mutationFn: (params) => __async$t(void 0, null, function* () {
|
|
36321
36347
|
const result = yield client.orderSources.update(params);
|
|
36322
36348
|
return result.data;
|
|
36323
36349
|
}),
|
|
@@ -36326,7 +36352,7 @@ const useUpdateOrderSource = () => {
|
|
|
36326
36352
|
});
|
|
36327
36353
|
};
|
|
36328
36354
|
|
|
36329
|
-
var __async$
|
|
36355
|
+
var __async$s = (__this, __arguments, generator) => {
|
|
36330
36356
|
return new Promise((resolve, reject) => {
|
|
36331
36357
|
var fulfilled = (value) => {
|
|
36332
36358
|
try {
|
|
@@ -36349,7 +36375,7 @@ var __async$r = (__this, __arguments, generator) => {
|
|
|
36349
36375
|
const useCreateRateCard = () => {
|
|
36350
36376
|
const { client } = useShipEngine();
|
|
36351
36377
|
return reactQuery.useMutation({
|
|
36352
|
-
mutationFn: (rateCard) => __async$
|
|
36378
|
+
mutationFn: (rateCard) => __async$s(void 0, null, function* () {
|
|
36353
36379
|
const result = yield client.rateCards.create(rateCard);
|
|
36354
36380
|
return result.data;
|
|
36355
36381
|
}),
|
|
@@ -36396,7 +36422,7 @@ const useListRateCards = (carrierIds) => {
|
|
|
36396
36422
|
});
|
|
36397
36423
|
};
|
|
36398
36424
|
|
|
36399
|
-
var __async$
|
|
36425
|
+
var __async$r = (__this, __arguments, generator) => {
|
|
36400
36426
|
return new Promise((resolve, reject) => {
|
|
36401
36427
|
var fulfilled = (value) => {
|
|
36402
36428
|
try {
|
|
@@ -36419,7 +36445,7 @@ var __async$q = (__this, __arguments, generator) => {
|
|
|
36419
36445
|
const usePublishRateCard = () => {
|
|
36420
36446
|
const { client } = useShipEngine();
|
|
36421
36447
|
return reactQuery.useMutation({
|
|
36422
|
-
mutationFn: (rateCardId) => __async$
|
|
36448
|
+
mutationFn: (rateCardId) => __async$r(void 0, null, function* () {
|
|
36423
36449
|
return yield client.rateCards.publish(rateCardId);
|
|
36424
36450
|
}),
|
|
36425
36451
|
mutationKey: ["usePublishRateCard"],
|
|
@@ -36427,7 +36453,7 @@ const usePublishRateCard = () => {
|
|
|
36427
36453
|
});
|
|
36428
36454
|
};
|
|
36429
36455
|
|
|
36430
|
-
var __async$
|
|
36456
|
+
var __async$q = (__this, __arguments, generator) => {
|
|
36431
36457
|
return new Promise((resolve, reject) => {
|
|
36432
36458
|
var fulfilled = (value) => {
|
|
36433
36459
|
try {
|
|
@@ -36450,7 +36476,7 @@ var __async$p = (__this, __arguments, generator) => {
|
|
|
36450
36476
|
const useUpdateRateCard = () => {
|
|
36451
36477
|
const { client } = useShipEngine();
|
|
36452
36478
|
return reactQuery.useMutation({
|
|
36453
|
-
mutationFn: (rateCard) => __async$
|
|
36479
|
+
mutationFn: (rateCard) => __async$q(void 0, null, function* () {
|
|
36454
36480
|
const result = yield client.rateCards.update(rateCard);
|
|
36455
36481
|
return result.data;
|
|
36456
36482
|
}),
|
|
@@ -36459,7 +36485,7 @@ const useUpdateRateCard = () => {
|
|
|
36459
36485
|
});
|
|
36460
36486
|
};
|
|
36461
36487
|
|
|
36462
|
-
var __async$
|
|
36488
|
+
var __async$p = (__this, __arguments, generator) => {
|
|
36463
36489
|
return new Promise((resolve, reject) => {
|
|
36464
36490
|
var fulfilled = (value) => {
|
|
36465
36491
|
try {
|
|
@@ -36482,7 +36508,7 @@ var __async$o = (__this, __arguments, generator) => {
|
|
|
36482
36508
|
const useUploadRateCard = () => {
|
|
36483
36509
|
const { client } = useShipEngine();
|
|
36484
36510
|
return reactQuery.useMutation({
|
|
36485
|
-
mutationFn: (_0) => __async$
|
|
36511
|
+
mutationFn: (_0) => __async$p(void 0, [_0], function* ({ rateCardId, file }) {
|
|
36486
36512
|
const result = yield client.rateCards.upload(rateCardId, file);
|
|
36487
36513
|
return result.data;
|
|
36488
36514
|
}),
|
|
@@ -36491,7 +36517,7 @@ const useUploadRateCard = () => {
|
|
|
36491
36517
|
});
|
|
36492
36518
|
};
|
|
36493
36519
|
|
|
36494
|
-
var __async$
|
|
36520
|
+
var __async$o = (__this, __arguments, generator) => {
|
|
36495
36521
|
return new Promise((resolve, reject) => {
|
|
36496
36522
|
var fulfilled = (value) => {
|
|
36497
36523
|
try {
|
|
@@ -36514,7 +36540,7 @@ var __async$n = (__this, __arguments, generator) => {
|
|
|
36514
36540
|
const useDeleteRateCard = () => {
|
|
36515
36541
|
const { client } = useShipEngine();
|
|
36516
36542
|
return reactQuery.useMutation({
|
|
36517
|
-
mutationFn: (rateCardId) => __async$
|
|
36543
|
+
mutationFn: (rateCardId) => __async$o(void 0, null, function* () {
|
|
36518
36544
|
const result = yield client.rateCards.delete(rateCardId);
|
|
36519
36545
|
return result.data;
|
|
36520
36546
|
}),
|
|
@@ -36523,7 +36549,7 @@ const useDeleteRateCard = () => {
|
|
|
36523
36549
|
});
|
|
36524
36550
|
};
|
|
36525
36551
|
|
|
36526
|
-
var __async$
|
|
36552
|
+
var __async$n = (__this, __arguments, generator) => {
|
|
36527
36553
|
return new Promise((resolve, reject) => {
|
|
36528
36554
|
var fulfilled = (value) => {
|
|
36529
36555
|
try {
|
|
@@ -36546,7 +36572,7 @@ var __async$m = (__this, __arguments, generator) => {
|
|
|
36546
36572
|
const useCalculateRates = () => {
|
|
36547
36573
|
const { client } = useShipEngine();
|
|
36548
36574
|
return reactQuery.useMutation({
|
|
36549
|
-
mutationFn: (_0) => __async$
|
|
36575
|
+
mutationFn: (_0) => __async$n(void 0, [_0], function* ({ rateOptions, shipmentId }) {
|
|
36550
36576
|
const result = yield client.rates.calculateByShipmentId(shipmentId, rateOptions);
|
|
36551
36577
|
return result.data;
|
|
36552
36578
|
}),
|
|
@@ -36555,7 +36581,7 @@ const useCalculateRates = () => {
|
|
|
36555
36581
|
});
|
|
36556
36582
|
};
|
|
36557
36583
|
|
|
36558
|
-
var __async$
|
|
36584
|
+
var __async$m = (__this, __arguments, generator) => {
|
|
36559
36585
|
return new Promise((resolve, reject) => {
|
|
36560
36586
|
var fulfilled = (value) => {
|
|
36561
36587
|
try {
|
|
@@ -36578,7 +36604,7 @@ var __async$l = (__this, __arguments, generator) => {
|
|
|
36578
36604
|
const useRatesEstimate = () => {
|
|
36579
36605
|
const { client } = useShipEngine();
|
|
36580
36606
|
return reactQuery.useMutation({
|
|
36581
|
-
mutationFn: (_0) => __async$
|
|
36607
|
+
mutationFn: (_0) => __async$m(void 0, [_0], function* ({ rateParams }) {
|
|
36582
36608
|
const result = yield client.rates.estimate(rateParams);
|
|
36583
36609
|
return result.data;
|
|
36584
36610
|
}),
|
|
@@ -36632,22 +36658,22 @@ const useListSalesOrders = (params = {}) => {
|
|
|
36632
36658
|
});
|
|
36633
36659
|
};
|
|
36634
36660
|
|
|
36635
|
-
var __getOwnPropSymbols$
|
|
36636
|
-
var __hasOwnProp$
|
|
36637
|
-
var __propIsEnum$
|
|
36661
|
+
var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
|
|
36662
|
+
var __hasOwnProp$m = Object.prototype.hasOwnProperty;
|
|
36663
|
+
var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
|
|
36638
36664
|
var __objRest$d = (source, exclude) => {
|
|
36639
36665
|
var target = {};
|
|
36640
36666
|
for (var prop in source)
|
|
36641
|
-
if (__hasOwnProp$
|
|
36667
|
+
if (__hasOwnProp$m.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
36642
36668
|
target[prop] = source[prop];
|
|
36643
|
-
if (source != null && __getOwnPropSymbols$
|
|
36644
|
-
for (var prop of __getOwnPropSymbols$
|
|
36645
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
36669
|
+
if (source != null && __getOwnPropSymbols$m)
|
|
36670
|
+
for (var prop of __getOwnPropSymbols$m(source)) {
|
|
36671
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$m.call(source, prop))
|
|
36646
36672
|
target[prop] = source[prop];
|
|
36647
36673
|
}
|
|
36648
36674
|
return target;
|
|
36649
36675
|
};
|
|
36650
|
-
var __async$
|
|
36676
|
+
var __async$l = (__this, __arguments, generator) => {
|
|
36651
36677
|
return new Promise((resolve, reject) => {
|
|
36652
36678
|
var fulfilled = (value) => {
|
|
36653
36679
|
try {
|
|
@@ -36670,7 +36696,7 @@ var __async$k = (__this, __arguments, generator) => {
|
|
|
36670
36696
|
const useNotifySalesOrderShipped = () => {
|
|
36671
36697
|
const { client } = useShipEngine();
|
|
36672
36698
|
return reactQuery.useMutation({
|
|
36673
|
-
mutationFn: (_a) => __async$
|
|
36699
|
+
mutationFn: (_a) => __async$l(void 0, null, function* () {
|
|
36674
36700
|
var _b = _a, { salesOrderId } = _b, tracking = __objRest$d(_b, ["salesOrderId"]);
|
|
36675
36701
|
const result = yield client.salesOrders.notifyShipped(salesOrderId, tracking);
|
|
36676
36702
|
return result.data;
|
|
@@ -36680,22 +36706,22 @@ const useNotifySalesOrderShipped = () => {
|
|
|
36680
36706
|
});
|
|
36681
36707
|
};
|
|
36682
36708
|
|
|
36683
|
-
var __getOwnPropSymbols$
|
|
36684
|
-
var __hasOwnProp$
|
|
36685
|
-
var __propIsEnum$
|
|
36709
|
+
var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
|
|
36710
|
+
var __hasOwnProp$l = Object.prototype.hasOwnProperty;
|
|
36711
|
+
var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
|
|
36686
36712
|
var __objRest$c = (source, exclude) => {
|
|
36687
36713
|
var target = {};
|
|
36688
36714
|
for (var prop in source)
|
|
36689
|
-
if (__hasOwnProp$
|
|
36715
|
+
if (__hasOwnProp$l.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
36690
36716
|
target[prop] = source[prop];
|
|
36691
|
-
if (source != null && __getOwnPropSymbols$
|
|
36692
|
-
for (var prop of __getOwnPropSymbols$
|
|
36693
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
36717
|
+
if (source != null && __getOwnPropSymbols$l)
|
|
36718
|
+
for (var prop of __getOwnPropSymbols$l(source)) {
|
|
36719
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$l.call(source, prop))
|
|
36694
36720
|
target[prop] = source[prop];
|
|
36695
36721
|
}
|
|
36696
36722
|
return target;
|
|
36697
36723
|
};
|
|
36698
|
-
var __async$
|
|
36724
|
+
var __async$k = (__this, __arguments, generator) => {
|
|
36699
36725
|
return new Promise((resolve, reject) => {
|
|
36700
36726
|
var fulfilled = (value) => {
|
|
36701
36727
|
try {
|
|
@@ -36718,7 +36744,7 @@ var __async$j = (__this, __arguments, generator) => {
|
|
|
36718
36744
|
const useCreateSalesOrderShipment = () => {
|
|
36719
36745
|
const { client } = useShipEngine();
|
|
36720
36746
|
return reactQuery.useMutation({
|
|
36721
|
-
mutationFn: (_a) => __async$
|
|
36747
|
+
mutationFn: (_a) => __async$k(void 0, null, function* () {
|
|
36722
36748
|
var _b = _a, { salesOrderId } = _b, shipment = __objRest$c(_b, ["salesOrderId"]);
|
|
36723
36749
|
const result = yield client.salesOrderShipments.create(salesOrderId, shipment);
|
|
36724
36750
|
return result.data;
|
|
@@ -36755,22 +36781,22 @@ const useListSalesOrderShipments = (body) => {
|
|
|
36755
36781
|
});
|
|
36756
36782
|
};
|
|
36757
36783
|
|
|
36758
|
-
var __getOwnPropSymbols$
|
|
36759
|
-
var __hasOwnProp$
|
|
36760
|
-
var __propIsEnum$
|
|
36784
|
+
var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
|
|
36785
|
+
var __hasOwnProp$k = Object.prototype.hasOwnProperty;
|
|
36786
|
+
var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
|
|
36761
36787
|
var __objRest$b = (source, exclude) => {
|
|
36762
36788
|
var target = {};
|
|
36763
36789
|
for (var prop in source)
|
|
36764
|
-
if (__hasOwnProp$
|
|
36790
|
+
if (__hasOwnProp$k.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
36765
36791
|
target[prop] = source[prop];
|
|
36766
|
-
if (source != null && __getOwnPropSymbols$
|
|
36767
|
-
for (var prop of __getOwnPropSymbols$
|
|
36768
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
36792
|
+
if (source != null && __getOwnPropSymbols$k)
|
|
36793
|
+
for (var prop of __getOwnPropSymbols$k(source)) {
|
|
36794
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$k.call(source, prop))
|
|
36769
36795
|
target[prop] = source[prop];
|
|
36770
36796
|
}
|
|
36771
36797
|
return target;
|
|
36772
36798
|
};
|
|
36773
|
-
var __async$
|
|
36799
|
+
var __async$j = (__this, __arguments, generator) => {
|
|
36774
36800
|
return new Promise((resolve, reject) => {
|
|
36775
36801
|
var fulfilled = (value) => {
|
|
36776
36802
|
try {
|
|
@@ -36793,7 +36819,7 @@ var __async$i = (__this, __arguments, generator) => {
|
|
|
36793
36819
|
const useUpdateSalesOrderShipment = () => {
|
|
36794
36820
|
const { client } = useShipEngine();
|
|
36795
36821
|
return reactQuery.useMutation({
|
|
36796
|
-
mutationFn: (_a) => __async$
|
|
36822
|
+
mutationFn: (_a) => __async$j(void 0, null, function* () {
|
|
36797
36823
|
var _b = _a, { shipmentId } = _b, shipment = __objRest$b(_b, ["shipmentId"]);
|
|
36798
36824
|
const result = yield client.salesOrderShipments.update(shipmentId, shipment);
|
|
36799
36825
|
return result.data;
|
|
@@ -36814,26 +36840,26 @@ const useListSalesOrderShipmentsByExternalOrderId = (externalOrderId) => {
|
|
|
36814
36840
|
});
|
|
36815
36841
|
};
|
|
36816
36842
|
|
|
36817
|
-
var __defProp$
|
|
36818
|
-
var __defProps$
|
|
36819
|
-
var __getOwnPropDescs$
|
|
36820
|
-
var __getOwnPropSymbols$
|
|
36821
|
-
var __hasOwnProp$
|
|
36822
|
-
var __propIsEnum$
|
|
36823
|
-
var __defNormalProp$
|
|
36824
|
-
var __spreadValues$
|
|
36843
|
+
var __defProp$h = Object.defineProperty;
|
|
36844
|
+
var __defProps$e = Object.defineProperties;
|
|
36845
|
+
var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
|
|
36846
|
+
var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
|
|
36847
|
+
var __hasOwnProp$j = Object.prototype.hasOwnProperty;
|
|
36848
|
+
var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
|
|
36849
|
+
var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
36850
|
+
var __spreadValues$h = (a, b) => {
|
|
36825
36851
|
for (var prop in b || (b = {}))
|
|
36826
|
-
if (__hasOwnProp$
|
|
36827
|
-
__defNormalProp$
|
|
36828
|
-
if (__getOwnPropSymbols$
|
|
36829
|
-
for (var prop of __getOwnPropSymbols$
|
|
36830
|
-
if (__propIsEnum$
|
|
36831
|
-
__defNormalProp$
|
|
36852
|
+
if (__hasOwnProp$j.call(b, prop))
|
|
36853
|
+
__defNormalProp$h(a, prop, b[prop]);
|
|
36854
|
+
if (__getOwnPropSymbols$j)
|
|
36855
|
+
for (var prop of __getOwnPropSymbols$j(b)) {
|
|
36856
|
+
if (__propIsEnum$j.call(b, prop))
|
|
36857
|
+
__defNormalProp$h(a, prop, b[prop]);
|
|
36832
36858
|
}
|
|
36833
36859
|
return a;
|
|
36834
36860
|
};
|
|
36835
|
-
var __spreadProps$
|
|
36836
|
-
var __async$
|
|
36861
|
+
var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
|
|
36862
|
+
var __async$i = (__this, __arguments, generator) => {
|
|
36837
36863
|
return new Promise((resolve, reject) => {
|
|
36838
36864
|
var fulfilled = (value) => {
|
|
36839
36865
|
try {
|
|
@@ -36856,7 +36882,7 @@ var __async$h = (__this, __arguments, generator) => {
|
|
|
36856
36882
|
const useCreateShipment = () => {
|
|
36857
36883
|
const { client } = useShipEngine();
|
|
36858
36884
|
return reactQuery.useMutation({
|
|
36859
|
-
mutationFn: (shipment) => __async$
|
|
36885
|
+
mutationFn: (shipment) => __async$i(void 0, null, function* () {
|
|
36860
36886
|
var _a;
|
|
36861
36887
|
if (shipment.warehouseId === void 0 && shipment.shipFrom === void 0) {
|
|
36862
36888
|
throw new CodedError("errorMessages.noWarehouses", {
|
|
@@ -36874,7 +36900,7 @@ const useCreateShipment = () => {
|
|
|
36874
36900
|
postalCode: "",
|
|
36875
36901
|
stateProvince: ""
|
|
36876
36902
|
};
|
|
36877
|
-
return (yield client.shipments.create(__spreadProps$
|
|
36903
|
+
return (yield client.shipments.create(__spreadProps$e(__spreadValues$h({}, shipment), {
|
|
36878
36904
|
shipTo
|
|
36879
36905
|
}))).data;
|
|
36880
36906
|
}),
|
|
@@ -36883,33 +36909,33 @@ const useCreateShipment = () => {
|
|
|
36883
36909
|
});
|
|
36884
36910
|
};
|
|
36885
36911
|
|
|
36886
|
-
var __defProp$
|
|
36887
|
-
var __defProps$
|
|
36888
|
-
var __getOwnPropDescs$
|
|
36889
|
-
var __getOwnPropSymbols$
|
|
36890
|
-
var __hasOwnProp$
|
|
36891
|
-
var __propIsEnum$
|
|
36892
|
-
var __defNormalProp$
|
|
36893
|
-
var __spreadValues$
|
|
36912
|
+
var __defProp$g = Object.defineProperty;
|
|
36913
|
+
var __defProps$d = Object.defineProperties;
|
|
36914
|
+
var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
|
|
36915
|
+
var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
|
|
36916
|
+
var __hasOwnProp$i = Object.prototype.hasOwnProperty;
|
|
36917
|
+
var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
|
|
36918
|
+
var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
36919
|
+
var __spreadValues$g = (a, b) => {
|
|
36894
36920
|
for (var prop in b || (b = {}))
|
|
36895
|
-
if (__hasOwnProp$
|
|
36896
|
-
__defNormalProp$
|
|
36897
|
-
if (__getOwnPropSymbols$
|
|
36898
|
-
for (var prop of __getOwnPropSymbols$
|
|
36899
|
-
if (__propIsEnum$
|
|
36900
|
-
__defNormalProp$
|
|
36921
|
+
if (__hasOwnProp$i.call(b, prop))
|
|
36922
|
+
__defNormalProp$g(a, prop, b[prop]);
|
|
36923
|
+
if (__getOwnPropSymbols$i)
|
|
36924
|
+
for (var prop of __getOwnPropSymbols$i(b)) {
|
|
36925
|
+
if (__propIsEnum$i.call(b, prop))
|
|
36926
|
+
__defNormalProp$g(a, prop, b[prop]);
|
|
36901
36927
|
}
|
|
36902
36928
|
return a;
|
|
36903
36929
|
};
|
|
36904
|
-
var __spreadProps$
|
|
36930
|
+
var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
|
|
36905
36931
|
var __objRest$a = (source, exclude) => {
|
|
36906
36932
|
var target = {};
|
|
36907
36933
|
for (var prop in source)
|
|
36908
|
-
if (__hasOwnProp$
|
|
36934
|
+
if (__hasOwnProp$i.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
36909
36935
|
target[prop] = source[prop];
|
|
36910
|
-
if (source != null && __getOwnPropSymbols$
|
|
36911
|
-
for (var prop of __getOwnPropSymbols$
|
|
36912
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
36936
|
+
if (source != null && __getOwnPropSymbols$i)
|
|
36937
|
+
for (var prop of __getOwnPropSymbols$i(source)) {
|
|
36938
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$i.call(source, prop))
|
|
36913
36939
|
target[prop] = source[prop];
|
|
36914
36940
|
}
|
|
36915
36941
|
return target;
|
|
@@ -36919,7 +36945,7 @@ const useGetShipmentRates = (params) => {
|
|
|
36919
36945
|
const _a = params, { queryFnParams } = _a, rest = __objRest$a(_a, ["queryFnParams"]);
|
|
36920
36946
|
const shipmentId = queryFnParams == null ? void 0 : queryFnParams.shipmentId;
|
|
36921
36947
|
const createdAtStart = queryFnParams == null ? void 0 : queryFnParams.createdAtStart;
|
|
36922
|
-
return reactQuery.useQuery(__spreadProps$
|
|
36948
|
+
return reactQuery.useQuery(__spreadProps$d(__spreadValues$g({
|
|
36923
36949
|
enabled: shipmentId !== void 0
|
|
36924
36950
|
}, rest), {
|
|
36925
36951
|
onError,
|
|
@@ -36934,33 +36960,33 @@ const useGetShipmentRates = (params) => {
|
|
|
36934
36960
|
}));
|
|
36935
36961
|
};
|
|
36936
36962
|
|
|
36937
|
-
var __defProp$
|
|
36938
|
-
var __defProps$
|
|
36939
|
-
var __getOwnPropDescs$
|
|
36940
|
-
var __getOwnPropSymbols$
|
|
36941
|
-
var __hasOwnProp$
|
|
36942
|
-
var __propIsEnum$
|
|
36943
|
-
var __defNormalProp$
|
|
36944
|
-
var __spreadValues$
|
|
36963
|
+
var __defProp$f = Object.defineProperty;
|
|
36964
|
+
var __defProps$c = Object.defineProperties;
|
|
36965
|
+
var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
|
|
36966
|
+
var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
|
|
36967
|
+
var __hasOwnProp$h = Object.prototype.hasOwnProperty;
|
|
36968
|
+
var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
|
|
36969
|
+
var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
36970
|
+
var __spreadValues$f = (a, b) => {
|
|
36945
36971
|
for (var prop in b || (b = {}))
|
|
36946
|
-
if (__hasOwnProp$
|
|
36947
|
-
__defNormalProp$
|
|
36948
|
-
if (__getOwnPropSymbols$
|
|
36949
|
-
for (var prop of __getOwnPropSymbols$
|
|
36950
|
-
if (__propIsEnum$
|
|
36951
|
-
__defNormalProp$
|
|
36972
|
+
if (__hasOwnProp$h.call(b, prop))
|
|
36973
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
36974
|
+
if (__getOwnPropSymbols$h)
|
|
36975
|
+
for (var prop of __getOwnPropSymbols$h(b)) {
|
|
36976
|
+
if (__propIsEnum$h.call(b, prop))
|
|
36977
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
36952
36978
|
}
|
|
36953
36979
|
return a;
|
|
36954
36980
|
};
|
|
36955
|
-
var __spreadProps$
|
|
36981
|
+
var __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
|
|
36956
36982
|
var __objRest$9 = (source, exclude) => {
|
|
36957
36983
|
var target = {};
|
|
36958
36984
|
for (var prop in source)
|
|
36959
|
-
if (__hasOwnProp$
|
|
36985
|
+
if (__hasOwnProp$h.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
36960
36986
|
target[prop] = source[prop];
|
|
36961
|
-
if (source != null && __getOwnPropSymbols$
|
|
36962
|
-
for (var prop of __getOwnPropSymbols$
|
|
36963
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
36987
|
+
if (source != null && __getOwnPropSymbols$h)
|
|
36988
|
+
for (var prop of __getOwnPropSymbols$h(source)) {
|
|
36989
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$h.call(source, prop))
|
|
36964
36990
|
target[prop] = source[prop];
|
|
36965
36991
|
}
|
|
36966
36992
|
return target;
|
|
@@ -36976,7 +37002,7 @@ const useGetShipment = (params) => {
|
|
|
36976
37002
|
}
|
|
36977
37003
|
return {};
|
|
36978
37004
|
};
|
|
36979
|
-
return reactQuery.useQuery(__spreadProps$
|
|
37005
|
+
return reactQuery.useQuery(__spreadProps$c(__spreadValues$f({}, getQueryProps()), {
|
|
36980
37006
|
enabled: shipmentId !== void 0,
|
|
36981
37007
|
onError,
|
|
36982
37008
|
queryFn: () => {
|
|
@@ -36990,17 +37016,17 @@ const useGetShipment = (params) => {
|
|
|
36990
37016
|
}));
|
|
36991
37017
|
};
|
|
36992
37018
|
|
|
36993
|
-
var __getOwnPropSymbols$
|
|
36994
|
-
var __hasOwnProp$
|
|
36995
|
-
var __propIsEnum$
|
|
37019
|
+
var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
|
|
37020
|
+
var __hasOwnProp$g = Object.prototype.hasOwnProperty;
|
|
37021
|
+
var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
|
|
36996
37022
|
var __objRest$8 = (source, exclude) => {
|
|
36997
37023
|
var target = {};
|
|
36998
37024
|
for (var prop in source)
|
|
36999
|
-
if (__hasOwnProp$
|
|
37025
|
+
if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
37000
37026
|
target[prop] = source[prop];
|
|
37001
|
-
if (source != null && __getOwnPropSymbols$
|
|
37002
|
-
for (var prop of __getOwnPropSymbols$
|
|
37003
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
37027
|
+
if (source != null && __getOwnPropSymbols$g)
|
|
37028
|
+
for (var prop of __getOwnPropSymbols$g(source)) {
|
|
37029
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))
|
|
37004
37030
|
target[prop] = source[prop];
|
|
37005
37031
|
}
|
|
37006
37032
|
return target;
|
|
@@ -37017,33 +37043,33 @@ const useListShipments = (_params) => {
|
|
|
37017
37043
|
});
|
|
37018
37044
|
};
|
|
37019
37045
|
|
|
37020
|
-
var __defProp$
|
|
37021
|
-
var __defProps$
|
|
37022
|
-
var __getOwnPropDescs$
|
|
37023
|
-
var __getOwnPropSymbols$
|
|
37024
|
-
var __hasOwnProp$
|
|
37025
|
-
var __propIsEnum$
|
|
37026
|
-
var __defNormalProp$
|
|
37027
|
-
var __spreadValues$
|
|
37046
|
+
var __defProp$e = Object.defineProperty;
|
|
37047
|
+
var __defProps$b = Object.defineProperties;
|
|
37048
|
+
var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
|
|
37049
|
+
var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
|
|
37050
|
+
var __hasOwnProp$f = Object.prototype.hasOwnProperty;
|
|
37051
|
+
var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
|
|
37052
|
+
var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
37053
|
+
var __spreadValues$e = (a, b) => {
|
|
37028
37054
|
for (var prop in b || (b = {}))
|
|
37029
|
-
if (__hasOwnProp$
|
|
37030
|
-
__defNormalProp$
|
|
37031
|
-
if (__getOwnPropSymbols$
|
|
37032
|
-
for (var prop of __getOwnPropSymbols$
|
|
37033
|
-
if (__propIsEnum$
|
|
37034
|
-
__defNormalProp$
|
|
37055
|
+
if (__hasOwnProp$f.call(b, prop))
|
|
37056
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
37057
|
+
if (__getOwnPropSymbols$f)
|
|
37058
|
+
for (var prop of __getOwnPropSymbols$f(b)) {
|
|
37059
|
+
if (__propIsEnum$f.call(b, prop))
|
|
37060
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
37035
37061
|
}
|
|
37036
37062
|
return a;
|
|
37037
37063
|
};
|
|
37038
|
-
var __spreadProps$
|
|
37064
|
+
var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
|
|
37039
37065
|
var __objRest$7 = (source, exclude) => {
|
|
37040
37066
|
var target = {};
|
|
37041
37067
|
for (var prop in source)
|
|
37042
|
-
if (__hasOwnProp$
|
|
37068
|
+
if (__hasOwnProp$f.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
37043
37069
|
target[prop] = source[prop];
|
|
37044
|
-
if (source != null && __getOwnPropSymbols$
|
|
37045
|
-
for (var prop of __getOwnPropSymbols$
|
|
37046
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
37070
|
+
if (source != null && __getOwnPropSymbols$f)
|
|
37071
|
+
for (var prop of __getOwnPropSymbols$f(source)) {
|
|
37072
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$f.call(source, prop))
|
|
37047
37073
|
target[prop] = source[prop];
|
|
37048
37074
|
}
|
|
37049
37075
|
return target;
|
|
@@ -37051,7 +37077,7 @@ var __objRest$7 = (source, exclude) => {
|
|
|
37051
37077
|
const useGetShipmentByExternalId = (params) => {
|
|
37052
37078
|
const { client } = useShipEngine();
|
|
37053
37079
|
const _a = params, { queryFnParams } = _a, rest = __objRest$7(_a, ["queryFnParams"]);
|
|
37054
|
-
return reactQuery.useQuery(__spreadProps$
|
|
37080
|
+
return reactQuery.useQuery(__spreadProps$b(__spreadValues$e({}, rest), {
|
|
37055
37081
|
onError,
|
|
37056
37082
|
queryFn: () => client.shipments.getByExternalId(queryFnParams.externalId),
|
|
37057
37083
|
queryKey: ["useGetShipmentByExternalId", queryFnParams],
|
|
@@ -37059,7 +37085,7 @@ const useGetShipmentByExternalId = (params) => {
|
|
|
37059
37085
|
}));
|
|
37060
37086
|
};
|
|
37061
37087
|
|
|
37062
|
-
var __async$
|
|
37088
|
+
var __async$h = (__this, __arguments, generator) => {
|
|
37063
37089
|
return new Promise((resolve, reject) => {
|
|
37064
37090
|
var fulfilled = (value) => {
|
|
37065
37091
|
try {
|
|
@@ -37082,7 +37108,7 @@ var __async$g = (__this, __arguments, generator) => {
|
|
|
37082
37108
|
const useCancelShipment = () => {
|
|
37083
37109
|
const { client } = useShipEngine();
|
|
37084
37110
|
return reactQuery.useMutation({
|
|
37085
|
-
mutationFn: (shipmentId) => __async$
|
|
37111
|
+
mutationFn: (shipmentId) => __async$h(void 0, null, function* () {
|
|
37086
37112
|
const result = yield client.shipments.cancel(shipmentId);
|
|
37087
37113
|
return result.data;
|
|
37088
37114
|
}),
|
|
@@ -37091,41 +37117,41 @@ const useCancelShipment = () => {
|
|
|
37091
37117
|
});
|
|
37092
37118
|
};
|
|
37093
37119
|
|
|
37094
|
-
var __defProp$
|
|
37095
|
-
var __defProps$
|
|
37096
|
-
var __getOwnPropDescs$
|
|
37097
|
-
var __getOwnPropSymbols$
|
|
37098
|
-
var __hasOwnProp$
|
|
37099
|
-
var __propIsEnum$
|
|
37100
|
-
var __defNormalProp$
|
|
37101
|
-
var __spreadValues$
|
|
37120
|
+
var __defProp$d = Object.defineProperty;
|
|
37121
|
+
var __defProps$a = Object.defineProperties;
|
|
37122
|
+
var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
|
|
37123
|
+
var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
|
|
37124
|
+
var __hasOwnProp$e = Object.prototype.hasOwnProperty;
|
|
37125
|
+
var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
|
|
37126
|
+
var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
37127
|
+
var __spreadValues$d = (a, b) => {
|
|
37102
37128
|
for (var prop in b || (b = {}))
|
|
37103
|
-
if (__hasOwnProp$
|
|
37104
|
-
__defNormalProp$
|
|
37105
|
-
if (__getOwnPropSymbols$
|
|
37106
|
-
for (var prop of __getOwnPropSymbols$
|
|
37107
|
-
if (__propIsEnum$
|
|
37108
|
-
__defNormalProp$
|
|
37129
|
+
if (__hasOwnProp$e.call(b, prop))
|
|
37130
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
37131
|
+
if (__getOwnPropSymbols$e)
|
|
37132
|
+
for (var prop of __getOwnPropSymbols$e(b)) {
|
|
37133
|
+
if (__propIsEnum$e.call(b, prop))
|
|
37134
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
37109
37135
|
}
|
|
37110
37136
|
return a;
|
|
37111
37137
|
};
|
|
37112
|
-
var __spreadProps$
|
|
37138
|
+
var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
|
|
37113
37139
|
var __objRest$6 = (source, exclude) => {
|
|
37114
37140
|
var target = {};
|
|
37115
37141
|
for (var prop in source)
|
|
37116
|
-
if (__hasOwnProp$
|
|
37142
|
+
if (__hasOwnProp$e.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
37117
37143
|
target[prop] = source[prop];
|
|
37118
|
-
if (source != null && __getOwnPropSymbols$
|
|
37119
|
-
for (var prop of __getOwnPropSymbols$
|
|
37120
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
37144
|
+
if (source != null && __getOwnPropSymbols$e)
|
|
37145
|
+
for (var prop of __getOwnPropSymbols$e(source)) {
|
|
37146
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$e.call(source, prop))
|
|
37121
37147
|
target[prop] = source[prop];
|
|
37122
37148
|
}
|
|
37123
37149
|
return target;
|
|
37124
37150
|
};
|
|
37125
37151
|
const useListShippingRules = (params) => {
|
|
37126
37152
|
const { client } = useShipEngine();
|
|
37127
|
-
const _a = __spreadValues$
|
|
37128
|
-
return reactQuery.useQuery(__spreadProps$
|
|
37153
|
+
const _a = __spreadValues$d({}, params), { queryFnParams } = _a, rest = __objRest$6(_a, ["queryFnParams"]);
|
|
37154
|
+
return reactQuery.useQuery(__spreadProps$a(__spreadValues$d({}, rest), {
|
|
37129
37155
|
onError,
|
|
37130
37156
|
queryFn: () => {
|
|
37131
37157
|
return client.shippingRules.list(queryFnParams);
|
|
@@ -37135,7 +37161,7 @@ const useListShippingRules = (params) => {
|
|
|
37135
37161
|
}));
|
|
37136
37162
|
};
|
|
37137
37163
|
|
|
37138
|
-
var __async$
|
|
37164
|
+
var __async$g = (__this, __arguments, generator) => {
|
|
37139
37165
|
return new Promise((resolve, reject) => {
|
|
37140
37166
|
var fulfilled = (value) => {
|
|
37141
37167
|
try {
|
|
@@ -37158,7 +37184,7 @@ var __async$f = (__this, __arguments, generator) => {
|
|
|
37158
37184
|
const useCreateShippingRule = () => {
|
|
37159
37185
|
const { client } = useShipEngine();
|
|
37160
37186
|
return reactQuery.useMutation({
|
|
37161
|
-
mutationFn: (props) => __async$
|
|
37187
|
+
mutationFn: (props) => __async$g(void 0, null, function* () {
|
|
37162
37188
|
const result = yield client.shippingRules.create(props);
|
|
37163
37189
|
return result.data;
|
|
37164
37190
|
}),
|
|
@@ -37167,7 +37193,7 @@ const useCreateShippingRule = () => {
|
|
|
37167
37193
|
});
|
|
37168
37194
|
};
|
|
37169
37195
|
|
|
37170
|
-
var __async$
|
|
37196
|
+
var __async$f = (__this, __arguments, generator) => {
|
|
37171
37197
|
return new Promise((resolve, reject) => {
|
|
37172
37198
|
var fulfilled = (value) => {
|
|
37173
37199
|
try {
|
|
@@ -37190,7 +37216,7 @@ var __async$e = (__this, __arguments, generator) => {
|
|
|
37190
37216
|
const useDeleteShippingRule = () => {
|
|
37191
37217
|
const { client } = useShipEngine();
|
|
37192
37218
|
return reactQuery.useMutation({
|
|
37193
|
-
mutationFn: (props) => __async$
|
|
37219
|
+
mutationFn: (props) => __async$f(void 0, null, function* () {
|
|
37194
37220
|
const result = yield client.shippingRules.delete(props);
|
|
37195
37221
|
return result.data;
|
|
37196
37222
|
}),
|
|
@@ -37199,7 +37225,7 @@ const useDeleteShippingRule = () => {
|
|
|
37199
37225
|
});
|
|
37200
37226
|
};
|
|
37201
37227
|
|
|
37202
|
-
var __async$
|
|
37228
|
+
var __async$e = (__this, __arguments, generator) => {
|
|
37203
37229
|
return new Promise((resolve, reject) => {
|
|
37204
37230
|
var fulfilled = (value) => {
|
|
37205
37231
|
try {
|
|
@@ -37222,7 +37248,7 @@ var __async$d = (__this, __arguments, generator) => {
|
|
|
37222
37248
|
const useEditShippingRule = () => {
|
|
37223
37249
|
const { client } = useShipEngine();
|
|
37224
37250
|
return reactQuery.useMutation({
|
|
37225
|
-
mutationFn: (props) => __async$
|
|
37251
|
+
mutationFn: (props) => __async$e(void 0, null, function* () {
|
|
37226
37252
|
const result = yield client.shippingRules.edit(props);
|
|
37227
37253
|
return result.data;
|
|
37228
37254
|
}),
|
|
@@ -37231,41 +37257,41 @@ const useEditShippingRule = () => {
|
|
|
37231
37257
|
});
|
|
37232
37258
|
};
|
|
37233
37259
|
|
|
37234
|
-
var __defProp$
|
|
37235
|
-
var __defProps$
|
|
37236
|
-
var __getOwnPropDescs$
|
|
37237
|
-
var __getOwnPropSymbols$
|
|
37238
|
-
var __hasOwnProp$
|
|
37239
|
-
var __propIsEnum$
|
|
37240
|
-
var __defNormalProp$
|
|
37241
|
-
var __spreadValues$
|
|
37260
|
+
var __defProp$c = Object.defineProperty;
|
|
37261
|
+
var __defProps$9 = Object.defineProperties;
|
|
37262
|
+
var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
|
|
37263
|
+
var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
|
|
37264
|
+
var __hasOwnProp$d = Object.prototype.hasOwnProperty;
|
|
37265
|
+
var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
|
|
37266
|
+
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
37267
|
+
var __spreadValues$c = (a, b) => {
|
|
37242
37268
|
for (var prop in b || (b = {}))
|
|
37243
|
-
if (__hasOwnProp$
|
|
37244
|
-
__defNormalProp$
|
|
37245
|
-
if (__getOwnPropSymbols$
|
|
37246
|
-
for (var prop of __getOwnPropSymbols$
|
|
37247
|
-
if (__propIsEnum$
|
|
37248
|
-
__defNormalProp$
|
|
37269
|
+
if (__hasOwnProp$d.call(b, prop))
|
|
37270
|
+
__defNormalProp$c(a, prop, b[prop]);
|
|
37271
|
+
if (__getOwnPropSymbols$d)
|
|
37272
|
+
for (var prop of __getOwnPropSymbols$d(b)) {
|
|
37273
|
+
if (__propIsEnum$d.call(b, prop))
|
|
37274
|
+
__defNormalProp$c(a, prop, b[prop]);
|
|
37249
37275
|
}
|
|
37250
37276
|
return a;
|
|
37251
37277
|
};
|
|
37252
|
-
var __spreadProps$
|
|
37278
|
+
var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
|
|
37253
37279
|
var __objRest$5 = (source, exclude) => {
|
|
37254
37280
|
var target = {};
|
|
37255
37281
|
for (var prop in source)
|
|
37256
|
-
if (__hasOwnProp$
|
|
37282
|
+
if (__hasOwnProp$d.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
37257
37283
|
target[prop] = source[prop];
|
|
37258
|
-
if (source != null && __getOwnPropSymbols$
|
|
37259
|
-
for (var prop of __getOwnPropSymbols$
|
|
37260
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
37284
|
+
if (source != null && __getOwnPropSymbols$d)
|
|
37285
|
+
for (var prop of __getOwnPropSymbols$d(source)) {
|
|
37286
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$d.call(source, prop))
|
|
37261
37287
|
target[prop] = source[prop];
|
|
37262
37288
|
}
|
|
37263
37289
|
return target;
|
|
37264
37290
|
};
|
|
37265
37291
|
const useGetShippingRuleConditionsOptions = (params) => {
|
|
37266
37292
|
const { client } = useShipEngine();
|
|
37267
|
-
const _a = __spreadValues$
|
|
37268
|
-
return reactQuery.useQuery(__spreadProps$
|
|
37293
|
+
const _a = __spreadValues$c({}, params), { queryFnParams } = _a, rest = __objRest$5(_a, ["queryFnParams"]);
|
|
37294
|
+
return reactQuery.useQuery(__spreadProps$9(__spreadValues$c({}, rest), {
|
|
37269
37295
|
onError,
|
|
37270
37296
|
queryFn: () => {
|
|
37271
37297
|
return client.shippingRules.getConditionOptions(queryFnParams);
|
|
@@ -37275,41 +37301,41 @@ const useGetShippingRuleConditionsOptions = (params) => {
|
|
|
37275
37301
|
}));
|
|
37276
37302
|
};
|
|
37277
37303
|
|
|
37278
|
-
var __defProp$
|
|
37279
|
-
var __defProps$
|
|
37280
|
-
var __getOwnPropDescs$
|
|
37281
|
-
var __getOwnPropSymbols$
|
|
37282
|
-
var __hasOwnProp$
|
|
37283
|
-
var __propIsEnum$
|
|
37284
|
-
var __defNormalProp$
|
|
37285
|
-
var __spreadValues$
|
|
37304
|
+
var __defProp$b = Object.defineProperty;
|
|
37305
|
+
var __defProps$8 = Object.defineProperties;
|
|
37306
|
+
var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
|
|
37307
|
+
var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
|
|
37308
|
+
var __hasOwnProp$c = Object.prototype.hasOwnProperty;
|
|
37309
|
+
var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
|
|
37310
|
+
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
37311
|
+
var __spreadValues$b = (a, b) => {
|
|
37286
37312
|
for (var prop in b || (b = {}))
|
|
37287
|
-
if (__hasOwnProp$
|
|
37288
|
-
__defNormalProp$
|
|
37289
|
-
if (__getOwnPropSymbols$
|
|
37290
|
-
for (var prop of __getOwnPropSymbols$
|
|
37291
|
-
if (__propIsEnum$
|
|
37292
|
-
__defNormalProp$
|
|
37313
|
+
if (__hasOwnProp$c.call(b, prop))
|
|
37314
|
+
__defNormalProp$b(a, prop, b[prop]);
|
|
37315
|
+
if (__getOwnPropSymbols$c)
|
|
37316
|
+
for (var prop of __getOwnPropSymbols$c(b)) {
|
|
37317
|
+
if (__propIsEnum$c.call(b, prop))
|
|
37318
|
+
__defNormalProp$b(a, prop, b[prop]);
|
|
37293
37319
|
}
|
|
37294
37320
|
return a;
|
|
37295
37321
|
};
|
|
37296
|
-
var __spreadProps$
|
|
37322
|
+
var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
|
|
37297
37323
|
var __objRest$4 = (source, exclude) => {
|
|
37298
37324
|
var target = {};
|
|
37299
37325
|
for (var prop in source)
|
|
37300
|
-
if (__hasOwnProp$
|
|
37326
|
+
if (__hasOwnProp$c.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
37301
37327
|
target[prop] = source[prop];
|
|
37302
|
-
if (source != null && __getOwnPropSymbols$
|
|
37303
|
-
for (var prop of __getOwnPropSymbols$
|
|
37304
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
37328
|
+
if (source != null && __getOwnPropSymbols$c)
|
|
37329
|
+
for (var prop of __getOwnPropSymbols$c(source)) {
|
|
37330
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$c.call(source, prop))
|
|
37305
37331
|
target[prop] = source[prop];
|
|
37306
37332
|
}
|
|
37307
37333
|
return target;
|
|
37308
37334
|
};
|
|
37309
37335
|
const useGetShippingRuleById = (params) => {
|
|
37310
37336
|
const { client } = useShipEngine();
|
|
37311
|
-
const _a = __spreadValues$
|
|
37312
|
-
return reactQuery.useQuery(__spreadProps$
|
|
37337
|
+
const _a = __spreadValues$b({}, params), { queryFnParams } = _a, rest = __objRest$4(_a, ["queryFnParams"]);
|
|
37338
|
+
return reactQuery.useQuery(__spreadProps$8(__spreadValues$b({}, rest), {
|
|
37313
37339
|
onError,
|
|
37314
37340
|
queryFn: () => {
|
|
37315
37341
|
return client.shippingRules.get(queryFnParams);
|
|
@@ -37334,7 +37360,7 @@ const useGetThemeById = (themeId) => {
|
|
|
37334
37360
|
});
|
|
37335
37361
|
};
|
|
37336
37362
|
|
|
37337
|
-
var __async$
|
|
37363
|
+
var __async$d = (__this, __arguments, generator) => {
|
|
37338
37364
|
return new Promise((resolve, reject) => {
|
|
37339
37365
|
var fulfilled = (value) => {
|
|
37340
37366
|
try {
|
|
@@ -37357,7 +37383,7 @@ var __async$c = (__this, __arguments, generator) => {
|
|
|
37357
37383
|
const useCreateWarehouse = () => {
|
|
37358
37384
|
const { client } = useShipEngine();
|
|
37359
37385
|
return reactQuery.useMutation({
|
|
37360
|
-
mutationFn: (data) => __async$
|
|
37386
|
+
mutationFn: (data) => __async$d(void 0, null, function* () {
|
|
37361
37387
|
const result = yield client.warehouses.create(data);
|
|
37362
37388
|
return result.data;
|
|
37363
37389
|
}),
|
|
@@ -37366,7 +37392,7 @@ const useCreateWarehouse = () => {
|
|
|
37366
37392
|
});
|
|
37367
37393
|
};
|
|
37368
37394
|
|
|
37369
|
-
var __async$
|
|
37395
|
+
var __async$c = (__this, __arguments, generator) => {
|
|
37370
37396
|
return new Promise((resolve, reject) => {
|
|
37371
37397
|
var fulfilled = (value) => {
|
|
37372
37398
|
try {
|
|
@@ -37389,7 +37415,7 @@ var __async$b = (__this, __arguments, generator) => {
|
|
|
37389
37415
|
const useDeleteWarehouse = () => {
|
|
37390
37416
|
const { client } = useShipEngine();
|
|
37391
37417
|
return reactQuery.useMutation({
|
|
37392
|
-
mutationFn: (_0) => __async$
|
|
37418
|
+
mutationFn: (_0) => __async$c(void 0, [_0], function* ({ warehouseId }) {
|
|
37393
37419
|
const result = yield client.warehouses.delete(warehouseId);
|
|
37394
37420
|
return result.data;
|
|
37395
37421
|
}),
|
|
@@ -37398,41 +37424,41 @@ const useDeleteWarehouse = () => {
|
|
|
37398
37424
|
});
|
|
37399
37425
|
};
|
|
37400
37426
|
|
|
37401
|
-
var __defProp$
|
|
37402
|
-
var __defProps$
|
|
37403
|
-
var __getOwnPropDescs$
|
|
37404
|
-
var __getOwnPropSymbols$
|
|
37405
|
-
var __hasOwnProp$
|
|
37406
|
-
var __propIsEnum$
|
|
37407
|
-
var __defNormalProp$
|
|
37408
|
-
var __spreadValues$
|
|
37427
|
+
var __defProp$a = Object.defineProperty;
|
|
37428
|
+
var __defProps$7 = Object.defineProperties;
|
|
37429
|
+
var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
|
|
37430
|
+
var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
|
|
37431
|
+
var __hasOwnProp$b = Object.prototype.hasOwnProperty;
|
|
37432
|
+
var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
|
|
37433
|
+
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
37434
|
+
var __spreadValues$a = (a, b) => {
|
|
37409
37435
|
for (var prop in b || (b = {}))
|
|
37410
|
-
if (__hasOwnProp$
|
|
37411
|
-
__defNormalProp$
|
|
37412
|
-
if (__getOwnPropSymbols$
|
|
37413
|
-
for (var prop of __getOwnPropSymbols$
|
|
37414
|
-
if (__propIsEnum$
|
|
37415
|
-
__defNormalProp$
|
|
37436
|
+
if (__hasOwnProp$b.call(b, prop))
|
|
37437
|
+
__defNormalProp$a(a, prop, b[prop]);
|
|
37438
|
+
if (__getOwnPropSymbols$b)
|
|
37439
|
+
for (var prop of __getOwnPropSymbols$b(b)) {
|
|
37440
|
+
if (__propIsEnum$b.call(b, prop))
|
|
37441
|
+
__defNormalProp$a(a, prop, b[prop]);
|
|
37416
37442
|
}
|
|
37417
37443
|
return a;
|
|
37418
37444
|
};
|
|
37419
|
-
var __spreadProps$
|
|
37445
|
+
var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
|
|
37420
37446
|
var __objRest$3 = (source, exclude) => {
|
|
37421
37447
|
var target = {};
|
|
37422
37448
|
for (var prop in source)
|
|
37423
|
-
if (__hasOwnProp$
|
|
37449
|
+
if (__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
37424
37450
|
target[prop] = source[prop];
|
|
37425
|
-
if (source != null && __getOwnPropSymbols$
|
|
37426
|
-
for (var prop of __getOwnPropSymbols$
|
|
37427
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
37451
|
+
if (source != null && __getOwnPropSymbols$b)
|
|
37452
|
+
for (var prop of __getOwnPropSymbols$b(source)) {
|
|
37453
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$b.call(source, prop))
|
|
37428
37454
|
target[prop] = source[prop];
|
|
37429
37455
|
}
|
|
37430
37456
|
return target;
|
|
37431
37457
|
};
|
|
37432
37458
|
const useListWarehouses = (params) => {
|
|
37433
37459
|
const { client } = useShipEngine();
|
|
37434
|
-
const _a = __spreadValues$
|
|
37435
|
-
return reactQuery.useQuery(__spreadProps$
|
|
37460
|
+
const _a = __spreadValues$a({}, params), { queryFnParams } = _a, rest = __objRest$3(_a, ["queryFnParams"]);
|
|
37461
|
+
return reactQuery.useQuery(__spreadProps$7(__spreadValues$a({}, rest), {
|
|
37436
37462
|
onError,
|
|
37437
37463
|
queryFn: () => client.warehouses.list(queryFnParams),
|
|
37438
37464
|
queryKey: ["useListWarehouses", queryFnParams],
|
|
@@ -37440,22 +37466,22 @@ const useListWarehouses = (params) => {
|
|
|
37440
37466
|
}));
|
|
37441
37467
|
};
|
|
37442
37468
|
|
|
37443
|
-
var __getOwnPropSymbols$
|
|
37444
|
-
var __hasOwnProp$
|
|
37445
|
-
var __propIsEnum$
|
|
37469
|
+
var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
|
|
37470
|
+
var __hasOwnProp$a = Object.prototype.hasOwnProperty;
|
|
37471
|
+
var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
|
|
37446
37472
|
var __objRest$2 = (source, exclude) => {
|
|
37447
37473
|
var target = {};
|
|
37448
37474
|
for (var prop in source)
|
|
37449
|
-
if (__hasOwnProp$
|
|
37475
|
+
if (__hasOwnProp$a.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
37450
37476
|
target[prop] = source[prop];
|
|
37451
|
-
if (source != null && __getOwnPropSymbols$
|
|
37452
|
-
for (var prop of __getOwnPropSymbols$
|
|
37453
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
37477
|
+
if (source != null && __getOwnPropSymbols$a)
|
|
37478
|
+
for (var prop of __getOwnPropSymbols$a(source)) {
|
|
37479
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$a.call(source, prop))
|
|
37454
37480
|
target[prop] = source[prop];
|
|
37455
37481
|
}
|
|
37456
37482
|
return target;
|
|
37457
37483
|
};
|
|
37458
|
-
var __async$
|
|
37484
|
+
var __async$b = (__this, __arguments, generator) => {
|
|
37459
37485
|
return new Promise((resolve, reject) => {
|
|
37460
37486
|
var fulfilled = (value) => {
|
|
37461
37487
|
try {
|
|
@@ -37478,7 +37504,7 @@ var __async$a = (__this, __arguments, generator) => {
|
|
|
37478
37504
|
const useUpdateWarehouse = () => {
|
|
37479
37505
|
const { client } = useShipEngine();
|
|
37480
37506
|
return reactQuery.useMutation({
|
|
37481
|
-
mutationFn: (_a) => __async$
|
|
37507
|
+
mutationFn: (_a) => __async$b(void 0, null, function* () {
|
|
37482
37508
|
var _b = _a, { warehouseId } = _b, warehouse = __objRest$2(_b, ["warehouseId"]);
|
|
37483
37509
|
const result = yield client.warehouses.update(warehouseId, warehouse);
|
|
37484
37510
|
return result.data;
|
|
@@ -37498,7 +37524,7 @@ const useGetAccountBillingPlan = () => {
|
|
|
37498
37524
|
});
|
|
37499
37525
|
};
|
|
37500
37526
|
|
|
37501
|
-
var __async$
|
|
37527
|
+
var __async$a = (__this, __arguments, generator) => {
|
|
37502
37528
|
return new Promise((resolve, reject) => {
|
|
37503
37529
|
var fulfilled = (value) => {
|
|
37504
37530
|
try {
|
|
@@ -37521,7 +37547,7 @@ var __async$9 = (__this, __arguments, generator) => {
|
|
|
37521
37547
|
const useUpdateAccountBillingPlan = () => {
|
|
37522
37548
|
const { client } = useShipEngine();
|
|
37523
37549
|
return reactQuery.useMutation({
|
|
37524
|
-
mutationFn: (code) => __async$
|
|
37550
|
+
mutationFn: (code) => __async$a(void 0, null, function* () {
|
|
37525
37551
|
const result = yield client.accountBillingPlan.update({ code });
|
|
37526
37552
|
return result.data;
|
|
37527
37553
|
}),
|
|
@@ -37530,6 +37556,86 @@ const useUpdateAccountBillingPlan = () => {
|
|
|
37530
37556
|
});
|
|
37531
37557
|
};
|
|
37532
37558
|
|
|
37559
|
+
var __defProp$9 = Object.defineProperty;
|
|
37560
|
+
var __defProps$6 = Object.defineProperties;
|
|
37561
|
+
var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
|
|
37562
|
+
var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
|
|
37563
|
+
var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
|
|
37564
|
+
var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
|
|
37565
|
+
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
37566
|
+
var __spreadValues$9 = (a, b) => {
|
|
37567
|
+
for (var prop in b || (b = {}))
|
|
37568
|
+
if (__hasOwnProp$9.call(b, prop))
|
|
37569
|
+
__defNormalProp$9(a, prop, b[prop]);
|
|
37570
|
+
if (__getOwnPropSymbols$9)
|
|
37571
|
+
for (var prop of __getOwnPropSymbols$9(b)) {
|
|
37572
|
+
if (__propIsEnum$9.call(b, prop))
|
|
37573
|
+
__defNormalProp$9(a, prop, b[prop]);
|
|
37574
|
+
}
|
|
37575
|
+
return a;
|
|
37576
|
+
};
|
|
37577
|
+
var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
|
|
37578
|
+
const useGetAccountBilling = (params) => {
|
|
37579
|
+
const { client } = useShipEngine();
|
|
37580
|
+
return reactQuery.useQuery(__spreadProps$6(__spreadValues$9({}, params), {
|
|
37581
|
+
onError,
|
|
37582
|
+
queryFn: () => client.accountBilling.get(),
|
|
37583
|
+
queryKey: ["useGetAccountBilling"],
|
|
37584
|
+
select: (result) => result.data
|
|
37585
|
+
}));
|
|
37586
|
+
};
|
|
37587
|
+
|
|
37588
|
+
var __defProp$8 = Object.defineProperty;
|
|
37589
|
+
var __defProps$5 = Object.defineProperties;
|
|
37590
|
+
var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
|
|
37591
|
+
var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
|
|
37592
|
+
var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
|
|
37593
|
+
var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
|
|
37594
|
+
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
37595
|
+
var __spreadValues$8 = (a, b) => {
|
|
37596
|
+
for (var prop in b || (b = {}))
|
|
37597
|
+
if (__hasOwnProp$8.call(b, prop))
|
|
37598
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
37599
|
+
if (__getOwnPropSymbols$8)
|
|
37600
|
+
for (var prop of __getOwnPropSymbols$8(b)) {
|
|
37601
|
+
if (__propIsEnum$8.call(b, prop))
|
|
37602
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
37603
|
+
}
|
|
37604
|
+
return a;
|
|
37605
|
+
};
|
|
37606
|
+
var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
|
|
37607
|
+
var __async$9 = (__this, __arguments, generator) => {
|
|
37608
|
+
return new Promise((resolve, reject) => {
|
|
37609
|
+
var fulfilled = (value) => {
|
|
37610
|
+
try {
|
|
37611
|
+
step(generator.next(value));
|
|
37612
|
+
} catch (e) {
|
|
37613
|
+
reject(e);
|
|
37614
|
+
}
|
|
37615
|
+
};
|
|
37616
|
+
var rejected = (value) => {
|
|
37617
|
+
try {
|
|
37618
|
+
step(generator.throw(value));
|
|
37619
|
+
} catch (e) {
|
|
37620
|
+
reject(e);
|
|
37621
|
+
}
|
|
37622
|
+
};
|
|
37623
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
37624
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
37625
|
+
});
|
|
37626
|
+
};
|
|
37627
|
+
const useUpsertAccountBilling = (params) => {
|
|
37628
|
+
const { client } = useShipEngine();
|
|
37629
|
+
return reactQuery.useMutation(__spreadProps$5(__spreadValues$8({}, params), {
|
|
37630
|
+
mutationFn: (billing) => __async$9(void 0, null, function* () {
|
|
37631
|
+
const result = yield client.accountBilling.put(billing);
|
|
37632
|
+
return result.data;
|
|
37633
|
+
}),
|
|
37634
|
+
mutationKey: ["useUpsertAccountBilling"],
|
|
37635
|
+
onError
|
|
37636
|
+
}));
|
|
37637
|
+
};
|
|
37638
|
+
|
|
37533
37639
|
var __defProp$7 = Object.defineProperty;
|
|
37534
37640
|
var __defProps$4 = Object.defineProperties;
|
|
37535
37641
|
var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
|
|
@@ -39131,6 +39237,9 @@ const alchemy = {
|
|
|
39131
39237
|
createElement
|
|
39132
39238
|
};
|
|
39133
39239
|
|
|
39240
|
+
exports.AccountBillingAPI = AccountBillingAPI;
|
|
39241
|
+
exports.AccountBillingPlanAPI = AccountBillingPlanAPI;
|
|
39242
|
+
exports.AccountBillingPlanChangeType = AccountBillingPlanChangeType;
|
|
39134
39243
|
exports.AccountSettingsAPI = AccountSettingsAPI;
|
|
39135
39244
|
exports.AddressesAPI = AddressesAPI;
|
|
39136
39245
|
exports.AlchemyContext = AlchemyContext;
|
|
@@ -39222,6 +39331,7 @@ exports.useDeleteWebhook = useDeleteWebhook;
|
|
|
39222
39331
|
exports.useDownloadRateCard = useDownloadRateCard;
|
|
39223
39332
|
exports.useEditShippingRule = useEditShippingRule;
|
|
39224
39333
|
exports.useFundingSourcesAddFunds = useFundingSourcesAddFunds;
|
|
39334
|
+
exports.useGetAccountBilling = useGetAccountBilling;
|
|
39225
39335
|
exports.useGetAccountBillingPlan = useGetAccountBillingPlan;
|
|
39226
39336
|
exports.useGetAccountImages = useGetAccountImages;
|
|
39227
39337
|
exports.useGetAccountSettings = useGetAccountSettings;
|
|
@@ -39295,5 +39405,6 @@ exports.useUpdateSalesOrderShipment = useUpdateSalesOrderShipment;
|
|
|
39295
39405
|
exports.useUpdateWarehouse = useUpdateWarehouse;
|
|
39296
39406
|
exports.useUpdateWebhook = useUpdateWebhook;
|
|
39297
39407
|
exports.useUploadRateCard = useUploadRateCard;
|
|
39408
|
+
exports.useUpsertAccountBilling = useUpsertAccountBilling;
|
|
39298
39409
|
exports.useValidateAddresses = useValidateAddresses;
|
|
39299
39410
|
exports.useVoidLabel = useVoidLabel;
|