@genesislcap/foundation-comms 14.199.2-alpha-1ab46f4.0 → 14.199.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/dts/connect/connect.d.ts +2 -2
- package/dist/dts/connect/connect.d.ts.map +1 -1
- package/dist/dts/connect/message.d.ts +4 -12
- package/dist/dts/connect/message.d.ts.map +1 -1
- package/dist/dts/datasource/datasource.d.ts +16 -18
- 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 -3
- 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 +33 -58
- package/dist/esm/metadata/metadata.utils.js +1 -2
- package/dist/esm/testing/mocks/datasource/datasource.js +2 -9
- package/dist/foundation-comms.api.json +108 -458
- package/dist/foundation-comms.d.ts +42 -97
- package/docs/api/foundation-comms.connect.getmorerows.md +1 -2
- 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.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 -5
- 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 +2 -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 +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 +18 -54
- package/package.json +13 -13
- 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.startstreamrequired.md +0 -12
- package/docs/api/foundation-comms.replydetail.md +0 -21
- package/docs/api/foundation-comms.requestdetailsparam.md +0 -15
@@ -291,7 +291,7 @@ export declare interface Connect {
|
|
291
291
|
* @param sourceRef - The source reference to request more rows for.
|
292
292
|
* @returns A promise that resolves with the additional rows of data.
|
293
293
|
*/
|
294
|
-
getMoreRows(sourceRef: string
|
294
|
+
getMoreRows(sourceRef: string): Promise<Message>;
|
295
295
|
/**
|
296
296
|
* Requests additional columns for the specified source reference.
|
297
297
|
* @public
|
@@ -855,7 +855,6 @@ export declare interface Datasource extends DatasourceMetadata {
|
|
855
855
|
/**
|
856
856
|
* Indicates whether the resourceName is valid or not.
|
857
857
|
* @public
|
858
|
-
* @deprecated - Please use {@link (GenesisResources:interface).isValidResource} instead.
|
859
858
|
*/
|
860
859
|
validResourceName(resourceName: string): boolean;
|
861
860
|
/**
|
@@ -863,21 +862,15 @@ export declare interface Datasource extends DatasourceMetadata {
|
|
863
862
|
* @public
|
864
863
|
* @param options - The options to initialize the datasource with.
|
865
864
|
* @param fetchMeta - Optional flag to fetch metadata for the datasource. Defaults to true.
|
866
|
-
* @param startStream - Optional flag to start the data stream. Defaults to true.
|
867
865
|
* @returns A promise that resolves with a boolean indicating whether the initialization was successful.
|
868
866
|
*/
|
869
|
-
init(options: DatasourceOptions, fetchMeta?: boolean
|
870
|
-
/**
|
871
|
-
* Starts the data stream for the datasource.
|
872
|
-
* @public
|
873
|
-
*/
|
874
|
-
startStream(): Promise<void>;
|
867
|
+
init(options: DatasourceOptions, fetchMeta?: boolean): Promise<boolean>;
|
875
868
|
/**
|
876
|
-
*
|
869
|
+
* Deinitializes the datasource.
|
877
870
|
* @remarks This should be called to clean up any resources when the datasource is no longer needed.
|
878
871
|
* @public
|
879
872
|
*/
|
880
|
-
|
873
|
+
deinit(): any;
|
881
874
|
/**
|
882
875
|
* Fetches metadata for the specified resource name.
|
883
876
|
* @public
|
@@ -888,15 +881,15 @@ export declare interface Datasource extends DatasourceMetadata {
|
|
888
881
|
/**
|
889
882
|
* Takes a snapshot of the data in the datasource.
|
890
883
|
* @public
|
891
|
-
* @param
|
884
|
+
* @param params - Optional parameters for taking the snapshot.
|
892
885
|
*/
|
893
|
-
snapshot(
|
886
|
+
snapshot(params?: any): any;
|
894
887
|
/**
|
895
888
|
* Takes a filtered snapshot of the data in the datasource.
|
896
889
|
* @public
|
897
890
|
* @param rowId - Optional ID of the row to filter.
|
898
891
|
*/
|
899
|
-
snapshotFiltered(rowId?: string):
|
892
|
+
snapshotFiltered(rowId?: string): any;
|
900
893
|
/**
|
901
894
|
* Updates the data in the datasource with the specified data.
|
902
895
|
* @public
|
@@ -961,6 +954,13 @@ export declare interface Datasource extends DatasourceMetadata {
|
|
961
954
|
* @returns A promise that resolves when the item has been updated.
|
962
955
|
*/
|
963
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;
|
964
964
|
}
|
965
965
|
|
966
966
|
/**
|
@@ -1401,7 +1401,6 @@ export declare class DatasourceMock implements Datasource {
|
|
1401
1401
|
resourceType: ResourceType;
|
1402
1402
|
stream: SocketObservable<FilteredDataServerResult | RequestServerResult>;
|
1403
1403
|
init(options: DatasourceOptions, fetchMeta: boolean): Promise<boolean>;
|
1404
|
-
startStream(): Promise<void>;
|
1405
1404
|
/**
|
1406
1405
|
* Convenience method to avoid you having to prime connect etc.
|
1407
1406
|
* @param meta - The metadata to set.
|
@@ -1418,8 +1417,8 @@ export declare class DatasourceMock implements Datasource {
|
|
1418
1417
|
destroy(): void;
|
1419
1418
|
validResourceName(resourceName: string): boolean;
|
1420
1419
|
getMetadata?(resourceName: string): Promise<FieldMetadata[]>;
|
1421
|
-
snapshot(params?: any):
|
1422
|
-
snapshotFiltered(rowId?: string):
|
1420
|
+
snapshot(params?: any): void;
|
1421
|
+
snapshotFiltered(rowId?: string): void;
|
1423
1422
|
updateData?(data: any[]): Promise<void>;
|
1424
1423
|
dataHandler?(data: any[]): any[];
|
1425
1424
|
addView?(view: Dataview): void;
|
@@ -1436,75 +1435,55 @@ export declare class DatasourceMock implements Datasource {
|
|
1436
1435
|
* @public
|
1437
1436
|
*/
|
1438
1437
|
export declare interface DatasourceOptions {
|
1439
|
-
/**
|
1440
|
-
* The name of the resource to use for the datasource.
|
1441
|
-
*/
|
1442
|
-
resourceName?: string;
|
1443
|
-
/**
|
1444
|
-
* Whether the datasource is a snapshot or not.
|
1445
|
-
*/
|
1446
|
-
isSnapshot?: boolean;
|
1447
1438
|
/**
|
1448
1439
|
* The criteria used to filter data in the datasource.
|
1449
|
-
* @remarks Works with both DATASERVER and REQUEST_SERVER resources.
|
1450
1440
|
*/
|
1451
1441
|
criteria?: string;
|
1452
1442
|
/**
|
1453
|
-
* The
|
1454
|
-
* @remarks Works with both DATASERVER and REQUEST_SERVER resources.
|
1443
|
+
* The fields to include in the returned data.
|
1455
1444
|
*/
|
1456
|
-
|
1445
|
+
fields?: string;
|
1457
1446
|
/**
|
1458
|
-
*
|
1459
|
-
* @remarks Works with both DATASERVER and REQUEST_SERVER resources.
|
1447
|
+
* Whether the datasource is a snapshot or not.
|
1460
1448
|
*/
|
1461
|
-
|
1449
|
+
isSnapshot?: boolean;
|
1462
1450
|
/**
|
1463
|
-
* The
|
1464
|
-
* @remarks Only works with DATASERVER resources.
|
1451
|
+
* The maximum number of rows to return from the datasource.
|
1465
1452
|
*/
|
1466
|
-
|
1453
|
+
maxRows?: number;
|
1467
1454
|
/**
|
1468
1455
|
* The maximum number of rows to track as part of a client "view"
|
1469
|
-
* @remarks Only works with DATASERVER resources.
|
1470
1456
|
*/
|
1471
1457
|
maxView?: number;
|
1472
1458
|
/**
|
1473
1459
|
* Defines the behaviour of the client view when new rows are received in real time.
|
1474
|
-
* @remarks Only works with DATASERVER resources.
|
1475
1460
|
*/
|
1476
1461
|
movingView?: boolean;
|
1477
1462
|
/**
|
1478
|
-
* The
|
1479
|
-
* @remarks
|
1480
|
-
*/
|
1481
|
-
orderBy?: string;
|
1482
|
-
/**
|
1483
|
-
* Whether to return the data in reverse order or not.
|
1484
|
-
* @remarks Only works with DATASERVER resources.
|
1463
|
+
* The polling interval to use when using request/reply.
|
1464
|
+
* @remarks in milliseconds
|
1485
1465
|
*/
|
1486
|
-
|
1466
|
+
pollingInterval?: number;
|
1487
1467
|
/**
|
1488
1468
|
* Whether to disable polling when using request/reply
|
1489
|
-
* @remarks Only works with REQUEST_SERVER resources.
|
1490
1469
|
*/
|
1491
1470
|
disablePolling?: boolean;
|
1492
1471
|
/**
|
1493
|
-
* The
|
1494
|
-
* @remarks Only works with REQUEST_SERVER resources.
|
1495
|
-
* @remarks in milliseconds
|
1472
|
+
* The field to use for sorting the data.
|
1496
1473
|
*/
|
1497
|
-
|
1474
|
+
orderBy?: string;
|
1498
1475
|
/**
|
1499
1476
|
* The request to send to the server.
|
1500
|
-
* @remarks Only works with REQUEST_SERVER resources.
|
1501
1477
|
*/
|
1502
1478
|
request?: any;
|
1503
1479
|
/**
|
1504
|
-
*
|
1505
|
-
|
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.
|
1506
1485
|
*/
|
1507
|
-
|
1486
|
+
reverse?: boolean;
|
1508
1487
|
}
|
1509
1488
|
|
1510
1489
|
/**
|
@@ -1637,7 +1616,7 @@ export declare class DefaultConnect implements Connect {
|
|
1637
1616
|
stream(resourceName: string, onMessage: Function, onError: Function, params?: any): SocketObservable<Message>;
|
1638
1617
|
streamState(resourceName: string, onMessage?: Function, onError?: Function, params?: any, initialState?: any[]): Observable<any[]>;
|
1639
1618
|
streamWithoutAutoTeardown(resourceName: string, onMessage: Function, onError: Function, params?: any): SocketObservable<Message>;
|
1640
|
-
getMoreRows(sourceRef: string
|
1619
|
+
getMoreRows(sourceRef: string): Promise<Message>;
|
1641
1620
|
getMoreColumns(sourceRef: string): Promise<Message>;
|
1642
1621
|
dataLogoff(streamSourceRef: string): Promise<Message>;
|
1643
1622
|
getMetadata(resourceName: string, useCache?: boolean): Promise<Metadata>;
|
@@ -1748,8 +1727,6 @@ export declare class DefaultDatasource implements Datasource {
|
|
1748
1727
|
status: DatasourceStatus;
|
1749
1728
|
/** {@inheritDoc DatasourceMetadata.fetchMetadataRequired} */
|
1750
1729
|
fetchMetadataRequired: boolean;
|
1751
|
-
/** {@inheritDoc DatasourceMetadata.startStream} */
|
1752
|
-
startStreamRequired: boolean;
|
1753
1730
|
/** {@inheritDoc DatasourceMetadata.originalFieldDef} */
|
1754
1731
|
originalFieldDef: MetadataDetail[];
|
1755
1732
|
/** {@inheritDoc DatasourceMetadata.fieldMetadata} */
|
@@ -1769,12 +1746,12 @@ export declare class DefaultDatasource implements Datasource {
|
|
1769
1746
|
* @deprecated - Please use {@link (GenesisResources:interface).isValidResource} instead.
|
1770
1747
|
*/
|
1771
1748
|
validResourceName(resourceName: string): boolean;
|
1772
|
-
init(options: DatasourceOptions, fetchMeta?: boolean
|
1773
|
-
|
1749
|
+
init(options: DatasourceOptions, fetchMeta?: boolean): Promise<boolean>;
|
1750
|
+
deinit(): void;
|
1774
1751
|
/** {@inheritDoc Datasource.destroy} */
|
1775
1752
|
destroy(): void;
|
1776
1753
|
get params(): any;
|
1777
|
-
snapshot(
|
1754
|
+
snapshot(): Promise<Message>;
|
1778
1755
|
snapshotFiltered(rowId?: string): Promise<any[]>;
|
1779
1756
|
private createStream;
|
1780
1757
|
private createDataserverStream;
|
@@ -2050,7 +2027,7 @@ export declare class DefaultMessageBuilder implements MessageBuilder {
|
|
2050
2027
|
createChangePasswordMessage(username: string, oldPassword: string, newPassword: string): Message<MessageDetails.ChangePassword>;
|
2051
2028
|
createForgotPasswordMessage(username: string, returnUrl: string, requester?: string): Message<MessageDetails.ForgotPassword>;
|
2052
2029
|
createForgotPasswordTokenMessage(username: string, resetToken: string, newPassword: string, requester?: string): Message<MessageDetails.ForgotPasswordToken>;
|
2053
|
-
createMoreRowsMessage(sourceRef: string
|
2030
|
+
createMoreRowsMessage(sourceRef: string): Message;
|
2054
2031
|
createMoreColumnsMessage(sourceRef: string): Message;
|
2055
2032
|
createHTTPHeadersFromMessage(message: Message, contentType?: string): HeadersInit;
|
2056
2033
|
/** {@inheritDoc MessageBuilder.createHeartbeatPingMessage} */
|
@@ -3277,7 +3254,7 @@ export declare interface MessageBuilder {
|
|
3277
3254
|
* @param sourceRef - The source reference.
|
3278
3255
|
* @returns The more rows message.
|
3279
3256
|
*/
|
3280
|
-
createMoreRowsMessage(sourceRef: string
|
3257
|
+
createMoreRowsMessage(sourceRef: string): Message;
|
3281
3258
|
/**
|
3282
3259
|
* Creates a message to request more columns.
|
3283
3260
|
*
|
@@ -3297,7 +3274,7 @@ export declare interface MessageBuilder {
|
|
3297
3274
|
* @param params - The additional parameters.
|
3298
3275
|
* @returns The request message.
|
3299
3276
|
*/
|
3300
|
-
createRequestMessage<T = any>(resourceName: string, params?:
|
3277
|
+
createRequestMessage<T = any>(resourceName: string, params?: any): Message<T>;
|
3301
3278
|
/**
|
3302
3279
|
* Creates a message for getting list of resources.
|
3303
3280
|
*
|
@@ -3482,7 +3459,6 @@ export declare namespace MessageDetails {
|
|
3482
3459
|
*/
|
3483
3460
|
export type MoreRows = {
|
3484
3461
|
SOURCE_REF: string;
|
3485
|
-
VIEW_NUMBER?: number;
|
3486
3462
|
};
|
3487
3463
|
/**
|
3488
3464
|
* Details type to update columns
|
@@ -3593,15 +3569,12 @@ export declare const MetaCache: InterfaceSymbol<MetaCache>;
|
|
3593
3569
|
* @public
|
3594
3570
|
*/
|
3595
3571
|
export declare type Metadata = {
|
3596
|
-
DEFINITIONS?: Record<string, any>;
|
3597
|
-
DESCRIPTION?: string;
|
3598
3572
|
FIELD?: MetadataDetail[];
|
3599
|
-
|
3573
|
+
INDEXES?: IndexDetail[];
|
3600
3574
|
REPLY_FIELD?: MetadataDetail[];
|
3601
3575
|
REQUEST_FIELD?: MetadataDetail[];
|
3602
3576
|
NAME?: string;
|
3603
3577
|
TYPE?: string;
|
3604
|
-
INDEXES?: IndexDetail[];
|
3605
3578
|
ERROR?: string;
|
3606
3579
|
};
|
3607
3580
|
|
@@ -3645,12 +3618,9 @@ export declare interface MetadataCache {
|
|
3645
3618
|
export declare type MetadataDetail = {
|
3646
3619
|
NAME: string;
|
3647
3620
|
TYPE: string;
|
3648
|
-
DESCRIPTION?: string;
|
3649
|
-
JSON_TYPE?: string;
|
3650
3621
|
VALID_VALUES?: string;
|
3651
3622
|
READ_ONLY?: boolean;
|
3652
3623
|
OPTIONAL?: boolean;
|
3653
|
-
NULLABLE?: boolean;
|
3654
3624
|
UI_LABEL?: string;
|
3655
3625
|
};
|
3656
3626
|
|
@@ -3906,32 +3876,12 @@ export declare type RefreshCredentialsInput = {
|
|
3906
3876
|
mfaToken?: string;
|
3907
3877
|
};
|
3908
3878
|
|
3909
|
-
/**
|
3910
|
-
* Reply Detail definition.
|
3911
|
-
* @public
|
3912
|
-
*/
|
3913
|
-
export declare type ReplyDetail = {
|
3914
|
-
DEFINITIONS?: Record<string, any>;
|
3915
|
-
DESCRIPTION?: string;
|
3916
|
-
FIELD: MetadataDetail[];
|
3917
|
-
NAME: string;
|
3918
|
-
[key: string]: any;
|
3919
|
-
};
|
3920
|
-
|
3921
|
-
/**
|
3922
|
-
* @public
|
3923
|
-
*/
|
3924
|
-
export declare type RequestDetailsParam = {
|
3925
|
-
MAX_ROWS?: number;
|
3926
|
-
CRITERIA_MATCH?: string;
|
3927
|
-
};
|
3928
|
-
|
3929
3879
|
/**
|
3930
3880
|
* Parameters for a REQUEST message
|
3931
3881
|
* @public
|
3932
3882
|
*/
|
3933
3883
|
export declare type RequestParams = {
|
3934
|
-
DETAILS?:
|
3884
|
+
DETAILS?: any;
|
3935
3885
|
REQUEST?: any;
|
3936
3886
|
};
|
3937
3887
|
|
@@ -3943,11 +3893,6 @@ export declare type RequestServerResult = {
|
|
3943
3893
|
SOURCE_REF?: string;
|
3944
3894
|
REPLY: any[];
|
3945
3895
|
MESSAGE_TYPE?: string;
|
3946
|
-
MORE_ROWS?: boolean;
|
3947
|
-
NEXT_VIEW?: number;
|
3948
|
-
PARAMETRIC_TYPE?: string;
|
3949
|
-
ROWS_COUNT?: number;
|
3950
|
-
SEQUENCE_ID?: number;
|
3951
3896
|
};
|
3952
3897
|
|
3953
3898
|
declare type RESOURCE_DETAILS = {
|
@@ -9,7 +9,7 @@ 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
|
@@ -17,7 +17,6 @@ getMoreRows(sourceRef: string, viewNumber?: number): Promise<Message>;
|
|
17
17
|
| Parameter | Type | Description |
|
18
18
|
| --- | --- | --- |
|
19
19
|
| sourceRef | string | The source reference to request more rows for. |
|
20
|
-
| viewNumber | number | _(Optional)_ |
|
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:**
|
@@ -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) | | |
|
@@ -1,15 +1,15 @@
|
|
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) > [DefaultDatasource](./foundation-comms.defaultdatasource.md) > [
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [DefaultDatasource](./foundation-comms.defaultdatasource.md) > [deinit](./foundation-comms.defaultdatasource.deinit.md)
|
4
4
|
|
5
|
-
## DefaultDatasource.
|
5
|
+
## DefaultDatasource.deinit() method
|
6
6
|
|
7
7
|
**Signature:**
|
8
8
|
|
9
9
|
```typescript
|
10
|
-
|
10
|
+
deinit(): void;
|
11
11
|
```
|
12
12
|
**Returns:**
|
13
13
|
|
14
|
-
|
14
|
+
void
|
15
15
|
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
## DefaultDatasource.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
|
-
|