cyberdesk 2.1.16__py3-none-any.whl → 2.1.18__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 (92) hide show
  1. cyberdesk/__init__.py +1 -1
  2. cyberdesk/client.py +212 -106
  3. {cyberdesk-2.1.16.dist-info → cyberdesk-2.1.18.dist-info}/METADATA +158 -2
  4. {cyberdesk-2.1.16.dist-info → cyberdesk-2.1.18.dist-info}/RECORD +92 -84
  5. openapi_client/cyberdesk_cloud_client/api/computer/copy_to_clipboard_v1_computer_machine_id_copy_to_clipboard_post.py +221 -0
  6. openapi_client/cyberdesk_cloud_client/api/computer/fs_list_v1_computer_machine_id_fs_list_get.py +2 -0
  7. openapi_client/cyberdesk_cloud_client/api/computer/fs_read_v1_computer_machine_id_fs_read_get.py +2 -0
  8. openapi_client/cyberdesk_cloud_client/api/computer/fs_write_v1_computer_machine_id_fs_write_post.py +2 -0
  9. openapi_client/cyberdesk_cloud_client/api/computer/get_display_dimensions_v1_computer_machine_id_display_dimensions_get.py +2 -0
  10. openapi_client/cyberdesk_cloud_client/api/computer/get_mouse_position_v1_computer_machine_id_input_mouse_position_get.py +2 -0
  11. openapi_client/cyberdesk_cloud_client/api/computer/get_screenshot_v1_computer_machine_id_display_screenshot_get.py +1 -0
  12. openapi_client/cyberdesk_cloud_client/api/computer/keyboard_key_v1_computer_machine_id_input_keyboard_key_post.py +2 -0
  13. openapi_client/cyberdesk_cloud_client/api/computer/keyboard_type_v1_computer_machine_id_input_keyboard_type_post.py +2 -0
  14. openapi_client/cyberdesk_cloud_client/api/computer/mouse_click_v1_computer_machine_id_input_mouse_click_post.py +2 -0
  15. openapi_client/cyberdesk_cloud_client/api/computer/mouse_drag_v1_computer_machine_id_input_mouse_drag_post.py +2 -0
  16. openapi_client/cyberdesk_cloud_client/api/computer/mouse_move_v1_computer_machine_id_input_mouse_move_post.py +2 -0
  17. openapi_client/cyberdesk_cloud_client/api/computer/mouse_scroll_v1_computer_machine_id_input_mouse_scroll_post.py +2 -0
  18. openapi_client/cyberdesk_cloud_client/api/computer/powershell_exec_v1_computer_machine_id_shell_powershell_exec_post.py +2 -0
  19. openapi_client/cyberdesk_cloud_client/api/computer/powershell_session_v1_computer_machine_id_shell_powershell_session_post.py +2 -0
  20. openapi_client/cyberdesk_cloud_client/api/connections/create_connection_v1_connections_post.py +2 -0
  21. openapi_client/cyberdesk_cloud_client/api/connections/delete_connection_v1_connections_connection_id_delete.py +2 -0
  22. openapi_client/cyberdesk_cloud_client/api/connections/get_connection_v1_connections_connection_id_get.py +2 -0
  23. openapi_client/cyberdesk_cloud_client/api/connections/list_connections_v1_connections_get.py +2 -0
  24. openapi_client/cyberdesk_cloud_client/api/connections/update_connection_v1_connections_connection_id_patch.py +2 -0
  25. openapi_client/cyberdesk_cloud_client/api/default/health_db_health_db_get.py +1 -0
  26. openapi_client/cyberdesk_cloud_client/api/default/health_health_get.py +1 -0
  27. openapi_client/cyberdesk_cloud_client/api/default/root_get.py +1 -0
  28. openapi_client/cyberdesk_cloud_client/api/health/database_health_check_v1_health_db_get.py +9 -67
  29. openapi_client/cyberdesk_cloud_client/api/health/health_check_v1_health_get.py +1 -0
  30. openapi_client/cyberdesk_cloud_client/api/machines/create_machine_v1_machines_post.py +2 -0
  31. openapi_client/cyberdesk_cloud_client/api/machines/delete_machine_v1_machines_machine_id_delete.py +18 -4
  32. openapi_client/cyberdesk_cloud_client/api/machines/get_machine_pools_v1_machines_machine_id_pools_get.py +2 -0
  33. openapi_client/cyberdesk_cloud_client/api/machines/get_machine_v1_machines_machine_id_get.py +2 -0
  34. openapi_client/cyberdesk_cloud_client/api/machines/list_machines_v1_machines_get.py +2 -0
  35. openapi_client/cyberdesk_cloud_client/api/machines/update_machine_pools_v1_machines_machine_id_pools_put.py +2 -0
  36. openapi_client/cyberdesk_cloud_client/api/machines/update_machine_v1_machines_machine_id_patch.py +14 -0
  37. openapi_client/cyberdesk_cloud_client/api/pools/add_machines_to_pool_v1_pools_pool_id_machines_post.py +2 -0
  38. openapi_client/cyberdesk_cloud_client/api/pools/create_pool_v1_pools_post.py +2 -0
  39. openapi_client/cyberdesk_cloud_client/api/pools/delete_pool_v1_pools_pool_id_delete.py +2 -0
  40. openapi_client/cyberdesk_cloud_client/api/pools/get_pool_v1_pools_pool_id_get.py +2 -0
  41. openapi_client/cyberdesk_cloud_client/api/pools/list_pools_v1_pools_get.py +2 -0
  42. openapi_client/cyberdesk_cloud_client/api/pools/remove_machines_from_pool_v1_pools_pool_id_machines_delete.py +2 -0
  43. openapi_client/cyberdesk_cloud_client/api/pools/update_pool_v1_pools_pool_id_patch.py +2 -0
  44. openapi_client/cyberdesk_cloud_client/api/request_logs/create_request_log_v1_request_logs_post.py +2 -0
  45. openapi_client/cyberdesk_cloud_client/api/request_logs/delete_request_log_v1_request_logs_log_id_delete.py +2 -0
  46. openapi_client/cyberdesk_cloud_client/api/request_logs/get_request_log_v1_request_logs_log_id_get.py +2 -0
  47. openapi_client/cyberdesk_cloud_client/api/request_logs/list_request_logs_v1_request_logs_get.py +2 -0
  48. openapi_client/cyberdesk_cloud_client/api/request_logs/update_request_log_v1_request_logs_log_id_patch.py +2 -0
  49. openapi_client/cyberdesk_cloud_client/api/run_attachments/create_run_attachment_v1_run_attachments_post.py +2 -0
  50. openapi_client/cyberdesk_cloud_client/api/run_attachments/delete_run_attachment_v1_run_attachments_attachment_id_delete.py +2 -0
  51. openapi_client/cyberdesk_cloud_client/api/run_attachments/download_run_attachment_v1_run_attachments_attachment_id_download_get.py +2 -0
  52. openapi_client/cyberdesk_cloud_client/api/run_attachments/get_run_attachment_download_url_v1_run_attachments_attachment_id_download_url_get.py +2 -0
  53. openapi_client/cyberdesk_cloud_client/api/run_attachments/get_run_attachment_v1_run_attachments_attachment_id_get.py +2 -0
  54. openapi_client/cyberdesk_cloud_client/api/run_attachments/list_run_attachments_v1_run_attachments_get.py +2 -0
  55. openapi_client/cyberdesk_cloud_client/api/run_attachments/update_run_attachment_v1_run_attachments_attachment_id_put.py +2 -0
  56. openapi_client/cyberdesk_cloud_client/api/runs/bulk_create_runs_v1_runs_bulk_post.py +2 -0
  57. openapi_client/cyberdesk_cloud_client/api/runs/create_run_chain_v1_runs_chain_post.py +2 -0
  58. openapi_client/cyberdesk_cloud_client/api/runs/create_run_v1_runs_post.py +2 -0
  59. openapi_client/cyberdesk_cloud_client/api/runs/delete_run_v1_runs_run_id_delete.py +2 -0
  60. openapi_client/cyberdesk_cloud_client/api/runs/get_run_v1_runs_run_id_get.py +2 -0
  61. openapi_client/cyberdesk_cloud_client/api/runs/list_runs_v1_runs_get.py +2 -0
  62. openapi_client/cyberdesk_cloud_client/api/runs/retry_run_v1_runs_run_id_retry_post.py +2 -0
  63. openapi_client/cyberdesk_cloud_client/api/runs/update_run_v1_runs_run_id_patch.py +2 -0
  64. openapi_client/cyberdesk_cloud_client/api/test/dummy_test_endpoint_v1_test_post.py +1 -0
  65. openapi_client/cyberdesk_cloud_client/api/trajectories/create_trajectory_v1_trajectories_post.py +2 -0
  66. openapi_client/cyberdesk_cloud_client/api/trajectories/delete_trajectory_v1_trajectories_trajectory_id_delete.py +2 -0
  67. openapi_client/cyberdesk_cloud_client/api/trajectories/get_latest_trajectory_for_workflow_v1_workflows_workflow_id_latest_trajectory_get.py +2 -0
  68. openapi_client/cyberdesk_cloud_client/api/trajectories/get_trajectory_v1_trajectories_trajectory_id_get.py +2 -0
  69. openapi_client/cyberdesk_cloud_client/api/trajectories/list_trajectories_v1_trajectories_get.py +2 -0
  70. openapi_client/cyberdesk_cloud_client/api/trajectories/update_trajectory_v1_trajectories_trajectory_id_patch.py +2 -0
  71. openapi_client/cyberdesk_cloud_client/api/workflows/create_workflow_v1_workflows_post.py +2 -0
  72. openapi_client/cyberdesk_cloud_client/api/workflows/delete_workflow_v1_workflows_workflow_id_delete.py +2 -0
  73. openapi_client/cyberdesk_cloud_client/api/workflows/get_workflow_v1_workflows_workflow_id_get.py +2 -0
  74. openapi_client/cyberdesk_cloud_client/api/workflows/get_workflow_versions_v1_workflows_workflow_id_versions_get.py +2 -0
  75. openapi_client/cyberdesk_cloud_client/api/workflows/list_workflows_v1_workflows_get.py +2 -0
  76. openapi_client/cyberdesk_cloud_client/api/workflows/update_workflow_v1_workflows_workflow_id_patch.py +2 -0
  77. openapi_client/cyberdesk_cloud_client/models/__init__.py +17 -3
  78. openapi_client/cyberdesk_cloud_client/models/copy_to_clipboard_request.py +59 -0
  79. openapi_client/cyberdesk_cloud_client/models/copy_to_clipboard_v1_computer_machine_id_copy_to_clipboard_post_response_copy_to_clipboard_v1_computer_machine_id_copy_to_clipboard_post.py +47 -0
  80. openapi_client/cyberdesk_cloud_client/models/machine_create.py +80 -1
  81. openapi_client/cyberdesk_cloud_client/models/machine_create_machine_parameters_type_0.py +44 -0
  82. openapi_client/cyberdesk_cloud_client/models/{database_health_check_v1_health_db_get_response_database_health_check_v1_health_db_get.py → machine_create_machine_sensitive_parameters_type_0.py} +5 -5
  83. openapi_client/cyberdesk_cloud_client/models/machine_response.py +77 -0
  84. openapi_client/cyberdesk_cloud_client/models/machine_response_machine_parameters_type_0.py +44 -0
  85. openapi_client/cyberdesk_cloud_client/models/machine_response_machine_sensitive_parameters_type_0.py +44 -0
  86. openapi_client/cyberdesk_cloud_client/models/machine_update.py +80 -1
  87. openapi_client/cyberdesk_cloud_client/models/machine_update_machine_parameters_type_0.py +44 -0
  88. openapi_client/cyberdesk_cloud_client/models/machine_update_machine_sensitive_parameters_type_0.py +44 -0
  89. openapi_client/cyberdesk_cloud_client/models/power_shell_exec_request.py +21 -0
  90. {cyberdesk-2.1.16.dist-info → cyberdesk-2.1.18.dist-info}/WHEEL +0 -0
  91. {cyberdesk-2.1.16.dist-info → cyberdesk-2.1.18.dist-info}/licenses/LICENSE +0 -0
  92. {cyberdesk-2.1.16.dist-info → cyberdesk-2.1.18.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,221 @@
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.copy_to_clipboard_request import CopyToClipboardRequest
9
+ from ...models.copy_to_clipboard_v1_computer_machine_id_copy_to_clipboard_post_response_copy_to_clipboard_v1_computer_machine_id_copy_to_clipboard_post import (
10
+ CopyToClipboardV1ComputerMachineIdCopyToClipboardPostResponseCopyToClipboardV1ComputerMachineIdCopyToClipboardPost,
11
+ )
12
+ from ...models.http_validation_error import HTTPValidationError
13
+ from ...types import Response
14
+
15
+
16
+ def _get_kwargs(
17
+ machine_id: str,
18
+ *,
19
+ body: CopyToClipboardRequest,
20
+ ) -> dict[str, Any]:
21
+ headers: dict[str, Any] = {}
22
+
23
+ _kwargs: dict[str, Any] = {
24
+ "method": "post",
25
+ "url": f"/v1/computer/{machine_id}/copy_to_clipboard",
26
+ }
27
+
28
+ _kwargs["json"] = body.to_dict()
29
+
30
+ headers["Content-Type"] = "application/json"
31
+
32
+ _kwargs["headers"] = headers
33
+ return _kwargs
34
+
35
+
36
+ def _parse_response(
37
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
38
+ ) -> Optional[
39
+ Union[
40
+ CopyToClipboardV1ComputerMachineIdCopyToClipboardPostResponseCopyToClipboardV1ComputerMachineIdCopyToClipboardPost,
41
+ HTTPValidationError,
42
+ ]
43
+ ]:
44
+ if response.status_code == 200:
45
+ response_200 = CopyToClipboardV1ComputerMachineIdCopyToClipboardPostResponseCopyToClipboardV1ComputerMachineIdCopyToClipboardPost.from_dict(
46
+ response.json()
47
+ )
48
+
49
+ return response_200
50
+
51
+ if response.status_code == 422:
52
+ response_422 = HTTPValidationError.from_dict(response.json())
53
+
54
+ return response_422
55
+
56
+ if client.raise_on_unexpected_status:
57
+ raise errors.UnexpectedStatus(response.status_code, response.content)
58
+ else:
59
+ return None
60
+
61
+
62
+ def _build_response(
63
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
64
+ ) -> Response[
65
+ Union[
66
+ CopyToClipboardV1ComputerMachineIdCopyToClipboardPostResponseCopyToClipboardV1ComputerMachineIdCopyToClipboardPost,
67
+ HTTPValidationError,
68
+ ]
69
+ ]:
70
+ return Response(
71
+ status_code=HTTPStatus(response.status_code),
72
+ content=response.content,
73
+ headers=response.headers,
74
+ parsed=_parse_response(client=client, response=response),
75
+ )
76
+
77
+
78
+ def sync_detailed(
79
+ machine_id: str,
80
+ *,
81
+ client: AuthenticatedClient,
82
+ body: CopyToClipboardRequest,
83
+ ) -> Response[
84
+ Union[
85
+ CopyToClipboardV1ComputerMachineIdCopyToClipboardPostResponseCopyToClipboardV1ComputerMachineIdCopyToClipboardPost,
86
+ HTTPValidationError,
87
+ ]
88
+ ]:
89
+ """Copy to clipboard via Ctrl+C
90
+
91
+ Execute Ctrl+C and return clipboard contents with the specified key name.
92
+
93
+ Args:
94
+ machine_id (str):
95
+ body (CopyToClipboardRequest):
96
+
97
+ Raises:
98
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
99
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
100
+
101
+ Returns:
102
+ Response[Union[CopyToClipboardV1ComputerMachineIdCopyToClipboardPostResponseCopyToClipboardV1ComputerMachineIdCopyToClipboardPost, HTTPValidationError]]
103
+ """
104
+
105
+ kwargs = _get_kwargs(
106
+ machine_id=machine_id,
107
+ body=body,
108
+ )
109
+
110
+ response = client.get_httpx_client().request(
111
+ **kwargs,
112
+ )
113
+
114
+ return _build_response(client=client, response=response)
115
+
116
+
117
+ def sync(
118
+ machine_id: str,
119
+ *,
120
+ client: AuthenticatedClient,
121
+ body: CopyToClipboardRequest,
122
+ ) -> Optional[
123
+ Union[
124
+ CopyToClipboardV1ComputerMachineIdCopyToClipboardPostResponseCopyToClipboardV1ComputerMachineIdCopyToClipboardPost,
125
+ HTTPValidationError,
126
+ ]
127
+ ]:
128
+ """Copy to clipboard via Ctrl+C
129
+
130
+ Execute Ctrl+C and return clipboard contents with the specified key name.
131
+
132
+ Args:
133
+ machine_id (str):
134
+ body (CopyToClipboardRequest):
135
+
136
+ Raises:
137
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
138
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
139
+
140
+ Returns:
141
+ Union[CopyToClipboardV1ComputerMachineIdCopyToClipboardPostResponseCopyToClipboardV1ComputerMachineIdCopyToClipboardPost, HTTPValidationError]
142
+ """
143
+
144
+ return sync_detailed(
145
+ machine_id=machine_id,
146
+ client=client,
147
+ body=body,
148
+ ).parsed
149
+
150
+
151
+ async def asyncio_detailed(
152
+ machine_id: str,
153
+ *,
154
+ client: AuthenticatedClient,
155
+ body: CopyToClipboardRequest,
156
+ ) -> Response[
157
+ Union[
158
+ CopyToClipboardV1ComputerMachineIdCopyToClipboardPostResponseCopyToClipboardV1ComputerMachineIdCopyToClipboardPost,
159
+ HTTPValidationError,
160
+ ]
161
+ ]:
162
+ """Copy to clipboard via Ctrl+C
163
+
164
+ Execute Ctrl+C and return clipboard contents with the specified key name.
165
+
166
+ Args:
167
+ machine_id (str):
168
+ body (CopyToClipboardRequest):
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
+ Response[Union[CopyToClipboardV1ComputerMachineIdCopyToClipboardPostResponseCopyToClipboardV1ComputerMachineIdCopyToClipboardPost, HTTPValidationError]]
176
+ """
177
+
178
+ kwargs = _get_kwargs(
179
+ machine_id=machine_id,
180
+ body=body,
181
+ )
182
+
183
+ response = await client.get_async_httpx_client().request(**kwargs)
184
+
185
+ return _build_response(client=client, response=response)
186
+
187
+
188
+ async def asyncio(
189
+ machine_id: str,
190
+ *,
191
+ client: AuthenticatedClient,
192
+ body: CopyToClipboardRequest,
193
+ ) -> Optional[
194
+ Union[
195
+ CopyToClipboardV1ComputerMachineIdCopyToClipboardPostResponseCopyToClipboardV1ComputerMachineIdCopyToClipboardPost,
196
+ HTTPValidationError,
197
+ ]
198
+ ]:
199
+ """Copy to clipboard via Ctrl+C
200
+
201
+ Execute Ctrl+C and return clipboard contents with the specified key name.
202
+
203
+ Args:
204
+ machine_id (str):
205
+ body (CopyToClipboardRequest):
206
+
207
+ Raises:
208
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
209
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
210
+
211
+ Returns:
212
+ Union[CopyToClipboardV1ComputerMachineIdCopyToClipboardPostResponseCopyToClipboardV1ComputerMachineIdCopyToClipboardPost, HTTPValidationError]
213
+ """
214
+
215
+ return (
216
+ await asyncio_detailed(
217
+ machine_id=machine_id,
218
+ client=client,
219
+ body=body,
220
+ )
221
+ ).parsed
@@ -41,10 +41,12 @@ def _parse_response(
41
41
  )
42
42
 
43
43
  return response_200
44
+
44
45
  if response.status_code == 422:
45
46
  response_422 = HTTPValidationError.from_dict(response.json())
46
47
 
47
48
  return response_422
49
+
48
50
  if client.raise_on_unexpected_status:
49
51
  raise errors.UnexpectedStatus(response.status_code, response.content)
50
52
  else:
@@ -41,10 +41,12 @@ def _parse_response(
41
41
  )
42
42
 
43
43
  return response_200
44
+
44
45
  if response.status_code == 422:
45
46
  response_422 = HTTPValidationError.from_dict(response.json())
46
47
 
47
48
  return response_422
49
+
48
50
  if client.raise_on_unexpected_status:
49
51
  raise errors.UnexpectedStatus(response.status_code, response.content)
50
52
  else:
@@ -44,10 +44,12 @@ def _parse_response(
44
44
  )
45
45
 
46
46
  return response_200
47
+
47
48
  if response.status_code == 422:
48
49
  response_422 = HTTPValidationError.from_dict(response.json())
49
50
 
50
51
  return response_422
52
+
51
53
  if client.raise_on_unexpected_status:
52
54
  raise errors.UnexpectedStatus(response.status_code, response.content)
53
55
  else:
@@ -28,10 +28,12 @@ def _parse_response(
28
28
  response_200 = DisplayDimensions.from_dict(response.json())
29
29
 
30
30
  return response_200
31
+
31
32
  if response.status_code == 422:
32
33
  response_422 = HTTPValidationError.from_dict(response.json())
33
34
 
34
35
  return response_422
36
+
35
37
  if client.raise_on_unexpected_status:
36
38
  raise errors.UnexpectedStatus(response.status_code, response.content)
37
39
  else:
@@ -28,10 +28,12 @@ def _parse_response(
28
28
  response_200 = MousePosition.from_dict(response.json())
29
29
 
30
30
  return response_200
31
+
31
32
  if response.status_code == 422:
32
33
  response_422 = HTTPValidationError.from_dict(response.json())
33
34
 
34
35
  return response_422
36
+
35
37
  if client.raise_on_unexpected_status:
36
38
  raise errors.UnexpectedStatus(response.status_code, response.content)
37
39
  else:
@@ -27,6 +27,7 @@ def _parse_response(
27
27
  response_422 = HTTPValidationError.from_dict(response.json())
28
28
 
29
29
  return response_422
30
+
30
31
  if client.raise_on_unexpected_status:
31
32
  raise errors.UnexpectedStatus(response.status_code, response.content)
32
33
  else:
@@ -36,10 +36,12 @@ def _parse_response(
36
36
  if response.status_code == 204:
37
37
  response_204 = cast(Any, None)
38
38
  return response_204
39
+
39
40
  if response.status_code == 422:
40
41
  response_422 = HTTPValidationError.from_dict(response.json())
41
42
 
42
43
  return response_422
44
+
43
45
  if client.raise_on_unexpected_status:
44
46
  raise errors.UnexpectedStatus(response.status_code, response.content)
45
47
  else:
@@ -36,10 +36,12 @@ def _parse_response(
36
36
  if response.status_code == 204:
37
37
  response_204 = cast(Any, None)
38
38
  return response_204
39
+
39
40
  if response.status_code == 422:
40
41
  response_422 = HTTPValidationError.from_dict(response.json())
41
42
 
42
43
  return response_422
44
+
43
45
  if client.raise_on_unexpected_status:
44
46
  raise errors.UnexpectedStatus(response.status_code, response.content)
45
47
  else:
@@ -36,10 +36,12 @@ def _parse_response(
36
36
  if response.status_code == 204:
37
37
  response_204 = cast(Any, None)
38
38
  return response_204
39
+
39
40
  if response.status_code == 422:
40
41
  response_422 = HTTPValidationError.from_dict(response.json())
41
42
 
42
43
  return response_422
44
+
43
45
  if client.raise_on_unexpected_status:
44
46
  raise errors.UnexpectedStatus(response.status_code, response.content)
45
47
  else:
@@ -36,10 +36,12 @@ def _parse_response(
36
36
  if response.status_code == 204:
37
37
  response_204 = cast(Any, None)
38
38
  return response_204
39
+
39
40
  if response.status_code == 422:
40
41
  response_422 = HTTPValidationError.from_dict(response.json())
41
42
 
42
43
  return response_422
44
+
43
45
  if client.raise_on_unexpected_status:
44
46
  raise errors.UnexpectedStatus(response.status_code, response.content)
45
47
  else:
@@ -36,10 +36,12 @@ def _parse_response(
36
36
  if response.status_code == 204:
37
37
  response_204 = cast(Any, None)
38
38
  return response_204
39
+
39
40
  if response.status_code == 422:
40
41
  response_422 = HTTPValidationError.from_dict(response.json())
41
42
 
42
43
  return response_422
44
+
43
45
  if client.raise_on_unexpected_status:
44
46
  raise errors.UnexpectedStatus(response.status_code, response.content)
45
47
  else:
@@ -36,10 +36,12 @@ def _parse_response(
36
36
  if response.status_code == 204:
37
37
  response_204 = cast(Any, None)
38
38
  return response_204
39
+
39
40
  if response.status_code == 422:
40
41
  response_422 = HTTPValidationError.from_dict(response.json())
41
42
 
42
43
  return response_422
44
+
43
45
  if client.raise_on_unexpected_status:
44
46
  raise errors.UnexpectedStatus(response.status_code, response.content)
45
47
  else:
@@ -47,10 +47,12 @@ def _parse_response(
47
47
  )
48
48
 
49
49
  return response_200
50
+
50
51
  if response.status_code == 422:
51
52
  response_422 = HTTPValidationError.from_dict(response.json())
52
53
 
53
54
  return response_422
55
+
54
56
  if client.raise_on_unexpected_status:
55
57
  raise errors.UnexpectedStatus(response.status_code, response.content)
56
58
  else:
@@ -47,10 +47,12 @@ def _parse_response(
47
47
  )
48
48
 
49
49
  return response_200
50
+
50
51
  if response.status_code == 422:
51
52
  response_422 = HTTPValidationError.from_dict(response.json())
52
53
 
53
54
  return response_422
55
+
54
56
  if client.raise_on_unexpected_status:
55
57
  raise errors.UnexpectedStatus(response.status_code, response.content)
56
58
  else:
@@ -37,10 +37,12 @@ def _parse_response(
37
37
  response_201 = ConnectionResponse.from_dict(response.json())
38
38
 
39
39
  return response_201
40
+
40
41
  if response.status_code == 422:
41
42
  response_422 = HTTPValidationError.from_dict(response.json())
42
43
 
43
44
  return response_422
45
+
44
46
  if client.raise_on_unexpected_status:
45
47
  raise errors.UnexpectedStatus(response.status_code, response.content)
46
48
  else:
@@ -27,10 +27,12 @@ def _parse_response(
27
27
  if response.status_code == 204:
28
28
  response_204 = cast(Any, None)
29
29
  return response_204
30
+
30
31
  if response.status_code == 422:
31
32
  response_422 = HTTPValidationError.from_dict(response.json())
32
33
 
33
34
  return response_422
35
+
34
36
  if client.raise_on_unexpected_status:
35
37
  raise errors.UnexpectedStatus(response.status_code, response.content)
36
38
  else:
@@ -29,10 +29,12 @@ def _parse_response(
29
29
  response_200 = ConnectionResponse.from_dict(response.json())
30
30
 
31
31
  return response_200
32
+
32
33
  if response.status_code == 422:
33
34
  response_422 = HTTPValidationError.from_dict(response.json())
34
35
 
35
36
  return response_422
37
+
36
38
  if client.raise_on_unexpected_status:
37
39
  raise errors.UnexpectedStatus(response.status_code, response.content)
38
40
  else:
@@ -61,10 +61,12 @@ def _parse_response(
61
61
  response_200 = PaginatedResponseConnectionResponse.from_dict(response.json())
62
62
 
63
63
  return response_200
64
+
64
65
  if response.status_code == 422:
65
66
  response_422 = HTTPValidationError.from_dict(response.json())
66
67
 
67
68
  return response_422
69
+
68
70
  if client.raise_on_unexpected_status:
69
71
  raise errors.UnexpectedStatus(response.status_code, response.content)
70
72
  else:
@@ -39,10 +39,12 @@ def _parse_response(
39
39
  response_200 = ConnectionResponse.from_dict(response.json())
40
40
 
41
41
  return response_200
42
+
42
43
  if response.status_code == 422:
43
44
  response_422 = HTTPValidationError.from_dict(response.json())
44
45
 
45
46
  return response_422
47
+
46
48
  if client.raise_on_unexpected_status:
47
49
  raise errors.UnexpectedStatus(response.status_code, response.content)
48
50
  else:
@@ -20,6 +20,7 @@ def _get_kwargs() -> dict[str, Any]:
20
20
  def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
21
21
  if response.status_code == 200:
22
22
  return None
23
+
23
24
  if client.raise_on_unexpected_status:
24
25
  raise errors.UnexpectedStatus(response.status_code, response.content)
25
26
  else:
@@ -25,6 +25,7 @@ def _parse_response(
25
25
  response_200 = HealthHealthGetResponseHealthHealthGet.from_dict(response.json())
26
26
 
27
27
  return response_200
28
+
28
29
  if client.raise_on_unexpected_status:
29
30
  raise errors.UnexpectedStatus(response.status_code, response.content)
30
31
  else:
@@ -20,6 +20,7 @@ def _get_kwargs() -> dict[str, Any]:
20
20
  def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
21
21
  if response.status_code == 200:
22
22
  return None
23
+
23
24
  if client.raise_on_unexpected_status:
24
25
  raise errors.UnexpectedStatus(response.status_code, response.content)
25
26
  else:
@@ -5,9 +5,6 @@ import httpx
5
5
 
6
6
  from ... import errors
7
7
  from ...client import AuthenticatedClient, Client
8
- from ...models.database_health_check_v1_health_db_get_response_database_health_check_v1_health_db_get import (
9
- DatabaseHealthCheckV1HealthDbGetResponseDatabaseHealthCheckV1HealthDbGet,
10
- )
11
8
  from ...types import Response
12
9
 
13
10
 
@@ -20,24 +17,17 @@ def _get_kwargs() -> dict[str, Any]:
20
17
  return _kwargs
21
18
 
22
19
 
23
- def _parse_response(
24
- *, client: Union[AuthenticatedClient, Client], response: httpx.Response
25
- ) -> Optional[DatabaseHealthCheckV1HealthDbGetResponseDatabaseHealthCheckV1HealthDbGet]:
20
+ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
26
21
  if response.status_code == 200:
27
- response_200 = DatabaseHealthCheckV1HealthDbGetResponseDatabaseHealthCheckV1HealthDbGet.from_dict(
28
- response.json()
29
- )
22
+ return None
30
23
 
31
- return response_200
32
24
  if client.raise_on_unexpected_status:
33
25
  raise errors.UnexpectedStatus(response.status_code, response.content)
34
26
  else:
35
27
  return None
36
28
 
37
29
 
38
- def _build_response(
39
- *, client: Union[AuthenticatedClient, Client], response: httpx.Response
40
- ) -> Response[DatabaseHealthCheckV1HealthDbGetResponseDatabaseHealthCheckV1HealthDbGet]:
30
+ def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
41
31
  return Response(
42
32
  status_code=HTTPStatus(response.status_code),
43
33
  content=response.content,
@@ -49,19 +39,19 @@ def _build_response(
49
39
  def sync_detailed(
50
40
  *,
51
41
  client: Union[AuthenticatedClient, Client],
52
- ) -> Response[DatabaseHealthCheckV1HealthDbGetResponseDatabaseHealthCheckV1HealthDbGet]:
42
+ ) -> Response[Any]:
53
43
  """Database Health Check
54
44
 
55
45
  Database health check endpoint.
56
46
 
57
- Verifies database connectivity without authentication.
47
+ Verifies database connectivity and pool status without authentication.
58
48
 
59
49
  Raises:
60
50
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
61
51
  httpx.TimeoutException: If the request takes longer than Client.timeout.
62
52
 
63
53
  Returns:
64
- Response[DatabaseHealthCheckV1HealthDbGetResponseDatabaseHealthCheckV1HealthDbGet]
54
+ Response[Any]
65
55
  """
66
56
 
67
57
  kwargs = _get_kwargs()
@@ -73,45 +63,22 @@ def sync_detailed(
73
63
  return _build_response(client=client, response=response)
74
64
 
75
65
 
76
- def sync(
77
- *,
78
- client: Union[AuthenticatedClient, Client],
79
- ) -> Optional[DatabaseHealthCheckV1HealthDbGetResponseDatabaseHealthCheckV1HealthDbGet]:
80
- """Database Health Check
81
-
82
- Database health check endpoint.
83
-
84
- Verifies database connectivity without authentication.
85
-
86
- Raises:
87
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
88
- httpx.TimeoutException: If the request takes longer than Client.timeout.
89
-
90
- Returns:
91
- DatabaseHealthCheckV1HealthDbGetResponseDatabaseHealthCheckV1HealthDbGet
92
- """
93
-
94
- return sync_detailed(
95
- client=client,
96
- ).parsed
97
-
98
-
99
66
  async def asyncio_detailed(
100
67
  *,
101
68
  client: Union[AuthenticatedClient, Client],
102
- ) -> Response[DatabaseHealthCheckV1HealthDbGetResponseDatabaseHealthCheckV1HealthDbGet]:
69
+ ) -> Response[Any]:
103
70
  """Database Health Check
104
71
 
105
72
  Database health check endpoint.
106
73
 
107
- Verifies database connectivity without authentication.
74
+ Verifies database connectivity and pool status without authentication.
108
75
 
109
76
  Raises:
110
77
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
111
78
  httpx.TimeoutException: If the request takes longer than Client.timeout.
112
79
 
113
80
  Returns:
114
- Response[DatabaseHealthCheckV1HealthDbGetResponseDatabaseHealthCheckV1HealthDbGet]
81
+ Response[Any]
115
82
  """
116
83
 
117
84
  kwargs = _get_kwargs()
@@ -119,28 +86,3 @@ async def asyncio_detailed(
119
86
  response = await client.get_async_httpx_client().request(**kwargs)
120
87
 
121
88
  return _build_response(client=client, response=response)
122
-
123
-
124
- async def asyncio(
125
- *,
126
- client: Union[AuthenticatedClient, Client],
127
- ) -> Optional[DatabaseHealthCheckV1HealthDbGetResponseDatabaseHealthCheckV1HealthDbGet]:
128
- """Database Health Check
129
-
130
- Database health check endpoint.
131
-
132
- Verifies database connectivity without authentication.
133
-
134
- Raises:
135
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
136
- httpx.TimeoutException: If the request takes longer than Client.timeout.
137
-
138
- Returns:
139
- DatabaseHealthCheckV1HealthDbGetResponseDatabaseHealthCheckV1HealthDbGet
140
- """
141
-
142
- return (
143
- await asyncio_detailed(
144
- client=client,
145
- )
146
- ).parsed
@@ -27,6 +27,7 @@ def _parse_response(
27
27
  response_200 = HealthCheckV1HealthGetResponseHealthCheckV1HealthGet.from_dict(response.json())
28
28
 
29
29
  return response_200
30
+
30
31
  if client.raise_on_unexpected_status:
31
32
  raise errors.UnexpectedStatus(response.status_code, response.content)
32
33
  else:
@@ -37,10 +37,12 @@ def _parse_response(
37
37
  response_201 = MachineResponse.from_dict(response.json())
38
38
 
39
39
  return response_201
40
+
40
41
  if response.status_code == 422:
41
42
  response_422 = HTTPValidationError.from_dict(response.json())
42
43
 
43
44
  return response_422
45
+
44
46
  if client.raise_on_unexpected_status:
45
47
  raise errors.UnexpectedStatus(response.status_code, response.content)
46
48
  else: