import type { ListOptions, PaginatedResult, DashboardStore, DebugStore, QueryRecord, EventRecord, TraceRecord, RouteRecord } from './data_access_helpers.js'; export type { ListOptions, PaginatedResult }; /** * Thin abstraction layer that delegates reads to either the * {@link DashboardStore} (SQLite persistence) or the {@link DebugStore} * (in-memory ring buffers), depending on availability. * * This is intentionally *not* wired into the AdonisJS container yet * -- that happens in Phase 3. */ export declare class DataAccess { private debugStore; private getDashboardStore; private logPath?; constructor(debugStore: DebugStore, dashboardStore: DashboardStore | null | (() => DashboardStore | null), logPath?: string); /** Whether SQLite persistence is available and initialised. */ get hasPersistence(): boolean; /** Resolve the dashboard store (may be null if not yet initialized). */ private get dashboardStore(); getQueries(opts?: ListOptions): Promise>; getQuerySummary(): { total: number; slow: number; duplicates: number; avgDuration: number; }; getEvents(opts?: ListOptions): Promise>; /** * Paginated email list. * * HTML and text bodies are stripped from the list response to keep * payloads lightweight. Use {@link getEmailPreview} for the full body. */ getEmails(opts?: ListOptions): Promise; /** * Get email HTML body for preview (iframe rendering). * * Returns the full HTML body string, or falls back to the text body. * Returns `null` when the email is not found. */ getEmailPreview(id: number, source?: 'memory' | 'auto'): Promise; /** * Paginated trace list. * * Span arrays are stripped from the list response to keep payloads * lightweight. Use {@link getTraceDetail} for the full span tree. */ getTraces(opts?: ListOptions): Promise; /** * Get a single trace with full span tree. * * Returns `null` when the trace is not found. */ getTraceDetail(id: number, source?: 'memory' | 'auto'): Promise; /** * Find log entries matching a specific request ID. */ private getRelatedLogsByRequestId; /** * Get the registered route table. * * Routes are always read from the in-memory {@link DebugStore} because * they are static boot-time data that is never persisted to SQLite. */ getRoutes(search?: string): PaginatedResult; /** * Paginated log entries. * * When the dashboard store is available, logs are read from SQLite with * full server-side filtering. Otherwise, falls back to reading the last * 256 KB of the application log file from the filesystem. */ getLogs(opts?: ListOptions): Promise; }