/**
 * Value objects and deployment plan types used by the deploy module.
 * Business logic in `services/deploy.service.ts` consumes these and never references concrete providers.
 */
/** Which half of the stack is being deployed. */
export type DeployTarget = 'back' | 'front';
/** Database engine supported by the hosting adapter. */
export type DatabaseType = 'mysql' | 'postgresql';
/** DNS record variant supported by the DNS adapter. */
export type DnsRecordType = 'A' | 'CNAME';
/** SSH private + public key material, as text blobs in OpenSSH format. */
export interface SshKeyPair {
    privateKey: string;
    publicKey: string;
}
/** Outcome of an idempotent DNS upsert. Reveals whether anything actually changed. */
export interface DnsRecordResult {
    action: 'created' | 'unchanged' | 'updated';
    domain: string;
    recordType: DnsRecordType;
    value: string;
}
/** Outcome of a hosting subscription create (or reuse). */
export interface SubscriptionResult {
    action: 'created' | 'existing';
    /** Numeric ID used by the hosting provider to identify this subscription. */
    domainId: number;
}
/**
 * Fully resolved plan for deploying a single target in a single environment.
 * Built by `plan-builder.ts` from `aurora.yaml`, CLI flags, env vars, and file-based
 * secrets (`plan-resolver.ts`). Every provider port receives data derived from a plan.
 */
export interface DeploymentPlan {
    /** Database provisioning config. Omitted when the target has no DB. */
    database?: {
        name: string;
        password: string;
        type: DatabaseType;
        user: string;
    };
    /** Working directory on the server (e.g. `/httpdocs`). */
    dir: string;
    dnsRecordType: DnsRecordType;
    /** DNS target value. Defaults to the server host when omitted. */
    dnsValue?: string;
    /** DNS zone that owns the record (the registrable parent domain). */
    dnsZone: string;
    /** Fully qualified domain this deployment serves. */
    domain: string;
    /** Plaintext `.env` content, if resolved. Sensitive. */
    dotEnv?: string;
    /** Encrypted `.env.{env}.enc` content produced by SOPS. */
    dotEnvEnc?: string;
    /** Frontend-only: Angular `configuration` name. Defaults to env name. */
    envConfiguration?: string;
    /** Environment slug (`dev`, `qa`, `prod`, ...). */
    environment: string;
    ftpLogin: string;
    ftpPassword: string;
    /** Extra Nginx directives to inject in the vhost, if any. */
    nginxDirectives?: string;
    /** OAuth private key (backend targets that require JWT signing). */
    oauthPrivateKey?: string;
    /** OAuth public key (verification half of the pair above). */
    oauthPublicKey?: string;
    /** Plesk SSH user for operations that require shell access. */
    pleskSshUser: string;
    project: {
        email?: string;
        name: string;
        /** `owner/repo` slug used by the CI/CD adapter. */
        repo: string;
    };
    /** Prefix applied to every CI/CD secret/variable name (`ENV_TARGET_...`). */
    secretPrefix: string;
    server: {
        host: string;
        /** Hosting plan identifier, provider-specific. */
        plan: string;
    };
    /** If true, skip the CI/CD phase for this target. */
    skipCicd: boolean;
    /** If true, skip DNS upsert. */
    skipDns: boolean;
    /** If true, skip hosting provisioning (subscription, SSL, etc.). */
    skipHosting: boolean;
    /** If true, do not install SSH keys on the server. */
    skipSsh: boolean;
    /** SOPS age key used to decrypt `dotEnvEnc`. Sensitive. */
    sopsAgeKey?: string;
    /** Node.js entry file. Auto-detected from `package.json` `main`. */
    startupFile: string;
    target: DeployTarget;
}
/** IONOS API credentials (DNS provider). */
export interface IonosCredentials {
    apiKey: string;
}
/** Plesk control panel credentials. `sshKey` is an optional path on disk. */
export interface PleskCredentials {
    apiKey: string;
    host: string;
    /** Absolute path to the SSH private key used to reach the Plesk box. */
    sshKey?: string;
}
/** Aggregated credentials passed to the adapter factory. */
export interface DeployCredentials {
    ionos: IonosCredentials;
    plesk: PleskCredentials;
}
