@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.
Files changed (224) hide show
  1. package/dist/dts/auth/auth.d.ts.map +1 -1
  2. package/dist/dts/connect/connect.d.ts +1 -11
  3. package/dist/dts/connect/connect.d.ts.map +1 -1
  4. package/dist/dts/connect/http.connect.d.ts +0 -1
  5. package/dist/dts/connect/http.connect.d.ts.map +1 -1
  6. package/dist/dts/connect/index.d.ts +0 -2
  7. package/dist/dts/connect/index.d.ts.map +1 -1
  8. package/dist/dts/connect/message.d.ts +0 -51
  9. package/dist/dts/connect/message.d.ts.map +1 -1
  10. package/dist/dts/connect/socket.d.ts +8 -72
  11. package/dist/dts/connect/socket.d.ts.map +1 -1
  12. package/dist/dts/datasource/datasource.d.ts +0 -9
  13. package/dist/dts/datasource/datasource.d.ts.map +1 -1
  14. package/dist/dts/fdc3/fdc3.d.ts +1 -17
  15. package/dist/dts/fdc3/fdc3.d.ts.map +1 -1
  16. package/dist/dts/index.d.ts +0 -1
  17. package/dist/dts/index.d.ts.map +1 -1
  18. package/dist/dts/testing/mocks/connect/connect.d.ts +0 -1
  19. package/dist/dts/testing/mocks/connect/connect.d.ts.map +1 -1
  20. package/dist/dts/testing/mocks/connect/socket.d.ts +1 -5
  21. package/dist/dts/testing/mocks/connect/socket.d.ts.map +1 -1
  22. package/dist/dts/testing/mocks/datasource/datasource.d.ts +0 -1
  23. package/dist/dts/testing/mocks/datasource/datasource.d.ts.map +1 -1
  24. package/dist/dts/user/user.d.ts +0 -15
  25. package/dist/dts/user/user.d.ts.map +1 -1
  26. package/dist/esm/auth/auth.js +2 -5
  27. package/dist/esm/connect/connect.js +8 -30
  28. package/dist/esm/connect/http.connect.js +0 -6
  29. package/dist/esm/connect/index.js +0 -2
  30. package/dist/esm/connect/message.js +4 -25
  31. package/dist/esm/connect/socket.js +44 -113
  32. package/dist/esm/datasource/datasource.js +8 -18
  33. package/dist/esm/fdc3/fdc3.js +4 -4
  34. package/dist/esm/index.js +0 -1
  35. package/dist/esm/testing/mocks/connect/connect.js +0 -3
  36. package/dist/esm/testing/mocks/connect/socket.js +1 -1
  37. package/dist/esm/testing/mocks/datasource/datasource.js +0 -1
  38. package/dist/esm/user/user.js +1 -22
  39. package/dist/foundation-comms.api.json +6567 -13112
  40. package/dist/foundation-comms.d.ts +13 -841
  41. package/docs/api/foundation-comms.connect.md +0 -1
  42. package/docs/api/foundation-comms.currentuser.md +0 -2
  43. package/docs/api/foundation-comms.datasource.md +0 -1
  44. package/docs/api/foundation-comms.defaultconnect._constructor_.md +1 -2
  45. package/docs/api/foundation-comms.defaultconnect.md +1 -2
  46. package/docs/api/foundation-comms.defaultdatasource.md +0 -1
  47. package/docs/api/foundation-comms.defaulthttpconnect.md +0 -1
  48. package/docs/api/foundation-comms.md +0 -39
  49. package/docs/api/foundation-comms.messagebuilder.md +0 -1
  50. package/docs/api/foundation-comms.messagetype.md +0 -2
  51. package/docs/api/foundation-comms.socket.hasvalidsession.md +11 -0
  52. package/docs/api/foundation-comms.socket.isconnected.md +11 -0
  53. package/docs/api/{foundation-comms.socketstatus.isconnectedsubject.md → foundation-comms.socket.isconnectedsubject.md} +2 -2
  54. package/docs/api/foundation-comms.socket.isreconnecting.md +11 -0
  55. package/docs/api/foundation-comms.socket.md +11 -3
  56. package/docs/api/foundation-comms.socket.sendforstream.md +1 -2
  57. package/docs/api/foundation-comms.user.md +0 -2
  58. package/docs/api-report.md +16 -520
  59. package/package.json +11 -13
  60. package/dist/dts/connect/connect.events.d.ts +0 -173
  61. package/dist/dts/connect/connect.events.d.ts.map +0 -1
  62. package/dist/dts/connect/socket.status.d.ts +0 -79
  63. package/dist/dts/connect/socket.status.d.ts.map +0 -1
  64. package/dist/dts/networkMonitor/config.d.ts +0 -56
  65. package/dist/dts/networkMonitor/config.d.ts.map +0 -1
  66. package/dist/dts/networkMonitor/index.d.ts +0 -4
  67. package/dist/dts/networkMonitor/index.d.ts.map +0 -1
  68. package/dist/dts/networkMonitor/service.d.ts +0 -193
  69. package/dist/dts/networkMonitor/service.d.ts.map +0 -1
  70. package/dist/dts/networkMonitor/types.d.ts +0 -133
  71. package/dist/dts/networkMonitor/types.d.ts.map +0 -1
  72. package/dist/esm/connect/connect.events.js +0 -113
  73. package/dist/esm/connect/socket.status.js +0 -119
  74. package/dist/esm/networkMonitor/config.js +0 -46
  75. package/dist/esm/networkMonitor/index.js +0 -3
  76. package/dist/esm/networkMonitor/service.js +0 -432
  77. package/dist/esm/networkMonitor/types.js +0 -5
  78. package/docs/api/foundation-comms.commitevent.md +0 -14
  79. package/docs/api/foundation-comms.commiteventdetail.md +0 -17
  80. package/docs/api/foundation-comms.commiteventtype.md +0 -12
  81. package/docs/api/foundation-comms.connect.getmorecolumns.md +0 -26
  82. package/docs/api/foundation-comms.connectevents.addcommitlistener.md +0 -24
  83. package/docs/api/foundation-comms.connectevents.addmetadatalistener.md +0 -24
  84. package/docs/api/foundation-comms.connectevents.addstreamlistener.md +0 -25
  85. package/docs/api/foundation-comms.connectevents.md +0 -22
  86. package/docs/api/foundation-comms.connecteventsemitter.md +0 -24
  87. package/docs/api/foundation-comms.connecteventsemitter.oncommitevent.md +0 -25
  88. package/docs/api/foundation-comms.connecteventsemitter.onmetadataevent.md +0 -26
  89. package/docs/api/foundation-comms.connecteventsemitter.onstreamcompleteevent.md +0 -24
  90. package/docs/api/foundation-comms.connecteventsemitter.onstreamevent.md +0 -27
  91. package/docs/api/foundation-comms.currentuser.set.md +0 -22
  92. package/docs/api/foundation-comms.currentuser.unset.md +0 -15
  93. package/docs/api/foundation-comms.datasource.destroy.md +0 -17
  94. package/docs/api/foundation-comms.defaultconnect.getmorecolumns.md +0 -22
  95. package/docs/api/foundation-comms.defaultconnectevents.addcommitlistener.md +0 -24
  96. package/docs/api/foundation-comms.defaultconnectevents.addmetadatalistener.md +0 -24
  97. package/docs/api/foundation-comms.defaultconnectevents.addstreamlistener.md +0 -25
  98. package/docs/api/foundation-comms.defaultconnectevents.md +0 -27
  99. package/docs/api/foundation-comms.defaultconnectevents.oncommitevent.md +0 -25
  100. package/docs/api/foundation-comms.defaultconnectevents.onmetadataevent.md +0 -26
  101. package/docs/api/foundation-comms.defaultconnectevents.onstreamcompleteevent.md +0 -24
  102. package/docs/api/foundation-comms.defaultconnectevents.onstreamevent.md +0 -27
  103. package/docs/api/foundation-comms.defaultdatasource.destroy.md +0 -17
  104. package/docs/api/foundation-comms.defaulthttpconnect.getmorecolumns.md +0 -22
  105. package/docs/api/foundation-comms.defaultmessagebuilder._constructor_.md +0 -21
  106. package/docs/api/foundation-comms.defaultmessagebuilder.createchangepasswordmessage.md +0 -24
  107. package/docs/api/foundation-comms.defaultmessagebuilder.createcommitmessage.md +0 -23
  108. package/docs/api/foundation-comms.defaultmessagebuilder.createdatalogoffmessage.md +0 -22
  109. package/docs/api/foundation-comms.defaultmessagebuilder.createdatalogonmessage.md +0 -23
  110. package/docs/api/foundation-comms.defaultmessagebuilder.createforgotpasswordmessage.md +0 -24
  111. package/docs/api/foundation-comms.defaultmessagebuilder.createforgotpasswordtokenmessage.md +0 -25
  112. package/docs/api/foundation-comms.defaultmessagebuilder.createhttpheadersfrommessage.md +0 -23
  113. package/docs/api/foundation-comms.defaultmessagebuilder.createloginmessage.md +0 -22
  114. package/docs/api/foundation-comms.defaultmessagebuilder.createlogoutmessage.md +0 -22
  115. package/docs/api/foundation-comms.defaultmessagebuilder.createmetarequestmessage.md +0 -23
  116. package/docs/api/foundation-comms.defaultmessagebuilder.createmorecolumnsmessage.md +0 -22
  117. package/docs/api/foundation-comms.defaultmessagebuilder.createmorerowsmessage.md +0 -22
  118. package/docs/api/foundation-comms.defaultmessagebuilder.createrefreshtokenmessage.md +0 -15
  119. package/docs/api/foundation-comms.defaultmessagebuilder.createrequestmessage.md +0 -23
  120. package/docs/api/foundation-comms.defaultmessagebuilder.createresourcesmessage.md +0 -22
  121. package/docs/api/foundation-comms.defaultmessagebuilder.md +0 -41
  122. package/docs/api/foundation-comms.defaultnetworkmonitor.addresource.md +0 -23
  123. package/docs/api/foundation-comms.defaultnetworkmonitor.create.md +0 -16
  124. package/docs/api/foundation-comms.defaultnetworkmonitor.destroy.md +0 -16
  125. package/docs/api/foundation-comms.defaultnetworkmonitor.md +0 -31
  126. package/docs/api/foundation-comms.defaultnetworkmonitor.removeresource.md +0 -22
  127. package/docs/api/foundation-comms.defaultnetworkmonitor.runallchecks.md +0 -11
  128. package/docs/api/foundation-comms.defaultnetworkmonitor.status.md +0 -12
  129. package/docs/api/foundation-comms.defaultnetworkmonitorconfig.md +0 -13
  130. package/docs/api/foundation-comms.defaultsocket._constructor_.md +0 -24
  131. package/docs/api/foundation-comms.defaultsocket.connect.md +0 -24
  132. package/docs/api/foundation-comms.defaultsocket.hasvalidsession.md +0 -13
  133. package/docs/api/foundation-comms.defaultsocket.isconfigured.md +0 -11
  134. package/docs/api/foundation-comms.defaultsocket.isconnected.md +0 -11
  135. package/docs/api/foundation-comms.defaultsocket.isconnectedsubject.md +0 -11
  136. package/docs/api/foundation-comms.defaultsocket.isconnecting.md +0 -11
  137. package/docs/api/foundation-comms.defaultsocket.isdisconnected.md +0 -11
  138. package/docs/api/foundation-comms.defaultsocket.isdisconnectedbyserver.md +0 -11
  139. package/docs/api/foundation-comms.defaultsocket.isreconnecting.md +0 -11
  140. package/docs/api/foundation-comms.defaultsocket.md +0 -44
  141. package/docs/api/foundation-comms.defaultsocket.reset.md +0 -15
  142. package/docs/api/foundation-comms.defaultsocket.send.md +0 -23
  143. package/docs/api/foundation-comms.defaultsocket.sendforstream.md +0 -25
  144. package/docs/api/foundation-comms.defaultsocket.socketmessages.md +0 -11
  145. package/docs/api/foundation-comms.defaultsocketstatus.closedclean.md +0 -11
  146. package/docs/api/foundation-comms.defaultsocketstatus.closedcode.md +0 -11
  147. package/docs/api/foundation-comms.defaultsocketstatus.closedreason.md +0 -11
  148. package/docs/api/foundation-comms.defaultsocketstatus.hasvalidsession.md +0 -11
  149. package/docs/api/foundation-comms.defaultsocketstatus.isconfigured.md +0 -11
  150. package/docs/api/foundation-comms.defaultsocketstatus.isconnected.md +0 -11
  151. package/docs/api/foundation-comms.defaultsocketstatus.isconnectedchanged.md +0 -15
  152. package/docs/api/foundation-comms.defaultsocketstatus.isconnectedsubject.md +0 -11
  153. package/docs/api/foundation-comms.defaultsocketstatus.isconnecting.md +0 -11
  154. package/docs/api/foundation-comms.defaultsocketstatus.isdisconnected.md +0 -11
  155. package/docs/api/foundation-comms.defaultsocketstatus.isdisconnectedbyserver.md +0 -11
  156. package/docs/api/foundation-comms.defaultsocketstatus.isreconnecting.md +0 -11
  157. package/docs/api/foundation-comms.defaultsocketstatus.isreconnectingchanged.md +0 -15
  158. package/docs/api/foundation-comms.defaultsocketstatus.md +0 -42
  159. package/docs/api/foundation-comms.defaultsocketstatus.onclose.md +0 -22
  160. package/docs/api/foundation-comms.defaultsocketstatus.reconnectionlimitreached.md +0 -11
  161. package/docs/api/foundation-comms.defaultsocketstatus.resetclosedstate.md +0 -15
  162. package/docs/api/foundation-comms.defaultsocketstatus.serialize.md +0 -15
  163. package/docs/api/foundation-comms.genesisconnectevents.md +0 -18
  164. package/docs/api/foundation-comms.getnetworkmonitor.md +0 -30
  165. package/docs/api/foundation-comms.getsocket.md +0 -30
  166. package/docs/api/foundation-comms.getsocketstatus.md +0 -30
  167. package/docs/api/foundation-comms.messagebuilder.createmorecolumnsmessage.md +0 -30
  168. package/docs/api/foundation-comms.messagehaserrorcode.md +0 -13
  169. package/docs/api/foundation-comms.metadataevent.md +0 -14
  170. package/docs/api/foundation-comms.metadataeventdetail.md +0 -18
  171. package/docs/api/foundation-comms.metadataeventtype.md +0 -12
  172. package/docs/api/foundation-comms.monitoredresource.md +0 -15
  173. package/docs/api/foundation-comms.monitoredresourcechecks.md +0 -15
  174. package/docs/api/foundation-comms.monitoredresourcechecksresult.isconnected.md +0 -11
  175. package/docs/api/foundation-comms.monitoredresourcechecksresult.lastmessage.md +0 -11
  176. package/docs/api/foundation-comms.monitoredresourcechecksresult.lastupdated.md +0 -11
  177. package/docs/api/foundation-comms.monitoredresourcechecksresult.md +0 -23
  178. package/docs/api/foundation-comms.monitoredresourcechecksresult.timeout.md +0 -11
  179. package/docs/api/foundation-comms.monitoredresourcedatalogon.md +0 -15
  180. package/docs/api/foundation-comms.monitoredresourcemetadata.md +0 -15
  181. package/docs/api/foundation-comms.networklogger.md +0 -12
  182. package/docs/api/foundation-comms.networkmonitor.addresource.md +0 -23
  183. package/docs/api/foundation-comms.networkmonitor.create.md +0 -15
  184. package/docs/api/foundation-comms.networkmonitor.destroy.md +0 -15
  185. package/docs/api/foundation-comms.networkmonitor.md +0 -34
  186. package/docs/api/foundation-comms.networkmonitor.removeresource.md +0 -22
  187. package/docs/api/foundation-comms.networkmonitor.runallchecks.md +0 -23
  188. package/docs/api/foundation-comms.networkmonitor.status.md +0 -11
  189. package/docs/api/foundation-comms.networkmonitorconfig.checkinterval.md +0 -13
  190. package/docs/api/foundation-comms.networkmonitorconfig.checktimeout.md +0 -13
  191. package/docs/api/foundation-comms.networkmonitorconfig.documentevents.md +0 -13
  192. package/docs/api/foundation-comms.networkmonitorconfig.eventemitter.md +0 -13
  193. package/docs/api/foundation-comms.networkmonitorconfig.genesisconnectevents.md +0 -13
  194. package/docs/api/foundation-comms.networkmonitorconfig.md +0 -27
  195. package/docs/api/foundation-comms.networkmonitorconfig.resourcechecks.md +0 -13
  196. package/docs/api/foundation-comms.networkmonitorconfig.resourcedatalogon.md +0 -18
  197. package/docs/api/foundation-comms.networkmonitorconfig.windowevents.md +0 -13
  198. package/docs/api/foundation-comms.resourcehealth.md +0 -19
  199. package/docs/api/foundation-comms.serializedsocketstatus.closedclean.md +0 -11
  200. package/docs/api/foundation-comms.serializedsocketstatus.closedcode.md +0 -11
  201. package/docs/api/foundation-comms.serializedsocketstatus.closedreason.md +0 -11
  202. package/docs/api/foundation-comms.serializedsocketstatus.hasvalidsession.md +0 -11
  203. package/docs/api/foundation-comms.serializedsocketstatus.isconfigured.md +0 -13
  204. package/docs/api/foundation-comms.serializedsocketstatus.isconnected.md +0 -11
  205. package/docs/api/foundation-comms.serializedsocketstatus.isconnecting.md +0 -11
  206. package/docs/api/foundation-comms.serializedsocketstatus.isdisconnected.md +0 -11
  207. package/docs/api/foundation-comms.serializedsocketstatus.isdisconnectedbyserver.md +0 -11
  208. package/docs/api/foundation-comms.serializedsocketstatus.isreconnecting.md +0 -11
  209. package/docs/api/foundation-comms.serializedsocketstatus.md +0 -30
  210. package/docs/api/foundation-comms.serializedsocketstatus.reconnectionlimitreached.md +0 -11
  211. package/docs/api/foundation-comms.socketstatus.md +0 -28
  212. package/docs/api/foundation-comms.socketstatus.onclose.md +0 -22
  213. package/docs/api/foundation-comms.socketstatus.serialize.md +0 -15
  214. package/docs/api/foundation-comms.streamcompleteevent.md +0 -14
  215. package/docs/api/foundation-comms.streamcompleteeventtype.md +0 -12
  216. package/docs/api/foundation-comms.streamevent.md +0 -14
  217. package/docs/api/foundation-comms.streameventdetail.md +0 -19
  218. package/docs/api/foundation-comms.streameventfunctions.md +0 -19
  219. package/docs/api/foundation-comms.streameventtype.md +0 -12
  220. package/docs/api/foundation-comms.systemhealthchanged.md +0 -13
  221. package/docs/api/foundation-comms.systemhealthchangedevent.md +0 -15
  222. package/docs/api/foundation-comms.systemhealthstatus.md +0 -29
  223. package/docs/api/foundation-comms.user.set.md +0 -22
  224. package/docs/api/foundation-comms.user.unset.md +0 -15
@@ -1,133 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,113 +0,0 @@
1
- import { createObserver } from '@genesislcap/foundation-utils';
2
- import { DI } from '@microsoft/fast-foundation';
3
- /**
4
- * @public
5
- */
6
- export const CommitEventType = 'connect-commit-event';
7
- /**
8
- * @public
9
- */
10
- export const StreamEventType = 'connect-stream-event';
11
- /**
12
- * @public
13
- */
14
- export const StreamCompleteEventType = 'connect-stream-complete-event';
15
- /**
16
- * @public
17
- */
18
- export const MetadataEventType = 'connect-metadata-event';
19
- /**
20
- * Default ConnectEvents implementation.
21
- * @public
22
- */
23
- export class DefaultConnectEvents {
24
- constructor() {
25
- /** @internal */
26
- this.streamListeners = createObserver();
27
- /** @internal */
28
- this.streamCompleteListeners = createObserver();
29
- /** @internal */
30
- this.commitListeners = createObserver();
31
- /** @internal */
32
- this.metadataListeners = createObserver();
33
- }
34
- /** {@inheritDoc ConnectEvents.addStreamListener} */
35
- addStreamListener(listener, complete) {
36
- var _a, _b;
37
- const unsubscribe = (_a = this.streamListeners) === null || _a === void 0 ? void 0 : _a.subscribe(listener);
38
- const completeUnsubscribe = (_b = this.streamCompleteListeners) === null || _b === void 0 ? void 0 : _b.subscribe(complete);
39
- return () => {
40
- unsubscribe();
41
- completeUnsubscribe();
42
- };
43
- }
44
- /** {@inheritDoc ConnectEventsEmitter.onStreamEvent} */
45
- onStreamEvent(resourceName, message, stream, functions) {
46
- var _a;
47
- (_a = this.streamListeners) === null || _a === void 0 ? void 0 : _a.publish(new CustomEvent(StreamEventType, {
48
- detail: {
49
- functions,
50
- message,
51
- resourceName,
52
- stream,
53
- },
54
- }));
55
- }
56
- /** {@inheritDoc ConnectEventsEmitter.onStreamCompleteEvent} */
57
- onStreamCompleteEvent(stream) {
58
- var _a;
59
- (_a = this.streamCompleteListeners) === null || _a === void 0 ? void 0 : _a.publish(new CustomEvent(StreamCompleteEventType, {
60
- detail: stream,
61
- }));
62
- }
63
- /** {@inheritDoc ConnectEvents.addCommitListener} */
64
- addCommitListener(listener) {
65
- var _a;
66
- return (_a = this.commitListeners) === null || _a === void 0 ? void 0 : _a.subscribe(listener);
67
- }
68
- /** {@inheritDoc ConnectEventsEmitter.onStreamEvent} */
69
- onCommitEvent(eventName, message) {
70
- var _a;
71
- (_a = this.commitListeners) === null || _a === void 0 ? void 0 : _a.publish(new CustomEvent(CommitEventType, {
72
- detail: {
73
- eventName,
74
- message,
75
- },
76
- }));
77
- }
78
- /** {@inheritDoc ConnectEvents.addMetadataListener} */
79
- addMetadataListener(listener) {
80
- var _a;
81
- return (_a = this.metadataListeners) === null || _a === void 0 ? void 0 : _a.subscribe(listener);
82
- }
83
- /** {@inheritDoc ConnectEventsEmitter.onMetadataEvent} */
84
- onMetadataEvent(resourceName, message, error) {
85
- var _a;
86
- (_a = this.metadataListeners) === null || _a === void 0 ? void 0 : _a.publish(new CustomEvent(MetadataEventType, {
87
- detail: {
88
- resourceName,
89
- message,
90
- error,
91
- },
92
- }));
93
- }
94
- }
95
- /**
96
- * ConnectEvents DI key.
97
- *
98
- * @privateRemarks
99
- * Marked as internal to stop api-extractor becoming confused cross-linking tokens with the same name.
100
- *
101
- * @internal
102
- */
103
- export const ConnectEvents = DI.createInterface((x) => x.singleton(DefaultConnectEvents));
104
- /**
105
- * ConnectEventsEmitter DI key.
106
- *
107
- * @privateRemarks
108
- * ConnectEventsEmitter is used by Connect.
109
- * Marked as internal to stop api-extractor becoming confused cross-linking tokens with the same name.
110
- *
111
- * @internal
112
- */
113
- export const ConnectEventsEmitter = DI.createInterface((x) => x.aliasTo(ConnectEvents));
@@ -1,119 +0,0 @@
1
- import { __decorate } from "tslib";
2
- import { observable } from '@microsoft/fast-element';
3
- import { DI } from '@microsoft/fast-foundation';
4
- import { BehaviorSubject } from 'rxjs';
5
- /**
6
- * Default SocketStatus implementation.
7
- * @public
8
- */
9
- export class DefaultSocketStatus {
10
- constructor() {
11
- this.isConfigured = false;
12
- this.isConnecting = false;
13
- this.isConnected = false;
14
- this.isReconnecting = false;
15
- this.reconnectionLimitReached = false;
16
- this.hasValidSession = false;
17
- this.isConnectedSubject = new BehaviorSubject(this.isConnected);
18
- }
19
- get isDisconnected() {
20
- return !this.isConnected;
21
- }
22
- get isDisconnectedByServer() {
23
- return this.closedClean !== undefined ? !this.closedClean : false;
24
- }
25
- isConnectedChanged() {
26
- var _a;
27
- if (this.isConnected) {
28
- this.resetClosedState();
29
- }
30
- this.isConnecting = false;
31
- this.isReconnecting = false;
32
- (_a = this.isConnectedSubject) === null || _a === void 0 ? void 0 : _a.next(this.isConnected);
33
- }
34
- isReconnectingChanged() {
35
- if (this.isReconnecting) {
36
- this.reconnectionLimitReached = false;
37
- }
38
- }
39
- resetClosedState() {
40
- this.closedCode = undefined;
41
- this.closedReason = undefined;
42
- this.closedClean = undefined;
43
- }
44
- serialize() {
45
- return {
46
- isConfigured: this.isConfigured,
47
- isConnecting: this.isConnecting,
48
- isConnected: this.isConnected,
49
- isDisconnected: this.isDisconnected,
50
- isDisconnectedByServer: this.isDisconnectedByServer,
51
- isReconnecting: this.isReconnecting,
52
- reconnectionLimitReached: this.reconnectionLimitReached,
53
- hasValidSession: this.hasValidSession,
54
- closedCode: this.closedCode,
55
- closedReason: this.closedReason,
56
- closedClean: this.closedClean,
57
- };
58
- }
59
- onClose(event) {
60
- this.isConnected = false;
61
- this.closedCode = event.code;
62
- this.closedReason = event.reason;
63
- this.closedClean = event.wasClean;
64
- }
65
- }
66
- __decorate([
67
- observable
68
- ], DefaultSocketStatus.prototype, "isConfigured", void 0);
69
- __decorate([
70
- observable
71
- ], DefaultSocketStatus.prototype, "isConnecting", void 0);
72
- __decorate([
73
- observable
74
- ], DefaultSocketStatus.prototype, "isConnected", void 0);
75
- __decorate([
76
- observable
77
- ], DefaultSocketStatus.prototype, "isReconnecting", void 0);
78
- __decorate([
79
- observable
80
- ], DefaultSocketStatus.prototype, "reconnectionLimitReached", void 0);
81
- __decorate([
82
- observable
83
- ], DefaultSocketStatus.prototype, "hasValidSession", void 0);
84
- __decorate([
85
- observable
86
- ], DefaultSocketStatus.prototype, "closedCode", void 0);
87
- __decorate([
88
- observable
89
- ], DefaultSocketStatus.prototype, "closedReason", void 0);
90
- __decorate([
91
- observable
92
- ], DefaultSocketStatus.prototype, "closedClean", void 0);
93
- /**
94
- * SocketStatus DI key.
95
- *
96
- * @privateRemarks
97
- * Marked as internal to stop api-extractor becoming confused cross-linking tokens with the same name.
98
- *
99
- * @internal
100
- */
101
- export const SocketStatus = DI.createInterface((x) => x.singleton(DefaultSocketStatus));
102
- /**
103
- * Gets SocketStatus from the DI container.
104
- *
105
- * @remarks
106
- * A utility method for host applications that are not using decorators or the DI container.
107
- *
108
- * @example
109
- * ```ts
110
- * import { getSocketStatus } from '@genesislcap/foundation-comms';
111
- * ...
112
- * private socketStatus = getSocketStatus();
113
- * ```
114
- *
115
- * @public
116
- */
117
- export function getSocketStatus() {
118
- return DI.getOrCreateDOMContainer().get(SocketStatus);
119
- }
@@ -1,46 +0,0 @@
1
- import { __awaiter } from "tslib";
2
- import { DI } from '@microsoft/fast-foundation';
3
- import { getConnect, getSocket } from '../connect';
4
- import { MessageType } from '../connect/message';
5
- /**
6
- * Default NetworkMonitorConfig DI implementation.
7
- * @public
8
- */
9
- export const defaultNetworkMonitorConfig = {
10
- windowEvents: ['online', 'offline', 'pageshow'],
11
- documentEvents: ['visibilitychange'],
12
- genesisConnectEvents: ['stream', 'commit'],
13
- checkInterval: 10000,
14
- checkTimeout: 3000,
15
- /**
16
- * The default when a custom check function is not explicitly provided for a resource.
17
- */
18
- resourceChecks: (sourceRef) => __awaiter(void 0, void 0, void 0, function* () {
19
- var _a;
20
- const connect = getConnect();
21
- const message = yield connect.getMoreColumns(sourceRef);
22
- const lastUpdated = Date.now();
23
- const lastMessage = message;
24
- const isConnected = (_a = (message === null || message === void 0 ? void 0 : message.MESSAGE_TYPE) === MessageType.MORE_COLUMNS_ACK) !== null && _a !== void 0 ? _a : false;
25
- return {
26
- isConnected,
27
- lastUpdated,
28
- lastMessage,
29
- };
30
- }),
31
- /**
32
- * The default when a custom data logon function is not explicitly provided for a resource.
33
- */
34
- resourceDataLogon: ({ message, functions }) => {
35
- const { onMessage, onError } = functions;
36
- getSocket().sendForStream(message, onMessage, onError);
37
- },
38
- };
39
- /**
40
- * NetworkMonitorConfig DI key.
41
- *
42
- * @internal
43
- * @privateRemarks
44
- * Marked as internal to stop api-extractor becoming confused cross-linking tokens with the same name.
45
- */
46
- export const NetworkMonitorConfig = DI.createInterface((x) => x.instance(defaultNetworkMonitorConfig));
@@ -1,3 +0,0 @@
1
- export * from './types';
2
- export * from './config';
3
- export * from './service';