import type { RetryBehavior, RunResult, WorkpoolOptions } from "@convex-dev/workpool"; import { BaseChannel } from "async-channel"; import { type FunctionReference, type FunctionType, type FunctionVisibility, type GenericDataModel, type GenericMutationCtx } from "convex/server"; import { type Value } from "convex/values"; import { type JournalEntry } from "../component/schema.js"; import type { WorkflowComponent } from "./types.js"; import type { EventId, SchedulerOptions } from "../types.js"; export type WorkerResult = { type: "handlerDone"; runResult: RunResult; } | { type: "executorBlocked"; }; export type StepRequest = { name: string; target: { kind: "function"; functionType: FunctionType; function: FunctionReference; args: Record; } | { kind: "event"; args: { eventId?: EventId; }; } | { kind: "workflow"; function: FunctionReference<"mutation", "internal">; args: Record; } | { kind: "sleep"; args: Record; }; retry: RetryBehavior | boolean | undefined; inline: boolean; schedulerOptions: SchedulerOptions; resolve: (result: RunResult) => void; }; export declare class StepExecutor { private workflowId; private generationNumber; private ctx; private component; private journalEntries; private receiver; private now; private workpoolOptions; private journalEntrySize; constructor(workflowId: string, generationNumber: number, ctx: GenericMutationCtx, component: WorkflowComponent, journalEntries: Array, receiver: BaseChannel, now: number, workpoolOptions: WorkpoolOptions | undefined); run(): Promise; getGenerationState(): { now: number; latest: boolean; }; loadPayloadValue(valueOrRef: Value): Promise; loadRunResultValue(runResult: JournalEntry["step"]["runResult"]): Promise<{ kind: "canceled"; } | { kind: "success"; returnValue: Value; error?: undefined; } | { kind: "failed"; error: string; returnValue?: undefined; } | undefined>; completeMessage(message: StepRequest, entry: JournalEntry): Promise; startSteps(messages: StepRequest[]): Promise; } //# sourceMappingURL=step.d.ts.map