/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 0adc0f38f0b0 */ 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"; /** * The types of tools that the agent is allowed to use. Only works with FAST and ADVANCED `agent` values */ export type ToolSets = { /** * Whether the agent is allowed to use web search (default: true). */ enableWebSearch?: boolean | undefined; /** * Whether the agent is allowed to search internal company resources (default: true). */ enableCompanyTools?: boolean | undefined; }; /** @internal */ export const ToolSets$inboundSchema: z.ZodType< ToolSets, z.ZodTypeDef, unknown > = z.object({ enableWebSearch: z.boolean().optional(), enableCompanyTools: z.boolean().optional(), }); /** @internal */ export type ToolSets$Outbound = { enableWebSearch?: boolean | undefined; enableCompanyTools?: boolean | undefined; }; /** @internal */ export const ToolSets$outboundSchema: z.ZodType< ToolSets$Outbound, z.ZodTypeDef, ToolSets > = z.object({ enableWebSearch: z.boolean().optional(), enableCompanyTools: z.boolean().optional(), }); export function toolSetsToJSON(toolSets: ToolSets): string { return JSON.stringify(ToolSets$outboundSchema.parse(toolSets)); } export function toolSetsFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ToolSets$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ToolSets' from JSON`, ); }