File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -94,21 +94,29 @@ export class ExceptionlessClient {
9494 }
9595
9696 public createSessionStart ( sessionId : string ) : EventBuilder {
97- return this . createEvent ( ) . setType ( 'start ' ) . setSessionId ( sessionId ) ;
97+ return this . createEvent ( ) . setType ( 'session ' ) . setSessionId ( sessionId ) ;
9898 }
9999
100100 public submitSessionStart ( sessionId : string , callback ?: ( context : EventPluginContext ) => void ) : void {
101101 this . createSessionStart ( sessionId ) . submit ( callback ) ;
102102 }
103103
104104 public createSessionEnd ( sessionId : string ) : EventBuilder {
105- return this . createEvent ( ) . setType ( 'end ' ) . setSessionId ( sessionId ) ;
105+ return this . createEvent ( ) . setType ( 'sessionend ' ) . setSessionId ( sessionId ) ;
106106 }
107107
108108 public submitSessionEnd ( sessionId : string , callback ?: ( context : EventPluginContext ) => void ) : void {
109109 this . createSessionEnd ( sessionId ) . submit ( callback ) ;
110110 }
111111
112+ public createSessionHeartbeat ( sessionId : string ) : EventBuilder {
113+ return this . createEvent ( ) . setType ( 'heartbeat' ) . setSessionId ( sessionId ) ;
114+ }
115+
116+ public submitSessionHeartbeat ( sessionId : string , callback ?: ( context : EventPluginContext ) => void ) : void {
117+ this . createSessionEnd ( sessionId ) . submit ( callback ) ;
118+ }
119+
112120 public createEvent ( pluginContextData ?: ContextData ) : EventBuilder {
113121 return new EventBuilder ( { date : new Date ( ) } , this , pluginContextData ) ;
114122 }
You can’t perform that action at this time.
0 commit comments