export declare class Logger { private static isLoggerActive; private static lastCheck; private static checkInterval; private static logLevel; private static packageLogsData; private static applicationLogsData; private static readonly LOG_LEVELS; private static readonly SYNC_INTERVAL_MS; private static nextSyncTime; private static appLogs; private static mftsccsBrowser; static logApplicationActivationStatus: boolean; static logPackageActivationStatus: boolean; private static autoSyncInterval; /** * Automatically starts the auto-sync mechanism. * This is private and does not need external interaction. */ static startAutoSync(): void; /** * Automatically stops the auto-sync mechanism when required. */ static stopAutoSync(): void; /** * Set the log level (e.g., "DEBUG", "INFO", "WARNING", "ERROR"). */ static setLogLevel(level: string): void; /** * Determines whether the current log level permits the given level to be logged. */ private static shouldLog; /** * Logs a message with optional additional structured data. */ static formatLogData(level: string, message: string, data?: LogData): any; static log(level: 'INFO' | 'ERROR' | 'DEBUG' | 'WARNING', message: string, data?: any | null): void; /** * Updates log data with execution details. * @param logData The log data object to be updated. */ static logUpdate(logData: LogData): {} | undefined; static logfunction(myFunction: string, ...args: any[]): any; static logError(startTime: number, userId: string | number, operationType?: "read" | "create" | "update" | "delete" | "search", requestFrom?: string, requestIP?: string, responseStatus?: number, responseData?: any, functionName?: string, functionParameters?: any[], userAgent?: string, conceptsUsed?: string[]): void; static logApplication(level: string, message: string, data?: any): void; static checkLoggerServerStatus(): Promise; /** * Helper method to send logs to the server. */ static sendApplicationLogsToServer(): Promise; static sendPackageLogsToServer(): Promise; /** * Helper method to save logs to localStorage. */ private static saveLogToLocalStorage; private static clearLogsFromLocalStorage; } /** * Represents the structure of log data used for application monitoring and anomaly detection. */ export interface LogData { /** * The userId of the request */ userId?: string | Number; /** * The type of operation performed (e.g., create, read, update, delete). * @example "create" */ operationType?: 'create' | 'read' | 'update' | 'delete' | 'search'; /** * The origin of the request (e.g., browser, API client). * @example "Browser" */ requestFrom?: string; /** * The IP address of the client making the request. * @example "192.168.1.1" */ requestIP?: string; /** * The HTTP status code of the request. * @example "200", "404", "500" */ responseStatus?: string | Number; /** * The time taken to execute the function. * @example "150ms" */ responseTime?: string; /** * The start and end time */ startTime: number; endTime?: number; /** * The size of the response payload. * @example "15KB", "1.2MB" */ responseSize?: string; /** * The Session Id */ sessionId?: string | number; /** * The name of the function being logged. * @example "fetchUserData" */ functionName?: string; applicationId?: number; /** * The error return * @example function could not execute */ errorMessage?: string; /** * The parameters used in the function. * This should include all inputs to the function. * @example [ "userId", "concept" ] */ functionParameters?: any[]; /** * The user agent details for the request. * This includes information such as the browser or device making the request. * @example "Mozilla/5.0 (Windows NT 10.0; Win64; x64)" */ userAgent?: string; /** * A list of concepts (features or modules) used during the function execution. * @example [105292435 , 105292431 ] */ conceptsUsed?: string[]; /** * Service worker * @example boolean */ serviceWorker?: boolean; } /**getCookie * * @param cname The name of the cookie * @returns Cookie value */ export declare function getCookie(cname: string): string | null;