@microsoft/applicationinsights-offlinechannel-js 0.1.1-nightly3.2402-20 → 0.1.1-nightly3.2403-01

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 (31) hide show
  1. package/README.md +1 -1
  2. package/dist/es5/applicationinsights-offlinechannel-js.js +1506 -1382
  3. package/dist/es5/applicationinsights-offlinechannel-js.js.map +1 -1
  4. package/dist/es5/applicationinsights-offlinechannel-js.min.js +2 -2
  5. package/dist/es5/applicationinsights-offlinechannel-js.min.js.map +1 -1
  6. package/dist-es5/Helpers/Utils.js +79 -3
  7. package/dist-es5/Helpers/Utils.js.map +1 -1
  8. package/dist-es5/InMemoryBatch.js +3 -3
  9. package/dist-es5/InMemoryBatch.js.map +1 -1
  10. package/dist-es5/Interfaces/IInMemoryBatch.js +1 -1
  11. package/dist-es5/Interfaces/IOfflineBatch.js +1 -1
  12. package/dist-es5/Interfaces/IOfflineIndexDb.js +1 -1
  13. package/dist-es5/Interfaces/IOfflineProvider.js +1 -1
  14. package/dist-es5/Interfaces/ISender.js +1 -1
  15. package/dist-es5/OfflineBatchHandler.js +3 -3
  16. package/dist-es5/OfflineBatchHandler.js.map +1 -1
  17. package/dist-es5/OfflineChannel.js +107 -39
  18. package/dist-es5/OfflineChannel.js.map +1 -1
  19. package/dist-es5/PayloadHelper.js +1 -1
  20. package/dist-es5/Providers/IndexDbHelper.js +1 -1
  21. package/dist-es5/Providers/IndexDbProvider.js +18 -12
  22. package/dist-es5/Providers/IndexDbProvider.js.map +1 -1
  23. package/dist-es5/Providers/WebStorageProvider.js +35 -33
  24. package/dist-es5/Providers/WebStorageProvider.js.map +1 -1
  25. package/dist-es5/Sender.js +1 -1
  26. package/dist-es5/__DynamicConstants.js +16 -13
  27. package/dist-es5/__DynamicConstants.js.map +1 -1
  28. package/dist-es5/applicationinsights-offlinechannel-js.js +1 -1
  29. package/package.json +3 -3
  30. package/types/applicationinsights-offlinechannel-js.d.ts +8 -4
  31. package/types/applicationinsights-offlinechannel-js.namespaced.d.ts +45 -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_ENDPOINT = \"endpoint\"; // Count: 4\r\nexport var _DYN_ADD_EVENT = \"addEvent\"; // Count: 8\r\nexport var _DYN_COUNT = \"count\"; // Count: 5\r\nexport var _DYN_PUSH = \"push\"; // Count: 18\r\nexport var _DYN_LENGTH = \"length\"; // Count: 49\r\nexport var _DYN_GET_ITEMS = \"getItems\"; // Count: 3\r\nexport var _DYN_SPLIT = \"split\"; // Count: 5\r\nexport var _DYN_SPLICE = \"splice\"; // Count: 4\r\nexport var _DYN_INITIALIZE = \"initialize\"; // Count: 10\r\nexport var _DYN_DIAG_LOG = \"diagLog\"; // Count: 6\r\nexport var _DYN_ITEM_CTX = \"itemCtx\"; // Count: 4\r\nexport var _DYN_STORAGE_CONFIG = \"storageConfig\"; // Count: 4\r\nexport var _DYN_VALUE = \"value\"; // Count: 13\r\nexport var _DYN_REASON = \"reason\"; // Count: 5\r\nexport var _DYN_REJECTED = \"rejected\"; // Count: 7\r\nexport var _DYN_GET_NEXT_BATCH = \"getNextBatch\"; // Count: 5\r\nexport var _DYN_REMOVE_EVENTS = \"removeEvents\"; // Count: 3\r\nexport var _DYN_DATA = \"data\"; // Count: 14\r\nexport var _DYN_SEND_POST = \"sendPOST\"; // Count: 4\r\nexport var _DYN_ATTEMP_CNT = \"attempCnt\"; // Count: 4\r\nexport var _DYN_STATE = \"state\"; // Count: 8\r\nexport var _DYN_TEARDOWN = \"teardown\"; // Count: 5\r\nexport var _DYN_IS_ARR = \"isArr\"; // Count: 5\r\nexport var _DYN_INDEX_OF = \"indexOf\"; // Count: 9\r\nexport var _DYN_IS_ONLINE = \"isOnline\"; // Count: 3\r\nexport var _DYN_CANCEL = \"cancel\"; // Count: 5\r\nexport var _DYN_REFRESH = \"refresh\"; // Count: 5\r\nexport var _DYN_PROCESS_NEXT = \"processNext\"; // Count: 3\r\nexport var _DYN_PERSISTENCE = \"persistence\"; // Count: 5\r\nexport var _DYN_MIN_PERSISTENCE_CACH0 = \"minPersistenceCacheLevel\"; // Count: 2\r\nexport var _DYN_IS_COMPLETELY_IDLE = \"isCompletelyIdle\"; // Count: 5\r\nexport var _DYN_CRITICAL_CNT = \"criticalCnt\"; // Count: 7\r\nexport var _DYN_GET_OFFLINE_SUPPORT = \"getOfflineSupport\"; // Count: 2\r\nexport var _DYN_OVERRIDE_INSTRUMENTA1 = \"overrideInstrumentationKey\"; // Count: 2\r\nexport var _DYN_INSTRUMENTATION_KEY = \"instrumentationKey\"; // Count: 3\r\nexport var _DYN_TO_STRING = \"toString\"; // Count: 5\r\nexport var _DYN_URL_STRING = \"urlString\"; // Count: 4\r\nexport var _DYN_SET_REQUEST_HEADER = \"setRequestHeader\"; // Count: 2\r\nexport var _DYN_STATUS = \"status\"; // Count: 4\r\nexport var _DYN_ONERROR = \"onerror\"; // Count: 11\r\nexport var _DYN_REPLACE = \"replace\"; // Count: 4\r\nexport var _DYN_CHAR_CODE_AT = \"charCodeAt\"; // Count: 3\r\nexport var _DYN_CHAR_AT = \"charAt\"; // Count: 8\r\nexport var _DYN_FROM_CHAR_CODE = \"fromCharCode\"; // Count: 3\r\nexport var _DYN_GET_TIME = \"getTime\"; // Count: 4\r\nexport var _DYN_NAME = \"name\"; // Count: 7\r\nexport var _DYN_DB_HDL = \"dbHdl\"; // Count: 7\r\nexport var _DYN_IS_AVAILABLE = \"isAvailable\"; // Count: 8\r\nexport var _DYN_TRANSACTION = \"transaction\"; // Count: 5\r\nexport var _DYN_OPEN_STORE = \"openStore\"; // Count: 3\r\nexport var _DYN_OPEN_CURSOR = \"openCursor\"; // Count: 3\r\nexport var _DYN_DB_NAME = \"dbName\"; // Count: 5\r\nexport var _DYN_REMOVE = \"remove\"; // Count: 4\r\nexport var _DYN_ONSUCCESS = \"onsuccess\"; // Count: 7\r\nexport var _DYN_THEN = \"then\"; // Count: 12\r\nexport var _DYN_KEY_RANGE = \"keyRange\"; // Count: 3\r\nexport var _DYN_CONTINUE = \"continue\"; // Count: 7\r\nexport var _DYN_SUBSTRING = \"substring\"; // Count: 3\r\nexport var _DYN_STORAGE_KEY_PREFIX = \"storageKeyPrefix\"; // Count: 2\r\nexport var _DYN_IN_STORAGE_MAX_TIME = \"inStorageMaxTime\"; // Count: 2\r\nexport var _DYN_MAX_STORAGE_SIZE_IN_2 = \"maxStorageSizeInBytes\"; // Count: 2\r\nexport var _DYN__EVENTS_TO_DROP_PER_3 = \"EventsToDropPerTime\"; // Count: 2\r\nexport var _DYN_MAX_CRITICAL_EVTS_DR4 = \"maxCriticalEvtsDropCnt\"; // Count: 2\r\nexport var _DYN_SUPPORTS_SYNC_REQUES5 = \"supportsSyncRequests\"; // Count: 2\r\nexport var _DYN_REMOVE_ITEM = \"removeItem\"; // Count: 3\r\nexport var _DYN_EVTS = \"evts\"; // Count: 6\r\nexport var _DYN_LAST_ACCESS_TIME = \"lastAccessTime\"; // Count: 3\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;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_ENDPOINT = \"endpoint\"; // Count: 4\r\nexport var _DYN_ADD_EVENT = \"addEvent\"; // Count: 8\r\nexport var _DYN_COUNT = \"count\"; // Count: 5\r\nexport var _DYN_PUSH = \"push\"; // Count: 18\r\nexport var _DYN_LENGTH = \"length\"; // Count: 52\r\nexport var _DYN_CLEAR = \"clear\"; // Count: 5\r\nexport var _DYN_GET_ITEMS = \"getItems\"; // Count: 4\r\nexport var _DYN_SPLIT = \"split\"; // Count: 5\r\nexport var _DYN_SPLICE = \"splice\"; // Count: 4\r\nexport var _DYN_INITIALIZE = \"initialize\"; // Count: 10\r\nexport var _DYN_DIAG_LOG = \"diagLog\"; // Count: 6\r\nexport var _DYN_ITEM_CTX = \"itemCtx\"; // Count: 4\r\nexport var _DYN_STORAGE_CONFIG = \"storageConfig\"; // Count: 4\r\nexport var _DYN_VALUE = \"value\"; // Count: 13\r\nexport var _DYN_REASON = \"reason\"; // Count: 5\r\nexport var _DYN_REJECTED = \"rejected\"; // Count: 7\r\nexport var _DYN_GET_NEXT_BATCH = \"getNextBatch\"; // Count: 5\r\nexport var _DYN_REMOVE_EVENTS = \"removeEvents\"; // Count: 3\r\nexport var _DYN_DATA = \"data\"; // Count: 16\r\nexport var _DYN_SEND_POST = \"sendPOST\"; // Count: 4\r\nexport var _DYN_ATTEMP_CNT = \"attempCnt\"; // Count: 4\r\nexport var _DYN_STATE = \"state\"; // Count: 9\r\nexport var _DYN_TEARDOWN = \"teardown\"; // Count: 6\r\nexport var _DYN_IS_ARR = \"isArr\"; // Count: 5\r\nexport var _DYN_INDEX_OF = \"indexOf\"; // Count: 9\r\nexport var _DYN_IS_ONLINE = \"isOnline\"; // Count: 3\r\nexport var _DYN_CANCEL = \"cancel\"; // Count: 5\r\nexport var _DYN_PROCESS_NEXT = \"processNext\"; // Count: 3\r\nexport var _DYN_PERSISTENCE = \"persistence\"; // Count: 8\r\nexport var _DYN_ONUNLOAD_FLUSH = \"onunloadFlush\"; // Count: 3\r\nexport var _DYN_BATCH_HANDLER = \"batchHandler\"; // Count: 3\r\nexport var _DYN_MIN_PERSISTENCE_CACH0 = \"minPersistenceCacheLevel\"; // Count: 2\r\nexport var _DYN_REFRESH = \"refresh\"; // Count: 4\r\nexport var _DYN_IS_COMPLETELY_IDLE = \"isCompletelyIdle\"; // Count: 5\r\nexport var _DYN_CRITICAL_CNT = \"criticalCnt\"; // Count: 7\r\nexport var _DYN_GET_OFFLINE_SUPPORT = \"getOfflineSupport\"; // Count: 2\r\nexport var _DYN_OVERRIDE_INSTRUMENTA1 = \"overrideInstrumentationKey\"; // Count: 2\r\nexport var _DYN_INSTRUMENTATION_KEY = \"instrumentationKey\"; // Count: 3\r\nexport var _DYN_NOTIFICATION_MGR = \"notificationMgr\"; // Count: 3\r\nexport var _DYN_TO_STRING = \"toString\"; // Count: 5\r\nexport var _DYN_URL_STRING = \"urlString\"; // Count: 4\r\nexport var _DYN_SET_REQUEST_HEADER = \"setRequestHeader\"; // Count: 2\r\nexport var _DYN_STATUS = \"status\"; // Count: 4\r\nexport var _DYN_ONERROR = \"onerror\"; // Count: 11\r\nexport var _DYN_REPLACE = \"replace\"; // Count: 4\r\nexport var _DYN_CHAR_CODE_AT = \"charCodeAt\"; // Count: 3\r\nexport var _DYN_CHAR_AT = \"charAt\"; // Count: 8\r\nexport var _DYN_FROM_CHAR_CODE = \"fromCharCode\"; // Count: 3\r\nexport var _DYN_GET_TIME = \"getTime\"; // Count: 5\r\nexport var _DYN_NAME = \"name\"; // Count: 7\r\nexport var _DYN_DB_HDL = \"dbHdl\"; // Count: 7\r\nexport var _DYN_IS_AVAILABLE = \"isAvailable\"; // Count: 8\r\nexport var _DYN_TRANSACTION = \"transaction\"; // Count: 5\r\nexport var _DYN_OPEN_STORE = \"openStore\"; // Count: 3\r\nexport var _DYN_OPEN_CURSOR = \"openCursor\"; // Count: 3\r\nexport var _DYN_DB_NAME = \"dbName\"; // Count: 5\r\nexport var _DYN_REMOVE = \"remove\"; // Count: 4\r\nexport var _DYN_ONSUCCESS = \"onsuccess\"; // Count: 7\r\nexport var _DYN_THEN = \"then\"; // Count: 12\r\nexport var _DYN_KEY_RANGE = \"keyRange\"; // Count: 3\r\nexport var _DYN_CONTINUE = \"continue\"; // Count: 7\r\nexport var _DYN_SUBSTRING = \"substring\"; // Count: 3\r\nexport var _DYN_STORAGE_KEY_PREFIX = \"storageKeyPrefix\"; // Count: 2\r\nexport var _DYN_IN_STORAGE_MAX_TIME = \"inStorageMaxTime\"; // Count: 2\r\nexport var _DYN__EVENTS_TO_DROP_PER_2 = \"EventsToDropPerTime\"; // Count: 2\r\nexport var _DYN_MAX_CRITICAL_EVTS_DR3 = \"maxCriticalEvtsDropCnt\"; // Count: 2\r\nexport var _DYN_SUPPORTS_SYNC_REQUES4 = \"supportsSyncRequests\"; // Count: 2\r\nexport var _DYN_REMOVE_ITEM = \"removeItem\"; // Count: 3\r\nexport var _DYN_EVTS = \"evts\"; // Count: 6\r\nexport var _DYN_LAST_ACCESS_TIME = \"lastAccessTime\"; // Count: 3\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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Offline Channel, 0.1.1-nightly3.2402-20
2
+ * Application Insights JavaScript SDK - Offline Channel, 0.1.1-nightly3.2403-01
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  export { WebStorageProvider } from "./Providers/WebStorageProvider";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/applicationinsights-offlinechannel-js",
3
- "version": "0.1.1-nightly3.2402-20",
3
+ "version": "0.1.1-nightly3.2403-01",
4
4
  "description": "Microsoft Application Insights JavaScript SDK Offline Channel",
5
5
  "homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
6
6
  "author": "Microsoft Application Insights Team",
@@ -28,8 +28,8 @@
28
28
  "dependencies": {
29
29
  "@microsoft/dynamicproto-js": "^2.0.3",
30
30
  "@microsoft/applicationinsights-shims": "3.0.1",
31
- "@microsoft/applicationinsights-core-js": "3.1.1-nightly3.2402-20",
32
- "@microsoft/applicationinsights-common": "3.1.1-nightly3.2402-20",
31
+ "@microsoft/applicationinsights-core-js": "3.1.1-nightly3.2403-01",
32
+ "@microsoft/applicationinsights-common": "3.1.1-nightly3.2403-01",
33
33
  "@nevware21/ts-utils": ">= 0.10.5 < 2.x",
34
34
  "@nevware21/ts-async": ">= 0.3.0 < 2.x"
35
35
  },
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Microsoft Application Insights JavaScript SDK Offline Channel, 0.1.1-nightly3.2402-20
2
+ * Microsoft Application Insights JavaScript SDK Offline Channel, 0.1.1-nightly3.2403-01
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  *
5
5
  * Microsoft Application Insights Team
@@ -19,6 +19,7 @@ import { IChannelControls } from '@microsoft/applicationinsights-core-js';
19
19
  import { IConfig } from '@microsoft/applicationinsights-common';
20
20
  import { IConfiguration } from '@microsoft/applicationinsights-core-js';
21
21
  import { IDiagnosticLogger } from '@microsoft/applicationinsights-core-js';
22
+ import { INotificationManager } from '@microsoft/applicationinsights-core-js';
22
23
  import { IOfflineListener } from '@microsoft/applicationinsights-common';
23
24
  import { IPayloadData } from '@microsoft/applicationinsights-core-js';
24
25
  import { IPlugin } from '@microsoft/applicationinsights-core-js';
@@ -45,8 +46,7 @@ export declare const enum eBatchSendStatus {
45
46
 
46
47
  export declare const enum eBatchStoreStatus {
47
48
  Success = 1,
48
- Failure = 2,
49
- Drop = 3
49
+ Failure = 2
50
50
  }
51
51
 
52
52
  /**
@@ -128,6 +128,10 @@ export declare interface ILocalStorageProviderContext {
128
128
  * Identifies endpoint url.
129
129
  */
130
130
  endpoint?: string;
131
+ /**
132
+ * Identifies Notification Manager
133
+ */
134
+ notificationMgr?: INotificationManager;
131
135
  }
132
136
 
133
137
  /**
@@ -244,7 +248,7 @@ export declare interface IOfflineBatchStoreResponse {
244
248
  */
245
249
  export declare interface IOfflineChannelConfiguration {
246
250
  /**
247
- * [Optional] The max size in bytes that should be used for storing events(default up to 5 Mb).
251
+ * [Optional] The max size in bytes that should be used for storing events(default up to 5 Mb) in local/session storage.
248
252
  * The maximum size in bytes that should be used for storing events in storage If not specified, the system will use up to 5 MB
249
253
  * @default 5000000
250
254
  */
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Microsoft Application Insights JavaScript SDK Offline Channel, 0.1.1-nightly3.2402-20
2
+ * Microsoft Application Insights JavaScript SDK Offline Channel, 0.1.1-nightly3.2403-01
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  *
5
5
  * Microsoft Application Insights Team
@@ -123,8 +123,7 @@ declare namespace ApplicationInsights {
123
123
 
124
124
  const enum eBatchStoreStatus {
125
125
  Success = 1,
126
- Failure = 2,
127
- Drop = 3
126
+ Failure = 2
128
127
  }
129
128
 
130
129
  const enum eDistributedTracingModes {
@@ -1512,6 +1511,10 @@ declare namespace ApplicationInsights {
1512
1511
  * Identifies endpoint url.
1513
1512
  */
1514
1513
  endpoint?: string;
1514
+ /**
1515
+ * Identifies Notification Manager
1516
+ */
1517
+ notificationMgr?: INotificationManager;
1515
1518
  }
1516
1519
 
1517
1520
  /**
@@ -1630,6 +1633,25 @@ declare namespace ApplicationInsights {
1630
1633
  * / Promise to allow any listeners to wait for the operation to complete.
1631
1634
  */
1632
1635
  unload?(isAsync?: boolean): void | IPromise<void>;
1636
+ /**
1637
+ * [Optional] A function called when the offline events have been stored to the persistent storage
1638
+ * @param events - items that are stored in the persistent storage
1639
+ * @since v3.1.1
1640
+ */
1641
+ offlineEventsStored?(events: ITelemetryItem[]): void;
1642
+ /**
1643
+ * [Optional] A function called when the offline events have been sent from the persistent storage
1644
+ * @param batch - payload data that is sent from the persistent storage
1645
+ * @since v3.1.1
1646
+ */
1647
+ offlineBatchSent?(batch: IPayloadData): void;
1648
+ /**
1649
+ * [Optional] A function called when the offline events have been dropped from the persistent storage
1650
+ * @param cnt - count of batches dropped
1651
+ * @param reason - the reason why the batches is dropped
1652
+ * @since v3.1.1
1653
+ */
1654
+ offlineBatchDrop?(cnt: number, reason?: number): void;
1633
1655
  }
1634
1656
 
1635
1657
  /**
@@ -1680,6 +1702,25 @@ declare namespace ApplicationInsights {
1680
1702
  * / Promise to allow any listeners to wait for the operation to complete.
1681
1703
  */
1682
1704
  unload?(isAsync?: boolean): void | IPromise<void>;
1705
+ /**
1706
+ * [Optional] A function called when the offline events have been stored to the persistent storage
1707
+ * @param events - items that are stored in the persistent storage
1708
+ * @since v3.1.1
1709
+ */
1710
+ offlineEventsStored?(events: ITelemetryItem[]): void;
1711
+ /**
1712
+ * [Optional] A function called when the offline events have been sent from the persistent storage
1713
+ * @param batch - payload data that is sent from the persistent storage
1714
+ * @since v3.1.1
1715
+ */
1716
+ offlineBatchSent?(batch: IPayloadData): void;
1717
+ /**
1718
+ * [Optional] A function called when the offline events have been dropped from the persistent storage
1719
+ * @param cnt - count of batches dropped
1720
+ * @param reason - the reason why the batches is dropped
1721
+ * @since v3.1.1
1722
+ */
1723
+ offlineBatchDrop?(cnt: number, reason?: number): void;
1683
1724
  }
1684
1725
 
1685
1726
  class _InternalLogMessage {
@@ -1727,7 +1768,7 @@ declare namespace ApplicationInsights {
1727
1768
  */
1728
1769
  interface IOfflineChannelConfiguration {
1729
1770
  /**
1730
- * [Optional] The max size in bytes that should be used for storing events(default up to 5 Mb).
1771
+ * [Optional] The max size in bytes that should be used for storing events(default up to 5 Mb) in local/session storage.
1731
1772
  * The maximum size in bytes that should be used for storing events in storage If not specified, the system will use up to 5 MB
1732
1773
  * @default 5000000
1733
1774
  */