@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.
- package/dist/dts/datasource/entityDatasource.d.ts +2 -0
- package/dist/dts/datasource/entityDatasource.d.ts.map +1 -1
- package/dist/dts/testing/mocks/connect/socket.d.ts +1 -1
- package/dist/dts/testing/mocks/connect/socket.d.ts.map +1 -1
- package/dist/dts/tsdoc-metadata.json +1 -1
- package/dist/esm/datasource/datasource.types.js +1 -2
- package/dist/foundation-comms.api.json +240 -1021
- package/dist/foundation-comms.d.ts +3 -1
- package/docs/api/foundation-comms.md +0 -3
- package/docs/api-report.md +5 -1
- package/package.json +7 -7
- package/docs/api/foundation-comms.defaultentitydatasource.cache.md +0 -19
- package/docs/api/foundation-comms.defaultentitydatasource.disconnect.md +0 -19
- package/docs/api/foundation-comms.defaultentitydatasource.entitycache.md +0 -14
- package/docs/api/foundation-comms.defaultentitydatasource.entitymap.md +0 -14
- package/docs/api/foundation-comms.defaultentitydatasource.initialize.md +0 -19
- package/docs/api/foundation-comms.defaultentitydatasource.isempty.md +0 -19
- package/docs/api/foundation-comms.defaultentitydatasource.mapper.md +0 -14
- package/docs/api/foundation-comms.defaultentitydatasource.md +0 -36
- package/docs/api/foundation-comms.defaultentitydatasource.rowid.md +0 -14
- package/docs/api/foundation-comms.defaultentitydatasource.sourceref.md +0 -14
- package/docs/api/foundation-comms.defaultentitydatasource.subscription.md +0 -14
- package/docs/api/foundation-comms.defaultentitydatasource.subscriptionloggedoff.md +0 -14
- package/docs/api/foundation-comms.entitydatasource.cache.md +0 -19
- package/docs/api/foundation-comms.entitydatasource.disconnect.md +0 -22
- package/docs/api/foundation-comms.entitydatasource.initialize.md +0 -29
- package/docs/api/foundation-comms.entitydatasource.initialized.md +0 -19
- package/docs/api/foundation-comms.entitydatasource.isempty.md +0 -19
- package/docs/api/foundation-comms.entitydatasource.md +0 -81
- package/docs/api/foundation-comms.entitydatasourceinit.fetchmeta.md +0 -14
- package/docs/api/foundation-comms.entitydatasourceinit.mapper.md +0 -14
- package/docs/api/foundation-comms.entitydatasourceinit.md +0 -25
- 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) | |
|
package/docs/api-report.md
CHANGED
@@ -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-
|
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-
|
63
|
-
"@genesislcap/genx": "14.107.1-alpha-
|
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-
|
72
|
-
"@genesislcap/foundation-utils": "14.107.1-alpha-
|
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.
|
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": "
|
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) > [@genesislcap/foundation-comms](./foundation-comms.md) > [DefaultEntityDatasource](./foundation-comms.defaultentitydatasource.md) > [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) > [@genesislcap/foundation-comms](./foundation-comms.md) > [DefaultEntityDatasource](./foundation-comms.defaultentitydatasource.md) > [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) > [@genesislcap/foundation-comms](./foundation-comms.md) > [DefaultEntityDatasource](./foundation-comms.defaultentitydatasource.md) > [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) > [@genesislcap/foundation-comms](./foundation-comms.md) > [DefaultEntityDatasource](./foundation-comms.defaultentitydatasource.md) > [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) > [@genesislcap/foundation-comms](./foundation-comms.md) > [DefaultEntityDatasource](./foundation-comms.defaultentitydatasource.md) > [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) > [@genesislcap/foundation-comms](./foundation-comms.md) > [DefaultEntityDatasource](./foundation-comms.defaultentitydatasource.md) > [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) > [@genesislcap/foundation-comms](./foundation-comms.md) > [DefaultEntityDatasource](./foundation-comms.defaultentitydatasource.md) > [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) > [@genesislcap/foundation-comms](./foundation-comms.md) > [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)<!-- --><TDTO, TEntity>
|
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) | | () => 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<string, TEntity> | **_(ALPHA)_** |
|
29
|
-
| [initialize](./foundation-comms.defaultentitydatasource.initialize.md) | | (init: [EntityDatasourceInit](./foundation-comms.entitydatasourceinit.md)<!-- --><TDTO, TEntity>) => Promise<boolean> | **_(ALPHA)_** |
|
30
|
-
| [isEmpty](./foundation-comms.defaultentitydatasource.isempty.md) | <code>readonly</code> | boolean | **_(ALPHA)_** |
|
31
|
-
| [mapper](./foundation-comms.defaultentitydatasource.mapper.md) | <code>protected</code> | DTOMapper<TDTO, TEntity> | **_(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) > [@genesislcap/foundation-comms](./foundation-comms.md) > [DefaultEntityDatasource](./foundation-comms.defaultentitydatasource.md) > [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) > [@genesislcap/foundation-comms](./foundation-comms.md) > [DefaultEntityDatasource](./foundation-comms.defaultentitydatasource.md) > [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) > [@genesislcap/foundation-comms](./foundation-comms.md) > [DefaultEntityDatasource](./foundation-comms.defaultentitydatasource.md) > [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) > [@genesislcap/foundation-comms](./foundation-comms.md) > [DefaultEntityDatasource](./foundation-comms.defaultentitydatasource.md) > [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) > [@genesislcap/foundation-comms](./foundation-comms.md) > [EntityDatasource](./foundation-comms.entitydatasource.md) > [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) > [@genesislcap/foundation-comms](./foundation-comms.md) > [EntityDatasource](./foundation-comms.entitydatasource.md) > [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) > [@genesislcap/foundation-comms](./foundation-comms.md) > [EntityDatasource](./foundation-comms.entitydatasource.md) > [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)<!-- --><TDTO, TEntity> | |
|
21
|
-
|
22
|
-
**Returns:**
|
23
|
-
|
24
|
-
Promise<boolean>
|
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) > [@genesislcap/foundation-comms](./foundation-comms.md) > [EntityDatasource](./foundation-comms.entitydatasource.md) > [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) > [@genesislcap/foundation-comms](./foundation-comms.md) > [EntityDatasource](./foundation-comms.entitydatasource.md) > [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) > [@genesislcap/foundation-comms](./foundation-comms.md) > [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) > [@genesislcap/foundation-comms](./foundation-comms.md) > [EntityDatasourceInit](./foundation-comms.entitydatasourceinit.md) > [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) > [@genesislcap/foundation-comms](./foundation-comms.md) > [EntityDatasourceInit](./foundation-comms.entitydatasourceinit.md) > [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) > [@genesislcap/foundation-comms](./foundation-comms.md) > [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<TDTO, TEntity> | **_(ALPHA)_** |
|
24
|
-
| [options](./foundation-comms.entitydatasourceinit.options.md) | | Omit<[DatasourceOptions](./foundation-comms.datasourceoptions.md)<!-- -->, 'isSnapshot'> | **_(ALPHA)_** |
|
25
|
-
|
@@ -1,14 +0,0 @@
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
-
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [EntityDatasourceInit](./foundation-comms.entitydatasourceinit.md) > [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
|
-
```
|