@microsoft/applicationinsights-offlinechannel-js 0.3.5-nightly3.2411-14 → 0.3.5-nightly3.2412-02

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 (30) hide show
  1. package/dist/es5/applicationinsights-offlinechannel-js.js +3 -3
  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 +7 -7
  6. package/dist-es5/Helpers/Utils.js.map +1 -1
  7. package/dist-es5/InMemoryBatch.js +1 -1
  8. package/dist-es5/InMemoryBatch.js.map +1 -1
  9. package/dist-es5/Interfaces/IInMemoryBatch.js +1 -1
  10. package/dist-es5/Interfaces/IOfflineBatch.js +1 -1
  11. package/dist-es5/Interfaces/IOfflineIndexDb.js +1 -1
  12. package/dist-es5/Interfaces/IOfflineProvider.js +1 -1
  13. package/dist-es5/Interfaces/ISender.js +1 -1
  14. package/dist-es5/OfflineBatchHandler.js +2 -3
  15. package/dist-es5/OfflineBatchHandler.js.map +1 -1
  16. package/dist-es5/OfflineChannel.js +2 -2
  17. package/dist-es5/OfflineChannel.js.map +1 -1
  18. package/dist-es5/PayloadHelper.js +1 -1
  19. package/dist-es5/Providers/IndexDbHelper.js +6 -5
  20. package/dist-es5/Providers/IndexDbHelper.js.map +1 -1
  21. package/dist-es5/Providers/IndexDbProvider.js +2 -3
  22. package/dist-es5/Providers/IndexDbProvider.js.map +1 -1
  23. package/dist-es5/Providers/WebStorageProvider.js +4 -4
  24. package/dist-es5/Providers/WebStorageProvider.js.map +1 -1
  25. package/dist-es5/Sender.js +1 -1
  26. package/dist-es5/__DynamicConstants.js +1 -1
  27. package/dist-es5/applicationinsights-offlinechannel-js.js +1 -1
  28. package/package.json +3 -3
  29. package/types/applicationinsights-offlinechannel-js.d.ts +17 -15
  30. package/types/applicationinsights-offlinechannel-js.namespaced.d.ts +37 -41
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Offline Channel, 0.3.5-nightly3.2411-14
2
+ * Application Insights JavaScript SDK - Offline Channel, 0.3.5-nightly3.2412-02
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  export { BatchSendStatus, BatchStoreStatus, StorageType } from "./Interfaces/IOfflineBatch";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/applicationinsights-offlinechannel-js",
3
- "version": "0.3.5-nightly3.2411-14",
3
+ "version": "0.3.5-nightly3.2412-02",
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.3.5-nightly3.2411-14",
32
- "@microsoft/applicationinsights-common": "3.3.5-nightly3.2411-14",
31
+ "@microsoft/applicationinsights-core-js": "3.3.5-nightly3.2412-02",
32
+ "@microsoft/applicationinsights-common": "3.3.5-nightly3.2412-02",
33
33
  "@nevware21/ts-utils": ">= 0.11.3 < 2.x",
34
34
  "@nevware21/ts-async": ">= 0.5.2 < 2.x"
35
35
  },
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Microsoft Application Insights JavaScript SDK Offline Channel, 0.3.5-nightly3.2411-14
2
+ * Microsoft Application Insights JavaScript SDK Offline Channel, 0.3.5-nightly3.2412-02
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  *
5
5
  * Microsoft Application Insights Team
@@ -102,15 +102,16 @@ export declare interface IInMemoryBatch {
102
102
  /**
103
103
  * Split this batch into 2 with any events > fromEvent returned in the new batch and all other
104
104
  * events are kept in the current batch.
105
- * @param fromEvt The first event to remove from the current batch.
106
- * @param numEvts The number of events to be removed from the current batch and returned in the new one. Defaults to all trailing events
105
+ * @param fromEvt - The first event to remove from the current batch.
106
+
107
+ * @param numEvts - The number of events to be removed from the current batch and returned in the new one. Defaults to all trailing events
107
108
  */
108
109
  split: (fromEvt: number, numEvts?: number) => IInMemoryBatch;
109
110
  /**
110
111
  * create current buffer to a new endpoint with current logger
111
- * @param endpoint new endpoint
112
- * @param evts new events to be added
113
- * @param evtsLimitInMem new evtsLimitInMem
112
+ * @param endpoint - new endpoint
113
+ * @param evts - new events to be added
114
+ * @param evtsLimitInMem - new evtsLimitInMem
114
115
  */
115
116
  createNew(endpoint: string, evts?: IPostTransmissionTelemetryItem[] | ITelemetryItem[], evtsLimitInMem?: number): IInMemoryBatch;
116
117
  }
@@ -154,7 +155,7 @@ export declare class IndexedDbProvider implements IOfflineProvider {
154
155
  constructor(id?: string, unloadHookContainer?: IUnloadHookContainer);
155
156
  /**
156
157
  * Initializes the provider using the config
157
- * @param providerContext The provider context that should be used to initialize the provider
158
+ * @param providerContext - The provider context that should be used to initialize the provider
158
159
  * @returns True if the provider is initialized and available for use otherwise false
159
160
  */
160
161
  initialize(providerContext: ILocalStorageProviderContext): boolean;
@@ -208,15 +209,16 @@ export declare class InMemoryBatch implements IInMemoryBatch {
208
209
  /**
209
210
  * Split this batch into 2 with any events > fromEvent returned in the new batch and all other
210
211
  * events are kept in the current batch.
211
- * @param fromEvt The first event to remove from the current batch.
212
- * @param numEvts The number of events to be removed from the current batch and returned in the new one. Defaults to all trailing events
212
+ * @param fromEvt - The first event to remove from the current batch.
213
+
214
+ * @param numEvts - The number of events to be removed from the current batch and returned in the new one. Defaults to all trailing events
213
215
  */
214
216
  split(fromEvt: number, numEvts?: number): any;
215
217
  /**
216
218
  * create current buffer to a new endpoint
217
- * @param endpoint if not defined, current endpoint will be used
218
- * @param evts new events to be added
219
- * @param addCurEvts if it is set to true, current itemss will be transferred to the new batch
219
+ * @param endpoint - if not defined, current endpoint will be used
220
+ * @param evts - new events to be added
221
+ * @param addCurEvts - if it is set to true, current itemss will be transferred to the new batch
220
222
  */
221
223
  createNew(endpoint: string, evts?: IPostTransmissionTelemetryItem[] | ITelemetryItem[], evtsLimitInMem?: number): any;
222
224
  }
@@ -372,7 +374,7 @@ export declare interface IOfflineDetectorCfg {
372
374
  export declare interface IOfflineProvider {
373
375
  /**
374
376
  * Initializes the provider using the config
375
- * @param providerContext The provider context that should be used to initialize the provider
377
+ * @param providerContext - The provider context that should be used to initialize the provider
376
378
  * @returns True if the provider is initialized and available for use otherwise false
377
379
  */
378
380
  initialize(providerContext: ILocalStorageProviderContext): boolean;
@@ -396,7 +398,7 @@ export declare interface IOfflineProvider {
396
398
  getNextBatch(): IStorageTelemetryItem[] | IPromise<IStorageTelemetryItem[]> | null;
397
399
  /**
398
400
  * Get all stored batches from the storage.
399
- * @param cnt batch numbers if it is defined, it will returns given number of batches.
401
+ * @param cnt - batch numbers if it is defined, it will returns given number of batches.
400
402
  * if cnt is not defined, it will return all available batches
401
403
  */
402
404
  getAllEvents(cnt?: number): IStorageTelemetryItem[] | IPromise<IStorageTelemetryItem[]> | null;
@@ -589,7 +591,7 @@ export declare class WebStorageProvider implements IOfflineProvider {
589
591
  id: string;
590
592
  /**
591
593
  * Creates a WebStorageProvider using the provider storageType
592
- * @param storageType The type of Storage provider, normal values are "localStorage" or "sessionStorage"
594
+ * @param storageType - The type of Storage provider, normal values are "localStorage" or "sessionStorage"
593
595
  */
594
596
  constructor(storageType: string, id?: string, unloadHookContainer?: IUnloadHookContainer);
595
597
  /**
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Microsoft Application Insights JavaScript SDK Offline Channel, 0.3.5-nightly3.2411-14
2
+ * Microsoft Application Insights JavaScript SDK Offline Channel, 0.3.5-nightly3.2412-02
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  *
5
5
  * Microsoft Application Insights Team
@@ -448,7 +448,6 @@ declare namespace ApplicationInsights {
448
448
  unload(isAsync?: boolean, unloadComplete?: (unloadState: ITelemetryUnloadState) => void, cbTimeout?: number): void | IPromise<ITelemetryUnloadState>;
449
449
  /**
450
450
  * Find and return the (first) plugin with the specified identifier if present
451
- * @param pluginIdentifier
452
451
  */
453
452
  getPlugin<T extends IPlugin = IPlugin>(pluginIdentifier: string): ILoadedPlugin<T>;
454
453
  /**
@@ -503,7 +502,6 @@ declare namespace ApplicationInsights {
503
502
  /**
504
503
  * Watches and tracks changes for accesses to the current config, and if the accessed config changes the
505
504
  * handler will be recalled.
506
- * @param handler
507
505
  * @returns A watcher handler instance that can be used to remove itself when being unloaded
508
506
  */
509
507
  onCfgChange(handler: WatcherFunction<CfgType>): IUnloadHook;
@@ -750,7 +748,7 @@ declare namespace ApplicationInsights {
750
748
  */
751
749
  disableFlushOnBeforeUnload?: boolean;
752
750
  /**
753
- * Default value of {@link #disableFlushOnBeforeUnload}. If true, flush method will not be called when onPageHide or onVisibilityChange (hidden state) event(s) trigger.
751
+ * Default value of `disableFlushOnBeforeUnload`. If true, flush method will not be called when onPageHide or onVisibilityChange (hidden state) event(s) trigger.
754
752
  */
755
753
  disableFlushOnUnload?: boolean;
756
754
  /**
@@ -802,12 +800,12 @@ declare namespace ApplicationInsights {
802
800
  */
803
801
  isStorageUseDisabled?: boolean;
804
802
  /**
805
- * If false, the SDK will send all telemetry using the [Beacon API](https://www.w3.org/TR/beacon)
803
+ * If false, the SDK will send all telemetry using the <a href="https://www.w3.org/TR/beacon">Beacon API</a>.
806
804
  * @defaultValue true
807
805
  */
808
806
  isBeaconApiDisabled?: boolean;
809
807
  /**
810
- * Don't use XMLHttpRequest or XDomainRequest (for IE < 9) by default instead attempt to use fetch() or sendBeacon.
808
+ * Don't use XMLHttpRequest or XDomainRequest (for IE \< 9) by default instead attempt to use fetch() or sendBeacon.
811
809
  * If no other transport is available it will still use XMLHttpRequest
812
810
  */
813
811
  disableXhr?: boolean;
@@ -1064,8 +1062,8 @@ declare namespace ApplicationInsights {
1064
1062
  * be logged to console if their severity meets the configured loggingConsoleLevel
1065
1063
  *
1066
1064
  * 0: ALL console logging off
1067
- * 1: logs to console: severity >= CRITICAL
1068
- * 2: logs to console: severity >= WARNING
1065
+ * 1: logs to console: severity \>= CRITICAL
1066
+ * 2: logs to console: severity \>= WARNING
1069
1067
  */
1070
1068
  loggingLevelConsole?: number;
1071
1069
  /**
@@ -1074,8 +1072,8 @@ declare namespace ApplicationInsights {
1074
1072
  * the configured instrumentation key.
1075
1073
  *
1076
1074
  * 0: ALL iKey logging off
1077
- * 1: logs to iKey: severity >= CRITICAL
1078
- * 2: logs to iKey: severity >= WARNING
1075
+ * 1: logs to iKey: severity \>= CRITICAL
1076
+ * 2: logs to iKey: severity \>= WARNING
1079
1077
  */
1080
1078
  loggingLevelTelemetry?: number;
1081
1079
  /**
@@ -1102,7 +1100,6 @@ declare namespace ApplicationInsights {
1102
1100
  */
1103
1101
  readonly channels?: IChannelControls[][];
1104
1102
  /**
1105
- * @type {boolean}
1106
1103
  * Flag that disables the Instrumentation Key validation.
1107
1104
  */
1108
1105
  disableInstrumentationKeyValidation?: boolean;
@@ -1133,14 +1130,12 @@ declare namespace ApplicationInsights {
1133
1130
  /**
1134
1131
  * @description Custom cookie domain. This is helpful if you want to share Application Insights cookies across subdomains. It
1135
1132
  * can be set here or as part of the cookieCfg.domain, the cookieCfg takes precedence if both are specified.
1136
- * @type {string}
1137
1133
  * @defaultValue ""
1138
1134
  */
1139
1135
  cookieDomain?: string;
1140
1136
  /**
1141
1137
  * @description Custom cookie path. This is helpful if you want to share Application Insights cookies behind an application
1142
1138
  * gateway. It can be set here or as part of the cookieCfg.domain, the cookieCfg takes precedence if both are specified.
1143
- * @type {string}
1144
1139
  * @defaultValue ""
1145
1140
  */
1146
1141
  cookiePath?: string;
@@ -1252,7 +1247,7 @@ declare namespace ApplicationInsights {
1252
1247
  /**
1253
1248
  * Optional Callback hook to allow the cookie manager to update it's configuration, not generally implemented now that
1254
1249
  * dynamic configuration is supported
1255
- * @param updateState
1250
+ * @param updateState - The new configuration state to apply to the cookie manager
1256
1251
  */
1257
1252
  update?(updateState: ITelemetryUpdateState): void;
1258
1253
  /**
@@ -1366,7 +1361,7 @@ declare namespace ApplicationInsights {
1366
1361
  logInternalMessage?(severity: LoggingSeverity, message: _InternalLogMessage): void;
1367
1362
  /**
1368
1363
  * Optional Callback hook to allow the diagnostic logger to update it's configuration
1369
- * @param updateState
1364
+ * @param updateState - The new configuration state to apply to the diagnostic logger
1370
1365
  */
1371
1366
  update?(updateState: ITelemetryUpdateState): void;
1372
1367
  /**
@@ -1387,7 +1382,7 @@ declare namespace ApplicationInsights {
1387
1382
  getName(): string;
1388
1383
  /**
1389
1384
  * Sets the current name of the page
1390
- * @param pageName
1385
+ * @param pageName - The name of the page
1391
1386
  */
1392
1387
  setName(pageName: string): void;
1393
1388
  /**
@@ -1419,7 +1414,7 @@ declare namespace ApplicationInsights {
1419
1414
  getTraceFlags(): number | undefined;
1420
1415
  /**
1421
1416
  * https://www.w3.org/TR/trace-context/#trace-flags
1422
- * @param newValue
1417
+ * @param newValue - An integer representation of the W3C TraceContext trace-flags.
1423
1418
  */
1424
1419
  setTraceFlags(newValue?: number): void;
1425
1420
  }
@@ -1458,10 +1453,10 @@ declare namespace ApplicationInsights {
1458
1453
  *
1459
1454
  * This callback is called before telemetry data is sent, allowing for dynamic customization of the logs.
1460
1455
  *
1461
- * @returns {Object} An object with the following property:
1456
+ * @returns An object with the following property:
1462
1457
  * - logs: An array of strings, where each string represents a log entry to be included in the telemetry.
1463
1458
  *
1464
- * @property {number} maxLogs - Specifies the maximum number of logs that can be generated. If not explicitly set, it defaults to 50.
1459
+ * @property maxLogs - Specifies the maximum number of logs that can be generated. If not explicitly set, it defaults to 50.
1465
1460
  */
1466
1461
  expLog?: () => {
1467
1462
  logs: string[];
@@ -1528,15 +1523,16 @@ declare namespace ApplicationInsights {
1528
1523
  /**
1529
1524
  * Split this batch into 2 with any events > fromEvent returned in the new batch and all other
1530
1525
  * events are kept in the current batch.
1531
- * @param fromEvt The first event to remove from the current batch.
1532
- * @param numEvts The number of events to be removed from the current batch and returned in the new one. Defaults to all trailing events
1526
+ * @param fromEvt - The first event to remove from the current batch.
1527
+
1528
+ * @param numEvts - The number of events to be removed from the current batch and returned in the new one. Defaults to all trailing events
1533
1529
  */
1534
1530
  split: (fromEvt: number, numEvts?: number) => IInMemoryBatch;
1535
1531
  /**
1536
1532
  * create current buffer to a new endpoint with current logger
1537
- * @param endpoint new endpoint
1538
- * @param evts new events to be added
1539
- * @param evtsLimitInMem new evtsLimitInMem
1533
+ * @param endpoint - new endpoint
1534
+ * @param evts - new events to be added
1535
+ * @param evtsLimitInMem - new evtsLimitInMem
1540
1536
  */
1541
1537
  createNew(endpoint: string, evts?: IPostTransmissionTelemetryItem[] | ITelemetryItem[], evtsLimitInMem?: number): IInMemoryBatch;
1542
1538
  }
@@ -1552,32 +1548,31 @@ declare namespace ApplicationInsights {
1552
1548
  getUrl: () => string;
1553
1549
  /**
1554
1550
  * Create payload data
1555
- * @param data data
1556
1551
  * @returns IPayloadData
1557
1552
  */
1558
1553
  createPayload: (data: string | Uint8Array) => IPayloadData;
1559
1554
  /**
1560
1555
  * Serialize an item into a string
1561
- * @param input telemetry item
1562
- * @param convertUndefined convert undefined to a custom-defined object
1556
+ * @param input - telemetry item
1557
+ * @param convertUndefined - convert undefined to a custom-defined object
1563
1558
  * @returns Serialized string
1564
1559
  */
1565
1560
  serialize?: (input: ITelemetryItem, convertUndefined?: any) => string;
1566
1561
  /**
1567
1562
  * Batch an array of strings into one string
1568
- * @param arr array of strings
1563
+ * @param arr - array of strings
1569
1564
  * @returns a string represent all items in the given array
1570
1565
  */
1571
1566
  batch?: (arr: string[]) => string;
1572
1567
  /**
1573
1568
  * If the item should be processed by offline channel
1574
- * @param evt telemetry item
1569
+ * @param evt - telemetry item
1575
1570
  * @returns should process or not
1576
1571
  */
1577
1572
  shouldProcess?: (evt: ITelemetryItem) => boolean;
1578
1573
  /**
1579
1574
  * Create 1ds payload data
1580
- * @param evts ITelemetryItems
1575
+ * @param evts - ITelemetryItems
1581
1576
  * @returns IPayloadData
1582
1577
  */
1583
1578
  createOneDSPayload?: (evts: ITelemetryItem[]) => IPayloadData;
@@ -1650,7 +1645,7 @@ declare namespace ApplicationInsights {
1650
1645
  constructor(id?: string, unloadHookContainer?: IUnloadHookContainer);
1651
1646
  /**
1652
1647
  * Initializes the provider using the config
1653
- * @param providerContext The provider context that should be used to initialize the provider
1648
+ * @param providerContext - The provider context that should be used to initialize the provider
1654
1649
  * @returns True if the provider is initialized and available for use otherwise false
1655
1650
  */
1656
1651
  initialize(providerContext: ILocalStorageProviderContext): boolean;
@@ -1704,15 +1699,16 @@ declare namespace ApplicationInsights {
1704
1699
  /**
1705
1700
  * Split this batch into 2 with any events > fromEvent returned in the new batch and all other
1706
1701
  * events are kept in the current batch.
1707
- * @param fromEvt The first event to remove from the current batch.
1708
- * @param numEvts The number of events to be removed from the current batch and returned in the new one. Defaults to all trailing events
1702
+ * @param fromEvt - The first event to remove from the current batch.
1703
+
1704
+ * @param numEvts - The number of events to be removed from the current batch and returned in the new one. Defaults to all trailing events
1709
1705
  */
1710
1706
  split(fromEvt: number, numEvts?: number): any;
1711
1707
  /**
1712
1708
  * create current buffer to a new endpoint
1713
- * @param endpoint if not defined, current endpoint will be used
1714
- * @param evts new events to be added
1715
- * @param addCurEvts if it is set to true, current itemss will be transferred to the new batch
1709
+ * @param endpoint - if not defined, current endpoint will be used
1710
+ * @param evts - new events to be added
1711
+ * @param addCurEvts - if it is set to true, current itemss will be transferred to the new batch
1716
1712
  */
1717
1713
  createNew(endpoint: string, evts?: IPostTransmissionTelemetryItem[] | ITelemetryItem[], evtsLimitInMem?: number): any;
1718
1714
  }
@@ -1743,7 +1739,7 @@ declare namespace ApplicationInsights {
1743
1739
  /**
1744
1740
  * [Optional] This event is sent if you have enabled perf events, they are primarily used to track internal performance testing and debugging
1745
1741
  * the event can be displayed via the debug plugin extension.
1746
- * @param perfEvent
1742
+ * @param perfEvent - The performance event object
1747
1743
  */
1748
1744
  perfEvent?: (perfEvent: IPerfEvent) => void;
1749
1745
  /**
@@ -2013,7 +2009,7 @@ declare namespace ApplicationInsights {
2013
2009
  interface IOfflineProvider {
2014
2010
  /**
2015
2011
  * Initializes the provider using the config
2016
- * @param providerContext The provider context that should be used to initialize the provider
2012
+ * @param providerContext - The provider context that should be used to initialize the provider
2017
2013
  * @returns True if the provider is initialized and available for use otherwise false
2018
2014
  */
2019
2015
  initialize(providerContext: ILocalStorageProviderContext): boolean;
@@ -2037,7 +2033,7 @@ declare namespace ApplicationInsights {
2037
2033
  getNextBatch(): IStorageTelemetryItem[] | IPromise<IStorageTelemetryItem[]> | null;
2038
2034
  /**
2039
2035
  * Get all stored batches from the storage.
2040
- * @param cnt batch numbers if it is defined, it will returns given number of batches.
2036
+ * @param cnt - batch numbers if it is defined, it will returns given number of batches.
2041
2037
  * if cnt is not defined, it will return all available batches
2042
2038
  */
2043
2039
  getAllEvents(cnt?: number): IStorageTelemetryItem[] | IPromise<IStorageTelemetryItem[]> | null;
@@ -2944,7 +2940,7 @@ declare namespace ApplicationInsights {
2944
2940
 
2945
2941
  /**
2946
2942
  * this is the callback that will be called when the network status changes
2947
- * @param onlineState this is the current network running state
2943
+ * @param onlineState - this is the current network running state
2948
2944
  */
2949
2945
  type OfflineCallback = (onlineState: IOfflineState) => void;
2950
2946
 
@@ -3181,7 +3177,7 @@ declare namespace ApplicationInsights {
3181
3177
  id: string;
3182
3178
  /**
3183
3179
  * Creates a WebStorageProvider using the provider storageType
3184
- * @param storageType The type of Storage provider, normal values are "localStorage" or "sessionStorage"
3180
+ * @param storageType - The type of Storage provider, normal values are "localStorage" or "sessionStorage"
3185
3181
  */
3186
3182
  constructor(storageType: string, id?: string, unloadHookContainer?: IUnloadHookContainer);
3187
3183
  /**