cyberdesk 2.1.12__py3-none-any.whl → 2.1.14__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 +1 -1
- cyberdesk/client.py +11 -2
- {cyberdesk-2.1.12.dist-info → cyberdesk-2.1.14.dist-info}/METADATA +1 -1
- {cyberdesk-2.1.12.dist-info → cyberdesk-2.1.14.dist-info}/RECORD +13 -10
- openapi_client/cyberdesk_cloud_client/api/computer/mouse_drag_v1_computer_machine_id_input_mouse_drag_post.py +183 -0
- openapi_client/cyberdesk_cloud_client/models/__init__.py +4 -0
- openapi_client/cyberdesk_cloud_client/models/chain_step.py +34 -0
- openapi_client/cyberdesk_cloud_client/models/chain_step_sensitive_inputs_type_0.py +44 -0
- openapi_client/cyberdesk_cloud_client/models/mouse_drag_request.py +125 -0
- openapi_client/cyberdesk_cloud_client/models/run_response.py +127 -95
- {cyberdesk-2.1.12.dist-info → cyberdesk-2.1.14.dist-info}/WHEEL +0 -0
- {cyberdesk-2.1.12.dist-info → cyberdesk-2.1.14.dist-info}/licenses/LICENSE +0 -0
- {cyberdesk-2.1.12.dist-info → cyberdesk-2.1.14.dist-info}/top_level.txt +0 -0
cyberdesk/__init__.py
CHANGED
cyberdesk/client.py
CHANGED
|
@@ -1144,7 +1144,7 @@ class RunsAPI:
|
|
|
1144
1144
|
"""Create a multi-step chain that runs on a single reserved session/machine.
|
|
1145
1145
|
|
|
1146
1146
|
Args:
|
|
1147
|
-
data: WorkflowChainCreate with steps (session_alias, inputs),
|
|
1147
|
+
data: WorkflowChainCreate with steps (session_alias, inputs, sensitive_inputs),
|
|
1148
1148
|
optional shared_inputs/sensitive/file_inputs, and optional
|
|
1149
1149
|
session_id or machine_id/pool_ids for session start.
|
|
1150
1150
|
|
|
@@ -1161,7 +1161,16 @@ class RunsAPI:
|
|
|
1161
1161
|
return ApiResponse(error=e)
|
|
1162
1162
|
|
|
1163
1163
|
def chain_sync(self, data: WorkflowChainCreate) -> ApiResponse:
|
|
1164
|
-
"""Create a multi-step chain (synchronous).
|
|
1164
|
+
"""Create a multi-step chain (synchronous).
|
|
1165
|
+
|
|
1166
|
+
Args:
|
|
1167
|
+
data: WorkflowChainCreate with steps (session_alias, inputs, sensitive_inputs),
|
|
1168
|
+
optional shared_inputs/sensitive/file_inputs, and optional
|
|
1169
|
+
session_id or machine_id/pool_ids for session start.
|
|
1170
|
+
|
|
1171
|
+
Returns:
|
|
1172
|
+
ApiResponse with WorkflowChainResponse
|
|
1173
|
+
"""
|
|
1165
1174
|
try:
|
|
1166
1175
|
response = create_run_chain_v1_runs_chain_post.sync(
|
|
1167
1176
|
client=self.client,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
cyberdesk/__init__.py,sha256=
|
|
2
|
-
cyberdesk/client.py,sha256=
|
|
3
|
-
cyberdesk-2.1.
|
|
1
|
+
cyberdesk/__init__.py,sha256=QKt-Vt7h6fRZIxWfTlv8oVc_KJDeh5ntBuUxC0nQD1M,1158
|
|
2
|
+
cyberdesk/client.py,sha256=usySCtogL1BJ_7Bn_lWixcX0GQLZINkY09t3-BTTWrw,68990
|
|
3
|
+
cyberdesk-2.1.14.dist-info/licenses/LICENSE,sha256=06Op63FCwGhuUOz__M8IZW5sxd29WxyGC4X5-Uih7IQ,1071
|
|
4
4
|
openapi_client/cyberdesk_cloud_client/__init__.py,sha256=r_uVkNUL-SOK8j7-KiGMIKdinES5X8K1Q250ySX2F-A,158
|
|
5
5
|
openapi_client/cyberdesk_cloud_client/client.py,sha256=o_mdLqyBCQstu5tS1WZFwqIEbGwkvWQ7eQjuCJw_5VY,12419
|
|
6
6
|
openapi_client/cyberdesk_cloud_client/errors.py,sha256=gO8GBmKqmSNgAg-E5oT-oOyxztvp7V_6XG7OUTT15q0,546
|
|
@@ -17,6 +17,7 @@ openapi_client/cyberdesk_cloud_client/api/computer/get_screenshot_v1_computer_ma
|
|
|
17
17
|
openapi_client/cyberdesk_cloud_client/api/computer/keyboard_key_v1_computer_machine_id_input_keyboard_key_post.py,sha256=14iKQ2Pj9YCc4YgbNhsmIM8y4hO_xMzm2aOFMIFE4j8,4948
|
|
18
18
|
openapi_client/cyberdesk_cloud_client/api/computer/keyboard_type_v1_computer_machine_id_input_keyboard_type_post.py,sha256=tVBv4T6cg5UscdZtFuZpV4WJFF1Lqg7jDP97dbpoPnk,4664
|
|
19
19
|
openapi_client/cyberdesk_cloud_client/api/computer/mouse_click_v1_computer_machine_id_input_mouse_click_post.py,sha256=_b8dCyAI0W3Fr0Ra5vo35yJuMb36cS0o41SSlLT1xf8,4984
|
|
20
|
+
openapi_client/cyberdesk_cloud_client/api/computer/mouse_drag_v1_computer_machine_id_input_mouse_drag_post.py,sha256=CJ7BogOcUfdBlVKetDCThtb8n_7ZdjhZ9cwtzealuVw,4900
|
|
20
21
|
openapi_client/cyberdesk_cloud_client/api/computer/mouse_move_v1_computer_machine_id_input_mouse_move_post.py,sha256=CNfIj6oTs8QSRo4674pmHw9kJQIBw7D-u7mKT62tMDg,4704
|
|
21
22
|
openapi_client/cyberdesk_cloud_client/api/computer/mouse_scroll_v1_computer_machine_id_input_mouse_scroll_post.py,sha256=iHi8de7RU7gc1aLzLXlrlNW4HO13M8SigTyMqypA-9s,5024
|
|
22
23
|
openapi_client/cyberdesk_cloud_client/api/computer/powershell_exec_v1_computer_machine_id_shell_powershell_exec_post.py,sha256=iZCvu92FFTVAZfIkw-PIWPllUe4NRuAdjB63IasSxKw,6567
|
|
@@ -89,10 +90,11 @@ openapi_client/cyberdesk_cloud_client/api/workflows/get_workflow_v1_workflows_wo
|
|
|
89
90
|
openapi_client/cyberdesk_cloud_client/api/workflows/get_workflow_versions_v1_workflows_workflow_id_versions_get.py,sha256=ax_5V-lIClvOxr50eXSIAPbyhWP-cS4a4DXzwdxkVYs,5889
|
|
90
91
|
openapi_client/cyberdesk_cloud_client/api/workflows/list_workflows_v1_workflows_get.py,sha256=Aszxh1BlUuRqMHjT7lvZf8g6kDCcNUZtuwoJqhDOwlQ,11258
|
|
91
92
|
openapi_client/cyberdesk_cloud_client/api/workflows/update_workflow_v1_workflows_workflow_id_patch.py,sha256=K_tuO6s_FyM8MUOck5AuX_RNIeYqCQcfYx1aDg9xwhE,5737
|
|
92
|
-
openapi_client/cyberdesk_cloud_client/models/__init__.py,sha256=
|
|
93
|
+
openapi_client/cyberdesk_cloud_client/models/__init__.py,sha256=bN2yq2UmoeEwvmWfc5o9Kk9UoFYBa3S7fPrnc_k_qx0,10774
|
|
93
94
|
openapi_client/cyberdesk_cloud_client/models/attachment_type.py,sha256=zqPOsSd2AmxGNqb5HQ6ZYBAYL8k-0UbWHhfAJYNHoro,161
|
|
94
|
-
openapi_client/cyberdesk_cloud_client/models/chain_step.py,sha256=
|
|
95
|
+
openapi_client/cyberdesk_cloud_client/models/chain_step.py,sha256=RbcnI9FI-e6fPYnvtsTUcKmyOkw_0X0R3YLzQihyMO4,5608
|
|
95
96
|
openapi_client/cyberdesk_cloud_client/models/chain_step_inputs_type_0.py,sha256=fLKmOSl7rEi7pRrXbY1sqiVdbCNg0mGj2cPOb5_7hh4,2368
|
|
97
|
+
openapi_client/cyberdesk_cloud_client/models/chain_step_sensitive_inputs_type_0.py,sha256=oLV0b0BiQulk_iNK7QE01t3kBTMmK_0bgBoW9BwfSjI,1302
|
|
96
98
|
openapi_client/cyberdesk_cloud_client/models/connection_create.py,sha256=gCI36DmjJDZxzGFPbykyYw9k4QEf_4dVNz9b-xZfLo4,3288
|
|
97
99
|
openapi_client/cyberdesk_cloud_client/models/connection_response.py,sha256=aFxqJX75wSEw5dZ-kvh3Wgv_haJ6xYJ7o72vSAbEtHY,5247
|
|
98
100
|
openapi_client/cyberdesk_cloud_client/models/connection_status.py,sha256=XTpa-W0TinYhypU7P-LaJEI3I2JsEaT3voUZQ3zoJO0,203
|
|
@@ -117,6 +119,7 @@ openapi_client/cyberdesk_cloud_client/models/machine_response.py,sha256=2fOAnhfZ
|
|
|
117
119
|
openapi_client/cyberdesk_cloud_client/models/machine_status.py,sha256=mqKyXgK1wcaA2fI6iTo_tS7AMeuVrRN4yE21d2Lsq1I,200
|
|
118
120
|
openapi_client/cyberdesk_cloud_client/models/machine_update.py,sha256=0rUF8QOMrKLfGc2t1tULmId33sXBr9uwNgJSUD7p6es,8344
|
|
119
121
|
openapi_client/cyberdesk_cloud_client/models/mouse_click_request.py,sha256=GSBn4fg2sNnL4KQQHKly2YIzyRqbfwVgrQXpaalOUxg,3423
|
|
122
|
+
openapi_client/cyberdesk_cloud_client/models/mouse_drag_request.py,sha256=TRQoT0FUprSE2hBK7U3M_mHWx2VzvE_YKg582OBXgXc,3389
|
|
120
123
|
openapi_client/cyberdesk_cloud_client/models/mouse_move_request.py,sha256=D5sWQwnRvs_IvRocctMeE2czciI-KvuuYh73PLutkPo,1548
|
|
121
124
|
openapi_client/cyberdesk_cloud_client/models/mouse_position.py,sha256=t8PW-7xKfyHb3LVnZQglSu4Hrlp7W_xmoqS-UYOqG2U,1530
|
|
122
125
|
openapi_client/cyberdesk_cloud_client/models/mouse_scroll_request.py,sha256=Q0QG8UweABu0BJXOBQVh8HCgMMyCSvHzoXf4Gkm6A5s,2980
|
|
@@ -153,7 +156,7 @@ openapi_client/cyberdesk_cloud_client/models/run_create.py,sha256=iSgRvNXZuKsHel
|
|
|
153
156
|
openapi_client/cyberdesk_cloud_client/models/run_create_input_values_type_0.py,sha256=APV4O0GduU3fhHoJHMMOBk-h92Hf21c1ZU-pIsJoZpg,1282
|
|
154
157
|
openapi_client/cyberdesk_cloud_client/models/run_create_sensitive_input_values_type_0.py,sha256=gtmXorTEeOVv2fYJKkHCSFhKCRMvE-6-XjfNfNhiNMY,1330
|
|
155
158
|
openapi_client/cyberdesk_cloud_client/models/run_field.py,sha256=XkEqI19aka8ap98dJ9AULywFPamjxXF1ZsvDm00fxNI,643
|
|
156
|
-
openapi_client/cyberdesk_cloud_client/models/run_response.py,sha256=
|
|
159
|
+
openapi_client/cyberdesk_cloud_client/models/run_response.py,sha256=xMaeSkSjvRK5_JjR4UX8x7vZ63uwWyomxhM3Y3VVqSc,19944
|
|
157
160
|
openapi_client/cyberdesk_cloud_client/models/run_response_input_values_type_0.py,sha256=NpMqT3qaMrLGA7mHBjvtS1fnMGc5zxwWLoFWunjjupA,1292
|
|
158
161
|
openapi_client/cyberdesk_cloud_client/models/run_response_output_data_type_0.py,sha256=rO4YJAa26G_83CFtBTQ_ZKCURAxNS7PcvdKbfuvDcrA,1287
|
|
159
162
|
openapi_client/cyberdesk_cloud_client/models/run_response_run_message_history_type_0_item.py,sha256=3x1N3yi3kyc1que3bizmHEuGBn5s7pEirEg4TgBV9FU,1348
|
|
@@ -185,7 +188,7 @@ openapi_client/cyberdesk_cloud_client/models/workflow_create.py,sha256=d0bfNbNBF
|
|
|
185
188
|
openapi_client/cyberdesk_cloud_client/models/workflow_response.py,sha256=k48mouJ6Dcisz2vyM7Rb_cbjU66JudGVPsq4UC7grHA,8977
|
|
186
189
|
openapi_client/cyberdesk_cloud_client/models/workflow_response_old_versions_type_0_item.py,sha256=W9AxxlBlN3rUwLDcoUx5H7MUiYA9UztfX9iEpNGlgAs,1340
|
|
187
190
|
openapi_client/cyberdesk_cloud_client/models/workflow_update.py,sha256=TG2jEitXixS2thtz7lTxTZaE0RBVSWd-apVxWxsvnrg,5333
|
|
188
|
-
cyberdesk-2.1.
|
|
189
|
-
cyberdesk-2.1.
|
|
190
|
-
cyberdesk-2.1.
|
|
191
|
-
cyberdesk-2.1.
|
|
191
|
+
cyberdesk-2.1.14.dist-info/METADATA,sha256=8bRealAgwCiFT8qpINQGXg0MM00twj-rJikLC_WKSmw,6792
|
|
192
|
+
cyberdesk-2.1.14.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
193
|
+
cyberdesk-2.1.14.dist-info/top_level.txt,sha256=qTYHZHVHh3VClNPQsiFFA8p8tmJgFGhq9G1COd-pX_A,25
|
|
194
|
+
cyberdesk-2.1.14.dist-info/RECORD,,
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Optional, Union, cast
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.http_validation_error import HTTPValidationError
|
|
9
|
+
from ...models.mouse_drag_request import MouseDragRequest
|
|
10
|
+
from ...types import Response
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def _get_kwargs(
|
|
14
|
+
machine_id: str,
|
|
15
|
+
*,
|
|
16
|
+
body: MouseDragRequest,
|
|
17
|
+
) -> dict[str, Any]:
|
|
18
|
+
headers: dict[str, Any] = {}
|
|
19
|
+
|
|
20
|
+
_kwargs: dict[str, Any] = {
|
|
21
|
+
"method": "post",
|
|
22
|
+
"url": f"/v1/computer/{machine_id}/input/mouse/drag",
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
_kwargs["json"] = body.to_dict()
|
|
26
|
+
|
|
27
|
+
headers["Content-Type"] = "application/json"
|
|
28
|
+
|
|
29
|
+
_kwargs["headers"] = headers
|
|
30
|
+
return _kwargs
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def _parse_response(
|
|
34
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
35
|
+
) -> Optional[Union[Any, HTTPValidationError]]:
|
|
36
|
+
if response.status_code == 204:
|
|
37
|
+
response_204 = cast(Any, None)
|
|
38
|
+
return response_204
|
|
39
|
+
if response.status_code == 422:
|
|
40
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
41
|
+
|
|
42
|
+
return response_422
|
|
43
|
+
if client.raise_on_unexpected_status:
|
|
44
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
45
|
+
else:
|
|
46
|
+
return None
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def _build_response(
|
|
50
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
51
|
+
) -> Response[Union[Any, HTTPValidationError]]:
|
|
52
|
+
return Response(
|
|
53
|
+
status_code=HTTPStatus(response.status_code),
|
|
54
|
+
content=response.content,
|
|
55
|
+
headers=response.headers,
|
|
56
|
+
parsed=_parse_response(client=client, response=response),
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def sync_detailed(
|
|
61
|
+
machine_id: str,
|
|
62
|
+
*,
|
|
63
|
+
client: AuthenticatedClient,
|
|
64
|
+
body: MouseDragRequest,
|
|
65
|
+
) -> Response[Union[Any, HTTPValidationError]]:
|
|
66
|
+
"""Drag mouse (native)
|
|
67
|
+
|
|
68
|
+
Perform a drag operation using absolute coordinates with required start and optional duration.
|
|
69
|
+
|
|
70
|
+
Args:
|
|
71
|
+
machine_id (str):
|
|
72
|
+
body (MouseDragRequest):
|
|
73
|
+
|
|
74
|
+
Raises:
|
|
75
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
76
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
77
|
+
|
|
78
|
+
Returns:
|
|
79
|
+
Response[Union[Any, HTTPValidationError]]
|
|
80
|
+
"""
|
|
81
|
+
|
|
82
|
+
kwargs = _get_kwargs(
|
|
83
|
+
machine_id=machine_id,
|
|
84
|
+
body=body,
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
response = client.get_httpx_client().request(
|
|
88
|
+
**kwargs,
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
return _build_response(client=client, response=response)
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
def sync(
|
|
95
|
+
machine_id: str,
|
|
96
|
+
*,
|
|
97
|
+
client: AuthenticatedClient,
|
|
98
|
+
body: MouseDragRequest,
|
|
99
|
+
) -> Optional[Union[Any, HTTPValidationError]]:
|
|
100
|
+
"""Drag mouse (native)
|
|
101
|
+
|
|
102
|
+
Perform a drag operation using absolute coordinates with required start and optional duration.
|
|
103
|
+
|
|
104
|
+
Args:
|
|
105
|
+
machine_id (str):
|
|
106
|
+
body (MouseDragRequest):
|
|
107
|
+
|
|
108
|
+
Raises:
|
|
109
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
110
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
111
|
+
|
|
112
|
+
Returns:
|
|
113
|
+
Union[Any, HTTPValidationError]
|
|
114
|
+
"""
|
|
115
|
+
|
|
116
|
+
return sync_detailed(
|
|
117
|
+
machine_id=machine_id,
|
|
118
|
+
client=client,
|
|
119
|
+
body=body,
|
|
120
|
+
).parsed
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
async def asyncio_detailed(
|
|
124
|
+
machine_id: str,
|
|
125
|
+
*,
|
|
126
|
+
client: AuthenticatedClient,
|
|
127
|
+
body: MouseDragRequest,
|
|
128
|
+
) -> Response[Union[Any, HTTPValidationError]]:
|
|
129
|
+
"""Drag mouse (native)
|
|
130
|
+
|
|
131
|
+
Perform a drag operation using absolute coordinates with required start and optional duration.
|
|
132
|
+
|
|
133
|
+
Args:
|
|
134
|
+
machine_id (str):
|
|
135
|
+
body (MouseDragRequest):
|
|
136
|
+
|
|
137
|
+
Raises:
|
|
138
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
139
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
140
|
+
|
|
141
|
+
Returns:
|
|
142
|
+
Response[Union[Any, HTTPValidationError]]
|
|
143
|
+
"""
|
|
144
|
+
|
|
145
|
+
kwargs = _get_kwargs(
|
|
146
|
+
machine_id=machine_id,
|
|
147
|
+
body=body,
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
151
|
+
|
|
152
|
+
return _build_response(client=client, response=response)
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
async def asyncio(
|
|
156
|
+
machine_id: str,
|
|
157
|
+
*,
|
|
158
|
+
client: AuthenticatedClient,
|
|
159
|
+
body: MouseDragRequest,
|
|
160
|
+
) -> Optional[Union[Any, HTTPValidationError]]:
|
|
161
|
+
"""Drag mouse (native)
|
|
162
|
+
|
|
163
|
+
Perform a drag operation using absolute coordinates with required start and optional duration.
|
|
164
|
+
|
|
165
|
+
Args:
|
|
166
|
+
machine_id (str):
|
|
167
|
+
body (MouseDragRequest):
|
|
168
|
+
|
|
169
|
+
Raises:
|
|
170
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
171
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
172
|
+
|
|
173
|
+
Returns:
|
|
174
|
+
Union[Any, HTTPValidationError]
|
|
175
|
+
"""
|
|
176
|
+
|
|
177
|
+
return (
|
|
178
|
+
await asyncio_detailed(
|
|
179
|
+
machine_id=machine_id,
|
|
180
|
+
client=client,
|
|
181
|
+
body=body,
|
|
182
|
+
)
|
|
183
|
+
).parsed
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
from .attachment_type import AttachmentType
|
|
4
4
|
from .chain_step import ChainStep
|
|
5
5
|
from .chain_step_inputs_type_0 import ChainStepInputsType0
|
|
6
|
+
from .chain_step_sensitive_inputs_type_0 import ChainStepSensitiveInputsType0
|
|
6
7
|
from .connection_create import ConnectionCreate
|
|
7
8
|
from .connection_response import ConnectionResponse
|
|
8
9
|
from .connection_status import ConnectionStatus
|
|
@@ -41,6 +42,7 @@ from .machine_response import MachineResponse
|
|
|
41
42
|
from .machine_status import MachineStatus
|
|
42
43
|
from .machine_update import MachineUpdate
|
|
43
44
|
from .mouse_click_request import MouseClickRequest
|
|
45
|
+
from .mouse_drag_request import MouseDragRequest
|
|
44
46
|
from .mouse_move_request import MouseMoveRequest
|
|
45
47
|
from .mouse_position import MousePosition
|
|
46
48
|
from .mouse_scroll_request import MouseScrollRequest
|
|
@@ -118,6 +120,7 @@ __all__ = (
|
|
|
118
120
|
"AttachmentType",
|
|
119
121
|
"ChainStep",
|
|
120
122
|
"ChainStepInputsType0",
|
|
123
|
+
"ChainStepSensitiveInputsType0",
|
|
121
124
|
"ConnectionCreate",
|
|
122
125
|
"ConnectionResponse",
|
|
123
126
|
"ConnectionStatus",
|
|
@@ -142,6 +145,7 @@ __all__ = (
|
|
|
142
145
|
"MachineStatus",
|
|
143
146
|
"MachineUpdate",
|
|
144
147
|
"MouseClickRequest",
|
|
148
|
+
"MouseDragRequest",
|
|
145
149
|
"MouseMoveRequest",
|
|
146
150
|
"MousePosition",
|
|
147
151
|
"MouseScrollRequest",
|
|
@@ -9,6 +9,7 @@ from ..types import UNSET, Unset
|
|
|
9
9
|
|
|
10
10
|
if TYPE_CHECKING:
|
|
11
11
|
from ..models.chain_step_inputs_type_0 import ChainStepInputsType0
|
|
12
|
+
from ..models.chain_step_sensitive_inputs_type_0 import ChainStepSensitiveInputsType0
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
T = TypeVar("T", bound="ChainStep")
|
|
@@ -23,15 +24,19 @@ class ChainStep:
|
|
|
23
24
|
session_alias (Union[None, Unset, str]): Alias to persist this step's outputs within the session
|
|
24
25
|
inputs (Union['ChainStepInputsType0', None, Unset]): Step-specific inputs; values must be string or {$ref:
|
|
25
26
|
'alias.outputs.path'}
|
|
27
|
+
sensitive_inputs (Union['ChainStepSensitiveInputsType0', None, Unset]): Step-specific sensitive inputs that
|
|
28
|
+
override or extend shared_sensitive_inputs
|
|
26
29
|
"""
|
|
27
30
|
|
|
28
31
|
workflow_id: UUID
|
|
29
32
|
session_alias: Union[None, Unset, str] = UNSET
|
|
30
33
|
inputs: Union["ChainStepInputsType0", None, Unset] = UNSET
|
|
34
|
+
sensitive_inputs: Union["ChainStepSensitiveInputsType0", None, Unset] = UNSET
|
|
31
35
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
32
36
|
|
|
33
37
|
def to_dict(self) -> dict[str, Any]:
|
|
34
38
|
from ..models.chain_step_inputs_type_0 import ChainStepInputsType0
|
|
39
|
+
from ..models.chain_step_sensitive_inputs_type_0 import ChainStepSensitiveInputsType0
|
|
35
40
|
|
|
36
41
|
workflow_id = str(self.workflow_id)
|
|
37
42
|
|
|
@@ -49,6 +54,14 @@ class ChainStep:
|
|
|
49
54
|
else:
|
|
50
55
|
inputs = self.inputs
|
|
51
56
|
|
|
57
|
+
sensitive_inputs: Union[None, Unset, dict[str, Any]]
|
|
58
|
+
if isinstance(self.sensitive_inputs, Unset):
|
|
59
|
+
sensitive_inputs = UNSET
|
|
60
|
+
elif isinstance(self.sensitive_inputs, ChainStepSensitiveInputsType0):
|
|
61
|
+
sensitive_inputs = self.sensitive_inputs.to_dict()
|
|
62
|
+
else:
|
|
63
|
+
sensitive_inputs = self.sensitive_inputs
|
|
64
|
+
|
|
52
65
|
field_dict: dict[str, Any] = {}
|
|
53
66
|
field_dict.update(self.additional_properties)
|
|
54
67
|
field_dict.update(
|
|
@@ -60,12 +73,15 @@ class ChainStep:
|
|
|
60
73
|
field_dict["session_alias"] = session_alias
|
|
61
74
|
if inputs is not UNSET:
|
|
62
75
|
field_dict["inputs"] = inputs
|
|
76
|
+
if sensitive_inputs is not UNSET:
|
|
77
|
+
field_dict["sensitive_inputs"] = sensitive_inputs
|
|
63
78
|
|
|
64
79
|
return field_dict
|
|
65
80
|
|
|
66
81
|
@classmethod
|
|
67
82
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
68
83
|
from ..models.chain_step_inputs_type_0 import ChainStepInputsType0
|
|
84
|
+
from ..models.chain_step_sensitive_inputs_type_0 import ChainStepSensitiveInputsType0
|
|
69
85
|
|
|
70
86
|
d = dict(src_dict)
|
|
71
87
|
workflow_id = UUID(d.pop("workflow_id"))
|
|
@@ -96,10 +112,28 @@ class ChainStep:
|
|
|
96
112
|
|
|
97
113
|
inputs = _parse_inputs(d.pop("inputs", UNSET))
|
|
98
114
|
|
|
115
|
+
def _parse_sensitive_inputs(data: object) -> Union["ChainStepSensitiveInputsType0", None, Unset]:
|
|
116
|
+
if data is None:
|
|
117
|
+
return data
|
|
118
|
+
if isinstance(data, Unset):
|
|
119
|
+
return data
|
|
120
|
+
try:
|
|
121
|
+
if not isinstance(data, dict):
|
|
122
|
+
raise TypeError()
|
|
123
|
+
sensitive_inputs_type_0 = ChainStepSensitiveInputsType0.from_dict(data)
|
|
124
|
+
|
|
125
|
+
return sensitive_inputs_type_0
|
|
126
|
+
except: # noqa: E722
|
|
127
|
+
pass
|
|
128
|
+
return cast(Union["ChainStepSensitiveInputsType0", None, Unset], data)
|
|
129
|
+
|
|
130
|
+
sensitive_inputs = _parse_sensitive_inputs(d.pop("sensitive_inputs", UNSET))
|
|
131
|
+
|
|
99
132
|
chain_step = cls(
|
|
100
133
|
workflow_id=workflow_id,
|
|
101
134
|
session_alias=session_alias,
|
|
102
135
|
inputs=inputs,
|
|
136
|
+
sensitive_inputs=sensitive_inputs,
|
|
103
137
|
)
|
|
104
138
|
|
|
105
139
|
chain_step.additional_properties = d
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import Any, TypeVar
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
T = TypeVar("T", bound="ChainStepSensitiveInputsType0")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@_attrs_define
|
|
11
|
+
class ChainStepSensitiveInputsType0:
|
|
12
|
+
""" """
|
|
13
|
+
|
|
14
|
+
additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict)
|
|
15
|
+
|
|
16
|
+
def to_dict(self) -> dict[str, Any]:
|
|
17
|
+
field_dict: dict[str, Any] = {}
|
|
18
|
+
field_dict.update(self.additional_properties)
|
|
19
|
+
|
|
20
|
+
return field_dict
|
|
21
|
+
|
|
22
|
+
@classmethod
|
|
23
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
24
|
+
d = dict(src_dict)
|
|
25
|
+
chain_step_sensitive_inputs_type_0 = cls()
|
|
26
|
+
|
|
27
|
+
chain_step_sensitive_inputs_type_0.additional_properties = d
|
|
28
|
+
return chain_step_sensitive_inputs_type_0
|
|
29
|
+
|
|
30
|
+
@property
|
|
31
|
+
def additional_keys(self) -> list[str]:
|
|
32
|
+
return list(self.additional_properties.keys())
|
|
33
|
+
|
|
34
|
+
def __getitem__(self, key: str) -> str:
|
|
35
|
+
return self.additional_properties[key]
|
|
36
|
+
|
|
37
|
+
def __setitem__(self, key: str, value: str) -> None:
|
|
38
|
+
self.additional_properties[key] = value
|
|
39
|
+
|
|
40
|
+
def __delitem__(self, key: str) -> None:
|
|
41
|
+
del self.additional_properties[key]
|
|
42
|
+
|
|
43
|
+
def __contains__(self, key: str) -> bool:
|
|
44
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,125 @@
|
|
|
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="MouseDragRequest")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class MouseDragRequest:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
to_x (int):
|
|
17
|
+
to_y (int):
|
|
18
|
+
start_x (int):
|
|
19
|
+
start_y (int):
|
|
20
|
+
duration (Union[None, Unset, float]):
|
|
21
|
+
button (Union[None, Unset, str]): 'left' | 'right' | 'middle' Default: 'left'.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
to_x: int
|
|
25
|
+
to_y: int
|
|
26
|
+
start_x: int
|
|
27
|
+
start_y: int
|
|
28
|
+
duration: Union[None, Unset, float] = UNSET
|
|
29
|
+
button: Union[None, Unset, str] = "left"
|
|
30
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
31
|
+
|
|
32
|
+
def to_dict(self) -> dict[str, Any]:
|
|
33
|
+
to_x = self.to_x
|
|
34
|
+
|
|
35
|
+
to_y = self.to_y
|
|
36
|
+
|
|
37
|
+
start_x = self.start_x
|
|
38
|
+
|
|
39
|
+
start_y = self.start_y
|
|
40
|
+
|
|
41
|
+
duration: Union[None, Unset, float]
|
|
42
|
+
if isinstance(self.duration, Unset):
|
|
43
|
+
duration = UNSET
|
|
44
|
+
else:
|
|
45
|
+
duration = self.duration
|
|
46
|
+
|
|
47
|
+
button: Union[None, Unset, str]
|
|
48
|
+
if isinstance(self.button, Unset):
|
|
49
|
+
button = UNSET
|
|
50
|
+
else:
|
|
51
|
+
button = self.button
|
|
52
|
+
|
|
53
|
+
field_dict: dict[str, Any] = {}
|
|
54
|
+
field_dict.update(self.additional_properties)
|
|
55
|
+
field_dict.update(
|
|
56
|
+
{
|
|
57
|
+
"to_x": to_x,
|
|
58
|
+
"to_y": to_y,
|
|
59
|
+
"start_x": start_x,
|
|
60
|
+
"start_y": start_y,
|
|
61
|
+
}
|
|
62
|
+
)
|
|
63
|
+
if duration is not UNSET:
|
|
64
|
+
field_dict["duration"] = duration
|
|
65
|
+
if button is not UNSET:
|
|
66
|
+
field_dict["button"] = button
|
|
67
|
+
|
|
68
|
+
return field_dict
|
|
69
|
+
|
|
70
|
+
@classmethod
|
|
71
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
72
|
+
d = dict(src_dict)
|
|
73
|
+
to_x = d.pop("to_x")
|
|
74
|
+
|
|
75
|
+
to_y = d.pop("to_y")
|
|
76
|
+
|
|
77
|
+
start_x = d.pop("start_x")
|
|
78
|
+
|
|
79
|
+
start_y = d.pop("start_y")
|
|
80
|
+
|
|
81
|
+
def _parse_duration(data: object) -> Union[None, Unset, float]:
|
|
82
|
+
if data is None:
|
|
83
|
+
return data
|
|
84
|
+
if isinstance(data, Unset):
|
|
85
|
+
return data
|
|
86
|
+
return cast(Union[None, Unset, float], data)
|
|
87
|
+
|
|
88
|
+
duration = _parse_duration(d.pop("duration", UNSET))
|
|
89
|
+
|
|
90
|
+
def _parse_button(data: object) -> Union[None, Unset, str]:
|
|
91
|
+
if data is None:
|
|
92
|
+
return data
|
|
93
|
+
if isinstance(data, Unset):
|
|
94
|
+
return data
|
|
95
|
+
return cast(Union[None, Unset, str], data)
|
|
96
|
+
|
|
97
|
+
button = _parse_button(d.pop("button", UNSET))
|
|
98
|
+
|
|
99
|
+
mouse_drag_request = cls(
|
|
100
|
+
to_x=to_x,
|
|
101
|
+
to_y=to_y,
|
|
102
|
+
start_x=start_x,
|
|
103
|
+
start_y=start_y,
|
|
104
|
+
duration=duration,
|
|
105
|
+
button=button,
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
mouse_drag_request.additional_properties = d
|
|
109
|
+
return mouse_drag_request
|
|
110
|
+
|
|
111
|
+
@property
|
|
112
|
+
def additional_keys(self) -> list[str]:
|
|
113
|
+
return list(self.additional_properties.keys())
|
|
114
|
+
|
|
115
|
+
def __getitem__(self, key: str) -> Any:
|
|
116
|
+
return self.additional_properties[key]
|
|
117
|
+
|
|
118
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
119
|
+
self.additional_properties[key] = value
|
|
120
|
+
|
|
121
|
+
def __delitem__(self, key: str) -> None:
|
|
122
|
+
del self.additional_properties[key]
|
|
123
|
+
|
|
124
|
+
def __contains__(self, key: str) -> bool:
|
|
125
|
+
return key in self.additional_properties
|
|
@@ -29,15 +29,15 @@ class RunResponse:
|
|
|
29
29
|
machine_id (Union[None, UUID]):
|
|
30
30
|
id (UUID):
|
|
31
31
|
status (RunStatus):
|
|
32
|
-
error (Union[None, list[str]]):
|
|
33
|
-
output_data (Union['RunResponseOutputDataType0', None]):
|
|
34
|
-
input_attachment_ids (Union[None, list[str]]):
|
|
35
|
-
output_attachment_ids (Union[None, list[str]]):
|
|
36
|
-
run_message_history (Union[None, list['RunResponseRunMessageHistoryType0Item']]):
|
|
37
|
-
input_values (Union['RunResponseInputValuesType0', None]):
|
|
38
32
|
created_at (datetime.datetime):
|
|
39
33
|
user_id (Union[None, UUID, Unset]):
|
|
40
34
|
organization_id (Union[None, Unset, str]):
|
|
35
|
+
error (Union[None, Unset, list[str]]):
|
|
36
|
+
output_data (Union['RunResponseOutputDataType0', None, Unset]):
|
|
37
|
+
input_attachment_ids (Union[None, Unset, list[str]]):
|
|
38
|
+
output_attachment_ids (Union[None, Unset, list[str]]):
|
|
39
|
+
run_message_history (Union[None, Unset, list['RunResponseRunMessageHistoryType0Item']]):
|
|
40
|
+
input_values (Union['RunResponseInputValuesType0', None, Unset]):
|
|
41
41
|
pool_ids (Union[None, Unset, list[UUID]]):
|
|
42
42
|
sensitive_input_aliases (Union['RunResponseSensitiveInputAliasesType0', None, Unset]):
|
|
43
43
|
session_id (Union[None, UUID, Unset]):
|
|
@@ -49,15 +49,15 @@ class RunResponse:
|
|
|
49
49
|
machine_id: Union[None, UUID]
|
|
50
50
|
id: UUID
|
|
51
51
|
status: RunStatus
|
|
52
|
-
error: Union[None, list[str]]
|
|
53
|
-
output_data: Union["RunResponseOutputDataType0", None]
|
|
54
|
-
input_attachment_ids: Union[None, list[str]]
|
|
55
|
-
output_attachment_ids: Union[None, list[str]]
|
|
56
|
-
run_message_history: Union[None, list["RunResponseRunMessageHistoryType0Item"]]
|
|
57
|
-
input_values: Union["RunResponseInputValuesType0", None]
|
|
58
52
|
created_at: datetime.datetime
|
|
59
53
|
user_id: Union[None, UUID, Unset] = UNSET
|
|
60
54
|
organization_id: Union[None, Unset, str] = UNSET
|
|
55
|
+
error: Union[None, Unset, list[str]] = UNSET
|
|
56
|
+
output_data: Union["RunResponseOutputDataType0", None, Unset] = UNSET
|
|
57
|
+
input_attachment_ids: Union[None, Unset, list[str]] = UNSET
|
|
58
|
+
output_attachment_ids: Union[None, Unset, list[str]] = UNSET
|
|
59
|
+
run_message_history: Union[None, Unset, list["RunResponseRunMessageHistoryType0Item"]] = UNSET
|
|
60
|
+
input_values: Union["RunResponseInputValuesType0", None, Unset] = UNSET
|
|
61
61
|
pool_ids: Union[None, Unset, list[UUID]] = UNSET
|
|
62
62
|
sensitive_input_aliases: Union["RunResponseSensitiveInputAliasesType0", None, Unset] = UNSET
|
|
63
63
|
session_id: Union[None, UUID, Unset] = UNSET
|
|
@@ -82,35 +82,61 @@ class RunResponse:
|
|
|
82
82
|
|
|
83
83
|
status = self.status.value
|
|
84
84
|
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
created_at = self.created_at.isoformat()
|
|
86
|
+
|
|
87
|
+
user_id: Union[None, Unset, str]
|
|
88
|
+
if isinstance(self.user_id, Unset):
|
|
89
|
+
user_id = UNSET
|
|
90
|
+
elif isinstance(self.user_id, UUID):
|
|
91
|
+
user_id = str(self.user_id)
|
|
92
|
+
else:
|
|
93
|
+
user_id = self.user_id
|
|
94
|
+
|
|
95
|
+
organization_id: Union[None, Unset, str]
|
|
96
|
+
if isinstance(self.organization_id, Unset):
|
|
97
|
+
organization_id = UNSET
|
|
98
|
+
else:
|
|
99
|
+
organization_id = self.organization_id
|
|
100
|
+
|
|
101
|
+
error: Union[None, Unset, list[str]]
|
|
102
|
+
if isinstance(self.error, Unset):
|
|
103
|
+
error = UNSET
|
|
104
|
+
elif isinstance(self.error, list):
|
|
87
105
|
error = self.error
|
|
88
106
|
|
|
89
107
|
else:
|
|
90
108
|
error = self.error
|
|
91
109
|
|
|
92
|
-
output_data: Union[None, dict[str, Any]]
|
|
93
|
-
if isinstance(self.output_data,
|
|
110
|
+
output_data: Union[None, Unset, dict[str, Any]]
|
|
111
|
+
if isinstance(self.output_data, Unset):
|
|
112
|
+
output_data = UNSET
|
|
113
|
+
elif isinstance(self.output_data, RunResponseOutputDataType0):
|
|
94
114
|
output_data = self.output_data.to_dict()
|
|
95
115
|
else:
|
|
96
116
|
output_data = self.output_data
|
|
97
117
|
|
|
98
|
-
input_attachment_ids: Union[None, list[str]]
|
|
99
|
-
if isinstance(self.input_attachment_ids,
|
|
118
|
+
input_attachment_ids: Union[None, Unset, list[str]]
|
|
119
|
+
if isinstance(self.input_attachment_ids, Unset):
|
|
120
|
+
input_attachment_ids = UNSET
|
|
121
|
+
elif isinstance(self.input_attachment_ids, list):
|
|
100
122
|
input_attachment_ids = self.input_attachment_ids
|
|
101
123
|
|
|
102
124
|
else:
|
|
103
125
|
input_attachment_ids = self.input_attachment_ids
|
|
104
126
|
|
|
105
|
-
output_attachment_ids: Union[None, list[str]]
|
|
106
|
-
if isinstance(self.output_attachment_ids,
|
|
127
|
+
output_attachment_ids: Union[None, Unset, list[str]]
|
|
128
|
+
if isinstance(self.output_attachment_ids, Unset):
|
|
129
|
+
output_attachment_ids = UNSET
|
|
130
|
+
elif isinstance(self.output_attachment_ids, list):
|
|
107
131
|
output_attachment_ids = self.output_attachment_ids
|
|
108
132
|
|
|
109
133
|
else:
|
|
110
134
|
output_attachment_ids = self.output_attachment_ids
|
|
111
135
|
|
|
112
|
-
run_message_history: Union[None, list[dict[str, Any]]]
|
|
113
|
-
if isinstance(self.run_message_history,
|
|
136
|
+
run_message_history: Union[None, Unset, list[dict[str, Any]]]
|
|
137
|
+
if isinstance(self.run_message_history, Unset):
|
|
138
|
+
run_message_history = UNSET
|
|
139
|
+
elif isinstance(self.run_message_history, list):
|
|
114
140
|
run_message_history = []
|
|
115
141
|
for run_message_history_type_0_item_data in self.run_message_history:
|
|
116
142
|
run_message_history_type_0_item = run_message_history_type_0_item_data.to_dict()
|
|
@@ -119,28 +145,14 @@ class RunResponse:
|
|
|
119
145
|
else:
|
|
120
146
|
run_message_history = self.run_message_history
|
|
121
147
|
|
|
122
|
-
input_values: Union[None, dict[str, Any]]
|
|
123
|
-
if isinstance(self.input_values,
|
|
148
|
+
input_values: Union[None, Unset, dict[str, Any]]
|
|
149
|
+
if isinstance(self.input_values, Unset):
|
|
150
|
+
input_values = UNSET
|
|
151
|
+
elif isinstance(self.input_values, RunResponseInputValuesType0):
|
|
124
152
|
input_values = self.input_values.to_dict()
|
|
125
153
|
else:
|
|
126
154
|
input_values = self.input_values
|
|
127
155
|
|
|
128
|
-
created_at = self.created_at.isoformat()
|
|
129
|
-
|
|
130
|
-
user_id: Union[None, Unset, str]
|
|
131
|
-
if isinstance(self.user_id, Unset):
|
|
132
|
-
user_id = UNSET
|
|
133
|
-
elif isinstance(self.user_id, UUID):
|
|
134
|
-
user_id = str(self.user_id)
|
|
135
|
-
else:
|
|
136
|
-
user_id = self.user_id
|
|
137
|
-
|
|
138
|
-
organization_id: Union[None, Unset, str]
|
|
139
|
-
if isinstance(self.organization_id, Unset):
|
|
140
|
-
organization_id = UNSET
|
|
141
|
-
else:
|
|
142
|
-
organization_id = self.organization_id
|
|
143
|
-
|
|
144
156
|
pool_ids: Union[None, Unset, list[str]]
|
|
145
157
|
if isinstance(self.pool_ids, Unset):
|
|
146
158
|
pool_ids = UNSET
|
|
@@ -189,12 +201,6 @@ class RunResponse:
|
|
|
189
201
|
"machine_id": machine_id,
|
|
190
202
|
"id": id,
|
|
191
203
|
"status": status,
|
|
192
|
-
"error": error,
|
|
193
|
-
"output_data": output_data,
|
|
194
|
-
"input_attachment_ids": input_attachment_ids,
|
|
195
|
-
"output_attachment_ids": output_attachment_ids,
|
|
196
|
-
"run_message_history": run_message_history,
|
|
197
|
-
"input_values": input_values,
|
|
198
204
|
"created_at": created_at,
|
|
199
205
|
}
|
|
200
206
|
)
|
|
@@ -202,6 +208,18 @@ class RunResponse:
|
|
|
202
208
|
field_dict["user_id"] = user_id
|
|
203
209
|
if organization_id is not UNSET:
|
|
204
210
|
field_dict["organization_id"] = organization_id
|
|
211
|
+
if error is not UNSET:
|
|
212
|
+
field_dict["error"] = error
|
|
213
|
+
if output_data is not UNSET:
|
|
214
|
+
field_dict["output_data"] = output_data
|
|
215
|
+
if input_attachment_ids is not UNSET:
|
|
216
|
+
field_dict["input_attachment_ids"] = input_attachment_ids
|
|
217
|
+
if output_attachment_ids is not UNSET:
|
|
218
|
+
field_dict["output_attachment_ids"] = output_attachment_ids
|
|
219
|
+
if run_message_history is not UNSET:
|
|
220
|
+
field_dict["run_message_history"] = run_message_history
|
|
221
|
+
if input_values is not UNSET:
|
|
222
|
+
field_dict["input_values"] = input_values
|
|
205
223
|
if pool_ids is not UNSET:
|
|
206
224
|
field_dict["pool_ids"] = pool_ids
|
|
207
225
|
if sensitive_input_aliases is not UNSET:
|
|
@@ -244,9 +262,39 @@ class RunResponse:
|
|
|
244
262
|
|
|
245
263
|
status = RunStatus(d.pop("status"))
|
|
246
264
|
|
|
247
|
-
|
|
265
|
+
created_at = isoparse(d.pop("created_at"))
|
|
266
|
+
|
|
267
|
+
def _parse_user_id(data: object) -> Union[None, UUID, Unset]:
|
|
268
|
+
if data is None:
|
|
269
|
+
return data
|
|
270
|
+
if isinstance(data, Unset):
|
|
271
|
+
return data
|
|
272
|
+
try:
|
|
273
|
+
if not isinstance(data, str):
|
|
274
|
+
raise TypeError()
|
|
275
|
+
user_id_type_0 = UUID(data)
|
|
276
|
+
|
|
277
|
+
return user_id_type_0
|
|
278
|
+
except: # noqa: E722
|
|
279
|
+
pass
|
|
280
|
+
return cast(Union[None, UUID, Unset], data)
|
|
281
|
+
|
|
282
|
+
user_id = _parse_user_id(d.pop("user_id", UNSET))
|
|
283
|
+
|
|
284
|
+
def _parse_organization_id(data: object) -> Union[None, Unset, str]:
|
|
285
|
+
if data is None:
|
|
286
|
+
return data
|
|
287
|
+
if isinstance(data, Unset):
|
|
288
|
+
return data
|
|
289
|
+
return cast(Union[None, Unset, str], data)
|
|
290
|
+
|
|
291
|
+
organization_id = _parse_organization_id(d.pop("organization_id", UNSET))
|
|
292
|
+
|
|
293
|
+
def _parse_error(data: object) -> Union[None, Unset, list[str]]:
|
|
248
294
|
if data is None:
|
|
249
295
|
return data
|
|
296
|
+
if isinstance(data, Unset):
|
|
297
|
+
return data
|
|
250
298
|
try:
|
|
251
299
|
if not isinstance(data, list):
|
|
252
300
|
raise TypeError()
|
|
@@ -255,13 +303,15 @@ class RunResponse:
|
|
|
255
303
|
return error_type_0
|
|
256
304
|
except: # noqa: E722
|
|
257
305
|
pass
|
|
258
|
-
return cast(Union[None, list[str]], data)
|
|
306
|
+
return cast(Union[None, Unset, list[str]], data)
|
|
259
307
|
|
|
260
|
-
error = _parse_error(d.pop("error"))
|
|
308
|
+
error = _parse_error(d.pop("error", UNSET))
|
|
261
309
|
|
|
262
|
-
def _parse_output_data(data: object) -> Union["RunResponseOutputDataType0", None]:
|
|
310
|
+
def _parse_output_data(data: object) -> Union["RunResponseOutputDataType0", None, Unset]:
|
|
263
311
|
if data is None:
|
|
264
312
|
return data
|
|
313
|
+
if isinstance(data, Unset):
|
|
314
|
+
return data
|
|
265
315
|
try:
|
|
266
316
|
if not isinstance(data, dict):
|
|
267
317
|
raise TypeError()
|
|
@@ -270,13 +320,15 @@ class RunResponse:
|
|
|
270
320
|
return output_data_type_0
|
|
271
321
|
except: # noqa: E722
|
|
272
322
|
pass
|
|
273
|
-
return cast(Union["RunResponseOutputDataType0", None], data)
|
|
323
|
+
return cast(Union["RunResponseOutputDataType0", None, Unset], data)
|
|
274
324
|
|
|
275
|
-
output_data = _parse_output_data(d.pop("output_data"))
|
|
325
|
+
output_data = _parse_output_data(d.pop("output_data", UNSET))
|
|
276
326
|
|
|
277
|
-
def _parse_input_attachment_ids(data: object) -> Union[None, list[str]]:
|
|
327
|
+
def _parse_input_attachment_ids(data: object) -> Union[None, Unset, list[str]]:
|
|
278
328
|
if data is None:
|
|
279
329
|
return data
|
|
330
|
+
if isinstance(data, Unset):
|
|
331
|
+
return data
|
|
280
332
|
try:
|
|
281
333
|
if not isinstance(data, list):
|
|
282
334
|
raise TypeError()
|
|
@@ -285,13 +337,15 @@ class RunResponse:
|
|
|
285
337
|
return input_attachment_ids_type_0
|
|
286
338
|
except: # noqa: E722
|
|
287
339
|
pass
|
|
288
|
-
return cast(Union[None, list[str]], data)
|
|
340
|
+
return cast(Union[None, Unset, list[str]], data)
|
|
289
341
|
|
|
290
|
-
input_attachment_ids = _parse_input_attachment_ids(d.pop("input_attachment_ids"))
|
|
342
|
+
input_attachment_ids = _parse_input_attachment_ids(d.pop("input_attachment_ids", UNSET))
|
|
291
343
|
|
|
292
|
-
def _parse_output_attachment_ids(data: object) -> Union[None, list[str]]:
|
|
344
|
+
def _parse_output_attachment_ids(data: object) -> Union[None, Unset, list[str]]:
|
|
293
345
|
if data is None:
|
|
294
346
|
return data
|
|
347
|
+
if isinstance(data, Unset):
|
|
348
|
+
return data
|
|
295
349
|
try:
|
|
296
350
|
if not isinstance(data, list):
|
|
297
351
|
raise TypeError()
|
|
@@ -300,13 +354,17 @@ class RunResponse:
|
|
|
300
354
|
return output_attachment_ids_type_0
|
|
301
355
|
except: # noqa: E722
|
|
302
356
|
pass
|
|
303
|
-
return cast(Union[None, list[str]], data)
|
|
357
|
+
return cast(Union[None, Unset, list[str]], data)
|
|
304
358
|
|
|
305
|
-
output_attachment_ids = _parse_output_attachment_ids(d.pop("output_attachment_ids"))
|
|
359
|
+
output_attachment_ids = _parse_output_attachment_ids(d.pop("output_attachment_ids", UNSET))
|
|
306
360
|
|
|
307
|
-
def _parse_run_message_history(
|
|
361
|
+
def _parse_run_message_history(
|
|
362
|
+
data: object,
|
|
363
|
+
) -> Union[None, Unset, list["RunResponseRunMessageHistoryType0Item"]]:
|
|
308
364
|
if data is None:
|
|
309
365
|
return data
|
|
366
|
+
if isinstance(data, Unset):
|
|
367
|
+
return data
|
|
310
368
|
try:
|
|
311
369
|
if not isinstance(data, list):
|
|
312
370
|
raise TypeError()
|
|
@@ -322,13 +380,15 @@ class RunResponse:
|
|
|
322
380
|
return run_message_history_type_0
|
|
323
381
|
except: # noqa: E722
|
|
324
382
|
pass
|
|
325
|
-
return cast(Union[None, list["RunResponseRunMessageHistoryType0Item"]], data)
|
|
383
|
+
return cast(Union[None, Unset, list["RunResponseRunMessageHistoryType0Item"]], data)
|
|
326
384
|
|
|
327
|
-
run_message_history = _parse_run_message_history(d.pop("run_message_history"))
|
|
385
|
+
run_message_history = _parse_run_message_history(d.pop("run_message_history", UNSET))
|
|
328
386
|
|
|
329
|
-
def _parse_input_values(data: object) -> Union["RunResponseInputValuesType0", None]:
|
|
387
|
+
def _parse_input_values(data: object) -> Union["RunResponseInputValuesType0", None, Unset]:
|
|
330
388
|
if data is None:
|
|
331
389
|
return data
|
|
390
|
+
if isinstance(data, Unset):
|
|
391
|
+
return data
|
|
332
392
|
try:
|
|
333
393
|
if not isinstance(data, dict):
|
|
334
394
|
raise TypeError()
|
|
@@ -337,37 +397,9 @@ class RunResponse:
|
|
|
337
397
|
return input_values_type_0
|
|
338
398
|
except: # noqa: E722
|
|
339
399
|
pass
|
|
340
|
-
return cast(Union["RunResponseInputValuesType0", None], data)
|
|
341
|
-
|
|
342
|
-
input_values = _parse_input_values(d.pop("input_values"))
|
|
400
|
+
return cast(Union["RunResponseInputValuesType0", None, Unset], data)
|
|
343
401
|
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
def _parse_user_id(data: object) -> Union[None, UUID, Unset]:
|
|
347
|
-
if data is None:
|
|
348
|
-
return data
|
|
349
|
-
if isinstance(data, Unset):
|
|
350
|
-
return data
|
|
351
|
-
try:
|
|
352
|
-
if not isinstance(data, str):
|
|
353
|
-
raise TypeError()
|
|
354
|
-
user_id_type_0 = UUID(data)
|
|
355
|
-
|
|
356
|
-
return user_id_type_0
|
|
357
|
-
except: # noqa: E722
|
|
358
|
-
pass
|
|
359
|
-
return cast(Union[None, UUID, Unset], data)
|
|
360
|
-
|
|
361
|
-
user_id = _parse_user_id(d.pop("user_id", UNSET))
|
|
362
|
-
|
|
363
|
-
def _parse_organization_id(data: object) -> Union[None, Unset, str]:
|
|
364
|
-
if data is None:
|
|
365
|
-
return data
|
|
366
|
-
if isinstance(data, Unset):
|
|
367
|
-
return data
|
|
368
|
-
return cast(Union[None, Unset, str], data)
|
|
369
|
-
|
|
370
|
-
organization_id = _parse_organization_id(d.pop("organization_id", UNSET))
|
|
402
|
+
input_values = _parse_input_values(d.pop("input_values", UNSET))
|
|
371
403
|
|
|
372
404
|
def _parse_pool_ids(data: object) -> Union[None, Unset, list[UUID]]:
|
|
373
405
|
if data is None:
|
|
@@ -448,15 +480,15 @@ class RunResponse:
|
|
|
448
480
|
machine_id=machine_id,
|
|
449
481
|
id=id,
|
|
450
482
|
status=status,
|
|
483
|
+
created_at=created_at,
|
|
484
|
+
user_id=user_id,
|
|
485
|
+
organization_id=organization_id,
|
|
451
486
|
error=error,
|
|
452
487
|
output_data=output_data,
|
|
453
488
|
input_attachment_ids=input_attachment_ids,
|
|
454
489
|
output_attachment_ids=output_attachment_ids,
|
|
455
490
|
run_message_history=run_message_history,
|
|
456
491
|
input_values=input_values,
|
|
457
|
-
created_at=created_at,
|
|
458
|
-
user_id=user_id,
|
|
459
|
-
organization_id=organization_id,
|
|
460
492
|
pool_ids=pool_ids,
|
|
461
493
|
sensitive_input_aliases=sensitive_input_aliases,
|
|
462
494
|
session_id=session_id,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|