/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: e4afdeb4b779 */ import * as z from "zod/v4"; import { safeParse } from "../../lib/schemas.js"; import * as openEnums from "../../types/enums.js"; import { OpenEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export const TaskSupport = { Forbidden: "forbidden", Optional: "optional", Required: "required", } as const; export type TaskSupport = OpenEnum; /** * Execution-related properties for a tool. */ export type ToolExecution = { taskSupport?: TaskSupport | null | undefined; [additionalProperties: string]: unknown; }; /** @internal */ export const TaskSupport$inboundSchema: z.ZodType = openEnums.inboundSchema(TaskSupport); /** @internal */ export const ToolExecution$inboundSchema: z.ZodType = z .object({ taskSupport: z.nullable(TaskSupport$inboundSchema).optional(), }).catchall(z.any()); export function toolExecutionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ToolExecution$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ToolExecution' from JSON`, ); }