/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 896b7dfd2301 */ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ToolsCallResponse = { /** * The raw response from the tool */ rawResponse?: { [k: string]: any } | undefined; /** * The error message if applicable */ error?: string | undefined; }; /** @internal */ export const ToolsCallResponse$inboundSchema: z.ZodType< ToolsCallResponse, z.ZodTypeDef, unknown > = z.object({ rawResponse: z.record(z.any()).optional(), error: z.string().optional(), }); export function toolsCallResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ToolsCallResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ToolsCallResponse' from JSON`, ); }