import type { CreatedEvent, EventFlowMap, IEventStoreEntity } from '@schemeless/event-store-types'; export interface AggregateLoader { (domain: string, identifier: string, reducer: (state: State, event: IEventStoreEntity) => State, initialState: State): Promise<{ state: State; sequence: number; }>; } export interface ProcessedEventLifecycle { event: CreatedEvent; aggregateState?: unknown; aggregateDomain?: string; aggregateIdentifier?: string; } export interface ProcessEventLifecycleOptions { aggregateStateByKey: Map; loadAggregateStateFromRepo: boolean; } export declare function processEventLifecycle(event: CreatedEvent, eventFlowMap: EventFlowMap, getAggregate: AggregateLoader | undefined, options: ProcessEventLifecycleOptions): Promise;