import type { RuntimeAwakeMetadata } from '../../../lib/runtime-web/runtime-awake';
/**
 * Configuration for CloudFormation loader.
 *
 * @see Requirements 1.1
 */
export interface CloudFormationLoaderConfig {
    /** AWS region */
    readonly region: string;
    /** AWS profile (optional) */
    readonly profile?: string;
}
/**
 * CloudFormation stack output.
 */
export interface StackOutput {
    /** Output key */
    readonly outputKey: string;
    /** Output value */
    readonly outputValue: string;
    /** Output description (optional) */
    readonly description?: string;
}
/**
 * Result of loading metadata from CloudFormation.
 *
 * @see Requirements 1.2
 */
export interface CloudFormationLoadResult {
    /** Parsed Live Dev metadata */
    readonly metadata: RuntimeAwakeMetadata;
    /** Raw stack outputs */
    readonly outputs: StackOutput[];
    /** Stack status */
    readonly stackStatus: string;
}
/**
 * The output key for Live Dev configuration in CloudFormation.
 */
export declare const LIVE_DEV_CONFIG_OUTPUT_KEY = "RuntimeAwakeConfig";
/**
 * Required fields in RuntimeAwakeMetadata.
 */
export declare const REQUIRED_METADATA_FIELDS: readonly ["iotEndpoint", "sessionTableName", "payloadBucketName"];
/**
 * CloudFormationLoader - Loads Live Dev metadata from CloudFormation outputs.
 *
 * @see Requirements 1.1, 1.2, 1.3, 1.5
 */
export declare class CloudFormationLoader {
    private readonly client;
    private readonly config;
    /**
     * Create a new CloudFormationLoader.
     *
     * @param config - Loader configuration
     */
    constructor(config: CloudFormationLoaderConfig);
    /**
     * Load metadata from a CloudFormation stack.
     *
     * @param stackName - Name of the Live Dev stack
     * @returns Load result with metadata
     * @throws StackNotFoundError if stack doesn't exist
     * @throws PermissionError if access denied
     * @throws MetadataParseError if RuntimeAwakeConfig output is invalid
     *
     * @see Requirements 1.1, 1.2, 1.3, 1.5
     *
     * @example
     * ```typescript
     * const loader = new CloudFormationLoader({ region: 'us-east-1' });
     * const result = await loader.load('my-app-RuntimeAwake-dev');
     * console.log(result.metadata.iotEndpoint);
     * ```
     */
    load(stackName: string): Promise<CloudFormationLoadResult>;
    /**
     * Describe a CloudFormation stack.
     *
     * @param stackName - Stack name to describe
     * @returns Stack details
     * @throws StackNotFoundError if stack doesn't exist
     * @throws PermissionError if access denied
     *
     * @see Requirements 1.3, 1.5
     */
    private describeStack;
    /**
     * Extract outputs from a CloudFormation stack.
     *
     * @param stack - Stack to extract outputs from
     * @returns Array of stack outputs
     */
    private extractOutputs;
    /**
     * Parse RuntimeAwakeMetadata from stack outputs.
     *
     * @param outputs - Stack outputs
     * @param stackName - Stack name (for error messages)
     * @returns Parsed metadata
     * @throws MetadataParseError if RuntimeAwakeConfig output is missing or invalid
     *
     * @see Requirements 1.2
     */
    private parseMetadata;
    /**
     * Check if an error is an AWS SDK error.
     *
     * @param error - Error to check
     * @returns True if the error is an AWS SDK error
     */
    private isAwsError;
}
/**
 * Type guard to check if an object is a valid RuntimeAwakeMetadata.
 *
 * @param obj - Object to check
 * @returns True if the object has all required fields
 *
 * @see Requirements 1.2
 */
export declare function isValidMetadataObject(obj: unknown): obj is RuntimeAwakeMetadata;
/**
 * Parse a raw JSON string into RuntimeAwakeMetadata.
 *
 * This is a pure function for testing purposes.
 *
 * @param jsonString - JSON string to parse
 * @returns Parsed metadata
 * @throws MetadataParseError if parsing fails or validation fails
 *
 * @see Requirements 1.2
 */
export declare function parseMetadataFromJson(jsonString: string): RuntimeAwakeMetadata;
/**
 * Create a CloudFormation loader with the given configuration.
 *
 * @param config - Loader configuration
 * @returns CloudFormation loader instance
 *
 * @example
 * ```typescript
 * const loader = createCloudFormationLoader({ region: 'us-east-1' });
 * const result = await loader.load('my-app-RuntimeAwake-dev');
 * ```
 */
export declare function createCloudFormationLoader(config: CloudFormationLoaderConfig): CloudFormationLoader;
