@microsoft/applicationinsights-core-js 2.7.2-nightly.2111-09 → 2.7.2-nightly.2111-14

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.
Files changed (88) hide show
  1. package/browser/applicationinsights-core-js.integrity.json +9 -9
  2. package/browser/applicationinsights-core-js.js +63 -2
  3. package/browser/applicationinsights-core-js.js.map +1 -1
  4. package/browser/applicationinsights-core-js.min.js +2 -2
  5. package/browser/applicationinsights-core-js.min.js.map +1 -1
  6. package/dist/applicationinsights-core-js.api.json +315 -0
  7. package/dist/applicationinsights-core-js.api.md +25 -0
  8. package/dist/applicationinsights-core-js.d.ts +20 -1
  9. package/dist/applicationinsights-core-js.js +63 -2
  10. package/dist/applicationinsights-core-js.js.map +1 -1
  11. package/dist/applicationinsights-core-js.min.js +2 -2
  12. package/dist/applicationinsights-core-js.min.js.map +1 -1
  13. package/dist/applicationinsights-core-js.rollup.d.ts +20 -1
  14. package/dist-esm/JavaScriptSDK/AppInsightsCore.js +1 -1
  15. package/dist-esm/JavaScriptSDK/BaseCore.js +5 -1
  16. package/dist-esm/JavaScriptSDK/BaseCore.js.map +1 -1
  17. package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js +1 -1
  18. package/dist-esm/JavaScriptSDK/ChannelController.js +1 -1
  19. package/dist-esm/JavaScriptSDK/Constants.js +1 -1
  20. package/dist-esm/JavaScriptSDK/CookieMgr.js +1 -1
  21. package/dist-esm/JavaScriptSDK/CoreUtils.js +1 -1
  22. package/dist-esm/JavaScriptSDK/DbgExtensionUtils.js +47 -0
  23. package/dist-esm/JavaScriptSDK/DbgExtensionUtils.js.map +1 -0
  24. package/dist-esm/JavaScriptSDK/DiagnosticLogger.js +20 -2
  25. package/dist-esm/JavaScriptSDK/DiagnosticLogger.js.map +1 -1
  26. package/dist-esm/JavaScriptSDK/EnvUtils.js +1 -1
  27. package/dist-esm/JavaScriptSDK/HelperFuncs.js +1 -1
  28. package/dist-esm/JavaScriptSDK/InstrumentHooks.js +1 -1
  29. package/dist-esm/JavaScriptSDK/NotificationManager.js +1 -1
  30. package/dist-esm/JavaScriptSDK/PerfManager.js +1 -1
  31. package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js +1 -1
  32. package/dist-esm/JavaScriptSDK/RandomHelper.js +1 -1
  33. package/dist-esm/JavaScriptSDK/TelemetryHelpers.js +1 -1
  34. package/dist-esm/JavaScriptSDK/TelemetryPluginChain.js +1 -1
  35. package/dist-esm/JavaScriptSDK.Enums/EventsDiscardedReason.js +1 -1
  36. package/dist-esm/JavaScriptSDK.Enums/LoggingEnums.js +1 -1
  37. package/dist-esm/JavaScriptSDK.Enums/SendRequestReason.js +1 -1
  38. package/dist-esm/JavaScriptSDK.Interfaces/IAppInsightsCore.js +1 -1
  39. package/dist-esm/JavaScriptSDK.Interfaces/IChannelControls.js +1 -1
  40. package/dist-esm/JavaScriptSDK.Interfaces/IConfiguration.js +1 -1
  41. package/dist-esm/JavaScriptSDK.Interfaces/ICookieMgr.js +1 -1
  42. package/dist-esm/JavaScriptSDK.Interfaces/IDbgExtension.js +8 -0
  43. package/dist-esm/JavaScriptSDK.Interfaces/IDbgExtension.js.map +1 -0
  44. package/dist-esm/JavaScriptSDK.Interfaces/IDiagnosticLogger.js +1 -1
  45. package/dist-esm/JavaScriptSDK.Interfaces/IInstrumentHooks.js +1 -1
  46. package/dist-esm/JavaScriptSDK.Interfaces/INotificationListener.js +1 -1
  47. package/dist-esm/JavaScriptSDK.Interfaces/INotificationManager.js +1 -1
  48. package/dist-esm/JavaScriptSDK.Interfaces/IPerfEvent.js +3 -1
  49. package/dist-esm/JavaScriptSDK.Interfaces/IPerfEvent.js.map +1 -1
  50. package/dist-esm/JavaScriptSDK.Interfaces/IPerfManager.js +1 -1
  51. package/dist-esm/JavaScriptSDK.Interfaces/IProcessTelemetryContext.js +1 -1
  52. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryItem.js +1 -1
  53. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPlugin.js +1 -1
  54. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPluginChain.js +1 -1
  55. package/dist-esm/applicationinsights-core-js.js +2 -1
  56. package/dist-esm/applicationinsights-core-js.js.map +1 -1
  57. package/package.json +1 -1
  58. package/src/JavaScriptSDK/BaseCore.ts +5 -0
  59. package/src/JavaScriptSDK/DbgExtensionUtils.ts +55 -0
  60. package/src/JavaScriptSDK/DiagnosticLogger.ts +18 -1
  61. package/src/JavaScriptSDK.Interfaces/IConfiguration.ts +6 -0
  62. package/src/JavaScriptSDK.Interfaces/IDbgExtension.ts +14 -0
  63. package/src/JavaScriptSDK.Interfaces/IPerfEvent.ts +0 -1
  64. package/src/JavaScriptSDK.Interfaces/IPerfManager.ts +0 -1
  65. package/types/JavaScriptSDK/DbgExtensionUtils.d.ts +5 -0
  66. package/types/JavaScriptSDK.Interfaces/IConfiguration.d.ts +5 -0
  67. package/types/JavaScriptSDK.Interfaces/IDbgExtension.d.ts +10 -0
  68. package/types/applicationinsights-core-js.d.ts +2 -0
  69. package/CONTRIBUTING.md +0 -14
  70. package/Tests/Perf/src/CorePerfCheck.Tests.ts +0 -828
  71. package/Tests/Perf/src/aiperftests.ts +0 -6
  72. package/Tests/Perf/tsconfig.json +0 -17
  73. package/Tests/PerfTests.html +0 -54
  74. package/Tests/Unit/src/AppInsightsCoreSize.Tests.ts +0 -59
  75. package/Tests/Unit/src/ApplicationInsightsCore.Tests.ts +0 -1015
  76. package/Tests/Unit/src/CookieManager.Tests.ts +0 -477
  77. package/Tests/Unit/src/HelperFunc.Tests.ts +0 -59
  78. package/Tests/Unit/src/aiunittests.ts +0 -13
  79. package/Tests/UnitTests.html +0 -48
  80. package/Tests/tsconfig.json +0 -17
  81. package/api-extractor.json +0 -361
  82. package/applicationinsights-core-js.build.error.log +0 -205
  83. package/applicationinsights-core-js.build.log +0 -612
  84. package/microsoft-applicationinsights-core-js-2.7.2-nightly.2111-09.tgz +0 -0
  85. package/rollup.config.js +0 -138
  86. package/src/applicationinsights-core-js.ts +0 -59
  87. package/temp/applicationinsights-core-js.api.md +0 -934
  88. package/tslint.json +0 -5
@@ -1,934 +0,0 @@
1
- ## API Report File for "@microsoft/applicationinsights-core-js"
2
-
3
- > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
-
5
- ```ts
6
-
7
- import { getGlobal } from '@microsoft/applicationinsights-shims';
8
- import { objCreateFn as objCreate } from '@microsoft/applicationinsights-shims';
9
- import { strShimFunction as strFunction } from '@microsoft/applicationinsights-shims';
10
- import { strShimObject as strObject } from '@microsoft/applicationinsights-shims';
11
- import { strShimPrototype as strPrototype } from '@microsoft/applicationinsights-shims';
12
- import { strShimUndefined as strUndefined } from '@microsoft/applicationinsights-shims';
13
-
14
- // @public
15
- export function addEventHandler(eventName: string, callback: any): boolean;
16
-
17
- // @public
18
- export function addEventListeners(events: string[], listener: any, excludeEvents?: string[]): boolean;
19
-
20
- // @public
21
- export function addPageHideEventListener(listener: any, excludeEvents?: string[]): boolean;
22
-
23
- // @public
24
- export function addPageShowEventListener(listener: any, excludeEvents?: string[]): boolean;
25
-
26
- // @public
27
- export function addPageUnloadEventListener(listener: any, excludeEvents?: string[]): boolean;
28
-
29
- // @public (undocumented)
30
- export class AppInsightsCore extends BaseCore implements IAppInsightsCore {
31
- constructor();
32
- addNotificationListener(listener: INotificationListener): void;
33
- // (undocumented)
34
- initialize(config: IConfiguration, extensions: IPlugin[], logger?: IDiagnosticLogger, notificationManager?: INotificationManager): void;
35
- pollInternalLogs(eventName?: string): number;
36
- removeNotificationListener(listener: INotificationListener): void;
37
- stopPollingInternalLogs(): void;
38
- // (undocumented)
39
- track(telemetryItem: ITelemetryItem): void;
40
- }
41
-
42
- // @public (undocumented)
43
- export function areCookiesSupported(logger?: IDiagnosticLogger): any;
44
-
45
- // @public
46
- export function arrForEach<T>(arr: T[], callbackfn: (value: T, index?: number, array?: T[]) => void | number, thisArg?: any): void;
47
-
48
- // @public
49
- export function arrIndexOf<T>(arr: T[], searchElement: T, fromIndex?: number): number;
50
-
51
- // @public
52
- export function arrMap<T, R>(arr: T[], callbackfn: (value: T, index?: number, array?: T[]) => R, thisArg?: any): R[];
53
-
54
- // @public
55
- export function arrReduce<T, R>(arr: T[], callbackfn: (previousValue: T | R, currentValue?: T, currentIndex?: number, array?: T[]) => R, initialValue?: R): R;
56
-
57
- // @public
58
- export function attachEvent(obj: any, eventNameWithoutOn: string, handlerRef: any, useCapture?: boolean): boolean;
59
-
60
- // @public (undocumented)
61
- export class BaseCore implements IAppInsightsCore {
62
- constructor();
63
- // (undocumented)
64
- config: IConfiguration;
65
- // (undocumented)
66
- static defaultConfig: IConfiguration;
67
- // (undocumented)
68
- eventCnt(): number;
69
- // (undocumented)
70
- _extensions: IPlugin[];
71
- getCookieMgr(): ICookieMgr;
72
- // (undocumented)
73
- getNotifyMgr(): INotificationManager;
74
- // (undocumented)
75
- getPerfMgr(): IPerfManager;
76
- // (undocumented)
77
- getProcessTelContext(): IProcessTelemetryContext;
78
- // (undocumented)
79
- getTransmissionControls(): IChannelControls[][];
80
- // (undocumented)
81
- initialize(config: IConfiguration, extensions: IPlugin[], logger?: IDiagnosticLogger, notificationManager?: INotificationManager): void;
82
- // (undocumented)
83
- isInitialized: () => boolean;
84
- // (undocumented)
85
- logger: IDiagnosticLogger;
86
- // (undocumented)
87
- protected releaseQueue(): void;
88
- setCookieMgr(cookieMgr: ICookieMgr): void;
89
- // (undocumented)
90
- setPerfMgr(perfMgr: IPerfManager): void;
91
- // (undocumented)
92
- track(telemetryItem: ITelemetryItem): void;
93
- }
94
-
95
- // @public
96
- export abstract class BaseTelemetryPlugin implements ITelemetryPlugin {
97
- constructor();
98
- core: IAppInsightsCore;
99
- diagLog: (itemCtx?: IProcessTelemetryContext) => IDiagnosticLogger;
100
- protected _getTelCtx: (currentCtx?: IProcessTelemetryContext) => IProcessTelemetryContext;
101
- // (undocumented)
102
- identifier: string;
103
- // (undocumented)
104
- initialize(config: IConfiguration, core: IAppInsightsCore, extensions: IPlugin[], pluginChain?: ITelemetryPluginChain): void;
105
- isInitialized: () => boolean;
106
- // (undocumented)
107
- priority: number;
108
- processNext: (env: ITelemetryItem, itemCtx: IProcessTelemetryContext) => void;
109
- // (undocumented)
110
- abstract processTelemetry(env: ITelemetryItem, itemCtx?: IProcessTelemetryContext): void;
111
- protected setInitialized: (isInitialized: boolean) => void;
112
- setNextPlugin: (next: ITelemetryPlugin | ITelemetryPluginChain) => void;
113
- // (undocumented)
114
- version?: string;
115
- }
116
-
117
- // @public @deprecated (undocumented)
118
- export function canUseCookies(logger: IDiagnosticLogger): any;
119
-
120
- // @public @deprecated
121
- export const CoreUtils: ICoreUtils;
122
-
123
- // @public
124
- export function createClassFromInterface<T>(defaults?: T): new () => T;
125
-
126
- // @public (undocumented)
127
- export function createCookieMgr(rootConfig?: IConfiguration, logger?: IDiagnosticLogger): ICookieMgr;
128
-
129
- // @public
130
- export function dateNow(): number;
131
-
132
- // @public @deprecated (undocumented)
133
- export function deleteCookie(logger: IDiagnosticLogger, name: string): boolean;
134
-
135
- // @public
136
- export function detachEvent(obj: any, eventNameWithoutOn: string, handlerRef: any, useCapture?: boolean): void;
137
-
138
- // @public (undocumented)
139
- export class DiagnosticLogger implements IDiagnosticLogger {
140
- constructor(config?: IConfiguration);
141
- consoleLoggingLevel(): number;
142
- enableDebugExceptions(): boolean;
143
- errorToConsole(message: string): void;
144
- // (undocumented)
145
- identifier: string;
146
- logInternalMessage(severity: LoggingSeverity, message: _InternalLogMessage): void;
147
- maxInternalMessageLimit(): number;
148
- queue: _InternalLogMessage[];
149
- resetInternalMessageCount(): void;
150
- telemetryLoggingLevel(): number;
151
- throwInternal(severity: LoggingSeverity, msgId: _InternalMessageId, msg: string, properties?: Object, isUserAct?: boolean): void;
152
- warnToConsole(message: string): void;
153
- }
154
-
155
- // @public @deprecated (undocumented)
156
- export function disableCookies(): void;
157
-
158
- // @public
159
- export function doPerf<T>(mgrSource: IPerfManagerProvider | IPerfManager, getSource: () => string, func: (perfEvt?: IPerfEvent) => T, details?: () => any, isAsync?: boolean): T;
160
-
161
- // @public
162
- export function dumpObj(object: any): string;
163
-
164
- // @public (undocumented)
165
- export const EventHelper: IEventHelper;
166
-
167
- // @public
168
- export const EventsDiscardedReason: {
169
- Unknown: number;
170
- NonRetryableStatus: number;
171
- InvalidEvent: number;
172
- SizeLimitExceeded: number;
173
- KillSwitch: number;
174
- QueueFull: number;
175
- };
176
-
177
- // @public
178
- export function generateW3CId(): string;
179
-
180
- // @public
181
- export function getConsole(): Console | null;
182
-
183
- // @public @deprecated (undocumented)
184
- export function getCookie(logger: IDiagnosticLogger, name: string): string;
185
-
186
- // @public
187
- export function getCrypto(): Crypto | null;
188
-
189
- // @public
190
- export function getDocument(): Document | null;
191
-
192
- // @public
193
- export function getExceptionName(object: any): string;
194
-
195
- // @public
196
- export function getGblPerfMgr(): IPerfManager;
197
-
198
- export { getGlobal }
199
-
200
- // @public
201
- export function getGlobalInst<T>(name: string): T;
202
-
203
- // @public
204
- export function getHistory(): History | null;
205
-
206
- // @public
207
- export function getIEVersion(userAgentStr?: string): number;
208
-
209
- // @public
210
- export function getJSON(): JSON | null;
211
-
212
- // @public
213
- export function getLocation(checkForMock?: boolean): Location | null;
214
-
215
- // @public
216
- export function getMsCrypto(): Crypto | null;
217
-
218
- // @public
219
- export function getNavigator(): Navigator | null;
220
-
221
- // @public
222
- export function getPerformance(): Performance | null;
223
-
224
- // @public
225
- export function getSetValue<T, K extends keyof T>(target: T, field: K, defValue?: T[K]): T[K];
226
-
227
- // @public
228
- export function getWindow(): Window | null;
229
-
230
- // @public
231
- export function hasDocument(): boolean;
232
-
233
- // @public
234
- export function hasHistory(): boolean;
235
-
236
- // @public
237
- export function hasJSON(): boolean;
238
-
239
- // @public
240
- export function hasNavigator(): boolean;
241
-
242
- // @public (undocumented)
243
- export function hasOwnProperty(obj: any, prop: string): boolean;
244
-
245
- // @public
246
- export function hasWindow(): boolean;
247
-
248
- // @public (undocumented)
249
- export interface IAppInsightsCore extends IPerfManagerProvider {
250
- addNotificationListener?(listener: INotificationListener): void;
251
- // (undocumented)
252
- config: IConfiguration;
253
- getCookieMgr(): ICookieMgr;
254
- getNotifyMgr(): INotificationManager;
255
- getProcessTelContext(): IProcessTelemetryContext;
256
- // (undocumented)
257
- getTransmissionControls(): IChannelControls[][];
258
- // (undocumented)
259
- initialize(config: IConfiguration, extensions: IPlugin[], logger?: IDiagnosticLogger, notificationManager?: INotificationManager): void;
260
- isInitialized?: () => boolean;
261
- // (undocumented)
262
- logger: IDiagnosticLogger;
263
- // (undocumented)
264
- pollInternalLogs?(eventName?: string): number;
265
- removeNotificationListener?(listener: INotificationListener): void;
266
- setCookieMgr(cookieMgr: ICookieMgr): void;
267
- // (undocumented)
268
- stopPollingInternalLogs?(): void;
269
- // (undocumented)
270
- track(telemetryItem: ITelemetryItem): void;
271
- }
272
-
273
- // @public
274
- export interface IChannelControls extends ITelemetryPlugin {
275
- flush(async: boolean, callBack?: () => void): void;
276
- pause(): void;
277
- resume(): void;
278
- teardown(): void;
279
- }
280
-
281
- // @public
282
- export interface IConfiguration {
283
- channels?: IChannelControls[][];
284
- connectionString?: string;
285
- cookieCfg?: ICookieMgrConfig;
286
- cookieDomain?: string;
287
- cookiePath?: string;
288
- createPerfMgr?: (core: IAppInsightsCore, notificationManager: INotificationManager) => IPerfManager;
289
- diagnosticLogInterval?: number;
290
- disableCookiesUsage?: boolean;
291
- disableInstrumentationKeyValidation?: boolean;
292
- disablePageShowEvents?: string[];
293
- disablePageUnloadEvents?: string[];
294
- enableDebugExceptions?: boolean;
295
- enablePerfMgr?: boolean;
296
- endpointUrl?: string;
297
- extensionConfig?: {
298
- [key: string]: any;
299
- };
300
- extensions?: ITelemetryPlugin[];
301
- idLength?: number;
302
- instrumentationKey?: string;
303
- loggingLevelConsole?: number;
304
- loggingLevelTelemetry?: number;
305
- maxMessageLimit?: number;
306
- perfEvtsSendAll?: boolean;
307
- }
308
-
309
- // @public (undocumented)
310
- export interface ICookieMgr {
311
- del(name: string, path?: string): boolean;
312
- get(name: string): string;
313
- isEnabled(): boolean;
314
- purge(name: string, path?: string): boolean;
315
- set(name: string, value: string, maxAgeSec?: number, domain?: string, path?: string): boolean;
316
- setEnabled(value: boolean): void;
317
- }
318
-
319
- // @public
320
- export interface ICookieMgrConfig {
321
- delCookie?: (name: string, cookieValue: string) => void;
322
- domain?: string;
323
- enabled?: boolean;
324
- getCookie?: (name: string) => string;
325
- path?: string;
326
- setCookie?: (name: string, value: string) => void;
327
- }
328
-
329
- // @public @deprecated
330
- export interface ICoreUtils {
331
- addEventHandler: (eventName: string, callback: any) => boolean;
332
- arrForEach: <T>(arr: T[], callbackfn: (value: T, index?: number, array?: T[]) => void | number, thisArg?: any) => void;
333
- arrIndexOf: <T>(arr: T[], searchElement: T, fromIndex?: number) => number;
334
- arrMap: <T, R>(arr: T[], callbackfn: (value: T, index?: number, array?: T[]) => R, thisArg?: any) => R[];
335
- arrReduce: <T, R>(arr: T[], callbackfn: (previousValue: T | R, currentValue?: T, currentIndex?: number, array?: T[]) => R, initialValue?: R) => R;
336
- // @deprecated
337
- _canUseCookies: boolean;
338
- dateNow: () => number;
339
- // @deprecated (undocumented)
340
- disableCookies: () => void;
341
- generateW3CId: () => string;
342
- // (undocumented)
343
- hasOwnProperty: (obj: any, prop: string) => boolean;
344
- isArray: (obj: any) => boolean;
345
- isBoolean: (value: any) => value is boolean;
346
- isDate: (obj: any) => obj is Date;
347
- isError: (obj: any) => obj is Error;
348
- isFunction: (value: any) => value is Function;
349
- isIE: () => boolean;
350
- // (undocumented)
351
- isNullOrUndefined: (value: any) => boolean;
352
- isNumber: (value: any) => value is number;
353
- isObject: (value: any) => boolean;
354
- isString: (value: any) => value is string;
355
- // (undocumented)
356
- isTypeof: (value: any, theType: string) => boolean;
357
- // (undocumented)
358
- isUndefined: (value: any) => boolean;
359
- mwcRandom32: (signed?: boolean) => number;
360
- mwcRandomSeed: (value?: number) => void;
361
- // (undocumented)
362
- newGuid: () => string;
363
- newId: (maxLength?: number) => string;
364
- objCreate: (obj: object) => any;
365
- objDefineAccessors: <T>(target: any, prop: string, getProp?: () => T, setProp?: (v: T) => void) => boolean;
366
- objKeys: (obj: {}) => string[];
367
- perfNow: () => number;
368
- random32: (signed?: boolean) => number;
369
- randomValue: (maxValue: number) => number;
370
- strTrim: (str: any) => string;
371
- toISOString: (date: Date) => string;
372
- }
373
-
374
- // @public (undocumented)
375
- export interface ICustomProperties {
376
- // (undocumented)
377
- [key: string]: any;
378
- }
379
-
380
- // @public (undocumented)
381
- export interface IDiagnosticLogger {
382
- consoleLoggingLevel: () => number;
383
- enableDebugExceptions: () => boolean;
384
- errorToConsole?(message: string): void;
385
- logInternalMessage?(severity: LoggingSeverity, message: _InternalLogMessage): void;
386
- maxInternalMessageLimit: () => number;
387
- queue: _InternalLogMessage[];
388
- resetInternalMessageCount(): void;
389
- telemetryLoggingLevel: () => number;
390
- throwInternal(severity: LoggingSeverity, msgId: _InternalMessageId, msg: string, properties?: Object, isUserAct?: boolean): void;
391
- warnToConsole(message: string): void;
392
- }
393
-
394
- // @public (undocumented)
395
- export interface IEventHelper {
396
- Attach: (obj: any, eventNameWithoutOn: string, handlerRef: any) => boolean;
397
- // @deprecated
398
- AttachEvent: (obj: any, eventNameWithoutOn: string, handlerRef: any) => boolean;
399
- Detach: (obj: any, eventNameWithoutOn: string, handlerRef: any) => void;
400
- // @deprecated
401
- DetachEvent: (obj: any, eventNameWithoutOn: string, handlerRef: any) => void;
402
- }
403
-
404
- // @public (undocumented)
405
- export interface IInstrumentCallDetails {
406
- ctx: () => any;
407
- err?: Error;
408
- // (undocumented)
409
- inst: any;
410
- // (undocumented)
411
- name: string;
412
- rslt?: any;
413
- set: (idx: number, value: any) => void;
414
- }
415
-
416
- // @public
417
- export interface IInstrumentHook {
418
- cbks: IInstrumentHooksCallbacks;
419
- id: number;
420
- rm: () => void;
421
- }
422
-
423
- // @public (undocumented)
424
- export interface IInstrumentHooks {
425
- // (undocumented)
426
- f: any;
427
- // (undocumented)
428
- h: IInstrumentHook[];
429
- // (undocumented)
430
- i: number;
431
- // (undocumented)
432
- n: string;
433
- }
434
-
435
- // @public
436
- export interface IInstrumentHooksCallbacks {
437
- fnErr?: InstrumentorHooksCallback;
438
- hkErr?: InstrumentorHooksCallback;
439
- req?: InstrumentorHooksCallback;
440
- rsp?: InstrumentorHooksCallback;
441
- }
442
-
443
- // @public
444
- export function initializePlugins(processContext: ProcessTelemetryContext, extensions: IPlugin[]): void;
445
-
446
- // @public
447
- export interface INotificationListener {
448
- eventsDiscarded?: (events: ITelemetryItem[], reason: number) => void;
449
- eventsSendRequest?: (sendReason: number, isAsync?: boolean) => void;
450
- eventsSent?: (events: ITelemetryItem[]) => void;
451
- perfEvent?: (perfEvent: IPerfEvent) => void;
452
- }
453
-
454
- // @public
455
- export interface INotificationManager {
456
- addNotificationListener(listener: INotificationListener): void;
457
- eventsDiscarded(events: ITelemetryItem[], reason: number): void;
458
- eventsSendRequest?(sendReason: number, isAsync: boolean): void;
459
- eventsSent(events: ITelemetryItem[]): void;
460
- // (undocumented)
461
- listeners: INotificationListener[];
462
- perfEvent?(perfEvent: IPerfEvent): void;
463
- removeNotificationListener(listener: INotificationListener): void;
464
- }
465
-
466
- // @public
467
- export function InstrumentFunc(target: any, funcName: string, callbacks: IInstrumentHooksCallbacks, checkPrototype?: boolean): IInstrumentHook;
468
-
469
- // @public
470
- export function InstrumentFuncs(target: any, funcNames: string[], callbacks: IInstrumentHooksCallbacks, checkPrototype?: boolean): IInstrumentHook[];
471
-
472
- // @public
473
- export type InstrumentorHooksCallback = (funcArgs: IInstrumentCallDetails, ...orgArgs: any[]) => void;
474
-
475
- // @public
476
- export function InstrumentProto(target: any, funcName: string, callbacks: IInstrumentHooksCallbacks): IInstrumentHook;
477
-
478
- // @public
479
- export function InstrumentProtos(target: any, funcNames: string[], callbacks: IInstrumentHooksCallbacks): IInstrumentHook[];
480
-
481
- // @public (undocumented)
482
- export class _InternalLogMessage {
483
- constructor(msgId: _InternalMessageId, msg: string, isUserAct?: boolean, properties?: Object);
484
- // (undocumented)
485
- static dataType: string;
486
- // (undocumented)
487
- message: string;
488
- // (undocumented)
489
- messageId: _InternalMessageId;
490
- }
491
-
492
- // @public
493
- export const _InternalMessageId: {
494
- BrowserDoesNotSupportLocalStorage: number;
495
- BrowserCannotReadLocalStorage: number;
496
- BrowserCannotReadSessionStorage: number;
497
- BrowserCannotWriteLocalStorage: number;
498
- BrowserCannotWriteSessionStorage: number;
499
- BrowserFailedRemovalFromLocalStorage: number;
500
- BrowserFailedRemovalFromSessionStorage: number;
501
- CannotSendEmptyTelemetry: number;
502
- ClientPerformanceMathError: number;
503
- ErrorParsingAISessionCookie: number;
504
- ErrorPVCalc: number;
505
- ExceptionWhileLoggingError: number;
506
- FailedAddingTelemetryToBuffer: number;
507
- FailedMonitorAjaxAbort: number;
508
- FailedMonitorAjaxDur: number;
509
- FailedMonitorAjaxOpen: number;
510
- FailedMonitorAjaxRSC: number;
511
- FailedMonitorAjaxSend: number;
512
- FailedMonitorAjaxGetCorrelationHeader: number;
513
- FailedToAddHandlerForOnBeforeUnload: number;
514
- FailedToSendQueuedTelemetry: number;
515
- FailedToReportDataLoss: number;
516
- FlushFailed: number;
517
- MessageLimitPerPVExceeded: number;
518
- MissingRequiredFieldSpecification: number;
519
- NavigationTimingNotSupported: number;
520
- OnError: number;
521
- SessionRenewalDateIsZero: number;
522
- SenderNotInitialized: number;
523
- StartTrackEventFailed: number;
524
- StopTrackEventFailed: number;
525
- StartTrackFailed: number;
526
- StopTrackFailed: number;
527
- TelemetrySampledAndNotSent: number;
528
- TrackEventFailed: number;
529
- TrackExceptionFailed: number;
530
- TrackMetricFailed: number;
531
- TrackPVFailed: number;
532
- TrackPVFailedCalc: number;
533
- TrackTraceFailed: number;
534
- TransmissionFailed: number;
535
- FailedToSetStorageBuffer: number;
536
- FailedToRestoreStorageBuffer: number;
537
- InvalidBackendResponse: number;
538
- FailedToFixDepricatedValues: number;
539
- InvalidDurationValue: number;
540
- TelemetryEnvelopeInvalid: number;
541
- CreateEnvelopeError: number;
542
- CannotSerializeObject: number;
543
- CannotSerializeObjectNonSerializable: number;
544
- CircularReferenceDetected: number;
545
- ClearAuthContextFailed: number;
546
- ExceptionTruncated: number;
547
- IllegalCharsInName: number;
548
- ItemNotInArray: number;
549
- MaxAjaxPerPVExceeded: number;
550
- MessageTruncated: number;
551
- NameTooLong: number;
552
- SampleRateOutOfRange: number;
553
- SetAuthContextFailed: number;
554
- SetAuthContextFailedAccountName: number;
555
- StringValueTooLong: number;
556
- StartCalledMoreThanOnce: number;
557
- StopCalledWithoutStart: number;
558
- TelemetryInitializerFailed: number;
559
- TrackArgumentsNotSpecified: number;
560
- UrlTooLong: number;
561
- SessionStorageBufferFull: number;
562
- CannotAccessCookie: number;
563
- IdTooLong: number;
564
- InvalidEvent: number;
565
- FailedMonitorAjaxSetRequestHeader: number;
566
- SendBrowserInfoOnUserInit: number;
567
- PluginException: number;
568
- NotificationException: number;
569
- SnippetScriptLoadFailure: number;
570
- InvalidInstrumentationKey: number;
571
- CannotParseAiBlobValue: number;
572
- InvalidContentBlob: number;
573
- TrackPageActionEventFailed: number;
574
- FailedAddingCustomDefinedRequestContext: number;
575
- InMemoryStorageBufferFull: number;
576
- };
577
-
578
- // @public (undocumented)
579
- export type _InternalMessageId = number | typeof _InternalMessageId;
580
-
581
- // @public
582
- export interface IPerfEvent {
583
- childEvts?: IPerfEvent[];
584
- complete: () => void;
585
- exTime?: number;
586
- getCtx?: (key: string) => any;
587
- isAsync: boolean;
588
- isChildEvt: () => boolean;
589
- name: string;
590
- parent?: IPerfEvent;
591
- payload: any;
592
- setCtx?: (key: string, value: any) => void;
593
- start: number;
594
- time?: number;
595
- }
596
-
597
- // @public
598
- export interface IPerfManager {
599
- create(src: string, payloadDetails?: () => any, isAsync?: boolean): IPerfEvent | null | undefined;
600
- fire(perfEvent: IPerfEvent): void;
601
- getCtx(key: string): any;
602
- setCtx(key: string, value: any): void;
603
- }
604
-
605
- // @public
606
- export interface IPerfManagerProvider {
607
- getPerfMgr(): IPerfManager;
608
- setPerfMgr(perfMgr: IPerfManager): void;
609
- }
610
-
611
- // @public (undocumented)
612
- export interface IPlugin {
613
- readonly identifier: string;
614
- initialize: (config: IConfiguration, core: IAppInsightsCore, extensions: IPlugin[], pluginChain?: ITelemetryPluginChain) => void;
615
- isInitialized?: () => boolean;
616
- teardown?: () => void;
617
- readonly version?: string;
618
- }
619
-
620
- // @public
621
- export interface IProcessTelemetryContext {
622
- core: () => IAppInsightsCore;
623
- createNew: (plugins?: IPlugin[] | ITelemetryPluginChain, startAt?: IPlugin) => IProcessTelemetryContext;
624
- diagLog: () => IDiagnosticLogger;
625
- getCfg: () => IConfiguration;
626
- getConfig: (identifier: string, field: string, defaultValue?: number | string | boolean) => number | string | boolean;
627
- getExtCfg: <T>(identifier: string, defaultValue?: T | any) => T;
628
- getNext: () => ITelemetryPluginChain;
629
- hasNext: () => boolean;
630
- processNext: (env: ITelemetryItem) => void;
631
- setNext: (nextCtx: ITelemetryPluginChain) => void;
632
- }
633
-
634
- // @public
635
- export function isArray(obj: any): boolean;
636
-
637
- // @public
638
- export function isBeaconsSupported(): boolean;
639
-
640
- // @public
641
- export function isBoolean(value: any): value is boolean;
642
-
643
- // @public
644
- export function isDate(obj: any): obj is Date;
645
-
646
- // @public
647
- export function isError(obj: any): obj is Error;
648
-
649
- // @public
650
- export function isFetchSupported(withKeepAlive?: boolean): boolean;
651
-
652
- // @public (undocumented)
653
- export function isFunction(value: any): value is Function;
654
-
655
- // @public
656
- export function isIE(): boolean;
657
-
658
- // @public (undocumented)
659
- export function isNotNullOrUndefined(value: any): boolean;
660
-
661
- // @public (undocumented)
662
- export function isNotTruthy(value: any): boolean;
663
-
664
- // @public (undocumented)
665
- export function isNotUndefined(value: any): boolean;
666
-
667
- // @public (undocumented)
668
- export function isNullOrUndefined(value: any): boolean;
669
-
670
- // @public
671
- export function isNumber(value: any): value is number;
672
-
673
- // @public (undocumented)
674
- export function isObject(value: any): boolean;
675
-
676
- // @public
677
- export function isReactNative(): boolean;
678
-
679
- // @public (undocumented)
680
- export function isSafari(userAgentStr?: string): boolean;
681
-
682
- // @public
683
- export function isString(value: any): value is string;
684
-
685
- // @public
686
- export function isSymbol(value: any): boolean;
687
-
688
- // @public (undocumented)
689
- export function isTruthy(value: any): boolean;
690
-
691
- // @public (undocumented)
692
- export function isTypeof(value: any, theType: string): boolean;
693
-
694
- // @public (undocumented)
695
- export function isUndefined(value: any): boolean;
696
-
697
- // @public
698
- export function isXhrSupported(): boolean;
699
-
700
- // @public
701
- export interface ITelemetryItem {
702
- baseData?: {
703
- [key: string]: any;
704
- };
705
- baseType?: string;
706
- data?: ICustomProperties;
707
- ext?: {
708
- [key: string]: any;
709
- };
710
- iKey?: string;
711
- name: string;
712
- tags?: Tags & Tags[];
713
- time?: string;
714
- ver?: string;
715
- }
716
-
717
- // @public
718
- export interface ITelemetryPlugin extends IPlugin {
719
- readonly priority: number;
720
- processTelemetry: (env: ITelemetryItem, itemCtx?: IProcessTelemetryContext) => void;
721
- setNextPlugin?: (next: ITelemetryPlugin | ITelemetryPluginChain) => void;
722
- }
723
-
724
- // @public
725
- export interface ITelemetryPluginChain {
726
- getNext: () => ITelemetryPluginChain;
727
- getPlugin: () => ITelemetryPlugin;
728
- processTelemetry: (env: ITelemetryItem, itemCtx: IProcessTelemetryContext) => void;
729
- }
730
-
731
- // @public
732
- export function _legacyCookieMgr(config?: IConfiguration, logger?: IDiagnosticLogger): ICookieMgr;
733
-
734
- // @public (undocumented)
735
- export enum LoggingSeverity {
736
- CRITICAL = 1,
737
- WARNING = 2
738
- }
739
-
740
- // @public (undocumented)
741
- export const MinChannelPriorty: number;
742
-
743
- // @public
744
- export function mwcRandom32(signed?: boolean): number;
745
-
746
- // @public
747
- export function mwcRandomSeed(value?: number): void;
748
-
749
- // @public (undocumented)
750
- export function newGuid(): string;
751
-
752
- // @public
753
- export function newId(maxLength?: number): string;
754
-
755
- // @public
756
- export function normalizeJsName(name: string): string;
757
-
758
- // @public
759
- export class NotificationManager implements INotificationManager {
760
- constructor(config?: IConfiguration);
761
- addNotificationListener(listener: INotificationListener): void;
762
- eventsDiscarded(events: ITelemetryItem[], reason: number): void;
763
- eventsSendRequest?(sendReason: number, isAsync: boolean): void;
764
- eventsSent(events: ITelemetryItem[]): void;
765
- // (undocumented)
766
- listeners: INotificationListener[];
767
- perfEvent?(perfEvent: IPerfEvent): void;
768
- removeNotificationListener(listener: INotificationListener): void;
769
- }
770
-
771
- export { objCreate }
772
-
773
- // @public
774
- export function objDefineAccessors<T>(target: any, prop: string, getProp?: () => T, setProp?: (v: T) => void): boolean;
775
-
776
- // @public
777
- export function objForEachKey(target: any, callbackfn: (name: string, value: any) => void): void;
778
-
779
- // @public (undocumented)
780
- export function objFreeze<T>(value: T): T;
781
-
782
- // @public
783
- export function objKeys(obj: {}): string[];
784
-
785
- // @public (undocumented)
786
- export function objSeal<T>(value: T): T;
787
-
788
- // @public
789
- export function optimizeObject<T>(theObject: T): T;
790
-
791
- // @public (undocumented)
792
- export class PerfEvent implements IPerfEvent {
793
- constructor(name: string, payloadDetails: () => any, isAsync: boolean);
794
- // (undocumented)
795
- static ChildrenContextKey: string;
796
- // (undocumented)
797
- complete: () => void;
798
- exTime?: number;
799
- // (undocumented)
800
- getCtx?: (key: string) => any | null | undefined;
801
- isAsync: boolean;
802
- isChildEvt: () => boolean;
803
- name: string;
804
- // (undocumented)
805
- static ParentContextKey: string;
806
- payload: any;
807
- // (undocumented)
808
- setCtx?: (key: string, value: any) => void;
809
- start: number;
810
- time?: number;
811
- }
812
-
813
- // @public (undocumented)
814
- export class PerfManager implements IPerfManager {
815
- constructor(manager: INotificationManager);
816
- create(src: string, payload?: any, isAsync?: boolean): IPerfEvent | null | undefined;
817
- fire(perfEvent: IPerfEvent): void;
818
- getCtx(key: string): any;
819
- setCtx(key: string, value: any): void;
820
- }
821
-
822
- // @public
823
- export function perfNow(): number;
824
-
825
- // @public (undocumented)
826
- export class ProcessTelemetryContext implements IProcessTelemetryContext {
827
- constructor(plugins: IPlugin[] | ITelemetryPluginChain, config: IConfiguration, core: IAppInsightsCore, startAt?: IPlugin);
828
- core: () => IAppInsightsCore;
829
- createNew: (plugins?: IPlugin[] | ITelemetryPluginChain, startAt?: IPlugin) => IProcessTelemetryContext;
830
- diagLog: () => IDiagnosticLogger;
831
- getCfg: () => IConfiguration;
832
- // (undocumented)
833
- getConfig: (identifier: string, field: string, defaultValue?: number | string | boolean) => number | string | boolean;
834
- // (undocumented)
835
- getExtCfg: <T>(identifier: string, defaultValue?: T | any) => T;
836
- getNext: () => ITelemetryPluginChain;
837
- hasNext: () => boolean;
838
- processNext: (env: ITelemetryItem) => void;
839
- setNext: (nextCtx: ITelemetryPluginChain) => void;
840
- }
841
-
842
- // @public
843
- export function proxyAssign(target: any, source: any, chkSet?: (name: string, isFunc?: boolean, source?: any, target?: any) => boolean): any;
844
-
845
- // @public
846
- export function random32(signed?: boolean): number;
847
-
848
- // @public
849
- export function randomValue(maxValue: number): number;
850
-
851
- // @public
852
- export function safeGetCookieMgr(core: IAppInsightsCore, config?: IConfiguration): ICookieMgr;
853
-
854
- // @public (undocumented)
855
- export function safeGetLogger(core: IAppInsightsCore, config?: IConfiguration): IDiagnosticLogger;
856
-
857
- // @public
858
- export const enum SendRequestReason {
859
- ManualFlush = 1,
860
- MaxBatchSize = 10,
861
- MaxQueuedEvents = 20,
862
- NormalSchedule = 1,
863
- Resumed = 4,
864
- Retry = 5,
865
- SyncEvent = 3,
866
- Undefined = 0,
867
- Unload = 2
868
- }
869
-
870
- // @public @deprecated (undocumented)
871
- export function setCookie(logger: IDiagnosticLogger, name: string, value: string, domain?: string): void;
872
-
873
- // @public
874
- export function setEnableEnvMocks(enabled: boolean): void;
875
-
876
- // @public
877
- export function setGblPerfMgr(perfManager: IPerfManager): void;
878
-
879
- // @public
880
- export function setValue<T, K extends keyof T>(target: T, field: K, value: T[K], valChk?: (value: T[K]) => boolean, srcChk?: (value: T[K]) => boolean): T[K];
881
-
882
- // @public (undocumented)
883
- export function sortPlugins(plugins: IPlugin[]): IPlugin[];
884
-
885
- // @public
886
- export function strContains(value: string, search: string): boolean;
887
-
888
- // @public
889
- export function strEndsWith(value: string, search: string): boolean;
890
-
891
- // @public (undocumented)
892
- export const strExtensionConfig = "extensionConfig";
893
-
894
- export { strFunction }
895
-
896
- // @public (undocumented)
897
- export const strIKey = "iKey";
898
-
899
- export { strObject }
900
-
901
- export { strPrototype }
902
-
903
- // @public
904
- export function strStartsWith(value: string, checkValue: string): boolean;
905
-
906
- // @public
907
- export function strTrim(str: any): string;
908
-
909
- export { strUndefined }
910
-
911
- // @public (undocumented)
912
- export interface Tags {
913
- // (undocumented)
914
- [key: string]: any;
915
- }
916
-
917
- // @public (undocumented)
918
- export function throwError(message: string): never;
919
-
920
- // @public
921
- export function toISOString(date: Date): string;
922
-
923
- // @public (undocumented)
924
- export function uaDisallowsSameSiteNone(userAgent: string): boolean;
925
-
926
- // @public (undocumented)
927
- export const Undefined = "undefined";
928
-
929
- // @public (undocumented)
930
- export function useXDomainRequest(): boolean | undefined;
931
-
932
- // (No @packageDocumentation comment for this package)
933
-
934
- ```