@genesislcap/foundation-comms 14.187.1 → 14.188.0
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -1,10 +1,51 @@
|
|
1
|
+
import { __decorate } from "tslib";
|
2
|
+
import { observable } from '@microsoft/fast-element';
|
3
|
+
import { from } from 'rxjs';
|
4
|
+
import { extractFieldDefinitions, toFieldMetadata, } from '../../../metadata';
|
1
5
|
/**
|
2
6
|
* @internal
|
3
7
|
*/
|
4
8
|
export class DatasourceMock {
|
9
|
+
constructor() {
|
10
|
+
this.fetchMetadataRequired = true;
|
11
|
+
this.fetchingMetadata = false;
|
12
|
+
this.originalFieldDef = [];
|
13
|
+
this.fieldMetadata = [];
|
14
|
+
this.requestFields = [];
|
15
|
+
this.availableIndexes = [];
|
16
|
+
}
|
5
17
|
init(options, fetchMeta) {
|
6
18
|
return Promise.resolve(this.initialized);
|
7
19
|
}
|
20
|
+
/**
|
21
|
+
* Convenience method to avoid you having to prime connect etc.
|
22
|
+
* @param meta - The metadata to set.
|
23
|
+
*/
|
24
|
+
setMetadata(meta) {
|
25
|
+
var _a;
|
26
|
+
this.availableIndexes = (_a = meta.INDEXES) !== null && _a !== void 0 ? _a : [];
|
27
|
+
this.originalFieldDef = extractFieldDefinitions(meta);
|
28
|
+
this.fieldMetadata = toFieldMetadata(this.originalFieldDef);
|
29
|
+
this.requestFields = meta.REQUEST_FIELD || [];
|
30
|
+
this.fetchMetadataRequired = false;
|
31
|
+
}
|
32
|
+
unsetMedata() {
|
33
|
+
this.availableIndexes = [];
|
34
|
+
this.originalFieldDef = [];
|
35
|
+
this.fieldMetadata = [];
|
36
|
+
this.requestFields = [];
|
37
|
+
this.fetchMetadataRequired = true;
|
38
|
+
}
|
39
|
+
/**
|
40
|
+
* Convenience method to avoid you having to prime connect etc.
|
41
|
+
* @param message - The Message to stream.
|
42
|
+
*/
|
43
|
+
setStream(message) {
|
44
|
+
this.stream = from(Promise.resolve(message));
|
45
|
+
}
|
46
|
+
unsetStream() {
|
47
|
+
this.stream = undefined;
|
48
|
+
}
|
8
49
|
deinit() { }
|
9
50
|
destroy() { }
|
10
51
|
validResourceName(resourceName) {
|
@@ -43,3 +84,21 @@ export class DatasourceMock {
|
|
43
84
|
return Promise.resolve();
|
44
85
|
}
|
45
86
|
}
|
87
|
+
__decorate([
|
88
|
+
observable
|
89
|
+
], DatasourceMock.prototype, "status", void 0);
|
90
|
+
__decorate([
|
91
|
+
observable
|
92
|
+
], DatasourceMock.prototype, "fetchMetadataRequired", void 0);
|
93
|
+
__decorate([
|
94
|
+
observable
|
95
|
+
], DatasourceMock.prototype, "originalFieldDef", void 0);
|
96
|
+
__decorate([
|
97
|
+
observable
|
98
|
+
], DatasourceMock.prototype, "fieldMetadata", void 0);
|
99
|
+
__decorate([
|
100
|
+
observable
|
101
|
+
], DatasourceMock.prototype, "requestFields", void 0);
|
102
|
+
__decorate([
|
103
|
+
observable
|
104
|
+
], DatasourceMock.prototype, "availableIndexes", void 0);
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { __awaiter } from "tslib";
|
2
|
+
import { ResourceType } from '../../../../datasource';
|
3
|
+
/**
|
4
|
+
* @public
|
5
|
+
*/
|
6
|
+
export class GenesisResourcesMock {
|
7
|
+
constructor() {
|
8
|
+
this.resources = [];
|
9
|
+
this.nextIsValidResourceResponse = true;
|
10
|
+
this.nextResourceTypeForResponse = ResourceType.DATASERVER;
|
11
|
+
}
|
12
|
+
/** {@inheritDoc GenesisResources.isValidResource} */
|
13
|
+
isValidResource(resourceName) {
|
14
|
+
return __awaiter(this, void 0, void 0, function* () {
|
15
|
+
return this.nextIsValidResourceResponse;
|
16
|
+
});
|
17
|
+
}
|
18
|
+
/** {@inheritDoc GenesisResources.getResourceTypeFor} */
|
19
|
+
getResourceTypeFor(resourceName) {
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
21
|
+
return this.nextResourceTypeForResponse;
|
22
|
+
});
|
23
|
+
}
|
24
|
+
destroy() { }
|
25
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './genesis';
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './genesis';
|