@genesislcap/foundation-comms 14.167.3-alpha-69ba23f.0 → 14.169.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 +11 -1
  3. package/dist/dts/connect/connect.d.ts.map +1 -1
  4. package/dist/dts/connect/connect.events.d.ts +173 -0
  5. package/dist/dts/connect/connect.events.d.ts.map +1 -0
  6. package/dist/dts/connect/http.connect.d.ts +1 -0
  7. package/dist/dts/connect/http.connect.d.ts.map +1 -1
  8. package/dist/dts/connect/index.d.ts +2 -0
  9. package/dist/dts/connect/index.d.ts.map +1 -1
  10. package/dist/dts/connect/message.d.ts +51 -0
  11. package/dist/dts/connect/message.d.ts.map +1 -1
  12. package/dist/dts/connect/socket.d.ts +72 -8
  13. package/dist/dts/connect/socket.d.ts.map +1 -1
  14. package/dist/dts/connect/socket.status.d.ts +79 -0
  15. package/dist/dts/connect/socket.status.d.ts.map +1 -0
  16. package/dist/dts/datasource/datasource.d.ts +9 -0
  17. package/dist/dts/datasource/datasource.d.ts.map +1 -1
  18. package/dist/dts/fdc3/fdc3.d.ts +17 -1
  19. package/dist/dts/fdc3/fdc3.d.ts.map +1 -1
  20. package/dist/dts/index.d.ts +1 -0
  21. package/dist/dts/index.d.ts.map +1 -1
  22. package/dist/dts/networkMonitor/config.d.ts +56 -0
  23. package/dist/dts/networkMonitor/config.d.ts.map +1 -0
  24. package/dist/dts/networkMonitor/index.d.ts +4 -0
  25. package/dist/dts/networkMonitor/index.d.ts.map +1 -0
  26. package/dist/dts/networkMonitor/service.d.ts +193 -0
  27. package/dist/dts/networkMonitor/service.d.ts.map +1 -0
  28. package/dist/dts/networkMonitor/types.d.ts +133 -0
  29. package/dist/dts/networkMonitor/types.d.ts.map +1 -0
  30. package/dist/dts/testing/mocks/connect/connect.d.ts +1 -0
  31. package/dist/dts/testing/mocks/connect/connect.d.ts.map +1 -1
  32. package/dist/dts/testing/mocks/connect/socket.d.ts +5 -1
  33. package/dist/dts/testing/mocks/connect/socket.d.ts.map +1 -1
  34. package/dist/dts/testing/mocks/datasource/datasource.d.ts +1 -0
  35. package/dist/dts/testing/mocks/datasource/datasource.d.ts.map +1 -1
  36. package/dist/dts/user/user.d.ts +15 -0
  37. package/dist/dts/user/user.d.ts.map +1 -1
  38. package/dist/esm/auth/auth.js +5 -2
  39. package/dist/esm/connect/connect.events.js +113 -0
  40. package/dist/esm/connect/connect.js +30 -8
  41. package/dist/esm/connect/http.connect.js +6 -0
  42. package/dist/esm/connect/index.js +2 -0
  43. package/dist/esm/connect/message.js +25 -4
  44. package/dist/esm/connect/socket.js +113 -44
  45. package/dist/esm/connect/socket.status.js +119 -0
  46. package/dist/esm/datasource/datasource.js +18 -8
  47. package/dist/esm/fdc3/fdc3.js +4 -4
  48. package/dist/esm/index.js +1 -0
  49. package/dist/esm/networkMonitor/config.js +46 -0
  50. package/dist/esm/networkMonitor/index.js +3 -0
  51. package/dist/esm/networkMonitor/service.js +445 -0
  52. package/dist/esm/networkMonitor/types.js +5 -0
  53. package/dist/esm/testing/mocks/connect/connect.js +3 -0
  54. package/dist/esm/testing/mocks/connect/socket.js +1 -1
  55. package/dist/esm/testing/mocks/datasource/datasource.js +1 -0
  56. package/dist/esm/user/user.js +22 -1
  57. package/dist/foundation-comms.api.json +14711 -8166
  58. package/dist/foundation-comms.d.ts +841 -13
  59. package/docs/api/foundation-comms.commitevent.md +14 -0
  60. package/docs/api/foundation-comms.commiteventdetail.md +17 -0
  61. package/docs/api/foundation-comms.commiteventtype.md +12 -0
  62. package/docs/api/foundation-comms.connect.getmorecolumns.md +26 -0
  63. package/docs/api/foundation-comms.connect.md +1 -0
  64. package/docs/api/foundation-comms.connectevents.addcommitlistener.md +24 -0
  65. package/docs/api/foundation-comms.connectevents.addmetadatalistener.md +24 -0
  66. package/docs/api/foundation-comms.connectevents.addstreamlistener.md +25 -0
  67. package/docs/api/foundation-comms.connectevents.md +22 -0
  68. package/docs/api/foundation-comms.connecteventsemitter.md +24 -0
  69. package/docs/api/foundation-comms.connecteventsemitter.oncommitevent.md +25 -0
  70. package/docs/api/foundation-comms.connecteventsemitter.onmetadataevent.md +26 -0
  71. package/docs/api/foundation-comms.connecteventsemitter.onstreamcompleteevent.md +24 -0
  72. package/docs/api/foundation-comms.connecteventsemitter.onstreamevent.md +27 -0
  73. package/docs/api/foundation-comms.currentuser.md +2 -0
  74. package/docs/api/foundation-comms.currentuser.set.md +22 -0
  75. package/docs/api/foundation-comms.currentuser.unset.md +15 -0
  76. package/docs/api/foundation-comms.datasource.destroy.md +17 -0
  77. package/docs/api/foundation-comms.datasource.md +1 -0
  78. package/docs/api/foundation-comms.defaultconnect._constructor_.md +2 -1
  79. package/docs/api/foundation-comms.defaultconnect.getmorecolumns.md +22 -0
  80. package/docs/api/foundation-comms.defaultconnect.md +2 -1
  81. package/docs/api/foundation-comms.defaultconnectevents.addcommitlistener.md +24 -0
  82. package/docs/api/foundation-comms.defaultconnectevents.addmetadatalistener.md +24 -0
  83. package/docs/api/foundation-comms.defaultconnectevents.addstreamlistener.md +25 -0
  84. package/docs/api/foundation-comms.defaultconnectevents.md +27 -0
  85. package/docs/api/foundation-comms.defaultconnectevents.oncommitevent.md +25 -0
  86. package/docs/api/foundation-comms.defaultconnectevents.onmetadataevent.md +26 -0
  87. package/docs/api/foundation-comms.defaultconnectevents.onstreamcompleteevent.md +24 -0
  88. package/docs/api/foundation-comms.defaultconnectevents.onstreamevent.md +27 -0
  89. package/docs/api/foundation-comms.defaultdatasource.destroy.md +17 -0
  90. package/docs/api/foundation-comms.defaultdatasource.md +1 -0
  91. package/docs/api/foundation-comms.defaulthttpconnect.getmorecolumns.md +22 -0
  92. package/docs/api/foundation-comms.defaulthttpconnect.md +1 -0
  93. package/docs/api/foundation-comms.defaultmessagebuilder._constructor_.md +21 -0
  94. package/docs/api/foundation-comms.defaultmessagebuilder.createchangepasswordmessage.md +24 -0
  95. package/docs/api/foundation-comms.defaultmessagebuilder.createcommitmessage.md +23 -0
  96. package/docs/api/foundation-comms.defaultmessagebuilder.createdatalogoffmessage.md +22 -0
  97. package/docs/api/foundation-comms.defaultmessagebuilder.createdatalogonmessage.md +23 -0
  98. package/docs/api/foundation-comms.defaultmessagebuilder.createforgotpasswordmessage.md +24 -0
  99. package/docs/api/foundation-comms.defaultmessagebuilder.createforgotpasswordtokenmessage.md +25 -0
  100. package/docs/api/foundation-comms.defaultmessagebuilder.createhttpheadersfrommessage.md +23 -0
  101. package/docs/api/foundation-comms.defaultmessagebuilder.createloginmessage.md +22 -0
  102. package/docs/api/foundation-comms.defaultmessagebuilder.createlogoutmessage.md +22 -0
  103. package/docs/api/foundation-comms.defaultmessagebuilder.createmetarequestmessage.md +23 -0
  104. package/docs/api/foundation-comms.defaultmessagebuilder.createmorecolumnsmessage.md +22 -0
  105. package/docs/api/foundation-comms.defaultmessagebuilder.createmorerowsmessage.md +22 -0
  106. package/docs/api/foundation-comms.defaultmessagebuilder.createrefreshtokenmessage.md +15 -0
  107. package/docs/api/foundation-comms.defaultmessagebuilder.createrequestmessage.md +23 -0
  108. package/docs/api/foundation-comms.defaultmessagebuilder.createresourcesmessage.md +22 -0
  109. package/docs/api/foundation-comms.defaultmessagebuilder.md +41 -0
  110. package/docs/api/foundation-comms.defaultnetworkmonitor.addresource.md +23 -0
  111. package/docs/api/foundation-comms.defaultnetworkmonitor.create.md +16 -0
  112. package/docs/api/foundation-comms.defaultnetworkmonitor.destroy.md +16 -0
  113. package/docs/api/foundation-comms.defaultnetworkmonitor.md +31 -0
  114. package/docs/api/foundation-comms.defaultnetworkmonitor.removeresource.md +22 -0
  115. package/docs/api/foundation-comms.defaultnetworkmonitor.runallchecks.md +11 -0
  116. package/docs/api/foundation-comms.defaultnetworkmonitor.status.md +12 -0
  117. package/docs/api/foundation-comms.defaultnetworkmonitorconfig.md +13 -0
  118. package/docs/api/foundation-comms.defaultsocket._constructor_.md +24 -0
  119. package/docs/api/foundation-comms.defaultsocket.connect.md +24 -0
  120. package/docs/api/foundation-comms.defaultsocket.hasvalidsession.md +13 -0
  121. package/docs/api/foundation-comms.defaultsocket.isconfigured.md +11 -0
  122. package/docs/api/foundation-comms.defaultsocket.isconnected.md +11 -0
  123. package/docs/api/foundation-comms.defaultsocket.isconnectedsubject.md +11 -0
  124. package/docs/api/foundation-comms.defaultsocket.isconnecting.md +11 -0
  125. package/docs/api/foundation-comms.defaultsocket.isdisconnected.md +11 -0
  126. package/docs/api/foundation-comms.defaultsocket.isdisconnectedbyserver.md +11 -0
  127. package/docs/api/foundation-comms.defaultsocket.isreconnecting.md +11 -0
  128. package/docs/api/foundation-comms.defaultsocket.md +44 -0
  129. package/docs/api/foundation-comms.defaultsocket.reset.md +15 -0
  130. package/docs/api/foundation-comms.defaultsocket.send.md +23 -0
  131. package/docs/api/foundation-comms.defaultsocket.sendforstream.md +25 -0
  132. package/docs/api/foundation-comms.defaultsocket.socketmessages.md +11 -0
  133. package/docs/api/foundation-comms.defaultsocketstatus.closedclean.md +11 -0
  134. package/docs/api/foundation-comms.defaultsocketstatus.closedcode.md +11 -0
  135. package/docs/api/foundation-comms.defaultsocketstatus.closedreason.md +11 -0
  136. package/docs/api/foundation-comms.defaultsocketstatus.hasvalidsession.md +11 -0
  137. package/docs/api/foundation-comms.defaultsocketstatus.isconfigured.md +11 -0
  138. package/docs/api/foundation-comms.defaultsocketstatus.isconnected.md +11 -0
  139. package/docs/api/foundation-comms.defaultsocketstatus.isconnectedchanged.md +15 -0
  140. package/docs/api/foundation-comms.defaultsocketstatus.isconnectedsubject.md +11 -0
  141. package/docs/api/foundation-comms.defaultsocketstatus.isconnecting.md +11 -0
  142. package/docs/api/foundation-comms.defaultsocketstatus.isdisconnected.md +11 -0
  143. package/docs/api/foundation-comms.defaultsocketstatus.isdisconnectedbyserver.md +11 -0
  144. package/docs/api/foundation-comms.defaultsocketstatus.isreconnecting.md +11 -0
  145. package/docs/api/foundation-comms.defaultsocketstatus.isreconnectingchanged.md +15 -0
  146. package/docs/api/foundation-comms.defaultsocketstatus.md +42 -0
  147. package/docs/api/foundation-comms.defaultsocketstatus.onclose.md +22 -0
  148. package/docs/api/foundation-comms.defaultsocketstatus.reconnectionlimitreached.md +11 -0
  149. package/docs/api/foundation-comms.defaultsocketstatus.resetclosedstate.md +15 -0
  150. package/docs/api/foundation-comms.defaultsocketstatus.serialize.md +15 -0
  151. package/docs/api/foundation-comms.genesisconnectevents.md +18 -0
  152. package/docs/api/foundation-comms.getnetworkmonitor.md +30 -0
  153. package/docs/api/foundation-comms.getsocket.md +30 -0
  154. package/docs/api/foundation-comms.getsocketstatus.md +30 -0
  155. package/docs/api/foundation-comms.md +39 -0
  156. package/docs/api/foundation-comms.messagebuilder.createmorecolumnsmessage.md +30 -0
  157. package/docs/api/foundation-comms.messagebuilder.md +1 -0
  158. package/docs/api/foundation-comms.messagehaserrorcode.md +13 -0
  159. package/docs/api/foundation-comms.messagetype.md +2 -0
  160. package/docs/api/foundation-comms.metadataevent.md +14 -0
  161. package/docs/api/foundation-comms.metadataeventdetail.md +18 -0
  162. package/docs/api/foundation-comms.metadataeventtype.md +12 -0
  163. package/docs/api/foundation-comms.monitoredresource.md +15 -0
  164. package/docs/api/foundation-comms.monitoredresourcechecks.md +15 -0
  165. package/docs/api/foundation-comms.monitoredresourcechecksresult.isconnected.md +11 -0
  166. package/docs/api/foundation-comms.monitoredresourcechecksresult.lastmessage.md +11 -0
  167. package/docs/api/foundation-comms.monitoredresourcechecksresult.lastupdated.md +11 -0
  168. package/docs/api/foundation-comms.monitoredresourcechecksresult.md +23 -0
  169. package/docs/api/foundation-comms.monitoredresourcechecksresult.timeout.md +11 -0
  170. package/docs/api/foundation-comms.monitoredresourcedatalogon.md +15 -0
  171. package/docs/api/foundation-comms.monitoredresourcemetadata.md +15 -0
  172. package/docs/api/foundation-comms.networklogger.md +12 -0
  173. package/docs/api/foundation-comms.networkmonitor.addresource.md +23 -0
  174. package/docs/api/foundation-comms.networkmonitor.create.md +15 -0
  175. package/docs/api/foundation-comms.networkmonitor.destroy.md +15 -0
  176. package/docs/api/foundation-comms.networkmonitor.md +34 -0
  177. package/docs/api/foundation-comms.networkmonitor.removeresource.md +22 -0
  178. package/docs/api/foundation-comms.networkmonitor.runallchecks.md +23 -0
  179. package/docs/api/foundation-comms.networkmonitor.status.md +11 -0
  180. package/docs/api/foundation-comms.networkmonitorconfig.checkinterval.md +13 -0
  181. package/docs/api/foundation-comms.networkmonitorconfig.checktimeout.md +13 -0
  182. package/docs/api/foundation-comms.networkmonitorconfig.documentevents.md +13 -0
  183. package/docs/api/foundation-comms.networkmonitorconfig.eventemitter.md +13 -0
  184. package/docs/api/foundation-comms.networkmonitorconfig.genesisconnectevents.md +13 -0
  185. package/docs/api/foundation-comms.networkmonitorconfig.md +27 -0
  186. package/docs/api/foundation-comms.networkmonitorconfig.resourcechecks.md +13 -0
  187. package/docs/api/foundation-comms.networkmonitorconfig.resourcedatalogon.md +18 -0
  188. package/docs/api/foundation-comms.networkmonitorconfig.windowevents.md +13 -0
  189. package/docs/api/foundation-comms.resourcehealth.md +19 -0
  190. package/docs/api/foundation-comms.serializedsocketstatus.closedclean.md +11 -0
  191. package/docs/api/foundation-comms.serializedsocketstatus.closedcode.md +11 -0
  192. package/docs/api/foundation-comms.serializedsocketstatus.closedreason.md +11 -0
  193. package/docs/api/foundation-comms.serializedsocketstatus.hasvalidsession.md +11 -0
  194. package/docs/api/foundation-comms.serializedsocketstatus.isconfigured.md +13 -0
  195. package/docs/api/foundation-comms.serializedsocketstatus.isconnected.md +11 -0
  196. package/docs/api/foundation-comms.serializedsocketstatus.isconnecting.md +11 -0
  197. package/docs/api/foundation-comms.serializedsocketstatus.isdisconnected.md +11 -0
  198. package/docs/api/foundation-comms.serializedsocketstatus.isdisconnectedbyserver.md +11 -0
  199. package/docs/api/foundation-comms.serializedsocketstatus.isreconnecting.md +11 -0
  200. package/docs/api/foundation-comms.serializedsocketstatus.md +30 -0
  201. package/docs/api/foundation-comms.serializedsocketstatus.reconnectionlimitreached.md +11 -0
  202. package/docs/api/foundation-comms.socket.md +3 -11
  203. package/docs/api/foundation-comms.socket.sendforstream.md +2 -1
  204. package/docs/api/{foundation-comms.socket.isconnectedsubject.md → foundation-comms.socketstatus.isconnectedsubject.md} +2 -2
  205. package/docs/api/foundation-comms.socketstatus.md +28 -0
  206. package/docs/api/foundation-comms.socketstatus.onclose.md +22 -0
  207. package/docs/api/foundation-comms.socketstatus.serialize.md +15 -0
  208. package/docs/api/foundation-comms.streamcompleteevent.md +14 -0
  209. package/docs/api/foundation-comms.streamcompleteeventtype.md +12 -0
  210. package/docs/api/foundation-comms.streamevent.md +14 -0
  211. package/docs/api/foundation-comms.streameventdetail.md +19 -0
  212. package/docs/api/foundation-comms.streameventfunctions.md +19 -0
  213. package/docs/api/foundation-comms.streameventtype.md +12 -0
  214. package/docs/api/foundation-comms.systemhealthchanged.md +13 -0
  215. package/docs/api/foundation-comms.systemhealthchangedevent.md +15 -0
  216. package/docs/api/foundation-comms.systemhealthstatus.md +29 -0
  217. package/docs/api/foundation-comms.user.md +2 -0
  218. package/docs/api/foundation-comms.user.set.md +22 -0
  219. package/docs/api/foundation-comms.user.unset.md +15 -0
  220. package/docs/api-report.md +520 -16
  221. package/package.json +13 -11
  222. package/docs/api/foundation-comms.socket.hasvalidsession.md +0 -11
  223. package/docs/api/foundation-comms.socket.isconnected.md +0 -11
  224. package/docs/api/foundation-comms.socket.isreconnecting.md +0 -11
@@ -1 +1 @@
1
- {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/auth/auth.ts"],"names":[],"mappings":"AAEA,OAAO,EAAmB,UAAU,EAAE,MAAM,MAAM,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAGL,cAAc,EAIf,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,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AC,YAAY,CAAC,CAAC;IAEhC;;;;;OAKG;IACH,iBAAiB,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;CACvC;AAED;;;GAGG;AACH,qBAAa,WAAY,YAAW,IAAI;IAsB3B,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,OAAO;IACR,OAAO,CAAC,cAAc;IACnB,OAAO,CAAC,iBAAiB;IAxBlC,SAAS,UAAS;IAClB,WAAW,EAAE,IAAI,CAAC;IAElB,gBAAgB,EAAE,WAAW,CAAC;IAC1C,OAAO,CAAC,uBAAuB;IAI/B,OAAO,CAAC,iBAAiB,CAA8B;IACvD,IAAI,WAAW,IAAI,UAAU,CAAC,OAAO,CAAC,CAErC;IAED,IACI,UAAU,IAAI,OAAO,CAIxB;gBAGkB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EACT,cAAc,EAAE,cAAc,EAC3B,iBAAiB,EAAE,iBAAiB;IAG3D,KAAK,CAAC,WAAW,EAAE,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC;IAuClD,MAAM,IAAI,OAAO,CAAC,YAAY,CAAC;IAuD/B,iBAAiB,IAAI,OAAO,CAAC,OAAO,CAAC;IAmB3C;;;OAGG;YACW,gBAAgB;IAW9B;;;;OAIG;IACH,OAAO,CAAC,wBAAwB;IAmBhC;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IAqBxB;;;OAGG;IACH,OAAO,CAAC,iBAAiB;CAK1B;AAED;;;GAGG;AACH,eAAO,MAAM,IAAI,4DAA4D,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { BehaviorSubject, Observable } from 'rxjs';
2
2
  import type { Metadata, SchemaResponse } from '../metadata';
3
3
  import { MetaCache } from '../metadata';
4
+ import { ConnectEventsEmitter } from './connect.events';
4
5
  import { ConnectConfig } from './connect.types';
5
6
  import { CommitParams, Message, MessageBuilder, RequestParams } from './message';
6
7
  import type { SocketObservable } from './socket';
@@ -96,6 +97,13 @@ export interface Connect {
96
97
  * @returns A promise that resolves with the additional rows of data.
97
98
  */
98
99
  getMoreRows(sourceRef: string): Promise<Message>;
100
+ /**
101
+ * Requests additional columns for the specified source reference.
102
+ * @public
103
+ * @param sourceRef - The source reference to request more columns for.
104
+ * @returns A promise that resolves with the additional columns.
105
+ */
106
+ getMoreColumns(sourceRef: string): Promise<Message>;
99
107
  /**
100
108
  * Logs off from the specified data source.
101
109
  * @public
@@ -149,12 +157,13 @@ export declare class DefaultConnect implements Connect {
149
157
  socket: Socket;
150
158
  private messageBuilder;
151
159
  private metaCache;
160
+ private events;
152
161
  private config;
153
162
  isWorking: boolean;
154
163
  get isConnected(): boolean;
155
164
  get isConnectedSubject(): BehaviorSubject<boolean>;
156
165
  get isConnected$(): Observable<boolean>;
157
- constructor(socket: Socket, messageBuilder: MessageBuilder, metaCache: MetaCache, config?: ConnectConfig);
166
+ constructor(socket: Socket, messageBuilder: MessageBuilder, metaCache: MetaCache, events: ConnectEventsEmitter, config?: ConnectConfig);
158
167
  httpMode(): boolean;
159
168
  setValidSession(valid: boolean): void;
160
169
  send<T>(message: Message<any>, needsHandling?: boolean): Promise<any>;
@@ -163,6 +172,7 @@ export declare class DefaultConnect implements Connect {
163
172
  snapshot(resourceName: string, params?: any): Promise<Message>;
164
173
  stream(resourceName: string, onMessage: Function, onError: Function, params?: any): SocketObservable<Message>;
165
174
  getMoreRows(sourceRef: string): Promise<Message>;
175
+ getMoreColumns(sourceRef: string): Promise<Message>;
166
176
  dataLogoff(streamSourceRef: string): Promise<Message>;
167
177
  getMetadata(resourceName: string, useCache?: boolean): Promise<Metadata>;
168
178
  getJSONSchema(resourceName: string, useCache?: boolean): Promise<SchemaResponse>;
@@ -1 +1 @@
1
- {"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../../../src/connect/connect.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AACnD,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,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;IAKnD,UAAU,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAMrD,WAAW,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,GAAE,OAAc,GAAG,OAAO,CAAC,QAAQ,CAAC;IAmC9E,aAAa,CACxB,YAAY,EAAE,MAAM,EACpB,QAAQ,GAAE,OAAc,GACvB,OAAO,CAAC,cAAc,CAAC;IAiCnB,OAAO,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC;IASvE,qBAAqB,CAAC,MAAM,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC;IAM/C,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC;CAOrF;AAID;;;GAGG;AACH,eAAO,MAAM,SAAS,+DAAkE,CAAC;AAEzF;;;GAGG;AACH,eAAO,MAAM,OAAO,+DAEnB,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,UAAU,IAAI,OAAO,CAEpC"}
@@ -0,0 +1,173 @@
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
@@ -0,0 +1 @@
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,iBAA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AE,oBAAoB;IAcjC,+DAA+D;IACxD,qBAAqB,CAAC,MAAM,EAAE,gBAAgB,CAAC,GAAG,CAAC;IAQ1D,gBAAgB;IAChB,SAAS,CAAC,eAAe,gEAAiC;IAE1D,oDAAoD;IACpD,iBAAiB,CAAC,QAAQ,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"}
@@ -54,6 +54,7 @@ export declare class DefaultHttpConnect implements Connect {
54
54
  stream(resourceName: string, onMessage: Function, onError: Function, params?: any): SocketObservable<Message>;
55
55
  private getMessage;
56
56
  getMoreRows(sourceRef: string): Promise<Message>;
57
+ getMoreColumns(sourceRef: string): Promise<Message>;
57
58
  dataLogoff(streamSourceRef: string): Promise<Message>;
58
59
  getMetadata(resourceName: string, useCache?: boolean): Promise<Metadata>;
59
60
  getJSONSchema(resourceName: string): Promise<SchemaResponse>;
@@ -1 +1 @@
1
- {"version":3,"file":"http.connect.d.ts","sourceRoot":"","sources":["../../../src/connect/http.connect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAG5E,OAAO,EACL,eAAe,EAKf,UAAU,EAGX,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,M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CAAC,OAAO,CAAC;IAS/C,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC;IAYpF,OAAO,CAAC,UAAU;IAkDlB,OAAO,CAAC,eAAe;IAOvB,OAAO,CAAC,8BAA8B;IAmBtC,OAAO,CAAC,MAAM,CAAC,OAAO;IAItB,OAAO,CAAC,MAAM,CAAC,MAAM;CAUtB;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW,+DAAsE,CAAC"}
@@ -1,9 +1,11 @@
1
+ export * from './connect.events';
1
2
  export * from './connect';
2
3
  export * from './connect.types';
3
4
  export * from './http.connect';
4
5
  export * from './http';
5
6
  export * from './message';
6
7
  export * from './serializers';
8
+ export * from './socket.status';
7
9
  export * from './socket';
8
10
  export * from './reconnectStrategy';
9
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/connect/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/connect/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC"}
@@ -1,4 +1,6 @@
1
+ import { UUID } from '@genesislcap/foundation-utils';
1
2
  import { AuthInfo, LoginResult } from '../auth/auth.types';
3
+ import { Session } from '../session';
2
4
  /**
3
5
  * General Message types
4
6
  * @public
@@ -11,6 +13,8 @@ export declare enum MessageType {
11
13
  HEARTBEAT_PING = "HEARTBEAT_PING",
12
14
  HEARTBEAT_PONG = "HEARTBEAT_PONG",
13
15
  MORE_ROWS = "MORE_ROWS",
16
+ MORE_COLUMNS = "MORE_COLUMNS",
17
+ MORE_COLUMNS_ACK = "MORE_COLUMNS_ACK",
14
18
  MSG_ACK = "MSG_ACK",
15
19
  MSG_NACK = "MSG_NACK",
16
20
  LOGOUT_ACK = "LOGOUT_ACK",
@@ -233,6 +237,13 @@ export type CommitParams = {
233
237
  * @returns The message if no errors are present, otherwise throws an Error
234
238
  */
235
239
  export declare const messageOrThrow: (message: Message) => Message<any>;
240
+ /**
241
+ * Check if the message contains an error code.
242
+ * @param message - The message object.
243
+ * @param code - The error code.
244
+ * @public
245
+ */
246
+ export declare const messageHasErrorCode: (message: Message, code: string | number) => boolean;
236
247
  /**
237
248
  * A utility class for building different types of messages.
238
249
  * @public
@@ -285,6 +296,15 @@ export interface MessageBuilder {
285
296
  * @returns The more rows message.
286
297
  */
287
298
  createMoreRowsMessage(sourceRef: string): Message;
299
+ /**
300
+ * Creates a message to request more columns.
301
+ *
302
+ * @remarks MORE_COLUMNS
303
+ * @public
304
+ * @param sourceRef - The source reference.
305
+ * @returns The more columns message.
306
+ */
307
+ createMoreColumnsMessage(sourceRef: string): Message;
288
308
  /**
289
309
  * Creates a request message.
290
310
  *
@@ -374,6 +394,37 @@ export interface MessageBuilder {
374
394
  */
375
395
  createHTTPHeadersFromMessage(message: Message, contentType?: string): HeadersInit;
376
396
  }
397
+ /**
398
+ * TODO: Abstract out localStorage interaction with shell io stuff
399
+ */
400
+ /**
401
+ * Default MessageBuilder implementation.
402
+ * @public
403
+ */
404
+ export declare class DefaultMessageBuilder implements MessageBuilder {
405
+ private session;
406
+ private uuid;
407
+ /**
408
+ * UUID will be created in the DI with the App specific requirements.
409
+ * Keeping it encapsulated means messages will always conform.
410
+ */
411
+ constructor(session: Session, uuid: UUID);
412
+ createLoginMessage(credentials: AuthInfo): Message<MessageDetails.Login>;
413
+ createLogoutMessage(loginResult?: LoginResult): Message;
414
+ createDataLogonMessage(resourceName: string, params?: any): Message<MessageDetails.DataserverRequest>;
415
+ createDataLogoffMessage<T = any>(sourceRef: string): Message<T>;
416
+ createRequestMessage<T = any>(resourceName: string, params?: RequestParams): Message<T>;
417
+ createResourcesMessage<T = any>(params?: RequestParams): Message<T>;
418
+ createMetaRequestMessage(resourceName: string, messageType?: EventMessageType): Message<MessageDetails.MetaRequest>;
419
+ createCommitMessage<T = any>(eventName: string, params?: CommitParams): Message<T>;
420
+ createRefreshTokenMessage(): Message<MessageDetails.RefreshToken>;
421
+ createChangePasswordMessage(username: string, oldPassword: string, newPassword: string): Message<MessageDetails.ChangePassword>;
422
+ createForgotPasswordMessage(username: string, returnUrl: string, requester?: string): Message<MessageDetails.ForgotPassword>;
423
+ createForgotPasswordTokenMessage(username: string, resetToken: string, newPassword: string, requester?: string): Message<MessageDetails.ForgotPasswordToken>;
424
+ createMoreRowsMessage(sourceRef: string): Message;
425
+ createMoreColumnsMessage(sourceRef: string): Message;
426
+ createHTTPHeadersFromMessage(message: Message, contentType?: string): HeadersInit;
427
+ }
377
428
  /**
378
429
  * The DI token for the MessageBUilder interface.
379
430
  * @internal
@@ -1 +1 @@
1
- {"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../src/connect/message.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAY,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGrE;;;GAGG;AACH,oBAAY,WAAW;IACrB,SAAS,cAAc;IACvB,UAAU,eAAe;IAEzB,UAAU,eAAe;IACzB,WAAW,gBAAgB;IAE3B,cAAc,mBAAmB;IACjC,cAAc,mBAAmB;IAEjC,SAAS,cAAc;IAEvB,OAAO,YAAY;IACnB,QAAQ,aAAa;IAEr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, Observable, Observer, Subject, Subscription } from 'rxjs';
2
- import { Message } from './message';
1
+ import { UUID } from '@genesislcap/foundation-utils';
2
+ import { JSONSerializer } from '@genesislcap/foundation-utils';
3
+ import { Observable, Observer, Subject, Subscription } from 'rxjs';
4
+ import { Session } from '../session';
5
+ import { Message, MessageBuilder } from './message';
3
6
  import { SocketReconnectOptions } from './reconnectStrategy';
7
+ import { SocketStatus } from './socket.status';
4
8
  /**
5
9
  * Subject that wraps a WebSocketSubject and provides a Subject interface for sending and receiving messages.
6
10
  * @public
@@ -110,23 +114,83 @@ export declare class SocketMessageHandler {
110
114
  * Provides methods for socket connection, sending and receiving WS messages.
111
115
  * @public
112
116
  */
113
- export interface Socket {
114
- isConnected: boolean;
115
- isReconnecting: boolean;
116
- hasValidSession: boolean;
117
- isConnectedSubject: BehaviorSubject<boolean>;
117
+ export interface Socket extends Omit<SocketStatus, 'serialize' | 'onClose' | 'reconnectionLimitReached' | 'closedCode' | 'closedReason' | 'closedClean'> {
118
118
  connect(host: string, options?: SocketConnectOptions, reconnectOptions?: SocketReconnectOptions): Promise<boolean>;
119
119
  /**
120
120
  * Disconnects the socket and clears all subscriptions
121
121
  */
122
122
  reset(): void;
123
123
  send<T>(message: Message<T | any>, needsHandling?: boolean): Promise<Message | any>;
124
- sendForStream<T>(message: Message<T | any>, onMessage: Function, onError: Function): Observable<Message>;
124
+ sendForStream<T>(message: Message<T | any>, onMessage: Function, onError: Function, onComplete?: Function): Observable<Message>;
125
125
  socketMessages(): SocketSubject<Message>;
126
126
  }
127
+ /**
128
+ * Default Socket implementation.
129
+ * @public
130
+ */
131
+ export declare class DefaultSocket implements Socket {
132
+ private messageBuilder;
133
+ private session;
134
+ private serializer;
135
+ private uuid;
136
+ private status;
137
+ private readonly defaultInterval;
138
+ private readonly secondsMultiplier;
139
+ private websocket;
140
+ private wsMessages;
141
+ private wsMessageHandlers;
142
+ get isConfigured(): boolean;
143
+ get isConnecting(): boolean;
144
+ get isConnected(): boolean;
145
+ get isConnectedSubject(): import("rxjs").BehaviorSubject<boolean>;
146
+ get isDisconnected(): boolean;
147
+ get isDisconnectedByServer(): boolean;
148
+ get isReconnecting(): boolean;
149
+ get hasValidSession(): boolean;
150
+ set hasValidSession(value: boolean);
151
+ private heartbeatIsEnabled;
152
+ private heartbeatInterval;
153
+ private heartbeatTicker;
154
+ private url;
155
+ private connectOptions;
156
+ private reconnectOptions;
157
+ private socketSubscription;
158
+ constructor(messageBuilder: MessageBuilder, session: Session, serializer: JSONSerializer, uuid: UUID, status: SocketStatus);
159
+ private get heartbeatLoggingIsEnabled();
160
+ private get messageLoggingIsEnabled();
161
+ connect(host: string, connectOptions?: SocketConnectOptions, reconnectOptions?: SocketReconnectOptions): Promise<boolean>;
162
+ private prepareHeartbeat;
163
+ private reconnect;
164
+ reset(): void;
165
+ private cleanMessages;
166
+ send<T>(message: Message<T | any>, needsHandling?: boolean): Promise<Message | any>;
167
+ sendForStream<T>(message: Message<T | any>, onMessage: Function, onError: Function, onComplete?: Function): Observable<Message>;
168
+ socketMessages: () => SocketSubject<Message>;
169
+ private setMessageHandler;
170
+ private sendDataLogoff;
171
+ private removeMessageHandler;
172
+ private getMessageHandler;
173
+ private logMessageTypeFlow;
174
+ }
127
175
  /**
128
176
  * The DI token for the Socket interface.
129
177
  * @internal
130
178
  */
131
179
  export declare const Socket: import("@microsoft/fast-foundation").InterfaceSymbol<Socket>;
180
+ /**
181
+ * Gets Socket from the DI container.
182
+ *
183
+ * @remarks
184
+ * A utility method for host applications that are not using decorators or the DI container.
185
+ *
186
+ * @example
187
+ * ```ts
188
+ * import { getSocket } from '@genesislcap/foundation-comms';
189
+ * ...
190
+ * private socket = getSocket();
191
+ * ```
192
+ *
193
+ * @public
194
+ */
195
+ export declare function getSocket(): Socket;
132
196
  //# sourceMappingURL=socket.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"socket.d.ts","sourceRoot":"","sources":["../../../src/connect/socket.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,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,EAAE,QAAQ,EACnB,OAAO,EAAE,QAAQ,EACjB,UAAU,CAAC,EAAE,QAAQ,GACpB,UAAU,CAAC,OAAO,CAAC;IAmDf,cAAc,QAAO,cAAc,OAAO,CAAC,CAAoB;IAEtE,OAAO,CAAC,iBAAiB;IAezB,OAAO,CAAC,cAAc;IAOtB,OAAO,CAAC,oBAAoB;IAI5B,OAAO,CAAC,iBAAiB;IAUzB,OAAO,CAAC,kBAAkB;CAkB3B;AAED;;;GAGG;AACH,eAAO,MAAM,MAAM,8DAAgE,CAAC;AAEpF;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,SAAS,IAAI,MAAM,CAElC"}
@@ -0,0 +1,79 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"socket.status.d.ts","sourceRoot":"","sources":["../../../src/connect/socket.status.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAEvC;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,WAAW,EAAE,OAAO,CAAC;IACrB,cAAc,EAAE,OAAO,CAAC;IACxB,sBAAsB,EAAE,OAAO,CAAC;IAChC,cAAc,EAAE,OAAO,CAAC;IACxB,wBAAwB,EAAE,OAAO,CAAC;IAClC,eAAe,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;CAC/B;AAED;;;GAGG;AACH,MAAM,WAAW,YAAa,SAAQ,sBAAsB;IAC1D,kBAAkB,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;IAC7C,SAAS,IAAI,sBAAsB,CAAC;IACpC,OAAO,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI,CAAC;CACvC;AAED;;;GAGG;AACH,qBAAa,mBAAoB,YAAW,YAAY;IAC1C,YAAY,UAAS;IACrB,YAAY,UAAS;IACrB,WAAW,UAAS;IACpB,cAAc,UAAS;IACvB,wBAAwB,UAAS;IACjC,eAAe,UAAS;IACxB,UAAU,MAAC;IACX,YAAY,MAAC;IACb,WAAW,MAAC;IAExB,IAAI,cAAc,YAEjB;IAED,IAAI,sBAAsB,YAEzB;IAEM,kBAAkB,2BAAyC;IAElE,SAAS,CAAC,kBAAkB;IAS5B,SAAS,CAAC,qBAAqB;IAM/B,SAAS,CAAC,gBAAgB;IAM1B,SAAS,IAAI,sBAAsB;IAgBnC,OAAO,CAAC,KAAK,EAAE,UAAU;CAM1B;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,oEAExB,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,IAAI,YAAY,CAE9C"}
@@ -143,6 +143,13 @@ export interface Datasource {
143
143
  * @returns A promise that resolves when the item has been updated.
144
144
  */
145
145
  updateItem?(itemId: string, data: any): Promise<void>;
146
+ /**
147
+ * Destroy the datasource.
148
+ * @privateRemarks
149
+ * I suspect we may need to call this from datasource disconnectedCallbacks etc to ensure we fully clean up.
150
+ * @public
151
+ */
152
+ destroy(): void;
146
153
  }
147
154
  /**
148
155
  * The default implementation for the Datasource interface.
@@ -165,6 +172,8 @@ export declare class DefaultDatasource implements Datasource {
165
172
  validResourceName(resourceName: string): boolean;
166
173
  init(options: DatasourceOptions, fetchMeta?: boolean): Promise<boolean>;
167
174
  deinit(): void;
175
+ /** {@inheritDoc Datasource.destroy} */
176
+ destroy(): void;
168
177
  get stream(): SocketObservable<FilteredDataServerResult | RequestServerResult>;
169
178
  get params(): any;
170
179
  snapshot(): Promise<Message>;