/**
 * Error Formatter
 *
 * Formats metadata resolution errors into user-friendly messages.
 * Ensures AWS error codes are not exposed to users and provides
 * actionable deployment guidance.
 *
 * @module bin/commands/dev/error-formatter
 *
 * @see Requirements 3.1, 3.2, 3.3, 3.4, 3.5
 */
import type { ResourceType } from './metadata-resolver.types';
/**
 * Formatted error for display.
 *
 * Contains user-friendly error information without exposing
 * internal AWS error codes.
 *
 * @see Requirements 3.4, 3.5
 */
export interface FormattedError {
    /** User-friendly error message */
    readonly message: string;
    /** Suggested fix or next steps */
    readonly suggestedFix: string;
    /** Deployment command (if applicable) */
    readonly deploymentCommand?: string;
    /** Additional details (for verbose mode) */
    readonly details?: string;
}
/**
 * Get a human-readable label for a resource type.
 *
 * @param resourceType - Resource type
 * @returns Human-readable label
 */
export declare function getResourceTypeLabel(resourceType: ResourceType): string;
/**
 * Check if a string contains any AWS error codes.
 *
 * @param text - Text to check
 * @returns True if the text contains AWS error codes
 *
 * @see Requirements 3.5
 */
export declare function containsAwsErrorCode(text: string): boolean;
/**
 * Remove AWS error codes from a string.
 *
 * @param text - Text to sanitize
 * @returns Sanitized text without AWS error codes
 *
 * @see Requirements 3.5
 */
export declare function sanitizeErrorMessage(text: string): string;
/**
 * Format a stack-not-found error.
 *
 * Provides a user-friendly message indicating that the Live Dev
 * infrastructure needs to be deployed.
 *
 * @param stackName - Stack that wasn't found
 * @returns Formatted error
 *
 * @see Requirements 3.1, 3.4
 *
 * @example
 * ```typescript
 * const error = formatStackNotFoundError('my-app-RuntimeAwake-dev');
 * console.log(error.message);
 * // "Live Dev infrastructure not deployed."
 * console.log(error.deploymentCommand);
 * // "npx cdk deploy my-app-RuntimeAwake-dev"
 * ```
 */
export declare function formatStackNotFoundError(stackName: string): FormattedError;
/**
 * Format a resource-not-found error.
 *
 * Provides a user-friendly message indicating which specific resource
 * is missing and how to deploy it.
 *
 * @param resourceType - Type of resource
 * @param resourceName - Name of resource
 * @param stackName - Stack that should contain the resource
 * @returns Formatted error
 *
 * @see Requirements 3.2, 3.4
 *
 * @example
 * ```typescript
 * const error = formatResourceNotFoundError(
 *   'dynamodb-table',
 *   'my-app-dev-sessions',
 *   'my-app-RuntimeAwake-dev'
 * );
 * console.log(error.message);
 * // "DynamoDB session table 'my-app-dev-sessions' not found."
 * ```
 */
export declare function formatResourceNotFoundError(resourceType: ResourceType, resourceName: string, stackName: string): FormattedError;
/**
 * Format a permission error.
 *
 * Provides a user-friendly message indicating which permissions are
 * required without exposing internal AWS error codes.
 *
 * @param operation - Operation that failed
 * @param requiredPermissions - Permissions needed
 * @returns Formatted error
 *
 * @see Requirements 3.5
 *
 * @example
 * ```typescript
 * const error = formatPermissionError(
 *   'querying CloudFormation',
 *   ['cloudformation:DescribeStacks']
 * );
 * console.log(error.message);
 * // "Access denied when querying CloudFormation."
 * ```
 */
export declare function formatPermissionError(operation: string, requiredPermissions: string[]): FormattedError;
/**
 * Format an IoT endpoint error.
 *
 * Provides a user-friendly message indicating that the IoT endpoint
 * is not configured correctly.
 *
 * @param endpoint - Invalid endpoint
 * @returns Formatted error
 *
 * @see Requirements 3.3
 *
 * @example
 * ```typescript
 * const error = formatIotEndpointError('invalid-endpoint');
 * console.log(error.message);
 * // "IoT Core endpoint not configured correctly."
 * ```
 */
export declare function formatIotEndpointError(endpoint: string): FormattedError;
/**
 * Format a cache corruption error.
 *
 * Provides a user-friendly message indicating that the cache will
 * be regenerated automatically.
 *
 * @param cachePath - Path to the corrupted cache file
 * @returns Formatted error
 */
export declare function formatCacheCorruptionError(cachePath: string): FormattedError;
/**
 * Format a metadata parse error.
 *
 * Provides a user-friendly message indicating that the metadata
 * could not be parsed.
 *
 * @param stackName - Stack name (for deployment guidance)
 * @returns Formatted error
 */
export declare function formatMetadataParseError(stackName: string): FormattedError;
/**
 * Format a generic error.
 *
 * Sanitizes the error message to remove AWS error codes and provides
 * a generic suggested fix.
 *
 * @param error - Error to format
 * @param stackName - Stack name (optional, for deployment guidance)
 * @returns Formatted error
 *
 * @see Requirements 3.5
 */
export declare function formatGenericError(error: Error, stackName?: string): FormattedError;
/**
 * Format an error to a display string.
 *
 * Combines the message and suggested fix into a single string
 * suitable for console output.
 *
 * @param formattedError - Formatted error
 * @param includeDetails - Whether to include details
 * @returns Display string
 *
 * @example
 * ```typescript
 * const error = formatStackNotFoundError('my-app-RuntimeAwake-dev');
 * console.log(formatErrorToString(error));
 * // "Live Dev infrastructure not deployed.
 * //  Run 'npx cdk deploy my-app-RuntimeAwake-dev' to deploy the RuntimeAwake stack."
 * ```
 */
export declare function formatErrorToString(formattedError: FormattedError, includeDetails?: boolean): string;
/**
 * Check if a formatted error has a deployment command.
 *
 * @param formattedError - Formatted error
 * @returns True if the error has a deployment command
 */
export declare function hasDeploymentCommand(formattedError: FormattedError): boolean;
/**
 * Validate that a formatted error does not contain AWS error codes.
 *
 * @param formattedError - Formatted error to validate
 * @returns True if the error is properly sanitized
 *
 * @see Requirements 3.5
 */
export declare function isErrorSanitized(formattedError: FormattedError): boolean;
