@microsoft/applicationinsights-offlinechannel-js 0.2.2-nightly3.2405-28 → 0.2.2-nightly3.2405-29

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 (29) hide show
  1. package/dist/es5/applicationinsights-offlinechannel-js.js +153 -122
  2. package/dist/es5/applicationinsights-offlinechannel-js.js.map +1 -1
  3. package/dist/es5/applicationinsights-offlinechannel-js.min.js +2 -2
  4. package/dist/es5/applicationinsights-offlinechannel-js.min.js.map +1 -1
  5. package/dist-es5/Helpers/Utils.js +1 -1
  6. package/dist-es5/InMemoryBatch.js +1 -1
  7. package/dist-es5/Interfaces/IInMemoryBatch.js +1 -1
  8. package/dist-es5/Interfaces/IOfflineBatch.js +18 -2
  9. package/dist-es5/Interfaces/IOfflineBatch.js.map +1 -1
  10. package/dist-es5/Interfaces/IOfflineIndexDb.js +1 -1
  11. package/dist-es5/Interfaces/IOfflineProvider.js +7 -2
  12. package/dist-es5/Interfaces/IOfflineProvider.js.map +1 -1
  13. package/dist-es5/Interfaces/ISender.js +1 -1
  14. package/dist-es5/OfflineBatchHandler.js +3 -3
  15. package/dist-es5/OfflineBatchHandler.js.map +1 -1
  16. package/dist-es5/OfflineChannel.js +9 -4
  17. package/dist-es5/OfflineChannel.js.map +1 -1
  18. package/dist-es5/PayloadHelper.js +1 -1
  19. package/dist-es5/Providers/IndexDbHelper.js +1 -1
  20. package/dist-es5/Providers/IndexDbProvider.js +1 -1
  21. package/dist-es5/Providers/WebStorageProvider.js +1 -1
  22. package/dist-es5/Sender.js +1 -1
  23. package/dist-es5/__DynamicConstants.js +2 -1
  24. package/dist-es5/__DynamicConstants.js.map +1 -1
  25. package/dist-es5/applicationinsights-offlinechannel-js.js +3 -1
  26. package/dist-es5/applicationinsights-offlinechannel-js.js.map +1 -1
  27. package/package.json +3 -3
  28. package/types/applicationinsights-offlinechannel-js.d.ts +22 -1
  29. package/types/applicationinsights-offlinechannel-js.namespaced.d.ts +21 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/applicationinsights-offlinechannel-js",
3
- "version": "0.2.2-nightly3.2405-28",
3
+ "version": "0.2.2-nightly3.2405-29",
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.2.2-nightly3.2405-28",
32
- "@microsoft/applicationinsights-common": "3.2.2-nightly3.2405-28",
31
+ "@microsoft/applicationinsights-core-js": "3.2.2-nightly3.2405-29",
32
+ "@microsoft/applicationinsights-common": "3.2.2-nightly3.2405-29",
33
33
  "@nevware21/ts-utils": ">= 0.11.1 < 2.x",
34
34
  "@nevware21/ts-async": ">= 0.5.1 < 2.x"
35
35
  },
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Microsoft Application Insights JavaScript SDK Offline Channel, 0.2.2-nightly3.2405-28
2
+ * Microsoft Application Insights JavaScript SDK Offline Channel, 0.2.2-nightly3.2405-29
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  *
5
5
  * Microsoft Application Insights Team
@@ -13,6 +13,7 @@
13
13
  */
14
14
 
15
15
  import { BaseTelemetryPlugin } from '@microsoft/applicationinsights-core-js';
16
+ import { EnumValue } from '@microsoft/applicationinsights-core-js';
16
17
  import { EventPersistence } from '@microsoft/applicationinsights-common';
17
18
  import { IAppInsightsCore } from '@microsoft/applicationinsights-core-js';
18
19
  import { IChannelControls } from '@microsoft/applicationinsights-core-js';
@@ -33,6 +34,14 @@ import { IUnloadHookContainer } from '@microsoft/applicationinsights-core-js';
33
34
  import { IXHROverride } from '@microsoft/applicationinsights-core-js';
34
35
  import { SendRequestReason } from '@microsoft/applicationinsights-core-js';
35
36
 
37
+ export declare const BatchSendStatus: EnumValue<typeof eBatchSendStatus>;
38
+
39
+ export declare type BatchSendStatus = number | eBatchSendStatus;
40
+
41
+ export declare const BatchStoreStatus: EnumValue<typeof eBatchStoreStatus>;
42
+
43
+ export declare type BatchStoreStatus = number | eBatchStoreStatus;
44
+
36
45
  export declare type createDefaultOfflineDetector = (cfg?: IOfflineDetectorCfg) => IOfflineDetector;
37
46
 
38
47
  export declare type createNoopOfflineDetector = (cfg?: IOfflineDetectorCfg) => IOfflineDetector;
@@ -507,6 +516,10 @@ export declare class OfflineChannel extends BaseTelemetryPlugin implements IChan
507
516
  * Will not flush if the Send has been paused.
508
517
  */
509
518
  onunloadFlush(): void;
519
+ /**
520
+ * Flush the next stored event batch
521
+ */
522
+ sendNextBatch(): void;
510
523
  }
511
524
 
512
525
  export declare class Sender {
@@ -550,6 +563,14 @@ export declare class Sender {
550
563
 
551
564
  declare type SenderFunction = (payload: string[], isAsync: boolean) => void | IPromise<boolean>;
552
565
 
566
+ export declare const StorageProviders: EnumValue<typeof eStorageProviders>;
567
+
568
+ export declare type StorageProviders = number | eStorageProviders;
569
+
570
+ export declare const StorageType: EnumValue<typeof eStorageType>;
571
+
572
+ export declare type StorageType = number | eStorageType;
573
+
553
574
  /**
554
575
  * Class that implements storing of events using the WebStorage Api ((window||globalThis||self).localstorage, (window||globalThis||self).sessionStorage).
555
576
  */
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Microsoft Application Insights JavaScript SDK Offline Channel, 0.2.2-nightly3.2405-28
2
+ * Microsoft Application Insights JavaScript SDK Offline Channel, 0.2.2-nightly3.2405-29
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  *
5
5
  * Microsoft Application Insights Team
@@ -106,6 +106,14 @@ declare namespace ApplicationInsights {
106
106
  protected _addHook(hooks: IUnloadHook | IUnloadHook[] | Iterator<IUnloadHook> | ILegacyUnloadHook | ILegacyUnloadHook[] | Iterator<ILegacyUnloadHook>): void;
107
107
  }
108
108
 
109
+ const BatchSendStatus: EnumValue<typeof eBatchSendStatus>;
110
+
111
+ type BatchSendStatus = number | eBatchSendStatus;
112
+
113
+ const BatchStoreStatus: EnumValue<typeof eBatchStoreStatus>;
114
+
115
+ type BatchStoreStatus = number | eBatchStoreStatus;
116
+
109
117
  type createDefaultOfflineDetector = (cfg?: IOfflineDetectorCfg) => IOfflineDetector;
110
118
 
111
119
  type createNoopOfflineDetector = (cfg?: IOfflineDetectorCfg) => IOfflineDetector;
@@ -2872,6 +2880,10 @@ declare namespace ApplicationInsights {
2872
2880
  * Will not flush if the Send has been paused.
2873
2881
  */
2874
2882
  onunloadFlush(): void;
2883
+ /**
2884
+ * Flush the next stored event batch
2885
+ */
2886
+ sendNextBatch(): void;
2875
2887
  }
2876
2888
 
2877
2889
  type OnCompleteCallback = (status: number, headers: {
@@ -2987,6 +2999,14 @@ declare namespace ApplicationInsights {
2987
2999
  MaxQueuedEvents = 20
2988
3000
  }
2989
3001
 
3002
+ const StorageProviders: EnumValue<typeof eStorageProviders>;
3003
+
3004
+ type StorageProviders = number | eStorageProviders;
3005
+
3006
+ const StorageType: EnumValue<typeof eStorageType>;
3007
+
3008
+ type StorageType = number | eStorageType;
3009
+
2990
3010
  interface Tags {
2991
3011
  [key: string]: any;
2992
3012
  }