@genesislcap/foundation-comms 14.176.1-alpha-6ef4895.0 → 14.177.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/dts/auth/auth.d.ts +4 -4
- package/dist/dts/auth/auth.d.ts.map +1 -1
- package/dist/dts/auth/loginDTOMapper.d.ts +2 -0
- package/dist/dts/auth/loginDTOMapper.d.ts.map +1 -0
- package/dist/dts/connect/connect.d.ts +3 -0
- package/dist/dts/connect/connect.d.ts.map +1 -1
- package/dist/dts/connect/connect.events.d.ts +8 -3
- package/dist/dts/connect/connect.events.d.ts.map +1 -1
- package/dist/dts/connect/message.d.ts +42 -0
- package/dist/dts/connect/message.d.ts.map +1 -1
- package/dist/dts/connect/socket.d.ts +27 -4
- package/dist/dts/connect/socket.d.ts.map +1 -1
- package/dist/dts/connect/socket.status.d.ts +5 -1
- package/dist/dts/connect/socket.status.d.ts.map +1 -1
- package/dist/dts/networkMonitor/config.d.ts +13 -0
- package/dist/dts/networkMonitor/config.d.ts.map +1 -1
- package/dist/dts/networkMonitor/service.d.ts +11 -1
- package/dist/dts/networkMonitor/service.d.ts.map +1 -1
- package/dist/dts/storage/kv/kv.service.d.ts +19 -3
- package/dist/dts/storage/kv/kv.service.d.ts.map +1 -1
- package/dist/dts/testing/mocks/auth/auth.d.ts +2 -1
- package/dist/dts/testing/mocks/auth/auth.d.ts.map +1 -1
- package/dist/dts/user/user.d.ts +14 -43
- package/dist/dts/user/user.d.ts.map +1 -1
- package/dist/esm/auth/auth.js +19 -27
- package/dist/esm/auth/loginDTOMapper.js +49 -0
- package/dist/esm/connect/connect.events.js +5 -2
- package/dist/esm/connect/connect.js +6 -2
- package/dist/esm/connect/message.js +9 -0
- package/dist/esm/connect/socket.js +30 -22
- package/dist/esm/connect/socket.status.js +8 -4
- package/dist/esm/networkMonitor/config.js +2 -0
- package/dist/esm/networkMonitor/service.js +109 -29
- package/dist/esm/storage/kv/kv.service.js +26 -8
- package/dist/esm/user/user.js +11 -54
- package/dist/foundation-comms.api.json +559 -603
- package/dist/foundation-comms.d.ts +148 -55
- package/docs/api/foundation-comms.connecteventsemitter.md +1 -1
- package/docs/api/foundation-comms.connecteventsemitter.onstreamcompleteevent.md +2 -1
- package/docs/api/foundation-comms.currentuser.md +8 -25
- package/docs/api/foundation-comms.defaultauth._constructor_.md +2 -1
- package/docs/api/foundation-comms.defaultauth.md +2 -2
- package/docs/api/foundation-comms.defaultconnect.setvalidsession.md +5 -0
- package/docs/api/foundation-comms.defaultconnectevents.md +1 -1
- package/docs/api/foundation-comms.defaultconnectevents.onstreamcompleteevent.md +2 -1
- package/docs/api/foundation-comms.defaultmessagebuilder.createheartbeatpingmessage.md +22 -0
- package/docs/api/foundation-comms.defaultmessagebuilder.md +1 -0
- package/docs/api/foundation-comms.defaultnetworkmonitor._constructor_.md +13 -0
- package/docs/api/foundation-comms.defaultnetworkmonitor.md +6 -0
- package/docs/api/foundation-comms.defaultsocket._constructor_.md +3 -1
- package/docs/api/foundation-comms.defaultsocket.md +2 -1
- package/docs/api/foundation-comms.defaultsocket.user.md +13 -0
- package/docs/api/foundation-comms.defaultsocketstatus.hasvalidsession.md +1 -1
- package/docs/api/foundation-comms.defaultsocketstatus.md +2 -1
- package/docs/api/foundation-comms.defaultsocketstatus.user.md +11 -0
- package/docs/api/foundation-comms.getkvstorage.md +30 -0
- package/docs/api/foundation-comms.md +4 -0
- package/docs/api/foundation-comms.messagebuilder.createheartbeatpingmessage.md +22 -0
- package/docs/api/foundation-comms.messagebuilder.md +1 -0
- package/docs/api/foundation-comms.networkmonitorconfig.ignoredgenesisresources.md +13 -0
- package/docs/api/foundation-comms.networkmonitorconfig.loglevel.md +13 -0
- package/docs/api/foundation-comms.networkmonitorconfig.md +3 -0
- package/docs/api/foundation-comms.networkmonitorconfig.startdelay.md +13 -0
- package/docs/api/foundation-comms.pingmessage.md +17 -0
- package/docs/api/foundation-comms.pongmessage.md +20 -0
- package/docs/api/foundation-comms.serializedsocketstatus.hasvalidsession.md +5 -0
- package/docs/api/foundation-comms.socketconnectoptions.md +4 -1
- package/docs/api/foundation-comms.streamcompleteevent.md +2 -2
- package/docs/api/foundation-comms.streamcompleteeventdetail.md +14 -0
- package/docs/api/foundation-comms.user.md +7 -12
- package/docs/api-report.md +71 -54
- package/package.json +13 -11
- package/docs/api/foundation-comms.currentuser._constructor_.md +0 -20
- package/docs/api/foundation-comms.currentuser.hasadminprofile.md +0 -15
- package/docs/api/foundation-comms.currentuser.haspermission.md +0 -22
- package/docs/api/foundation-comms.currentuser.hasprofile.md +0 -22
- package/docs/api/foundation-comms.currentuser.permissions.md +0 -11
- package/docs/api/foundation-comms.currentuser.profiles.md +0 -11
- package/docs/api/foundation-comms.currentuser.set.md +0 -22
- package/docs/api/foundation-comms.currentuser.unset.md +0 -15
- package/docs/api/foundation-comms.currentuser.username.md +0 -11
- package/docs/api/foundation-comms.user.hasadminprofile.md +0 -15
- package/docs/api/foundation-comms.user.haspermission.md +0 -22
- package/docs/api/foundation-comms.user.hasprofile.md +0 -22
- package/docs/api/foundation-comms.user.set.md +0 -22
- package/docs/api/foundation-comms.user.unset.md +0 -15
@@ -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) > [DefaultSocket](./foundation-comms.defaultsocket.md) > [user](./foundation-comms.defaultsocket.user.md)
|
4
|
+
|
5
|
+
## DefaultSocket.user property
|
6
|
+
|
7
|
+
Temp putting the user in place to bridge the hasValidSession logic.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
protected user: User;
|
13
|
+
```
|
@@ -20,7 +20,7 @@ export declare class DefaultSocketStatus implements SocketStatus
|
|
20
20
|
| [closedClean](./foundation-comms.defaultsocketstatus.closedclean.md) | | any | |
|
21
21
|
| [closedCode](./foundation-comms.defaultsocketstatus.closedcode.md) | | any | |
|
22
22
|
| [closedReason](./foundation-comms.defaultsocketstatus.closedreason.md) | | any | |
|
23
|
-
| [hasValidSession](./foundation-comms.defaultsocketstatus.hasvalidsession.md) |
|
23
|
+
| [hasValidSession](./foundation-comms.defaultsocketstatus.hasvalidsession.md) | <code>readonly</code> | boolean | |
|
24
24
|
| [isConfigured](./foundation-comms.defaultsocketstatus.isconfigured.md) | | boolean | |
|
25
25
|
| [isConnected](./foundation-comms.defaultsocketstatus.isconnected.md) | | boolean | |
|
26
26
|
| [isConnectedSubject](./foundation-comms.defaultsocketstatus.isconnectedsubject.md) | | BehaviorSubject<boolean> | |
|
@@ -29,6 +29,7 @@ export declare class DefaultSocketStatus implements SocketStatus
|
|
29
29
|
| [isDisconnectedByServer](./foundation-comms.defaultsocketstatus.isdisconnectedbyserver.md) | <code>readonly</code> | boolean | |
|
30
30
|
| [isReconnecting](./foundation-comms.defaultsocketstatus.isreconnecting.md) | | boolean | |
|
31
31
|
| [reconnectionLimitReached](./foundation-comms.defaultsocketstatus.reconnectionlimitreached.md) | | boolean | |
|
32
|
+
| [user](./foundation-comms.defaultsocketstatus.user.md) | <code>protected</code> | User | |
|
32
33
|
|
33
34
|
## Methods
|
34
35
|
|
@@ -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) > [DefaultSocketStatus](./foundation-comms.defaultsocketstatus.md) > [user](./foundation-comms.defaultsocketstatus.user.md)
|
4
|
+
|
5
|
+
## DefaultSocketStatus.user property
|
6
|
+
|
7
|
+
**Signature:**
|
8
|
+
|
9
|
+
```typescript
|
10
|
+
protected user: User;
|
11
|
+
```
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [getKVStorage](./foundation-comms.getkvstorage.md)
|
4
|
+
|
5
|
+
## getKVStorage() function
|
6
|
+
|
7
|
+
Gets KVStorage from the DI container.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
export declare function getKVStorage(): KVStorage;
|
13
|
+
```
|
14
|
+
**Returns:**
|
15
|
+
|
16
|
+
KVStorage
|
17
|
+
|
18
|
+
## Remarks
|
19
|
+
|
20
|
+
A utility method for host applications that are not using decorators or the DI container.
|
21
|
+
|
22
|
+
## Example
|
23
|
+
|
24
|
+
|
25
|
+
```ts
|
26
|
+
import { getKVStorage } from '@genesislcap/foundation-comms';
|
27
|
+
...
|
28
|
+
private kvStorage = getKVStorage();
|
29
|
+
```
|
30
|
+
|
@@ -50,6 +50,7 @@
|
|
50
50
|
| [dataServerResultFilter(result, rowId)](./foundation-comms.dataserverresultfilter.md) | Data server result filter. |
|
51
51
|
| [getConnect()](./foundation-comms.getconnect.md) | Get Connect from the DI container. |
|
52
52
|
| [getDatasource()](./foundation-comms.getdatasource.md) | Get Datasource from the DI container. |
|
53
|
+
| [getKVStorage()](./foundation-comms.getkvstorage.md) | Gets KVStorage from the DI container. |
|
53
54
|
| [getNetworkMonitor()](./foundation-comms.getnetworkmonitor.md) | Gets NetworkMonitor from the DI container. |
|
54
55
|
| [getSocket()](./foundation-comms.getsocket.md) | Gets Socket from the DI container. |
|
55
56
|
| [getSocketStatus()](./foundation-comms.getsocketstatus.md) | Gets SocketStatus from the DI container. |
|
@@ -159,6 +160,8 @@
|
|
159
160
|
| [MonitoredResource](./foundation-comms.monitoredresource.md) | MonitoredResource. |
|
160
161
|
| [MonitoredResourceChecks](./foundation-comms.monitoredresourcechecks.md) | MonitoredResourceChecks. |
|
161
162
|
| [MonitoredResourceDataLogon](./foundation-comms.monitoredresourcedatalogon.md) | MonitoredResourceDataLogon. |
|
163
|
+
| [PingMessage](./foundation-comms.pingmessage.md) | |
|
164
|
+
| [PongMessage](./foundation-comms.pongmessage.md) | |
|
162
165
|
| [RawDataServerResult](./foundation-comms.rawdataserverresult.md) | Raw result from a DATASERVER data fetch. |
|
163
166
|
| [RefreshAuthInfo](./foundation-comms.refreshauthinfo.md) | Represents refresh token authentication information. |
|
164
167
|
| [RefreshCredentialsInput](./foundation-comms.refreshcredentialsinput.md) | Represents refresh credentials for a user. |
|
@@ -175,6 +178,7 @@
|
|
175
178
|
| [SSOCredentialsInput](./foundation-comms.ssocredentialsinput.md) | Represents SSO credentials for a user. |
|
176
179
|
| [StorageType](./foundation-comms.storagetype.md) | The available browser storage types. |
|
177
180
|
| [StreamCompleteEvent](./foundation-comms.streamcompleteevent.md) | |
|
181
|
+
| [StreamCompleteEventDetail](./foundation-comms.streamcompleteeventdetail.md) | |
|
178
182
|
| [StreamEvent](./foundation-comms.streamevent.md) | |
|
179
183
|
| [StreamEventDetail](./foundation-comms.streameventdetail.md) | |
|
180
184
|
| [StreamEventFunctions](./foundation-comms.streameventfunctions.md) | |
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [MessageBuilder](./foundation-comms.messagebuilder.md) > [createHeartbeatPingMessage](./foundation-comms.messagebuilder.createheartbeatpingmessage.md)
|
4
|
+
|
5
|
+
## MessageBuilder.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 | A flag to inform the backend you require a verbose response. |
|
18
|
+
|
19
|
+
**Returns:**
|
20
|
+
|
21
|
+
[PingMessage](./foundation-comms.pingmessage.md)
|
22
|
+
|
@@ -22,6 +22,7 @@ export interface MessageBuilder
|
|
22
22
|
| [createDataLogonMessage(resourceName, params)](./foundation-comms.messagebuilder.createdatalogonmessage.md) | Creates a message to logon to a DATASERVER. Used for data fetching. |
|
23
23
|
| [createForgotPasswordMessage(username, returnUrl, requester)](./foundation-comms.messagebuilder.createforgotpasswordmessage.md) | Creates a forgot password message. |
|
24
24
|
| [createForgotPasswordTokenMessage(username, resetToken, newPassword, requester)](./foundation-comms.messagebuilder.createforgotpasswordtokenmessage.md) | Creates a forgot password token message. |
|
25
|
+
| [createHeartbeatPingMessage(verbose)](./foundation-comms.messagebuilder.createheartbeatpingmessage.md) | |
|
25
26
|
| [createHTTPHeadersFromMessage(message, contentType)](./foundation-comms.messagebuilder.createhttpheadersfrommessage.md) | Create HTTP Headers from a message. |
|
26
27
|
| [createLoginMessage(credentials)](./foundation-comms.messagebuilder.createloginmessage.md) | Creates a login message. |
|
27
28
|
| [createLogoutMessage(loginResult)](./foundation-comms.messagebuilder.createlogoutmessage.md) | Creates a logout message. |
|
@@ -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) > [NetworkMonitorConfig](./foundation-comms.networkmonitorconfig.md) > [ignoredGenesisResources](./foundation-comms.networkmonitorconfig.ignoredgenesisresources.md)
|
4
|
+
|
5
|
+
## NetworkMonitorConfig.ignoredGenesisResources property
|
6
|
+
|
7
|
+
Ignored Genesis resources that will NOT invoke checks
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
ignoredGenesisResources?: string[];
|
13
|
+
```
|
@@ -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) > [NetworkMonitorConfig](./foundation-comms.networkmonitorconfig.md) > [logLevel](./foundation-comms.networkmonitorconfig.loglevel.md)
|
4
|
+
|
5
|
+
## NetworkMonitorConfig.logLevel property
|
6
|
+
|
7
|
+
Default log level
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
logLevel?: LogLevel;
|
13
|
+
```
|
@@ -21,7 +21,10 @@ export interface NetworkMonitorConfig
|
|
21
21
|
| [documentEvents?](./foundation-comms.networkmonitorconfig.documentevents.md) | | (keyof DocumentEventMap)\[\] | _(Optional)_ Document events that invoke checks |
|
22
22
|
| [eventEmitter?](./foundation-comms.networkmonitorconfig.eventemitter.md) | | HTMLElement | _(Optional)_ The element to emit events from |
|
23
23
|
| [genesisConnectEvents?](./foundation-comms.networkmonitorconfig.genesisconnectevents.md) | | [GenesisConnectEvents](./foundation-comms.genesisconnectevents.md)<!-- -->\[\] | _(Optional)_ Genesis connect events that invoke checks |
|
24
|
+
| [ignoredGenesisResources?](./foundation-comms.networkmonitorconfig.ignoredgenesisresources.md) | | string\[\] | _(Optional)_ Ignored Genesis resources that will NOT invoke checks |
|
25
|
+
| [logLevel?](./foundation-comms.networkmonitorconfig.loglevel.md) | | LogLevel | _(Optional)_ Default log level |
|
24
26
|
| [resourceChecks?](./foundation-comms.networkmonitorconfig.resourcechecks.md) | | [MonitoredResourceChecks](./foundation-comms.monitoredresourcechecks.md) | _(Optional)_ Default resource checks function |
|
25
27
|
| [resourceDataLogon?](./foundation-comms.networkmonitorconfig.resourcedatalogon.md) | | [MonitoredResourceDataLogon](./foundation-comms.monitoredresourcedatalogon.md) | _(Optional)_ Default resource data logon function |
|
28
|
+
| [startDelay?](./foundation-comms.networkmonitorconfig.startdelay.md) | | number | _(Optional)_ Start delay in ms |
|
26
29
|
| [windowEvents?](./foundation-comms.networkmonitorconfig.windowevents.md) | | (keyof WindowEventHandlersEventMap)\[\] | _(Optional)_ Window events that invoke checks |
|
27
30
|
|
@@ -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) > [NetworkMonitorConfig](./foundation-comms.networkmonitorconfig.md) > [startDelay](./foundation-comms.networkmonitorconfig.startdelay.md)
|
4
|
+
|
5
|
+
## NetworkMonitorConfig.startDelay property
|
6
|
+
|
7
|
+
Start delay in ms
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
startDelay?: number;
|
13
|
+
```
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [PingMessage](./foundation-comms.pingmessage.md)
|
4
|
+
|
5
|
+
## PingMessage type
|
6
|
+
|
7
|
+
|
8
|
+
**Signature:**
|
9
|
+
|
10
|
+
```typescript
|
11
|
+
export type PingMessage = Pick<Message, 'MESSAGE_TYPE' | 'SOURCE_REF' | 'DETAILS'> & {
|
12
|
+
VERBOSE?: boolean;
|
13
|
+
[key: string]: any;
|
14
|
+
};
|
15
|
+
```
|
16
|
+
**References:** [Message](./foundation-comms.message.md)
|
17
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [PongMessage](./foundation-comms.pongmessage.md)
|
4
|
+
|
5
|
+
## PongMessage type
|
6
|
+
|
7
|
+
|
8
|
+
**Signature:**
|
9
|
+
|
10
|
+
```typescript
|
11
|
+
export type PongMessage = Pick<Message, 'MESSAGE_TYPE' | 'SOURCE_REF' | 'USER_NAME'> & {
|
12
|
+
IS_AUTHENTICATED?: boolean;
|
13
|
+
CREATED_AT?: number;
|
14
|
+
LAST_RECEIVED?: number;
|
15
|
+
LAST_SENT?: number;
|
16
|
+
RESOURCES?: Record<string, RESOURCE_DETAILS[]>;
|
17
|
+
};
|
18
|
+
```
|
19
|
+
**References:** [Message](./foundation-comms.message.md)
|
20
|
+
|
@@ -16,8 +16,11 @@ export type SocketConnectOptions = {
|
|
16
16
|
enableHeartbeatLogging?: boolean;
|
17
17
|
enableMessageLogging?: boolean;
|
18
18
|
heartbeatInterval?: number;
|
19
|
+
verboseHeartbeat?: boolean;
|
20
|
+
heartbeatPingCallback?: (message: PingMessage) => void;
|
21
|
+
heartbeatPongCallback?: (message: PongMessage) => void;
|
19
22
|
proxyPath?: string;
|
20
23
|
};
|
21
24
|
```
|
22
|
-
**References:** [Message](./foundation-comms.message.md)
|
25
|
+
**References:** [Message](./foundation-comms.message.md)<!-- -->, [PingMessage](./foundation-comms.pingmessage.md)<!-- -->, [PongMessage](./foundation-comms.pongmessage.md)
|
23
26
|
|
@@ -8,7 +8,7 @@
|
|
8
8
|
**Signature:**
|
9
9
|
|
10
10
|
```typescript
|
11
|
-
export type StreamCompleteEvent = CustomEvent<
|
11
|
+
export type StreamCompleteEvent = CustomEvent<StreamCompleteEventDetail>;
|
12
12
|
```
|
13
|
-
**References:** [
|
13
|
+
**References:** [StreamCompleteEventDetail](./foundation-comms.streamcompleteeventdetail.md)
|
14
14
|
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [StreamCompleteEventDetail](./foundation-comms.streamcompleteeventdetail.md)
|
4
|
+
|
5
|
+
## StreamCompleteEventDetail type
|
6
|
+
|
7
|
+
|
8
|
+
**Signature:**
|
9
|
+
|
10
|
+
```typescript
|
11
|
+
export type StreamCompleteEventDetail = Pick<StreamEventDetail, 'resourceName' | 'stream'>;
|
12
|
+
```
|
13
|
+
**References:** [StreamEventDetail](./foundation-comms.streameventdetail.md)
|
14
|
+
|
@@ -4,22 +4,17 @@
|
|
4
4
|
|
5
5
|
## User interface
|
6
6
|
|
7
|
+
> Warning: This API is now obsolete.
|
8
|
+
>
|
9
|
+
> - Use instead.
|
10
|
+
>
|
11
|
+
|
7
12
|
Represents a User object with associated permissions and profiles.
|
8
13
|
|
9
14
|
**Signature:**
|
10
15
|
|
11
16
|
```typescript
|
12
|
-
export interface User extends
|
17
|
+
export interface User extends NextUser
|
13
18
|
```
|
14
|
-
**Extends:**
|
15
|
-
|
16
|
-
## Methods
|
17
|
-
|
18
|
-
| Method | Description |
|
19
|
-
| --- | --- |
|
20
|
-
| [hasAdminProfile()](./foundation-comms.user.hasadminprofile.md) | |
|
21
|
-
| [hasPermission(permission)](./foundation-comms.user.haspermission.md) | |
|
22
|
-
| [hasProfile(profile)](./foundation-comms.user.hasprofile.md) | |
|
23
|
-
| [set(options)](./foundation-comms.user.set.md) | |
|
24
|
-
| [unset()](./foundation-comms.user.unset.md) | |
|
19
|
+
**Extends:** NextUser
|
25
20
|
|
package/docs/api-report.md
CHANGED
@@ -8,17 +8,20 @@
|
|
8
8
|
|
9
9
|
import { BehaviorSubject } from 'rxjs';
|
10
10
|
import { default as Bowser_2 } from 'bowser';
|
11
|
+
import { DefaultUser } from '@genesislcap/foundation-user';
|
11
12
|
import type { DTOMapper } from '@genesislcap/foundation-utils';
|
12
13
|
import { InterfaceSymbol } from '@microsoft/fast-foundation';
|
13
14
|
import { JSONSchema7 } from 'json-schema';
|
14
15
|
import { JSONSerializer } from '@genesislcap/foundation-utils';
|
15
16
|
import { Listener } from '@genesislcap/foundation-utils';
|
16
17
|
import { Logger } from '@genesislcap/foundation-logger';
|
18
|
+
import type { LogLevel } from '@genesislcap/foundation-utils';
|
17
19
|
import { Observable } from 'rxjs';
|
18
20
|
import { Observer } from '@genesislcap/foundation-utils';
|
19
21
|
import { Observer as Observer_2 } from 'rxjs';
|
20
22
|
import { Subscription as SocketSubscription } from 'rxjs';
|
21
23
|
import { Subject } from 'rxjs';
|
24
|
+
import { User as User_2 } from '@genesislcap/foundation-user';
|
22
25
|
import { UUID } from '@genesislcap/foundation-utils';
|
23
26
|
|
24
27
|
// Warning: (ae-internal-mixed-release-tag) Mixed release tags are not allowed for "Auth" because one of its declarations is marked as @internal
|
@@ -26,7 +29,7 @@ import { UUID } from '@genesislcap/foundation-utils';
|
|
26
29
|
// @public
|
27
30
|
export interface Auth {
|
28
31
|
// @internal
|
29
|
-
readonly currentUser:
|
32
|
+
readonly currentUser: User_2;
|
30
33
|
readonly isLoggedIn$?: Observable<boolean>;
|
31
34
|
readonly isLoggedIn: boolean;
|
32
35
|
isWorking: boolean;
|
@@ -69,7 +72,7 @@ export type AuthInfo = BasicAuthInfo | SsoAuthInfo | JwtAuthInfo | RefreshAuthIn
|
|
69
72
|
// @internal (undocumented)
|
70
73
|
export class AuthMock implements Auth {
|
71
74
|
// (undocumented)
|
72
|
-
currentUser:
|
75
|
+
currentUser: User_2;
|
73
76
|
// (undocumented)
|
74
77
|
isLoggedIn: boolean;
|
75
78
|
// (undocumented)
|
@@ -197,7 +200,7 @@ export const ConnectEvents: InterfaceSymbol<ConnectEvents>;
|
|
197
200
|
export interface ConnectEventsEmitter extends ConnectEvents {
|
198
201
|
onCommitEvent(eventName: string, message: Message): void;
|
199
202
|
onMetadataEvent(resourceName: string, message: Message<MessageDetails.MetaRequest>, error?: any): void;
|
200
|
-
onStreamCompleteEvent(stream: SocketObservable<any>): void;
|
203
|
+
onStreamCompleteEvent(resourceName: string, stream: SocketObservable<any>): void;
|
201
204
|
onStreamEvent(resourceName: string, message: Message<MessageDetails.DataserverRequest>, stream: SocketObservable<any>, functions: StreamEventFunctions): void;
|
202
205
|
}
|
203
206
|
|
@@ -340,30 +343,8 @@ export const credentialSeparator = ":";
|
|
340
343
|
// @public
|
341
344
|
export function criteriaFiltersToFields(filters: string): Record<string, string>;
|
342
345
|
|
343
|
-
// @public
|
344
|
-
export class CurrentUser implements User {
|
345
|
-
// Warning: (ae-forgotten-export) The symbol "UserOptions" needs to be exported by the entry point index.d.ts
|
346
|
-
constructor(options: UserOptions);
|
347
|
-
// (undocumented)
|
348
|
-
hasAdminProfile(): boolean;
|
349
|
-
// (undocumented)
|
350
|
-
hasPermission(permission: string | string[]): boolean;
|
351
|
-
// (undocumented)
|
352
|
-
hasProfile(profile: string | string[]): boolean;
|
353
|
-
// Warning: (ae-incompatible-release-tags) The symbol "permissions" is marked as @public, but its signature references "UserPermission" which is marked as @internal
|
354
|
-
//
|
355
|
-
// (undocumented)
|
356
|
-
permissions: UserPermission[];
|
357
|
-
// Warning: (ae-incompatible-release-tags) The symbol "profiles" is marked as @public, but its signature references "UserProfile" which is marked as @internal
|
358
|
-
//
|
359
|
-
// (undocumented)
|
360
|
-
profiles: UserProfile[];
|
361
|
-
// (undocumented)
|
362
|
-
set(options: UserOptions): void;
|
363
|
-
// (undocumented)
|
364
|
-
unset(): void;
|
365
|
-
// (undocumented)
|
366
|
-
username: string;
|
346
|
+
// @public @deprecated
|
347
|
+
export class CurrentUser extends DefaultUser implements User {
|
367
348
|
}
|
368
349
|
|
369
350
|
// @public
|
@@ -512,9 +493,9 @@ export interface Dataview {
|
|
512
493
|
|
513
494
|
// @public
|
514
495
|
export class DefaultAuth implements Auth {
|
515
|
-
constructor(session: Session, connect: Connect, messageBuilder: MessageBuilder, credentialManager: CredentialManager);
|
496
|
+
constructor(session: Session, connect: Connect, messageBuilder: MessageBuilder, credentialManager: CredentialManager, currentUser: User_2);
|
516
497
|
// (undocumented)
|
517
|
-
currentUser:
|
498
|
+
currentUser: User_2;
|
518
499
|
// (undocumented)
|
519
500
|
get isLoggedIn$(): Observable<boolean>;
|
520
501
|
// (undocumented)
|
@@ -566,7 +547,7 @@ export class DefaultConnect implements Connect {
|
|
566
547
|
request(resourceName: string, params?: RequestParams): Promise<Message>;
|
567
548
|
// (undocumented)
|
568
549
|
send<T>(message: Message<any>, needsHandling?: boolean): Promise<any>;
|
569
|
-
// (undocumented)
|
550
|
+
// @deprecated (undocumented)
|
570
551
|
setValidSession(valid: boolean): void;
|
571
552
|
// (undocumented)
|
572
553
|
snapshot(resourceName: string, params?: any): Promise<Message>;
|
@@ -608,7 +589,7 @@ export class DefaultConnectEvents implements ConnectEventsEmitter {
|
|
608
589
|
// 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
|
609
590
|
//
|
610
591
|
// (undocumented)
|
611
|
-
onStreamCompleteEvent(stream: SocketObservable<any>): void;
|
592
|
+
onStreamCompleteEvent(resourceName: string, stream: SocketObservable<any>): void;
|
612
593
|
// 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
|
613
594
|
//
|
614
595
|
// (undocumented)
|
@@ -845,11 +826,13 @@ export const defaultHttpConnectConfig: HttpConnectConfig;
|
|
845
826
|
|
846
827
|
// @alpha
|
847
828
|
export class DefaultKVStorage implements KVStorage {
|
848
|
-
constructor(connect: Connect,
|
829
|
+
constructor(connect: Connect, user: User_2, kvStorageConfig?: KVStorageConfig);
|
849
830
|
delete(keys: string[]): Promise<true | KVEventFailureResponse>;
|
850
831
|
get<T = KVValue>(key?: string): Promise<KeyValueTransfer<T>[]>;
|
851
832
|
list(): Promise<string[]>;
|
852
833
|
put(kvs: KeyValue<KVValue>[]): Promise<true | KVEventFailureResponse>;
|
834
|
+
// (undocumented)
|
835
|
+
protected user: User_2;
|
853
836
|
}
|
854
837
|
|
855
838
|
// @alpha
|
@@ -870,6 +853,10 @@ export class DefaultMessageBuilder implements MessageBuilder {
|
|
870
853
|
createForgotPasswordMessage(username: string, returnUrl: string, requester?: string): Message<MessageDetails.ForgotPassword>;
|
871
854
|
// (undocumented)
|
872
855
|
createForgotPasswordTokenMessage(username: string, resetToken: string, newPassword: string, requester?: string): Message<MessageDetails.ForgotPasswordToken>;
|
856
|
+
// Warning: (ae-unresolved-inheritdoc-reference) The @inheritDoc reference could not be resolved: The reference is ambiguous because "MessageBuilder" has more than one declaration; you need to add a TSDoc member reference selector
|
857
|
+
//
|
858
|
+
// (undocumented)
|
859
|
+
createHeartbeatPingMessage(verbose?: boolean): PingMessage;
|
873
860
|
// (undocumented)
|
874
861
|
createHTTPHeadersFromMessage(message: Message, contentType?: string): HeadersInit;
|
875
862
|
// (undocumented)
|
@@ -912,6 +899,7 @@ export class DefaultMetaCache implements MetaCache {
|
|
912
899
|
|
913
900
|
// @public
|
914
901
|
export class DefaultNetworkMonitor implements NetworkMonitor {
|
902
|
+
constructor();
|
915
903
|
// @internal (undocumented)
|
916
904
|
protected addListeners(): void;
|
917
905
|
// Warning: (ae-unresolved-inheritdoc-reference) The @inheritDoc reference could not be resolved: The reference is ambiguous because "NetworkMonitor" has more than one declaration; you need to add a TSDoc member reference selector
|
@@ -941,6 +929,8 @@ export class DefaultNetworkMonitor implements NetworkMonitor {
|
|
941
929
|
// @internal (undocumented)
|
942
930
|
protected isOnlineCheck(): Promise<boolean>;
|
943
931
|
// @internal (undocumented)
|
932
|
+
protected isReady: boolean;
|
933
|
+
// @internal (undocumented)
|
944
934
|
protected isRunningChecks: boolean;
|
945
935
|
// @internal (undocumented)
|
946
936
|
protected normaliseEventDetail(detail: Partial<SystemHealthStatus>): SystemHealthStatus;
|
@@ -949,6 +939,8 @@ export class DefaultNetworkMonitor implements NetworkMonitor {
|
|
949
939
|
// @internal (undocumented)
|
950
940
|
protected normaliseSerializedSocketStatus(socketStatus: SerializedSocketStatus, isOnline?: boolean): SerializedSocketStatus;
|
951
941
|
// @internal (undocumented)
|
942
|
+
protected preFlightSocketChecks(status: SerializedSocketStatus): boolean;
|
943
|
+
// @internal (undocumented)
|
952
944
|
protected removeListeners(): void;
|
953
945
|
// Warning: (ae-unresolved-inheritdoc-reference) The @inheritDoc reference could not be resolved: The reference is ambiguous because "NetworkMonitor" has more than one declaration; you need to add a TSDoc member reference selector
|
954
946
|
//
|
@@ -975,7 +967,7 @@ export class DefaultNetworkMonitor implements NetworkMonitor {
|
|
975
967
|
// @internal (undocumented)
|
976
968
|
protected unsubscribableObservers: any[];
|
977
969
|
// @internal (undocumented)
|
978
|
-
protected user:
|
970
|
+
protected user: User_2;
|
979
971
|
}
|
980
972
|
|
981
973
|
// @public
|
@@ -1017,7 +1009,8 @@ export class DefaultSession implements Session {
|
|
1017
1009
|
|
1018
1010
|
// @public
|
1019
1011
|
export class DefaultSocket implements Socket {
|
1020
|
-
constructor(messageBuilder: MessageBuilder, session: Session, serializer: JSONSerializer, uuid: UUID, status: SocketStatus
|
1012
|
+
constructor(messageBuilder: MessageBuilder, session: Session, serializer: JSONSerializer, uuid: UUID, status: SocketStatus,
|
1013
|
+
user: User_2);
|
1021
1014
|
// (undocumented)
|
1022
1015
|
connect(host: string, connectOptions?: SocketConnectOptions, reconnectOptions?: SocketReconnectOptions): Promise<boolean>;
|
1023
1016
|
// (undocumented)
|
@@ -1045,6 +1038,7 @@ export class DefaultSocket implements Socket {
|
|
1045
1038
|
sendForStream<T>(message: Message<T | any>, onMessage: Function, onError: Function, onComplete?: Function): Observable<Message>;
|
1046
1039
|
// (undocumented)
|
1047
1040
|
socketMessages: () => SocketSubject<Message>;
|
1041
|
+
protected user: User_2;
|
1048
1042
|
}
|
1049
1043
|
|
1050
1044
|
// @public
|
@@ -1056,7 +1050,7 @@ export class DefaultSocketStatus implements SocketStatus {
|
|
1056
1050
|
// (undocumented)
|
1057
1051
|
closedReason: any;
|
1058
1052
|
// (undocumented)
|
1059
|
-
hasValidSession: boolean;
|
1053
|
+
get hasValidSession(): boolean;
|
1060
1054
|
// (undocumented)
|
1061
1055
|
isConfigured: boolean;
|
1062
1056
|
// (undocumented)
|
@@ -1083,6 +1077,8 @@ export class DefaultSocketStatus implements SocketStatus {
|
|
1083
1077
|
protected resetClosedState(): void;
|
1084
1078
|
// (undocumented)
|
1085
1079
|
serialize(): SerializedSocketStatus;
|
1080
|
+
// (undocumented)
|
1081
|
+
protected user: User_2;
|
1086
1082
|
}
|
1087
1083
|
|
1088
1084
|
// Warning: (ae-internal-mixed-release-tag) Mixed release tags are not allowed for "EntityDatasource" because one of its declarations is marked as @internal
|
@@ -1232,6 +1228,11 @@ export type GetCredentialOptions = CredentialRequestOptions & {};
|
|
1232
1228
|
// @public
|
1233
1229
|
export function getDatasource(): Datasource;
|
1234
1230
|
|
1231
|
+
// Warning: (ae-incompatible-release-tags) The symbol "getKVStorage" is marked as @public, but its signature references "KVStorage" which is marked as @alpha
|
1232
|
+
//
|
1233
|
+
// @public
|
1234
|
+
export function getKVStorage(): KVStorage;
|
1235
|
+
|
1235
1236
|
// @public
|
1236
1237
|
export function getNetworkMonitor(): NetworkMonitor;
|
1237
1238
|
|
@@ -1447,6 +1448,8 @@ export interface MessageBuilder {
|
|
1447
1448
|
createDataLogonMessage(resourceName: string, params?: any): Message<MessageDetails.DataserverRequest>;
|
1448
1449
|
createForgotPasswordMessage(username: string, returnUrl: string, requester?: string): Message<MessageDetails.ForgotPassword>;
|
1449
1450
|
createForgotPasswordTokenMessage(username: string, resetToken: string, newPassword: string, requester?: string): Message<MessageDetails.ForgotPasswordToken>;
|
1451
|
+
// (undocumented)
|
1452
|
+
createHeartbeatPingMessage(verbose: boolean): PingMessage;
|
1450
1453
|
createHTTPHeadersFromMessage(message: Message, contentType?: string): HeadersInit;
|
1451
1454
|
createLoginMessage(credentials: AuthInfo): Message<MessageDetails.Login>;
|
1452
1455
|
createLogoutMessage(loginResult?: LoginResult): Message;
|
@@ -1688,8 +1691,11 @@ export interface NetworkMonitorConfig {
|
|
1688
1691
|
documentEvents?: (keyof DocumentEventMap)[];
|
1689
1692
|
eventEmitter?: HTMLElement;
|
1690
1693
|
genesisConnectEvents?: GenesisConnectEvents[];
|
1694
|
+
ignoredGenesisResources?: string[];
|
1695
|
+
logLevel?: LogLevel;
|
1691
1696
|
resourceChecks?: MonitoredResourceChecks;
|
1692
1697
|
resourceDataLogon?: MonitoredResourceDataLogon;
|
1698
|
+
startDelay?: number;
|
1693
1699
|
windowEvents?: (keyof WindowEventHandlersEventMap)[];
|
1694
1700
|
}
|
1695
1701
|
|
@@ -1699,6 +1705,12 @@ export const NetworkMonitorConfig: InterfaceSymbol<NetworkMonitorConfig>;
|
|
1699
1705
|
// @public
|
1700
1706
|
export function normaliseCriteria(criteria: string, delimiter?: string): string;
|
1701
1707
|
|
1708
|
+
// @public (undocumented)
|
1709
|
+
export type PingMessage = Pick<Message, 'MESSAGE_TYPE' | 'SOURCE_REF' | 'DETAILS'> & {
|
1710
|
+
VERBOSE?: boolean;
|
1711
|
+
[key: string]: any;
|
1712
|
+
};
|
1713
|
+
|
1702
1714
|
// @public
|
1703
1715
|
export interface PollingConfiguration {
|
1704
1716
|
AMOUNT_OF_POLLS: number;
|
@@ -1706,6 +1718,15 @@ export interface PollingConfiguration {
|
|
1706
1718
|
TEMP_FREQUENCY: number;
|
1707
1719
|
}
|
1708
1720
|
|
1721
|
+
// @public (undocumented)
|
1722
|
+
export type PongMessage = Pick<Message, 'MESSAGE_TYPE' | 'SOURCE_REF' | 'USER_NAME'> & {
|
1723
|
+
IS_AUTHENTICATED?: boolean;
|
1724
|
+
CREATED_AT?: number;
|
1725
|
+
LAST_RECEIVED?: number;
|
1726
|
+
LAST_SENT?: number;
|
1727
|
+
RESOURCES?: Record<string, RESOURCE_DETAILS[]>;
|
1728
|
+
};
|
1729
|
+
|
1709
1730
|
// @public
|
1710
1731
|
export type RawDataServerResult = {
|
1711
1732
|
MESSAGE_TYPE: string;
|
@@ -1785,7 +1806,7 @@ export interface SerializedSocketStatus {
|
|
1785
1806
|
readonly closedCode: number;
|
1786
1807
|
// (undocumented)
|
1787
1808
|
readonly closedReason: string;
|
1788
|
-
// (undocumented)
|
1809
|
+
// @deprecated (undocumented)
|
1789
1810
|
hasValidSession: boolean;
|
1790
1811
|
isConfigured: boolean;
|
1791
1812
|
// (undocumented)
|
@@ -1912,6 +1933,9 @@ export type SocketConnectOptions = {
|
|
1912
1933
|
enableHeartbeatLogging?: boolean;
|
1913
1934
|
enableMessageLogging?: boolean;
|
1914
1935
|
heartbeatInterval?: number;
|
1936
|
+
verboseHeartbeat?: boolean;
|
1937
|
+
heartbeatPingCallback?: (message: PingMessage) => void;
|
1938
|
+
heartbeatPongCallback?: (message: PongMessage) => void;
|
1915
1939
|
proxyPath?: string;
|
1916
1940
|
};
|
1917
1941
|
|
@@ -2024,7 +2048,10 @@ export type SSOCredentialsInput = {
|
|
2024
2048
|
export type StorageType = 'local' | 'session';
|
2025
2049
|
|
2026
2050
|
// @public (undocumented)
|
2027
|
-
export type StreamCompleteEvent = CustomEvent<
|
2051
|
+
export type StreamCompleteEvent = CustomEvent<StreamCompleteEventDetail>;
|
2052
|
+
|
2053
|
+
// @public (undocumented)
|
2054
|
+
export type StreamCompleteEventDetail = Pick<StreamEventDetail, 'resourceName' | 'stream'>;
|
2028
2055
|
|
2029
2056
|
// @public (undocumented)
|
2030
2057
|
export const StreamCompleteEventType = "connect-stream-complete-event";
|
@@ -2105,25 +2132,11 @@ export function until(conditionFunc: () => boolean, timeoutMs?: number): Promise
|
|
2105
2132
|
|
2106
2133
|
// Warning: (ae-internal-mixed-release-tag) Mixed release tags are not allowed for "User" because one of its declarations is marked as @internal
|
2107
2134
|
//
|
2108
|
-
// @public
|
2109
|
-
export interface User extends
|
2110
|
-
// (undocumented)
|
2111
|
-
hasAdminProfile(): boolean;
|
2112
|
-
// Warning: (ae-incompatible-release-tags) The symbol "hasPermission" is marked as @public, but its signature references "UserPermission" which is marked as @internal
|
2113
|
-
//
|
2114
|
-
// (undocumented)
|
2115
|
-
hasPermission(permission: UserPermission | UserPermission[]): boolean;
|
2116
|
-
// Warning: (ae-incompatible-release-tags) The symbol "hasProfile" is marked as @public, but its signature references "UserProfile" which is marked as @internal
|
2117
|
-
//
|
2118
|
-
// (undocumented)
|
2119
|
-
hasProfile(profile: UserProfile | UserProfile[]): boolean;
|
2120
|
-
// (undocumented)
|
2121
|
-
set(options: UserOptions): void;
|
2122
|
-
// (undocumented)
|
2123
|
-
unset(): void;
|
2135
|
+
// @public @deprecated
|
2136
|
+
export interface User extends User_2 {
|
2124
2137
|
}
|
2125
2138
|
|
2126
|
-
// @internal
|
2139
|
+
// @internal @deprecated
|
2127
2140
|
export const User: InterfaceSymbol<User>;
|
2128
2141
|
|
2129
2142
|
// Warning: (ae-internal-missing-underscore) The name "UserPermission" should be prefixed with an underscore because the declaration is marked as @internal
|
@@ -2141,6 +2154,10 @@ export type UserProfile = CoreUserProfiles | UnknownUserProfiles;
|
|
2141
2154
|
// @internal
|
2142
2155
|
export const WSConnect: InterfaceSymbol<Connect>;
|
2143
2156
|
|
2157
|
+
// Warnings were encountered during analysis:
|
2158
|
+
//
|
2159
|
+
// src/connect/message.ts:283:3 - (ae-forgotten-export) The symbol "RESOURCE_DETAILS" needs to be exported by the entry point index.d.ts
|
2160
|
+
|
2144
2161
|
// (No @packageDocumentation comment for this package)
|
2145
2162
|
|
2146
2163
|
```
|