import { Logger } from 'winston'; import { Guid } from '@dolittle/rudiments'; import { ScopeId } from '@dolittle/sdk.events'; import { ExecutionContext } from '@dolittle/sdk.execution'; import { Cancellation } from '@dolittle/sdk.resilience'; import { Constructor } from '@dolittle/types'; import { ProjectionsClient } from '@dolittle/contracts/Runtime/Projections/Store_grpc_pb'; import { Key } from '../Key'; import { ProjectionId } from '../ProjectionId'; import { CurrentState } from './CurrentState'; import { IProjectionReadModelTypes } from './IProjectionReadModelTypes'; import { IProjectionStore } from './IProjectionStore'; import { IProjectionOf } from './IProjectionOf'; /** * Represents an implementation of {@link IProjectionStore}. */ export declare class ProjectionStore extends IProjectionStore { private readonly _projectionsClient; private readonly _executionContext; private readonly _readModelTypes; private readonly _logger; private _converter; /** * Initialises a new instance of the {@link ProjectionStore} class. * @param {ProjectionsClient} _projectionsClient - The projections client to use to get projection states. * @param {ExecutionContext} _executionContext - The execution context of the client. * @param {IProjectionReadModelTypes} _readModelTypes - All the types associated with projections. * @param {Logger} _logger - The logger to use for logging. */ constructor(_projectionsClient: ProjectionsClient, _executionContext: ExecutionContext, _readModelTypes: IProjectionReadModelTypes, _logger: Logger); /** @inheritdoc */ of(type: Constructor): IProjectionOf; of(type: Constructor, projection: ProjectionId | Guid | string): IProjectionOf; of(type: Constructor, projection: ProjectionId | Guid | string, scope: ScopeId | Guid | string): IProjectionOf; /** @inheritdoc */ get(type: Constructor, key: Key | any, cancellation?: Cancellation): Promise; get(type: Constructor, key: Key | any, projection: ProjectionId | Guid | string, cancellation?: Cancellation): Promise; get(type: Constructor, key: Key | any, projection: ProjectionId | Guid | string, scope: ScopeId, cancellation?: Cancellation): Promise; get(key: Key | any, projection: ProjectionId | Guid | string, cancellation?: Cancellation): Promise; get(key: Key | any, projection: ProjectionId | Guid | string, scope: ScopeId | Guid | string, cancellation?: Cancellation): Promise; /** @inheritdoc */ getAll(type: Constructor, cancellation?: Cancellation): Promise; getAll(type: Constructor, projection: ProjectionId | Guid | string, cancellation?: Cancellation): Promise; getAll(type: Constructor, projection: ProjectionId | Guid | string, scope: ScopeId | Guid | string, cancellation?: Cancellation): Promise; getAll(projection: ProjectionId | Guid | string, cancellation?: Cancellation): Promise; getAll(projection: ProjectionId | Guid | string, scope: ScopeId | Guid | string, cancellation?: Cancellation): Promise; /** @inheritdoc */ getState(type: Constructor, key: Key | any, cancellation?: Cancellation): Promise>; getState(type: Constructor, key: Key | any, projection: ProjectionId | Guid | string, cancellation?: Cancellation): Promise>; getState(type: Constructor, key: Key | any, projection: ProjectionId | Guid | string, scope: ScopeId, cancellation?: Cancellation): Promise>; getState(key: Key | any, projection: ProjectionId | Guid | string, cancellation?: Cancellation): Promise>; getState(key: Key | any, projection: ProjectionId | Guid | string, scope: ScopeId | Guid | string, cancellation?: Cancellation): Promise>; private getStateInternal; private getKeyFrom; private getProjectionAndScopeForOne; private getProjectionAndScopeForAll; private getCancellationFrom; private throwIfHasFailure; private throwIfNoState; private throwIfWrongKeyReceived; } //# sourceMappingURL=ProjectionStore.d.ts.map