/* * 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 { ErrorEvent, ErrorEvent$inboundSchema, ErrorEvent$Outbound, ErrorEvent$outboundSchema, } from "./errorevent.js"; import { ResponseCancelledEvent, ResponseCancelledEvent$inboundSchema, ResponseCancelledEvent$Outbound, ResponseCancelledEvent$outboundSchema, } from "./responsecancelledevent.js"; import { ResponseCodeInterpreterCallCodeDeltaEvent, ResponseCodeInterpreterCallCodeDeltaEvent$inboundSchema, ResponseCodeInterpreterCallCodeDeltaEvent$Outbound, ResponseCodeInterpreterCallCodeDeltaEvent$outboundSchema, } from "./responsecodeinterpretercallcodedeltaevent.js"; import { ResponseCodeInterpreterCallCodeDoneEvent, ResponseCodeInterpreterCallCodeDoneEvent$inboundSchema, ResponseCodeInterpreterCallCodeDoneEvent$Outbound, ResponseCodeInterpreterCallCodeDoneEvent$outboundSchema, } from "./responsecodeinterpretercallcodedoneevent.js"; import { ResponseCodeInterpreterCallCompletedEvent, ResponseCodeInterpreterCallCompletedEvent$inboundSchema, ResponseCodeInterpreterCallCompletedEvent$Outbound, ResponseCodeInterpreterCallCompletedEvent$outboundSchema, } from "./responsecodeinterpretercallcompletedevent.js"; import { ResponseCodeInterpreterCallInProgressEvent, ResponseCodeInterpreterCallInProgressEvent$inboundSchema, ResponseCodeInterpreterCallInProgressEvent$Outbound, ResponseCodeInterpreterCallInProgressEvent$outboundSchema, } from "./responsecodeinterpretercallinprogressevent.js"; import { ResponseCodeInterpreterCallInterpretingEvent, ResponseCodeInterpreterCallInterpretingEvent$inboundSchema, ResponseCodeInterpreterCallInterpretingEvent$Outbound, ResponseCodeInterpreterCallInterpretingEvent$outboundSchema, } from "./responsecodeinterpretercallinterpretingevent.js"; import { ResponseCompletedEvent, ResponseCompletedEvent$inboundSchema, ResponseCompletedEvent$Outbound, ResponseCompletedEvent$outboundSchema, } from "./responsecompletedevent.js"; import { ResponseContentPartAddedEvent, ResponseContentPartAddedEvent$inboundSchema, ResponseContentPartAddedEvent$Outbound, ResponseContentPartAddedEvent$outboundSchema, } from "./responsecontentpartaddedevent.js"; import { ResponseContentPartDoneEvent, ResponseContentPartDoneEvent$inboundSchema, ResponseContentPartDoneEvent$Outbound, ResponseContentPartDoneEvent$outboundSchema, } from "./responsecontentpartdoneevent.js"; import { ResponseCreatedEvent, ResponseCreatedEvent$inboundSchema, ResponseCreatedEvent$Outbound, ResponseCreatedEvent$outboundSchema, } from "./responsecreatedevent.js"; import { ResponseCustomToolCallInputDeltaEvent, ResponseCustomToolCallInputDeltaEvent$inboundSchema, ResponseCustomToolCallInputDeltaEvent$Outbound, ResponseCustomToolCallInputDeltaEvent$outboundSchema, } from "./responsecustomtoolcallinputdeltaevent.js"; import { ResponseCustomToolCallInputDoneEvent, ResponseCustomToolCallInputDoneEvent$inboundSchema, ResponseCustomToolCallInputDoneEvent$Outbound, ResponseCustomToolCallInputDoneEvent$outboundSchema, } from "./responsecustomtoolcallinputdoneevent.js"; import { ResponseFailedEvent, ResponseFailedEvent$inboundSchema, ResponseFailedEvent$Outbound, ResponseFailedEvent$outboundSchema, } from "./responsefailedevent.js"; import { ResponseFileSearchCallCompletedEvent, ResponseFileSearchCallCompletedEvent$inboundSchema, ResponseFileSearchCallCompletedEvent$Outbound, ResponseFileSearchCallCompletedEvent$outboundSchema, } from "./responsefilesearchcallcompletedevent.js"; import { ResponseFileSearchCallInProgressEvent, ResponseFileSearchCallInProgressEvent$inboundSchema, ResponseFileSearchCallInProgressEvent$Outbound, ResponseFileSearchCallInProgressEvent$outboundSchema, } from "./responsefilesearchcallinprogressevent.js"; import { ResponseFileSearchCallSearchingEvent, ResponseFileSearchCallSearchingEvent$inboundSchema, ResponseFileSearchCallSearchingEvent$Outbound, ResponseFileSearchCallSearchingEvent$outboundSchema, } from "./responsefilesearchcallsearchingevent.js"; import { ResponseFunctionCallArgumentsDeltaEvent, ResponseFunctionCallArgumentsDeltaEvent$inboundSchema, ResponseFunctionCallArgumentsDeltaEvent$Outbound, ResponseFunctionCallArgumentsDeltaEvent$outboundSchema, } from "./responsefunctioncallargumentsdeltaevent.js"; import { ResponseFunctionCallArgumentsDoneEvent, ResponseFunctionCallArgumentsDoneEvent$inboundSchema, ResponseFunctionCallArgumentsDoneEvent$Outbound, ResponseFunctionCallArgumentsDoneEvent$outboundSchema, } from "./responsefunctioncallargumentsdoneevent.js"; import { ResponseHistoryCallCompletedEvent, ResponseHistoryCallCompletedEvent$inboundSchema, ResponseHistoryCallCompletedEvent$Outbound, ResponseHistoryCallCompletedEvent$outboundSchema, } from "./responsehistorycallcompletedevent.js"; import { ResponseHistoryCallInProgressEvent, ResponseHistoryCallInProgressEvent$inboundSchema, ResponseHistoryCallInProgressEvent$Outbound, ResponseHistoryCallInProgressEvent$outboundSchema, } from "./responsehistorycallinprogressevent.js"; import { ResponseHistoryCallSearchingEvent, ResponseHistoryCallSearchingEvent$inboundSchema, ResponseHistoryCallSearchingEvent$Outbound, ResponseHistoryCallSearchingEvent$outboundSchema, } from "./responsehistorycallsearchingevent.js"; import { ResponseImageGenerationCallCompletedEvent, ResponseImageGenerationCallCompletedEvent$inboundSchema, ResponseImageGenerationCallCompletedEvent$Outbound, ResponseImageGenerationCallCompletedEvent$outboundSchema, } from "./responseimagegenerationcallcompletedevent.js"; import { ResponseImageGenerationCallGeneratingEvent, ResponseImageGenerationCallGeneratingEvent$inboundSchema, ResponseImageGenerationCallGeneratingEvent$Outbound, ResponseImageGenerationCallGeneratingEvent$outboundSchema, } from "./responseimagegenerationcallgeneratingevent.js"; import { ResponseImageGenerationCallInProgressEvent, ResponseImageGenerationCallInProgressEvent$inboundSchema, ResponseImageGenerationCallInProgressEvent$Outbound, ResponseImageGenerationCallInProgressEvent$outboundSchema, } from "./responseimagegenerationcallinprogressevent.js"; import { ResponseImageGenerationCallPartialImageEvent, ResponseImageGenerationCallPartialImageEvent$inboundSchema, ResponseImageGenerationCallPartialImageEvent$Outbound, ResponseImageGenerationCallPartialImageEvent$outboundSchema, } from "./responseimagegenerationcallpartialimageevent.js"; import { ResponseIncompleteEvent, ResponseIncompleteEvent$inboundSchema, ResponseIncompleteEvent$Outbound, ResponseIncompleteEvent$outboundSchema, } from "./responseincompleteevent.js"; import { ResponseInProgressEvent, ResponseInProgressEvent$inboundSchema, ResponseInProgressEvent$Outbound, ResponseInProgressEvent$outboundSchema, } from "./responseinprogressevent.js"; import { ResponseMCPCallArgumentsDeltaEvent, ResponseMCPCallArgumentsDeltaEvent$inboundSchema, ResponseMCPCallArgumentsDeltaEvent$Outbound, ResponseMCPCallArgumentsDeltaEvent$outboundSchema, } from "./responsemcpcallargumentsdeltaevent.js"; import { ResponseMCPCallArgumentsDoneEvent, ResponseMCPCallArgumentsDoneEvent$inboundSchema, ResponseMCPCallArgumentsDoneEvent$Outbound, ResponseMCPCallArgumentsDoneEvent$outboundSchema, } from "./responsemcpcallargumentsdoneevent.js"; import { ResponseMCPCallCompletedEvent, ResponseMCPCallCompletedEvent$inboundSchema, ResponseMCPCallCompletedEvent$Outbound, ResponseMCPCallCompletedEvent$outboundSchema, } from "./responsemcpcallcompletedevent.js"; import { ResponseMCPCallFailedEvent, ResponseMCPCallFailedEvent$inboundSchema, ResponseMCPCallFailedEvent$Outbound, ResponseMCPCallFailedEvent$outboundSchema, } from "./responsemcpcallfailedevent.js"; import { ResponseMCPCallInProgressEvent, ResponseMCPCallInProgressEvent$inboundSchema, ResponseMCPCallInProgressEvent$Outbound, ResponseMCPCallInProgressEvent$outboundSchema, } from "./responsemcpcallinprogressevent.js"; import { ResponseMCPListToolsCompletedEvent, ResponseMCPListToolsCompletedEvent$inboundSchema, ResponseMCPListToolsCompletedEvent$Outbound, ResponseMCPListToolsCompletedEvent$outboundSchema, } from "./responsemcplisttoolscompletedevent.js"; import { ResponseMCPListToolsFailedEvent, ResponseMCPListToolsFailedEvent$inboundSchema, ResponseMCPListToolsFailedEvent$Outbound, ResponseMCPListToolsFailedEvent$outboundSchema, } from "./responsemcplisttoolsfailedevent.js"; import { ResponseMCPListToolsInProgressEvent, ResponseMCPListToolsInProgressEvent$inboundSchema, ResponseMCPListToolsInProgressEvent$Outbound, ResponseMCPListToolsInProgressEvent$outboundSchema, } from "./responsemcplisttoolsinprogressevent.js"; import { ResponseOutputItemAddedEvent, ResponseOutputItemAddedEvent$inboundSchema, ResponseOutputItemAddedEvent$Outbound, ResponseOutputItemAddedEvent$outboundSchema, } from "./responseoutputitemaddedevent.js"; import { ResponseOutputItemDoneEvent, ResponseOutputItemDoneEvent$inboundSchema, ResponseOutputItemDoneEvent$Outbound, ResponseOutputItemDoneEvent$outboundSchema, } from "./responseoutputitemdoneevent.js"; import { ResponseOutputTextAnnotationAddedEvent, ResponseOutputTextAnnotationAddedEvent$inboundSchema, ResponseOutputTextAnnotationAddedEvent$Outbound, ResponseOutputTextAnnotationAddedEvent$outboundSchema, } from "./responseoutputtextannotationaddedevent.js"; import { ResponseOutputTextDeltaEvent, ResponseOutputTextDeltaEvent$inboundSchema, ResponseOutputTextDeltaEvent$Outbound, ResponseOutputTextDeltaEvent$outboundSchema, } from "./responseoutputtextdeltaevent.js"; import { ResponseOutputTextDoneEvent, ResponseOutputTextDoneEvent$inboundSchema, ResponseOutputTextDoneEvent$Outbound, ResponseOutputTextDoneEvent$outboundSchema, } from "./responseoutputtextdoneevent.js"; import { ResponseQueuedEvent, ResponseQueuedEvent$inboundSchema, ResponseQueuedEvent$Outbound, ResponseQueuedEvent$outboundSchema, } from "./responsequeuedevent.js"; import { ResponseReadFileCallCompletedEvent, ResponseReadFileCallCompletedEvent$inboundSchema, ResponseReadFileCallCompletedEvent$Outbound, ResponseReadFileCallCompletedEvent$outboundSchema, } from "./responsereadfilecallcompletedevent.js"; import { ResponseReadFileCallInProgressEvent, ResponseReadFileCallInProgressEvent$inboundSchema, ResponseReadFileCallInProgressEvent$Outbound, ResponseReadFileCallInProgressEvent$outboundSchema, } from "./responsereadfilecallinprogressevent.js"; import { ResponseReadFileCallReadingEvent, ResponseReadFileCallReadingEvent$inboundSchema, ResponseReadFileCallReadingEvent$Outbound, ResponseReadFileCallReadingEvent$outboundSchema, } from "./responsereadfilecallreadingevent.js"; import { ResponseReasoningSummaryPartAddedEvent, ResponseReasoningSummaryPartAddedEvent$inboundSchema, ResponseReasoningSummaryPartAddedEvent$Outbound, ResponseReasoningSummaryPartAddedEvent$outboundSchema, } from "./responsereasoningsummarypartaddedevent.js"; import { ResponseReasoningSummaryPartDoneEvent, ResponseReasoningSummaryPartDoneEvent$inboundSchema, ResponseReasoningSummaryPartDoneEvent$Outbound, ResponseReasoningSummaryPartDoneEvent$outboundSchema, } from "./responsereasoningsummarypartdoneevent.js"; import { ResponseReasoningSummaryTextDeltaEvent, ResponseReasoningSummaryTextDeltaEvent$inboundSchema, ResponseReasoningSummaryTextDeltaEvent$Outbound, ResponseReasoningSummaryTextDeltaEvent$outboundSchema, } from "./responsereasoningsummarytextdeltaevent.js"; import { ResponseReasoningSummaryTextDoneEvent, ResponseReasoningSummaryTextDoneEvent$inboundSchema, ResponseReasoningSummaryTextDoneEvent$Outbound, ResponseReasoningSummaryTextDoneEvent$outboundSchema, } from "./responsereasoningsummarytextdoneevent.js"; import { ResponseReasoningTextDeltaEvent, ResponseReasoningTextDeltaEvent$inboundSchema, ResponseReasoningTextDeltaEvent$Outbound, ResponseReasoningTextDeltaEvent$outboundSchema, } from "./responsereasoningtextdeltaevent.js"; import { ResponseReasoningTextDoneEvent, ResponseReasoningTextDoneEvent$inboundSchema, ResponseReasoningTextDoneEvent$Outbound, ResponseReasoningTextDoneEvent$outboundSchema, } from "./responsereasoningtextdoneevent.js"; import { ResponseRefusalDeltaEvent, ResponseRefusalDeltaEvent$inboundSchema, ResponseRefusalDeltaEvent$Outbound, ResponseRefusalDeltaEvent$outboundSchema, } from "./responserefusaldeltaevent.js"; import { ResponseRefusalDoneEvent, ResponseRefusalDoneEvent$inboundSchema, ResponseRefusalDoneEvent$Outbound, ResponseRefusalDoneEvent$outboundSchema, } from "./responserefusaldoneevent.js"; import { ResponseShellCallCompletedEvent, ResponseShellCallCompletedEvent$inboundSchema, ResponseShellCallCompletedEvent$Outbound, ResponseShellCallCompletedEvent$outboundSchema, } from "./responseshellcallcompletedevent.js"; import { ResponseShellCallExecutingEvent, ResponseShellCallExecutingEvent$inboundSchema, ResponseShellCallExecutingEvent$Outbound, ResponseShellCallExecutingEvent$outboundSchema, } from "./responseshellcallexecutingevent.js"; import { ResponseShellCallInProgressEvent, ResponseShellCallInProgressEvent$inboundSchema, ResponseShellCallInProgressEvent$Outbound, ResponseShellCallInProgressEvent$outboundSchema, } from "./responseshellcallinprogressevent.js"; import { ResponseSleepCallCompletedEvent, ResponseSleepCallCompletedEvent$inboundSchema, ResponseSleepCallCompletedEvent$Outbound, ResponseSleepCallCompletedEvent$outboundSchema, } from "./responsesleepcallcompletedevent.js"; import { ResponseSleepCallInProgressEvent, ResponseSleepCallInProgressEvent$inboundSchema, ResponseSleepCallInProgressEvent$Outbound, ResponseSleepCallInProgressEvent$outboundSchema, } from "./responsesleepcallinprogressevent.js"; import { ResponseSleepCallSleepingEvent, ResponseSleepCallSleepingEvent$inboundSchema, ResponseSleepCallSleepingEvent$Outbound, ResponseSleepCallSleepingEvent$outboundSchema, } from "./responsesleepcallsleepingevent.js"; import { ResponseToolSearchCallCompletedEvent, ResponseToolSearchCallCompletedEvent$inboundSchema, ResponseToolSearchCallCompletedEvent$Outbound, ResponseToolSearchCallCompletedEvent$outboundSchema, } from "./responsetoolsearchcallcompletedevent.js"; import { ResponseToolSearchCallInProgressEvent, ResponseToolSearchCallInProgressEvent$inboundSchema, ResponseToolSearchCallInProgressEvent$Outbound, ResponseToolSearchCallInProgressEvent$outboundSchema, } from "./responsetoolsearchcallinprogressevent.js"; import { ResponseToolSearchCallSearchingEvent, ResponseToolSearchCallSearchingEvent$inboundSchema, ResponseToolSearchCallSearchingEvent$Outbound, ResponseToolSearchCallSearchingEvent$outboundSchema, } from "./responsetoolsearchcallsearchingevent.js"; import { ResponseWebSearchCallCompletedEvent, ResponseWebSearchCallCompletedEvent$inboundSchema, ResponseWebSearchCallCompletedEvent$Outbound, ResponseWebSearchCallCompletedEvent$outboundSchema, } from "./responsewebsearchcallcompletedevent.js"; import { ResponseWebSearchCallInProgressEvent, ResponseWebSearchCallInProgressEvent$inboundSchema, ResponseWebSearchCallInProgressEvent$Outbound, ResponseWebSearchCallInProgressEvent$outboundSchema, } from "./responsewebsearchcallinprogressevent.js"; import { ResponseWebSearchCallSearchingEvent, ResponseWebSearchCallSearchingEvent$inboundSchema, ResponseWebSearchCallSearchingEvent$Outbound, ResponseWebSearchCallSearchingEvent$outboundSchema, } from "./responsewebsearchcallsearchingevent.js"; export type ResponseStreamingEvent = | ResponseCreatedEvent | ResponseInProgressEvent | ResponseCompletedEvent | ResponseFailedEvent | ResponseIncompleteEvent | ResponseQueuedEvent | ResponseCancelledEvent | ResponseOutputItemAddedEvent | ResponseOutputItemDoneEvent | ResponseContentPartAddedEvent | ResponseContentPartDoneEvent | ResponseOutputTextDeltaEvent | ResponseOutputTextDoneEvent | ResponseRefusalDeltaEvent | ResponseRefusalDoneEvent | ResponseFunctionCallArgumentsDeltaEvent | ResponseFunctionCallArgumentsDoneEvent | ResponseFileSearchCallInProgressEvent | ResponseFileSearchCallSearchingEvent | ResponseFileSearchCallCompletedEvent | ResponseWebSearchCallInProgressEvent | ResponseWebSearchCallSearchingEvent | ResponseWebSearchCallCompletedEvent | ResponseHistoryCallInProgressEvent | ResponseHistoryCallSearchingEvent | ResponseHistoryCallCompletedEvent | ResponseSleepCallInProgressEvent | ResponseSleepCallSleepingEvent | ResponseSleepCallCompletedEvent | ResponseToolSearchCallInProgressEvent | ResponseToolSearchCallSearchingEvent | ResponseToolSearchCallCompletedEvent | ResponseReasoningSummaryPartAddedEvent | ResponseReasoningSummaryPartDoneEvent | ResponseReasoningSummaryTextDeltaEvent | ResponseReasoningSummaryTextDoneEvent | ResponseReasoningTextDeltaEvent | ResponseReasoningTextDoneEvent | ResponseImageGenerationCallInProgressEvent | ResponseImageGenerationCallGeneratingEvent | ResponseImageGenerationCallCompletedEvent | ResponseImageGenerationCallPartialImageEvent | ResponseMCPCallArgumentsDeltaEvent | ResponseMCPCallArgumentsDoneEvent | ResponseMCPCallInProgressEvent | ResponseMCPCallCompletedEvent | ResponseMCPCallFailedEvent | ResponseMCPListToolsInProgressEvent | ResponseMCPListToolsCompletedEvent | ResponseMCPListToolsFailedEvent | ResponseReadFileCallInProgressEvent | ResponseReadFileCallReadingEvent | ResponseReadFileCallCompletedEvent | ResponseCodeInterpreterCallInProgressEvent | ResponseCodeInterpreterCallInterpretingEvent | ResponseCodeInterpreterCallCompletedEvent | ResponseCodeInterpreterCallCodeDeltaEvent | ResponseCodeInterpreterCallCodeDoneEvent | ResponseShellCallInProgressEvent | ResponseShellCallExecutingEvent | ResponseShellCallCompletedEvent | ResponseCustomToolCallInputDeltaEvent | ResponseCustomToolCallInputDoneEvent | ResponseOutputTextAnnotationAddedEvent | ErrorEvent; /** @internal */ export const ResponseStreamingEvent$inboundSchema: z.ZodType< ResponseStreamingEvent, z.ZodTypeDef, unknown > = z.union([ ResponseCreatedEvent$inboundSchema, ResponseInProgressEvent$inboundSchema, ResponseCompletedEvent$inboundSchema, ResponseFailedEvent$inboundSchema, ResponseIncompleteEvent$inboundSchema, ResponseQueuedEvent$inboundSchema, ResponseCancelledEvent$inboundSchema, ResponseOutputItemAddedEvent$inboundSchema, ResponseOutputItemDoneEvent$inboundSchema, ResponseContentPartAddedEvent$inboundSchema, ResponseContentPartDoneEvent$inboundSchema, ResponseOutputTextDeltaEvent$inboundSchema, ResponseOutputTextDoneEvent$inboundSchema, ResponseRefusalDeltaEvent$inboundSchema, ResponseRefusalDoneEvent$inboundSchema, ResponseFunctionCallArgumentsDeltaEvent$inboundSchema, ResponseFunctionCallArgumentsDoneEvent$inboundSchema, ResponseFileSearchCallInProgressEvent$inboundSchema, ResponseFileSearchCallSearchingEvent$inboundSchema, ResponseFileSearchCallCompletedEvent$inboundSchema, ResponseWebSearchCallInProgressEvent$inboundSchema, ResponseWebSearchCallSearchingEvent$inboundSchema, ResponseWebSearchCallCompletedEvent$inboundSchema, ResponseHistoryCallInProgressEvent$inboundSchema, ResponseHistoryCallSearchingEvent$inboundSchema, ResponseHistoryCallCompletedEvent$inboundSchema, ResponseSleepCallInProgressEvent$inboundSchema, ResponseSleepCallSleepingEvent$inboundSchema, ResponseSleepCallCompletedEvent$inboundSchema, ResponseToolSearchCallInProgressEvent$inboundSchema, ResponseToolSearchCallSearchingEvent$inboundSchema, ResponseToolSearchCallCompletedEvent$inboundSchema, ResponseReasoningSummaryPartAddedEvent$inboundSchema, ResponseReasoningSummaryPartDoneEvent$inboundSchema, ResponseReasoningSummaryTextDeltaEvent$inboundSchema, ResponseReasoningSummaryTextDoneEvent$inboundSchema, ResponseReasoningTextDeltaEvent$inboundSchema, ResponseReasoningTextDoneEvent$inboundSchema, ResponseImageGenerationCallInProgressEvent$inboundSchema, ResponseImageGenerationCallGeneratingEvent$inboundSchema, ResponseImageGenerationCallCompletedEvent$inboundSchema, ResponseImageGenerationCallPartialImageEvent$inboundSchema, ResponseMCPCallArgumentsDeltaEvent$inboundSchema, ResponseMCPCallArgumentsDoneEvent$inboundSchema, ResponseMCPCallInProgressEvent$inboundSchema, ResponseMCPCallCompletedEvent$inboundSchema, ResponseMCPCallFailedEvent$inboundSchema, ResponseMCPListToolsInProgressEvent$inboundSchema, ResponseMCPListToolsCompletedEvent$inboundSchema, ResponseMCPListToolsFailedEvent$inboundSchema, ResponseReadFileCallInProgressEvent$inboundSchema, ResponseReadFileCallReadingEvent$inboundSchema, ResponseReadFileCallCompletedEvent$inboundSchema, ResponseCodeInterpreterCallInProgressEvent$inboundSchema, ResponseCodeInterpreterCallInterpretingEvent$inboundSchema, ResponseCodeInterpreterCallCompletedEvent$inboundSchema, ResponseCodeInterpreterCallCodeDeltaEvent$inboundSchema, ResponseCodeInterpreterCallCodeDoneEvent$inboundSchema, ResponseShellCallInProgressEvent$inboundSchema, ResponseShellCallExecutingEvent$inboundSchema, ResponseShellCallCompletedEvent$inboundSchema, ResponseCustomToolCallInputDeltaEvent$inboundSchema, ResponseCustomToolCallInputDoneEvent$inboundSchema, ResponseOutputTextAnnotationAddedEvent$inboundSchema, ErrorEvent$inboundSchema, ]); /** @internal */ export type ResponseStreamingEvent$Outbound = | ResponseCreatedEvent$Outbound | ResponseInProgressEvent$Outbound | ResponseCompletedEvent$Outbound | ResponseFailedEvent$Outbound | ResponseIncompleteEvent$Outbound | ResponseQueuedEvent$Outbound | ResponseCancelledEvent$Outbound | ResponseOutputItemAddedEvent$Outbound | ResponseOutputItemDoneEvent$Outbound | ResponseContentPartAddedEvent$Outbound | ResponseContentPartDoneEvent$Outbound | ResponseOutputTextDeltaEvent$Outbound | ResponseOutputTextDoneEvent$Outbound | ResponseRefusalDeltaEvent$Outbound | ResponseRefusalDoneEvent$Outbound | ResponseFunctionCallArgumentsDeltaEvent$Outbound | ResponseFunctionCallArgumentsDoneEvent$Outbound | ResponseFileSearchCallInProgressEvent$Outbound | ResponseFileSearchCallSearchingEvent$Outbound | ResponseFileSearchCallCompletedEvent$Outbound | ResponseWebSearchCallInProgressEvent$Outbound | ResponseWebSearchCallSearchingEvent$Outbound | ResponseWebSearchCallCompletedEvent$Outbound | ResponseHistoryCallInProgressEvent$Outbound | ResponseHistoryCallSearchingEvent$Outbound | ResponseHistoryCallCompletedEvent$Outbound | ResponseSleepCallInProgressEvent$Outbound | ResponseSleepCallSleepingEvent$Outbound | ResponseSleepCallCompletedEvent$Outbound | ResponseToolSearchCallInProgressEvent$Outbound | ResponseToolSearchCallSearchingEvent$Outbound | ResponseToolSearchCallCompletedEvent$Outbound | ResponseReasoningSummaryPartAddedEvent$Outbound | ResponseReasoningSummaryPartDoneEvent$Outbound | ResponseReasoningSummaryTextDeltaEvent$Outbound | ResponseReasoningSummaryTextDoneEvent$Outbound | ResponseReasoningTextDeltaEvent$Outbound | ResponseReasoningTextDoneEvent$Outbound | ResponseImageGenerationCallInProgressEvent$Outbound | ResponseImageGenerationCallGeneratingEvent$Outbound | ResponseImageGenerationCallCompletedEvent$Outbound | ResponseImageGenerationCallPartialImageEvent$Outbound | ResponseMCPCallArgumentsDeltaEvent$Outbound | ResponseMCPCallArgumentsDoneEvent$Outbound | ResponseMCPCallInProgressEvent$Outbound | ResponseMCPCallCompletedEvent$Outbound | ResponseMCPCallFailedEvent$Outbound | ResponseMCPListToolsInProgressEvent$Outbound | ResponseMCPListToolsCompletedEvent$Outbound | ResponseMCPListToolsFailedEvent$Outbound | ResponseReadFileCallInProgressEvent$Outbound | ResponseReadFileCallReadingEvent$Outbound | ResponseReadFileCallCompletedEvent$Outbound | ResponseCodeInterpreterCallInProgressEvent$Outbound | ResponseCodeInterpreterCallInterpretingEvent$Outbound | ResponseCodeInterpreterCallCompletedEvent$Outbound | ResponseCodeInterpreterCallCodeDeltaEvent$Outbound | ResponseCodeInterpreterCallCodeDoneEvent$Outbound | ResponseShellCallInProgressEvent$Outbound | ResponseShellCallExecutingEvent$Outbound | ResponseShellCallCompletedEvent$Outbound | ResponseCustomToolCallInputDeltaEvent$Outbound | ResponseCustomToolCallInputDoneEvent$Outbound | ResponseOutputTextAnnotationAddedEvent$Outbound | ErrorEvent$Outbound; /** @internal */ export const ResponseStreamingEvent$outboundSchema: z.ZodType< ResponseStreamingEvent$Outbound, z.ZodTypeDef, ResponseStreamingEvent > = z.union([ ResponseCreatedEvent$outboundSchema, ResponseInProgressEvent$outboundSchema, ResponseCompletedEvent$outboundSchema, ResponseFailedEvent$outboundSchema, ResponseIncompleteEvent$outboundSchema, ResponseQueuedEvent$outboundSchema, ResponseCancelledEvent$outboundSchema, ResponseOutputItemAddedEvent$outboundSchema, ResponseOutputItemDoneEvent$outboundSchema, ResponseContentPartAddedEvent$outboundSchema, ResponseContentPartDoneEvent$outboundSchema, ResponseOutputTextDeltaEvent$outboundSchema, ResponseOutputTextDoneEvent$outboundSchema, ResponseRefusalDeltaEvent$outboundSchema, ResponseRefusalDoneEvent$outboundSchema, ResponseFunctionCallArgumentsDeltaEvent$outboundSchema, ResponseFunctionCallArgumentsDoneEvent$outboundSchema, ResponseFileSearchCallInProgressEvent$outboundSchema, ResponseFileSearchCallSearchingEvent$outboundSchema, ResponseFileSearchCallCompletedEvent$outboundSchema, ResponseWebSearchCallInProgressEvent$outboundSchema, ResponseWebSearchCallSearchingEvent$outboundSchema, ResponseWebSearchCallCompletedEvent$outboundSchema, ResponseHistoryCallInProgressEvent$outboundSchema, ResponseHistoryCallSearchingEvent$outboundSchema, ResponseHistoryCallCompletedEvent$outboundSchema, ResponseSleepCallInProgressEvent$outboundSchema, ResponseSleepCallSleepingEvent$outboundSchema, ResponseSleepCallCompletedEvent$outboundSchema, ResponseToolSearchCallInProgressEvent$outboundSchema, ResponseToolSearchCallSearchingEvent$outboundSchema, ResponseToolSearchCallCompletedEvent$outboundSchema, ResponseReasoningSummaryPartAddedEvent$outboundSchema, ResponseReasoningSummaryPartDoneEvent$outboundSchema, ResponseReasoningSummaryTextDeltaEvent$outboundSchema, ResponseReasoningSummaryTextDoneEvent$outboundSchema, ResponseReasoningTextDeltaEvent$outboundSchema, ResponseReasoningTextDoneEvent$outboundSchema, ResponseImageGenerationCallInProgressEvent$outboundSchema, ResponseImageGenerationCallGeneratingEvent$outboundSchema, ResponseImageGenerationCallCompletedEvent$outboundSchema, ResponseImageGenerationCallPartialImageEvent$outboundSchema, ResponseMCPCallArgumentsDeltaEvent$outboundSchema, ResponseMCPCallArgumentsDoneEvent$outboundSchema, ResponseMCPCallInProgressEvent$outboundSchema, ResponseMCPCallCompletedEvent$outboundSchema, ResponseMCPCallFailedEvent$outboundSchema, ResponseMCPListToolsInProgressEvent$outboundSchema, ResponseMCPListToolsCompletedEvent$outboundSchema, ResponseMCPListToolsFailedEvent$outboundSchema, ResponseReadFileCallInProgressEvent$outboundSchema, ResponseReadFileCallReadingEvent$outboundSchema, ResponseReadFileCallCompletedEvent$outboundSchema, ResponseCodeInterpreterCallInProgressEvent$outboundSchema, ResponseCodeInterpreterCallInterpretingEvent$outboundSchema, ResponseCodeInterpreterCallCompletedEvent$outboundSchema, ResponseCodeInterpreterCallCodeDeltaEvent$outboundSchema, ResponseCodeInterpreterCallCodeDoneEvent$outboundSchema, ResponseShellCallInProgressEvent$outboundSchema, ResponseShellCallExecutingEvent$outboundSchema, ResponseShellCallCompletedEvent$outboundSchema, ResponseCustomToolCallInputDeltaEvent$outboundSchema, ResponseCustomToolCallInputDoneEvent$outboundSchema, ResponseOutputTextAnnotationAddedEvent$outboundSchema, ErrorEvent$outboundSchema, ]); export function responseStreamingEventToJSON( responseStreamingEvent: ResponseStreamingEvent, ): string { return JSON.stringify( ResponseStreamingEvent$outboundSchema.parse(responseStreamingEvent), ); } export function responseStreamingEventFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ResponseStreamingEvent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseStreamingEvent' from JSON`, ); }