@genesislcap/foundation-comms 14.176.1-alpha-ed9e3d4.0 → 14.177.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. package/dist/dts/auth/auth.d.ts +4 -4
  2. package/dist/dts/auth/auth.d.ts.map +1 -1
  3. package/dist/dts/auth/loginDTOMapper.d.ts +2 -0
  4. package/dist/dts/auth/loginDTOMapper.d.ts.map +1 -0
  5. package/dist/dts/connect/connect.d.ts +3 -0
  6. package/dist/dts/connect/connect.d.ts.map +1 -1
  7. package/dist/dts/connect/connect.events.d.ts +8 -3
  8. package/dist/dts/connect/connect.events.d.ts.map +1 -1
  9. package/dist/dts/connect/message.d.ts +42 -0
  10. package/dist/dts/connect/message.d.ts.map +1 -1
  11. package/dist/dts/connect/socket.d.ts +27 -4
  12. package/dist/dts/connect/socket.d.ts.map +1 -1
  13. package/dist/dts/connect/socket.status.d.ts +5 -1
  14. package/dist/dts/connect/socket.status.d.ts.map +1 -1
  15. package/dist/dts/networkMonitor/config.d.ts +13 -0
  16. package/dist/dts/networkMonitor/config.d.ts.map +1 -1
  17. package/dist/dts/networkMonitor/service.d.ts +11 -1
  18. package/dist/dts/networkMonitor/service.d.ts.map +1 -1
  19. package/dist/dts/storage/kv/kv.service.d.ts +19 -3
  20. package/dist/dts/storage/kv/kv.service.d.ts.map +1 -1
  21. package/dist/dts/testing/mocks/auth/auth.d.ts +2 -1
  22. package/dist/dts/testing/mocks/auth/auth.d.ts.map +1 -1
  23. package/dist/dts/user/user.d.ts +14 -43
  24. package/dist/dts/user/user.d.ts.map +1 -1
  25. package/dist/esm/auth/auth.js +19 -27
  26. package/dist/esm/auth/loginDTOMapper.js +49 -0
  27. package/dist/esm/connect/connect.events.js +5 -2
  28. package/dist/esm/connect/connect.js +6 -2
  29. package/dist/esm/connect/message.js +9 -0
  30. package/dist/esm/connect/socket.js +30 -22
  31. package/dist/esm/connect/socket.status.js +8 -4
  32. package/dist/esm/networkMonitor/config.js +2 -0
  33. package/dist/esm/networkMonitor/service.js +109 -29
  34. package/dist/esm/storage/kv/kv.service.js +26 -8
  35. package/dist/esm/user/user.js +11 -54
  36. package/dist/foundation-comms.api.json +559 -603
  37. package/dist/foundation-comms.d.ts +148 -55
  38. package/docs/api/foundation-comms.connecteventsemitter.md +1 -1
  39. package/docs/api/foundation-comms.connecteventsemitter.onstreamcompleteevent.md +2 -1
  40. package/docs/api/foundation-comms.currentuser.md +8 -25
  41. package/docs/api/foundation-comms.defaultauth._constructor_.md +2 -1
  42. package/docs/api/foundation-comms.defaultauth.md +2 -2
  43. package/docs/api/foundation-comms.defaultconnect.setvalidsession.md +5 -0
  44. package/docs/api/foundation-comms.defaultconnectevents.md +1 -1
  45. package/docs/api/foundation-comms.defaultconnectevents.onstreamcompleteevent.md +2 -1
  46. package/docs/api/foundation-comms.defaultmessagebuilder.createheartbeatpingmessage.md +22 -0
  47. package/docs/api/foundation-comms.defaultmessagebuilder.md +1 -0
  48. package/docs/api/foundation-comms.defaultnetworkmonitor._constructor_.md +13 -0
  49. package/docs/api/foundation-comms.defaultnetworkmonitor.md +6 -0
  50. package/docs/api/foundation-comms.defaultsocket._constructor_.md +3 -1
  51. package/docs/api/foundation-comms.defaultsocket.md +2 -1
  52. package/docs/api/foundation-comms.defaultsocket.user.md +13 -0
  53. package/docs/api/foundation-comms.defaultsocketstatus.hasvalidsession.md +1 -1
  54. package/docs/api/foundation-comms.defaultsocketstatus.md +2 -1
  55. package/docs/api/foundation-comms.defaultsocketstatus.user.md +11 -0
  56. package/docs/api/foundation-comms.getkvstorage.md +30 -0
  57. package/docs/api/foundation-comms.md +4 -0
  58. package/docs/api/foundation-comms.messagebuilder.createheartbeatpingmessage.md +22 -0
  59. package/docs/api/foundation-comms.messagebuilder.md +1 -0
  60. package/docs/api/foundation-comms.networkmonitorconfig.ignoredgenesisresources.md +13 -0
  61. package/docs/api/foundation-comms.networkmonitorconfig.loglevel.md +13 -0
  62. package/docs/api/foundation-comms.networkmonitorconfig.md +3 -0
  63. package/docs/api/foundation-comms.networkmonitorconfig.startdelay.md +13 -0
  64. package/docs/api/foundation-comms.pingmessage.md +17 -0
  65. package/docs/api/foundation-comms.pongmessage.md +20 -0
  66. package/docs/api/foundation-comms.serializedsocketstatus.hasvalidsession.md +5 -0
  67. package/docs/api/foundation-comms.socketconnectoptions.md +4 -1
  68. package/docs/api/foundation-comms.streamcompleteevent.md +2 -2
  69. package/docs/api/foundation-comms.streamcompleteeventdetail.md +14 -0
  70. package/docs/api/foundation-comms.user.md +7 -12
  71. package/docs/api-report.md +71 -54
  72. package/package.json +13 -11
  73. package/docs/api/foundation-comms.currentuser._constructor_.md +0 -20
  74. package/docs/api/foundation-comms.currentuser.hasadminprofile.md +0 -15
  75. package/docs/api/foundation-comms.currentuser.haspermission.md +0 -22
  76. package/docs/api/foundation-comms.currentuser.hasprofile.md +0 -22
  77. package/docs/api/foundation-comms.currentuser.permissions.md +0 -11
  78. package/docs/api/foundation-comms.currentuser.profiles.md +0 -11
  79. package/docs/api/foundation-comms.currentuser.set.md +0 -22
  80. package/docs/api/foundation-comms.currentuser.unset.md +0 -15
  81. package/docs/api/foundation-comms.currentuser.username.md +0 -11
  82. package/docs/api/foundation-comms.user.hasadminprofile.md +0 -15
  83. package/docs/api/foundation-comms.user.haspermission.md +0 -22
  84. package/docs/api/foundation-comms.user.hasprofile.md +0 -22
  85. package/docs/api/foundation-comms.user.set.md +0 -22
  86. package/docs/api/foundation-comms.user.unset.md +0 -15
@@ -2,17 +2,20 @@
2
2
 
3
3
  import { BehaviorSubject } from 'rxjs';
4
4
  import { default as Bowser_2 } from 'bowser';
5
+ import { DefaultUser } from '@genesislcap/foundation-user';
5
6
  import type { DTOMapper } from '@genesislcap/foundation-utils';
6
7
  import { InterfaceSymbol } from '@microsoft/fast-foundation';
7
8
  import { JSONSchema7 } from 'json-schema';
8
9
  import { JSONSerializer } from '@genesislcap/foundation-utils';
9
10
  import { Listener } from '@genesislcap/foundation-utils';
10
11
  import { Logger } from '@genesislcap/foundation-logger';
12
+ import type { LogLevel } from '@genesislcap/foundation-utils';
11
13
  import { Observable } from 'rxjs';
12
14
  import { Observer } from '@genesislcap/foundation-utils';
13
15
  import { Observer as Observer_2 } from 'rxjs';
14
16
  import { Subscription as SocketSubscription } from 'rxjs';
15
17
  import { Subject } from 'rxjs';
18
+ import { User as User_2 } from '@genesislcap/foundation-user';
16
19
  import { UUID } from '@genesislcap/foundation-utils';
17
20
 
18
21
  /**
@@ -42,10 +45,10 @@ export declare interface Auth {
42
45
  */
43
46
  readonly isLoggedIn$?: Observable<boolean>;
44
47
  /**
45
- * The currently logged-in user, if any.
48
+ * The current user
46
49
  * @internal
47
50
  */
48
- readonly currentUser: User;
51
+ readonly currentUser: User_2;
49
52
  /**
50
53
  * Logs in the user with the specified credentials.
51
54
  * @public
@@ -105,7 +108,7 @@ export declare type AuthInfo = BasicAuthInfo | SsoAuthInfo | JwtAuthInfo | Refre
105
108
  export declare class AuthMock implements Auth {
106
109
  isWorking: boolean;
107
110
  loggedUserResult: LoginResult;
108
- currentUser: User;
111
+ currentUser: User_2;
109
112
  isLoggedIn: boolean;
110
113
  nextLoginResult: LoginResult;
111
114
  nextLogoutResult: LogoutResult;
@@ -391,9 +394,10 @@ export declare interface ConnectEventsEmitter extends ConnectEvents {
391
394
  onStreamEvent(resourceName: string, message: Message<MessageDetails.DataserverRequest>, stream: SocketObservable<any>, functions: StreamEventFunctions): void;
392
395
  /**
393
396
  * Called by Connect.
397
+ * @param resourceName - The name of the resource.
394
398
  * @param stream - The actual stream itself.
395
399
  */
396
- onStreamCompleteEvent(stream: SocketObservable<any>): void;
400
+ onStreamCompleteEvent(resourceName: string, stream: SocketObservable<any>): void;
397
401
  /**
398
402
  * Called by Connect.
399
403
  * @param eventName - The name of the event.
@@ -737,28 +741,25 @@ export declare function criteriaFiltersToFields(filters: string): Record<string,
737
741
 
738
742
  /**
739
743
  * Represents the current user (i.e. the user that is currently logged in).
744
+ *
745
+ * @deprecated - Use {@link @genesislcap/foundation-user#DefaultUser} instead.
746
+ *
740
747
  * @public
741
748
  */
742
- export declare class CurrentUser implements User {
743
- permissions: UserPermission[];
744
- profiles: UserProfile[];
745
- username: string;
746
- constructor(options: UserOptions);
747
- set(options: UserOptions): void;
748
- unset(): void;
749
- hasAdminProfile(): boolean;
750
- hasPermission(permission: string | string[]): boolean;
751
- hasProfile(profile: string | string[]): boolean;
752
- /**
753
- * Checks if the given key or keys are present in the given array of keys.
754
- * @internal
755
- * @param keys - The array of keys to check.
756
- * @param key - The key or keys to check for.
757
- * @returns True if the key or keys are present in the array of keys.
758
- */
759
- private hasKey;
749
+ export declare class CurrentUser extends DefaultUser implements User {
760
750
  }
761
751
 
752
+ declare type DATA_LOGON_DETAILS = {
753
+ DATASOURCE_NAME: string;
754
+ CRITERIA_MATCH?: string;
755
+ MAX_ROWS?: number;
756
+ MAX_VIEW?: number;
757
+ MOVING_VIEW?: boolean;
758
+ POLLING_INTERVAL?: number;
759
+ DISABLE_POLLING?: boolean;
760
+ REVERSE?: boolean;
761
+ };
762
+
762
763
  /**
763
764
  * Data server result filter.
764
765
  *
@@ -1080,14 +1081,14 @@ export declare class DefaultAuth implements Auth {
1080
1081
  private connect;
1081
1082
  private messageBuilder;
1082
1083
  private credentialManager;
1084
+ currentUser: User_2;
1083
1085
  isWorking: boolean;
1084
- currentUser: User;
1085
1086
  loggedUserResult: LoginResult;
1086
1087
  private loggedUserResultChanged;
1087
1088
  private isLoggedInSubject;
1088
1089
  get isLoggedIn$(): Observable<boolean>;
1089
1090
  get isLoggedIn(): boolean;
1090
- constructor(session: Session, connect: Connect, messageBuilder: MessageBuilder, credentialManager: CredentialManager);
1091
+ constructor(session: Session, connect: Connect, messageBuilder: MessageBuilder, credentialManager: CredentialManager, currentUser: User_2);
1091
1092
  login(credentials: AuthInfo): Promise<LoginResult>;
1092
1093
  logout(): Promise<LogoutResult>;
1093
1094
  reAuthFromSession(): Promise<boolean>;
@@ -1130,6 +1131,9 @@ export declare class DefaultConnect implements Connect {
1130
1131
  get isConnected$(): Observable<boolean>;
1131
1132
  constructor(socket: Socket, messageBuilder: MessageBuilder, metaCache: MetaCache, events: ConnectEventsEmitter, config?: ConnectConfig);
1132
1133
  httpMode(): boolean;
1134
+ /**
1135
+ * @deprecated - Please reference {@link @genesislcap/foundation-user#User} instead.',
1136
+ */
1133
1137
  setValidSession(valid: boolean): void;
1134
1138
  send<T>(message: Message<any>, needsHandling?: boolean): Promise<any>;
1135
1139
  connect(host: string): Promise<boolean>;
@@ -1166,7 +1170,7 @@ export declare class DefaultConnectEvents implements ConnectEventsEmitter {
1166
1170
  /** {@inheritDoc ConnectEventsEmitter.onStreamEvent} */
1167
1171
  onStreamEvent(resourceName: string, message: Message<MessageDetails.DataserverRequest>, stream: SocketObservable<any>, functions: StreamEventFunctions): void;
1168
1172
  /** {@inheritDoc ConnectEventsEmitter.onStreamCompleteEvent} */
1169
- onStreamCompleteEvent(stream: SocketObservable<any>): void;
1173
+ onStreamCompleteEvent(resourceName: string, stream: SocketObservable<any>): void;
1170
1174
  /** @internal */
1171
1175
  protected commitListeners: Observer<CommitEvent>;
1172
1176
  /** {@inheritDoc ConnectEvents.addCommitListener} */
@@ -1393,9 +1397,9 @@ export declare const defaultHttpConnectConfig: HttpConnectConfig;
1393
1397
  */
1394
1398
  export declare class DefaultKVStorage implements KVStorage {
1395
1399
  private connect;
1396
- private auth;
1400
+ protected user: User_2;
1397
1401
  private kvStorageConfig;
1398
- constructor(connect: Connect, auth: Auth, kvStorageConfig?: KVStorageConfig);
1402
+ constructor(connect: Connect, user: User_2, kvStorageConfig?: KVStorageConfig);
1399
1403
  /**
1400
1404
  * Determine whether KV Storage is available for use.
1401
1405
  * @internal
@@ -1499,6 +1503,8 @@ export declare class DefaultMessageBuilder implements MessageBuilder {
1499
1503
  createMoreRowsMessage(sourceRef: string): Message;
1500
1504
  createMoreColumnsMessage(sourceRef: string): Message;
1501
1505
  createHTTPHeadersFromMessage(message: Message, contentType?: string): HeadersInit;
1506
+ /** {@inheritDoc MessageBuilder.createHeartbeatPingMessage} */
1507
+ createHeartbeatPingMessage(verbose?: boolean): PingMessage;
1502
1508
  }
1503
1509
 
1504
1510
  /**
@@ -1537,7 +1543,7 @@ export declare class DefaultNetworkMonitor implements NetworkMonitor {
1537
1543
  /**
1538
1544
  * @internal
1539
1545
  */
1540
- protected user: User;
1546
+ protected user: User_2;
1541
1547
  /**
1542
1548
  * @internal
1543
1549
  */
@@ -1554,6 +1560,10 @@ export declare class DefaultNetworkMonitor implements NetworkMonitor {
1554
1560
  * @internal
1555
1561
  */
1556
1562
  protected internalId: ReturnType<typeof setInterval>;
1563
+ /**
1564
+ * @internal
1565
+ */
1566
+ protected isReady: boolean;
1557
1567
  /**
1558
1568
  * @internal
1559
1569
  */
@@ -1562,6 +1572,7 @@ export declare class DefaultNetworkMonitor implements NetworkMonitor {
1562
1572
  * {@inheritDoc NetworkMonitor.status}
1563
1573
  */
1564
1574
  status: SystemHealthStatus;
1575
+ constructor();
1565
1576
  /**
1566
1577
  * {@inheritDoc NetworkMonitor.create}
1567
1578
  */
@@ -1630,6 +1641,11 @@ export declare class DefaultNetworkMonitor implements NetworkMonitor {
1630
1641
  * @internal
1631
1642
  */
1632
1643
  protected normaliseEventDetail(detail: Partial<SystemHealthStatus>): SystemHealthStatus;
1644
+ /**
1645
+ * @returns A flag to indicate if the socket is in a state that allows resource checking.
1646
+ * @internal
1647
+ */
1648
+ protected preFlightSocketChecks(status: SerializedSocketStatus): boolean;
1633
1649
  /**
1634
1650
  * @internal
1635
1651
  */
@@ -1690,6 +1706,10 @@ export declare class DefaultSocket implements Socket {
1690
1706
  private serializer;
1691
1707
  private uuid;
1692
1708
  private status;
1709
+ /**
1710
+ * Temp putting the user in place to bridge the hasValidSession logic.
1711
+ */
1712
+ protected user: User_2;
1693
1713
  private readonly defaultInterval;
1694
1714
  private readonly secondsMultiplier;
1695
1715
  private websocket;
@@ -1702,6 +1722,7 @@ export declare class DefaultSocket implements Socket {
1702
1722
  get isDisconnected(): boolean;
1703
1723
  get isDisconnectedByServer(): boolean;
1704
1724
  get isReconnecting(): boolean;
1725
+ /** {@inheritDoc SerializedSocketStatus.hasValidSession} */
1705
1726
  get hasValidSession(): boolean;
1706
1727
  set hasValidSession(value: boolean);
1707
1728
  private heartbeatIsEnabled;
@@ -1711,7 +1732,11 @@ export declare class DefaultSocket implements Socket {
1711
1732
  private connectOptions;
1712
1733
  private reconnectOptions;
1713
1734
  private socketSubscription;
1714
- constructor(messageBuilder: MessageBuilder, session: Session, serializer: JSONSerializer, uuid: UUID, status: SocketStatus);
1735
+ constructor(messageBuilder: MessageBuilder, session: Session, serializer: JSONSerializer, uuid: UUID, status: SocketStatus,
1736
+ /**
1737
+ * Temp putting the user in place to bridge the hasValidSession logic.
1738
+ */
1739
+ user: User_2);
1715
1740
  private get heartbeatLoggingIsEnabled();
1716
1741
  private get messageLoggingIsEnabled();
1717
1742
  connect(host: string, connectOptions?: SocketConnectOptions, reconnectOptions?: SocketReconnectOptions): Promise<boolean>;
@@ -1739,10 +1764,12 @@ export declare class DefaultSocketStatus implements SocketStatus {
1739
1764
  isConnected: boolean;
1740
1765
  isReconnecting: boolean;
1741
1766
  reconnectionLimitReached: boolean;
1742
- hasValidSession: boolean;
1743
1767
  closedCode: any;
1744
1768
  closedReason: any;
1745
1769
  closedClean: any;
1770
+ protected user: User_2;
1771
+ /** {@inheritDoc SerializedSocketStatus.hasValidSession} */
1772
+ get hasValidSession(): boolean;
1746
1773
  get isDisconnected(): boolean;
1747
1774
  get isDisconnectedByServer(): boolean;
1748
1775
  isConnectedSubject: BehaviorSubject<boolean>;
@@ -2083,6 +2110,23 @@ export declare type GetCredentialOptions = CredentialRequestOptions & {};
2083
2110
  */
2084
2111
  export declare function getDatasource(): Datasource;
2085
2112
 
2113
+ /**
2114
+ * Gets KVStorage from the DI container.
2115
+ *
2116
+ * @remarks
2117
+ * A utility method for host applications that are not using decorators or the DI container.
2118
+ *
2119
+ * @example
2120
+ * ```ts
2121
+ * import { getKVStorage } from '@genesislcap/foundation-comms';
2122
+ * ...
2123
+ * private kvStorage = getKVStorage();
2124
+ * ```
2125
+ *
2126
+ * @public
2127
+ */
2128
+ export declare function getKVStorage(): KVStorage;
2129
+
2086
2130
  /**
2087
2131
  * Gets NetworkMonitor from the DI container.
2088
2132
  *
@@ -2624,6 +2668,10 @@ export declare interface MessageBuilder {
2624
2668
  * @returns The headers.
2625
2669
  */
2626
2670
  createHTTPHeadersFromMessage(message: Message, contentType?: string): HeadersInit;
2671
+ /**
2672
+ * @param verbose - A flag to inform the backend you require a verbose response.
2673
+ */
2674
+ createHeartbeatPingMessage(verbose: boolean): PingMessage;
2627
2675
  }
2628
2676
 
2629
2677
  /**
@@ -3011,6 +3059,14 @@ export declare interface NetworkMonitorConfig {
3011
3059
  * Genesis connect events that invoke checks
3012
3060
  */
3013
3061
  genesisConnectEvents?: GenesisConnectEvents[];
3062
+ /**
3063
+ * Ignored Genesis resources that will NOT invoke checks
3064
+ */
3065
+ ignoredGenesisResources?: string[];
3066
+ /**
3067
+ * Start delay in ms
3068
+ */
3069
+ startDelay?: number;
3014
3070
  /**
3015
3071
  * Periodic check internal in ms
3016
3072
  */
@@ -3033,6 +3089,10 @@ export declare interface NetworkMonitorConfig {
3033
3089
  * The element to emit events from
3034
3090
  */
3035
3091
  eventEmitter?: HTMLElement;
3092
+ /**
3093
+ * Default log level
3094
+ */
3095
+ logLevel?: LogLevel;
3036
3096
  }
3037
3097
 
3038
3098
  /**
@@ -3059,6 +3119,14 @@ export declare const NetworkMonitorConfig: InterfaceSymbol<NetworkMonitorConfig>
3059
3119
  */
3060
3120
  export declare function normaliseCriteria(criteria: string, delimiter?: string): string;
3061
3121
 
3122
+ /**
3123
+ * @public
3124
+ */
3125
+ export declare type PingMessage = Pick<Message, 'MESSAGE_TYPE' | 'SOURCE_REF' | 'DETAILS'> & {
3126
+ VERBOSE?: boolean;
3127
+ [key: string]: any;
3128
+ };
3129
+
3062
3130
  /**
3063
3131
  * Configuration options for http polling.
3064
3132
  * @public
@@ -3079,6 +3147,17 @@ export declare interface PollingConfiguration {
3079
3147
  QUERIES: string[];
3080
3148
  }
3081
3149
 
3150
+ /**
3151
+ * @public
3152
+ */
3153
+ export declare type PongMessage = Pick<Message, 'MESSAGE_TYPE' | 'SOURCE_REF' | 'USER_NAME'> & {
3154
+ IS_AUTHENTICATED?: boolean;
3155
+ CREATED_AT?: number;
3156
+ LAST_RECEIVED?: number;
3157
+ LAST_SENT?: number;
3158
+ RESOURCES?: Record<string, RESOURCE_DETAILS[]>;
3159
+ };
3160
+
3082
3161
  /**
3083
3162
  * Raw result from a DATASERVER data fetch.
3084
3163
  * @public
@@ -3132,6 +3211,15 @@ export declare type RequestServerResult = {
3132
3211
  MESSAGE_TYPE?: string;
3133
3212
  };
3134
3213
 
3214
+ declare type RESOURCE_DETAILS = {
3215
+ NAME: string;
3216
+ CREATED_AT: number;
3217
+ LAST_RECEIVED: number;
3218
+ LAST_SENT: number;
3219
+ SOURCE_REF: string;
3220
+ DATA_LOGON: DATA_LOGON_DETAILS;
3221
+ };
3222
+
3135
3223
  /**
3136
3224
  * ResourceHealth.
3137
3225
  * @public
@@ -3195,6 +3283,7 @@ export declare interface SerializedSocketStatus {
3195
3283
  isDisconnectedByServer: boolean;
3196
3284
  isReconnecting: boolean;
3197
3285
  reconnectionLimitReached: boolean;
3286
+ /** @deprecated - Use {@link @genesislcap/foundation-user#User.isAuthenticated} instead. */
3198
3287
  hasValidSession: boolean;
3199
3288
  readonly closedCode: number;
3200
3289
  readonly closedReason: string;
@@ -3435,6 +3524,20 @@ export declare type SocketConnectOptions = {
3435
3524
  * Time in milliseconds
3436
3525
  */
3437
3526
  heartbeatInterval?: number;
3527
+ /**
3528
+ * Server will send resource level information
3529
+ */
3530
+ verboseHeartbeat?: boolean;
3531
+ /**
3532
+ * Called with the ping message before it is sent
3533
+ * @param message - The outgoing ping message.
3534
+ */
3535
+ heartbeatPingCallback?: (message: PingMessage) => void;
3536
+ /**
3537
+ * Called with the pong message after it is received
3538
+ * @param message - The incoming pong message.
3539
+ */
3540
+ heartbeatPongCallback?: (message: PongMessage) => void;
3438
3541
  /**
3439
3542
  * The path to a proxy server to use for the connection.
3440
3543
  */
@@ -3627,7 +3730,12 @@ export declare type StorageType = 'local' | 'session';
3627
3730
  /**
3628
3731
  * @public
3629
3732
  */
3630
- export declare type StreamCompleteEvent = CustomEvent<SocketObservable<any>>;
3733
+ export declare type StreamCompleteEvent = CustomEvent<StreamCompleteEventDetail>;
3734
+
3735
+ /**
3736
+ * @public
3737
+ */
3738
+ export declare type StreamCompleteEventDetail = Pick<StreamEventDetail, 'resourceName' | 'stream'>;
3631
3739
 
3632
3740
  /**
3633
3741
  * @public
@@ -3786,20 +3894,23 @@ export declare function until(conditionFunc: () => boolean, timeoutMs?: number):
3786
3894
 
3787
3895
  /**
3788
3896
  * Represents a User object with associated permissions and profiles.
3897
+ *
3898
+ * @deprecated - Use {@link @genesislcap/foundation-user#User} instead.
3899
+ *
3789
3900
  * @public
3790
3901
  */
3791
- export declare interface User extends UserOptions {
3792
- hasAdminProfile(): boolean;
3793
- hasPermission(permission: UserPermission | UserPermission[]): boolean;
3794
- hasProfile(profile: UserProfile | UserProfile[]): boolean;
3795
- set(options: UserOptions): void;
3796
- unset(): void;
3902
+ export declare interface User extends User_2 {
3797
3903
  }
3798
3904
 
3799
3905
  /**
3800
3906
  * User DI key.
3907
+ *
3801
3908
  * @privateRemarks
3802
3909
  * Marked as internal to stop api-extractor becoming confused cross-linking tokens with the same name.
3910
+ * Using aliasTo to point to {@link @genesislcap/foundation-user#User}.
3911
+ *
3912
+ * @deprecated - Use {@link @genesislcap/foundation-user#User} instead.
3913
+ *
3803
3914
  * @internal
3804
3915
  */
3805
3916
  export declare const User: InterfaceSymbol<User>;
@@ -3810,24 +3921,6 @@ export declare const User: InterfaceSymbol<User>;
3810
3921
  */
3811
3922
  declare type UserInfoKeys = 'authToken' | 'ssoToken' | 'refreshToken' | 'sessionId' | 'returnUrl' | 'hostUrl' | 'gridOptions';
3812
3923
 
3813
- /**
3814
- * Made some minor adjustments here to make user more accessible in the short term.
3815
- * Please note that this User will be replaced with the enhanced version shortly!
3816
- */
3817
- /**
3818
- * TODO: Evolve, re-locate to foundation-data, foundation-user or similar and add JSON schema based population,
3819
- * validation, evolution, foundation-store interop etc.
3820
- */
3821
- /**
3822
- * Represents the core options for a user.
3823
- * @internal
3824
- */
3825
- declare interface UserOptions {
3826
- readonly permissions: UserPermission[] | null;
3827
- readonly profiles: UserProfile[] | null;
3828
- readonly username: string | null;
3829
- }
3830
-
3831
3924
  /**
3832
3925
  * @internal
3833
3926
  */
@@ -19,6 +19,6 @@ export interface ConnectEventsEmitter extends ConnectEvents
19
19
  | --- | --- |
20
20
  | [onCommitEvent(eventName, message)](./foundation-comms.connecteventsemitter.oncommitevent.md) | Called by Connect. |
21
21
  | [onMetadataEvent(resourceName, message, error)](./foundation-comms.connecteventsemitter.onmetadataevent.md) | Called by Connect. |
22
- | [onStreamCompleteEvent(stream)](./foundation-comms.connecteventsemitter.onstreamcompleteevent.md) | Called by Connect. |
22
+ | [onStreamCompleteEvent(resourceName, stream)](./foundation-comms.connecteventsemitter.onstreamcompleteevent.md) | Called by Connect. |
23
23
  | [onStreamEvent(resourceName, message, stream, functions)](./foundation-comms.connecteventsemitter.onstreamevent.md) | Called by Connect. |
24
24
 
@@ -9,13 +9,14 @@ Called by Connect.
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- onStreamCompleteEvent(stream: SocketObservable<any>): void;
12
+ onStreamCompleteEvent(resourceName: string, stream: SocketObservable<any>): void;
13
13
  ```
14
14
 
15
15
  ## Parameters
16
16
 
17
17
  | Parameter | Type | Description |
18
18
  | --- | --- | --- |
19
+ | resourceName | string | The name of the resource. |
19
20
  | stream | [SocketObservable](./foundation-comms.socketobservable.md)<!-- -->&lt;any&gt; | The actual stream itself. |
20
21
 
21
22
  **Returns:**
@@ -4,36 +4,19 @@
4
4
 
5
5
  ## CurrentUser class
6
6
 
7
+ > Warning: This API is now obsolete.
8
+ >
9
+ > - Use instead.
10
+ >
11
+
7
12
  Represents the current user (i.e. the user that is currently logged in).
8
13
 
9
14
  **Signature:**
10
15
 
11
16
  ```typescript
12
- export declare class CurrentUser implements User
17
+ export declare class CurrentUser extends DefaultNextUser implements User
13
18
  ```
14
- **Implements:** [User](./foundation-comms.user.md)
15
-
16
- ## Constructors
17
-
18
- | Constructor | Modifiers | Description |
19
- | --- | --- | --- |
20
- | [(constructor)(options)](./foundation-comms.currentuser._constructor_.md) | | Constructs a new instance of the <code>CurrentUser</code> class |
19
+ **Extends:** DefaultNextUser
21
20
 
22
- ## Properties
23
-
24
- | Property | Modifiers | Type | Description |
25
- | --- | --- | --- | --- |
26
- | [permissions](./foundation-comms.currentuser.permissions.md) | | UserPermission\[\] | |
27
- | [profiles](./foundation-comms.currentuser.profiles.md) | | UserProfile\[\] | |
28
- | [username](./foundation-comms.currentuser.username.md) | | string | |
29
-
30
- ## Methods
31
-
32
- | Method | Modifiers | Description |
33
- | --- | --- | --- |
34
- | [hasAdminProfile()](./foundation-comms.currentuser.hasadminprofile.md) | | |
35
- | [hasPermission(permission)](./foundation-comms.currentuser.haspermission.md) | | |
36
- | [hasProfile(profile)](./foundation-comms.currentuser.hasprofile.md) | | |
37
- | [set(options)](./foundation-comms.currentuser.set.md) | | |
38
- | [unset()](./foundation-comms.currentuser.unset.md) | | |
21
+ **Implements:** [User](./foundation-comms.user.md)
39
22
 
@@ -9,7 +9,7 @@ Constructs a new instance of the `DefaultAuth` class
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- constructor(session: Session, connect: Connect, messageBuilder: MessageBuilder, credentialManager: CredentialManager);
12
+ constructor(session: Session, connect: Connect, messageBuilder: MessageBuilder, credentialManager: CredentialManager, currentUser: User);
13
13
  ```
14
14
 
15
15
  ## Parameters
@@ -20,4 +20,5 @@ constructor(session: Session, connect: Connect, messageBuilder: MessageBuilder,
20
20
  | connect | [Connect](./foundation-comms.connect.md) | |
21
21
  | messageBuilder | [MessageBuilder](./foundation-comms.messagebuilder.md) | |
22
22
  | credentialManager | [CredentialManager](./foundation-comms.credentialmanager.md) | |
23
+ | currentUser | User | |
23
24
 
@@ -17,13 +17,13 @@ export declare class DefaultAuth implements Auth
17
17
 
18
18
  | Constructor | Modifiers | Description |
19
19
  | --- | --- | --- |
20
- | [(constructor)(session, connect, messageBuilder, credentialManager)](./foundation-comms.defaultauth._constructor_.md) | | Constructs a new instance of the <code>DefaultAuth</code> class |
20
+ | [(constructor)(session, connect, messageBuilder, credentialManager, currentUser)](./foundation-comms.defaultauth._constructor_.md) | | Constructs a new instance of the <code>DefaultAuth</code> class |
21
21
 
22
22
  ## Properties
23
23
 
24
24
  | Property | Modifiers | Type | Description |
25
25
  | --- | --- | --- | --- |
26
- | [currentUser](./foundation-comms.defaultauth.currentuser.md) | | [User](./foundation-comms.user.md) | |
26
+ | [currentUser](./foundation-comms.defaultauth.currentuser.md) | | User | |
27
27
  | [isLoggedIn](./foundation-comms.defaultauth.isloggedin.md) | <code>readonly</code> | boolean | |
28
28
  | [isLoggedIn$](./foundation-comms.defaultauth.isloggedin_.md) | <code>readonly</code> | Observable&lt;boolean&gt; | |
29
29
  | [isWorking](./foundation-comms.defaultauth.isworking.md) | | boolean | |
@@ -4,6 +4,11 @@
4
4
 
5
5
  ## DefaultConnect.setValidSession() method
6
6
 
7
+ > Warning: This API is now obsolete.
8
+ >
9
+ > - Please reference instead.',
10
+ >
11
+
7
12
  **Signature:**
8
13
 
9
14
  ```typescript
@@ -22,6 +22,6 @@ export declare class DefaultConnectEvents implements ConnectEventsEmitter
22
22
  | [addStreamListener(listener, complete)](./foundation-comms.defaultconnectevents.addstreamlistener.md) | | Add a stream listener. |
23
23
  | [onCommitEvent(eventName, message)](./foundation-comms.defaultconnectevents.oncommitevent.md) | | Called by Connect. |
24
24
  | [onMetadataEvent(resourceName, message, error)](./foundation-comms.defaultconnectevents.onmetadataevent.md) | | Called by Connect. |
25
- | [onStreamCompleteEvent(stream)](./foundation-comms.defaultconnectevents.onstreamcompleteevent.md) | | Called by Connect. |
25
+ | [onStreamCompleteEvent(resourceName, stream)](./foundation-comms.defaultconnectevents.onstreamcompleteevent.md) | | Called by Connect. |
26
26
  | [onStreamEvent(resourceName, message, stream, functions)](./foundation-comms.defaultconnectevents.onstreamevent.md) | | Called by Connect. |
27
27
 
@@ -9,13 +9,14 @@ Called by Connect.
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- onStreamCompleteEvent(stream: SocketObservable<any>): void;
12
+ onStreamCompleteEvent(resourceName: string, stream: SocketObservable<any>): void;
13
13
  ```
14
14
 
15
15
  ## Parameters
16
16
 
17
17
  | Parameter | Type | Description |
18
18
  | --- | --- | --- |
19
+ | resourceName | string | The name of the resource. |
19
20
  | stream | [SocketObservable](./foundation-comms.socketobservable.md)<!-- -->&lt;any&gt; | The actual stream itself. |
20
21
 
21
22
  **Returns:**
@@ -0,0 +1,22 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-comms](./foundation-comms.md) &gt; [DefaultMessageBuilder](./foundation-comms.defaultmessagebuilder.md) &gt; [createHeartbeatPingMessage](./foundation-comms.defaultmessagebuilder.createheartbeatpingmessage.md)
4
+
5
+ ## DefaultMessageBuilder.createHeartbeatPingMessage() method
6
+
7
+ **Signature:**
8
+
9
+ ```typescript
10
+ createHeartbeatPingMessage(verbose?: boolean): PingMessage;
11
+ ```
12
+
13
+ ## Parameters
14
+
15
+ | Parameter | Type | Description |
16
+ | --- | --- | --- |
17
+ | verbose | boolean | _(Optional)_ A flag to inform the backend you require a verbose response. |
18
+
19
+ **Returns:**
20
+
21
+ [PingMessage](./foundation-comms.pingmessage.md)
22
+
@@ -29,6 +29,7 @@ export declare class DefaultMessageBuilder implements MessageBuilder
29
29
  | [createDataLogonMessage(resourceName, params)](./foundation-comms.defaultmessagebuilder.createdatalogonmessage.md) | | |
30
30
  | [createForgotPasswordMessage(username, returnUrl, requester)](./foundation-comms.defaultmessagebuilder.createforgotpasswordmessage.md) | | |
31
31
  | [createForgotPasswordTokenMessage(username, resetToken, newPassword, requester)](./foundation-comms.defaultmessagebuilder.createforgotpasswordtokenmessage.md) | | |
32
+ | [createHeartbeatPingMessage(verbose)](./foundation-comms.defaultmessagebuilder.createheartbeatpingmessage.md) | | |
32
33
  | [createHTTPHeadersFromMessage(message, contentType)](./foundation-comms.defaultmessagebuilder.createhttpheadersfrommessage.md) | | |
33
34
  | [createLoginMessage(credentials)](./foundation-comms.defaultmessagebuilder.createloginmessage.md) | | |
34
35
  | [createLogoutMessage(loginResult)](./foundation-comms.defaultmessagebuilder.createlogoutmessage.md) | | |
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-comms](./foundation-comms.md) &gt; [DefaultNetworkMonitor](./foundation-comms.defaultnetworkmonitor.md) &gt; [(constructor)](./foundation-comms.defaultnetworkmonitor._constructor_.md)
4
+
5
+ ## DefaultNetworkMonitor.(constructor)
6
+
7
+ Constructs a new instance of the `DefaultNetworkMonitor` class
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ constructor();
13
+ ```
@@ -13,6 +13,12 @@ export declare class DefaultNetworkMonitor implements NetworkMonitor
13
13
  ```
14
14
  **Implements:** [NetworkMonitor](./foundation-comms.networkmonitor.md)
15
15
 
16
+ ## Constructors
17
+
18
+ | Constructor | Modifiers | Description |
19
+ | --- | --- | --- |
20
+ | [(constructor)()](./foundation-comms.defaultnetworkmonitor._constructor_.md) | | Constructs a new instance of the <code>DefaultNetworkMonitor</code> class |
21
+
16
22
  ## Properties
17
23
 
18
24
  | Property | Modifiers | Type | Description |
@@ -9,7 +9,8 @@ Constructs a new instance of the `DefaultSocket` class
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- constructor(messageBuilder: MessageBuilder, session: Session, serializer: JSONSerializer, uuid: UUID, status: SocketStatus);
12
+ constructor(messageBuilder: MessageBuilder, session: Session, serializer: JSONSerializer, uuid: UUID, status: SocketStatus,
13
+ user: User);
13
14
  ```
14
15
 
15
16
  ## Parameters
@@ -21,4 +22,5 @@ constructor(messageBuilder: MessageBuilder, session: Session, serializer: JSONSe
21
22
  | serializer | JSONSerializer | |
22
23
  | uuid | UUID | |
23
24
  | status | [SocketStatus](./foundation-comms.socketstatus.md) | |
25
+ | user | User | |
24
26
 
@@ -17,7 +17,7 @@ export declare class DefaultSocket implements Socket
17
17
 
18
18
  | Constructor | Modifiers | Description |
19
19
  | --- | --- | --- |
20
- | [(constructor)(messageBuilder, session, serializer, uuid, status)](./foundation-comms.defaultsocket._constructor_.md) | | Constructs a new instance of the <code>DefaultSocket</code> class |
20
+ | [(constructor)(messageBuilder, session, serializer, uuid, status, user)](./foundation-comms.defaultsocket._constructor_.md) | | Constructs a new instance of the <code>DefaultSocket</code> class |
21
21
 
22
22
  ## Properties
23
23
 
@@ -32,6 +32,7 @@ export declare class DefaultSocket implements Socket
32
32
  | [isDisconnectedByServer](./foundation-comms.defaultsocket.isdisconnectedbyserver.md) | <code>readonly</code> | boolean | |
33
33
  | [isReconnecting](./foundation-comms.defaultsocket.isreconnecting.md) | <code>readonly</code> | boolean | |
34
34
  | [socketMessages](./foundation-comms.defaultsocket.socketmessages.md) | | () =&gt; [SocketSubject](./foundation-comms.socketsubject.md)<!-- -->&lt;[Message](./foundation-comms.message.md)<!-- -->&gt; | |
35
+ | [user](./foundation-comms.defaultsocket.user.md) | <code>protected</code> | User | Temp putting the user in place to bridge the hasValidSession logic. |
35
36
 
36
37
  ## Methods
37
38