Skip to content

Commit 0017597

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

11 files changed

Lines changed: 101 additions & 9 deletions

.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-bf6b07b1a0ab706ec60c31ce84af006049328ea8a97483a4889ae8eedae1960d.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-91bc3d0eb0278e1a1cd12cf2bf252f02cebe5a4b8a6b09f0be986e83c82c432a.yml

src/runloop_api_client/resources/devboxes/devboxes.py

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ def execute_async(
276276
id: str,
277277
*,
278278
command: str | NotGiven = NOT_GIVEN,
279+
shell_name: str | NotGiven = NOT_GIVEN,
279280
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
280281
# The extra values given here take precedence over values defined on the client or passed to this method.
281282
extra_headers: Headers | None = None,
@@ -289,6 +290,8 @@ def execute_async(
289290
Args:
290291
command: The command to execute on the Devbox.
291292
293+
shell_name: Which named shell to run the command in.
294+
292295
extra_headers: Send extra headers
293296
294297
extra_query: Add additional query parameters to the request
@@ -301,7 +304,13 @@ def execute_async(
301304
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
302305
return self._post(
303306
f"/v1/devboxes/{id}/execute_async",
304-
body=maybe_transform({"command": command}, devbox_execute_async_params.DevboxExecuteAsyncParams),
307+
body=maybe_transform(
308+
{
309+
"command": command,
310+
"shell_name": shell_name,
311+
},
312+
devbox_execute_async_params.DevboxExecuteAsyncParams,
313+
),
305314
options=make_request_options(
306315
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
307316
),
@@ -313,6 +322,7 @@ def execute_sync(
313322
id: str,
314323
*,
315324
command: str | NotGiven = NOT_GIVEN,
325+
shell_name: str | NotGiven = NOT_GIVEN,
316326
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
317327
# The extra values given here take precedence over values defined on the client or passed to this method.
318328
extra_headers: Headers | None = None,
@@ -326,6 +336,8 @@ def execute_sync(
326336
Args:
327337
command: The command to execute on the Devbox.
328338
339+
shell_name: Which named shell to run the command in.
340+
329341
extra_headers: Send extra headers
330342
331343
extra_query: Add additional query parameters to the request
@@ -338,7 +350,13 @@ def execute_sync(
338350
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
339351
return self._post(
340352
f"/v1/devboxes/{id}/execute_sync",
341-
body=maybe_transform({"command": command}, devbox_execute_sync_params.DevboxExecuteSyncParams),
353+
body=maybe_transform(
354+
{
355+
"command": command,
356+
"shell_name": shell_name,
357+
},
358+
devbox_execute_sync_params.DevboxExecuteSyncParams,
359+
),
342360
options=make_request_options(
343361
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
344362
),
@@ -734,6 +752,7 @@ async def execute_async(
734752
id: str,
735753
*,
736754
command: str | NotGiven = NOT_GIVEN,
755+
shell_name: str | NotGiven = NOT_GIVEN,
737756
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
738757
# The extra values given here take precedence over values defined on the client or passed to this method.
739758
extra_headers: Headers | None = None,
@@ -747,6 +766,8 @@ async def execute_async(
747766
Args:
748767
command: The command to execute on the Devbox.
749768
769+
shell_name: Which named shell to run the command in.
770+
750771
extra_headers: Send extra headers
751772
752773
extra_query: Add additional query parameters to the request
@@ -760,7 +781,11 @@ async def execute_async(
760781
return await self._post(
761782
f"/v1/devboxes/{id}/execute_async",
762783
body=await async_maybe_transform(
763-
{"command": command}, devbox_execute_async_params.DevboxExecuteAsyncParams
784+
{
785+
"command": command,
786+
"shell_name": shell_name,
787+
},
788+
devbox_execute_async_params.DevboxExecuteAsyncParams,
764789
),
765790
options=make_request_options(
766791
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
@@ -773,6 +798,7 @@ async def execute_sync(
773798
id: str,
774799
*,
775800
command: str | NotGiven = NOT_GIVEN,
801+
shell_name: str | NotGiven = NOT_GIVEN,
776802
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
777803
# The extra values given here take precedence over values defined on the client or passed to this method.
778804
extra_headers: Headers | None = None,
@@ -786,6 +812,8 @@ async def execute_sync(
786812
Args:
787813
command: The command to execute on the Devbox.
788814
815+
shell_name: Which named shell to run the command in.
816+
789817
extra_headers: Send extra headers
790818
791819
extra_query: Add additional query parameters to the request
@@ -798,7 +826,13 @@ async def execute_sync(
798826
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
799827
return await self._post(
800828
f"/v1/devboxes/{id}/execute_sync",
801-
body=await async_maybe_transform({"command": command}, devbox_execute_sync_params.DevboxExecuteSyncParams),
829+
body=await async_maybe_transform(
830+
{
831+
"command": command,
832+
"shell_name": shell_name,
833+
},
834+
devbox_execute_sync_params.DevboxExecuteSyncParams,
835+
),
802836
options=make_request_options(
803837
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
804838
),

src/runloop_api_client/resources/devboxes/executions.py

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ def execute_async(
8282
id: str,
8383
*,
8484
command: str | NotGiven = NOT_GIVEN,
85+
shell_name: str | NotGiven = NOT_GIVEN,
8586
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
8687
# The extra values given here take precedence over values defined on the client or passed to this method.
8788
extra_headers: Headers | None = None,
@@ -95,6 +96,8 @@ def execute_async(
9596
Args:
9697
command: The command to execute on the Devbox.
9798
99+
shell_name: Which named shell to run the command in.
100+
98101
extra_headers: Send extra headers
99102
100103
extra_query: Add additional query parameters to the request
@@ -107,7 +110,13 @@ def execute_async(
107110
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
108111
return self._post(
109112
f"/v1/devboxes/{id}/execute_async",
110-
body=maybe_transform({"command": command}, execution_execute_async_params.ExecutionExecuteAsyncParams),
113+
body=maybe_transform(
114+
{
115+
"command": command,
116+
"shell_name": shell_name,
117+
},
118+
execution_execute_async_params.ExecutionExecuteAsyncParams,
119+
),
111120
options=make_request_options(
112121
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
113122
),
@@ -119,6 +128,7 @@ def execute_sync(
119128
id: str,
120129
*,
121130
command: str | NotGiven = NOT_GIVEN,
131+
shell_name: str | NotGiven = NOT_GIVEN,
122132
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
123133
# The extra values given here take precedence over values defined on the client or passed to this method.
124134
extra_headers: Headers | None = None,
@@ -132,6 +142,8 @@ def execute_sync(
132142
Args:
133143
command: The command to execute on the Devbox.
134144
145+
shell_name: Which named shell to run the command in.
146+
135147
extra_headers: Send extra headers
136148
137149
extra_query: Add additional query parameters to the request
@@ -144,7 +156,13 @@ def execute_sync(
144156
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
145157
return self._post(
146158
f"/v1/devboxes/{id}/execute_sync",
147-
body=maybe_transform({"command": command}, execution_execute_sync_params.ExecutionExecuteSyncParams),
159+
body=maybe_transform(
160+
{
161+
"command": command,
162+
"shell_name": shell_name,
163+
},
164+
execution_execute_sync_params.ExecutionExecuteSyncParams,
165+
),
148166
options=make_request_options(
149167
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
150168
),
@@ -247,6 +265,7 @@ async def execute_async(
247265
id: str,
248266
*,
249267
command: str | NotGiven = NOT_GIVEN,
268+
shell_name: str | NotGiven = NOT_GIVEN,
250269
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
251270
# The extra values given here take precedence over values defined on the client or passed to this method.
252271
extra_headers: Headers | None = None,
@@ -260,6 +279,8 @@ async def execute_async(
260279
Args:
261280
command: The command to execute on the Devbox.
262281
282+
shell_name: Which named shell to run the command in.
283+
263284
extra_headers: Send extra headers
264285
265286
extra_query: Add additional query parameters to the request
@@ -273,7 +294,11 @@ async def execute_async(
273294
return await self._post(
274295
f"/v1/devboxes/{id}/execute_async",
275296
body=await async_maybe_transform(
276-
{"command": command}, execution_execute_async_params.ExecutionExecuteAsyncParams
297+
{
298+
"command": command,
299+
"shell_name": shell_name,
300+
},
301+
execution_execute_async_params.ExecutionExecuteAsyncParams,
277302
),
278303
options=make_request_options(
279304
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
@@ -286,6 +311,7 @@ async def execute_sync(
286311
id: str,
287312
*,
288313
command: str | NotGiven = NOT_GIVEN,
314+
shell_name: str | NotGiven = NOT_GIVEN,
289315
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
290316
# The extra values given here take precedence over values defined on the client or passed to this method.
291317
extra_headers: Headers | None = None,
@@ -299,6 +325,8 @@ async def execute_sync(
299325
Args:
300326
command: The command to execute on the Devbox.
301327
328+
shell_name: Which named shell to run the command in.
329+
302330
extra_headers: Send extra headers
303331
304332
extra_query: Add additional query parameters to the request
@@ -312,7 +340,11 @@ async def execute_sync(
312340
return await self._post(
313341
f"/v1/devboxes/{id}/execute_sync",
314342
body=await async_maybe_transform(
315-
{"command": command}, execution_execute_sync_params.ExecutionExecuteSyncParams
343+
{
344+
"command": command,
345+
"shell_name": shell_name,
346+
},
347+
execution_execute_sync_params.ExecutionExecuteSyncParams,
316348
),
317349
options=make_request_options(
318350
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout

src/runloop_api_client/types/devbox_async_execution_detail_view.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ class DevboxAsyncExecutionDetailView(BaseModel):
2121
This field will remain unset until the execution has completed.
2222
"""
2323

24+
shell_name: Optional[str] = None
25+
"""Shell name."""
26+
2427
status: Optional[Literal["running", "completed", "canceled"]] = None
2528
"""Current status of the execution."""
2629

src/runloop_api_client/types/devbox_execute_async_params.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@
1010
class DevboxExecuteAsyncParams(TypedDict, total=False):
1111
command: str
1212
"""The command to execute on the Devbox."""
13+
14+
shell_name: str
15+
"""Which named shell to run the command in."""

src/runloop_api_client/types/devbox_execute_sync_params.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@
1010
class DevboxExecuteSyncParams(TypedDict, total=False):
1111
command: str
1212
"""The command to execute on the Devbox."""
13+
14+
shell_name: str
15+
"""Which named shell to run the command in."""

src/runloop_api_client/types/devbox_execution_detail_view.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ class DevboxExecutionDetailView(BaseModel):
1414
exit_status: Optional[int] = None
1515
"""Exit status of command execution."""
1616

17+
shell_name: Optional[str] = None
18+
"""Shell name."""
19+
1720
stderr: Optional[str] = None
1821
"""Standard error generated by command."""
1922

src/runloop_api_client/types/devboxes/execution_execute_async_params.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@
1010
class ExecutionExecuteAsyncParams(TypedDict, total=False):
1111
command: str
1212
"""The command to execute on the Devbox."""
13+
14+
shell_name: str
15+
"""Which named shell to run the command in."""

src/runloop_api_client/types/devboxes/execution_execute_sync_params.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@
1010
class ExecutionExecuteSyncParams(TypedDict, total=False):
1111
command: str
1212
"""The command to execute on the Devbox."""
13+
14+
shell_name: str
15+
"""Which named shell to run the command in."""

tests/api_resources/devboxes/test_executions.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ def test_method_execute_async_with_all_params(self, client: Runloop) -> None:
8686
execution = client.devboxes.executions.execute_async(
8787
id="id",
8888
command="command",
89+
shell_name="shell_name",
8990
)
9091
assert_matches_type(DevboxAsyncExecutionDetailView, execution, path=["response"])
9192

@@ -132,6 +133,7 @@ def test_method_execute_sync_with_all_params(self, client: Runloop) -> None:
132133
execution = client.devboxes.executions.execute_sync(
133134
id="id",
134135
command="command",
136+
shell_name="shell_name",
135137
)
136138
assert_matches_type(DevboxExecutionDetailView, execution, path=["response"])
137139

@@ -287,6 +289,7 @@ async def test_method_execute_async_with_all_params(self, async_client: AsyncRun
287289
execution = await async_client.devboxes.executions.execute_async(
288290
id="id",
289291
command="command",
292+
shell_name="shell_name",
290293
)
291294
assert_matches_type(DevboxAsyncExecutionDetailView, execution, path=["response"])
292295

@@ -333,6 +336,7 @@ async def test_method_execute_sync_with_all_params(self, async_client: AsyncRunl
333336
execution = await async_client.devboxes.executions.execute_sync(
334337
id="id",
335338
command="command",
339+
shell_name="shell_name",
336340
)
337341
assert_matches_type(DevboxExecutionDetailView, execution, path=["response"])
338342

0 commit comments

Comments
 (0)