Skip to content

Commit ff07935

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

23 files changed

+474
-185
lines changed

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 14
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-f7fa782f119b02d610bac1dbc75bf8355e73169d978997527f643e24036dabdd.yml
3-
openapi_spec_hash: 9543dfe156b1c42a2fe4d3767e6b0778
4-
config_hash: a085d1b39ddf0b26ee798501a9f47e20
1+
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

api.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
1+
# Shared Types
2+
3+
```python
4+
from kernel.types import ErrorDetail, LogEvent
5+
```
6+
17
# Deployments
28

39
Types:
410

511
```python
612
from kernel.types import (
13+
DeploymentStateEvent,
714
DeploymentCreateResponse,
815
DeploymentRetrieveResponse,
916
DeploymentFollowResponse,
@@ -41,23 +48,26 @@ Methods:
4148
- <code title="post /deploy">client.apps.deployments.<a href="./src/kernel/resources/apps/deployments.py">create</a>(\*\*<a href="src/kernel/types/apps/deployment_create_params.py">params</a>) -> <a href="./src/kernel/types/apps/deployment_create_response.py">DeploymentCreateResponse</a></code>
4249
- <code title="get /apps/{id}/events">client.apps.deployments.<a href="./src/kernel/resources/apps/deployments.py">follow</a>(id) -> <a href="./src/kernel/types/apps/deployment_follow_response.py">DeploymentFollowResponse</a></code>
4350

44-
## Invocations
51+
# Invocations
4552

4653
Types:
4754

4855
```python
49-
from kernel.types.apps import (
56+
from kernel.types import (
57+
InvocationStateEvent,
5058
InvocationCreateResponse,
5159
InvocationRetrieveResponse,
5260
InvocationUpdateResponse,
61+
InvocationFollowResponse,
5362
)
5463
```
5564

5665
Methods:
5766

58-
- <code title="post /invocations">client.apps.invocations.<a href="./src/kernel/resources/apps/invocations.py">create</a>(\*\*<a href="src/kernel/types/apps/invocation_create_params.py">params</a>) -> <a href="./src/kernel/types/apps/invocation_create_response.py">InvocationCreateResponse</a></code>
59-
- <code title="get /invocations/{id}">client.apps.invocations.<a href="./src/kernel/resources/apps/invocations.py">retrieve</a>(id) -> <a href="./src/kernel/types/apps/invocation_retrieve_response.py">InvocationRetrieveResponse</a></code>
60-
- <code title="patch /invocations/{id}">client.apps.invocations.<a href="./src/kernel/resources/apps/invocations.py">update</a>(id, \*\*<a href="src/kernel/types/apps/invocation_update_params.py">params</a>) -> <a href="./src/kernel/types/apps/invocation_update_response.py">InvocationUpdateResponse</a></code>
67+
- <code title="post /invocations">client.invocations.<a href="./src/kernel/resources/invocations.py">create</a>(\*\*<a href="src/kernel/types/invocation_create_params.py">params</a>) -> <a href="./src/kernel/types/invocation_create_response.py">InvocationCreateResponse</a></code>
68+
- <code title="get /invocations/{id}">client.invocations.<a href="./src/kernel/resources/invocations.py">retrieve</a>(id) -> <a href="./src/kernel/types/invocation_retrieve_response.py">InvocationRetrieveResponse</a></code>
69+
- <code title="patch /invocations/{id}">client.invocations.<a href="./src/kernel/resources/invocations.py">update</a>(id, \*\*<a href="src/kernel/types/invocation_update_params.py">params</a>) -> <a href="./src/kernel/types/invocation_update_response.py">InvocationUpdateResponse</a></code>
70+
- <code title="get /invocations/{id}/events">client.invocations.<a href="./src/kernel/resources/invocations.py">follow</a>(id) -> <a href="./src/kernel/types/invocation_follow_response.py">InvocationFollowResponse</a></code>
6171

6272
# Browsers
6373

src/kernel/_client.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
)
2222
from ._utils import is_given, get_async_library
2323
from ._version import __version__
24-
from .resources import browsers, deployments
24+
from .resources import browsers, deployments, invocations
2525
from ._streaming import Stream as Stream, AsyncStream as AsyncStream
2626
from ._exceptions import KernelError, APIStatusError
2727
from ._base_client import (
@@ -52,6 +52,7 @@
5252
class Kernel(SyncAPIClient):
5353
deployments: deployments.DeploymentsResource
5454
apps: apps.AppsResource
55+
invocations: invocations.InvocationsResource
5556
browsers: browsers.BrowsersResource
5657
with_raw_response: KernelWithRawResponse
5758
with_streaming_response: KernelWithStreamedResponse
@@ -136,6 +137,7 @@ def __init__(
136137

137138
self.deployments = deployments.DeploymentsResource(self)
138139
self.apps = apps.AppsResource(self)
140+
self.invocations = invocations.InvocationsResource(self)
139141
self.browsers = browsers.BrowsersResource(self)
140142
self.with_raw_response = KernelWithRawResponse(self)
141143
self.with_streaming_response = KernelWithStreamedResponse(self)
@@ -250,6 +252,7 @@ def _make_status_error(
250252
class AsyncKernel(AsyncAPIClient):
251253
deployments: deployments.AsyncDeploymentsResource
252254
apps: apps.AsyncAppsResource
255+
invocations: invocations.AsyncInvocationsResource
253256
browsers: browsers.AsyncBrowsersResource
254257
with_raw_response: AsyncKernelWithRawResponse
255258
with_streaming_response: AsyncKernelWithStreamedResponse
@@ -334,6 +337,7 @@ def __init__(
334337

335338
self.deployments = deployments.AsyncDeploymentsResource(self)
336339
self.apps = apps.AsyncAppsResource(self)
340+
self.invocations = invocations.AsyncInvocationsResource(self)
337341
self.browsers = browsers.AsyncBrowsersResource(self)
338342
self.with_raw_response = AsyncKernelWithRawResponse(self)
339343
self.with_streaming_response = AsyncKernelWithStreamedResponse(self)
@@ -449,27 +453,31 @@ class KernelWithRawResponse:
449453
def __init__(self, client: Kernel) -> None:
450454
self.deployments = deployments.DeploymentsResourceWithRawResponse(client.deployments)
451455
self.apps = apps.AppsResourceWithRawResponse(client.apps)
456+
self.invocations = invocations.InvocationsResourceWithRawResponse(client.invocations)
452457
self.browsers = browsers.BrowsersResourceWithRawResponse(client.browsers)
453458

454459

455460
class AsyncKernelWithRawResponse:
456461
def __init__(self, client: AsyncKernel) -> None:
457462
self.deployments = deployments.AsyncDeploymentsResourceWithRawResponse(client.deployments)
458463
self.apps = apps.AsyncAppsResourceWithRawResponse(client.apps)
464+
self.invocations = invocations.AsyncInvocationsResourceWithRawResponse(client.invocations)
459465
self.browsers = browsers.AsyncBrowsersResourceWithRawResponse(client.browsers)
460466

461467

462468
class KernelWithStreamedResponse:
463469
def __init__(self, client: Kernel) -> None:
464470
self.deployments = deployments.DeploymentsResourceWithStreamingResponse(client.deployments)
465471
self.apps = apps.AppsResourceWithStreamingResponse(client.apps)
472+
self.invocations = invocations.InvocationsResourceWithStreamingResponse(client.invocations)
466473
self.browsers = browsers.BrowsersResourceWithStreamingResponse(client.browsers)
467474

468475

469476
class AsyncKernelWithStreamedResponse:
470477
def __init__(self, client: AsyncKernel) -> None:
471478
self.deployments = deployments.AsyncDeploymentsResourceWithStreamingResponse(client.deployments)
472479
self.apps = apps.AsyncAppsResourceWithStreamingResponse(client.apps)
480+
self.invocations = invocations.AsyncInvocationsResourceWithStreamingResponse(client.invocations)
473481
self.browsers = browsers.AsyncBrowsersResourceWithStreamingResponse(client.browsers)
474482

475483

src/kernel/resources/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@
2424
DeploymentsResourceWithStreamingResponse,
2525
AsyncDeploymentsResourceWithStreamingResponse,
2626
)
27+
from .invocations import (
28+
InvocationsResource,
29+
AsyncInvocationsResource,
30+
InvocationsResourceWithRawResponse,
31+
AsyncInvocationsResourceWithRawResponse,
32+
InvocationsResourceWithStreamingResponse,
33+
AsyncInvocationsResourceWithStreamingResponse,
34+
)
2735

2836
__all__ = [
2937
"DeploymentsResource",
@@ -38,6 +46,12 @@
3846
"AsyncAppsResourceWithRawResponse",
3947
"AppsResourceWithStreamingResponse",
4048
"AsyncAppsResourceWithStreamingResponse",
49+
"InvocationsResource",
50+
"AsyncInvocationsResource",
51+
"InvocationsResourceWithRawResponse",
52+
"AsyncInvocationsResourceWithRawResponse",
53+
"InvocationsResourceWithStreamingResponse",
54+
"AsyncInvocationsResourceWithStreamingResponse",
4155
"BrowsersResource",
4256
"AsyncBrowsersResource",
4357
"BrowsersResourceWithRawResponse",

src/kernel/resources/apps/__init__.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,6 @@
1616
DeploymentsResourceWithStreamingResponse,
1717
AsyncDeploymentsResourceWithStreamingResponse,
1818
)
19-
from .invocations import (
20-
InvocationsResource,
21-
AsyncInvocationsResource,
22-
InvocationsResourceWithRawResponse,
23-
AsyncInvocationsResourceWithRawResponse,
24-
InvocationsResourceWithStreamingResponse,
25-
AsyncInvocationsResourceWithStreamingResponse,
26-
)
2719

2820
__all__ = [
2921
"DeploymentsResource",
@@ -32,12 +24,6 @@
3224
"AsyncDeploymentsResourceWithRawResponse",
3325
"DeploymentsResourceWithStreamingResponse",
3426
"AsyncDeploymentsResourceWithStreamingResponse",
35-
"InvocationsResource",
36-
"AsyncInvocationsResource",
37-
"InvocationsResourceWithRawResponse",
38-
"AsyncInvocationsResourceWithRawResponse",
39-
"InvocationsResourceWithStreamingResponse",
40-
"AsyncInvocationsResourceWithStreamingResponse",
4127
"AppsResource",
4228
"AsyncAppsResource",
4329
"AppsResourceWithRawResponse",

src/kernel/resources/apps/apps.py

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,6 @@
2323
DeploymentsResourceWithStreamingResponse,
2424
AsyncDeploymentsResourceWithStreamingResponse,
2525
)
26-
from .invocations import (
27-
InvocationsResource,
28-
AsyncInvocationsResource,
29-
InvocationsResourceWithRawResponse,
30-
AsyncInvocationsResourceWithRawResponse,
31-
InvocationsResourceWithStreamingResponse,
32-
AsyncInvocationsResourceWithStreamingResponse,
33-
)
3426
from ..._base_client import make_request_options
3527
from ...types.app_list_response import AppListResponse
3628

@@ -42,10 +34,6 @@ class AppsResource(SyncAPIResource):
4234
def deployments(self) -> DeploymentsResource:
4335
return DeploymentsResource(self._client)
4436

45-
@cached_property
46-
def invocations(self) -> InvocationsResource:
47-
return InvocationsResource(self._client)
48-
4937
@cached_property
5038
def with_raw_response(self) -> AppsResourceWithRawResponse:
5139
"""
@@ -118,10 +106,6 @@ class AsyncAppsResource(AsyncAPIResource):
118106
def deployments(self) -> AsyncDeploymentsResource:
119107
return AsyncDeploymentsResource(self._client)
120108

121-
@cached_property
122-
def invocations(self) -> AsyncInvocationsResource:
123-
return AsyncInvocationsResource(self._client)
124-
125109
@cached_property
126110
def with_raw_response(self) -> AsyncAppsResourceWithRawResponse:
127111
"""
@@ -201,10 +185,6 @@ def __init__(self, apps: AppsResource) -> None:
201185
def deployments(self) -> DeploymentsResourceWithRawResponse:
202186
return DeploymentsResourceWithRawResponse(self._apps.deployments)
203187

204-
@cached_property
205-
def invocations(self) -> InvocationsResourceWithRawResponse:
206-
return InvocationsResourceWithRawResponse(self._apps.invocations)
207-
208188

209189
class AsyncAppsResourceWithRawResponse:
210190
def __init__(self, apps: AsyncAppsResource) -> None:
@@ -218,10 +198,6 @@ def __init__(self, apps: AsyncAppsResource) -> None:
218198
def deployments(self) -> AsyncDeploymentsResourceWithRawResponse:
219199
return AsyncDeploymentsResourceWithRawResponse(self._apps.deployments)
220200

221-
@cached_property
222-
def invocations(self) -> AsyncInvocationsResourceWithRawResponse:
223-
return AsyncInvocationsResourceWithRawResponse(self._apps.invocations)
224-
225201

226202
class AppsResourceWithStreamingResponse:
227203
def __init__(self, apps: AppsResource) -> None:
@@ -235,10 +211,6 @@ def __init__(self, apps: AppsResource) -> None:
235211
def deployments(self) -> DeploymentsResourceWithStreamingResponse:
236212
return DeploymentsResourceWithStreamingResponse(self._apps.deployments)
237213

238-
@cached_property
239-
def invocations(self) -> InvocationsResourceWithStreamingResponse:
240-
return InvocationsResourceWithStreamingResponse(self._apps.invocations)
241-
242214

243215
class AsyncAppsResourceWithStreamingResponse:
244216
def __init__(self, apps: AsyncAppsResource) -> None:
@@ -251,7 +223,3 @@ def __init__(self, apps: AsyncAppsResource) -> None:
251223
@cached_property
252224
def deployments(self) -> AsyncDeploymentsResourceWithStreamingResponse:
253225
return AsyncDeploymentsResourceWithStreamingResponse(self._apps.deployments)
254-
255-
@cached_property
256-
def invocations(self) -> AsyncInvocationsResourceWithStreamingResponse:
257-
return AsyncInvocationsResourceWithStreamingResponse(self._apps.invocations)

0 commit comments

Comments
 (0)