import { Databases, Tables } from './databases.ts';
import { ClientError } from '../utility/errors/hdbError.js';
import { FileEntry } from '../components/EntryHandler.ts';
/**
 * Computes a deterministic hash of a record's content for tracking data file changes.
 * The hash is computed from a stable JSON representation (sorted keys) to ensure
 * the same content always produces the same hash, regardless of key order.
 *
 * @param record - The record object to hash
 * @returns A hex string hash of the record content
 */
export declare function computeRecordHash(record: Record<string, any>): string;
/**
 * Set up file handlers for data files and loads them into the appropriate tables
 */
export declare function handleApplication(scope: any): void;
/**
 * This component handles data loading from YAML or JSON files into user-defined tables.
 * @param { contents, absolutePath, stats } - File entry content buffer, absolute path, and stats
 * @param tablesRef - Reference to tables object (local const for testing)
 * @param databasesRef - Reference to databases object (local const for testing)
 */
export declare function loadDataFile({ contents, absolutePath }: FileEntry, tablesRef: Tables, databasesRef: Databases): Promise<DataLoaderResult>;
/**
 * Custom errors for the dataLoader. These are thrown during startup validation to fail early
 * rather than continuing with invalid data.
 */
/**
 * Base class for DataLoader specific errors
 */
export declare class DataLoaderError extends ClientError {
    constructor(message: string, statusCode?: number);
}
/**
 * Error thrown when a file has an unsupported extension
 */
export declare class UnsupportedFileExtensionError extends DataLoaderError {
    constructor(filePath: string, extension: string);
}
/**
 * Error thrown when a file cannot be parsed
 */
export declare class FileParseError extends DataLoaderError {
    constructor(filePath: string, originalError: Error);
}
/**
 * Error thrown when a file is empty or invalid
 */
export declare class EmptyFileError extends DataLoaderError {
    constructor(filePath: string);
}
/**
 * Error thrown when a data file is missing required properties
 */
export declare class MissingRequiredPropertyError extends DataLoaderError {
    constructor(filePath: string, property: string);
}
/**
 * Error thrown when a property has an invalid type
 */
export declare class InvalidPropertyTypeError extends DataLoaderError {
    constructor(filePath: string, property: string, expectedType: string);
}
/**
 * Error thrown when trying to load data into the system database
 */
export declare class SystemDatabaseError extends DataLoaderError {
    constructor(database: string, table: string);
}
/**
 * Error thrown when record processing fails
 */
export declare class RecordProcessingError extends DataLoaderError {
    constructor(tableIdentifier: string, originalError: Error);
}
export interface DataFileFormat {
    database?: string;
    table: string;
    records: Record<string, any>[];
}
export declare class DataLoaderResult {
    #private;
    constructor(filePath: string, database: string | null | undefined, table: string | null, status: string, count: number, message: string);
    get filePath(): string;
    get database(): string;
    get table(): string;
    get status(): string;
    get count(): number;
    get message(): string;
    toJSON(): {
        filePath: string;
        database: string;
        table: string;
        status: string;
        count: number;
        message: string;
    };
}
