@genesislcap/foundation-comms 14.200.1-alpha-eb310c6.0 → 14.201.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 +3 -4
- package/dist/dts/connect/connect.d.ts.map +1 -1
- package/dist/dts/connect/message.d.ts +5 -14
- package/dist/dts/connect/message.d.ts.map +1 -1
- package/dist/dts/datasource/datasource.d.ts +16 -21
- package/dist/dts/datasource/datasource.d.ts.map +1 -1
- package/dist/dts/datasource/datasource.types.d.ts +17 -37
- package/dist/dts/datasource/datasource.types.d.ts.map +1 -1
- package/dist/dts/metadata/metadata.types.d.ts +1 -23
- package/dist/dts/metadata/metadata.types.d.ts.map +1 -1
- package/dist/dts/testing/mocks/datasource/datasource.d.ts +2 -4
- package/dist/dts/testing/mocks/datasource/datasource.d.ts.map +1 -1
- package/dist/esm/connect/connect.js +2 -2
- package/dist/esm/connect/message.js +1 -2
- package/dist/esm/datasource/datasource.js +32 -63
- package/dist/esm/metadata/metadata.utils.js +1 -2
- package/dist/esm/testing/mocks/datasource/datasource.js +2 -14
- package/dist/foundation-comms.api.json +93 -510
- package/dist/foundation-comms.d.ts +44 -105
- package/docs/api/foundation-comms.connect.getmorerows.md +2 -3
- package/docs/api/foundation-comms.connect.md +1 -1
- package/docs/api/{foundation-comms.datasource.startstream.md → foundation-comms.datasource.deinit.md} +9 -5
- package/docs/api/foundation-comms.datasource.destroy.md +1 -5
- package/docs/api/foundation-comms.datasource.init.md +1 -2
- package/docs/api/foundation-comms.datasource.md +4 -4
- package/docs/api/foundation-comms.datasource.snapshot.md +3 -3
- package/docs/api/foundation-comms.datasource.snapshotfiltered.md +2 -2
- package/docs/api/foundation-comms.datasource.validresourcename.md +0 -5
- package/docs/api/foundation-comms.datasourcemetadata.md +0 -1
- package/docs/api/foundation-comms.datasourceoptions.criteria.md +0 -5
- package/docs/api/foundation-comms.datasourceoptions.disablepolling.md +0 -5
- package/docs/api/foundation-comms.datasourceoptions.fields.md +0 -5
- package/docs/api/foundation-comms.datasourceoptions.maxrows.md +0 -5
- package/docs/api/foundation-comms.datasourceoptions.maxview.md +0 -5
- package/docs/api/foundation-comms.datasourceoptions.md +0 -2
- package/docs/api/foundation-comms.datasourceoptions.movingview.md +0 -5
- package/docs/api/foundation-comms.datasourceoptions.orderby.md +0 -5
- package/docs/api/foundation-comms.datasourceoptions.request.md +0 -5
- package/docs/api/foundation-comms.datasourceoptions.reverse.md +0 -5
- package/docs/api/foundation-comms.defaultconnect.getmorerows.md +1 -2
- package/docs/api/foundation-comms.defaultconnect.md +1 -1
- package/docs/api/{foundation-comms.defaultdatasource.startstream.md → foundation-comms.defaultdatasource.deinit.md} +4 -4
- package/docs/api/foundation-comms.defaultdatasource.destroy.md +1 -5
- package/docs/api/foundation-comms.defaultdatasource.init.md +1 -2
- package/docs/api/foundation-comms.defaultdatasource.md +4 -6
- package/docs/api/foundation-comms.defaultdatasource.snapshot.md +1 -8
- package/docs/api/foundation-comms.defaultmessagebuilder.createmorerowsmessage.md +2 -3
- package/docs/api/foundation-comms.defaultmessagebuilder.md +1 -1
- package/docs/api/foundation-comms.md +0 -2
- package/docs/api/foundation-comms.messagebuilder.createmorerowsmessage.md +3 -4
- package/docs/api/foundation-comms.messagebuilder.createrequestmessage.md +2 -2
- package/docs/api/foundation-comms.messagebuilder.md +1 -1
- package/docs/api/foundation-comms.messagedetails.morerows.md +0 -1
- package/docs/api/foundation-comms.metadata.md +2 -5
- package/docs/api/foundation-comms.metadatadetail.md +0 -3
- package/docs/api/foundation-comms.requestparams.md +1 -3
- package/docs/api/foundation-comms.requestserverresult.md +0 -5
- package/docs/api-report.md +17 -59
- package/package.json +13 -13
- package/docs/api/foundation-comms.datasourcemetadata.customrequestfields.md +0 -11
- package/docs/api/foundation-comms.datasourceoptions.requestautosetup.md +0 -18
- package/docs/api/foundation-comms.datasourceoptions.viewnumber.md +0 -18
- package/docs/api/foundation-comms.defaultdatasource.customrequestfields.md +0 -12
- package/docs/api/foundation-comms.defaultdatasource.startstreamrequired.md +0 -12
- package/docs/api/foundation-comms.replydetail.md +0 -21
- package/docs/api/foundation-comms.requestdetailsparam.md +0 -15
|
@@ -288,11 +288,10 @@ export declare interface Connect {
|
|
|
288
288
|
/**
|
|
289
289
|
* Requests additional rows of data for the specified source reference.
|
|
290
290
|
* @public
|
|
291
|
-
* @param sourceRef -
|
|
292
|
-
* @param viewNumber - The specific view number to request more rows for. Default: previous view number result + 1.
|
|
291
|
+
* @param sourceRef - The source reference to request more rows for.
|
|
293
292
|
* @returns A promise that resolves with the additional rows of data.
|
|
294
293
|
*/
|
|
295
|
-
getMoreRows(sourceRef: string
|
|
294
|
+
getMoreRows(sourceRef: string): Promise<Message>;
|
|
296
295
|
/**
|
|
297
296
|
* Requests additional columns for the specified source reference.
|
|
298
297
|
* @public
|
|
@@ -856,7 +855,6 @@ export declare interface Datasource extends DatasourceMetadata {
|
|
|
856
855
|
/**
|
|
857
856
|
* Indicates whether the resourceName is valid or not.
|
|
858
857
|
* @public
|
|
859
|
-
* @deprecated - Please use {@link (GenesisResources:interface).isValidResource} instead.
|
|
860
858
|
*/
|
|
861
859
|
validResourceName(resourceName: string): boolean;
|
|
862
860
|
/**
|
|
@@ -864,21 +862,15 @@ export declare interface Datasource extends DatasourceMetadata {
|
|
|
864
862
|
* @public
|
|
865
863
|
* @param options - The options to initialize the datasource with.
|
|
866
864
|
* @param fetchMeta - Optional flag to fetch metadata for the datasource. Defaults to true.
|
|
867
|
-
* @param startStream - Optional flag to start the data stream. Defaults to true.
|
|
868
865
|
* @returns A promise that resolves with a boolean indicating whether the initialization was successful.
|
|
869
866
|
*/
|
|
870
|
-
init(options: DatasourceOptions, fetchMeta?: boolean
|
|
871
|
-
/**
|
|
872
|
-
* Starts the data stream for the datasource.
|
|
873
|
-
* @public
|
|
874
|
-
*/
|
|
875
|
-
startStream(): Promise<void>;
|
|
867
|
+
init(options: DatasourceOptions, fetchMeta?: boolean): Promise<boolean>;
|
|
876
868
|
/**
|
|
877
|
-
*
|
|
869
|
+
* Deinitializes the datasource.
|
|
878
870
|
* @remarks This should be called to clean up any resources when the datasource is no longer needed.
|
|
879
871
|
* @public
|
|
880
872
|
*/
|
|
881
|
-
|
|
873
|
+
deinit(): any;
|
|
882
874
|
/**
|
|
883
875
|
* Fetches metadata for the specified resource name.
|
|
884
876
|
* @public
|
|
@@ -889,15 +881,15 @@ export declare interface Datasource extends DatasourceMetadata {
|
|
|
889
881
|
/**
|
|
890
882
|
* Takes a snapshot of the data in the datasource.
|
|
891
883
|
* @public
|
|
892
|
-
* @param
|
|
884
|
+
* @param params - Optional parameters for taking the snapshot.
|
|
893
885
|
*/
|
|
894
|
-
snapshot(
|
|
886
|
+
snapshot(params?: any): any;
|
|
895
887
|
/**
|
|
896
888
|
* Takes a filtered snapshot of the data in the datasource.
|
|
897
889
|
* @public
|
|
898
890
|
* @param rowId - Optional ID of the row to filter.
|
|
899
891
|
*/
|
|
900
|
-
snapshotFiltered(rowId?: string):
|
|
892
|
+
snapshotFiltered(rowId?: string): any;
|
|
901
893
|
/**
|
|
902
894
|
* Updates the data in the datasource with the specified data.
|
|
903
895
|
* @public
|
|
@@ -962,6 +954,13 @@ export declare interface Datasource extends DatasourceMetadata {
|
|
|
962
954
|
* @returns A promise that resolves when the item has been updated.
|
|
963
955
|
*/
|
|
964
956
|
updateItem?(itemId: string, data: any): Promise<void>;
|
|
957
|
+
/**
|
|
958
|
+
* Destroy the datasource.
|
|
959
|
+
* @privateRemarks
|
|
960
|
+
* I suspect we may need to call this from datasource disconnectedCallbacks etc to ensure we fully clean up.
|
|
961
|
+
* @public
|
|
962
|
+
*/
|
|
963
|
+
destroy(): void;
|
|
965
964
|
}
|
|
966
965
|
|
|
967
966
|
/**
|
|
@@ -1384,7 +1383,6 @@ export declare interface DatasourceMetadata {
|
|
|
1384
1383
|
readonly originalFieldDef: MetadataDetail[];
|
|
1385
1384
|
readonly fieldMetadata: FieldMetadata[];
|
|
1386
1385
|
readonly requestFields: MetadataDetail[];
|
|
1387
|
-
readonly customRequestFields: MetadataDetail[];
|
|
1388
1386
|
}
|
|
1389
1387
|
|
|
1390
1388
|
/**
|
|
@@ -1397,14 +1395,12 @@ export declare class DatasourceMock implements Datasource {
|
|
|
1397
1395
|
originalFieldDef: MetadataDetail[];
|
|
1398
1396
|
fieldMetadata: FieldMetadata[];
|
|
1399
1397
|
requestFields: MetadataDetail[];
|
|
1400
|
-
customRequestFields: MetadataDetail[];
|
|
1401
1398
|
availableIndexes: IndexDetail[];
|
|
1402
1399
|
initialized: boolean;
|
|
1403
1400
|
readOnly: boolean;
|
|
1404
1401
|
resourceType: ResourceType;
|
|
1405
1402
|
stream: SocketObservable<FilteredDataServerResult | RequestServerResult>;
|
|
1406
1403
|
init(options: DatasourceOptions, fetchMeta: boolean): Promise<boolean>;
|
|
1407
|
-
startStream(): Promise<void>;
|
|
1408
1404
|
/**
|
|
1409
1405
|
* Convenience method to avoid you having to prime connect etc.
|
|
1410
1406
|
* @param meta - The metadata to set.
|
|
@@ -1421,8 +1417,8 @@ export declare class DatasourceMock implements Datasource {
|
|
|
1421
1417
|
destroy(): void;
|
|
1422
1418
|
validResourceName(resourceName: string): boolean;
|
|
1423
1419
|
getMetadata?(resourceName: string): Promise<FieldMetadata[]>;
|
|
1424
|
-
snapshot(params?: any):
|
|
1425
|
-
snapshotFiltered(rowId?: string):
|
|
1420
|
+
snapshot(params?: any): void;
|
|
1421
|
+
snapshotFiltered(rowId?: string): void;
|
|
1426
1422
|
updateData?(data: any[]): Promise<void>;
|
|
1427
1423
|
dataHandler?(data: any[]): any[];
|
|
1428
1424
|
addView?(view: Dataview): void;
|
|
@@ -1439,75 +1435,55 @@ export declare class DatasourceMock implements Datasource {
|
|
|
1439
1435
|
* @public
|
|
1440
1436
|
*/
|
|
1441
1437
|
export declare interface DatasourceOptions {
|
|
1442
|
-
/**
|
|
1443
|
-
* The name of the resource to use for the datasource.
|
|
1444
|
-
*/
|
|
1445
|
-
resourceName?: string;
|
|
1446
|
-
/**
|
|
1447
|
-
* Whether the datasource is a snapshot or not.
|
|
1448
|
-
*/
|
|
1449
|
-
isSnapshot?: boolean;
|
|
1450
1438
|
/**
|
|
1451
1439
|
* The criteria used to filter data in the datasource.
|
|
1452
|
-
* @remarks Works with both DATASERVER and REQUEST_SERVER resources.
|
|
1453
1440
|
*/
|
|
1454
1441
|
criteria?: string;
|
|
1455
1442
|
/**
|
|
1456
|
-
* The
|
|
1457
|
-
* @remarks Works with both DATASERVER and REQUEST_SERVER resources.
|
|
1443
|
+
* The fields to include in the returned data.
|
|
1458
1444
|
*/
|
|
1459
|
-
|
|
1445
|
+
fields?: string;
|
|
1460
1446
|
/**
|
|
1461
|
-
*
|
|
1462
|
-
* @remarks Works with both DATASERVER and REQUEST_SERVER resources.
|
|
1447
|
+
* Whether the datasource is a snapshot or not.
|
|
1463
1448
|
*/
|
|
1464
|
-
|
|
1449
|
+
isSnapshot?: boolean;
|
|
1465
1450
|
/**
|
|
1466
|
-
* The
|
|
1467
|
-
* @remarks Only works with DATASERVER resources.
|
|
1451
|
+
* The maximum number of rows to return from the datasource.
|
|
1468
1452
|
*/
|
|
1469
|
-
|
|
1453
|
+
maxRows?: number;
|
|
1470
1454
|
/**
|
|
1471
1455
|
* The maximum number of rows to track as part of a client "view"
|
|
1472
|
-
* @remarks Only works with DATASERVER resources.
|
|
1473
1456
|
*/
|
|
1474
1457
|
maxView?: number;
|
|
1475
1458
|
/**
|
|
1476
1459
|
* Defines the behaviour of the client view when new rows are received in real time.
|
|
1477
|
-
* @remarks Only works with DATASERVER resources.
|
|
1478
1460
|
*/
|
|
1479
1461
|
movingView?: boolean;
|
|
1480
1462
|
/**
|
|
1481
|
-
* The
|
|
1482
|
-
* @remarks
|
|
1483
|
-
*/
|
|
1484
|
-
orderBy?: string;
|
|
1485
|
-
/**
|
|
1486
|
-
* Whether to return the data in reverse order or not.
|
|
1487
|
-
* @remarks Only works with DATASERVER resources.
|
|
1463
|
+
* The polling interval to use when using request/reply.
|
|
1464
|
+
* @remarks in milliseconds
|
|
1488
1465
|
*/
|
|
1489
|
-
|
|
1466
|
+
pollingInterval?: number;
|
|
1490
1467
|
/**
|
|
1491
1468
|
* Whether to disable polling when using request/reply
|
|
1492
|
-
* @remarks Only works with REQUEST_SERVER resources.
|
|
1493
1469
|
*/
|
|
1494
1470
|
disablePolling?: boolean;
|
|
1495
1471
|
/**
|
|
1496
|
-
* The
|
|
1497
|
-
* @remarks Only works with REQUEST_SERVER resources.
|
|
1498
|
-
* @remarks in milliseconds
|
|
1472
|
+
* The field to use for sorting the data.
|
|
1499
1473
|
*/
|
|
1500
|
-
|
|
1474
|
+
orderBy?: string;
|
|
1501
1475
|
/**
|
|
1502
1476
|
* The request to send to the server.
|
|
1503
|
-
* @remarks Only works with REQUEST_SERVER resources.
|
|
1504
1477
|
*/
|
|
1505
1478
|
request?: any;
|
|
1506
1479
|
/**
|
|
1507
|
-
*
|
|
1508
|
-
|
|
1480
|
+
* The name of the resource to use for the datasource.
|
|
1481
|
+
*/
|
|
1482
|
+
resourceName?: string;
|
|
1483
|
+
/**
|
|
1484
|
+
* Whether to return the data in reverse order or not.
|
|
1509
1485
|
*/
|
|
1510
|
-
|
|
1486
|
+
reverse?: boolean;
|
|
1511
1487
|
}
|
|
1512
1488
|
|
|
1513
1489
|
/**
|
|
@@ -1640,7 +1616,7 @@ export declare class DefaultConnect implements Connect {
|
|
|
1640
1616
|
stream(resourceName: string, onMessage: Function, onError: Function, params?: any): SocketObservable<Message>;
|
|
1641
1617
|
streamState(resourceName: string, onMessage?: Function, onError?: Function, params?: any, initialState?: any[]): Observable<any[]>;
|
|
1642
1618
|
streamWithoutAutoTeardown(resourceName: string, onMessage: Function, onError: Function, params?: any): SocketObservable<Message>;
|
|
1643
|
-
getMoreRows(sourceRef: string
|
|
1619
|
+
getMoreRows(sourceRef: string): Promise<Message>;
|
|
1644
1620
|
getMoreColumns(sourceRef: string): Promise<Message>;
|
|
1645
1621
|
dataLogoff(streamSourceRef: string): Promise<Message>;
|
|
1646
1622
|
getMetadata(resourceName: string, useCache?: boolean): Promise<Metadata>;
|
|
@@ -1751,16 +1727,12 @@ export declare class DefaultDatasource implements Datasource {
|
|
|
1751
1727
|
status: DatasourceStatus;
|
|
1752
1728
|
/** {@inheritDoc DatasourceMetadata.fetchMetadataRequired} */
|
|
1753
1729
|
fetchMetadataRequired: boolean;
|
|
1754
|
-
/** {@inheritDoc DatasourceMetadata.startStream} */
|
|
1755
|
-
startStreamRequired: boolean;
|
|
1756
1730
|
/** {@inheritDoc DatasourceMetadata.originalFieldDef} */
|
|
1757
1731
|
originalFieldDef: MetadataDetail[];
|
|
1758
1732
|
/** {@inheritDoc DatasourceMetadata.fieldMetadata} */
|
|
1759
1733
|
fieldMetadata: FieldMetadata[];
|
|
1760
1734
|
/** {@inheritDoc DatasourceMetadata.requestFields} */
|
|
1761
1735
|
requestFields: MetadataDetail[];
|
|
1762
|
-
/** {@inheritDoc DatasourceMetadata.customRequestFields} */
|
|
1763
|
-
customRequestFields: MetadataDetail[];
|
|
1764
1736
|
/** {@inheritDoc DatasourceMetadata.availableIndexes} */
|
|
1765
1737
|
availableIndexes: IndexDetail[];
|
|
1766
1738
|
/** {@inheritDoc Datasource.initialized} */
|
|
@@ -1774,12 +1746,12 @@ export declare class DefaultDatasource implements Datasource {
|
|
|
1774
1746
|
* @deprecated - Please use {@link (GenesisResources:interface).isValidResource} instead.
|
|
1775
1747
|
*/
|
|
1776
1748
|
validResourceName(resourceName: string): boolean;
|
|
1777
|
-
init(options: DatasourceOptions, fetchMeta?: boolean
|
|
1778
|
-
|
|
1749
|
+
init(options: DatasourceOptions, fetchMeta?: boolean): Promise<boolean>;
|
|
1750
|
+
deinit(): void;
|
|
1779
1751
|
/** {@inheritDoc Datasource.destroy} */
|
|
1780
1752
|
destroy(): void;
|
|
1781
1753
|
get params(): any;
|
|
1782
|
-
snapshot(
|
|
1754
|
+
snapshot(): Promise<Message>;
|
|
1783
1755
|
snapshotFiltered(rowId?: string): Promise<any[]>;
|
|
1784
1756
|
private createStream;
|
|
1785
1757
|
private createDataserverStream;
|
|
@@ -2055,7 +2027,7 @@ export declare class DefaultMessageBuilder implements MessageBuilder {
|
|
|
2055
2027
|
createChangePasswordMessage(username: string, oldPassword: string, newPassword: string): Message<MessageDetails.ChangePassword>;
|
|
2056
2028
|
createForgotPasswordMessage(username: string, returnUrl: string, requester?: string): Message<MessageDetails.ForgotPassword>;
|
|
2057
2029
|
createForgotPasswordTokenMessage(username: string, resetToken: string, newPassword: string, requester?: string): Message<MessageDetails.ForgotPasswordToken>;
|
|
2058
|
-
createMoreRowsMessage(sourceRef: string
|
|
2030
|
+
createMoreRowsMessage(sourceRef: string): Message;
|
|
2059
2031
|
createMoreColumnsMessage(sourceRef: string): Message;
|
|
2060
2032
|
createHTTPHeadersFromMessage(message: Message, contentType?: string): HeadersInit;
|
|
2061
2033
|
/** {@inheritDoc MessageBuilder.createHeartbeatPingMessage} */
|
|
@@ -3279,11 +3251,10 @@ export declare interface MessageBuilder {
|
|
|
3279
3251
|
*
|
|
3280
3252
|
* @remarks MORE_ROWS
|
|
3281
3253
|
* @public
|
|
3282
|
-
* @param sourceRef - The
|
|
3283
|
-
* @param viewNumber - The desired view number. Default:always the first view, if not spceified.
|
|
3254
|
+
* @param sourceRef - The source reference.
|
|
3284
3255
|
* @returns The more rows message.
|
|
3285
3256
|
*/
|
|
3286
|
-
createMoreRowsMessage(sourceRef: string
|
|
3257
|
+
createMoreRowsMessage(sourceRef: string): Message;
|
|
3287
3258
|
/**
|
|
3288
3259
|
* Creates a message to request more columns.
|
|
3289
3260
|
*
|
|
@@ -3303,7 +3274,7 @@ export declare interface MessageBuilder {
|
|
|
3303
3274
|
* @param params - The additional parameters.
|
|
3304
3275
|
* @returns The request message.
|
|
3305
3276
|
*/
|
|
3306
|
-
createRequestMessage<T = any>(resourceName: string, params?:
|
|
3277
|
+
createRequestMessage<T = any>(resourceName: string, params?: any): Message<T>;
|
|
3307
3278
|
/**
|
|
3308
3279
|
* Creates a message for getting list of resources.
|
|
3309
3280
|
*
|
|
@@ -3488,7 +3459,6 @@ export declare namespace MessageDetails {
|
|
|
3488
3459
|
*/
|
|
3489
3460
|
export type MoreRows = {
|
|
3490
3461
|
SOURCE_REF: string;
|
|
3491
|
-
VIEW_NUMBER?: number;
|
|
3492
3462
|
};
|
|
3493
3463
|
/**
|
|
3494
3464
|
* Details type to update columns
|
|
@@ -3599,15 +3569,12 @@ export declare const MetaCache: InterfaceSymbol<MetaCache>;
|
|
|
3599
3569
|
* @public
|
|
3600
3570
|
*/
|
|
3601
3571
|
export declare type Metadata = {
|
|
3602
|
-
DEFINITIONS?: Record<string, any>;
|
|
3603
|
-
DESCRIPTION?: string;
|
|
3604
3572
|
FIELD?: MetadataDetail[];
|
|
3605
|
-
|
|
3573
|
+
INDEXES?: IndexDetail[];
|
|
3606
3574
|
REPLY_FIELD?: MetadataDetail[];
|
|
3607
3575
|
REQUEST_FIELD?: MetadataDetail[];
|
|
3608
3576
|
NAME?: string;
|
|
3609
3577
|
TYPE?: string;
|
|
3610
|
-
INDEXES?: IndexDetail[];
|
|
3611
3578
|
ERROR?: string;
|
|
3612
3579
|
};
|
|
3613
3580
|
|
|
@@ -3651,12 +3618,9 @@ export declare interface MetadataCache {
|
|
|
3651
3618
|
export declare type MetadataDetail = {
|
|
3652
3619
|
NAME: string;
|
|
3653
3620
|
TYPE: string;
|
|
3654
|
-
DESCRIPTION?: string;
|
|
3655
|
-
JSON_TYPE?: string;
|
|
3656
3621
|
VALID_VALUES?: string;
|
|
3657
3622
|
READ_ONLY?: boolean;
|
|
3658
3623
|
OPTIONAL?: boolean;
|
|
3659
|
-
NULLABLE?: boolean;
|
|
3660
3624
|
UI_LABEL?: string;
|
|
3661
3625
|
};
|
|
3662
3626
|
|
|
@@ -3912,32 +3876,12 @@ export declare type RefreshCredentialsInput = {
|
|
|
3912
3876
|
mfaToken?: string;
|
|
3913
3877
|
};
|
|
3914
3878
|
|
|
3915
|
-
/**
|
|
3916
|
-
* Reply Detail definition.
|
|
3917
|
-
* @public
|
|
3918
|
-
*/
|
|
3919
|
-
export declare type ReplyDetail = {
|
|
3920
|
-
DEFINITIONS?: Record<string, any>;
|
|
3921
|
-
DESCRIPTION?: string;
|
|
3922
|
-
FIELD: MetadataDetail[];
|
|
3923
|
-
NAME: string;
|
|
3924
|
-
[key: string]: any;
|
|
3925
|
-
};
|
|
3926
|
-
|
|
3927
|
-
/**
|
|
3928
|
-
* @public
|
|
3929
|
-
*/
|
|
3930
|
-
export declare type RequestDetailsParam = {
|
|
3931
|
-
MAX_ROWS?: number;
|
|
3932
|
-
CRITERIA_MATCH?: string;
|
|
3933
|
-
};
|
|
3934
|
-
|
|
3935
3879
|
/**
|
|
3936
3880
|
* Parameters for a REQUEST message
|
|
3937
3881
|
* @public
|
|
3938
3882
|
*/
|
|
3939
3883
|
export declare type RequestParams = {
|
|
3940
|
-
DETAILS?:
|
|
3884
|
+
DETAILS?: any;
|
|
3941
3885
|
REQUEST?: any;
|
|
3942
3886
|
};
|
|
3943
3887
|
|
|
@@ -3949,11 +3893,6 @@ export declare type RequestServerResult = {
|
|
|
3949
3893
|
SOURCE_REF?: string;
|
|
3950
3894
|
REPLY: any[];
|
|
3951
3895
|
MESSAGE_TYPE?: string;
|
|
3952
|
-
MORE_ROWS?: boolean;
|
|
3953
|
-
NEXT_VIEW?: number;
|
|
3954
|
-
PARAMETRIC_TYPE?: string;
|
|
3955
|
-
ROWS_COUNT?: number;
|
|
3956
|
-
SEQUENCE_ID?: number;
|
|
3957
3896
|
};
|
|
3958
3897
|
|
|
3959
3898
|
declare type RESOURCE_DETAILS = {
|
|
@@ -9,15 +9,14 @@ Requests additional rows of data for the specified source reference.
|
|
|
9
9
|
**Signature:**
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
getMoreRows(sourceRef: string
|
|
12
|
+
getMoreRows(sourceRef: string): Promise<Message>;
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Parameters
|
|
16
16
|
|
|
17
17
|
| Parameter | Type | Description |
|
|
18
18
|
| --- | --- | --- |
|
|
19
|
-
| sourceRef | string |
|
|
20
|
-
| viewNumber | number | _(Optional)_ The specific view number to request more rows for. Default: previous view number result + 1. |
|
|
19
|
+
| sourceRef | string | The source reference to request more rows for. |
|
|
21
20
|
|
|
22
21
|
**Returns:**
|
|
23
22
|
|
|
@@ -34,7 +34,7 @@ export interface Connect
|
|
|
34
34
|
| [getJSONSchema(resourceName)](./foundation-comms.connect.getjsonschema.md) | Retrieves the JSON schema for the specified resource. |
|
|
35
35
|
| [getMetadata(resourceName, useCache)](./foundation-comms.connect.getmetadata.md) | Retrieves the metadata for the specified resource. |
|
|
36
36
|
| [getMoreColumns(sourceRef)](./foundation-comms.connect.getmorecolumns.md) | Requests additional columns for the specified source reference. |
|
|
37
|
-
| [getMoreRows(sourceRef
|
|
37
|
+
| [getMoreRows(sourceRef)](./foundation-comms.connect.getmorerows.md) | Requests additional rows of data for the specified source reference. |
|
|
38
38
|
| [request(resourceName, params)](./foundation-comms.connect.request.md) | Sends a request to the server to retrieve data or perform an action. |
|
|
39
39
|
| [snapshot(resourceName, params)](./foundation-comms.connect.snapshot.md) | Retrieves a snapshot of data for the specified resource. |
|
|
40
40
|
| [stream(resourceName, onMessage, onError, params)](./foundation-comms.connect.stream.md) | Starts listening for updates on the specified resource. |
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
2
|
|
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [Datasource](./foundation-comms.datasource.md) > [
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [Datasource](./foundation-comms.datasource.md) > [deinit](./foundation-comms.datasource.deinit.md)
|
|
4
4
|
|
|
5
|
-
## Datasource.
|
|
5
|
+
## Datasource.deinit() method
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Deinitializes the datasource.
|
|
8
8
|
|
|
9
9
|
**Signature:**
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
|
|
12
|
+
deinit(): any;
|
|
13
13
|
```
|
|
14
14
|
**Returns:**
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
any
|
|
17
|
+
|
|
18
|
+
## Remarks
|
|
19
|
+
|
|
20
|
+
This should be called to clean up any resources when the datasource is no longer needed.
|
|
17
21
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## Datasource.destroy() method
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Destroy the datasource.
|
|
8
8
|
|
|
9
9
|
**Signature:**
|
|
10
10
|
|
|
@@ -15,7 +15,3 @@ destroy(): void;
|
|
|
15
15
|
|
|
16
16
|
void
|
|
17
17
|
|
|
18
|
-
## Remarks
|
|
19
|
-
|
|
20
|
-
This should be called to clean up any resources when the datasource is no longer needed.
|
|
21
|
-
|
|
@@ -9,7 +9,7 @@ Initializes the datasource with the given options and fetches metadata if specif
|
|
|
9
9
|
**Signature:**
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
init(options: DatasourceOptions, fetchMeta?: boolean
|
|
12
|
+
init(options: DatasourceOptions, fetchMeta?: boolean): Promise<boolean>;
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Parameters
|
|
@@ -18,7 +18,6 @@ init(options: DatasourceOptions, fetchMeta?: boolean, startStream?: boolean): Pr
|
|
|
18
18
|
| --- | --- | --- |
|
|
19
19
|
| options | [DatasourceOptions](./foundation-comms.datasourceoptions.md) | The options to initialize the datasource with. |
|
|
20
20
|
| fetchMeta | boolean | _(Optional)_ Optional flag to fetch metadata for the datasource. Defaults to true. |
|
|
21
|
-
| startStream | boolean | _(Optional)_ Optional flag to start the data stream. Defaults to true. |
|
|
22
21
|
|
|
23
22
|
**Returns:**
|
|
24
23
|
|
|
@@ -35,15 +35,15 @@ The public interface available on the injected store fragment.
|
|
|
35
35
|
| [clearFilter(name)?](./foundation-comms.datasource.clearfilter.md) | _(Optional)_ Clears the filter with the specified name from the datasource. |
|
|
36
36
|
| [createItem(data)?](./foundation-comms.datasource.createitem.md) | _(Optional)_ Creates a new item in the datasource with the specified data. |
|
|
37
37
|
| [dataHandler(data)?](./foundation-comms.datasource.datahandler.md) | _(Optional)_ Handles the specified data and returns it. |
|
|
38
|
+
| [deinit()](./foundation-comms.datasource.deinit.md) | Deinitializes the datasource. |
|
|
38
39
|
| [deleteItem(itemId)?](./foundation-comms.datasource.deleteitem.md) | _(Optional)_ Deletes an item with the given ID from the datasource. |
|
|
39
|
-
| [destroy()](./foundation-comms.datasource.destroy.md) |
|
|
40
|
+
| [destroy()](./foundation-comms.datasource.destroy.md) | Destroy the datasource. |
|
|
40
41
|
| [dropView(view)?](./foundation-comms.datasource.dropview.md) | _(Optional)_ Removes the specified dataview from the datasource. |
|
|
41
42
|
| [getMetadata(resourceName)?](./foundation-comms.datasource.getmetadata.md) | _(Optional)_ Fetches metadata for the specified resource name. |
|
|
42
|
-
| [init(options, fetchMeta
|
|
43
|
+
| [init(options, fetchMeta)](./foundation-comms.datasource.init.md) | Initializes the datasource with the given options and fetches metadata if specified. |
|
|
43
44
|
| [setFilter(name, value, type)?](./foundation-comms.datasource.setfilter.md) | _(Optional)_ Sets a filter on the datasource with the specified name, value, and type. |
|
|
44
|
-
| [snapshot(
|
|
45
|
+
| [snapshot(params)](./foundation-comms.datasource.snapshot.md) | Takes a snapshot of the data in the datasource. |
|
|
45
46
|
| [snapshotFiltered(rowId)](./foundation-comms.datasource.snapshotfiltered.md) | Takes a filtered snapshot of the data in the datasource. |
|
|
46
|
-
| [startStream()](./foundation-comms.datasource.startstream.md) | Starts the data stream for the datasource. |
|
|
47
47
|
| [updateData(data)?](./foundation-comms.datasource.updatedata.md) | _(Optional)_ Updates the data in the datasource with the specified data. |
|
|
48
48
|
| [updateItem(itemId, data)?](./foundation-comms.datasource.updateitem.md) | _(Optional)_ Updates an item in the datasource with the given ID and data. |
|
|
49
49
|
| [validResourceName(resourceName)](./foundation-comms.datasource.validresourcename.md) | Indicates whether the resourceName is valid or not. |
|
|
@@ -9,16 +9,16 @@ Takes a snapshot of the data in the datasource.
|
|
|
9
9
|
**Signature:**
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
snapshot(
|
|
12
|
+
snapshot(params?: any): any;
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Parameters
|
|
16
16
|
|
|
17
17
|
| Parameter | Type | Description |
|
|
18
18
|
| --- | --- | --- |
|
|
19
|
-
|
|
|
19
|
+
| params | any | _(Optional)_ Optional parameters for taking the snapshot. |
|
|
20
20
|
|
|
21
21
|
**Returns:**
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
any
|
|
24
24
|
|
|
@@ -9,7 +9,7 @@ Takes a filtered snapshot of the data in the datasource.
|
|
|
9
9
|
**Signature:**
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
snapshotFiltered(rowId?: string):
|
|
12
|
+
snapshotFiltered(rowId?: string): any;
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Parameters
|
|
@@ -20,5 +20,5 @@ snapshotFiltered(rowId?: string): Promise<any[]>;
|
|
|
20
20
|
|
|
21
21
|
**Returns:**
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
any
|
|
24
24
|
|
|
@@ -4,11 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
## Datasource.validResourceName() method
|
|
6
6
|
|
|
7
|
-
> Warning: This API is now obsolete.
|
|
8
|
-
>
|
|
9
|
-
> - Please use [GenesisResources.isValidResource](./foundation-comms.genesisresources.isvalidresource.md) instead.
|
|
10
|
-
>
|
|
11
|
-
|
|
12
7
|
Indicates whether the resourceName is valid or not.
|
|
13
8
|
|
|
14
9
|
**Signature:**
|
|
@@ -17,7 +17,6 @@ export interface DatasourceMetadata
|
|
|
17
17
|
| Property | Modifiers | Type | Description |
|
|
18
18
|
| --- | --- | --- | --- |
|
|
19
19
|
| [availableIndexes](./foundation-comms.datasourcemetadata.availableindexes.md) | <code>readonly</code> | [IndexDetail](./foundation-comms.indexdetail.md)<!-- -->\[\] | |
|
|
20
|
-
| [customRequestFields](./foundation-comms.datasourcemetadata.customrequestfields.md) | <code>readonly</code> | [MetadataDetail](./foundation-comms.metadatadetail.md)<!-- -->\[\] | |
|
|
21
20
|
| [fetchMetadataRequired](./foundation-comms.datasourcemetadata.fetchmetadatarequired.md) | | boolean | |
|
|
22
21
|
| [fieldMetadata](./foundation-comms.datasourcemetadata.fieldmetadata.md) | <code>readonly</code> | [FieldMetadata](./foundation-comms.fieldmetadata.md)<!-- -->\[\] | |
|
|
23
22
|
| [originalFieldDef](./foundation-comms.datasourcemetadata.originalfielddef.md) | <code>readonly</code> | [MetadataDetail](./foundation-comms.metadatadetail.md)<!-- -->\[\] | |
|
|
@@ -26,8 +26,6 @@ export interface DatasourceOptions
|
|
|
26
26
|
| [orderBy?](./foundation-comms.datasourceoptions.orderby.md) | | string | _(Optional)_ The field to use for sorting the data. |
|
|
27
27
|
| [pollingInterval?](./foundation-comms.datasourceoptions.pollinginterval.md) | | number | _(Optional)_ The polling interval to use when using request/reply. |
|
|
28
28
|
| [request?](./foundation-comms.datasourceoptions.request.md) | | any | _(Optional)_ The request to send to the server. |
|
|
29
|
-
| [requestAutoSetup?](./foundation-comms.datasourceoptions.requestautosetup.md) | | boolean | _(Optional)_ Whether the Datasource service will setup RQUEST object based on metadata. |
|
|
30
29
|
| [resourceName?](./foundation-comms.datasourceoptions.resourcename.md) | | string | _(Optional)_ The name of the resource to use for the datasource. |
|
|
31
30
|
| [reverse?](./foundation-comms.datasourceoptions.reverse.md) | | boolean | _(Optional)_ Whether to return the data in reverse order or not. |
|
|
32
|
-
| [viewNumber?](./foundation-comms.datasourceoptions.viewnumber.md) | | number | _(Optional)_ The current page/"view" number being displayed. |
|
|
33
31
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
**Signature:**
|
|
8
8
|
|
|
9
9
|
```typescript
|
|
10
|
-
getMoreRows(sourceRef: string
|
|
10
|
+
getMoreRows(sourceRef: string): Promise<Message>;
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
## Parameters
|
|
@@ -15,7 +15,6 @@ getMoreRows(sourceRef: string, viewNumber?: number): Promise<Message>;
|
|
|
15
15
|
| Parameter | Type | Description |
|
|
16
16
|
| --- | --- | --- |
|
|
17
17
|
| sourceRef | string | |
|
|
18
|
-
| viewNumber | number | _(Optional)_ |
|
|
19
18
|
|
|
20
19
|
**Returns:**
|
|
21
20
|
|
|
@@ -42,7 +42,7 @@ export declare class DefaultConnect implements Connect
|
|
|
42
42
|
| [getJSONSchema(resourceName, useCache)](./foundation-comms.defaultconnect.getjsonschema.md) | | |
|
|
43
43
|
| [getMetadata(resourceName, useCache)](./foundation-comms.defaultconnect.getmetadata.md) | | |
|
|
44
44
|
| [getMoreColumns(sourceRef)](./foundation-comms.defaultconnect.getmorecolumns.md) | | |
|
|
45
|
-
| [getMoreRows(sourceRef
|
|
45
|
+
| [getMoreRows(sourceRef)](./foundation-comms.defaultconnect.getmorerows.md) | | |
|
|
46
46
|
| [httpMode()](./foundation-comms.defaultconnect.httpmode.md) | | |
|
|
47
47
|
| [request(resourceName, params)](./foundation-comms.defaultconnect.request.md) | | |
|
|
48
48
|
| [send(message, needsHandling)](./foundation-comms.defaultconnect.send.md) | | |
|