/**
 * @module http-status-map
 * Maps xBind error codes to HTTP status codes for REST API responses.
 *
 * This mapping provides:
 * - Consistent HTTP status codes for all 52 xBind error codes
 * - Retryability information for client retry logic
 * - Error categorization (client vs server errors)
 * - Human-readable status text
 *
 * Based on RFC 9110 HTTP Semantics and REST API best practices.
 *
 * @example
 * ```typescript
 * import { getHttpStatus, isRetryable } from '@private.me/xbind/http-status-map';
 *
 * const status = getHttpStatus('VERIFY_FAILED'); // 401
 * const canRetry = isRetryable('NETWORK_ERROR');  // true
 * ```
 */
/**
 * HTTP status mapping entry with metadata.
 */
export interface HttpStatusMapping {
    /** HTTP status code (e.g., 400, 401, 500) */
    readonly statusCode: number;
    /** HTTP status text (e.g., 'Bad Request', 'Unauthorized') */
    readonly statusText: string;
    /** Whether the operation should be retried by the client */
    readonly retryable: boolean;
    /** Error type classification */
    readonly errorType: 'Client' | 'Server';
    /** Error category for grouping related errors */
    readonly category: 'Identity' | 'Envelope' | 'Transport' | 'Registry' | 'Key Agreement' | 'Split Channel' | 'Xchange' | 'Agent';
    /** Rationale for the HTTP status code choice */
    readonly rationale: string;
}
/**
 * Complete mapping of xBind error codes to HTTP status codes.
 * All 52 error codes are mapped for 100% coverage.
 */
export declare const HTTP_STATUS_MAP: Record<string, HttpStatusMapping>;
/**
 * Get HTTP status code for a given xBind error code.
 * Handles colon-separated sub-codes (e.g., 'DECRYPT_FAILED:KEY_AGREEMENT').
 *
 * @param errorCode - xBind error code (e.g., 'VERIFY_FAILED')
 * @returns HTTP status code (e.g., 401) or 500 if unknown
 *
 * @example
 * ```typescript
 * getHttpStatus('VERIFY_FAILED')           // 401
 * getHttpStatus('DECRYPT_FAILED:NETWORK')  // 401 (ignores sub-code)
 * getHttpStatus('UNKNOWN_ERROR')           // 500 (fallback)
 * ```
 */
export declare function getHttpStatus(errorCode: string): number;
/**
 * Get HTTP status text for a given xBind error code.
 *
 * @param errorCode - xBind error code (e.g., 'VERIFY_FAILED')
 * @returns HTTP status text (e.g., 'Unauthorized') or 'Internal Server Error' if unknown
 *
 * @example
 * ```typescript
 * getStatusText('VERIFY_FAILED')  // 'Unauthorized'
 * getStatusText('NOT_FOUND')      // 'Not Found'
 * ```
 */
export declare function getStatusText(errorCode: string): string;
/**
 * Check if an error is retryable by the client.
 *
 * @param errorCode - xBind error code (e.g., 'NETWORK_ERROR')
 * @returns True if the client should retry the operation
 *
 * @example
 * ```typescript
 * isRetryable('NETWORK_ERROR')    // true  (503 - retry with backoff)
 * isRetryable('VERIFY_FAILED')    // false (401 - authentication failure)
 * isRetryable('KEYGEN_FAILED')    // true  (500 - transient server issue)
 * ```
 */
export declare function isRetryable(errorCode: string): boolean;
/**
 * Get complete mapping information for an error code.
 *
 * @param errorCode - xBind error code (e.g., 'VERIFY_FAILED')
 * @returns Complete mapping information or null if not found
 *
 * @example
 * ```typescript
 * const mapping = getMapping('VERIFY_FAILED');
 * if (mapping) {
 *   console.log(`${mapping.statusCode} ${mapping.statusText}`);
 *   console.log(`Retryable: ${mapping.retryable}`);
 *   console.log(`Rationale: ${mapping.rationale}`);
 * }
 * ```
 */
export declare function getMapping(errorCode: string): HttpStatusMapping | null;
/**
 * Get all error codes in a specific category.
 *
 * @param category - Error category (e.g., 'Identity', 'Transport')
 * @returns Array of error codes in that category
 *
 * @example
 * ```typescript
 * const identityErrors = getErrorCodesByCategory('Identity');
 * // ['KEYGEN_FAILED', 'SIGN_FAILED', 'VERIFY_FAILED', ...]
 * ```
 */
export declare function getErrorCodesByCategory(category: HttpStatusMapping['category']): string[];
/**
 * Get all retryable error codes.
 *
 * @returns Array of error codes that are retryable
 *
 * @example
 * ```typescript
 * const retryableErrors = getRetryableErrorCodes();
 * // ['KEYGEN_FAILED', 'EXPORT_FAILED', 'ENCRYPT_FAILED', ...]
 * ```
 */
export declare function getRetryableErrorCodes(): string[];
/**
 * Validate that all error codes from the CSV are mapped.
 * This function is used for testing purposes to ensure 100% coverage.
 *
 * @param csvErrorCodes - Array of error codes from the CSV file
 * @returns Array of missing error codes (empty if all mapped)
 *
 * @internal
 */
export declare function validateCoverage(csvErrorCodes: string[]): string[];
