/** * Control-plane HTTP(S) API — dispatcher. * Route bodies live in `./routes/*` and `./controllers/*` (Wave2 R2). * When config.tlsEnabled + cert/key files exist, binds HTTPS on the same port. */ import { type Server as HttpServer } from 'node:http'; import { type Server as HttpsServer } from 'node:https'; import type { AppContext } from './app-context.js'; export type ControlPlaneServer = HttpServer | HttpsServer; export type CreateServerResult = { server: ControlPlaneServer; /** True when HTTPS materials loaded and server is TLS */ https: boolean; }; /** * Create control-plane server (HTTP or HTTPS from config.tls*). * Prefer createControlPlaneServer; createHttpServer kept for tests. */ export declare function createControlPlaneServer(ctx: AppContext): CreateServerResult; export type DualListenResult = { https: boolean; primary: { host: string; port: number; scheme: 'http' | 'https'; }; /** Plain HTTP companion (redirect or full API) when TLS dual mode */ http?: { host: string; port: number; }; servers: ControlPlaneServer[]; }; export declare function listenControlPlane(ctx: AppContext, host: string, port: number): Promise; /** @deprecated use createControlPlaneServer — returns HTTP server only for tests */ export declare function createHttpServer(ctx: AppContext): HttpServer; export declare function listen(server: ControlPlaneServer, host: string, port: number): Promise<{ host: string; port: number; }>; //# sourceMappingURL=http-server.d.ts.map