@shipengine/alchemy 6.0.79-next.0 → 6.0.80
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 +583 -459
- package/index.mjs +581 -460
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -10835,17 +10835,17 @@ var FeatureId = /* @__PURE__ */ ((FeatureId2) => {
|
|
|
10835
10835
|
return FeatureId2;
|
|
10836
10836
|
})(FeatureId || {});
|
|
10837
10837
|
|
|
10838
|
-
var __getOwnPropSymbols$
|
|
10839
|
-
var __hasOwnProp$
|
|
10840
|
-
var __propIsEnum$
|
|
10838
|
+
var __getOwnPropSymbols$13 = Object.getOwnPropertySymbols;
|
|
10839
|
+
var __hasOwnProp$13 = Object.prototype.hasOwnProperty;
|
|
10840
|
+
var __propIsEnum$13 = Object.prototype.propertyIsEnumerable;
|
|
10841
10841
|
var __objRest$x = (source, exclude) => {
|
|
10842
10842
|
var target = {};
|
|
10843
10843
|
for (var prop in source)
|
|
10844
|
-
if (__hasOwnProp$
|
|
10844
|
+
if (__hasOwnProp$13.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
10845
10845
|
target[prop] = source[prop];
|
|
10846
|
-
if (source != null && __getOwnPropSymbols$
|
|
10847
|
-
for (var prop of __getOwnPropSymbols$
|
|
10848
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
10846
|
+
if (source != null && __getOwnPropSymbols$13)
|
|
10847
|
+
for (var prop of __getOwnPropSymbols$13(source)) {
|
|
10848
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$13.call(source, prop))
|
|
10849
10849
|
target[prop] = source[prop];
|
|
10850
10850
|
}
|
|
10851
10851
|
return target;
|
|
@@ -10981,17 +10981,17 @@ const types = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
10981
10981
|
RateCardStatus
|
|
10982
10982
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
10983
10983
|
|
|
10984
|
-
var __getOwnPropSymbols$
|
|
10985
|
-
var __hasOwnProp$
|
|
10986
|
-
var __propIsEnum$
|
|
10984
|
+
var __getOwnPropSymbols$12 = Object.getOwnPropertySymbols;
|
|
10985
|
+
var __hasOwnProp$12 = Object.prototype.hasOwnProperty;
|
|
10986
|
+
var __propIsEnum$12 = Object.prototype.propertyIsEnumerable;
|
|
10987
10987
|
var __objRest$w = (source, exclude) => {
|
|
10988
10988
|
var target = {};
|
|
10989
10989
|
for (var prop in source)
|
|
10990
|
-
if (__hasOwnProp$
|
|
10990
|
+
if (__hasOwnProp$12.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
10991
10991
|
target[prop] = source[prop];
|
|
10992
|
-
if (source != null && __getOwnPropSymbols$
|
|
10993
|
-
for (var prop of __getOwnPropSymbols$
|
|
10994
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
10992
|
+
if (source != null && __getOwnPropSymbols$12)
|
|
10993
|
+
for (var prop of __getOwnPropSymbols$12(source)) {
|
|
10994
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$12.call(source, prop))
|
|
10995
10995
|
target[prop] = source[prop];
|
|
10996
10996
|
}
|
|
10997
10997
|
return target;
|
|
@@ -13892,7 +13892,7 @@ var ipaddr = {
|
|
|
13892
13892
|
}).call(commonjsGlobal);
|
|
13893
13893
|
} (ipaddr));
|
|
13894
13894
|
|
|
13895
|
-
var __async$
|
|
13895
|
+
var __async$1a = (__this, __arguments, generator) => {
|
|
13896
13896
|
return new Promise((resolve, reject) => {
|
|
13897
13897
|
var fulfilled = (value) => {
|
|
13898
13898
|
try {
|
|
@@ -13912,7 +13912,7 @@ var __async$18 = (__this, __arguments, generator) => {
|
|
|
13912
13912
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
13913
13913
|
});
|
|
13914
13914
|
};
|
|
13915
|
-
const getEndUserIpAddress = () => __async$
|
|
13915
|
+
const getEndUserIpAddress = () => __async$1a(void 0, null, function* () {
|
|
13916
13916
|
try {
|
|
13917
13917
|
const response = yield axios.get("https://api.ipify.org/?format=json");
|
|
13918
13918
|
if (response.data.ip && ipaddrExports.isValid(response.data.ip)) {
|
|
@@ -13973,38 +13973,38 @@ const decamelizeKeys = (obj, separator = "_") => {
|
|
|
13973
13973
|
return obj;
|
|
13974
13974
|
};
|
|
13975
13975
|
|
|
13976
|
-
var __defProp$
|
|
13977
|
-
var __defProps$
|
|
13978
|
-
var __getOwnPropDescs$
|
|
13979
|
-
var __getOwnPropSymbols$
|
|
13980
|
-
var __hasOwnProp$
|
|
13981
|
-
var __propIsEnum$
|
|
13982
|
-
var __defNormalProp$
|
|
13983
|
-
var __spreadValues$
|
|
13976
|
+
var __defProp$S = Object.defineProperty;
|
|
13977
|
+
var __defProps$M = Object.defineProperties;
|
|
13978
|
+
var __getOwnPropDescs$M = Object.getOwnPropertyDescriptors;
|
|
13979
|
+
var __getOwnPropSymbols$11 = Object.getOwnPropertySymbols;
|
|
13980
|
+
var __hasOwnProp$11 = Object.prototype.hasOwnProperty;
|
|
13981
|
+
var __propIsEnum$11 = Object.prototype.propertyIsEnumerable;
|
|
13982
|
+
var __defNormalProp$S = (obj, key, value) => key in obj ? __defProp$S(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13983
|
+
var __spreadValues$S = (a, b) => {
|
|
13984
13984
|
for (var prop in b || (b = {}))
|
|
13985
|
-
if (__hasOwnProp$
|
|
13986
|
-
__defNormalProp$
|
|
13987
|
-
if (__getOwnPropSymbols$
|
|
13988
|
-
for (var prop of __getOwnPropSymbols$
|
|
13989
|
-
if (__propIsEnum$
|
|
13990
|
-
__defNormalProp$
|
|
13985
|
+
if (__hasOwnProp$11.call(b, prop))
|
|
13986
|
+
__defNormalProp$S(a, prop, b[prop]);
|
|
13987
|
+
if (__getOwnPropSymbols$11)
|
|
13988
|
+
for (var prop of __getOwnPropSymbols$11(b)) {
|
|
13989
|
+
if (__propIsEnum$11.call(b, prop))
|
|
13990
|
+
__defNormalProp$S(a, prop, b[prop]);
|
|
13991
13991
|
}
|
|
13992
13992
|
return a;
|
|
13993
13993
|
};
|
|
13994
|
-
var __spreadProps$
|
|
13994
|
+
var __spreadProps$M = (a, b) => __defProps$M(a, __getOwnPropDescs$M(b));
|
|
13995
13995
|
var __objRest$v = (source, exclude) => {
|
|
13996
13996
|
var target = {};
|
|
13997
13997
|
for (var prop in source)
|
|
13998
|
-
if (__hasOwnProp$
|
|
13998
|
+
if (__hasOwnProp$11.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
13999
13999
|
target[prop] = source[prop];
|
|
14000
|
-
if (source != null && __getOwnPropSymbols$
|
|
14001
|
-
for (var prop of __getOwnPropSymbols$
|
|
14002
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
14000
|
+
if (source != null && __getOwnPropSymbols$11)
|
|
14001
|
+
for (var prop of __getOwnPropSymbols$11(source)) {
|
|
14002
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$11.call(source, prop))
|
|
14003
14003
|
target[prop] = source[prop];
|
|
14004
14004
|
}
|
|
14005
14005
|
return target;
|
|
14006
14006
|
};
|
|
14007
|
-
var __async$
|
|
14007
|
+
var __async$19 = (__this, __arguments, generator) => {
|
|
14008
14008
|
return new Promise((resolve, reject) => {
|
|
14009
14009
|
var fulfilled = (value) => {
|
|
14010
14010
|
try {
|
|
@@ -14044,12 +14044,12 @@ class CarriersAPI {
|
|
|
14044
14044
|
/**
|
|
14045
14045
|
* The `connect` method connects a carrier account to a user's ShipEngine account.
|
|
14046
14046
|
*/
|
|
14047
|
-
this.connect = (_a) => __async$
|
|
14047
|
+
this.connect = (_a) => __async$19(this, null, function* () {
|
|
14048
14048
|
var _b = _a, { carrierCode } = _b, connection = __objRest$v(_b, ["carrierCode"]);
|
|
14049
14049
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
14050
14050
|
if (!endUserIpAddress)
|
|
14051
14051
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
14052
|
-
return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$
|
|
14052
|
+
return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$M(__spreadValues$S({}, connection), {
|
|
14053
14053
|
endUserIpAddress
|
|
14054
14054
|
}));
|
|
14055
14055
|
});
|
|
@@ -14129,26 +14129,36 @@ class CarriersAPI {
|
|
|
14129
14129
|
this.delete = (carrierId) => {
|
|
14130
14130
|
return this.client.delete(`/v1/carriers/${carrierId}`);
|
|
14131
14131
|
};
|
|
14132
|
+
/**
|
|
14133
|
+
* The `acceptTerms` method allows users to accept new versions of carrier terms.
|
|
14134
|
+
* Returns the status of each term.
|
|
14135
|
+
*/
|
|
14136
|
+
this.acceptTerms = (carrierId, request) => {
|
|
14137
|
+
return this.client.post(
|
|
14138
|
+
`/v1/carriers/${carrierId}/accepted_terms`,
|
|
14139
|
+
request
|
|
14140
|
+
);
|
|
14141
|
+
};
|
|
14132
14142
|
this.client = client;
|
|
14133
14143
|
}
|
|
14134
14144
|
}
|
|
14135
14145
|
|
|
14136
|
-
var __getOwnPropSymbols
|
|
14137
|
-
var __hasOwnProp
|
|
14138
|
-
var __propIsEnum
|
|
14146
|
+
var __getOwnPropSymbols$10 = Object.getOwnPropertySymbols;
|
|
14147
|
+
var __hasOwnProp$10 = Object.prototype.hasOwnProperty;
|
|
14148
|
+
var __propIsEnum$10 = Object.prototype.propertyIsEnumerable;
|
|
14139
14149
|
var __objRest$u = (source, exclude) => {
|
|
14140
14150
|
var target = {};
|
|
14141
14151
|
for (var prop in source)
|
|
14142
|
-
if (__hasOwnProp
|
|
14152
|
+
if (__hasOwnProp$10.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
14143
14153
|
target[prop] = source[prop];
|
|
14144
|
-
if (source != null && __getOwnPropSymbols
|
|
14145
|
-
for (var prop of __getOwnPropSymbols
|
|
14146
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum
|
|
14154
|
+
if (source != null && __getOwnPropSymbols$10)
|
|
14155
|
+
for (var prop of __getOwnPropSymbols$10(source)) {
|
|
14156
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$10.call(source, prop))
|
|
14147
14157
|
target[prop] = source[prop];
|
|
14148
14158
|
}
|
|
14149
14159
|
return target;
|
|
14150
14160
|
};
|
|
14151
|
-
var __async$
|
|
14161
|
+
var __async$18 = (__this, __arguments, generator) => {
|
|
14152
14162
|
return new Promise((resolve, reject) => {
|
|
14153
14163
|
var fulfilled = (value) => {
|
|
14154
14164
|
try {
|
|
@@ -14190,7 +14200,7 @@ class ConnectionsAPI {
|
|
|
14190
14200
|
/**
|
|
14191
14201
|
* The `connectCarrier` method connects a carrier to account.
|
|
14192
14202
|
*/
|
|
14193
|
-
this.connectCarrier = (carrierName, formData) => __async$
|
|
14203
|
+
this.connectCarrier = (carrierName, formData) => __async$18(this, null, function* () {
|
|
14194
14204
|
return yield this.client.post(
|
|
14195
14205
|
`/v1/connections/carriers/${carrierName}`,
|
|
14196
14206
|
formData,
|
|
@@ -16358,23 +16368,23 @@ class CustomPackagesAPI {
|
|
|
16358
16368
|
}
|
|
16359
16369
|
}
|
|
16360
16370
|
|
|
16361
|
-
var __defProp$
|
|
16362
|
-
var __getOwnPropSymbols
|
|
16363
|
-
var __hasOwnProp
|
|
16364
|
-
var __propIsEnum
|
|
16365
|
-
var __defNormalProp$
|
|
16366
|
-
var __spreadValues$
|
|
16371
|
+
var __defProp$R = Object.defineProperty;
|
|
16372
|
+
var __getOwnPropSymbols$$ = Object.getOwnPropertySymbols;
|
|
16373
|
+
var __hasOwnProp$$ = Object.prototype.hasOwnProperty;
|
|
16374
|
+
var __propIsEnum$$ = Object.prototype.propertyIsEnumerable;
|
|
16375
|
+
var __defNormalProp$R = (obj, key, value) => key in obj ? __defProp$R(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16376
|
+
var __spreadValues$R = (a, b) => {
|
|
16367
16377
|
for (var prop in b || (b = {}))
|
|
16368
|
-
if (__hasOwnProp
|
|
16369
|
-
__defNormalProp$
|
|
16370
|
-
if (__getOwnPropSymbols
|
|
16371
|
-
for (var prop of __getOwnPropSymbols
|
|
16372
|
-
if (__propIsEnum
|
|
16373
|
-
__defNormalProp$
|
|
16378
|
+
if (__hasOwnProp$$.call(b, prop))
|
|
16379
|
+
__defNormalProp$R(a, prop, b[prop]);
|
|
16380
|
+
if (__getOwnPropSymbols$$)
|
|
16381
|
+
for (var prop of __getOwnPropSymbols$$(b)) {
|
|
16382
|
+
if (__propIsEnum$$.call(b, prop))
|
|
16383
|
+
__defNormalProp$R(a, prop, b[prop]);
|
|
16374
16384
|
}
|
|
16375
16385
|
return a;
|
|
16376
16386
|
};
|
|
16377
|
-
var __async$
|
|
16387
|
+
var __async$17 = (__this, __arguments, generator) => {
|
|
16378
16388
|
return new Promise((resolve, reject) => {
|
|
16379
16389
|
var fulfilled = (value) => {
|
|
16380
16390
|
try {
|
|
@@ -16413,12 +16423,12 @@ class FundingSourcesAPI {
|
|
|
16413
16423
|
* The `create` method creates a new funding source for a given user. This requires
|
|
16414
16424
|
* payment information to be collected from the user.
|
|
16415
16425
|
*/
|
|
16416
|
-
this.create = (createFundingSource) => __async$
|
|
16426
|
+
this.create = (createFundingSource) => __async$17(this, null, function* () {
|
|
16417
16427
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16418
16428
|
if (!endUserIpAddress) {
|
|
16419
16429
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
16420
16430
|
}
|
|
16421
|
-
return yield this.client.post("/v1/funding_sources", __spreadValues$
|
|
16431
|
+
return yield this.client.post("/v1/funding_sources", __spreadValues$R({
|
|
16422
16432
|
endUserIpAddress
|
|
16423
16433
|
}, createFundingSource));
|
|
16424
16434
|
});
|
|
@@ -16427,7 +16437,7 @@ class FundingSourcesAPI {
|
|
|
16427
16437
|
* user to update the billing address or payment information associated with the
|
|
16428
16438
|
* funding source.
|
|
16429
16439
|
*/
|
|
16430
|
-
this.update = (billingInfo, creditCardInfo, auctanePayInfo, fundingSourceId) => __async$
|
|
16440
|
+
this.update = (billingInfo, creditCardInfo, auctanePayInfo, fundingSourceId) => __async$17(this, null, function* () {
|
|
16431
16441
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16432
16442
|
if (!endUserIpAddress) {
|
|
16433
16443
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
@@ -16437,7 +16447,7 @@ class FundingSourcesAPI {
|
|
|
16437
16447
|
{
|
|
16438
16448
|
billingInfo,
|
|
16439
16449
|
endUserIpAddress,
|
|
16440
|
-
paymentMethod: __spreadValues$
|
|
16450
|
+
paymentMethod: __spreadValues$R({
|
|
16441
16451
|
creditCardInfo
|
|
16442
16452
|
}, auctanePayInfo)
|
|
16443
16453
|
}
|
|
@@ -16447,19 +16457,19 @@ class FundingSourcesAPI {
|
|
|
16447
16457
|
* The `registerCarrier` method registers a carrier account and associates
|
|
16448
16458
|
* it with a given funding source.
|
|
16449
16459
|
*/
|
|
16450
|
-
this.registerCarrier = (carrier) => __async$
|
|
16460
|
+
this.registerCarrier = (carrier) => __async$17(this, null, function* () {
|
|
16451
16461
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16452
16462
|
if (!endUserIpAddress) {
|
|
16453
16463
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
16454
16464
|
}
|
|
16455
|
-
return yield this.client.post("/v1/registration/funding_source", __spreadValues$
|
|
16465
|
+
return yield this.client.post("/v1/registration/funding_source", __spreadValues$R({
|
|
16456
16466
|
endUserIpAddress
|
|
16457
16467
|
}, carrier));
|
|
16458
16468
|
});
|
|
16459
16469
|
/**
|
|
16460
16470
|
* The `addFunds` method allows you to add funds to a funding source.
|
|
16461
16471
|
*/
|
|
16462
|
-
this.addFunds = (amount, fundingSourceId) => __async$
|
|
16472
|
+
this.addFunds = (amount, fundingSourceId) => __async$17(this, null, function* () {
|
|
16463
16473
|
return yield this.client.put(
|
|
16464
16474
|
`/v1/funding_sources/${fundingSourceId}/add_funds`,
|
|
16465
16475
|
amount
|
|
@@ -16469,7 +16479,7 @@ class FundingSourcesAPI {
|
|
|
16469
16479
|
* The `metadata` method returns seller-specific requirements for creating funding sources
|
|
16470
16480
|
* and attaching carriers
|
|
16471
16481
|
*/
|
|
16472
|
-
this.metadata = () => __async$
|
|
16482
|
+
this.metadata = () => __async$17(this, null, function* () {
|
|
16473
16483
|
return yield this.client.get("/v1/funding_sources/metadata");
|
|
16474
16484
|
});
|
|
16475
16485
|
/**
|
|
@@ -16494,6 +16504,23 @@ class FundingSourcesAPI {
|
|
|
16494
16504
|
"/v1/insurance/funding_source/accepted_terms"
|
|
16495
16505
|
);
|
|
16496
16506
|
};
|
|
16507
|
+
/**
|
|
16508
|
+
* The `acceptedTerms` method retrieves all accepted terms for a specific funding source.
|
|
16509
|
+
*/
|
|
16510
|
+
this.acceptedTerms = (fundingSourceId) => {
|
|
16511
|
+
return this.client.get(
|
|
16512
|
+
`/v1/funding_sources/${fundingSourceId}/accepted_terms`
|
|
16513
|
+
);
|
|
16514
|
+
};
|
|
16515
|
+
/**
|
|
16516
|
+
* The`acceptTerms` method allows users to accept new versions of funding source terms.
|
|
16517
|
+
*/
|
|
16518
|
+
this.acceptTerms = (fundingSourceId, request) => {
|
|
16519
|
+
return this.client.post(
|
|
16520
|
+
`/v1/funding_sources/${fundingSourceId}/accepted_terms`,
|
|
16521
|
+
request
|
|
16522
|
+
);
|
|
16523
|
+
};
|
|
16497
16524
|
this.client = client;
|
|
16498
16525
|
}
|
|
16499
16526
|
}
|
|
@@ -16521,7 +16548,7 @@ class InsuranceAPI {
|
|
|
16521
16548
|
}
|
|
16522
16549
|
}
|
|
16523
16550
|
|
|
16524
|
-
var __async$
|
|
16551
|
+
var __async$16 = (__this, __arguments, generator) => {
|
|
16525
16552
|
return new Promise((resolve, reject) => {
|
|
16526
16553
|
var fulfilled = (value) => {
|
|
16527
16554
|
try {
|
|
@@ -16553,13 +16580,13 @@ class InvoiceAddressAPI {
|
|
|
16553
16580
|
/**
|
|
16554
16581
|
* The `create` method creates a new invoice address for a given user.
|
|
16555
16582
|
*/
|
|
16556
|
-
this.create = (invoiceAddress) => __async$
|
|
16583
|
+
this.create = (invoiceAddress) => __async$16(this, null, function* () {
|
|
16557
16584
|
return yield this.client.post("/v1/invoice_address", invoiceAddress);
|
|
16558
16585
|
});
|
|
16559
16586
|
/**
|
|
16560
16587
|
* The `update` method updates a invoice address for a given user.
|
|
16561
16588
|
*/
|
|
16562
|
-
this.update = (invoiceAddress) => __async$
|
|
16589
|
+
this.update = (invoiceAddress) => __async$16(this, null, function* () {
|
|
16563
16590
|
return yield this.client.put("/v1/invoice_address", invoiceAddress);
|
|
16564
16591
|
});
|
|
16565
16592
|
this.client = client;
|
|
@@ -16621,17 +16648,17 @@ class LabelsAPI {
|
|
|
16621
16648
|
}
|
|
16622
16649
|
}
|
|
16623
16650
|
|
|
16624
|
-
var __getOwnPropSymbols$
|
|
16625
|
-
var __hasOwnProp$
|
|
16626
|
-
var __propIsEnum$
|
|
16651
|
+
var __getOwnPropSymbols$_ = Object.getOwnPropertySymbols;
|
|
16652
|
+
var __hasOwnProp$_ = Object.prototype.hasOwnProperty;
|
|
16653
|
+
var __propIsEnum$_ = Object.prototype.propertyIsEnumerable;
|
|
16627
16654
|
var __objRest$t = (source, exclude) => {
|
|
16628
16655
|
var target = {};
|
|
16629
16656
|
for (var prop in source)
|
|
16630
|
-
if (__hasOwnProp$
|
|
16657
|
+
if (__hasOwnProp$_.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
16631
16658
|
target[prop] = source[prop];
|
|
16632
|
-
if (source != null && __getOwnPropSymbols$
|
|
16633
|
-
for (var prop of __getOwnPropSymbols$
|
|
16634
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
16659
|
+
if (source != null && __getOwnPropSymbols$_)
|
|
16660
|
+
for (var prop of __getOwnPropSymbols$_(source)) {
|
|
16661
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$_.call(source, prop))
|
|
16635
16662
|
target[prop] = source[prop];
|
|
16636
16663
|
}
|
|
16637
16664
|
return target;
|
|
@@ -16752,19 +16779,19 @@ class RateCardsAPI {
|
|
|
16752
16779
|
}
|
|
16753
16780
|
}
|
|
16754
16781
|
|
|
16755
|
-
var __defProp$
|
|
16756
|
-
var __getOwnPropSymbols$
|
|
16757
|
-
var __hasOwnProp$
|
|
16758
|
-
var __propIsEnum$
|
|
16759
|
-
var __defNormalProp$
|
|
16760
|
-
var __spreadValues$
|
|
16782
|
+
var __defProp$Q = Object.defineProperty;
|
|
16783
|
+
var __getOwnPropSymbols$Z = Object.getOwnPropertySymbols;
|
|
16784
|
+
var __hasOwnProp$Z = Object.prototype.hasOwnProperty;
|
|
16785
|
+
var __propIsEnum$Z = Object.prototype.propertyIsEnumerable;
|
|
16786
|
+
var __defNormalProp$Q = (obj, key, value) => key in obj ? __defProp$Q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16787
|
+
var __spreadValues$Q = (a, b) => {
|
|
16761
16788
|
for (var prop in b || (b = {}))
|
|
16762
|
-
if (__hasOwnProp$
|
|
16763
|
-
__defNormalProp$
|
|
16764
|
-
if (__getOwnPropSymbols$
|
|
16765
|
-
for (var prop of __getOwnPropSymbols$
|
|
16766
|
-
if (__propIsEnum$
|
|
16767
|
-
__defNormalProp$
|
|
16789
|
+
if (__hasOwnProp$Z.call(b, prop))
|
|
16790
|
+
__defNormalProp$Q(a, prop, b[prop]);
|
|
16791
|
+
if (__getOwnPropSymbols$Z)
|
|
16792
|
+
for (var prop of __getOwnPropSymbols$Z(b)) {
|
|
16793
|
+
if (__propIsEnum$Z.call(b, prop))
|
|
16794
|
+
__defNormalProp$Q(a, prop, b[prop]);
|
|
16768
16795
|
}
|
|
16769
16796
|
return a;
|
|
16770
16797
|
};
|
|
@@ -16786,7 +16813,7 @@ class RatesAPI {
|
|
|
16786
16813
|
* method.
|
|
16787
16814
|
*/
|
|
16788
16815
|
this.estimate = (params) => {
|
|
16789
|
-
return this.client.post("/v1/rates/estimate", __spreadValues$
|
|
16816
|
+
return this.client.post("/v1/rates/estimate", __spreadValues$Q({}, params));
|
|
16790
16817
|
};
|
|
16791
16818
|
this.client = client;
|
|
16792
16819
|
}
|
|
@@ -16866,7 +16893,7 @@ class SalesOrdersAPI {
|
|
|
16866
16893
|
}
|
|
16867
16894
|
}
|
|
16868
16895
|
|
|
16869
|
-
var __async$
|
|
16896
|
+
var __async$15 = (__this, __arguments, generator) => {
|
|
16870
16897
|
return new Promise((resolve, reject) => {
|
|
16871
16898
|
var fulfilled = (value) => {
|
|
16872
16899
|
try {
|
|
@@ -16924,7 +16951,7 @@ class SellersAPI {
|
|
|
16924
16951
|
/**
|
|
16925
16952
|
* Deletes an API Key
|
|
16926
16953
|
*/
|
|
16927
|
-
this.deleteSellerApiKey = (_0) => __async$
|
|
16954
|
+
this.deleteSellerApiKey = (_0) => __async$15(this, [_0], function* ({
|
|
16928
16955
|
encryptedApiKey,
|
|
16929
16956
|
sellerId,
|
|
16930
16957
|
isSandbox
|
|
@@ -16970,19 +16997,19 @@ class SellersAPI {
|
|
|
16970
16997
|
}
|
|
16971
16998
|
}
|
|
16972
16999
|
|
|
16973
|
-
var __defProp$
|
|
16974
|
-
var __getOwnPropSymbols$
|
|
16975
|
-
var __hasOwnProp$
|
|
16976
|
-
var __propIsEnum$
|
|
16977
|
-
var __defNormalProp$
|
|
16978
|
-
var __spreadValues$
|
|
17000
|
+
var __defProp$P = Object.defineProperty;
|
|
17001
|
+
var __getOwnPropSymbols$Y = Object.getOwnPropertySymbols;
|
|
17002
|
+
var __hasOwnProp$Y = Object.prototype.hasOwnProperty;
|
|
17003
|
+
var __propIsEnum$Y = Object.prototype.propertyIsEnumerable;
|
|
17004
|
+
var __defNormalProp$P = (obj, key, value) => key in obj ? __defProp$P(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17005
|
+
var __spreadValues$P = (a, b) => {
|
|
16979
17006
|
for (var prop in b || (b = {}))
|
|
16980
|
-
if (__hasOwnProp$
|
|
16981
|
-
__defNormalProp$
|
|
16982
|
-
if (__getOwnPropSymbols$
|
|
16983
|
-
for (var prop of __getOwnPropSymbols$
|
|
16984
|
-
if (__propIsEnum$
|
|
16985
|
-
__defNormalProp$
|
|
17007
|
+
if (__hasOwnProp$Y.call(b, prop))
|
|
17008
|
+
__defNormalProp$P(a, prop, b[prop]);
|
|
17009
|
+
if (__getOwnPropSymbols$Y)
|
|
17010
|
+
for (var prop of __getOwnPropSymbols$Y(b)) {
|
|
17011
|
+
if (__propIsEnum$Y.call(b, prop))
|
|
17012
|
+
__defNormalProp$P(a, prop, b[prop]);
|
|
16986
17013
|
}
|
|
16987
17014
|
return a;
|
|
16988
17015
|
};
|
|
@@ -16994,7 +17021,7 @@ class ServicePointsAPI {
|
|
|
16994
17021
|
* Either an address, coordinates, or an address query
|
|
16995
17022
|
*/
|
|
16996
17023
|
this.list = (options) => {
|
|
16997
|
-
return this.client.post("/v1/service_points/list", __spreadValues$
|
|
17024
|
+
return this.client.post("/v1/service_points/list", __spreadValues$P({}, options));
|
|
16998
17025
|
};
|
|
16999
17026
|
/**
|
|
17000
17027
|
* Get a specific service point by its carrier code, country code, and id
|
|
@@ -17012,7 +17039,7 @@ class ServicePointsAPI {
|
|
|
17012
17039
|
}
|
|
17013
17040
|
}
|
|
17014
17041
|
|
|
17015
|
-
var __async$
|
|
17042
|
+
var __async$14 = (__this, __arguments, generator) => {
|
|
17016
17043
|
return new Promise((resolve, reject) => {
|
|
17017
17044
|
var fulfilled = (value) => {
|
|
17018
17045
|
try {
|
|
@@ -17061,7 +17088,7 @@ class ShipmentsAPI {
|
|
|
17061
17088
|
* The `create` method allows for creating shipments based on a list of shipment
|
|
17062
17089
|
* items passed into this method.
|
|
17063
17090
|
*/
|
|
17064
|
-
this.create = (...shipments) => __async$
|
|
17091
|
+
this.create = (...shipments) => __async$14(this, null, function* () {
|
|
17065
17092
|
return this.client.post("/v1/shipments", {
|
|
17066
17093
|
shipments
|
|
17067
17094
|
});
|
|
@@ -34478,38 +34505,38 @@ class WebhooksAPI {
|
|
|
34478
34505
|
}
|
|
34479
34506
|
}
|
|
34480
34507
|
|
|
34481
|
-
var __defProp$
|
|
34482
|
-
var __defProps$
|
|
34483
|
-
var __getOwnPropDescs$
|
|
34484
|
-
var __getOwnPropSymbols$
|
|
34485
|
-
var __hasOwnProp$
|
|
34486
|
-
var __propIsEnum$
|
|
34487
|
-
var __defNormalProp$
|
|
34488
|
-
var __spreadValues$
|
|
34508
|
+
var __defProp$O = Object.defineProperty;
|
|
34509
|
+
var __defProps$L = Object.defineProperties;
|
|
34510
|
+
var __getOwnPropDescs$L = Object.getOwnPropertyDescriptors;
|
|
34511
|
+
var __getOwnPropSymbols$X = Object.getOwnPropertySymbols;
|
|
34512
|
+
var __hasOwnProp$X = Object.prototype.hasOwnProperty;
|
|
34513
|
+
var __propIsEnum$X = Object.prototype.propertyIsEnumerable;
|
|
34514
|
+
var __defNormalProp$O = (obj, key, value) => key in obj ? __defProp$O(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
34515
|
+
var __spreadValues$O = (a, b) => {
|
|
34489
34516
|
for (var prop in b || (b = {}))
|
|
34490
|
-
if (__hasOwnProp$
|
|
34491
|
-
__defNormalProp$
|
|
34492
|
-
if (__getOwnPropSymbols$
|
|
34493
|
-
for (var prop of __getOwnPropSymbols$
|
|
34494
|
-
if (__propIsEnum$
|
|
34495
|
-
__defNormalProp$
|
|
34517
|
+
if (__hasOwnProp$X.call(b, prop))
|
|
34518
|
+
__defNormalProp$O(a, prop, b[prop]);
|
|
34519
|
+
if (__getOwnPropSymbols$X)
|
|
34520
|
+
for (var prop of __getOwnPropSymbols$X(b)) {
|
|
34521
|
+
if (__propIsEnum$X.call(b, prop))
|
|
34522
|
+
__defNormalProp$O(a, prop, b[prop]);
|
|
34496
34523
|
}
|
|
34497
34524
|
return a;
|
|
34498
34525
|
};
|
|
34499
|
-
var __spreadProps$
|
|
34526
|
+
var __spreadProps$L = (a, b) => __defProps$L(a, __getOwnPropDescs$L(b));
|
|
34500
34527
|
var __objRest$s = (source, exclude) => {
|
|
34501
34528
|
var target = {};
|
|
34502
34529
|
for (var prop in source)
|
|
34503
|
-
if (__hasOwnProp$
|
|
34530
|
+
if (__hasOwnProp$X.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
34504
34531
|
target[prop] = source[prop];
|
|
34505
|
-
if (source != null && __getOwnPropSymbols$
|
|
34506
|
-
for (var prop of __getOwnPropSymbols$
|
|
34507
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
34532
|
+
if (source != null && __getOwnPropSymbols$X)
|
|
34533
|
+
for (var prop of __getOwnPropSymbols$X(source)) {
|
|
34534
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$X.call(source, prop))
|
|
34508
34535
|
target[prop] = source[prop];
|
|
34509
34536
|
}
|
|
34510
34537
|
return target;
|
|
34511
34538
|
};
|
|
34512
|
-
var __async$
|
|
34539
|
+
var __async$13 = (__this, __arguments, generator) => {
|
|
34513
34540
|
return new Promise((resolve, reject) => {
|
|
34514
34541
|
var fulfilled = (value) => {
|
|
34515
34542
|
try {
|
|
@@ -34532,7 +34559,7 @@ var __async$11 = (__this, __arguments, generator) => {
|
|
|
34532
34559
|
const logger$1 = E({
|
|
34533
34560
|
level: process.env.NODE_ENV === "production" ? "fatal" : "info",
|
|
34534
34561
|
name: "shipengine-api",
|
|
34535
|
-
serializers: __spreadProps$
|
|
34562
|
+
serializers: __spreadProps$L(__spreadValues$O({}, k), {
|
|
34536
34563
|
req: (req) => ({
|
|
34537
34564
|
headers: req.headers,
|
|
34538
34565
|
method: req.method,
|
|
@@ -34557,7 +34584,7 @@ class ShipEngineAPI {
|
|
|
34557
34584
|
this.getSandboxToken = getSandboxToken;
|
|
34558
34585
|
const client = axios.create({
|
|
34559
34586
|
baseURL,
|
|
34560
|
-
headers: __spreadProps$
|
|
34587
|
+
headers: __spreadProps$L(__spreadValues$O({}, headers), {
|
|
34561
34588
|
"Content-Type": "application/json"
|
|
34562
34589
|
}),
|
|
34563
34590
|
paramsSerializer: (params) => lib.stringify(decamelizeKeys(params), { arrayFormat: "brackets" }),
|
|
@@ -34597,7 +34624,7 @@ class ShipEngineAPI {
|
|
|
34597
34624
|
});
|
|
34598
34625
|
client.defaults.headers.common["Authorization"] = `Bearer ${token}`;
|
|
34599
34626
|
client.interceptors.request.use(
|
|
34600
|
-
(config) => __async$
|
|
34627
|
+
(config) => __async$13(this, null, function* () {
|
|
34601
34628
|
if (config.isSandbox) {
|
|
34602
34629
|
if (!this.sandboxToken) {
|
|
34603
34630
|
this.sandboxToken = yield getSandboxToken == null ? void 0 : getSandboxToken();
|
|
@@ -34626,7 +34653,7 @@ class ShipEngineAPI {
|
|
|
34626
34653
|
}
|
|
34627
34654
|
return res;
|
|
34628
34655
|
},
|
|
34629
|
-
(err) => __async$
|
|
34656
|
+
(err) => __async$13(this, null, function* () {
|
|
34630
34657
|
var _a, _b, _c, _d, _e;
|
|
34631
34658
|
if (debug) {
|
|
34632
34659
|
logger$1.error(
|
|
@@ -34675,7 +34702,7 @@ class ShipEngineAPI {
|
|
|
34675
34702
|
* that token (also known as Seller ID)
|
|
34676
34703
|
*/
|
|
34677
34704
|
getTenant(isSandbox) {
|
|
34678
|
-
return __async$
|
|
34705
|
+
return __async$13(this, null, function* () {
|
|
34679
34706
|
var _a;
|
|
34680
34707
|
if (!isSandbox) {
|
|
34681
34708
|
return this.getTenantFromToken(this.token);
|
|
@@ -34994,25 +35021,25 @@ const delay = (ms) => new Promise((resolve) => {
|
|
|
34994
35021
|
|
|
34995
35022
|
const onError = (_errors) => _default();
|
|
34996
35023
|
|
|
34997
|
-
var __defProp$
|
|
34998
|
-
var __defProps$
|
|
34999
|
-
var __getOwnPropDescs$
|
|
35000
|
-
var __getOwnPropSymbols$
|
|
35001
|
-
var __hasOwnProp$
|
|
35002
|
-
var __propIsEnum$
|
|
35003
|
-
var __defNormalProp$
|
|
35004
|
-
var __spreadValues$
|
|
35024
|
+
var __defProp$N = Object.defineProperty;
|
|
35025
|
+
var __defProps$K = Object.defineProperties;
|
|
35026
|
+
var __getOwnPropDescs$K = Object.getOwnPropertyDescriptors;
|
|
35027
|
+
var __getOwnPropSymbols$W = Object.getOwnPropertySymbols;
|
|
35028
|
+
var __hasOwnProp$W = Object.prototype.hasOwnProperty;
|
|
35029
|
+
var __propIsEnum$W = Object.prototype.propertyIsEnumerable;
|
|
35030
|
+
var __defNormalProp$N = (obj, key, value) => key in obj ? __defProp$N(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
35031
|
+
var __spreadValues$N = (a, b) => {
|
|
35005
35032
|
for (var prop in b || (b = {}))
|
|
35006
|
-
if (__hasOwnProp$
|
|
35007
|
-
__defNormalProp$
|
|
35008
|
-
if (__getOwnPropSymbols$
|
|
35009
|
-
for (var prop of __getOwnPropSymbols$
|
|
35010
|
-
if (__propIsEnum$
|
|
35011
|
-
__defNormalProp$
|
|
35033
|
+
if (__hasOwnProp$W.call(b, prop))
|
|
35034
|
+
__defNormalProp$N(a, prop, b[prop]);
|
|
35035
|
+
if (__getOwnPropSymbols$W)
|
|
35036
|
+
for (var prop of __getOwnPropSymbols$W(b)) {
|
|
35037
|
+
if (__propIsEnum$W.call(b, prop))
|
|
35038
|
+
__defNormalProp$N(a, prop, b[prop]);
|
|
35012
35039
|
}
|
|
35013
35040
|
return a;
|
|
35014
35041
|
};
|
|
35015
|
-
var __spreadProps$
|
|
35042
|
+
var __spreadProps$K = (a, b) => __defProps$K(a, __getOwnPropDescs$K(b));
|
|
35016
35043
|
const streams = [];
|
|
35017
35044
|
if (process.env.NODE_ENV === "production") {
|
|
35018
35045
|
streams.push({
|
|
@@ -35021,7 +35048,7 @@ if (process.env.NODE_ENV === "production") {
|
|
|
35021
35048
|
}
|
|
35022
35049
|
const logger = E({
|
|
35023
35050
|
name: "shipengine",
|
|
35024
|
-
serializers: __spreadProps$
|
|
35051
|
+
serializers: __spreadProps$K(__spreadValues$N({}, k), {
|
|
35025
35052
|
req: (req) => ({
|
|
35026
35053
|
headers: req.headers,
|
|
35027
35054
|
method: req.method,
|
|
@@ -35046,7 +35073,7 @@ const retryUntil = (callbackFn, retries = 10, timeoutBetweenAttempts = 1e3) => P
|
|
|
35046
35073
|
throw error;
|
|
35047
35074
|
});
|
|
35048
35075
|
|
|
35049
|
-
var __async$
|
|
35076
|
+
var __async$12 = (__this, __arguments, generator) => {
|
|
35050
35077
|
return new Promise((resolve, reject) => {
|
|
35051
35078
|
var fulfilled = (value) => {
|
|
35052
35079
|
try {
|
|
@@ -35069,7 +35096,7 @@ var __async$10 = (__this, __arguments, generator) => {
|
|
|
35069
35096
|
const useCreateAccountImage = () => {
|
|
35070
35097
|
const { client } = useShipEngine();
|
|
35071
35098
|
return reactQuery.useMutation({
|
|
35072
|
-
mutationFn: (data) => __async$
|
|
35099
|
+
mutationFn: (data) => __async$12(void 0, null, function* () {
|
|
35073
35100
|
const result = yield client.accountSettings.createImage(data);
|
|
35074
35101
|
return result.data;
|
|
35075
35102
|
}),
|
|
@@ -35078,7 +35105,7 @@ const useCreateAccountImage = () => {
|
|
|
35078
35105
|
});
|
|
35079
35106
|
};
|
|
35080
35107
|
|
|
35081
|
-
var __async
|
|
35108
|
+
var __async$11 = (__this, __arguments, generator) => {
|
|
35082
35109
|
return new Promise((resolve, reject) => {
|
|
35083
35110
|
var fulfilled = (value) => {
|
|
35084
35111
|
try {
|
|
@@ -35101,7 +35128,7 @@ var __async$$ = (__this, __arguments, generator) => {
|
|
|
35101
35128
|
const useDeleteAccountImage = () => {
|
|
35102
35129
|
const { client } = useShipEngine();
|
|
35103
35130
|
return reactQuery.useMutation({
|
|
35104
|
-
mutationFn: (labelImageId) => __async
|
|
35131
|
+
mutationFn: (labelImageId) => __async$11(void 0, null, function* () {
|
|
35105
35132
|
const result = yield client.accountSettings.deleteImage(labelImageId);
|
|
35106
35133
|
return result.data;
|
|
35107
35134
|
}),
|
|
@@ -35130,7 +35157,7 @@ const useGetAccountSettings = () => {
|
|
|
35130
35157
|
});
|
|
35131
35158
|
};
|
|
35132
35159
|
|
|
35133
|
-
var __async$
|
|
35160
|
+
var __async$10 = (__this, __arguments, generator) => {
|
|
35134
35161
|
return new Promise((resolve, reject) => {
|
|
35135
35162
|
var fulfilled = (value) => {
|
|
35136
35163
|
try {
|
|
@@ -35153,7 +35180,7 @@ var __async$_ = (__this, __arguments, generator) => {
|
|
|
35153
35180
|
const useUpdateAccountImage = () => {
|
|
35154
35181
|
const { client } = useShipEngine();
|
|
35155
35182
|
return reactQuery.useMutation({
|
|
35156
|
-
mutationFn: (data) => __async$
|
|
35183
|
+
mutationFn: (data) => __async$10(void 0, null, function* () {
|
|
35157
35184
|
const result = yield client.accountSettings.updateImage(data);
|
|
35158
35185
|
return result.data;
|
|
35159
35186
|
}),
|
|
@@ -35162,7 +35189,7 @@ const useUpdateAccountImage = () => {
|
|
|
35162
35189
|
});
|
|
35163
35190
|
};
|
|
35164
35191
|
|
|
35165
|
-
var __async
|
|
35192
|
+
var __async$$ = (__this, __arguments, generator) => {
|
|
35166
35193
|
return new Promise((resolve, reject) => {
|
|
35167
35194
|
var fulfilled = (value) => {
|
|
35168
35195
|
try {
|
|
@@ -35185,7 +35212,7 @@ var __async$Z = (__this, __arguments, generator) => {
|
|
|
35185
35212
|
const useUpdateAccountSettings = () => {
|
|
35186
35213
|
const { client } = useShipEngine();
|
|
35187
35214
|
return reactQuery.useMutation({
|
|
35188
|
-
mutationFn: (settings) => __async
|
|
35215
|
+
mutationFn: (settings) => __async$$(void 0, null, function* () {
|
|
35189
35216
|
const result = yield client.accountSettings.update(settings);
|
|
35190
35217
|
return result.data;
|
|
35191
35218
|
}),
|
|
@@ -35194,6 +35221,35 @@ const useUpdateAccountSettings = () => {
|
|
|
35194
35221
|
});
|
|
35195
35222
|
};
|
|
35196
35223
|
|
|
35224
|
+
var __defProp$M = Object.defineProperty;
|
|
35225
|
+
var __defProps$J = Object.defineProperties;
|
|
35226
|
+
var __getOwnPropDescs$J = Object.getOwnPropertyDescriptors;
|
|
35227
|
+
var __getOwnPropSymbols$V = Object.getOwnPropertySymbols;
|
|
35228
|
+
var __hasOwnProp$V = Object.prototype.hasOwnProperty;
|
|
35229
|
+
var __propIsEnum$V = Object.prototype.propertyIsEnumerable;
|
|
35230
|
+
var __defNormalProp$M = (obj, key, value) => key in obj ? __defProp$M(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
35231
|
+
var __spreadValues$M = (a, b) => {
|
|
35232
|
+
for (var prop in b || (b = {}))
|
|
35233
|
+
if (__hasOwnProp$V.call(b, prop))
|
|
35234
|
+
__defNormalProp$M(a, prop, b[prop]);
|
|
35235
|
+
if (__getOwnPropSymbols$V)
|
|
35236
|
+
for (var prop of __getOwnPropSymbols$V(b)) {
|
|
35237
|
+
if (__propIsEnum$V.call(b, prop))
|
|
35238
|
+
__defNormalProp$M(a, prop, b[prop]);
|
|
35239
|
+
}
|
|
35240
|
+
return a;
|
|
35241
|
+
};
|
|
35242
|
+
var __spreadProps$J = (a, b) => __defProps$J(a, __getOwnPropDescs$J(b));
|
|
35243
|
+
const useListAccountAddons = (params) => {
|
|
35244
|
+
const { client } = useShipEngine();
|
|
35245
|
+
return reactQuery.useQuery(__spreadProps$J(__spreadValues$M({}, params), {
|
|
35246
|
+
onError,
|
|
35247
|
+
queryFn: () => client.accountAddons.list(),
|
|
35248
|
+
queryKey: ["useListAccountAddons"],
|
|
35249
|
+
select: (result) => result.data.addons
|
|
35250
|
+
}));
|
|
35251
|
+
};
|
|
35252
|
+
|
|
35197
35253
|
var __defProp$L = Object.defineProperty;
|
|
35198
35254
|
var __defProps$I = Object.defineProperties;
|
|
35199
35255
|
var __getOwnPropDescs$I = Object.getOwnPropertyDescriptors;
|
|
@@ -35213,13 +35269,35 @@ var __spreadValues$L = (a, b) => {
|
|
|
35213
35269
|
return a;
|
|
35214
35270
|
};
|
|
35215
35271
|
var __spreadProps$I = (a, b) => __defProps$I(a, __getOwnPropDescs$I(b));
|
|
35216
|
-
|
|
35217
|
-
|
|
35218
|
-
|
|
35219
|
-
|
|
35220
|
-
|
|
35221
|
-
|
|
35222
|
-
|
|
35272
|
+
var __async$_ = (__this, __arguments, generator) => {
|
|
35273
|
+
return new Promise((resolve, reject) => {
|
|
35274
|
+
var fulfilled = (value) => {
|
|
35275
|
+
try {
|
|
35276
|
+
step(generator.next(value));
|
|
35277
|
+
} catch (e) {
|
|
35278
|
+
reject(e);
|
|
35279
|
+
}
|
|
35280
|
+
};
|
|
35281
|
+
var rejected = (value) => {
|
|
35282
|
+
try {
|
|
35283
|
+
step(generator.throw(value));
|
|
35284
|
+
} catch (e) {
|
|
35285
|
+
reject(e);
|
|
35286
|
+
}
|
|
35287
|
+
};
|
|
35288
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
35289
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
35290
|
+
});
|
|
35291
|
+
};
|
|
35292
|
+
const useEnableAccountAddon = (params) => {
|
|
35293
|
+
const { client } = useShipEngine();
|
|
35294
|
+
return reactQuery.useMutation(__spreadProps$I(__spreadValues$L({}, params), {
|
|
35295
|
+
mutationFn: (addonType) => __async$_(void 0, null, function* () {
|
|
35296
|
+
const result = yield client.accountAddons.enable(addonType);
|
|
35297
|
+
return result.data;
|
|
35298
|
+
}),
|
|
35299
|
+
mutationKey: ["useEnableAccountAddon"],
|
|
35300
|
+
onError
|
|
35223
35301
|
}));
|
|
35224
35302
|
};
|
|
35225
35303
|
|
|
@@ -35242,7 +35320,7 @@ var __spreadValues$K = (a, b) => {
|
|
|
35242
35320
|
return a;
|
|
35243
35321
|
};
|
|
35244
35322
|
var __spreadProps$H = (a, b) => __defProps$H(a, __getOwnPropDescs$H(b));
|
|
35245
|
-
var __async$
|
|
35323
|
+
var __async$Z = (__this, __arguments, generator) => {
|
|
35246
35324
|
return new Promise((resolve, reject) => {
|
|
35247
35325
|
var fulfilled = (value) => {
|
|
35248
35326
|
try {
|
|
@@ -35262,14 +35340,14 @@ var __async$Y = (__this, __arguments, generator) => {
|
|
|
35262
35340
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
35263
35341
|
});
|
|
35264
35342
|
};
|
|
35265
|
-
const
|
|
35343
|
+
const useDisableAccountAddon = (params) => {
|
|
35266
35344
|
const { client } = useShipEngine();
|
|
35267
35345
|
return reactQuery.useMutation(__spreadProps$H(__spreadValues$K({}, params), {
|
|
35268
|
-
mutationFn: (addonType) => __async$
|
|
35269
|
-
const result = yield client.accountAddons.
|
|
35346
|
+
mutationFn: (addonType) => __async$Z(void 0, null, function* () {
|
|
35347
|
+
const result = yield client.accountAddons.disable(addonType);
|
|
35270
35348
|
return result.data;
|
|
35271
35349
|
}),
|
|
35272
|
-
mutationKey: ["
|
|
35350
|
+
mutationKey: ["useDisableAccountAddon"],
|
|
35273
35351
|
onError
|
|
35274
35352
|
}));
|
|
35275
35353
|
};
|
|
@@ -35293,60 +35371,9 @@ var __spreadValues$J = (a, b) => {
|
|
|
35293
35371
|
return a;
|
|
35294
35372
|
};
|
|
35295
35373
|
var __spreadProps$G = (a, b) => __defProps$G(a, __getOwnPropDescs$G(b));
|
|
35296
|
-
var __async$X = (__this, __arguments, generator) => {
|
|
35297
|
-
return new Promise((resolve, reject) => {
|
|
35298
|
-
var fulfilled = (value) => {
|
|
35299
|
-
try {
|
|
35300
|
-
step(generator.next(value));
|
|
35301
|
-
} catch (e) {
|
|
35302
|
-
reject(e);
|
|
35303
|
-
}
|
|
35304
|
-
};
|
|
35305
|
-
var rejected = (value) => {
|
|
35306
|
-
try {
|
|
35307
|
-
step(generator.throw(value));
|
|
35308
|
-
} catch (e) {
|
|
35309
|
-
reject(e);
|
|
35310
|
-
}
|
|
35311
|
-
};
|
|
35312
|
-
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
35313
|
-
step((generator = generator.apply(__this, __arguments)).next());
|
|
35314
|
-
});
|
|
35315
|
-
};
|
|
35316
|
-
const useDisableAccountAddon = (params) => {
|
|
35317
|
-
const { client } = useShipEngine();
|
|
35318
|
-
return reactQuery.useMutation(__spreadProps$G(__spreadValues$J({}, params), {
|
|
35319
|
-
mutationFn: (addonType) => __async$X(void 0, null, function* () {
|
|
35320
|
-
const result = yield client.accountAddons.disable(addonType);
|
|
35321
|
-
return result.data;
|
|
35322
|
-
}),
|
|
35323
|
-
mutationKey: ["useDisableAccountAddon"],
|
|
35324
|
-
onError
|
|
35325
|
-
}));
|
|
35326
|
-
};
|
|
35327
|
-
|
|
35328
|
-
var __defProp$I = Object.defineProperty;
|
|
35329
|
-
var __defProps$F = Object.defineProperties;
|
|
35330
|
-
var __getOwnPropDescs$F = Object.getOwnPropertyDescriptors;
|
|
35331
|
-
var __getOwnPropSymbols$R = Object.getOwnPropertySymbols;
|
|
35332
|
-
var __hasOwnProp$R = Object.prototype.hasOwnProperty;
|
|
35333
|
-
var __propIsEnum$R = Object.prototype.propertyIsEnumerable;
|
|
35334
|
-
var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
35335
|
-
var __spreadValues$I = (a, b) => {
|
|
35336
|
-
for (var prop in b || (b = {}))
|
|
35337
|
-
if (__hasOwnProp$R.call(b, prop))
|
|
35338
|
-
__defNormalProp$I(a, prop, b[prop]);
|
|
35339
|
-
if (__getOwnPropSymbols$R)
|
|
35340
|
-
for (var prop of __getOwnPropSymbols$R(b)) {
|
|
35341
|
-
if (__propIsEnum$R.call(b, prop))
|
|
35342
|
-
__defNormalProp$I(a, prop, b[prop]);
|
|
35343
|
-
}
|
|
35344
|
-
return a;
|
|
35345
|
-
};
|
|
35346
|
-
var __spreadProps$F = (a, b) => __defProps$F(a, __getOwnPropDescs$F(b));
|
|
35347
35374
|
const useListAccountFeatures = (params) => {
|
|
35348
35375
|
const { client } = useShipEngine();
|
|
35349
|
-
return reactQuery.useQuery(__spreadProps$
|
|
35376
|
+
return reactQuery.useQuery(__spreadProps$G(__spreadValues$J({}, params), {
|
|
35350
35377
|
onError,
|
|
35351
35378
|
queryFn: () => client.accountFeatures.list(),
|
|
35352
35379
|
queryKey: ["useListAccountFeatures"],
|
|
@@ -35354,7 +35381,7 @@ const useListAccountFeatures = (params) => {
|
|
|
35354
35381
|
}));
|
|
35355
35382
|
};
|
|
35356
35383
|
|
|
35357
|
-
var __async$
|
|
35384
|
+
var __async$Y = (__this, __arguments, generator) => {
|
|
35358
35385
|
return new Promise((resolve, reject) => {
|
|
35359
35386
|
var fulfilled = (value) => {
|
|
35360
35387
|
try {
|
|
@@ -35377,7 +35404,7 @@ var __async$W = (__this, __arguments, generator) => {
|
|
|
35377
35404
|
const useRequestAccountFeature = () => {
|
|
35378
35405
|
const { client } = useShipEngine();
|
|
35379
35406
|
return reactQuery.useMutation({
|
|
35380
|
-
mutationFn: (request) => __async$
|
|
35407
|
+
mutationFn: (request) => __async$Y(void 0, null, function* () {
|
|
35381
35408
|
const result = yield client.accountFeatures.request(request);
|
|
35382
35409
|
return result.data;
|
|
35383
35410
|
}),
|
|
@@ -35386,7 +35413,7 @@ const useRequestAccountFeature = () => {
|
|
|
35386
35413
|
});
|
|
35387
35414
|
};
|
|
35388
35415
|
|
|
35389
|
-
var __async$
|
|
35416
|
+
var __async$X = (__this, __arguments, generator) => {
|
|
35390
35417
|
return new Promise((resolve, reject) => {
|
|
35391
35418
|
var fulfilled = (value) => {
|
|
35392
35419
|
try {
|
|
@@ -35409,7 +35436,7 @@ var __async$V = (__this, __arguments, generator) => {
|
|
|
35409
35436
|
const useParseAddress = () => {
|
|
35410
35437
|
const { client } = useShipEngine();
|
|
35411
35438
|
return reactQuery.useMutation({
|
|
35412
|
-
mutationFn: (_0) => __async$
|
|
35439
|
+
mutationFn: (_0) => __async$X(void 0, [_0], function* ({ address, text }) {
|
|
35413
35440
|
const result = yield client.addresses.parse(text, address);
|
|
35414
35441
|
return result.data;
|
|
35415
35442
|
}),
|
|
@@ -35418,7 +35445,7 @@ const useParseAddress = () => {
|
|
|
35418
35445
|
});
|
|
35419
35446
|
};
|
|
35420
35447
|
|
|
35421
|
-
var __async$
|
|
35448
|
+
var __async$W = (__this, __arguments, generator) => {
|
|
35422
35449
|
return new Promise((resolve, reject) => {
|
|
35423
35450
|
var fulfilled = (value) => {
|
|
35424
35451
|
try {
|
|
@@ -35441,7 +35468,7 @@ var __async$U = (__this, __arguments, generator) => {
|
|
|
35441
35468
|
const useValidateAddresses = () => {
|
|
35442
35469
|
const { client } = useShipEngine();
|
|
35443
35470
|
return reactQuery.useMutation({
|
|
35444
|
-
mutationFn: (addresses) => __async$
|
|
35471
|
+
mutationFn: (addresses) => __async$W(void 0, null, function* () {
|
|
35445
35472
|
const result = yield client.addresses.validate(addresses);
|
|
35446
35473
|
return result.data;
|
|
35447
35474
|
}),
|
|
@@ -35450,26 +35477,26 @@ const useValidateAddresses = () => {
|
|
|
35450
35477
|
});
|
|
35451
35478
|
};
|
|
35452
35479
|
|
|
35453
|
-
var __defProp$
|
|
35454
|
-
var __defProps$
|
|
35455
|
-
var __getOwnPropDescs$
|
|
35456
|
-
var __getOwnPropSymbols$
|
|
35457
|
-
var __hasOwnProp$
|
|
35458
|
-
var __propIsEnum$
|
|
35459
|
-
var __defNormalProp$
|
|
35460
|
-
var __spreadValues$
|
|
35480
|
+
var __defProp$I = Object.defineProperty;
|
|
35481
|
+
var __defProps$F = Object.defineProperties;
|
|
35482
|
+
var __getOwnPropDescs$F = Object.getOwnPropertyDescriptors;
|
|
35483
|
+
var __getOwnPropSymbols$R = Object.getOwnPropertySymbols;
|
|
35484
|
+
var __hasOwnProp$R = Object.prototype.hasOwnProperty;
|
|
35485
|
+
var __propIsEnum$R = Object.prototype.propertyIsEnumerable;
|
|
35486
|
+
var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
35487
|
+
var __spreadValues$I = (a, b) => {
|
|
35461
35488
|
for (var prop in b || (b = {}))
|
|
35462
|
-
if (__hasOwnProp$
|
|
35463
|
-
__defNormalProp$
|
|
35464
|
-
if (__getOwnPropSymbols$
|
|
35465
|
-
for (var prop of __getOwnPropSymbols$
|
|
35466
|
-
if (__propIsEnum$
|
|
35467
|
-
__defNormalProp$
|
|
35489
|
+
if (__hasOwnProp$R.call(b, prop))
|
|
35490
|
+
__defNormalProp$I(a, prop, b[prop]);
|
|
35491
|
+
if (__getOwnPropSymbols$R)
|
|
35492
|
+
for (var prop of __getOwnPropSymbols$R(b)) {
|
|
35493
|
+
if (__propIsEnum$R.call(b, prop))
|
|
35494
|
+
__defNormalProp$I(a, prop, b[prop]);
|
|
35468
35495
|
}
|
|
35469
35496
|
return a;
|
|
35470
35497
|
};
|
|
35471
|
-
var __spreadProps$
|
|
35472
|
-
var __async$
|
|
35498
|
+
var __spreadProps$F = (a, b) => __defProps$F(a, __getOwnPropDescs$F(b));
|
|
35499
|
+
var __async$V = (__this, __arguments, generator) => {
|
|
35473
35500
|
return new Promise((resolve, reject) => {
|
|
35474
35501
|
var fulfilled = (value) => {
|
|
35475
35502
|
try {
|
|
@@ -35491,8 +35518,8 @@ var __async$T = (__this, __arguments, generator) => {
|
|
|
35491
35518
|
};
|
|
35492
35519
|
const useCreateAuctanePaySession = (params) => {
|
|
35493
35520
|
const { client } = useShipEngine();
|
|
35494
|
-
return reactQuery.useMutation(__spreadProps$
|
|
35495
|
-
mutationFn: (request) => __async$
|
|
35521
|
+
return reactQuery.useMutation(__spreadProps$F(__spreadValues$I({}, params), {
|
|
35522
|
+
mutationFn: (request) => __async$V(void 0, null, function* () {
|
|
35496
35523
|
const result = yield client.auctanePay.createSession(request);
|
|
35497
35524
|
return result.data;
|
|
35498
35525
|
}),
|
|
@@ -35501,6 +35528,36 @@ const useCreateAuctanePaySession = (params) => {
|
|
|
35501
35528
|
}));
|
|
35502
35529
|
};
|
|
35503
35530
|
|
|
35531
|
+
var __defProp$H = Object.defineProperty;
|
|
35532
|
+
var __defProps$E = Object.defineProperties;
|
|
35533
|
+
var __getOwnPropDescs$E = Object.getOwnPropertyDescriptors;
|
|
35534
|
+
var __getOwnPropSymbols$Q = Object.getOwnPropertySymbols;
|
|
35535
|
+
var __hasOwnProp$Q = Object.prototype.hasOwnProperty;
|
|
35536
|
+
var __propIsEnum$Q = Object.prototype.propertyIsEnumerable;
|
|
35537
|
+
var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
35538
|
+
var __spreadValues$H = (a, b) => {
|
|
35539
|
+
for (var prop in b || (b = {}))
|
|
35540
|
+
if (__hasOwnProp$Q.call(b, prop))
|
|
35541
|
+
__defNormalProp$H(a, prop, b[prop]);
|
|
35542
|
+
if (__getOwnPropSymbols$Q)
|
|
35543
|
+
for (var prop of __getOwnPropSymbols$Q(b)) {
|
|
35544
|
+
if (__propIsEnum$Q.call(b, prop))
|
|
35545
|
+
__defNormalProp$H(a, prop, b[prop]);
|
|
35546
|
+
}
|
|
35547
|
+
return a;
|
|
35548
|
+
};
|
|
35549
|
+
var __spreadProps$E = (a, b) => __defProps$E(a, __getOwnPropDescs$E(b));
|
|
35550
|
+
const useGetAuctanePayConfig = (params) => {
|
|
35551
|
+
const { client } = useShipEngine();
|
|
35552
|
+
const queryParams = __spreadValues$H({}, params);
|
|
35553
|
+
return reactQuery.useQuery(__spreadProps$E(__spreadValues$H({}, queryParams), {
|
|
35554
|
+
onError,
|
|
35555
|
+
queryFn: () => client.auctanePay.getConfig(),
|
|
35556
|
+
queryKey: ["useGetAuctanePayConfig"],
|
|
35557
|
+
select: (result) => result.data
|
|
35558
|
+
}));
|
|
35559
|
+
};
|
|
35560
|
+
|
|
35504
35561
|
var __defProp$G = Object.defineProperty;
|
|
35505
35562
|
var __defProps$D = Object.defineProperties;
|
|
35506
35563
|
var __getOwnPropDescs$D = Object.getOwnPropertyDescriptors;
|
|
@@ -35520,37 +35577,7 @@ var __spreadValues$G = (a, b) => {
|
|
|
35520
35577
|
return a;
|
|
35521
35578
|
};
|
|
35522
35579
|
var __spreadProps$D = (a, b) => __defProps$D(a, __getOwnPropDescs$D(b));
|
|
35523
|
-
|
|
35524
|
-
const { client } = useShipEngine();
|
|
35525
|
-
const queryParams = __spreadValues$G({}, params);
|
|
35526
|
-
return reactQuery.useQuery(__spreadProps$D(__spreadValues$G({}, queryParams), {
|
|
35527
|
-
onError,
|
|
35528
|
-
queryFn: () => client.auctanePay.getConfig(),
|
|
35529
|
-
queryKey: ["useGetAuctanePayConfig"],
|
|
35530
|
-
select: (result) => result.data
|
|
35531
|
-
}));
|
|
35532
|
-
};
|
|
35533
|
-
|
|
35534
|
-
var __defProp$F = Object.defineProperty;
|
|
35535
|
-
var __defProps$C = Object.defineProperties;
|
|
35536
|
-
var __getOwnPropDescs$C = Object.getOwnPropertyDescriptors;
|
|
35537
|
-
var __getOwnPropSymbols$O = Object.getOwnPropertySymbols;
|
|
35538
|
-
var __hasOwnProp$O = Object.prototype.hasOwnProperty;
|
|
35539
|
-
var __propIsEnum$O = Object.prototype.propertyIsEnumerable;
|
|
35540
|
-
var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
35541
|
-
var __spreadValues$F = (a, b) => {
|
|
35542
|
-
for (var prop in b || (b = {}))
|
|
35543
|
-
if (__hasOwnProp$O.call(b, prop))
|
|
35544
|
-
__defNormalProp$F(a, prop, b[prop]);
|
|
35545
|
-
if (__getOwnPropSymbols$O)
|
|
35546
|
-
for (var prop of __getOwnPropSymbols$O(b)) {
|
|
35547
|
-
if (__propIsEnum$O.call(b, prop))
|
|
35548
|
-
__defNormalProp$F(a, prop, b[prop]);
|
|
35549
|
-
}
|
|
35550
|
-
return a;
|
|
35551
|
-
};
|
|
35552
|
-
var __spreadProps$C = (a, b) => __defProps$C(a, __getOwnPropDescs$C(b));
|
|
35553
|
-
var __async$S = (__this, __arguments, generator) => {
|
|
35580
|
+
var __async$U = (__this, __arguments, generator) => {
|
|
35554
35581
|
return new Promise((resolve, reject) => {
|
|
35555
35582
|
var fulfilled = (value) => {
|
|
35556
35583
|
try {
|
|
@@ -35572,8 +35599,8 @@ var __async$S = (__this, __arguments, generator) => {
|
|
|
35572
35599
|
};
|
|
35573
35600
|
const usePreviewTransaction = (params) => {
|
|
35574
35601
|
const { client } = useShipEngine();
|
|
35575
|
-
return reactQuery.useMutation(__spreadProps$
|
|
35576
|
-
mutationFn: (_0) => __async$
|
|
35602
|
+
return reactQuery.useMutation(__spreadProps$D(__spreadValues$G({}, params), {
|
|
35603
|
+
mutationFn: (_0) => __async$U(void 0, [_0], function* ({ amount, transactionCategory = "add_funds" }) {
|
|
35577
35604
|
const request = {
|
|
35578
35605
|
amount,
|
|
35579
35606
|
transactionCategory
|
|
@@ -35586,6 +35613,36 @@ const usePreviewTransaction = (params) => {
|
|
|
35586
35613
|
}));
|
|
35587
35614
|
};
|
|
35588
35615
|
|
|
35616
|
+
var __defProp$F = Object.defineProperty;
|
|
35617
|
+
var __defProps$C = Object.defineProperties;
|
|
35618
|
+
var __getOwnPropDescs$C = Object.getOwnPropertyDescriptors;
|
|
35619
|
+
var __getOwnPropSymbols$O = Object.getOwnPropertySymbols;
|
|
35620
|
+
var __hasOwnProp$O = Object.prototype.hasOwnProperty;
|
|
35621
|
+
var __propIsEnum$O = Object.prototype.propertyIsEnumerable;
|
|
35622
|
+
var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
35623
|
+
var __spreadValues$F = (a, b) => {
|
|
35624
|
+
for (var prop in b || (b = {}))
|
|
35625
|
+
if (__hasOwnProp$O.call(b, prop))
|
|
35626
|
+
__defNormalProp$F(a, prop, b[prop]);
|
|
35627
|
+
if (__getOwnPropSymbols$O)
|
|
35628
|
+
for (var prop of __getOwnPropSymbols$O(b)) {
|
|
35629
|
+
if (__propIsEnum$O.call(b, prop))
|
|
35630
|
+
__defNormalProp$F(a, prop, b[prop]);
|
|
35631
|
+
}
|
|
35632
|
+
return a;
|
|
35633
|
+
};
|
|
35634
|
+
var __spreadProps$C = (a, b) => __defProps$C(a, __getOwnPropDescs$C(b));
|
|
35635
|
+
const useGetPaymentMethods = (params) => {
|
|
35636
|
+
const { client } = useShipEngine();
|
|
35637
|
+
const queryParams = __spreadValues$F({}, params);
|
|
35638
|
+
return reactQuery.useQuery(__spreadProps$C(__spreadValues$F({}, queryParams), {
|
|
35639
|
+
onError,
|
|
35640
|
+
queryFn: () => client.auctanePay.getPaymentMethods(),
|
|
35641
|
+
queryKey: ["useGetPaymentMethods"],
|
|
35642
|
+
select: (result) => result.data
|
|
35643
|
+
}));
|
|
35644
|
+
};
|
|
35645
|
+
|
|
35589
35646
|
var __defProp$E = Object.defineProperty;
|
|
35590
35647
|
var __defProps$B = Object.defineProperties;
|
|
35591
35648
|
var __getOwnPropDescs$B = Object.getOwnPropertyDescriptors;
|
|
@@ -35605,14 +35662,35 @@ var __spreadValues$E = (a, b) => {
|
|
|
35605
35662
|
return a;
|
|
35606
35663
|
};
|
|
35607
35664
|
var __spreadProps$B = (a, b) => __defProps$B(a, __getOwnPropDescs$B(b));
|
|
35608
|
-
|
|
35665
|
+
var __async$T = (__this, __arguments, generator) => {
|
|
35666
|
+
return new Promise((resolve, reject) => {
|
|
35667
|
+
var fulfilled = (value) => {
|
|
35668
|
+
try {
|
|
35669
|
+
step(generator.next(value));
|
|
35670
|
+
} catch (e) {
|
|
35671
|
+
reject(e);
|
|
35672
|
+
}
|
|
35673
|
+
};
|
|
35674
|
+
var rejected = (value) => {
|
|
35675
|
+
try {
|
|
35676
|
+
step(generator.throw(value));
|
|
35677
|
+
} catch (e) {
|
|
35678
|
+
reject(e);
|
|
35679
|
+
}
|
|
35680
|
+
};
|
|
35681
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
35682
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
35683
|
+
});
|
|
35684
|
+
};
|
|
35685
|
+
const useDeletePaymentMethod = (params) => {
|
|
35609
35686
|
const { client } = useShipEngine();
|
|
35610
|
-
|
|
35611
|
-
|
|
35612
|
-
|
|
35613
|
-
|
|
35614
|
-
|
|
35615
|
-
|
|
35687
|
+
return reactQuery.useMutation(__spreadProps$B(__spreadValues$E({}, params), {
|
|
35688
|
+
mutationFn: (paymentMethodId) => __async$T(void 0, null, function* () {
|
|
35689
|
+
const result = yield client.auctanePay.deletePaymentMethod(paymentMethodId);
|
|
35690
|
+
return result.data;
|
|
35691
|
+
}),
|
|
35692
|
+
mutationKey: ["useDeletePaymentMethod"],
|
|
35693
|
+
onError
|
|
35616
35694
|
}));
|
|
35617
35695
|
};
|
|
35618
35696
|
|
|
@@ -35635,7 +35713,7 @@ var __spreadValues$D = (a, b) => {
|
|
|
35635
35713
|
return a;
|
|
35636
35714
|
};
|
|
35637
35715
|
var __spreadProps$A = (a, b) => __defProps$A(a, __getOwnPropDescs$A(b));
|
|
35638
|
-
var __async$
|
|
35716
|
+
var __async$S = (__this, __arguments, generator) => {
|
|
35639
35717
|
return new Promise((resolve, reject) => {
|
|
35640
35718
|
var fulfilled = (value) => {
|
|
35641
35719
|
try {
|
|
@@ -35655,14 +35733,14 @@ var __async$R = (__this, __arguments, generator) => {
|
|
|
35655
35733
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
35656
35734
|
});
|
|
35657
35735
|
};
|
|
35658
|
-
const
|
|
35736
|
+
const useUpdatePaymentMethod = (params) => {
|
|
35659
35737
|
const { client } = useShipEngine();
|
|
35660
35738
|
return reactQuery.useMutation(__spreadProps$A(__spreadValues$D({}, params), {
|
|
35661
|
-
mutationFn: (
|
|
35662
|
-
const result = yield client.auctanePay.
|
|
35739
|
+
mutationFn: (_0) => __async$S(void 0, [_0], function* ({ paymentMethodId, payload }) {
|
|
35740
|
+
const result = yield client.auctanePay.updatePaymentMethod(paymentMethodId, payload);
|
|
35663
35741
|
return result.data;
|
|
35664
35742
|
}),
|
|
35665
|
-
mutationKey: ["
|
|
35743
|
+
mutationKey: ["useUpdatePaymentMethod"],
|
|
35666
35744
|
onError
|
|
35667
35745
|
}));
|
|
35668
35746
|
};
|
|
@@ -35686,7 +35764,7 @@ var __spreadValues$C = (a, b) => {
|
|
|
35686
35764
|
return a;
|
|
35687
35765
|
};
|
|
35688
35766
|
var __spreadProps$z = (a, b) => __defProps$z(a, __getOwnPropDescs$z(b));
|
|
35689
|
-
var __async$
|
|
35767
|
+
var __async$R = (__this, __arguments, generator) => {
|
|
35690
35768
|
return new Promise((resolve, reject) => {
|
|
35691
35769
|
var fulfilled = (value) => {
|
|
35692
35770
|
try {
|
|
@@ -35706,14 +35784,14 @@ var __async$Q = (__this, __arguments, generator) => {
|
|
|
35706
35784
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
35707
35785
|
});
|
|
35708
35786
|
};
|
|
35709
|
-
const
|
|
35787
|
+
const useIdentityVerification = (params) => {
|
|
35710
35788
|
const { client } = useShipEngine();
|
|
35711
35789
|
return reactQuery.useMutation(__spreadProps$z(__spreadValues$C({}, params), {
|
|
35712
|
-
mutationFn: (
|
|
35713
|
-
const result = yield client.auctanePay.
|
|
35790
|
+
mutationFn: () => __async$R(void 0, null, function* () {
|
|
35791
|
+
const result = yield client.auctanePay.identityVerification();
|
|
35714
35792
|
return result.data;
|
|
35715
35793
|
}),
|
|
35716
|
-
mutationKey: ["
|
|
35794
|
+
mutationKey: ["useIdentityVerification"],
|
|
35717
35795
|
onError
|
|
35718
35796
|
}));
|
|
35719
35797
|
};
|
|
@@ -35737,7 +35815,18 @@ var __spreadValues$B = (a, b) => {
|
|
|
35737
35815
|
return a;
|
|
35738
35816
|
};
|
|
35739
35817
|
var __spreadProps$y = (a, b) => __defProps$y(a, __getOwnPropDescs$y(b));
|
|
35740
|
-
|
|
35818
|
+
const useGetPaymentAccount = (params) => {
|
|
35819
|
+
const { client } = useShipEngine();
|
|
35820
|
+
const queryParams = __spreadValues$B({}, params);
|
|
35821
|
+
return reactQuery.useQuery(__spreadProps$y(__spreadValues$B({}, queryParams), {
|
|
35822
|
+
onError,
|
|
35823
|
+
queryFn: () => client.auctanePay.getPaymentAccount(),
|
|
35824
|
+
queryKey: ["useGetPaymentAccount"],
|
|
35825
|
+
select: (result) => result.data
|
|
35826
|
+
}));
|
|
35827
|
+
};
|
|
35828
|
+
|
|
35829
|
+
var __async$Q = (__this, __arguments, generator) => {
|
|
35741
35830
|
return new Promise((resolve, reject) => {
|
|
35742
35831
|
var fulfilled = (value) => {
|
|
35743
35832
|
try {
|
|
@@ -35757,49 +35846,19 @@ var __async$P = (__this, __arguments, generator) => {
|
|
|
35757
35846
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
35758
35847
|
});
|
|
35759
35848
|
};
|
|
35760
|
-
const
|
|
35849
|
+
const useAcceptCarrierTerms = (carrierId) => {
|
|
35761
35850
|
const { client } = useShipEngine();
|
|
35762
|
-
return reactQuery.useMutation(
|
|
35763
|
-
mutationFn: () => __async$
|
|
35764
|
-
const result = yield client.
|
|
35765
|
-
return result.data;
|
|
35766
|
-
}),
|
|
35767
|
-
mutationKey: ["
|
|
35768
|
-
onError
|
|
35769
|
-
})
|
|
35770
|
-
};
|
|
35771
|
-
|
|
35772
|
-
var __defProp$A = Object.defineProperty;
|
|
35773
|
-
var __defProps$x = Object.defineProperties;
|
|
35774
|
-
var __getOwnPropDescs$x = Object.getOwnPropertyDescriptors;
|
|
35775
|
-
var __getOwnPropSymbols$J = Object.getOwnPropertySymbols;
|
|
35776
|
-
var __hasOwnProp$J = Object.prototype.hasOwnProperty;
|
|
35777
|
-
var __propIsEnum$J = Object.prototype.propertyIsEnumerable;
|
|
35778
|
-
var __defNormalProp$A = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
35779
|
-
var __spreadValues$A = (a, b) => {
|
|
35780
|
-
for (var prop in b || (b = {}))
|
|
35781
|
-
if (__hasOwnProp$J.call(b, prop))
|
|
35782
|
-
__defNormalProp$A(a, prop, b[prop]);
|
|
35783
|
-
if (__getOwnPropSymbols$J)
|
|
35784
|
-
for (var prop of __getOwnPropSymbols$J(b)) {
|
|
35785
|
-
if (__propIsEnum$J.call(b, prop))
|
|
35786
|
-
__defNormalProp$A(a, prop, b[prop]);
|
|
35787
|
-
}
|
|
35788
|
-
return a;
|
|
35789
|
-
};
|
|
35790
|
-
var __spreadProps$x = (a, b) => __defProps$x(a, __getOwnPropDescs$x(b));
|
|
35791
|
-
const useGetPaymentAccount = (params) => {
|
|
35792
|
-
const { client } = useShipEngine();
|
|
35793
|
-
const queryParams = __spreadValues$A({}, params);
|
|
35794
|
-
return reactQuery.useQuery(__spreadProps$x(__spreadValues$A({}, queryParams), {
|
|
35795
|
-
onError,
|
|
35796
|
-
queryFn: () => client.auctanePay.getPaymentAccount(),
|
|
35797
|
-
queryKey: ["useGetPaymentAccount"],
|
|
35798
|
-
select: (result) => result.data
|
|
35799
|
-
}));
|
|
35851
|
+
return reactQuery.useMutation({
|
|
35852
|
+
mutationFn: (request) => __async$Q(void 0, null, function* () {
|
|
35853
|
+
const result = yield client.carriers.acceptTerms(carrierId, request);
|
|
35854
|
+
return result.data.acceptedTerms;
|
|
35855
|
+
}),
|
|
35856
|
+
mutationKey: ["useAcceptCarrierTerms", carrierId],
|
|
35857
|
+
onError
|
|
35858
|
+
});
|
|
35800
35859
|
};
|
|
35801
35860
|
|
|
35802
|
-
var __async$
|
|
35861
|
+
var __async$P = (__this, __arguments, generator) => {
|
|
35803
35862
|
return new Promise((resolve, reject) => {
|
|
35804
35863
|
var fulfilled = (value) => {
|
|
35805
35864
|
try {
|
|
@@ -35822,7 +35881,7 @@ var __async$O = (__this, __arguments, generator) => {
|
|
|
35822
35881
|
const useAddFunds = () => {
|
|
35823
35882
|
const { client } = useShipEngine();
|
|
35824
35883
|
return reactQuery.useMutation({
|
|
35825
|
-
mutationFn: (_0) => __async$
|
|
35884
|
+
mutationFn: (_0) => __async$P(void 0, [_0], function* ({ carrierId, funds }) {
|
|
35826
35885
|
const result = yield client.carriers.addFunds(carrierId, funds);
|
|
35827
35886
|
return result.data;
|
|
35828
35887
|
}),
|
|
@@ -35831,7 +35890,7 @@ const useAddFunds = () => {
|
|
|
35831
35890
|
});
|
|
35832
35891
|
};
|
|
35833
35892
|
|
|
35834
|
-
var __async$
|
|
35893
|
+
var __async$O = (__this, __arguments, generator) => {
|
|
35835
35894
|
return new Promise((resolve, reject) => {
|
|
35836
35895
|
var fulfilled = (value) => {
|
|
35837
35896
|
try {
|
|
@@ -35854,7 +35913,7 @@ var __async$N = (__this, __arguments, generator) => {
|
|
|
35854
35913
|
const useConnectCarrier = () => {
|
|
35855
35914
|
const { client } = useShipEngine();
|
|
35856
35915
|
return reactQuery.useMutation({
|
|
35857
|
-
mutationFn: (params) => __async$
|
|
35916
|
+
mutationFn: (params) => __async$O(void 0, null, function* () {
|
|
35858
35917
|
const result = yield client.carriers.connect(params);
|
|
35859
35918
|
return result.data;
|
|
35860
35919
|
}),
|
|
@@ -35963,41 +36022,41 @@ const useGetServicesByCarrier = (carrierId) => {
|
|
|
35963
36022
|
});
|
|
35964
36023
|
};
|
|
35965
36024
|
|
|
35966
|
-
var __defProp$
|
|
35967
|
-
var __defProps$
|
|
35968
|
-
var __getOwnPropDescs$
|
|
35969
|
-
var __getOwnPropSymbols$
|
|
35970
|
-
var __hasOwnProp$
|
|
35971
|
-
var __propIsEnum$
|
|
35972
|
-
var __defNormalProp$
|
|
35973
|
-
var __spreadValues$
|
|
36025
|
+
var __defProp$A = Object.defineProperty;
|
|
36026
|
+
var __defProps$x = Object.defineProperties;
|
|
36027
|
+
var __getOwnPropDescs$x = Object.getOwnPropertyDescriptors;
|
|
36028
|
+
var __getOwnPropSymbols$J = Object.getOwnPropertySymbols;
|
|
36029
|
+
var __hasOwnProp$J = Object.prototype.hasOwnProperty;
|
|
36030
|
+
var __propIsEnum$J = Object.prototype.propertyIsEnumerable;
|
|
36031
|
+
var __defNormalProp$A = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
36032
|
+
var __spreadValues$A = (a, b) => {
|
|
35974
36033
|
for (var prop in b || (b = {}))
|
|
35975
|
-
if (__hasOwnProp$
|
|
35976
|
-
__defNormalProp$
|
|
35977
|
-
if (__getOwnPropSymbols$
|
|
35978
|
-
for (var prop of __getOwnPropSymbols$
|
|
35979
|
-
if (__propIsEnum$
|
|
35980
|
-
__defNormalProp$
|
|
36034
|
+
if (__hasOwnProp$J.call(b, prop))
|
|
36035
|
+
__defNormalProp$A(a, prop, b[prop]);
|
|
36036
|
+
if (__getOwnPropSymbols$J)
|
|
36037
|
+
for (var prop of __getOwnPropSymbols$J(b)) {
|
|
36038
|
+
if (__propIsEnum$J.call(b, prop))
|
|
36039
|
+
__defNormalProp$A(a, prop, b[prop]);
|
|
35981
36040
|
}
|
|
35982
36041
|
return a;
|
|
35983
36042
|
};
|
|
35984
|
-
var __spreadProps$
|
|
36043
|
+
var __spreadProps$x = (a, b) => __defProps$x(a, __getOwnPropDescs$x(b));
|
|
35985
36044
|
var __objRest$r = (source, exclude) => {
|
|
35986
36045
|
var target = {};
|
|
35987
36046
|
for (var prop in source)
|
|
35988
|
-
if (__hasOwnProp$
|
|
36047
|
+
if (__hasOwnProp$J.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
35989
36048
|
target[prop] = source[prop];
|
|
35990
|
-
if (source != null && __getOwnPropSymbols$
|
|
35991
|
-
for (var prop of __getOwnPropSymbols$
|
|
35992
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
36049
|
+
if (source != null && __getOwnPropSymbols$J)
|
|
36050
|
+
for (var prop of __getOwnPropSymbols$J(source)) {
|
|
36051
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$J.call(source, prop))
|
|
35993
36052
|
target[prop] = source[prop];
|
|
35994
36053
|
}
|
|
35995
36054
|
return target;
|
|
35996
36055
|
};
|
|
35997
36056
|
const useListCarriers = (params) => {
|
|
35998
36057
|
const { client } = useShipEngine();
|
|
35999
|
-
const _a = __spreadValues$
|
|
36000
|
-
return reactQuery.useQuery(__spreadProps$
|
|
36058
|
+
const _a = __spreadValues$A({}, params), { queryFnParams } = _a, rest = __objRest$r(_a, ["queryFnParams"]);
|
|
36059
|
+
return reactQuery.useQuery(__spreadProps$x(__spreadValues$A({}, rest), {
|
|
36001
36060
|
onError,
|
|
36002
36061
|
queryFn: () => client.carriers.list(queryFnParams),
|
|
36003
36062
|
queryKey: ["useListCarriers", queryFnParams],
|
|
@@ -36005,22 +36064,22 @@ const useListCarriers = (params) => {
|
|
|
36005
36064
|
}));
|
|
36006
36065
|
};
|
|
36007
36066
|
|
|
36008
|
-
var __getOwnPropSymbols$
|
|
36009
|
-
var __hasOwnProp$
|
|
36010
|
-
var __propIsEnum$
|
|
36067
|
+
var __getOwnPropSymbols$I = Object.getOwnPropertySymbols;
|
|
36068
|
+
var __hasOwnProp$I = Object.prototype.hasOwnProperty;
|
|
36069
|
+
var __propIsEnum$I = Object.prototype.propertyIsEnumerable;
|
|
36011
36070
|
var __objRest$q = (source, exclude) => {
|
|
36012
36071
|
var target = {};
|
|
36013
36072
|
for (var prop in source)
|
|
36014
|
-
if (__hasOwnProp$
|
|
36073
|
+
if (__hasOwnProp$I.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
36015
36074
|
target[prop] = source[prop];
|
|
36016
|
-
if (source != null && __getOwnPropSymbols$
|
|
36017
|
-
for (var prop of __getOwnPropSymbols$
|
|
36018
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
36075
|
+
if (source != null && __getOwnPropSymbols$I)
|
|
36076
|
+
for (var prop of __getOwnPropSymbols$I(source)) {
|
|
36077
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$I.call(source, prop))
|
|
36019
36078
|
target[prop] = source[prop];
|
|
36020
36079
|
}
|
|
36021
36080
|
return target;
|
|
36022
36081
|
};
|
|
36023
|
-
var __async$
|
|
36082
|
+
var __async$N = (__this, __arguments, generator) => {
|
|
36024
36083
|
return new Promise((resolve, reject) => {
|
|
36025
36084
|
var fulfilled = (value) => {
|
|
36026
36085
|
try {
|
|
@@ -36044,7 +36103,7 @@ const useUpdateAutoFunding = () => {
|
|
|
36044
36103
|
const { client } = useShipEngine();
|
|
36045
36104
|
const queryClient = reactQuery.useQueryClient();
|
|
36046
36105
|
return reactQuery.useMutation({
|
|
36047
|
-
mutationFn: (_a) => __async$
|
|
36106
|
+
mutationFn: (_a) => __async$N(void 0, null, function* () {
|
|
36048
36107
|
var _b = _a, { carrierId } = _b, options = __objRest$q(_b, ["carrierId"]);
|
|
36049
36108
|
const result = yield client.carriers.updateAutoFunding(carrierId, options);
|
|
36050
36109
|
return result.data;
|
|
@@ -36074,7 +36133,7 @@ const useGetZonesByCarrier = (carrierId) => {
|
|
|
36074
36133
|
});
|
|
36075
36134
|
};
|
|
36076
36135
|
|
|
36077
|
-
var __async$
|
|
36136
|
+
var __async$M = (__this, __arguments, generator) => {
|
|
36078
36137
|
return new Promise((resolve, reject) => {
|
|
36079
36138
|
var fulfilled = (value) => {
|
|
36080
36139
|
try {
|
|
@@ -36097,7 +36156,7 @@ var __async$L = (__this, __arguments, generator) => {
|
|
|
36097
36156
|
const useDeleteCarrier = () => {
|
|
36098
36157
|
const { client } = useShipEngine();
|
|
36099
36158
|
return reactQuery.useMutation({
|
|
36100
|
-
mutationFn: (carrierId) => __async$
|
|
36159
|
+
mutationFn: (carrierId) => __async$M(void 0, null, function* () {
|
|
36101
36160
|
const result = yield client.carriers.delete(carrierId);
|
|
36102
36161
|
return result.data;
|
|
36103
36162
|
}),
|
|
@@ -36106,17 +36165,17 @@ const useDeleteCarrier = () => {
|
|
|
36106
36165
|
});
|
|
36107
36166
|
};
|
|
36108
36167
|
|
|
36109
|
-
var __getOwnPropSymbols$
|
|
36110
|
-
var __hasOwnProp$
|
|
36111
|
-
var __propIsEnum$
|
|
36168
|
+
var __getOwnPropSymbols$H = Object.getOwnPropertySymbols;
|
|
36169
|
+
var __hasOwnProp$H = Object.prototype.hasOwnProperty;
|
|
36170
|
+
var __propIsEnum$H = Object.prototype.propertyIsEnumerable;
|
|
36112
36171
|
var __objRest$p = (source, exclude) => {
|
|
36113
36172
|
var target = {};
|
|
36114
36173
|
for (var prop in source)
|
|
36115
|
-
if (__hasOwnProp$
|
|
36174
|
+
if (__hasOwnProp$H.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
36116
36175
|
target[prop] = source[prop];
|
|
36117
|
-
if (source != null && __getOwnPropSymbols$
|
|
36118
|
-
for (var prop of __getOwnPropSymbols$
|
|
36119
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
36176
|
+
if (source != null && __getOwnPropSymbols$H)
|
|
36177
|
+
for (var prop of __getOwnPropSymbols$H(source)) {
|
|
36178
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$H.call(source, prop))
|
|
36120
36179
|
target[prop] = source[prop];
|
|
36121
36180
|
}
|
|
36122
36181
|
return target;
|
|
@@ -36133,17 +36192,17 @@ const useGetCarrierConnectionForm = (_params) => {
|
|
|
36133
36192
|
});
|
|
36134
36193
|
};
|
|
36135
36194
|
|
|
36136
|
-
var __getOwnPropSymbols$
|
|
36137
|
-
var __hasOwnProp$
|
|
36138
|
-
var __propIsEnum$
|
|
36195
|
+
var __getOwnPropSymbols$G = Object.getOwnPropertySymbols;
|
|
36196
|
+
var __hasOwnProp$G = Object.prototype.hasOwnProperty;
|
|
36197
|
+
var __propIsEnum$G = Object.prototype.propertyIsEnumerable;
|
|
36139
36198
|
var __objRest$o = (source, exclude) => {
|
|
36140
36199
|
var target = {};
|
|
36141
36200
|
for (var prop in source)
|
|
36142
|
-
if (__hasOwnProp$
|
|
36201
|
+
if (__hasOwnProp$G.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
36143
36202
|
target[prop] = source[prop];
|
|
36144
|
-
if (source != null && __getOwnPropSymbols$
|
|
36145
|
-
for (var prop of __getOwnPropSymbols$
|
|
36146
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
36203
|
+
if (source != null && __getOwnPropSymbols$G)
|
|
36204
|
+
for (var prop of __getOwnPropSymbols$G(source)) {
|
|
36205
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$G.call(source, prop))
|
|
36147
36206
|
target[prop] = source[prop];
|
|
36148
36207
|
}
|
|
36149
36208
|
return target;
|
|
@@ -36160,26 +36219,26 @@ const useListCarrierConnections = (_params) => {
|
|
|
36160
36219
|
});
|
|
36161
36220
|
};
|
|
36162
36221
|
|
|
36163
|
-
var __defProp$
|
|
36164
|
-
var __defProps$
|
|
36165
|
-
var __getOwnPropDescs$
|
|
36166
|
-
var __getOwnPropSymbols$
|
|
36167
|
-
var __hasOwnProp$
|
|
36168
|
-
var __propIsEnum$
|
|
36169
|
-
var __defNormalProp$
|
|
36170
|
-
var __spreadValues$
|
|
36222
|
+
var __defProp$z = Object.defineProperty;
|
|
36223
|
+
var __defProps$w = Object.defineProperties;
|
|
36224
|
+
var __getOwnPropDescs$w = Object.getOwnPropertyDescriptors;
|
|
36225
|
+
var __getOwnPropSymbols$F = Object.getOwnPropertySymbols;
|
|
36226
|
+
var __hasOwnProp$F = Object.prototype.hasOwnProperty;
|
|
36227
|
+
var __propIsEnum$F = Object.prototype.propertyIsEnumerable;
|
|
36228
|
+
var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
36229
|
+
var __spreadValues$z = (a, b) => {
|
|
36171
36230
|
for (var prop in b || (b = {}))
|
|
36172
|
-
if (__hasOwnProp$
|
|
36173
|
-
__defNormalProp$
|
|
36174
|
-
if (__getOwnPropSymbols$
|
|
36175
|
-
for (var prop of __getOwnPropSymbols$
|
|
36176
|
-
if (__propIsEnum$
|
|
36177
|
-
__defNormalProp$
|
|
36231
|
+
if (__hasOwnProp$F.call(b, prop))
|
|
36232
|
+
__defNormalProp$z(a, prop, b[prop]);
|
|
36233
|
+
if (__getOwnPropSymbols$F)
|
|
36234
|
+
for (var prop of __getOwnPropSymbols$F(b)) {
|
|
36235
|
+
if (__propIsEnum$F.call(b, prop))
|
|
36236
|
+
__defNormalProp$z(a, prop, b[prop]);
|
|
36178
36237
|
}
|
|
36179
36238
|
return a;
|
|
36180
36239
|
};
|
|
36181
|
-
var __spreadProps$
|
|
36182
|
-
var __async$
|
|
36240
|
+
var __spreadProps$w = (a, b) => __defProps$w(a, __getOwnPropDescs$w(b));
|
|
36241
|
+
var __async$L = (__this, __arguments, generator) => {
|
|
36183
36242
|
return new Promise((resolve, reject) => {
|
|
36184
36243
|
var fulfilled = (value) => {
|
|
36185
36244
|
try {
|
|
@@ -36202,8 +36261,8 @@ var __async$K = (__this, __arguments, generator) => {
|
|
|
36202
36261
|
const useConnectCarrierAccount = () => {
|
|
36203
36262
|
const { client } = useShipEngine();
|
|
36204
36263
|
return reactQuery.useMutation({
|
|
36205
|
-
mutationFn: (_0) => __async$
|
|
36206
|
-
const formDataWithFlag = __spreadProps$
|
|
36264
|
+
mutationFn: (_0) => __async$L(void 0, [_0], function* ({ carrierName, formData }) {
|
|
36265
|
+
const formDataWithFlag = __spreadProps$w(__spreadValues$z({}, formData), { __skipDecamelize: true });
|
|
36207
36266
|
const result = yield client.connections.connectCarrier(carrierName, formDataWithFlag);
|
|
36208
36267
|
return result.data;
|
|
36209
36268
|
}),
|
|
@@ -36223,33 +36282,33 @@ const useCarrierConnectionsServicesList = (carrierCode) => {
|
|
|
36223
36282
|
});
|
|
36224
36283
|
};
|
|
36225
36284
|
|
|
36226
|
-
var __defProp$
|
|
36227
|
-
var __defProps$
|
|
36228
|
-
var __getOwnPropDescs$
|
|
36229
|
-
var __getOwnPropSymbols$
|
|
36230
|
-
var __hasOwnProp$
|
|
36231
|
-
var __propIsEnum$
|
|
36232
|
-
var __defNormalProp$
|
|
36233
|
-
var __spreadValues$
|
|
36285
|
+
var __defProp$y = Object.defineProperty;
|
|
36286
|
+
var __defProps$v = Object.defineProperties;
|
|
36287
|
+
var __getOwnPropDescs$v = Object.getOwnPropertyDescriptors;
|
|
36288
|
+
var __getOwnPropSymbols$E = Object.getOwnPropertySymbols;
|
|
36289
|
+
var __hasOwnProp$E = Object.prototype.hasOwnProperty;
|
|
36290
|
+
var __propIsEnum$E = Object.prototype.propertyIsEnumerable;
|
|
36291
|
+
var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
36292
|
+
var __spreadValues$y = (a, b) => {
|
|
36234
36293
|
for (var prop in b || (b = {}))
|
|
36235
|
-
if (__hasOwnProp$
|
|
36236
|
-
__defNormalProp$
|
|
36237
|
-
if (__getOwnPropSymbols$
|
|
36238
|
-
for (var prop of __getOwnPropSymbols$
|
|
36239
|
-
if (__propIsEnum$
|
|
36240
|
-
__defNormalProp$
|
|
36294
|
+
if (__hasOwnProp$E.call(b, prop))
|
|
36295
|
+
__defNormalProp$y(a, prop, b[prop]);
|
|
36296
|
+
if (__getOwnPropSymbols$E)
|
|
36297
|
+
for (var prop of __getOwnPropSymbols$E(b)) {
|
|
36298
|
+
if (__propIsEnum$E.call(b, prop))
|
|
36299
|
+
__defNormalProp$y(a, prop, b[prop]);
|
|
36241
36300
|
}
|
|
36242
36301
|
return a;
|
|
36243
36302
|
};
|
|
36244
|
-
var __spreadProps$
|
|
36303
|
+
var __spreadProps$v = (a, b) => __defProps$v(a, __getOwnPropDescs$v(b));
|
|
36245
36304
|
var __objRest$n = (source, exclude) => {
|
|
36246
36305
|
var target = {};
|
|
36247
36306
|
for (var prop in source)
|
|
36248
|
-
if (__hasOwnProp$
|
|
36307
|
+
if (__hasOwnProp$E.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
36249
36308
|
target[prop] = source[prop];
|
|
36250
|
-
if (source != null && __getOwnPropSymbols$
|
|
36251
|
-
for (var prop of __getOwnPropSymbols$
|
|
36252
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
36309
|
+
if (source != null && __getOwnPropSymbols$E)
|
|
36310
|
+
for (var prop of __getOwnPropSymbols$E(source)) {
|
|
36311
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$E.call(source, prop))
|
|
36253
36312
|
target[prop] = source[prop];
|
|
36254
36313
|
}
|
|
36255
36314
|
return target;
|
|
@@ -36262,7 +36321,7 @@ const useGetConnectionsCarrierSettings = (_a) => {
|
|
|
36262
36321
|
]);
|
|
36263
36322
|
const { client } = useShipEngine();
|
|
36264
36323
|
const { carrierName, carrierId } = queryFnParams;
|
|
36265
|
-
return reactQuery.useQuery(__spreadProps$
|
|
36324
|
+
return reactQuery.useQuery(__spreadProps$v(__spreadValues$y({}, params), {
|
|
36266
36325
|
onError,
|
|
36267
36326
|
queryFn: () => client.connections.getCarrierSettings(carrierName, carrierId),
|
|
36268
36327
|
queryKey: ["useGetConnectionsCarrierSettings", carrierName, carrierId],
|
|
@@ -36270,26 +36329,26 @@ const useGetConnectionsCarrierSettings = (_a) => {
|
|
|
36270
36329
|
}));
|
|
36271
36330
|
};
|
|
36272
36331
|
|
|
36273
|
-
var __defProp$
|
|
36274
|
-
var __defProps$
|
|
36275
|
-
var __getOwnPropDescs$
|
|
36276
|
-
var __getOwnPropSymbols$
|
|
36277
|
-
var __hasOwnProp$
|
|
36278
|
-
var __propIsEnum$
|
|
36279
|
-
var __defNormalProp$
|
|
36280
|
-
var __spreadValues$
|
|
36332
|
+
var __defProp$x = Object.defineProperty;
|
|
36333
|
+
var __defProps$u = Object.defineProperties;
|
|
36334
|
+
var __getOwnPropDescs$u = Object.getOwnPropertyDescriptors;
|
|
36335
|
+
var __getOwnPropSymbols$D = Object.getOwnPropertySymbols;
|
|
36336
|
+
var __hasOwnProp$D = Object.prototype.hasOwnProperty;
|
|
36337
|
+
var __propIsEnum$D = Object.prototype.propertyIsEnumerable;
|
|
36338
|
+
var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
36339
|
+
var __spreadValues$x = (a, b) => {
|
|
36281
36340
|
for (var prop in b || (b = {}))
|
|
36282
|
-
if (__hasOwnProp$
|
|
36283
|
-
__defNormalProp$
|
|
36284
|
-
if (__getOwnPropSymbols$
|
|
36285
|
-
for (var prop of __getOwnPropSymbols$
|
|
36286
|
-
if (__propIsEnum$
|
|
36287
|
-
__defNormalProp$
|
|
36341
|
+
if (__hasOwnProp$D.call(b, prop))
|
|
36342
|
+
__defNormalProp$x(a, prop, b[prop]);
|
|
36343
|
+
if (__getOwnPropSymbols$D)
|
|
36344
|
+
for (var prop of __getOwnPropSymbols$D(b)) {
|
|
36345
|
+
if (__propIsEnum$D.call(b, prop))
|
|
36346
|
+
__defNormalProp$x(a, prop, b[prop]);
|
|
36288
36347
|
}
|
|
36289
36348
|
return a;
|
|
36290
36349
|
};
|
|
36291
|
-
var __spreadProps$
|
|
36292
|
-
var __async$
|
|
36350
|
+
var __spreadProps$u = (a, b) => __defProps$u(a, __getOwnPropDescs$u(b));
|
|
36351
|
+
var __async$K = (__this, __arguments, generator) => {
|
|
36293
36352
|
return new Promise((resolve, reject) => {
|
|
36294
36353
|
var fulfilled = (value) => {
|
|
36295
36354
|
try {
|
|
@@ -36311,8 +36370,8 @@ var __async$J = (__this, __arguments, generator) => {
|
|
|
36311
36370
|
};
|
|
36312
36371
|
const useUpdateConnectionsCarrierSettings = (params) => {
|
|
36313
36372
|
const { client } = useShipEngine();
|
|
36314
|
-
return reactQuery.useMutation(__spreadProps$
|
|
36315
|
-
mutationFn: (_0) => __async$
|
|
36373
|
+
return reactQuery.useMutation(__spreadProps$u(__spreadValues$x({}, params), {
|
|
36374
|
+
mutationFn: (_0) => __async$K(void 0, [_0], function* ({
|
|
36316
36375
|
carrierName,
|
|
36317
36376
|
carrierId,
|
|
36318
36377
|
formData
|
|
@@ -36329,26 +36388,26 @@ const useUpdateConnectionsCarrierSettings = (params) => {
|
|
|
36329
36388
|
}));
|
|
36330
36389
|
};
|
|
36331
36390
|
|
|
36332
|
-
var __defProp$
|
|
36333
|
-
var __defProps$
|
|
36334
|
-
var __getOwnPropDescs$
|
|
36335
|
-
var __getOwnPropSymbols$
|
|
36336
|
-
var __hasOwnProp$
|
|
36337
|
-
var __propIsEnum$
|
|
36338
|
-
var __defNormalProp$
|
|
36339
|
-
var __spreadValues$
|
|
36391
|
+
var __defProp$w = Object.defineProperty;
|
|
36392
|
+
var __defProps$t = Object.defineProperties;
|
|
36393
|
+
var __getOwnPropDescs$t = Object.getOwnPropertyDescriptors;
|
|
36394
|
+
var __getOwnPropSymbols$C = Object.getOwnPropertySymbols;
|
|
36395
|
+
var __hasOwnProp$C = Object.prototype.hasOwnProperty;
|
|
36396
|
+
var __propIsEnum$C = Object.prototype.propertyIsEnumerable;
|
|
36397
|
+
var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
36398
|
+
var __spreadValues$w = (a, b) => {
|
|
36340
36399
|
for (var prop in b || (b = {}))
|
|
36341
|
-
if (__hasOwnProp$
|
|
36342
|
-
__defNormalProp$
|
|
36343
|
-
if (__getOwnPropSymbols$
|
|
36344
|
-
for (var prop of __getOwnPropSymbols$
|
|
36345
|
-
if (__propIsEnum$
|
|
36346
|
-
__defNormalProp$
|
|
36400
|
+
if (__hasOwnProp$C.call(b, prop))
|
|
36401
|
+
__defNormalProp$w(a, prop, b[prop]);
|
|
36402
|
+
if (__getOwnPropSymbols$C)
|
|
36403
|
+
for (var prop of __getOwnPropSymbols$C(b)) {
|
|
36404
|
+
if (__propIsEnum$C.call(b, prop))
|
|
36405
|
+
__defNormalProp$w(a, prop, b[prop]);
|
|
36347
36406
|
}
|
|
36348
36407
|
return a;
|
|
36349
36408
|
};
|
|
36350
|
-
var __spreadProps$
|
|
36351
|
-
var __async$
|
|
36409
|
+
var __spreadProps$t = (a, b) => __defProps$t(a, __getOwnPropDescs$t(b));
|
|
36410
|
+
var __async$J = (__this, __arguments, generator) => {
|
|
36352
36411
|
return new Promise((resolve, reject) => {
|
|
36353
36412
|
var fulfilled = (value) => {
|
|
36354
36413
|
try {
|
|
@@ -36370,8 +36429,8 @@ var __async$I = (__this, __arguments, generator) => {
|
|
|
36370
36429
|
};
|
|
36371
36430
|
const useRequestStampsAccountUrls = (params) => {
|
|
36372
36431
|
const { client } = useShipEngine();
|
|
36373
|
-
return reactQuery.useMutation(__spreadProps$
|
|
36374
|
-
mutationFn: (request) => __async$
|
|
36432
|
+
return reactQuery.useMutation(__spreadProps$t(__spreadValues$w({}, params), {
|
|
36433
|
+
mutationFn: (request) => __async$J(void 0, null, function* () {
|
|
36375
36434
|
const result = yield client.connections.requestStampsAccountUrls(request);
|
|
36376
36435
|
return result.data;
|
|
36377
36436
|
}),
|
|
@@ -36390,6 +36449,38 @@ const useListCustomPackageTypes = () => {
|
|
|
36390
36449
|
});
|
|
36391
36450
|
};
|
|
36392
36451
|
|
|
36452
|
+
var __async$I = (__this, __arguments, generator) => {
|
|
36453
|
+
return new Promise((resolve, reject) => {
|
|
36454
|
+
var fulfilled = (value) => {
|
|
36455
|
+
try {
|
|
36456
|
+
step(generator.next(value));
|
|
36457
|
+
} catch (e) {
|
|
36458
|
+
reject(e);
|
|
36459
|
+
}
|
|
36460
|
+
};
|
|
36461
|
+
var rejected = (value) => {
|
|
36462
|
+
try {
|
|
36463
|
+
step(generator.throw(value));
|
|
36464
|
+
} catch (e) {
|
|
36465
|
+
reject(e);
|
|
36466
|
+
}
|
|
36467
|
+
};
|
|
36468
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
36469
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
36470
|
+
});
|
|
36471
|
+
};
|
|
36472
|
+
const useAcceptFundingSourceTerms = (fundingSourceId) => {
|
|
36473
|
+
const { client } = useShipEngine();
|
|
36474
|
+
return reactQuery.useMutation({
|
|
36475
|
+
mutationFn: (request) => __async$I(void 0, null, function* () {
|
|
36476
|
+
const result = yield client.fundingSources.acceptTerms(fundingSourceId, request);
|
|
36477
|
+
return result.data.acceptedTerms;
|
|
36478
|
+
}),
|
|
36479
|
+
mutationKey: ["useAcceptFundingSourceTerms", fundingSourceId],
|
|
36480
|
+
onError
|
|
36481
|
+
});
|
|
36482
|
+
};
|
|
36483
|
+
|
|
36393
36484
|
var __async$H = (__this, __arguments, generator) => {
|
|
36394
36485
|
return new Promise((resolve, reject) => {
|
|
36395
36486
|
var fulfilled = (value) => {
|
|
@@ -36454,6 +36545,36 @@ const useFundingSourcesAddFunds = () => {
|
|
|
36454
36545
|
});
|
|
36455
36546
|
};
|
|
36456
36547
|
|
|
36548
|
+
var __defProp$v = Object.defineProperty;
|
|
36549
|
+
var __defProps$s = Object.defineProperties;
|
|
36550
|
+
var __getOwnPropDescs$s = Object.getOwnPropertyDescriptors;
|
|
36551
|
+
var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
|
|
36552
|
+
var __hasOwnProp$B = Object.prototype.hasOwnProperty;
|
|
36553
|
+
var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
|
|
36554
|
+
var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
36555
|
+
var __spreadValues$v = (a, b) => {
|
|
36556
|
+
for (var prop in b || (b = {}))
|
|
36557
|
+
if (__hasOwnProp$B.call(b, prop))
|
|
36558
|
+
__defNormalProp$v(a, prop, b[prop]);
|
|
36559
|
+
if (__getOwnPropSymbols$B)
|
|
36560
|
+
for (var prop of __getOwnPropSymbols$B(b)) {
|
|
36561
|
+
if (__propIsEnum$B.call(b, prop))
|
|
36562
|
+
__defNormalProp$v(a, prop, b[prop]);
|
|
36563
|
+
}
|
|
36564
|
+
return a;
|
|
36565
|
+
};
|
|
36566
|
+
var __spreadProps$s = (a, b) => __defProps$s(a, __getOwnPropDescs$s(b));
|
|
36567
|
+
const useGetFundingSourceAcceptedTerms = (fundingSourceId, params) => {
|
|
36568
|
+
const { client } = useShipEngine();
|
|
36569
|
+
const queryParams = __spreadValues$v({}, params);
|
|
36570
|
+
return reactQuery.useQuery(__spreadProps$s(__spreadValues$v({}, queryParams), {
|
|
36571
|
+
onError,
|
|
36572
|
+
queryFn: () => client.fundingSources.acceptedTerms(fundingSourceId),
|
|
36573
|
+
queryKey: ["useGetFundingSourceAcceptedTerms", fundingSourceId],
|
|
36574
|
+
select: (result) => result.data.acceptedTerms
|
|
36575
|
+
}));
|
|
36576
|
+
};
|
|
36577
|
+
|
|
36457
36578
|
const useGetFundingSourceById = (fundingSourceId) => {
|
|
36458
36579
|
const { client } = useShipEngine();
|
|
36459
36580
|
return reactQuery.useQuery({
|
|
@@ -40379,6 +40500,8 @@ exports.logger = logger;
|
|
|
40379
40500
|
exports.onError = onError;
|
|
40380
40501
|
exports.parseError = parseError;
|
|
40381
40502
|
exports.retryUntil = retryUntil;
|
|
40503
|
+
exports.useAcceptCarrierTerms = useAcceptCarrierTerms;
|
|
40504
|
+
exports.useAcceptFundingSourceTerms = useAcceptFundingSourceTerms;
|
|
40382
40505
|
exports.useAddFunds = useAddFunds;
|
|
40383
40506
|
exports.useAddInsuranceFunds = useAddInsuranceFunds;
|
|
40384
40507
|
exports.useAddSandboxCarriers = useAddSandboxCarriers;
|
|
@@ -40430,6 +40553,7 @@ exports.useGetCarrierConnectionForm = useGetCarrierConnectionForm;
|
|
|
40430
40553
|
exports.useGetConnectionsCarrierSettings = useGetConnectionsCarrierSettings;
|
|
40431
40554
|
exports.useGetCountriesByCarrier = useGetCountriesByCarrier;
|
|
40432
40555
|
exports.useGetCurrenciesByCarrier = useGetCurrenciesByCarrier;
|
|
40556
|
+
exports.useGetFundingSourceAcceptedTerms = useGetFundingSourceAcceptedTerms;
|
|
40433
40557
|
exports.useGetFundingSourceById = useGetFundingSourceById;
|
|
40434
40558
|
exports.useGetFundingSourceMetadata = useGetFundingSourceMetadata;
|
|
40435
40559
|
exports.useGetFundingSourceTransactions = useGetFundingSourceTransactions;
|