/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ 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"; /** * Parsed JSON body from the agent webhook response when JSON. */ export type AgentReply = {}; export type TestDomainRouteAgentResultDto = { agentId: string; httpStatus: number; /** * Parsed JSON body from the agent webhook response when JSON. */ agentReply?: AgentReply | undefined; latencyMs: number; }; /** @internal */ export const AgentReply$inboundSchema: z.ZodType< AgentReply, z.ZodTypeDef, unknown > = z.object({}); export function agentReplyFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AgentReply$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AgentReply' from JSON`, ); } /** @internal */ export const TestDomainRouteAgentResultDto$inboundSchema: z.ZodType< TestDomainRouteAgentResultDto, z.ZodTypeDef, unknown > = z.object({ agentId: z.string(), httpStatus: z.number(), agentReply: z.lazy(() => AgentReply$inboundSchema).optional(), latencyMs: z.number(), }); export function testDomainRouteAgentResultDtoFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TestDomainRouteAgentResultDto$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TestDomainRouteAgentResultDto' from JSON`, ); }