/**
 * VPC Agent Types
 *
 * Type definitions for the VPC Agent Lambda that proxies requests
 * from developer machines to private VPC resources.
 *
 * @module runtime-awake/vpc-agent/types
 *
 * @see Requirements 10.1, 10.2, 10.3, 10.5, 10.6
 */
/**
 * Protocol type for VPC Agent requests.
 *
 * - 'tcp': Raw TCP connection (data is base64 encoded)
 * - 'http': HTTP proxy (standard HTTP request/response)
 */
export type VpcAgentProtocol = 'tcp' | 'http';
/**
 * VPC Agent request structure.
 *
 * Represents a request from a developer machine to access
 * a private VPC resource through the VPC Agent.
 *
 * @see Requirements 10.2, 10.3
 */
export interface VpcAgentRequest {
    /** Target host (must be in allowedHosts whitelist) */
    readonly host: string;
    /** Target port (must be in allowedPorts whitelist) */
    readonly port: number;
    /** Protocol: 'tcp' for raw TCP, 'http' for HTTP proxy */
    readonly protocol: VpcAgentProtocol;
    /** Request data (base64 encoded for TCP, plain for HTTP body) */
    readonly data?: string;
    /** HTTP method (required for HTTP protocol) */
    readonly method?: string;
    /** HTTP path (required for HTTP protocol) */
    readonly path?: string;
    /** HTTP headers (for HTTP protocol) */
    readonly headers?: Record<string, string>;
    /** Request timeout in milliseconds (optional, uses default if not specified) */
    readonly timeoutMs?: number;
}
/**
 * VPC Agent response structure.
 *
 * Represents the response from a VPC resource back to the developer machine.
 *
 * @see Requirements 10.2, 10.3
 */
export interface VpcAgentResponse {
    /** Response data (base64 encoded for TCP, plain for HTTP body) */
    readonly data?: string;
    /** HTTP status code (for HTTP protocol) */
    readonly statusCode?: number;
    /** HTTP headers (for HTTP protocol) */
    readonly headers?: Record<string, string>;
    /** Whether the request was successful */
    readonly success: boolean;
    /** Error message if request failed */
    readonly error?: string;
    /** Response time in milliseconds */
    readonly durationMs: number;
}
/**
 * VPC Agent configuration.
 *
 * Defines security restrictions and allowed targets for the VPC Agent.
 *
 * @see Requirements 10.5, 10.6
 */
export interface VpcAgentConfig {
    /** Allowed target hosts (whitelist) - supports exact match and wildcard patterns */
    readonly allowedHosts: string[];
    /** Allowed ports (whitelist) */
    readonly allowedPorts: number[];
    /** Authentication method */
    readonly auth: 'iam' | 'api-key';
    /** API key (required if auth is 'api-key') */
    readonly apiKey?: string;
    /** Request timeout in milliseconds (default: 30000) */
    readonly timeoutMs?: number;
    /** Maximum request body size in bytes (default: 10MB) */
    readonly maxBodySizeBytes?: number;
}
/**
 * Environment variables for VPC Agent Lambda.
 */
export interface VpcAgentEnvironment {
    /** Comma-separated list of allowed hosts */
    readonly VPC_AGENT_ALLOWED_HOSTS?: string;
    /** Comma-separated list of allowed ports */
    readonly VPC_AGENT_ALLOWED_PORTS?: string;
    /** Authentication method: 'iam' or 'api-key' */
    readonly VPC_AGENT_AUTH?: string;
    /** API key for authentication */
    readonly VPC_AGENT_API_KEY?: string;
    /** Request timeout in milliseconds */
    readonly VPC_AGENT_TIMEOUT_MS?: string;
    /** Maximum body size in bytes */
    readonly VPC_AGENT_MAX_BODY_SIZE?: string;
    /** AWS region */
    readonly AWS_REGION?: string;
}
/**
 * VPC Agent error types.
 */
export interface VpcAgentError {
    /** Error code */
    readonly code: 'INVALID_HOST' | 'INVALID_PORT' | 'UNAUTHORIZED' | 'TIMEOUT' | 'CONNECTION_FAILED' | 'INVALID_REQUEST';
    /** Error message */
    readonly message: string;
    /** Additional details */
    readonly details?: Record<string, unknown>;
}
/**
 * Default values for VPC Agent configuration.
 */
export declare const VPC_AGENT_DEFAULTS: {
    /** Default request timeout in milliseconds */
    readonly TIMEOUT_MS: 30000;
    /** Default maximum body size in bytes (10MB) */
    readonly MAX_BODY_SIZE_BYTES: number;
    /** Common database ports */
    readonly COMMON_DB_PORTS: readonly [3306, 5432, 6379, 27017, 9200, 11211];
};
/**
 * Validate if a host matches the allowed hosts whitelist.
 *
 * Supports exact match and wildcard patterns:
 * - Exact: 'rds.internal.example.com'
 * - Wildcard: '*.internal.example.com'
 * - Suffix wildcard: '*.rds.amazonaws.com'
 *
 * @param host - Host to validate
 * @param allowedHosts - List of allowed host patterns
 * @returns True if host is allowed
 *
 * @see Requirements 10.5
 */
export declare function isValidHost(host: string, allowedHosts: string[]): boolean;
/**
 * Validate if a port is in the allowed ports whitelist.
 *
 * @param port - Port to validate
 * @param allowedPorts - List of allowed ports
 * @returns True if port is allowed
 *
 * @see Requirements 10.5
 */
export declare function isValidPort(port: number, allowedPorts: number[]): boolean;
/**
 * Validate a VPC Agent request.
 *
 * Checks that the request has all required fields and that
 * the target host and port are in the allowed whitelist.
 *
 * @param request - Request to validate
 * @param config - VPC Agent configuration
 * @returns Validation result with error if invalid
 *
 * @see Requirements 10.2, 10.5, 10.6
 */
export declare function validateVpcAgentRequest(request: VpcAgentRequest, config: VpcAgentConfig): {
    valid: true;
} | {
    valid: false;
    error: VpcAgentError;
};
