import type { Hono } from "hono"; import type { Logger } from "pino"; /** * Every top-level application view segment the client router can navigate * to (design.md D7; specs/web-ui/spec.md "Routes"; task 10.1). * * Each is registered explicitly below — an exact match and a `/*` nested * match, per the spec's `GET {path}/` and * `GET {path}//*` rows — rather than a single catch-all beneath * the UI path. A catch-all would shadow health probes, webhooks, and the API * whenever the UI is mounted at `/`, which is exactly the bug D7 exists to * avoid. Adding a new top-level view costs one entry in this array; nothing * elsewhere needs to change for it to be served the shell. * * This array MUST be kept in sync with the client router's registered * segments (`src/core/web-ui/app/lib/router.ts`) — a client-side route with * no server entry here would 404 on reload; a server entry with no client * route would render a blank shell. `tests/status-page.test.ts` asserts each * of these serves the shell and that an unregistered segment does not. */ export declare const UI_VIEW_SEGMENTS: readonly ["rooms", "devices", "automations", "state", "logs", "homekit"]; /** * Register web UI routes directly on an existing Hono app. * * Called by `HttpServer.mountWebUi()` when the web UI is enabled. It handles: * - The HTML shell (dashboard page) * - Login / logout flow when a token is configured * * All data API routes (`/api/*`) are served directly by `HttpServer`. * * @param logger Optional logger for authentication events */ export declare function registerWebUiRoutes(app: Hono, path: string, token: string, logger?: Logger): void; //# sourceMappingURL=index.d.ts.map