import { DuckDBWasmClient } from "./drizzle-adapter/client.mjs"; import { DuckDBWasmDrizzleDatabase } from "./drizzle-adapter/driver.mjs"; import "./drizzle-adapter/index.mjs"; import { Schema } from "./schema.mjs"; import { ScopedRunnerOptions, TableScope } from "@gscdump/engine/scope"; import { AsyncDuckDB, AsyncDuckDBConnection } from "@duckdb/duckdb-wasm"; interface InsightRunnerOptions { db: AsyncDuckDB; conn: AsyncDuckDBConnection; logger?: boolean; } interface InsightRunner { db: DuckDBWasmDrizzleDatabase; client: Promise; close: () => Promise; } declare function createInsightRunner(opts: InsightRunnerOptions): Promise; /** * Build a per-table predicate set from {siteId, window}. The returned * `wherePredicates` composes with user-level filters via `mergeScope`. * * Note: the current SCHEMAS don't include `site_id` on any table (snapshots * are already per-site), so `siteId` is a no-op for now — kept in the API * so consumers can add the predicate without an interface change when * multi-site snapshots land. */ declare const scopeFor: (table: "pages" | "queries" | "countries" | "page_queries" | "dates" | "search_appearance" | "search_appearance_pages" | "search_appearance_queries" | "search_appearance_page_queries" | "hourly_pages", opts: ScopedRunnerOptions) => TableScope, mergeScope: typeof import("@gscdump/engine/scope").mergeScope; export { InsightRunner, InsightRunnerOptions, type ScopedRunnerOptions, type TableScope, createInsightRunner, mergeScope, scopeFor };