/* * 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"; export type CodeInterpreterOutputLogs = { /** * The logs output from the code interpreter. */ logs: string; type?: "logs" | undefined; }; /** @internal */ export const CodeInterpreterOutputLogs$inboundSchema: z.ZodType< CodeInterpreterOutputLogs, z.ZodTypeDef, unknown > = z.object({ logs: z.string(), type: z.literal("logs").default("logs"), }); /** @internal */ export type CodeInterpreterOutputLogs$Outbound = { logs: string; type: "logs"; }; /** @internal */ export const CodeInterpreterOutputLogs$outboundSchema: z.ZodType< CodeInterpreterOutputLogs$Outbound, z.ZodTypeDef, CodeInterpreterOutputLogs > = z.object({ logs: z.string(), type: z.literal("logs").default("logs" as const), }); export function codeInterpreterOutputLogsToJSON( codeInterpreterOutputLogs: CodeInterpreterOutputLogs, ): string { return JSON.stringify( CodeInterpreterOutputLogs$outboundSchema.parse(codeInterpreterOutputLogs), ); } export function codeInterpreterOutputLogsFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CodeInterpreterOutputLogs$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CodeInterpreterOutputLogs' from JSON`, ); }