import type { BoundingBox, TimeRange } from '../core/types.js'; import { type SpatialDataProvider } from '../data/contracts.js'; import type { Renderer } from '../render/renderer.js'; import type { SpatialIndex } from '../spatial/spatial-index.js'; export interface ContractCheck { name: string; run: () => Promise; } export declare class ContractViolation extends Error { readonly name = "ContractViolation"; } export interface ProviderContractOptions { /** A fresh provider per check. It may also implement RealtimeProvider, TrackProvider and DatasetCatalog. */ create: () => SpatialDataProvider; /** One object the provider is known to hold, and (optionally) its type and one of its property values. */ sample: { objectId: string; ontologyType?: string; property?: { name: string; value: unknown; }; }; /** Bounds that do NOT contain the sample — checked only for providers that claim spatial query support. */ outside?: BoundingBox; /** A time range during which the sample has history — checked only for providers with getTracks. */ history?: TimeRange; } /** * The SpatialDataProvider contract (doc §26, ADR-005). Providers may return MORE than a query asks for (the runtime * re-checks every object), but never less: a matching object must not be left out. */ export declare function providerContract(o: ProviderContractOptions): ContractCheck[]; export interface RendererContractOptions { create: () => Renderer; container: () => HTMLElement; } /** The Renderer contract (doc §22, §65): bidirectional, incremental, and fully released by destroy(). */ export declare function rendererContract(o: RendererContractOptions): ContractCheck[]; /** The SpatialIndex contract (doc §11): any index (RBush today, others later) answers like a full scan. */ export declare function spatialIndexContract(create: () => SpatialIndex): ContractCheck[];