@@ -41,16 +41,18 @@ export interface IStorageProvider {
4141 settings : IStorage ;
4242}
4343export interface ISubmissionAdapter {
44- sendRequest ( request : SubmissionRequest , callback : SubmissionCallback , isAppExiting ?: boolean ) : void ;
44+ sendRequest ( request : SubmissionRequest , callback ? : SubmissionCallback , isAppExiting ?: boolean ) : void ;
4545}
4646export interface ISubmissionClient {
4747 postEvents ( events : IEvent [ ] , config : Configuration , callback : ( response : SubmissionResponse ) => void , isAppExiting ?: boolean ) : void ;
4848 postUserDescription ( referenceId : string , description : IUserDescription , config : Configuration , callback : ( response : SubmissionResponse ) => void ) : void ;
4949 getSettings ( config : Configuration , callback : ( response : SettingsResponse ) => void ) : void ;
50+ sendHeartbeat ( sessionIdOrUserId : string , closeSession : boolean , config : Configuration ) : void ;
5051}
5152export interface IConfigurationSettings {
5253 apiKey ?: string ;
5354 serverUrl ?: string ;
55+ heartbeatServerUrl ?: string ;
5456 environmentInfoCollector ?: IEnvironmentInfoCollector ;
5557 errorParser ?: IErrorParser ;
5658 lastReferenceIdManager ?: ILastReferenceIdManager ;
@@ -114,8 +116,9 @@ export declare class EventPluginManager {
114116export declare class HeartbeatPlugin implements IEventPlugin {
115117 priority : number ;
116118 name : string ;
119+ private _heartbeatInterval ;
117120 private _heartbeatIntervalId ;
118- private _lastUser ;
121+ constructor ( heartbeatInterval ?: number ) ;
119122 run ( context : EventPluginContext , next ?: ( ) => void ) : void ;
120123}
121124export declare class ReferenceIdPlugin implements IEventPlugin {
@@ -150,7 +153,8 @@ export declare class DefaultSubmissionClient implements ISubmissionClient {
150153 postEvents ( events : IEvent [ ] , config : Configuration , callback : ( response : SubmissionResponse ) => void , isAppExiting ?: boolean ) : void ;
151154 postUserDescription ( referenceId : string , description : IUserDescription , config : Configuration , callback : ( response : SubmissionResponse ) => void ) : void ;
152155 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 ?) ;
154158 private createSubmissionCallback ( config , callback ) ;
155159}
156160export declare class Utils {
@@ -190,6 +194,8 @@ export declare class Configuration implements IConfigurationSettings {
190194 isValid : boolean ;
191195 private _serverUrl ;
192196 serverUrl : string ;
197+ private _heartbeatServerUrl ;
198+ heartbeatServerUrl : string ;
193199 private _dataExclusions ;
194200 private _userAgentBotPatterns ;
195201 dataExclusions : string [ ] ;
@@ -206,7 +212,7 @@ export declare class Configuration implements IConfigurationSettings {
206212 setUserIdentity ( identity : string ) : void ;
207213 setUserIdentity ( identity : string , name : string ) : void ;
208214 userAgent : string ;
209- useSessions ( sendHeartbeats ?: boolean ) : void ;
215+ useSessions ( sendHeartbeats ?: boolean , heartbeatInterval ?: number ) : void ;
210216 useReferenceIds ( ) : void ;
211217 useLocalStorage ( ) : void ;
212218 useDebugLogger ( ) : void ;
@@ -286,10 +292,8 @@ export declare class ExceptionlessClient {
286292 submitNotFound ( resource : string , callback ?: ( context : EventPluginContext ) => void ) : void ;
287293 createSessionStart ( ) : EventBuilder ;
288294 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 ;
293297 createEvent ( pluginContextData ?: ContextData ) : EventBuilder ;
294298 submitEvent ( event : IEvent , pluginContextData ?: ContextData , callback ?: ( context : EventPluginContext ) => void ) : void ;
295299 updateUserEmailAndDescription ( referenceId : string , email : string , description : string , callback ?: ( response : SubmissionResponse ) => void ) : void ;
@@ -427,11 +431,10 @@ export interface SubmissionCallback {
427431 ( status : number , message : string , data ?: string , headers ?: Object ) : void ;
428432}
429433export interface SubmissionRequest {
430- serverUrl : string ;
431434 apiKey : string ;
432435 userAgent : string ;
433436 method : string ;
434- path : string ;
437+ url : string ;
435438 data : string ;
436439}
437440export declare class SettingsResponse {
@@ -496,7 +499,7 @@ export declare class DefaultRequestInfoCollector implements IRequestInfoCollecto
496499 getRequestInfo ( context : EventPluginContext ) : IRequestInfo ;
497500}
498501export declare class DefaultSubmissionAdapter implements ISubmissionAdapter {
499- sendRequest ( request : SubmissionRequest , callback : SubmissionCallback , isAppExiting ?: boolean ) : void ;
502+ sendRequest ( request : SubmissionRequest , callback ? : SubmissionCallback , isAppExiting ?: boolean ) : void ;
500503}
501504export declare class BrowserStorageProvider implements IStorageProvider {
502505 queue : IStorage ;
0 commit comments