@genesislcap/foundation-comms 14.107.0 → 14.107.1-alpha-afbc4d7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dts/datasource/entityDatasource.d.ts +0 -2
- 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 +2 -1
- package/dist/foundation-comms.api.json +888 -107
- package/dist/foundation-comms.d.ts +1 -3
- package/docs/api/foundation-comms.defaultentitydatasource.cache.md +19 -0
- package/docs/api/foundation-comms.defaultentitydatasource.disconnect.md +19 -0
- package/docs/api/foundation-comms.defaultentitydatasource.entitycache.md +14 -0
- package/docs/api/foundation-comms.defaultentitydatasource.entitymap.md +14 -0
- package/docs/api/foundation-comms.defaultentitydatasource.initialize.md +19 -0
- package/docs/api/foundation-comms.defaultentitydatasource.isempty.md +19 -0
- package/docs/api/foundation-comms.defaultentitydatasource.mapper.md +14 -0
- package/docs/api/foundation-comms.defaultentitydatasource.md +36 -0
- package/docs/api/foundation-comms.defaultentitydatasource.rowid.md +14 -0
- package/docs/api/foundation-comms.defaultentitydatasource.sourceref.md +14 -0
- package/docs/api/foundation-comms.defaultentitydatasource.subscription.md +14 -0
- package/docs/api/foundation-comms.defaultentitydatasource.subscriptionloggedoff.md +14 -0
- package/docs/api/foundation-comms.entitydatasource.cache.md +19 -0
- package/docs/api/foundation-comms.entitydatasource.disconnect.md +22 -0
- package/docs/api/foundation-comms.entitydatasource.initialize.md +29 -0
- package/docs/api/foundation-comms.entitydatasource.initialized.md +19 -0
- package/docs/api/foundation-comms.entitydatasource.isempty.md +19 -0
- package/docs/api/foundation-comms.entitydatasource.md +81 -0
- package/docs/api/foundation-comms.entitydatasourceinit.fetchmeta.md +14 -0
- package/docs/api/foundation-comms.entitydatasourceinit.mapper.md +14 -0
- package/docs/api/foundation-comms.entitydatasourceinit.md +25 -0
- package/docs/api/foundation-comms.entitydatasourceinit.options.md +14 -0
- package/docs/api/foundation-comms.md +3 -0
- package/docs/api-report.md +1 -5
- package/package.json +7 -7
@@ -1123,8 +1123,6 @@ 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;
|
1128
1126
|
/** {@inheritDoc EntityDatasource.initialize} */
|
1129
1127
|
initialize: (init: EntityDatasourceInit<TDTO, TEntity>) => Promise<boolean>;
|
1130
1128
|
/** {@inheritDoc EntityDatasource.cache} */
|
@@ -2641,7 +2639,7 @@ export declare class SocketMock implements Socket {
|
|
2641
2639
|
isConnectedSubject: BehaviorSubject<boolean>;
|
2642
2640
|
isReconnecting: boolean;
|
2643
2641
|
nextMessage: Message;
|
2644
|
-
socketMessagesSubject: SocketSubject<Message
|
2642
|
+
socketMessagesSubject: SocketSubject<Message>;
|
2645
2643
|
connect(host: string, options?: SocketConnectOptions, reconnectOptions?: SocketReconnectOptions): Promise<boolean>;
|
2646
2644
|
disconnect(): void;
|
2647
2645
|
send<T>(message: Message<any>): Promise<Message | any>;
|
@@ -0,0 +1,19 @@
|
|
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
|
+
|
@@ -0,0 +1,19 @@
|
|
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
|
+
|
@@ -0,0 +1,14 @@
|
|
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
|
+
```
|
@@ -0,0 +1,14 @@
|
|
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
|
+
```
|
@@ -0,0 +1,19 @@
|
|
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
|
+
|
@@ -0,0 +1,19 @@
|
|
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
|
+
|
@@ -0,0 +1,14 @@
|
|
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
|
+
```
|
@@ -0,0 +1,36 @@
|
|
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
|
+
|
@@ -0,0 +1,14 @@
|
|
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
|
+
```
|
@@ -0,0 +1,14 @@
|
|
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
|
+
```
|
@@ -0,0 +1,14 @@
|
|
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
|
+
```
|
@@ -0,0 +1,14 @@
|
|
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
|
+
```
|
@@ -0,0 +1,19 @@
|
|
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
|
+
|
@@ -0,0 +1,22 @@
|
|
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
|
+
|
@@ -0,0 +1,29 @@
|
|
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
|
+
|
@@ -0,0 +1,19 @@
|
|
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
|
+
|
@@ -0,0 +1,19 @@
|
|
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
|
+
|
@@ -0,0 +1,81 @@
|
|
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
|
+
|
@@ -0,0 +1,14 @@
|
|
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
|
+
```
|
@@ -0,0 +1,14 @@
|
|
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
|
+
```
|
@@ -0,0 +1,25 @@
|
|
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
|
+
|
@@ -0,0 +1,14 @@
|
|
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
|
+
```
|
@@ -15,6 +15,7 @@
|
|
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. |
|
18
19
|
| [DefaultFoundationAnalytics](./foundation-comms.defaultfoundationanalytics.md) | The default implementation for the FoundationAnalytics interface. |
|
19
20
|
| [DefaultHttp](./foundation-comms.defaulthttp.md) | The default implementation of the Http interface. |
|
20
21
|
| [DefaultHttpConnect](./foundation-comms.defaulthttpconnect.md) | The default implementation for the Connect interface (HTTP-only). |
|
@@ -61,6 +62,8 @@
|
|
61
62
|
| [DatasourceOptions](./foundation-comms.datasourceoptions.md) | Options that can be passed when initializing a datasource. |
|
62
63
|
| [DataUpdate](./foundation-comms.dataupdate.md) | Data Update definition with details of what data to add, drop, and/or modify. |
|
63
64
|
| [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. |
|
64
67
|
| [FDC3AppIntent](./foundation-comms.fdc3appintent.md) | |
|
65
68
|
| [FDC3Channel](./foundation-comms.fdc3channel.md) | |
|
66
69
|
| [FDC3Context](./foundation-comms.fdc3context.md) | |
|
package/docs/api-report.md
CHANGED
@@ -654,10 +654,6 @@ 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)
|
661
657
|
get isEmpty(): boolean;
|
662
658
|
// (undocumented)
|
663
659
|
protected mapper: DTOMapper<TDTO, TEntity>;
|
@@ -1480,7 +1476,7 @@ export class SocketMock implements Socket {
|
|
1480
1476
|
// (undocumented)
|
1481
1477
|
socketMessages(): SocketSubject<Message>;
|
1482
1478
|
// (undocumented)
|
1483
|
-
socketMessagesSubject: SocketSubject<Message
|
1479
|
+
socketMessagesSubject: SocketSubject<Message>;
|
1484
1480
|
}
|
1485
1481
|
|
1486
1482
|
// @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.0",
|
4
|
+
"version": "14.107.1-alpha-afbc4d7.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.0",
|
63
|
-
"@genesislcap/genx": "14.107.0",
|
62
|
+
"@genesislcap/foundation-testing": "14.107.1-alpha-afbc4d7.0",
|
63
|
+
"@genesislcap/genx": "14.107.1-alpha-afbc4d7.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.0",
|
72
|
-
"@genesislcap/foundation-utils": "14.107.0",
|
71
|
+
"@genesislcap/foundation-logger": "14.107.1-alpha-afbc4d7.0",
|
72
|
+
"@genesislcap/foundation-utils": "14.107.1-alpha-afbc4d7.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.6.2"
|
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": "bb64624e9bb6cea2cad088305e8c82d088f20da4"
|
90
90
|
}
|