import { APIResource } from "../../core/resource.js"; import { APIPromise } from "../../core/api-promise.js"; import { CursorPage, type CursorPageParams, PagePromise } from "../../core/pagination.js"; import { RequestOptions } from "../../internal/request-options.js"; export declare class Executions extends APIResource { /** * Create execution */ create(params: ExecutionCreateParams, options?: RequestOptions): APIPromise; /** * Get execution */ retrieve(params: ExecutionRetrieveParams, options?: RequestOptions): APIPromise; /** * List executions */ list(params: ExecutionListParams, options?: RequestOptions): PagePromise; /** * Delete execution */ delete(params: ExecutionDeleteParams, options?: RequestOptions): APIPromise; /** * List execution events */ events(params: ExecutionEventsParams, options?: RequestOptions): PagePromise; /** * Get execution output */ output(params: ExecutionOutputParams, options?: RequestOptions): APIPromise; } export type ExecutionsCursorPage = CursorPage; export type ExecutionEventsCursorPage = CursorPage; export interface ArtifactRef { artifact_id: string; name: string; } export interface Execution { command: Array | null; created_at: string; execution_id: string; machine_id: string; status: 'wake_in_progress' | 'queued' | 'running' | 'succeeded' | 'failed' | 'cancelled' | 'expired'; artifacts?: Array | null; completed_at?: string; cwd?: string; env_keys?: Array | null; error_code?: string; error_message?: string; exit_code?: number; expires_at?: string; retry_after_ms?: number; signal?: number; started_at?: string; stderr_bytes?: number; stderr_truncated?: boolean; stdout_bytes?: number; stdout_truncated?: boolean; } export interface ExecutionCreateParams { command: Array | null; cwd?: string; env?: { [key: string]: string; }; stdin?: string; timeout_ms?: number; } export interface ExecutionEvent { at: string; sequence: number; type: 'lifecycle' | 'stdout' | 'stderr'; chunk?: string; error_code?: string; error_message?: string; exit_code?: number; signal?: number; status?: 'wake_in_progress' | 'queued' | 'running' | 'succeeded' | 'failed' | 'cancelled' | 'expired'; } export interface ExecutionEvents { items: Array | null; next_cursor?: string; } export interface ExecutionList { items: Array | null; next_cursor?: string; } export interface ExecutionOutput { execution_id: string; stderr?: string; stderr_bytes?: number; stderr_truncated?: boolean; stdout?: string; stdout_bytes?: number; stdout_truncated?: boolean; } export interface ExecutionCreateParams { /** * Path param */ machine_id: string; /** * Body param */ command: Array | null; /** * Body param */ cwd?: string; /** * Body param */ env?: { [key: string]: string; }; /** * Body param */ stdin?: string; /** * Body param */ timeout_ms?: number; } export interface ExecutionRetrieveParams { machine_id: string; execution_id: string; } export interface ExecutionListParams extends CursorPageParams { /** * Path param */ machine_id: string; } export interface ExecutionDeleteParams { machine_id: string; execution_id: string; } export interface ExecutionEventsParams extends CursorPageParams { /** * Path param */ machine_id: string; /** * Path param */ execution_id: string; } export interface ExecutionOutputParams { machine_id: string; execution_id: string; } export declare namespace Executions { export { type ArtifactRef as ArtifactRef, type Execution as Execution, type ExecutionCreateParams as ExecutionCreateParams, type ExecutionEvent as ExecutionEvent, type ExecutionEvents as ExecutionEvents, type ExecutionList as ExecutionList, type ExecutionOutput as ExecutionOutput, type ExecutionsCursorPage as ExecutionsCursorPage, type ExecutionEventsCursorPage as ExecutionEventsCursorPage, type ExecutionRetrieveParams as ExecutionRetrieveParams, type ExecutionListParams as ExecutionListParams, type ExecutionDeleteParams as ExecutionDeleteParams, type ExecutionEventsParams as ExecutionEventsParams, type ExecutionOutputParams as ExecutionOutputParams, }; } //# sourceMappingURL=executions.d.ts.map