Skip to content

Commit d26c519

Browse files
feat(api): update via SDK Studio
1 parent ff07935 commit d26c519

File tree

8 files changed

+55
-67
lines changed

8 files changed

+55
-67
lines changed

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 15
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-5d4e11bc46eeecee7363d56a9dfe946acee997d5b352c2b0a50c20e742c54d2d.yml
3-
openapi_spec_hash: 333e53ad9c706296b9afdb8ff73bec8f
4-
config_hash: 4e2f9aebc2153d5caf7bb8b2eb107026
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-b1b412b00906fca75bfa73cff7267dbb5bf975581778072e0a90c73ad7ba9cb1.yml
3+
openapi_spec_hash: 9b7a1b29bcb4963fe6da37005c357d27
4+
config_hash: df959c379e1145106030a4869b006afe

api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Shared Types
22

33
```python
4-
from kernel.types import ErrorDetail, LogEvent
4+
from kernel.types import Error, ErrorDetail, ErrorEvent, LogEvent
55
```
66

77
# Deployments

src/kernel/types/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from .shared import LogEvent as LogEvent, ErrorDetail as ErrorDetail
5+
from .shared import Error as Error, LogEvent as LogEvent, ErrorEvent as ErrorEvent, ErrorDetail as ErrorDetail
66
from .app_list_params import AppListParams as AppListParams
77
from .app_list_response import AppListResponse as AppListResponse
88
from .browser_persistence import BrowserPersistence as BrowserPersistence

src/kernel/types/deployment_follow_response.py

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,10 @@
77
from .._utils import PropertyInfo
88
from .._models import BaseModel
99
from .shared.log_event import LogEvent
10-
from .shared.error_detail import ErrorDetail
10+
from .shared.error_event import ErrorEvent
1111
from .deployment_state_event import DeploymentStateEvent
1212

13-
__all__ = [
14-
"DeploymentFollowResponse",
15-
"AppVersionSummaryEvent",
16-
"AppVersionSummaryEventAction",
17-
"ErrorEvent",
18-
"ErrorEventError",
19-
]
13+
__all__ = ["DeploymentFollowResponse", "AppVersionSummaryEvent", "AppVersionSummaryEventAction"]
2014

2115

2216
class AppVersionSummaryEventAction(BaseModel):
@@ -50,29 +44,6 @@ class AppVersionSummaryEvent(BaseModel):
5044
"""Environment variables configured for this app version"""
5145

5246

53-
class ErrorEventError(BaseModel):
54-
code: str
55-
"""Application-specific error code (machine-readable)"""
56-
57-
message: str
58-
"""Human-readable error description for debugging"""
59-
60-
details: Optional[List[ErrorDetail]] = None
61-
"""Additional error details (for multiple errors)"""
62-
63-
inner_error: Optional[ErrorDetail] = None
64-
65-
66-
class ErrorEvent(BaseModel):
67-
error: ErrorEventError
68-
69-
event: Literal["error"]
70-
"""Event type identifier (always "error")."""
71-
72-
timestamp: datetime
73-
"""Time the error occurred."""
74-
75-
7647
DeploymentFollowResponse: TypeAlias = Annotated[
7748
Union[LogEvent, DeploymentStateEvent, AppVersionSummaryEvent, ErrorEvent], PropertyInfo(discriminator="event")
7849
]
Lines changed: 6 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,16 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

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
65

76
from .._utils import PropertyInfo
8-
from .._models import BaseModel
97
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
1110
from .invocation_state_event import InvocationStateEvent
1211

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"]
3813

3914
InvocationFollowResponse: TypeAlias = Annotated[
40-
Union[LogEvent, InvocationStateEvent, ErrorEvent], PropertyInfo(discriminator="event")
15+
Union[LogEvent, DeploymentStateEvent, InvocationStateEvent, ErrorEvent], PropertyInfo(discriminator="event")
4116
]

src/kernel/types/shared/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3+
from .error import Error as Error
34
from .log_event import LogEvent as LogEvent
5+
from .error_event import ErrorEvent as ErrorEvent
46
from .error_detail import ErrorDetail as ErrorDetail

src/kernel/types/shared/error.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from typing import List, Optional
4+
5+
from ..._models import BaseModel
6+
from .error_detail import ErrorDetail
7+
8+
__all__ = ["Error"]
9+
10+
11+
class Error(BaseModel):
12+
code: str
13+
"""Application-specific error code (machine-readable)"""
14+
15+
message: str
16+
"""Human-readable error description for debugging"""
17+
18+
details: Optional[List[ErrorDetail]] = None
19+
"""Additional error details (for multiple errors)"""
20+
21+
inner_error: Optional[ErrorDetail] = None
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from datetime import datetime
4+
from typing_extensions import Literal
5+
6+
from .error import Error
7+
from ..._models import BaseModel
8+
9+
__all__ = ["ErrorEvent"]
10+
11+
12+
class ErrorEvent(BaseModel):
13+
error: Error
14+
15+
event: Literal["error"]
16+
"""Event type identifier (always "error")."""
17+
18+
timestamp: datetime
19+
"""Time the error occurred."""

0 commit comments

Comments
 (0)