@genesislcap/foundation-comms 14.124.0 → 14.125.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -172,4 +172,23 @@ export declare const WSConnect: import("@microsoft/fast-foundation").InterfaceSy
172
172
  * @internal
173
173
  */
174
174
  export declare const Connect: import("@microsoft/fast-foundation").InterfaceSymbol<Connect>;
175
+ /**
176
+ * Get Connect from the DI container.
177
+ *
178
+ * @remarks
179
+ * A utility method for host applications that are not using decorators or the DI container.
180
+ *
181
+ * @example
182
+ * ```ts
183
+ * import { getConnect } from '@genesislcap/foundation-comms';
184
+ * import { API_HOST } from '@genesislcap/foundation-utils';
185
+ * ...
186
+ * private connect = getConnect();
187
+ * ...
188
+ * const connected = await this.connect.connect(API_HOST); // < WebSocket url
189
+ * ```
190
+ *
191
+ * @public
192
+ */
193
+ export declare function getConnect(): Connect;
175
194
  //# sourceMappingURL=connect.d.ts.map
@@ -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,aAAa,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,YAAY,EAAoB,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AACnG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,aAalC,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,OAAO;IACtB;;;OAGG;IACH,SAAS,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,QAAQ,CAAC,WAAW,EAAE,OA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O,EAAE,QAAQ,EACjB,MAAM,CAAC,EAAE,GAAG,GACX,gBAAgB,CAAC,OAAO,CAAC;IAMf,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAMhD,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;IA+B9E,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;IASjE,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC;CAKrF;AAID;;;GAGG;AACH,eAAO,MAAM,SAAS,+DAAkE,CAAC;AAEzF;;;GAGG;AACH,eAAO,MAAM,OAAO,+DAEnB,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,UAAU,IAAI,OAAO,CAEpC"}
@@ -178,4 +178,35 @@ export declare class DefaultDatasource implements Datasource {
178
178
  * @internal
179
179
  */
180
180
  export declare const Datasource: import("@microsoft/fast-foundation").InterfaceSymbol<Datasource>;
181
+ /**
182
+ * Get Datasource from the DI container.
183
+ *
184
+ * @remarks
185
+ * A utility method for host applications that are not using decorators or the DI container.
186
+ *
187
+ * @example
188
+ * ```ts
189
+ * import { FilteredDataServerResult, getDatasource, SocketObservable } from '@genesislcap/foundation-comms';
190
+ * ...
191
+ * private ds = getDatasource();
192
+ * private dsSub: SocketObservable<FilteredDataServerResult>;
193
+ * ...
194
+ * const dsInit = await this.ds.init({
195
+ * criteria: '',
196
+ * isSnapshot: false,
197
+ * resourceName: 'ALL_POSITIONS',
198
+ * reverse: false,
199
+ * maxRows: 250,
200
+ * maxView: 1000,
201
+ * });
202
+ * if (!dsInit) {
203
+ * logger.debug(`Failed to initialise 'ALL_POSITIONS' datasource`);
204
+ * return;
205
+ * }
206
+ * this.dsSub = this.ds.stream.subscribe((result) => { ... });
207
+ * ```
208
+ *
209
+ * @public
210
+ */
211
+ export declare function getDatasource(): Datasource;
181
212
  //# sourceMappingURL=datasource.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"datasource.d.ts","sourceRoot":"","sources":["../../../src/datasource/datasource.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,KAAK,EACV,aAAa,EACb,wBAAwB,EACxB,WAAW,EACX,cAAc,EAEd,mBAAmB,EACpB,MAAM,4BAA4B,CAAC;AAKpC,OAAO,KAAK,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAsB,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAExF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,gBAcrC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB;;;OAGG;IACH,WAAW,EAAE,OAAO,CAAC;IAErB;;;OAGG;IACH,aAAa,EAAE,aAAa,EAAE,CAAC;IAE/B;;;;OAIG;IACH,QAAQ,EAAE,OAAO,CAAC;IAElB;;;OAGG;IACH,YAAY,EAAE,YAAY,CAAC;IAE3B;;;OAGG;IACH,MAAM,EAAE,gBAAgB,CAAC,wBAAwB,GAAG,mBAAmB,CAAC,CAAC;IAEzE;;;OAGG;IACH,iBAAiB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC;IAEjD;;;;;;OAMG;IACH,IAAI,CAAC,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE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AM;IAClD,SAAS,CAAC,aAAa,EAAE,cAAc,EAAE,CAAM;IACxC,aAAa,EAAE,aAAa,EAAE,CAAM;IAC3C,SAAS,CAAC,gBAAgB,EAAE,WAAW,EAAE,CAAM;gBAG1B,OAAO,EAAE,OAAO,EACnB,IAAI,EAAE,IAAI,EACY,MAAM,mBAA0B;IAGjE,iBAAiB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO;IAOjD,IAAI,CAAC,OAAO,EAAE,iBAAiB,EAAE,SAAS,GAAE,OAAc,GAAG,OAAO,CAAC,OAAO,CAAC;IAqCnF,MAAM;IAUN,IACI,MAAM,IAAI,gBAAgB,CAAC,wBAAwB,GAAG,mBAAmB,CAAC,CAE7E;IAED,IAAI,MAAM,QA4BT;IAEK,QAAQ,IAAI,OAAO,CAAC,OAAO,CAAC;IA2B5B,gBAAgB,CAAC,KAAK,GAAE,MAAkB;YAYlC,YAAY;YAeZ,sBAAsB;IAMpC,OAAO,CAAC,kBAAkB;CAY3B;AAED;;;GAGG;AACH,eAAO,MAAM,UAAU,kEAAwE,CAAC;AAEhG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,aAAa,IAAI,UAAU,CAE1C"}
@@ -191,3 +191,24 @@ export const WSConnect = DI.createInterface((x) => x.singleton(DefaultConnect));
191
191
  * @internal
192
192
  */
193
193
  export const Connect = DI.createInterface((x) => useHttpConnect ? x.aliasTo(HttpConnect) : x.aliasTo(WSConnect));
194
+ /**
195
+ * Get Connect from the DI container.
196
+ *
197
+ * @remarks
198
+ * A utility method for host applications that are not using decorators or the DI container.
199
+ *
200
+ * @example
201
+ * ```ts
202
+ * import { getConnect } from '@genesislcap/foundation-comms';
203
+ * import { API_HOST } from '@genesislcap/foundation-utils';
204
+ * ...
205
+ * private connect = getConnect();
206
+ * ...
207
+ * const connected = await this.connect.connect(API_HOST); // < WebSocket url
208
+ * ```
209
+ *
210
+ * @public
211
+ */
212
+ export function getConnect() {
213
+ return DI.getOrCreateDOMContainer().get(Connect);
214
+ }
@@ -203,3 +203,36 @@ export { DefaultDatasource };
203
203
  * @internal
204
204
  */
205
205
  export const Datasource = DI.createInterface((x) => x.transient(DefaultDatasource));
206
+ /**
207
+ * Get Datasource from the DI container.
208
+ *
209
+ * @remarks
210
+ * A utility method for host applications that are not using decorators or the DI container.
211
+ *
212
+ * @example
213
+ * ```ts
214
+ * import { FilteredDataServerResult, getDatasource, SocketObservable } from '@genesislcap/foundation-comms';
215
+ * ...
216
+ * private ds = getDatasource();
217
+ * private dsSub: SocketObservable<FilteredDataServerResult>;
218
+ * ...
219
+ * const dsInit = await this.ds.init({
220
+ * criteria: '',
221
+ * isSnapshot: false,
222
+ * resourceName: 'ALL_POSITIONS',
223
+ * reverse: false,
224
+ * maxRows: 250,
225
+ * maxView: 1000,
226
+ * });
227
+ * if (!dsInit) {
228
+ * logger.debug(`Failed to initialise 'ALL_POSITIONS' datasource`);
229
+ * return;
230
+ * }
231
+ * this.dsSub = this.ds.stream.subscribe((result) => { ... });
232
+ * ```
233
+ *
234
+ * @public
235
+ */
236
+ export function getDatasource() {
237
+ return DI.getOrCreateDOMContainer().get(Datasource);
238
+ }
@@ -13331,6 +13331,35 @@
13331
13331
  }
13332
13332
  ]
13333
13333
  },
13334
+ {
13335
+ "kind": "Function",
13336
+ "canonicalReference": "@genesislcap/foundation-comms!getConnect:function(1)",
13337
+ "docComment": "/**\n * Get Connect from the DI container.\n *\n * @remarks\n *\n * A utility method for host applications that are not using decorators or the DI container.\n *\n * @example\n * ```ts\n * import { getConnect } from '@genesislcap/foundation-comms';\n * import { API_HOST } from '@genesislcap/foundation-utils';\n * ...\n * private connect = getConnect();\n * ...\n * const connected = await this.connect.connect(API_HOST); // < WebSocket url\n * ```\n *\n * @public\n */\n",
13338
+ "excerptTokens": [
13339
+ {
13340
+ "kind": "Content",
13341
+ "text": "export declare function getConnect(): "
13342
+ },
13343
+ {
13344
+ "kind": "Reference",
13345
+ "text": "Connect",
13346
+ "canonicalReference": "@genesislcap/foundation-comms!Connect:interface"
13347
+ },
13348
+ {
13349
+ "kind": "Content",
13350
+ "text": ";"
13351
+ }
13352
+ ],
13353
+ "fileUrlPath": "src/connect/connect.ts",
13354
+ "returnTypeTokenRange": {
13355
+ "startIndex": 1,
13356
+ "endIndex": 2
13357
+ },
13358
+ "releaseTag": "Public",
13359
+ "overloadIndex": 1,
13360
+ "parameters": [],
13361
+ "name": "getConnect"
13362
+ },
13334
13363
  {
13335
13364
  "kind": "TypeAlias",
13336
13365
  "canonicalReference": "@genesislcap/foundation-comms!GetCredentialOptions:type",
@@ -13362,6 +13391,35 @@
13362
13391
  "endIndex": 3
13363
13392
  }
13364
13393
  },
13394
+ {
13395
+ "kind": "Function",
13396
+ "canonicalReference": "@genesislcap/foundation-comms!getDatasource:function(1)",
13397
+ "docComment": "/**\n * Get Datasource from the DI container.\n *\n * @remarks\n *\n * A utility method for host applications that are not using decorators or the DI container.\n *\n * @example\n * ```ts\n * import { FilteredDataServerResult, getDatasource, SocketObservable } from '@genesislcap/foundation-comms';\n * ...\n * private ds = getDatasource();\n * private dsSub: SocketObservable<FilteredDataServerResult>;\n * ...\n * const dsInit = await this.ds.init({\n * criteria: '',\n * isSnapshot: false,\n * resourceName: 'ALL_POSITIONS',\n * reverse: false,\n * maxRows: 250,\n * maxView: 1000,\n * });\n * if (!dsInit) {\n * logger.debug(`Failed to initialise 'ALL_POSITIONS' datasource`);\n * return;\n * }\n * this.dsSub = this.ds.stream.subscribe((result) => { ... });\n * ```\n *\n * @public\n */\n",
13398
+ "excerptTokens": [
13399
+ {
13400
+ "kind": "Content",
13401
+ "text": "export declare function getDatasource(): "
13402
+ },
13403
+ {
13404
+ "kind": "Reference",
13405
+ "text": "Datasource",
13406
+ "canonicalReference": "@genesislcap/foundation-comms!Datasource:interface"
13407
+ },
13408
+ {
13409
+ "kind": "Content",
13410
+ "text": ";"
13411
+ }
13412
+ ],
13413
+ "fileUrlPath": "src/datasource/datasource.ts",
13414
+ "returnTypeTokenRange": {
13415
+ "startIndex": 1,
13416
+ "endIndex": 2
13417
+ },
13418
+ "releaseTag": "Public",
13419
+ "overloadIndex": 1,
13420
+ "parameters": [],
13421
+ "name": "getDatasource"
13422
+ },
13365
13423
  {
13366
13424
  "kind": "Interface",
13367
13425
  "canonicalReference": "@genesislcap/foundation-comms!Http:interface",
@@ -1640,12 +1640,64 @@ export declare enum FoundationAnalyticsEventType {
1640
1640
  routeChanged = "routeChanged"
1641
1641
  }
1642
1642
 
1643
+ /**
1644
+ * Get Connect from the DI container.
1645
+ *
1646
+ * @remarks
1647
+ * A utility method for host applications that are not using decorators or the DI container.
1648
+ *
1649
+ * @example
1650
+ * ```ts
1651
+ * import { getConnect } from '@genesislcap/foundation-comms';
1652
+ * import { API_HOST } from '@genesislcap/foundation-utils';
1653
+ * ...
1654
+ * private connect = getConnect();
1655
+ * ...
1656
+ * const connected = await this.connect.connect(API_HOST); // < WebSocket url
1657
+ * ```
1658
+ *
1659
+ * @public
1660
+ */
1661
+ export declare function getConnect(): Connect;
1662
+
1643
1663
  /**
1644
1664
  * Represents options for retrieving credentials.
1645
1665
  * @public
1646
1666
  */
1647
1667
  export declare type GetCredentialOptions = CredentialRequestOptions & {};
1648
1668
 
1669
+ /**
1670
+ * Get Datasource from the DI container.
1671
+ *
1672
+ * @remarks
1673
+ * A utility method for host applications that are not using decorators or the DI container.
1674
+ *
1675
+ * @example
1676
+ * ```ts
1677
+ * import { FilteredDataServerResult, getDatasource, SocketObservable } from '@genesislcap/foundation-comms';
1678
+ * ...
1679
+ * private ds = getDatasource();
1680
+ * private dsSub: SocketObservable<FilteredDataServerResult>;
1681
+ * ...
1682
+ * const dsInit = await this.ds.init({
1683
+ * criteria: '',
1684
+ * isSnapshot: false,
1685
+ * resourceName: 'ALL_POSITIONS',
1686
+ * reverse: false,
1687
+ * maxRows: 250,
1688
+ * maxView: 1000,
1689
+ * });
1690
+ * if (!dsInit) {
1691
+ * logger.debug(`Failed to initialise 'ALL_POSITIONS' datasource`);
1692
+ * return;
1693
+ * }
1694
+ * this.dsSub = this.ds.stream.subscribe((result) => { ... });
1695
+ * ```
1696
+ *
1697
+ * @public
1698
+ */
1699
+ export declare function getDatasource(): Datasource;
1700
+
1649
1701
  /**
1650
1702
  * An interface representing an HTTP client that can make GET and POST requests and return a promise with the response data.
1651
1703
  * @public
@@ -0,0 +1,33 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-comms](./foundation-comms.md) &gt; [getConnect](./foundation-comms.getconnect.md)
4
+
5
+ ## getConnect() function
6
+
7
+ Get Connect from the DI container.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ export declare function getConnect(): Connect;
13
+ ```
14
+ **Returns:**
15
+
16
+ [Connect](./foundation-comms.connect.md)
17
+
18
+ ## Remarks
19
+
20
+ A utility method for host applications that are not using decorators or the DI container.
21
+
22
+ ## Example
23
+
24
+
25
+ ```ts
26
+ import { getConnect } from '@genesislcap/foundation-comms';
27
+ import { API_HOST } from '@genesislcap/foundation-utils';
28
+ ...
29
+ private connect = getConnect();
30
+ ...
31
+ const connected = await this.connect.connect(API_HOST); // < WebSocket url
32
+ ```
33
+
@@ -0,0 +1,45 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-comms](./foundation-comms.md) &gt; [getDatasource](./foundation-comms.getdatasource.md)
4
+
5
+ ## getDatasource() function
6
+
7
+ Get Datasource from the DI container.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ export declare function getDatasource(): Datasource;
13
+ ```
14
+ **Returns:**
15
+
16
+ [Datasource](./foundation-comms.datasource.md)
17
+
18
+ ## Remarks
19
+
20
+ A utility method for host applications that are not using decorators or the DI container.
21
+
22
+ ## Example
23
+
24
+
25
+ ```ts
26
+ import { FilteredDataServerResult, getDatasource, SocketObservable } from '@genesislcap/foundation-comms';
27
+ ...
28
+ private ds = getDatasource();
29
+ private dsSub: SocketObservable<FilteredDataServerResult>;
30
+ ...
31
+ const dsInit = await this.ds.init({
32
+ criteria: '',
33
+ isSnapshot: false,
34
+ resourceName: 'ALL_POSITIONS',
35
+ reverse: false,
36
+ maxRows: 250,
37
+ maxView: 1000,
38
+ });
39
+ if (!dsInit) {
40
+ logger.debug(`Failed to initialise 'ALL_POSITIONS' datasource`);
41
+ return;
42
+ }
43
+ this.dsSub = this.ds.stream.subscribe((result) => { ... });
44
+ ```
45
+
@@ -43,6 +43,8 @@
43
43
  | --- | --- |
44
44
  | [criteriaFiltersToFields(filters)](./foundation-comms.criteriafilterstofields.md) | Criteria filters to fields. |
45
45
  | [dataServerResultFilter(result, rowId)](./foundation-comms.dataserverresultfilter.md) | Data server result filter. |
46
+ | [getConnect()](./foundation-comms.getconnect.md) | Get Connect from the DI container. |
47
+ | [getDatasource()](./foundation-comms.getdatasource.md) | Get Datasource from the DI container. |
46
48
  | [normaliseCriteria(criteria, delimiter)](./foundation-comms.normalisecriteria.md) | Normalise criteria. |
47
49
  | [until(conditionFunc, timeoutMs)](./foundation-comms.until.md) | Polls a condition function until it returns true or a timeout is reached. |
48
50
 
@@ -959,9 +959,15 @@ export enum FoundationAnalyticsEventType {
959
959
  routeChanged = "routeChanged"
960
960
  }
961
961
 
962
+ // @public
963
+ export function getConnect(): Connect;
964
+
962
965
  // @public
963
966
  export type GetCredentialOptions = CredentialRequestOptions & {};
964
967
 
968
+ // @public
969
+ export function getDatasource(): Datasource;
970
+
965
971
  // Warning: (ae-internal-mixed-release-tag) Mixed release tags are not allowed for "Http" because one of its declarations is marked as @internal
966
972
  //
967
973
  // @public
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/foundation-comms",
3
3
  "description": "Genesis Foundation UI Comms",
4
- "version": "14.124.0",
4
+ "version": "14.125.0",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -59,8 +59,8 @@
59
59
  "test:debug": "genx test --debug"
60
60
  },
61
61
  "devDependencies": {
62
- "@genesislcap/foundation-testing": "14.124.0",
63
- "@genesislcap/genx": "14.124.0",
62
+ "@genesislcap/foundation-testing": "14.125.0",
63
+ "@genesislcap/genx": "14.125.0",
64
64
  "@types/js-cookie": "^3.0.2",
65
65
  "@types/json-schema": "^7.0.11",
66
66
  "@types/webappsec-credential-management": "^0.6.2",
@@ -68,8 +68,8 @@
68
68
  },
69
69
  "dependencies": {
70
70
  "@finos/fdc3": "^1.2.0",
71
- "@genesislcap/foundation-logger": "14.124.0",
72
- "@genesislcap/foundation-utils": "14.124.0",
71
+ "@genesislcap/foundation-logger": "14.125.0",
72
+ "@genesislcap/foundation-utils": "14.125.0",
73
73
  "@microsoft/fast-element": "^1.7.0",
74
74
  "@microsoft/fast-foundation": "^2.33.2",
75
75
  "analytics": "^0.8.0",
@@ -86,5 +86,5 @@
86
86
  "publishConfig": {
87
87
  "access": "public"
88
88
  },
89
- "gitHead": "ecbf83be72d1f020f8b189282c5199479dd55a3e"
89
+ "gitHead": "c59496ce3895b80fa7faf7fb4d2b58b5a64355ba"
90
90
  }