/**
 * Saved search filters/views and unified local search across OSS entities.
 */
import type { Database } from "bun:sqlite";
import { type SearchOptions } from "./search.js";
export declare const SAVED_VIEWS_SCHEMA = "todos.saved_views.v1";
export type SearchEntityType = "task" | "project" | "plan" | "comment" | "run" | "all";
export interface SavedView {
    schema_version: typeof SAVED_VIEWS_SCHEMA;
    id: string;
    name: string;
    slug: string;
    entity_type: SearchEntityType;
    filters: Record<string, unknown>;
    created_at: string;
    updated_at: string;
}
export interface UnifiedSearchInput {
    query?: string;
    entity_types?: SearchEntityType[];
    task_filters?: SearchOptions;
    limit?: number;
    offset?: number;
}
export interface SearchHit {
    entity_type: SearchEntityType;
    id: string;
    title: string;
    snippet: string;
    score: number;
    data: Record<string, unknown>;
}
export interface UnifiedSearchResult {
    schema_version: typeof SAVED_VIEWS_SCHEMA;
    query: string;
    total: number;
    hits: SearchHit[];
    limit: number;
    offset: number;
}
export declare function createSavedView(input: {
    name: string;
    entity_type?: SearchEntityType;
    filters?: Record<string, unknown>;
    slug?: string;
}, db?: Database): SavedView;
export declare function getSavedView(idOrSlug: string, db?: Database): SavedView | null;
export declare function listSavedViews(db?: Database): SavedView[];
export declare function deleteSavedView(idOrSlug: string, db?: Database): boolean;
export declare function unifiedSearch(input?: UnifiedSearchInput, db?: Database): UnifiedSearchResult;
export declare function runSavedView(viewRef: string, overrides?: UnifiedSearchInput, db?: Database): UnifiedSearchResult;
export declare function getBuiltinSavedViews(): Array<Omit<SavedView, "id" | "created_at" | "updated_at">>;
//# sourceMappingURL=saved-views.d.ts.map