import { APIResource } from "../../core/resource.js"; import * as AgentsAPI from "./agents.js"; import { APIPromise } from "../../core/api-promise.js"; import { RequestOptions } from "../../internal/request-options.js"; /** * Endpoints for creating and managing agents (experimental), called by the partner's backend using platform credentials. Covers the full agent lifecycle: creation, policy configuration, pausing, deletion, the device code installation flow, and approving or rejecting transactions initiated by agents. */ export declare class Transactions extends APIResource { /** * Approve a pending agent action, allowing Grid to proceed with execution. The * action must have status `PENDING_APPROVAL`. Once approved, Grid executes the * underlying operation (quote execution or transfer) and the action transitions to * `APPROVED`. For `EXECUTE_QUOTE` actions, note that the underlying quote may have * expired between submission and approval — in that case the action will * transition to `FAILED` instead. This endpoint is called by the platform's * backend using platform credentials, not by the agent itself. * * @example * ```ts * const agentAction = * await client.agents.transactions.approve('actionId', { * agentId: 'agentId', * }); * ``` */ approve(actionID: string, params: TransactionApproveParams, options?: RequestOptions): APIPromise; /** * Reject a pending agent action, preventing execution. The action must have status * `PENDING_APPROVAL`. Once rejected, the action transitions to `REJECTED` and the * underlying operation is not executed. This endpoint is called by the platform's * backend using platform credentials, not by the agent itself. * * @example * ```ts * const agentAction = await client.agents.transactions.reject( * 'actionId', * { agentId: 'agentId' }, * ); * ``` */ reject(actionID: string, params: TransactionRejectParams, options?: RequestOptions): APIPromise; } export interface TransactionApproveParams { /** * System-generated unique agent identifier */ agentId: string; } export interface TransactionRejectParams { /** * Path param: System-generated unique agent identifier */ agentId: string; /** * Body param: Optional human-readable reason for the rejection, stored on the * action and visible to the platform. */ reason?: string; } export declare namespace Transactions { export { type TransactionApproveParams as TransactionApproveParams, type TransactionRejectParams as TransactionRejectParams, }; } //# sourceMappingURL=transactions.d.ts.map