cyberdesk 0.2.2__py3-none-any.whl → 0.2.4__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 +7 -7
- cyberdesk/actions.py +37 -37
- cyberdesk/client.py +74 -74
- cyberdesk/types.py +49 -49
- {cyberdesk-0.2.2.dist-info → cyberdesk-0.2.4.dist-info}/METADATA +14 -5
- cyberdesk-0.2.4.dist-info/RECORD +136 -0
- {cyberdesk-0.2.2.dist-info → cyberdesk-0.2.4.dist-info}/WHEEL +1 -1
- {cyberdesk-0.2.2.dist-info → cyberdesk-0.2.4.dist-info}/licenses/LICENSE +20 -20
- cyberdesk-0.2.4.dist-info/top_level.txt +2 -0
- openapi_client/api_reference_client/__init__.py +8 -0
- openapi_client/api_reference_client/api/__init__.py +1 -0
- openapi_client/api_reference_client/api/desktop/__init__.py +1 -0
- openapi_client/api_reference_client/api/desktop/get_v1_desktop_id.py +293 -0
- openapi_client/api_reference_client/api/desktop/post_v1_desktop.py +294 -0
- openapi_client/api_reference_client/api/desktop/post_v1_desktop_id_bash_action.py +307 -0
- openapi_client/api_reference_client/api/desktop/post_v1_desktop_id_computer_action.py +419 -0
- openapi_client/api_reference_client/api/desktop/post_v1_desktop_id_stop.py +288 -0
- openapi_client/api_reference_client/client.py +268 -0
- openapi_client/api_reference_client/errors.py +16 -0
- openapi_client/api_reference_client/models/__init__.py +249 -0
- openapi_client/api_reference_client/models/get_v1_desktop_id_response_200.py +104 -0
- openapi_client/api_reference_client/models/get_v1_desktop_id_response_200_status.py +11 -0
- openapi_client/api_reference_client/models/get_v1_desktop_id_response_400.py +69 -0
- openapi_client/api_reference_client/models/get_v1_desktop_id_response_400_status.py +8 -0
- openapi_client/api_reference_client/models/get_v1_desktop_id_response_401.py +69 -0
- openapi_client/api_reference_client/models/get_v1_desktop_id_response_401_status.py +8 -0
- openapi_client/api_reference_client/models/get_v1_desktop_id_response_403.py +69 -0
- openapi_client/api_reference_client/models/get_v1_desktop_id_response_403_status.py +8 -0
- openapi_client/api_reference_client/models/get_v1_desktop_id_response_404.py +69 -0
- openapi_client/api_reference_client/models/get_v1_desktop_id_response_404_status.py +8 -0
- openapi_client/api_reference_client/models/get_v1_desktop_id_response_409.py +69 -0
- openapi_client/api_reference_client/models/get_v1_desktop_id_response_409_status.py +8 -0
- openapi_client/api_reference_client/models/get_v1_desktop_id_response_429.py +69 -0
- openapi_client/api_reference_client/models/get_v1_desktop_id_response_429_status.py +8 -0
- openapi_client/api_reference_client/models/get_v1_desktop_id_response_500.py +69 -0
- openapi_client/api_reference_client/models/get_v1_desktop_id_response_500_status.py +8 -0
- openapi_client/api_reference_client/models/get_v1_desktop_id_response_502.py +69 -0
- openapi_client/api_reference_client/models/get_v1_desktop_id_response_502_status.py +8 -0
- openapi_client/api_reference_client/models/post_v1_desktop_body.py +59 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_body.py +59 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_200.py +79 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_400.py +69 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_400_status.py +8 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_401.py +69 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_401_status.py +8 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_403.py +69 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_403_status.py +8 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_404.py +69 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_404_status.py +8 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_409.py +69 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_409_status.py +8 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_429.py +69 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_429_status.py +8 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_500.py +69 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_500_status.py +8 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_502.py +69 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_502_status.py +8 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_click_mouse_action.py +133 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_click_mouse_action_button.py +10 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_click_mouse_action_click_type.py +10 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_click_mouse_action_type.py +8 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_drag_mouse_action.py +98 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_drag_mouse_action_end.py +71 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_drag_mouse_action_start.py +71 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_drag_mouse_action_type.py +8 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_get_cursor_position_action.py +64 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_get_cursor_position_action_type.py +8 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_move_mouse_action.py +80 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_move_mouse_action_type.py +8 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_press_keys_action.py +109 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_press_keys_action_key_action_type.py +10 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_press_keys_action_type.py +8 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_200.py +79 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_400.py +71 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_400_status.py +8 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_401.py +71 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_401_status.py +8 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_403.py +71 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_403_status.py +8 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_404.py +71 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_404_status.py +8 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_409.py +71 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_409_status.py +8 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_429.py +71 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_429_status.py +8 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_500.py +71 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_500_status.py +8 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_502.py +71 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_502_status.py +8 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_screenshot_action.py +63 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_screenshot_action_type.py +8 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_scroll_action.py +81 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_scroll_action_direction.py +11 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_scroll_action_type.py +8 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_type_text_action.py +71 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_type_text_action_type.py +8 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_wait_action.py +70 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_wait_action_type.py +8 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_200.py +62 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_200_status.py +11 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_400.py +69 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_400_status.py +8 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_401.py +69 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_401_status.py +8 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_403.py +69 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_403_status.py +8 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_404.py +69 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_404_status.py +8 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_409.py +69 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_409_status.py +8 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_429.py +69 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_429_status.py +8 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_500.py +69 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_500_status.py +8 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_502.py +69 -0
- openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_502_status.py +8 -0
- openapi_client/api_reference_client/models/post_v1_desktop_response_200.py +70 -0
- openapi_client/api_reference_client/models/post_v1_desktop_response_200_status.py +11 -0
- openapi_client/api_reference_client/models/post_v1_desktop_response_400.py +69 -0
- openapi_client/api_reference_client/models/post_v1_desktop_response_400_status.py +8 -0
- openapi_client/api_reference_client/models/post_v1_desktop_response_401.py +69 -0
- openapi_client/api_reference_client/models/post_v1_desktop_response_401_status.py +8 -0
- openapi_client/api_reference_client/models/post_v1_desktop_response_403.py +69 -0
- openapi_client/api_reference_client/models/post_v1_desktop_response_403_status.py +8 -0
- openapi_client/api_reference_client/models/post_v1_desktop_response_404.py +69 -0
- openapi_client/api_reference_client/models/post_v1_desktop_response_404_status.py +8 -0
- openapi_client/api_reference_client/models/post_v1_desktop_response_409.py +69 -0
- openapi_client/api_reference_client/models/post_v1_desktop_response_409_status.py +8 -0
- openapi_client/api_reference_client/models/post_v1_desktop_response_429.py +69 -0
- openapi_client/api_reference_client/models/post_v1_desktop_response_429_status.py +8 -0
- openapi_client/api_reference_client/models/post_v1_desktop_response_500.py +69 -0
- openapi_client/api_reference_client/models/post_v1_desktop_response_500_status.py +8 -0
- openapi_client/api_reference_client/models/post_v1_desktop_response_502.py +69 -0
- openapi_client/api_reference_client/models/post_v1_desktop_response_502_status.py +8 -0
- openapi_client/api_reference_client/py.typed +1 -0
- openapi_client/api_reference_client/types.py +46 -0
- cyberdesk-0.2.2.dist-info/RECORD +0 -9
- cyberdesk-0.2.2.dist-info/top_level.txt +0 -1
|
@@ -0,0 +1,419 @@
|
|
|
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.post_v1_desktop_id_computer_action_click_mouse_action import (
|
|
9
|
+
PostV1DesktopIdComputerActionClickMouseAction,
|
|
10
|
+
)
|
|
11
|
+
from ...models.post_v1_desktop_id_computer_action_drag_mouse_action import PostV1DesktopIdComputerActionDragMouseAction
|
|
12
|
+
from ...models.post_v1_desktop_id_computer_action_get_cursor_position_action import (
|
|
13
|
+
PostV1DesktopIdComputerActionGetCursorPositionAction,
|
|
14
|
+
)
|
|
15
|
+
from ...models.post_v1_desktop_id_computer_action_move_mouse_action import PostV1DesktopIdComputerActionMoveMouseAction
|
|
16
|
+
from ...models.post_v1_desktop_id_computer_action_press_keys_action import PostV1DesktopIdComputerActionPressKeysAction
|
|
17
|
+
from ...models.post_v1_desktop_id_computer_action_response_200 import PostV1DesktopIdComputerActionResponse200
|
|
18
|
+
from ...models.post_v1_desktop_id_computer_action_response_400 import PostV1DesktopIdComputerActionResponse400
|
|
19
|
+
from ...models.post_v1_desktop_id_computer_action_response_401 import PostV1DesktopIdComputerActionResponse401
|
|
20
|
+
from ...models.post_v1_desktop_id_computer_action_response_403 import PostV1DesktopIdComputerActionResponse403
|
|
21
|
+
from ...models.post_v1_desktop_id_computer_action_response_404 import PostV1DesktopIdComputerActionResponse404
|
|
22
|
+
from ...models.post_v1_desktop_id_computer_action_response_409 import PostV1DesktopIdComputerActionResponse409
|
|
23
|
+
from ...models.post_v1_desktop_id_computer_action_response_429 import PostV1DesktopIdComputerActionResponse429
|
|
24
|
+
from ...models.post_v1_desktop_id_computer_action_response_500 import PostV1DesktopIdComputerActionResponse500
|
|
25
|
+
from ...models.post_v1_desktop_id_computer_action_response_502 import PostV1DesktopIdComputerActionResponse502
|
|
26
|
+
from ...models.post_v1_desktop_id_computer_action_screenshot_action import PostV1DesktopIdComputerActionScreenshotAction
|
|
27
|
+
from ...models.post_v1_desktop_id_computer_action_scroll_action import PostV1DesktopIdComputerActionScrollAction
|
|
28
|
+
from ...models.post_v1_desktop_id_computer_action_type_text_action import PostV1DesktopIdComputerActionTypeTextAction
|
|
29
|
+
from ...models.post_v1_desktop_id_computer_action_wait_action import PostV1DesktopIdComputerActionWaitAction
|
|
30
|
+
from ...types import Response
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def _get_kwargs(
|
|
34
|
+
id: str,
|
|
35
|
+
*,
|
|
36
|
+
body: Union[
|
|
37
|
+
"PostV1DesktopIdComputerActionClickMouseAction",
|
|
38
|
+
"PostV1DesktopIdComputerActionDragMouseAction",
|
|
39
|
+
"PostV1DesktopIdComputerActionGetCursorPositionAction",
|
|
40
|
+
"PostV1DesktopIdComputerActionMoveMouseAction",
|
|
41
|
+
"PostV1DesktopIdComputerActionPressKeysAction",
|
|
42
|
+
"PostV1DesktopIdComputerActionScreenshotAction",
|
|
43
|
+
"PostV1DesktopIdComputerActionScrollAction",
|
|
44
|
+
"PostV1DesktopIdComputerActionTypeTextAction",
|
|
45
|
+
"PostV1DesktopIdComputerActionWaitAction",
|
|
46
|
+
],
|
|
47
|
+
x_api_key: str,
|
|
48
|
+
) -> dict[str, Any]:
|
|
49
|
+
headers: dict[str, Any] = {}
|
|
50
|
+
headers["x-api-key"] = x_api_key
|
|
51
|
+
|
|
52
|
+
_kwargs: dict[str, Any] = {
|
|
53
|
+
"method": "post",
|
|
54
|
+
"url": f"/v1/desktop/{id}/computer-action",
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
_body: dict[str, Any]
|
|
58
|
+
if isinstance(body, PostV1DesktopIdComputerActionClickMouseAction):
|
|
59
|
+
_body = body.to_dict()
|
|
60
|
+
elif isinstance(body, PostV1DesktopIdComputerActionScrollAction):
|
|
61
|
+
_body = body.to_dict()
|
|
62
|
+
elif isinstance(body, PostV1DesktopIdComputerActionMoveMouseAction):
|
|
63
|
+
_body = body.to_dict()
|
|
64
|
+
elif isinstance(body, PostV1DesktopIdComputerActionDragMouseAction):
|
|
65
|
+
_body = body.to_dict()
|
|
66
|
+
elif isinstance(body, PostV1DesktopIdComputerActionTypeTextAction):
|
|
67
|
+
_body = body.to_dict()
|
|
68
|
+
elif isinstance(body, PostV1DesktopIdComputerActionPressKeysAction):
|
|
69
|
+
_body = body.to_dict()
|
|
70
|
+
elif isinstance(body, PostV1DesktopIdComputerActionWaitAction):
|
|
71
|
+
_body = body.to_dict()
|
|
72
|
+
elif isinstance(body, PostV1DesktopIdComputerActionScreenshotAction):
|
|
73
|
+
_body = body.to_dict()
|
|
74
|
+
else:
|
|
75
|
+
_body = body.to_dict()
|
|
76
|
+
|
|
77
|
+
_kwargs["json"] = _body
|
|
78
|
+
headers["Content-Type"] = "application/json"
|
|
79
|
+
|
|
80
|
+
_kwargs["headers"] = headers
|
|
81
|
+
return _kwargs
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
def _parse_response(
|
|
85
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
86
|
+
) -> Optional[
|
|
87
|
+
Union[
|
|
88
|
+
PostV1DesktopIdComputerActionResponse200,
|
|
89
|
+
PostV1DesktopIdComputerActionResponse400,
|
|
90
|
+
PostV1DesktopIdComputerActionResponse401,
|
|
91
|
+
PostV1DesktopIdComputerActionResponse403,
|
|
92
|
+
PostV1DesktopIdComputerActionResponse404,
|
|
93
|
+
PostV1DesktopIdComputerActionResponse409,
|
|
94
|
+
PostV1DesktopIdComputerActionResponse429,
|
|
95
|
+
PostV1DesktopIdComputerActionResponse500,
|
|
96
|
+
PostV1DesktopIdComputerActionResponse502,
|
|
97
|
+
]
|
|
98
|
+
]:
|
|
99
|
+
if response.status_code == 200:
|
|
100
|
+
response_200 = PostV1DesktopIdComputerActionResponse200.from_dict(response.json())
|
|
101
|
+
|
|
102
|
+
return response_200
|
|
103
|
+
if response.status_code == 400:
|
|
104
|
+
response_400 = PostV1DesktopIdComputerActionResponse400.from_dict(response.json())
|
|
105
|
+
|
|
106
|
+
return response_400
|
|
107
|
+
if response.status_code == 401:
|
|
108
|
+
response_401 = PostV1DesktopIdComputerActionResponse401.from_dict(response.json())
|
|
109
|
+
|
|
110
|
+
return response_401
|
|
111
|
+
if response.status_code == 403:
|
|
112
|
+
response_403 = PostV1DesktopIdComputerActionResponse403.from_dict(response.json())
|
|
113
|
+
|
|
114
|
+
return response_403
|
|
115
|
+
if response.status_code == 404:
|
|
116
|
+
response_404 = PostV1DesktopIdComputerActionResponse404.from_dict(response.json())
|
|
117
|
+
|
|
118
|
+
return response_404
|
|
119
|
+
if response.status_code == 409:
|
|
120
|
+
response_409 = PostV1DesktopIdComputerActionResponse409.from_dict(response.json())
|
|
121
|
+
|
|
122
|
+
return response_409
|
|
123
|
+
if response.status_code == 429:
|
|
124
|
+
response_429 = PostV1DesktopIdComputerActionResponse429.from_dict(response.json())
|
|
125
|
+
|
|
126
|
+
return response_429
|
|
127
|
+
if response.status_code == 500:
|
|
128
|
+
response_500 = PostV1DesktopIdComputerActionResponse500.from_dict(response.json())
|
|
129
|
+
|
|
130
|
+
return response_500
|
|
131
|
+
if response.status_code == 502:
|
|
132
|
+
response_502 = PostV1DesktopIdComputerActionResponse502.from_dict(response.json())
|
|
133
|
+
|
|
134
|
+
return response_502
|
|
135
|
+
if client.raise_on_unexpected_status:
|
|
136
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
137
|
+
else:
|
|
138
|
+
return None
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
def _build_response(
|
|
142
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
143
|
+
) -> Response[
|
|
144
|
+
Union[
|
|
145
|
+
PostV1DesktopIdComputerActionResponse200,
|
|
146
|
+
PostV1DesktopIdComputerActionResponse400,
|
|
147
|
+
PostV1DesktopIdComputerActionResponse401,
|
|
148
|
+
PostV1DesktopIdComputerActionResponse403,
|
|
149
|
+
PostV1DesktopIdComputerActionResponse404,
|
|
150
|
+
PostV1DesktopIdComputerActionResponse409,
|
|
151
|
+
PostV1DesktopIdComputerActionResponse429,
|
|
152
|
+
PostV1DesktopIdComputerActionResponse500,
|
|
153
|
+
PostV1DesktopIdComputerActionResponse502,
|
|
154
|
+
]
|
|
155
|
+
]:
|
|
156
|
+
return Response(
|
|
157
|
+
status_code=HTTPStatus(response.status_code),
|
|
158
|
+
content=response.content,
|
|
159
|
+
headers=response.headers,
|
|
160
|
+
parsed=_parse_response(client=client, response=response),
|
|
161
|
+
)
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
def sync_detailed(
|
|
165
|
+
id: str,
|
|
166
|
+
*,
|
|
167
|
+
client: Union[AuthenticatedClient, Client],
|
|
168
|
+
body: Union[
|
|
169
|
+
"PostV1DesktopIdComputerActionClickMouseAction",
|
|
170
|
+
"PostV1DesktopIdComputerActionDragMouseAction",
|
|
171
|
+
"PostV1DesktopIdComputerActionGetCursorPositionAction",
|
|
172
|
+
"PostV1DesktopIdComputerActionMoveMouseAction",
|
|
173
|
+
"PostV1DesktopIdComputerActionPressKeysAction",
|
|
174
|
+
"PostV1DesktopIdComputerActionScreenshotAction",
|
|
175
|
+
"PostV1DesktopIdComputerActionScrollAction",
|
|
176
|
+
"PostV1DesktopIdComputerActionTypeTextAction",
|
|
177
|
+
"PostV1DesktopIdComputerActionWaitAction",
|
|
178
|
+
],
|
|
179
|
+
x_api_key: str,
|
|
180
|
+
) -> Response[
|
|
181
|
+
Union[
|
|
182
|
+
PostV1DesktopIdComputerActionResponse200,
|
|
183
|
+
PostV1DesktopIdComputerActionResponse400,
|
|
184
|
+
PostV1DesktopIdComputerActionResponse401,
|
|
185
|
+
PostV1DesktopIdComputerActionResponse403,
|
|
186
|
+
PostV1DesktopIdComputerActionResponse404,
|
|
187
|
+
PostV1DesktopIdComputerActionResponse409,
|
|
188
|
+
PostV1DesktopIdComputerActionResponse429,
|
|
189
|
+
PostV1DesktopIdComputerActionResponse500,
|
|
190
|
+
PostV1DesktopIdComputerActionResponse502,
|
|
191
|
+
]
|
|
192
|
+
]:
|
|
193
|
+
"""Perform an action on the desktop
|
|
194
|
+
|
|
195
|
+
Executes a computer action such as mouse clicks, keyboard input, or screenshots on the desktop
|
|
196
|
+
|
|
197
|
+
Args:
|
|
198
|
+
id (str): Desktop instance ID to perform the action on Example: desktop_12345.
|
|
199
|
+
x_api_key (str): API key for authentication Example: api_12345.
|
|
200
|
+
body (Union['PostV1DesktopIdComputerActionClickMouseAction',
|
|
201
|
+
'PostV1DesktopIdComputerActionDragMouseAction',
|
|
202
|
+
'PostV1DesktopIdComputerActionGetCursorPositionAction',
|
|
203
|
+
'PostV1DesktopIdComputerActionMoveMouseAction',
|
|
204
|
+
'PostV1DesktopIdComputerActionPressKeysAction',
|
|
205
|
+
'PostV1DesktopIdComputerActionScreenshotAction',
|
|
206
|
+
'PostV1DesktopIdComputerActionScrollAction',
|
|
207
|
+
'PostV1DesktopIdComputerActionTypeTextAction',
|
|
208
|
+
'PostV1DesktopIdComputerActionWaitAction']):
|
|
209
|
+
|
|
210
|
+
Raises:
|
|
211
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
212
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
213
|
+
|
|
214
|
+
Returns:
|
|
215
|
+
Response[Union[PostV1DesktopIdComputerActionResponse200, PostV1DesktopIdComputerActionResponse400, PostV1DesktopIdComputerActionResponse401, PostV1DesktopIdComputerActionResponse403, PostV1DesktopIdComputerActionResponse404, PostV1DesktopIdComputerActionResponse409, PostV1DesktopIdComputerActionResponse429, PostV1DesktopIdComputerActionResponse500, PostV1DesktopIdComputerActionResponse502]]
|
|
216
|
+
"""
|
|
217
|
+
|
|
218
|
+
kwargs = _get_kwargs(
|
|
219
|
+
id=id,
|
|
220
|
+
body=body,
|
|
221
|
+
x_api_key=x_api_key,
|
|
222
|
+
)
|
|
223
|
+
|
|
224
|
+
response = client.get_httpx_client().request(
|
|
225
|
+
**kwargs,
|
|
226
|
+
)
|
|
227
|
+
|
|
228
|
+
return _build_response(client=client, response=response)
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
def sync(
|
|
232
|
+
id: str,
|
|
233
|
+
*,
|
|
234
|
+
client: Union[AuthenticatedClient, Client],
|
|
235
|
+
body: Union[
|
|
236
|
+
"PostV1DesktopIdComputerActionClickMouseAction",
|
|
237
|
+
"PostV1DesktopIdComputerActionDragMouseAction",
|
|
238
|
+
"PostV1DesktopIdComputerActionGetCursorPositionAction",
|
|
239
|
+
"PostV1DesktopIdComputerActionMoveMouseAction",
|
|
240
|
+
"PostV1DesktopIdComputerActionPressKeysAction",
|
|
241
|
+
"PostV1DesktopIdComputerActionScreenshotAction",
|
|
242
|
+
"PostV1DesktopIdComputerActionScrollAction",
|
|
243
|
+
"PostV1DesktopIdComputerActionTypeTextAction",
|
|
244
|
+
"PostV1DesktopIdComputerActionWaitAction",
|
|
245
|
+
],
|
|
246
|
+
x_api_key: str,
|
|
247
|
+
) -> Optional[
|
|
248
|
+
Union[
|
|
249
|
+
PostV1DesktopIdComputerActionResponse200,
|
|
250
|
+
PostV1DesktopIdComputerActionResponse400,
|
|
251
|
+
PostV1DesktopIdComputerActionResponse401,
|
|
252
|
+
PostV1DesktopIdComputerActionResponse403,
|
|
253
|
+
PostV1DesktopIdComputerActionResponse404,
|
|
254
|
+
PostV1DesktopIdComputerActionResponse409,
|
|
255
|
+
PostV1DesktopIdComputerActionResponse429,
|
|
256
|
+
PostV1DesktopIdComputerActionResponse500,
|
|
257
|
+
PostV1DesktopIdComputerActionResponse502,
|
|
258
|
+
]
|
|
259
|
+
]:
|
|
260
|
+
"""Perform an action on the desktop
|
|
261
|
+
|
|
262
|
+
Executes a computer action such as mouse clicks, keyboard input, or screenshots on the desktop
|
|
263
|
+
|
|
264
|
+
Args:
|
|
265
|
+
id (str): Desktop instance ID to perform the action on Example: desktop_12345.
|
|
266
|
+
x_api_key (str): API key for authentication Example: api_12345.
|
|
267
|
+
body (Union['PostV1DesktopIdComputerActionClickMouseAction',
|
|
268
|
+
'PostV1DesktopIdComputerActionDragMouseAction',
|
|
269
|
+
'PostV1DesktopIdComputerActionGetCursorPositionAction',
|
|
270
|
+
'PostV1DesktopIdComputerActionMoveMouseAction',
|
|
271
|
+
'PostV1DesktopIdComputerActionPressKeysAction',
|
|
272
|
+
'PostV1DesktopIdComputerActionScreenshotAction',
|
|
273
|
+
'PostV1DesktopIdComputerActionScrollAction',
|
|
274
|
+
'PostV1DesktopIdComputerActionTypeTextAction',
|
|
275
|
+
'PostV1DesktopIdComputerActionWaitAction']):
|
|
276
|
+
|
|
277
|
+
Raises:
|
|
278
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
279
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
280
|
+
|
|
281
|
+
Returns:
|
|
282
|
+
Union[PostV1DesktopIdComputerActionResponse200, PostV1DesktopIdComputerActionResponse400, PostV1DesktopIdComputerActionResponse401, PostV1DesktopIdComputerActionResponse403, PostV1DesktopIdComputerActionResponse404, PostV1DesktopIdComputerActionResponse409, PostV1DesktopIdComputerActionResponse429, PostV1DesktopIdComputerActionResponse500, PostV1DesktopIdComputerActionResponse502]
|
|
283
|
+
"""
|
|
284
|
+
|
|
285
|
+
return sync_detailed(
|
|
286
|
+
id=id,
|
|
287
|
+
client=client,
|
|
288
|
+
body=body,
|
|
289
|
+
x_api_key=x_api_key,
|
|
290
|
+
).parsed
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
async def asyncio_detailed(
|
|
294
|
+
id: str,
|
|
295
|
+
*,
|
|
296
|
+
client: Union[AuthenticatedClient, Client],
|
|
297
|
+
body: Union[
|
|
298
|
+
"PostV1DesktopIdComputerActionClickMouseAction",
|
|
299
|
+
"PostV1DesktopIdComputerActionDragMouseAction",
|
|
300
|
+
"PostV1DesktopIdComputerActionGetCursorPositionAction",
|
|
301
|
+
"PostV1DesktopIdComputerActionMoveMouseAction",
|
|
302
|
+
"PostV1DesktopIdComputerActionPressKeysAction",
|
|
303
|
+
"PostV1DesktopIdComputerActionScreenshotAction",
|
|
304
|
+
"PostV1DesktopIdComputerActionScrollAction",
|
|
305
|
+
"PostV1DesktopIdComputerActionTypeTextAction",
|
|
306
|
+
"PostV1DesktopIdComputerActionWaitAction",
|
|
307
|
+
],
|
|
308
|
+
x_api_key: str,
|
|
309
|
+
) -> Response[
|
|
310
|
+
Union[
|
|
311
|
+
PostV1DesktopIdComputerActionResponse200,
|
|
312
|
+
PostV1DesktopIdComputerActionResponse400,
|
|
313
|
+
PostV1DesktopIdComputerActionResponse401,
|
|
314
|
+
PostV1DesktopIdComputerActionResponse403,
|
|
315
|
+
PostV1DesktopIdComputerActionResponse404,
|
|
316
|
+
PostV1DesktopIdComputerActionResponse409,
|
|
317
|
+
PostV1DesktopIdComputerActionResponse429,
|
|
318
|
+
PostV1DesktopIdComputerActionResponse500,
|
|
319
|
+
PostV1DesktopIdComputerActionResponse502,
|
|
320
|
+
]
|
|
321
|
+
]:
|
|
322
|
+
"""Perform an action on the desktop
|
|
323
|
+
|
|
324
|
+
Executes a computer action such as mouse clicks, keyboard input, or screenshots on the desktop
|
|
325
|
+
|
|
326
|
+
Args:
|
|
327
|
+
id (str): Desktop instance ID to perform the action on Example: desktop_12345.
|
|
328
|
+
x_api_key (str): API key for authentication Example: api_12345.
|
|
329
|
+
body (Union['PostV1DesktopIdComputerActionClickMouseAction',
|
|
330
|
+
'PostV1DesktopIdComputerActionDragMouseAction',
|
|
331
|
+
'PostV1DesktopIdComputerActionGetCursorPositionAction',
|
|
332
|
+
'PostV1DesktopIdComputerActionMoveMouseAction',
|
|
333
|
+
'PostV1DesktopIdComputerActionPressKeysAction',
|
|
334
|
+
'PostV1DesktopIdComputerActionScreenshotAction',
|
|
335
|
+
'PostV1DesktopIdComputerActionScrollAction',
|
|
336
|
+
'PostV1DesktopIdComputerActionTypeTextAction',
|
|
337
|
+
'PostV1DesktopIdComputerActionWaitAction']):
|
|
338
|
+
|
|
339
|
+
Raises:
|
|
340
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
341
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
342
|
+
|
|
343
|
+
Returns:
|
|
344
|
+
Response[Union[PostV1DesktopIdComputerActionResponse200, PostV1DesktopIdComputerActionResponse400, PostV1DesktopIdComputerActionResponse401, PostV1DesktopIdComputerActionResponse403, PostV1DesktopIdComputerActionResponse404, PostV1DesktopIdComputerActionResponse409, PostV1DesktopIdComputerActionResponse429, PostV1DesktopIdComputerActionResponse500, PostV1DesktopIdComputerActionResponse502]]
|
|
345
|
+
"""
|
|
346
|
+
|
|
347
|
+
kwargs = _get_kwargs(
|
|
348
|
+
id=id,
|
|
349
|
+
body=body,
|
|
350
|
+
x_api_key=x_api_key,
|
|
351
|
+
)
|
|
352
|
+
|
|
353
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
354
|
+
|
|
355
|
+
return _build_response(client=client, response=response)
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
async def asyncio(
|
|
359
|
+
id: str,
|
|
360
|
+
*,
|
|
361
|
+
client: Union[AuthenticatedClient, Client],
|
|
362
|
+
body: Union[
|
|
363
|
+
"PostV1DesktopIdComputerActionClickMouseAction",
|
|
364
|
+
"PostV1DesktopIdComputerActionDragMouseAction",
|
|
365
|
+
"PostV1DesktopIdComputerActionGetCursorPositionAction",
|
|
366
|
+
"PostV1DesktopIdComputerActionMoveMouseAction",
|
|
367
|
+
"PostV1DesktopIdComputerActionPressKeysAction",
|
|
368
|
+
"PostV1DesktopIdComputerActionScreenshotAction",
|
|
369
|
+
"PostV1DesktopIdComputerActionScrollAction",
|
|
370
|
+
"PostV1DesktopIdComputerActionTypeTextAction",
|
|
371
|
+
"PostV1DesktopIdComputerActionWaitAction",
|
|
372
|
+
],
|
|
373
|
+
x_api_key: str,
|
|
374
|
+
) -> Optional[
|
|
375
|
+
Union[
|
|
376
|
+
PostV1DesktopIdComputerActionResponse200,
|
|
377
|
+
PostV1DesktopIdComputerActionResponse400,
|
|
378
|
+
PostV1DesktopIdComputerActionResponse401,
|
|
379
|
+
PostV1DesktopIdComputerActionResponse403,
|
|
380
|
+
PostV1DesktopIdComputerActionResponse404,
|
|
381
|
+
PostV1DesktopIdComputerActionResponse409,
|
|
382
|
+
PostV1DesktopIdComputerActionResponse429,
|
|
383
|
+
PostV1DesktopIdComputerActionResponse500,
|
|
384
|
+
PostV1DesktopIdComputerActionResponse502,
|
|
385
|
+
]
|
|
386
|
+
]:
|
|
387
|
+
"""Perform an action on the desktop
|
|
388
|
+
|
|
389
|
+
Executes a computer action such as mouse clicks, keyboard input, or screenshots on the desktop
|
|
390
|
+
|
|
391
|
+
Args:
|
|
392
|
+
id (str): Desktop instance ID to perform the action on Example: desktop_12345.
|
|
393
|
+
x_api_key (str): API key for authentication Example: api_12345.
|
|
394
|
+
body (Union['PostV1DesktopIdComputerActionClickMouseAction',
|
|
395
|
+
'PostV1DesktopIdComputerActionDragMouseAction',
|
|
396
|
+
'PostV1DesktopIdComputerActionGetCursorPositionAction',
|
|
397
|
+
'PostV1DesktopIdComputerActionMoveMouseAction',
|
|
398
|
+
'PostV1DesktopIdComputerActionPressKeysAction',
|
|
399
|
+
'PostV1DesktopIdComputerActionScreenshotAction',
|
|
400
|
+
'PostV1DesktopIdComputerActionScrollAction',
|
|
401
|
+
'PostV1DesktopIdComputerActionTypeTextAction',
|
|
402
|
+
'PostV1DesktopIdComputerActionWaitAction']):
|
|
403
|
+
|
|
404
|
+
Raises:
|
|
405
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
406
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
407
|
+
|
|
408
|
+
Returns:
|
|
409
|
+
Union[PostV1DesktopIdComputerActionResponse200, PostV1DesktopIdComputerActionResponse400, PostV1DesktopIdComputerActionResponse401, PostV1DesktopIdComputerActionResponse403, PostV1DesktopIdComputerActionResponse404, PostV1DesktopIdComputerActionResponse409, PostV1DesktopIdComputerActionResponse429, PostV1DesktopIdComputerActionResponse500, PostV1DesktopIdComputerActionResponse502]
|
|
410
|
+
"""
|
|
411
|
+
|
|
412
|
+
return (
|
|
413
|
+
await asyncio_detailed(
|
|
414
|
+
id=id,
|
|
415
|
+
client=client,
|
|
416
|
+
body=body,
|
|
417
|
+
x_api_key=x_api_key,
|
|
418
|
+
)
|
|
419
|
+
).parsed
|