Skip to content

Commit 736c122

Browse files
feat(api): api update
1 parent c4dbcf3 commit 736c122

4 files changed

Lines changed: 228 additions & 46 deletions

File tree

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 93
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-6b65a42b74406a77acb03ddb582288396d7af64df16eebf887c77246d3a54470.yml
3-
openapi_spec_hash: aeb9f595d53412926ef507174f33a1a1
4-
config_hash: 97c56b44c382faf3f8cbb0999532054f
1+
configured_endpoints: 94
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-6bdf8a52fe1e6d7564c6cc54b3743ea05ea324a9420808764b17d02483dbaf86.yml
3+
openapi_spec_hash: 23c253ceed235b9f13794beb091941c8
4+
config_hash: 82af97d4d6dde958eed9f5e4ae55f75a

api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,7 @@ Methods:
313313
- <code title="post /v1/repositories/{id}/inspect">client.repositories.<a href="./src/runloop_api_client/resources/repositories.py">inspect</a>(id, \*\*<a href="src/runloop_api_client/types/repository_inspect_params.py">params</a>) -> <a href="./src/runloop_api_client/types/repository_inspection_details.py">RepositoryInspectionDetails</a></code>
314314
- <code title="get /v1/repositories/{id}/inspections">client.repositories.<a href="./src/runloop_api_client/resources/repositories.py">list_inspections</a>(id) -> <a href="./src/runloop_api_client/types/repository_inspection_list_view.py">RepositoryInspectionListView</a></code>
315315
- <code title="post /v1/repositories/{id}/refresh">client.repositories.<a href="./src/runloop_api_client/resources/repositories.py">refresh</a>(id, \*\*<a href="src/runloop_api_client/types/repository_refresh_params.py">params</a>) -> object</code>
316+
- <code title="get /v1/repositories/inspections/{id}">client.repositories.<a href="./src/runloop_api_client/resources/repositories.py">retrieve_inspection</a>(id) -> <a href="./src/runloop_api_client/types/repository_inspection_details.py">RepositoryInspectionDetails</a></code>
316317

317318
# Secrets
318319

src/runloop_api_client/resources/repositories.py

Lines changed: 97 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from __future__ import annotations
44

5+
import typing_extensions
56
from typing import Optional
67

78
import httpx
@@ -321,6 +322,7 @@ def list_inspections(
321322
cast_to=RepositoryInspectionListView,
322323
)
323324

325+
@typing_extensions.deprecated("deprecated")
324326
def refresh(
325327
self,
326328
id: str,
@@ -375,6 +377,39 @@ def refresh(
375377
cast_to=object,
376378
)
377379

380+
def retrieve_inspection(
381+
self,
382+
id: str,
383+
*,
384+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
385+
# The extra values given here take precedence over values defined on the client or passed to this method.
386+
extra_headers: Headers | None = None,
387+
extra_query: Query | None = None,
388+
extra_body: Body | None = None,
389+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
390+
) -> RepositoryInspectionDetails:
391+
"""
392+
Get a repository inspection by id.
393+
394+
Args:
395+
extra_headers: Send extra headers
396+
397+
extra_query: Add additional query parameters to the request
398+
399+
extra_body: Add additional JSON properties to the request
400+
401+
timeout: Override the client-level default timeout for this request, in seconds
402+
"""
403+
if not id:
404+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
405+
return self._get(
406+
f"/v1/repositories/inspections/{id}",
407+
options=make_request_options(
408+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
409+
),
410+
cast_to=RepositoryInspectionDetails,
411+
)
412+
378413

379414
class AsyncRepositoriesResource(AsyncAPIResource):
380415
@cached_property
@@ -666,6 +701,7 @@ async def list_inspections(
666701
cast_to=RepositoryInspectionListView,
667702
)
668703

704+
@typing_extensions.deprecated("deprecated")
669705
async def refresh(
670706
self,
671707
id: str,
@@ -720,6 +756,39 @@ async def refresh(
720756
cast_to=object,
721757
)
722758

759+
async def retrieve_inspection(
760+
self,
761+
id: str,
762+
*,
763+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
764+
# The extra values given here take precedence over values defined on the client or passed to this method.
765+
extra_headers: Headers | None = None,
766+
extra_query: Query | None = None,
767+
extra_body: Body | None = None,
768+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
769+
) -> RepositoryInspectionDetails:
770+
"""
771+
Get a repository inspection by id.
772+
773+
Args:
774+
extra_headers: Send extra headers
775+
776+
extra_query: Add additional query parameters to the request
777+
778+
extra_body: Add additional JSON properties to the request
779+
780+
timeout: Override the client-level default timeout for this request, in seconds
781+
"""
782+
if not id:
783+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
784+
return await self._get(
785+
f"/v1/repositories/inspections/{id}",
786+
options=make_request_options(
787+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
788+
),
789+
cast_to=RepositoryInspectionDetails,
790+
)
791+
723792

724793
class RepositoriesResourceWithRawResponse:
725794
def __init__(self, repositories: RepositoriesResource) -> None:
@@ -743,8 +812,13 @@ def __init__(self, repositories: RepositoriesResource) -> None:
743812
self.list_inspections = to_raw_response_wrapper(
744813
repositories.list_inspections,
745814
)
746-
self.refresh = to_raw_response_wrapper(
747-
repositories.refresh,
815+
self.refresh = ( # pyright: ignore[reportDeprecated]
816+
to_raw_response_wrapper(
817+
repositories.refresh, # pyright: ignore[reportDeprecated],
818+
)
819+
)
820+
self.retrieve_inspection = to_raw_response_wrapper(
821+
repositories.retrieve_inspection,
748822
)
749823

750824

@@ -770,8 +844,13 @@ def __init__(self, repositories: AsyncRepositoriesResource) -> None:
770844
self.list_inspections = async_to_raw_response_wrapper(
771845
repositories.list_inspections,
772846
)
773-
self.refresh = async_to_raw_response_wrapper(
774-
repositories.refresh,
847+
self.refresh = ( # pyright: ignore[reportDeprecated]
848+
async_to_raw_response_wrapper(
849+
repositories.refresh, # pyright: ignore[reportDeprecated],
850+
)
851+
)
852+
self.retrieve_inspection = async_to_raw_response_wrapper(
853+
repositories.retrieve_inspection,
775854
)
776855

777856

@@ -797,8 +876,13 @@ def __init__(self, repositories: RepositoriesResource) -> None:
797876
self.list_inspections = to_streamed_response_wrapper(
798877
repositories.list_inspections,
799878
)
800-
self.refresh = to_streamed_response_wrapper(
801-
repositories.refresh,
879+
self.refresh = ( # pyright: ignore[reportDeprecated]
880+
to_streamed_response_wrapper(
881+
repositories.refresh, # pyright: ignore[reportDeprecated],
882+
)
883+
)
884+
self.retrieve_inspection = to_streamed_response_wrapper(
885+
repositories.retrieve_inspection,
802886
)
803887

804888

@@ -824,6 +908,11 @@ def __init__(self, repositories: AsyncRepositoriesResource) -> None:
824908
self.list_inspections = async_to_streamed_response_wrapper(
825909
repositories.list_inspections,
826910
)
827-
self.refresh = async_to_streamed_response_wrapper(
828-
repositories.refresh,
911+
self.refresh = ( # pyright: ignore[reportDeprecated]
912+
async_to_streamed_response_wrapper(
913+
repositories.refresh, # pyright: ignore[reportDeprecated],
914+
)
915+
)
916+
self.retrieve_inspection = async_to_streamed_response_wrapper(
917+
repositories.retrieve_inspection,
829918
)

0 commit comments

Comments
 (0)