interface AutoEventConfig { trackSessions: boolean; trackScreenViews: boolean; trackAppUpdates: boolean; trackPerformance: boolean; sessionTimeoutMs: number; } export interface SessionData { sessionId: string; startTime: number; lastActivity: number; screenViews: number; events: number; } export declare class AutoEventsManager { private config; private currentSession; private lastScreenName; private trackEvent; private getSessionId?; constructor(trackEvent: (eventName: string, properties: Record) => Promise, config?: Partial, getSessionId?: () => string); /** Canonical session id — the wire context.session_id when a getter is wired. */ private resolveSessionId; /** * Initialize automatic event tracking */ initialize(): Promise; /** * Start a new session */ private startSession; /** * End current session */ private endSession; /** * Setup session monitoring (app state changes) * In a real implementation, this would use React Native's AppState */ private setupSessionMonitoring; /** * Handle app coming to foreground (optimized - less noise) */ handleAppForeground(): Promise; /** * Handle app going to background (optimized - less noise) */ handleAppBackground(): Promise; /** * Update session counters for a screen view. * The actual pageview event is fired by the SDK's screen() method — * this only updates internal session state to avoid double-firing. */ recordScreenView(screenName: string): Promise; /** * Get session data to enrich a pageview event. * Called by the SDK's screen() method *before* recordScreenView(), * so we add 1 to account for the current view being tracked. */ getScreenViewEnrichment(): Record | null; /** * Track app launch performance */ /** * Track custom automatic event (called by SDK) * Updates session counters for activity tracking */ onEvent(eventName: string): Promise; /** * Get current session info */ getCurrentSession(): SessionData | null; /** * Force end current session */ forceEndSession(): Promise; /** * Update configuration */ updateConfig(newConfig: Partial): void; /** * Cleanup and destroy */ destroy(): void; } export declare let autoEventsManager: AutoEventsManager | null; export declare const createAutoEventsManager: (trackEvent: (eventName: string, properties: Record) => Promise, config?: Partial, getSessionId?: () => string) => AutoEventsManager; export {};