@genesislcap/foundation-comms 14.306.2-alpha-d90fa7e.0 → 14.307.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.
- package/dist/dts/auth/auth.d.ts +2 -19
- package/dist/dts/auth/auth.d.ts.map +1 -1
- package/dist/dts/connect/connect.d.ts +2 -14
- package/dist/dts/connect/connect.d.ts.map +1 -1
- package/dist/dts/connect/message.d.ts +0 -1
- package/dist/dts/connect/message.d.ts.map +1 -1
- package/dist/dts/connect/socket.d.ts +11 -6
- package/dist/dts/connect/socket.d.ts.map +1 -1
- package/dist/dts/metadata/metadata.types.d.ts +0 -1
- package/dist/dts/metadata/metadata.types.d.ts.map +1 -1
- package/dist/dts/testing/mocks/connect/connect.d.ts +0 -1
- package/dist/dts/testing/mocks/connect/connect.d.ts.map +1 -1
- package/dist/dts/testing/mocks/connect/socket.d.ts +2 -5
- package/dist/dts/testing/mocks/connect/socket.d.ts.map +1 -1
- package/dist/esm/auth/auth.js +5 -91
- package/dist/esm/connect/connect.js +4 -24
- package/dist/esm/connect/socket.js +86 -15
- package/dist/esm/testing/mocks/connect/connect.js +1 -2
- package/dist/esm/testing/mocks/connect/socket.js +1 -8
- package/dist/foundation-comms.api.json +2 -257
- package/dist/foundation-comms.d.ts +23 -52
- package/docs/api/foundation-comms.connect.md +0 -21
- package/docs/api/foundation-comms.defaultauth._constructor_.md +1 -15
- package/docs/api/foundation-comms.defaultauth.md +1 -20
- package/docs/api/foundation-comms.defaultconnect._constructor_.md +1 -15
- package/docs/api/foundation-comms.defaultconnect.md +1 -41
- package/docs/api/foundation-comms.defaultsocket.md +0 -12
- package/docs/api/foundation-comms.messagedetails.loggedinsysteminfo.md +0 -1
- package/docs/api/foundation-comms.rawdataserverresult.md +0 -1
- package/docs/api/foundation-comms.socket.md +0 -11
- package/docs/api-report.md.api.md +13 -32
- package/package.json +13 -13
- package/docs/api/foundation-comms.connect.sessionexpired_.md +0 -13
- package/docs/api/foundation-comms.defaultauth.reauth_action_lock_key.md +0 -11
- package/docs/api/foundation-comms.defaultconnect.sessionexpired_.md +0 -13
- package/docs/api/foundation-comms.defaultconnect.user.md +0 -11
- package/docs/api/foundation-comms.defaultsocket.updatesessionandsubscriptions.md +0 -50
- package/docs/api/foundation-comms.socket.updatesessionandsubscriptions.md +0 -52
|
@@ -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 '@genesislcap/foundation-utils';
|
|
15
|
+
import { Observer as Observer_2 } from 'rxjs';
|
|
16
16
|
import { SetUserProperties } from '@genesislcap/foundation-user';
|
|
17
17
|
import { Subscription as SocketSubscription } from 'rxjs';
|
|
18
18
|
import { Subject } from 'rxjs';
|
|
@@ -402,11 +402,6 @@ 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>;
|
|
410
405
|
/**
|
|
411
406
|
* @returns The host provided.
|
|
412
407
|
*/
|
|
@@ -591,7 +586,6 @@ export declare class ConnectMock implements Connect {
|
|
|
591
586
|
nextMessage: Message;
|
|
592
587
|
requestParams: RequestParams;
|
|
593
588
|
nextListState: any[];
|
|
594
|
-
sessionExpired$: BehaviorSubject<boolean>;
|
|
595
589
|
commitEvent(eventName: string, params?: CommitParams): Promise<Message>;
|
|
596
590
|
connect(host: string): Promise<boolean>;
|
|
597
591
|
disconnect(): void;
|
|
@@ -1759,33 +1753,16 @@ export declare class DefaultAuth implements Auth {
|
|
|
1759
1753
|
private messageBuilder;
|
|
1760
1754
|
private credentialManager;
|
|
1761
1755
|
currentUser: User_2;
|
|
1762
|
-
private socket;
|
|
1763
1756
|
isWorking: boolean;
|
|
1764
1757
|
loggedUserResult: LoginResult;
|
|
1765
1758
|
private loggedUserResultChanged;
|
|
1766
1759
|
private isLoggedInSubject;
|
|
1767
1760
|
get isLoggedIn$(): Observable<boolean>;
|
|
1768
1761
|
get isLoggedIn(): boolean;
|
|
1769
|
-
|
|
1770
|
-
constructor(session: Session, connect: Connect, messageBuilder: MessageBuilder, credentialManager: CredentialManager, currentUser: User_2, socket: Socket);
|
|
1762
|
+
constructor(session: Session, connect: Connect, messageBuilder: MessageBuilder, credentialManager: CredentialManager, currentUser: User_2);
|
|
1771
1763
|
login(credentials: AuthInfo): Promise<LoginResult>;
|
|
1772
1764
|
logout(): Promise<LogoutResult>;
|
|
1773
1765
|
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;
|
|
1789
1766
|
/**
|
|
1790
1767
|
* Ensures that the connection is active.
|
|
1791
1768
|
* @internal
|
|
@@ -1819,18 +1796,12 @@ export declare class DefaultConnect implements Connect {
|
|
|
1819
1796
|
private metaCache;
|
|
1820
1797
|
private events;
|
|
1821
1798
|
private config;
|
|
1822
|
-
protected user: User_2;
|
|
1823
1799
|
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>;
|
|
1829
1800
|
get isConnected(): boolean;
|
|
1830
1801
|
get isConnectedSubject(): BehaviorSubject<boolean>;
|
|
1831
1802
|
get isConnected$(): Observable<boolean>;
|
|
1832
1803
|
get host(): string;
|
|
1833
|
-
constructor(socket: Socket, messageBuilder: MessageBuilder, metaCache: MetaCache, events: ConnectEventsEmitter, config: ConnectConfig
|
|
1804
|
+
constructor(socket: Socket, messageBuilder: MessageBuilder, metaCache: MetaCache, events: ConnectEventsEmitter, config: ConnectConfig);
|
|
1834
1805
|
httpMode(): boolean;
|
|
1835
1806
|
/**
|
|
1836
1807
|
* @deprecated - Please reference `User` from `@genesislcap/foundation-user` instead.
|
|
@@ -1865,11 +1836,11 @@ export declare const defaultConnectConfig: ConnectConfig;
|
|
|
1865
1836
|
*/
|
|
1866
1837
|
export declare class DefaultConnectEvents implements ConnectEventsEmitter {
|
|
1867
1838
|
/** @internal */
|
|
1868
|
-
protected streamListeners:
|
|
1839
|
+
protected streamListeners: Observer<StreamEvent>;
|
|
1869
1840
|
/** @internal */
|
|
1870
|
-
protected streamCompleteListeners:
|
|
1841
|
+
protected streamCompleteListeners: Observer<StreamCompleteEvent>;
|
|
1871
1842
|
/** @internal */
|
|
1872
|
-
protected streamErrorListeners:
|
|
1843
|
+
protected streamErrorListeners: Observer<StreamErrorEvent>;
|
|
1873
1844
|
/** {@inheritDoc ConnectEvents.addStreamListener} */
|
|
1874
1845
|
addStreamListener(listener: Listener<StreamEvent>, complete: Listener<StreamCompleteEvent>, error: Listener<StreamErrorEvent>): () => void;
|
|
1875
1846
|
/** {@inheritDoc ConnectEventsEmitter.onStreamEvent} */
|
|
@@ -1879,19 +1850,19 @@ export declare class DefaultConnectEvents implements ConnectEventsEmitter {
|
|
|
1879
1850
|
/** {@inheritDoc ConnectEventsEmitter.onStreamCompleteEvent} */
|
|
1880
1851
|
onStreamCompleteEvent(resourceName: string, stream: SocketObservable<any>): void;
|
|
1881
1852
|
/** @internal */
|
|
1882
|
-
protected commitListeners:
|
|
1853
|
+
protected commitListeners: Observer<CommitEvent>;
|
|
1883
1854
|
/** {@inheritDoc ConnectEvents.addCommitListener} */
|
|
1884
1855
|
addCommitListener(listener: Listener<CommitEvent>): () => void;
|
|
1885
1856
|
/** {@inheritDoc ConnectEventsEmitter.onStreamEvent} */
|
|
1886
1857
|
onCommitEvent(eventName: string, message: Message): void;
|
|
1887
1858
|
/** @internal */
|
|
1888
|
-
protected metadataListeners:
|
|
1859
|
+
protected metadataListeners: Observer<MetadataEvent>;
|
|
1889
1860
|
/** {@inheritDoc ConnectEvents.addMetadataListener} */
|
|
1890
1861
|
addMetadataListener(listener: Listener<MetadataEvent>): () => void;
|
|
1891
1862
|
/** {@inheritDoc ConnectEventsEmitter.onMetadataEvent} */
|
|
1892
1863
|
onMetadataEvent(resourceName: string, message: Message<MessageDetails.MetaRequest>, error?: any): void;
|
|
1893
1864
|
/** @internal */
|
|
1894
|
-
protected commitResponseListeners:
|
|
1865
|
+
protected commitResponseListeners: Observer<CommitResponseEvent>;
|
|
1895
1866
|
/** {@inheritDoc ConnectEvents.addCommitResponseListener} */
|
|
1896
1867
|
addCommitResponseListener(listener: Listener<CommitResponseEvent>): () => void;
|
|
1897
1868
|
/** {@inheritDoc ConnectEventsEmitter.onCommitResponseEvent} */
|
|
@@ -2533,7 +2504,17 @@ export declare class DefaultSocket implements Socket {
|
|
|
2533
2504
|
private get heartbeatLoggingIsEnabled();
|
|
2534
2505
|
private get messageLoggingIsEnabled();
|
|
2535
2506
|
connect(host?: string, connectOptions?: SocketConnectOptions, reconnectOptions?: SocketReconnectOptions): Promise<boolean>;
|
|
2536
|
-
|
|
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;
|
|
2537
2518
|
private prepareHeartbeat;
|
|
2538
2519
|
private reconnect;
|
|
2539
2520
|
reset(): void;
|
|
@@ -3781,7 +3762,6 @@ export declare namespace MessageDetails {
|
|
|
3781
3762
|
NOTIFY_EXPIRY?: boolean;
|
|
3782
3763
|
PRODUCT?: any[];
|
|
3783
3764
|
SYSTEM?: any;
|
|
3784
|
-
SESSION_TIMEOUT_MINS?: number;
|
|
3785
3765
|
};
|
|
3786
3766
|
}
|
|
3787
3767
|
|
|
@@ -4147,7 +4127,6 @@ export declare type RawDataServerResult = {
|
|
|
4147
4127
|
MORE_ROWS: boolean;
|
|
4148
4128
|
ROWS_COUNT: number;
|
|
4149
4129
|
SEQUENCE_ID: number;
|
|
4150
|
-
LOGGED_OUT: boolean;
|
|
4151
4130
|
};
|
|
4152
4131
|
|
|
4153
4132
|
/**
|
|
@@ -4515,11 +4494,6 @@ export declare interface Socket extends Omit<SocketStatus, 'serialize' | 'onClos
|
|
|
4515
4494
|
sendForStreamWithoutTeardown<T>(message: Message<T | any>, onMessage: Function, onError: Function): Observable<Message>;
|
|
4516
4495
|
socketMessages(): SocketSubject<Message>;
|
|
4517
4496
|
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;
|
|
4523
4497
|
}
|
|
4524
4498
|
|
|
4525
4499
|
/**
|
|
@@ -4544,7 +4518,7 @@ export declare type SocketConnectOptions = {
|
|
|
4544
4518
|
/**
|
|
4545
4519
|
* An observer to receive notifications of incoming messages from the server.
|
|
4546
4520
|
*/
|
|
4547
|
-
connectObserver?:
|
|
4521
|
+
connectObserver?: Observer_2<Message>;
|
|
4548
4522
|
/**
|
|
4549
4523
|
* Enable sending heartbeat messages to the server to prevent the connection from timing out.
|
|
4550
4524
|
*/
|
|
@@ -4642,15 +4616,12 @@ export declare class SocketMock implements Socket {
|
|
|
4642
4616
|
host: string;
|
|
4643
4617
|
nextMessage: Message;
|
|
4644
4618
|
socketMessagesSubject: SocketSubject<Message>;
|
|
4645
|
-
sessionExpiredSubject: SocketSubject<PongMessage>;
|
|
4646
4619
|
connect(host: string, options?: SocketConnectOptions, reconnectOptions?: SocketReconnectOptions): Promise<boolean>;
|
|
4647
4620
|
disconnect(): void;
|
|
4648
4621
|
send<T>(message: Message<any>): Promise<Message | any>;
|
|
4649
4622
|
sendForStream<T>(message: Message<any>, onMessage: Function, onError: Function, onComplete?: Function): Observable<Message>;
|
|
4650
4623
|
sendForStreamWithoutTeardown<T>(message: Message<any>, onMessage: Function, onError: Function): Observable<Message>;
|
|
4651
4624
|
socketMessages(): SocketSubject<Message>;
|
|
4652
|
-
sessionExpired(): SocketObservable<PongMessage>;
|
|
4653
|
-
updateSessionAndSubscriptions(refreshToken: string): void;
|
|
4654
4625
|
reset(): void;
|
|
4655
4626
|
}
|
|
4656
4627
|
|
|
@@ -4682,7 +4653,7 @@ export declare type SocketReconnectOptions = {
|
|
|
4682
4653
|
* Observer to notify when reconnection occurs
|
|
4683
4654
|
* @public
|
|
4684
4655
|
*/
|
|
4685
|
-
reconnectObserver?:
|
|
4656
|
+
reconnectObserver?: Observer_2<any>;
|
|
4686
4657
|
/**
|
|
4687
4658
|
* Reconnect stream subscriptions on reconnection
|
|
4688
4659
|
* @public
|
|
@@ -133,27 +133,6 @@ 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
|
-
|
|
157
136
|
</td></tr>
|
|
158
137
|
</tbody></table>
|
|
159
138
|
|
|
@@ -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);
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Parameters
|
|
@@ -99,20 +99,6 @@ 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
|
-
|
|
116
102
|
</td></tr>
|
|
117
103
|
</tbody></table>
|
|
118
104
|
|
|
@@ -33,7 +33,7 @@ Description
|
|
|
33
33
|
</th></tr></thead>
|
|
34
34
|
<tbody><tr><td>
|
|
35
35
|
|
|
36
|
-
[(constructor)(session, connect, messageBuilder, credentialManager, currentUser
|
|
36
|
+
[(constructor)(session, connect, messageBuilder, credentialManager, currentUser)](./foundation-comms.defaultauth._constructor_.md)
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
</td><td>
|
|
@@ -158,25 +158,6 @@ 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
|
-
|
|
180
161
|
</td></tr>
|
|
181
162
|
</tbody></table>
|
|
182
163
|
|
|
@@ -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);
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Parameters
|
|
@@ -99,20 +99,6 @@ 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
|
-
|
|
116
102
|
</td></tr>
|
|
117
103
|
</tbody></table>
|
|
118
104
|
|
|
@@ -33,7 +33,7 @@ Description
|
|
|
33
33
|
</th></tr></thead>
|
|
34
34
|
<tbody><tr><td>
|
|
35
35
|
|
|
36
|
-
[(constructor)(socket, messageBuilder, metaCache, events, config
|
|
36
|
+
[(constructor)(socket, messageBuilder, metaCache, events, config)](./foundation-comms.defaultconnect._constructor_.md)
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
</td><td>
|
|
@@ -162,27 +162,6 @@ 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
|
-
|
|
186
165
|
</td></tr>
|
|
187
166
|
<tr><td>
|
|
188
167
|
|
|
@@ -200,25 +179,6 @@ Emits true when the session is detected as expired (e.g., IS\_AUTHENTICATED is f
|
|
|
200
179
|
</td><td>
|
|
201
180
|
|
|
202
181
|
|
|
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
|
-
|
|
222
182
|
</td></tr>
|
|
223
183
|
</tbody></table>
|
|
224
184
|
|
|
@@ -392,18 +392,6 @@ 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
|
-
|
|
407
395
|
</td></tr>
|
|
408
396
|
</tbody></table>
|
|
409
397
|
|
|
@@ -125,17 +125,6 @@ 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
|
-
|
|
139
128
|
</td></tr>
|
|
140
129
|
</tbody></table>
|
|
141
130
|
|
|
@@ -17,8 +17,8 @@ import { Listener } from '@genesislcap/foundation-utils';
|
|
|
17
17
|
import { Logger } from '@genesislcap/foundation-logger';
|
|
18
18
|
import type { LogLevel } from '@genesislcap/foundation-utils';
|
|
19
19
|
import { Observable } from 'rxjs';
|
|
20
|
-
import { Observer } from '
|
|
21
|
-
import { Observer as Observer_2 } from '
|
|
20
|
+
import { Observer } from '@genesislcap/foundation-utils';
|
|
21
|
+
import { Observer as Observer_2 } from 'rxjs';
|
|
22
22
|
import { SetUserProperties } from '@genesislcap/foundation-user';
|
|
23
23
|
import { Subscription as SocketSubscription } from 'rxjs';
|
|
24
24
|
import { Subject } from 'rxjs';
|
|
@@ -197,7 +197,6 @@ export interface Connect {
|
|
|
197
197
|
request(resourceName: string, params?: RequestParams): Promise<Message>;
|
|
198
198
|
// @internal
|
|
199
199
|
send<T>(message: Message<T | any>, needsHandling?: boolean): Promise<Message | any>;
|
|
200
|
-
readonly sessionExpired$?: Subject<boolean>;
|
|
201
200
|
// @internal
|
|
202
201
|
setValidSession(valid: boolean): void;
|
|
203
202
|
snapshot(resourceName: string, params?: DataserverParams): Promise<Message>;
|
|
@@ -347,8 +346,6 @@ export class ConnectMock implements Connect {
|
|
|
347
346
|
// (undocumented)
|
|
348
347
|
send<T>(message: Message<any>, needsHandling?: boolean): Promise<any>;
|
|
349
348
|
// (undocumented)
|
|
350
|
-
sessionExpired$: BehaviorSubject<boolean>;
|
|
351
|
-
// (undocumented)
|
|
352
349
|
setValidSession(valid: boolean): void;
|
|
353
350
|
// (undocumented)
|
|
354
351
|
snapshot(resourceName: string, params?: any): Promise<Message>;
|
|
@@ -1033,7 +1030,7 @@ export interface Dataview {
|
|
|
1033
1030
|
|
|
1034
1031
|
// @public
|
|
1035
1032
|
export class DefaultAuth implements Auth {
|
|
1036
|
-
constructor(session: Session, connect: Connect, messageBuilder: MessageBuilder, credentialManager: CredentialManager, currentUser: User_2
|
|
1033
|
+
constructor(session: Session, connect: Connect, messageBuilder: MessageBuilder, credentialManager: CredentialManager, currentUser: User_2);
|
|
1037
1034
|
// (undocumented)
|
|
1038
1035
|
currentUser: User_2;
|
|
1039
1036
|
// (undocumented)
|
|
@@ -1049,14 +1046,12 @@ export class DefaultAuth implements Auth {
|
|
|
1049
1046
|
// (undocumented)
|
|
1050
1047
|
logout(): Promise<LogoutResult>;
|
|
1051
1048
|
// (undocumented)
|
|
1052
|
-
static REAUTH_ACTION_LOCK_KEY: string;
|
|
1053
|
-
// (undocumented)
|
|
1054
1049
|
reAuthFromSession(): Promise<boolean>;
|
|
1055
1050
|
}
|
|
1056
1051
|
|
|
1057
1052
|
// @public
|
|
1058
1053
|
export class DefaultConnect implements Connect {
|
|
1059
|
-
constructor(socket: Socket, messageBuilder: MessageBuilder, metaCache: MetaCache, events: ConnectEventsEmitter, config: ConnectConfig
|
|
1054
|
+
constructor(socket: Socket, messageBuilder: MessageBuilder, metaCache: MetaCache, events: ConnectEventsEmitter, config: ConnectConfig);
|
|
1060
1055
|
// (undocumented)
|
|
1061
1056
|
commitEvent(eventName: string, params?: CommitParams): Promise<Message>;
|
|
1062
1057
|
// (undocumented)
|
|
@@ -1091,7 +1086,6 @@ export class DefaultConnect implements Connect {
|
|
|
1091
1086
|
request(resourceName: string, params?: RequestParams): Promise<Message>;
|
|
1092
1087
|
// (undocumented)
|
|
1093
1088
|
send<T>(message: Message<any>, needsHandling?: boolean): Promise<any>;
|
|
1094
|
-
readonly sessionExpired$: BehaviorSubject<boolean>;
|
|
1095
1089
|
// @deprecated (undocumented)
|
|
1096
1090
|
setValidSession(valid: boolean): void;
|
|
1097
1091
|
// (undocumented)
|
|
@@ -1104,8 +1098,6 @@ export class DefaultConnect implements Connect {
|
|
|
1104
1098
|
streamState(resourceName: string, onMessage?: Function, onError?: Function, params?: DataserverParams, initialState?: any[]): Observable<any[]>;
|
|
1105
1099
|
// (undocumented)
|
|
1106
1100
|
streamWithoutAutoTeardown(resourceName: string, onMessage: Function, onError: Function, params?: DataserverParams): SocketObservable<Message>;
|
|
1107
|
-
// (undocumented)
|
|
1108
|
-
protected user: User_2;
|
|
1109
1101
|
}
|
|
1110
1102
|
|
|
1111
1103
|
// @public
|
|
@@ -1130,11 +1122,11 @@ export class DefaultConnectEvents implements ConnectEventsEmitter {
|
|
|
1130
1122
|
// (undocumented)
|
|
1131
1123
|
addStreamListener(listener: Listener<StreamEvent>, complete: Listener<StreamCompleteEvent>, error: Listener<StreamErrorEvent>): () => void;
|
|
1132
1124
|
// @internal (undocumented)
|
|
1133
|
-
protected commitListeners:
|
|
1125
|
+
protected commitListeners: Observer<CommitEvent>;
|
|
1134
1126
|
// @internal (undocumented)
|
|
1135
|
-
protected commitResponseListeners:
|
|
1127
|
+
protected commitResponseListeners: Observer<CommitResponseEvent>;
|
|
1136
1128
|
// @internal (undocumented)
|
|
1137
|
-
protected metadataListeners:
|
|
1129
|
+
protected metadataListeners: Observer<MetadataEvent>;
|
|
1138
1130
|
// Warning: (ae-unresolved-inheritdoc-reference) The @inheritDoc reference could not be resolved: The reference is ambiguous because "ConnectEventsEmitter" has more than one declaration; you need to add a TSDoc member reference selector
|
|
1139
1131
|
//
|
|
1140
1132
|
// (undocumented)
|
|
@@ -1160,11 +1152,11 @@ export class DefaultConnectEvents implements ConnectEventsEmitter {
|
|
|
1160
1152
|
// (undocumented)
|
|
1161
1153
|
onStreamEvent(resourceName: string, message: Message<MessageDetails.DataserverRequest>, stream: SocketObservable<any>, functions: StreamEventFunctions): void;
|
|
1162
1154
|
// @internal (undocumented)
|
|
1163
|
-
protected streamCompleteListeners:
|
|
1155
|
+
protected streamCompleteListeners: Observer<StreamCompleteEvent>;
|
|
1164
1156
|
// @internal (undocumented)
|
|
1165
|
-
protected streamErrorListeners:
|
|
1157
|
+
protected streamErrorListeners: Observer<StreamErrorEvent>;
|
|
1166
1158
|
// @internal (undocumented)
|
|
1167
|
-
protected streamListeners:
|
|
1159
|
+
protected streamListeners: Observer<StreamEvent>;
|
|
1168
1160
|
}
|
|
1169
1161
|
|
|
1170
1162
|
// @public
|
|
@@ -1680,8 +1672,6 @@ export class DefaultSocket implements Socket {
|
|
|
1680
1672
|
sendForStreamWithoutTeardown<T>(message: Message<T | any>, onMessage: Function, onError: Function): Observable<Message>;
|
|
1681
1673
|
// (undocumented)
|
|
1682
1674
|
socketMessages: () => SocketSubject<Message>;
|
|
1683
|
-
// (undocumented)
|
|
1684
|
-
updateSessionAndSubscriptions(refreshTokenResult: string): void;
|
|
1685
1675
|
protected user: User_2;
|
|
1686
1676
|
}
|
|
1687
1677
|
|
|
@@ -2205,7 +2195,6 @@ export namespace MessageDetails {
|
|
|
2205
2195
|
NOTIFY_EXPIRY?: boolean;
|
|
2206
2196
|
PRODUCT?: any[];
|
|
2207
2197
|
SYSTEM?: any;
|
|
2208
|
-
SESSION_TIMEOUT_MINS?: number;
|
|
2209
2198
|
};
|
|
2210
2199
|
export type Login = LoginBasic | LoginSSO | LoginJWT;
|
|
2211
2200
|
export type LoginBasic = {
|
|
@@ -2436,7 +2425,6 @@ export type RawDataServerResult = {
|
|
|
2436
2425
|
MORE_ROWS: boolean;
|
|
2437
2426
|
ROWS_COUNT: number;
|
|
2438
2427
|
SEQUENCE_ID: number;
|
|
2439
|
-
LOGGED_OUT: boolean;
|
|
2440
2428
|
};
|
|
2441
2429
|
|
|
2442
2430
|
// @public
|
|
@@ -2662,7 +2650,6 @@ export interface Socket extends Omit<SocketStatus, 'serialize' | 'onClose' | 're
|
|
|
2662
2650
|
sendForStreamWithoutTeardown<T>(message: Message<T | any>, onMessage: Function, onError: Function): Observable<Message>;
|
|
2663
2651
|
// (undocumented)
|
|
2664
2652
|
socketMessages(): SocketSubject<Message>;
|
|
2665
|
-
updateSessionAndSubscriptions(refreshToken: string): void;
|
|
2666
2653
|
}
|
|
2667
2654
|
|
|
2668
2655
|
// @internal
|
|
@@ -2671,7 +2658,7 @@ export const Socket: InterfaceSymbol<Socket>;
|
|
|
2671
2658
|
// @public
|
|
2672
2659
|
export type SocketConnectOptions = {
|
|
2673
2660
|
alwaysOn?: boolean;
|
|
2674
|
-
connectObserver?:
|
|
2661
|
+
connectObserver?: Observer_2<Message>;
|
|
2675
2662
|
enableHeartbeat?: boolean;
|
|
2676
2663
|
enableHeartbeatLogging?: boolean;
|
|
2677
2664
|
enableMessageLogging?: boolean;
|
|
@@ -2728,15 +2715,9 @@ export class SocketMock implements Socket {
|
|
|
2728
2715
|
// (undocumented)
|
|
2729
2716
|
sendForStreamWithoutTeardown<T>(message: Message<any>, onMessage: Function, onError: Function): Observable<Message>;
|
|
2730
2717
|
// (undocumented)
|
|
2731
|
-
sessionExpired(): SocketObservable<PongMessage>;
|
|
2732
|
-
// (undocumented)
|
|
2733
|
-
sessionExpiredSubject: SocketSubject<PongMessage>;
|
|
2734
|
-
// (undocumented)
|
|
2735
2718
|
socketMessages(): SocketSubject<Message>;
|
|
2736
2719
|
// (undocumented)
|
|
2737
2720
|
socketMessagesSubject: SocketSubject<Message>;
|
|
2738
|
-
// (undocumented)
|
|
2739
|
-
updateSessionAndSubscriptions(refreshToken: string): void;
|
|
2740
2721
|
}
|
|
2741
2722
|
|
|
2742
2723
|
// @public
|
|
@@ -2748,7 +2729,7 @@ export class SocketObservable<T> extends Observable<T> {
|
|
|
2748
2729
|
export type SocketReconnectOptions = {
|
|
2749
2730
|
reconnectAttempts?: number;
|
|
2750
2731
|
reconnectInterval?: number;
|
|
2751
|
-
reconnectObserver?:
|
|
2732
|
+
reconnectObserver?: Observer_2<any>;
|
|
2752
2733
|
reconnectStreams?: boolean;
|
|
2753
2734
|
reconnectStrategy?: SocketReconnectStrategy;
|
|
2754
2735
|
};
|
|
@@ -2921,7 +2902,7 @@ export const WSConnect: InterfaceSymbol<Connect>;
|
|
|
2921
2902
|
|
|
2922
2903
|
// Warnings were encountered during analysis:
|
|
2923
2904
|
//
|
|
2924
|
-
// src/connect/message.ts:
|
|
2905
|
+
// src/connect/message.ts:291:3 - (ae-forgotten-export) The symbol "RESOURCE_DETAILS" needs to be exported by the entry point index.d.ts
|
|
2925
2906
|
|
|
2926
2907
|
// (No @packageDocumentation comment for this package)
|
|
2927
2908
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/foundation-comms",
|
|
3
3
|
"description": "Genesis Foundation UI Comms",
|
|
4
|
-
"version": "14.
|
|
4
|
+
"version": "14.307.1",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -75,23 +75,23 @@
|
|
|
75
75
|
}
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
|
-
"@genesislcap/foundation-testing": "14.
|
|
79
|
-
"@genesislcap/genx": "14.
|
|
80
|
-
"@genesislcap/rollup-builder": "14.
|
|
81
|
-
"@genesislcap/ts-builder": "14.
|
|
82
|
-
"@genesislcap/uvu-playwright-builder": "14.
|
|
83
|
-
"@genesislcap/vite-builder": "14.
|
|
84
|
-
"@genesislcap/webpack-builder": "14.
|
|
78
|
+
"@genesislcap/foundation-testing": "14.307.1",
|
|
79
|
+
"@genesislcap/genx": "14.307.1",
|
|
80
|
+
"@genesislcap/rollup-builder": "14.307.1",
|
|
81
|
+
"@genesislcap/ts-builder": "14.307.1",
|
|
82
|
+
"@genesislcap/uvu-playwright-builder": "14.307.1",
|
|
83
|
+
"@genesislcap/vite-builder": "14.307.1",
|
|
84
|
+
"@genesislcap/webpack-builder": "14.307.1",
|
|
85
85
|
"@types/js-cookie": "^3.0.2",
|
|
86
86
|
"@types/json-schema": "^7.0.11",
|
|
87
87
|
"@types/webappsec-credential-management": "^0.6.2",
|
|
88
88
|
"sinon": "^17.0.1"
|
|
89
89
|
},
|
|
90
90
|
"dependencies": {
|
|
91
|
-
"@genesislcap/foundation-broadcast-channel": "14.
|
|
92
|
-
"@genesislcap/foundation-logger": "14.
|
|
93
|
-
"@genesislcap/foundation-user": "14.
|
|
94
|
-
"@genesislcap/foundation-utils": "14.
|
|
91
|
+
"@genesislcap/foundation-broadcast-channel": "14.307.1",
|
|
92
|
+
"@genesislcap/foundation-logger": "14.307.1",
|
|
93
|
+
"@genesislcap/foundation-user": "14.307.1",
|
|
94
|
+
"@genesislcap/foundation-utils": "14.307.1",
|
|
95
95
|
"@microsoft/fast-element": "1.14.0",
|
|
96
96
|
"@microsoft/fast-foundation": "2.49.6",
|
|
97
97
|
"analytics": "0.8.16",
|
|
@@ -110,5 +110,5 @@
|
|
|
110
110
|
"publishConfig": {
|
|
111
111
|
"access": "public"
|
|
112
112
|
},
|
|
113
|
-
"gitHead": "
|
|
113
|
+
"gitHead": "3316d0415337b2bcb033eae8fcead5a550920cf9"
|
|
114
114
|
}
|