/* * 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"; import { Status, Status$inboundSchema, Status$outboundSchema, } from "./status.js"; /** * Local shell call output item: The captured output payload returned by a local-shell tool call. */ export type LocalShellCallOutput = { type: "local_shell_call_output"; id: string; output: string; /** * The processing status of an individual item. 'in_progress' means currently processing, 'completed' means finished successfully, 'incomplete' means processing stopped before completion. */ status?: Status | undefined; }; /** @internal */ export const LocalShellCallOutput$inboundSchema: z.ZodType< LocalShellCallOutput, z.ZodTypeDef, unknown > = z.object({ type: z.literal("local_shell_call_output"), id: z.string(), output: z.string(), status: Status$inboundSchema.optional(), }); /** @internal */ export type LocalShellCallOutput$Outbound = { type: "local_shell_call_output"; id: string; output: string; status?: string | undefined; }; /** @internal */ export const LocalShellCallOutput$outboundSchema: z.ZodType< LocalShellCallOutput$Outbound, z.ZodTypeDef, LocalShellCallOutput > = z.object({ type: z.literal("local_shell_call_output"), id: z.string(), output: z.string(), status: Status$outboundSchema.optional(), }); export function localShellCallOutputToJSON( localShellCallOutput: LocalShellCallOutput, ): string { return JSON.stringify( LocalShellCallOutput$outboundSchema.parse(localShellCallOutput), ); } export function localShellCallOutputFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => LocalShellCallOutput$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LocalShellCallOutput' from JSON`, ); }