@microsoft/applicationinsights-web-basic 2.8.0-nightly.2202-06 → 2.8.0-nightly.2204-06

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,17 +9,11 @@
9
9
  // @public (undocumented)
10
10
  export class AppInsightsCore extends BaseCore implements IAppInsightsCore {
11
11
  constructor();
12
- // Warning: (ae-forgotten-export) The symbol "INotificationListener" needs to be exported by the entry point index.d.ts
13
- addNotificationListener(listener: INotificationListener): void;
14
- // Warning: (ae-forgotten-export) The symbol "IPlugin" needs to be exported by the entry point index.d.ts
15
12
  // Warning: (ae-forgotten-export) The symbol "IDiagnosticLogger" needs to be exported by the entry point index.d.ts
16
13
  // Warning: (ae-forgotten-export) The symbol "INotificationManager" needs to be exported by the entry point index.d.ts
17
14
  //
18
15
  // (undocumented)
19
16
  initialize(config: IConfiguration, extensions: IPlugin[], logger?: IDiagnosticLogger, notificationManager?: INotificationManager): void;
20
- pollInternalLogs(eventName?: string): number;
21
- removeNotificationListener(listener: INotificationListener): void;
22
- stopPollingInternalLogs(): void;
23
17
  // (undocumented)
24
18
  track(telemetryItem: ITelemetryItem): void;
25
19
  }
@@ -27,32 +21,222 @@ export class AppInsightsCore extends BaseCore implements IAppInsightsCore {
27
21
  // @public
28
22
  export class ApplicationInsights {
29
23
  constructor(config: IConfiguration & IConfig);
24
+ addPlugin<T extends IPlugin = ITelemetryPlugin>(plugin: T, replaceExisting: boolean, doAsync: boolean, addCb?: (added?: boolean) => void): void;
25
+ // Warning: (ae-forgotten-export) The symbol "UnloadHandler" needs to be exported by the entry point index.d.ts
26
+ addUnloadCb(handler: UnloadHandler): void;
30
27
  // Warning: (ae-forgotten-export) The symbol "IConfig" needs to be exported by the entry point index.d.ts
31
28
  //
32
29
  // (undocumented)
33
30
  config: IConfiguration & IConfig;
31
+ evtNamespace(): string;
34
32
  flush(async?: boolean): void;
33
+ getPlugin<T extends IPlugin = IPlugin>(pluginIdentifier: string): ILoadedPlugin<T>;
34
+ // (undocumented)
35
+ getSKUDefaults(): void;
35
36
  initialize(): void;
36
37
  // (undocumented)
38
+ pollInternalLogs(): void;
39
+ // (undocumented)
37
40
  stopPollingInternalLogs(): void;
38
41
  track(item: ITelemetryItem): void;
42
+ unload(isAsync?: boolean, unloadComplete?: () => void): void;
39
43
  }
40
44
 
45
+ // @public
46
+ export function arrForEach<T = any>(arr: T[], callbackfn: (value: T, index?: number, array?: T[]) => undefined | void | number, thisArg?: any): void;
47
+
41
48
  // Warning: (ae-forgotten-export) The symbol "ICoreUtils" needs to be exported by the entry point index.d.ts
42
49
  //
43
50
  // @public @deprecated
44
51
  export const CoreUtils: ICoreUtils;
45
52
 
53
+ // @public (undocumented)
54
+ export const enum _eInternalMessageId {
55
+ // (undocumented)
56
+ BrowserCannotReadLocalStorage = 1,
57
+ // (undocumented)
58
+ BrowserCannotReadSessionStorage = 2,
59
+ // (undocumented)
60
+ BrowserCannotWriteLocalStorage = 3,
61
+ // (undocumented)
62
+ BrowserCannotWriteSessionStorage = 4,
63
+ // (undocumented)
64
+ BrowserDoesNotSupportLocalStorage = 0,
65
+ // (undocumented)
66
+ BrowserFailedRemovalFromLocalStorage = 5,
67
+ // (undocumented)
68
+ BrowserFailedRemovalFromSessionStorage = 6,
69
+ // (undocumented)
70
+ CannotAccessCookie = 68,
71
+ // (undocumented)
72
+ CannotParseAiBlobValue = 101,
73
+ // (undocumented)
74
+ CannotSendEmptyTelemetry = 7,
75
+ // (undocumented)
76
+ CannotSerializeObject = 48,
77
+ // (undocumented)
78
+ CannotSerializeObjectNonSerializable = 49,
79
+ // (undocumented)
80
+ CircularReferenceDetected = 50,
81
+ // (undocumented)
82
+ ClearAuthContextFailed = 51,
83
+ // (undocumented)
84
+ ClientPerformanceMathError = 8,
85
+ // (undocumented)
86
+ CreateEnvelopeError = 47,
87
+ // (undocumented)
88
+ ErrorParsingAISessionCookie = 9,
89
+ // (undocumented)
90
+ ErrorPVCalc = 10,
91
+ // (undocumented)
92
+ ExceptionTruncated = 52,
93
+ // (undocumented)
94
+ ExceptionWhileLoggingError = 11,
95
+ // (undocumented)
96
+ FailedAddingCustomDefinedRequestContext = 104,
97
+ // (undocumented)
98
+ FailedAddingTelemetryToBuffer = 12,
99
+ // (undocumented)
100
+ FailedMonitorAjaxAbort = 13,
101
+ // (undocumented)
102
+ FailedMonitorAjaxDur = 14,
103
+ // (undocumented)
104
+ FailedMonitorAjaxGetCorrelationHeader = 18,
105
+ // (undocumented)
106
+ FailedMonitorAjaxOpen = 15,
107
+ // (undocumented)
108
+ FailedMonitorAjaxRSC = 16,
109
+ // (undocumented)
110
+ FailedMonitorAjaxSend = 17,
111
+ // (undocumented)
112
+ FailedMonitorAjaxSetRequestHeader = 71,
113
+ // (undocumented)
114
+ FailedToAddHandlerForOnBeforeUnload = 19,
115
+ // (undocumented)
116
+ FailedToFixDepricatedValues = 44,
117
+ // (undocumented)
118
+ FailedToReportDataLoss = 21,
119
+ // (undocumented)
120
+ FailedToRestoreStorageBuffer = 42,
121
+ // (undocumented)
122
+ FailedToSendQueuedTelemetry = 20,
123
+ // (undocumented)
124
+ FailedToSetStorageBuffer = 41,
125
+ // (undocumented)
126
+ FlushFailed = 22,
127
+ // (undocumented)
128
+ IdTooLong = 69,
129
+ // (undocumented)
130
+ IllegalCharsInName = 53,
131
+ // (undocumented)
132
+ InMemoryStorageBufferFull = 105,
133
+ // (undocumented)
134
+ InvalidBackendResponse = 43,
135
+ // (undocumented)
136
+ InvalidContentBlob = 102,
137
+ // (undocumented)
138
+ InvalidDurationValue = 45,
139
+ // (undocumented)
140
+ InvalidEvent = 70,
141
+ // (undocumented)
142
+ InvalidInstrumentationKey = 100,
143
+ // (undocumented)
144
+ ItemNotInArray = 54,
145
+ // (undocumented)
146
+ MaxAjaxPerPVExceeded = 55,
147
+ // (undocumented)
148
+ MessageLimitPerPVExceeded = 23,
149
+ // (undocumented)
150
+ MessageTruncated = 56,
151
+ // (undocumented)
152
+ MissingRequiredFieldSpecification = 24,
153
+ // (undocumented)
154
+ NameTooLong = 57,
155
+ // (undocumented)
156
+ NavigationTimingNotSupported = 25,
157
+ // (undocumented)
158
+ NotificationException = 74,
159
+ // (undocumented)
160
+ OnError = 26,
161
+ // (undocumented)
162
+ PluginException = 73,
163
+ // (undocumented)
164
+ SampleRateOutOfRange = 58,
165
+ // (undocumented)
166
+ SendBrowserInfoOnUserInit = 72,
167
+ // (undocumented)
168
+ SenderNotInitialized = 28,
169
+ // (undocumented)
170
+ SessionRenewalDateIsZero = 27,
171
+ // (undocumented)
172
+ SessionStorageBufferFull = 67,
173
+ // (undocumented)
174
+ SetAuthContextFailed = 59,
175
+ // (undocumented)
176
+ SetAuthContextFailedAccountName = 60,
177
+ // (undocumented)
178
+ SnippetScriptLoadFailure = 99,
179
+ // (undocumented)
180
+ StartCalledMoreThanOnce = 62,
181
+ // (undocumented)
182
+ StartTrackEventFailed = 29,
183
+ // (undocumented)
184
+ StartTrackFailed = 31,
185
+ // (undocumented)
186
+ StopCalledWithoutStart = 63,
187
+ // (undocumented)
188
+ StopTrackEventFailed = 30,
189
+ // (undocumented)
190
+ StopTrackFailed = 32,
191
+ // (undocumented)
192
+ StringValueTooLong = 61,
193
+ // (undocumented)
194
+ TelemetryEnvelopeInvalid = 46,
195
+ // (undocumented)
196
+ TelemetryInitializerFailed = 64,
197
+ // (undocumented)
198
+ TelemetrySampledAndNotSent = 33,
199
+ // (undocumented)
200
+ TrackArgumentsNotSpecified = 65,
201
+ // (undocumented)
202
+ TrackEventFailed = 34,
203
+ // (undocumented)
204
+ TrackExceptionFailed = 35,
205
+ // (undocumented)
206
+ TrackMetricFailed = 36,
207
+ // (undocumented)
208
+ TrackPageActionEventFailed = 103,
209
+ // (undocumented)
210
+ TrackPVFailed = 37,
211
+ // (undocumented)
212
+ TrackPVFailedCalc = 38,
213
+ // (undocumented)
214
+ TrackTraceFailed = 39,
215
+ // (undocumented)
216
+ TransmissionFailed = 40,
217
+ // (undocumented)
218
+ UrlTooLong = 66
219
+ }
220
+
46
221
  // Warning: (ae-forgotten-export) The symbol "IPerfManagerProvider" needs to be exported by the entry point index.d.ts
47
222
  //
48
223
  // @public (undocumented)
49
224
  export interface IAppInsightsCore extends IPerfManagerProvider {
225
+ // Warning: (ae-forgotten-export) The symbol "INotificationListener" needs to be exported by the entry point index.d.ts
50
226
  addNotificationListener?(listener: INotificationListener): void;
227
+ addPlugin<T extends IPlugin = ITelemetryPlugin>(plugin: T, replaceExisting?: boolean, doAsync?: boolean, addCb?: (added?: boolean) => void): void;
228
+ // Warning: (ae-forgotten-export) The symbol "TelemetryInitializerFunction" needs to be exported by the entry point index.d.ts
229
+ // Warning: (ae-forgotten-export) The symbol "ITelemetryInitializerHandler" needs to be exported by the entry point index.d.ts
230
+ addTelemetryInitializer(telemetryInitializer: TelemetryInitializerFunction): ITelemetryInitializerHandler | void;
231
+ addUnloadCb(handler: UnloadHandler): void;
51
232
  // (undocumented)
52
233
  config: IConfiguration;
234
+ evtNamespace(): string;
235
+ flush(isAsync?: boolean, callBack?: (flushComplete?: boolean) => void, sendReason?: SendRequestReason, cbTimeout?: number): boolean | void;
53
236
  // Warning: (ae-forgotten-export) The symbol "ICookieMgr" needs to be exported by the entry point index.d.ts
54
237
  getCookieMgr(): ICookieMgr;
55
238
  getNotifyMgr(): INotificationManager;
239
+ getPlugin<T extends IPlugin = IPlugin>(pluginIdentifier: string): ILoadedPlugin<T>;
56
240
  // Warning: (ae-forgotten-export) The symbol "IProcessTelemetryContext" needs to be exported by the entry point index.d.ts
57
241
  getProcessTelContext(): IProcessTelemetryContext;
58
242
  // Warning: (ae-forgotten-export) The symbol "IChannelControls" needs to be exported by the entry point index.d.ts
@@ -72,6 +256,8 @@ export interface IAppInsightsCore extends IPerfManagerProvider {
72
256
  stopPollingInternalLogs?(): void;
73
257
  // (undocumented)
74
258
  track(telemetryItem: ITelemetryItem): void;
259
+ // Warning: (ae-forgotten-export) The symbol "ITelemetryUnloadState" needs to be exported by the entry point index.d.ts
260
+ unload(isAsync?: boolean, unloadComplete?: (unloadState: ITelemetryUnloadState) => void, cbTimeout?: number): void;
75
261
  }
76
262
 
77
263
  // @public
@@ -110,7 +296,6 @@ export interface IConfiguration {
110
296
  extensionConfig?: {
111
297
  [key: string]: any;
112
298
  };
113
- // Warning: (ae-forgotten-export) The symbol "ITelemetryPlugin" needs to be exported by the entry point index.d.ts
114
299
  extensions?: ITelemetryPlugin[];
115
300
  idLength?: number;
116
301
  instrumentationKey?: string;
@@ -154,6 +339,16 @@ export interface IEventTelemetry extends IPartC {
154
339
  name: string;
155
340
  }
156
341
 
342
+ // @public (undocumented)
343
+ export interface ILoadedPlugin<T extends IPlugin> {
344
+ isEnabled: () => boolean;
345
+ // (undocumented)
346
+ plugin: T;
347
+ // (undocumented)
348
+ remove: (isAsync?: boolean, removeCb?: (removed?: boolean) => void) => void;
349
+ setEnabled: (isEnabled: boolean) => void;
350
+ }
351
+
157
352
  // @public (undocumented)
158
353
  export interface IMetricTelemetry extends IPartC {
159
354
  average: number;
@@ -165,6 +360,14 @@ export interface IMetricTelemetry extends IPartC {
165
360
  stdDev?: number;
166
361
  }
167
362
 
363
+ // Warning: (ae-forgotten-export) The symbol "EnumValue" needs to be exported by the entry point index.d.ts
364
+ //
365
+ // @public
366
+ export const _InternalMessageId: EnumValue<typeof _eInternalMessageId>;
367
+
368
+ // @public (undocumented)
369
+ export type _InternalMessageId = number | _eInternalMessageId;
370
+
168
371
  // @public (undocumented)
169
372
  export interface IPageViewPerformanceTelemetry extends IPartC {
170
373
  domProcessing?: string;
@@ -191,6 +394,20 @@ export interface IPageViewTelemetry extends IPartC {
191
394
  uri?: string;
192
395
  }
193
396
 
397
+ // @public (undocumented)
398
+ export interface IPlugin {
399
+ readonly identifier: string;
400
+ // Warning: (ae-forgotten-export) The symbol "ITelemetryPluginChain" needs to be exported by the entry point index.d.ts
401
+ initialize: (config: IConfiguration, core: IAppInsightsCore, extensions: IPlugin[], pluginChain?: ITelemetryPluginChain) => void;
402
+ isInitialized?: () => boolean;
403
+ // Warning: (ae-forgotten-export) The symbol "IProcessTelemetryUnloadContext" needs to be exported by the entry point index.d.ts
404
+ teardown?: (unloadCtx: IProcessTelemetryUnloadContext, unloadState?: ITelemetryUnloadState) => void | boolean;
405
+ readonly version?: string;
406
+ }
407
+
408
+ // @public (undocumented)
409
+ export function isNullOrUndefined(value: any): value is null | undefined;
410
+
194
411
  // @public
195
412
  export interface ITelemetryItem {
196
413
  baseData?: {
@@ -210,6 +427,14 @@ export interface ITelemetryItem {
210
427
  ver?: string;
211
428
  }
212
429
 
430
+ // Warning: (ae-forgotten-export) The symbol "ITelemetryProcessor" needs to be exported by the entry point index.d.ts
431
+ //
432
+ // @public
433
+ export interface ITelemetryPlugin extends ITelemetryProcessor, IPlugin {
434
+ readonly priority: number;
435
+ setNextPlugin?: (next: ITelemetryPlugin | ITelemetryPluginChain) => void;
436
+ }
437
+
213
438
  // @public (undocumented)
214
439
  export interface ITraceTelemetry extends IPartC {
215
440
  iKey?: string;
@@ -217,6 +442,9 @@ export interface ITraceTelemetry extends IPartC {
217
442
  severityLevel?: SeverityLevel;
218
443
  }
219
444
 
445
+ // @public
446
+ export function proxyFunctions<T, S>(target: T, source: S | (() => S), functionsToProxy: (keyof S)[], overwriteTarget?: boolean): T;
447
+
220
448
  // Warning: (ae-forgotten-export) The symbol "BaseTelemetryPlugin" needs to be exported by the entry point index.d.ts
221
449
  // Warning: (ae-forgotten-export) The symbol "IChannelControlsAI" needs to be exported by the entry point index.d.ts
222
450
  //
@@ -234,8 +462,6 @@ export class Sender extends BaseTelemetryPlugin implements IChannelControlsAI {
234
462
  flush(): void;
235
463
  // (undocumented)
236
464
  readonly identifier: string;
237
- // Warning: (ae-forgotten-export) The symbol "ITelemetryPluginChain" needs to be exported by the entry point index.d.ts
238
- //
239
465
  // (undocumented)
240
466
  initialize(config: IConfiguration & IConfig, core: IAppInsightsCore, extensions: IPlugin[], pluginChain?: ITelemetryPluginChain): void;
241
467
  _onError(payload: string[], message: string, event?: ErrorEvent): void;
@@ -257,15 +483,26 @@ export class Sender extends BaseTelemetryPlugin implements IChannelControlsAI {
257
483
  _sender: SenderFunction;
258
484
  // Warning: (ae-forgotten-export) The symbol "ISenderConfig" needs to be exported by the entry point index.d.ts
259
485
  readonly _senderConfig: ISenderConfig;
260
- // (undocumented)
261
- teardown(): void;
262
- // Warning: (ae-forgotten-export) The symbol "SendRequestReason" needs to be exported by the entry point index.d.ts
263
486
  triggerSend(async?: boolean, forcedSender?: SenderFunction, sendReason?: SendRequestReason): void;
264
487
  // Warning: (ae-forgotten-export) The symbol "XDomainRequest" needs to be exported by the entry point index.d.ts
265
488
  _xdrOnLoad(xdr: XDomainRequest, payload: string[]): void;
266
489
  _xhrReadyStateChange(xhr: XMLHttpRequest, payload: string[], countOfItemsInPayload: number): void;
267
490
  }
268
491
 
492
+ // @public
493
+ export const enum SendRequestReason {
494
+ ManualFlush = 1,
495
+ MaxBatchSize = 10,
496
+ MaxQueuedEvents = 20,
497
+ NormalSchedule = 1,
498
+ Resumed = 4,
499
+ Retry = 5,
500
+ SdkUnload = 6,
501
+ SyncEvent = 3,
502
+ Undefined = 0,
503
+ Unload = 2
504
+ }
505
+
269
506
  // @public
270
507
  export enum SeverityLevel {
271
508
  // (undocumented)
@@ -280,6 +517,9 @@ export enum SeverityLevel {
280
517
  Warning = 2
281
518
  }
282
519
 
520
+ // @public (undocumented)
521
+ export function throwError(message: string): never;
522
+
283
523
  // (No @packageDocumentation comment for this package)
284
524
 
285
525
  ```