|
1 | 1 | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. |
2 | 2 |
|
3 | | -from typing import Union |
4 | | -from typing_extensions import Annotated, TypeAlias |
| 3 | +from typing import List, Union |
| 4 | +from typing_extensions import Literal, Annotated, TypeAlias |
| 5 | + |
| 6 | +from pydantic import Field as FieldInfo |
5 | 7 |
|
6 | 8 | from .._utils import PropertyInfo |
| 9 | +from .._models import BaseModel |
7 | 10 | from .file_part import FilePart |
8 | 11 | from .text_part import TextPart |
9 | 12 | from .tool_part import ToolPart |
10 | 13 | from .snapshot_part import SnapshotPart |
11 | 14 | from .step_start_part import StepStartPart |
12 | 15 | from .step_finish_part import StepFinishPart |
13 | 16 |
|
14 | | -__all__ = ["Part"] |
| 17 | +__all__ = ["Part", "PatchPart"] |
| 18 | + |
| 19 | + |
| 20 | +class PatchPart(BaseModel): |
| 21 | + id: str |
| 22 | + |
| 23 | + files: List[str] |
| 24 | + |
| 25 | + hash: str |
| 26 | + |
| 27 | + message_id: str = FieldInfo(alias="messageID") |
| 28 | + |
| 29 | + session_id: str = FieldInfo(alias="sessionID") |
| 30 | + |
| 31 | + type: Literal["patch"] |
| 32 | + |
15 | 33 |
|
16 | 34 | Part: TypeAlias = Annotated[ |
17 | | - Union[TextPart, FilePart, ToolPart, StepStartPart, StepFinishPart, SnapshotPart], PropertyInfo(discriminator="type") |
| 35 | + Union[TextPart, FilePart, ToolPart, StepStartPart, StepFinishPart, SnapshotPart, PatchPart], |
| 36 | + PropertyInfo(discriminator="type"), |
18 | 37 | ] |
0 commit comments