oip-common 0.2.2 → 0.3.2

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.d.ts CHANGED
@@ -1,17 +1,17 @@
1
1
  import * as i0 from '@angular/core';
2
- import { OnDestroy, OnInit, DestroyRef, WritableSignal, OnChanges, SimpleChanges, Type, Provider, InjectionToken, EventEmitter, Renderer2, EnvironmentProviders, PipeTransform } from '@angular/core';
2
+ import { OnDestroy, OnInit, DestroyRef, WritableSignal, OnChanges, SimpleChanges, Type, Provider, InjectionToken, EventEmitter, Renderer2, EnvironmentProviders } from '@angular/core';
3
3
  import { MessageService, ToastMessageOptions, MenuItem, ConfirmationService, FilterMetadata } from 'primeng/api';
4
4
  import { ActivatedRoute, QueryParamsHandling, IsActiveMatchOptions, Params, Router, UrlTree } from '@angular/router';
5
5
  import { InterpolationParameters, Translation, TranslationObject, TranslateService } from '@ngx-translate/core';
6
6
  import * as rxjs from 'rxjs';
7
7
  import { Observable, BehaviorSubject, Subscription, Subject } from 'rxjs';
8
- import { LoginResponse, AuthOptions, OidcSecurityService, LogoutAuthOptions, AbstractSecurityStorage, StsConfigHttpLoader } from 'angular-auth-oidc-client';
8
+ import { LoginResponse, AuthOptions, OidcSecurityService, LogoutAuthOptions } from 'angular-auth-oidc-client';
9
9
  import { ContextMenu } from 'primeng/contextmenu';
10
10
  import { PaletteDesignToken, Preset } from '@primeuix/themes/types';
11
11
  import { PrimeNG } from 'primeng/config';
12
+ import { PaginatorState } from 'primeng/paginator';
12
13
  import { Table } from 'primeng/table';
13
- import { HttpInterceptorFn, HttpClient as HttpClient$1 } from '@angular/common/http';
14
- import { SafeUrl } from '@angular/platform-browser';
14
+ import { HttpInterceptorFn } from '@angular/common/http';
15
15
 
16
16
  interface TopBarDto {
17
17
  id: 'content' | 'settings' | 'security';
@@ -55,44 +55,6 @@ declare class MsgService {
55
55
  static ɵprov: i0.ɵɵInjectableDeclaration<MsgService>;
56
56
  }
57
57
 
58
- /**
59
- * BaseDataService provides a unified interface for sending HTTP requests
60
- * using Angular's HttpClient. It supports standard HTTP methods and automatic
61
- * credential handling.
62
- */
63
- declare class BaseDataService {
64
- private readonly http;
65
- private readonly frontendConfig;
66
- /**
67
- * Gets the base URL of the application from the HTML <base> tag.
68
- */
69
- get baseUrl(): string;
70
- /**
71
- * Builds a fully-qualified application URL based on frontend mode.
72
- */
73
- buildUrl(path: string): string;
74
- /**
75
- * Sends an HTTP request with the specified method and data.
76
- *
77
- * @template TResponse - Expected response type.
78
- * @param url - The target URL for the HTTP request.
79
- * @param method - The HTTP method to use (GET, PUT, POST, DELETE). Default is 'GET'.
80
- * @param data - An object containing request parameters or payload.
81
- * @returns A promise that resolves to the response of type TResponse.
82
- */
83
- sendRequest<TResponse>(url: string, method?: 'GET' | 'PUT' | 'POST' | 'DELETE', data?: any): Promise<TResponse>;
84
- /**
85
- * Sends a GET request and retrieves a response as a Blob.
86
- *
87
- * @param url - The target URL for the GET request.
88
- * @returns A promise that resolves to a Object response.
89
- */
90
- getBlob(url: string): Promise<object>;
91
- private normalizeBaseUrl;
92
- static ɵfac: i0.ɵɵFactoryDeclaration<BaseDataService, never>;
93
- static ɵprov: i0.ɵɵInjectableDeclaration<BaseDataService>;
94
- }
95
-
96
58
  /**
97
59
  * Service to manage the application title.
98
60
  */
@@ -229,22 +191,13 @@ interface SecurityDto {
229
191
  roles: string[];
230
192
  }
231
193
 
232
- interface PutSecurityDto {
233
- id: number;
234
- securities: SecurityDto[];
235
- }
236
-
237
- declare class SecurityDataService extends BaseDataService {
238
- getSecurity(controller: string, id: number): Promise<SecurityDto[]>;
239
- saveSecurity(controller: string, request: PutSecurityDto): Promise<any>;
240
- getRealmRoles(): Promise<string[]>;
241
- static ɵfac: i0.ɵɵFactoryDeclaration<SecurityDataService, never>;
242
- static ɵprov: i0.ɵɵInjectableDeclaration<SecurityDataService>;
243
- }
244
-
245
194
  type RefreshCustomParams = {
246
195
  [key: string]: string | number | boolean;
247
196
  };
197
+ type AuthCsrfToken = {
198
+ token: string;
199
+ headerName: string;
200
+ };
248
201
  declare abstract class SecurityService {
249
202
  abstract auth(): void;
250
203
  abstract logout(): void;
@@ -254,10 +207,38 @@ declare abstract class SecurityService {
254
207
  abstract getCurrentUser(): any;
255
208
  abstract getCurrentUser$(): Observable<any>;
256
209
  abstract forceRefreshSession(customParams?: RefreshCustomParams, configId?: string): Observable<LoginResponse>;
210
+ abstract getCsrfToken(): Observable<AuthCsrfToken | null>;
257
211
  abstract isAdmin(): boolean;
258
212
  abstract authorize(configId?: string, authOptions?: AuthOptions): void;
259
213
  abstract payload: BehaviorSubject<any>;
260
214
  }
215
+ declare class BffSecurityService implements OnDestroy, SecurityService {
216
+ private readonly http;
217
+ private readonly authenticated;
218
+ private readonly currentUser;
219
+ private readonly csrfToken;
220
+ readonly payload: BehaviorSubject<any>;
221
+ auth(): void;
222
+ logout(): void;
223
+ isAuthenticated(): Observable<boolean>;
224
+ getAccessToken(): Observable<string>;
225
+ isTokenExpired(): Observable<boolean>;
226
+ getCurrentUser(): any;
227
+ getCurrentUser$(): Observable<any>;
228
+ forceRefreshSession(): Observable<LoginResponse>;
229
+ getCsrfToken(): Observable<AuthCsrfToken | null>;
230
+ isAdmin(): boolean;
231
+ authorize(): void;
232
+ ngOnDestroy(): void;
233
+ private applySession;
234
+ private createCurrentUser;
235
+ private splitDisplayName;
236
+ private applyAnonymousSession;
237
+ private createPostForm;
238
+ private buildUrl;
239
+ static ɵfac: i0.ɵɵFactoryDeclaration<BffSecurityService, never>;
240
+ static ɵprov: i0.ɵɵInjectableDeclaration<BffSecurityService>;
241
+ }
261
242
  /**
262
243
  * SecurityService extends OidcSecurityService to manage authentication,
263
244
  * token handling, and user role access in an Angular application.
@@ -306,6 +287,7 @@ declare class KeycloakSecurityService extends OidcSecurityService implements OnD
306
287
  */
307
288
  getAccessToken(configId?: string): Observable<string>;
308
289
  forceRefreshSession(customParams?: RefreshCustomParams, configId?: string): Observable<LoginResponse>;
290
+ getCsrfToken(): Observable<AuthCsrfToken | null>;
309
291
  /**
310
292
  * Indicates whether the current user has the 'admin' role.
311
293
  *
@@ -355,16 +337,76 @@ declare class KeycloakSecurityService extends OidcSecurityService implements OnD
355
337
  static ɵprov: i0.ɵɵInjectableDeclaration<KeycloakSecurityService>;
356
338
  }
357
339
 
340
+ type QueryParamsType = Record<string | number, any>;
341
+ type ResponseFormat = keyof Omit<Body, "body" | "bodyUsed">;
342
+ interface FullRequestParams extends Omit<RequestInit, "body"> {
343
+ /** set parameter to `true` for call `securityWorker` for this request */
344
+ secure?: boolean;
345
+ /** request path */
346
+ path: string;
347
+ /** content type of request body */
348
+ type?: ContentType;
349
+ /** query params */
350
+ query?: QueryParamsType;
351
+ /** format of response (i.e. response.json() -> format: "json") */
352
+ format?: ResponseFormat;
353
+ /** request body */
354
+ body?: unknown;
355
+ /** base url */
356
+ baseUrl?: string;
357
+ /** request cancellation token */
358
+ cancelToken?: CancelToken;
359
+ }
360
+ type RequestParams = Omit<FullRequestParams, "body" | "method" | "query" | "path">;
361
+ type CancelToken = Symbol | string | number;
362
+ declare enum ContentType {
363
+ Json = "application/json",
364
+ JsonApi = "application/vnd.api+json",
365
+ FormData = "multipart/form-data",
366
+ UrlEncoded = "application/x-www-form-urlencoded",
367
+ Text = "text/plain"
368
+ }
369
+ declare class HttpClient<SecurityDataType = unknown> {
370
+ protected securityService: SecurityService;
371
+ protected layoutService: LayoutService;
372
+ baseUrl: string;
373
+ private securityWorker?;
374
+ private abortControllers;
375
+ private customFetch;
376
+ private baseApiParams;
377
+ setSecurityData: (data: SecurityDataType | null) => void;
378
+ protected encodeQueryParam(key: string, value: any): string;
379
+ protected addQueryParam(query: QueryParamsType, key: string): string;
380
+ protected addArrayQueryParam(query: QueryParamsType, key: string): any;
381
+ protected toQueryString(rawQuery?: QueryParamsType): string;
382
+ protected addQueryParams(rawQuery?: QueryParamsType): string;
383
+ private contentFormatters;
384
+ protected mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams;
385
+ protected createAbortSignal: (cancelToken: CancelToken) => AbortSignal | undefined;
386
+ abortRequest: (cancelToken: CancelToken) => void;
387
+ request: <T = any, E = any>({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise<T>;
388
+ private getCsrfRequestParams;
389
+ static ɵfac: i0.ɵɵFactoryDeclaration<HttpClient<any>, never>;
390
+ static ɵprov: i0.ɵɵInjectableDeclaration<HttpClient<any>>;
391
+ }
392
+
393
+ interface PutSecurityDto {
394
+ id: number;
395
+ securities: SecurityDto[];
396
+ }
397
+
358
398
  declare abstract class BaseModuleComponent<TBackendStoreSettings, TLocalStoreSettings> implements OnInit, OnDestroy {
359
399
  private static readonly readRight;
360
400
  private static readonly editRight;
361
401
  private static readonly deleteRight;
362
- private isInitialized;
363
- private moduleInstanceReloadPromise;
364
- private rightsSubscription?;
402
+ protected isInitialized: boolean;
403
+ protected moduleInstanceReloadPromise: Promise<void>;
404
+ protected rightsSubscription?: Subscription;
405
+ protected securityRoles: string[];
406
+ protected securitySettings: SecurityDto[];
365
407
  protected readonly destroyRef: DestroyRef;
366
- protected readonly securityDataService: SecurityDataService;
367
408
  protected readonly securityService: SecurityService;
409
+ protected readonly httpClient: HttpClient<any>;
368
410
  /**
369
411
  * Provide access to app settings
370
412
  */
@@ -383,11 +425,6 @@ declare abstract class BaseModuleComponent<TBackendStoreSettings, TLocalStoreSet
383
425
  * Provides access to messaging services.
384
426
  */
385
427
  readonly msgService: MsgService;
386
- /**
387
- * Provides access to base data service functionality.
388
- * @deprecated The method should not be used
389
- */
390
- readonly baseDataService: BaseDataService;
391
428
  /**
392
429
  * Provides access to translation functionality.
393
430
  */
@@ -477,6 +514,10 @@ declare abstract class BaseModuleComponent<TBackendStoreSettings, TLocalStoreSet
477
514
  * Gets an instant translation for a key or an array of keys.
478
515
  */
479
516
  t(key: string | string[], interpolateParams?: InterpolationParameters): Translation | TranslationObject;
517
+ /**
518
+ * Checks whether the current user has the specified security right.
519
+ */
520
+ hasRight(code: string): boolean;
480
521
  /**
481
522
  * Initializes the component and subscribes to local settings updates.
482
523
  */
@@ -522,6 +563,15 @@ declare abstract class BaseModuleComponent<TBackendStoreSettings, TLocalStoreSet
522
563
  private resetRightsState;
523
564
  private updateRightsState;
524
565
  protected hasSecurityRight(roles: string[], securitySettings: SecurityDto[], code: string): boolean;
566
+ protected getSecurity(controller?: string, id?: number | undefined): Promise<SecurityDto[]>;
567
+ protected saveSecurity(request: PutSecurityDto, controller?: string): Promise<unknown>;
568
+ protected getModuleInstanceSettings<TSettings>(controller?: string, id?: number | undefined): Promise<TSettings>;
569
+ protected saveModuleInstanceSettings<TSettings>(request: {
570
+ id: number;
571
+ settings: TSettings;
572
+ }, controller?: string): Promise<unknown>;
573
+ protected getMigrations<TMigration>(controller?: string): Promise<TMigration[]>;
574
+ protected applyModuleMigration(request: unknown, controller?: string): Promise<unknown>;
525
575
  private reloadModuleInstance;
526
576
  static ɵfac: i0.ɵɵFactoryDeclaration<BaseModuleComponent<any, any>, never>;
527
577
  static ɵcmp: i0.ɵɵComponentDeclaration<BaseModuleComponent<any, any>, "ng-component", never, {}, {}, never, never, true, never>;
@@ -529,10 +579,11 @@ declare abstract class BaseModuleComponent<TBackendStoreSettings, TLocalStoreSet
529
579
 
530
580
  declare class SecurityComponent implements OnChanges, OnInit, OnDestroy {
531
581
  private readonly msgService;
532
- private readonly dataService;
533
582
  private readonly translateService;
583
+ private readonly httpClient;
584
+ private readonly securityApi;
534
585
  private securityLoadToken;
535
- securityData: any[];
586
+ securityData: SecurityDto[];
536
587
  id?: number;
537
588
  controller?: string;
538
589
  roles: string[];
@@ -542,6 +593,8 @@ declare class SecurityComponent implements OnChanges, OnInit, OnDestroy {
542
593
  saveClick(): void;
543
594
  saveKeyDown($event: KeyboardEvent): void;
544
595
  private loadSecurity;
596
+ private getSecurity;
597
+ private saveSecurity;
545
598
  static ɵfac: i0.ɵɵFactoryDeclaration<SecurityComponent, never>;
546
599
  static ɵcmp: i0.ɵɵComponentDeclaration<SecurityComponent, "security", never, { "id": { "alias": "id"; "required": false; }; "controller": { "alias": "controller"; "required": false; }; }, {}, never, never, true, never>;
547
600
  }
@@ -552,7 +605,7 @@ declare class SecurityComponent implements OnChanges, OnInit, OnDestroy {
552
605
  */
553
606
  declare class UserService {
554
607
  private readonly securityService;
555
- private readonly baseDataService;
608
+ private readonly userProfileApi;
556
609
  private requestedPhotoEmail;
557
610
  constructor();
558
611
  /**
@@ -580,6 +633,7 @@ declare class UserService {
580
633
  * @param image - The image Blob to be converted.
581
634
  */
582
635
  private createImageFromBlob;
636
+ private getInitials;
583
637
  static ɵfac: i0.ɵɵFactoryDeclaration<UserService, never>;
584
638
  static ɵprov: i0.ɵɵInjectableDeclaration<UserService>;
585
639
  }
@@ -600,8 +654,11 @@ declare class AppTopbar {
600
654
  userService: UserService;
601
655
  layoutService: LayoutService;
602
656
  logoService: LogoService;
657
+ private readonly confirmationService;
658
+ private readonly translateService;
603
659
  toggleDarkMode(): void;
604
660
  logoutKeyDown($event: KeyboardEvent): void;
661
+ confirmLogout(): void;
605
662
  static ɵfac: i0.ɵɵFactoryDeclaration<AppTopbar, never>;
606
663
  static ɵcmp: i0.ɵɵComponentDeclaration<AppTopbar, "app-topbar", never, {}, {}, never, never, true, never>;
607
664
  }
@@ -619,6 +676,17 @@ interface AddModuleInstanceDto {
619
676
  parentId?: number | null;
620
677
  viewRoles?: string[] | null;
621
678
  }
679
+ interface AuthCsrfTokenResponse {
680
+ token?: string | null;
681
+ headerName?: string | null;
682
+ }
683
+ interface AuthSessionResponse {
684
+ isAuthenticated?: boolean;
685
+ userName?: string | null;
686
+ displayName?: string | null;
687
+ email?: string | null;
688
+ roles?: string[] | null;
689
+ }
622
690
  interface EditModuleInstanceDto {
623
691
  moduleInstanceId?: number;
624
692
  label?: string | null;
@@ -627,6 +695,19 @@ interface EditModuleInstanceDto {
627
695
  viewRoles?: string[] | null;
628
696
  moduleId?: number | null;
629
697
  }
698
+ interface FolderModuleSettings {
699
+ html?: string | null;
700
+ }
701
+ interface GetKeycloakClientSettingsResponse {
702
+ authority?: string | null;
703
+ clientId?: string | null;
704
+ scope?: string | null;
705
+ responseType?: string | null;
706
+ useRefreshToken?: boolean;
707
+ silentRenew?: boolean;
708
+ logLevel?: number;
709
+ secureRoutes?: string[] | null;
710
+ }
630
711
  interface IframeModuleSettings {
631
712
  url?: string | null;
632
713
  }
@@ -659,6 +740,12 @@ interface ModuleSecurityDto {
659
740
  right: string | null;
660
741
  role: string | null;
661
742
  }
743
+ interface GetModuleInstanceSettingsParams {
744
+ id?: number;
745
+ }
746
+ interface GetModuleInstanceSettingsParams2 {
747
+ id?: number;
748
+ }
662
749
  interface DeleteModuleInstanceParams {
663
750
  id?: number;
664
751
  }
@@ -719,7 +806,7 @@ interface MenuChangeEvent {
719
806
  item: ContextMenuItemDto;
720
807
  }
721
808
 
722
- declare class MenuService extends BaseDataService {
809
+ declare class MenuService {
723
810
  private readonly menuSource;
724
811
  private readonly resetSource;
725
812
  private readonly titleService;
@@ -747,60 +834,6 @@ declare class MenuService extends BaseDataService {
747
834
  static ɵprov: i0.ɵɵInjectableDeclaration<MenuService>;
748
835
  }
749
836
 
750
- type QueryParamsType = Record<string | number, any>;
751
- type ResponseFormat = keyof Omit<Body, "body" | "bodyUsed">;
752
- interface FullRequestParams extends Omit<RequestInit, "body"> {
753
- /** set parameter to `true` for call `securityWorker` for this request */
754
- secure?: boolean;
755
- /** request path */
756
- path: string;
757
- /** content type of request body */
758
- type?: ContentType;
759
- /** query params */
760
- query?: QueryParamsType;
761
- /** format of response (i.e. response.json() -> format: "json") */
762
- format?: ResponseFormat;
763
- /** request body */
764
- body?: unknown;
765
- /** base url */
766
- baseUrl?: string;
767
- /** request cancellation token */
768
- cancelToken?: CancelToken;
769
- }
770
- type RequestParams = Omit<FullRequestParams, "body" | "method" | "query" | "path">;
771
- type CancelToken = Symbol | string | number;
772
- declare enum ContentType {
773
- Json = "application/json",
774
- JsonApi = "application/vnd.api+json",
775
- FormData = "multipart/form-data",
776
- UrlEncoded = "application/x-www-form-urlencoded",
777
- Text = "text/plain"
778
- }
779
- declare class HttpClient<SecurityDataType = unknown> {
780
- protected securityService: SecurityService;
781
- protected layoutService: LayoutService;
782
- baseUrl: string;
783
- private securityData;
784
- private securityWorker?;
785
- private abortControllers;
786
- private customFetch;
787
- private baseApiParams;
788
- constructor();
789
- setSecurityData: (data: SecurityDataType | null) => void;
790
- protected encodeQueryParam(key: string, value: any): string;
791
- protected addQueryParam(query: QueryParamsType, key: string): string;
792
- protected addArrayQueryParam(query: QueryParamsType, key: string): any;
793
- protected toQueryString(rawQuery?: QueryParamsType): string;
794
- protected addQueryParams(rawQuery?: QueryParamsType): string;
795
- private contentFormatters;
796
- protected mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams;
797
- protected createAbortSignal: (cancelToken: CancelToken) => AbortSignal | undefined;
798
- abortRequest: (cancelToken: CancelToken) => void;
799
- request: <T = any, E = any>({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise<T>;
800
- static ɵfac: i0.ɵɵFactoryDeclaration<HttpClient<any>, never>;
801
- static ɵprov: i0.ɵɵInjectableDeclaration<HttpClient<any>>;
802
- }
803
-
804
837
  declare class MenuApi<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
805
838
  get: (params?: RequestParams) => Promise<ModuleInstanceDto[]>;
806
839
  getAdminMenu: (params?: RequestParams) => Promise<ModuleInstanceDto[]>;
@@ -829,6 +862,7 @@ declare class MenuItemCreateDialogComponent implements OnInit {
829
862
  label: string;
830
863
  selectIcon: string;
831
864
  saving: boolean;
865
+ get canSave(): boolean;
832
866
  ngOnInit(): Promise<void>;
833
867
  changeVisible(): void;
834
868
  save(): Promise<void>;
@@ -844,7 +878,7 @@ type PrimeIconOption = {
844
878
  };
845
879
  declare class MenuItemEditDialogComponent {
846
880
  private readonly menuService;
847
- private readonly securityDataService;
881
+ private readonly securityApi;
848
882
  private readonly msgService;
849
883
  visible: boolean;
850
884
  visibleChange: EventEmitter<boolean>;
@@ -921,6 +955,9 @@ declare class NotfoundComponent {
921
955
 
922
956
  declare class UnauthorizedComponent {
923
957
  protected readonly securityService: SecurityService;
958
+ private readonly route;
959
+ private readonly router;
960
+ protected signIn(): void;
924
961
  static ɵfac: i0.ɵɵFactoryDeclaration<UnauthorizedComponent, never>;
925
962
  static ɵcmp: i0.ɵɵComponentDeclaration<UnauthorizedComponent, "ng-component", never, {}, {}, never, never, true, never>;
926
963
  }
@@ -939,24 +976,12 @@ declare class ProfileComponent {
939
976
  static ɵcmp: i0.ɵɵComponentDeclaration<ProfileComponent, "user-profile", never, {}, {}, never, never, true, never>;
940
977
  }
941
978
 
942
- interface L10n {
943
- menu: string;
944
- all: string;
945
- profile: string;
946
- photo: string;
947
- usePhoto256x256Pixel: string;
948
- selectLanguage: string;
949
- moduleManagement: string;
950
- localization: string;
951
- goTo: string;
952
- }
953
979
  declare class ConfigComponent {
954
980
  private readonly layoutService;
955
981
  protected readonly l10nService: L10nService;
956
982
  protected readonly userService: UserService;
957
983
  protected readonly securityService: SecurityService;
958
984
  protected readonly menuService: MenuService;
959
- protected l10n: L10n;
960
985
  protected readonly dateFormats: string[];
961
986
  protected readonly timeFormats: string[];
962
987
  protected readonly allTimeZones: any[];
@@ -998,7 +1023,6 @@ declare class DbMigrationComponent extends BaseModuleComponent<NoSettingsDto, No
998
1023
  }
999
1024
 
1000
1025
  declare class AppModulesComponent implements OnInit {
1001
- protected dataService: BaseDataService;
1002
1026
  protected modules: ModuleDto[];
1003
1027
  protected msgService: MsgService;
1004
1028
  protected confirmationService: ConfirmationService;
@@ -1104,154 +1128,55 @@ declare class AppFloatingConfiguratorComponent {
1104
1128
  static ɵcmp: i0.ɵɵComponentDeclaration<AppFloatingConfiguratorComponent, "app-floating-configurator", never, {}, {}, never, never, true, never>;
1105
1129
  }
1106
1130
 
1107
- /** Attachment response DTO. */
1108
1131
  interface AttachmentDto {
1109
- /**
1110
- * Attachment identifier.
1111
- * @format int64
1112
- */
1113
1132
  attachmentId?: number;
1114
- /** Original file name. */
1115
1133
  fileName?: string | null;
1116
- /** MIME type of the file. */
1117
1134
  fileType?: string | null;
1118
- /**
1119
- * File size in bytes.
1120
- * @format int64
1121
- */
1122
1135
  fileSize?: number;
1123
- /**
1124
- * Upload timestamp.
1125
- * @format date-time
1126
- */
1127
1136
  uploadedAt?: Date;
1128
- /**
1129
- * File storage identifier.
1130
- * @format uuid
1131
- */
1132
1137
  storageFileId?: string;
1133
- /** Download URL for the file. */
1134
1138
  downloadUrl?: string | null;
1135
1139
  }
1136
- /** Comment response DTO. */
1137
1140
  interface CommentDto {
1138
- /**
1139
- * Comment identifier.
1140
- * @format int64
1141
- */
1142
1141
  commentId?: number;
1143
- /**
1144
- * Related entity type identifier.
1145
- * @format int64
1146
- */
1147
1142
  objectTypeId?: number;
1148
- /**
1149
- * Related entity identifier.
1150
- * @format int64
1151
- */
1152
1143
  objectId?: number;
1153
- /** Raw markdown comment content. */
1154
1144
  content?: string | null;
1155
- /**
1156
- * Author identifier.
1157
- * @format int64
1158
- */
1159
1145
  userId?: number;
1160
- /** Author display name. */
1161
1146
  authorDisplayName?: string | null;
1162
- /** Author e-mail. */
1163
1147
  authorEmail?: string | null;
1164
- /**
1165
- * Comment creation time.
1166
- * @format date-time
1167
- */
1168
1148
  createdAt?: Date;
1169
- /**
1170
- * Comment last update time.
1171
- * @format date-time
1172
- */
1173
1149
  updatedAt?: Date | null;
1174
- /** Whether the comment was edited. */
1175
1150
  isEdited?: boolean;
1176
- /**
1177
- * Number of edit history entries.
1178
- * @format int32
1179
- */
1180
1151
  historyCount?: number;
1181
- /** Whether the current user can edit this comment. */
1182
1152
  canEdit?: boolean;
1183
- /** Whether the current user can delete this comment. */
1184
1153
  canDelete?: boolean;
1185
- /** Attachments for the comment. */
1186
1154
  attachments?: AttachmentDto[] | null;
1187
- /** Reactions aggregated for the comment. */
1188
1155
  reactions?: CommentReactionDto[] | null;
1189
- /** Mentions for the comment. */
1190
1156
  mentions?: CommentMentionDto[] | null;
1191
1157
  }
1192
- /** Comment edit history response DTO. */
1193
1158
  interface CommentHistoryDto {
1194
- /**
1195
- * History entry identifier.
1196
- * @format int64
1197
- */
1198
1159
  commentEditHistoryId?: number;
1199
- /** Previous comment content. */
1200
1160
  oldContent?: string | null;
1201
- /** Updated comment content. */
1202
1161
  newContent?: string | null;
1203
- /**
1204
- * Editor identifier.
1205
- * @format int64
1206
- */
1207
1162
  editedByUserId?: number;
1208
- /** Editor display name. */
1209
1163
  editedByDisplayName?: string | null;
1210
- /**
1211
- * Time of edit.
1212
- * @format date-time
1213
- */
1214
1164
  editedAt?: Date;
1215
1165
  }
1216
- /** Mention response DTO. */
1217
1166
  interface CommentMentionDto {
1218
- /**
1219
- * Mentioned user identifier.
1220
- * @format int64
1221
- */
1222
1167
  mentionedUserId?: number;
1223
- /** Display name of the mentioned user. */
1224
1168
  displayName?: string | null;
1225
- /** E-mail of the mentioned user. */
1226
1169
  email?: string | null;
1227
- /**
1228
- * Position within the markdown text.
1229
- * @format int32
1230
- */
1231
1170
  position?: number;
1232
1171
  }
1233
- /** Aggregated reaction response DTO. */
1234
1172
  interface CommentReactionDto {
1235
- /** Emoji code. */
1236
1173
  emojiCode?: string | null;
1237
- /**
1238
- * Number of reactions with the same emoji.
1239
- * @format int32
1240
- */
1241
1174
  count?: number;
1242
- /** Whether the current user reacted with this emoji. */
1243
1175
  reactedByCurrentUser?: boolean;
1244
1176
  }
1245
- /** Mention candidate response DTO. */
1246
1177
  interface MentionUserDto {
1247
- /**
1248
- * User identifier.
1249
- * @format int64
1250
- */
1251
1178
  userId?: number;
1252
- /** Display name. */
1253
1179
  displayName?: string | null;
1254
- /** E-mail. */
1255
1180
  email?: string | null;
1256
1181
  }
1257
1182
 
@@ -1355,6 +1280,70 @@ declare class IframeModuleComponent extends BaseModuleComponent<IframeModuleSett
1355
1280
  static ɵcmp: i0.ɵɵComponentDeclaration<IframeModuleComponent, "ng-component", never, {}, {}, never, never, true, never>;
1356
1281
  }
1357
1282
 
1283
+ declare enum ImportanceLevel {
1284
+ Unspecified = "Unspecified",
1285
+ Low = "Low",
1286
+ Medium = "Medium",
1287
+ High = "High",
1288
+ Critical = "Critical"
1289
+ }
1290
+ interface UserNotificationCountResponse {
1291
+ count?: number;
1292
+ }
1293
+ interface UserNotificationDto {
1294
+ notificationUserId?: number;
1295
+ notificationId?: number;
1296
+ notificationTypeId?: number;
1297
+ notificationTypeName?: string | null;
1298
+ subject?: string | null;
1299
+ message?: string | null;
1300
+ importance?: ImportanceLevel;
1301
+ notificationChannelId?: number | null;
1302
+ sentAt?: Date | null;
1303
+ deliveredAt?: Date | null;
1304
+ readAt?: Date | null;
1305
+ createdAt?: Date;
1306
+ dataJson?: string | null;
1307
+ }
1308
+ interface UserNotificationListResponse {
1309
+ notifications?: UserNotificationDto[] | null;
1310
+ totalCount?: number;
1311
+ }
1312
+ interface GetNotificationByUserParams {
1313
+ skip?: number;
1314
+ take?: number;
1315
+ unreadOnly?: boolean;
1316
+ }
1317
+ interface MarkNotificationAsReadParams {
1318
+ id: number;
1319
+ }
1320
+ interface GetNotificationByIdParams {
1321
+ id?: number;
1322
+ }
1323
+
1324
+ declare class UserNotificationsComponent {
1325
+ private popover?;
1326
+ protected notifications: UserNotificationDto[];
1327
+ protected totalCount: number;
1328
+ protected skip: number;
1329
+ protected take: number;
1330
+ protected loading: boolean;
1331
+ protected readingNotificationId?: number;
1332
+ private readonly notificationApi;
1333
+ private readonly notificationService;
1334
+ private readonly msgService;
1335
+ private readonly translateService;
1336
+ protected readonly unreadNotificationCount: i0.Signal<number>;
1337
+ protected readonly unreadNotificationBadge: i0.Signal<string>;
1338
+ protected toggle(event: Event): Promise<void>;
1339
+ loadNotifications(): Promise<void>;
1340
+ onPageChange(event: PaginatorState): Promise<void>;
1341
+ markAsRead(notification: UserNotificationDto): Promise<void>;
1342
+ protected getImportanceSeverity(importance: string): 'success' | 'info' | 'warn' | 'danger' | 'secondary';
1343
+ static ɵfac: i0.ɵɵFactoryDeclaration<UserNotificationsComponent, never>;
1344
+ static ɵcmp: i0.ɵɵComponentDeclaration<UserNotificationsComponent, "app-user-notifications", never, {}, {}, never, never, true, never>;
1345
+ }
1346
+
1358
1347
  /**
1359
1348
  * A route guard that ensures the user is authenticated and has a valid access token.
1360
1349
  * If the access token is expired, it attempts to refresh the session.
@@ -1371,35 +1360,20 @@ declare class AuthGuardService {
1371
1360
  *
1372
1361
  * @returns {Observable<boolean | UrlTree>} A stream resolving to true (allow), or UrlTree (redirect).
1373
1362
  */
1374
- canActivate(): Observable<boolean | UrlTree>;
1375
- /**
1376
- * Attempts to refresh the session using the refresh token.
1377
- * If successful, allows route activation; otherwise, redirects to `/unauthorized`.
1378
- *
1379
- * @returns {boolean | UrlTree} A stream resolving to true or redirect UrlTree.
1380
- */
1381
- tryRefreshToken(): Observable<boolean | UrlTree>;
1363
+ canActivate(returnUrl?: string): Observable<boolean | UrlTree>;
1364
+ private getReturnUrl;
1382
1365
  static ɵfac: i0.ɵɵFactoryDeclaration<AuthGuardService, never>;
1383
1366
  static ɵprov: i0.ɵɵInjectableDeclaration<AuthGuardService>;
1384
1367
  }
1385
1368
 
1386
- declare class SecurityStorageService implements AbstractSecurityStorage {
1387
- read(key: string): string;
1388
- write(key: string, value: any): void;
1389
- remove(key: string): void;
1390
- clear(): void;
1391
- static ɵfac: i0.ɵɵFactoryDeclaration<SecurityStorageService, never>;
1392
- static ɵprov: i0.ɵɵInjectableDeclaration<SecurityStorageService>;
1393
- }
1394
-
1395
1369
  declare class NotificationService {
1396
1370
  private connection;
1397
1371
  private securityService;
1398
1372
  private msgService;
1399
- private frontendConfig;
1400
- private securityData;
1373
+ private notificationApi;
1374
+ unreadNotificationCount: i0.WritableSignal<number>;
1401
1375
  constructor();
1402
- private resolveHubUrl;
1376
+ loadUnreadNotificationCount(): void;
1403
1377
  static ɵfac: i0.ɵɵFactoryDeclaration<NotificationService, never>;
1404
1378
  static ɵprov: i0.ɵɵInjectableDeclaration<NotificationService>;
1405
1379
  }
@@ -1452,31 +1426,70 @@ declare function provideAppThemes(themes: AppThemePreset[], options?: ProvideApp
1452
1426
  declare function mergeWithDefaults(themes: AppThemePreset[]): EnvironmentProviders;
1453
1427
  declare function replaceDefaults(themes: AppThemePreset[]): EnvironmentProviders;
1454
1428
 
1455
- type OipFrontendAppMode = 'standalone' | 'distributed';
1456
- interface OipFrontendConfig {
1457
- appMode: OipFrontendAppMode;
1458
- apiBaseUrl?: string;
1459
- notificationHubUrl?: string;
1460
- }
1461
- declare const DEFAULT_OIP_FRONTEND_CONFIG: OipFrontendConfig;
1462
- declare const OIP_FRONTEND_CONFIG: InjectionToken<OipFrontendConfig>;
1429
+ declare function provideOip(): i0.EnvironmentProviders;
1463
1430
 
1464
1431
  declare const langIntercept: HttpInterceptorFn;
1465
1432
 
1466
- declare class SecurePipe implements PipeTransform {
1467
- private readonly http;
1468
- private readonly sanitizer;
1469
- transform(url: any): Observable<SafeUrl>;
1470
- static ɵfac: i0.ɵɵFactoryDeclaration<SecurePipe, never>;
1471
- static ɵpipe: i0.ɵɵPipeDeclaration<SecurePipe, "secure", true>;
1433
+ declare class FolderModuleApi<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
1434
+ getModuleInstanceSettings: (query: GetModuleInstanceSettingsParams, params?: RequestParams) => Promise<FolderModuleSettings>;
1435
+ static ɵfac: i0.ɵɵFactoryDeclaration<FolderModuleApi<any>, never>;
1436
+ static ɵprov: i0.ɵɵInjectableDeclaration<FolderModuleApi<any>>;
1472
1437
  }
1473
1438
 
1474
- /**
1475
- * Load keycloak settings from backend and save to sessionStorage
1476
- * @param httpClient
1477
- * @returns StsConfigHttpLoader
1478
- */
1479
- declare const httpLoaderAuthFactory: (httpClient: HttpClient$1) => StsConfigHttpLoader;
1439
+ declare class IframeModuleApi<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
1440
+ getModuleInstanceSettings: (query: GetModuleInstanceSettingsParams2, params?: RequestParams) => Promise<IframeModuleSettings>;
1441
+ static ɵfac: i0.ɵɵFactoryDeclaration<IframeModuleApi<any>, never>;
1442
+ static ɵprov: i0.ɵɵInjectableDeclaration<IframeModuleApi<any>>;
1443
+ }
1444
+
1445
+ declare class SecurityApi<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
1446
+ getCurrentAuthSession: (params?: RequestParams) => Promise<AuthSessionResponse>;
1447
+ createAuthSession: (params?: RequestParams) => Promise<any>;
1448
+ deleteAuthSession: (params?: RequestParams) => Promise<any>;
1449
+ getAuthCsrfToken: (params?: RequestParams) => Promise<AuthCsrfTokenResponse>;
1450
+ getKeycloakClientSettings: (params?: RequestParams) => Promise<GetKeycloakClientSettingsResponse>;
1451
+ getRealmRoles: (params?: RequestParams) => Promise<string[]>;
1452
+ static ɵfac: i0.ɵɵFactoryDeclaration<SecurityApi<any>, never>;
1453
+ static ɵprov: i0.ɵɵInjectableDeclaration<SecurityApi<any>>;
1454
+ }
1455
+
1456
+ interface UserSettingsDto {
1457
+ preset?: string | null;
1458
+ primary?: string | null;
1459
+ surface?: string | null;
1460
+ darkTheme?: boolean;
1461
+ menuMode?: string | null;
1462
+ language?: string | null;
1463
+ dateFormat?: string | null;
1464
+ timeFormat?: string | null;
1465
+ timeZone?: string | null;
1466
+ }
1467
+ interface GetUserPhotoParams {
1468
+ email?: string;
1469
+ }
1470
+ interface PostUserPhotoPayload {
1471
+ files?: File;
1472
+ }
1473
+
1474
+ declare class UserProfileApi<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
1475
+ getUserPhoto: (query: GetUserPhotoParams, params?: RequestParams) => Promise<File>;
1476
+ postUserPhoto: (data: PostUserPhotoPayload, params?: RequestParams) => Promise<void>;
1477
+ getSettings: (params?: RequestParams) => Promise<UserSettingsDto>;
1478
+ setSettings: (data: UserSettingsDto, params?: RequestParams) => Promise<void>;
1479
+ static ɵfac: i0.ɵɵFactoryDeclaration<UserProfileApi<any>, never>;
1480
+ static ɵprov: i0.ɵɵInjectableDeclaration<UserProfileApi<any>>;
1481
+ }
1482
+
1483
+ declare function convertToPrimeNgDateFormat(dateformat: string): string;
1484
+
1485
+ declare class NotificationApi<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
1486
+ getNotificationByUser: (query: GetNotificationByUserParams, params?: RequestParams) => Promise<UserNotificationListResponse>;
1487
+ getNotificationCountByUser: (params?: RequestParams) => Promise<UserNotificationCountResponse>;
1488
+ markNotificationAsRead: ({ id, ...query }: MarkNotificationAsReadParams, params?: RequestParams) => Promise<void>;
1489
+ getNotificationById: (query: GetNotificationByIdParams, params?: RequestParams) => Promise<UserNotificationDto>;
1490
+ static ɵfac: i0.ɵɵFactoryDeclaration<NotificationApi<any>, never>;
1491
+ static ɵprov: i0.ɵɵInjectableDeclaration<NotificationApi<any>>;
1492
+ }
1480
1493
 
1481
- export { APP_THEME_PRESETS, APP_THEME_PRESETS_MERGE_MODE, AppConfiguratorComponent, AppFloatingConfiguratorComponent, AppLayoutComponent, AppModulesComponent, AppTopbar, AuthGuardService, BaseDataService, BaseModuleComponent, ConfigComponent, ContentType, DEFAULT_OIP_FRONTEND_CONFIG, DbMigrationComponent, DiscussionComponent, ErrorComponent, FooterComponent, HttpClient, IframeModuleComponent, KeycloakSecurityService, L10nService, LOGO_COMPONENT_TOKEN, LayoutService, LogoComponent, LogoService, MenuComponent, MenuService, MsgService, NotfoundComponent, NotificationService, OIP_FRONTEND_CONFIG, ProfileComponent, SecurePipe, SecurityComponent, SecurityDataService, SecurityService, SecurityStorageService, SidebarComponent, TableFilterService, TopBarService, UnauthorizedComponent, UserService, httpLoaderAuthFactory, langIntercept, mergeWithDefaults, provideAppThemes, provideLogoComponent, replaceDefaults };
1482
- export type { AppConfig, AppThemePreset, AppThemePresetMergeMode, LanguageDto, MenuChangeEvent, NoSettingsDto, OipFrontendAppMode, OipFrontendConfig, PutSecurityDto, RequestParams, SecurityDto, TopBarDto };
1494
+ export { APP_THEME_PRESETS, APP_THEME_PRESETS_MERGE_MODE, AppConfiguratorComponent, AppFloatingConfiguratorComponent, AppLayoutComponent, AppModulesComponent, AppTopbar, AuthGuardService, BaseModuleComponent, BffSecurityService, ConfigComponent, ContentType, DbMigrationComponent, DiscussionComponent, ErrorComponent, FolderModuleApi, FooterComponent, HttpClient, IframeModuleApi, IframeModuleComponent, KeycloakSecurityService, L10nService, LOGO_COMPONENT_TOKEN, LayoutService, LogoComponent, LogoService, MenuComponent, MenuService, MsgService, NotfoundComponent, NotificationApi, NotificationService, ProfileComponent, SecurityApi, SecurityComponent, SecurityService, SidebarComponent, TableFilterService, TopBarService, UnauthorizedComponent, UserNotificationsComponent, UserProfileApi, UserService, convertToPrimeNgDateFormat, langIntercept, mergeWithDefaults, provideAppThemes, provideLogoComponent, provideOip, replaceDefaults };
1495
+ export type { AppConfig, AppThemePreset, AppThemePresetMergeMode, AuthCsrfToken, LanguageDto, MenuChangeEvent, NoSettingsDto, PutSecurityDto, RequestParams, SecurityDto, TopBarDto };