/**
 * Configuration options for CloudFormationResolver
 *
 * @example
 * ```typescript
 * // Default pattern: {serviceName}-RuntimeInfra-{stage}
 * const resolver = new CloudFormationResolver({
 *   serviceName: 'myapp',
 *   stage: 'dev',
 * });
 * resolver.inferStackName(); // Returns: 'myapp-dev'
 *
 * // Custom pattern: {stage}-{serviceName}
 * const resolver2 = new CloudFormationResolver({
 *   serviceName: 'myapp',
 *   stage: 'prod',
 *   stackNamePattern: '{stage}-{serviceName}',
 * });
 * resolver2.inferStackName(); // Returns: 'prod-myapp'
 *
 * // Custom pattern with prefix: stack-{serviceName}-RuntimeInfra-{stage}
 * const resolver3 = new CloudFormationResolver({
 *   serviceName: 'api',
 *   stage: 'staging',
 *   stackNamePattern: 'stack-{serviceName}-RuntimeInfra-{stage}',
 * });
 * resolver3.inferStackName(); // Returns: 'stack-api-staging'
 * ```
 */
export interface CloudFormationResolverOptions {
    /** AWS region (defaults to AWS_REGION env var) */
    region?: string;
    /** Explicit stack name (overrides inference) */
    stackName?: string;
    /** Stage for stack name inference (dev, prod, etc.) */
    stage?: string;
    /** Service name for stack name inference (defaults to 'runtime') */
    serviceName?: string;
    /** Enable fallback to environment variables (default: true) */
    useEnvFallback?: boolean;
    /** Skip CloudFormation resolution and use environment variables only (default: false) */
    useEnv?: boolean;
    /**
     * Custom stack name pattern (default: '{serviceName}-RuntimeInfra-{stage}')
     *
     * Supported placeholders:
     * - {serviceName}: Replaced with the service name
     * - {stage}: Replaced with the stage
     *
     * Examples:
     * - '{serviceName}-RuntimeInfra-{stage}' → 'myapp-dev'
     * - '{stage}-{serviceName}' → 'dev-myapp'
     * - 'stack-{serviceName}-RuntimeInfra-{stage}' → 'stack-myapp-dev'
     * - '{serviceName}_{stage}' → 'myapp_dev'
     * - 'cf-{stage}-{serviceName}' → 'cf-dev-myapp'
     */
    stackNamePattern?: string;
}
/**
 * Parsed CloudFormation stack outputs
 */
export interface StackOutputs {
    seoTableName?: string;
    staticBucketName?: string;
    cloudFrontDistributionId?: string;
    apiEndpoint?: string;
    [key: string]: string | undefined;
}
/**
 * Stack information including metadata and outputs
 */
export interface StackInfo {
    stackName: string;
    stackStatus: string;
    creationTime: Date;
    outputs: StackOutputs;
}
/**
 * Custom error for stack not found
 */
export declare class StackNotFoundError extends Error {
    readonly stackName: string;
    readonly availableStacks: string[];
    constructor(message: string, stackName: string, availableStacks: string[]);
}
/**
 * Custom error for output not found
 */
export declare class OutputNotFoundError extends Error {
    readonly stackName: string;
    readonly outputKey: string;
    readonly availableOutputs: string[];
    constructor(message: string, stackName: string, outputKey: string, availableOutputs: string[]);
}
/**
 * Custom error for credentials issues
 */
export declare class CredentialsError extends Error {
    constructor(message: string);
}
/**
 * Custom error for region not specified
 */
export declare class RegionNotSpecifiedError extends Error {
    constructor(message: string);
}
/**
 * Custom error for CloudFormation API errors
 */
export declare class CloudFormationApiError extends Error {
    readonly operation: string;
    readonly stackName: string;
    readonly region: string;
    readonly awsError: string;
    constructor(message: string, operation: string, stackName: string, region: string, awsError: string);
}
/**
 * Service for resolving AWS resource identifiers from CloudFormation stack outputs
 */
export declare class CloudFormationResolver {
    private readonly client;
    private readonly cache;
    private readonly options;
    private readonly stage?;
    /**
     * A function that refines and formats a stack name pattern for usage in service configuration.
     *
     * @param {string} stackName - The original stack name to be sanitized and used in the formatted pattern.
     * @returns {string} A formatted stack name pattern.
     *
     * @todo: regine with options pattern
     */
    refineStackPattern: (stackName: string) => string;
    constructor(options?: CloudFormationResolverOptions);
    /**
     * Resolves stack name from local cdk-outputs.json file
     * Returns null if file not found or no matching stage
     */
    private resolveStackNameFromCdkOutputs;
    /**
     * Resolves service name from CDK app entry point (cdk/bin/app.ts or cdk/bin/app.js)
     * Returns null if file not found or serviceName not exported
     */
    private resolveServiceNameFromCdk;
    /**
     * Infers stack name from stage and service name using the configured pattern.
     * Default pattern: {serviceName}-RuntimeInfra-{stage}
     * Custom patterns can use placeholders: {serviceName}, {stage}
     */
    inferStackName(): string;
    /**
     * Generates a stack name by replacing placeholders in the provided pattern with corresponding values.
     *
     * @param {string} stackPattern - The pattern containing placeholders to be replaced. Supported placeholders are:
     *                                 {serviceName} - The name of the service.
     *                                 {stage} - The current stage.
     * @return {string} A string representing the stack name with the placeholders replaced by their respective values.
     * @throws {Error} If the stage is not provided and placeholders cannot be replaced.
     */
    stackNameByPattern(stackPattern: string): string;
    /**
     * Gets the stack name to use for queries (explicit or inferred)
     */
    getCurrentStackName(): string;
    /**
     * Resolves all stack outputs for the configured stack.
     * Results are cached for the lifetime of the resolver instance.
     */
    resolveStackOutputs(stackName: string): Promise<StackOutputs>;
    /**
     * Fetches stack outputs with exponential backoff retry logic
     */
    private fetchStackOutputsWithRetry;
    /**
     * Fetches stack outputs from CloudFormation API
     */
    private fetchStackOutputs;
    /**
     * Maps CloudFormation output keys to camelCase property names
     *
     * @todo: complete stacks configuration externally, need to resolve stacks output control
     */
    private mapOutputKey;
    /**
     * Lists available stacks in the region
     */
    private listAvailableStacks;
    /**
     * Resolves a specific output value by key.
     * Throws error if output not found and no fallback available.
     */
    resolveOutput(outputKey: string, envFallback?: string): Promise<string>;
    /**
     * Lists all CloudFormation stacks in the region.
     * Optionally filters by stage suffix.
     */
    listStacks(currentStack: string, stageFilter?: string): Promise<StackInfo[]>;
    /**
     * Clears the in-memory cache.
     */
    clearCache(): void;
    /**
     * Sleep utility for retry logic
     */
    private sleep;
}
