import http from 'node:http'; import type { BaseAdapter } from './sync-adapter.js'; export interface SyncServerConfig { /** Port to listen on (default: 3002) */ port?: number; /** Adapter to use for storage operations */ adapter: BaseAdapter; /** Custom route handlers (override defaults) */ routes?: SyncServerRoutes; } export interface SyncServerRoutes { /** Override GET /health */ health?: (req: http.IncomingMessage, res: http.ServerResponse) => Promise | void; /** Override GET /schema/:table */ getSchema?: (req: http.IncomingMessage, res: http.ServerResponse, table: string) => Promise | void; /** Override POST /schema */ postSchema?: (req: http.IncomingMessage, res: http.ServerResponse, body: any) => Promise | void; /** Override POST /migrations */ postMigrations?: (req: http.IncomingMessage, res: http.ServerResponse, body: any) => Promise | void; /** Override GET /:table */ getTable?: (req: http.IncomingMessage, res: http.ServerResponse, table: string, url: URL) => Promise | void; /** Override POST /:table */ postTable?: (req: http.IncomingMessage, res: http.ServerResponse, table: string, records: any[]) => Promise | void; /** Override DELETE /:table/:id */ deleteItem?: (req: http.IncomingMessage, res: http.ServerResponse, table: string, id: string) => Promise | void; } export declare class SyncServer { private server?; private port; private adapter; private routes; constructor(config: SyncServerConfig); init(): Promise; close(): Promise; private handleRequest; } //# sourceMappingURL=sync-server.d.ts.map