import { Construct } from 'constructs';
import * as lambda from 'aws-cdk-lib/aws-lambda';
import type { RuntimeAwakeMetadata } from '../../../lib/runtime-web/runtime-awake';
import type { RuntimeAwakeStack } from '../../runtime-web/runtime-awake/runtime-awake-stack';
/**
 * Handler metadata for Live Dev.
 */
export interface HandlerMetadata {
    /** Lambda construct ID */
    readonly constructId: string;
    /** Lambda function ARN */
    readonly arn: string;
    /** Microservice name */
    readonly microserviceName: string;
    /** Handler hash key */
    readonly handlerHashKey: string;
    /** Lambda ID (e.g., 'payments.charge') */
    readonly lambdaId: string;
}
/**
 * Properties for RuntimeAwakeMetadataGenerator
 */
export interface RuntimeAwakeMetadataGeneratorProps {
    /** Live Dev stack containing infrastructure resources */
    readonly runtimeAwakeStack: RuntimeAwakeStack;
    /** Application name */
    readonly appName: string;
    /** Deployment stage */
    readonly stage: 'dev' | 'staging' | 'prod';
}
/**
 * RuntimeAwakeMetadataGenerator - Generates metadata for Local CLI consumption.
 *
 * Creates a JSON metadata file containing:
 * - IoT endpoint URL
 * - Session table name
 * - Payload bucket name
 * - Handler mappings (construct ID → ARN, microservice, hash key)
 *
 * The metadata is output as a CloudFormation export and can be
 * retrieved by the Local CLI to configure connections.
 *
 * **Requirements**: 18.5
 *
 * @example
 * ```typescript
 * const metadataGenerator = new RuntimeAwakeMetadataGenerator(this, 'Metadata', {
 *   runtimeAwakeStack,
 *   appName: 'my-app',
 *   stage: 'dev',
 * });
 *
 * // Register handlers
 * metadataGenerator.registerHandler({
 *   constructId: 'PaymentsCharge',
 *   arn: chargeFunction.functionArn,
 *   microserviceName: 'payments',
 *   handlerHashKey: 'abc123',
 *   lambdaId: 'payments.charge',
 * });
 *
 * // Generate metadata output
 * metadataGenerator.generateOutput();
 * ```
 */
export declare class RuntimeAwakeMetadataGenerator extends Construct {
    private readonly runtimeAwakeStack;
    private readonly appName;
    private readonly stage;
    private readonly handlers;
    constructor(scope: Construct, id: string, props: RuntimeAwakeMetadataGeneratorProps);
    /**
     * Register a handler in the metadata.
     *
     * @param metadata - Handler metadata
     */
    registerHandler(metadata: HandlerMetadata): void;
    /**
     * Register a Lambda function with automatic metadata extraction.
     *
     * @param constructId - Lambda construct ID
     * @param lambdaFunction - Lambda function
     * @param microserviceName - Microservice name
     * @param handlerHashKey - Handler hash key
     * @param lambdaId - Lambda ID
     */
    registerLambda(constructId: string, lambdaFunction: lambda.Function, microserviceName: string, handlerHashKey: string, lambdaId: string): void;
    /**
     * Generate the metadata object.
     *
     * @returns RuntimeAwakeMetadata object
     */
    generateMetadata(): RuntimeAwakeMetadata;
    /**
     * Generate CloudFormation output with metadata JSON.
     *
     * Creates a CloudFormation export that can be retrieved by the Local CLI.
     */
    generateOutput(): void;
    /**
     * Get all registered handlers.
     *
     * @returns Map of construct IDs to handler metadata
     */
    getHandlers(): ReadonlyMap<string, HandlerMetadata>;
    /**
     * Get handler count.
     *
     * @returns Number of registered handlers
     */
    getHandlerCount(): number;
    /**
     * Check if a handler is registered.
     *
     * @param constructId - Lambda construct ID
     * @returns True if handler is registered
     */
    hasHandler(constructId: string): boolean;
    /**
     * Get handler metadata by construct ID.
     *
     * @param constructId - Lambda construct ID
     * @returns Handler metadata or undefined
     */
    getHandler(constructId: string): HandlerMetadata | undefined;
}
/**
 * Validate RuntimeAwakeMetadata structure.
 *
 * Checks that the metadata contains all required fields with valid values.
 *
 * @param metadata - Metadata to validate
 * @returns True if valid, throws error if invalid
 */
export declare function validateRuntimeAwakeMetadata(metadata: unknown): metadata is RuntimeAwakeMetadata;
/**
 * Parse RuntimeAwakeMetadata from JSON string.
 *
 * @param json - JSON string to parse
 * @returns Validated RuntimeAwakeMetadata object
 */
export declare function parseRuntimeAwakeMetadata(json: string): RuntimeAwakeMetadata;
