Skip to content

Commit 0ccfd28

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
chore: update SDK settings (#60)
1 parent 901c481 commit 0ccfd28

17 files changed

Lines changed: 376 additions & 185 deletions

File tree

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
configured_endpoints: 19
1+
configured_endpoints: 21
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-8ed7237714dcf00d5e186095c38ac8afb3300d4773e0d836042d89f3b53c7ffc.yml

api.md

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Shared Types
22

33
```python
4-
from runloop_api_client.types import ProjectLogsView
4+
from runloop_api_client.types import FunctionInvocationExecutionDetailView, ProjectLogsView
55
```
66

77
# Account
@@ -57,7 +57,9 @@ Methods:
5757
- <code title="get /v1/devboxes/{id}">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">retrieve</a>(id) -> <a href="./src/runloop_api_client/types/devbox_view.py">DevboxView</a></code>
5858
- <code title="get /v1/devboxes">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">list</a>(\*\*<a href="src/runloop_api_client/types/devbox_list_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devbox_list_view.py">DevboxListView</a></code>
5959
- <code title="post /v1/devboxes/{id}/execute_sync">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">execute_sync</a>(id, \*\*<a href="src/runloop_api_client/types/devbox_execute_sync_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devbox_execution_detail_view.py">DevboxExecutionDetailView</a></code>
60+
- <code title="post /v1/devboxes/{id}/read_file">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">read_file</a>(id) -> <a href="./src/runloop_api_client/types/devbox_execution_detail_view.py">DevboxExecutionDetailView</a></code>
6061
- <code title="post /v1/devboxes/{id}/shutdown">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">shutdown</a>(id) -> <a href="./src/runloop_api_client/types/devbox_view.py">DevboxView</a></code>
62+
- <code title="post /v1/devboxes/{id}/write_file">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">write_file</a>(id) -> <a href="./src/runloop_api_client/types/devbox_execution_detail_view.py">DevboxExecutionDetailView</a></code>
6163

6264
## Logs
6365

@@ -76,36 +78,28 @@ Methods:
7678
Types:
7779

7880
```python
79-
from runloop_api_client.types import (
80-
FunctionListView,
81-
FunctionInvokeAsyncResponse,
82-
FunctionInvokeSyncResponse,
83-
)
81+
from runloop_api_client.types import FunctionListView
8482
```
8583

8684
Methods:
8785

8886
- <code title="get /v1/functions">client.functions.<a href="./src/runloop_api_client/resources/functions/functions.py">list</a>() -> <a href="./src/runloop_api_client/types/function_list_view.py">FunctionListView</a></code>
89-
- <code title="post /v1/functions/{project_name}/{function_name}/invoke_async">client.functions.<a href="./src/runloop_api_client/resources/functions/functions.py">invoke_async</a>(function_name, \*, project_name, \*\*<a href="src/runloop_api_client/types/function_invoke_async_params.py">params</a>) -> <a href="./src/runloop_api_client/types/function_invoke_async_response.py">FunctionInvokeAsyncResponse</a></code>
90-
- <code title="post /v1/functions/{project_name}/{function_name}/invoke_sync">client.functions.<a href="./src/runloop_api_client/resources/functions/functions.py">invoke_sync</a>(function_name, \*, project_name, \*\*<a href="src/runloop_api_client/types/function_invoke_sync_params.py">params</a>) -> <a href="./src/runloop_api_client/types/function_invoke_sync_response.py">FunctionInvokeSyncResponse</a></code>
87+
- <code title="post /v1/functions/{project_name}/{function_name}/invoke_async">client.functions.<a href="./src/runloop_api_client/resources/functions/functions.py">invoke_async</a>(function_name, \*, project_name, \*\*<a href="src/runloop_api_client/types/function_invoke_async_params.py">params</a>) -> <a href="./src/runloop_api_client/types/shared/function_invocation_execution_detail_view.py">FunctionInvocationExecutionDetailView</a></code>
88+
- <code title="post /v1/functions/{project_name}/{function_name}/invoke_sync">client.functions.<a href="./src/runloop_api_client/resources/functions/functions.py">invoke_sync</a>(function_name, \*, project_name, \*\*<a href="src/runloop_api_client/types/function_invoke_sync_params.py">params</a>) -> <a href="./src/runloop_api_client/types/shared/function_invocation_execution_detail_view.py">FunctionInvocationExecutionDetailView</a></code>
9189

9290
## Invocations
9391

9492
Types:
9593

9694
```python
97-
from runloop_api_client.types.functions import (
98-
FunctionInvocationListView,
99-
KillOperationResponse,
100-
InvocationRetrieveResponse,
101-
)
95+
from runloop_api_client.types.functions import FunctionInvocationListView, KillOperationResponse
10296
```
10397

10498
Methods:
10599

106-
- <code title="get /v1/functions/invocations/{invocationId}">client.functions.invocations.<a href="./src/runloop_api_client/resources/functions/invocations/invocations.py">retrieve</a>(invocation_id) -> <a href="./src/runloop_api_client/types/functions/invocation_retrieve_response.py">InvocationRetrieveResponse</a></code>
107-
- <code title="get /v1/functions/invocations">client.functions.invocations.<a href="./src/runloop_api_client/resources/functions/invocations/invocations.py">list</a>(\*\*<a href="src/runloop_api_client/types/functions/invocation_list_params.py">params</a>) -> <a href="./src/runloop_api_client/types/functions/function_invocation_list_view.py">FunctionInvocationListView</a></code>
108-
- <code title="post /v1/functions/invocations/{invocationId}/kill">client.functions.invocations.<a href="./src/runloop_api_client/resources/functions/invocations/invocations.py">kill</a>(invocation_id) -> <a href="./src/runloop_api_client/types/functions/kill_operation_response.py">object</a></code>
100+
- <code title="get /v1/functions/invocations/{invocationId}">client.functions.invocations.<a href="./src/runloop_api_client/resources/functions/invocations.py">retrieve</a>(invocation_id) -> <a href="./src/runloop_api_client/types/shared/function_invocation_execution_detail_view.py">FunctionInvocationExecutionDetailView</a></code>
101+
- <code title="get /v1/functions/invocations">client.functions.invocations.<a href="./src/runloop_api_client/resources/functions/invocations.py">list</a>(\*\*<a href="src/runloop_api_client/types/functions/invocation_list_params.py">params</a>) -> <a href="./src/runloop_api_client/types/functions/function_invocation_list_view.py">FunctionInvocationListView</a></code>
102+
- <code title="post /v1/functions/invocations/{invocationId}/kill">client.functions.invocations.<a href="./src/runloop_api_client/resources/functions/invocations.py">kill</a>(invocation_id) -> <a href="./src/runloop_api_client/types/functions/kill_operation_response.py">object</a></code>
109103

110104
# Projects
111105

src/runloop_api_client/resources/devboxes/devboxes.py

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,39 @@ def execute_sync(
247247
cast_to=DevboxExecutionDetailView,
248248
)
249249

250+
def read_file(
251+
self,
252+
id: str,
253+
*,
254+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
255+
# The extra values given here take precedence over values defined on the client or passed to this method.
256+
extra_headers: Headers | None = None,
257+
extra_query: Query | None = None,
258+
extra_body: Body | None = None,
259+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
260+
) -> DevboxExecutionDetailView:
261+
"""
262+
Read file contents from a file on given Devbox.
263+
264+
Args:
265+
extra_headers: Send extra headers
266+
267+
extra_query: Add additional query parameters to the request
268+
269+
extra_body: Add additional JSON properties to the request
270+
271+
timeout: Override the client-level default timeout for this request, in seconds
272+
"""
273+
if not id:
274+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
275+
return self._post(
276+
f"/v1/devboxes/{id}/read_file",
277+
options=make_request_options(
278+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
279+
),
280+
cast_to=DevboxExecutionDetailView,
281+
)
282+
250283
def shutdown(
251284
self,
252285
id: str,
@@ -281,6 +314,39 @@ def shutdown(
281314
cast_to=DevboxView,
282315
)
283316

317+
def write_file(
318+
self,
319+
id: str,
320+
*,
321+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
322+
# The extra values given here take precedence over values defined on the client or passed to this method.
323+
extra_headers: Headers | None = None,
324+
extra_query: Query | None = None,
325+
extra_body: Body | None = None,
326+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
327+
) -> DevboxExecutionDetailView:
328+
"""
329+
Write contents to a file at path on the Devbox.
330+
331+
Args:
332+
extra_headers: Send extra headers
333+
334+
extra_query: Add additional query parameters to the request
335+
336+
extra_body: Add additional JSON properties to the request
337+
338+
timeout: Override the client-level default timeout for this request, in seconds
339+
"""
340+
if not id:
341+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
342+
return self._post(
343+
f"/v1/devboxes/{id}/write_file",
344+
options=make_request_options(
345+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
346+
),
347+
cast_to=DevboxExecutionDetailView,
348+
)
349+
284350

285351
class AsyncDevboxesResource(AsyncAPIResource):
286352
@cached_property
@@ -493,6 +559,39 @@ async def execute_sync(
493559
cast_to=DevboxExecutionDetailView,
494560
)
495561

562+
async def read_file(
563+
self,
564+
id: str,
565+
*,
566+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
567+
# The extra values given here take precedence over values defined on the client or passed to this method.
568+
extra_headers: Headers | None = None,
569+
extra_query: Query | None = None,
570+
extra_body: Body | None = None,
571+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
572+
) -> DevboxExecutionDetailView:
573+
"""
574+
Read file contents from a file on given Devbox.
575+
576+
Args:
577+
extra_headers: Send extra headers
578+
579+
extra_query: Add additional query parameters to the request
580+
581+
extra_body: Add additional JSON properties to the request
582+
583+
timeout: Override the client-level default timeout for this request, in seconds
584+
"""
585+
if not id:
586+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
587+
return await self._post(
588+
f"/v1/devboxes/{id}/read_file",
589+
options=make_request_options(
590+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
591+
),
592+
cast_to=DevboxExecutionDetailView,
593+
)
594+
496595
async def shutdown(
497596
self,
498597
id: str,
@@ -527,6 +626,39 @@ async def shutdown(
527626
cast_to=DevboxView,
528627
)
529628

629+
async def write_file(
630+
self,
631+
id: str,
632+
*,
633+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
634+
# The extra values given here take precedence over values defined on the client or passed to this method.
635+
extra_headers: Headers | None = None,
636+
extra_query: Query | None = None,
637+
extra_body: Body | None = None,
638+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
639+
) -> DevboxExecutionDetailView:
640+
"""
641+
Write contents to a file at path on the Devbox.
642+
643+
Args:
644+
extra_headers: Send extra headers
645+
646+
extra_query: Add additional query parameters to the request
647+
648+
extra_body: Add additional JSON properties to the request
649+
650+
timeout: Override the client-level default timeout for this request, in seconds
651+
"""
652+
if not id:
653+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
654+
return await self._post(
655+
f"/v1/devboxes/{id}/write_file",
656+
options=make_request_options(
657+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
658+
),
659+
cast_to=DevboxExecutionDetailView,
660+
)
661+
530662

531663
class DevboxesResourceWithRawResponse:
532664
def __init__(self, devboxes: DevboxesResource) -> None:
@@ -544,9 +676,15 @@ def __init__(self, devboxes: DevboxesResource) -> None:
544676
self.execute_sync = to_raw_response_wrapper(
545677
devboxes.execute_sync,
546678
)
679+
self.read_file = to_raw_response_wrapper(
680+
devboxes.read_file,
681+
)
547682
self.shutdown = to_raw_response_wrapper(
548683
devboxes.shutdown,
549684
)
685+
self.write_file = to_raw_response_wrapper(
686+
devboxes.write_file,
687+
)
550688

551689
@cached_property
552690
def logs(self) -> LogsResourceWithRawResponse:
@@ -569,9 +707,15 @@ def __init__(self, devboxes: AsyncDevboxesResource) -> None:
569707
self.execute_sync = async_to_raw_response_wrapper(
570708
devboxes.execute_sync,
571709
)
710+
self.read_file = async_to_raw_response_wrapper(
711+
devboxes.read_file,
712+
)
572713
self.shutdown = async_to_raw_response_wrapper(
573714
devboxes.shutdown,
574715
)
716+
self.write_file = async_to_raw_response_wrapper(
717+
devboxes.write_file,
718+
)
575719

576720
@cached_property
577721
def logs(self) -> AsyncLogsResourceWithRawResponse:
@@ -594,9 +738,15 @@ def __init__(self, devboxes: DevboxesResource) -> None:
594738
self.execute_sync = to_streamed_response_wrapper(
595739
devboxes.execute_sync,
596740
)
741+
self.read_file = to_streamed_response_wrapper(
742+
devboxes.read_file,
743+
)
597744
self.shutdown = to_streamed_response_wrapper(
598745
devboxes.shutdown,
599746
)
747+
self.write_file = to_streamed_response_wrapper(
748+
devboxes.write_file,
749+
)
600750

601751
@cached_property
602752
def logs(self) -> LogsResourceWithStreamingResponse:
@@ -619,9 +769,15 @@ def __init__(self, devboxes: AsyncDevboxesResource) -> None:
619769
self.execute_sync = async_to_streamed_response_wrapper(
620770
devboxes.execute_sync,
621771
)
772+
self.read_file = async_to_streamed_response_wrapper(
773+
devboxes.read_file,
774+
)
622775
self.shutdown = async_to_streamed_response_wrapper(
623776
devboxes.shutdown,
624777
)
778+
self.write_file = async_to_streamed_response_wrapper(
779+
devboxes.write_file,
780+
)
625781

626782
@cached_property
627783
def logs(self) -> AsyncLogsResourceWithStreamingResponse:

src/runloop_api_client/resources/functions/functions.py

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,8 @@
2727
AsyncInvocationsResourceWithStreamingResponse,
2828
)
2929
from ..._base_client import make_request_options
30-
from .invocations.invocations import InvocationsResource, AsyncInvocationsResource
3130
from ...types.function_list_view import FunctionListView
32-
from ...types.function_invoke_sync_response import FunctionInvokeSyncResponse
33-
from ...types.function_invoke_async_response import FunctionInvokeAsyncResponse
31+
from ...types.shared.function_invocation_execution_detail_view import FunctionInvocationExecutionDetailView
3432

3533
__all__ = ["FunctionsResource", "AsyncFunctionsResource"]
3634

@@ -80,7 +78,7 @@ def invoke_async(
8078
extra_query: Query | None = None,
8179
extra_body: Body | None = None,
8280
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
83-
) -> FunctionInvokeAsyncResponse:
81+
) -> FunctionInvocationExecutionDetailView:
8482
"""Invoke the remote function asynchronously.
8583
8684
This will return a job id that can be
@@ -113,7 +111,7 @@ def invoke_async(
113111
options=make_request_options(
114112
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
115113
),
116-
cast_to=FunctionInvokeAsyncResponse,
114+
cast_to=FunctionInvocationExecutionDetailView,
117115
)
118116

119117
def invoke_sync(
@@ -129,7 +127,7 @@ def invoke_sync(
129127
extra_query: Query | None = None,
130128
extra_body: Body | None = None,
131129
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
132-
) -> FunctionInvokeSyncResponse:
130+
) -> FunctionInvocationExecutionDetailView:
133131
"""Invoke the remote function synchronously.
134132
135133
This will block until the function
@@ -163,7 +161,7 @@ def invoke_sync(
163161
options=make_request_options(
164162
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
165163
),
166-
cast_to=FunctionInvokeSyncResponse,
164+
cast_to=FunctionInvocationExecutionDetailView,
167165
)
168166

169167

@@ -212,7 +210,7 @@ async def invoke_async(
212210
extra_query: Query | None = None,
213211
extra_body: Body | None = None,
214212
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
215-
) -> FunctionInvokeAsyncResponse:
213+
) -> FunctionInvocationExecutionDetailView:
216214
"""Invoke the remote function asynchronously.
217215
218216
This will return a job id that can be
@@ -245,7 +243,7 @@ async def invoke_async(
245243
options=make_request_options(
246244
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
247245
),
248-
cast_to=FunctionInvokeAsyncResponse,
246+
cast_to=FunctionInvocationExecutionDetailView,
249247
)
250248

251249
async def invoke_sync(
@@ -261,7 +259,7 @@ async def invoke_sync(
261259
extra_query: Query | None = None,
262260
extra_body: Body | None = None,
263261
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
264-
) -> FunctionInvokeSyncResponse:
262+
) -> FunctionInvocationExecutionDetailView:
265263
"""Invoke the remote function synchronously.
266264
267265
This will block until the function
@@ -295,7 +293,7 @@ async def invoke_sync(
295293
options=make_request_options(
296294
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
297295
),
298-
cast_to=FunctionInvokeSyncResponse,
296+
cast_to=FunctionInvocationExecutionDetailView,
299297
)
300298

301299

0 commit comments

Comments
 (0)