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<z.ZodNumber>;
    executionContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
    input: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>]>>;
    output: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>]>>;
    error: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>]>>;
    errorCode: z.ZodOptional<z.ZodString>;
    attributes: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
    expiredAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
    startedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
    completedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
    createdAt: z.ZodCoercedDate<unknown>;
    updatedAt: z.ZodCoercedDate<unknown>;
}, z.core.$strip>;
export declare const WorkflowRunSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    runId: z.ZodString;
    deploymentId: z.ZodString;
    workflowName: z.ZodString;
    specVersion: z.ZodOptional<z.ZodNumber>;
    executionContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
    input: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>]>>;
    errorCode: z.ZodOptional<z.ZodString>;
    attributes: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
    expiredAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
    startedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
    createdAt: z.ZodCoercedDate<unknown>;
    updatedAt: z.ZodCoercedDate<unknown>;
    status: z.ZodEnum<{
        pending: "pending";
        running: "running";
    }>;
    output: z.ZodOptional<z.ZodUndefined>;
    error: z.ZodOptional<z.ZodUndefined>;
    completedAt: z.ZodOptional<z.ZodUndefined>;
}, z.core.$strip>, z.ZodObject<{
    runId: z.ZodString;
    deploymentId: z.ZodString;
    workflowName: z.ZodString;
    specVersion: z.ZodOptional<z.ZodNumber>;
    executionContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
    input: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>]>>;
    errorCode: z.ZodOptional<z.ZodString>;
    attributes: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
    expiredAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
    startedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
    createdAt: z.ZodCoercedDate<unknown>;
    updatedAt: z.ZodCoercedDate<unknown>;
    status: z.ZodLiteral<"cancelled">;
    output: z.ZodOptional<z.ZodUndefined>;
    error: z.ZodOptional<z.ZodUndefined>;
    completedAt: z.ZodCoercedDate<unknown>;
}, z.core.$strip>, z.ZodObject<{
    runId: z.ZodString;
    deploymentId: z.ZodString;
    workflowName: z.ZodString;
    specVersion: z.ZodOptional<z.ZodNumber>;
    executionContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
    input: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>]>>;
    errorCode: z.ZodOptional<z.ZodString>;
    attributes: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
    expiredAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
    startedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
    createdAt: z.ZodCoercedDate<unknown>;
    updatedAt: z.ZodCoercedDate<unknown>;
    status: z.ZodLiteral<"completed">;
    output: z.ZodUnion<readonly [z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>]>;
    error: z.ZodOptional<z.ZodUndefined>;
    completedAt: z.ZodCoercedDate<unknown>;
}, z.core.$strip>, z.ZodObject<{
    runId: z.ZodString;
    deploymentId: z.ZodString;
    workflowName: z.ZodString;
    specVersion: z.ZodOptional<z.ZodNumber>;
    executionContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
    input: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>]>>;
    errorCode: z.ZodOptional<z.ZodString>;
    attributes: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
    expiredAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
    startedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
    createdAt: z.ZodCoercedDate<unknown>;
    updatedAt: z.ZodCoercedDate<unknown>;
    status: z.ZodLiteral<"failed">;
    output: z.ZodOptional<z.ZodUndefined>;
    error: z.ZodUnion<readonly [z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>]>;
    completedAt: z.ZodCoercedDate<unknown>;
}, z.core.$strip>], "status">;
export type WorkflowRunStatus = z.infer<typeof WorkflowRunStatusSchema>;
export type WorkflowRun = z.infer<typeof WorkflowRunSchema>;
/**
 * WorkflowRun with input/output fields excluded (when resolveData='none').
 * Used for listing runs without fetching the full serialized data.
 */
export type WorkflowRunWithoutData = Omit<WorkflowRun, 'input' | 'output'> & {
    input: undefined;
    output: undefined;
};
export interface CreateWorkflowRunRequest {
    deploymentId: string;
    workflowName: string;
    input: SerializedData;
    executionContext?: SerializedData;
    specVersion?: number;
}
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