/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: d8a53328fee0 */ 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"; import { AgentRun, AgentRun$inboundSchema } from "./agentrun.js"; import { Message, Message$inboundSchema } from "./message.js"; export type AgentRunWaitResponse = { run?: AgentRun | undefined; /** * The messages returned by the run. */ messages?: Array | undefined; }; /** @internal */ export const AgentRunWaitResponse$inboundSchema: z.ZodType< AgentRunWaitResponse, z.ZodTypeDef, unknown > = z.object({ run: AgentRun$inboundSchema.optional(), messages: z.array(Message$inboundSchema).optional(), }); export function agentRunWaitResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AgentRunWaitResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AgentRunWaitResponse' from JSON`, ); }