import { z } from '#compiled/zod/index.js'; import { type SerializedData } from './serialization.js'; import type { PaginationOptions, ResolveData } from './shared.js'; export declare const WorkflowRunStatusSchema: z.ZodEnum<{ pending: "pending"; running: "running"; completed: "completed"; failed: "failed"; cancelled: "cancelled"; }>; /** * Base schema for the Workflow runs. Prefer using WorkflowRunSchema * which implements a discriminatedUnion for various states. * * Note: input/output use SerializedDataSchema to support both: * - specVersion >= 2: Uint8Array (binary devalue format) * - specVersion 1: any (legacy JSON format) */ export declare const WorkflowRunBaseSchema: z.ZodObject<{ runId: z.ZodString; status: z.ZodEnum<{ pending: "pending"; running: "running"; completed: "completed"; failed: "failed"; cancelled: "cancelled"; }>; deploymentId: z.ZodString; workflowName: z.ZodString; specVersion: z.ZodOptional; executionContext: z.ZodOptional>; input: z.ZodOptional>, z.ZodType>]>>; output: z.ZodOptional>, z.ZodType>]>>; error: z.ZodOptional>, z.ZodType>]>>; errorCode: z.ZodOptional; attributes: z.ZodDefault>; expiredAt: z.ZodOptional>; startedAt: z.ZodOptional>; completedAt: z.ZodOptional>; createdAt: z.ZodCoercedDate; updatedAt: z.ZodCoercedDate; }, z.core.$strip>; export declare const WorkflowRunSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ runId: z.ZodString; deploymentId: z.ZodString; workflowName: z.ZodString; specVersion: z.ZodOptional; executionContext: z.ZodOptional>; input: z.ZodOptional>, z.ZodType>]>>; errorCode: z.ZodOptional; attributes: z.ZodDefault>; expiredAt: z.ZodOptional>; startedAt: z.ZodOptional>; createdAt: z.ZodCoercedDate; updatedAt: z.ZodCoercedDate; status: z.ZodEnum<{ pending: "pending"; running: "running"; }>; output: z.ZodOptional; error: z.ZodOptional; completedAt: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ runId: z.ZodString; deploymentId: z.ZodString; workflowName: z.ZodString; specVersion: z.ZodOptional; executionContext: z.ZodOptional>; input: z.ZodOptional>, z.ZodType>]>>; errorCode: z.ZodOptional; attributes: z.ZodDefault>; expiredAt: z.ZodOptional>; startedAt: z.ZodOptional>; createdAt: z.ZodCoercedDate; updatedAt: z.ZodCoercedDate; status: z.ZodLiteral<"cancelled">; output: z.ZodOptional; error: z.ZodOptional; completedAt: z.ZodCoercedDate; }, z.core.$strip>, z.ZodObject<{ runId: z.ZodString; deploymentId: z.ZodString; workflowName: z.ZodString; specVersion: z.ZodOptional; executionContext: z.ZodOptional>; input: z.ZodOptional>, z.ZodType>]>>; errorCode: z.ZodOptional; attributes: z.ZodDefault>; expiredAt: z.ZodOptional>; startedAt: z.ZodOptional>; createdAt: z.ZodCoercedDate; updatedAt: z.ZodCoercedDate; status: z.ZodLiteral<"completed">; output: z.ZodUnion>, z.ZodType>]>; error: z.ZodOptional; completedAt: z.ZodCoercedDate; }, z.core.$strip>, z.ZodObject<{ runId: z.ZodString; deploymentId: z.ZodString; workflowName: z.ZodString; specVersion: z.ZodOptional; executionContext: z.ZodOptional>; input: z.ZodOptional>, z.ZodType>]>>; errorCode: z.ZodOptional; attributes: z.ZodDefault>; expiredAt: z.ZodOptional>; startedAt: z.ZodOptional>; createdAt: z.ZodCoercedDate; updatedAt: z.ZodCoercedDate; status: z.ZodLiteral<"failed">; output: z.ZodOptional; error: z.ZodUnion>, z.ZodType>]>; completedAt: z.ZodCoercedDate; }, z.core.$strip>], "status">; export type WorkflowRunStatus = z.infer; export type WorkflowRun = z.infer; /** * WorkflowRun with input/output fields excluded (when resolveData='none'). * Used for listing runs without fetching the full serialized data. */ export type WorkflowRunWithoutData = Omit & { input: undefined; output: undefined; }; export interface CreateWorkflowRunRequest { deploymentId: string; workflowName: string; input: SerializedData; executionContext?: SerializedData; specVersion?: number; /** Plaintext attributes to seed when the run is created. */ attributes?: Record; } export interface GetWorkflowRunParams { resolveData?: ResolveData; } export interface ListWorkflowRunsParams { workflowName?: string; status?: WorkflowRunStatus; pagination?: PaginationOptions; resolveData?: ResolveData; } export interface CancelWorkflowRunParams { resolveData?: ResolveData; } //# sourceMappingURL=runs.d.ts.map