@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
@@ -3,7 +3,7 @@ import type { Metadata, SchemaResponse } from '../metadata';
|
|
3
3
|
import { MetaCache } from '../metadata';
|
4
4
|
import { ConnectEventsEmitter } from './connect.events';
|
5
5
|
import { ConnectConfig } from './connect.types';
|
6
|
-
import { CommitParams, Message, MessageBuilder, RequestParams } from './message';
|
6
|
+
import { CommitParams, Message, MessageBuilder, RequestParams, ResourcesMessage } from './message';
|
7
7
|
import type { SocketObservable } from './socket';
|
8
8
|
import { Socket } from './socket';
|
9
9
|
/**
|
@@ -51,10 +51,10 @@ export interface Connect {
|
|
51
51
|
/**
|
52
52
|
* Connects to a server at the specified host.
|
53
53
|
* @public
|
54
|
-
* @param host - The host to connect to.
|
54
|
+
* @param host - The host to connect to. Defaults to {@link @genesislcap/foundation-utils#GENESIS_SOCKET_URL | GENESIS_SOCKET_URL}.
|
55
55
|
* @returns A promise that resolves with a boolean indicating whether the connection was successful.
|
56
56
|
*/
|
57
|
-
connect(host
|
57
|
+
connect(host?: string): Promise<boolean>;
|
58
58
|
/**
|
59
59
|
* Disconnects from the server.
|
60
60
|
* @public
|
@@ -156,7 +156,7 @@ export interface Connect {
|
|
156
156
|
* @param params - An object containing optional parameters to include in the request.
|
157
157
|
* @returns A promise that resolves to a Message containing the server's response with available resources.
|
158
158
|
*/
|
159
|
-
getAvailableResources(params?: RequestParams): Promise<
|
159
|
+
getAvailableResources(params?: RequestParams): Promise<ResourcesMessage>;
|
160
160
|
/**
|
161
161
|
* Sends a request to the server to retrieve data or perform an action.
|
162
162
|
* @public
|
@@ -165,6 +165,10 @@ export interface Connect {
|
|
165
165
|
* @returns A promise that resolves to a Message containing the server's response.
|
166
166
|
*/
|
167
167
|
commitEvent(eventName: string, params?: CommitParams): Promise<Message>;
|
168
|
+
/**
|
169
|
+
* @returns The host provided.
|
170
|
+
*/
|
171
|
+
host: string;
|
168
172
|
}
|
169
173
|
/**
|
170
174
|
* The default implementation for the Connect interface (WS-only).
|
@@ -180,6 +184,7 @@ export declare class DefaultConnect implements Connect {
|
|
180
184
|
get isConnected(): boolean;
|
181
185
|
get isConnectedSubject(): BehaviorSubject<boolean>;
|
182
186
|
get isConnected$(): Observable<boolean>;
|
187
|
+
get host(): string;
|
183
188
|
constructor(socket: Socket, messageBuilder: MessageBuilder, metaCache: MetaCache, events: ConnectEventsEmitter, config: ConnectConfig);
|
184
189
|
httpMode(): boolean;
|
185
190
|
/**
|
@@ -187,7 +192,7 @@ export declare class DefaultConnect implements Connect {
|
|
187
192
|
*/
|
188
193
|
setValidSession(valid: boolean): void;
|
189
194
|
send<T>(message: Message<any>, needsHandling?: boolean): Promise<any>;
|
190
|
-
connect(host
|
195
|
+
connect(host?: string): Promise<boolean>;
|
191
196
|
disconnect(): void;
|
192
197
|
snapshot(resourceName: string, params?: any): Promise<Message>;
|
193
198
|
stream(resourceName: string, onMessage: Function, onError: Function, params?: any): SocketObservable<Message>;
|
@@ -199,7 +204,7 @@ export declare class DefaultConnect implements Connect {
|
|
199
204
|
getMetadata(resourceName: string, useCache?: boolean): Promise<Metadata>;
|
200
205
|
getJSONSchema(resourceName: string, useCache?: boolean): Promise<SchemaResponse>;
|
201
206
|
request(resourceName: string, params?: RequestParams): Promise<Message>;
|
202
|
-
getAvailableResources(params?: any): Promise<
|
207
|
+
getAvailableResources(params?: any): Promise<ResourcesMessage>;
|
203
208
|
commitEvent(eventName: string, params?: CommitParams): Promise<Message>;
|
204
209
|
}
|
205
210
|
/**
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../../../src/connect/connect.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAQ,MAAM,MAAM,CAAC;AACzD,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,
|
1
|
+
{"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../../../src/connect/connect.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAQ,MAAM,MAAM,CAAC;AACzD,OAAO,KAAK,EAAE,Q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
import type { Connect } from './connect';
|
7
7
|
import { Http } from './http';
|
8
8
|
import { HttpConnectConfig } from './http.connect.types';
|
9
|
-
import { CommitParams, Message, MessageBuilder, RequestParams } from './message';
|
9
|
+
import { CommitParams, Message, MessageBuilder, RequestParams, ResourcesMessage } from './message';
|
10
10
|
import { SocketObservable } from './socket';
|
11
11
|
/**
|
12
12
|
* The default implementation for the Connect interface (HTTP-only).
|
@@ -56,7 +56,7 @@ export declare class DefaultHttpConnect implements Connect {
|
|
56
56
|
getMetadata(resourceName: string, useCache?: boolean): Promise<Metadata>;
|
57
57
|
getJSONSchema(resourceName: string): Promise<SchemaResponse>;
|
58
58
|
request(resourceName: string, params?: RequestParams): Promise<Message>;
|
59
|
-
getAvailableResources(params?: any): Promise<
|
59
|
+
getAvailableResources(params?: any): Promise<ResourcesMessage>;
|
60
60
|
commitEvent(eventName: string, params?: CommitParams): Promise<Message>;
|
61
61
|
private maybeTurbo;
|
62
62
|
private updateIntervals;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"http.connect.d.ts","sourceRoot":"","sources":["../../../src/connect/http.connect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAG/D,OAAO,EACL,eAAe,EAKf,UAAU,EAIX,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EACL,YAAY,EAEZ,OAAO,EACP,cAAc,EAGd,aAAa,
|
1
|
+
{"version":3,"file":"http.connect.d.ts","sour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Q,GAAE,OAAc,GAAG,OAAO,CAAC,QAAQ,CAAC;IAU9E,aAAa,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAYlE,OAAO,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC;IASxE,qBAAqB,CAAC,MAAM,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,gBAAgB,CAAC;IASvD,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC;IAYpF,OAAO,CAAC,UAAU;IAkDlB,OAAO,CAAC,eAAe;IAOvB,OAAO,CAAC,8BAA8B;IAmBtC,OAAO,CAAC,MAAM,CAAC,OAAO;IAItB,OAAO,CAAC,MAAM,CAAC,MAAM;CAUtB;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW,+DAAsE,CAAC"}
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { UUID } from '@genesislcap/foundation-utils';
|
2
2
|
import { AuthInfo, LoginResult } from '../auth/auth.types';
|
3
|
+
import type { ResourceItem } from '../resources/genesis/types';
|
3
4
|
import { Session } from '../session';
|
4
5
|
/**
|
5
6
|
* General Message types
|
@@ -35,6 +36,8 @@ export declare enum EventMessageType {
|
|
35
36
|
META_REQUEST = "META_REQUEST",
|
36
37
|
JSON_SCHEMA_REQUEST = "JSON_SCHEMA_REQUEST",
|
37
38
|
RESOURCES_REQUEST = "RESOURCES_REQUEST",
|
39
|
+
RESOURCES_REQUEST_ACK = "RESOURCES_REQUEST_ACK",
|
40
|
+
RESOURCES_REQUEST_NACK = "RESOURCES_REQUEST_NACK",
|
38
41
|
EVENT_CHANGE_USER_PASSWORD = "EVENT_CHANGE_USER_PASSWORD",
|
39
42
|
EVENT_SELF_SERVICE_PASSWORD_RESET = "EVENT_SELF_SERVICE_PASSWORD_RESET",
|
40
43
|
EVENT_PASSWORD_RESET_ACTION = "EVENT_PASSWORD_RESET_ACTION"
|
@@ -247,6 +250,14 @@ export type PongMessage = Pick<Message, 'MESSAGE_TYPE' | 'SOURCE_REF' | 'USER_NA
|
|
247
250
|
LAST_SENT?: number;
|
248
251
|
RESOURCES?: Record<string, RESOURCE_DETAILS[]>;
|
249
252
|
};
|
253
|
+
/**
|
254
|
+
* @public
|
255
|
+
*/
|
256
|
+
export type ResourcesMessage = {
|
257
|
+
MESSAGE_TYPE: EventMessageType.RESOURCES_REQUEST_ACK | EventMessageType.RESOURCES_REQUEST_NACK | MessageType.MSG_NACK;
|
258
|
+
SOURCE_REF: string;
|
259
|
+
RESOURCES: ResourceItem[];
|
260
|
+
};
|
250
261
|
/**
|
251
262
|
* Parameters for a REQUEST message
|
252
263
|
* @public
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../src/connect/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAErD,OAAO,EAAE,QAAQ,EAAY,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC;;;GAGG;AACH,oBAAY,WAAW;IACrB,SAAS,cAAc;IACvB,UAAU,eAAe;IAEzB,UAAU,eAAe;IACzB,WAAW,gBAAgB;IAE3B,cAAc,mBAAmB;IACjC,cAAc,mBAAmB;IAEjC,SAAS,cAAc;IACvB,YAAY,iBAAiB;IAC7B,gBAAgB,qBAAqB;IAErC,OAAO,YAAY;IACnB,QAAQ,aAAa;IAErB,UAAU,eAAe;IACzB,WAAW,gBAAgB;IAE3B,YAAY,iBAAiB;CAC9B;AAED;;;GAGG;AACH,oBAAY,gBAAgB;IAC1B,gBAAgB,qBAAqB;IACrC,oBAAoB,yBAAyB;IAC7C,qBAAqB,0BAA0B;IAE/C,YAAY,iBAAiB;IAC7B,UAAU,eAAe;IACzB,WAAW,gBAAgB;IAE3B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AC,cAAc,CAAC,WAAW,CAAC;IAW/B,mBAAmB,CAAC,CAAC,GAAG,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,CAAC,CAAC;IASlF,yBAAyB,IAAI,OAAO,CAAC,cAAc,CAAC,YAAY,CAAC;IAYjE,2BAA2B,CAChC,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,cAAc,CAAC,cAAc,CAAC;IAYlC,2BAA2B,CAChC,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,SAAS,GAAE,MAAiB,GAC3B,OAAO,CAAC,cAAc,CAAC,cAAc,CAAC;IAYlC,gCAAgC,CACrC,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,EACnB,SAAS,GAAE,MAAiB,GAC3B,OAAO,CAAC,cAAc,CAAC,mBAAmB,CAAC;IAavC,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO;IAWjD,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO;IAOpD,4BAA4B,CACjC,OAAO,EAAE,OAAO,EAChB,WAAW,GAAE,MAA0C,GACtD,WAAW;IAed,8DAA8D;IACvD,0BAA0B,CAAC,OAAO,UAAQ,GAAG,WAAW;CAShE;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,sEAE1B,CAAC"}
|
@@ -2,6 +2,7 @@ import { User } from '@genesislcap/foundation-user';
|
|
2
2
|
import { JSONSerializer, UUID } from '@genesislcap/foundation-utils';
|
3
3
|
import { Observable, Subject, Subscription } from 'rxjs';
|
4
4
|
import { Session } from '../session';
|
5
|
+
import { ConnectConfig } from './connect.types';
|
5
6
|
import { Message, MessageBuilder } from './message';
|
6
7
|
import { SocketReconnectOptions } from './reconnectStrategy';
|
7
8
|
import { SocketStatus } from './socket.status';
|
@@ -93,6 +94,7 @@ export interface Socket extends Omit<SocketStatus, 'serialize' | 'onClose' | 're
|
|
93
94
|
*/
|
94
95
|
sendForStreamWithoutTeardown<T>(message: Message<T | any>, onMessage: Function, onError: Function): Observable<Message>;
|
95
96
|
socketMessages(): SocketSubject<Message>;
|
97
|
+
host: string;
|
96
98
|
}
|
97
99
|
/**
|
98
100
|
* Default Socket implementation.
|
@@ -108,6 +110,7 @@ export declare class DefaultSocket implements Socket {
|
|
108
110
|
* Temp putting the user in place to bridge the hasValidSession logic.
|
109
111
|
*/
|
110
112
|
protected user: User;
|
113
|
+
protected config: ConnectConfig;
|
111
114
|
private readonly defaultInterval;
|
112
115
|
private readonly secondsMultiplier;
|
113
116
|
private websocket;
|
@@ -123,6 +126,7 @@ export declare class DefaultSocket implements Socket {
|
|
123
126
|
/** {@inheritDoc SerializedSocketStatus.hasValidSession} */
|
124
127
|
get hasValidSession(): boolean;
|
125
128
|
set hasValidSession(value: boolean);
|
129
|
+
get host(): string;
|
126
130
|
private heartbeatIsEnabled;
|
127
131
|
private heartbeatInterval;
|
128
132
|
private heartbeatTicker;
|
@@ -134,10 +138,10 @@ export declare class DefaultSocket implements Socket {
|
|
134
138
|
/**
|
135
139
|
* Temp putting the user in place to bridge the hasValidSession logic.
|
136
140
|
*/
|
137
|
-
user: User);
|
141
|
+
user: User, config: ConnectConfig);
|
138
142
|
private get heartbeatLoggingIsEnabled();
|
139
143
|
private get messageLoggingIsEnabled();
|
140
|
-
connect(host
|
144
|
+
connect(host?: string, connectOptions?: SocketConnectOptions, reconnectOptions?: SocketReconnectOptions): Promise<boolean>;
|
141
145
|
private prepareHeartbeat;
|
142
146
|
private reconnect;
|
143
147
|
reset(): void;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"socket.d.ts","sourceRoot":"","sources":["../../../src/connect/socket.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACpD,OAAO,
|
1
|
+
{"version":3,"file":"soc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CxB,OAAO,CAAC,SAAS;IAsEV,KAAK,IAAI,IAAI;IAQpB,OAAO,CAAC,aAAa;IAMd,IAAI,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,GAAG,GAAG,CAAC,EAAE,aAAa,UAAO,GAAG,OAAO,CAAC,OAAO,GAAG,GAAG,CAAC;IAyBhF,aAAa,CAAC,CAAC,EACpB,OAAO,EAAE,OAAO,CAAC,CAAC,GAAG,GAAG,CAAC,EACzB,SAAS,EAAE,QAAQ,EACnB,OAAO,EAAE,QAAQ,EACjB,UAAU,CAAC,EAAE,QAAQ,GACpB,UAAU,CAAC,OAAO,CAAC;IAgDf,4BAA4B,CAAC,CAAC,EACnC,OAAO,EAAE,OAAO,CAAC,CAAC,GAAG,GAAG,CAAC,EACzB,SAAS,EAAE,QAAQ,EACnB,OAAO,EAAE,QAAQ,GAChB,UAAU,CAAC,OAAO,CAAC;IAcf,cAAc,QAAO,cAAc,OAAO,CAAC,CAAoB;IAEtE,OAAO,CAAC,iBAAiB;IAezB,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,oBAAoB;IAI5B,OAAO,CAAC,iBAAiB;IAUzB,OAAO,CAAC,kBAAkB;CAkB3B;AAED;;;GAGG;AACH,eAAO,MAAM,MAAM,8DAAgE,CAAC;AAEpF;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,SAAS,IAAI,MAAM,CAElC"}
|
@@ -0,0 +1,44 @@
|
|
1
|
+
import type { FilteredDataServerResult, RawDataServerResult } from '../metadata';
|
2
|
+
import type { DatasourceOptions } from './datasource.types';
|
3
|
+
/**
|
4
|
+
* Default values for a DatasourceConfig
|
5
|
+
* @public
|
6
|
+
*/
|
7
|
+
export declare class DatasourceDefaults {
|
8
|
+
static readonly MAX_ROWS_250 = 250;
|
9
|
+
static readonly MAX_VIEW_1000 = 1000;
|
10
|
+
static readonly REQ_REP_POLLING_INTERVAL_MS = 10000;
|
11
|
+
static readonly DATASERVER_ROW_ID = "ROW_REF";
|
12
|
+
static readonly REQUEST_SERVER_ROW_ID = "RECORD_ID";
|
13
|
+
}
|
14
|
+
/**
|
15
|
+
* DatasourceConfig DI interface.
|
16
|
+
*
|
17
|
+
* @public
|
18
|
+
*/
|
19
|
+
export interface DatasourceConfig {
|
20
|
+
/**
|
21
|
+
* The element to emit events from.
|
22
|
+
*
|
23
|
+
* @remarks
|
24
|
+
* If omitted the document is used.
|
25
|
+
*/
|
26
|
+
eventEmitter?: HTMLElement;
|
27
|
+
options: DatasourceOptions;
|
28
|
+
criteriaToFields(filters: string): Record<string, string>;
|
29
|
+
dataServerResultFilter(result: RawDataServerResult, rowId?: string): FilteredDataServerResult;
|
30
|
+
}
|
31
|
+
/**
|
32
|
+
* Default DatasourceConfig DI implementation.
|
33
|
+
* @public
|
34
|
+
*/
|
35
|
+
export declare const defaultDatasourceConfig: DatasourceConfig;
|
36
|
+
/**
|
37
|
+
* DatasourceConfig DI key.
|
38
|
+
*
|
39
|
+
* @internal
|
40
|
+
* @privateRemarks
|
41
|
+
* Marked as internal to stop api-extractor becoming confused cross-linking tokens with the same name.
|
42
|
+
*/
|
43
|
+
export declare const DatasourceConfig: import("@microsoft/fast-foundation").InterfaceSymbol<DatasourceConfig>;
|
44
|
+
//# sourceMappingURL=datasource.config.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"datasource.config.d.ts","sourceRoot":"","sources":["../../../src/datasource/datasource.config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAGjF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE5D;;;GAGG;AACH,qBAAa,kBAAkB;IAC7B,MAAM,CAAC,QAAQ,CAAC,YAAY,OAAO;IACnC,MAAM,CAAC,QAAQ,CAAC,aAAa,QAAQ;IACrC,MAAM,CAAC,QAAQ,CAAC,2BAA2B,SAAS;IACpD,MAAM,CAAC,QAAQ,CAAC,iBAAiB,aAAa;IAC9C,MAAM,CAAC,QAAQ,CAAC,qBAAqB,eAAe;CACrD;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;;OAKG;IACH,YAAY,CAAC,EAAE,WAAW,CAAC;IAC3B,OAAO,EAAE,iBAAiB,CAAC;IAC3B,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1D,sBAAsB,CAAC,MAAM,EAAE,mBAAmB,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,wBAAwB,CAAC;CAC/F;AAED;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,gBAcrC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,wEAE5B,CAAC"}
|
@@ -1,30 +1,37 @@
|
|
1
1
|
import { Auth } from '../auth';
|
2
2
|
import { Connect, Message, SocketObservable } from '../connect';
|
3
3
|
import type { FieldMetadata, FilteredDataServerResult, IndexDetail, MetadataDetail, RequestServerResult } from '../metadata/metadata.types';
|
4
|
-
import
|
5
|
-
import { DatasourceConfig
|
4
|
+
import { GenesisResources } from '../resources';
|
5
|
+
import { DatasourceConfig } from './datasource.config';
|
6
|
+
import type { DatasourceOptions, DatasourceStatus, Dataview } from './datasource.types';
|
7
|
+
import { ResourceType } from './datasource.types';
|
6
8
|
/**
|
7
|
-
*
|
9
|
+
* DatasourceMetadata interface.
|
8
10
|
* @public
|
9
11
|
*/
|
10
|
-
export
|
12
|
+
export interface DatasourceMetadata {
|
13
|
+
fetchMetadataRequired: boolean;
|
14
|
+
readonly availableIndexes: IndexDetail[];
|
15
|
+
readonly originalFieldDef: MetadataDetail[];
|
16
|
+
readonly fieldMetadata: FieldMetadata[];
|
17
|
+
readonly requestFields: MetadataDetail[];
|
18
|
+
}
|
11
19
|
/**
|
12
20
|
* Datasource interface.
|
13
21
|
* @public
|
14
22
|
* @remarks
|
15
23
|
* The public interface available on the injected store fragment.
|
16
24
|
*/
|
17
|
-
export interface Datasource {
|
25
|
+
export interface Datasource extends DatasourceMetadata {
|
18
26
|
/**
|
19
|
-
* Indicates whether the datasource has been initialized.
|
20
27
|
* @public
|
21
28
|
*/
|
22
|
-
|
29
|
+
status: Partial<DatasourceStatus>;
|
23
30
|
/**
|
24
|
-
*
|
31
|
+
* Indicates whether the datasource has been initialized.
|
25
32
|
* @public
|
26
33
|
*/
|
27
|
-
|
34
|
+
initialized: boolean;
|
28
35
|
/**
|
29
36
|
* Indicates whether the datasource is read-only.
|
30
37
|
* TODO: Should have is prefix
|
@@ -50,10 +57,10 @@ export interface Datasource {
|
|
50
57
|
* Initializes the datasource with the given options and fetches metadata if specified.
|
51
58
|
* @public
|
52
59
|
* @param options - The options to initialize the datasource with.
|
53
|
-
* @param fetchMeta -
|
60
|
+
* @param fetchMeta - Optional flag to fetch metadata for the datasource. Defaults to true.
|
54
61
|
* @returns A promise that resolves with a boolean indicating whether the initialization was successful.
|
55
62
|
*/
|
56
|
-
init(options: DatasourceOptions, fetchMeta
|
63
|
+
init(options: DatasourceOptions, fetchMeta?: boolean): Promise<boolean>;
|
57
64
|
/**
|
58
65
|
* Deinitializes the datasource.
|
59
66
|
* @remarks This should be called to clean up any resources when the datasource is no longer needed.
|
@@ -158,29 +165,52 @@ export interface Datasource {
|
|
158
165
|
export declare class DefaultDatasource implements Datasource {
|
159
166
|
protected connect: Connect;
|
160
167
|
protected auth: Auth;
|
168
|
+
protected resources: GenesisResources;
|
161
169
|
protected config: DatasourceConfig;
|
162
|
-
|
170
|
+
/**
|
171
|
+
* {@inheritDoc Datasource.status}
|
172
|
+
*/
|
173
|
+
status: DatasourceStatus;
|
174
|
+
/** {@inheritDoc DatasourceMetadata.fetchMetadataRequired} */
|
175
|
+
fetchMetadataRequired: boolean;
|
176
|
+
/** {@inheritDoc DatasourceMetadata.originalFieldDef} */
|
177
|
+
originalFieldDef: MetadataDetail[];
|
178
|
+
/** {@inheritDoc DatasourceMetadata.fieldMetadata} */
|
179
|
+
fieldMetadata: FieldMetadata[];
|
180
|
+
/** {@inheritDoc DatasourceMetadata.requestFields} */
|
181
|
+
requestFields: MetadataDetail[];
|
182
|
+
/** {@inheritDoc DatasourceMetadata.availableIndexes} */
|
183
|
+
availableIndexes: IndexDetail[];
|
184
|
+
/** {@inheritDoc Datasource.initialized} */
|
185
|
+
get initialized(): boolean;
|
163
186
|
readOnly: boolean;
|
164
187
|
protected options: DatasourceOptions;
|
165
188
|
resourceType: ResourceType;
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
constructor(connect: Connect, auth: Auth, config?: DatasourceConfig);
|
189
|
+
stream: SocketObservable<FilteredDataServerResult | RequestServerResult>;
|
190
|
+
constructor(connect: Connect, auth: Auth, resources: GenesisResources, config: DatasourceConfig);
|
191
|
+
/**
|
192
|
+
* @deprecated - Please use {@link (GenesisResources:interface).isValidResource} instead.
|
193
|
+
*/
|
172
194
|
validResourceName(resourceName: string): boolean;
|
173
195
|
init(options: DatasourceOptions, fetchMeta?: boolean): Promise<boolean>;
|
174
196
|
deinit(): void;
|
175
197
|
/** {@inheritDoc Datasource.destroy} */
|
176
198
|
destroy(): void;
|
177
|
-
get stream(): SocketObservable<FilteredDataServerResult | RequestServerResult>;
|
178
199
|
get params(): any;
|
179
200
|
snapshot(): Promise<Message>;
|
180
201
|
snapshotFiltered(rowId?: string): Promise<any[]>;
|
181
202
|
private createStream;
|
182
203
|
private createDataserverStream;
|
183
204
|
private createReqRepStream;
|
205
|
+
protected fetchAndApplyMetadata(resourceName: string): Promise<void>;
|
206
|
+
/**
|
207
|
+
* @internal
|
208
|
+
*/
|
209
|
+
protected reportStatus(detail?: Partial<DatasourceStatus>): void;
|
210
|
+
/**
|
211
|
+
* @internal
|
212
|
+
*/
|
213
|
+
protected normaliseStatus(status: Partial<DatasourceStatus>): DatasourceStatus;
|
184
214
|
}
|
185
215
|
/**
|
186
216
|
* The DI token for the Datasource interface.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"datasource.d.ts","sourceRoot":"","sources":["../../../src/datasource/datasource.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,KAAK,EACV,aAAa,EACb,wBAAwB,EACxB,WAAW,EACX,cAAc,EAEd,mBAAmB,EACpB,MAAM,4BAA4B,CAAC;
|
1
|
+
{"version":3,"file":"datasource.d.ts","sourceRoot":"","sources":["../../../src/datasource/datasource.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,KAAK,EACV,aAAa,EACb,wBAAwB,EACxB,WAAW,EACX,cAAc,EAEd,mBAAmB,EACpB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACxF,OAAO,EAA2B,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAE3E;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,qBAAqB,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,gBAAgB,EAAE,WAAW,EAAE,CAAC;IACzC,QAAQ,CAAC,gBAAgB,EAAE,cAAc,EAAE,CAAC;IAC5C,QAAQ,CAAC,aAAa,EAAE,aAAa,EAAE,CAAC;IACxC,QAAQ,CAAC,aAAa,EAAE,cAAc,EAAE,CAAC;CAC1C;AAED;;;;;GAKG;AACH,MAAM,WAAW,UAAW,SAAQ,kBAAkB;IACpD;;O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