/* * 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 = { type: "logs"; logs: string; }; /** @internal */ export const CodeInterpreterOutputLogs$inboundSchema: z.ZodType< CodeInterpreterOutputLogs, z.ZodTypeDef, unknown > = z.object({ type: z.literal("logs"), logs: z.string(), }); /** @internal */ export type CodeInterpreterOutputLogs$Outbound = { type: "logs"; logs: string; }; /** @internal */ export const CodeInterpreterOutputLogs$outboundSchema: z.ZodType< CodeInterpreterOutputLogs$Outbound, z.ZodTypeDef, CodeInterpreterOutputLogs > = z.object({ type: z.literal("logs"), logs: z.string(), }); 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`, ); }