Skip to content

Commit 511e084

Browse files
feat(api): api update
1 parent 096516a commit 511e084

5 files changed

Lines changed: 14 additions & 100 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 100
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-6056b68db5d556977ff43e18d58b7ab073fca5ceb8c7204326895bc37618a0e2.yml
3-
openapi_spec_hash: 093289672abcf8bb4d4d1eca424012bc
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-2027ff4b25ad2b5574b2ce497f5d0d02ad8804816ffd6b4e36511e2fa955d0cf.yml
3+
openapi_spec_hash: 54a5a26e9c0b179d2f2a532268d3d711
44
config_hash: b97411af91b8ec0b8b066358c29091b4

src/runloop_api_client/resources/objects.py

Lines changed: 2 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -49,28 +49,7 @@ def with_streaming_response(self) -> ObjectsResourceWithStreamingResponse:
4949
def create(
5050
self,
5151
*,
52-
content_type: Literal[
53-
"UNSPECIFIED",
54-
"TEXT_PLAIN",
55-
"TEXT_HTML",
56-
"TEXT_CSS",
57-
"TEXT_JAVASCRIPT",
58-
"TEXT_YAML",
59-
"TEXT_CSV",
60-
"APPLICATION_JSON",
61-
"APPLICATION_XML",
62-
"APPLICATION_PDF",
63-
"APPLICATION_ZIP",
64-
"APPLICATION_GZIP",
65-
"APPLICATION_TAR",
66-
"APPLICATION_TAR_GZIP",
67-
"APPLICATION_OCTET_STREAM",
68-
"IMAGE_JPEG",
69-
"IMAGE_PNG",
70-
"IMAGE_GIF",
71-
"IMAGE_SVG",
72-
"IMAGE_WEBP",
73-
],
52+
content_type: Literal["unspecified", "text", "binary", "gzip", "tar", "tgz"],
7453
name: str,
7554
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
7655
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -433,28 +412,7 @@ def with_streaming_response(self) -> AsyncObjectsResourceWithStreamingResponse:
433412
async def create(
434413
self,
435414
*,
436-
content_type: Literal[
437-
"UNSPECIFIED",
438-
"TEXT_PLAIN",
439-
"TEXT_HTML",
440-
"TEXT_CSS",
441-
"TEXT_JAVASCRIPT",
442-
"TEXT_YAML",
443-
"TEXT_CSV",
444-
"APPLICATION_JSON",
445-
"APPLICATION_XML",
446-
"APPLICATION_PDF",
447-
"APPLICATION_ZIP",
448-
"APPLICATION_GZIP",
449-
"APPLICATION_TAR",
450-
"APPLICATION_TAR_GZIP",
451-
"APPLICATION_OCTET_STREAM",
452-
"IMAGE_JPEG",
453-
"IMAGE_PNG",
454-
"IMAGE_GIF",
455-
"IMAGE_SVG",
456-
"IMAGE_WEBP",
457-
],
415+
content_type: Literal["unspecified", "text", "binary", "gzip", "tar", "tgz"],
458416
name: str,
459417
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
460418
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.

src/runloop_api_client/types/object_create_params.py

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,7 @@
99

1010

1111
class ObjectCreateParams(TypedDict, total=False):
12-
content_type: Required[
13-
Literal[
14-
"UNSPECIFIED",
15-
"TEXT_PLAIN",
16-
"TEXT_HTML",
17-
"TEXT_CSS",
18-
"TEXT_JAVASCRIPT",
19-
"TEXT_YAML",
20-
"TEXT_CSV",
21-
"APPLICATION_JSON",
22-
"APPLICATION_XML",
23-
"APPLICATION_PDF",
24-
"APPLICATION_ZIP",
25-
"APPLICATION_GZIP",
26-
"APPLICATION_TAR",
27-
"APPLICATION_TAR_GZIP",
28-
"APPLICATION_OCTET_STREAM",
29-
"IMAGE_JPEG",
30-
"IMAGE_PNG",
31-
"IMAGE_GIF",
32-
"IMAGE_SVG",
33-
"IMAGE_WEBP",
34-
]
35-
]
12+
content_type: Required[Literal["unspecified", "text", "binary", "gzip", "tar", "tgz"]]
3613
"""The content type of the Object."""
3714

3815
name: Required[str]

src/runloop_api_client/types/object_view.py

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,7 @@ class ObjectView(BaseModel):
1212
id: str
1313
"""The unique identifier of the Object."""
1414

15-
content_type: Literal[
16-
"UNSPECIFIED",
17-
"TEXT_PLAIN",
18-
"TEXT_HTML",
19-
"TEXT_CSS",
20-
"TEXT_JAVASCRIPT",
21-
"TEXT_YAML",
22-
"TEXT_CSV",
23-
"APPLICATION_JSON",
24-
"APPLICATION_XML",
25-
"APPLICATION_PDF",
26-
"APPLICATION_ZIP",
27-
"APPLICATION_GZIP",
28-
"APPLICATION_TAR",
29-
"APPLICATION_TAR_GZIP",
30-
"APPLICATION_OCTET_STREAM",
31-
"IMAGE_JPEG",
32-
"IMAGE_PNG",
33-
"IMAGE_GIF",
34-
"IMAGE_SVG",
35-
"IMAGE_WEBP",
36-
]
15+
content_type: Literal["unspecified", "text", "binary", "gzip", "tar", "tgz"]
3716
"""The content type of the Object."""
3817

3918
name: str

tests/api_resources/test_objects.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ class TestObjects:
2424
@parametrize
2525
def test_method_create(self, client: Runloop) -> None:
2626
object_ = client.objects.create(
27-
content_type="UNSPECIFIED",
27+
content_type="unspecified",
2828
name="name",
2929
)
3030
assert_matches_type(ObjectView, object_, path=["response"])
3131

3232
@parametrize
3333
def test_method_create_with_all_params(self, client: Runloop) -> None:
3434
object_ = client.objects.create(
35-
content_type="UNSPECIFIED",
35+
content_type="unspecified",
3636
name="name",
3737
metadata={"foo": "string"},
3838
)
@@ -41,7 +41,7 @@ def test_method_create_with_all_params(self, client: Runloop) -> None:
4141
@parametrize
4242
def test_raw_response_create(self, client: Runloop) -> None:
4343
response = client.objects.with_raw_response.create(
44-
content_type="UNSPECIFIED",
44+
content_type="unspecified",
4545
name="name",
4646
)
4747

@@ -53,7 +53,7 @@ def test_raw_response_create(self, client: Runloop) -> None:
5353
@parametrize
5454
def test_streaming_response_create(self, client: Runloop) -> None:
5555
with client.objects.with_streaming_response.create(
56-
content_type="UNSPECIFIED",
56+
content_type="unspecified",
5757
name="name",
5858
) as response:
5959
assert not response.is_closed
@@ -307,15 +307,15 @@ class TestAsyncObjects:
307307
@parametrize
308308
async def test_method_create(self, async_client: AsyncRunloop) -> None:
309309
object_ = await async_client.objects.create(
310-
content_type="UNSPECIFIED",
310+
content_type="unspecified",
311311
name="name",
312312
)
313313
assert_matches_type(ObjectView, object_, path=["response"])
314314

315315
@parametrize
316316
async def test_method_create_with_all_params(self, async_client: AsyncRunloop) -> None:
317317
object_ = await async_client.objects.create(
318-
content_type="UNSPECIFIED",
318+
content_type="unspecified",
319319
name="name",
320320
metadata={"foo": "string"},
321321
)
@@ -324,7 +324,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncRunloop) -
324324
@parametrize
325325
async def test_raw_response_create(self, async_client: AsyncRunloop) -> None:
326326
response = await async_client.objects.with_raw_response.create(
327-
content_type="UNSPECIFIED",
327+
content_type="unspecified",
328328
name="name",
329329
)
330330

@@ -336,7 +336,7 @@ async def test_raw_response_create(self, async_client: AsyncRunloop) -> None:
336336
@parametrize
337337
async def test_streaming_response_create(self, async_client: AsyncRunloop) -> None:
338338
async with async_client.objects.with_streaming_response.create(
339-
content_type="UNSPECIFIED",
339+
content_type="unspecified",
340340
name="name",
341341
) as response:
342342
assert not response.is_closed

0 commit comments

Comments
 (0)