@@ -41,16 +41,18 @@ export interface IStorageProvider {
41
41
settings : IStorage ;
42
42
}
43
43
export interface ISubmissionAdapter {
44
- sendRequest ( request : SubmissionRequest , callback : SubmissionCallback , isAppExiting ?: boolean ) : void ;
44
+ sendRequest ( request : SubmissionRequest , callback ? : SubmissionCallback , isAppExiting ?: boolean ) : void ;
45
45
}
46
46
export interface ISubmissionClient {
47
47
postEvents ( events : IEvent [ ] , config : Configuration , callback : ( response : SubmissionResponse ) => void , isAppExiting ?: boolean ) : void ;
48
48
postUserDescription ( referenceId : string , description : IUserDescription , config : Configuration , callback : ( response : SubmissionResponse ) => void ) : void ;
49
49
getSettings ( config : Configuration , callback : ( response : SettingsResponse ) => void ) : void ;
50
+ sendHeartbeat ( sessionIdOrUserId : string , closeSession : boolean , config : Configuration ) : void ;
50
51
}
51
52
export interface IConfigurationSettings {
52
53
apiKey ?: string ;
53
54
serverUrl ?: string ;
55
+ heartbeatServerUrl ?: string ;
54
56
environmentInfoCollector ?: IEnvironmentInfoCollector ;
55
57
errorParser ?: IErrorParser ;
56
58
lastReferenceIdManager ?: ILastReferenceIdManager ;
@@ -114,8 +116,9 @@ export declare class EventPluginManager {
114
116
export declare class HeartbeatPlugin implements IEventPlugin {
115
117
priority : number ;
116
118
name : string ;
119
+ private _heartbeatInterval ;
117
120
private _heartbeatIntervalId ;
118
- private _lastUser ;
121
+ constructor ( heartbeatInterval ?: number ) ;
119
122
run ( context : EventPluginContext , next ?: ( ) => void ) : void ;
120
123
}
121
124
export declare class ReferenceIdPlugin implements IEventPlugin {
@@ -150,7 +153,8 @@ export declare class DefaultSubmissionClient implements ISubmissionClient {
150
153
postEvents ( events : IEvent [ ] , config : Configuration , callback : ( response : SubmissionResponse ) => void , isAppExiting ?: boolean ) : void ;
151
154
postUserDescription ( referenceId : string , description : IUserDescription , config : Configuration , callback : ( response : SubmissionResponse ) => void ) : void ;
152
155
getSettings ( config : Configuration , callback : ( response : SettingsResponse ) => void ) : void ;
153
- private createRequest ( config , method , path , data ?) ;
156
+ sendHeartbeat ( sessionIdOrUserId : string , closeSession : boolean , config : Configuration ) : void ;
157
+ private createRequest ( config , method , url , data ?) ;
154
158
private createSubmissionCallback ( config , callback ) ;
155
159
}
156
160
export declare class Utils {
@@ -190,6 +194,8 @@ export declare class Configuration implements IConfigurationSettings {
190
194
isValid : boolean ;
191
195
private _serverUrl ;
192
196
serverUrl : string ;
197
+ private _heartbeatServerUrl ;
198
+ heartbeatServerUrl : string ;
193
199
private _dataExclusions ;
194
200
private _userAgentBotPatterns ;
195
201
dataExclusions : string [ ] ;
@@ -206,7 +212,7 @@ export declare class Configuration implements IConfigurationSettings {
206
212
setUserIdentity ( identity : string ) : void ;
207
213
setUserIdentity ( identity : string , name : string ) : void ;
208
214
userAgent : string ;
209
- useSessions ( sendHeartbeats ?: boolean ) : void ;
215
+ useSessions ( sendHeartbeats ?: boolean , heartbeatInterval ?: number ) : void ;
210
216
useReferenceIds ( ) : void ;
211
217
useLocalStorage ( ) : void ;
212
218
useDebugLogger ( ) : void ;
@@ -286,10 +292,8 @@ export declare class ExceptionlessClient {
286
292
submitNotFound ( resource : string , callback ?: ( context : EventPluginContext ) => void ) : void ;
287
293
createSessionStart ( ) : EventBuilder ;
288
294
submitSessionStart ( callback ?: ( context : EventPluginContext ) => void ) : void ;
289
- createSessionEnd ( ) : EventBuilder ;
290
- submitSessionEnd ( callback ?: ( context : EventPluginContext ) => void ) : void ;
291
- createSessionHeartbeat ( ) : EventBuilder ;
292
- submitSessionHeartbeat ( callback ?: ( context : EventPluginContext ) => void ) : void ;
295
+ submitSessionEnd ( sessionIdOrUserId : string ) : void ;
296
+ submitSessionHeartbeat ( sessionIdOrUserId : string ) : void ;
293
297
createEvent ( pluginContextData ?: ContextData ) : EventBuilder ;
294
298
submitEvent ( event : IEvent , pluginContextData ?: ContextData , callback ?: ( context : EventPluginContext ) => void ) : void ;
295
299
updateUserEmailAndDescription ( referenceId : string , email : string , description : string , callback ?: ( response : SubmissionResponse ) => void ) : void ;
@@ -427,11 +431,10 @@ export interface SubmissionCallback {
427
431
( status : number , message : string , data ?: string , headers ?: Object ) : void ;
428
432
}
429
433
export interface SubmissionRequest {
430
- serverUrl : string ;
431
434
apiKey : string ;
432
435
userAgent : string ;
433
436
method : string ;
434
- path : string ;
437
+ url : string ;
435
438
data : string ;
436
439
}
437
440
export declare class SettingsResponse {
@@ -496,7 +499,7 @@ export declare class DefaultRequestInfoCollector implements IRequestInfoCollecto
496
499
getRequestInfo ( context : EventPluginContext ) : IRequestInfo ;
497
500
}
498
501
export declare class DefaultSubmissionAdapter implements ISubmissionAdapter {
499
- sendRequest ( request : SubmissionRequest , callback : SubmissionCallback , isAppExiting ?: boolean ) : void ;
502
+ sendRequest ( request : SubmissionRequest , callback ? : SubmissionCallback , isAppExiting ?: boolean ) : void ;
500
503
}
501
504
export declare class BrowserStorageProvider implements IStorageProvider {
502
505
queue : IStorage ;
0 commit comments