@microsoft/applicationinsights-core-js 3.0.0-beta.2209-03 → 3.0.0-beta.2210-02
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/browser/applicationinsights-core-js.integrity.json +9 -9
- package/browser/applicationinsights-core-js.js +1249 -675
- 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 +3669 -1713
- package/dist/applicationinsights-core-js.api.md +131 -54
- package/dist/applicationinsights-core-js.d.ts +332 -131
- package/dist/applicationinsights-core-js.js +1249 -675
- 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 +332 -131
- package/dist-esm/Config/ConfigDefaults.js +114 -0
- package/dist-esm/Config/ConfigDefaults.js.map +1 -0
- package/dist-esm/Config/DynamicConfig.js +129 -0
- package/dist-esm/Config/DynamicConfig.js.map +1 -0
- package/dist-esm/Config/DynamicProperty.js +139 -0
- package/dist-esm/Config/DynamicProperty.js.map +1 -0
- package/dist-esm/Config/DynamicState.js +109 -0
- package/dist-esm/Config/DynamicState.js.map +1 -0
- package/dist-esm/Config/DynamicSupport.js +57 -0
- package/dist-esm/Config/DynamicSupport.js.map +1 -0
- package/dist-esm/Config/IConfigDefaults.js +8 -0
- package/dist-esm/Config/IConfigDefaults.js.map +1 -0
- package/dist-esm/Config/IDynamicConfigHandler.js +8 -0
- package/dist-esm/Config/IDynamicConfigHandler.js.map +1 -0
- package/dist-esm/Config/IDynamicPropertyHandler.js +8 -0
- package/dist-esm/Config/IDynamicPropertyHandler.js.map +1 -0
- package/dist-esm/Config/IDynamicWatcher.js +8 -0
- package/dist-esm/Config/IDynamicWatcher.js.map +1 -0
- package/dist-esm/Config/_IDynamicConfigHandlerState.js +6 -0
- package/dist-esm/Config/_IDynamicConfigHandlerState.js.map +1 -0
- package/dist-esm/JavaScriptSDK/AppInsightsCore.js +808 -23
- package/dist-esm/JavaScriptSDK/AppInsightsCore.js.map +1 -1
- package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js +22 -18
- package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js.map +1 -1
- package/dist-esm/JavaScriptSDK/ChannelController.js +1 -1
- package/dist-esm/JavaScriptSDK/CookieMgr.js +78 -38
- package/dist-esm/JavaScriptSDK/CookieMgr.js.map +1 -1
- package/dist-esm/JavaScriptSDK/CoreUtils.js +6 -5
- package/dist-esm/JavaScriptSDK/CoreUtils.js.map +1 -1
- package/dist-esm/JavaScriptSDK/DataCacheHelper.js +10 -8
- package/dist-esm/JavaScriptSDK/DataCacheHelper.js.map +1 -1
- package/dist-esm/JavaScriptSDK/DbgExtensionUtils.js +1 -1
- package/dist-esm/JavaScriptSDK/DiagnosticLogger.js +40 -23
- package/dist-esm/JavaScriptSDK/DiagnosticLogger.js.map +1 -1
- package/dist-esm/JavaScriptSDK/EnvUtils.js +1 -115
- package/dist-esm/JavaScriptSDK/EnvUtils.js.map +1 -1
- package/dist-esm/JavaScriptSDK/EventHelpers.js +30 -29
- package/dist-esm/JavaScriptSDK/EventHelpers.js.map +1 -1
- package/dist-esm/JavaScriptSDK/HelperFuncs.js +19 -34
- package/dist-esm/JavaScriptSDK/HelperFuncs.js.map +1 -1
- package/dist-esm/JavaScriptSDK/InstrumentHooks.js +1 -1
- package/dist-esm/JavaScriptSDK/InternalConstants.js +5 -1
- package/dist-esm/JavaScriptSDK/InternalConstants.js.map +1 -1
- package/dist-esm/JavaScriptSDK/NotificationManager.js +18 -11
- package/dist-esm/JavaScriptSDK/NotificationManager.js.map +1 -1
- package/dist-esm/JavaScriptSDK/PerfManager.js +2 -3
- package/dist-esm/JavaScriptSDK/PerfManager.js.map +1 -1
- package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js +62 -53
- package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js.map +1 -1
- package/dist-esm/JavaScriptSDK/RandomHelper.js +1 -1
- package/dist-esm/JavaScriptSDK/TelemetryHelpers.js +8 -10
- package/dist-esm/JavaScriptSDK/TelemetryHelpers.js.map +1 -1
- package/dist-esm/JavaScriptSDK/TelemetryInitializerPlugin.js +3 -4
- package/dist-esm/JavaScriptSDK/TelemetryInitializerPlugin.js.map +1 -1
- package/dist-esm/JavaScriptSDK/UnloadHandlerContainer.js +1 -1
- package/dist-esm/JavaScriptSDK/W3cTraceParent.js +12 -10
- package/dist-esm/JavaScriptSDK/W3cTraceParent.js.map +1 -1
- package/dist-esm/JavaScriptSDK.Enums/EnumHelperFuncs.js +1 -2
- 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 +2 -107
- package/dist-esm/JavaScriptSDK.Enums/LoggingEnums.js.map +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/IUnloadHook.js +8 -0
- package/dist-esm/JavaScriptSDK.Interfaces/IUnloadHook.js.map +1 -0
- package/dist-esm/JavaScriptSDK.Interfaces/IUnloadableComponent.js +3 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IUnloadableComponent.js.map +1 -1
- package/dist-esm/__DynamicConstants.js +26 -23
- package/dist-esm/__DynamicConstants.js.map +1 -1
- package/dist-esm/applicationinsights-core-js.js +6 -4
- package/dist-esm/applicationinsights-core-js.js.map +1 -1
- package/package.json +2 -2
- package/src/JavaScriptSDK/AppInsightsCore.ts +1156 -16
- package/src/JavaScriptSDK/BaseTelemetryPlugin.ts +25 -17
- package/src/JavaScriptSDK/CookieMgr.ts +88 -41
- package/src/JavaScriptSDK/CoreUtils.ts +4 -3
- package/src/JavaScriptSDK/DiagnosticLogger.ts +51 -29
- package/src/JavaScriptSDK/EnvUtils.ts +0 -133
- package/src/JavaScriptSDK/EventHelpers.ts +29 -28
- package/src/JavaScriptSDK/HelperFuncs.ts +22 -39
- package/src/JavaScriptSDK/InternalConstants.ts +5 -0
- package/src/JavaScriptSDK/NotificationManager.ts +25 -14
- package/src/JavaScriptSDK/PerfManager.ts +2 -2
- package/src/JavaScriptSDK/ProcessTelemetryContext.ts +73 -56
- package/src/JavaScriptSDK/TelemetryHelpers.ts +8 -9
- package/src/JavaScriptSDK/TelemetryInitializerPlugin.ts +2 -2
- package/src/JavaScriptSDK/W3cTraceParent.ts +7 -6
- package/src/JavaScriptSDK.Enums/EnumHelperFuncs.ts +0 -1
- package/src/JavaScriptSDK.Enums/LoggingEnums.ts +9 -108
- package/src/JavaScriptSDK.Enums/TelemetryUpdateReason.ts +1 -1
- package/src/JavaScriptSDK.Interfaces/IAppInsightsCore.ts +28 -3
- package/src/JavaScriptSDK.Interfaces/ICookieMgr.ts +8 -0
- package/src/JavaScriptSDK.Interfaces/IDiagnosticLogger.ts +15 -8
- package/src/JavaScriptSDK.Interfaces/IInstrumentHooks.ts +3 -1
- package/src/JavaScriptSDK.Interfaces/INotificationListener.ts +5 -5
- package/src/JavaScriptSDK.Interfaces/INotificationManager.ts +8 -8
- package/src/JavaScriptSDK.Interfaces/IPerfManager.ts +3 -3
- package/src/JavaScriptSDK.Interfaces/IProcessTelemetryContext.ts +10 -9
- package/src/JavaScriptSDK.Interfaces/ITelemetryInitializers.ts +2 -1
- package/src/JavaScriptSDK.Interfaces/ITelemetryUpdateState.ts +15 -5
- package/src/JavaScriptSDK.Interfaces/IUnloadHook.ts +22 -0
- package/src/JavaScriptSDK.Interfaces/IUnloadableComponent.ts +3 -3
- package/tsconfig.json +3 -2
- package/types/Config/ConfigDefaults.d.ts +10 -0
- package/types/Config/DynamicConfig.d.ts +23 -0
- package/types/Config/DynamicProperty.d.ts +3 -0
- package/types/Config/DynamicState.d.ts +3 -0
- package/types/Config/DynamicSupport.d.ts +15 -0
- package/types/Config/IConfigDefaults.d.ts +42 -0
- package/types/Config/IDynamicConfigHandler.d.ts +46 -0
- package/types/Config/IDynamicPropertyHandler.d.ts +11 -0
- package/types/Config/IDynamicWatcher.d.ts +28 -0
- package/types/Config/_IDynamicConfigHandlerState.d.ts +35 -0
- package/types/JavaScriptSDK/AppInsightsCore.d.ts +136 -4
- package/types/JavaScriptSDK/BaseTelemetryPlugin.d.ts +2 -2
- package/types/JavaScriptSDK/CookieMgr.d.ts +0 -10
- package/types/JavaScriptSDK/DiagnosticLogger.d.ts +18 -16
- package/types/JavaScriptSDK/EventHelpers.d.ts +24 -24
- package/types/JavaScriptSDK/HelperFuncs.d.ts +13 -11
- package/types/JavaScriptSDK/InternalConstants.d.ts +4 -0
- package/types/JavaScriptSDK/NotificationManager.d.ts +7 -7
- package/types/JavaScriptSDK/PerfManager.d.ts +2 -2
- package/types/JavaScriptSDK/ProcessTelemetryContext.d.ts +3 -2
- package/types/JavaScriptSDK/TelemetryHelpers.d.ts +3 -3
- package/types/JavaScriptSDK.Enums/LoggingEnums.d.ts +7 -5
- package/types/JavaScriptSDK.Enums/TelemetryUpdateReason.d.ts +1 -0
- package/types/JavaScriptSDK.Interfaces/IAppInsightsCore.d.ts +25 -3
- package/types/JavaScriptSDK.Interfaces/ICookieMgr.d.ts +6 -0
- package/types/JavaScriptSDK.Interfaces/IDiagnosticLogger.d.ts +14 -8
- package/types/JavaScriptSDK.Interfaces/IInstrumentHooks.d.ts +2 -1
- package/types/JavaScriptSDK.Interfaces/INotificationListener.d.ts +5 -5
- package/types/JavaScriptSDK.Interfaces/INotificationManager.d.ts +8 -8
- package/types/JavaScriptSDK.Interfaces/IPerfManager.d.ts +3 -3
- package/types/JavaScriptSDK.Interfaces/IProcessTelemetryContext.d.ts +5 -9
- package/types/JavaScriptSDK.Interfaces/ITelemetryInitializers.d.ts +2 -1
- package/types/JavaScriptSDK.Interfaces/ITelemetryUpdateState.d.ts +13 -2
- package/types/JavaScriptSDK.Interfaces/IUnloadHook.d.ts +18 -0
- package/types/__DynamicConstants.d.ts +18 -15
- package/types/applicationinsights-core-js.d.ts +11 -4
- package/types/tsdoc-metadata.json +1 -1
- package/dist-esm/JavaScriptSDK/BaseCore.js +0 -654
- package/dist-esm/JavaScriptSDK/BaseCore.js.map +0 -1
- package/src/JavaScriptSDK/BaseCore.ts +0 -948
- package/types/JavaScriptSDK/BaseCore.d.ts +0 -124
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Microsoft Application Insights Core Javascript SDK, 3.0.0-beta.
|
|
2
|
+
* Microsoft Application Insights Core Javascript SDK, 3.0.0-beta.2210-02
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* Microsoft Application Insights Team
|
|
@@ -17,6 +17,7 @@ import { arrForEach } from '@nevware21/ts-utils';
|
|
|
17
17
|
import { arrIndexOf } from '@nevware21/ts-utils';
|
|
18
18
|
import { arrMap } from '@nevware21/ts-utils';
|
|
19
19
|
import { arrReduce } from '@nevware21/ts-utils';
|
|
20
|
+
import { asString } from '@nevware21/ts-utils';
|
|
20
21
|
import { objDeepFreeze as deepFreeze } from '@nevware21/ts-utils';
|
|
21
22
|
import { dumpObj } from '@nevware21/ts-utils';
|
|
22
23
|
import { EnumCls } from '@nevware21/ts-utils';
|
|
@@ -73,8 +74,8 @@ export declare function __getRegisteredEvents(target: any, eventName?: string, e
|
|
|
73
74
|
|
|
74
75
|
/**
|
|
75
76
|
* Trys to add an event handler for the specified event to the window, body and document
|
|
76
|
-
* @param eventName {string} - The name of the event
|
|
77
|
-
* @param callback {any} - The callback function that needs to be executed for the given event
|
|
77
|
+
* @param eventName - {string} - The name of the event
|
|
78
|
+
* @param callback - {any} - The callback function that needs to be executed for the given event
|
|
78
79
|
* @param evtNamespace - [Optional] Namespace(s) to append to the event listeners so they can be uniquely identified and removed based on this namespace.
|
|
79
80
|
* @return {boolean} - true if the handler was successfully added
|
|
80
81
|
*/
|
|
@@ -82,8 +83,8 @@ export declare function addEventHandler(eventName: string, callback: any, evtNam
|
|
|
82
83
|
|
|
83
84
|
/**
|
|
84
85
|
* Bind the listener to the array of events
|
|
85
|
-
* @param events An string array of event names to bind the listener to
|
|
86
|
-
* @param listener The event callback to call when the event is triggered
|
|
86
|
+
* @param events - An string array of event names to bind the listener to
|
|
87
|
+
* @param listener - The event callback to call when the event is triggered
|
|
87
88
|
* @param excludeEvents - [Optional] An array of events that should not be hooked (if possible), unless no other events can be.
|
|
88
89
|
* @param evtNamespace - [Optional] Namespace(s) to append to the event listeners so they can be uniquely identified and removed based on this namespace.
|
|
89
90
|
* @returns true - when at least one of the events was registered otherwise false
|
|
@@ -130,33 +131,7 @@ export declare function addPageShowEventListener(listener: any, excludeEvents?:
|
|
|
130
131
|
*/
|
|
131
132
|
export declare function addPageUnloadEventListener(listener: any, excludeEvents?: string[], evtNamespace?: string | string[]): boolean;
|
|
132
133
|
|
|
133
|
-
export declare class AppInsightsCore
|
|
134
|
-
constructor();
|
|
135
|
-
initialize(config: IConfiguration, extensions: IPlugin[], logger?: IDiagnosticLogger, notificationManager?: INotificationManager): void;
|
|
136
|
-
track(telemetryItem: ITelemetryItem): void;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
export declare function areCookiesSupported(logger?: IDiagnosticLogger): any;
|
|
140
|
-
|
|
141
|
-
export { arrForEach }
|
|
142
|
-
|
|
143
|
-
export { arrIndexOf }
|
|
144
|
-
|
|
145
|
-
export { arrMap }
|
|
146
|
-
|
|
147
|
-
export { arrReduce }
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* Binds the specified function to an event, so that the function gets called whenever the event fires on the object
|
|
151
|
-
* @param obj Object to add the event too.
|
|
152
|
-
* @param eventNameWithoutOn String that specifies any of the standard DHTML Events without "on" prefix and optional (dot "." prefixed) namespaces "click" "click.mynamespace".
|
|
153
|
-
* @param handlerRef Pointer that specifies the function to call when event fires
|
|
154
|
-
* @param useCapture [Optional] Defaults to false
|
|
155
|
-
* @returns True if the function was bound successfully to the event, otherwise false
|
|
156
|
-
*/
|
|
157
|
-
export declare function attachEvent(obj: any, eventNameWithoutOn: string, handlerRef: any, useCapture?: boolean): boolean;
|
|
158
|
-
|
|
159
|
-
export declare class BaseCore implements IAppInsightsCore {
|
|
134
|
+
export declare class AppInsightsCore implements IAppInsightsCore {
|
|
160
135
|
static defaultConfig: IConfiguration;
|
|
161
136
|
config: IConfiguration;
|
|
162
137
|
logger: IDiagnosticLogger;
|
|
@@ -172,12 +147,12 @@ export declare class BaseCore implements IAppInsightsCore {
|
|
|
172
147
|
* Adds a notification listener. The SDK calls methods on the listener when an appropriate notification is raised.
|
|
173
148
|
* The added plugins must raise notifications. If the plugins do not implement the notifications, then no methods will be
|
|
174
149
|
* called.
|
|
175
|
-
* @param
|
|
150
|
+
* @param listener - An INotificationListener object.
|
|
176
151
|
*/
|
|
177
152
|
addNotificationListener(listener: INotificationListener): void;
|
|
178
153
|
/**
|
|
179
154
|
* Removes all instances of the listener.
|
|
180
|
-
* @param
|
|
155
|
+
* @param listener - INotificationListener to remove.
|
|
181
156
|
*/
|
|
182
157
|
removeNotificationListener(listener: INotificationListener): void;
|
|
183
158
|
/**
|
|
@@ -205,7 +180,7 @@ export declare class BaseCore implements IAppInsightsCore {
|
|
|
205
180
|
* @param telemetryInitializer - The Telemetry Initializer function
|
|
206
181
|
* @returns - A ITelemetryInitializerHandler to enable the initializer to be removed
|
|
207
182
|
*/
|
|
208
|
-
addTelemetryInitializer(telemetryInitializer: TelemetryInitializerFunction): ITelemetryInitializerHandler
|
|
183
|
+
addTelemetryInitializer(telemetryInitializer: TelemetryInitializerFunction): ITelemetryInitializerHandler;
|
|
209
184
|
/**
|
|
210
185
|
* Unload and Tear down the SDK and any initialized plugins, after calling this the SDK will be considered
|
|
211
186
|
* to be un-initialized and non-operational, re-initializing the SDK should only be attempted if the previous
|
|
@@ -227,6 +202,12 @@ export declare class BaseCore implements IAppInsightsCore {
|
|
|
227
202
|
* @param addCb - [Optional] callback to call after the plugin has been added
|
|
228
203
|
*/
|
|
229
204
|
addPlugin<T extends IPlugin = ITelemetryPlugin>(plugin: T, replaceExisting?: boolean, doAsync?: boolean, addCb?: (added?: boolean) => void): void;
|
|
205
|
+
/**
|
|
206
|
+
* Update the configuration used and broadcast the changes to all loaded plugins
|
|
207
|
+
* @param newConfig - The new configuration is apply
|
|
208
|
+
* @param mergeExisting - Should the new configuration merge with the existing or just replace it. Default is to true.
|
|
209
|
+
*/
|
|
210
|
+
updateCfg<T extends IConfiguration = IConfiguration>(newConfig: T, mergeExisting?: boolean): void;
|
|
230
211
|
/**
|
|
231
212
|
* Returns the unique event namespace that should be used
|
|
232
213
|
*/
|
|
@@ -254,6 +235,18 @@ export declare class BaseCore implements IAppInsightsCore {
|
|
|
254
235
|
* Sets the current distributed trace context for this instance if available
|
|
255
236
|
*/
|
|
256
237
|
setTraceCtx(newTracectx: IDistributedTraceContext): void;
|
|
238
|
+
/**
|
|
239
|
+
* Add this hook so that it is automatically removed during unloading
|
|
240
|
+
* @param hooks - The single hook or an array of IInstrumentHook objects
|
|
241
|
+
*/
|
|
242
|
+
addUnloadHook(hooks: IUnloadHook | IUnloadHook[] | Iterator<IUnloadHook> | ILegacyUnloadHook | ILegacyUnloadHook[] | Iterator<ILegacyUnloadHook>): void;
|
|
243
|
+
/**
|
|
244
|
+
* Watches and tracks changes for accesses to the current config, and if the accessed config changes the
|
|
245
|
+
* handler will be recalled.
|
|
246
|
+
* @param handler
|
|
247
|
+
* @returns A watcher handler instance that can be used to remove itself when being unloaded
|
|
248
|
+
*/
|
|
249
|
+
onCfgChange<T extends IConfiguration = IConfiguration>(handler: WatcherFunction<T>): IUnloadHook;
|
|
257
250
|
protected releaseQueue(): void;
|
|
258
251
|
/**
|
|
259
252
|
* Hook for Core extensions to allow them to update their own configuration before updating all of the plugins.
|
|
@@ -264,6 +257,30 @@ export declare class BaseCore implements IAppInsightsCore {
|
|
|
264
257
|
protected _updateHook?(updateCtx: IProcessTelemetryUpdateContext, updateState: ITelemetryUpdateState): void | boolean;
|
|
265
258
|
}
|
|
266
259
|
|
|
260
|
+
export declare function applyDefaults<C>(theConfig: C, defaultValues: IConfigDefaults<C>): C;
|
|
261
|
+
|
|
262
|
+
export declare function areCookiesSupported(logger?: IDiagnosticLogger): any;
|
|
263
|
+
|
|
264
|
+
export { arrForEach }
|
|
265
|
+
|
|
266
|
+
export { arrIndexOf }
|
|
267
|
+
|
|
268
|
+
export { arrMap }
|
|
269
|
+
|
|
270
|
+
export { arrReduce }
|
|
271
|
+
|
|
272
|
+
export { asString }
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Binds the specified function to an event, so that the function gets called whenever the event fires on the object
|
|
276
|
+
* @param obj - Object to add the event too.
|
|
277
|
+
* @param eventNameWithoutOn - String that specifies any of the standard DHTML Events without "on" prefix and optional (dot "." prefixed) namespaces "click" "click.mynamespace".
|
|
278
|
+
* @param handlerRef - Pointer that specifies the function to call when event fires
|
|
279
|
+
* @param useCapture - [Optional] Defaults to false
|
|
280
|
+
* @returns True if the function was bound successfully to the event, otherwise false
|
|
281
|
+
*/
|
|
282
|
+
export declare function attachEvent(obj: any, eventNameWithoutOn: string, handlerRef: any, useCapture?: boolean): boolean;
|
|
283
|
+
|
|
267
284
|
/**
|
|
268
285
|
* BaseTelemetryPlugin provides a basic implementation of the ITelemetryPlugin interface so that plugins
|
|
269
286
|
* can avoid implementation the same set of boiler plate code as well as provide a base
|
|
@@ -354,18 +371,27 @@ export declare abstract class BaseTelemetryPlugin implements ITelemetryPlugin {
|
|
|
354
371
|
* Add this hook so that it is automatically removed during unloading
|
|
355
372
|
* @param hooks - The single hook or an array of IInstrumentHook objects
|
|
356
373
|
*/
|
|
357
|
-
protected _addHook(hooks:
|
|
374
|
+
protected _addHook(hooks: IUnloadHook | IUnloadHook[] | ILegacyUnloadHook | ILegacyUnloadHook[]): void;
|
|
358
375
|
}
|
|
359
376
|
|
|
360
377
|
/**
|
|
361
378
|
* Simpler helper to create a dynamic class that implements the interface and populates the values with the defaults.
|
|
362
379
|
* Only instance properties (hasOwnProperty) values are copied from the defaults to the new instance
|
|
363
|
-
* @param defaults Simple helper
|
|
380
|
+
* @param defaults - Simple helper
|
|
364
381
|
*/
|
|
365
382
|
export declare function createClassFromInterface<T>(defaults?: T): new () => T;
|
|
366
383
|
|
|
367
384
|
export declare function createCookieMgr(rootConfig?: IConfiguration, logger?: IDiagnosticLogger): ICookieMgr;
|
|
368
385
|
|
|
386
|
+
/**
|
|
387
|
+
* Create or return a dynamic version of the passed config, if it is not already dynamic
|
|
388
|
+
* @param config - The config to be converted into a dynamic config
|
|
389
|
+
* @param defaultConfig - The default values to apply on the config if the properties don't already exist
|
|
390
|
+
* @param inPlace - Should the config be converted in-place into a dynamic config or a new instance returned, defaults to true
|
|
391
|
+
* @returns The dynamic config handler for the config (whether new or existing)
|
|
392
|
+
*/
|
|
393
|
+
export declare function createDynamicConfig<T extends IConfiguration>(config: T, defaultConfig?: IConfigDefaults<T>, logger?: IDiagnosticLogger, inPlace?: boolean): IDynamicConfigHandler<T>;
|
|
394
|
+
|
|
369
395
|
/**
|
|
370
396
|
* Create an enum style object which has both the key => value and value => key mappings
|
|
371
397
|
* @param values - The values to populate on the new object
|
|
@@ -382,7 +408,7 @@ export declare const createEnumStyle: <E>(values: {
|
|
|
382
408
|
* @param core - The current core instance
|
|
383
409
|
* @param startAt - Identifies the next plugin to execute, if null there is no "next" plugin and if undefined it should assume the start of the chain
|
|
384
410
|
*/
|
|
385
|
-
export declare function createProcessTelemetryContext(telemetryChain: ITelemetryPluginChain | null,
|
|
411
|
+
export declare function createProcessTelemetryContext(telemetryChain: ITelemetryPluginChain | null, cfg: IConfiguration, core: IAppInsightsCore, startAt?: IPlugin): IProcessTelemetryContext;
|
|
386
412
|
|
|
387
413
|
/**
|
|
388
414
|
* Create a new ITraceParent instance using the provided values.
|
|
@@ -424,13 +450,13 @@ export { deepFreeze }
|
|
|
424
450
|
|
|
425
451
|
/**
|
|
426
452
|
* Removes an event handler for the specified event
|
|
427
|
-
* @param Object to remove the event from
|
|
428
|
-
* @param eventNameWithoutOn {string} - The name of the event, with optional namespaces or just the namespaces,
|
|
453
|
+
* @param Object - to remove the event from
|
|
454
|
+
* @param eventNameWithoutOn - {string} - The name of the event, with optional namespaces or just the namespaces,
|
|
429
455
|
* such as "click", "click.mynamespace" or ".mynamespace"
|
|
430
|
-
* @param handlerRef {any} - The callback function that needs to be removed from the given event, when using a
|
|
456
|
+
* @param handlerRef - {any} - The callback function that needs to be removed from the given event, when using a
|
|
431
457
|
* namespace (with or without a qualifying event) this may be null to remove all previously attached event handlers
|
|
432
458
|
* otherwise this will only remove events with this specific handler.
|
|
433
|
-
* @param useCapture [Optional] Defaults to false
|
|
459
|
+
* @param useCapture - [Optional] Defaults to false
|
|
434
460
|
*/
|
|
435
461
|
export declare function detachEvent(obj: any, eventNameWithoutOn: string, handlerRef: any, useCapture?: boolean): void;
|
|
436
462
|
|
|
@@ -463,18 +489,18 @@ export declare class DiagnosticLogger implements IDiagnosticLogger {
|
|
|
463
489
|
maxInternalMessageLimit(): number;
|
|
464
490
|
/**
|
|
465
491
|
* This method will throw exceptions in debug mode or attempt to log the error as a console warning.
|
|
466
|
-
* @param severity {LoggingSeverity} - The severity of the log message
|
|
467
|
-
* @param message {_InternalLogMessage} - The log message.
|
|
492
|
+
* @param severity - {LoggingSeverity} - The severity of the log message
|
|
493
|
+
* @param message - {_InternalLogMessage} - The log message.
|
|
468
494
|
*/
|
|
469
|
-
throwInternal(severity: LoggingSeverity, msgId:
|
|
495
|
+
throwInternal(severity: LoggingSeverity, msgId: _eInternalMessageId, msg: string, properties?: Object, isUserAct?: boolean): void;
|
|
470
496
|
/**
|
|
471
497
|
* This will write a warning to the console if possible
|
|
472
|
-
* @param message {string} - The warning message
|
|
498
|
+
* @param message - {string} - The warning message
|
|
473
499
|
*/
|
|
474
500
|
warnToConsole(message: string): void;
|
|
475
501
|
/**
|
|
476
502
|
* This will write an error to the console if possible
|
|
477
|
-
* @param message {string} - The warning message
|
|
503
|
+
* @param message - {string} - The warning message
|
|
478
504
|
*/
|
|
479
505
|
errorToConsole(message: string): void;
|
|
480
506
|
/**
|
|
@@ -483,10 +509,11 @@ export declare class DiagnosticLogger implements IDiagnosticLogger {
|
|
|
483
509
|
resetInternalMessageCount(): void;
|
|
484
510
|
/**
|
|
485
511
|
* Logs a message to the internal queue.
|
|
486
|
-
* @param severity {LoggingSeverity} - The severity of the log message
|
|
487
|
-
* @param message {_InternalLogMessage} - The message to log.
|
|
512
|
+
* @param severity - {LoggingSeverity} - The severity of the log message
|
|
513
|
+
* @param message - {_InternalLogMessage} - The message to log.
|
|
488
514
|
*/
|
|
489
515
|
logInternalMessage(severity: LoggingSeverity, message: _InternalLogMessage): void;
|
|
516
|
+
update(updateState: ITelemetryUpdateState): void;
|
|
490
517
|
}
|
|
491
518
|
|
|
492
519
|
/**
|
|
@@ -614,10 +641,16 @@ export declare const enum _eInternalMessageId {
|
|
|
614
641
|
TrackPageActionEventFailed = 103,
|
|
615
642
|
FailedAddingCustomDefinedRequestContext = 104,
|
|
616
643
|
InMemoryStorageBufferFull = 105,
|
|
617
|
-
InstrumentationKeyDeprecation = 106
|
|
644
|
+
InstrumentationKeyDeprecation = 106,
|
|
645
|
+
ConfigWatcherException = 107,
|
|
646
|
+
DynamicConfigException = 108
|
|
618
647
|
}
|
|
619
648
|
|
|
620
649
|
export declare const enum eLoggingSeverity {
|
|
650
|
+
/**
|
|
651
|
+
* No Logging will be enabled
|
|
652
|
+
*/
|
|
653
|
+
DISABLED = 0,
|
|
621
654
|
/**
|
|
622
655
|
* Error will be sent as internal telemetry
|
|
623
656
|
*/
|
|
@@ -632,27 +665,27 @@ export declare type EnumValue<E = any> = EnumCls<E>;
|
|
|
632
665
|
|
|
633
666
|
/**
|
|
634
667
|
* Removes an event handler for the specified event
|
|
635
|
-
* @param Object to remove the event from
|
|
636
|
-
* @param eventName {string} - The name of the event, with optional namespaces or just the namespaces,
|
|
668
|
+
* @param Object - to remove the event from
|
|
669
|
+
* @param eventName - {string} - The name of the event, with optional namespaces or just the namespaces,
|
|
637
670
|
* such as "click", "click.mynamespace" or ".mynamespace"
|
|
638
|
-
* @param handlerRef {any} - The callback function that needs to be removed from the given event, when using a
|
|
671
|
+
* @param handlerRef - {any} - The callback function that needs to be removed from the given event, when using a
|
|
639
672
|
* namespace (with or without a qualifying event) this may be null to remove all previously attached event handlers
|
|
640
673
|
* otherwise this will only remove events with this specific handler.
|
|
641
674
|
* @param evtNamespace - [Optional] Additional namespace(s) to append to the event listeners so they can be uniquely identified and removed based on this namespace,
|
|
642
675
|
* if the eventName also includes a namespace the namespace(s) are merged into a single namespace
|
|
643
|
-
* @param useCapture [Optional] Defaults to false
|
|
676
|
+
* @param useCapture - [Optional] Defaults to false
|
|
644
677
|
*/
|
|
645
678
|
export declare function eventOff<T>(target: T, eventName: string, handlerRef: any, evtNamespace?: string | string[] | null, useCapture?: boolean): void;
|
|
646
679
|
|
|
647
680
|
/**
|
|
648
681
|
* Binds the specified function to an event, so that the function gets called whenever the event fires on the object
|
|
649
|
-
* @param obj Object to add the event too.
|
|
650
|
-
* @param eventName String that specifies any of the standard DHTML Events without "on" prefix, if may also include an optional (dot "." prefixed)
|
|
682
|
+
* @param obj - Object to add the event too.
|
|
683
|
+
* @param eventName - String that specifies any of the standard DHTML Events without "on" prefix, if may also include an optional (dot "." prefixed)
|
|
651
684
|
* namespaces "click" "click.mynamespace" in addition to specific namespaces.
|
|
652
|
-
* @param handlerRef Pointer that specifies the function to call when event fires
|
|
685
|
+
* @param handlerRef - Pointer that specifies the function to call when event fires
|
|
653
686
|
* @param evtNamespace - [Optional] Additional namespace(s) to append to the event listeners so they can be uniquely identified and removed based on this namespace,
|
|
654
687
|
* if the eventName also includes a namespace the namespace(s) are merged into a single namespace
|
|
655
|
-
* @param useCapture [Optional] Defaults to false
|
|
688
|
+
* @param useCapture - [Optional] Defaults to false
|
|
656
689
|
* @returns True if the function was bound successfully to the event, otherwise false
|
|
657
690
|
*/
|
|
658
691
|
export declare function eventOn<T>(target: T, eventName: string, handlerRef: any, evtNamespace?: string | string[] | null, useCapture?: boolean): boolean;
|
|
@@ -715,17 +748,19 @@ export declare function getDebugListener(config: IConfiguration): INotificationL
|
|
|
715
748
|
|
|
716
749
|
export { getDocument }
|
|
717
750
|
|
|
751
|
+
/**
|
|
752
|
+
* @internal
|
|
753
|
+
* Get the dynamic config handler if the value is already dynamic
|
|
754
|
+
* @param value
|
|
755
|
+
* @returns
|
|
756
|
+
*/
|
|
757
|
+
export declare function getDynamicConfigHandler<T>(value: T | IDynamicConfigHandler<T>): IDynamicConfigHandler<T> | null;
|
|
758
|
+
|
|
718
759
|
/**
|
|
719
760
|
* Returns the name of object if it's an Error. Otherwise, returns empty string.
|
|
720
761
|
*/
|
|
721
762
|
export declare function getExceptionName(object: any): string;
|
|
722
763
|
|
|
723
|
-
export declare const enum GetExtCfgMergeType {
|
|
724
|
-
None = 0,
|
|
725
|
-
MergeDefaultOnly = 1,
|
|
726
|
-
MergeDefaultFromRootOrDefault = 2
|
|
727
|
-
}
|
|
728
|
-
|
|
729
764
|
/**
|
|
730
765
|
* Get the current global performance manager that will be used with no performance manager is supplied.
|
|
731
766
|
* @returns - The current default manager
|
|
@@ -829,12 +864,12 @@ export declare interface IAppInsightsCore extends IPerfManagerProvider {
|
|
|
829
864
|
* Adds a notification listener. The SDK calls methods on the listener when an appropriate notification is raised.
|
|
830
865
|
* The added plugins must raise notifications. If the plugins do not implement the notifications, then no methods will be
|
|
831
866
|
* called.
|
|
832
|
-
* @param
|
|
867
|
+
* @param listener - An INotificationListener object.
|
|
833
868
|
*/
|
|
834
869
|
addNotificationListener?(listener: INotificationListener): void;
|
|
835
870
|
/**
|
|
836
871
|
* Removes all instances of the listener.
|
|
837
|
-
* @param
|
|
872
|
+
* @param listener - INotificationListener to remove.
|
|
838
873
|
*/
|
|
839
874
|
removeNotificationListener?(listener: INotificationListener): void;
|
|
840
875
|
/**
|
|
@@ -842,7 +877,7 @@ export declare interface IAppInsightsCore extends IPerfManagerProvider {
|
|
|
842
877
|
* @param telemetryInitializer - The Telemetry Initializer function
|
|
843
878
|
* @returns - A ITelemetryInitializerHandler to enable the initializer to be removed
|
|
844
879
|
*/
|
|
845
|
-
addTelemetryInitializer(telemetryInitializer: TelemetryInitializerFunction): ITelemetryInitializerHandler
|
|
880
|
+
addTelemetryInitializer(telemetryInitializer: TelemetryInitializerFunction): ITelemetryInitializerHandler;
|
|
846
881
|
pollInternalLogs?(eventName?: string): number;
|
|
847
882
|
stopPollingInternalLogs?(): void;
|
|
848
883
|
/**
|
|
@@ -874,6 +909,14 @@ export declare interface IAppInsightsCore extends IPerfManagerProvider {
|
|
|
874
909
|
* @param addCb - [Optional] callback to call after the plugin has been added
|
|
875
910
|
*/
|
|
876
911
|
addPlugin<T extends IPlugin = ITelemetryPlugin>(plugin: T, replaceExisting?: boolean, doAsync?: boolean, addCb?: (added?: boolean) => void): void;
|
|
912
|
+
/**
|
|
913
|
+
* Update the configuration used and broadcast the changes to all loaded plugins, this does NOT support updating, adding or removing
|
|
914
|
+
* any the plugins (extensions or channels). It will notify each plugin (if supported) that the configuration has changed but it will
|
|
915
|
+
* not remove or add any new plugins, you need to call addPlugin or getPlugin(identifier).remove();
|
|
916
|
+
* @param newConfig - The new configuration is apply
|
|
917
|
+
* @param mergeExisting - Should the new configuration merge with the existing or just replace it. Default is to merge.
|
|
918
|
+
*/
|
|
919
|
+
updateCfg<T extends IConfiguration = IConfiguration>(newConfig: T, mergeExisting?: boolean): void;
|
|
877
920
|
/**
|
|
878
921
|
* Returns the unique event namespace that should be used when registering events
|
|
879
922
|
*/
|
|
@@ -883,6 +926,11 @@ export declare interface IAppInsightsCore extends IPerfManagerProvider {
|
|
|
883
926
|
* @param handler - the handler
|
|
884
927
|
*/
|
|
885
928
|
addUnloadCb(handler: UnloadHandler): void;
|
|
929
|
+
/**
|
|
930
|
+
* Add this hook so that it is automatically removed during unloading
|
|
931
|
+
* @param hooks - The single hook or an array of IInstrumentHook objects
|
|
932
|
+
*/
|
|
933
|
+
addUnloadHook(hooks: IUnloadHook | IUnloadHook[] | Iterator<IUnloadHook> | ILegacyUnloadHook | ILegacyUnloadHook[] | Iterator<ILegacyUnloadHook>): void;
|
|
886
934
|
/**
|
|
887
935
|
* Flush and send any batched / cached data immediately
|
|
888
936
|
* @param async - send data asynchronously when true (defaults to true)
|
|
@@ -902,6 +950,13 @@ export declare interface IAppInsightsCore extends IPerfManagerProvider {
|
|
|
902
950
|
* Sets the current distributed trace context for this instance if available
|
|
903
951
|
*/
|
|
904
952
|
setTraceCtx(newTraceCtx: IDistributedTraceContext | null | undefined): void;
|
|
953
|
+
/**
|
|
954
|
+
* Watches and tracks changes for accesses to the current config, and if the accessed config changes the
|
|
955
|
+
* handler will be recalled.
|
|
956
|
+
* @param handler
|
|
957
|
+
* @returns A watcher handler instance that can be used to remove itself when being unloaded
|
|
958
|
+
*/
|
|
959
|
+
onCfgChange<T extends IConfiguration = IConfiguration>(handler: WatcherFunction<T>): IUnloadHook;
|
|
905
960
|
}
|
|
906
961
|
|
|
907
962
|
export declare interface IBaseProcessingContext {
|
|
@@ -920,13 +975,13 @@ export declare interface IBaseProcessingContext {
|
|
|
920
975
|
/**
|
|
921
976
|
* Gets the named extension config
|
|
922
977
|
*/
|
|
923
|
-
getExtCfg: <T>(identifier: string, defaultValue?: T
|
|
978
|
+
getExtCfg: <T>(identifier: string, defaultValue?: IConfigDefaults<T>) => T;
|
|
924
979
|
/**
|
|
925
980
|
* Gets the named config from either the named identifier extension or core config if neither exist then the
|
|
926
981
|
* default value is returned
|
|
927
|
-
* @param identifier The named extension identifier
|
|
928
|
-
* @param field The config field name
|
|
929
|
-
* @param defaultValue The default value to return if no defined config exists
|
|
982
|
+
* @param identifier - The named extension identifier
|
|
983
|
+
* @param field - The config field name
|
|
984
|
+
* @param defaultValue - The default value to return if no defined config exists
|
|
930
985
|
*/
|
|
931
986
|
getConfig: (identifier: string, field: string, defaultValue?: number | string | boolean | string[] | RegExp[] | Function) => number | string | boolean | string[] | RegExp[] | Function;
|
|
932
987
|
/**
|
|
@@ -997,6 +1052,51 @@ export declare interface IChannelControls extends ITelemetryPlugin {
|
|
|
997
1052
|
flush(async: boolean, callBack?: (flushComplete?: boolean) => void, sendReason?: SendRequestReason): boolean | void;
|
|
998
1053
|
}
|
|
999
1054
|
|
|
1055
|
+
/**
|
|
1056
|
+
* The type to identify whether the default value should be applied in preference to the provided value.
|
|
1057
|
+
*/
|
|
1058
|
+
export declare type IConfigCheckFn<V> = (value: V) => boolean;
|
|
1059
|
+
|
|
1060
|
+
/**
|
|
1061
|
+
* The default values with a check function
|
|
1062
|
+
*/
|
|
1063
|
+
export declare interface IConfigDefaultCheck<T, V, C extends IConfiguration = IConfiguration> {
|
|
1064
|
+
/**
|
|
1065
|
+
* Callback function to check if the user-supplied value is valid, if not the default will be applied
|
|
1066
|
+
*/
|
|
1067
|
+
isVal?: IConfigCheckFn<V>;
|
|
1068
|
+
/**
|
|
1069
|
+
* Optional function to allow converting and setting of the default value
|
|
1070
|
+
*/
|
|
1071
|
+
set?: IConfigSetFn<T, V>;
|
|
1072
|
+
/**
|
|
1073
|
+
* The default value to apply if the user-supplied value is not valid
|
|
1074
|
+
*/
|
|
1075
|
+
v?: V;
|
|
1076
|
+
/**
|
|
1077
|
+
* The default fallback key if the main key is not present, this is the key value from the config
|
|
1078
|
+
*/
|
|
1079
|
+
fb?: keyof T | keyof C | Array<keyof T | keyof C>;
|
|
1080
|
+
/**
|
|
1081
|
+
* Use this check to determine the default fallback, default only checked whether the property isDefined,
|
|
1082
|
+
* therefore `null`; `""` are considered to be valid values.
|
|
1083
|
+
*/
|
|
1084
|
+
dfVal?: (value: any) => boolean;
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
/**
|
|
1088
|
+
* The Type definition to define default values to be applied to the config
|
|
1089
|
+
* The value may be either the direct value or a ConfigDefaultCheck definition
|
|
1090
|
+
*/
|
|
1091
|
+
export declare type IConfigDefaults<T, C extends IConfiguration = IConfiguration> = {
|
|
1092
|
+
[key in keyof T]: T[key] | IConfigDefaultCheck<T, T[key], C>;
|
|
1093
|
+
};
|
|
1094
|
+
|
|
1095
|
+
/**
|
|
1096
|
+
* The type which identifies the function use to validate the user supplied value
|
|
1097
|
+
*/
|
|
1098
|
+
export declare type IConfigSetFn<T, V> = (value: any, defValue: V, theConfig: T) => V;
|
|
1099
|
+
|
|
1000
1100
|
/**
|
|
1001
1101
|
* Configuration provided to SDK core
|
|
1002
1102
|
*/
|
|
@@ -1178,6 +1278,11 @@ export declare interface ICookieMgr {
|
|
|
1178
1278
|
* @returns - True if the cookie was marked for deletion otherwise false (Because cookie usage is not available)
|
|
1179
1279
|
*/
|
|
1180
1280
|
purge(name: string, path?: string): boolean;
|
|
1281
|
+
/**
|
|
1282
|
+
* Optional Callback hook to allow the diagnostic logger to update it's configuration
|
|
1283
|
+
* @param updateState
|
|
1284
|
+
*/
|
|
1285
|
+
update?(updateState: ITelemetryUpdateState): void;
|
|
1181
1286
|
}
|
|
1182
1287
|
|
|
1183
1288
|
/**
|
|
@@ -1271,20 +1376,20 @@ export declare interface IDiagnosticLogger {
|
|
|
1271
1376
|
queue: _InternalLogMessage[];
|
|
1272
1377
|
/**
|
|
1273
1378
|
* This method will throw exceptions in debug mode or attempt to log the error as a console warning.
|
|
1274
|
-
* @param severity {LoggingSeverity} - The severity of the log message
|
|
1275
|
-
* @param message {_InternalLogMessage} - The log message.
|
|
1379
|
+
* @param severity - {LoggingSeverity} - The severity of the log message
|
|
1380
|
+
* @param message - {_InternalLogMessage} - The log message.
|
|
1276
1381
|
*/
|
|
1277
|
-
throwInternal(severity: LoggingSeverity, msgId:
|
|
1382
|
+
throwInternal(severity: LoggingSeverity, msgId: _eInternalMessageId, msg: string, properties?: Object, isUserAct?: boolean): void;
|
|
1278
1383
|
/**
|
|
1279
1384
|
* This will write a warning to the console if possible
|
|
1280
|
-
* @param message {string} - The warning message
|
|
1385
|
+
* @param message - {string} - The warning message
|
|
1281
1386
|
*/
|
|
1282
1387
|
warnToConsole(message: string): void;
|
|
1283
1388
|
/**
|
|
1284
1389
|
* This will write an error to the console if possible.
|
|
1285
1390
|
* Provided by the default DiagnosticLogger instance, and internally the SDK will fall back to warnToConsole, however,
|
|
1286
1391
|
* direct callers MUST check for its existence on the logger as you can provide your own IDiagnosticLogger instance.
|
|
1287
|
-
* @param message {string} - The error message
|
|
1392
|
+
* @param message - {string} - The error message
|
|
1288
1393
|
*/
|
|
1289
1394
|
errorToConsole?(message: string): void;
|
|
1290
1395
|
/**
|
|
@@ -1293,10 +1398,15 @@ export declare interface IDiagnosticLogger {
|
|
|
1293
1398
|
resetInternalMessageCount(): void;
|
|
1294
1399
|
/**
|
|
1295
1400
|
* Logs a message to the internal queue.
|
|
1296
|
-
* @param severity {LoggingSeverity} - The severity of the log message
|
|
1297
|
-
* @param message {_InternalLogMessage} - The message to log.
|
|
1401
|
+
* @param severity - {LoggingSeverity} - The severity of the log message
|
|
1402
|
+
* @param message - {_InternalLogMessage} - The message to log.
|
|
1298
1403
|
*/
|
|
1299
1404
|
logInternalMessage?(severity: LoggingSeverity, message: _InternalLogMessage): void;
|
|
1405
|
+
/**
|
|
1406
|
+
* Optional Callback hook to allow the diagnostic logger to update it's configuration
|
|
1407
|
+
* @param updateState
|
|
1408
|
+
*/
|
|
1409
|
+
update?(updateState: ITelemetryUpdateState): void;
|
|
1300
1410
|
}
|
|
1301
1411
|
|
|
1302
1412
|
export declare interface IDistributedTraceContext {
|
|
@@ -1343,6 +1453,50 @@ export declare interface IDistributedTraceContext {
|
|
|
1343
1453
|
setTraceFlags(newValue?: number): void;
|
|
1344
1454
|
}
|
|
1345
1455
|
|
|
1456
|
+
/**
|
|
1457
|
+
* This interface identifies the config which can track changes
|
|
1458
|
+
*/
|
|
1459
|
+
export declare interface IDynamicConfigHandler<T extends IConfiguration> {
|
|
1460
|
+
/**
|
|
1461
|
+
* Unique Id for this config handler
|
|
1462
|
+
*/
|
|
1463
|
+
readonly uid: string;
|
|
1464
|
+
/**
|
|
1465
|
+
* Link back to the configuration object that should be used to get/set values
|
|
1466
|
+
*/
|
|
1467
|
+
cfg: T;
|
|
1468
|
+
/**
|
|
1469
|
+
* The logger instance to use to loger any issues
|
|
1470
|
+
*/
|
|
1471
|
+
logger: IDiagnosticLogger;
|
|
1472
|
+
/**
|
|
1473
|
+
* Helper to call any listeners that are waiting to be notified
|
|
1474
|
+
*/
|
|
1475
|
+
notify: () => void;
|
|
1476
|
+
/**
|
|
1477
|
+
* Watch and track changes for accesses to the current config anb
|
|
1478
|
+
*/
|
|
1479
|
+
watch: (configHandler: WatcherFunction<T>) => IWatcherHandler<T>;
|
|
1480
|
+
/**
|
|
1481
|
+
* Set the value against the provided config/name with the value, the property
|
|
1482
|
+
* will be converted to be dynamic (if not already) as long as the provided config
|
|
1483
|
+
* is already a tracked dynamic object.
|
|
1484
|
+
* @throws TypeError if the provided config is not a monitored dynamic config
|
|
1485
|
+
*/
|
|
1486
|
+
set: <C, V>(theConfig: C, name: string, value: V) => V;
|
|
1487
|
+
}
|
|
1488
|
+
|
|
1489
|
+
export declare interface IDynamicPropertyHandler<T> {
|
|
1490
|
+
/**
|
|
1491
|
+
* Identifies the name of the field that is handled by this handler
|
|
1492
|
+
*/
|
|
1493
|
+
n: string;
|
|
1494
|
+
/**
|
|
1495
|
+
* The current collection is watcher handlers which should be called if the value changes
|
|
1496
|
+
*/
|
|
1497
|
+
h: IWatcherHandler<T>[];
|
|
1498
|
+
}
|
|
1499
|
+
|
|
1346
1500
|
export declare interface IInstrumentCallDetails {
|
|
1347
1501
|
name: string;
|
|
1348
1502
|
inst: any;
|
|
@@ -1377,7 +1531,7 @@ export declare interface IInstrumentCallDetails {
|
|
|
1377
1531
|
/**
|
|
1378
1532
|
* The holder of the specific instance callback
|
|
1379
1533
|
*/
|
|
1380
|
-
export declare interface IInstrumentHook {
|
|
1534
|
+
export declare interface IInstrumentHook extends IUnloadHook {
|
|
1381
1535
|
/** Unique Id for this callback on the hooked method */
|
|
1382
1536
|
id: number;
|
|
1383
1537
|
/** Holds the callbacks */
|
|
@@ -1422,6 +1576,16 @@ export declare interface IInstrumentHooksCallbacks {
|
|
|
1422
1576
|
fnErr?: InstrumentorHooksCallback;
|
|
1423
1577
|
}
|
|
1424
1578
|
|
|
1579
|
+
/**
|
|
1580
|
+
* An alternate interface which provides automatic removal during unloading of the component
|
|
1581
|
+
*/
|
|
1582
|
+
export declare interface ILegacyUnloadHook {
|
|
1583
|
+
/**
|
|
1584
|
+
* Legacy Self remove the referenced component
|
|
1585
|
+
*/
|
|
1586
|
+
remove: () => void;
|
|
1587
|
+
}
|
|
1588
|
+
|
|
1425
1589
|
export declare interface ILoadedPlugin<T extends IPlugin> {
|
|
1426
1590
|
plugin: T;
|
|
1427
1591
|
/**
|
|
@@ -1443,9 +1607,9 @@ export declare interface ILoadedPlugin<T extends IPlugin> {
|
|
|
1443
1607
|
/**
|
|
1444
1608
|
* Initialize the queue of plugins
|
|
1445
1609
|
* @param plugins - The array of plugins to initialize and setting of the next plugin
|
|
1446
|
-
* @param config The current config for the instance
|
|
1447
|
-
* @param core THe current core instance
|
|
1448
|
-
* @param extensions The extensions
|
|
1610
|
+
* @param config - The current config for the instance
|
|
1611
|
+
* @param core - THe current core instance
|
|
1612
|
+
* @param extensions - The extensions
|
|
1449
1613
|
*/
|
|
1450
1614
|
export declare function initializePlugins(processContext: IProcessTelemetryContext, extensions: IPlugin[]): void;
|
|
1451
1615
|
|
|
@@ -1456,20 +1620,20 @@ export declare function initializePlugins(processContext: IProcessTelemetryConte
|
|
|
1456
1620
|
export declare interface INotificationListener {
|
|
1457
1621
|
/**
|
|
1458
1622
|
* [Optional] A function called when events are sent.
|
|
1459
|
-
* @param
|
|
1623
|
+
* @param events - The array of events that have been sent.
|
|
1460
1624
|
*/
|
|
1461
1625
|
eventsSent?: (events: ITelemetryItem[]) => void;
|
|
1462
1626
|
/**
|
|
1463
1627
|
* [Optional] A function called when events are discarded.
|
|
1464
|
-
* @param
|
|
1465
|
-
* @param
|
|
1628
|
+
* @param events - The array of events that have been discarded.
|
|
1629
|
+
* @param reason - The reason for discarding the events. The EventsDiscardedReason
|
|
1466
1630
|
* constant should be used to check the different values.
|
|
1467
1631
|
*/
|
|
1468
1632
|
eventsDiscarded?: (events: ITelemetryItem[], reason: number) => void;
|
|
1469
1633
|
/**
|
|
1470
1634
|
* [Optional] A function called when the events have been requested to be sent to the sever.
|
|
1471
|
-
* @param
|
|
1472
|
-
* @param
|
|
1635
|
+
* @param sendReason - The reason why the event batch is being sent.
|
|
1636
|
+
* @param isAsync - A flag which identifies whether the requests are being sent in an async or sync manner.
|
|
1473
1637
|
*/
|
|
1474
1638
|
eventsSendRequest?: (sendReason: number, isAsync?: boolean) => void;
|
|
1475
1639
|
/**
|
|
@@ -1487,36 +1651,36 @@ export declare interface INotificationManager {
|
|
|
1487
1651
|
listeners: INotificationListener[];
|
|
1488
1652
|
/**
|
|
1489
1653
|
* Adds a notification listener.
|
|
1490
|
-
* @param
|
|
1654
|
+
* @param listener - The notification listener to be added.
|
|
1491
1655
|
*/
|
|
1492
1656
|
addNotificationListener(listener: INotificationListener): void;
|
|
1493
1657
|
/**
|
|
1494
1658
|
* Removes all instances of the listener.
|
|
1495
|
-
* @param
|
|
1659
|
+
* @param listener - AWTNotificationListener to remove.
|
|
1496
1660
|
*/
|
|
1497
1661
|
removeNotificationListener(listener: INotificationListener): void;
|
|
1498
1662
|
/**
|
|
1499
1663
|
* Notification for events sent.
|
|
1500
|
-
* @param
|
|
1664
|
+
* @param events - The array of events that have been sent.
|
|
1501
1665
|
*/
|
|
1502
1666
|
eventsSent(events: ITelemetryItem[]): void;
|
|
1503
1667
|
/**
|
|
1504
1668
|
* Notification for events being discarded.
|
|
1505
|
-
* @param
|
|
1506
|
-
* @param
|
|
1669
|
+
* @param events - The array of events that have been discarded by the SDK.
|
|
1670
|
+
* @param reason - The reason for which the SDK discarded the events. The EventsDiscardedReason
|
|
1507
1671
|
* constant should be used to check the different values.
|
|
1508
1672
|
*/
|
|
1509
1673
|
eventsDiscarded(events: ITelemetryItem[], reason: number): void;
|
|
1510
1674
|
/**
|
|
1511
1675
|
* [Optional] A function called when the events have been requested to be sent to the sever.
|
|
1512
|
-
* @param
|
|
1513
|
-
* @param
|
|
1676
|
+
* @param sendReason - The reason why the event batch is being sent.
|
|
1677
|
+
* @param isAsync - A flag which identifies whether the requests are being sent in an async or sync manner.
|
|
1514
1678
|
*/
|
|
1515
1679
|
eventsSendRequest?(sendReason: number, isAsync: boolean): void;
|
|
1516
1680
|
/**
|
|
1517
1681
|
* [Optional] This event is sent if you have enabled perf events, they are primarily used to track internal performance testing and debugging
|
|
1518
1682
|
* the event can be displayed via the debug plugin extension.
|
|
1519
|
-
* @param perfEvent
|
|
1683
|
+
* @param perfEvent - The perf event details
|
|
1520
1684
|
*/
|
|
1521
1685
|
perfEvent?(perfEvent: IPerfEvent): void;
|
|
1522
1686
|
}
|
|
@@ -1574,17 +1738,10 @@ export declare function InstrumentProtos(target: any, funcNames: string[], callb
|
|
|
1574
1738
|
export declare class _InternalLogMessage {
|
|
1575
1739
|
static dataType: string;
|
|
1576
1740
|
message: string;
|
|
1577
|
-
messageId:
|
|
1578
|
-
constructor(msgId:
|
|
1741
|
+
messageId: _eInternalMessageId;
|
|
1742
|
+
constructor(msgId: _eInternalMessageId, msg: string, isUserAct?: boolean, properties?: Object);
|
|
1579
1743
|
}
|
|
1580
1744
|
|
|
1581
|
-
/**
|
|
1582
|
-
* Internal message ID. Please create a new one for every conceptually different message. Please keep alphabetically ordered
|
|
1583
|
-
*/
|
|
1584
|
-
export declare const _InternalMessageId: EnumValue<typeof _eInternalMessageId>;
|
|
1585
|
-
|
|
1586
|
-
export declare type _InternalMessageId = number | _eInternalMessageId;
|
|
1587
|
-
|
|
1588
1745
|
/**
|
|
1589
1746
|
* This interface identifies the details of an internal performance event - it does not represent an outgoing reported event
|
|
1590
1747
|
*/
|
|
@@ -1650,14 +1807,14 @@ export declare interface IPerfManager {
|
|
|
1650
1807
|
/**
|
|
1651
1808
|
* Create a new event and start timing, the manager may return null/undefined to indicate that it does not
|
|
1652
1809
|
* want to monitor this source event.
|
|
1653
|
-
* @param src The source name of the event
|
|
1810
|
+
* @param src - The source name of the event
|
|
1654
1811
|
* @param payloadDetails - An optional callback function to fetch the payload details for the event.
|
|
1655
1812
|
* @param isAsync - Is the event occurring from a async event
|
|
1656
1813
|
*/
|
|
1657
1814
|
create(src: string, payloadDetails?: () => any, isAsync?: boolean): IPerfEvent | null | undefined;
|
|
1658
1815
|
/**
|
|
1659
1816
|
* Complete the perfEvent and fire any notifications.
|
|
1660
|
-
* @param perfEvent Fire the event which will also complete the passed event
|
|
1817
|
+
* @param perfEvent - Fire the event which will also complete the passed event
|
|
1661
1818
|
*/
|
|
1662
1819
|
fire(perfEvent: IPerfEvent): void;
|
|
1663
1820
|
/**
|
|
@@ -1683,7 +1840,7 @@ export declare interface IPerfManagerProvider {
|
|
|
1683
1840
|
getPerfMgr(): IPerfManager;
|
|
1684
1841
|
/**
|
|
1685
1842
|
* Set the current performance manager
|
|
1686
|
-
* @param perfMgr The performance manager
|
|
1843
|
+
* @param perfMgr - The performance manager
|
|
1687
1844
|
*/
|
|
1688
1845
|
setPerfMgr(perfMgr: IPerfManager): void;
|
|
1689
1846
|
}
|
|
@@ -1900,7 +2057,7 @@ export declare interface ITelemetryInitializerContainer {
|
|
|
1900
2057
|
addTelemetryInitializer(telemetryInitializer: TelemetryInitializerFunction): ITelemetryInitializerHandler | void;
|
|
1901
2058
|
}
|
|
1902
2059
|
|
|
1903
|
-
export declare interface ITelemetryInitializerHandler {
|
|
2060
|
+
export declare interface ITelemetryInitializerHandler extends ILegacyUnloadHook {
|
|
1904
2061
|
remove(): void;
|
|
1905
2062
|
}
|
|
1906
2063
|
|
|
@@ -2018,12 +2175,22 @@ export declare interface ITelemetryUpdateState {
|
|
|
2018
2175
|
* Identifies the reason for the update notification, this is a bitwise numeric value
|
|
2019
2176
|
*/
|
|
2020
2177
|
reason: TelemetryUpdateReason;
|
|
2178
|
+
/**
|
|
2179
|
+
* This is a new active configuration that should be used
|
|
2180
|
+
*/
|
|
2181
|
+
cfg?: IConfiguration;
|
|
2182
|
+
/**
|
|
2183
|
+
* The detected changes
|
|
2184
|
+
*/
|
|
2185
|
+
oldCfg?: IConfiguration;
|
|
2021
2186
|
/**
|
|
2022
2187
|
* If this is a configuration update this was the previous configuration that was used
|
|
2023
2188
|
*/
|
|
2189
|
+
newConfig?: IConfiguration;
|
|
2024
2190
|
/**
|
|
2025
|
-
*
|
|
2191
|
+
* Was the new config requested to be merged with the existing config
|
|
2026
2192
|
*/
|
|
2193
|
+
merge?: boolean;
|
|
2027
2194
|
/**
|
|
2028
2195
|
* This holds a collection of plugins that have been added (if the reason identifies that one or more plugins have been added)
|
|
2029
2196
|
*/
|
|
@@ -2084,6 +2251,26 @@ export declare interface IUnloadHandlerContainer {
|
|
|
2084
2251
|
run: (itemCtx: IProcessTelemetryUnloadContext, unloadState: ITelemetryUnloadState) => void;
|
|
2085
2252
|
}
|
|
2086
2253
|
|
|
2254
|
+
/**
|
|
2255
|
+
* An interface which provides automatic removal during unloading of the component
|
|
2256
|
+
*/
|
|
2257
|
+
export declare interface IUnloadHook {
|
|
2258
|
+
/**
|
|
2259
|
+
* Self remove the referenced component
|
|
2260
|
+
*/
|
|
2261
|
+
rm: () => void;
|
|
2262
|
+
}
|
|
2263
|
+
|
|
2264
|
+
export declare interface IWatchDetails<T extends IConfiguration> {
|
|
2265
|
+
cfg: T;
|
|
2266
|
+
hdlr: IDynamicConfigHandler<T>;
|
|
2267
|
+
}
|
|
2268
|
+
|
|
2269
|
+
export declare interface IWatcherHandler<T extends IConfiguration> extends IUnloadHook {
|
|
2270
|
+
fn: WatcherFunction<T>;
|
|
2271
|
+
rm: () => void;
|
|
2272
|
+
}
|
|
2273
|
+
|
|
2087
2274
|
export declare const LoggingSeverity: EnumValue<typeof eLoggingSeverity>;
|
|
2088
2275
|
|
|
2089
2276
|
export declare type LoggingSeverity = number | eLoggingSeverity;
|
|
@@ -2091,8 +2278,8 @@ export declare type LoggingSeverity = number | eLoggingSeverity;
|
|
|
2091
2278
|
/**
|
|
2092
2279
|
* Logs a message to the internal queue.
|
|
2093
2280
|
* @param logger - The Diagnostic Logger instance to use.
|
|
2094
|
-
* @param severity {LoggingSeverity} - The severity of the log message
|
|
2095
|
-
* @param message {_InternalLogMessage} - The message to log.
|
|
2281
|
+
* @param severity - {LoggingSeverity} - The severity of the log message
|
|
2282
|
+
* @param message - {_InternalLogMessage} - The message to log.
|
|
2096
2283
|
*/
|
|
2097
2284
|
export declare function _logInternalMessage(logger: IDiagnosticLogger, severity: LoggingSeverity, message: _InternalLogMessage): void;
|
|
2098
2285
|
|
|
@@ -2128,7 +2315,7 @@ export declare function newId(maxLength?: number): string;
|
|
|
2128
2315
|
* normalizes the name so that it would. This method does not identify or change any keywords
|
|
2129
2316
|
* meaning that if you pass in a known keyword the same value will be returned.
|
|
2130
2317
|
* This is a simplified version
|
|
2131
|
-
* @param name The name to validate
|
|
2318
|
+
* @param name - The name to validate
|
|
2132
2319
|
*/
|
|
2133
2320
|
export declare function normalizeJsName(name: string): string;
|
|
2134
2321
|
|
|
@@ -2140,30 +2327,30 @@ export declare class NotificationManager implements INotificationManager {
|
|
|
2140
2327
|
constructor(config?: IConfiguration);
|
|
2141
2328
|
/**
|
|
2142
2329
|
* Adds a notification listener.
|
|
2143
|
-
* @param
|
|
2330
|
+
* @param listener - The notification listener to be added.
|
|
2144
2331
|
*/
|
|
2145
2332
|
addNotificationListener(listener: INotificationListener): void;
|
|
2146
2333
|
/**
|
|
2147
2334
|
* Removes all instances of the listener.
|
|
2148
|
-
* @param
|
|
2335
|
+
* @param listener - AWTNotificationListener to remove.
|
|
2149
2336
|
*/
|
|
2150
2337
|
removeNotificationListener(listener: INotificationListener): void;
|
|
2151
2338
|
/**
|
|
2152
2339
|
* Notification for events sent.
|
|
2153
|
-
* @param
|
|
2340
|
+
* @param events - The array of events that have been sent.
|
|
2154
2341
|
*/
|
|
2155
2342
|
eventsSent(events: ITelemetryItem[]): void;
|
|
2156
2343
|
/**
|
|
2157
2344
|
* Notification for events being discarded.
|
|
2158
|
-
* @param
|
|
2159
|
-
* @param
|
|
2345
|
+
* @param events - The array of events that have been discarded by the SDK.
|
|
2346
|
+
* @param reason - The reason for which the SDK discarded the events. The EventsDiscardedReason
|
|
2160
2347
|
* constant should be used to check the different values.
|
|
2161
2348
|
*/
|
|
2162
2349
|
eventsDiscarded(events: ITelemetryItem[], reason: number): void;
|
|
2163
2350
|
/**
|
|
2164
2351
|
* [Optional] A function called when the events have been requested to be sent to the sever.
|
|
2165
|
-
* @param
|
|
2166
|
-
* @param
|
|
2352
|
+
* @param sendReason - The reason why the event batch is being sent.
|
|
2353
|
+
* @param isAsync - A flag which identifies whether the requests are being sent in an async or sync manner.
|
|
2167
2354
|
*/
|
|
2168
2355
|
eventsSendRequest?(sendReason: number, isAsync: boolean): void;
|
|
2169
2356
|
/**
|
|
@@ -2202,6 +2389,17 @@ export { objSeal }
|
|
|
2202
2389
|
|
|
2203
2390
|
export { objToString }
|
|
2204
2391
|
|
|
2392
|
+
/**
|
|
2393
|
+
* Watch and track changes for accesses to the current config, the provided config MUST already be
|
|
2394
|
+
* a dynamic config or a child accessed via the dynamic config
|
|
2395
|
+
* @param config
|
|
2396
|
+
* @param configHandler
|
|
2397
|
+
* @param logger - The logger instance to use if there is no existing handler
|
|
2398
|
+
* @returns A watcher handler instance that can be used to remove itself when being unloaded
|
|
2399
|
+
* @throws TypeError if the provided config is not a dynamic config instance
|
|
2400
|
+
*/
|
|
2401
|
+
export declare function onConfigChange<T>(config: T, configHandler: WatcherFunction<T>, logger?: IDiagnosticLogger): IWatcherHandler<T>;
|
|
2402
|
+
|
|
2205
2403
|
/**
|
|
2206
2404
|
* A helper function to assist with JIT performance for objects that have properties added / removed dynamically
|
|
2207
2405
|
* this is primarily for chromium based browsers and has limited effects on Firefox and none of IE. Only call this
|
|
@@ -2269,14 +2467,14 @@ export declare class PerfManager implements IPerfManager {
|
|
|
2269
2467
|
/**
|
|
2270
2468
|
* Create a new event and start timing, the manager may return null/undefined to indicate that it does not
|
|
2271
2469
|
* want to monitor this source event.
|
|
2272
|
-
* @param src The source name of the event
|
|
2470
|
+
* @param src - The source name of the event
|
|
2273
2471
|
* @param payloadDetails - An optional callback function to fetch the payload details for the event.
|
|
2274
2472
|
* @param isAsync - Is the event occurring from a async event
|
|
2275
2473
|
*/
|
|
2276
2474
|
create(src: string, payload?: any, isAsync?: boolean): IPerfEvent | null | undefined;
|
|
2277
2475
|
/**
|
|
2278
2476
|
* Complete the perfEvent and fire any notifications.
|
|
2279
|
-
* @param perfEvent Fire the event which will also complete the passed event
|
|
2477
|
+
* @param perfEvent - Fire the event which will also complete the passed event
|
|
2280
2478
|
*/
|
|
2281
2479
|
fire(perfEvent: IPerfEvent): void;
|
|
2282
2480
|
/**
|
|
@@ -2307,7 +2505,7 @@ export declare class ProcessTelemetryContext implements IProcessTelemetryContext
|
|
|
2307
2505
|
* Gets the current core config instance
|
|
2308
2506
|
*/
|
|
2309
2507
|
getCfg: () => IConfiguration;
|
|
2310
|
-
getExtCfg: <T>(identifier: string, defaultValue?: T
|
|
2508
|
+
getExtCfg: <T>(identifier: string, defaultValue?: IConfigDefaults<T>) => T;
|
|
2311
2509
|
getConfig: (identifier: string, field: string, defaultValue?: number | string | boolean | string[] | RegExp[] | Function) => number | string | boolean | string[] | RegExp[] | Function;
|
|
2312
2510
|
/**
|
|
2313
2511
|
* Returns the IAppInsightsCore instance for the current request
|
|
@@ -2419,9 +2617,9 @@ export declare function randomValue(maxValue: number): number;
|
|
|
2419
2617
|
|
|
2420
2618
|
/**
|
|
2421
2619
|
* Trys to remove event handler(s) for the specified event/namespace to the window, body and document
|
|
2422
|
-
* @param eventName {string} - The name of the event, with optional namespaces or just the namespaces,
|
|
2620
|
+
* @param eventName - {string} - The name of the event, with optional namespaces or just the namespaces,
|
|
2423
2621
|
* such as "click", "click.mynamespace" or ".mynamespace"
|
|
2424
|
-
* @param callback {any} - - The callback function that needs to be removed from the given event, when using a
|
|
2622
|
+
* @param callback - {any} - - The callback function that needs to be removed from the given event, when using a
|
|
2425
2623
|
* namespace (with or without a qualifying event) this may be null to remove all previously attached event handlers
|
|
2426
2624
|
* otherwise this will only remove events with this specific handler.
|
|
2427
2625
|
* @param evtNamespace - [Optional] Namespace(s) to append to the event listeners so they can be uniquely identified and removed based on this namespace.
|
|
@@ -2430,8 +2628,8 @@ export declare function removeEventHandler(eventName: string, callback: any, evt
|
|
|
2430
2628
|
|
|
2431
2629
|
/**
|
|
2432
2630
|
* Remove the listener from the array of events
|
|
2433
|
-
* @param events An string array of event names to bind the listener to
|
|
2434
|
-
* @param listener The event callback to call when the event is triggered
|
|
2631
|
+
* @param events - An string array of event names to bind the listener to
|
|
2632
|
+
* @param listener - The event callback to call when the event is triggered
|
|
2435
2633
|
* @param evtNamespace - [Optional] Namespace(s) to append to the event listeners so they can be uniquely identified and removed based on this namespace.
|
|
2436
2634
|
*/
|
|
2437
2635
|
export declare function removeEventListeners(events: string[], listener: any, evtNamespace?: string | string[]): void;
|
|
@@ -2606,6 +2804,7 @@ export declare const enum TelemetryUpdateReason {
|
|
|
2606
2804
|
/**
|
|
2607
2805
|
* The configuration has ben updated or changed
|
|
2608
2806
|
*/
|
|
2807
|
+
ConfigurationChanged = 1,
|
|
2609
2808
|
/**
|
|
2610
2809
|
* One or more plugins have been added
|
|
2611
2810
|
*/
|
|
@@ -2624,15 +2823,15 @@ export { throwError }
|
|
|
2624
2823
|
* support minification as logger.throwInternal() will not compress the publish "throwInternal" used throughout
|
|
2625
2824
|
* the code.
|
|
2626
2825
|
* @param logger - The Diagnostic Logger instance to use.
|
|
2627
|
-
* @param severity {LoggingSeverity} - The severity of the log message
|
|
2628
|
-
* @param message {_InternalLogMessage} - The log message.
|
|
2826
|
+
* @param severity - {LoggingSeverity} - The severity of the log message
|
|
2827
|
+
* @param message - {_InternalLogMessage} - The log message.
|
|
2629
2828
|
*/
|
|
2630
|
-
export declare function _throwInternal(logger: IDiagnosticLogger, severity: LoggingSeverity, msgId:
|
|
2829
|
+
export declare function _throwInternal(logger: IDiagnosticLogger, severity: LoggingSeverity, msgId: _eInternalMessageId, msg: string, properties?: Object, isUserAct?: boolean): void;
|
|
2631
2830
|
|
|
2632
2831
|
/**
|
|
2633
2832
|
* Convert a date to I.S.O. format in IE8
|
|
2634
2833
|
*/
|
|
2635
|
-
export declare function toISOString(date: Date):
|
|
2834
|
+
export declare function toISOString(date: Date): string;
|
|
2636
2835
|
|
|
2637
2836
|
export declare function uaDisallowsSameSiteNone(userAgent: string): boolean;
|
|
2638
2837
|
|
|
@@ -2656,8 +2855,10 @@ export declare function useXDomainRequest(): boolean | undefined;
|
|
|
2656
2855
|
/**
|
|
2657
2856
|
* This is a helper method which will call warnToConsole on the passed logger with the provided message.
|
|
2658
2857
|
* @param logger - The Diagnostic Logger instance to use.
|
|
2659
|
-
* @param message {_InternalLogMessage} - The log message.
|
|
2858
|
+
* @param message - {_InternalLogMessage} - The log message.
|
|
2660
2859
|
*/
|
|
2661
2860
|
export declare function _warnToConsole(logger: IDiagnosticLogger, message: string): void;
|
|
2662
2861
|
|
|
2862
|
+
export declare type WatcherFunction<T extends IConfiguration> = (details: IWatchDetails<T>) => void;
|
|
2863
|
+
|
|
2663
2864
|
export { }
|