/**
 * Error Formatter
 *
 * Provides consistent error formatting across all PRIVATE.ME packages.
 */
import type { ACIErrorDetail, ACIErrorOptions } from './types.js';
/**
 * Create a detailed ACI error.
 *
 * @param code Machine-readable error code (e.g., 'INVALID_DID')
 * @param message Human-readable error message
 * @param options Optional error details (hint, field, docs)
 * @returns Detailed error object
 *
 * @example
 * ```typescript
 * const error = createDetailedError(
 *   'INVALID_DID',
 *   'DID format is invalid',
 *   {
 *     hint: 'DIDs must start with "did:" followed by method (e.g., did:key:z6Mk...)',
 *     field: 'recipientDID',
 *     docs: 'https://private.me/docs/did-format'
 *   }
 * );
 * ```
 */
export declare function createDetailedError(code: string, message: string, options?: ACIErrorOptions): ACIErrorDetail;
/**
 * Format an error for display to the user.
 *
 * Creates a human-friendly error message with hints and documentation links.
 *
 * @param error Detailed error object
 * @returns Formatted error string
 *
 * @deprecated Use formatErrorStructured() for new code. This function remains for backward compatibility.
 *
 * @example
 * ```typescript
 * const error = createDetailedError('INVALID_DID', 'DID format is invalid', {
 *   hint: 'DIDs must start with "did:"',
 *   docs: 'https://private.me/docs/did-format'
 * });
 *
 * const formatted = formatErrorForUser(error);
 * // "DID format is invalid
 * //  Hint: DIDs must start with "did:"
 * //  Docs: https://private.me/docs/did-format"
 * ```
 */
export declare function formatErrorForUser(error: ACIErrorDetail): string;
/**
 * Format an error for logging (includes error code).
 *
 * @param error Detailed error object
 * @returns Formatted log string
 */
export declare function formatErrorForLog(error: ACIErrorDetail): string;
/**
 * Check if an error is an ACIErrorDetail.
 *
 * @param error Unknown error object
 * @returns True if error is an ACIErrorDetail
 */
export declare function isACIError(error: unknown): error is ACIErrorDetail;
/**
 * Convert any error to an ACIErrorDetail.
 *
 * @param error Error object (Error, ACIErrorDetail, or unknown)
 * @returns ACIErrorDetail
 */
export declare function toACIError(error: unknown): ACIErrorDetail;
/**
 * Format an error with multiple structured representations.
 *
 * Returns an object with the original error details plus formatted versions
 * optimized for different use cases (display, logging, APIs, docs).
 *
 * @param error Detailed error object
 * @returns Error with formats
 *
 * @example
 * ```typescript
 * const error = createDetailedError('INVALID_DID', 'DID format is invalid', {
 *   hint: 'DIDs must start with "did:"',
 *   field: 'recipientDID',
 *   docs: 'https://private.me/docs/did-format'
 * });
 *
 * const formatted = formatErrorStructured(error);
 * console.log(formatted.formats.singleline);
 * // "error | INVALID_DID | DID format is invalid | field=recipientDID"
 *
 * console.log(formatted.formats.multiline);
 * // "Error: DID format is invalid
 * //  Code: INVALID_DID
 * //  Field: recipientDID
 * //  Hint: DIDs must start with "did:"
 * //  Docs: https://private.me/docs/did-format"
 *
 * console.log(formatted.formats.json);
 * // '{"code":"INVALID_DID","message":"DID format is invalid",...}'
 * ```
 */
export declare function formatErrorStructured(error: ACIErrorDetail): import('./types.js').FormattedError;
/**
 * Detailed error information for debugging and user-facing messages.
 * Maps error codes to human-readable descriptions and recovery suggestions.
 */
export declare const ERROR_DETAILS: Record<string, {
    description: string;
    recovery: string;
    aws: string;
    grpc: string;
    http: number;
    severity: 'low' | 'medium' | 'high' | 'critical';
}>;
//# sourceMappingURL=errors.d.ts.map