import { BaseErrorTrackingProvider } from '../../base-error-tracking-provider.js'; import type { ProviderConfig, ConsentSettings } from '../../../types/provider.js'; import type { ErrorContext } from '../../../definitions.js'; interface LogRocketConfig extends ProviderConfig { appID?: string; /** @deprecated Documented lowercase alias for `appID`. */ appId?: string; release?: string; serverURL?: string; shouldCaptureIP?: boolean; console?: { shouldAggregateConsoleErrors?: boolean; isEnabled?: { log?: boolean; info?: boolean; warn?: boolean; error?: boolean; debug?: boolean; }; }; network?: { requestSanitizer?: (request: any) => any; responseSanitizer?: (response: any) => any; isEnabled?: boolean; }; dom?: { inputSanitizer?: boolean; textSanitizer?: boolean; isEnabled?: boolean; }; parentDomain?: string; ingestServer?: string; mergeIframes?: boolean; shouldDebugLog?: boolean; shouldParseXHRBlob?: boolean; shouldDetectExceptions?: boolean; shouldCaptureCaught?: boolean; rootHostname?: string; uploadTimeInterval?: number; captureExceptions?: boolean; tryCatch?: boolean; shouldAugmentNPS?: boolean; shouldCaptureWebVitals?: boolean; beforeSend?: (event: any) => any; childDomains?: string[]; enableStrictPrivacy?: boolean; redactionTags?: string[]; privacySettings?: { strictPrivacy?: boolean; logLevel?: 'silent' | 'error' | 'warn' | 'info' | 'debug'; }; } interface LogRocketSDK { init: (appID: string, config?: any) => void; identify: (uid: string, traits?: any) => void; track: (event: string, properties?: any) => void; captureException: (exception: Error | string, extra?: any) => void; captureMessage: (message: string, level?: string, extra?: any) => void; addTag: (key: string, value: string) => void; startNewSession: () => void; getSessionURL: (callback: (url: string) => void) => void; sessionURL: string; version: string; isActive: () => boolean; stop: () => void; log: { info: (message: string, extra?: any) => void; warn: (message: string, extra?: any) => void; error: (message: string, extra?: any) => void; debug: (message: string, extra?: any) => void; log: (message: string, extra?: any) => void; }; reduxMiddleware: (options?: any) => any; getReduxMiddleware: (options?: any) => any; reduxEnhancer: (options?: any) => any; getReduxEnhancer: (options?: any) => any; captureConsoleLog: (level: string, message: string, extra?: any) => void; captureNetworkRequest: (request: any) => void; captureNetworkResponse: (response: any) => void; addTags: (tags: Record) => void; removeTags: (tagKeys: string[]) => void; clearTags: () => void; tagKey: (key: string) => string; tagValue: (value: string) => string; } declare global { interface Window { LogRocket?: LogRocketSDK; } } export declare class LogRocketErrorTrackingProvider extends BaseErrorTrackingProvider { readonly id = "logrocket"; readonly name = "LogRocket Error Tracking"; readonly version = "1.0.0"; private logRocket?; private _logRocketConfig; private scriptLoaded; protected doInitialize(config: LogRocketConfig): Promise; private loadLogRocketSDK; protected doShutdown(): Promise; protected doUpdateConsent(consent: ConsentSettings): Promise; protected doLogError(error: Error | string, context?: ErrorContext): Promise; private mapSeverityToLogRocketLevel; protected doSetUserContext(user: Record): void; protected doSetExtraContext(key: string, value: any): void; protected doSetTags(tags: Record): void; protected doCaptureException(exception: Error, context: ErrorContext): Promise; protected doProviderReset(): Promise; protected doEnable(): Promise; protected doDisable(): Promise; protected doAddBreadcrumb(message: string, category?: string, data?: Record): void; protected doCaptureBreadcrumb(breadcrumb: { message: string; category?: string; level?: string; data?: Record; }): Promise; protected doSetDebugMode(enabled: boolean): void; /** * Track a custom event */ trackEvent(event: string, properties?: Record): void; /** * Add a single tag */ addTag(key: string, value: string): void; /** * Add multiple tags */ addTags(tags: Record): void; /** * Remove tags */ removeTags(tagKeys: string[]): void; /** * Clear all tags */ clearTags(): void; /** * Start a new session */ startNewSession(): void; /** * Get the current session URL */ getSessionURL(callback: (url: string) => void): void; /** * Get the current session URL synchronously */ getSessionURLSync(): string; /** * Check if LogRocket is active */ isActive(): boolean; /** * Get LogRocket version */ getVersion(): string; /** * Get Redux middleware */ getReduxMiddleware(options?: any): any; /** * Get Redux enhancer */ getReduxEnhancer(options?: any): any; /** * Capture console log */ captureConsoleLog(level: string, message: string, extra?: any): void; /** * Capture network request */ captureNetworkRequest(request: any): void; /** * Capture network response */ captureNetworkResponse(response: any): void; /** * Log info message */ logInfo(message: string, extra?: any): void; /** * Log warning message */ logWarn(message: string, extra?: any): void; protected doLogMessage(message: string, level: 'debug' | 'info' | 'warning', extra?: Record): Promise; } export {};