@genesislcap/foundation-comms 14.183.8-alpha-63f9910.0 → 14.185.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. package/dist/dts/auth/auth.types.d.ts +1 -1
  2. package/dist/dts/auth/auth.types.d.ts.map +1 -1
  3. package/dist/dts/connect/connect.d.ts +13 -6
  4. package/dist/dts/connect/connect.d.ts.map +1 -1
  5. package/dist/dts/connect/connect.types.d.ts +4 -51
  6. package/dist/dts/connect/connect.types.d.ts.map +1 -1
  7. package/dist/dts/connect/http.connect.d.ts +4 -8
  8. package/dist/dts/connect/http.connect.d.ts.map +1 -1
  9. package/dist/dts/connect/http.connect.types.d.ts +62 -0
  10. package/dist/dts/connect/http.connect.types.d.ts.map +1 -0
  11. package/dist/dts/connect/updateState.d.ts +3 -0
  12. package/dist/dts/connect/updateState.d.ts.map +1 -0
  13. package/dist/dts/testing/mocks/auth/auth.d.ts +1 -1
  14. package/dist/dts/testing/mocks/auth/auth.d.ts.map +1 -1
  15. package/dist/dts/testing/mocks/connect/connect.d.ts +3 -1
  16. package/dist/dts/testing/mocks/connect/connect.d.ts.map +1 -1
  17. package/dist/dts/testing/mocks/connect/socket.d.ts +1 -1
  18. package/dist/dts/testing/mocks/connect/socket.d.ts.map +1 -1
  19. package/dist/dts/testing/mocks/datasource/datasource.d.ts +1 -1
  20. package/dist/dts/testing/mocks/datasource/datasource.d.ts.map +1 -1
  21. package/dist/esm/connect/connect.js +10 -24
  22. package/dist/esm/connect/connect.types.js +21 -5
  23. package/dist/esm/connect/http.connect.js +10 -23
  24. package/dist/esm/connect/http.connect.types.js +24 -0
  25. package/dist/esm/connect/updateState.js +26 -0
  26. package/dist/esm/testing/mocks/connect/connect.js +3 -0
  27. package/dist/esm/testing/mocks/connect/socket.js +1 -1
  28. package/dist/foundation-comms.api.json +392 -287
  29. package/dist/foundation-comms.d.ts +25 -12
  30. package/docs/api/foundation-comms.connect.md +1 -0
  31. package/docs/api/foundation-comms.connect.streamstate.md +30 -0
  32. package/docs/api/foundation-comms.connectconfig.iswebsocketexpression.md +13 -0
  33. package/docs/api/foundation-comms.connectconfig.md +1 -0
  34. package/docs/api/foundation-comms.defaultconnect._constructor_.md +2 -2
  35. package/docs/api/foundation-comms.defaultconnect.md +1 -0
  36. package/docs/api/foundation-comms.defaultconnect.streamstate.md +26 -0
  37. package/docs/api/foundation-comms.defaulthttpconnect._constructor_.md +2 -2
  38. package/docs/api/foundation-comms.defaulthttpconnect.md +1 -0
  39. package/docs/api/foundation-comms.defaulthttpconnect.streamstate.md +26 -0
  40. package/docs/api/foundation-comms.md +0 -4
  41. package/docs/api-report.md +13 -33
  42. package/package.json +21 -13
  43. package/docs/api/foundation-comms.defaulthttpconnectconfig.md +0 -13
  44. package/docs/api/foundation-comms.httpconnectconfig.md +0 -20
  45. package/docs/api/foundation-comms.httpconnectconfig.polling.md +0 -13
  46. package/docs/api/foundation-comms.httppollingconfig.md +0 -22
  47. package/docs/api/foundation-comms.httppollingconfig.polling_frequency.md +0 -13
  48. package/docs/api/foundation-comms.httppollingconfig.polling_interval_map.md +0 -15
  49. package/docs/api/foundation-comms.httppollingconfig.polling_map.md +0 -15
  50. package/docs/api/foundation-comms.pollingconfiguration.amount_of_polls.md +0 -18
  51. package/docs/api/foundation-comms.pollingconfiguration.md +0 -22
  52. package/docs/api/foundation-comms.pollingconfiguration.queries.md +0 -13
  53. package/docs/api/foundation-comms.pollingconfiguration.temp_frequency.md +0 -13
@@ -1,4 +1,4 @@
1
- import { Message } from '../connect';
1
+ import type { Message } from '../connect/message';
2
2
  /**
3
3
  * The available ypes of authentication.
4
4
  * @public
@@ -1 +1 @@
1
- {"version":3,"file":"auth.types.d.ts","sourceRoot":"","sources":["../../../src/auth/auth.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC;;;GAGG;AACH,oBAAY,QAAQ;IAClB,KAAK,UAAU;IACf,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,OAAO,YAAY;C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GAAG;IACxB,IAAI,EAAE,QAAQ,GAAG,QAAQ,CAAC,GAAG,CAAC;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAAG,aAAa,GAAG,WAAW,GAAG,WAAW,GAAG,eAAe,CAAC;AAEnF;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,qBAAa,SAAU,SAAQ,KAAK;IAEzB,IAAI,EAAE,OAAO;IACb,QAAQ,CAAC,EAAE,OAAO;gBADlB,IAAI,EAAE,OAAO,EACb,QAAQ,CAAC,EAAE,OAAO,EACzB,OAAO,GAAE,MAAyB;IAMpC,gBAAgB,IAAI,OAAO;IAc3B,eAAe,IAAI,MAAM;IAMzB,eAAe,IAAI,MAAM;IAMzB,uBAAuB,IAAI,OAAO;IAIlC,WAAW,IAAI,OAAO;IAItB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAMnC,OAAO,CAAC,oBAAoB;CAG7B"}
@@ -6,11 +6,6 @@ import { ConnectConfig } from './connect.types';
6
6
  import { CommitParams, Message, MessageBuilder, RequestParams } from './message';
7
7
  import type { SocketObservable } from './socket';
8
8
  import { Socket } from './socket';
9
- /**
10
- * The default configuration for connecting to a WS service.
11
- * @public
12
- */
13
- export declare const defaultConnectConfig: ConnectConfig;
14
9
  /**
15
10
  * Represents a connection and its capabilities on a remote server
16
11
  * Provides methods to send and receive messages, as well as metadata and schema information.
@@ -90,6 +85,17 @@ export interface Connect {
90
85
  * @returns An observable that emits messages received from the server.
91
86
  */
92
87
  stream(resourceName: string, onMessage: Function, onError: Function, params?: any): SocketObservable<Message>;
88
+ /**
89
+ * Starts listening for updates on the specified resource.
90
+ * @public
91
+ * @param resourceName - The name of the resource to listen for updates on.
92
+ * @param onMessage - A callback function to handle received messages.
93
+ * @param onError - A callback function to handle errors.
94
+ * @param params - Additional parameters to pass to the server.
95
+ * @param initialState - State of the list to start with, defaults to empty array.
96
+ * @returns An observable that emits latest state of the list it subscribes to.
97
+ */
98
+ streamState(resourceName: string, onMessage: Function, onError: Function, params?: any, initialState?: any[]): Observable<any[]>;
93
99
  /**
94
100
  * Starts listening for updates on the specified resource without auto-teardown.
95
101
  * @alpha
@@ -173,7 +179,7 @@ export declare class DefaultConnect implements Connect {
173
179
  get isConnected(): boolean;
174
180
  get isConnectedSubject(): BehaviorSubject<boolean>;
175
181
  get isConnected$(): Observable<boolean>;
176
- constructor(socket: Socket, messageBuilder: MessageBuilder, metaCache: MetaCache, events: ConnectEventsEmitter, config?: ConnectConfig);
182
+ constructor(socket: Socket, messageBuilder: MessageBuilder, metaCache: MetaCache, events: ConnectEventsEmitter, config: ConnectConfig);
177
183
  httpMode(): boolean;
178
184
  /**
179
185
  * @deprecated - Please reference {@link @genesislcap/foundation-user#User} instead.',
@@ -184,6 +190,7 @@ export declare class DefaultConnect implements Connect {
184
190
  disconnect(): void;
185
191
  snapshot(resourceName: string, params?: any): Promise<Message>;
186
192
  stream(resourceName: string, onMessage: Function, onError: Function, params?: any): SocketObservable<Message>;
193
+ streamState(resourceName: string, onMessage?: Function, onError?: Function, params?: any, initialState?: any[]): Observable<any[]>;
187
194
  streamWithoutAutoTeardown(resourceName: string, onMessage: Function, onError: Function, params?: any): SocketObservable<Message>;
188
195
  getMoreRows(sourceRef: string): Promise<Message>;
189
196
  getMoreCol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CAC9B,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,QAAQ,EACnB,OAAO,EAAE,QAAQ,EACjB,MAAM,CAAC,EAAE,GAAG,GACX,gBAAgB,CAAC,OAAO,CAAC;IASf,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAMhD,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;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"}
@@ -18,66 +18,19 @@ export interface ConnectConfig {
18
18
  * Options for automatic reconnection on connection loss.
19
19
  */
20
20
  reconnect: SocketReconnectOptions;
21
- }
22
- /**
23
- * Configuration options for http polling.
24
- * @public
25
- */
26
- export interface PollingConfiguration {
27
- /**
28
- * The temporary polling frequency.
29
- */
30
- TEMP_FREQUENCY: number;
31
- /**
32
- * The expected amount of HTTP polling attempts to be performed.
33
- * @remarks TEMP_FREQUENCY * AMOUNT_OF_POLLS = the total polling time/duration
34
- */
35
- AMOUNT_OF_POLLS: number;
36
- /**
37
- * The queries to be polled.
38
- */
39
- QUERIES: string[];
40
- }
41
- /**
42
- * Configuration options for http connection.
43
- * @public
44
- */
45
- export interface HttpPollingConfig {
46
- /**
47
- * The frequency of polling.
48
- */
49
- POLLING_FREQUENCY?: number;
50
- /**
51
- * The interval map of polling.
52
- */
53
- POLLING_INTERVAL_MAP?: {
54
- [resource: string]: number;
55
- };
56
21
  /**
57
- * The map of polling configuration.
22
+ * Check for web socket url pattern.
58
23
  */
59
- POLLING_MAP?: {
60
- [key: string]: PollingConfiguration;
61
- };
24
+ isWebSocketExpression: RegExp;
62
25
  }
63
26
  /**
64
- * Configuration options for the Connect (HTTP) instance.
27
+ * The default configuration for connecting to a WS service.
65
28
  * @public
66
29
  */
67
- export interface HttpConnectConfig {
68
- /**
69
- * Configuration options for http polling.
70
- */
71
- polling: HttpPollingConfig;
72
- }
30
+ export declare const defaultConnectConfig: ConnectConfig;
73
31
  /**
74
32
  * Configuration options for the Connect (WS) instance.
75
33
  * @internal
76
34
  */
77
35
  export declare const ConnectConfig: import("@microsoft/fast-foundation").InterfaceSymbol<ConnectConfig>;
78
- /**
79
- * Configuration options for the Connect (HTTP) instance.
80
- * @internal
81
- */
82
- export declare const HttpConnectConfig: import("@microsoft/fast-foundation").InterfaceSymbol<HttpConnectConfig>;
83
36
  //# sourceMappingURL=connect.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"connect.types.d.ts","sourceRoot":"","sources":["../../../src/connect/connect.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAErD;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,WAAW,GAAG,cAAc,GAAG,MAAM,CAAC;AAErE;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,OAAO,EAAE,oBAAoB,CAAC;IAE9B;;OAEG;IACH,SAAS,EAAE,sBAAsB,CAAC;CACnC;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,oBAAoB,CAAC,EAAE;QAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAEtD;;OAEG;IACH,WAAW,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,oBAAoB,CAAA;KAAE,CAAC;CACvD;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAED;;;GAGG;AACH,eAAO,MAAM,aAAa,qEAAsC,CAAC;AAEjE;;;GAGG;AACH,eAAO,MAAM,iBAAiB,yEAA0C,CAAC"}
1
+ {"version":3,"file":"connect.types.d.ts","sourceRoot":"","sources":["../../../src/connect/connect.types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAErD;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,WAAW,GAAG,cAAc,GAAG,MAAM,CAAC;AAErE;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,OAAO,EAAE,oBAAoB,CAAC;IAE9B;;OAEG;IACH,SAAS,EAAE,sBAAsB,CAAC;IAElC;;OAEG;IACH,qBAAqB,EAAE,MAAM,CAAC;CAC/B;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,aAelC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,aAAa,qEAEzB,CAAC"}
@@ -3,16 +3,11 @@ import { BehaviorSubject, Observable } from 'rxjs';
3
3
  import type { Metadata, SchemaResponse } from '../metadata';
4
4
  import { MetaCache } from '../metadata';
5
5
  import { Session } from '../session';
6
- import { Connect } from './connect';
7
- import { HttpConnectConfig } from './connect.types';
6
+ import type { Connect } from './connect';
8
7
  import { Http } from './http';
8
+ import { HttpConnectConfig } from './http.connect.types';
9
9
  import { CommitParams, Message, MessageBuilder, RequestParams } from './message';
10
10
  import { SocketObservable } from './socket';
11
- /**
12
- * The default configuration for connecting to an HTTP service.
13
- * @public
14
- */
15
- export declare const defaultHttpConnectConfig: HttpConnectConfig;
16
11
  /**
17
12
  * The default implementation for the Connect interface (HTTP-only).
18
13
  * @public
@@ -38,7 +33,7 @@ export declare class DefaultHttpConnect implements Connect {
38
33
  * @internal
39
34
  */
40
35
  private streams;
41
- constructor(http: Http, messageBuilder: MessageBuilder, session: Session, metaCache: MetaCache, serializer: JSONSerializer, config?: HttpConnectConfig);
36
+ constructor(http: Http, messageBuilder: MessageBuilder, session: Session, metaCache: MetaCache, serializer: JSONSerializer, config: HttpConnectConfig);
42
37
  /**
43
38
  * Checks if the host is available by sending a heartbeat ping message and waiting for the response.
44
39
  * @internal
@@ -52,6 +47,7 @@ export declare class DefaultHttpConnect implements Connect {
52
47
  disconnect(): void;
53
48
  snapshot(resourceName: string, params?: any): Promise<Message>;
54
49
  stream(resourceName: string, onMessage: Function, onError: Function, params?: any): SocketObservable<Message>;
50
+ streamState(resourceName: string, onMessage?: Function, onError?: Function, params?: any, initialState?: any[]): Observable<any[]>;
55
51
  streamWithoutAutoTeardown(resourceName: string, onMessage: Function, onError: Function, params?: any): SocketObservable<Message<any>>;
56
52
  private getMessage;
57
53
  getMoreRows(sourceRef: string): Promise<Message>;
@@ -1 +1 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_FREQUENCY: number;
10
+ /**
11
+ * The expected amount of HTTP polling attempts to be performed.
12
+ * @remarks TEMP_FREQUENCY * AMOUNT_OF_POLLS = the total polling time/duration
13
+ */
14
+ AMOUNT_OF_POLLS: number;
15
+ /**
16
+ * The queries to be polled.
17
+ */
18
+ QUERIES: string[];
19
+ }
20
+ /**
21
+ * Configuration options for http connection.
22
+ * @public
23
+ */
24
+ export interface HttpPollingConfig {
25
+ /**
26
+ * The frequency of polling.
27
+ */
28
+ POLLING_FREQUENCY?: number;
29
+ /**
30
+ * The interval map of polling.
31
+ */
32
+ POLLING_INTERVAL_MAP?: {
33
+ [resource: string]: number;
34
+ };
35
+ /**
36
+ * The map of polling configuration.
37
+ */
38
+ POLLING_MAP?: {
39
+ [key: string]: PollingConfiguration;
40
+ };
41
+ }
42
+ /**
43
+ * Configuration options for the Connect (HTTP) instance.
44
+ * @public
45
+ */
46
+ export interface HttpConnectConfig {
47
+ /**
48
+ * Configuration options for http polling.
49
+ */
50
+ polling: HttpPollingConfig;
51
+ }
52
+ /**
53
+ * The default configuration for connecting to an HTTP service.
54
+ * @public
55
+ */
56
+ export declare const defaultHttpConnectConfig: HttpConnectConfig;
57
+ /**
58
+ * Configuration options for the Connect (HTTP) instance.
59
+ * @internal
60
+ */
61
+ export declare const HttpConnectConfig: import("@microsoft/fast-foundation").InterfaceSymbol<HttpConnectConfig>;
62
+ //# sourceMappingURL=http.connect.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http.connect.types.d.ts","sourceRoot":"","sources":["../../../src/connect/http.connect.types.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,oBAAoB,CAAC,EAAE;QAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAEtD;;OAEG;IACH,WAAW,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,oBAAoB,CAAA;KAAE,CAAC;CACvD;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAED;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE,iBAqBtC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,yEAE7B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Message } from './message';
2
+ export declare const updateState: (state: Array<any>, update: Message) => Array<any>;
3
+ //# sourceMappingURL=updateState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updateState.d.ts","sourceRoot":"","sources":["../../../src/connect/updateState.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,eAAO,MAAM,WAAW,UAAW,MAAM,GAAG,CAAC,UAAU,OAAO,KAAG,MAAM,GAAG,CA+BzE,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { User } from '@genesislcap/foundation-user';
2
- import { Auth, AuthInfo, LoginResult, LogoutResult } from '../../../';
2
+ import type { Auth, AuthInfo, LoginResult, LogoutResult } from '../../../';
3
3
  /**
4
4
  * @internal
5
5
  */
@@ -1 +1 @@
1
- {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../../../src/testing/mocks/auth/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AAEzD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEtE;;GAEG;AACH,qBAAa,QAAS,YAAW,IAAI;IACvB,SAAS,UAAS;IAClB,gBAAgB,EAAE,WAAW,CAAQ;IACrC,WAAW,EAAE,IAAI,CAAQ;IACzB,UAAU,EAAE,OAAO,CAAS;IAExC,eAAe,EAAE,WAAW,CAAC;IAC7B,gBAAgB,EAAE,YAAY,CAAC;IAC/B,gBAAgB,EAAE,OAAO,CAAC;IAEpB,KAAK,CAAC,WAAW,EAAE,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC;IAIlD,MAAM,IAAI,OAAO,CAAC,YAAY,CAAC;IAI/B,iBAAiB,IAAI,OAAO,CAAC,OAAO,CAAC;CAG5C"}
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../../../src/testing/mocks/auth/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AAEzD,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE3E;;GAEG;AACH,qBAAa,QAAS,YAAW,IAAI;IACvB,SAAS,UAAS;IAClB,gBAAgB,EAAE,WAAW,CAAQ;IACrC,WAAW,EAAE,IAAI,CAAQ;IACzB,UAAU,EAAE,OAAO,CAAS;IAExC,eAAe,EAAE,WAAW,CAAC;IAC7B,gBAAgB,EAAE,YAAY,CAAC;IAC/B,gBAAgB,EAAE,OAAO,CAAC;IAEpB,KAAK,CAAC,WAAW,EAAE,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC;IAIlD,MAAM,IAAI,OAAO,CAAC,YAAY,CAAC;IAI/B,iBAAiB,IAAI,OAAO,CAAC,OAAO,CAAC;CAG5C"}
@@ -1,5 +1,5 @@
1
1
  import { BehaviorSubject, Observable } from 'rxjs';
2
- import { CommitParams, Connect, Message, Metadata, RequestParams, SocketMock, SocketObservable } from '../../../';
2
+ import type { CommitParams, Connect, Message, Metadata, RequestParams, SocketMock, SocketObservable } from '../../../';
3
3
  /**
4
4
  * @internal
5
5
  */
@@ -16,6 +16,7 @@ export declare class ConnectMock implements Connect {
16
16
  nextJSONSchema: any;
17
17
  nextMessage: Message;
18
18
  requestParams: RequestParams;
19
+ nextListState: any[];
19
20
  commitEvent(eventName: string, params?: CommitParams): Promise<Message>;
20
21
  connect(host: string): Promise<boolean>;
21
22
  disconnect(): void;
@@ -24,6 +25,7 @@ export declare class ConnectMock implements Connect {
24
25
  getAvailableResources(params?: RequestParams): Promise<Message>;
25
26
  snapshot(resourceName: string, params?: any): Promise<Message>;
26
27
  stream(resourceName: string, onMessage: Function, onError: Function, params?: any): SocketObservable<Message>;
28
+ streamState(resourceName: string, onMessage: Function, onError: Function, params?: any, initialState?: any[]): Observable<any[]>;
27
29
  streamWithoutAutoTeardown(resourceName: string, onMessage: Function, onError: Function, params?: any): SocketObservable<Message>;
28
30
  getMoreRows(sourceRef: string): Promise<Message<any>>;
29
31
  getMoreColumns(sourceRef: string): Promise<Message<any>>;
@@ -1 +1 @@
1
- {"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../../../../../src/testing/mocks/connect/connect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAQ,UAAU,EAAE,MAAM,MAAM,CAAC;AACzD,OAAO,EACL,YAAY,EACZ,OAAO,EACP,OAAO,EACP,QAAQ,EACR,aAAa,EACb,UAAU,EACV,gBAAgB,EACjB,MAAM,WAAW,CAAC;AAEnB;;GAEG;AACH,qBAAa,WAAY,YAAW,OAAO;IACzC,WAAW,EAAE,OAAO,CAAQ;IAC5B,SAAS,EAAE,OAAO,CAAS;IAC3B,MAAM,EAAE,UAAU,CAAC;IAEnB,IAAI,kBAAkB,IAAI,eAAe,CAAC,OAAO,CAAC,CAEjD;IAED,IAAI,YAAY,IAAI,UAAU,CAAC,OAAO,CAAC,CAEtC;IAED,IAAI,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,EAAE,aAAa,CAAC,EAAE,OAAO,GAAG,OAAO,CAA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nectOptions } from '../../../connect';
3
- import { SocketSubject } from '../../../connect';
3
+ import { SocketSubject } from '../../../connect/socket';
4
4
  /**
5
5
  * @internal
6
6
  */
@@ -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,YAAY,EAAE,OAAO,CAAC;IACtB,cAAc,EAAE,OAAO,CAAC;IACxB,sBAAsB,EAAE,OAAO,CAAC;IAChC,eAAe,EAAE,OAAO,CAAC;IACzB,YAAY,EAAE,OAAO,CAAC;IACtB,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,oBAAoB,EAC9B,gBAAgB,CAAC,EAAE,sBAAsB,GACxC,OAAO,CAAC,OAAO,CAAC;IAIZ,UAAU,IAAI,IAAI;IAElB,IAAI,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,OAAO,GAAG,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;IAItB,4BAA4B,C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O,EAAE,QAAQ,EACjB,UAAU,CAAC,EAAE,QAAQ,GACpB,UAAU,CAAC,OAAO,CAAC;IAItB,4BAA4B,CAAC,CAAC,EAC5B,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,EACrB,SAAS,EAAE,QAAQ,EACnB,OAAO,EAAE,QAAQ,GAChB,UAAU,CAAC,OAAO,CAAC;IAIf,cAAc,IAAI,aAAa,CAAC,OAAO,CAAC;IAI/C,KAAK,IAAI,IAAI;CAGd"}
@@ -1,5 +1,5 @@
1
1
  import { SocketObservable } from '../../../connect';
2
- import { Datasource, DatasourceOptions, Dataview, ResourceType } from '../../../datasource';
2
+ import type { Datasource, DatasourceOptions, Dataview, ResourceType } from '../../../datasource';
3
3
  import { FieldMetadata, FilteredDataServerResult, RequestServerResult } from '../../../metadata';
4
4
  /**
5
5
  * @internal
@@ -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;IAItE,MAAM;IAEN,OAAO;IAEP,iBAAiB,CAAC,YA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E,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;CAGtD"}
@@ -1,33 +1,16 @@
1
1
  import { __awaiter, __decorate, __param } from "tslib";
2
2
  import { FORCE_HTTP } from '@genesislcap/foundation-utils';
3
3
  import { observable, volatile } from '@microsoft/fast-element';
4
- import { DI, optional } from '@microsoft/fast-foundation';
4
+ import { DI } from '@microsoft/fast-foundation';
5
+ import { scan } from 'rxjs';
5
6
  import { MetaCache } from '../metadata';
6
- import { isWebSocketExpression, logger } from '../utils';
7
+ import { logger } from '../utils';
7
8
  import { ConnectEventsEmitter } from './connect.events';
8
9
  import { ConnectConfig } from './connect.types';
9
10
  import { HttpConnect } from './http.connect';
10
11
  import { EventMessageType, MessageBuilder } from './message';
11
12
  import { Socket } from './socket';
12
- /**
13
- * The default configuration for connecting to a WS service.
14
- * @public
15
- */
16
- export const defaultConnectConfig = {
17
- connect: {
18
- alwaysOn: false,
19
- enableHeartbeat: true,
20
- enableHeartbeatLogging: false,
21
- heartbeatInterval: 10000,
22
- verboseHeartbeat: false,
23
- enableMessageLogging: false,
24
- },
25
- reconnect: {
26
- reconnectAttempts: 10,
27
- reconnectInterval: 10000,
28
- reconnectStreams: true,
29
- },
30
- };
13
+ import { updateState } from './updateState';
31
14
  /**
32
15
  * The default implementation for the Connect interface (WS-only).
33
16
  * @public
@@ -43,7 +26,7 @@ let DefaultConnect = class DefaultConnect {
43
26
  var _a;
44
27
  return (_a = this.socket.isConnectedSubject) === null || _a === void 0 ? void 0 : _a.asObservable();
45
28
  }
46
- constructor(socket, messageBuilder, metaCache, events, config = defaultConnectConfig) {
29
+ constructor(socket, messageBuilder, metaCache, events, config) {
47
30
  this.socket = socket;
48
31
  this.messageBuilder = messageBuilder;
49
32
  this.metaCache = metaCache;
@@ -66,7 +49,7 @@ let DefaultConnect = class DefaultConnect {
66
49
  connect(host) {
67
50
  return __awaiter(this, void 0, void 0, function* () {
68
51
  this.socket.reset();
69
- if (!isWebSocketExpression.test(host)) {
52
+ if (!this.config.isWebSocketExpression.test(host)) {
70
53
  logger.error(`Specified host (${host}) is not valid WebSocket url. Connection will not proceed.`);
71
54
  logger.warn(`Make sure the host url starts with wss:// or ws://`);
72
55
  return;
@@ -96,6 +79,9 @@ let DefaultConnect = class DefaultConnect {
96
79
  });
97
80
  return resource;
98
81
  }
82
+ streamState(resourceName, onMessage = () => { }, onError = () => { }, params, initialState = []) {
83
+ return this.stream(resourceName, onMessage, onError, params).pipe(scan(updateState, initialState));
84
+ }
99
85
  streamWithoutAutoTeardown(resourceName, onMessage, onError, params) {
100
86
  const streamMessage = this.messageBuilder.createDataLogonMessage(resourceName, params);
101
87
  logger.debug(`${streamMessage.MESSAGE_TYPE} (stream without auto-teardown) message created -> `, streamMessage);
@@ -213,7 +199,7 @@ DefaultConnect = __decorate([
213
199
  __param(1, MessageBuilder),
214
200
  __param(2, MetaCache),
215
201
  __param(3, ConnectEventsEmitter),
216
- __param(4, optional(ConnectConfig))
202
+ __param(4, ConnectConfig)
217
203
  ], DefaultConnect);
218
204
  export { DefaultConnect };
219
205
  const useHttpConnect = FORCE_HTTP === 'true' || false;
@@ -1,11 +1,27 @@
1
1
  import { DI } from '@microsoft/fast-foundation';
2
+ import { isWebSocketExpression } from '../utils';
2
3
  /**
3
- * Configuration options for the Connect (WS) instance.
4
- * @internal
4
+ * The default configuration for connecting to a WS service.
5
+ * @public
5
6
  */
6
- export const ConnectConfig = DI.createInterface();
7
+ export const defaultConnectConfig = {
8
+ connect: {
9
+ alwaysOn: false,
10
+ enableHeartbeat: true,
11
+ enableHeartbeatLogging: false,
12
+ heartbeatInterval: 10000,
13
+ verboseHeartbeat: false,
14
+ enableMessageLogging: false,
15
+ },
16
+ reconnect: {
17
+ reconnectAttempts: 10,
18
+ reconnectInterval: 10000,
19
+ reconnectStreams: true,
20
+ },
21
+ isWebSocketExpression,
22
+ };
7
23
  /**
8
- * Configuration options for the Connect (HTTP) instance.
24
+ * Configuration options for the Connect (WS) instance.
9
25
  * @internal
10
26
  */
11
- export const HttpConnectConfig = DI.createInterface();
27
+ export const ConnectConfig = DI.createInterface((x) => x.instance(defaultConnectConfig));
@@ -1,31 +1,15 @@
1
1
  import { __awaiter, __decorate, __param } from "tslib";
2
- import { HTTP_CONFIG, JSONSerializer } from '@genesislcap/foundation-utils';
2
+ import { JSONSerializer } from '@genesislcap/foundation-utils';
3
3
  import { observable, volatile } from '@microsoft/fast-element';
4
- import { DI, optional } from '@microsoft/fast-foundation';
5
- import { BehaviorSubject, concat, finalize, from, interval, switchMap, takeWhile, } from 'rxjs';
4
+ import { DI } from '@microsoft/fast-foundation';
5
+ import { BehaviorSubject, concat, finalize, from, interval, scan, switchMap, takeWhile, } from 'rxjs';
6
6
  import { MetaCache } from '../metadata';
7
7
  import { Session } from '../session';
8
8
  import { logger } from '../utils';
9
- import { HttpConnectConfig } from './connect.types';
10
9
  import { Http } from './http';
10
+ import { HttpConnectConfig } from './http.connect.types';
11
11
  import { EventMessageType, MessageBuilder, MessageType, } from './message';
12
- /**
13
- * The default configuration for connecting to an HTTP service.
14
- * @public
15
- */
16
- export const defaultHttpConnectConfig = {
17
- polling: Object.assign({ POLLING_MAP: {
18
- EVENT_AMEND_USER: {
19
- TEMP_FREQUENCY: 500,
20
- AMOUNT_OF_POLLS: 5,
21
- QUERIES: ['ALL_USERS'],
22
- },
23
- }, POLLING_INTERVAL_MAP: {
24
- ALL_TRADES: 5000,
25
- ALL_USERS: 5000,
26
- ALL_PROCESSES_STATUS: 10000,
27
- }, POLLING_FREQUENCY: 5000 }, (HTTP_CONFIG && HTTP_CONFIG.length ? JSON.parse(HTTP_CONFIG) : {})),
28
- };
12
+ import { updateState } from './updateState';
29
13
  /**
30
14
  * The default implementation for the Connect interface (HTTP-only).
31
15
  * @public
@@ -38,7 +22,7 @@ let DefaultHttpConnect = class DefaultHttpConnect {
38
22
  this._isConnected = value;
39
23
  this.isConnectedSubject.next(this._isConnected);
40
24
  }
41
- constructor(http, messageBuilder, session, metaCache, serializer, config = defaultHttpConnectConfig) {
25
+ constructor(http, messageBuilder, session, metaCache, serializer, config) {
42
26
  var _a;
43
27
  this.http = http;
44
28
  this.messageBuilder = messageBuilder;
@@ -148,6 +132,9 @@ let DefaultHttpConnect = class DefaultHttpConnect {
148
132
  this.streams.get(SOURCE_REF).STREAM = stream;
149
133
  return stream;
150
134
  }
135
+ streamState(resourceName, onMessage = () => { }, onError = () => { }, params, initialState = []) {
136
+ return this.stream(resourceName, onMessage, onError, params).pipe(scan(updateState, initialState));
137
+ }
151
138
  streamWithoutAutoTeardown(resourceName, onMessage, onError, params) {
152
139
  return this.stream(resourceName, onMessage, onError, params);
153
140
  }
@@ -314,7 +301,7 @@ DefaultHttpConnect = __decorate([
314
301
  __param(2, Session),
315
302
  __param(3, MetaCache),
316
303
  __param(4, JSONSerializer),
317
- __param(5, optional(HttpConnectConfig))
304
+ __param(5, HttpConnectConfig)
318
305
  ], DefaultHttpConnect);
319
306
  export { DefaultHttpConnect };
320
307
  /**
@@ -0,0 +1,24 @@
1
+ import { HTTP_CONFIG } from '@genesislcap/foundation-utils';
2
+ import { DI } from '@microsoft/fast-foundation';
3
+ /**
4
+ * The default configuration for connecting to an HTTP service.
5
+ * @public
6
+ */
7
+ export const defaultHttpConnectConfig = {
8
+ polling: Object.assign({ POLLING_MAP: {
9
+ EVENT_AMEND_USER: {
10
+ TEMP_FREQUENCY: 500,
11
+ AMOUNT_OF_POLLS: 5,
12
+ QUERIES: ['ALL_USERS'],
13
+ },
14
+ }, POLLING_INTERVAL_MAP: {
15
+ ALL_TRADES: 5000,
16
+ ALL_USERS: 5000,
17
+ ALL_PROCESSES_STATUS: 10000,
18
+ }, POLLING_FREQUENCY: 5000 }, (HTTP_CONFIG && HTTP_CONFIG.length ? JSON.parse(HTTP_CONFIG) : {})),
19
+ };
20
+ /**
21
+ * Configuration options for the Connect (HTTP) instance.
22
+ * @internal
23
+ */
24
+ export const HttpConnectConfig = DI.createInterface((x) => x.instance(defaultHttpConnectConfig));
@@ -0,0 +1,26 @@
1
+ export const updateState = (state, update) => {
2
+ if ((update === null || update === void 0 ? void 0 : update.ROW) && state && state.length > 0) {
3
+ update.ROW.forEach((row) => {
4
+ const eventData = row;
5
+ if (eventData && eventData.DETAILS) {
6
+ const ref = eventData.DETAILS.ROW_REF;
7
+ const type = eventData.DETAILS.OPERATION;
8
+ if (type === 'INSERT') {
9
+ if (!state.find((x) => { var _a; return ((_a = x.DETAILS) === null || _a === void 0 ? void 0 : _a.ROW_REF) === ref; })) {
10
+ state.unshift(eventData);
11
+ }
12
+ }
13
+ if (type === 'DELETE') {
14
+ state = state.filter((x) => { var _a, _b; return ((_a = row.DETAILS) === null || _a === void 0 ? void 0 : _a.ROW_REF) !== ((_b = x.DETAILS) === null || _b === void 0 ? void 0 : _b.ROW_REF); });
15
+ }
16
+ if (type === 'MODIFY') {
17
+ state = state.map((item) => { var _a; return ((_a = item.DETAILS) === null || _a === void 0 ? void 0 : _a.ROW_REF) === ref ? Object.assign(Object.assign({}, item), eventData) : item; });
18
+ }
19
+ }
20
+ });
21
+ }
22
+ else if (update && (!state || state.length === 0)) {
23
+ state = [...new Set(update.ROW)];
24
+ }
25
+ return state;
26
+ };
@@ -47,6 +47,9 @@ export class ConnectMock {
47
47
  stream(resourceName, onMessage, onError, params) {
48
48
  return from(Promise.resolve(this.nextMessage));
49
49
  }
50
+ streamState(resourceName, onMessage, onError, params, initialState) {
51
+ return from(Promise.resolve(this.nextListState));
52
+ }
50
53
  streamWithoutAutoTeardown(resourceName, onMessage, onError, params) {
51
54
  return from(Promise.resolve(this.nextMessage));
52
55
  }
@@ -1,5 +1,5 @@
1
1
  import { BehaviorSubject, from } from 'rxjs';
2
- import { SocketSubject } from '../../../connect';
2
+ import { SocketSubject } from '../../../connect/socket';
3
3
  /**
4
4
  * @internal
5
5
  */