@@ -74,9 +74,9 @@ export interface IStorage<T> {
74
74
count ( searchPattern ?: string ) : number ;
75
75
}
76
76
export 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 ;
80
80
}
81
81
export interface IConfigurationSettings {
82
82
apiKey ?: string ;
@@ -92,22 +92,29 @@ export interface IConfigurationSettings {
92
92
storage ?: IStorage < any > ;
93
93
queue ?: IEventQueue ;
94
94
}
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
+ }
95
102
export declare class InMemoryLastReferenceIdManager implements ILastReferenceIdManager {
96
103
private _lastReferenceId ;
97
104
getLast ( ) : string ;
98
105
clearLast ( ) : void ;
99
106
setLast ( eventId : string ) : void ;
100
107
}
101
108
export 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 ;
105
112
private log ( level , message ) ;
106
113
}
107
114
export 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 ;
111
118
}
112
119
export interface IUserInfo {
113
120
identity ?: string ;
@@ -162,36 +169,42 @@ export declare class InMemoryStorage<T> implements IStorage<T> {
162
169
count ( searchPattern ?: string ) : number ;
163
170
}
164
171
export declare class Utils {
172
+ static addRange < T > ( target : T [ ] , ...values : T [ ] ) : T [ ] ;
165
173
static getHashCode ( source : string ) : string ;
166
174
static getCookies ( cookies : string ) : Object ;
167
175
static guid ( ) : string ;
168
- static merge ( defaultValues : any , values : any ) : { } ;
176
+ static merge ( defaultValues : Object , values : Object ) : Object ;
169
177
static parseVersion ( source : string ) : string ;
170
- static parseQueryString ( query : string ) : { } ;
178
+ static parseQueryString ( query : string ) : Object ;
171
179
static randomNumber ( ) : number ;
172
- static stringify ( data : any ) : string ;
180
+ static stringify ( data : any , exclusions ?: string [ ] ) : string ;
173
181
}
174
182
export declare class Configuration implements IConfigurationSettings {
175
183
private _apiKey ;
176
184
private _enabled ;
177
185
private _serverUrl ;
186
+ private _dataExclusions ;
178
187
private _plugins ;
188
+ defaultTags : string [ ] ;
189
+ defaultData : Object ;
179
190
environmentInfoCollector : IEnvironmentInfoCollector ;
180
191
errorParser : IErrorParser ;
181
192
lastReferenceIdManager : ILastReferenceIdManager ;
182
193
log : ILog ;
183
194
moduleCollector : IModuleCollector ;
184
195
requestInfoCollector : IRequestInfoCollector ;
185
- submissionBatchSize : any ;
196
+ submissionBatchSize : number ;
186
197
submissionClient : ISubmissionClient ;
187
- storage : IStorage < any > ;
198
+ settings : Object ;
199
+ storage : IStorage < Object > ;
188
200
queue : IEventQueue ;
189
- defaultTags : string [ ] ;
190
- defaultData : Object ;
191
- constructor ( settings ?: IConfigurationSettings ) ;
201
+ constructor ( configSettings ?: IConfigurationSettings ) ;
192
202
apiKey : string ;
203
+ isValid : boolean ;
193
204
serverUrl : string ;
194
205
enabled : boolean ;
206
+ dataExclusions : string [ ] ;
207
+ addDataExclusions ( ...exclusions : string [ ] ) : void ;
195
208
plugins : IEventPlugin [ ] ;
196
209
addPlugin ( plugin : IEventPlugin ) : void ;
197
210
addPlugin ( name : string , priority : number , pluginAction : ( context : EventPluginContext , next ?: ( ) => void ) => void ) : void ;
@@ -201,12 +214,14 @@ export declare class Configuration implements IConfigurationSettings {
201
214
setUserIdentity ( userInfo : IUserInfo ) : void ;
202
215
setUserIdentity ( identity : string ) : void ;
203
216
setUserIdentity ( identity : string , name : string ) : void ;
217
+ userAgent : string ;
204
218
useReferenceIds ( ) : void ;
205
219
useDebugLogger ( ) : void ;
206
220
private static _defaultSettings ;
207
221
static defaults : IConfigurationSettings ;
208
222
}
209
223
export declare class EventBuilder {
224
+ private _validIdentifierErrorMessage ;
210
225
target : IEvent ;
211
226
client : ExceptionlessClient ;
212
227
pluginContextData : ContextData ;
@@ -224,13 +239,30 @@ export declare class EventBuilder {
224
239
addTags ( ...tags : string [ ] ) : EventBuilder ;
225
240
setProperty ( name : string , value : any ) : EventBuilder ;
226
241
markAsCritical ( critical : boolean ) : EventBuilder ;
227
- addRequestInfo ( request : any ) : EventBuilder ;
242
+ addRequestInfo ( request : Object ) : EventBuilder ;
228
243
submit ( callback ?: ( context : EventPluginContext ) => void ) : void ;
229
244
private isValidIdentifier ( value ) ;
230
245
}
231
246
export interface IError extends IInnerError {
232
247
modules ?: IModule [ ] ;
233
248
}
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
+ }
234
266
export declare class ExceptionlessClient {
235
267
config : Configuration ;
236
268
constructor ( ) ;
@@ -256,6 +288,7 @@ export declare class ExceptionlessClient {
256
288
submitSessionEnd ( sessionId : string , callback ?: ( context : EventPluginContext ) => void ) : void ;
257
289
createEvent ( pluginContextData ?: ContextData ) : EventBuilder ;
258
290
submitEvent ( event : IEvent , pluginContextData ?: ContextData , callback ?: ( context : EventPluginContext ) => void ) : void ;
291
+ updateUserEmailAndDescription ( referenceId : string , email : string , description : string , callback ?: ( response : SubmissionResponse ) => void ) : void ;
259
292
getLastReferenceId ( ) : string ;
260
293
private static _instance ;
261
294
static default : ExceptionlessClient ;
@@ -349,11 +382,6 @@ export declare class SubmissionMethodPlugin implements IEventPlugin {
349
382
name : string ;
350
383
run ( context : EventPluginContext , next ?: ( ) => void ) : void ;
351
384
}
352
- export interface IUserDescription {
353
- email_address ?: string ;
354
- description ?: string ;
355
- data ?: any ;
356
- }
357
385
export declare class SettingsResponse {
358
386
success : boolean ;
359
387
settings : any ;
@@ -362,18 +390,6 @@ export declare class SettingsResponse {
362
390
exception : any ;
363
391
constructor ( success : boolean , settings : any , settingsVersion ?: number , exception ?: any , message ?: string ) ;
364
392
}
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
- }
377
393
export declare class NodeEnvironmentInfoCollector implements IEnvironmentInfoCollector {
378
394
getEnvironmentInfo ( context : EventPluginContext ) : IEnvironmentInfo ;
379
395
private getIpAddresses ( ) ;
@@ -385,14 +401,20 @@ export declare class NodeErrorParser implements IErrorParser {
385
401
export declare class NodeRequestInfoCollector implements IRequestInfoCollector {
386
402
getRequestInfo ( context : EventPluginContext ) : IRequestInfo ;
387
403
}
404
+ export interface IClientConfiguration {
405
+ settings : Object ;
406
+ version : number ;
407
+ }
388
408
export 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 ;
393
414
}
394
415
export 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 ;
396
418
}
397
419
export declare class NodeBootstrapper implements IBootstrapper {
398
420
register ( ) : void ;
@@ -410,12 +432,12 @@ export declare class WebRequestInfoCollector implements IRequestInfoCollector {
410
432
getRequestInfo ( context : EventPluginContext ) : IRequestInfo ;
411
433
}
412
434
export 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 ;
415
437
}
416
438
export declare class WindowBootstrapper implements IBootstrapper {
417
439
register ( ) : void ;
418
440
private getDefaultsSettingsFromScriptTag ( ) ;
419
- private processUnhandledException ( stackTrace , options ) ;
441
+ private processUnhandledException ( stackTrace , options ? ) ;
420
442
private processJQueryAjaxError ( event , xhr , settings , error ) ;
421
443
}
0 commit comments