@genesislcap/foundation-comms 14.199.1 → 14.199.2-alpha-1ab46f4.0

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