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.

Files changed (138) hide show
  1. cyberdesk/__init__.py +7 -7
  2. cyberdesk/actions.py +37 -37
  3. cyberdesk/client.py +74 -74
  4. cyberdesk/types.py +49 -49
  5. {cyberdesk-0.2.2.dist-info → cyberdesk-0.2.4.dist-info}/METADATA +14 -5
  6. cyberdesk-0.2.4.dist-info/RECORD +136 -0
  7. {cyberdesk-0.2.2.dist-info → cyberdesk-0.2.4.dist-info}/WHEEL +1 -1
  8. {cyberdesk-0.2.2.dist-info → cyberdesk-0.2.4.dist-info}/licenses/LICENSE +20 -20
  9. cyberdesk-0.2.4.dist-info/top_level.txt +2 -0
  10. openapi_client/api_reference_client/__init__.py +8 -0
  11. openapi_client/api_reference_client/api/__init__.py +1 -0
  12. openapi_client/api_reference_client/api/desktop/__init__.py +1 -0
  13. openapi_client/api_reference_client/api/desktop/get_v1_desktop_id.py +293 -0
  14. openapi_client/api_reference_client/api/desktop/post_v1_desktop.py +294 -0
  15. openapi_client/api_reference_client/api/desktop/post_v1_desktop_id_bash_action.py +307 -0
  16. openapi_client/api_reference_client/api/desktop/post_v1_desktop_id_computer_action.py +419 -0
  17. openapi_client/api_reference_client/api/desktop/post_v1_desktop_id_stop.py +288 -0
  18. openapi_client/api_reference_client/client.py +268 -0
  19. openapi_client/api_reference_client/errors.py +16 -0
  20. openapi_client/api_reference_client/models/__init__.py +249 -0
  21. openapi_client/api_reference_client/models/get_v1_desktop_id_response_200.py +104 -0
  22. openapi_client/api_reference_client/models/get_v1_desktop_id_response_200_status.py +11 -0
  23. openapi_client/api_reference_client/models/get_v1_desktop_id_response_400.py +69 -0
  24. openapi_client/api_reference_client/models/get_v1_desktop_id_response_400_status.py +8 -0
  25. openapi_client/api_reference_client/models/get_v1_desktop_id_response_401.py +69 -0
  26. openapi_client/api_reference_client/models/get_v1_desktop_id_response_401_status.py +8 -0
  27. openapi_client/api_reference_client/models/get_v1_desktop_id_response_403.py +69 -0
  28. openapi_client/api_reference_client/models/get_v1_desktop_id_response_403_status.py +8 -0
  29. openapi_client/api_reference_client/models/get_v1_desktop_id_response_404.py +69 -0
  30. openapi_client/api_reference_client/models/get_v1_desktop_id_response_404_status.py +8 -0
  31. openapi_client/api_reference_client/models/get_v1_desktop_id_response_409.py +69 -0
  32. openapi_client/api_reference_client/models/get_v1_desktop_id_response_409_status.py +8 -0
  33. openapi_client/api_reference_client/models/get_v1_desktop_id_response_429.py +69 -0
  34. openapi_client/api_reference_client/models/get_v1_desktop_id_response_429_status.py +8 -0
  35. openapi_client/api_reference_client/models/get_v1_desktop_id_response_500.py +69 -0
  36. openapi_client/api_reference_client/models/get_v1_desktop_id_response_500_status.py +8 -0
  37. openapi_client/api_reference_client/models/get_v1_desktop_id_response_502.py +69 -0
  38. openapi_client/api_reference_client/models/get_v1_desktop_id_response_502_status.py +8 -0
  39. openapi_client/api_reference_client/models/post_v1_desktop_body.py +59 -0
  40. openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_body.py +59 -0
  41. openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_200.py +79 -0
  42. openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_400.py +69 -0
  43. openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_400_status.py +8 -0
  44. openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_401.py +69 -0
  45. openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_401_status.py +8 -0
  46. openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_403.py +69 -0
  47. openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_403_status.py +8 -0
  48. openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_404.py +69 -0
  49. openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_404_status.py +8 -0
  50. openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_409.py +69 -0
  51. openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_409_status.py +8 -0
  52. openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_429.py +69 -0
  53. openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_429_status.py +8 -0
  54. openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_500.py +69 -0
  55. openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_500_status.py +8 -0
  56. openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_502.py +69 -0
  57. openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_502_status.py +8 -0
  58. openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_click_mouse_action.py +133 -0
  59. openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_click_mouse_action_button.py +10 -0
  60. openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_click_mouse_action_click_type.py +10 -0
  61. openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_click_mouse_action_type.py +8 -0
  62. openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_drag_mouse_action.py +98 -0
  63. openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_drag_mouse_action_end.py +71 -0
  64. openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_drag_mouse_action_start.py +71 -0
  65. openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_drag_mouse_action_type.py +8 -0
  66. openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_get_cursor_position_action.py +64 -0
  67. openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_get_cursor_position_action_type.py +8 -0
  68. openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_move_mouse_action.py +80 -0
  69. openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_move_mouse_action_type.py +8 -0
  70. openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_press_keys_action.py +109 -0
  71. openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_press_keys_action_key_action_type.py +10 -0
  72. openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_press_keys_action_type.py +8 -0
  73. openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_200.py +79 -0
  74. openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_400.py +71 -0
  75. openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_400_status.py +8 -0
  76. openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_401.py +71 -0
  77. openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_401_status.py +8 -0
  78. openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_403.py +71 -0
  79. openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_403_status.py +8 -0
  80. openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_404.py +71 -0
  81. openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_404_status.py +8 -0
  82. openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_409.py +71 -0
  83. openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_409_status.py +8 -0
  84. openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_429.py +71 -0
  85. openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_429_status.py +8 -0
  86. openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_500.py +71 -0
  87. openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_500_status.py +8 -0
  88. openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_502.py +71 -0
  89. openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_502_status.py +8 -0
  90. openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_screenshot_action.py +63 -0
  91. openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_screenshot_action_type.py +8 -0
  92. openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_scroll_action.py +81 -0
  93. openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_scroll_action_direction.py +11 -0
  94. openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_scroll_action_type.py +8 -0
  95. openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_type_text_action.py +71 -0
  96. openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_type_text_action_type.py +8 -0
  97. openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_wait_action.py +70 -0
  98. openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_wait_action_type.py +8 -0
  99. openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_200.py +62 -0
  100. openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_200_status.py +11 -0
  101. openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_400.py +69 -0
  102. openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_400_status.py +8 -0
  103. openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_401.py +69 -0
  104. openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_401_status.py +8 -0
  105. openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_403.py +69 -0
  106. openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_403_status.py +8 -0
  107. openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_404.py +69 -0
  108. openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_404_status.py +8 -0
  109. openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_409.py +69 -0
  110. openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_409_status.py +8 -0
  111. openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_429.py +69 -0
  112. openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_429_status.py +8 -0
  113. openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_500.py +69 -0
  114. openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_500_status.py +8 -0
  115. openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_502.py +69 -0
  116. openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_502_status.py +8 -0
  117. openapi_client/api_reference_client/models/post_v1_desktop_response_200.py +70 -0
  118. openapi_client/api_reference_client/models/post_v1_desktop_response_200_status.py +11 -0
  119. openapi_client/api_reference_client/models/post_v1_desktop_response_400.py +69 -0
  120. openapi_client/api_reference_client/models/post_v1_desktop_response_400_status.py +8 -0
  121. openapi_client/api_reference_client/models/post_v1_desktop_response_401.py +69 -0
  122. openapi_client/api_reference_client/models/post_v1_desktop_response_401_status.py +8 -0
  123. openapi_client/api_reference_client/models/post_v1_desktop_response_403.py +69 -0
  124. openapi_client/api_reference_client/models/post_v1_desktop_response_403_status.py +8 -0
  125. openapi_client/api_reference_client/models/post_v1_desktop_response_404.py +69 -0
  126. openapi_client/api_reference_client/models/post_v1_desktop_response_404_status.py +8 -0
  127. openapi_client/api_reference_client/models/post_v1_desktop_response_409.py +69 -0
  128. openapi_client/api_reference_client/models/post_v1_desktop_response_409_status.py +8 -0
  129. openapi_client/api_reference_client/models/post_v1_desktop_response_429.py +69 -0
  130. openapi_client/api_reference_client/models/post_v1_desktop_response_429_status.py +8 -0
  131. openapi_client/api_reference_client/models/post_v1_desktop_response_500.py +69 -0
  132. openapi_client/api_reference_client/models/post_v1_desktop_response_500_status.py +8 -0
  133. openapi_client/api_reference_client/models/post_v1_desktop_response_502.py +69 -0
  134. openapi_client/api_reference_client/models/post_v1_desktop_response_502_status.py +8 -0
  135. openapi_client/api_reference_client/py.typed +1 -0
  136. openapi_client/api_reference_client/types.py +46 -0
  137. cyberdesk-0.2.2.dist-info/RECORD +0 -9
  138. cyberdesk-0.2.2.dist-info/top_level.txt +0 -1
@@ -0,0 +1,307 @@
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_bash_action_body import PostV1DesktopIdBashActionBody
9
+ from ...models.post_v1_desktop_id_bash_action_response_200 import PostV1DesktopIdBashActionResponse200
10
+ from ...models.post_v1_desktop_id_bash_action_response_400 import PostV1DesktopIdBashActionResponse400
11
+ from ...models.post_v1_desktop_id_bash_action_response_401 import PostV1DesktopIdBashActionResponse401
12
+ from ...models.post_v1_desktop_id_bash_action_response_403 import PostV1DesktopIdBashActionResponse403
13
+ from ...models.post_v1_desktop_id_bash_action_response_404 import PostV1DesktopIdBashActionResponse404
14
+ from ...models.post_v1_desktop_id_bash_action_response_409 import PostV1DesktopIdBashActionResponse409
15
+ from ...models.post_v1_desktop_id_bash_action_response_429 import PostV1DesktopIdBashActionResponse429
16
+ from ...models.post_v1_desktop_id_bash_action_response_500 import PostV1DesktopIdBashActionResponse500
17
+ from ...models.post_v1_desktop_id_bash_action_response_502 import PostV1DesktopIdBashActionResponse502
18
+ from ...types import Response
19
+
20
+
21
+ def _get_kwargs(
22
+ id: str,
23
+ *,
24
+ body: PostV1DesktopIdBashActionBody,
25
+ x_api_key: str,
26
+ ) -> dict[str, Any]:
27
+ headers: dict[str, Any] = {}
28
+ headers["x-api-key"] = x_api_key
29
+
30
+ _kwargs: dict[str, Any] = {
31
+ "method": "post",
32
+ "url": f"/v1/desktop/{id}/bash-action",
33
+ }
34
+
35
+ _body = body.to_dict()
36
+
37
+ _kwargs["json"] = _body
38
+ headers["Content-Type"] = "application/json"
39
+
40
+ _kwargs["headers"] = headers
41
+ return _kwargs
42
+
43
+
44
+ def _parse_response(
45
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
46
+ ) -> Optional[
47
+ Union[
48
+ PostV1DesktopIdBashActionResponse200,
49
+ PostV1DesktopIdBashActionResponse400,
50
+ PostV1DesktopIdBashActionResponse401,
51
+ PostV1DesktopIdBashActionResponse403,
52
+ PostV1DesktopIdBashActionResponse404,
53
+ PostV1DesktopIdBashActionResponse409,
54
+ PostV1DesktopIdBashActionResponse429,
55
+ PostV1DesktopIdBashActionResponse500,
56
+ PostV1DesktopIdBashActionResponse502,
57
+ ]
58
+ ]:
59
+ if response.status_code == 200:
60
+ response_200 = PostV1DesktopIdBashActionResponse200.from_dict(response.json())
61
+
62
+ return response_200
63
+ if response.status_code == 400:
64
+ response_400 = PostV1DesktopIdBashActionResponse400.from_dict(response.json())
65
+
66
+ return response_400
67
+ if response.status_code == 401:
68
+ response_401 = PostV1DesktopIdBashActionResponse401.from_dict(response.json())
69
+
70
+ return response_401
71
+ if response.status_code == 403:
72
+ response_403 = PostV1DesktopIdBashActionResponse403.from_dict(response.json())
73
+
74
+ return response_403
75
+ if response.status_code == 404:
76
+ response_404 = PostV1DesktopIdBashActionResponse404.from_dict(response.json())
77
+
78
+ return response_404
79
+ if response.status_code == 409:
80
+ response_409 = PostV1DesktopIdBashActionResponse409.from_dict(response.json())
81
+
82
+ return response_409
83
+ if response.status_code == 429:
84
+ response_429 = PostV1DesktopIdBashActionResponse429.from_dict(response.json())
85
+
86
+ return response_429
87
+ if response.status_code == 500:
88
+ response_500 = PostV1DesktopIdBashActionResponse500.from_dict(response.json())
89
+
90
+ return response_500
91
+ if response.status_code == 502:
92
+ response_502 = PostV1DesktopIdBashActionResponse502.from_dict(response.json())
93
+
94
+ return response_502
95
+ if client.raise_on_unexpected_status:
96
+ raise errors.UnexpectedStatus(response.status_code, response.content)
97
+ else:
98
+ return None
99
+
100
+
101
+ def _build_response(
102
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
103
+ ) -> Response[
104
+ Union[
105
+ PostV1DesktopIdBashActionResponse200,
106
+ PostV1DesktopIdBashActionResponse400,
107
+ PostV1DesktopIdBashActionResponse401,
108
+ PostV1DesktopIdBashActionResponse403,
109
+ PostV1DesktopIdBashActionResponse404,
110
+ PostV1DesktopIdBashActionResponse409,
111
+ PostV1DesktopIdBashActionResponse429,
112
+ PostV1DesktopIdBashActionResponse500,
113
+ PostV1DesktopIdBashActionResponse502,
114
+ ]
115
+ ]:
116
+ return Response(
117
+ status_code=HTTPStatus(response.status_code),
118
+ content=response.content,
119
+ headers=response.headers,
120
+ parsed=_parse_response(client=client, response=response),
121
+ )
122
+
123
+
124
+ def sync_detailed(
125
+ id: str,
126
+ *,
127
+ client: Union[AuthenticatedClient, Client],
128
+ body: PostV1DesktopIdBashActionBody,
129
+ x_api_key: str,
130
+ ) -> Response[
131
+ Union[
132
+ PostV1DesktopIdBashActionResponse200,
133
+ PostV1DesktopIdBashActionResponse400,
134
+ PostV1DesktopIdBashActionResponse401,
135
+ PostV1DesktopIdBashActionResponse403,
136
+ PostV1DesktopIdBashActionResponse404,
137
+ PostV1DesktopIdBashActionResponse409,
138
+ PostV1DesktopIdBashActionResponse429,
139
+ PostV1DesktopIdBashActionResponse500,
140
+ PostV1DesktopIdBashActionResponse502,
141
+ ]
142
+ ]:
143
+ """Execute a bash command on the desktop
144
+
145
+ Runs a bash command on the desktop and returns the command output
146
+
147
+ Args:
148
+ id (str): Desktop instance ID to run the command on Example: desktop_12345.
149
+ x_api_key (str): API key for authentication Example: api_12345.
150
+ body (PostV1DesktopIdBashActionBody):
151
+
152
+ Raises:
153
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
154
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
155
+
156
+ Returns:
157
+ Response[Union[PostV1DesktopIdBashActionResponse200, PostV1DesktopIdBashActionResponse400, PostV1DesktopIdBashActionResponse401, PostV1DesktopIdBashActionResponse403, PostV1DesktopIdBashActionResponse404, PostV1DesktopIdBashActionResponse409, PostV1DesktopIdBashActionResponse429, PostV1DesktopIdBashActionResponse500, PostV1DesktopIdBashActionResponse502]]
158
+ """
159
+
160
+ kwargs = _get_kwargs(
161
+ id=id,
162
+ body=body,
163
+ x_api_key=x_api_key,
164
+ )
165
+
166
+ response = client.get_httpx_client().request(
167
+ **kwargs,
168
+ )
169
+
170
+ return _build_response(client=client, response=response)
171
+
172
+
173
+ def sync(
174
+ id: str,
175
+ *,
176
+ client: Union[AuthenticatedClient, Client],
177
+ body: PostV1DesktopIdBashActionBody,
178
+ x_api_key: str,
179
+ ) -> Optional[
180
+ Union[
181
+ PostV1DesktopIdBashActionResponse200,
182
+ PostV1DesktopIdBashActionResponse400,
183
+ PostV1DesktopIdBashActionResponse401,
184
+ PostV1DesktopIdBashActionResponse403,
185
+ PostV1DesktopIdBashActionResponse404,
186
+ PostV1DesktopIdBashActionResponse409,
187
+ PostV1DesktopIdBashActionResponse429,
188
+ PostV1DesktopIdBashActionResponse500,
189
+ PostV1DesktopIdBashActionResponse502,
190
+ ]
191
+ ]:
192
+ """Execute a bash command on the desktop
193
+
194
+ Runs a bash command on the desktop and returns the command output
195
+
196
+ Args:
197
+ id (str): Desktop instance ID to run the command on Example: desktop_12345.
198
+ x_api_key (str): API key for authentication Example: api_12345.
199
+ body (PostV1DesktopIdBashActionBody):
200
+
201
+ Raises:
202
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
203
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
204
+
205
+ Returns:
206
+ Union[PostV1DesktopIdBashActionResponse200, PostV1DesktopIdBashActionResponse400, PostV1DesktopIdBashActionResponse401, PostV1DesktopIdBashActionResponse403, PostV1DesktopIdBashActionResponse404, PostV1DesktopIdBashActionResponse409, PostV1DesktopIdBashActionResponse429, PostV1DesktopIdBashActionResponse500, PostV1DesktopIdBashActionResponse502]
207
+ """
208
+
209
+ return sync_detailed(
210
+ id=id,
211
+ client=client,
212
+ body=body,
213
+ x_api_key=x_api_key,
214
+ ).parsed
215
+
216
+
217
+ async def asyncio_detailed(
218
+ id: str,
219
+ *,
220
+ client: Union[AuthenticatedClient, Client],
221
+ body: PostV1DesktopIdBashActionBody,
222
+ x_api_key: str,
223
+ ) -> Response[
224
+ Union[
225
+ PostV1DesktopIdBashActionResponse200,
226
+ PostV1DesktopIdBashActionResponse400,
227
+ PostV1DesktopIdBashActionResponse401,
228
+ PostV1DesktopIdBashActionResponse403,
229
+ PostV1DesktopIdBashActionResponse404,
230
+ PostV1DesktopIdBashActionResponse409,
231
+ PostV1DesktopIdBashActionResponse429,
232
+ PostV1DesktopIdBashActionResponse500,
233
+ PostV1DesktopIdBashActionResponse502,
234
+ ]
235
+ ]:
236
+ """Execute a bash command on the desktop
237
+
238
+ Runs a bash command on the desktop and returns the command output
239
+
240
+ Args:
241
+ id (str): Desktop instance ID to run the command on Example: desktop_12345.
242
+ x_api_key (str): API key for authentication Example: api_12345.
243
+ body (PostV1DesktopIdBashActionBody):
244
+
245
+ Raises:
246
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
247
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
248
+
249
+ Returns:
250
+ Response[Union[PostV1DesktopIdBashActionResponse200, PostV1DesktopIdBashActionResponse400, PostV1DesktopIdBashActionResponse401, PostV1DesktopIdBashActionResponse403, PostV1DesktopIdBashActionResponse404, PostV1DesktopIdBashActionResponse409, PostV1DesktopIdBashActionResponse429, PostV1DesktopIdBashActionResponse500, PostV1DesktopIdBashActionResponse502]]
251
+ """
252
+
253
+ kwargs = _get_kwargs(
254
+ id=id,
255
+ body=body,
256
+ x_api_key=x_api_key,
257
+ )
258
+
259
+ response = await client.get_async_httpx_client().request(**kwargs)
260
+
261
+ return _build_response(client=client, response=response)
262
+
263
+
264
+ async def asyncio(
265
+ id: str,
266
+ *,
267
+ client: Union[AuthenticatedClient, Client],
268
+ body: PostV1DesktopIdBashActionBody,
269
+ x_api_key: str,
270
+ ) -> Optional[
271
+ Union[
272
+ PostV1DesktopIdBashActionResponse200,
273
+ PostV1DesktopIdBashActionResponse400,
274
+ PostV1DesktopIdBashActionResponse401,
275
+ PostV1DesktopIdBashActionResponse403,
276
+ PostV1DesktopIdBashActionResponse404,
277
+ PostV1DesktopIdBashActionResponse409,
278
+ PostV1DesktopIdBashActionResponse429,
279
+ PostV1DesktopIdBashActionResponse500,
280
+ PostV1DesktopIdBashActionResponse502,
281
+ ]
282
+ ]:
283
+ """Execute a bash command on the desktop
284
+
285
+ Runs a bash command on the desktop and returns the command output
286
+
287
+ Args:
288
+ id (str): Desktop instance ID to run the command on Example: desktop_12345.
289
+ x_api_key (str): API key for authentication Example: api_12345.
290
+ body (PostV1DesktopIdBashActionBody):
291
+
292
+ Raises:
293
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
294
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
295
+
296
+ Returns:
297
+ Union[PostV1DesktopIdBashActionResponse200, PostV1DesktopIdBashActionResponse400, PostV1DesktopIdBashActionResponse401, PostV1DesktopIdBashActionResponse403, PostV1DesktopIdBashActionResponse404, PostV1DesktopIdBashActionResponse409, PostV1DesktopIdBashActionResponse429, PostV1DesktopIdBashActionResponse500, PostV1DesktopIdBashActionResponse502]
298
+ """
299
+
300
+ return (
301
+ await asyncio_detailed(
302
+ id=id,
303
+ client=client,
304
+ body=body,
305
+ x_api_key=x_api_key,
306
+ )
307
+ ).parsed