Skip to content

Commit 7b9f2fa

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): OpenAPI spec update via Stainless API (#151)
1 parent 0017597 commit 7b9f2fa

5 files changed

Lines changed: 29 additions & 3 deletions

File tree

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 26
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-91bc3d0eb0278e1a1cd12cf2bf252f02cebe5a4b8a6b09f0be986e83c82c432a.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-4a74eb49b9d15dec7e60238642fa01af39359b0b6b3a56306d5c3482c7c7af82.yml

src/runloop_api_client/resources/devboxes/logs.py

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ def list(
3838
id: str,
3939
*,
4040
execution_id: str | NotGiven = NOT_GIVEN,
41+
shell_name: str | NotGiven = NOT_GIVEN,
4142
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
4243
# The extra values given here take precedence over values defined on the client or passed to this method.
4344
extra_headers: Headers | None = None,
@@ -51,6 +52,8 @@ def list(
5152
Args:
5253
execution_id: Id of execution to filter logs by.
5354
55+
shell_name: Shell Name to filter logs by.
56+
5457
extra_headers: Send extra headers
5558
5659
extra_query: Add additional query parameters to the request
@@ -68,7 +71,13 @@ def list(
6871
extra_query=extra_query,
6972
extra_body=extra_body,
7073
timeout=timeout,
71-
query=maybe_transform({"execution_id": execution_id}, log_list_params.LogListParams),
74+
query=maybe_transform(
75+
{
76+
"execution_id": execution_id,
77+
"shell_name": shell_name,
78+
},
79+
log_list_params.LogListParams,
80+
),
7281
),
7382
cast_to=DevboxLogsListView,
7483
)
@@ -88,6 +97,7 @@ async def list(
8897
id: str,
8998
*,
9099
execution_id: str | NotGiven = NOT_GIVEN,
100+
shell_name: str | NotGiven = NOT_GIVEN,
91101
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
92102
# The extra values given here take precedence over values defined on the client or passed to this method.
93103
extra_headers: Headers | None = None,
@@ -101,6 +111,8 @@ async def list(
101111
Args:
102112
execution_id: Id of execution to filter logs by.
103113
114+
shell_name: Shell Name to filter logs by.
115+
104116
extra_headers: Send extra headers
105117
106118
extra_query: Add additional query parameters to the request
@@ -118,7 +130,13 @@ async def list(
118130
extra_query=extra_query,
119131
extra_body=extra_body,
120132
timeout=timeout,
121-
query=await async_maybe_transform({"execution_id": execution_id}, log_list_params.LogListParams),
133+
query=await async_maybe_transform(
134+
{
135+
"execution_id": execution_id,
136+
"shell_name": shell_name,
137+
},
138+
log_list_params.LogListParams,
139+
),
122140
),
123141
cast_to=DevboxLogsListView,
124142
)

src/runloop_api_client/types/devboxes/devbox_logs_list_view.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ class Log(BaseModel):
2424
message: Optional[str] = None
2525
"""Log line message."""
2626

27+
shell_name: Optional[str] = None
28+
"""The Shell name the cmd executed in."""
29+
2730
source: Optional[Literal["setup_commands", "entrypoint", "exec"]] = None
2831
"""The source of the log."""
2932

src/runloop_api_client/types/devboxes/log_list_params.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@
1010
class LogListParams(TypedDict, total=False):
1111
execution_id: str
1212
"""Id of execution to filter logs by."""
13+
14+
shell_name: str
15+
"""Shell Name to filter logs by."""

tests/api_resources/devboxes/test_logs.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ def test_method_list_with_all_params(self, client: Runloop) -> None:
2929
log = client.devboxes.logs.list(
3030
id="id",
3131
execution_id="execution_id",
32+
shell_name="shell_name",
3233
)
3334
assert_matches_type(DevboxLogsListView, log, path=["response"])
3435

@@ -79,6 +80,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncRunloop) ->
7980
log = await async_client.devboxes.logs.list(
8081
id="id",
8182
execution_id="execution_id",
83+
shell_name="shell_name",
8284
)
8385
assert_matches_type(DevboxLogsListView, log, path=["response"])
8486

0 commit comments

Comments
 (0)