/**
 * Type contracts for the kos-ui-sdk container indexing system.
 *
 * The contracts live here rather than alongside any particular
 * decorator so the decorators, the EventBus payloads, and downstream
 * consumers can all import the same shapes without circular
 * dependencies.
 *
 * @kosService core.indexing
 * @kosApiLevel 22
 */
/**
 * Property key used by `@kosIndexAware` to expose an item model's
 * current index record. Keyed by `Symbol.for` so cross-bundle
 * equality holds — the SDK is built separately from consumer code.
 *
 * Container-side publishers read this off each item they're about to
 * broadcast.
 */
export declare const INDEX_RECORD_SYMBOL: unique symbol;
/**
 * String key used by `@kosContainerIndexAware` to publish its
 * declared collection onto its own `KosContext`. Items inherit it
 * via `KosContext.get(INDEX_COLLECTION_KEY)`, which auto-walks the
 * parent chain.
 *
 * String-keyed because `KosContext.get/set` only accept strings.
 * Namespaced to avoid collision with any feature-level context value
 * an author might define.
 */
export declare const INDEX_COLLECTION_KEY = "@kosdev-code/kos-ui-sdk.collection";
/**
 * Structural contract for any item model that participates in
 * indexing. The container-side publisher uses this shape to read
 * records off items at publish time.
 */
export interface IndexableItem {
    readonly [INDEX_RECORD_SYMBOL]: IndexRecordContribution;
}
/**
 * Runtime check used by `KosModelContainer` to decide whether to
 * publish for a given item.
 */
export declare function isIndexableItem(value: unknown): value is IndexableItem;
/**
 * What an item contributes via `INDEX_RECORD_SYMBOL`. `collection`
 * is optional — when absent, the item resolves it from its
 * `KosContext` (auto-walking the parent chain).
 *
 * Additional fields beyond identity + collection are arbitrary and
 * driven by the item-level decorator's `fields` declaration.
 */
export interface IndexRecordContribution {
    /** Stable id of the indexed item. */
    id: string;
    /** Model type id (e.g. `"virtual-machine-model"`). */
    modelType: string;
    /** Per-item collection tag. Falls back to container declaration if absent. */
    collection?: string;
    /** Declared index-relevant fields. Shape is per-modelType. */
    [field: string]: unknown;
}
/**
 * What the container actually publishes on the EventBus. Identical
 * shape to `IndexRecordContribution`, but `collection` is required
 * — by publish time the fallback rule has already been applied.
 */
export interface IndexRecord extends IndexRecordContribution {
    collection: string;
}
/** Payload for `KosContainerIndexEvents.ADDED`. */
export interface IndexAddedEvent {
    record: IndexRecord;
}
/** Payload for `KosContainerIndexEvents.REMOVED`. */
export interface IndexRemovedEvent {
    id: string;
    modelType: string;
    collection: string;
}
/** Payload for `KosContainerIndexEvents.CHANGED`. Full record, not deltas. */
export interface IndexChangedEvent {
    record: IndexRecord;
}
/**
 * Payload for `KosContainerIndexEvents.SEED`. Emitted in response to
 * REQUEST_SEED. The items array may carry mixed collections
 * (heterogeneous containers where items are tagged by their own
 * properties). Subscribers route per record, not per top-level field.
 */
export interface IndexSeedEvent {
    modelType: string;
    items: IndexRecord[];
}
/**
 * Payload for `KosContainerIndexEvents.PURGE`. Collection-scoped;
 * the consumer drops all matching records.
 */
export interface IndexPurgeEvent {
    modelType: string;
    collection: string;
}
/**
 * Payload for `KosContainerIndexEvents.REQUEST_SEED`. Optional
 * `collections` filter lets a targeted consumer ask only for what it
 * cares about; an empty/absent filter means "all".
 */
export interface IndexRequestSeedEvent {
    /** Free-form id used for diagnostics (e.g. `"index-service"`). */
    requestedBy: string;
    /** Optional filter; undefined or empty means "all collections". */
    collections?: string[];
}
//# sourceMappingURL=types.d.ts.map