import type { BackupManifest, Platform } from "../types/index.js";
import type { HealthResult, PlatformBackupResult, PlatformRestoreResult, PlatformStatusResult, UpdateResult } from "./interface.js";
/**
 * Shared health check for platform adapters.
 * Tries HTTPS via domain first (if provided), then falls back to HTTP on the given port.
 */
export declare function sharedHealthCheck(ip: string, port: number, domain?: string): Promise<HealthResult>;
export declare function sharedUpdate(ip: string, updateCmd: string): Promise<UpdateResult>;
/**
 * Shared getStatus for platform adapters.
 * Gets version via SSH, runs health check, and combines results.
 */
export declare function sharedGetStatus(ip: string, versionCmd: string, port: number, domain?: string): Promise<PlatformStatusResult>;
export interface AdapterBackupConfig {
    /** Platform name, e.g. "coolify" | "dokploy" */
    platform: Platform;
    /** SSH command: dump DB to /tmp/{dbFileName} */
    pgDumpCmd: string;
    /** SSH command: tar config to /tmp/{configFileName} */
    configTarCmd: string;
    /** SSH command: get platform version string */
    versionCmd: string;
    /** SSH command: cleanup temp files */
    cleanupCmd: string;
    /** Remote + local filename for DB backup, e.g. "coolify-backup.sql.gz" */
    dbFileName: string;
    /** Remote + local filename for config backup, e.g. "coolify-config.tar.gz" */
    configFileName: string;
}
export interface AdapterRestoreConfig {
    /** Platform name, e.g. "coolify" | "dokploy" */
    platform: Platform;
    /** SSH command: stop the platform service */
    stopCmd: string;
    /** SSH command: start the database only */
    startDbCmd: string;
    /** SSH command: restore DB from /tmp/{dbFileName} */
    restoreDbCmd: string;
    /** SSH command: restore config from /tmp/{configFileName} */
    restoreConfigCmd: string;
    /** SSH command: start the platform service */
    startCmd: string;
    /** SSH command: cleanup temp files */
    cleanupCmd: string;
    /** SSH command: best-effort platform restart after failure */
    tryRestartCmd: string;
    dbFileName: string;
    configFileName: string;
}
/**
 * Shared createBackup for platform adapters.
 * Control flow is identical across adapters; only the command strings and file names differ.
 */
export declare function sharedCreateBackup(ip: string, serverName: string, provider: string, config: AdapterBackupConfig): Promise<PlatformBackupResult>;
/**
 * Shared restoreBackup for platform adapters.
 * Control flow is identical across adapters; only the command strings and file names differ.
 */
export declare function sharedRestoreBackup(ip: string, backupPath: string, _manifest: BackupManifest, config: AdapterRestoreConfig, _options?: {
    force?: boolean;
}): Promise<PlatformRestoreResult>;
/**
 * Returns a capitalized display name for a platform adapter.
 * @example adapterDisplayName(coolifyAdapter) => "Coolify"
 */
export declare function adapterDisplayName(adapter: {
    readonly name: string;
}): string;
//# sourceMappingURL=shared.d.ts.map