import type { SqliteAdapter as Database } from '../db/sqlite-adapter.js'; /** The serve OpenAPI document (source of the generated SDK), version-synced. */ export declare function openApiDocument(): Record; /** * Framework-agnostic API-key verifier shape (matches `@hasna/contracts/auth` * `ApiKeyVerifier`). Kept structural so serve.ts has no hard dependency on the * auth package; the entry point injects the real verifier. */ export interface ApiAuthenticator { authenticate(headers: Headers, context?: { method?: string | null; path?: string | null; requiredScopes?: readonly string[]; }): Promise<{ ok: boolean; status: number; reason?: string; message?: string; }>; } interface StartServerOptions { db?: Database; hostname?: string; log?: (message: string) => void; } export interface HandlerOptions { /** API-key verifier (from `@hasna/contracts/auth`). When present, every * request outside the open foundation probes must present a valid * `economy:*` scoped key. This is the internet-facing auth path. */ authenticator?: ApiAuthenticator; /** Readiness probe proving storage is reachable + migrated. */ readyCheck?: () => Promise<{ ready: boolean; detail?: string; }>; } export declare function createHandler(db: Database, options?: HandlerOptions): (req: Request) => Promise; export declare function startServer(port?: number, options?: StartServerOptions): ReturnType; export {}; //# sourceMappingURL=serve.d.ts.map