runloop_api_client 1.5.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- runloop_api_client/__init__.py +95 -0
- runloop_api_client/_base_client.py +2127 -0
- runloop_api_client/_client.py +866 -0
- runloop_api_client/_compat.py +219 -0
- runloop_api_client/_constants.py +23 -0
- runloop_api_client/_exceptions.py +108 -0
- runloop_api_client/_files.py +123 -0
- runloop_api_client/_models.py +872 -0
- runloop_api_client/_qs.py +150 -0
- runloop_api_client/_resource.py +43 -0
- runloop_api_client/_response.py +832 -0
- runloop_api_client/_streaming.py +518 -0
- runloop_api_client/_types.py +270 -0
- runloop_api_client/_utils/__init__.py +65 -0
- runloop_api_client/_utils/_compat.py +45 -0
- runloop_api_client/_utils/_datetime_parse.py +136 -0
- runloop_api_client/_utils/_json.py +35 -0
- runloop_api_client/_utils/_logs.py +25 -0
- runloop_api_client/_utils/_proxy.py +65 -0
- runloop_api_client/_utils/_reflection.py +42 -0
- runloop_api_client/_utils/_resources_proxy.py +24 -0
- runloop_api_client/_utils/_streams.py +12 -0
- runloop_api_client/_utils/_sync.py +58 -0
- runloop_api_client/_utils/_transform.py +457 -0
- runloop_api_client/_utils/_typing.py +156 -0
- runloop_api_client/_utils/_utils.py +421 -0
- runloop_api_client/_utils/_validation.py +31 -0
- runloop_api_client/_version.py +4 -0
- runloop_api_client/lib/.keep +4 -0
- runloop_api_client/lib/__init__.py +3 -0
- runloop_api_client/lib/_ignore.py +496 -0
- runloop_api_client/lib/context_loader.py +78 -0
- runloop_api_client/lib/polling.py +75 -0
- runloop_api_client/lib/polling_async.py +60 -0
- runloop_api_client/pagination.py +986 -0
- runloop_api_client/py.typed +0 -0
- runloop_api_client/resources/__init__.py +173 -0
- runloop_api_client/resources/agents.py +431 -0
- runloop_api_client/resources/benchmark_jobs.py +394 -0
- runloop_api_client/resources/benchmark_runs.py +595 -0
- runloop_api_client/resources/benchmarks.py +1085 -0
- runloop_api_client/resources/blueprints.py +1563 -0
- runloop_api_client/resources/devboxes/__init__.py +89 -0
- runloop_api_client/resources/devboxes/browsers.py +267 -0
- runloop_api_client/resources/devboxes/computers.py +648 -0
- runloop_api_client/resources/devboxes/devboxes.py +3784 -0
- runloop_api_client/resources/devboxes/disk_snapshots.py +602 -0
- runloop_api_client/resources/devboxes/executions.py +1212 -0
- runloop_api_client/resources/devboxes/logs.py +197 -0
- runloop_api_client/resources/gateway_configs.py +658 -0
- runloop_api_client/resources/network_policies.py +680 -0
- runloop_api_client/resources/objects.py +870 -0
- runloop_api_client/resources/repositories.py +918 -0
- runloop_api_client/resources/scenarios/__init__.py +47 -0
- runloop_api_client/resources/scenarios/runs.py +973 -0
- runloop_api_client/resources/scenarios/scenarios.py +1101 -0
- runloop_api_client/resources/scenarios/scorers.py +629 -0
- runloop_api_client/resources/secrets.py +500 -0
- runloop_api_client/sdk/__init__.py +117 -0
- runloop_api_client/sdk/_helpers.py +49 -0
- runloop_api_client/sdk/_types.py +264 -0
- runloop_api_client/sdk/agent.py +70 -0
- runloop_api_client/sdk/async_.py +1036 -0
- runloop_api_client/sdk/async_agent.py +70 -0
- runloop_api_client/sdk/async_benchmark.py +169 -0
- runloop_api_client/sdk/async_benchmark_run.py +127 -0
- runloop_api_client/sdk/async_blueprint.py +104 -0
- runloop_api_client/sdk/async_devbox.py +797 -0
- runloop_api_client/sdk/async_execution.py +144 -0
- runloop_api_client/sdk/async_execution_result.py +175 -0
- runloop_api_client/sdk/async_network_policy.py +80 -0
- runloop_api_client/sdk/async_scenario.py +118 -0
- runloop_api_client/sdk/async_scenario_builder.py +480 -0
- runloop_api_client/sdk/async_scenario_run.py +242 -0
- runloop_api_client/sdk/async_scorer.py +77 -0
- runloop_api_client/sdk/async_snapshot.py +125 -0
- runloop_api_client/sdk/async_storage_object.py +188 -0
- runloop_api_client/sdk/benchmark.py +167 -0
- runloop_api_client/sdk/benchmark_run.py +127 -0
- runloop_api_client/sdk/blueprint.py +104 -0
- runloop_api_client/sdk/devbox.py +800 -0
- runloop_api_client/sdk/execution.py +132 -0
- runloop_api_client/sdk/execution_result.py +173 -0
- runloop_api_client/sdk/network_policy.py +80 -0
- runloop_api_client/sdk/scenario.py +118 -0
- runloop_api_client/sdk/scenario_builder.py +480 -0
- runloop_api_client/sdk/scenario_run.py +242 -0
- runloop_api_client/sdk/scorer.py +77 -0
- runloop_api_client/sdk/snapshot.py +125 -0
- runloop_api_client/sdk/storage_object.py +188 -0
- runloop_api_client/sdk/sync.py +1061 -0
- runloop_api_client/types/__init__.py +130 -0
- runloop_api_client/types/agent_create_params.py +21 -0
- runloop_api_client/types/agent_list_params.py +27 -0
- runloop_api_client/types/agent_list_view.py +24 -0
- runloop_api_client/types/agent_view.py +30 -0
- runloop_api_client/types/benchmark_create_params.py +40 -0
- runloop_api_client/types/benchmark_definitions_params.py +15 -0
- runloop_api_client/types/benchmark_job_create_params.py +220 -0
- runloop_api_client/types/benchmark_job_list_params.py +18 -0
- runloop_api_client/types/benchmark_job_list_view.py +19 -0
- runloop_api_client/types/benchmark_job_view.py +344 -0
- runloop_api_client/types/benchmark_list_params.py +18 -0
- runloop_api_client/types/benchmark_list_public_params.py +15 -0
- runloop_api_client/types/benchmark_run_list_params.py +21 -0
- runloop_api_client/types/benchmark_run_list_scenario_runs_params.py +18 -0
- runloop_api_client/types/benchmark_run_list_view.py +19 -0
- runloop_api_client/types/benchmark_run_view.py +58 -0
- runloop_api_client/types/benchmark_start_run_params.py +29 -0
- runloop_api_client/types/benchmark_update_params.py +42 -0
- runloop_api_client/types/benchmark_update_scenarios_params.py +18 -0
- runloop_api_client/types/benchmark_view.py +49 -0
- runloop_api_client/types/blueprint_build_log.py +16 -0
- runloop_api_client/types/blueprint_build_logs_list_view.py +16 -0
- runloop_api_client/types/blueprint_build_parameters.py +119 -0
- runloop_api_client/types/blueprint_create_from_inspection_params.py +49 -0
- runloop_api_client/types/blueprint_create_params.py +121 -0
- runloop_api_client/types/blueprint_list_params.py +21 -0
- runloop_api_client/types/blueprint_list_public_params.py +21 -0
- runloop_api_client/types/blueprint_list_view.py +19 -0
- runloop_api_client/types/blueprint_preview_params.py +121 -0
- runloop_api_client/types/blueprint_preview_view.py +10 -0
- runloop_api_client/types/blueprint_view.py +93 -0
- runloop_api_client/types/devbox_async_execution_detail_view.py +46 -0
- runloop_api_client/types/devbox_create_params.py +124 -0
- runloop_api_client/types/devbox_create_ssh_key_response.py +19 -0
- runloop_api_client/types/devbox_create_tunnel_params.py +12 -0
- runloop_api_client/types/devbox_download_file_params.py +15 -0
- runloop_api_client/types/devbox_enable_tunnel_params.py +13 -0
- runloop_api_client/types/devbox_execute_async_params.py +33 -0
- runloop_api_client/types/devbox_execute_params.py +37 -0
- runloop_api_client/types/devbox_execute_sync_params.py +31 -0
- runloop_api_client/types/devbox_execution_detail_view.py +24 -0
- runloop_api_client/types/devbox_list_disk_snapshots_params.py +32 -0
- runloop_api_client/types/devbox_list_params.py +20 -0
- runloop_api_client/types/devbox_list_view.py +19 -0
- runloop_api_client/types/devbox_read_file_contents_params.py +15 -0
- runloop_api_client/types/devbox_read_file_contents_response.py +7 -0
- runloop_api_client/types/devbox_remove_tunnel_params.py +12 -0
- runloop_api_client/types/devbox_send_std_in_result.py +16 -0
- runloop_api_client/types/devbox_snapshot_disk_async_params.py +19 -0
- runloop_api_client/types/devbox_snapshot_disk_params.py +19 -0
- runloop_api_client/types/devbox_snapshot_list_view.py +19 -0
- runloop_api_client/types/devbox_snapshot_view.py +30 -0
- runloop_api_client/types/devbox_tunnel_view.py +16 -0
- runloop_api_client/types/devbox_update_params.py +16 -0
- runloop_api_client/types/devbox_upload_file_params.py +19 -0
- runloop_api_client/types/devbox_view.py +121 -0
- runloop_api_client/types/devbox_wait_for_command_params.py +28 -0
- runloop_api_client/types/devbox_write_file_contents_params.py +18 -0
- runloop_api_client/types/devboxes/__init__.py +33 -0
- runloop_api_client/types/devboxes/browser_create_params.py +13 -0
- runloop_api_client/types/devboxes/browser_view.py +29 -0
- runloop_api_client/types/devboxes/computer_create_params.py +26 -0
- runloop_api_client/types/devboxes/computer_keyboard_interaction_params.py +16 -0
- runloop_api_client/types/devboxes/computer_keyboard_interaction_response.py +15 -0
- runloop_api_client/types/devboxes/computer_mouse_interaction_params.py +35 -0
- runloop_api_client/types/devboxes/computer_mouse_interaction_response.py +15 -0
- runloop_api_client/types/devboxes/computer_screen_interaction_params.py +12 -0
- runloop_api_client/types/devboxes/computer_screen_interaction_response.py +15 -0
- runloop_api_client/types/devboxes/computer_view.py +23 -0
- runloop_api_client/types/devboxes/devbox_logs_list_view.py +39 -0
- runloop_api_client/types/devboxes/devbox_snapshot_async_status_view.py +20 -0
- runloop_api_client/types/devboxes/disk_snapshot_list_params.py +32 -0
- runloop_api_client/types/devboxes/disk_snapshot_update_params.py +19 -0
- runloop_api_client/types/devboxes/execution_execute_async_params.py +31 -0
- runloop_api_client/types/devboxes/execution_execute_sync_params.py +31 -0
- runloop_api_client/types/devboxes/execution_kill_params.py +18 -0
- runloop_api_client/types/devboxes/execution_retrieve_params.py +14 -0
- runloop_api_client/types/devboxes/execution_send_std_in_params.py +18 -0
- runloop_api_client/types/devboxes/execution_stream_stderr_updates_params.py +17 -0
- runloop_api_client/types/devboxes/execution_stream_stdout_updates_params.py +17 -0
- runloop_api_client/types/devboxes/execution_update_chunk.py +15 -0
- runloop_api_client/types/devboxes/log_list_params.py +15 -0
- runloop_api_client/types/gateway_config_create_params.py +41 -0
- runloop_api_client/types/gateway_config_list_params.py +21 -0
- runloop_api_client/types/gateway_config_list_view.py +21 -0
- runloop_api_client/types/gateway_config_update_params.py +32 -0
- runloop_api_client/types/gateway_config_view.py +47 -0
- runloop_api_client/types/input_context.py +19 -0
- runloop_api_client/types/input_context_param.py +20 -0
- runloop_api_client/types/input_context_update_param.py +16 -0
- runloop_api_client/types/inspection_source_param.py +18 -0
- runloop_api_client/types/network_policy_create_params.py +40 -0
- runloop_api_client/types/network_policy_list_params.py +21 -0
- runloop_api_client/types/network_policy_list_view.py +21 -0
- runloop_api_client/types/network_policy_update_params.py +30 -0
- runloop_api_client/types/network_policy_view.py +52 -0
- runloop_api_client/types/object_create_params.py +30 -0
- runloop_api_client/types/object_download_params.py +12 -0
- runloop_api_client/types/object_download_url_view.py +12 -0
- runloop_api_client/types/object_list_params.py +27 -0
- runloop_api_client/types/object_list_public_params.py +27 -0
- runloop_api_client/types/object_list_view.py +24 -0
- runloop_api_client/types/object_view.py +36 -0
- runloop_api_client/types/repository_connection_list_view.py +19 -0
- runloop_api_client/types/repository_connection_view.py +18 -0
- runloop_api_client/types/repository_create_params.py +22 -0
- runloop_api_client/types/repository_inspect_params.py +13 -0
- runloop_api_client/types/repository_inspection_details.py +83 -0
- runloop_api_client/types/repository_inspection_list_view.py +13 -0
- runloop_api_client/types/repository_list_params.py +21 -0
- runloop_api_client/types/repository_manifest_view.py +174 -0
- runloop_api_client/types/repository_refresh_params.py +16 -0
- runloop_api_client/types/scenario_create_params.py +53 -0
- runloop_api_client/types/scenario_definition_list_view.py +19 -0
- runloop_api_client/types/scenario_environment.py +29 -0
- runloop_api_client/types/scenario_environment_param.py +31 -0
- runloop_api_client/types/scenario_list_params.py +24 -0
- runloop_api_client/types/scenario_list_public_params.py +18 -0
- runloop_api_client/types/scenario_run_list_view.py +19 -0
- runloop_api_client/types/scenario_run_view.py +55 -0
- runloop_api_client/types/scenario_start_run_params.py +30 -0
- runloop_api_client/types/scenario_update_params.py +49 -0
- runloop_api_client/types/scenario_view.py +61 -0
- runloop_api_client/types/scenarios/__init__.py +14 -0
- runloop_api_client/types/scenarios/run_list_params.py +27 -0
- runloop_api_client/types/scenarios/scorer_create_params.py +18 -0
- runloop_api_client/types/scenarios/scorer_create_response.py +18 -0
- runloop_api_client/types/scenarios/scorer_list_params.py +15 -0
- runloop_api_client/types/scenarios/scorer_list_response.py +18 -0
- runloop_api_client/types/scenarios/scorer_retrieve_response.py +18 -0
- runloop_api_client/types/scenarios/scorer_update_params.py +18 -0
- runloop_api_client/types/scenarios/scorer_update_response.py +18 -0
- runloop_api_client/types/scenarios/scorer_validate_params.py +17 -0
- runloop_api_client/types/scenarios/scorer_validate_response.py +23 -0
- runloop_api_client/types/scoring_contract.py +17 -0
- runloop_api_client/types/scoring_contract_param.py +19 -0
- runloop_api_client/types/scoring_contract_result_view.py +20 -0
- runloop_api_client/types/scoring_contract_update_param.py +15 -0
- runloop_api_client/types/scoring_function.py +157 -0
- runloop_api_client/types/scoring_function_param.py +153 -0
- runloop_api_client/types/scoring_function_result_view.py +25 -0
- runloop_api_client/types/secret_create_params.py +23 -0
- runloop_api_client/types/secret_list_params.py +12 -0
- runloop_api_client/types/secret_list_view.py +24 -0
- runloop_api_client/types/secret_update_params.py +16 -0
- runloop_api_client/types/secret_view.py +26 -0
- runloop_api_client/types/shared/__init__.py +10 -0
- runloop_api_client/types/shared/after_idle.py +15 -0
- runloop_api_client/types/shared/agent_mount.py +31 -0
- runloop_api_client/types/shared/agent_source.py +75 -0
- runloop_api_client/types/shared/code_mount_parameters.py +24 -0
- runloop_api_client/types/shared/launch_parameters.py +86 -0
- runloop_api_client/types/shared/mount.py +43 -0
- runloop_api_client/types/shared/object_mount.py +21 -0
- runloop_api_client/types/shared/run_profile.py +37 -0
- runloop_api_client/types/shared_params/__init__.py +10 -0
- runloop_api_client/types/shared_params/after_idle.py +15 -0
- runloop_api_client/types/shared_params/agent_mount.py +31 -0
- runloop_api_client/types/shared_params/agent_source.py +78 -0
- runloop_api_client/types/shared_params/code_mount_parameters.py +25 -0
- runloop_api_client/types/shared_params/launch_parameters.py +88 -0
- runloop_api_client/types/shared_params/mount.py +43 -0
- runloop_api_client/types/shared_params/object_mount.py +21 -0
- runloop_api_client/types/shared_params/run_profile.py +38 -0
- runloop_api_client/types/tunnel_view.py +34 -0
- runloop_api_client-1.5.1.dist-info/METADATA +522 -0
- runloop_api_client-1.5.1.dist-info/RECORD +261 -0
- runloop_api_client-1.5.1.dist-info/WHEEL +4 -0
- runloop_api_client-1.5.1.dist-info/licenses/LICENSE +7 -0
|
@@ -0,0 +1,918 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import typing_extensions
|
|
6
|
+
from typing import Optional
|
|
7
|
+
|
|
8
|
+
import httpx
|
|
9
|
+
|
|
10
|
+
from ..types import (
|
|
11
|
+
repository_list_params,
|
|
12
|
+
repository_create_params,
|
|
13
|
+
repository_inspect_params,
|
|
14
|
+
repository_refresh_params,
|
|
15
|
+
)
|
|
16
|
+
from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
17
|
+
from .._utils import maybe_transform, async_maybe_transform
|
|
18
|
+
from .._compat import cached_property
|
|
19
|
+
from .._resource import SyncAPIResource, AsyncAPIResource
|
|
20
|
+
from .._response import (
|
|
21
|
+
to_raw_response_wrapper,
|
|
22
|
+
to_streamed_response_wrapper,
|
|
23
|
+
async_to_raw_response_wrapper,
|
|
24
|
+
async_to_streamed_response_wrapper,
|
|
25
|
+
)
|
|
26
|
+
from ..pagination import SyncRepositoriesCursorIDPage, AsyncRepositoriesCursorIDPage
|
|
27
|
+
from .._base_client import AsyncPaginator, make_request_options
|
|
28
|
+
from ..types.repository_connection_view import RepositoryConnectionView
|
|
29
|
+
from ..types.repository_inspection_details import RepositoryInspectionDetails
|
|
30
|
+
from ..types.repository_inspection_list_view import RepositoryInspectionListView
|
|
31
|
+
|
|
32
|
+
__all__ = ["RepositoriesResource", "AsyncRepositoriesResource"]
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class RepositoriesResource(SyncAPIResource):
|
|
36
|
+
@cached_property
|
|
37
|
+
def with_raw_response(self) -> RepositoriesResourceWithRawResponse:
|
|
38
|
+
"""
|
|
39
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
40
|
+
the raw response object instead of the parsed content.
|
|
41
|
+
|
|
42
|
+
For more information, see https://www.github.com/runloopai/api-client-python#accessing-raw-response-data-eg-headers
|
|
43
|
+
"""
|
|
44
|
+
return RepositoriesResourceWithRawResponse(self)
|
|
45
|
+
|
|
46
|
+
@cached_property
|
|
47
|
+
def with_streaming_response(self) -> RepositoriesResourceWithStreamingResponse:
|
|
48
|
+
"""
|
|
49
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
50
|
+
|
|
51
|
+
For more information, see https://www.github.com/runloopai/api-client-python#with_streaming_response
|
|
52
|
+
"""
|
|
53
|
+
return RepositoriesResourceWithStreamingResponse(self)
|
|
54
|
+
|
|
55
|
+
def create(
|
|
56
|
+
self,
|
|
57
|
+
*,
|
|
58
|
+
name: str,
|
|
59
|
+
owner: str,
|
|
60
|
+
blueprint_id: Optional[str] | Omit = omit,
|
|
61
|
+
github_auth_token: Optional[str] | Omit = omit,
|
|
62
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
63
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
64
|
+
extra_headers: Headers | None = None,
|
|
65
|
+
extra_query: Query | None = None,
|
|
66
|
+
extra_body: Body | None = None,
|
|
67
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
68
|
+
idempotency_key: str | None = None,
|
|
69
|
+
) -> RepositoryConnectionView:
|
|
70
|
+
"""
|
|
71
|
+
Create a connection to a Github Repository and trigger an initial inspection of
|
|
72
|
+
the repo's technical stack and developer environment requirements.
|
|
73
|
+
|
|
74
|
+
Args:
|
|
75
|
+
name: Name of the repository.
|
|
76
|
+
|
|
77
|
+
owner: Account owner of the repository.
|
|
78
|
+
|
|
79
|
+
blueprint_id: ID of blueprint to use as base for resulting RepositoryVersion blueprint.
|
|
80
|
+
|
|
81
|
+
github_auth_token: GitHub authentication token for accessing private repositories.
|
|
82
|
+
|
|
83
|
+
extra_headers: Send extra headers
|
|
84
|
+
|
|
85
|
+
extra_query: Add additional query parameters to the request
|
|
86
|
+
|
|
87
|
+
extra_body: Add additional JSON properties to the request
|
|
88
|
+
|
|
89
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
90
|
+
|
|
91
|
+
idempotency_key: Specify a custom idempotency key for this request
|
|
92
|
+
"""
|
|
93
|
+
return self._post(
|
|
94
|
+
"/v1/repositories",
|
|
95
|
+
body=maybe_transform(
|
|
96
|
+
{
|
|
97
|
+
"name": name,
|
|
98
|
+
"owner": owner,
|
|
99
|
+
"blueprint_id": blueprint_id,
|
|
100
|
+
"github_auth_token": github_auth_token,
|
|
101
|
+
},
|
|
102
|
+
repository_create_params.RepositoryCreateParams,
|
|
103
|
+
),
|
|
104
|
+
options=make_request_options(
|
|
105
|
+
extra_headers=extra_headers,
|
|
106
|
+
extra_query=extra_query,
|
|
107
|
+
extra_body=extra_body,
|
|
108
|
+
timeout=timeout,
|
|
109
|
+
idempotency_key=idempotency_key,
|
|
110
|
+
),
|
|
111
|
+
cast_to=RepositoryConnectionView,
|
|
112
|
+
)
|
|
113
|
+
|
|
114
|
+
def retrieve(
|
|
115
|
+
self,
|
|
116
|
+
id: str,
|
|
117
|
+
*,
|
|
118
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
119
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
120
|
+
extra_headers: Headers | None = None,
|
|
121
|
+
extra_query: Query | None = None,
|
|
122
|
+
extra_body: Body | None = None,
|
|
123
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
124
|
+
) -> RepositoryConnectionView:
|
|
125
|
+
"""
|
|
126
|
+
Get Repository Connection details including latest inspection status and
|
|
127
|
+
generated repository insights.
|
|
128
|
+
|
|
129
|
+
Args:
|
|
130
|
+
extra_headers: Send extra headers
|
|
131
|
+
|
|
132
|
+
extra_query: Add additional query parameters to the request
|
|
133
|
+
|
|
134
|
+
extra_body: Add additional JSON properties to the request
|
|
135
|
+
|
|
136
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
137
|
+
"""
|
|
138
|
+
if not id:
|
|
139
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
140
|
+
return self._get(
|
|
141
|
+
f"/v1/repositories/{id}",
|
|
142
|
+
options=make_request_options(
|
|
143
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
144
|
+
),
|
|
145
|
+
cast_to=RepositoryConnectionView,
|
|
146
|
+
)
|
|
147
|
+
|
|
148
|
+
def list(
|
|
149
|
+
self,
|
|
150
|
+
*,
|
|
151
|
+
limit: int | Omit = omit,
|
|
152
|
+
name: str | Omit = omit,
|
|
153
|
+
owner: str | Omit = omit,
|
|
154
|
+
starting_after: str | Omit = omit,
|
|
155
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
156
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
157
|
+
extra_headers: Headers | None = None,
|
|
158
|
+
extra_query: Query | None = None,
|
|
159
|
+
extra_body: Body | None = None,
|
|
160
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
161
|
+
) -> SyncRepositoriesCursorIDPage[RepositoryConnectionView]:
|
|
162
|
+
"""
|
|
163
|
+
List all available repository connections.
|
|
164
|
+
|
|
165
|
+
Args:
|
|
166
|
+
limit: The limit of items to return. Default is 20. Max is 5000.
|
|
167
|
+
|
|
168
|
+
name: Filter by repository name
|
|
169
|
+
|
|
170
|
+
owner: Filter by repository owner
|
|
171
|
+
|
|
172
|
+
starting_after: Load the next page of data starting after the item with the given ID.
|
|
173
|
+
|
|
174
|
+
extra_headers: Send extra headers
|
|
175
|
+
|
|
176
|
+
extra_query: Add additional query parameters to the request
|
|
177
|
+
|
|
178
|
+
extra_body: Add additional JSON properties to the request
|
|
179
|
+
|
|
180
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
181
|
+
"""
|
|
182
|
+
return self._get_api_list(
|
|
183
|
+
"/v1/repositories",
|
|
184
|
+
page=SyncRepositoriesCursorIDPage[RepositoryConnectionView],
|
|
185
|
+
options=make_request_options(
|
|
186
|
+
extra_headers=extra_headers,
|
|
187
|
+
extra_query=extra_query,
|
|
188
|
+
extra_body=extra_body,
|
|
189
|
+
timeout=timeout,
|
|
190
|
+
query=maybe_transform(
|
|
191
|
+
{
|
|
192
|
+
"limit": limit,
|
|
193
|
+
"name": name,
|
|
194
|
+
"owner": owner,
|
|
195
|
+
"starting_after": starting_after,
|
|
196
|
+
},
|
|
197
|
+
repository_list_params.RepositoryListParams,
|
|
198
|
+
),
|
|
199
|
+
),
|
|
200
|
+
model=RepositoryConnectionView,
|
|
201
|
+
)
|
|
202
|
+
|
|
203
|
+
def delete(
|
|
204
|
+
self,
|
|
205
|
+
id: str,
|
|
206
|
+
*,
|
|
207
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
208
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
209
|
+
extra_headers: Headers | None = None,
|
|
210
|
+
extra_query: Query | None = None,
|
|
211
|
+
extra_body: Body | None = None,
|
|
212
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
213
|
+
idempotency_key: str | None = None,
|
|
214
|
+
) -> object:
|
|
215
|
+
"""
|
|
216
|
+
Permanently Delete a Repository Connection including any automatically generated
|
|
217
|
+
inspection insights.
|
|
218
|
+
|
|
219
|
+
Args:
|
|
220
|
+
extra_headers: Send extra headers
|
|
221
|
+
|
|
222
|
+
extra_query: Add additional query parameters to the request
|
|
223
|
+
|
|
224
|
+
extra_body: Add additional JSON properties to the request
|
|
225
|
+
|
|
226
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
227
|
+
|
|
228
|
+
idempotency_key: Specify a custom idempotency key for this request
|
|
229
|
+
"""
|
|
230
|
+
if not id:
|
|
231
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
232
|
+
return self._post(
|
|
233
|
+
f"/v1/repositories/{id}/delete",
|
|
234
|
+
options=make_request_options(
|
|
235
|
+
extra_headers=extra_headers,
|
|
236
|
+
extra_query=extra_query,
|
|
237
|
+
extra_body=extra_body,
|
|
238
|
+
timeout=timeout,
|
|
239
|
+
idempotency_key=idempotency_key,
|
|
240
|
+
),
|
|
241
|
+
cast_to=object,
|
|
242
|
+
)
|
|
243
|
+
|
|
244
|
+
def inspect(
|
|
245
|
+
self,
|
|
246
|
+
id: str,
|
|
247
|
+
*,
|
|
248
|
+
github_auth_token: Optional[str] | Omit = omit,
|
|
249
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
250
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
251
|
+
extra_headers: Headers | None = None,
|
|
252
|
+
extra_query: Query | None = None,
|
|
253
|
+
extra_body: Body | None = None,
|
|
254
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
255
|
+
idempotency_key: str | None = None,
|
|
256
|
+
) -> RepositoryInspectionDetails:
|
|
257
|
+
"""
|
|
258
|
+
Inspect a repository connection by inspecting the specified version including
|
|
259
|
+
repo's technical stack and developer environment requirements.
|
|
260
|
+
|
|
261
|
+
Args:
|
|
262
|
+
github_auth_token: GitHub authentication token for accessing private repositories.
|
|
263
|
+
|
|
264
|
+
extra_headers: Send extra headers
|
|
265
|
+
|
|
266
|
+
extra_query: Add additional query parameters to the request
|
|
267
|
+
|
|
268
|
+
extra_body: Add additional JSON properties to the request
|
|
269
|
+
|
|
270
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
271
|
+
|
|
272
|
+
idempotency_key: Specify a custom idempotency key for this request
|
|
273
|
+
"""
|
|
274
|
+
if not id:
|
|
275
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
276
|
+
return self._post(
|
|
277
|
+
f"/v1/repositories/{id}/inspect",
|
|
278
|
+
body=maybe_transform(
|
|
279
|
+
{"github_auth_token": github_auth_token}, repository_inspect_params.RepositoryInspectParams
|
|
280
|
+
),
|
|
281
|
+
options=make_request_options(
|
|
282
|
+
extra_headers=extra_headers,
|
|
283
|
+
extra_query=extra_query,
|
|
284
|
+
extra_body=extra_body,
|
|
285
|
+
timeout=timeout,
|
|
286
|
+
idempotency_key=idempotency_key,
|
|
287
|
+
),
|
|
288
|
+
cast_to=RepositoryInspectionDetails,
|
|
289
|
+
)
|
|
290
|
+
|
|
291
|
+
def list_inspections(
|
|
292
|
+
self,
|
|
293
|
+
id: str,
|
|
294
|
+
*,
|
|
295
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
296
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
297
|
+
extra_headers: Headers | None = None,
|
|
298
|
+
extra_query: Query | None = None,
|
|
299
|
+
extra_body: Body | None = None,
|
|
300
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
301
|
+
) -> RepositoryInspectionListView:
|
|
302
|
+
"""
|
|
303
|
+
List all inspections of a repository connection including automatically
|
|
304
|
+
generated insights for each inspection.
|
|
305
|
+
|
|
306
|
+
Args:
|
|
307
|
+
extra_headers: Send extra headers
|
|
308
|
+
|
|
309
|
+
extra_query: Add additional query parameters to the request
|
|
310
|
+
|
|
311
|
+
extra_body: Add additional JSON properties to the request
|
|
312
|
+
|
|
313
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
314
|
+
"""
|
|
315
|
+
if not id:
|
|
316
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
317
|
+
return self._get(
|
|
318
|
+
f"/v1/repositories/{id}/inspections",
|
|
319
|
+
options=make_request_options(
|
|
320
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
321
|
+
),
|
|
322
|
+
cast_to=RepositoryInspectionListView,
|
|
323
|
+
)
|
|
324
|
+
|
|
325
|
+
@typing_extensions.deprecated("deprecated")
|
|
326
|
+
def refresh(
|
|
327
|
+
self,
|
|
328
|
+
id: str,
|
|
329
|
+
*,
|
|
330
|
+
blueprint_id: Optional[str] | Omit = omit,
|
|
331
|
+
github_auth_token: Optional[str] | Omit = omit,
|
|
332
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
333
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
334
|
+
extra_headers: Headers | None = None,
|
|
335
|
+
extra_query: Query | None = None,
|
|
336
|
+
extra_body: Body | None = None,
|
|
337
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
338
|
+
idempotency_key: str | None = None,
|
|
339
|
+
) -> object:
|
|
340
|
+
"""
|
|
341
|
+
Refresh a repository connection by inspecting the latest version including
|
|
342
|
+
repo's technical stack and developer environment requirements.
|
|
343
|
+
|
|
344
|
+
Args:
|
|
345
|
+
blueprint_id: ID of blueprint to use as base for resulting RepositoryVersion blueprint.
|
|
346
|
+
|
|
347
|
+
github_auth_token: GitHub authentication token for accessing private repositories.
|
|
348
|
+
|
|
349
|
+
extra_headers: Send extra headers
|
|
350
|
+
|
|
351
|
+
extra_query: Add additional query parameters to the request
|
|
352
|
+
|
|
353
|
+
extra_body: Add additional JSON properties to the request
|
|
354
|
+
|
|
355
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
356
|
+
|
|
357
|
+
idempotency_key: Specify a custom idempotency key for this request
|
|
358
|
+
"""
|
|
359
|
+
if not id:
|
|
360
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
361
|
+
return self._post(
|
|
362
|
+
f"/v1/repositories/{id}/refresh",
|
|
363
|
+
body=maybe_transform(
|
|
364
|
+
{
|
|
365
|
+
"blueprint_id": blueprint_id,
|
|
366
|
+
"github_auth_token": github_auth_token,
|
|
367
|
+
},
|
|
368
|
+
repository_refresh_params.RepositoryRefreshParams,
|
|
369
|
+
),
|
|
370
|
+
options=make_request_options(
|
|
371
|
+
extra_headers=extra_headers,
|
|
372
|
+
extra_query=extra_query,
|
|
373
|
+
extra_body=extra_body,
|
|
374
|
+
timeout=timeout,
|
|
375
|
+
idempotency_key=idempotency_key,
|
|
376
|
+
),
|
|
377
|
+
cast_to=object,
|
|
378
|
+
)
|
|
379
|
+
|
|
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
|
+
|
|
413
|
+
|
|
414
|
+
class AsyncRepositoriesResource(AsyncAPIResource):
|
|
415
|
+
@cached_property
|
|
416
|
+
def with_raw_response(self) -> AsyncRepositoriesResourceWithRawResponse:
|
|
417
|
+
"""
|
|
418
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
419
|
+
the raw response object instead of the parsed content.
|
|
420
|
+
|
|
421
|
+
For more information, see https://www.github.com/runloopai/api-client-python#accessing-raw-response-data-eg-headers
|
|
422
|
+
"""
|
|
423
|
+
return AsyncRepositoriesResourceWithRawResponse(self)
|
|
424
|
+
|
|
425
|
+
@cached_property
|
|
426
|
+
def with_streaming_response(self) -> AsyncRepositoriesResourceWithStreamingResponse:
|
|
427
|
+
"""
|
|
428
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
429
|
+
|
|
430
|
+
For more information, see https://www.github.com/runloopai/api-client-python#with_streaming_response
|
|
431
|
+
"""
|
|
432
|
+
return AsyncRepositoriesResourceWithStreamingResponse(self)
|
|
433
|
+
|
|
434
|
+
async def create(
|
|
435
|
+
self,
|
|
436
|
+
*,
|
|
437
|
+
name: str,
|
|
438
|
+
owner: str,
|
|
439
|
+
blueprint_id: Optional[str] | Omit = omit,
|
|
440
|
+
github_auth_token: Optional[str] | Omit = omit,
|
|
441
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
442
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
443
|
+
extra_headers: Headers | None = None,
|
|
444
|
+
extra_query: Query | None = None,
|
|
445
|
+
extra_body: Body | None = None,
|
|
446
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
447
|
+
idempotency_key: str | None = None,
|
|
448
|
+
) -> RepositoryConnectionView:
|
|
449
|
+
"""
|
|
450
|
+
Create a connection to a Github Repository and trigger an initial inspection of
|
|
451
|
+
the repo's technical stack and developer environment requirements.
|
|
452
|
+
|
|
453
|
+
Args:
|
|
454
|
+
name: Name of the repository.
|
|
455
|
+
|
|
456
|
+
owner: Account owner of the repository.
|
|
457
|
+
|
|
458
|
+
blueprint_id: ID of blueprint to use as base for resulting RepositoryVersion blueprint.
|
|
459
|
+
|
|
460
|
+
github_auth_token: GitHub authentication token for accessing private repositories.
|
|
461
|
+
|
|
462
|
+
extra_headers: Send extra headers
|
|
463
|
+
|
|
464
|
+
extra_query: Add additional query parameters to the request
|
|
465
|
+
|
|
466
|
+
extra_body: Add additional JSON properties to the request
|
|
467
|
+
|
|
468
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
469
|
+
|
|
470
|
+
idempotency_key: Specify a custom idempotency key for this request
|
|
471
|
+
"""
|
|
472
|
+
return await self._post(
|
|
473
|
+
"/v1/repositories",
|
|
474
|
+
body=await async_maybe_transform(
|
|
475
|
+
{
|
|
476
|
+
"name": name,
|
|
477
|
+
"owner": owner,
|
|
478
|
+
"blueprint_id": blueprint_id,
|
|
479
|
+
"github_auth_token": github_auth_token,
|
|
480
|
+
},
|
|
481
|
+
repository_create_params.RepositoryCreateParams,
|
|
482
|
+
),
|
|
483
|
+
options=make_request_options(
|
|
484
|
+
extra_headers=extra_headers,
|
|
485
|
+
extra_query=extra_query,
|
|
486
|
+
extra_body=extra_body,
|
|
487
|
+
timeout=timeout,
|
|
488
|
+
idempotency_key=idempotency_key,
|
|
489
|
+
),
|
|
490
|
+
cast_to=RepositoryConnectionView,
|
|
491
|
+
)
|
|
492
|
+
|
|
493
|
+
async def retrieve(
|
|
494
|
+
self,
|
|
495
|
+
id: str,
|
|
496
|
+
*,
|
|
497
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
498
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
499
|
+
extra_headers: Headers | None = None,
|
|
500
|
+
extra_query: Query | None = None,
|
|
501
|
+
extra_body: Body | None = None,
|
|
502
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
503
|
+
) -> RepositoryConnectionView:
|
|
504
|
+
"""
|
|
505
|
+
Get Repository Connection details including latest inspection status and
|
|
506
|
+
generated repository insights.
|
|
507
|
+
|
|
508
|
+
Args:
|
|
509
|
+
extra_headers: Send extra headers
|
|
510
|
+
|
|
511
|
+
extra_query: Add additional query parameters to the request
|
|
512
|
+
|
|
513
|
+
extra_body: Add additional JSON properties to the request
|
|
514
|
+
|
|
515
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
516
|
+
"""
|
|
517
|
+
if not id:
|
|
518
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
519
|
+
return await self._get(
|
|
520
|
+
f"/v1/repositories/{id}",
|
|
521
|
+
options=make_request_options(
|
|
522
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
523
|
+
),
|
|
524
|
+
cast_to=RepositoryConnectionView,
|
|
525
|
+
)
|
|
526
|
+
|
|
527
|
+
def list(
|
|
528
|
+
self,
|
|
529
|
+
*,
|
|
530
|
+
limit: int | Omit = omit,
|
|
531
|
+
name: str | Omit = omit,
|
|
532
|
+
owner: str | Omit = omit,
|
|
533
|
+
starting_after: str | Omit = omit,
|
|
534
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
535
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
536
|
+
extra_headers: Headers | None = None,
|
|
537
|
+
extra_query: Query | None = None,
|
|
538
|
+
extra_body: Body | None = None,
|
|
539
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
540
|
+
) -> AsyncPaginator[RepositoryConnectionView, AsyncRepositoriesCursorIDPage[RepositoryConnectionView]]:
|
|
541
|
+
"""
|
|
542
|
+
List all available repository connections.
|
|
543
|
+
|
|
544
|
+
Args:
|
|
545
|
+
limit: The limit of items to return. Default is 20. Max is 5000.
|
|
546
|
+
|
|
547
|
+
name: Filter by repository name
|
|
548
|
+
|
|
549
|
+
owner: Filter by repository owner
|
|
550
|
+
|
|
551
|
+
starting_after: Load the next page of data starting after the item with the given ID.
|
|
552
|
+
|
|
553
|
+
extra_headers: Send extra headers
|
|
554
|
+
|
|
555
|
+
extra_query: Add additional query parameters to the request
|
|
556
|
+
|
|
557
|
+
extra_body: Add additional JSON properties to the request
|
|
558
|
+
|
|
559
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
560
|
+
"""
|
|
561
|
+
return self._get_api_list(
|
|
562
|
+
"/v1/repositories",
|
|
563
|
+
page=AsyncRepositoriesCursorIDPage[RepositoryConnectionView],
|
|
564
|
+
options=make_request_options(
|
|
565
|
+
extra_headers=extra_headers,
|
|
566
|
+
extra_query=extra_query,
|
|
567
|
+
extra_body=extra_body,
|
|
568
|
+
timeout=timeout,
|
|
569
|
+
query=maybe_transform(
|
|
570
|
+
{
|
|
571
|
+
"limit": limit,
|
|
572
|
+
"name": name,
|
|
573
|
+
"owner": owner,
|
|
574
|
+
"starting_after": starting_after,
|
|
575
|
+
},
|
|
576
|
+
repository_list_params.RepositoryListParams,
|
|
577
|
+
),
|
|
578
|
+
),
|
|
579
|
+
model=RepositoryConnectionView,
|
|
580
|
+
)
|
|
581
|
+
|
|
582
|
+
async def delete(
|
|
583
|
+
self,
|
|
584
|
+
id: str,
|
|
585
|
+
*,
|
|
586
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
587
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
588
|
+
extra_headers: Headers | None = None,
|
|
589
|
+
extra_query: Query | None = None,
|
|
590
|
+
extra_body: Body | None = None,
|
|
591
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
592
|
+
idempotency_key: str | None = None,
|
|
593
|
+
) -> object:
|
|
594
|
+
"""
|
|
595
|
+
Permanently Delete a Repository Connection including any automatically generated
|
|
596
|
+
inspection insights.
|
|
597
|
+
|
|
598
|
+
Args:
|
|
599
|
+
extra_headers: Send extra headers
|
|
600
|
+
|
|
601
|
+
extra_query: Add additional query parameters to the request
|
|
602
|
+
|
|
603
|
+
extra_body: Add additional JSON properties to the request
|
|
604
|
+
|
|
605
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
606
|
+
|
|
607
|
+
idempotency_key: Specify a custom idempotency key for this request
|
|
608
|
+
"""
|
|
609
|
+
if not id:
|
|
610
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
611
|
+
return await self._post(
|
|
612
|
+
f"/v1/repositories/{id}/delete",
|
|
613
|
+
options=make_request_options(
|
|
614
|
+
extra_headers=extra_headers,
|
|
615
|
+
extra_query=extra_query,
|
|
616
|
+
extra_body=extra_body,
|
|
617
|
+
timeout=timeout,
|
|
618
|
+
idempotency_key=idempotency_key,
|
|
619
|
+
),
|
|
620
|
+
cast_to=object,
|
|
621
|
+
)
|
|
622
|
+
|
|
623
|
+
async def inspect(
|
|
624
|
+
self,
|
|
625
|
+
id: str,
|
|
626
|
+
*,
|
|
627
|
+
github_auth_token: Optional[str] | Omit = omit,
|
|
628
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
629
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
630
|
+
extra_headers: Headers | None = None,
|
|
631
|
+
extra_query: Query | None = None,
|
|
632
|
+
extra_body: Body | None = None,
|
|
633
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
634
|
+
idempotency_key: str | None = None,
|
|
635
|
+
) -> RepositoryInspectionDetails:
|
|
636
|
+
"""
|
|
637
|
+
Inspect a repository connection by inspecting the specified version including
|
|
638
|
+
repo's technical stack and developer environment requirements.
|
|
639
|
+
|
|
640
|
+
Args:
|
|
641
|
+
github_auth_token: GitHub authentication token for accessing private repositories.
|
|
642
|
+
|
|
643
|
+
extra_headers: Send extra headers
|
|
644
|
+
|
|
645
|
+
extra_query: Add additional query parameters to the request
|
|
646
|
+
|
|
647
|
+
extra_body: Add additional JSON properties to the request
|
|
648
|
+
|
|
649
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
650
|
+
|
|
651
|
+
idempotency_key: Specify a custom idempotency key for this request
|
|
652
|
+
"""
|
|
653
|
+
if not id:
|
|
654
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
655
|
+
return await self._post(
|
|
656
|
+
f"/v1/repositories/{id}/inspect",
|
|
657
|
+
body=await async_maybe_transform(
|
|
658
|
+
{"github_auth_token": github_auth_token}, repository_inspect_params.RepositoryInspectParams
|
|
659
|
+
),
|
|
660
|
+
options=make_request_options(
|
|
661
|
+
extra_headers=extra_headers,
|
|
662
|
+
extra_query=extra_query,
|
|
663
|
+
extra_body=extra_body,
|
|
664
|
+
timeout=timeout,
|
|
665
|
+
idempotency_key=idempotency_key,
|
|
666
|
+
),
|
|
667
|
+
cast_to=RepositoryInspectionDetails,
|
|
668
|
+
)
|
|
669
|
+
|
|
670
|
+
async def list_inspections(
|
|
671
|
+
self,
|
|
672
|
+
id: str,
|
|
673
|
+
*,
|
|
674
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
675
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
676
|
+
extra_headers: Headers | None = None,
|
|
677
|
+
extra_query: Query | None = None,
|
|
678
|
+
extra_body: Body | None = None,
|
|
679
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
680
|
+
) -> RepositoryInspectionListView:
|
|
681
|
+
"""
|
|
682
|
+
List all inspections of a repository connection including automatically
|
|
683
|
+
generated insights for each inspection.
|
|
684
|
+
|
|
685
|
+
Args:
|
|
686
|
+
extra_headers: Send extra headers
|
|
687
|
+
|
|
688
|
+
extra_query: Add additional query parameters to the request
|
|
689
|
+
|
|
690
|
+
extra_body: Add additional JSON properties to the request
|
|
691
|
+
|
|
692
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
693
|
+
"""
|
|
694
|
+
if not id:
|
|
695
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
696
|
+
return await self._get(
|
|
697
|
+
f"/v1/repositories/{id}/inspections",
|
|
698
|
+
options=make_request_options(
|
|
699
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
700
|
+
),
|
|
701
|
+
cast_to=RepositoryInspectionListView,
|
|
702
|
+
)
|
|
703
|
+
|
|
704
|
+
@typing_extensions.deprecated("deprecated")
|
|
705
|
+
async def refresh(
|
|
706
|
+
self,
|
|
707
|
+
id: str,
|
|
708
|
+
*,
|
|
709
|
+
blueprint_id: Optional[str] | Omit = omit,
|
|
710
|
+
github_auth_token: Optional[str] | Omit = omit,
|
|
711
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
712
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
713
|
+
extra_headers: Headers | None = None,
|
|
714
|
+
extra_query: Query | None = None,
|
|
715
|
+
extra_body: Body | None = None,
|
|
716
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
717
|
+
idempotency_key: str | None = None,
|
|
718
|
+
) -> object:
|
|
719
|
+
"""
|
|
720
|
+
Refresh a repository connection by inspecting the latest version including
|
|
721
|
+
repo's technical stack and developer environment requirements.
|
|
722
|
+
|
|
723
|
+
Args:
|
|
724
|
+
blueprint_id: ID of blueprint to use as base for resulting RepositoryVersion blueprint.
|
|
725
|
+
|
|
726
|
+
github_auth_token: GitHub authentication token for accessing private repositories.
|
|
727
|
+
|
|
728
|
+
extra_headers: Send extra headers
|
|
729
|
+
|
|
730
|
+
extra_query: Add additional query parameters to the request
|
|
731
|
+
|
|
732
|
+
extra_body: Add additional JSON properties to the request
|
|
733
|
+
|
|
734
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
735
|
+
|
|
736
|
+
idempotency_key: Specify a custom idempotency key for this request
|
|
737
|
+
"""
|
|
738
|
+
if not id:
|
|
739
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
740
|
+
return await self._post(
|
|
741
|
+
f"/v1/repositories/{id}/refresh",
|
|
742
|
+
body=await async_maybe_transform(
|
|
743
|
+
{
|
|
744
|
+
"blueprint_id": blueprint_id,
|
|
745
|
+
"github_auth_token": github_auth_token,
|
|
746
|
+
},
|
|
747
|
+
repository_refresh_params.RepositoryRefreshParams,
|
|
748
|
+
),
|
|
749
|
+
options=make_request_options(
|
|
750
|
+
extra_headers=extra_headers,
|
|
751
|
+
extra_query=extra_query,
|
|
752
|
+
extra_body=extra_body,
|
|
753
|
+
timeout=timeout,
|
|
754
|
+
idempotency_key=idempotency_key,
|
|
755
|
+
),
|
|
756
|
+
cast_to=object,
|
|
757
|
+
)
|
|
758
|
+
|
|
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
|
+
|
|
792
|
+
|
|
793
|
+
class RepositoriesResourceWithRawResponse:
|
|
794
|
+
def __init__(self, repositories: RepositoriesResource) -> None:
|
|
795
|
+
self._repositories = repositories
|
|
796
|
+
|
|
797
|
+
self.create = to_raw_response_wrapper(
|
|
798
|
+
repositories.create,
|
|
799
|
+
)
|
|
800
|
+
self.retrieve = to_raw_response_wrapper(
|
|
801
|
+
repositories.retrieve,
|
|
802
|
+
)
|
|
803
|
+
self.list = to_raw_response_wrapper(
|
|
804
|
+
repositories.list,
|
|
805
|
+
)
|
|
806
|
+
self.delete = to_raw_response_wrapper(
|
|
807
|
+
repositories.delete,
|
|
808
|
+
)
|
|
809
|
+
self.inspect = to_raw_response_wrapper(
|
|
810
|
+
repositories.inspect,
|
|
811
|
+
)
|
|
812
|
+
self.list_inspections = to_raw_response_wrapper(
|
|
813
|
+
repositories.list_inspections,
|
|
814
|
+
)
|
|
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,
|
|
822
|
+
)
|
|
823
|
+
|
|
824
|
+
|
|
825
|
+
class AsyncRepositoriesResourceWithRawResponse:
|
|
826
|
+
def __init__(self, repositories: AsyncRepositoriesResource) -> None:
|
|
827
|
+
self._repositories = repositories
|
|
828
|
+
|
|
829
|
+
self.create = async_to_raw_response_wrapper(
|
|
830
|
+
repositories.create,
|
|
831
|
+
)
|
|
832
|
+
self.retrieve = async_to_raw_response_wrapper(
|
|
833
|
+
repositories.retrieve,
|
|
834
|
+
)
|
|
835
|
+
self.list = async_to_raw_response_wrapper(
|
|
836
|
+
repositories.list,
|
|
837
|
+
)
|
|
838
|
+
self.delete = async_to_raw_response_wrapper(
|
|
839
|
+
repositories.delete,
|
|
840
|
+
)
|
|
841
|
+
self.inspect = async_to_raw_response_wrapper(
|
|
842
|
+
repositories.inspect,
|
|
843
|
+
)
|
|
844
|
+
self.list_inspections = async_to_raw_response_wrapper(
|
|
845
|
+
repositories.list_inspections,
|
|
846
|
+
)
|
|
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,
|
|
854
|
+
)
|
|
855
|
+
|
|
856
|
+
|
|
857
|
+
class RepositoriesResourceWithStreamingResponse:
|
|
858
|
+
def __init__(self, repositories: RepositoriesResource) -> None:
|
|
859
|
+
self._repositories = repositories
|
|
860
|
+
|
|
861
|
+
self.create = to_streamed_response_wrapper(
|
|
862
|
+
repositories.create,
|
|
863
|
+
)
|
|
864
|
+
self.retrieve = to_streamed_response_wrapper(
|
|
865
|
+
repositories.retrieve,
|
|
866
|
+
)
|
|
867
|
+
self.list = to_streamed_response_wrapper(
|
|
868
|
+
repositories.list,
|
|
869
|
+
)
|
|
870
|
+
self.delete = to_streamed_response_wrapper(
|
|
871
|
+
repositories.delete,
|
|
872
|
+
)
|
|
873
|
+
self.inspect = to_streamed_response_wrapper(
|
|
874
|
+
repositories.inspect,
|
|
875
|
+
)
|
|
876
|
+
self.list_inspections = to_streamed_response_wrapper(
|
|
877
|
+
repositories.list_inspections,
|
|
878
|
+
)
|
|
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,
|
|
886
|
+
)
|
|
887
|
+
|
|
888
|
+
|
|
889
|
+
class AsyncRepositoriesResourceWithStreamingResponse:
|
|
890
|
+
def __init__(self, repositories: AsyncRepositoriesResource) -> None:
|
|
891
|
+
self._repositories = repositories
|
|
892
|
+
|
|
893
|
+
self.create = async_to_streamed_response_wrapper(
|
|
894
|
+
repositories.create,
|
|
895
|
+
)
|
|
896
|
+
self.retrieve = async_to_streamed_response_wrapper(
|
|
897
|
+
repositories.retrieve,
|
|
898
|
+
)
|
|
899
|
+
self.list = async_to_streamed_response_wrapper(
|
|
900
|
+
repositories.list,
|
|
901
|
+
)
|
|
902
|
+
self.delete = async_to_streamed_response_wrapper(
|
|
903
|
+
repositories.delete,
|
|
904
|
+
)
|
|
905
|
+
self.inspect = async_to_streamed_response_wrapper(
|
|
906
|
+
repositories.inspect,
|
|
907
|
+
)
|
|
908
|
+
self.list_inspections = async_to_streamed_response_wrapper(
|
|
909
|
+
repositories.list_inspections,
|
|
910
|
+
)
|
|
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,
|
|
918
|
+
)
|