import type { ActivatedArtifact } from '../artifacts/ActivatedArtifact.js'; import type { AppendedEvent } from '../events/AppendedEvent.js'; import type { EventContext } from '../events/EventContext.js'; import type { BatchMethod } from '../observation/batches/BatchMethod.js'; import type { ReactorDelivery } from '../reactors/ReactorDelivery.js'; import type { BatchPartitionOutcome } from './BatchPartitionOutcome.js'; /** The page a scenario delivers to the batch methods of a reactor. */ export interface ScenarioPage { /** The identifier of the reactor. */ readonly observerId: string; /** The name of the reactor type, for errors. */ readonly observerName: string; /** The event store the events come from. */ readonly eventStore: string; /** The namespace the events come from. */ readonly namespace: string; /** The events of the page, in sequence order. */ readonly events: readonly AppendedEvent[]; /** Aborted when the scenario is disposed. */ readonly signal: AbortSignal; /** Creates the delivery identity of an event. */ readonly deliveryFor: (context: EventContext) => ReactorDelivery; } /** * Delivers a page of events to the batch methods of a reactor as one live page, the way the kernel delivers a page: each * batch method gets the events of the types it observes, in sequence order, as one {@link EventBatch}. * @param artifact - The reactor instance, activated for the delivery. * @param methods - The batch methods of the reactor. * @param page - The {@link ScenarioPage}. * @returns The partitions the batch methods reported as failed or deferred, in the order they were reported. * @throws What a batch method throws, which fails every partition in its batch. * @throws {@link BatchMethodReturnedAValue} when a batch method returns a value. */ export declare function deliverToBatchMethods(artifact: ActivatedArtifact>, methods: readonly BatchMethod[], page: ScenarioPage): Promise; //# sourceMappingURL=deliverToBatchMethods.d.ts.map