/**
 * Static Site Deployment Module
 * Deploys static sites to AWS using CloudFormation (S3 + CloudFront + Route53/External DNS + ACM)
 */
import type { DnsProviderConfig } from '../dns/types';
export interface StaticSiteConfig {
    /** Site name used for resource naming */
    siteName: string;
    /** AWS region for S3 bucket */
    region?: string;
    /** Custom domain (e.g., docs.example.com) */
    domain?: string;
    /** Subdomain part (e.g., 'docs') - used with baseDomain */
    subdomain?: string;
    /** Base domain (e.g., 'example.com') - must have Route53 hosted zone */
    baseDomain?: string;
    /** S3 bucket name (auto-generated if not provided) */
    bucket?: string;
    /** Route53 hosted zone ID (auto-detected if not provided) */
    hostedZoneId?: string;
    /** ACM certificate ARN (auto-created if not provided) */
    certificateArn?: string;
    /** CloudFormation stack name */
    stackName?: string;
    /** Default root object */
    defaultRootObject?: string;
    /** Error document */
    errorDocument?: string;
    /** Cache control for assets */
    cacheControl?: string;
    /** Tags to apply to resources */
    tags?: Record<string, string>;
    /**
     * External DNS provider configuration (optional)
     * When provided, DNS records will be managed via the specified provider (Porkbun, GoDaddy, etc.)
     * instead of Route53. Useful when your domain is registered outside AWS.
     */
    dnsProvider?: DnsProviderConfig;
}
export interface DeployResult {
    success: boolean;
    stackId?: string;
    stackName: string;
    bucket: string;
    distributionId?: string;
    distributionDomain?: string;
    domain?: string;
    certificateArn?: string;
    message: string;
}
export interface UploadOptions {
    /** Local directory containing built files */
    sourceDir: string;
    /** S3 bucket name */
    bucket: string;
    /** AWS region */
    region: string;
    /** Cache control header */
    cacheControl?: string;
    /** Callback for progress updates */
    onProgress?: (uploaded: number, total: number, file: string) => void;
}
/**
 * Generate CloudFormation template for static site infrastructure
 */
export declare function generateStaticSiteTemplate(config: {
    bucketName: string;
    domain?: string;
    certificateArn?: string;
    hostedZoneId?: string;
    defaultRootObject?: string;
    errorDocument?: string;
}): object;
/**
 * Deploy a static site to AWS
 * Automatically routes to external DNS deployment when a non-Route53 dnsProvider is configured
 */
export declare function deployStaticSite(config: StaticSiteConfig): Promise<DeployResult>;
/**
 * Upload files to S3 bucket (only uploads changed files)
 */
export declare function uploadStaticFiles(options: UploadOptions): Promise<{
    uploaded: number;
    skipped: number;
    errors: string[];
}>;
/**
 * Invalidate CloudFront cache
 */
export declare function invalidateCache(distributionId: string): Promise<{
    invalidationId: string;
}>;
/**
 * Delete static site infrastructure
 */
export declare function deleteStaticSite(stackName: string, region?: string): Promise<{
    success: boolean;
    message: string;
}>;
/**
 * Full deployment: infrastructure + files + cache invalidation
 */
export declare function deployStaticSiteFull(config: StaticSiteConfig & {
    sourceDir: string;
    cleanBucket?: boolean;
    onProgress?: (stage: string, detail?: string) => void;
}): Promise<DeployResult & {
    filesUploaded?: number;
    filesSkipped?: number;
}>;
