import { IncomingMessage, ServerResponse } from 'http' interface PutCallbackParams { old_val: string patches: Array<{ unit: string; range: string; content: string }> | null version: string[] parents: string[] } interface ServeOptions { key?: string put_cb?: (key: string, val: string, params: PutCallbackParams) => void } interface GetResult { version: string[] body: string | Uint8Array } interface Resource { key: string val: string version: string[] } interface BraidText { verbose: boolean db_folder: string | null cors: boolean cache: Record> serve(req: IncomingMessage, res: ServerResponse, options?: ServeOptions): Promise get(key: string): Promise get(key: string, options: Record): Promise put(key: string, options: Record): Promise<{ change_count: number }> delete(key: string): Promise list(): Promise sync(a: string, b: string | URL, options?: Record): Promise free_cors(res: ServerResponse): void create_braid_text(): BraidText } declare const braidText: BraidText export = braidText