/**
 * AWS environment configuration.
 */
export interface AwsEnvironment {
    /** AWS account ID (12-digit string) */
    account: string;
    /** AWS region identifier (e.g., 'us-east-1', 'eu-west-1') */
    region: string;
}
/**
 * Custom domain configuration for API Gateway.
 */
export interface DomainConfig {
    /** Root domain name (e.g., 'myapp.com') */
    rootDomain: string;
    /** Optional subdomain (e.g., 'api' for 'api.myapp.com') */
    subdomain?: string;
    /** ARN of the SSL certificate in AWS Certificate Manager */
    certificateArn?: string;
    /** Route 53 hosted zone ID for the domain */
    hostedZoneId?: string;
}
/**
 * VPC configuration for Lambda functions.
 */
export interface VpcConfig {
    /** VPC ID where Lambda functions will be deployed */
    vpcId: string;
    /** Subnet IDs for Lambda function placement */
    subnetIds: string[];
    /** Security group IDs for Lambda functions */
    securityGroupIds: string[];
}
/**
 * Infrastructure configuration for CDK deployment.
 *
 * Contains only infrastructure-specific settings (AWS resources, networking, etc.).
 * Does NOT contain runtime configuration like microservices - that belongs in RuntimeWebConfig.register.
 *
 * This separation ensures:
 * - Clean architecture boundaries (infra vs runtime)
 * - Single source of truth (register is at runtime level)
 * - Proper context isolation (infra only needed in CDK context)
 */
export interface InfraOptions {
    /**
     * AWS environment (account and region).
     *
     * **Required**: Must specify target AWS account and region for deployment.
     * **Security**: Account ID prevents accidental cross-account deployments.
     *
     * @example
     * ```typescript
     * env: {
     *   account: '123456789012',
     *   region: 'us-east-1'
     * }
     * ```
     */
    env: AwsEnvironment;
    /**
     * Deployment stage for infrastructure resources.
     *
     * **Must match**: Should match the stage in RuntimeWebConfig for consistency.
     * **Resource naming**: Used in CloudFormation stack names and resource tags.
     *
     * @example
     * ```typescript
     * stage: 'prod'
     * ```
     */
    stage: 'dev' | 'staging' | 'prod';
    /**
     * Enable SEO metadata support.
     *
     * **Creates**: DynamoDB table for SEO metadata storage
     * **Lambda**: Enables SEO Lambda function for metadata management
     *
     * @default true
     */
    enableSeo?: boolean;
    /**
     * Path to React application entry point.
     *
     * **Purpose**: Used to create the serverless rendering Lambda that serves all React routes
     * **Bundling**: Framework bundles this file with esbuild for Lambda deployment
     * **Automatic**: Serverless rendering Lambda is created automatically, not in microservice register
     *
     * @example
     * ```typescript
     * reactEntry: './src/index.tsx'
     * reactEntry: './app/main.tsx'
     * ```
     */
    reactEntry: string;
    /**
     * API exposure mode.
     *
     * **apiGateway**: Use API Gateway with CloudFront integration (recommended)
     * **lambdaUrl**: Use Lambda Function URLs (simpler, but less features)
     *
     * @default 'apiGateway'
     *
     * @example
     * ```typescript
     * apiMode: 'apiGateway'  // Full API Gateway features
     * apiMode: 'lambdaUrl'   // Simple Lambda URLs
     * ```
     */
    apiMode?: 'apiGateway' | 'lambdaUrl';
    /**
     * Custom domain configuration.
     *
     * **Optional**: If provided, sets up custom domain for API Gateway
     * **Requirements**: SSL certificate must exist in ACM
     * **DNS**: Route 53 hosted zone must be configured
     *
     * @example
     * ```typescript
     * domain: {
     *   rootDomain: 'myapp.com',
     *   subdomain: 'api',  // Results in api.myapp.com
     *   certificateArn: 'arn:aws:acm:us-east-1:123456789012:certificate/...',
     *   hostedZoneId: 'Z1D633PJN98FT9'
     * }
     * ```
     */
    domain?: DomainConfig;
    /**
     * Default memory allocation for Lambda functions (MB).
     *
     * **Range**: 128 - 10240 MB
     * **Override**: Individual Lambdas can override via LambdaDefinition.config
     * **Performance**: More memory = more CPU power and faster execution
     *
     * @default 512
     *
     * @example
     * ```typescript
     * lambdaMemorySize: 1024  // 1GB default memory
     * ```
     */
    lambdaMemorySize?: number;
    /**
     * Default timeout for Lambda functions (seconds).
     *
     * **Range**: 1 - 900 seconds (15 minutes)
     * **Override**: Individual Lambdas can override via LambdaDefinition.config
     * **API Gateway**: Limited to 29 seconds for HTTP endpoints
     *
     * @default 30
     *
     * @example
     * ```typescript
     * lambdaTimeout: 60  // 1 minute default timeout
     * ```
     */
    lambdaTimeout?: number;
    /**
     * Enable Lambda warmup to prevent cold starts.
     *
     * **Creates**: EventBridge rule that invokes Lambdas periodically
     * **Cost**: Small additional cost for scheduled invocations
     * **Performance**: Reduces cold start latency for critical functions
     *
     * @default false
     *
     * @example
     * ```typescript
     * enableWarmup: true  // Enable for production workloads
     * ```
     */
    enableWarmup?: boolean;
    /**
     * Clear CloudFront cache on deployment.
     *
     * **Purpose**: Ensures users get updated static assets immediately
     * **Cost**: Small charge per invalidation request
     * **Recommended**: Enable for production deployments
     *
     * @default true
     *
     * @example
     * ```typescript
     * clearCacheOnDeploy: true  // Invalidate cache after deploy
     * ```
     */
    clearCacheOnDeploy?: boolean;
    /**
     * Global environment variables for all Lambda functions.
     *
     * **Merged**: Combined with Lambda-specific environment variables
     * **Precedence**: Lambda-specific variables override global ones
     * **Security**: Avoid sensitive values, use AWS Secrets Manager instead
     *
     * @example
     * ```typescript
     * environment: {
     *   NODE_ENV: 'production',
     *   LOG_LEVEL: 'info',
     *   REGION: 'us-east-1'
     * }
     * ```
     */
    environment?: Record<string, string>;
    /**
     * VPC configuration for Lambda functions.
     *
     * **Optional**: If provided, deploys Lambdas inside VPC
     * **Use cases**: Access to private RDS, ElastiCache, or internal services
     * **Performance**: Adds cold start latency (~1-2 seconds)
     * **NAT Gateway**: Required for internet access from private subnets
     *
     * @example
     * ```typescript
     * vpc: {
     *   vpcId: 'vpc-12345678',
     *   subnetIds: ['subnet-12345678', 'subnet-87654321'],
     *   securityGroupIds: ['sg-12345678']
     * }
     * ```
     */
    vpc?: VpcConfig;
}
