import { Constructor } from '@cratis/fundamentals'; import { IClientArtifactsProvider } from '../artifacts/index.js'; import type { ReadModelNamingPolicy } from '../readModels/ReadModelNamingPolicy.js'; import { CompiledProjectionDefinitions } from './CompiledProjectionDefinitions.js'; /** Compiles discovered projection types into the contracts sent to the kernel, without a connection. */ export declare class ProjectionDefinitionCompiler { private readonly _clientArtifacts; private readonly _defaultSinkTypeId; private readonly _readModelNamingPolicy?; /** * @param _clientArtifacts - Discovered artifact types used to resolve schemas, variants, and read models. * @param _defaultSinkTypeId - Sink identifier for active read models. * @param _readModelNamingPolicy - Optional policy naming the container of each read model. */ constructor(_clientArtifacts: IClientArtifactsProvider, _defaultSinkTypeId: string, _readModelNamingPolicy?: ReadModelNamingPolicy | undefined); /** * Builds all definitions together so variant cross-wiring precedes the final hash. * @param declarative - Discovered declarative projection types. * @param modelBound - Discovered model-bound read model types. * @returns Projection definitions and read-model registrations ready for the wire. */ compile(declarative: Iterable, modelBound: Iterable): CompiledProjectionDefinitions; private buildEventSchemaCatalog; private buildWithContextValidation; private buildReadModelDefinitions; private getReadModelType; private buildDeclarativeDefinition; private inferReadModelIdentifier; private buildModelBoundDefinition; /** * Builds event mappings for a global variant handler without creating a separate projection. * @param type - The global handler type containing from-event and property mappings. * @returns The event mappings to merge into each matching variant. */ private buildFromRecordsForType; private ensureJoinEntry; /** Hash the final wire definition, excluding LastUpdated itself, for stable metadata. */ private computeStableLastUpdated; } //# sourceMappingURL=ProjectionDefinitionCompiler.d.ts.map