cyberdesk 1.8.0__py3-none-any.whl → 1.10.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 cyberdesk might be problematic. Click here for more details.
- cyberdesk/__init__.py +13 -1
- cyberdesk/client.py +357 -0
- {cyberdesk-1.8.0.dist-info → cyberdesk-1.10.0.dist-info}/METADATA +39 -17
- {cyberdesk-1.8.0.dist-info → cyberdesk-1.10.0.dist-info}/RECORD +41 -13
- openapi_client/cyberdesk_cloud_client/api/computer/fs_list_v1_computer_machine_id_fs_list_get.py +188 -0
- openapi_client/cyberdesk_cloud_client/api/computer/fs_read_v1_computer_machine_id_fs_read_get.py +188 -0
- openapi_client/cyberdesk_cloud_client/api/computer/fs_write_v1_computer_machine_id_fs_write_post.py +201 -0
- openapi_client/cyberdesk_cloud_client/api/computer/powershell_exec_v1_computer_machine_id_shell_powershell_exec_post.py +219 -0
- openapi_client/cyberdesk_cloud_client/api/computer/powershell_session_v1_computer_machine_id_shell_powershell_session_post.py +219 -0
- openapi_client/cyberdesk_cloud_client/api/run_attachments/__init__.py +1 -0
- openapi_client/cyberdesk_cloud_client/api/run_attachments/create_run_attachment_v1_run_attachments_post.py +184 -0
- openapi_client/cyberdesk_cloud_client/api/run_attachments/delete_run_attachment_v1_run_attachments_attachment_id_delete.py +170 -0
- openapi_client/cyberdesk_cloud_client/api/run_attachments/download_run_attachment_v1_run_attachments_attachment_id_download_get.py +170 -0
- openapi_client/cyberdesk_cloud_client/api/run_attachments/get_run_attachment_download_url_v1_run_attachments_attachment_id_download_url_get.py +209 -0
- openapi_client/cyberdesk_cloud_client/api/run_attachments/get_run_attachment_v1_run_attachments_attachment_id_get.py +172 -0
- openapi_client/cyberdesk_cloud_client/api/run_attachments/list_run_attachments_v1_run_attachments_get.py +240 -0
- openapi_client/cyberdesk_cloud_client/api/run_attachments/update_run_attachment_v1_run_attachments_attachment_id_put.py +194 -0
- openapi_client/cyberdesk_cloud_client/models/__init__.py +40 -0
- openapi_client/cyberdesk_cloud_client/models/attachment_type.py +9 -0
- openapi_client/cyberdesk_cloud_client/models/file_input.py +99 -0
- openapi_client/cyberdesk_cloud_client/models/file_write_request.py +78 -0
- openapi_client/cyberdesk_cloud_client/models/fs_list_v1_computer_machine_id_fs_list_get_response_fs_list_v1_computer_machine_id_fs_list_get.py +44 -0
- openapi_client/cyberdesk_cloud_client/models/fs_read_v1_computer_machine_id_fs_read_get_response_fs_read_v1_computer_machine_id_fs_read_get.py +44 -0
- openapi_client/cyberdesk_cloud_client/models/fs_write_v1_computer_machine_id_fs_write_post_response_fs_write_v1_computer_machine_id_fs_write_post.py +44 -0
- openapi_client/cyberdesk_cloud_client/models/paginated_response_run_attachment_response.py +97 -0
- openapi_client/cyberdesk_cloud_client/models/power_shell_exec_request.py +110 -0
- openapi_client/cyberdesk_cloud_client/models/power_shell_session_request.py +81 -0
- openapi_client/cyberdesk_cloud_client/models/powershell_exec_v1_computer_machine_id_shell_powershell_exec_post_response_powershell_exec_v1_computer_machine_id_shell_powershell_exec_post.py +47 -0
- openapi_client/cyberdesk_cloud_client/models/powershell_session_v1_computer_machine_id_shell_powershell_session_post_response_powershell_session_v1_computer_machine_id_shell_powershell_session_post.py +47 -0
- openapi_client/cyberdesk_cloud_client/models/run_attachment_create.py +157 -0
- openapi_client/cyberdesk_cloud_client/models/run_attachment_download_url_response.py +68 -0
- openapi_client/cyberdesk_cloud_client/models/run_attachment_response.py +189 -0
- openapi_client/cyberdesk_cloud_client/models/run_attachment_update.py +84 -0
- openapi_client/cyberdesk_cloud_client/models/run_create.py +41 -0
- openapi_client/cyberdesk_cloud_client/models/run_response.py +26 -0
- openapi_client/cyberdesk_cloud_client/models/workflow_create.py +9 -0
- openapi_client/cyberdesk_cloud_client/models/workflow_response.py +9 -0
- openapi_client/cyberdesk_cloud_client/models/workflow_update.py +20 -0
- {cyberdesk-1.8.0.dist-info → cyberdesk-1.10.0.dist-info}/WHEEL +0 -0
- {cyberdesk-1.8.0.dist-info → cyberdesk-1.10.0.dist-info}/licenses/LICENSE +0 -0
- {cyberdesk-1.8.0.dist-info → cyberdesk-1.10.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Optional, Union
|
|
3
|
+
from uuid import UUID
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
from ... import errors
|
|
8
|
+
from ...client import AuthenticatedClient, Client
|
|
9
|
+
from ...models.attachment_type import AttachmentType
|
|
10
|
+
from ...models.http_validation_error import HTTPValidationError
|
|
11
|
+
from ...models.paginated_response_run_attachment_response import PaginatedResponseRunAttachmentResponse
|
|
12
|
+
from ...types import UNSET, Response, Unset
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def _get_kwargs(
|
|
16
|
+
*,
|
|
17
|
+
run_id: Union[None, UUID, Unset] = UNSET,
|
|
18
|
+
attachment_type: Union[AttachmentType, None, Unset] = UNSET,
|
|
19
|
+
skip: Union[Unset, int] = 0,
|
|
20
|
+
limit: Union[Unset, int] = 100,
|
|
21
|
+
) -> dict[str, Any]:
|
|
22
|
+
params: dict[str, Any] = {}
|
|
23
|
+
|
|
24
|
+
json_run_id: Union[None, Unset, str]
|
|
25
|
+
if isinstance(run_id, Unset):
|
|
26
|
+
json_run_id = UNSET
|
|
27
|
+
elif isinstance(run_id, UUID):
|
|
28
|
+
json_run_id = str(run_id)
|
|
29
|
+
else:
|
|
30
|
+
json_run_id = run_id
|
|
31
|
+
params["run_id"] = json_run_id
|
|
32
|
+
|
|
33
|
+
json_attachment_type: Union[None, Unset, str]
|
|
34
|
+
if isinstance(attachment_type, Unset):
|
|
35
|
+
json_attachment_type = UNSET
|
|
36
|
+
elif isinstance(attachment_type, AttachmentType):
|
|
37
|
+
json_attachment_type = attachment_type.value
|
|
38
|
+
else:
|
|
39
|
+
json_attachment_type = attachment_type
|
|
40
|
+
params["attachment_type"] = json_attachment_type
|
|
41
|
+
|
|
42
|
+
params["skip"] = skip
|
|
43
|
+
|
|
44
|
+
params["limit"] = limit
|
|
45
|
+
|
|
46
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
47
|
+
|
|
48
|
+
_kwargs: dict[str, Any] = {
|
|
49
|
+
"method": "get",
|
|
50
|
+
"url": "/v1/run-attachments",
|
|
51
|
+
"params": params,
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return _kwargs
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def _parse_response(
|
|
58
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
59
|
+
) -> Optional[Union[HTTPValidationError, PaginatedResponseRunAttachmentResponse]]:
|
|
60
|
+
if response.status_code == 200:
|
|
61
|
+
response_200 = PaginatedResponseRunAttachmentResponse.from_dict(response.json())
|
|
62
|
+
|
|
63
|
+
return response_200
|
|
64
|
+
if response.status_code == 422:
|
|
65
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
66
|
+
|
|
67
|
+
return response_422
|
|
68
|
+
if client.raise_on_unexpected_status:
|
|
69
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
70
|
+
else:
|
|
71
|
+
return None
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def _build_response(
|
|
75
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
76
|
+
) -> Response[Union[HTTPValidationError, PaginatedResponseRunAttachmentResponse]]:
|
|
77
|
+
return Response(
|
|
78
|
+
status_code=HTTPStatus(response.status_code),
|
|
79
|
+
content=response.content,
|
|
80
|
+
headers=response.headers,
|
|
81
|
+
parsed=_parse_response(client=client, response=response),
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def sync_detailed(
|
|
86
|
+
*,
|
|
87
|
+
client: AuthenticatedClient,
|
|
88
|
+
run_id: Union[None, UUID, Unset] = UNSET,
|
|
89
|
+
attachment_type: Union[AttachmentType, None, Unset] = UNSET,
|
|
90
|
+
skip: Union[Unset, int] = 0,
|
|
91
|
+
limit: Union[Unset, int] = 100,
|
|
92
|
+
) -> Response[Union[HTTPValidationError, PaginatedResponseRunAttachmentResponse]]:
|
|
93
|
+
"""List Run Attachments
|
|
94
|
+
|
|
95
|
+
List all run attachments for the authenticated user.
|
|
96
|
+
|
|
97
|
+
Supports pagination and filtering by run ID and attachment type.
|
|
98
|
+
|
|
99
|
+
Args:
|
|
100
|
+
run_id (Union[None, UUID, Unset]): Filter by run ID
|
|
101
|
+
attachment_type (Union[AttachmentType, None, Unset]): Filter by attachment type
|
|
102
|
+
skip (Union[Unset, int]): Default: 0.
|
|
103
|
+
limit (Union[Unset, int]): Default: 100.
|
|
104
|
+
|
|
105
|
+
Raises:
|
|
106
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
107
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
108
|
+
|
|
109
|
+
Returns:
|
|
110
|
+
Response[Union[HTTPValidationError, PaginatedResponseRunAttachmentResponse]]
|
|
111
|
+
"""
|
|
112
|
+
|
|
113
|
+
kwargs = _get_kwargs(
|
|
114
|
+
run_id=run_id,
|
|
115
|
+
attachment_type=attachment_type,
|
|
116
|
+
skip=skip,
|
|
117
|
+
limit=limit,
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
response = client.get_httpx_client().request(
|
|
121
|
+
**kwargs,
|
|
122
|
+
)
|
|
123
|
+
|
|
124
|
+
return _build_response(client=client, response=response)
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
def sync(
|
|
128
|
+
*,
|
|
129
|
+
client: AuthenticatedClient,
|
|
130
|
+
run_id: Union[None, UUID, Unset] = UNSET,
|
|
131
|
+
attachment_type: Union[AttachmentType, None, Unset] = UNSET,
|
|
132
|
+
skip: Union[Unset, int] = 0,
|
|
133
|
+
limit: Union[Unset, int] = 100,
|
|
134
|
+
) -> Optional[Union[HTTPValidationError, PaginatedResponseRunAttachmentResponse]]:
|
|
135
|
+
"""List Run Attachments
|
|
136
|
+
|
|
137
|
+
List all run attachments for the authenticated user.
|
|
138
|
+
|
|
139
|
+
Supports pagination and filtering by run ID and attachment type.
|
|
140
|
+
|
|
141
|
+
Args:
|
|
142
|
+
run_id (Union[None, UUID, Unset]): Filter by run ID
|
|
143
|
+
attachment_type (Union[AttachmentType, None, Unset]): Filter by attachment type
|
|
144
|
+
skip (Union[Unset, int]): Default: 0.
|
|
145
|
+
limit (Union[Unset, int]): Default: 100.
|
|
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
|
+
Union[HTTPValidationError, PaginatedResponseRunAttachmentResponse]
|
|
153
|
+
"""
|
|
154
|
+
|
|
155
|
+
return sync_detailed(
|
|
156
|
+
client=client,
|
|
157
|
+
run_id=run_id,
|
|
158
|
+
attachment_type=attachment_type,
|
|
159
|
+
skip=skip,
|
|
160
|
+
limit=limit,
|
|
161
|
+
).parsed
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
async def asyncio_detailed(
|
|
165
|
+
*,
|
|
166
|
+
client: AuthenticatedClient,
|
|
167
|
+
run_id: Union[None, UUID, Unset] = UNSET,
|
|
168
|
+
attachment_type: Union[AttachmentType, None, Unset] = UNSET,
|
|
169
|
+
skip: Union[Unset, int] = 0,
|
|
170
|
+
limit: Union[Unset, int] = 100,
|
|
171
|
+
) -> Response[Union[HTTPValidationError, PaginatedResponseRunAttachmentResponse]]:
|
|
172
|
+
"""List Run Attachments
|
|
173
|
+
|
|
174
|
+
List all run attachments for the authenticated user.
|
|
175
|
+
|
|
176
|
+
Supports pagination and filtering by run ID and attachment type.
|
|
177
|
+
|
|
178
|
+
Args:
|
|
179
|
+
run_id (Union[None, UUID, Unset]): Filter by run ID
|
|
180
|
+
attachment_type (Union[AttachmentType, None, Unset]): Filter by attachment type
|
|
181
|
+
skip (Union[Unset, int]): Default: 0.
|
|
182
|
+
limit (Union[Unset, int]): Default: 100.
|
|
183
|
+
|
|
184
|
+
Raises:
|
|
185
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
186
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
187
|
+
|
|
188
|
+
Returns:
|
|
189
|
+
Response[Union[HTTPValidationError, PaginatedResponseRunAttachmentResponse]]
|
|
190
|
+
"""
|
|
191
|
+
|
|
192
|
+
kwargs = _get_kwargs(
|
|
193
|
+
run_id=run_id,
|
|
194
|
+
attachment_type=attachment_type,
|
|
195
|
+
skip=skip,
|
|
196
|
+
limit=limit,
|
|
197
|
+
)
|
|
198
|
+
|
|
199
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
200
|
+
|
|
201
|
+
return _build_response(client=client, response=response)
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
async def asyncio(
|
|
205
|
+
*,
|
|
206
|
+
client: AuthenticatedClient,
|
|
207
|
+
run_id: Union[None, UUID, Unset] = UNSET,
|
|
208
|
+
attachment_type: Union[AttachmentType, None, Unset] = UNSET,
|
|
209
|
+
skip: Union[Unset, int] = 0,
|
|
210
|
+
limit: Union[Unset, int] = 100,
|
|
211
|
+
) -> Optional[Union[HTTPValidationError, PaginatedResponseRunAttachmentResponse]]:
|
|
212
|
+
"""List Run Attachments
|
|
213
|
+
|
|
214
|
+
List all run attachments for the authenticated user.
|
|
215
|
+
|
|
216
|
+
Supports pagination and filtering by run ID and attachment type.
|
|
217
|
+
|
|
218
|
+
Args:
|
|
219
|
+
run_id (Union[None, UUID, Unset]): Filter by run ID
|
|
220
|
+
attachment_type (Union[AttachmentType, None, Unset]): Filter by attachment type
|
|
221
|
+
skip (Union[Unset, int]): Default: 0.
|
|
222
|
+
limit (Union[Unset, int]): Default: 100.
|
|
223
|
+
|
|
224
|
+
Raises:
|
|
225
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
226
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
227
|
+
|
|
228
|
+
Returns:
|
|
229
|
+
Union[HTTPValidationError, PaginatedResponseRunAttachmentResponse]
|
|
230
|
+
"""
|
|
231
|
+
|
|
232
|
+
return (
|
|
233
|
+
await asyncio_detailed(
|
|
234
|
+
client=client,
|
|
235
|
+
run_id=run_id,
|
|
236
|
+
attachment_type=attachment_type,
|
|
237
|
+
skip=skip,
|
|
238
|
+
limit=limit,
|
|
239
|
+
)
|
|
240
|
+
).parsed
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Optional, Union
|
|
3
|
+
from uuid import UUID
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
from ... import errors
|
|
8
|
+
from ...client import AuthenticatedClient, Client
|
|
9
|
+
from ...models.http_validation_error import HTTPValidationError
|
|
10
|
+
from ...models.run_attachment_response import RunAttachmentResponse
|
|
11
|
+
from ...models.run_attachment_update import RunAttachmentUpdate
|
|
12
|
+
from ...types import Response
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def _get_kwargs(
|
|
16
|
+
attachment_id: UUID,
|
|
17
|
+
*,
|
|
18
|
+
body: RunAttachmentUpdate,
|
|
19
|
+
) -> dict[str, Any]:
|
|
20
|
+
headers: dict[str, Any] = {}
|
|
21
|
+
|
|
22
|
+
_kwargs: dict[str, Any] = {
|
|
23
|
+
"method": "put",
|
|
24
|
+
"url": f"/v1/run-attachments/{attachment_id}",
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
_kwargs["json"] = body.to_dict()
|
|
28
|
+
|
|
29
|
+
headers["Content-Type"] = "application/json"
|
|
30
|
+
|
|
31
|
+
_kwargs["headers"] = headers
|
|
32
|
+
return _kwargs
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def _parse_response(
|
|
36
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
37
|
+
) -> Optional[Union[HTTPValidationError, RunAttachmentResponse]]:
|
|
38
|
+
if response.status_code == 200:
|
|
39
|
+
response_200 = RunAttachmentResponse.from_dict(response.json())
|
|
40
|
+
|
|
41
|
+
return response_200
|
|
42
|
+
if response.status_code == 422:
|
|
43
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
44
|
+
|
|
45
|
+
return response_422
|
|
46
|
+
if client.raise_on_unexpected_status:
|
|
47
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
48
|
+
else:
|
|
49
|
+
return None
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def _build_response(
|
|
53
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
54
|
+
) -> Response[Union[HTTPValidationError, RunAttachmentResponse]]:
|
|
55
|
+
return Response(
|
|
56
|
+
status_code=HTTPStatus(response.status_code),
|
|
57
|
+
content=response.content,
|
|
58
|
+
headers=response.headers,
|
|
59
|
+
parsed=_parse_response(client=client, response=response),
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def sync_detailed(
|
|
64
|
+
attachment_id: UUID,
|
|
65
|
+
*,
|
|
66
|
+
client: AuthenticatedClient,
|
|
67
|
+
body: RunAttachmentUpdate,
|
|
68
|
+
) -> Response[Union[HTTPValidationError, RunAttachmentResponse]]:
|
|
69
|
+
"""Update Run Attachment
|
|
70
|
+
|
|
71
|
+
Update a run attachment.
|
|
72
|
+
|
|
73
|
+
Currently only supports updating the expiration date.
|
|
74
|
+
|
|
75
|
+
Args:
|
|
76
|
+
attachment_id (UUID):
|
|
77
|
+
body (RunAttachmentUpdate): Schema for updating a run attachment
|
|
78
|
+
|
|
79
|
+
Raises:
|
|
80
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
81
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
82
|
+
|
|
83
|
+
Returns:
|
|
84
|
+
Response[Union[HTTPValidationError, RunAttachmentResponse]]
|
|
85
|
+
"""
|
|
86
|
+
|
|
87
|
+
kwargs = _get_kwargs(
|
|
88
|
+
attachment_id=attachment_id,
|
|
89
|
+
body=body,
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
response = client.get_httpx_client().request(
|
|
93
|
+
**kwargs,
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
return _build_response(client=client, response=response)
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
def sync(
|
|
100
|
+
attachment_id: UUID,
|
|
101
|
+
*,
|
|
102
|
+
client: AuthenticatedClient,
|
|
103
|
+
body: RunAttachmentUpdate,
|
|
104
|
+
) -> Optional[Union[HTTPValidationError, RunAttachmentResponse]]:
|
|
105
|
+
"""Update Run Attachment
|
|
106
|
+
|
|
107
|
+
Update a run attachment.
|
|
108
|
+
|
|
109
|
+
Currently only supports updating the expiration date.
|
|
110
|
+
|
|
111
|
+
Args:
|
|
112
|
+
attachment_id (UUID):
|
|
113
|
+
body (RunAttachmentUpdate): Schema for updating a run attachment
|
|
114
|
+
|
|
115
|
+
Raises:
|
|
116
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
117
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
118
|
+
|
|
119
|
+
Returns:
|
|
120
|
+
Union[HTTPValidationError, RunAttachmentResponse]
|
|
121
|
+
"""
|
|
122
|
+
|
|
123
|
+
return sync_detailed(
|
|
124
|
+
attachment_id=attachment_id,
|
|
125
|
+
client=client,
|
|
126
|
+
body=body,
|
|
127
|
+
).parsed
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
async def asyncio_detailed(
|
|
131
|
+
attachment_id: UUID,
|
|
132
|
+
*,
|
|
133
|
+
client: AuthenticatedClient,
|
|
134
|
+
body: RunAttachmentUpdate,
|
|
135
|
+
) -> Response[Union[HTTPValidationError, RunAttachmentResponse]]:
|
|
136
|
+
"""Update Run Attachment
|
|
137
|
+
|
|
138
|
+
Update a run attachment.
|
|
139
|
+
|
|
140
|
+
Currently only supports updating the expiration date.
|
|
141
|
+
|
|
142
|
+
Args:
|
|
143
|
+
attachment_id (UUID):
|
|
144
|
+
body (RunAttachmentUpdate): Schema for updating a run attachment
|
|
145
|
+
|
|
146
|
+
Raises:
|
|
147
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
148
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
149
|
+
|
|
150
|
+
Returns:
|
|
151
|
+
Response[Union[HTTPValidationError, RunAttachmentResponse]]
|
|
152
|
+
"""
|
|
153
|
+
|
|
154
|
+
kwargs = _get_kwargs(
|
|
155
|
+
attachment_id=attachment_id,
|
|
156
|
+
body=body,
|
|
157
|
+
)
|
|
158
|
+
|
|
159
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
160
|
+
|
|
161
|
+
return _build_response(client=client, response=response)
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
async def asyncio(
|
|
165
|
+
attachment_id: UUID,
|
|
166
|
+
*,
|
|
167
|
+
client: AuthenticatedClient,
|
|
168
|
+
body: RunAttachmentUpdate,
|
|
169
|
+
) -> Optional[Union[HTTPValidationError, RunAttachmentResponse]]:
|
|
170
|
+
"""Update Run Attachment
|
|
171
|
+
|
|
172
|
+
Update a run attachment.
|
|
173
|
+
|
|
174
|
+
Currently only supports updating the expiration date.
|
|
175
|
+
|
|
176
|
+
Args:
|
|
177
|
+
attachment_id (UUID):
|
|
178
|
+
body (RunAttachmentUpdate): Schema for updating a run attachment
|
|
179
|
+
|
|
180
|
+
Raises:
|
|
181
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
182
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
183
|
+
|
|
184
|
+
Returns:
|
|
185
|
+
Union[HTTPValidationError, RunAttachmentResponse]
|
|
186
|
+
"""
|
|
187
|
+
|
|
188
|
+
return (
|
|
189
|
+
await asyncio_detailed(
|
|
190
|
+
attachment_id=attachment_id,
|
|
191
|
+
client=client,
|
|
192
|
+
body=body,
|
|
193
|
+
)
|
|
194
|
+
).parsed
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"""Contains all the data models used in inputs/outputs"""
|
|
2
2
|
|
|
3
|
+
from .attachment_type import AttachmentType
|
|
3
4
|
from .connection_create import ConnectionCreate
|
|
4
5
|
from .connection_response import ConnectionResponse
|
|
5
6
|
from .connection_status import ConnectionStatus
|
|
@@ -10,6 +11,17 @@ from .display_dimensions import DisplayDimensions
|
|
|
10
11
|
from .dummy_test_endpoint_v1_test_post_response_dummy_test_endpoint_v1_test_post import (
|
|
11
12
|
DummyTestEndpointV1TestPostResponseDummyTestEndpointV1TestPost,
|
|
12
13
|
)
|
|
14
|
+
from .file_input import FileInput
|
|
15
|
+
from .file_write_request import FileWriteRequest
|
|
16
|
+
from .fs_list_v1_computer_machine_id_fs_list_get_response_fs_list_v1_computer_machine_id_fs_list_get import (
|
|
17
|
+
FsListV1ComputerMachineIdFsListGetResponseFsListV1ComputerMachineIdFsListGet,
|
|
18
|
+
)
|
|
19
|
+
from .fs_read_v1_computer_machine_id_fs_read_get_response_fs_read_v1_computer_machine_id_fs_read_get import (
|
|
20
|
+
FsReadV1ComputerMachineIdFsReadGetResponseFsReadV1ComputerMachineIdFsReadGet,
|
|
21
|
+
)
|
|
22
|
+
from .fs_write_v1_computer_machine_id_fs_write_post_response_fs_write_v1_computer_machine_id_fs_write_post import (
|
|
23
|
+
FsWriteV1ComputerMachineIdFsWritePostResponseFsWriteV1ComputerMachineIdFsWritePost,
|
|
24
|
+
)
|
|
13
25
|
from .get_workflow_versions_v1_workflows_workflow_id_versions_get_response_200_item import (
|
|
14
26
|
GetWorkflowVersionsV1WorkflowsWorkflowIdVersionsGetResponse200Item,
|
|
15
27
|
)
|
|
@@ -29,12 +41,25 @@ from .mouse_position import MousePosition
|
|
|
29
41
|
from .paginated_response import PaginatedResponse
|
|
30
42
|
from .paginated_response_connection_response import PaginatedResponseConnectionResponse
|
|
31
43
|
from .paginated_response_machine_response import PaginatedResponseMachineResponse
|
|
44
|
+
from .paginated_response_run_attachment_response import PaginatedResponseRunAttachmentResponse
|
|
32
45
|
from .paginated_response_run_response import PaginatedResponseRunResponse
|
|
33
46
|
from .paginated_response_trajectory_response import PaginatedResponseTrajectoryResponse
|
|
34
47
|
from .paginated_response_workflow_response import PaginatedResponseWorkflowResponse
|
|
48
|
+
from .power_shell_exec_request import PowerShellExecRequest
|
|
49
|
+
from .power_shell_session_request import PowerShellSessionRequest
|
|
50
|
+
from .powershell_exec_v1_computer_machine_id_shell_powershell_exec_post_response_powershell_exec_v1_computer_machine_id_shell_powershell_exec_post import (
|
|
51
|
+
PowershellExecV1ComputerMachineIdShellPowershellExecPostResponsePowershellExecV1ComputerMachineIdShellPowershellExecPost,
|
|
52
|
+
)
|
|
53
|
+
from .powershell_session_v1_computer_machine_id_shell_powershell_session_post_response_powershell_session_v1_computer_machine_id_shell_powershell_session_post import (
|
|
54
|
+
PowershellSessionV1ComputerMachineIdShellPowershellSessionPostResponsePowershellSessionV1ComputerMachineIdShellPowershellSessionPost,
|
|
55
|
+
)
|
|
35
56
|
from .request_log_create import RequestLogCreate
|
|
36
57
|
from .request_log_response import RequestLogResponse
|
|
37
58
|
from .request_log_update import RequestLogUpdate
|
|
59
|
+
from .run_attachment_create import RunAttachmentCreate
|
|
60
|
+
from .run_attachment_download_url_response import RunAttachmentDownloadUrlResponse
|
|
61
|
+
from .run_attachment_response import RunAttachmentResponse
|
|
62
|
+
from .run_attachment_update import RunAttachmentUpdate
|
|
38
63
|
from .run_create import RunCreate
|
|
39
64
|
from .run_create_input_values_type_0 import RunCreateInputValuesType0
|
|
40
65
|
from .run_response import RunResponse
|
|
@@ -63,12 +88,18 @@ from .workflow_response_old_versions_type_0_item import WorkflowResponseOldVersi
|
|
|
63
88
|
from .workflow_update import WorkflowUpdate
|
|
64
89
|
|
|
65
90
|
__all__ = (
|
|
91
|
+
"AttachmentType",
|
|
66
92
|
"ConnectionCreate",
|
|
67
93
|
"ConnectionResponse",
|
|
68
94
|
"ConnectionStatus",
|
|
69
95
|
"DatabaseHealthCheckV1HealthDbGetResponseDatabaseHealthCheckV1HealthDbGet",
|
|
70
96
|
"DisplayDimensions",
|
|
71
97
|
"DummyTestEndpointV1TestPostResponseDummyTestEndpointV1TestPost",
|
|
98
|
+
"FileInput",
|
|
99
|
+
"FileWriteRequest",
|
|
100
|
+
"FsListV1ComputerMachineIdFsListGetResponseFsListV1ComputerMachineIdFsListGet",
|
|
101
|
+
"FsReadV1ComputerMachineIdFsReadGetResponseFsReadV1ComputerMachineIdFsReadGet",
|
|
102
|
+
"FsWriteV1ComputerMachineIdFsWritePostResponseFsWriteV1ComputerMachineIdFsWritePost",
|
|
72
103
|
"GetWorkflowVersionsV1WorkflowsWorkflowIdVersionsGetResponse200Item",
|
|
73
104
|
"HealthCheckV1HealthGetResponseHealthCheckV1HealthGet",
|
|
74
105
|
"HTTPValidationError",
|
|
@@ -84,12 +115,21 @@ __all__ = (
|
|
|
84
115
|
"PaginatedResponse",
|
|
85
116
|
"PaginatedResponseConnectionResponse",
|
|
86
117
|
"PaginatedResponseMachineResponse",
|
|
118
|
+
"PaginatedResponseRunAttachmentResponse",
|
|
87
119
|
"PaginatedResponseRunResponse",
|
|
88
120
|
"PaginatedResponseTrajectoryResponse",
|
|
89
121
|
"PaginatedResponseWorkflowResponse",
|
|
122
|
+
"PowerShellExecRequest",
|
|
123
|
+
"PowershellExecV1ComputerMachineIdShellPowershellExecPostResponsePowershellExecV1ComputerMachineIdShellPowershellExecPost",
|
|
124
|
+
"PowerShellSessionRequest",
|
|
125
|
+
"PowershellSessionV1ComputerMachineIdShellPowershellSessionPostResponsePowershellSessionV1ComputerMachineIdShellPowershellSessionPost",
|
|
90
126
|
"RequestLogCreate",
|
|
91
127
|
"RequestLogResponse",
|
|
92
128
|
"RequestLogUpdate",
|
|
129
|
+
"RunAttachmentCreate",
|
|
130
|
+
"RunAttachmentDownloadUrlResponse",
|
|
131
|
+
"RunAttachmentResponse",
|
|
132
|
+
"RunAttachmentUpdate",
|
|
93
133
|
"RunCreate",
|
|
94
134
|
"RunCreateInputValuesType0",
|
|
95
135
|
"RunResponse",
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import Any, TypeVar, Union, cast
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="FileInput")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class FileInput:
|
|
14
|
+
"""File input for run creation
|
|
15
|
+
|
|
16
|
+
Attributes:
|
|
17
|
+
filename (str):
|
|
18
|
+
content (str): Base64 encoded file content
|
|
19
|
+
target_path (Union[None, Unset, str]): Optional path on machine, defaults to ~/CyberdeskTransfers/
|
|
20
|
+
cleanup_imports_after_run (Union[Unset, bool]): Delete from machine after run completes Default: False.
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
filename: str
|
|
24
|
+
content: str
|
|
25
|
+
target_path: Union[None, Unset, str] = UNSET
|
|
26
|
+
cleanup_imports_after_run: Union[Unset, bool] = False
|
|
27
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
28
|
+
|
|
29
|
+
def to_dict(self) -> dict[str, Any]:
|
|
30
|
+
filename = self.filename
|
|
31
|
+
|
|
32
|
+
content = self.content
|
|
33
|
+
|
|
34
|
+
target_path: Union[None, Unset, str]
|
|
35
|
+
if isinstance(self.target_path, Unset):
|
|
36
|
+
target_path = UNSET
|
|
37
|
+
else:
|
|
38
|
+
target_path = self.target_path
|
|
39
|
+
|
|
40
|
+
cleanup_imports_after_run = self.cleanup_imports_after_run
|
|
41
|
+
|
|
42
|
+
field_dict: dict[str, Any] = {}
|
|
43
|
+
field_dict.update(self.additional_properties)
|
|
44
|
+
field_dict.update(
|
|
45
|
+
{
|
|
46
|
+
"filename": filename,
|
|
47
|
+
"content": content,
|
|
48
|
+
}
|
|
49
|
+
)
|
|
50
|
+
if target_path is not UNSET:
|
|
51
|
+
field_dict["target_path"] = target_path
|
|
52
|
+
if cleanup_imports_after_run is not UNSET:
|
|
53
|
+
field_dict["cleanup_imports_after_run"] = cleanup_imports_after_run
|
|
54
|
+
|
|
55
|
+
return field_dict
|
|
56
|
+
|
|
57
|
+
@classmethod
|
|
58
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
59
|
+
d = dict(src_dict)
|
|
60
|
+
filename = d.pop("filename")
|
|
61
|
+
|
|
62
|
+
content = d.pop("content")
|
|
63
|
+
|
|
64
|
+
def _parse_target_path(data: object) -> Union[None, Unset, str]:
|
|
65
|
+
if data is None:
|
|
66
|
+
return data
|
|
67
|
+
if isinstance(data, Unset):
|
|
68
|
+
return data
|
|
69
|
+
return cast(Union[None, Unset, str], data)
|
|
70
|
+
|
|
71
|
+
target_path = _parse_target_path(d.pop("target_path", UNSET))
|
|
72
|
+
|
|
73
|
+
cleanup_imports_after_run = d.pop("cleanup_imports_after_run", UNSET)
|
|
74
|
+
|
|
75
|
+
file_input = cls(
|
|
76
|
+
filename=filename,
|
|
77
|
+
content=content,
|
|
78
|
+
target_path=target_path,
|
|
79
|
+
cleanup_imports_after_run=cleanup_imports_after_run,
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
file_input.additional_properties = d
|
|
83
|
+
return file_input
|
|
84
|
+
|
|
85
|
+
@property
|
|
86
|
+
def additional_keys(self) -> list[str]:
|
|
87
|
+
return list(self.additional_properties.keys())
|
|
88
|
+
|
|
89
|
+
def __getitem__(self, key: str) -> Any:
|
|
90
|
+
return self.additional_properties[key]
|
|
91
|
+
|
|
92
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
93
|
+
self.additional_properties[key] = value
|
|
94
|
+
|
|
95
|
+
def __delitem__(self, key: str) -> None:
|
|
96
|
+
del self.additional_properties[key]
|
|
97
|
+
|
|
98
|
+
def __contains__(self, key: str) -> bool:
|
|
99
|
+
return key in self.additional_properties
|