@@ -74,9 +74,9 @@ export interface IStorage<T> {
7474 count ( searchPattern ?: string ) : number ;
7575}
7676export interface ISubmissionClient {
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 ;
77+ postEvents ( events : IEvent [ ] , config : Configuration , callback : ( response : SubmissionResponse ) => void ) : void ;
78+ postUserDescription ( referenceId : string , description : IUserDescription , config : Configuration , callback : ( response : SubmissionResponse ) => void ) : void ;
79+ getSettings ( config : Configuration , callback : ( response : SettingsResponse ) => void ) : void ;
8080}
8181export interface IConfigurationSettings {
8282 apiKey ?: string ;
@@ -92,22 +92,29 @@ export interface IConfigurationSettings {
9292 storage ?: IStorage < any > ;
9393 queue ?: IEventQueue ;
9494}
95+ export declare class SettingsManager {
96+ private static _configPath ;
97+ static applySavedServerSettings ( config : Configuration ) : void ;
98+ private static getSavedServerSettings ( config ) ;
99+ static checkVersion ( version : number , config : Configuration ) : void ;
100+ static updateSettings ( config : Configuration ) : void ;
101+ }
95102export declare class InMemoryLastReferenceIdManager implements ILastReferenceIdManager {
96103 private _lastReferenceId ;
97104 getLast ( ) : string ;
98105 clearLast ( ) : void ;
99106 setLast ( eventId : string ) : void ;
100107}
101108export declare class ConsoleLog implements ILog {
102- info ( message : any ) : void ;
103- warn ( message : any ) : void ;
104- error ( message : any ) : void ;
109+ info ( message : string ) : void ;
110+ warn ( message : string ) : void ;
111+ error ( message : string ) : void ;
105112 private log ( level , message ) ;
106113}
107114export declare class NullLog implements ILog {
108- info ( message : any ) : void ;
109- warn ( message : any ) : void ;
110- error ( message : any ) : void ;
115+ info ( message : string ) : void ;
116+ warn ( message : string ) : void ;
117+ error ( message : string ) : void ;
111118}
112119export interface IUserInfo {
113120 identity ?: string ;
@@ -162,36 +169,42 @@ export declare class InMemoryStorage<T> implements IStorage<T> {
162169 count ( searchPattern ?: string ) : number ;
163170}
164171export declare class Utils {
172+ static addRange < T > ( target : T [ ] , ...values : T [ ] ) : T [ ] ;
165173 static getHashCode ( source : string ) : string ;
166174 static getCookies ( cookies : string ) : Object ;
167175 static guid ( ) : string ;
168- static merge ( defaultValues : any , values : any ) : { } ;
176+ static merge ( defaultValues : Object , values : Object ) : Object ;
169177 static parseVersion ( source : string ) : string ;
170- static parseQueryString ( query : string ) : { } ;
178+ static parseQueryString ( query : string ) : Object ;
171179 static randomNumber ( ) : number ;
172- static stringify ( data : any ) : string ;
180+ static stringify ( data : any , exclusions ?: string [ ] ) : string ;
173181}
174182export declare class Configuration implements IConfigurationSettings {
175183 private _apiKey ;
176184 private _enabled ;
177185 private _serverUrl ;
186+ private _dataExclusions ;
178187 private _plugins ;
188+ defaultTags : string [ ] ;
189+ defaultData : Object ;
179190 environmentInfoCollector : IEnvironmentInfoCollector ;
180191 errorParser : IErrorParser ;
181192 lastReferenceIdManager : ILastReferenceIdManager ;
182193 log : ILog ;
183194 moduleCollector : IModuleCollector ;
184195 requestInfoCollector : IRequestInfoCollector ;
185- submissionBatchSize : any ;
196+ submissionBatchSize : number ;
186197 submissionClient : ISubmissionClient ;
187- storage : IStorage < any > ;
198+ settings : Object ;
199+ storage : IStorage < Object > ;
188200 queue : IEventQueue ;
189- defaultTags : string [ ] ;
190- defaultData : Object ;
191- constructor ( settings ?: IConfigurationSettings ) ;
201+ constructor ( configSettings ?: IConfigurationSettings ) ;
192202 apiKey : string ;
203+ isValid : boolean ;
193204 serverUrl : string ;
194205 enabled : boolean ;
206+ dataExclusions : string [ ] ;
207+ addDataExclusions ( ...exclusions : string [ ] ) : void ;
195208 plugins : IEventPlugin [ ] ;
196209 addPlugin ( plugin : IEventPlugin ) : void ;
197210 addPlugin ( name : string , priority : number , pluginAction : ( context : EventPluginContext , next ?: ( ) => void ) => void ) : void ;
@@ -201,12 +214,14 @@ export declare class Configuration implements IConfigurationSettings {
201214 setUserIdentity ( userInfo : IUserInfo ) : void ;
202215 setUserIdentity ( identity : string ) : void ;
203216 setUserIdentity ( identity : string , name : string ) : void ;
217+ userAgent : string ;
204218 useReferenceIds ( ) : void ;
205219 useDebugLogger ( ) : void ;
206220 private static _defaultSettings ;
207221 static defaults : IConfigurationSettings ;
208222}
209223export declare class EventBuilder {
224+ private _validIdentifierErrorMessage ;
210225 target : IEvent ;
211226 client : ExceptionlessClient ;
212227 pluginContextData : ContextData ;
@@ -224,13 +239,30 @@ export declare class EventBuilder {
224239 addTags ( ...tags : string [ ] ) : EventBuilder ;
225240 setProperty ( name : string , value : any ) : EventBuilder ;
226241 markAsCritical ( critical : boolean ) : EventBuilder ;
227- addRequestInfo ( request : any ) : EventBuilder ;
242+ addRequestInfo ( request : Object ) : EventBuilder ;
228243 submit ( callback ?: ( context : EventPluginContext ) => void ) : void ;
229244 private isValidIdentifier ( value ) ;
230245}
231246export interface IError extends IInnerError {
232247 modules ?: IModule [ ] ;
233248}
249+ export interface IUserDescription {
250+ email_address ?: string ;
251+ description ?: string ;
252+ data ?: any ;
253+ }
254+ export declare class SubmissionResponse {
255+ success : boolean ;
256+ badRequest : boolean ;
257+ serviceUnavailable : boolean ;
258+ paymentRequired : boolean ;
259+ unableToAuthenticate : boolean ;
260+ notFound : boolean ;
261+ requestEntityTooLarge : boolean ;
262+ statusCode : number ;
263+ message : string ;
264+ constructor ( statusCode : number , message ?: string ) ;
265+ }
234266export declare class ExceptionlessClient {
235267 config : Configuration ;
236268 constructor ( ) ;
@@ -256,6 +288,7 @@ export declare class ExceptionlessClient {
256288 submitSessionEnd ( sessionId : string , callback ?: ( context : EventPluginContext ) => void ) : void ;
257289 createEvent ( pluginContextData ?: ContextData ) : EventBuilder ;
258290 submitEvent ( event : IEvent , pluginContextData ?: ContextData , callback ?: ( context : EventPluginContext ) => void ) : void ;
291+ updateUserEmailAndDescription ( referenceId : string , email : string , description : string , callback ?: ( response : SubmissionResponse ) => void ) : void ;
259292 getLastReferenceId ( ) : string ;
260293 private static _instance ;
261294 static default : ExceptionlessClient ;
@@ -349,11 +382,6 @@ export declare class SubmissionMethodPlugin implements IEventPlugin {
349382 name : string ;
350383 run ( context : EventPluginContext , next ?: ( ) => void ) : void ;
351384}
352- export interface IUserDescription {
353- email_address ?: string ;
354- description ?: string ;
355- data ?: any ;
356- }
357385export declare class SettingsResponse {
358386 success : boolean ;
359387 settings : any ;
@@ -362,18 +390,6 @@ export declare class SettingsResponse {
362390 exception : any ;
363391 constructor ( success : boolean , settings : any , settingsVersion ?: number , exception ?: any , message ?: string ) ;
364392}
365- export declare class SubmissionResponse {
366- success : boolean ;
367- badRequest : boolean ;
368- serviceUnavailable : boolean ;
369- paymentRequired : boolean ;
370- unableToAuthenticate : boolean ;
371- notFound : boolean ;
372- requestEntityTooLarge : boolean ;
373- statusCode : number ;
374- message : string ;
375- constructor ( statusCode : number , message ?: string ) ;
376- }
377393export declare class NodeEnvironmentInfoCollector implements IEnvironmentInfoCollector {
378394 getEnvironmentInfo ( context : EventPluginContext ) : IEnvironmentInfo ;
379395 private getIpAddresses ( ) ;
@@ -385,14 +401,20 @@ export declare class NodeErrorParser implements IErrorParser {
385401export declare class NodeRequestInfoCollector implements IRequestInfoCollector {
386402 getRequestInfo ( context : EventPluginContext ) : IRequestInfo ;
387403}
404+ export interface IClientConfiguration {
405+ settings : Object ;
406+ version : number ;
407+ }
388408export declare class SubmissionClientBase implements ISubmissionClient {
389- submit ( events : IEvent [ ] , config : Configuration , callback : ( SubmissionResponse ) => void ) : void ;
390- submitDescription ( referenceId : string , description : IUserDescription , config : Configuration , callback : ( SubmissionResponse ) => void ) : void ;
391- getSettings ( config : Configuration , callback : ( SettingsResponse ) => void ) : void ;
392- sendRequest ( method : string , host : string , path : string , data : string , apiKey : string , callback : ( status : number , message : string , data ?: string ) => void ) : void ;
409+ configurationVersionHeader : string ;
410+ postEvents ( events : IEvent [ ] , config : Configuration , callback : ( response : SubmissionResponse ) => void ) : void ;
411+ postUserDescription ( referenceId : string , description : IUserDescription , config : Configuration , callback : ( response : SubmissionResponse ) => void ) : void ;
412+ getSettings ( config : Configuration , callback : ( response : SettingsResponse ) => void ) : void ;
413+ sendRequest ( config : Configuration , method : string , path : string , data : string , callback : ( status : number , message : string , data ?: string , headers ?: Object ) => void ) : void ;
393414}
394415export declare class NodeSubmissionClient extends SubmissionClientBase {
395- sendRequest ( method : string , host : string , path : string , apiKey : string , data : string , callback : ( status : number , message : string , data ?: string ) => void ) : void ;
416+ constructor ( ) ;
417+ sendRequest ( config : Configuration , method : string , path : string , data : string , callback : ( status : number , message : string , data ?: string , headers ?: Object ) => void ) : void ;
396418}
397419export declare class NodeBootstrapper implements IBootstrapper {
398420 register ( ) : void ;
@@ -410,12 +432,12 @@ export declare class WebRequestInfoCollector implements IRequestInfoCollector {
410432 getRequestInfo ( context : EventPluginContext ) : IRequestInfo ;
411433}
412434export declare class DefaultSubmissionClient extends SubmissionClientBase {
413- private createRequest ( method , url ) ;
414- sendRequest ( method : string , host : string , path : string , apiKey : string , data : string , callback : ( status : number , message : string , data ?: string ) => void ) : void ;
435+ private createRequest ( config , method , url ) ;
436+ sendRequest ( config : Configuration , method : string , path : string , data : string , callback : ( status : number , message : string , data ?: string , headers ?: Object ) => void ) : void ;
415437}
416438export declare class WindowBootstrapper implements IBootstrapper {
417439 register ( ) : void ;
418440 private getDefaultsSettingsFromScriptTag ( ) ;
419- private processUnhandledException ( stackTrace , options ) ;
441+ private processUnhandledException ( stackTrace , options ? ) ;
420442 private processJQueryAjaxError ( event , xhr , settings , error ) ;
421443}
0 commit comments