import { APIResource } from "../../../core/resource.js"; import * as AgentAPI from "./agent.js"; import { AgentExecutionsCursor } from "./agent.js"; import { APIPromise } from "../../../core/api-promise.js"; import { type CursorParams, PagePromise } from "../../../core/pagination.js"; import { RequestOptions } from "../../../internal/request-options.js"; export declare class Executions extends APIResource { /** * Fetch full details for one execution — including `errorMessage`, `errorCode`, * and `responseText`. Use this to debug failures surfaced by the list endpoint. * * @example * ```ts * const execution = * await client.senders.agent.executions.retrieve( * 'executionId', * { senderId: 'senderId' }, * ); * ``` */ retrieve(executionID: string, params: ExecutionRetrieveParams, options?: RequestOptions): APIPromise; /** * List recent agent executions with pagination. * * An execution is one inbound message answered by the agent, so this covers the * messaging channels only. Voice calls are never listed here regardless of how * many the agent handled. Use `GET /v1/calls` (and `GET /v1/calls/{callId}` for * the transcript) for voice. * * @example * ```ts * // Automatically fetches more pages as needed. * for await (const agentExecution of client.senders.agent.executions.list( * 'senderId', * )) { * // ... * } * ``` */ list(senderID: string, query?: ExecutionListParams | null | undefined, options?: RequestOptions): PagePromise; } export interface ExecutionRetrieveResponse { execution: AgentAPI.AgentExecution; } export interface ExecutionRetrieveParams { senderId: string; } export interface ExecutionListParams extends CursorParams { /** * Status of an agent execution. */ status?: AgentAPI.AgentExecutionStatus; } export declare namespace Executions { export { type ExecutionRetrieveResponse as ExecutionRetrieveResponse, type ExecutionRetrieveParams as ExecutionRetrieveParams, type ExecutionListParams as ExecutionListParams, }; } export { type AgentExecutionsCursor }; //# sourceMappingURL=executions.d.ts.map