import { FlexError, FlexErrorCategory } from "../FlexError"; /** * Categorizes a FlexError to determine who is responsible for resolution * * @param {FlexError} error - The FlexError to categorize * @returns {FlexErrorCategory} FlexErrorCategory indicating responsibility for resolution * @since 2.15.0 * @example * const error = new ValidationError(ValidationErrorKeys.untrustedDomain); * const category = categorizeFlexError(error); * // category === FlexErrorCategory.configuration */ export declare function categorizeFlexError(error: FlexError): FlexErrorCategory; /** * Checks if an error should be overridden with incident messaging * Only infrastructure errors during incidents should show generic incident messages * * @param {FlexError} error - The FlexError to check * @param {string | undefined} flexStatus - Current Flex service status * @returns {boolean} true if error should show incident messaging * @since 2.15.0 * @example * const error = new FlexError("Network timeout"); * const shouldShow = shouldShowIncidentMessage(error, "partial_outage"); * // shouldShow === true for infrastructure errors during incidents */ export declare function shouldShowIncidentMessage(error: FlexError, flexStatus: string | undefined): boolean; /** * Gets an improved error message for configuration errors * Provides more actionable guidance for common configuration issues * * @param {FlexError} error - The FlexError to get improved message for * @returns {string | undefined} Improved error message or undefined if no improvement available * @since 2.15.0 * @example * const error = new ValidationError(ValidationErrorKeys.untrustedDomain); * const message = getErrorMessageByCategory(error); * // message === "Domain not authorized in your Flex configuration..." */ export declare function getErrorMessageByCategory(error: FlexError): string | undefined; /** * Categorizes and enhances a FlexError with improved messaging for UI error handling * * This function should be called during UI-specific error processing (e.g., parseCriticalPathError) * to enhance error information with categorization and improved user-facing messages. * * NOTE: This function modifies the error object in-place for UI display. The original error * message is preserved in error.content.description. * * @param {FlexError} error - The FlexError to categorize and enhance (will be modified in-place) * @returns {FlexError} The same error object (modified) with category and potentially improved message * @since 2.15.0 * @example * // In UI error handling (e.g., login flows) * const error = new FlexError("Authentication failed"); * const enhanced = enhanceUIError(error); * // enhanced.content.category is now set and message may be improved * // original message is in enhanced.content.description */ export declare function enhanceUIError(error: FlexError): FlexError;