From e4cb568e30e3360fabd90d623973404c34a8a1f4 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 15 Aug 2024 22:12:50 +0000 Subject: [PATCH] feat(api): OpenAPI spec update via Stainless API --- .stats.yml | 2 +- src/runloop_api_client/resources/devboxes/devboxes.py | 8 ++++---- src/runloop_api_client/types/devbox_upload_file_params.py | 5 +++-- tests/api_resources/test_devboxes.py | 4 ++-- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.stats.yml b/.stats.yml index 566991053..27881a2a3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 23 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-a201c7831c11977b26e2aef7a85d862dba74fe528200b613ff67533876f3a8e8.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-de7c7d103b78caae64b0f9363d2efdfb9a4313ed39dd1d10279b582388f2dc18.yml diff --git a/src/runloop_api_client/resources/devboxes/devboxes.py b/src/runloop_api_client/resources/devboxes/devboxes.py index a4f2c337a..eed5f870b 100644 --- a/src/runloop_api_client/resources/devboxes/devboxes.py +++ b/src/runloop_api_client/resources/devboxes/devboxes.py @@ -370,7 +370,7 @@ def upload_file( self, id: str, *, - file: FileTypes | NotGiven = NOT_GIVEN, + file_input_stream: FileTypes | NotGiven = NOT_GIVEN, path: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -397,7 +397,7 @@ def upload_file( f"/v1/devboxes/{id}/upload_file", body=maybe_transform( { - "file": file, + "file_input_stream": file_input_stream, "path": path, }, devbox_upload_file_params.DevboxUploadFileParams, @@ -781,7 +781,7 @@ async def upload_file( self, id: str, *, - file: FileTypes | NotGiven = NOT_GIVEN, + file_input_stream: FileTypes | NotGiven = NOT_GIVEN, path: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -808,7 +808,7 @@ async def upload_file( f"/v1/devboxes/{id}/upload_file", body=await async_maybe_transform( { - "file": file, + "file_input_stream": file_input_stream, "path": path, }, devbox_upload_file_params.DevboxUploadFileParams, diff --git a/src/runloop_api_client/types/devbox_upload_file_params.py b/src/runloop_api_client/types/devbox_upload_file_params.py index 606a0b2b4..07529f129 100644 --- a/src/runloop_api_client/types/devbox_upload_file_params.py +++ b/src/runloop_api_client/types/devbox_upload_file_params.py @@ -2,14 +2,15 @@ from __future__ import annotations -from typing_extensions import TypedDict +from typing_extensions import Annotated, TypedDict from .._types import FileTypes +from .._utils import PropertyInfo __all__ = ["DevboxUploadFileParams"] class DevboxUploadFileParams(TypedDict, total=False): - file: FileTypes + file_input_stream: Annotated[FileTypes, PropertyInfo(alias="fileInputStream")] path: str diff --git a/tests/api_resources/test_devboxes.py b/tests/api_resources/test_devboxes.py index 5edb2c25e..5cf7d275c 100644 --- a/tests/api_resources/test_devboxes.py +++ b/tests/api_resources/test_devboxes.py @@ -323,7 +323,7 @@ def test_method_upload_file(self, client: Runloop) -> None: def test_method_upload_file_with_all_params(self, client: Runloop) -> None: devbox = client.devboxes.upload_file( id="id", - file=b"raw file contents", + file_input_stream=b"raw file contents", path="path", ) assert_matches_type(object, devbox, path=["response"]) @@ -712,7 +712,7 @@ async def test_method_upload_file(self, async_client: AsyncRunloop) -> None: async def test_method_upload_file_with_all_params(self, async_client: AsyncRunloop) -> None: devbox = await async_client.devboxes.upload_file( id="id", - file=b"raw file contents", + file_input_stream=b"raw file contents", path="path", ) assert_matches_type(object, devbox, path=["response"])