# This file was auto-generated by Fern from our API Definition.

from __future__ import annotations

import typing

import typing_extensions


class ServerSentEvent_ChunkParams(typing_extensions.TypedDict):
    type: typing.Literal["chunk"]
    data: str


class ServerSentEvent_ErrorParams(typing_extensions.TypedDict):
    type: typing.Literal["error"]
    error: str
    status_code: int
    context_id: typing_extensions.NotRequired[str]


ServerSentEventParams = typing.Union[ServerSentEvent_ChunkParams, ServerSentEvent_ErrorParams]
