import { type SeriesPoint } from './data.js'; export interface LatestOptions { /** Poll interval. Default 60 s; 0 reads once. */ refreshMs?: number; } export interface LatestResult { /** Topic → its latest value. Absent until the first read; null when the plant has none. */ data: Record; loading: boolean; error: Error | null; /** Read again now. */ refresh: () => void; } /** The latest value of each UNS topic, polled. */ export declare function useLatest(topics: readonly string[], options?: LatestOptions): LatestResult; export interface SeriesOptions { /** How far back from now. Default 24. */ hours?: number; /** Bucket size. Default 'hour'. */ bucket?: 'minute' | 'hour' | 'day' | 'week' | 'month'; /** Poll interval. Default 5 minutes; 0 reads once. */ refreshMs?: number; } export interface SeriesResult { /** Topic → its points, oldest first. */ data: Record; loading: boolean; error: Error | null; refresh: () => void; } /** Each UNS topic's values over the last hours — for a trend, a table or a sparkline. */ export declare function useSeries(topics: readonly string[], options?: SeriesOptions): SeriesResult; /** Who is signed in. IOSense has no named roles; gate on organisation, or your own list of ids or emails. */ export interface IOSenseUser { id: string; email: string; name: string; organisation: { id: string; name: string; }; } export interface UserResult { /** Null until read and while nobody is signed in; a sample user while the app shows sample data. */ user: IOSenseUser | null; loading: boolean; error: Error | null; } /** The signed-in viewer: id, email, name, organisation. */ export declare function useUser(): UserResult;