import type { S3Config } from "../../types.ts"; export declare function s3Key(name: string, s3: S3Config): string; export interface BackupEntry { name: string; path: string; size: number; createdAt: Date; type: "backup" | "upload" | "original"; source: "local" | "s3"; } export declare function createBackup(dbPath: string, storageDir: string): string; export declare function listBackups(storageDir: string): BackupEntry[]; export declare function saveUploadedDb(storageDir: string, filename: string, data: Buffer): void; export declare function deleteBackup(storageDir: string, name: string): void; export interface CameraState { x: number; y: number; z: number; } export interface OriginalDbSettings { hiddenColumns?: Record; camera?: CameraState; tablePositions?: Record; } export interface BackupDbSettings { database: string; } export type DbEntry = OriginalDbSettings | BackupDbSettings; export interface Settings { activeDatabase?: string; databases?: Record; lastAutoBackup?: string; } export declare function readSettings(storageDir: string): Settings; export declare function writeSettings(storageDir: string, data: Settings): void; export declare function restoreBackup(dbPath: string, storageDir: string, backupName: string, backup?: boolean): string | null; /** If dbName is a backup, return the original's name; otherwise return dbName. */ export declare function resolveOriginalName(settings: Settings, dbName: string): string; /** Get the hidden column names for a table, resolving through backup → original. */ export declare function getHiddenColumns(settings: Settings, dbName: string, tableName: string): string[]; /** Return updated Settings with the hidden columns set for the given table on the original. */ export declare function setHiddenColumns(settings: Settings, dbName: string, tableName: string, hidden: string[]): Settings; /** Get the saved camera state for the given db, resolving through backup → original. */ export declare function getCameraState(settings: Settings, dbName: string): CameraState | undefined; /** Return updated Settings with the camera state set for the given db's original. */ export declare function setCameraState(settings: Settings, dbName: string, camera: CameraState): Settings; /** Get the saved table positions for the given db, resolving through backup → original. */ export declare function getTablePositions(settings: Settings, dbName: string): Record; /** Return updated Settings with one table's position set for the given db's original. */ export declare function setTablePosition(settings: Settings, dbName: string, tableName: string, position: { x: number; y: number; }): Settings; export declare function uploadToS3(filePath: string, s3: S3Config): Promise; export declare function deleteFromS3(key: string, s3: S3Config): Promise; export declare function getFromS3(key: string, s3: S3Config): Promise; export declare function listS3Backups(s3: S3Config): Promise; export declare function createBackupToS3(dbPath: string, s3: S3Config): Promise; /** Return updated Settings registering a backup as pointing to its original. */ export declare function registerBackup(settings: Settings, backupName: string, originalName: string): Settings; //# sourceMappingURL=queries.d.ts.map