export type ClientPointKind = 'view' | 'error' | 'fetch_fail' | 'vital';
export interface ClientPoint {
    kind: ClientPointKind;
    /** The screen's route template (`/connections/$id`), never the address with its ids. */
    route: string;
    /** An error's class, an API route, or a vital's name (LCP, INP, CLS). */
    name?: string;
    /** A hash of the error's stack frames. */
    fingerprint?: string;
    /** The `X-Request-Id` of the failed answer, to find its server side. */
    requestId?: string;
    /** ms, or a vital's score. */
    value?: number;
    status?: number;
    device?: 'phone' | 'desktop';
}
/** The stack's frames only (a message can carry anything), with each file's query dropped. */
export declare function stackFingerprint(error: unknown): string;
/** An API address as a route: no host or query, and id-like segments as `:id`. */
export declare function apiRoute(url: string): string;
/** Queues one point (nothing is kept until `useLumenTelemetry` has named the app); the batch goes out every 15 s, at 50 points, or when the tab is hidden. */
export declare function reportClient(p: Omit<ClientPoint, 'device' | 'route'> & {
    route?: string;
}): void;
/** A request that failed: its API route template, status (0 when it never answered) and id. */
export declare function reportFailedFetch(apiRoute: string, status: number, requestId?: string | null): void;
/** An error the page caught or didn't: its class and stack hash only. */
export declare function reportClientError(error: unknown): void;
export interface LumenTelemetryOptions {
    /** The app's name in the points (`console`, `admin`). */
    app: string;
    /** The current screen's route template, from the app's router. */
    route: string;
    /** The build or deploy the page runs. */
    version?: string;
    /** Where batches go; `/api/t` by default. */
    endpoint?: string;
}
/** Mount once at the app's root: every screen change is a view, and errors and vitals follow. */
export declare function useLumenTelemetry(opts: LumenTelemetryOptions): void;
