@microsoft/applicationinsights-channel-js 3.1.3-nightly3.2403-15 → 3.1.3-nightly3.2404-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 (59) hide show
  1. package/browser/es5/{applicationinsights-channel-js.3.1.3-nightly3.2403-15.js → applicationinsights-channel-js.3.1.3-nightly3.2404-12.cjs.js} +248 -125
  2. package/browser/es5/applicationinsights-channel-js.3.1.3-nightly3.2404-12.cjs.js.map +1 -0
  3. package/browser/es5/applicationinsights-channel-js.3.1.3-nightly3.2404-12.cjs.min.js +6 -0
  4. package/browser/es5/applicationinsights-channel-js.3.1.3-nightly3.2404-12.cjs.min.js.map +1 -0
  5. package/browser/es5/{applicationinsights-channel-js.3.1.3-nightly3.2403-15.gbl.js → applicationinsights-channel-js.3.1.3-nightly3.2404-12.gbl.js} +250 -100
  6. package/browser/es5/applicationinsights-channel-js.3.1.3-nightly3.2404-12.gbl.js.map +1 -0
  7. package/browser/es5/applicationinsights-channel-js.3.1.3-nightly3.2404-12.gbl.min.js +6 -0
  8. package/browser/es5/applicationinsights-channel-js.3.1.3-nightly3.2404-12.gbl.min.js.map +1 -0
  9. package/browser/es5/applicationinsights-channel-js.3.1.3-nightly3.2404-12.integrity.json +66 -0
  10. package/browser/es5/{applicationinsights-channel-js.3.1.3-nightly3.2403-15.cjs.js → applicationinsights-channel-js.3.1.3-nightly3.2404-12.js} +275 -98
  11. package/browser/es5/applicationinsights-channel-js.3.1.3-nightly3.2404-12.js.map +1 -0
  12. package/browser/es5/applicationinsights-channel-js.3.1.3-nightly3.2404-12.min.js +6 -0
  13. package/browser/es5/applicationinsights-channel-js.3.1.3-nightly3.2404-12.min.js.map +1 -0
  14. package/browser/es5/applicationinsights-channel-js.3.cjs.js +247 -97
  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 +249 -99
  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 +249 -99
  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 +247 -97
  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 +3 -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 +98 -19
  36. package/dist-es5/SendBuffer.js.map +1 -1
  37. package/dist-es5/Sender.js +94 -35
  38. package/dist-es5/Sender.js.map +1 -1
  39. package/dist-es5/Serializer.js +1 -1
  40. package/dist-es5/TelemetryProcessors/Sample.js +1 -1
  41. package/dist-es5/TelemetryProcessors/SamplingScoreGenerators/HashCodeScoreGenerator.js +3 -3
  42. package/dist-es5/TelemetryProcessors/SamplingScoreGenerators/HashCodeScoreGenerator.js.map +1 -1
  43. package/dist-es5/TelemetryProcessors/SamplingScoreGenerators/SamplingScoreGenerator.js +1 -1
  44. package/dist-es5/__DynamicConstants.js +6 -4
  45. package/dist-es5/__DynamicConstants.js.map +1 -1
  46. package/dist-es5/applicationinsights-channel-js.js +1 -1
  47. package/package.json +3 -3
  48. package/types/applicationinsights-channel-js.d.ts +59 -22
  49. package/types/applicationinsights-channel-js.namespaced.d.ts +59 -49
  50. package/browser/es5/applicationinsights-channel-js.3.1.3-nightly3.2403-15.cjs.js.map +0 -1
  51. package/browser/es5/applicationinsights-channel-js.3.1.3-nightly3.2403-15.cjs.min.js +0 -6
  52. package/browser/es5/applicationinsights-channel-js.3.1.3-nightly3.2403-15.cjs.min.js.map +0 -1
  53. package/browser/es5/applicationinsights-channel-js.3.1.3-nightly3.2403-15.gbl.js.map +0 -1
  54. package/browser/es5/applicationinsights-channel-js.3.1.3-nightly3.2403-15.gbl.min.js +0 -6
  55. package/browser/es5/applicationinsights-channel-js.3.1.3-nightly3.2403-15.gbl.min.js.map +0 -1
  56. package/browser/es5/applicationinsights-channel-js.3.1.3-nightly3.2403-15.integrity.json +0 -66
  57. package/browser/es5/applicationinsights-channel-js.3.1.3-nightly3.2403-15.js.map +0 -1
  58. package/browser/es5/applicationinsights-channel-js.3.1.3-nightly3.2403-15.min.js +0 -6
  59. package/browser/es5/applicationinsights-channel-js.3.1.3-nightly3.2403-15.min.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Channel, 3.1.3-nightly3.2403-15
2
+ * Application Insights JavaScript SDK - Channel, 3.1.3-nightly3.2404-12
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  import dynamicProto from "@microsoft/dynamicproto-js";
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Channel, 3.1.3-nightly3.2403-15
2
+ * Application Insights JavaScript SDK - Channel, 3.1.3-nightly3.2404-12
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,10 +1,10 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Channel, 3.1.3-nightly3.2403-15
2
+ * Application Insights JavaScript SDK - Channel, 3.1.3-nightly3.2404-12
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
6
6
 
7
- import { _DYN_LENGTH } from "../../__DynamicConstants";
7
+ import { _DYN_CONCAT, _DYN_LENGTH } from "../../__DynamicConstants";
8
8
  // (Magic number) DJB algorithm can't work on shorter strings (results in poor distribution
9
9
  var MIN_INPUT_LENGTH = 8;
10
10
  var HashCodeScoreGenerator = /** @class */ (function () {
@@ -19,7 +19,7 @@ var HashCodeScoreGenerator = /** @class */ (function () {
19
19
  return 0;
20
20
  }
21
21
  while (input[_DYN_LENGTH /* @min:%2elength */] < MIN_INPUT_LENGTH) {
22
- input = input.concat(input);
22
+ input = input[_DYN_CONCAT /* @min:%2econcat */](input);
23
23
  }
24
24
  // 5381 is a magic number: http://stackoverflow.com/questions/10696223/reason-for-5381-number-in-djb-hash-function
25
25
  var hash = 5381;
@@ -1 +1 @@
1
- {"version":3,"file":"HashCodeScoreGenerator.js.map","sources":["HashCodeScoreGenerator.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { _DYN_LENGTH } from \"../../__DynamicConstants\";\r\n// (Magic number) DJB algorithm can't work on shorter strings (results in poor distribution\r\nvar MIN_INPUT_LENGTH = 8;\r\nvar HashCodeScoreGenerator = /** @class */ (function () {\r\n function HashCodeScoreGenerator() {\r\n }\r\n HashCodeScoreGenerator.prototype.getHashCodeScore = function (key) {\r\n var score = this.getHashCode(key) / HashCodeScoreGenerator.INT_MAX_VALUE;\r\n return score * 100;\r\n };\r\n HashCodeScoreGenerator.prototype.getHashCode = function (input) {\r\n if (input === \"\") {\r\n return 0;\r\n }\r\n while (input[_DYN_LENGTH /* @min:%2elength */] < MIN_INPUT_LENGTH) {\r\n input = input.concat(input);\r\n }\r\n // 5381 is a magic number: http://stackoverflow.com/questions/10696223/reason-for-5381-number-in-djb-hash-function\r\n var hash = 5381;\r\n for (var i = 0; i < input[_DYN_LENGTH /* @min:%2elength */]; ++i) {\r\n hash = ((hash << 5) + hash) + input.charCodeAt(i);\r\n // 'hash' is of number type which means 53 bit integer (http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types-number-type)\r\n // 'hash & hash' will keep it 32 bit integer - just to make it clearer what the result is.\r\n hash = hash & hash;\r\n }\r\n return Math.abs(hash);\r\n };\r\n // We're using 32 bit math, hence max value is (2^31 - 1)\r\n HashCodeScoreGenerator.INT_MAX_VALUE = 2147483647;\r\n return HashCodeScoreGenerator;\r\n}());\r\nexport { HashCodeScoreGenerator };\r\n//# sourceMappingURL=HashCodeScoreGenerator.js.map"],"names":[],"mappings":";;;;AAA4D;AAC1B;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
1
+ {"version":3,"file":"HashCodeScoreGenerator.js.map","sources":["HashCodeScoreGenerator.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { _DYN_CONCAT, _DYN_LENGTH } from \"../../__DynamicConstants\";\r\n// (Magic number) DJB algorithm can't work on shorter strings (results in poor distribution\r\nvar MIN_INPUT_LENGTH = 8;\r\nvar HashCodeScoreGenerator = /** @class */ (function () {\r\n function HashCodeScoreGenerator() {\r\n }\r\n HashCodeScoreGenerator.prototype.getHashCodeScore = function (key) {\r\n var score = this.getHashCode(key) / HashCodeScoreGenerator.INT_MAX_VALUE;\r\n return score * 100;\r\n };\r\n HashCodeScoreGenerator.prototype.getHashCode = function (input) {\r\n if (input === \"\") {\r\n return 0;\r\n }\r\n while (input[_DYN_LENGTH /* @min:%2elength */] < MIN_INPUT_LENGTH) {\r\n input = input[_DYN_CONCAT /* @min:%2econcat */](input);\r\n }\r\n // 5381 is a magic number: http://stackoverflow.com/questions/10696223/reason-for-5381-number-in-djb-hash-function\r\n var hash = 5381;\r\n for (var i = 0; i < input[_DYN_LENGTH /* @min:%2elength */]; ++i) {\r\n hash = ((hash << 5) + hash) + input.charCodeAt(i);\r\n // 'hash' is of number type which means 53 bit integer (http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types-number-type)\r\n // 'hash & hash' will keep it 32 bit integer - just to make it clearer what the result is.\r\n hash = hash & hash;\r\n }\r\n return Math.abs(hash);\r\n };\r\n // We're using 32 bit math, hence max value is (2^31 - 1)\r\n HashCodeScoreGenerator.INT_MAX_VALUE = 2147483647;\r\n return HashCodeScoreGenerator;\r\n}());\r\nexport { HashCodeScoreGenerator };\r\n//# sourceMappingURL=HashCodeScoreGenerator.js.map"],"names":[],"mappings":";;;;AAA4D;AAC1B;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Channel, 3.1.3-nightly3.2403-15
2
+ * Application Insights JavaScript SDK - Channel, 3.1.3-nightly3.2404-12
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Channel, 3.1.3-nightly3.2403-15
2
+ * Application Insights JavaScript SDK - Channel, 3.1.3-nightly3.2404-12
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -16,7 +16,7 @@ export var _DYN_DEVICE_TYPE = "deviceType"; // Count: 3
16
16
  export var _DYN_DATA = "data"; // Count: 15
17
17
  export var _DYN_NAME = "name"; // Count: 8
18
18
  export var _DYN_TRACE_ID = "traceID"; // Count: 5
19
- export var _DYN_LENGTH = "length"; // Count: 37
19
+ export var _DYN_LENGTH = "length"; // Count: 38
20
20
  export var _DYN_STRINGIFY = "stringify"; // Count: 5
21
21
  export var _DYN_MEASUREMENTS = "measurements"; // Count: 7
22
22
  export var _DYN_DATA_TYPE = "dataType"; // Count: 10
@@ -26,7 +26,8 @@ export var _DYN__GET = "_get"; // Count: 5
26
26
  export var _DYN_ENQUEUE = "enqueue"; // Count: 7
27
27
  export var _DYN_COUNT = "count"; // Count: 7
28
28
  export var _DYN_EVENTS_LIMIT_IN_MEM = "eventsLimitInMem"; // Count: 2
29
- export var _DYN_PUSH = "push"; // Count: 6
29
+ export var _DYN_PUSH = "push"; // Count: 9
30
+ export var _DYN_ITEM = "item"; // Count: 6
30
31
  export var _DYN_EMIT_LINE_DELIMITED_0 = "emitLineDelimitedJson"; // Count: 3
31
32
  export var _DYN_CLEAR = "clear"; // Count: 6
32
33
  export var _DYN_CREATE_NEW = "createNew"; // Count: 3
@@ -35,6 +36,7 @@ export var _DYN_CLEAR_SENT = "clearSent"; // Count: 5
35
36
  export var _DYN_BUFFER_OVERRIDE = "bufferOverride"; // Count: 3
36
37
  export var _DYN__BUFFER__KEY = "BUFFER_KEY"; // Count: 5
37
38
  export var _DYN__SENT__BUFFER__KEY = "SENT_BUFFER_KEY"; // Count: 8
39
+ export var _DYN_CONCAT = "concat"; // Count: 6
38
40
  export var _DYN__MAX__BUFFER__SIZE = "MAX_BUFFER_SIZE"; // Count: 5
39
41
  export var _DYN_TRIGGER_SEND = "triggerSend"; // Count: 5
40
42
  export var _DYN_DIAG_LOG = "diagLog"; // Count: 16
@@ -60,8 +62,8 @@ export var _DYN_SERIALIZE = "serialize"; // Count: 4
60
62
  export var _DYN__ON_ERROR = "_onError"; // Count: 7
61
63
  export var _DYN__ON_PARTIAL_SUCCESS = "_onPartialSuccess"; // Count: 3
62
64
  export var _DYN__ON_SUCCESS = "_onSuccess"; // Count: 6
63
- export var _DYN_ITEMS_ACCEPTED = "itemsAccepted"; // Count: 3
64
65
  export var _DYN_ITEMS_RECEIVED = "itemsReceived"; // Count: 3
66
+ export var _DYN_ITEMS_ACCEPTED = "itemsAccepted"; // Count: 3
65
67
  export var _DYN_ORI_PAYLOAD = "oriPayload"; // Count: 3
66
68
  export var _DYN_BASE_TYPE = "baseType"; // Count: 4
67
69
  export var _DYN_SAMPLE_RATE = "sampleRate"; // Count: 4
@@ -1 +1 @@
1
- {"version":3,"file":"__DynamicConstants.js.map","sources":["__DynamicConstants.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n// @skip-file-minify\r\n// ##############################################################\r\n// AUTO GENERATED FILE: This file is Auto Generated during build.\r\n// ##############################################################\r\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r\n// Note: DON'T Export these const from the package as we are still targeting ES3 this will export a mutable variables that someone could change!!!\r\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r\nexport var _DYN_TAGS = \"tags\"; // Count: 17\r\nexport var _DYN_DEVICE_TYPE = \"deviceType\"; // Count: 3\r\nexport var _DYN_DATA = \"data\"; // Count: 15\r\nexport var _DYN_NAME = \"name\"; // Count: 8\r\nexport var _DYN_TRACE_ID = \"traceID\"; // Count: 5\r\nexport var _DYN_LENGTH = \"length\"; // Count: 37\r\nexport var _DYN_STRINGIFY = \"stringify\"; // Count: 5\r\nexport var _DYN_MEASUREMENTS = \"measurements\"; // Count: 7\r\nexport var _DYN_DATA_TYPE = \"dataType\"; // Count: 10\r\nexport var _DYN_ENVELOPE_TYPE = \"envelopeType\"; // Count: 7\r\nexport var _DYN_TO_STRING = \"toString\"; // Count: 7\r\nexport var _DYN__GET = \"_get\"; // Count: 5\r\nexport var _DYN_ENQUEUE = \"enqueue\"; // Count: 7\r\nexport var _DYN_COUNT = \"count\"; // Count: 7\r\nexport var _DYN_EVENTS_LIMIT_IN_MEM = \"eventsLimitInMem\"; // Count: 2\r\nexport var _DYN_PUSH = \"push\"; // Count: 6\r\nexport var _DYN_EMIT_LINE_DELIMITED_0 = \"emitLineDelimitedJson\"; // Count: 3\r\nexport var _DYN_CLEAR = \"clear\"; // Count: 6\r\nexport var _DYN_CREATE_NEW = \"createNew\"; // Count: 3\r\nexport var _DYN_MARK_AS_SENT = \"markAsSent\"; // Count: 4\r\nexport var _DYN_CLEAR_SENT = \"clearSent\"; // Count: 5\r\nexport var _DYN_BUFFER_OVERRIDE = \"bufferOverride\"; // Count: 3\r\nexport var _DYN__BUFFER__KEY = \"BUFFER_KEY\"; // Count: 5\r\nexport var _DYN__SENT__BUFFER__KEY = \"SENT_BUFFER_KEY\"; // Count: 8\r\nexport var _DYN__MAX__BUFFER__SIZE = \"MAX_BUFFER_SIZE\"; // Count: 5\r\nexport var _DYN_TRIGGER_SEND = \"triggerSend\"; // Count: 5\r\nexport var _DYN_DIAG_LOG = \"diagLog\"; // Count: 16\r\nexport var _DYN_INITIALIZE = \"initialize\"; // Count: 3\r\nexport var _DYN__SENDER = \"_sender\"; // Count: 5\r\nexport var _DYN_CUSTOM_HEADERS = \"customHeaders\"; // Count: 3\r\nexport var _DYN_MAX_BATCH_SIZE_IN_BY1 = \"maxBatchSizeInBytes\"; // Count: 2\r\nexport var _DYN_ONUNLOAD_DISABLE_BEA2 = \"onunloadDisableBeacon\"; // Count: 3\r\nexport var _DYN_IS_BEACON_API_DISABL3 = \"isBeaconApiDisabled\"; // Count: 3\r\nexport var _DYN_ALWAYS_USE_XHR_OVERR4 = \"alwaysUseXhrOverride\"; // Count: 2\r\nexport var _DYN_DISABLE_XHR = \"disableXhr\"; // Count: 3\r\nexport var _DYN_ENABLE_SESSION_STORA5 = \"enableSessionStorageBuffer\"; // Count: 2\r\nexport var _DYN__BUFFER = \"_buffer\"; // Count: 9\r\nexport var _DYN_ONUNLOAD_DISABLE_FET6 = \"onunloadDisableFetch\"; // Count: 2\r\nexport var _DYN_DISABLE_SEND_BEACON_7 = \"disableSendBeaconSplit\"; // Count: 2\r\nexport var _DYN_INSTRUMENTATION_KEY = \"instrumentationKey\"; // Count: 2\r\nexport var _DYN_ENABLE_SEND_PROMISE = \"enableSendPromise\"; // Count: 2\r\nexport var _DYN_GET_SENDER_INST = \"getSenderInst\"; // Count: 4\r\nexport var _DYN_UNLOAD_TRANSPORTS = \"unloadTransports\"; // Count: 2\r\nexport var _DYN_CONVERT_UNDEFINED = \"convertUndefined\"; // Count: 2\r\nexport var _DYN_MAX_BATCH_INTERVAL = \"maxBatchInterval\"; // Count: 2\r\nexport var _DYN_SERIALIZE = \"serialize\"; // Count: 4\r\nexport var _DYN__ON_ERROR = \"_onError\"; // Count: 7\r\nexport var _DYN__ON_PARTIAL_SUCCESS = \"_onPartialSuccess\"; // Count: 3\r\nexport var _DYN__ON_SUCCESS = \"_onSuccess\"; // Count: 6\r\nexport var _DYN_ITEMS_ACCEPTED = \"itemsAccepted\"; // Count: 3\r\nexport var _DYN_ITEMS_RECEIVED = \"itemsReceived\"; // Count: 3\r\nexport var _DYN_ORI_PAYLOAD = \"oriPayload\"; // Count: 3\r\nexport var _DYN_BASE_TYPE = \"baseType\"; // Count: 4\r\nexport var _DYN_SAMPLE_RATE = \"sampleRate\"; // Count: 4\r\nexport var _DYN_EVENTS_SEND_REQUEST = \"eventsSendRequest\"; // Count: 2\r\nexport var _DYN_GET_SAMPLING_SCORE = \"getSamplingScore\"; // Count: 2\r\nexport var _DYN_GET_HASH_CODE_SCORE = \"getHashCodeScore\"; // Count: 4\r\n//# sourceMappingURL=__DynamicConstants.js.map"],"names":[],"mappings":";;;;AAA4D;AAC1B;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
1
+ {"version":3,"file":"__DynamicConstants.js.map","sources":["__DynamicConstants.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n// @skip-file-minify\r\n// ##############################################################\r\n// AUTO GENERATED FILE: This file is Auto Generated during build.\r\n// ##############################################################\r\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r\n// Note: DON'T Export these const from the package as we are still targeting ES3 this will export a mutable variables that someone could change!!!\r\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r\nexport var _DYN_TAGS = \"tags\"; // Count: 17\r\nexport var _DYN_DEVICE_TYPE = \"deviceType\"; // Count: 3\r\nexport var _DYN_DATA = \"data\"; // Count: 15\r\nexport var _DYN_NAME = \"name\"; // Count: 8\r\nexport var _DYN_TRACE_ID = \"traceID\"; // Count: 5\r\nexport var _DYN_LENGTH = \"length\"; // Count: 38\r\nexport var _DYN_STRINGIFY = \"stringify\"; // Count: 5\r\nexport var _DYN_MEASUREMENTS = \"measurements\"; // Count: 7\r\nexport var _DYN_DATA_TYPE = \"dataType\"; // Count: 10\r\nexport var _DYN_ENVELOPE_TYPE = \"envelopeType\"; // Count: 7\r\nexport var _DYN_TO_STRING = \"toString\"; // Count: 7\r\nexport var _DYN__GET = \"_get\"; // Count: 5\r\nexport var _DYN_ENQUEUE = \"enqueue\"; // Count: 7\r\nexport var _DYN_COUNT = \"count\"; // Count: 7\r\nexport var _DYN_EVENTS_LIMIT_IN_MEM = \"eventsLimitInMem\"; // Count: 2\r\nexport var _DYN_PUSH = \"push\"; // Count: 9\r\nexport var _DYN_ITEM = \"item\"; // Count: 6\r\nexport var _DYN_EMIT_LINE_DELIMITED_0 = \"emitLineDelimitedJson\"; // Count: 3\r\nexport var _DYN_CLEAR = \"clear\"; // Count: 6\r\nexport var _DYN_CREATE_NEW = \"createNew\"; // Count: 3\r\nexport var _DYN_MARK_AS_SENT = \"markAsSent\"; // Count: 4\r\nexport var _DYN_CLEAR_SENT = \"clearSent\"; // Count: 5\r\nexport var _DYN_BUFFER_OVERRIDE = \"bufferOverride\"; // Count: 3\r\nexport var _DYN__BUFFER__KEY = \"BUFFER_KEY\"; // Count: 5\r\nexport var _DYN__SENT__BUFFER__KEY = \"SENT_BUFFER_KEY\"; // Count: 8\r\nexport var _DYN_CONCAT = \"concat\"; // Count: 6\r\nexport var _DYN__MAX__BUFFER__SIZE = \"MAX_BUFFER_SIZE\"; // Count: 5\r\nexport var _DYN_TRIGGER_SEND = \"triggerSend\"; // Count: 5\r\nexport var _DYN_DIAG_LOG = \"diagLog\"; // Count: 16\r\nexport var _DYN_INITIALIZE = \"initialize\"; // Count: 3\r\nexport var _DYN__SENDER = \"_sender\"; // Count: 5\r\nexport var _DYN_CUSTOM_HEADERS = \"customHeaders\"; // Count: 3\r\nexport var _DYN_MAX_BATCH_SIZE_IN_BY1 = \"maxBatchSizeInBytes\"; // Count: 2\r\nexport var _DYN_ONUNLOAD_DISABLE_BEA2 = \"onunloadDisableBeacon\"; // Count: 3\r\nexport var _DYN_IS_BEACON_API_DISABL3 = \"isBeaconApiDisabled\"; // Count: 3\r\nexport var _DYN_ALWAYS_USE_XHR_OVERR4 = \"alwaysUseXhrOverride\"; // Count: 2\r\nexport var _DYN_DISABLE_XHR = \"disableXhr\"; // Count: 3\r\nexport var _DYN_ENABLE_SESSION_STORA5 = \"enableSessionStorageBuffer\"; // Count: 2\r\nexport var _DYN__BUFFER = \"_buffer\"; // Count: 9\r\nexport var _DYN_ONUNLOAD_DISABLE_FET6 = \"onunloadDisableFetch\"; // Count: 2\r\nexport var _DYN_DISABLE_SEND_BEACON_7 = \"disableSendBeaconSplit\"; // Count: 2\r\nexport var _DYN_INSTRUMENTATION_KEY = \"instrumentationKey\"; // Count: 2\r\nexport var _DYN_ENABLE_SEND_PROMISE = \"enableSendPromise\"; // Count: 2\r\nexport var _DYN_GET_SENDER_INST = \"getSenderInst\"; // Count: 4\r\nexport var _DYN_UNLOAD_TRANSPORTS = \"unloadTransports\"; // Count: 2\r\nexport var _DYN_CONVERT_UNDEFINED = \"convertUndefined\"; // Count: 2\r\nexport var _DYN_MAX_BATCH_INTERVAL = \"maxBatchInterval\"; // Count: 2\r\nexport var _DYN_SERIALIZE = \"serialize\"; // Count: 4\r\nexport var _DYN__ON_ERROR = \"_onError\"; // Count: 7\r\nexport var _DYN__ON_PARTIAL_SUCCESS = \"_onPartialSuccess\"; // Count: 3\r\nexport var _DYN__ON_SUCCESS = \"_onSuccess\"; // Count: 6\r\nexport var _DYN_ITEMS_RECEIVED = \"itemsReceived\"; // Count: 3\r\nexport var _DYN_ITEMS_ACCEPTED = \"itemsAccepted\"; // Count: 3\r\nexport var _DYN_ORI_PAYLOAD = \"oriPayload\"; // Count: 3\r\nexport var _DYN_BASE_TYPE = \"baseType\"; // Count: 4\r\nexport var _DYN_SAMPLE_RATE = \"sampleRate\"; // Count: 4\r\nexport var _DYN_EVENTS_SEND_REQUEST = \"eventsSendRequest\"; // Count: 2\r\nexport var _DYN_GET_SAMPLING_SCORE = \"getSamplingScore\"; // Count: 2\r\nexport var _DYN_GET_HASH_CODE_SCORE = \"getHashCodeScore\"; // Count: 4\r\n//# sourceMappingURL=__DynamicConstants.js.map"],"names":[],"mappings":";;;;AAA4D;AAC1B;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Channel, 3.1.3-nightly3.2403-15
2
+ * Application Insights JavaScript SDK - Channel, 3.1.3-nightly3.2404-12
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  export { Sender } from "./Sender";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/applicationinsights-channel-js",
3
- "version": "3.1.3-nightly3.2403-15",
3
+ "version": "3.1.3-nightly3.2404-12",
4
4
  "description": "Microsoft Application Insights JavaScript SDK Channel",
5
5
  "homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
6
6
  "author": "Microsoft Application Insights Team",
@@ -53,8 +53,8 @@
53
53
  "dependencies": {
54
54
  "@microsoft/dynamicproto-js": "^2.0.3",
55
55
  "@microsoft/applicationinsights-shims": "3.0.1",
56
- "@microsoft/applicationinsights-core-js": "3.1.3-nightly3.2403-15",
57
- "@microsoft/applicationinsights-common": "3.1.3-nightly3.2403-15",
56
+ "@microsoft/applicationinsights-core-js": "3.1.3-nightly3.2404-12",
57
+ "@microsoft/applicationinsights-common": "3.1.3-nightly3.2404-12",
58
58
  "@nevware21/ts-utils": ">= 0.11.0 < 2.x",
59
59
  "@nevware21/ts-async": ">= 0.3.0 < 2.x"
60
60
  },
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Microsoft Application Insights JavaScript SDK Channel, 3.1.3-nightly3.2403-15
2
+ * Microsoft Application Insights JavaScript SDK Channel, 3.1.3-nightly3.2404-12
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  *
5
5
  * Microsoft Application Insights Team
@@ -34,28 +34,48 @@ import { SendRequestReason } from '@microsoft/applicationinsights-core-js';
34
34
 
35
35
  declare class ArraySendBuffer extends BaseSendBuffer implements ISendBuffer {
36
36
  constructor(logger: IDiagnosticLogger, config: ISenderConfig);
37
- markAsSent(payload: string[]): void;
38
- clearSent(payload: string[]): void;
37
+ markAsSent(payload: IInternalStorageItem[]): void;
38
+ clearSent(payload: IInternalStorageItem[]): void;
39
39
  }
40
40
 
41
41
  declare abstract class BaseSendBuffer {
42
- protected _get: () => string[];
43
- protected _set: (buffer: string[]) => string[];
42
+ protected _get: () => IInternalStorageItem[];
43
+ protected _set: (buffer: IInternalStorageItem[]) => IInternalStorageItem[];
44
44
  constructor(logger: IDiagnosticLogger, config: ISenderConfig);
45
- enqueue(payload: string): void;
45
+ enqueue(payload: IInternalStorageItem): void;
46
46
  count(): number;
47
47
  size(): number;
48
48
  clear(): void;
49
- getItems(): string[];
50
- batchPayloads(payload: string[]): string;
49
+ getItems(): IInternalStorageItem[];
50
+ batchPayloads(payload: IInternalStorageItem[]): string;
51
51
  createNew(newLogger?: IDiagnosticLogger, newConfig?: ISenderConfig, canUseSessionStorage?: boolean): ArraySendBuffer | SessionStorageSendBuffer;
52
52
  }
53
53
 
54
+ /**
55
+ * Internal interface for sendBuffer, do not export it
56
+ * @internal
57
+ * @since 3.1.3
58
+ */
59
+ declare interface IInternalStorageItem {
60
+ /**
61
+ * serialized telemetry to be stored.
62
+ */
63
+ item: string;
64
+ /**
65
+ * total retry count
66
+ */
67
+ cnt?: number;
68
+ }
69
+
70
+ /**
71
+ * Before 3.1.2, payload only allow string
72
+ * After 3.2.0, IInternalStorageItem is accepted
73
+ */
54
74
  declare interface ISendBuffer {
55
75
  /**
56
76
  * Enqueue the payload
57
77
  */
58
- enqueue: (payload: string) => void;
78
+ enqueue: (payload: IInternalStorageItem) => void;
59
79
  /**
60
80
  * Returns the number of elements in the buffer
61
81
  */
@@ -71,20 +91,20 @@ declare interface ISendBuffer {
71
91
  /**
72
92
  * Returns items stored in the buffer
73
93
  */
74
- getItems: () => string[];
94
+ getItems: () => IInternalStorageItem[];
75
95
  /**
76
96
  * Build a batch of all elements in the payload array
77
97
  */
78
- batchPayloads: (payload: string[]) => string;
98
+ batchPayloads: (payload: IInternalStorageItem[]) => string;
79
99
  /**
80
100
  * Moves items to the SENT_BUFFER.
81
101
  * The buffer holds items which were sent, but we haven't received any response from the backend yet.
82
102
  */
83
- markAsSent: (payload: string[]) => void;
103
+ markAsSent: (payload: IInternalStorageItem[]) => void;
84
104
  /**
85
105
  * Removes items from the SENT_BUFFER. Should be called on successful response from the backend.
86
106
  */
87
- clearSent: (payload: string[]) => void;
107
+ clearSent: (payload: IInternalStorageItem[]) => void;
88
108
  /**
89
109
  * Copy current buffer items to a new buffer.
90
110
  * if canUseSessionStorage is undefined, it will set to false.
@@ -213,6 +233,14 @@ export declare interface ISenderConfig {
213
233
  * @since 3.1.1
214
234
  */
215
235
  retryCodes?: number[];
236
+ /**
237
+ * (Optional) The specific max retry count for each telemetry item.
238
+ * Default: 10
239
+ * if it is set to 0, means no retry allowed
240
+ * if it is set to undefined, means no limit for retry times
241
+ * @since 3.2.0
242
+ */
243
+ maxRetryCnt?: number;
216
244
  }
217
245
 
218
246
  export declare class Sender extends BaseTelemetryPlugin implements IChannelControls {
@@ -275,8 +303,9 @@ export declare class Sender extends BaseTelemetryPlugin implements IChannelContr
275
303
  /**
276
304
  * xhr state changes
277
305
  * @deprecated
306
+ * since version 3.2.0, if the payload is string[], this function is no-op (string[] is only used for backwards Compatibility)
278
307
  */
279
- _xhrReadyStateChange(xhr: XMLHttpRequest, payload: string[], countOfItemsInPayload: number): void;
308
+ _xhrReadyStateChange(xhr: XMLHttpRequest, payload: string[] | IInternalStorageItem[], countOfItemsInPayload: number): void;
280
309
  /**
281
310
  * Trigger the immediate send of buffered data; If executing asynchronously (the default) this may (not required) return
282
311
  * an [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html) that will resolve once the
@@ -291,21 +320,28 @@ export declare class Sender extends BaseTelemetryPlugin implements IChannelContr
291
320
  triggerSend(async?: boolean, forcedSender?: SenderFunction, sendReason?: SendRequestReason): void | IPromise<boolean>;
292
321
  /**
293
322
  * error handler
323
+ * @Internal
324
+ * since version 3.2.0, if the payload is string[], this function is no-op (string[] is only used for backwards Compatibility)
294
325
  */
295
- _onError(payload: string[], message: string, event?: ErrorEvent): void;
326
+ _onError(payload: string[] | IInternalStorageItem[], message: string, event?: ErrorEvent): void;
296
327
  /**
297
328
  * partial success handler
329
+ * @Internal
330
+ * since version 3.2.0, if the payload is string[], this function is no-op (string[] is only used for backwards Compatibility)
298
331
  */
299
- _onPartialSuccess(payload: string[], results: IBackendResponse): void;
332
+ _onPartialSuccess(payload: string[] | IInternalStorageItem[], results: IBackendResponse): void;
300
333
  /**
301
334
  * success handler
335
+ * @Internal
336
+ * since version 3.2.0, if the payload is string[], this function is no-op (string[] is only used for backwards Compatibility)
302
337
  */
303
- _onSuccess(payload: string[], countOfItemsInPayload: number): void;
338
+ _onSuccess(payload: string[] | IInternalStorageItem[], countOfItemsInPayload: number): void;
304
339
  /**
305
340
  * xdr state changes
306
341
  * @deprecated
342
+ * since version 3.2.0, if the payload is string[], this function is no-op (string[] is only used for backwards Compatibility)
307
343
  */
308
- _xdrOnLoad(xdr: IXDomainRequest, payload: string[]): void;
344
+ _xdrOnLoad(xdr: IXDomainRequest, payload: string[] | IInternalStorageItem[]): void;
309
345
  /**
310
346
  * Add header to request
311
347
  * @param name - Header name.
@@ -324,17 +360,18 @@ export declare class Sender extends BaseTelemetryPlugin implements IChannelContr
324
360
  getOfflineSupport(): IInternalOfflineSupport;
325
361
  }
326
362
 
327
- declare type SenderFunction = (payload: string[], isAsync: boolean) => void | IPromise<boolean>;
363
+ declare type SenderFunction = (payload: string[] | IInternalStorageItem[], isAsync: boolean) => void | IPromise<boolean>;
328
364
 
329
365
  declare class SessionStorageSendBuffer extends BaseSendBuffer implements ISendBuffer {
366
+ static VERSION: string;
330
367
  static BUFFER_KEY: string;
331
368
  static SENT_BUFFER_KEY: string;
332
369
  static MAX_BUFFER_SIZE: number;
333
370
  constructor(logger: IDiagnosticLogger, config: ISenderConfig);
334
- enqueue(payload: string): void;
371
+ enqueue(payload: IInternalStorageItem): void;
335
372
  clear(): void;
336
- markAsSent(payload: string[]): void;
337
- clearSent(payload: string[]): void;
373
+ markAsSent(payload: IInternalStorageItem[]): void;
374
+ clearSent(payload: IInternalStorageItem[]): void;
338
375
  createNew(newLogger?: IDiagnosticLogger, newConfig?: ISenderConfig, canUseSessionStorage?: boolean): ArraySendBuffer | SessionStorageSendBuffer;
339
376
  }
340
377
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Microsoft Application Insights JavaScript SDK Channel, 3.1.3-nightly3.2403-15
2
+ * Microsoft Application Insights JavaScript SDK Channel, 3.1.3-nightly3.2404-12
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  *
5
5
  * Microsoft Application Insights Team
@@ -9,20 +9,20 @@
9
9
  declare namespace ApplicationInsights {
10
10
  class ArraySendBuffer extends BaseSendBuffer implements ISendBuffer {
11
11
  constructor(logger: IDiagnosticLogger, config: ISenderConfig);
12
- markAsSent(payload: string[]): void;
13
- clearSent(payload: string[]): void;
12
+ markAsSent(payload: IInternalStorageItem[]): void;
13
+ clearSent(payload: IInternalStorageItem[]): void;
14
14
  }
15
15
 
16
16
  abstract class BaseSendBuffer {
17
- protected _get: () => string[];
18
- protected _set: (buffer: string[]) => string[];
17
+ protected _get: () => IInternalStorageItem[];
18
+ protected _set: (buffer: IInternalStorageItem[]) => IInternalStorageItem[];
19
19
  constructor(logger: IDiagnosticLogger, config: ISenderConfig);
20
- enqueue(payload: string): void;
20
+ enqueue(payload: IInternalStorageItem): void;
21
21
  count(): number;
22
22
  size(): number;
23
23
  clear(): void;
24
- getItems(): string[];
25
- batchPayloads(payload: string[]): string;
24
+ getItems(): IInternalStorageItem[];
25
+ batchPayloads(payload: IInternalStorageItem[]): string;
26
26
  createNew(newLogger?: IDiagnosticLogger, newConfig?: ISenderConfig, canUseSessionStorage?: boolean): ArraySendBuffer | SessionStorageSendBuffer;
27
27
  }
28
28
 
@@ -1439,6 +1439,22 @@ declare namespace ApplicationInsights {
1439
1439
  shouldProcess?: (evt: ITelemetryItem) => boolean;
1440
1440
  }
1441
1441
 
1442
+ /**
1443
+ * Internal interface for sendBuffer, do not export it
1444
+ * @internal
1445
+ * @since 3.1.3
1446
+ */
1447
+ interface IInternalStorageItem {
1448
+ /**
1449
+ * serialized telemetry to be stored.
1450
+ */
1451
+ item: string;
1452
+ /**
1453
+ * total retry count
1454
+ */
1455
+ cnt?: number;
1456
+ }
1457
+
1442
1458
  /**
1443
1459
  * An alternate interface which provides automatic removal during unloading of the component
1444
1460
  */
@@ -2002,33 +2018,6 @@ declare namespace ApplicationInsights {
2002
2018
  * ```
2003
2019
  */
2004
2020
  finally(onfinally?: FinallyPromiseHandler): IPromise<T>;
2005
- /**
2006
- * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
2007
- * resolved value cannot be modified from the callback.
2008
- * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
2009
- * @returns A Promise for the completion of the callback.
2010
- * @example
2011
- * ```ts
2012
- * function doFunction() {
2013
- * return createPromise((resolve, reject) => {
2014
- * if (Math.random() > 0.5) {
2015
- * resolve('Function has completed');
2016
- * } else {
2017
- * reject(new Error('Function failed to process'));
2018
- * }
2019
- * });
2020
- * }
2021
- *
2022
- * doFunction().then((data) => {
2023
- * console.log(data);
2024
- * }).catch((err) => {
2025
- * console.error(err);
2026
- * }).finally(() => {
2027
- * console.log('Function processing completed');
2028
- * });
2029
- * ```
2030
- */
2031
- finally(onFinally?: FinallyPromiseHandler): Promise<T>;
2032
2021
  }
2033
2022
 
2034
2023
  interface IRequestContext {
@@ -2052,11 +2041,15 @@ declare namespace ApplicationInsights {
2052
2041
  isSampledIn(envelope: ITelemetryItem): boolean;
2053
2042
  }
2054
2043
 
2044
+ /**
2045
+ * Before 3.1.2, payload only allow string
2046
+ * After 3.2.0, IInternalStorageItem is accepted
2047
+ */
2055
2048
  interface ISendBuffer {
2056
2049
  /**
2057
2050
  * Enqueue the payload
2058
2051
  */
2059
- enqueue: (payload: string) => void;
2052
+ enqueue: (payload: IInternalStorageItem) => void;
2060
2053
  /**
2061
2054
  * Returns the number of elements in the buffer
2062
2055
  */
@@ -2072,20 +2065,20 @@ declare namespace ApplicationInsights {
2072
2065
  /**
2073
2066
  * Returns items stored in the buffer
2074
2067
  */
2075
- getItems: () => string[];
2068
+ getItems: () => IInternalStorageItem[];
2076
2069
  /**
2077
2070
  * Build a batch of all elements in the payload array
2078
2071
  */
2079
- batchPayloads: (payload: string[]) => string;
2072
+ batchPayloads: (payload: IInternalStorageItem[]) => string;
2080
2073
  /**
2081
2074
  * Moves items to the SENT_BUFFER.
2082
2075
  * The buffer holds items which were sent, but we haven't received any response from the backend yet.
2083
2076
  */
2084
- markAsSent: (payload: string[]) => void;
2077
+ markAsSent: (payload: IInternalStorageItem[]) => void;
2085
2078
  /**
2086
2079
  * Removes items from the SENT_BUFFER. Should be called on successful response from the backend.
2087
2080
  */
2088
- clearSent: (payload: string[]) => void;
2081
+ clearSent: (payload: IInternalStorageItem[]) => void;
2089
2082
  /**
2090
2083
  * Copy current buffer items to a new buffer.
2091
2084
  * if canUseSessionStorage is undefined, it will set to false.
@@ -2214,6 +2207,14 @@ declare namespace ApplicationInsights {
2214
2207
  * @since 3.1.1
2215
2208
  */
2216
2209
  retryCodes?: number[];
2210
+ /**
2211
+ * (Optional) The specific max retry count for each telemetry item.
2212
+ * Default: 10
2213
+ * if it is set to 0, means no retry allowed
2214
+ * if it is set to undefined, means no limit for retry times
2215
+ * @since 3.2.0
2216
+ */
2217
+ maxRetryCnt?: number;
2217
2218
  }
2218
2219
 
2219
2220
  interface ISerializable {
@@ -2715,8 +2716,9 @@ declare namespace ApplicationInsights {
2715
2716
  /**
2716
2717
  * xhr state changes
2717
2718
  * @deprecated
2719
+ * since version 3.2.0, if the payload is string[], this function is no-op (string[] is only used for backwards Compatibility)
2718
2720
  */
2719
- _xhrReadyStateChange(xhr: XMLHttpRequest, payload: string[], countOfItemsInPayload: number): void;
2721
+ _xhrReadyStateChange(xhr: XMLHttpRequest, payload: string[] | IInternalStorageItem[], countOfItemsInPayload: number): void;
2720
2722
  /**
2721
2723
  * Trigger the immediate send of buffered data; If executing asynchronously (the default) this may (not required) return
2722
2724
  * an [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html) that will resolve once the
@@ -2731,21 +2733,28 @@ declare namespace ApplicationInsights {
2731
2733
  triggerSend(async?: boolean, forcedSender?: SenderFunction, sendReason?: SendRequestReason): void | IPromise<boolean>;
2732
2734
  /**
2733
2735
  * error handler
2736
+ * @Internal
2737
+ * since version 3.2.0, if the payload is string[], this function is no-op (string[] is only used for backwards Compatibility)
2734
2738
  */
2735
- _onError(payload: string[], message: string, event?: ErrorEvent): void;
2739
+ _onError(payload: string[] | IInternalStorageItem[], message: string, event?: ErrorEvent): void;
2736
2740
  /**
2737
2741
  * partial success handler
2742
+ * @Internal
2743
+ * since version 3.2.0, if the payload is string[], this function is no-op (string[] is only used for backwards Compatibility)
2738
2744
  */
2739
- _onPartialSuccess(payload: string[], results: IBackendResponse): void;
2745
+ _onPartialSuccess(payload: string[] | IInternalStorageItem[], results: IBackendResponse): void;
2740
2746
  /**
2741
2747
  * success handler
2748
+ * @Internal
2749
+ * since version 3.2.0, if the payload is string[], this function is no-op (string[] is only used for backwards Compatibility)
2742
2750
  */
2743
- _onSuccess(payload: string[], countOfItemsInPayload: number): void;
2751
+ _onSuccess(payload: string[] | IInternalStorageItem[], countOfItemsInPayload: number): void;
2744
2752
  /**
2745
2753
  * xdr state changes
2746
2754
  * @deprecated
2755
+ * since version 3.2.0, if the payload is string[], this function is no-op (string[] is only used for backwards Compatibility)
2747
2756
  */
2748
- _xdrOnLoad(xdr: IXDomainRequest, payload: string[]): void;
2757
+ _xdrOnLoad(xdr: IXDomainRequest, payload: string[] | IInternalStorageItem[]): void;
2749
2758
  /**
2750
2759
  * Add header to request
2751
2760
  * @param name - Header name.
@@ -2764,7 +2773,7 @@ declare namespace ApplicationInsights {
2764
2773
  getOfflineSupport(): IInternalOfflineSupport;
2765
2774
  }
2766
2775
 
2767
- type SenderFunction = (payload: string[], isAsync: boolean) => void | IPromise<boolean>;
2776
+ type SenderFunction = (payload: string[] | IInternalStorageItem[], isAsync: boolean) => void | IPromise<boolean>;
2768
2777
 
2769
2778
  /**
2770
2779
  * SendPOSTFunction type defines how an HTTP POST request is sent to an ingestion server
@@ -2821,14 +2830,15 @@ declare namespace ApplicationInsights {
2821
2830
  }
2822
2831
 
2823
2832
  class SessionStorageSendBuffer extends BaseSendBuffer implements ISendBuffer {
2833
+ static VERSION: string;
2824
2834
  static BUFFER_KEY: string;
2825
2835
  static SENT_BUFFER_KEY: string;
2826
2836
  static MAX_BUFFER_SIZE: number;
2827
2837
  constructor(logger: IDiagnosticLogger, config: ISenderConfig);
2828
- enqueue(payload: string): void;
2838
+ enqueue(payload: IInternalStorageItem): void;
2829
2839
  clear(): void;
2830
- markAsSent(payload: string[]): void;
2831
- clearSent(payload: string[]): void;
2840
+ markAsSent(payload: IInternalStorageItem[]): void;
2841
+ clearSent(payload: IInternalStorageItem[]): void;
2832
2842
  createNew(newLogger?: IDiagnosticLogger, newConfig?: ISenderConfig, canUseSessionStorage?: boolean): ArraySendBuffer | SessionStorageSendBuffer;
2833
2843
  }
2834
2844