import { type IdentityPlugin } from "@nifrajs/core/server"; type MaybePromise = T | Promise; export interface HealthcheckOptions { /** Liveness path - always `200` while the process is up. Default `"/health"`. */ readonly path?: string; /** Readiness path - runs `checks`; `200` if all pass, `503` otherwise. Default `"/ready"`. */ readyPath?: string; /** Readiness checks (DB ping, cache reachable, …). Each returns a boolean or throws; a throw counts * as failing. `/ready` reports each by name and is `200` only when all pass. */ readonly checks?: Readonly MaybePromise>>; } /** * Register **liveness** (`/health`) and **readiness** (`/ready`) endpoints. Liveness is a flat `200` * (the process is serving). Readiness runs each `check` and returns `200 { status: "ok", checks }` * when all pass, or `503 { status: "error", checks }` when any fail (a thrown check counts as failed). * Both are `Cache-Control: no-store`. * * Apply it **before** auth guards so the endpoints stay public (`beforeHandle` is order-scoped): * * ```ts * app.use(healthcheck({ checks: { db: () => db.ping() } })).use(bearer({ verify })) * ``` */ export declare function healthcheck(options?: HealthcheckOptions): IdentityPlugin; export {}; //# sourceMappingURL=healthcheck.d.ts.map