import { APIResource } from "../../core/resource.js"; import { APIPromise } from "../../core/api-promise.js"; import { RequestOptions } from "../../internal/request-options.js"; /** * Logging and monitoring */ export declare class Tools extends APIResource { /** * Get detailed execution log by ID * * @example * ```ts * const tool = await client.logs.tools.retrieve('id'); * ``` */ retrieve(id: string, options?: RequestOptions): APIPromise; /** * Search and retrieve action execution logs * * @example * ```ts * const tools = await client.logs.tools.list({ cursor: 0 }); * ``` */ list(body: ToolListParams, options?: RequestOptions): APIPromise; } export interface ToolRetrieveResponse { actionId: string; actionLogId: string; app: ToolRetrieveResponse.App; connection: ToolRetrieveResponse.Connection; endTime: number; error: { [key: string]: unknown; }; executionMetadata: { [key: string]: unknown; }; payloadReceived: { [key: string]: unknown; }; response: { [key: string]: unknown; }; session: { [key: string]: unknown; }; startTime: number; status: 'success' | 'error' | 'warning' | 'info'; steps: Array; totalDuration: string; version: string; } export declare namespace ToolRetrieveResponse { interface App { icon: string; name: string; uniqueId: string; } interface Connection { id: string; entity: string; } interface Step { endTime: number; message: string; startTime: number; status: 'success' | 'failure' | 'error'; totalDuration: number; type: 'tool_execution' | 'fetch_connection_details'; logs?: Array; metadata?: Step.Metadata; } namespace Step { interface Log { level: string; message: string; request: Log.Request; requestId: string; response: Log.Response; time: number; type: 'network' | 'system'; } namespace Log { interface Request { method: string; url: string; headers?: { [key: string]: string; }; json?: { [key: string]: unknown; }; params?: { [key: string]: unknown; }; timeout?: number; } interface Response { status: number; time: string; } } interface Metadata { encryption?: string; } } } export interface ToolListResponse { data: Array; nextCursor: number | null; } export declare namespace ToolListResponse { interface Data { id: string; actionKey: string; app: Data.App; appKey: string; connectedAccountId: string; createdAt: number; entityId: string; executionTime: number; /** * @deprecated */ minimalResponse: string; status: 'success' | 'failed'; metadata?: Data.Metadata; } namespace Data { interface App { icon: string; name: string; } interface Metadata { recipe_id?: string; } } } export interface ToolListParams { /** * cursor_that_can_be_used_to_paginate_through_the_logs */ cursor: number | null; /** * whether_the_search_is_case_sensitive_or_not */ case_sensitive?: boolean | null; /** * start_time_of_the_logs_in_epoch_time */ from?: number; /** * number_of_logs_to_return */ limit?: number; search_params?: Array; /** * end_time_of_the_logs_in_epoch_time */ to?: number; } export declare namespace ToolListParams { interface SearchParam { field?: string; operation?: string; value?: string; } } export declare namespace Tools { export { type ToolRetrieveResponse as ToolRetrieveResponse, type ToolListResponse as ToolListResponse, type ToolListParams as ToolListParams, }; } //# sourceMappingURL=tools.d.ts.map