@@ -7,9 +7,9 @@ export interface ILastReferenceIdManager {
77 setLast ( eventId : string ) : void ;
88}
99export interface ILog {
10- info ( message : string ) : any ;
11- warn ( message : string ) : any ;
12- error ( message : string ) : any ;
10+ info ( message : string ) : void ;
11+ warn ( message : string ) : void ;
12+ error ( message : string ) : void ;
1313}
1414export interface IEvent {
1515 type ?: string ;
@@ -24,9 +24,9 @@ export interface IEvent {
2424 session_id ?: string ;
2525}
2626export interface IEventQueue {
27- enqueue ( event : IEvent ) : any ;
28- process ( ) : any ;
29- suspendProcessing ( durationInMinutes ?: number , discardFutureQueuedItems ?: boolean , clearQueue ?: boolean ) : any ;
27+ enqueue ( event : IEvent ) : void ;
28+ process ( ) : void ;
29+ suspendProcessing ( durationInMinutes ?: number , discardFutureQueuedItems ?: boolean , clearQueue ?: boolean ) : void ;
3030}
3131export interface IEnvironmentInfo {
3232 processor_count ?: number ;
@@ -59,7 +59,7 @@ export interface IEnvironmentInfoCollector {
5959 getEnvironmentInfo ( context : EventPluginContext ) : IEnvironmentInfo ;
6060}
6161export interface IErrorParser {
62- parse ( context : EventPluginContext , exception : Error ) : Promise < IError > ;
62+ parse ( context : EventPluginContext , exception : Error ) : void ;
6363}
6464export interface IModuleCollector {
6565 getModules ( context : EventPluginContext ) : IModule [ ] ;
@@ -70,13 +70,13 @@ export interface IRequestInfoCollector {
7070export interface IStorage < T > {
7171 save < T > ( path : string , value : T ) : boolean ;
7272 get ( searchPattern ?: string , limit ?: number ) : T [ ] ;
73- clear ( searchPattern ?: string ) : any ;
73+ clear ( searchPattern ?: string ) : void ;
7474 count ( searchPattern ?: string ) : number ;
7575}
7676export interface ISubmissionClient {
77- submit ( events : IEvent [ ] , config : Configuration ) : Promise < SubmissionResponse > ;
78- submitDescription ( referenceId : string , description : IUserDescription , config : Configuration ) : Promise < SubmissionResponse > ;
79- getSettings ( config : Configuration ) : Promise < SettingsResponse > ;
77+ submit ( events : IEvent [ ] , config : Configuration , callback : ( SubmissionResponse ) => void ) : void ;
78+ submitDescription ( referenceId : string , description : IUserDescription , config : Configuration , callback : ( SubmissionResponse ) => void ) : void ;
79+ getSettings ( config : Configuration , callback : ( SettingsResponse ) => void ) : void ;
8080}
8181export interface IConfigurationSettings {
8282 apiKey ?: string ;
@@ -102,6 +102,7 @@ export declare class ConsoleLog implements ILog {
102102 info ( message : any ) : void ;
103103 warn ( message : any ) : void ;
104104 error ( message : any ) : void ;
105+ private log ( level , message ) ;
105106}
106107export declare class NullLog implements ILog {
107108 info ( message : any ) : void ;
@@ -116,24 +117,23 @@ export interface IUserInfo {
116117export interface IEventPlugin {
117118 priority ?: number ;
118119 name ?: string ;
119- run ( context : EventPluginContext ) : Promise < any > ;
120+ run ( context : EventPluginContext , next ?: ( ) => void ) : void ;
120121}
121122export declare class EventPluginContext {
122123 client : ExceptionlessClient ;
123124 event : IEvent ;
124125 contextData : ContextData ;
125- cancel : boolean ;
126126 constructor ( client : ExceptionlessClient , event : IEvent , contextData ?: ContextData ) ;
127127 log : ILog ;
128128}
129129export declare class EventPluginManager {
130- static run ( context : EventPluginContext ) : Promise < any > ;
130+ static run ( context : EventPluginContext , callback : ( ) => void ) : void ;
131131 static addDefaultPlugins ( config : Configuration ) : void ;
132132}
133133export declare class ReferenceIdPlugin implements IEventPlugin {
134134 priority : number ;
135135 name : string ;
136- run ( context : EventPluginContext ) : Promise < any > ;
136+ run ( context : EventPluginContext , next ?: ( ) => void ) : void ;
137137}
138138export declare class DefaultEventQueue implements IEventQueue {
139139 private _config ;
@@ -142,7 +142,7 @@ export declare class DefaultEventQueue implements IEventQueue {
142142 private _processingQueue ;
143143 private _queueTimer ;
144144 constructor ( config : Configuration ) ;
145- enqueue ( event : IEvent ) : boolean ;
145+ enqueue ( event : IEvent ) : void ;
146146 process ( ) : void ;
147147 private processSubmissionResponse ( response , events ) ;
148148 private ensureQueueTimer ( ) ;
@@ -162,6 +162,7 @@ export declare class InMemoryStorage<T> implements IStorage<T> {
162162}
163163export declare class Utils {
164164 static getHashCode ( source : string ) : string ;
165+ static getCookies ( cookies : string , separator : string ) : Object ;
165166 static guid ( ) : string ;
166167 static merge ( defaultValues : any , values : any ) : { } ;
167168 static parseVersion ( source : string ) : string ;
@@ -223,7 +224,7 @@ export declare class EventBuilder {
223224 setProperty ( name : string , value : any ) : EventBuilder ;
224225 markAsCritical ( critical : boolean ) : EventBuilder ;
225226 addRequestInfo ( request : any ) : EventBuilder ;
226- submit ( ) : Promise < any > ;
227+ submit ( ) : void ;
227228 private isValidIdentifier ( value ) ;
228229}
229230export interface IError extends IInnerError {
@@ -235,25 +236,25 @@ export declare class ExceptionlessClient {
235236 constructor ( settings : IConfigurationSettings ) ;
236237 constructor ( apiKey : string , serverUrl ?: string ) ;
237238 createException ( exception : Error ) : EventBuilder ;
238- submitException ( exception : Error ) : Promise < any > ;
239+ submitException ( exception : Error ) : void ;
239240 createUnhandledException ( exception : Error , submissionMethod ?: string ) : EventBuilder ;
240- submitUnhandledException ( exception : Error , submissionMethod ?: string ) : Promise < any > ;
241+ submitUnhandledException ( exception : Error , submissionMethod ?: string ) : void ;
241242 createFeatureUsage ( feature : string ) : EventBuilder ;
242- submitFeatureUsage ( feature : string ) : Promise < any > ;
243+ submitFeatureUsage ( feature : string ) : void ;
243244 createLog ( message : string ) : EventBuilder ;
244245 createLog ( source : string , message : string ) : EventBuilder ;
245246 createLog ( source : string , message : string , level : string ) : EventBuilder ;
246- submitLog ( message : string ) : Promise < any > ;
247- submitLog ( source : string , message : string ) : Promise < any > ;
248- submitLog ( source : string , message : string , level : string ) : Promise < any > ;
247+ submitLog ( message : string ) : void ;
248+ submitLog ( source : string , message : string ) : void ;
249+ submitLog ( source : string , message : string , level : string ) : void ;
249250 createNotFound ( resource : string ) : EventBuilder ;
250- submitNotFound ( resource : string ) : Promise < any > ;
251+ submitNotFound ( resource : string ) : void ;
251252 createSessionStart ( sessionId : string ) : EventBuilder ;
252- submitSessionStart ( sessionId : string ) : Promise < any > ;
253+ submitSessionStart ( sessionId : string ) : void ;
253254 createSessionEnd ( sessionId : string ) : EventBuilder ;
254- submitSessionEnd ( sessionId : string ) : Promise < any > ;
255+ submitSessionEnd ( sessionId : string ) : void ;
255256 createEvent ( pluginContextData ?: ContextData ) : EventBuilder ;
256- submitEvent ( event : IEvent , pluginContextData ?: ContextData ) : Promise < any > ;
257+ submitEvent ( event : IEvent , pluginContextData ?: ContextData ) : void ;
257258 getLastReferenceId ( ) : string ;
258259 private static _instance ;
259260 static default : ExceptionlessClient ;
@@ -301,22 +302,22 @@ export interface IModule {
301302export declare class ConfigurationDefaultsPlugin implements IEventPlugin {
302303 priority : number ;
303304 name : string ;
304- run ( context : EventPluginContext ) : Promise < any > ;
305+ run ( context : EventPluginContext , next ?: ( ) => void ) : void ;
305306}
306307export declare class ErrorPlugin implements IEventPlugin {
307308 priority : number ;
308309 name : string ;
309- run ( context : EventPluginContext ) : Promise < any > ;
310+ run ( context : EventPluginContext , next ?: ( ) => void ) : void ;
310311}
311312export declare class DuplicateCheckerPlugin implements IEventPlugin {
312313 priority : number ;
313314 name : string ;
314- run ( context : EventPluginContext ) : Promise < any > ;
315+ run ( context : EventPluginContext , next ?: ( ) => void ) : void ;
315316}
316317export declare class ModuleInfoPlugin implements IEventPlugin {
317318 priority : number ;
318319 name : string ;
319- run ( context : EventPluginContext ) : Promise < any > ;
320+ run ( context : EventPluginContext , next ?: ( ) => void ) : void ;
320321}
321322export interface IRequestInfo {
322323 user_agent ?: string ;
@@ -335,17 +336,17 @@ export interface IRequestInfo {
335336export declare class RequestInfoPlugin implements IEventPlugin {
336337 priority : number ;
337338 name : string ;
338- run ( context : EventPluginContext ) : Promise < any > ;
339+ run ( context : EventPluginContext , next ?: ( ) => void ) : void ;
339340}
340341export declare class EnvironmentInfoPlugin implements IEventPlugin {
341342 priority : number ;
342343 name : string ;
343- run ( context : EventPluginContext ) : Promise < any > ;
344+ run ( context : EventPluginContext , next ?: ( ) => void ) : void ;
344345}
345346export declare class SubmissionMethodPlugin implements IEventPlugin {
346347 priority : number ;
347348 name : string ;
348- run ( context : EventPluginContext ) : Promise < any > ;
349+ run ( context : EventPluginContext , next ?: ( ) => void ) : void ;
349350}
350351export interface IUserDescription {
351352 email_address ?: string ;
@@ -377,27 +378,27 @@ export declare class NodeEnvironmentInfoCollector implements IEnvironmentInfoCol
377378 private getIpAddresses ( ) ;
378379}
379380export declare class NodeErrorParser implements IErrorParser {
380- parse ( context : EventPluginContext , exception : Error ) : Promise < IError > ;
381+ parse ( context : EventPluginContext , exception : Error ) : void ;
381382 private getStackFrames ( context , stackFrames ) ;
382383}
383384export declare class NodeRequestInfoCollector implements IRequestInfoCollector {
384385 getRequestInfo ( context : EventPluginContext ) : IRequestInfo ;
385- private getCookies ( request ) ;
386386}
387- export declare class NodeSubmissionClient implements ISubmissionClient {
388- submit ( events : IEvent [ ] , config : Configuration ) : Promise < SubmissionResponse > ;
389- submitDescription ( referenceId : string , description : IUserDescription , config : Configuration ) : Promise < SubmissionResponse > ;
390- getSettings ( config : Configuration ) : Promise < SettingsResponse > ;
391- private getResponseMessage ( msg ) ;
392- private sendRequest ( method , host , path , apiKey , data ?) ;
387+ export declare class SubmissionClientBase implements ISubmissionClient {
388+ submit ( events : IEvent [ ] , config : Configuration , callback : ( SubmissionResponse ) => void ) : void ;
389+ submitDescription ( referenceId : string , description : IUserDescription , config : Configuration , callback : ( SubmissionResponse ) => void ) : void ;
390+ getSettings ( config : Configuration , callback : ( SettingsResponse ) => void ) : void ;
391+ sendRequest ( method : string , host : string , path : string , data : string , apiKey : string , callback : ( status : number , message : string , data ?: string ) => void ) : void ;
392+ }
393+ export declare class NodeSubmissionClient extends SubmissionClientBase {
394+ sendRequest ( method : string , host : string , path : string , apiKey : string , data : string , callback : ( status : number , message : string , data ?: string ) => void ) : void ;
393395}
394396export declare class NodeBootstrapper implements IBootstrapper {
395397 register ( ) : void ;
396398 private getExitCodeReason ( code ) ;
397- private isNode ( ) ;
398399}
399400export declare class WebErrorParser implements IErrorParser {
400- parse ( context : EventPluginContext , exception : Error ) : Promise < IError > ;
401+ parse ( context : EventPluginContext , exception : Error ) : void ;
401402 private getStackFrames ( context , stackFrames ) ;
402403 private getParameters ( parameters ) ;
403404}
@@ -406,15 +407,10 @@ export declare class WebModuleCollector implements IModuleCollector {
406407}
407408export declare class WebRequestInfoCollector implements IRequestInfoCollector {
408409 getRequestInfo ( context : EventPluginContext ) : IRequestInfo ;
409- private getCookies ( ) ;
410410}
411- export declare class DefaultSubmissionClient implements ISubmissionClient {
412- submit ( events : IEvent [ ] , config : Configuration ) : Promise < SubmissionResponse > ;
413- submitDescription ( referenceId : string , description : IUserDescription , config : Configuration ) : Promise < SubmissionResponse > ;
414- getSettings ( config : Configuration ) : Promise < SettingsResponse > ;
415- private getResponseMessage ( xhr ) ;
411+ export declare class DefaultSubmissionClient extends SubmissionClientBase {
416412 private createRequest ( method , url ) ;
417- private sendRequest ( method , url , data ? ) ;
413+ sendRequest ( method : string , host : string , path : string , apiKey : string , data : string , callback : ( status : number , message : string , data ?: string ) => void ) : void ;
418414}
419415export declare class WindowBootstrapper implements IBootstrapper {
420416 register ( ) : void ;
0 commit comments