/**
 * @fileoverview Utility functions for the RAG chatbot system
 * @module utils
 *
 * This module provides common utility functions used across the
 * RAG chatbot system.
 */
import type { ChatbotError } from "../core/contexts/ChatbotContext";
/**
 * Creates a standardized ChatbotError object
 */
export declare const createChatbotError: (code: string, message: string, details?: any) => ChatbotError;
/**
 * Formats a file size in bytes to a human-readable string
 */
export declare const formatFileSize: (bytes: number) => string;
/**
 * Generates a unique ID for chatbot entities
 */
export declare const generateId: (prefix?: string) => string;
/**
 * Debounces a function call
 */
export declare const debounce: <T extends (...args: any[]) => any>(func: T, wait: number) => ((...args: Parameters<T>) => void);
/**
 * Throttles a function call
 */
export declare const throttle: <T extends (...args: any[]) => any>(func: T, limit: number) => ((...args: Parameters<T>) => void);
/**
 * Validates an email address
 */
export declare const isValidEmail: (email: string) => boolean;
/**
 * Truncates text to a specified length
 */
export declare const truncateText: (text: string, maxLength: number) => string;
/**
 * Safely parses JSON with error handling
 */
export declare const safeJsonParse: <T = any>(jsonString: string) => T | null;
/**
 * Formats a timestamp to a relative time string
 */
export declare const formatRelativeTime: (timestamp: Date) => string;
//# sourceMappingURL=index.d.ts.map