import { ObservationState, type PartitionResult, type ReducerMessage } from '@cratis/chronicle.contracts'; /** Sentinel sequence number sent back when no event was successfully processed. */ export declare const SEQUENCE_NUMBER_UNAVAILABLE = 4294967295n; /** * Accumulates the result of reducing one reduce operation: the state, the failure details and the * last event that was successfully reduced. */ export declare class ReductionOutcome { state: ObservationState; lastSuccessfullyObservedEvent: bigint; readonly exceptionMessages: string[]; exceptionStackTrace: string; retryAfterMilliseconds: number; currentState: unknown; /** Gets whether the reduction has failed. */ get failed(): boolean; /** Records a failure of the reduction. */ recordFailure(error: unknown): void; /** * Records that a batch method deferred the reduction: nothing is written, and the event source is delivered again later. * @param retryAfterMilliseconds - How long to wait before delivering again. */ recordDeferral(retryAfterMilliseconds: number): void; /** * Copies the result of another outcome, such as a failed replay notification shared by every event source of a page. * @param other - The outcome to copy. */ copyFrom(other: ReductionOutcome): void; /** Records a failure to notify of a replay lifecycle transition. */ recordReplayNotificationFailure(error: unknown): void; /** Records a failure to activate the reducer or to complete its activation. */ recordActivationFailure(error: unknown): void; /** The read model state as JSON, or an empty string when there is nothing to write. */ get readModelState(): string; /** * Creates the result for one event source of a page. * @param partition - The partition (event source). * @returns The {@link PartitionResult}. */ toPartitionResult(partition: string): PartitionResult; /** * Creates the legacy single-partition result message reported back to a kernel that does not deliver pages. * @param partition - The partition (event source). * @param deliveryId - The delivery identifier to echo. * @returns The {@link ReducerMessage}. */ toMessage(partition: string, deliveryId?: bigint): ReducerMessage; } //# sourceMappingURL=ReductionOutcome.d.ts.map