@etsoo/materialui 1.4.62 → 1.4.63
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/lib/app/IServiceApp.d.ts +12 -4
- package/package.json +1 -1
- package/src/app/IServiceApp.ts +16 -4
package/lib/app/IServiceApp.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { ApiRefreshTokenDto, IApi } from "@etsoo/appscript";
|
|
1
|
+
import { ApiRefreshTokenDto, IApi, IApiPayload } from "@etsoo/appscript";
|
|
2
2
|
import { ReactAppType } from "./ReactApp";
|
|
3
3
|
import { IServiceUser, ServiceUserToken } from "./IServiceUser";
|
|
4
|
+
import { IActionResult } from "@etsoo/shared";
|
|
4
5
|
/**
|
|
5
6
|
* Service application interface
|
|
6
7
|
*/
|
|
@@ -15,14 +16,21 @@ export interface IServiceApp extends ReactAppType {
|
|
|
15
16
|
readonly coreOrigin: string;
|
|
16
17
|
/**
|
|
17
18
|
* Load core system UI
|
|
19
|
+
* @param tryLogin Try login or not
|
|
18
20
|
*/
|
|
19
|
-
loadCore(): void;
|
|
21
|
+
loadCore(tryLogin?: boolean): void;
|
|
22
|
+
/**
|
|
23
|
+
* Switch organization
|
|
24
|
+
* @param organizationId Organization ID
|
|
25
|
+
* @param fromOrganizationId From organization ID
|
|
26
|
+
* @param payload Payload
|
|
27
|
+
*/
|
|
28
|
+
switchOrg(organizationId: number, fromOrganizationId?: number, payload?: IApiPayload<IActionResult<IServiceUser & ServiceUserToken>>): Promise<IActionResult<IServiceUser & ServiceUserToken> | undefined>;
|
|
20
29
|
/**
|
|
21
30
|
*
|
|
22
31
|
* @param user Current user
|
|
23
32
|
* @param core Core system API token data
|
|
24
|
-
* @param keep Keep in local storage or not
|
|
25
33
|
* @param dispatch User state dispatch
|
|
26
34
|
*/
|
|
27
|
-
userLoginEx(user: IServiceUser & ServiceUserToken, core?: ApiRefreshTokenDto,
|
|
35
|
+
userLoginEx(user: IServiceUser & ServiceUserToken, core?: ApiRefreshTokenDto, dispatch?: boolean): void;
|
|
28
36
|
}
|
package/package.json
CHANGED
package/src/app/IServiceApp.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { ApiRefreshTokenDto, IApi } from "@etsoo/appscript";
|
|
1
|
+
import { ApiRefreshTokenDto, IApi, IApiPayload } from "@etsoo/appscript";
|
|
2
2
|
import { ReactAppType } from "./ReactApp";
|
|
3
3
|
import { IServiceUser, ServiceUserToken } from "./IServiceUser";
|
|
4
|
+
import { IActionResult } from "@etsoo/shared";
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Service application interface
|
|
@@ -18,20 +19,31 @@ export interface IServiceApp extends ReactAppType {
|
|
|
18
19
|
|
|
19
20
|
/**
|
|
20
21
|
* Load core system UI
|
|
22
|
+
* @param tryLogin Try login or not
|
|
21
23
|
*/
|
|
22
|
-
loadCore(): void;
|
|
24
|
+
loadCore(tryLogin?: boolean): void;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Switch organization
|
|
28
|
+
* @param organizationId Organization ID
|
|
29
|
+
* @param fromOrganizationId From organization ID
|
|
30
|
+
* @param payload Payload
|
|
31
|
+
*/
|
|
32
|
+
switchOrg(
|
|
33
|
+
organizationId: number,
|
|
34
|
+
fromOrganizationId?: number,
|
|
35
|
+
payload?: IApiPayload<IActionResult<IServiceUser & ServiceUserToken>>
|
|
36
|
+
): Promise<IActionResult<IServiceUser & ServiceUserToken> | undefined>;
|
|
23
37
|
|
|
24
38
|
/**
|
|
25
39
|
*
|
|
26
40
|
* @param user Current user
|
|
27
41
|
* @param core Core system API token data
|
|
28
|
-
* @param keep Keep in local storage or not
|
|
29
42
|
* @param dispatch User state dispatch
|
|
30
43
|
*/
|
|
31
44
|
userLoginEx(
|
|
32
45
|
user: IServiceUser & ServiceUserToken,
|
|
33
46
|
core?: ApiRefreshTokenDto,
|
|
34
|
-
keep?: boolean,
|
|
35
47
|
dispatch?: boolean
|
|
36
48
|
): void;
|
|
37
49
|
}
|