@genesislcap/foundation-comms 14.184.0 → 14.185.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/dts/auth/auth.types.d.ts +1 -1
- package/dist/dts/auth/auth.types.d.ts.map +1 -1
- package/dist/dts/connect/connect.d.ts +13 -6
- package/dist/dts/connect/connect.d.ts.map +1 -1
- package/dist/dts/connect/connect.types.d.ts +4 -51
- package/dist/dts/connect/connect.types.d.ts.map +1 -1
- package/dist/dts/connect/http.connect.d.ts +4 -8
- package/dist/dts/connect/http.connect.d.ts.map +1 -1
- package/dist/dts/connect/http.connect.types.d.ts +62 -0
- package/dist/dts/connect/http.connect.types.d.ts.map +1 -0
- package/dist/dts/connect/updateState.d.ts +3 -0
- package/dist/dts/connect/updateState.d.ts.map +1 -0
- package/dist/dts/testing/mocks/auth/auth.d.ts +1 -1
- package/dist/dts/testing/mocks/auth/auth.d.ts.map +1 -1
- package/dist/dts/testing/mocks/connect/connect.d.ts +3 -1
- package/dist/dts/testing/mocks/connect/connect.d.ts.map +1 -1
- package/dist/dts/testing/mocks/connect/socket.d.ts +1 -1
- package/dist/dts/testing/mocks/connect/socket.d.ts.map +1 -1
- package/dist/dts/testing/mocks/datasource/datasource.d.ts +1 -1
- package/dist/dts/testing/mocks/datasource/datasource.d.ts.map +1 -1
- package/dist/esm/connect/connect.js +10 -24
- package/dist/esm/connect/connect.types.js +21 -5
- package/dist/esm/connect/http.connect.js +10 -23
- package/dist/esm/connect/http.connect.types.js +24 -0
- package/dist/esm/connect/updateState.js +26 -0
- package/dist/esm/testing/mocks/connect/connect.js +3 -0
- package/dist/esm/testing/mocks/connect/socket.js +1 -1
- package/dist/foundation-comms.api.json +392 -287
- package/dist/foundation-comms.d.ts +25 -12
- package/docs/api/foundation-comms.connect.md +1 -0
- package/docs/api/foundation-comms.connect.streamstate.md +30 -0
- package/docs/api/foundation-comms.connectconfig.iswebsocketexpression.md +13 -0
- package/docs/api/foundation-comms.connectconfig.md +1 -0
- package/docs/api/foundation-comms.defaultconnect._constructor_.md +2 -2
- package/docs/api/foundation-comms.defaultconnect.md +1 -0
- package/docs/api/foundation-comms.defaultconnect.streamstate.md +26 -0
- package/docs/api/foundation-comms.defaulthttpconnect._constructor_.md +2 -2
- package/docs/api/foundation-comms.defaulthttpconnect.md +1 -0
- package/docs/api/foundation-comms.defaulthttpconnect.streamstate.md +26 -0
- package/docs/api/foundation-comms.md +0 -4
- package/docs/api-report.md +13 -33
- package/package.json +21 -13
- package/docs/api/foundation-comms.defaulthttpconnectconfig.md +0 -13
- package/docs/api/foundation-comms.httpconnectconfig.md +0 -20
- package/docs/api/foundation-comms.httpconnectconfig.polling.md +0 -13
- package/docs/api/foundation-comms.httppollingconfig.md +0 -22
- package/docs/api/foundation-comms.httppollingconfig.polling_frequency.md +0 -13
- package/docs/api/foundation-comms.httppollingconfig.polling_interval_map.md +0 -15
- package/docs/api/foundation-comms.httppollingconfig.polling_map.md +0 -15
- package/docs/api/foundation-comms.pollingconfiguration.amount_of_polls.md +0 -18
- package/docs/api/foundation-comms.pollingconfiguration.md +0 -22
- package/docs/api/foundation-comms.pollingconfiguration.queries.md +0 -13
- package/docs/api/foundation-comms.pollingconfiguration.temp_frequency.md +0 -13
@@ -257,6 +257,17 @@ export declare interface Connect {
|
|
257
257
|
* @returns An observable that emits messages received from the server.
|
258
258
|
*/
|
259
259
|
stream(resourceName: string, onMessage: Function, onError: Function, params?: any): SocketObservable<Message>;
|
260
|
+
/**
|
261
|
+
* Starts listening for updates on the specified resource.
|
262
|
+
* @public
|
263
|
+
* @param resourceName - The name of the resource to listen for updates on.
|
264
|
+
* @param onMessage - A callback function to handle received messages.
|
265
|
+
* @param onError - A callback function to handle errors.
|
266
|
+
* @param params - Additional parameters to pass to the server.
|
267
|
+
* @param initialState - State of the list to start with, defaults to empty array.
|
268
|
+
* @returns An observable that emits latest state of the list it subscribes to.
|
269
|
+
*/
|
270
|
+
streamState(resourceName: string, onMessage: Function, onError: Function, params?: any, initialState?: any[]): Observable<any[]>;
|
260
271
|
/**
|
261
272
|
* Starts listening for updates on the specified resource without auto-teardown.
|
262
273
|
* @alpha
|
@@ -346,6 +357,10 @@ export declare interface ConnectConfig {
|
|
346
357
|
* Options for automatic reconnection on connection loss.
|
347
358
|
*/
|
348
359
|
reconnect: SocketReconnectOptions;
|
360
|
+
/**
|
361
|
+
* Check for web socket url pattern.
|
362
|
+
*/
|
363
|
+
isWebSocketExpression: RegExp;
|
349
364
|
}
|
350
365
|
|
351
366
|
/**
|
@@ -456,6 +471,7 @@ export declare class ConnectMock implements Connect {
|
|
456
471
|
nextJSONSchema: any;
|
457
472
|
nextMessage: Message;
|
458
473
|
requestParams: RequestParams;
|
474
|
+
nextListState: any[];
|
459
475
|
commitEvent(eventName: string, params?: CommitParams): Promise<Message>;
|
460
476
|
connect(host: string): Promise<boolean>;
|
461
477
|
disconnect(): void;
|
@@ -464,6 +480,7 @@ export declare class ConnectMock implements Connect {
|
|
464
480
|
getAvailableResources(params?: RequestParams): Promise<Message>;
|
465
481
|
snapshot(resourceName: string, params?: any): Promise<Message>;
|
466
482
|
stream(resourceName: string, onMessage: Function, onError: Function, params?: any): SocketObservable<Message>;
|
483
|
+
streamState(resourceName: string, onMessage: Function, onError: Function, params?: any, initialState?: any[]): Observable<any[]>;
|
467
484
|
streamWithoutAutoTeardown(resourceName: string, onMessage: Function, onError: Function, params?: any): SocketObservable<Message>;
|
468
485
|
getMoreRows(sourceRef: string): Promise<Message<any>>;
|
469
486
|
getMoreColumns(sourceRef: string): Promise<Message<any>>;
|
@@ -1140,7 +1157,7 @@ export declare class DefaultConnect implements Connect {
|
|
1140
1157
|
get isConnected(): boolean;
|
1141
1158
|
get isConnectedSubject(): BehaviorSubject<boolean>;
|
1142
1159
|
get isConnected$(): Observable<boolean>;
|
1143
|
-
constructor(socket: Socket, messageBuilder: MessageBuilder, metaCache: MetaCache, events: ConnectEventsEmitter, config
|
1160
|
+
constructor(socket: Socket, messageBuilder: MessageBuilder, metaCache: MetaCache, events: ConnectEventsEmitter, config: ConnectConfig);
|
1144
1161
|
httpMode(): boolean;
|
1145
1162
|
/**
|
1146
1163
|
* @deprecated - Please reference {@link @genesislcap/foundation-user#User} instead.',
|
@@ -1151,6 +1168,7 @@ export declare class DefaultConnect implements Connect {
|
|
1151
1168
|
disconnect(): void;
|
1152
1169
|
snapshot(resourceName: string, params?: any): Promise<Message>;
|
1153
1170
|
stream(resourceName: string, onMessage: Function, onError: Function, params?: any): SocketObservable<Message>;
|
1171
|
+
streamState(resourceName: string, onMessage?: Function, onError?: Function, params?: any, initialState?: any[]): Observable<any[]>;
|
1154
1172
|
streamWithoutAutoTeardown(resourceName: string, onMessage: Function, onError: Function, params?: any): SocketObservable<Message>;
|
1155
1173
|
getMoreRows(sourceRef: string): Promise<Message>;
|
1156
1174
|
getMoreColumns(sourceRef: string): Promise<Message>;
|
@@ -1367,7 +1385,7 @@ export declare class DefaultHttpConnect implements Connect {
|
|
1367
1385
|
* @internal
|
1368
1386
|
*/
|
1369
1387
|
private streams;
|
1370
|
-
constructor(http: Http, messageBuilder: MessageBuilder, session: Session, metaCache: MetaCache, serializer: JSONSerializer, config
|
1388
|
+
constructor(http: Http, messageBuilder: MessageBuilder, session: Session, metaCache: MetaCache, serializer: JSONSerializer, config: HttpConnectConfig);
|
1371
1389
|
/**
|
1372
1390
|
* Checks if the host is available by sending a heartbeat ping message and waiting for the response.
|
1373
1391
|
* @internal
|
@@ -1381,6 +1399,7 @@ export declare class DefaultHttpConnect implements Connect {
|
|
1381
1399
|
disconnect(): void;
|
1382
1400
|
snapshot(resourceName: string, params?: any): Promise<Message>;
|
1383
1401
|
stream(resourceName: string, onMessage: Function, onError: Function, params?: any): SocketObservable<Message>;
|
1402
|
+
streamState(resourceName: string, onMessage?: Function, onError?: Function, params?: any, initialState?: any[]): Observable<any[]>;
|
1384
1403
|
streamWithoutAutoTeardown(resourceName: string, onMessage: Function, onError: Function, params?: any): SocketObservable<Message<any>>;
|
1385
1404
|
private getMessage;
|
1386
1405
|
getMoreRows(sourceRef: string): Promise<Message>;
|
@@ -1398,12 +1417,6 @@ export declare class DefaultHttpConnect implements Connect {
|
|
1398
1417
|
private static getUrl;
|
1399
1418
|
}
|
1400
1419
|
|
1401
|
-
/**
|
1402
|
-
* The default configuration for connecting to an HTTP service.
|
1403
|
-
* @public
|
1404
|
-
*/
|
1405
|
-
export declare const defaultHttpConnectConfig: HttpConnectConfig;
|
1406
|
-
|
1407
1420
|
/**
|
1408
1421
|
* The default implementation for the KVStorage interface.
|
1409
1422
|
* @alpha
|
@@ -2217,7 +2230,7 @@ export declare const HttpConnect: InterfaceSymbol<Connect>;
|
|
2217
2230
|
* Configuration options for the Connect (HTTP) instance.
|
2218
2231
|
* @public
|
2219
2232
|
*/
|
2220
|
-
|
2233
|
+
declare interface HttpConnectConfig {
|
2221
2234
|
/**
|
2222
2235
|
* Configuration options for http polling.
|
2223
2236
|
*/
|
@@ -2228,13 +2241,13 @@ export declare interface HttpConnectConfig {
|
|
2228
2241
|
* Configuration options for the Connect (HTTP) instance.
|
2229
2242
|
* @internal
|
2230
2243
|
*/
|
2231
|
-
|
2244
|
+
declare const HttpConnectConfig: InterfaceSymbol<HttpConnectConfig>;
|
2232
2245
|
|
2233
2246
|
/**
|
2234
2247
|
* Configuration options for http connection.
|
2235
2248
|
* @public
|
2236
2249
|
*/
|
2237
|
-
|
2250
|
+
declare interface HttpPollingConfig {
|
2238
2251
|
/**
|
2239
2252
|
* The frequency of polling.
|
2240
2253
|
*/
|
@@ -3145,7 +3158,7 @@ export declare type PingMessage = Pick<Message, 'MESSAGE_TYPE' | 'SOURCE_REF' |
|
|
3145
3158
|
* Configuration options for http polling.
|
3146
3159
|
* @public
|
3147
3160
|
*/
|
3148
|
-
|
3161
|
+
declare interface PollingConfiguration {
|
3149
3162
|
/**
|
3150
3163
|
* The temporary polling frequency.
|
3151
3164
|
*/
|
@@ -37,4 +37,5 @@ export interface Connect
|
|
37
37
|
| [request(resourceName, params)](./foundation-comms.connect.request.md) | Sends a request to the server to retrieve data or perform an action. |
|
38
38
|
| [snapshot(resourceName, params)](./foundation-comms.connect.snapshot.md) | Retrieves a snapshot of data for the specified resource. |
|
39
39
|
| [stream(resourceName, onMessage, onError, params)](./foundation-comms.connect.stream.md) | Starts listening for updates on the specified resource. |
|
40
|
+
| [streamState(resourceName, onMessage, onError, params, initialState)](./foundation-comms.connect.streamstate.md) | Starts listening for updates on the specified resource. |
|
40
41
|
|
@@ -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) > [Connect](./foundation-comms.connect.md) > [streamState](./foundation-comms.connect.streamstate.md)
|
4
|
+
|
5
|
+
## Connect.streamState() method
|
6
|
+
|
7
|
+
Starts listening for updates on the specified resource.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
streamState(resourceName: string, onMessage: Function, onError: Function, params?: any, initialState?: any[]): Observable<any[]>;
|
13
|
+
```
|
14
|
+
|
15
|
+
## Parameters
|
16
|
+
|
17
|
+
| Parameter | Type | Description |
|
18
|
+
| --- | --- | --- |
|
19
|
+
| resourceName | string | The name of the resource to listen for updates on. |
|
20
|
+
| onMessage | Function | A callback function to handle received messages. |
|
21
|
+
| onError | Function | A callback function to handle errors. |
|
22
|
+
| params | any | _(Optional)_ Additional parameters to pass to the server. |
|
23
|
+
| initialState | any\[\] | _(Optional)_ State of the list to start with, defaults to empty array. |
|
24
|
+
|
25
|
+
**Returns:**
|
26
|
+
|
27
|
+
Observable<any\[\]>
|
28
|
+
|
29
|
+
An observable that emits latest state of the list it subscribes to.
|
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) > [ConnectConfig](./foundation-comms.connectconfig.md) > [isWebSocketExpression](./foundation-comms.connectconfig.iswebsocketexpression.md)
|
4
|
+
|
5
|
+
## ConnectConfig.isWebSocketExpression property
|
6
|
+
|
7
|
+
Check for web socket url pattern.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
isWebSocketExpression: RegExp;
|
13
|
+
```
|
@@ -17,5 +17,6 @@ export interface ConnectConfig
|
|
17
17
|
| Property | Modifiers | Type | Description |
|
18
18
|
| --- | --- | --- | --- |
|
19
19
|
| [connect](./foundation-comms.connectconfig.connect.md) | | [SocketConnectOptions](./foundation-comms.socketconnectoptions.md) | Options for the initial connection. |
|
20
|
+
| [isWebSocketExpression](./foundation-comms.connectconfig.iswebsocketexpression.md) | | RegExp | Check for web socket url pattern. |
|
20
21
|
| [reconnect](./foundation-comms.connectconfig.reconnect.md) | | [SocketReconnectOptions](./foundation-comms.socketreconnectoptions.md) | Options for automatic reconnection on connection loss. |
|
21
22
|
|
@@ -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
|
12
|
+
constructor(socket: Socket, messageBuilder: MessageBuilder, metaCache: MetaCache, events: ConnectEventsEmitter, config: ConnectConfig);
|
13
13
|
```
|
14
14
|
|
15
15
|
## Parameters
|
@@ -20,5 +20,5 @@ constructor(socket: Socket, messageBuilder: MessageBuilder, metaCache: MetaCache
|
|
20
20
|
| messageBuilder | [MessageBuilder](./foundation-comms.messagebuilder.md) | |
|
21
21
|
| metaCache | [MetaCache](./foundation-comms.metacache.md) | |
|
22
22
|
| events | [ConnectEventsEmitter](./foundation-comms.connecteventsemitter.md) | |
|
23
|
-
| config | [ConnectConfig](./foundation-comms.connectconfig.md) |
|
23
|
+
| config | [ConnectConfig](./foundation-comms.connectconfig.md) | |
|
24
24
|
|
@@ -48,5 +48,6 @@ export declare class DefaultConnect implements Connect
|
|
48
48
|
| [setValidSession(valid)](./foundation-comms.defaultconnect.setvalidsession.md) | | |
|
49
49
|
| [snapshot(resourceName, params)](./foundation-comms.defaultconnect.snapshot.md) | | |
|
50
50
|
| [stream(resourceName, onMessage, onError, params)](./foundation-comms.defaultconnect.stream.md) | | |
|
51
|
+
| [streamState(resourceName, onMessage, onError, params, initialState)](./foundation-comms.defaultconnect.streamstate.md) | | |
|
51
52
|
| [streamWithoutAutoTeardown(resourceName, onMessage, onError, params)](./foundation-comms.defaultconnect.streamwithoutautoteardown.md) | | |
|
52
53
|
|
@@ -0,0 +1,26 @@
|
|
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) > [streamState](./foundation-comms.defaultconnect.streamstate.md)
|
4
|
+
|
5
|
+
## DefaultConnect.streamState() method
|
6
|
+
|
7
|
+
**Signature:**
|
8
|
+
|
9
|
+
```typescript
|
10
|
+
streamState(resourceName: string, onMessage?: Function, onError?: Function, params?: any, initialState?: any[]): Observable<any[]>;
|
11
|
+
```
|
12
|
+
|
13
|
+
## Parameters
|
14
|
+
|
15
|
+
| Parameter | Type | Description |
|
16
|
+
| --- | --- | --- |
|
17
|
+
| resourceName | string | |
|
18
|
+
| onMessage | Function | _(Optional)_ |
|
19
|
+
| onError | Function | _(Optional)_ |
|
20
|
+
| params | any | _(Optional)_ |
|
21
|
+
| initialState | any\[\] | _(Optional)_ |
|
22
|
+
|
23
|
+
**Returns:**
|
24
|
+
|
25
|
+
Observable<any\[\]>
|
26
|
+
|
@@ -9,7 +9,7 @@ Constructs a new instance of the `DefaultHttpConnect` class
|
|
9
9
|
**Signature:**
|
10
10
|
|
11
11
|
```typescript
|
12
|
-
constructor(http: Http, messageBuilder: MessageBuilder, session: Session, metaCache: MetaCache, serializer: JSONSerializer, config
|
12
|
+
constructor(http: Http, messageBuilder: MessageBuilder, session: Session, metaCache: MetaCache, serializer: JSONSerializer, config: HttpConnectConfig);
|
13
13
|
```
|
14
14
|
|
15
15
|
## Parameters
|
@@ -21,5 +21,5 @@ constructor(http: Http, messageBuilder: MessageBuilder, session: Session, metaCa
|
|
21
21
|
| session | [Session](./foundation-comms.session.md) | |
|
22
22
|
| metaCache | [MetaCache](./foundation-comms.metacache.md) | |
|
23
23
|
| serializer | JSONSerializer | |
|
24
|
-
| config |
|
24
|
+
| config | HttpConnectConfig | |
|
25
25
|
|
@@ -49,5 +49,6 @@ export declare class DefaultHttpConnect implements Connect
|
|
49
49
|
| [setValidSession(valid)](./foundation-comms.defaulthttpconnect.setvalidsession.md) | | |
|
50
50
|
| [snapshot(resourceName, params)](./foundation-comms.defaulthttpconnect.snapshot.md) | | |
|
51
51
|
| [stream(resourceName, onMessage, onError, params)](./foundation-comms.defaulthttpconnect.stream.md) | | |
|
52
|
+
| [streamState(resourceName, onMessage, onError, params, initialState)](./foundation-comms.defaulthttpconnect.streamstate.md) | | |
|
52
53
|
| [streamWithoutAutoTeardown(resourceName, onMessage, onError, params)](./foundation-comms.defaulthttpconnect.streamwithoutautoteardown.md) | | |
|
53
54
|
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [DefaultHttpConnect](./foundation-comms.defaulthttpconnect.md) > [streamState](./foundation-comms.defaulthttpconnect.streamstate.md)
|
4
|
+
|
5
|
+
## DefaultHttpConnect.streamState() method
|
6
|
+
|
7
|
+
**Signature:**
|
8
|
+
|
9
|
+
```typescript
|
10
|
+
streamState(resourceName: string, onMessage?: Function, onError?: Function, params?: any, initialState?: any[]): Observable<any[]>;
|
11
|
+
```
|
12
|
+
|
13
|
+
## Parameters
|
14
|
+
|
15
|
+
| Parameter | Type | Description |
|
16
|
+
| --- | --- | --- |
|
17
|
+
| resourceName | string | |
|
18
|
+
| onMessage | Function | _(Optional)_ |
|
19
|
+
| onError | Function | _(Optional)_ |
|
20
|
+
| params | any | _(Optional)_ |
|
21
|
+
| initialState | any\[\] | _(Optional)_ |
|
22
|
+
|
23
|
+
**Returns:**
|
24
|
+
|
25
|
+
Observable<any\[\]>
|
26
|
+
|
@@ -76,8 +76,6 @@
|
|
76
76
|
| [Dataview](./foundation-comms.dataview.md) | Dataview object |
|
77
77
|
| [FoundationAnalytics](./foundation-comms.foundationanalytics.md) | Represents an analytics tracking system. |
|
78
78
|
| [Http](./foundation-comms.http.md) | An interface representing an HTTP client that can make GET and POST requests and return a promise with the response data. |
|
79
|
-
| [HttpConnectConfig](./foundation-comms.httpconnectconfig.md) | Configuration options for the Connect (HTTP) instance. |
|
80
|
-
| [HttpPollingConfig](./foundation-comms.httppollingconfig.md) | Configuration options for http connection. |
|
81
79
|
| [HttpRequestInit](./foundation-comms.httprequestinit.md) | The options object used when making an HTTP request. |
|
82
80
|
| [JsonSchemaCache](./foundation-comms.jsonschemacache.md) | A JSON schema cache definition |
|
83
81
|
| [LogoutResult](./foundation-comms.logoutresult.md) | Represents the result of a user logout operation. |
|
@@ -87,7 +85,6 @@
|
|
87
85
|
| [MonitoredResourceMetadata](./foundation-comms.monitoredresourcemetadata.md) | MonitoredResourceMetadata. |
|
88
86
|
| [NetworkMonitor](./foundation-comms.networkmonitor.md) | <code>NetworkMonitor</code> monitors network and resource availability and health. |
|
89
87
|
| [NetworkMonitorConfig](./foundation-comms.networkmonitorconfig.md) | NetworkMonitorConfig DI interface. |
|
90
|
-
| [PollingConfiguration](./foundation-comms.pollingconfiguration.md) | Configuration options for http polling. |
|
91
88
|
| [SerializedSocketStatus](./foundation-comms.serializedsocketstatus.md) | <code>SerializedSocketStatus</code> provides the serialize state of the web socket. |
|
92
89
|
| [Serializer](./foundation-comms.serializer.md) | A Serializer interface for serializing and deserializing objects. |
|
93
90
|
| [Session](./foundation-comms.session.md) | Represents a session storage and its capabilities. Provides methods to set and get items from the specified storage. |
|
@@ -112,7 +109,6 @@
|
|
112
109
|
| [defaultCredentialManagerConfig](./foundation-comms.defaultcredentialmanagerconfig.md) | The default configuration for the CredentialManager service. |
|
113
110
|
| [defaultCredentialRequestOptions](./foundation-comms.defaultcredentialrequestoptions.md) | The default request options for the CredentialManager service. |
|
114
111
|
| [defaultDatasourceConfig](./foundation-comms.defaultdatasourceconfig.md) | The default configuration for the Datasource service. |
|
115
|
-
| [defaultHttpConnectConfig](./foundation-comms.defaulthttpconnectconfig.md) | The default configuration for connecting to an HTTP service. |
|
116
112
|
| [defaultNetworkMonitorConfig](./foundation-comms.defaultnetworkmonitorconfig.md) | Default NetworkMonitorConfig DI implementation. |
|
117
113
|
| [exponentialScheduler](./foundation-comms.exponentialscheduler.md) | Expontential Interval scheduler for reconnect |
|
118
114
|
| [extractFieldDefinitions](./foundation-comms.extractfielddefinitions.md) | Extracts the field definitions from the metadata. |
|
package/docs/api-report.md
CHANGED
@@ -166,6 +166,7 @@ export interface Connect {
|
|
166
166
|
setValidSession(valid: boolean): void;
|
167
167
|
snapshot(resourceName: string, params?: any): Promise<Message>;
|
168
168
|
stream(resourceName: string, onMessage: Function, onError: Function, params?: any): SocketObservable<Message>;
|
169
|
+
streamState(resourceName: string, onMessage: Function, onError: Function, params?: any, initialState?: any[]): Observable<any[]>;
|
169
170
|
// @alpha
|
170
171
|
streamWithoutAutoTeardown(resourceName: string, onMessage: Function, onError: Function, params?: any): SocketObservable<Message>;
|
171
172
|
}
|
@@ -178,6 +179,7 @@ export const Connect: InterfaceSymbol<Connect>;
|
|
178
179
|
// @public
|
179
180
|
export interface ConnectConfig {
|
180
181
|
connect: SocketConnectOptions;
|
182
|
+
isWebSocketExpression: RegExp;
|
181
183
|
reconnect: SocketReconnectOptions;
|
182
184
|
}
|
183
185
|
|
@@ -247,6 +249,8 @@ export class ConnectMock implements Connect {
|
|
247
249
|
// (undocumented)
|
248
250
|
nextJSONSchema: any;
|
249
251
|
// (undocumented)
|
252
|
+
nextListState: any[];
|
253
|
+
// (undocumented)
|
250
254
|
nextMessage: Message;
|
251
255
|
// (undocumented)
|
252
256
|
nextMetadata: Metadata;
|
@@ -265,6 +269,8 @@ export class ConnectMock implements Connect {
|
|
265
269
|
// (undocumented)
|
266
270
|
stream(resourceName: string, onMessage: Function, onError: Function, params?: any): SocketObservable<Message>;
|
267
271
|
// (undocumented)
|
272
|
+
streamState(resourceName: string, onMessage: Function, onError: Function, params?: any, initialState?: any[]): Observable<any[]>;
|
273
|
+
// (undocumented)
|
268
274
|
streamWithoutAutoTeardown(resourceName: string, onMessage: Function, onError: Function, params?: any): SocketObservable<Message>;
|
269
275
|
}
|
270
276
|
|
@@ -518,7 +524,7 @@ export class DefaultAuth implements Auth {
|
|
518
524
|
|
519
525
|
// @public
|
520
526
|
export class DefaultConnect implements Connect {
|
521
|
-
constructor(socket: Socket, messageBuilder: MessageBuilder, metaCache: MetaCache, events: ConnectEventsEmitter, config
|
527
|
+
constructor(socket: Socket, messageBuilder: MessageBuilder, metaCache: MetaCache, events: ConnectEventsEmitter, config: ConnectConfig);
|
522
528
|
// (undocumented)
|
523
529
|
commitEvent(eventName: string, params?: CommitParams): Promise<Message>;
|
524
530
|
// (undocumented)
|
@@ -560,6 +566,8 @@ export class DefaultConnect implements Connect {
|
|
560
566
|
// (undocumented)
|
561
567
|
stream(resourceName: string, onMessage: Function, onError: Function, params?: any): SocketObservable<Message>;
|
562
568
|
// (undocumented)
|
569
|
+
streamState(resourceName: string, onMessage?: Function, onError?: Function, params?: any, initialState?: any[]): Observable<any[]>;
|
570
|
+
// (undocumented)
|
563
571
|
streamWithoutAutoTeardown(resourceName: string, onMessage: Function, onError: Function, params?: any): SocketObservable<Message>;
|
564
572
|
}
|
565
573
|
|
@@ -781,7 +789,8 @@ export class DefaultHttp implements Http {
|
|
781
789
|
|
782
790
|
// @public
|
783
791
|
export class DefaultHttpConnect implements Connect {
|
784
|
-
|
792
|
+
// Warning: (ae-forgotten-export) The symbol "HttpConnectConfig" needs to be exported by the entry point index.d.ts
|
793
|
+
constructor(http: Http, messageBuilder: MessageBuilder, session: Session, metaCache: MetaCache, serializer: JSONSerializer, config: HttpConnectConfig);
|
785
794
|
// (undocumented)
|
786
795
|
commitEvent(eventName: string, params?: CommitParams): Promise<Message>;
|
787
796
|
// (undocumented)
|
@@ -826,12 +835,11 @@ export class DefaultHttpConnect implements Connect {
|
|
826
835
|
// (undocumented)
|
827
836
|
stream(resourceName: string, onMessage: Function, onError: Function, params?: any): SocketObservable<Message>;
|
828
837
|
// (undocumented)
|
838
|
+
streamState(resourceName: string, onMessage?: Function, onError?: Function, params?: any, initialState?: any[]): Observable<any[]>;
|
839
|
+
// (undocumented)
|
829
840
|
streamWithoutAutoTeardown(resourceName: string, onMessage: Function, onError: Function, params?: any): SocketObservable<Message<any>>;
|
830
841
|
}
|
831
842
|
|
832
|
-
// @public
|
833
|
-
export const defaultHttpConnectConfig: HttpConnectConfig;
|
834
|
-
|
835
843
|
// @alpha
|
836
844
|
export class DefaultKVStorage implements KVStorage {
|
837
845
|
constructor(connect: Connect, user: User_2, kvStorageConfig?: KVStorageConfig);
|
@@ -1270,27 +1278,6 @@ export const Http: InterfaceSymbol<Http>;
|
|
1270
1278
|
// @internal
|
1271
1279
|
export const HttpConnect: InterfaceSymbol<Connect>;
|
1272
1280
|
|
1273
|
-
// Warning: (ae-internal-mixed-release-tag) Mixed release tags are not allowed for "HttpConnectConfig" because one of its declarations is marked as @internal
|
1274
|
-
//
|
1275
|
-
// @public
|
1276
|
-
export interface HttpConnectConfig {
|
1277
|
-
polling: HttpPollingConfig;
|
1278
|
-
}
|
1279
|
-
|
1280
|
-
// @internal
|
1281
|
-
export const HttpConnectConfig: InterfaceSymbol<HttpConnectConfig>;
|
1282
|
-
|
1283
|
-
// @public
|
1284
|
-
export interface HttpPollingConfig {
|
1285
|
-
POLLING_FREQUENCY?: number;
|
1286
|
-
POLLING_INTERVAL_MAP?: {
|
1287
|
-
[resource: string]: number;
|
1288
|
-
};
|
1289
|
-
POLLING_MAP?: {
|
1290
|
-
[key: string]: PollingConfiguration;
|
1291
|
-
};
|
1292
|
-
}
|
1293
|
-
|
1294
1281
|
// @public
|
1295
1282
|
export interface HttpRequestInit extends RequestInit {
|
1296
1283
|
serializer?: JSONSerializer;
|
@@ -1721,13 +1708,6 @@ export type PingMessage = Pick<Message, 'MESSAGE_TYPE' | 'SOURCE_REF' | 'DETAILS
|
|
1721
1708
|
[key: string]: any;
|
1722
1709
|
};
|
1723
1710
|
|
1724
|
-
// @public
|
1725
|
-
export interface PollingConfiguration {
|
1726
|
-
AMOUNT_OF_POLLS: number;
|
1727
|
-
QUERIES: string[];
|
1728
|
-
TEMP_FREQUENCY: number;
|
1729
|
-
}
|
1730
|
-
|
1731
1711
|
// @public (undocumented)
|
1732
1712
|
export type PongMessage = Pick<Message, 'MESSAGE_TYPE' | 'SOURCE_REF' | 'USER_NAME'> & {
|
1733
1713
|
IS_AUTHENTICATED?: boolean;
|
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.185.0",
|
5
5
|
"sideEffects": false,
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
7
7
|
"main": "dist/esm/index.js",
|
@@ -44,6 +44,7 @@
|
|
44
44
|
"build:rollup:stats": "genx analyze -b rollup",
|
45
45
|
"build:webpack": "genx build",
|
46
46
|
"build:webpack:stats": "genx analyze",
|
47
|
+
"circular": "npx -y madge --extensions ts --circular ./src",
|
47
48
|
"clean": "rimraf dist tsconfig.tsbuildinfo",
|
48
49
|
"dev": "npm run dev:tsc",
|
49
50
|
"dev:rollup": "genx dev -b rollup",
|
@@ -65,23 +66,30 @@
|
|
65
66
|
"test:unit:watch": "genx test --watch",
|
66
67
|
"test:debug": "genx test --debug"
|
67
68
|
},
|
69
|
+
"madge": {
|
70
|
+
"detectiveOptions": {
|
71
|
+
"ts": {
|
72
|
+
"skipTypeImports": true
|
73
|
+
}
|
74
|
+
}
|
75
|
+
},
|
68
76
|
"devDependencies": {
|
69
|
-
"@genesislcap/foundation-testing": "14.
|
70
|
-
"@genesislcap/genx": "14.
|
71
|
-
"@genesislcap/rollup-builder": "14.
|
72
|
-
"@genesislcap/ts-builder": "14.
|
73
|
-
"@genesislcap/uvu-playwright-builder": "14.
|
74
|
-
"@genesislcap/vite-builder": "14.
|
75
|
-
"@genesislcap/webpack-builder": "14.
|
77
|
+
"@genesislcap/foundation-testing": "14.185.0",
|
78
|
+
"@genesislcap/genx": "14.185.0",
|
79
|
+
"@genesislcap/rollup-builder": "14.185.0",
|
80
|
+
"@genesislcap/ts-builder": "14.185.0",
|
81
|
+
"@genesislcap/uvu-playwright-builder": "14.185.0",
|
82
|
+
"@genesislcap/vite-builder": "14.185.0",
|
83
|
+
"@genesislcap/webpack-builder": "14.185.0",
|
76
84
|
"@types/js-cookie": "^3.0.2",
|
77
85
|
"@types/json-schema": "^7.0.11",
|
78
86
|
"@types/webappsec-credential-management": "^0.6.2",
|
79
|
-
"rimraf": "^
|
87
|
+
"rimraf": "^5.0.0"
|
80
88
|
},
|
81
89
|
"dependencies": {
|
82
|
-
"@genesislcap/foundation-logger": "14.
|
83
|
-
"@genesislcap/foundation-user": "14.
|
84
|
-
"@genesislcap/foundation-utils": "14.
|
90
|
+
"@genesislcap/foundation-logger": "14.185.0",
|
91
|
+
"@genesislcap/foundation-user": "14.185.0",
|
92
|
+
"@genesislcap/foundation-utils": "14.185.0",
|
85
93
|
"@microsoft/fast-element": "^1.12.0",
|
86
94
|
"@microsoft/fast-foundation": "^2.49.4",
|
87
95
|
"analytics": "^0.8.0",
|
@@ -101,5 +109,5 @@
|
|
101
109
|
"publishConfig": {
|
102
110
|
"access": "public"
|
103
111
|
},
|
104
|
-
"gitHead": "
|
112
|
+
"gitHead": "839487e6a0b1168d0ad6bf32c9e3a50504c775a0"
|
105
113
|
}
|
@@ -1,13 +0,0 @@
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
-
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [defaultHttpConnectConfig](./foundation-comms.defaulthttpconnectconfig.md)
|
4
|
-
|
5
|
-
## defaultHttpConnectConfig variable
|
6
|
-
|
7
|
-
The default configuration for connecting to an HTTP service.
|
8
|
-
|
9
|
-
**Signature:**
|
10
|
-
|
11
|
-
```typescript
|
12
|
-
defaultHttpConnectConfig: HttpConnectConfig
|
13
|
-
```
|
@@ -1,20 +0,0 @@
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
-
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [HttpConnectConfig](./foundation-comms.httpconnectconfig.md)
|
4
|
-
|
5
|
-
## HttpConnectConfig interface
|
6
|
-
|
7
|
-
Configuration options for the Connect (HTTP) instance.
|
8
|
-
|
9
|
-
**Signature:**
|
10
|
-
|
11
|
-
```typescript
|
12
|
-
export interface HttpConnectConfig
|
13
|
-
```
|
14
|
-
|
15
|
-
## Properties
|
16
|
-
|
17
|
-
| Property | Modifiers | Type | Description |
|
18
|
-
| --- | --- | --- | --- |
|
19
|
-
| [polling](./foundation-comms.httpconnectconfig.polling.md) | | [HttpPollingConfig](./foundation-comms.httppollingconfig.md) | Configuration options for http polling. |
|
20
|
-
|
@@ -1,13 +0,0 @@
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
-
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [HttpConnectConfig](./foundation-comms.httpconnectconfig.md) > [polling](./foundation-comms.httpconnectconfig.polling.md)
|
4
|
-
|
5
|
-
## HttpConnectConfig.polling property
|
6
|
-
|
7
|
-
Configuration options for http polling.
|
8
|
-
|
9
|
-
**Signature:**
|
10
|
-
|
11
|
-
```typescript
|
12
|
-
polling: HttpPollingConfig;
|
13
|
-
```
|
@@ -1,22 +0,0 @@
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
-
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [HttpPollingConfig](./foundation-comms.httppollingconfig.md)
|
4
|
-
|
5
|
-
## HttpPollingConfig interface
|
6
|
-
|
7
|
-
Configuration options for http connection.
|
8
|
-
|
9
|
-
**Signature:**
|
10
|
-
|
11
|
-
```typescript
|
12
|
-
export interface HttpPollingConfig
|
13
|
-
```
|
14
|
-
|
15
|
-
## Properties
|
16
|
-
|
17
|
-
| Property | Modifiers | Type | Description |
|
18
|
-
| --- | --- | --- | --- |
|
19
|
-
| [POLLING\_FREQUENCY?](./foundation-comms.httppollingconfig.polling_frequency.md) | | number | _(Optional)_ The frequency of polling. |
|
20
|
-
| [POLLING\_INTERVAL\_MAP?](./foundation-comms.httppollingconfig.polling_interval_map.md) | | { \[resource: string\]: number; } | _(Optional)_ The interval map of polling. |
|
21
|
-
| [POLLING\_MAP?](./foundation-comms.httppollingconfig.polling_map.md) | | { \[key: string\]: [PollingConfiguration](./foundation-comms.pollingconfiguration.md)<!-- -->; } | _(Optional)_ The map of polling configuration. |
|
22
|
-
|
@@ -1,13 +0,0 @@
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
-
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [HttpPollingConfig](./foundation-comms.httppollingconfig.md) > [POLLING\_FREQUENCY](./foundation-comms.httppollingconfig.polling_frequency.md)
|
4
|
-
|
5
|
-
## HttpPollingConfig.POLLING\_FREQUENCY property
|
6
|
-
|
7
|
-
The frequency of polling.
|
8
|
-
|
9
|
-
**Signature:**
|
10
|
-
|
11
|
-
```typescript
|
12
|
-
POLLING_FREQUENCY?: number;
|
13
|
-
```
|
@@ -1,15 +0,0 @@
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
-
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [HttpPollingConfig](./foundation-comms.httppollingconfig.md) > [POLLING\_INTERVAL\_MAP](./foundation-comms.httppollingconfig.polling_interval_map.md)
|
4
|
-
|
5
|
-
## HttpPollingConfig.POLLING\_INTERVAL\_MAP property
|
6
|
-
|
7
|
-
The interval map of polling.
|
8
|
-
|
9
|
-
**Signature:**
|
10
|
-
|
11
|
-
```typescript
|
12
|
-
POLLING_INTERVAL_MAP?: {
|
13
|
-
[resource: string]: number;
|
14
|
-
};
|
15
|
-
```
|
@@ -1,15 +0,0 @@
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
-
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [HttpPollingConfig](./foundation-comms.httppollingconfig.md) > [POLLING\_MAP](./foundation-comms.httppollingconfig.polling_map.md)
|
4
|
-
|
5
|
-
## HttpPollingConfig.POLLING\_MAP property
|
6
|
-
|
7
|
-
The map of polling configuration.
|
8
|
-
|
9
|
-
**Signature:**
|
10
|
-
|
11
|
-
```typescript
|
12
|
-
POLLING_MAP?: {
|
13
|
-
[key: string]: PollingConfiguration;
|
14
|
-
};
|
15
|
-
```
|
@@ -1,18 +0,0 @@
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
-
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [PollingConfiguration](./foundation-comms.pollingconfiguration.md) > [AMOUNT\_OF\_POLLS](./foundation-comms.pollingconfiguration.amount_of_polls.md)
|
4
|
-
|
5
|
-
## PollingConfiguration.AMOUNT\_OF\_POLLS property
|
6
|
-
|
7
|
-
The expected amount of HTTP polling attempts to be performed.
|
8
|
-
|
9
|
-
**Signature:**
|
10
|
-
|
11
|
-
```typescript
|
12
|
-
AMOUNT_OF_POLLS: number;
|
13
|
-
```
|
14
|
-
|
15
|
-
## Remarks
|
16
|
-
|
17
|
-
TEMP\_FREQUENCY \* AMOUNT\_OF\_POLLS = the total polling time/duration
|
18
|
-
|