import { Logger } from 'winston'; import { ExecutionContext } from '@dolittle/sdk.execution'; import { Cancellation } from '@dolittle/sdk.resilience'; import { EventStoreClient } from '@dolittle/contracts/Runtime/Events/EventStore_grpc_pb'; import { AggregateRootId } from '../AggregateRootId'; import { AggregateRootVersion } from '../AggregateRootVersion'; import { EventSourceId, EventSourceIdLike } from '../EventSourceId'; import { EventType } from '../EventType'; import { EventTypeIdLike } from '../EventTypeId'; import { IEventTypes } from '../IEventTypes'; import { CommitForAggregateBuilder } from './Builders/CommitForAggregateBuilder'; import { CommitAggregateEventsResult } from './CommitAggregateEventsResult'; import { CommitEventsResult } from './CommitEventsResult'; import { CommittedAggregateEvents } from './CommittedAggregateEvents'; import { IEventStore } from './IEventStore'; import { UncommittedAggregateEvents } from './UncommittedAggregateEvents'; import { UncommittedEvent } from './UncommittedEvent'; /** * Represents an implementation of {@link IEventStore}. */ export declare class EventStore extends IEventStore { private _eventStoreClient; private _eventTypes; private _executionContext; private _logger; /** * Initializes a new instance of {@link EventStore}. * @param {EventStoreClient} _eventStoreClient - The client to use for connecting to the event store. * @param {IEventTypes} _eventTypes - Event types system for working with event types. * @param {ExecutionContext} _executionContext - The execution context. * @param {Logger} _logger - Logger for logging. */ constructor(_eventStoreClient: EventStoreClient, _eventTypes: IEventTypes, _executionContext: ExecutionContext, _logger: Logger); /** @inheritdoc */ commit(event: any, eventSourceId: EventSourceIdLike, eventType?: EventType | EventTypeIdLike, cancellation?: Cancellation): Promise; commit(eventOrEvents: UncommittedEvent | UncommittedEvent[], cancellation?: Cancellation): Promise; /** @inheritdoc */ commitPublic(event: any, eventSourceId: EventSourceIdLike, eventType?: EventType | EventTypeIdLike, cancellation?: Cancellation): Promise; /** @inheritdoc */ commitForAggregate(event: any, eventSourceId: EventSourceIdLike, aggregateRootId: AggregateRootId, expectedAggregateRootVersion: AggregateRootVersion, eventType?: EventType | EventTypeIdLike, cancellation?: Cancellation): Promise; commitForAggregate(events: UncommittedAggregateEvents, cancellation?: Cancellation): Promise; /** @inheritdoc */ forAggregate(aggregateRootId: AggregateRootId): CommitForAggregateBuilder; /** @inheritdoc */ fetchForAggregate(aggregateRootId: AggregateRootId, eventSourceId: EventSourceId, cancellation?: Cancellation): Promise; private commitInternal; private isUncommittedAggregateEvents; private commitAggregateInternal; private toCommittedAggregateEvents; private toUncommittedEvent; private isUncommittedEvent; private isArrayOfUncommittedEvents; private isUncommittedEventOrEvents; private asArray; } //# sourceMappingURL=EventStore.d.ts.map