import { Order } from "../../shared/args.mjs"; import "../../shared/errors.mjs"; import { ExecutorJobAttemptInfo, ExecutorJobInfo, ExecutorJobListInfo } from "./transform.mjs"; import { z } from "zod"; //#region src/cli/commands/executor/jobs.d.ts type ExecutorLike = { name: string; }; export type ListExecutorJobsTypedOptions = { executor: E; status?: string; order?: Order; limit?: number; workspaceId?: string; profile?: string; }; export type GetExecutorJobTypedOptions = { executor: E; jobId: string; attempts?: boolean; workspaceId?: string; profile?: string; }; export type WatchExecutorJobTypedOptions = { executor: E; jobId: string; workspaceId?: string; profile?: string; interval?: number; timeout?: number; logs?: boolean; showProgress?: boolean; }; export interface ExecutorJobDetailInfo extends ExecutorJobInfo { attempts?: ExecutorJobAttemptInfo[]; } interface WorkflowJobLog { jobName: string; logs?: string; result?: string; } export interface WatchExecutorJobResult { job: ExecutorJobDetailInfo; targetType: string; elapsedMs: number; attempts: number; timedOut: boolean; lastError: string | null; workflowExecutionId?: string; workflowStatus?: string; workflowJobLogs?: WorkflowJobLog[]; functionExecutionId?: string; functionStatus?: string; functionLogs?: string; } /** * List executor jobs for a given executor. * * Returns at most `options.limit` items. When `limit` is omitted or 0 the * function pages through every job. The CLI caps this at 50 by default * via `pagedLogArgs`; programmatic callers that want the same cap should * pass `limit: 50` explicitly. * @param options - Options for listing executor jobs * @returns List of executor job information */ export declare function listExecutorJobs(options: ListExecutorJobsTypedOptions): Promise; /** * Get details of a specific executor job. * @param options - Options for getting executor job details * @returns Executor job detail information */ export declare function getExecutorJob(options: GetExecutorJobTypedOptions): Promise; /** * Watch an executor job until completion, including downstream executions. * @param options - Options for watching executor job * @returns Result including job details and downstream execution info */ export declare function watchExecutorJob(options: WatchExecutorJobTypedOptions): Promise; /** * Build a user-facing failure message for an executor job wait result. * @param result - Executor job wait result * @returns Failure message, or undefined when the wait succeeded */ export declare function getExecutorWaitFailureMessage(result: WatchExecutorJobResult): string | undefined; //#endregion