wt-front-shared 19.0.34 → 19.0.36
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/fesm2022/wt-front-shared.mjs +5995 -5929
- package/fesm2022/wt-front-shared.mjs.map +1 -1
- package/lib/core/+state/form-delete-file/form-delete-file.effects.d.ts +3 -3
- package/lib/core/+state/index.d.ts +2 -2
- package/lib/core/+state/users/behavios/refresh-token-behavior.d.ts +5 -3
- package/lib/core/+state/users/users.effects.d.ts +5 -2
- package/lib/core/dialogs/common-dialog/common-dialog.component.d.ts +1 -0
- package/lib/core/services/auth/authentication.service.d.ts +9 -4
- package/lib/core/services/users/users.service.d.ts +2 -1
- package/lib/models/config/app-config.d.ts +4 -0
- package/lib/models/endpoints/auth/auth-endpoint-types.d.ts +2 -1
- package/lib/models/endpoints/auth/index.d.ts +1 -0
- package/lib/models/endpoints/auth/sso-exchange-token/index.d.ts +1 -0
- package/lib/models/endpoints/auth/sso-exchange-token/request/index.d.ts +2 -0
- package/lib/models/endpoints/auth/sso-exchange-token/request/sso-exchange-token-config.d.ts +6 -0
- package/lib/models/endpoints/auth/sso-exchange-token/request/sso-exchange-token-request.d.ts +15 -0
- package/package.json +1 -1
|
@@ -15,12 +15,12 @@ export declare class FormDeleteFileEffects {
|
|
|
15
15
|
};
|
|
16
16
|
} & import("@ngrx/store").Action<"[FormDeleteFile] Delete File Error">)> & import("@ngrx/effects").CreateEffectMetadata;
|
|
17
17
|
deleteFileSuccess$: import("rxjs").Observable<({
|
|
18
|
+
payload: import("../update-entities/update-entities.actions").EntityUpdatePayload;
|
|
19
|
+
} & import("@ngrx/store").Action<"[UpdateEntities] Entity Part Update">) | ({
|
|
18
20
|
payload: {
|
|
19
21
|
error: any;
|
|
20
22
|
};
|
|
21
|
-
} & import("@ngrx/store").Action<"[FormDeleteFile] Delete File Error">)
|
|
22
|
-
payload: import("../update-entities/update-entities.actions").EntityUpdatePayload;
|
|
23
|
-
} & import("@ngrx/store").Action<"[UpdateEntities] Entity Part Update">)> & import("@ngrx/effects").CreateEffectMetadata;
|
|
23
|
+
} & import("@ngrx/store").Action<"[FormDeleteFile] Delete File Error">)> & import("@ngrx/effects").CreateEffectMetadata;
|
|
24
24
|
constructor(actions$: Actions, store: Store<SharedState>, formDeleteFileService: FormDeleteFileService, authenticationService: AuthenticationService);
|
|
25
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormDeleteFileEffects, never>;
|
|
26
26
|
static ɵprov: i0.ɵɵInjectableDeclaration<FormDeleteFileEffects>;
|
|
@@ -36,8 +36,8 @@ import { CoreFacade } from "./core.facade";
|
|
|
36
36
|
import { RouterFacade } from "./router/router.facade";
|
|
37
37
|
import { StaticDataFacade } from "./static-data/static-data.facade";
|
|
38
38
|
import { FormDeleteFileFacade } from "./form-delete-file";
|
|
39
|
-
export declare const sharedEffects: (typeof UsersEffects | typeof RouterEffects | typeof
|
|
40
|
-
export declare const sharedFacades: (typeof
|
|
39
|
+
export declare const sharedEffects: (typeof UsersEffects | typeof RouterEffects | typeof FilesEffects | typeof NotificationsEffects | typeof TagsEffects | typeof UiUnitsEffects | typeof MainEffects | typeof FormValidationEffects | typeof FormErrorsEffects | typeof FormsEffects | typeof FormDeleteFileEffects | typeof PublicationMessagesEffects | typeof UpdateEntitiesEffects | typeof StaticDataEffects | typeof ActionsEffects | typeof CacheDataEffects | typeof ReportsEffects)[];
|
|
40
|
+
export declare const sharedFacades: (typeof FormValidationFacade | typeof RequestsFacade | typeof FormsFacade | typeof NotificationsFacade | typeof UsersFacade | typeof FilesFacade | typeof UiUnitsFacade | typeof TagsFacade | typeof MainFacade | typeof FormErrorsFacade | typeof PublicationMessagesFacade | typeof RouterFacade | typeof ActionsFacade | typeof CacheDataFacade | typeof ReportsFacade | typeof CoreFacade | typeof StaticDataFacade | typeof FormDeleteFileFacade)[];
|
|
41
41
|
export interface SharedState {
|
|
42
42
|
requests: RequestsState;
|
|
43
43
|
files: FilesState;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { Behavior } from '../../behavior';
|
|
2
2
|
import { Action } from '@ngrx/store';
|
|
3
3
|
import { HttpClientResult } from "../../../models/http-client-result";
|
|
4
|
-
import { BaseResponse } from "../../../../models";
|
|
5
|
-
import { AuthenticationService } from "../../../services";
|
|
4
|
+
import { AppConfig, BaseResponse } from "../../../../models";
|
|
5
|
+
import { AuthenticationService, CookiesService } from "../../../services";
|
|
6
6
|
export declare class RefreshTokenBehavior extends Behavior {
|
|
7
|
+
private appConfig;
|
|
7
8
|
protected action: Action;
|
|
8
9
|
protected result: HttpClientResult<BaseResponse>;
|
|
9
10
|
protected authenticationService: AuthenticationService;
|
|
10
|
-
|
|
11
|
+
protected cookiesService: CookiesService;
|
|
12
|
+
constructor(appConfig: AppConfig, action: Action, result: HttpClientResult<BaseResponse>, authenticationService: AuthenticationService, cookiesService: CookiesService);
|
|
11
13
|
resolve(): Array<Action>;
|
|
12
14
|
}
|
|
@@ -2,7 +2,7 @@ import { Actions } from '@ngrx/effects';
|
|
|
2
2
|
import { Store } from '@ngrx/store';
|
|
3
3
|
import * as UsersAction from './users.actions';
|
|
4
4
|
import { HttpClientResult } from "../../models/http-client-result";
|
|
5
|
-
import { BaseResponse } from "../../../models";
|
|
5
|
+
import { AppConfig, BaseResponse } from "../../../models";
|
|
6
6
|
import { SharedState } from "../index";
|
|
7
7
|
import { UsersService } from "../../services/users/users.service";
|
|
8
8
|
import { AuthenticationService } from "../../services/auth/authentication.service";
|
|
@@ -10,8 +10,10 @@ import { RouterService } from "../../services/router/router.service";
|
|
|
10
10
|
import { ActionsService } from "../../services/actions/actions.service";
|
|
11
11
|
import { NotificationsFacade } from "../notifications";
|
|
12
12
|
import { UsersFacade } from "./users.facade";
|
|
13
|
+
import { CookiesService } from "../../services";
|
|
13
14
|
import * as i0 from "@angular/core";
|
|
14
15
|
export declare class UsersEffects {
|
|
16
|
+
private appConfig;
|
|
15
17
|
protected actions$: Actions;
|
|
16
18
|
protected store: Store<SharedState>;
|
|
17
19
|
protected usersService: UsersService;
|
|
@@ -20,6 +22,7 @@ export declare class UsersEffects {
|
|
|
20
22
|
protected routerService: RouterService;
|
|
21
23
|
protected actionsService: ActionsService;
|
|
22
24
|
protected notificationsFacade: NotificationsFacade;
|
|
25
|
+
protected cookiesService: CookiesService;
|
|
23
26
|
GlobalEvent$: import("rxjs").Observable<HttpClientResult<BaseResponse>> & import("@ngrx/effects").CreateEffectMetadata;
|
|
24
27
|
GlobalEvent2$: import("rxjs").Observable<HttpClientResult<BaseResponse>> & import("@ngrx/effects").CreateEffectMetadata;
|
|
25
28
|
loginSend$: import("rxjs").Observable<import("@ngrx/store").Action<string> | ({
|
|
@@ -38,7 +41,7 @@ export declare class UsersEffects {
|
|
|
38
41
|
refreshTokenSuccess$: import("rxjs").Observable<[{
|
|
39
42
|
payload: UsersAction.RefreshTokenSuccessPayment;
|
|
40
43
|
} & import("@ngrx/store").Action<"[Users] Refresh Token Success 2">, import("wt-front-shared").UsersState]> & import("@ngrx/effects").CreateEffectMetadata;
|
|
41
|
-
constructor(actions$: Actions, store: Store<SharedState>, usersService: UsersService, usersFacade: UsersFacade, authenticationService: AuthenticationService, routerService: RouterService, actionsService: ActionsService, notificationsFacade: NotificationsFacade);
|
|
44
|
+
constructor(appConfig: AppConfig, actions$: Actions, store: Store<SharedState>, usersService: UsersService, usersFacade: UsersFacade, authenticationService: AuthenticationService, routerService: RouterService, actionsService: ActionsService, notificationsFacade: NotificationsFacade, cookiesService: CookiesService);
|
|
42
45
|
static ɵfac: i0.ɵɵFactoryDeclaration<UsersEffects, never>;
|
|
43
46
|
static ɵprov: i0.ɵɵInjectableDeclaration<UsersEffects>;
|
|
44
47
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
1
|
+
import { BehaviorSubject, Observable } from 'rxjs';
|
|
2
2
|
import { ActivatedRoute } from '@angular/router';
|
|
3
3
|
import { UserModel } from '../../../models/models/user/user-model';
|
|
4
|
-
import { AppConfig, UserSectionRightModel } from "../../../models";
|
|
4
|
+
import { AppConfig, Response, UserSectionRightModel } from "../../../models";
|
|
5
5
|
import { CookieService } from "ngx-cookie-service";
|
|
6
|
+
import { UsersService } from "../users/users.service";
|
|
7
|
+
import { HttpClientResult } from "../../models/http-client-result";
|
|
6
8
|
import * as i0 from "@angular/core";
|
|
7
9
|
export interface UserAuthInfo {
|
|
8
10
|
token: string;
|
|
@@ -26,12 +28,14 @@ export declare class AuthenticationService {
|
|
|
26
28
|
protected config: AppConfig;
|
|
27
29
|
protected route: ActivatedRoute;
|
|
28
30
|
protected cookieService: CookieService;
|
|
31
|
+
protected usersService: UsersService;
|
|
29
32
|
haveLocalStorage: boolean;
|
|
30
33
|
currentUser: Observable<UserModel>;
|
|
31
|
-
|
|
32
|
-
constructor(platformId: any, config: AppConfig, route: ActivatedRoute, cookieService: CookieService);
|
|
34
|
+
protected currentUserSubject: BehaviorSubject<UserModel>;
|
|
35
|
+
constructor(platformId: any, config: AppConfig, route: ActivatedRoute, cookieService: CookieService, usersService: UsersService);
|
|
33
36
|
get isGuest(): boolean;
|
|
34
37
|
get currentUserValue(): UserModel;
|
|
38
|
+
set currentUserValue(currentUser: UserModel);
|
|
35
39
|
loadAuthDataFromLocalStore(): UserAuthInfo;
|
|
36
40
|
saveAuthInfo(user: UserModel, remember?: boolean): void;
|
|
37
41
|
saveServices(services: {
|
|
@@ -41,6 +45,7 @@ export declare class AuthenticationService {
|
|
|
41
45
|
saveRefreshToken(token: string, tokenExp: number, refreshToken: string): void;
|
|
42
46
|
clearData(): void;
|
|
43
47
|
getRedirectToUrl(): any;
|
|
48
|
+
SSOExchangeToken(fromClientId: string, toClientId: string): Observable<HttpClientResult<Response>>;
|
|
44
49
|
static ɵfac: i0.ɵɵFactoryDeclaration<AuthenticationService, never>;
|
|
45
50
|
static ɵprov: i0.ɵɵInjectableDeclaration<AuthenticationService>;
|
|
46
51
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { AuthResponse, LoginSendCreateRequestConfig } from '../../../models/endpoints/auth';
|
|
3
|
+
import { AuthResponse, LoginSendCreateRequestConfig, SsoExchangeTokenConfig } from '../../../models/endpoints/auth';
|
|
4
4
|
import { BaseAPIService } from "../base";
|
|
5
5
|
import { RequestsFacade } from "../../+state/requests";
|
|
6
6
|
import { AppConfig } from "../../../models";
|
|
@@ -17,6 +17,7 @@ export declare class UsersService extends BaseAPIService {
|
|
|
17
17
|
constructor(httpClient: HttpClient, config: AppConfig, requestsFacade: RequestsFacade, formsFacade: FormsFacade);
|
|
18
18
|
loginSend(config: LoginSendCreateRequestConfig): Observable<HttpClientResult<AuthResponse>>;
|
|
19
19
|
refreshToken(config: RefreshTokenRequestConfig): Observable<HttpClientResult<AuthResponse>>;
|
|
20
|
+
ssoExchangeToken(config: SsoExchangeTokenConfig): Observable<HttpClientResult<AuthResponse>>;
|
|
20
21
|
permissions(config: PermissionsRequestConfig): Observable<HttpClientResult<AuthResponse>>;
|
|
21
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<UsersService, never>;
|
|
22
23
|
static ɵprov: i0.ɵɵInjectableDeclaration<UsersService>;
|
|
@@ -10,6 +10,9 @@ export interface AppConfig {
|
|
|
10
10
|
roles?: {
|
|
11
11
|
[key: string]: number;
|
|
12
12
|
};
|
|
13
|
+
roleKeys?: {
|
|
14
|
+
[key: string]: string;
|
|
15
|
+
};
|
|
13
16
|
env?: string;
|
|
14
17
|
additions?: {
|
|
15
18
|
[key: string]: any;
|
|
@@ -17,5 +20,6 @@ export interface AppConfig {
|
|
|
17
20
|
tokenCookiesName?: {
|
|
18
21
|
accessToken: string;
|
|
19
22
|
refreshAccessToken: string;
|
|
23
|
+
userData?: string;
|
|
20
24
|
};
|
|
21
25
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './request';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SsoExchangeTokenConfig } from './sso-exchange-token-config';
|
|
2
|
+
import { PostRequest } from "../../../http";
|
|
3
|
+
export declare class SsoExchangeTokenRequest extends PostRequest {
|
|
4
|
+
protected domain: string;
|
|
5
|
+
private config;
|
|
6
|
+
constructor(domain: string, config: SsoExchangeTokenConfig);
|
|
7
|
+
get url(): string;
|
|
8
|
+
get headers(): any;
|
|
9
|
+
get params(): any;
|
|
10
|
+
get body(): {
|
|
11
|
+
token: string;
|
|
12
|
+
fromClientId: string;
|
|
13
|
+
toClientId: string;
|
|
14
|
+
};
|
|
15
|
+
}
|