Skip to content

Commit 1c3e7a0

Browse files
feat(api): manual updates
1 parent d2120d4 commit 1c3e7a0

File tree

9 files changed

+14
-230
lines changed

9 files changed

+14
-230
lines changed

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 17
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-2eeb61205775c5997abf8154cd6f6fe81a1e83870eff10050b17ed415aa7860b.yml
3-
openapi_spec_hash: 63405add4a3f53718f8183cbb8c1a22f
1+
configured_endpoints: 16
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-ff8ccba8b5409eaa1128df9027582cb63f66e8accd75e511f70b7c27ef26c9ae.yml
3+
openapi_spec_hash: 1dbacc339695a7c78718f90f791d3f01
44
config_hash: 00ec9df250b9dc077f8d3b93a442d252

api.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ from kernel.types import (
1313
DeploymentStateEvent,
1414
DeploymentCreateResponse,
1515
DeploymentRetrieveResponse,
16-
DeploymentListResponse,
1716
DeploymentFollowResponse,
1817
)
1918
```
@@ -22,7 +21,6 @@ Methods:
2221

2322
- <code title="post /deployments">client.deployments.<a href="./src/kernel/resources/deployments.py">create</a>(\*\*<a href="src/kernel/types/deployment_create_params.py">params</a>) -> <a href="./src/kernel/types/deployment_create_response.py">DeploymentCreateResponse</a></code>
2423
- <code title="get /deployments/{id}">client.deployments.<a href="./src/kernel/resources/deployments.py">retrieve</a>(id) -> <a href="./src/kernel/types/deployment_retrieve_response.py">DeploymentRetrieveResponse</a></code>
25-
- <code title="get /deployments">client.deployments.<a href="./src/kernel/resources/deployments.py">list</a>(\*\*<a href="src/kernel/types/deployment_list_params.py">params</a>) -> <a href="./src/kernel/types/deployment_list_response.py">DeploymentListResponse</a></code>
2624
- <code title="get /deployments/{id}/events">client.deployments.<a href="./src/kernel/resources/deployments.py">follow</a>(id, \*\*<a href="src/kernel/types/deployment_follow_params.py">params</a>) -> <a href="./src/kernel/types/deployment_follow_response.py">DeploymentFollowResponse</a></code>
2725

2826
# Apps

src/kernel/resources/deployments.py

Lines changed: 1 addition & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import httpx
99

10-
from ..types import deployment_list_params, deployment_create_params, deployment_follow_params
10+
from ..types import deployment_create_params, deployment_follow_params
1111
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes
1212
from .._utils import extract_files, maybe_transform, deepcopy_minimal, async_maybe_transform
1313
from .._compat import cached_property
@@ -20,7 +20,6 @@
2020
)
2121
from .._streaming import Stream, AsyncStream
2222
from .._base_client import make_request_options
23-
from ..types.deployment_list_response import DeploymentListResponse
2423
from ..types.deployment_create_response import DeploymentCreateResponse
2524
from ..types.deployment_follow_response import DeploymentFollowResponse
2625
from ..types.deployment_retrieve_response import DeploymentRetrieveResponse
@@ -147,44 +146,6 @@ def retrieve(
147146
cast_to=DeploymentRetrieveResponse,
148147
)
149148

150-
def list(
151-
self,
152-
*,
153-
app_name: str | NotGiven = NOT_GIVEN,
154-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
155-
# The extra values given here take precedence over values defined on the client or passed to this method.
156-
extra_headers: Headers | None = None,
157-
extra_query: Query | None = None,
158-
extra_body: Body | None = None,
159-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
160-
) -> DeploymentListResponse:
161-
"""List deployments.
162-
163-
Optionally filter by application name.
164-
165-
Args:
166-
app_name: Filter results by application name.
167-
168-
extra_headers: Send extra headers
169-
170-
extra_query: Add additional query parameters to the request
171-
172-
extra_body: Add additional JSON properties to the request
173-
174-
timeout: Override the client-level default timeout for this request, in seconds
175-
"""
176-
return self._get(
177-
"/deployments",
178-
options=make_request_options(
179-
extra_headers=extra_headers,
180-
extra_query=extra_query,
181-
extra_body=extra_body,
182-
timeout=timeout,
183-
query=maybe_transform({"app_name": app_name}, deployment_list_params.DeploymentListParams),
184-
),
185-
cast_to=DeploymentListResponse,
186-
)
187-
188149
def follow(
189150
self,
190151
id: str,
@@ -352,44 +313,6 @@ async def retrieve(
352313
cast_to=DeploymentRetrieveResponse,
353314
)
354315

355-
async def list(
356-
self,
357-
*,
358-
app_name: str | NotGiven = NOT_GIVEN,
359-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
360-
# The extra values given here take precedence over values defined on the client or passed to this method.
361-
extra_headers: Headers | None = None,
362-
extra_query: Query | None = None,
363-
extra_body: Body | None = None,
364-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
365-
) -> DeploymentListResponse:
366-
"""List deployments.
367-
368-
Optionally filter by application name.
369-
370-
Args:
371-
app_name: Filter results by application name.
372-
373-
extra_headers: Send extra headers
374-
375-
extra_query: Add additional query parameters to the request
376-
377-
extra_body: Add additional JSON properties to the request
378-
379-
timeout: Override the client-level default timeout for this request, in seconds
380-
"""
381-
return await self._get(
382-
"/deployments",
383-
options=make_request_options(
384-
extra_headers=extra_headers,
385-
extra_query=extra_query,
386-
extra_body=extra_body,
387-
timeout=timeout,
388-
query=await async_maybe_transform({"app_name": app_name}, deployment_list_params.DeploymentListParams),
389-
),
390-
cast_to=DeploymentListResponse,
391-
)
392-
393316
async def follow(
394317
self,
395318
id: str,
@@ -448,9 +371,6 @@ def __init__(self, deployments: DeploymentsResource) -> None:
448371
self.retrieve = to_raw_response_wrapper(
449372
deployments.retrieve,
450373
)
451-
self.list = to_raw_response_wrapper(
452-
deployments.list,
453-
)
454374
self.follow = to_raw_response_wrapper(
455375
deployments.follow,
456376
)
@@ -466,9 +386,6 @@ def __init__(self, deployments: AsyncDeploymentsResource) -> None:
466386
self.retrieve = async_to_raw_response_wrapper(
467387
deployments.retrieve,
468388
)
469-
self.list = async_to_raw_response_wrapper(
470-
deployments.list,
471-
)
472389
self.follow = async_to_raw_response_wrapper(
473390
deployments.follow,
474391
)
@@ -484,9 +401,6 @@ def __init__(self, deployments: DeploymentsResource) -> None:
484401
self.retrieve = to_streamed_response_wrapper(
485402
deployments.retrieve,
486403
)
487-
self.list = to_streamed_response_wrapper(
488-
deployments.list,
489-
)
490404
self.follow = to_streamed_response_wrapper(
491405
deployments.follow,
492406
)
@@ -502,9 +416,6 @@ def __init__(self, deployments: AsyncDeploymentsResource) -> None:
502416
self.retrieve = async_to_streamed_response_wrapper(
503417
deployments.retrieve,
504418
)
505-
self.list = async_to_streamed_response_wrapper(
506-
deployments.list,
507-
)
508419
self.follow = async_to_streamed_response_wrapper(
509420
deployments.follow,
510421
)

src/kernel/types/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,11 @@
1616
from .browser_create_params import BrowserCreateParams as BrowserCreateParams
1717
from .browser_delete_params import BrowserDeleteParams as BrowserDeleteParams
1818
from .browser_list_response import BrowserListResponse as BrowserListResponse
19-
from .deployment_list_params import DeploymentListParams as DeploymentListParams
2019
from .deployment_state_event import DeploymentStateEvent as DeploymentStateEvent
2120
from .invocation_state_event import InvocationStateEvent as InvocationStateEvent
2221
from .browser_create_response import BrowserCreateResponse as BrowserCreateResponse
2322
from .deployment_create_params import DeploymentCreateParams as DeploymentCreateParams
2423
from .deployment_follow_params import DeploymentFollowParams as DeploymentFollowParams
25-
from .deployment_list_response import DeploymentListResponse as DeploymentListResponse
2624
from .invocation_create_params import InvocationCreateParams as InvocationCreateParams
2725
from .invocation_update_params import InvocationUpdateParams as InvocationUpdateParams
2826
from .browser_persistence_param import BrowserPersistenceParam as BrowserPersistenceParam

src/kernel/types/app_list_response.py

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

3-
from typing import Dict, List
3+
from typing import Dict, List, Optional
44
from typing_extensions import Literal, TypeAlias
55

66
from .._models import BaseModel
7-
from .shared.app_action import AppAction
87

98
__all__ = ["AppListResponse", "AppListResponseItem"]
109

@@ -13,23 +12,20 @@ class AppListResponseItem(BaseModel):
1312
id: str
1413
"""Unique identifier for the app version"""
1514

16-
actions: List[AppAction]
17-
"""List of actions available on the app"""
18-
1915
app_name: str
2016
"""Name of the application"""
2117

2218
deployment: str
2319
"""Deployment ID"""
2420

25-
env_vars: Dict[str, str]
26-
"""Environment variables configured for this app version"""
27-
2821
region: Literal["aws.us-east-1a"]
2922
"""Deployment region code"""
3023

3124
version: str
3225
"""Version label for the application"""
3326

27+
env_vars: Optional[Dict[str, str]] = None
28+
"""Environment variables configured for this app version"""
29+
3430

3531
AppListResponse: TypeAlias = List[AppListResponseItem]

src/kernel/types/apps/deployment_create_response.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@
44
from typing_extensions import Literal
55

66
from ..._models import BaseModel
7-
from ..shared.app_action import AppAction
87

9-
__all__ = ["DeploymentCreateResponse", "App"]
8+
__all__ = ["DeploymentCreateResponse", "App", "AppAction"]
9+
10+
11+
class AppAction(BaseModel):
12+
name: str
13+
"""Name of the action"""
1014

1115

1216
class App(BaseModel):

src/kernel/types/deployment_list_params.py

Lines changed: 0 additions & 12 deletions
This file was deleted.

src/kernel/types/deployment_list_response.py

Lines changed: 0 additions & 38 deletions
This file was deleted.

tests/api_resources/test_deployments.py

Lines changed: 0 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
from kernel import Kernel, AsyncKernel
1111
from tests.utils import assert_matches_type
1212
from kernel.types import (
13-
DeploymentListResponse,
1413
DeploymentCreateResponse,
1514
DeploymentRetrieveResponse,
1615
)
@@ -113,42 +112,6 @@ def test_path_params_retrieve(self, client: Kernel) -> None:
113112
"",
114113
)
115114

116-
@pytest.mark.skip()
117-
@parametrize
118-
def test_method_list(self, client: Kernel) -> None:
119-
deployment = client.deployments.list()
120-
assert_matches_type(DeploymentListResponse, deployment, path=["response"])
121-
122-
@pytest.mark.skip()
123-
@parametrize
124-
def test_method_list_with_all_params(self, client: Kernel) -> None:
125-
deployment = client.deployments.list(
126-
app_name="app_name",
127-
)
128-
assert_matches_type(DeploymentListResponse, deployment, path=["response"])
129-
130-
@pytest.mark.skip()
131-
@parametrize
132-
def test_raw_response_list(self, client: Kernel) -> None:
133-
response = client.deployments.with_raw_response.list()
134-
135-
assert response.is_closed is True
136-
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
137-
deployment = response.parse()
138-
assert_matches_type(DeploymentListResponse, deployment, path=["response"])
139-
140-
@pytest.mark.skip()
141-
@parametrize
142-
def test_streaming_response_list(self, client: Kernel) -> None:
143-
with client.deployments.with_streaming_response.list() as response:
144-
assert not response.is_closed
145-
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
146-
147-
deployment = response.parse()
148-
assert_matches_type(DeploymentListResponse, deployment, path=["response"])
149-
150-
assert cast(Any, response.is_closed) is True
151-
152115
@pytest.mark.skip(
153116
reason="currently no good way to test endpoints with content type text/event-stream, Prism mock server will fail"
154117
)
@@ -307,42 +270,6 @@ async def test_path_params_retrieve(self, async_client: AsyncKernel) -> None:
307270
"",
308271
)
309272

310-
@pytest.mark.skip()
311-
@parametrize
312-
async def test_method_list(self, async_client: AsyncKernel) -> None:
313-
deployment = await async_client.deployments.list()
314-
assert_matches_type(DeploymentListResponse, deployment, path=["response"])
315-
316-
@pytest.mark.skip()
317-
@parametrize
318-
async def test_method_list_with_all_params(self, async_client: AsyncKernel) -> None:
319-
deployment = await async_client.deployments.list(
320-
app_name="app_name",
321-
)
322-
assert_matches_type(DeploymentListResponse, deployment, path=["response"])
323-
324-
@pytest.mark.skip()
325-
@parametrize
326-
async def test_raw_response_list(self, async_client: AsyncKernel) -> None:
327-
response = await async_client.deployments.with_raw_response.list()
328-
329-
assert response.is_closed is True
330-
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
331-
deployment = await response.parse()
332-
assert_matches_type(DeploymentListResponse, deployment, path=["response"])
333-
334-
@pytest.mark.skip()
335-
@parametrize
336-
async def test_streaming_response_list(self, async_client: AsyncKernel) -> None:
337-
async with async_client.deployments.with_streaming_response.list() as response:
338-
assert not response.is_closed
339-
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
340-
341-
deployment = await response.parse()
342-
assert_matches_type(DeploymentListResponse, deployment, path=["response"])
343-
344-
assert cast(Any, response.is_closed) is True
345-
346273
@pytest.mark.skip(
347274
reason="currently no good way to test endpoints with content type text/event-stream, Prism mock server will fail"
348275
)

0 commit comments

Comments
 (0)