@evergis/api 3.0.202 → 3.0.204
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/dist/Api.d.ts +2 -1
- package/dist/__generated__/DataSourceService.d.ts +11 -0
- package/dist/__generated__/ProjectsService.d.ts +2 -2
- package/dist/__generated__/StatisticService.d.ts +2 -2
- package/dist/__generated__/WmsServerService.d.ts +2 -2
- package/dist/__generated__/data-contracts.d.ts +19 -6
- package/dist/api.cjs.development.js +23 -11
- package/dist/api.cjs.development.js.map +1 -1
- package/dist/api.cjs.production.min.js +1 -1
- package/dist/api.cjs.production.min.js.map +1 -1
- package/dist/api.esm.js +28 -12
- package/dist/api.esm.js.map +1 -1
- package/dist/services/Account.d.ts +1 -1
- package/dist/services/Statistic.d.ts +2 -2
- package/package.json +2 -2
package/dist/api.esm.js
CHANGED
|
@@ -1433,18 +1433,22 @@ let Account = /*#__PURE__*/function (_AccountService) {
|
|
|
1433
1433
|
|
|
1434
1434
|
_createClass(Account, [{
|
|
1435
1435
|
key: "login",
|
|
1436
|
-
value: function login(params, authParams) {
|
|
1436
|
+
value: async function login(params, authParams, useJwt) {
|
|
1437
1437
|
if (authParams === void 0) {
|
|
1438
1438
|
authParams = {};
|
|
1439
1439
|
}
|
|
1440
1440
|
|
|
1441
|
+
if (useJwt === void 0) {
|
|
1442
|
+
useJwt = false;
|
|
1443
|
+
}
|
|
1444
|
+
|
|
1441
1445
|
if (params) {
|
|
1442
|
-
_get(_getPrototypeOf(Account.prototype), "authenticate", this).call(this, authParams, params)
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
}
|
|
1446
|
+
const response = await _get(_getPrototypeOf(Account.prototype), "authenticate", this).call(this, authParams, params);
|
|
1447
|
+
|
|
1448
|
+
if (response && useJwt) {
|
|
1449
|
+
window.localStorage.setItem(STORAGE_TOKEN_KEY, response.token);
|
|
1450
|
+
window.localStorage.setItem(STORAGE_REFRESH_TOKEN_KEY, response.refreshToken);
|
|
1451
|
+
}
|
|
1448
1452
|
}
|
|
1449
1453
|
}
|
|
1450
1454
|
}, {
|
|
@@ -1463,8 +1467,13 @@ let Account = /*#__PURE__*/function (_AccountService) {
|
|
|
1463
1467
|
}, {
|
|
1464
1468
|
key: "logout",
|
|
1465
1469
|
value: async function logout() {
|
|
1466
|
-
window.localStorage.
|
|
1467
|
-
|
|
1470
|
+
const token = window.localStorage.getItem(STORAGE_TOKEN_KEY);
|
|
1471
|
+
|
|
1472
|
+
if (token) {
|
|
1473
|
+
window.localStorage.removeItem(STORAGE_TOKEN_KEY);
|
|
1474
|
+
window.localStorage.removeItem(STORAGE_REFRESH_TOKEN_KEY);
|
|
1475
|
+
}
|
|
1476
|
+
|
|
1468
1477
|
await this.revokeToken();
|
|
1469
1478
|
updateUserInfo(undefined);
|
|
1470
1479
|
this.userInfo = {};
|
|
@@ -7615,11 +7624,12 @@ let Api = /*#__PURE__*/function (_EventEmitter) {
|
|
|
7615
7624
|
connectWs,
|
|
7616
7625
|
initScheduler,
|
|
7617
7626
|
fetchSettings,
|
|
7618
|
-
fetchUser
|
|
7627
|
+
fetchUser,
|
|
7628
|
+
useJwt
|
|
7619
7629
|
} = _ref2;
|
|
7620
7630
|
|
|
7621
7631
|
try {
|
|
7622
|
-
this.account.login(authParams, authQueryParams);
|
|
7632
|
+
await this.account.login(authParams, authQueryParams, useJwt);
|
|
7623
7633
|
|
|
7624
7634
|
if (fetchUser) {
|
|
7625
7635
|
await this.account.fetchCurrentUser();
|
|
@@ -8409,9 +8419,13 @@ var ConfigurationErrorEnum;
|
|
|
8409
8419
|
ConfigurationErrorEnum["InvalidTableReferenceConfiguration"] = "InvalidTableReferenceConfiguration";
|
|
8410
8420
|
})(ConfigurationErrorEnum || (ConfigurationErrorEnum = {}));
|
|
8411
8421
|
/**
|
|
8412
|
-
*
|
|
8422
|
+
*
|
|
8413
8423
|
|
|
8414
8424
|
Postgres
|
|
8425
|
+
|
|
8426
|
+
S3
|
|
8427
|
+
|
|
8428
|
+
GisServer
|
|
8415
8429
|
*/
|
|
8416
8430
|
|
|
8417
8431
|
|
|
@@ -8419,6 +8433,8 @@ var DataSourceType;
|
|
|
8419
8433
|
|
|
8420
8434
|
(function (DataSourceType) {
|
|
8421
8435
|
DataSourceType["Postgres"] = "Postgres";
|
|
8436
|
+
DataSourceType["S3"] = "S3";
|
|
8437
|
+
DataSourceType["GisServer"] = "GisServer";
|
|
8422
8438
|
})(DataSourceType || (DataSourceType = {}));
|
|
8423
8439
|
/**
|
|
8424
8440
|
* Type of the error.
|