diff --git a/AISKU/src/AISku.ts b/AISKU/src/AISku.ts index ef7dd11f1..9a15e9709 100644 --- a/AISKU/src/AISku.ts +++ b/AISKU/src/AISku.ts @@ -626,8 +626,8 @@ export class AppInsightsSku implements IApplicationInsights { /** * Log a user action or other occurrence. - * @param event - * @param [customProperties] + * @param event - event to be sent + * @param customProperties - properties that would be included as part of the event */ public trackEvent(event: IEventTelemetry, customProperties?: ICustomProperties) { // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging @@ -635,7 +635,7 @@ export class AppInsightsSku implements IApplicationInsights { /** * Logs that a page, or similar container was displayed to the user. - * @param pageView + * @param pageView - page view to be sent */ public trackPageView(pageView?: IPageViewTelemetry) { // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging @@ -643,7 +643,7 @@ export class AppInsightsSku implements IApplicationInsights { /** * Log a bag of performance information via the customProperties field. - * @param pageViewPerformance + * @param pageViewPerformance - performance information to be sent */ public trackPageViewPerformance(pageViewPerformance: IPageViewPerformanceTelemetry): void { // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging @@ -651,8 +651,8 @@ export class AppInsightsSku implements IApplicationInsights { /** * Log an exception that you have caught. - * @param exception - * @param } customProperties Additional data used to filter pages and metrics in the portal. Defaults to empty. + * @param exception - exception to be sent + * @param customProperties - Additional data used to filter pages and metrics in the portal. Defaults to empty. */ public trackException(exception: IExceptionTelemetry, customProperties?: ICustomProperties): void { // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging @@ -661,7 +661,7 @@ export class AppInsightsSku implements IApplicationInsights { /** * Manually send uncaught exception telemetry. This method is automatically triggered * on a window.onerror event. - * @param exception + * @param exception - The exception to be sent. */ public _onerror(exception: IAutoExceptionTelemetry): void { // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging @@ -669,8 +669,8 @@ export class AppInsightsSku implements IApplicationInsights { /** * Log a diagnostic scenario such entering or leaving a function. - * @param trace - * @param [customProperties] + * @param trace - trace to be sent + * @param customProperties - Additional custom properties to include in the event. */ public trackTrace(trace: ITraceTelemetry, customProperties?: ICustomProperties): void { // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging @@ -687,7 +687,7 @@ export class AppInsightsSku implements IApplicationInsights { * aggregating multiple measurements and sending the resulting average and modifying * the `sampleCount` field of {@link IMetricTelemetry}. * @param metric - input object argument. Only `name` and `average` are mandatory. - * @param [customProperties] + * @param customProperties - Additional custom properties to include in the event. */ public trackMetric(metric: IMetricTelemetry, customProperties?: ICustomProperties): void { // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging @@ -705,10 +705,10 @@ export class AppInsightsSku implements IApplicationInsights { /** * Stops the timer that was started by calling `startTrackPage` and sends the pageview load time telemetry with the specified properties and measurements. * The duration of the page view will be the time between calling `startTrackPage` and `stopTrackPage`. - * @param name The string you used as the name in startTrackPage. Defaults to the document title. - * @param url String - a relative or absolute URL that identifies the page or other item. Defaults to the window location. - * @param properties map[string, string] - additional data used to filter pages and metrics in the portal. Defaults to empty. - * @param measurements map[string, number] - metrics associated with this page, displayed in Metrics Explorer on the portal. Defaults to empty. + * @param name - The string you used as the name in startTrackPage. Defaults to the document title. + * @param url - a relative or absolute URL that identifies the page or other item. Defaults to the window location. + * @param properties - additional data used to filter pages and metrics in the portal. Defaults to empty. + * @param measurements - metrics associated with this page, displayed in Metrics Explorer on the portal. Defaults to empty. */ public stopTrackPage(name?: string, url?: string, properties?: { [key: string]: string }, measurements?: { [key: string]: number }) { // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging @@ -720,9 +720,9 @@ export class AppInsightsSku implements IApplicationInsights { /** * Log an extended event that you started timing with `startTrackEvent`. - * @param name The string you used to identify this event in `startTrackEvent`. - * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty. - * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty. + * @param name - The string you used to identify this event in `startTrackEvent`. + * @param properties - map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty. + * @param measurements - map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty. */ public stopTrackEvent(name: string, properties?: { [key: string]: string }, measurements?: { [key: string]: number }) { // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging @@ -739,9 +739,9 @@ export class AppInsightsSku implements IApplicationInsights { * Set the authenticated user id and the account id. Used for identifying a specific signed-in user. Parameters must not contain whitespace or ,;=| * * The method will only set the `authenticatedUserId` and `accountId` in the current page view. To set them for the whole session, you should set `storeInCookie = true` - * @param authenticatedUserId - * @param [accountId] - * @param [storeInCookie=false] + * @param authenticatedUserId - The account ID to set + * @param accountId - The account ID to set + * @param storeInCookie - Whether the values should be set for the whole session */ public setAuthenticatedUserContext(authenticatedUserId: string, accountId?: string, storeInCookie = false): void { // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging @@ -758,7 +758,7 @@ export class AppInsightsSku implements IApplicationInsights { /** * Log a dependency call (e.g. ajax) - * @param dependency + * @param dependencyData dependency data object */ public trackDependencyData(dependency: IDependencyTelemetry): void { // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging @@ -806,7 +806,7 @@ export class AppInsightsSku implements IApplicationInsights { /** * Overwrite the lazy loaded fields of global window snippet to contain the * actual initialized API methods - * @param snippet + * @param snippet - The global snippet */ public updateSnippetDefinitions(snippet: Snippet) { // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging @@ -935,7 +935,7 @@ export class AppInsightsSku implements IApplicationInsights { /** * Watches and tracks changes for accesses to the current config, and if the accessed config changes the * handler will be recalled. - * @param handler + * @param handler - The handler to call when the config changes * @returns A watcher handler instance that can be used to remove itself when being unloaded */ public onCfgChange(handler: WatcherFunction): IUnloadHook { diff --git a/AISKULight/src/index.ts b/AISKULight/src/index.ts index e596e7420..38dd077d1 100644 --- a/AISKULight/src/index.ts +++ b/AISKULight/src/index.ts @@ -36,7 +36,7 @@ export class ApplicationInsights { /** * Creates an instance of ApplicationInsights. - * @param config + * @param config - The configuration to use for this ApplicationInsights instance */ constructor(config: IConfiguration & IConfig) { let core = new AppInsightsCore(); @@ -154,8 +154,7 @@ export class ApplicationInsights { /** * Send a manually constructed custom event - * - * @param item + * @param item - The custom event to send */ public track(item: ITelemetryItem) { // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging @@ -163,7 +162,7 @@ export class ApplicationInsights { /** * Immediately send all batched telemetry - * @param [async=true] + * @param async - Should the flush be performed asynchronously */ public flush(async: boolean = true) { // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging @@ -199,7 +198,7 @@ export class ApplicationInsights { /** * Find and return the (first) plugin with the specified identifier if present - * @param pluginIdentifier + * @param pluginIdentifier - The identifier of the plugin to search for */ public getPlugin(pluginIdentifier: string): ILoadedPlugin { // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging @@ -258,7 +257,7 @@ export class ApplicationInsights { /** * Watches and tracks changes for accesses to the current config, and if the accessed config changes the * handler will be recalled. - * @param handler + * @param handler - The handler to call when the configuration changes * @returns A watcher handler instance that can be used to remove itself when being unloaded */ public onCfgChange(handler: WatcherFunction): IUnloadHook { diff --git a/channels/1ds-post-js/src/EventBatch.ts b/channels/1ds-post-js/src/EventBatch.ts index 1563b92af..5ff364e50 100644 --- a/channels/1ds-post-js/src/EventBatch.ts +++ b/channels/1ds-post-js/src/EventBatch.ts @@ -36,7 +36,7 @@ export class EventBatch { /** * Creates a new Event Batch object - * @param iKey The iKey associated with this batch of events + * @param iKey - The iKey associated with this batch of events */ public static create(iKey: string, theEvents?: IPostTransmissionTelemetryItem[]): EventBatch { return new EventBatch(iKey, theEvents); @@ -70,8 +70,8 @@ export class EventBatch { /** * Split this batch into 2 with any events > fromEvent returned in the new batch and all other * events are kept in the current batch. - * @param fromEvent The first event to remove from the current batch. - * @param numEvents The number of events to be removed from the current batch and returned in the new one. Defaults to all trailing events + * @param fromEvent - The first event to remove from the current batch. + * @param numEvents - The number of events to be removed from the current batch and returned in the new one. Defaults to all trailing events */ public split: (fromEvent: number, numEvents?: number) => EventBatch; diff --git a/channels/1ds-post-js/src/HttpManager.ts b/channels/1ds-post-js/src/HttpManager.ts index 41b239f84..bb3caf047 100644 --- a/channels/1ds-post-js/src/HttpManager.ts +++ b/channels/1ds-post-js/src/HttpManager.ts @@ -1323,7 +1323,7 @@ export class HttpManager { /** * Add the batch of events to the queue for sending - * @param batch The batch with the events to send + * @param batch - The batch with the events to send * @returns True if the http manager has accepted the batch (including if the batch is empty) otherwise false */ public addBatch(batch: EventBatch): boolean { @@ -1420,7 +1420,7 @@ export class HttpManager { /** * Create payload data - * @param evts telemetry events + * @param evts - telemetry events * @returns payload */ public createOneDSPayload(evts?: ITelemetryItem[], optimize?: boolean): IPayloadData { diff --git a/channels/1ds-post-js/src/PostChannel.ts b/channels/1ds-post-js/src/PostChannel.ts index f6260046a..e5e706849 100644 --- a/channels/1ds-post-js/src/PostChannel.ts +++ b/channels/1ds-post-js/src/PostChannel.ts @@ -951,8 +951,8 @@ export class PostChannel extends BaseTelemetryPlugin implements IChannelControls /** * This is the callback method is called as part of the manual flushing process. - * @param callback - * @param sendReason + * @param callback - The callback method to call after the flush is complete + * @param sendReason - The reason why the flush is being called */ function _flushImpl(callback: () => void, sendReason: SendRequestReason) { // Add any additional queued events and cause all queued events to be sent asynchronously @@ -1103,8 +1103,8 @@ export class PostChannel extends BaseTelemetryPlugin implements IChannelControls /** * This event represents that a batch of events have been successfully sent and a response received - * @param batches The notification handler for when the batches have been successfully sent - * @param reason For this event the reason will always be EventBatchNotificationReason.Complete + * @param batches - The notification handler for when the batches have been successfully sent + * @param reason - For this event the reason will always be EventBatchNotificationReason.Complete */ function _eventsSentEvent(batches: EventBatch[], reason?: number) { _notifyBatchEvents("eventsSent", batches, reason); @@ -1168,9 +1168,9 @@ export class PostChannel extends BaseTelemetryPlugin implements IChannelControls /** * Sets the event queue limits at runtime (after initialization), if the number of queued events is greater than the * eventLimit or autoFlushLimit then a flush() operation will be scheduled. - * @param eventLimit The number of events that can be kept in memory before the SDK starts to drop events. If the value passed is less than or + * @param eventLimit - The number of events that can be kept in memory before the SDK starts to drop events. If the value passed is less than or * equal to zero the value will be reset to the default (10,000). - * @param autoFlushLimit When defined, once this number of events has been queued the system perform a flush() to send the queued events + * @param autoFlushLimit - When defined, once this number of events has been queued the system perform a flush() to send the queued events * without waiting for the normal schedule timers. Passing undefined, null or a value less than or equal to zero will disable the auto flush. */ public setEventQueueLimits(eventLimit: number, autoFlushLimit?: number) { diff --git a/channels/1ds-post-js/src/Serializer.ts b/channels/1ds-post-js/src/Serializer.ts index bbf6595ff..3b1f9688c 100644 --- a/channels/1ds-post-js/src/Serializer.ts +++ b/channels/1ds-post-js/src/Serializer.ts @@ -420,12 +420,12 @@ export class Serializer { /** * Create a serializer payload package - * @param retryCnt The retry count for the events in this payload - * @param isTeardown Is this payload being created as part of a teardown request - * @param isSync Should this payload be sent as a synchronous request - * @param isReducedPayload Is this payload going to be sent via sendBeacon() API - * @param sendReason The reason the payload is being sent - * @param sendType Identifies how this payload will be sent + * @param retryCnt - The retry count for the events in this payload + * @param isTeardown - Is this payload being created as part of a teardown request + * @param isSync - Should this payload be sent as a synchronous request + * @param isReducedPayload - Is this payload going to be sent via sendBeacon() API + * @param sendReason - The reason the payload is being sent + * @param sendType - Identifies how this payload will be sent */ public createPayload(retryCnt: number, isTeardown: boolean, isSync: boolean, isReducedPayload: boolean, sendReason: SendRequestReason, sendType: EventSendType): ISerializedPayload { // @DynamicProtoStub - DO NOT add any code as this will be removed during packaging diff --git a/channels/offline-channel-js/src/Helpers/Utils.ts b/channels/offline-channel-js/src/Helpers/Utils.ts index 07f12e3d6..eef744efc 100644 --- a/channels/offline-channel-js/src/Helpers/Utils.ts +++ b/channels/offline-channel-js/src/Helpers/Utils.ts @@ -26,7 +26,7 @@ export function isValidPersistenceLevel(value: EventPersistence | number): boole /** * Get domian from an endpoint url. * for example, https://test.com?auth=true, will return test.com - * @param endpoint endpoint url + * @param endpoint - endpoint url * @returns domain string */ export function getEndpointDomain(endpoint: string) { @@ -47,7 +47,7 @@ export function getEndpointDomain(endpoint: string) { /** * If current value is equal or greater than zero. - * @param value number + * @param value - number * @returns boolean */ export function isGreaterThanZero(value: number) { @@ -62,7 +62,7 @@ const _base64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+ /** * Base64-encodes a Uint8Array. * - * @param data the Uint8Array or string to encode. + * @param data - the Uint8Array or string to encode. * * @returns the base64-encoded output string. */ @@ -104,7 +104,7 @@ export function base64Encode(data: string | Uint8Array) { /** * Base64-decodes an encoded string and transforms it back to a Uint8Array. - * @param input the encoded string to decode + * @param input - the encoded string to decode * @returns Uint8Array */ export function base64Decode(input: string) { @@ -157,7 +157,7 @@ export function getTimeId(): string { /** * Get time value from a time id that is generated from getTimeId() function. * For example, if time id is "12345678.randomfl", 12345678 will be returned - * @param id time id string + * @param id - time id string * @returns time value number */ export function getTimeFromId(id: string) { @@ -179,7 +179,7 @@ export function getTimeFromId(id: string) { * Persistence level will be get from root, baseData or data in order. * For example, if persistence level is set both in root and baseData, the root one will be returned. * If no valid persistence level defined, normal level will be returned. - * @param item telemetry item + * @param item - telemetry item * @returns persistent level */ export function getPersistence(item: ITelemetryItem | IPostTransmissionTelemetryItem): number | EventPersistence { diff --git a/channels/offline-channel-js/src/InMemoryBatch.ts b/channels/offline-channel-js/src/InMemoryBatch.ts index d1bf99173..1a3c26c47 100644 --- a/channels/offline-channel-js/src/InMemoryBatch.ts +++ b/channels/offline-channel-js/src/InMemoryBatch.ts @@ -87,8 +87,9 @@ export class InMemoryBatch implements IInMemoryBatch { /** * Split this batch into 2 with any events > fromEvent returned in the new batch and all other * events are kept in the current batch. - * @param fromEvt The first event to remove from the current batch. - * @param numEvts The number of events to be removed from the current batch and returned in the new one. Defaults to all trailing events + * @param fromEvt - The first event to remove from the current batch. + + * @param numEvts - The number of events to be removed from the current batch and returned in the new one. Defaults to all trailing events */ public split(fromEvt: number, numEvts?: number) { // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging @@ -97,9 +98,9 @@ export class InMemoryBatch implements IInMemoryBatch { /** * create current buffer to a new endpoint - * @param endpoint if not defined, current endpoint will be used - * @param evts new events to be added - * @param addCurEvts if it is set to true, current itemss will be transferred to the new batch + * @param endpoint - if not defined, current endpoint will be used + * @param evts - new events to be added + * @param addCurEvts - if it is set to true, current itemss will be transferred to the new batch */ public createNew(endpoint: string, evts?: IPostTransmissionTelemetryItem[] | ITelemetryItem[], evtsLimitInMem?: number) { // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging diff --git a/channels/offline-channel-js/src/Interfaces/IInMemoryBatch.ts b/channels/offline-channel-js/src/Interfaces/IInMemoryBatch.ts index e7823e33d..55a0c95f0 100644 --- a/channels/offline-channel-js/src/Interfaces/IInMemoryBatch.ts +++ b/channels/offline-channel-js/src/Interfaces/IInMemoryBatch.ts @@ -25,15 +25,16 @@ export interface IInMemoryBatch { /** * Split this batch into 2 with any events > fromEvent returned in the new batch and all other * events are kept in the current batch. - * @param fromEvt The first event to remove from the current batch. - * @param numEvts The number of events to be removed from the current batch and returned in the new one. Defaults to all trailing events + * @param fromEvt - The first event to remove from the current batch. + + * @param numEvts - The number of events to be removed from the current batch and returned in the new one. Defaults to all trailing events */ split: (fromEvt: number, numEvts?: number) => IInMemoryBatch; /** * create current buffer to a new endpoint with current logger - * @param endpoint new endpoint - * @param evts new events to be added - * @param evtsLimitInMem new evtsLimitInMem + * @param endpoint - new endpoint + * @param evts - new events to be added + * @param evtsLimitInMem - new evtsLimitInMem */ createNew(endpoint: string, evts?: IPostTransmissionTelemetryItem[] | ITelemetryItem[], evtsLimitInMem?: number): IInMemoryBatch; diff --git a/channels/offline-channel-js/src/Interfaces/IOfflineIndexDb.ts b/channels/offline-channel-js/src/Interfaces/IOfflineIndexDb.ts index 84e4175b2..bbe68ca4c 100644 --- a/channels/offline-channel-js/src/Interfaces/IOfflineIndexDb.ts +++ b/channels/offline-channel-js/src/Interfaces/IOfflineIndexDb.ts @@ -27,14 +27,13 @@ export interface IDbContext { dbHdl: IDBDatabase[]; /** * Adds a new handle to the array of open handles - * @param db - */ + * @param db - */ + add(db: IDBDatabase): void; /** * Removes the given handle from the array of open handles (if present) - * @param db - */ + * @param db - */ remove(db: IDBDatabase): void; /** @@ -94,8 +93,8 @@ export interface IIndexedDbOpenDbContext { * The Promise returned by the openStore() method will not resolve until either the promise returned by the doAction() callback is resolved/rejected * or there was an error opening the store (The database was not or is no longer open). * Special Note: This method IS optional and will NOT exist for the versionChangeFunc() callback, but will always exist for the processFunc() provided during the openDb() method call. - * @param eventTable The name of the store (table) to open - * @param doAction The callback function to execute once the store is opened and will be passed a IIndexedDbStoreActionContext<> context instance, this + * @param eventTable - The name of the store (table) to open + * @param doAction - The callback function to execute once the store is opened and will be passed a IIndexedDbStoreActionContext<> context instance, this * context can be used to open a cursor and perform operations on the table. If the action does not return an Promise then open store will return a resolved promise with the returned value */ openStore?( @@ -105,10 +104,10 @@ export interface IIndexedDbOpenDbContext { * A helper method that opens the store and a cursor on the table previously opened by the openStore() method of the IIndexedDbOpenDbContext<> instance that was provided by the openDb() call. * This enables searching (query) and iterating over the request table. The returned Promise will be resolved with an array of the requested items (if successful) and whether * the passed processFunc() requests or manually inserts the elements into the array. Or rejected if there was an issue opening the cursor. - * @param eventTable The name of the store (table) to open - * @param query Either a string that will be used to construct a SimpleQuery definition or an instance of the IIndexedDbSimpleQuery interface used to open the cursor on the store. + * @param eventTable - The name of the store (table) to open + * @param query - Either a string that will be used to construct a SimpleQuery definition or an instance of the IIndexedDbSimpleQuery interface used to open the cursor on the store. * May be null to iterate over the entire store. - * @param processFunc [Optional] The callback method that will be called for every item found matching the query for the store. + * @param processFunc - [Optional] The callback method that will be called for every item found matching the query for the store. * - If no callback is provided then the returned Promise will include all items matching the provided query (if any are found) * - When provided it is the processFunc() responsibility to populate the passed values[] and this array will be the values used to resolve the outer Promise once the cursor has finished iterating. * - The result of the processFunc() (A CursorProcessResult value) will be used to determine whether the cursor will just Continue onto the next value (if present), Complete (stop iterating) or @@ -145,9 +144,9 @@ export interface IIndexedDbStoreActionContext { * A helper method that opens a cursor on the table previously opened by the openStore() method of the IIndexedDbOpenDbContext<> instance that was provided by the openDb() call. * This enables searching (query) and iterating over the request table. The returned Promise will be resolved with an array of the requested items (if successful) and whether * the passed processFunc() requests or manually inserts the elements into the array. Or rejected if there was an issue opening the cursor. - * @param query Either a string that will be used to construct a SimpleQuery definition or an instance of the IIndexedDbSimpleQuery interface used to open the cursor on the store. + * @param query - Either a string that will be used to construct a SimpleQuery definition or an instance of the IIndexedDbSimpleQuery interface used to open the cursor on the store. * May be null to iterate over the entire store. - * @param processFunc [Optional] The callback method that will be called for every item found matching the query for the store. + * @param processFunc - [Optional] The callback method that will be called for every item found matching the query for the store. * - If no callback is provided then the returned Promise will include all items matching the provided query (if any are found) * - When provided it is the processFunc() responsibility to populate the passed values[] and this array will be the values used to resolve the outer Promise once the cursor has finished iterating. * - The result of the processFunc() (A CursorProcessResult value) will be used to determine whether the cursor will just Continue onto the next value (if present), Complete (stop iterating) or @@ -162,7 +161,7 @@ export interface IIndexedDbStoreActionContext { * The Promise returned by the newTransaction() method will not resolve until either the promise returned by the doAction() callback is resolved/rejected * or there was an error opening the store (The database was not or is no longer open). * Special Note: This method IS optional and will NOT exist for the versionChangeFunc() callback, but will always exist for the processFunc() provided during the openDb() method call. - * @param doAction The callback function to execute once the store is opened and will be passed a IIndexedDbStoreActionContext<> context instance, this + * @param doAction - The callback function to execute once the store is opened and will be passed a IIndexedDbStoreActionContext<> context instance, this * context can be used to open a cursor and perform operations on the table. */ newTransaction( @@ -213,7 +212,7 @@ export interface IIndexedDbSimpleQuery { /** * [Optional] Callback method used to provide additional validation on whether the returned value from the IndexedDB Api cursor iteration, this method * must return true for the processFunc() of the openCursor() is called or the value is just added to the identified items. - * @param value The value returned by the IndexedDB IDBCursorWithValue cursor event. + * @param value - The value returned by the IndexedDB IDBCursorWithValue cursor event. * @returns true if the value matches otherwise false */ isMatch?(value: any): boolean; diff --git a/channels/offline-channel-js/src/Interfaces/IOfflineProvider.ts b/channels/offline-channel-js/src/Interfaces/IOfflineProvider.ts index 6ea3c5e8c..ca2ccfad8 100644 --- a/channels/offline-channel-js/src/Interfaces/IOfflineProvider.ts +++ b/channels/offline-channel-js/src/Interfaces/IOfflineProvider.ts @@ -249,7 +249,7 @@ export interface ILocalStorageProviderContext { export interface IOfflineProvider { /** * Initializes the provider using the config - * @param providerContext The provider context that should be used to initialize the provider + * @param providerContext - The provider context that should be used to initialize the provider * @returns True if the provider is initialized and available for use otherwise false */ initialize(providerContext: ILocalStorageProviderContext): boolean; @@ -277,7 +277,7 @@ export interface IOfflineProvider { /** * Get all stored batches from the storage. - * @param cnt batch numbers if it is defined, it will returns given number of batches. + * @param cnt - batch numbers if it is defined, it will returns given number of batches. * if cnt is not defined, it will return all available batches */ getAllEvents(cnt?: number): IStorageTelemetryItem[] | IPromise< IStorageTelemetryItem[]> | null; diff --git a/channels/offline-channel-js/src/OfflineBatchHandler.ts b/channels/offline-channel-js/src/OfflineBatchHandler.ts index 02d0208f5..b4abcf97d 100644 --- a/channels/offline-channel-js/src/OfflineBatchHandler.ts +++ b/channels/offline-channel-js/src/OfflineBatchHandler.ts @@ -340,8 +340,8 @@ export class OfflineBatchHandler implements IOfflineBatchHandler { /** * Checks if the SDK should resend the payload after receiving this status code from the backend. - * @param statusCode - */ + * @param statusCode - */ + function _isRetriable(item: IStorageTelemetryItem, statusCode: number): boolean { if (!_shouldSend(item)) { return false; diff --git a/channels/offline-channel-js/src/Providers/IndexDbHelper.ts b/channels/offline-channel-js/src/Providers/IndexDbHelper.ts index aa85ffa58..b0cb2f1c1 100644 --- a/channels/offline-channel-js/src/Providers/IndexDbHelper.ts +++ b/channels/offline-channel-js/src/Providers/IndexDbHelper.ts @@ -39,8 +39,9 @@ const ErrorMessageFailedToOpenCursor = "DBError: Failed to Open Cursor"; let _dbContext: IDbContext[] = []; /** * Constructs the IDbContext instance - * @param dbName The current database name - * @param diagLog The diagnostics logger to use + * @param dbName - The current database name + + * @param diagLog - The diagnostics logger to use */ function _getDbContext(dbName: string, diagLog?: IDiagnosticLogger): IDbContext { let dbCtx: IDbContext = null; @@ -91,8 +92,8 @@ function _getDbContext(dbName: string, diagLog?: IDiagnosticLogger): IDbContext * rejectEvent will be executed. This is used to ensure that we don't attempt to execute events out of order such as attempting to removed * an event from the indexedDb before the insertion of the event has completed. Only one of the startEvent or unableToStateEvent callbacks * functions will be called. - * @param startEvent The event to execute after all outstanding events are complete, may be called synchronously or asynchronously. - * @param actionName The name of the action being performed + * @param startEvent - The event to execute after all outstanding events are complete, may be called synchronously or asynchronously. + * @param actionName - The name of the action being performed */ function _scheduleEvent(dbName: string, actionName: string, startEvent: StartQueuedTaskFn, evtTimeOut?: number): IPromise { // Create or fetch the current scheduler for this dbName @@ -608,7 +609,7 @@ export class IndexedDbHelper { * This method will return immediately, however, the scheduled event to close the open Db handles will not occur until all outstanding database operations * (openDb, deleteDb, getDbDetails) started by IndexedDbHelper for the named db have completed. This will NOT affect or wait for any open database handles * which have been directly opened by the IndexedDB Api. - * @param dbName The name of the database to close, no error will be returned if the database does not exist or was not opened. + * @param dbName - The name of the database to close, no error will be returned if the database does not exist or was not opened. */ public closeDb(dbName: string): void { // @DynamicProtoStub - DO NOT add any code as this will be removed during packaging @@ -619,7 +620,7 @@ export class IndexedDbHelper { * It will also wait for all Promise objects from previous openDb, closeDb, getDbDetails to complete (resolve or reject) before attempting to * perform the delete operation. This operation may block or fail if the database is opened outstide of the IndexedDbHelper * The returned promise will be resolved or rejected depending on the outcome of the delete operation. - * @param dbName The name of the database to delete + * @param dbName - The name of the database to delete */ public deleteDb(dbName: string): boolean | IPromise { // @DynamicProtoStub - DO NOT add any code as this will be removed during packaging @@ -631,7 +632,7 @@ export class IndexedDbHelper { * This method requires that the underlying browser support draft specification for IDBFactory.databases, if this is not supported then the returned * Promise will be rejected with an error message stating that the feature is not supported. * The returned Promise will be resolved with the details if available or rejected on error. - * @param dbName The name of the database to request the details for + * @param dbName - The name of the database to request the details for */ public getDbDetails(dbName: string): IPromise { // @DynamicProtoStub - DO NOT add any code as this will be removed during packaging @@ -759,29 +760,28 @@ class SimpleQuery implements IIndexedDbSimpleQuery { * Processes the provided string and attempts to create a simple query from the values, this can be a ';' seperated list of values where each value represents a * = set with being the property name to match and being the value. If the is prefixed with a '#' character then this will be used to as * the query "key" and will populate the keyRange() returned by the keyRange() method. - * @param query - */ + * @param query - */ public parseQuery?(query: string): void; /** * Creates a simple "startsWith" check. This is same as passing "=" to the parseQuery() method. - * @param columnName The property of the returned object - * @param value The value of the property from the returned object to perform a startsWith() match against + * @param columnName - The property of the returned object + * @param value - The value of the property from the returned object to perform a startsWith() match against */ public startsWith?(columnName: string, value: string): void; /** * Creates a simple "contains" check. This will create a search query that will return true whenever the value contains * anywhere in the resulting string (i.e. it performs an xxxx.indexOf() != -1) - * @param columnName The property of the returned object - * @param value The value of the property from the returned object to perform a startsWith() match against + * @param columnName - The property of the returned object + * @param value - The value of the property from the returned object to perform a startsWith() match against */ public contains?(columnName: string, value: string): void; /** * [Optional] Callback method used to provide additional validation on whether the returned value from the IndexedDB Api cursor iteration, this method * must return true for the processFunc() of the openCursor() is called or the value is just added to the identified items. - * @param value The value returned by the IndexedDB IDBCursorWithValue cursor event. + * @param value - The value returned by the IndexedDB IDBCursorWithValue cursor event. * @returns true if the value matches otherwise false */ public isMatch?(value: any): boolean; diff --git a/channels/offline-channel-js/src/Providers/IndexDbProvider.ts b/channels/offline-channel-js/src/Providers/IndexDbProvider.ts index a347baae3..0c6f1a432 100644 --- a/channels/offline-channel-js/src/Providers/IndexDbProvider.ts +++ b/channels/offline-channel-js/src/Providers/IndexDbProvider.ts @@ -406,8 +406,8 @@ export class IndexedDbProvider implements IOfflineProvider { /** * Removes the values - * @param evts - */ + * @param evts - */ + _this.removeEvents = (evts: IStorageTelemetryItem[]) => { if (_indexedDb == null || !_indexedDb.isAvailable()) { return []; @@ -611,7 +611,7 @@ export class IndexedDbProvider implements IOfflineProvider { /** * Initializes the provider using the config - * @param providerContext The provider context that should be used to initialize the provider + * @param providerContext - The provider context that should be used to initialize the provider * @returns True if the provider is initialized and available for use otherwise false */ public initialize(providerContext: ILocalStorageProviderContext): boolean { diff --git a/channels/offline-channel-js/src/Providers/WebStorageProvider.ts b/channels/offline-channel-js/src/Providers/WebStorageProvider.ts index 25f39194f..0c38cc69d 100644 --- a/channels/offline-channel-js/src/Providers/WebStorageProvider.ts +++ b/channels/offline-channel-js/src/Providers/WebStorageProvider.ts @@ -144,7 +144,7 @@ export class WebStorageProvider implements IOfflineProvider { /** * Creates a WebStorageProvider using the provider storageType - * @param storageType The type of Storage provider, normal values are "localStorage" or "sessionStorage" + * @param storageType - The type of Storage provider, normal values are "localStorage" or "sessionStorage" */ constructor(storageType: string, id?: string, unloadHookContainer?: IUnloadHookContainer) { dynamicProto(WebStorageProvider, this, (_this) => { @@ -424,8 +424,8 @@ export class WebStorageProvider implements IOfflineProvider { * @ignore * Creates a new json store with the StorageJSON (may be null), a null db value indicates that the store * associated with the key is empty and should be removed. - * @param dbKey - * @param forceRemove + * @param dbKey - The key to associate with the database + * @param db - The database */ function _newStore(dbKey: string, db: IStorageJSON): IJsonStoreDetails { return { diff --git a/extensions/applicationinsights-analytics-js/src/JavaScriptSDK/AnalyticsPlugin.ts b/extensions/applicationinsights-analytics-js/src/JavaScriptSDK/AnalyticsPlugin.ts index 07403448c..fc32ed1b6 100644 --- a/extensions/applicationinsights-analytics-js/src/JavaScriptSDK/AnalyticsPlugin.ts +++ b/extensions/applicationinsights-analytics-js/src/JavaScriptSDK/AnalyticsPlugin.ts @@ -202,8 +202,8 @@ export class AnalyticsPlugin extends BaseTelemetryPlugin implements IAppInsights /** * @description Log a diagnostic message - * @param trace - * @param ICustomProperties. + * @param trace - the trace message + * @param customProperties - Additional custom properties to include in the event */ _self.trackTrace = (trace: ITraceTelemetry, customProperties?: ICustomProperties): void => { try { @@ -955,8 +955,8 @@ export class AnalyticsPlugin extends BaseTelemetryPlugin implements IAppInsights /** * @description Log a diagnostic message - * @param trace - * @param ICustomProperties. + * @param trace - the trace message + * @param customProperties - Additional custom properties to include in the event */ public trackTrace(trace: ITraceTelemetry, customProperties?: ICustomProperties): void { // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging @@ -998,8 +998,8 @@ export class AnalyticsPlugin extends BaseTelemetryPlugin implements IAppInsights /** * @ignore INTERNAL ONLY - * @param pageViewPerformance - * @param properties + * @param pageViewPerformance - The page view performance item to be sent + * @param properties - Custom properties (Part C) that a user can add to the telemetry item */ public sendPageViewPerformanceInternal(pageViewPerformance: IPageViewPerformanceTelemetryInternal, properties?: { [key: string]: any }, systemProperties?: { [key: string]: any }) { // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging @@ -1007,8 +1007,8 @@ export class AnalyticsPlugin extends BaseTelemetryPlugin implements IAppInsights /** * Send browser performance metrics. - * @param pageViewPerformance - * @param customProperties + * @param pageViewPerformance - The page view performance item to be sent + * @param customProperties - Additional data used to filter pages and metrics in the portal. Defaults to empty. */ public trackPageViewPerformance(pageViewPerformance: IPageViewPerformanceTelemetry, customProperties?: ICustomProperties): void { // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging @@ -1038,9 +1038,9 @@ export class AnalyticsPlugin extends BaseTelemetryPlugin implements IAppInsights /** * @ignore INTERNAL ONLY - * @param exception - * @param properties - * @param systemProperties + * @param exception - The exception item to be sent + * @param properties - Custom properties (Part C) that a user can add to the telemetry item + * @param systemProperties - System level properties (Part A) that a user can add to the telemetry item */ public sendExceptionInternal(exception: IExceptionTelemetry, customProperties?: { [key: string]: any }, systemProperties?: { [key: string]: any }) { // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging @@ -1060,7 +1060,7 @@ export class AnalyticsPlugin extends BaseTelemetryPlugin implements IAppInsights /** * @description Custom error handler for Application Insights Analytics - * @param exception + * @param exception - The exception item to be sent */ public _onerror(exception: IAutoExceptionTelemetry): void { // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging diff --git a/extensions/applicationinsights-cfgsync-js/src/CfgSyncPlugin.ts b/extensions/applicationinsights-cfgsync-js/src/CfgSyncPlugin.ts index 3461638f1..4f0e6e6b9 100644 --- a/extensions/applicationinsights-cfgsync-js/src/CfgSyncPlugin.ts +++ b/extensions/applicationinsights-cfgsync-js/src/CfgSyncPlugin.ts @@ -413,7 +413,7 @@ export class CfgSyncPlugin extends BaseTelemetryPlugin implements ICfgSyncPlugin /** * Get current configs of current instance. - * @param config current configs + * @param config - current configs */ public getCfg(): IConfiguration & IConfig { // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging @@ -422,7 +422,7 @@ export class CfgSyncPlugin extends BaseTelemetryPlugin implements ICfgSyncPlugin /** * Manually set configs of current instance. - * @param config new configs + * @param config - new configs */ public setCfg(config?: IConfiguration & IConfig): boolean { // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging @@ -431,7 +431,7 @@ export class CfgSyncPlugin extends BaseTelemetryPlugin implements ICfgSyncPlugin /** * Manually broadcast configs of current instance to all other instances. - * @param customDetails additional details should also be sent out to other instances + * @param customDetails - additional details should also be sent out to other instances */ public sync(customDetails?: any): boolean { // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging @@ -442,7 +442,7 @@ export class CfgSyncPlugin extends BaseTelemetryPlugin implements ICfgSyncPlugin * Manually update event name. * If current instance is the main instance, then following config changes will be sent out under this new event name. * If current instance is listener instances, it will listen to event details under this new name. - * @param eventName new event name + * @param eventName - new event name */ public updateEventListenerName(eventName?: string): boolean { // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging diff --git a/extensions/applicationinsights-cfgsync-js/src/Interfaces/ICfgSyncConfig.ts b/extensions/applicationinsights-cfgsync-js/src/Interfaces/ICfgSyncConfig.ts index b9ed1fb5a..4db270ca7 100644 --- a/extensions/applicationinsights-cfgsync-js/src/Interfaces/ICfgSyncConfig.ts +++ b/extensions/applicationinsights-cfgsync-js/src/Interfaces/ICfgSyncConfig.ts @@ -28,7 +28,7 @@ export interface ICfgSyncConfig { */ onCfgChangeReceive?: (event?: ICfgSyncEvent) => void; /** - * Overrides sync() function to broadcast changes.\ + * Overrides sync() function to broadcast changes. * @default null */ overrideSyncFn?: (config?:IConfiguration & IConfig, customDetails?: any) => boolean; @@ -40,7 +40,7 @@ export interface ICfgSyncConfig { /** * When current instance is set with syncMode: `Receive`, config fields under nonOverrideConfigs will NOT be changed by any config details sent out from other instances. * NOTE: this config will be ONLY applied during initialization, so it won't be changed dynamically - * @default {instrumentationKey:true,connectionString:true,endpointUrl:true} + * @default \{instrumentationKey:true,connectionString:true,endpointUrl:true\} */ nonOverrideConfigs?: NonOverrideCfg; /** diff --git a/extensions/applicationinsights-cfgsync-js/src/Interfaces/ICfgSyncPlugin.ts b/extensions/applicationinsights-cfgsync-js/src/Interfaces/ICfgSyncPlugin.ts index df06bdc99..bdf9c7624 100644 --- a/extensions/applicationinsights-cfgsync-js/src/Interfaces/ICfgSyncPlugin.ts +++ b/extensions/applicationinsights-cfgsync-js/src/Interfaces/ICfgSyncPlugin.ts @@ -4,24 +4,24 @@ import { IConfiguration } from "@microsoft/applicationinsights-core-js"; export declare interface ICfgSyncPlugin { /** * Get current configs of current instance. - * @param config current configs + * @param config - current configs */ getCfg(): IConfiguration & IConfig; /** * Manually set configs of current instance. - * @param config new configs + * @param config - new configs */ setCfg(config?:IConfiguration & IConfig): boolean; /** * Manually broadcast configs of current instance to all other instances. - * @param customDetails additional details should also be sent out to other instances + * @param customDetails - additional details should also be sent out to other instances */ sync(customDetails?: any): boolean; /** * Manually update event name. * If current instance is the main instance, then following config changes will be sent out under this new event name. * If current instance is listener instances, it will listen to event details under this new name. - * @param eventName new event name + * @param eventName - new event name */ updateEventListenerName(eventName?: string): boolean; /** diff --git a/extensions/applicationinsights-osplugin-js/src/DataModels.ts b/extensions/applicationinsights-osplugin-js/src/DataModels.ts index cbbe5b375..6bc48bf7c 100644 --- a/extensions/applicationinsights-osplugin-js/src/DataModels.ts +++ b/extensions/applicationinsights-osplugin-js/src/DataModels.ts @@ -14,13 +14,11 @@ export interface IOSPluginConfiguration { /** * Maximum time to wait for the OS plugin to return the OS information * Default: 200 - * @type {number} */ maxTimeout?: number; /** * Whether to merge the OS name and version into one field * Default: undefined - * @type {boolean} */ mergeOsNameVersion?: boolean; } diff --git a/shared/1ds-core-js/src/Utils.ts b/shared/1ds-core-js/src/Utils.ts index a70ee3709..f81a99698 100644 --- a/shared/1ds-core-js/src/Utils.ts +++ b/shared/1ds-core-js/src/Utils.ts @@ -331,7 +331,7 @@ export function setProcessTelemetryTimings(event: ITelemetryItem, identifier: st /** * Returns a bitwise value for the FieldValueSanitizerType enum representing the decoded type of the passed value - * @param value The value to determine the type + * @param value - The value to determine the type */ export function getFieldValueType(value: any): FieldValueSanitizerType { let theType: FieldValueSanitizerType = FieldValueSanitizerType.NotSet; diff --git a/shared/AppInsightsCommon/src/Interfaces/IConfig.ts b/shared/AppInsightsCommon/src/Interfaces/IConfig.ts index f4f292b77..a30f31ba3 100644 --- a/shared/AppInsightsCommon/src/Interfaces/IConfig.ts +++ b/shared/AppInsightsCommon/src/Interfaces/IConfig.ts @@ -147,7 +147,7 @@ export interface IConfig { disableFlushOnBeforeUnload?: boolean; /** - * Default value of {@link #disableFlushOnBeforeUnload}. If true, flush method will not be called when onPageHide or onVisibilityChange (hidden state) event(s) trigger. + * Default value of `disableFlushOnBeforeUnload`. If true, flush method will not be called when onPageHide or onVisibilityChange (hidden state) event(s) trigger. */ disableFlushOnUnload?: boolean; @@ -209,13 +209,13 @@ export interface IConfig { isStorageUseDisabled?: boolean; /** - * If false, the SDK will send all telemetry using the [Beacon API](https://www.w3.org/TR/beacon) + * If false, the SDK will send all telemetry using the Beacon API. * @defaultValue true */ isBeaconApiDisabled?: boolean; /** - * Don't use XMLHttpRequest or XDomainRequest (for IE < 9) by default instead attempt to use fetch() or sendBeacon. + * Don't use XMLHttpRequest or XDomainRequest (for IE \< 9) by default instead attempt to use fetch() or sendBeacon. * If no other transport is available it will still use XMLHttpRequest */ disableXhr?: boolean; diff --git a/shared/AppInsightsCommon/src/Interfaces/IEventTelemetry.ts b/shared/AppInsightsCommon/src/Interfaces/IEventTelemetry.ts index f3ce7ad6d..f072867f1 100644 --- a/shared/AppInsightsCommon/src/Interfaces/IEventTelemetry.ts +++ b/shared/AppInsightsCommon/src/Interfaces/IEventTelemetry.ts @@ -6,13 +6,11 @@ import { IPartC } from "./IPartC"; export interface IEventTelemetry extends IPartC { /** * @description An event name string - * @type {string} */ name: string; /** * @description custom defined iKey - * @type {string} */ iKey?: string; } diff --git a/shared/AppInsightsCommon/src/Interfaces/IExceptionTelemetry.ts b/shared/AppInsightsCommon/src/Interfaces/IExceptionTelemetry.ts index c3374b5b6..ff60cc640 100644 --- a/shared/AppInsightsCommon/src/Interfaces/IExceptionTelemetry.ts +++ b/shared/AppInsightsCommon/src/Interfaces/IExceptionTelemetry.ts @@ -16,14 +16,12 @@ export interface IExceptionTelemetry extends IPartC { id?: string; /** - * @deprecated - * @type {Error} - * @description DEPRECATED: Please use exception instead. Behavior/usage for exception remains the same as this field. + * @deprecated Please use the `exception` field instead. The behavior and usage of `exception` remains the same as this field. + * Unique guid identifying this error. */ error?: Error; /** - * @type {Error} * @description Error Object(s) */ exception?: Error | IAutoExceptionTelemetry; @@ -31,7 +29,6 @@ export interface IExceptionTelemetry extends IPartC { /** * @description Specified severity of exception for use with * telemetry filtering in dashboard - * @type {(SeverityLevel | number)} */ severityLevel?: SeverityLevel | number; } @@ -44,55 +41,46 @@ export interface IExceptionTelemetry extends IPartC { export interface IAutoExceptionTelemetry { /** * @description error message. Available as event in HTML onerror="" handler - * @type {string} */ message: string; /** * @description URL of the script where the error was raised - * @type {string} */ url: string; /** * @description Line number where error was raised - * @type {number} */ lineNumber: number; /** * @description Column number for the line where the error occurred - * @type {number} */ columnNumber: number; /** * @description Error Object (object) - * @type {any} */ error: any; /** * @description The event at the time of the exception (object) - * @type {Event|string} */ evt?: Event|string; /** * @description The provided stack for the error - * @type {IStackDetails} */ stackDetails?: IStackDetails; /** * @description The calculated type of the error - * @type {string} */ typeName?: string; /** * @description The descriptive source of the error - * @type {string} */ errorSrc?: string; } diff --git a/shared/AppInsightsCommon/src/Interfaces/IMetricTelemetry.ts b/shared/AppInsightsCommon/src/Interfaces/IMetricTelemetry.ts index b05d26f4b..0c391b723 100644 --- a/shared/AppInsightsCommon/src/Interfaces/IMetricTelemetry.ts +++ b/shared/AppInsightsCommon/src/Interfaces/IMetricTelemetry.ts @@ -6,33 +6,28 @@ import { IPartC } from "./IPartC"; export interface IMetricTelemetry extends IPartC { /** * @description (required) - name of this metric - * @type {string} */ name: string; /** * @description (required) - Recorded value/average for this metric - * @type {number} */ average: number; /** * @description (optional) Number of samples represented by the average. - * @type {number=} * @default sampleCount=1 */ sampleCount?: number; /** * @description (optional) The smallest measurement in the sample. Defaults to the average - * @type {number} * @default min=average */ min?: number; /** * @description (optional) The largest measurement in the sample. Defaults to the average. - * @type {number} * @default max=average */ max?: number; @@ -44,7 +39,6 @@ export interface IMetricTelemetry extends IPartC { /** * @description custom defined iKey - * @type {string} */ iKey?: string; } diff --git a/shared/AppInsightsCommon/src/Interfaces/ITraceTelemetry.ts b/shared/AppInsightsCommon/src/Interfaces/ITraceTelemetry.ts index ff4029aa3..2c188d8e1 100644 --- a/shared/AppInsightsCommon/src/Interfaces/ITraceTelemetry.ts +++ b/shared/AppInsightsCommon/src/Interfaces/ITraceTelemetry.ts @@ -7,19 +7,16 @@ import { IPartC } from "./IPartC"; export interface ITraceTelemetry extends IPartC { /** * @description A message string - * @type {string} */ message: string; /** * @description Severity level of the logging message used for filtering in the portal - * @type {SeverityLevel} */ severityLevel?: SeverityLevel; /** * @description custom defiend iKey - * @type {SeverityLevel} */ iKey?: string; } diff --git a/shared/AppInsightsCommon/src/Offline.ts b/shared/AppInsightsCommon/src/Offline.ts index f3e683030..b52a61a6a 100644 --- a/shared/AppInsightsCommon/src/Offline.ts +++ b/shared/AppInsightsCommon/src/Offline.ts @@ -5,7 +5,7 @@ import { /** * this is the callback that will be called when the network status changes - * @param onlineState this is the current network running state + * @param onlineState - this is the current network running state */ export type OfflineCallback = (onlineState: IOfflineState) => void; diff --git a/shared/AppInsightsCommon/src/TelemetryItemCreator.ts b/shared/AppInsightsCommon/src/TelemetryItemCreator.ts index 9a061ae2d..3e9c4b7d0 100644 --- a/shared/AppInsightsCommon/src/TelemetryItemCreator.ts +++ b/shared/AppInsightsCommon/src/TelemetryItemCreator.ts @@ -11,7 +11,7 @@ import { dataSanitizeString } from "./Telemetry/Common/DataSanitizer"; * Create a telemetry item that the 1DS channel understands * @param item - domain specific properties; part B * @param baseType - telemetry item type. ie PageViewData - * @param envelopeName - name of the envelope. ie Microsoft.ApplicationInsights..PageView + * @param envelopeName - Name of the envelope, e.g., `Microsoft.ApplicationInsights.\.PageView`. * @param customProperties - user defined custom properties; part C * @param systemProperties - system properties that are added to the context; part A * @returns ITelemetryItem that is sent to channel @@ -65,7 +65,7 @@ export class TelemetryItemCreator { * Create a telemetry item that the 1DS channel understands * @param item - domain specific properties; part B * @param baseType - telemetry item type. ie PageViewData - * @param envelopeName - name of the envelope. ie Microsoft.ApplicationInsights..PageView + * @param envelopeName - Name of the envelope (e.g., Microsoft.ApplicationInsights.[instrumentationKey].PageView). * @param customProperties - user defined custom properties; part C * @param systemProperties - system properties that are added to the context; part A * @returns ITelemetryItem that is sent to channel diff --git a/shared/AppInsightsCommon/src/ThrottleMgr.ts b/shared/AppInsightsCommon/src/ThrottleMgr.ts index 680d48d9b..16ce382ed 100644 --- a/shared/AppInsightsCommon/src/ThrottleMgr.ts +++ b/shared/AppInsightsCommon/src/ThrottleMgr.ts @@ -125,7 +125,7 @@ export class ThrottleMgr { /** * Set isReady State * if isReady set to true, message queue will be flushed automatically. - * @param isReady isReady State + * @param isReady - isReady State * @pa * @returns if message queue is flushed */ diff --git a/shared/AppInsightsCore/src/Config/DynamicConfig.ts b/shared/AppInsightsCore/src/Config/DynamicConfig.ts index c10a85350..eb7a15c41 100644 --- a/shared/AppInsightsCore/src/Config/DynamicConfig.ts +++ b/shared/AppInsightsCore/src/Config/DynamicConfig.ts @@ -153,7 +153,6 @@ function _createDynamicHandler(logger: IDiagnosticLogger, ta /** * Log an invalid access message to the console - * @param message */ function _logInvalidAccess(logger: IDiagnosticLogger, message: string) { if (logger) { @@ -185,8 +184,6 @@ export function createDynamicConfig(config: T, defaultConfig /** * Watch and track changes for accesses to the current config, the provided config MUST already be * a dynamic config or a child accessed via the dynamic config - * @param config - * @param configHandler * @param logger - The logger instance to use if there is no existing handler * @returns A watcher handler instance that can be used to remove itself when being unloaded * @throws TypeError if the provided config is not a dynamic config instance diff --git a/shared/AppInsightsCore/src/Config/DynamicSupport.ts b/shared/AppInsightsCore/src/Config/DynamicSupport.ts index d4f89b62b..c7e8e2193 100644 --- a/shared/AppInsightsCore/src/Config/DynamicSupport.ts +++ b/shared/AppInsightsCore/src/Config/DynamicSupport.ts @@ -55,7 +55,6 @@ export function _cfgDeepCopy(source: T): T { /** * @internal * Get the dynamic config handler if the value is already dynamic - * @param value * @returns */ export function getDynamicConfigHandler(value: V | IDynamicConfigHandler): IDynamicConfigHandler | null { diff --git a/shared/AppInsightsCore/src/JavaScriptSDK.Enums/EnumHelperFuncs.ts b/shared/AppInsightsCore/src/JavaScriptSDK.Enums/EnumHelperFuncs.ts index f853afbec..0ba268801 100644 --- a/shared/AppInsightsCore/src/JavaScriptSDK.Enums/EnumHelperFuncs.ts +++ b/shared/AppInsightsCore/src/JavaScriptSDK.Enums/EnumHelperFuncs.ts @@ -6,14 +6,14 @@ import { EnumCls, createEnum, createTypeMap } from "@nevware21/ts-utils"; export declare type EnumValue = EnumCls; /** - * Create an enum style object which has both the key => value and value => key mappings + * Create an enum style object which has both the key \=> value and value \=> key mappings * @param values - The values to populate on the new object * @returns */ export const createEnumStyle: (values: { [key in keyof E]: E[keyof E] }) => EnumValue = createEnum; /** - * Create a 2 index map that maps an enum's key and value to the defined map value, X["key"] => mapValue and X[0] => mapValue. + * Create a 2 index map that maps an enum's key and value to the defined map value, X["key"] \=> mapValue and X[0] \=> mapValue. * Generic values * - E = the const enum type (typeof eRequestHeaders); * - V = Identifies the valid values for the keys, this should include both the enum numeric and string key of the type. The diff --git a/shared/AppInsightsCore/src/JavaScriptSDK.Interfaces/IAppInsightsCore.ts b/shared/AppInsightsCore/src/JavaScriptSDK.Interfaces/IAppInsightsCore.ts index 124114b08..fbb62ba7c 100644 --- a/shared/AppInsightsCore/src/JavaScriptSDK.Interfaces/IAppInsightsCore.ts +++ b/shared/AppInsightsCore/src/JavaScriptSDK.Interfaces/IAppInsightsCore.ts @@ -153,7 +153,6 @@ export interface IAppInsightsCore(pluginIdentifier: string): ILoadedPlugin; @@ -217,7 +216,6 @@ export interface IAppInsightsCore): IUnloadHook; diff --git a/shared/AppInsightsCore/src/JavaScriptSDK.Interfaces/IChannelControls.ts b/shared/AppInsightsCore/src/JavaScriptSDK.Interfaces/IChannelControls.ts index 68632534b..3d2e3ca9c 100644 --- a/shared/AppInsightsCore/src/JavaScriptSDK.Interfaces/IChannelControls.ts +++ b/shared/AppInsightsCore/src/JavaScriptSDK.Interfaces/IChannelControls.ts @@ -22,34 +22,33 @@ export interface IInternalOfflineSupport { getUrl: () => string; /** * Create payload data - * @param data data * @returns IPayloadData */ createPayload: (data: string | Uint8Array) => IPayloadData; /** * Serialize an item into a string - * @param input telemetry item - * @param convertUndefined convert undefined to a custom-defined object + * @param input - telemetry item + * @param convertUndefined - convert undefined to a custom-defined object * @returns Serialized string */ serialize?: (input: ITelemetryItem, convertUndefined?: any) => string; /** * Batch an array of strings into one string - * @param arr array of strings + * @param arr - array of strings * @returns a string represent all items in the given array */ batch?: (arr: string[]) => string; /** * If the item should be processed by offline channel - * @param evt telemetry item + * @param evt - telemetry item * @returns should process or not */ shouldProcess?: (evt: ITelemetryItem) => boolean; /** * Create 1ds payload data - * @param evts ITelemetryItems + * @param evts - ITelemetryItems * @returns IPayloadData */ createOneDSPayload?: (evts: ITelemetryItem[]) => IPayloadData; diff --git a/shared/AppInsightsCore/src/JavaScriptSDK.Interfaces/IConfiguration.ts b/shared/AppInsightsCore/src/JavaScriptSDK.Interfaces/IConfiguration.ts index ac30e3bc9..d2ba58b7c 100644 --- a/shared/AppInsightsCore/src/JavaScriptSDK.Interfaces/IConfiguration.ts +++ b/shared/AppInsightsCore/src/JavaScriptSDK.Interfaces/IConfiguration.ts @@ -50,8 +50,8 @@ export interface IConfiguration { * be logged to console if their severity meets the configured loggingConsoleLevel * * 0: ALL console logging off - * 1: logs to console: severity >= CRITICAL - * 2: logs to console: severity >= WARNING + * 1: logs to console: severity \>= CRITICAL + * 2: logs to console: severity \>= WARNING */ loggingLevelConsole?: number; @@ -61,8 +61,8 @@ export interface IConfiguration { * the configured instrumentation key. * * 0: ALL iKey logging off - * 1: logs to iKey: severity >= CRITICAL - * 2: logs to iKey: severity >= WARNING + * 1: logs to iKey: severity \>= CRITICAL + * 2: logs to iKey: severity \>= WARNING */ loggingLevelTelemetry?: number @@ -93,7 +93,6 @@ export interface IConfiguration { readonly channels?: IChannelControls[][]; /** - * @type {boolean} * Flag that disables the Instrumentation Key validation. */ disableInstrumentationKeyValidation?: boolean; @@ -129,7 +128,6 @@ export interface IConfiguration { /** * @description Custom cookie domain. This is helpful if you want to share Application Insights cookies across subdomains. It * can be set here or as part of the cookieCfg.domain, the cookieCfg takes precedence if both are specified. - * @type {string} * @defaultValue "" */ cookieDomain?: string; @@ -137,7 +135,6 @@ export interface IConfiguration { /** * @description Custom cookie path. This is helpful if you want to share Application Insights cookies behind an application * gateway. It can be set here or as part of the cookieCfg.domain, the cookieCfg takes precedence if both are specified. - * @type {string} * @defaultValue "" */ cookiePath?: string; diff --git a/shared/AppInsightsCore/src/JavaScriptSDK.Interfaces/ICookieMgr.ts b/shared/AppInsightsCore/src/JavaScriptSDK.Interfaces/ICookieMgr.ts index a43b3e1bf..88e542e10 100644 --- a/shared/AppInsightsCore/src/JavaScriptSDK.Interfaces/ICookieMgr.ts +++ b/shared/AppInsightsCore/src/JavaScriptSDK.Interfaces/ICookieMgr.ts @@ -55,7 +55,7 @@ export interface ICookieMgr { /** * Optional Callback hook to allow the cookie manager to update it's configuration, not generally implemented now that * dynamic configuration is supported - * @param updateState + * @param updateState - The new configuration state to apply to the cookie manager */ update?(updateState: ITelemetryUpdateState): void; diff --git a/shared/AppInsightsCore/src/JavaScriptSDK.Interfaces/IDiagnosticLogger.ts b/shared/AppInsightsCore/src/JavaScriptSDK.Interfaces/IDiagnosticLogger.ts index beaa18b47..fbc0bc0a8 100644 --- a/shared/AppInsightsCore/src/JavaScriptSDK.Interfaces/IDiagnosticLogger.ts +++ b/shared/AppInsightsCore/src/JavaScriptSDK.Interfaces/IDiagnosticLogger.ts @@ -60,7 +60,7 @@ export interface IDiagnosticLogger { /** * Optional Callback hook to allow the diagnostic logger to update it's configuration - * @param updateState + * @param updateState - The new configuration state to apply to the diagnostic logger */ update?(updateState: ITelemetryUpdateState): void; diff --git a/shared/AppInsightsCore/src/JavaScriptSDK.Interfaces/IDistributedTraceContext.ts b/shared/AppInsightsCore/src/JavaScriptSDK.Interfaces/IDistributedTraceContext.ts index be1758252..1655ce517 100644 --- a/shared/AppInsightsCore/src/JavaScriptSDK.Interfaces/IDistributedTraceContext.ts +++ b/shared/AppInsightsCore/src/JavaScriptSDK.Interfaces/IDistributedTraceContext.ts @@ -10,7 +10,7 @@ export interface IDistributedTraceContext { /** * Sets the current name of the page - * @param pageName + * @param pageName - The name of the page */ setName(pageName: string): void; @@ -48,7 +48,7 @@ export interface IDistributedTraceContext { /** * https://www.w3.org/TR/trace-context/#trace-flags - * @param newValue + * @param newValue - An integer representation of the W3C TraceContext trace-flags. */ setTraceFlags(newValue?: number): void; } diff --git a/shared/AppInsightsCore/src/JavaScriptSDK.Interfaces/IExceptionConfig.ts b/shared/AppInsightsCore/src/JavaScriptSDK.Interfaces/IExceptionConfig.ts index d9ccdb8f5..3406d14e2 100644 --- a/shared/AppInsightsCore/src/JavaScriptSDK.Interfaces/IExceptionConfig.ts +++ b/shared/AppInsightsCore/src/JavaScriptSDK.Interfaces/IExceptionConfig.ts @@ -36,10 +36,10 @@ export interface IExceptionConfig{ * * This callback is called before telemetry data is sent, allowing for dynamic customization of the logs. * - * @returns {Object} An object with the following property: + * @returns An object with the following property: * - logs: An array of strings, where each string represents a log entry to be included in the telemetry. * - * @property {number} maxLogs - Specifies the maximum number of logs that can be generated. If not explicitly set, it defaults to 50. + * @property maxLogs - Specifies the maximum number of logs that can be generated. If not explicitly set, it defaults to 50. */ expLog?: () => { logs: string[] }, diff --git a/shared/AppInsightsCore/src/JavaScriptSDK.Interfaces/INotificationListener.ts b/shared/AppInsightsCore/src/JavaScriptSDK.Interfaces/INotificationListener.ts index ee6f6f6d8..0c762247a 100644 --- a/shared/AppInsightsCore/src/JavaScriptSDK.Interfaces/INotificationListener.ts +++ b/shared/AppInsightsCore/src/JavaScriptSDK.Interfaces/INotificationListener.ts @@ -35,7 +35,7 @@ export interface INotificationListener { /** * [Optional] This event is sent if you have enabled perf events, they are primarily used to track internal performance testing and debugging * the event can be displayed via the debug plugin extension. - * @param perfEvent + * @param perfEvent - The performance event object */ perfEvent?: (perfEvent: IPerfEvent) => void; diff --git a/shared/AppInsightsCore/src/JavaScriptSDK.Interfaces/ISenderPostManager.ts b/shared/AppInsightsCore/src/JavaScriptSDK.Interfaces/ISenderPostManager.ts index 0e5ec0fc1..7bfdc6a26 100644 --- a/shared/AppInsightsCore/src/JavaScriptSDK.Interfaces/ISenderPostManager.ts +++ b/shared/AppInsightsCore/src/JavaScriptSDK.Interfaces/ISenderPostManager.ts @@ -11,32 +11,32 @@ import { IPayloadData, IXHROverride, OnCompleteCallback } from "./IXHROverride"; export interface _ISenderOnComplete { /** * defined xdr onload function to handle response - * @param dxr xdr request object - * @param oncomplete oncomplete function + * @param dxr - xdr request object + * @param oncomplete - oncomplete function * @since version after 3.1.0 */ xdrOnComplete?(xdr: IXDomainRequest, onComplete: OnCompleteCallback, payload?: IPayloadData): void; /** * defined fetch on complete function to handle response - * @param response response object - * @param onComplete oncomplete function - * @param resValue response.text().value + * @param response - response object + * @param onComplete - oncomplete function + * @param resValue - response.text().value * @since version after 3.1.0 */ fetchOnComplete?(response: Response, onComplete: OnCompleteCallback, resValue?: string, payload?: IPayloadData): void; /** * defined xhr onreadystatechange function to handle response - * @param request request object - * @param oncomplete oncomplete function + * @param request - request object + * @param oncomplete - oncomplete function * @since version after 3.1.0 */ xhrOnComplete?(request: XMLHttpRequest, onComplete: OnCompleteCallback, payload?: IPayloadData):void; /** * Define functions during beacon can not send payload after first attempt. If not defined, will be apyload will be retried with fallback sender. - * @param data payload data - * @param onComplete oncomplete function - * @param canSend can the current data sent by beacon sender + * @param data - payload data + * @param onComplete - oncomplete function + * @param canSend - can the current data sent by beacon sender * @since version after 3.1.0 */ beaconOnRetry?(data: IPayloadData, onComplete: OnCompleteCallback, canSend:(payload: IPayloadData, oncomplete: OnCompleteCallback, sync?: boolean) => boolean): void; diff --git a/shared/AppInsightsCore/src/JavaScriptSDK/CookieMgr.ts b/shared/AppInsightsCore/src/JavaScriptSDK/CookieMgr.ts index d47a619d9..de30f2dc1 100644 --- a/shared/AppInsightsCore/src/JavaScriptSDK/CookieMgr.ts +++ b/shared/AppInsightsCore/src/JavaScriptSDK/CookieMgr.ts @@ -136,8 +136,8 @@ function _isCfgEnabled(rootConfig: IConfiguration, cookieMgrConfig: ICookieMgrCo /** * Helper to return the ICookieMgr from the core (if not null/undefined) or a default implementation * associated with the configuration or a legacy default. - * @param core - * @param config + * @param core - The AppInsightsCore instance to get the cookie manager from + * @param config - The config to use if the core is not available * @returns */ export function safeGetCookieMgr(core: IAppInsightsCore, config?: IConfiguration) { diff --git a/shared/AppInsightsCore/src/JavaScriptSDK/EnvUtils.ts b/shared/AppInsightsCore/src/JavaScriptSDK/EnvUtils.ts index 4d50f27d6..cdcb2ae4c 100644 --- a/shared/AppInsightsCore/src/JavaScriptSDK/EnvUtils.ts +++ b/shared/AppInsightsCore/src/JavaScriptSDK/EnvUtils.ts @@ -66,7 +66,7 @@ function _hasProperty(theClass: any, property: string) { /** * Enable the lookup of test mock objects if requested - * @param enabled + * @param enabled - A flag to enable or disable the mock */ export function setEnableEnvMocks(enabled: boolean) { _enableMocks = enabled; @@ -286,7 +286,7 @@ function _getNamedValue(values: any, name: string) { /** * Helper function to fetch the named meta-tag from the page. - * @param name + * @param name - The name of the meta-tag to find. */ export function findMetaTag(name: string): any { let doc = getDocument(); @@ -300,7 +300,7 @@ export function findMetaTag(name: string): any { /** * Helper function to fetch the named server timing value from the page response (first navigation event). - * @param name + * @param name - The name of the server timing value to find. */ export function findNamedServerTiming(name: string): any { let value: any; diff --git a/shared/AppInsightsCore/src/JavaScriptSDK/RandomHelper.ts b/shared/AppInsightsCore/src/JavaScriptSDK/RandomHelper.ts index 40b095cbf..bd0a591f0 100644 --- a/shared/AppInsightsCore/src/JavaScriptSDK/RandomHelper.ts +++ b/shared/AppInsightsCore/src/JavaScriptSDK/RandomHelper.ts @@ -40,7 +40,7 @@ function _autoSeedMwc() { /** * Generate a random value between 0 and maxValue, max value should be limited to a 32-bit maximum. * So maxValue(16) will produce a number from 0..16 (range of 17) - * @param maxValue + * @param maxValue - The max value for the range */ export function randomValue(maxValue: number) { if (maxValue > 0) { diff --git a/shared/AppInsightsCore/src/JavaScriptSDK/W3cTraceParent.ts b/shared/AppInsightsCore/src/JavaScriptSDK/W3cTraceParent.ts index ca62f1723..5faafaacc 100644 --- a/shared/AppInsightsCore/src/JavaScriptSDK/W3cTraceParent.ts +++ b/shared/AppInsightsCore/src/JavaScriptSDK/W3cTraceParent.ts @@ -128,7 +128,7 @@ export function isValidSpanId(value: string): boolean { /** * Validates that the provided ITraceParent instance conforms to the currently supported specifications - * @param value + * @param value - The parsed traceParent value * @returns */ export function isValidTraceParent(value: ITraceParent) { @@ -213,7 +213,7 @@ export interface scriptsInfo { /** * Find all script tags in the provided document and return the information about them. - * @param doc + * @param doc - The document to search for script tags * @returns */ export function findAllScripts(doc: any) {