moru 0.1.0__py3-none-any.whl → 0.2.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.
- moru/__init__.py +8 -0
- moru/api/__init__.py +4 -0
- moru/api/client/__init__.py +1 -1
- moru/api/client/api/sandboxes/delete_sandboxes_sandbox_id.py +4 -0
- moru/api/client/api/sandboxes/get_sandboxes.py +4 -0
- moru/api/client/api/sandboxes/get_sandboxes_metrics.py +5 -1
- moru/api/client/api/sandboxes/get_sandboxes_sandbox_id.py +4 -0
- moru/api/client/api/sandboxes/get_sandboxes_sandbox_id_logs.py +67 -23
- moru/api/client/api/sandboxes/get_sandboxes_sandbox_id_metrics.py +5 -0
- moru/api/client/api/sandboxes/get_v2_sandbox_runs.py +218 -0
- moru/api/client/api/sandboxes/get_v2_sandboxes.py +5 -2
- moru/api/client/api/sandboxes/post_sandboxes.py +4 -0
- moru/api/client/api/sandboxes/post_sandboxes_sandbox_id_connect.py +6 -0
- moru/api/client/api/sandboxes/post_sandboxes_sandbox_id_pause.py +5 -0
- moru/api/client/api/sandboxes/post_sandboxes_sandbox_id_refreshes.py +3 -0
- moru/api/client/api/sandboxes/post_sandboxes_sandbox_id_resume.py +5 -0
- moru/api/client/api/sandboxes/post_sandboxes_sandbox_id_timeout.py +4 -0
- moru/api/client/api/templates/delete_templates_template_id.py +3 -0
- moru/api/client/api/templates/get_templates.py +3 -0
- moru/api/client/api/templates/get_templates_template_id.py +3 -0
- moru/api/client/api/templates/get_templates_template_id_builds_build_id_logs.py +276 -0
- moru/api/client/api/templates/get_templates_template_id_builds_build_id_status.py +23 -4
- moru/api/client/api/templates/get_templates_template_id_files_hash.py +5 -0
- moru/api/client/api/templates/patch_templates_template_id.py +4 -0
- moru/api/client/api/templates/post_templates.py +4 -0
- moru/api/client/api/templates/post_templates_template_id.py +3 -0
- moru/api/client/api/templates/post_templates_template_id_builds_build_id.py +3 -0
- moru/api/client/api/templates/post_v2_templates.py +4 -0
- moru/api/client/api/templates/post_v3_templates.py +4 -0
- moru/api/client/api/templates/post_v_2_templates_template_id_builds_build_id.py +3 -0
- moru/api/client/models/__init__.py +30 -0
- moru/api/client/models/admin_sandbox_kill_result.py +67 -0
- moru/api/client/models/build_log_entry.py +1 -1
- moru/api/client/models/create_volume_request.py +59 -0
- moru/api/client/models/file_info.py +105 -0
- moru/api/client/models/file_info_type.py +9 -0
- moru/api/client/models/file_list_response.py +84 -0
- moru/api/client/models/logs_direction.py +9 -0
- moru/api/client/models/logs_source.py +9 -0
- moru/api/client/models/machine_info.py +83 -0
- moru/api/client/models/new_sandbox.py +19 -0
- moru/api/client/models/node.py +10 -0
- moru/api/client/models/node_detail.py +10 -0
- moru/api/client/models/sandbox_log_entry.py +9 -9
- moru/api/client/models/sandbox_log_event_type.py +11 -0
- moru/api/client/models/sandbox_run.py +130 -0
- moru/api/client/models/sandbox_run_end_reason.py +11 -0
- moru/api/client/models/sandbox_run_status.py +10 -0
- moru/api/client/models/template_build_logs_response.py +73 -0
- moru/api/client/models/upload_response.py +67 -0
- moru/api/client/models/volume.py +105 -0
- moru/sandbox/mcp.py +835 -6
- moru/sandbox_async/commands/command.py +5 -1
- moru/sandbox_async/filesystem/filesystem.py +5 -1
- moru/sandbox_async/main.py +21 -0
- moru/sandbox_async/sandbox_api.py +17 -11
- moru/sandbox_sync/filesystem/filesystem.py +5 -1
- moru/sandbox_sync/main.py +21 -0
- moru/sandbox_sync/sandbox_api.py +17 -11
- moru/volume/__init__.py +11 -0
- moru/volume/types.py +83 -0
- moru/volume/volume_api.py +330 -0
- moru/volume_async/__init__.py +5 -0
- moru/volume_async/main.py +327 -0
- moru/volume_async/volume_api.py +290 -0
- moru/volume_sync/__init__.py +5 -0
- moru/volume_sync/main.py +325 -0
- moru-0.2.0.dist-info/METADATA +122 -0
- {moru-0.1.0.dist-info → moru-0.2.0.dist-info}/RECORD +71 -46
- {moru-0.1.0.dist-info → moru-0.2.0.dist-info}/WHEEL +1 -1
- moru-0.1.0.dist-info/METADATA +0 -63
- {moru-0.1.0.dist-info/licenses → moru-0.2.0.dist-info}/LICENSE +0 -0
|
@@ -26,22 +26,27 @@ def _parse_response(
|
|
|
26
26
|
if response.status_code == 204:
|
|
27
27
|
response_204 = cast(Any, None)
|
|
28
28
|
return response_204
|
|
29
|
+
|
|
29
30
|
if response.status_code == 401:
|
|
30
31
|
response_401 = Error.from_dict(response.json())
|
|
31
32
|
|
|
32
33
|
return response_401
|
|
34
|
+
|
|
33
35
|
if response.status_code == 404:
|
|
34
36
|
response_404 = Error.from_dict(response.json())
|
|
35
37
|
|
|
36
38
|
return response_404
|
|
39
|
+
|
|
37
40
|
if response.status_code == 409:
|
|
38
41
|
response_409 = Error.from_dict(response.json())
|
|
39
42
|
|
|
40
43
|
return response_409
|
|
44
|
+
|
|
41
45
|
if response.status_code == 500:
|
|
42
46
|
response_500 = Error.from_dict(response.json())
|
|
43
47
|
|
|
44
48
|
return response_500
|
|
49
|
+
|
|
45
50
|
if client.raise_on_unexpected_status:
|
|
46
51
|
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
47
52
|
else:
|
|
@@ -38,14 +38,17 @@ def _parse_response(
|
|
|
38
38
|
if response.status_code == 204:
|
|
39
39
|
response_204 = cast(Any, None)
|
|
40
40
|
return response_204
|
|
41
|
+
|
|
41
42
|
if response.status_code == 401:
|
|
42
43
|
response_401 = Error.from_dict(response.json())
|
|
43
44
|
|
|
44
45
|
return response_401
|
|
46
|
+
|
|
45
47
|
if response.status_code == 404:
|
|
46
48
|
response_404 = Error.from_dict(response.json())
|
|
47
49
|
|
|
48
50
|
return response_404
|
|
51
|
+
|
|
49
52
|
if client.raise_on_unexpected_status:
|
|
50
53
|
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
51
54
|
else:
|
|
@@ -38,22 +38,27 @@ def _parse_response(
|
|
|
38
38
|
response_201 = Sandbox.from_dict(response.json())
|
|
39
39
|
|
|
40
40
|
return response_201
|
|
41
|
+
|
|
41
42
|
if response.status_code == 401:
|
|
42
43
|
response_401 = Error.from_dict(response.json())
|
|
43
44
|
|
|
44
45
|
return response_401
|
|
46
|
+
|
|
45
47
|
if response.status_code == 404:
|
|
46
48
|
response_404 = Error.from_dict(response.json())
|
|
47
49
|
|
|
48
50
|
return response_404
|
|
51
|
+
|
|
49
52
|
if response.status_code == 409:
|
|
50
53
|
response_409 = Error.from_dict(response.json())
|
|
51
54
|
|
|
52
55
|
return response_409
|
|
56
|
+
|
|
53
57
|
if response.status_code == 500:
|
|
54
58
|
response_500 = Error.from_dict(response.json())
|
|
55
59
|
|
|
56
60
|
return response_500
|
|
61
|
+
|
|
57
62
|
if client.raise_on_unexpected_status:
|
|
58
63
|
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
59
64
|
else:
|
|
@@ -38,18 +38,22 @@ def _parse_response(
|
|
|
38
38
|
if response.status_code == 204:
|
|
39
39
|
response_204 = cast(Any, None)
|
|
40
40
|
return response_204
|
|
41
|
+
|
|
41
42
|
if response.status_code == 401:
|
|
42
43
|
response_401 = Error.from_dict(response.json())
|
|
43
44
|
|
|
44
45
|
return response_401
|
|
46
|
+
|
|
45
47
|
if response.status_code == 404:
|
|
46
48
|
response_404 = Error.from_dict(response.json())
|
|
47
49
|
|
|
48
50
|
return response_404
|
|
51
|
+
|
|
49
52
|
if response.status_code == 500:
|
|
50
53
|
response_500 = Error.from_dict(response.json())
|
|
51
54
|
|
|
52
55
|
return response_500
|
|
56
|
+
|
|
53
57
|
if client.raise_on_unexpected_status:
|
|
54
58
|
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
55
59
|
else:
|
|
@@ -26,14 +26,17 @@ def _parse_response(
|
|
|
26
26
|
if response.status_code == 204:
|
|
27
27
|
response_204 = cast(Any, None)
|
|
28
28
|
return response_204
|
|
29
|
+
|
|
29
30
|
if response.status_code == 401:
|
|
30
31
|
response_401 = Error.from_dict(response.json())
|
|
31
32
|
|
|
32
33
|
return response_401
|
|
34
|
+
|
|
33
35
|
if response.status_code == 500:
|
|
34
36
|
response_500 = Error.from_dict(response.json())
|
|
35
37
|
|
|
36
38
|
return response_500
|
|
39
|
+
|
|
37
40
|
if client.raise_on_unexpected_status:
|
|
38
41
|
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
39
42
|
else:
|
|
@@ -41,14 +41,17 @@ def _parse_response(
|
|
|
41
41
|
response_200.append(response_200_item)
|
|
42
42
|
|
|
43
43
|
return response_200
|
|
44
|
+
|
|
44
45
|
if response.status_code == 401:
|
|
45
46
|
response_401 = Error.from_dict(response.json())
|
|
46
47
|
|
|
47
48
|
return response_401
|
|
49
|
+
|
|
48
50
|
if response.status_code == 500:
|
|
49
51
|
response_500 = Error.from_dict(response.json())
|
|
50
52
|
|
|
51
53
|
return response_500
|
|
54
|
+
|
|
52
55
|
if client.raise_on_unexpected_status:
|
|
53
56
|
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
54
57
|
else:
|
|
@@ -40,14 +40,17 @@ def _parse_response(
|
|
|
40
40
|
response_200 = TemplateWithBuilds.from_dict(response.json())
|
|
41
41
|
|
|
42
42
|
return response_200
|
|
43
|
+
|
|
43
44
|
if response.status_code == 401:
|
|
44
45
|
response_401 = Error.from_dict(response.json())
|
|
45
46
|
|
|
46
47
|
return response_401
|
|
48
|
+
|
|
47
49
|
if response.status_code == 500:
|
|
48
50
|
response_500 = Error.from_dict(response.json())
|
|
49
51
|
|
|
50
52
|
return response_500
|
|
53
|
+
|
|
51
54
|
if client.raise_on_unexpected_status:
|
|
52
55
|
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
53
56
|
else:
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Optional, Union
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.error import Error
|
|
9
|
+
from ...models.log_level import LogLevel
|
|
10
|
+
from ...models.logs_direction import LogsDirection
|
|
11
|
+
from ...models.logs_source import LogsSource
|
|
12
|
+
from ...models.template_build_logs_response import TemplateBuildLogsResponse
|
|
13
|
+
from ...types import UNSET, Response, Unset
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def _get_kwargs(
|
|
17
|
+
template_id: str,
|
|
18
|
+
build_id: str,
|
|
19
|
+
*,
|
|
20
|
+
cursor: Union[Unset, int] = UNSET,
|
|
21
|
+
limit: Union[Unset, int] = 100,
|
|
22
|
+
direction: Union[Unset, LogsDirection] = UNSET,
|
|
23
|
+
level: Union[Unset, LogLevel] = UNSET,
|
|
24
|
+
source: Union[Unset, LogsSource] = UNSET,
|
|
25
|
+
) -> dict[str, Any]:
|
|
26
|
+
params: dict[str, Any] = {}
|
|
27
|
+
|
|
28
|
+
params["cursor"] = cursor
|
|
29
|
+
|
|
30
|
+
params["limit"] = limit
|
|
31
|
+
|
|
32
|
+
json_direction: Union[Unset, str] = UNSET
|
|
33
|
+
if not isinstance(direction, Unset):
|
|
34
|
+
json_direction = direction.value
|
|
35
|
+
|
|
36
|
+
params["direction"] = json_direction
|
|
37
|
+
|
|
38
|
+
json_level: Union[Unset, str] = UNSET
|
|
39
|
+
if not isinstance(level, Unset):
|
|
40
|
+
json_level = level.value
|
|
41
|
+
|
|
42
|
+
params["level"] = json_level
|
|
43
|
+
|
|
44
|
+
json_source: Union[Unset, str] = UNSET
|
|
45
|
+
if not isinstance(source, Unset):
|
|
46
|
+
json_source = source.value
|
|
47
|
+
|
|
48
|
+
params["source"] = json_source
|
|
49
|
+
|
|
50
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
51
|
+
|
|
52
|
+
_kwargs: dict[str, Any] = {
|
|
53
|
+
"method": "get",
|
|
54
|
+
"url": f"/templates/{template_id}/builds/{build_id}/logs",
|
|
55
|
+
"params": params,
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return _kwargs
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def _parse_response(
|
|
62
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
63
|
+
) -> Optional[Union[Error, TemplateBuildLogsResponse]]:
|
|
64
|
+
if response.status_code == 200:
|
|
65
|
+
response_200 = TemplateBuildLogsResponse.from_dict(response.json())
|
|
66
|
+
|
|
67
|
+
return response_200
|
|
68
|
+
|
|
69
|
+
if response.status_code == 401:
|
|
70
|
+
response_401 = Error.from_dict(response.json())
|
|
71
|
+
|
|
72
|
+
return response_401
|
|
73
|
+
|
|
74
|
+
if response.status_code == 404:
|
|
75
|
+
response_404 = Error.from_dict(response.json())
|
|
76
|
+
|
|
77
|
+
return response_404
|
|
78
|
+
|
|
79
|
+
if response.status_code == 500:
|
|
80
|
+
response_500 = Error.from_dict(response.json())
|
|
81
|
+
|
|
82
|
+
return response_500
|
|
83
|
+
|
|
84
|
+
if client.raise_on_unexpected_status:
|
|
85
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
86
|
+
else:
|
|
87
|
+
return None
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
def _build_response(
|
|
91
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
92
|
+
) -> Response[Union[Error, TemplateBuildLogsResponse]]:
|
|
93
|
+
return Response(
|
|
94
|
+
status_code=HTTPStatus(response.status_code),
|
|
95
|
+
content=response.content,
|
|
96
|
+
headers=response.headers,
|
|
97
|
+
parsed=_parse_response(client=client, response=response),
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
def sync_detailed(
|
|
102
|
+
template_id: str,
|
|
103
|
+
build_id: str,
|
|
104
|
+
*,
|
|
105
|
+
client: AuthenticatedClient,
|
|
106
|
+
cursor: Union[Unset, int] = UNSET,
|
|
107
|
+
limit: Union[Unset, int] = 100,
|
|
108
|
+
direction: Union[Unset, LogsDirection] = UNSET,
|
|
109
|
+
level: Union[Unset, LogLevel] = UNSET,
|
|
110
|
+
source: Union[Unset, LogsSource] = UNSET,
|
|
111
|
+
) -> Response[Union[Error, TemplateBuildLogsResponse]]:
|
|
112
|
+
"""Get template build logs
|
|
113
|
+
|
|
114
|
+
Args:
|
|
115
|
+
template_id (str):
|
|
116
|
+
build_id (str):
|
|
117
|
+
cursor (Union[Unset, int]):
|
|
118
|
+
limit (Union[Unset, int]): Default: 100.
|
|
119
|
+
direction (Union[Unset, LogsDirection]): Direction of the logs that should be returned
|
|
120
|
+
level (Union[Unset, LogLevel]): Log level for build logs
|
|
121
|
+
source (Union[Unset, LogsSource]): Source of the logs that should be returned
|
|
122
|
+
|
|
123
|
+
Raises:
|
|
124
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
125
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
126
|
+
|
|
127
|
+
Returns:
|
|
128
|
+
Response[Union[Error, TemplateBuildLogsResponse]]
|
|
129
|
+
"""
|
|
130
|
+
|
|
131
|
+
kwargs = _get_kwargs(
|
|
132
|
+
template_id=template_id,
|
|
133
|
+
build_id=build_id,
|
|
134
|
+
cursor=cursor,
|
|
135
|
+
limit=limit,
|
|
136
|
+
direction=direction,
|
|
137
|
+
level=level,
|
|
138
|
+
source=source,
|
|
139
|
+
)
|
|
140
|
+
|
|
141
|
+
response = client.get_httpx_client().request(
|
|
142
|
+
**kwargs,
|
|
143
|
+
)
|
|
144
|
+
|
|
145
|
+
return _build_response(client=client, response=response)
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
def sync(
|
|
149
|
+
template_id: str,
|
|
150
|
+
build_id: str,
|
|
151
|
+
*,
|
|
152
|
+
client: AuthenticatedClient,
|
|
153
|
+
cursor: Union[Unset, int] = UNSET,
|
|
154
|
+
limit: Union[Unset, int] = 100,
|
|
155
|
+
direction: Union[Unset, LogsDirection] = UNSET,
|
|
156
|
+
level: Union[Unset, LogLevel] = UNSET,
|
|
157
|
+
source: Union[Unset, LogsSource] = UNSET,
|
|
158
|
+
) -> Optional[Union[Error, TemplateBuildLogsResponse]]:
|
|
159
|
+
"""Get template build logs
|
|
160
|
+
|
|
161
|
+
Args:
|
|
162
|
+
template_id (str):
|
|
163
|
+
build_id (str):
|
|
164
|
+
cursor (Union[Unset, int]):
|
|
165
|
+
limit (Union[Unset, int]): Default: 100.
|
|
166
|
+
direction (Union[Unset, LogsDirection]): Direction of the logs that should be returned
|
|
167
|
+
level (Union[Unset, LogLevel]): Log level for build logs
|
|
168
|
+
source (Union[Unset, LogsSource]): Source of the logs that should be returned
|
|
169
|
+
|
|
170
|
+
Raises:
|
|
171
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
172
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
173
|
+
|
|
174
|
+
Returns:
|
|
175
|
+
Union[Error, TemplateBuildLogsResponse]
|
|
176
|
+
"""
|
|
177
|
+
|
|
178
|
+
return sync_detailed(
|
|
179
|
+
template_id=template_id,
|
|
180
|
+
build_id=build_id,
|
|
181
|
+
client=client,
|
|
182
|
+
cursor=cursor,
|
|
183
|
+
limit=limit,
|
|
184
|
+
direction=direction,
|
|
185
|
+
level=level,
|
|
186
|
+
source=source,
|
|
187
|
+
).parsed
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
async def asyncio_detailed(
|
|
191
|
+
template_id: str,
|
|
192
|
+
build_id: str,
|
|
193
|
+
*,
|
|
194
|
+
client: AuthenticatedClient,
|
|
195
|
+
cursor: Union[Unset, int] = UNSET,
|
|
196
|
+
limit: Union[Unset, int] = 100,
|
|
197
|
+
direction: Union[Unset, LogsDirection] = UNSET,
|
|
198
|
+
level: Union[Unset, LogLevel] = UNSET,
|
|
199
|
+
source: Union[Unset, LogsSource] = UNSET,
|
|
200
|
+
) -> Response[Union[Error, TemplateBuildLogsResponse]]:
|
|
201
|
+
"""Get template build logs
|
|
202
|
+
|
|
203
|
+
Args:
|
|
204
|
+
template_id (str):
|
|
205
|
+
build_id (str):
|
|
206
|
+
cursor (Union[Unset, int]):
|
|
207
|
+
limit (Union[Unset, int]): Default: 100.
|
|
208
|
+
direction (Union[Unset, LogsDirection]): Direction of the logs that should be returned
|
|
209
|
+
level (Union[Unset, LogLevel]): Log level for build logs
|
|
210
|
+
source (Union[Unset, LogsSource]): Source of the logs that should be returned
|
|
211
|
+
|
|
212
|
+
Raises:
|
|
213
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
214
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
215
|
+
|
|
216
|
+
Returns:
|
|
217
|
+
Response[Union[Error, TemplateBuildLogsResponse]]
|
|
218
|
+
"""
|
|
219
|
+
|
|
220
|
+
kwargs = _get_kwargs(
|
|
221
|
+
template_id=template_id,
|
|
222
|
+
build_id=build_id,
|
|
223
|
+
cursor=cursor,
|
|
224
|
+
limit=limit,
|
|
225
|
+
direction=direction,
|
|
226
|
+
level=level,
|
|
227
|
+
source=source,
|
|
228
|
+
)
|
|
229
|
+
|
|
230
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
231
|
+
|
|
232
|
+
return _build_response(client=client, response=response)
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
async def asyncio(
|
|
236
|
+
template_id: str,
|
|
237
|
+
build_id: str,
|
|
238
|
+
*,
|
|
239
|
+
client: AuthenticatedClient,
|
|
240
|
+
cursor: Union[Unset, int] = UNSET,
|
|
241
|
+
limit: Union[Unset, int] = 100,
|
|
242
|
+
direction: Union[Unset, LogsDirection] = UNSET,
|
|
243
|
+
level: Union[Unset, LogLevel] = UNSET,
|
|
244
|
+
source: Union[Unset, LogsSource] = UNSET,
|
|
245
|
+
) -> Optional[Union[Error, TemplateBuildLogsResponse]]:
|
|
246
|
+
"""Get template build logs
|
|
247
|
+
|
|
248
|
+
Args:
|
|
249
|
+
template_id (str):
|
|
250
|
+
build_id (str):
|
|
251
|
+
cursor (Union[Unset, int]):
|
|
252
|
+
limit (Union[Unset, int]): Default: 100.
|
|
253
|
+
direction (Union[Unset, LogsDirection]): Direction of the logs that should be returned
|
|
254
|
+
level (Union[Unset, LogLevel]): Log level for build logs
|
|
255
|
+
source (Union[Unset, LogsSource]): Source of the logs that should be returned
|
|
256
|
+
|
|
257
|
+
Raises:
|
|
258
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
259
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
260
|
+
|
|
261
|
+
Returns:
|
|
262
|
+
Union[Error, TemplateBuildLogsResponse]
|
|
263
|
+
"""
|
|
264
|
+
|
|
265
|
+
return (
|
|
266
|
+
await asyncio_detailed(
|
|
267
|
+
template_id=template_id,
|
|
268
|
+
build_id=build_id,
|
|
269
|
+
client=client,
|
|
270
|
+
cursor=cursor,
|
|
271
|
+
limit=limit,
|
|
272
|
+
direction=direction,
|
|
273
|
+
level=level,
|
|
274
|
+
source=source,
|
|
275
|
+
)
|
|
276
|
+
).parsed
|
|
@@ -16,12 +16,15 @@ def _get_kwargs(
|
|
|
16
16
|
build_id: str,
|
|
17
17
|
*,
|
|
18
18
|
logs_offset: Union[Unset, int] = 0,
|
|
19
|
+
limit: Union[Unset, int] = 100,
|
|
19
20
|
level: Union[Unset, LogLevel] = UNSET,
|
|
20
21
|
) -> dict[str, Any]:
|
|
21
22
|
params: dict[str, Any] = {}
|
|
22
23
|
|
|
23
24
|
params["logsOffset"] = logs_offset
|
|
24
25
|
|
|
26
|
+
params["limit"] = limit
|
|
27
|
+
|
|
25
28
|
json_level: Union[Unset, str] = UNSET
|
|
26
29
|
if not isinstance(level, Unset):
|
|
27
30
|
json_level = level.value
|
|
@@ -46,18 +49,22 @@ def _parse_response(
|
|
|
46
49
|
response_200 = TemplateBuildInfo.from_dict(response.json())
|
|
47
50
|
|
|
48
51
|
return response_200
|
|
52
|
+
|
|
49
53
|
if response.status_code == 401:
|
|
50
54
|
response_401 = Error.from_dict(response.json())
|
|
51
55
|
|
|
52
56
|
return response_401
|
|
57
|
+
|
|
53
58
|
if response.status_code == 404:
|
|
54
59
|
response_404 = Error.from_dict(response.json())
|
|
55
60
|
|
|
56
61
|
return response_404
|
|
62
|
+
|
|
57
63
|
if response.status_code == 500:
|
|
58
64
|
response_500 = Error.from_dict(response.json())
|
|
59
65
|
|
|
60
66
|
return response_500
|
|
67
|
+
|
|
61
68
|
if client.raise_on_unexpected_status:
|
|
62
69
|
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
63
70
|
else:
|
|
@@ -81,6 +88,7 @@ def sync_detailed(
|
|
|
81
88
|
*,
|
|
82
89
|
client: AuthenticatedClient,
|
|
83
90
|
logs_offset: Union[Unset, int] = 0,
|
|
91
|
+
limit: Union[Unset, int] = 100,
|
|
84
92
|
level: Union[Unset, LogLevel] = UNSET,
|
|
85
93
|
) -> Response[Union[Error, TemplateBuildInfo]]:
|
|
86
94
|
"""Get template build info
|
|
@@ -89,7 +97,8 @@ def sync_detailed(
|
|
|
89
97
|
template_id (str):
|
|
90
98
|
build_id (str):
|
|
91
99
|
logs_offset (Union[Unset, int]): Default: 0.
|
|
92
|
-
|
|
100
|
+
limit (Union[Unset, int]): Default: 100.
|
|
101
|
+
level (Union[Unset, LogLevel]): Log level for build logs
|
|
93
102
|
|
|
94
103
|
Raises:
|
|
95
104
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
@@ -103,6 +112,7 @@ def sync_detailed(
|
|
|
103
112
|
template_id=template_id,
|
|
104
113
|
build_id=build_id,
|
|
105
114
|
logs_offset=logs_offset,
|
|
115
|
+
limit=limit,
|
|
106
116
|
level=level,
|
|
107
117
|
)
|
|
108
118
|
|
|
@@ -119,6 +129,7 @@ def sync(
|
|
|
119
129
|
*,
|
|
120
130
|
client: AuthenticatedClient,
|
|
121
131
|
logs_offset: Union[Unset, int] = 0,
|
|
132
|
+
limit: Union[Unset, int] = 100,
|
|
122
133
|
level: Union[Unset, LogLevel] = UNSET,
|
|
123
134
|
) -> Optional[Union[Error, TemplateBuildInfo]]:
|
|
124
135
|
"""Get template build info
|
|
@@ -127,7 +138,8 @@ def sync(
|
|
|
127
138
|
template_id (str):
|
|
128
139
|
build_id (str):
|
|
129
140
|
logs_offset (Union[Unset, int]): Default: 0.
|
|
130
|
-
|
|
141
|
+
limit (Union[Unset, int]): Default: 100.
|
|
142
|
+
level (Union[Unset, LogLevel]): Log level for build logs
|
|
131
143
|
|
|
132
144
|
Raises:
|
|
133
145
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
@@ -142,6 +154,7 @@ def sync(
|
|
|
142
154
|
build_id=build_id,
|
|
143
155
|
client=client,
|
|
144
156
|
logs_offset=logs_offset,
|
|
157
|
+
limit=limit,
|
|
145
158
|
level=level,
|
|
146
159
|
).parsed
|
|
147
160
|
|
|
@@ -152,6 +165,7 @@ async def asyncio_detailed(
|
|
|
152
165
|
*,
|
|
153
166
|
client: AuthenticatedClient,
|
|
154
167
|
logs_offset: Union[Unset, int] = 0,
|
|
168
|
+
limit: Union[Unset, int] = 100,
|
|
155
169
|
level: Union[Unset, LogLevel] = UNSET,
|
|
156
170
|
) -> Response[Union[Error, TemplateBuildInfo]]:
|
|
157
171
|
"""Get template build info
|
|
@@ -160,7 +174,8 @@ async def asyncio_detailed(
|
|
|
160
174
|
template_id (str):
|
|
161
175
|
build_id (str):
|
|
162
176
|
logs_offset (Union[Unset, int]): Default: 0.
|
|
163
|
-
|
|
177
|
+
limit (Union[Unset, int]): Default: 100.
|
|
178
|
+
level (Union[Unset, LogLevel]): Log level for build logs
|
|
164
179
|
|
|
165
180
|
Raises:
|
|
166
181
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
@@ -174,6 +189,7 @@ async def asyncio_detailed(
|
|
|
174
189
|
template_id=template_id,
|
|
175
190
|
build_id=build_id,
|
|
176
191
|
logs_offset=logs_offset,
|
|
192
|
+
limit=limit,
|
|
177
193
|
level=level,
|
|
178
194
|
)
|
|
179
195
|
|
|
@@ -188,6 +204,7 @@ async def asyncio(
|
|
|
188
204
|
*,
|
|
189
205
|
client: AuthenticatedClient,
|
|
190
206
|
logs_offset: Union[Unset, int] = 0,
|
|
207
|
+
limit: Union[Unset, int] = 100,
|
|
191
208
|
level: Union[Unset, LogLevel] = UNSET,
|
|
192
209
|
) -> Optional[Union[Error, TemplateBuildInfo]]:
|
|
193
210
|
"""Get template build info
|
|
@@ -196,7 +213,8 @@ async def asyncio(
|
|
|
196
213
|
template_id (str):
|
|
197
214
|
build_id (str):
|
|
198
215
|
logs_offset (Union[Unset, int]): Default: 0.
|
|
199
|
-
|
|
216
|
+
limit (Union[Unset, int]): Default: 100.
|
|
217
|
+
level (Union[Unset, LogLevel]): Log level for build logs
|
|
200
218
|
|
|
201
219
|
Raises:
|
|
202
220
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
@@ -212,6 +230,7 @@ async def asyncio(
|
|
|
212
230
|
build_id=build_id,
|
|
213
231
|
client=client,
|
|
214
232
|
logs_offset=logs_offset,
|
|
233
|
+
limit=limit,
|
|
215
234
|
level=level,
|
|
216
235
|
)
|
|
217
236
|
).parsed
|
|
@@ -29,22 +29,27 @@ def _parse_response(
|
|
|
29
29
|
response_201 = TemplateBuildFileUpload.from_dict(response.json())
|
|
30
30
|
|
|
31
31
|
return response_201
|
|
32
|
+
|
|
32
33
|
if response.status_code == 400:
|
|
33
34
|
response_400 = Error.from_dict(response.json())
|
|
34
35
|
|
|
35
36
|
return response_400
|
|
37
|
+
|
|
36
38
|
if response.status_code == 401:
|
|
37
39
|
response_401 = Error.from_dict(response.json())
|
|
38
40
|
|
|
39
41
|
return response_401
|
|
42
|
+
|
|
40
43
|
if response.status_code == 404:
|
|
41
44
|
response_404 = Error.from_dict(response.json())
|
|
42
45
|
|
|
43
46
|
return response_404
|
|
47
|
+
|
|
44
48
|
if response.status_code == 500:
|
|
45
49
|
response_500 = Error.from_dict(response.json())
|
|
46
50
|
|
|
47
51
|
return response_500
|
|
52
|
+
|
|
48
53
|
if client.raise_on_unexpected_status:
|
|
49
54
|
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
50
55
|
else:
|
|
@@ -36,18 +36,22 @@ def _parse_response(
|
|
|
36
36
|
if response.status_code == 200:
|
|
37
37
|
response_200 = cast(Any, None)
|
|
38
38
|
return response_200
|
|
39
|
+
|
|
39
40
|
if response.status_code == 400:
|
|
40
41
|
response_400 = Error.from_dict(response.json())
|
|
41
42
|
|
|
42
43
|
return response_400
|
|
44
|
+
|
|
43
45
|
if response.status_code == 401:
|
|
44
46
|
response_401 = Error.from_dict(response.json())
|
|
45
47
|
|
|
46
48
|
return response_401
|
|
49
|
+
|
|
47
50
|
if response.status_code == 500:
|
|
48
51
|
response_500 = Error.from_dict(response.json())
|
|
49
52
|
|
|
50
53
|
return response_500
|
|
54
|
+
|
|
51
55
|
if client.raise_on_unexpected_status:
|
|
52
56
|
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
53
57
|
else:
|
|
@@ -37,18 +37,22 @@ def _parse_response(
|
|
|
37
37
|
response_202 = TemplateLegacy.from_dict(response.json())
|
|
38
38
|
|
|
39
39
|
return response_202
|
|
40
|
+
|
|
40
41
|
if response.status_code == 400:
|
|
41
42
|
response_400 = Error.from_dict(response.json())
|
|
42
43
|
|
|
43
44
|
return response_400
|
|
45
|
+
|
|
44
46
|
if response.status_code == 401:
|
|
45
47
|
response_401 = Error.from_dict(response.json())
|
|
46
48
|
|
|
47
49
|
return response_401
|
|
50
|
+
|
|
48
51
|
if response.status_code == 500:
|
|
49
52
|
response_500 = Error.from_dict(response.json())
|
|
50
53
|
|
|
51
54
|
return response_500
|
|
55
|
+
|
|
52
56
|
if client.raise_on_unexpected_status:
|
|
53
57
|
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
54
58
|
else:
|
|
@@ -38,14 +38,17 @@ def _parse_response(
|
|
|
38
38
|
response_202 = TemplateLegacy.from_dict(response.json())
|
|
39
39
|
|
|
40
40
|
return response_202
|
|
41
|
+
|
|
41
42
|
if response.status_code == 401:
|
|
42
43
|
response_401 = Error.from_dict(response.json())
|
|
43
44
|
|
|
44
45
|
return response_401
|
|
46
|
+
|
|
45
47
|
if response.status_code == 500:
|
|
46
48
|
response_500 = Error.from_dict(response.json())
|
|
47
49
|
|
|
48
50
|
return response_500
|
|
51
|
+
|
|
49
52
|
if client.raise_on_unexpected_status:
|
|
50
53
|
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
51
54
|
else:
|
|
@@ -27,14 +27,17 @@ def _parse_response(
|
|
|
27
27
|
if response.status_code == 202:
|
|
28
28
|
response_202 = cast(Any, None)
|
|
29
29
|
return response_202
|
|
30
|
+
|
|
30
31
|
if response.status_code == 401:
|
|
31
32
|
response_401 = Error.from_dict(response.json())
|
|
32
33
|
|
|
33
34
|
return response_401
|
|
35
|
+
|
|
34
36
|
if response.status_code == 500:
|
|
35
37
|
response_500 = Error.from_dict(response.json())
|
|
36
38
|
|
|
37
39
|
return response_500
|
|
40
|
+
|
|
38
41
|
if client.raise_on_unexpected_status:
|
|
39
42
|
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
40
43
|
else:
|