import type { ExternalToast } from "sonner"; /** * Error handling utilities for the Courier Designer */ export interface TemplateError { /** Human-readable error message */ message: string; /** Optional toast configuration (duration, action, description, etc.) */ toastProps?: ExternalToast; } /** * Creates a custom error (for use in override functions) */ export declare const createCustomError: (message: string, toastProps?: ExternalToast) => TemplateError; /** * Checks if an error has a retry action configured */ export declare const isRetryableError: (error: TemplateError) => boolean; /** * Extracts error message from various error formats for backward compatibility */ export declare const extractErrorMessage: (error: unknown) => string; /** * Converts a legacy string error to a TemplateError */ export declare const convertLegacyError: (error: string | TemplateError) => TemplateError;