import { Log, LogFilters, ProjectMetrics } from '../types/log';
import { DrizzleTransaction } from '../db/db';
export declare class LogRepository {
    /**
     * Get project configuration
     */
    private getProjectConfig;
    /**
     * Create a new log with metadata
     */
    createLog(data: Omit<Log, 'id'>, tsx?: DrizzleTransaction | null): Promise<Log>;
    /**
     * Create multiple logs in a single transaction
     */
    createBulkLog(logsData: Omit<Log, 'id'>[]): Promise<Log[]>;
    /**
     * Get a log by its ID, including metadata using a JOIN operation
     */
    getLogById(id: string): Promise<Log | undefined>;
    /**
     * Get logs for a project, using simple filtering
     */
    getLogsByProjectId(projectId: string): Promise<Log[]>;
    /**
     * Get all unique metadata keys for a specific project
     * This is useful for building UIs that show available metadata fields
     */
    getUniqueMetadataKeysByProjectId(projectId: string): Promise<string[]>;
    /**
     * Get all unique metadata keys across all projects
     * This is useful for building UIs that show available metadata fields globally
     */
    getMetadataKeys(): Promise<string[]>;
    /**
     * Get logs with advanced filtering and cursor-based pagination
     * Uses a subquery to correctly apply limits to distinct logs before fetching metadata.
     */
    getLogsWithFilters(filters: LogFilters & {
        cursor?: {
            id: string;
            timestamp: string;
        };
        sortDirection?: 'asc' | 'desc';
    }): Promise<{
        logs: Log[];
        hasNextPage: boolean;
    }>;
    /**
     * Get metrics for a specific project
     * @param projectId The project ID to get metrics for
     */
    getProjectMetrics(projectId: string): Promise<ProjectMetrics>;
    /**
     * Get historical log counts by day for the last 7 days
     * This is used for trend charts
     * @param projectId The project ID to get metrics for
     */
    getHistoricalLogCounts(projectId: string, days?: number): Promise<Array<{
        date: string;
        info: number;
        warn: number;
        error: number;
        total: number;
    }>>;
    /**
     * Get all logs with their metadata using a JOIN
     * This is a convenience method that delegates to getLogsWithFilters
     */
    getAllLogs(): Promise<Log[]>;
    /**
     * Clear all logs for a specific project
     */
    clearProjectLogs(projectId: string): Promise<void>;
}
//# sourceMappingURL=logRepository.d.ts.map