import { ExecuteToolResponse, ToolDefinition } from "../../resources/tools/tools.js"; import { ZodTool, ZodToolSchema, ToolExecuteFunctionFactoryInput, CreateZodToolInput, CreateMultipleZodToolsInput, ToolExecuteFunction, ToolAuthorizationResponse } from "./types.js"; import { z } from 'zod'; /** * Checks if an error indicates that authorization for the tool is required */ export declare function isAuthorizationRequiredError(error: Error): boolean; /** * Converts Arcade Tool Input to Zod schema */ export declare function convertParametersToZodSchema(parameters: ToolDefinition.Input): z.ZodObject; /** * Converts Arcade Tool Output to Zod schema */ export declare function convertOutputToZodSchema(output: ToolDefinition.Output): z.ZodType; /** * Converts a single tool to a Zod-validated tool schema * @param tool - The tool to convert * @returns Zod-validated tool schema * @throws ToolConversionError if the tool is invalid */ export declare function convertSingleToolToSchema(tool: ToolDefinition): ZodToolSchema; /** * Converts tools to Zod-validated tool schemas * @param tools - Array of formatted tools * @returns Array of Zod-validated tool schemas */ export declare function toZodSchema(tools: ToolDefinition[]): ZodToolSchema[]; /** * Creates a tool execution function that will validate the input and execute the tool */ export declare function executeZodTool({ zodToolSchema, client, userId, }: ToolExecuteFunctionFactoryInput): ToolExecuteFunction; /** * Creates a tool execution function that will execute the tool if it is authorized, * otherwise it will return a ToolAuthorizationResponse */ export declare function executeOrAuthorizeZodTool({ zodToolSchema, toolDefinition, client, userId, }: ToolExecuteFunctionFactoryInput): ToolExecuteFunction; /** * Converts a single tool to a full tool with execution capabilities */ export declare function createZodTool(props: CreateZodToolInput): ZodTool; /** * Converts Arcade tools to zod tools with execution capabilities */ export declare function toZod({ tools, client, userId, executeFactory: providedExecuteFactory, }: CreateMultipleZodToolsInput): ZodTool[]; /** * Creates a record of Zod-validated tools with configurable execute functions */ export declare function toZodToolSet({ tools, client, userId, executeFactory: providedExecuteFactory, }: CreateMultipleZodToolsInput): Record>; //# sourceMappingURL=zod.d.ts.map