@microsoft/applicationinsights-channel-js 3.1.1-nightly3.2403-03 → 3.1.1

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 (57) hide show
  1. package/browser/es5/{applicationinsights-channel-js.3.1.1-nightly3.2403-03.js → applicationinsights-channel-js.3.1.1.cjs.js} +3306 -3160
  2. package/browser/es5/applicationinsights-channel-js.3.1.1.cjs.js.map +1 -0
  3. package/browser/es5/applicationinsights-channel-js.3.1.1.cjs.min.js +6 -0
  4. package/browser/es5/applicationinsights-channel-js.3.1.1.cjs.min.js.map +1 -0
  5. package/browser/es5/{applicationinsights-channel-js.3.1.1-nightly3.2403-03.gbl.js → applicationinsights-channel-js.3.1.1.gbl.js} +3307 -3134
  6. package/browser/es5/applicationinsights-channel-js.3.1.1.gbl.js.map +1 -0
  7. package/browser/es5/applicationinsights-channel-js.3.1.1.gbl.min.js +6 -0
  8. package/browser/es5/applicationinsights-channel-js.3.1.1.gbl.min.js.map +1 -0
  9. package/browser/es5/applicationinsights-channel-js.3.1.1.integrity.json +66 -0
  10. package/browser/es5/{applicationinsights-channel-js.3.1.1-nightly3.2403-03.cjs.js → applicationinsights-channel-js.3.1.1.js} +3333 -3133
  11. package/browser/es5/applicationinsights-channel-js.3.1.1.js.map +1 -0
  12. package/browser/es5/applicationinsights-channel-js.3.1.1.min.js +6 -0
  13. package/browser/es5/applicationinsights-channel-js.3.1.1.min.js.map +1 -0
  14. package/browser/es5/applicationinsights-channel-js.3.cjs.js +3304 -3131
  15. package/browser/es5/applicationinsights-channel-js.3.cjs.js.map +1 -1
  16. package/browser/es5/applicationinsights-channel-js.3.cjs.min.js +2 -2
  17. package/browser/es5/applicationinsights-channel-js.3.cjs.min.js.map +1 -1
  18. package/browser/es5/applicationinsights-channel-js.3.gbl.js +3306 -3133
  19. package/browser/es5/applicationinsights-channel-js.3.gbl.js.map +1 -1
  20. package/browser/es5/applicationinsights-channel-js.3.gbl.min.js +2 -2
  21. package/browser/es5/applicationinsights-channel-js.3.gbl.min.js.map +1 -1
  22. package/browser/es5/applicationinsights-channel-js.3.integrity.json +25 -25
  23. package/browser/es5/applicationinsights-channel-js.3.js +3306 -3133
  24. package/browser/es5/applicationinsights-channel-js.3.js.map +1 -1
  25. package/browser/es5/applicationinsights-channel-js.3.min.js +2 -2
  26. package/browser/es5/applicationinsights-channel-js.3.min.js.map +1 -1
  27. package/dist/es5/applicationinsights-channel-js.js +3304 -3131
  28. package/dist/es5/applicationinsights-channel-js.js.map +1 -1
  29. package/dist/es5/applicationinsights-channel-js.min.js +2 -2
  30. package/dist/es5/applicationinsights-channel-js.min.js.map +1 -1
  31. package/dist-es5/EnvelopeCreator.js +2 -2
  32. package/dist-es5/EnvelopeCreator.js.map +1 -1
  33. package/dist-es5/Interfaces.js +1 -1
  34. package/dist-es5/InternalConstants.js +1 -1
  35. package/dist-es5/SendBuffer.js +1 -1
  36. package/dist-es5/Sender.js +33 -14
  37. package/dist-es5/Sender.js.map +1 -1
  38. package/dist-es5/Serializer.js +1 -1
  39. package/dist-es5/TelemetryProcessors/Sample.js +1 -1
  40. package/dist-es5/TelemetryProcessors/SamplingScoreGenerators/HashCodeScoreGenerator.js +1 -1
  41. package/dist-es5/TelemetryProcessors/SamplingScoreGenerators/SamplingScoreGenerator.js +1 -1
  42. package/dist-es5/__DynamicConstants.js +3 -3
  43. package/dist-es5/__DynamicConstants.js.map +1 -1
  44. package/dist-es5/applicationinsights-channel-js.js +1 -1
  45. package/package.json +62 -65
  46. package/types/applicationinsights-channel-js.d.ts +9 -33
  47. package/types/applicationinsights-channel-js.namespaced.d.ts +18 -8
  48. package/browser/es5/applicationinsights-channel-js.3.1.1-nightly3.2403-03.cjs.js.map +0 -1
  49. package/browser/es5/applicationinsights-channel-js.3.1.1-nightly3.2403-03.cjs.min.js +0 -6
  50. package/browser/es5/applicationinsights-channel-js.3.1.1-nightly3.2403-03.cjs.min.js.map +0 -1
  51. package/browser/es5/applicationinsights-channel-js.3.1.1-nightly3.2403-03.gbl.js.map +0 -1
  52. package/browser/es5/applicationinsights-channel-js.3.1.1-nightly3.2403-03.gbl.min.js +0 -6
  53. package/browser/es5/applicationinsights-channel-js.3.1.1-nightly3.2403-03.gbl.min.js.map +0 -1
  54. package/browser/es5/applicationinsights-channel-js.3.1.1-nightly3.2403-03.integrity.json +0 -66
  55. package/browser/es5/applicationinsights-channel-js.3.1.1-nightly3.2403-03.js.map +0 -1
  56. package/browser/es5/applicationinsights-channel-js.3.1.1-nightly3.2403-03.min.js +0 -6
  57. package/browser/es5/applicationinsights-channel-js.3.1.1-nightly3.2403-03.min.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Microsoft Application Insights JavaScript SDK Channel, 3.1.1-nightly3.2403-03
2
+ * Microsoft Application Insights JavaScript SDK Channel, 3.1.1
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  *
5
5
  * Microsoft Application Insights Team
@@ -14,6 +14,7 @@
14
14
 
15
15
  import { BaseTelemetryPlugin } from '@microsoft/applicationinsights-core-js';
16
16
  import { IAppInsightsCore } from '@microsoft/applicationinsights-core-js';
17
+ import { IBackendResponse } from '@microsoft/applicationinsights-core-js';
17
18
  import { IChannelControls } from '@microsoft/applicationinsights-core-js';
18
19
  import { IConfig } from '@microsoft/applicationinsights-common';
19
20
  import { IConfiguration } from '@microsoft/applicationinsights-core-js';
@@ -27,6 +28,7 @@ import { ISample } from '@microsoft/applicationinsights-common';
27
28
  import { IStorageBuffer } from '@microsoft/applicationinsights-common';
28
29
  import { ITelemetryItem } from '@microsoft/applicationinsights-core-js';
29
30
  import { ITelemetryPluginChain } from '@microsoft/applicationinsights-core-js';
31
+ import { IXDomainRequest } from '@microsoft/applicationinsights-core-js';
30
32
  import { IXHROverride } from '@microsoft/applicationinsights-core-js';
31
33
  import { SendRequestReason } from '@microsoft/applicationinsights-core-js';
32
34
 
@@ -49,31 +51,6 @@ declare abstract class BaseSendBuffer {
49
51
  createNew(newLogger?: IDiagnosticLogger, newConfig?: ISenderConfig, canUseSessionStorage?: boolean): ArraySendBuffer | SessionStorageSendBuffer;
50
52
  }
51
53
 
52
- declare interface IBackendResponse {
53
- /**
54
- * Number of items received by the backend
55
- */
56
- readonly itemsReceived: number;
57
- /**
58
- * Number of items succesfuly accepted by the backend
59
- */
60
- readonly itemsAccepted: number;
61
- /**
62
- * List of errors for items which were not accepted
63
- */
64
- readonly errors: IResponseError[];
65
- /**
66
- * App id returned by the backend - not necessary returned, but we don't need it with each response.
67
- */
68
- readonly appId?: string;
69
- }
70
-
71
- declare interface IResponseError {
72
- readonly index: number;
73
- readonly statusCode: number;
74
- readonly message: string;
75
- }
76
-
77
54
  declare interface ISendBuffer {
78
55
  /**
79
56
  * Enqueue the payload
@@ -231,6 +208,11 @@ export declare interface ISenderConfig {
231
208
  * is provided and alwaysUseXhrOverride is true.
232
209
  */
233
210
  unloadTransports?: number | number[];
211
+ /**
212
+ * (Optional) The specific error codes that will cause a retry of sending data to the backend.
213
+ * @since 3.1.1
214
+ */
215
+ retryCodes?: number[];
234
216
  }
235
217
 
236
218
  export declare class Sender extends BaseTelemetryPlugin implements IChannelControls {
@@ -323,7 +305,7 @@ export declare class Sender extends BaseTelemetryPlugin implements IChannelContr
323
305
  * xdr state changes
324
306
  * @deprecated
325
307
  */
326
- _xdrOnLoad(xdr: XDomainRequest, payload: string[]): void;
308
+ _xdrOnLoad(xdr: IXDomainRequest, payload: string[]): void;
327
309
  /**
328
310
  * Add header to request
329
311
  * @param name - Header name.
@@ -356,10 +338,4 @@ declare class SessionStorageSendBuffer extends BaseSendBuffer implements ISendBu
356
338
  createNew(newLogger?: IDiagnosticLogger, newConfig?: ISenderConfig, canUseSessionStorage?: boolean): ArraySendBuffer | SessionStorageSendBuffer;
357
339
  }
358
340
 
359
- declare interface XDomainRequest extends XMLHttpRequestEventTarget {
360
- readonly responseText: string;
361
- send(payload: string): void;
362
- open(method: string, url: string): void;
363
- }
364
-
365
341
  export { }
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Microsoft Application Insights JavaScript SDK Channel, 3.1.1-nightly3.2403-03
2
+ * Microsoft Application Insights JavaScript SDK Channel, 3.1.1
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  *
5
5
  * Microsoft Application Insights Team
@@ -2208,6 +2208,11 @@ declare namespace ApplicationInsights {
2208
2208
  * is provided and alwaysUseXhrOverride is true.
2209
2209
  */
2210
2210
  unloadTransports?: number | number[];
2211
+ /**
2212
+ * (Optional) The specific error codes that will cause a retry of sending data to the backend.
2213
+ * @since 3.1.1
2214
+ */
2215
+ retryCodes?: number[];
2211
2216
  }
2212
2217
 
2213
2218
  interface ISerializable {
@@ -2609,6 +2614,17 @@ declare namespace ApplicationInsights {
2609
2614
  rdOnly: <C, V = any>(target: C, name: string) => V;
2610
2615
  }
2611
2616
 
2617
+ interface IXDomainRequest extends XMLHttpRequestEventTarget {
2618
+ readonly responseText: string;
2619
+ send(payload: string): void;
2620
+ open(method: string, url: string): void;
2621
+ timeout: number;
2622
+ contentType: string;
2623
+ addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
2624
+ addEventListener(type: "load" | "timeout", listener: (ev: Event) => any, useCapture?: boolean): void;
2625
+ addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
2626
+ }
2627
+
2612
2628
  /**
2613
2629
  * The IXHROverride interface overrides the way HTTP requests are sent.
2614
2630
  */
@@ -2728,7 +2744,7 @@ declare namespace ApplicationInsights {
2728
2744
  * xdr state changes
2729
2745
  * @deprecated
2730
2746
  */
2731
- _xdrOnLoad(xdr: XDomainRequest, payload: string[]): void;
2747
+ _xdrOnLoad(xdr: IXDomainRequest, payload: string[]): void;
2732
2748
  /**
2733
2749
  * Add header to request
2734
2750
  * @param name - Header name.
@@ -2869,10 +2885,4 @@ declare namespace ApplicationInsights {
2869
2885
 
2870
2886
  type WatcherFunction<T = IConfiguration> = (details: IWatchDetails<T>) => void;
2871
2887
 
2872
- interface XDomainRequest extends XMLHttpRequestEventTarget {
2873
- readonly responseText: string;
2874
- send(payload: string): void;
2875
- open(method: string, url: string): void;
2876
- }
2877
-
2878
2888
  }