import type { TodosStorageContext, TodosStorageSnapshot } from "./interfaces.js";
export type TodosPostgresSyncRecordType = "tasks" | "projects" | "plans" | "agents" | "task_lists" | "templates" | "audit_history";
export interface TodosPostgresQueryResult<T = Record<string, unknown>> {
    rows: T[];
}
export interface TodosPostgresQueryClient {
    query<T = Record<string, unknown>>(sql: string, values?: readonly unknown[]): Promise<TodosPostgresQueryResult<T>>;
}
export interface CreatePostgresTodosSyncStoreOptions {
    service?: string;
    sourceMachineId?: string;
    tableName?: string;
    cursorTableName?: string;
}
export interface PullPostgresTodosSnapshotOptions {
    since?: string;
    objectTypes?: TodosPostgresSyncRecordType[];
}
export interface PostgresTodosSyncPushResult {
    records: number;
    objectTypes: Partial<Record<TodosPostgresSyncRecordType, number>>;
}
export interface TodosPostgresSyncRecordRow {
    object_type: TodosPostgresSyncRecordType;
    payload: unknown;
}
export declare const DEFAULT_TODOS_POSTGRES_SYNC_TABLE = "todos_sync_records";
export declare const DEFAULT_TODOS_POSTGRES_CURSOR_TABLE = "todos_sync_cursors";
export declare function postgresTodosSyncSchemaSql(tableName?: string, cursorTableName?: string): string[];
export declare class PostgresTodosSyncStore {
    private readonly client;
    private readonly service;
    private readonly sourceMachineId?;
    private readonly tableName;
    private readonly cursorTableName;
    constructor(client: TodosPostgresQueryClient, options?: CreatePostgresTodosSyncStoreOptions);
    ensureSchema(): Promise<void>;
    pushSnapshot(snapshot: TodosStorageSnapshot, context?: TodosStorageContext): Promise<PostgresTodosSyncPushResult>;
    pullSnapshot(options?: PullPostgresTodosSnapshotOptions): Promise<TodosStorageSnapshot>;
    getCursor(name: string): Promise<string | null>;
    setCursor(name: string, value: string): Promise<void>;
}
export declare function createPostgresTodosSyncStore(client: TodosPostgresQueryClient, options?: CreatePostgresTodosSyncStoreOptions): PostgresTodosSyncStore;
//# sourceMappingURL=postgres-sync.d.ts.map