@genesislcap/foundation-comms 14.167.2 → 14.167.3-alpha-b40d1e5.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 +11 -1
- package/dist/dts/connect/connect.d.ts.map +1 -1
- package/dist/dts/connect/connect.events.d.ts +173 -0
- package/dist/dts/connect/connect.events.d.ts.map +1 -0
- package/dist/dts/connect/http.connect.d.ts +1 -0
- package/dist/dts/connect/http.connect.d.ts.map +1 -1
- package/dist/dts/connect/index.d.ts +2 -0
- package/dist/dts/connect/index.d.ts.map +1 -1
- package/dist/dts/connect/message.d.ts +51 -0
- package/dist/dts/connect/message.d.ts.map +1 -1
- package/dist/dts/connect/socket.d.ts +72 -8
- package/dist/dts/connect/socket.d.ts.map +1 -1
- package/dist/dts/connect/socket.status.d.ts +79 -0
- package/dist/dts/connect/socket.status.d.ts.map +1 -0
- package/dist/dts/datasource/datasource.d.ts +9 -0
- package/dist/dts/datasource/datasource.d.ts.map +1 -1
- package/dist/dts/fdc3/fdc3.d.ts +17 -1
- package/dist/dts/fdc3/fdc3.d.ts.map +1 -1
- package/dist/dts/index.d.ts +1 -0
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/dts/networkMonitor/config.d.ts +56 -0
- package/dist/dts/networkMonitor/config.d.ts.map +1 -0
- package/dist/dts/networkMonitor/index.d.ts +4 -0
- package/dist/dts/networkMonitor/index.d.ts.map +1 -0
- package/dist/dts/networkMonitor/service.d.ts +193 -0
- package/dist/dts/networkMonitor/service.d.ts.map +1 -0
- package/dist/dts/networkMonitor/types.d.ts +133 -0
- package/dist/dts/networkMonitor/types.d.ts.map +1 -0
- package/dist/dts/testing/mocks/connect/connect.d.ts +1 -0
- package/dist/dts/testing/mocks/connect/connect.d.ts.map +1 -1
- package/dist/dts/testing/mocks/connect/socket.d.ts +5 -1
- package/dist/dts/testing/mocks/connect/socket.d.ts.map +1 -1
- package/dist/dts/testing/mocks/datasource/datasource.d.ts +1 -0
- package/dist/dts/testing/mocks/datasource/datasource.d.ts.map +1 -1
- package/dist/dts/user/user.d.ts +15 -0
- package/dist/dts/user/user.d.ts.map +1 -1
- package/dist/esm/auth/auth.js +5 -2
- package/dist/esm/connect/connect.events.js +113 -0
- package/dist/esm/connect/connect.js +30 -8
- package/dist/esm/connect/http.connect.js +6 -0
- package/dist/esm/connect/index.js +2 -0
- package/dist/esm/connect/message.js +25 -4
- package/dist/esm/connect/socket.js +113 -44
- package/dist/esm/connect/socket.status.js +119 -0
- package/dist/esm/datasource/datasource.js +18 -8
- package/dist/esm/fdc3/fdc3.js +4 -4
- package/dist/esm/index.js +1 -0
- package/dist/esm/networkMonitor/config.js +46 -0
- package/dist/esm/networkMonitor/index.js +3 -0
- package/dist/esm/networkMonitor/service.js +432 -0
- package/dist/esm/networkMonitor/types.js +5 -0
- package/dist/esm/testing/mocks/connect/connect.js +3 -0
- package/dist/esm/testing/mocks/connect/socket.js +1 -1
- package/dist/esm/testing/mocks/datasource/datasource.js +1 -0
- package/dist/esm/user/user.js +22 -1
- package/dist/foundation-comms.api.json +14711 -8166
- package/dist/foundation-comms.d.ts +841 -13
- package/docs/api/foundation-comms.commitevent.md +14 -0
- package/docs/api/foundation-comms.commiteventdetail.md +17 -0
- package/docs/api/foundation-comms.commiteventtype.md +12 -0
- package/docs/api/foundation-comms.connect.getmorecolumns.md +26 -0
- package/docs/api/foundation-comms.connect.md +1 -0
- package/docs/api/foundation-comms.connectevents.addcommitlistener.md +24 -0
- package/docs/api/foundation-comms.connectevents.addmetadatalistener.md +24 -0
- package/docs/api/foundation-comms.connectevents.addstreamlistener.md +25 -0
- package/docs/api/foundation-comms.connectevents.md +22 -0
- package/docs/api/foundation-comms.connecteventsemitter.md +24 -0
- package/docs/api/foundation-comms.connecteventsemitter.oncommitevent.md +25 -0
- package/docs/api/foundation-comms.connecteventsemitter.onmetadataevent.md +26 -0
- package/docs/api/foundation-comms.connecteventsemitter.onstreamcompleteevent.md +24 -0
- package/docs/api/foundation-comms.connecteventsemitter.onstreamevent.md +27 -0
- package/docs/api/foundation-comms.currentuser.md +2 -0
- package/docs/api/foundation-comms.currentuser.set.md +22 -0
- package/docs/api/foundation-comms.currentuser.unset.md +15 -0
- package/docs/api/foundation-comms.datasource.destroy.md +17 -0
- package/docs/api/foundation-comms.datasource.md +1 -0
- package/docs/api/foundation-comms.defaultconnect._constructor_.md +2 -1
- package/docs/api/foundation-comms.defaultconnect.getmorecolumns.md +22 -0
- package/docs/api/foundation-comms.defaultconnect.md +2 -1
- package/docs/api/foundation-comms.defaultconnectevents.addcommitlistener.md +24 -0
- package/docs/api/foundation-comms.defaultconnectevents.addmetadatalistener.md +24 -0
- package/docs/api/foundation-comms.defaultconnectevents.addstreamlistener.md +25 -0
- package/docs/api/foundation-comms.defaultconnectevents.md +27 -0
- package/docs/api/foundation-comms.defaultconnectevents.oncommitevent.md +25 -0
- package/docs/api/foundation-comms.defaultconnectevents.onmetadataevent.md +26 -0
- package/docs/api/foundation-comms.defaultconnectevents.onstreamcompleteevent.md +24 -0
- package/docs/api/foundation-comms.defaultconnectevents.onstreamevent.md +27 -0
- package/docs/api/foundation-comms.defaultdatasource.destroy.md +17 -0
- package/docs/api/foundation-comms.defaultdatasource.md +1 -0
- package/docs/api/foundation-comms.defaulthttpconnect.getmorecolumns.md +22 -0
- package/docs/api/foundation-comms.defaulthttpconnect.md +1 -0
- package/docs/api/foundation-comms.defaultmessagebuilder._constructor_.md +21 -0
- package/docs/api/foundation-comms.defaultmessagebuilder.createchangepasswordmessage.md +24 -0
- package/docs/api/foundation-comms.defaultmessagebuilder.createcommitmessage.md +23 -0
- package/docs/api/foundation-comms.defaultmessagebuilder.createdatalogoffmessage.md +22 -0
- package/docs/api/foundation-comms.defaultmessagebuilder.createdatalogonmessage.md +23 -0
- package/docs/api/foundation-comms.defaultmessagebuilder.createforgotpasswordmessage.md +24 -0
- package/docs/api/foundation-comms.defaultmessagebuilder.createforgotpasswordtokenmessage.md +25 -0
- package/docs/api/foundation-comms.defaultmessagebuilder.createhttpheadersfrommessage.md +23 -0
- package/docs/api/foundation-comms.defaultmessagebuilder.createloginmessage.md +22 -0
- package/docs/api/foundation-comms.defaultmessagebuilder.createlogoutmessage.md +22 -0
- package/docs/api/foundation-comms.defaultmessagebuilder.createmetarequestmessage.md +23 -0
- package/docs/api/foundation-comms.defaultmessagebuilder.createmorecolumnsmessage.md +22 -0
- package/docs/api/foundation-comms.defaultmessagebuilder.createmorerowsmessage.md +22 -0
- package/docs/api/foundation-comms.defaultmessagebuilder.createrefreshtokenmessage.md +15 -0
- package/docs/api/foundation-comms.defaultmessagebuilder.createrequestmessage.md +23 -0
- package/docs/api/foundation-comms.defaultmessagebuilder.createresourcesmessage.md +22 -0
- package/docs/api/foundation-comms.defaultmessagebuilder.md +41 -0
- package/docs/api/foundation-comms.defaultnetworkmonitor.addresource.md +23 -0
- package/docs/api/foundation-comms.defaultnetworkmonitor.create.md +16 -0
- package/docs/api/foundation-comms.defaultnetworkmonitor.destroy.md +16 -0
- package/docs/api/foundation-comms.defaultnetworkmonitor.md +31 -0
- package/docs/api/foundation-comms.defaultnetworkmonitor.removeresource.md +22 -0
- package/docs/api/foundation-comms.defaultnetworkmonitor.runallchecks.md +11 -0
- package/docs/api/foundation-comms.defaultnetworkmonitor.status.md +12 -0
- package/docs/api/foundation-comms.defaultnetworkmonitorconfig.md +13 -0
- package/docs/api/foundation-comms.defaultsocket._constructor_.md +24 -0
- package/docs/api/foundation-comms.defaultsocket.connect.md +24 -0
- package/docs/api/foundation-comms.defaultsocket.hasvalidsession.md +13 -0
- package/docs/api/foundation-comms.defaultsocket.isconfigured.md +11 -0
- package/docs/api/foundation-comms.defaultsocket.isconnected.md +11 -0
- package/docs/api/foundation-comms.defaultsocket.isconnectedsubject.md +11 -0
- package/docs/api/foundation-comms.defaultsocket.isconnecting.md +11 -0
- package/docs/api/foundation-comms.defaultsocket.isdisconnected.md +11 -0
- package/docs/api/foundation-comms.defaultsocket.isdisconnectedbyserver.md +11 -0
- package/docs/api/foundation-comms.defaultsocket.isreconnecting.md +11 -0
- package/docs/api/foundation-comms.defaultsocket.md +44 -0
- package/docs/api/foundation-comms.defaultsocket.reset.md +15 -0
- package/docs/api/foundation-comms.defaultsocket.send.md +23 -0
- package/docs/api/foundation-comms.defaultsocket.sendforstream.md +25 -0
- package/docs/api/foundation-comms.defaultsocket.socketmessages.md +11 -0
- package/docs/api/foundation-comms.defaultsocketstatus.closedclean.md +11 -0
- package/docs/api/foundation-comms.defaultsocketstatus.closedcode.md +11 -0
- package/docs/api/foundation-comms.defaultsocketstatus.closedreason.md +11 -0
- package/docs/api/foundation-comms.defaultsocketstatus.hasvalidsession.md +11 -0
- package/docs/api/foundation-comms.defaultsocketstatus.isconfigured.md +11 -0
- package/docs/api/foundation-comms.defaultsocketstatus.isconnected.md +11 -0
- package/docs/api/foundation-comms.defaultsocketstatus.isconnectedchanged.md +15 -0
- package/docs/api/foundation-comms.defaultsocketstatus.isconnectedsubject.md +11 -0
- package/docs/api/foundation-comms.defaultsocketstatus.isconnecting.md +11 -0
- package/docs/api/foundation-comms.defaultsocketstatus.isdisconnected.md +11 -0
- package/docs/api/foundation-comms.defaultsocketstatus.isdisconnectedbyserver.md +11 -0
- package/docs/api/foundation-comms.defaultsocketstatus.isreconnecting.md +11 -0
- package/docs/api/foundation-comms.defaultsocketstatus.isreconnectingchanged.md +15 -0
- package/docs/api/foundation-comms.defaultsocketstatus.md +42 -0
- package/docs/api/foundation-comms.defaultsocketstatus.onclose.md +22 -0
- package/docs/api/foundation-comms.defaultsocketstatus.reconnectionlimitreached.md +11 -0
- package/docs/api/foundation-comms.defaultsocketstatus.resetclosedstate.md +15 -0
- package/docs/api/foundation-comms.defaultsocketstatus.serialize.md +15 -0
- package/docs/api/foundation-comms.genesisconnectevents.md +18 -0
- package/docs/api/foundation-comms.getnetworkmonitor.md +30 -0
- package/docs/api/foundation-comms.getsocket.md +30 -0
- package/docs/api/foundation-comms.getsocketstatus.md +30 -0
- package/docs/api/foundation-comms.md +39 -0
- package/docs/api/foundation-comms.messagebuilder.createmorecolumnsmessage.md +30 -0
- package/docs/api/foundation-comms.messagebuilder.md +1 -0
- package/docs/api/foundation-comms.messagehaserrorcode.md +13 -0
- package/docs/api/foundation-comms.messagetype.md +2 -0
- package/docs/api/foundation-comms.metadataevent.md +14 -0
- package/docs/api/foundation-comms.metadataeventdetail.md +18 -0
- package/docs/api/foundation-comms.metadataeventtype.md +12 -0
- package/docs/api/foundation-comms.monitoredresource.md +15 -0
- package/docs/api/foundation-comms.monitoredresourcechecks.md +15 -0
- package/docs/api/foundation-comms.monitoredresourcechecksresult.isconnected.md +11 -0
- package/docs/api/foundation-comms.monitoredresourcechecksresult.lastmessage.md +11 -0
- package/docs/api/foundation-comms.monitoredresourcechecksresult.lastupdated.md +11 -0
- package/docs/api/foundation-comms.monitoredresourcechecksresult.md +23 -0
- package/docs/api/foundation-comms.monitoredresourcechecksresult.timeout.md +11 -0
- package/docs/api/foundation-comms.monitoredresourcedatalogon.md +15 -0
- package/docs/api/foundation-comms.monitoredresourcemetadata.md +15 -0
- package/docs/api/foundation-comms.networklogger.md +12 -0
- package/docs/api/foundation-comms.networkmonitor.addresource.md +23 -0
- package/docs/api/foundation-comms.networkmonitor.create.md +15 -0
- package/docs/api/foundation-comms.networkmonitor.destroy.md +15 -0
- package/docs/api/foundation-comms.networkmonitor.md +34 -0
- package/docs/api/foundation-comms.networkmonitor.removeresource.md +22 -0
- package/docs/api/foundation-comms.networkmonitor.runallchecks.md +23 -0
- package/docs/api/foundation-comms.networkmonitor.status.md +11 -0
- package/docs/api/foundation-comms.networkmonitorconfig.checkinterval.md +13 -0
- package/docs/api/foundation-comms.networkmonitorconfig.checktimeout.md +13 -0
- package/docs/api/foundation-comms.networkmonitorconfig.documentevents.md +13 -0
- package/docs/api/foundation-comms.networkmonitorconfig.eventemitter.md +13 -0
- package/docs/api/foundation-comms.networkmonitorconfig.genesisconnectevents.md +13 -0
- package/docs/api/foundation-comms.networkmonitorconfig.md +27 -0
- package/docs/api/foundation-comms.networkmonitorconfig.resourcechecks.md +13 -0
- package/docs/api/foundation-comms.networkmonitorconfig.resourcedatalogon.md +18 -0
- package/docs/api/foundation-comms.networkmonitorconfig.windowevents.md +13 -0
- package/docs/api/foundation-comms.resourcehealth.md +19 -0
- package/docs/api/foundation-comms.serializedsocketstatus.closedclean.md +11 -0
- package/docs/api/foundation-comms.serializedsocketstatus.closedcode.md +11 -0
- package/docs/api/foundation-comms.serializedsocketstatus.closedreason.md +11 -0
- package/docs/api/foundation-comms.serializedsocketstatus.hasvalidsession.md +11 -0
- package/docs/api/foundation-comms.serializedsocketstatus.isconfigured.md +13 -0
- package/docs/api/foundation-comms.serializedsocketstatus.isconnected.md +11 -0
- package/docs/api/foundation-comms.serializedsocketstatus.isconnecting.md +11 -0
- package/docs/api/foundation-comms.serializedsocketstatus.isdisconnected.md +11 -0
- package/docs/api/foundation-comms.serializedsocketstatus.isdisconnectedbyserver.md +11 -0
- package/docs/api/foundation-comms.serializedsocketstatus.isreconnecting.md +11 -0
- package/docs/api/foundation-comms.serializedsocketstatus.md +30 -0
- package/docs/api/foundation-comms.serializedsocketstatus.reconnectionlimitreached.md +11 -0
- package/docs/api/foundation-comms.socket.md +3 -11
- package/docs/api/foundation-comms.socket.sendforstream.md +2 -1
- package/docs/api/{foundation-comms.socket.isconnectedsubject.md → foundation-comms.socketstatus.isconnectedsubject.md} +2 -2
- package/docs/api/foundation-comms.socketstatus.md +28 -0
- package/docs/api/foundation-comms.socketstatus.onclose.md +22 -0
- package/docs/api/foundation-comms.socketstatus.serialize.md +15 -0
- package/docs/api/foundation-comms.streamcompleteevent.md +14 -0
- package/docs/api/foundation-comms.streamcompleteeventtype.md +12 -0
- package/docs/api/foundation-comms.streamevent.md +14 -0
- package/docs/api/foundation-comms.streameventdetail.md +19 -0
- package/docs/api/foundation-comms.streameventfunctions.md +19 -0
- package/docs/api/foundation-comms.streameventtype.md +12 -0
- package/docs/api/foundation-comms.systemhealthchanged.md +13 -0
- package/docs/api/foundation-comms.systemhealthchangedevent.md +15 -0
- package/docs/api/foundation-comms.systemhealthstatus.md +29 -0
- package/docs/api/foundation-comms.user.md +2 -0
- package/docs/api/foundation-comms.user.set.md +22 -0
- package/docs/api/foundation-comms.user.unset.md +15 -0
- package/docs/api-report.md +520 -16
- package/package.json +13 -11
- package/docs/api/foundation-comms.socket.hasvalidsession.md +0 -11
- package/docs/api/foundation-comms.socket.isconnected.md +0 -11
- package/docs/api/foundation-comms.socket.isreconnecting.md +0 -11
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"datasource.d.ts","sourceRoot":"","sources":["../../../src/datasource/datasource.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,KAAK,EACV,aAAa,EACb,wBAAwB,EACxB,WAAW,EACX,cAAc,EAEd,mBAAmB,EACpB,MAAM,4BAA4B,CAAC;AAKpC,OAAO,KAAK,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAsB,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAExF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,gBAcrC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB;;;OAGG;IACH,WAAW,EAAE,OAAO,CAAC;IAErB;;;OAGG;IACH,aAAa,EAAE,aAAa,EAAE,CAAC;IAE/B;;;;OAIG;IACH,QAAQ,EAAE,OAAO,CAAC;IAElB;;;OAGG;IACH,YAAY,EAAE,YAAY,CAAC;IAE3B;;;OAGG;IACH,MAAM,EAAE,gBAAgB,CAAC,wBAAwB,GAAG,mBAAmB,CAAC,CAAC;IAEzE;;;OAGG;IACH,iBAAiB,CAAC,YAAY,EAAE,MAAM,GAAG,OA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
96
|
-
* The
|
96
|
+
* The FDC3 implementation.
|
97
|
+
* @internal
|
98
|
+
*/
|
99
|
+
export declare class DefaultFDC3 implements FDC3 {
|
100
|
+
isReady: boolean;
|
101
|
+
constructor();
|
102
|
+
private connect;
|
103
|
+
addIntentListeners(listeners: Map<FDC3Intents, FDC3ContextHandler>): void;
|
104
|
+
findIntent(intent: FDC3Intents, context?: FDC3Context): Promise<FDC3AppIntent>;
|
105
|
+
findIntentsByContext(context: FDC3Context): Promise<FDC3AppIntent[]>;
|
106
|
+
raiseIntent(context: FDC3Context, intent?: FDC3Intents): Promise<FDC3IntentResolution>;
|
107
|
+
joinChannel(channelId: string): Promise<void>;
|
108
|
+
getOrCreateChannel(channelId: string): Promise<FDC3Channel>;
|
109
|
+
broadcastOnChannel(channelId: string, context: FDC3Context): Promise<void>;
|
110
|
+
}
|
111
|
+
/**
|
112
|
+
* The DI token for the FDC3 interface.
|
97
113
|
* @internal
|
98
114
|
*/
|
99
115
|
export declare const FDC3: import("@microsoft/fast-foundation").InterfaceSymbol<FDC3>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"fdc3.d.ts","sourceRoot":"","sources":["../../../src/fdc3/fdc3.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAEL,SAAS,EACT,OAAO,EACP,OAAO,EACP,cAAc,EAMd,OAAO,EACP,gBAAgB,EAKjB,MAAM,aAAa,CAAC;AAKrB;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC;AAElC;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,SAAS;CAAG;AAEnD;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,OAAO;CAAG;AAE/C;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,gBAAgB;CAAG;AAEjE;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,OAAO;CAAG;AAE/C;;;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,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAKpE,WAAW,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,CAAC;IActF,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAK7C,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAKrD,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAKxF;AAED;;;GAGG;AACH,eAAO,MAAM,IAAI,4DAA4D,CAAC"}
|
package/dist/dts/index.d.ts
CHANGED
package/dist/dts/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
|
@@ -0,0 +1,56 @@
|
|
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
|
@@ -0,0 +1 @@
|
|
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"}
|
@@ -0,0 +1 @@
|
|
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"}
|
@@ -0,0 +1,193 @@
|
|
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
|
@@ -0,0 +1 @@
|
|
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,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AS,CAAC,YAAY;IAiDtB;;OAEG;IACH,SAAS,CAAC,eAAe;IAWzB;;OAEG;IACH,SAAS,CAAC,kBAAkB,CAAC,MAAM,EAAE,OAAO,CAAC,kBAAkB,CAAC;IAsBhE;;OAEG;cACa,wBAAwB,CAAC,MAAM,EAAE,OAAO,CAAC,kBAAkB,CAAC;IAS5E;;;;;;;;;;OAUG;IACH,SAAS,CAAC,uBAAuB,CAC/B,MAAM,EAAE,cAAc,EACtB,QAAQ,GAAE,OAAc,GACvB,cAAc;IAUjB;;;;;;;;;;OAUG;IACH,SAAS,CAAC,+BAA+B,CACvC,YAAY,EAAE,sBAAsB,EACpC,QAAQ,GAAE,OAAc,GACvB,sBAAsB;IAgBzB;;OAEG;IACH,SAAS,CAAC,oBAAoB,CAAC,MAAM,EAAE,OAAO,CAAC,kBAAkB,CAAC,GAAG,kBAAkB;IA0BvF;;OAEG;IACH,SAAS,CAAC,qBAAqB,CAAC,YAAY,EAAE,MAAM;IAIpD;;OAEG;IACH,SAAS,CAAC,eAAe;IAIzB;;OAEG;IACH,SAAS,CAAC,gBAAgB;IAK1B;;OAEG;IACH,SAAS,CAAC,wBAAwB;CAOnC;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,sEAE1B,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,IAAI,cAAc,CAElD"}
|
@@ -0,0 +1,133 @@
|
|
1
|
+
import Bowser from 'bowser';
|
2
|
+
import type { StreamEventDetail } from '../connect/connect.events';
|
3
|
+
import type { Message } from '../connect/message';
|
4
|
+
import type { SocketObservable } from '../connect/socket';
|
5
|
+
import type { SerializedSocketStatus } from '../connect/socket.status';
|
6
|
+
/**
|
7
|
+
* MonitoredResource.
|
8
|
+
* @public
|
9
|
+
*/
|
10
|
+
export type MonitoredResource = SocketObservable<any>;
|
11
|
+
/**
|
12
|
+
* MonitoredResourceChecksResult.
|
13
|
+
* @public
|
14
|
+
*/
|
15
|
+
export interface MonitoredResourceChecksResult {
|
16
|
+
isConnected: boolean;
|
17
|
+
lastUpdated: number;
|
18
|
+
lastMessage?: Message;
|
19
|
+
timeout?: boolean;
|
20
|
+
}
|
21
|
+
/**
|
22
|
+
* MonitoredResourceChecks.
|
23
|
+
* @param sourceRef - The resource source ref.
|
24
|
+
* @param resource - The resource reference.
|
25
|
+
* @public
|
26
|
+
*/
|
27
|
+
export type MonitoredResourceChecks = (sourceRef: string, resource: MonitoredResource) => Promise<MonitoredResourceChecksResult>;
|
28
|
+
/**
|
29
|
+
* MonitoredResourceMetadata.
|
30
|
+
* @public
|
31
|
+
*/
|
32
|
+
export interface MonitoredResourceMetadata extends Partial<MonitoredResourceChecksResult>, Partial<StreamEventDetail> {
|
33
|
+
}
|
34
|
+
/**
|
35
|
+
* MonitoredResourceDataLogon.
|
36
|
+
* @param metadata - The resource metadata.
|
37
|
+
* @public
|
38
|
+
*/
|
39
|
+
export type MonitoredResourceDataLogon = (metadata: MonitoredResourceMetadata) => void;
|
40
|
+
/**
|
41
|
+
* ResourceHealth.
|
42
|
+
* @public
|
43
|
+
*/
|
44
|
+
export type ResourceHealth = MonitoredResourceChecksResult & {
|
45
|
+
name: string;
|
46
|
+
sourceRef: string;
|
47
|
+
lastError?: any;
|
48
|
+
};
|
49
|
+
/**
|
50
|
+
* SystemHealthStatus.
|
51
|
+
* @public
|
52
|
+
*/
|
53
|
+
export type SystemHealthStatus = {
|
54
|
+
/**
|
55
|
+
* Is the browser or device working online.
|
56
|
+
*/
|
57
|
+
isOnline: boolean;
|
58
|
+
/**
|
59
|
+
* Browser information.
|
60
|
+
*/
|
61
|
+
browserInformation?: Bowser.Parser.ParsedResult;
|
62
|
+
/**
|
63
|
+
* Is the user authenticated.
|
64
|
+
*/
|
65
|
+
isAuthenticated: boolean;
|
66
|
+
/**
|
67
|
+
* The username if authenticated.
|
68
|
+
*/
|
69
|
+
username?: string;
|
70
|
+
/**
|
71
|
+
* Is everything online and connected.
|
72
|
+
*/
|
73
|
+
isHealthy: boolean;
|
74
|
+
/**
|
75
|
+
* Socket status.
|
76
|
+
*/
|
77
|
+
socket: SerializedSocketStatus;
|
78
|
+
/**
|
79
|
+
* Resource health information.
|
80
|
+
*/
|
81
|
+
resources: Record<string, ResourceHealth>;
|
82
|
+
/**
|
83
|
+
* Resources are all connected flag.
|
84
|
+
*/
|
85
|
+
resourcesAllConnected: boolean;
|
86
|
+
/**
|
87
|
+
* Last time the information was updated.
|
88
|
+
*/
|
89
|
+
lastUpdated: number;
|
90
|
+
/**
|
91
|
+
* Next time the information will be updated.
|
92
|
+
*
|
93
|
+
* @privateRemarks
|
94
|
+
* Overlays may use deltas for a visual countdown to next update.
|
95
|
+
*/
|
96
|
+
nextUpdate: number;
|
97
|
+
/**
|
98
|
+
* First time the information was updated.
|
99
|
+
*
|
100
|
+
* @remarks
|
101
|
+
* Can be used by applications to understand how-long it has been since the last refresh and to drive automations.
|
102
|
+
*/
|
103
|
+
firstUpdated: number;
|
104
|
+
/**
|
105
|
+
* User requested run checks.
|
106
|
+
*/
|
107
|
+
runAllChecks(): void;
|
108
|
+
/**
|
109
|
+
* User requested report stability to Genesis.
|
110
|
+
*/
|
111
|
+
reportStabilityToGenesis(): Promise<boolean>;
|
112
|
+
};
|
113
|
+
/**
|
114
|
+
* SystemHealthChanged.
|
115
|
+
* @public
|
116
|
+
*/
|
117
|
+
export declare const SystemHealthChanged = "system-health-changed";
|
118
|
+
/**
|
119
|
+
* SystemHealthChangedEvent.
|
120
|
+
* @public
|
121
|
+
*/
|
122
|
+
export type SystemHealthChangedEvent = CustomEvent<SystemHealthStatus>;
|
123
|
+
/**
|
124
|
+
* Genesis connect events that can be monitored to invoke resource checking.
|
125
|
+
*
|
126
|
+
* @remarks
|
127
|
+
* 'steam' and 'commit' are monitored by default and will invoke resource checking. 'metadata' request failures are
|
128
|
+
* monitored for the purpose of surfacing such errors to the console only. For now, 'metadata' errors are unrecoverable.
|
129
|
+
*
|
130
|
+
* @public
|
131
|
+
*/
|
132
|
+
export type GenesisConnectEvents = 'stream' | 'commit';
|
133
|
+
//# sourceMappingURL=types.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/networkMonitor/types.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAEvE;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC;AAEtD;;;GAGG;AACH,MAAM,WAAW,6BAA6B;IAC5C,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;GAKG;AACH,MAAM,MAAM,uBAAuB,GAAG,CACpC,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,iBAAiB,KACxB,OAAO,CAAC,6BAA6B,CAAC,CAAC;AAE5C;;;GAGG;AACH,MAAM,WAAW,yBACf,SAAQ,OAAO,CAAC,6BAA6B,CAAC,EAC5C,OAAO,CAAC,iBAAiB,CAAC;CAAG;AAEjC;;;;GAIG;AACH,MAAM,MAAM,0BAA0B,GAAG,CAAC,QAAQ,EAAE,yBAAyB,KAAK,IAAI,CAAC;AAEvF;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,6BAA6B,GAAG;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,GAAG,CAAC;CACjB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC;IAChD;;OAEG;IACH,eAAe,EAAE,OAAO,CAAC;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,MAAM,EAAE,sBAAsB,CAAC;IAC/B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAC1C;;OAEG;IACH,qBAAqB,EAAE,OAAO,CAAC;IAC/B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,YAAY,IAAI,IAAI,CAAC;IACrB;;OAEG;IACH,wBAAwB,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;CAC9C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,0BAA0B,CAAC;AAE3D;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GAAG,WAAW,CAAC,kBAAkB,CAAC,CAAC;AAEvE;;;;;;;;GAQG;AACH,MAAM,MAAM,oBAAoB,GAAG,QAAQ,GAAG,QAAQ,CAAC"}
|
@@ -25,6 +25,7 @@ export declare class ConnectMock implements Connect {
|
|
25
25
|
snapshot(resourceName: string, params?: any): Promise<Message>;
|
26
26
|
stream(resourceName: string, onMessage: Function, onError: Function, params?: any): SocketObservable<Message>;
|
27
27
|
getMoreRows(sourceRef: string): Promise<Message<any>>;
|
28
|
+
getMoreColumns(sourceRef: string): Promise<Message<any>>;
|
28
29
|
dataLogoff(sourceRef: string): Promise<Message<any>>;
|
29
30
|
getJSONSchema(resourceName: string): Promise<any>;
|
30
31
|
}
|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internal
|
6
6
|
*/
|
7
7
|
export declare class SocketMock implements Socket {
|
8
|
+
isConfigured: boolean;
|
9
|
+
isDisconnected: boolean;
|
10
|
+
isDisconnectedByServer: boolean;
|
8
11
|
hasValidSession: boolean;
|
12
|
+
isConnecting: boolean;
|
9
13
|
isConnected: boolean;
|
10
14
|
isConnectedSubject: BehaviorSubject<boolean>;
|
11
15
|
isReconnecting: boolean;
|
@@ -14,7 +18,7 @@ export declare class SocketMock implements Socket {
|
|
14
18
|
connect(host: string, options?: SocketConnectOptions, reconnectOptions?: SocketReconnectOptions): Promise<boolean>;
|
15
19
|
disconnect(): void;
|
16
20
|
send<T>(message: Message<any>): Promise<Message | any>;
|
17
|
-
sendForStream<T>(message: Message<any>, onMessage: Function, onError: Function): Observable<Message>;
|
21
|
+
sendForStream<T>(message: Message<any>, onMessage: Function, onError: Function, onComplete?: Function): Observable<Message>;
|
18
22
|
socketMessages(): SocketSubject<Message>;
|
19
23
|
reset(): void;
|
20
24
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"socket.d.ts","sourceRoot":"","sources":["../../../../../src/testing/mocks/connect/socket.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAQ,UAAU,EAAE,MAAM,MAAM,CAAC;AACzD,OAAO,KAAK,EACV,OAAO,EACP,MAAM,EACN,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD;;GAEG;AACH,qBAAa,UAAW,YAAW,MAAM;IAChC,eAAe,EAAE,OAAO,CAAC;IACzB,WAAW,EAAE,OAAO,CAAC;IACrB,kBAAkB,EAAE,eAAe,CAAC,OAAO,CAAC,CAA6B;IACzE,cAAc,EAAE,OAAO,CAAC;IAExB,WAAW,EAAE,OAAO,CAAC;IACrB,qBAAqB,8BAAgC;IAErD,OAAO,CACZ,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,oBA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AAG,GAAG,CAAC;IAItD,aAAa,CAAC,CAAC,EACpB,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,EACrB,SAAS,EAAE,QAAQ,EACnB,OAAO,EAAE,QAAQ,EACjB,UAAU,CAAC,EAAE,QAAQ,GACpB,UAAU,CAAC,OAAO,CAAC;IAIf,cAAc,IAAI,aAAa,CAAC,OAAO,CAAC;IAI/C,KAAK,IAAI,IAAI;CAGd"}
|
@@ -12,6 +12,7 @@ export declare class DatasourceMock implements Datasource {
|
|
12
12
|
stream: SocketObservable<FilteredDataServerResult | RequestServerResult>;
|
13
13
|
init(options: DatasourceOptions, fetchMeta: boolean): Promise<boolean>;
|
14
14
|
deinit(): void;
|
15
|
+
destroy(): void;
|
15
16
|
validResourceName(resourceName: string): boolean;
|
16
17
|
getMetadata?(resourceName: string): Promise<FieldMetadata[]>;
|
17
18
|
snapshot(params?: any): void;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"datasource.d.ts","sourceRoot":"","sources":["../../../../../src/testing/mocks/datasource/datasource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC5F,OAAO,EAAE,aAAa,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAEjG;;GAEG;AACH,qBAAa,cAAe,YAAW,UAAU;IAC/C,WAAW,EAAE,OAAO,CAAC;IACrB,aAAa,EAAE,aAAa,EAAE,CAAC;IAC/B,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,YAAY,CAAC;IAC3B,MAAM,EAAE,gBAAgB,CAAC,wBAAwB,GAAG,mBAAmB,CAAC,CAAC;IAEzE,IAAI,CAAC,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAIt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AC,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;CAGtD"}
|
package/dist/dts/user/user.d.ts
CHANGED
@@ -1,4 +1,8 @@
|
|
1
1
|
import type { UserPermission, UserProfile } from './user.types';
|
2
|
+
/**
|
3
|
+
* Made some minor adjustments here to make user more accessible in the short term.
|
4
|
+
* Please note that this User will be replaced with the enhanced version shortly!
|
5
|
+
*/
|
2
6
|
/**
|
3
7
|
* TODO: Evolve, re-locate to foundation-data, foundation-user or similar and add JSON schema based population,
|
4
8
|
* validation, evolution, foundation-store interop etc.
|
@@ -20,6 +24,8 @@ export interface User extends UserOptions {
|
|
20
24
|
hasAdminProfile(): boolean;
|
21
25
|
hasPermission(permission: UserPermission | UserPermission[]): boolean;
|
22
26
|
hasProfile(profile: UserProfile | UserProfile[]): boolean;
|
27
|
+
set(options: UserOptions): void;
|
28
|
+
unset(): void;
|
23
29
|
}
|
24
30
|
/**
|
25
31
|
* Represents the current user (i.e. the user that is currently logged in).
|
@@ -30,6 +36,8 @@ export declare class CurrentUser implements User {
|
|
30
36
|
profiles: UserProfile[];
|
31
37
|
username: string;
|
32
38
|
constructor(options: UserOptions);
|
39
|
+
set(options: UserOptions): void;
|
40
|
+
unset(): void;
|
33
41
|
hasAdminProfile(): boolean;
|
34
42
|
hasPermission(permission: string | string[]): boolean;
|
35
43
|
hasProfile(profile: string | string[]): boolean;
|
@@ -42,5 +50,12 @@ export declare class CurrentUser implements User {
|
|
42
50
|
*/
|
43
51
|
private hasKey;
|
44
52
|
}
|
53
|
+
/**
|
54
|
+
* User DI key.
|
55
|
+
* @privateRemarks
|
56
|
+
* Marked as internal to stop api-extractor becoming confused cross-linking tokens with the same name.
|
57
|
+
* @internal
|
58
|
+
*/
|
59
|
+
export declare const User: import("@microsoft/fast-foundation").InterfaceSymbol<User>;
|
45
60
|
export {};
|
46
61
|
//# sourceMappingURL=user.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../src/user/user.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../src/user/user.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhE;;;GAGG;AAEH;;;GAGG;AAEH;;;GAGG;AACH,UAAU,WAAW;IACnB,QAAQ,CAAC,WAAW,EAAE,cAAc,EAAE,GAAG,IAAI,CAAC;IAC9C,QAAQ,CAAC,QAAQ,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;IACxC,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC;AAED;;;GAGG;AACH,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,eAAe,IAAI,OAAO,CAAC;IAC3B,aAAa,CAAC,UAAU,EAAE,cAAc,GAAG,cAAc,EAAE,GAAG,OAAO,CAAC;IACtE,UAAU,CAAC,OAAO,EAAE,WAAW,GAAG,WAAW,EAAE,GAAG,OAAO,CAAC;IAC1D,GAAG,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,CAAC;IAChC,KAAK,IAAI,IAAI,CAAC;CACf;AAED;;;GAGG;AACH,qBAAa,WAAY,YAAW,IAAI;IAC1B,WAAW,EAAE,cAAc,EAAE,CAAC;IAC9B,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;gBAEjB,OAAO,EAAE,WAAW;IAIhC,GAAG,CAAC,OAAO,EAAE,WAAW;IASxB,KAAK;IAML,eAAe;IAIf,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,OAAO;IAIrD,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,OAAO;IAI/C;;;;;;OAMG;IACH,OAAO,CAAC,MAAM;CASf;AAED;;;;;GAKG;AACH,eAAO,MAAM,IAAI,4DAA4D,CAAC"}
|
package/dist/esm/auth/auth.js
CHANGED
@@ -6,7 +6,7 @@ import { Connect } from '../connect';
|
|
6
6
|
import { EventMessageType, MessageBuilder, MessageCode, MessageType, } from '../connect/message';
|
7
7
|
import { CredentialManager } from '../credentialManager';
|
8
8
|
import { Session } from '../session';
|
9
|
-
import {
|
9
|
+
import { User } from '../user';
|
10
10
|
import { logger } from '../utils';
|
11
11
|
import { AuthError } from './auth.types';
|
12
12
|
/**
|
@@ -198,7 +198,8 @@ let DefaultAuth = class DefaultAuth {
|
|
198
198
|
permissions: result.permissions,
|
199
199
|
sessionId: result.sessionId,
|
200
200
|
};
|
201
|
-
this.currentUser =
|
201
|
+
this.currentUser = DI.getOrCreateDOMContainer().get(User);
|
202
|
+
this.currentUser.set({
|
202
203
|
permissions: result.permissions,
|
203
204
|
profiles: result.profiles,
|
204
205
|
username: result.username,
|
@@ -209,7 +210,9 @@ let DefaultAuth = class DefaultAuth {
|
|
209
210
|
* @internal
|
210
211
|
*/
|
211
212
|
removeAuthResults() {
|
213
|
+
var _a;
|
212
214
|
this.loggedUserResult = null;
|
215
|
+
(_a = this.currentUser) === null || _a === void 0 ? void 0 : _a.unset();
|
213
216
|
this.currentUser = null;
|
214
217
|
}
|
215
218
|
};
|