import type { Response } from 'express'; import AbstractController, { type TMiddleware } from '../modules/AbstractController.ts'; import type { FrameworkRequest } from '../services/http/HttpServer.ts'; import { HttpResponse } from '../services/http/responses.ts'; /** * Probe endpoints for deploys, load balancers and orchestrators. * `GET /health/live` never touches a dependency (a failing liveness probe * restarts the process); `GET /health/ready` also pings MongoDB. Override this * controller in your app to add checks, middleware or another mount path. * Handlers return their response; `res` stays an optional parameter (and * `Response` a possible return) so overrides written against `res` still fit. */ declare class Health extends AbstractController { get routes(): { get: { '/live': (req: FrameworkRequest, res?: Response) => Promise; '/ready': (req: FrameworkRequest, res?: Response) => Promise; }; }; static get middleware(): Map; live(req: FrameworkRequest, res?: Response): Promise; ready(req: FrameworkRequest, res?: Response): Promise; /** With `health.token` set, the request must carry it (`X-Health-Token` or `?token=`). */ isAuthorized(req: FrameworkRequest): boolean; unauthorized(req: FrameworkRequest, res?: Response): HttpResponse | Response; } export default Health;