cyberdesk 0.2.7__py3-none-any.whl → 1.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of cyberdesk might be problematic. Click here for more details.
- cyberdesk/__init__.py +45 -7
- cyberdesk/client.py +779 -70
- cyberdesk-1.2.0.dist-info/METADATA +274 -0
- cyberdesk-1.2.0.dist-info/RECORD +113 -0
- {cyberdesk-0.2.7.dist-info → cyberdesk-1.2.0.dist-info}/WHEEL +1 -1
- openapi_client/{api_reference_client → cyberdesk_cloud_client}/__init__.py +8 -8
- openapi_client/{api_reference_client → cyberdesk_cloud_client}/api/__init__.py +1 -1
- openapi_client/{api_reference_client/api/desktop → cyberdesk_cloud_client/api/computer}/__init__.py +1 -1
- openapi_client/cyberdesk_cloud_client/api/computer/get_display_dimensions_v1_computer_machine_id_display_dimensions_get.py +163 -0
- openapi_client/cyberdesk_cloud_client/api/computer/get_mouse_position_v1_computer_machine_id_input_mouse_position_get.py +163 -0
- openapi_client/cyberdesk_cloud_client/api/computer/get_screenshot_v1_computer_machine_id_display_screenshot_get.py +158 -0
- openapi_client/cyberdesk_cloud_client/api/computer/keyboard_key_v1_computer_machine_id_input_keyboard_key_post.py +183 -0
- openapi_client/cyberdesk_cloud_client/api/computer/keyboard_type_v1_computer_machine_id_input_keyboard_type_post.py +183 -0
- openapi_client/cyberdesk_cloud_client/api/computer/mouse_click_v1_computer_machine_id_input_mouse_click_post.py +187 -0
- openapi_client/cyberdesk_cloud_client/api/computer/mouse_move_v1_computer_machine_id_input_mouse_move_post.py +183 -0
- openapi_client/cyberdesk_cloud_client/api/connections/__init__.py +1 -0
- openapi_client/cyberdesk_cloud_client/api/connections/create_connection_v1_connections_post.py +180 -0
- openapi_client/cyberdesk_cloud_client/api/connections/delete_connection_v1_connections_connection_id_delete.py +170 -0
- openapi_client/cyberdesk_cloud_client/api/connections/get_connection_v1_connections_connection_id_get.py +172 -0
- openapi_client/cyberdesk_cloud_client/api/connections/list_connections_v1_connections_get.py +244 -0
- openapi_client/cyberdesk_cloud_client/api/connections/update_connection_v1_connections_connection_id_patch.py +198 -0
- openapi_client/cyberdesk_cloud_client/api/default/__init__.py +1 -0
- openapi_client/cyberdesk_cloud_client/api/default/root_get.py +83 -0
- openapi_client/cyberdesk_cloud_client/api/health/__init__.py +1 -0
- openapi_client/cyberdesk_cloud_client/api/health/database_health_check_v1_health_db_get.py +146 -0
- openapi_client/cyberdesk_cloud_client/api/health/health_check_v1_health_get.py +144 -0
- openapi_client/cyberdesk_cloud_client/api/machines/__init__.py +1 -0
- openapi_client/cyberdesk_cloud_client/api/machines/create_machine_v1_machines_post.py +180 -0
- openapi_client/cyberdesk_cloud_client/api/machines/delete_machine_v1_machines_machine_id_delete.py +174 -0
- openapi_client/cyberdesk_cloud_client/api/machines/get_machine_v1_machines_machine_id_get.py +172 -0
- openapi_client/cyberdesk_cloud_client/api/machines/list_machines_v1_machines_get.py +217 -0
- openapi_client/cyberdesk_cloud_client/api/machines/update_machine_v1_machines_machine_id_patch.py +198 -0
- openapi_client/cyberdesk_cloud_client/api/request_logs/__init__.py +1 -0
- openapi_client/cyberdesk_cloud_client/api/request_logs/create_request_log_v1_request_logs_post.py +184 -0
- openapi_client/cyberdesk_cloud_client/api/request_logs/delete_request_log_v1_request_logs_log_id_delete.py +170 -0
- openapi_client/cyberdesk_cloud_client/api/request_logs/get_request_log_v1_request_logs_log_id_get.py +172 -0
- openapi_client/cyberdesk_cloud_client/api/request_logs/list_request_logs_v1_request_logs_get.py +257 -0
- openapi_client/cyberdesk_cloud_client/api/request_logs/update_request_log_v1_request_logs_log_id_patch.py +202 -0
- openapi_client/cyberdesk_cloud_client/api/runs/__init__.py +1 -0
- openapi_client/cyberdesk_cloud_client/api/runs/create_run_v1_runs_post.py +188 -0
- openapi_client/cyberdesk_cloud_client/api/runs/delete_run_v1_runs_run_id_delete.py +170 -0
- openapi_client/cyberdesk_cloud_client/api/runs/get_run_v1_runs_run_id_get.py +176 -0
- openapi_client/cyberdesk_cloud_client/api/runs/list_runs_v1_runs_get.py +266 -0
- openapi_client/cyberdesk_cloud_client/api/runs/update_run_v1_runs_run_id_patch.py +202 -0
- openapi_client/cyberdesk_cloud_client/api/test/__init__.py +1 -0
- openapi_client/cyberdesk_cloud_client/api/test/dummy_test_endpoint_v1_test_post.py +156 -0
- openapi_client/cyberdesk_cloud_client/api/trajectories/__init__.py +1 -0
- openapi_client/cyberdesk_cloud_client/api/trajectories/create_trajectory_v1_trajectories_post.py +184 -0
- openapi_client/cyberdesk_cloud_client/api/trajectories/delete_trajectory_v1_trajectories_trajectory_id_delete.py +170 -0
- openapi_client/cyberdesk_cloud_client/api/trajectories/get_latest_trajectory_for_workflow_v1_workflows_workflow_id_latest_trajectory_get.py +176 -0
- openapi_client/cyberdesk_cloud_client/api/trajectories/get_trajectory_v1_trajectories_trajectory_id_get.py +176 -0
- openapi_client/cyberdesk_cloud_client/api/trajectories/list_trajectories_v1_trajectories_get.py +221 -0
- openapi_client/cyberdesk_cloud_client/api/trajectories/update_trajectory_v1_trajectories_trajectory_id_patch.py +198 -0
- openapi_client/cyberdesk_cloud_client/api/workflows/__init__.py +1 -0
- openapi_client/cyberdesk_cloud_client/api/workflows/create_workflow_v1_workflows_post.py +180 -0
- openapi_client/cyberdesk_cloud_client/api/workflows/delete_workflow_v1_workflows_workflow_id_delete.py +174 -0
- openapi_client/cyberdesk_cloud_client/api/workflows/get_workflow_v1_workflows_workflow_id_get.py +172 -0
- openapi_client/cyberdesk_cloud_client/api/workflows/get_workflow_versions_v1_workflows_workflow_id_versions_get.py +185 -0
- openapi_client/cyberdesk_cloud_client/api/workflows/list_workflows_v1_workflows_get.py +194 -0
- openapi_client/cyberdesk_cloud_client/api/workflows/update_workflow_v1_workflows_workflow_id_patch.py +202 -0
- openapi_client/{api_reference_client → cyberdesk_cloud_client}/client.py +268 -268
- openapi_client/{api_reference_client → cyberdesk_cloud_client}/errors.py +16 -16
- openapi_client/cyberdesk_cloud_client/models/__init__.py +105 -0
- openapi_client/cyberdesk_cloud_client/models/connection_create.py +111 -0
- openapi_client/cyberdesk_cloud_client/models/connection_response.py +171 -0
- openapi_client/{api_reference_client/models/get_v1_desktop_id_response_404_status.py → cyberdesk_cloud_client/models/connection_status.py} +10 -8
- openapi_client/cyberdesk_cloud_client/models/database_health_check_v1_health_db_get_response_database_health_check_v1_health_db_get.py +44 -0
- openapi_client/{api_reference_client/models/post_v1_desktop_id_bash_action_body.py → cyberdesk_cloud_client/models/display_dimensions.py} +67 -59
- openapi_client/cyberdesk_cloud_client/models/dummy_test_endpoint_v1_test_post_response_dummy_test_endpoint_v1_test_post.py +44 -0
- openapi_client/cyberdesk_cloud_client/models/get_workflow_versions_v1_workflows_workflow_id_versions_get_response_200_item.py +44 -0
- openapi_client/cyberdesk_cloud_client/models/health_check_v1_health_get_response_health_check_v1_health_get.py +44 -0
- openapi_client/cyberdesk_cloud_client/models/http_validation_error.py +75 -0
- openapi_client/{api_reference_client/models/post_v1_desktop_body.py → cyberdesk_cloud_client/models/keyboard_key_request.py} +59 -59
- openapi_client/{api_reference_client/models/post_v1_desktop_id_stop_response_200.py → cyberdesk_cloud_client/models/keyboard_type_request.py} +59 -62
- openapi_client/cyberdesk_cloud_client/models/machine_create.py +130 -0
- openapi_client/cyberdesk_cloud_client/models/machine_response.py +182 -0
- openapi_client/{api_reference_client/models/get_v1_desktop_id_response_403_status.py → cyberdesk_cloud_client/models/machine_status.py} +10 -8
- openapi_client/cyberdesk_cloud_client/models/machine_update.py +195 -0
- openapi_client/cyberdesk_cloud_client/models/mouse_click_request.py +109 -0
- openapi_client/{api_reference_client/models/post_v1_desktop_id_computer_action_drag_mouse_action_end.py → cyberdesk_cloud_client/models/mouse_move_request.py} +67 -71
- openapi_client/{api_reference_client/models/post_v1_desktop_id_computer_action_drag_mouse_action_start.py → cyberdesk_cloud_client/models/mouse_position.py} +67 -71
- openapi_client/cyberdesk_cloud_client/models/paginated_response.py +84 -0
- openapi_client/cyberdesk_cloud_client/models/paginated_response_connection_response.py +97 -0
- openapi_client/cyberdesk_cloud_client/models/paginated_response_machine_response.py +97 -0
- openapi_client/cyberdesk_cloud_client/models/paginated_response_run_response.py +97 -0
- openapi_client/cyberdesk_cloud_client/models/paginated_response_trajectory_response.py +97 -0
- openapi_client/cyberdesk_cloud_client/models/paginated_response_workflow_response.py +97 -0
- openapi_client/cyberdesk_cloud_client/models/request_log_create.py +187 -0
- openapi_client/cyberdesk_cloud_client/models/request_log_response.py +230 -0
- openapi_client/cyberdesk_cloud_client/models/request_log_update.py +164 -0
- openapi_client/cyberdesk_cloud_client/models/run_create.py +94 -0
- openapi_client/cyberdesk_cloud_client/models/run_response.py +245 -0
- openapi_client/cyberdesk_cloud_client/models/run_response_output_data_type_0.py +44 -0
- openapi_client/cyberdesk_cloud_client/models/run_response_run_message_history_type_0_item.py +44 -0
- openapi_client/{api_reference_client/models/post_v1_desktop_response_200_status.py → cyberdesk_cloud_client/models/run_status.py} +12 -11
- openapi_client/cyberdesk_cloud_client/models/run_update.py +226 -0
- openapi_client/cyberdesk_cloud_client/models/run_update_output_data_type_0.py +44 -0
- openapi_client/cyberdesk_cloud_client/models/run_update_run_message_history_type_0_item.py +44 -0
- openapi_client/cyberdesk_cloud_client/models/trajectory_create.py +83 -0
- openapi_client/cyberdesk_cloud_client/models/trajectory_create_trajectory_data_item.py +44 -0
- openapi_client/cyberdesk_cloud_client/models/trajectory_response.py +117 -0
- openapi_client/cyberdesk_cloud_client/models/trajectory_response_trajectory_data_item.py +44 -0
- openapi_client/cyberdesk_cloud_client/models/trajectory_update.py +99 -0
- openapi_client/cyberdesk_cloud_client/models/trajectory_update_trajectory_data_type_0_item.py +44 -0
- openapi_client/{api_reference_client/models/post_v1_desktop_id_computer_action_wait_action.py → cyberdesk_cloud_client/models/validation_error.py} +88 -70
- openapi_client/cyberdesk_cloud_client/models/workflow_create.py +82 -0
- openapi_client/cyberdesk_cloud_client/models/workflow_response.py +164 -0
- openapi_client/cyberdesk_cloud_client/models/workflow_response_old_versions_type_0_item.py +44 -0
- openapi_client/cyberdesk_cloud_client/models/workflow_update.py +92 -0
- openapi_client/{api_reference_client → cyberdesk_cloud_client}/types.py +54 -46
- cyberdesk/actions.py +0 -118
- cyberdesk/types.py +0 -50
- cyberdesk-0.2.7.dist-info/METADATA +0 -228
- cyberdesk-0.2.7.dist-info/RECORD +0 -136
- openapi_client/api_reference_client/api/desktop/get_v1_desktop_id.py +0 -293
- openapi_client/api_reference_client/api/desktop/post_v1_desktop.py +0 -294
- openapi_client/api_reference_client/api/desktop/post_v1_desktop_id_bash_action.py +0 -307
- openapi_client/api_reference_client/api/desktop/post_v1_desktop_id_computer_action.py +0 -419
- openapi_client/api_reference_client/api/desktop/post_v1_desktop_id_stop.py +0 -288
- openapi_client/api_reference_client/models/__init__.py +0 -249
- openapi_client/api_reference_client/models/get_v1_desktop_id_response_200.py +0 -104
- openapi_client/api_reference_client/models/get_v1_desktop_id_response_200_status.py +0 -11
- openapi_client/api_reference_client/models/get_v1_desktop_id_response_400.py +0 -69
- openapi_client/api_reference_client/models/get_v1_desktop_id_response_400_status.py +0 -8
- openapi_client/api_reference_client/models/get_v1_desktop_id_response_401.py +0 -69
- openapi_client/api_reference_client/models/get_v1_desktop_id_response_401_status.py +0 -8
- openapi_client/api_reference_client/models/get_v1_desktop_id_response_403.py +0 -69
- openapi_client/api_reference_client/models/get_v1_desktop_id_response_404.py +0 -69
- openapi_client/api_reference_client/models/get_v1_desktop_id_response_409.py +0 -69
- openapi_client/api_reference_client/models/get_v1_desktop_id_response_409_status.py +0 -8
- openapi_client/api_reference_client/models/get_v1_desktop_id_response_429.py +0 -69
- openapi_client/api_reference_client/models/get_v1_desktop_id_response_429_status.py +0 -8
- openapi_client/api_reference_client/models/get_v1_desktop_id_response_500.py +0 -69
- openapi_client/api_reference_client/models/get_v1_desktop_id_response_500_status.py +0 -8
- openapi_client/api_reference_client/models/get_v1_desktop_id_response_502.py +0 -69
- openapi_client/api_reference_client/models/get_v1_desktop_id_response_502_status.py +0 -8
- openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_200.py +0 -79
- openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_400.py +0 -69
- openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_400_status.py +0 -8
- openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_401.py +0 -69
- openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_401_status.py +0 -8
- openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_403.py +0 -69
- openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_403_status.py +0 -8
- openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_404.py +0 -69
- openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_404_status.py +0 -8
- openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_409.py +0 -69
- openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_409_status.py +0 -8
- openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_429.py +0 -69
- openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_429_status.py +0 -8
- openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_500.py +0 -69
- openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_500_status.py +0 -8
- openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_502.py +0 -69
- openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_502_status.py +0 -8
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_click_mouse_action.py +0 -133
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_click_mouse_action_button.py +0 -10
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_click_mouse_action_click_type.py +0 -10
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_click_mouse_action_type.py +0 -8
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_drag_mouse_action.py +0 -98
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_drag_mouse_action_type.py +0 -8
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_get_cursor_position_action.py +0 -64
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_get_cursor_position_action_type.py +0 -8
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_move_mouse_action.py +0 -80
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_move_mouse_action_type.py +0 -8
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_press_keys_action.py +0 -109
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_press_keys_action_key_action_type.py +0 -10
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_press_keys_action_type.py +0 -8
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_200.py +0 -79
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_400.py +0 -71
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_400_status.py +0 -8
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_401.py +0 -71
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_401_status.py +0 -8
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_403.py +0 -71
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_403_status.py +0 -8
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_404.py +0 -71
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_404_status.py +0 -8
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_409.py +0 -71
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_409_status.py +0 -8
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_429.py +0 -71
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_429_status.py +0 -8
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_500.py +0 -71
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_500_status.py +0 -8
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_502.py +0 -71
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_502_status.py +0 -8
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_screenshot_action.py +0 -63
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_screenshot_action_type.py +0 -8
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_scroll_action.py +0 -81
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_scroll_action_direction.py +0 -11
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_scroll_action_type.py +0 -8
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_type_text_action.py +0 -71
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_type_text_action_type.py +0 -8
- openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_wait_action_type.py +0 -8
- openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_200_status.py +0 -11
- openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_400.py +0 -69
- openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_400_status.py +0 -8
- openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_401.py +0 -69
- openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_401_status.py +0 -8
- openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_403.py +0 -69
- openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_403_status.py +0 -8
- openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_404.py +0 -69
- openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_404_status.py +0 -8
- openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_409.py +0 -69
- openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_409_status.py +0 -8
- openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_429.py +0 -69
- openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_429_status.py +0 -8
- openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_500.py +0 -69
- openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_500_status.py +0 -8
- openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_502.py +0 -69
- openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_502_status.py +0 -8
- openapi_client/api_reference_client/models/post_v1_desktop_response_200.py +0 -70
- openapi_client/api_reference_client/models/post_v1_desktop_response_400.py +0 -69
- openapi_client/api_reference_client/models/post_v1_desktop_response_400_status.py +0 -8
- openapi_client/api_reference_client/models/post_v1_desktop_response_401.py +0 -69
- openapi_client/api_reference_client/models/post_v1_desktop_response_401_status.py +0 -8
- openapi_client/api_reference_client/models/post_v1_desktop_response_403.py +0 -69
- openapi_client/api_reference_client/models/post_v1_desktop_response_403_status.py +0 -8
- openapi_client/api_reference_client/models/post_v1_desktop_response_404.py +0 -69
- openapi_client/api_reference_client/models/post_v1_desktop_response_404_status.py +0 -8
- openapi_client/api_reference_client/models/post_v1_desktop_response_409.py +0 -69
- openapi_client/api_reference_client/models/post_v1_desktop_response_409_status.py +0 -8
- openapi_client/api_reference_client/models/post_v1_desktop_response_429.py +0 -69
- openapi_client/api_reference_client/models/post_v1_desktop_response_429_status.py +0 -8
- openapi_client/api_reference_client/models/post_v1_desktop_response_500.py +0 -69
- openapi_client/api_reference_client/models/post_v1_desktop_response_500_status.py +0 -8
- openapi_client/api_reference_client/models/post_v1_desktop_response_502.py +0 -69
- openapi_client/api_reference_client/models/post_v1_desktop_response_502_status.py +0 -8
- {cyberdesk-0.2.7.dist-info → cyberdesk-1.2.0.dist-info}/licenses/LICENSE +0 -0
- {cyberdesk-0.2.7.dist-info → cyberdesk-1.2.0.dist-info}/top_level.txt +0 -0
- /openapi_client/{api_reference_client → cyberdesk_cloud_client}/py.typed +0 -0
|
@@ -0,0 +1,156 @@
|
|
|
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.dummy_test_endpoint_v1_test_post_response_dummy_test_endpoint_v1_test_post import (
|
|
9
|
+
DummyTestEndpointV1TestPostResponseDummyTestEndpointV1TestPost,
|
|
10
|
+
)
|
|
11
|
+
from ...types import Response
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _get_kwargs() -> dict[str, Any]:
|
|
15
|
+
_kwargs: dict[str, Any] = {
|
|
16
|
+
"method": "post",
|
|
17
|
+
"url": "/v1/test",
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return _kwargs
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def _parse_response(
|
|
24
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
25
|
+
) -> Optional[DummyTestEndpointV1TestPostResponseDummyTestEndpointV1TestPost]:
|
|
26
|
+
if response.status_code == 200:
|
|
27
|
+
response_200 = DummyTestEndpointV1TestPostResponseDummyTestEndpointV1TestPost.from_dict(response.json())
|
|
28
|
+
|
|
29
|
+
return response_200
|
|
30
|
+
if client.raise_on_unexpected_status:
|
|
31
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
32
|
+
else:
|
|
33
|
+
return None
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def _build_response(
|
|
37
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
38
|
+
) -> Response[DummyTestEndpointV1TestPostResponseDummyTestEndpointV1TestPost]:
|
|
39
|
+
return Response(
|
|
40
|
+
status_code=HTTPStatus(response.status_code),
|
|
41
|
+
content=response.content,
|
|
42
|
+
headers=response.headers,
|
|
43
|
+
parsed=_parse_response(client=client, response=response),
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def sync_detailed(
|
|
48
|
+
*,
|
|
49
|
+
client: AuthenticatedClient,
|
|
50
|
+
) -> Response[DummyTestEndpointV1TestPostResponseDummyTestEndpointV1TestPost]:
|
|
51
|
+
"""Dummy Test Endpoint
|
|
52
|
+
|
|
53
|
+
Test endpoint that performs a sequence of actions:
|
|
54
|
+
1. Click at three different places
|
|
55
|
+
2. Right click
|
|
56
|
+
3. Take a screenshot
|
|
57
|
+
|
|
58
|
+
Returns all action results and the screenshot base64.
|
|
59
|
+
|
|
60
|
+
Raises:
|
|
61
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
62
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
63
|
+
|
|
64
|
+
Returns:
|
|
65
|
+
Response[DummyTestEndpointV1TestPostResponseDummyTestEndpointV1TestPost]
|
|
66
|
+
"""
|
|
67
|
+
|
|
68
|
+
kwargs = _get_kwargs()
|
|
69
|
+
|
|
70
|
+
response = client.get_httpx_client().request(
|
|
71
|
+
**kwargs,
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
return _build_response(client=client, response=response)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def sync(
|
|
78
|
+
*,
|
|
79
|
+
client: AuthenticatedClient,
|
|
80
|
+
) -> Optional[DummyTestEndpointV1TestPostResponseDummyTestEndpointV1TestPost]:
|
|
81
|
+
"""Dummy Test Endpoint
|
|
82
|
+
|
|
83
|
+
Test endpoint that performs a sequence of actions:
|
|
84
|
+
1. Click at three different places
|
|
85
|
+
2. Right click
|
|
86
|
+
3. Take a screenshot
|
|
87
|
+
|
|
88
|
+
Returns all action results and the screenshot base64.
|
|
89
|
+
|
|
90
|
+
Raises:
|
|
91
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
92
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
93
|
+
|
|
94
|
+
Returns:
|
|
95
|
+
DummyTestEndpointV1TestPostResponseDummyTestEndpointV1TestPost
|
|
96
|
+
"""
|
|
97
|
+
|
|
98
|
+
return sync_detailed(
|
|
99
|
+
client=client,
|
|
100
|
+
).parsed
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
async def asyncio_detailed(
|
|
104
|
+
*,
|
|
105
|
+
client: AuthenticatedClient,
|
|
106
|
+
) -> Response[DummyTestEndpointV1TestPostResponseDummyTestEndpointV1TestPost]:
|
|
107
|
+
"""Dummy Test Endpoint
|
|
108
|
+
|
|
109
|
+
Test endpoint that performs a sequence of actions:
|
|
110
|
+
1. Click at three different places
|
|
111
|
+
2. Right click
|
|
112
|
+
3. Take a screenshot
|
|
113
|
+
|
|
114
|
+
Returns all action results and the screenshot base64.
|
|
115
|
+
|
|
116
|
+
Raises:
|
|
117
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
118
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
119
|
+
|
|
120
|
+
Returns:
|
|
121
|
+
Response[DummyTestEndpointV1TestPostResponseDummyTestEndpointV1TestPost]
|
|
122
|
+
"""
|
|
123
|
+
|
|
124
|
+
kwargs = _get_kwargs()
|
|
125
|
+
|
|
126
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
127
|
+
|
|
128
|
+
return _build_response(client=client, response=response)
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
async def asyncio(
|
|
132
|
+
*,
|
|
133
|
+
client: AuthenticatedClient,
|
|
134
|
+
) -> Optional[DummyTestEndpointV1TestPostResponseDummyTestEndpointV1TestPost]:
|
|
135
|
+
"""Dummy Test Endpoint
|
|
136
|
+
|
|
137
|
+
Test endpoint that performs a sequence of actions:
|
|
138
|
+
1. Click at three different places
|
|
139
|
+
2. Right click
|
|
140
|
+
3. Take a screenshot
|
|
141
|
+
|
|
142
|
+
Returns all action results and the screenshot base64.
|
|
143
|
+
|
|
144
|
+
Raises:
|
|
145
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
146
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
147
|
+
|
|
148
|
+
Returns:
|
|
149
|
+
DummyTestEndpointV1TestPostResponseDummyTestEndpointV1TestPost
|
|
150
|
+
"""
|
|
151
|
+
|
|
152
|
+
return (
|
|
153
|
+
await asyncio_detailed(
|
|
154
|
+
client=client,
|
|
155
|
+
)
|
|
156
|
+
).parsed
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Contains endpoint functions for accessing the API"""
|
openapi_client/cyberdesk_cloud_client/api/trajectories/create_trajectory_v1_trajectories_post.py
ADDED
|
@@ -0,0 +1,184 @@
|
|
|
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.http_validation_error import HTTPValidationError
|
|
9
|
+
from ...models.trajectory_create import TrajectoryCreate
|
|
10
|
+
from ...models.trajectory_response import TrajectoryResponse
|
|
11
|
+
from ...types import Response
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _get_kwargs(
|
|
15
|
+
*,
|
|
16
|
+
body: TrajectoryCreate,
|
|
17
|
+
) -> dict[str, Any]:
|
|
18
|
+
headers: dict[str, Any] = {}
|
|
19
|
+
|
|
20
|
+
_kwargs: dict[str, Any] = {
|
|
21
|
+
"method": "post",
|
|
22
|
+
"url": "/v1/trajectories",
|
|
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[HTTPValidationError, TrajectoryResponse]]:
|
|
36
|
+
if response.status_code == 201:
|
|
37
|
+
response_201 = TrajectoryResponse.from_dict(response.json())
|
|
38
|
+
|
|
39
|
+
return response_201
|
|
40
|
+
if response.status_code == 422:
|
|
41
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
42
|
+
|
|
43
|
+
return response_422
|
|
44
|
+
if client.raise_on_unexpected_status:
|
|
45
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
46
|
+
else:
|
|
47
|
+
return None
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def _build_response(
|
|
51
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
52
|
+
) -> Response[Union[HTTPValidationError, TrajectoryResponse]]:
|
|
53
|
+
return Response(
|
|
54
|
+
status_code=HTTPStatus(response.status_code),
|
|
55
|
+
content=response.content,
|
|
56
|
+
headers=response.headers,
|
|
57
|
+
parsed=_parse_response(client=client, response=response),
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def sync_detailed(
|
|
62
|
+
*,
|
|
63
|
+
client: AuthenticatedClient,
|
|
64
|
+
body: TrajectoryCreate,
|
|
65
|
+
) -> Response[Union[HTTPValidationError, TrajectoryResponse]]:
|
|
66
|
+
"""Create Trajectory
|
|
67
|
+
|
|
68
|
+
Create a new trajectory for a workflow.
|
|
69
|
+
|
|
70
|
+
The workflow must exist and belong to the authenticated user.
|
|
71
|
+
The trajectory_data must contain at least one item.
|
|
72
|
+
|
|
73
|
+
Args:
|
|
74
|
+
body (TrajectoryCreate): Schema for creating a trajectory
|
|
75
|
+
|
|
76
|
+
Raises:
|
|
77
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
78
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
79
|
+
|
|
80
|
+
Returns:
|
|
81
|
+
Response[Union[HTTPValidationError, TrajectoryResponse]]
|
|
82
|
+
"""
|
|
83
|
+
|
|
84
|
+
kwargs = _get_kwargs(
|
|
85
|
+
body=body,
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
response = client.get_httpx_client().request(
|
|
89
|
+
**kwargs,
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
return _build_response(client=client, response=response)
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
def sync(
|
|
96
|
+
*,
|
|
97
|
+
client: AuthenticatedClient,
|
|
98
|
+
body: TrajectoryCreate,
|
|
99
|
+
) -> Optional[Union[HTTPValidationError, TrajectoryResponse]]:
|
|
100
|
+
"""Create Trajectory
|
|
101
|
+
|
|
102
|
+
Create a new trajectory for a workflow.
|
|
103
|
+
|
|
104
|
+
The workflow must exist and belong to the authenticated user.
|
|
105
|
+
The trajectory_data must contain at least one item.
|
|
106
|
+
|
|
107
|
+
Args:
|
|
108
|
+
body (TrajectoryCreate): Schema for creating a trajectory
|
|
109
|
+
|
|
110
|
+
Raises:
|
|
111
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
112
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
113
|
+
|
|
114
|
+
Returns:
|
|
115
|
+
Union[HTTPValidationError, TrajectoryResponse]
|
|
116
|
+
"""
|
|
117
|
+
|
|
118
|
+
return sync_detailed(
|
|
119
|
+
client=client,
|
|
120
|
+
body=body,
|
|
121
|
+
).parsed
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
async def asyncio_detailed(
|
|
125
|
+
*,
|
|
126
|
+
client: AuthenticatedClient,
|
|
127
|
+
body: TrajectoryCreate,
|
|
128
|
+
) -> Response[Union[HTTPValidationError, TrajectoryResponse]]:
|
|
129
|
+
"""Create Trajectory
|
|
130
|
+
|
|
131
|
+
Create a new trajectory for a workflow.
|
|
132
|
+
|
|
133
|
+
The workflow must exist and belong to the authenticated user.
|
|
134
|
+
The trajectory_data must contain at least one item.
|
|
135
|
+
|
|
136
|
+
Args:
|
|
137
|
+
body (TrajectoryCreate): Schema for creating a trajectory
|
|
138
|
+
|
|
139
|
+
Raises:
|
|
140
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
141
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
142
|
+
|
|
143
|
+
Returns:
|
|
144
|
+
Response[Union[HTTPValidationError, TrajectoryResponse]]
|
|
145
|
+
"""
|
|
146
|
+
|
|
147
|
+
kwargs = _get_kwargs(
|
|
148
|
+
body=body,
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
152
|
+
|
|
153
|
+
return _build_response(client=client, response=response)
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
async def asyncio(
|
|
157
|
+
*,
|
|
158
|
+
client: AuthenticatedClient,
|
|
159
|
+
body: TrajectoryCreate,
|
|
160
|
+
) -> Optional[Union[HTTPValidationError, TrajectoryResponse]]:
|
|
161
|
+
"""Create Trajectory
|
|
162
|
+
|
|
163
|
+
Create a new trajectory for a workflow.
|
|
164
|
+
|
|
165
|
+
The workflow must exist and belong to the authenticated user.
|
|
166
|
+
The trajectory_data must contain at least one item.
|
|
167
|
+
|
|
168
|
+
Args:
|
|
169
|
+
body (TrajectoryCreate): Schema for creating a trajectory
|
|
170
|
+
|
|
171
|
+
Raises:
|
|
172
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
173
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
174
|
+
|
|
175
|
+
Returns:
|
|
176
|
+
Union[HTTPValidationError, TrajectoryResponse]
|
|
177
|
+
"""
|
|
178
|
+
|
|
179
|
+
return (
|
|
180
|
+
await asyncio_detailed(
|
|
181
|
+
client=client,
|
|
182
|
+
body=body,
|
|
183
|
+
)
|
|
184
|
+
).parsed
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Optional, Union, cast
|
|
3
|
+
from uuid import UUID
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
from ... import errors
|
|
8
|
+
from ...client import AuthenticatedClient, Client
|
|
9
|
+
from ...models.http_validation_error import HTTPValidationError
|
|
10
|
+
from ...types import Response
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def _get_kwargs(
|
|
14
|
+
trajectory_id: UUID,
|
|
15
|
+
) -> dict[str, Any]:
|
|
16
|
+
_kwargs: dict[str, Any] = {
|
|
17
|
+
"method": "delete",
|
|
18
|
+
"url": f"/v1/trajectories/{trajectory_id}",
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return _kwargs
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def _parse_response(
|
|
25
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
26
|
+
) -> Optional[Union[Any, HTTPValidationError]]:
|
|
27
|
+
if response.status_code == 204:
|
|
28
|
+
response_204 = cast(Any, None)
|
|
29
|
+
return response_204
|
|
30
|
+
if response.status_code == 422:
|
|
31
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
32
|
+
|
|
33
|
+
return response_422
|
|
34
|
+
if client.raise_on_unexpected_status:
|
|
35
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
36
|
+
else:
|
|
37
|
+
return None
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def _build_response(
|
|
41
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
42
|
+
) -> Response[Union[Any, HTTPValidationError]]:
|
|
43
|
+
return Response(
|
|
44
|
+
status_code=HTTPStatus(response.status_code),
|
|
45
|
+
content=response.content,
|
|
46
|
+
headers=response.headers,
|
|
47
|
+
parsed=_parse_response(client=client, response=response),
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def sync_detailed(
|
|
52
|
+
trajectory_id: UUID,
|
|
53
|
+
*,
|
|
54
|
+
client: AuthenticatedClient,
|
|
55
|
+
) -> Response[Union[Any, HTTPValidationError]]:
|
|
56
|
+
"""Delete Trajectory
|
|
57
|
+
|
|
58
|
+
Delete a trajectory.
|
|
59
|
+
|
|
60
|
+
The trajectory must belong to the authenticated user.
|
|
61
|
+
|
|
62
|
+
Args:
|
|
63
|
+
trajectory_id (UUID):
|
|
64
|
+
|
|
65
|
+
Raises:
|
|
66
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
67
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
68
|
+
|
|
69
|
+
Returns:
|
|
70
|
+
Response[Union[Any, HTTPValidationError]]
|
|
71
|
+
"""
|
|
72
|
+
|
|
73
|
+
kwargs = _get_kwargs(
|
|
74
|
+
trajectory_id=trajectory_id,
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
response = client.get_httpx_client().request(
|
|
78
|
+
**kwargs,
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
return _build_response(client=client, response=response)
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
def sync(
|
|
85
|
+
trajectory_id: UUID,
|
|
86
|
+
*,
|
|
87
|
+
client: AuthenticatedClient,
|
|
88
|
+
) -> Optional[Union[Any, HTTPValidationError]]:
|
|
89
|
+
"""Delete Trajectory
|
|
90
|
+
|
|
91
|
+
Delete a trajectory.
|
|
92
|
+
|
|
93
|
+
The trajectory must belong to the authenticated user.
|
|
94
|
+
|
|
95
|
+
Args:
|
|
96
|
+
trajectory_id (UUID):
|
|
97
|
+
|
|
98
|
+
Raises:
|
|
99
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
100
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
101
|
+
|
|
102
|
+
Returns:
|
|
103
|
+
Union[Any, HTTPValidationError]
|
|
104
|
+
"""
|
|
105
|
+
|
|
106
|
+
return sync_detailed(
|
|
107
|
+
trajectory_id=trajectory_id,
|
|
108
|
+
client=client,
|
|
109
|
+
).parsed
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
async def asyncio_detailed(
|
|
113
|
+
trajectory_id: UUID,
|
|
114
|
+
*,
|
|
115
|
+
client: AuthenticatedClient,
|
|
116
|
+
) -> Response[Union[Any, HTTPValidationError]]:
|
|
117
|
+
"""Delete Trajectory
|
|
118
|
+
|
|
119
|
+
Delete a trajectory.
|
|
120
|
+
|
|
121
|
+
The trajectory must belong to the authenticated user.
|
|
122
|
+
|
|
123
|
+
Args:
|
|
124
|
+
trajectory_id (UUID):
|
|
125
|
+
|
|
126
|
+
Raises:
|
|
127
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
128
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
129
|
+
|
|
130
|
+
Returns:
|
|
131
|
+
Response[Union[Any, HTTPValidationError]]
|
|
132
|
+
"""
|
|
133
|
+
|
|
134
|
+
kwargs = _get_kwargs(
|
|
135
|
+
trajectory_id=trajectory_id,
|
|
136
|
+
)
|
|
137
|
+
|
|
138
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
139
|
+
|
|
140
|
+
return _build_response(client=client, response=response)
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
async def asyncio(
|
|
144
|
+
trajectory_id: UUID,
|
|
145
|
+
*,
|
|
146
|
+
client: AuthenticatedClient,
|
|
147
|
+
) -> Optional[Union[Any, HTTPValidationError]]:
|
|
148
|
+
"""Delete Trajectory
|
|
149
|
+
|
|
150
|
+
Delete a trajectory.
|
|
151
|
+
|
|
152
|
+
The trajectory must belong to the authenticated user.
|
|
153
|
+
|
|
154
|
+
Args:
|
|
155
|
+
trajectory_id (UUID):
|
|
156
|
+
|
|
157
|
+
Raises:
|
|
158
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
159
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
160
|
+
|
|
161
|
+
Returns:
|
|
162
|
+
Union[Any, HTTPValidationError]
|
|
163
|
+
"""
|
|
164
|
+
|
|
165
|
+
return (
|
|
166
|
+
await asyncio_detailed(
|
|
167
|
+
trajectory_id=trajectory_id,
|
|
168
|
+
client=client,
|
|
169
|
+
)
|
|
170
|
+
).parsed
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Optional, Union
|
|
3
|
+
from uuid import UUID
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
from ... import errors
|
|
8
|
+
from ...client import AuthenticatedClient, Client
|
|
9
|
+
from ...models.http_validation_error import HTTPValidationError
|
|
10
|
+
from ...models.trajectory_response import TrajectoryResponse
|
|
11
|
+
from ...types import Response
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _get_kwargs(
|
|
15
|
+
workflow_id: UUID,
|
|
16
|
+
) -> dict[str, Any]:
|
|
17
|
+
_kwargs: dict[str, Any] = {
|
|
18
|
+
"method": "get",
|
|
19
|
+
"url": f"/v1/workflows/{workflow_id}/latest-trajectory",
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
return _kwargs
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def _parse_response(
|
|
26
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
27
|
+
) -> Optional[Union[HTTPValidationError, TrajectoryResponse]]:
|
|
28
|
+
if response.status_code == 200:
|
|
29
|
+
response_200 = TrajectoryResponse.from_dict(response.json())
|
|
30
|
+
|
|
31
|
+
return response_200
|
|
32
|
+
if response.status_code == 422:
|
|
33
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
34
|
+
|
|
35
|
+
return response_422
|
|
36
|
+
if client.raise_on_unexpected_status:
|
|
37
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
38
|
+
else:
|
|
39
|
+
return None
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def _build_response(
|
|
43
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
44
|
+
) -> Response[Union[HTTPValidationError, TrajectoryResponse]]:
|
|
45
|
+
return Response(
|
|
46
|
+
status_code=HTTPStatus(response.status_code),
|
|
47
|
+
content=response.content,
|
|
48
|
+
headers=response.headers,
|
|
49
|
+
parsed=_parse_response(client=client, response=response),
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def sync_detailed(
|
|
54
|
+
workflow_id: UUID,
|
|
55
|
+
*,
|
|
56
|
+
client: AuthenticatedClient,
|
|
57
|
+
) -> Response[Union[HTTPValidationError, TrajectoryResponse]]:
|
|
58
|
+
"""Get Latest Trajectory For Workflow
|
|
59
|
+
|
|
60
|
+
Get the latest trajectory for a specific workflow.
|
|
61
|
+
|
|
62
|
+
Returns the most recently updated trajectory for the workflow.
|
|
63
|
+
The workflow must belong to the authenticated user.
|
|
64
|
+
|
|
65
|
+
Args:
|
|
66
|
+
workflow_id (UUID):
|
|
67
|
+
|
|
68
|
+
Raises:
|
|
69
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
70
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
71
|
+
|
|
72
|
+
Returns:
|
|
73
|
+
Response[Union[HTTPValidationError, TrajectoryResponse]]
|
|
74
|
+
"""
|
|
75
|
+
|
|
76
|
+
kwargs = _get_kwargs(
|
|
77
|
+
workflow_id=workflow_id,
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
response = client.get_httpx_client().request(
|
|
81
|
+
**kwargs,
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
return _build_response(client=client, response=response)
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
def sync(
|
|
88
|
+
workflow_id: UUID,
|
|
89
|
+
*,
|
|
90
|
+
client: AuthenticatedClient,
|
|
91
|
+
) -> Optional[Union[HTTPValidationError, TrajectoryResponse]]:
|
|
92
|
+
"""Get Latest Trajectory For Workflow
|
|
93
|
+
|
|
94
|
+
Get the latest trajectory for a specific workflow.
|
|
95
|
+
|
|
96
|
+
Returns the most recently updated trajectory for the workflow.
|
|
97
|
+
The workflow must belong to the authenticated user.
|
|
98
|
+
|
|
99
|
+
Args:
|
|
100
|
+
workflow_id (UUID):
|
|
101
|
+
|
|
102
|
+
Raises:
|
|
103
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
104
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
105
|
+
|
|
106
|
+
Returns:
|
|
107
|
+
Union[HTTPValidationError, TrajectoryResponse]
|
|
108
|
+
"""
|
|
109
|
+
|
|
110
|
+
return sync_detailed(
|
|
111
|
+
workflow_id=workflow_id,
|
|
112
|
+
client=client,
|
|
113
|
+
).parsed
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
async def asyncio_detailed(
|
|
117
|
+
workflow_id: UUID,
|
|
118
|
+
*,
|
|
119
|
+
client: AuthenticatedClient,
|
|
120
|
+
) -> Response[Union[HTTPValidationError, TrajectoryResponse]]:
|
|
121
|
+
"""Get Latest Trajectory For Workflow
|
|
122
|
+
|
|
123
|
+
Get the latest trajectory for a specific workflow.
|
|
124
|
+
|
|
125
|
+
Returns the most recently updated trajectory for the workflow.
|
|
126
|
+
The workflow must belong to the authenticated user.
|
|
127
|
+
|
|
128
|
+
Args:
|
|
129
|
+
workflow_id (UUID):
|
|
130
|
+
|
|
131
|
+
Raises:
|
|
132
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
133
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
134
|
+
|
|
135
|
+
Returns:
|
|
136
|
+
Response[Union[HTTPValidationError, TrajectoryResponse]]
|
|
137
|
+
"""
|
|
138
|
+
|
|
139
|
+
kwargs = _get_kwargs(
|
|
140
|
+
workflow_id=workflow_id,
|
|
141
|
+
)
|
|
142
|
+
|
|
143
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
144
|
+
|
|
145
|
+
return _build_response(client=client, response=response)
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
async def asyncio(
|
|
149
|
+
workflow_id: UUID,
|
|
150
|
+
*,
|
|
151
|
+
client: AuthenticatedClient,
|
|
152
|
+
) -> Optional[Union[HTTPValidationError, TrajectoryResponse]]:
|
|
153
|
+
"""Get Latest Trajectory For Workflow
|
|
154
|
+
|
|
155
|
+
Get the latest trajectory for a specific workflow.
|
|
156
|
+
|
|
157
|
+
Returns the most recently updated trajectory for the workflow.
|
|
158
|
+
The workflow must belong to the authenticated user.
|
|
159
|
+
|
|
160
|
+
Args:
|
|
161
|
+
workflow_id (UUID):
|
|
162
|
+
|
|
163
|
+
Raises:
|
|
164
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
165
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
166
|
+
|
|
167
|
+
Returns:
|
|
168
|
+
Union[HTTPValidationError, TrajectoryResponse]
|
|
169
|
+
"""
|
|
170
|
+
|
|
171
|
+
return (
|
|
172
|
+
await asyncio_detailed(
|
|
173
|
+
workflow_id=workflow_id,
|
|
174
|
+
client=client,
|
|
175
|
+
)
|
|
176
|
+
).parsed
|