@genesislcap/foundation-comms 14.107.1-alpha-afbc4d7.0 → 14.107.1-alpha-2ab4599.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. package/dist/dts/datasource/entityDatasource.d.ts +2 -0
  2. package/dist/dts/datasource/entityDatasource.d.ts.map +1 -1
  3. package/dist/dts/testing/mocks/connect/socket.d.ts +1 -1
  4. package/dist/dts/testing/mocks/connect/socket.d.ts.map +1 -1
  5. package/dist/dts/tsdoc-metadata.json +1 -1
  6. package/dist/esm/datasource/datasource.types.js +1 -2
  7. package/dist/foundation-comms.api.json +240 -1021
  8. package/dist/foundation-comms.d.ts +3 -1
  9. package/docs/api/foundation-comms.md +0 -3
  10. package/docs/api-report.md +5 -1
  11. package/package.json +7 -7
  12. package/docs/api/foundation-comms.defaultentitydatasource.cache.md +0 -19
  13. package/docs/api/foundation-comms.defaultentitydatasource.disconnect.md +0 -19
  14. package/docs/api/foundation-comms.defaultentitydatasource.entitycache.md +0 -14
  15. package/docs/api/foundation-comms.defaultentitydatasource.entitymap.md +0 -14
  16. package/docs/api/foundation-comms.defaultentitydatasource.initialize.md +0 -19
  17. package/docs/api/foundation-comms.defaultentitydatasource.isempty.md +0 -19
  18. package/docs/api/foundation-comms.defaultentitydatasource.mapper.md +0 -14
  19. package/docs/api/foundation-comms.defaultentitydatasource.md +0 -36
  20. package/docs/api/foundation-comms.defaultentitydatasource.rowid.md +0 -14
  21. package/docs/api/foundation-comms.defaultentitydatasource.sourceref.md +0 -14
  22. package/docs/api/foundation-comms.defaultentitydatasource.subscription.md +0 -14
  23. package/docs/api/foundation-comms.defaultentitydatasource.subscriptionloggedoff.md +0 -14
  24. package/docs/api/foundation-comms.entitydatasource.cache.md +0 -19
  25. package/docs/api/foundation-comms.entitydatasource.disconnect.md +0 -22
  26. package/docs/api/foundation-comms.entitydatasource.initialize.md +0 -29
  27. package/docs/api/foundation-comms.entitydatasource.initialized.md +0 -19
  28. package/docs/api/foundation-comms.entitydatasource.isempty.md +0 -19
  29. package/docs/api/foundation-comms.entitydatasource.md +0 -81
  30. package/docs/api/foundation-comms.entitydatasourceinit.fetchmeta.md +0 -14
  31. package/docs/api/foundation-comms.entitydatasourceinit.mapper.md +0 -14
  32. package/docs/api/foundation-comms.entitydatasourceinit.md +0 -25
  33. package/docs/api/foundation-comms.entitydatasourceinit.options.md +0 -14
@@ -1123,6 +1123,8 @@ export declare class DefaultEntityDatasource<TDTO, TEntity> extends DefaultDatas
1123
1123
  protected entityCache: TEntity[];
1124
1124
  protected entityMap: Map<string, TEntity>;
1125
1125
  protected rowId: string;
1126
+ /** {@inheritDoc EntityDatasource.initialized} */
1127
+ initialized: boolean;
1126
1128
  /** {@inheritDoc EntityDatasource.initialize} */
1127
1129
  initialize: (init: EntityDatasourceInit<TDTO, TEntity>) => Promise<boolean>;
1128
1130
  /** {@inheritDoc EntityDatasource.cache} */
@@ -2639,7 +2641,7 @@ export declare class SocketMock implements Socket {
2639
2641
  isConnectedSubject: BehaviorSubject<boolean>;
2640
2642
  isReconnecting: boolean;
2641
2643
  nextMessage: Message;
2642
- socketMessagesSubject: SocketSubject<Message>;
2644
+ socketMessagesSubject: SocketSubject<Message<any>>;
2643
2645
  connect(host: string, options?: SocketConnectOptions, reconnectOptions?: SocketReconnectOptions): Promise<boolean>;
2644
2646
  disconnect(): void;
2645
2647
  send<T>(message: Message<any>): Promise<Message | any>;
@@ -15,7 +15,6 @@
15
15
  | [DefaultConnect](./foundation-comms.defaultconnect.md) | The default implementation for the Connect interface (WS-only). |
16
16
  | [DefaultCredentialManager](./foundation-comms.defaultcredentialmanager.md) | The default implementation for the CredentialManager interface. |
17
17
  | [DefaultDatasource](./foundation-comms.defaultdatasource.md) | The default implementation for the Datasource interface. |
18
- | [DefaultEntityDatasource](./foundation-comms.defaultentitydatasource.md) | **_(ALPHA)_** Default EntityDatasource DI implementation. |
19
18
  | [DefaultFoundationAnalytics](./foundation-comms.defaultfoundationanalytics.md) | The default implementation for the FoundationAnalytics interface. |
20
19
  | [DefaultHttp](./foundation-comms.defaulthttp.md) | The default implementation of the Http interface. |
21
20
  | [DefaultHttpConnect](./foundation-comms.defaulthttpconnect.md) | The default implementation for the Connect interface (HTTP-only). |
@@ -62,8 +61,6 @@
62
61
  | [DatasourceOptions](./foundation-comms.datasourceoptions.md) | Options that can be passed when initializing a datasource. |
63
62
  | [DataUpdate](./foundation-comms.dataupdate.md) | Data Update definition with details of what data to add, drop, and/or modify. |
64
63
  | [Dataview](./foundation-comms.dataview.md) | Dataview object |
65
- | [EntityDatasource](./foundation-comms.entitydatasource.md) | **_(ALPHA)_** EntityDatasource DI interface. |
66
- | [EntityDatasourceInit](./foundation-comms.entitydatasourceinit.md) | **_(ALPHA)_** EntityDatasourceInit interface. |
67
64
  | [FDC3AppIntent](./foundation-comms.fdc3appintent.md) | |
68
65
  | [FDC3Channel](./foundation-comms.fdc3channel.md) | |
69
66
  | [FDC3Context](./foundation-comms.fdc3context.md) | |
@@ -654,6 +654,10 @@ export class DefaultEntityDatasource<TDTO, TEntity> extends DefaultDatasource im
654
654
  // Warning: (ae-unresolved-inheritdoc-reference) The @inheritDoc reference could not be resolved: The reference is ambiguous because "EntityDatasource" has more than one declaration; you need to add a TSDoc member reference selector
655
655
  //
656
656
  // (undocumented)
657
+ initialized: boolean;
658
+ // Warning: (ae-unresolved-inheritdoc-reference) The @inheritDoc reference could not be resolved: The reference is ambiguous because "EntityDatasource" has more than one declaration; you need to add a TSDoc member reference selector
659
+ //
660
+ // (undocumented)
657
661
  get isEmpty(): boolean;
658
662
  // (undocumented)
659
663
  protected mapper: DTOMapper<TDTO, TEntity>;
@@ -1476,7 +1480,7 @@ export class SocketMock implements Socket {
1476
1480
  // (undocumented)
1477
1481
  socketMessages(): SocketSubject<Message>;
1478
1482
  // (undocumented)
1479
- socketMessagesSubject: SocketSubject<Message>;
1483
+ socketMessagesSubject: SocketSubject<Message<any>>;
1480
1484
  }
1481
1485
 
1482
1486
  // @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.107.1-alpha-afbc4d7.0",
4
+ "version": "14.107.1-alpha-2ab4599.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.107.1-alpha-afbc4d7.0",
63
- "@genesislcap/genx": "14.107.1-alpha-afbc4d7.0",
62
+ "@genesislcap/foundation-testing": "14.107.1-alpha-2ab4599.0",
63
+ "@genesislcap/genx": "14.107.1-alpha-2ab4599.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,15 +68,15 @@
68
68
  },
69
69
  "dependencies": {
70
70
  "@finos/fdc3": "^1.2.0",
71
- "@genesislcap/foundation-logger": "14.107.1-alpha-afbc4d7.0",
72
- "@genesislcap/foundation-utils": "14.107.1-alpha-afbc4d7.0",
71
+ "@genesislcap/foundation-logger": "14.107.1-alpha-2ab4599.0",
72
+ "@genesislcap/foundation-utils": "14.107.1-alpha-2ab4599.0",
73
73
  "@microsoft/fast-element": "^1.7.0",
74
74
  "@microsoft/fast-foundation": "^2.33.2",
75
75
  "analytics": "^0.8.0",
76
76
  "js-cookie": "^3.0.1",
77
77
  "json-schema": "^0.4.0",
78
78
  "rxjs": "^7.5.4",
79
- "tslib": "^2.6.2"
79
+ "tslib": "^2.3.1"
80
80
  },
81
81
  "repository": {
82
82
  "type": "git",
@@ -86,5 +86,5 @@
86
86
  "publishConfig": {
87
87
  "access": "public"
88
88
  },
89
- "gitHead": "bb64624e9bb6cea2cad088305e8c82d088f20da4"
89
+ "gitHead": "4760c6351d85ae90737f615f7173ce7aae98f9c6"
90
90
  }
@@ -1,19 +0,0 @@
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; [DefaultEntityDatasource](./foundation-comms.defaultentitydatasource.md) &gt; [cache](./foundation-comms.defaultentitydatasource.cache.md)
4
-
5
- ## DefaultEntityDatasource.cache property
6
-
7
- > This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
- >
9
-
10
- **Signature:**
11
-
12
- ```typescript
13
- get cache(): TEntity[];
14
- ```
15
-
16
- ## Remarks
17
-
18
- In-memory entity cache.
19
-
@@ -1,19 +0,0 @@
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; [DefaultEntityDatasource](./foundation-comms.defaultentitydatasource.md) &gt; [disconnect](./foundation-comms.defaultentitydatasource.disconnect.md)
4
-
5
- ## DefaultEntityDatasource.disconnect property
6
-
7
- > This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
- >
9
-
10
- **Signature:**
11
-
12
- ```typescript
13
- disconnect: () => void;
14
- ```
15
-
16
- ## Remarks
17
-
18
- Disconnect and reset cache.
19
-
@@ -1,14 +0,0 @@
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; [DefaultEntityDatasource](./foundation-comms.defaultentitydatasource.md) &gt; [entityCache](./foundation-comms.defaultentitydatasource.entitycache.md)
4
-
5
- ## DefaultEntityDatasource.entityCache property
6
-
7
- > This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
- >
9
-
10
- **Signature:**
11
-
12
- ```typescript
13
- protected entityCache: TEntity[];
14
- ```
@@ -1,14 +0,0 @@
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; [DefaultEntityDatasource](./foundation-comms.defaultentitydatasource.md) &gt; [entityMap](./foundation-comms.defaultentitydatasource.entitymap.md)
4
-
5
- ## DefaultEntityDatasource.entityMap property
6
-
7
- > This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
- >
9
-
10
- **Signature:**
11
-
12
- ```typescript
13
- protected entityMap: Map<string, TEntity>;
14
- ```
@@ -1,19 +0,0 @@
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; [DefaultEntityDatasource](./foundation-comms.defaultentitydatasource.md) &gt; [initialize](./foundation-comms.defaultentitydatasource.initialize.md)
4
-
5
- ## DefaultEntityDatasource.initialize property
6
-
7
- > This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
- >
9
-
10
- **Signature:**
11
-
12
- ```typescript
13
- initialize: (init: EntityDatasourceInit<TDTO, TEntity>) => Promise<boolean>;
14
- ```
15
-
16
- ## Remarks
17
-
18
- Initialize datasource.
19
-
@@ -1,19 +0,0 @@
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; [DefaultEntityDatasource](./foundation-comms.defaultentitydatasource.md) &gt; [isEmpty](./foundation-comms.defaultentitydatasource.isempty.md)
4
-
5
- ## DefaultEntityDatasource.isEmpty property
6
-
7
- > This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
- >
9
-
10
- **Signature:**
11
-
12
- ```typescript
13
- get isEmpty(): boolean;
14
- ```
15
-
16
- ## Remarks
17
-
18
- Cache is empty / awaiting first result.
19
-
@@ -1,14 +0,0 @@
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; [DefaultEntityDatasource](./foundation-comms.defaultentitydatasource.md) &gt; [mapper](./foundation-comms.defaultentitydatasource.mapper.md)
4
-
5
- ## DefaultEntityDatasource.mapper property
6
-
7
- > This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
- >
9
-
10
- **Signature:**
11
-
12
- ```typescript
13
- protected mapper: DTOMapper<TDTO, TEntity>;
14
- ```
@@ -1,36 +0,0 @@
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; [DefaultEntityDatasource](./foundation-comms.defaultentitydatasource.md)
4
-
5
- ## DefaultEntityDatasource class
6
-
7
- > This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
- >
9
-
10
- Default EntityDatasource DI implementation.
11
-
12
- **Signature:**
13
-
14
- ```typescript
15
- export declare class DefaultEntityDatasource<TDTO, TEntity> extends DefaultDatasource implements EntityDatasource<TDTO, TEntity>
16
- ```
17
- **Extends:** [DefaultDatasource](./foundation-comms.defaultdatasource.md)
18
-
19
- **Implements:** [EntityDatasource](./foundation-comms.entitydatasource.md)<!-- -->&lt;TDTO, TEntity&gt;
20
-
21
- ## Properties
22
-
23
- | Property | Modifiers | Type | Description |
24
- | --- | --- | --- | --- |
25
- | [cache](./foundation-comms.defaultentitydatasource.cache.md) | <code>readonly</code> | TEntity\[\] | **_(ALPHA)_** |
26
- | [disconnect](./foundation-comms.defaultentitydatasource.disconnect.md) | | () =&gt; void | **_(ALPHA)_** |
27
- | [entityCache](./foundation-comms.defaultentitydatasource.entitycache.md) | <code>protected</code> | TEntity\[\] | **_(ALPHA)_** |
28
- | [entityMap](./foundation-comms.defaultentitydatasource.entitymap.md) | <code>protected</code> | Map&lt;string, TEntity&gt; | **_(ALPHA)_** |
29
- | [initialize](./foundation-comms.defaultentitydatasource.initialize.md) | | (init: [EntityDatasourceInit](./foundation-comms.entitydatasourceinit.md)<!-- -->&lt;TDTO, TEntity&gt;) =&gt; Promise&lt;boolean&gt; | **_(ALPHA)_** |
30
- | [isEmpty](./foundation-comms.defaultentitydatasource.isempty.md) | <code>readonly</code> | boolean | **_(ALPHA)_** |
31
- | [mapper](./foundation-comms.defaultentitydatasource.mapper.md) | <code>protected</code> | DTOMapper&lt;TDTO, TEntity&gt; | **_(ALPHA)_** |
32
- | [rowId](./foundation-comms.defaultentitydatasource.rowid.md) | <code>protected</code> | string | **_(ALPHA)_** |
33
- | [sourceRef](./foundation-comms.defaultentitydatasource.sourceref.md) | <code>protected</code> | string | **_(ALPHA)_** |
34
- | [subscription](./foundation-comms.defaultentitydatasource.subscription.md) | <code>protected</code> | SocketSubscription | **_(ALPHA)_** |
35
- | [subscriptionLoggedOff](./foundation-comms.defaultentitydatasource.subscriptionloggedoff.md) | <code>protected</code> | boolean | **_(ALPHA)_** |
36
-
@@ -1,14 +0,0 @@
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; [DefaultEntityDatasource](./foundation-comms.defaultentitydatasource.md) &gt; [rowId](./foundation-comms.defaultentitydatasource.rowid.md)
4
-
5
- ## DefaultEntityDatasource.rowId property
6
-
7
- > This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
- >
9
-
10
- **Signature:**
11
-
12
- ```typescript
13
- protected rowId: string;
14
- ```
@@ -1,14 +0,0 @@
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; [DefaultEntityDatasource](./foundation-comms.defaultentitydatasource.md) &gt; [sourceRef](./foundation-comms.defaultentitydatasource.sourceref.md)
4
-
5
- ## DefaultEntityDatasource.sourceRef property
6
-
7
- > This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
- >
9
-
10
- **Signature:**
11
-
12
- ```typescript
13
- protected sourceRef: string;
14
- ```
@@ -1,14 +0,0 @@
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; [DefaultEntityDatasource](./foundation-comms.defaultentitydatasource.md) &gt; [subscription](./foundation-comms.defaultentitydatasource.subscription.md)
4
-
5
- ## DefaultEntityDatasource.subscription property
6
-
7
- > This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
- >
9
-
10
- **Signature:**
11
-
12
- ```typescript
13
- protected subscription: SocketSubscription;
14
- ```
@@ -1,14 +0,0 @@
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; [DefaultEntityDatasource](./foundation-comms.defaultentitydatasource.md) &gt; [subscriptionLoggedOff](./foundation-comms.defaultentitydatasource.subscriptionloggedoff.md)
4
-
5
- ## DefaultEntityDatasource.subscriptionLoggedOff property
6
-
7
- > This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
- >
9
-
10
- **Signature:**
11
-
12
- ```typescript
13
- protected subscriptionLoggedOff: boolean;
14
- ```
@@ -1,19 +0,0 @@
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; [EntityDatasource](./foundation-comms.entitydatasource.md) &gt; [cache](./foundation-comms.entitydatasource.cache.md)
4
-
5
- ## EntityDatasource.cache property
6
-
7
- > This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
- >
9
-
10
- **Signature:**
11
-
12
- ```typescript
13
- readonly cache: TEntity[];
14
- ```
15
-
16
- ## Remarks
17
-
18
- In-memory entity cache.
19
-
@@ -1,22 +0,0 @@
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; [EntityDatasource](./foundation-comms.entitydatasource.md) &gt; [disconnect](./foundation-comms.entitydatasource.disconnect.md)
4
-
5
- ## EntityDatasource.disconnect() method
6
-
7
- > This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
- >
9
-
10
- **Signature:**
11
-
12
- ```typescript
13
- disconnect(): void;
14
- ```
15
- **Returns:**
16
-
17
- void
18
-
19
- ## Remarks
20
-
21
- Disconnect and reset cache.
22
-
@@ -1,29 +0,0 @@
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; [EntityDatasource](./foundation-comms.entitydatasource.md) &gt; [initialize](./foundation-comms.entitydatasource.initialize.md)
4
-
5
- ## EntityDatasource.initialize() method
6
-
7
- > This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
- >
9
-
10
- **Signature:**
11
-
12
- ```typescript
13
- initialize(init: EntityDatasourceInit<TDTO, TEntity>): Promise<boolean>;
14
- ```
15
-
16
- ## Parameters
17
-
18
- | Parameter | Type | Description |
19
- | --- | --- | --- |
20
- | init | [EntityDatasourceInit](./foundation-comms.entitydatasourceinit.md)<!-- -->&lt;TDTO, TEntity&gt; | |
21
-
22
- **Returns:**
23
-
24
- Promise&lt;boolean&gt;
25
-
26
- ## Remarks
27
-
28
- Initialize datasource.
29
-
@@ -1,19 +0,0 @@
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; [EntityDatasource](./foundation-comms.entitydatasource.md) &gt; [initialized](./foundation-comms.entitydatasource.initialized.md)
4
-
5
- ## EntityDatasource.initialized property
6
-
7
- > This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
- >
9
-
10
- **Signature:**
11
-
12
- ```typescript
13
- readonly initialized: boolean;
14
- ```
15
-
16
- ## Remarks
17
-
18
- Datasource initialized.
19
-
@@ -1,19 +0,0 @@
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; [EntityDatasource](./foundation-comms.entitydatasource.md) &gt; [isEmpty](./foundation-comms.entitydatasource.isempty.md)
4
-
5
- ## EntityDatasource.isEmpty property
6
-
7
- > This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
- >
9
-
10
- **Signature:**
11
-
12
- ```typescript
13
- readonly isEmpty: boolean;
14
- ```
15
-
16
- ## Remarks
17
-
18
- Cache is empty / awaiting first result.
19
-
@@ -1,81 +0,0 @@
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; [EntityDatasource](./foundation-comms.entitydatasource.md)
4
-
5
- ## EntityDatasource interface
6
-
7
- > This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
- >
9
-
10
- EntityDatasource DI interface.
11
-
12
- **Signature:**
13
-
14
- ```typescript
15
- export interface EntityDatasource<TDTO, TEntity>
16
- ```
17
-
18
- ## Remarks
19
-
20
- A simple streaming datasource cache used mainly by services that employ DTO mappers.
21
-
22
- ## Example
23
-
24
- An example service using an underlying EntityDatasource:
25
-
26
- ```ts
27
- export class DefaultDomainService implements DomainService {
28
- constructor(
29
- @EntityDatasource protected datasource: EntityDatasource<DomainDTO, DomainEntity>,
30
- @DomainDTOMapper protected mapper: DomainDTOMapper,
31
- @optional(DomainServiceConfig) private config = defaultConfig
32
- ) {}
33
-
34
- get initialized = () {
35
- return this.datasource.initialized;
36
- }
37
-
38
- initialize = async (init) => {
39
- await this.datasource.initialize({
40
- mapper: this.mapper,
41
- options: {
42
- resourceName: this.config.resourceName,
43
- ...init,
44
- },
45
- });
46
- return this.initialized;
47
- };
48
-
49
- list = () => this.datasource.cache;
50
-
51
- get = async (id: string) => this.datasource.cache.find((entity) => entity.id === id);
52
-
53
- action = async (id: string, message?: string): Promise<Message> => {
54
- return this.commitEvent('EVENT_DOMAIN_ACTION', { id, message });
55
- };
56
-
57
- private async commitEvent(event: string, entity: Partial<DomainEntity>) {
58
- const msg = await this.connect.commitEvent(event, {
59
- DETAILS: this.mapper.toDTO(entity),
60
- IGNORE_WARNINGS: true,
61
- VALIDATE: false,
62
- });
63
- return messageOrThrow(msg);
64
- }
65
- ```
66
-
67
- ## Properties
68
-
69
- | Property | Modifiers | Type | Description |
70
- | --- | --- | --- | --- |
71
- | [cache](./foundation-comms.entitydatasource.cache.md) | <code>readonly</code> | TEntity\[\] | **_(ALPHA)_** |
72
- | [initialized](./foundation-comms.entitydatasource.initialized.md) | <code>readonly</code> | boolean | **_(ALPHA)_** |
73
- | [isEmpty](./foundation-comms.entitydatasource.isempty.md) | <code>readonly</code> | boolean | **_(ALPHA)_** |
74
-
75
- ## Methods
76
-
77
- | Method | Description |
78
- | --- | --- |
79
- | [disconnect()](./foundation-comms.entitydatasource.disconnect.md) | **_(ALPHA)_** |
80
- | [initialize(init)](./foundation-comms.entitydatasource.initialize.md) | **_(ALPHA)_** |
81
-
@@ -1,14 +0,0 @@
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; [EntityDatasourceInit](./foundation-comms.entitydatasourceinit.md) &gt; [fetchMeta](./foundation-comms.entitydatasourceinit.fetchmeta.md)
4
-
5
- ## EntityDatasourceInit.fetchMeta property
6
-
7
- > This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
- >
9
-
10
- **Signature:**
11
-
12
- ```typescript
13
- fetchMeta?: boolean;
14
- ```
@@ -1,14 +0,0 @@
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; [EntityDatasourceInit](./foundation-comms.entitydatasourceinit.md) &gt; [mapper](./foundation-comms.entitydatasourceinit.mapper.md)
4
-
5
- ## EntityDatasourceInit.mapper property
6
-
7
- > This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
- >
9
-
10
- **Signature:**
11
-
12
- ```typescript
13
- mapper: DTOMapper<TDTO, TEntity>;
14
- ```
@@ -1,25 +0,0 @@
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; [EntityDatasourceInit](./foundation-comms.entitydatasourceinit.md)
4
-
5
- ## EntityDatasourceInit interface
6
-
7
- > This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
- >
9
-
10
- EntityDatasourceInit interface.
11
-
12
- **Signature:**
13
-
14
- ```typescript
15
- export interface EntityDatasourceInit<TDTO, TEntity>
16
- ```
17
-
18
- ## Properties
19
-
20
- | Property | Modifiers | Type | Description |
21
- | --- | --- | --- | --- |
22
- | [fetchMeta?](./foundation-comms.entitydatasourceinit.fetchmeta.md) | | boolean | **_(ALPHA)_** _(Optional)_ |
23
- | [mapper](./foundation-comms.entitydatasourceinit.mapper.md) | | DTOMapper&lt;TDTO, TEntity&gt; | **_(ALPHA)_** |
24
- | [options](./foundation-comms.entitydatasourceinit.options.md) | | Omit&lt;[DatasourceOptions](./foundation-comms.datasourceoptions.md)<!-- -->, 'isSnapshot'&gt; | **_(ALPHA)_** |
25
-
@@ -1,14 +0,0 @@
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; [EntityDatasourceInit](./foundation-comms.entitydatasourceinit.md) &gt; [options](./foundation-comms.entitydatasourceinit.options.md)
4
-
5
- ## EntityDatasourceInit.options property
6
-
7
- > This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
- >
9
-
10
- **Signature:**
11
-
12
- ```typescript
13
- options: Omit<DatasourceOptions, 'isSnapshot'>;
14
- ```