import { type RunResult, type WorkId } from "@convex-dev/workpool"; import { type Infer, type Validator, type Value, type VString } from "convex/values"; export type WorkflowId = string & { __isWorkflowId: true; }; export declare const vWorkflowId: VString; export type EventId = string & { __isEventId: true; __name: Name; }; export type VEventId = VString>; export declare const vEventId: (_name?: Name) => VString>; export type PublicWorkflow = { workflowId: WorkflowId; name?: string; args: any; context?: any; runResult?: RunResult; }; export declare const vPublicWorkflow: import("convex/values").VObject<{ name?: string | undefined; context?: any; runResult?: { kind: "success"; returnValue: any; } | { kind: "failed"; error: string; } | { kind: "canceled"; } | undefined; workflowId: WorkflowId; args: any; }, { workflowId: VString; name: VString; args: import("convex/values").VAny; context: import("convex/values").VAny; runResult: import("convex/values").VUnion<{ kind: "success"; returnValue: any; } | { kind: "failed"; error: string; } | { kind: "canceled"; } | undefined, [import("convex/values").VObject<{ kind: "success"; returnValue: any; }, { kind: import("convex/values").VLiteral<"success", "required">; returnValue: import("convex/values").VAny; }, "required", "kind" | "returnValue" | `returnValue.${string}`>, import("convex/values").VObject<{ kind: "failed"; error: string; }, { kind: import("convex/values").VLiteral<"failed", "required">; error: import("convex/values").VString; }, "required", "kind" | "error">, import("convex/values").VObject<{ kind: "canceled"; }, { kind: import("convex/values").VLiteral<"canceled", "required">; }, "required", "kind">], "optional", "kind" | "returnValue" | `returnValue.${string}` | "error">; }, "required", "workflowId" | "name" | "args" | "context" | "runResult" | `args.${string}` | `context.${string}` | "runResult.kind" | "runResult.returnValue" | `runResult.returnValue.${string}` | "runResult.error">; export type VPublicWorkflow = Infer; export type WorkflowStep = { workflowId: WorkflowId; name: string; stepId: string; stepNumber: number; args: unknown; runResult?: RunResult; startedAt: number; completedAt?: number; } & ({ kind: "function"; workId?: WorkId; } | { kind: "workflow"; nestedWorkflowId: WorkflowId; } | { kind: "event"; eventId: EventId; } | { kind: "sleep"; workId: WorkId; }); export declare const vWorkflowStep: import("convex/values").VObject<{ runResult?: { kind: "success"; returnValue: any; } | { kind: "failed"; error: string; } | { kind: "canceled"; } | undefined; completedAt?: number | undefined; workId?: WorkId | undefined; nestedWorkflowId?: WorkflowId | undefined; eventId?: EventId | undefined; kind: "function" | "workflow" | "event" | "sleep"; workflowId: WorkflowId; name: string; args: any; stepId: string; stepNumber: number; startedAt: number; }, { workflowId: VString; name: VString; stepId: VString; stepNumber: import("convex/values").VFloat64; args: import("convex/values").VAny; runResult: import("convex/values").VUnion<{ kind: "success"; returnValue: any; } | { kind: "failed"; error: string; } | { kind: "canceled"; } | undefined, [import("convex/values").VObject<{ kind: "success"; returnValue: any; }, { kind: import("convex/values").VLiteral<"success", "required">; returnValue: import("convex/values").VAny; }, "required", "kind" | "returnValue" | `returnValue.${string}`>, import("convex/values").VObject<{ kind: "failed"; error: string; }, { kind: import("convex/values").VLiteral<"failed", "required">; error: import("convex/values").VString; }, "required", "kind" | "error">, import("convex/values").VObject<{ kind: "canceled"; }, { kind: import("convex/values").VLiteral<"canceled", "required">; }, "required", "kind">], "optional", "kind" | "returnValue" | `returnValue.${string}` | "error">; startedAt: import("convex/values").VFloat64; completedAt: import("convex/values").VFloat64; kind: import("convex/values").VUnion<"function" | "workflow" | "event" | "sleep", [import("convex/values").VLiteral<"function", "required">, import("convex/values").VLiteral<"workflow", "required">, import("convex/values").VLiteral<"event", "required">, import("convex/values").VLiteral<"sleep", "required">], "required", never>; workId: VString; nestedWorkflowId: VString; eventId: VString | undefined, "optional">; }, "required", "kind" | "workflowId" | "name" | "args" | "runResult" | `args.${string}` | "runResult.kind" | "runResult.returnValue" | `runResult.returnValue.${string}` | "runResult.error" | "stepId" | "stepNumber" | "startedAt" | "completedAt" | "workId" | "nestedWorkflowId" | "eventId">; export type SchedulerOptions = { /** * The time (ms since epoch) to run the action at. * If not provided, the action will be run as soon as possible. * Note: this is advisory only. It may run later. */ runAt?: number; runAfter?: never; } | { /** * The number of milliseconds to run the action after. * If not provided, the action will be run as soon as possible. * Note: this is advisory only. It may run later. */ runAfter?: number; runAt?: never; }; export type OnCompleteArgs = { /** * The ID of the work that completed. */ workflowId: string; /** * The context object passed when enqueuing the work. * Useful for passing data from the enqueue site to the onComplete site. */ context: unknown; /** * The result of the run that completed. */ result: RunResult; }; export declare function vPaginationResult>(itemValidator: T): import("convex/values").VObject<{ splitCursor?: string | null | undefined; pageStatus?: "SplitRecommended" | "SplitRequired" | null | undefined; page: T["type"][]; continueCursor: string; isDone: boolean; }, { page: import("convex/values").VArray; continueCursor: VString; isDone: import("convex/values").VBoolean; splitCursor: import("convex/values").VUnion, import("convex/values").VNull], "optional", never>; pageStatus: import("convex/values").VUnion<"SplitRecommended" | "SplitRequired" | null | undefined, [import("convex/values").VLiteral<"SplitRecommended", "required">, import("convex/values").VLiteral<"SplitRequired", "required">, import("convex/values").VNull], "optional", never>; }, "required", "page" | "continueCursor" | "isDone" | "splitCursor" | "pageStatus">; //# sourceMappingURL=types.d.ts.map