@arsedizioni/ars-utils 21.2.209 → 21.2.221

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.
Files changed (34) hide show
  1. package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs +179 -159
  2. package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs.map +1 -1
  3. package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs +2939 -2939
  4. package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs.map +1 -1
  5. package/fesm2022/arsedizioni-ars-utils-core.mjs +101 -101
  6. package/fesm2022/arsedizioni-ars-utils-core.mjs.map +1 -1
  7. package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs +280 -252
  8. package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs.map +1 -1
  9. package/fesm2022/arsedizioni-ars-utils-help.mjs +115 -102
  10. package/fesm2022/arsedizioni-ars-utils-help.mjs.map +1 -1
  11. package/fesm2022/arsedizioni-ars-utils-support.common.mjs +43 -36
  12. package/fesm2022/arsedizioni-ars-utils-support.common.mjs.map +1 -1
  13. package/fesm2022/arsedizioni-ars-utils-support.ui.mjs +68 -77
  14. package/fesm2022/arsedizioni-ars-utils-support.ui.mjs.map +1 -1
  15. package/fesm2022/arsedizioni-ars-utils-tinymce.mjs +41 -26
  16. package/fesm2022/arsedizioni-ars-utils-tinymce.mjs.map +1 -1
  17. package/fesm2022/arsedizioni-ars-utils-ui.application.mjs +1461 -1390
  18. package/fesm2022/arsedizioni-ars-utils-ui.application.mjs.map +1 -1
  19. package/fesm2022/arsedizioni-ars-utils-ui.mjs +1349 -1204
  20. package/fesm2022/arsedizioni-ars-utils-ui.mjs.map +1 -1
  21. package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs +29 -25
  22. package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs.map +1 -1
  23. package/package.json +1 -1
  24. package/types/arsedizioni-ars-utils-clipper.common.d.ts +88 -62
  25. package/types/arsedizioni-ars-utils-clipper.ui.d.ts +196 -196
  26. package/types/arsedizioni-ars-utils-core.d.ts +16 -16
  27. package/types/arsedizioni-ars-utils-evolution.common.d.ts +131 -70
  28. package/types/arsedizioni-ars-utils-help.d.ts +76 -66
  29. package/types/arsedizioni-ars-utils-support.common.d.ts +29 -19
  30. package/types/arsedizioni-ars-utils-support.ui.d.ts +29 -25
  31. package/types/arsedizioni-ars-utils-tinymce.d.ts +25 -10
  32. package/types/arsedizioni-ars-utils-ui.application.d.ts +597 -467
  33. package/types/arsedizioni-ars-utils-ui.d.ts +474 -337
  34. package/types/arsedizioni-ars-utils-ui.oauth.d.ts +25 -18
@@ -617,7 +617,8 @@ interface EvolutionComplianceLawsAddParams extends EvolutionComplianceLaw {
617
617
  sites?: number[];
618
618
  registers?: number[];
619
619
  }
620
- interface EvolutionComplianceLaswExportParams extends EvolutionExportModel<any> {
620
+ /** Export parameters for compliance laws. */
621
+ interface EvolutionComplianceLaswExportParams extends EvolutionExportModel<Partial<EvolutionComplianceLaw>> {
621
622
  }
622
623
  interface EvolutionComplianceLawReference {
623
624
  id?: number;
@@ -697,153 +698,213 @@ interface EvolutionComplianceActivitiesAddParams extends EvolutionComplianceActi
697
698
  document?: EvolutionComplianceLawDocumentInfo;
698
699
  }
699
700
 
701
+ /**
702
+ * HTTP interceptor that attaches Evolution authentication headers to every request
703
+ * targeting the Evolution service, and broadcasts user-friendly error messages
704
+ * when the server returns an error response.
705
+ */
700
706
  declare class EvolutionAuthInterceptor implements HttpInterceptor {
701
- private evolutionService;
702
- private broadcastService;
707
+ private readonly evolutionService;
708
+ private readonly broadcastService;
703
709
  private lastErrorTime;
704
- intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
710
+ /**
711
+ * Intercepts every outgoing HTTP request.
712
+ * When the request targets the Evolution service URI, attaches credentials and
713
+ * a client-ID header, then pipes the response through an error handler.
714
+ * @param request - The outgoing HTTP request.
715
+ * @param next - The next handler in the interceptor chain.
716
+ * @returns An observable of the HTTP event stream.
717
+ */
718
+ intercept(request: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>>;
719
+ /**
720
+ * Processes an HTTP error, broadcasting a user-friendly message when appropriate.
721
+ * Errors are debounced: only one message is sent per `ERROR_DEBOUNCE_MS` window.
722
+ * @param error - The raw error value thrown by the HTTP layer.
723
+ */
724
+ private handleError;
705
725
  static ɵfac: i0.ɵɵFactoryDeclaration<EvolutionAuthInterceptor, never>;
706
726
  static ɵprov: i0.ɵɵInjectableDeclaration<EvolutionAuthInterceptor>;
707
727
  }
708
728
 
729
+ /**
730
+ * Core service for the Evolution compliance module.
731
+ * Manages authentication (login / logout / MFA), session persistence,
732
+ * and HTTP access to all Evolution API endpoints.
733
+ */
709
734
  declare class EvolutionService implements OnDestroy {
710
- private httpClient;
711
- private broadcastService;
735
+ private readonly httpClient;
736
+ private readonly broadcastService;
737
+ private readonly dialogService;
712
738
  private broadcastServiceSubscription?;
713
- private dialogService;
714
739
  private _serviceUri;
715
- get serviceUri(): string;
740
+ /** Base URI of the Evolution back-end service. */
741
+ get serviceUri(): string | undefined;
716
742
  private _flags;
743
+ /** Feature flags controlling service behaviour (notifications, embedded mode, etc.). */
717
744
  get flags(): EvolutionServiceFlags;
718
745
  private _loginInfo?;
746
+ /**
747
+ * Returns the current login info, hydrating it from `localStorage` on first access
748
+ * when no in-memory value is available.
749
+ */
719
750
  get loginInfo(): EvolutionLoginInfo | undefined;
751
+ /** `true` when the user has an active (non-temporary) session. */
720
752
  readonly loggedIn: i0.WritableSignal<boolean>;
753
+ /** `true` while a login request is in flight. */
721
754
  readonly loggingIn: i0.WritableSignal<boolean>;
722
755
  ngOnDestroy(): void;
723
756
  /**
724
- * Initialize service
725
- * @param serviceUri : the service uri
726
- * @param flags: the service flags. Default is none.
757
+ * Initialises the service with the back-end URI and optional feature flags.
758
+ * Must be called once during application bootstrap before any other method.
759
+ * @param serviceUri - Base URL of the Evolution service (e.g. `'https://api.example.com/evolution'`).
760
+ * @param flags - Bitmask of `EvolutionServiceFlags` (default: `None`).
727
761
  */
728
762
  initialize(serviceUri: string, flags?: EvolutionServiceFlags): void;
729
763
  /**
730
- * Ping
731
- */
764
+ * Dispatches an incoming broadcast message to the appropriate handler.
765
+ * @param message - The message received from the broadcast channel.
766
+ */
767
+ private handleBroadcastMessage;
768
+ /**
769
+ * Sends a one-shot ping to the back end to verify connectivity.
770
+ */
732
771
  ping(): void;
733
772
  /**
734
- * Store login info
735
- */
773
+ * Persists the current login info to `localStorage`.
774
+ */
736
775
  storeContext(): void;
737
776
  /**
738
- * Update context
739
- * @param result: the new context
777
+ * Merges a login result into the stored login info and persists it.
778
+ * @param result - The `EvolutionLoginResult` returned by the login endpoint.
740
779
  */
741
780
  updateContext(result: EvolutionLoginResult): void;
742
781
  /**
743
- * Perform auto login using current link data
744
- * @param onSuccess: function to execute on seccess
745
- */
746
- autoLogin(onSuccess?: Function): boolean;
782
+ * Performs an automatic login using the credentials already stored in the session.
783
+ * Shows a busy indicator and handles success/failure dialogs.
784
+ * @param onSuccess - Optional callback invoked after a successful login.
785
+ * @returns `true` (always) — the result is handled via the subscription callbacks.
786
+ */
787
+ autoLogin(onSuccess?: () => void): boolean;
747
788
  /**
748
- * Perform auto logout
749
- * @param onSuccess: function to execute on seccess
789
+ * Performs an automatic logout, notifying the user when the session ends.
790
+ * @param onSuccess - Optional callback invoked after the logout completes.
750
791
  */
751
- autoLogout(onSuccess?: Function): void;
792
+ autoLogout(onSuccess?: () => void): void;
752
793
  /**
753
- * Perform login
754
- * @param email: the optional email if using OAuth2
755
- * @parma password: the optional password if using OAuth2
756
- * @param remember: remember credentials
757
- * @param oauth: the optional open authentication supported
758
- * @param oauthAccessToken: the optional OAuth2 access token
794
+ * Authenticates the user against the Evolution back end.
795
+ * Supports both credential-based and OAuth2 login flows.
796
+ * @param email - User e-mail (credential login only; omit for OAuth2).
797
+ * @param password - User password (credential login only; omit for OAuth2).
798
+ * @param remember - Whether to persist the session across browser restarts.
799
+ * @param oauth - OAuth2 provider type, when using federated login.
800
+ * @param oauthAccessToken - Bearer token from the OAuth2 provider.
801
+ * @returns An observable that emits the `ApiResult<EvolutionLoginResult>`.
759
802
  */
760
803
  login(email?: string, password?: string, remember?: boolean, oauth?: LoginOAuthType, oauthAccessToken?: string | undefined): rxjs.Observable<ApiResult<EvolutionLoginResult>>;
761
804
  /**
762
- * Complete login
763
- * @param result : the login result
805
+ * Finalises a successful login by updating the stored context and notifying consumers.
806
+ * @param result - The login result payload from the server.
764
807
  */
765
808
  private completeLogin;
766
809
  /**
767
- * Confirm MFA procedure
768
- * @param code: the confirm code
810
+ * Confirms a multi-factor authentication challenge and completes the login.
811
+ * @param code - The one-time MFA code entered by the user.
812
+ * @returns An observable that emits the `ApiResult<EvolutionLoginResult>`.
769
813
  */
770
814
  confirmIdentity(code: string): rxjs.Observable<ApiResult<EvolutionLoginResult>>;
771
815
  /**
772
- * Perform logout
773
- * @param forget: true to dispose all user informations
774
- */
775
- logout(forget?: boolean): rxjs.Observable<any>;
816
+ * Logs the current user out of the back end and clears local session data.
817
+ * @param forget - When `true`, instructs the server to discard all stored credentials.
818
+ * @returns An observable that emits `ApiResult<unknown>`.
819
+ */
820
+ logout(forget?: boolean): rxjs.Observable<ApiResult<unknown>>;
776
821
  /**
777
- * Switch the current login to a new one with the same credentials except role possibly (context change)
778
- * @param id : new user id
779
- */
822
+ * Switches the active session to a different user account while retaining credentials.
823
+ * @param id - The user ID to switch to.
824
+ * @returns An observable that emits the `ApiResult<EvolutionLoginResult>`.
825
+ */
780
826
  loginSwitch(id: number): rxjs.Observable<ApiResult<EvolutionLoginResult>>;
781
827
  /**
782
- * Reset login refresh timer and login state
828
+ * Resets the in-memory login state and broadcasts a logout-completed event.
829
+ * Does **not** touch `sessionStorage` or `localStorage`; call `clear()` for a full cleanup.
783
830
  */
784
831
  reset(): void;
785
832
  /**
786
- * Clear login data
787
- * @param clearOAuthToken: true to clear oauth token also
833
+ * Removes Evolution session data from `sessionStorage` and calls `reset()`.
834
+ * @param clearOAuthToken - When `true`, also removes the stored OAuth2 access token.
788
835
  */
789
836
  clear(clearOAuthToken?: boolean): void;
790
837
  /**
791
- * Convert folders in a tree of Node object.
792
- * @param folders : the subfolders group or null to root
838
+ * Converts a flat list of `INode` items into a hierarchical tree structure.
839
+ * @param folders - The root-level nodes to convert.
840
+ * @returns An array of `INode` objects with nested `children`.
793
841
  */
794
842
  toNodes(folders: INode[]): INode[];
795
843
  /**
796
- * Convert folders in a tree of Node object.
797
- * @param folders : the children group or null to root
844
+ * Recursive helper for `toNodes`.
845
+ * @param folders - The nodes to process at the current depth level.
846
+ * @param parent - The parent node, or `undefined` at the root level.
847
+ * @returns An array of `INode` objects with nested `children`.
798
848
  */
799
849
  private _toNodes;
800
850
  /**
801
- * Retrieve the taxonomy
851
+ * Retrieves the taxonomy tree from the back end.
852
+ * @returns An observable that emits `ApiResult<FolderTree>`.
802
853
  */
803
854
  getTaxonomy(): rxjs.Observable<ApiResult<FolderTree>>;
804
855
  /**
805
- * Retrieve groups
806
- * @param group: the group number
807
- * @param register: the optional register id. Default is null.
808
- */
856
+ * Retrieves the compliance groups for a register.
857
+ * @param group - Group index to retrieve (default: `1`).
858
+ * @param register - Optional register ID to scope the query.
859
+ * @returns An observable that emits `ApiResult<string[]>`.
860
+ */
809
861
  getGroups(group?: number, register?: number): rxjs.Observable<ApiResult<string[]>>;
810
862
  /**
811
- * Change context
863
+ * Sends a context-change request to the back end.
864
+ * @param params - The context model describing the desired switch.
865
+ * @returns An observable that emits `ApiResult<EvolutionChangeContextResultModel>`.
812
866
  */
813
867
  changeContext(params: EvolutionChangeContextModel): rxjs.Observable<ApiResult<EvolutionChangeContextResultModel>>;
814
868
  /**
815
- * Retrieve a register
816
- * @param id the register id
869
+ * Retrieves a single compliance register by ID.
870
+ * @param id - The register ID.
871
+ * @returns An observable that emits `ApiResult<EvolutionComplianceRegister>`.
817
872
  */
818
873
  getRegister(id: number): rxjs.Observable<ApiResult<EvolutionComplianceRegister>>;
819
874
  /**
820
- * Collect register profiles
821
- * @param params parameters
875
+ * Collects register profiles matching the given query parameters.
876
+ * @param params - Query parameters defining the filter criteria.
877
+ * @returns An observable that emits `ApiResult<EvolutionComplianceRegisterProfile[]>`.
822
878
  */
823
879
  collectRegisterProfiles(params: EvolutionQueryRegisterProfilesModel): rxjs.Observable<ApiResult<EvolutionComplianceRegisterProfile[]>>;
824
880
  /**
825
- * Add one or more laws
826
- * @param params parameters
881
+ * Adds one or more compliance laws.
882
+ * @param params - The laws to add.
883
+ * @returns An observable that emits `ApiResult<EvolutionComplianceLaw[]>`.
827
884
  */
828
885
  addLaws(params: EvolutionComplianceLawsAddParams): rxjs.Observable<ApiResult<EvolutionComplianceLaw[]>>;
829
886
  /**
830
- * Add one or more activities
831
- * @param params parameters
887
+ * Adds one or more compliance activities.
888
+ * @param params - The activities to add.
889
+ * @returns An observable that emits `ApiResult<EvolutionComplianceActivity>`.
832
890
  */
833
891
  addActivities(params: EvolutionComplianceActivitiesAddParams): rxjs.Observable<ApiResult<EvolutionComplianceActivity>>;
834
892
  /**
835
- * Export laws
836
- * @param params parameters
837
- */
893
+ * Exports compliance laws in the format expected by the server.
894
+ * @param params - Export parameters (model shape is server-defined).
895
+ * @returns An observable that emits the binary blob response.
896
+ */
838
897
  exportLaws(params: any): rxjs.Observable<Blob>;
839
898
  /**
840
- * Save a user link
841
- * @param item: the user link
842
- */
899
+ * Persists a user link on the server.
900
+ * @param item - The user link to save.
901
+ * @returns An observable that emits `ApiResult<boolean>`.
902
+ */
843
903
  saveLink(item: EvolutionUserLink): rxjs.Observable<ApiResult<boolean>>;
844
904
  /**
845
- * Delete a user link
846
- * @param item: the user link
905
+ * Deletes a user link from the server.
906
+ * @param item - The user link to delete.
907
+ * @returns An observable that emits `ApiResult<boolean>`.
847
908
  */
848
909
  deleteLink(item: EvolutionUserLink): rxjs.Observable<ApiResult<boolean>>;
849
910
  static ɵfac: i0.ɵɵFactoryDeclaration<EvolutionService, never>;
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { OnInit, OnDestroy, AfterViewInit, Signal } from '@angular/core';
2
+ import { OnInit, OnDestroy, AfterViewInit } from '@angular/core';
3
3
  import { Folder, ApiResult } from '@arsedizioni/ars-utils/core';
4
4
  import { BreakpointObserver } from '@angular/cdk/layout';
5
5
  import { FlatTreeControl } from '@angular/cdk/tree';
@@ -28,55 +28,56 @@ declare class IndexTreeDataSource implements OnDestroy {
28
28
  get data(): IndexInfo[];
29
29
  ngOnDestroy(): void;
30
30
  /**
31
- * Initialzie the data source
32
- * @param data : data
31
+ * Initialises the data source with a flat list of root nodes.
32
+ * @param data - Array of root `IndexInfo` items to display in the tree.
33
33
  */
34
34
  initialize(data: IndexInfo[]): void;
35
35
  /**
36
- * Find a node by id recursively
37
- * @param node: the source node
38
- * @param id : the id to search for
36
+ * Recursively searches the tree for a node with the given id.
37
+ * @param node - The node to start from, or `null`/`undefined` to search from the root.
38
+ * @param id - The id of the node to find.
39
+ * @returns The matching `IndexInfo`, or `undefined` if not found.
39
40
  */
40
- findNode(node: IndexInfo, id: string): IndexInfo;
41
+ findNode(node: IndexInfo | undefined | null, id: string): IndexInfo | undefined;
41
42
  /**
42
- * Remove a node
43
- * @param id : the node id to remove
43
+ * Removes the node with the given id from the tree.
44
+ * @param id - The id of the node to remove.
44
45
  */
45
46
  removeNode(id: string): void;
46
47
  /**
47
- * Insert a new node
48
- * @param node : the new node
48
+ * Inserts a new node at the beginning of its parent's children, or at the root.
49
+ * @param node - The `IndexInfo` node to insert.
49
50
  */
50
51
  insertNode(node: IndexInfo): void;
51
52
  /**
52
- * Rename a node
53
- * @param id : the node id
54
- * @param name : the new node name
53
+ * Renames a node in the tree.
54
+ * @param id - The id of the node to rename.
55
+ * @param name - The new display name.
55
56
  */
56
57
  renameNode(id: string, name: string): void;
57
58
  /**
58
- * Update data
59
+ * Re-emits the current data to all subscribers, triggering a tree refresh.
59
60
  */
60
61
  update(): void;
61
62
  static ɵfac: i0.ɵɵFactoryDeclaration<IndexTreeDataSource, never>;
62
63
  static ɵprov: i0.ɵɵInjectableDeclaration<IndexTreeDataSource>;
63
64
  }
64
65
  declare class HelpViewerComponent implements OnInit, OnDestroy, AfterViewInit {
65
- readonly indexPane: Signal<MatSidenav>;
66
- private unsubscribe;
67
- private changeDetector;
68
- private dialogRef;
69
- protected dialogData: HelpViewerDialogData;
70
- private dialogService;
71
- private helpService;
72
- protected breakpointObserver: BreakpointObserver;
73
- protected busy: i0.WritableSignal<boolean>;
74
- protected page: i0.WritableSignal<string>;
66
+ readonly indexPane: i0.Signal<MatSidenav>;
67
+ private readonly unsubscribe;
68
+ private readonly changeDetector;
69
+ private readonly dialogRef;
70
+ protected readonly dialogData: HelpViewerDialogData;
71
+ private readonly dialogService;
72
+ private readonly helpService;
73
+ protected readonly breakpointObserver: BreakpointObserver;
74
+ protected readonly busy: i0.WritableSignal<boolean>;
75
+ protected readonly page: i0.WritableSignal<string>;
75
76
  private indexId;
76
77
  private indexPaneClosed;
77
- protected indexNode: IndexInfo;
78
- private history;
79
- protected canGoBack: Signal<boolean>;
78
+ protected indexNode: IndexInfo | undefined;
79
+ private readonly history;
80
+ protected readonly canGoBack: i0.Signal<boolean>;
80
81
  /**
81
82
  * Manage flat tree view
82
83
  */
@@ -98,57 +99,60 @@ declare class HelpViewerComponent implements OnInit, OnDestroy, AfterViewInit {
98
99
  */
99
100
  private handleFilterPaneVisibility;
100
101
  /**
101
- * Show hide index pane manually
102
+ * Shows or hides the index pane when the user clicks the toggle button.
103
+ * Also tracks the user's explicit intent so the pane is not auto-reopened.
102
104
  */
103
105
  protected toggleIndexPane(): void;
104
106
  /**
105
- * Close dialog
107
+ * Closes the help viewer dialog.
106
108
  */
107
109
  protected close(): void;
108
110
  /**
109
- * Get the toc
111
+ * Loads the table of contents from the help service and populates the tree.
110
112
  */
111
113
  protected getToc(): void;
112
114
  /**
113
- * React to click event and find new help target to go to
114
- * @param event : the click event
115
- * @returns : always false, to stop navigation
115
+ * Intercepts anchor clicks inside the help page and navigates to the referenced chapter.
116
+ * @param e - The click `MouseEvent` from the page content area.
117
+ * @returns `false` to prevent default browser navigation.
116
118
  */
117
- protected gotoChapter(e: any): boolean;
119
+ protected gotoChapter(e: MouseEvent): boolean;
118
120
  /**
119
- * Find a node by id
120
- * @param id : folder id
121
- * @returns: the folder info
121
+ * Searches the folder list for a node matching the given id.
122
+ * @param id - The id of the folder to locate.
123
+ * @returns The matching `IndexInfo`, or `undefined` if not found.
122
124
  */
123
125
  private findFolder;
124
126
  /**
125
- * Expand current fodler node
127
+ * Expands the tree node that corresponds to the currently selected chapter,
128
+ * and all its ancestor nodes.
126
129
  */
127
130
  private expandCurrentFolder;
128
131
  /**
129
- * Retrieve a new chapter
130
- * @param id the chapter id#anchor
131
- * @param position : the position to scroll to
132
+ * Retrieves and displays a help chapter by id.
133
+ * Optionally scrolls to an anchor or pixel offset after loading.
134
+ * @param id - Chapter id, optionally followed by an anchor (`id#anchor`).
135
+ * @param position - Pixel scroll offset to restore (default `0`, meaning top).
132
136
  */
133
137
  protected getChapter(id: string, position?: number): void;
134
138
  /**
135
- * Goto position
136
- * @param anchor the anchor to go to
137
- * @param position the offset to go to
139
+ * Scrolls the help content to a named anchor or a numeric pixel offset.
140
+ * @param anchor - Named anchor (`<a name="…">`) to scroll to, if any.
141
+ * @param position - Fallback pixel offset (default `0`).
138
142
  */
139
- protected gotoPosition(anchor: string, position?: number): void;
143
+ protected gotoPosition(anchor: string | undefined, position?: number): void;
140
144
  /**
141
- * Get scroll position
142
- * @returns: the new scroll top
145
+ * Returns the current vertical scroll offset of the help content scroller.
146
+ * @returns The `scrollTop` value in pixels, or `0` if the element is not found.
143
147
  */
144
148
  protected getPosition(): number;
145
149
  /**
146
- * Set scroll position
147
- * @param position : the position to go to
150
+ * Scrolls the help content scroller to the specified pixel offset.
151
+ * @param position - The vertical pixel offset to scroll to.
148
152
  */
149
153
  protected setPosition(position: number): void;
150
154
  /**
151
- * Go back
155
+ * Navigates back to the previous chapter in the browsing history.
152
156
  */
153
157
  protected back(): void;
154
158
  static ɵfac: i0.ɵɵFactoryDeclaration<HelpViewerComponent, never>;
@@ -173,36 +177,42 @@ interface ChapterTree extends Chapter {
173
177
  }
174
178
 
175
179
  declare class HelpService {
176
- private httpClient;
177
- private dialogService;
180
+ private readonly httpClient;
181
+ private readonly dialogService;
178
182
  private serviceUri;
179
183
  /**
180
- * Initialize help service
181
- * @param serviceUri : the service uri
184
+ * Initialises the service with the back-end base URI.
185
+ * Must be called once during application bootstrap before any other method.
186
+ * @param serviceUri - Base URL of the help service (e.g. `'https://api.example.com'`).
182
187
  */
183
188
  initialize(serviceUri: string): void;
184
189
  /**
185
- * Retrieve an help chapter
186
- * @param id the chapter id
187
- * @param query the search query
190
+ * Retrieves the HTML content and metadata of a help chapter.
191
+ * @param id - The chapter id.
192
+ * @param query - Optional search query to highlight within the chapter content.
193
+ * @returns An observable that emits `ApiResult<ChapterBag>`.
188
194
  */
189
- getChapter(id: string, query?: string): rxjs.Observable<ApiResult<ChapterBag>>;
195
+ getChapter(id: string, query?: string | undefined): rxjs.Observable<ApiResult<ChapterBag>>;
190
196
  /**
191
- * Retrieve an help chapater info
192
- * @param id the chapter id
197
+ * Retrieves metadata (title, path, etc.) for a help chapter without its content.
198
+ * @param id - The chapter id.
199
+ * @returns An observable that emits `ApiResult<Chapter>`.
193
200
  */
194
201
  getChapterInfo(id: string): rxjs.Observable<ApiResult<Chapter>>;
195
202
  /**
196
- * Retrieve a repository item
197
- * @param id the file id
203
+ * Retrieves a raw repository file by id.
204
+ * @param id - The repository file id.
205
+ * @returns An observable that emits `ApiResult<unknown>`.
198
206
  */
199
- getRepo(id: string): rxjs.Observable<ApiResult<any>>;
207
+ getRepo(id: string): rxjs.Observable<ApiResult<unknown>>;
200
208
  /**
201
- * Retrieve an help toc
209
+ * Retrieves the table of contents as a hierarchical `IndexInfo` tree.
210
+ * @returns An observable that emits `ApiResult<IndexInfo>`.
202
211
  */
203
212
  getToc(): rxjs.Observable<ApiResult<IndexInfo>>;
204
213
  /**
205
- * Open help viewer
214
+ * Opens the help viewer dialog, optionally pre-navigated to a specific chapter.
215
+ * @param id - The chapter id to open (default: `'1'`, the root chapter).
206
216
  */
207
217
  show(id?: string): void;
208
218
  static ɵfac: i0.ɵɵFactoryDeclaration<HelpService, never>;
@@ -143,46 +143,56 @@ declare enum SupportProductModule {
143
143
  }
144
144
 
145
145
  declare class SupportService implements OnDestroy {
146
- private httpClient;
147
- private broadcastService;
146
+ private readonly httpClient;
147
+ private readonly broadcastService;
148
148
  private broadcastServiceSubscription?;
149
- private _serviceUri?;
150
- get serviceUri(): string;
149
+ private _serviceUri;
150
+ /** Base URI of the Support back-end service. */
151
+ get serviceUri(): string | undefined;
151
152
  products: SupportProduct;
152
153
  productModules: SupportProductModule;
154
+ /** Number of unread notifications, or `undefined` when there are none. */
153
155
  readonly unreadNotifications: i0.WritableSignal<number>;
154
156
  ngOnDestroy(): void;
155
157
  /**
156
- * Initialize service
157
- * @param serviceUri : the service uri
158
- * @param products: the supported products
159
- * @param productModules: the supported product modules
158
+ * Initialises the service with the back-end URI and the products/modules it should track.
159
+ * Must be called once during application bootstrap before any other method.
160
+ * @param serviceUri - Base URL of the support service.
161
+ * @param products - Bitmask of `SupportProduct` values to scope notifications (default: `None`).
162
+ * @param productModules - Bitmask of `SupportProductModule` values to scope notifications (default: `None`).
160
163
  */
161
164
  initialize(serviceUri: string, products?: SupportProduct, productModules?: SupportProductModule): void;
162
165
  /**
163
- * Count unread notifications
166
+ * Fetches the count of unread notifications from the server and updates
167
+ * the `unreadNotifications` signal. Sets `undefined` when the count is zero.
164
168
  */
165
169
  countUnreadNotifications(): void;
166
170
  /**
167
- * Query notifications
168
- * @param params: query parameters
171
+ * Queries the notification list using the supplied filter parameters.
172
+ * The `products` and `productModules` fields are automatically populated
173
+ * from the service configuration before the request is sent.
174
+ * @param params - Search parameters for the notification query.
175
+ * @returns An observable that emits `ApiResult<SupportNotificationsSearchResult>`.
169
176
  */
170
177
  queryNotifications(params: SupportNotificationsSearchParams): rxjs.Observable<ApiResult<SupportNotificationsSearchResult>>;
171
178
  /**
172
- * Retrieve a notification
173
- * @param id: the notification id
179
+ * Retrieves a single notification by id.
180
+ * @param id - The notification id.
181
+ * @returns An observable that emits `ApiResult<SupportNotificationInfo>`.
174
182
  */
175
183
  getNotification(id: number): rxjs.Observable<ApiResult<SupportNotificationInfo>>;
176
184
  /**
177
- * Mark a group of notifications as read
178
- * @param ids: the array of notification's ids to set as read
185
+ * Marks one or more notifications as read.
186
+ * @param params - Parameters identifying the notifications to mark.
187
+ * @returns An observable that emits `ApiResult<boolean>`.
179
188
  */
180
189
  markNotifications(params: SupportNotificationsMarkParams): rxjs.Observable<ApiResult<boolean>>;
181
190
  /**
182
- * Download a notification document
183
- * @param documentId : the notification document id
184
- */
185
- dowloadNotificationDocument(documentId: number): rxjs.Observable<Blob>;
191
+ * Downloads a notification attachment as a binary blob.
192
+ * @param documentId - The id of the document to download.
193
+ * @returns An observable that emits the binary blob response.
194
+ */
195
+ downloadNotificationDocument(documentId: number): rxjs.Observable<Blob>;
186
196
  static ɵfac: i0.ɵɵFactoryDeclaration<SupportService, never>;
187
197
  static ɵprov: i0.ɵɵInjectableDeclaration<SupportService>;
188
198
  }