cyberdesk 0.2.6__py3-none-any.whl → 1.0.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.0.0.dist-info/METADATA +274 -0
- cyberdesk-1.0.0.dist-info/RECORD +114 -0
- {cyberdesk-0.2.6.dist-info → cyberdesk-1.0.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 +107 -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/connection_update.py +145 -0
- 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 +228 -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 -38
- cyberdesk/types.py +0 -50
- cyberdesk-0.2.6.dist-info/METADATA +0 -226
- cyberdesk-0.2.6.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.6.dist-info → cyberdesk-1.0.0.dist-info}/licenses/LICENSE +0 -0
- {cyberdesk-0.2.6.dist-info → cyberdesk-1.0.0.dist-info}/top_level.txt +0 -0
- /openapi_client/{api_reference_client → cyberdesk_cloud_client}/py.typed +0 -0
|
@@ -0,0 +1,180 @@
|
|
|
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.workflow_create import WorkflowCreate
|
|
10
|
+
from ...models.workflow_response import WorkflowResponse
|
|
11
|
+
from ...types import Response
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _get_kwargs(
|
|
15
|
+
*,
|
|
16
|
+
body: WorkflowCreate,
|
|
17
|
+
) -> dict[str, Any]:
|
|
18
|
+
headers: dict[str, Any] = {}
|
|
19
|
+
|
|
20
|
+
_kwargs: dict[str, Any] = {
|
|
21
|
+
"method": "post",
|
|
22
|
+
"url": "/v1/workflows",
|
|
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, WorkflowResponse]]:
|
|
36
|
+
if response.status_code == 201:
|
|
37
|
+
response_201 = WorkflowResponse.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, WorkflowResponse]]:
|
|
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: WorkflowCreate,
|
|
65
|
+
) -> Response[Union[HTTPValidationError, WorkflowResponse]]:
|
|
66
|
+
"""Create Workflow
|
|
67
|
+
|
|
68
|
+
Create a new workflow.
|
|
69
|
+
|
|
70
|
+
The workflow will be associated with the authenticated user.
|
|
71
|
+
|
|
72
|
+
Args:
|
|
73
|
+
body (WorkflowCreate): Schema for creating a workflow
|
|
74
|
+
|
|
75
|
+
Raises:
|
|
76
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
77
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
78
|
+
|
|
79
|
+
Returns:
|
|
80
|
+
Response[Union[HTTPValidationError, WorkflowResponse]]
|
|
81
|
+
"""
|
|
82
|
+
|
|
83
|
+
kwargs = _get_kwargs(
|
|
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
|
+
*,
|
|
96
|
+
client: AuthenticatedClient,
|
|
97
|
+
body: WorkflowCreate,
|
|
98
|
+
) -> Optional[Union[HTTPValidationError, WorkflowResponse]]:
|
|
99
|
+
"""Create Workflow
|
|
100
|
+
|
|
101
|
+
Create a new workflow.
|
|
102
|
+
|
|
103
|
+
The workflow will be associated with the authenticated user.
|
|
104
|
+
|
|
105
|
+
Args:
|
|
106
|
+
body (WorkflowCreate): Schema for creating a workflow
|
|
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[HTTPValidationError, WorkflowResponse]
|
|
114
|
+
"""
|
|
115
|
+
|
|
116
|
+
return sync_detailed(
|
|
117
|
+
client=client,
|
|
118
|
+
body=body,
|
|
119
|
+
).parsed
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
async def asyncio_detailed(
|
|
123
|
+
*,
|
|
124
|
+
client: AuthenticatedClient,
|
|
125
|
+
body: WorkflowCreate,
|
|
126
|
+
) -> Response[Union[HTTPValidationError, WorkflowResponse]]:
|
|
127
|
+
"""Create Workflow
|
|
128
|
+
|
|
129
|
+
Create a new workflow.
|
|
130
|
+
|
|
131
|
+
The workflow will be associated with the authenticated user.
|
|
132
|
+
|
|
133
|
+
Args:
|
|
134
|
+
body (WorkflowCreate): Schema for creating a workflow
|
|
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
|
+
Response[Union[HTTPValidationError, WorkflowResponse]]
|
|
142
|
+
"""
|
|
143
|
+
|
|
144
|
+
kwargs = _get_kwargs(
|
|
145
|
+
body=body,
|
|
146
|
+
)
|
|
147
|
+
|
|
148
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
149
|
+
|
|
150
|
+
return _build_response(client=client, response=response)
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
async def asyncio(
|
|
154
|
+
*,
|
|
155
|
+
client: AuthenticatedClient,
|
|
156
|
+
body: WorkflowCreate,
|
|
157
|
+
) -> Optional[Union[HTTPValidationError, WorkflowResponse]]:
|
|
158
|
+
"""Create Workflow
|
|
159
|
+
|
|
160
|
+
Create a new workflow.
|
|
161
|
+
|
|
162
|
+
The workflow will be associated with the authenticated user.
|
|
163
|
+
|
|
164
|
+
Args:
|
|
165
|
+
body (WorkflowCreate): Schema for creating a workflow
|
|
166
|
+
|
|
167
|
+
Raises:
|
|
168
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
169
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
170
|
+
|
|
171
|
+
Returns:
|
|
172
|
+
Union[HTTPValidationError, WorkflowResponse]
|
|
173
|
+
"""
|
|
174
|
+
|
|
175
|
+
return (
|
|
176
|
+
await asyncio_detailed(
|
|
177
|
+
client=client,
|
|
178
|
+
body=body,
|
|
179
|
+
)
|
|
180
|
+
).parsed
|
|
@@ -0,0 +1,174 @@
|
|
|
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
|
+
workflow_id: UUID,
|
|
15
|
+
) -> dict[str, Any]:
|
|
16
|
+
_kwargs: dict[str, Any] = {
|
|
17
|
+
"method": "delete",
|
|
18
|
+
"url": f"/v1/workflows/{workflow_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
|
+
workflow_id: UUID,
|
|
53
|
+
*,
|
|
54
|
+
client: AuthenticatedClient,
|
|
55
|
+
) -> Response[Union[Any, HTTPValidationError]]:
|
|
56
|
+
"""Delete Workflow
|
|
57
|
+
|
|
58
|
+
Delete a workflow.
|
|
59
|
+
|
|
60
|
+
This will also delete all associated runs and trajectories.
|
|
61
|
+
The workflow must belong to the authenticated user.
|
|
62
|
+
|
|
63
|
+
Args:
|
|
64
|
+
workflow_id (UUID):
|
|
65
|
+
|
|
66
|
+
Raises:
|
|
67
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
68
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
69
|
+
|
|
70
|
+
Returns:
|
|
71
|
+
Response[Union[Any, HTTPValidationError]]
|
|
72
|
+
"""
|
|
73
|
+
|
|
74
|
+
kwargs = _get_kwargs(
|
|
75
|
+
workflow_id=workflow_id,
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
response = client.get_httpx_client().request(
|
|
79
|
+
**kwargs,
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
return _build_response(client=client, response=response)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def sync(
|
|
86
|
+
workflow_id: UUID,
|
|
87
|
+
*,
|
|
88
|
+
client: AuthenticatedClient,
|
|
89
|
+
) -> Optional[Union[Any, HTTPValidationError]]:
|
|
90
|
+
"""Delete Workflow
|
|
91
|
+
|
|
92
|
+
Delete a workflow.
|
|
93
|
+
|
|
94
|
+
This will also delete all associated runs and trajectories.
|
|
95
|
+
The workflow must belong to the authenticated user.
|
|
96
|
+
|
|
97
|
+
Args:
|
|
98
|
+
workflow_id (UUID):
|
|
99
|
+
|
|
100
|
+
Raises:
|
|
101
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
102
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
103
|
+
|
|
104
|
+
Returns:
|
|
105
|
+
Union[Any, HTTPValidationError]
|
|
106
|
+
"""
|
|
107
|
+
|
|
108
|
+
return sync_detailed(
|
|
109
|
+
workflow_id=workflow_id,
|
|
110
|
+
client=client,
|
|
111
|
+
).parsed
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
async def asyncio_detailed(
|
|
115
|
+
workflow_id: UUID,
|
|
116
|
+
*,
|
|
117
|
+
client: AuthenticatedClient,
|
|
118
|
+
) -> Response[Union[Any, HTTPValidationError]]:
|
|
119
|
+
"""Delete Workflow
|
|
120
|
+
|
|
121
|
+
Delete a workflow.
|
|
122
|
+
|
|
123
|
+
This will also delete all associated runs and trajectories.
|
|
124
|
+
The workflow must belong to the authenticated user.
|
|
125
|
+
|
|
126
|
+
Args:
|
|
127
|
+
workflow_id (UUID):
|
|
128
|
+
|
|
129
|
+
Raises:
|
|
130
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
131
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
132
|
+
|
|
133
|
+
Returns:
|
|
134
|
+
Response[Union[Any, HTTPValidationError]]
|
|
135
|
+
"""
|
|
136
|
+
|
|
137
|
+
kwargs = _get_kwargs(
|
|
138
|
+
workflow_id=workflow_id,
|
|
139
|
+
)
|
|
140
|
+
|
|
141
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
142
|
+
|
|
143
|
+
return _build_response(client=client, response=response)
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
async def asyncio(
|
|
147
|
+
workflow_id: UUID,
|
|
148
|
+
*,
|
|
149
|
+
client: AuthenticatedClient,
|
|
150
|
+
) -> Optional[Union[Any, HTTPValidationError]]:
|
|
151
|
+
"""Delete Workflow
|
|
152
|
+
|
|
153
|
+
Delete a workflow.
|
|
154
|
+
|
|
155
|
+
This will also delete all associated runs and trajectories.
|
|
156
|
+
The workflow must belong to the authenticated user.
|
|
157
|
+
|
|
158
|
+
Args:
|
|
159
|
+
workflow_id (UUID):
|
|
160
|
+
|
|
161
|
+
Raises:
|
|
162
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
163
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
164
|
+
|
|
165
|
+
Returns:
|
|
166
|
+
Union[Any, HTTPValidationError]
|
|
167
|
+
"""
|
|
168
|
+
|
|
169
|
+
return (
|
|
170
|
+
await asyncio_detailed(
|
|
171
|
+
workflow_id=workflow_id,
|
|
172
|
+
client=client,
|
|
173
|
+
)
|
|
174
|
+
).parsed
|
openapi_client/cyberdesk_cloud_client/api/workflows/get_workflow_v1_workflows_workflow_id_get.py
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
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.workflow_response import WorkflowResponse
|
|
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}",
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
return _kwargs
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def _parse_response(
|
|
26
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
27
|
+
) -> Optional[Union[HTTPValidationError, WorkflowResponse]]:
|
|
28
|
+
if response.status_code == 200:
|
|
29
|
+
response_200 = WorkflowResponse.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, WorkflowResponse]]:
|
|
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, WorkflowResponse]]:
|
|
58
|
+
"""Get Workflow
|
|
59
|
+
|
|
60
|
+
Get a specific workflow by ID.
|
|
61
|
+
|
|
62
|
+
The workflow must belong to the authenticated user.
|
|
63
|
+
|
|
64
|
+
Args:
|
|
65
|
+
workflow_id (UUID):
|
|
66
|
+
|
|
67
|
+
Raises:
|
|
68
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
69
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
70
|
+
|
|
71
|
+
Returns:
|
|
72
|
+
Response[Union[HTTPValidationError, WorkflowResponse]]
|
|
73
|
+
"""
|
|
74
|
+
|
|
75
|
+
kwargs = _get_kwargs(
|
|
76
|
+
workflow_id=workflow_id,
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
response = client.get_httpx_client().request(
|
|
80
|
+
**kwargs,
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
return _build_response(client=client, response=response)
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
def sync(
|
|
87
|
+
workflow_id: UUID,
|
|
88
|
+
*,
|
|
89
|
+
client: AuthenticatedClient,
|
|
90
|
+
) -> Optional[Union[HTTPValidationError, WorkflowResponse]]:
|
|
91
|
+
"""Get Workflow
|
|
92
|
+
|
|
93
|
+
Get a specific workflow by ID.
|
|
94
|
+
|
|
95
|
+
The workflow must belong to the authenticated user.
|
|
96
|
+
|
|
97
|
+
Args:
|
|
98
|
+
workflow_id (UUID):
|
|
99
|
+
|
|
100
|
+
Raises:
|
|
101
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
102
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
103
|
+
|
|
104
|
+
Returns:
|
|
105
|
+
Union[HTTPValidationError, WorkflowResponse]
|
|
106
|
+
"""
|
|
107
|
+
|
|
108
|
+
return sync_detailed(
|
|
109
|
+
workflow_id=workflow_id,
|
|
110
|
+
client=client,
|
|
111
|
+
).parsed
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
async def asyncio_detailed(
|
|
115
|
+
workflow_id: UUID,
|
|
116
|
+
*,
|
|
117
|
+
client: AuthenticatedClient,
|
|
118
|
+
) -> Response[Union[HTTPValidationError, WorkflowResponse]]:
|
|
119
|
+
"""Get Workflow
|
|
120
|
+
|
|
121
|
+
Get a specific workflow by ID.
|
|
122
|
+
|
|
123
|
+
The workflow must belong to the authenticated user.
|
|
124
|
+
|
|
125
|
+
Args:
|
|
126
|
+
workflow_id (UUID):
|
|
127
|
+
|
|
128
|
+
Raises:
|
|
129
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
130
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
131
|
+
|
|
132
|
+
Returns:
|
|
133
|
+
Response[Union[HTTPValidationError, WorkflowResponse]]
|
|
134
|
+
"""
|
|
135
|
+
|
|
136
|
+
kwargs = _get_kwargs(
|
|
137
|
+
workflow_id=workflow_id,
|
|
138
|
+
)
|
|
139
|
+
|
|
140
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
141
|
+
|
|
142
|
+
return _build_response(client=client, response=response)
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
async def asyncio(
|
|
146
|
+
workflow_id: UUID,
|
|
147
|
+
*,
|
|
148
|
+
client: AuthenticatedClient,
|
|
149
|
+
) -> Optional[Union[HTTPValidationError, WorkflowResponse]]:
|
|
150
|
+
"""Get Workflow
|
|
151
|
+
|
|
152
|
+
Get a specific workflow by ID.
|
|
153
|
+
|
|
154
|
+
The workflow must belong to the authenticated user.
|
|
155
|
+
|
|
156
|
+
Args:
|
|
157
|
+
workflow_id (UUID):
|
|
158
|
+
|
|
159
|
+
Raises:
|
|
160
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
161
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
162
|
+
|
|
163
|
+
Returns:
|
|
164
|
+
Union[HTTPValidationError, WorkflowResponse]
|
|
165
|
+
"""
|
|
166
|
+
|
|
167
|
+
return (
|
|
168
|
+
await asyncio_detailed(
|
|
169
|
+
workflow_id=workflow_id,
|
|
170
|
+
client=client,
|
|
171
|
+
)
|
|
172
|
+
).parsed
|
|
@@ -0,0 +1,185 @@
|
|
|
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.get_workflow_versions_v1_workflows_workflow_id_versions_get_response_200_item import (
|
|
10
|
+
GetWorkflowVersionsV1WorkflowsWorkflowIdVersionsGetResponse200Item,
|
|
11
|
+
)
|
|
12
|
+
from ...models.http_validation_error import HTTPValidationError
|
|
13
|
+
from ...types import Response
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def _get_kwargs(
|
|
17
|
+
workflow_id: UUID,
|
|
18
|
+
) -> dict[str, Any]:
|
|
19
|
+
_kwargs: dict[str, Any] = {
|
|
20
|
+
"method": "get",
|
|
21
|
+
"url": f"/v1/workflows/{workflow_id}/versions",
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return _kwargs
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def _parse_response(
|
|
28
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
29
|
+
) -> Optional[Union[HTTPValidationError, list["GetWorkflowVersionsV1WorkflowsWorkflowIdVersionsGetResponse200Item"]]]:
|
|
30
|
+
if response.status_code == 200:
|
|
31
|
+
response_200 = []
|
|
32
|
+
_response_200 = response.json()
|
|
33
|
+
for response_200_item_data in _response_200:
|
|
34
|
+
response_200_item = GetWorkflowVersionsV1WorkflowsWorkflowIdVersionsGetResponse200Item.from_dict(
|
|
35
|
+
response_200_item_data
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
response_200.append(response_200_item)
|
|
39
|
+
|
|
40
|
+
return response_200
|
|
41
|
+
if response.status_code == 422:
|
|
42
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
43
|
+
|
|
44
|
+
return response_422
|
|
45
|
+
if client.raise_on_unexpected_status:
|
|
46
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
47
|
+
else:
|
|
48
|
+
return None
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def _build_response(
|
|
52
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
53
|
+
) -> Response[Union[HTTPValidationError, list["GetWorkflowVersionsV1WorkflowsWorkflowIdVersionsGetResponse200Item"]]]:
|
|
54
|
+
return Response(
|
|
55
|
+
status_code=HTTPStatus(response.status_code),
|
|
56
|
+
content=response.content,
|
|
57
|
+
headers=response.headers,
|
|
58
|
+
parsed=_parse_response(client=client, response=response),
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def sync_detailed(
|
|
63
|
+
workflow_id: UUID,
|
|
64
|
+
*,
|
|
65
|
+
client: AuthenticatedClient,
|
|
66
|
+
) -> Response[Union[HTTPValidationError, list["GetWorkflowVersionsV1WorkflowsWorkflowIdVersionsGetResponse200Item"]]]:
|
|
67
|
+
"""Get Workflow Versions
|
|
68
|
+
|
|
69
|
+
Get the version history of a workflow.
|
|
70
|
+
|
|
71
|
+
Returns a list of previous versions with their prompts and timestamps.
|
|
72
|
+
The workflow must belong to the authenticated user.
|
|
73
|
+
|
|
74
|
+
Args:
|
|
75
|
+
workflow_id (UUID):
|
|
76
|
+
|
|
77
|
+
Raises:
|
|
78
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
79
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
80
|
+
|
|
81
|
+
Returns:
|
|
82
|
+
Response[Union[HTTPValidationError, list['GetWorkflowVersionsV1WorkflowsWorkflowIdVersionsGetResponse200Item']]]
|
|
83
|
+
"""
|
|
84
|
+
|
|
85
|
+
kwargs = _get_kwargs(
|
|
86
|
+
workflow_id=workflow_id,
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
response = client.get_httpx_client().request(
|
|
90
|
+
**kwargs,
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
return _build_response(client=client, response=response)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
def sync(
|
|
97
|
+
workflow_id: UUID,
|
|
98
|
+
*,
|
|
99
|
+
client: AuthenticatedClient,
|
|
100
|
+
) -> Optional[Union[HTTPValidationError, list["GetWorkflowVersionsV1WorkflowsWorkflowIdVersionsGetResponse200Item"]]]:
|
|
101
|
+
"""Get Workflow Versions
|
|
102
|
+
|
|
103
|
+
Get the version history of a workflow.
|
|
104
|
+
|
|
105
|
+
Returns a list of previous versions with their prompts and timestamps.
|
|
106
|
+
The workflow must belong to the authenticated user.
|
|
107
|
+
|
|
108
|
+
Args:
|
|
109
|
+
workflow_id (UUID):
|
|
110
|
+
|
|
111
|
+
Raises:
|
|
112
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
113
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
114
|
+
|
|
115
|
+
Returns:
|
|
116
|
+
Union[HTTPValidationError, list['GetWorkflowVersionsV1WorkflowsWorkflowIdVersionsGetResponse200Item']]
|
|
117
|
+
"""
|
|
118
|
+
|
|
119
|
+
return sync_detailed(
|
|
120
|
+
workflow_id=workflow_id,
|
|
121
|
+
client=client,
|
|
122
|
+
).parsed
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
async def asyncio_detailed(
|
|
126
|
+
workflow_id: UUID,
|
|
127
|
+
*,
|
|
128
|
+
client: AuthenticatedClient,
|
|
129
|
+
) -> Response[Union[HTTPValidationError, list["GetWorkflowVersionsV1WorkflowsWorkflowIdVersionsGetResponse200Item"]]]:
|
|
130
|
+
"""Get Workflow Versions
|
|
131
|
+
|
|
132
|
+
Get the version history of a workflow.
|
|
133
|
+
|
|
134
|
+
Returns a list of previous versions with their prompts and timestamps.
|
|
135
|
+
The workflow must belong to the authenticated user.
|
|
136
|
+
|
|
137
|
+
Args:
|
|
138
|
+
workflow_id (UUID):
|
|
139
|
+
|
|
140
|
+
Raises:
|
|
141
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
142
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
143
|
+
|
|
144
|
+
Returns:
|
|
145
|
+
Response[Union[HTTPValidationError, list['GetWorkflowVersionsV1WorkflowsWorkflowIdVersionsGetResponse200Item']]]
|
|
146
|
+
"""
|
|
147
|
+
|
|
148
|
+
kwargs = _get_kwargs(
|
|
149
|
+
workflow_id=workflow_id,
|
|
150
|
+
)
|
|
151
|
+
|
|
152
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
153
|
+
|
|
154
|
+
return _build_response(client=client, response=response)
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
async def asyncio(
|
|
158
|
+
workflow_id: UUID,
|
|
159
|
+
*,
|
|
160
|
+
client: AuthenticatedClient,
|
|
161
|
+
) -> Optional[Union[HTTPValidationError, list["GetWorkflowVersionsV1WorkflowsWorkflowIdVersionsGetResponse200Item"]]]:
|
|
162
|
+
"""Get Workflow Versions
|
|
163
|
+
|
|
164
|
+
Get the version history of a workflow.
|
|
165
|
+
|
|
166
|
+
Returns a list of previous versions with their prompts and timestamps.
|
|
167
|
+
The workflow must belong to the authenticated user.
|
|
168
|
+
|
|
169
|
+
Args:
|
|
170
|
+
workflow_id (UUID):
|
|
171
|
+
|
|
172
|
+
Raises:
|
|
173
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
174
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
175
|
+
|
|
176
|
+
Returns:
|
|
177
|
+
Union[HTTPValidationError, list['GetWorkflowVersionsV1WorkflowsWorkflowIdVersionsGetResponse200Item']]
|
|
178
|
+
"""
|
|
179
|
+
|
|
180
|
+
return (
|
|
181
|
+
await asyncio_detailed(
|
|
182
|
+
workflow_id=workflow_id,
|
|
183
|
+
client=client,
|
|
184
|
+
)
|
|
185
|
+
).parsed
|