import type { MaterializedViewRegistry } from '../materialized-views/registry.js'; import type { OverlayedViewStrategy } from './types.js'; /** * Vault-internal registry of overlay strategies. Resolves the base * MV's `rowKey` lazily so virtual-collection writes can derive ids * from the row. * * @internal */ export declare class OverlayedViewRegistry { private readonly _byName; /** * Register an overlay. Validates name uniqueness, base concreteness, * and overlay availability AGAINST the MV registry — overlays * declared without the MV registry context skip cross-registry * checks but still validate self-consistency. */ register(spec: OverlayedViewStrategy, options: { isOverlayName?: (name: string) => boolean; isMVOutput?: (name: string) => boolean; isKnownCollection?: (name: string) => boolean; }): void; byName(name: string): OverlayedViewStrategy | undefined; /** All overlay virtual names. */ names(): ReadonlySet; isOverlay(name: string): boolean; /** * All registered overlay strategies as a flat array. * Each strategy carries `name`, `base`, and `overlay` fields that * `describeOverlays()` in the introspection walker reads directly. * * Used by `dumpSchema()` to populate the `overlayViews` map. */ all(): ReadonlyArray; /** * Resolve the `rowKey` function for an overlay's base MV. Returns * `undefined` if the base isn't an MV (raw source collection) or * if the MV registry isn't supplied. Used by the virtual-collection * proxy to derive ids from `put(record)` calls. */ resolveBaseRowKey(name: string, mvRegistry: MaterializedViewRegistry | null): ((row: Record) => string) | undefined; }