import type { DatabaseType, SubscriptionResult } from '../domain/model.js';
/**
 * Port for managing hosting resources — domains, databases, Node.js runtime,
 * SSL certificates, SSH access, Nginx directives.
 *
 * The reference adapter targets Plesk (`src/deploy/adapters/plesk-hosting`).
 * Replace it by implementing this interface against another control panel
 * (cPanel, DirectAdmin, etc.) and updating `adapter.factory.ts`.
 */
export interface HostingPort {
    /**
     * Create a database attached to an existing subscription.
     *
     * @param params.domainId - Subscription/domain identifier returned by
     *   {@link HostingPort.createSubscription}.
     */
    createDatabase(params: {
        domainId: number;
        name: string;
        password: string;
        type: DatabaseType;
        user: string;
    }): Promise<void>;
    /**
     * Create (or reuse) a hosting subscription and its FTP credentials for a domain.
     *
     * @returns Object with `domainId` (numeric identifier used by later calls)
     *   and `action: 'created' | 'existing'`.
     */
    createSubscription(params: {
        domain: string;
        ftpLogin: string;
        ftpPassword: string;
        plan: string;
    }): Promise<SubscriptionResult>;
    /** Turn off proxy mode (direct traffic, no reverse proxy) for the domain. */
    disableProxyMode(params: {
        domain: string;
    }): Promise<void>;
    /** Enable the Node.js runtime and register its startup file for the domain. */
    enableNodeJs(params: {
        domain: string;
        startupFile: string;
    }): Promise<void>;
    /** Grant shell access to the subscription's SSH user. */
    enableShellAccess(params: {
        domain: string;
        sshUser: string;
    }): Promise<void>;
    /** Return the administrative email associated with the given SSH user. */
    getAdminEmail(params: {
        sshUser: string;
    }): Promise<string>;
    /** Install an SSH public key for the given FTP user inside the subscription. */
    installSshKey(params: {
        domain: string;
        ftpLogin: string;
        publicKey: string;
        sshUser: string;
    }): Promise<void>;
    /** Issue and install a Let's Encrypt SSL certificate for the domain. */
    installSslCertificate(params: {
        domain: string;
        email: string;
        sshUser: string;
    }): Promise<void>;
    /** Replace the Nginx `server { ... }` block directives for the domain. */
    setNginxDirectives(params: {
        directives: string;
        domain: string;
        sshUser: string;
    }): Promise<void>;
}
