/**
 * Let's Encrypt Integration for Stacks
 *
 * Provides utilities for obtaining and managing Let's Encrypt certificates.
 * Supports both HTTP-01 and DNS-01 challenges with multiple DNS providers.
 */
import type { DnsProviderConfig } from '../dns/types';
export interface LetsEncryptConfig {
    /**
     * Domain names to obtain certificate for
     */
    domains: string[];
    /**
     * Email for Let's Encrypt notifications
     */
    email: string;
    /**
     * Use staging server for testing
     * @default false
     */
    staging?: boolean;
    /**
     * Challenge type
     * - 'http-01': Serve challenge file via HTTP (requires port 80)
     * - 'dns-01': Add TXT record to DNS (works behind load balancers)
     * @default 'http-01'
     */
    challengeType?: 'http-01' | 'dns-01';
    /**
     * Route53 hosted zone ID (required for dns-01 challenge with Route53)
     * @deprecated Use dnsProvider config instead
     */
    hostedZoneId?: string;
    /**
     * DNS provider configuration for dns-01 challenge
     * Supports: route53, porkbun, godaddy
     */
    dnsProvider?: DnsProviderConfig;
    /**
     * Certificate storage path
     * @default '/etc/letsencrypt/live'
     */
    certPath?: string;
    /**
     * Auto-renew certificates
     * @default true
     */
    autoRenew?: boolean;
}
/**
 * DNS-01 challenge configuration for programmatic use
 */
export interface Dns01ChallengeConfig {
    domain: string;
    challengeValue: string;
    /**
     * Route53 hosted zone ID (legacy, use dnsProvider instead)
     * @deprecated Use dnsProvider config instead
     */
    hostedZoneId?: string;
    /**
     * DNS provider configuration
     */
    dnsProvider?: DnsProviderConfig;
    /**
     * AWS region (only for Route53)
     */
    region?: string;
}
/**
 * Generate UserData script for Let's Encrypt certificate setup on EC2
 * This creates a complete setup that handles certificate acquisition and renewal
 */
export declare function generateLetsEncryptUserData(config: LetsEncryptConfig): string;
/**
 * Generate server configuration for HTTPS with Let's Encrypt
 */
export declare function generateHttpsServerCode(options: {
    httpPort?: number;
    httpsPort?: number;
    certPath?: string;
    redirectHttp?: boolean;
}): string;
/**
 * Setup DNS-01 challenge programmatically using any DNS provider
 * This is the unified API that works with Route53, Porkbun, GoDaddy, etc.
 */
export declare function setupDns01Challenge(options: Dns01ChallengeConfig): Promise<void>;
/**
 * Clean up DNS-01 challenge record using any DNS provider
 */
export declare function cleanupDns01Challenge(options: Dns01ChallengeConfig): Promise<void>;
/**
 * Check if certificates need renewal (< 30 days until expiry)
 */
export declare function needsRenewal(certPath: string): boolean;
