http-request-manager 18.9.6 → 18.10.1

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.
@@ -4,34 +4,33 @@ import * as i0 from '@angular/core';
4
4
  import { InjectionToken, OnDestroy, Injector, OnInit, EventEmitter, ModuleWithProviders } from '@angular/core';
5
5
  import { ComponentStore } from '@ngrx/component-store';
6
6
  import { HttpClient, HttpHeaders, HttpInterceptor, HttpRequest, HttpHandler, HttpEvent } from '@angular/common/http';
7
- import * as i16 from 'toast-message-display';
7
+ import * as i17 from 'toast-message-display';
8
8
  import { ToastMessageDisplayService } from 'toast-message-display';
9
9
  import Dexie, { Table } from 'dexie';
10
- import * as i33 from '@ngx-translate/core';
10
+ import * as i34 from '@ngx-translate/core';
11
11
  import { TranslateService } from '@ngx-translate/core';
12
12
  import * as _angular_forms from '@angular/forms';
13
- import { FormBuilder, FormArray, FormControl } from '@angular/forms';
13
+ import { FormArray, FormBuilder, FormControl } from '@angular/forms';
14
14
  import { DataSource } from '@angular/cdk/collections';
15
- import * as http_request_manager from 'http-request-manager';
16
15
  import * as i4 from '@angular/common';
17
16
  import * as i7 from '@angular/material/button';
18
- import * as i19 from '@angular/material/tabs';
19
- import * as i20 from '@angular/material/select';
20
- import * as i21 from '@angular/material/chips';
21
- import * as i22 from '@angular/material/menu';
17
+ import * as i20 from '@angular/material/tabs';
18
+ import * as i21 from '@angular/material/select';
19
+ import * as i22 from '@angular/material/chips';
20
+ import * as i23 from '@angular/material/menu';
22
21
  import * as i5 from '@angular/material/icon';
23
- import * as i24 from '@angular/material/table';
24
- import * as i25 from '@angular/material/button-toggle';
25
- import * as i26 from '@angular/material/autocomplete';
26
- import * as i27 from '@angular/material/progress-bar';
27
- import * as i28 from '@angular/material/slide-toggle';
28
- import * as i29 from '@angular/material/divider';
29
- import * as i30 from '@angular/material/form-field';
30
- import * as i31 from '@angular/material/input';
31
- import * as i32 from '@angular/material/toolbar';
32
- import * as i34 from '@angular/material/sidenav';
33
- import * as i35 from '@angular/material/datepicker';
34
- import * as i36 from '@angular/material/core';
22
+ import * as i25 from '@angular/material/table';
23
+ import * as i26 from '@angular/material/button-toggle';
24
+ import * as i27 from '@angular/material/autocomplete';
25
+ import * as i28 from '@angular/material/progress-bar';
26
+ import * as i29 from '@angular/material/slide-toggle';
27
+ import * as i30 from '@angular/material/divider';
28
+ import * as i31 from '@angular/material/form-field';
29
+ import * as i32 from '@angular/material/input';
30
+ import * as i33 from '@angular/material/toolbar';
31
+ import * as i35 from '@angular/material/sidenav';
32
+ import * as i36 from '@angular/material/datepicker';
33
+ import * as i37 from '@angular/material/core';
35
34
  import { ThemePalette } from '@angular/material/core';
36
35
  import * as i6 from '@angular/material/progress-spinner';
37
36
  import { ProgressSpinnerMode } from '@angular/material/progress-spinner';
@@ -225,17 +224,6 @@ declare class ApiRequest implements ApiRequestInterface {
225
224
  static adapt(item?: any): ApiRequest;
226
225
  }
227
226
 
228
- interface ChannelInfoInterface {
229
- name: string;
230
- canSubscribe: boolean;
231
- }
232
- declare class ChannelInfo implements ChannelInfoInterface {
233
- name: string;
234
- canSubscribe: boolean;
235
- constructor(name?: string, canSubscribe?: boolean);
236
- static adapt(item?: any): ChannelInfo;
237
- }
238
-
239
227
  interface WSUserInterface {
240
228
  id: string;
241
229
  ldap?: string;
@@ -252,10 +240,96 @@ declare class WSUser implements WSUserInterface {
252
240
  static adapt(item?: any): WSUser;
253
241
  }
254
242
 
255
- declare enum CommunicationType {
256
- MESSAGE = 0,
257
- ALERT = 1,
258
- OTHER = 2
243
+ interface StateMessageInterface {
244
+ sessionId: {
245
+ id: string;
246
+ ldap?: string;
247
+ name?: string;
248
+ email?: string;
249
+ };
250
+ content: any;
251
+ }
252
+ declare class StateMessage implements StateMessageInterface {
253
+ sessionId: {
254
+ id: string;
255
+ ldap?: string;
256
+ name?: string;
257
+ email?: string;
258
+ };
259
+ content: any;
260
+ constructor(sessionId?: {
261
+ id: string;
262
+ ldap?: string;
263
+ name?: string;
264
+ email?: string;
265
+ }, content?: any);
266
+ static adapt(item?: any): StateMessage;
267
+ }
268
+
269
+ interface PublicMessageInterface {
270
+ sessionId: {
271
+ id: string;
272
+ ldap?: string;
273
+ name?: string;
274
+ email?: string;
275
+ };
276
+ content: {
277
+ message: string;
278
+ [key: string]: any;
279
+ };
280
+ }
281
+ declare class PublicMessage implements PublicMessageInterface {
282
+ sessionId: {
283
+ id: string;
284
+ ldap?: string;
285
+ name?: string;
286
+ email?: string;
287
+ };
288
+ content: {
289
+ message: string;
290
+ [key: string]: any;
291
+ };
292
+ constructor(sessionId?: {
293
+ id: string;
294
+ ldap?: string;
295
+ name?: string;
296
+ email?: string;
297
+ }, content?: {
298
+ message: string;
299
+ [key: string]: any;
300
+ });
301
+ static adapt(item?: any): PublicMessage;
302
+ }
303
+
304
+ interface NotificationMessageInterface {
305
+ sessionId: {
306
+ id: string;
307
+ ldap?: string;
308
+ name?: string;
309
+ email?: string;
310
+ color?: string;
311
+ };
312
+ message: string;
313
+ [key: string]: any;
314
+ }
315
+ declare class NotificationMessage implements NotificationMessageInterface {
316
+ sessionId: {
317
+ id: string;
318
+ ldap?: string;
319
+ name?: string;
320
+ email?: string;
321
+ color?: string;
322
+ };
323
+ message: string;
324
+ [key: string]: any;
325
+ constructor(sessionId?: {
326
+ id: string;
327
+ ldap?: string;
328
+ name?: string;
329
+ email?: string;
330
+ color?: string;
331
+ }, message?: string, additionalProperties?: any);
332
+ static adapt(item?: any): NotificationMessage;
259
333
  }
260
334
 
261
335
  interface DatabaseStorageInterface {
@@ -366,6 +440,53 @@ declare class ChannelMessage implements ChannelMessageInterface {
366
440
  static adapt(item?: any): ChannelMessage;
367
441
  }
368
442
 
443
+ /**
444
+ * LoggerService for http-request-manager library
445
+ *
446
+ * Automatically enables debug logging in development mode,
447
+ * disables it in production mode.
448
+ *
449
+ * Usage:
450
+ * ```typescript
451
+ * constructor(private logger: LoggerService) {}
452
+ *
453
+ * this.logger.debug('WebSocket', 'Connected successfully');
454
+ * this.logger.info('HTTP', 'Request completed', { status: 200 });
455
+ * this.logger.warn('State', 'Cache miss for key', { key: 'user' });
456
+ * this.logger.error('Database', 'Connection failed', error);
457
+ * ```
458
+ */
459
+ declare class LoggerService {
460
+ private debugMode;
461
+ constructor();
462
+ /**
463
+ * Debug level logging - only shown in development mode
464
+ * Use for: Detailed diagnostic information, state changes, connection events
465
+ */
466
+ debug(context: string, message: string, data?: any): void;
467
+ /**
468
+ * Info level logging - only shown in development mode
469
+ * Use for: Important operational messages, successful operations
470
+ */
471
+ info(context: string, message: string, data?: any): void;
472
+ /**
473
+ * Warning level logging - always shown
474
+ * Use for: Potential issues, deprecated usage, recoverable errors
475
+ */
476
+ warn(context: string, message: string, data?: any): void;
477
+ /**
478
+ * Error level logging - always shown
479
+ * Use for: Actual errors, failures, exceptions
480
+ */
481
+ error(context: string, message: string, data?: any): void;
482
+ /**
483
+ * Check if debug mode is enabled (development mode)
484
+ */
485
+ isDebugEnabled(): boolean;
486
+ static ɵfac: i0.ɵɵFactoryDeclaration<LoggerService, never>;
487
+ static ɵprov: i0.ɵɵInjectableDeclaration<LoggerService>;
488
+ }
489
+
369
490
  /**
370
491
  * Channel type enum for different communication purposes
371
492
  * - STATE: Private channels for state synchronization (SYS- prefix)
@@ -397,6 +518,7 @@ declare class HTTPManagerStateService<T extends {
397
518
  dbManagerService: DatabaseManagerService;
398
519
  localStorageManagerService: LocalStorageManagerService;
399
520
  utils: UtilsService;
521
+ logger: LoggerService;
400
522
  error$: Observable<boolean>;
401
523
  isPending$: Observable<boolean>;
402
524
  private page;
@@ -442,6 +564,7 @@ declare class HTTPManagerStateService<T extends {
442
564
  private userAction;
443
565
  userAction$: Observable<any>;
444
566
  private static wsCommunicationQueue;
567
+ private ownSessionId;
445
568
  wsOptions: WSOptions;
446
569
  connectionStatus$: Observable<boolean>;
447
570
  constructor(apiOptions: ApiRequest, dataType: DataType | undefined, database?: DatabaseStorage);
@@ -586,6 +709,7 @@ declare class HTTPManagerStateService<T extends {
586
709
  }
587
710
 
588
711
  declare class WebsocketService {
712
+ private logger;
589
713
  private socket;
590
714
  private messages;
591
715
  messages$: Observable<any>;
@@ -629,25 +753,12 @@ declare class WebsocketService {
629
753
  * Get all notification channels (in-memory)
630
754
  */
631
755
  getNotificationChannels(): void;
632
- /**
633
- * Get today's notification channels from database
634
- * Returns unique channels that have notifications posted today
635
- */
636
756
  getTodaysNotificationChannels(): void;
637
- /**
638
- * Subscribe to a notification channel with optional date filters
639
- */
640
757
  subscribeToNotificationChannel(channel: string, options?: {
641
758
  startEpoch?: number;
642
759
  endEpoch?: number;
643
760
  }, user?: any): void;
644
- /**
645
- * Unsubscribe from a notification channel
646
- */
647
761
  unsubscribeFromNotificationChannel(channel: string): void;
648
- /**
649
- * Send a notification to a channel
650
- */
651
762
  sendNotification(channel: string, content: any): void;
652
763
  static ɵfac: i0.ɵɵFactoryDeclaration<WebsocketService, never>;
653
764
  static ɵprov: i0.ɵɵInjectableDeclaration<WebsocketService>;
@@ -806,6 +917,12 @@ declare class WebSocketManagerService {
806
917
  * @param channel - Channel name
807
918
  */
808
919
  unsubscribeFromNotificationChannel(channel: string): void;
920
+ /**
921
+ * Send notification to channel
922
+ * @param channel - Channel name (should include MES- prefix)
923
+ * @param content - Notification content
924
+ */
925
+ sendNotification(channel: string, content: any): void;
809
926
  /**
810
927
  * Check if WebSocket connection is currently open
811
928
  * @returns true if connected, false otherwise
@@ -820,6 +937,62 @@ declare class WebSocketManagerService {
820
937
  static ɵprov: i0.ɵɵInjectableDeclaration<WebSocketManagerService>;
821
938
  }
822
939
 
940
+ /**
941
+ * WebSocketMessageService - Unified service for sending WebSocket messages
942
+ *
943
+ * Provides type-safe methods for sending messages with automatic prefix management.
944
+ * Supports three message types: State (SYS-), Public (PUB-), and Notification (MES-).
945
+ *
946
+ * Features:
947
+ * - Type-safe message models
948
+ * - Automatic prefix management
949
+ * - Runtime validation
950
+ * - Boolean return values for success/failure
951
+ * - Silent failure with console errors
952
+ */
953
+ declare class WebSocketMessageService {
954
+ private wsManagerService;
955
+ private logger;
956
+ /**
957
+ * Send state message (SYS- prefix)
958
+ * Used for CRUD operations and state synchronization
959
+ *
960
+ * @param path - Path array (e.g., ['ai', 'tests'])
961
+ * @param payload - StateMessage with sessionId and content
962
+ * @returns true if sent successfully, false otherwise
963
+ */
964
+ sendStateMessage(path: (string | number)[], payload: StateMessage): boolean;
965
+ /**
966
+ * Send public message (PUB- prefix)
967
+ * Used for chat, broadcast, general messaging
968
+ *
969
+ * @param channel - Channel name (without prefix)
970
+ * @param payload - PublicMessage with sessionId and content.message
971
+ * @returns true if sent successfully, false otherwise
972
+ */
973
+ sendPublicMessage(channel: string, payload: PublicMessage): boolean;
974
+ /**
975
+ * Send notification (MES- prefix)
976
+ * Used for persistent notifications with history
977
+ *
978
+ * @param channel - Channel name (without prefix)
979
+ * @param payload - NotificationMessage with sessionId and message
980
+ * @returns true if sent successfully, false otherwise
981
+ */
982
+ sendNotification(channel: string, payload: NotificationMessage): boolean;
983
+ /**
984
+ * Send to custom channel (no prefix)
985
+ * User provides full channel name
986
+ *
987
+ * @param channel - Full channel name
988
+ * @param payload - Any message payload
989
+ * @returns true if sent successfully, false otherwise
990
+ */
991
+ sendToCustomChannel(channel: string, payload: any): boolean;
992
+ static ɵfac: i0.ɵɵFactoryDeclaration<WebSocketMessageService, never>;
993
+ static ɵprov: i0.ɵɵInjectableDeclaration<WebSocketMessageService>;
994
+ }
995
+
823
996
  declare class RequestService extends WebsocketService {
824
997
  private http;
825
998
  private pathQueryService;
@@ -1208,6 +1381,10 @@ declare class HTTPManagerService<T> extends RequestService {
1208
1381
  * Unsubscribe from notification channel
1209
1382
  */
1210
1383
  unsubscribeFromNotificationChannel(channel: string): void;
1384
+ /**
1385
+ * Send notification to channel
1386
+ */
1387
+ sendNotification(channel: string, content: any): void;
1211
1388
  getRequest<T>(options?: ApiRequest, params?: any[]): Observable<T>;
1212
1389
  postRequest<T extends {
1213
1390
  id?: number | string;
@@ -1611,6 +1788,157 @@ declare class RequestErrorInterceptor implements HttpInterceptor {
1611
1788
  static ɵprov: i0.ɵɵInjectableDeclaration<RequestErrorInterceptor>;
1612
1789
  }
1613
1790
 
1791
+ interface ClientInfoInterface$2 {
1792
+ domain: string;
1793
+ service: string;
1794
+ id: number;
1795
+ name: string;
1796
+ }
1797
+ declare class ClientInfo$2 implements ClientInfoInterface$2 {
1798
+ domain: string;
1799
+ service: string;
1800
+ id: number;
1801
+ name: string;
1802
+ constructor(domain?: string, service?: string, id?: number, name?: string);
1803
+ static adapt(item?: any): ClientInfo$2;
1804
+ }
1805
+
1806
+ interface ClientInfoMapperInterface$2 {
1807
+ id: number;
1808
+ first_name: string;
1809
+ last_name: string;
1810
+ email: string;
1811
+ }
1812
+ declare class ClientInfoMapper$2 implements ClientInfoMapperInterface$2 {
1813
+ id: number;
1814
+ first_name: string;
1815
+ last_name: string;
1816
+ email: string;
1817
+ constructor(id?: number, first_name?: string, last_name?: string, email?: string);
1818
+ static adapt(item?: any): ClientInfoMapper$2;
1819
+ }
1820
+
1821
+ interface AIPromptInterface$2 {
1822
+ response: string;
1823
+ }
1824
+ declare class AIPrompt$2 implements AIPromptInterface$2 {
1825
+ response: string;
1826
+ constructor(response?: string);
1827
+ static adapt(item?: any): AIPrompt$2;
1828
+ }
1829
+
1830
+ declare class RequestManagerBasicDemoComponent implements OnInit {
1831
+ server: string;
1832
+ adapter?: Function;
1833
+ mapper?: Function;
1834
+ displayedColumns: string[];
1835
+ getColumnsFromData(data: any[]): string[];
1836
+ updateDisplayedColumns(data: any[]): void;
1837
+ isObject(value: any): boolean;
1838
+ private fb;
1839
+ private toastMessage;
1840
+ questionControl: _angular_forms.FormControl<string | null>;
1841
+ httpManagerService: HTTPManagerService<any>;
1842
+ isPending$: Observable<boolean>;
1843
+ countdown$: Observable<number>;
1844
+ GET_error$: BehaviorSubject<string>;
1845
+ POST_error$: BehaviorSubject<string>;
1846
+ PUT_error$: BehaviorSubject<string>;
1847
+ DELETE_error$: BehaviorSubject<string>;
1848
+ STREAM_error$: BehaviorSubject<string>;
1849
+ STREAM_AI_error$: BehaviorSubject<string>;
1850
+ GET$?: Observable<any>;
1851
+ POST$?: Observable<any>;
1852
+ PUT$?: Observable<any>;
1853
+ DELETE$?: Observable<any>;
1854
+ STREAM$?: Observable<any>;
1855
+ STREAM_AI$?: Observable<any>;
1856
+ requestParams: {
1857
+ GET: ApiRequest;
1858
+ POST: ApiRequest;
1859
+ PUT: ApiRequest;
1860
+ DELETE: ApiRequest;
1861
+ STREAM: ApiRequest;
1862
+ };
1863
+ streamTypes: {
1864
+ id: string;
1865
+ value: string;
1866
+ }[];
1867
+ streamType: string;
1868
+ failedState: any;
1869
+ pollingState: any;
1870
+ downloadRequest: ApiRequest;
1871
+ sampleClientData: {
1872
+ id: number;
1873
+ name: string;
1874
+ domain: string;
1875
+ service: string;
1876
+ spiffe: string;
1877
+ secret: string;
1878
+ created: number;
1879
+ modified: number;
1880
+ icon: string;
1881
+ imageFile: string;
1882
+ email: string;
1883
+ };
1884
+ requestForm: _angular_forms.FormGroup<{
1885
+ path: _angular_forms.FormControl<string | null>;
1886
+ headers: FormArray<_angular_forms.FormControl<unknown>>;
1887
+ adapter: _angular_forms.FormControl<null>;
1888
+ mapper: _angular_forms.FormControl<null>;
1889
+ retry: _angular_forms.FormGroup<{
1890
+ times: _angular_forms.FormControl<number | null>;
1891
+ delay: _angular_forms.FormControl<number | null>;
1892
+ }>;
1893
+ polling: _angular_forms.FormControl<number | null>;
1894
+ }>;
1895
+ AIType: number;
1896
+ sampleAdaptors: ({
1897
+ label: string;
1898
+ value: typeof ClientInfo$2.adapt;
1899
+ } | {
1900
+ label: string;
1901
+ value: typeof AIPrompt$2.adapt;
1902
+ })[];
1903
+ sampleMappers: ({
1904
+ label: string;
1905
+ value: typeof ClientInfoMapper$2.adapt;
1906
+ } | {
1907
+ label: string;
1908
+ value: typeof AIPrompt$2.adapt;
1909
+ })[];
1910
+ get retry(): {
1911
+ times: number | null;
1912
+ delay: number | null;
1913
+ } | undefined;
1914
+ get headers(): FormArray;
1915
+ get isValid(): boolean;
1916
+ hasId: (arr: any[]) => boolean;
1917
+ props: (adapter: any) => any;
1918
+ arrayObjectsToObjects: (arr: any[]) => any;
1919
+ constructor();
1920
+ ngOnInit(): void;
1921
+ onStreamType(type: string): void;
1922
+ addHeader(): void;
1923
+ removeHeader(index: number): void;
1924
+ compileRequest(): {
1925
+ apiOptions: ApiRequest;
1926
+ path: string[];
1927
+ };
1928
+ onGetRequest(): void;
1929
+ onCreateRequest(): void;
1930
+ onUpdateRequest(): void;
1931
+ onDeleteRequest(): void;
1932
+ onStreamPostRequest(): void;
1933
+ onStreamRequest(): void;
1934
+ onDownloadCompleted(): void;
1935
+ onDownloadFailed(err: string): void;
1936
+ errorHandling(err: any, type: string): void;
1937
+ onSelectAIType(type: number): void;
1938
+ static ɵfac: i0.ɵɵFactoryDeclaration<RequestManagerBasicDemoComponent, never>;
1939
+ static ɵcmp: i0.ɵɵComponentDeclaration<RequestManagerBasicDemoComponent, "app-request-manager-basic-demo", never, {}, {}, never, never, false, never>;
1940
+ }
1941
+
1614
1942
  declare class HttpRequestServicesDemoComponent implements OnInit {
1615
1943
  private configOptions?;
1616
1944
  wsServer: string;
@@ -1638,6 +1966,12 @@ declare class HttpRequestServicesDemoComponent implements OnInit {
1638
1966
  divider: boolean;
1639
1967
  disabled: boolean;
1640
1968
  new?: undefined;
1969
+ } | {
1970
+ name: string;
1971
+ value: string;
1972
+ divider: boolean;
1973
+ new?: undefined;
1974
+ disabled?: undefined;
1641
1975
  })[];
1642
1976
  selectedService: string;
1643
1977
  injectionOptions?: ConfigOptions;
@@ -2263,7 +2597,7 @@ declare class MessageServiceDemo {
2263
2597
  communicationMessages$: rxjs.Observable<any[]>;
2264
2598
  latestCommunicationMessages$: rxjs.Observable<any>;
2265
2599
  connectionStatus$: rxjs.Observable<boolean>;
2266
- user$: rxjs.Observable<http_request_manager.WSUser | null>;
2600
+ user$: rxjs.Observable<WSUser | null>;
2267
2601
  data$: rxjs.Observable<any>;
2268
2602
  /**
2269
2603
  * Helper to ensure channel has PUB- prefix
@@ -2463,7 +2797,7 @@ declare class WsDataControlComponent implements OnInit {
2463
2797
  user: any;
2464
2798
  path: (string | number)[];
2465
2799
  stateDataRequestService: StateDataRequestService;
2466
- user$: rxjs.Observable<http_request_manager.WSUser | null>;
2800
+ user$: rxjs.Observable<WSUser | null>;
2467
2801
  users$: rxjs.Observable<any[]>;
2468
2802
  userAction$: rxjs.Observable<any>;
2469
2803
  data$: rxjs.Observable<any>;
@@ -2477,6 +2811,143 @@ declare class WsDataControlComponent implements OnInit {
2477
2811
  static ɵcmp: i0.ɵɵComponentDeclaration<WsDataControlComponent, "app-ws-data-control", never, { "server": { "alias": "server"; "required": false; }; "wsServer": { "alias": "wsServer"; "required": false; }; "jwtToken": { "alias": "jwtToken"; "required": false; }; "user": { "alias": "user"; "required": false; }; "path": { "alias": "path"; "required": false; }; }, {}, never, never, false, never>;
2478
2812
  }
2479
2813
 
2814
+ interface SlideInterface {
2815
+ title: string;
2816
+ message: string;
2817
+ image?: string;
2818
+ icon?: string;
2819
+ }
2820
+ declare class Slide implements SlideInterface {
2821
+ title: string;
2822
+ message: string;
2823
+ image?: string | undefined;
2824
+ icon?: string | undefined;
2825
+ constructor(title?: string, message?: string, image?: string | undefined, icon?: string | undefined);
2826
+ static adapt(item?: any): Slide;
2827
+ }
2828
+
2829
+ interface ActionInterface {
2830
+ label: string;
2831
+ action: 'close' | 'navigate' | 'callback' | 'custom';
2832
+ target?: string;
2833
+ callback?: string;
2834
+ primary?: boolean;
2835
+ }
2836
+ declare class Action implements ActionInterface {
2837
+ label: string;
2838
+ action: 'close' | 'navigate' | 'callback' | 'custom';
2839
+ target?: string | undefined;
2840
+ callback?: string | undefined;
2841
+ primary?: boolean | undefined;
2842
+ constructor(label?: string, action?: 'close' | 'navigate' | 'callback' | 'custom', target?: string | undefined, callback?: string | undefined, primary?: boolean | undefined);
2843
+ static adapt(item?: any): Action;
2844
+ }
2845
+
2846
+ type DisplayType = 'snackbar' | 'dialog' | 'carousel' | 'banner' | 'inline';
2847
+ interface DisplayConfigInterface {
2848
+ type: DisplayType;
2849
+ supportsMarkdown?: boolean;
2850
+ stackable?: boolean;
2851
+ queueBehavior?: 'replace' | 'queue' | 'ignore';
2852
+ autoDismiss?: number;
2853
+ width?: string;
2854
+ height?: string;
2855
+ }
2856
+ declare class DisplayConfig implements DisplayConfigInterface {
2857
+ type: DisplayType;
2858
+ supportsMarkdown?: boolean | undefined;
2859
+ stackable?: boolean | undefined;
2860
+ queueBehavior?: ("replace" | "queue" | "ignore") | undefined;
2861
+ autoDismiss?: number | undefined;
2862
+ width?: string | undefined;
2863
+ height?: string | undefined;
2864
+ constructor(type?: DisplayType, supportsMarkdown?: boolean | undefined, stackable?: boolean | undefined, queueBehavior?: ("replace" | "queue" | "ignore") | undefined, autoDismiss?: number | undefined, width?: string | undefined, height?: string | undefined);
2865
+ static adapt(item?: any): DisplayConfig;
2866
+ }
2867
+
2868
+ interface MessageContentInterface {
2869
+ displayConfig?: DisplayConfig;
2870
+ title?: string;
2871
+ message: string;
2872
+ slides?: Slide[];
2873
+ image?: string;
2874
+ images?: string[];
2875
+ actions?: Action[];
2876
+ messageType?: string;
2877
+ icon?: string;
2878
+ data?: any;
2879
+ }
2880
+ declare class MessageContent implements MessageContentInterface {
2881
+ displayConfig?: DisplayConfig | undefined;
2882
+ title?: string | undefined;
2883
+ message: string;
2884
+ slides?: Slide[] | undefined;
2885
+ image?: string | undefined;
2886
+ images?: string[] | undefined;
2887
+ actions?: Action[] | undefined;
2888
+ messageType?: string | undefined;
2889
+ icon?: string | undefined;
2890
+ data?: any;
2891
+ constructor(displayConfig?: DisplayConfig | undefined, title?: string | undefined, message?: string, slides?: Slide[] | undefined, image?: string | undefined, images?: string[] | undefined, actions?: Action[] | undefined, messageType?: string | undefined, icon?: string | undefined, data?: any);
2892
+ static adapt(item?: any): MessageContent;
2893
+ }
2894
+ interface CommunicationMessageInterface {
2895
+ type: string;
2896
+ messageId?: number;
2897
+ channel?: string;
2898
+ sessionId?: {
2899
+ id: string;
2900
+ };
2901
+ timestamp?: string;
2902
+ content: MessageContent;
2903
+ }
2904
+ declare class CommunicationMessage implements CommunicationMessageInterface {
2905
+ type: string;
2906
+ messageId?: number | undefined;
2907
+ channel?: string | undefined;
2908
+ sessionId?: {
2909
+ id: string;
2910
+ } | undefined;
2911
+ timestamp?: string | undefined;
2912
+ content: MessageContent;
2913
+ constructor(type?: string, messageId?: number | undefined, channel?: string | undefined, sessionId?: {
2914
+ id: string;
2915
+ } | undefined, timestamp?: string | undefined, content?: MessageContent);
2916
+ static adapt(item?: any): CommunicationMessage;
2917
+ }
2918
+
2919
+ interface IDisplayStrategy {
2920
+ name: string;
2921
+ canHandle(message: CommunicationMessage): boolean;
2922
+ display(message: CommunicationMessage, config: DisplayConfig): void;
2923
+ }
2924
+
2925
+ interface DisplayRuleInterface {
2926
+ id: string;
2927
+ name?: string;
2928
+ match: (message: CommunicationMessage) => boolean;
2929
+ display: DisplayConfig;
2930
+ }
2931
+ declare class DisplayRule implements DisplayRuleInterface {
2932
+ id: string;
2933
+ name?: string | undefined;
2934
+ match: (message: CommunicationMessage) => boolean;
2935
+ display: DisplayConfig;
2936
+ constructor(id?: string, name?: string | undefined, match?: (message: CommunicationMessage) => boolean, display?: DisplayConfig);
2937
+ static adapt(item?: any): DisplayRule;
2938
+ }
2939
+
2940
+ declare class MessageDisplayRouterService {
2941
+ private snackbarStrategy;
2942
+ private strategies;
2943
+ private rules;
2944
+ display(message: CommunicationMessage): void;
2945
+ registerStrategies(strategies: IDisplayStrategy[]): void;
2946
+ setRules(rules: DisplayRule[]): void;
2947
+ static ɵfac: i0.ɵɵFactoryDeclaration<MessageDisplayRouterService, never>;
2948
+ static ɵprov: i0.ɵɵInjectableDeclaration<MessageDisplayRouterService>;
2949
+ }
2950
+
2480
2951
  declare class WsMessagingComponent implements OnInit, OnDestroy {
2481
2952
  server: string;
2482
2953
  wsServer: string;
@@ -2487,7 +2958,7 @@ declare class WsMessagingComponent implements OnInit, OnDestroy {
2487
2958
  fb: FormBuilder;
2488
2959
  messageService: MessageServiceDemo;
2489
2960
  stateService: StateServiceDemo;
2490
- toastService: ToastMessageDisplayService;
2961
+ messageDisplayService: MessageDisplayRouterService;
2491
2962
  channels$: Observable<string[]>;
2492
2963
  subscribedChannels$: Observable<string[]>;
2493
2964
  user$: Observable<WSUser | null>;
@@ -2526,17 +2997,13 @@ declare class WsMessagingComponent implements OnInit, OnDestroy {
2526
2997
  /**
2527
2998
  * Handle chip toggle for subscribe/unsubscribe
2528
2999
  */
2529
- onChipToggle(channel: string, event: any): void;
3000
+ onChipToggle(event: any, channel: string): void;
2530
3001
  /**
2531
3002
  * Check if currently subscribed to a channel
2532
3003
  * Compares display names (without PUB- prefix)
2533
3004
  */
2534
3005
  isSubscribed(channel: string, subscribedChannels: string[]): boolean;
2535
- /**
2536
- * Handle chip click - toggle subscription state
2537
- */
2538
- onChipClick(channel: string, subscribedChannels: string[]): void;
2539
- onSendMessage(user: WSUser): void;
3006
+ onSendMessage(): void;
2540
3007
  static ɵfac: i0.ɵɵFactoryDeclaration<WsMessagingComponent, never>;
2541
3008
  static ɵcmp: i0.ɵɵComponentDeclaration<WsMessagingComponent, "app-ws-messaging", never, { "server": { "alias": "server"; "required": false; }; "wsServer": { "alias": "wsServer"; "required": false; }; "jwtToken": { "alias": "jwtToken"; "required": false; }; "user": { "alias": "user"; "required": false; }; "path": { "alias": "path"; "required": false; }; }, {}, never, never, false, never>;
2542
3009
  }
@@ -2719,9 +3186,9 @@ declare class FileDownloaderModule {
2719
3186
  declare class HttpRequestManagerModule {
2720
3187
  static forRoot(config?: ConfigOptions): ModuleWithProviders<HttpRequestManagerModule>;
2721
3188
  static ɵfac: i0.ɵɵFactoryDeclaration<HttpRequestManagerModule, never>;
2722
- static ɵmod: i0.ɵɵNgModuleDeclaration<HttpRequestManagerModule, [typeof HttpRequestServicesDemoComponent, typeof RequestManagerStateDemoComponent, typeof RequestManagerDemoComponent, typeof RequestSignalsManagerDemoComponent, typeof LocalStorageDemoComponent, typeof LocalStorageSignalsDemoComponent, typeof RequestManagerWsDemoComponent, typeof StoreStateManagerDemoComponent, typeof DatabaseDataDemoComponent, typeof WsDataControlComponent, typeof WsMessagingComponent, typeof WsNotificationsComponent, typeof WsAiMessagingComponent, typeof WsChatsComponent], [typeof i4.CommonModule, typeof i16.ToastMessageDisplayModule, typeof _angular_forms.FormsModule, typeof _angular_forms.ReactiveFormsModule, typeof i7.MatButtonModule, typeof i19.MatTabsModule, typeof i20.MatSelectModule, typeof i21.MatChipsModule, typeof i22.MatMenuModule, typeof i5.MatIconModule, typeof i24.MatTableModule, typeof i25.MatButtonToggleModule, typeof i26.MatAutocompleteModule, typeof i27.MatProgressBarModule, typeof i28.MatSlideToggleModule, typeof i29.MatDividerModule, typeof i30.MatFormFieldModule, typeof i31.MatInputModule, typeof i32.MatToolbarModule, typeof i28.MatSlideToggleModule, typeof i33.TranslateModule, typeof i34.MatSidenavModule, typeof i35.MatDatepickerModule, typeof i36.MatNativeDateModule, typeof FileDownloaderModule], [typeof HttpRequestServicesDemoComponent]>;
3189
+ static ɵmod: i0.ɵɵNgModuleDeclaration<HttpRequestManagerModule, [typeof RequestManagerBasicDemoComponent, typeof HttpRequestServicesDemoComponent, typeof RequestManagerStateDemoComponent, typeof RequestManagerDemoComponent, typeof RequestSignalsManagerDemoComponent, typeof LocalStorageDemoComponent, typeof LocalStorageSignalsDemoComponent, typeof RequestManagerWsDemoComponent, typeof StoreStateManagerDemoComponent, typeof DatabaseDataDemoComponent, typeof WsDataControlComponent, typeof WsMessagingComponent, typeof WsNotificationsComponent, typeof WsAiMessagingComponent, typeof WsChatsComponent], [typeof i4.CommonModule, typeof i17.ToastMessageDisplayModule, typeof _angular_forms.FormsModule, typeof _angular_forms.ReactiveFormsModule, typeof i7.MatButtonModule, typeof i20.MatTabsModule, typeof i21.MatSelectModule, typeof i22.MatChipsModule, typeof i23.MatMenuModule, typeof i5.MatIconModule, typeof i25.MatTableModule, typeof i26.MatButtonToggleModule, typeof i27.MatAutocompleteModule, typeof i28.MatProgressBarModule, typeof i29.MatSlideToggleModule, typeof i30.MatDividerModule, typeof i31.MatFormFieldModule, typeof i32.MatInputModule, typeof i33.MatToolbarModule, typeof i29.MatSlideToggleModule, typeof i34.TranslateModule, typeof i35.MatSidenavModule, typeof i36.MatDatepickerModule, typeof i37.MatNativeDateModule, typeof FileDownloaderModule], [typeof HttpRequestServicesDemoComponent]>;
2723
3190
  static ɵinj: i0.ɵɵInjectorDeclaration<HttpRequestManagerModule>;
2724
3191
  }
2725
3192
 
2726
- export { ApiRequest, AppService, AsymmetricalEncryptionService, CONFIG_SETTINGS_TOKEN, ChannelInfo, ChannelType, CommunicationType, ConfigHTTPOptions, ConfigOptions, DataType, DatabaseDataDemoComponent, DatabaseManagerService, DatabaseStorage, DbService, ErrorDisplaySettings, GlobalStoreOptions, HTTPManagerService, HTTPManagerSignalsService, HTTPManagerStateService, HeadersService, HttpRequestManagerModule, HttpRequestServicesDemoComponent, LocalStorageDemoComponent, LocalStorageManagerService, LocalStorageOptions, LocalStorageSignalsManagerService, PathQueryService, Random, RandomHSLColor, RandomHexColor, RandomNumber, RandomNumbers, RandomNumbersUnique, RandomPaletteColor, RandomSignature, RandomStr, RandomVisibleColor, RequestErrorInterceptor, RequestHeadersInterceptor, RequestManagerDemoComponent, RequestManagerStateDemoComponent, RequestOptions, RequestService, RequestSignalsService, RetryOptions, SettingOptions, StateStorageOptions, StorageData, StorageOption, StorageType, StoreStateManagerService, StreamType, SymmetricalEncryptionService, TableSchemaDef, UUID, UUID_STR, UserData, UtilsService, WSOptions, WSUser, WebSocketManagerService, WebsocketService, WithCredentialsInterceptor, countdown, createChannelName, delayedRetry, requestPolling, requestStreaming, streamAI, streamAuto, streamEvents, streamJSON, streamNDJSON };
2727
- export type { APIStateManagerData, ApiRequestInterface, ChannelInfoInterface, ConfigHTTPOptionsInterface, ConfigOptionsInterface, DatabaseStorageInterface, ErrorDisplaySettingsInterface, GlobalStoreOptionsInterface, LocalStorageOptionsInterface, ParsingResult, RequestOptionsInterface, RetryOptionsInterface, SettingOptionsInterface, State, StateStorageOptionsInterface, StateStoreManagerData, StorageDataInterface, StorageOptionInterface, StreamConfig, StreamEvent, TableRecord, TableSchemaDefInterface, UserDataInterface, WSOptionsInterface, WSUserInterface };
3193
+ export { ApiRequest, AppService, AsymmetricalEncryptionService, CONFIG_SETTINGS_TOKEN, ChannelType, ConfigHTTPOptions, ConfigOptions, DataType, DatabaseDataDemoComponent, DatabaseManagerService, DatabaseStorage, DbService, ErrorDisplaySettings, GlobalStoreOptions, HTTPManagerService, HTTPManagerSignalsService, HTTPManagerStateService, HeadersService, HttpRequestManagerModule, HttpRequestServicesDemoComponent, LocalStorageDemoComponent, LocalStorageManagerService, LocalStorageOptions, LocalStorageSignalsManagerService, LoggerService, NotificationMessage, PathQueryService, PublicMessage, Random, RandomHSLColor, RandomHexColor, RandomNumber, RandomNumbers, RandomNumbersUnique, RandomPaletteColor, RandomSignature, RandomStr, RandomVisibleColor, RequestErrorInterceptor, RequestHeadersInterceptor, RequestManagerDemoComponent, RequestManagerStateDemoComponent, RequestOptions, RequestService, RequestSignalsService, RetryOptions, SettingOptions, StateMessage, StateStorageOptions, StorageData, StorageOption, StorageType, StoreStateManagerService, StreamType, SymmetricalEncryptionService, TableSchemaDef, UUID, UUID_STR, UserData, UtilsService, WSOptions, WebSocketMessageService, WithCredentialsInterceptor, countdown, createChannelName, delayedRetry, requestPolling, requestStreaming, streamAI, streamAuto, streamEvents, streamJSON, streamNDJSON };
3194
+ export type { APIStateManagerData, ApiRequestInterface, ConfigHTTPOptionsInterface, ConfigOptionsInterface, DatabaseStorageInterface, ErrorDisplaySettingsInterface, GlobalStoreOptionsInterface, LocalStorageOptionsInterface, NotificationMessageInterface, ParsingResult, PublicMessageInterface, RequestOptionsInterface, RetryOptionsInterface, SettingOptionsInterface, State, StateMessageInterface, StateStorageOptionsInterface, StateStoreManagerData, StorageDataInterface, StorageOptionInterface, StreamConfig, StreamEvent, TableRecord, TableSchemaDefInterface, UserDataInterface, WSOptionsInterface };