@genesislcap/foundation-comms 14.294.0 → 14.295.1-alpha-523bee0.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 +47 -0
- package/dist/dts/connect/connect.events.d.ts.map +1 -1
- package/dist/dts/datasource/datasource.config.d.ts.map +1 -1
- package/dist/dts/datasource/datasource.d.ts +6 -2
- 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/auth/auth.d.ts +3 -0
- package/dist/dts/testing/mocks/auth/auth.d.ts.map +1 -1
- package/dist/dts/testing/mocks/connect/connectEvents.d.ts +68 -0
- package/dist/dts/testing/mocks/connect/connectEvents.d.ts.map +1 -0
- package/dist/dts/testing/mocks/connect/index.d.ts +1 -0
- package/dist/dts/testing/mocks/connect/index.d.ts.map +1 -1
- package/dist/esm/connect/connect.events.js +25 -0
- package/dist/esm/connect/connect.js +4 -1
- package/dist/esm/datasource/datasource.config.js +1 -0
- package/dist/esm/datasource/datasource.js +37 -12
- package/dist/esm/testing/mocks/auth/auth.js +8 -0
- package/dist/esm/testing/mocks/connect/connectEvents.js +75 -0
- package/dist/esm/testing/mocks/connect/index.js +1 -0
- package/dist/foundation-comms.api.json +527 -0
- package/dist/foundation-comms.d.ts +150 -1
- 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.addcommitresponselistener.md +24 -0
- package/docs/api/foundation-comms.connectevents.md +1 -0
- package/docs/api/foundation-comms.connecteventsemitter.md +1 -0
- package/docs/api/foundation-comms.connecteventsemitter.oncommitresponseevent.md +25 -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.addcommitresponselistener.md +24 -0
- package/docs/api/foundation-comms.defaultconnectevents.md +2 -0
- package/docs/api/foundation-comms.defaultconnectevents.oncommitresponseevent.md +25 -0
- package/docs/api/foundation-comms.defaultdatasource._constructor_.md +2 -1
- package/docs/api/foundation-comms.defaultdatasource.connectevents.md +11 -0
- package/docs/api/foundation-comms.defaultdatasource.md +2 -1
- package/docs/api/foundation-comms.md +6 -0
- package/docs/api-report.md +87 -1
- package/package.json +16 -15
|
@@ -114,6 +114,8 @@ export declare class AuthMock implements Auth {
|
|
|
114
114
|
loggedUserResult: LoginResult;
|
|
115
115
|
currentUser: User_2;
|
|
116
116
|
isLoggedIn: boolean;
|
|
117
|
+
private isLoggedInSubject;
|
|
118
|
+
get isLoggedIn$(): Observable<boolean>;
|
|
117
119
|
nextLoginResult: LoginResult;
|
|
118
120
|
nextLogoutResult: LogoutResult;
|
|
119
121
|
nextReAuthResult: boolean;
|
|
@@ -155,11 +157,38 @@ export declare type BasicCredentialsInput = {
|
|
|
155
157
|
password: string;
|
|
156
158
|
};
|
|
157
159
|
|
|
160
|
+
/**
|
|
161
|
+
* @public
|
|
162
|
+
*/
|
|
163
|
+
export declare type CommitAckEvent = CustomEvent<CommitAckEventDetail>;
|
|
164
|
+
|
|
165
|
+
declare type CommitAckEvent_2 = CustomEvent<CommitAckEventDetail_2>;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* @public
|
|
169
|
+
*/
|
|
170
|
+
export declare type CommitAckEventDetail = {
|
|
171
|
+
eventName: string;
|
|
172
|
+
ack: Message;
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
declare type CommitAckEventDetail_2 = {
|
|
176
|
+
eventName: string;
|
|
177
|
+
ack: Message_2;
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* @public
|
|
182
|
+
*/
|
|
183
|
+
export declare const CommitAckEventType = "connect-commit-ack-event";
|
|
184
|
+
|
|
158
185
|
/**
|
|
159
186
|
* @public
|
|
160
187
|
*/
|
|
161
188
|
export declare type CommitEvent = CustomEvent<CommitEventDetail>;
|
|
162
189
|
|
|
190
|
+
declare type CommitEvent_2 = CustomEvent<CommitEventDetail_2>;
|
|
191
|
+
|
|
163
192
|
/**
|
|
164
193
|
* @public
|
|
165
194
|
*/
|
|
@@ -168,6 +197,11 @@ export declare type CommitEventDetail = {
|
|
|
168
197
|
message: Message;
|
|
169
198
|
};
|
|
170
199
|
|
|
200
|
+
declare type CommitEventDetail_2 = {
|
|
201
|
+
eventName: string;
|
|
202
|
+
message: Message_2;
|
|
203
|
+
};
|
|
204
|
+
|
|
171
205
|
/**
|
|
172
206
|
* @public
|
|
173
207
|
*/
|
|
@@ -185,6 +219,31 @@ export declare type CommitParams = {
|
|
|
185
219
|
[key: string]: any;
|
|
186
220
|
};
|
|
187
221
|
|
|
222
|
+
/**
|
|
223
|
+
* @public
|
|
224
|
+
*/
|
|
225
|
+
export declare type CommitResponseEvent = CustomEvent<CommitResponseEventDetail>;
|
|
226
|
+
|
|
227
|
+
declare type CommitResponseEvent_2 = CustomEvent<CommitResponseEventDetail_2>;
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* @public
|
|
231
|
+
*/
|
|
232
|
+
export declare type CommitResponseEventDetail = {
|
|
233
|
+
eventName: string;
|
|
234
|
+
response: Message;
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
declare type CommitResponseEventDetail_2 = {
|
|
238
|
+
eventName: string;
|
|
239
|
+
response: Message_2;
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* @public
|
|
244
|
+
*/
|
|
245
|
+
export declare const CommitResponseEventType = "connect-commit-response-event";
|
|
246
|
+
|
|
188
247
|
/**
|
|
189
248
|
* Represents a connection and its capabilities on a remote server
|
|
190
249
|
* Provides methods to send and receive messages, as well as metadata and schema information.
|
|
@@ -405,6 +464,11 @@ export declare interface ConnectEvents {
|
|
|
405
464
|
* @param listener - A listener callback function.
|
|
406
465
|
*/
|
|
407
466
|
addMetadataListener(listener: Listener<MetadataEvent>): () => void;
|
|
467
|
+
/**
|
|
468
|
+
* Add a commit response listener (fires for both ack and nack).
|
|
469
|
+
* @param listener - A listener callback function.
|
|
470
|
+
*/
|
|
471
|
+
addCommitResponseListener(listener: Listener<CommitResponseEvent>): () => void;
|
|
408
472
|
}
|
|
409
473
|
|
|
410
474
|
/**
|
|
@@ -457,6 +521,12 @@ export declare interface ConnectEventsEmitter extends ConnectEvents {
|
|
|
457
521
|
* @param error - Optional error.
|
|
458
522
|
*/
|
|
459
523
|
onMetadataEvent(resourceName: string, message: Message<MessageDetails.MetaRequest>, error?: any): void;
|
|
524
|
+
/**
|
|
525
|
+
* Called by Connect when a commit response (ack or nack) is received.
|
|
526
|
+
* @param eventName - The name of the event.
|
|
527
|
+
* @param response - The response message from the server (ack or nack).
|
|
528
|
+
*/
|
|
529
|
+
onCommitResponseEvent(eventName: string, response: Message): void;
|
|
460
530
|
}
|
|
461
531
|
|
|
462
532
|
/**
|
|
@@ -470,6 +540,30 @@ export declare interface ConnectEventsEmitter extends ConnectEvents {
|
|
|
470
540
|
*/
|
|
471
541
|
export declare const ConnectEventsEmitter: InterfaceSymbol<ConnectEventsEmitter>;
|
|
472
542
|
|
|
543
|
+
/**
|
|
544
|
+
@internal
|
|
545
|
+
*/
|
|
546
|
+
export declare class ConnectEventsMock {
|
|
547
|
+
private streamListeners;
|
|
548
|
+
private streamCompleteListeners;
|
|
549
|
+
private streamErrorListeners;
|
|
550
|
+
private commitListeners;
|
|
551
|
+
private metadataListeners;
|
|
552
|
+
private commitAckListeners;
|
|
553
|
+
private commitResponseListeners;
|
|
554
|
+
addStreamListener(listener: Listener_2<StreamEvent_2>, complete: Listener_2<StreamCompleteEvent_2>, error: Listener_2<StreamErrorEvent_2>): () => void;
|
|
555
|
+
addCommitListener(listener: Listener_2<CommitEvent_2>): () => void;
|
|
556
|
+
addMetadataListener(listener: Listener_2<MetadataEvent_2>): () => void;
|
|
557
|
+
addCommitAckListener(listener: Listener_2<CommitAckEvent_2>): () => void;
|
|
558
|
+
addCommitResponseListener(listener: Listener_2<CommitResponseEvent_2>): () => void;
|
|
559
|
+
onStreamEvent(resourceName: string, message: Message_2, stream: SocketObservable_2<any>, functions: StreamEventFunctions_2): void;
|
|
560
|
+
onStreamErrorEvent(resourceName: string, stream: SocketObservable_2<any>, error: any): void;
|
|
561
|
+
onStreamCompleteEvent(resourceName: string, stream: SocketObservable_2<any>): void;
|
|
562
|
+
onCommitEvent(eventName: string, message: Message_2): void;
|
|
563
|
+
onMetadataEvent(resourceName: string, message: Message_2, error?: any): void;
|
|
564
|
+
onCommitResponseEvent(eventName: string, response: Message_2): void;
|
|
565
|
+
}
|
|
566
|
+
|
|
473
567
|
/**
|
|
474
568
|
* The connection status of the Genesis client.
|
|
475
569
|
* @public
|
|
@@ -1539,6 +1633,11 @@ export declare interface DatasourceOptions {
|
|
|
1539
1633
|
* @remarks Only works with REQUEST_SERVER resources.
|
|
1540
1634
|
*/
|
|
1541
1635
|
request?: any;
|
|
1636
|
+
/**
|
|
1637
|
+
* Array of event names that will trigger an additional poll.
|
|
1638
|
+
* @remarks Only works with REQUEST_SERVER resources.
|
|
1639
|
+
*/
|
|
1640
|
+
pollTriggerEvents?: string[];
|
|
1542
1641
|
/**
|
|
1543
1642
|
* Whether the Datasource service will setup RQUEST object based on metadata.
|
|
1544
1643
|
* @remarks Default is `true`. Only works with REQUEST_SERVER resources.
|
|
@@ -1723,6 +1822,12 @@ export declare class DefaultConnectEvents implements ConnectEventsEmitter {
|
|
|
1723
1822
|
addMetadataListener(listener: Listener<MetadataEvent>): () => void;
|
|
1724
1823
|
/** {@inheritDoc ConnectEventsEmitter.onMetadataEvent} */
|
|
1725
1824
|
onMetadataEvent(resourceName: string, message: Message<MessageDetails.MetaRequest>, error?: any): void;
|
|
1825
|
+
/** @internal */
|
|
1826
|
+
protected commitResponseListeners: Observer<CommitResponseEvent>;
|
|
1827
|
+
/** {@inheritDoc ConnectEvents.addCommitResponseListener} */
|
|
1828
|
+
addCommitResponseListener(listener: Listener<CommitResponseEvent>): () => void;
|
|
1829
|
+
/** {@inheritDoc ConnectEventsEmitter.onCommitResponseEvent} */
|
|
1830
|
+
onCommitResponseEvent(eventName: string, response: Message): void;
|
|
1726
1831
|
}
|
|
1727
1832
|
|
|
1728
1833
|
/**
|
|
@@ -1781,6 +1886,7 @@ export declare class DefaultDatasource implements Datasource {
|
|
|
1781
1886
|
protected auth: Auth;
|
|
1782
1887
|
protected resources: GenesisResources;
|
|
1783
1888
|
protected config: DatasourceConfig;
|
|
1889
|
+
protected connectEvents: ConnectEvents;
|
|
1784
1890
|
/**
|
|
1785
1891
|
* {@inheritDoc Datasource.status}
|
|
1786
1892
|
*/
|
|
@@ -1806,7 +1912,10 @@ export declare class DefaultDatasource implements Datasource {
|
|
|
1806
1912
|
resourceType: ResourceType;
|
|
1807
1913
|
stream: SocketObservable<FilteredDataServerResult | RequestServerResult>;
|
|
1808
1914
|
private _allParams;
|
|
1809
|
-
constructor(connect: Connect, auth: Auth, resources: GenesisResources, config: DatasourceConfig);
|
|
1915
|
+
constructor(connect: Connect, auth: Auth, resources: GenesisResources, config: DatasourceConfig, connectEvents: ConnectEvents);
|
|
1916
|
+
private pollTrigger$;
|
|
1917
|
+
private commitResponseUnsubscribe?;
|
|
1918
|
+
private triggerPoll;
|
|
1810
1919
|
/**
|
|
1811
1920
|
* @deprecated - Please use {@link (GenesisResources:interface).isValidResource} instead.
|
|
1812
1921
|
*/
|
|
@@ -3236,6 +3345,8 @@ export declare type KVValue = string | ArrayBuffer;
|
|
|
3236
3345
|
*/
|
|
3237
3346
|
export declare const linearScheduler: SocketReconnectScheduler;
|
|
3238
3347
|
|
|
3348
|
+
declare type Listener_2<T> = (event: T) => void;
|
|
3349
|
+
|
|
3239
3350
|
/**
|
|
3240
3351
|
* Logger for the foundation-comms package
|
|
3241
3352
|
* @public
|
|
@@ -3305,6 +3416,8 @@ export declare type Message<T = void | any> = {
|
|
|
3305
3416
|
WARNING?: any[];
|
|
3306
3417
|
};
|
|
3307
3418
|
|
|
3419
|
+
declare type Message_2 = any;
|
|
3420
|
+
|
|
3308
3421
|
/**
|
|
3309
3422
|
* A utility class for building different types of messages.
|
|
3310
3423
|
*
|
|
@@ -3743,6 +3856,8 @@ export declare type MetadataDetail = {
|
|
|
3743
3856
|
*/
|
|
3744
3857
|
export declare type MetadataEvent = CustomEvent<MetadataEventDetail>;
|
|
3745
3858
|
|
|
3859
|
+
declare type MetadataEvent_2 = CustomEvent<MetadataEventDetail_2>;
|
|
3860
|
+
|
|
3746
3861
|
/**
|
|
3747
3862
|
* @public
|
|
3748
3863
|
*/
|
|
@@ -3752,6 +3867,12 @@ export declare type MetadataEventDetail = {
|
|
|
3752
3867
|
error?: any;
|
|
3753
3868
|
};
|
|
3754
3869
|
|
|
3870
|
+
declare type MetadataEventDetail_2 = {
|
|
3871
|
+
resourceName: string;
|
|
3872
|
+
message: Message_2;
|
|
3873
|
+
error?: any;
|
|
3874
|
+
};
|
|
3875
|
+
|
|
3755
3876
|
/**
|
|
3756
3877
|
* @public
|
|
3757
3878
|
*/
|
|
@@ -4474,6 +4595,8 @@ export declare class SocketObservable<T> extends Observable<T> {
|
|
|
4474
4595
|
constructor(...args: any[]);
|
|
4475
4596
|
}
|
|
4476
4597
|
|
|
4598
|
+
declare type SocketObservable_2<T> = any;
|
|
4599
|
+
|
|
4477
4600
|
/**
|
|
4478
4601
|
* Socket reconnection options
|
|
4479
4602
|
* @public
|
|
@@ -4587,11 +4710,18 @@ export declare type StorageType = 'local' | 'session';
|
|
|
4587
4710
|
*/
|
|
4588
4711
|
export declare type StreamCompleteEvent = CustomEvent<StreamCompleteEventDetail>;
|
|
4589
4712
|
|
|
4713
|
+
declare type StreamCompleteEvent_2 = CustomEvent<StreamCompleteEventDetail_2>;
|
|
4714
|
+
|
|
4590
4715
|
/**
|
|
4591
4716
|
* @public
|
|
4592
4717
|
*/
|
|
4593
4718
|
export declare type StreamCompleteEventDetail = Pick<StreamEventDetail, 'resourceName' | 'stream'>;
|
|
4594
4719
|
|
|
4720
|
+
declare type StreamCompleteEventDetail_2 = {
|
|
4721
|
+
resourceName: string;
|
|
4722
|
+
stream: SocketObservable_2<any>;
|
|
4723
|
+
};
|
|
4724
|
+
|
|
4595
4725
|
/**
|
|
4596
4726
|
* @public
|
|
4597
4727
|
*/
|
|
@@ -4602,6 +4732,8 @@ export declare const StreamCompleteEventType = "connect-stream-complete-event";
|
|
|
4602
4732
|
*/
|
|
4603
4733
|
export declare type StreamErrorEvent = CustomEvent<StreamErrorEventDetail>;
|
|
4604
4734
|
|
|
4735
|
+
declare type StreamErrorEvent_2 = CustomEvent<StreamErrorEventDetail_2>;
|
|
4736
|
+
|
|
4605
4737
|
/**
|
|
4606
4738
|
* @public
|
|
4607
4739
|
*/
|
|
@@ -4609,6 +4741,12 @@ export declare type StreamErrorEventDetail = Pick<StreamEventDetail, 'resourceNa
|
|
|
4609
4741
|
error: any;
|
|
4610
4742
|
};
|
|
4611
4743
|
|
|
4744
|
+
declare type StreamErrorEventDetail_2 = {
|
|
4745
|
+
resourceName: string;
|
|
4746
|
+
stream: SocketObservable_2<any>;
|
|
4747
|
+
error: any;
|
|
4748
|
+
};
|
|
4749
|
+
|
|
4612
4750
|
/**
|
|
4613
4751
|
* @public
|
|
4614
4752
|
*/
|
|
@@ -4619,6 +4757,8 @@ export declare const StreamErrorEventType = "connect-stream-error-event";
|
|
|
4619
4757
|
*/
|
|
4620
4758
|
export declare type StreamEvent = CustomEvent<StreamEventDetail>;
|
|
4621
4759
|
|
|
4760
|
+
declare type StreamEvent_2 = CustomEvent<StreamEventDetail_2>;
|
|
4761
|
+
|
|
4622
4762
|
/**
|
|
4623
4763
|
* @public
|
|
4624
4764
|
*/
|
|
@@ -4629,6 +4769,13 @@ export declare type StreamEventDetail = {
|
|
|
4629
4769
|
stream: SocketObservable<any>;
|
|
4630
4770
|
};
|
|
4631
4771
|
|
|
4772
|
+
declare type StreamEventDetail_2 = {
|
|
4773
|
+
functions: StreamEventFunctions_2;
|
|
4774
|
+
message: Message_2;
|
|
4775
|
+
resourceName: string;
|
|
4776
|
+
stream: SocketObservable_2<any>;
|
|
4777
|
+
};
|
|
4778
|
+
|
|
4632
4779
|
/**
|
|
4633
4780
|
* @public
|
|
4634
4781
|
*/
|
|
@@ -4639,6 +4786,8 @@ export declare type StreamEventFunctions = {
|
|
|
4639
4786
|
resourceDataLogon?: MonitoredResourceDataLogon;
|
|
4640
4787
|
};
|
|
4641
4788
|
|
|
4789
|
+
declare type StreamEventFunctions_2 = any;
|
|
4790
|
+
|
|
4642
4791
|
/**
|
|
4643
4792
|
* @public
|
|
4644
4793
|
*/
|
|
@@ -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) > [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
|
+
|
|
@@ -17,6 +17,7 @@ export interface ConnectEvents
|
|
|
17
17
|
| Method | Description |
|
|
18
18
|
| --- | --- |
|
|
19
19
|
| [addCommitListener(listener)](./foundation-comms.connectevents.addcommitlistener.md) | Add a commit listener. |
|
|
20
|
+
| [addCommitResponseListener(listener)](./foundation-comms.connectevents.addcommitresponselistener.md) | Add a commit response listener (fires for both ack and nack). |
|
|
20
21
|
| [addMetadataListener(listener)](./foundation-comms.connectevents.addmetadatalistener.md) | Add a metadata listener. |
|
|
21
22
|
| [addStreamListener(listener, complete, error)](./foundation-comms.connectevents.addstreamlistener.md) | Add a stream listener. |
|
|
22
23
|
|
|
@@ -18,6 +18,7 @@ export interface ConnectEventsEmitter extends ConnectEvents
|
|
|
18
18
|
| Method | Description |
|
|
19
19
|
| --- | --- |
|
|
20
20
|
| [onCommitEvent(eventName, message)](./foundation-comms.connecteventsemitter.oncommitevent.md) | Called by Connect. |
|
|
21
|
+
| [onCommitResponseEvent(eventName, response)](./foundation-comms.connecteventsemitter.oncommitresponseevent.md) | Called by Connect when a commit response (ack or nack) is received. |
|
|
21
22
|
| [onMetadataEvent(resourceName, message, error)](./foundation-comms.connecteventsemitter.onmetadataevent.md) | Called by Connect. |
|
|
22
23
|
| [onStreamCompleteEvent(resourceName, stream)](./foundation-comms.connecteventsemitter.onstreamcompleteevent.md) | Called by Connect. |
|
|
23
24
|
| [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) > [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
|
+
|
|
@@ -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) > [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
|
+
|
|
@@ -18,9 +18,11 @@ export declare class DefaultConnectEvents implements ConnectEventsEmitter
|
|
|
18
18
|
| Method | Modifiers | Description |
|
|
19
19
|
| --- | --- | --- |
|
|
20
20
|
| [addCommitListener(listener)](./foundation-comms.defaultconnectevents.addcommitlistener.md) | | Add a commit listener. |
|
|
21
|
+
| [addCommitResponseListener(listener)](./foundation-comms.defaultconnectevents.addcommitresponselistener.md) | | Add a commit response listener (fires for both ack and nack). |
|
|
21
22
|
| [addMetadataListener(listener)](./foundation-comms.defaultconnectevents.addmetadatalistener.md) | | Add a metadata listener. |
|
|
22
23
|
| [addStreamListener(listener, complete, error)](./foundation-comms.defaultconnectevents.addstreamlistener.md) | | Add a stream listener. |
|
|
23
24
|
| [onCommitEvent(eventName, message)](./foundation-comms.defaultconnectevents.oncommitevent.md) | | Called by Connect. |
|
|
25
|
+
| [onCommitResponseEvent(eventName, response)](./foundation-comms.defaultconnectevents.oncommitresponseevent.md) | | Called by Connect when a commit response (ack or nack) is received. |
|
|
24
26
|
| [onMetadataEvent(resourceName, message, error)](./foundation-comms.defaultconnectevents.onmetadataevent.md) | | Called by Connect. |
|
|
25
27
|
| [onStreamCompleteEvent(resourceName, stream)](./foundation-comms.defaultconnectevents.onstreamcompleteevent.md) | | Called by Connect. |
|
|
26
28
|
| [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) > [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
|
+
|
|
@@ -9,7 +9,7 @@ Constructs a new instance of the `DefaultDatasource` class
|
|
|
9
9
|
**Signature:**
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
constructor(connect: Connect, auth: Auth, resources: GenesisResources, config: DatasourceConfig);
|
|
12
|
+
constructor(connect: Connect, auth: Auth, resources: GenesisResources, config: DatasourceConfig, connectEvents: ConnectEvents);
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Parameters
|
|
@@ -20,4 +20,5 @@ constructor(connect: Connect, auth: Auth, resources: GenesisResources, config: D
|
|
|
20
20
|
| auth | [Auth](./foundation-comms.auth.md) | |
|
|
21
21
|
| resources | [GenesisResources](./foundation-comms.genesisresources.md) | |
|
|
22
22
|
| config | [DatasourceConfig](./foundation-comms.datasourceconfig.md) | |
|
|
23
|
+
| connectEvents | [ConnectEvents](./foundation-comms.connectevents.md) | |
|
|
23
24
|
|
|
@@ -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
|
+
```
|
|
@@ -17,7 +17,7 @@ export declare class DefaultDatasource implements Datasource
|
|
|
17
17
|
|
|
18
18
|
| Constructor | Modifiers | Description |
|
|
19
19
|
| --- | --- | --- |
|
|
20
|
-
| [(constructor)(connect, auth, resources, config)](./foundation-comms.defaultdatasource._constructor_.md) | | Constructs a new instance of the <code>DefaultDatasource</code> class |
|
|
20
|
+
| [(constructor)(connect, auth, resources, config, connectEvents)](./foundation-comms.defaultdatasource._constructor_.md) | | Constructs a new instance of the <code>DefaultDatasource</code> class |
|
|
21
21
|
|
|
22
22
|
## Properties
|
|
23
23
|
|
|
@@ -27,6 +27,7 @@ export declare class DefaultDatasource implements Datasource
|
|
|
27
27
|
| [availableIndexes](./foundation-comms.defaultdatasource.availableindexes.md) | | [IndexDetail](./foundation-comms.indexdetail.md)<!-- -->\[\] | |
|
|
28
28
|
| [config](./foundation-comms.defaultdatasource.config.md) | <code>protected</code> | [DatasourceConfig](./foundation-comms.datasourceconfig.md) | |
|
|
29
29
|
| [connect](./foundation-comms.defaultdatasource.connect.md) | <code>protected</code> | [Connect](./foundation-comms.connect.md) | |
|
|
30
|
+
| [connectEvents](./foundation-comms.defaultdatasource.connectevents.md) | <code>protected</code> | [ConnectEvents](./foundation-comms.connectevents.md) | |
|
|
30
31
|
| [customRequestFields](./foundation-comms.defaultdatasource.customrequestfields.md) | | [MetadataDetail](./foundation-comms.metadatadetail.md)<!-- -->\[\] | |
|
|
31
32
|
| [fetchMetadataRequired](./foundation-comms.defaultdatasource.fetchmetadatarequired.md) | | boolean | |
|
|
32
33
|
| [fieldMetadata](./foundation-comms.defaultdatasource.fieldmetadata.md) | | [FieldMetadata](./foundation-comms.fieldmetadata.md)<!-- -->\[\] | |
|
|
@@ -111,7 +111,9 @@
|
|
|
111
111
|
|
|
112
112
|
| Variable | Description |
|
|
113
113
|
| --- | --- |
|
|
114
|
+
| [CommitAckEventType](./foundation-comms.commitackeventtype.md) | |
|
|
114
115
|
| [CommitEventType](./foundation-comms.commiteventtype.md) | |
|
|
116
|
+
| [CommitResponseEventType](./foundation-comms.commitresponseeventtype.md) | |
|
|
115
117
|
| [credentialSeparator](./foundation-comms.credentialseparator.md) | The default separator used for splitting credential parts. |
|
|
116
118
|
| [DatasourceEventHandler](./foundation-comms.datasourceeventhandler.md) | Datasource event handler mixin for target classes that use or are interested in datasource status changes. |
|
|
117
119
|
| [DatasourceStatusChanged](./foundation-comms.datasourcestatuschanged.md) | DatasourceStatusChanged. |
|
|
@@ -147,9 +149,13 @@
|
|
|
147
149
|
| [AuthInfo](./foundation-comms.authinfo.md) | Union type of all authentication information types. |
|
|
148
150
|
| [BasicAuthInfo](./foundation-comms.basicauthinfo.md) | Represents basic authentication information. |
|
|
149
151
|
| [BasicCredentialsInput](./foundation-comms.basiccredentialsinput.md) | Represents basic credentials for a user. |
|
|
152
|
+
| [CommitAckEvent](./foundation-comms.commitackevent.md) | |
|
|
153
|
+
| [CommitAckEventDetail](./foundation-comms.commitackeventdetail.md) | |
|
|
150
154
|
| [CommitEvent](./foundation-comms.commitevent.md) | |
|
|
151
155
|
| [CommitEventDetail](./foundation-comms.commiteventdetail.md) | |
|
|
152
156
|
| [CommitParams](./foundation-comms.commitparams.md) | Parameters for a COMMIT message |
|
|
157
|
+
| [CommitResponseEvent](./foundation-comms.commitresponseevent.md) | |
|
|
158
|
+
| [CommitResponseEventDetail](./foundation-comms.commitresponseeventdetail.md) | |
|
|
153
159
|
| [ConnectionStatus](./foundation-comms.connectionstatus.md) | The connection status of the Genesis client. |
|
|
154
160
|
| [CredentialData\_2](./foundation-comms.credentialdata_2.md) | Represents user credentials. |
|
|
155
161
|
| [DataserverParams](./foundation-comms.dataserverparams.md) | Parameters for a DATA\_LOGON messages |
|