@genesislcap/foundation-comms 14.167.3-alpha-b40d1e5.0 → 14.167.3-alpha-69ba23f.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.map +1 -1
- package/dist/dts/connect/connect.d.ts +1 -11
- package/dist/dts/connect/connect.d.ts.map +1 -1
- package/dist/dts/connect/http.connect.d.ts +0 -1
- package/dist/dts/connect/http.connect.d.ts.map +1 -1
- package/dist/dts/connect/index.d.ts +0 -2
- package/dist/dts/connect/index.d.ts.map +1 -1
- package/dist/dts/connect/message.d.ts +0 -51
- package/dist/dts/connect/message.d.ts.map +1 -1
- package/dist/dts/connect/socket.d.ts +8 -72
- package/dist/dts/connect/socket.d.ts.map +1 -1
- package/dist/dts/datasource/datasource.d.ts +0 -9
- package/dist/dts/datasource/datasource.d.ts.map +1 -1
- package/dist/dts/fdc3/fdc3.d.ts +1 -17
- package/dist/dts/fdc3/fdc3.d.ts.map +1 -1
- package/dist/dts/index.d.ts +0 -1
- package/dist/dts/index.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 +1 -5
- package/dist/dts/testing/mocks/connect/socket.d.ts.map +1 -1
- package/dist/dts/testing/mocks/datasource/datasource.d.ts +0 -1
- package/dist/dts/testing/mocks/datasource/datasource.d.ts.map +1 -1
- package/dist/dts/user/user.d.ts +0 -15
- package/dist/dts/user/user.d.ts.map +1 -1
- package/dist/esm/auth/auth.js +2 -5
- package/dist/esm/connect/connect.js +8 -30
- package/dist/esm/connect/http.connect.js +0 -6
- package/dist/esm/connect/index.js +0 -2
- package/dist/esm/connect/message.js +4 -25
- package/dist/esm/connect/socket.js +44 -113
- package/dist/esm/datasource/datasource.js +8 -18
- package/dist/esm/fdc3/fdc3.js +4 -4
- package/dist/esm/index.js +0 -1
- package/dist/esm/testing/mocks/connect/connect.js +0 -3
- package/dist/esm/testing/mocks/connect/socket.js +1 -1
- package/dist/esm/testing/mocks/datasource/datasource.js +0 -1
- package/dist/esm/user/user.js +1 -22
- package/dist/foundation-comms.api.json +6567 -13112
- package/dist/foundation-comms.d.ts +13 -841
- package/docs/api/foundation-comms.connect.md +0 -1
- package/docs/api/foundation-comms.currentuser.md +0 -2
- package/docs/api/foundation-comms.datasource.md +0 -1
- package/docs/api/foundation-comms.defaultconnect._constructor_.md +1 -2
- package/docs/api/foundation-comms.defaultconnect.md +1 -2
- package/docs/api/foundation-comms.defaultdatasource.md +0 -1
- package/docs/api/foundation-comms.defaulthttpconnect.md +0 -1
- package/docs/api/foundation-comms.md +0 -39
- package/docs/api/foundation-comms.messagebuilder.md +0 -1
- package/docs/api/foundation-comms.messagetype.md +0 -2
- package/docs/api/foundation-comms.socket.hasvalidsession.md +11 -0
- package/docs/api/foundation-comms.socket.isconnected.md +11 -0
- package/docs/api/{foundation-comms.socketstatus.isconnectedsubject.md → foundation-comms.socket.isconnectedsubject.md} +2 -2
- package/docs/api/foundation-comms.socket.isreconnecting.md +11 -0
- package/docs/api/foundation-comms.socket.md +11 -3
- package/docs/api/foundation-comms.socket.sendforstream.md +1 -2
- package/docs/api/foundation-comms.user.md +0 -2
- package/docs/api-report.md +16 -520
- package/package.json +11 -13
- package/dist/dts/connect/connect.events.d.ts +0 -173
- package/dist/dts/connect/connect.events.d.ts.map +0 -1
- package/dist/dts/connect/socket.status.d.ts +0 -79
- package/dist/dts/connect/socket.status.d.ts.map +0 -1
- package/dist/dts/networkMonitor/config.d.ts +0 -56
- package/dist/dts/networkMonitor/config.d.ts.map +0 -1
- package/dist/dts/networkMonitor/index.d.ts +0 -4
- package/dist/dts/networkMonitor/index.d.ts.map +0 -1
- package/dist/dts/networkMonitor/service.d.ts +0 -193
- package/dist/dts/networkMonitor/service.d.ts.map +0 -1
- package/dist/dts/networkMonitor/types.d.ts +0 -133
- package/dist/dts/networkMonitor/types.d.ts.map +0 -1
- package/dist/esm/connect/connect.events.js +0 -113
- package/dist/esm/connect/socket.status.js +0 -119
- package/dist/esm/networkMonitor/config.js +0 -46
- package/dist/esm/networkMonitor/index.js +0 -3
- package/dist/esm/networkMonitor/service.js +0 -432
- package/dist/esm/networkMonitor/types.js +0 -5
- package/docs/api/foundation-comms.commitevent.md +0 -14
- package/docs/api/foundation-comms.commiteventdetail.md +0 -17
- package/docs/api/foundation-comms.commiteventtype.md +0 -12
- package/docs/api/foundation-comms.connect.getmorecolumns.md +0 -26
- package/docs/api/foundation-comms.connectevents.addcommitlistener.md +0 -24
- package/docs/api/foundation-comms.connectevents.addmetadatalistener.md +0 -24
- package/docs/api/foundation-comms.connectevents.addstreamlistener.md +0 -25
- package/docs/api/foundation-comms.connectevents.md +0 -22
- package/docs/api/foundation-comms.connecteventsemitter.md +0 -24
- package/docs/api/foundation-comms.connecteventsemitter.oncommitevent.md +0 -25
- package/docs/api/foundation-comms.connecteventsemitter.onmetadataevent.md +0 -26
- package/docs/api/foundation-comms.connecteventsemitter.onstreamcompleteevent.md +0 -24
- package/docs/api/foundation-comms.connecteventsemitter.onstreamevent.md +0 -27
- 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.datasource.destroy.md +0 -17
- package/docs/api/foundation-comms.defaultconnect.getmorecolumns.md +0 -22
- package/docs/api/foundation-comms.defaultconnectevents.addcommitlistener.md +0 -24
- package/docs/api/foundation-comms.defaultconnectevents.addmetadatalistener.md +0 -24
- package/docs/api/foundation-comms.defaultconnectevents.addstreamlistener.md +0 -25
- package/docs/api/foundation-comms.defaultconnectevents.md +0 -27
- package/docs/api/foundation-comms.defaultconnectevents.oncommitevent.md +0 -25
- package/docs/api/foundation-comms.defaultconnectevents.onmetadataevent.md +0 -26
- package/docs/api/foundation-comms.defaultconnectevents.onstreamcompleteevent.md +0 -24
- package/docs/api/foundation-comms.defaultconnectevents.onstreamevent.md +0 -27
- package/docs/api/foundation-comms.defaultdatasource.destroy.md +0 -17
- package/docs/api/foundation-comms.defaulthttpconnect.getmorecolumns.md +0 -22
- package/docs/api/foundation-comms.defaultmessagebuilder._constructor_.md +0 -21
- package/docs/api/foundation-comms.defaultmessagebuilder.createchangepasswordmessage.md +0 -24
- package/docs/api/foundation-comms.defaultmessagebuilder.createcommitmessage.md +0 -23
- package/docs/api/foundation-comms.defaultmessagebuilder.createdatalogoffmessage.md +0 -22
- package/docs/api/foundation-comms.defaultmessagebuilder.createdatalogonmessage.md +0 -23
- package/docs/api/foundation-comms.defaultmessagebuilder.createforgotpasswordmessage.md +0 -24
- package/docs/api/foundation-comms.defaultmessagebuilder.createforgotpasswordtokenmessage.md +0 -25
- package/docs/api/foundation-comms.defaultmessagebuilder.createhttpheadersfrommessage.md +0 -23
- package/docs/api/foundation-comms.defaultmessagebuilder.createloginmessage.md +0 -22
- package/docs/api/foundation-comms.defaultmessagebuilder.createlogoutmessage.md +0 -22
- package/docs/api/foundation-comms.defaultmessagebuilder.createmetarequestmessage.md +0 -23
- package/docs/api/foundation-comms.defaultmessagebuilder.createmorecolumnsmessage.md +0 -22
- package/docs/api/foundation-comms.defaultmessagebuilder.createmorerowsmessage.md +0 -22
- package/docs/api/foundation-comms.defaultmessagebuilder.createrefreshtokenmessage.md +0 -15
- package/docs/api/foundation-comms.defaultmessagebuilder.createrequestmessage.md +0 -23
- package/docs/api/foundation-comms.defaultmessagebuilder.createresourcesmessage.md +0 -22
- package/docs/api/foundation-comms.defaultmessagebuilder.md +0 -41
- package/docs/api/foundation-comms.defaultnetworkmonitor.addresource.md +0 -23
- package/docs/api/foundation-comms.defaultnetworkmonitor.create.md +0 -16
- package/docs/api/foundation-comms.defaultnetworkmonitor.destroy.md +0 -16
- package/docs/api/foundation-comms.defaultnetworkmonitor.md +0 -31
- package/docs/api/foundation-comms.defaultnetworkmonitor.removeresource.md +0 -22
- package/docs/api/foundation-comms.defaultnetworkmonitor.runallchecks.md +0 -11
- package/docs/api/foundation-comms.defaultnetworkmonitor.status.md +0 -12
- package/docs/api/foundation-comms.defaultnetworkmonitorconfig.md +0 -13
- package/docs/api/foundation-comms.defaultsocket._constructor_.md +0 -24
- package/docs/api/foundation-comms.defaultsocket.connect.md +0 -24
- package/docs/api/foundation-comms.defaultsocket.hasvalidsession.md +0 -13
- package/docs/api/foundation-comms.defaultsocket.isconfigured.md +0 -11
- package/docs/api/foundation-comms.defaultsocket.isconnected.md +0 -11
- package/docs/api/foundation-comms.defaultsocket.isconnectedsubject.md +0 -11
- package/docs/api/foundation-comms.defaultsocket.isconnecting.md +0 -11
- package/docs/api/foundation-comms.defaultsocket.isdisconnected.md +0 -11
- package/docs/api/foundation-comms.defaultsocket.isdisconnectedbyserver.md +0 -11
- package/docs/api/foundation-comms.defaultsocket.isreconnecting.md +0 -11
- package/docs/api/foundation-comms.defaultsocket.md +0 -44
- package/docs/api/foundation-comms.defaultsocket.reset.md +0 -15
- package/docs/api/foundation-comms.defaultsocket.send.md +0 -23
- package/docs/api/foundation-comms.defaultsocket.sendforstream.md +0 -25
- package/docs/api/foundation-comms.defaultsocket.socketmessages.md +0 -11
- package/docs/api/foundation-comms.defaultsocketstatus.closedclean.md +0 -11
- package/docs/api/foundation-comms.defaultsocketstatus.closedcode.md +0 -11
- package/docs/api/foundation-comms.defaultsocketstatus.closedreason.md +0 -11
- package/docs/api/foundation-comms.defaultsocketstatus.hasvalidsession.md +0 -11
- package/docs/api/foundation-comms.defaultsocketstatus.isconfigured.md +0 -11
- package/docs/api/foundation-comms.defaultsocketstatus.isconnected.md +0 -11
- package/docs/api/foundation-comms.defaultsocketstatus.isconnectedchanged.md +0 -15
- package/docs/api/foundation-comms.defaultsocketstatus.isconnectedsubject.md +0 -11
- package/docs/api/foundation-comms.defaultsocketstatus.isconnecting.md +0 -11
- package/docs/api/foundation-comms.defaultsocketstatus.isdisconnected.md +0 -11
- package/docs/api/foundation-comms.defaultsocketstatus.isdisconnectedbyserver.md +0 -11
- package/docs/api/foundation-comms.defaultsocketstatus.isreconnecting.md +0 -11
- package/docs/api/foundation-comms.defaultsocketstatus.isreconnectingchanged.md +0 -15
- package/docs/api/foundation-comms.defaultsocketstatus.md +0 -42
- package/docs/api/foundation-comms.defaultsocketstatus.onclose.md +0 -22
- package/docs/api/foundation-comms.defaultsocketstatus.reconnectionlimitreached.md +0 -11
- package/docs/api/foundation-comms.defaultsocketstatus.resetclosedstate.md +0 -15
- package/docs/api/foundation-comms.defaultsocketstatus.serialize.md +0 -15
- package/docs/api/foundation-comms.genesisconnectevents.md +0 -18
- package/docs/api/foundation-comms.getnetworkmonitor.md +0 -30
- package/docs/api/foundation-comms.getsocket.md +0 -30
- package/docs/api/foundation-comms.getsocketstatus.md +0 -30
- package/docs/api/foundation-comms.messagebuilder.createmorecolumnsmessage.md +0 -30
- package/docs/api/foundation-comms.messagehaserrorcode.md +0 -13
- package/docs/api/foundation-comms.metadataevent.md +0 -14
- package/docs/api/foundation-comms.metadataeventdetail.md +0 -18
- package/docs/api/foundation-comms.metadataeventtype.md +0 -12
- package/docs/api/foundation-comms.monitoredresource.md +0 -15
- package/docs/api/foundation-comms.monitoredresourcechecks.md +0 -15
- package/docs/api/foundation-comms.monitoredresourcechecksresult.isconnected.md +0 -11
- package/docs/api/foundation-comms.monitoredresourcechecksresult.lastmessage.md +0 -11
- package/docs/api/foundation-comms.monitoredresourcechecksresult.lastupdated.md +0 -11
- package/docs/api/foundation-comms.monitoredresourcechecksresult.md +0 -23
- package/docs/api/foundation-comms.monitoredresourcechecksresult.timeout.md +0 -11
- package/docs/api/foundation-comms.monitoredresourcedatalogon.md +0 -15
- package/docs/api/foundation-comms.monitoredresourcemetadata.md +0 -15
- package/docs/api/foundation-comms.networklogger.md +0 -12
- package/docs/api/foundation-comms.networkmonitor.addresource.md +0 -23
- package/docs/api/foundation-comms.networkmonitor.create.md +0 -15
- package/docs/api/foundation-comms.networkmonitor.destroy.md +0 -15
- package/docs/api/foundation-comms.networkmonitor.md +0 -34
- package/docs/api/foundation-comms.networkmonitor.removeresource.md +0 -22
- package/docs/api/foundation-comms.networkmonitor.runallchecks.md +0 -23
- package/docs/api/foundation-comms.networkmonitor.status.md +0 -11
- package/docs/api/foundation-comms.networkmonitorconfig.checkinterval.md +0 -13
- package/docs/api/foundation-comms.networkmonitorconfig.checktimeout.md +0 -13
- package/docs/api/foundation-comms.networkmonitorconfig.documentevents.md +0 -13
- package/docs/api/foundation-comms.networkmonitorconfig.eventemitter.md +0 -13
- package/docs/api/foundation-comms.networkmonitorconfig.genesisconnectevents.md +0 -13
- package/docs/api/foundation-comms.networkmonitorconfig.md +0 -27
- package/docs/api/foundation-comms.networkmonitorconfig.resourcechecks.md +0 -13
- package/docs/api/foundation-comms.networkmonitorconfig.resourcedatalogon.md +0 -18
- package/docs/api/foundation-comms.networkmonitorconfig.windowevents.md +0 -13
- package/docs/api/foundation-comms.resourcehealth.md +0 -19
- package/docs/api/foundation-comms.serializedsocketstatus.closedclean.md +0 -11
- package/docs/api/foundation-comms.serializedsocketstatus.closedcode.md +0 -11
- package/docs/api/foundation-comms.serializedsocketstatus.closedreason.md +0 -11
- package/docs/api/foundation-comms.serializedsocketstatus.hasvalidsession.md +0 -11
- package/docs/api/foundation-comms.serializedsocketstatus.isconfigured.md +0 -13
- package/docs/api/foundation-comms.serializedsocketstatus.isconnected.md +0 -11
- package/docs/api/foundation-comms.serializedsocketstatus.isconnecting.md +0 -11
- package/docs/api/foundation-comms.serializedsocketstatus.isdisconnected.md +0 -11
- package/docs/api/foundation-comms.serializedsocketstatus.isdisconnectedbyserver.md +0 -11
- package/docs/api/foundation-comms.serializedsocketstatus.isreconnecting.md +0 -11
- package/docs/api/foundation-comms.serializedsocketstatus.md +0 -30
- package/docs/api/foundation-comms.serializedsocketstatus.reconnectionlimitreached.md +0 -11
- package/docs/api/foundation-comms.socketstatus.md +0 -28
- package/docs/api/foundation-comms.socketstatus.onclose.md +0 -22
- package/docs/api/foundation-comms.socketstatus.serialize.md +0 -15
- package/docs/api/foundation-comms.streamcompleteevent.md +0 -14
- package/docs/api/foundation-comms.streamcompleteeventtype.md +0 -12
- package/docs/api/foundation-comms.streamevent.md +0 -14
- package/docs/api/foundation-comms.streameventdetail.md +0 -19
- package/docs/api/foundation-comms.streameventfunctions.md +0 -19
- package/docs/api/foundation-comms.streameventtype.md +0 -12
- package/docs/api/foundation-comms.systemhealthchanged.md +0 -13
- package/docs/api/foundation-comms.systemhealthchangedevent.md +0 -15
- package/docs/api/foundation-comms.systemhealthstatus.md +0 -29
- package/docs/api/foundation-comms.user.set.md +0 -22
- package/docs/api/foundation-comms.user.unset.md +0 -15
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.167.3-alpha-
|
4
|
+
"version": "14.167.3-alpha-69ba23f.0",
|
5
5
|
"sideEffects": false,
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
7
7
|
"main": "dist/esm/index.js",
|
@@ -66,13 +66,13 @@
|
|
66
66
|
"test:debug": "genx test --debug"
|
67
67
|
},
|
68
68
|
"devDependencies": {
|
69
|
-
"@genesislcap/foundation-testing": "14.167.3-alpha-
|
70
|
-
"@genesislcap/genx": "14.167.3-alpha-
|
71
|
-
"@genesislcap/rollup-builder": "14.167.3-alpha-
|
72
|
-
"@genesislcap/ts-builder": "14.167.3-alpha-
|
73
|
-
"@genesislcap/uvu-playwright-builder": "14.167.3-alpha-
|
74
|
-
"@genesislcap/vite-builder": "14.167.3-alpha-
|
75
|
-
"@genesislcap/webpack-builder": "14.167.3-alpha-
|
69
|
+
"@genesislcap/foundation-testing": "14.167.3-alpha-69ba23f.0",
|
70
|
+
"@genesislcap/genx": "14.167.3-alpha-69ba23f.0",
|
71
|
+
"@genesislcap/rollup-builder": "14.167.3-alpha-69ba23f.0",
|
72
|
+
"@genesislcap/ts-builder": "14.167.3-alpha-69ba23f.0",
|
73
|
+
"@genesislcap/uvu-playwright-builder": "14.167.3-alpha-69ba23f.0",
|
74
|
+
"@genesislcap/vite-builder": "14.167.3-alpha-69ba23f.0",
|
75
|
+
"@genesislcap/webpack-builder": "14.167.3-alpha-69ba23f.0",
|
76
76
|
"@types/js-cookie": "^3.0.2",
|
77
77
|
"@types/json-schema": "^7.0.11",
|
78
78
|
"@types/webappsec-credential-management": "^0.6.2",
|
@@ -80,13 +80,11 @@
|
|
80
80
|
},
|
81
81
|
"dependencies": {
|
82
82
|
"@finos/fdc3": "^1.2.0",
|
83
|
-
"@genesislcap/foundation-logger": "14.167.3-alpha-
|
84
|
-
"@genesislcap/foundation-utils": "14.167.3-alpha-
|
83
|
+
"@genesislcap/foundation-logger": "14.167.3-alpha-69ba23f.0",
|
84
|
+
"@genesislcap/foundation-utils": "14.167.3-alpha-69ba23f.0",
|
85
85
|
"@microsoft/fast-element": "^1.12.0",
|
86
86
|
"@microsoft/fast-foundation": "^2.49.4",
|
87
87
|
"analytics": "^0.8.0",
|
88
|
-
"bowser": "^2.11.0",
|
89
|
-
"http-status-codes": "^2.2.0",
|
90
88
|
"js-cookie": "^3.0.1",
|
91
89
|
"json-schema": "^0.4.0",
|
92
90
|
"rxjs": "^7.5.4",
|
@@ -100,5 +98,5 @@
|
|
100
98
|
"publishConfig": {
|
101
99
|
"access": "public"
|
102
100
|
},
|
103
|
-
"gitHead": "
|
101
|
+
"gitHead": "181f6eb8a074dea1a432c628141688c39163fbfd"
|
104
102
|
}
|
@@ -1,173 +0,0 @@
|
|
1
|
-
import { Listener } from '@genesislcap/foundation-utils';
|
2
|
-
import type { MonitoredResourceChecks, MonitoredResourceDataLogon } from '../networkMonitor';
|
3
|
-
import type { Message, MessageDetails } from './message';
|
4
|
-
import type { SocketObservable } from './socket';
|
5
|
-
/**
|
6
|
-
* @public
|
7
|
-
*/
|
8
|
-
export declare const CommitEventType = "connect-commit-event";
|
9
|
-
/**
|
10
|
-
* @public
|
11
|
-
*/
|
12
|
-
export type CommitEventDetail = {
|
13
|
-
eventName: string;
|
14
|
-
message: Message;
|
15
|
-
};
|
16
|
-
/**
|
17
|
-
* @public
|
18
|
-
*/
|
19
|
-
export type CommitEvent = CustomEvent<CommitEventDetail>;
|
20
|
-
/**
|
21
|
-
* @public
|
22
|
-
*/
|
23
|
-
export type StreamEventFunctions = {
|
24
|
-
onMessage?: Function;
|
25
|
-
onError?: Function;
|
26
|
-
resourceChecks?: MonitoredResourceChecks;
|
27
|
-
resourceDataLogon?: MonitoredResourceDataLogon;
|
28
|
-
};
|
29
|
-
/**
|
30
|
-
* @public
|
31
|
-
*/
|
32
|
-
export declare const StreamEventType = "connect-stream-event";
|
33
|
-
/**
|
34
|
-
* @public
|
35
|
-
*/
|
36
|
-
export type StreamEventDetail = {
|
37
|
-
functions: StreamEventFunctions;
|
38
|
-
message: Message<MessageDetails.DataserverRequest>;
|
39
|
-
resourceName: string;
|
40
|
-
stream: SocketObservable<any>;
|
41
|
-
};
|
42
|
-
/**
|
43
|
-
* @public
|
44
|
-
*/
|
45
|
-
export type StreamEvent = CustomEvent<StreamEventDetail>;
|
46
|
-
/**
|
47
|
-
* @public
|
48
|
-
*/
|
49
|
-
export declare const StreamCompleteEventType = "connect-stream-complete-event";
|
50
|
-
/**
|
51
|
-
* @public
|
52
|
-
*/
|
53
|
-
export type StreamCompleteEvent = CustomEvent<SocketObservable<any>>;
|
54
|
-
/**
|
55
|
-
* @public
|
56
|
-
*/
|
57
|
-
export declare const MetadataEventType = "connect-metadata-event";
|
58
|
-
/**
|
59
|
-
* @public
|
60
|
-
*/
|
61
|
-
export type MetadataEventDetail = {
|
62
|
-
resourceName: string;
|
63
|
-
message: Message<MessageDetails.MetaRequest>;
|
64
|
-
error?: any;
|
65
|
-
};
|
66
|
-
/**
|
67
|
-
* @public
|
68
|
-
*/
|
69
|
-
export type MetadataEvent = CustomEvent<MetadataEventDetail>;
|
70
|
-
/**
|
71
|
-
* `ConnectEvents` provide hooks to respond to specific connect events.
|
72
|
-
*
|
73
|
-
* @public
|
74
|
-
*/
|
75
|
-
export interface ConnectEvents {
|
76
|
-
/**
|
77
|
-
* Add a stream listener.
|
78
|
-
* @param listener - A listener callback function.
|
79
|
-
* @param complete - A complete listener callback function.
|
80
|
-
*/
|
81
|
-
addStreamListener(listener: Listener<StreamEvent>, complete: Listener<StreamCompleteEvent>): () => void;
|
82
|
-
/**
|
83
|
-
* Add a commit listener.
|
84
|
-
* @param listener - A listener callback function.
|
85
|
-
*/
|
86
|
-
addCommitListener(listener: Listener<CommitEvent>): () => void;
|
87
|
-
/**
|
88
|
-
* Add a metadata listener.
|
89
|
-
* @param listener - A listener callback function.
|
90
|
-
*/
|
91
|
-
addMetadataListener(listener: Listener<MetadataEvent>): () => void;
|
92
|
-
}
|
93
|
-
/**
|
94
|
-
* `ConnectEventsEmitter` provide event emitting hooks to Connect.
|
95
|
-
*
|
96
|
-
* @public
|
97
|
-
*/
|
98
|
-
export interface ConnectEventsEmitter extends ConnectEvents {
|
99
|
-
/**
|
100
|
-
* Called by Connect.
|
101
|
-
* @param resourceName - The name of the resource.
|
102
|
-
* @param message - The message.
|
103
|
-
* @param stream - The actual stream itself.
|
104
|
-
* @param functions - Any functions provided.
|
105
|
-
*/
|
106
|
-
onStreamEvent(resourceName: string, message: Message<MessageDetails.DataserverRequest>, stream: SocketObservable<any>, functions: StreamEventFunctions): void;
|
107
|
-
/**
|
108
|
-
* Called by Connect.
|
109
|
-
* @param stream - The actual stream itself.
|
110
|
-
*/
|
111
|
-
onStreamCompleteEvent(stream: SocketObservable<any>): void;
|
112
|
-
/**
|
113
|
-
* Called by Connect.
|
114
|
-
* @param eventName - The name of the event.
|
115
|
-
* @param message - The message.
|
116
|
-
*/
|
117
|
-
onCommitEvent(eventName: string, message: Message): void;
|
118
|
-
/**
|
119
|
-
* Called by Connect.
|
120
|
-
* @param resourceName - The name of the resource.
|
121
|
-
* @param message - The message.
|
122
|
-
* @param error - Optional error.
|
123
|
-
*/
|
124
|
-
onMetadataEvent(resourceName: string, message: Message<MessageDetails.MetaRequest>, error?: any): void;
|
125
|
-
}
|
126
|
-
/**
|
127
|
-
* Default ConnectEvents implementation.
|
128
|
-
* @public
|
129
|
-
*/
|
130
|
-
export declare class DefaultConnectEvents implements ConnectEventsEmitter {
|
131
|
-
/** @internal */
|
132
|
-
protected streamListeners: import("@genesislcap/foundation-utils").Observer<StreamEvent>;
|
133
|
-
/** @internal */
|
134
|
-
protected streamCompleteListeners: import("@genesislcap/foundation-utils").Observer<StreamCompleteEvent>;
|
135
|
-
/** {@inheritDoc ConnectEvents.addStreamListener} */
|
136
|
-
addStreamListener(listener: Listener<StreamEvent>, complete: Listener<StreamCompleteEvent>): () => void;
|
137
|
-
/** {@inheritDoc ConnectEventsEmitter.onStreamEvent} */
|
138
|
-
onStreamEvent(resourceName: string, message: Message<MessageDetails.DataserverRequest>, stream: SocketObservable<any>, functions: StreamEventFunctions): void;
|
139
|
-
/** {@inheritDoc ConnectEventsEmitter.onStreamCompleteEvent} */
|
140
|
-
onStreamCompleteEvent(stream: SocketObservable<any>): void;
|
141
|
-
/** @internal */
|
142
|
-
protected commitListeners: import("@genesislcap/foundation-utils").Observer<CommitEvent>;
|
143
|
-
/** {@inheritDoc ConnectEvents.addCommitListener} */
|
144
|
-
addCommitListener(listener: Listener<CommitEvent>): () => void;
|
145
|
-
/** {@inheritDoc ConnectEventsEmitter.onStreamEvent} */
|
146
|
-
onCommitEvent(eventName: string, message: Message): void;
|
147
|
-
/** @internal */
|
148
|
-
protected metadataListeners: import("@genesislcap/foundation-utils").Observer<MetadataEvent>;
|
149
|
-
/** {@inheritDoc ConnectEvents.addMetadataListener} */
|
150
|
-
addMetadataListener(listener: Listener<MetadataEvent>): () => void;
|
151
|
-
/** {@inheritDoc ConnectEventsEmitter.onMetadataEvent} */
|
152
|
-
onMetadataEvent(resourceName: string, message: Message<MessageDetails.MetaRequest>, error?: any): void;
|
153
|
-
}
|
154
|
-
/**
|
155
|
-
* ConnectEvents DI key.
|
156
|
-
*
|
157
|
-
* @privateRemarks
|
158
|
-
* Marked as internal to stop api-extractor becoming confused cross-linking tokens with the same name.
|
159
|
-
*
|
160
|
-
* @internal
|
161
|
-
*/
|
162
|
-
export declare const ConnectEvents: import("@microsoft/fast-foundation").InterfaceSymbol<ConnectEvents>;
|
163
|
-
/**
|
164
|
-
* ConnectEventsEmitter DI key.
|
165
|
-
*
|
166
|
-
* @privateRemarks
|
167
|
-
* ConnectEventsEmitter is used by Connect.
|
168
|
-
* Marked as internal to stop api-extractor becoming confused cross-linking tokens with the same name.
|
169
|
-
*
|
170
|
-
* @internal
|
171
|
-
*/
|
172
|
-
export declare const ConnectEventsEmitter: import("@microsoft/fast-foundation").InterfaceSymbol<ConnectEventsEmitter>;
|
173
|
-
//# sourceMappingURL=connect.events.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"connect.events.d.ts","sourceRoot":"","sources":["../../../src/connect/connect.events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAEzE,OAAO,KAAK,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAC7F,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD;;GAEG;AACH,eAAO,MAAM,eAAe,yBAAyB,CAAC;AAEtD;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,WAAW,CAAC,iBAAiB,CAAC,CAAC;AAEzD;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,SAAS,CAAC,EAAE,QAAQ,CAAC;IACrB,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,cAAc,CAAC,EAAE,uBAAuB,CAAC;IACz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,EAAE,QAAQ,CAAC,WAAW,CAAC;IAIjD,uDAAuD;IAChD,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO;IAWxD,gBAAgB;IAChB,SAAS,CAAC,iBAAiB,kEAAmC;IAE9D,sDAAsD;IACtD,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,CAAC,aAAa,CAAC;IAIrD,yDAAyD;IAClD,eAAe,CACpB,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,OAAO,CAAC,cAAc,CAAC,WAAW,CAAC,EAC5C,KAAK,CAAC,EAAE,GAAG;CAYd;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,qEAEzB,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,4EAEhC,CAAC"}
|
@@ -1,79 +0,0 @@
|
|
1
|
-
import { BehaviorSubject } from 'rxjs';
|
2
|
-
/**
|
3
|
-
* `SerializedSocketStatus` provides the serialize state of the web socket.
|
4
|
-
* @public
|
5
|
-
*/
|
6
|
-
export interface SerializedSocketStatus {
|
7
|
-
/**
|
8
|
-
* When the socket has been configured for use.
|
9
|
-
*/
|
10
|
-
isConfigured: boolean;
|
11
|
-
isConnecting: boolean;
|
12
|
-
isConnected: boolean;
|
13
|
-
isDisconnected: boolean;
|
14
|
-
isDisconnectedByServer: boolean;
|
15
|
-
isReconnecting: boolean;
|
16
|
-
reconnectionLimitReached: boolean;
|
17
|
-
hasValidSession: boolean;
|
18
|
-
readonly closedCode: number;
|
19
|
-
readonly closedReason: string;
|
20
|
-
readonly closedClean: boolean;
|
21
|
-
}
|
22
|
-
/**
|
23
|
-
* `SocketStatus` provides the state of the web socket.
|
24
|
-
* @public
|
25
|
-
*/
|
26
|
-
export interface SocketStatus extends SerializedSocketStatus {
|
27
|
-
isConnectedSubject: BehaviorSubject<boolean>;
|
28
|
-
serialize(): SerializedSocketStatus;
|
29
|
-
onClose(closeEvent: CloseEvent): void;
|
30
|
-
}
|
31
|
-
/**
|
32
|
-
* Default SocketStatus implementation.
|
33
|
-
* @public
|
34
|
-
*/
|
35
|
-
export declare class DefaultSocketStatus implements SocketStatus {
|
36
|
-
isConfigured: boolean;
|
37
|
-
isConnecting: boolean;
|
38
|
-
isConnected: boolean;
|
39
|
-
isReconnecting: boolean;
|
40
|
-
reconnectionLimitReached: boolean;
|
41
|
-
hasValidSession: boolean;
|
42
|
-
closedCode: any;
|
43
|
-
closedReason: any;
|
44
|
-
closedClean: any;
|
45
|
-
get isDisconnected(): boolean;
|
46
|
-
get isDisconnectedByServer(): boolean;
|
47
|
-
isConnectedSubject: BehaviorSubject<boolean>;
|
48
|
-
protected isConnectedChanged(): void;
|
49
|
-
protected isReconnectingChanged(): void;
|
50
|
-
protected resetClosedState(): void;
|
51
|
-
serialize(): SerializedSocketStatus;
|
52
|
-
onClose(event: CloseEvent): void;
|
53
|
-
}
|
54
|
-
/**
|
55
|
-
* SocketStatus DI key.
|
56
|
-
*
|
57
|
-
* @privateRemarks
|
58
|
-
* Marked as internal to stop api-extractor becoming confused cross-linking tokens with the same name.
|
59
|
-
*
|
60
|
-
* @internal
|
61
|
-
*/
|
62
|
-
export declare const SocketStatus: import("@microsoft/fast-foundation").InterfaceSymbol<SocketStatus>;
|
63
|
-
/**
|
64
|
-
* Gets SocketStatus from the DI container.
|
65
|
-
*
|
66
|
-
* @remarks
|
67
|
-
* A utility method for host applications that are not using decorators or the DI container.
|
68
|
-
*
|
69
|
-
* @example
|
70
|
-
* ```ts
|
71
|
-
* import { getSocketStatus } from '@genesislcap/foundation-comms';
|
72
|
-
* ...
|
73
|
-
* private socketStatus = getSocketStatus();
|
74
|
-
* ```
|
75
|
-
*
|
76
|
-
* @public
|
77
|
-
*/
|
78
|
-
export declare function getSocketStatus(): SocketStatus;
|
79
|
-
//# sourceMappingURL=socket.status.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"socket.status.d.ts","sourceRoot":"","sources":["../../../src/connect/socket.status.ts"],"names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e,IAAI,YAAY,CAE9C"}
|
@@ -1,56 +0,0 @@
|
|
1
|
-
import type { GenesisConnectEvents, MonitoredResourceChecks, MonitoredResourceDataLogon } from './types';
|
2
|
-
/**
|
3
|
-
* NetworkMonitorConfig DI interface.
|
4
|
-
*
|
5
|
-
* @public
|
6
|
-
*/
|
7
|
-
export interface NetworkMonitorConfig {
|
8
|
-
/**
|
9
|
-
* Window events that invoke checks
|
10
|
-
*/
|
11
|
-
windowEvents?: (keyof WindowEventHandlersEventMap)[];
|
12
|
-
/**
|
13
|
-
* Document events that invoke checks
|
14
|
-
*/
|
15
|
-
documentEvents?: (keyof DocumentEventMap)[];
|
16
|
-
/**
|
17
|
-
* Genesis connect events that invoke checks
|
18
|
-
*/
|
19
|
-
genesisConnectEvents?: GenesisConnectEvents[];
|
20
|
-
/**
|
21
|
-
* Periodic check internal in ms
|
22
|
-
*/
|
23
|
-
checkInterval?: number;
|
24
|
-
/**
|
25
|
-
* Check timeout in ms
|
26
|
-
*/
|
27
|
-
checkTimeout?: number;
|
28
|
-
/**
|
29
|
-
* Default resource checks function
|
30
|
-
*/
|
31
|
-
resourceChecks?: MonitoredResourceChecks;
|
32
|
-
/**
|
33
|
-
* Default resource data logon function
|
34
|
-
* @remarks
|
35
|
-
* Used to re-attempt data logon on an unhealthy data server
|
36
|
-
*/
|
37
|
-
resourceDataLogon?: MonitoredResourceDataLogon;
|
38
|
-
/**
|
39
|
-
* The element to emit events from
|
40
|
-
*/
|
41
|
-
eventEmitter?: HTMLElement;
|
42
|
-
}
|
43
|
-
/**
|
44
|
-
* Default NetworkMonitorConfig DI implementation.
|
45
|
-
* @public
|
46
|
-
*/
|
47
|
-
export declare const defaultNetworkMonitorConfig: NetworkMonitorConfig;
|
48
|
-
/**
|
49
|
-
* NetworkMonitorConfig DI key.
|
50
|
-
*
|
51
|
-
* @internal
|
52
|
-
* @privateRemarks
|
53
|
-
* Marked as internal to stop api-extractor becoming confused cross-linking tokens with the same name.
|
54
|
-
*/
|
55
|
-
export declare const NetworkMonitorConfig: import("@microsoft/fast-foundation").InterfaceSymbol<NetworkMonitorConfig>;
|
56
|
-
//# sourceMappingURL=config.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/networkMonitor/config.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,oBAAoB,EACpB,uBAAuB,EACvB,0BAA0B,EAC3B,MAAM,SAAS,CAAC;AAEjB;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,MAAM,2BAA2B,CAAC,EAAE,CAAC;IACrD;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,MAAM,gBAAgB,CAAC,EAAE,CAAC;IAC5C;;OAEG;IACH,oBAAoB,CAAC,EAAE,oBAAoB,EAAE,CAAC;IAC9C;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,cAAc,CAAC,EAAE,uBAAuB,CAAC;IACzC;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,0BAA0B,CAAC;IAC/C;;OAEG;IACH,YAAY,CAAC,EAAE,WAAW,CAAC;CAC5B;AAED;;;GAGG;AACH,eAAO,MAAM,2BAA2B,EAAE,oBA4BzC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,4EAEhC,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/networkMonitor/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC"}
|
@@ -1,193 +0,0 @@
|
|
1
|
-
import { ConnectEvents } from '../connect/connect.events';
|
2
|
-
import { SerializedSocketStatus, SocketStatus } from '../connect/socket.status';
|
3
|
-
import { User } from '../user/user';
|
4
|
-
import { NetworkMonitorConfig } from './config';
|
5
|
-
import { MonitoredResource, MonitoredResourceMetadata, ResourceHealth, SystemHealthStatus } from './types';
|
6
|
-
/**
|
7
|
-
* @public
|
8
|
-
*/
|
9
|
-
export declare const networkLogger: import("@genesislcap/foundation-logger").Logger;
|
10
|
-
/**
|
11
|
-
* `NetworkMonitor` monitors network and resource availability and health.
|
12
|
-
*
|
13
|
-
* @remarks
|
14
|
-
* UIs can listen for 'system-health-changed' events and display visual overlays to communicate status to the user.
|
15
|
-
*
|
16
|
-
* @public
|
17
|
-
*/
|
18
|
-
export interface NetworkMonitor {
|
19
|
-
status: SystemHealthStatus;
|
20
|
-
create(): void;
|
21
|
-
destroy(): void;
|
22
|
-
/**
|
23
|
-
* @param source - The source of the call, which may have been an event or scheduled interval.
|
24
|
-
* @param force - A flag to bypass abort if already in progress logic.
|
25
|
-
*/
|
26
|
-
runAllChecks(source?: unknown, force?: boolean): Promise<void>;
|
27
|
-
/**
|
28
|
-
* @param resource - The resource reference.
|
29
|
-
* @param metadata - The resource metadata.
|
30
|
-
*/
|
31
|
-
addResource(resource: MonitoredResource, metadata: MonitoredResourceMetadata): void;
|
32
|
-
/**
|
33
|
-
* @param resource - The resource reference.
|
34
|
-
*/
|
35
|
-
removeResource(resource: MonitoredResource): void;
|
36
|
-
}
|
37
|
-
/**
|
38
|
-
* Default NetworkMonitor implementation.
|
39
|
-
* @public
|
40
|
-
*/
|
41
|
-
export declare class DefaultNetworkMonitor implements NetworkMonitor {
|
42
|
-
/**
|
43
|
-
* High-level configuration.
|
44
|
-
* @internal
|
45
|
-
*/
|
46
|
-
protected config: NetworkMonitorConfig;
|
47
|
-
/**
|
48
|
-
* @internal
|
49
|
-
*/
|
50
|
-
protected socketStatus: SocketStatus;
|
51
|
-
/**
|
52
|
-
* @internal
|
53
|
-
*/
|
54
|
-
protected connectEvents: ConnectEvents;
|
55
|
-
/**
|
56
|
-
* @internal
|
57
|
-
*/
|
58
|
-
protected user: User;
|
59
|
-
/**
|
60
|
-
* @internal
|
61
|
-
*/
|
62
|
-
protected unsubscribableObservers: any[];
|
63
|
-
/**
|
64
|
-
* @privateRemarks
|
65
|
-
* Originally aimed to use WeakMap for resources, but need to iterate and process these. I also had a
|
66
|
-
* `this.registry = new FinalizationRegistry<any>(this.registryCleanup);` in the mix to handle clean up actions.
|
67
|
-
*
|
68
|
-
* @internal
|
69
|
-
*/
|
70
|
-
protected resources: Map<MonitoredResource, MonitoredResourceMetadata>;
|
71
|
-
/**
|
72
|
-
* @internal
|
73
|
-
*/
|
74
|
-
protected internalId: ReturnType<typeof setInterval>;
|
75
|
-
/**
|
76
|
-
* @internal
|
77
|
-
*/
|
78
|
-
protected isRunningChecks: boolean;
|
79
|
-
/**
|
80
|
-
* {@inheritDoc NetworkMonitor.status}
|
81
|
-
*/
|
82
|
-
status: SystemHealthStatus;
|
83
|
-
/**
|
84
|
-
* {@inheritDoc NetworkMonitor.create}
|
85
|
-
*/
|
86
|
-
create(): void;
|
87
|
-
/**
|
88
|
-
* {@inheritDoc NetworkMonitor.destroy}
|
89
|
-
*/
|
90
|
-
destroy(): void;
|
91
|
-
/**
|
92
|
-
* @internal
|
93
|
-
*/
|
94
|
-
protected isOnlineCheck(): Promise<boolean>;
|
95
|
-
/**
|
96
|
-
* {@inheritDoc NetworkMonitor.runAllChecks}
|
97
|
-
*/
|
98
|
-
runAllChecks: (source?: unknown, force?: boolean) => Promise<void>;
|
99
|
-
/**
|
100
|
-
* {@inheritDoc NetworkMonitor.addResource}
|
101
|
-
*/
|
102
|
-
addResource(resource: MonitoredResource, metadata: MonitoredResourceMetadata): void;
|
103
|
-
/**
|
104
|
-
* {@inheritDoc NetworkMonitor.removeResource}
|
105
|
-
*/
|
106
|
-
removeResource(resource: MonitoredResource): void;
|
107
|
-
/**
|
108
|
-
* @internal
|
109
|
-
*/
|
110
|
-
protected addListeners(): void;
|
111
|
-
/**
|
112
|
-
* @internal
|
113
|
-
*/
|
114
|
-
protected removeListeners(): void;
|
115
|
-
/**
|
116
|
-
* @internal
|
117
|
-
*/
|
118
|
-
protected reportSystemHealth(detail: Partial<SystemHealthStatus>): void;
|
119
|
-
/**
|
120
|
-
* @internal
|
121
|
-
*/
|
122
|
-
protected reportStabilityToGenesis(detail: Partial<SystemHealthStatus>): Promise<boolean>;
|
123
|
-
/**
|
124
|
-
* @remarks
|
125
|
-
* Deal with false positives.
|
126
|
-
*
|
127
|
-
* @privateRemarks
|
128
|
-
* There's an argument here for and against normalising ResourceHealth. I think it's more useful to consumers like
|
129
|
-
* visual overlays if there is no conflicting information. If we're offline and using the cache, then that should be
|
130
|
-
* reflected here.
|
131
|
-
*
|
132
|
-
* @internal
|
133
|
-
*/
|
134
|
-
protected normaliseResourceHealth(health: ResourceHealth, isOnline?: boolean): ResourceHealth;
|
135
|
-
/**
|
136
|
-
* @remarks
|
137
|
-
* Deal with false positives.
|
138
|
-
*
|
139
|
-
* @privateRemarks
|
140
|
-
* There's an argument here for and against a normalised SerializedSocketStatus. I think it's more useful to consumers
|
141
|
-
* like visual overlays if there is no conflicting information. If we're offline and using the cache, then that
|
142
|
-
* should be reflected here.
|
143
|
-
*
|
144
|
-
* @internal
|
145
|
-
*/
|
146
|
-
protected normaliseSerializedSocketStatus(socketStatus: SerializedSocketStatus, isOnline?: boolean): SerializedSocketStatus;
|
147
|
-
/**
|
148
|
-
* @internal
|
149
|
-
*/
|
150
|
-
protected normaliseEventDetail(detail: Partial<SystemHealthStatus>): SystemHealthStatus;
|
151
|
-
/**
|
152
|
-
* @internal
|
153
|
-
*/
|
154
|
-
protected getFormattedTimestamp(milliseconds: number): string;
|
155
|
-
/**
|
156
|
-
* @internal
|
157
|
-
*/
|
158
|
-
protected getNowTimestamp(): number;
|
159
|
-
/**
|
160
|
-
* @internal
|
161
|
-
*/
|
162
|
-
protected getNextTimestamp(): number;
|
163
|
-
/**
|
164
|
-
* @internal
|
165
|
-
*/
|
166
|
-
protected synchroniseCheckInterval(): void;
|
167
|
-
}
|
168
|
-
/**
|
169
|
-
* NetworkMonitor DI key.
|
170
|
-
*
|
171
|
-
* @privateRemarks
|
172
|
-
* Marked as internal to stop api-extractor becoming confused cross-linking tokens with the same name.
|
173
|
-
*
|
174
|
-
* @internal
|
175
|
-
*/
|
176
|
-
export declare const NetworkMonitor: import("@microsoft/fast-foundation").InterfaceSymbol<NetworkMonitor>;
|
177
|
-
/**
|
178
|
-
* Gets NetworkMonitor from the DI container.
|
179
|
-
*
|
180
|
-
* @remarks
|
181
|
-
* A utility method for host applications that are not using decorators or the DI container.
|
182
|
-
*
|
183
|
-
* @example
|
184
|
-
* ```ts
|
185
|
-
* import { getNetworkMonitor } from '@genesislcap/foundation-comms';
|
186
|
-
* ...
|
187
|
-
* private monitor = getNetworkMonitor();
|
188
|
-
* ```
|
189
|
-
*
|
190
|
-
* @public
|
191
|
-
*/
|
192
|
-
export declare function getNetworkMonitor(): NetworkMonitor;
|
193
|
-
//# sourceMappingURL=service.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../src/networkMonitor/service.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAG1D,OAAO,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAChF,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EACL,iBAAiB,EAEjB,yBAAyB,EACzB,cAAc,EAEd,kBAAkB,EACnB,MAAM,SAAS,CAAC;AAEjB;;GAEG;AACH,eAAO,MAAM,aAAa,iDAA4D,CAAC;AAsBvF;;;;;;;GAOG;AACH,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,kBAAkB,CAAC;IAC3B,MAAM,IAAI,IAAI,CAAC;IACf,OAAO,IAAI,IAAI,CAAC;IAChB;;;OAGG;IACH,YAAY,CA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