@@ -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 {
@@ -162,8 +166,10 @@ export declare class Utils {
162
166
static parseVersion ( source : string ) : string ;
163
167
static parseQueryString ( query : string , exclusions ?: string [ ] ) : Object ;
164
168
static randomNumber ( ) : number ;
165
- static isMatch ( input : string , patterns : string [ ] ) : boolean ;
169
+ static isMatch ( input : string , patterns : string [ ] , ignoreCase ?: boolean ) : boolean ;
166
170
static isEmpty ( input : Object ) : boolean ;
171
+ static startsWith ( input : string , prefix : string ) : boolean ;
172
+ static endsWith ( input : string , suffix : string ) : boolean ;
167
173
static stringify ( data : any , exclusions ?: string [ ] , maxDepth ?: number ) : string ;
168
174
}
169
175
export declare class Configuration implements IConfigurationSettings {
@@ -190,6 +196,8 @@ export declare class Configuration implements IConfigurationSettings {
190
196
isValid : boolean ;
191
197
private _serverUrl ;
192
198
serverUrl : string ;
199
+ private _heartbeatServerUrl ;
200
+ heartbeatServerUrl : string ;
193
201
private _dataExclusions ;
194
202
private _userAgentBotPatterns ;
195
203
dataExclusions : string [ ] ;
@@ -206,7 +214,7 @@ export declare class Configuration implements IConfigurationSettings {
206
214
setUserIdentity ( identity : string ) : void ;
207
215
setUserIdentity ( identity : string , name : string ) : void ;
208
216
userAgent : string ;
209
- useSessions ( sendHeartbeats ?: boolean ) : void ;
217
+ useSessions ( sendHeartbeats ?: boolean , heartbeatInterval ?: number ) : void ;
210
218
useReferenceIds ( ) : void ;
211
219
useLocalStorage ( ) : void ;
212
220
useDebugLogger ( ) : void ;
@@ -286,10 +294,8 @@ export declare class ExceptionlessClient {
286
294
submitNotFound ( resource : string , callback ?: ( context : EventPluginContext ) => void ) : void ;
287
295
createSessionStart ( ) : EventBuilder ;
288
296
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 ;
297
+ submitSessionEnd ( sessionIdOrUserId : string ) : void ;
298
+ submitSessionHeartbeat ( sessionIdOrUserId : string ) : void ;
293
299
createEvent ( pluginContextData ?: ContextData ) : EventBuilder ;
294
300
submitEvent ( event : IEvent , pluginContextData ?: ContextData , callback ?: ( context : EventPluginContext ) => void ) : void ;
295
301
updateUserEmailAndDescription ( referenceId : string , email : string , description : string , callback ?: ( response : SubmissionResponse ) => void ) : void ;
@@ -405,10 +411,15 @@ export declare class SubmissionMethodPlugin implements IEventPlugin {
405
411
export declare class DuplicateCheckerPlugin implements IEventPlugin {
406
412
priority : number ;
407
413
name : string ;
408
- private recentlyProcessedErrors ;
414
+ private _processedHashcodes ;
415
+ private _getCurrentTime ;
416
+ constructor ( getCurrentTime ?: ( ) => number ) ;
417
+ run ( context : EventPluginContext , next ?: ( ) => void ) : void ;
418
+ }
419
+ export declare class EventExclusionPlugin implements IEventPlugin {
420
+ priority : number ;
421
+ name : string ;
409
422
run ( context : EventPluginContext , next ?: ( ) => void ) : void ;
410
- private getNow ( ) ;
411
- private checkDuplicate ( error , log ) ;
412
423
}
413
424
export interface IError extends IInnerError {
414
425
modules ?: IModule [ ] ;
@@ -427,11 +438,10 @@ export interface SubmissionCallback {
427
438
( status : number , message : string , data ?: string , headers ?: Object ) : void ;
428
439
}
429
440
export interface SubmissionRequest {
430
- serverUrl : string ;
431
441
apiKey : string ;
432
442
userAgent : string ;
433
443
method : string ;
434
- path : string ;
444
+ url : string ;
435
445
data : string ;
436
446
}
437
447
export declare class SettingsResponse {
@@ -496,7 +506,7 @@ export declare class DefaultRequestInfoCollector implements IRequestInfoCollecto
496
506
getRequestInfo ( context : EventPluginContext ) : IRequestInfo ;
497
507
}
498
508
export declare class DefaultSubmissionAdapter implements ISubmissionAdapter {
499
- sendRequest ( request : SubmissionRequest , callback : SubmissionCallback , isAppExiting ?: boolean ) : void ;
509
+ sendRequest ( request : SubmissionRequest , callback ? : SubmissionCallback , isAppExiting ?: boolean ) : void ;
500
510
}
501
511
export declare class BrowserStorageProvider implements IStorageProvider {
502
512
queue : IStorage ;
0 commit comments