import { Constructor } from '@cratis/fundamentals'; import { IClientArtifactsProvider } from '../artifacts/index.js'; import { ChronicleConnection } from '../connection/index.js'; import { JobId } from '../jobs/JobId.js'; import { FailedPartition } from '../observation/FailedPartition.js'; import type { ReadModelNamingPolicy } from '../readModels/ReadModelNamingPolicy.js'; import { IProjections } from './IProjections.js'; import { ProjectionId } from './ProjectionId.js'; import { ProjectionQueryResult } from './ProjectionQueryResult.js'; import { ProjectionState } from './ProjectionState.js'; /** * Implements {@link IProjections}, managing discovery and registration of projections * with the Chronicle Kernel. */ export declare class Projections implements IProjections { private readonly _eventStore; private readonly _namespace; private readonly _connection; private readonly _clientArtifacts; private readonly _defaultSinkTypeId; private readonly _readModelNamingPolicy?; private readonly _declarative; private readonly _modelBound; private readonly _failedPartitions; private readonly _logger; /** * Creates a new {@link Projections} instance. * @param _eventStore - The event store name. * @param _namespace - The event store namespace. * @param _connection - Chronicle connection. * @param _clientArtifacts - Provider for discovered client artifact types. * @param _defaultSinkTypeId - The identifier of the default read model sink. * @param _readModelNamingPolicy - Optional policy naming the container of each read model. */ constructor(_eventStore: string, _namespace: string, _connection: ChronicleConnection, _clientArtifacts: IClientArtifactsProvider, _defaultSinkTypeId: string, _readModelNamingPolicy?: ReadModelNamingPolicy | undefined); /** @inheritdoc */ discover(): Promise; /** @inheritdoc */ register(): Promise; /** @inheritdoc */ hasFor(projectionId: ProjectionId | string): boolean; /** @inheritdoc */ hasForModel(readModelType: Constructor): boolean; /** @inheritdoc */ getProjectionIdFor(readModelType: Constructor): ProjectionId; /** @inheritdoc */ getStateFor(projectionId: ProjectionId | string): Promise; /** @inheritdoc */ getStateForModel(readModelType: Constructor): Promise; /** @inheritdoc */ getFailedPartitionsForModel(readModelType: Constructor): Promise; /** @inheritdoc */ replay(projectionId: ProjectionId | string): Promise; /** @inheritdoc */ replayForModel(readModelType: Constructor): Promise; /** @inheritdoc */ query(declaration: string, eventSequenceId?: string): Promise; private toProjectionIdValue; /** * Resolves the {@link ProjectionId} of the projection that maintains a specific read model type, * from what has already been discovered. * @param readModelType - The read model type to resolve for. * @returns The resolved {@link ProjectionId}. */ private resolveProjectionIdForModel; /** * Resolves the event sequence identifier a discovered projection reads from, without requiring * its full definition to have been built. * @param projectionId - The projection identifier to resolve for. * @returns The resolved event sequence identifier. */ private resolveEventSequenceIdFor; private registerWithRetry; private resolveModelBoundMetadata; } //# sourceMappingURL=Projections.d.ts.map