@genesislcap/foundation-comms 14.187.1-alpha-3406925.0 → 14.187.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/dts/connect/connect.d.ts +6 -11
- 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 +0 -11
- package/dist/dts/connect/message.d.ts.map +1 -1
- package/dist/dts/connect/socket.d.ts +2 -6
- package/dist/dts/connect/socket.d.ts.map +1 -1
- package/dist/dts/datasource/datasource.d.ts +19 -49
- package/dist/dts/datasource/datasource.d.ts.map +1 -1
- package/dist/dts/datasource/datasource.types.d.ts +22 -14
- package/dist/dts/datasource/datasource.types.d.ts.map +1 -1
- package/dist/dts/datasource/entityDatasource.d.ts +8 -5
- package/dist/dts/datasource/entityDatasource.d.ts.map +1 -1
- package/dist/dts/datasource/index.d.ts +0 -2
- package/dist/dts/datasource/index.d.ts.map +1 -1
- package/dist/dts/index.d.ts +0 -1
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/dts/testing/mocks/auth/auth.d.ts +0 -3
- package/dist/dts/testing/mocks/auth/auth.d.ts.map +1 -1
- package/dist/dts/testing/mocks/connect/connect.d.ts +2 -3
- package/dist/dts/testing/mocks/connect/connect.d.ts.map +1 -1
- package/dist/dts/testing/mocks/connect/socket.d.ts +0 -1
- package/dist/dts/testing/mocks/connect/socket.d.ts.map +1 -1
- package/dist/dts/testing/mocks/datasource/datasource.d.ts +4 -22
- package/dist/dts/testing/mocks/datasource/datasource.d.ts.map +1 -1
- package/dist/dts/testing/mocks/index.d.ts +0 -1
- package/dist/dts/testing/mocks/index.d.ts.map +1 -1
- package/dist/esm/connect/connect.js +15 -12
- package/dist/esm/connect/http.connect.js +3 -5
- package/dist/esm/connect/message.js +0 -2
- package/dist/esm/connect/socket.js +6 -19
- package/dist/esm/datasource/datasource.js +58 -133
- package/dist/esm/datasource/datasource.types.js +18 -2
- package/dist/esm/datasource/entityDatasource.js +0 -6
- package/dist/esm/datasource/index.js +0 -2
- package/dist/esm/index.js +0 -1
- package/dist/esm/testing/mocks/auth/auth.js +0 -10
- package/dist/esm/testing/mocks/connect/connect.js +2 -9
- package/dist/esm/testing/mocks/connect/socket.js +0 -2
- package/dist/esm/testing/mocks/datasource/datasource.js +0 -59
- package/dist/esm/testing/mocks/index.js +0 -1
- package/dist/foundation-comms.api.json +6042 -10797
- package/dist/foundation-comms.d.ts +37 -696
- 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.md +0 -1
- package/docs/api/{foundation-comms.datasource.status.md → foundation-comms.datasource.fieldmetadata.md} +4 -3
- package/docs/api/foundation-comms.datasource.init.md +2 -2
- package/docs/api/foundation-comms.datasource.md +2 -3
- package/docs/api/foundation-comms.datasourceconfig.md +1 -2
- 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.md +0 -1
- package/docs/api/foundation-comms.defaultdatasource._constructor_.md +2 -3
- package/docs/api/{foundation-comms.defaultdatasource.fetchmetadatarequired.md → foundation-comms.defaultdatasource._stream.md} +3 -4
- package/docs/api/foundation-comms.defaultdatasource.availableindexes.md +1 -2
- package/docs/api/foundation-comms.defaultdatasource.fieldmetadata.md +0 -1
- package/docs/api/foundation-comms.defaultdatasource.initialized.md +1 -3
- package/docs/api/foundation-comms.defaultdatasource.md +7 -10
- package/docs/api/foundation-comms.defaultdatasource.originalfielddef.md +1 -2
- package/docs/api/foundation-comms.defaultdatasource.requestfields.md +1 -2
- package/docs/api/foundation-comms.defaultdatasource.stream.md +1 -1
- package/docs/api/foundation-comms.defaultdatasource.validresourcename.md +0 -5
- package/docs/api/foundation-comms.defaultdatasourceconfig.md +1 -1
- package/docs/api/foundation-comms.defaulthttpconnect.getavailableresources.md +2 -2
- package/docs/api/foundation-comms.defaultsocket._constructor_.md +1 -2
- package/docs/api/foundation-comms.defaultsocket.connect.md +2 -2
- package/docs/api/foundation-comms.defaultsocket.md +1 -3
- package/docs/api/foundation-comms.eventmessagetype.md +0 -2
- package/docs/api/foundation-comms.md +2 -19
- package/docs/api/foundation-comms.socket.md +0 -6
- package/docs/api-report.md +25 -550
- package/package.json +12 -13
- package/dist/dts/datasource/datasource.config.d.ts +0 -44
- package/dist/dts/datasource/datasource.config.d.ts.map +0 -1
- package/dist/dts/datasource/datasource.mixins.d.ts +0 -367
- package/dist/dts/datasource/datasource.mixins.d.ts.map +0 -1
- package/dist/dts/resources/genesis/config.d.ts +0 -81
- package/dist/dts/resources/genesis/config.d.ts.map +0 -1
- package/dist/dts/resources/genesis/genesis.d.ts +0 -69
- package/dist/dts/resources/genesis/genesis.d.ts.map +0 -1
- package/dist/dts/resources/genesis/index.d.ts +0 -4
- package/dist/dts/resources/genesis/index.d.ts.map +0 -1
- package/dist/dts/resources/genesis/types.d.ts +0 -19
- package/dist/dts/resources/genesis/types.d.ts.map +0 -1
- package/dist/dts/resources/index.d.ts +0 -2
- package/dist/dts/resources/index.d.ts.map +0 -1
- package/dist/dts/testing/mocks/resources/genesis/genesis.d.ts +0 -16
- package/dist/dts/testing/mocks/resources/genesis/genesis.d.ts.map +0 -1
- package/dist/dts/testing/mocks/resources/genesis/index.d.ts +0 -2
- package/dist/dts/testing/mocks/resources/genesis/index.d.ts.map +0 -1
- package/dist/dts/testing/mocks/resources/index.d.ts +0 -2
- package/dist/dts/testing/mocks/resources/index.d.ts.map +0 -1
- package/dist/esm/datasource/datasource.config.js +0 -41
- package/dist/esm/datasource/datasource.mixins.js +0 -86
- package/dist/esm/resources/genesis/config.js +0 -51
- package/dist/esm/resources/genesis/genesis.js +0 -114
- package/dist/esm/resources/genesis/index.js +0 -3
- package/dist/esm/resources/genesis/types.js +0 -4
- package/dist/esm/resources/index.js +0 -1
- package/dist/esm/testing/mocks/resources/genesis/genesis.js +0 -25
- package/dist/esm/testing/mocks/resources/genesis/index.js +0 -1
- package/dist/esm/testing/mocks/resources/index.js +0 -1
- package/docs/api/foundation-comms.connect.host.md +0 -11
- package/docs/api/foundation-comms.datasourceconfig.eventemitter.md +0 -18
- package/docs/api/foundation-comms.datasourceeventhandler.md +0 -353
- package/docs/api/foundation-comms.datasourcemetadata.availableindexes.md +0 -11
- package/docs/api/foundation-comms.datasourcemetadata.fetchmetadatarequired.md +0 -11
- package/docs/api/foundation-comms.datasourcemetadata.fieldmetadata.md +0 -11
- package/docs/api/foundation-comms.datasourcemetadata.md +0 -24
- package/docs/api/foundation-comms.datasourcemetadata.originalfielddef.md +0 -11
- package/docs/api/foundation-comms.datasourcemetadata.requestfields.md +0 -11
- package/docs/api/foundation-comms.datasourcestatus.md +0 -21
- package/docs/api/foundation-comms.datasourcestatuschanged.md +0 -13
- package/docs/api/foundation-comms.datasourcestatuschangedevent.md +0 -15
- package/docs/api/foundation-comms.defaultconnect.host.md +0 -11
- package/docs/api/foundation-comms.defaultdatasource.fetchandapplymetadata.md +0 -22
- package/docs/api/foundation-comms.defaultdatasource.resources.md +0 -11
- package/docs/api/foundation-comms.defaultdatasource.status.md +0 -12
- package/docs/api/foundation-comms.defaultgenesisresources._constructor_.md +0 -21
- package/docs/api/foundation-comms.defaultgenesisresources.config.md +0 -11
- package/docs/api/foundation-comms.defaultgenesisresources.connect.md +0 -11
- package/docs/api/foundation-comms.defaultgenesisresources.destroy.md +0 -17
- package/docs/api/foundation-comms.defaultgenesisresources.getresources.md +0 -15
- package/docs/api/foundation-comms.defaultgenesisresources.getresourcetypefor.md +0 -24
- package/docs/api/foundation-comms.defaultgenesisresources.isvalidresource.md +0 -24
- package/docs/api/foundation-comms.defaultgenesisresources.md +0 -40
- package/docs/api/foundation-comms.defaultgenesisresources.postloadedmessage.md +0 -15
- package/docs/api/foundation-comms.defaultgenesisresources.resources.md +0 -11
- package/docs/api/foundation-comms.defaultgenesisresources.resourcespromise.md +0 -11
- package/docs/api/foundation-comms.defaultgenesisresourcesconfig.md +0 -13
- package/docs/api/foundation-comms.defaultsocket.config.md +0 -11
- package/docs/api/foundation-comms.defaultsocket.host.md +0 -11
- package/docs/api/foundation-comms.genesisresources.destroy.md +0 -13
- package/docs/api/foundation-comms.genesisresources.getresourcetypefor.md +0 -13
- package/docs/api/foundation-comms.genesisresources.isvalidresource.md +0 -13
- package/docs/api/foundation-comms.genesisresources.md +0 -26
- package/docs/api/foundation-comms.genesisresourceschannel.md +0 -33
- package/docs/api/foundation-comms.genesisresourceschannelid.md +0 -12
- package/docs/api/foundation-comms.genesisresourcesconfig.md +0 -21
- package/docs/api/foundation-comms.genesisresourcesconfig.throwwhenunavailable.md +0 -13
- package/docs/api/foundation-comms.genesisresourcesconfig.throwwhenunknown.md +0 -13
- package/docs/api/foundation-comms.genesisresourcesevents.md +0 -17
- package/docs/api/foundation-comms.genesisresourcesmock.destroy.md +0 -15
- package/docs/api/foundation-comms.genesisresourcesmock.getresourcetypefor.md +0 -24
- package/docs/api/foundation-comms.genesisresourcesmock.isvalidresource.md +0 -24
- package/docs/api/foundation-comms.genesisresourcesmock.md +0 -30
- package/docs/api/foundation-comms.genesisresourcesmock.nextisvalidresourceresponse.md +0 -11
- package/docs/api/foundation-comms.genesisresourcesmock.nextresourcetypeforresponse.md +0 -11
- package/docs/api/foundation-comms.genesisresourcesmock.resources.md +0 -11
- package/docs/api/foundation-comms.getgenesisresources.md +0 -30
- package/docs/api/foundation-comms.getgenesisresourceschannel.md +0 -39
- package/docs/api/foundation-comms.resourceitem.md +0 -15
- package/docs/api/foundation-comms.resourcesmessage.md +0 -18
- package/docs/api/foundation-comms.socket.host.md +0 -11
@@ -1,51 +1,10 @@
|
|
1
|
-
import { __decorate } from "tslib";
|
2
|
-
import { observable } from '@microsoft/fast-element';
|
3
|
-
import { from } from 'rxjs';
|
4
|
-
import { extractFieldDefinitions, toFieldMetadata, } from '../../../metadata';
|
5
1
|
/**
|
6
2
|
* @internal
|
7
3
|
*/
|
8
4
|
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
|
-
}
|
17
5
|
init(options, fetchMeta) {
|
18
6
|
return Promise.resolve(this.initialized);
|
19
7
|
}
|
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
|
-
}
|
49
8
|
deinit() { }
|
50
9
|
destroy() { }
|
51
10
|
validResourceName(resourceName) {
|
@@ -84,21 +43,3 @@ export class DatasourceMock {
|
|
84
43
|
return Promise.resolve();
|
85
44
|
}
|
86
45
|
}
|
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);
|