import type { AppliedStorageMigration, SchemaMigrationStorage, StorageMigration, StorageMigrationResult } from "./contract.js"; export interface PostgresQueryExecutor { query>(sql: string, params?: readonly unknown[]): Promise; execute(sql: string, params?: readonly unknown[]): Promise; transaction?(fn: (executor: PostgresQueryExecutor) => Promise): Promise; close?(): Promise | void; } export declare class PostgresStorage implements SchemaMigrationStorage { private readonly executor; readonly backend = "postgresql"; readonly migrations: readonly StorageMigration[]; constructor(executor: PostgresQueryExecutor, migrations?: readonly StorageMigration[]); listAppliedMigrations(): Promise; migrate(opts?: { dryRun?: boolean; through?: string; }): Promise; close(): Promise; private ensureLedger; private readAppliedMigrations; private tryReadAppliedMigrations; private buildPlan; } export declare function createPostgresStorage(executor: PostgresQueryExecutor): PostgresStorage;