import { Order } from "../../shared/args.mjs"; import { WorkflowExecutionInfo, WorkflowJobExecutionInfo } from "./transform.mjs"; import { WorkflowWaitUntil } from "./status.mjs"; import { WorkflowWaitResult } from "./waiter.mjs"; import { FunctionLogEntryInfo } from "../../shared/function-execution.mjs"; import { z } from "zod"; //#region src/cli/commands/workflow/executions.d.ts type WorkflowLike = { name: string; }; export type ListWorkflowExecutionsTypedOptions = { workflow?: W; status?: string; workspaceId?: string; profile?: string; order?: Order; limit?: number; }; export interface GetWorkflowExecutionOptions { executionId: string; workspaceId?: string; profile?: string; interval?: number; timeout?: number; until?: WorkflowWaitUntil; logs?: boolean; } export interface WorkflowExecutionDetailInfo extends WorkflowExecutionInfo { jobDetails?: (WorkflowJobExecutionInfo & { logs?: string; logEntries?: FunctionLogEntryInfo[]; result?: string; })[]; } export interface WorkflowExecutionWaitInfo extends WorkflowExecutionDetailInfo { statusClass: WorkflowWaitResult["statusClass"]; elapsedMs: number; attempts: number; timedOut: boolean; lastError: string | null; } export interface GetWorkflowExecutionResult { execution: WorkflowExecutionDetailInfo; wait: () => Promise; } /** * List workflow executions with optional filters. * * Returns at most `options.limit` items. When `limit` is omitted or 0 the * function pages through every execution. The CLI caps this at 50 by * default via `pagedLogArgs`; programmatic callers that want the same * cap should pass `limit: 50` explicitly. * @param options - Workflow execution listing options * @returns List of workflow executions */ export declare function listWorkflowExecutions(options?: ListWorkflowExecutionsTypedOptions): Promise; /** * Get a single workflow execution with optional logs. * @param options - Workflow execution lookup options * @returns Workflow execution with optional logs */ export declare function getWorkflowExecution(options: GetWorkflowExecutionOptions): Promise; //#endregion