import { PgAdapterAsync } from "./remote-storage.js"; export declare const STORAGE_TABLES: readonly ["configs", "config_snapshots", "profiles", "profile_configs", "machines", "feedback"]; export declare const CONFIGS_STORAGE_TABLES: readonly ["configs", "config_snapshots", "profiles", "profile_configs", "machines", "feedback"]; type StorageTable = (typeof STORAGE_TABLES)[number]; export type StorageMode = "local" | "hybrid" | "remote"; export interface SyncResult { table: string; rowsRead: number; rowsWritten: number; errors: string[]; } export interface SyncMeta { table_name: string; last_synced_at: string | null; direction: "push" | "pull"; } export interface StorageStatus { configured: boolean; mode: StorageMode; env: typeof STORAGE_DATABASE_ENV; service: "configs"; tables: typeof STORAGE_TABLES; sync: SyncMeta[]; } export declare const CONFIGS_STORAGE_ENV = "HASNA_CONFIGS_DATABASE_URL"; export declare const CONFIGS_STORAGE_FALLBACK_ENV = "CONFIGS_DATABASE_URL"; export declare const CONFIGS_STORAGE_MODE_ENV = "HASNA_CONFIGS_STORAGE_MODE"; export declare const CONFIGS_STORAGE_MODE_FALLBACK_ENV = "CONFIGS_STORAGE_MODE"; export declare const STORAGE_DATABASE_ENV: readonly ["HASNA_CONFIGS_DATABASE_URL", "CONFIGS_DATABASE_URL"]; export declare const STORAGE_MODE_ENV: readonly ["HASNA_CONFIGS_STORAGE_MODE", "CONFIGS_STORAGE_MODE"]; export declare function getStorageDatabaseUrl(): string | null; export declare function getStorageDatabaseEnvName(): (typeof STORAGE_DATABASE_ENV)[number] | null; export declare function getStorageMode(): StorageMode; export declare function getStoragePg(): Promise; export declare function runStorageMigrations(remote: PgAdapterAsync): Promise; export declare function storagePush(options?: { tables?: string[]; }): Promise; export declare function storagePull(options?: { tables?: string[]; }): Promise; export declare function storageSync(options?: { tables?: string[]; }): Promise<{ pull: SyncResult[]; push: SyncResult[]; }>; export declare function getStorageSyncMetaAll(): SyncMeta[]; export declare function getSyncMetaAll(): SyncMeta[]; export declare function getStorageStatus(): StorageStatus; export declare function resolveTables(tables?: string[]): StorageTable[]; export {}; //# sourceMappingURL=storage-sync.d.ts.map