windmill-api 1.478.0__py3-none-any.whl → 1.479.0__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.
Potentially problematic release.
This version of windmill-api might be problematic. Click here for more details.
- windmill_api/api/app/list_app_paths_from_workspace_runnable.py +176 -0
- windmill_api/api/git_sync/__init__.py +0 -0
- windmill_api/api/git_sync/delete_from_workspace.py +107 -0
- windmill_api/api/git_sync/export_installation.py +174 -0
- windmill_api/api/git_sync/get_global_connected_repositories.py +131 -0
- windmill_api/api/git_sync/import_installation.py +111 -0
- windmill_api/api/{workspace/set_automatic_billing.py → git_sync/install_from_workspace.py} +11 -9
- windmill_api/api/script/list_script_paths_from_workspace_runnable.py +161 -0
- windmill_api/api/workspace/get_copilot_info.py +65 -6
- windmill_api/api/workspace/get_github_app_token.py +170 -0
- windmill_api/models/ai_config.py +107 -0
- windmill_api/models/{get_settings_response_200_ai_resource.py → ai_config_code_completion_model.py} +15 -15
- windmill_api/models/{get_settings_response_200_ai_resource_provider.py → ai_config_code_completion_model_provider.py} +2 -1
- windmill_api/models/{edit_copilot_config_json_body_ai_resource.py → ai_config_default_model.py} +15 -15
- windmill_api/models/{edit_copilot_config_json_body_ai_resource_provider.py → ai_config_default_model_provider.py} +2 -1
- windmill_api/models/ai_config_providers.py +60 -0
- windmill_api/models/ai_config_providers_additional_property.py +65 -0
- windmill_api/models/ai_provider.py +1 -0
- windmill_api/models/ai_provider_config.py +65 -0
- windmill_api/models/{ai_resource.py → ai_provider_model.py} +15 -15
- windmill_api/models/{ai_resource_provider.py → ai_provider_model_provider.py} +2 -1
- windmill_api/models/archive_script_by_hash_response_200_language.py +2 -0
- windmill_api/models/authentication_method.py +13 -0
- windmill_api/models/completed_job_language.py +2 -0
- windmill_api/models/create_http_trigger_json_body.py +16 -6
- windmill_api/models/create_http_trigger_json_body_authentication_method.py +13 -0
- windmill_api/models/create_schedule_json_body.py +8 -0
- windmill_api/models/create_script_json_body_language.py +2 -0
- windmill_api/models/delete_completed_job_response_200_language.py +2 -0
- windmill_api/models/delete_script_by_hash_response_200_language.py +2 -0
- windmill_api/models/edit_copilot_config_json_body.py +50 -30
- windmill_api/models/edit_copilot_config_json_body_code_completion_model.py +69 -0
- windmill_api/models/edit_copilot_config_json_body_code_completion_model_provider.py +16 -0
- windmill_api/models/edit_copilot_config_json_body_default_model.py +67 -0
- windmill_api/models/edit_copilot_config_json_body_default_model_provider.py +16 -0
- windmill_api/models/edit_copilot_config_json_body_providers.py +66 -0
- windmill_api/models/edit_copilot_config_json_body_providers_additional_property.py +65 -0
- windmill_api/models/edit_http_trigger.py +16 -6
- windmill_api/models/edit_http_trigger_authentication_method.py +13 -0
- windmill_api/models/edit_schedule.py +8 -0
- windmill_api/models/{set_automatic_billing_json_body.py → export_installation_response_200.py} +13 -23
- windmill_api/models/extended_jobs_jobs_item_type_0_language.py +2 -0
- windmill_api/models/extended_jobs_jobs_item_type_1_language.py +2 -0
- windmill_api/models/get_completed_job_response_200_language.py +2 -0
- windmill_api/models/get_copilot_info_response_200.py +111 -0
- windmill_api/models/get_copilot_info_response_200_code_completion_model.py +69 -0
- windmill_api/models/get_copilot_info_response_200_code_completion_model_provider.py +16 -0
- windmill_api/models/get_copilot_info_response_200_default_model.py +67 -0
- windmill_api/models/get_copilot_info_response_200_default_model_provider.py +16 -0
- windmill_api/models/get_copilot_info_response_200_providers.py +66 -0
- windmill_api/models/get_copilot_info_response_200_providers_additional_property.py +65 -0
- windmill_api/models/get_github_app_token_json_body.py +58 -0
- windmill_api/models/get_github_app_token_response_200.py +58 -0
- windmill_api/models/get_global_connected_repositories_response_200_item.py +104 -0
- windmill_api/models/get_global_connected_repositories_response_200_item_repositories_item.py +65 -0
- windmill_api/models/get_http_trigger_response_200.py +17 -6
- windmill_api/models/get_http_trigger_response_200_authentication_method.py +13 -0
- windmill_api/models/get_job_response_200_type_0_language.py +2 -0
- windmill_api/models/get_job_response_200_type_1_language.py +2 -0
- windmill_api/models/get_premium_info_response_200.py +7 -14
- windmill_api/models/get_schedule_response_200.py +8 -0
- windmill_api/models/get_script_by_hash_response_200_language.py +2 -0
- windmill_api/models/get_script_by_path_response_200_language.py +2 -0
- windmill_api/models/get_script_by_path_with_draft_response_200_draft_language.py +2 -0
- windmill_api/models/get_script_by_path_with_draft_response_200_language.py +2 -0
- windmill_api/models/get_settings_response_200.py +16 -39
- windmill_api/models/get_settings_response_200_ai_config.py +113 -0
- windmill_api/models/get_settings_response_200_ai_config_code_completion_model.py +69 -0
- windmill_api/models/get_settings_response_200_ai_config_code_completion_model_provider.py +16 -0
- windmill_api/models/get_settings_response_200_ai_config_default_model.py +69 -0
- windmill_api/models/get_settings_response_200_ai_config_default_model_provider.py +16 -0
- windmill_api/models/get_settings_response_200_ai_config_providers.py +66 -0
- windmill_api/models/get_settings_response_200_ai_config_providers_additional_property.py +65 -0
- windmill_api/models/get_suspended_job_flow_response_200_job_type_0_language.py +2 -0
- windmill_api/models/get_suspended_job_flow_response_200_job_type_1_language.py +2 -0
- windmill_api/models/github_installations_item.py +98 -0
- windmill_api/models/github_installations_item_repositories_item.py +65 -0
- windmill_api/models/http_trigger.py +17 -6
- windmill_api/models/http_trigger_authentication_method.py +13 -0
- windmill_api/models/import_installation_json_body.py +58 -0
- windmill_api/models/install_from_workspace_json_body.py +65 -0
- windmill_api/models/job_type_0_language.py +2 -0
- windmill_api/models/job_type_1_language.py +2 -0
- windmill_api/models/list_app_paths_from_workspace_runnable_runnable_kind.py +9 -0
- windmill_api/models/list_completed_jobs_response_200_item_language.py +2 -0
- windmill_api/models/list_extended_jobs_response_200_jobs_item_type_0_language.py +2 -0
- windmill_api/models/list_extended_jobs_response_200_jobs_item_type_1_language.py +2 -0
- windmill_api/models/list_http_triggers_response_200_item.py +19 -6
- windmill_api/models/list_http_triggers_response_200_item_authentication_method.py +13 -0
- windmill_api/models/list_jobs_response_200_item_type_0_language.py +2 -0
- windmill_api/models/list_jobs_response_200_item_type_1_language.py +2 -0
- windmill_api/models/list_queue_response_200_item_language.py +2 -0
- windmill_api/models/list_schedules_response_200_item.py +8 -0
- windmill_api/models/list_schedules_with_jobs_response_200_item.py +8 -0
- windmill_api/models/list_scripts_response_200_item_language.py +2 -0
- windmill_api/models/new_http_trigger.py +16 -6
- windmill_api/models/new_http_trigger_authentication_method.py +13 -0
- windmill_api/models/new_schedule.py +8 -0
- windmill_api/models/new_script_language.py +2 -0
- windmill_api/models/new_script_with_draft_draft_language.py +2 -0
- windmill_api/models/new_script_with_draft_language.py +2 -0
- windmill_api/models/preview_language.py +2 -0
- windmill_api/models/queued_job_language.py +2 -0
- windmill_api/models/raw_script_for_dependencies_language.py +2 -0
- windmill_api/models/run_raw_script_dependencies_json_body_raw_scripts_item_language.py +2 -0
- windmill_api/models/run_script_preview_json_body_language.py +2 -0
- windmill_api/models/schedule.py +8 -0
- windmill_api/models/schedule_w_jobs.py +8 -0
- windmill_api/models/script_lang.py +2 -0
- windmill_api/models/script_language.py +2 -0
- windmill_api/models/update_http_trigger_json_body.py +16 -6
- windmill_api/models/update_http_trigger_json_body_authentication_method.py +13 -0
- windmill_api/models/update_schedule_json_body.py +8 -0
- windmill_api/models/workspace_github_installation.py +65 -0
- {windmill_api-1.478.0.dist-info → windmill_api-1.479.0.dist-info}/METADATA +1 -1
- {windmill_api-1.478.0.dist-info → windmill_api-1.479.0.dist-info}/RECORD +118 -68
- {windmill_api-1.478.0.dist-info → windmill_api-1.479.0.dist-info}/LICENSE +0 -0
- {windmill_api-1.478.0.dist-info → windmill_api-1.479.0.dist-info}/WHEEL +0 -0
|
@@ -5,14 +5,14 @@ import httpx
|
|
|
5
5
|
|
|
6
6
|
from ... import errors
|
|
7
7
|
from ...client import AuthenticatedClient, Client
|
|
8
|
-
from ...models.
|
|
8
|
+
from ...models.install_from_workspace_json_body import InstallFromWorkspaceJsonBody
|
|
9
9
|
from ...types import Response
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
def _get_kwargs(
|
|
13
13
|
workspace: str,
|
|
14
14
|
*,
|
|
15
|
-
json_body:
|
|
15
|
+
json_body: InstallFromWorkspaceJsonBody,
|
|
16
16
|
) -> Dict[str, Any]:
|
|
17
17
|
pass
|
|
18
18
|
|
|
@@ -20,7 +20,7 @@ def _get_kwargs(
|
|
|
20
20
|
|
|
21
21
|
return {
|
|
22
22
|
"method": "post",
|
|
23
|
-
"url": "/w/{workspace}/
|
|
23
|
+
"url": "/w/{workspace}/github_app/install_from_workspace".format(
|
|
24
24
|
workspace=workspace,
|
|
25
25
|
),
|
|
26
26
|
"json": json_json_body,
|
|
@@ -28,6 +28,8 @@ def _get_kwargs(
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
|
|
31
|
+
if response.status_code == HTTPStatus.OK:
|
|
32
|
+
return None
|
|
31
33
|
if client.raise_on_unexpected_status:
|
|
32
34
|
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
33
35
|
else:
|
|
@@ -47,13 +49,13 @@ def sync_detailed(
|
|
|
47
49
|
workspace: str,
|
|
48
50
|
*,
|
|
49
51
|
client: Union[AuthenticatedClient, Client],
|
|
50
|
-
json_body:
|
|
52
|
+
json_body: InstallFromWorkspaceJsonBody,
|
|
51
53
|
) -> Response[Any]:
|
|
52
|
-
"""
|
|
54
|
+
"""Install a GitHub installation from another workspace
|
|
53
55
|
|
|
54
56
|
Args:
|
|
55
57
|
workspace (str):
|
|
56
|
-
json_body (
|
|
58
|
+
json_body (InstallFromWorkspaceJsonBody):
|
|
57
59
|
|
|
58
60
|
Raises:
|
|
59
61
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
@@ -79,13 +81,13 @@ async def asyncio_detailed(
|
|
|
79
81
|
workspace: str,
|
|
80
82
|
*,
|
|
81
83
|
client: Union[AuthenticatedClient, Client],
|
|
82
|
-
json_body:
|
|
84
|
+
json_body: InstallFromWorkspaceJsonBody,
|
|
83
85
|
) -> Response[Any]:
|
|
84
|
-
"""
|
|
86
|
+
"""Install a GitHub installation from another workspace
|
|
85
87
|
|
|
86
88
|
Args:
|
|
87
89
|
workspace (str):
|
|
88
|
-
json_body (
|
|
90
|
+
json_body (InstallFromWorkspaceJsonBody):
|
|
89
91
|
|
|
90
92
|
Raises:
|
|
91
93
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Dict, List, Optional, Union, cast
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...types import Response
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def _get_kwargs(
|
|
12
|
+
workspace: str,
|
|
13
|
+
path: str,
|
|
14
|
+
) -> Dict[str, Any]:
|
|
15
|
+
pass
|
|
16
|
+
|
|
17
|
+
return {
|
|
18
|
+
"method": "get",
|
|
19
|
+
"url": "/w/{workspace}/scripts/list_paths_from_workspace_runnable/{path}".format(
|
|
20
|
+
workspace=workspace,
|
|
21
|
+
path=path,
|
|
22
|
+
),
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[List[str]]:
|
|
27
|
+
if response.status_code == HTTPStatus.OK:
|
|
28
|
+
response_200 = cast(List[str], response.json())
|
|
29
|
+
|
|
30
|
+
return response_200
|
|
31
|
+
if client.raise_on_unexpected_status:
|
|
32
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
33
|
+
else:
|
|
34
|
+
return None
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[List[str]]:
|
|
38
|
+
return Response(
|
|
39
|
+
status_code=HTTPStatus(response.status_code),
|
|
40
|
+
content=response.content,
|
|
41
|
+
headers=response.headers,
|
|
42
|
+
parsed=_parse_response(client=client, response=response),
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def sync_detailed(
|
|
47
|
+
workspace: str,
|
|
48
|
+
path: str,
|
|
49
|
+
*,
|
|
50
|
+
client: Union[AuthenticatedClient, Client],
|
|
51
|
+
) -> Response[List[str]]:
|
|
52
|
+
"""list script paths using provided script as a relative import
|
|
53
|
+
|
|
54
|
+
Args:
|
|
55
|
+
workspace (str):
|
|
56
|
+
path (str):
|
|
57
|
+
|
|
58
|
+
Raises:
|
|
59
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
60
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
61
|
+
|
|
62
|
+
Returns:
|
|
63
|
+
Response[List[str]]
|
|
64
|
+
"""
|
|
65
|
+
|
|
66
|
+
kwargs = _get_kwargs(
|
|
67
|
+
workspace=workspace,
|
|
68
|
+
path=path,
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
response = client.get_httpx_client().request(
|
|
72
|
+
**kwargs,
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
return _build_response(client=client, response=response)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
def sync(
|
|
79
|
+
workspace: str,
|
|
80
|
+
path: str,
|
|
81
|
+
*,
|
|
82
|
+
client: Union[AuthenticatedClient, Client],
|
|
83
|
+
) -> Optional[List[str]]:
|
|
84
|
+
"""list script paths using provided script as a relative import
|
|
85
|
+
|
|
86
|
+
Args:
|
|
87
|
+
workspace (str):
|
|
88
|
+
path (str):
|
|
89
|
+
|
|
90
|
+
Raises:
|
|
91
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
92
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
93
|
+
|
|
94
|
+
Returns:
|
|
95
|
+
List[str]
|
|
96
|
+
"""
|
|
97
|
+
|
|
98
|
+
return sync_detailed(
|
|
99
|
+
workspace=workspace,
|
|
100
|
+
path=path,
|
|
101
|
+
client=client,
|
|
102
|
+
).parsed
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
async def asyncio_detailed(
|
|
106
|
+
workspace: str,
|
|
107
|
+
path: str,
|
|
108
|
+
*,
|
|
109
|
+
client: Union[AuthenticatedClient, Client],
|
|
110
|
+
) -> Response[List[str]]:
|
|
111
|
+
"""list script paths using provided script as a relative import
|
|
112
|
+
|
|
113
|
+
Args:
|
|
114
|
+
workspace (str):
|
|
115
|
+
path (str):
|
|
116
|
+
|
|
117
|
+
Raises:
|
|
118
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
119
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
120
|
+
|
|
121
|
+
Returns:
|
|
122
|
+
Response[List[str]]
|
|
123
|
+
"""
|
|
124
|
+
|
|
125
|
+
kwargs = _get_kwargs(
|
|
126
|
+
workspace=workspace,
|
|
127
|
+
path=path,
|
|
128
|
+
)
|
|
129
|
+
|
|
130
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
131
|
+
|
|
132
|
+
return _build_response(client=client, response=response)
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
async def asyncio(
|
|
136
|
+
workspace: str,
|
|
137
|
+
path: str,
|
|
138
|
+
*,
|
|
139
|
+
client: Union[AuthenticatedClient, Client],
|
|
140
|
+
) -> Optional[List[str]]:
|
|
141
|
+
"""list script paths using provided script as a relative import
|
|
142
|
+
|
|
143
|
+
Args:
|
|
144
|
+
workspace (str):
|
|
145
|
+
path (str):
|
|
146
|
+
|
|
147
|
+
Raises:
|
|
148
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
149
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
150
|
+
|
|
151
|
+
Returns:
|
|
152
|
+
List[str]
|
|
153
|
+
"""
|
|
154
|
+
|
|
155
|
+
return (
|
|
156
|
+
await asyncio_detailed(
|
|
157
|
+
workspace=workspace,
|
|
158
|
+
path=path,
|
|
159
|
+
client=client,
|
|
160
|
+
)
|
|
161
|
+
).parsed
|
|
@@ -5,6 +5,7 @@ import httpx
|
|
|
5
5
|
|
|
6
6
|
from ... import errors
|
|
7
7
|
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.get_copilot_info_response_200 import GetCopilotInfoResponse200
|
|
8
9
|
from ...types import Response
|
|
9
10
|
|
|
10
11
|
|
|
@@ -21,14 +22,22 @@ def _get_kwargs(
|
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
|
|
24
|
-
def _parse_response(
|
|
25
|
+
def _parse_response(
|
|
26
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
27
|
+
) -> Optional[GetCopilotInfoResponse200]:
|
|
28
|
+
if response.status_code == HTTPStatus.OK:
|
|
29
|
+
response_200 = GetCopilotInfoResponse200.from_dict(response.json())
|
|
30
|
+
|
|
31
|
+
return response_200
|
|
25
32
|
if client.raise_on_unexpected_status:
|
|
26
33
|
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
27
34
|
else:
|
|
28
35
|
return None
|
|
29
36
|
|
|
30
37
|
|
|
31
|
-
def _build_response(
|
|
38
|
+
def _build_response(
|
|
39
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
40
|
+
) -> Response[GetCopilotInfoResponse200]:
|
|
32
41
|
return Response(
|
|
33
42
|
status_code=HTTPStatus(response.status_code),
|
|
34
43
|
content=response.content,
|
|
@@ -41,7 +50,7 @@ def sync_detailed(
|
|
|
41
50
|
workspace: str,
|
|
42
51
|
*,
|
|
43
52
|
client: Union[AuthenticatedClient, Client],
|
|
44
|
-
) -> Response[
|
|
53
|
+
) -> Response[GetCopilotInfoResponse200]:
|
|
45
54
|
"""get copilot info
|
|
46
55
|
|
|
47
56
|
Args:
|
|
@@ -52,7 +61,7 @@ def sync_detailed(
|
|
|
52
61
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
53
62
|
|
|
54
63
|
Returns:
|
|
55
|
-
Response[
|
|
64
|
+
Response[GetCopilotInfoResponse200]
|
|
56
65
|
"""
|
|
57
66
|
|
|
58
67
|
kwargs = _get_kwargs(
|
|
@@ -66,11 +75,35 @@ def sync_detailed(
|
|
|
66
75
|
return _build_response(client=client, response=response)
|
|
67
76
|
|
|
68
77
|
|
|
78
|
+
def sync(
|
|
79
|
+
workspace: str,
|
|
80
|
+
*,
|
|
81
|
+
client: Union[AuthenticatedClient, Client],
|
|
82
|
+
) -> Optional[GetCopilotInfoResponse200]:
|
|
83
|
+
"""get copilot info
|
|
84
|
+
|
|
85
|
+
Args:
|
|
86
|
+
workspace (str):
|
|
87
|
+
|
|
88
|
+
Raises:
|
|
89
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
90
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
91
|
+
|
|
92
|
+
Returns:
|
|
93
|
+
GetCopilotInfoResponse200
|
|
94
|
+
"""
|
|
95
|
+
|
|
96
|
+
return sync_detailed(
|
|
97
|
+
workspace=workspace,
|
|
98
|
+
client=client,
|
|
99
|
+
).parsed
|
|
100
|
+
|
|
101
|
+
|
|
69
102
|
async def asyncio_detailed(
|
|
70
103
|
workspace: str,
|
|
71
104
|
*,
|
|
72
105
|
client: Union[AuthenticatedClient, Client],
|
|
73
|
-
) -> Response[
|
|
106
|
+
) -> Response[GetCopilotInfoResponse200]:
|
|
74
107
|
"""get copilot info
|
|
75
108
|
|
|
76
109
|
Args:
|
|
@@ -81,7 +114,7 @@ async def asyncio_detailed(
|
|
|
81
114
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
82
115
|
|
|
83
116
|
Returns:
|
|
84
|
-
Response[
|
|
117
|
+
Response[GetCopilotInfoResponse200]
|
|
85
118
|
"""
|
|
86
119
|
|
|
87
120
|
kwargs = _get_kwargs(
|
|
@@ -91,3 +124,29 @@ async def asyncio_detailed(
|
|
|
91
124
|
response = await client.get_async_httpx_client().request(**kwargs)
|
|
92
125
|
|
|
93
126
|
return _build_response(client=client, response=response)
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
async def asyncio(
|
|
130
|
+
workspace: str,
|
|
131
|
+
*,
|
|
132
|
+
client: Union[AuthenticatedClient, Client],
|
|
133
|
+
) -> Optional[GetCopilotInfoResponse200]:
|
|
134
|
+
"""get copilot info
|
|
135
|
+
|
|
136
|
+
Args:
|
|
137
|
+
workspace (str):
|
|
138
|
+
|
|
139
|
+
Raises:
|
|
140
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
141
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
142
|
+
|
|
143
|
+
Returns:
|
|
144
|
+
GetCopilotInfoResponse200
|
|
145
|
+
"""
|
|
146
|
+
|
|
147
|
+
return (
|
|
148
|
+
await asyncio_detailed(
|
|
149
|
+
workspace=workspace,
|
|
150
|
+
client=client,
|
|
151
|
+
)
|
|
152
|
+
).parsed
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Dict, Optional, Union
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.get_github_app_token_json_body import GetGithubAppTokenJsonBody
|
|
9
|
+
from ...models.get_github_app_token_response_200 import GetGithubAppTokenResponse200
|
|
10
|
+
from ...types import Response
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def _get_kwargs(
|
|
14
|
+
workspace: str,
|
|
15
|
+
*,
|
|
16
|
+
json_body: GetGithubAppTokenJsonBody,
|
|
17
|
+
) -> Dict[str, Any]:
|
|
18
|
+
pass
|
|
19
|
+
|
|
20
|
+
json_json_body = json_body.to_dict()
|
|
21
|
+
|
|
22
|
+
return {
|
|
23
|
+
"method": "post",
|
|
24
|
+
"url": "/w/{workspace}/github_app/token".format(
|
|
25
|
+
workspace=workspace,
|
|
26
|
+
),
|
|
27
|
+
"json": json_json_body,
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def _parse_response(
|
|
32
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
33
|
+
) -> Optional[GetGithubAppTokenResponse200]:
|
|
34
|
+
if response.status_code == HTTPStatus.OK:
|
|
35
|
+
response_200 = GetGithubAppTokenResponse200.from_dict(response.json())
|
|
36
|
+
|
|
37
|
+
return response_200
|
|
38
|
+
if client.raise_on_unexpected_status:
|
|
39
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
40
|
+
else:
|
|
41
|
+
return None
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def _build_response(
|
|
45
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
46
|
+
) -> Response[GetGithubAppTokenResponse200]:
|
|
47
|
+
return Response(
|
|
48
|
+
status_code=HTTPStatus(response.status_code),
|
|
49
|
+
content=response.content,
|
|
50
|
+
headers=response.headers,
|
|
51
|
+
parsed=_parse_response(client=client, response=response),
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def sync_detailed(
|
|
56
|
+
workspace: str,
|
|
57
|
+
*,
|
|
58
|
+
client: Union[AuthenticatedClient, Client],
|
|
59
|
+
json_body: GetGithubAppTokenJsonBody,
|
|
60
|
+
) -> Response[GetGithubAppTokenResponse200]:
|
|
61
|
+
"""get github app token
|
|
62
|
+
|
|
63
|
+
Args:
|
|
64
|
+
workspace (str):
|
|
65
|
+
json_body (GetGithubAppTokenJsonBody):
|
|
66
|
+
|
|
67
|
+
Raises:
|
|
68
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
69
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
70
|
+
|
|
71
|
+
Returns:
|
|
72
|
+
Response[GetGithubAppTokenResponse200]
|
|
73
|
+
"""
|
|
74
|
+
|
|
75
|
+
kwargs = _get_kwargs(
|
|
76
|
+
workspace=workspace,
|
|
77
|
+
json_body=json_body,
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
response = client.get_httpx_client().request(
|
|
81
|
+
**kwargs,
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
return _build_response(client=client, response=response)
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
def sync(
|
|
88
|
+
workspace: str,
|
|
89
|
+
*,
|
|
90
|
+
client: Union[AuthenticatedClient, Client],
|
|
91
|
+
json_body: GetGithubAppTokenJsonBody,
|
|
92
|
+
) -> Optional[GetGithubAppTokenResponse200]:
|
|
93
|
+
"""get github app token
|
|
94
|
+
|
|
95
|
+
Args:
|
|
96
|
+
workspace (str):
|
|
97
|
+
json_body (GetGithubAppTokenJsonBody):
|
|
98
|
+
|
|
99
|
+
Raises:
|
|
100
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
101
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
102
|
+
|
|
103
|
+
Returns:
|
|
104
|
+
GetGithubAppTokenResponse200
|
|
105
|
+
"""
|
|
106
|
+
|
|
107
|
+
return sync_detailed(
|
|
108
|
+
workspace=workspace,
|
|
109
|
+
client=client,
|
|
110
|
+
json_body=json_body,
|
|
111
|
+
).parsed
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
async def asyncio_detailed(
|
|
115
|
+
workspace: str,
|
|
116
|
+
*,
|
|
117
|
+
client: Union[AuthenticatedClient, Client],
|
|
118
|
+
json_body: GetGithubAppTokenJsonBody,
|
|
119
|
+
) -> Response[GetGithubAppTokenResponse200]:
|
|
120
|
+
"""get github app token
|
|
121
|
+
|
|
122
|
+
Args:
|
|
123
|
+
workspace (str):
|
|
124
|
+
json_body (GetGithubAppTokenJsonBody):
|
|
125
|
+
|
|
126
|
+
Raises:
|
|
127
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
128
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
129
|
+
|
|
130
|
+
Returns:
|
|
131
|
+
Response[GetGithubAppTokenResponse200]
|
|
132
|
+
"""
|
|
133
|
+
|
|
134
|
+
kwargs = _get_kwargs(
|
|
135
|
+
workspace=workspace,
|
|
136
|
+
json_body=json_body,
|
|
137
|
+
)
|
|
138
|
+
|
|
139
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
140
|
+
|
|
141
|
+
return _build_response(client=client, response=response)
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
async def asyncio(
|
|
145
|
+
workspace: str,
|
|
146
|
+
*,
|
|
147
|
+
client: Union[AuthenticatedClient, Client],
|
|
148
|
+
json_body: GetGithubAppTokenJsonBody,
|
|
149
|
+
) -> Optional[GetGithubAppTokenResponse200]:
|
|
150
|
+
"""get github app token
|
|
151
|
+
|
|
152
|
+
Args:
|
|
153
|
+
workspace (str):
|
|
154
|
+
json_body (GetGithubAppTokenJsonBody):
|
|
155
|
+
|
|
156
|
+
Raises:
|
|
157
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
158
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
159
|
+
|
|
160
|
+
Returns:
|
|
161
|
+
GetGithubAppTokenResponse200
|
|
162
|
+
"""
|
|
163
|
+
|
|
164
|
+
return (
|
|
165
|
+
await asyncio_detailed(
|
|
166
|
+
workspace=workspace,
|
|
167
|
+
client=client,
|
|
168
|
+
json_body=json_body,
|
|
169
|
+
)
|
|
170
|
+
).parsed
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
|
|
2
|
+
|
|
3
|
+
from attrs import define as _attrs_define
|
|
4
|
+
from attrs import field as _attrs_field
|
|
5
|
+
|
|
6
|
+
from ..types import UNSET, Unset
|
|
7
|
+
|
|
8
|
+
if TYPE_CHECKING:
|
|
9
|
+
from ..models.ai_config_code_completion_model import AIConfigCodeCompletionModel
|
|
10
|
+
from ..models.ai_config_default_model import AIConfigDefaultModel
|
|
11
|
+
from ..models.ai_config_providers import AIConfigProviders
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
T = TypeVar("T", bound="AIConfig")
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@_attrs_define
|
|
18
|
+
class AIConfig:
|
|
19
|
+
"""
|
|
20
|
+
Attributes:
|
|
21
|
+
providers (Union[Unset, AIConfigProviders]):
|
|
22
|
+
default_model (Union[Unset, AIConfigDefaultModel]):
|
|
23
|
+
code_completion_model (Union[Unset, AIConfigCodeCompletionModel]):
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
providers: Union[Unset, "AIConfigProviders"] = UNSET
|
|
27
|
+
default_model: Union[Unset, "AIConfigDefaultModel"] = UNSET
|
|
28
|
+
code_completion_model: Union[Unset, "AIConfigCodeCompletionModel"] = UNSET
|
|
29
|
+
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
30
|
+
|
|
31
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
32
|
+
providers: Union[Unset, Dict[str, Any]] = UNSET
|
|
33
|
+
if not isinstance(self.providers, Unset):
|
|
34
|
+
providers = self.providers.to_dict()
|
|
35
|
+
|
|
36
|
+
default_model: Union[Unset, Dict[str, Any]] = UNSET
|
|
37
|
+
if not isinstance(self.default_model, Unset):
|
|
38
|
+
default_model = self.default_model.to_dict()
|
|
39
|
+
|
|
40
|
+
code_completion_model: Union[Unset, Dict[str, Any]] = UNSET
|
|
41
|
+
if not isinstance(self.code_completion_model, Unset):
|
|
42
|
+
code_completion_model = self.code_completion_model.to_dict()
|
|
43
|
+
|
|
44
|
+
field_dict: Dict[str, Any] = {}
|
|
45
|
+
field_dict.update(self.additional_properties)
|
|
46
|
+
field_dict.update({})
|
|
47
|
+
if providers is not UNSET:
|
|
48
|
+
field_dict["providers"] = providers
|
|
49
|
+
if default_model is not UNSET:
|
|
50
|
+
field_dict["default_model"] = default_model
|
|
51
|
+
if code_completion_model is not UNSET:
|
|
52
|
+
field_dict["code_completion_model"] = code_completion_model
|
|
53
|
+
|
|
54
|
+
return field_dict
|
|
55
|
+
|
|
56
|
+
@classmethod
|
|
57
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
58
|
+
from ..models.ai_config_code_completion_model import AIConfigCodeCompletionModel
|
|
59
|
+
from ..models.ai_config_default_model import AIConfigDefaultModel
|
|
60
|
+
from ..models.ai_config_providers import AIConfigProviders
|
|
61
|
+
|
|
62
|
+
d = src_dict.copy()
|
|
63
|
+
_providers = d.pop("providers", UNSET)
|
|
64
|
+
providers: Union[Unset, AIConfigProviders]
|
|
65
|
+
if isinstance(_providers, Unset):
|
|
66
|
+
providers = UNSET
|
|
67
|
+
else:
|
|
68
|
+
providers = AIConfigProviders.from_dict(_providers)
|
|
69
|
+
|
|
70
|
+
_default_model = d.pop("default_model", UNSET)
|
|
71
|
+
default_model: Union[Unset, AIConfigDefaultModel]
|
|
72
|
+
if isinstance(_default_model, Unset):
|
|
73
|
+
default_model = UNSET
|
|
74
|
+
else:
|
|
75
|
+
default_model = AIConfigDefaultModel.from_dict(_default_model)
|
|
76
|
+
|
|
77
|
+
_code_completion_model = d.pop("code_completion_model", UNSET)
|
|
78
|
+
code_completion_model: Union[Unset, AIConfigCodeCompletionModel]
|
|
79
|
+
if isinstance(_code_completion_model, Unset):
|
|
80
|
+
code_completion_model = UNSET
|
|
81
|
+
else:
|
|
82
|
+
code_completion_model = AIConfigCodeCompletionModel.from_dict(_code_completion_model)
|
|
83
|
+
|
|
84
|
+
ai_config = cls(
|
|
85
|
+
providers=providers,
|
|
86
|
+
default_model=default_model,
|
|
87
|
+
code_completion_model=code_completion_model,
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
ai_config.additional_properties = d
|
|
91
|
+
return ai_config
|
|
92
|
+
|
|
93
|
+
@property
|
|
94
|
+
def additional_keys(self) -> List[str]:
|
|
95
|
+
return list(self.additional_properties.keys())
|
|
96
|
+
|
|
97
|
+
def __getitem__(self, key: str) -> Any:
|
|
98
|
+
return self.additional_properties[key]
|
|
99
|
+
|
|
100
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
101
|
+
self.additional_properties[key] = value
|
|
102
|
+
|
|
103
|
+
def __delitem__(self, key: str) -> None:
|
|
104
|
+
del self.additional_properties[key]
|
|
105
|
+
|
|
106
|
+
def __contains__(self, key: str) -> bool:
|
|
107
|
+
return key in self.additional_properties
|
windmill_api/models/{get_settings_response_200_ai_resource.py → ai_config_code_completion_model.py}
RENAMED
|
@@ -3,32 +3,32 @@ from typing import Any, Dict, List, Type, TypeVar
|
|
|
3
3
|
from attrs import define as _attrs_define
|
|
4
4
|
from attrs import field as _attrs_field
|
|
5
5
|
|
|
6
|
-
from ..models.
|
|
6
|
+
from ..models.ai_config_code_completion_model_provider import AIConfigCodeCompletionModelProvider
|
|
7
7
|
|
|
8
|
-
T = TypeVar("T", bound="
|
|
8
|
+
T = TypeVar("T", bound="AIConfigCodeCompletionModel")
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
@_attrs_define
|
|
12
|
-
class
|
|
12
|
+
class AIConfigCodeCompletionModel:
|
|
13
13
|
"""
|
|
14
14
|
Attributes:
|
|
15
|
-
|
|
16
|
-
provider (
|
|
15
|
+
model (str):
|
|
16
|
+
provider (AIConfigCodeCompletionModelProvider):
|
|
17
17
|
"""
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
provider:
|
|
19
|
+
model: str
|
|
20
|
+
provider: AIConfigCodeCompletionModelProvider
|
|
21
21
|
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
22
22
|
|
|
23
23
|
def to_dict(self) -> Dict[str, Any]:
|
|
24
|
-
|
|
24
|
+
model = self.model
|
|
25
25
|
provider = self.provider.value
|
|
26
26
|
|
|
27
27
|
field_dict: Dict[str, Any] = {}
|
|
28
28
|
field_dict.update(self.additional_properties)
|
|
29
29
|
field_dict.update(
|
|
30
30
|
{
|
|
31
|
-
"
|
|
31
|
+
"model": model,
|
|
32
32
|
"provider": provider,
|
|
33
33
|
}
|
|
34
34
|
)
|
|
@@ -38,17 +38,17 @@ class GetSettingsResponse200AiResource:
|
|
|
38
38
|
@classmethod
|
|
39
39
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
40
40
|
d = src_dict.copy()
|
|
41
|
-
|
|
41
|
+
model = d.pop("model")
|
|
42
42
|
|
|
43
|
-
provider =
|
|
43
|
+
provider = AIConfigCodeCompletionModelProvider(d.pop("provider"))
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
ai_config_code_completion_model = cls(
|
|
46
|
+
model=model,
|
|
47
47
|
provider=provider,
|
|
48
48
|
)
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
return
|
|
50
|
+
ai_config_code_completion_model.additional_properties = d
|
|
51
|
+
return ai_config_code_completion_model
|
|
52
52
|
|
|
53
53
|
@property
|
|
54
54
|
def additional_keys(self) -> List[str]:
|