/**
 * IO Processor
 *
 * Processes IO requests from the sync engine using JavaScript APIs.
 * This is the key benefit of the thin JSI layer - all IO is handled by
 * React Native's standard APIs (fetch, file system), not C++ code.
 *
 * Benefits:
 * - Network requests visible in React Native debugger
 * - Can customize fetch (add proxies, custom headers, etc.)
 * - Easier to test (can mock fetch)
 * - Uses platform-native networking (not C++ HTTP libraries)
 */
import type { NativeSyncIoItem, NativeSyncDatabase } from '../types';
/**
 * IO context contains auth and URL information for HTTP requests
 */
export interface IoContext {
    /** Auth token for HTTP requests */
    authToken?: string | (() => string | Promise<string> | null);
    /** Base URL for normalization (e.g., 'libsql://mydb.turso.io') */
    baseUrl?: string | (() => string | null);
}
/**
 * Set custom file system implementation (optional)
 * By default, uses built-in JSI file system functions.
 * Only call this if you need custom behavior (e.g., encryption, compression).
 *
 * @param readFile - Function to read file as Uint8Array
 * @param writeFile - Function to write Uint8Array to file
 */
export declare function setFileSystemImpl(readFile: (path: string) => Promise<Uint8Array>, writeFile: (path: string, data: Uint8Array) => Promise<void>): void;
/**
 * Process a single IO item
 *
 * @param item - The IO item to process
 * @param context - IO context with auth and URL information
 */
export declare function processIoItem(item: NativeSyncIoItem, context: IoContext): Promise<void>;
/**
 * Drain all pending IO items from sync engine queue and process them.
 * This is called during statement execution when partial sync needs to load missing pages.
 *
 * @param database - The native sync database
 * @param context - IO context with auth and URL information
 */
export declare function drainSyncIo(database: NativeSyncDatabase, context: IoContext): Promise<void>;
//# sourceMappingURL=ioProcessor.d.ts.map