@microsoft/applicationinsights-core-js 3.0.0-beta.2208-14 → 3.0.0-beta.2208-19
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.
- package/README.md +7 -0
- package/browser/applicationinsights-core-js.integrity.json +9 -9
- package/browser/applicationinsights-core-js.js +2040 -2149
- package/browser/applicationinsights-core-js.js.map +1 -1
- package/browser/applicationinsights-core-js.min.js +2 -2
- package/browser/applicationinsights-core-js.min.js.map +1 -1
- package/dist/applicationinsights-core-js.api.json +8265 -12112
- package/dist/applicationinsights-core-js.api.md +87 -177
- package/dist/applicationinsights-core-js.d.ts +88 -494
- package/dist/applicationinsights-core-js.js +2040 -2149
- package/dist/applicationinsights-core-js.js.map +1 -1
- package/dist/applicationinsights-core-js.min.js +2 -2
- package/dist/applicationinsights-core-js.min.js.map +1 -1
- package/dist/applicationinsights-core-js.rollup.d.ts +88 -494
- package/dist-esm/JavaScriptSDK/AppInsightsCore.js +2 -2
- package/dist-esm/JavaScriptSDK/AppInsightsCore.js.map +1 -1
- package/dist-esm/JavaScriptSDK/BaseCore.js +11 -12
- package/dist-esm/JavaScriptSDK/BaseCore.js.map +1 -1
- package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js +3 -2
- package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js.map +1 -1
- package/dist-esm/JavaScriptSDK/ChannelController.js +2 -2
- package/dist-esm/JavaScriptSDK/ChannelController.js.map +1 -1
- package/dist-esm/JavaScriptSDK/CookieMgr.js +27 -26
- package/dist-esm/JavaScriptSDK/CookieMgr.js.map +1 -1
- package/dist-esm/JavaScriptSDK/CoreUtils.js +6 -133
- package/dist-esm/JavaScriptSDK/CoreUtils.js.map +1 -1
- package/dist-esm/JavaScriptSDK/DataCacheHelper.js +2 -2
- package/dist-esm/JavaScriptSDK/DataCacheHelper.js.map +1 -1
- package/dist-esm/JavaScriptSDK/DbgExtensionUtils.js +3 -3
- package/dist-esm/JavaScriptSDK/DbgExtensionUtils.js.map +1 -1
- package/dist-esm/JavaScriptSDK/DiagnosticLogger.js +4 -3
- package/dist-esm/JavaScriptSDK/DiagnosticLogger.js.map +1 -1
- package/dist-esm/JavaScriptSDK/EnvUtils.js +132 -136
- package/dist-esm/JavaScriptSDK/EnvUtils.js.map +1 -1
- package/dist-esm/JavaScriptSDK/EventHelpers.js +2 -3
- package/dist-esm/JavaScriptSDK/EventHelpers.js.map +1 -1
- package/dist-esm/JavaScriptSDK/HelperFuncs.js +23 -470
- package/dist-esm/JavaScriptSDK/HelperFuncs.js.map +1 -1
- package/dist-esm/JavaScriptSDK/InstrumentHooks.js +5 -5
- package/dist-esm/JavaScriptSDK/InstrumentHooks.js.map +1 -1
- package/dist-esm/JavaScriptSDK/InternalConstants.js +4 -4
- package/dist-esm/JavaScriptSDK/InternalConstants.js.map +1 -1
- package/dist-esm/JavaScriptSDK/NotificationManager.js +2 -2
- package/dist-esm/JavaScriptSDK/NotificationManager.js.map +1 -1
- package/dist-esm/JavaScriptSDK/PerfManager.js +4 -8
- package/dist-esm/JavaScriptSDK/PerfManager.js.map +1 -1
- package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js +3 -3
- package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js.map +1 -1
- package/dist-esm/JavaScriptSDK/RandomHelper.js +1 -1
- package/dist-esm/JavaScriptSDK/TelemetryHelpers.js +2 -2
- package/dist-esm/JavaScriptSDK/TelemetryHelpers.js.map +1 -1
- package/dist-esm/JavaScriptSDK/TelemetryInitializerPlugin.js +3 -3
- package/dist-esm/JavaScriptSDK/TelemetryInitializerPlugin.js.map +1 -1
- package/dist-esm/JavaScriptSDK/UnloadHandlerContainer.js +2 -3
- package/dist-esm/JavaScriptSDK/UnloadHandlerContainer.js.map +1 -1
- package/dist-esm/JavaScriptSDK/W3cTraceParent.js +2 -2
- package/dist-esm/JavaScriptSDK/W3cTraceParent.js.map +1 -1
- package/dist-esm/JavaScriptSDK.Enums/EnumHelperFuncs.js +5 -31
- package/dist-esm/JavaScriptSDK.Enums/EnumHelperFuncs.js.map +1 -1
- package/dist-esm/JavaScriptSDK.Enums/EventsDiscardedReason.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/LoggingEnums.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/SendRequestReason.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/TelemetryUnloadReason.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/TelemetryUpdateReason.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IAppInsightsCore.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IChannelControls.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IConfiguration.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ICookieMgr.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IDbgExtension.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IDiagnosticLogger.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IDistributedTraceContext.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IInstrumentHooks.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/INotificationListener.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/INotificationManager.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IPerfEvent.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IPerfManager.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IProcessTelemetryContext.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryInitializers.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryItem.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPlugin.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPluginChain.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUnloadState.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUpdateState.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITraceParent.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IUnloadableComponent.js +1 -1
- package/dist-esm/__DynamicConstants.js +10 -12
- package/dist-esm/__DynamicConstants.js.map +1 -1
- package/dist-esm/applicationinsights-core-js.js +6 -5
- package/dist-esm/applicationinsights-core-js.js.map +1 -1
- package/package.json +4 -3
- package/src/JavaScriptSDK/AppInsightsCore.ts +1 -1
- package/src/JavaScriptSDK/BaseCore.ts +2 -4
- package/src/JavaScriptSDK/BaseTelemetryPlugin.ts +2 -1
- package/src/JavaScriptSDK/ChannelController.ts +1 -1
- package/src/JavaScriptSDK/CookieMgr.ts +6 -5
- package/src/JavaScriptSDK/CoreUtils.ts +4 -416
- package/src/JavaScriptSDK/DbgExtensionUtils.ts +2 -2
- package/src/JavaScriptSDK/DiagnosticLogger.ts +3 -2
- package/src/JavaScriptSDK/EnvUtils.ts +145 -148
- package/src/JavaScriptSDK/EventHelpers.ts +1 -2
- package/src/JavaScriptSDK/HelperFuncs.ts +22 -536
- package/src/JavaScriptSDK/InstrumentHooks.ts +4 -4
- package/src/JavaScriptSDK/InternalConstants.ts +3 -3
- package/src/JavaScriptSDK/NotificationManager.ts +1 -1
- package/src/JavaScriptSDK/PerfManager.ts +3 -7
- package/src/JavaScriptSDK/ProcessTelemetryContext.ts +4 -4
- package/src/JavaScriptSDK/TelemetryHelpers.ts +1 -1
- package/src/JavaScriptSDK/TelemetryInitializerPlugin.ts +2 -2
- package/src/JavaScriptSDK/UnloadHandlerContainer.ts +1 -2
- package/src/JavaScriptSDK/W3cTraceParent.ts +1 -1
- package/src/JavaScriptSDK.Enums/EnumHelperFuncs.ts +5 -36
- package/tsconfig.json +1 -1
- package/types/JavaScriptSDK/CoreUtils.d.ts +0 -270
- package/types/JavaScriptSDK/EnvUtils.d.ts +0 -65
- package/types/JavaScriptSDK/HelperFuncs.d.ts +3 -154
- package/types/JavaScriptSDK.Enums/EnumHelperFuncs.d.ts +6 -18
- package/types/__DynamicConstants.d.ts +1 -3
- package/types/applicationinsights-core-js.d.ts +5 -4
- package/types/tsdoc-metadata.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Microsoft Application Insights Core Javascript SDK, 3.0.0-beta.2208-
|
|
2
|
+
* Microsoft Application Insights Core Javascript SDK, 3.0.0-beta.2208-19
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* Microsoft Application Insights Team
|
|
@@ -7,12 +7,53 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
declare namespace ApplicationInsights {
|
|
10
|
+
import { arrForEach } from '@nevware21/ts-utils';
|
|
11
|
+
import { arrIndexOf } from '@nevware21/ts-utils';
|
|
12
|
+
import { arrMap } from '@nevware21/ts-utils';
|
|
13
|
+
import { arrReduce } from '@nevware21/ts-utils';
|
|
14
|
+
import { objDeepFreeze as deepFreeze } from '@nevware21/ts-utils';
|
|
15
|
+
import { dumpObj } from '@nevware21/ts-utils';
|
|
16
|
+
import { EnumCls } from '@nevware21/ts-utils';
|
|
17
|
+
import { getDocument } from '@nevware21/ts-utils';
|
|
10
18
|
import { getGlobal } from '@microsoft/applicationinsights-shims';
|
|
19
|
+
import { getInst as getGlobalInst } from '@nevware21/ts-utils';
|
|
20
|
+
import { getHistory } from '@nevware21/ts-utils';
|
|
21
|
+
import { getNavigator } from '@nevware21/ts-utils';
|
|
22
|
+
import { getWindow } from '@nevware21/ts-utils';
|
|
23
|
+
import { hasDocument } from '@nevware21/ts-utils';
|
|
24
|
+
import { hasHistory } from '@nevware21/ts-utils';
|
|
25
|
+
import { hasNavigator } from '@nevware21/ts-utils';
|
|
26
|
+
import { objHasOwnProperty as hasOwnProperty } from '@nevware21/ts-utils';
|
|
27
|
+
import { hasWindow } from '@nevware21/ts-utils';
|
|
28
|
+
import { isArray } from '@nevware21/ts-utils';
|
|
29
|
+
import { isBoolean } from '@nevware21/ts-utils';
|
|
30
|
+
import { isDate } from '@nevware21/ts-utils';
|
|
31
|
+
import { isError } from '@nevware21/ts-utils';
|
|
32
|
+
import { isFunction } from '@nevware21/ts-utils';
|
|
33
|
+
import { isNotTruthy } from '@nevware21/ts-utils';
|
|
34
|
+
import { isNullOrUndefined } from '@nevware21/ts-utils';
|
|
35
|
+
import { isNumber } from '@nevware21/ts-utils';
|
|
36
|
+
import { isObject } from '@nevware21/ts-utils';
|
|
37
|
+
import { isString } from '@nevware21/ts-utils';
|
|
38
|
+
import { isSymbol } from '@nevware21/ts-utils';
|
|
39
|
+
import { isTruthy } from '@nevware21/ts-utils';
|
|
40
|
+
import { isTypeof } from '@nevware21/ts-utils';
|
|
41
|
+
import { isUndefined } from '@nevware21/ts-utils';
|
|
11
42
|
import { objCreateFn as objCreate } from '@microsoft/applicationinsights-shims';
|
|
43
|
+
import { objDefineAccessors } from '@nevware21/ts-utils';
|
|
44
|
+
import { objForEachKey } from '@nevware21/ts-utils';
|
|
45
|
+
import { objFreeze } from '@nevware21/ts-utils';
|
|
46
|
+
import { objKeys } from '@nevware21/ts-utils';
|
|
47
|
+
import { objSeal } from '@nevware21/ts-utils';
|
|
48
|
+
import { objToString } from '@nevware21/ts-utils';
|
|
49
|
+
import { strEndsWith } from '@nevware21/ts-utils';
|
|
12
50
|
import { strShimFunction as strFunction } from '@microsoft/applicationinsights-shims';
|
|
13
51
|
import { strShimObject as strObject } from '@microsoft/applicationinsights-shims';
|
|
14
52
|
import { strShimPrototype as strPrototype } from '@microsoft/applicationinsights-shims';
|
|
53
|
+
import { strStartsWith } from '@nevware21/ts-utils';
|
|
54
|
+
import { strTrim } from '@nevware21/ts-utils';
|
|
15
55
|
import { strShimUndefined as strUndefined } from '@microsoft/applicationinsights-shims';
|
|
56
|
+
import { throwError } from '@nevware21/ts-utils';
|
|
16
57
|
|
|
17
58
|
/**
|
|
18
59
|
* Get all of the registered events on the target object, this is primarily used for testing cleanup but may also be used by
|
|
@@ -91,45 +132,13 @@ declare namespace ApplicationInsights {
|
|
|
91
132
|
|
|
92
133
|
function areCookiesSupported(logger?: IDiagnosticLogger): any;
|
|
93
134
|
|
|
94
|
-
|
|
95
|
-
* Performs the specified action for each element in an array. This helper exists to avoid adding a polyfil for older browsers
|
|
96
|
-
* that do not define Array.prototype.xxxx (eg. ES3 only, IE8) just in case any page checks for presence/absence of the prototype
|
|
97
|
-
* implementation. Note: For consistency this will not use the Array.prototype.xxxx implementation if it exists as this would
|
|
98
|
-
* cause a testing requirement to test with and without the implementations
|
|
99
|
-
* @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. It can return -1 to break out of the loop
|
|
100
|
-
* @param thisArg [Optional] An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
|
|
101
|
-
*/
|
|
102
|
-
function arrForEach<T = any>(arr: T[], callbackfn: (value: T, index?: number, array?: T[]) => undefined | void | number, thisArg?: any): void;
|
|
135
|
+
export { arrForEach }
|
|
103
136
|
|
|
104
|
-
|
|
105
|
-
* Returns the index of the first occurrence of a value in an array. This helper exists to avoid adding a polyfil for older browsers
|
|
106
|
-
* that do not define Array.prototype.xxxx (eg. ES3 only, IE8) just in case any page checks for presence/absence of the prototype
|
|
107
|
-
* implementation. Note: For consistency this will not use the Array.prototype.xxxx implementation if it exists as this would
|
|
108
|
-
* cause a testing requirement to test with and without the implementations
|
|
109
|
-
* @param searchElement The value to locate in the array.
|
|
110
|
-
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
|
|
111
|
-
*/
|
|
112
|
-
function arrIndexOf<T>(arr: T[], searchElement: T, fromIndex?: number): number;
|
|
137
|
+
export { arrIndexOf }
|
|
113
138
|
|
|
114
|
-
|
|
115
|
-
* Calls a defined callback function on each element of an array, and returns an array that contains the results. This helper exists
|
|
116
|
-
* to avoid adding a polyfil for older browsers that do not define Array.prototype.xxxx (eg. ES3 only, IE8) just in case any page
|
|
117
|
-
* checks for presence/absence of the prototype implementation. Note: For consistency this will not use the Array.prototype.xxxx
|
|
118
|
-
* implementation if it exists as this would cause a testing requirement to test with and without the implementations
|
|
119
|
-
* @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
|
|
120
|
-
* @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
|
|
121
|
-
*/
|
|
122
|
-
function arrMap<T, R>(arr: T[], callbackfn: (value: T, index?: number, array?: T[]) => R, thisArg?: any): R[];
|
|
139
|
+
export { arrMap }
|
|
123
140
|
|
|
124
|
-
|
|
125
|
-
* Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is
|
|
126
|
-
* provided as an argument in the next call to the callback function. This helper exists to avoid adding a polyfil for older browsers that do not define
|
|
127
|
-
* Array.prototype.xxxx (eg. ES3 only, IE8) just in case any page checks for presence/absence of the prototype implementation. Note: For consistency
|
|
128
|
-
* this will not use the Array.prototype.xxxx implementation if it exists as this would cause a testing requirement to test with and without the implementations
|
|
129
|
-
* @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
|
|
130
|
-
* @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
|
|
131
|
-
*/
|
|
132
|
-
function arrReduce<T, R>(arr: T[], callbackfn: (previousValue: T | R, currentValue?: T, currentIndex?: number, array?: T[]) => R, initialValue?: R): R;
|
|
141
|
+
export { arrReduce }
|
|
133
142
|
|
|
134
143
|
/**
|
|
135
144
|
* Binds the specified function to an event, so that the function gets called whenever the event fires on the object
|
|
@@ -342,20 +351,6 @@ declare namespace ApplicationInsights {
|
|
|
342
351
|
protected _addHook(hooks: IInstrumentHook | IInstrumentHook[]): void;
|
|
343
352
|
}
|
|
344
353
|
|
|
345
|
-
/**
|
|
346
|
-
* @deprecated - Use the core.getCookieMgr().isEnabled()
|
|
347
|
-
* Helper method to tell if document.cookie object is available and whether it can be used.
|
|
348
|
-
*/
|
|
349
|
-
function canUseCookies(logger: IDiagnosticLogger): any;
|
|
350
|
-
|
|
351
|
-
/**
|
|
352
|
-
* Provides a collection of utility functions, included for backward compatibility with previous releases.
|
|
353
|
-
* @deprecated Marking this instance as deprecated in favor of direct usage of the helper functions
|
|
354
|
-
* as direct usage provides better tree-shaking and minification by avoiding the inclusion of the unused items
|
|
355
|
-
* in your resulting code.
|
|
356
|
-
*/
|
|
357
|
-
const CoreUtils: ICoreUtils;
|
|
358
|
-
|
|
359
354
|
/**
|
|
360
355
|
* Simpler helper to create a dynamic class that implements the interface and populates the values with the defaults.
|
|
361
356
|
* Only instance properties (hasOwnProperty) values are copied from the defaults to the new instance
|
|
@@ -365,23 +360,14 @@ declare namespace ApplicationInsights {
|
|
|
365
360
|
|
|
366
361
|
function createCookieMgr(rootConfig?: IConfiguration, logger?: IDiagnosticLogger): ICookieMgr;
|
|
367
362
|
|
|
368
|
-
/**
|
|
369
|
-
* Create a 2 index map that maps an enum's key as both the key and value, X["key"] => "key" and X[0] => "keyof 0".
|
|
370
|
-
* @param values - The values to populate on the new object
|
|
371
|
-
* @returns
|
|
372
|
-
*/
|
|
373
|
-
function createEnumMap<E, I = keyof E>(values: {
|
|
374
|
-
[key in keyof E]: E[keyof E];
|
|
375
|
-
}): EnumMap<E, I>;
|
|
376
|
-
|
|
377
363
|
/**
|
|
378
364
|
* Create an enum style object which has both the key => value and value => key mappings
|
|
379
365
|
* @param values - The values to populate on the new object
|
|
380
366
|
* @returns
|
|
381
367
|
*/
|
|
382
|
-
|
|
368
|
+
const createEnumStyle: <E>(values: {
|
|
383
369
|
[key in keyof E]: E[keyof E];
|
|
384
|
-
})
|
|
370
|
+
}) => EnumValue<E>;
|
|
385
371
|
|
|
386
372
|
/**
|
|
387
373
|
* Creates a new Telemetry Item context with the current config, core and plugin execution chain
|
|
@@ -418,9 +404,9 @@ declare namespace ApplicationInsights {
|
|
|
418
404
|
* @param values - The values to populate on the new object
|
|
419
405
|
* @returns
|
|
420
406
|
*/
|
|
421
|
-
|
|
407
|
+
const createValueMap: <E, V = E>(values: {
|
|
422
408
|
[key in keyof E]: [E[keyof E], V[keyof V]];
|
|
423
|
-
})
|
|
409
|
+
}) => V;
|
|
424
410
|
|
|
425
411
|
/**
|
|
426
412
|
* Return the current time via the Date now() function (if available) and falls back to (new Date()).getTime() if now() is unavailable (IE8 or less)
|
|
@@ -428,14 +414,7 @@ declare namespace ApplicationInsights {
|
|
|
428
414
|
*/
|
|
429
415
|
function dateNow(): number;
|
|
430
416
|
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
/**
|
|
434
|
-
* @deprecated - Use the core.getCookieMgr().del()
|
|
435
|
-
* Deletes a cookie by setting it's expiration time in the past.
|
|
436
|
-
* @param name - The name of the cookie to delete.
|
|
437
|
-
*/
|
|
438
|
-
function deleteCookie(logger: IDiagnosticLogger, name: string): boolean;
|
|
417
|
+
export { deepFreeze }
|
|
439
418
|
|
|
440
419
|
/**
|
|
441
420
|
* Removes an event handler for the specified event
|
|
@@ -504,12 +483,6 @@ declare namespace ApplicationInsights {
|
|
|
504
483
|
logInternalMessage(severity: LoggingSeverity, message: _InternalLogMessage): void;
|
|
505
484
|
}
|
|
506
485
|
|
|
507
|
-
/**
|
|
508
|
-
* @deprecated - Use the core.getCookieMgr().disable()
|
|
509
|
-
* Force the SDK not to store and read any data from cookies.
|
|
510
|
-
*/
|
|
511
|
-
function disableCookies(): void;
|
|
512
|
-
|
|
513
486
|
/**
|
|
514
487
|
* Helper function to wrap a function with a perf event
|
|
515
488
|
* @param mgrSource - The Performance Manager or a Performance provider source (may be null)
|
|
@@ -520,10 +493,7 @@ declare namespace ApplicationInsights {
|
|
|
520
493
|
*/
|
|
521
494
|
function doPerf<T>(mgrSource: IPerfManagerProvider | IPerfManager, getSource: () => string, func: (perfEvt?: IPerfEvent) => T, details?: () => any, isAsync?: boolean): T;
|
|
522
495
|
|
|
523
|
-
|
|
524
|
-
* Returns string representation of an object suitable for diagnostics logging.
|
|
525
|
-
*/
|
|
526
|
-
function dumpObj(object: any): string;
|
|
496
|
+
export { dumpObj }
|
|
527
497
|
|
|
528
498
|
/**
|
|
529
499
|
* The eEventsDiscardedReason enumeration contains a set of values that specify the reason for discarding an event.
|
|
@@ -652,15 +622,7 @@ declare namespace ApplicationInsights {
|
|
|
652
622
|
WARNING = 2
|
|
653
623
|
}
|
|
654
624
|
|
|
655
|
-
type
|
|
656
|
-
readonly [key in keyof E extends string ? keyof E : never]: key extends string ? key : keyof E;
|
|
657
|
-
} & I;
|
|
658
|
-
|
|
659
|
-
type EnumValue<E = any> = {
|
|
660
|
-
readonly [key in keyof E]: E[key];
|
|
661
|
-
};
|
|
662
|
-
|
|
663
|
-
const EventHelper: IEventHelper;
|
|
625
|
+
type EnumValue<E = any> = EnumCls<E>;
|
|
664
626
|
|
|
665
627
|
/**
|
|
666
628
|
* Removes an event handler for the specified event
|
|
@@ -734,12 +696,6 @@ declare namespace ApplicationInsights {
|
|
|
734
696
|
*/
|
|
735
697
|
function getConsole(): Console | null;
|
|
736
698
|
|
|
737
|
-
/**
|
|
738
|
-
* @deprecated - Use the core.getCookieMgr().get()
|
|
739
|
-
* helper method to access userId and sessionId cookie
|
|
740
|
-
*/
|
|
741
|
-
function getCookie(logger: IDiagnosticLogger, name: string): string;
|
|
742
|
-
|
|
743
699
|
/**
|
|
744
700
|
* Returns the crypto object if it is present otherwise null.
|
|
745
701
|
* This helper is used to access the crypto object from the current
|
|
@@ -751,12 +707,7 @@ declare namespace ApplicationInsights {
|
|
|
751
707
|
|
|
752
708
|
function getDebugListener(config: IConfiguration): INotificationListener;
|
|
753
709
|
|
|
754
|
-
|
|
755
|
-
* Returns the global document object if it is present otherwise null.
|
|
756
|
-
* This helper is used to access the document object without causing an exception
|
|
757
|
-
* "Uncaught ReferenceError: document is not defined"
|
|
758
|
-
*/
|
|
759
|
-
function getDocument(): Document | null;
|
|
710
|
+
export { getDocument }
|
|
760
711
|
|
|
761
712
|
/**
|
|
762
713
|
* Returns the name of object if it's an Error. Otherwise, returns empty string.
|
|
@@ -777,18 +728,9 @@ declare namespace ApplicationInsights {
|
|
|
777
728
|
|
|
778
729
|
export { getGlobal }
|
|
779
730
|
|
|
780
|
-
|
|
781
|
-
* Return the named global object if available, will return null if the object is not available.
|
|
782
|
-
* @param name The globally named object
|
|
783
|
-
*/
|
|
784
|
-
function getGlobalInst<T>(name: string): T;
|
|
731
|
+
export { getGlobalInst }
|
|
785
732
|
|
|
786
|
-
|
|
787
|
-
* Returns the global history object if it is present otherwise null.
|
|
788
|
-
* This helper is used to access the history object without causing an exception
|
|
789
|
-
* "Uncaught ReferenceError: history is not defined"
|
|
790
|
-
*/
|
|
791
|
-
function getHistory(): History | null;
|
|
733
|
+
export { getHistory }
|
|
792
734
|
|
|
793
735
|
/**
|
|
794
736
|
* Gets IE version returning the document emulation mode if we are running on IE, or null otherwise
|
|
@@ -816,12 +758,7 @@ declare namespace ApplicationInsights {
|
|
|
816
758
|
*/
|
|
817
759
|
function getMsCrypto(): Crypto | null;
|
|
818
760
|
|
|
819
|
-
|
|
820
|
-
* Returns the global navigator object if it is present otherwise null.
|
|
821
|
-
* This helper is used to access the navigator object without causing an exception
|
|
822
|
-
* "Uncaught ReferenceError: navigator is not defined"
|
|
823
|
-
*/
|
|
824
|
-
function getNavigator(): Navigator | null;
|
|
761
|
+
export { getNavigator }
|
|
825
762
|
|
|
826
763
|
/**
|
|
827
764
|
* Returns the performance object if it is present otherwise null.
|
|
@@ -838,30 +775,11 @@ declare namespace ApplicationInsights {
|
|
|
838
775
|
*/
|
|
839
776
|
function getSetValue<T, K extends keyof T>(target: T, field: K, defValue?: T[K]): T[K];
|
|
840
777
|
|
|
841
|
-
|
|
842
|
-
* Returns the global window object if it is present otherwise null.
|
|
843
|
-
* This helper is used to access the window object without causing an exception
|
|
844
|
-
* "Uncaught ReferenceError: window is not defined"
|
|
845
|
-
*/
|
|
846
|
-
function getWindow(): Window | null;
|
|
778
|
+
export { getWindow }
|
|
847
779
|
|
|
848
|
-
|
|
849
|
-
* Checks if document object is available, this is required as we support the API running without a
|
|
850
|
-
* window /document (eg. Node server, electron webworkers) and if we attempt to assign a document
|
|
851
|
-
* object to a local variable or pass as an argument an "Uncaught ReferenceError: document is not defined"
|
|
852
|
-
* exception will be thrown.
|
|
853
|
-
* Defined as a function to support lazy / late binding environments.
|
|
854
|
-
*/
|
|
855
|
-
function hasDocument(): boolean;
|
|
780
|
+
export { hasDocument }
|
|
856
781
|
|
|
857
|
-
|
|
858
|
-
* Checks if history object is available, this is required as we support the API running without a
|
|
859
|
-
* window /document (eg. Node server, electron webworkers) and if we attempt to assign a history
|
|
860
|
-
* object to a local variable or pass as an argument an "Uncaught ReferenceError: history is not defined"
|
|
861
|
-
* exception will be thrown.
|
|
862
|
-
* Defined as a function to support lazy / late binding environments.
|
|
863
|
-
*/
|
|
864
|
-
function hasHistory(): boolean;
|
|
782
|
+
export { hasHistory }
|
|
865
783
|
|
|
866
784
|
/**
|
|
867
785
|
* Checks if JSON object is available, this is required as we support the API running without a
|
|
@@ -872,25 +790,11 @@ declare namespace ApplicationInsights {
|
|
|
872
790
|
*/
|
|
873
791
|
function hasJSON(): boolean;
|
|
874
792
|
|
|
875
|
-
|
|
876
|
-
* Checks if navigator object is available, this is required as we support the API running without a
|
|
877
|
-
* window /document (eg. Node server, electron webworkers) and if we attempt to assign a navigator
|
|
878
|
-
* object to a local variable or pass as an argument an "Uncaught ReferenceError: navigator is not defined"
|
|
879
|
-
* exception will be thrown.
|
|
880
|
-
* Defined as a function to support lazy / late binding environments.
|
|
881
|
-
*/
|
|
882
|
-
function hasNavigator(): boolean;
|
|
793
|
+
export { hasNavigator }
|
|
883
794
|
|
|
884
|
-
|
|
795
|
+
export { hasOwnProperty }
|
|
885
796
|
|
|
886
|
-
|
|
887
|
-
* Checks if window object is available, this is required as we support the API running without a
|
|
888
|
-
* window /document (eg. Node server, electron webworkers) and if we attempt to assign a window
|
|
889
|
-
* object to a local variable or pass as an argument an "Uncaught ReferenceError: window is not defined"
|
|
890
|
-
* exception will be thrown.
|
|
891
|
-
* Defined as a function to support lazy / late binding environments.
|
|
892
|
-
*/
|
|
893
|
-
function hasWindow(): boolean;
|
|
797
|
+
export { hasWindow }
|
|
894
798
|
|
|
895
799
|
interface IAppInsightsCore extends IPerfManagerProvider {
|
|
896
800
|
config: IConfiguration;
|
|
@@ -1308,195 +1212,6 @@ declare namespace ApplicationInsights {
|
|
|
1308
1212
|
delCookie?: (name: string, cookieValue: string) => void;
|
|
1309
1213
|
}
|
|
1310
1214
|
|
|
1311
|
-
/**
|
|
1312
|
-
* Provides a collection of utility functions, included for backward compatibility with previous releases.
|
|
1313
|
-
* @deprecated Marking this interface and instance as deprecated in favor of direct usage of the helper functions
|
|
1314
|
-
* as direct usage provides better tree-shaking and minification by avoiding the inclusion of the unused items
|
|
1315
|
-
* in your resulting code.
|
|
1316
|
-
*/
|
|
1317
|
-
interface ICoreUtils {
|
|
1318
|
-
/**
|
|
1319
|
-
* Internal - Do not use directly.
|
|
1320
|
-
* @deprecated Direct usage of this property is not recommend
|
|
1321
|
-
*/
|
|
1322
|
-
_canUseCookies: boolean;
|
|
1323
|
-
isTypeof: (value: any, theType: string) => boolean;
|
|
1324
|
-
isUndefined: (value: any) => boolean;
|
|
1325
|
-
isNullOrUndefined: (value: any) => boolean;
|
|
1326
|
-
hasOwnProperty: (obj: any, prop: string) => boolean;
|
|
1327
|
-
/**
|
|
1328
|
-
* Checks if the passed of value is a function.
|
|
1329
|
-
* @param {any} value - Value to be checked.
|
|
1330
|
-
* @return {boolean} True if the value is a boolean, false otherwise.
|
|
1331
|
-
*/
|
|
1332
|
-
isFunction: (value: any) => value is Function;
|
|
1333
|
-
/**
|
|
1334
|
-
* Checks if the passed of value is a function.
|
|
1335
|
-
* @param {any} value - Value to be checked.
|
|
1336
|
-
* @return {boolean} True if the value is a boolean, false otherwise.
|
|
1337
|
-
*/
|
|
1338
|
-
isObject: (value: any) => boolean;
|
|
1339
|
-
/**
|
|
1340
|
-
* Check if an object is of type Date
|
|
1341
|
-
*/
|
|
1342
|
-
isDate: (obj: any) => obj is Date;
|
|
1343
|
-
/**
|
|
1344
|
-
* Check if an object is of type Array
|
|
1345
|
-
*/
|
|
1346
|
-
isArray: (obj: any) => boolean;
|
|
1347
|
-
/**
|
|
1348
|
-
* Check if an object is of type Error
|
|
1349
|
-
*/
|
|
1350
|
-
isError: (obj: any) => obj is Error;
|
|
1351
|
-
/**
|
|
1352
|
-
* Checks if the type of value is a string.
|
|
1353
|
-
* @param {any} value - Value to be checked.
|
|
1354
|
-
* @return {boolean} True if the value is a string, false otherwise.
|
|
1355
|
-
*/
|
|
1356
|
-
isString: (value: any) => value is string;
|
|
1357
|
-
/**
|
|
1358
|
-
* Checks if the type of value is a number.
|
|
1359
|
-
* @param {any} value - Value to be checked.
|
|
1360
|
-
* @return {boolean} True if the value is a number, false otherwise.
|
|
1361
|
-
*/
|
|
1362
|
-
isNumber: (value: any) => value is number;
|
|
1363
|
-
/**
|
|
1364
|
-
* Checks if the type of value is a boolean.
|
|
1365
|
-
* @param {any} value - Value to be checked.
|
|
1366
|
-
* @return {boolean} True if the value is a boolean, false otherwise.
|
|
1367
|
-
*/
|
|
1368
|
-
isBoolean: (value: any) => value is boolean;
|
|
1369
|
-
/**
|
|
1370
|
-
* Convert a date to I.S.O. format in IE8
|
|
1371
|
-
*/
|
|
1372
|
-
toISOString: (date: Date) => string;
|
|
1373
|
-
/**
|
|
1374
|
-
* Performs the specified action for each element in an array. This helper exists to avoid adding a polyfil for older browsers
|
|
1375
|
-
* that do not define Array.prototype.xxxx (eg. ES3 only, IE8) just in case any page checks for presence/absence of the prototype
|
|
1376
|
-
* implementation. Note: For consistency this will not use the Array.prototype.xxxx implementation if it exists as this would
|
|
1377
|
-
* cause a testing requirement to test with and without the implementations
|
|
1378
|
-
* @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. It can return -1 to break out of the loop
|
|
1379
|
-
* @param thisArg [Optional] An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
|
|
1380
|
-
*/
|
|
1381
|
-
arrForEach: <T>(arr: T[], callbackfn: (value: T, index?: number, array?: T[]) => void | number, thisArg?: any) => void;
|
|
1382
|
-
/**
|
|
1383
|
-
* Returns the index of the first occurrence of a value in an array. This helper exists to avoid adding a polyfil for older browsers
|
|
1384
|
-
* that do not define Array.prototype.xxxx (eg. ES3 only, IE8) just in case any page checks for presence/absence of the prototype
|
|
1385
|
-
* implementation. Note: For consistency this will not use the Array.prototype.xxxx implementation if it exists as this would
|
|
1386
|
-
* cause a testing requirement to test with and without the implementations
|
|
1387
|
-
* @param searchElement The value to locate in the array.
|
|
1388
|
-
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
|
|
1389
|
-
*/
|
|
1390
|
-
arrIndexOf: <T>(arr: T[], searchElement: T, fromIndex?: number) => number;
|
|
1391
|
-
/**
|
|
1392
|
-
* Calls a defined callback function on each element of an array, and returns an array that contains the results. This helper exists
|
|
1393
|
-
* to avoid adding a polyfil for older browsers that do not define Array.prototype.xxxx (eg. ES3 only, IE8) just in case any page
|
|
1394
|
-
* checks for presence/absence of the prototype implementation. Note: For consistency this will not use the Array.prototype.xxxx
|
|
1395
|
-
* implementation if it exists as this would cause a testing requirement to test with and without the implementations
|
|
1396
|
-
* @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
|
|
1397
|
-
* @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
|
|
1398
|
-
*/
|
|
1399
|
-
arrMap: <T, R>(arr: T[], callbackfn: (value: T, index?: number, array?: T[]) => R, thisArg?: any) => R[];
|
|
1400
|
-
/**
|
|
1401
|
-
* Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is
|
|
1402
|
-
* provided as an argument in the next call to the callback function. This helper exists to avoid adding a polyfil for older browsers that do not define
|
|
1403
|
-
* Array.prototype.xxxx (eg. ES3 only, IE8) just in case any page checks for presence/absence of the prototype implementation. Note: For consistency
|
|
1404
|
-
* this will not use the Array.prototype.xxxx implementation if it exists as this would cause a testing requirement to test with and without the implementations
|
|
1405
|
-
* @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
|
|
1406
|
-
* @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
|
|
1407
|
-
*/
|
|
1408
|
-
arrReduce: <T, R>(arr: T[], callbackfn: (previousValue: T | R, currentValue?: T, currentIndex?: number, array?: T[]) => R, initialValue?: R) => R;
|
|
1409
|
-
/**
|
|
1410
|
-
* helper method to trim strings (IE8 does not implement String.prototype.trim)
|
|
1411
|
-
*/
|
|
1412
|
-
strTrim: (str: any) => string;
|
|
1413
|
-
/**
|
|
1414
|
-
* Creates an object that has the specified prototype, and that optionally contains specified properties. This helper exists to avoid adding a polyfil
|
|
1415
|
-
* for older browsers that do not define Object.create eg. ES3 only, IE8 just in case any page checks for presence/absence of the prototype implementation.
|
|
1416
|
-
* Note: For consistency this will not use the Object.create implementation if it exists as this would cause a testing requirement to test with and without the implementations
|
|
1417
|
-
* @param obj Object to use as a prototype. May be null
|
|
1418
|
-
*/
|
|
1419
|
-
objCreate: (obj: object) => any;
|
|
1420
|
-
/**
|
|
1421
|
-
* Returns the names of the enumerable string properties and methods of an object. This helper exists to avoid adding a polyfil for older browsers
|
|
1422
|
-
* that do not define Object.keys eg. ES3 only, IE8 just in case any page checks for presence/absence of the prototype implementation.
|
|
1423
|
-
* Note: For consistency this will not use the Object.keys implementation if it exists as this would cause a testing requirement to test with and without the implementations
|
|
1424
|
-
* @param obj Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
|
|
1425
|
-
*/
|
|
1426
|
-
objKeys: (obj: {}) => string[];
|
|
1427
|
-
/**
|
|
1428
|
-
* Try to define get/set object property accessors for the target object/prototype, this will provide compatibility with
|
|
1429
|
-
* existing API definition when run within an ES5+ container that supports accessors but still enable the code to be loaded
|
|
1430
|
-
* and executed in an ES3 container, providing basic IE8 compatibility.
|
|
1431
|
-
* @param target The object on which to define the property.
|
|
1432
|
-
* @param prop The name of the property to be defined or modified.
|
|
1433
|
-
* @param getProp The getter function to wire against the getter.
|
|
1434
|
-
* @param setProp The setter function to wire against the setter.
|
|
1435
|
-
* @returns True if it was able to create the accessors otherwise false
|
|
1436
|
-
*/
|
|
1437
|
-
objDefineAccessors: <T>(target: any, prop: string, getProp?: () => T, setProp?: (v: T) => void) => boolean;
|
|
1438
|
-
/**
|
|
1439
|
-
* Trys to add an event handler for the specified event to the window, body and document
|
|
1440
|
-
* @param eventName {string} - The name of the event
|
|
1441
|
-
* @param callback {any} - The callback function that needs to be executed for the given event
|
|
1442
|
-
* @return {boolean} - true if the handler was successfully added
|
|
1443
|
-
*/
|
|
1444
|
-
addEventHandler: (eventName: string, callback: any, evtNamespace?: string | string[]) => boolean;
|
|
1445
|
-
/**
|
|
1446
|
-
* Return the current time via the Date now() function (if available) and falls back to (new Date()).getTime() if now() is unavailable (IE8 or less)
|
|
1447
|
-
* https://caniuse.com/#search=Date.now
|
|
1448
|
-
*/
|
|
1449
|
-
dateNow: () => number;
|
|
1450
|
-
/**
|
|
1451
|
-
* Identifies whether the current environment appears to be IE
|
|
1452
|
-
*/
|
|
1453
|
-
isIE: () => boolean;
|
|
1454
|
-
/**
|
|
1455
|
-
* @deprecated - Use the core.getCookieMgr().disable()
|
|
1456
|
-
* Force the SDK not to store and read any data from cookies.
|
|
1457
|
-
*/
|
|
1458
|
-
disableCookies: () => void;
|
|
1459
|
-
newGuid: () => string;
|
|
1460
|
-
/**
|
|
1461
|
-
* Return the current value of the Performance Api now() function (if available) and fallback to dateNow() if it is unavailable (IE9 or less)
|
|
1462
|
-
* https://caniuse.com/#search=performance.now
|
|
1463
|
-
*/
|
|
1464
|
-
perfNow: () => number;
|
|
1465
|
-
/**
|
|
1466
|
-
* Generate random base64 id string.
|
|
1467
|
-
* The default length is 22 which is 132-bits so almost the same as a GUID but as base64 (the previous default was 5)
|
|
1468
|
-
* @param maxLength - Optional value to specify the length of the id to be generated, defaults to 22
|
|
1469
|
-
*/
|
|
1470
|
-
newId: (maxLength?: number) => string;
|
|
1471
|
-
/**
|
|
1472
|
-
* Generate a random value between 0 and maxValue, max value should be limited to a 32-bit maximum.
|
|
1473
|
-
* So maxValue(16) will produce a number from 0..16 (range of 17)
|
|
1474
|
-
* @param maxValue
|
|
1475
|
-
*/
|
|
1476
|
-
randomValue: (maxValue: number) => number;
|
|
1477
|
-
/**
|
|
1478
|
-
* generate a random 32-bit number (0x000000..0xFFFFFFFF) or (-0x80000000..0x7FFFFFFF), defaults un-unsigned.
|
|
1479
|
-
* @param signed - True to return a signed 32-bit number (-0x80000000..0x7FFFFFFF) otherwise an unsigned one (0x000000..0xFFFFFFFF)
|
|
1480
|
-
*/
|
|
1481
|
-
random32: (signed?: boolean) => number;
|
|
1482
|
-
/**
|
|
1483
|
-
* Seed the MWC random number generator with the specified seed or a random value
|
|
1484
|
-
* @param value - optional the number to used as the seed, if undefined, null or zero a random value will be chosen
|
|
1485
|
-
*/
|
|
1486
|
-
mwcRandomSeed: (value?: number) => void;
|
|
1487
|
-
/**
|
|
1488
|
-
* Generate a random 32-bit number between (0x000000..0xFFFFFFFF) or (-0x80000000..0x7FFFFFFF), using MWC (Multiply with carry)
|
|
1489
|
-
* instead of Math.random() defaults to un-signed.
|
|
1490
|
-
* Used as a replacement random generator for IE to avoid issues with older IE instances.
|
|
1491
|
-
* @param signed - True to return a signed 32-bit number (-0x80000000..0x7FFFFFFF) otherwise an unsigned one (0x000000..0xFFFFFFFF)
|
|
1492
|
-
*/
|
|
1493
|
-
mwcRandom32: (signed?: boolean) => number;
|
|
1494
|
-
/**
|
|
1495
|
-
* generate W3C trace id
|
|
1496
|
-
*/
|
|
1497
|
-
generateW3CId: () => string;
|
|
1498
|
-
}
|
|
1499
|
-
|
|
1500
1215
|
interface ICustomProperties {
|
|
1501
1216
|
[key: string]: any;
|
|
1502
1217
|
}
|
|
@@ -1610,41 +1325,6 @@ declare namespace ApplicationInsights {
|
|
|
1610
1325
|
setTraceFlags(newValue?: number): void;
|
|
1611
1326
|
}
|
|
1612
1327
|
|
|
1613
|
-
interface IEventHelper {
|
|
1614
|
-
/**
|
|
1615
|
-
* Binds the specified function to an event, so that the function gets called whenever the event fires on the object
|
|
1616
|
-
* @param obj Object to add the event too.
|
|
1617
|
-
* @param eventNameWithoutOn String that specifies any of the standard DHTML Events without "on" prefix
|
|
1618
|
-
* @param handlerRef Pointer that specifies the function to call when event fires
|
|
1619
|
-
* @returns True if the function was bound successfully to the event, otherwise false
|
|
1620
|
-
*/
|
|
1621
|
-
Attach: (obj: any, eventNameWithoutOn: string, handlerRef: any) => boolean;
|
|
1622
|
-
/**
|
|
1623
|
-
* Binds the specified function to an event, so that the function gets called whenever the event fires on the object
|
|
1624
|
-
* @deprecated Use {@link EventHelper#Attach} as we are already in a class call EventHelper the extra "Event" just causes a larger result
|
|
1625
|
-
* @param obj Object to add the event too.
|
|
1626
|
-
* @param eventNameWithoutOn String that specifies any of the standard DHTML Events without "on" prefix
|
|
1627
|
-
* @param handlerRef Pointer that specifies the function to call when event fires
|
|
1628
|
-
* @returns True if the function was bound successfully to the event, otherwise false
|
|
1629
|
-
*/
|
|
1630
|
-
AttachEvent: (obj: any, eventNameWithoutOn: string, handlerRef: any) => boolean;
|
|
1631
|
-
/**
|
|
1632
|
-
* Removes an event handler for the specified event
|
|
1633
|
-
* @param eventName {string} - The name of the event
|
|
1634
|
-
* @param callback {any} - The callback function that needs to be executed for the given event
|
|
1635
|
-
* @return {boolean} - true if the handler was successfully added
|
|
1636
|
-
*/
|
|
1637
|
-
Detach: (obj: any, eventNameWithoutOn: string, handlerRef: any) => void;
|
|
1638
|
-
/**
|
|
1639
|
-
* Removes an event handler for the specified event
|
|
1640
|
-
* @deprecated Use {@link EventHelper#Detach} as we are already in a class call EventHelper the extra "Event" just causes a larger result
|
|
1641
|
-
* @param eventName {string} - The name of the event
|
|
1642
|
-
* @param callback {any} - The callback function that needs to be executed for the given event
|
|
1643
|
-
* @return {boolean} - true if the handler was successfully added
|
|
1644
|
-
*/
|
|
1645
|
-
DetachEvent: (obj: any, eventNameWithoutOn: string, handlerRef: any) => void;
|
|
1646
|
-
}
|
|
1647
|
-
|
|
1648
1328
|
interface IInstrumentCallDetails {
|
|
1649
1329
|
name: string;
|
|
1650
1330
|
inst: any;
|
|
@@ -2098,11 +1778,7 @@ declare namespace ApplicationInsights {
|
|
|
2098
1778
|
handler: any;
|
|
2099
1779
|
}
|
|
2100
1780
|
|
|
2101
|
-
|
|
2102
|
-
* Check if an object is of type Array with optional generic T, the generic type is not validated
|
|
2103
|
-
* and exists to help with TypeScript validation only.
|
|
2104
|
-
*/
|
|
2105
|
-
let isArray: <T = any>(obj: any) => obj is Array<T>;
|
|
1781
|
+
export { isArray }
|
|
2106
1782
|
|
|
2107
1783
|
/**
|
|
2108
1784
|
* Checks if HTML5 Beacons are supported in the current environment.
|
|
@@ -2110,22 +1786,11 @@ declare namespace ApplicationInsights {
|
|
|
2110
1786
|
*/
|
|
2111
1787
|
function isBeaconsSupported(): boolean;
|
|
2112
1788
|
|
|
2113
|
-
|
|
2114
|
-
* Checks if the type of value is a boolean.
|
|
2115
|
-
* @param {any} value - Value to be checked.
|
|
2116
|
-
* @return {boolean} True if the value is a boolean, false otherwise.
|
|
2117
|
-
*/
|
|
2118
|
-
function isBoolean(value: any): value is boolean;
|
|
1789
|
+
export { isBoolean }
|
|
2119
1790
|
|
|
2120
|
-
|
|
2121
|
-
* Check if an object is of type Date
|
|
2122
|
-
*/
|
|
2123
|
-
function isDate(obj: any): obj is Date;
|
|
1791
|
+
export { isDate }
|
|
2124
1792
|
|
|
2125
|
-
|
|
2126
|
-
* Check if an object is of type Error
|
|
2127
|
-
*/
|
|
2128
|
-
function isError(obj: any): obj is Error;
|
|
1793
|
+
export { isError }
|
|
2129
1794
|
|
|
2130
1795
|
/**
|
|
2131
1796
|
* Checks if the Fetch API is supported in the current environment.
|
|
@@ -2134,7 +1799,7 @@ declare namespace ApplicationInsights {
|
|
|
2134
1799
|
*/
|
|
2135
1800
|
function isFetchSupported(withKeepAlive?: boolean): boolean;
|
|
2136
1801
|
|
|
2137
|
-
|
|
1802
|
+
export { isFunction }
|
|
2138
1803
|
|
|
2139
1804
|
/**
|
|
2140
1805
|
* Identifies whether the current environment appears to be IE
|
|
@@ -2143,20 +1808,15 @@ declare namespace ApplicationInsights {
|
|
|
2143
1808
|
|
|
2144
1809
|
function isNotNullOrUndefined<T>(value: T): value is T;
|
|
2145
1810
|
|
|
2146
|
-
|
|
1811
|
+
export { isNotTruthy }
|
|
2147
1812
|
|
|
2148
1813
|
function isNotUndefined<T>(value: T): value is T;
|
|
2149
1814
|
|
|
2150
|
-
|
|
1815
|
+
export { isNullOrUndefined }
|
|
2151
1816
|
|
|
2152
|
-
|
|
2153
|
-
* Checks if the type of value is a number.
|
|
2154
|
-
* @param {any} value - Value to be checked.
|
|
2155
|
-
* @return {boolean} True if the value is a number, false otherwise.
|
|
2156
|
-
*/
|
|
2157
|
-
function isNumber(value: any): value is number;
|
|
1817
|
+
export { isNumber }
|
|
2158
1818
|
|
|
2159
|
-
|
|
1819
|
+
export { isObject }
|
|
2160
1820
|
|
|
2161
1821
|
/**
|
|
2162
1822
|
* Returns whether the environment is reporting that we are running in a React Native Environment
|
|
@@ -2172,26 +1832,15 @@ declare namespace ApplicationInsights {
|
|
|
2172
1832
|
*/
|
|
2173
1833
|
function isSampledFlag(value: ITraceParent): boolean;
|
|
2174
1834
|
|
|
2175
|
-
|
|
2176
|
-
* Checks if the type of value is a string.
|
|
2177
|
-
* @param {any} value - Value to be checked.
|
|
2178
|
-
* @return {boolean} True if the value is a string, false otherwise.
|
|
2179
|
-
*/
|
|
2180
|
-
function isString(value: any): value is string;
|
|
1835
|
+
export { isString }
|
|
2181
1836
|
|
|
2182
|
-
|
|
2183
|
-
* Checks if the type of value is a Symbol.
|
|
2184
|
-
* This only returns a boolean as returning value is Symbol will cause issues for older TypeScript consumers
|
|
2185
|
-
* @param {any} value - Value to be checked.
|
|
2186
|
-
* @return {boolean} True if the value is a Symbol, false otherwise.
|
|
2187
|
-
*/
|
|
2188
|
-
function isSymbol(value: any): boolean;
|
|
1837
|
+
export { isSymbol }
|
|
2189
1838
|
|
|
2190
|
-
|
|
1839
|
+
export { isTruthy }
|
|
2191
1840
|
|
|
2192
|
-
|
|
1841
|
+
export { isTypeof }
|
|
2193
1842
|
|
|
2194
|
-
|
|
1843
|
+
export { isUndefined }
|
|
2195
1844
|
|
|
2196
1845
|
/**
|
|
2197
1846
|
* Is the provided W3c span id (aka. parent id) a valid string representation, it must be a 16-character
|
|
@@ -2417,18 +2066,6 @@ declare namespace ApplicationInsights {
|
|
|
2417
2066
|
run: (itemCtx: IProcessTelemetryUnloadContext, unloadState: ITelemetryUnloadState) => void;
|
|
2418
2067
|
}
|
|
2419
2068
|
|
|
2420
|
-
/**
|
|
2421
|
-
* Helper to support backward compatibility for users that use the legacy cookie handling functions and the use the internal
|
|
2422
|
-
* CoreUtils._canUseCookies global flag to enable/disable cookies usage.
|
|
2423
|
-
* Note: This has the following deliberate side-effects
|
|
2424
|
-
* - Creates the global (legacy) cookie manager if it does not already exist
|
|
2425
|
-
* - Attempts to add "listeners" to the CoreUtils._canUseCookies property to support the legacy usage
|
|
2426
|
-
* @param config
|
|
2427
|
-
* @param logger
|
|
2428
|
-
* @returns
|
|
2429
|
-
*/
|
|
2430
|
-
function _legacyCookieMgr(config?: IConfiguration, logger?: IDiagnosticLogger): ICookieMgr;
|
|
2431
|
-
|
|
2432
2069
|
const LoggingSeverity: EnumValue<typeof eLoggingSeverity>;
|
|
2433
2070
|
|
|
2434
2071
|
type LoggingSeverity = number | eLoggingSeverity;
|
|
@@ -2521,17 +2158,7 @@ declare namespace ApplicationInsights {
|
|
|
2521
2158
|
|
|
2522
2159
|
export { objCreate }
|
|
2523
2160
|
|
|
2524
|
-
|
|
2525
|
-
* Try to define get/set object property accessors for the target object/prototype, this will provide compatibility with
|
|
2526
|
-
* existing API definition when run within an ES5+ container that supports accessors but still enable the code to be loaded
|
|
2527
|
-
* and executed in an ES3 container, providing basic IE8 compatibility.
|
|
2528
|
-
* @param target The object on which to define the property.
|
|
2529
|
-
* @param prop The name of the property to be defined or modified.
|
|
2530
|
-
* @param getProp The getter function to wire against the getter.
|
|
2531
|
-
* @param setProp The setter function to wire against the setter.
|
|
2532
|
-
* @returns True if it was able to create the accessors otherwise false
|
|
2533
|
-
*/
|
|
2534
|
-
function objDefineAccessors<T>(target: any, prop: string, getProp?: () => T, setProp?: (v: T) => void): boolean;
|
|
2161
|
+
export { objDefineAccessors }
|
|
2535
2162
|
|
|
2536
2163
|
/**
|
|
2537
2164
|
* Pass in the objects to merge as arguments, this will only "merge" (extend) properties that are owned by the object.
|
|
@@ -2547,27 +2174,15 @@ declare namespace ApplicationInsights {
|
|
|
2547
2174
|
|
|
2548
2175
|
function objExtend<T1, T2, T3, T4, T5, T6>(obj1?: T1, obj2?: T2, obj3?: T3, obj4?: T4, obj5?: T5, obj6?: T6): T1 & T2 & T3 & T4 & T5 & T6;
|
|
2549
2176
|
|
|
2550
|
-
|
|
2551
|
-
* This is a helper function for the equivalent of arForEach(objKeys(target), callbackFn), this is a
|
|
2552
|
-
* performance optimization to avoid the creation of a new array for large objects
|
|
2553
|
-
* @param target The target object to find and process the keys
|
|
2554
|
-
* @param callbackfn The function to call with the details
|
|
2555
|
-
*/
|
|
2556
|
-
function objForEachKey<T = any>(target: T, callbackfn: (name: string, value: T[keyof T]) => void): void;
|
|
2177
|
+
export { objForEachKey }
|
|
2557
2178
|
|
|
2558
|
-
|
|
2179
|
+
export { objFreeze }
|
|
2559
2180
|
|
|
2560
|
-
|
|
2561
|
-
* Returns the names of the enumerable string properties and methods of an object. This helper exists to avoid adding a polyfil for older browsers
|
|
2562
|
-
* that do not define Object.keys eg. ES3 only, IE8 just in case any page checks for presence/absence of the prototype implementation.
|
|
2563
|
-
* Note: For consistency this will not use the Object.keys implementation if it exists as this would cause a testing requirement to test with and without the implementations
|
|
2564
|
-
* @param obj Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
|
|
2565
|
-
*/
|
|
2566
|
-
function objKeys(obj: {}): string[];
|
|
2181
|
+
export { objKeys }
|
|
2567
2182
|
|
|
2568
|
-
|
|
2183
|
+
export { objSeal }
|
|
2569
2184
|
|
|
2570
|
-
|
|
2185
|
+
export { objToString }
|
|
2571
2186
|
|
|
2572
2187
|
/**
|
|
2573
2188
|
* A helper function to assist with JIT performance for objects that have properties added / removed dynamically
|
|
@@ -2887,12 +2502,6 @@ declare namespace ApplicationInsights {
|
|
|
2887
2502
|
MaxQueuedEvents = 20
|
|
2888
2503
|
}
|
|
2889
2504
|
|
|
2890
|
-
/**
|
|
2891
|
-
* @deprecated - Use the core.getCookieMgr().set()
|
|
2892
|
-
* helper method to set userId and sessionId cookie
|
|
2893
|
-
*/
|
|
2894
|
-
function setCookie(logger: IDiagnosticLogger, name: string, value: string, domain?: string): void;
|
|
2895
|
-
|
|
2896
2505
|
/**
|
|
2897
2506
|
* Enable the lookup of test mock objects if requested
|
|
2898
2507
|
* @param enabled
|
|
@@ -2926,13 +2535,7 @@ declare namespace ApplicationInsights {
|
|
|
2926
2535
|
*/
|
|
2927
2536
|
function strContains(value: string, search: string): boolean;
|
|
2928
2537
|
|
|
2929
|
-
|
|
2930
|
-
* The strEndsWith() method determines whether a string ends with the characters of a specified string, returning true or false as appropriate.
|
|
2931
|
-
* @param value - The value to check whether it ends with the search value.
|
|
2932
|
-
* @param search - The characters to be searched for at the end of the value.
|
|
2933
|
-
* @returns true if the given search value is found at the end of the string, otherwise false.
|
|
2934
|
-
*/
|
|
2935
|
-
function strEndsWith(value: string, search: string): boolean;
|
|
2538
|
+
export { strEndsWith }
|
|
2936
2539
|
|
|
2937
2540
|
export { strFunction }
|
|
2938
2541
|
|
|
@@ -2940,18 +2543,9 @@ declare namespace ApplicationInsights {
|
|
|
2940
2543
|
|
|
2941
2544
|
export { strPrototype }
|
|
2942
2545
|
|
|
2943
|
-
|
|
2944
|
-
* The strStartsWith() method determines whether a string starts with the characters of the specified string, returning true or false as appropriate.
|
|
2945
|
-
* @param value - The value to check whether it ends with the search value.
|
|
2946
|
-
* @param checkValue - The characters to be searched for at the start of the value.
|
|
2947
|
-
* @returns true if the given search value is found at the start of the string, otherwise false.
|
|
2948
|
-
*/
|
|
2949
|
-
function strStartsWith(value: string, checkValue: string): boolean;
|
|
2546
|
+
export { strStartsWith }
|
|
2950
2547
|
|
|
2951
|
-
|
|
2952
|
-
* helper method to trim strings (IE8 does not implement String.prototype.trim)
|
|
2953
|
-
*/
|
|
2954
|
-
function strTrim(str: any): string;
|
|
2548
|
+
export { strTrim }
|
|
2955
2549
|
|
|
2956
2550
|
export { strUndefined }
|
|
2957
2551
|
|
|
@@ -3004,7 +2598,7 @@ declare namespace ApplicationInsights {
|
|
|
3004
2598
|
PluginRemoved = 32
|
|
3005
2599
|
}
|
|
3006
2600
|
|
|
3007
|
-
|
|
2601
|
+
export { throwError }
|
|
3008
2602
|
|
|
3009
2603
|
/**
|
|
3010
2604
|
* This is a helper method which will call throwInternal on the passed logger, will throw exceptions in
|
|
@@ -3020,7 +2614,7 @@ declare namespace ApplicationInsights {
|
|
|
3020
2614
|
/**
|
|
3021
2615
|
* Convert a date to I.S.O. format in IE8
|
|
3022
2616
|
*/
|
|
3023
|
-
function toISOString(date: Date):
|
|
2617
|
+
function toISOString(date: Date): any;
|
|
3024
2618
|
|
|
3025
2619
|
function uaDisallowsSameSiteNone(userAgent: string): boolean;
|
|
3026
2620
|
|