@microsoft/applicationinsights-core-js 3.0.4-nightly3.2309-09 → 3.0.4-nightly3.2309-10

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 (91) hide show
  1. package/browser/es5/applicationinsights-core-js.cjs.js +2 -2
  2. package/browser/es5/applicationinsights-core-js.cjs.js.map +1 -1
  3. package/browser/es5/applicationinsights-core-js.cjs.min.js +2 -2
  4. package/browser/es5/applicationinsights-core-js.cjs.min.js.map +1 -1
  5. package/browser/es5/applicationinsights-core-js.gbl.js +4 -4
  6. package/browser/es5/applicationinsights-core-js.gbl.js.map +1 -1
  7. package/browser/es5/applicationinsights-core-js.gbl.min.js +2 -2
  8. package/browser/es5/applicationinsights-core-js.gbl.min.js.map +1 -1
  9. package/browser/es5/applicationinsights-core-js.integrity.json +25 -25
  10. package/browser/es5/applicationinsights-core-js.js +4 -4
  11. package/browser/es5/applicationinsights-core-js.js.map +1 -1
  12. package/browser/es5/applicationinsights-core-js.min.js +2 -2
  13. package/browser/es5/applicationinsights-core-js.min.js.map +1 -1
  14. package/dist/es5/applicationinsights-core-js.js +2 -2
  15. package/dist/es5/applicationinsights-core-js.js.map +1 -1
  16. package/dist/es5/applicationinsights-core-js.min.js +2 -2
  17. package/dist/es5/applicationinsights-core-js.min.js.map +1 -1
  18. package/dist-es5/Config/ConfigDefaultHelpers.js +1 -1
  19. package/dist-es5/Config/ConfigDefaults.js +1 -1
  20. package/dist-es5/Config/DynamicConfig.js +1 -1
  21. package/dist-es5/Config/DynamicProperty.js +1 -1
  22. package/dist-es5/Config/DynamicState.js +1 -1
  23. package/dist-es5/Config/DynamicSupport.js +1 -1
  24. package/dist-es5/Config/IConfigDefaults.js +1 -1
  25. package/dist-es5/Config/IDynamicConfigHandler.js +1 -1
  26. package/dist-es5/Config/IDynamicPropertyHandler.js +1 -1
  27. package/dist-es5/Config/IDynamicWatcher.js +1 -1
  28. package/dist-es5/Config/_IDynamicConfigHandlerState.js +1 -1
  29. package/dist-es5/JavaScriptSDK/AggregationError.js +1 -1
  30. package/dist-es5/JavaScriptSDK/AppInsightsCore.js +1 -1
  31. package/dist-es5/JavaScriptSDK/AsyncUtils.js +1 -1
  32. package/dist-es5/JavaScriptSDK/BaseTelemetryPlugin.js +1 -1
  33. package/dist-es5/JavaScriptSDK/Constants.js +1 -1
  34. package/dist-es5/JavaScriptSDK/CookieMgr.js +1 -1
  35. package/dist-es5/JavaScriptSDK/CoreUtils.js +1 -1
  36. package/dist-es5/JavaScriptSDK/DataCacheHelper.js +2 -2
  37. package/dist-es5/JavaScriptSDK/DataCacheHelper.js.map +1 -1
  38. package/dist-es5/JavaScriptSDK/DbgExtensionUtils.js +1 -1
  39. package/dist-es5/JavaScriptSDK/DiagnosticLogger.js +1 -1
  40. package/dist-es5/JavaScriptSDK/EnvUtils.js +1 -1
  41. package/dist-es5/JavaScriptSDK/EventHelpers.js +1 -1
  42. package/dist-es5/JavaScriptSDK/HelperFuncs.js +1 -1
  43. package/dist-es5/JavaScriptSDK/InstrumentHooks.js +1 -1
  44. package/dist-es5/JavaScriptSDK/InternalConstants.js +1 -1
  45. package/dist-es5/JavaScriptSDK/NotificationManager.js +1 -1
  46. package/dist-es5/JavaScriptSDK/PerfManager.js +1 -1
  47. package/dist-es5/JavaScriptSDK/ProcessTelemetryContext.js +1 -1
  48. package/dist-es5/JavaScriptSDK/RandomHelper.js +1 -1
  49. package/dist-es5/JavaScriptSDK/TelemetryHelpers.js +1 -1
  50. package/dist-es5/JavaScriptSDK/TelemetryInitializerPlugin.js +1 -1
  51. package/dist-es5/JavaScriptSDK/UnloadHandlerContainer.js +1 -1
  52. package/dist-es5/JavaScriptSDK/UnloadHookContainer.js +1 -1
  53. package/dist-es5/JavaScriptSDK/W3cTraceParent.js +1 -1
  54. package/dist-es5/JavaScriptSDK.Enums/EnumHelperFuncs.js +1 -1
  55. package/dist-es5/JavaScriptSDK.Enums/EventsDiscardedReason.js +1 -1
  56. package/dist-es5/JavaScriptSDK.Enums/FeatureOptInEnums.js +1 -1
  57. package/dist-es5/JavaScriptSDK.Enums/LoggingEnums.js +1 -1
  58. package/dist-es5/JavaScriptSDK.Enums/SendRequestReason.js +1 -1
  59. package/dist-es5/JavaScriptSDK.Enums/TelemetryUnloadReason.js +1 -1
  60. package/dist-es5/JavaScriptSDK.Enums/TelemetryUpdateReason.js +1 -1
  61. package/dist-es5/JavaScriptSDK.Interfaces/IAppInsightsCore.js +1 -1
  62. package/dist-es5/JavaScriptSDK.Interfaces/IChannelControls.js +1 -1
  63. package/dist-es5/JavaScriptSDK.Interfaces/IChannelControlsHost.js +1 -1
  64. package/dist-es5/JavaScriptSDK.Interfaces/IConfiguration.js +1 -1
  65. package/dist-es5/JavaScriptSDK.Interfaces/ICookieMgr.js +1 -1
  66. package/dist-es5/JavaScriptSDK.Interfaces/IDbgExtension.js +1 -1
  67. package/dist-es5/JavaScriptSDK.Interfaces/IDiagnosticLogger.js +1 -1
  68. package/dist-es5/JavaScriptSDK.Interfaces/IDistributedTraceContext.js +1 -1
  69. package/dist-es5/JavaScriptSDK.Interfaces/IFeatureOptIn.js +1 -1
  70. package/dist-es5/JavaScriptSDK.Interfaces/IInstrumentHooks.js +1 -1
  71. package/dist-es5/JavaScriptSDK.Interfaces/INotificationListener.js +1 -1
  72. package/dist-es5/JavaScriptSDK.Interfaces/INotificationManager.js +1 -1
  73. package/dist-es5/JavaScriptSDK.Interfaces/IPerfEvent.js +1 -1
  74. package/dist-es5/JavaScriptSDK.Interfaces/IPerfManager.js +1 -1
  75. package/dist-es5/JavaScriptSDK.Interfaces/IProcessTelemetryContext.js +1 -1
  76. package/dist-es5/JavaScriptSDK.Interfaces/ITelemetryInitializers.js +1 -1
  77. package/dist-es5/JavaScriptSDK.Interfaces/ITelemetryItem.js +1 -1
  78. package/dist-es5/JavaScriptSDK.Interfaces/ITelemetryPlugin.js +1 -1
  79. package/dist-es5/JavaScriptSDK.Interfaces/ITelemetryPluginChain.js +1 -1
  80. package/dist-es5/JavaScriptSDK.Interfaces/ITelemetryUnloadState.js +1 -1
  81. package/dist-es5/JavaScriptSDK.Interfaces/ITelemetryUpdateState.js +1 -1
  82. package/dist-es5/JavaScriptSDK.Interfaces/ITraceParent.js +1 -1
  83. package/dist-es5/JavaScriptSDK.Interfaces/IUnloadHook.js +1 -1
  84. package/dist-es5/JavaScriptSDK.Interfaces/IUnloadableComponent.js +1 -1
  85. package/dist-es5/JavaScriptSDK.Interfaces/IXHROverride.js +6 -0
  86. package/dist-es5/JavaScriptSDK.Interfaces/IXHROverride.js.map +1 -0
  87. package/dist-es5/__DynamicConstants.js +1 -1
  88. package/dist-es5/applicationinsights-core-js.js +1 -1
  89. package/package.json +1 -1
  90. package/types/applicationinsights-core-js.d.ts +52 -1
  91. package/types/applicationinsights-core-js.namespaced.d.ts +52 -1
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Microsoft Application Insights Core Javascript SDK, 3.0.4-nightly3.2309-09
2
+ * Microsoft Application Insights Core Javascript SDK, 3.0.4-nightly3.2309-10
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  *
5
5
  * Microsoft Application Insights Team
@@ -2133,6 +2133,19 @@ export declare class _InternalLogMessage {
2133
2133
 
2134
2134
  export declare type _InternalMessageId = number | _eInternalMessageId;
2135
2135
 
2136
+ /** IPayloadData describes interface of payload sent via POST channel */
2137
+ export declare interface IPayloadData {
2138
+ urlString: string;
2139
+ data: Uint8Array | string;
2140
+ headers?: {
2141
+ [name: string]: string;
2142
+ };
2143
+ timeout?: number;
2144
+ disableXhrSync?: boolean;
2145
+ disableFetchKeepAlive?: boolean;
2146
+ sendReason?: SendRequestReason;
2147
+ }
2148
+
2136
2149
  /**
2137
2150
  * This interface identifies the details of an internal performance event - it does not represent an outgoing reported event
2138
2151
  */
@@ -2690,6 +2703,13 @@ export declare interface IWatcherHandler<T = IConfiguration> extends IUnloadHook
2690
2703
  rm: () => void;
2691
2704
  }
2692
2705
 
2706
+ /**
2707
+ * The IXHROverride interface overrides the way HTTP requests are sent.
2708
+ */
2709
+ export declare interface IXHROverride {
2710
+ sendPOST: SendPOSTFunction;
2711
+ }
2712
+
2693
2713
  export declare const LoggingSeverity: EnumValue<typeof eLoggingSeverity>;
2694
2714
 
2695
2715
  export declare type LoggingSeverity = number | eLoggingSeverity;
@@ -2809,6 +2829,10 @@ export { objFreeze }
2809
2829
  export { objKeys }
2810
2830
  export { objSeal }
2811
2831
  export { objToString }
2832
+ export declare type OnCompleteCallback = (status: number, headers: {
2833
+ [headerName: string]: string;
2834
+ }, response?: string) => void;
2835
+
2812
2836
  /**
2813
2837
  * Watch and track changes for accesses to the current config, the provided config MUST already be
2814
2838
  * a dynamic config or a child accessed via the dynamic config
@@ -3102,6 +3126,14 @@ export declare function safeGetLogger(core: IAppInsightsCore, config?: IConfigur
3102
3126
 
3103
3127
  export declare function sendCustomEvent(evtName: string, cfg?: any, customDetails?: any): boolean;
3104
3128
 
3129
+ /**
3130
+ * SendPOSTFunction type defines how an HTTP POST request is sent to an ingestion server
3131
+ * @param payload - The payload object that should be sent, contains the url, bytes/string and headers for the request
3132
+ * @param oncomplete - The function to call once the request has completed whether a success, failure or timeout
3133
+ * @param sync - A boolean flag indicating whether the request should be sent as a synchronous request.
3134
+ */
3135
+ export declare type SendPOSTFunction = (payload: IPayloadData, oncomplete: OnCompleteCallback, sync?: boolean) => void | IPromise<boolean>;
3136
+
3105
3137
  /**
3106
3138
  * The EventsDiscardedReason enumeration contains a set of values that specify the reason for discarding an event.
3107
3139
  */
@@ -3262,6 +3294,25 @@ export declare function _throwInternal(logger: IDiagnosticLogger, severity: Logg
3262
3294
  */
3263
3295
  export declare function toISOString(date: Date): string;
3264
3296
 
3297
+ export declare const enum TransportType {
3298
+ /**
3299
+ * Use the default available api
3300
+ */
3301
+ NotSet = 0,
3302
+ /**
3303
+ * Use XMLHttpRequest or XMLDomainRequest if available
3304
+ */
3305
+ Xhr = 1,
3306
+ /**
3307
+ * Use the Fetch api if available
3308
+ */
3309
+ Fetch = 2,
3310
+ /**
3311
+ * Use sendBeacon api if available
3312
+ */
3313
+ Beacon = 3
3314
+ }
3315
+
3265
3316
  export declare function uaDisallowsSameSiteNone(userAgent: string): boolean;
3266
3317
 
3267
3318
  export declare const Undefined = "undefined";
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Microsoft Application Insights Core Javascript SDK, 3.0.4-nightly3.2309-09
2
+ * Microsoft Application Insights Core Javascript SDK, 3.0.4-nightly3.2309-10
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  *
5
5
  * Microsoft Application Insights Team
@@ -2128,6 +2128,19 @@ declare namespace ApplicationInsights {
2128
2128
 
2129
2129
  type _InternalMessageId = number | _eInternalMessageId;
2130
2130
 
2131
+ /** IPayloadData describes interface of payload sent via POST channel */
2132
+ interface IPayloadData {
2133
+ urlString: string;
2134
+ data: Uint8Array | string;
2135
+ headers?: {
2136
+ [name: string]: string;
2137
+ };
2138
+ timeout?: number;
2139
+ disableXhrSync?: boolean;
2140
+ disableFetchKeepAlive?: boolean;
2141
+ sendReason?: SendRequestReason;
2142
+ }
2143
+
2131
2144
  /**
2132
2145
  * This interface identifies the details of an internal performance event - it does not represent an outgoing reported event
2133
2146
  */
@@ -2685,6 +2698,13 @@ declare namespace ApplicationInsights {
2685
2698
  rm: () => void;
2686
2699
  }
2687
2700
 
2701
+ /**
2702
+ * The IXHROverride interface overrides the way HTTP requests are sent.
2703
+ */
2704
+ interface IXHROverride {
2705
+ sendPOST: SendPOSTFunction;
2706
+ }
2707
+
2688
2708
  const LoggingSeverity: EnumValue<typeof eLoggingSeverity>;
2689
2709
 
2690
2710
  type LoggingSeverity = number | eLoggingSeverity;
@@ -2804,6 +2824,10 @@ declare namespace ApplicationInsights {
2804
2824
 
2805
2825
 
2806
2826
 
2827
+ type OnCompleteCallback = (status: number, headers: {
2828
+ [headerName: string]: string;
2829
+ }, response?: string) => void;
2830
+
2807
2831
  /**
2808
2832
  * Watch and track changes for accesses to the current config, the provided config MUST already be
2809
2833
  * a dynamic config or a child accessed via the dynamic config
@@ -3097,6 +3121,14 @@ declare namespace ApplicationInsights {
3097
3121
 
3098
3122
  function sendCustomEvent(evtName: string, cfg?: any, customDetails?: any): boolean;
3099
3123
 
3124
+ /**
3125
+ * SendPOSTFunction type defines how an HTTP POST request is sent to an ingestion server
3126
+ * @param payload - The payload object that should be sent, contains the url, bytes/string and headers for the request
3127
+ * @param oncomplete - The function to call once the request has completed whether a success, failure or timeout
3128
+ * @param sync - A boolean flag indicating whether the request should be sent as a synchronous request.
3129
+ */
3130
+ type SendPOSTFunction = (payload: IPayloadData, oncomplete: OnCompleteCallback, sync?: boolean) => void | IPromise<boolean>;
3131
+
3100
3132
  /**
3101
3133
  * The EventsDiscardedReason enumeration contains a set of values that specify the reason for discarding an event.
3102
3134
  */
@@ -3257,6 +3289,25 @@ declare namespace ApplicationInsights {
3257
3289
  */
3258
3290
  function toISOString(date: Date): string;
3259
3291
 
3292
+ const enum TransportType {
3293
+ /**
3294
+ * Use the default available api
3295
+ */
3296
+ NotSet = 0,
3297
+ /**
3298
+ * Use XMLHttpRequest or XMLDomainRequest if available
3299
+ */
3300
+ Xhr = 1,
3301
+ /**
3302
+ * Use the Fetch api if available
3303
+ */
3304
+ Fetch = 2,
3305
+ /**
3306
+ * Use sendBeacon api if available
3307
+ */
3308
+ Beacon = 3
3309
+ }
3310
+
3260
3311
  function uaDisallowsSameSiteNone(userAgent: string): boolean;
3261
3312
 
3262
3313
  const Undefined = "undefined";