import { BasePaymentsAPI } from './base-payments.js'; import { PaymentOptions, TrackAgentSubTaskDto, StartAgentRequest, NvmAPIResult, SimulationRequestOptions } from '../common/types.js'; /** * The AgentRequestsAPI class provides methods to manage the requests received by AI Agents integrated with Nevermined. * */ export declare class AgentRequestsAPI extends BasePaymentsAPI { /** * This method is used to create a singleton instance of the AgentRequestsAPI class. * * @param options - The options to initialize the payments class. * @returns The instance of the AgentRequestsAPI class. */ static getInstance(options: PaymentOptions): AgentRequestsAPI; /** * This method simulates an agent request. * * @remarks * This method is used to simulate an agent request. * * @param opts - The options for the simulation request. * @returns @see {@link StartAgentRequest} The information about the simulation of the request. * @throws PaymentsError if unable to simulate the agent request. * * @example * ``` * const result = await payments.requests.startSimulationRequest() * * // { * // agentRequestId: '3921032910321', * // urlMatching: 'https://api.example.com/agent-endpoint/1234', * // verbMatching: 'POST' * // } * ``` */ startSimulationRequest(opts?: SimulationRequestOptions): Promise; /** * This method simulates the redemption of credits for an agent request. * * @remarks * This method is used to simulate the redemption of credits for an agent request. * * @param agentRequestId - The unique identifier of the agent request. * @param marginPercent - The margin percentage to apply. Defaults to 20%. * @param batch - Whether the request is a batch request. Defaults to false. * @returns @see {@link NvmAPIResult} The result of the simulation. * @throws PaymentsError if unable to finish the simulation request. * * @example * ``` * const result = await payments.requests.finishSimulationRequest('arId-3921032910321', 0.2, true) * * // { * // creditsToRedeem: '10', * // success: true * // } * ``` */ finishSimulationRequest(agentRequestId: string, marginPercent?: number, batch?: boolean): Promise; /** * Tracks an agent sub task. * * @remarks * This method is used by agent owners to track agent sub tasks for agent tasks. * It records information about credit redemption, categorization tags, and processing descriptions. * * @param trackAgentSubTask - @see {@link TrackAgentSubTaskDto} The agent sub task data to track * @returns @see {@link NvmAPIResult} A promise that resolves to the result of the operation. * @throws PaymentsError if unable to track the agent sub task * * @example * ``` * const result = await payments.requests.trackAgentSubTask({ * agentRequestId: 'atx-12345', * creditsToRedeem: 5, * tag: 'high-priority', * description: 'Processing high-priority data request', * status: AgentTaskStatus.SUCCESS * }) * * // { * // txHash: '0x8d29d5769e832a35e53f80cd4e8890d941c50a09c33dbd975533debc894f2535', * // success: true * // } * ``` */ trackAgentSubTask(trackAgentSubTask: TrackAgentSubTaskDto): Promise; } //# sourceMappingURL=requests-api.d.ts.map