import { type Database } from "sql.js"; export interface BaseView { type: string; name?: string; limit?: number; filters?: unknown; order?: string[]; groupBy?: { property: string; direction?: string; }; summaries?: Record; } export interface BaseConfig { filters?: unknown; formulas?: Record; properties?: Record; summaries?: Record; views?: BaseView[]; } /** * Parse a .base YAML file. Bases are YAML format. */ export declare function parseBaseFile(content: string): BaseConfig; /** * Build an in-memory SQLite database from vault files. * Creates a `files` table with columns for file metadata and all frontmatter properties. */ export declare function buildDatabase(vaultPath: string): Promise; /** * Translate a Bases filter expression to SQL WHERE clause. * Handles the recursive and/or/not structure and simple comparison strings. */ export declare function filterToSQL(filter: unknown, thisFile?: { name: string; path: string; folder: string; }): string; /** * Build ORDER BY clause from view config. */ export declare function orderToSQL(order?: string[]): string; /** * Query the database using a base view config. */ export declare function queryBase(db: Database, baseConfig: BaseConfig, viewName?: string, thisFile?: { name: string; path: string; folder: string; }): Promise<{ columns: string[]; rows: unknown[][]; groups?: { key: string; rows: unknown[][]; }[]; summaries?: Record; displayNames?: Record; }>;