import type { MiddlewareHandler } from '@rudderjs/contracts'; import type { TelescopeStorage, TelescopeConfig } from './types.js'; export interface RegisterTelescopeRoutesOptions { /** Path prefix for all telescope routes — default `/telescope` */ path?: string; /** Auth gate — receives request, returns boolean. Same shape as TelescopeConfig.auth. */ auth?: TelescopeConfig['auth']; /** Extra middleware to prepend to all routes */ middleware?: MiddlewareHandler[]; /** * How the dashboard receives new entries. `'polling'` (default) re-fetches * the list endpoint on a timer; `'stream'` registers the SSE endpoint and * the dashboard subscribes via `EventSource`. See `TelescopeConfig.updates`. */ updates?: 'polling' | 'stream'; /** Poll interval in ms when `updates === 'polling'`. Default `2000`. */ pollInterval?: number; } /** * Register all Telescope routes — UI pages, per-entry detail pages, batch * groupings, API endpoints. Called from `TelescopeProvider.boot()` once * the router peer is resolved. * * Mirrors the package-UI shape established by `@rudderjs/auth`'s * `registerAuthRoutes()`. Package-internal pages live under * `views/vanilla/`, route registration is centralised here, the API * handler implementations live in `api/routes.ts`. */ export declare function registerTelescopeRoutes(storage: TelescopeStorage, opts?: RegisterTelescopeRoutesOptions): Promise; //# sourceMappingURL=routes.d.ts.map