import { ObservationOrigin } from './ObservationOrigin.js'; import type { BatchContextValues } from './BatchContextValues.js'; /** * Describes the page of events a batch method is called for. It is read-only, and only batch methods receive it: * per-event methods never get a {@link BatchContext}. */ export declare class BatchContext { /** The identifier of the observer (reactor or reducer). */ readonly observerId: string; /** The event store the events come from. */ readonly eventStore: string; /** The namespace the events come from. */ readonly namespace: string; /** The event sequence the events come from. */ readonly eventSequenceId: string; /** The path the page came from: live, catch-up, replay or retry. */ readonly origin: ObservationOrigin; /** The partitions (event source identifiers) in the page, in the order the kernel delivered them. */ readonly partitions: readonly string[]; /** The number of events in the page. */ readonly eventCount: number; /** The sequence number of the first event in the page, or undefined when the page is empty. */ readonly firstSequenceNumber: bigint | undefined; /** The sequence number of the last event in the page, or undefined when the page is empty. */ readonly lastSequenceNumber: bigint | undefined; /** When the kernel stops waiting for the result, or undefined when it waits without a deadline. */ readonly deadline: Date | undefined; /** Aborted when the observation disconnects or the client is disposed. */ readonly signal: AbortSignal; /** * Whether the kernel accepts deferred partitions for this page. A kernel that delivers single partitions * instead of pages cannot defer; a deferral is then reported as a failure. */ readonly canDefer: boolean; /** * Creates a new {@link BatchContext}. * @param values - The values describing the page. */ constructor(values: BatchContextValues); /** Whether the page is part of a replay. */ get isReplay(): boolean; } //# sourceMappingURL=BatchContext.d.ts.map