|
1 | 1 | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. |
2 | 2 |
|
3 | | -from typing import List, Union, Optional |
4 | | -from datetime import datetime |
5 | | -from typing_extensions import Literal, Annotated, TypeAlias |
| 3 | +from typing import Union |
| 4 | +from typing_extensions import Annotated, TypeAlias |
6 | 5 |
|
7 | 6 | from .._utils import PropertyInfo |
8 | | -from .._models import BaseModel |
9 | 7 | from .shared.log_event import LogEvent |
10 | | -from .shared.error_detail import ErrorDetail |
| 8 | +from .shared.error_event import ErrorEvent |
| 9 | +from .deployment_state_event import DeploymentStateEvent |
11 | 10 | from .invocation_state_event import InvocationStateEvent |
12 | 11 |
|
13 | | -__all__ = ["InvocationFollowResponse", "ErrorEvent", "ErrorEventError"] |
14 | | - |
15 | | - |
16 | | -class ErrorEventError(BaseModel): |
17 | | - code: str |
18 | | - """Application-specific error code (machine-readable)""" |
19 | | - |
20 | | - message: str |
21 | | - """Human-readable error description for debugging""" |
22 | | - |
23 | | - details: Optional[List[ErrorDetail]] = None |
24 | | - """Additional error details (for multiple errors)""" |
25 | | - |
26 | | - inner_error: Optional[ErrorDetail] = None |
27 | | - |
28 | | - |
29 | | -class ErrorEvent(BaseModel): |
30 | | - error: ErrorEventError |
31 | | - |
32 | | - event: Literal["error"] |
33 | | - """Event type identifier (always "error").""" |
34 | | - |
35 | | - timestamp: datetime |
36 | | - """Time the error occurred.""" |
37 | | - |
| 12 | +__all__ = ["InvocationFollowResponse"] |
38 | 13 |
|
39 | 14 | InvocationFollowResponse: TypeAlias = Annotated[ |
40 | | - Union[LogEvent, InvocationStateEvent, ErrorEvent], PropertyInfo(discriminator="event") |
| 15 | + Union[LogEvent, DeploymentStateEvent, InvocationStateEvent, ErrorEvent], PropertyInfo(discriminator="event") |
41 | 16 | ] |
0 commit comments