@microsoft/applicationinsights-common 3.0.6-nightly3.2311-01 → 3.0.6-nightly3.2311-04

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 (103) hide show
  1. package/browser/es5/applicationinsights-common.cjs.js +358 -14
  2. package/browser/es5/applicationinsights-common.cjs.js.map +1 -1
  3. package/browser/es5/applicationinsights-common.cjs.min.js +2 -2
  4. package/browser/es5/applicationinsights-common.cjs.min.js.map +1 -1
  5. package/browser/es5/applicationinsights-common.gbl.js +360 -16
  6. package/browser/es5/applicationinsights-common.gbl.js.map +1 -1
  7. package/browser/es5/applicationinsights-common.gbl.min.js +2 -2
  8. package/browser/es5/applicationinsights-common.gbl.min.js.map +1 -1
  9. package/browser/es5/applicationinsights-common.integrity.json +25 -25
  10. package/browser/es5/applicationinsights-common.js +360 -16
  11. package/browser/es5/applicationinsights-common.js.map +1 -1
  12. package/browser/es5/applicationinsights-common.min.js +2 -2
  13. package/browser/es5/applicationinsights-common.min.js.map +1 -1
  14. package/dist/es5/applicationinsights-common.js +358 -14
  15. package/dist/es5/applicationinsights-common.js.map +1 -1
  16. package/dist/es5/applicationinsights-common.min.js +2 -2
  17. package/dist/es5/applicationinsights-common.min.js.map +1 -1
  18. package/dist-es5/ConnectionStringParser.js +1 -1
  19. package/dist-es5/Constants.js +1 -1
  20. package/dist-es5/DomHelperFuncs.js +1 -1
  21. package/dist-es5/Enums.js +1 -1
  22. package/dist-es5/HelperFuncs.js +1 -1
  23. package/dist-es5/Interfaces/ConnectionString.js +1 -1
  24. package/dist-es5/Interfaces/Context/IApplication.js +1 -1
  25. package/dist-es5/Interfaces/Context/IDevice.js +1 -1
  26. package/dist-es5/Interfaces/Context/IInternal.js +1 -1
  27. package/dist-es5/Interfaces/Context/ILocation.js +1 -1
  28. package/dist-es5/Interfaces/Context/IOperatingSystem.js +1 -1
  29. package/dist-es5/Interfaces/Context/ISample.js +1 -1
  30. package/dist-es5/Interfaces/Context/ISession.js +1 -1
  31. package/dist-es5/Interfaces/Context/ISessionManager.js +1 -1
  32. package/dist-es5/Interfaces/Context/ITelemetryTrace.js +1 -1
  33. package/dist-es5/Interfaces/Context/IUser.js +1 -1
  34. package/dist-es5/Interfaces/Context/IWeb.js +1 -1
  35. package/dist-es5/Interfaces/Contracts/AvailabilityData.js +1 -1
  36. package/dist-es5/Interfaces/Contracts/ContextTagKeys.js +1 -1
  37. package/dist-es5/Interfaces/Contracts/DataPointType.js +1 -1
  38. package/dist-es5/Interfaces/Contracts/DependencyKind.js +1 -1
  39. package/dist-es5/Interfaces/Contracts/DependencySourceType.js +1 -1
  40. package/dist-es5/Interfaces/Contracts/IBase.js +1 -1
  41. package/dist-es5/Interfaces/Contracts/IData.js +1 -1
  42. package/dist-es5/Interfaces/Contracts/IDataPoint.js +1 -1
  43. package/dist-es5/Interfaces/Contracts/IDomain.js +1 -1
  44. package/dist-es5/Interfaces/Contracts/IEnvelope.js +1 -1
  45. package/dist-es5/Interfaces/Contracts/IEventData.js +1 -1
  46. package/dist-es5/Interfaces/Contracts/IExceptionData.js +1 -1
  47. package/dist-es5/Interfaces/Contracts/IExceptionDetails.js +1 -1
  48. package/dist-es5/Interfaces/Contracts/IMessageData.js +1 -1
  49. package/dist-es5/Interfaces/Contracts/IMetricData.js +1 -1
  50. package/dist-es5/Interfaces/Contracts/IPageViewData.js +1 -1
  51. package/dist-es5/Interfaces/Contracts/IPageViewPerfData.js +1 -1
  52. package/dist-es5/Interfaces/Contracts/IRemoteDependencyData.js +1 -1
  53. package/dist-es5/Interfaces/Contracts/IStackFrame.js +1 -1
  54. package/dist-es5/Interfaces/Contracts/RequestData.js +1 -1
  55. package/dist-es5/Interfaces/Contracts/SeverityLevel.js +1 -1
  56. package/dist-es5/Interfaces/IAppInsights.js +1 -1
  57. package/dist-es5/Interfaces/IConfig.js +1 -1
  58. package/dist-es5/Interfaces/ICorrelationConfig.js +1 -1
  59. package/dist-es5/Interfaces/IDependencyTelemetry.js +1 -1
  60. package/dist-es5/Interfaces/IEventTelemetry.js +1 -1
  61. package/dist-es5/Interfaces/IExceptionTelemetry.js +1 -1
  62. package/dist-es5/Interfaces/IMetricTelemetry.js +1 -1
  63. package/dist-es5/Interfaces/IPageViewPerformanceTelemetry.js +1 -1
  64. package/dist-es5/Interfaces/IPageViewTelemetry.js +1 -1
  65. package/dist-es5/Interfaces/IPartC.js +1 -1
  66. package/dist-es5/Interfaces/IPropertiesPlugin.js +1 -1
  67. package/dist-es5/Interfaces/IRequestContext.js +1 -1
  68. package/dist-es5/Interfaces/IStorageBuffer.js +1 -1
  69. package/dist-es5/Interfaces/ITelemetryContext.js +1 -1
  70. package/dist-es5/Interfaces/IThrottleMgr.js +1 -1
  71. package/dist-es5/Interfaces/ITraceTelemetry.js +1 -1
  72. package/dist-es5/Interfaces/PartAExtensions.js +1 -1
  73. package/dist-es5/Interfaces/Telemetry/IEnvelope.js +1 -1
  74. package/dist-es5/Interfaces/Telemetry/ISerializable.js +1 -1
  75. package/dist-es5/Offline.js +138 -0
  76. package/dist-es5/Offline.js.map +1 -0
  77. package/dist-es5/RequestResponseHeaders.js +1 -1
  78. package/dist-es5/StorageHelperFuncs.js +3 -3
  79. package/dist-es5/StorageHelperFuncs.js.map +1 -1
  80. package/dist-es5/Telemetry/Common/Data.js +1 -1
  81. package/dist-es5/Telemetry/Common/DataPoint.js +1 -1
  82. package/dist-es5/Telemetry/Common/DataSanitizer.js +1 -1
  83. package/dist-es5/Telemetry/Common/Envelope.js +1 -1
  84. package/dist-es5/Telemetry/Event.js +1 -1
  85. package/dist-es5/Telemetry/Exception.js +4 -4
  86. package/dist-es5/Telemetry/Exception.js.map +1 -1
  87. package/dist-es5/Telemetry/Metric.js +1 -1
  88. package/dist-es5/Telemetry/PageView.js +1 -1
  89. package/dist-es5/Telemetry/PageViewPerformance.js +1 -1
  90. package/dist-es5/Telemetry/RemoteDependencyData.js +1 -1
  91. package/dist-es5/Telemetry/Trace.js +1 -1
  92. package/dist-es5/TelemetryItemCreator.js +1 -1
  93. package/dist-es5/ThrottleMgr.js +3 -3
  94. package/dist-es5/ThrottleMgr.js.map +1 -1
  95. package/dist-es5/UrlHelperFuncs.js +1 -1
  96. package/dist-es5/Util.js +1 -1
  97. package/dist-es5/__DynamicConstants.js +2 -1
  98. package/dist-es5/__DynamicConstants.js.map +1 -1
  99. package/dist-es5/applicationinsights-common.js +2 -1
  100. package/dist-es5/applicationinsights-common.js.map +1 -1
  101. package/package.json +2 -2
  102. package/types/applicationinsights-common.d.ts +47 -1
  103. package/types/applicationinsights-common.namespaced.d.ts +47 -1
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Microsoft Application Insights Common JavaScript Library, 3.0.6-nightly3.2311-01
2
+ * Microsoft Application Insights Common JavaScript Library, 3.0.6-nightly3.2311-04
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  *
5
5
  * Microsoft Application Insights Team
@@ -32,6 +32,7 @@ import { isValidTraceId } from '@microsoft/applicationinsights-core-js';
32
32
  import { isValidTraceParent } from '@microsoft/applicationinsights-core-js';
33
33
  import { ITelemetryItem } from '@microsoft/applicationinsights-core-js';
34
34
  import { ITraceParent } from '@microsoft/applicationinsights-core-js';
35
+ import { IUnloadHook } from '@microsoft/applicationinsights-core-js';
35
36
  import { parseTraceParent } from '@microsoft/applicationinsights-core-js';
36
37
 
37
38
  /**
@@ -115,6 +116,12 @@ export declare function createDistributedTraceContextFromTrace(telemetryTrace?:
115
116
 
116
117
  export declare function createDomEvent(eventName: string): Event;
117
118
 
119
+ /**
120
+ * Create a new OfflineListener instance to monitor browser online / offline events
121
+ * @param parentEvtNamespace - The parent event namespace to append to any specific events for this instance
122
+ */
123
+ export declare function createOfflineListener(parentEvtNamespace?: string | string[]): IOfflineListener;
124
+
118
125
  /**
119
126
  * Create a telemetry item that the 1DS channel understands
120
127
  * @param item - domain specific properties; part B
@@ -338,6 +345,15 @@ export declare class Envelope implements IEnvelope {
338
345
  constructor(logger: IDiagnosticLogger, data: AIBase, name: string);
339
346
  }
340
347
 
348
+ /**
349
+ * This is the enum for the different network states current ai is experiencing
350
+ */
351
+ export declare const enum eOfflineValue {
352
+ Unknown = 0,
353
+ Online = 1,
354
+ Offline = 2
355
+ }
356
+
341
357
  export declare const enum eRequestHeaders {
342
358
  requestContextHeader = 0,
343
359
  requestContextTargetKey = 1,
@@ -884,6 +900,11 @@ export declare interface IConfig {
884
900
  * @defaultValue true
885
901
  */
886
902
  disableIkeyDeprecationMessage?: boolean;
903
+ /**
904
+ * [Optional] Sets to true if user wants to disable sending internal log message 'SendBrowserInfoOnUserInit'
905
+ * default to be false for versions 2.8.x and 3.0.x, true for versions 3.1.x and later
906
+ */
907
+ disableUserInitMessage?: boolean;
887
908
  /**
888
909
  * [Optional] Flag to indicate whether the internal looking endpoints should be automatically
889
910
  * added to the `excludeRequestFromAutoTrackingPatterns` collection. (defaults to true).
@@ -1526,6 +1547,25 @@ export declare interface IMetricTelemetry extends IPartC {
1526
1547
  iKey?: string;
1527
1548
  }
1528
1549
 
1550
+ export declare interface IOfflineListener {
1551
+ isOnline: () => boolean;
1552
+ isListening: () => boolean;
1553
+ unload: () => void;
1554
+ addListener: (callback: OfflineCallback) => IUnloadHook;
1555
+ setOnlineState: (uState: eOfflineValue) => void;
1556
+ }
1557
+
1558
+ /**
1559
+ * This is the interface for the Offline state
1560
+ * runtime state is retrieved from the browser state
1561
+ * user state is set by the user
1562
+ */
1563
+ export declare interface IOfflineState {
1564
+ readonly isOnline: boolean;
1565
+ readonly rState: eOfflineValue;
1566
+ readonly uState: eOfflineValue;
1567
+ }
1568
+
1529
1569
  export declare interface IOperatingSystem {
1530
1570
  name: string;
1531
1571
  }
@@ -2223,6 +2263,12 @@ export declare class Metric implements IMetricData, ISerializable {
2223
2263
  */
2224
2264
  export declare function msToTimeSpan(totalms: number): string;
2225
2265
 
2266
+ /**
2267
+ * this is the callback that will be called when the network status changes
2268
+ * @param onlineState this is the current network running state
2269
+ */
2270
+ export declare type OfflineCallback = (onlineState: IOfflineState) => void;
2271
+
2226
2272
  export declare class PageView implements IPageViewData, ISerializable {
2227
2273
  static envelopeType: string;
2228
2274
  static dataType: string;
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Microsoft Application Insights Common JavaScript Library, 3.0.6-nightly3.2311-01
2
+ * Microsoft Application Insights Common JavaScript Library, 3.0.6-nightly3.2311-04
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  *
5
5
  * Microsoft Application Insights Team
@@ -27,6 +27,7 @@ declare namespace ApplicationInsights {
27
27
  import { isValidTraceParent } from '@microsoft/applicationinsights-core-js';
28
28
  import { ITelemetryItem } from '@microsoft/applicationinsights-core-js';
29
29
  import { ITraceParent } from '@microsoft/applicationinsights-core-js';
30
+ import { IUnloadHook } from '@microsoft/applicationinsights-core-js';
30
31
  import { parseTraceParent } from '@microsoft/applicationinsights-core-js';
31
32
 
32
33
  /**
@@ -110,6 +111,12 @@ declare namespace ApplicationInsights {
110
111
 
111
112
  function createDomEvent(eventName: string): Event;
112
113
 
114
+ /**
115
+ * Create a new OfflineListener instance to monitor browser online / offline events
116
+ * @param parentEvtNamespace - The parent event namespace to append to any specific events for this instance
117
+ */
118
+ function createOfflineListener(parentEvtNamespace?: string | string[]): IOfflineListener;
119
+
113
120
  /**
114
121
  * Create a telemetry item that the 1DS channel understands
115
122
  * @param item - domain specific properties; part B
@@ -333,6 +340,15 @@ declare namespace ApplicationInsights {
333
340
  constructor(logger: IDiagnosticLogger, data: AIBase, name: string);
334
341
  }
335
342
 
343
+ /**
344
+ * This is the enum for the different network states current ai is experiencing
345
+ */
346
+ const enum eOfflineValue {
347
+ Unknown = 0,
348
+ Online = 1,
349
+ Offline = 2
350
+ }
351
+
336
352
  const enum eRequestHeaders {
337
353
  requestContextHeader = 0,
338
354
  requestContextTargetKey = 1,
@@ -879,6 +895,11 @@ declare namespace ApplicationInsights {
879
895
  * @defaultValue true
880
896
  */
881
897
  disableIkeyDeprecationMessage?: boolean;
898
+ /**
899
+ * [Optional] Sets to true if user wants to disable sending internal log message 'SendBrowserInfoOnUserInit'
900
+ * default to be false for versions 2.8.x and 3.0.x, true for versions 3.1.x and later
901
+ */
902
+ disableUserInitMessage?: boolean;
882
903
  /**
883
904
  * [Optional] Flag to indicate whether the internal looking endpoints should be automatically
884
905
  * added to the `excludeRequestFromAutoTrackingPatterns` collection. (defaults to true).
@@ -1521,6 +1542,25 @@ declare namespace ApplicationInsights {
1521
1542
  iKey?: string;
1522
1543
  }
1523
1544
 
1545
+ interface IOfflineListener {
1546
+ isOnline: () => boolean;
1547
+ isListening: () => boolean;
1548
+ unload: () => void;
1549
+ addListener: (callback: OfflineCallback) => IUnloadHook;
1550
+ setOnlineState: (uState: eOfflineValue) => void;
1551
+ }
1552
+
1553
+ /**
1554
+ * This is the interface for the Offline state
1555
+ * runtime state is retrieved from the browser state
1556
+ * user state is set by the user
1557
+ */
1558
+ interface IOfflineState {
1559
+ readonly isOnline: boolean;
1560
+ readonly rState: eOfflineValue;
1561
+ readonly uState: eOfflineValue;
1562
+ }
1563
+
1524
1564
  interface IOperatingSystem {
1525
1565
  name: string;
1526
1566
  }
@@ -2218,6 +2258,12 @@ declare namespace ApplicationInsights {
2218
2258
  */
2219
2259
  function msToTimeSpan(totalms: number): string;
2220
2260
 
2261
+ /**
2262
+ * this is the callback that will be called when the network status changes
2263
+ * @param onlineState this is the current network running state
2264
+ */
2265
+ type OfflineCallback = (onlineState: IOfflineState) => void;
2266
+
2221
2267
  class PageView implements IPageViewData, ISerializable {
2222
2268
  static envelopeType: string;
2223
2269
  static dataType: string;