import { CommittedEvent as PbCommittedEvent, CommittedAggregateEvents as PbCommittedAggregateEvents } from '@dolittle/contracts/Runtime/Events/Committed_pb'; import { UncommittedEvent as PbUncommittedEvent, UncommittedAggregateEvents as PbUncommittedAggregateEvents } from '@dolittle/contracts/Runtime/Events/Uncommitted_pb'; import { AggregateRootId } from '../AggregateRootId'; import { AggregateRootVersion } from '../AggregateRootVersion'; import { EventSourceId } from '../EventSourceId'; import { EventType } from '../EventType'; import { CommittedEvent as SdkCommittedEvent } from './CommittedEvent'; import { CommittedAggregateEvent as SdkCommittedAggregateEvent } from './CommittedAggregateEvent'; /** * Represents converter helpers for converting to relevant event types for transmitting over Grpc. */ export declare class EventConverters { /** * Creates an uncommitted event from given parameters. * @param {any} event - Event content to constructor with. * @param {EventSourceId} eventSourceId - The unique identifier of the event source that the event is originating from. * @param {EventType} eventType - The event type. * @param {boolean} isPublic - Whether or not it is a public event. * @returns {PbUncommittedEvent} Constructed uncommitted event. */ static getUncommittedEventFrom(event: any, eventSourceId: EventSourceId, eventType: EventType, isPublic: boolean): PbUncommittedEvent; /** * Creates an uncommitted embedding event (aka an event without an eventsourceid) from given parameters. * @param {any} event - Event content to constructor with. * @param {EventType} eventType - The event type. * @param {boolean} isPublic - Whether or not it is a public event. * @returns {PbUncommittedEvent} Constructed uncommitted event. */ static getUncommittedEmbeddingEventFrom(event: any, eventType: EventType, isPublic: boolean): PbUncommittedEvent; /** * Creates an uncommitted aggregate event from given parameters. * @param {any} event - Event content to constructor with. * @param {EventType} eventType - Artifact of the event type. * @param {boolean} isPublic - Whether or not it is a public event. * @returns {PbUncommittedAggregateEvents.UncommittedAggregateEvent} Constructed uncommitted event. */ static getUncommittedAggregateEventFrom(event: any, eventType: EventType, isPublic: boolean): PbUncommittedAggregateEvents.UncommittedAggregateEvent; /** * Convert a protobuf committed aggregate event to SDK representation. * @param {AggregateRootId} aggregateRootId - The aggregate root id that committed the event. * @param {EventSourceId} eventSourceId - The event source id that the event was committed to. * @param {AggregateRootVersion} aggregateRootVersion - The aggregate root version that commited the event. * @param {PbCommittedAggregateEvents.CommittedAggregateEvent} input - Committed aggregate event. * @returns {SdkCommittedAggregateEvent} SDK representation. */ static toSDKAggregate(aggregateRootId: AggregateRootId, eventSourceId: EventSourceId, aggregateRootVersion: AggregateRootVersion, input: PbCommittedAggregateEvents.CommittedAggregateEvent): SdkCommittedAggregateEvent; /** * Convert a protobuf committed event to SDK representation. * @param {PbCommittedEvent} input - Committed event. * @returns {SdkCommittedEvent} SDK representation. */ static toSDK(input: PbCommittedEvent): SdkCommittedEvent; /** * Convert a SDK committed event to protobuf representation. * @param {SdkCommittedEvent} input - Committed event. * @returns {PbCommittedEvent} Protobuf representation. */ static toProtobuf(input: SdkCommittedEvent): PbCommittedEvent; } //# sourceMappingURL=EventConverters.d.ts.map