@genesislcap/foundation-comms 14.291.2-alpha-f8334d9.0 → 14.291.2-alpha-39f1157.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dts/connect/connect.d.ts.map +1 -1
- package/dist/dts/connect/connect.events.d.ts +64 -0
- package/dist/dts/connect/connect.events.d.ts.map +1 -1
- package/dist/dts/connect/http.connect.d.ts.map +1 -1
- package/dist/dts/datasource/datasource.config.d.ts.map +1 -1
- package/dist/dts/datasource/datasource.d.ts +12 -15
- package/dist/dts/datasource/datasource.d.ts.map +1 -1
- package/dist/dts/datasource/datasource.types.d.ts +5 -0
- package/dist/dts/datasource/datasource.types.d.ts.map +1 -1
- package/dist/dts/testing/mocks/datasource/datasource.d.ts +1 -0
- package/dist/dts/testing/mocks/datasource/datasource.d.ts.map +1 -1
- package/dist/esm/connect/connect.events.js +42 -0
- package/dist/esm/connect/connect.js +5 -1
- package/dist/esm/connect/http.connect.js +4 -3
- package/dist/esm/connect/http.connect.types.js +3 -3
- package/dist/esm/datasource/datasource.config.js +1 -0
- package/dist/esm/datasource/datasource.js +39 -46
- package/dist/esm/testing/mocks/datasource/datasource.js +3 -0
- package/dist/foundation-comms.api.json +977 -68
- package/dist/foundation-comms.d.ts +87 -14
- package/docs/api/foundation-comms.commitackevent.md +14 -0
- package/docs/api/foundation-comms.commitackeventdetail.md +17 -0
- package/docs/api/foundation-comms.commitackeventtype.md +12 -0
- package/docs/api/foundation-comms.commitresponseevent.md +14 -0
- package/docs/api/foundation-comms.commitresponseeventdetail.md +17 -0
- package/docs/api/foundation-comms.commitresponseeventtype.md +12 -0
- package/docs/api/foundation-comms.connectevents.addcommitacklistener.md +24 -0
- package/docs/api/foundation-comms.connectevents.addcommitresponselistener.md +24 -0
- package/docs/api/foundation-comms.connectevents.md +2 -0
- package/docs/api/foundation-comms.connecteventsemitter.md +2 -0
- package/docs/api/foundation-comms.connecteventsemitter.oncommitackevent.md +25 -0
- package/docs/api/foundation-comms.connecteventsemitter.oncommitresponseevent.md +25 -0
- package/docs/api/foundation-comms.datasource.md +1 -0
- package/docs/api/foundation-comms.datasource.triggerpoll.md +17 -0
- package/docs/api/foundation-comms.datasourceoptions.md +1 -0
- package/docs/api/foundation-comms.datasourceoptions.polltriggerevents.md +18 -0
- package/docs/api/foundation-comms.defaultconnectevents.addcommitacklistener.md +24 -0
- package/docs/api/foundation-comms.defaultconnectevents.addcommitresponselistener.md +24 -0
- package/docs/api/foundation-comms.defaultconnectevents.md +4 -0
- package/docs/api/foundation-comms.defaultconnectevents.oncommitackevent.md +25 -0
- package/docs/api/foundation-comms.defaultconnectevents.oncommitresponseevent.md +25 -0
- package/docs/api/foundation-comms.defaultdatasource.allparams.md +11 -0
- package/docs/api/foundation-comms.defaultdatasource.connectevents.md +11 -0
- package/docs/api/foundation-comms.defaultdatasource.dataserverparams.md +11 -0
- package/docs/api/foundation-comms.defaultdatasource.md +5 -0
- package/docs/api/foundation-comms.defaultdatasource.requestparams.md +11 -0
- package/docs/api/foundation-comms.defaultdatasource.triggerpoll.md +15 -0
- package/docs/api/foundation-comms.md +6 -0
- package/docs/api-report.md +62 -6
- package/package.json +13 -13
@@ -155,6 +155,24 @@ export declare type BasicCredentialsInput = {
|
|
155
155
|
password: string;
|
156
156
|
};
|
157
157
|
|
158
|
+
/**
|
159
|
+
* @public
|
160
|
+
*/
|
161
|
+
export declare type CommitAckEvent = CustomEvent<CommitAckEventDetail>;
|
162
|
+
|
163
|
+
/**
|
164
|
+
* @public
|
165
|
+
*/
|
166
|
+
export declare type CommitAckEventDetail = {
|
167
|
+
eventName: string;
|
168
|
+
ack: Message;
|
169
|
+
};
|
170
|
+
|
171
|
+
/**
|
172
|
+
* @public
|
173
|
+
*/
|
174
|
+
export declare const CommitAckEventType = "connect-commit-ack-event";
|
175
|
+
|
158
176
|
/**
|
159
177
|
* @public
|
160
178
|
*/
|
@@ -185,6 +203,24 @@ export declare type CommitParams = {
|
|
185
203
|
[key: string]: any;
|
186
204
|
};
|
187
205
|
|
206
|
+
/**
|
207
|
+
* @public
|
208
|
+
*/
|
209
|
+
export declare type CommitResponseEvent = CustomEvent<CommitResponseEventDetail>;
|
210
|
+
|
211
|
+
/**
|
212
|
+
* @public
|
213
|
+
*/
|
214
|
+
export declare type CommitResponseEventDetail = {
|
215
|
+
eventName: string;
|
216
|
+
response: Message;
|
217
|
+
};
|
218
|
+
|
219
|
+
/**
|
220
|
+
* @public
|
221
|
+
*/
|
222
|
+
export declare const CommitResponseEventType = "connect-commit-response-event";
|
223
|
+
|
188
224
|
/**
|
189
225
|
* Represents a connection and its capabilities on a remote server
|
190
226
|
* Provides methods to send and receive messages, as well as metadata and schema information.
|
@@ -405,6 +441,16 @@ export declare interface ConnectEvents {
|
|
405
441
|
* @param listener - A listener callback function.
|
406
442
|
*/
|
407
443
|
addMetadataListener(listener: Listener<MetadataEvent>): () => void;
|
444
|
+
/**
|
445
|
+
* Add a commit ack listener.
|
446
|
+
* @param listener - A listener callback function.
|
447
|
+
*/
|
448
|
+
addCommitAckListener(listener: Listener<CommitAckEvent>): () => void;
|
449
|
+
/**
|
450
|
+
* Add a commit response listener (fires for both ack and nack).
|
451
|
+
* @param listener - A listener callback function.
|
452
|
+
*/
|
453
|
+
addCommitResponseListener(listener: Listener<CommitResponseEvent>): () => void;
|
408
454
|
}
|
409
455
|
|
410
456
|
/**
|
@@ -457,6 +503,18 @@ export declare interface ConnectEventsEmitter extends ConnectEvents {
|
|
457
503
|
* @param error - Optional error.
|
458
504
|
*/
|
459
505
|
onMetadataEvent(resourceName: string, message: Message<MessageDetails.MetaRequest>, error?: any): void;
|
506
|
+
/**
|
507
|
+
* Called by Connect when a commit ack is received.
|
508
|
+
* @param eventName - The name of the event.
|
509
|
+
* @param ack - The ack message from the server.
|
510
|
+
*/
|
511
|
+
onCommitAckEvent(eventName: string, ack: Message): void;
|
512
|
+
/**
|
513
|
+
* Called by Connect when a commit response (ack or nack) is received.
|
514
|
+
* @param eventName - The name of the event.
|
515
|
+
* @param response - The response message from the server (ack or nack).
|
516
|
+
*/
|
517
|
+
onCommitResponseEvent(eventName: string, response: Message): void;
|
460
518
|
}
|
461
519
|
|
462
520
|
/**
|
@@ -995,6 +1053,11 @@ export declare interface Datasource extends DatasourceMetadata {
|
|
995
1053
|
* @returns A promise that resolves when the item has been updated.
|
996
1054
|
*/
|
997
1055
|
updateItem?(itemId: string, data: any): Promise<void>;
|
1056
|
+
/**
|
1057
|
+
* Triggers a manual poll of the data source.
|
1058
|
+
* @public
|
1059
|
+
*/
|
1060
|
+
triggerPoll(): void;
|
998
1061
|
}
|
999
1062
|
|
1000
1063
|
/**
|
@@ -1426,6 +1489,7 @@ export declare interface DatasourceMetadata {
|
|
1426
1489
|
* @internal
|
1427
1490
|
*/
|
1428
1491
|
export declare class DatasourceMock implements Datasource {
|
1492
|
+
triggerPoll(): void;
|
1429
1493
|
status: DatasourceStatus;
|
1430
1494
|
fetchMetadataRequired: boolean;
|
1431
1495
|
protected fetchingMetadata: boolean;
|
@@ -1539,6 +1603,11 @@ export declare interface DatasourceOptions {
|
|
1539
1603
|
* @remarks Only works with REQUEST_SERVER resources.
|
1540
1604
|
*/
|
1541
1605
|
request?: any;
|
1606
|
+
/**
|
1607
|
+
* Array of event names that will trigger an additional poll.
|
1608
|
+
* @remarks Only works with REQUEST_SERVER resources.
|
1609
|
+
*/
|
1610
|
+
pollTriggerEvents?: string[];
|
1542
1611
|
/**
|
1543
1612
|
* Whether the Datasource service will setup RQUEST object based on metadata.
|
1544
1613
|
* @remarks Default is `true`. Only works with REQUEST_SERVER resources.
|
@@ -1723,6 +1792,18 @@ export declare class DefaultConnectEvents implements ConnectEventsEmitter {
|
|
1723
1792
|
addMetadataListener(listener: Listener<MetadataEvent>): () => void;
|
1724
1793
|
/** {@inheritDoc ConnectEventsEmitter.onMetadataEvent} */
|
1725
1794
|
onMetadataEvent(resourceName: string, message: Message<MessageDetails.MetaRequest>, error?: any): void;
|
1795
|
+
/** @internal */
|
1796
|
+
protected commitAckListeners: Observer<CommitAckEvent>;
|
1797
|
+
/** {@inheritDoc ConnectEvents.addCommitAckListener} */
|
1798
|
+
addCommitAckListener(listener: Listener<CommitAckEvent>): () => void;
|
1799
|
+
/** {@inheritDoc ConnectEventsEmitter.onCommitAckEvent} */
|
1800
|
+
onCommitAckEvent(eventName: string, ack: Message): void;
|
1801
|
+
/** @internal */
|
1802
|
+
protected commitResponseListeners: Observer<CommitResponseEvent>;
|
1803
|
+
/** {@inheritDoc ConnectEvents.addCommitResponseListener} */
|
1804
|
+
addCommitResponseListener(listener: Listener<CommitResponseEvent>): () => void;
|
1805
|
+
/** {@inheritDoc ConnectEventsEmitter.onCommitResponseEvent} */
|
1806
|
+
onCommitResponseEvent(eventName: string, response: Message): void;
|
1726
1807
|
}
|
1727
1808
|
|
1728
1809
|
/**
|
@@ -1805,8 +1886,10 @@ export declare class DefaultDatasource implements Datasource {
|
|
1805
1886
|
protected options: DatasourceOptions;
|
1806
1887
|
resourceType: ResourceType;
|
1807
1888
|
stream: SocketObservable<FilteredDataServerResult | RequestServerResult>;
|
1808
|
-
|
1889
|
+
protected connectEvents: ConnectEvents;
|
1809
1890
|
constructor(connect: Connect, auth: Auth, resources: GenesisResources, config: DatasourceConfig);
|
1891
|
+
private pollTrigger$;
|
1892
|
+
triggerPoll(): void;
|
1810
1893
|
/**
|
1811
1894
|
* @deprecated - Please use {@link (GenesisResources:interface).isValidResource} instead.
|
1812
1895
|
*/
|
@@ -1815,18 +1898,9 @@ export declare class DefaultDatasource implements Datasource {
|
|
1815
1898
|
startStream(): Promise<void>;
|
1816
1899
|
/** {@inheritDoc Datasource.destroy} */
|
1817
1900
|
destroy(): void;
|
1818
|
-
|
1819
|
-
|
1820
|
-
|
1821
|
-
get allResourceParams(): DataserverParams & RequestParams;
|
1822
|
-
/**
|
1823
|
-
* @internal
|
1824
|
-
*/
|
1825
|
-
get dataserverOnlyParams(): DataserverParams;
|
1826
|
-
/**
|
1827
|
-
* @internal
|
1828
|
-
*/
|
1829
|
-
get requestOnlyParams(): RequestParams;
|
1901
|
+
get allParams(): any;
|
1902
|
+
get dataserverParams(): DataserverParams;
|
1903
|
+
get requestParams(): RequestParams;
|
1830
1904
|
snapshot(overrideParams?: any): Promise<Message>;
|
1831
1905
|
snapshotFiltered(rowId?: string): Promise<any[]>;
|
1832
1906
|
private createStream;
|
@@ -1841,7 +1915,6 @@ export declare class DefaultDatasource implements Datasource {
|
|
1841
1915
|
* @internal
|
1842
1916
|
*/
|
1843
1917
|
protected normaliseStatus(status: Partial<DatasourceStatus>): DatasourceStatus;
|
1844
|
-
private invalidateCache;
|
1845
1918
|
}
|
1846
1919
|
|
1847
1920
|
/**
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [CommitAckEvent](./foundation-comms.commitackevent.md)
|
4
|
+
|
5
|
+
## CommitAckEvent type
|
6
|
+
|
7
|
+
|
8
|
+
**Signature:**
|
9
|
+
|
10
|
+
```typescript
|
11
|
+
export type CommitAckEvent = CustomEvent<CommitAckEventDetail>;
|
12
|
+
```
|
13
|
+
**References:** [CommitAckEventDetail](./foundation-comms.commitackeventdetail.md)
|
14
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [CommitAckEventDetail](./foundation-comms.commitackeventdetail.md)
|
4
|
+
|
5
|
+
## CommitAckEventDetail type
|
6
|
+
|
7
|
+
|
8
|
+
**Signature:**
|
9
|
+
|
10
|
+
```typescript
|
11
|
+
export type CommitAckEventDetail = {
|
12
|
+
eventName: string;
|
13
|
+
ack: Message;
|
14
|
+
};
|
15
|
+
```
|
16
|
+
**References:** [Message](./foundation-comms.message.md)
|
17
|
+
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [CommitAckEventType](./foundation-comms.commitackeventtype.md)
|
4
|
+
|
5
|
+
## CommitAckEventType variable
|
6
|
+
|
7
|
+
|
8
|
+
**Signature:**
|
9
|
+
|
10
|
+
```typescript
|
11
|
+
CommitAckEventType = "connect-commit-ack-event"
|
12
|
+
```
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [CommitResponseEvent](./foundation-comms.commitresponseevent.md)
|
4
|
+
|
5
|
+
## CommitResponseEvent type
|
6
|
+
|
7
|
+
|
8
|
+
**Signature:**
|
9
|
+
|
10
|
+
```typescript
|
11
|
+
export type CommitResponseEvent = CustomEvent<CommitResponseEventDetail>;
|
12
|
+
```
|
13
|
+
**References:** [CommitResponseEventDetail](./foundation-comms.commitresponseeventdetail.md)
|
14
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [CommitResponseEventDetail](./foundation-comms.commitresponseeventdetail.md)
|
4
|
+
|
5
|
+
## CommitResponseEventDetail type
|
6
|
+
|
7
|
+
|
8
|
+
**Signature:**
|
9
|
+
|
10
|
+
```typescript
|
11
|
+
export type CommitResponseEventDetail = {
|
12
|
+
eventName: string;
|
13
|
+
response: Message;
|
14
|
+
};
|
15
|
+
```
|
16
|
+
**References:** [Message](./foundation-comms.message.md)
|
17
|
+
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [CommitResponseEventType](./foundation-comms.commitresponseeventtype.md)
|
4
|
+
|
5
|
+
## CommitResponseEventType variable
|
6
|
+
|
7
|
+
|
8
|
+
**Signature:**
|
9
|
+
|
10
|
+
```typescript
|
11
|
+
CommitResponseEventType = "connect-commit-response-event"
|
12
|
+
```
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [ConnectEvents](./foundation-comms.connectevents.md) > [addCommitAckListener](./foundation-comms.connectevents.addcommitacklistener.md)
|
4
|
+
|
5
|
+
## ConnectEvents.addCommitAckListener() method
|
6
|
+
|
7
|
+
Add a commit ack listener.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
addCommitAckListener(listener: Listener<CommitAckEvent>): () => void;
|
13
|
+
```
|
14
|
+
|
15
|
+
## Parameters
|
16
|
+
|
17
|
+
| Parameter | Type | Description |
|
18
|
+
| --- | --- | --- |
|
19
|
+
| listener | Listener<[CommitAckEvent](./foundation-comms.commitackevent.md)<!-- -->> | A listener callback function. |
|
20
|
+
|
21
|
+
**Returns:**
|
22
|
+
|
23
|
+
() => void
|
24
|
+
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [ConnectEvents](./foundation-comms.connectevents.md) > [addCommitResponseListener](./foundation-comms.connectevents.addcommitresponselistener.md)
|
4
|
+
|
5
|
+
## ConnectEvents.addCommitResponseListener() method
|
6
|
+
|
7
|
+
Add a commit response listener (fires for both ack and nack).
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
addCommitResponseListener(listener: Listener<CommitResponseEvent>): () => void;
|
13
|
+
```
|
14
|
+
|
15
|
+
## Parameters
|
16
|
+
|
17
|
+
| Parameter | Type | Description |
|
18
|
+
| --- | --- | --- |
|
19
|
+
| listener | Listener<[CommitResponseEvent](./foundation-comms.commitresponseevent.md)<!-- -->> | A listener callback function. |
|
20
|
+
|
21
|
+
**Returns:**
|
22
|
+
|
23
|
+
() => void
|
24
|
+
|
@@ -16,7 +16,9 @@ export interface ConnectEvents
|
|
16
16
|
|
17
17
|
| Method | Description |
|
18
18
|
| --- | --- |
|
19
|
+
| [addCommitAckListener(listener)](./foundation-comms.connectevents.addcommitacklistener.md) | Add a commit ack listener. |
|
19
20
|
| [addCommitListener(listener)](./foundation-comms.connectevents.addcommitlistener.md) | Add a commit listener. |
|
21
|
+
| [addCommitResponseListener(listener)](./foundation-comms.connectevents.addcommitresponselistener.md) | Add a commit response listener (fires for both ack and nack). |
|
20
22
|
| [addMetadataListener(listener)](./foundation-comms.connectevents.addmetadatalistener.md) | Add a metadata listener. |
|
21
23
|
| [addStreamListener(listener, complete, error)](./foundation-comms.connectevents.addstreamlistener.md) | Add a stream listener. |
|
22
24
|
|
@@ -17,7 +17,9 @@ export interface ConnectEventsEmitter extends ConnectEvents
|
|
17
17
|
|
18
18
|
| Method | Description |
|
19
19
|
| --- | --- |
|
20
|
+
| [onCommitAckEvent(eventName, ack)](./foundation-comms.connecteventsemitter.oncommitackevent.md) | Called by Connect when a commit ack is received. |
|
20
21
|
| [onCommitEvent(eventName, message)](./foundation-comms.connecteventsemitter.oncommitevent.md) | Called by Connect. |
|
22
|
+
| [onCommitResponseEvent(eventName, response)](./foundation-comms.connecteventsemitter.oncommitresponseevent.md) | Called by Connect when a commit response (ack or nack) is received. |
|
21
23
|
| [onMetadataEvent(resourceName, message, error)](./foundation-comms.connecteventsemitter.onmetadataevent.md) | Called by Connect. |
|
22
24
|
| [onStreamCompleteEvent(resourceName, stream)](./foundation-comms.connecteventsemitter.onstreamcompleteevent.md) | Called by Connect. |
|
23
25
|
| [onStreamErrorEvent(resourceName, stream, error)](./foundation-comms.connecteventsemitter.onstreamerrorevent.md) | Called by Connect. |
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [ConnectEventsEmitter](./foundation-comms.connecteventsemitter.md) > [onCommitAckEvent](./foundation-comms.connecteventsemitter.oncommitackevent.md)
|
4
|
+
|
5
|
+
## ConnectEventsEmitter.onCommitAckEvent() method
|
6
|
+
|
7
|
+
Called by Connect when a commit ack is received.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
onCommitAckEvent(eventName: string, ack: Message): void;
|
13
|
+
```
|
14
|
+
|
15
|
+
## Parameters
|
16
|
+
|
17
|
+
| Parameter | Type | Description |
|
18
|
+
| --- | --- | --- |
|
19
|
+
| eventName | string | The name of the event. |
|
20
|
+
| ack | [Message](./foundation-comms.message.md) | The ack message from the server. |
|
21
|
+
|
22
|
+
**Returns:**
|
23
|
+
|
24
|
+
void
|
25
|
+
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [ConnectEventsEmitter](./foundation-comms.connecteventsemitter.md) > [onCommitResponseEvent](./foundation-comms.connecteventsemitter.oncommitresponseevent.md)
|
4
|
+
|
5
|
+
## ConnectEventsEmitter.onCommitResponseEvent() method
|
6
|
+
|
7
|
+
Called by Connect when a commit response (ack or nack) is received.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
onCommitResponseEvent(eventName: string, response: Message): void;
|
13
|
+
```
|
14
|
+
|
15
|
+
## Parameters
|
16
|
+
|
17
|
+
| Parameter | Type | Description |
|
18
|
+
| --- | --- | --- |
|
19
|
+
| eventName | string | The name of the event. |
|
20
|
+
| response | [Message](./foundation-comms.message.md) | The response message from the server (ack or nack). |
|
21
|
+
|
22
|
+
**Returns:**
|
23
|
+
|
24
|
+
void
|
25
|
+
|
@@ -44,6 +44,7 @@ The public interface available on the injected store fragment.
|
|
44
44
|
| [snapshot(overrideParams)](./foundation-comms.datasource.snapshot.md) | Takes a snapshot of the data in the datasource. |
|
45
45
|
| [snapshotFiltered(rowId)](./foundation-comms.datasource.snapshotfiltered.md) | Takes a filtered snapshot of the data in the datasource. |
|
46
46
|
| [startStream()](./foundation-comms.datasource.startstream.md) | Starts the data stream for the datasource. |
|
47
|
+
| [triggerPoll()](./foundation-comms.datasource.triggerpoll.md) | Triggers a manual poll of the data source. |
|
47
48
|
| [updateData(data)?](./foundation-comms.datasource.updatedata.md) | _(Optional)_ Updates the data in the datasource with the specified data. |
|
48
49
|
| [updateItem(itemId, data)?](./foundation-comms.datasource.updateitem.md) | _(Optional)_ Updates an item in the datasource with the given ID and data. |
|
49
50
|
| [validResourceName(resourceName)](./foundation-comms.datasource.validresourcename.md) | Indicates whether the resourceName is valid or not. |
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [Datasource](./foundation-comms.datasource.md) > [triggerPoll](./foundation-comms.datasource.triggerpoll.md)
|
4
|
+
|
5
|
+
## Datasource.triggerPoll() method
|
6
|
+
|
7
|
+
Triggers a manual poll of the data source.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
triggerPoll(): void;
|
13
|
+
```
|
14
|
+
**Returns:**
|
15
|
+
|
16
|
+
void
|
17
|
+
|
@@ -25,6 +25,7 @@ export interface DatasourceOptions
|
|
25
25
|
| [movingView?](./foundation-comms.datasourceoptions.movingview.md) | | boolean | _(Optional)_ Defines the behaviour of the client view when new rows are received in real time. |
|
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
|
+
| [pollTriggerEvents?](./foundation-comms.datasourceoptions.polltriggerevents.md) | | string\[\] | _(Optional)_ Array of event names that will trigger an additional poll. |
|
28
29
|
| [request?](./foundation-comms.datasourceoptions.request.md) | | any | _(Optional)_ The request to send to the server. |
|
29
30
|
| [requestAutoSetup?](./foundation-comms.datasourceoptions.requestautosetup.md) | | boolean | _(Optional)_ Whether the Datasource service will setup RQUEST object based on metadata. |
|
30
31
|
| [resourceName?](./foundation-comms.datasourceoptions.resourcename.md) | | string | _(Optional)_ The name of the resource to use for the datasource. |
|
@@ -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) > [pollTriggerEvents](./foundation-comms.datasourceoptions.polltriggerevents.md)
|
4
|
+
|
5
|
+
## DatasourceOptions.pollTriggerEvents property
|
6
|
+
|
7
|
+
Array of event names that will trigger an additional poll.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
pollTriggerEvents?: string[];
|
13
|
+
```
|
14
|
+
|
15
|
+
## Remarks
|
16
|
+
|
17
|
+
Only works with REQUEST\_SERVER resources.
|
18
|
+
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [DefaultConnectEvents](./foundation-comms.defaultconnectevents.md) > [addCommitAckListener](./foundation-comms.defaultconnectevents.addcommitacklistener.md)
|
4
|
+
|
5
|
+
## DefaultConnectEvents.addCommitAckListener() method
|
6
|
+
|
7
|
+
Add a commit ack listener.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
addCommitAckListener(listener: Listener<CommitAckEvent>): () => void;
|
13
|
+
```
|
14
|
+
|
15
|
+
## Parameters
|
16
|
+
|
17
|
+
| Parameter | Type | Description |
|
18
|
+
| --- | --- | --- |
|
19
|
+
| listener | Listener<[CommitAckEvent](./foundation-comms.commitackevent.md)<!-- -->> | A listener callback function. |
|
20
|
+
|
21
|
+
**Returns:**
|
22
|
+
|
23
|
+
() => void
|
24
|
+
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [DefaultConnectEvents](./foundation-comms.defaultconnectevents.md) > [addCommitResponseListener](./foundation-comms.defaultconnectevents.addcommitresponselistener.md)
|
4
|
+
|
5
|
+
## DefaultConnectEvents.addCommitResponseListener() method
|
6
|
+
|
7
|
+
Add a commit response listener (fires for both ack and nack).
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
addCommitResponseListener(listener: Listener<CommitResponseEvent>): () => void;
|
13
|
+
```
|
14
|
+
|
15
|
+
## Parameters
|
16
|
+
|
17
|
+
| Parameter | Type | Description |
|
18
|
+
| --- | --- | --- |
|
19
|
+
| listener | Listener<[CommitResponseEvent](./foundation-comms.commitresponseevent.md)<!-- -->> | A listener callback function. |
|
20
|
+
|
21
|
+
**Returns:**
|
22
|
+
|
23
|
+
() => void
|
24
|
+
|
@@ -17,10 +17,14 @@ export declare class DefaultConnectEvents implements ConnectEventsEmitter
|
|
17
17
|
|
18
18
|
| Method | Modifiers | Description |
|
19
19
|
| --- | --- | --- |
|
20
|
+
| [addCommitAckListener(listener)](./foundation-comms.defaultconnectevents.addcommitacklistener.md) | | Add a commit ack listener. |
|
20
21
|
| [addCommitListener(listener)](./foundation-comms.defaultconnectevents.addcommitlistener.md) | | Add a commit listener. |
|
22
|
+
| [addCommitResponseListener(listener)](./foundation-comms.defaultconnectevents.addcommitresponselistener.md) | | Add a commit response listener (fires for both ack and nack). |
|
21
23
|
| [addMetadataListener(listener)](./foundation-comms.defaultconnectevents.addmetadatalistener.md) | | Add a metadata listener. |
|
22
24
|
| [addStreamListener(listener, complete, error)](./foundation-comms.defaultconnectevents.addstreamlistener.md) | | Add a stream listener. |
|
25
|
+
| [onCommitAckEvent(eventName, ack)](./foundation-comms.defaultconnectevents.oncommitackevent.md) | | Called by Connect when a commit ack is received. |
|
23
26
|
| [onCommitEvent(eventName, message)](./foundation-comms.defaultconnectevents.oncommitevent.md) | | Called by Connect. |
|
27
|
+
| [onCommitResponseEvent(eventName, response)](./foundation-comms.defaultconnectevents.oncommitresponseevent.md) | | Called by Connect when a commit response (ack or nack) is received. |
|
24
28
|
| [onMetadataEvent(resourceName, message, error)](./foundation-comms.defaultconnectevents.onmetadataevent.md) | | Called by Connect. |
|
25
29
|
| [onStreamCompleteEvent(resourceName, stream)](./foundation-comms.defaultconnectevents.onstreamcompleteevent.md) | | Called by Connect. |
|
26
30
|
| [onStreamErrorEvent(resourceName, stream, error)](./foundation-comms.defaultconnectevents.onstreamerrorevent.md) | | Called by Connect. |
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [DefaultConnectEvents](./foundation-comms.defaultconnectevents.md) > [onCommitAckEvent](./foundation-comms.defaultconnectevents.oncommitackevent.md)
|
4
|
+
|
5
|
+
## DefaultConnectEvents.onCommitAckEvent() method
|
6
|
+
|
7
|
+
Called by Connect when a commit ack is received.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
onCommitAckEvent(eventName: string, ack: Message): void;
|
13
|
+
```
|
14
|
+
|
15
|
+
## Parameters
|
16
|
+
|
17
|
+
| Parameter | Type | Description |
|
18
|
+
| --- | --- | --- |
|
19
|
+
| eventName | string | The name of the event. |
|
20
|
+
| ack | [Message](./foundation-comms.message.md) | The ack message from the server. |
|
21
|
+
|
22
|
+
**Returns:**
|
23
|
+
|
24
|
+
void
|
25
|
+
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [DefaultConnectEvents](./foundation-comms.defaultconnectevents.md) > [onCommitResponseEvent](./foundation-comms.defaultconnectevents.oncommitresponseevent.md)
|
4
|
+
|
5
|
+
## DefaultConnectEvents.onCommitResponseEvent() method
|
6
|
+
|
7
|
+
Called by Connect when a commit response (ack or nack) is received.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
onCommitResponseEvent(eventName: string, response: Message): void;
|
13
|
+
```
|
14
|
+
|
15
|
+
## Parameters
|
16
|
+
|
17
|
+
| Parameter | Type | Description |
|
18
|
+
| --- | --- | --- |
|
19
|
+
| eventName | string | The name of the event. |
|
20
|
+
| response | [Message](./foundation-comms.message.md) | The response message from the server (ack or nack). |
|
21
|
+
|
22
|
+
**Returns:**
|
23
|
+
|
24
|
+
void
|
25
|
+
|
@@ -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) > [DefaultDatasource](./foundation-comms.defaultdatasource.md) > [allParams](./foundation-comms.defaultdatasource.allparams.md)
|
4
|
+
|
5
|
+
## DefaultDatasource.allParams property
|
6
|
+
|
7
|
+
**Signature:**
|
8
|
+
|
9
|
+
```typescript
|
10
|
+
get allParams(): any;
|
11
|
+
```
|
@@ -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) > [DefaultDatasource](./foundation-comms.defaultdatasource.md) > [connectEvents](./foundation-comms.defaultdatasource.connectevents.md)
|
4
|
+
|
5
|
+
## DefaultDatasource.connectEvents property
|
6
|
+
|
7
|
+
**Signature:**
|
8
|
+
|
9
|
+
```typescript
|
10
|
+
protected connectEvents: ConnectEvents;
|
11
|
+
```
|
@@ -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) > [DefaultDatasource](./foundation-comms.defaultdatasource.md) > [dataserverParams](./foundation-comms.defaultdatasource.dataserverparams.md)
|
4
|
+
|
5
|
+
## DefaultDatasource.dataserverParams property
|
6
|
+
|
7
|
+
**Signature:**
|
8
|
+
|
9
|
+
```typescript
|
10
|
+
get dataserverParams(): DataserverParams;
|
11
|
+
```
|
@@ -23,11 +23,14 @@ export declare class DefaultDatasource implements Datasource
|
|
23
23
|
|
24
24
|
| Property | Modifiers | Type | Description |
|
25
25
|
| --- | --- | --- | --- |
|
26
|
+
| [allParams](./foundation-comms.defaultdatasource.allparams.md) | <code>readonly</code> | any | |
|
26
27
|
| [auth](./foundation-comms.defaultdatasource.auth.md) | <code>protected</code> | [Auth](./foundation-comms.auth.md) | |
|
27
28
|
| [availableIndexes](./foundation-comms.defaultdatasource.availableindexes.md) | | [IndexDetail](./foundation-comms.indexdetail.md)<!-- -->\[\] | |
|
28
29
|
| [config](./foundation-comms.defaultdatasource.config.md) | <code>protected</code> | [DatasourceConfig](./foundation-comms.datasourceconfig.md) | |
|
29
30
|
| [connect](./foundation-comms.defaultdatasource.connect.md) | <code>protected</code> | [Connect](./foundation-comms.connect.md) | |
|
31
|
+
| [connectEvents](./foundation-comms.defaultdatasource.connectevents.md) | <code>protected</code> | [ConnectEvents](./foundation-comms.connectevents.md) | |
|
30
32
|
| [customRequestFields](./foundation-comms.defaultdatasource.customrequestfields.md) | | [MetadataDetail](./foundation-comms.metadatadetail.md)<!-- -->\[\] | |
|
33
|
+
| [dataserverParams](./foundation-comms.defaultdatasource.dataserverparams.md) | <code>readonly</code> | [DataserverParams](./foundation-comms.dataserverparams.md) | |
|
31
34
|
| [fetchMetadataRequired](./foundation-comms.defaultdatasource.fetchmetadatarequired.md) | | boolean | |
|
32
35
|
| [fieldMetadata](./foundation-comms.defaultdatasource.fieldmetadata.md) | | [FieldMetadata](./foundation-comms.fieldmetadata.md)<!-- -->\[\] | |
|
33
36
|
| [initialized](./foundation-comms.defaultdatasource.initialized.md) | <code>readonly</code> | boolean | Indicates whether the datasource has been initialized. |
|
@@ -35,6 +38,7 @@ export declare class DefaultDatasource implements Datasource
|
|
35
38
|
| [originalFieldDef](./foundation-comms.defaultdatasource.originalfielddef.md) | | [MetadataDetail](./foundation-comms.metadatadetail.md)<!-- -->\[\] | |
|
36
39
|
| [readOnly](./foundation-comms.defaultdatasource.readonly.md) | | boolean | |
|
37
40
|
| [requestFields](./foundation-comms.defaultdatasource.requestfields.md) | | [MetadataDetail](./foundation-comms.metadatadetail.md)<!-- -->\[\] | |
|
41
|
+
| [requestParams](./foundation-comms.defaultdatasource.requestparams.md) | <code>readonly</code> | [RequestParams](./foundation-comms.requestparams.md) | |
|
38
42
|
| [resources](./foundation-comms.defaultdatasource.resources.md) | <code>protected</code> | [GenesisResources](./foundation-comms.genesisresources.md) | |
|
39
43
|
| [resourceType](./foundation-comms.defaultdatasource.resourcetype.md) | | [ResourceType](./foundation-comms.resourcetype.md) | |
|
40
44
|
| [startStreamRequired](./foundation-comms.defaultdatasource.startstreamrequired.md) | | boolean | |
|
@@ -51,5 +55,6 @@ export declare class DefaultDatasource implements Datasource
|
|
51
55
|
| [snapshot(overrideParams)](./foundation-comms.defaultdatasource.snapshot.md) | | |
|
52
56
|
| [snapshotFiltered(rowId)](./foundation-comms.defaultdatasource.snapshotfiltered.md) | | |
|
53
57
|
| [startStream()](./foundation-comms.defaultdatasource.startstream.md) | | |
|
58
|
+
| [triggerPoll()](./foundation-comms.defaultdatasource.triggerpoll.md) | | |
|
54
59
|
| [validResourceName(resourceName)](./foundation-comms.defaultdatasource.validresourcename.md) | | |
|
55
60
|
|
@@ -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) > [DefaultDatasource](./foundation-comms.defaultdatasource.md) > [requestParams](./foundation-comms.defaultdatasource.requestparams.md)
|
4
|
+
|
5
|
+
## DefaultDatasource.requestParams property
|
6
|
+
|
7
|
+
**Signature:**
|
8
|
+
|
9
|
+
```typescript
|
10
|
+
get requestParams(): RequestParams;
|
11
|
+
```
|