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