import type { IEngagementData, IEngagementHandler } from './IEngagementHandler'; import type ILogEntry from '../ILogEntry'; /** * Engagement logging * use *.Click for all the actions triggered by mouse, keyboard, or touch. * if you want to add more data or the action is not click but keydown. * Use extraData to log the type of action or use extraData to log details wrapped in LogEntry * @internal */ export default class EngagementLogger { private static _logManager; private static _shouldProcessInRealTime; private static _handler; /** * Init function for the passed logger object */ static _addHandler(logger: IEngagementHandler): void; /** * Starts processing logs in real time */ static startRealTimeProcessing(): void; /** * Engagement logging * * @remarks * Use *.Click for all the actions triggered by mouse, keyboard, or touch. * tagName follows `.controlName.actionName` pattern * For example, `{ name = "AddButton.Click" }`, * this logs `".AddButton.Click"` with default action triggered by mouse, keyboard, or touch. * `` is set in Telemetry settings * `IEngagementData` interface is mapped to a set of enums for standardization of mapping. * Add new items to enum in order to register a new item specification. * SiteType is defined in SiteType enum * CurrentPage is defined in CurrentPage enum * Component is defined in Component enum * Feature is defined in Feature enum. */ static log(engagementData: IEngagementData): void; /** * Engagement logging * * @remarks * Use *.Click for all the actions triggered by mouse, keyboard, or touch. * tagName follows `.controlName.actionName` pattern * For example, `tagName = "AddButton.Click"`, * this logs `".AddButton.Click"` with default action triggered by mouse, keyboard, or touch. * `` is set in Telemetry settings * Use extraData to log the type of action. * For example, `actionName = "Keydown"` and `tagName = "ModernPublish.AddButton.Click"` * this logs `".AddButton.Click"` with the extraData that it was selected using the Keydown */ static logEvent(tagName: string, actionName?: string): void; /** * Engagement logging with LogEntry * * @remarks * Here is an example: * ``` * {"EngagementName":"SPPage.NavigationAction.SPPageQuickLaunchUpdate"`, * "Properties":"{\"message\":\"[NavigationAction] | SPPageQuickLaunchUpdate | 2 | null\"}", * "Duration":0,"LogType":0, * "ClientTime":1459357627444,"Source":"ClientV2Engagement"} * ``` * * NavigationAction is moduleName in LogEntry, SPPageQuickLaunchUpdate is log feature name * In this example, SPPage is workload name which is set in Telemetry settings. * Do NOT add PII data! */ static logEventWithLogEntry(logEntry: ILogEntry): void; private static _logEngagementData; private static _checkValidTagName; private static _addContextData; private static _appendExtraData; } //# sourceMappingURL=EngagementLogger.d.ts.map