@genesislcap/foundation-comms 14.306.1 → 14.306.2-alpha-7a2d723.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dts/auth/auth.d.ts +19 -2
- package/dist/dts/auth/auth.d.ts.map +1 -1
- package/dist/dts/connect/connect.d.ts +14 -2
- package/dist/dts/connect/connect.d.ts.map +1 -1
- package/dist/dts/connect/message.d.ts +1 -0
- package/dist/dts/connect/message.d.ts.map +1 -1
- package/dist/dts/connect/socket.d.ts +6 -11
- package/dist/dts/connect/socket.d.ts.map +1 -1
- package/dist/dts/metadata/metadata.types.d.ts +1 -0
- package/dist/dts/metadata/metadata.types.d.ts.map +1 -1
- package/dist/dts/testing/mocks/connect/connect.d.ts +1 -0
- package/dist/dts/testing/mocks/connect/connect.d.ts.map +1 -1
- package/dist/dts/testing/mocks/connect/socket.d.ts +5 -2
- package/dist/dts/testing/mocks/connect/socket.d.ts.map +1 -1
- package/dist/esm/auth/auth.js +91 -5
- package/dist/esm/connect/connect.js +24 -4
- package/dist/esm/connect/socket.js +15 -86
- package/dist/esm/testing/mocks/connect/connect.js +2 -1
- package/dist/esm/testing/mocks/connect/socket.js +8 -1
- package/dist/foundation-comms.api.json +257 -2
- package/dist/foundation-comms.d.ts +52 -23
- package/docs/api/foundation-comms.connect.md +21 -0
- package/docs/api/foundation-comms.connect.sessionexpired_.md +13 -0
- package/docs/api/foundation-comms.defaultauth._constructor_.md +15 -1
- package/docs/api/foundation-comms.defaultauth.md +20 -1
- package/docs/api/foundation-comms.defaultauth.reauth_action_lock_key.md +11 -0
- package/docs/api/foundation-comms.defaultconnect._constructor_.md +15 -1
- package/docs/api/foundation-comms.defaultconnect.md +41 -1
- package/docs/api/foundation-comms.defaultconnect.sessionexpired_.md +13 -0
- package/docs/api/foundation-comms.defaultconnect.user.md +11 -0
- package/docs/api/foundation-comms.defaultsocket.md +12 -0
- package/docs/api/foundation-comms.defaultsocket.updatesessionandsubscriptions.md +50 -0
- package/docs/api/foundation-comms.messagedetails.loggedinsysteminfo.md +1 -0
- package/docs/api/foundation-comms.rawdataserverresult.md +1 -0
- package/docs/api/foundation-comms.socket.md +11 -0
- package/docs/api/foundation-comms.socket.updatesessionandsubscriptions.md +52 -0
- package/docs/api-report.md.api.md +32 -13
- package/package.json +13 -13
|
@@ -11,8 +11,8 @@ import { Listener } from '@genesislcap/foundation-utils';
|
|
|
11
11
|
import { Logger } from '@genesislcap/foundation-logger';
|
|
12
12
|
import type { LogLevel } from '@genesislcap/foundation-utils';
|
|
13
13
|
import { Observable } from 'rxjs';
|
|
14
|
-
import { Observer } from '
|
|
15
|
-
import { Observer as Observer_2 } from '
|
|
14
|
+
import { Observer } from 'rxjs';
|
|
15
|
+
import { Observer as Observer_2 } from '@genesislcap/foundation-utils';
|
|
16
16
|
import { SetUserProperties } from '@genesislcap/foundation-user';
|
|
17
17
|
import { Subscription as SocketSubscription } from 'rxjs';
|
|
18
18
|
import { Subject } from 'rxjs';
|
|
@@ -402,6 +402,11 @@ export declare interface Connect {
|
|
|
402
402
|
* @returns A promise that resolves to a Message containing the server's response.
|
|
403
403
|
*/
|
|
404
404
|
commitEvent(eventName: string, params?: CommitParams): Promise<Message>;
|
|
405
|
+
/**
|
|
406
|
+
* Emits true when the session is detected as expired (e.g., IS_AUTHENTICATED is false in heartbeat pong).
|
|
407
|
+
* Consumers can subscribe to this to react to session expiration events.
|
|
408
|
+
*/
|
|
409
|
+
readonly sessionExpired$?: Subject<boolean>;
|
|
405
410
|
/**
|
|
406
411
|
* @returns The host provided.
|
|
407
412
|
*/
|
|
@@ -586,6 +591,7 @@ export declare class ConnectMock implements Connect {
|
|
|
586
591
|
nextMessage: Message;
|
|
587
592
|
requestParams: RequestParams;
|
|
588
593
|
nextListState: any[];
|
|
594
|
+
sessionExpired$: BehaviorSubject<boolean>;
|
|
589
595
|
commitEvent(eventName: string, params?: CommitParams): Promise<Message>;
|
|
590
596
|
connect(host: string): Promise<boolean>;
|
|
591
597
|
disconnect(): void;
|
|
@@ -1753,16 +1759,33 @@ export declare class DefaultAuth implements Auth {
|
|
|
1753
1759
|
private messageBuilder;
|
|
1754
1760
|
private credentialManager;
|
|
1755
1761
|
currentUser: User_2;
|
|
1762
|
+
private socket;
|
|
1756
1763
|
isWorking: boolean;
|
|
1757
1764
|
loggedUserResult: LoginResult;
|
|
1758
1765
|
private loggedUserResultChanged;
|
|
1759
1766
|
private isLoggedInSubject;
|
|
1760
1767
|
get isLoggedIn$(): Observable<boolean>;
|
|
1761
1768
|
get isLoggedIn(): boolean;
|
|
1762
|
-
|
|
1769
|
+
static REAUTH_ACTION_LOCK_KEY: string;
|
|
1770
|
+
constructor(session: Session, connect: Connect, messageBuilder: MessageBuilder, credentialManager: CredentialManager, currentUser: User_2, socket: Socket);
|
|
1763
1771
|
login(credentials: AuthInfo): Promise<LoginResult>;
|
|
1764
1772
|
logout(): Promise<LogoutResult>;
|
|
1765
1773
|
reAuthFromSession(): Promise<boolean>;
|
|
1774
|
+
/**
|
|
1775
|
+
* Handles an expired session by attempting to refresh the session using either refresh token or cookie-based reauth.
|
|
1776
|
+
* @public
|
|
1777
|
+
*/
|
|
1778
|
+
private handleExpiredSession;
|
|
1779
|
+
/**
|
|
1780
|
+
* Handles cookie-based reauthentication, including multi-tab lockout and page reload if necessary.
|
|
1781
|
+
* @internal
|
|
1782
|
+
*/
|
|
1783
|
+
private handleCookieBasedReauth;
|
|
1784
|
+
/**
|
|
1785
|
+
* Handles the storage event for multi-tab reauthentication lock.
|
|
1786
|
+
* @internal
|
|
1787
|
+
*/
|
|
1788
|
+
private onStorageEvent;
|
|
1766
1789
|
/**
|
|
1767
1790
|
* Ensures that the connection is active.
|
|
1768
1791
|
* @internal
|
|
@@ -1796,12 +1819,18 @@ export declare class DefaultConnect implements Connect {
|
|
|
1796
1819
|
private metaCache;
|
|
1797
1820
|
private events;
|
|
1798
1821
|
private config;
|
|
1822
|
+
protected user: User_2;
|
|
1799
1823
|
isWorking: boolean;
|
|
1824
|
+
/**
|
|
1825
|
+
* Emits true when the session is detected as expired (e.g., IS_AUTHENTICATED is false in heartbeat pong).
|
|
1826
|
+
* Consumers can subscribe to this to react to session expiration events.
|
|
1827
|
+
*/
|
|
1828
|
+
readonly sessionExpired$: BehaviorSubject<boolean>;
|
|
1800
1829
|
get isConnected(): boolean;
|
|
1801
1830
|
get isConnectedSubject(): BehaviorSubject<boolean>;
|
|
1802
1831
|
get isConnected$(): Observable<boolean>;
|
|
1803
1832
|
get host(): string;
|
|
1804
|
-
constructor(socket: Socket, messageBuilder: MessageBuilder, metaCache: MetaCache, events: ConnectEventsEmitter, config: ConnectConfig);
|
|
1833
|
+
constructor(socket: Socket, messageBuilder: MessageBuilder, metaCache: MetaCache, events: ConnectEventsEmitter, config: ConnectConfig, user: User_2);
|
|
1805
1834
|
httpMode(): boolean;
|
|
1806
1835
|
/**
|
|
1807
1836
|
* @deprecated - Please reference `User` from `@genesislcap/foundation-user` instead.
|
|
@@ -1836,11 +1865,11 @@ export declare const defaultConnectConfig: ConnectConfig;
|
|
|
1836
1865
|
*/
|
|
1837
1866
|
export declare class DefaultConnectEvents implements ConnectEventsEmitter {
|
|
1838
1867
|
/** @internal */
|
|
1839
|
-
protected streamListeners:
|
|
1868
|
+
protected streamListeners: Observer_2<StreamEvent>;
|
|
1840
1869
|
/** @internal */
|
|
1841
|
-
protected streamCompleteListeners:
|
|
1870
|
+
protected streamCompleteListeners: Observer_2<StreamCompleteEvent>;
|
|
1842
1871
|
/** @internal */
|
|
1843
|
-
protected streamErrorListeners:
|
|
1872
|
+
protected streamErrorListeners: Observer_2<StreamErrorEvent>;
|
|
1844
1873
|
/** {@inheritDoc ConnectEvents.addStreamListener} */
|
|
1845
1874
|
addStreamListener(listener: Listener<StreamEvent>, complete: Listener<StreamCompleteEvent>, error: Listener<StreamErrorEvent>): () => void;
|
|
1846
1875
|
/** {@inheritDoc ConnectEventsEmitter.onStreamEvent} */
|
|
@@ -1850,19 +1879,19 @@ export declare class DefaultConnectEvents implements ConnectEventsEmitter {
|
|
|
1850
1879
|
/** {@inheritDoc ConnectEventsEmitter.onStreamCompleteEvent} */
|
|
1851
1880
|
onStreamCompleteEvent(resourceName: string, stream: SocketObservable<any>): void;
|
|
1852
1881
|
/** @internal */
|
|
1853
|
-
protected commitListeners:
|
|
1882
|
+
protected commitListeners: Observer_2<CommitEvent>;
|
|
1854
1883
|
/** {@inheritDoc ConnectEvents.addCommitListener} */
|
|
1855
1884
|
addCommitListener(listener: Listener<CommitEvent>): () => void;
|
|
1856
1885
|
/** {@inheritDoc ConnectEventsEmitter.onStreamEvent} */
|
|
1857
1886
|
onCommitEvent(eventName: string, message: Message): void;
|
|
1858
1887
|
/** @internal */
|
|
1859
|
-
protected metadataListeners:
|
|
1888
|
+
protected metadataListeners: Observer_2<MetadataEvent>;
|
|
1860
1889
|
/** {@inheritDoc ConnectEvents.addMetadataListener} */
|
|
1861
1890
|
addMetadataListener(listener: Listener<MetadataEvent>): () => void;
|
|
1862
1891
|
/** {@inheritDoc ConnectEventsEmitter.onMetadataEvent} */
|
|
1863
1892
|
onMetadataEvent(resourceName: string, message: Message<MessageDetails.MetaRequest>, error?: any): void;
|
|
1864
1893
|
/** @internal */
|
|
1865
|
-
protected commitResponseListeners:
|
|
1894
|
+
protected commitResponseListeners: Observer_2<CommitResponseEvent>;
|
|
1866
1895
|
/** {@inheritDoc ConnectEvents.addCommitResponseListener} */
|
|
1867
1896
|
addCommitResponseListener(listener: Listener<CommitResponseEvent>): () => void;
|
|
1868
1897
|
/** {@inheritDoc ConnectEventsEmitter.onCommitResponseEvent} */
|
|
@@ -2504,17 +2533,7 @@ export declare class DefaultSocket implements Socket {
|
|
|
2504
2533
|
private get heartbeatLoggingIsEnabled();
|
|
2505
2534
|
private get messageLoggingIsEnabled();
|
|
2506
2535
|
connect(host?: string, connectOptions?: SocketConnectOptions, reconnectOptions?: SocketReconnectOptions): Promise<boolean>;
|
|
2507
|
-
|
|
2508
|
-
*
|
|
2509
|
-
* @remarks
|
|
2510
|
-
* This is triggered after `sessionTimeoutMins` elapses and heartbeat would tell us that user is no longer authenticated
|
|
2511
|
-
* more info here https://docs.genesis.global/docs/develop/server-capabilities/access-control/authentication/#sessiontimeoutmins
|
|
2512
|
-
*/
|
|
2513
|
-
private handleExpiredSession;
|
|
2514
|
-
private static REAUTH_ACTION_LOCK_KEY;
|
|
2515
|
-
private handleCookieBasedReauth;
|
|
2516
|
-
private onStorageEvent;
|
|
2517
|
-
private updateSessionAndSubscriptions;
|
|
2536
|
+
updateSessionAndSubscriptions(refreshTokenResult: string): void;
|
|
2518
2537
|
private prepareHeartbeat;
|
|
2519
2538
|
private reconnect;
|
|
2520
2539
|
reset(): void;
|
|
@@ -3762,6 +3781,7 @@ export declare namespace MessageDetails {
|
|
|
3762
3781
|
NOTIFY_EXPIRY?: boolean;
|
|
3763
3782
|
PRODUCT?: any[];
|
|
3764
3783
|
SYSTEM?: any;
|
|
3784
|
+
SESSION_TIMEOUT_MINS?: number;
|
|
3765
3785
|
};
|
|
3766
3786
|
}
|
|
3767
3787
|
|
|
@@ -4127,6 +4147,7 @@ export declare type RawDataServerResult = {
|
|
|
4127
4147
|
MORE_ROWS: boolean;
|
|
4128
4148
|
ROWS_COUNT: number;
|
|
4129
4149
|
SEQUENCE_ID: number;
|
|
4150
|
+
LOGGED_OUT: boolean;
|
|
4130
4151
|
};
|
|
4131
4152
|
|
|
4132
4153
|
/**
|
|
@@ -4494,6 +4515,11 @@ export declare interface Socket extends Omit<SocketStatus, 'serialize' | 'onClos
|
|
|
4494
4515
|
sendForStreamWithoutTeardown<T>(message: Message<T | any>, onMessage: Function, onError: Function): Observable<Message>;
|
|
4495
4516
|
socketMessages(): SocketSubject<Message>;
|
|
4496
4517
|
host: string;
|
|
4518
|
+
/**
|
|
4519
|
+
* Updates the session and subscriptions with the new session token.
|
|
4520
|
+
* @param refreshTokenResult - The refresh token result.
|
|
4521
|
+
*/
|
|
4522
|
+
updateSessionAndSubscriptions(refreshToken: string): void;
|
|
4497
4523
|
}
|
|
4498
4524
|
|
|
4499
4525
|
/**
|
|
@@ -4518,7 +4544,7 @@ export declare type SocketConnectOptions = {
|
|
|
4518
4544
|
/**
|
|
4519
4545
|
* An observer to receive notifications of incoming messages from the server.
|
|
4520
4546
|
*/
|
|
4521
|
-
connectObserver?:
|
|
4547
|
+
connectObserver?: Observer<Message>;
|
|
4522
4548
|
/**
|
|
4523
4549
|
* Enable sending heartbeat messages to the server to prevent the connection from timing out.
|
|
4524
4550
|
*/
|
|
@@ -4616,12 +4642,15 @@ export declare class SocketMock implements Socket {
|
|
|
4616
4642
|
host: string;
|
|
4617
4643
|
nextMessage: Message;
|
|
4618
4644
|
socketMessagesSubject: SocketSubject<Message>;
|
|
4645
|
+
sessionExpiredSubject: SocketSubject<PongMessage>;
|
|
4619
4646
|
connect(host: string, options?: SocketConnectOptions, reconnectOptions?: SocketReconnectOptions): Promise<boolean>;
|
|
4620
4647
|
disconnect(): void;
|
|
4621
4648
|
send<T>(message: Message<any>): Promise<Message | any>;
|
|
4622
4649
|
sendForStream<T>(message: Message<any>, onMessage: Function, onError: Function, onComplete?: Function): Observable<Message>;
|
|
4623
4650
|
sendForStreamWithoutTeardown<T>(message: Message<any>, onMessage: Function, onError: Function): Observable<Message>;
|
|
4624
4651
|
socketMessages(): SocketSubject<Message>;
|
|
4652
|
+
sessionExpired(): SocketObservable<PongMessage>;
|
|
4653
|
+
updateSessionAndSubscriptions(refreshToken: string): void;
|
|
4625
4654
|
reset(): void;
|
|
4626
4655
|
}
|
|
4627
4656
|
|
|
@@ -4653,7 +4682,7 @@ export declare type SocketReconnectOptions = {
|
|
|
4653
4682
|
* Observer to notify when reconnection occurs
|
|
4654
4683
|
* @public
|
|
4655
4684
|
*/
|
|
4656
|
-
reconnectObserver?:
|
|
4685
|
+
reconnectObserver?: Observer<any>;
|
|
4657
4686
|
/**
|
|
4658
4687
|
* Reconnect stream subscriptions on reconnection
|
|
4659
4688
|
* @public
|
|
@@ -133,6 +133,27 @@ boolean
|
|
|
133
133
|
Indicates whether Connect is working or is idle.
|
|
134
134
|
|
|
135
135
|
|
|
136
|
+
</td></tr>
|
|
137
|
+
<tr><td>
|
|
138
|
+
|
|
139
|
+
[sessionExpired$?](./foundation-comms.connect.sessionexpired_.md)
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
</td><td>
|
|
143
|
+
|
|
144
|
+
`readonly`
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
</td><td>
|
|
148
|
+
|
|
149
|
+
Subject<boolean>
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
</td><td>
|
|
153
|
+
|
|
154
|
+
_(Optional)_ Emits true when the session is detected as expired (e.g., IS\_AUTHENTICATED is false in heartbeat pong). Consumers can subscribe to this to react to session expiration events.
|
|
155
|
+
|
|
156
|
+
|
|
136
157
|
</td></tr>
|
|
137
158
|
</tbody></table>
|
|
138
159
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [Connect](./foundation-comms.connect.md) > [sessionExpired$](./foundation-comms.connect.sessionexpired_.md)
|
|
4
|
+
|
|
5
|
+
## Connect.sessionExpired$ property
|
|
6
|
+
|
|
7
|
+
Emits true when the session is detected as expired (e.g., IS\_AUTHENTICATED is false in heartbeat pong). Consumers can subscribe to this to react to session expiration events.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
readonly sessionExpired$?: Subject<boolean>;
|
|
13
|
+
```
|
|
@@ -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, currentUser: User);
|
|
12
|
+
constructor(session: Session, connect: Connect, messageBuilder: MessageBuilder, credentialManager: CredentialManager, currentUser: User, socket: Socket);
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Parameters
|
|
@@ -99,6 +99,20 @@ User
|
|
|
99
99
|
</td><td>
|
|
100
100
|
|
|
101
101
|
|
|
102
|
+
</td></tr>
|
|
103
|
+
<tr><td>
|
|
104
|
+
|
|
105
|
+
socket
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
</td><td>
|
|
109
|
+
|
|
110
|
+
[Socket](./foundation-comms.socket.md)
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
</td><td>
|
|
114
|
+
|
|
115
|
+
|
|
102
116
|
</td></tr>
|
|
103
117
|
</tbody></table>
|
|
104
118
|
|
|
@@ -33,7 +33,7 @@ Description
|
|
|
33
33
|
</th></tr></thead>
|
|
34
34
|
<tbody><tr><td>
|
|
35
35
|
|
|
36
|
-
[(constructor)(session, connect, messageBuilder, credentialManager, currentUser)](./foundation-comms.defaultauth._constructor_.md)
|
|
36
|
+
[(constructor)(session, connect, messageBuilder, credentialManager, currentUser, socket)](./foundation-comms.defaultauth._constructor_.md)
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
</td><td>
|
|
@@ -158,6 +158,25 @@ boolean
|
|
|
158
158
|
</td><td>
|
|
159
159
|
|
|
160
160
|
|
|
161
|
+
</td></tr>
|
|
162
|
+
<tr><td>
|
|
163
|
+
|
|
164
|
+
[REAUTH\_ACTION\_LOCK\_KEY](./foundation-comms.defaultauth.reauth_action_lock_key.md)
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
</td><td>
|
|
168
|
+
|
|
169
|
+
`static`
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
</td><td>
|
|
173
|
+
|
|
174
|
+
string
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
</td><td>
|
|
178
|
+
|
|
179
|
+
|
|
161
180
|
</td></tr>
|
|
162
181
|
</tbody></table>
|
|
163
182
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [DefaultAuth](./foundation-comms.defaultauth.md) > [REAUTH\_ACTION\_LOCK\_KEY](./foundation-comms.defaultauth.reauth_action_lock_key.md)
|
|
4
|
+
|
|
5
|
+
## DefaultAuth.REAUTH\_ACTION\_LOCK\_KEY property
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
static REAUTH_ACTION_LOCK_KEY: string;
|
|
11
|
+
```
|
|
@@ -9,7 +9,7 @@ Constructs a new instance of the `DefaultConnect` class
|
|
|
9
9
|
**Signature:**
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
constructor(socket: Socket, messageBuilder: MessageBuilder, metaCache: MetaCache, events: ConnectEventsEmitter, config: ConnectConfig);
|
|
12
|
+
constructor(socket: Socket, messageBuilder: MessageBuilder, metaCache: MetaCache, events: ConnectEventsEmitter, config: ConnectConfig, user: User);
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Parameters
|
|
@@ -99,6 +99,20 @@ config
|
|
|
99
99
|
</td><td>
|
|
100
100
|
|
|
101
101
|
|
|
102
|
+
</td></tr>
|
|
103
|
+
<tr><td>
|
|
104
|
+
|
|
105
|
+
user
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
</td><td>
|
|
109
|
+
|
|
110
|
+
User
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
</td><td>
|
|
114
|
+
|
|
115
|
+
|
|
102
116
|
</td></tr>
|
|
103
117
|
</tbody></table>
|
|
104
118
|
|
|
@@ -33,7 +33,7 @@ Description
|
|
|
33
33
|
</th></tr></thead>
|
|
34
34
|
<tbody><tr><td>
|
|
35
35
|
|
|
36
|
-
[(constructor)(socket, messageBuilder, metaCache, events, config)](./foundation-comms.defaultconnect._constructor_.md)
|
|
36
|
+
[(constructor)(socket, messageBuilder, metaCache, events, config, user)](./foundation-comms.defaultconnect._constructor_.md)
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
</td><td>
|
|
@@ -162,6 +162,27 @@ boolean
|
|
|
162
162
|
</td><td>
|
|
163
163
|
|
|
164
164
|
|
|
165
|
+
</td></tr>
|
|
166
|
+
<tr><td>
|
|
167
|
+
|
|
168
|
+
[sessionExpired$](./foundation-comms.defaultconnect.sessionexpired_.md)
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
</td><td>
|
|
172
|
+
|
|
173
|
+
`readonly`
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
</td><td>
|
|
177
|
+
|
|
178
|
+
BehaviorSubject<boolean>
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
</td><td>
|
|
182
|
+
|
|
183
|
+
Emits true when the session is detected as expired (e.g., IS\_AUTHENTICATED is false in heartbeat pong). Consumers can subscribe to this to react to session expiration events.
|
|
184
|
+
|
|
185
|
+
|
|
165
186
|
</td></tr>
|
|
166
187
|
<tr><td>
|
|
167
188
|
|
|
@@ -179,6 +200,25 @@ boolean
|
|
|
179
200
|
</td><td>
|
|
180
201
|
|
|
181
202
|
|
|
203
|
+
</td></tr>
|
|
204
|
+
<tr><td>
|
|
205
|
+
|
|
206
|
+
[user](./foundation-comms.defaultconnect.user.md)
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
</td><td>
|
|
210
|
+
|
|
211
|
+
`protected`
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
</td><td>
|
|
215
|
+
|
|
216
|
+
User
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
</td><td>
|
|
220
|
+
|
|
221
|
+
|
|
182
222
|
</td></tr>
|
|
183
223
|
</tbody></table>
|
|
184
224
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [DefaultConnect](./foundation-comms.defaultconnect.md) > [sessionExpired$](./foundation-comms.defaultconnect.sessionexpired_.md)
|
|
4
|
+
|
|
5
|
+
## DefaultConnect.sessionExpired$ property
|
|
6
|
+
|
|
7
|
+
Emits true when the session is detected as expired (e.g., IS\_AUTHENTICATED is false in heartbeat pong). Consumers can subscribe to this to react to session expiration events.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
readonly sessionExpired$: BehaviorSubject<boolean>;
|
|
13
|
+
```
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [DefaultConnect](./foundation-comms.defaultconnect.md) > [user](./foundation-comms.defaultconnect.user.md)
|
|
4
|
+
|
|
5
|
+
## DefaultConnect.user property
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
protected user: User;
|
|
11
|
+
```
|
|
@@ -392,6 +392,18 @@ Description
|
|
|
392
392
|
</td><td>
|
|
393
393
|
|
|
394
394
|
|
|
395
|
+
</td></tr>
|
|
396
|
+
<tr><td>
|
|
397
|
+
|
|
398
|
+
[updateSessionAndSubscriptions(refreshTokenResult)](./foundation-comms.defaultsocket.updatesessionandsubscriptions.md)
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
</td><td>
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
</td><td>
|
|
405
|
+
|
|
406
|
+
|
|
395
407
|
</td></tr>
|
|
396
408
|
</tbody></table>
|
|
397
409
|
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [DefaultSocket](./foundation-comms.defaultsocket.md) > [updateSessionAndSubscriptions](./foundation-comms.defaultsocket.updatesessionandsubscriptions.md)
|
|
4
|
+
|
|
5
|
+
## DefaultSocket.updateSessionAndSubscriptions() method
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
updateSessionAndSubscriptions(refreshTokenResult: string): void;
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Parameters
|
|
14
|
+
|
|
15
|
+
<table><thead><tr><th>
|
|
16
|
+
|
|
17
|
+
Parameter
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
</th><th>
|
|
21
|
+
|
|
22
|
+
Type
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
</th><th>
|
|
26
|
+
|
|
27
|
+
Description
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
</th></tr></thead>
|
|
31
|
+
<tbody><tr><td>
|
|
32
|
+
|
|
33
|
+
refreshTokenResult
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
</td><td>
|
|
37
|
+
|
|
38
|
+
string
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
</td><td>
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
</td></tr>
|
|
45
|
+
</tbody></table>
|
|
46
|
+
|
|
47
|
+
**Returns:**
|
|
48
|
+
|
|
49
|
+
void
|
|
50
|
+
|
|
@@ -125,6 +125,17 @@ Disconnects the socket and clears all subscriptions
|
|
|
125
125
|
</td><td>
|
|
126
126
|
|
|
127
127
|
|
|
128
|
+
</td></tr>
|
|
129
|
+
<tr><td>
|
|
130
|
+
|
|
131
|
+
[updateSessionAndSubscriptions(refreshToken)](./foundation-comms.socket.updatesessionandsubscriptions.md)
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
</td><td>
|
|
135
|
+
|
|
136
|
+
Updates the session and subscriptions with the new session token.
|
|
137
|
+
|
|
138
|
+
|
|
128
139
|
</td></tr>
|
|
129
140
|
</tbody></table>
|
|
130
141
|
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [Socket](./foundation-comms.socket.md) > [updateSessionAndSubscriptions](./foundation-comms.socket.updatesessionandsubscriptions.md)
|
|
4
|
+
|
|
5
|
+
## Socket.updateSessionAndSubscriptions() method
|
|
6
|
+
|
|
7
|
+
Updates the session and subscriptions with the new session token.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
updateSessionAndSubscriptions(refreshToken: string): void;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
<table><thead><tr><th>
|
|
18
|
+
|
|
19
|
+
Parameter
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
</th><th>
|
|
23
|
+
|
|
24
|
+
Type
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
</th><th>
|
|
28
|
+
|
|
29
|
+
Description
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
</th></tr></thead>
|
|
33
|
+
<tbody><tr><td>
|
|
34
|
+
|
|
35
|
+
refreshToken
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
</td><td>
|
|
39
|
+
|
|
40
|
+
string
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
</td><td>
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
</td></tr>
|
|
47
|
+
</tbody></table>
|
|
48
|
+
|
|
49
|
+
**Returns:**
|
|
50
|
+
|
|
51
|
+
void
|
|
52
|
+
|