@microsoft/applicationinsights-core-js 2.8.0-beta.2203-09 → 2.8.0-beta.2203-12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/browser/applicationinsights-core-js.integrity.json +9 -9
  2. package/browser/applicationinsights-core-js.js +47 -14
  3. package/browser/applicationinsights-core-js.js.map +1 -1
  4. package/browser/applicationinsights-core-js.min.js +2 -2
  5. package/browser/applicationinsights-core-js.min.js.map +1 -1
  6. package/dist/applicationinsights-core-js.api.json +493 -58
  7. package/dist/applicationinsights-core-js.api.md +42 -23
  8. package/dist/applicationinsights-core-js.d.ts +47 -22
  9. package/dist/applicationinsights-core-js.js +47 -14
  10. package/dist/applicationinsights-core-js.js.map +1 -1
  11. package/dist/applicationinsights-core-js.min.js +2 -2
  12. package/dist/applicationinsights-core-js.min.js.map +1 -1
  13. package/dist/applicationinsights-core-js.rollup.d.ts +48 -23
  14. package/dist-esm/JavaScriptSDK/AppInsightsCore.js +1 -1
  15. package/dist-esm/JavaScriptSDK/BaseCore.js +11 -9
  16. package/dist-esm/JavaScriptSDK/BaseCore.js.map +1 -1
  17. package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js +1 -1
  18. package/dist-esm/JavaScriptSDK/ChannelController.js +4 -2
  19. package/dist-esm/JavaScriptSDK/ChannelController.js.map +1 -1
  20. package/dist-esm/JavaScriptSDK/Constants.js +1 -1
  21. package/dist-esm/JavaScriptSDK/CookieMgr.js +1 -1
  22. package/dist-esm/JavaScriptSDK/CoreUtils.js +1 -1
  23. package/dist-esm/JavaScriptSDK/DataCacheHelper.js +2 -2
  24. package/dist-esm/JavaScriptSDK/DataCacheHelper.js.map +1 -1
  25. package/dist-esm/JavaScriptSDK/DbgExtensionUtils.js +1 -1
  26. package/dist-esm/JavaScriptSDK/DiagnosticLogger.js +1 -1
  27. package/dist-esm/JavaScriptSDK/EnvUtils.js +1 -1
  28. package/dist-esm/JavaScriptSDK/EventHelpers.js +2 -6
  29. package/dist-esm/JavaScriptSDK/EventHelpers.js.map +1 -1
  30. package/dist-esm/JavaScriptSDK/HelperFuncs.js +7 -7
  31. package/dist-esm/JavaScriptSDK/HelperFuncs.js.map +1 -1
  32. package/dist-esm/JavaScriptSDK/InstrumentHooks.js +1 -1
  33. package/dist-esm/JavaScriptSDK/InternalConstants.js +1 -1
  34. package/dist-esm/JavaScriptSDK/NotificationManager.js +1 -1
  35. package/dist-esm/JavaScriptSDK/PerfManager.js +1 -1
  36. package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js +4 -2
  37. package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js.map +1 -1
  38. package/dist-esm/JavaScriptSDK/RandomHelper.js +1 -1
  39. package/dist-esm/JavaScriptSDK/TelemetryHelpers.js +29 -2
  40. package/dist-esm/JavaScriptSDK/TelemetryHelpers.js.map +1 -1
  41. package/dist-esm/JavaScriptSDK/TelemetryInitializerPlugin.js +1 -1
  42. package/dist-esm/JavaScriptSDK/UnloadHandlerContainer.js +1 -1
  43. package/dist-esm/JavaScriptSDK.Enums/EventsDiscardedReason.js +1 -1
  44. package/dist-esm/JavaScriptSDK.Enums/LoggingEnums.js +1 -1
  45. package/dist-esm/JavaScriptSDK.Enums/SendRequestReason.js +1 -1
  46. package/dist-esm/JavaScriptSDK.Enums/TelemetryUnloadReason.js +1 -1
  47. package/dist-esm/JavaScriptSDK.Enums/TelemetryUpdateReason.js +1 -1
  48. package/dist-esm/JavaScriptSDK.Interfaces/IAppInsightsCore.js +1 -1
  49. package/dist-esm/JavaScriptSDK.Interfaces/IChannelControls.js +1 -1
  50. package/dist-esm/JavaScriptSDK.Interfaces/IConfiguration.js +1 -1
  51. package/dist-esm/JavaScriptSDK.Interfaces/ICookieMgr.js +1 -1
  52. package/dist-esm/JavaScriptSDK.Interfaces/IDbgExtension.js +1 -1
  53. package/dist-esm/JavaScriptSDK.Interfaces/IDiagnosticLogger.js +1 -1
  54. package/dist-esm/JavaScriptSDK.Interfaces/IInstrumentHooks.js +1 -1
  55. package/dist-esm/JavaScriptSDK.Interfaces/INotificationListener.js +1 -1
  56. package/dist-esm/JavaScriptSDK.Interfaces/INotificationManager.js +1 -1
  57. package/dist-esm/JavaScriptSDK.Interfaces/IPerfEvent.js +1 -1
  58. package/dist-esm/JavaScriptSDK.Interfaces/IPerfManager.js +1 -1
  59. package/dist-esm/JavaScriptSDK.Interfaces/IProcessTelemetryContext.js +1 -1
  60. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryInitializers.js +1 -1
  61. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryItem.js +1 -1
  62. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPlugin.js +1 -1
  63. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPluginChain.js +1 -1
  64. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUnloadState.js +1 -1
  65. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUpdateState.js +1 -1
  66. package/dist-esm/JavaScriptSDK.Interfaces/IUnloadableComponent.js +6 -0
  67. package/dist-esm/JavaScriptSDK.Interfaces/IUnloadableComponent.js.map +1 -0
  68. package/dist-esm/applicationinsights-core-js.js +3 -3
  69. package/dist-esm/applicationinsights-core-js.js.map +1 -1
  70. package/package.json +2 -2
  71. package/src/JavaScriptSDK/BaseCore.ts +27 -25
  72. package/src/JavaScriptSDK/BaseTelemetryPlugin.ts +1 -1
  73. package/src/JavaScriptSDK/ChannelController.ts +4 -2
  74. package/src/JavaScriptSDK/CoreUtils.ts +1 -1
  75. package/src/JavaScriptSDK/DataCacheHelper.ts +1 -1
  76. package/src/JavaScriptSDK/DiagnosticLogger.ts +1 -1
  77. package/src/JavaScriptSDK/EnvUtils.ts +1 -1
  78. package/src/JavaScriptSDK/EventHelpers.ts +14 -18
  79. package/src/JavaScriptSDK/HelperFuncs.ts +30 -30
  80. package/src/JavaScriptSDK/InstrumentHooks.ts +1 -1
  81. package/src/JavaScriptSDK/PerfManager.ts +3 -6
  82. package/src/JavaScriptSDK/ProcessTelemetryContext.ts +16 -14
  83. package/src/JavaScriptSDK/RandomHelper.ts +1 -1
  84. package/src/JavaScriptSDK/TelemetryHelpers.ts +34 -2
  85. package/src/JavaScriptSDK.Enums/TelemetryUnloadReason.ts +1 -1
  86. package/src/JavaScriptSDK.Enums/TelemetryUpdateReason.ts +1 -1
  87. package/src/JavaScriptSDK.Interfaces/IProcessTelemetryContext.ts +1 -1
  88. package/src/JavaScriptSDK.Interfaces/ITelemetryUpdateState.ts +1 -1
  89. package/src/JavaScriptSDK.Interfaces/IUnloadableComponent.ts +17 -0
  90. package/types/JavaScriptSDK/EventHelpers.d.ts +10 -10
  91. package/types/JavaScriptSDK/HelperFuncs.d.ts +10 -10
  92. package/types/JavaScriptSDK/PerfManager.d.ts +1 -1
  93. package/types/JavaScriptSDK/ProcessTelemetryContext.d.ts +2 -2
  94. package/types/JavaScriptSDK/TelemetryHelpers.d.ts +13 -1
  95. package/types/JavaScriptSDK.Interfaces/IProcessTelemetryContext.d.ts +1 -1
  96. package/types/JavaScriptSDK.Interfaces/IUnloadableComponent.d.ts +13 -0
  97. package/types/applicationinsights-core-js.d.ts +4 -3
  98. package/types/tsdoc-metadata.json +1 -1
@@ -11,7 +11,7 @@ export interface _IRegisteredEvents {
11
11
  * if the eventName also includes a namespace the namespace(s) are merged into a single namespace
12
12
  */
13
13
  export declare function __getRegisteredEvents(target: any, eventName?: string, evtNamespace?: string | string[]): _IRegisteredEvents[];
14
- export declare function mergeEvtNamespace(theNamespace: string, namespaces: string | string[]): string | string[];
14
+ export declare function mergeEvtNamespace(theNamespace: string, namespaces?: string | string[] | null): string | string[];
15
15
  /**
16
16
  * Binds the specified function to an event, so that the function gets called whenever the event fires on the object
17
17
  * @param obj Object to add the event too.
@@ -23,7 +23,7 @@ export declare function mergeEvtNamespace(theNamespace: string, namespaces: stri
23
23
  * @param useCapture [Optional] Defaults to false
24
24
  * @returns True if the function was bound successfully to the event, otherwise false
25
25
  */
26
- export declare function eventOn<T>(target: T, eventName: string, handlerRef: any, evtNamespace?: string | string[], useCapture?: boolean): boolean;
26
+ export declare function eventOn<T>(target: T, eventName: string, handlerRef: any, evtNamespace?: string | string[] | null, useCapture?: boolean): boolean;
27
27
  /**
28
28
  * Removes an event handler for the specified event
29
29
  * @param Object to remove the event from
@@ -36,7 +36,7 @@ export declare function eventOn<T>(target: T, eventName: string, handlerRef: any
36
36
  * if the eventName also includes a namespace the namespace(s) are merged into a single namespace
37
37
  * @param useCapture [Optional] Defaults to false
38
38
  */
39
- export declare function eventOff<T>(target: T, eventName: string, handlerRef: any, evtNamespace?: string | string[], useCapture?: boolean): void;
39
+ export declare function eventOff<T>(target: T, eventName: string, handlerRef: any, evtNamespace?: string | string[] | null, useCapture?: boolean): void;
40
40
  /**
41
41
  * Binds the specified function to an event, so that the function gets called whenever the event fires on the object
42
42
  * @param obj Object to add the event too.
@@ -64,7 +64,7 @@ export declare function detachEvent(obj: any, eventNameWithoutOn: string, handle
64
64
  * @param evtNamespace - [Optional] Namespace(s) to append to the event listeners so they can be uniquely identified and removed based on this namespace.
65
65
  * @return {boolean} - true if the handler was successfully added
66
66
  */
67
- export declare function addEventHandler(eventName: string, callback: any, evtNamespace?: string | string[]): boolean;
67
+ export declare function addEventHandler(eventName: string, callback: any, evtNamespace?: string | string[] | null): boolean;
68
68
  /**
69
69
  * Trys to remove event handler(s) for the specified event/namespace to the window, body and document
70
70
  * @param eventName {string} - The name of the event, with optional namespaces or just the namespaces,
@@ -74,7 +74,7 @@ export declare function addEventHandler(eventName: string, callback: any, evtNam
74
74
  * otherwise this will only remove events with this specific handler.
75
75
  * @param evtNamespace - [Optional] Namespace(s) to append to the event listeners so they can be uniquely identified and removed based on this namespace.
76
76
  */
77
- export declare function removeEventHandler(eventName: string, callback: any, evtNamespace?: string | string[]): void;
77
+ export declare function removeEventHandler(eventName: string, callback: any, evtNamespace?: string | string[] | null): void;
78
78
  /**
79
79
  * Bind the listener to the array of events
80
80
  * @param events An string array of event names to bind the listener to
@@ -102,7 +102,7 @@ export declare function removeEventListeners(events: string[], listener: any, ev
102
102
  * @param evtNamespace - [Optional] Namespace(s) to append to the event listeners so they can be uniquely identified and removed based on this namespace.
103
103
  * @returns true - when at least one of the events was registered otherwise false
104
104
  */
105
- export declare function addPageUnloadEventListener(listener: any, excludeEvents: string[], evtNamespace?: string | string[]): boolean;
105
+ export declare function addPageUnloadEventListener(listener: any, excludeEvents?: string[], evtNamespace?: string | string[]): boolean;
106
106
  /**
107
107
  * Remove any matching 'beforeunload', 'unload' and 'pagehide' events that may have been added via addEventListener,
108
108
  * addEventListeners, addPageUnloadEventListener or addPageHideEventListener.
@@ -123,7 +123,7 @@ export declare function removePageUnloadEventListener(listener: any, evtNamespac
123
123
  * Suggestion: pass as true if you are also calling addPageUnloadEventListener as that also hooks pagehide
124
124
  * @returns true - when at least one of the events was registered otherwise false
125
125
  */
126
- export declare function addPageHideEventListener(listener: any, excludeEvents: string[], evtNamespace?: string | string[]): boolean;
126
+ export declare function addPageHideEventListener(listener: any, excludeEvents?: string[] | null, evtNamespace?: string | string[] | null): boolean;
127
127
  /**
128
128
  * Removes the pageHide event listeners added by addPageHideEventListener, because the 'visibilitychange' uses
129
129
  * an internal proxy to detect the visibility state you SHOULD use a unique namespace when calling addPageHideEventListener
@@ -131,7 +131,7 @@ export declare function addPageHideEventListener(listener: any, excludeEvents: s
131
131
  * @param listener - The specific listener to remove for the 'pageshow' event only (ignored for 'visibilitychange')
132
132
  * @param evtNamespace - The unique namespace used when calling addPageShowEventListener
133
133
  */
134
- export declare function removePageHideEventListener(listener: any, evtNamespace?: string | string[]): void;
134
+ export declare function removePageHideEventListener(listener: any, evtNamespace?: string | string[] | null): void;
135
135
  /**
136
136
  * Listen to the pageshow and visibility changing to 'visible' events, because the 'visibilitychange' uses
137
137
  * an internal proxy to detect the visibility state you SHOULD use a unique namespace when if you plan to call
@@ -143,7 +143,7 @@ export declare function removePageHideEventListener(listener: any, evtNamespace?
143
143
  * so that only the matching "removePageShowEventListener" can remove these events.
144
144
  * @returns true - when at least one of the events was registered otherwise false
145
145
  */
146
- export declare function addPageShowEventListener(listener: any, excludeEvents: string[], evtNamespace?: string | string[]): boolean;
146
+ export declare function addPageShowEventListener(listener: any, excludeEvents?: string[] | null, evtNamespace?: string | string[] | null): boolean;
147
147
  /**
148
148
  * Removes the pageShow event listeners added by addPageShowEventListener, because the 'visibilitychange' uses
149
149
  * an internal proxy to detect the visibility state you SHOULD use a unique namespace when calling addPageShowEventListener
@@ -151,4 +151,4 @@ export declare function addPageShowEventListener(listener: any, excludeEvents: s
151
151
  * @param listener - The specific listener to remove for the 'pageshow' event only (ignored for 'visibilitychange')
152
152
  * @param evtNamespace - The unique namespace used when calling addPageShowEventListener
153
153
  */
154
- export declare function removePageShowEventListener(listener: any, evtNamespace?: string | string[]): void;
154
+ export declare function removePageShowEventListener(listener: any, evtNamespace?: string | string[] | null): void;
@@ -1,16 +1,16 @@
1
1
  /**
2
- * Helper used to get the prototype of the target object as getPrototypeOf is not available in an ES3 environment.
3
- * @ignore
4
- */
2
+ * Helper used to get the prototype of the target object as getPrototypeOf is not available in an ES3 environment.
3
+ * @ignore
4
+ */
5
5
  export declare function _getObjProto(target: any): any;
6
6
  export declare function objToString(obj: any): any;
7
7
  export declare function isTypeof(value: any, theType: string): boolean;
8
- export declare function isUndefined(value: any): boolean;
9
- export declare function isNotUndefined(value: any): boolean;
10
- export declare function isNullOrUndefined(value: any): boolean;
11
- export declare function isNotNullOrUndefined(value: any): boolean;
8
+ export declare function isUndefined(value: any): value is undefined;
9
+ export declare function isNotUndefined<T>(value: T): value is T;
10
+ export declare function isNullOrUndefined(value: any): value is null | undefined;
11
+ export declare function isNotNullOrUndefined<T>(value: T): value is T;
12
12
  export declare function hasOwnProperty(obj: any, prop: string): boolean;
13
- export declare function isObject(value: any): boolean;
13
+ export declare function isObject<T>(value: T): value is T;
14
14
  export declare function isFunction(value: any): value is Function;
15
15
  export declare function isPromiseLike<T>(value: any): value is PromiseLike<T>;
16
16
  /**
@@ -121,7 +121,7 @@ export declare function _toISOStringPoly(date: Date): string;
121
121
  * @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
122
122
  * @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.
123
123
  */
124
- export declare function arrForEach<T = any>(arr: T[], callbackfn: (value: T, index?: number, array?: T[]) => void | number, thisArg?: any): void;
124
+ export declare function arrForEach<T = any>(arr: T[], callbackfn: (value: T, index?: number, array?: T[]) => undefined | void | number, thisArg?: any): void;
125
125
  /**
126
126
  * Returns the index of the first occurrence of a value in an array. This helper exists to avoid adding a polyfil for older browsers
127
127
  * that do not define Array.prototype.xxxx (eg. ES3 only, IE8) just in case any page checks for presence/absence of the prototype
@@ -193,7 +193,7 @@ export declare function getExceptionName(object: any): string;
193
193
  * @param srcChk - [Optional] Callback to check to original value that if supplied will be called if the new value should be set (if allowed)
194
194
  * @returns The existing or new value, depending what was set
195
195
  */
196
- export declare function setValue<T, K extends keyof T>(target: T, field: K, value: T[K], valChk?: (value: T[K]) => boolean, srcChk?: (value: T[K]) => boolean): T[K];
196
+ export declare function setValue<T, K extends keyof T>(target: T, field: K, value: T[K], valChk?: ((value: T[K]) => boolean) | null, srcChk?: ((value: T[K]) => boolean) | null): T[K];
197
197
  /**
198
198
  * Returns the current value from the target object if not null or undefined otherwise sets the new value and returns it
199
199
  * @param target - The target object to return or set the default value
@@ -46,7 +46,7 @@ export declare class PerfManager implements IPerfManager {
46
46
  * Defined as private so it can be visualized via the DebugPlugin
47
47
  */
48
48
  private ctx;
49
- constructor(manager: INotificationManager);
49
+ constructor(manager?: INotificationManager);
50
50
  /**
51
51
  * Create a new event and start timing, the manager may return null/undefined to indicate that it does not
52
52
  * want to monitor this source event.
@@ -12,7 +12,7 @@ import { IDiagnosticLogger } from "../JavaScriptSDK.Interfaces/IDiagnosticLogger
12
12
  * @param core - The current core instance
13
13
  * @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
14
14
  */
15
- export declare function createProcessTelemetryContext(telemetryChain: ITelemetryPluginChain, config: IConfiguration, core: IAppInsightsCore, startAt?: IPlugin): IProcessTelemetryContext;
15
+ export declare function createProcessTelemetryContext(telemetryChain: ITelemetryPluginChain | null, config: IConfiguration, core: IAppInsightsCore, startAt?: IPlugin): IProcessTelemetryContext;
16
16
  /**
17
17
  * Creates a new Telemetry Item context with the current config, core and plugin execution chain for handling the unloading of the chain
18
18
  * @param plugins - The plugin instances that will be executed
@@ -59,7 +59,7 @@ export declare class ProcessTelemetryContext implements IProcessTelemetryContext
59
59
  */
60
60
  getCfg: () => IConfiguration;
61
61
  getExtCfg: <T>(identifier: string, defaultValue?: T | any) => T;
62
- getConfig: (identifier: string, field: string, defaultValue?: number | string | boolean) => number | string | boolean;
62
+ getConfig: (identifier: string, field: string, defaultValue?: number | string | boolean | string[] | RegExp[] | Function) => number | string | boolean | string[] | RegExp[] | Function;
63
63
  /**
64
64
  * Returns the IAppInsightsCore instance for the current request
65
65
  */
@@ -1,6 +1,8 @@
1
1
  import { IPlugin } from "../JavaScriptSDK.Interfaces/ITelemetryPlugin";
2
- import { IProcessTelemetryContext } from "../JavaScriptSDK.Interfaces/IProcessTelemetryContext";
2
+ import { IProcessTelemetryContext, IProcessTelemetryUnloadContext } from "../JavaScriptSDK.Interfaces/IProcessTelemetryContext";
3
3
  import { IAppInsightsCore } from "../JavaScriptSDK.Interfaces/IAppInsightsCore";
4
+ import { IUnloadableComponent } from "../JavaScriptSDK.Interfaces/IUnloadableComponent";
5
+ import { ITelemetryUnloadState } from "../JavaScriptSDK.Interfaces/ITelemetryUnloadState";
4
6
  export interface IPluginState {
5
7
  core?: IAppInsightsCore;
6
8
  isInitialized?: boolean;
@@ -17,3 +19,13 @@ export declare function _getPluginState(plugin: IPlugin): IPluginState;
17
19
  */
18
20
  export declare function initializePlugins(processContext: IProcessTelemetryContext, extensions: IPlugin[]): void;
19
21
  export declare function sortPlugins<T = IPlugin>(plugins: T[]): T[];
22
+ /**
23
+ * Teardown / Unload helper to perform teardown/unloading operations for the provided components synchronously or asynchronously, this will call any
24
+ * _doTeardown() or _doUnload() functions on the provided components to allow them to finish removal.
25
+ * @param components - The components you want to unload
26
+ * @param unloadCtx - This is the context that should be used during unloading.
27
+ * @param unloadState - The details / state of the unload process, it holds details like whether it should be unloaded synchronously or asynchronously and the reason for the unload.
28
+ * @param asyncCallback - An optional callback that the plugin must call if it returns true to inform the caller that it has completed any async unload/teardown operations.
29
+ * @returns boolean - true if the plugin has or will call asyncCallback, this allows the plugin to perform any asynchronous operations.
30
+ */
31
+ export declare function unloadComponents(components: any | IUnloadableComponent[], unloadCtx?: IProcessTelemetryUnloadContext, unloadState?: ITelemetryUnloadState, asyncCallback?: () => void): void | boolean;
@@ -61,7 +61,7 @@ export interface IBaseProcessingContext {
61
61
  * @param that - The "this" value to use for the onComplete call, if not provided or undefined defaults to the current context
62
62
  * @param args - Any additional arguments to pass to the onComplete function
63
63
  */
64
- onComplete: (onComplete: Function, that?: any, ...args: any[]) => void;
64
+ onComplete: (onComplete: () => void, that?: any, ...args: any[]) => void;
65
65
  /**
66
66
  * Create a new context using the core and config from the current instance, returns a new instance of the same type
67
67
  * @param plugins - The execution order to process the plugins, if null or not supplied
@@ -0,0 +1,13 @@
1
+ import { IProcessTelemetryUnloadContext } from "./IProcessTelemetryContext";
2
+ import { ITelemetryUnloadState } from "./ITelemetryUnloadState";
3
+ export interface IUnloadableComponent {
4
+ /**
5
+ * Teardown / Unload hook to allow implementations to perform some additional unload operations before the BaseTelemetryPlugin
6
+ * finishes it's removal.
7
+ * @param unloadCtx - This is the context that should be used during unloading.
8
+ * @param unloadState - The details / state of the unload process, it holds details like whether it should be unloaded synchronously or asynchronously and the reason for the unload.
9
+ * @param asyncCallback - An optional callback that the plugin must call if it returns true to inform the caller that it has completed any async unload/teardown operations.
10
+ * @returns boolean - true if the plugin has or will call asyncCallback, this allows the plugin to perform any asynchronous operations.
11
+ */
12
+ _doUnload?: (unloadCtx?: IProcessTelemetryUnloadContext, unloadState?: ITelemetryUnloadState, asyncCallback?: () => void) => void | boolean;
13
+ }
@@ -1,13 +1,14 @@
1
1
  export { IConfiguration } from "./JavaScriptSDK.Interfaces/IConfiguration";
2
2
  export { IChannelControls, MinChannelPriorty } from "./JavaScriptSDK.Interfaces/IChannelControls";
3
3
  export { ITelemetryPlugin, IPlugin } from "./JavaScriptSDK.Interfaces/ITelemetryPlugin";
4
- export { IAppInsightsCore } from "./JavaScriptSDK.Interfaces/IAppInsightsCore";
4
+ export { IAppInsightsCore, ILoadedPlugin } from "./JavaScriptSDK.Interfaces/IAppInsightsCore";
5
5
  export { ITelemetryItem, ICustomProperties, Tags } from "./JavaScriptSDK.Interfaces/ITelemetryItem";
6
6
  export { IBaseProcessingContext, IProcessTelemetryContext, IProcessTelemetryUnloadContext, IProcessTelemetryUpdateContext, GetExtCfgMergeType } from "./JavaScriptSDK.Interfaces/IProcessTelemetryContext";
7
7
  export { INotificationListener } from "./JavaScriptSDK.Interfaces/INotificationListener";
8
8
  export { ITelemetryPluginChain } from "./JavaScriptSDK.Interfaces/ITelemetryPluginChain";
9
9
  export { IDiagnosticLogger } from "./JavaScriptSDK.Interfaces/IDiagnosticLogger";
10
10
  export { InstrumentorHooksCallback, IInstrumentHooksCallbacks, IInstrumentHooks, IInstrumentHook, IInstrumentCallDetails } from "./JavaScriptSDK.Interfaces/IInstrumentHooks";
11
+ export { IUnloadableComponent } from "./JavaScriptSDK.Interfaces/IUnloadableComponent";
11
12
  export { EventsDiscardedReason } from "./JavaScriptSDK.Enums/EventsDiscardedReason";
12
13
  export { SendRequestReason } from "./JavaScriptSDK.Enums/SendRequestReason";
13
14
  export { TelemetryUpdateReason } from "./JavaScriptSDK.Enums/TelemetryUpdateReason";
@@ -17,7 +18,7 @@ export { BaseCore } from "./JavaScriptSDK/BaseCore";
17
18
  export { BaseTelemetryPlugin } from "./JavaScriptSDK/BaseTelemetryPlugin";
18
19
  export { randomValue, random32, mwcRandomSeed, mwcRandom32, newId } from "./JavaScriptSDK/RandomHelper";
19
20
  export { CoreUtils, ICoreUtils, EventHelper, IEventHelper, Undefined, newGuid, perfNow, generateW3CId, disableCookies, canUseCookies, getCookie, setCookie, deleteCookie, _legacyCookieMgr } from "./JavaScriptSDK/CoreUtils";
20
- export { isTypeof, isUndefined, isNullOrUndefined, hasOwnProperty, isObject, isFunction, normalizeJsName, objForEachKey, strEndsWith, strStartsWith, isDate, isArray, isError, isString, isNumber, isBoolean, toISOString, arrForEach, arrIndexOf, arrMap, arrReduce, strTrim, objKeys, objDefineAccessors, dateNow, getExceptionName, throwError, strContains, isSymbol, setValue, getSetValue, isNotTruthy, isTruthy, proxyAssign, proxyFunctions, proxyFunctionAs, createClassFromInterface, optimizeObject, isNotUndefined, isNotNullOrUndefined, objFreeze, objSeal, createEnumStyle, objExtend } from "./JavaScriptSDK/HelperFuncs";
21
+ export { isTypeof, isUndefined, isNullOrUndefined, hasOwnProperty, isObject, isFunction, normalizeJsName, objForEachKey, strEndsWith, strStartsWith, isDate, isArray, isError, isString, isNumber, isBoolean, toISOString, arrForEach, arrIndexOf, arrMap, arrReduce, strTrim, objKeys, objDefineAccessors, dateNow, getExceptionName, throwError, strContains, isSymbol, setValue, getSetValue, isNotTruthy, isTruthy, proxyAssign, proxyFunctions, proxyFunctionAs, createClassFromInterface, optimizeObject, isNotUndefined, isNotNullOrUndefined, objFreeze, objSeal, createEnumStyle, objExtend, objToString } from "./JavaScriptSDK/HelperFuncs";
21
22
  export { attachEvent, detachEvent, addEventHandler, addEventListeners, addPageUnloadEventListener, addPageHideEventListener, addPageShowEventListener, removeEventHandler, removeEventListeners, removePageUnloadEventListener, removePageHideEventListener, removePageShowEventListener, eventOn, eventOff, mergeEvtNamespace, _IRegisteredEvents, __getRegisteredEvents } from "./JavaScriptSDK/EventHelpers";
22
23
  export { getGlobalInst, hasWindow, getWindow, hasDocument, getDocument, getCrypto, getMsCrypto, hasNavigator, getNavigator, hasHistory, getHistory, getLocation, getPerformance, hasJSON, getJSON, isReactNative, getConsole, dumpObj, isIE, getIEVersion, isSafari, setEnableEnvMocks, isBeaconsSupported, isFetchSupported, useXDomainRequest, isXhrSupported } from "./JavaScriptSDK/EnvUtils";
23
24
  export { getGlobal, objCreateFn as objCreate, strShimPrototype as strPrototype, strShimFunction as strFunction, strShimUndefined as strUndefined, strShimObject as strObject } from "@microsoft/applicationinsights-shims";
@@ -28,7 +29,7 @@ export { IPerfManager, IPerfManagerProvider } from "./JavaScriptSDK.Interfaces/I
28
29
  export { PerfEvent, PerfManager, doPerf, getGblPerfMgr, setGblPerfMgr } from "./JavaScriptSDK/PerfManager";
29
30
  export { safeGetLogger, DiagnosticLogger, _InternalLogMessage, _throwInternal } from "./JavaScriptSDK/DiagnosticLogger";
30
31
  export { ProcessTelemetryContext, createProcessTelemetryContext } from "./JavaScriptSDK/ProcessTelemetryContext";
31
- export { initializePlugins, sortPlugins } from "./JavaScriptSDK/TelemetryHelpers";
32
+ export { initializePlugins, sortPlugins, unloadComponents } from "./JavaScriptSDK/TelemetryHelpers";
32
33
  export { _InternalMessageId, _eInternalMessageId, LoggingSeverity, eLoggingSeverity } from "./JavaScriptSDK.Enums/LoggingEnums";
33
34
  export { InstrumentProto, InstrumentProtos, InstrumentFunc, InstrumentFuncs } from "./JavaScriptSDK/InstrumentHooks";
34
35
  export { ICookieMgr, ICookieMgrConfig } from "./JavaScriptSDK.Interfaces/ICookieMgr";
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.19.4"
8
+ "packageVersion": "7.19.5"
9
9
  }
10
10
  ]
11
11
  }