@genesislcap/foundation-comms 14.187.1 → 14.188.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/connect/connect.d.ts +11 -6
- package/dist/dts/connect/connect.d.ts.map +1 -1
- package/dist/dts/connect/http.connect.d.ts +2 -2
- package/dist/dts/connect/http.connect.d.ts.map +1 -1
- package/dist/dts/connect/message.d.ts +11 -0
- package/dist/dts/connect/message.d.ts.map +1 -1
- package/dist/dts/connect/socket.d.ts +6 -2
- package/dist/dts/connect/socket.d.ts.map +1 -1
- package/dist/dts/datasource/datasource.config.d.ts +44 -0
- package/dist/dts/datasource/datasource.config.d.ts.map +1 -0
- package/dist/dts/datasource/datasource.d.ts +49 -19
- package/dist/dts/datasource/datasource.d.ts.map +1 -1
- package/dist/dts/datasource/datasource.mixins.d.ts +367 -0
- package/dist/dts/datasource/datasource.mixins.d.ts.map +1 -0
- package/dist/dts/datasource/datasource.types.d.ts +14 -22
- package/dist/dts/datasource/datasource.types.d.ts.map +1 -1
- package/dist/dts/datasource/entityDatasource.d.ts +5 -8
- package/dist/dts/datasource/entityDatasource.d.ts.map +1 -1
- package/dist/dts/datasource/index.d.ts +2 -0
- package/dist/dts/datasource/index.d.ts.map +1 -1
- package/dist/dts/index.d.ts +1 -0
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/dts/resources/genesis/config.d.ts +81 -0
- package/dist/dts/resources/genesis/config.d.ts.map +1 -0
- package/dist/dts/resources/genesis/genesis.d.ts +69 -0
- package/dist/dts/resources/genesis/genesis.d.ts.map +1 -0
- package/dist/dts/resources/genesis/index.d.ts +4 -0
- package/dist/dts/resources/genesis/index.d.ts.map +1 -0
- package/dist/dts/resources/genesis/types.d.ts +19 -0
- package/dist/dts/resources/genesis/types.d.ts.map +1 -0
- package/dist/dts/resources/index.d.ts +2 -0
- package/dist/dts/resources/index.d.ts.map +1 -0
- package/dist/dts/testing/mocks/auth/auth.d.ts +3 -0
- package/dist/dts/testing/mocks/auth/auth.d.ts.map +1 -1
- package/dist/dts/testing/mocks/connect/connect.d.ts +3 -2
- package/dist/dts/testing/mocks/connect/connect.d.ts.map +1 -1
- package/dist/dts/testing/mocks/connect/socket.d.ts +1 -0
- package/dist/dts/testing/mocks/connect/socket.d.ts.map +1 -1
- package/dist/dts/testing/mocks/datasource/datasource.d.ts +22 -4
- package/dist/dts/testing/mocks/datasource/datasource.d.ts.map +1 -1
- package/dist/dts/testing/mocks/index.d.ts +1 -0
- package/dist/dts/testing/mocks/index.d.ts.map +1 -1
- package/dist/dts/testing/mocks/resources/genesis/genesis.d.ts +16 -0
- package/dist/dts/testing/mocks/resources/genesis/genesis.d.ts.map +1 -0
- package/dist/dts/testing/mocks/resources/genesis/index.d.ts +2 -0
- package/dist/dts/testing/mocks/resources/genesis/index.d.ts.map +1 -0
- package/dist/dts/testing/mocks/resources/index.d.ts +2 -0
- package/dist/dts/testing/mocks/resources/index.d.ts.map +1 -0
- package/dist/esm/connect/connect.js +12 -15
- package/dist/esm/connect/http.connect.js +5 -3
- package/dist/esm/connect/message.js +2 -0
- package/dist/esm/connect/socket.js +19 -6
- package/dist/esm/datasource/datasource.config.js +41 -0
- package/dist/esm/datasource/datasource.js +133 -58
- package/dist/esm/datasource/datasource.mixins.js +86 -0
- package/dist/esm/datasource/datasource.types.js +2 -18
- package/dist/esm/datasource/entityDatasource.js +6 -0
- package/dist/esm/datasource/index.js +2 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/resources/genesis/config.js +51 -0
- package/dist/esm/resources/genesis/genesis.js +114 -0
- package/dist/esm/resources/genesis/index.js +3 -0
- package/dist/esm/resources/genesis/types.js +4 -0
- package/dist/esm/resources/index.js +1 -0
- package/dist/esm/testing/mocks/auth/auth.js +10 -0
- package/dist/esm/testing/mocks/connect/connect.js +9 -2
- package/dist/esm/testing/mocks/connect/socket.js +2 -0
- package/dist/esm/testing/mocks/datasource/datasource.js +59 -0
- package/dist/esm/testing/mocks/index.js +1 -0
- package/dist/esm/testing/mocks/resources/genesis/genesis.js +25 -0
- package/dist/esm/testing/mocks/resources/genesis/index.js +1 -0
- package/dist/esm/testing/mocks/resources/index.js +1 -0
- package/dist/foundation-comms.api.json +11047 -6292
- package/dist/foundation-comms.d.ts +696 -37
- package/docs/api/foundation-comms.connect.connect.md +2 -2
- package/docs/api/foundation-comms.connect.getavailableresources.md +2 -2
- package/docs/api/foundation-comms.connect.host.md +11 -0
- package/docs/api/foundation-comms.connect.md +1 -0
- package/docs/api/foundation-comms.datasource.init.md +2 -2
- package/docs/api/foundation-comms.datasource.md +3 -2
- package/docs/api/{foundation-comms.datasource.fieldmetadata.md → foundation-comms.datasource.status.md} +3 -4
- package/docs/api/foundation-comms.datasourceconfig.eventemitter.md +18 -0
- package/docs/api/foundation-comms.datasourceconfig.md +2 -1
- package/docs/api/foundation-comms.datasourceeventhandler.md +353 -0
- package/docs/api/foundation-comms.datasourcemetadata.availableindexes.md +11 -0
- package/docs/api/foundation-comms.datasourcemetadata.fetchmetadatarequired.md +11 -0
- package/docs/api/foundation-comms.datasourcemetadata.fieldmetadata.md +11 -0
- package/docs/api/foundation-comms.datasourcemetadata.md +24 -0
- package/docs/api/foundation-comms.datasourcemetadata.originalfielddef.md +11 -0
- package/docs/api/foundation-comms.datasourcemetadata.requestfields.md +11 -0
- package/docs/api/foundation-comms.datasourcestatus.md +21 -0
- package/docs/api/foundation-comms.datasourcestatuschanged.md +13 -0
- package/docs/api/foundation-comms.datasourcestatuschangedevent.md +15 -0
- package/docs/api/foundation-comms.defaultconnect.connect.md +2 -2
- package/docs/api/foundation-comms.defaultconnect.getavailableresources.md +2 -2
- package/docs/api/foundation-comms.defaultconnect.host.md +11 -0
- package/docs/api/foundation-comms.defaultconnect.md +1 -0
- package/docs/api/foundation-comms.defaultdatasource._constructor_.md +3 -2
- package/docs/api/foundation-comms.defaultdatasource.availableindexes.md +2 -1
- package/docs/api/foundation-comms.defaultdatasource.fetchandapplymetadata.md +22 -0
- package/docs/api/{foundation-comms.defaultdatasource._stream.md → foundation-comms.defaultdatasource.fetchmetadatarequired.md} +4 -3
- package/docs/api/foundation-comms.defaultdatasource.fieldmetadata.md +1 -0
- package/docs/api/foundation-comms.defaultdatasource.initialized.md +3 -1
- package/docs/api/foundation-comms.defaultdatasource.md +10 -7
- package/docs/api/foundation-comms.defaultdatasource.originalfielddef.md +2 -1
- package/docs/api/foundation-comms.defaultdatasource.requestfields.md +2 -1
- package/docs/api/foundation-comms.defaultdatasource.resources.md +11 -0
- package/docs/api/foundation-comms.defaultdatasource.status.md +12 -0
- package/docs/api/foundation-comms.defaultdatasource.stream.md +1 -1
- package/docs/api/foundation-comms.defaultdatasource.validresourcename.md +5 -0
- package/docs/api/foundation-comms.defaultdatasourceconfig.md +1 -1
- package/docs/api/foundation-comms.defaultgenesisresources._constructor_.md +21 -0
- package/docs/api/foundation-comms.defaultgenesisresources.config.md +11 -0
- package/docs/api/foundation-comms.defaultgenesisresources.connect.md +11 -0
- package/docs/api/foundation-comms.defaultgenesisresources.destroy.md +17 -0
- package/docs/api/foundation-comms.defaultgenesisresources.getresources.md +15 -0
- package/docs/api/foundation-comms.defaultgenesisresources.getresourcetypefor.md +24 -0
- package/docs/api/foundation-comms.defaultgenesisresources.isvalidresource.md +24 -0
- package/docs/api/foundation-comms.defaultgenesisresources.md +40 -0
- package/docs/api/foundation-comms.defaultgenesisresources.postloadedmessage.md +15 -0
- package/docs/api/foundation-comms.defaultgenesisresources.resources.md +11 -0
- package/docs/api/foundation-comms.defaultgenesisresources.resourcespromise.md +11 -0
- package/docs/api/foundation-comms.defaultgenesisresourcesconfig.md +13 -0
- package/docs/api/foundation-comms.defaulthttpconnect.getavailableresources.md +2 -2
- package/docs/api/foundation-comms.defaultsocket._constructor_.md +2 -1
- package/docs/api/foundation-comms.defaultsocket.config.md +11 -0
- package/docs/api/foundation-comms.defaultsocket.connect.md +2 -2
- package/docs/api/foundation-comms.defaultsocket.host.md +11 -0
- package/docs/api/foundation-comms.defaultsocket.md +3 -1
- package/docs/api/foundation-comms.eventmessagetype.md +2 -0
- package/docs/api/foundation-comms.genesisresources.destroy.md +13 -0
- package/docs/api/foundation-comms.genesisresources.getresourcetypefor.md +13 -0
- package/docs/api/foundation-comms.genesisresources.isvalidresource.md +13 -0
- package/docs/api/foundation-comms.genesisresources.md +26 -0
- package/docs/api/foundation-comms.genesisresourceschannel.md +33 -0
- package/docs/api/foundation-comms.genesisresourceschannelid.md +12 -0
- package/docs/api/foundation-comms.genesisresourcesconfig.md +21 -0
- package/docs/api/foundation-comms.genesisresourcesconfig.throwwhenunavailable.md +13 -0
- package/docs/api/foundation-comms.genesisresourcesconfig.throwwhenunknown.md +13 -0
- package/docs/api/foundation-comms.genesisresourcesevents.md +17 -0
- package/docs/api/foundation-comms.genesisresourcesmock.destroy.md +15 -0
- package/docs/api/foundation-comms.genesisresourcesmock.getresourcetypefor.md +24 -0
- package/docs/api/foundation-comms.genesisresourcesmock.isvalidresource.md +24 -0
- package/docs/api/foundation-comms.genesisresourcesmock.md +30 -0
- package/docs/api/foundation-comms.genesisresourcesmock.nextisvalidresourceresponse.md +11 -0
- package/docs/api/foundation-comms.genesisresourcesmock.nextresourcetypeforresponse.md +11 -0
- package/docs/api/foundation-comms.genesisresourcesmock.resources.md +11 -0
- package/docs/api/foundation-comms.getgenesisresources.md +30 -0
- package/docs/api/foundation-comms.getgenesisresourceschannel.md +39 -0
- package/docs/api/foundation-comms.md +19 -2
- package/docs/api/foundation-comms.resourceitem.md +15 -0
- package/docs/api/foundation-comms.resourcesmessage.md +18 -0
- package/docs/api/foundation-comms.socket.host.md +11 -0
- package/docs/api/foundation-comms.socket.md +6 -0
- package/docs/api-report.md +550 -25
- package/package.json +13 -12
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [GenesisResources](./foundation-comms.genesisresources.md) > [isValidResource](./foundation-comms.genesisresources.isvalidresource.md)
|
|
4
|
+
|
|
5
|
+
## GenesisResources.isValidResource property
|
|
6
|
+
|
|
7
|
+
Checks if the resource exists
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
isValidResource: (resourceName: string) => Promise<boolean>;
|
|
13
|
+
```
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [GenesisResources](./foundation-comms.genesisresources.md)
|
|
4
|
+
|
|
5
|
+
## GenesisResources interface
|
|
6
|
+
|
|
7
|
+
GenesisResources DI interface.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export interface GenesisResources
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Remarks
|
|
16
|
+
|
|
17
|
+
A lazy shared Genesis Resources lookup system. N number of callers can request information in succession, but only the first will invoke the server request, and each caller will receive their results when that returns.
|
|
18
|
+
|
|
19
|
+
## Properties
|
|
20
|
+
|
|
21
|
+
| Property | Modifiers | Type | Description |
|
|
22
|
+
| --- | --- | --- | --- |
|
|
23
|
+
| [destroy](./foundation-comms.genesisresources.destroy.md) | | () => void | Destroy and garbage collect |
|
|
24
|
+
| [getResourceTypeFor](./foundation-comms.genesisresources.getresourcetypefor.md) | | (resourceName: string) => Promise<[ResourceType](./foundation-comms.resourcetype.md)<!-- -->> | Gets the type of resource |
|
|
25
|
+
| [isValidResource](./foundation-comms.genesisresources.isvalidresource.md) | | (resourceName: string) => Promise<boolean> | Checks if the resource exists |
|
|
26
|
+
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [GenesisResourcesChannel](./foundation-comms.genesisresourceschannel.md)
|
|
4
|
+
|
|
5
|
+
## GenesisResourcesChannel interface
|
|
6
|
+
|
|
7
|
+
GenesisResourcesChannel DI interface.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export interface GenesisResourcesChannel extends TypedBroadcastChannel<GenesisResourcesEvents>
|
|
13
|
+
```
|
|
14
|
+
**Extends:** TypedBroadcastChannel<[GenesisResourcesEvents](./foundation-comms.genesisresourcesevents.md)<!-- -->>
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
import { GenesisResourcesChannel } from '@genesislcap/foundation-comms';
|
|
21
|
+
...
|
|
22
|
+
@GenesisResourcesChannel protected channel: GenesisResourcesChannel;
|
|
23
|
+
...
|
|
24
|
+
this.channel.onmessage = (e) => {
|
|
25
|
+
if (this.channel.isMessageType('resources-loaded', e)) {
|
|
26
|
+
logger.debug('resources-loaded', e.data.detail);
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
...
|
|
31
|
+
this.channel.close();
|
|
32
|
+
```
|
|
33
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [GenesisResourcesChannelId](./foundation-comms.genesisresourceschannelid.md)
|
|
4
|
+
|
|
5
|
+
## GenesisResourcesChannelId variable
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
**Signature:**
|
|
9
|
+
|
|
10
|
+
```typescript
|
|
11
|
+
GenesisResourcesChannelId = "genesis-resources"
|
|
12
|
+
```
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [GenesisResourcesConfig](./foundation-comms.genesisresourcesconfig.md)
|
|
4
|
+
|
|
5
|
+
## GenesisResourcesConfig interface
|
|
6
|
+
|
|
7
|
+
GenesisResourcesConfig DI interface.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export interface GenesisResourcesConfig
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Properties
|
|
16
|
+
|
|
17
|
+
| Property | Modifiers | Type | Description |
|
|
18
|
+
| --- | --- | --- | --- |
|
|
19
|
+
| [throwWhenUnavailable?](./foundation-comms.genesisresourcesconfig.throwwhenunavailable.md) | | boolean | _(Optional)_ Treat unavailable/empty genesis resource sets as fatal errors. |
|
|
20
|
+
| [throwWhenUnknown?](./foundation-comms.genesisresourcesconfig.throwwhenunknown.md) | | boolean | _(Optional)_ Treat unknown resources as fatal errors. |
|
|
21
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [GenesisResourcesConfig](./foundation-comms.genesisresourcesconfig.md) > [throwWhenUnavailable](./foundation-comms.genesisresourcesconfig.throwwhenunavailable.md)
|
|
4
|
+
|
|
5
|
+
## GenesisResourcesConfig.throwWhenUnavailable property
|
|
6
|
+
|
|
7
|
+
Treat unavailable/empty genesis resource sets as fatal errors.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
throwWhenUnavailable?: boolean;
|
|
13
|
+
```
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [GenesisResourcesConfig](./foundation-comms.genesisresourcesconfig.md) > [throwWhenUnknown](./foundation-comms.genesisresourcesconfig.throwwhenunknown.md)
|
|
4
|
+
|
|
5
|
+
## GenesisResourcesConfig.throwWhenUnknown property
|
|
6
|
+
|
|
7
|
+
Treat unknown resources as fatal errors.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
throwWhenUnknown?: boolean;
|
|
13
|
+
```
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [GenesisResourcesEvents](./foundation-comms.genesisresourcesevents.md)
|
|
4
|
+
|
|
5
|
+
## GenesisResourcesEvents type
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
**Signature:**
|
|
9
|
+
|
|
10
|
+
```typescript
|
|
11
|
+
export type GenesisResourcesEvents = {
|
|
12
|
+
'resources-loaded': ResourceItem[];
|
|
13
|
+
'resources-unloaded': void;
|
|
14
|
+
};
|
|
15
|
+
```
|
|
16
|
+
**References:** [ResourceItem](./foundation-comms.resourceitem.md)
|
|
17
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [GenesisResourcesMock](./foundation-comms.genesisresourcesmock.md) > [destroy](./foundation-comms.genesisresourcesmock.destroy.md)
|
|
4
|
+
|
|
5
|
+
## GenesisResourcesMock.destroy() method
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
destroy(): void;
|
|
11
|
+
```
|
|
12
|
+
**Returns:**
|
|
13
|
+
|
|
14
|
+
void
|
|
15
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [GenesisResourcesMock](./foundation-comms.genesisresourcesmock.md) > [getResourceTypeFor](./foundation-comms.genesisresourcesmock.getresourcetypefor.md)
|
|
4
|
+
|
|
5
|
+
## GenesisResourcesMock.getResourceTypeFor() method
|
|
6
|
+
|
|
7
|
+
Gets the type of resource
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
getResourceTypeFor(resourceName: string): Promise<ResourceType>;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| resourceName | string | The name of the resource to get the type for. |
|
|
20
|
+
|
|
21
|
+
**Returns:**
|
|
22
|
+
|
|
23
|
+
Promise<[ResourceType](./foundation-comms.resourcetype.md)<!-- -->>
|
|
24
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [GenesisResourcesMock](./foundation-comms.genesisresourcesmock.md) > [isValidResource](./foundation-comms.genesisresourcesmock.isvalidresource.md)
|
|
4
|
+
|
|
5
|
+
## GenesisResourcesMock.isValidResource() method
|
|
6
|
+
|
|
7
|
+
Checks if the resource exists
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
isValidResource(resourceName: string): Promise<boolean>;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| resourceName | string | The name of the resource to check. |
|
|
20
|
+
|
|
21
|
+
**Returns:**
|
|
22
|
+
|
|
23
|
+
Promise<boolean>
|
|
24
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [GenesisResourcesMock](./foundation-comms.genesisresourcesmock.md)
|
|
4
|
+
|
|
5
|
+
## GenesisResourcesMock class
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
**Signature:**
|
|
9
|
+
|
|
10
|
+
```typescript
|
|
11
|
+
export declare class GenesisResourcesMock implements GenesisResources
|
|
12
|
+
```
|
|
13
|
+
**Implements:** [GenesisResources](./foundation-comms.genesisresources.md)
|
|
14
|
+
|
|
15
|
+
## Properties
|
|
16
|
+
|
|
17
|
+
| Property | Modifiers | Type | Description |
|
|
18
|
+
| --- | --- | --- | --- |
|
|
19
|
+
| [nextIsValidResourceResponse](./foundation-comms.genesisresourcesmock.nextisvalidresourceresponse.md) | | boolean | |
|
|
20
|
+
| [nextResourceTypeForResponse](./foundation-comms.genesisresourcesmock.nextresourcetypeforresponse.md) | | [ResourceType](./foundation-comms.resourcetype.md) | |
|
|
21
|
+
| [resources](./foundation-comms.genesisresourcesmock.resources.md) | | [ResourceItem](./foundation-comms.resourceitem.md)<!-- -->\[\] | |
|
|
22
|
+
|
|
23
|
+
## Methods
|
|
24
|
+
|
|
25
|
+
| Method | Modifiers | Description |
|
|
26
|
+
| --- | --- | --- |
|
|
27
|
+
| [destroy()](./foundation-comms.genesisresourcesmock.destroy.md) | | |
|
|
28
|
+
| [getResourceTypeFor(resourceName)](./foundation-comms.genesisresourcesmock.getresourcetypefor.md) | | Gets the type of resource |
|
|
29
|
+
| [isValidResource(resourceName)](./foundation-comms.genesisresourcesmock.isvalidresource.md) | | Checks if the resource exists |
|
|
30
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [GenesisResourcesMock](./foundation-comms.genesisresourcesmock.md) > [nextIsValidResourceResponse](./foundation-comms.genesisresourcesmock.nextisvalidresourceresponse.md)
|
|
4
|
+
|
|
5
|
+
## GenesisResourcesMock.nextIsValidResourceResponse property
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
nextIsValidResourceResponse: boolean;
|
|
11
|
+
```
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [GenesisResourcesMock](./foundation-comms.genesisresourcesmock.md) > [nextResourceTypeForResponse](./foundation-comms.genesisresourcesmock.nextresourcetypeforresponse.md)
|
|
4
|
+
|
|
5
|
+
## GenesisResourcesMock.nextResourceTypeForResponse property
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
nextResourceTypeForResponse: ResourceType;
|
|
11
|
+
```
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [GenesisResourcesMock](./foundation-comms.genesisresourcesmock.md) > [resources](./foundation-comms.genesisresourcesmock.resources.md)
|
|
4
|
+
|
|
5
|
+
## GenesisResourcesMock.resources property
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
resources: ResourceItem[];
|
|
11
|
+
```
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [getGenesisResources](./foundation-comms.getgenesisresources.md)
|
|
4
|
+
|
|
5
|
+
## getGenesisResources() function
|
|
6
|
+
|
|
7
|
+
Gets GenesisResources from the DI container.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare function getGenesisResources(): GenesisResources;
|
|
13
|
+
```
|
|
14
|
+
**Returns:**
|
|
15
|
+
|
|
16
|
+
[GenesisResources](./foundation-comms.genesisresources.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 { getGenesisResources } from '@genesislcap/foundation-comms';
|
|
27
|
+
...
|
|
28
|
+
const genesisResources = getGenesisResources();
|
|
29
|
+
```
|
|
30
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [getGenesisResourcesChannel](./foundation-comms.getgenesisresourceschannel.md)
|
|
4
|
+
|
|
5
|
+
## getGenesisResourcesChannel() function
|
|
6
|
+
|
|
7
|
+
Gets GenesisResourcesChannel from the DI container.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare function getGenesisResourcesChannel(): GenesisResourcesChannel;
|
|
13
|
+
```
|
|
14
|
+
**Returns:**
|
|
15
|
+
|
|
16
|
+
[GenesisResourcesChannel](./foundation-comms.genesisresourceschannel.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 { getGenesisResourcesChannel } from '@genesislcap/foundation-comms';
|
|
27
|
+
...
|
|
28
|
+
const channel = getGenesisResourcesChannel();
|
|
29
|
+
...
|
|
30
|
+
channel.onmessage = (e) => {
|
|
31
|
+
if (channel.isMessageType('resources-loaded', e)) {
|
|
32
|
+
logger.debug('resources-loaded', e.data.detail);
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
...
|
|
37
|
+
channel.close();
|
|
38
|
+
```
|
|
39
|
+
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
| [DefaultCredentialManager](./foundation-comms.defaultcredentialmanager.md) | The default implementation for the CredentialManager interface. |
|
|
18
18
|
| [DefaultDatasource](./foundation-comms.defaultdatasource.md) | The default implementation for the Datasource interface. |
|
|
19
19
|
| [DefaultFoundationAnalytics](./foundation-comms.defaultfoundationanalytics.md) | The default implementation for the FoundationAnalytics interface. |
|
|
20
|
+
| [DefaultGenesisResources](./foundation-comms.defaultgenesisresources.md) | Default GenesisResources implementation. |
|
|
20
21
|
| [DefaultHttp](./foundation-comms.defaulthttp.md) | The default implementation of the Http interface. |
|
|
21
22
|
| [DefaultHttpConnect](./foundation-comms.defaulthttpconnect.md) | The default implementation for the Connect interface (HTTP-only). |
|
|
22
23
|
| [DefaultMessageBuilder](./foundation-comms.defaultmessagebuilder.md) | Default MessageBuilder implementation. |
|
|
@@ -25,6 +26,7 @@
|
|
|
25
26
|
| [DefaultSession](./foundation-comms.defaultsession.md) | The default implementation for the Session interface. |
|
|
26
27
|
| [DefaultSocket](./foundation-comms.defaultsocket.md) | Default Socket implementation. |
|
|
27
28
|
| [DefaultSocketStatus](./foundation-comms.defaultsocketstatus.md) | Default SocketStatus implementation. |
|
|
29
|
+
| [GenesisResourcesMock](./foundation-comms.genesisresourcesmock.md) | |
|
|
28
30
|
| [SocketMessageHandler](./foundation-comms.socketmessagehandler.md) | The Socket message handler definition. |
|
|
29
31
|
| [SocketObservable](./foundation-comms.socketobservable.md) | Observable that wraps a WebSocketSubject and provides an Observable interface for sending and receiving messages. |
|
|
30
32
|
| [SocketSubject](./foundation-comms.socketsubject.md) | Subject that wraps a WebSocketSubject and provides a Subject interface for sending and receiving messages. |
|
|
@@ -50,6 +52,8 @@
|
|
|
50
52
|
| [dataServerResultFilter(result, rowId)](./foundation-comms.dataserverresultfilter.md) | Data server result filter. |
|
|
51
53
|
| [getConnect()](./foundation-comms.getconnect.md) | Get Connect from the DI container. |
|
|
52
54
|
| [getDatasource()](./foundation-comms.getdatasource.md) | Get Datasource from the DI container. |
|
|
55
|
+
| [getGenesisResources()](./foundation-comms.getgenesisresources.md) | Gets GenesisResources from the DI container. |
|
|
56
|
+
| [getGenesisResourcesChannel()](./foundation-comms.getgenesisresourceschannel.md) | Gets GenesisResourcesChannel from the DI container. |
|
|
53
57
|
| [getKVStorage()](./foundation-comms.getkvstorage.md) | Gets KVStorage from the DI container. |
|
|
54
58
|
| [getNetworkMonitor()](./foundation-comms.getnetworkmonitor.md) | Gets NetworkMonitor from the DI container. |
|
|
55
59
|
| [getSocket()](./foundation-comms.getsocket.md) | Gets Socket from the DI container. |
|
|
@@ -70,11 +74,15 @@
|
|
|
70
74
|
| [CredentialManagerConfig](./foundation-comms.credentialmanagerconfig.md) | The configuration for the CredentialManager |
|
|
71
75
|
| [CredentialManagerCookieConfig](./foundation-comms.credentialmanagercookieconfig.md) | The configuration options for the CredentialManager cookie |
|
|
72
76
|
| [Datasource](./foundation-comms.datasource.md) | Datasource interface. |
|
|
73
|
-
| [DatasourceConfig](./foundation-comms.datasourceconfig.md) |
|
|
77
|
+
| [DatasourceConfig](./foundation-comms.datasourceconfig.md) | DatasourceConfig DI interface. |
|
|
78
|
+
| [DatasourceMetadata](./foundation-comms.datasourcemetadata.md) | DatasourceMetadata interface. |
|
|
74
79
|
| [DatasourceOptions](./foundation-comms.datasourceoptions.md) | Options that can be passed when initializing a datasource. |
|
|
75
80
|
| [DataUpdate](./foundation-comms.dataupdate.md) | Data Update definition with details of what data to add, drop, and/or modify. |
|
|
76
81
|
| [Dataview](./foundation-comms.dataview.md) | Dataview object |
|
|
77
82
|
| [FoundationAnalytics](./foundation-comms.foundationanalytics.md) | Represents an analytics tracking system. |
|
|
83
|
+
| [GenesisResources](./foundation-comms.genesisresources.md) | GenesisResources DI interface. |
|
|
84
|
+
| [GenesisResourcesChannel](./foundation-comms.genesisresourceschannel.md) | GenesisResourcesChannel DI interface. |
|
|
85
|
+
| [GenesisResourcesConfig](./foundation-comms.genesisresourcesconfig.md) | GenesisResourcesConfig DI interface. |
|
|
78
86
|
| [Http](./foundation-comms.http.md) | An interface representing an HTTP client that can make GET and POST requests and return a promise with the response data. |
|
|
79
87
|
| [HttpRequestInit](./foundation-comms.httprequestinit.md) | The options object used when making an HTTP request. |
|
|
80
88
|
| [JsonSchemaCache](./foundation-comms.jsonschemacache.md) | A JSON schema cache definition |
|
|
@@ -105,13 +113,17 @@
|
|
|
105
113
|
| --- | --- |
|
|
106
114
|
| [CommitEventType](./foundation-comms.commiteventtype.md) | |
|
|
107
115
|
| [credentialSeparator](./foundation-comms.credentialseparator.md) | The default separator used for splitting credential parts. |
|
|
116
|
+
| [DatasourceEventHandler](./foundation-comms.datasourceeventhandler.md) | Datasource event handler mixin for target classes that use or are interested in datasource status changes. |
|
|
117
|
+
| [DatasourceStatusChanged](./foundation-comms.datasourcestatuschanged.md) | DatasourceStatusChanged. |
|
|
108
118
|
| [defaultConnectConfig](./foundation-comms.defaultconnectconfig.md) | The default configuration for connecting to a WS service. |
|
|
109
119
|
| [defaultCredentialManagerConfig](./foundation-comms.defaultcredentialmanagerconfig.md) | The default configuration for the CredentialManager service. |
|
|
110
120
|
| [defaultCredentialRequestOptions](./foundation-comms.defaultcredentialrequestoptions.md) | The default request options for the CredentialManager service. |
|
|
111
|
-
| [defaultDatasourceConfig](./foundation-comms.defaultdatasourceconfig.md) |
|
|
121
|
+
| [defaultDatasourceConfig](./foundation-comms.defaultdatasourceconfig.md) | Default DatasourceConfig DI implementation. |
|
|
122
|
+
| [defaultGenesisResourcesConfig](./foundation-comms.defaultgenesisresourcesconfig.md) | Default GenesisResourcesConfig implementation. |
|
|
112
123
|
| [defaultNetworkMonitorConfig](./foundation-comms.defaultnetworkmonitorconfig.md) | Default NetworkMonitorConfig DI implementation. |
|
|
113
124
|
| [exponentialScheduler](./foundation-comms.exponentialscheduler.md) | Expontential Interval scheduler for reconnect |
|
|
114
125
|
| [extractFieldDefinitions](./foundation-comms.extractfielddefinitions.md) | Extracts the field definitions from the metadata. |
|
|
126
|
+
| [GenesisResourcesChannelId](./foundation-comms.genesisresourceschannelid.md) | |
|
|
115
127
|
| [isWebSocketExpression](./foundation-comms.iswebsocketexpression.md) | Regular Expression to test valid WebSocket (wss and ws) hosts |
|
|
116
128
|
| [linearScheduler](./foundation-comms.linearscheduler.md) | Linear Interval scheduler for reconnect |
|
|
117
129
|
| [logger](./foundation-comms.logger.md) | Logger for the foundation-comms package |
|
|
@@ -140,9 +152,12 @@
|
|
|
140
152
|
| [CommitParams](./foundation-comms.commitparams.md) | Parameters for a COMMIT message |
|
|
141
153
|
| [ConnectionStatus](./foundation-comms.connectionstatus.md) | The connection status of the Genesis client. |
|
|
142
154
|
| [CredentialData\_2](./foundation-comms.credentialdata_2.md) | Represents user credentials. |
|
|
155
|
+
| [DatasourceStatus](./foundation-comms.datasourcestatus.md) | DatasourceStatus. |
|
|
156
|
+
| [DatasourceStatusChangedEvent](./foundation-comms.datasourcestatuschangedevent.md) | DatasourceStatusChangedEvent. |
|
|
143
157
|
| [FieldMetadata](./foundation-comms.fieldmetadata.md) | Field Metadata definition. |
|
|
144
158
|
| [FilteredDataServerResult](./foundation-comms.filtereddataserverresult.md) | Fitlered result after initial DATASERVER data fetch. |
|
|
145
159
|
| [GenesisConnectEvents](./foundation-comms.genesisconnectevents.md) | Genesis connect events that can be monitored to invoke resource checking. |
|
|
160
|
+
| [GenesisResourcesEvents](./foundation-comms.genesisresourcesevents.md) | |
|
|
146
161
|
| [GetCredentialOptions](./foundation-comms.getcredentialoptions.md) | Represents options for retrieving credentials. |
|
|
147
162
|
| [IndexDetail](./foundation-comms.indexdetail.md) | Index Detail definition. |
|
|
148
163
|
| [JwtAuthInfo](./foundation-comms.jwtauthinfo.md) | Represents JWT authentication information. |
|
|
@@ -165,6 +180,8 @@
|
|
|
165
180
|
| [RequestParams](./foundation-comms.requestparams.md) | Parameters for a REQUEST message |
|
|
166
181
|
| [RequestServerResult](./foundation-comms.requestserverresult.md) | Raw result from a REQUEST\_SERVER data fetch. |
|
|
167
182
|
| [ResourceHealth](./foundation-comms.resourcehealth.md) | ResourceHealth. |
|
|
183
|
+
| [ResourceItem](./foundation-comms.resourceitem.md) | |
|
|
184
|
+
| [ResourcesMessage](./foundation-comms.resourcesmessage.md) | |
|
|
168
185
|
| [RowData](./foundation-comms.rowdata.md) | Row Data definition. |
|
|
169
186
|
| [SchemaResponse](./foundation-comms.schemaresponse.md) | Schema Response definition. |
|
|
170
187
|
| [ServerRow](./foundation-comms.serverrow.md) | Server Row definition. |
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [ResourceItem](./foundation-comms.resourceitem.md)
|
|
4
|
+
|
|
5
|
+
## ResourceItem type
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
**Signature:**
|
|
9
|
+
|
|
10
|
+
```typescript
|
|
11
|
+
export type ResourceItem = {
|
|
12
|
+
RESOURCE_NAME: string;
|
|
13
|
+
RESOURCE_TYPE: string;
|
|
14
|
+
};
|
|
15
|
+
```
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [ResourcesMessage](./foundation-comms.resourcesmessage.md)
|
|
4
|
+
|
|
5
|
+
## ResourcesMessage type
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
**Signature:**
|
|
9
|
+
|
|
10
|
+
```typescript
|
|
11
|
+
export type ResourcesMessage = {
|
|
12
|
+
MESSAGE_TYPE: EventMessageType.RESOURCES_REQUEST_ACK | EventMessageType.RESOURCES_REQUEST_NACK | MessageType.MSG_NACK;
|
|
13
|
+
SOURCE_REF: string;
|
|
14
|
+
RESOURCES: ResourceItem[];
|
|
15
|
+
};
|
|
16
|
+
```
|
|
17
|
+
**References:** [EventMessageType.RESOURCES\_REQUEST\_ACK](./foundation-comms.eventmessagetype.md)<!-- -->, [EventMessageType.RESOURCES\_REQUEST\_NACK](./foundation-comms.eventmessagetype.md)<!-- -->, [MessageType.MSG\_NACK](./foundation-comms.messagetype.md)<!-- -->, [ResourceItem](./foundation-comms.resourceitem.md)
|
|
18
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [Socket](./foundation-comms.socket.md) > [host](./foundation-comms.socket.host.md)
|
|
4
|
+
|
|
5
|
+
## Socket.host property
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
host: string;
|
|
11
|
+
```
|
|
@@ -13,6 +13,12 @@ export interface Socket extends Omit<SocketStatus, 'serialize' | 'onClose' | 're
|
|
|
13
13
|
```
|
|
14
14
|
**Extends:** Omit<[SocketStatus](./foundation-comms.socketstatus.md)<!-- -->, 'serialize' \| 'onClose' \| 'reconnectionLimitReached' \| 'closedCode' \| 'closedReason' \| 'closedClean'>
|
|
15
15
|
|
|
16
|
+
## Properties
|
|
17
|
+
|
|
18
|
+
| Property | Modifiers | Type | Description |
|
|
19
|
+
| --- | --- | --- | --- |
|
|
20
|
+
| [host](./foundation-comms.socket.host.md) | | string | |
|
|
21
|
+
|
|
16
22
|
## Methods
|
|
17
23
|
|
|
18
24
|
| Method | Description |
|