import type { AuthContext, JournalProvider, LinkProvider, OntologySpatialResolver, RealtimeProvider, SpatialDataProvider, SpatialObject, TrackProvider } from '../../vendor/map-engine/index.js'; import { UnsSpatialProvider } from '../../vendor/map-provider-uns/index.js'; import { type MockRecord } from '../../vendor/map-engine/testing/index.js'; export interface UnsMapSourceOptions { /** The UNS workspace id (`ws_…`) whose spatial nodes the map shows. None: the map shows `sample`. */ workspace?: string; /** Shown as the datasets' source. */ workspaceName?: string; /** The UNS backend. Default: `configure({ unsBaseUrl })`, else worked out from the session's `apiBaseUrl`. */ unsBaseUrl?: string; /** How often live values are read. Default 3000 ms. */ pollMs?: number; /** * What the map shows when there is no workspace, or while the app is on sample data (nobody signed in with * `auth="optional"`). Give each record the `ontologyType` your layers ask for. A new array moves the map's * objects to it (added, changed and removed by `objectId`), so simulated live data is just a new array. * Default: nothing — the layers stay empty. */ sample?: Array; } /** Spread into ``: the data side of a map. */ export interface UnsMapSourceProps { provider: SpatialDataProvider; realtime: RealtimeProvider; history: TrackProvider; ontology: OntologySpatialResolver; journal: JournalProvider; links: LinkProvider; auth: AuthContext | null; } export interface UnsMapSource { props: UnsMapSourceProps; /** The UNS provider (null on sample data): `listDatasets()` gives every spatial class with its properties. */ uns: UnsSpatialProvider | null; /** True while the map shows the app's sample records rather than the plant's. */ sample: boolean; } /** `https://appserver.X` → `https://uns-backend-server.X`. Any other host: IOSense's production UNS. */ export declare function unsBaseUrlFor(apiBaseUrl: string): string; /** * The UNS as a map data source, on the viewer's session: the token is read on every request, so a refreshed * session is used at once, and handed to the engine as `auth` so the UNS decides what is visible. Inside * `` only. * * The UNS backend answers only IOSense's own origins (CORS). An app served from elsewhere sets `unsBaseUrl` to a * pass-through that allows it. */ export declare function useUnsMapSource(options: UnsMapSourceOptions): UnsMapSource;