/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: e873963ff75a */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { ActionSummary, ActionSummary$inboundSchema } from "./actionsummary.js"; /** * The schema for the agent input. In JSON Schema format. */ export type InputSchema = {}; /** * The schema for the agent output. In JSON Schema format. */ export type OutputSchema = {}; /** * Defines the structure and properties of an agent. */ export type AgentSchemas = { /** * The ID of the agent. */ agentId: string; /** * The name of the agent. */ name?: string | undefined; /** * The schema for the agent input. In JSON Schema format. */ inputSchema: InputSchema; /** * The schema for the agent output. In JSON Schema format. */ outputSchema: OutputSchema; /** * List of tools that the agent can invoke. Only included when include_tools query parameter is set to true. */ tools?: Array | undefined; }; /** @internal */ export const InputSchema$inboundSchema: z.ZodType< InputSchema, z.ZodTypeDef, unknown > = z.object({}); export function inputSchemaFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => InputSchema$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'InputSchema' from JSON`, ); } /** @internal */ export const OutputSchema$inboundSchema: z.ZodType< OutputSchema, z.ZodTypeDef, unknown > = z.object({}); export function outputSchemaFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => OutputSchema$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputSchema' from JSON`, ); } /** @internal */ export const AgentSchemas$inboundSchema: z.ZodType< AgentSchemas, z.ZodTypeDef, unknown > = z.object({ agent_id: z.string(), name: z.string().optional(), input_schema: z.lazy(() => InputSchema$inboundSchema), output_schema: z.lazy(() => OutputSchema$inboundSchema), tools: z.array(ActionSummary$inboundSchema).optional(), }).transform((v) => { return remap$(v, { "agent_id": "agentId", "input_schema": "inputSchema", "output_schema": "outputSchema", }); }); export function agentSchemasFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AgentSchemas$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AgentSchemas' from JSON`, ); }