/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 38a02743d8f5 */ 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 { ChatResult, ChatResult$inboundSchema } from "./chatresult.js"; export type GetChatResponse = { chatResult?: ChatResult | undefined; }; /** @internal */ export const GetChatResponse$inboundSchema: z.ZodType< GetChatResponse, z.ZodTypeDef, unknown > = z.object({ chatResult: ChatResult$inboundSchema.optional(), }); export function getChatResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => GetChatResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetChatResponse' from JSON`, ); }