From 5eb32c3024eddf539b53852fdf23bb8af8d4089e Mon Sep 17 00:00:00 2001 From: Kim Burgaard Date: Wed, 1 Apr 2026 21:27:33 -0700 Subject: [PATCH 1/7] Added support for exporting agent definitions --- .github/copilot-instructions.md | 24 + openapi/seclai.openapi.json | 179 +++++++ .../api/agent_evaluations/__init__.py | 1 + ...gents_agent_id_evaluation_criteria_post.py | 230 +++++++++ ...ation_criteria_criteria_id_results_post.py | 222 ++++++++ ..._evaluation_criteria_criteria_id_delete.py | 198 ++++++++ ...nts_evaluation_criteria_criteria_id_get.py | 200 ++++++++ ...uation_criteria_criteria_id_summary_get.py | 200 ++++++++ ...aluation_results_non_manual_summary_get.py | 246 +++++++++ ..._agents_agent_id_evaluation_results_get.py | 334 ++++++++++++ ...riteria_criteria_id_compatible_runs_get.py | 258 ++++++++++ ...agents_agent_id_evaluation_criteria_get.py | 211 ++++++++ ...uation_criteria_criteria_id_results_get.py | 314 ++++++++++++ ...api_agents_agent_id_evaluation_runs_get.py | 317 ++++++++++++ ...t_id_runs_run_id_evaluation_results_get.py | 223 ++++++++ ..._id_evaluation_criteria_test_draft_post.py | 238 +++++++++ ...s_evaluation_criteria_criteria_id_patch.py | 230 +++++++++ ...ts_agent_id_input_uploads_upload_id_get.py | 226 +++++++++ ...t_api_agents_agent_id_upload_input_post.py | 252 ++++++++++ .../agents/create_agent_api_agents_post.py | 242 +++++++++ ...delete_agent_api_agents_agent_id_delete.py | 202 ++++++++ ...agent_run_api_agents_runs_run_id_delete.py | 34 +- ...rt_agent_api_agents_agent_id_export_get.py | 292 +++++++++++ ...ent_id_ai_assistant_generate_steps_post.py | 238 +++++++++ ..._agent_id_ai_assistant_step_config_post.py | 238 +++++++++ ...tion_api_agents_agent_id_definition_get.py | 340 +++++++++++++ ..._agent_metadata_api_agents_agent_id_get.py | 204 ++++++++ ...et_agent_run_api_agents_runs_run_id_get.py | 31 +- ...agent_id_ai_assistant_conversations_get.py | 290 +++++++++++ ...agent_runs_api_agents_agent_id_runs_get.py | 64 ++- .../api/agents/list_agents_api_agents_get.py | 223 ++++++++ ...t_id_ai_assistant_conversation_id_patch.py | 273 ++++++++++ ...run_agent_api_agents_agent_id_runs_post.py | 42 +- ...nt_api_agents_agent_id_runs_stream_post.py | 50 +- ..._agent_runs_api_agents_runs_search_post.py | 226 +++++++++ .../update_agent_api_agents_agent_id_put.py | 266 ++++++++++ ...tion_api_agents_agent_id_definition_put.py | 282 +++++++++++ .../_generated/api/ai_assistant/__init__.py | 1 + ...i_assistant_conversation_id_accept_post.py | 218 ++++++++ ..._assistant_conversation_id_decline_post.py | 198 ++++++++ ...feedback_api_ai_assistant_feedback_post.py | 202 ++++++++ ...se_api_ai_assistant_knowledge_base_post.py | 202 ++++++++ ...stant_memory_bank_conversation_id_patch.py | 247 +++++++++ ..._bank_api_ai_assistant_memory_bank_post.py | 202 ++++++++ ...stant_memory_bank_last_conversation_get.py | 225 +++++++++ ...solution_api_ai_assistant_solution_post.py | 202 ++++++++ ..._ai_source_api_ai_assistant_source_post.py | 202 ++++++++ seclai/_generated/api/alerts/__init__.py | 1 + ...mment_api_alerts_alert_id_comments_post.py | 247 +++++++++ ..._status_api_alerts_alert_id_status_post.py | 243 +++++++++ ...te_alert_config_api_alerts_configs_post.py | 263 ++++++++++ ...fig_api_alerts_configs_config_id_delete.py | 202 ++++++++ ...config_api_alerts_configs_config_id_get.py | 237 +++++++++ ...et_alert_detail_api_alerts_alert_id_get.py | 225 +++++++++ ...st_alert_configs_api_alerts_configs_get.py | 314 ++++++++++++ .../api/alerts/list_alerts_api_alerts_get.py | 358 +++++++++++++ ...lerts_organization_preferences_list_get.py | 250 +++++++++ ...lert_api_alerts_alert_id_subscribe_post.py | 229 +++++++++ ...rt_api_alerts_alert_id_unsubscribe_post.py | 229 +++++++++ ...nfig_api_alerts_configs_config_id_patch.py | 243 +++++++++ ...rences_organization_id_alert_type_patch.py | 252 ++++++++++ ...ource_connection_content_version_delete.py | 34 +- ...s_source_connection_content_version_get.py | 31 +- ...nnection_content_version_embeddings_get.py | 31 +- ...s_source_connection_content_version_put.py | 272 ++++++++++ ..._connection_content_version_upload_post.py | 30 +- seclai/_generated/api/governance/__init__.py | 1 + ...i_assistant_conversation_id_accept_post.py | 208 ++++++++ ..._assistant_conversation_id_decline_post.py | 206 ++++++++ ...nerate_api_governance_ai_assistant_post.py | 210 ++++++++ ...vernance_ai_assistant_conversations_get.py | 211 ++++++++ seclai/_generated/api/identity/__init__.py | 1 + .../api/identity/get_me_api_me_get.py | 174 +++++++ .../api/knowledge_bases/__init__.py | 1 + ...knowledge_base_api_knowledge_bases_post.py | 202 ++++++++ ...nowledge_bases_knowledge_base_id_delete.py | 198 ++++++++ ...i_knowledge_bases_knowledge_base_id_get.py | 204 ++++++++ ...knowledge_bases_api_knowledge_bases_get.py | 257 ++++++++++ ...i_knowledge_bases_knowledge_base_id_put.py | 226 +++++++++ .../_generated/api/memory_banks/__init__.py | 1 + ...emory_banks_memory_bank_id_compact_post.py | 225 +++++++++ ...reate_memory_bank_api_memory_banks_post.py | 202 ++++++++ ..._api_memory_banks_memory_bank_id_delete.py | 194 +++++++ ...mory_banks_memory_bank_id_source_delete.py | 198 ++++++++ ..._memory_banks_memory_bank_id_agents_get.py | 226 +++++++++ ...ank_api_memory_banks_memory_bank_id_get.py | 204 ++++++++ ...i_memory_banks_memory_bank_id_stats_get.py | 286 +++++++++++ .../list_memory_banks_api_memory_banks_get.py | 277 ++++++++++ ...emplates_api_memory_banks_templates_get.py | 189 +++++++ ...anks_ai_assistant_conversation_id_patch.py | 247 +++++++++ ...rate_api_memory_banks_ai_assistant_post.py | 206 ++++++++ ...anks_ai_assistant_last_conversation_get.py | 221 ++++++++ ...nks_memory_bank_id_test_compaction_post.py | 262 ++++++++++ ...e_api_memory_banks_test_compaction_post.py | 222 ++++++++ ...ank_api_memory_banks_memory_bank_id_put.py | 234 +++++++++ seclai/_generated/api/models/__init__.py | 1 + ...ount_api_models_alerts_unread_count_get.py | 205 ++++++++ ...api_models_model_id_recommendations_get.py | 350 +++++++++++++ .../list_alerts_api_models_alerts_get.py | 293 +++++++++++ ...ad_api_models_alerts_mark_all_read_post.py | 115 +++++ ...d_api_models_alerts_alert_id_read_patch.py | 198 ++++++++ seclai/_generated/api/search/__init__.py | 1 + .../api/search/search_api_search_get.py | 251 ++++++++++ seclai/_generated/api/solutions/__init__.py | 1 + ...olutions_solution_id_conversations_post.py | 218 ++++++++ ...i_assistant_conversation_id_accept_post.py | 236 +++++++++ ..._assistant_conversation_id_decline_post.py | 212 ++++++++ ..._solution_id_ai_assistant_generate_post.py | 230 +++++++++ ...ion_id_ai_assistant_knowledge_base_post.py | 222 ++++++++ ...ns_solution_id_ai_assistant_source_post.py | 222 ++++++++ .../create_solution_api_solutions_post.py | 202 ++++++++ ...lution_api_solutions_solution_id_delete.py | 198 ++++++++ ..._solution_api_solutions_solution_id_get.py | 196 ++++++++ ...s_api_solutions_solution_id_agents_post.py | 218 ++++++++ ...utions_solution_id_knowledge_bases_post.py | 218 ++++++++ ...ons_solution_id_source_connections_post.py | 218 ++++++++ ...solutions_solution_id_conversations_get.py | 207 ++++++++ .../list_solutions_api_solutions_get.py | 301 +++++++++++ ..._id_conversations_conversation_id_patch.py | 230 +++++++++ ...api_solutions_solution_id_agents_delete.py | 218 ++++++++ ...ions_solution_id_knowledge_bases_delete.py | 218 ++++++++ ...s_solution_id_source_connections_delete.py | 218 ++++++++ ...olution_api_solutions_solution_id_patch.py | 214 ++++++++ .../_generated/api/source_exports/__init__.py | 1 + ...ection_id_exports_export_id_cancel_post.py | 206 ++++++++ ...urces_source_connection_id_exports_post.py | 210 ++++++++ ..._connection_id_exports_export_id_delete.py | 204 ++++++++ ...ction_id_exports_export_id_download_get.py | 208 ++++++++ ...rce_connection_id_exports_estimate_post.py | 210 ++++++++ ...rce_connection_id_exports_export_id_get.py | 206 ++++++++ ...ources_source_connection_id_exports_get.py | 231 +++++++++ ...tion_id_embedding_migration_cancel_post.py | 198 ++++++++ .../sources/create_source_api_sources_post.py | 214 ++++++++ ...api_sources_source_connection_id_delete.py | 198 ++++++++ ...ce_api_sources_source_connection_id_get.py | 204 ++++++++ ...e_connection_id_embedding_migration_get.py | 214 ++++++++ .../sources/list_sources_api_sources_get.py | 51 +- ..._connection_id_embedding_migration_post.py | 266 ++++++++++ ...ce_api_sources_source_connection_id_put.py | 218 ++++++++ ...ources_source_connection_id_upload_post.py | 18 +- ...e_api_sources_source_connection_id_post.py | 264 ++++++++++ seclai/_generated/models/__init__.py | 460 +++++++++++++++++ ...mment_api_alerts_alert_id_comments_post.py | 53 ++ .../_generated/models/add_comment_request.py | 61 +++ .../models/add_conversation_turn_request.py | 135 +++++ ...ation_turn_request_actions_taken_type_0.py | 46 ++ .../models/agent_definition_response.py | 145 ++++++ .../agent_definition_response_definition.py | 50 ++ ...efinition_response_warnings_type_0_item.py | 46 ++ .../models/agent_evaluation_tier.py | 10 + .../models/agent_export_response.py | 358 +++++++++++++ .../models/agent_export_response_agent.py | 50 ++ ...port_response_alert_configs_type_0_item.py | 46 ++ ...ent_export_response_dependencies_type_0.py | 46 ++ ...esponse_evaluation_criteria_type_0_item.py | 46 ++ ...esponse_governance_policies_type_0_item.py | 46 ++ .../agent_export_response_trigger_type_0.py | 46 ++ .../_generated/models/agent_list_response.py | 85 ++++ seclai/_generated/models/agent_run_request.py | 84 +++- .../models/agent_run_step_response.py | 14 + .../models/agent_run_stream_request.py | 84 +++- .../models/agent_summary_response.py | 286 +++++++++++ ...summary_response_sampling_config_type_0.py | 46 ++ .../models/agent_trace_match_response.py | 168 +++++++ .../models/agent_trace_search_request.py | 132 +++++ .../models/agent_trace_search_response.py | 83 +++ .../models/ai_assistant_accept_request.py | 106 ++++ .../models/ai_assistant_accept_response.py | 148 ++++++ .../models/ai_assistant_feedback_request.py | 231 +++++++++ ...sistant_feedback_request_context_type_0.py | 46 ++ .../models/ai_assistant_feedback_response.py | 93 ++++ .../models/ai_assistant_generate_request.py | 62 +++ .../models/ai_assistant_generate_response.py | 142 ++++++ .../ai_conversation_history_response.py | 83 +++ .../models/ai_conversation_turn_response.py | 172 +++++++ ...n_turn_response_resulting_config_type_0.py | 46 ++ ...stant_memory_bank_conversation_id_patch.py | 53 ++ .../models/applied_action_response.py | 120 +++++ ..._status_api_alerts_alert_id_status_post.py | 53 ++ .../models/change_status_request.py | 83 +++ ...emory_banks_memory_bank_id_compact_post.py | 53 ++ .../models/compaction_evaluation_model.py | 78 +++ .../models/compaction_test_response_model.py | 107 ++++ .../models/compatible_run_list_response.py | 100 ++++ .../models/compatible_run_response.py | 161 ++++++ .../_generated/models/create_agent_request.py | 114 +++++ ...te_alert_config_api_alerts_configs_post.py | 53 ++ .../models/create_alert_config_request.py | 213 ++++++++ ...e_alert_config_request_threshold_type_0.py | 46 ++ .../create_evaluation_criteria_request.py | 216 ++++++++ ...teria_request_expectation_config_type_0.py | 48 ++ .../create_evaluation_result_request.py | 199 ++++++++ ...valuation_result_request_details_type_0.py | 46 ++ .../models/create_export_request.py | 196 ++++++++ ...e_export_request_metadata_filter_type_0.py | 46 ++ .../models/create_knowledge_base_body.py | 174 +++++++ .../models/create_memory_bank_body.py | 288 +++++++++++ .../models/create_solution_request.py | 73 +++ .../_generated/models/create_source_body.py | 272 ++++++++++ .../models/estimate_export_request.py | 196 ++++++++ ...e_export_request_metadata_filter_type_0.py | 46 ++ .../models/estimate_export_response.py | 70 +++ .../models/evaluation_criteria_response.py | 253 ++++++++++ ...eria_response_expectation_config_type_0.py | 46 ++ ...uation_criteria_response_result_summary.py | 46 ++ .../models/evaluation_result_list_response.py | 100 ++++ .../models/evaluation_result_response.py | 221 ++++++++ ...aluation_result_response_details_type_0.py | 46 ++ .../evaluation_result_summary_response.py | 116 +++++ ...tion_result_with_criteria_list_response.py | 104 ++++ ...valuation_result_with_criteria_response.py | 255 ++++++++++ ...t_with_criteria_response_details_type_0.py | 48 ++ .../evaluation_run_summary_list_response.py | 102 ++++ .../models/evaluation_run_summary_response.py | 127 +++++ seclai/_generated/models/evaluation_status.py | 12 + seclai/_generated/models/example_prompt.py | 46 ++ .../models/executed_action_response.py | 141 ++++++ seclai/_generated/models/export_format.py | 11 + .../_generated/models/export_list_response.py | 76 +++ seclai/_generated/models/export_response.py | 474 ++++++++++++++++++ .../export_response_metadata_filter_type_0.py | 46 ++ .../models/generate_agent_steps_request.py | 173 +++++++ ...t_steps_request_agent_steps_type_0_item.py | 46 ++ .../models/generate_agent_steps_response.py | 176 +++++++ ...gent_steps_response_agent_config_type_0.py | 46 ++ ...enerate_agent_steps_response_steps_item.py | 46 ++ .../models/generate_step_config_request.py | 201 ++++++++ ..._config_request_agent_steps_type_0_item.py | 46 ++ ...ep_config_request_current_config_type_0.py | 46 ++ .../models/generate_step_config_response.py | 168 +++++++ ...config_response_resulting_config_type_0.py | 46 ++ ...ry_bank_id_agents_get_response_200_item.py | 52 ++ ...config_api_alerts_configs_config_id_get.py | 53 ++ ...et_alert_detail_api_alerts_alert_id_get.py | 53 ++ ...ount_api_models_alerts_unread_count_get.py | 53 ++ ...i_memory_banks_memory_bank_id_stats_get.py | 53 ++ ...api_models_model_id_recommendations_get.py | 53 ++ .../models/governance_ai_accept_response.py | 116 +++++ .../models/governance_ai_assistant_request.py | 62 +++ .../governance_ai_assistant_response.py | 153 ++++++ .../governance_conversation_response.py | 152 ++++++ ...sation_response_proposed_actions_type_0.py | 48 ++ .../models/inline_text_replace_request.py | 150 ++++++ ...ne_text_replace_request_metadata_type_0.py | 46 ++ .../models/inline_text_upload_request.py | 150 ++++++ ...ine_text_upload_request_metadata_type_0.py | 46 ++ seclai/_generated/models/knowledge_base.py | 230 +++++++++ .../knowledge_base_list_response_model.py | 100 ++++ .../models/link_resources_request.py | 70 +++ ...st_alert_configs_api_alerts_configs_get.py | 53 ++ ...get_response_list_alerts_api_alerts_get.py | 48 ++ ...ponse_list_alerts_api_models_alerts_get.py | 54 ++ ...y_banks_templates_get_response_200_item.py | 48 ++ ...t_id_ai_assistant_conversation_id_patch.py | 53 ++ .../models/mark_ai_suggestion_request.py | 61 +++ .../models/mark_conversation_turn_request.py | 61 +++ seclai/_generated/models/me_response.py | 86 ++++ seclai/_generated/models/memory_bank.py | 330 ++++++++++++ .../models/memory_bank_accept_request.py | 62 +++ ...anks_ai_assistant_conversation_id_patch.py | 53 ++ .../memory_bank_ai_assistant_request.py | 139 +++++ ...assistant_request_current_config_type_0.py | 46 ++ .../memory_bank_ai_assistant_response.py | 165 ++++++ .../models/memory_bank_config_response.py | 200 ++++++++ .../memory_bank_conversation_turn_response.py | 171 +++++++ ...n_turn_response_resulting_config_type_0.py | 48 ++ .../memory_bank_last_conversation_response.py | 156 ++++++ .../models/memory_bank_list_response_model.py | 100 ++++ ...on_manual_evaluation_mode_stat_response.py | 110 ++++ .../non_manual_evaluation_summary_response.py | 130 +++++ ...nization_alert_preference_list_response.py | 89 ++++ .../organization_alert_preference_response.py | 85 ++++ .../models/organization_info_response.py | 78 +++ .../prompt_model_auto_upgrade_strategy.py | 11 + .../models/proposed_action_response.py | 97 ++++ .../models/proposed_action_response_params.py | 46 ++ .../models/proposed_policy_action_response.py | 88 ++++ .../proposed_policy_action_response_params.py | 46 ++ ...arch_get_response_search_api_search_get.py | 46 ++ .../models/solution_agent_response.py | 93 ++++ .../models/solution_conversation_response.py | 153 ++++++ ...versation_response_actions_taken_type_0.py | 46 ++ .../solution_knowledge_base_response.py | 93 ++++ .../models/solution_list_response.py | 86 ++++ seclai/_generated/models/solution_response.py | 163 ++++++ .../solution_source_connection_response.py | 70 +++ .../models/solution_summary_response.py | 127 +++++ .../source_connection_response_model.py | 108 ++++ .../source_embedding_migration_response.py | 249 +++++++++ seclai/_generated/models/source_response.py | 32 ++ .../standalone_test_compaction_request.py | 141 ++++++ ...tart_source_embedding_migration_request.py | 207 ++++++++ ...lert_api_alerts_alert_id_subscribe_post.py | 53 ++ .../models/test_compaction_request.py | 149 ++++++ .../models/test_draft_evaluation_request.py | 246 +++++++++ ...ation_request_expectation_config_type_0.py | 48 ++ .../models/test_draft_evaluation_response.py | 85 ++++ .../models/unlink_resources_request.py | 70 +++ ...rt_api_alerts_alert_id_unsubscribe_post.py | 53 ++ .../models/update_agent_definition_request.py | 84 ++++ ...ate_agent_definition_request_definition.py | 50 ++ .../_generated/models/update_agent_request.py | 378 ++++++++++++++ ...te_agent_request_sampling_config_type_0.py | 46 ++ ...nfig_api_alerts_configs_config_id_patch.py | 53 ++ .../models/update_alert_config_request.py | 194 +++++++ ...e_alert_config_request_threshold_type_0.py | 46 ++ .../update_evaluation_criteria_request.py | 247 +++++++++ ...teria_request_expectation_config_type_0.py | 48 ++ .../models/update_knowledge_base_body.py | 207 ++++++++ .../models/update_memory_bank_body.py | 202 ++++++++ ...e_organization_alert_preference_request.py | 61 +++ .../models/update_solution_request.py | 94 ++++ .../_generated/models/update_source_body.py | 114 +++++ .../models/upload_agent_input_api_response.py | 115 +++++ seclai/seclai.py | 38 ++ 315 files changed, 46324 insertions(+), 103 deletions(-) create mode 100644 seclai/_generated/api/agent_evaluations/__init__.py create mode 100644 seclai/_generated/api/agent_evaluations/create_evaluation_criteria_api_agents_agent_id_evaluation_criteria_post.py create mode 100644 seclai/_generated/api/agent_evaluations/create_evaluation_result_api_agents_evaluation_criteria_criteria_id_results_post.py create mode 100644 seclai/_generated/api/agent_evaluations/delete_evaluation_criteria_api_agents_evaluation_criteria_criteria_id_delete.py create mode 100644 seclai/_generated/api/agent_evaluations/get_evaluation_criteria_api_agents_evaluation_criteria_criteria_id_get.py create mode 100644 seclai/_generated/api/agent_evaluations/get_evaluation_summary_api_agents_evaluation_criteria_criteria_id_summary_get.py create mode 100644 seclai/_generated/api/agent_evaluations/get_non_manual_evaluation_summary_api_agents_evaluation_results_non_manual_summary_get.py create mode 100644 seclai/_generated/api/agent_evaluations/list_agent_evaluation_results_api_agents_agent_id_evaluation_results_get.py create mode 100644 seclai/_generated/api/agent_evaluations/list_compatible_runs_api_agents_evaluation_criteria_criteria_id_compatible_runs_get.py create mode 100644 seclai/_generated/api/agent_evaluations/list_evaluation_criteria_api_agents_agent_id_evaluation_criteria_get.py create mode 100644 seclai/_generated/api/agent_evaluations/list_evaluation_results_api_agents_evaluation_criteria_criteria_id_results_get.py create mode 100644 seclai/_generated/api/agent_evaluations/list_evaluation_runs_api_agents_agent_id_evaluation_runs_get.py create mode 100644 seclai/_generated/api/agent_evaluations/list_run_evaluation_results_api_agents_agent_id_runs_run_id_evaluation_results_get.py create mode 100644 seclai/_generated/api/agent_evaluations/test_draft_evaluation_api_agents_agent_id_evaluation_criteria_test_draft_post.py create mode 100644 seclai/_generated/api/agent_evaluations/update_evaluation_criteria_api_agents_evaluation_criteria_criteria_id_patch.py create mode 100644 seclai/_generated/api/agents/api_get_agent_input_upload_status_api_agents_agent_id_input_uploads_upload_id_get.py create mode 100644 seclai/_generated/api/agents/api_upload_agent_input_api_agents_agent_id_upload_input_post.py create mode 100644 seclai/_generated/api/agents/create_agent_api_agents_post.py create mode 100644 seclai/_generated/api/agents/delete_agent_api_agents_agent_id_delete.py create mode 100644 seclai/_generated/api/agents/export_agent_api_agents_agent_id_export_get.py create mode 100644 seclai/_generated/api/agents/generate_agent_steps_api_agents_agent_id_ai_assistant_generate_steps_post.py create mode 100644 seclai/_generated/api/agents/generate_step_config_api_agents_agent_id_ai_assistant_step_config_post.py create mode 100644 seclai/_generated/api/agents/get_agent_definition_api_agents_agent_id_definition_get.py create mode 100644 seclai/_generated/api/agents/get_agent_metadata_api_agents_agent_id_get.py create mode 100644 seclai/_generated/api/agents/get_ai_conversation_history_api_agents_agent_id_ai_assistant_conversations_get.py create mode 100644 seclai/_generated/api/agents/list_agents_api_agents_get.py create mode 100644 seclai/_generated/api/agents/mark_ai_suggestion_api_agents_agent_id_ai_assistant_conversation_id_patch.py create mode 100644 seclai/_generated/api/agents/search_agent_runs_api_agents_runs_search_post.py create mode 100644 seclai/_generated/api/agents/update_agent_api_agents_agent_id_put.py create mode 100644 seclai/_generated/api/agents/update_agent_definition_api_agents_agent_id_definition_put.py create mode 100644 seclai/_generated/api/ai_assistant/__init__.py create mode 100644 seclai/_generated/api/ai_assistant/api_ai_accept_api_ai_assistant_conversation_id_accept_post.py create mode 100644 seclai/_generated/api/ai_assistant/api_ai_decline_api_ai_assistant_conversation_id_decline_post.py create mode 100644 seclai/_generated/api/ai_assistant/api_ai_feedback_api_ai_assistant_feedback_post.py create mode 100644 seclai/_generated/api/ai_assistant/api_ai_knowledge_base_api_ai_assistant_knowledge_base_post.py create mode 100644 seclai/_generated/api/ai_assistant/api_ai_memory_bank_accept_api_ai_assistant_memory_bank_conversation_id_patch.py create mode 100644 seclai/_generated/api/ai_assistant/api_ai_memory_bank_api_ai_assistant_memory_bank_post.py create mode 100644 seclai/_generated/api/ai_assistant/api_ai_memory_bank_history_api_ai_assistant_memory_bank_last_conversation_get.py create mode 100644 seclai/_generated/api/ai_assistant/api_ai_solution_api_ai_assistant_solution_post.py create mode 100644 seclai/_generated/api/ai_assistant/api_ai_source_api_ai_assistant_source_post.py create mode 100644 seclai/_generated/api/alerts/__init__.py create mode 100644 seclai/_generated/api/alerts/add_alert_comment_api_alerts_alert_id_comments_post.py create mode 100644 seclai/_generated/api/alerts/change_alert_status_api_alerts_alert_id_status_post.py create mode 100644 seclai/_generated/api/alerts/create_alert_config_api_alerts_configs_post.py create mode 100644 seclai/_generated/api/alerts/delete_alert_config_api_alerts_configs_config_id_delete.py create mode 100644 seclai/_generated/api/alerts/get_alert_config_api_alerts_configs_config_id_get.py create mode 100644 seclai/_generated/api/alerts/get_alert_detail_api_alerts_alert_id_get.py create mode 100644 seclai/_generated/api/alerts/list_alert_configs_api_alerts_configs_get.py create mode 100644 seclai/_generated/api/alerts/list_alerts_api_alerts_get.py create mode 100644 seclai/_generated/api/alerts/list_organization_preferences_api_alerts_organization_preferences_list_get.py create mode 100644 seclai/_generated/api/alerts/subscribe_to_alert_api_alerts_alert_id_subscribe_post.py create mode 100644 seclai/_generated/api/alerts/unsubscribe_from_alert_api_alerts_alert_id_unsubscribe_post.py create mode 100644 seclai/_generated/api/alerts/update_alert_config_api_alerts_configs_config_id_patch.py create mode 100644 seclai/_generated/api/alerts/update_organization_preference_api_alerts_organization_preferences_organization_id_alert_type_patch.py create mode 100644 seclai/_generated/api/contents/replace_content_with_inline_text_api_contents_source_connection_content_version_put.py create mode 100644 seclai/_generated/api/governance/__init__.py create mode 100644 seclai/_generated/api/governance/governance_ai_accept_api_governance_ai_assistant_conversation_id_accept_post.py create mode 100644 seclai/_generated/api/governance/governance_ai_decline_api_governance_ai_assistant_conversation_id_decline_post.py create mode 100644 seclai/_generated/api/governance/governance_ai_generate_api_governance_ai_assistant_post.py create mode 100644 seclai/_generated/api/governance/list_governance_ai_conversations_api_governance_ai_assistant_conversations_get.py create mode 100644 seclai/_generated/api/identity/__init__.py create mode 100644 seclai/_generated/api/identity/get_me_api_me_get.py create mode 100644 seclai/_generated/api/knowledge_bases/__init__.py create mode 100644 seclai/_generated/api/knowledge_bases/create_knowledge_base_api_knowledge_bases_post.py create mode 100644 seclai/_generated/api/knowledge_bases/delete_knowledge_base_api_knowledge_bases_knowledge_base_id_delete.py create mode 100644 seclai/_generated/api/knowledge_bases/get_knowledge_base_api_knowledge_bases_knowledge_base_id_get.py create mode 100644 seclai/_generated/api/knowledge_bases/list_knowledge_bases_api_knowledge_bases_get.py create mode 100644 seclai/_generated/api/knowledge_bases/update_knowledge_base_api_knowledge_bases_knowledge_base_id_put.py create mode 100644 seclai/_generated/api/memory_banks/__init__.py create mode 100644 seclai/_generated/api/memory_banks/compact_memory_bank_api_memory_banks_memory_bank_id_compact_post.py create mode 100644 seclai/_generated/api/memory_banks/create_memory_bank_api_memory_banks_post.py create mode 100644 seclai/_generated/api/memory_banks/delete_memory_bank_api_memory_banks_memory_bank_id_delete.py create mode 100644 seclai/_generated/api/memory_banks/delete_memory_bank_source_api_memory_banks_memory_bank_id_source_delete.py create mode 100644 seclai/_generated/api/memory_banks/get_agents_using_bank_api_memory_banks_memory_bank_id_agents_get.py create mode 100644 seclai/_generated/api/memory_banks/get_memory_bank_api_memory_banks_memory_bank_id_get.py create mode 100644 seclai/_generated/api/memory_banks/get_memory_bank_entry_stats_api_memory_banks_memory_bank_id_stats_get.py create mode 100644 seclai/_generated/api/memory_banks/list_memory_banks_api_memory_banks_get.py create mode 100644 seclai/_generated/api/memory_banks/list_templates_api_memory_banks_templates_get.py create mode 100644 seclai/_generated/api/memory_banks/memory_bank_ai_accept_api_memory_banks_ai_assistant_conversation_id_patch.py create mode 100644 seclai/_generated/api/memory_banks/memory_bank_ai_generate_api_memory_banks_ai_assistant_post.py create mode 100644 seclai/_generated/api/memory_banks/memory_bank_ai_last_conversation_api_memory_banks_ai_assistant_last_conversation_get.py create mode 100644 seclai/_generated/api/memory_banks/test_compaction_prompt_api_memory_banks_memory_bank_id_test_compaction_post.py create mode 100644 seclai/_generated/api/memory_banks/test_compaction_prompt_standalone_api_memory_banks_test_compaction_post.py create mode 100644 seclai/_generated/api/memory_banks/update_memory_bank_api_memory_banks_memory_bank_id_put.py create mode 100644 seclai/_generated/api/models/__init__.py create mode 100644 seclai/_generated/api/models/get_alert_unread_count_api_models_alerts_unread_count_get.py create mode 100644 seclai/_generated/api/models/get_recommendations_api_models_model_id_recommendations_get.py create mode 100644 seclai/_generated/api/models/list_alerts_api_models_alerts_get.py create mode 100644 seclai/_generated/api/models/mark_all_read_api_models_alerts_mark_all_read_post.py create mode 100644 seclai/_generated/api/models/mark_read_api_models_alerts_alert_id_read_patch.py create mode 100644 seclai/_generated/api/search/__init__.py create mode 100644 seclai/_generated/api/search/search_api_search_get.py create mode 100644 seclai/_generated/api/solutions/__init__.py create mode 100644 seclai/_generated/api/solutions/add_conversation_turn_api_solutions_solution_id_conversations_post.py create mode 100644 seclai/_generated/api/solutions/ai_assistant_accept_api_solutions_solution_id_ai_assistant_conversation_id_accept_post.py create mode 100644 seclai/_generated/api/solutions/ai_assistant_decline_api_solutions_solution_id_ai_assistant_conversation_id_decline_post.py create mode 100644 seclai/_generated/api/solutions/ai_assistant_generate_api_solutions_solution_id_ai_assistant_generate_post.py create mode 100644 seclai/_generated/api/solutions/ai_assistant_knowledge_base_api_solutions_solution_id_ai_assistant_knowledge_base_post.py create mode 100644 seclai/_generated/api/solutions/ai_assistant_source_api_solutions_solution_id_ai_assistant_source_post.py create mode 100644 seclai/_generated/api/solutions/create_solution_api_solutions_post.py create mode 100644 seclai/_generated/api/solutions/delete_solution_api_solutions_solution_id_delete.py create mode 100644 seclai/_generated/api/solutions/get_solution_api_solutions_solution_id_get.py create mode 100644 seclai/_generated/api/solutions/link_agents_api_solutions_solution_id_agents_post.py create mode 100644 seclai/_generated/api/solutions/link_knowledge_bases_api_solutions_solution_id_knowledge_bases_post.py create mode 100644 seclai/_generated/api/solutions/link_source_connections_api_solutions_solution_id_source_connections_post.py create mode 100644 seclai/_generated/api/solutions/list_conversations_api_solutions_solution_id_conversations_get.py create mode 100644 seclai/_generated/api/solutions/list_solutions_api_solutions_get.py create mode 100644 seclai/_generated/api/solutions/mark_conversation_turn_api_solutions_solution_id_conversations_conversation_id_patch.py create mode 100644 seclai/_generated/api/solutions/unlink_agents_api_solutions_solution_id_agents_delete.py create mode 100644 seclai/_generated/api/solutions/unlink_knowledge_bases_api_solutions_solution_id_knowledge_bases_delete.py create mode 100644 seclai/_generated/api/solutions/unlink_source_connections_api_solutions_solution_id_source_connections_delete.py create mode 100644 seclai/_generated/api/solutions/update_solution_api_solutions_solution_id_patch.py create mode 100644 seclai/_generated/api/source_exports/__init__.py create mode 100644 seclai/_generated/api/source_exports/cancel_source_export_api_sources_source_connection_id_exports_export_id_cancel_post.py create mode 100644 seclai/_generated/api/source_exports/create_source_export_api_sources_source_connection_id_exports_post.py create mode 100644 seclai/_generated/api/source_exports/delete_source_export_api_sources_source_connection_id_exports_export_id_delete.py create mode 100644 seclai/_generated/api/source_exports/download_source_export_api_sources_source_connection_id_exports_export_id_download_get.py create mode 100644 seclai/_generated/api/source_exports/estimate_source_export_api_sources_source_connection_id_exports_estimate_post.py create mode 100644 seclai/_generated/api/source_exports/get_source_export_api_sources_source_connection_id_exports_export_id_get.py create mode 100644 seclai/_generated/api/source_exports/list_source_exports_api_sources_source_connection_id_exports_get.py create mode 100644 seclai/_generated/api/sources/cancel_source_embedding_migration_api_sources_source_connection_id_embedding_migration_cancel_post.py create mode 100644 seclai/_generated/api/sources/create_source_api_sources_post.py create mode 100644 seclai/_generated/api/sources/delete_source_api_sources_source_connection_id_delete.py create mode 100644 seclai/_generated/api/sources/get_source_api_sources_source_connection_id_get.py create mode 100644 seclai/_generated/api/sources/get_source_embedding_migration_api_sources_source_connection_id_embedding_migration_get.py create mode 100644 seclai/_generated/api/sources/start_source_embedding_migration_api_sources_source_connection_id_embedding_migration_post.py create mode 100644 seclai/_generated/api/sources/update_source_api_sources_source_connection_id_put.py create mode 100644 seclai/_generated/api/sources/upload_inline_text_to_source_api_sources_source_connection_id_post.py create mode 100644 seclai/_generated/models/add_alert_comment_api_alerts_alert_id_comments_post_response_add_alert_comment_api_alerts_alert_id_comments_post.py create mode 100644 seclai/_generated/models/add_comment_request.py create mode 100644 seclai/_generated/models/add_conversation_turn_request.py create mode 100644 seclai/_generated/models/add_conversation_turn_request_actions_taken_type_0.py create mode 100644 seclai/_generated/models/agent_definition_response.py create mode 100644 seclai/_generated/models/agent_definition_response_definition.py create mode 100644 seclai/_generated/models/agent_definition_response_warnings_type_0_item.py create mode 100644 seclai/_generated/models/agent_evaluation_tier.py create mode 100644 seclai/_generated/models/agent_export_response.py create mode 100644 seclai/_generated/models/agent_export_response_agent.py create mode 100644 seclai/_generated/models/agent_export_response_alert_configs_type_0_item.py create mode 100644 seclai/_generated/models/agent_export_response_dependencies_type_0.py create mode 100644 seclai/_generated/models/agent_export_response_evaluation_criteria_type_0_item.py create mode 100644 seclai/_generated/models/agent_export_response_governance_policies_type_0_item.py create mode 100644 seclai/_generated/models/agent_export_response_trigger_type_0.py create mode 100644 seclai/_generated/models/agent_list_response.py create mode 100644 seclai/_generated/models/agent_summary_response.py create mode 100644 seclai/_generated/models/agent_summary_response_sampling_config_type_0.py create mode 100644 seclai/_generated/models/agent_trace_match_response.py create mode 100644 seclai/_generated/models/agent_trace_search_request.py create mode 100644 seclai/_generated/models/agent_trace_search_response.py create mode 100644 seclai/_generated/models/ai_assistant_accept_request.py create mode 100644 seclai/_generated/models/ai_assistant_accept_response.py create mode 100644 seclai/_generated/models/ai_assistant_feedback_request.py create mode 100644 seclai/_generated/models/ai_assistant_feedback_request_context_type_0.py create mode 100644 seclai/_generated/models/ai_assistant_feedback_response.py create mode 100644 seclai/_generated/models/ai_assistant_generate_request.py create mode 100644 seclai/_generated/models/ai_assistant_generate_response.py create mode 100644 seclai/_generated/models/ai_conversation_history_response.py create mode 100644 seclai/_generated/models/ai_conversation_turn_response.py create mode 100644 seclai/_generated/models/ai_conversation_turn_response_resulting_config_type_0.py create mode 100644 seclai/_generated/models/api_ai_memory_bank_accept_api_ai_assistant_memory_bank_conversation_id_patch_response_api_ai_memory_bank_accept_api_ai_assistant_memory_bank_conversation_id_patch.py create mode 100644 seclai/_generated/models/applied_action_response.py create mode 100644 seclai/_generated/models/change_alert_status_api_alerts_alert_id_status_post_response_change_alert_status_api_alerts_alert_id_status_post.py create mode 100644 seclai/_generated/models/change_status_request.py create mode 100644 seclai/_generated/models/compact_memory_bank_api_memory_banks_memory_bank_id_compact_post_response_compact_memory_bank_api_memory_banks_memory_bank_id_compact_post.py create mode 100644 seclai/_generated/models/compaction_evaluation_model.py create mode 100644 seclai/_generated/models/compaction_test_response_model.py create mode 100644 seclai/_generated/models/compatible_run_list_response.py create mode 100644 seclai/_generated/models/compatible_run_response.py create mode 100644 seclai/_generated/models/create_agent_request.py create mode 100644 seclai/_generated/models/create_alert_config_api_alerts_configs_post_response_create_alert_config_api_alerts_configs_post.py create mode 100644 seclai/_generated/models/create_alert_config_request.py create mode 100644 seclai/_generated/models/create_alert_config_request_threshold_type_0.py create mode 100644 seclai/_generated/models/create_evaluation_criteria_request.py create mode 100644 seclai/_generated/models/create_evaluation_criteria_request_expectation_config_type_0.py create mode 100644 seclai/_generated/models/create_evaluation_result_request.py create mode 100644 seclai/_generated/models/create_evaluation_result_request_details_type_0.py create mode 100644 seclai/_generated/models/create_export_request.py create mode 100644 seclai/_generated/models/create_export_request_metadata_filter_type_0.py create mode 100644 seclai/_generated/models/create_knowledge_base_body.py create mode 100644 seclai/_generated/models/create_memory_bank_body.py create mode 100644 seclai/_generated/models/create_solution_request.py create mode 100644 seclai/_generated/models/create_source_body.py create mode 100644 seclai/_generated/models/estimate_export_request.py create mode 100644 seclai/_generated/models/estimate_export_request_metadata_filter_type_0.py create mode 100644 seclai/_generated/models/estimate_export_response.py create mode 100644 seclai/_generated/models/evaluation_criteria_response.py create mode 100644 seclai/_generated/models/evaluation_criteria_response_expectation_config_type_0.py create mode 100644 seclai/_generated/models/evaluation_criteria_response_result_summary.py create mode 100644 seclai/_generated/models/evaluation_result_list_response.py create mode 100644 seclai/_generated/models/evaluation_result_response.py create mode 100644 seclai/_generated/models/evaluation_result_response_details_type_0.py create mode 100644 seclai/_generated/models/evaluation_result_summary_response.py create mode 100644 seclai/_generated/models/evaluation_result_with_criteria_list_response.py create mode 100644 seclai/_generated/models/evaluation_result_with_criteria_response.py create mode 100644 seclai/_generated/models/evaluation_result_with_criteria_response_details_type_0.py create mode 100644 seclai/_generated/models/evaluation_run_summary_list_response.py create mode 100644 seclai/_generated/models/evaluation_run_summary_response.py create mode 100644 seclai/_generated/models/evaluation_status.py create mode 100644 seclai/_generated/models/example_prompt.py create mode 100644 seclai/_generated/models/executed_action_response.py create mode 100644 seclai/_generated/models/export_format.py create mode 100644 seclai/_generated/models/export_list_response.py create mode 100644 seclai/_generated/models/export_response.py create mode 100644 seclai/_generated/models/export_response_metadata_filter_type_0.py create mode 100644 seclai/_generated/models/generate_agent_steps_request.py create mode 100644 seclai/_generated/models/generate_agent_steps_request_agent_steps_type_0_item.py create mode 100644 seclai/_generated/models/generate_agent_steps_response.py create mode 100644 seclai/_generated/models/generate_agent_steps_response_agent_config_type_0.py create mode 100644 seclai/_generated/models/generate_agent_steps_response_steps_item.py create mode 100644 seclai/_generated/models/generate_step_config_request.py create mode 100644 seclai/_generated/models/generate_step_config_request_agent_steps_type_0_item.py create mode 100644 seclai/_generated/models/generate_step_config_request_current_config_type_0.py create mode 100644 seclai/_generated/models/generate_step_config_response.py create mode 100644 seclai/_generated/models/generate_step_config_response_resulting_config_type_0.py create mode 100644 seclai/_generated/models/get_agents_using_bank_api_memory_banks_memory_bank_id_agents_get_response_200_item.py create mode 100644 seclai/_generated/models/get_alert_config_api_alerts_configs_config_id_get_response_get_alert_config_api_alerts_configs_config_id_get.py create mode 100644 seclai/_generated/models/get_alert_detail_api_alerts_alert_id_get_response_get_alert_detail_api_alerts_alert_id_get.py create mode 100644 seclai/_generated/models/get_alert_unread_count_api_models_alerts_unread_count_get_response_get_alert_unread_count_api_models_alerts_unread_count_get.py create mode 100644 seclai/_generated/models/get_memory_bank_entry_stats_api_memory_banks_memory_bank_id_stats_get_response_get_memory_bank_entry_stats_api_memory_banks_memory_bank_id_stats_get.py create mode 100644 seclai/_generated/models/get_recommendations_api_models_model_id_recommendations_get_response_get_recommendations_api_models_model_id_recommendations_get.py create mode 100644 seclai/_generated/models/governance_ai_accept_response.py create mode 100644 seclai/_generated/models/governance_ai_assistant_request.py create mode 100644 seclai/_generated/models/governance_ai_assistant_response.py create mode 100644 seclai/_generated/models/governance_conversation_response.py create mode 100644 seclai/_generated/models/governance_conversation_response_proposed_actions_type_0.py create mode 100644 seclai/_generated/models/inline_text_replace_request.py create mode 100644 seclai/_generated/models/inline_text_replace_request_metadata_type_0.py create mode 100644 seclai/_generated/models/inline_text_upload_request.py create mode 100644 seclai/_generated/models/inline_text_upload_request_metadata_type_0.py create mode 100644 seclai/_generated/models/knowledge_base.py create mode 100644 seclai/_generated/models/knowledge_base_list_response_model.py create mode 100644 seclai/_generated/models/link_resources_request.py create mode 100644 seclai/_generated/models/list_alert_configs_api_alerts_configs_get_response_list_alert_configs_api_alerts_configs_get.py create mode 100644 seclai/_generated/models/list_alerts_api_alerts_get_response_list_alerts_api_alerts_get.py create mode 100644 seclai/_generated/models/list_alerts_api_models_alerts_get_response_list_alerts_api_models_alerts_get.py create mode 100644 seclai/_generated/models/list_templates_api_memory_banks_templates_get_response_200_item.py create mode 100644 seclai/_generated/models/mark_ai_suggestion_api_agents_agent_id_ai_assistant_conversation_id_patch_response_mark_ai_suggestion_api_agents_agent_id_ai_assistant_conversation_id_patch.py create mode 100644 seclai/_generated/models/mark_ai_suggestion_request.py create mode 100644 seclai/_generated/models/mark_conversation_turn_request.py create mode 100644 seclai/_generated/models/me_response.py create mode 100644 seclai/_generated/models/memory_bank.py create mode 100644 seclai/_generated/models/memory_bank_accept_request.py create mode 100644 seclai/_generated/models/memory_bank_ai_accept_api_memory_banks_ai_assistant_conversation_id_patch_response_memory_bank_ai_accept_api_memory_banks_ai_assistant_conversation_id_patch.py create mode 100644 seclai/_generated/models/memory_bank_ai_assistant_request.py create mode 100644 seclai/_generated/models/memory_bank_ai_assistant_request_current_config_type_0.py create mode 100644 seclai/_generated/models/memory_bank_ai_assistant_response.py create mode 100644 seclai/_generated/models/memory_bank_config_response.py create mode 100644 seclai/_generated/models/memory_bank_conversation_turn_response.py create mode 100644 seclai/_generated/models/memory_bank_conversation_turn_response_resulting_config_type_0.py create mode 100644 seclai/_generated/models/memory_bank_last_conversation_response.py create mode 100644 seclai/_generated/models/memory_bank_list_response_model.py create mode 100644 seclai/_generated/models/non_manual_evaluation_mode_stat_response.py create mode 100644 seclai/_generated/models/non_manual_evaluation_summary_response.py create mode 100644 seclai/_generated/models/organization_alert_preference_list_response.py create mode 100644 seclai/_generated/models/organization_alert_preference_response.py create mode 100644 seclai/_generated/models/organization_info_response.py create mode 100644 seclai/_generated/models/prompt_model_auto_upgrade_strategy.py create mode 100644 seclai/_generated/models/proposed_action_response.py create mode 100644 seclai/_generated/models/proposed_action_response_params.py create mode 100644 seclai/_generated/models/proposed_policy_action_response.py create mode 100644 seclai/_generated/models/proposed_policy_action_response_params.py create mode 100644 seclai/_generated/models/search_api_search_get_response_search_api_search_get.py create mode 100644 seclai/_generated/models/solution_agent_response.py create mode 100644 seclai/_generated/models/solution_conversation_response.py create mode 100644 seclai/_generated/models/solution_conversation_response_actions_taken_type_0.py create mode 100644 seclai/_generated/models/solution_knowledge_base_response.py create mode 100644 seclai/_generated/models/solution_list_response.py create mode 100644 seclai/_generated/models/solution_response.py create mode 100644 seclai/_generated/models/solution_source_connection_response.py create mode 100644 seclai/_generated/models/solution_summary_response.py create mode 100644 seclai/_generated/models/source_connection_response_model.py create mode 100644 seclai/_generated/models/source_embedding_migration_response.py create mode 100644 seclai/_generated/models/standalone_test_compaction_request.py create mode 100644 seclai/_generated/models/start_source_embedding_migration_request.py create mode 100644 seclai/_generated/models/subscribe_to_alert_api_alerts_alert_id_subscribe_post_response_subscribe_to_alert_api_alerts_alert_id_subscribe_post.py create mode 100644 seclai/_generated/models/test_compaction_request.py create mode 100644 seclai/_generated/models/test_draft_evaluation_request.py create mode 100644 seclai/_generated/models/test_draft_evaluation_request_expectation_config_type_0.py create mode 100644 seclai/_generated/models/test_draft_evaluation_response.py create mode 100644 seclai/_generated/models/unlink_resources_request.py create mode 100644 seclai/_generated/models/unsubscribe_from_alert_api_alerts_alert_id_unsubscribe_post_response_unsubscribe_from_alert_api_alerts_alert_id_unsubscribe_post.py create mode 100644 seclai/_generated/models/update_agent_definition_request.py create mode 100644 seclai/_generated/models/update_agent_definition_request_definition.py create mode 100644 seclai/_generated/models/update_agent_request.py create mode 100644 seclai/_generated/models/update_agent_request_sampling_config_type_0.py create mode 100644 seclai/_generated/models/update_alert_config_api_alerts_configs_config_id_patch_response_update_alert_config_api_alerts_configs_config_id_patch.py create mode 100644 seclai/_generated/models/update_alert_config_request.py create mode 100644 seclai/_generated/models/update_alert_config_request_threshold_type_0.py create mode 100644 seclai/_generated/models/update_evaluation_criteria_request.py create mode 100644 seclai/_generated/models/update_evaluation_criteria_request_expectation_config_type_0.py create mode 100644 seclai/_generated/models/update_knowledge_base_body.py create mode 100644 seclai/_generated/models/update_memory_bank_body.py create mode 100644 seclai/_generated/models/update_organization_alert_preference_request.py create mode 100644 seclai/_generated/models/update_solution_request.py create mode 100644 seclai/_generated/models/update_source_body.py create mode 100644 seclai/_generated/models/upload_agent_input_api_response.py diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 9ebbe69..410cba4 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -16,6 +16,14 @@ Individual commands: - **Type checker**: `poetry run mypy .` — strict mode with `warn_unused_ignores` - **Tests**: `poetry run pytest tests/ -q` +## Quality gates (must pass to report completion) + +- **ALL tests must pass with ZERO failures. No exceptions.** CI/CD runs the full test suite on every PR. A test failure blocks the build. +- **ALL lint checks (including mypy) must pass with ZERO errors.** Run `make lint` — all files, not just ones you modified. +- **Do not dismiss test or lint failures as pre-existing or unrelated.** The `main` branch CI/CD is green. Any failure on a feature branch was caused by changes on that branch. +- **CRITICAL — NEVER INVESTIGATE ERROR ORIGIN OR BLAME**: When a lint, type-check, or test error appears, **fix it immediately**. Do NOT run `git diff`, `git log`, `git show`, `git blame`, or any other command to determine whether the error is "pre-existing" or "from our changes". There is no scenario where knowing the origin of an error changes what you must do: **fix it**. +- **CRITICAL — NEVER PIPE TEST OR LINT OUTPUT**: Do not append `| tail`, `| head`, `| grep`, or any pipe to `pytest`, `make lint`, `make test`, or similar commands. Piping hides errors. Use pytest flags like `--tb=short -q` to reduce verbosity — never pipe. + ## Key Rules - Always run `poetry run black .` after making changes — CI will fail if formatting differs. @@ -23,6 +31,22 @@ Individual commands: - Do NOT edit files under `seclai/_generated/` — they are auto-generated from the OpenAPI spec. - The OpenAPI spec at `openapi/seclai.openapi.json` is shared identically with `seclai-go`. Changes must be synced to both repos. - Use the existing virtualenv (`poetry run ...`); do not create or reconfigure Python environments. +- **CRITICAL — USE EXISTING VIRTUAL ENV**: The workspace Python virtual environment is already set up. Reuse with `poetry run ...`; do **not** create, activate, or reconfigure another environment unless the user explicitly asks. +- **CRITICAL — NEVER CALL PYTHON ENVIRONMENT TOOLS**: Do not call `configure_python_environment`, `activate_python_environment_tools`, or any similar environment-management tool unless the user explicitly asks. +- Do not run ad-hoc Python snippets; add tests instead. + +## Git rules + +- **NEVER use `git stash`.** Use `git diff`, `git log`, or `git show` instead. +- Do not run `git checkout` to switch branches, `git reset`, or any other destructive git operation without explicit user approval. + +## Editing rules + +- Do not use CLI text tools (sed/awk). Use the editor-based patch tool. + +## Self-correction rules + +- **NEVER promise to "do better" without updating these instruction files.** If a recurring mistake is identified, edit this file with a concrete rule that prevents the mistake. Do that FIRST, then continue work. ## Architecture Notes diff --git a/openapi/seclai.openapi.json b/openapi/seclai.openapi.json index a20fe19..68b3863 100644 --- a/openapi/seclai.openapi.json +++ b/openapi/seclai.openapi.json @@ -107,6 +107,114 @@ "title": "AgentEvaluationTier", "type": "string" }, + "AgentExportResponse": { + "description": "Portable JSON snapshot of an agent definition.", + "properties": { + "agent": { + "additionalProperties": true, + "description": "Agent metadata and full definition. Keys: name, description, schema_version, definition, default_evaluation_tier, evaluation_mode, sampling_config, max_retries, retry_on_failure, prompt_model_auto_upgrade_strategy, prompt_model_auto_rollback_enabled, prompt_model_auto_rollback_triggers, created_at, updated_at.", + "title": "Agent", + "type": "object" + }, + "alert_configs": { + "anyOf": [ + { + "items": { + "additionalProperties": true, + "type": "object" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "Alert configurations.", + "title": "Alert Configs" + }, + "dependencies": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "description": "Resolved dependency manifest. Keys: knowledge_bases, memory_banks, source_connections, agents, users \u2014 each a list of {id, name, description, \u2026}.", + "title": "Dependencies" + }, + "evaluation_criteria": { + "anyOf": [ + { + "items": { + "additionalProperties": true, + "type": "object" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "Evaluation criteria for agent steps.", + "title": "Evaluation Criteria" + }, + "export_version": { + "description": "Schema version of the export format (currently \"2\").", + "title": "Export Version", + "type": "string" + }, + "exported_at": { + "description": "ISO-8601 timestamp of when the export was generated.", + "title": "Exported At", + "type": "string" + }, + "governance_policies": { + "anyOf": [ + { + "items": { + "additionalProperties": true, + "type": "object" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "Agent-scoped governance policies.", + "title": "Governance Policies" + }, + "software_version": { + "description": "Application version that produced this export.", + "title": "Software Version", + "type": "string" + }, + "trigger": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "description": "Trigger configuration with schedules.", + "title": "Trigger" + } + }, + "required": [ + "export_version", + "exported_at", + "software_version", + "agent" + ], + "title": "AgentExportResponse", + "type": "object" + }, "AgentRunAttemptResponse": { "properties": { "duration": { @@ -354,6 +462,18 @@ "description": "Timestamp when the step attempt ended.", "title": "Ended At" }, + "input": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Input provided to the step, if any.", + "title": "Input" + }, "output": { "anyOf": [ { @@ -404,6 +524,7 @@ "agent_step_id", "step_type", "status", + "input", "output", "output_content_type", "started_at", @@ -8871,6 +8992,64 @@ ] } }, + "/agents/{agent_id}/export": { + "get": { + "description": "Export an agent definition as a portable JSON snapshot.\n\nThe response contains the full definition, trigger configuration with schedules, alert configs, evaluation criteria, agent-scoped governance policies, and a resolved dependency manifest that maps every referenced external entity UUID to its human-readable name.\n\nResponse shape:\n- `export_version`: schema version (currently `\"2\"`)\n- `exported_at`: ISO-8601 timestamp\n- `agent`: name, description, schema_version, definition, timestamps\n- `trigger`: trigger type, input template, schedules\n- `alert_configs`: alert type, thresholds, recipients\n- `evaluation_criteria`: evaluation settings per step\n- `governance_policies`: agent-scoped governance policies\n- `dependencies`: knowledge_bases, memory_banks, source_connections, agents, users\n\nQuery params:\n- `download` (default true): when true, sets `Content-Disposition: attachment` so clients treat the response as a file download.\n\nAuth & scoping:\n- Requires `X-API-Key`. You can only export agents belonging to your account.", + "operationId": "export_agent_api_agents__agent_id__export_get", + "parameters": [ + { + "in": "path", + "name": "agent_id", + "required": true, + "schema": { + "title": "Agent Id", + "type": "string" + } + }, + { + "description": "Return as file download", + "in": "query", + "name": "download", + "required": false, + "schema": { + "default": true, + "description": "Return as file download", + "title": "Download", + "type": "boolean" + } + }, + { + "$ref": "#/components/parameters/X-Account-Id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentExportResponse" + } + } + }, + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "Export agent definition", + "tags": [ + "agents" + ] + } + }, "/agents/{agent_id}/input-uploads/{upload_id}": { "get": { "description": "Poll the processing status of a file upload created via `POST /agents/{agent_id}/upload-input`.\n\nPossible `status` values: `processing`, `ready`, `failed`.\n\nAuth & scoping:\n- Requires `X-API-Key` header or OAuth Bearer token. All resources are scoped to the caller's account.", diff --git a/seclai/_generated/api/agent_evaluations/__init__.py b/seclai/_generated/api/agent_evaluations/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/seclai/_generated/api/agent_evaluations/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/seclai/_generated/api/agent_evaluations/create_evaluation_criteria_api_agents_agent_id_evaluation_criteria_post.py b/seclai/_generated/api/agent_evaluations/create_evaluation_criteria_api_agents_agent_id_evaluation_criteria_post.py new file mode 100644 index 0000000..ecb7cc2 --- /dev/null +++ b/seclai/_generated/api/agent_evaluations/create_evaluation_criteria_api_agents_agent_id_evaluation_criteria_post.py @@ -0,0 +1,230 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.create_evaluation_criteria_request import CreateEvaluationCriteriaRequest +from ...models.evaluation_criteria_response import EvaluationCriteriaResponse +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + agent_id: str, + *, + body: CreateEvaluationCriteriaRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/agents/{agent_id}/evaluation-criteria".format( + agent_id=quote(str(agent_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> EvaluationCriteriaResponse | HTTPValidationError | None: + if response.status_code == 201: + response_201 = EvaluationCriteriaResponse.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[EvaluationCriteriaResponse | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, + body: CreateEvaluationCriteriaRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[EvaluationCriteriaResponse | HTTPValidationError]: + """Create Evaluation Criteria + + Create new step evaluation settings for an agent. + + The evaluation mode, retry settings, and sample frequency are inherited + from the agent and stored on the criteria row for historical reference. + + Args: + agent_id (str): + x_account_id (UUID | Unset): + body (CreateEvaluationCriteriaRequest): Request body for creating an evaluation criteria. + + The evaluation mode, retry settings, and sample frequency are set at the + agent level, not per-criteria. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvaluationCriteriaResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + agent_id: str, + *, + client: AuthenticatedClient | Client, + body: CreateEvaluationCriteriaRequest, + x_account_id: UUID | Unset = UNSET, +) -> EvaluationCriteriaResponse | HTTPValidationError | None: + """Create Evaluation Criteria + + Create new step evaluation settings for an agent. + + The evaluation mode, retry settings, and sample frequency are inherited + from the agent and stored on the criteria row for historical reference. + + Args: + agent_id (str): + x_account_id (UUID | Unset): + body (CreateEvaluationCriteriaRequest): Request body for creating an evaluation criteria. + + The evaluation mode, retry settings, and sample frequency are set at the + agent level, not per-criteria. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvaluationCriteriaResponse | HTTPValidationError + """ + + return sync_detailed( + agent_id=agent_id, + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, + body: CreateEvaluationCriteriaRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[EvaluationCriteriaResponse | HTTPValidationError]: + """Create Evaluation Criteria + + Create new step evaluation settings for an agent. + + The evaluation mode, retry settings, and sample frequency are inherited + from the agent and stored on the criteria row for historical reference. + + Args: + agent_id (str): + x_account_id (UUID | Unset): + body (CreateEvaluationCriteriaRequest): Request body for creating an evaluation criteria. + + The evaluation mode, retry settings, and sample frequency are set at the + agent level, not per-criteria. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvaluationCriteriaResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + agent_id: str, + *, + client: AuthenticatedClient | Client, + body: CreateEvaluationCriteriaRequest, + x_account_id: UUID | Unset = UNSET, +) -> EvaluationCriteriaResponse | HTTPValidationError | None: + """Create Evaluation Criteria + + Create new step evaluation settings for an agent. + + The evaluation mode, retry settings, and sample frequency are inherited + from the agent and stored on the criteria row for historical reference. + + Args: + agent_id (str): + x_account_id (UUID | Unset): + body (CreateEvaluationCriteriaRequest): Request body for creating an evaluation criteria. + + The evaluation mode, retry settings, and sample frequency are set at the + agent level, not per-criteria. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvaluationCriteriaResponse | HTTPValidationError + """ + + return ( + await asyncio_detailed( + agent_id=agent_id, + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/agent_evaluations/create_evaluation_result_api_agents_evaluation_criteria_criteria_id_results_post.py b/seclai/_generated/api/agent_evaluations/create_evaluation_result_api_agents_evaluation_criteria_criteria_id_results_post.py new file mode 100644 index 0000000..bfdbb66 --- /dev/null +++ b/seclai/_generated/api/agent_evaluations/create_evaluation_result_api_agents_evaluation_criteria_criteria_id_results_post.py @@ -0,0 +1,222 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.create_evaluation_result_request import CreateEvaluationResultRequest +from ...models.evaluation_result_response import EvaluationResultResponse +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + criteria_id: str, + *, + body: CreateEvaluationResultRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/agents/evaluation-criteria/{criteria_id}/results".format( + criteria_id=quote(str(criteria_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> EvaluationResultResponse | HTTPValidationError | None: + if response.status_code == 201: + response_201 = EvaluationResultResponse.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[EvaluationResultResponse | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + criteria_id: str, + *, + client: AuthenticatedClient | Client, + body: CreateEvaluationResultRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[EvaluationResultResponse | HTTPValidationError]: + """Create Evaluation Result + + Record an evaluation result for a criteria. + + Use this endpoint to push results from external test harnesses, CI/CD + pipelines, or custom evaluation logic. Each result is linked to an + agent run and optionally a specific step run. + + Args: + criteria_id (str): + x_account_id (UUID | Unset): + body (CreateEvaluationResultRequest): Request body for recording an evaluation result. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvaluationResultResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + criteria_id=criteria_id, + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + criteria_id: str, + *, + client: AuthenticatedClient | Client, + body: CreateEvaluationResultRequest, + x_account_id: UUID | Unset = UNSET, +) -> EvaluationResultResponse | HTTPValidationError | None: + """Create Evaluation Result + + Record an evaluation result for a criteria. + + Use this endpoint to push results from external test harnesses, CI/CD + pipelines, or custom evaluation logic. Each result is linked to an + agent run and optionally a specific step run. + + Args: + criteria_id (str): + x_account_id (UUID | Unset): + body (CreateEvaluationResultRequest): Request body for recording an evaluation result. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvaluationResultResponse | HTTPValidationError + """ + + return sync_detailed( + criteria_id=criteria_id, + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + criteria_id: str, + *, + client: AuthenticatedClient | Client, + body: CreateEvaluationResultRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[EvaluationResultResponse | HTTPValidationError]: + """Create Evaluation Result + + Record an evaluation result for a criteria. + + Use this endpoint to push results from external test harnesses, CI/CD + pipelines, or custom evaluation logic. Each result is linked to an + agent run and optionally a specific step run. + + Args: + criteria_id (str): + x_account_id (UUID | Unset): + body (CreateEvaluationResultRequest): Request body for recording an evaluation result. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvaluationResultResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + criteria_id=criteria_id, + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + criteria_id: str, + *, + client: AuthenticatedClient | Client, + body: CreateEvaluationResultRequest, + x_account_id: UUID | Unset = UNSET, +) -> EvaluationResultResponse | HTTPValidationError | None: + """Create Evaluation Result + + Record an evaluation result for a criteria. + + Use this endpoint to push results from external test harnesses, CI/CD + pipelines, or custom evaluation logic. Each result is linked to an + agent run and optionally a specific step run. + + Args: + criteria_id (str): + x_account_id (UUID | Unset): + body (CreateEvaluationResultRequest): Request body for recording an evaluation result. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvaluationResultResponse | HTTPValidationError + """ + + return ( + await asyncio_detailed( + criteria_id=criteria_id, + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/agent_evaluations/delete_evaluation_criteria_api_agents_evaluation_criteria_criteria_id_delete.py b/seclai/_generated/api/agent_evaluations/delete_evaluation_criteria_api_agents_evaluation_criteria_criteria_id_delete.py new file mode 100644 index 0000000..a5c1c26 --- /dev/null +++ b/seclai/_generated/api/agent_evaluations/delete_evaluation_criteria_api_agents_evaluation_criteria_criteria_id_delete.py @@ -0,0 +1,198 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + criteria_id: str, + *, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/agents/evaluation-criteria/{criteria_id}".format( + criteria_id=quote(str(criteria_id), safe=""), + ), + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | HTTPValidationError | None: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + criteria_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any | HTTPValidationError]: + """Delete Evaluation Criteria + + Delete an evaluation criteria and all associated evaluation results. + + This action is permanent and cannot be undone. All historical result + records tied to the criteria are removed as well. + + Args: + criteria_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + criteria_id=criteria_id, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + criteria_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Any | HTTPValidationError | None: + """Delete Evaluation Criteria + + Delete an evaluation criteria and all associated evaluation results. + + This action is permanent and cannot be undone. All historical result + records tied to the criteria are removed as well. + + Args: + criteria_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return sync_detailed( + criteria_id=criteria_id, + client=client, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + criteria_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any | HTTPValidationError]: + """Delete Evaluation Criteria + + Delete an evaluation criteria and all associated evaluation results. + + This action is permanent and cannot be undone. All historical result + records tied to the criteria are removed as well. + + Args: + criteria_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + criteria_id=criteria_id, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + criteria_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Any | HTTPValidationError | None: + """Delete Evaluation Criteria + + Delete an evaluation criteria and all associated evaluation results. + + This action is permanent and cannot be undone. All historical result + records tied to the criteria are removed as well. + + Args: + criteria_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return ( + await asyncio_detailed( + criteria_id=criteria_id, + client=client, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/agent_evaluations/get_evaluation_criteria_api_agents_evaluation_criteria_criteria_id_get.py b/seclai/_generated/api/agent_evaluations/get_evaluation_criteria_api_agents_evaluation_criteria_criteria_id_get.py new file mode 100644 index 0000000..aa062f8 --- /dev/null +++ b/seclai/_generated/api/agent_evaluations/get_evaluation_criteria_api_agents_evaluation_criteria_criteria_id_get.py @@ -0,0 +1,200 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.evaluation_criteria_response import EvaluationCriteriaResponse +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + criteria_id: str, + *, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/agents/evaluation-criteria/{criteria_id}".format( + criteria_id=quote(str(criteria_id), safe=""), + ), + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> EvaluationCriteriaResponse | HTTPValidationError | None: + if response.status_code == 200: + response_200 = EvaluationCriteriaResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[EvaluationCriteriaResponse | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + criteria_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[EvaluationCriteriaResponse | HTTPValidationError]: + """Get Evaluation Criteria + + Get a single evaluation criteria by ID. + + Returns the full criteria configuration including type-specific fields, + current enabled state, and a summary of recent evaluation results. + + Args: + criteria_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvaluationCriteriaResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + criteria_id=criteria_id, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + criteria_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> EvaluationCriteriaResponse | HTTPValidationError | None: + """Get Evaluation Criteria + + Get a single evaluation criteria by ID. + + Returns the full criteria configuration including type-specific fields, + current enabled state, and a summary of recent evaluation results. + + Args: + criteria_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvaluationCriteriaResponse | HTTPValidationError + """ + + return sync_detailed( + criteria_id=criteria_id, + client=client, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + criteria_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[EvaluationCriteriaResponse | HTTPValidationError]: + """Get Evaluation Criteria + + Get a single evaluation criteria by ID. + + Returns the full criteria configuration including type-specific fields, + current enabled state, and a summary of recent evaluation results. + + Args: + criteria_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvaluationCriteriaResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + criteria_id=criteria_id, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + criteria_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> EvaluationCriteriaResponse | HTTPValidationError | None: + """Get Evaluation Criteria + + Get a single evaluation criteria by ID. + + Returns the full criteria configuration including type-specific fields, + current enabled state, and a summary of recent evaluation results. + + Args: + criteria_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvaluationCriteriaResponse | HTTPValidationError + """ + + return ( + await asyncio_detailed( + criteria_id=criteria_id, + client=client, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/agent_evaluations/get_evaluation_summary_api_agents_evaluation_criteria_criteria_id_summary_get.py b/seclai/_generated/api/agent_evaluations/get_evaluation_summary_api_agents_evaluation_criteria_criteria_id_summary_get.py new file mode 100644 index 0000000..98e5f27 --- /dev/null +++ b/seclai/_generated/api/agent_evaluations/get_evaluation_summary_api_agents_evaluation_criteria_criteria_id_summary_get.py @@ -0,0 +1,200 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.evaluation_result_summary_response import EvaluationResultSummaryResponse +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + criteria_id: str, + *, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/agents/evaluation-criteria/{criteria_id}/summary".format( + criteria_id=quote(str(criteria_id), safe=""), + ), + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> EvaluationResultSummaryResponse | HTTPValidationError | None: + if response.status_code == 200: + response_200 = EvaluationResultSummaryResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[EvaluationResultSummaryResponse | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + criteria_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[EvaluationResultSummaryResponse | HTTPValidationError]: + """Get Evaluation Summary + + Get an aggregated summary of evaluation results for a criteria. + + Returns total, passed, failed, error, and flagged counts alongside the + average score, giving a quick overview of how the criteria is performing. + + Args: + criteria_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvaluationResultSummaryResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + criteria_id=criteria_id, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + criteria_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> EvaluationResultSummaryResponse | HTTPValidationError | None: + """Get Evaluation Summary + + Get an aggregated summary of evaluation results for a criteria. + + Returns total, passed, failed, error, and flagged counts alongside the + average score, giving a quick overview of how the criteria is performing. + + Args: + criteria_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvaluationResultSummaryResponse | HTTPValidationError + """ + + return sync_detailed( + criteria_id=criteria_id, + client=client, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + criteria_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[EvaluationResultSummaryResponse | HTTPValidationError]: + """Get Evaluation Summary + + Get an aggregated summary of evaluation results for a criteria. + + Returns total, passed, failed, error, and flagged counts alongside the + average score, giving a quick overview of how the criteria is performing. + + Args: + criteria_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvaluationResultSummaryResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + criteria_id=criteria_id, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + criteria_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> EvaluationResultSummaryResponse | HTTPValidationError | None: + """Get Evaluation Summary + + Get an aggregated summary of evaluation results for a criteria. + + Returns total, passed, failed, error, and flagged counts alongside the + average score, giving a quick overview of how the criteria is performing. + + Args: + criteria_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvaluationResultSummaryResponse | HTTPValidationError + """ + + return ( + await asyncio_detailed( + criteria_id=criteria_id, + client=client, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/agent_evaluations/get_non_manual_evaluation_summary_api_agents_evaluation_results_non_manual_summary_get.py b/seclai/_generated/api/agent_evaluations/get_non_manual_evaluation_summary_api_agents_evaluation_results_non_manual_summary_get.py new file mode 100644 index 0000000..1ac2c80 --- /dev/null +++ b/seclai/_generated/api/agent_evaluations/get_non_manual_evaluation_summary_api_agents_evaluation_results_non_manual_summary_get.py @@ -0,0 +1,246 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.non_manual_evaluation_summary_response import ( + NonManualEvaluationSummaryResponse, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + days: int | Unset = 30, + start_date: None | str | Unset = UNSET, + end_date: None | str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + params: dict[str, Any] = {} + + params["days"] = days + + json_start_date: None | str | Unset + if isinstance(start_date, Unset): + json_start_date = UNSET + else: + json_start_date = start_date + params["start_date"] = json_start_date + + json_end_date: None | str | Unset + if isinstance(end_date, Unset): + json_end_date = UNSET + else: + json_end_date = end_date + params["end_date"] = json_end_date + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/agents/evaluation-results/non-manual-summary", + "params": params, + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> HTTPValidationError | NonManualEvaluationSummaryResponse | None: + if response.status_code == 200: + response_200 = NonManualEvaluationSummaryResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[HTTPValidationError | NonManualEvaluationSummaryResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + days: int | Unset = 30, + start_date: None | str | Unset = UNSET, + end_date: None | str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | NonManualEvaluationSummaryResponse]: + """Get Non Manual Evaluation Summary + + Get account-level evaluation summary for API key clients. + + Returns aggregated pass/fail/flagged counts and pass rates for each evaluation mode (eval_and_retry, + sample_and_flag). + + Args: + days (int | Unset): Default: 30. + start_date (None | str | Unset): + end_date (None | str | Unset): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | NonManualEvaluationSummaryResponse] + """ + + kwargs = _get_kwargs( + days=days, + start_date=start_date, + end_date=end_date, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + days: int | Unset = 30, + start_date: None | str | Unset = UNSET, + end_date: None | str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | NonManualEvaluationSummaryResponse | None: + """Get Non Manual Evaluation Summary + + Get account-level evaluation summary for API key clients. + + Returns aggregated pass/fail/flagged counts and pass rates for each evaluation mode (eval_and_retry, + sample_and_flag). + + Args: + days (int | Unset): Default: 30. + start_date (None | str | Unset): + end_date (None | str | Unset): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | NonManualEvaluationSummaryResponse + """ + + return sync_detailed( + client=client, + days=days, + start_date=start_date, + end_date=end_date, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + days: int | Unset = 30, + start_date: None | str | Unset = UNSET, + end_date: None | str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | NonManualEvaluationSummaryResponse]: + """Get Non Manual Evaluation Summary + + Get account-level evaluation summary for API key clients. + + Returns aggregated pass/fail/flagged counts and pass rates for each evaluation mode (eval_and_retry, + sample_and_flag). + + Args: + days (int | Unset): Default: 30. + start_date (None | str | Unset): + end_date (None | str | Unset): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | NonManualEvaluationSummaryResponse] + """ + + kwargs = _get_kwargs( + days=days, + start_date=start_date, + end_date=end_date, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + days: int | Unset = 30, + start_date: None | str | Unset = UNSET, + end_date: None | str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | NonManualEvaluationSummaryResponse | None: + """Get Non Manual Evaluation Summary + + Get account-level evaluation summary for API key clients. + + Returns aggregated pass/fail/flagged counts and pass rates for each evaluation mode (eval_and_retry, + sample_and_flag). + + Args: + days (int | Unset): Default: 30. + start_date (None | str | Unset): + end_date (None | str | Unset): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | NonManualEvaluationSummaryResponse + """ + + return ( + await asyncio_detailed( + client=client, + days=days, + start_date=start_date, + end_date=end_date, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/agent_evaluations/list_agent_evaluation_results_api_agents_agent_id_evaluation_results_get.py b/seclai/_generated/api/agent_evaluations/list_agent_evaluation_results_api_agents_agent_id_evaluation_results_get.py new file mode 100644 index 0000000..ffdc855 --- /dev/null +++ b/seclai/_generated/api/agent_evaluations/list_agent_evaluation_results_api_agents_agent_id_evaluation_results_get.py @@ -0,0 +1,334 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.evaluation_result_with_criteria_list_response import ( + EvaluationResultWithCriteriaListResponse, +) +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + agent_id: str, + *, + status: None | str | Unset = UNSET, + step: None | str | Unset = UNSET, + flagged_only: bool | Unset = False, + time_from: None | str | Unset = UNSET, + time_to: None | str | Unset = UNSET, + page: int | Unset = 1, + limit: int | Unset = 20, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + params: dict[str, Any] = {} + + json_status: None | str | Unset + if isinstance(status, Unset): + json_status = UNSET + else: + json_status = status + params["status"] = json_status + + json_step: None | str | Unset + if isinstance(step, Unset): + json_step = UNSET + else: + json_step = step + params["step"] = json_step + + params["flagged_only"] = flagged_only + + json_time_from: None | str | Unset + if isinstance(time_from, Unset): + json_time_from = UNSET + else: + json_time_from = time_from + params["time_from"] = json_time_from + + json_time_to: None | str | Unset + if isinstance(time_to, Unset): + json_time_to = UNSET + else: + json_time_to = time_to + params["time_to"] = json_time_to + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/agents/{agent_id}/evaluation-results".format( + agent_id=quote(str(agent_id), safe=""), + ), + "params": params, + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> EvaluationResultWithCriteriaListResponse | HTTPValidationError | None: + if response.status_code == 200: + response_200 = EvaluationResultWithCriteriaListResponse.from_dict( + response.json() + ) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[EvaluationResultWithCriteriaListResponse | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, + status: None | str | Unset = UNSET, + step: None | str | Unset = UNSET, + flagged_only: bool | Unset = False, + time_from: None | str | Unset = UNSET, + time_to: None | str | Unset = UNSET, + page: int | Unset = 1, + limit: int | Unset = 20, + x_account_id: UUID | Unset = UNSET, +) -> Response[EvaluationResultWithCriteriaListResponse | HTTPValidationError]: + """List Agent Evaluation Results + + List evaluation results across all criteria configured on an agent. + + Returns a paginated list of evaluation results with optional filtering by status, criteria, and date + range. Results include score, pass/fail status, and details. + + Args: + agent_id (str): + status (None | str | Unset): + step (None | str | Unset): + flagged_only (bool | Unset): Default: False. + time_from (None | str | Unset): + time_to (None | str | Unset): + page (int | Unset): Default: 1. + limit (int | Unset): Default: 20. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvaluationResultWithCriteriaListResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + status=status, + step=step, + flagged_only=flagged_only, + time_from=time_from, + time_to=time_to, + page=page, + limit=limit, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + agent_id: str, + *, + client: AuthenticatedClient | Client, + status: None | str | Unset = UNSET, + step: None | str | Unset = UNSET, + flagged_only: bool | Unset = False, + time_from: None | str | Unset = UNSET, + time_to: None | str | Unset = UNSET, + page: int | Unset = 1, + limit: int | Unset = 20, + x_account_id: UUID | Unset = UNSET, +) -> EvaluationResultWithCriteriaListResponse | HTTPValidationError | None: + """List Agent Evaluation Results + + List evaluation results across all criteria configured on an agent. + + Returns a paginated list of evaluation results with optional filtering by status, criteria, and date + range. Results include score, pass/fail status, and details. + + Args: + agent_id (str): + status (None | str | Unset): + step (None | str | Unset): + flagged_only (bool | Unset): Default: False. + time_from (None | str | Unset): + time_to (None | str | Unset): + page (int | Unset): Default: 1. + limit (int | Unset): Default: 20. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvaluationResultWithCriteriaListResponse | HTTPValidationError + """ + + return sync_detailed( + agent_id=agent_id, + client=client, + status=status, + step=step, + flagged_only=flagged_only, + time_from=time_from, + time_to=time_to, + page=page, + limit=limit, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, + status: None | str | Unset = UNSET, + step: None | str | Unset = UNSET, + flagged_only: bool | Unset = False, + time_from: None | str | Unset = UNSET, + time_to: None | str | Unset = UNSET, + page: int | Unset = 1, + limit: int | Unset = 20, + x_account_id: UUID | Unset = UNSET, +) -> Response[EvaluationResultWithCriteriaListResponse | HTTPValidationError]: + """List Agent Evaluation Results + + List evaluation results across all criteria configured on an agent. + + Returns a paginated list of evaluation results with optional filtering by status, criteria, and date + range. Results include score, pass/fail status, and details. + + Args: + agent_id (str): + status (None | str | Unset): + step (None | str | Unset): + flagged_only (bool | Unset): Default: False. + time_from (None | str | Unset): + time_to (None | str | Unset): + page (int | Unset): Default: 1. + limit (int | Unset): Default: 20. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvaluationResultWithCriteriaListResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + status=status, + step=step, + flagged_only=flagged_only, + time_from=time_from, + time_to=time_to, + page=page, + limit=limit, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + agent_id: str, + *, + client: AuthenticatedClient | Client, + status: None | str | Unset = UNSET, + step: None | str | Unset = UNSET, + flagged_only: bool | Unset = False, + time_from: None | str | Unset = UNSET, + time_to: None | str | Unset = UNSET, + page: int | Unset = 1, + limit: int | Unset = 20, + x_account_id: UUID | Unset = UNSET, +) -> EvaluationResultWithCriteriaListResponse | HTTPValidationError | None: + """List Agent Evaluation Results + + List evaluation results across all criteria configured on an agent. + + Returns a paginated list of evaluation results with optional filtering by status, criteria, and date + range. Results include score, pass/fail status, and details. + + Args: + agent_id (str): + status (None | str | Unset): + step (None | str | Unset): + flagged_only (bool | Unset): Default: False. + time_from (None | str | Unset): + time_to (None | str | Unset): + page (int | Unset): Default: 1. + limit (int | Unset): Default: 20. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvaluationResultWithCriteriaListResponse | HTTPValidationError + """ + + return ( + await asyncio_detailed( + agent_id=agent_id, + client=client, + status=status, + step=step, + flagged_only=flagged_only, + time_from=time_from, + time_to=time_to, + page=page, + limit=limit, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/agent_evaluations/list_compatible_runs_api_agents_evaluation_criteria_criteria_id_compatible_runs_get.py b/seclai/_generated/api/agent_evaluations/list_compatible_runs_api_agents_evaluation_criteria_criteria_id_compatible_runs_get.py new file mode 100644 index 0000000..8b3a9de --- /dev/null +++ b/seclai/_generated/api/agent_evaluations/list_compatible_runs_api_agents_evaluation_criteria_criteria_id_compatible_runs_get.py @@ -0,0 +1,258 @@ +import datetime +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.compatible_run_list_response import CompatibleRunListResponse +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + criteria_id: str, + *, + page: int | Unset = 1, + limit: int | Unset = 20, + started_after: datetime.datetime | None | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + json_started_after: None | str | Unset + if isinstance(started_after, Unset): + json_started_after = UNSET + elif isinstance(started_after, datetime.datetime): + json_started_after = started_after.isoformat() + else: + json_started_after = started_after + params["started_after"] = json_started_after + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/agents/evaluation-criteria/{criteria_id}/compatible-runs".format( + criteria_id=quote(str(criteria_id), safe=""), + ), + "params": params, + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CompatibleRunListResponse | HTTPValidationError | None: + if response.status_code == 200: + response_200 = CompatibleRunListResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CompatibleRunListResponse | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + criteria_id: str, + *, + client: AuthenticatedClient | Client, + page: int | Unset = 1, + limit: int | Unset = 20, + started_after: datetime.datetime | None | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> Response[CompatibleRunListResponse | HTTPValidationError]: + """List Compatible Runs + + List agent runs that have a completed step matching the criteria's target step. + + Returns runs whose step output can be used for testing or replaying the + evaluation criteria. Results are ordered newest-first and paginated. + + Args: + criteria_id (str): + page (int | Unset): Default: 1. + limit (int | Unset): Default: 20. + started_after (datetime.datetime | None | Unset): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CompatibleRunListResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + criteria_id=criteria_id, + page=page, + limit=limit, + started_after=started_after, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + criteria_id: str, + *, + client: AuthenticatedClient | Client, + page: int | Unset = 1, + limit: int | Unset = 20, + started_after: datetime.datetime | None | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> CompatibleRunListResponse | HTTPValidationError | None: + """List Compatible Runs + + List agent runs that have a completed step matching the criteria's target step. + + Returns runs whose step output can be used for testing or replaying the + evaluation criteria. Results are ordered newest-first and paginated. + + Args: + criteria_id (str): + page (int | Unset): Default: 1. + limit (int | Unset): Default: 20. + started_after (datetime.datetime | None | Unset): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CompatibleRunListResponse | HTTPValidationError + """ + + return sync_detailed( + criteria_id=criteria_id, + client=client, + page=page, + limit=limit, + started_after=started_after, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + criteria_id: str, + *, + client: AuthenticatedClient | Client, + page: int | Unset = 1, + limit: int | Unset = 20, + started_after: datetime.datetime | None | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> Response[CompatibleRunListResponse | HTTPValidationError]: + """List Compatible Runs + + List agent runs that have a completed step matching the criteria's target step. + + Returns runs whose step output can be used for testing or replaying the + evaluation criteria. Results are ordered newest-first and paginated. + + Args: + criteria_id (str): + page (int | Unset): Default: 1. + limit (int | Unset): Default: 20. + started_after (datetime.datetime | None | Unset): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CompatibleRunListResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + criteria_id=criteria_id, + page=page, + limit=limit, + started_after=started_after, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + criteria_id: str, + *, + client: AuthenticatedClient | Client, + page: int | Unset = 1, + limit: int | Unset = 20, + started_after: datetime.datetime | None | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> CompatibleRunListResponse | HTTPValidationError | None: + """List Compatible Runs + + List agent runs that have a completed step matching the criteria's target step. + + Returns runs whose step output can be used for testing or replaying the + evaluation criteria. Results are ordered newest-first and paginated. + + Args: + criteria_id (str): + page (int | Unset): Default: 1. + limit (int | Unset): Default: 20. + started_after (datetime.datetime | None | Unset): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CompatibleRunListResponse | HTTPValidationError + """ + + return ( + await asyncio_detailed( + criteria_id=criteria_id, + client=client, + page=page, + limit=limit, + started_after=started_after, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/agent_evaluations/list_evaluation_criteria_api_agents_agent_id_evaluation_criteria_get.py b/seclai/_generated/api/agent_evaluations/list_evaluation_criteria_api_agents_agent_id_evaluation_criteria_get.py new file mode 100644 index 0000000..47f489d --- /dev/null +++ b/seclai/_generated/api/agent_evaluations/list_evaluation_criteria_api_agents_agent_id_evaluation_criteria_get.py @@ -0,0 +1,211 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.evaluation_criteria_response import EvaluationCriteriaResponse +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + agent_id: str, + *, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/agents/{agent_id}/evaluation-criteria".format( + agent_id=quote(str(agent_id), safe=""), + ), + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> HTTPValidationError | list[EvaluationCriteriaResponse] | None: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = EvaluationCriteriaResponse.from_dict( + response_200_item_data + ) + + response_200.append(response_200_item) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[HTTPValidationError | list[EvaluationCriteriaResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | list[EvaluationCriteriaResponse]]: + """List Evaluation Criteria + + List all evaluation criteria configured for an agent. + + Returns every criteria with its type, configuration, and a summary of + results (pass / fail counts). Criteria can be filtered client-side by + type or enabled status. + + Args: + agent_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | list[EvaluationCriteriaResponse]] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + agent_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | list[EvaluationCriteriaResponse] | None: + """List Evaluation Criteria + + List all evaluation criteria configured for an agent. + + Returns every criteria with its type, configuration, and a summary of + results (pass / fail counts). Criteria can be filtered client-side by + type or enabled status. + + Args: + agent_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | list[EvaluationCriteriaResponse] + """ + + return sync_detailed( + agent_id=agent_id, + client=client, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | list[EvaluationCriteriaResponse]]: + """List Evaluation Criteria + + List all evaluation criteria configured for an agent. + + Returns every criteria with its type, configuration, and a summary of + results (pass / fail counts). Criteria can be filtered client-side by + type or enabled status. + + Args: + agent_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | list[EvaluationCriteriaResponse]] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + agent_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | list[EvaluationCriteriaResponse] | None: + """List Evaluation Criteria + + List all evaluation criteria configured for an agent. + + Returns every criteria with its type, configuration, and a summary of + results (pass / fail counts). Criteria can be filtered client-side by + type or enabled status. + + Args: + agent_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | list[EvaluationCriteriaResponse] + """ + + return ( + await asyncio_detailed( + agent_id=agent_id, + client=client, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/agent_evaluations/list_evaluation_results_api_agents_evaluation_criteria_criteria_id_results_get.py b/seclai/_generated/api/agent_evaluations/list_evaluation_results_api_agents_evaluation_criteria_criteria_id_results_get.py new file mode 100644 index 0000000..3f7989f --- /dev/null +++ b/seclai/_generated/api/agent_evaluations/list_evaluation_results_api_agents_evaluation_criteria_criteria_id_results_get.py @@ -0,0 +1,314 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.evaluation_result_list_response import EvaluationResultListResponse +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + criteria_id: str, + *, + status: None | str | Unset = UNSET, + flagged_only: bool | Unset = False, + time_from: None | str | Unset = UNSET, + time_to: None | str | Unset = UNSET, + page: int | Unset = 1, + limit: int | Unset = 20, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + params: dict[str, Any] = {} + + json_status: None | str | Unset + if isinstance(status, Unset): + json_status = UNSET + else: + json_status = status + params["status"] = json_status + + params["flagged_only"] = flagged_only + + json_time_from: None | str | Unset + if isinstance(time_from, Unset): + json_time_from = UNSET + else: + json_time_from = time_from + params["time_from"] = json_time_from + + json_time_to: None | str | Unset + if isinstance(time_to, Unset): + json_time_to = UNSET + else: + json_time_to = time_to + params["time_to"] = json_time_to + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/agents/evaluation-criteria/{criteria_id}/results".format( + criteria_id=quote(str(criteria_id), safe=""), + ), + "params": params, + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> EvaluationResultListResponse | HTTPValidationError | None: + if response.status_code == 200: + response_200 = EvaluationResultListResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[EvaluationResultListResponse | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + criteria_id: str, + *, + client: AuthenticatedClient | Client, + status: None | str | Unset = UNSET, + flagged_only: bool | Unset = False, + time_from: None | str | Unset = UNSET, + time_to: None | str | Unset = UNSET, + page: int | Unset = 1, + limit: int | Unset = 20, + x_account_id: UUID | Unset = UNSET, +) -> Response[EvaluationResultListResponse | HTTPValidationError]: + """List Evaluation Results + + List evaluation results for a criteria with optional filtering. + + Supports filtering by status (pending, passed, failed, skipped, error), + flagged-only mode, and an optional time range. Results are paginated + with configurable page size. + + Args: + criteria_id (str): + status (None | str | Unset): + flagged_only (bool | Unset): Default: False. + time_from (None | str | Unset): + time_to (None | str | Unset): + page (int | Unset): Default: 1. + limit (int | Unset): Default: 20. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvaluationResultListResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + criteria_id=criteria_id, + status=status, + flagged_only=flagged_only, + time_from=time_from, + time_to=time_to, + page=page, + limit=limit, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + criteria_id: str, + *, + client: AuthenticatedClient | Client, + status: None | str | Unset = UNSET, + flagged_only: bool | Unset = False, + time_from: None | str | Unset = UNSET, + time_to: None | str | Unset = UNSET, + page: int | Unset = 1, + limit: int | Unset = 20, + x_account_id: UUID | Unset = UNSET, +) -> EvaluationResultListResponse | HTTPValidationError | None: + """List Evaluation Results + + List evaluation results for a criteria with optional filtering. + + Supports filtering by status (pending, passed, failed, skipped, error), + flagged-only mode, and an optional time range. Results are paginated + with configurable page size. + + Args: + criteria_id (str): + status (None | str | Unset): + flagged_only (bool | Unset): Default: False. + time_from (None | str | Unset): + time_to (None | str | Unset): + page (int | Unset): Default: 1. + limit (int | Unset): Default: 20. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvaluationResultListResponse | HTTPValidationError + """ + + return sync_detailed( + criteria_id=criteria_id, + client=client, + status=status, + flagged_only=flagged_only, + time_from=time_from, + time_to=time_to, + page=page, + limit=limit, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + criteria_id: str, + *, + client: AuthenticatedClient | Client, + status: None | str | Unset = UNSET, + flagged_only: bool | Unset = False, + time_from: None | str | Unset = UNSET, + time_to: None | str | Unset = UNSET, + page: int | Unset = 1, + limit: int | Unset = 20, + x_account_id: UUID | Unset = UNSET, +) -> Response[EvaluationResultListResponse | HTTPValidationError]: + """List Evaluation Results + + List evaluation results for a criteria with optional filtering. + + Supports filtering by status (pending, passed, failed, skipped, error), + flagged-only mode, and an optional time range. Results are paginated + with configurable page size. + + Args: + criteria_id (str): + status (None | str | Unset): + flagged_only (bool | Unset): Default: False. + time_from (None | str | Unset): + time_to (None | str | Unset): + page (int | Unset): Default: 1. + limit (int | Unset): Default: 20. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvaluationResultListResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + criteria_id=criteria_id, + status=status, + flagged_only=flagged_only, + time_from=time_from, + time_to=time_to, + page=page, + limit=limit, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + criteria_id: str, + *, + client: AuthenticatedClient | Client, + status: None | str | Unset = UNSET, + flagged_only: bool | Unset = False, + time_from: None | str | Unset = UNSET, + time_to: None | str | Unset = UNSET, + page: int | Unset = 1, + limit: int | Unset = 20, + x_account_id: UUID | Unset = UNSET, +) -> EvaluationResultListResponse | HTTPValidationError | None: + """List Evaluation Results + + List evaluation results for a criteria with optional filtering. + + Supports filtering by status (pending, passed, failed, skipped, error), + flagged-only mode, and an optional time range. Results are paginated + with configurable page size. + + Args: + criteria_id (str): + status (None | str | Unset): + flagged_only (bool | Unset): Default: False. + time_from (None | str | Unset): + time_to (None | str | Unset): + page (int | Unset): Default: 1. + limit (int | Unset): Default: 20. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvaluationResultListResponse | HTTPValidationError + """ + + return ( + await asyncio_detailed( + criteria_id=criteria_id, + client=client, + status=status, + flagged_only=flagged_only, + time_from=time_from, + time_to=time_to, + page=page, + limit=limit, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/agent_evaluations/list_evaluation_runs_api_agents_agent_id_evaluation_runs_get.py b/seclai/_generated/api/agent_evaluations/list_evaluation_runs_api_agents_agent_id_evaluation_runs_get.py new file mode 100644 index 0000000..27b49c7 --- /dev/null +++ b/seclai/_generated/api/agent_evaluations/list_evaluation_runs_api_agents_agent_id_evaluation_runs_get.py @@ -0,0 +1,317 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.evaluation_run_summary_list_response import ( + EvaluationRunSummaryListResponse, +) +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + agent_id: str, + *, + status: None | str | Unset = UNSET, + step: None | str | Unset = UNSET, + time_from: None | str | Unset = UNSET, + time_to: None | str | Unset = UNSET, + page: int | Unset = 1, + limit: int | Unset = 20, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + params: dict[str, Any] = {} + + json_status: None | str | Unset + if isinstance(status, Unset): + json_status = UNSET + else: + json_status = status + params["status"] = json_status + + json_step: None | str | Unset + if isinstance(step, Unset): + json_step = UNSET + else: + json_step = step + params["step"] = json_step + + json_time_from: None | str | Unset + if isinstance(time_from, Unset): + json_time_from = UNSET + else: + json_time_from = time_from + params["time_from"] = json_time_from + + json_time_to: None | str | Unset + if isinstance(time_to, Unset): + json_time_to = UNSET + else: + json_time_to = time_to + params["time_to"] = json_time_to + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/agents/{agent_id}/evaluation-runs".format( + agent_id=quote(str(agent_id), safe=""), + ), + "params": params, + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> EvaluationRunSummaryListResponse | HTTPValidationError | None: + if response.status_code == 200: + response_200 = EvaluationRunSummaryListResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[EvaluationRunSummaryListResponse | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, + status: None | str | Unset = UNSET, + step: None | str | Unset = UNSET, + time_from: None | str | Unset = UNSET, + time_to: None | str | Unset = UNSET, + page: int | Unset = 1, + limit: int | Unset = 20, + x_account_id: UUID | Unset = UNSET, +) -> Response[EvaluationRunSummaryListResponse | HTTPValidationError]: + """List Evaluation Runs + + List evaluation results grouped by agent run. + + Returns paginated per-run summaries with pass/fail counts and optional + filtering by evaluation outcome, step, or date range. + + Args: + agent_id (str): + status (None | str | Unset): + step (None | str | Unset): + time_from (None | str | Unset): + time_to (None | str | Unset): + page (int | Unset): Default: 1. + limit (int | Unset): Default: 20. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvaluationRunSummaryListResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + status=status, + step=step, + time_from=time_from, + time_to=time_to, + page=page, + limit=limit, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + agent_id: str, + *, + client: AuthenticatedClient | Client, + status: None | str | Unset = UNSET, + step: None | str | Unset = UNSET, + time_from: None | str | Unset = UNSET, + time_to: None | str | Unset = UNSET, + page: int | Unset = 1, + limit: int | Unset = 20, + x_account_id: UUID | Unset = UNSET, +) -> EvaluationRunSummaryListResponse | HTTPValidationError | None: + """List Evaluation Runs + + List evaluation results grouped by agent run. + + Returns paginated per-run summaries with pass/fail counts and optional + filtering by evaluation outcome, step, or date range. + + Args: + agent_id (str): + status (None | str | Unset): + step (None | str | Unset): + time_from (None | str | Unset): + time_to (None | str | Unset): + page (int | Unset): Default: 1. + limit (int | Unset): Default: 20. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvaluationRunSummaryListResponse | HTTPValidationError + """ + + return sync_detailed( + agent_id=agent_id, + client=client, + status=status, + step=step, + time_from=time_from, + time_to=time_to, + page=page, + limit=limit, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, + status: None | str | Unset = UNSET, + step: None | str | Unset = UNSET, + time_from: None | str | Unset = UNSET, + time_to: None | str | Unset = UNSET, + page: int | Unset = 1, + limit: int | Unset = 20, + x_account_id: UUID | Unset = UNSET, +) -> Response[EvaluationRunSummaryListResponse | HTTPValidationError]: + """List Evaluation Runs + + List evaluation results grouped by agent run. + + Returns paginated per-run summaries with pass/fail counts and optional + filtering by evaluation outcome, step, or date range. + + Args: + agent_id (str): + status (None | str | Unset): + step (None | str | Unset): + time_from (None | str | Unset): + time_to (None | str | Unset): + page (int | Unset): Default: 1. + limit (int | Unset): Default: 20. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvaluationRunSummaryListResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + status=status, + step=step, + time_from=time_from, + time_to=time_to, + page=page, + limit=limit, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + agent_id: str, + *, + client: AuthenticatedClient | Client, + status: None | str | Unset = UNSET, + step: None | str | Unset = UNSET, + time_from: None | str | Unset = UNSET, + time_to: None | str | Unset = UNSET, + page: int | Unset = 1, + limit: int | Unset = 20, + x_account_id: UUID | Unset = UNSET, +) -> EvaluationRunSummaryListResponse | HTTPValidationError | None: + """List Evaluation Runs + + List evaluation results grouped by agent run. + + Returns paginated per-run summaries with pass/fail counts and optional + filtering by evaluation outcome, step, or date range. + + Args: + agent_id (str): + status (None | str | Unset): + step (None | str | Unset): + time_from (None | str | Unset): + time_to (None | str | Unset): + page (int | Unset): Default: 1. + limit (int | Unset): Default: 20. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvaluationRunSummaryListResponse | HTTPValidationError + """ + + return ( + await asyncio_detailed( + agent_id=agent_id, + client=client, + status=status, + step=step, + time_from=time_from, + time_to=time_to, + page=page, + limit=limit, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/agent_evaluations/list_run_evaluation_results_api_agents_agent_id_runs_run_id_evaluation_results_get.py b/seclai/_generated/api/agent_evaluations/list_run_evaluation_results_api_agents_agent_id_runs_run_id_evaluation_results_get.py new file mode 100644 index 0000000..af58dc6 --- /dev/null +++ b/seclai/_generated/api/agent_evaluations/list_run_evaluation_results_api_agents_agent_id_runs_run_id_evaluation_results_get.py @@ -0,0 +1,223 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.evaluation_result_with_criteria_response import ( + EvaluationResultWithCriteriaResponse, +) +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + agent_id: str, + run_id: str, + *, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/agents/{agent_id}/runs/{run_id}/evaluation-results".format( + agent_id=quote(str(agent_id), safe=""), + run_id=quote(str(run_id), safe=""), + ), + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> HTTPValidationError | list[EvaluationResultWithCriteriaResponse] | None: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = EvaluationResultWithCriteriaResponse.from_dict( + response_200_item_data + ) + + response_200.append(response_200_item) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[HTTPValidationError | list[EvaluationResultWithCriteriaResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + agent_id: str, + run_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | list[EvaluationResultWithCriteriaResponse]]: + """List Run Evaluation Results + + List all evaluation results recorded for a specific agent run. + + Returns results across all evaluation criteria for the given run, + useful for getting a complete quality snapshot of a single execution. + + Args: + agent_id (str): + run_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | list[EvaluationResultWithCriteriaResponse]] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + run_id=run_id, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + agent_id: str, + run_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | list[EvaluationResultWithCriteriaResponse] | None: + """List Run Evaluation Results + + List all evaluation results recorded for a specific agent run. + + Returns results across all evaluation criteria for the given run, + useful for getting a complete quality snapshot of a single execution. + + Args: + agent_id (str): + run_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | list[EvaluationResultWithCriteriaResponse] + """ + + return sync_detailed( + agent_id=agent_id, + run_id=run_id, + client=client, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + agent_id: str, + run_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | list[EvaluationResultWithCriteriaResponse]]: + """List Run Evaluation Results + + List all evaluation results recorded for a specific agent run. + + Returns results across all evaluation criteria for the given run, + useful for getting a complete quality snapshot of a single execution. + + Args: + agent_id (str): + run_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | list[EvaluationResultWithCriteriaResponse]] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + run_id=run_id, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + agent_id: str, + run_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | list[EvaluationResultWithCriteriaResponse] | None: + """List Run Evaluation Results + + List all evaluation results recorded for a specific agent run. + + Returns results across all evaluation criteria for the given run, + useful for getting a complete quality snapshot of a single execution. + + Args: + agent_id (str): + run_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | list[EvaluationResultWithCriteriaResponse] + """ + + return ( + await asyncio_detailed( + agent_id=agent_id, + run_id=run_id, + client=client, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/agent_evaluations/test_draft_evaluation_api_agents_agent_id_evaluation_criteria_test_draft_post.py b/seclai/_generated/api/agent_evaluations/test_draft_evaluation_api_agents_agent_id_evaluation_criteria_test_draft_post.py new file mode 100644 index 0000000..0da5842 --- /dev/null +++ b/seclai/_generated/api/agent_evaluations/test_draft_evaluation_api_agents_agent_id_evaluation_criteria_test_draft_post.py @@ -0,0 +1,238 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.test_draft_evaluation_request import TestDraftEvaluationRequest +from ...models.test_draft_evaluation_response import TestDraftEvaluationResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + agent_id: str, + *, + body: TestDraftEvaluationRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/agents/{agent_id}/evaluation-criteria/test-draft".format( + agent_id=quote(str(agent_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> HTTPValidationError | TestDraftEvaluationResponse | None: + if response.status_code == 200: + response_200 = TestDraftEvaluationResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[HTTPValidationError | TestDraftEvaluationResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, + body: TestDraftEvaluationRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | TestDraftEvaluationResponse]: + """Test Draft Evaluation + + Run an ephemeral evaluation against provided step output without persisting results. + + Use this to interactively test evaluation prompts and expectation + configurations while editing criteria. No credits are consumed because + the result is not recorded. + + Args: + agent_id (str): + x_account_id (UUID | Unset): + body (TestDraftEvaluationRequest): Request body for ephemeral (non-persisted) evaluation + testing. + + Provide either ``step_output`` (raw text) **or** ``agent_step_run_id`` + (to load output from storage). Exactly one must be supplied. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | TestDraftEvaluationResponse] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + agent_id: str, + *, + client: AuthenticatedClient | Client, + body: TestDraftEvaluationRequest, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | TestDraftEvaluationResponse | None: + """Test Draft Evaluation + + Run an ephemeral evaluation against provided step output without persisting results. + + Use this to interactively test evaluation prompts and expectation + configurations while editing criteria. No credits are consumed because + the result is not recorded. + + Args: + agent_id (str): + x_account_id (UUID | Unset): + body (TestDraftEvaluationRequest): Request body for ephemeral (non-persisted) evaluation + testing. + + Provide either ``step_output`` (raw text) **or** ``agent_step_run_id`` + (to load output from storage). Exactly one must be supplied. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | TestDraftEvaluationResponse + """ + + return sync_detailed( + agent_id=agent_id, + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, + body: TestDraftEvaluationRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | TestDraftEvaluationResponse]: + """Test Draft Evaluation + + Run an ephemeral evaluation against provided step output without persisting results. + + Use this to interactively test evaluation prompts and expectation + configurations while editing criteria. No credits are consumed because + the result is not recorded. + + Args: + agent_id (str): + x_account_id (UUID | Unset): + body (TestDraftEvaluationRequest): Request body for ephemeral (non-persisted) evaluation + testing. + + Provide either ``step_output`` (raw text) **or** ``agent_step_run_id`` + (to load output from storage). Exactly one must be supplied. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | TestDraftEvaluationResponse] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + agent_id: str, + *, + client: AuthenticatedClient | Client, + body: TestDraftEvaluationRequest, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | TestDraftEvaluationResponse | None: + """Test Draft Evaluation + + Run an ephemeral evaluation against provided step output without persisting results. + + Use this to interactively test evaluation prompts and expectation + configurations while editing criteria. No credits are consumed because + the result is not recorded. + + Args: + agent_id (str): + x_account_id (UUID | Unset): + body (TestDraftEvaluationRequest): Request body for ephemeral (non-persisted) evaluation + testing. + + Provide either ``step_output`` (raw text) **or** ``agent_step_run_id`` + (to load output from storage). Exactly one must be supplied. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | TestDraftEvaluationResponse + """ + + return ( + await asyncio_detailed( + agent_id=agent_id, + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/agent_evaluations/update_evaluation_criteria_api_agents_evaluation_criteria_criteria_id_patch.py b/seclai/_generated/api/agent_evaluations/update_evaluation_criteria_api_agents_evaluation_criteria_criteria_id_patch.py new file mode 100644 index 0000000..1dd9224 --- /dev/null +++ b/seclai/_generated/api/agent_evaluations/update_evaluation_criteria_api_agents_evaluation_criteria_criteria_id_patch.py @@ -0,0 +1,230 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.evaluation_criteria_response import EvaluationCriteriaResponse +from ...models.http_validation_error import HTTPValidationError +from ...models.update_evaluation_criteria_request import UpdateEvaluationCriteriaRequest +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + criteria_id: str, + *, + body: UpdateEvaluationCriteriaRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/agents/evaluation-criteria/{criteria_id}".format( + criteria_id=quote(str(criteria_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> EvaluationCriteriaResponse | HTTPValidationError | None: + if response.status_code == 200: + response_200 = EvaluationCriteriaResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[EvaluationCriteriaResponse | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + criteria_id: str, + *, + client: AuthenticatedClient | Client, + body: UpdateEvaluationCriteriaRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[EvaluationCriteriaResponse | HTTPValidationError]: + """Update Evaluation Criteria + + Update an evaluation criteria. + + Accepts a partial update – only the fields included in the request body + are modified. Use this to toggle enabled/disabled, change the + evaluation prompt, adjust retries, or rename the criteria. + + Args: + criteria_id (str): + x_account_id (UUID | Unset): + body (UpdateEvaluationCriteriaRequest): Request body for updating an evaluation criteria. + + Retry settings and sample frequency are set at the agent level. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvaluationCriteriaResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + criteria_id=criteria_id, + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + criteria_id: str, + *, + client: AuthenticatedClient | Client, + body: UpdateEvaluationCriteriaRequest, + x_account_id: UUID | Unset = UNSET, +) -> EvaluationCriteriaResponse | HTTPValidationError | None: + """Update Evaluation Criteria + + Update an evaluation criteria. + + Accepts a partial update – only the fields included in the request body + are modified. Use this to toggle enabled/disabled, change the + evaluation prompt, adjust retries, or rename the criteria. + + Args: + criteria_id (str): + x_account_id (UUID | Unset): + body (UpdateEvaluationCriteriaRequest): Request body for updating an evaluation criteria. + + Retry settings and sample frequency are set at the agent level. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvaluationCriteriaResponse | HTTPValidationError + """ + + return sync_detailed( + criteria_id=criteria_id, + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + criteria_id: str, + *, + client: AuthenticatedClient | Client, + body: UpdateEvaluationCriteriaRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[EvaluationCriteriaResponse | HTTPValidationError]: + """Update Evaluation Criteria + + Update an evaluation criteria. + + Accepts a partial update – only the fields included in the request body + are modified. Use this to toggle enabled/disabled, change the + evaluation prompt, adjust retries, or rename the criteria. + + Args: + criteria_id (str): + x_account_id (UUID | Unset): + body (UpdateEvaluationCriteriaRequest): Request body for updating an evaluation criteria. + + Retry settings and sample frequency are set at the agent level. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvaluationCriteriaResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + criteria_id=criteria_id, + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + criteria_id: str, + *, + client: AuthenticatedClient | Client, + body: UpdateEvaluationCriteriaRequest, + x_account_id: UUID | Unset = UNSET, +) -> EvaluationCriteriaResponse | HTTPValidationError | None: + """Update Evaluation Criteria + + Update an evaluation criteria. + + Accepts a partial update – only the fields included in the request body + are modified. Use this to toggle enabled/disabled, change the + evaluation prompt, adjust retries, or rename the criteria. + + Args: + criteria_id (str): + x_account_id (UUID | Unset): + body (UpdateEvaluationCriteriaRequest): Request body for updating an evaluation criteria. + + Retry settings and sample frequency are set at the agent level. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvaluationCriteriaResponse | HTTPValidationError + """ + + return ( + await asyncio_detailed( + criteria_id=criteria_id, + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/agents/api_get_agent_input_upload_status_api_agents_agent_id_input_uploads_upload_id_get.py b/seclai/_generated/api/agents/api_get_agent_input_upload_status_api_agents_agent_id_input_uploads_upload_id_get.py new file mode 100644 index 0000000..cdac5b6 --- /dev/null +++ b/seclai/_generated/api/agents/api_get_agent_input_upload_status_api_agents_agent_id_input_uploads_upload_id_get.py @@ -0,0 +1,226 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.upload_agent_input_api_response import UploadAgentInputApiResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + agent_id: str, + upload_id: str, + *, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/agents/{agent_id}/input-uploads/{upload_id}".format( + agent_id=quote(str(agent_id), safe=""), + upload_id=quote(str(upload_id), safe=""), + ), + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> HTTPValidationError | UploadAgentInputApiResponse | None: + if response.status_code == 200: + response_200 = UploadAgentInputApiResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[HTTPValidationError | UploadAgentInputApiResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + agent_id: str, + upload_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | UploadAgentInputApiResponse]: + """Get upload status + + Poll the processing status of a file upload created via `POST /agents/{agent_id}/upload-input`. + + Possible `status` values: `processing`, `ready`, `failed`. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. All resources are scoped to the caller's + account. + + Args: + agent_id (str): + upload_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | UploadAgentInputApiResponse] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + upload_id=upload_id, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + agent_id: str, + upload_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | UploadAgentInputApiResponse | None: + """Get upload status + + Poll the processing status of a file upload created via `POST /agents/{agent_id}/upload-input`. + + Possible `status` values: `processing`, `ready`, `failed`. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. All resources are scoped to the caller's + account. + + Args: + agent_id (str): + upload_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | UploadAgentInputApiResponse + """ + + return sync_detailed( + agent_id=agent_id, + upload_id=upload_id, + client=client, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + agent_id: str, + upload_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | UploadAgentInputApiResponse]: + """Get upload status + + Poll the processing status of a file upload created via `POST /agents/{agent_id}/upload-input`. + + Possible `status` values: `processing`, `ready`, `failed`. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. All resources are scoped to the caller's + account. + + Args: + agent_id (str): + upload_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | UploadAgentInputApiResponse] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + upload_id=upload_id, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + agent_id: str, + upload_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | UploadAgentInputApiResponse | None: + """Get upload status + + Poll the processing status of a file upload created via `POST /agents/{agent_id}/upload-input`. + + Possible `status` values: `processing`, `ready`, `failed`. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. All resources are scoped to the caller's + account. + + Args: + agent_id (str): + upload_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | UploadAgentInputApiResponse + """ + + return ( + await asyncio_detailed( + agent_id=agent_id, + upload_id=upload_id, + client=client, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/agents/api_upload_agent_input_api_agents_agent_id_upload_input_post.py b/seclai/_generated/api/agents/api_upload_agent_input_api_agents_agent_id_upload_input_post.py new file mode 100644 index 0000000..862c9b3 --- /dev/null +++ b/seclai/_generated/api/agents/api_upload_agent_input_api_agents_agent_id_upload_input_post.py @@ -0,0 +1,252 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.upload_agent_input_api_response import UploadAgentInputApiResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + agent_id: str, + *, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/agents/{agent_id}/upload-input".format( + agent_id=quote(str(agent_id), safe=""), + ), + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> HTTPValidationError | UploadAgentInputApiResponse | None: + if response.status_code == 202: + response_202 = UploadAgentInputApiResponse.from_dict(response.json()) + + return response_202 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[HTTPValidationError | UploadAgentInputApiResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | UploadAgentInputApiResponse]: + """Upload file input + + Upload a file to use as input for a `dynamic_input` agent run. + + Supports the same file types as content source uploads: text, PDF, DOCX, audio, video, images, etc. + Text and document files are processed synchronously; audio/video are submitted for asynchronous + transcription. + + **Size limit:** 200 MB per file. + + **Supported extensions:** txt, html, md, csv, xml, json, pdf, msg, docx, doc, pptx, ppt, xlsx, xls, + zip, epub, png, jpg, gif, bmp, tiff, webp, mp3, wav, m4a, flac, ogg, mp4, mov, avi. + + After uploading, poll `GET /agents/{agent_id}/input-uploads/{upload_id}` until `status` is `ready`, + then pass `input_upload_id` to `POST /agents/{agent_id}/runs`. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. All resources are scoped to the caller's + account. + + Args: + agent_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | UploadAgentInputApiResponse] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + agent_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | UploadAgentInputApiResponse | None: + """Upload file input + + Upload a file to use as input for a `dynamic_input` agent run. + + Supports the same file types as content source uploads: text, PDF, DOCX, audio, video, images, etc. + Text and document files are processed synchronously; audio/video are submitted for asynchronous + transcription. + + **Size limit:** 200 MB per file. + + **Supported extensions:** txt, html, md, csv, xml, json, pdf, msg, docx, doc, pptx, ppt, xlsx, xls, + zip, epub, png, jpg, gif, bmp, tiff, webp, mp3, wav, m4a, flac, ogg, mp4, mov, avi. + + After uploading, poll `GET /agents/{agent_id}/input-uploads/{upload_id}` until `status` is `ready`, + then pass `input_upload_id` to `POST /agents/{agent_id}/runs`. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. All resources are scoped to the caller's + account. + + Args: + agent_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | UploadAgentInputApiResponse + """ + + return sync_detailed( + agent_id=agent_id, + client=client, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | UploadAgentInputApiResponse]: + """Upload file input + + Upload a file to use as input for a `dynamic_input` agent run. + + Supports the same file types as content source uploads: text, PDF, DOCX, audio, video, images, etc. + Text and document files are processed synchronously; audio/video are submitted for asynchronous + transcription. + + **Size limit:** 200 MB per file. + + **Supported extensions:** txt, html, md, csv, xml, json, pdf, msg, docx, doc, pptx, ppt, xlsx, xls, + zip, epub, png, jpg, gif, bmp, tiff, webp, mp3, wav, m4a, flac, ogg, mp4, mov, avi. + + After uploading, poll `GET /agents/{agent_id}/input-uploads/{upload_id}` until `status` is `ready`, + then pass `input_upload_id` to `POST /agents/{agent_id}/runs`. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. All resources are scoped to the caller's + account. + + Args: + agent_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | UploadAgentInputApiResponse] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + agent_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | UploadAgentInputApiResponse | None: + """Upload file input + + Upload a file to use as input for a `dynamic_input` agent run. + + Supports the same file types as content source uploads: text, PDF, DOCX, audio, video, images, etc. + Text and document files are processed synchronously; audio/video are submitted for asynchronous + transcription. + + **Size limit:** 200 MB per file. + + **Supported extensions:** txt, html, md, csv, xml, json, pdf, msg, docx, doc, pptx, ppt, xlsx, xls, + zip, epub, png, jpg, gif, bmp, tiff, webp, mp3, wav, m4a, flac, ogg, mp4, mov, avi. + + After uploading, poll `GET /agents/{agent_id}/input-uploads/{upload_id}` until `status` is `ready`, + then pass `input_upload_id` to `POST /agents/{agent_id}/runs`. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. All resources are scoped to the caller's + account. + + Args: + agent_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | UploadAgentInputApiResponse + """ + + return ( + await asyncio_detailed( + agent_id=agent_id, + client=client, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/agents/create_agent_api_agents_post.py b/seclai/_generated/api/agents/create_agent_api_agents_post.py new file mode 100644 index 0000000..cb5a220 --- /dev/null +++ b/seclai/_generated/api/agents/create_agent_api_agents_post.py @@ -0,0 +1,242 @@ +from http import HTTPStatus +from typing import Any, cast +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.agent_summary_response import AgentSummaryResponse +from ...models.create_agent_request import CreateAgentRequest +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + body: CreateAgentRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/agents", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AgentSummaryResponse | Any | HTTPValidationError | None: + if response.status_code == 201: + response_201 = AgentSummaryResponse.from_dict(response.json()) + + return response_201 + + if response.status_code == 402: + response_402 = cast(Any, None) + return response_402 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AgentSummaryResponse | Any | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: CreateAgentRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[AgentSummaryResponse | Any | HTTPValidationError]: + """Create an agent + + Create a new agent. + + Trigger types: + - `dynamic_input`: triggered via API with user-provided input + - `template_input`: triggered via API with a predefined template + - `schedule`: triggered on a schedule + - `new_content`: triggered when new content arrives + + Templates: `blank`, `retrieval_example`, `simple_qa`, `summarizer`, `json_extractor`, + `content_change_notifier`, `scheduled_report`, `webhook_pipeline` + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. Agent is created in the caller's account. + + Args: + x_account_id (UUID | Unset): + body (CreateAgentRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AgentSummaryResponse | Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: CreateAgentRequest, + x_account_id: UUID | Unset = UNSET, +) -> AgentSummaryResponse | Any | HTTPValidationError | None: + """Create an agent + + Create a new agent. + + Trigger types: + - `dynamic_input`: triggered via API with user-provided input + - `template_input`: triggered via API with a predefined template + - `schedule`: triggered on a schedule + - `new_content`: triggered when new content arrives + + Templates: `blank`, `retrieval_example`, `simple_qa`, `summarizer`, `json_extractor`, + `content_change_notifier`, `scheduled_report`, `webhook_pipeline` + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. Agent is created in the caller's account. + + Args: + x_account_id (UUID | Unset): + body (CreateAgentRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AgentSummaryResponse | Any | HTTPValidationError + """ + + return sync_detailed( + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: CreateAgentRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[AgentSummaryResponse | Any | HTTPValidationError]: + """Create an agent + + Create a new agent. + + Trigger types: + - `dynamic_input`: triggered via API with user-provided input + - `template_input`: triggered via API with a predefined template + - `schedule`: triggered on a schedule + - `new_content`: triggered when new content arrives + + Templates: `blank`, `retrieval_example`, `simple_qa`, `summarizer`, `json_extractor`, + `content_change_notifier`, `scheduled_report`, `webhook_pipeline` + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. Agent is created in the caller's account. + + Args: + x_account_id (UUID | Unset): + body (CreateAgentRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AgentSummaryResponse | Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: CreateAgentRequest, + x_account_id: UUID | Unset = UNSET, +) -> AgentSummaryResponse | Any | HTTPValidationError | None: + """Create an agent + + Create a new agent. + + Trigger types: + - `dynamic_input`: triggered via API with user-provided input + - `template_input`: triggered via API with a predefined template + - `schedule`: triggered on a schedule + - `new_content`: triggered when new content arrives + + Templates: `blank`, `retrieval_example`, `simple_qa`, `summarizer`, `json_extractor`, + `content_change_notifier`, `scheduled_report`, `webhook_pipeline` + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. Agent is created in the caller's account. + + Args: + x_account_id (UUID | Unset): + body (CreateAgentRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AgentSummaryResponse | Any | HTTPValidationError + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/agents/delete_agent_api_agents_agent_id_delete.py b/seclai/_generated/api/agents/delete_agent_api_agents_agent_id_delete.py new file mode 100644 index 0000000..010abb5 --- /dev/null +++ b/seclai/_generated/api/agents/delete_agent_api_agents_agent_id_delete.py @@ -0,0 +1,202 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + agent_id: str, + *, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/agents/{agent_id}".format( + agent_id=quote(str(agent_id), safe=""), + ), + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | HTTPValidationError | None: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any | HTTPValidationError]: + """Delete an agent + + Soft-delete an agent. The agent will no longer appear in listings or be accessible via the API. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. You can only delete agents belonging to your + account. + + Args: + agent_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + agent_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Any | HTTPValidationError | None: + """Delete an agent + + Soft-delete an agent. The agent will no longer appear in listings or be accessible via the API. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. You can only delete agents belonging to your + account. + + Args: + agent_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return sync_detailed( + agent_id=agent_id, + client=client, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any | HTTPValidationError]: + """Delete an agent + + Soft-delete an agent. The agent will no longer appear in listings or be accessible via the API. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. You can only delete agents belonging to your + account. + + Args: + agent_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + agent_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Any | HTTPValidationError | None: + """Delete an agent + + Soft-delete an agent. The agent will no longer appear in listings or be accessible via the API. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. You can only delete agents belonging to your + account. + + Args: + agent_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return ( + await asyncio_detailed( + agent_id=agent_id, + client=client, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/agents/delete_agent_run_api_agents_runs_run_id_delete.py b/seclai/_generated/api/agents/delete_agent_run_api_agents_runs_run_id_delete.py index 41681ad..3f918ae 100644 --- a/seclai/_generated/api/agents/delete_agent_run_api_agents_runs_run_id_delete.py +++ b/seclai/_generated/api/agents/delete_agent_run_api_agents_runs_run_id_delete.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -8,12 +9,18 @@ from ...client import AuthenticatedClient, Client from ...models.agent_run_response import AgentRunResponse from ...models.http_validation_error import HTTPValidationError -from ...types import Response +from ...types import UNSET, Response, Unset def _get_kwargs( run_id: str, + *, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + _kwargs: dict[str, Any] = { "method": "delete", "url": "/agents/runs/{run_id}".format( @@ -21,6 +28,7 @@ def _get_kwargs( ), } + _kwargs["headers"] = headers return _kwargs @@ -58,6 +66,7 @@ def sync_detailed( run_id: str, *, client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, ) -> Response[AgentRunResponse | HTTPValidationError]: """Cancel an agent run @@ -66,10 +75,12 @@ def sync_detailed( If the run is already in a terminal state (`completed` or `failed`), cancellation will be rejected. Auth & scoping: - - Requires `X-API-Key`. You can only cancel runs belonging to your account. + - Requires `X-API-Key` header or OAuth Bearer token. You can only cancel runs belonging to your + account. Args: run_id (str): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -81,6 +92,7 @@ def sync_detailed( kwargs = _get_kwargs( run_id=run_id, + x_account_id=x_account_id, ) response = client.get_httpx_client().request( @@ -94,6 +106,7 @@ def sync( run_id: str, *, client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, ) -> AgentRunResponse | HTTPValidationError | None: """Cancel an agent run @@ -102,10 +115,12 @@ def sync( If the run is already in a terminal state (`completed` or `failed`), cancellation will be rejected. Auth & scoping: - - Requires `X-API-Key`. You can only cancel runs belonging to your account. + - Requires `X-API-Key` header or OAuth Bearer token. You can only cancel runs belonging to your + account. Args: run_id (str): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -118,6 +133,7 @@ def sync( return sync_detailed( run_id=run_id, client=client, + x_account_id=x_account_id, ).parsed @@ -125,6 +141,7 @@ async def asyncio_detailed( run_id: str, *, client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, ) -> Response[AgentRunResponse | HTTPValidationError]: """Cancel an agent run @@ -133,10 +150,12 @@ async def asyncio_detailed( If the run is already in a terminal state (`completed` or `failed`), cancellation will be rejected. Auth & scoping: - - Requires `X-API-Key`. You can only cancel runs belonging to your account. + - Requires `X-API-Key` header or OAuth Bearer token. You can only cancel runs belonging to your + account. Args: run_id (str): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -148,6 +167,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( run_id=run_id, + x_account_id=x_account_id, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -159,6 +179,7 @@ async def asyncio( run_id: str, *, client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, ) -> AgentRunResponse | HTTPValidationError | None: """Cancel an agent run @@ -167,10 +188,12 @@ async def asyncio( If the run is already in a terminal state (`completed` or `failed`), cancellation will be rejected. Auth & scoping: - - Requires `X-API-Key`. You can only cancel runs belonging to your account. + - Requires `X-API-Key` header or OAuth Bearer token. You can only cancel runs belonging to your + account. Args: run_id (str): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -184,5 +207,6 @@ async def asyncio( await asyncio_detailed( run_id=run_id, client=client, + x_account_id=x_account_id, ) ).parsed diff --git a/seclai/_generated/api/agents/export_agent_api_agents_agent_id_export_get.py b/seclai/_generated/api/agents/export_agent_api_agents_agent_id_export_get.py new file mode 100644 index 0000000..c9af997 --- /dev/null +++ b/seclai/_generated/api/agents/export_agent_api_agents_agent_id_export_get.py @@ -0,0 +1,292 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.agent_export_response import AgentExportResponse +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + agent_id: str, + *, + download: bool | Unset = True, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + params: dict[str, Any] = {} + + params["download"] = download + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/agents/{agent_id}/export".format( + agent_id=quote(str(agent_id), safe=""), + ), + "params": params, + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AgentExportResponse | HTTPValidationError | None: + if response.status_code == 200: + response_200 = AgentExportResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AgentExportResponse | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, + download: bool | Unset = True, + x_account_id: UUID | Unset = UNSET, +) -> Response[AgentExportResponse | HTTPValidationError]: + r"""Export agent definition + + Export an agent definition as a portable JSON snapshot. + + The response contains the full definition, trigger configuration with schedules, alert configs, + evaluation criteria, agent-scoped governance policies, and a resolved dependency manifest that maps + every referenced external entity UUID to its human-readable name. + + Response shape: + - `export_version`: schema version (currently `\"2\"`) + - `exported_at`: ISO-8601 timestamp + - `agent`: name, description, schema_version, definition, timestamps + - `trigger`: trigger type, input template, schedules + - `alert_configs`: alert type, thresholds, recipients + - `evaluation_criteria`: evaluation settings per step + - `governance_policies`: agent-scoped governance policies + - `dependencies`: knowledge_bases, memory_banks, source_connections, agents, users + + Query params: + - `download` (default true): when true, sets `Content-Disposition: attachment` so clients treat the + response as a file download. + + Auth & scoping: + - Requires `X-API-Key`. You can only export agents belonging to your account. + + Args: + agent_id (str): + download (bool | Unset): Return as file download Default: True. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AgentExportResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + download=download, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + agent_id: str, + *, + client: AuthenticatedClient | Client, + download: bool | Unset = True, + x_account_id: UUID | Unset = UNSET, +) -> AgentExportResponse | HTTPValidationError | None: + r"""Export agent definition + + Export an agent definition as a portable JSON snapshot. + + The response contains the full definition, trigger configuration with schedules, alert configs, + evaluation criteria, agent-scoped governance policies, and a resolved dependency manifest that maps + every referenced external entity UUID to its human-readable name. + + Response shape: + - `export_version`: schema version (currently `\"2\"`) + - `exported_at`: ISO-8601 timestamp + - `agent`: name, description, schema_version, definition, timestamps + - `trigger`: trigger type, input template, schedules + - `alert_configs`: alert type, thresholds, recipients + - `evaluation_criteria`: evaluation settings per step + - `governance_policies`: agent-scoped governance policies + - `dependencies`: knowledge_bases, memory_banks, source_connections, agents, users + + Query params: + - `download` (default true): when true, sets `Content-Disposition: attachment` so clients treat the + response as a file download. + + Auth & scoping: + - Requires `X-API-Key`. You can only export agents belonging to your account. + + Args: + agent_id (str): + download (bool | Unset): Return as file download Default: True. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AgentExportResponse | HTTPValidationError + """ + + return sync_detailed( + agent_id=agent_id, + client=client, + download=download, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, + download: bool | Unset = True, + x_account_id: UUID | Unset = UNSET, +) -> Response[AgentExportResponse | HTTPValidationError]: + r"""Export agent definition + + Export an agent definition as a portable JSON snapshot. + + The response contains the full definition, trigger configuration with schedules, alert configs, + evaluation criteria, agent-scoped governance policies, and a resolved dependency manifest that maps + every referenced external entity UUID to its human-readable name. + + Response shape: + - `export_version`: schema version (currently `\"2\"`) + - `exported_at`: ISO-8601 timestamp + - `agent`: name, description, schema_version, definition, timestamps + - `trigger`: trigger type, input template, schedules + - `alert_configs`: alert type, thresholds, recipients + - `evaluation_criteria`: evaluation settings per step + - `governance_policies`: agent-scoped governance policies + - `dependencies`: knowledge_bases, memory_banks, source_connections, agents, users + + Query params: + - `download` (default true): when true, sets `Content-Disposition: attachment` so clients treat the + response as a file download. + + Auth & scoping: + - Requires `X-API-Key`. You can only export agents belonging to your account. + + Args: + agent_id (str): + download (bool | Unset): Return as file download Default: True. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AgentExportResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + download=download, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + agent_id: str, + *, + client: AuthenticatedClient | Client, + download: bool | Unset = True, + x_account_id: UUID | Unset = UNSET, +) -> AgentExportResponse | HTTPValidationError | None: + r"""Export agent definition + + Export an agent definition as a portable JSON snapshot. + + The response contains the full definition, trigger configuration with schedules, alert configs, + evaluation criteria, agent-scoped governance policies, and a resolved dependency manifest that maps + every referenced external entity UUID to its human-readable name. + + Response shape: + - `export_version`: schema version (currently `\"2\"`) + - `exported_at`: ISO-8601 timestamp + - `agent`: name, description, schema_version, definition, timestamps + - `trigger`: trigger type, input template, schedules + - `alert_configs`: alert type, thresholds, recipients + - `evaluation_criteria`: evaluation settings per step + - `governance_policies`: agent-scoped governance policies + - `dependencies`: knowledge_bases, memory_banks, source_connections, agents, users + + Query params: + - `download` (default true): when true, sets `Content-Disposition: attachment` so clients treat the + response as a file download. + + Auth & scoping: + - Requires `X-API-Key`. You can only export agents belonging to your account. + + Args: + agent_id (str): + download (bool | Unset): Return as file download Default: True. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AgentExportResponse | HTTPValidationError + """ + + return ( + await asyncio_detailed( + agent_id=agent_id, + client=client, + download=download, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/agents/generate_agent_steps_api_agents_agent_id_ai_assistant_generate_steps_post.py b/seclai/_generated/api/agents/generate_agent_steps_api_agents_agent_id_ai_assistant_generate_steps_post.py new file mode 100644 index 0000000..e0b2ea3 --- /dev/null +++ b/seclai/_generated/api/agents/generate_agent_steps_api_agents_agent_id_ai_assistant_generate_steps_post.py @@ -0,0 +1,238 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.generate_agent_steps_request import GenerateAgentStepsRequest +from ...models.generate_agent_steps_response import GenerateAgentStepsResponse +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + agent_id: str, + *, + body: GenerateAgentStepsRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/agents/{agent_id}/ai-assistant/generate-steps".format( + agent_id=quote(str(agent_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> GenerateAgentStepsResponse | HTTPValidationError | None: + if response.status_code == 200: + response_200 = GenerateAgentStepsResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[GenerateAgentStepsResponse | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, + body: GenerateAgentStepsRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[GenerateAgentStepsResponse | HTTPValidationError]: + """Generate agent workflow + + Use the AI assistant to generate a full agent step workflow from a natural language description. + + Provide a description of what the agent should do, along with optional context (current steps, + trigger type). The AI produces a complete set of agent steps. + Use mode 'generate_full' for new workflows or 'modify_workflow' to refine existing ones. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. Only agents belonging to your account can be + used. + + Args: + agent_id (str): + x_account_id (UUID | Unset): + body (GenerateAgentStepsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[GenerateAgentStepsResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + agent_id: str, + *, + client: AuthenticatedClient | Client, + body: GenerateAgentStepsRequest, + x_account_id: UUID | Unset = UNSET, +) -> GenerateAgentStepsResponse | HTTPValidationError | None: + """Generate agent workflow + + Use the AI assistant to generate a full agent step workflow from a natural language description. + + Provide a description of what the agent should do, along with optional context (current steps, + trigger type). The AI produces a complete set of agent steps. + Use mode 'generate_full' for new workflows or 'modify_workflow' to refine existing ones. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. Only agents belonging to your account can be + used. + + Args: + agent_id (str): + x_account_id (UUID | Unset): + body (GenerateAgentStepsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + GenerateAgentStepsResponse | HTTPValidationError + """ + + return sync_detailed( + agent_id=agent_id, + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, + body: GenerateAgentStepsRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[GenerateAgentStepsResponse | HTTPValidationError]: + """Generate agent workflow + + Use the AI assistant to generate a full agent step workflow from a natural language description. + + Provide a description of what the agent should do, along with optional context (current steps, + trigger type). The AI produces a complete set of agent steps. + Use mode 'generate_full' for new workflows or 'modify_workflow' to refine existing ones. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. Only agents belonging to your account can be + used. + + Args: + agent_id (str): + x_account_id (UUID | Unset): + body (GenerateAgentStepsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[GenerateAgentStepsResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + agent_id: str, + *, + client: AuthenticatedClient | Client, + body: GenerateAgentStepsRequest, + x_account_id: UUID | Unset = UNSET, +) -> GenerateAgentStepsResponse | HTTPValidationError | None: + """Generate agent workflow + + Use the AI assistant to generate a full agent step workflow from a natural language description. + + Provide a description of what the agent should do, along with optional context (current steps, + trigger type). The AI produces a complete set of agent steps. + Use mode 'generate_full' for new workflows or 'modify_workflow' to refine existing ones. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. Only agents belonging to your account can be + used. + + Args: + agent_id (str): + x_account_id (UUID | Unset): + body (GenerateAgentStepsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + GenerateAgentStepsResponse | HTTPValidationError + """ + + return ( + await asyncio_detailed( + agent_id=agent_id, + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/agents/generate_step_config_api_agents_agent_id_ai_assistant_step_config_post.py b/seclai/_generated/api/agents/generate_step_config_api_agents_agent_id_ai_assistant_step_config_post.py new file mode 100644 index 0000000..aa8d1ac --- /dev/null +++ b/seclai/_generated/api/agents/generate_step_config_api_agents_agent_id_ai_assistant_step_config_post.py @@ -0,0 +1,238 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.generate_step_config_request import GenerateStepConfigRequest +from ...models.generate_step_config_response import GenerateStepConfigResponse +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + agent_id: str, + *, + body: GenerateStepConfigRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/agents/{agent_id}/ai-assistant/step-config".format( + agent_id=quote(str(agent_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> GenerateStepConfigResponse | HTTPValidationError | None: + if response.status_code == 200: + response_200 = GenerateStepConfigResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[GenerateStepConfigResponse | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, + body: GenerateStepConfigRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[GenerateStepConfigResponse | HTTPValidationError]: + """Generate step configuration + + Use the AI assistant to generate or refine a single step's configuration. + + Provide the step type, a natural language instruction, and optionally the current configuration. The + AI will produce a proposed configuration along with an explanation. The suggestion is stored as a + conversation turn that can be accepted or declined separately via the mark endpoint. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. Only agents belonging to your account can be + used. + + Args: + agent_id (str): + x_account_id (UUID | Unset): + body (GenerateStepConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[GenerateStepConfigResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + agent_id: str, + *, + client: AuthenticatedClient | Client, + body: GenerateStepConfigRequest, + x_account_id: UUID | Unset = UNSET, +) -> GenerateStepConfigResponse | HTTPValidationError | None: + """Generate step configuration + + Use the AI assistant to generate or refine a single step's configuration. + + Provide the step type, a natural language instruction, and optionally the current configuration. The + AI will produce a proposed configuration along with an explanation. The suggestion is stored as a + conversation turn that can be accepted or declined separately via the mark endpoint. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. Only agents belonging to your account can be + used. + + Args: + agent_id (str): + x_account_id (UUID | Unset): + body (GenerateStepConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + GenerateStepConfigResponse | HTTPValidationError + """ + + return sync_detailed( + agent_id=agent_id, + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, + body: GenerateStepConfigRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[GenerateStepConfigResponse | HTTPValidationError]: + """Generate step configuration + + Use the AI assistant to generate or refine a single step's configuration. + + Provide the step type, a natural language instruction, and optionally the current configuration. The + AI will produce a proposed configuration along with an explanation. The suggestion is stored as a + conversation turn that can be accepted or declined separately via the mark endpoint. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. Only agents belonging to your account can be + used. + + Args: + agent_id (str): + x_account_id (UUID | Unset): + body (GenerateStepConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[GenerateStepConfigResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + agent_id: str, + *, + client: AuthenticatedClient | Client, + body: GenerateStepConfigRequest, + x_account_id: UUID | Unset = UNSET, +) -> GenerateStepConfigResponse | HTTPValidationError | None: + """Generate step configuration + + Use the AI assistant to generate or refine a single step's configuration. + + Provide the step type, a natural language instruction, and optionally the current configuration. The + AI will produce a proposed configuration along with an explanation. The suggestion is stored as a + conversation turn that can be accepted or declined separately via the mark endpoint. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. Only agents belonging to your account can be + used. + + Args: + agent_id (str): + x_account_id (UUID | Unset): + body (GenerateStepConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + GenerateStepConfigResponse | HTTPValidationError + """ + + return ( + await asyncio_detailed( + agent_id=agent_id, + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/agents/get_agent_definition_api_agents_agent_id_definition_get.py b/seclai/_generated/api/agents/get_agent_definition_api_agents_agent_id_definition_get.py new file mode 100644 index 0000000..593bac6 --- /dev/null +++ b/seclai/_generated/api/agents/get_agent_definition_api_agents_agent_id_definition_get.py @@ -0,0 +1,340 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.agent_definition_response import AgentDefinitionResponse +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + agent_id: str, + *, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/agents/{agent_id}/definition".format( + agent_id=quote(str(agent_id), safe=""), + ), + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AgentDefinitionResponse | HTTPValidationError | None: + if response.status_code == 200: + response_200 = AgentDefinitionResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AgentDefinitionResponse | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[AgentDefinitionResponse | HTTPValidationError]: + """Get agent definition + + Fetch the current agent definition from the main branch. + + The response includes `change_id` which must be provided when updating the definition (optimistic + locking). + + The definition contains the agent's step workflow. Available step types: + - `prompt_call`: Call an LLM with a prompt template + - `retrieval`: Search a knowledge base + - `transform`: Reshape data with a Liquid template + - `gate`: Evaluate conditions, stop or continue child execution + - `retry`: Re-execute from a target ancestor step (for quality-control loops; pair with a `gate` + step for conditional retrying. Fields: `target_step_id` (ancestor step ID), `max_retries` (1–10)) + - `evaluate_step`: Score a selected previous step output and emit JSON with `score`, `passed`, and + `pass_threshold` (fields: `target_step_id`, `evaluation_prompt`, `pass_threshold`, optional + `evaluation_tier`, optional `expectation_config`) + - `insight`: Progressively read and analyze large input + - `extract_json` / `extract_html` / `extract_xml`: Extract structured data + - `send_email`: Send email with step output + - `webhook_call`: POST data to an external URL + - `write_aws_s3_object`: Write output to S3 + - `call_agent`: Invoke another agent + - `write_metadata`: Write a value to content metadata (for filtering/gates; content-triggered agents + only. Fields: `metadata_key`, `content`) + - `write_content_attachment`: Write a file-backed attachment to content (optionally indexed for + retrieval; content-triggered agents only. Fields: `attachment_key`, `content`, `content_type`, + `indexed`) + - `load_content_attachment`: Load a previously written attachment (content-triggered agents only. + Fields: `attachment_key`) + - `load_content`: Load the full text body of a source document (typically used with content- + triggered agents; can also load by explicit `content_version_id`. Fields: `content_version_id` + optional) + - `display_result`: Show output to the user + - `join`: Merge parallel branches + - `combinator`: Combine multiple inputs + - `text`: Static text literal + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. You can only access agents belonging to your + account. + + Args: + agent_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AgentDefinitionResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + agent_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> AgentDefinitionResponse | HTTPValidationError | None: + """Get agent definition + + Fetch the current agent definition from the main branch. + + The response includes `change_id` which must be provided when updating the definition (optimistic + locking). + + The definition contains the agent's step workflow. Available step types: + - `prompt_call`: Call an LLM with a prompt template + - `retrieval`: Search a knowledge base + - `transform`: Reshape data with a Liquid template + - `gate`: Evaluate conditions, stop or continue child execution + - `retry`: Re-execute from a target ancestor step (for quality-control loops; pair with a `gate` + step for conditional retrying. Fields: `target_step_id` (ancestor step ID), `max_retries` (1–10)) + - `evaluate_step`: Score a selected previous step output and emit JSON with `score`, `passed`, and + `pass_threshold` (fields: `target_step_id`, `evaluation_prompt`, `pass_threshold`, optional + `evaluation_tier`, optional `expectation_config`) + - `insight`: Progressively read and analyze large input + - `extract_json` / `extract_html` / `extract_xml`: Extract structured data + - `send_email`: Send email with step output + - `webhook_call`: POST data to an external URL + - `write_aws_s3_object`: Write output to S3 + - `call_agent`: Invoke another agent + - `write_metadata`: Write a value to content metadata (for filtering/gates; content-triggered agents + only. Fields: `metadata_key`, `content`) + - `write_content_attachment`: Write a file-backed attachment to content (optionally indexed for + retrieval; content-triggered agents only. Fields: `attachment_key`, `content`, `content_type`, + `indexed`) + - `load_content_attachment`: Load a previously written attachment (content-triggered agents only. + Fields: `attachment_key`) + - `load_content`: Load the full text body of a source document (typically used with content- + triggered agents; can also load by explicit `content_version_id`. Fields: `content_version_id` + optional) + - `display_result`: Show output to the user + - `join`: Merge parallel branches + - `combinator`: Combine multiple inputs + - `text`: Static text literal + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. You can only access agents belonging to your + account. + + Args: + agent_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AgentDefinitionResponse | HTTPValidationError + """ + + return sync_detailed( + agent_id=agent_id, + client=client, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[AgentDefinitionResponse | HTTPValidationError]: + """Get agent definition + + Fetch the current agent definition from the main branch. + + The response includes `change_id` which must be provided when updating the definition (optimistic + locking). + + The definition contains the agent's step workflow. Available step types: + - `prompt_call`: Call an LLM with a prompt template + - `retrieval`: Search a knowledge base + - `transform`: Reshape data with a Liquid template + - `gate`: Evaluate conditions, stop or continue child execution + - `retry`: Re-execute from a target ancestor step (for quality-control loops; pair with a `gate` + step for conditional retrying. Fields: `target_step_id` (ancestor step ID), `max_retries` (1–10)) + - `evaluate_step`: Score a selected previous step output and emit JSON with `score`, `passed`, and + `pass_threshold` (fields: `target_step_id`, `evaluation_prompt`, `pass_threshold`, optional + `evaluation_tier`, optional `expectation_config`) + - `insight`: Progressively read and analyze large input + - `extract_json` / `extract_html` / `extract_xml`: Extract structured data + - `send_email`: Send email with step output + - `webhook_call`: POST data to an external URL + - `write_aws_s3_object`: Write output to S3 + - `call_agent`: Invoke another agent + - `write_metadata`: Write a value to content metadata (for filtering/gates; content-triggered agents + only. Fields: `metadata_key`, `content`) + - `write_content_attachment`: Write a file-backed attachment to content (optionally indexed for + retrieval; content-triggered agents only. Fields: `attachment_key`, `content`, `content_type`, + `indexed`) + - `load_content_attachment`: Load a previously written attachment (content-triggered agents only. + Fields: `attachment_key`) + - `load_content`: Load the full text body of a source document (typically used with content- + triggered agents; can also load by explicit `content_version_id`. Fields: `content_version_id` + optional) + - `display_result`: Show output to the user + - `join`: Merge parallel branches + - `combinator`: Combine multiple inputs + - `text`: Static text literal + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. You can only access agents belonging to your + account. + + Args: + agent_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AgentDefinitionResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + agent_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> AgentDefinitionResponse | HTTPValidationError | None: + """Get agent definition + + Fetch the current agent definition from the main branch. + + The response includes `change_id` which must be provided when updating the definition (optimistic + locking). + + The definition contains the agent's step workflow. Available step types: + - `prompt_call`: Call an LLM with a prompt template + - `retrieval`: Search a knowledge base + - `transform`: Reshape data with a Liquid template + - `gate`: Evaluate conditions, stop or continue child execution + - `retry`: Re-execute from a target ancestor step (for quality-control loops; pair with a `gate` + step for conditional retrying. Fields: `target_step_id` (ancestor step ID), `max_retries` (1–10)) + - `evaluate_step`: Score a selected previous step output and emit JSON with `score`, `passed`, and + `pass_threshold` (fields: `target_step_id`, `evaluation_prompt`, `pass_threshold`, optional + `evaluation_tier`, optional `expectation_config`) + - `insight`: Progressively read and analyze large input + - `extract_json` / `extract_html` / `extract_xml`: Extract structured data + - `send_email`: Send email with step output + - `webhook_call`: POST data to an external URL + - `write_aws_s3_object`: Write output to S3 + - `call_agent`: Invoke another agent + - `write_metadata`: Write a value to content metadata (for filtering/gates; content-triggered agents + only. Fields: `metadata_key`, `content`) + - `write_content_attachment`: Write a file-backed attachment to content (optionally indexed for + retrieval; content-triggered agents only. Fields: `attachment_key`, `content`, `content_type`, + `indexed`) + - `load_content_attachment`: Load a previously written attachment (content-triggered agents only. + Fields: `attachment_key`) + - `load_content`: Load the full text body of a source document (typically used with content- + triggered agents; can also load by explicit `content_version_id`. Fields: `content_version_id` + optional) + - `display_result`: Show output to the user + - `join`: Merge parallel branches + - `combinator`: Combine multiple inputs + - `text`: Static text literal + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. You can only access agents belonging to your + account. + + Args: + agent_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AgentDefinitionResponse | HTTPValidationError + """ + + return ( + await asyncio_detailed( + agent_id=agent_id, + client=client, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/agents/get_agent_metadata_api_agents_agent_id_get.py b/seclai/_generated/api/agents/get_agent_metadata_api_agents_agent_id_get.py new file mode 100644 index 0000000..87ed5f4 --- /dev/null +++ b/seclai/_generated/api/agents/get_agent_metadata_api_agents_agent_id_get.py @@ -0,0 +1,204 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.agent_summary_response import AgentSummaryResponse +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + agent_id: str, + *, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/agents/{agent_id}".format( + agent_id=quote(str(agent_id), safe=""), + ), + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AgentSummaryResponse | HTTPValidationError | None: + if response.status_code == 200: + response_200 = AgentSummaryResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AgentSummaryResponse | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[AgentSummaryResponse | HTTPValidationError]: + """Get an agent + + Fetch an agent's metadata (name, description, trigger type, timestamps). + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. You can only access agents belonging to your + account. + + Args: + agent_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AgentSummaryResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + agent_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> AgentSummaryResponse | HTTPValidationError | None: + """Get an agent + + Fetch an agent's metadata (name, description, trigger type, timestamps). + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. You can only access agents belonging to your + account. + + Args: + agent_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AgentSummaryResponse | HTTPValidationError + """ + + return sync_detailed( + agent_id=agent_id, + client=client, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[AgentSummaryResponse | HTTPValidationError]: + """Get an agent + + Fetch an agent's metadata (name, description, trigger type, timestamps). + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. You can only access agents belonging to your + account. + + Args: + agent_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AgentSummaryResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + agent_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> AgentSummaryResponse | HTTPValidationError | None: + """Get an agent + + Fetch an agent's metadata (name, description, trigger type, timestamps). + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. You can only access agents belonging to your + account. + + Args: + agent_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AgentSummaryResponse | HTTPValidationError + """ + + return ( + await asyncio_detailed( + agent_id=agent_id, + client=client, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/agents/get_agent_run_api_agents_runs_run_id_get.py b/seclai/_generated/api/agents/get_agent_run_api_agents_runs_run_id_get.py index 3c96a43..39e04c9 100644 --- a/seclai/_generated/api/agents/get_agent_run_api_agents_runs_run_id_get.py +++ b/seclai/_generated/api/agents/get_agent_run_api_agents_runs_run_id_get.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -15,7 +16,12 @@ def _get_kwargs( run_id: str, *, include_step_outputs: bool | Unset = False, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + params: dict[str, Any] = {} params["include_step_outputs"] = include_step_outputs @@ -30,6 +36,7 @@ def _get_kwargs( "params": params, } + _kwargs["headers"] = headers return _kwargs @@ -68,6 +75,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, include_step_outputs: bool | Unset = False, + x_account_id: UUID | Unset = UNSET, ) -> Response[AgentRunResponse | HTTPValidationError]: """Get an agent run @@ -78,12 +86,14 @@ def sync_detailed( `include_step_outputs=true` to include per-step outputs, timing, durations, and credits. Auth & scoping: - - Requires `X-API-Key`. You can only access runs belonging to your account. + - Requires `X-API-Key` header or OAuth Bearer token. You can only access runs belonging to your + account. Args: run_id (str): include_step_outputs (bool | Unset): If true, include per-step outputs with timing, durations, and credits. Default: False. + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -96,6 +106,7 @@ def sync_detailed( kwargs = _get_kwargs( run_id=run_id, include_step_outputs=include_step_outputs, + x_account_id=x_account_id, ) response = client.get_httpx_client().request( @@ -110,6 +121,7 @@ def sync( *, client: AuthenticatedClient | Client, include_step_outputs: bool | Unset = False, + x_account_id: UUID | Unset = UNSET, ) -> AgentRunResponse | HTTPValidationError | None: """Get an agent run @@ -120,12 +132,14 @@ def sync( `include_step_outputs=true` to include per-step outputs, timing, durations, and credits. Auth & scoping: - - Requires `X-API-Key`. You can only access runs belonging to your account. + - Requires `X-API-Key` header or OAuth Bearer token. You can only access runs belonging to your + account. Args: run_id (str): include_step_outputs (bool | Unset): If true, include per-step outputs with timing, durations, and credits. Default: False. + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -139,6 +153,7 @@ def sync( run_id=run_id, client=client, include_step_outputs=include_step_outputs, + x_account_id=x_account_id, ).parsed @@ -147,6 +162,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, include_step_outputs: bool | Unset = False, + x_account_id: UUID | Unset = UNSET, ) -> Response[AgentRunResponse | HTTPValidationError]: """Get an agent run @@ -157,12 +173,14 @@ async def asyncio_detailed( `include_step_outputs=true` to include per-step outputs, timing, durations, and credits. Auth & scoping: - - Requires `X-API-Key`. You can only access runs belonging to your account. + - Requires `X-API-Key` header or OAuth Bearer token. You can only access runs belonging to your + account. Args: run_id (str): include_step_outputs (bool | Unset): If true, include per-step outputs with timing, durations, and credits. Default: False. + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -175,6 +193,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( run_id=run_id, include_step_outputs=include_step_outputs, + x_account_id=x_account_id, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -187,6 +206,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, include_step_outputs: bool | Unset = False, + x_account_id: UUID | Unset = UNSET, ) -> AgentRunResponse | HTTPValidationError | None: """Get an agent run @@ -197,12 +217,14 @@ async def asyncio( `include_step_outputs=true` to include per-step outputs, timing, durations, and credits. Auth & scoping: - - Requires `X-API-Key`. You can only access runs belonging to your account. + - Requires `X-API-Key` header or OAuth Bearer token. You can only access runs belonging to your + account. Args: run_id (str): include_step_outputs (bool | Unset): If true, include per-step outputs with timing, durations, and credits. Default: False. + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -217,5 +239,6 @@ async def asyncio( run_id=run_id, client=client, include_step_outputs=include_step_outputs, + x_account_id=x_account_id, ) ).parsed diff --git a/seclai/_generated/api/agents/get_ai_conversation_history_api_agents_agent_id_ai_assistant_conversations_get.py b/seclai/_generated/api/agents/get_ai_conversation_history_api_agents_agent_id_ai_assistant_conversations_get.py new file mode 100644 index 0000000..71ca602 --- /dev/null +++ b/seclai/_generated/api/agents/get_ai_conversation_history_api_agents_agent_id_ai_assistant_conversations_get.py @@ -0,0 +1,290 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.ai_conversation_history_response import AiConversationHistoryResponse +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + agent_id: str, + *, + step_type: str, + step_id: None | str | Unset = UNSET, + limit: int | Unset = 10, + offset: int | Unset = 0, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + params: dict[str, Any] = {} + + params["step_type"] = step_type + + json_step_id: None | str | Unset + if isinstance(step_id, Unset): + json_step_id = UNSET + else: + json_step_id = step_id + params["step_id"] = json_step_id + + params["limit"] = limit + + params["offset"] = offset + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/agents/{agent_id}/ai-assistant/conversations".format( + agent_id=quote(str(agent_id), safe=""), + ), + "params": params, + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AiConversationHistoryResponse | HTTPValidationError | None: + if response.status_code == 200: + response_200 = AiConversationHistoryResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AiConversationHistoryResponse | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, + step_type: str, + step_id: None | str | Unset = UNSET, + limit: int | Unset = 10, + offset: int | Unset = 0, + x_account_id: UUID | Unset = UNSET, +) -> Response[AiConversationHistoryResponse | HTTPValidationError]: + """Get AI conversation history + + Fetch the AI assistant conversation history for a specific step of an agent. + + Returns past conversation turns (user inputs, AI responses, accept/decline status) ordered oldest + first. Use `step_type` to filter by step type, and optionally `step_id` to narrow to a specific step + instance. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. Only agents belonging to your account can be + queried. + + Args: + agent_id (str): + step_type (str): Step type to look up. + step_id (None | str | Unset): Step ID to filter by. + limit (int | Unset): Max turns to return. Default: 10. + offset (int | Unset): Number of recent turns to skip. Default: 0. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AiConversationHistoryResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + step_type=step_type, + step_id=step_id, + limit=limit, + offset=offset, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + agent_id: str, + *, + client: AuthenticatedClient | Client, + step_type: str, + step_id: None | str | Unset = UNSET, + limit: int | Unset = 10, + offset: int | Unset = 0, + x_account_id: UUID | Unset = UNSET, +) -> AiConversationHistoryResponse | HTTPValidationError | None: + """Get AI conversation history + + Fetch the AI assistant conversation history for a specific step of an agent. + + Returns past conversation turns (user inputs, AI responses, accept/decline status) ordered oldest + first. Use `step_type` to filter by step type, and optionally `step_id` to narrow to a specific step + instance. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. Only agents belonging to your account can be + queried. + + Args: + agent_id (str): + step_type (str): Step type to look up. + step_id (None | str | Unset): Step ID to filter by. + limit (int | Unset): Max turns to return. Default: 10. + offset (int | Unset): Number of recent turns to skip. Default: 0. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AiConversationHistoryResponse | HTTPValidationError + """ + + return sync_detailed( + agent_id=agent_id, + client=client, + step_type=step_type, + step_id=step_id, + limit=limit, + offset=offset, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, + step_type: str, + step_id: None | str | Unset = UNSET, + limit: int | Unset = 10, + offset: int | Unset = 0, + x_account_id: UUID | Unset = UNSET, +) -> Response[AiConversationHistoryResponse | HTTPValidationError]: + """Get AI conversation history + + Fetch the AI assistant conversation history for a specific step of an agent. + + Returns past conversation turns (user inputs, AI responses, accept/decline status) ordered oldest + first. Use `step_type` to filter by step type, and optionally `step_id` to narrow to a specific step + instance. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. Only agents belonging to your account can be + queried. + + Args: + agent_id (str): + step_type (str): Step type to look up. + step_id (None | str | Unset): Step ID to filter by. + limit (int | Unset): Max turns to return. Default: 10. + offset (int | Unset): Number of recent turns to skip. Default: 0. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AiConversationHistoryResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + step_type=step_type, + step_id=step_id, + limit=limit, + offset=offset, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + agent_id: str, + *, + client: AuthenticatedClient | Client, + step_type: str, + step_id: None | str | Unset = UNSET, + limit: int | Unset = 10, + offset: int | Unset = 0, + x_account_id: UUID | Unset = UNSET, +) -> AiConversationHistoryResponse | HTTPValidationError | None: + """Get AI conversation history + + Fetch the AI assistant conversation history for a specific step of an agent. + + Returns past conversation turns (user inputs, AI responses, accept/decline status) ordered oldest + first. Use `step_type` to filter by step type, and optionally `step_id` to narrow to a specific step + instance. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. Only agents belonging to your account can be + queried. + + Args: + agent_id (str): + step_type (str): Step type to look up. + step_id (None | str | Unset): Step ID to filter by. + limit (int | Unset): Max turns to return. Default: 10. + offset (int | Unset): Number of recent turns to skip. Default: 0. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AiConversationHistoryResponse | HTTPValidationError + """ + + return ( + await asyncio_detailed( + agent_id=agent_id, + client=client, + step_type=step_type, + step_id=step_id, + limit=limit, + offset=offset, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/agents/list_agent_runs_api_agents_agent_id_runs_get.py b/seclai/_generated/api/agents/list_agent_runs_api_agents_agent_id_runs_get.py index 0e05841..d13efa7 100644 --- a/seclai/_generated/api/agents/list_agent_runs_api_agents_agent_id_runs_get.py +++ b/seclai/_generated/api/agents/list_agent_runs_api_agents_agent_id_runs_get.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -8,6 +9,9 @@ from ...client import AuthenticatedClient, Client from ...models.agent_run_list_response import AgentRunListResponse from ...models.http_validation_error import HTTPValidationError +from ...models.pending_processing_completed_failed_status import ( + PendingProcessingCompletedFailedStatus, +) from ...types import UNSET, Response, Unset @@ -16,13 +20,28 @@ def _get_kwargs( *, page: int | Unset = 1, limit: int | Unset = 50, + status: None | PendingProcessingCompletedFailedStatus | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + params: dict[str, Any] = {} params["page"] = page params["limit"] = limit + json_status: None | str | Unset + if isinstance(status, Unset): + json_status = UNSET + elif isinstance(status, PendingProcessingCompletedFailedStatus): + json_status = status.value + else: + json_status = status + params["status"] = json_status + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { @@ -33,6 +52,7 @@ def _get_kwargs( "params": params, } + _kwargs["headers"] = headers return _kwargs @@ -72,25 +92,30 @@ def sync_detailed( client: AuthenticatedClient | Client, page: int | Unset = 1, limit: int | Unset = 50, + status: None | PendingProcessingCompletedFailedStatus | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[AgentRunListResponse | HTTPValidationError]: """List agent runs List runs for a specific agent (most recent first), with pagination. Typical use cases: - - Build a run history UI for an agent. + - Build a traces UI for an agent. - Debug recent executions and inspect terminal statuses. Notes: - This endpoint returns a summary list. Fetch full details with `GET /agents/runs/{run_id}`. Auth & scoping: - - Requires `X-API-Key`. You can only list runs for agents in your account. + - Requires `X-API-Key` header or OAuth Bearer token. You can only list runs for agents in your + account. Args: agent_id (str): page (int | Unset): Page number Default: 1. limit (int | Unset): Items per page Default: 50. + status (None | PendingProcessingCompletedFailedStatus | Unset): Filter runs by status + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -104,6 +129,8 @@ def sync_detailed( agent_id=agent_id, page=page, limit=limit, + status=status, + x_account_id=x_account_id, ) response = client.get_httpx_client().request( @@ -119,25 +146,30 @@ def sync( client: AuthenticatedClient | Client, page: int | Unset = 1, limit: int | Unset = 50, + status: None | PendingProcessingCompletedFailedStatus | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> AgentRunListResponse | HTTPValidationError | None: """List agent runs List runs for a specific agent (most recent first), with pagination. Typical use cases: - - Build a run history UI for an agent. + - Build a traces UI for an agent. - Debug recent executions and inspect terminal statuses. Notes: - This endpoint returns a summary list. Fetch full details with `GET /agents/runs/{run_id}`. Auth & scoping: - - Requires `X-API-Key`. You can only list runs for agents in your account. + - Requires `X-API-Key` header or OAuth Bearer token. You can only list runs for agents in your + account. Args: agent_id (str): page (int | Unset): Page number Default: 1. limit (int | Unset): Items per page Default: 50. + status (None | PendingProcessingCompletedFailedStatus | Unset): Filter runs by status + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -152,6 +184,8 @@ def sync( client=client, page=page, limit=limit, + status=status, + x_account_id=x_account_id, ).parsed @@ -161,25 +195,30 @@ async def asyncio_detailed( client: AuthenticatedClient | Client, page: int | Unset = 1, limit: int | Unset = 50, + status: None | PendingProcessingCompletedFailedStatus | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[AgentRunListResponse | HTTPValidationError]: """List agent runs List runs for a specific agent (most recent first), with pagination. Typical use cases: - - Build a run history UI for an agent. + - Build a traces UI for an agent. - Debug recent executions and inspect terminal statuses. Notes: - This endpoint returns a summary list. Fetch full details with `GET /agents/runs/{run_id}`. Auth & scoping: - - Requires `X-API-Key`. You can only list runs for agents in your account. + - Requires `X-API-Key` header or OAuth Bearer token. You can only list runs for agents in your + account. Args: agent_id (str): page (int | Unset): Page number Default: 1. limit (int | Unset): Items per page Default: 50. + status (None | PendingProcessingCompletedFailedStatus | Unset): Filter runs by status + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -193,6 +232,8 @@ async def asyncio_detailed( agent_id=agent_id, page=page, limit=limit, + status=status, + x_account_id=x_account_id, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -206,25 +247,30 @@ async def asyncio( client: AuthenticatedClient | Client, page: int | Unset = 1, limit: int | Unset = 50, + status: None | PendingProcessingCompletedFailedStatus | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> AgentRunListResponse | HTTPValidationError | None: """List agent runs List runs for a specific agent (most recent first), with pagination. Typical use cases: - - Build a run history UI for an agent. + - Build a traces UI for an agent. - Debug recent executions and inspect terminal statuses. Notes: - This endpoint returns a summary list. Fetch full details with `GET /agents/runs/{run_id}`. Auth & scoping: - - Requires `X-API-Key`. You can only list runs for agents in your account. + - Requires `X-API-Key` header or OAuth Bearer token. You can only list runs for agents in your + account. Args: agent_id (str): page (int | Unset): Page number Default: 1. limit (int | Unset): Items per page Default: 50. + status (None | PendingProcessingCompletedFailedStatus | Unset): Filter runs by status + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -240,5 +286,7 @@ async def asyncio( client=client, page=page, limit=limit, + status=status, + x_account_id=x_account_id, ) ).parsed diff --git a/seclai/_generated/api/agents/list_agents_api_agents_get.py b/seclai/_generated/api/agents/list_agents_api_agents_get.py new file mode 100644 index 0000000..09644b0 --- /dev/null +++ b/seclai/_generated/api/agents/list_agents_api_agents_get.py @@ -0,0 +1,223 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.agent_list_response import AgentListResponse +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: int | Unset = 1, + limit: int | Unset = 20, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/agents", + "params": params, + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AgentListResponse | HTTPValidationError | None: + if response.status_code == 200: + response_200 = AgentListResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AgentListResponse | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = 1, + limit: int | Unset = 20, + x_account_id: UUID | Unset = UNSET, +) -> Response[AgentListResponse | HTTPValidationError]: + """List agents + + List agents for the account with pagination. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. All resources are scoped to the caller's + account. + + Args: + page (int | Unset): Page number Default: 1. + limit (int | Unset): Items per page Default: 20. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AgentListResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + page: int | Unset = 1, + limit: int | Unset = 20, + x_account_id: UUID | Unset = UNSET, +) -> AgentListResponse | HTTPValidationError | None: + """List agents + + List agents for the account with pagination. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. All resources are scoped to the caller's + account. + + Args: + page (int | Unset): Page number Default: 1. + limit (int | Unset): Items per page Default: 20. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AgentListResponse | HTTPValidationError + """ + + return sync_detailed( + client=client, + page=page, + limit=limit, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = 1, + limit: int | Unset = 20, + x_account_id: UUID | Unset = UNSET, +) -> Response[AgentListResponse | HTTPValidationError]: + """List agents + + List agents for the account with pagination. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. All resources are scoped to the caller's + account. + + Args: + page (int | Unset): Page number Default: 1. + limit (int | Unset): Items per page Default: 20. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AgentListResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + page: int | Unset = 1, + limit: int | Unset = 20, + x_account_id: UUID | Unset = UNSET, +) -> AgentListResponse | HTTPValidationError | None: + """List agents + + List agents for the account with pagination. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. All resources are scoped to the caller's + account. + + Args: + page (int | Unset): Page number Default: 1. + limit (int | Unset): Items per page Default: 20. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AgentListResponse | HTTPValidationError + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + limit=limit, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/agents/mark_ai_suggestion_api_agents_agent_id_ai_assistant_conversation_id_patch.py b/seclai/_generated/api/agents/mark_ai_suggestion_api_agents_agent_id_ai_assistant_conversation_id_patch.py new file mode 100644 index 0000000..7bfcf2c --- /dev/null +++ b/seclai/_generated/api/agents/mark_ai_suggestion_api_agents_agent_id_ai_assistant_conversation_id_patch.py @@ -0,0 +1,273 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.mark_ai_suggestion_api_agents_agent_id_ai_assistant_conversation_id_patch_response_mark_ai_suggestion_api_agents_agent_id_ai_assistant_conversation_id_patch import ( + MarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatchResponseMarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatch, +) +from ...models.mark_ai_suggestion_request import MarkAiSuggestionRequest +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + agent_id: str, + conversation_id: str, + *, + body: MarkAiSuggestionRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/agents/{agent_id}/ai-assistant/{conversation_id}".format( + agent_id=quote(str(agent_id), safe=""), + conversation_id=quote(str(conversation_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + HTTPValidationError + | MarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatchResponseMarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatch + | None +): + if response.status_code == 200: + response_200 = MarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatchResponseMarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatch.from_dict( + response.json() + ) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + HTTPValidationError + | MarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatchResponseMarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatch +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + agent_id: str, + conversation_id: str, + *, + client: AuthenticatedClient | Client, + body: MarkAiSuggestionRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + HTTPValidationError + | MarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatchResponseMarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatch +]: + """Accept or decline suggestion + + Accept or decline a proposed AI assistant configuration for a conversation turn. + + This only updates the tracking status on the conversation record. To actually apply the proposed + configuration, use the agent definition update endpoint separately. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. The conversation must belong to one of your + agents. + + Args: + agent_id (str): + conversation_id (str): + x_account_id (UUID | Unset): + body (MarkAiSuggestionRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | MarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatchResponseMarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatch] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + conversation_id=conversation_id, + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + agent_id: str, + conversation_id: str, + *, + client: AuthenticatedClient | Client, + body: MarkAiSuggestionRequest, + x_account_id: UUID | Unset = UNSET, +) -> ( + HTTPValidationError + | MarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatchResponseMarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatch + | None +): + """Accept or decline suggestion + + Accept or decline a proposed AI assistant configuration for a conversation turn. + + This only updates the tracking status on the conversation record. To actually apply the proposed + configuration, use the agent definition update endpoint separately. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. The conversation must belong to one of your + agents. + + Args: + agent_id (str): + conversation_id (str): + x_account_id (UUID | Unset): + body (MarkAiSuggestionRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | MarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatchResponseMarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatch + """ + + return sync_detailed( + agent_id=agent_id, + conversation_id=conversation_id, + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + agent_id: str, + conversation_id: str, + *, + client: AuthenticatedClient | Client, + body: MarkAiSuggestionRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + HTTPValidationError + | MarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatchResponseMarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatch +]: + """Accept or decline suggestion + + Accept or decline a proposed AI assistant configuration for a conversation turn. + + This only updates the tracking status on the conversation record. To actually apply the proposed + configuration, use the agent definition update endpoint separately. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. The conversation must belong to one of your + agents. + + Args: + agent_id (str): + conversation_id (str): + x_account_id (UUID | Unset): + body (MarkAiSuggestionRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | MarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatchResponseMarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatch] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + conversation_id=conversation_id, + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + agent_id: str, + conversation_id: str, + *, + client: AuthenticatedClient | Client, + body: MarkAiSuggestionRequest, + x_account_id: UUID | Unset = UNSET, +) -> ( + HTTPValidationError + | MarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatchResponseMarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatch + | None +): + """Accept or decline suggestion + + Accept or decline a proposed AI assistant configuration for a conversation turn. + + This only updates the tracking status on the conversation record. To actually apply the proposed + configuration, use the agent definition update endpoint separately. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. The conversation must belong to one of your + agents. + + Args: + agent_id (str): + conversation_id (str): + x_account_id (UUID | Unset): + body (MarkAiSuggestionRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | MarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatchResponseMarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatch + """ + + return ( + await asyncio_detailed( + agent_id=agent_id, + conversation_id=conversation_id, + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/agents/run_agent_api_agents_agent_id_runs_post.py b/seclai/_generated/api/agents/run_agent_api_agents_agent_id_runs_post.py index 2008936..e7d2f6c 100644 --- a/seclai/_generated/api/agents/run_agent_api_agents_agent_id_runs_post.py +++ b/seclai/_generated/api/agents/run_agent_api_agents_agent_id_runs_post.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -9,15 +10,18 @@ from ...models.agent_run_request import AgentRunRequest from ...models.agent_run_response import AgentRunResponse from ...models.http_validation_error import HTTPValidationError -from ...types import Response +from ...types import UNSET, Response, Unset def _get_kwargs( agent_id: str, *, body: AgentRunRequest, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id _kwargs: dict[str, Any] = { "method": "post", @@ -69,6 +73,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: AgentRunRequest, + x_account_id: UUID | Unset = UNSET, ) -> Response[AgentRunResponse | HTTPValidationError]: """Run an agent @@ -83,6 +88,9 @@ def sync_detailed( - Use `POST /agents/{agent_id}/runs/stream` if you need real-time progress via SSE. Key fields: + - `input`: text input for agents with a `dynamic_input` trigger. + - `input_upload_id`: alternatively, reference a file previously uploaded via `POST + /agents/{agent_id}/upload-input` (mutually exclusive with `input`). - `priority`: set true for latency-sensitive, user-facing work. - `metadata`: a JSON object that becomes available to agent steps for string substitution. @@ -91,10 +99,12 @@ def sync_detailed( - Use `include_step_outputs=true` to include per-step outputs, timing, and credits. Auth & scoping: - - Requires `X-API-Key`. All resources are scoped to the API key's account. + - Requires `X-API-Key` header or OAuth Bearer token. All resources are scoped to the caller's + account. Args: agent_id (str): + x_account_id (UUID | Unset): body (AgentRunRequest): Raises: @@ -108,6 +118,7 @@ def sync_detailed( kwargs = _get_kwargs( agent_id=agent_id, body=body, + x_account_id=x_account_id, ) response = client.get_httpx_client().request( @@ -122,6 +133,7 @@ def sync( *, client: AuthenticatedClient | Client, body: AgentRunRequest, + x_account_id: UUID | Unset = UNSET, ) -> AgentRunResponse | HTTPValidationError | None: """Run an agent @@ -136,6 +148,9 @@ def sync( - Use `POST /agents/{agent_id}/runs/stream` if you need real-time progress via SSE. Key fields: + - `input`: text input for agents with a `dynamic_input` trigger. + - `input_upload_id`: alternatively, reference a file previously uploaded via `POST + /agents/{agent_id}/upload-input` (mutually exclusive with `input`). - `priority`: set true for latency-sensitive, user-facing work. - `metadata`: a JSON object that becomes available to agent steps for string substitution. @@ -144,10 +159,12 @@ def sync( - Use `include_step_outputs=true` to include per-step outputs, timing, and credits. Auth & scoping: - - Requires `X-API-Key`. All resources are scoped to the API key's account. + - Requires `X-API-Key` header or OAuth Bearer token. All resources are scoped to the caller's + account. Args: agent_id (str): + x_account_id (UUID | Unset): body (AgentRunRequest): Raises: @@ -162,6 +179,7 @@ def sync( agent_id=agent_id, client=client, body=body, + x_account_id=x_account_id, ).parsed @@ -170,6 +188,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: AgentRunRequest, + x_account_id: UUID | Unset = UNSET, ) -> Response[AgentRunResponse | HTTPValidationError]: """Run an agent @@ -184,6 +203,9 @@ async def asyncio_detailed( - Use `POST /agents/{agent_id}/runs/stream` if you need real-time progress via SSE. Key fields: + - `input`: text input for agents with a `dynamic_input` trigger. + - `input_upload_id`: alternatively, reference a file previously uploaded via `POST + /agents/{agent_id}/upload-input` (mutually exclusive with `input`). - `priority`: set true for latency-sensitive, user-facing work. - `metadata`: a JSON object that becomes available to agent steps for string substitution. @@ -192,10 +214,12 @@ async def asyncio_detailed( - Use `include_step_outputs=true` to include per-step outputs, timing, and credits. Auth & scoping: - - Requires `X-API-Key`. All resources are scoped to the API key's account. + - Requires `X-API-Key` header or OAuth Bearer token. All resources are scoped to the caller's + account. Args: agent_id (str): + x_account_id (UUID | Unset): body (AgentRunRequest): Raises: @@ -209,6 +233,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( agent_id=agent_id, body=body, + x_account_id=x_account_id, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -221,6 +246,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: AgentRunRequest, + x_account_id: UUID | Unset = UNSET, ) -> AgentRunResponse | HTTPValidationError | None: """Run an agent @@ -235,6 +261,9 @@ async def asyncio( - Use `POST /agents/{agent_id}/runs/stream` if you need real-time progress via SSE. Key fields: + - `input`: text input for agents with a `dynamic_input` trigger. + - `input_upload_id`: alternatively, reference a file previously uploaded via `POST + /agents/{agent_id}/upload-input` (mutually exclusive with `input`). - `priority`: set true for latency-sensitive, user-facing work. - `metadata`: a JSON object that becomes available to agent steps for string substitution. @@ -243,10 +272,12 @@ async def asyncio( - Use `include_step_outputs=true` to include per-step outputs, timing, and credits. Auth & scoping: - - Requires `X-API-Key`. All resources are scoped to the API key's account. + - Requires `X-API-Key` header or OAuth Bearer token. All resources are scoped to the caller's + account. Args: agent_id (str): + x_account_id (UUID | Unset): body (AgentRunRequest): Raises: @@ -262,5 +293,6 @@ async def asyncio( agent_id=agent_id, client=client, body=body, + x_account_id=x_account_id, ) ).parsed diff --git a/seclai/_generated/api/agents/run_streaming_agent_api_agents_agent_id_runs_stream_post.py b/seclai/_generated/api/agents/run_streaming_agent_api_agents_agent_id_runs_stream_post.py index d18ebda..acb41ff 100644 --- a/seclai/_generated/api/agents/run_streaming_agent_api_agents_agent_id_runs_stream_post.py +++ b/seclai/_generated/api/agents/run_streaming_agent_api_agents_agent_id_runs_stream_post.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -8,15 +9,18 @@ from ...client import AuthenticatedClient, Client from ...models.agent_run_stream_request import AgentRunStreamRequest from ...models.http_validation_error import HTTPValidationError -from ...types import Response +from ...types import UNSET, Response, Unset def _get_kwargs( agent_id: str, *, body: AgentRunStreamRequest, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id _kwargs: dict[str, Any] = { "method": "post", @@ -67,6 +71,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: AgentRunStreamRequest, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Run an agent (stream events) @@ -80,16 +85,23 @@ def sync_detailed( - The final `done` event contains the terminal snapshot (including `output` and `credits` when available). + Input options (for `dynamic_input` triggers): + - `input`: text input passed directly. + - `input_upload_id`: reference a file uploaded via `POST /agents/{agent_id}/upload-input` (mutually + exclusive with `input`). + Client guidance: - Keep the connection open and handle keepalive comments. - On `timeout` or `error`, the payload includes `run_id` so clients can resume by polling `GET /agents/runs/{run_id}`. Auth & scoping: - - Requires `X-API-Key`. All resources are scoped to the API key's account. + - Requires `X-API-Key` header or OAuth Bearer token. All resources are scoped to the caller's + account. Args: agent_id (str): + x_account_id (UUID | Unset): body (AgentRunStreamRequest): Raises: @@ -103,6 +115,7 @@ def sync_detailed( kwargs = _get_kwargs( agent_id=agent_id, body=body, + x_account_id=x_account_id, ) response = client.get_httpx_client().request( @@ -117,6 +130,7 @@ def sync( *, client: AuthenticatedClient | Client, body: AgentRunStreamRequest, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Run an agent (stream events) @@ -130,16 +144,23 @@ def sync( - The final `done` event contains the terminal snapshot (including `output` and `credits` when available). + Input options (for `dynamic_input` triggers): + - `input`: text input passed directly. + - `input_upload_id`: reference a file uploaded via `POST /agents/{agent_id}/upload-input` (mutually + exclusive with `input`). + Client guidance: - Keep the connection open and handle keepalive comments. - On `timeout` or `error`, the payload includes `run_id` so clients can resume by polling `GET /agents/runs/{run_id}`. Auth & scoping: - - Requires `X-API-Key`. All resources are scoped to the API key's account. + - Requires `X-API-Key` header or OAuth Bearer token. All resources are scoped to the caller's + account. Args: agent_id (str): + x_account_id (UUID | Unset): body (AgentRunStreamRequest): Raises: @@ -154,6 +175,7 @@ def sync( agent_id=agent_id, client=client, body=body, + x_account_id=x_account_id, ).parsed @@ -162,6 +184,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: AgentRunStreamRequest, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Run an agent (stream events) @@ -175,16 +198,23 @@ async def asyncio_detailed( - The final `done` event contains the terminal snapshot (including `output` and `credits` when available). + Input options (for `dynamic_input` triggers): + - `input`: text input passed directly. + - `input_upload_id`: reference a file uploaded via `POST /agents/{agent_id}/upload-input` (mutually + exclusive with `input`). + Client guidance: - Keep the connection open and handle keepalive comments. - On `timeout` or `error`, the payload includes `run_id` so clients can resume by polling `GET /agents/runs/{run_id}`. Auth & scoping: - - Requires `X-API-Key`. All resources are scoped to the API key's account. + - Requires `X-API-Key` header or OAuth Bearer token. All resources are scoped to the caller's + account. Args: agent_id (str): + x_account_id (UUID | Unset): body (AgentRunStreamRequest): Raises: @@ -198,6 +228,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( agent_id=agent_id, body=body, + x_account_id=x_account_id, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -210,6 +241,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: AgentRunStreamRequest, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Run an agent (stream events) @@ -223,16 +255,23 @@ async def asyncio( - The final `done` event contains the terminal snapshot (including `output` and `credits` when available). + Input options (for `dynamic_input` triggers): + - `input`: text input passed directly. + - `input_upload_id`: reference a file uploaded via `POST /agents/{agent_id}/upload-input` (mutually + exclusive with `input`). + Client guidance: - Keep the connection open and handle keepalive comments. - On `timeout` or `error`, the payload includes `run_id` so clients can resume by polling `GET /agents/runs/{run_id}`. Auth & scoping: - - Requires `X-API-Key`. All resources are scoped to the API key's account. + - Requires `X-API-Key` header or OAuth Bearer token. All resources are scoped to the caller's + account. Args: agent_id (str): + x_account_id (UUID | Unset): body (AgentRunStreamRequest): Raises: @@ -248,5 +287,6 @@ async def asyncio( agent_id=agent_id, client=client, body=body, + x_account_id=x_account_id, ) ).parsed diff --git a/seclai/_generated/api/agents/search_agent_runs_api_agents_runs_search_post.py b/seclai/_generated/api/agents/search_agent_runs_api_agents_runs_search_post.py new file mode 100644 index 0000000..898f6a6 --- /dev/null +++ b/seclai/_generated/api/agents/search_agent_runs_api_agents_runs_search_post.py @@ -0,0 +1,226 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.agent_trace_search_request import AgentTraceSearchRequest +from ...models.agent_trace_search_response import AgentTraceSearchResponse +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + body: AgentTraceSearchRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/agents/runs/search", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AgentTraceSearchResponse | HTTPValidationError | None: + if response.status_code == 200: + response_200 = AgentTraceSearchResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AgentTraceSearchResponse | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: AgentTraceSearchRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[AgentTraceSearchResponse | HTTPValidationError]: + """Search agent traces + + Search agent traces using semantic similarity. + + Finds step-run outputs that are most semantically similar to the query. + Results include the matching text, agent/step metadata, and a similarity score. + + Agent traces are automatically indexed when runs complete. The first 7 days of storage are free; + extended retention is billed. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. Searches only within your account's traces. + + Args: + x_account_id (UUID | Unset): + body (AgentTraceSearchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AgentTraceSearchResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: AgentTraceSearchRequest, + x_account_id: UUID | Unset = UNSET, +) -> AgentTraceSearchResponse | HTTPValidationError | None: + """Search agent traces + + Search agent traces using semantic similarity. + + Finds step-run outputs that are most semantically similar to the query. + Results include the matching text, agent/step metadata, and a similarity score. + + Agent traces are automatically indexed when runs complete. The first 7 days of storage are free; + extended retention is billed. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. Searches only within your account's traces. + + Args: + x_account_id (UUID | Unset): + body (AgentTraceSearchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AgentTraceSearchResponse | HTTPValidationError + """ + + return sync_detailed( + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: AgentTraceSearchRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[AgentTraceSearchResponse | HTTPValidationError]: + """Search agent traces + + Search agent traces using semantic similarity. + + Finds step-run outputs that are most semantically similar to the query. + Results include the matching text, agent/step metadata, and a similarity score. + + Agent traces are automatically indexed when runs complete. The first 7 days of storage are free; + extended retention is billed. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. Searches only within your account's traces. + + Args: + x_account_id (UUID | Unset): + body (AgentTraceSearchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AgentTraceSearchResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: AgentTraceSearchRequest, + x_account_id: UUID | Unset = UNSET, +) -> AgentTraceSearchResponse | HTTPValidationError | None: + """Search agent traces + + Search agent traces using semantic similarity. + + Finds step-run outputs that are most semantically similar to the query. + Results include the matching text, agent/step metadata, and a similarity score. + + Agent traces are automatically indexed when runs complete. The first 7 days of storage are free; + extended retention is billed. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. Searches only within your account's traces. + + Args: + x_account_id (UUID | Unset): + body (AgentTraceSearchRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AgentTraceSearchResponse | HTTPValidationError + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/agents/update_agent_api_agents_agent_id_put.py b/seclai/_generated/api/agents/update_agent_api_agents_agent_id_put.py new file mode 100644 index 0000000..ab510c4 --- /dev/null +++ b/seclai/_generated/api/agents/update_agent_api_agents_agent_id_put.py @@ -0,0 +1,266 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.agent_summary_response import AgentSummaryResponse +from ...models.http_validation_error import HTTPValidationError +from ...models.update_agent_request import UpdateAgentRequest +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + agent_id: str, + *, + body: UpdateAgentRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "put", + "url": "/agents/{agent_id}".format( + agent_id=quote(str(agent_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AgentSummaryResponse | HTTPValidationError | None: + if response.status_code == 200: + response_200 = AgentSummaryResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AgentSummaryResponse | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, + body: UpdateAgentRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[AgentSummaryResponse | HTTPValidationError]: + """Update agent metadata + + Update an agent's name, description, evaluation settings, and model lifecycle settings. + + Evaluation settings: `evaluation_mode` ('output_expectation', 'eval_and_retry', 'sample_and_flag'), + `default_evaluation_tier` ('fast', 'balanced', 'thorough'), `max_retries`, `retry_on_failure`, + `sampling_config`. + + Model lifecycle settings: `prompt_model_auto_upgrade_strategy` ('none', 'early_adopter', + 'middle_of_road', 'cautious_adopter'), `prompt_model_auto_rollback_enabled`, + `prompt_model_auto_rollback_triggers` (list of 'agent_eval_fail', 'governance_flag', + 'governance_block', 'agent_run_failed'). + + At least one field must be provided. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. You can only update agents belonging to your + account. + + Args: + agent_id (str): + x_account_id (UUID | Unset): + body (UpdateAgentRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AgentSummaryResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + agent_id: str, + *, + client: AuthenticatedClient | Client, + body: UpdateAgentRequest, + x_account_id: UUID | Unset = UNSET, +) -> AgentSummaryResponse | HTTPValidationError | None: + """Update agent metadata + + Update an agent's name, description, evaluation settings, and model lifecycle settings. + + Evaluation settings: `evaluation_mode` ('output_expectation', 'eval_and_retry', 'sample_and_flag'), + `default_evaluation_tier` ('fast', 'balanced', 'thorough'), `max_retries`, `retry_on_failure`, + `sampling_config`. + + Model lifecycle settings: `prompt_model_auto_upgrade_strategy` ('none', 'early_adopter', + 'middle_of_road', 'cautious_adopter'), `prompt_model_auto_rollback_enabled`, + `prompt_model_auto_rollback_triggers` (list of 'agent_eval_fail', 'governance_flag', + 'governance_block', 'agent_run_failed'). + + At least one field must be provided. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. You can only update agents belonging to your + account. + + Args: + agent_id (str): + x_account_id (UUID | Unset): + body (UpdateAgentRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AgentSummaryResponse | HTTPValidationError + """ + + return sync_detailed( + agent_id=agent_id, + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, + body: UpdateAgentRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[AgentSummaryResponse | HTTPValidationError]: + """Update agent metadata + + Update an agent's name, description, evaluation settings, and model lifecycle settings. + + Evaluation settings: `evaluation_mode` ('output_expectation', 'eval_and_retry', 'sample_and_flag'), + `default_evaluation_tier` ('fast', 'balanced', 'thorough'), `max_retries`, `retry_on_failure`, + `sampling_config`. + + Model lifecycle settings: `prompt_model_auto_upgrade_strategy` ('none', 'early_adopter', + 'middle_of_road', 'cautious_adopter'), `prompt_model_auto_rollback_enabled`, + `prompt_model_auto_rollback_triggers` (list of 'agent_eval_fail', 'governance_flag', + 'governance_block', 'agent_run_failed'). + + At least one field must be provided. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. You can only update agents belonging to your + account. + + Args: + agent_id (str): + x_account_id (UUID | Unset): + body (UpdateAgentRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AgentSummaryResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + agent_id: str, + *, + client: AuthenticatedClient | Client, + body: UpdateAgentRequest, + x_account_id: UUID | Unset = UNSET, +) -> AgentSummaryResponse | HTTPValidationError | None: + """Update agent metadata + + Update an agent's name, description, evaluation settings, and model lifecycle settings. + + Evaluation settings: `evaluation_mode` ('output_expectation', 'eval_and_retry', 'sample_and_flag'), + `default_evaluation_tier` ('fast', 'balanced', 'thorough'), `max_retries`, `retry_on_failure`, + `sampling_config`. + + Model lifecycle settings: `prompt_model_auto_upgrade_strategy` ('none', 'early_adopter', + 'middle_of_road', 'cautious_adopter'), `prompt_model_auto_rollback_enabled`, + `prompt_model_auto_rollback_triggers` (list of 'agent_eval_fail', 'governance_flag', + 'governance_block', 'agent_run_failed'). + + At least one field must be provided. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. You can only update agents belonging to your + account. + + Args: + agent_id (str): + x_account_id (UUID | Unset): + body (UpdateAgentRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AgentSummaryResponse | HTTPValidationError + """ + + return ( + await asyncio_detailed( + agent_id=agent_id, + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/agents/update_agent_definition_api_agents_agent_id_definition_put.py b/seclai/_generated/api/agents/update_agent_definition_api_agents_agent_id_definition_put.py new file mode 100644 index 0000000..ce276ce --- /dev/null +++ b/seclai/_generated/api/agents/update_agent_definition_api_agents_agent_id_definition_put.py @@ -0,0 +1,282 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.agent_definition_response import AgentDefinitionResponse +from ...models.http_validation_error import HTTPValidationError +from ...models.update_agent_definition_request import UpdateAgentDefinitionRequest +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + agent_id: str, + *, + body: UpdateAgentDefinitionRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "put", + "url": "/agents/{agent_id}/definition".format( + agent_id=quote(str(agent_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AgentDefinitionResponse | HTTPValidationError | None: + if response.status_code == 200: + response_200 = AgentDefinitionResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AgentDefinitionResponse | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, + body: UpdateAgentDefinitionRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[AgentDefinitionResponse | HTTPValidationError]: + """Update agent definition + + Update the agent's definition on the main branch. + + Uses **optimistic locking**: provide `expected_change_id` from the last `GET + /api/agents/{agent_id}/definition`. Returns `409 Conflict` if the definition was modified since your + last read. + + The definition contains the agent's step workflow. Step types include `prompt_call`, `retrieval`, + `transform`, `gate`, `retry`, `evaluate_step`, `insight`, `extract_json`, `extract_html`, + `extract_xml`, `send_email`, `webhook_call`, `write_aws_s3_object`, `call_agent`, `write_metadata`, + `write_content_attachment`, `load_content_attachment`, `load_content`, `display_result`, `join`, + `combinator`, and `text`. Non-composite step types (`display_result`, `join`, `retry`, + `evaluate_step`) cannot contain child steps. + + **Retry steps** re-execute from a target ancestor step for quality-control loops. Configure with + `target_step_id` (ancestor step ID) and `max_retries` (1–10). Best practice: place a `gate` step + before the retry to make retries conditional. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. You can only update agents belonging to your + account. + + Args: + agent_id (str): + x_account_id (UUID | Unset): + body (UpdateAgentDefinitionRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AgentDefinitionResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + agent_id: str, + *, + client: AuthenticatedClient | Client, + body: UpdateAgentDefinitionRequest, + x_account_id: UUID | Unset = UNSET, +) -> AgentDefinitionResponse | HTTPValidationError | None: + """Update agent definition + + Update the agent's definition on the main branch. + + Uses **optimistic locking**: provide `expected_change_id` from the last `GET + /api/agents/{agent_id}/definition`. Returns `409 Conflict` if the definition was modified since your + last read. + + The definition contains the agent's step workflow. Step types include `prompt_call`, `retrieval`, + `transform`, `gate`, `retry`, `evaluate_step`, `insight`, `extract_json`, `extract_html`, + `extract_xml`, `send_email`, `webhook_call`, `write_aws_s3_object`, `call_agent`, `write_metadata`, + `write_content_attachment`, `load_content_attachment`, `load_content`, `display_result`, `join`, + `combinator`, and `text`. Non-composite step types (`display_result`, `join`, `retry`, + `evaluate_step`) cannot contain child steps. + + **Retry steps** re-execute from a target ancestor step for quality-control loops. Configure with + `target_step_id` (ancestor step ID) and `max_retries` (1–10). Best practice: place a `gate` step + before the retry to make retries conditional. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. You can only update agents belonging to your + account. + + Args: + agent_id (str): + x_account_id (UUID | Unset): + body (UpdateAgentDefinitionRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AgentDefinitionResponse | HTTPValidationError + """ + + return sync_detailed( + agent_id=agent_id, + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, + body: UpdateAgentDefinitionRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[AgentDefinitionResponse | HTTPValidationError]: + """Update agent definition + + Update the agent's definition on the main branch. + + Uses **optimistic locking**: provide `expected_change_id` from the last `GET + /api/agents/{agent_id}/definition`. Returns `409 Conflict` if the definition was modified since your + last read. + + The definition contains the agent's step workflow. Step types include `prompt_call`, `retrieval`, + `transform`, `gate`, `retry`, `evaluate_step`, `insight`, `extract_json`, `extract_html`, + `extract_xml`, `send_email`, `webhook_call`, `write_aws_s3_object`, `call_agent`, `write_metadata`, + `write_content_attachment`, `load_content_attachment`, `load_content`, `display_result`, `join`, + `combinator`, and `text`. Non-composite step types (`display_result`, `join`, `retry`, + `evaluate_step`) cannot contain child steps. + + **Retry steps** re-execute from a target ancestor step for quality-control loops. Configure with + `target_step_id` (ancestor step ID) and `max_retries` (1–10). Best practice: place a `gate` step + before the retry to make retries conditional. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. You can only update agents belonging to your + account. + + Args: + agent_id (str): + x_account_id (UUID | Unset): + body (UpdateAgentDefinitionRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AgentDefinitionResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + agent_id: str, + *, + client: AuthenticatedClient | Client, + body: UpdateAgentDefinitionRequest, + x_account_id: UUID | Unset = UNSET, +) -> AgentDefinitionResponse | HTTPValidationError | None: + """Update agent definition + + Update the agent's definition on the main branch. + + Uses **optimistic locking**: provide `expected_change_id` from the last `GET + /api/agents/{agent_id}/definition`. Returns `409 Conflict` if the definition was modified since your + last read. + + The definition contains the agent's step workflow. Step types include `prompt_call`, `retrieval`, + `transform`, `gate`, `retry`, `evaluate_step`, `insight`, `extract_json`, `extract_html`, + `extract_xml`, `send_email`, `webhook_call`, `write_aws_s3_object`, `call_agent`, `write_metadata`, + `write_content_attachment`, `load_content_attachment`, `load_content`, `display_result`, `join`, + `combinator`, and `text`. Non-composite step types (`display_result`, `join`, `retry`, + `evaluate_step`) cannot contain child steps. + + **Retry steps** re-execute from a target ancestor step for quality-control loops. Configure with + `target_step_id` (ancestor step ID) and `max_retries` (1–10). Best practice: place a `gate` step + before the retry to make retries conditional. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. You can only update agents belonging to your + account. + + Args: + agent_id (str): + x_account_id (UUID | Unset): + body (UpdateAgentDefinitionRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AgentDefinitionResponse | HTTPValidationError + """ + + return ( + await asyncio_detailed( + agent_id=agent_id, + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/ai_assistant/__init__.py b/seclai/_generated/api/ai_assistant/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/seclai/_generated/api/ai_assistant/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/seclai/_generated/api/ai_assistant/api_ai_accept_api_ai_assistant_conversation_id_accept_post.py b/seclai/_generated/api/ai_assistant/api_ai_accept_api_ai_assistant_conversation_id_accept_post.py new file mode 100644 index 0000000..7682d0c --- /dev/null +++ b/seclai/_generated/api/ai_assistant/api_ai_accept_api_ai_assistant_conversation_id_accept_post.py @@ -0,0 +1,218 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.ai_assistant_accept_request import AiAssistantAcceptRequest +from ...models.ai_assistant_accept_response import AiAssistantAcceptResponse +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + conversation_id: UUID, + *, + body: AiAssistantAcceptRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/ai-assistant/{conversation_id}/accept".format( + conversation_id=quote(str(conversation_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AiAssistantAcceptResponse | HTTPValidationError | None: + if response.status_code == 200: + response_200 = AiAssistantAcceptResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AiAssistantAcceptResponse | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + conversation_id: UUID, + *, + client: AuthenticatedClient | Client, + body: AiAssistantAcceptRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[AiAssistantAcceptResponse | HTTPValidationError]: + """Accept and execute a standalone plan + + Accept and execute a previously proposed standalone plan. If the plan contains destructive actions + (deletions), ``confirm_deletions`` must be set to true. + + Auth: requires ``X-API-Key`` header or OAuth Bearer token. + + Args: + conversation_id (UUID): + x_account_id (UUID | Unset): + body (AiAssistantAcceptRequest): Request body for accepting a proposed plan. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AiAssistantAcceptResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + conversation_id=conversation_id, + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + conversation_id: UUID, + *, + client: AuthenticatedClient | Client, + body: AiAssistantAcceptRequest, + x_account_id: UUID | Unset = UNSET, +) -> AiAssistantAcceptResponse | HTTPValidationError | None: + """Accept and execute a standalone plan + + Accept and execute a previously proposed standalone plan. If the plan contains destructive actions + (deletions), ``confirm_deletions`` must be set to true. + + Auth: requires ``X-API-Key`` header or OAuth Bearer token. + + Args: + conversation_id (UUID): + x_account_id (UUID | Unset): + body (AiAssistantAcceptRequest): Request body for accepting a proposed plan. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AiAssistantAcceptResponse | HTTPValidationError + """ + + return sync_detailed( + conversation_id=conversation_id, + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + conversation_id: UUID, + *, + client: AuthenticatedClient | Client, + body: AiAssistantAcceptRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[AiAssistantAcceptResponse | HTTPValidationError]: + """Accept and execute a standalone plan + + Accept and execute a previously proposed standalone plan. If the plan contains destructive actions + (deletions), ``confirm_deletions`` must be set to true. + + Auth: requires ``X-API-Key`` header or OAuth Bearer token. + + Args: + conversation_id (UUID): + x_account_id (UUID | Unset): + body (AiAssistantAcceptRequest): Request body for accepting a proposed plan. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AiAssistantAcceptResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + conversation_id=conversation_id, + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + conversation_id: UUID, + *, + client: AuthenticatedClient | Client, + body: AiAssistantAcceptRequest, + x_account_id: UUID | Unset = UNSET, +) -> AiAssistantAcceptResponse | HTTPValidationError | None: + """Accept and execute a standalone plan + + Accept and execute a previously proposed standalone plan. If the plan contains destructive actions + (deletions), ``confirm_deletions`` must be set to true. + + Auth: requires ``X-API-Key`` header or OAuth Bearer token. + + Args: + conversation_id (UUID): + x_account_id (UUID | Unset): + body (AiAssistantAcceptRequest): Request body for accepting a proposed plan. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AiAssistantAcceptResponse | HTTPValidationError + """ + + return ( + await asyncio_detailed( + conversation_id=conversation_id, + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/ai_assistant/api_ai_decline_api_ai_assistant_conversation_id_decline_post.py b/seclai/_generated/api/ai_assistant/api_ai_decline_api_ai_assistant_conversation_id_decline_post.py new file mode 100644 index 0000000..1c7ec9d --- /dev/null +++ b/seclai/_generated/api/ai_assistant/api_ai_decline_api_ai_assistant_conversation_id_decline_post.py @@ -0,0 +1,198 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + conversation_id: UUID, + *, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/ai-assistant/{conversation_id}/decline".format( + conversation_id=quote(str(conversation_id), safe=""), + ), + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | HTTPValidationError | None: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + conversation_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any | HTTPValidationError]: + """Decline a standalone plan + + Decline a previously proposed standalone plan. No resources are modified. The conversation is marked + as declined. + + Auth: requires ``X-API-Key`` header or OAuth Bearer token. + + Args: + conversation_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + conversation_id=conversation_id, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + conversation_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Any | HTTPValidationError | None: + """Decline a standalone plan + + Decline a previously proposed standalone plan. No resources are modified. The conversation is marked + as declined. + + Auth: requires ``X-API-Key`` header or OAuth Bearer token. + + Args: + conversation_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return sync_detailed( + conversation_id=conversation_id, + client=client, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + conversation_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any | HTTPValidationError]: + """Decline a standalone plan + + Decline a previously proposed standalone plan. No resources are modified. The conversation is marked + as declined. + + Auth: requires ``X-API-Key`` header or OAuth Bearer token. + + Args: + conversation_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + conversation_id=conversation_id, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + conversation_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Any | HTTPValidationError | None: + """Decline a standalone plan + + Decline a previously proposed standalone plan. No resources are modified. The conversation is marked + as declined. + + Auth: requires ``X-API-Key`` header or OAuth Bearer token. + + Args: + conversation_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return ( + await asyncio_detailed( + conversation_id=conversation_id, + client=client, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/ai_assistant/api_ai_feedback_api_ai_assistant_feedback_post.py b/seclai/_generated/api/ai_assistant/api_ai_feedback_api_ai_assistant_feedback_post.py new file mode 100644 index 0000000..7f9d224 --- /dev/null +++ b/seclai/_generated/api/ai_assistant/api_ai_feedback_api_ai_assistant_feedback_post.py @@ -0,0 +1,202 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.ai_assistant_feedback_request import AiAssistantFeedbackRequest +from ...models.ai_assistant_feedback_response import AiAssistantFeedbackResponse +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + body: AiAssistantFeedbackRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/ai-assistant/feedback", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AiAssistantFeedbackResponse | HTTPValidationError | None: + if response.status_code == 200: + response_200 = AiAssistantFeedbackResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AiAssistantFeedbackResponse | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: AiAssistantFeedbackRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[AiAssistantFeedbackResponse | HTTPValidationError]: + """Submit AI assistant feedback + + Submit thumbs-up/down feedback on any AI assistant interaction. Negative feedback with a comment is + analyzed for concerning issues. + + Auth: requires ``X-API-Key`` header or OAuth Bearer token. + + Args: + x_account_id (UUID | Unset): + body (AiAssistantFeedbackRequest): Request body for submitting AI assistant feedback. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AiAssistantFeedbackResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: AiAssistantFeedbackRequest, + x_account_id: UUID | Unset = UNSET, +) -> AiAssistantFeedbackResponse | HTTPValidationError | None: + """Submit AI assistant feedback + + Submit thumbs-up/down feedback on any AI assistant interaction. Negative feedback with a comment is + analyzed for concerning issues. + + Auth: requires ``X-API-Key`` header or OAuth Bearer token. + + Args: + x_account_id (UUID | Unset): + body (AiAssistantFeedbackRequest): Request body for submitting AI assistant feedback. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AiAssistantFeedbackResponse | HTTPValidationError + """ + + return sync_detailed( + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: AiAssistantFeedbackRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[AiAssistantFeedbackResponse | HTTPValidationError]: + """Submit AI assistant feedback + + Submit thumbs-up/down feedback on any AI assistant interaction. Negative feedback with a comment is + analyzed for concerning issues. + + Auth: requires ``X-API-Key`` header or OAuth Bearer token. + + Args: + x_account_id (UUID | Unset): + body (AiAssistantFeedbackRequest): Request body for submitting AI assistant feedback. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AiAssistantFeedbackResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: AiAssistantFeedbackRequest, + x_account_id: UUID | Unset = UNSET, +) -> AiAssistantFeedbackResponse | HTTPValidationError | None: + """Submit AI assistant feedback + + Submit thumbs-up/down feedback on any AI assistant interaction. Negative feedback with a comment is + analyzed for concerning issues. + + Auth: requires ``X-API-Key`` header or OAuth Bearer token. + + Args: + x_account_id (UUID | Unset): + body (AiAssistantFeedbackRequest): Request body for submitting AI assistant feedback. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AiAssistantFeedbackResponse | HTTPValidationError + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/ai_assistant/api_ai_knowledge_base_api_ai_assistant_knowledge_base_post.py b/seclai/_generated/api/ai_assistant/api_ai_knowledge_base_api_ai_assistant_knowledge_base_post.py new file mode 100644 index 0000000..a7fc46a --- /dev/null +++ b/seclai/_generated/api/ai_assistant/api_ai_knowledge_base_api_ai_assistant_knowledge_base_post.py @@ -0,0 +1,202 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.ai_assistant_generate_request import AiAssistantGenerateRequest +from ...models.ai_assistant_generate_response import AiAssistantGenerateResponse +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + body: AiAssistantGenerateRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/ai-assistant/knowledge-base", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AiAssistantGenerateResponse | HTTPValidationError | None: + if response.status_code == 200: + response_200 = AiAssistantGenerateResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AiAssistantGenerateResponse | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: AiAssistantGenerateRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[AiAssistantGenerateResponse | HTTPValidationError]: + """Generate a knowledge base plan (standalone) + + Generate a knowledge base creation/modification plan without requiring an existing solution. May + also propose prerequisite source creation actions. + + Auth: requires ``X-API-Key`` header or OAuth Bearer token. + + Args: + x_account_id (UUID | Unset): + body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AiAssistantGenerateResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: AiAssistantGenerateRequest, + x_account_id: UUID | Unset = UNSET, +) -> AiAssistantGenerateResponse | HTTPValidationError | None: + """Generate a knowledge base plan (standalone) + + Generate a knowledge base creation/modification plan without requiring an existing solution. May + also propose prerequisite source creation actions. + + Auth: requires ``X-API-Key`` header or OAuth Bearer token. + + Args: + x_account_id (UUID | Unset): + body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AiAssistantGenerateResponse | HTTPValidationError + """ + + return sync_detailed( + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: AiAssistantGenerateRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[AiAssistantGenerateResponse | HTTPValidationError]: + """Generate a knowledge base plan (standalone) + + Generate a knowledge base creation/modification plan without requiring an existing solution. May + also propose prerequisite source creation actions. + + Auth: requires ``X-API-Key`` header or OAuth Bearer token. + + Args: + x_account_id (UUID | Unset): + body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AiAssistantGenerateResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: AiAssistantGenerateRequest, + x_account_id: UUID | Unset = UNSET, +) -> AiAssistantGenerateResponse | HTTPValidationError | None: + """Generate a knowledge base plan (standalone) + + Generate a knowledge base creation/modification plan without requiring an existing solution. May + also propose prerequisite source creation actions. + + Auth: requires ``X-API-Key`` header or OAuth Bearer token. + + Args: + x_account_id (UUID | Unset): + body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AiAssistantGenerateResponse | HTTPValidationError + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/ai_assistant/api_ai_memory_bank_accept_api_ai_assistant_memory_bank_conversation_id_patch.py b/seclai/_generated/api/ai_assistant/api_ai_memory_bank_accept_api_ai_assistant_memory_bank_conversation_id_patch.py new file mode 100644 index 0000000..9ee2f8b --- /dev/null +++ b/seclai/_generated/api/ai_assistant/api_ai_memory_bank_accept_api_ai_assistant_memory_bank_conversation_id_patch.py @@ -0,0 +1,247 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.api_ai_memory_bank_accept_api_ai_assistant_memory_bank_conversation_id_patch_response_api_ai_memory_bank_accept_api_ai_assistant_memory_bank_conversation_id_patch import ( + ApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatchResponseApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatch, +) +from ...models.http_validation_error import HTTPValidationError +from ...models.memory_bank_accept_request import MemoryBankAcceptRequest +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + conversation_id: UUID, + *, + body: MemoryBankAcceptRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/ai-assistant/memory-bank/{conversation_id}".format( + conversation_id=quote(str(conversation_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatchResponseApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatch + | HTTPValidationError + | None +): + if response.status_code == 200: + response_200 = ApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatchResponseApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatch.from_dict( + response.json() + ) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatchResponseApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatch + | HTTPValidationError +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + conversation_id: UUID, + *, + client: AuthenticatedClient | Client, + body: MemoryBankAcceptRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + ApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatchResponseApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatch + | HTTPValidationError +]: + """Accept or decline a memory bank AI suggestion + + Update the acceptance status of a memory bank AI assistant conversation turn. Set ``accepted`` to + true to accept the proposed configuration, or false to decline it. The accepted status is recorded + for audit purposes. + + Auth: requires ``X-API-Key`` header or OAuth Bearer token. + + Args: + conversation_id (UUID): + x_account_id (UUID | Unset): + body (MemoryBankAcceptRequest): Accept or decline a memory bank AI suggestion. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatchResponseApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatch | HTTPValidationError] + """ + + kwargs = _get_kwargs( + conversation_id=conversation_id, + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + conversation_id: UUID, + *, + client: AuthenticatedClient | Client, + body: MemoryBankAcceptRequest, + x_account_id: UUID | Unset = UNSET, +) -> ( + ApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatchResponseApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatch + | HTTPValidationError + | None +): + """Accept or decline a memory bank AI suggestion + + Update the acceptance status of a memory bank AI assistant conversation turn. Set ``accepted`` to + true to accept the proposed configuration, or false to decline it. The accepted status is recorded + for audit purposes. + + Auth: requires ``X-API-Key`` header or OAuth Bearer token. + + Args: + conversation_id (UUID): + x_account_id (UUID | Unset): + body (MemoryBankAcceptRequest): Accept or decline a memory bank AI suggestion. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatchResponseApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatch | HTTPValidationError + """ + + return sync_detailed( + conversation_id=conversation_id, + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + conversation_id: UUID, + *, + client: AuthenticatedClient | Client, + body: MemoryBankAcceptRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + ApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatchResponseApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatch + | HTTPValidationError +]: + """Accept or decline a memory bank AI suggestion + + Update the acceptance status of a memory bank AI assistant conversation turn. Set ``accepted`` to + true to accept the proposed configuration, or false to decline it. The accepted status is recorded + for audit purposes. + + Auth: requires ``X-API-Key`` header or OAuth Bearer token. + + Args: + conversation_id (UUID): + x_account_id (UUID | Unset): + body (MemoryBankAcceptRequest): Accept or decline a memory bank AI suggestion. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatchResponseApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatch | HTTPValidationError] + """ + + kwargs = _get_kwargs( + conversation_id=conversation_id, + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + conversation_id: UUID, + *, + client: AuthenticatedClient | Client, + body: MemoryBankAcceptRequest, + x_account_id: UUID | Unset = UNSET, +) -> ( + ApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatchResponseApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatch + | HTTPValidationError + | None +): + """Accept or decline a memory bank AI suggestion + + Update the acceptance status of a memory bank AI assistant conversation turn. Set ``accepted`` to + true to accept the proposed configuration, or false to decline it. The accepted status is recorded + for audit purposes. + + Auth: requires ``X-API-Key`` header or OAuth Bearer token. + + Args: + conversation_id (UUID): + x_account_id (UUID | Unset): + body (MemoryBankAcceptRequest): Accept or decline a memory bank AI suggestion. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatchResponseApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatch | HTTPValidationError + """ + + return ( + await asyncio_detailed( + conversation_id=conversation_id, + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/ai_assistant/api_ai_memory_bank_api_ai_assistant_memory_bank_post.py b/seclai/_generated/api/ai_assistant/api_ai_memory_bank_api_ai_assistant_memory_bank_post.py new file mode 100644 index 0000000..6749b12 --- /dev/null +++ b/seclai/_generated/api/ai_assistant/api_ai_memory_bank_api_ai_assistant_memory_bank_post.py @@ -0,0 +1,202 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.memory_bank_ai_assistant_request import MemoryBankAiAssistantRequest +from ...models.memory_bank_ai_assistant_response import MemoryBankAiAssistantResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + body: MemoryBankAiAssistantRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/ai-assistant/memory-bank", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> HTTPValidationError | MemoryBankAiAssistantResponse | None: + if response.status_code == 200: + response_200 = MemoryBankAiAssistantResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[HTTPValidationError | MemoryBankAiAssistantResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: MemoryBankAiAssistantRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | MemoryBankAiAssistantResponse]: + """Generate a memory bank configuration (standalone) + + Generate a memory bank configuration suggestion via the AI assistant. The AI proposes name, type, + mode, compaction prompt, and retention settings. + + Auth: requires ``X-API-Key`` header or OAuth Bearer token. + + Args: + x_account_id (UUID | Unset): + body (MemoryBankAiAssistantRequest): Request body for the memory bank AI assistant. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | MemoryBankAiAssistantResponse] + """ + + kwargs = _get_kwargs( + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: MemoryBankAiAssistantRequest, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | MemoryBankAiAssistantResponse | None: + """Generate a memory bank configuration (standalone) + + Generate a memory bank configuration suggestion via the AI assistant. The AI proposes name, type, + mode, compaction prompt, and retention settings. + + Auth: requires ``X-API-Key`` header or OAuth Bearer token. + + Args: + x_account_id (UUID | Unset): + body (MemoryBankAiAssistantRequest): Request body for the memory bank AI assistant. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | MemoryBankAiAssistantResponse + """ + + return sync_detailed( + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: MemoryBankAiAssistantRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | MemoryBankAiAssistantResponse]: + """Generate a memory bank configuration (standalone) + + Generate a memory bank configuration suggestion via the AI assistant. The AI proposes name, type, + mode, compaction prompt, and retention settings. + + Auth: requires ``X-API-Key`` header or OAuth Bearer token. + + Args: + x_account_id (UUID | Unset): + body (MemoryBankAiAssistantRequest): Request body for the memory bank AI assistant. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | MemoryBankAiAssistantResponse] + """ + + kwargs = _get_kwargs( + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: MemoryBankAiAssistantRequest, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | MemoryBankAiAssistantResponse | None: + """Generate a memory bank configuration (standalone) + + Generate a memory bank configuration suggestion via the AI assistant. The AI proposes name, type, + mode, compaction prompt, and retention settings. + + Auth: requires ``X-API-Key`` header or OAuth Bearer token. + + Args: + x_account_id (UUID | Unset): + body (MemoryBankAiAssistantRequest): Request body for the memory bank AI assistant. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | MemoryBankAiAssistantResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/ai_assistant/api_ai_memory_bank_history_api_ai_assistant_memory_bank_last_conversation_get.py b/seclai/_generated/api/ai_assistant/api_ai_memory_bank_history_api_ai_assistant_memory_bank_last_conversation_get.py new file mode 100644 index 0000000..8ee783e --- /dev/null +++ b/seclai/_generated/api/ai_assistant/api_ai_memory_bank_history_api_ai_assistant_memory_bank_last_conversation_get.py @@ -0,0 +1,225 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.memory_bank_last_conversation_response import ( + MemoryBankLastConversationResponse, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + limit: int | Unset = 5, + offset: int | Unset = 0, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + params: dict[str, Any] = {} + + params["limit"] = limit + + params["offset"] = offset + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/ai-assistant/memory-bank/last-conversation", + "params": params, + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> HTTPValidationError | MemoryBankLastConversationResponse | None: + if response.status_code == 200: + response_200 = MemoryBankLastConversationResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[HTTPValidationError | MemoryBankLastConversationResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + limit: int | Unset = 5, + offset: int | Unset = 0, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | MemoryBankLastConversationResponse]: + """Fetch memory bank AI conversation history + + Fetch the most recent memory bank AI assistant conversation turns for the authenticated user. + Returns turns in oldest-first order with a total count for pagination via limit/offset query + parameters. + + Auth: requires ``X-API-Key`` header or OAuth Bearer token. + + Args: + limit (int | Unset): Max turns. Default: 5. + offset (int | Unset): Skip count. Default: 0. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | MemoryBankLastConversationResponse] + """ + + kwargs = _get_kwargs( + limit=limit, + offset=offset, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + limit: int | Unset = 5, + offset: int | Unset = 0, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | MemoryBankLastConversationResponse | None: + """Fetch memory bank AI conversation history + + Fetch the most recent memory bank AI assistant conversation turns for the authenticated user. + Returns turns in oldest-first order with a total count for pagination via limit/offset query + parameters. + + Auth: requires ``X-API-Key`` header or OAuth Bearer token. + + Args: + limit (int | Unset): Max turns. Default: 5. + offset (int | Unset): Skip count. Default: 0. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | MemoryBankLastConversationResponse + """ + + return sync_detailed( + client=client, + limit=limit, + offset=offset, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + limit: int | Unset = 5, + offset: int | Unset = 0, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | MemoryBankLastConversationResponse]: + """Fetch memory bank AI conversation history + + Fetch the most recent memory bank AI assistant conversation turns for the authenticated user. + Returns turns in oldest-first order with a total count for pagination via limit/offset query + parameters. + + Auth: requires ``X-API-Key`` header or OAuth Bearer token. + + Args: + limit (int | Unset): Max turns. Default: 5. + offset (int | Unset): Skip count. Default: 0. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | MemoryBankLastConversationResponse] + """ + + kwargs = _get_kwargs( + limit=limit, + offset=offset, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + limit: int | Unset = 5, + offset: int | Unset = 0, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | MemoryBankLastConversationResponse | None: + """Fetch memory bank AI conversation history + + Fetch the most recent memory bank AI assistant conversation turns for the authenticated user. + Returns turns in oldest-first order with a total count for pagination via limit/offset query + parameters. + + Auth: requires ``X-API-Key`` header or OAuth Bearer token. + + Args: + limit (int | Unset): Max turns. Default: 5. + offset (int | Unset): Skip count. Default: 0. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | MemoryBankLastConversationResponse + """ + + return ( + await asyncio_detailed( + client=client, + limit=limit, + offset=offset, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/ai_assistant/api_ai_solution_api_ai_assistant_solution_post.py b/seclai/_generated/api/ai_assistant/api_ai_solution_api_ai_assistant_solution_post.py new file mode 100644 index 0000000..ec42383 --- /dev/null +++ b/seclai/_generated/api/ai_assistant/api_ai_solution_api_ai_assistant_solution_post.py @@ -0,0 +1,202 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.ai_assistant_generate_request import AiAssistantGenerateRequest +from ...models.ai_assistant_generate_response import AiAssistantGenerateResponse +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + body: AiAssistantGenerateRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/ai-assistant/solution", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AiAssistantGenerateResponse | HTTPValidationError | None: + if response.status_code == 200: + response_200 = AiAssistantGenerateResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AiAssistantGenerateResponse | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: AiAssistantGenerateRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[AiAssistantGenerateResponse | HTTPValidationError]: + """Generate a solution plan (standalone) + + Generate a complete solution plan covering sources, knowledge bases, and agents without requiring an + existing solution. Supports SSE streaming when ``Accept: text/event-stream`` is set. + + Auth: requires ``X-API-Key`` header or OAuth Bearer token. + + Args: + x_account_id (UUID | Unset): + body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AiAssistantGenerateResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: AiAssistantGenerateRequest, + x_account_id: UUID | Unset = UNSET, +) -> AiAssistantGenerateResponse | HTTPValidationError | None: + """Generate a solution plan (standalone) + + Generate a complete solution plan covering sources, knowledge bases, and agents without requiring an + existing solution. Supports SSE streaming when ``Accept: text/event-stream`` is set. + + Auth: requires ``X-API-Key`` header or OAuth Bearer token. + + Args: + x_account_id (UUID | Unset): + body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AiAssistantGenerateResponse | HTTPValidationError + """ + + return sync_detailed( + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: AiAssistantGenerateRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[AiAssistantGenerateResponse | HTTPValidationError]: + """Generate a solution plan (standalone) + + Generate a complete solution plan covering sources, knowledge bases, and agents without requiring an + existing solution. Supports SSE streaming when ``Accept: text/event-stream`` is set. + + Auth: requires ``X-API-Key`` header or OAuth Bearer token. + + Args: + x_account_id (UUID | Unset): + body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AiAssistantGenerateResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: AiAssistantGenerateRequest, + x_account_id: UUID | Unset = UNSET, +) -> AiAssistantGenerateResponse | HTTPValidationError | None: + """Generate a solution plan (standalone) + + Generate a complete solution plan covering sources, knowledge bases, and agents without requiring an + existing solution. Supports SSE streaming when ``Accept: text/event-stream`` is set. + + Auth: requires ``X-API-Key`` header or OAuth Bearer token. + + Args: + x_account_id (UUID | Unset): + body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AiAssistantGenerateResponse | HTTPValidationError + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/ai_assistant/api_ai_source_api_ai_assistant_source_post.py b/seclai/_generated/api/ai_assistant/api_ai_source_api_ai_assistant_source_post.py new file mode 100644 index 0000000..57c697b --- /dev/null +++ b/seclai/_generated/api/ai_assistant/api_ai_source_api_ai_assistant_source_post.py @@ -0,0 +1,202 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.ai_assistant_generate_request import AiAssistantGenerateRequest +from ...models.ai_assistant_generate_response import AiAssistantGenerateResponse +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + body: AiAssistantGenerateRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/ai-assistant/source", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AiAssistantGenerateResponse | HTTPValidationError | None: + if response.status_code == 200: + response_200 = AiAssistantGenerateResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AiAssistantGenerateResponse | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: AiAssistantGenerateRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[AiAssistantGenerateResponse | HTTPValidationError]: + """Generate a source plan (standalone) + + Generate a content source creation/modification plan without requiring an existing solution. The AI + proposes actions for the user to review before any changes are made. + + Auth: requires ``X-API-Key`` header or OAuth Bearer token. + + Args: + x_account_id (UUID | Unset): + body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AiAssistantGenerateResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: AiAssistantGenerateRequest, + x_account_id: UUID | Unset = UNSET, +) -> AiAssistantGenerateResponse | HTTPValidationError | None: + """Generate a source plan (standalone) + + Generate a content source creation/modification plan without requiring an existing solution. The AI + proposes actions for the user to review before any changes are made. + + Auth: requires ``X-API-Key`` header or OAuth Bearer token. + + Args: + x_account_id (UUID | Unset): + body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AiAssistantGenerateResponse | HTTPValidationError + """ + + return sync_detailed( + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: AiAssistantGenerateRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[AiAssistantGenerateResponse | HTTPValidationError]: + """Generate a source plan (standalone) + + Generate a content source creation/modification plan without requiring an existing solution. The AI + proposes actions for the user to review before any changes are made. + + Auth: requires ``X-API-Key`` header or OAuth Bearer token. + + Args: + x_account_id (UUID | Unset): + body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AiAssistantGenerateResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: AiAssistantGenerateRequest, + x_account_id: UUID | Unset = UNSET, +) -> AiAssistantGenerateResponse | HTTPValidationError | None: + """Generate a source plan (standalone) + + Generate a content source creation/modification plan without requiring an existing solution. The AI + proposes actions for the user to review before any changes are made. + + Auth: requires ``X-API-Key`` header or OAuth Bearer token. + + Args: + x_account_id (UUID | Unset): + body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AiAssistantGenerateResponse | HTTPValidationError + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/alerts/__init__.py b/seclai/_generated/api/alerts/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/seclai/_generated/api/alerts/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/seclai/_generated/api/alerts/add_alert_comment_api_alerts_alert_id_comments_post.py b/seclai/_generated/api/alerts/add_alert_comment_api_alerts_alert_id_comments_post.py new file mode 100644 index 0000000..856a512 --- /dev/null +++ b/seclai/_generated/api/alerts/add_alert_comment_api_alerts_alert_id_comments_post.py @@ -0,0 +1,247 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.add_alert_comment_api_alerts_alert_id_comments_post_response_add_alert_comment_api_alerts_alert_id_comments_post import ( + AddAlertCommentApiAlertsAlertIdCommentsPostResponseAddAlertCommentApiAlertsAlertIdCommentsPost, +) +from ...models.add_comment_request import AddCommentRequest +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + alert_id: str, + *, + body: AddCommentRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/alerts/{alert_id}/comments".format( + alert_id=quote(str(alert_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + AddAlertCommentApiAlertsAlertIdCommentsPostResponseAddAlertCommentApiAlertsAlertIdCommentsPost + | HTTPValidationError + | None +): + if response.status_code == 200: + response_200 = AddAlertCommentApiAlertsAlertIdCommentsPostResponseAddAlertCommentApiAlertsAlertIdCommentsPost.from_dict( + response.json() + ) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + AddAlertCommentApiAlertsAlertIdCommentsPostResponseAddAlertCommentApiAlertsAlertIdCommentsPost + | HTTPValidationError +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + alert_id: str, + *, + client: AuthenticatedClient | Client, + body: AddCommentRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + AddAlertCommentApiAlertsAlertIdCommentsPostResponseAddAlertCommentApiAlertsAlertIdCommentsPost + | HTTPValidationError +]: + """Add alert comment + + Add a comment to an alert. Comments are visible to all subscribers and are included in the alert + detail response. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + alert_id (str): + x_account_id (UUID | Unset): + body (AddCommentRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AddAlertCommentApiAlertsAlertIdCommentsPostResponseAddAlertCommentApiAlertsAlertIdCommentsPost | HTTPValidationError] + """ + + kwargs = _get_kwargs( + alert_id=alert_id, + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + alert_id: str, + *, + client: AuthenticatedClient | Client, + body: AddCommentRequest, + x_account_id: UUID | Unset = UNSET, +) -> ( + AddAlertCommentApiAlertsAlertIdCommentsPostResponseAddAlertCommentApiAlertsAlertIdCommentsPost + | HTTPValidationError + | None +): + """Add alert comment + + Add a comment to an alert. Comments are visible to all subscribers and are included in the alert + detail response. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + alert_id (str): + x_account_id (UUID | Unset): + body (AddCommentRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AddAlertCommentApiAlertsAlertIdCommentsPostResponseAddAlertCommentApiAlertsAlertIdCommentsPost | HTTPValidationError + """ + + return sync_detailed( + alert_id=alert_id, + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + alert_id: str, + *, + client: AuthenticatedClient | Client, + body: AddCommentRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + AddAlertCommentApiAlertsAlertIdCommentsPostResponseAddAlertCommentApiAlertsAlertIdCommentsPost + | HTTPValidationError +]: + """Add alert comment + + Add a comment to an alert. Comments are visible to all subscribers and are included in the alert + detail response. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + alert_id (str): + x_account_id (UUID | Unset): + body (AddCommentRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AddAlertCommentApiAlertsAlertIdCommentsPostResponseAddAlertCommentApiAlertsAlertIdCommentsPost | HTTPValidationError] + """ + + kwargs = _get_kwargs( + alert_id=alert_id, + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + alert_id: str, + *, + client: AuthenticatedClient | Client, + body: AddCommentRequest, + x_account_id: UUID | Unset = UNSET, +) -> ( + AddAlertCommentApiAlertsAlertIdCommentsPostResponseAddAlertCommentApiAlertsAlertIdCommentsPost + | HTTPValidationError + | None +): + """Add alert comment + + Add a comment to an alert. Comments are visible to all subscribers and are included in the alert + detail response. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + alert_id (str): + x_account_id (UUID | Unset): + body (AddCommentRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AddAlertCommentApiAlertsAlertIdCommentsPostResponseAddAlertCommentApiAlertsAlertIdCommentsPost | HTTPValidationError + """ + + return ( + await asyncio_detailed( + alert_id=alert_id, + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/alerts/change_alert_status_api_alerts_alert_id_status_post.py b/seclai/_generated/api/alerts/change_alert_status_api_alerts_alert_id_status_post.py new file mode 100644 index 0000000..b641349 --- /dev/null +++ b/seclai/_generated/api/alerts/change_alert_status_api_alerts_alert_id_status_post.py @@ -0,0 +1,243 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.change_alert_status_api_alerts_alert_id_status_post_response_change_alert_status_api_alerts_alert_id_status_post import ( + ChangeAlertStatusApiAlertsAlertIdStatusPostResponseChangeAlertStatusApiAlertsAlertIdStatusPost, +) +from ...models.change_status_request import ChangeStatusRequest +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + alert_id: str, + *, + body: ChangeStatusRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/alerts/{alert_id}/status".format( + alert_id=quote(str(alert_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ChangeAlertStatusApiAlertsAlertIdStatusPostResponseChangeAlertStatusApiAlertsAlertIdStatusPost + | HTTPValidationError + | None +): + if response.status_code == 200: + response_200 = ChangeAlertStatusApiAlertsAlertIdStatusPostResponseChangeAlertStatusApiAlertsAlertIdStatusPost.from_dict( + response.json() + ) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ChangeAlertStatusApiAlertsAlertIdStatusPostResponseChangeAlertStatusApiAlertsAlertIdStatusPost + | HTTPValidationError +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + alert_id: str, + *, + client: AuthenticatedClient | Client, + body: ChangeStatusRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + ChangeAlertStatusApiAlertsAlertIdStatusPostResponseChangeAlertStatusApiAlertsAlertIdStatusPost + | HTTPValidationError +]: + """Change alert status + + Change the status of an alert. Valid statuses: triggered, acknowledged, resolved, dismissed. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + alert_id (str): + x_account_id (UUID | Unset): + body (ChangeStatusRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ChangeAlertStatusApiAlertsAlertIdStatusPostResponseChangeAlertStatusApiAlertsAlertIdStatusPost | HTTPValidationError] + """ + + kwargs = _get_kwargs( + alert_id=alert_id, + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + alert_id: str, + *, + client: AuthenticatedClient | Client, + body: ChangeStatusRequest, + x_account_id: UUID | Unset = UNSET, +) -> ( + ChangeAlertStatusApiAlertsAlertIdStatusPostResponseChangeAlertStatusApiAlertsAlertIdStatusPost + | HTTPValidationError + | None +): + """Change alert status + + Change the status of an alert. Valid statuses: triggered, acknowledged, resolved, dismissed. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + alert_id (str): + x_account_id (UUID | Unset): + body (ChangeStatusRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ChangeAlertStatusApiAlertsAlertIdStatusPostResponseChangeAlertStatusApiAlertsAlertIdStatusPost | HTTPValidationError + """ + + return sync_detailed( + alert_id=alert_id, + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + alert_id: str, + *, + client: AuthenticatedClient | Client, + body: ChangeStatusRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + ChangeAlertStatusApiAlertsAlertIdStatusPostResponseChangeAlertStatusApiAlertsAlertIdStatusPost + | HTTPValidationError +]: + """Change alert status + + Change the status of an alert. Valid statuses: triggered, acknowledged, resolved, dismissed. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + alert_id (str): + x_account_id (UUID | Unset): + body (ChangeStatusRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ChangeAlertStatusApiAlertsAlertIdStatusPostResponseChangeAlertStatusApiAlertsAlertIdStatusPost | HTTPValidationError] + """ + + kwargs = _get_kwargs( + alert_id=alert_id, + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + alert_id: str, + *, + client: AuthenticatedClient | Client, + body: ChangeStatusRequest, + x_account_id: UUID | Unset = UNSET, +) -> ( + ChangeAlertStatusApiAlertsAlertIdStatusPostResponseChangeAlertStatusApiAlertsAlertIdStatusPost + | HTTPValidationError + | None +): + """Change alert status + + Change the status of an alert. Valid statuses: triggered, acknowledged, resolved, dismissed. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + alert_id (str): + x_account_id (UUID | Unset): + body (ChangeStatusRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ChangeAlertStatusApiAlertsAlertIdStatusPostResponseChangeAlertStatusApiAlertsAlertIdStatusPost | HTTPValidationError + """ + + return ( + await asyncio_detailed( + alert_id=alert_id, + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/alerts/create_alert_config_api_alerts_configs_post.py b/seclai/_generated/api/alerts/create_alert_config_api_alerts_configs_post.py new file mode 100644 index 0000000..8de8ea1 --- /dev/null +++ b/seclai/_generated/api/alerts/create_alert_config_api_alerts_configs_post.py @@ -0,0 +1,263 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.create_alert_config_api_alerts_configs_post_response_create_alert_config_api_alerts_configs_post import ( + CreateAlertConfigApiAlertsConfigsPostResponseCreateAlertConfigApiAlertsConfigsPost, +) +from ...models.create_alert_config_request import CreateAlertConfigRequest +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + body: CreateAlertConfigRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/alerts/configs", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + CreateAlertConfigApiAlertsConfigsPostResponseCreateAlertConfigApiAlertsConfigsPost + | HTTPValidationError + | None +): + if response.status_code == 201: + response_201 = CreateAlertConfigApiAlertsConfigsPostResponseCreateAlertConfigApiAlertsConfigsPost.from_dict( + response.json() + ) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + CreateAlertConfigApiAlertsConfigsPostResponseCreateAlertConfigApiAlertsConfigsPost + | HTTPValidationError +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: CreateAlertConfigRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + CreateAlertConfigApiAlertsConfigsPostResponseCreateAlertConfigApiAlertsConfigsPost + | HTTPValidationError +]: + """Create alert config + + Create a new alert configuration. + + Agent alert types: run_failed, consecutive_failures, error_rate_spike, run_burst, slow_run, + credits_low_threshold, credits_runout_prediction, credits_usage_spike, non_manual_eval_failed, + non_manual_eval_flagged, governance_flagged, governance_blocked, model_newer_available, + model_deprecated, model_sunset. + Source alert types: pull_failed, consecutive_pull_failures, pull_error_rate_spike. + + Distribution types: owner, owner_admins, selected_members. Organization accounts are normalized to + owner_admins. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + x_account_id (UUID | Unset): + body (CreateAlertConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CreateAlertConfigApiAlertsConfigsPostResponseCreateAlertConfigApiAlertsConfigsPost | HTTPValidationError] + """ + + kwargs = _get_kwargs( + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: CreateAlertConfigRequest, + x_account_id: UUID | Unset = UNSET, +) -> ( + CreateAlertConfigApiAlertsConfigsPostResponseCreateAlertConfigApiAlertsConfigsPost + | HTTPValidationError + | None +): + """Create alert config + + Create a new alert configuration. + + Agent alert types: run_failed, consecutive_failures, error_rate_spike, run_burst, slow_run, + credits_low_threshold, credits_runout_prediction, credits_usage_spike, non_manual_eval_failed, + non_manual_eval_flagged, governance_flagged, governance_blocked, model_newer_available, + model_deprecated, model_sunset. + Source alert types: pull_failed, consecutive_pull_failures, pull_error_rate_spike. + + Distribution types: owner, owner_admins, selected_members. Organization accounts are normalized to + owner_admins. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + x_account_id (UUID | Unset): + body (CreateAlertConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CreateAlertConfigApiAlertsConfigsPostResponseCreateAlertConfigApiAlertsConfigsPost | HTTPValidationError + """ + + return sync_detailed( + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: CreateAlertConfigRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + CreateAlertConfigApiAlertsConfigsPostResponseCreateAlertConfigApiAlertsConfigsPost + | HTTPValidationError +]: + """Create alert config + + Create a new alert configuration. + + Agent alert types: run_failed, consecutive_failures, error_rate_spike, run_burst, slow_run, + credits_low_threshold, credits_runout_prediction, credits_usage_spike, non_manual_eval_failed, + non_manual_eval_flagged, governance_flagged, governance_blocked, model_newer_available, + model_deprecated, model_sunset. + Source alert types: pull_failed, consecutive_pull_failures, pull_error_rate_spike. + + Distribution types: owner, owner_admins, selected_members. Organization accounts are normalized to + owner_admins. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + x_account_id (UUID | Unset): + body (CreateAlertConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CreateAlertConfigApiAlertsConfigsPostResponseCreateAlertConfigApiAlertsConfigsPost | HTTPValidationError] + """ + + kwargs = _get_kwargs( + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: CreateAlertConfigRequest, + x_account_id: UUID | Unset = UNSET, +) -> ( + CreateAlertConfigApiAlertsConfigsPostResponseCreateAlertConfigApiAlertsConfigsPost + | HTTPValidationError + | None +): + """Create alert config + + Create a new alert configuration. + + Agent alert types: run_failed, consecutive_failures, error_rate_spike, run_burst, slow_run, + credits_low_threshold, credits_runout_prediction, credits_usage_spike, non_manual_eval_failed, + non_manual_eval_flagged, governance_flagged, governance_blocked, model_newer_available, + model_deprecated, model_sunset. + Source alert types: pull_failed, consecutive_pull_failures, pull_error_rate_spike. + + Distribution types: owner, owner_admins, selected_members. Organization accounts are normalized to + owner_admins. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + x_account_id (UUID | Unset): + body (CreateAlertConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CreateAlertConfigApiAlertsConfigsPostResponseCreateAlertConfigApiAlertsConfigsPost | HTTPValidationError + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/alerts/delete_alert_config_api_alerts_configs_config_id_delete.py b/seclai/_generated/api/alerts/delete_alert_config_api_alerts_configs_config_id_delete.py new file mode 100644 index 0000000..989c142 --- /dev/null +++ b/seclai/_generated/api/alerts/delete_alert_config_api_alerts_configs_config_id_delete.py @@ -0,0 +1,202 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + config_id: str, + *, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/alerts/configs/{config_id}".format( + config_id=quote(str(config_id), safe=""), + ), + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | HTTPValidationError | None: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + config_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any | HTTPValidationError]: + """Delete alert config + + Delete an alert configuration. This permanently removes the config and stops any future alerts of + this type from being triggered. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + config_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + config_id=config_id, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + config_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Any | HTTPValidationError | None: + """Delete alert config + + Delete an alert configuration. This permanently removes the config and stops any future alerts of + this type from being triggered. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + config_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return sync_detailed( + config_id=config_id, + client=client, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + config_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any | HTTPValidationError]: + """Delete alert config + + Delete an alert configuration. This permanently removes the config and stops any future alerts of + this type from being triggered. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + config_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + config_id=config_id, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + config_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Any | HTTPValidationError | None: + """Delete alert config + + Delete an alert configuration. This permanently removes the config and stops any future alerts of + this type from being triggered. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + config_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return ( + await asyncio_detailed( + config_id=config_id, + client=client, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/alerts/get_alert_config_api_alerts_configs_config_id_get.py b/seclai/_generated/api/alerts/get_alert_config_api_alerts_configs_config_id_get.py new file mode 100644 index 0000000..e58e6b7 --- /dev/null +++ b/seclai/_generated/api/alerts/get_alert_config_api_alerts_configs_config_id_get.py @@ -0,0 +1,237 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.get_alert_config_api_alerts_configs_config_id_get_response_get_alert_config_api_alerts_configs_config_id_get import ( + GetAlertConfigApiAlertsConfigsConfigIdGetResponseGetAlertConfigApiAlertsConfigsConfigIdGet, +) +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + config_id: str, + *, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/alerts/configs/{config_id}".format( + config_id=quote(str(config_id), safe=""), + ), + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + GetAlertConfigApiAlertsConfigsConfigIdGetResponseGetAlertConfigApiAlertsConfigsConfigIdGet + | HTTPValidationError + | None +): + if response.status_code == 200: + response_200 = GetAlertConfigApiAlertsConfigsConfigIdGetResponseGetAlertConfigApiAlertsConfigsConfigIdGet.from_dict( + response.json() + ) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + GetAlertConfigApiAlertsConfigsConfigIdGetResponseGetAlertConfigApiAlertsConfigsConfigIdGet + | HTTPValidationError +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + config_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + GetAlertConfigApiAlertsConfigsConfigIdGetResponseGetAlertConfigApiAlertsConfigsConfigIdGet + | HTTPValidationError +]: + """Get alert config + + Get a specific alert configuration by ID. + + Returns all fields including type, enabled state, threshold, cooldown, distribution type, and + recipient list. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + config_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[GetAlertConfigApiAlertsConfigsConfigIdGetResponseGetAlertConfigApiAlertsConfigsConfigIdGet | HTTPValidationError] + """ + + kwargs = _get_kwargs( + config_id=config_id, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + config_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> ( + GetAlertConfigApiAlertsConfigsConfigIdGetResponseGetAlertConfigApiAlertsConfigsConfigIdGet + | HTTPValidationError + | None +): + """Get alert config + + Get a specific alert configuration by ID. + + Returns all fields including type, enabled state, threshold, cooldown, distribution type, and + recipient list. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + config_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + GetAlertConfigApiAlertsConfigsConfigIdGetResponseGetAlertConfigApiAlertsConfigsConfigIdGet | HTTPValidationError + """ + + return sync_detailed( + config_id=config_id, + client=client, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + config_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + GetAlertConfigApiAlertsConfigsConfigIdGetResponseGetAlertConfigApiAlertsConfigsConfigIdGet + | HTTPValidationError +]: + """Get alert config + + Get a specific alert configuration by ID. + + Returns all fields including type, enabled state, threshold, cooldown, distribution type, and + recipient list. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + config_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[GetAlertConfigApiAlertsConfigsConfigIdGetResponseGetAlertConfigApiAlertsConfigsConfigIdGet | HTTPValidationError] + """ + + kwargs = _get_kwargs( + config_id=config_id, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + config_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> ( + GetAlertConfigApiAlertsConfigsConfigIdGetResponseGetAlertConfigApiAlertsConfigsConfigIdGet + | HTTPValidationError + | None +): + """Get alert config + + Get a specific alert configuration by ID. + + Returns all fields including type, enabled state, threshold, cooldown, distribution type, and + recipient list. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + config_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + GetAlertConfigApiAlertsConfigsConfigIdGetResponseGetAlertConfigApiAlertsConfigsConfigIdGet | HTTPValidationError + """ + + return ( + await asyncio_detailed( + config_id=config_id, + client=client, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/alerts/get_alert_detail_api_alerts_alert_id_get.py b/seclai/_generated/api/alerts/get_alert_detail_api_alerts_alert_id_get.py new file mode 100644 index 0000000..281e16c --- /dev/null +++ b/seclai/_generated/api/alerts/get_alert_detail_api_alerts_alert_id_get.py @@ -0,0 +1,225 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.get_alert_detail_api_alerts_alert_id_get_response_get_alert_detail_api_alerts_alert_id_get import ( + GetAlertDetailApiAlertsAlertIdGetResponseGetAlertDetailApiAlertsAlertIdGet, +) +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + alert_id: str, + *, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/alerts/{alert_id}".format( + alert_id=quote(str(alert_id), safe=""), + ), + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + GetAlertDetailApiAlertsAlertIdGetResponseGetAlertDetailApiAlertsAlertIdGet + | HTTPValidationError + | None +): + if response.status_code == 200: + response_200 = GetAlertDetailApiAlertsAlertIdGetResponseGetAlertDetailApiAlertsAlertIdGet.from_dict( + response.json() + ) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + GetAlertDetailApiAlertsAlertIdGetResponseGetAlertDetailApiAlertsAlertIdGet + | HTTPValidationError +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + alert_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + GetAlertDetailApiAlertsAlertIdGetResponseGetAlertDetailApiAlertsAlertIdGet + | HTTPValidationError +]: + """Get alert detail + + Get full alert detail including history, comments, and subscribers. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + alert_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[GetAlertDetailApiAlertsAlertIdGetResponseGetAlertDetailApiAlertsAlertIdGet | HTTPValidationError] + """ + + kwargs = _get_kwargs( + alert_id=alert_id, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + alert_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> ( + GetAlertDetailApiAlertsAlertIdGetResponseGetAlertDetailApiAlertsAlertIdGet + | HTTPValidationError + | None +): + """Get alert detail + + Get full alert detail including history, comments, and subscribers. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + alert_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + GetAlertDetailApiAlertsAlertIdGetResponseGetAlertDetailApiAlertsAlertIdGet | HTTPValidationError + """ + + return sync_detailed( + alert_id=alert_id, + client=client, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + alert_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + GetAlertDetailApiAlertsAlertIdGetResponseGetAlertDetailApiAlertsAlertIdGet + | HTTPValidationError +]: + """Get alert detail + + Get full alert detail including history, comments, and subscribers. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + alert_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[GetAlertDetailApiAlertsAlertIdGetResponseGetAlertDetailApiAlertsAlertIdGet | HTTPValidationError] + """ + + kwargs = _get_kwargs( + alert_id=alert_id, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + alert_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> ( + GetAlertDetailApiAlertsAlertIdGetResponseGetAlertDetailApiAlertsAlertIdGet + | HTTPValidationError + | None +): + """Get alert detail + + Get full alert detail including history, comments, and subscribers. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + alert_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + GetAlertDetailApiAlertsAlertIdGetResponseGetAlertDetailApiAlertsAlertIdGet | HTTPValidationError + """ + + return ( + await asyncio_detailed( + alert_id=alert_id, + client=client, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/alerts/list_alert_configs_api_alerts_configs_get.py b/seclai/_generated/api/alerts/list_alert_configs_api_alerts_configs_get.py new file mode 100644 index 0000000..7bd8d04 --- /dev/null +++ b/seclai/_generated/api/alerts/list_alert_configs_api_alerts_configs_get.py @@ -0,0 +1,314 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.list_alert_configs_api_alerts_configs_get_response_list_alert_configs_api_alerts_configs_get import ( + ListAlertConfigsApiAlertsConfigsGetResponseListAlertConfigsApiAlertsConfigsGet, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + agent_id: None | str | Unset = UNSET, + source_connection_id: None | str | Unset = UNSET, + scope: None | str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + params: dict[str, Any] = {} + + json_agent_id: None | str | Unset + if isinstance(agent_id, Unset): + json_agent_id = UNSET + else: + json_agent_id = agent_id + params["agent_id"] = json_agent_id + + json_source_connection_id: None | str | Unset + if isinstance(source_connection_id, Unset): + json_source_connection_id = UNSET + else: + json_source_connection_id = source_connection_id + params["source_connection_id"] = json_source_connection_id + + json_scope: None | str | Unset + if isinstance(scope, Unset): + json_scope = UNSET + else: + json_scope = scope + params["scope"] = json_scope + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/alerts/configs", + "params": params, + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + HTTPValidationError + | ListAlertConfigsApiAlertsConfigsGetResponseListAlertConfigsApiAlertsConfigsGet + | None +): + if response.status_code == 200: + response_200 = ListAlertConfigsApiAlertsConfigsGetResponseListAlertConfigsApiAlertsConfigsGet.from_dict( + response.json() + ) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + HTTPValidationError + | ListAlertConfigsApiAlertsConfigsGetResponseListAlertConfigsApiAlertsConfigsGet +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + agent_id: None | str | Unset = UNSET, + source_connection_id: None | str | Unset = UNSET, + scope: None | str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + HTTPValidationError + | ListAlertConfigsApiAlertsConfigsGetResponseListAlertConfigsApiAlertsConfigsGet +]: + """List alert configs + + List alert configurations. + + Filters: + - `agent_id`: list configs for a specific agent + - `source_connection_id`: list configs for a specific source + - Neither: list account-level agent alert configs + - `scope=source`: list account-level source alert configs + + Credits alerts (`credits_low_threshold`, `credits_runout_prediction`, `credits_usage_spike`) are + account-level alert configs. They are evaluated by the credits alert sweep and default-enabled + configs may be auto-created for active accounts at runtime. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + agent_id (None | str | Unset): Filter by agent ID + source_connection_id (None | str | Unset): Filter by source connection ID + scope (None | str | Unset): Set to 'source' to list account-level source alert configs + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | ListAlertConfigsApiAlertsConfigsGetResponseListAlertConfigsApiAlertsConfigsGet] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + source_connection_id=source_connection_id, + scope=scope, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + agent_id: None | str | Unset = UNSET, + source_connection_id: None | str | Unset = UNSET, + scope: None | str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> ( + HTTPValidationError + | ListAlertConfigsApiAlertsConfigsGetResponseListAlertConfigsApiAlertsConfigsGet + | None +): + """List alert configs + + List alert configurations. + + Filters: + - `agent_id`: list configs for a specific agent + - `source_connection_id`: list configs for a specific source + - Neither: list account-level agent alert configs + - `scope=source`: list account-level source alert configs + + Credits alerts (`credits_low_threshold`, `credits_runout_prediction`, `credits_usage_spike`) are + account-level alert configs. They are evaluated by the credits alert sweep and default-enabled + configs may be auto-created for active accounts at runtime. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + agent_id (None | str | Unset): Filter by agent ID + source_connection_id (None | str | Unset): Filter by source connection ID + scope (None | str | Unset): Set to 'source' to list account-level source alert configs + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | ListAlertConfigsApiAlertsConfigsGetResponseListAlertConfigsApiAlertsConfigsGet + """ + + return sync_detailed( + client=client, + agent_id=agent_id, + source_connection_id=source_connection_id, + scope=scope, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + agent_id: None | str | Unset = UNSET, + source_connection_id: None | str | Unset = UNSET, + scope: None | str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + HTTPValidationError + | ListAlertConfigsApiAlertsConfigsGetResponseListAlertConfigsApiAlertsConfigsGet +]: + """List alert configs + + List alert configurations. + + Filters: + - `agent_id`: list configs for a specific agent + - `source_connection_id`: list configs for a specific source + - Neither: list account-level agent alert configs + - `scope=source`: list account-level source alert configs + + Credits alerts (`credits_low_threshold`, `credits_runout_prediction`, `credits_usage_spike`) are + account-level alert configs. They are evaluated by the credits alert sweep and default-enabled + configs may be auto-created for active accounts at runtime. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + agent_id (None | str | Unset): Filter by agent ID + source_connection_id (None | str | Unset): Filter by source connection ID + scope (None | str | Unset): Set to 'source' to list account-level source alert configs + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | ListAlertConfigsApiAlertsConfigsGetResponseListAlertConfigsApiAlertsConfigsGet] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + source_connection_id=source_connection_id, + scope=scope, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + agent_id: None | str | Unset = UNSET, + source_connection_id: None | str | Unset = UNSET, + scope: None | str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> ( + HTTPValidationError + | ListAlertConfigsApiAlertsConfigsGetResponseListAlertConfigsApiAlertsConfigsGet + | None +): + """List alert configs + + List alert configurations. + + Filters: + - `agent_id`: list configs for a specific agent + - `source_connection_id`: list configs for a specific source + - Neither: list account-level agent alert configs + - `scope=source`: list account-level source alert configs + + Credits alerts (`credits_low_threshold`, `credits_runout_prediction`, `credits_usage_spike`) are + account-level alert configs. They are evaluated by the credits alert sweep and default-enabled + configs may be auto-created for active accounts at runtime. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + agent_id (None | str | Unset): Filter by agent ID + source_connection_id (None | str | Unset): Filter by source connection ID + scope (None | str | Unset): Set to 'source' to list account-level source alert configs + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | ListAlertConfigsApiAlertsConfigsGetResponseListAlertConfigsApiAlertsConfigsGet + """ + + return ( + await asyncio_detailed( + client=client, + agent_id=agent_id, + source_connection_id=source_connection_id, + scope=scope, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/alerts/list_alerts_api_alerts_get.py b/seclai/_generated/api/alerts/list_alerts_api_alerts_get.py new file mode 100644 index 0000000..130a142 --- /dev/null +++ b/seclai/_generated/api/alerts/list_alerts_api_alerts_get.py @@ -0,0 +1,358 @@ +import datetime +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.list_alerts_api_alerts_get_response_list_alerts_api_alerts_get import ( + ListAlertsApiAlertsGetResponseListAlertsApiAlertsGet, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: int | Unset = 1, + limit: int | Unset = 20, + status: None | str | Unset = UNSET, + agent_id: None | str | Unset = UNSET, + source_connection_id: None | str | Unset = UNSET, + time_from: datetime.datetime | None | Unset = UNSET, + time_to: datetime.datetime | None | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + json_status: None | str | Unset + if isinstance(status, Unset): + json_status = UNSET + else: + json_status = status + params["status"] = json_status + + json_agent_id: None | str | Unset + if isinstance(agent_id, Unset): + json_agent_id = UNSET + else: + json_agent_id = agent_id + params["agent_id"] = json_agent_id + + json_source_connection_id: None | str | Unset + if isinstance(source_connection_id, Unset): + json_source_connection_id = UNSET + else: + json_source_connection_id = source_connection_id + params["source_connection_id"] = json_source_connection_id + + json_time_from: None | str | Unset + if isinstance(time_from, Unset): + json_time_from = UNSET + elif isinstance(time_from, datetime.datetime): + json_time_from = time_from.isoformat() + else: + json_time_from = time_from + params["time_from"] = json_time_from + + json_time_to: None | str | Unset + if isinstance(time_to, Unset): + json_time_to = UNSET + elif isinstance(time_to, datetime.datetime): + json_time_to = time_to.isoformat() + else: + json_time_to = time_to + params["time_to"] = json_time_to + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/alerts", + "params": params, + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> HTTPValidationError | ListAlertsApiAlertsGetResponseListAlertsApiAlertsGet | None: + if response.status_code == 200: + response_200 = ListAlertsApiAlertsGetResponseListAlertsApiAlertsGet.from_dict( + response.json() + ) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + HTTPValidationError | ListAlertsApiAlertsGetResponseListAlertsApiAlertsGet +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = 1, + limit: int | Unset = 20, + status: None | str | Unset = UNSET, + agent_id: None | str | Unset = UNSET, + source_connection_id: None | str | Unset = UNSET, + time_from: datetime.datetime | None | Unset = UNSET, + time_to: datetime.datetime | None | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + HTTPValidationError | ListAlertsApiAlertsGetResponseListAlertsApiAlertsGet +]: + """List alerts + + List alerts for the account with optional filters. + + Filters: + - `status`: triggered, acknowledged, resolved, dismissed + - `agent_id`: filter by agent + - `source_connection_id`: filter by source + - `time_from` / `time_to`: ISO 8601 date range + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. Results are scoped to the caller's account. + + Args: + page (int | Unset): Page number Default: 1. + limit (int | Unset): Items per page Default: 20. + status (None | str | Unset): Filter by alert status + agent_id (None | str | Unset): Filter by agent ID + source_connection_id (None | str | Unset): Filter by source connection ID + time_from (datetime.datetime | None | Unset): From (ISO 8601) + time_to (datetime.datetime | None | Unset): To (ISO 8601) + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | ListAlertsApiAlertsGetResponseListAlertsApiAlertsGet] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + status=status, + agent_id=agent_id, + source_connection_id=source_connection_id, + time_from=time_from, + time_to=time_to, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + page: int | Unset = 1, + limit: int | Unset = 20, + status: None | str | Unset = UNSET, + agent_id: None | str | Unset = UNSET, + source_connection_id: None | str | Unset = UNSET, + time_from: datetime.datetime | None | Unset = UNSET, + time_to: datetime.datetime | None | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | ListAlertsApiAlertsGetResponseListAlertsApiAlertsGet | None: + """List alerts + + List alerts for the account with optional filters. + + Filters: + - `status`: triggered, acknowledged, resolved, dismissed + - `agent_id`: filter by agent + - `source_connection_id`: filter by source + - `time_from` / `time_to`: ISO 8601 date range + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. Results are scoped to the caller's account. + + Args: + page (int | Unset): Page number Default: 1. + limit (int | Unset): Items per page Default: 20. + status (None | str | Unset): Filter by alert status + agent_id (None | str | Unset): Filter by agent ID + source_connection_id (None | str | Unset): Filter by source connection ID + time_from (datetime.datetime | None | Unset): From (ISO 8601) + time_to (datetime.datetime | None | Unset): To (ISO 8601) + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | ListAlertsApiAlertsGetResponseListAlertsApiAlertsGet + """ + + return sync_detailed( + client=client, + page=page, + limit=limit, + status=status, + agent_id=agent_id, + source_connection_id=source_connection_id, + time_from=time_from, + time_to=time_to, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = 1, + limit: int | Unset = 20, + status: None | str | Unset = UNSET, + agent_id: None | str | Unset = UNSET, + source_connection_id: None | str | Unset = UNSET, + time_from: datetime.datetime | None | Unset = UNSET, + time_to: datetime.datetime | None | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + HTTPValidationError | ListAlertsApiAlertsGetResponseListAlertsApiAlertsGet +]: + """List alerts + + List alerts for the account with optional filters. + + Filters: + - `status`: triggered, acknowledged, resolved, dismissed + - `agent_id`: filter by agent + - `source_connection_id`: filter by source + - `time_from` / `time_to`: ISO 8601 date range + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. Results are scoped to the caller's account. + + Args: + page (int | Unset): Page number Default: 1. + limit (int | Unset): Items per page Default: 20. + status (None | str | Unset): Filter by alert status + agent_id (None | str | Unset): Filter by agent ID + source_connection_id (None | str | Unset): Filter by source connection ID + time_from (datetime.datetime | None | Unset): From (ISO 8601) + time_to (datetime.datetime | None | Unset): To (ISO 8601) + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | ListAlertsApiAlertsGetResponseListAlertsApiAlertsGet] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + status=status, + agent_id=agent_id, + source_connection_id=source_connection_id, + time_from=time_from, + time_to=time_to, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + page: int | Unset = 1, + limit: int | Unset = 20, + status: None | str | Unset = UNSET, + agent_id: None | str | Unset = UNSET, + source_connection_id: None | str | Unset = UNSET, + time_from: datetime.datetime | None | Unset = UNSET, + time_to: datetime.datetime | None | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | ListAlertsApiAlertsGetResponseListAlertsApiAlertsGet | None: + """List alerts + + List alerts for the account with optional filters. + + Filters: + - `status`: triggered, acknowledged, resolved, dismissed + - `agent_id`: filter by agent + - `source_connection_id`: filter by source + - `time_from` / `time_to`: ISO 8601 date range + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. Results are scoped to the caller's account. + + Args: + page (int | Unset): Page number Default: 1. + limit (int | Unset): Items per page Default: 20. + status (None | str | Unset): Filter by alert status + agent_id (None | str | Unset): Filter by agent ID + source_connection_id (None | str | Unset): Filter by source connection ID + time_from (datetime.datetime | None | Unset): From (ISO 8601) + time_to (datetime.datetime | None | Unset): To (ISO 8601) + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | ListAlertsApiAlertsGetResponseListAlertsApiAlertsGet + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + limit=limit, + status=status, + agent_id=agent_id, + source_connection_id=source_connection_id, + time_from=time_from, + time_to=time_to, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/alerts/list_organization_preferences_api_alerts_organization_preferences_list_get.py b/seclai/_generated/api/alerts/list_organization_preferences_api_alerts_organization_preferences_list_get.py new file mode 100644 index 0000000..0e029d5 --- /dev/null +++ b/seclai/_generated/api/alerts/list_organization_preferences_api_alerts_organization_preferences_list_get.py @@ -0,0 +1,250 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.organization_alert_preference_list_response import ( + OrganizationAlertPreferenceListResponse, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + organization_id: None | Unset | UUID = UNSET, + include_defaults: bool | Unset = False, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + params: dict[str, Any] = {} + + json_organization_id: None | str | Unset + if isinstance(organization_id, Unset): + json_organization_id = UNSET + elif isinstance(organization_id, UUID): + json_organization_id = str(organization_id) + else: + json_organization_id = organization_id + params["organization_id"] = json_organization_id + + params["include_defaults"] = include_defaults + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/alerts/organization-preferences/list", + "params": params, + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> HTTPValidationError | OrganizationAlertPreferenceListResponse | None: + if response.status_code == 200: + response_200 = OrganizationAlertPreferenceListResponse.from_dict( + response.json() + ) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[HTTPValidationError | OrganizationAlertPreferenceListResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + organization_id: None | Unset | UUID = UNSET, + include_defaults: bool | Unset = False, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | OrganizationAlertPreferenceListResponse]: + """List organization alert delivery preferences + + List per-organization alert delivery preferences for the authenticated user. + + By default, only explicit override rows are returned. Set `include_defaults=true` to return the + effective subscribed state for every alert type in every organization the user can manage. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + - Only organizations where the user is an owner or administrator are included. + + Args: + organization_id (None | Unset | UUID): Optional organization filter + include_defaults (bool | Unset): Include default subscribed entries for all alert types + Default: False. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | OrganizationAlertPreferenceListResponse] + """ + + kwargs = _get_kwargs( + organization_id=organization_id, + include_defaults=include_defaults, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + organization_id: None | Unset | UUID = UNSET, + include_defaults: bool | Unset = False, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | OrganizationAlertPreferenceListResponse | None: + """List organization alert delivery preferences + + List per-organization alert delivery preferences for the authenticated user. + + By default, only explicit override rows are returned. Set `include_defaults=true` to return the + effective subscribed state for every alert type in every organization the user can manage. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + - Only organizations where the user is an owner or administrator are included. + + Args: + organization_id (None | Unset | UUID): Optional organization filter + include_defaults (bool | Unset): Include default subscribed entries for all alert types + Default: False. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | OrganizationAlertPreferenceListResponse + """ + + return sync_detailed( + client=client, + organization_id=organization_id, + include_defaults=include_defaults, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + organization_id: None | Unset | UUID = UNSET, + include_defaults: bool | Unset = False, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | OrganizationAlertPreferenceListResponse]: + """List organization alert delivery preferences + + List per-organization alert delivery preferences for the authenticated user. + + By default, only explicit override rows are returned. Set `include_defaults=true` to return the + effective subscribed state for every alert type in every organization the user can manage. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + - Only organizations where the user is an owner or administrator are included. + + Args: + organization_id (None | Unset | UUID): Optional organization filter + include_defaults (bool | Unset): Include default subscribed entries for all alert types + Default: False. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | OrganizationAlertPreferenceListResponse] + """ + + kwargs = _get_kwargs( + organization_id=organization_id, + include_defaults=include_defaults, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + organization_id: None | Unset | UUID = UNSET, + include_defaults: bool | Unset = False, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | OrganizationAlertPreferenceListResponse | None: + """List organization alert delivery preferences + + List per-organization alert delivery preferences for the authenticated user. + + By default, only explicit override rows are returned. Set `include_defaults=true` to return the + effective subscribed state for every alert type in every organization the user can manage. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + - Only organizations where the user is an owner or administrator are included. + + Args: + organization_id (None | Unset | UUID): Optional organization filter + include_defaults (bool | Unset): Include default subscribed entries for all alert types + Default: False. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | OrganizationAlertPreferenceListResponse + """ + + return ( + await asyncio_detailed( + client=client, + organization_id=organization_id, + include_defaults=include_defaults, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/alerts/subscribe_to_alert_api_alerts_alert_id_subscribe_post.py b/seclai/_generated/api/alerts/subscribe_to_alert_api_alerts_alert_id_subscribe_post.py new file mode 100644 index 0000000..10f17ec --- /dev/null +++ b/seclai/_generated/api/alerts/subscribe_to_alert_api_alerts_alert_id_subscribe_post.py @@ -0,0 +1,229 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.subscribe_to_alert_api_alerts_alert_id_subscribe_post_response_subscribe_to_alert_api_alerts_alert_id_subscribe_post import ( + SubscribeToAlertApiAlertsAlertIdSubscribePostResponseSubscribeToAlertApiAlertsAlertIdSubscribePost, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + alert_id: str, + *, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/alerts/{alert_id}/subscribe".format( + alert_id=quote(str(alert_id), safe=""), + ), + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + HTTPValidationError + | SubscribeToAlertApiAlertsAlertIdSubscribePostResponseSubscribeToAlertApiAlertsAlertIdSubscribePost + | None +): + if response.status_code == 200: + response_200 = SubscribeToAlertApiAlertsAlertIdSubscribePostResponseSubscribeToAlertApiAlertsAlertIdSubscribePost.from_dict( + response.json() + ) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + HTTPValidationError + | SubscribeToAlertApiAlertsAlertIdSubscribePostResponseSubscribeToAlertApiAlertsAlertIdSubscribePost +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + alert_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + HTTPValidationError + | SubscribeToAlertApiAlertsAlertIdSubscribePostResponseSubscribeToAlertApiAlertsAlertIdSubscribePost +]: + """Subscribe to alert + + Subscribe the current user to an alert. Subscribed users receive email notifications when the alert + status changes or new comments are added. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + alert_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SubscribeToAlertApiAlertsAlertIdSubscribePostResponseSubscribeToAlertApiAlertsAlertIdSubscribePost] + """ + + kwargs = _get_kwargs( + alert_id=alert_id, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + alert_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> ( + HTTPValidationError + | SubscribeToAlertApiAlertsAlertIdSubscribePostResponseSubscribeToAlertApiAlertsAlertIdSubscribePost + | None +): + """Subscribe to alert + + Subscribe the current user to an alert. Subscribed users receive email notifications when the alert + status changes or new comments are added. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + alert_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SubscribeToAlertApiAlertsAlertIdSubscribePostResponseSubscribeToAlertApiAlertsAlertIdSubscribePost + """ + + return sync_detailed( + alert_id=alert_id, + client=client, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + alert_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + HTTPValidationError + | SubscribeToAlertApiAlertsAlertIdSubscribePostResponseSubscribeToAlertApiAlertsAlertIdSubscribePost +]: + """Subscribe to alert + + Subscribe the current user to an alert. Subscribed users receive email notifications when the alert + status changes or new comments are added. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + alert_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SubscribeToAlertApiAlertsAlertIdSubscribePostResponseSubscribeToAlertApiAlertsAlertIdSubscribePost] + """ + + kwargs = _get_kwargs( + alert_id=alert_id, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + alert_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> ( + HTTPValidationError + | SubscribeToAlertApiAlertsAlertIdSubscribePostResponseSubscribeToAlertApiAlertsAlertIdSubscribePost + | None +): + """Subscribe to alert + + Subscribe the current user to an alert. Subscribed users receive email notifications when the alert + status changes or new comments are added. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + alert_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SubscribeToAlertApiAlertsAlertIdSubscribePostResponseSubscribeToAlertApiAlertsAlertIdSubscribePost + """ + + return ( + await asyncio_detailed( + alert_id=alert_id, + client=client, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/alerts/unsubscribe_from_alert_api_alerts_alert_id_unsubscribe_post.py b/seclai/_generated/api/alerts/unsubscribe_from_alert_api_alerts_alert_id_unsubscribe_post.py new file mode 100644 index 0000000..b7a1026 --- /dev/null +++ b/seclai/_generated/api/alerts/unsubscribe_from_alert_api_alerts_alert_id_unsubscribe_post.py @@ -0,0 +1,229 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.unsubscribe_from_alert_api_alerts_alert_id_unsubscribe_post_response_unsubscribe_from_alert_api_alerts_alert_id_unsubscribe_post import ( + UnsubscribeFromAlertApiAlertsAlertIdUnsubscribePostResponseUnsubscribeFromAlertApiAlertsAlertIdUnsubscribePost, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + alert_id: str, + *, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/alerts/{alert_id}/unsubscribe".format( + alert_id=quote(str(alert_id), safe=""), + ), + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + HTTPValidationError + | UnsubscribeFromAlertApiAlertsAlertIdUnsubscribePostResponseUnsubscribeFromAlertApiAlertsAlertIdUnsubscribePost + | None +): + if response.status_code == 200: + response_200 = UnsubscribeFromAlertApiAlertsAlertIdUnsubscribePostResponseUnsubscribeFromAlertApiAlertsAlertIdUnsubscribePost.from_dict( + response.json() + ) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + HTTPValidationError + | UnsubscribeFromAlertApiAlertsAlertIdUnsubscribePostResponseUnsubscribeFromAlertApiAlertsAlertIdUnsubscribePost +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + alert_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + HTTPValidationError + | UnsubscribeFromAlertApiAlertsAlertIdUnsubscribePostResponseUnsubscribeFromAlertApiAlertsAlertIdUnsubscribePost +]: + """Unsubscribe from alert + + Unsubscribe the current user from an alert. The user will no longer receive email notifications for + status changes or new comments on this alert. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + alert_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | UnsubscribeFromAlertApiAlertsAlertIdUnsubscribePostResponseUnsubscribeFromAlertApiAlertsAlertIdUnsubscribePost] + """ + + kwargs = _get_kwargs( + alert_id=alert_id, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + alert_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> ( + HTTPValidationError + | UnsubscribeFromAlertApiAlertsAlertIdUnsubscribePostResponseUnsubscribeFromAlertApiAlertsAlertIdUnsubscribePost + | None +): + """Unsubscribe from alert + + Unsubscribe the current user from an alert. The user will no longer receive email notifications for + status changes or new comments on this alert. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + alert_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | UnsubscribeFromAlertApiAlertsAlertIdUnsubscribePostResponseUnsubscribeFromAlertApiAlertsAlertIdUnsubscribePost + """ + + return sync_detailed( + alert_id=alert_id, + client=client, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + alert_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + HTTPValidationError + | UnsubscribeFromAlertApiAlertsAlertIdUnsubscribePostResponseUnsubscribeFromAlertApiAlertsAlertIdUnsubscribePost +]: + """Unsubscribe from alert + + Unsubscribe the current user from an alert. The user will no longer receive email notifications for + status changes or new comments on this alert. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + alert_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | UnsubscribeFromAlertApiAlertsAlertIdUnsubscribePostResponseUnsubscribeFromAlertApiAlertsAlertIdUnsubscribePost] + """ + + kwargs = _get_kwargs( + alert_id=alert_id, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + alert_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> ( + HTTPValidationError + | UnsubscribeFromAlertApiAlertsAlertIdUnsubscribePostResponseUnsubscribeFromAlertApiAlertsAlertIdUnsubscribePost + | None +): + """Unsubscribe from alert + + Unsubscribe the current user from an alert. The user will no longer receive email notifications for + status changes or new comments on this alert. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + alert_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | UnsubscribeFromAlertApiAlertsAlertIdUnsubscribePostResponseUnsubscribeFromAlertApiAlertsAlertIdUnsubscribePost + """ + + return ( + await asyncio_detailed( + alert_id=alert_id, + client=client, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/alerts/update_alert_config_api_alerts_configs_config_id_patch.py b/seclai/_generated/api/alerts/update_alert_config_api_alerts_configs_config_id_patch.py new file mode 100644 index 0000000..745d665 --- /dev/null +++ b/seclai/_generated/api/alerts/update_alert_config_api_alerts_configs_config_id_patch.py @@ -0,0 +1,243 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.update_alert_config_api_alerts_configs_config_id_patch_response_update_alert_config_api_alerts_configs_config_id_patch import ( + UpdateAlertConfigApiAlertsConfigsConfigIdPatchResponseUpdateAlertConfigApiAlertsConfigsConfigIdPatch, +) +from ...models.update_alert_config_request import UpdateAlertConfigRequest +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + config_id: str, + *, + body: UpdateAlertConfigRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/alerts/configs/{config_id}".format( + config_id=quote(str(config_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + HTTPValidationError + | UpdateAlertConfigApiAlertsConfigsConfigIdPatchResponseUpdateAlertConfigApiAlertsConfigsConfigIdPatch + | None +): + if response.status_code == 200: + response_200 = UpdateAlertConfigApiAlertsConfigsConfigIdPatchResponseUpdateAlertConfigApiAlertsConfigsConfigIdPatch.from_dict( + response.json() + ) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + HTTPValidationError + | UpdateAlertConfigApiAlertsConfigsConfigIdPatchResponseUpdateAlertConfigApiAlertsConfigsConfigIdPatch +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + config_id: str, + *, + client: AuthenticatedClient | Client, + body: UpdateAlertConfigRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + HTTPValidationError + | UpdateAlertConfigApiAlertsConfigsConfigIdPatchResponseUpdateAlertConfigApiAlertsConfigsConfigIdPatch +]: + """Update alert config + + Update an alert configuration. Only provided fields are updated. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + config_id (str): + x_account_id (UUID | Unset): + body (UpdateAlertConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | UpdateAlertConfigApiAlertsConfigsConfigIdPatchResponseUpdateAlertConfigApiAlertsConfigsConfigIdPatch] + """ + + kwargs = _get_kwargs( + config_id=config_id, + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + config_id: str, + *, + client: AuthenticatedClient | Client, + body: UpdateAlertConfigRequest, + x_account_id: UUID | Unset = UNSET, +) -> ( + HTTPValidationError + | UpdateAlertConfigApiAlertsConfigsConfigIdPatchResponseUpdateAlertConfigApiAlertsConfigsConfigIdPatch + | None +): + """Update alert config + + Update an alert configuration. Only provided fields are updated. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + config_id (str): + x_account_id (UUID | Unset): + body (UpdateAlertConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | UpdateAlertConfigApiAlertsConfigsConfigIdPatchResponseUpdateAlertConfigApiAlertsConfigsConfigIdPatch + """ + + return sync_detailed( + config_id=config_id, + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + config_id: str, + *, + client: AuthenticatedClient | Client, + body: UpdateAlertConfigRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + HTTPValidationError + | UpdateAlertConfigApiAlertsConfigsConfigIdPatchResponseUpdateAlertConfigApiAlertsConfigsConfigIdPatch +]: + """Update alert config + + Update an alert configuration. Only provided fields are updated. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + config_id (str): + x_account_id (UUID | Unset): + body (UpdateAlertConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | UpdateAlertConfigApiAlertsConfigsConfigIdPatchResponseUpdateAlertConfigApiAlertsConfigsConfigIdPatch] + """ + + kwargs = _get_kwargs( + config_id=config_id, + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + config_id: str, + *, + client: AuthenticatedClient | Client, + body: UpdateAlertConfigRequest, + x_account_id: UUID | Unset = UNSET, +) -> ( + HTTPValidationError + | UpdateAlertConfigApiAlertsConfigsConfigIdPatchResponseUpdateAlertConfigApiAlertsConfigsConfigIdPatch + | None +): + """Update alert config + + Update an alert configuration. Only provided fields are updated. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + config_id (str): + x_account_id (UUID | Unset): + body (UpdateAlertConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | UpdateAlertConfigApiAlertsConfigsConfigIdPatchResponseUpdateAlertConfigApiAlertsConfigsConfigIdPatch + """ + + return ( + await asyncio_detailed( + config_id=config_id, + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/alerts/update_organization_preference_api_alerts_organization_preferences_organization_id_alert_type_patch.py b/seclai/_generated/api/alerts/update_organization_preference_api_alerts_organization_preferences_organization_id_alert_type_patch.py new file mode 100644 index 0000000..1a6244c --- /dev/null +++ b/seclai/_generated/api/alerts/update_organization_preference_api_alerts_organization_preferences_organization_id_alert_type_patch.py @@ -0,0 +1,252 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.organization_alert_preference_response import ( + OrganizationAlertPreferenceResponse, +) +from ...models.update_organization_alert_preference_request import ( + UpdateOrganizationAlertPreferenceRequest, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + organization_id: UUID, + alert_type: str, + *, + body: UpdateOrganizationAlertPreferenceRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/alerts/organization-preferences/{organization_id}/{alert_type}".format( + organization_id=quote(str(organization_id), safe=""), + alert_type=quote(str(alert_type), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> HTTPValidationError | OrganizationAlertPreferenceResponse | None: + if response.status_code == 200: + response_200 = OrganizationAlertPreferenceResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[HTTPValidationError | OrganizationAlertPreferenceResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + organization_id: UUID, + alert_type: str, + *, + client: AuthenticatedClient | Client, + body: UpdateOrganizationAlertPreferenceRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | OrganizationAlertPreferenceResponse]: + """Update organization alert delivery preference + + Update the authenticated user's personal delivery preference for one alert type in one organization. + + Setting `subscribed=false` stores an explicit opt-out override. Setting `subscribed=true` removes + the override and restores the default subscribed behavior. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + - Only owners and administrators can update preferences for an organization. + + Args: + organization_id (UUID): + alert_type (str): + x_account_id (UUID | Unset): + body (UpdateOrganizationAlertPreferenceRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | OrganizationAlertPreferenceResponse] + """ + + kwargs = _get_kwargs( + organization_id=organization_id, + alert_type=alert_type, + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + organization_id: UUID, + alert_type: str, + *, + client: AuthenticatedClient | Client, + body: UpdateOrganizationAlertPreferenceRequest, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | OrganizationAlertPreferenceResponse | None: + """Update organization alert delivery preference + + Update the authenticated user's personal delivery preference for one alert type in one organization. + + Setting `subscribed=false` stores an explicit opt-out override. Setting `subscribed=true` removes + the override and restores the default subscribed behavior. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + - Only owners and administrators can update preferences for an organization. + + Args: + organization_id (UUID): + alert_type (str): + x_account_id (UUID | Unset): + body (UpdateOrganizationAlertPreferenceRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | OrganizationAlertPreferenceResponse + """ + + return sync_detailed( + organization_id=organization_id, + alert_type=alert_type, + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + organization_id: UUID, + alert_type: str, + *, + client: AuthenticatedClient | Client, + body: UpdateOrganizationAlertPreferenceRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | OrganizationAlertPreferenceResponse]: + """Update organization alert delivery preference + + Update the authenticated user's personal delivery preference for one alert type in one organization. + + Setting `subscribed=false` stores an explicit opt-out override. Setting `subscribed=true` removes + the override and restores the default subscribed behavior. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + - Only owners and administrators can update preferences for an organization. + + Args: + organization_id (UUID): + alert_type (str): + x_account_id (UUID | Unset): + body (UpdateOrganizationAlertPreferenceRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | OrganizationAlertPreferenceResponse] + """ + + kwargs = _get_kwargs( + organization_id=organization_id, + alert_type=alert_type, + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + organization_id: UUID, + alert_type: str, + *, + client: AuthenticatedClient | Client, + body: UpdateOrganizationAlertPreferenceRequest, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | OrganizationAlertPreferenceResponse | None: + """Update organization alert delivery preference + + Update the authenticated user's personal delivery preference for one alert type in one organization. + + Setting `subscribed=false` stores an explicit opt-out override. Setting `subscribed=true` removes + the override and restores the default subscribed behavior. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + - Only owners and administrators can update preferences for an organization. + + Args: + organization_id (UUID): + alert_type (str): + x_account_id (UUID | Unset): + body (UpdateOrganizationAlertPreferenceRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | OrganizationAlertPreferenceResponse + """ + + return ( + await asyncio_detailed( + organization_id=organization_id, + alert_type=alert_type, + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/contents/delete_content_api_contents_source_connection_content_version_delete.py b/seclai/_generated/api/contents/delete_content_api_contents_source_connection_content_version_delete.py index 20c5f01..86481c3 100644 --- a/seclai/_generated/api/contents/delete_content_api_contents_source_connection_content_version_delete.py +++ b/seclai/_generated/api/contents/delete_content_api_contents_source_connection_content_version_delete.py @@ -1,18 +1,25 @@ from http import HTTPStatus from typing import Any, cast from urllib.parse import quote +from uuid import UUID import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.http_validation_error import HTTPValidationError -from ...types import Response +from ...types import UNSET, Response, Unset def _get_kwargs( source_connection_content_version: str, + *, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + _kwargs: dict[str, Any] = { "method": "delete", "url": "/contents/{source_connection_content_version}".format( @@ -22,6 +29,7 @@ def _get_kwargs( ), } + _kwargs["headers"] = headers return _kwargs @@ -58,6 +66,7 @@ def sync_detailed( source_connection_content_version: str, *, client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Delete content @@ -67,10 +76,12 @@ def sync_detailed( and knowledge base workflows that reference this item. Auth & scoping: - - Requires `X-API-Key`. You can only delete content belonging to your account. + - Requires `X-API-Key` header or OAuth Bearer token. You can only delete content belonging to your + account. Args: source_connection_content_version (str): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -82,6 +93,7 @@ def sync_detailed( kwargs = _get_kwargs( source_connection_content_version=source_connection_content_version, + x_account_id=x_account_id, ) response = client.get_httpx_client().request( @@ -95,6 +107,7 @@ def sync( source_connection_content_version: str, *, client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Delete content @@ -104,10 +117,12 @@ def sync( and knowledge base workflows that reference this item. Auth & scoping: - - Requires `X-API-Key`. You can only delete content belonging to your account. + - Requires `X-API-Key` header or OAuth Bearer token. You can only delete content belonging to your + account. Args: source_connection_content_version (str): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -120,6 +135,7 @@ def sync( return sync_detailed( source_connection_content_version=source_connection_content_version, client=client, + x_account_id=x_account_id, ).parsed @@ -127,6 +143,7 @@ async def asyncio_detailed( source_connection_content_version: str, *, client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Delete content @@ -136,10 +153,12 @@ async def asyncio_detailed( and knowledge base workflows that reference this item. Auth & scoping: - - Requires `X-API-Key`. You can only delete content belonging to your account. + - Requires `X-API-Key` header or OAuth Bearer token. You can only delete content belonging to your + account. Args: source_connection_content_version (str): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -151,6 +170,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( source_connection_content_version=source_connection_content_version, + x_account_id=x_account_id, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -162,6 +182,7 @@ async def asyncio( source_connection_content_version: str, *, client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Delete content @@ -171,10 +192,12 @@ async def asyncio( and knowledge base workflows that reference this item. Auth & scoping: - - Requires `X-API-Key`. You can only delete content belonging to your account. + - Requires `X-API-Key` header or OAuth Bearer token. You can only delete content belonging to your + account. Args: source_connection_content_version (str): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -188,5 +211,6 @@ async def asyncio( await asyncio_detailed( source_connection_content_version=source_connection_content_version, client=client, + x_account_id=x_account_id, ) ).parsed diff --git a/seclai/_generated/api/contents/get_content_detail_api_contents_source_connection_content_version_get.py b/seclai/_generated/api/contents/get_content_detail_api_contents_source_connection_content_version_get.py index f7c9acc..d2891b6 100644 --- a/seclai/_generated/api/contents/get_content_detail_api_contents_source_connection_content_version_get.py +++ b/seclai/_generated/api/contents/get_content_detail_api_contents_source_connection_content_version_get.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -16,7 +17,12 @@ def _get_kwargs( *, start: int | Unset = 0, end: int | Unset = 5000, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + params: dict[str, Any] = {} params["start"] = start @@ -35,6 +41,7 @@ def _get_kwargs( "params": params, } + _kwargs["headers"] = headers return _kwargs @@ -74,6 +81,7 @@ def sync_detailed( client: AuthenticatedClient | Client, start: int | Unset = 0, end: int | Unset = 5000, + x_account_id: UUID | Unset = UNSET, ) -> Response[ContentDetailResponse | HTTPValidationError]: """Get content details @@ -88,12 +96,14 @@ def sync_detailed( through large documents. Auth & scoping: - - Requires `X-API-Key`. You can only access content belonging to your account. + - Requires `X-API-Key` header or OAuth Bearer token. You can only access content belonging to your + account. Args: source_connection_content_version (str): start (int | Unset): Default: 0. end (int | Unset): Default: 5000. + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -107,6 +117,7 @@ def sync_detailed( source_connection_content_version=source_connection_content_version, start=start, end=end, + x_account_id=x_account_id, ) response = client.get_httpx_client().request( @@ -122,6 +133,7 @@ def sync( client: AuthenticatedClient | Client, start: int | Unset = 0, end: int | Unset = 5000, + x_account_id: UUID | Unset = UNSET, ) -> ContentDetailResponse | HTTPValidationError | None: """Get content details @@ -136,12 +148,14 @@ def sync( through large documents. Auth & scoping: - - Requires `X-API-Key`. You can only access content belonging to your account. + - Requires `X-API-Key` header or OAuth Bearer token. You can only access content belonging to your + account. Args: source_connection_content_version (str): start (int | Unset): Default: 0. end (int | Unset): Default: 5000. + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -156,6 +170,7 @@ def sync( client=client, start=start, end=end, + x_account_id=x_account_id, ).parsed @@ -165,6 +180,7 @@ async def asyncio_detailed( client: AuthenticatedClient | Client, start: int | Unset = 0, end: int | Unset = 5000, + x_account_id: UUID | Unset = UNSET, ) -> Response[ContentDetailResponse | HTTPValidationError]: """Get content details @@ -179,12 +195,14 @@ async def asyncio_detailed( through large documents. Auth & scoping: - - Requires `X-API-Key`. You can only access content belonging to your account. + - Requires `X-API-Key` header or OAuth Bearer token. You can only access content belonging to your + account. Args: source_connection_content_version (str): start (int | Unset): Default: 0. end (int | Unset): Default: 5000. + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -198,6 +216,7 @@ async def asyncio_detailed( source_connection_content_version=source_connection_content_version, start=start, end=end, + x_account_id=x_account_id, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -211,6 +230,7 @@ async def asyncio( client: AuthenticatedClient | Client, start: int | Unset = 0, end: int | Unset = 5000, + x_account_id: UUID | Unset = UNSET, ) -> ContentDetailResponse | HTTPValidationError | None: """Get content details @@ -225,12 +245,14 @@ async def asyncio( through large documents. Auth & scoping: - - Requires `X-API-Key`. You can only access content belonging to your account. + - Requires `X-API-Key` header or OAuth Bearer token. You can only access content belonging to your + account. Args: source_connection_content_version (str): start (int | Unset): Default: 0. end (int | Unset): Default: 5000. + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -246,5 +268,6 @@ async def asyncio( client=client, start=start, end=end, + x_account_id=x_account_id, ) ).parsed diff --git a/seclai/_generated/api/contents/list_content_embeddings_api_contents_source_connection_content_version_embeddings_get.py b/seclai/_generated/api/contents/list_content_embeddings_api_contents_source_connection_content_version_embeddings_get.py index d6356f1..7b2757c 100644 --- a/seclai/_generated/api/contents/list_content_embeddings_api_contents_source_connection_content_version_embeddings_get.py +++ b/seclai/_generated/api/contents/list_content_embeddings_api_contents_source_connection_content_version_embeddings_get.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -16,7 +17,12 @@ def _get_kwargs( *, page: int | Unset = 1, limit: int | Unset = 20, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + params: dict[str, Any] = {} params["page"] = page @@ -35,6 +41,7 @@ def _get_kwargs( "params": params, } + _kwargs["headers"] = headers return _kwargs @@ -74,6 +81,7 @@ def sync_detailed( client: AuthenticatedClient | Client, page: int | Unset = 1, limit: int | Unset = 20, + x_account_id: UUID | Unset = UNSET, ) -> Response[ContentEmbeddingsListResponse | HTTPValidationError]: """List content embeddings @@ -83,12 +91,14 @@ def sync_detailed( primarily useful for debugging chunking, indexing, and vector contents. Auth & scoping: - - Requires `X-API-Key`. You can only access embeddings for content belonging to your account. + - Requires `X-API-Key` header or OAuth Bearer token. You can only access embeddings for content + belonging to your account. Args: source_connection_content_version (str): page (int | Unset): Default: 1. limit (int | Unset): Default: 20. + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -102,6 +112,7 @@ def sync_detailed( source_connection_content_version=source_connection_content_version, page=page, limit=limit, + x_account_id=x_account_id, ) response = client.get_httpx_client().request( @@ -117,6 +128,7 @@ def sync( client: AuthenticatedClient | Client, page: int | Unset = 1, limit: int | Unset = 20, + x_account_id: UUID | Unset = UNSET, ) -> ContentEmbeddingsListResponse | HTTPValidationError | None: """List content embeddings @@ -126,12 +138,14 @@ def sync( primarily useful for debugging chunking, indexing, and vector contents. Auth & scoping: - - Requires `X-API-Key`. You can only access embeddings for content belonging to your account. + - Requires `X-API-Key` header or OAuth Bearer token. You can only access embeddings for content + belonging to your account. Args: source_connection_content_version (str): page (int | Unset): Default: 1. limit (int | Unset): Default: 20. + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -146,6 +160,7 @@ def sync( client=client, page=page, limit=limit, + x_account_id=x_account_id, ).parsed @@ -155,6 +170,7 @@ async def asyncio_detailed( client: AuthenticatedClient | Client, page: int | Unset = 1, limit: int | Unset = 20, + x_account_id: UUID | Unset = UNSET, ) -> Response[ContentEmbeddingsListResponse | HTTPValidationError]: """List content embeddings @@ -164,12 +180,14 @@ async def asyncio_detailed( primarily useful for debugging chunking, indexing, and vector contents. Auth & scoping: - - Requires `X-API-Key`. You can only access embeddings for content belonging to your account. + - Requires `X-API-Key` header or OAuth Bearer token. You can only access embeddings for content + belonging to your account. Args: source_connection_content_version (str): page (int | Unset): Default: 1. limit (int | Unset): Default: 20. + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -183,6 +201,7 @@ async def asyncio_detailed( source_connection_content_version=source_connection_content_version, page=page, limit=limit, + x_account_id=x_account_id, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -196,6 +215,7 @@ async def asyncio( client: AuthenticatedClient | Client, page: int | Unset = 1, limit: int | Unset = 20, + x_account_id: UUID | Unset = UNSET, ) -> ContentEmbeddingsListResponse | HTTPValidationError | None: """List content embeddings @@ -205,12 +225,14 @@ async def asyncio( primarily useful for debugging chunking, indexing, and vector contents. Auth & scoping: - - Requires `X-API-Key`. You can only access embeddings for content belonging to your account. + - Requires `X-API-Key` header or OAuth Bearer token. You can only access embeddings for content + belonging to your account. Args: source_connection_content_version (str): page (int | Unset): Default: 1. limit (int | Unset): Default: 20. + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -226,5 +248,6 @@ async def asyncio( client=client, page=page, limit=limit, + x_account_id=x_account_id, ) ).parsed diff --git a/seclai/_generated/api/contents/replace_content_with_inline_text_api_contents_source_connection_content_version_put.py b/seclai/_generated/api/contents/replace_content_with_inline_text_api_contents_source_connection_content_version_put.py new file mode 100644 index 0000000..8844fdd --- /dev/null +++ b/seclai/_generated/api/contents/replace_content_with_inline_text_api_contents_source_connection_content_version_put.py @@ -0,0 +1,272 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.file_upload_response import FileUploadResponse +from ...models.http_validation_error import HTTPValidationError +from ...models.inline_text_replace_request import InlineTextReplaceRequest +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + source_connection_content_version: str, + *, + body: InlineTextReplaceRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "put", + "url": "/contents/{source_connection_content_version}".format( + source_connection_content_version=quote( + str(source_connection_content_version), safe="" + ), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> FileUploadResponse | HTTPValidationError | None: + if response.status_code == 200: + response_200 = FileUploadResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[FileUploadResponse | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + source_connection_content_version: str, + *, + client: AuthenticatedClient | Client, + body: InlineTextReplaceRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[FileUploadResponse | HTTPValidationError]: + """Replace a content version with inline text + + Replace a content version using a small inline text payload. + + **Maximum payload size:** 8192 bytes (UTF-8). + + **Supported content types:** + - `application/json` + - `application/xml` + - `text/csv` + - `text/html` + - `text/markdown` + - `text/plain` + - `text/x-markdown` + - `text/xml` + + Notes: + - Use this endpoint for small text payloads; larger files should use `/upload`. + - `title` is merged into `metadata.title` when not already present. + + Args: + source_connection_content_version (str): + x_account_id (UUID | Unset): + body (InlineTextReplaceRequest): Request model for inline text content replacement. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[FileUploadResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + source_connection_content_version=source_connection_content_version, + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + source_connection_content_version: str, + *, + client: AuthenticatedClient | Client, + body: InlineTextReplaceRequest, + x_account_id: UUID | Unset = UNSET, +) -> FileUploadResponse | HTTPValidationError | None: + """Replace a content version with inline text + + Replace a content version using a small inline text payload. + + **Maximum payload size:** 8192 bytes (UTF-8). + + **Supported content types:** + - `application/json` + - `application/xml` + - `text/csv` + - `text/html` + - `text/markdown` + - `text/plain` + - `text/x-markdown` + - `text/xml` + + Notes: + - Use this endpoint for small text payloads; larger files should use `/upload`. + - `title` is merged into `metadata.title` when not already present. + + Args: + source_connection_content_version (str): + x_account_id (UUID | Unset): + body (InlineTextReplaceRequest): Request model for inline text content replacement. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + FileUploadResponse | HTTPValidationError + """ + + return sync_detailed( + source_connection_content_version=source_connection_content_version, + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + source_connection_content_version: str, + *, + client: AuthenticatedClient | Client, + body: InlineTextReplaceRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[FileUploadResponse | HTTPValidationError]: + """Replace a content version with inline text + + Replace a content version using a small inline text payload. + + **Maximum payload size:** 8192 bytes (UTF-8). + + **Supported content types:** + - `application/json` + - `application/xml` + - `text/csv` + - `text/html` + - `text/markdown` + - `text/plain` + - `text/x-markdown` + - `text/xml` + + Notes: + - Use this endpoint for small text payloads; larger files should use `/upload`. + - `title` is merged into `metadata.title` when not already present. + + Args: + source_connection_content_version (str): + x_account_id (UUID | Unset): + body (InlineTextReplaceRequest): Request model for inline text content replacement. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[FileUploadResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + source_connection_content_version=source_connection_content_version, + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + source_connection_content_version: str, + *, + client: AuthenticatedClient | Client, + body: InlineTextReplaceRequest, + x_account_id: UUID | Unset = UNSET, +) -> FileUploadResponse | HTTPValidationError | None: + """Replace a content version with inline text + + Replace a content version using a small inline text payload. + + **Maximum payload size:** 8192 bytes (UTF-8). + + **Supported content types:** + - `application/json` + - `application/xml` + - `text/csv` + - `text/html` + - `text/markdown` + - `text/plain` + - `text/x-markdown` + - `text/xml` + + Notes: + - Use this endpoint for small text payloads; larger files should use `/upload`. + - `title` is merged into `metadata.title` when not already present. + + Args: + source_connection_content_version (str): + x_account_id (UUID | Unset): + body (InlineTextReplaceRequest): Request model for inline text content replacement. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + FileUploadResponse | HTTPValidationError + """ + + return ( + await asyncio_detailed( + source_connection_content_version=source_connection_content_version, + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/contents/upload_file_to_content_api_contents_source_connection_content_version_upload_post.py b/seclai/_generated/api/contents/upload_file_to_content_api_contents_source_connection_content_version_upload_post.py index fd72121..7eb06ed 100644 --- a/seclai/_generated/api/contents/upload_file_to_content_api_contents_source_connection_content_version_upload_post.py +++ b/seclai/_generated/api/contents/upload_file_to_content_api_contents_source_connection_content_version_upload_post.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -11,15 +12,18 @@ ) from ...models.file_upload_response import FileUploadResponse from ...models.http_validation_error import HTTPValidationError -from ...types import Response +from ...types import UNSET, Response, Unset def _get_kwargs( source_connection_content_version: str, *, body: BodyUploadFileToContentApiContentsSourceConnectionContentVersionUploadPost, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id _kwargs: dict[str, Any] = { "method": "post", @@ -71,6 +75,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: BodyUploadFileToContentApiContentsSourceConnectionContentVersionUploadPost, + x_account_id: UUID | Unset = UNSET, ) -> Response[FileUploadResponse | HTTPValidationError]: r"""Replace a content version with a new upload @@ -126,10 +131,12 @@ def sync_detailed( `metadata_author=...`). These override keys from `metadata`. Auth & scoping: - - Requires `X-API-Key`. You can only replace content belonging to your account. + - Requires `X-API-Key` header or OAuth Bearer token. You can only replace content belonging to your + account. Args: source_connection_content_version (str): + x_account_id (UUID | Unset): body (BodyUploadFileToContentApiContentsSourceConnectionContentVersionUploadPost): Raises: @@ -143,6 +150,7 @@ def sync_detailed( kwargs = _get_kwargs( source_connection_content_version=source_connection_content_version, body=body, + x_account_id=x_account_id, ) response = client.get_httpx_client().request( @@ -157,6 +165,7 @@ def sync( *, client: AuthenticatedClient | Client, body: BodyUploadFileToContentApiContentsSourceConnectionContentVersionUploadPost, + x_account_id: UUID | Unset = UNSET, ) -> FileUploadResponse | HTTPValidationError | None: r"""Replace a content version with a new upload @@ -212,10 +221,12 @@ def sync( `metadata_author=...`). These override keys from `metadata`. Auth & scoping: - - Requires `X-API-Key`. You can only replace content belonging to your account. + - Requires `X-API-Key` header or OAuth Bearer token. You can only replace content belonging to your + account. Args: source_connection_content_version (str): + x_account_id (UUID | Unset): body (BodyUploadFileToContentApiContentsSourceConnectionContentVersionUploadPost): Raises: @@ -230,6 +241,7 @@ def sync( source_connection_content_version=source_connection_content_version, client=client, body=body, + x_account_id=x_account_id, ).parsed @@ -238,6 +250,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: BodyUploadFileToContentApiContentsSourceConnectionContentVersionUploadPost, + x_account_id: UUID | Unset = UNSET, ) -> Response[FileUploadResponse | HTTPValidationError]: r"""Replace a content version with a new upload @@ -293,10 +306,12 @@ async def asyncio_detailed( `metadata_author=...`). These override keys from `metadata`. Auth & scoping: - - Requires `X-API-Key`. You can only replace content belonging to your account. + - Requires `X-API-Key` header or OAuth Bearer token. You can only replace content belonging to your + account. Args: source_connection_content_version (str): + x_account_id (UUID | Unset): body (BodyUploadFileToContentApiContentsSourceConnectionContentVersionUploadPost): Raises: @@ -310,6 +325,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( source_connection_content_version=source_connection_content_version, body=body, + x_account_id=x_account_id, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -322,6 +338,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: BodyUploadFileToContentApiContentsSourceConnectionContentVersionUploadPost, + x_account_id: UUID | Unset = UNSET, ) -> FileUploadResponse | HTTPValidationError | None: r"""Replace a content version with a new upload @@ -377,10 +394,12 @@ async def asyncio( `metadata_author=...`). These override keys from `metadata`. Auth & scoping: - - Requires `X-API-Key`. You can only replace content belonging to your account. + - Requires `X-API-Key` header or OAuth Bearer token. You can only replace content belonging to your + account. Args: source_connection_content_version (str): + x_account_id (UUID | Unset): body (BodyUploadFileToContentApiContentsSourceConnectionContentVersionUploadPost): Raises: @@ -396,5 +415,6 @@ async def asyncio( source_connection_content_version=source_connection_content_version, client=client, body=body, + x_account_id=x_account_id, ) ).parsed diff --git a/seclai/_generated/api/governance/__init__.py b/seclai/_generated/api/governance/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/seclai/_generated/api/governance/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/seclai/_generated/api/governance/governance_ai_accept_api_governance_ai_assistant_conversation_id_accept_post.py b/seclai/_generated/api/governance/governance_ai_accept_api_governance_ai_assistant_conversation_id_accept_post.py new file mode 100644 index 0000000..f3691e0 --- /dev/null +++ b/seclai/_generated/api/governance/governance_ai_accept_api_governance_ai_assistant_conversation_id_accept_post.py @@ -0,0 +1,208 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.governance_ai_accept_response import GovernanceAiAcceptResponse +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + conversation_id: UUID, + *, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/governance/ai-assistant/{conversation_id}/accept".format( + conversation_id=quote(str(conversation_id), safe=""), + ), + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | GovernanceAiAcceptResponse | HTTPValidationError | None: + if response.status_code == 200: + response_200 = GovernanceAiAcceptResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = cast(Any, None) + return response_400 + + if response.status_code == 403: + response_403 = cast(Any, None) + return response_403 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | GovernanceAiAcceptResponse | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + conversation_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any | GovernanceAiAcceptResponse | HTTPValidationError]: + """Accept a governance plan + + Execute the proposed policy changes from a governance AI assistant conversation. Each action is + applied in order and results are returned. + + Auth: requires `X-API-Key` header or OAuth Bearer token with governance access. + + Args: + conversation_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | GovernanceAiAcceptResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + conversation_id=conversation_id, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + conversation_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Any | GovernanceAiAcceptResponse | HTTPValidationError | None: + """Accept a governance plan + + Execute the proposed policy changes from a governance AI assistant conversation. Each action is + applied in order and results are returned. + + Auth: requires `X-API-Key` header or OAuth Bearer token with governance access. + + Args: + conversation_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | GovernanceAiAcceptResponse | HTTPValidationError + """ + + return sync_detailed( + conversation_id=conversation_id, + client=client, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + conversation_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any | GovernanceAiAcceptResponse | HTTPValidationError]: + """Accept a governance plan + + Execute the proposed policy changes from a governance AI assistant conversation. Each action is + applied in order and results are returned. + + Auth: requires `X-API-Key` header or OAuth Bearer token with governance access. + + Args: + conversation_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | GovernanceAiAcceptResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + conversation_id=conversation_id, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + conversation_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Any | GovernanceAiAcceptResponse | HTTPValidationError | None: + """Accept a governance plan + + Execute the proposed policy changes from a governance AI assistant conversation. Each action is + applied in order and results are returned. + + Auth: requires `X-API-Key` header or OAuth Bearer token with governance access. + + Args: + conversation_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | GovernanceAiAcceptResponse | HTTPValidationError + """ + + return ( + await asyncio_detailed( + conversation_id=conversation_id, + client=client, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/governance/governance_ai_decline_api_governance_ai_assistant_conversation_id_decline_post.py b/seclai/_generated/api/governance/governance_ai_decline_api_governance_ai_assistant_conversation_id_decline_post.py new file mode 100644 index 0000000..8c94324 --- /dev/null +++ b/seclai/_generated/api/governance/governance_ai_decline_api_governance_ai_assistant_conversation_id_decline_post.py @@ -0,0 +1,206 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + conversation_id: UUID, + *, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/governance/ai-assistant/{conversation_id}/decline".format( + conversation_id=quote(str(conversation_id), safe=""), + ), + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | HTTPValidationError | None: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + if response.status_code == 400: + response_400 = cast(Any, None) + return response_400 + + if response.status_code == 403: + response_403 = cast(Any, None) + return response_403 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + conversation_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any | HTTPValidationError]: + """Decline a governance plan + + Reject a previously proposed governance AI assistant plan without applying any changes. The + conversation is marked as declined and no policy modifications are made. + + Auth: requires `X-API-Key` header or OAuth Bearer token with governance access. + + Args: + conversation_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + conversation_id=conversation_id, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + conversation_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Any | HTTPValidationError | None: + """Decline a governance plan + + Reject a previously proposed governance AI assistant plan without applying any changes. The + conversation is marked as declined and no policy modifications are made. + + Auth: requires `X-API-Key` header or OAuth Bearer token with governance access. + + Args: + conversation_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return sync_detailed( + conversation_id=conversation_id, + client=client, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + conversation_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any | HTTPValidationError]: + """Decline a governance plan + + Reject a previously proposed governance AI assistant plan without applying any changes. The + conversation is marked as declined and no policy modifications are made. + + Auth: requires `X-API-Key` header or OAuth Bearer token with governance access. + + Args: + conversation_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + conversation_id=conversation_id, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + conversation_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Any | HTTPValidationError | None: + """Decline a governance plan + + Reject a previously proposed governance AI assistant plan without applying any changes. The + conversation is marked as declined and no policy modifications are made. + + Auth: requires `X-API-Key` header or OAuth Bearer token with governance access. + + Args: + conversation_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return ( + await asyncio_detailed( + conversation_id=conversation_id, + client=client, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/governance/governance_ai_generate_api_governance_ai_assistant_post.py b/seclai/_generated/api/governance/governance_ai_generate_api_governance_ai_assistant_post.py new file mode 100644 index 0000000..93570fa --- /dev/null +++ b/seclai/_generated/api/governance/governance_ai_generate_api_governance_ai_assistant_post.py @@ -0,0 +1,210 @@ +from http import HTTPStatus +from typing import Any, cast +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.governance_ai_assistant_request import GovernanceAiAssistantRequest +from ...models.governance_ai_assistant_response import GovernanceAiAssistantResponse +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + body: GovernanceAiAssistantRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/governance/ai-assistant", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | GovernanceAiAssistantResponse | HTTPValidationError | None: + if response.status_code == 200: + response_200 = GovernanceAiAssistantResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = cast(Any, None) + return response_400 + + if response.status_code == 403: + response_403 = cast(Any, None) + return response_403 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | GovernanceAiAssistantResponse | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: GovernanceAiAssistantRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any | GovernanceAiAssistantResponse | HTTPValidationError]: + """Generate a governance plan + + Send a natural-language request to the governance AI assistant to generate a plan of policy changes. + Returns a conversation with proposed actions that can be accepted or declined. + + Auth: requires `X-API-Key` header or OAuth Bearer token with governance access. + + Args: + x_account_id (UUID | Unset): + body (GovernanceAiAssistantRequest): Request body for the governance AI assistant. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | GovernanceAiAssistantResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: GovernanceAiAssistantRequest, + x_account_id: UUID | Unset = UNSET, +) -> Any | GovernanceAiAssistantResponse | HTTPValidationError | None: + """Generate a governance plan + + Send a natural-language request to the governance AI assistant to generate a plan of policy changes. + Returns a conversation with proposed actions that can be accepted or declined. + + Auth: requires `X-API-Key` header or OAuth Bearer token with governance access. + + Args: + x_account_id (UUID | Unset): + body (GovernanceAiAssistantRequest): Request body for the governance AI assistant. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | GovernanceAiAssistantResponse | HTTPValidationError + """ + + return sync_detailed( + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: GovernanceAiAssistantRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any | GovernanceAiAssistantResponse | HTTPValidationError]: + """Generate a governance plan + + Send a natural-language request to the governance AI assistant to generate a plan of policy changes. + Returns a conversation with proposed actions that can be accepted or declined. + + Auth: requires `X-API-Key` header or OAuth Bearer token with governance access. + + Args: + x_account_id (UUID | Unset): + body (GovernanceAiAssistantRequest): Request body for the governance AI assistant. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | GovernanceAiAssistantResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: GovernanceAiAssistantRequest, + x_account_id: UUID | Unset = UNSET, +) -> Any | GovernanceAiAssistantResponse | HTTPValidationError | None: + """Generate a governance plan + + Send a natural-language request to the governance AI assistant to generate a plan of policy changes. + Returns a conversation with proposed actions that can be accepted or declined. + + Auth: requires `X-API-Key` header or OAuth Bearer token with governance access. + + Args: + x_account_id (UUID | Unset): + body (GovernanceAiAssistantRequest): Request body for the governance AI assistant. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | GovernanceAiAssistantResponse | HTTPValidationError + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/governance/list_governance_ai_conversations_api_governance_ai_assistant_conversations_get.py b/seclai/_generated/api/governance/list_governance_ai_conversations_api_governance_ai_assistant_conversations_get.py new file mode 100644 index 0000000..cef3677 --- /dev/null +++ b/seclai/_generated/api/governance/list_governance_ai_conversations_api_governance_ai_assistant_conversations_get.py @@ -0,0 +1,211 @@ +from http import HTTPStatus +from typing import Any, cast +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.governance_conversation_response import GovernanceConversationResponse +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + limit: int | Unset = 20, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + params: dict[str, Any] = {} + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/governance/ai-assistant/conversations", + "params": params, + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | HTTPValidationError | list[GovernanceConversationResponse] | None: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = GovernanceConversationResponse.from_dict( + response_200_item_data + ) + + response_200.append(response_200_item) + + return response_200 + + if response.status_code == 403: + response_403 = cast(Any, None) + return response_403 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | HTTPValidationError | list[GovernanceConversationResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + limit: int | Unset = 20, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any | HTTPValidationError | list[GovernanceConversationResponse]]: + """List AI assistant conversations + + Return recent governance AI assistant conversations for the account, ordered by most recent first. + + Auth: requires `X-API-Key` header or OAuth Bearer token with governance access. + + Args: + limit (int | Unset): Number of conversations. Default: 20. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError | list[GovernanceConversationResponse]] + """ + + kwargs = _get_kwargs( + limit=limit, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + limit: int | Unset = 20, + x_account_id: UUID | Unset = UNSET, +) -> Any | HTTPValidationError | list[GovernanceConversationResponse] | None: + """List AI assistant conversations + + Return recent governance AI assistant conversations for the account, ordered by most recent first. + + Auth: requires `X-API-Key` header or OAuth Bearer token with governance access. + + Args: + limit (int | Unset): Number of conversations. Default: 20. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError | list[GovernanceConversationResponse] + """ + + return sync_detailed( + client=client, + limit=limit, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + limit: int | Unset = 20, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any | HTTPValidationError | list[GovernanceConversationResponse]]: + """List AI assistant conversations + + Return recent governance AI assistant conversations for the account, ordered by most recent first. + + Auth: requires `X-API-Key` header or OAuth Bearer token with governance access. + + Args: + limit (int | Unset): Number of conversations. Default: 20. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError | list[GovernanceConversationResponse]] + """ + + kwargs = _get_kwargs( + limit=limit, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + limit: int | Unset = 20, + x_account_id: UUID | Unset = UNSET, +) -> Any | HTTPValidationError | list[GovernanceConversationResponse] | None: + """List AI assistant conversations + + Return recent governance AI assistant conversations for the account, ordered by most recent first. + + Auth: requires `X-API-Key` header or OAuth Bearer token with governance access. + + Args: + limit (int | Unset): Number of conversations. Default: 20. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError | list[GovernanceConversationResponse] + """ + + return ( + await asyncio_detailed( + client=client, + limit=limit, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/identity/__init__.py b/seclai/_generated/api/identity/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/seclai/_generated/api/identity/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/seclai/_generated/api/identity/get_me_api_me_get.py b/seclai/_generated/api/identity/get_me_api_me_get.py new file mode 100644 index 0000000..4847303 --- /dev/null +++ b/seclai/_generated/api/identity/get_me_api_me_get.py @@ -0,0 +1,174 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.me_response import MeResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/me", + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> MeResponse | None: + if response.status_code == 200: + response_200 = MeResponse.from_dict(response.json()) + + return response_200 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[MeResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[MeResponse]: + """Get current user identity + + Returns the authenticated user's personal account ID and a list of organisations they belong to. + Each organisation entry includes the organisation's own id, display name, and account_id. Useful + for CLI tooling that needs to let the user pick an org context. + + Args: + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[MeResponse] + """ + + kwargs = _get_kwargs( + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> MeResponse | None: + """Get current user identity + + Returns the authenticated user's personal account ID and a list of organisations they belong to. + Each organisation entry includes the organisation's own id, display name, and account_id. Useful + for CLI tooling that needs to let the user pick an org context. + + Args: + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + MeResponse + """ + + return sync_detailed( + client=client, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[MeResponse]: + """Get current user identity + + Returns the authenticated user's personal account ID and a list of organisations they belong to. + Each organisation entry includes the organisation's own id, display name, and account_id. Useful + for CLI tooling that needs to let the user pick an org context. + + Args: + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[MeResponse] + """ + + kwargs = _get_kwargs( + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> MeResponse | None: + """Get current user identity + + Returns the authenticated user's personal account ID and a list of organisations they belong to. + Each organisation entry includes the organisation's own id, display name, and account_id. Useful + for CLI tooling that needs to let the user pick an org context. + + Args: + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + MeResponse + """ + + return ( + await asyncio_detailed( + client=client, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/knowledge_bases/__init__.py b/seclai/_generated/api/knowledge_bases/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/seclai/_generated/api/knowledge_bases/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/seclai/_generated/api/knowledge_bases/create_knowledge_base_api_knowledge_bases_post.py b/seclai/_generated/api/knowledge_bases/create_knowledge_base_api_knowledge_bases_post.py new file mode 100644 index 0000000..6ed772e --- /dev/null +++ b/seclai/_generated/api/knowledge_bases/create_knowledge_base_api_knowledge_bases_post.py @@ -0,0 +1,202 @@ +from http import HTTPStatus +from typing import Any, cast +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.create_knowledge_base_body import CreateKnowledgeBaseBody +from ...models.http_validation_error import HTTPValidationError +from ...models.knowledge_base import KnowledgeBase +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + body: CreateKnowledgeBaseBody, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/knowledge_bases", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | HTTPValidationError | KnowledgeBase | None: + if response.status_code == 201: + response_201 = KnowledgeBase.from_dict(response.json()) + + return response_201 + + if response.status_code == 402: + response_402 = cast(Any, None) + return response_402 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | HTTPValidationError | KnowledgeBase]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: CreateKnowledgeBaseBody, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any | HTTPValidationError | KnowledgeBase]: + """Create Knowledge Base + + Create a new knowledge base. + + At least one `source_id` is required. The source connections must belong to the same account. + + Args: + x_account_id (UUID | Unset): + body (CreateKnowledgeBaseBody): Request body for creating a knowledge base. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError | KnowledgeBase] + """ + + kwargs = _get_kwargs( + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: CreateKnowledgeBaseBody, + x_account_id: UUID | Unset = UNSET, +) -> Any | HTTPValidationError | KnowledgeBase | None: + """Create Knowledge Base + + Create a new knowledge base. + + At least one `source_id` is required. The source connections must belong to the same account. + + Args: + x_account_id (UUID | Unset): + body (CreateKnowledgeBaseBody): Request body for creating a knowledge base. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError | KnowledgeBase + """ + + return sync_detailed( + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: CreateKnowledgeBaseBody, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any | HTTPValidationError | KnowledgeBase]: + """Create Knowledge Base + + Create a new knowledge base. + + At least one `source_id` is required. The source connections must belong to the same account. + + Args: + x_account_id (UUID | Unset): + body (CreateKnowledgeBaseBody): Request body for creating a knowledge base. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError | KnowledgeBase] + """ + + kwargs = _get_kwargs( + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: CreateKnowledgeBaseBody, + x_account_id: UUID | Unset = UNSET, +) -> Any | HTTPValidationError | KnowledgeBase | None: + """Create Knowledge Base + + Create a new knowledge base. + + At least one `source_id` is required. The source connections must belong to the same account. + + Args: + x_account_id (UUID | Unset): + body (CreateKnowledgeBaseBody): Request body for creating a knowledge base. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError | KnowledgeBase + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/knowledge_bases/delete_knowledge_base_api_knowledge_bases_knowledge_base_id_delete.py b/seclai/_generated/api/knowledge_bases/delete_knowledge_base_api_knowledge_bases_knowledge_base_id_delete.py new file mode 100644 index 0000000..39702c1 --- /dev/null +++ b/seclai/_generated/api/knowledge_bases/delete_knowledge_base_api_knowledge_bases_knowledge_base_id_delete.py @@ -0,0 +1,198 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + knowledge_base_id: str, + *, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/knowledge_bases/{knowledge_base_id}".format( + knowledge_base_id=quote(str(knowledge_base_id), safe=""), + ), + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | HTTPValidationError | None: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + knowledge_base_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any | HTTPValidationError]: + """Delete Knowledge Base + + Soft-delete a knowledge base. This action cannot be undone. + + Fails if the knowledge base is referenced by any agent definitions. Remove the knowledge base from + agents first. + + Args: + knowledge_base_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + knowledge_base_id=knowledge_base_id, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + knowledge_base_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Any | HTTPValidationError | None: + """Delete Knowledge Base + + Soft-delete a knowledge base. This action cannot be undone. + + Fails if the knowledge base is referenced by any agent definitions. Remove the knowledge base from + agents first. + + Args: + knowledge_base_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return sync_detailed( + knowledge_base_id=knowledge_base_id, + client=client, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + knowledge_base_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any | HTTPValidationError]: + """Delete Knowledge Base + + Soft-delete a knowledge base. This action cannot be undone. + + Fails if the knowledge base is referenced by any agent definitions. Remove the knowledge base from + agents first. + + Args: + knowledge_base_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + knowledge_base_id=knowledge_base_id, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + knowledge_base_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Any | HTTPValidationError | None: + """Delete Knowledge Base + + Soft-delete a knowledge base. This action cannot be undone. + + Fails if the knowledge base is referenced by any agent definitions. Remove the knowledge base from + agents first. + + Args: + knowledge_base_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return ( + await asyncio_detailed( + knowledge_base_id=knowledge_base_id, + client=client, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/knowledge_bases/get_knowledge_base_api_knowledge_bases_knowledge_base_id_get.py b/seclai/_generated/api/knowledge_bases/get_knowledge_base_api_knowledge_bases_knowledge_base_id_get.py new file mode 100644 index 0000000..a7f9821 --- /dev/null +++ b/seclai/_generated/api/knowledge_bases/get_knowledge_base_api_knowledge_bases_knowledge_base_id_get.py @@ -0,0 +1,204 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.knowledge_base import KnowledgeBase +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + knowledge_base_id: str, + *, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/knowledge_bases/{knowledge_base_id}".format( + knowledge_base_id=quote(str(knowledge_base_id), safe=""), + ), + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> HTTPValidationError | KnowledgeBase | None: + if response.status_code == 200: + response_200 = KnowledgeBase.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[HTTPValidationError | KnowledgeBase]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + knowledge_base_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | KnowledgeBase]: + """Get Knowledge Base + + Fetch a knowledge base by ID. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. You can only access knowledge bases belonging + to your account. + + Args: + knowledge_base_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | KnowledgeBase] + """ + + kwargs = _get_kwargs( + knowledge_base_id=knowledge_base_id, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + knowledge_base_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | KnowledgeBase | None: + """Get Knowledge Base + + Fetch a knowledge base by ID. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. You can only access knowledge bases belonging + to your account. + + Args: + knowledge_base_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | KnowledgeBase + """ + + return sync_detailed( + knowledge_base_id=knowledge_base_id, + client=client, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + knowledge_base_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | KnowledgeBase]: + """Get Knowledge Base + + Fetch a knowledge base by ID. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. You can only access knowledge bases belonging + to your account. + + Args: + knowledge_base_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | KnowledgeBase] + """ + + kwargs = _get_kwargs( + knowledge_base_id=knowledge_base_id, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + knowledge_base_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | KnowledgeBase | None: + """Get Knowledge Base + + Fetch a knowledge base by ID. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. You can only access knowledge bases belonging + to your account. + + Args: + knowledge_base_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | KnowledgeBase + """ + + return ( + await asyncio_detailed( + knowledge_base_id=knowledge_base_id, + client=client, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/knowledge_bases/list_knowledge_bases_api_knowledge_bases_get.py b/seclai/_generated/api/knowledge_bases/list_knowledge_bases_api_knowledge_bases_get.py new file mode 100644 index 0000000..8243a6d --- /dev/null +++ b/seclai/_generated/api/knowledge_bases/list_knowledge_bases_api_knowledge_bases_get.py @@ -0,0 +1,257 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.knowledge_base_list_response_model import KnowledgeBaseListResponseModel +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: int | Unset = 1, + limit: int | Unset = 20, + sort: str | Unset = "created_at", + order: str | Unset = "desc", + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params["sort"] = sort + + params["order"] = order + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/knowledge_bases", + "params": params, + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> HTTPValidationError | KnowledgeBaseListResponseModel | None: + if response.status_code == 200: + response_200 = KnowledgeBaseListResponseModel.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[HTTPValidationError | KnowledgeBaseListResponseModel]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = 1, + limit: int | Unset = 20, + sort: str | Unset = "created_at", + order: str | Unset = "desc", + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | KnowledgeBaseListResponseModel]: + """List Knowledge Bases + + List knowledge bases for the account. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. All resources are scoped to the caller's + account. + + Args: + page (int | Unset): Page number (1-based). Default: 1. + limit (int | Unset): Items per page. Default: 20. + sort (str | Unset): Sort field. One of: created_at, updated_at, name. Default: + 'created_at'. + order (str | Unset): Sort direction: asc or desc. Default: 'desc'. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | KnowledgeBaseListResponseModel] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + sort=sort, + order=order, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + page: int | Unset = 1, + limit: int | Unset = 20, + sort: str | Unset = "created_at", + order: str | Unset = "desc", + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | KnowledgeBaseListResponseModel | None: + """List Knowledge Bases + + List knowledge bases for the account. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. All resources are scoped to the caller's + account. + + Args: + page (int | Unset): Page number (1-based). Default: 1. + limit (int | Unset): Items per page. Default: 20. + sort (str | Unset): Sort field. One of: created_at, updated_at, name. Default: + 'created_at'. + order (str | Unset): Sort direction: asc or desc. Default: 'desc'. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | KnowledgeBaseListResponseModel + """ + + return sync_detailed( + client=client, + page=page, + limit=limit, + sort=sort, + order=order, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = 1, + limit: int | Unset = 20, + sort: str | Unset = "created_at", + order: str | Unset = "desc", + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | KnowledgeBaseListResponseModel]: + """List Knowledge Bases + + List knowledge bases for the account. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. All resources are scoped to the caller's + account. + + Args: + page (int | Unset): Page number (1-based). Default: 1. + limit (int | Unset): Items per page. Default: 20. + sort (str | Unset): Sort field. One of: created_at, updated_at, name. Default: + 'created_at'. + order (str | Unset): Sort direction: asc or desc. Default: 'desc'. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | KnowledgeBaseListResponseModel] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + sort=sort, + order=order, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + page: int | Unset = 1, + limit: int | Unset = 20, + sort: str | Unset = "created_at", + order: str | Unset = "desc", + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | KnowledgeBaseListResponseModel | None: + """List Knowledge Bases + + List knowledge bases for the account. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. All resources are scoped to the caller's + account. + + Args: + page (int | Unset): Page number (1-based). Default: 1. + limit (int | Unset): Items per page. Default: 20. + sort (str | Unset): Sort field. One of: created_at, updated_at, name. Default: + 'created_at'. + order (str | Unset): Sort direction: asc or desc. Default: 'desc'. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | KnowledgeBaseListResponseModel + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + limit=limit, + sort=sort, + order=order, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/knowledge_bases/update_knowledge_base_api_knowledge_bases_knowledge_base_id_put.py b/seclai/_generated/api/knowledge_bases/update_knowledge_base_api_knowledge_bases_knowledge_base_id_put.py new file mode 100644 index 0000000..f8d1bca --- /dev/null +++ b/seclai/_generated/api/knowledge_bases/update_knowledge_base_api_knowledge_bases_knowledge_base_id_put.py @@ -0,0 +1,226 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.knowledge_base import KnowledgeBase +from ...models.update_knowledge_base_body import UpdateKnowledgeBaseBody +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + knowledge_base_id: str, + *, + body: UpdateKnowledgeBaseBody, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "put", + "url": "/knowledge_bases/{knowledge_base_id}".format( + knowledge_base_id=quote(str(knowledge_base_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> HTTPValidationError | KnowledgeBase | None: + if response.status_code == 200: + response_200 = KnowledgeBase.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[HTTPValidationError | KnowledgeBase]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + knowledge_base_id: str, + *, + client: AuthenticatedClient | Client, + body: UpdateKnowledgeBaseBody, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | KnowledgeBase]: + """Update Knowledge Base + + Update a knowledge base's configuration. Only provided fields are changed; omitted fields are left + unchanged. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. You can only update knowledge bases belonging + to your account. + + Args: + knowledge_base_id (str): + x_account_id (UUID | Unset): + body (UpdateKnowledgeBaseBody): Request body for updating a knowledge base. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | KnowledgeBase] + """ + + kwargs = _get_kwargs( + knowledge_base_id=knowledge_base_id, + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + knowledge_base_id: str, + *, + client: AuthenticatedClient | Client, + body: UpdateKnowledgeBaseBody, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | KnowledgeBase | None: + """Update Knowledge Base + + Update a knowledge base's configuration. Only provided fields are changed; omitted fields are left + unchanged. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. You can only update knowledge bases belonging + to your account. + + Args: + knowledge_base_id (str): + x_account_id (UUID | Unset): + body (UpdateKnowledgeBaseBody): Request body for updating a knowledge base. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | KnowledgeBase + """ + + return sync_detailed( + knowledge_base_id=knowledge_base_id, + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + knowledge_base_id: str, + *, + client: AuthenticatedClient | Client, + body: UpdateKnowledgeBaseBody, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | KnowledgeBase]: + """Update Knowledge Base + + Update a knowledge base's configuration. Only provided fields are changed; omitted fields are left + unchanged. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. You can only update knowledge bases belonging + to your account. + + Args: + knowledge_base_id (str): + x_account_id (UUID | Unset): + body (UpdateKnowledgeBaseBody): Request body for updating a knowledge base. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | KnowledgeBase] + """ + + kwargs = _get_kwargs( + knowledge_base_id=knowledge_base_id, + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + knowledge_base_id: str, + *, + client: AuthenticatedClient | Client, + body: UpdateKnowledgeBaseBody, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | KnowledgeBase | None: + """Update Knowledge Base + + Update a knowledge base's configuration. Only provided fields are changed; omitted fields are left + unchanged. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. You can only update knowledge bases belonging + to your account. + + Args: + knowledge_base_id (str): + x_account_id (UUID | Unset): + body (UpdateKnowledgeBaseBody): Request body for updating a knowledge base. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | KnowledgeBase + """ + + return ( + await asyncio_detailed( + knowledge_base_id=knowledge_base_id, + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/memory_banks/__init__.py b/seclai/_generated/api/memory_banks/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/seclai/_generated/api/memory_banks/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/seclai/_generated/api/memory_banks/compact_memory_bank_api_memory_banks_memory_bank_id_compact_post.py b/seclai/_generated/api/memory_banks/compact_memory_bank_api_memory_banks_memory_bank_id_compact_post.py new file mode 100644 index 0000000..5bdb43a --- /dev/null +++ b/seclai/_generated/api/memory_banks/compact_memory_bank_api_memory_banks_memory_bank_id_compact_post.py @@ -0,0 +1,225 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.compact_memory_bank_api_memory_banks_memory_bank_id_compact_post_response_compact_memory_bank_api_memory_banks_memory_bank_id_compact_post import ( + CompactMemoryBankApiMemoryBanksMemoryBankIdCompactPostResponseCompactMemoryBankApiMemoryBanksMemoryBankIdCompactPost, +) +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + memory_bank_id: str, + *, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/memory_banks/{memory_bank_id}/compact".format( + memory_bank_id=quote(str(memory_bank_id), safe=""), + ), + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + CompactMemoryBankApiMemoryBanksMemoryBankIdCompactPostResponseCompactMemoryBankApiMemoryBanksMemoryBankIdCompactPost + | HTTPValidationError + | None +): + if response.status_code == 202: + response_202 = CompactMemoryBankApiMemoryBanksMemoryBankIdCompactPostResponseCompactMemoryBankApiMemoryBanksMemoryBankIdCompactPost.from_dict( + response.json() + ) + + return response_202 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + CompactMemoryBankApiMemoryBanksMemoryBankIdCompactPostResponseCompactMemoryBankApiMemoryBanksMemoryBankIdCompactPost + | HTTPValidationError +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + memory_bank_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + CompactMemoryBankApiMemoryBanksMemoryBankIdCompactPostResponseCompactMemoryBankApiMemoryBanksMemoryBankIdCompactPost + | HTTPValidationError +]: + """Compact Memory Bank + + Trigger an on-demand compaction run for a memory bank. + + The bank must have at least one compaction threshold configured (max_age_days, max_turns, or + max_size_tokens). Compaction runs asynchronously — the response confirms scheduling, not completion. + + Args: + memory_bank_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CompactMemoryBankApiMemoryBanksMemoryBankIdCompactPostResponseCompactMemoryBankApiMemoryBanksMemoryBankIdCompactPost | HTTPValidationError] + """ + + kwargs = _get_kwargs( + memory_bank_id=memory_bank_id, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + memory_bank_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> ( + CompactMemoryBankApiMemoryBanksMemoryBankIdCompactPostResponseCompactMemoryBankApiMemoryBanksMemoryBankIdCompactPost + | HTTPValidationError + | None +): + """Compact Memory Bank + + Trigger an on-demand compaction run for a memory bank. + + The bank must have at least one compaction threshold configured (max_age_days, max_turns, or + max_size_tokens). Compaction runs asynchronously — the response confirms scheduling, not completion. + + Args: + memory_bank_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CompactMemoryBankApiMemoryBanksMemoryBankIdCompactPostResponseCompactMemoryBankApiMemoryBanksMemoryBankIdCompactPost | HTTPValidationError + """ + + return sync_detailed( + memory_bank_id=memory_bank_id, + client=client, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + memory_bank_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + CompactMemoryBankApiMemoryBanksMemoryBankIdCompactPostResponseCompactMemoryBankApiMemoryBanksMemoryBankIdCompactPost + | HTTPValidationError +]: + """Compact Memory Bank + + Trigger an on-demand compaction run for a memory bank. + + The bank must have at least one compaction threshold configured (max_age_days, max_turns, or + max_size_tokens). Compaction runs asynchronously — the response confirms scheduling, not completion. + + Args: + memory_bank_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CompactMemoryBankApiMemoryBanksMemoryBankIdCompactPostResponseCompactMemoryBankApiMemoryBanksMemoryBankIdCompactPost | HTTPValidationError] + """ + + kwargs = _get_kwargs( + memory_bank_id=memory_bank_id, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + memory_bank_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> ( + CompactMemoryBankApiMemoryBanksMemoryBankIdCompactPostResponseCompactMemoryBankApiMemoryBanksMemoryBankIdCompactPost + | HTTPValidationError + | None +): + """Compact Memory Bank + + Trigger an on-demand compaction run for a memory bank. + + The bank must have at least one compaction threshold configured (max_age_days, max_turns, or + max_size_tokens). Compaction runs asynchronously — the response confirms scheduling, not completion. + + Args: + memory_bank_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CompactMemoryBankApiMemoryBanksMemoryBankIdCompactPostResponseCompactMemoryBankApiMemoryBanksMemoryBankIdCompactPost | HTTPValidationError + """ + + return ( + await asyncio_detailed( + memory_bank_id=memory_bank_id, + client=client, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/memory_banks/create_memory_bank_api_memory_banks_post.py b/seclai/_generated/api/memory_banks/create_memory_bank_api_memory_banks_post.py new file mode 100644 index 0000000..486f347 --- /dev/null +++ b/seclai/_generated/api/memory_banks/create_memory_bank_api_memory_banks_post.py @@ -0,0 +1,202 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.create_memory_bank_body import CreateMemoryBankBody +from ...models.http_validation_error import HTTPValidationError +from ...models.memory_bank import MemoryBank +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + body: CreateMemoryBankBody, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/memory_banks", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> HTTPValidationError | MemoryBank | None: + if response.status_code == 201: + response_201 = MemoryBank.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[HTTPValidationError | MemoryBank]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: CreateMemoryBankBody, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | MemoryBank]: + """Create Memory Bank + + Create a new memory bank. + + Modes: `fast_and_cheap` (256-dim), `balanced` (512-dim), `slow_and_thorough` (1024-dim), or `custom` + (supply your own embedding params). + + Args: + x_account_id (UUID | Unset): + body (CreateMemoryBankBody): Request body for creating a memory bank. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | MemoryBank] + """ + + kwargs = _get_kwargs( + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: CreateMemoryBankBody, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | MemoryBank | None: + """Create Memory Bank + + Create a new memory bank. + + Modes: `fast_and_cheap` (256-dim), `balanced` (512-dim), `slow_and_thorough` (1024-dim), or `custom` + (supply your own embedding params). + + Args: + x_account_id (UUID | Unset): + body (CreateMemoryBankBody): Request body for creating a memory bank. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | MemoryBank + """ + + return sync_detailed( + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: CreateMemoryBankBody, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | MemoryBank]: + """Create Memory Bank + + Create a new memory bank. + + Modes: `fast_and_cheap` (256-dim), `balanced` (512-dim), `slow_and_thorough` (1024-dim), or `custom` + (supply your own embedding params). + + Args: + x_account_id (UUID | Unset): + body (CreateMemoryBankBody): Request body for creating a memory bank. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | MemoryBank] + """ + + kwargs = _get_kwargs( + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: CreateMemoryBankBody, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | MemoryBank | None: + """Create Memory Bank + + Create a new memory bank. + + Modes: `fast_and_cheap` (256-dim), `balanced` (512-dim), `slow_and_thorough` (1024-dim), or `custom` + (supply your own embedding params). + + Args: + x_account_id (UUID | Unset): + body (CreateMemoryBankBody): Request body for creating a memory bank. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | MemoryBank + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/memory_banks/delete_memory_bank_api_memory_banks_memory_bank_id_delete.py b/seclai/_generated/api/memory_banks/delete_memory_bank_api_memory_banks_memory_bank_id_delete.py new file mode 100644 index 0000000..811e36e --- /dev/null +++ b/seclai/_generated/api/memory_banks/delete_memory_bank_api_memory_banks_memory_bank_id_delete.py @@ -0,0 +1,194 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + memory_bank_id: str, + *, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/memory_banks/{memory_bank_id}".format( + memory_bank_id=quote(str(memory_bank_id), safe=""), + ), + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | HTTPValidationError | None: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + memory_bank_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any | HTTPValidationError]: + """Delete Memory Bank + + Soft-delete a memory bank. This action is permanent and cannot be undone. + + The linked content source and all stored conversation memory entries will also be removed. + + Args: + memory_bank_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + memory_bank_id=memory_bank_id, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + memory_bank_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Any | HTTPValidationError | None: + """Delete Memory Bank + + Soft-delete a memory bank. This action is permanent and cannot be undone. + + The linked content source and all stored conversation memory entries will also be removed. + + Args: + memory_bank_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return sync_detailed( + memory_bank_id=memory_bank_id, + client=client, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + memory_bank_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any | HTTPValidationError]: + """Delete Memory Bank + + Soft-delete a memory bank. This action is permanent and cannot be undone. + + The linked content source and all stored conversation memory entries will also be removed. + + Args: + memory_bank_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + memory_bank_id=memory_bank_id, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + memory_bank_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Any | HTTPValidationError | None: + """Delete Memory Bank + + Soft-delete a memory bank. This action is permanent and cannot be undone. + + The linked content source and all stored conversation memory entries will also be removed. + + Args: + memory_bank_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return ( + await asyncio_detailed( + memory_bank_id=memory_bank_id, + client=client, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/memory_banks/delete_memory_bank_source_api_memory_banks_memory_bank_id_source_delete.py b/seclai/_generated/api/memory_banks/delete_memory_bank_source_api_memory_banks_memory_bank_id_source_delete.py new file mode 100644 index 0000000..d7266e8 --- /dev/null +++ b/seclai/_generated/api/memory_banks/delete_memory_bank_source_api_memory_banks_memory_bank_id_source_delete.py @@ -0,0 +1,198 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + memory_bank_id: str, + *, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/memory_banks/{memory_bank_id}/source".format( + memory_bank_id=quote(str(memory_bank_id), safe=""), + ), + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | HTTPValidationError | None: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + memory_bank_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any | HTTPValidationError]: + """Delete Memory Bank Source + + Delete the content source linked to a memory bank, removing all stored memory entries. + + A new content source is automatically created on the next write. Use this to reset a bank's data + without deleting the bank itself. + + Args: + memory_bank_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + memory_bank_id=memory_bank_id, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + memory_bank_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Any | HTTPValidationError | None: + """Delete Memory Bank Source + + Delete the content source linked to a memory bank, removing all stored memory entries. + + A new content source is automatically created on the next write. Use this to reset a bank's data + without deleting the bank itself. + + Args: + memory_bank_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return sync_detailed( + memory_bank_id=memory_bank_id, + client=client, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + memory_bank_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any | HTTPValidationError]: + """Delete Memory Bank Source + + Delete the content source linked to a memory bank, removing all stored memory entries. + + A new content source is automatically created on the next write. Use this to reset a bank's data + without deleting the bank itself. + + Args: + memory_bank_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + memory_bank_id=memory_bank_id, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + memory_bank_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Any | HTTPValidationError | None: + """Delete Memory Bank Source + + Delete the content source linked to a memory bank, removing all stored memory entries. + + A new content source is automatically created on the next write. Use this to reset a bank's data + without deleting the bank itself. + + Args: + memory_bank_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return ( + await asyncio_detailed( + memory_bank_id=memory_bank_id, + client=client, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/memory_banks/get_agents_using_bank_api_memory_banks_memory_bank_id_agents_get.py b/seclai/_generated/api/memory_banks/get_agents_using_bank_api_memory_banks_memory_bank_id_agents_get.py new file mode 100644 index 0000000..95d39e5 --- /dev/null +++ b/seclai/_generated/api/memory_banks/get_agents_using_bank_api_memory_banks_memory_bank_id_agents_get.py @@ -0,0 +1,226 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.get_agents_using_bank_api_memory_banks_memory_bank_id_agents_get_response_200_item import ( + GetAgentsUsingBankApiMemoryBanksMemoryBankIdAgentsGetResponse200Item, +) +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + memory_bank_id: str, + *, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/memory_banks/{memory_bank_id}/agents".format( + memory_bank_id=quote(str(memory_bank_id), safe=""), + ), + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + HTTPValidationError + | list[GetAgentsUsingBankApiMemoryBanksMemoryBankIdAgentsGetResponse200Item] + | None +): + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = GetAgentsUsingBankApiMemoryBanksMemoryBankIdAgentsGetResponse200Item.from_dict( + response_200_item_data + ) + + response_200.append(response_200_item) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + HTTPValidationError + | list[GetAgentsUsingBankApiMemoryBanksMemoryBankIdAgentsGetResponse200Item] +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + memory_bank_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + HTTPValidationError + | list[GetAgentsUsingBankApiMemoryBanksMemoryBankIdAgentsGetResponse200Item] +]: + """Get Agents Using Bank + + List agents whose current definition references this memory bank. + + Returns an array of `{agent_id, agent_name}` objects. + + Args: + memory_bank_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | list[GetAgentsUsingBankApiMemoryBanksMemoryBankIdAgentsGetResponse200Item]] + """ + + kwargs = _get_kwargs( + memory_bank_id=memory_bank_id, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + memory_bank_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> ( + HTTPValidationError + | list[GetAgentsUsingBankApiMemoryBanksMemoryBankIdAgentsGetResponse200Item] + | None +): + """Get Agents Using Bank + + List agents whose current definition references this memory bank. + + Returns an array of `{agent_id, agent_name}` objects. + + Args: + memory_bank_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | list[GetAgentsUsingBankApiMemoryBanksMemoryBankIdAgentsGetResponse200Item] + """ + + return sync_detailed( + memory_bank_id=memory_bank_id, + client=client, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + memory_bank_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + HTTPValidationError + | list[GetAgentsUsingBankApiMemoryBanksMemoryBankIdAgentsGetResponse200Item] +]: + """Get Agents Using Bank + + List agents whose current definition references this memory bank. + + Returns an array of `{agent_id, agent_name}` objects. + + Args: + memory_bank_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | list[GetAgentsUsingBankApiMemoryBanksMemoryBankIdAgentsGetResponse200Item]] + """ + + kwargs = _get_kwargs( + memory_bank_id=memory_bank_id, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + memory_bank_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> ( + HTTPValidationError + | list[GetAgentsUsingBankApiMemoryBanksMemoryBankIdAgentsGetResponse200Item] + | None +): + """Get Agents Using Bank + + List agents whose current definition references this memory bank. + + Returns an array of `{agent_id, agent_name}` objects. + + Args: + memory_bank_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | list[GetAgentsUsingBankApiMemoryBanksMemoryBankIdAgentsGetResponse200Item] + """ + + return ( + await asyncio_detailed( + memory_bank_id=memory_bank_id, + client=client, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/memory_banks/get_memory_bank_api_memory_banks_memory_bank_id_get.py b/seclai/_generated/api/memory_banks/get_memory_bank_api_memory_banks_memory_bank_id_get.py new file mode 100644 index 0000000..59ac95d --- /dev/null +++ b/seclai/_generated/api/memory_banks/get_memory_bank_api_memory_banks_memory_bank_id_get.py @@ -0,0 +1,204 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.memory_bank import MemoryBank +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + memory_bank_id: str, + *, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/memory_banks/{memory_bank_id}".format( + memory_bank_id=quote(str(memory_bank_id), safe=""), + ), + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> HTTPValidationError | MemoryBank | None: + if response.status_code == 200: + response_200 = MemoryBank.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[HTTPValidationError | MemoryBank]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + memory_bank_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | MemoryBank]: + """Get Memory Bank + + Fetch a memory bank by ID. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. You can only access memory banks belonging to + your account. + + Args: + memory_bank_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | MemoryBank] + """ + + kwargs = _get_kwargs( + memory_bank_id=memory_bank_id, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + memory_bank_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | MemoryBank | None: + """Get Memory Bank + + Fetch a memory bank by ID. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. You can only access memory banks belonging to + your account. + + Args: + memory_bank_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | MemoryBank + """ + + return sync_detailed( + memory_bank_id=memory_bank_id, + client=client, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + memory_bank_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | MemoryBank]: + """Get Memory Bank + + Fetch a memory bank by ID. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. You can only access memory banks belonging to + your account. + + Args: + memory_bank_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | MemoryBank] + """ + + kwargs = _get_kwargs( + memory_bank_id=memory_bank_id, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + memory_bank_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | MemoryBank | None: + """Get Memory Bank + + Fetch a memory bank by ID. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. You can only access memory banks belonging to + your account. + + Args: + memory_bank_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | MemoryBank + """ + + return ( + await asyncio_detailed( + memory_bank_id=memory_bank_id, + client=client, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/memory_banks/get_memory_bank_entry_stats_api_memory_banks_memory_bank_id_stats_get.py b/seclai/_generated/api/memory_banks/get_memory_bank_entry_stats_api_memory_banks_memory_bank_id_stats_get.py new file mode 100644 index 0000000..db2e9bf --- /dev/null +++ b/seclai/_generated/api/memory_banks/get_memory_bank_entry_stats_api_memory_banks_memory_bank_id_stats_get.py @@ -0,0 +1,286 @@ +import datetime +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.get_memory_bank_entry_stats_api_memory_banks_memory_bank_id_stats_get_response_get_memory_bank_entry_stats_api_memory_banks_memory_bank_id_stats_get import ( + GetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGetResponseGetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGet, +) +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + memory_bank_id: str, + *, + days: int | Unset = 30, + start_date: datetime.date | None | Unset = UNSET, + end_date: datetime.date | None | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + params: dict[str, Any] = {} + + params["days"] = days + + json_start_date: None | str | Unset + if isinstance(start_date, Unset): + json_start_date = UNSET + elif isinstance(start_date, datetime.date): + json_start_date = start_date.isoformat() + else: + json_start_date = start_date + params["start_date"] = json_start_date + + json_end_date: None | str | Unset + if isinstance(end_date, Unset): + json_end_date = UNSET + elif isinstance(end_date, datetime.date): + json_end_date = end_date.isoformat() + else: + json_end_date = end_date + params["end_date"] = json_end_date + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/memory_banks/{memory_bank_id}/stats".format( + memory_bank_id=quote(str(memory_bank_id), safe=""), + ), + "params": params, + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + GetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGetResponseGetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGet + | HTTPValidationError + | None +): + if response.status_code == 200: + response_200 = GetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGetResponseGetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGet.from_dict( + response.json() + ) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + GetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGetResponseGetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGet + | HTTPValidationError +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + memory_bank_id: str, + *, + client: AuthenticatedClient | Client, + days: int | Unset = 30, + start_date: datetime.date | None | Unset = UNSET, + end_date: datetime.date | None | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + GetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGetResponseGetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGet + | HTTPValidationError +]: + """Get Memory Bank Entry Stats + + Return aggregated entry statistics for a memory bank, including total counts, token/age/entries-per- + key distributions (avg, p95, min, max), and top conversation keys, group keys, speakers, and tags. + Supports time-range filtering via `days`, `start_date`, and `end_date` query parameters. + + Args: + memory_bank_id (str): + days (int | Unset): Default: 30. + start_date (datetime.date | None | Unset): + end_date (datetime.date | None | Unset): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[GetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGetResponseGetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGet | HTTPValidationError] + """ + + kwargs = _get_kwargs( + memory_bank_id=memory_bank_id, + days=days, + start_date=start_date, + end_date=end_date, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + memory_bank_id: str, + *, + client: AuthenticatedClient | Client, + days: int | Unset = 30, + start_date: datetime.date | None | Unset = UNSET, + end_date: datetime.date | None | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> ( + GetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGetResponseGetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGet + | HTTPValidationError + | None +): + """Get Memory Bank Entry Stats + + Return aggregated entry statistics for a memory bank, including total counts, token/age/entries-per- + key distributions (avg, p95, min, max), and top conversation keys, group keys, speakers, and tags. + Supports time-range filtering via `days`, `start_date`, and `end_date` query parameters. + + Args: + memory_bank_id (str): + days (int | Unset): Default: 30. + start_date (datetime.date | None | Unset): + end_date (datetime.date | None | Unset): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + GetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGetResponseGetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGet | HTTPValidationError + """ + + return sync_detailed( + memory_bank_id=memory_bank_id, + client=client, + days=days, + start_date=start_date, + end_date=end_date, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + memory_bank_id: str, + *, + client: AuthenticatedClient | Client, + days: int | Unset = 30, + start_date: datetime.date | None | Unset = UNSET, + end_date: datetime.date | None | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + GetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGetResponseGetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGet + | HTTPValidationError +]: + """Get Memory Bank Entry Stats + + Return aggregated entry statistics for a memory bank, including total counts, token/age/entries-per- + key distributions (avg, p95, min, max), and top conversation keys, group keys, speakers, and tags. + Supports time-range filtering via `days`, `start_date`, and `end_date` query parameters. + + Args: + memory_bank_id (str): + days (int | Unset): Default: 30. + start_date (datetime.date | None | Unset): + end_date (datetime.date | None | Unset): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[GetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGetResponseGetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGet | HTTPValidationError] + """ + + kwargs = _get_kwargs( + memory_bank_id=memory_bank_id, + days=days, + start_date=start_date, + end_date=end_date, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + memory_bank_id: str, + *, + client: AuthenticatedClient | Client, + days: int | Unset = 30, + start_date: datetime.date | None | Unset = UNSET, + end_date: datetime.date | None | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> ( + GetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGetResponseGetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGet + | HTTPValidationError + | None +): + """Get Memory Bank Entry Stats + + Return aggregated entry statistics for a memory bank, including total counts, token/age/entries-per- + key distributions (avg, p95, min, max), and top conversation keys, group keys, speakers, and tags. + Supports time-range filtering via `days`, `start_date`, and `end_date` query parameters. + + Args: + memory_bank_id (str): + days (int | Unset): Default: 30. + start_date (datetime.date | None | Unset): + end_date (datetime.date | None | Unset): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + GetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGetResponseGetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGet | HTTPValidationError + """ + + return ( + await asyncio_detailed( + memory_bank_id=memory_bank_id, + client=client, + days=days, + start_date=start_date, + end_date=end_date, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/memory_banks/list_memory_banks_api_memory_banks_get.py b/seclai/_generated/api/memory_banks/list_memory_banks_api_memory_banks_get.py new file mode 100644 index 0000000..5f2d0f7 --- /dev/null +++ b/seclai/_generated/api/memory_banks/list_memory_banks_api_memory_banks_get.py @@ -0,0 +1,277 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.memory_bank_list_response_model import MemoryBankListResponseModel +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: int | Unset = 1, + limit: int | Unset = 20, + sort: str | Unset = "created_at", + order: str | Unset = "desc", + type_: None | str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params["sort"] = sort + + params["order"] = order + + json_type_: None | str | Unset + if isinstance(type_, Unset): + json_type_ = UNSET + else: + json_type_ = type_ + params["type"] = json_type_ + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/memory_banks", + "params": params, + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> HTTPValidationError | MemoryBankListResponseModel | None: + if response.status_code == 200: + response_200 = MemoryBankListResponseModel.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[HTTPValidationError | MemoryBankListResponseModel]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = 1, + limit: int | Unset = 20, + sort: str | Unset = "created_at", + order: str | Unset = "desc", + type_: None | str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | MemoryBankListResponseModel]: + """List Memory Banks + + List memory banks for the account. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. All resources are scoped to the caller's + account. + + Args: + page (int | Unset): Page number (1-based). Default: 1. + limit (int | Unset): Items per page. Default: 20. + sort (str | Unset): Sort field. One of: created_at, updated_at, name. Default: + 'created_at'. + order (str | Unset): Sort direction: asc or desc. Default: 'desc'. + type_ (None | str | Unset): Filter by bank type: conversation or general. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | MemoryBankListResponseModel] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + sort=sort, + order=order, + type_=type_, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + page: int | Unset = 1, + limit: int | Unset = 20, + sort: str | Unset = "created_at", + order: str | Unset = "desc", + type_: None | str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | MemoryBankListResponseModel | None: + """List Memory Banks + + List memory banks for the account. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. All resources are scoped to the caller's + account. + + Args: + page (int | Unset): Page number (1-based). Default: 1. + limit (int | Unset): Items per page. Default: 20. + sort (str | Unset): Sort field. One of: created_at, updated_at, name. Default: + 'created_at'. + order (str | Unset): Sort direction: asc or desc. Default: 'desc'. + type_ (None | str | Unset): Filter by bank type: conversation or general. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | MemoryBankListResponseModel + """ + + return sync_detailed( + client=client, + page=page, + limit=limit, + sort=sort, + order=order, + type_=type_, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = 1, + limit: int | Unset = 20, + sort: str | Unset = "created_at", + order: str | Unset = "desc", + type_: None | str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | MemoryBankListResponseModel]: + """List Memory Banks + + List memory banks for the account. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. All resources are scoped to the caller's + account. + + Args: + page (int | Unset): Page number (1-based). Default: 1. + limit (int | Unset): Items per page. Default: 20. + sort (str | Unset): Sort field. One of: created_at, updated_at, name. Default: + 'created_at'. + order (str | Unset): Sort direction: asc or desc. Default: 'desc'. + type_ (None | str | Unset): Filter by bank type: conversation or general. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | MemoryBankListResponseModel] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + sort=sort, + order=order, + type_=type_, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + page: int | Unset = 1, + limit: int | Unset = 20, + sort: str | Unset = "created_at", + order: str | Unset = "desc", + type_: None | str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | MemoryBankListResponseModel | None: + """List Memory Banks + + List memory banks for the account. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. All resources are scoped to the caller's + account. + + Args: + page (int | Unset): Page number (1-based). Default: 1. + limit (int | Unset): Items per page. Default: 20. + sort (str | Unset): Sort field. One of: created_at, updated_at, name. Default: + 'created_at'. + order (str | Unset): Sort direction: asc or desc. Default: 'desc'. + type_ (None | str | Unset): Filter by bank type: conversation or general. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | MemoryBankListResponseModel + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + limit=limit, + sort=sort, + order=order, + type_=type_, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/memory_banks/list_templates_api_memory_banks_templates_get.py b/seclai/_generated/api/memory_banks/list_templates_api_memory_banks_templates_get.py new file mode 100644 index 0000000..ae046c0 --- /dev/null +++ b/seclai/_generated/api/memory_banks/list_templates_api_memory_banks_templates_get.py @@ -0,0 +1,189 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.list_templates_api_memory_banks_templates_get_response_200_item import ( + ListTemplatesApiMemoryBanksTemplatesGetResponse200Item, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/memory_banks/templates", + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> list[ListTemplatesApiMemoryBanksTemplatesGetResponse200Item] | None: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = ( + ListTemplatesApiMemoryBanksTemplatesGetResponse200Item.from_dict( + response_200_item_data + ) + ) + + response_200.append(response_200_item) + + return response_200 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[list[ListTemplatesApiMemoryBanksTemplatesGetResponse200Item]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[list[ListTemplatesApiMemoryBanksTemplatesGetResponse200Item]]: + """List Templates + + Return pre-built template configurations for common memory bank use cases. + + Each template includes a name, description, suggested use case, and full default settings that can + be used directly with the create endpoint. + + Args: + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[list[ListTemplatesApiMemoryBanksTemplatesGetResponse200Item]] + """ + + kwargs = _get_kwargs( + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> list[ListTemplatesApiMemoryBanksTemplatesGetResponse200Item] | None: + """List Templates + + Return pre-built template configurations for common memory bank use cases. + + Each template includes a name, description, suggested use case, and full default settings that can + be used directly with the create endpoint. + + Args: + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + list[ListTemplatesApiMemoryBanksTemplatesGetResponse200Item] + """ + + return sync_detailed( + client=client, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[list[ListTemplatesApiMemoryBanksTemplatesGetResponse200Item]]: + """List Templates + + Return pre-built template configurations for common memory bank use cases. + + Each template includes a name, description, suggested use case, and full default settings that can + be used directly with the create endpoint. + + Args: + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[list[ListTemplatesApiMemoryBanksTemplatesGetResponse200Item]] + """ + + kwargs = _get_kwargs( + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> list[ListTemplatesApiMemoryBanksTemplatesGetResponse200Item] | None: + """List Templates + + Return pre-built template configurations for common memory bank use cases. + + Each template includes a name, description, suggested use case, and full default settings that can + be used directly with the create endpoint. + + Args: + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + list[ListTemplatesApiMemoryBanksTemplatesGetResponse200Item] + """ + + return ( + await asyncio_detailed( + client=client, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/memory_banks/memory_bank_ai_accept_api_memory_banks_ai_assistant_conversation_id_patch.py b/seclai/_generated/api/memory_banks/memory_bank_ai_accept_api_memory_banks_ai_assistant_conversation_id_patch.py new file mode 100644 index 0000000..a20bcc8 --- /dev/null +++ b/seclai/_generated/api/memory_banks/memory_bank_ai_accept_api_memory_banks_ai_assistant_conversation_id_patch.py @@ -0,0 +1,247 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.memory_bank_accept_request import MemoryBankAcceptRequest +from ...models.memory_bank_ai_accept_api_memory_banks_ai_assistant_conversation_id_patch_response_memory_bank_ai_accept_api_memory_banks_ai_assistant_conversation_id_patch import ( + MemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatchResponseMemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatch, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + conversation_id: UUID, + *, + body: MemoryBankAcceptRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/memory_banks/ai-assistant/{conversation_id}".format( + conversation_id=quote(str(conversation_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + HTTPValidationError + | MemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatchResponseMemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatch + | None +): + if response.status_code == 200: + response_200 = MemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatchResponseMemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatch.from_dict( + response.json() + ) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + HTTPValidationError + | MemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatchResponseMemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatch +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + conversation_id: UUID, + *, + client: AuthenticatedClient | Client, + body: MemoryBankAcceptRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + HTTPValidationError + | MemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatchResponseMemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatch +]: + """Accept or decline a memory bank AI suggestion + + Update the acceptance status of a memory bank AI assistant conversation turn. Set ``accepted`` to + true to accept the proposed configuration, or false to decline it. The accepted status is recorded + for audit purposes. + + Auth: requires `X-API-Key` header or OAuth Bearer token. + + Args: + conversation_id (UUID): + x_account_id (UUID | Unset): + body (MemoryBankAcceptRequest): Accept or decline a memory bank AI suggestion. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | MemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatchResponseMemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatch] + """ + + kwargs = _get_kwargs( + conversation_id=conversation_id, + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + conversation_id: UUID, + *, + client: AuthenticatedClient | Client, + body: MemoryBankAcceptRequest, + x_account_id: UUID | Unset = UNSET, +) -> ( + HTTPValidationError + | MemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatchResponseMemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatch + | None +): + """Accept or decline a memory bank AI suggestion + + Update the acceptance status of a memory bank AI assistant conversation turn. Set ``accepted`` to + true to accept the proposed configuration, or false to decline it. The accepted status is recorded + for audit purposes. + + Auth: requires `X-API-Key` header or OAuth Bearer token. + + Args: + conversation_id (UUID): + x_account_id (UUID | Unset): + body (MemoryBankAcceptRequest): Accept or decline a memory bank AI suggestion. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | MemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatchResponseMemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatch + """ + + return sync_detailed( + conversation_id=conversation_id, + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + conversation_id: UUID, + *, + client: AuthenticatedClient | Client, + body: MemoryBankAcceptRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + HTTPValidationError + | MemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatchResponseMemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatch +]: + """Accept or decline a memory bank AI suggestion + + Update the acceptance status of a memory bank AI assistant conversation turn. Set ``accepted`` to + true to accept the proposed configuration, or false to decline it. The accepted status is recorded + for audit purposes. + + Auth: requires `X-API-Key` header or OAuth Bearer token. + + Args: + conversation_id (UUID): + x_account_id (UUID | Unset): + body (MemoryBankAcceptRequest): Accept or decline a memory bank AI suggestion. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | MemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatchResponseMemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatch] + """ + + kwargs = _get_kwargs( + conversation_id=conversation_id, + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + conversation_id: UUID, + *, + client: AuthenticatedClient | Client, + body: MemoryBankAcceptRequest, + x_account_id: UUID | Unset = UNSET, +) -> ( + HTTPValidationError + | MemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatchResponseMemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatch + | None +): + """Accept or decline a memory bank AI suggestion + + Update the acceptance status of a memory bank AI assistant conversation turn. Set ``accepted`` to + true to accept the proposed configuration, or false to decline it. The accepted status is recorded + for audit purposes. + + Auth: requires `X-API-Key` header or OAuth Bearer token. + + Args: + conversation_id (UUID): + x_account_id (UUID | Unset): + body (MemoryBankAcceptRequest): Accept or decline a memory bank AI suggestion. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | MemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatchResponseMemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatch + """ + + return ( + await asyncio_detailed( + conversation_id=conversation_id, + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/memory_banks/memory_bank_ai_generate_api_memory_banks_ai_assistant_post.py b/seclai/_generated/api/memory_banks/memory_bank_ai_generate_api_memory_banks_ai_assistant_post.py new file mode 100644 index 0000000..757ba72 --- /dev/null +++ b/seclai/_generated/api/memory_banks/memory_bank_ai_generate_api_memory_banks_ai_assistant_post.py @@ -0,0 +1,206 @@ +from http import HTTPStatus +from typing import Any, cast +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.memory_bank_ai_assistant_request import MemoryBankAiAssistantRequest +from ...models.memory_bank_ai_assistant_response import MemoryBankAiAssistantResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + body: MemoryBankAiAssistantRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/memory_banks/ai-assistant", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | HTTPValidationError | MemoryBankAiAssistantResponse | None: + if response.status_code == 200: + response_200 = MemoryBankAiAssistantResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = cast(Any, None) + return response_400 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | HTTPValidationError | MemoryBankAiAssistantResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: MemoryBankAiAssistantRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any | HTTPValidationError | MemoryBankAiAssistantResponse]: + """Generate a memory bank configuration + + Generate a memory bank configuration suggestion via the AI assistant. The AI proposes name, type, + mode, compaction prompt, and retention settings based on the user's description. + + Auth: requires `X-API-Key` header or OAuth Bearer token. + + Args: + x_account_id (UUID | Unset): + body (MemoryBankAiAssistantRequest): Request body for the memory bank AI assistant. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError | MemoryBankAiAssistantResponse] + """ + + kwargs = _get_kwargs( + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: MemoryBankAiAssistantRequest, + x_account_id: UUID | Unset = UNSET, +) -> Any | HTTPValidationError | MemoryBankAiAssistantResponse | None: + """Generate a memory bank configuration + + Generate a memory bank configuration suggestion via the AI assistant. The AI proposes name, type, + mode, compaction prompt, and retention settings based on the user's description. + + Auth: requires `X-API-Key` header or OAuth Bearer token. + + Args: + x_account_id (UUID | Unset): + body (MemoryBankAiAssistantRequest): Request body for the memory bank AI assistant. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError | MemoryBankAiAssistantResponse + """ + + return sync_detailed( + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: MemoryBankAiAssistantRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any | HTTPValidationError | MemoryBankAiAssistantResponse]: + """Generate a memory bank configuration + + Generate a memory bank configuration suggestion via the AI assistant. The AI proposes name, type, + mode, compaction prompt, and retention settings based on the user's description. + + Auth: requires `X-API-Key` header or OAuth Bearer token. + + Args: + x_account_id (UUID | Unset): + body (MemoryBankAiAssistantRequest): Request body for the memory bank AI assistant. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError | MemoryBankAiAssistantResponse] + """ + + kwargs = _get_kwargs( + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: MemoryBankAiAssistantRequest, + x_account_id: UUID | Unset = UNSET, +) -> Any | HTTPValidationError | MemoryBankAiAssistantResponse | None: + """Generate a memory bank configuration + + Generate a memory bank configuration suggestion via the AI assistant. The AI proposes name, type, + mode, compaction prompt, and retention settings based on the user's description. + + Auth: requires `X-API-Key` header or OAuth Bearer token. + + Args: + x_account_id (UUID | Unset): + body (MemoryBankAiAssistantRequest): Request body for the memory bank AI assistant. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError | MemoryBankAiAssistantResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/memory_banks/memory_bank_ai_last_conversation_api_memory_banks_ai_assistant_last_conversation_get.py b/seclai/_generated/api/memory_banks/memory_bank_ai_last_conversation_api_memory_banks_ai_assistant_last_conversation_get.py new file mode 100644 index 0000000..c0917d8 --- /dev/null +++ b/seclai/_generated/api/memory_banks/memory_bank_ai_last_conversation_api_memory_banks_ai_assistant_last_conversation_get.py @@ -0,0 +1,221 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.memory_bank_last_conversation_response import ( + MemoryBankLastConversationResponse, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + limit: int | Unset = 5, + offset: int | Unset = 0, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + params: dict[str, Any] = {} + + params["limit"] = limit + + params["offset"] = offset + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/memory_banks/ai-assistant/last-conversation", + "params": params, + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> HTTPValidationError | MemoryBankLastConversationResponse | None: + if response.status_code == 200: + response_200 = MemoryBankLastConversationResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[HTTPValidationError | MemoryBankLastConversationResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + limit: int | Unset = 5, + offset: int | Unset = 0, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | MemoryBankLastConversationResponse]: + """Fetch memory bank AI conversation history + + Fetch the most recent memory bank AI assistant conversation turns for the current user. Supports + pagination via limit/offset. + + Auth: requires `X-API-Key` header or OAuth Bearer token. + + Args: + limit (int | Unset): Max turns to return. Default: 5. + offset (int | Unset): Number of most-recent turns to skip. Default: 0. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | MemoryBankLastConversationResponse] + """ + + kwargs = _get_kwargs( + limit=limit, + offset=offset, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + limit: int | Unset = 5, + offset: int | Unset = 0, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | MemoryBankLastConversationResponse | None: + """Fetch memory bank AI conversation history + + Fetch the most recent memory bank AI assistant conversation turns for the current user. Supports + pagination via limit/offset. + + Auth: requires `X-API-Key` header or OAuth Bearer token. + + Args: + limit (int | Unset): Max turns to return. Default: 5. + offset (int | Unset): Number of most-recent turns to skip. Default: 0. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | MemoryBankLastConversationResponse + """ + + return sync_detailed( + client=client, + limit=limit, + offset=offset, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + limit: int | Unset = 5, + offset: int | Unset = 0, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | MemoryBankLastConversationResponse]: + """Fetch memory bank AI conversation history + + Fetch the most recent memory bank AI assistant conversation turns for the current user. Supports + pagination via limit/offset. + + Auth: requires `X-API-Key` header or OAuth Bearer token. + + Args: + limit (int | Unset): Max turns to return. Default: 5. + offset (int | Unset): Number of most-recent turns to skip. Default: 0. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | MemoryBankLastConversationResponse] + """ + + kwargs = _get_kwargs( + limit=limit, + offset=offset, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + limit: int | Unset = 5, + offset: int | Unset = 0, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | MemoryBankLastConversationResponse | None: + """Fetch memory bank AI conversation history + + Fetch the most recent memory bank AI assistant conversation turns for the current user. Supports + pagination via limit/offset. + + Auth: requires `X-API-Key` header or OAuth Bearer token. + + Args: + limit (int | Unset): Max turns to return. Default: 5. + offset (int | Unset): Number of most-recent turns to skip. Default: 0. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | MemoryBankLastConversationResponse + """ + + return ( + await asyncio_detailed( + client=client, + limit=limit, + offset=offset, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/memory_banks/test_compaction_prompt_api_memory_banks_memory_bank_id_test_compaction_post.py b/seclai/_generated/api/memory_banks/test_compaction_prompt_api_memory_banks_memory_bank_id_test_compaction_post.py new file mode 100644 index 0000000..4fdd40a --- /dev/null +++ b/seclai/_generated/api/memory_banks/test_compaction_prompt_api_memory_banks_memory_bank_id_test_compaction_post.py @@ -0,0 +1,262 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.compaction_test_response_model import CompactionTestResponseModel +from ...models.http_validation_error import HTTPValidationError +from ...models.test_compaction_request import TestCompactionRequest +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + memory_bank_id: str, + *, + body: TestCompactionRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/memory_banks/{memory_bank_id}/test-compaction".format( + memory_bank_id=quote(str(memory_bank_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CompactionTestResponseModel | HTTPValidationError | None: + if response.status_code == 200: + response_200 = CompactionTestResponseModel.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CompactionTestResponseModel | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + memory_bank_id: str, + *, + client: AuthenticatedClient | Client, + body: TestCompactionRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[CompactionTestResponseModel | HTTPValidationError]: + """Test Compaction Prompt + + Test a compaction prompt by running the summarizer and evaluating the result with an LLM-as-judge. + Returns original entries, compaction summary, surviving entries, and a structured quality evaluation + with verdict, score, and reasoning. + + Args: + memory_bank_id (str): + x_account_id (UUID | Unset): + body (TestCompactionRequest): Request body for testing a compaction prompt against an + existing bank. + + The user may supply a ``compaction_prompt`` to override (or provide when + the bank has none). Content can come from three sources: + + 1. Existing entries in the bank (default when neither field is set). + 2. ``sample_entries`` – caller-provided list of strings. + 3. ``generate_direction`` – an instruction to the LLM to generate sample + memory entries. Useful for trying a prompt before any real data + exists. + + At most one of ``sample_entries`` / ``generate_direction`` may be given. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CompactionTestResponseModel | HTTPValidationError] + """ + + kwargs = _get_kwargs( + memory_bank_id=memory_bank_id, + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + memory_bank_id: str, + *, + client: AuthenticatedClient | Client, + body: TestCompactionRequest, + x_account_id: UUID | Unset = UNSET, +) -> CompactionTestResponseModel | HTTPValidationError | None: + """Test Compaction Prompt + + Test a compaction prompt by running the summarizer and evaluating the result with an LLM-as-judge. + Returns original entries, compaction summary, surviving entries, and a structured quality evaluation + with verdict, score, and reasoning. + + Args: + memory_bank_id (str): + x_account_id (UUID | Unset): + body (TestCompactionRequest): Request body for testing a compaction prompt against an + existing bank. + + The user may supply a ``compaction_prompt`` to override (or provide when + the bank has none). Content can come from three sources: + + 1. Existing entries in the bank (default when neither field is set). + 2. ``sample_entries`` – caller-provided list of strings. + 3. ``generate_direction`` – an instruction to the LLM to generate sample + memory entries. Useful for trying a prompt before any real data + exists. + + At most one of ``sample_entries`` / ``generate_direction`` may be given. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CompactionTestResponseModel | HTTPValidationError + """ + + return sync_detailed( + memory_bank_id=memory_bank_id, + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + memory_bank_id: str, + *, + client: AuthenticatedClient | Client, + body: TestCompactionRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[CompactionTestResponseModel | HTTPValidationError]: + """Test Compaction Prompt + + Test a compaction prompt by running the summarizer and evaluating the result with an LLM-as-judge. + Returns original entries, compaction summary, surviving entries, and a structured quality evaluation + with verdict, score, and reasoning. + + Args: + memory_bank_id (str): + x_account_id (UUID | Unset): + body (TestCompactionRequest): Request body for testing a compaction prompt against an + existing bank. + + The user may supply a ``compaction_prompt`` to override (or provide when + the bank has none). Content can come from three sources: + + 1. Existing entries in the bank (default when neither field is set). + 2. ``sample_entries`` – caller-provided list of strings. + 3. ``generate_direction`` – an instruction to the LLM to generate sample + memory entries. Useful for trying a prompt before any real data + exists. + + At most one of ``sample_entries`` / ``generate_direction`` may be given. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CompactionTestResponseModel | HTTPValidationError] + """ + + kwargs = _get_kwargs( + memory_bank_id=memory_bank_id, + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + memory_bank_id: str, + *, + client: AuthenticatedClient | Client, + body: TestCompactionRequest, + x_account_id: UUID | Unset = UNSET, +) -> CompactionTestResponseModel | HTTPValidationError | None: + """Test Compaction Prompt + + Test a compaction prompt by running the summarizer and evaluating the result with an LLM-as-judge. + Returns original entries, compaction summary, surviving entries, and a structured quality evaluation + with verdict, score, and reasoning. + + Args: + memory_bank_id (str): + x_account_id (UUID | Unset): + body (TestCompactionRequest): Request body for testing a compaction prompt against an + existing bank. + + The user may supply a ``compaction_prompt`` to override (or provide when + the bank has none). Content can come from three sources: + + 1. Existing entries in the bank (default when neither field is set). + 2. ``sample_entries`` – caller-provided list of strings. + 3. ``generate_direction`` – an instruction to the LLM to generate sample + memory entries. Useful for trying a prompt before any real data + exists. + + At most one of ``sample_entries`` / ``generate_direction`` may be given. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CompactionTestResponseModel | HTTPValidationError + """ + + return ( + await asyncio_detailed( + memory_bank_id=memory_bank_id, + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/memory_banks/test_compaction_prompt_standalone_api_memory_banks_test_compaction_post.py b/seclai/_generated/api/memory_banks/test_compaction_prompt_standalone_api_memory_banks_test_compaction_post.py new file mode 100644 index 0000000..3f3d7cd --- /dev/null +++ b/seclai/_generated/api/memory_banks/test_compaction_prompt_standalone_api_memory_banks_test_compaction_post.py @@ -0,0 +1,222 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.compaction_test_response_model import CompactionTestResponseModel +from ...models.http_validation_error import HTTPValidationError +from ...models.standalone_test_compaction_request import StandaloneTestCompactionRequest +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + body: StandaloneTestCompactionRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/memory_banks/test-compaction", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CompactionTestResponseModel | HTTPValidationError | None: + if response.status_code == 200: + response_200 = CompactionTestResponseModel.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CompactionTestResponseModel | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: StandaloneTestCompactionRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[CompactionTestResponseModel | HTTPValidationError]: + """Test Compaction Prompt Standalone + + Test a compaction prompt by running the summarizer and evaluating the result with an LLM-as-judge. + Returns original entries, compaction summary, surviving entries, and a structured quality evaluation + with verdict, score, and reasoning. + + Args: + x_account_id (UUID | Unset): + body (StandaloneTestCompactionRequest): Request body for testing a compaction prompt + *without* an existing bank. + + Used on the create-memory-bank page where no bank ID exists yet. + ``compaction_prompt`` is required (no bank to fall back to). + Content must come from ``sample_entries`` or ``generate_direction`` + (no existing entries to fetch). + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CompactionTestResponseModel | HTTPValidationError] + """ + + kwargs = _get_kwargs( + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: StandaloneTestCompactionRequest, + x_account_id: UUID | Unset = UNSET, +) -> CompactionTestResponseModel | HTTPValidationError | None: + """Test Compaction Prompt Standalone + + Test a compaction prompt by running the summarizer and evaluating the result with an LLM-as-judge. + Returns original entries, compaction summary, surviving entries, and a structured quality evaluation + with verdict, score, and reasoning. + + Args: + x_account_id (UUID | Unset): + body (StandaloneTestCompactionRequest): Request body for testing a compaction prompt + *without* an existing bank. + + Used on the create-memory-bank page where no bank ID exists yet. + ``compaction_prompt`` is required (no bank to fall back to). + Content must come from ``sample_entries`` or ``generate_direction`` + (no existing entries to fetch). + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CompactionTestResponseModel | HTTPValidationError + """ + + return sync_detailed( + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: StandaloneTestCompactionRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[CompactionTestResponseModel | HTTPValidationError]: + """Test Compaction Prompt Standalone + + Test a compaction prompt by running the summarizer and evaluating the result with an LLM-as-judge. + Returns original entries, compaction summary, surviving entries, and a structured quality evaluation + with verdict, score, and reasoning. + + Args: + x_account_id (UUID | Unset): + body (StandaloneTestCompactionRequest): Request body for testing a compaction prompt + *without* an existing bank. + + Used on the create-memory-bank page where no bank ID exists yet. + ``compaction_prompt`` is required (no bank to fall back to). + Content must come from ``sample_entries`` or ``generate_direction`` + (no existing entries to fetch). + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CompactionTestResponseModel | HTTPValidationError] + """ + + kwargs = _get_kwargs( + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: StandaloneTestCompactionRequest, + x_account_id: UUID | Unset = UNSET, +) -> CompactionTestResponseModel | HTTPValidationError | None: + """Test Compaction Prompt Standalone + + Test a compaction prompt by running the summarizer and evaluating the result with an LLM-as-judge. + Returns original entries, compaction summary, surviving entries, and a structured quality evaluation + with verdict, score, and reasoning. + + Args: + x_account_id (UUID | Unset): + body (StandaloneTestCompactionRequest): Request body for testing a compaction prompt + *without* an existing bank. + + Used on the create-memory-bank page where no bank ID exists yet. + ``compaction_prompt`` is required (no bank to fall back to). + Content must come from ``sample_entries`` or ``generate_direction`` + (no existing entries to fetch). + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CompactionTestResponseModel | HTTPValidationError + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/memory_banks/update_memory_bank_api_memory_banks_memory_bank_id_put.py b/seclai/_generated/api/memory_banks/update_memory_bank_api_memory_banks_memory_bank_id_put.py new file mode 100644 index 0000000..ae10219 --- /dev/null +++ b/seclai/_generated/api/memory_banks/update_memory_bank_api_memory_banks_memory_bank_id_put.py @@ -0,0 +1,234 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.memory_bank import MemoryBank +from ...models.update_memory_bank_body import UpdateMemoryBankBody +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + memory_bank_id: str, + *, + body: UpdateMemoryBankBody, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "put", + "url": "/memory_banks/{memory_bank_id}".format( + memory_bank_id=quote(str(memory_bank_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> HTTPValidationError | MemoryBank | None: + if response.status_code == 200: + response_200 = MemoryBank.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[HTTPValidationError | MemoryBank]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + memory_bank_id: str, + *, + client: AuthenticatedClient | Client, + body: UpdateMemoryBankBody, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | MemoryBank]: + """Update Memory Bank + + Update a memory bank's configuration. Only provided fields are changed; omitted fields are left + unchanged. + + Note: the embedding `mode` cannot be changed after creation because it determines the vector + dimensions used to store entries. + + Args: + memory_bank_id (str): + x_account_id (UUID | Unset): + body (UpdateMemoryBankBody): Request body for updating a memory bank. + + Omitted fields are left unchanged. To **clear** a field back to null, + send a zero-value sentinel: ``0`` for integers, ``""`` for strings. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | MemoryBank] + """ + + kwargs = _get_kwargs( + memory_bank_id=memory_bank_id, + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + memory_bank_id: str, + *, + client: AuthenticatedClient | Client, + body: UpdateMemoryBankBody, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | MemoryBank | None: + """Update Memory Bank + + Update a memory bank's configuration. Only provided fields are changed; omitted fields are left + unchanged. + + Note: the embedding `mode` cannot be changed after creation because it determines the vector + dimensions used to store entries. + + Args: + memory_bank_id (str): + x_account_id (UUID | Unset): + body (UpdateMemoryBankBody): Request body for updating a memory bank. + + Omitted fields are left unchanged. To **clear** a field back to null, + send a zero-value sentinel: ``0`` for integers, ``""`` for strings. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | MemoryBank + """ + + return sync_detailed( + memory_bank_id=memory_bank_id, + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + memory_bank_id: str, + *, + client: AuthenticatedClient | Client, + body: UpdateMemoryBankBody, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | MemoryBank]: + """Update Memory Bank + + Update a memory bank's configuration. Only provided fields are changed; omitted fields are left + unchanged. + + Note: the embedding `mode` cannot be changed after creation because it determines the vector + dimensions used to store entries. + + Args: + memory_bank_id (str): + x_account_id (UUID | Unset): + body (UpdateMemoryBankBody): Request body for updating a memory bank. + + Omitted fields are left unchanged. To **clear** a field back to null, + send a zero-value sentinel: ``0`` for integers, ``""`` for strings. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | MemoryBank] + """ + + kwargs = _get_kwargs( + memory_bank_id=memory_bank_id, + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + memory_bank_id: str, + *, + client: AuthenticatedClient | Client, + body: UpdateMemoryBankBody, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | MemoryBank | None: + """Update Memory Bank + + Update a memory bank's configuration. Only provided fields are changed; omitted fields are left + unchanged. + + Note: the embedding `mode` cannot be changed after creation because it determines the vector + dimensions used to store entries. + + Args: + memory_bank_id (str): + x_account_id (UUID | Unset): + body (UpdateMemoryBankBody): Request body for updating a memory bank. + + Omitted fields are left unchanged. To **clear** a field back to null, + send a zero-value sentinel: ``0`` for integers, ``""`` for strings. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | MemoryBank + """ + + return ( + await asyncio_detailed( + memory_bank_id=memory_bank_id, + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/models/__init__.py b/seclai/_generated/api/models/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/seclai/_generated/api/models/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/seclai/_generated/api/models/get_alert_unread_count_api_models_alerts_unread_count_get.py b/seclai/_generated/api/models/get_alert_unread_count_api_models_alerts_unread_count_get.py new file mode 100644 index 0000000..f5e3484 --- /dev/null +++ b/seclai/_generated/api/models/get_alert_unread_count_api_models_alerts_unread_count_get.py @@ -0,0 +1,205 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.get_alert_unread_count_api_models_alerts_unread_count_get_response_get_alert_unread_count_api_models_alerts_unread_count_get import ( + GetAlertUnreadCountApiModelsAlertsUnreadCountGetResponseGetAlertUnreadCountApiModelsAlertsUnreadCountGet, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/models/alerts/unread-count", + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + GetAlertUnreadCountApiModelsAlertsUnreadCountGetResponseGetAlertUnreadCountApiModelsAlertsUnreadCountGet + | None +): + if response.status_code == 200: + response_200 = GetAlertUnreadCountApiModelsAlertsUnreadCountGetResponseGetAlertUnreadCountApiModelsAlertsUnreadCountGet.from_dict( + response.json() + ) + + return response_200 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + GetAlertUnreadCountApiModelsAlertsUnreadCountGetResponseGetAlertUnreadCountApiModelsAlertsUnreadCountGet +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + GetAlertUnreadCountApiModelsAlertsUnreadCountGetResponseGetAlertUnreadCountApiModelsAlertsUnreadCountGet +]: + """Get Alert Unread Count + + Get the count of unread model lifecycle alerts. + + Useful for badge indicators in UIs and dashboards. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. Count is scoped to the caller's account. + + Args: + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[GetAlertUnreadCountApiModelsAlertsUnreadCountGetResponseGetAlertUnreadCountApiModelsAlertsUnreadCountGet] + """ + + kwargs = _get_kwargs( + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> ( + GetAlertUnreadCountApiModelsAlertsUnreadCountGetResponseGetAlertUnreadCountApiModelsAlertsUnreadCountGet + | None +): + """Get Alert Unread Count + + Get the count of unread model lifecycle alerts. + + Useful for badge indicators in UIs and dashboards. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. Count is scoped to the caller's account. + + Args: + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + GetAlertUnreadCountApiModelsAlertsUnreadCountGetResponseGetAlertUnreadCountApiModelsAlertsUnreadCountGet + """ + + return sync_detailed( + client=client, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + GetAlertUnreadCountApiModelsAlertsUnreadCountGetResponseGetAlertUnreadCountApiModelsAlertsUnreadCountGet +]: + """Get Alert Unread Count + + Get the count of unread model lifecycle alerts. + + Useful for badge indicators in UIs and dashboards. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. Count is scoped to the caller's account. + + Args: + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[GetAlertUnreadCountApiModelsAlertsUnreadCountGetResponseGetAlertUnreadCountApiModelsAlertsUnreadCountGet] + """ + + kwargs = _get_kwargs( + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> ( + GetAlertUnreadCountApiModelsAlertsUnreadCountGetResponseGetAlertUnreadCountApiModelsAlertsUnreadCountGet + | None +): + """Get Alert Unread Count + + Get the count of unread model lifecycle alerts. + + Useful for badge indicators in UIs and dashboards. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. Count is scoped to the caller's account. + + Args: + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + GetAlertUnreadCountApiModelsAlertsUnreadCountGetResponseGetAlertUnreadCountApiModelsAlertsUnreadCountGet + """ + + return ( + await asyncio_detailed( + client=client, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/models/get_recommendations_api_models_model_id_recommendations_get.py b/seclai/_generated/api/models/get_recommendations_api_models_model_id_recommendations_get.py new file mode 100644 index 0000000..f1181a9 --- /dev/null +++ b/seclai/_generated/api/models/get_recommendations_api_models_model_id_recommendations_get.py @@ -0,0 +1,350 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.get_recommendations_api_models_model_id_recommendations_get_response_get_recommendations_api_models_model_id_recommendations_get import ( + GetRecommendationsApiModelsModelIdRecommendationsGetResponseGetRecommendationsApiModelsModelIdRecommendationsGet, +) +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + model_id: str, + *, + require_tool_use: bool | None | Unset = UNSET, + require_structured_output: bool | None | Unset = UNSET, + require_thinking: bool | None | Unset = UNSET, + min_context_tokens: int | None | Unset = UNSET, + min_output_tokens: int | None | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + params: dict[str, Any] = {} + + json_require_tool_use: bool | None | Unset + if isinstance(require_tool_use, Unset): + json_require_tool_use = UNSET + else: + json_require_tool_use = require_tool_use + params["require_tool_use"] = json_require_tool_use + + json_require_structured_output: bool | None | Unset + if isinstance(require_structured_output, Unset): + json_require_structured_output = UNSET + else: + json_require_structured_output = require_structured_output + params["require_structured_output"] = json_require_structured_output + + json_require_thinking: bool | None | Unset + if isinstance(require_thinking, Unset): + json_require_thinking = UNSET + else: + json_require_thinking = require_thinking + params["require_thinking"] = json_require_thinking + + json_min_context_tokens: int | None | Unset + if isinstance(min_context_tokens, Unset): + json_min_context_tokens = UNSET + else: + json_min_context_tokens = min_context_tokens + params["min_context_tokens"] = json_min_context_tokens + + json_min_output_tokens: int | None | Unset + if isinstance(min_output_tokens, Unset): + json_min_output_tokens = UNSET + else: + json_min_output_tokens = min_output_tokens + params["min_output_tokens"] = json_min_output_tokens + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/models/{model_id}/recommendations".format( + model_id=quote(str(model_id), safe=""), + ), + "params": params, + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + GetRecommendationsApiModelsModelIdRecommendationsGetResponseGetRecommendationsApiModelsModelIdRecommendationsGet + | HTTPValidationError + | None +): + if response.status_code == 200: + response_200 = GetRecommendationsApiModelsModelIdRecommendationsGetResponseGetRecommendationsApiModelsModelIdRecommendationsGet.from_dict( + response.json() + ) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + GetRecommendationsApiModelsModelIdRecommendationsGetResponseGetRecommendationsApiModelsModelIdRecommendationsGet + | HTTPValidationError +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + model_id: str, + *, + client: AuthenticatedClient | Client, + require_tool_use: bool | None | Unset = UNSET, + require_structured_output: bool | None | Unset = UNSET, + require_thinking: bool | None | Unset = UNSET, + min_context_tokens: int | None | Unset = UNSET, + min_output_tokens: int | None | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + GetRecommendationsApiModelsModelIdRecommendationsGetResponseGetRecommendationsApiModelsModelIdRecommendationsGet + | HTTPValidationError +]: + """Get Recommendations + + Get replacement/upgrade recommendations for a model. + + Returns a designated successor (if any), same-family upgrades, and cross-provider/cross-family + alternatives. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + model_id (str): + require_tool_use (bool | None | Unset): Only recommend models that support tool use. + require_structured_output (bool | None | Unset): Only recommend models that support + structured output. + require_thinking (bool | None | Unset): Only recommend models that support + thinking/reasoning. + min_context_tokens (int | None | Unset): Minimum context window size in tokens. + min_output_tokens (int | None | Unset): Minimum output token limit. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[GetRecommendationsApiModelsModelIdRecommendationsGetResponseGetRecommendationsApiModelsModelIdRecommendationsGet | HTTPValidationError] + """ + + kwargs = _get_kwargs( + model_id=model_id, + require_tool_use=require_tool_use, + require_structured_output=require_structured_output, + require_thinking=require_thinking, + min_context_tokens=min_context_tokens, + min_output_tokens=min_output_tokens, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + model_id: str, + *, + client: AuthenticatedClient | Client, + require_tool_use: bool | None | Unset = UNSET, + require_structured_output: bool | None | Unset = UNSET, + require_thinking: bool | None | Unset = UNSET, + min_context_tokens: int | None | Unset = UNSET, + min_output_tokens: int | None | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> ( + GetRecommendationsApiModelsModelIdRecommendationsGetResponseGetRecommendationsApiModelsModelIdRecommendationsGet + | HTTPValidationError + | None +): + """Get Recommendations + + Get replacement/upgrade recommendations for a model. + + Returns a designated successor (if any), same-family upgrades, and cross-provider/cross-family + alternatives. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + model_id (str): + require_tool_use (bool | None | Unset): Only recommend models that support tool use. + require_structured_output (bool | None | Unset): Only recommend models that support + structured output. + require_thinking (bool | None | Unset): Only recommend models that support + thinking/reasoning. + min_context_tokens (int | None | Unset): Minimum context window size in tokens. + min_output_tokens (int | None | Unset): Minimum output token limit. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + GetRecommendationsApiModelsModelIdRecommendationsGetResponseGetRecommendationsApiModelsModelIdRecommendationsGet | HTTPValidationError + """ + + return sync_detailed( + model_id=model_id, + client=client, + require_tool_use=require_tool_use, + require_structured_output=require_structured_output, + require_thinking=require_thinking, + min_context_tokens=min_context_tokens, + min_output_tokens=min_output_tokens, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + model_id: str, + *, + client: AuthenticatedClient | Client, + require_tool_use: bool | None | Unset = UNSET, + require_structured_output: bool | None | Unset = UNSET, + require_thinking: bool | None | Unset = UNSET, + min_context_tokens: int | None | Unset = UNSET, + min_output_tokens: int | None | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + GetRecommendationsApiModelsModelIdRecommendationsGetResponseGetRecommendationsApiModelsModelIdRecommendationsGet + | HTTPValidationError +]: + """Get Recommendations + + Get replacement/upgrade recommendations for a model. + + Returns a designated successor (if any), same-family upgrades, and cross-provider/cross-family + alternatives. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + model_id (str): + require_tool_use (bool | None | Unset): Only recommend models that support tool use. + require_structured_output (bool | None | Unset): Only recommend models that support + structured output. + require_thinking (bool | None | Unset): Only recommend models that support + thinking/reasoning. + min_context_tokens (int | None | Unset): Minimum context window size in tokens. + min_output_tokens (int | None | Unset): Minimum output token limit. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[GetRecommendationsApiModelsModelIdRecommendationsGetResponseGetRecommendationsApiModelsModelIdRecommendationsGet | HTTPValidationError] + """ + + kwargs = _get_kwargs( + model_id=model_id, + require_tool_use=require_tool_use, + require_structured_output=require_structured_output, + require_thinking=require_thinking, + min_context_tokens=min_context_tokens, + min_output_tokens=min_output_tokens, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + model_id: str, + *, + client: AuthenticatedClient | Client, + require_tool_use: bool | None | Unset = UNSET, + require_structured_output: bool | None | Unset = UNSET, + require_thinking: bool | None | Unset = UNSET, + min_context_tokens: int | None | Unset = UNSET, + min_output_tokens: int | None | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> ( + GetRecommendationsApiModelsModelIdRecommendationsGetResponseGetRecommendationsApiModelsModelIdRecommendationsGet + | HTTPValidationError + | None +): + """Get Recommendations + + Get replacement/upgrade recommendations for a model. + + Returns a designated successor (if any), same-family upgrades, and cross-provider/cross-family + alternatives. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + model_id (str): + require_tool_use (bool | None | Unset): Only recommend models that support tool use. + require_structured_output (bool | None | Unset): Only recommend models that support + structured output. + require_thinking (bool | None | Unset): Only recommend models that support + thinking/reasoning. + min_context_tokens (int | None | Unset): Minimum context window size in tokens. + min_output_tokens (int | None | Unset): Minimum output token limit. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + GetRecommendationsApiModelsModelIdRecommendationsGetResponseGetRecommendationsApiModelsModelIdRecommendationsGet | HTTPValidationError + """ + + return ( + await asyncio_detailed( + model_id=model_id, + client=client, + require_tool_use=require_tool_use, + require_structured_output=require_structured_output, + require_thinking=require_thinking, + min_context_tokens=min_context_tokens, + min_output_tokens=min_output_tokens, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/models/list_alerts_api_models_alerts_get.py b/seclai/_generated/api/models/list_alerts_api_models_alerts_get.py new file mode 100644 index 0000000..03b28e0 --- /dev/null +++ b/seclai/_generated/api/models/list_alerts_api_models_alerts_get.py @@ -0,0 +1,293 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.list_alerts_api_models_alerts_get_response_list_alerts_api_models_alerts_get import ( + ListAlertsApiModelsAlertsGetResponseListAlertsApiModelsAlertsGet, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + agent_id: None | str | Unset = UNSET, + unread_only: bool | Unset = False, + limit: int | Unset = 50, + offset: int | Unset = 0, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + params: dict[str, Any] = {} + + json_agent_id: None | str | Unset + if isinstance(agent_id, Unset): + json_agent_id = UNSET + else: + json_agent_id = agent_id + params["agent_id"] = json_agent_id + + params["unread_only"] = unread_only + + params["limit"] = limit + + params["offset"] = offset + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/models/alerts", + "params": params, + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + HTTPValidationError + | ListAlertsApiModelsAlertsGetResponseListAlertsApiModelsAlertsGet + | None +): + if response.status_code == 200: + response_200 = ( + ListAlertsApiModelsAlertsGetResponseListAlertsApiModelsAlertsGet.from_dict( + response.json() + ) + ) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + HTTPValidationError + | ListAlertsApiModelsAlertsGetResponseListAlertsApiModelsAlertsGet +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + agent_id: None | str | Unset = UNSET, + unread_only: bool | Unset = False, + limit: int | Unset = 50, + offset: int | Unset = 0, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + HTTPValidationError + | ListAlertsApiModelsAlertsGetResponseListAlertsApiModelsAlertsGet +]: + """List Alerts + + List model lifecycle alerts for the account. + + Returns in-app notifications about model deprecations, sunsets, and newer model availability. + Supports filtering by agent, unread-only, and pagination. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. Alerts are scoped to the caller's account. + + Args: + agent_id (None | str | Unset): Filter alerts to a specific agent UUID. + unread_only (bool | Unset): When true, only return unread alerts. Default: False. + limit (int | Unset): Maximum number of alerts to return (1-100). Default: 50. + offset (int | Unset): Pagination offset. Default: 0. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | ListAlertsApiModelsAlertsGetResponseListAlertsApiModelsAlertsGet] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + unread_only=unread_only, + limit=limit, + offset=offset, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + agent_id: None | str | Unset = UNSET, + unread_only: bool | Unset = False, + limit: int | Unset = 50, + offset: int | Unset = 0, + x_account_id: UUID | Unset = UNSET, +) -> ( + HTTPValidationError + | ListAlertsApiModelsAlertsGetResponseListAlertsApiModelsAlertsGet + | None +): + """List Alerts + + List model lifecycle alerts for the account. + + Returns in-app notifications about model deprecations, sunsets, and newer model availability. + Supports filtering by agent, unread-only, and pagination. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. Alerts are scoped to the caller's account. + + Args: + agent_id (None | str | Unset): Filter alerts to a specific agent UUID. + unread_only (bool | Unset): When true, only return unread alerts. Default: False. + limit (int | Unset): Maximum number of alerts to return (1-100). Default: 50. + offset (int | Unset): Pagination offset. Default: 0. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | ListAlertsApiModelsAlertsGetResponseListAlertsApiModelsAlertsGet + """ + + return sync_detailed( + client=client, + agent_id=agent_id, + unread_only=unread_only, + limit=limit, + offset=offset, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + agent_id: None | str | Unset = UNSET, + unread_only: bool | Unset = False, + limit: int | Unset = 50, + offset: int | Unset = 0, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + HTTPValidationError + | ListAlertsApiModelsAlertsGetResponseListAlertsApiModelsAlertsGet +]: + """List Alerts + + List model lifecycle alerts for the account. + + Returns in-app notifications about model deprecations, sunsets, and newer model availability. + Supports filtering by agent, unread-only, and pagination. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. Alerts are scoped to the caller's account. + + Args: + agent_id (None | str | Unset): Filter alerts to a specific agent UUID. + unread_only (bool | Unset): When true, only return unread alerts. Default: False. + limit (int | Unset): Maximum number of alerts to return (1-100). Default: 50. + offset (int | Unset): Pagination offset. Default: 0. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | ListAlertsApiModelsAlertsGetResponseListAlertsApiModelsAlertsGet] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + unread_only=unread_only, + limit=limit, + offset=offset, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + agent_id: None | str | Unset = UNSET, + unread_only: bool | Unset = False, + limit: int | Unset = 50, + offset: int | Unset = 0, + x_account_id: UUID | Unset = UNSET, +) -> ( + HTTPValidationError + | ListAlertsApiModelsAlertsGetResponseListAlertsApiModelsAlertsGet + | None +): + """List Alerts + + List model lifecycle alerts for the account. + + Returns in-app notifications about model deprecations, sunsets, and newer model availability. + Supports filtering by agent, unread-only, and pagination. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. Alerts are scoped to the caller's account. + + Args: + agent_id (None | str | Unset): Filter alerts to a specific agent UUID. + unread_only (bool | Unset): When true, only return unread alerts. Default: False. + limit (int | Unset): Maximum number of alerts to return (1-100). Default: 50. + offset (int | Unset): Pagination offset. Default: 0. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | ListAlertsApiModelsAlertsGetResponseListAlertsApiModelsAlertsGet + """ + + return ( + await asyncio_detailed( + client=client, + agent_id=agent_id, + unread_only=unread_only, + limit=limit, + offset=offset, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/models/mark_all_read_api_models_alerts_mark_all_read_post.py b/seclai/_generated/api/models/mark_all_read_api_models_alerts_mark_all_read_post.py new file mode 100644 index 0000000..0fef990 --- /dev/null +++ b/seclai/_generated/api/models/mark_all_read_api_models_alerts_mark_all_read_post.py @@ -0,0 +1,115 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/models/alerts/mark-all-read", + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | None: + if response.status_code == 204: + return None + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any]: + """Mark All Read + + Mark all model lifecycle alerts as read for the account. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. Scoped to the caller's account. + + Args: + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any]: + """Mark All Read + + Mark all model lifecycle alerts as read for the account. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. Scoped to the caller's account. + + Args: + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/seclai/_generated/api/models/mark_read_api_models_alerts_alert_id_read_patch.py b/seclai/_generated/api/models/mark_read_api_models_alerts_alert_id_read_patch.py new file mode 100644 index 0000000..7213d7d --- /dev/null +++ b/seclai/_generated/api/models/mark_read_api_models_alerts_alert_id_read_patch.py @@ -0,0 +1,198 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + alert_id: UUID, + *, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/models/alerts/{alert_id}/read".format( + alert_id=quote(str(alert_id), safe=""), + ), + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | HTTPValidationError | None: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + alert_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any | HTTPValidationError]: + """Mark Read + + Mark a single model lifecycle alert as read (dismissed). + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. The alert must belong to the caller's account. + + Args: + alert_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + alert_id=alert_id, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + alert_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Any | HTTPValidationError | None: + """Mark Read + + Mark a single model lifecycle alert as read (dismissed). + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. The alert must belong to the caller's account. + + Args: + alert_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return sync_detailed( + alert_id=alert_id, + client=client, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + alert_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any | HTTPValidationError]: + """Mark Read + + Mark a single model lifecycle alert as read (dismissed). + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. The alert must belong to the caller's account. + + Args: + alert_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + alert_id=alert_id, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + alert_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Any | HTTPValidationError | None: + """Mark Read + + Mark a single model lifecycle alert as read (dismissed). + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. The alert must belong to the caller's account. + + Args: + alert_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return ( + await asyncio_detailed( + alert_id=alert_id, + client=client, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/search/__init__.py b/seclai/_generated/api/search/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/seclai/_generated/api/search/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/seclai/_generated/api/search/search_api_search_get.py b/seclai/_generated/api/search/search_api_search_get.py new file mode 100644 index 0000000..c5141cf --- /dev/null +++ b/seclai/_generated/api/search/search_api_search_get.py @@ -0,0 +1,251 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.search_api_search_get_response_search_api_search_get import ( + SearchApiSearchGetResponseSearchApiSearchGet, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + q: str, + limit: int | Unset = 10, + entity_type: None | str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + params: dict[str, Any] = {} + + params["q"] = q + + params["limit"] = limit + + json_entity_type: None | str | Unset + if isinstance(entity_type, Unset): + json_entity_type = UNSET + else: + json_entity_type = entity_type + params["entity_type"] = json_entity_type + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/search", + "params": params, + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> HTTPValidationError | SearchApiSearchGetResponseSearchApiSearchGet | None: + if response.status_code == 200: + response_200 = SearchApiSearchGetResponseSearchApiSearchGet.from_dict( + response.json() + ) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[HTTPValidationError | SearchApiSearchGetResponseSearchApiSearchGet]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + q: str, + limit: int | Unset = 10, + entity_type: None | str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | SearchApiSearchGetResponseSearchApiSearchGet]: + """Search resources + + Search across all resource types in your account. Accepts a free-text keyword query or a UUID. + UUIDs are matched exactly; keywords are matched by name and description (case-insensitive + substring). Results are ranked: name-prefix > name-substring > description-substring. Searchable + types: agent, knowledge_base, source_connection, solution, memory_bank, alert, api_key, + governance_policy. + + Args: + q (str): Search query + limit (int | Unset): Maximum results Default: 10. + entity_type (None | str | Unset): Optional entity type filter (e.g. 'agent', + 'knowledge_base') + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SearchApiSearchGetResponseSearchApiSearchGet] + """ + + kwargs = _get_kwargs( + q=q, + limit=limit, + entity_type=entity_type, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + q: str, + limit: int | Unset = 10, + entity_type: None | str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | SearchApiSearchGetResponseSearchApiSearchGet | None: + """Search resources + + Search across all resource types in your account. Accepts a free-text keyword query or a UUID. + UUIDs are matched exactly; keywords are matched by name and description (case-insensitive + substring). Results are ranked: name-prefix > name-substring > description-substring. Searchable + types: agent, knowledge_base, source_connection, solution, memory_bank, alert, api_key, + governance_policy. + + Args: + q (str): Search query + limit (int | Unset): Maximum results Default: 10. + entity_type (None | str | Unset): Optional entity type filter (e.g. 'agent', + 'knowledge_base') + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SearchApiSearchGetResponseSearchApiSearchGet + """ + + return sync_detailed( + client=client, + q=q, + limit=limit, + entity_type=entity_type, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + q: str, + limit: int | Unset = 10, + entity_type: None | str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | SearchApiSearchGetResponseSearchApiSearchGet]: + """Search resources + + Search across all resource types in your account. Accepts a free-text keyword query or a UUID. + UUIDs are matched exactly; keywords are matched by name and description (case-insensitive + substring). Results are ranked: name-prefix > name-substring > description-substring. Searchable + types: agent, knowledge_base, source_connection, solution, memory_bank, alert, api_key, + governance_policy. + + Args: + q (str): Search query + limit (int | Unset): Maximum results Default: 10. + entity_type (None | str | Unset): Optional entity type filter (e.g. 'agent', + 'knowledge_base') + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SearchApiSearchGetResponseSearchApiSearchGet] + """ + + kwargs = _get_kwargs( + q=q, + limit=limit, + entity_type=entity_type, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + q: str, + limit: int | Unset = 10, + entity_type: None | str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | SearchApiSearchGetResponseSearchApiSearchGet | None: + """Search resources + + Search across all resource types in your account. Accepts a free-text keyword query or a UUID. + UUIDs are matched exactly; keywords are matched by name and description (case-insensitive + substring). Results are ranked: name-prefix > name-substring > description-substring. Searchable + types: agent, knowledge_base, source_connection, solution, memory_bank, alert, api_key, + governance_policy. + + Args: + q (str): Search query + limit (int | Unset): Maximum results Default: 10. + entity_type (None | str | Unset): Optional entity type filter (e.g. 'agent', + 'knowledge_base') + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SearchApiSearchGetResponseSearchApiSearchGet + """ + + return ( + await asyncio_detailed( + client=client, + q=q, + limit=limit, + entity_type=entity_type, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/solutions/__init__.py b/seclai/_generated/api/solutions/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/seclai/_generated/api/solutions/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/seclai/_generated/api/solutions/add_conversation_turn_api_solutions_solution_id_conversations_post.py b/seclai/_generated/api/solutions/add_conversation_turn_api_solutions_solution_id_conversations_post.py new file mode 100644 index 0000000..7a199d9 --- /dev/null +++ b/seclai/_generated/api/solutions/add_conversation_turn_api_solutions_solution_id_conversations_post.py @@ -0,0 +1,218 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.add_conversation_turn_request import AddConversationTurnRequest +from ...models.http_validation_error import HTTPValidationError +from ...models.solution_conversation_response import SolutionConversationResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + solution_id: UUID, + *, + body: AddConversationTurnRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/solutions/{solution_id}/conversations".format( + solution_id=quote(str(solution_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> HTTPValidationError | SolutionConversationResponse | None: + if response.status_code == 201: + response_201 = SolutionConversationResponse.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[HTTPValidationError | SolutionConversationResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + body: AddConversationTurnRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | SolutionConversationResponse]: + """Add conversation turn + + Add a conversation turn to a solution's AI assistant history. + + Records a user input and optional AI response and actions taken. This is typically called internally + by AI assistant endpoints, but can also be used to manually log interactions. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + body (AddConversationTurnRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SolutionConversationResponse] + """ + + kwargs = _get_kwargs( + solution_id=solution_id, + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + body: AddConversationTurnRequest, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | SolutionConversationResponse | None: + """Add conversation turn + + Add a conversation turn to a solution's AI assistant history. + + Records a user input and optional AI response and actions taken. This is typically called internally + by AI assistant endpoints, but can also be used to manually log interactions. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + body (AddConversationTurnRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SolutionConversationResponse + """ + + return sync_detailed( + solution_id=solution_id, + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + body: AddConversationTurnRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | SolutionConversationResponse]: + """Add conversation turn + + Add a conversation turn to a solution's AI assistant history. + + Records a user input and optional AI response and actions taken. This is typically called internally + by AI assistant endpoints, but can also be used to manually log interactions. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + body (AddConversationTurnRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SolutionConversationResponse] + """ + + kwargs = _get_kwargs( + solution_id=solution_id, + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + body: AddConversationTurnRequest, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | SolutionConversationResponse | None: + """Add conversation turn + + Add a conversation turn to a solution's AI assistant history. + + Records a user input and optional AI response and actions taken. This is typically called internally + by AI assistant endpoints, but can also be used to manually log interactions. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + body (AddConversationTurnRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SolutionConversationResponse + """ + + return ( + await asyncio_detailed( + solution_id=solution_id, + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/solutions/ai_assistant_accept_api_solutions_solution_id_ai_assistant_conversation_id_accept_post.py b/seclai/_generated/api/solutions/ai_assistant_accept_api_solutions_solution_id_ai_assistant_conversation_id_accept_post.py new file mode 100644 index 0000000..a363a40 --- /dev/null +++ b/seclai/_generated/api/solutions/ai_assistant_accept_api_solutions_solution_id_ai_assistant_conversation_id_accept_post.py @@ -0,0 +1,236 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.ai_assistant_accept_request import AiAssistantAcceptRequest +from ...models.ai_assistant_accept_response import AiAssistantAcceptResponse +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + solution_id: UUID, + conversation_id: UUID, + *, + body: AiAssistantAcceptRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/solutions/{solution_id}/ai-assistant/{conversation_id}/accept".format( + solution_id=quote(str(solution_id), safe=""), + conversation_id=quote(str(conversation_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AiAssistantAcceptResponse | HTTPValidationError | None: + if response.status_code == 200: + response_200 = AiAssistantAcceptResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AiAssistantAcceptResponse | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + solution_id: UUID, + conversation_id: UUID, + *, + client: AuthenticatedClient | Client, + body: AiAssistantAcceptRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[AiAssistantAcceptResponse | HTTPValidationError]: + """Accept plan + + Accept and execute a proposed plan generated by one of the AI assistant endpoints. + + Executes all proposed actions in the plan and returns the results of each action. If the plan + contains destructive actions (e.g. deletions), you must set `confirm_deletions` to `true` in the + request body. Returns a summary of executed actions with success/failure status. + + Args: + solution_id (UUID): + conversation_id (UUID): + x_account_id (UUID | Unset): + body (AiAssistantAcceptRequest): Request body for accepting a proposed plan. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AiAssistantAcceptResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + solution_id=solution_id, + conversation_id=conversation_id, + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + solution_id: UUID, + conversation_id: UUID, + *, + client: AuthenticatedClient | Client, + body: AiAssistantAcceptRequest, + x_account_id: UUID | Unset = UNSET, +) -> AiAssistantAcceptResponse | HTTPValidationError | None: + """Accept plan + + Accept and execute a proposed plan generated by one of the AI assistant endpoints. + + Executes all proposed actions in the plan and returns the results of each action. If the plan + contains destructive actions (e.g. deletions), you must set `confirm_deletions` to `true` in the + request body. Returns a summary of executed actions with success/failure status. + + Args: + solution_id (UUID): + conversation_id (UUID): + x_account_id (UUID | Unset): + body (AiAssistantAcceptRequest): Request body for accepting a proposed plan. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AiAssistantAcceptResponse | HTTPValidationError + """ + + return sync_detailed( + solution_id=solution_id, + conversation_id=conversation_id, + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + solution_id: UUID, + conversation_id: UUID, + *, + client: AuthenticatedClient | Client, + body: AiAssistantAcceptRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[AiAssistantAcceptResponse | HTTPValidationError]: + """Accept plan + + Accept and execute a proposed plan generated by one of the AI assistant endpoints. + + Executes all proposed actions in the plan and returns the results of each action. If the plan + contains destructive actions (e.g. deletions), you must set `confirm_deletions` to `true` in the + request body. Returns a summary of executed actions with success/failure status. + + Args: + solution_id (UUID): + conversation_id (UUID): + x_account_id (UUID | Unset): + body (AiAssistantAcceptRequest): Request body for accepting a proposed plan. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AiAssistantAcceptResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + solution_id=solution_id, + conversation_id=conversation_id, + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + solution_id: UUID, + conversation_id: UUID, + *, + client: AuthenticatedClient | Client, + body: AiAssistantAcceptRequest, + x_account_id: UUID | Unset = UNSET, +) -> AiAssistantAcceptResponse | HTTPValidationError | None: + """Accept plan + + Accept and execute a proposed plan generated by one of the AI assistant endpoints. + + Executes all proposed actions in the plan and returns the results of each action. If the plan + contains destructive actions (e.g. deletions), you must set `confirm_deletions` to `true` in the + request body. Returns a summary of executed actions with success/failure status. + + Args: + solution_id (UUID): + conversation_id (UUID): + x_account_id (UUID | Unset): + body (AiAssistantAcceptRequest): Request body for accepting a proposed plan. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AiAssistantAcceptResponse | HTTPValidationError + """ + + return ( + await asyncio_detailed( + solution_id=solution_id, + conversation_id=conversation_id, + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/solutions/ai_assistant_decline_api_solutions_solution_id_ai_assistant_conversation_id_decline_post.py b/seclai/_generated/api/solutions/ai_assistant_decline_api_solutions_solution_id_ai_assistant_conversation_id_decline_post.py new file mode 100644 index 0000000..2f0824a --- /dev/null +++ b/seclai/_generated/api/solutions/ai_assistant_decline_api_solutions_solution_id_ai_assistant_conversation_id_decline_post.py @@ -0,0 +1,212 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + solution_id: UUID, + conversation_id: UUID, + *, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/solutions/{solution_id}/ai-assistant/{conversation_id}/decline".format( + solution_id=quote(str(solution_id), safe=""), + conversation_id=quote(str(conversation_id), safe=""), + ), + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | HTTPValidationError | None: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + solution_id: UUID, + conversation_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any | HTTPValidationError]: + """Decline plan + + Decline a proposed plan generated by one of the AI assistant endpoints. + + Marks the conversation as declined without executing any actions. The conversation history is + preserved for reference. You can generate a new plan afterwards if needed. + + Args: + solution_id (UUID): + conversation_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + solution_id=solution_id, + conversation_id=conversation_id, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + solution_id: UUID, + conversation_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Any | HTTPValidationError | None: + """Decline plan + + Decline a proposed plan generated by one of the AI assistant endpoints. + + Marks the conversation as declined without executing any actions. The conversation history is + preserved for reference. You can generate a new plan afterwards if needed. + + Args: + solution_id (UUID): + conversation_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return sync_detailed( + solution_id=solution_id, + conversation_id=conversation_id, + client=client, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + solution_id: UUID, + conversation_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any | HTTPValidationError]: + """Decline plan + + Decline a proposed plan generated by one of the AI assistant endpoints. + + Marks the conversation as declined without executing any actions. The conversation history is + preserved for reference. You can generate a new plan afterwards if needed. + + Args: + solution_id (UUID): + conversation_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + solution_id=solution_id, + conversation_id=conversation_id, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + solution_id: UUID, + conversation_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Any | HTTPValidationError | None: + """Decline plan + + Decline a proposed plan generated by one of the AI assistant endpoints. + + Marks the conversation as declined without executing any actions. The conversation history is + preserved for reference. You can generate a new plan afterwards if needed. + + Args: + solution_id (UUID): + conversation_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return ( + await asyncio_detailed( + solution_id=solution_id, + conversation_id=conversation_id, + client=client, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/solutions/ai_assistant_generate_api_solutions_solution_id_ai_assistant_generate_post.py b/seclai/_generated/api/solutions/ai_assistant_generate_api_solutions_solution_id_ai_assistant_generate_post.py new file mode 100644 index 0000000..a62bd04 --- /dev/null +++ b/seclai/_generated/api/solutions/ai_assistant_generate_api_solutions_solution_id_ai_assistant_generate_post.py @@ -0,0 +1,230 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.ai_assistant_generate_request import AiAssistantGenerateRequest +from ...models.ai_assistant_generate_response import AiAssistantGenerateResponse +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + solution_id: UUID, + *, + body: AiAssistantGenerateRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/solutions/{solution_id}/ai-assistant/generate".format( + solution_id=quote(str(solution_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AiAssistantGenerateResponse | HTTPValidationError | None: + if response.status_code == 200: + response_200 = AiAssistantGenerateResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AiAssistantGenerateResponse | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + body: AiAssistantGenerateRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[AiAssistantGenerateResponse | HTTPValidationError]: + """Generate solution plan + + Generate a comprehensive solution management plan via the solution AI assistant. + + This is the most powerful assistant — it can propose changes across sources, knowledge bases, and + agents. Describe your goal in natural language and the assistant will create a multi-step plan. + Review the proposed actions and use the accept or decline endpoint. + + Supports SSE streaming when `Accept: text/event-stream` is set. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AiAssistantGenerateResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + solution_id=solution_id, + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + body: AiAssistantGenerateRequest, + x_account_id: UUID | Unset = UNSET, +) -> AiAssistantGenerateResponse | HTTPValidationError | None: + """Generate solution plan + + Generate a comprehensive solution management plan via the solution AI assistant. + + This is the most powerful assistant — it can propose changes across sources, knowledge bases, and + agents. Describe your goal in natural language and the assistant will create a multi-step plan. + Review the proposed actions and use the accept or decline endpoint. + + Supports SSE streaming when `Accept: text/event-stream` is set. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AiAssistantGenerateResponse | HTTPValidationError + """ + + return sync_detailed( + solution_id=solution_id, + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + body: AiAssistantGenerateRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[AiAssistantGenerateResponse | HTTPValidationError]: + """Generate solution plan + + Generate a comprehensive solution management plan via the solution AI assistant. + + This is the most powerful assistant — it can propose changes across sources, knowledge bases, and + agents. Describe your goal in natural language and the assistant will create a multi-step plan. + Review the proposed actions and use the accept or decline endpoint. + + Supports SSE streaming when `Accept: text/event-stream` is set. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AiAssistantGenerateResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + solution_id=solution_id, + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + body: AiAssistantGenerateRequest, + x_account_id: UUID | Unset = UNSET, +) -> AiAssistantGenerateResponse | HTTPValidationError | None: + """Generate solution plan + + Generate a comprehensive solution management plan via the solution AI assistant. + + This is the most powerful assistant — it can propose changes across sources, knowledge bases, and + agents. Describe your goal in natural language and the assistant will create a multi-step plan. + Review the proposed actions and use the accept or decline endpoint. + + Supports SSE streaming when `Accept: text/event-stream` is set. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AiAssistantGenerateResponse | HTTPValidationError + """ + + return ( + await asyncio_detailed( + solution_id=solution_id, + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/solutions/ai_assistant_knowledge_base_api_solutions_solution_id_ai_assistant_knowledge_base_post.py b/seclai/_generated/api/solutions/ai_assistant_knowledge_base_api_solutions_solution_id_ai_assistant_knowledge_base_post.py new file mode 100644 index 0000000..3025e81 --- /dev/null +++ b/seclai/_generated/api/solutions/ai_assistant_knowledge_base_api_solutions_solution_id_ai_assistant_knowledge_base_post.py @@ -0,0 +1,222 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.ai_assistant_generate_request import AiAssistantGenerateRequest +from ...models.ai_assistant_generate_response import AiAssistantGenerateResponse +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + solution_id: UUID, + *, + body: AiAssistantGenerateRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/solutions/{solution_id}/ai-assistant/knowledge-base".format( + solution_id=quote(str(solution_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AiAssistantGenerateResponse | HTTPValidationError | None: + if response.status_code == 200: + response_200 = AiAssistantGenerateResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AiAssistantGenerateResponse | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + body: AiAssistantGenerateRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[AiAssistantGenerateResponse | HTTPValidationError]: + """Generate knowledge base plan + + Generate a knowledge base plan via the KB AI assistant. + + Describe what knowledge bases you need in natural language and the assistant will propose a plan + with create, update, or delete actions. The assistant may also propose creating new sources if + needed. Review the proposed actions and use the accept or decline endpoint. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AiAssistantGenerateResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + solution_id=solution_id, + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + body: AiAssistantGenerateRequest, + x_account_id: UUID | Unset = UNSET, +) -> AiAssistantGenerateResponse | HTTPValidationError | None: + """Generate knowledge base plan + + Generate a knowledge base plan via the KB AI assistant. + + Describe what knowledge bases you need in natural language and the assistant will propose a plan + with create, update, or delete actions. The assistant may also propose creating new sources if + needed. Review the proposed actions and use the accept or decline endpoint. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AiAssistantGenerateResponse | HTTPValidationError + """ + + return sync_detailed( + solution_id=solution_id, + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + body: AiAssistantGenerateRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[AiAssistantGenerateResponse | HTTPValidationError]: + """Generate knowledge base plan + + Generate a knowledge base plan via the KB AI assistant. + + Describe what knowledge bases you need in natural language and the assistant will propose a plan + with create, update, or delete actions. The assistant may also propose creating new sources if + needed. Review the proposed actions and use the accept or decline endpoint. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AiAssistantGenerateResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + solution_id=solution_id, + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + body: AiAssistantGenerateRequest, + x_account_id: UUID | Unset = UNSET, +) -> AiAssistantGenerateResponse | HTTPValidationError | None: + """Generate knowledge base plan + + Generate a knowledge base plan via the KB AI assistant. + + Describe what knowledge bases you need in natural language and the assistant will propose a plan + with create, update, or delete actions. The assistant may also propose creating new sources if + needed. Review the proposed actions and use the accept or decline endpoint. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AiAssistantGenerateResponse | HTTPValidationError + """ + + return ( + await asyncio_detailed( + solution_id=solution_id, + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/solutions/ai_assistant_source_api_solutions_solution_id_ai_assistant_source_post.py b/seclai/_generated/api/solutions/ai_assistant_source_api_solutions_solution_id_ai_assistant_source_post.py new file mode 100644 index 0000000..44a632d --- /dev/null +++ b/seclai/_generated/api/solutions/ai_assistant_source_api_solutions_solution_id_ai_assistant_source_post.py @@ -0,0 +1,222 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.ai_assistant_generate_request import AiAssistantGenerateRequest +from ...models.ai_assistant_generate_response import AiAssistantGenerateResponse +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + solution_id: UUID, + *, + body: AiAssistantGenerateRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/solutions/{solution_id}/ai-assistant/source".format( + solution_id=quote(str(solution_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AiAssistantGenerateResponse | HTTPValidationError | None: + if response.status_code == 200: + response_200 = AiAssistantGenerateResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AiAssistantGenerateResponse | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + body: AiAssistantGenerateRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[AiAssistantGenerateResponse | HTTPValidationError]: + """Generate source plan + + Generate a content source plan via the source AI assistant. + + Describe what sources you need in natural language and the assistant will propose a plan with + create, update, or delete actions. Review the proposed actions and use the accept or decline + endpoint to execute or discard the plan. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AiAssistantGenerateResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + solution_id=solution_id, + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + body: AiAssistantGenerateRequest, + x_account_id: UUID | Unset = UNSET, +) -> AiAssistantGenerateResponse | HTTPValidationError | None: + """Generate source plan + + Generate a content source plan via the source AI assistant. + + Describe what sources you need in natural language and the assistant will propose a plan with + create, update, or delete actions. Review the proposed actions and use the accept or decline + endpoint to execute or discard the plan. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AiAssistantGenerateResponse | HTTPValidationError + """ + + return sync_detailed( + solution_id=solution_id, + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + body: AiAssistantGenerateRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[AiAssistantGenerateResponse | HTTPValidationError]: + """Generate source plan + + Generate a content source plan via the source AI assistant. + + Describe what sources you need in natural language and the assistant will propose a plan with + create, update, or delete actions. Review the proposed actions and use the accept or decline + endpoint to execute or discard the plan. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AiAssistantGenerateResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + solution_id=solution_id, + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + body: AiAssistantGenerateRequest, + x_account_id: UUID | Unset = UNSET, +) -> AiAssistantGenerateResponse | HTTPValidationError | None: + """Generate source plan + + Generate a content source plan via the source AI assistant. + + Describe what sources you need in natural language and the assistant will propose a plan with + create, update, or delete actions. Review the proposed actions and use the accept or decline + endpoint to execute or discard the plan. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AiAssistantGenerateResponse | HTTPValidationError + """ + + return ( + await asyncio_detailed( + solution_id=solution_id, + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/solutions/create_solution_api_solutions_post.py b/seclai/_generated/api/solutions/create_solution_api_solutions_post.py new file mode 100644 index 0000000..9eb0fd1 --- /dev/null +++ b/seclai/_generated/api/solutions/create_solution_api_solutions_post.py @@ -0,0 +1,202 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.create_solution_request import CreateSolutionRequest +from ...models.http_validation_error import HTTPValidationError +from ...models.solution_response import SolutionResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + body: CreateSolutionRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/solutions", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> HTTPValidationError | SolutionResponse | None: + if response.status_code == 201: + response_201 = SolutionResponse.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[HTTPValidationError | SolutionResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: CreateSolutionRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | SolutionResponse]: + """Create a solution + + Create a new solution for the caller's account. + + A *solution* groups agents, knowledge bases, and content sources into a cohesive unit. Provide a + `name` and optional `description` in the request body. + + Args: + x_account_id (UUID | Unset): + body (CreateSolutionRequest): Request model for creating a new solution + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SolutionResponse] + """ + + kwargs = _get_kwargs( + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: CreateSolutionRequest, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | SolutionResponse | None: + """Create a solution + + Create a new solution for the caller's account. + + A *solution* groups agents, knowledge bases, and content sources into a cohesive unit. Provide a + `name` and optional `description` in the request body. + + Args: + x_account_id (UUID | Unset): + body (CreateSolutionRequest): Request model for creating a new solution + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SolutionResponse + """ + + return sync_detailed( + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: CreateSolutionRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | SolutionResponse]: + """Create a solution + + Create a new solution for the caller's account. + + A *solution* groups agents, knowledge bases, and content sources into a cohesive unit. Provide a + `name` and optional `description` in the request body. + + Args: + x_account_id (UUID | Unset): + body (CreateSolutionRequest): Request model for creating a new solution + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SolutionResponse] + """ + + kwargs = _get_kwargs( + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: CreateSolutionRequest, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | SolutionResponse | None: + """Create a solution + + Create a new solution for the caller's account. + + A *solution* groups agents, knowledge bases, and content sources into a cohesive unit. Provide a + `name` and optional `description` in the request body. + + Args: + x_account_id (UUID | Unset): + body (CreateSolutionRequest): Request model for creating a new solution + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SolutionResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/solutions/delete_solution_api_solutions_solution_id_delete.py b/seclai/_generated/api/solutions/delete_solution_api_solutions_solution_id_delete.py new file mode 100644 index 0000000..8c5dd1e --- /dev/null +++ b/seclai/_generated/api/solutions/delete_solution_api_solutions_solution_id_delete.py @@ -0,0 +1,198 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + solution_id: UUID, + *, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/solutions/{solution_id}".format( + solution_id=quote(str(solution_id), safe=""), + ), + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | HTTPValidationError | None: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any | HTTPValidationError]: + """Delete a solution + + Delete a solution by its ID. + + This permanently removes the solution and all its resource associations (agent links, knowledge base + links, source connection links). The underlying resources themselves are not deleted. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + solution_id=solution_id, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Any | HTTPValidationError | None: + """Delete a solution + + Delete a solution by its ID. + + This permanently removes the solution and all its resource associations (agent links, knowledge base + links, source connection links). The underlying resources themselves are not deleted. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return sync_detailed( + solution_id=solution_id, + client=client, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any | HTTPValidationError]: + """Delete a solution + + Delete a solution by its ID. + + This permanently removes the solution and all its resource associations (agent links, knowledge base + links, source connection links). The underlying resources themselves are not deleted. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + solution_id=solution_id, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Any | HTTPValidationError | None: + """Delete a solution + + Delete a solution by its ID. + + This permanently removes the solution and all its resource associations (agent links, knowledge base + links, source connection links). The underlying resources themselves are not deleted. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return ( + await asyncio_detailed( + solution_id=solution_id, + client=client, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/solutions/get_solution_api_solutions_solution_id_get.py b/seclai/_generated/api/solutions/get_solution_api_solutions_solution_id_get.py new file mode 100644 index 0000000..1005901 --- /dev/null +++ b/seclai/_generated/api/solutions/get_solution_api_solutions_solution_id_get.py @@ -0,0 +1,196 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.solution_response import SolutionResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + solution_id: UUID, + *, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/solutions/{solution_id}".format( + solution_id=quote(str(solution_id), safe=""), + ), + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> HTTPValidationError | SolutionResponse | None: + if response.status_code == 200: + response_200 = SolutionResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[HTTPValidationError | SolutionResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | SolutionResponse]: + """Get a solution + + Retrieve a solution by its ID, including all linked agents, knowledge bases, and source connections. + + Returns the full solution detail with nested resource information. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SolutionResponse] + """ + + kwargs = _get_kwargs( + solution_id=solution_id, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | SolutionResponse | None: + """Get a solution + + Retrieve a solution by its ID, including all linked agents, knowledge bases, and source connections. + + Returns the full solution detail with nested resource information. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SolutionResponse + """ + + return sync_detailed( + solution_id=solution_id, + client=client, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | SolutionResponse]: + """Get a solution + + Retrieve a solution by its ID, including all linked agents, knowledge bases, and source connections. + + Returns the full solution detail with nested resource information. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SolutionResponse] + """ + + kwargs = _get_kwargs( + solution_id=solution_id, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | SolutionResponse | None: + """Get a solution + + Retrieve a solution by its ID, including all linked agents, knowledge bases, and source connections. + + Returns the full solution detail with nested resource information. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SolutionResponse + """ + + return ( + await asyncio_detailed( + solution_id=solution_id, + client=client, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/solutions/link_agents_api_solutions_solution_id_agents_post.py b/seclai/_generated/api/solutions/link_agents_api_solutions_solution_id_agents_post.py new file mode 100644 index 0000000..01519c7 --- /dev/null +++ b/seclai/_generated/api/solutions/link_agents_api_solutions_solution_id_agents_post.py @@ -0,0 +1,218 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.link_resources_request import LinkResourcesRequest +from ...models.solution_response import SolutionResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + solution_id: UUID, + *, + body: LinkResourcesRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/solutions/{solution_id}/agents".format( + solution_id=quote(str(solution_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> HTTPValidationError | SolutionResponse | None: + if response.status_code == 200: + response_200 = SolutionResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[HTTPValidationError | SolutionResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + body: LinkResourcesRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | SolutionResponse]: + """Link agents + + Link one or more agents to a solution by their IDs. + + Pass a JSON body with an `ids` array of agent UUIDs. Already-linked agents are silently ignored. + Returns the updated solution with all linked resources. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + body (LinkResourcesRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SolutionResponse] + """ + + kwargs = _get_kwargs( + solution_id=solution_id, + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + body: LinkResourcesRequest, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | SolutionResponse | None: + """Link agents + + Link one or more agents to a solution by their IDs. + + Pass a JSON body with an `ids` array of agent UUIDs. Already-linked agents are silently ignored. + Returns the updated solution with all linked resources. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + body (LinkResourcesRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SolutionResponse + """ + + return sync_detailed( + solution_id=solution_id, + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + body: LinkResourcesRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | SolutionResponse]: + """Link agents + + Link one or more agents to a solution by their IDs. + + Pass a JSON body with an `ids` array of agent UUIDs. Already-linked agents are silently ignored. + Returns the updated solution with all linked resources. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + body (LinkResourcesRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SolutionResponse] + """ + + kwargs = _get_kwargs( + solution_id=solution_id, + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + body: LinkResourcesRequest, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | SolutionResponse | None: + """Link agents + + Link one or more agents to a solution by their IDs. + + Pass a JSON body with an `ids` array of agent UUIDs. Already-linked agents are silently ignored. + Returns the updated solution with all linked resources. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + body (LinkResourcesRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SolutionResponse + """ + + return ( + await asyncio_detailed( + solution_id=solution_id, + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/solutions/link_knowledge_bases_api_solutions_solution_id_knowledge_bases_post.py b/seclai/_generated/api/solutions/link_knowledge_bases_api_solutions_solution_id_knowledge_bases_post.py new file mode 100644 index 0000000..2368faa --- /dev/null +++ b/seclai/_generated/api/solutions/link_knowledge_bases_api_solutions_solution_id_knowledge_bases_post.py @@ -0,0 +1,218 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.link_resources_request import LinkResourcesRequest +from ...models.solution_response import SolutionResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + solution_id: UUID, + *, + body: LinkResourcesRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/solutions/{solution_id}/knowledge-bases".format( + solution_id=quote(str(solution_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> HTTPValidationError | SolutionResponse | None: + if response.status_code == 200: + response_200 = SolutionResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[HTTPValidationError | SolutionResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + body: LinkResourcesRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | SolutionResponse]: + """Link knowledge bases + + Link one or more knowledge bases to a solution by their IDs. + + Pass a JSON body with an `ids` array of knowledge base UUIDs. Already-linked knowledge bases are + silently ignored. Returns the updated solution with all linked resources. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + body (LinkResourcesRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SolutionResponse] + """ + + kwargs = _get_kwargs( + solution_id=solution_id, + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + body: LinkResourcesRequest, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | SolutionResponse | None: + """Link knowledge bases + + Link one or more knowledge bases to a solution by their IDs. + + Pass a JSON body with an `ids` array of knowledge base UUIDs. Already-linked knowledge bases are + silently ignored. Returns the updated solution with all linked resources. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + body (LinkResourcesRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SolutionResponse + """ + + return sync_detailed( + solution_id=solution_id, + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + body: LinkResourcesRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | SolutionResponse]: + """Link knowledge bases + + Link one or more knowledge bases to a solution by their IDs. + + Pass a JSON body with an `ids` array of knowledge base UUIDs. Already-linked knowledge bases are + silently ignored. Returns the updated solution with all linked resources. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + body (LinkResourcesRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SolutionResponse] + """ + + kwargs = _get_kwargs( + solution_id=solution_id, + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + body: LinkResourcesRequest, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | SolutionResponse | None: + """Link knowledge bases + + Link one or more knowledge bases to a solution by their IDs. + + Pass a JSON body with an `ids` array of knowledge base UUIDs. Already-linked knowledge bases are + silently ignored. Returns the updated solution with all linked resources. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + body (LinkResourcesRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SolutionResponse + """ + + return ( + await asyncio_detailed( + solution_id=solution_id, + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/solutions/link_source_connections_api_solutions_solution_id_source_connections_post.py b/seclai/_generated/api/solutions/link_source_connections_api_solutions_solution_id_source_connections_post.py new file mode 100644 index 0000000..7ca44ac --- /dev/null +++ b/seclai/_generated/api/solutions/link_source_connections_api_solutions_solution_id_source_connections_post.py @@ -0,0 +1,218 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.link_resources_request import LinkResourcesRequest +from ...models.solution_response import SolutionResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + solution_id: UUID, + *, + body: LinkResourcesRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/solutions/{solution_id}/source-connections".format( + solution_id=quote(str(solution_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> HTTPValidationError | SolutionResponse | None: + if response.status_code == 200: + response_200 = SolutionResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[HTTPValidationError | SolutionResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + body: LinkResourcesRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | SolutionResponse]: + """Link source connections + + Link one or more source connections to a solution by their IDs. + + Pass a JSON body with an `ids` array of source connection UUIDs. Already-linked sources are silently + ignored. Returns the updated solution with all linked resources. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + body (LinkResourcesRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SolutionResponse] + """ + + kwargs = _get_kwargs( + solution_id=solution_id, + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + body: LinkResourcesRequest, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | SolutionResponse | None: + """Link source connections + + Link one or more source connections to a solution by their IDs. + + Pass a JSON body with an `ids` array of source connection UUIDs. Already-linked sources are silently + ignored. Returns the updated solution with all linked resources. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + body (LinkResourcesRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SolutionResponse + """ + + return sync_detailed( + solution_id=solution_id, + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + body: LinkResourcesRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | SolutionResponse]: + """Link source connections + + Link one or more source connections to a solution by their IDs. + + Pass a JSON body with an `ids` array of source connection UUIDs. Already-linked sources are silently + ignored. Returns the updated solution with all linked resources. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + body (LinkResourcesRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SolutionResponse] + """ + + kwargs = _get_kwargs( + solution_id=solution_id, + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + body: LinkResourcesRequest, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | SolutionResponse | None: + """Link source connections + + Link one or more source connections to a solution by their IDs. + + Pass a JSON body with an `ids` array of source connection UUIDs. Already-linked sources are silently + ignored. Returns the updated solution with all linked resources. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + body (LinkResourcesRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SolutionResponse + """ + + return ( + await asyncio_detailed( + solution_id=solution_id, + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/solutions/list_conversations_api_solutions_solution_id_conversations_get.py b/seclai/_generated/api/solutions/list_conversations_api_solutions_solution_id_conversations_get.py new file mode 100644 index 0000000..b81c1ed --- /dev/null +++ b/seclai/_generated/api/solutions/list_conversations_api_solutions_solution_id_conversations_get.py @@ -0,0 +1,207 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.solution_conversation_response import SolutionConversationResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + solution_id: UUID, + *, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/solutions/{solution_id}/conversations".format( + solution_id=quote(str(solution_id), safe=""), + ), + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> HTTPValidationError | list[SolutionConversationResponse] | None: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = SolutionConversationResponse.from_dict( + response_200_item_data + ) + + response_200.append(response_200_item) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[HTTPValidationError | list[SolutionConversationResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | list[SolutionConversationResponse]]: + """List conversations + + List AI assistant conversation history for a solution. + + Returns all conversation turns for the given solution, including user inputs, AI responses, proposed + actions, and acceptance status. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | list[SolutionConversationResponse]] + """ + + kwargs = _get_kwargs( + solution_id=solution_id, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | list[SolutionConversationResponse] | None: + """List conversations + + List AI assistant conversation history for a solution. + + Returns all conversation turns for the given solution, including user inputs, AI responses, proposed + actions, and acceptance status. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | list[SolutionConversationResponse] + """ + + return sync_detailed( + solution_id=solution_id, + client=client, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | list[SolutionConversationResponse]]: + """List conversations + + List AI assistant conversation history for a solution. + + Returns all conversation turns for the given solution, including user inputs, AI responses, proposed + actions, and acceptance status. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | list[SolutionConversationResponse]] + """ + + kwargs = _get_kwargs( + solution_id=solution_id, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | list[SolutionConversationResponse] | None: + """List conversations + + List AI assistant conversation history for a solution. + + Returns all conversation turns for the given solution, including user inputs, AI responses, proposed + actions, and acceptance status. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | list[SolutionConversationResponse] + """ + + return ( + await asyncio_detailed( + solution_id=solution_id, + client=client, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/solutions/list_solutions_api_solutions_get.py b/seclai/_generated/api/solutions/list_solutions_api_solutions_get.py new file mode 100644 index 0000000..aca83ce --- /dev/null +++ b/seclai/_generated/api/solutions/list_solutions_api_solutions_get.py @@ -0,0 +1,301 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.solution_list_response import SolutionListResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: int | Unset = 1, + limit: int | Unset = 20, + sort: str | Unset = "created_at", + order: str | Unset = "desc", + search: None | str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params["sort"] = sort + + params["order"] = order + + json_search: None | str | Unset + if isinstance(search, Unset): + json_search = UNSET + else: + json_search = search + params["search"] = json_search + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/solutions", + "params": params, + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> HTTPValidationError | SolutionListResponse | None: + if response.status_code == 200: + response_200 = SolutionListResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[HTTPValidationError | SolutionListResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = 1, + limit: int | Unset = 20, + sort: str | Unset = "created_at", + order: str | Unset = "desc", + search: None | str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | SolutionListResponse]: + """List solutions + + List solutions for your account. + + A *solution* groups agents, knowledge bases, and content sources into a cohesive unit. Use solutions + to organise related resources and leverage AI assistants for automated setup. + + Parameters: + - Pagination: `page` and `limit`. + - Sorting: `sort` (created_at/updated_at/name) and `order` (asc/desc). + - Filtering: `search` to filter by solution name (case-insensitive partial match). + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. Results are scoped to the caller's account. + + Args: + page (int | Unset): Page number Default: 1. + limit (int | Unset): Items per page Default: 20. + sort (str | Unset): Sort field Default: 'created_at'. + order (str | Unset): Sort order Default: 'desc'. + search (None | str | Unset): Filter by solution name (case-insensitive partial match) + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SolutionListResponse] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + sort=sort, + order=order, + search=search, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + page: int | Unset = 1, + limit: int | Unset = 20, + sort: str | Unset = "created_at", + order: str | Unset = "desc", + search: None | str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | SolutionListResponse | None: + """List solutions + + List solutions for your account. + + A *solution* groups agents, knowledge bases, and content sources into a cohesive unit. Use solutions + to organise related resources and leverage AI assistants for automated setup. + + Parameters: + - Pagination: `page` and `limit`. + - Sorting: `sort` (created_at/updated_at/name) and `order` (asc/desc). + - Filtering: `search` to filter by solution name (case-insensitive partial match). + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. Results are scoped to the caller's account. + + Args: + page (int | Unset): Page number Default: 1. + limit (int | Unset): Items per page Default: 20. + sort (str | Unset): Sort field Default: 'created_at'. + order (str | Unset): Sort order Default: 'desc'. + search (None | str | Unset): Filter by solution name (case-insensitive partial match) + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SolutionListResponse + """ + + return sync_detailed( + client=client, + page=page, + limit=limit, + sort=sort, + order=order, + search=search, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = 1, + limit: int | Unset = 20, + sort: str | Unset = "created_at", + order: str | Unset = "desc", + search: None | str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | SolutionListResponse]: + """List solutions + + List solutions for your account. + + A *solution* groups agents, knowledge bases, and content sources into a cohesive unit. Use solutions + to organise related resources and leverage AI assistants for automated setup. + + Parameters: + - Pagination: `page` and `limit`. + - Sorting: `sort` (created_at/updated_at/name) and `order` (asc/desc). + - Filtering: `search` to filter by solution name (case-insensitive partial match). + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. Results are scoped to the caller's account. + + Args: + page (int | Unset): Page number Default: 1. + limit (int | Unset): Items per page Default: 20. + sort (str | Unset): Sort field Default: 'created_at'. + order (str | Unset): Sort order Default: 'desc'. + search (None | str | Unset): Filter by solution name (case-insensitive partial match) + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SolutionListResponse] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + sort=sort, + order=order, + search=search, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + page: int | Unset = 1, + limit: int | Unset = 20, + sort: str | Unset = "created_at", + order: str | Unset = "desc", + search: None | str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | SolutionListResponse | None: + """List solutions + + List solutions for your account. + + A *solution* groups agents, knowledge bases, and content sources into a cohesive unit. Use solutions + to organise related resources and leverage AI assistants for automated setup. + + Parameters: + - Pagination: `page` and `limit`. + - Sorting: `sort` (created_at/updated_at/name) and `order` (asc/desc). + - Filtering: `search` to filter by solution name (case-insensitive partial match). + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. Results are scoped to the caller's account. + + Args: + page (int | Unset): Page number Default: 1. + limit (int | Unset): Items per page Default: 20. + sort (str | Unset): Sort field Default: 'created_at'. + order (str | Unset): Sort order Default: 'desc'. + search (None | str | Unset): Filter by solution name (case-insensitive partial match) + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SolutionListResponse + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + limit=limit, + sort=sort, + order=order, + search=search, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/solutions/mark_conversation_turn_api_solutions_solution_id_conversations_conversation_id_patch.py b/seclai/_generated/api/solutions/mark_conversation_turn_api_solutions_solution_id_conversations_conversation_id_patch.py new file mode 100644 index 0000000..1ea1bd7 --- /dev/null +++ b/seclai/_generated/api/solutions/mark_conversation_turn_api_solutions_solution_id_conversations_conversation_id_patch.py @@ -0,0 +1,230 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.mark_conversation_turn_request import MarkConversationTurnRequest +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + solution_id: UUID, + conversation_id: UUID, + *, + body: MarkConversationTurnRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/solutions/{solution_id}/conversations/{conversation_id}".format( + solution_id=quote(str(solution_id), safe=""), + conversation_id=quote(str(conversation_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | HTTPValidationError | None: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + solution_id: UUID, + conversation_id: UUID, + *, + client: AuthenticatedClient | Client, + body: MarkConversationTurnRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any | HTTPValidationError]: + """Mark conversation turn + + Mark a conversation turn as accepted or declined. + + Updates the `accepted` field on an existing conversation turn. Use this after reviewing a proposed + plan to record whether it was accepted or declined by the user. + + Args: + solution_id (UUID): + conversation_id (UUID): + x_account_id (UUID | Unset): + body (MarkConversationTurnRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + solution_id=solution_id, + conversation_id=conversation_id, + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + solution_id: UUID, + conversation_id: UUID, + *, + client: AuthenticatedClient | Client, + body: MarkConversationTurnRequest, + x_account_id: UUID | Unset = UNSET, +) -> Any | HTTPValidationError | None: + """Mark conversation turn + + Mark a conversation turn as accepted or declined. + + Updates the `accepted` field on an existing conversation turn. Use this after reviewing a proposed + plan to record whether it was accepted or declined by the user. + + Args: + solution_id (UUID): + conversation_id (UUID): + x_account_id (UUID | Unset): + body (MarkConversationTurnRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return sync_detailed( + solution_id=solution_id, + conversation_id=conversation_id, + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + solution_id: UUID, + conversation_id: UUID, + *, + client: AuthenticatedClient | Client, + body: MarkConversationTurnRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any | HTTPValidationError]: + """Mark conversation turn + + Mark a conversation turn as accepted or declined. + + Updates the `accepted` field on an existing conversation turn. Use this after reviewing a proposed + plan to record whether it was accepted or declined by the user. + + Args: + solution_id (UUID): + conversation_id (UUID): + x_account_id (UUID | Unset): + body (MarkConversationTurnRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + solution_id=solution_id, + conversation_id=conversation_id, + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + solution_id: UUID, + conversation_id: UUID, + *, + client: AuthenticatedClient | Client, + body: MarkConversationTurnRequest, + x_account_id: UUID | Unset = UNSET, +) -> Any | HTTPValidationError | None: + """Mark conversation turn + + Mark a conversation turn as accepted or declined. + + Updates the `accepted` field on an existing conversation turn. Use this after reviewing a proposed + plan to record whether it was accepted or declined by the user. + + Args: + solution_id (UUID): + conversation_id (UUID): + x_account_id (UUID | Unset): + body (MarkConversationTurnRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return ( + await asyncio_detailed( + solution_id=solution_id, + conversation_id=conversation_id, + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/solutions/unlink_agents_api_solutions_solution_id_agents_delete.py b/seclai/_generated/api/solutions/unlink_agents_api_solutions_solution_id_agents_delete.py new file mode 100644 index 0000000..7ec31d8 --- /dev/null +++ b/seclai/_generated/api/solutions/unlink_agents_api_solutions_solution_id_agents_delete.py @@ -0,0 +1,218 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.solution_response import SolutionResponse +from ...models.unlink_resources_request import UnlinkResourcesRequest +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + solution_id: UUID, + *, + body: UnlinkResourcesRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/solutions/{solution_id}/agents".format( + solution_id=quote(str(solution_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> HTTPValidationError | SolutionResponse | None: + if response.status_code == 200: + response_200 = SolutionResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[HTTPValidationError | SolutionResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + body: UnlinkResourcesRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | SolutionResponse]: + """Unlink agents + + Unlink one or more agents from a solution by their IDs. + + Pass a JSON body with an `ids` array of agent UUIDs to remove. Agents not currently linked are + silently ignored. Returns the updated solution with remaining linked resources. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + body (UnlinkResourcesRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SolutionResponse] + """ + + kwargs = _get_kwargs( + solution_id=solution_id, + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + body: UnlinkResourcesRequest, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | SolutionResponse | None: + """Unlink agents + + Unlink one or more agents from a solution by their IDs. + + Pass a JSON body with an `ids` array of agent UUIDs to remove. Agents not currently linked are + silently ignored. Returns the updated solution with remaining linked resources. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + body (UnlinkResourcesRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SolutionResponse + """ + + return sync_detailed( + solution_id=solution_id, + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + body: UnlinkResourcesRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | SolutionResponse]: + """Unlink agents + + Unlink one or more agents from a solution by their IDs. + + Pass a JSON body with an `ids` array of agent UUIDs to remove. Agents not currently linked are + silently ignored. Returns the updated solution with remaining linked resources. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + body (UnlinkResourcesRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SolutionResponse] + """ + + kwargs = _get_kwargs( + solution_id=solution_id, + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + body: UnlinkResourcesRequest, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | SolutionResponse | None: + """Unlink agents + + Unlink one or more agents from a solution by their IDs. + + Pass a JSON body with an `ids` array of agent UUIDs to remove. Agents not currently linked are + silently ignored. Returns the updated solution with remaining linked resources. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + body (UnlinkResourcesRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SolutionResponse + """ + + return ( + await asyncio_detailed( + solution_id=solution_id, + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/solutions/unlink_knowledge_bases_api_solutions_solution_id_knowledge_bases_delete.py b/seclai/_generated/api/solutions/unlink_knowledge_bases_api_solutions_solution_id_knowledge_bases_delete.py new file mode 100644 index 0000000..2604ed1 --- /dev/null +++ b/seclai/_generated/api/solutions/unlink_knowledge_bases_api_solutions_solution_id_knowledge_bases_delete.py @@ -0,0 +1,218 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.solution_response import SolutionResponse +from ...models.unlink_resources_request import UnlinkResourcesRequest +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + solution_id: UUID, + *, + body: UnlinkResourcesRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/solutions/{solution_id}/knowledge-bases".format( + solution_id=quote(str(solution_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> HTTPValidationError | SolutionResponse | None: + if response.status_code == 200: + response_200 = SolutionResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[HTTPValidationError | SolutionResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + body: UnlinkResourcesRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | SolutionResponse]: + """Unlink knowledge bases + + Unlink one or more knowledge bases from a solution by their IDs. + + Pass a JSON body with an `ids` array of knowledge base UUIDs to remove. Knowledge bases not + currently linked are silently ignored. Returns the updated solution. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + body (UnlinkResourcesRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SolutionResponse] + """ + + kwargs = _get_kwargs( + solution_id=solution_id, + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + body: UnlinkResourcesRequest, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | SolutionResponse | None: + """Unlink knowledge bases + + Unlink one or more knowledge bases from a solution by their IDs. + + Pass a JSON body with an `ids` array of knowledge base UUIDs to remove. Knowledge bases not + currently linked are silently ignored. Returns the updated solution. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + body (UnlinkResourcesRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SolutionResponse + """ + + return sync_detailed( + solution_id=solution_id, + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + body: UnlinkResourcesRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | SolutionResponse]: + """Unlink knowledge bases + + Unlink one or more knowledge bases from a solution by their IDs. + + Pass a JSON body with an `ids` array of knowledge base UUIDs to remove. Knowledge bases not + currently linked are silently ignored. Returns the updated solution. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + body (UnlinkResourcesRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SolutionResponse] + """ + + kwargs = _get_kwargs( + solution_id=solution_id, + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + body: UnlinkResourcesRequest, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | SolutionResponse | None: + """Unlink knowledge bases + + Unlink one or more knowledge bases from a solution by their IDs. + + Pass a JSON body with an `ids` array of knowledge base UUIDs to remove. Knowledge bases not + currently linked are silently ignored. Returns the updated solution. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + body (UnlinkResourcesRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SolutionResponse + """ + + return ( + await asyncio_detailed( + solution_id=solution_id, + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/solutions/unlink_source_connections_api_solutions_solution_id_source_connections_delete.py b/seclai/_generated/api/solutions/unlink_source_connections_api_solutions_solution_id_source_connections_delete.py new file mode 100644 index 0000000..2f621fb --- /dev/null +++ b/seclai/_generated/api/solutions/unlink_source_connections_api_solutions_solution_id_source_connections_delete.py @@ -0,0 +1,218 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.solution_response import SolutionResponse +from ...models.unlink_resources_request import UnlinkResourcesRequest +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + solution_id: UUID, + *, + body: UnlinkResourcesRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/solutions/{solution_id}/source-connections".format( + solution_id=quote(str(solution_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> HTTPValidationError | SolutionResponse | None: + if response.status_code == 200: + response_200 = SolutionResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[HTTPValidationError | SolutionResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + body: UnlinkResourcesRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | SolutionResponse]: + """Unlink source connections + + Unlink one or more source connections from a solution by their IDs. + + Pass a JSON body with an `ids` array of source connection UUIDs to remove. Sources not currently + linked are silently ignored. Returns the updated solution. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + body (UnlinkResourcesRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SolutionResponse] + """ + + kwargs = _get_kwargs( + solution_id=solution_id, + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + body: UnlinkResourcesRequest, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | SolutionResponse | None: + """Unlink source connections + + Unlink one or more source connections from a solution by their IDs. + + Pass a JSON body with an `ids` array of source connection UUIDs to remove. Sources not currently + linked are silently ignored. Returns the updated solution. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + body (UnlinkResourcesRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SolutionResponse + """ + + return sync_detailed( + solution_id=solution_id, + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + body: UnlinkResourcesRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | SolutionResponse]: + """Unlink source connections + + Unlink one or more source connections from a solution by their IDs. + + Pass a JSON body with an `ids` array of source connection UUIDs to remove. Sources not currently + linked are silently ignored. Returns the updated solution. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + body (UnlinkResourcesRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SolutionResponse] + """ + + kwargs = _get_kwargs( + solution_id=solution_id, + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + body: UnlinkResourcesRequest, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | SolutionResponse | None: + """Unlink source connections + + Unlink one or more source connections from a solution by their IDs. + + Pass a JSON body with an `ids` array of source connection UUIDs to remove. Sources not currently + linked are silently ignored. Returns the updated solution. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + body (UnlinkResourcesRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SolutionResponse + """ + + return ( + await asyncio_detailed( + solution_id=solution_id, + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/solutions/update_solution_api_solutions_solution_id_patch.py b/seclai/_generated/api/solutions/update_solution_api_solutions_solution_id_patch.py new file mode 100644 index 0000000..b8f4f02 --- /dev/null +++ b/seclai/_generated/api/solutions/update_solution_api_solutions_solution_id_patch.py @@ -0,0 +1,214 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.solution_response import SolutionResponse +from ...models.update_solution_request import UpdateSolutionRequest +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + solution_id: UUID, + *, + body: UpdateSolutionRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/solutions/{solution_id}".format( + solution_id=quote(str(solution_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> HTTPValidationError | SolutionResponse | None: + if response.status_code == 200: + response_200 = SolutionResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[HTTPValidationError | SolutionResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + body: UpdateSolutionRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | SolutionResponse]: + """Update a solution + + Update an existing solution's name or description. + + Pass the fields you wish to change in the request body. Fields not included remain unchanged. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + body (UpdateSolutionRequest): Request model for updating a solution + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SolutionResponse] + """ + + kwargs = _get_kwargs( + solution_id=solution_id, + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + body: UpdateSolutionRequest, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | SolutionResponse | None: + """Update a solution + + Update an existing solution's name or description. + + Pass the fields you wish to change in the request body. Fields not included remain unchanged. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + body (UpdateSolutionRequest): Request model for updating a solution + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SolutionResponse + """ + + return sync_detailed( + solution_id=solution_id, + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + body: UpdateSolutionRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | SolutionResponse]: + """Update a solution + + Update an existing solution's name or description. + + Pass the fields you wish to change in the request body. Fields not included remain unchanged. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + body (UpdateSolutionRequest): Request model for updating a solution + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SolutionResponse] + """ + + kwargs = _get_kwargs( + solution_id=solution_id, + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + solution_id: UUID, + *, + client: AuthenticatedClient | Client, + body: UpdateSolutionRequest, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | SolutionResponse | None: + """Update a solution + + Update an existing solution's name or description. + + Pass the fields you wish to change in the request body. Fields not included remain unchanged. + + Args: + solution_id (UUID): + x_account_id (UUID | Unset): + body (UpdateSolutionRequest): Request model for updating a solution + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SolutionResponse + """ + + return ( + await asyncio_detailed( + solution_id=solution_id, + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/source_exports/__init__.py b/seclai/_generated/api/source_exports/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/seclai/_generated/api/source_exports/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/seclai/_generated/api/source_exports/cancel_source_export_api_sources_source_connection_id_exports_export_id_cancel_post.py b/seclai/_generated/api/source_exports/cancel_source_export_api_sources_source_connection_id_exports_export_id_cancel_post.py new file mode 100644 index 0000000..163210a --- /dev/null +++ b/seclai/_generated/api/source_exports/cancel_source_export_api_sources_source_connection_id_exports_export_id_cancel_post.py @@ -0,0 +1,206 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.export_response import ExportResponse +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + source_connection_id: UUID, + export_id: UUID, + *, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/sources/{source_connection_id}/exports/{export_id}/cancel".format( + source_connection_id=quote(str(source_connection_id), safe=""), + export_id=quote(str(export_id), safe=""), + ), + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ExportResponse | HTTPValidationError | None: + if response.status_code == 200: + response_200 = ExportResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ExportResponse | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + source_connection_id: UUID, + export_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[ExportResponse | HTTPValidationError]: + """Cancel export + + Cancel a pending or running export. The background task will stop at the next chunk boundary. + Completed, failed, expired, or already-cancelled exports cannot be cancelled. + + Args: + source_connection_id (UUID): + export_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExportResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + source_connection_id=source_connection_id, + export_id=export_id, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + source_connection_id: UUID, + export_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> ExportResponse | HTTPValidationError | None: + """Cancel export + + Cancel a pending or running export. The background task will stop at the next chunk boundary. + Completed, failed, expired, or already-cancelled exports cannot be cancelled. + + Args: + source_connection_id (UUID): + export_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExportResponse | HTTPValidationError + """ + + return sync_detailed( + source_connection_id=source_connection_id, + export_id=export_id, + client=client, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + source_connection_id: UUID, + export_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[ExportResponse | HTTPValidationError]: + """Cancel export + + Cancel a pending or running export. The background task will stop at the next chunk boundary. + Completed, failed, expired, or already-cancelled exports cannot be cancelled. + + Args: + source_connection_id (UUID): + export_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExportResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + source_connection_id=source_connection_id, + export_id=export_id, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + source_connection_id: UUID, + export_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> ExportResponse | HTTPValidationError | None: + """Cancel export + + Cancel a pending or running export. The background task will stop at the next chunk boundary. + Completed, failed, expired, or already-cancelled exports cannot be cancelled. + + Args: + source_connection_id (UUID): + export_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExportResponse | HTTPValidationError + """ + + return ( + await asyncio_detailed( + source_connection_id=source_connection_id, + export_id=export_id, + client=client, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/source_exports/create_source_export_api_sources_source_connection_id_exports_post.py b/seclai/_generated/api/source_exports/create_source_export_api_sources_source_connection_id_exports_post.py new file mode 100644 index 0000000..4bfa044 --- /dev/null +++ b/seclai/_generated/api/source_exports/create_source_export_api_sources_source_connection_id_exports_post.py @@ -0,0 +1,210 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.create_export_request import CreateExportRequest +from ...models.export_response import ExportResponse +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + source_connection_id: UUID, + *, + body: CreateExportRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/sources/{source_connection_id}/exports".format( + source_connection_id=quote(str(source_connection_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ExportResponse | HTTPValidationError | None: + if response.status_code == 202: + response_202 = ExportResponse.from_dict(response.json()) + + return response_202 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ExportResponse | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + source_connection_id: UUID, + *, + client: AuthenticatedClient | Client, + body: CreateExportRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[ExportResponse | HTTPValidationError]: + """Create export + + Start an asynchronous export job. Poll GET .../exports/{export_id} until status becomes completed, + then use /download to retrieve the file. + + Args: + source_connection_id (UUID): + x_account_id (UUID | Unset): + body (CreateExportRequest): Parameters for creating a new export job. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExportResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + source_connection_id=source_connection_id, + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + source_connection_id: UUID, + *, + client: AuthenticatedClient | Client, + body: CreateExportRequest, + x_account_id: UUID | Unset = UNSET, +) -> ExportResponse | HTTPValidationError | None: + """Create export + + Start an asynchronous export job. Poll GET .../exports/{export_id} until status becomes completed, + then use /download to retrieve the file. + + Args: + source_connection_id (UUID): + x_account_id (UUID | Unset): + body (CreateExportRequest): Parameters for creating a new export job. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExportResponse | HTTPValidationError + """ + + return sync_detailed( + source_connection_id=source_connection_id, + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + source_connection_id: UUID, + *, + client: AuthenticatedClient | Client, + body: CreateExportRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[ExportResponse | HTTPValidationError]: + """Create export + + Start an asynchronous export job. Poll GET .../exports/{export_id} until status becomes completed, + then use /download to retrieve the file. + + Args: + source_connection_id (UUID): + x_account_id (UUID | Unset): + body (CreateExportRequest): Parameters for creating a new export job. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExportResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + source_connection_id=source_connection_id, + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + source_connection_id: UUID, + *, + client: AuthenticatedClient | Client, + body: CreateExportRequest, + x_account_id: UUID | Unset = UNSET, +) -> ExportResponse | HTTPValidationError | None: + """Create export + + Start an asynchronous export job. Poll GET .../exports/{export_id} until status becomes completed, + then use /download to retrieve the file. + + Args: + source_connection_id (UUID): + x_account_id (UUID | Unset): + body (CreateExportRequest): Parameters for creating a new export job. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExportResponse | HTTPValidationError + """ + + return ( + await asyncio_detailed( + source_connection_id=source_connection_id, + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/source_exports/delete_source_export_api_sources_source_connection_id_exports_export_id_delete.py b/seclai/_generated/api/source_exports/delete_source_export_api_sources_source_connection_id_exports_export_id_delete.py new file mode 100644 index 0000000..325ed17 --- /dev/null +++ b/seclai/_generated/api/source_exports/delete_source_export_api_sources_source_connection_id_exports_export_id_delete.py @@ -0,0 +1,204 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + source_connection_id: UUID, + export_id: UUID, + *, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/sources/{source_connection_id}/exports/{export_id}".format( + source_connection_id=quote(str(source_connection_id), safe=""), + export_id=quote(str(export_id), safe=""), + ), + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | HTTPValidationError | None: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + source_connection_id: UUID, + export_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any | HTTPValidationError]: + """Delete export + + Delete an export job and remove the associated file from S3. This is a soft-delete: the database + record is retained for audit purposes but the backing file is permanently removed. + + Args: + source_connection_id (UUID): + export_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + source_connection_id=source_connection_id, + export_id=export_id, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + source_connection_id: UUID, + export_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Any | HTTPValidationError | None: + """Delete export + + Delete an export job and remove the associated file from S3. This is a soft-delete: the database + record is retained for audit purposes but the backing file is permanently removed. + + Args: + source_connection_id (UUID): + export_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return sync_detailed( + source_connection_id=source_connection_id, + export_id=export_id, + client=client, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + source_connection_id: UUID, + export_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any | HTTPValidationError]: + """Delete export + + Delete an export job and remove the associated file from S3. This is a soft-delete: the database + record is retained for audit purposes but the backing file is permanently removed. + + Args: + source_connection_id (UUID): + export_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + source_connection_id=source_connection_id, + export_id=export_id, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + source_connection_id: UUID, + export_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Any | HTTPValidationError | None: + """Delete export + + Delete an export job and remove the associated file from S3. This is a soft-delete: the database + record is retained for audit purposes but the backing file is permanently removed. + + Args: + source_connection_id (UUID): + export_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return ( + await asyncio_detailed( + source_connection_id=source_connection_id, + export_id=export_id, + client=client, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/source_exports/download_source_export_api_sources_source_connection_id_exports_export_id_download_get.py b/seclai/_generated/api/source_exports/download_source_export_api_sources_source_connection_id_exports_export_id_download_get.py new file mode 100644 index 0000000..a19961a --- /dev/null +++ b/seclai/_generated/api/source_exports/download_source_export_api_sources_source_connection_id_exports_export_id_download_get.py @@ -0,0 +1,208 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + source_connection_id: UUID, + export_id: UUID, + *, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/sources/{source_connection_id}/exports/{export_id}/download".format( + source_connection_id=quote(str(source_connection_id), safe=""), + export_id=quote(str(export_id), safe=""), + ), + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | HTTPValidationError | None: + if response.status_code == 200: + response_200 = response.json() + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + source_connection_id: UUID, + export_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any | HTTPValidationError]: + """Download export + + Stream the completed export file. Returns the file content with appropriate Content-Type and + Content-Disposition headers. Returns 409 if the export is not yet completed and 410 if it has + expired. + + Args: + source_connection_id (UUID): + export_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + source_connection_id=source_connection_id, + export_id=export_id, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + source_connection_id: UUID, + export_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Any | HTTPValidationError | None: + """Download export + + Stream the completed export file. Returns the file content with appropriate Content-Type and + Content-Disposition headers. Returns 409 if the export is not yet completed and 410 if it has + expired. + + Args: + source_connection_id (UUID): + export_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return sync_detailed( + source_connection_id=source_connection_id, + export_id=export_id, + client=client, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + source_connection_id: UUID, + export_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any | HTTPValidationError]: + """Download export + + Stream the completed export file. Returns the file content with appropriate Content-Type and + Content-Disposition headers. Returns 409 if the export is not yet completed and 410 if it has + expired. + + Args: + source_connection_id (UUID): + export_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + source_connection_id=source_connection_id, + export_id=export_id, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + source_connection_id: UUID, + export_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Any | HTTPValidationError | None: + """Download export + + Stream the completed export file. Returns the file content with appropriate Content-Type and + Content-Disposition headers. Returns 409 if the export is not yet completed and 410 if it has + expired. + + Args: + source_connection_id (UUID): + export_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return ( + await asyncio_detailed( + source_connection_id=source_connection_id, + export_id=export_id, + client=client, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/source_exports/estimate_source_export_api_sources_source_connection_id_exports_estimate_post.py b/seclai/_generated/api/source_exports/estimate_source_export_api_sources_source_connection_id_exports_estimate_post.py new file mode 100644 index 0000000..6484d80 --- /dev/null +++ b/seclai/_generated/api/source_exports/estimate_source_export_api_sources_source_connection_id_exports_estimate_post.py @@ -0,0 +1,210 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.estimate_export_request import EstimateExportRequest +from ...models.estimate_export_response import EstimateExportResponse +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + source_connection_id: UUID, + *, + body: EstimateExportRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/sources/{source_connection_id}/exports/estimate".format( + source_connection_id=quote(str(source_connection_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> EstimateExportResponse | HTTPValidationError | None: + if response.status_code == 200: + response_200 = EstimateExportResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[EstimateExportResponse | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + source_connection_id: UUID, + *, + client: AuthenticatedClient | Client, + body: EstimateExportRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[EstimateExportResponse | HTTPValidationError]: + """Estimate export size + + Return an order-of-magnitude size estimate (in bytes) for an export without creating a job. Use + this to show users how large the download will be before they commit to running the export. + + Args: + source_connection_id (UUID): + x_account_id (UUID | Unset): + body (EstimateExportRequest): Parameters for estimating export size. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EstimateExportResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + source_connection_id=source_connection_id, + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + source_connection_id: UUID, + *, + client: AuthenticatedClient | Client, + body: EstimateExportRequest, + x_account_id: UUID | Unset = UNSET, +) -> EstimateExportResponse | HTTPValidationError | None: + """Estimate export size + + Return an order-of-magnitude size estimate (in bytes) for an export without creating a job. Use + this to show users how large the download will be before they commit to running the export. + + Args: + source_connection_id (UUID): + x_account_id (UUID | Unset): + body (EstimateExportRequest): Parameters for estimating export size. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EstimateExportResponse | HTTPValidationError + """ + + return sync_detailed( + source_connection_id=source_connection_id, + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + source_connection_id: UUID, + *, + client: AuthenticatedClient | Client, + body: EstimateExportRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[EstimateExportResponse | HTTPValidationError]: + """Estimate export size + + Return an order-of-magnitude size estimate (in bytes) for an export without creating a job. Use + this to show users how large the download will be before they commit to running the export. + + Args: + source_connection_id (UUID): + x_account_id (UUID | Unset): + body (EstimateExportRequest): Parameters for estimating export size. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EstimateExportResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + source_connection_id=source_connection_id, + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + source_connection_id: UUID, + *, + client: AuthenticatedClient | Client, + body: EstimateExportRequest, + x_account_id: UUID | Unset = UNSET, +) -> EstimateExportResponse | HTTPValidationError | None: + """Estimate export size + + Return an order-of-magnitude size estimate (in bytes) for an export without creating a job. Use + this to show users how large the download will be before they commit to running the export. + + Args: + source_connection_id (UUID): + x_account_id (UUID | Unset): + body (EstimateExportRequest): Parameters for estimating export size. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EstimateExportResponse | HTTPValidationError + """ + + return ( + await asyncio_detailed( + source_connection_id=source_connection_id, + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/source_exports/get_source_export_api_sources_source_connection_id_exports_export_id_get.py b/seclai/_generated/api/source_exports/get_source_export_api_sources_source_connection_id_exports_export_id_get.py new file mode 100644 index 0000000..5644d4d --- /dev/null +++ b/seclai/_generated/api/source_exports/get_source_export_api_sources_source_connection_id_exports_export_id_get.py @@ -0,0 +1,206 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.export_response import ExportResponse +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + source_connection_id: UUID, + export_id: UUID, + *, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/sources/{source_connection_id}/exports/{export_id}".format( + source_connection_id=quote(str(source_connection_id), safe=""), + export_id=quote(str(export_id), safe=""), + ), + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ExportResponse | HTTPValidationError | None: + if response.status_code == 200: + response_200 = ExportResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ExportResponse | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + source_connection_id: UUID, + export_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[ExportResponse | HTTPValidationError]: + """Get export status + + Retrieve the current status and progress of an export job. Returns all metadata including progress + counters, file size, item count, and expiration time once completed. + + Args: + source_connection_id (UUID): + export_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExportResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + source_connection_id=source_connection_id, + export_id=export_id, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + source_connection_id: UUID, + export_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> ExportResponse | HTTPValidationError | None: + """Get export status + + Retrieve the current status and progress of an export job. Returns all metadata including progress + counters, file size, item count, and expiration time once completed. + + Args: + source_connection_id (UUID): + export_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExportResponse | HTTPValidationError + """ + + return sync_detailed( + source_connection_id=source_connection_id, + export_id=export_id, + client=client, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + source_connection_id: UUID, + export_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[ExportResponse | HTTPValidationError]: + """Get export status + + Retrieve the current status and progress of an export job. Returns all metadata including progress + counters, file size, item count, and expiration time once completed. + + Args: + source_connection_id (UUID): + export_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExportResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + source_connection_id=source_connection_id, + export_id=export_id, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + source_connection_id: UUID, + export_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> ExportResponse | HTTPValidationError | None: + """Get export status + + Retrieve the current status and progress of an export job. Returns all metadata including progress + counters, file size, item count, and expiration time once completed. + + Args: + source_connection_id (UUID): + export_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExportResponse | HTTPValidationError + """ + + return ( + await asyncio_detailed( + source_connection_id=source_connection_id, + export_id=export_id, + client=client, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/source_exports/list_source_exports_api_sources_source_connection_id_exports_get.py b/seclai/_generated/api/source_exports/list_source_exports_api_sources_source_connection_id_exports_get.py new file mode 100644 index 0000000..4df2a02 --- /dev/null +++ b/seclai/_generated/api/source_exports/list_source_exports_api_sources_source_connection_id_exports_get.py @@ -0,0 +1,231 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.export_list_response import ExportListResponse +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + source_connection_id: UUID, + *, + page: int | Unset = 1, + limit: int | Unset = 20, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/sources/{source_connection_id}/exports".format( + source_connection_id=quote(str(source_connection_id), safe=""), + ), + "params": params, + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ExportListResponse | HTTPValidationError | None: + if response.status_code == 200: + response_200 = ExportListResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ExportListResponse | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + source_connection_id: UUID, + *, + client: AuthenticatedClient | Client, + page: int | Unset = 1, + limit: int | Unset = 20, + x_account_id: UUID | Unset = UNSET, +) -> Response[ExportListResponse | HTTPValidationError]: + """List exports + + List all export jobs for a source connection, ordered newest first. Supports pagination via + ``page`` and ``limit`` query parameters. Returns status, progress, and file metadata for each + export. + + Args: + source_connection_id (UUID): + page (int | Unset): Default: 1. + limit (int | Unset): Default: 20. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExportListResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + source_connection_id=source_connection_id, + page=page, + limit=limit, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + source_connection_id: UUID, + *, + client: AuthenticatedClient | Client, + page: int | Unset = 1, + limit: int | Unset = 20, + x_account_id: UUID | Unset = UNSET, +) -> ExportListResponse | HTTPValidationError | None: + """List exports + + List all export jobs for a source connection, ordered newest first. Supports pagination via + ``page`` and ``limit`` query parameters. Returns status, progress, and file metadata for each + export. + + Args: + source_connection_id (UUID): + page (int | Unset): Default: 1. + limit (int | Unset): Default: 20. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExportListResponse | HTTPValidationError + """ + + return sync_detailed( + source_connection_id=source_connection_id, + client=client, + page=page, + limit=limit, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + source_connection_id: UUID, + *, + client: AuthenticatedClient | Client, + page: int | Unset = 1, + limit: int | Unset = 20, + x_account_id: UUID | Unset = UNSET, +) -> Response[ExportListResponse | HTTPValidationError]: + """List exports + + List all export jobs for a source connection, ordered newest first. Supports pagination via + ``page`` and ``limit`` query parameters. Returns status, progress, and file metadata for each + export. + + Args: + source_connection_id (UUID): + page (int | Unset): Default: 1. + limit (int | Unset): Default: 20. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExportListResponse | HTTPValidationError] + """ + + kwargs = _get_kwargs( + source_connection_id=source_connection_id, + page=page, + limit=limit, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + source_connection_id: UUID, + *, + client: AuthenticatedClient | Client, + page: int | Unset = 1, + limit: int | Unset = 20, + x_account_id: UUID | Unset = UNSET, +) -> ExportListResponse | HTTPValidationError | None: + """List exports + + List all export jobs for a source connection, ordered newest first. Supports pagination via + ``page`` and ``limit`` query parameters. Returns status, progress, and file metadata for each + export. + + Args: + source_connection_id (UUID): + page (int | Unset): Default: 1. + limit (int | Unset): Default: 20. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExportListResponse | HTTPValidationError + """ + + return ( + await asyncio_detailed( + source_connection_id=source_connection_id, + client=client, + page=page, + limit=limit, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/sources/cancel_source_embedding_migration_api_sources_source_connection_id_embedding_migration_cancel_post.py b/seclai/_generated/api/sources/cancel_source_embedding_migration_api_sources_source_connection_id_embedding_migration_cancel_post.py new file mode 100644 index 0000000..38667ae --- /dev/null +++ b/seclai/_generated/api/sources/cancel_source_embedding_migration_api_sources_source_connection_id_embedding_migration_cancel_post.py @@ -0,0 +1,198 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.source_embedding_migration_response import ( + SourceEmbeddingMigrationResponse, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + source_connection_id: UUID, + *, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/sources/{source_connection_id}/embedding-migration/cancel".format( + source_connection_id=quote(str(source_connection_id), safe=""), + ), + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> HTTPValidationError | SourceEmbeddingMigrationResponse | None: + if response.status_code == 200: + response_200 = SourceEmbeddingMigrationResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[HTTPValidationError | SourceEmbeddingMigrationResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + source_connection_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | SourceEmbeddingMigrationResponse]: + """Cancel Source Embedding Migration + + Cancel an active embedding migration for a custom-index source. + + Only pending, running, or switching migrations can be cancelled. + + Args: + source_connection_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SourceEmbeddingMigrationResponse] + """ + + kwargs = _get_kwargs( + source_connection_id=source_connection_id, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + source_connection_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | SourceEmbeddingMigrationResponse | None: + """Cancel Source Embedding Migration + + Cancel an active embedding migration for a custom-index source. + + Only pending, running, or switching migrations can be cancelled. + + Args: + source_connection_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SourceEmbeddingMigrationResponse + """ + + return sync_detailed( + source_connection_id=source_connection_id, + client=client, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + source_connection_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | SourceEmbeddingMigrationResponse]: + """Cancel Source Embedding Migration + + Cancel an active embedding migration for a custom-index source. + + Only pending, running, or switching migrations can be cancelled. + + Args: + source_connection_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SourceEmbeddingMigrationResponse] + """ + + kwargs = _get_kwargs( + source_connection_id=source_connection_id, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + source_connection_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | SourceEmbeddingMigrationResponse | None: + """Cancel Source Embedding Migration + + Cancel an active embedding migration for a custom-index source. + + Only pending, running, or switching migrations can be cancelled. + + Args: + source_connection_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SourceEmbeddingMigrationResponse + """ + + return ( + await asyncio_detailed( + source_connection_id=source_connection_id, + client=client, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/sources/create_source_api_sources_post.py b/seclai/_generated/api/sources/create_source_api_sources_post.py new file mode 100644 index 0000000..97c39d6 --- /dev/null +++ b/seclai/_generated/api/sources/create_source_api_sources_post.py @@ -0,0 +1,214 @@ +from http import HTTPStatus +from typing import Any, cast +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.create_source_body import CreateSourceBody +from ...models.http_validation_error import HTTPValidationError +from ...models.source_response import SourceResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + body: CreateSourceBody, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/sources", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | HTTPValidationError | SourceResponse | None: + if response.status_code == 201: + response_201 = SourceResponse.from_dict(response.json()) + + return response_201 + + if response.status_code == 402: + response_402 = cast(Any, None) + return response_402 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | HTTPValidationError | SourceResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: CreateSourceBody, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any | HTTPValidationError | SourceResponse]: + """Create Source + + Create a new content source. + + Source types: `rss`, `website`, `file_uploads`, `custom_index`. + + For RSS and website sources, provide the URL. For file upload and custom index sources, the URL is + created automatically. + + Args: + x_account_id (UUID | Unset): + body (CreateSourceBody): Request body for creating a content source. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError | SourceResponse] + """ + + kwargs = _get_kwargs( + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: CreateSourceBody, + x_account_id: UUID | Unset = UNSET, +) -> Any | HTTPValidationError | SourceResponse | None: + """Create Source + + Create a new content source. + + Source types: `rss`, `website`, `file_uploads`, `custom_index`. + + For RSS and website sources, provide the URL. For file upload and custom index sources, the URL is + created automatically. + + Args: + x_account_id (UUID | Unset): + body (CreateSourceBody): Request body for creating a content source. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError | SourceResponse + """ + + return sync_detailed( + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: CreateSourceBody, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any | HTTPValidationError | SourceResponse]: + """Create Source + + Create a new content source. + + Source types: `rss`, `website`, `file_uploads`, `custom_index`. + + For RSS and website sources, provide the URL. For file upload and custom index sources, the URL is + created automatically. + + Args: + x_account_id (UUID | Unset): + body (CreateSourceBody): Request body for creating a content source. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError | SourceResponse] + """ + + kwargs = _get_kwargs( + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: CreateSourceBody, + x_account_id: UUID | Unset = UNSET, +) -> Any | HTTPValidationError | SourceResponse | None: + """Create Source + + Create a new content source. + + Source types: `rss`, `website`, `file_uploads`, `custom_index`. + + For RSS and website sources, provide the URL. For file upload and custom index sources, the URL is + created automatically. + + Args: + x_account_id (UUID | Unset): + body (CreateSourceBody): Request body for creating a content source. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError | SourceResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/sources/delete_source_api_sources_source_connection_id_delete.py b/seclai/_generated/api/sources/delete_source_api_sources_source_connection_id_delete.py new file mode 100644 index 0000000..be1625f --- /dev/null +++ b/seclai/_generated/api/sources/delete_source_api_sources_source_connection_id_delete.py @@ -0,0 +1,198 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + source_connection_id: UUID, + *, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/sources/{source_connection_id}".format( + source_connection_id=quote(str(source_connection_id), safe=""), + ), + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | HTTPValidationError | None: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + source_connection_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any | HTTPValidationError]: + """Delete Source + + Soft-delete a content source. This action cannot be undone. + + System-managed sources (such as agent history or conversation memory) cannot be deleted through this + endpoint. + + Args: + source_connection_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + source_connection_id=source_connection_id, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + source_connection_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Any | HTTPValidationError | None: + """Delete Source + + Soft-delete a content source. This action cannot be undone. + + System-managed sources (such as agent history or conversation memory) cannot be deleted through this + endpoint. + + Args: + source_connection_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return sync_detailed( + source_connection_id=source_connection_id, + client=client, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + source_connection_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any | HTTPValidationError]: + """Delete Source + + Soft-delete a content source. This action cannot be undone. + + System-managed sources (such as agent history or conversation memory) cannot be deleted through this + endpoint. + + Args: + source_connection_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + source_connection_id=source_connection_id, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + source_connection_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Any | HTTPValidationError | None: + """Delete Source + + Soft-delete a content source. This action cannot be undone. + + System-managed sources (such as agent history or conversation memory) cannot be deleted through this + endpoint. + + Args: + source_connection_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return ( + await asyncio_detailed( + source_connection_id=source_connection_id, + client=client, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/sources/get_source_api_sources_source_connection_id_get.py b/seclai/_generated/api/sources/get_source_api_sources_source_connection_id_get.py new file mode 100644 index 0000000..eb971be --- /dev/null +++ b/seclai/_generated/api/sources/get_source_api_sources_source_connection_id_get.py @@ -0,0 +1,204 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.source_response import SourceResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + source_connection_id: UUID, + *, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/sources/{source_connection_id}".format( + source_connection_id=quote(str(source_connection_id), safe=""), + ), + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> HTTPValidationError | SourceResponse | None: + if response.status_code == 200: + response_200 = SourceResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[HTTPValidationError | SourceResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + source_connection_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | SourceResponse]: + """Get Source + + Fetch a content source by ID. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. You can only access sources belonging to your + account. + + Args: + source_connection_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SourceResponse] + """ + + kwargs = _get_kwargs( + source_connection_id=source_connection_id, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + source_connection_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | SourceResponse | None: + """Get Source + + Fetch a content source by ID. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. You can only access sources belonging to your + account. + + Args: + source_connection_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SourceResponse + """ + + return sync_detailed( + source_connection_id=source_connection_id, + client=client, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + source_connection_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | SourceResponse]: + """Get Source + + Fetch a content source by ID. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. You can only access sources belonging to your + account. + + Args: + source_connection_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SourceResponse] + """ + + kwargs = _get_kwargs( + source_connection_id=source_connection_id, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + source_connection_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | SourceResponse | None: + """Get Source + + Fetch a content source by ID. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. You can only access sources belonging to your + account. + + Args: + source_connection_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SourceResponse + """ + + return ( + await asyncio_detailed( + source_connection_id=source_connection_id, + client=client, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/sources/get_source_embedding_migration_api_sources_source_connection_id_embedding_migration_get.py b/seclai/_generated/api/sources/get_source_embedding_migration_api_sources_source_connection_id_embedding_migration_get.py new file mode 100644 index 0000000..6e36376 --- /dev/null +++ b/seclai/_generated/api/sources/get_source_embedding_migration_api_sources_source_connection_id_embedding_migration_get.py @@ -0,0 +1,214 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.source_embedding_migration_response import ( + SourceEmbeddingMigrationResponse, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + source_connection_id: UUID, + *, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/sources/{source_connection_id}/embedding-migration".format( + source_connection_id=quote(str(source_connection_id), safe=""), + ), + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> HTTPValidationError | None | SourceEmbeddingMigrationResponse | None: + if response.status_code == 200: + + def _parse_response_200( + data: object, + ) -> None | SourceEmbeddingMigrationResponse: + if data is None: + return data + try: + if not isinstance(data, dict): + raise TypeError() + response_200_type_0 = SourceEmbeddingMigrationResponse.from_dict(data) + + return response_200_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | SourceEmbeddingMigrationResponse, data) + + response_200 = _parse_response_200(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[HTTPValidationError | None | SourceEmbeddingMigrationResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + source_connection_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | None | SourceEmbeddingMigrationResponse]: + """Get Source Embedding Migration + + Get the latest embedding migration status for a custom-index source. + + Returns `null` when no migration has ever been started for this source. + + Args: + source_connection_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | None | SourceEmbeddingMigrationResponse] + """ + + kwargs = _get_kwargs( + source_connection_id=source_connection_id, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + source_connection_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | None | SourceEmbeddingMigrationResponse | None: + """Get Source Embedding Migration + + Get the latest embedding migration status for a custom-index source. + + Returns `null` when no migration has ever been started for this source. + + Args: + source_connection_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | None | SourceEmbeddingMigrationResponse + """ + + return sync_detailed( + source_connection_id=source_connection_id, + client=client, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + source_connection_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | None | SourceEmbeddingMigrationResponse]: + """Get Source Embedding Migration + + Get the latest embedding migration status for a custom-index source. + + Returns `null` when no migration has ever been started for this source. + + Args: + source_connection_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | None | SourceEmbeddingMigrationResponse] + """ + + kwargs = _get_kwargs( + source_connection_id=source_connection_id, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + source_connection_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | None | SourceEmbeddingMigrationResponse | None: + """Get Source Embedding Migration + + Get the latest embedding migration status for a custom-index source. + + Returns `null` when no migration has ever been started for this source. + + Args: + source_connection_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | None | SourceEmbeddingMigrationResponse + """ + + return ( + await asyncio_detailed( + source_connection_id=source_connection_id, + client=client, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/sources/list_sources_api_sources_get.py b/seclai/_generated/api/sources/list_sources_api_sources_get.py index 082dac0..4e4e1b9 100644 --- a/seclai/_generated/api/sources/list_sources_api_sources_get.py +++ b/seclai/_generated/api/sources/list_sources_api_sources_get.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from uuid import UUID import httpx @@ -17,7 +18,12 @@ def _get_kwargs( sort: str | Unset = "created_at", order: str | Unset = "desc", account_id: None | str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + params: dict[str, Any] = {} params["page"] = page @@ -43,6 +49,7 @@ def _get_kwargs( "params": params, } + _kwargs["headers"] = headers return _kwargs @@ -84,6 +91,7 @@ def sync_detailed( sort: str | Unset = "created_at", order: str | Unset = "desc", account_id: None | str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | SourceListResponse]: """List sources @@ -98,16 +106,17 @@ def sync_detailed( - Sorting: `sort` (created_at/updated_at/name) and `order` (asc/desc). Auth & scoping: - - Requires `X-API-Key`. Results are scoped to the API key's account. - - The optional `account_id` query param is only allowed when it matches the API key's account. + - Requires `X-API-Key` header or OAuth Bearer token. Results are scoped to the caller's account. + - The optional `account_id` query param is only allowed when it matches the caller's account. Args: page (int | Unset): Page number Default: 1. limit (int | Unset): Items per page Default: 20. sort (str | Unset): Sort field Default: 'created_at'. order (str | Unset): Sort order Default: 'desc'. - account_id (None | str | Unset): List sources for the given account. Defaults to the api - key's account. + account_id (None | str | Unset): List sources for the given account. Defaults to the + caller's account. + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -123,6 +132,7 @@ def sync_detailed( sort=sort, order=order, account_id=account_id, + x_account_id=x_account_id, ) response = client.get_httpx_client().request( @@ -140,6 +150,7 @@ def sync( sort: str | Unset = "created_at", order: str | Unset = "desc", account_id: None | str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | SourceListResponse | None: """List sources @@ -154,16 +165,17 @@ def sync( - Sorting: `sort` (created_at/updated_at/name) and `order` (asc/desc). Auth & scoping: - - Requires `X-API-Key`. Results are scoped to the API key's account. - - The optional `account_id` query param is only allowed when it matches the API key's account. + - Requires `X-API-Key` header or OAuth Bearer token. Results are scoped to the caller's account. + - The optional `account_id` query param is only allowed when it matches the caller's account. Args: page (int | Unset): Page number Default: 1. limit (int | Unset): Items per page Default: 20. sort (str | Unset): Sort field Default: 'created_at'. order (str | Unset): Sort order Default: 'desc'. - account_id (None | str | Unset): List sources for the given account. Defaults to the api - key's account. + account_id (None | str | Unset): List sources for the given account. Defaults to the + caller's account. + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -180,6 +192,7 @@ def sync( sort=sort, order=order, account_id=account_id, + x_account_id=x_account_id, ).parsed @@ -191,6 +204,7 @@ async def asyncio_detailed( sort: str | Unset = "created_at", order: str | Unset = "desc", account_id: None | str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | SourceListResponse]: """List sources @@ -205,16 +219,17 @@ async def asyncio_detailed( - Sorting: `sort` (created_at/updated_at/name) and `order` (asc/desc). Auth & scoping: - - Requires `X-API-Key`. Results are scoped to the API key's account. - - The optional `account_id` query param is only allowed when it matches the API key's account. + - Requires `X-API-Key` header or OAuth Bearer token. Results are scoped to the caller's account. + - The optional `account_id` query param is only allowed when it matches the caller's account. Args: page (int | Unset): Page number Default: 1. limit (int | Unset): Items per page Default: 20. sort (str | Unset): Sort field Default: 'created_at'. order (str | Unset): Sort order Default: 'desc'. - account_id (None | str | Unset): List sources for the given account. Defaults to the api - key's account. + account_id (None | str | Unset): List sources for the given account. Defaults to the + caller's account. + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -230,6 +245,7 @@ async def asyncio_detailed( sort=sort, order=order, account_id=account_id, + x_account_id=x_account_id, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -245,6 +261,7 @@ async def asyncio( sort: str | Unset = "created_at", order: str | Unset = "desc", account_id: None | str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | SourceListResponse | None: """List sources @@ -259,16 +276,17 @@ async def asyncio( - Sorting: `sort` (created_at/updated_at/name) and `order` (asc/desc). Auth & scoping: - - Requires `X-API-Key`. Results are scoped to the API key's account. - - The optional `account_id` query param is only allowed when it matches the API key's account. + - Requires `X-API-Key` header or OAuth Bearer token. Results are scoped to the caller's account. + - The optional `account_id` query param is only allowed when it matches the caller's account. Args: page (int | Unset): Page number Default: 1. limit (int | Unset): Items per page Default: 20. sort (str | Unset): Sort field Default: 'created_at'. order (str | Unset): Sort order Default: 'desc'. - account_id (None | str | Unset): List sources for the given account. Defaults to the api - key's account. + account_id (None | str | Unset): List sources for the given account. Defaults to the + caller's account. + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -286,5 +304,6 @@ async def asyncio( sort=sort, order=order, account_id=account_id, + x_account_id=x_account_id, ) ).parsed diff --git a/seclai/_generated/api/sources/start_source_embedding_migration_api_sources_source_connection_id_embedding_migration_post.py b/seclai/_generated/api/sources/start_source_embedding_migration_api_sources_source_connection_id_embedding_migration_post.py new file mode 100644 index 0000000..9477289 --- /dev/null +++ b/seclai/_generated/api/sources/start_source_embedding_migration_api_sources_source_connection_id_embedding_migration_post.py @@ -0,0 +1,266 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.source_embedding_migration_response import ( + SourceEmbeddingMigrationResponse, +) +from ...models.start_source_embedding_migration_request import ( + StartSourceEmbeddingMigrationRequest, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + source_connection_id: UUID, + *, + body: StartSourceEmbeddingMigrationRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/sources/{source_connection_id}/embedding-migration".format( + source_connection_id=quote(str(source_connection_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | HTTPValidationError | SourceEmbeddingMigrationResponse | None: + if response.status_code == 200: + response_200 = SourceEmbeddingMigrationResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 409: + response_409 = cast(Any, None) + return response_409 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | HTTPValidationError | SourceEmbeddingMigrationResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + source_connection_id: UUID, + *, + client: AuthenticatedClient | Client, + body: StartSourceEmbeddingMigrationRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any | HTTPValidationError | SourceEmbeddingMigrationResponse]: + """Start Source Embedding Migration + + Start an embedding model migration for a custom-index source. + + The migration runs asynchronously in the background. Poll `GET /api/sources/{id}/embedding- + migration` to track progress. + + Optionally override chunking configuration (`chunk_size`, `chunk_overlap`, `chunk_language`, + `chunk_separators`, `chunk_regex_separators`). When a chunking field is omitted (null), the current + source's value is preserved. + + Constraints: + - Only `custom_index` source types support migration. + - A migration cannot be started while another is already active. + - The target model + dimensions must differ from the source's current settings. + + Args: + source_connection_id (UUID): + x_account_id (UUID | Unset): + body (StartSourceEmbeddingMigrationRequest): Request payload to start a source embedding + migration. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError | SourceEmbeddingMigrationResponse] + """ + + kwargs = _get_kwargs( + source_connection_id=source_connection_id, + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + source_connection_id: UUID, + *, + client: AuthenticatedClient | Client, + body: StartSourceEmbeddingMigrationRequest, + x_account_id: UUID | Unset = UNSET, +) -> Any | HTTPValidationError | SourceEmbeddingMigrationResponse | None: + """Start Source Embedding Migration + + Start an embedding model migration for a custom-index source. + + The migration runs asynchronously in the background. Poll `GET /api/sources/{id}/embedding- + migration` to track progress. + + Optionally override chunking configuration (`chunk_size`, `chunk_overlap`, `chunk_language`, + `chunk_separators`, `chunk_regex_separators`). When a chunking field is omitted (null), the current + source's value is preserved. + + Constraints: + - Only `custom_index` source types support migration. + - A migration cannot be started while another is already active. + - The target model + dimensions must differ from the source's current settings. + + Args: + source_connection_id (UUID): + x_account_id (UUID | Unset): + body (StartSourceEmbeddingMigrationRequest): Request payload to start a source embedding + migration. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError | SourceEmbeddingMigrationResponse + """ + + return sync_detailed( + source_connection_id=source_connection_id, + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + source_connection_id: UUID, + *, + client: AuthenticatedClient | Client, + body: StartSourceEmbeddingMigrationRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[Any | HTTPValidationError | SourceEmbeddingMigrationResponse]: + """Start Source Embedding Migration + + Start an embedding model migration for a custom-index source. + + The migration runs asynchronously in the background. Poll `GET /api/sources/{id}/embedding- + migration` to track progress. + + Optionally override chunking configuration (`chunk_size`, `chunk_overlap`, `chunk_language`, + `chunk_separators`, `chunk_regex_separators`). When a chunking field is omitted (null), the current + source's value is preserved. + + Constraints: + - Only `custom_index` source types support migration. + - A migration cannot be started while another is already active. + - The target model + dimensions must differ from the source's current settings. + + Args: + source_connection_id (UUID): + x_account_id (UUID | Unset): + body (StartSourceEmbeddingMigrationRequest): Request payload to start a source embedding + migration. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError | SourceEmbeddingMigrationResponse] + """ + + kwargs = _get_kwargs( + source_connection_id=source_connection_id, + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + source_connection_id: UUID, + *, + client: AuthenticatedClient | Client, + body: StartSourceEmbeddingMigrationRequest, + x_account_id: UUID | Unset = UNSET, +) -> Any | HTTPValidationError | SourceEmbeddingMigrationResponse | None: + """Start Source Embedding Migration + + Start an embedding model migration for a custom-index source. + + The migration runs asynchronously in the background. Poll `GET /api/sources/{id}/embedding- + migration` to track progress. + + Optionally override chunking configuration (`chunk_size`, `chunk_overlap`, `chunk_language`, + `chunk_separators`, `chunk_regex_separators`). When a chunking field is omitted (null), the current + source's value is preserved. + + Constraints: + - Only `custom_index` source types support migration. + - A migration cannot be started while another is already active. + - The target model + dimensions must differ from the source's current settings. + + Args: + source_connection_id (UUID): + x_account_id (UUID | Unset): + body (StartSourceEmbeddingMigrationRequest): Request payload to start a source embedding + migration. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError | SourceEmbeddingMigrationResponse + """ + + return ( + await asyncio_detailed( + source_connection_id=source_connection_id, + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/sources/update_source_api_sources_source_connection_id_put.py b/seclai/_generated/api/sources/update_source_api_sources_source_connection_id_put.py new file mode 100644 index 0000000..77f5ba9 --- /dev/null +++ b/seclai/_generated/api/sources/update_source_api_sources_source_connection_id_put.py @@ -0,0 +1,218 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.source_response import SourceResponse +from ...models.update_source_body import UpdateSourceBody +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + source_connection_id: UUID, + *, + body: UpdateSourceBody, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "put", + "url": "/sources/{source_connection_id}".format( + source_connection_id=quote(str(source_connection_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> HTTPValidationError | SourceResponse | None: + if response.status_code == 200: + response_200 = SourceResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[HTTPValidationError | SourceResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + source_connection_id: UUID, + *, + client: AuthenticatedClient | Client, + body: UpdateSourceBody, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | SourceResponse]: + """Update Source + + Update a content source's configuration. Only provided fields are changed; omitted fields are left + unchanged. + + System-managed sources only allow `retention_days` updates. + + Args: + source_connection_id (UUID): + x_account_id (UUID | Unset): + body (UpdateSourceBody): Request body for updating a content source. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SourceResponse] + """ + + kwargs = _get_kwargs( + source_connection_id=source_connection_id, + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + source_connection_id: UUID, + *, + client: AuthenticatedClient | Client, + body: UpdateSourceBody, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | SourceResponse | None: + """Update Source + + Update a content source's configuration. Only provided fields are changed; omitted fields are left + unchanged. + + System-managed sources only allow `retention_days` updates. + + Args: + source_connection_id (UUID): + x_account_id (UUID | Unset): + body (UpdateSourceBody): Request body for updating a content source. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SourceResponse + """ + + return sync_detailed( + source_connection_id=source_connection_id, + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + source_connection_id: UUID, + *, + client: AuthenticatedClient | Client, + body: UpdateSourceBody, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | SourceResponse]: + """Update Source + + Update a content source's configuration. Only provided fields are changed; omitted fields are left + unchanged. + + System-managed sources only allow `retention_days` updates. + + Args: + source_connection_id (UUID): + x_account_id (UUID | Unset): + body (UpdateSourceBody): Request body for updating a content source. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SourceResponse] + """ + + kwargs = _get_kwargs( + source_connection_id=source_connection_id, + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + source_connection_id: UUID, + *, + client: AuthenticatedClient | Client, + body: UpdateSourceBody, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | SourceResponse | None: + """Update Source + + Update a content source's configuration. Only provided fields are changed; omitted fields are left + unchanged. + + System-managed sources only allow `retention_days` updates. + + Args: + source_connection_id (UUID): + x_account_id (UUID | Unset): + body (UpdateSourceBody): Request body for updating a content source. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SourceResponse + """ + + return ( + await asyncio_detailed( + source_connection_id=source_connection_id, + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/sources/upload_file_to_source_api_sources_source_connection_id_upload_post.py b/seclai/_generated/api/sources/upload_file_to_source_api_sources_source_connection_id_upload_post.py index 4e881f9..5827cdf 100644 --- a/seclai/_generated/api/sources/upload_file_to_source_api_sources_source_connection_id_upload_post.py +++ b/seclai/_generated/api/sources/upload_file_to_source_api_sources_source_connection_id_upload_post.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -10,15 +11,18 @@ BodyUploadFileToSourceApiSourcesSourceConnectionIdUploadPost, ) from ...models.http_validation_error import HTTPValidationError -from ...types import Response +from ...types import UNSET, Response, Unset def _get_kwargs( source_connection_id: str, *, body: BodyUploadFileToSourceApiSourcesSourceConnectionIdUploadPost, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id _kwargs: dict[str, Any] = { "method": "post", @@ -63,6 +67,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: BodyUploadFileToSourceApiSourcesSourceConnectionIdUploadPost, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError]: r"""Upload a file to a content source @@ -120,6 +125,7 @@ def sync_detailed( Args: source_connection_id (str): + x_account_id (UUID | Unset): body (BodyUploadFileToSourceApiSourcesSourceConnectionIdUploadPost): Raises: @@ -133,6 +139,7 @@ def sync_detailed( kwargs = _get_kwargs( source_connection_id=source_connection_id, body=body, + x_account_id=x_account_id, ) response = client.get_httpx_client().request( @@ -147,6 +154,7 @@ def sync( *, client: AuthenticatedClient | Client, body: BodyUploadFileToSourceApiSourcesSourceConnectionIdUploadPost, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | None: r"""Upload a file to a content source @@ -204,6 +212,7 @@ def sync( Args: source_connection_id (str): + x_account_id (UUID | Unset): body (BodyUploadFileToSourceApiSourcesSourceConnectionIdUploadPost): Raises: @@ -218,6 +227,7 @@ def sync( source_connection_id=source_connection_id, client=client, body=body, + x_account_id=x_account_id, ).parsed @@ -226,6 +236,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: BodyUploadFileToSourceApiSourcesSourceConnectionIdUploadPost, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError]: r"""Upload a file to a content source @@ -283,6 +294,7 @@ async def asyncio_detailed( Args: source_connection_id (str): + x_account_id (UUID | Unset): body (BodyUploadFileToSourceApiSourcesSourceConnectionIdUploadPost): Raises: @@ -296,6 +308,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( source_connection_id=source_connection_id, body=body, + x_account_id=x_account_id, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -308,6 +321,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: BodyUploadFileToSourceApiSourcesSourceConnectionIdUploadPost, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | None: r"""Upload a file to a content source @@ -365,6 +379,7 @@ async def asyncio( Args: source_connection_id (str): + x_account_id (UUID | Unset): body (BodyUploadFileToSourceApiSourcesSourceConnectionIdUploadPost): Raises: @@ -380,5 +395,6 @@ async def asyncio( source_connection_id=source_connection_id, client=client, body=body, + x_account_id=x_account_id, ) ).parsed diff --git a/seclai/_generated/api/sources/upload_inline_text_to_source_api_sources_source_connection_id_post.py b/seclai/_generated/api/sources/upload_inline_text_to_source_api_sources_source_connection_id_post.py new file mode 100644 index 0000000..1f5d697 --- /dev/null +++ b/seclai/_generated/api/sources/upload_inline_text_to_source_api_sources_source_connection_id_post.py @@ -0,0 +1,264 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.inline_text_upload_request import InlineTextUploadRequest +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + source_connection_id: UUID, + *, + body: InlineTextUploadRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/sources/{source_connection_id}".format( + source_connection_id=quote(str(source_connection_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> HTTPValidationError | None: + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + source_connection_id: UUID, + *, + client: AuthenticatedClient | Client, + body: InlineTextUploadRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError]: + """Upload inline text to a content source + + Upload a small text payload to a content source (no multipart/form-data required). + + **Maximum payload size:** 8192 bytes (UTF-8). + + **Supported content types:** + - `application/json` + - `application/xml` + - `text/csv` + - `text/html` + - `text/markdown` + - `text/plain` + - `text/x-markdown` + - `text/xml` + + Notes: + - Use this endpoint for small text payloads; larger files should use `/upload`. + - `title` is merged into `metadata.title` when not already present. + + Args: + source_connection_id (UUID): + x_account_id (UUID | Unset): + body (InlineTextUploadRequest): Request model for inline text uploads. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError] + """ + + kwargs = _get_kwargs( + source_connection_id=source_connection_id, + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + source_connection_id: UUID, + *, + client: AuthenticatedClient | Client, + body: InlineTextUploadRequest, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | None: + """Upload inline text to a content source + + Upload a small text payload to a content source (no multipart/form-data required). + + **Maximum payload size:** 8192 bytes (UTF-8). + + **Supported content types:** + - `application/json` + - `application/xml` + - `text/csv` + - `text/html` + - `text/markdown` + - `text/plain` + - `text/x-markdown` + - `text/xml` + + Notes: + - Use this endpoint for small text payloads; larger files should use `/upload`. + - `title` is merged into `metadata.title` when not already present. + + Args: + source_connection_id (UUID): + x_account_id (UUID | Unset): + body (InlineTextUploadRequest): Request model for inline text uploads. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError + """ + + return sync_detailed( + source_connection_id=source_connection_id, + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + source_connection_id: UUID, + *, + client: AuthenticatedClient | Client, + body: InlineTextUploadRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError]: + """Upload inline text to a content source + + Upload a small text payload to a content source (no multipart/form-data required). + + **Maximum payload size:** 8192 bytes (UTF-8). + + **Supported content types:** + - `application/json` + - `application/xml` + - `text/csv` + - `text/html` + - `text/markdown` + - `text/plain` + - `text/x-markdown` + - `text/xml` + + Notes: + - Use this endpoint for small text payloads; larger files should use `/upload`. + - `title` is merged into `metadata.title` when not already present. + + Args: + source_connection_id (UUID): + x_account_id (UUID | Unset): + body (InlineTextUploadRequest): Request model for inline text uploads. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError] + """ + + kwargs = _get_kwargs( + source_connection_id=source_connection_id, + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + source_connection_id: UUID, + *, + client: AuthenticatedClient | Client, + body: InlineTextUploadRequest, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | None: + """Upload inline text to a content source + + Upload a small text payload to a content source (no multipart/form-data required). + + **Maximum payload size:** 8192 bytes (UTF-8). + + **Supported content types:** + - `application/json` + - `application/xml` + - `text/csv` + - `text/html` + - `text/markdown` + - `text/plain` + - `text/x-markdown` + - `text/xml` + + Notes: + - Use this endpoint for small text payloads; larger files should use `/upload`. + - `title` is merged into `metadata.title` when not already present. + + Args: + source_connection_id (UUID): + x_account_id (UUID | Unset): + body (InlineTextUploadRequest): Request model for inline text uploads. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError + """ + + return ( + await asyncio_detailed( + source_connection_id=source_connection_id, + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/models/__init__.py b/seclai/_generated/models/__init__.py index a688bd2..79fb21f 100644 --- a/seclai/_generated/models/__init__.py +++ b/seclai/_generated/models/__init__.py @@ -1,5 +1,35 @@ """Contains all the data models used in inputs/outputs""" +from .add_alert_comment_api_alerts_alert_id_comments_post_response_add_alert_comment_api_alerts_alert_id_comments_post import ( + AddAlertCommentApiAlertsAlertIdCommentsPostResponseAddAlertCommentApiAlertsAlertIdCommentsPost, +) +from .add_comment_request import AddCommentRequest +from .add_conversation_turn_request import AddConversationTurnRequest +from .add_conversation_turn_request_actions_taken_type_0 import ( + AddConversationTurnRequestActionsTakenType0, +) +from .agent_definition_response import AgentDefinitionResponse +from .agent_definition_response_definition import AgentDefinitionResponseDefinition +from .agent_definition_response_warnings_type_0_item import ( + AgentDefinitionResponseWarningsType0Item, +) +from .agent_evaluation_tier import AgentEvaluationTier +from .agent_export_response import AgentExportResponse +from .agent_export_response_agent import AgentExportResponseAgent +from .agent_export_response_alert_configs_type_0_item import ( + AgentExportResponseAlertConfigsType0Item, +) +from .agent_export_response_dependencies_type_0 import ( + AgentExportResponseDependenciesType0, +) +from .agent_export_response_evaluation_criteria_type_0_item import ( + AgentExportResponseEvaluationCriteriaType0Item, +) +from .agent_export_response_governance_policies_type_0_item import ( + AgentExportResponseGovernancePoliciesType0Item, +) +from .agent_export_response_trigger_type_0 import AgentExportResponseTriggerType0 +from .agent_list_response import AgentListResponse from .agent_run_attempt_response import AgentRunAttemptResponse from .agent_run_list_response import AgentRunListResponse from .agent_run_request import AgentRunRequest @@ -8,29 +38,307 @@ from .agent_run_step_response import AgentRunStepResponse from .agent_run_stream_request import AgentRunStreamRequest from .agent_run_stream_request_metadata_type_0 import AgentRunStreamRequestMetadataType0 +from .agent_summary_response import AgentSummaryResponse +from .agent_summary_response_sampling_config_type_0 import ( + AgentSummaryResponseSamplingConfigType0, +) +from .agent_trace_match_response import AgentTraceMatchResponse +from .agent_trace_search_request import AgentTraceSearchRequest +from .agent_trace_search_response import AgentTraceSearchResponse +from .ai_assistant_accept_request import AiAssistantAcceptRequest +from .ai_assistant_accept_response import AiAssistantAcceptResponse +from .ai_assistant_feedback_request import AiAssistantFeedbackRequest +from .ai_assistant_feedback_request_context_type_0 import ( + AiAssistantFeedbackRequestContextType0, +) +from .ai_assistant_feedback_response import AiAssistantFeedbackResponse +from .ai_assistant_generate_request import AiAssistantGenerateRequest +from .ai_assistant_generate_response import AiAssistantGenerateResponse +from .ai_conversation_history_response import AiConversationHistoryResponse +from .ai_conversation_turn_response import AiConversationTurnResponse +from .ai_conversation_turn_response_resulting_config_type_0 import ( + AiConversationTurnResponseResultingConfigType0, +) +from .api_ai_memory_bank_accept_api_ai_assistant_memory_bank_conversation_id_patch_response_api_ai_memory_bank_accept_api_ai_assistant_memory_bank_conversation_id_patch import ( + ApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatchResponseApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatch, +) +from .applied_action_response import AppliedActionResponse from .body_upload_file_to_content_api_contents_source_connection_content_version_upload_post import ( BodyUploadFileToContentApiContentsSourceConnectionContentVersionUploadPost, ) from .body_upload_file_to_source_api_sources_source_connection_id_upload_post import ( BodyUploadFileToSourceApiSourcesSourceConnectionIdUploadPost, ) +from .change_alert_status_api_alerts_alert_id_status_post_response_change_alert_status_api_alerts_alert_id_status_post import ( + ChangeAlertStatusApiAlertsAlertIdStatusPostResponseChangeAlertStatusApiAlertsAlertIdStatusPost, +) +from .change_status_request import ChangeStatusRequest +from .compact_memory_bank_api_memory_banks_memory_bank_id_compact_post_response_compact_memory_bank_api_memory_banks_memory_bank_id_compact_post import ( + CompactMemoryBankApiMemoryBanksMemoryBankIdCompactPostResponseCompactMemoryBankApiMemoryBanksMemoryBankIdCompactPost, +) +from .compaction_evaluation_model import CompactionEvaluationModel +from .compaction_test_response_model import CompactionTestResponseModel +from .compatible_run_list_response import CompatibleRunListResponse +from .compatible_run_response import CompatibleRunResponse from .content_detail_response import ContentDetailResponse from .content_detail_response_metadata_type_0_item import ( ContentDetailResponseMetadataType0Item, ) from .content_embedding_response import ContentEmbeddingResponse from .content_embeddings_list_response import ContentEmbeddingsListResponse +from .create_agent_request import CreateAgentRequest +from .create_alert_config_api_alerts_configs_post_response_create_alert_config_api_alerts_configs_post import ( + CreateAlertConfigApiAlertsConfigsPostResponseCreateAlertConfigApiAlertsConfigsPost, +) +from .create_alert_config_request import CreateAlertConfigRequest +from .create_alert_config_request_threshold_type_0 import ( + CreateAlertConfigRequestThresholdType0, +) +from .create_evaluation_criteria_request import CreateEvaluationCriteriaRequest +from .create_evaluation_criteria_request_expectation_config_type_0 import ( + CreateEvaluationCriteriaRequestExpectationConfigType0, +) +from .create_evaluation_result_request import CreateEvaluationResultRequest +from .create_evaluation_result_request_details_type_0 import ( + CreateEvaluationResultRequestDetailsType0, +) +from .create_export_request import CreateExportRequest +from .create_export_request_metadata_filter_type_0 import ( + CreateExportRequestMetadataFilterType0, +) +from .create_knowledge_base_body import CreateKnowledgeBaseBody +from .create_memory_bank_body import CreateMemoryBankBody +from .create_solution_request import CreateSolutionRequest +from .create_source_body import CreateSourceBody +from .estimate_export_request import EstimateExportRequest +from .estimate_export_request_metadata_filter_type_0 import ( + EstimateExportRequestMetadataFilterType0, +) +from .estimate_export_response import EstimateExportResponse +from .evaluation_criteria_response import EvaluationCriteriaResponse +from .evaluation_criteria_response_expectation_config_type_0 import ( + EvaluationCriteriaResponseExpectationConfigType0, +) +from .evaluation_criteria_response_result_summary import ( + EvaluationCriteriaResponseResultSummary, +) +from .evaluation_result_list_response import EvaluationResultListResponse +from .evaluation_result_response import EvaluationResultResponse +from .evaluation_result_response_details_type_0 import ( + EvaluationResultResponseDetailsType0, +) +from .evaluation_result_summary_response import EvaluationResultSummaryResponse +from .evaluation_result_with_criteria_list_response import ( + EvaluationResultWithCriteriaListResponse, +) +from .evaluation_result_with_criteria_response import ( + EvaluationResultWithCriteriaResponse, +) +from .evaluation_result_with_criteria_response_details_type_0 import ( + EvaluationResultWithCriteriaResponseDetailsType0, +) +from .evaluation_run_summary_list_response import EvaluationRunSummaryListResponse +from .evaluation_run_summary_response import EvaluationRunSummaryResponse +from .evaluation_status import EvaluationStatus +from .example_prompt import ExamplePrompt +from .executed_action_response import ExecutedActionResponse +from .export_format import ExportFormat +from .export_list_response import ExportListResponse +from .export_response import ExportResponse +from .export_response_metadata_filter_type_0 import ExportResponseMetadataFilterType0 from .file_upload_response import FileUploadResponse +from .generate_agent_steps_request import GenerateAgentStepsRequest +from .generate_agent_steps_request_agent_steps_type_0_item import ( + GenerateAgentStepsRequestAgentStepsType0Item, +) +from .generate_agent_steps_response import GenerateAgentStepsResponse +from .generate_agent_steps_response_agent_config_type_0 import ( + GenerateAgentStepsResponseAgentConfigType0, +) +from .generate_agent_steps_response_steps_item import ( + GenerateAgentStepsResponseStepsItem, +) +from .generate_step_config_request import GenerateStepConfigRequest +from .generate_step_config_request_agent_steps_type_0_item import ( + GenerateStepConfigRequestAgentStepsType0Item, +) +from .generate_step_config_request_current_config_type_0 import ( + GenerateStepConfigRequestCurrentConfigType0, +) +from .generate_step_config_response import GenerateStepConfigResponse +from .generate_step_config_response_resulting_config_type_0 import ( + GenerateStepConfigResponseResultingConfigType0, +) +from .get_agents_using_bank_api_memory_banks_memory_bank_id_agents_get_response_200_item import ( + GetAgentsUsingBankApiMemoryBanksMemoryBankIdAgentsGetResponse200Item, +) +from .get_alert_config_api_alerts_configs_config_id_get_response_get_alert_config_api_alerts_configs_config_id_get import ( + GetAlertConfigApiAlertsConfigsConfigIdGetResponseGetAlertConfigApiAlertsConfigsConfigIdGet, +) +from .get_alert_detail_api_alerts_alert_id_get_response_get_alert_detail_api_alerts_alert_id_get import ( + GetAlertDetailApiAlertsAlertIdGetResponseGetAlertDetailApiAlertsAlertIdGet, +) +from .get_alert_unread_count_api_models_alerts_unread_count_get_response_get_alert_unread_count_api_models_alerts_unread_count_get import ( + GetAlertUnreadCountApiModelsAlertsUnreadCountGetResponseGetAlertUnreadCountApiModelsAlertsUnreadCountGet, +) +from .get_memory_bank_entry_stats_api_memory_banks_memory_bank_id_stats_get_response_get_memory_bank_entry_stats_api_memory_banks_memory_bank_id_stats_get import ( + GetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGetResponseGetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGet, +) +from .get_recommendations_api_models_model_id_recommendations_get_response_get_recommendations_api_models_model_id_recommendations_get import ( + GetRecommendationsApiModelsModelIdRecommendationsGetResponseGetRecommendationsApiModelsModelIdRecommendationsGet, +) +from .governance_ai_accept_response import GovernanceAiAcceptResponse +from .governance_ai_assistant_request import GovernanceAiAssistantRequest +from .governance_ai_assistant_response import GovernanceAiAssistantResponse +from .governance_conversation_response import GovernanceConversationResponse +from .governance_conversation_response_proposed_actions_type_0 import ( + GovernanceConversationResponseProposedActionsType0, +) from .http_validation_error import HTTPValidationError +from .inline_text_replace_request import InlineTextReplaceRequest +from .inline_text_replace_request_metadata_type_0 import ( + InlineTextReplaceRequestMetadataType0, +) +from .inline_text_upload_request import InlineTextUploadRequest +from .inline_text_upload_request_metadata_type_0 import ( + InlineTextUploadRequestMetadataType0, +) +from .knowledge_base import KnowledgeBase +from .knowledge_base_list_response_model import KnowledgeBaseListResponseModel +from .link_resources_request import LinkResourcesRequest +from .list_alert_configs_api_alerts_configs_get_response_list_alert_configs_api_alerts_configs_get import ( + ListAlertConfigsApiAlertsConfigsGetResponseListAlertConfigsApiAlertsConfigsGet, +) +from .list_alerts_api_alerts_get_response_list_alerts_api_alerts_get import ( + ListAlertsApiAlertsGetResponseListAlertsApiAlertsGet, +) +from .list_alerts_api_models_alerts_get_response_list_alerts_api_models_alerts_get import ( + ListAlertsApiModelsAlertsGetResponseListAlertsApiModelsAlertsGet, +) +from .list_templates_api_memory_banks_templates_get_response_200_item import ( + ListTemplatesApiMemoryBanksTemplatesGetResponse200Item, +) +from .mark_ai_suggestion_api_agents_agent_id_ai_assistant_conversation_id_patch_response_mark_ai_suggestion_api_agents_agent_id_ai_assistant_conversation_id_patch import ( + MarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatchResponseMarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatch, +) +from .mark_ai_suggestion_request import MarkAiSuggestionRequest +from .mark_conversation_turn_request import MarkConversationTurnRequest +from .me_response import MeResponse +from .memory_bank import MemoryBank +from .memory_bank_accept_request import MemoryBankAcceptRequest +from .memory_bank_ai_accept_api_memory_banks_ai_assistant_conversation_id_patch_response_memory_bank_ai_accept_api_memory_banks_ai_assistant_conversation_id_patch import ( + MemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatchResponseMemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatch, +) +from .memory_bank_ai_assistant_request import MemoryBankAiAssistantRequest +from .memory_bank_ai_assistant_request_current_config_type_0 import ( + MemoryBankAiAssistantRequestCurrentConfigType0, +) +from .memory_bank_ai_assistant_response import MemoryBankAiAssistantResponse +from .memory_bank_config_response import MemoryBankConfigResponse +from .memory_bank_conversation_turn_response import MemoryBankConversationTurnResponse +from .memory_bank_conversation_turn_response_resulting_config_type_0 import ( + MemoryBankConversationTurnResponseResultingConfigType0, +) +from .memory_bank_last_conversation_response import MemoryBankLastConversationResponse +from .memory_bank_list_response_model import MemoryBankListResponseModel +from .non_manual_evaluation_mode_stat_response import ( + NonManualEvaluationModeStatResponse, +) +from .non_manual_evaluation_summary_response import NonManualEvaluationSummaryResponse +from .organization_alert_preference_list_response import ( + OrganizationAlertPreferenceListResponse, +) +from .organization_alert_preference_response import OrganizationAlertPreferenceResponse +from .organization_info_response import OrganizationInfoResponse from .pagination_response import PaginationResponse from .pending_processing_completed_failed_status import ( PendingProcessingCompletedFailedStatus, ) +from .prompt_model_auto_upgrade_strategy import PromptModelAutoUpgradeStrategy +from .proposed_action_response import ProposedActionResponse +from .proposed_action_response_params import ProposedActionResponseParams +from .proposed_policy_action_response import ProposedPolicyActionResponse +from .proposed_policy_action_response_params import ProposedPolicyActionResponseParams +from .search_api_search_get_response_search_api_search_get import ( + SearchApiSearchGetResponseSearchApiSearchGet, +) +from .solution_agent_response import SolutionAgentResponse +from .solution_conversation_response import SolutionConversationResponse +from .solution_conversation_response_actions_taken_type_0 import ( + SolutionConversationResponseActionsTakenType0, +) +from .solution_knowledge_base_response import SolutionKnowledgeBaseResponse +from .solution_list_response import SolutionListResponse +from .solution_response import SolutionResponse +from .solution_source_connection_response import SolutionSourceConnectionResponse +from .solution_summary_response import SolutionSummaryResponse +from .source_connection_response_model import SourceConnectionResponseModel +from .source_embedding_migration_response import SourceEmbeddingMigrationResponse from .source_list_response import SourceListResponse from .source_response import SourceResponse +from .standalone_test_compaction_request import StandaloneTestCompactionRequest +from .start_source_embedding_migration_request import ( + StartSourceEmbeddingMigrationRequest, +) +from .subscribe_to_alert_api_alerts_alert_id_subscribe_post_response_subscribe_to_alert_api_alerts_alert_id_subscribe_post import ( + SubscribeToAlertApiAlertsAlertIdSubscribePostResponseSubscribeToAlertApiAlertsAlertIdSubscribePost, +) +from .test_compaction_request import TestCompactionRequest +from .test_draft_evaluation_request import TestDraftEvaluationRequest +from .test_draft_evaluation_request_expectation_config_type_0 import ( + TestDraftEvaluationRequestExpectationConfigType0, +) +from .test_draft_evaluation_response import TestDraftEvaluationResponse +from .unlink_resources_request import UnlinkResourcesRequest +from .unsubscribe_from_alert_api_alerts_alert_id_unsubscribe_post_response_unsubscribe_from_alert_api_alerts_alert_id_unsubscribe_post import ( + UnsubscribeFromAlertApiAlertsAlertIdUnsubscribePostResponseUnsubscribeFromAlertApiAlertsAlertIdUnsubscribePost, +) +from .update_agent_definition_request import UpdateAgentDefinitionRequest +from .update_agent_definition_request_definition import ( + UpdateAgentDefinitionRequestDefinition, +) +from .update_agent_request import UpdateAgentRequest +from .update_agent_request_sampling_config_type_0 import ( + UpdateAgentRequestSamplingConfigType0, +) +from .update_alert_config_api_alerts_configs_config_id_patch_response_update_alert_config_api_alerts_configs_config_id_patch import ( + UpdateAlertConfigApiAlertsConfigsConfigIdPatchResponseUpdateAlertConfigApiAlertsConfigsConfigIdPatch, +) +from .update_alert_config_request import UpdateAlertConfigRequest +from .update_alert_config_request_threshold_type_0 import ( + UpdateAlertConfigRequestThresholdType0, +) +from .update_evaluation_criteria_request import UpdateEvaluationCriteriaRequest +from .update_evaluation_criteria_request_expectation_config_type_0 import ( + UpdateEvaluationCriteriaRequestExpectationConfigType0, +) +from .update_knowledge_base_body import UpdateKnowledgeBaseBody +from .update_memory_bank_body import UpdateMemoryBankBody +from .update_organization_alert_preference_request import ( + UpdateOrganizationAlertPreferenceRequest, +) +from .update_solution_request import UpdateSolutionRequest +from .update_source_body import UpdateSourceBody +from .upload_agent_input_api_response import UploadAgentInputApiResponse from .validation_error import ValidationError __all__ = ( + "AddAlertCommentApiAlertsAlertIdCommentsPostResponseAddAlertCommentApiAlertsAlertIdCommentsPost", + "AddCommentRequest", + "AddConversationTurnRequest", + "AddConversationTurnRequestActionsTakenType0", + "AgentDefinitionResponse", + "AgentDefinitionResponseDefinition", + "AgentDefinitionResponseWarningsType0Item", + "AgentEvaluationTier", + "AgentExportResponse", + "AgentExportResponseAgent", + "AgentExportResponseAlertConfigsType0Item", + "AgentExportResponseDependenciesType0", + "AgentExportResponseEvaluationCriteriaType0Item", + "AgentExportResponseGovernancePoliciesType0Item", + "AgentExportResponseTriggerType0", + "AgentListResponse", "AgentRunAttemptResponse", "AgentRunListResponse", "AgentRunRequest", @@ -39,17 +347,169 @@ "AgentRunStepResponse", "AgentRunStreamRequest", "AgentRunStreamRequestMetadataType0", + "AgentSummaryResponse", + "AgentSummaryResponseSamplingConfigType0", + "AgentTraceMatchResponse", + "AgentTraceSearchRequest", + "AgentTraceSearchResponse", + "AiAssistantAcceptRequest", + "AiAssistantAcceptResponse", + "AiAssistantFeedbackRequest", + "AiAssistantFeedbackRequestContextType0", + "AiAssistantFeedbackResponse", + "AiAssistantGenerateRequest", + "AiAssistantGenerateResponse", + "AiConversationHistoryResponse", + "AiConversationTurnResponse", + "AiConversationTurnResponseResultingConfigType0", + "ApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatchResponseApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatch", + "AppliedActionResponse", "BodyUploadFileToContentApiContentsSourceConnectionContentVersionUploadPost", "BodyUploadFileToSourceApiSourcesSourceConnectionIdUploadPost", + "ChangeAlertStatusApiAlertsAlertIdStatusPostResponseChangeAlertStatusApiAlertsAlertIdStatusPost", + "ChangeStatusRequest", + "CompactionEvaluationModel", + "CompactionTestResponseModel", + "CompactMemoryBankApiMemoryBanksMemoryBankIdCompactPostResponseCompactMemoryBankApiMemoryBanksMemoryBankIdCompactPost", + "CompatibleRunListResponse", + "CompatibleRunResponse", "ContentDetailResponse", "ContentDetailResponseMetadataType0Item", "ContentEmbeddingResponse", "ContentEmbeddingsListResponse", + "CreateAgentRequest", + "CreateAlertConfigApiAlertsConfigsPostResponseCreateAlertConfigApiAlertsConfigsPost", + "CreateAlertConfigRequest", + "CreateAlertConfigRequestThresholdType0", + "CreateEvaluationCriteriaRequest", + "CreateEvaluationCriteriaRequestExpectationConfigType0", + "CreateEvaluationResultRequest", + "CreateEvaluationResultRequestDetailsType0", + "CreateExportRequest", + "CreateExportRequestMetadataFilterType0", + "CreateKnowledgeBaseBody", + "CreateMemoryBankBody", + "CreateSolutionRequest", + "CreateSourceBody", + "EstimateExportRequest", + "EstimateExportRequestMetadataFilterType0", + "EstimateExportResponse", + "EvaluationCriteriaResponse", + "EvaluationCriteriaResponseExpectationConfigType0", + "EvaluationCriteriaResponseResultSummary", + "EvaluationResultListResponse", + "EvaluationResultResponse", + "EvaluationResultResponseDetailsType0", + "EvaluationResultSummaryResponse", + "EvaluationResultWithCriteriaListResponse", + "EvaluationResultWithCriteriaResponse", + "EvaluationResultWithCriteriaResponseDetailsType0", + "EvaluationRunSummaryListResponse", + "EvaluationRunSummaryResponse", + "EvaluationStatus", + "ExamplePrompt", + "ExecutedActionResponse", + "ExportFormat", + "ExportListResponse", + "ExportResponse", + "ExportResponseMetadataFilterType0", "FileUploadResponse", + "GenerateAgentStepsRequest", + "GenerateAgentStepsRequestAgentStepsType0Item", + "GenerateAgentStepsResponse", + "GenerateAgentStepsResponseAgentConfigType0", + "GenerateAgentStepsResponseStepsItem", + "GenerateStepConfigRequest", + "GenerateStepConfigRequestAgentStepsType0Item", + "GenerateStepConfigRequestCurrentConfigType0", + "GenerateStepConfigResponse", + "GenerateStepConfigResponseResultingConfigType0", + "GetAgentsUsingBankApiMemoryBanksMemoryBankIdAgentsGetResponse200Item", + "GetAlertConfigApiAlertsConfigsConfigIdGetResponseGetAlertConfigApiAlertsConfigsConfigIdGet", + "GetAlertDetailApiAlertsAlertIdGetResponseGetAlertDetailApiAlertsAlertIdGet", + "GetAlertUnreadCountApiModelsAlertsUnreadCountGetResponseGetAlertUnreadCountApiModelsAlertsUnreadCountGet", + "GetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGetResponseGetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGet", + "GetRecommendationsApiModelsModelIdRecommendationsGetResponseGetRecommendationsApiModelsModelIdRecommendationsGet", + "GovernanceAiAcceptResponse", + "GovernanceAiAssistantRequest", + "GovernanceAiAssistantResponse", + "GovernanceConversationResponse", + "GovernanceConversationResponseProposedActionsType0", "HTTPValidationError", + "InlineTextReplaceRequest", + "InlineTextReplaceRequestMetadataType0", + "InlineTextUploadRequest", + "InlineTextUploadRequestMetadataType0", + "KnowledgeBase", + "KnowledgeBaseListResponseModel", + "LinkResourcesRequest", + "ListAlertConfigsApiAlertsConfigsGetResponseListAlertConfigsApiAlertsConfigsGet", + "ListAlertsApiAlertsGetResponseListAlertsApiAlertsGet", + "ListAlertsApiModelsAlertsGetResponseListAlertsApiModelsAlertsGet", + "ListTemplatesApiMemoryBanksTemplatesGetResponse200Item", + "MarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatchResponseMarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatch", + "MarkAiSuggestionRequest", + "MarkConversationTurnRequest", + "MemoryBank", + "MemoryBankAcceptRequest", + "MemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatchResponseMemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatch", + "MemoryBankAiAssistantRequest", + "MemoryBankAiAssistantRequestCurrentConfigType0", + "MemoryBankAiAssistantResponse", + "MemoryBankConfigResponse", + "MemoryBankConversationTurnResponse", + "MemoryBankConversationTurnResponseResultingConfigType0", + "MemoryBankLastConversationResponse", + "MemoryBankListResponseModel", + "MeResponse", + "NonManualEvaluationModeStatResponse", + "NonManualEvaluationSummaryResponse", + "OrganizationAlertPreferenceListResponse", + "OrganizationAlertPreferenceResponse", + "OrganizationInfoResponse", "PaginationResponse", "PendingProcessingCompletedFailedStatus", + "PromptModelAutoUpgradeStrategy", + "ProposedActionResponse", + "ProposedActionResponseParams", + "ProposedPolicyActionResponse", + "ProposedPolicyActionResponseParams", + "SearchApiSearchGetResponseSearchApiSearchGet", + "SolutionAgentResponse", + "SolutionConversationResponse", + "SolutionConversationResponseActionsTakenType0", + "SolutionKnowledgeBaseResponse", + "SolutionListResponse", + "SolutionResponse", + "SolutionSourceConnectionResponse", + "SolutionSummaryResponse", + "SourceConnectionResponseModel", + "SourceEmbeddingMigrationResponse", "SourceListResponse", "SourceResponse", + "StandaloneTestCompactionRequest", + "StartSourceEmbeddingMigrationRequest", + "SubscribeToAlertApiAlertsAlertIdSubscribePostResponseSubscribeToAlertApiAlertsAlertIdSubscribePost", + "TestCompactionRequest", + "TestDraftEvaluationRequest", + "TestDraftEvaluationRequestExpectationConfigType0", + "TestDraftEvaluationResponse", + "UnlinkResourcesRequest", + "UnsubscribeFromAlertApiAlertsAlertIdUnsubscribePostResponseUnsubscribeFromAlertApiAlertsAlertIdUnsubscribePost", + "UpdateAgentDefinitionRequest", + "UpdateAgentDefinitionRequestDefinition", + "UpdateAgentRequest", + "UpdateAgentRequestSamplingConfigType0", + "UpdateAlertConfigApiAlertsConfigsConfigIdPatchResponseUpdateAlertConfigApiAlertsConfigsConfigIdPatch", + "UpdateAlertConfigRequest", + "UpdateAlertConfigRequestThresholdType0", + "UpdateEvaluationCriteriaRequest", + "UpdateEvaluationCriteriaRequestExpectationConfigType0", + "UpdateKnowledgeBaseBody", + "UpdateMemoryBankBody", + "UpdateOrganizationAlertPreferenceRequest", + "UpdateSolutionRequest", + "UpdateSourceBody", + "UploadAgentInputApiResponse", "ValidationError", ) diff --git a/seclai/_generated/models/add_alert_comment_api_alerts_alert_id_comments_post_response_add_alert_comment_api_alerts_alert_id_comments_post.py b/seclai/_generated/models/add_alert_comment_api_alerts_alert_id_comments_post_response_add_alert_comment_api_alerts_alert_id_comments_post.py new file mode 100644 index 0000000..d8f2725 --- /dev/null +++ b/seclai/_generated/models/add_alert_comment_api_alerts_alert_id_comments_post_response_add_alert_comment_api_alerts_alert_id_comments_post.py @@ -0,0 +1,53 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar( + "T", + bound="AddAlertCommentApiAlertsAlertIdCommentsPostResponseAddAlertCommentApiAlertsAlertIdCommentsPost", +) + + +@_attrs_define +class AddAlertCommentApiAlertsAlertIdCommentsPostResponseAddAlertCommentApiAlertsAlertIdCommentsPost: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + add_alert_comment_api_alerts_alert_id_comments_post_response_add_alert_comment_api_alerts_alert_id_comments_post = ( + cls() + ) + + add_alert_comment_api_alerts_alert_id_comments_post_response_add_alert_comment_api_alerts_alert_id_comments_post.additional_properties = ( + d + ) + return add_alert_comment_api_alerts_alert_id_comments_post_response_add_alert_comment_api_alerts_alert_id_comments_post + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/add_comment_request.py b/seclai/_generated/models/add_comment_request.py new file mode 100644 index 0000000..a10326f --- /dev/null +++ b/seclai/_generated/models/add_comment_request.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AddCommentRequest") + + +@_attrs_define +class AddCommentRequest: + """ + Attributes: + body (str): Comment text + """ + + body: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + body = self.body + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "body": body, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + body = d.pop("body") + + add_comment_request = cls( + body=body, + ) + + add_comment_request.additional_properties = d + return add_comment_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/add_conversation_turn_request.py b/seclai/_generated/models/add_conversation_turn_request.py new file mode 100644 index 0000000..f8a3c24 --- /dev/null +++ b/seclai/_generated/models/add_conversation_turn_request.py @@ -0,0 +1,135 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.add_conversation_turn_request_actions_taken_type_0 import ( + AddConversationTurnRequestActionsTakenType0, + ) + + +T = TypeVar("T", bound="AddConversationTurnRequest") + + +@_attrs_define +class AddConversationTurnRequest: + """ + Attributes: + user_input (str): User input text + actions_taken (AddConversationTurnRequestActionsTakenType0 | None | Unset): Actions taken by the AI + ai_response (None | str | Unset): AI response text + """ + + user_input: str + actions_taken: AddConversationTurnRequestActionsTakenType0 | None | Unset = UNSET + ai_response: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.add_conversation_turn_request_actions_taken_type_0 import ( + AddConversationTurnRequestActionsTakenType0, + ) + + user_input = self.user_input + + actions_taken: dict[str, Any] | None | Unset + if isinstance(self.actions_taken, Unset): + actions_taken = UNSET + elif isinstance( + self.actions_taken, AddConversationTurnRequestActionsTakenType0 + ): + actions_taken = self.actions_taken.to_dict() + else: + actions_taken = self.actions_taken + + ai_response: None | str | Unset + if isinstance(self.ai_response, Unset): + ai_response = UNSET + else: + ai_response = self.ai_response + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "user_input": user_input, + } + ) + if actions_taken is not UNSET: + field_dict["actions_taken"] = actions_taken + if ai_response is not UNSET: + field_dict["ai_response"] = ai_response + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.add_conversation_turn_request_actions_taken_type_0 import ( + AddConversationTurnRequestActionsTakenType0, + ) + + d = dict(src_dict) + user_input = d.pop("user_input") + + def _parse_actions_taken( + data: object, + ) -> AddConversationTurnRequestActionsTakenType0 | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + actions_taken_type_0 = ( + AddConversationTurnRequestActionsTakenType0.from_dict(data) + ) + + return actions_taken_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast( + AddConversationTurnRequestActionsTakenType0 | None | Unset, data + ) + + actions_taken = _parse_actions_taken(d.pop("actions_taken", UNSET)) + + def _parse_ai_response(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + ai_response = _parse_ai_response(d.pop("ai_response", UNSET)) + + add_conversation_turn_request = cls( + user_input=user_input, + actions_taken=actions_taken, + ai_response=ai_response, + ) + + add_conversation_turn_request.additional_properties = d + return add_conversation_turn_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/add_conversation_turn_request_actions_taken_type_0.py b/seclai/_generated/models/add_conversation_turn_request_actions_taken_type_0.py new file mode 100644 index 0000000..6ffd995 --- /dev/null +++ b/seclai/_generated/models/add_conversation_turn_request_actions_taken_type_0.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AddConversationTurnRequestActionsTakenType0") + + +@_attrs_define +class AddConversationTurnRequestActionsTakenType0: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + add_conversation_turn_request_actions_taken_type_0 = cls() + + add_conversation_turn_request_actions_taken_type_0.additional_properties = d + return add_conversation_turn_request_actions_taken_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/agent_definition_response.py b/seclai/_generated/models/agent_definition_response.py new file mode 100644 index 0000000..507c360 --- /dev/null +++ b/seclai/_generated/models/agent_definition_response.py @@ -0,0 +1,145 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.agent_definition_response_definition import ( + AgentDefinitionResponseDefinition, + ) + from ..models.agent_definition_response_warnings_type_0_item import ( + AgentDefinitionResponseWarningsType0Item, + ) + + +T = TypeVar("T", bound="AgentDefinitionResponse") + + +@_attrs_define +class AgentDefinitionResponse: + """ + Attributes: + change_id (str): Current change ID (use as expected_change_id when updating). + definition (AgentDefinitionResponseDefinition): The agent definition containing name, description, tags, and + step workflow tree. Step types include prompt_call, retrieval, transform, gate, retry, evaluate_step, insight, + extract_json, send_email, webhook_call, call_agent, write_metadata, write_content_attachment, + load_content_attachment, load_content, display_result, and others. + schema_version (str): Agent schema version. + warnings (list[AgentDefinitionResponseWarningsType0Item] | None | Unset): Validation warnings, if any. + """ + + change_id: str + definition: AgentDefinitionResponseDefinition + schema_version: str + warnings: list[AgentDefinitionResponseWarningsType0Item] | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + change_id = self.change_id + + definition = self.definition.to_dict() + + schema_version = self.schema_version + + warnings: list[dict[str, Any]] | None | Unset + if isinstance(self.warnings, Unset): + warnings = UNSET + elif isinstance(self.warnings, list): + warnings = [] + for warnings_type_0_item_data in self.warnings: + warnings_type_0_item = warnings_type_0_item_data.to_dict() + warnings.append(warnings_type_0_item) + + else: + warnings = self.warnings + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "change_id": change_id, + "definition": definition, + "schema_version": schema_version, + } + ) + if warnings is not UNSET: + field_dict["warnings"] = warnings + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.agent_definition_response_definition import ( + AgentDefinitionResponseDefinition, + ) + from ..models.agent_definition_response_warnings_type_0_item import ( + AgentDefinitionResponseWarningsType0Item, + ) + + d = dict(src_dict) + change_id = d.pop("change_id") + + definition = AgentDefinitionResponseDefinition.from_dict(d.pop("definition")) + + schema_version = d.pop("schema_version") + + def _parse_warnings( + data: object, + ) -> list[AgentDefinitionResponseWarningsType0Item] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + warnings_type_0 = [] + _warnings_type_0 = data + for warnings_type_0_item_data in _warnings_type_0: + warnings_type_0_item = ( + AgentDefinitionResponseWarningsType0Item.from_dict( + warnings_type_0_item_data + ) + ) + + warnings_type_0.append(warnings_type_0_item) + + return warnings_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast( + list[AgentDefinitionResponseWarningsType0Item] | None | Unset, data + ) + + warnings = _parse_warnings(d.pop("warnings", UNSET)) + + agent_definition_response = cls( + change_id=change_id, + definition=definition, + schema_version=schema_version, + warnings=warnings, + ) + + agent_definition_response.additional_properties = d + return agent_definition_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/agent_definition_response_definition.py b/seclai/_generated/models/agent_definition_response_definition.py new file mode 100644 index 0000000..ce24474 --- /dev/null +++ b/seclai/_generated/models/agent_definition_response_definition.py @@ -0,0 +1,50 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AgentDefinitionResponseDefinition") + + +@_attrs_define +class AgentDefinitionResponseDefinition: + """The agent definition containing name, description, tags, and step workflow tree. Step types include prompt_call, + retrieval, transform, gate, retry, evaluate_step, insight, extract_json, send_email, webhook_call, call_agent, + write_metadata, write_content_attachment, load_content_attachment, load_content, display_result, and others. + + """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + agent_definition_response_definition = cls() + + agent_definition_response_definition.additional_properties = d + return agent_definition_response_definition + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/agent_definition_response_warnings_type_0_item.py b/seclai/_generated/models/agent_definition_response_warnings_type_0_item.py new file mode 100644 index 0000000..cfc7887 --- /dev/null +++ b/seclai/_generated/models/agent_definition_response_warnings_type_0_item.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AgentDefinitionResponseWarningsType0Item") + + +@_attrs_define +class AgentDefinitionResponseWarningsType0Item: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + agent_definition_response_warnings_type_0_item = cls() + + agent_definition_response_warnings_type_0_item.additional_properties = d + return agent_definition_response_warnings_type_0_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/agent_evaluation_tier.py b/seclai/_generated/models/agent_evaluation_tier.py new file mode 100644 index 0000000..ea671db --- /dev/null +++ b/seclai/_generated/models/agent_evaluation_tier.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class AgentEvaluationTier(str, Enum): + BALANCED = "balanced" + FAST = "fast" + THOROUGH = "thorough" + + def __str__(self) -> str: + return str(self.value) diff --git a/seclai/_generated/models/agent_export_response.py b/seclai/_generated/models/agent_export_response.py new file mode 100644 index 0000000..f51281a --- /dev/null +++ b/seclai/_generated/models/agent_export_response.py @@ -0,0 +1,358 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.agent_export_response_agent import AgentExportResponseAgent + from ..models.agent_export_response_alert_configs_type_0_item import ( + AgentExportResponseAlertConfigsType0Item, + ) + from ..models.agent_export_response_dependencies_type_0 import ( + AgentExportResponseDependenciesType0, + ) + from ..models.agent_export_response_evaluation_criteria_type_0_item import ( + AgentExportResponseEvaluationCriteriaType0Item, + ) + from ..models.agent_export_response_governance_policies_type_0_item import ( + AgentExportResponseGovernancePoliciesType0Item, + ) + from ..models.agent_export_response_trigger_type_0 import ( + AgentExportResponseTriggerType0, + ) + + +T = TypeVar("T", bound="AgentExportResponse") + + +@_attrs_define +class AgentExportResponse: + """Portable JSON snapshot of an agent definition. + + Attributes: + agent (AgentExportResponseAgent): Agent metadata and full definition. Keys: name, description, schema_version, + definition, default_evaluation_tier, evaluation_mode, sampling_config, max_retries, retry_on_failure, + prompt_model_auto_upgrade_strategy, prompt_model_auto_rollback_enabled, prompt_model_auto_rollback_triggers, + created_at, updated_at. + export_version (str): Schema version of the export format (currently "2"). + exported_at (str): ISO-8601 timestamp of when the export was generated. + software_version (str): Application version that produced this export. + alert_configs (list[AgentExportResponseAlertConfigsType0Item] | None | Unset): Alert configurations. + dependencies (AgentExportResponseDependenciesType0 | None | Unset): Resolved dependency manifest. Keys: + knowledge_bases, memory_banks, source_connections, agents, users — each a list of {id, name, description, …}. + evaluation_criteria (list[AgentExportResponseEvaluationCriteriaType0Item] | None | Unset): Evaluation criteria + for agent steps. + governance_policies (list[AgentExportResponseGovernancePoliciesType0Item] | None | Unset): Agent-scoped + governance policies. + trigger (AgentExportResponseTriggerType0 | None | Unset): Trigger configuration with schedules. + """ + + agent: AgentExportResponseAgent + export_version: str + exported_at: str + software_version: str + alert_configs: list[AgentExportResponseAlertConfigsType0Item] | None | Unset = UNSET + dependencies: AgentExportResponseDependenciesType0 | None | Unset = UNSET + evaluation_criteria: ( + list[AgentExportResponseEvaluationCriteriaType0Item] | None | Unset + ) = UNSET + governance_policies: ( + list[AgentExportResponseGovernancePoliciesType0Item] | None | Unset + ) = UNSET + trigger: AgentExportResponseTriggerType0 | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.agent_export_response_dependencies_type_0 import ( + AgentExportResponseDependenciesType0, + ) + from ..models.agent_export_response_trigger_type_0 import ( + AgentExportResponseTriggerType0, + ) + + agent = self.agent.to_dict() + + export_version = self.export_version + + exported_at = self.exported_at + + software_version = self.software_version + + alert_configs: list[dict[str, Any]] | None | Unset + if isinstance(self.alert_configs, Unset): + alert_configs = UNSET + elif isinstance(self.alert_configs, list): + alert_configs = [] + for alert_configs_type_0_item_data in self.alert_configs: + alert_configs_type_0_item = alert_configs_type_0_item_data.to_dict() + alert_configs.append(alert_configs_type_0_item) + + else: + alert_configs = self.alert_configs + + dependencies: dict[str, Any] | None | Unset + if isinstance(self.dependencies, Unset): + dependencies = UNSET + elif isinstance(self.dependencies, AgentExportResponseDependenciesType0): + dependencies = self.dependencies.to_dict() + else: + dependencies = self.dependencies + + evaluation_criteria: list[dict[str, Any]] | None | Unset + if isinstance(self.evaluation_criteria, Unset): + evaluation_criteria = UNSET + elif isinstance(self.evaluation_criteria, list): + evaluation_criteria = [] + for evaluation_criteria_type_0_item_data in self.evaluation_criteria: + evaluation_criteria_type_0_item = ( + evaluation_criteria_type_0_item_data.to_dict() + ) + evaluation_criteria.append(evaluation_criteria_type_0_item) + + else: + evaluation_criteria = self.evaluation_criteria + + governance_policies: list[dict[str, Any]] | None | Unset + if isinstance(self.governance_policies, Unset): + governance_policies = UNSET + elif isinstance(self.governance_policies, list): + governance_policies = [] + for governance_policies_type_0_item_data in self.governance_policies: + governance_policies_type_0_item = ( + governance_policies_type_0_item_data.to_dict() + ) + governance_policies.append(governance_policies_type_0_item) + + else: + governance_policies = self.governance_policies + + trigger: dict[str, Any] | None | Unset + if isinstance(self.trigger, Unset): + trigger = UNSET + elif isinstance(self.trigger, AgentExportResponseTriggerType0): + trigger = self.trigger.to_dict() + else: + trigger = self.trigger + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "agent": agent, + "export_version": export_version, + "exported_at": exported_at, + "software_version": software_version, + } + ) + if alert_configs is not UNSET: + field_dict["alert_configs"] = alert_configs + if dependencies is not UNSET: + field_dict["dependencies"] = dependencies + if evaluation_criteria is not UNSET: + field_dict["evaluation_criteria"] = evaluation_criteria + if governance_policies is not UNSET: + field_dict["governance_policies"] = governance_policies + if trigger is not UNSET: + field_dict["trigger"] = trigger + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.agent_export_response_agent import AgentExportResponseAgent + from ..models.agent_export_response_alert_configs_type_0_item import ( + AgentExportResponseAlertConfigsType0Item, + ) + from ..models.agent_export_response_dependencies_type_0 import ( + AgentExportResponseDependenciesType0, + ) + from ..models.agent_export_response_evaluation_criteria_type_0_item import ( + AgentExportResponseEvaluationCriteriaType0Item, + ) + from ..models.agent_export_response_governance_policies_type_0_item import ( + AgentExportResponseGovernancePoliciesType0Item, + ) + from ..models.agent_export_response_trigger_type_0 import ( + AgentExportResponseTriggerType0, + ) + + d = dict(src_dict) + agent = AgentExportResponseAgent.from_dict(d.pop("agent")) + + export_version = d.pop("export_version") + + exported_at = d.pop("exported_at") + + software_version = d.pop("software_version") + + def _parse_alert_configs( + data: object, + ) -> list[AgentExportResponseAlertConfigsType0Item] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + alert_configs_type_0 = [] + _alert_configs_type_0 = data + for alert_configs_type_0_item_data in _alert_configs_type_0: + alert_configs_type_0_item = ( + AgentExportResponseAlertConfigsType0Item.from_dict( + alert_configs_type_0_item_data + ) + ) + + alert_configs_type_0.append(alert_configs_type_0_item) + + return alert_configs_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast( + list[AgentExportResponseAlertConfigsType0Item] | None | Unset, data + ) + + alert_configs = _parse_alert_configs(d.pop("alert_configs", UNSET)) + + def _parse_dependencies( + data: object, + ) -> AgentExportResponseDependenciesType0 | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + dependencies_type_0 = AgentExportResponseDependenciesType0.from_dict( + data + ) + + return dependencies_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(AgentExportResponseDependenciesType0 | None | Unset, data) + + dependencies = _parse_dependencies(d.pop("dependencies", UNSET)) + + def _parse_evaluation_criteria( + data: object, + ) -> list[AgentExportResponseEvaluationCriteriaType0Item] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + evaluation_criteria_type_0 = [] + _evaluation_criteria_type_0 = data + for evaluation_criteria_type_0_item_data in _evaluation_criteria_type_0: + evaluation_criteria_type_0_item = ( + AgentExportResponseEvaluationCriteriaType0Item.from_dict( + evaluation_criteria_type_0_item_data + ) + ) + + evaluation_criteria_type_0.append(evaluation_criteria_type_0_item) + + return evaluation_criteria_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast( + list[AgentExportResponseEvaluationCriteriaType0Item] | None | Unset, + data, + ) + + evaluation_criteria = _parse_evaluation_criteria( + d.pop("evaluation_criteria", UNSET) + ) + + def _parse_governance_policies( + data: object, + ) -> list[AgentExportResponseGovernancePoliciesType0Item] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + governance_policies_type_0 = [] + _governance_policies_type_0 = data + for governance_policies_type_0_item_data in _governance_policies_type_0: + governance_policies_type_0_item = ( + AgentExportResponseGovernancePoliciesType0Item.from_dict( + governance_policies_type_0_item_data + ) + ) + + governance_policies_type_0.append(governance_policies_type_0_item) + + return governance_policies_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast( + list[AgentExportResponseGovernancePoliciesType0Item] | None | Unset, + data, + ) + + governance_policies = _parse_governance_policies( + d.pop("governance_policies", UNSET) + ) + + def _parse_trigger( + data: object, + ) -> AgentExportResponseTriggerType0 | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + trigger_type_0 = AgentExportResponseTriggerType0.from_dict(data) + + return trigger_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(AgentExportResponseTriggerType0 | None | Unset, data) + + trigger = _parse_trigger(d.pop("trigger", UNSET)) + + agent_export_response = cls( + agent=agent, + export_version=export_version, + exported_at=exported_at, + software_version=software_version, + alert_configs=alert_configs, + dependencies=dependencies, + evaluation_criteria=evaluation_criteria, + governance_policies=governance_policies, + trigger=trigger, + ) + + agent_export_response.additional_properties = d + return agent_export_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/agent_export_response_agent.py b/seclai/_generated/models/agent_export_response_agent.py new file mode 100644 index 0000000..b01a142 --- /dev/null +++ b/seclai/_generated/models/agent_export_response_agent.py @@ -0,0 +1,50 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AgentExportResponseAgent") + + +@_attrs_define +class AgentExportResponseAgent: + """Agent metadata and full definition. Keys: name, description, schema_version, definition, default_evaluation_tier, + evaluation_mode, sampling_config, max_retries, retry_on_failure, prompt_model_auto_upgrade_strategy, + prompt_model_auto_rollback_enabled, prompt_model_auto_rollback_triggers, created_at, updated_at. + + """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + agent_export_response_agent = cls() + + agent_export_response_agent.additional_properties = d + return agent_export_response_agent + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/agent_export_response_alert_configs_type_0_item.py b/seclai/_generated/models/agent_export_response_alert_configs_type_0_item.py new file mode 100644 index 0000000..e256120 --- /dev/null +++ b/seclai/_generated/models/agent_export_response_alert_configs_type_0_item.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AgentExportResponseAlertConfigsType0Item") + + +@_attrs_define +class AgentExportResponseAlertConfigsType0Item: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + agent_export_response_alert_configs_type_0_item = cls() + + agent_export_response_alert_configs_type_0_item.additional_properties = d + return agent_export_response_alert_configs_type_0_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/agent_export_response_dependencies_type_0.py b/seclai/_generated/models/agent_export_response_dependencies_type_0.py new file mode 100644 index 0000000..787acc2 --- /dev/null +++ b/seclai/_generated/models/agent_export_response_dependencies_type_0.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AgentExportResponseDependenciesType0") + + +@_attrs_define +class AgentExportResponseDependenciesType0: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + agent_export_response_dependencies_type_0 = cls() + + agent_export_response_dependencies_type_0.additional_properties = d + return agent_export_response_dependencies_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/agent_export_response_evaluation_criteria_type_0_item.py b/seclai/_generated/models/agent_export_response_evaluation_criteria_type_0_item.py new file mode 100644 index 0000000..a2501b8 --- /dev/null +++ b/seclai/_generated/models/agent_export_response_evaluation_criteria_type_0_item.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AgentExportResponseEvaluationCriteriaType0Item") + + +@_attrs_define +class AgentExportResponseEvaluationCriteriaType0Item: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + agent_export_response_evaluation_criteria_type_0_item = cls() + + agent_export_response_evaluation_criteria_type_0_item.additional_properties = d + return agent_export_response_evaluation_criteria_type_0_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/agent_export_response_governance_policies_type_0_item.py b/seclai/_generated/models/agent_export_response_governance_policies_type_0_item.py new file mode 100644 index 0000000..15b78d3 --- /dev/null +++ b/seclai/_generated/models/agent_export_response_governance_policies_type_0_item.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AgentExportResponseGovernancePoliciesType0Item") + + +@_attrs_define +class AgentExportResponseGovernancePoliciesType0Item: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + agent_export_response_governance_policies_type_0_item = cls() + + agent_export_response_governance_policies_type_0_item.additional_properties = d + return agent_export_response_governance_policies_type_0_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/agent_export_response_trigger_type_0.py b/seclai/_generated/models/agent_export_response_trigger_type_0.py new file mode 100644 index 0000000..927472c --- /dev/null +++ b/seclai/_generated/models/agent_export_response_trigger_type_0.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AgentExportResponseTriggerType0") + + +@_attrs_define +class AgentExportResponseTriggerType0: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + agent_export_response_trigger_type_0 = cls() + + agent_export_response_trigger_type_0.additional_properties = d + return agent_export_response_trigger_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/agent_list_response.py b/seclai/_generated/models/agent_list_response.py new file mode 100644 index 0000000..a53173f --- /dev/null +++ b/seclai/_generated/models/agent_list_response.py @@ -0,0 +1,85 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.agent_summary_response import AgentSummaryResponse + from ..models.pagination_response import PaginationResponse + + +T = TypeVar("T", bound="AgentListResponse") + + +@_attrs_define +class AgentListResponse: + """ + Attributes: + data (list[AgentSummaryResponse]): List of agents. + pagination (PaginationResponse): Pagination information. + """ + + data: list[AgentSummaryResponse] + pagination: PaginationResponse + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + pagination = self.pagination.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + "pagination": pagination, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.agent_summary_response import AgentSummaryResponse + from ..models.pagination_response import PaginationResponse + + d = dict(src_dict) + data = [] + _data = d.pop("data") + for data_item_data in _data: + data_item = AgentSummaryResponse.from_dict(data_item_data) + + data.append(data_item) + + pagination = PaginationResponse.from_dict(d.pop("pagination")) + + agent_list_response = cls( + data=data, + pagination=pagination, + ) + + agent_list_response.additional_properties = d + return agent_list_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/agent_run_request.py b/seclai/_generated/models/agent_run_request.py index 8f08c65..429f67c 100644 --- a/seclai/_generated/models/agent_run_request.py +++ b/seclai/_generated/models/agent_run_request.py @@ -2,6 +2,7 @@ from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -19,14 +20,17 @@ class AgentRunRequest: """ Attributes: - input_ (None | str): Input to provide to the agent upon running for agents with dynamic triggers. - metadata (AgentRunRequestMetadataType0 | None): Metadata to make available for string substitution expressions - in agent tasks. + input_ (None | str | Unset): Input to provide to the agent upon running for agents with dynamic triggers. + input_upload_id (None | Unset | UUID): ID of a previously uploaded file (via POST /{agent_id}/upload-input) to + use as the run input for dynamic-input triggers. Mutually exclusive with the 'input' field. + metadata (AgentRunRequestMetadataType0 | None | Unset): Metadata to make available for string substitution + expressions in agent tasks. priority (bool | Unset): If true, the agent run will be treated as priority execution. Default: False. """ - input_: None | str - metadata: AgentRunRequestMetadataType0 | None + input_: None | str | Unset = UNSET + input_upload_id: None | Unset | UUID = UNSET + metadata: AgentRunRequestMetadataType0 | None | Unset = UNSET priority: bool | Unset = False additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -35,11 +39,24 @@ def to_dict(self) -> dict[str, Any]: AgentRunRequestMetadataType0, ) - input_: None | str - input_ = self.input_ + input_: None | str | Unset + if isinstance(self.input_, Unset): + input_ = UNSET + else: + input_ = self.input_ + + input_upload_id: None | str | Unset + if isinstance(self.input_upload_id, Unset): + input_upload_id = UNSET + elif isinstance(self.input_upload_id, UUID): + input_upload_id = str(self.input_upload_id) + else: + input_upload_id = self.input_upload_id - metadata: dict[str, Any] | None - if isinstance(self.metadata, AgentRunRequestMetadataType0): + metadata: dict[str, Any] | None | Unset + if isinstance(self.metadata, Unset): + metadata = UNSET + elif isinstance(self.metadata, AgentRunRequestMetadataType0): metadata = self.metadata.to_dict() else: metadata = self.metadata @@ -48,12 +65,13 @@ def to_dict(self) -> dict[str, Any]: field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) - field_dict.update( - { - "input": input_, - "metadata": metadata, - } - ) + field_dict.update({}) + if input_ is not UNSET: + field_dict["input"] = input_ + if input_upload_id is not UNSET: + field_dict["input_upload_id"] = input_upload_id + if metadata is not UNSET: + field_dict["metadata"] = metadata if priority is not UNSET: field_dict["priority"] = priority @@ -67,16 +85,39 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - def _parse_input_(data: object) -> None | str: + def _parse_input_(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + input_ = _parse_input_(d.pop("input", UNSET)) + + def _parse_input_upload_id(data: object) -> None | Unset | UUID: if data is None: return data - return cast(None | str, data) + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + input_upload_id_type_0 = UUID(data) - input_ = _parse_input_(d.pop("input")) + return input_upload_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) - def _parse_metadata(data: object) -> AgentRunRequestMetadataType0 | None: + input_upload_id = _parse_input_upload_id(d.pop("input_upload_id", UNSET)) + + def _parse_metadata( + data: object, + ) -> AgentRunRequestMetadataType0 | None | Unset: if data is None: return data + if isinstance(data, Unset): + return data try: if not isinstance(data, dict): raise TypeError() @@ -85,14 +126,15 @@ def _parse_metadata(data: object) -> AgentRunRequestMetadataType0 | None: return metadata_type_0 except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(AgentRunRequestMetadataType0 | None, data) + return cast(AgentRunRequestMetadataType0 | None | Unset, data) - metadata = _parse_metadata(d.pop("metadata")) + metadata = _parse_metadata(d.pop("metadata", UNSET)) priority = d.pop("priority", UNSET) agent_run_request = cls( input_=input_, + input_upload_id=input_upload_id, metadata=metadata, priority=priority, ) diff --git a/seclai/_generated/models/agent_run_step_response.py b/seclai/_generated/models/agent_run_step_response.py index 0e803ab..504141d 100644 --- a/seclai/_generated/models/agent_run_step_response.py +++ b/seclai/_generated/models/agent_run_step_response.py @@ -21,6 +21,7 @@ class AgentRunStepResponse: credits_used (float): Credits consumed by the step attempt, if applicable. duration_seconds (float | None): Duration of the step attempt in seconds. ended_at (None | str): Timestamp when the step attempt ended. + input_ (None | str): Input provided to the step, if any. output (None | str): Output produced by the step, if any. output_content_type (None | str): Content type of the step output, if any. started_at (None | str): Timestamp when the step attempt started. @@ -32,6 +33,7 @@ class AgentRunStepResponse: credits_used: float duration_seconds: float | None ended_at: None | str + input_: None | str output: None | str output_content_type: None | str started_at: None | str @@ -50,6 +52,9 @@ def to_dict(self) -> dict[str, Any]: ended_at: None | str ended_at = self.ended_at + input_: None | str + input_ = self.input_ + output: None | str output = self.output @@ -71,6 +76,7 @@ def to_dict(self) -> dict[str, Any]: "credits_used": credits_used, "duration_seconds": duration_seconds, "ended_at": ended_at, + "input": input_, "output": output, "output_content_type": output_content_type, "started_at": started_at, @@ -102,6 +108,13 @@ def _parse_ended_at(data: object) -> None | str: ended_at = _parse_ended_at(d.pop("ended_at")) + def _parse_input_(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + input_ = _parse_input_(d.pop("input")) + def _parse_output(data: object) -> None | str: if data is None: return data @@ -132,6 +145,7 @@ def _parse_started_at(data: object) -> None | str: credits_used=credits_used, duration_seconds=duration_seconds, ended_at=ended_at, + input_=input_, output=output, output_content_type=output_content_type, started_at=started_at, diff --git a/seclai/_generated/models/agent_run_stream_request.py b/seclai/_generated/models/agent_run_stream_request.py index 1b5acaf..b63b16f 100644 --- a/seclai/_generated/models/agent_run_stream_request.py +++ b/seclai/_generated/models/agent_run_stream_request.py @@ -2,10 +2,13 @@ from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.agent_run_stream_request_metadata_type_0 import ( AgentRunStreamRequestMetadataType0, @@ -19,13 +22,16 @@ class AgentRunStreamRequest: """ Attributes: - input_ (None | str): Input to provide to the agent upon running for agents with dynamic triggers. - metadata (AgentRunStreamRequestMetadataType0 | None): Metadata to make available for string substitution + input_ (None | str | Unset): Input to provide to the agent upon running for agents with dynamic triggers. + input_upload_id (None | Unset | UUID): ID of a previously uploaded file (via POST /{agent_id}/upload-input) to + use as the run input for dynamic-input triggers. Mutually exclusive with the 'input' field. + metadata (AgentRunStreamRequestMetadataType0 | None | Unset): Metadata to make available for string substitution expressions in agent tasks. """ - input_: None | str - metadata: AgentRunStreamRequestMetadataType0 | None + input_: None | str | Unset = UNSET + input_upload_id: None | Unset | UUID = UNSET + metadata: AgentRunStreamRequestMetadataType0 | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -33,23 +39,37 @@ def to_dict(self) -> dict[str, Any]: AgentRunStreamRequestMetadataType0, ) - input_: None | str - input_ = self.input_ + input_: None | str | Unset + if isinstance(self.input_, Unset): + input_ = UNSET + else: + input_ = self.input_ - metadata: dict[str, Any] | None - if isinstance(self.metadata, AgentRunStreamRequestMetadataType0): + input_upload_id: None | str | Unset + if isinstance(self.input_upload_id, Unset): + input_upload_id = UNSET + elif isinstance(self.input_upload_id, UUID): + input_upload_id = str(self.input_upload_id) + else: + input_upload_id = self.input_upload_id + + metadata: dict[str, Any] | None | Unset + if isinstance(self.metadata, Unset): + metadata = UNSET + elif isinstance(self.metadata, AgentRunStreamRequestMetadataType0): metadata = self.metadata.to_dict() else: metadata = self.metadata field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) - field_dict.update( - { - "input": input_, - "metadata": metadata, - } - ) + field_dict.update({}) + if input_ is not UNSET: + field_dict["input"] = input_ + if input_upload_id is not UNSET: + field_dict["input_upload_id"] = input_upload_id + if metadata is not UNSET: + field_dict["metadata"] = metadata return field_dict @@ -61,16 +81,39 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - def _parse_input_(data: object) -> None | str: + def _parse_input_(data: object) -> None | str | Unset: if data is None: return data - return cast(None | str, data) + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) - input_ = _parse_input_(d.pop("input")) + input_ = _parse_input_(d.pop("input", UNSET)) - def _parse_metadata(data: object) -> AgentRunStreamRequestMetadataType0 | None: + def _parse_input_upload_id(data: object) -> None | Unset | UUID: if data is None: return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + input_upload_id_type_0 = UUID(data) + + return input_upload_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + input_upload_id = _parse_input_upload_id(d.pop("input_upload_id", UNSET)) + + def _parse_metadata( + data: object, + ) -> AgentRunStreamRequestMetadataType0 | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data try: if not isinstance(data, dict): raise TypeError() @@ -79,12 +122,13 @@ def _parse_metadata(data: object) -> AgentRunStreamRequestMetadataType0 | None: return metadata_type_0 except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(AgentRunStreamRequestMetadataType0 | None, data) + return cast(AgentRunStreamRequestMetadataType0 | None | Unset, data) - metadata = _parse_metadata(d.pop("metadata")) + metadata = _parse_metadata(d.pop("metadata", UNSET)) agent_run_stream_request = cls( input_=input_, + input_upload_id=input_upload_id, metadata=metadata, ) diff --git a/seclai/_generated/models/agent_summary_response.py b/seclai/_generated/models/agent_summary_response.py new file mode 100644 index 0000000..6ac329c --- /dev/null +++ b/seclai/_generated/models/agent_summary_response.py @@ -0,0 +1,286 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.agent_summary_response_sampling_config_type_0 import ( + AgentSummaryResponseSamplingConfigType0, + ) + + +T = TypeVar("T", bound="AgentSummaryResponse") + + +@_attrs_define +class AgentSummaryResponse: + """ + Attributes: + created_at (str): ISO 8601 creation timestamp. + description (None | str): Agent description. + id (str): Unique agent identifier. + name (str): Agent name. + trigger_type (None | str): Trigger type for the agent. + updated_at (str): ISO 8601 last-updated timestamp. + default_evaluation_tier (None | str | Unset): Default evaluation tier: fast, balanced, or thorough. + evaluation_mode (str | Unset): Evaluation mode: output_expectation, eval_and_retry, or sample_and_flag. Default: + 'eval_and_retry'. + max_retries (int | Unset): Max retries for eval_and_retry mode. Default: 3. + prompt_model_auto_rollback_enabled (bool | Unset): Whether automatic rollback is enabled for upgraded models. + Default: False. + prompt_model_auto_rollback_triggers (list[str] | None | Unset): Failure signals that trigger rollback. Defaults + to agent_eval_fail, governance_block, agent_run_failed when null. + prompt_model_auto_upgrade_strategy (str | Unset): Auto-upgrade strategy: none, early_adopter, middle_of_road, + cautious_adopter. Default: 'none'. + retry_on_failure (bool | Unset): Whether to retry on evaluation failure. Default: True. + sampling_config (AgentSummaryResponseSamplingConfigType0 | None | Unset): Sampling configuration for + sample_and_flag mode. + """ + + created_at: str + description: None | str + id: str + name: str + trigger_type: None | str + updated_at: str + default_evaluation_tier: None | str | Unset = UNSET + evaluation_mode: str | Unset = "eval_and_retry" + max_retries: int | Unset = 3 + prompt_model_auto_rollback_enabled: bool | Unset = False + prompt_model_auto_rollback_triggers: list[str] | None | Unset = UNSET + prompt_model_auto_upgrade_strategy: str | Unset = "none" + retry_on_failure: bool | Unset = True + sampling_config: AgentSummaryResponseSamplingConfigType0 | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.agent_summary_response_sampling_config_type_0 import ( + AgentSummaryResponseSamplingConfigType0, + ) + + created_at = self.created_at + + description: None | str + description = self.description + + id = self.id + + name = self.name + + trigger_type: None | str + trigger_type = self.trigger_type + + updated_at = self.updated_at + + default_evaluation_tier: None | str | Unset + if isinstance(self.default_evaluation_tier, Unset): + default_evaluation_tier = UNSET + else: + default_evaluation_tier = self.default_evaluation_tier + + evaluation_mode = self.evaluation_mode + + max_retries = self.max_retries + + prompt_model_auto_rollback_enabled = self.prompt_model_auto_rollback_enabled + + prompt_model_auto_rollback_triggers: list[str] | None | Unset + if isinstance(self.prompt_model_auto_rollback_triggers, Unset): + prompt_model_auto_rollback_triggers = UNSET + elif isinstance(self.prompt_model_auto_rollback_triggers, list): + prompt_model_auto_rollback_triggers = ( + self.prompt_model_auto_rollback_triggers + ) + + else: + prompt_model_auto_rollback_triggers = ( + self.prompt_model_auto_rollback_triggers + ) + + prompt_model_auto_upgrade_strategy = self.prompt_model_auto_upgrade_strategy + + retry_on_failure = self.retry_on_failure + + sampling_config: dict[str, Any] | None | Unset + if isinstance(self.sampling_config, Unset): + sampling_config = UNSET + elif isinstance(self.sampling_config, AgentSummaryResponseSamplingConfigType0): + sampling_config = self.sampling_config.to_dict() + else: + sampling_config = self.sampling_config + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "created_at": created_at, + "description": description, + "id": id, + "name": name, + "trigger_type": trigger_type, + "updated_at": updated_at, + } + ) + if default_evaluation_tier is not UNSET: + field_dict["default_evaluation_tier"] = default_evaluation_tier + if evaluation_mode is not UNSET: + field_dict["evaluation_mode"] = evaluation_mode + if max_retries is not UNSET: + field_dict["max_retries"] = max_retries + if prompt_model_auto_rollback_enabled is not UNSET: + field_dict["prompt_model_auto_rollback_enabled"] = ( + prompt_model_auto_rollback_enabled + ) + if prompt_model_auto_rollback_triggers is not UNSET: + field_dict["prompt_model_auto_rollback_triggers"] = ( + prompt_model_auto_rollback_triggers + ) + if prompt_model_auto_upgrade_strategy is not UNSET: + field_dict["prompt_model_auto_upgrade_strategy"] = ( + prompt_model_auto_upgrade_strategy + ) + if retry_on_failure is not UNSET: + field_dict["retry_on_failure"] = retry_on_failure + if sampling_config is not UNSET: + field_dict["sampling_config"] = sampling_config + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.agent_summary_response_sampling_config_type_0 import ( + AgentSummaryResponseSamplingConfigType0, + ) + + d = dict(src_dict) + created_at = d.pop("created_at") + + def _parse_description(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + description = _parse_description(d.pop("description")) + + id = d.pop("id") + + name = d.pop("name") + + def _parse_trigger_type(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + trigger_type = _parse_trigger_type(d.pop("trigger_type")) + + updated_at = d.pop("updated_at") + + def _parse_default_evaluation_tier(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + default_evaluation_tier = _parse_default_evaluation_tier( + d.pop("default_evaluation_tier", UNSET) + ) + + evaluation_mode = d.pop("evaluation_mode", UNSET) + + max_retries = d.pop("max_retries", UNSET) + + prompt_model_auto_rollback_enabled = d.pop( + "prompt_model_auto_rollback_enabled", UNSET + ) + + def _parse_prompt_model_auto_rollback_triggers( + data: object, + ) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + prompt_model_auto_rollback_triggers_type_0 = cast(list[str], data) + + return prompt_model_auto_rollback_triggers_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + prompt_model_auto_rollback_triggers = ( + _parse_prompt_model_auto_rollback_triggers( + d.pop("prompt_model_auto_rollback_triggers", UNSET) + ) + ) + + prompt_model_auto_upgrade_strategy = d.pop( + "prompt_model_auto_upgrade_strategy", UNSET + ) + + retry_on_failure = d.pop("retry_on_failure", UNSET) + + def _parse_sampling_config( + data: object, + ) -> AgentSummaryResponseSamplingConfigType0 | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + sampling_config_type_0 = ( + AgentSummaryResponseSamplingConfigType0.from_dict(data) + ) + + return sampling_config_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(AgentSummaryResponseSamplingConfigType0 | None | Unset, data) + + sampling_config = _parse_sampling_config(d.pop("sampling_config", UNSET)) + + agent_summary_response = cls( + created_at=created_at, + description=description, + id=id, + name=name, + trigger_type=trigger_type, + updated_at=updated_at, + default_evaluation_tier=default_evaluation_tier, + evaluation_mode=evaluation_mode, + max_retries=max_retries, + prompt_model_auto_rollback_enabled=prompt_model_auto_rollback_enabled, + prompt_model_auto_rollback_triggers=prompt_model_auto_rollback_triggers, + prompt_model_auto_upgrade_strategy=prompt_model_auto_upgrade_strategy, + retry_on_failure=retry_on_failure, + sampling_config=sampling_config, + ) + + agent_summary_response.additional_properties = d + return agent_summary_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/agent_summary_response_sampling_config_type_0.py b/seclai/_generated/models/agent_summary_response_sampling_config_type_0.py new file mode 100644 index 0000000..a9ce7fb --- /dev/null +++ b/seclai/_generated/models/agent_summary_response_sampling_config_type_0.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AgentSummaryResponseSamplingConfigType0") + + +@_attrs_define +class AgentSummaryResponseSamplingConfigType0: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + agent_summary_response_sampling_config_type_0 = cls() + + agent_summary_response_sampling_config_type_0.additional_properties = d + return agent_summary_response_sampling_config_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/agent_trace_match_response.py b/seclai/_generated/models/agent_trace_match_response.py new file mode 100644 index 0000000..7081edf --- /dev/null +++ b/seclai/_generated/models/agent_trace_match_response.py @@ -0,0 +1,168 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AgentTraceMatchResponse") + + +@_attrs_define +class AgentTraceMatchResponse: + """ + Attributes: + agent_id (None | str): Agent ID. + agent_run_id (None | str): Agent run ID. + agent_run_status (None | str): Status of the agent run. + agent_step_id (None | str): Step identifier. + agent_step_run_id (None | str): Agent step run ID. + agent_step_type (None | str): Type of the step. + score (float): Similarity score (0-1, higher is better). + text (str): Matching text chunk. + title (None | str): Title of the indexed entry. + """ + + agent_id: None | str + agent_run_id: None | str + agent_run_status: None | str + agent_step_id: None | str + agent_step_run_id: None | str + agent_step_type: None | str + score: float + text: str + title: None | str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + agent_id: None | str + agent_id = self.agent_id + + agent_run_id: None | str + agent_run_id = self.agent_run_id + + agent_run_status: None | str + agent_run_status = self.agent_run_status + + agent_step_id: None | str + agent_step_id = self.agent_step_id + + agent_step_run_id: None | str + agent_step_run_id = self.agent_step_run_id + + agent_step_type: None | str + agent_step_type = self.agent_step_type + + score = self.score + + text = self.text + + title: None | str + title = self.title + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "agent_id": agent_id, + "agent_run_id": agent_run_id, + "agent_run_status": agent_run_status, + "agent_step_id": agent_step_id, + "agent_step_run_id": agent_step_run_id, + "agent_step_type": agent_step_type, + "score": score, + "text": text, + "title": title, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_agent_id(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + agent_id = _parse_agent_id(d.pop("agent_id")) + + def _parse_agent_run_id(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + agent_run_id = _parse_agent_run_id(d.pop("agent_run_id")) + + def _parse_agent_run_status(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + agent_run_status = _parse_agent_run_status(d.pop("agent_run_status")) + + def _parse_agent_step_id(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + agent_step_id = _parse_agent_step_id(d.pop("agent_step_id")) + + def _parse_agent_step_run_id(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + agent_step_run_id = _parse_agent_step_run_id(d.pop("agent_step_run_id")) + + def _parse_agent_step_type(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + agent_step_type = _parse_agent_step_type(d.pop("agent_step_type")) + + score = d.pop("score") + + text = d.pop("text") + + def _parse_title(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + title = _parse_title(d.pop("title")) + + agent_trace_match_response = cls( + agent_id=agent_id, + agent_run_id=agent_run_id, + agent_run_status=agent_run_status, + agent_step_id=agent_step_id, + agent_step_run_id=agent_step_run_id, + agent_step_type=agent_step_type, + score=score, + text=text, + title=title, + ) + + agent_trace_match_response.additional_properties = d + return agent_trace_match_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/agent_trace_search_request.py b/seclai/_generated/models/agent_trace_search_request.py new file mode 100644 index 0000000..0bf0d6f --- /dev/null +++ b/seclai/_generated/models/agent_trace_search_request.py @@ -0,0 +1,132 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AgentTraceSearchRequest") + + +@_attrs_define +class AgentTraceSearchRequest: + """ + Attributes: + query (str): Search query text. + agent_id (None | str | Unset): Filter by agent ID. + run_status (None | str | Unset): Filter by run status. + step_type (None | str | Unset): Filter by step type. + top_n (int | Unset): Maximum number of results. Default: 10. + """ + + query: str + agent_id: None | str | Unset = UNSET + run_status: None | str | Unset = UNSET + step_type: None | str | Unset = UNSET + top_n: int | Unset = 10 + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + query = self.query + + agent_id: None | str | Unset + if isinstance(self.agent_id, Unset): + agent_id = UNSET + else: + agent_id = self.agent_id + + run_status: None | str | Unset + if isinstance(self.run_status, Unset): + run_status = UNSET + else: + run_status = self.run_status + + step_type: None | str | Unset + if isinstance(self.step_type, Unset): + step_type = UNSET + else: + step_type = self.step_type + + top_n = self.top_n + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "query": query, + } + ) + if agent_id is not UNSET: + field_dict["agent_id"] = agent_id + if run_status is not UNSET: + field_dict["run_status"] = run_status + if step_type is not UNSET: + field_dict["step_type"] = step_type + if top_n is not UNSET: + field_dict["top_n"] = top_n + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + query = d.pop("query") + + def _parse_agent_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + agent_id = _parse_agent_id(d.pop("agent_id", UNSET)) + + def _parse_run_status(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + run_status = _parse_run_status(d.pop("run_status", UNSET)) + + def _parse_step_type(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + step_type = _parse_step_type(d.pop("step_type", UNSET)) + + top_n = d.pop("top_n", UNSET) + + agent_trace_search_request = cls( + query=query, + agent_id=agent_id, + run_status=run_status, + step_type=step_type, + top_n=top_n, + ) + + agent_trace_search_request.additional_properties = d + return agent_trace_search_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/agent_trace_search_response.py b/seclai/_generated/models/agent_trace_search_response.py new file mode 100644 index 0000000..42fbd60 --- /dev/null +++ b/seclai/_generated/models/agent_trace_search_response.py @@ -0,0 +1,83 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.agent_trace_match_response import AgentTraceMatchResponse + + +T = TypeVar("T", bound="AgentTraceSearchResponse") + + +@_attrs_define +class AgentTraceSearchResponse: + """ + Attributes: + matches (list[AgentTraceMatchResponse]): List of matching entries. + total (int): Number of matches returned. + """ + + matches: list[AgentTraceMatchResponse] + total: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + matches = [] + for matches_item_data in self.matches: + matches_item = matches_item_data.to_dict() + matches.append(matches_item) + + total = self.total + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "matches": matches, + "total": total, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.agent_trace_match_response import AgentTraceMatchResponse + + d = dict(src_dict) + matches = [] + _matches = d.pop("matches") + for matches_item_data in _matches: + matches_item = AgentTraceMatchResponse.from_dict(matches_item_data) + + matches.append(matches_item) + + total = d.pop("total") + + agent_trace_search_response = cls( + matches=matches, + total=total, + ) + + agent_trace_search_response.additional_properties = d + return agent_trace_search_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/ai_assistant_accept_request.py b/seclai/_generated/models/ai_assistant_accept_request.py new file mode 100644 index 0000000..67594d9 --- /dev/null +++ b/seclai/_generated/models/ai_assistant_accept_request.py @@ -0,0 +1,106 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AiAssistantAcceptRequest") + + +@_attrs_define +class AiAssistantAcceptRequest: + """Request body for accepting a proposed plan. + + Attributes: + confirm_deletions (bool | Unset): Must be true when the plan contains destructive actions Default: False. + solution_description (None | str | Unset): When running in standalone mode (no pre-existing solution), provide a + description for the auto-created solution. + solution_name (None | str | Unset): When running in standalone mode (no pre-existing solution), provide a name + to auto-create a solution and link resources. + """ + + confirm_deletions: bool | Unset = False + solution_description: None | str | Unset = UNSET + solution_name: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + confirm_deletions = self.confirm_deletions + + solution_description: None | str | Unset + if isinstance(self.solution_description, Unset): + solution_description = UNSET + else: + solution_description = self.solution_description + + solution_name: None | str | Unset + if isinstance(self.solution_name, Unset): + solution_name = UNSET + else: + solution_name = self.solution_name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if confirm_deletions is not UNSET: + field_dict["confirm_deletions"] = confirm_deletions + if solution_description is not UNSET: + field_dict["solution_description"] = solution_description + if solution_name is not UNSET: + field_dict["solution_name"] = solution_name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + confirm_deletions = d.pop("confirm_deletions", UNSET) + + def _parse_solution_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + solution_description = _parse_solution_description( + d.pop("solution_description", UNSET) + ) + + def _parse_solution_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + solution_name = _parse_solution_name(d.pop("solution_name", UNSET)) + + ai_assistant_accept_request = cls( + confirm_deletions=confirm_deletions, + solution_description=solution_description, + solution_name=solution_name, + ) + + ai_assistant_accept_request.additional_properties = d + return ai_assistant_accept_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/ai_assistant_accept_response.py b/seclai/_generated/models/ai_assistant_accept_response.py new file mode 100644 index 0000000..c9253ca --- /dev/null +++ b/seclai/_generated/models/ai_assistant_accept_response.py @@ -0,0 +1,148 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.executed_action_response import ExecutedActionResponse + + +T = TypeVar("T", bound="AiAssistantAcceptResponse") + + +@_attrs_define +class AiAssistantAcceptResponse: + """Response from accepting and executing a plan. + + Attributes: + conversation_id (UUID): Conversation ID. + executed_actions (list[ExecutedActionResponse]): Results of each executed action. + error (None | str | Unset): Error message if failed. + solution_id (None | Unset | UUID): Solution ID when a new solution was auto-created. + success (bool | Unset): Whether execution succeeded. Default: True. + """ + + conversation_id: UUID + executed_actions: list[ExecutedActionResponse] + error: None | str | Unset = UNSET + solution_id: None | Unset | UUID = UNSET + success: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + conversation_id = str(self.conversation_id) + + executed_actions = [] + for executed_actions_item_data in self.executed_actions: + executed_actions_item = executed_actions_item_data.to_dict() + executed_actions.append(executed_actions_item) + + error: None | str | Unset + if isinstance(self.error, Unset): + error = UNSET + else: + error = self.error + + solution_id: None | str | Unset + if isinstance(self.solution_id, Unset): + solution_id = UNSET + elif isinstance(self.solution_id, UUID): + solution_id = str(self.solution_id) + else: + solution_id = self.solution_id + + success = self.success + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "conversation_id": conversation_id, + "executed_actions": executed_actions, + } + ) + if error is not UNSET: + field_dict["error"] = error + if solution_id is not UNSET: + field_dict["solution_id"] = solution_id + if success is not UNSET: + field_dict["success"] = success + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.executed_action_response import ExecutedActionResponse + + d = dict(src_dict) + conversation_id = UUID(d.pop("conversation_id")) + + executed_actions = [] + _executed_actions = d.pop("executed_actions") + for executed_actions_item_data in _executed_actions: + executed_actions_item = ExecutedActionResponse.from_dict( + executed_actions_item_data + ) + + executed_actions.append(executed_actions_item) + + def _parse_error(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + error = _parse_error(d.pop("error", UNSET)) + + def _parse_solution_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + solution_id_type_0 = UUID(data) + + return solution_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + solution_id = _parse_solution_id(d.pop("solution_id", UNSET)) + + success = d.pop("success", UNSET) + + ai_assistant_accept_response = cls( + conversation_id=conversation_id, + executed_actions=executed_actions, + error=error, + solution_id=solution_id, + success=success, + ) + + ai_assistant_accept_response.additional_properties = d + return ai_assistant_accept_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/ai_assistant_feedback_request.py b/seclai/_generated/models/ai_assistant_feedback_request.py new file mode 100644 index 0000000..0bf4264 --- /dev/null +++ b/seclai/_generated/models/ai_assistant_feedback_request.py @@ -0,0 +1,231 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.ai_assistant_feedback_request_context_type_0 import ( + AiAssistantFeedbackRequestContextType0, + ) + + +T = TypeVar("T", bound="AiAssistantFeedbackRequest") + + +@_attrs_define +class AiAssistantFeedbackRequest: + """Request body for submitting AI assistant feedback. + + Attributes: + feature (str): Feature name (e.g. 'source', 'solution'). + rating (str): Rating: 'thumbs_up' or 'thumbs_down'. + agent_conversation_id (None | Unset | UUID): Agent conversation ID, if applicable. + comment (None | str | Unset): Optional comment. + context (AiAssistantFeedbackRequestContextType0 | None | Unset): Additional context. + conversation_id (None | Unset | UUID): Conversation ID for the interaction. + prompt_call_id (None | Unset | UUID): Prompt call ID for credit tracking. + """ + + feature: str + rating: str + agent_conversation_id: None | Unset | UUID = UNSET + comment: None | str | Unset = UNSET + context: AiAssistantFeedbackRequestContextType0 | None | Unset = UNSET + conversation_id: None | Unset | UUID = UNSET + prompt_call_id: None | Unset | UUID = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.ai_assistant_feedback_request_context_type_0 import ( + AiAssistantFeedbackRequestContextType0, + ) + + feature = self.feature + + rating = self.rating + + agent_conversation_id: None | str | Unset + if isinstance(self.agent_conversation_id, Unset): + agent_conversation_id = UNSET + elif isinstance(self.agent_conversation_id, UUID): + agent_conversation_id = str(self.agent_conversation_id) + else: + agent_conversation_id = self.agent_conversation_id + + comment: None | str | Unset + if isinstance(self.comment, Unset): + comment = UNSET + else: + comment = self.comment + + context: dict[str, Any] | None | Unset + if isinstance(self.context, Unset): + context = UNSET + elif isinstance(self.context, AiAssistantFeedbackRequestContextType0): + context = self.context.to_dict() + else: + context = self.context + + conversation_id: None | str | Unset + if isinstance(self.conversation_id, Unset): + conversation_id = UNSET + elif isinstance(self.conversation_id, UUID): + conversation_id = str(self.conversation_id) + else: + conversation_id = self.conversation_id + + prompt_call_id: None | str | Unset + if isinstance(self.prompt_call_id, Unset): + prompt_call_id = UNSET + elif isinstance(self.prompt_call_id, UUID): + prompt_call_id = str(self.prompt_call_id) + else: + prompt_call_id = self.prompt_call_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "feature": feature, + "rating": rating, + } + ) + if agent_conversation_id is not UNSET: + field_dict["agent_conversation_id"] = agent_conversation_id + if comment is not UNSET: + field_dict["comment"] = comment + if context is not UNSET: + field_dict["context"] = context + if conversation_id is not UNSET: + field_dict["conversation_id"] = conversation_id + if prompt_call_id is not UNSET: + field_dict["prompt_call_id"] = prompt_call_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.ai_assistant_feedback_request_context_type_0 import ( + AiAssistantFeedbackRequestContextType0, + ) + + d = dict(src_dict) + feature = d.pop("feature") + + rating = d.pop("rating") + + def _parse_agent_conversation_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + agent_conversation_id_type_0 = UUID(data) + + return agent_conversation_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + agent_conversation_id = _parse_agent_conversation_id( + d.pop("agent_conversation_id", UNSET) + ) + + def _parse_comment(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comment = _parse_comment(d.pop("comment", UNSET)) + + def _parse_context( + data: object, + ) -> AiAssistantFeedbackRequestContextType0 | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + context_type_0 = AiAssistantFeedbackRequestContextType0.from_dict(data) + + return context_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(AiAssistantFeedbackRequestContextType0 | None | Unset, data) + + context = _parse_context(d.pop("context", UNSET)) + + def _parse_conversation_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + conversation_id_type_0 = UUID(data) + + return conversation_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + conversation_id = _parse_conversation_id(d.pop("conversation_id", UNSET)) + + def _parse_prompt_call_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + prompt_call_id_type_0 = UUID(data) + + return prompt_call_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + prompt_call_id = _parse_prompt_call_id(d.pop("prompt_call_id", UNSET)) + + ai_assistant_feedback_request = cls( + feature=feature, + rating=rating, + agent_conversation_id=agent_conversation_id, + comment=comment, + context=context, + conversation_id=conversation_id, + prompt_call_id=prompt_call_id, + ) + + ai_assistant_feedback_request.additional_properties = d + return ai_assistant_feedback_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/ai_assistant_feedback_request_context_type_0.py b/seclai/_generated/models/ai_assistant_feedback_request_context_type_0.py new file mode 100644 index 0000000..e584ecb --- /dev/null +++ b/seclai/_generated/models/ai_assistant_feedback_request_context_type_0.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AiAssistantFeedbackRequestContextType0") + + +@_attrs_define +class AiAssistantFeedbackRequestContextType0: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + ai_assistant_feedback_request_context_type_0 = cls() + + ai_assistant_feedback_request_context_type_0.additional_properties = d + return ai_assistant_feedback_request_context_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/ai_assistant_feedback_response.py b/seclai/_generated/models/ai_assistant_feedback_response.py new file mode 100644 index 0000000..58adeee --- /dev/null +++ b/seclai/_generated/models/ai_assistant_feedback_response.py @@ -0,0 +1,93 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AiAssistantFeedbackResponse") + + +@_attrs_define +class AiAssistantFeedbackResponse: + """Response after submitting feedback. + + Attributes: + feedback_id (UUID): + flagged (bool): + flag_reason (None | str | Unset): + """ + + feedback_id: UUID + flagged: bool + flag_reason: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + feedback_id = str(self.feedback_id) + + flagged = self.flagged + + flag_reason: None | str | Unset + if isinstance(self.flag_reason, Unset): + flag_reason = UNSET + else: + flag_reason = self.flag_reason + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "feedback_id": feedback_id, + "flagged": flagged, + } + ) + if flag_reason is not UNSET: + field_dict["flag_reason"] = flag_reason + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + feedback_id = UUID(d.pop("feedback_id")) + + flagged = d.pop("flagged") + + def _parse_flag_reason(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + flag_reason = _parse_flag_reason(d.pop("flag_reason", UNSET)) + + ai_assistant_feedback_response = cls( + feedback_id=feedback_id, + flagged=flagged, + flag_reason=flag_reason, + ) + + ai_assistant_feedback_response.additional_properties = d + return ai_assistant_feedback_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/ai_assistant_generate_request.py b/seclai/_generated/models/ai_assistant_generate_request.py new file mode 100644 index 0000000..f692149 --- /dev/null +++ b/seclai/_generated/models/ai_assistant_generate_request.py @@ -0,0 +1,62 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AiAssistantGenerateRequest") + + +@_attrs_define +class AiAssistantGenerateRequest: + """Request body for AI assistant generate endpoints. + + Attributes: + user_input (str): User input describing what to do + """ + + user_input: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + user_input = self.user_input + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "user_input": user_input, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + user_input = d.pop("user_input") + + ai_assistant_generate_request = cls( + user_input=user_input, + ) + + ai_assistant_generate_request.additional_properties = d + return ai_assistant_generate_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/ai_assistant_generate_response.py b/seclai/_generated/models/ai_assistant_generate_response.py new file mode 100644 index 0000000..bd0c016 --- /dev/null +++ b/seclai/_generated/models/ai_assistant_generate_response.py @@ -0,0 +1,142 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.example_prompt import ExamplePrompt + from ..models.proposed_action_response import ProposedActionResponse + + +T = TypeVar("T", bound="AiAssistantGenerateResponse") + + +@_attrs_define +class AiAssistantGenerateResponse: + """Response from an AI assistant generate endpoint. + + Attributes: + conversation_id (UUID): Conversation ID for accept/decline. + note (str): AI-generated note about the plan. + proposed_actions (list[ProposedActionResponse]): List of proposed actions. + example_prompts (list[ExamplePrompt] | Unset): Example natural-language prompts that demonstrate the + capabilities of this AI assistant. + requires_delete_confirmation (bool | Unset): Whether destructive actions require explicit confirmation. Default: + False. + success (bool | Unset): Whether plan generation succeeded. Default: False. + """ + + conversation_id: UUID + note: str + proposed_actions: list[ProposedActionResponse] + example_prompts: list[ExamplePrompt] | Unset = UNSET + requires_delete_confirmation: bool | Unset = False + success: bool | Unset = False + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + conversation_id = str(self.conversation_id) + + note = self.note + + proposed_actions = [] + for proposed_actions_item_data in self.proposed_actions: + proposed_actions_item = proposed_actions_item_data.to_dict() + proposed_actions.append(proposed_actions_item) + + example_prompts: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.example_prompts, Unset): + example_prompts = [] + for example_prompts_item_data in self.example_prompts: + example_prompts_item = example_prompts_item_data.to_dict() + example_prompts.append(example_prompts_item) + + requires_delete_confirmation = self.requires_delete_confirmation + + success = self.success + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "conversation_id": conversation_id, + "note": note, + "proposed_actions": proposed_actions, + } + ) + if example_prompts is not UNSET: + field_dict["example_prompts"] = example_prompts + if requires_delete_confirmation is not UNSET: + field_dict["requires_delete_confirmation"] = requires_delete_confirmation + if success is not UNSET: + field_dict["success"] = success + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.example_prompt import ExamplePrompt + from ..models.proposed_action_response import ProposedActionResponse + + d = dict(src_dict) + conversation_id = UUID(d.pop("conversation_id")) + + note = d.pop("note") + + proposed_actions = [] + _proposed_actions = d.pop("proposed_actions") + for proposed_actions_item_data in _proposed_actions: + proposed_actions_item = ProposedActionResponse.from_dict( + proposed_actions_item_data + ) + + proposed_actions.append(proposed_actions_item) + + _example_prompts = d.pop("example_prompts", UNSET) + example_prompts: list[ExamplePrompt] | Unset = UNSET + if _example_prompts is not UNSET: + example_prompts = [] + for example_prompts_item_data in _example_prompts: + example_prompts_item = ExamplePrompt.from_dict( + example_prompts_item_data + ) + + example_prompts.append(example_prompts_item) + + requires_delete_confirmation = d.pop("requires_delete_confirmation", UNSET) + + success = d.pop("success", UNSET) + + ai_assistant_generate_response = cls( + conversation_id=conversation_id, + note=note, + proposed_actions=proposed_actions, + example_prompts=example_prompts, + requires_delete_confirmation=requires_delete_confirmation, + success=success, + ) + + ai_assistant_generate_response.additional_properties = d + return ai_assistant_generate_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/ai_conversation_history_response.py b/seclai/_generated/models/ai_conversation_history_response.py new file mode 100644 index 0000000..3c63b63 --- /dev/null +++ b/seclai/_generated/models/ai_conversation_history_response.py @@ -0,0 +1,83 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.ai_conversation_turn_response import AiConversationTurnResponse + + +T = TypeVar("T", bound="AiConversationHistoryResponse") + + +@_attrs_define +class AiConversationHistoryResponse: + """ + Attributes: + total (int): Total number of conversation turns available. + turns (list[AiConversationTurnResponse]): Conversation turns, ordered oldest first. + """ + + total: int + turns: list[AiConversationTurnResponse] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + total = self.total + + turns = [] + for turns_item_data in self.turns: + turns_item = turns_item_data.to_dict() + turns.append(turns_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "total": total, + "turns": turns, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.ai_conversation_turn_response import AiConversationTurnResponse + + d = dict(src_dict) + total = d.pop("total") + + turns = [] + _turns = d.pop("turns") + for turns_item_data in _turns: + turns_item = AiConversationTurnResponse.from_dict(turns_item_data) + + turns.append(turns_item) + + ai_conversation_history_response = cls( + total=total, + turns=turns, + ) + + ai_conversation_history_response.additional_properties = d + return ai_conversation_history_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/ai_conversation_turn_response.py b/seclai/_generated/models/ai_conversation_turn_response.py new file mode 100644 index 0000000..c944173 --- /dev/null +++ b/seclai/_generated/models/ai_conversation_turn_response.py @@ -0,0 +1,172 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.ai_conversation_turn_response_resulting_config_type_0 import ( + AiConversationTurnResponseResultingConfigType0, + ) + + +T = TypeVar("T", bound="AiConversationTurnResponse") + + +@_attrs_define +class AiConversationTurnResponse: + """ + Attributes: + accepted (bool | None): Whether the user accepted this proposal (null if pending). + ai_note (None | str): AI explanation from this turn. + conversation_id (str): Unique conversation turn ID. + resulting_config (AiConversationTurnResponseResultingConfigType0 | None): The proposed configuration from this + turn. + step_id (None | str): Step ID for this conversation. + step_type (None | str): Step type for this conversation. + user_input (str): User input for this turn. + """ + + accepted: bool | None + ai_note: None | str + conversation_id: str + resulting_config: AiConversationTurnResponseResultingConfigType0 | None + step_id: None | str + step_type: None | str + user_input: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.ai_conversation_turn_response_resulting_config_type_0 import ( + AiConversationTurnResponseResultingConfigType0, + ) + + accepted: bool | None + accepted = self.accepted + + ai_note: None | str + ai_note = self.ai_note + + conversation_id = self.conversation_id + + resulting_config: dict[str, Any] | None + if isinstance( + self.resulting_config, AiConversationTurnResponseResultingConfigType0 + ): + resulting_config = self.resulting_config.to_dict() + else: + resulting_config = self.resulting_config + + step_id: None | str + step_id = self.step_id + + step_type: None | str + step_type = self.step_type + + user_input = self.user_input + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "accepted": accepted, + "ai_note": ai_note, + "conversation_id": conversation_id, + "resulting_config": resulting_config, + "step_id": step_id, + "step_type": step_type, + "user_input": user_input, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.ai_conversation_turn_response_resulting_config_type_0 import ( + AiConversationTurnResponseResultingConfigType0, + ) + + d = dict(src_dict) + + def _parse_accepted(data: object) -> bool | None: + if data is None: + return data + return cast(bool | None, data) + + accepted = _parse_accepted(d.pop("accepted")) + + def _parse_ai_note(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + ai_note = _parse_ai_note(d.pop("ai_note")) + + conversation_id = d.pop("conversation_id") + + def _parse_resulting_config( + data: object, + ) -> AiConversationTurnResponseResultingConfigType0 | None: + if data is None: + return data + try: + if not isinstance(data, dict): + raise TypeError() + resulting_config_type_0 = ( + AiConversationTurnResponseResultingConfigType0.from_dict(data) + ) + + return resulting_config_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(AiConversationTurnResponseResultingConfigType0 | None, data) + + resulting_config = _parse_resulting_config(d.pop("resulting_config")) + + def _parse_step_id(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + step_id = _parse_step_id(d.pop("step_id")) + + def _parse_step_type(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + step_type = _parse_step_type(d.pop("step_type")) + + user_input = d.pop("user_input") + + ai_conversation_turn_response = cls( + accepted=accepted, + ai_note=ai_note, + conversation_id=conversation_id, + resulting_config=resulting_config, + step_id=step_id, + step_type=step_type, + user_input=user_input, + ) + + ai_conversation_turn_response.additional_properties = d + return ai_conversation_turn_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/ai_conversation_turn_response_resulting_config_type_0.py b/seclai/_generated/models/ai_conversation_turn_response_resulting_config_type_0.py new file mode 100644 index 0000000..99a4182 --- /dev/null +++ b/seclai/_generated/models/ai_conversation_turn_response_resulting_config_type_0.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AiConversationTurnResponseResultingConfigType0") + + +@_attrs_define +class AiConversationTurnResponseResultingConfigType0: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + ai_conversation_turn_response_resulting_config_type_0 = cls() + + ai_conversation_turn_response_resulting_config_type_0.additional_properties = d + return ai_conversation_turn_response_resulting_config_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/api_ai_memory_bank_accept_api_ai_assistant_memory_bank_conversation_id_patch_response_api_ai_memory_bank_accept_api_ai_assistant_memory_bank_conversation_id_patch.py b/seclai/_generated/models/api_ai_memory_bank_accept_api_ai_assistant_memory_bank_conversation_id_patch_response_api_ai_memory_bank_accept_api_ai_assistant_memory_bank_conversation_id_patch.py new file mode 100644 index 0000000..5e2032a --- /dev/null +++ b/seclai/_generated/models/api_ai_memory_bank_accept_api_ai_assistant_memory_bank_conversation_id_patch_response_api_ai_memory_bank_accept_api_ai_assistant_memory_bank_conversation_id_patch.py @@ -0,0 +1,53 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar( + "T", + bound="ApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatchResponseApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatch", +) + + +@_attrs_define +class ApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatchResponseApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatch: + """ """ + + additional_properties: dict[str, bool] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + api_ai_memory_bank_accept_api_ai_assistant_memory_bank_conversation_id_patch_response_api_ai_memory_bank_accept_api_ai_assistant_memory_bank_conversation_id_patch = ( + cls() + ) + + api_ai_memory_bank_accept_api_ai_assistant_memory_bank_conversation_id_patch_response_api_ai_memory_bank_accept_api_ai_assistant_memory_bank_conversation_id_patch.additional_properties = ( + d + ) + return api_ai_memory_bank_accept_api_ai_assistant_memory_bank_conversation_id_patch_response_api_ai_memory_bank_accept_api_ai_assistant_memory_bank_conversation_id_patch + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> bool: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: bool) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/applied_action_response.py b/seclai/_generated/models/applied_action_response.py new file mode 100644 index 0000000..c2be996 --- /dev/null +++ b/seclai/_generated/models/applied_action_response.py @@ -0,0 +1,120 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AppliedActionResponse") + + +@_attrs_define +class AppliedActionResponse: + """Result of a single executed governance action. + + Attributes: + action_type (str): Type of action that was executed. + description (str): Human-readable description of the executed action. + success (bool): Whether this individual action succeeded. + error (None | str | Unset): Error message if this action failed, or null. + policy_id (None | str | Unset): ID of the policy that was created or modified, or null. + """ + + action_type: str + description: str + success: bool + error: None | str | Unset = UNSET + policy_id: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + action_type = self.action_type + + description = self.description + + success = self.success + + error: None | str | Unset + if isinstance(self.error, Unset): + error = UNSET + else: + error = self.error + + policy_id: None | str | Unset + if isinstance(self.policy_id, Unset): + policy_id = UNSET + else: + policy_id = self.policy_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "action_type": action_type, + "description": description, + "success": success, + } + ) + if error is not UNSET: + field_dict["error"] = error + if policy_id is not UNSET: + field_dict["policy_id"] = policy_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + action_type = d.pop("action_type") + + description = d.pop("description") + + success = d.pop("success") + + def _parse_error(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + error = _parse_error(d.pop("error", UNSET)) + + def _parse_policy_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + policy_id = _parse_policy_id(d.pop("policy_id", UNSET)) + + applied_action_response = cls( + action_type=action_type, + description=description, + success=success, + error=error, + policy_id=policy_id, + ) + + applied_action_response.additional_properties = d + return applied_action_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/change_alert_status_api_alerts_alert_id_status_post_response_change_alert_status_api_alerts_alert_id_status_post.py b/seclai/_generated/models/change_alert_status_api_alerts_alert_id_status_post_response_change_alert_status_api_alerts_alert_id_status_post.py new file mode 100644 index 0000000..8dc9206 --- /dev/null +++ b/seclai/_generated/models/change_alert_status_api_alerts_alert_id_status_post_response_change_alert_status_api_alerts_alert_id_status_post.py @@ -0,0 +1,53 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar( + "T", + bound="ChangeAlertStatusApiAlertsAlertIdStatusPostResponseChangeAlertStatusApiAlertsAlertIdStatusPost", +) + + +@_attrs_define +class ChangeAlertStatusApiAlertsAlertIdStatusPostResponseChangeAlertStatusApiAlertsAlertIdStatusPost: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + change_alert_status_api_alerts_alert_id_status_post_response_change_alert_status_api_alerts_alert_id_status_post = ( + cls() + ) + + change_alert_status_api_alerts_alert_id_status_post_response_change_alert_status_api_alerts_alert_id_status_post.additional_properties = ( + d + ) + return change_alert_status_api_alerts_alert_id_status_post_response_change_alert_status_api_alerts_alert_id_status_post + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/change_status_request.py b/seclai/_generated/models/change_status_request.py new file mode 100644 index 0000000..cccac3e --- /dev/null +++ b/seclai/_generated/models/change_status_request.py @@ -0,0 +1,83 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ChangeStatusRequest") + + +@_attrs_define +class ChangeStatusRequest: + """ + Attributes: + status (str): New alert status + note (None | str | Unset): Optional note + """ + + status: str + note: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + note: None | str | Unset + if isinstance(self.note, Unset): + note = UNSET + else: + note = self.note + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + } + ) + if note is not UNSET: + field_dict["note"] = note + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + status = d.pop("status") + + def _parse_note(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + note = _parse_note(d.pop("note", UNSET)) + + change_status_request = cls( + status=status, + note=note, + ) + + change_status_request.additional_properties = d + return change_status_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/compact_memory_bank_api_memory_banks_memory_bank_id_compact_post_response_compact_memory_bank_api_memory_banks_memory_bank_id_compact_post.py b/seclai/_generated/models/compact_memory_bank_api_memory_banks_memory_bank_id_compact_post_response_compact_memory_bank_api_memory_banks_memory_bank_id_compact_post.py new file mode 100644 index 0000000..59bf038 --- /dev/null +++ b/seclai/_generated/models/compact_memory_bank_api_memory_banks_memory_bank_id_compact_post_response_compact_memory_bank_api_memory_banks_memory_bank_id_compact_post.py @@ -0,0 +1,53 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar( + "T", + bound="CompactMemoryBankApiMemoryBanksMemoryBankIdCompactPostResponseCompactMemoryBankApiMemoryBanksMemoryBankIdCompactPost", +) + + +@_attrs_define +class CompactMemoryBankApiMemoryBanksMemoryBankIdCompactPostResponseCompactMemoryBankApiMemoryBanksMemoryBankIdCompactPost: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + compact_memory_bank_api_memory_banks_memory_bank_id_compact_post_response_compact_memory_bank_api_memory_banks_memory_bank_id_compact_post = ( + cls() + ) + + compact_memory_bank_api_memory_banks_memory_bank_id_compact_post_response_compact_memory_bank_api_memory_banks_memory_bank_id_compact_post.additional_properties = ( + d + ) + return compact_memory_bank_api_memory_banks_memory_bank_id_compact_post_response_compact_memory_bank_api_memory_banks_memory_bank_id_compact_post + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/compaction_evaluation_model.py b/seclai/_generated/models/compaction_evaluation_model.py new file mode 100644 index 0000000..b40409f --- /dev/null +++ b/seclai/_generated/models/compaction_evaluation_model.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CompactionEvaluationModel") + + +@_attrs_define +class CompactionEvaluationModel: + """Structured LLM-as-judge evaluation result. + + Attributes: + reasoning (str): Explanation of the evaluation. + score (int): Quality score from 1 to 5. + verdict (str): 'pass' or 'fail'. + """ + + reasoning: str + score: int + verdict: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + reasoning = self.reasoning + + score = self.score + + verdict = self.verdict + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "reasoning": reasoning, + "score": score, + "verdict": verdict, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + reasoning = d.pop("reasoning") + + score = d.pop("score") + + verdict = d.pop("verdict") + + compaction_evaluation_model = cls( + reasoning=reasoning, + score=score, + verdict=verdict, + ) + + compaction_evaluation_model.additional_properties = d + return compaction_evaluation_model + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/compaction_test_response_model.py b/seclai/_generated/models/compaction_test_response_model.py new file mode 100644 index 0000000..4f56a0e --- /dev/null +++ b/seclai/_generated/models/compaction_test_response_model.py @@ -0,0 +1,107 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.compaction_evaluation_model import CompactionEvaluationModel + + +T = TypeVar("T", bound="CompactionTestResponseModel") + + +@_attrs_define +class CompactionTestResponseModel: + """Response from a compaction prompt test. + + Attributes: + compaction_summary (None | str): The generated compaction summary. + evaluation (CompactionEvaluationModel): Structured LLM-as-judge evaluation result. + generated (bool): True when entries were LLM-generated rather than real. + original_entries (list[str]): Entries fed into the compactor. + surviving_entries (list[str]): Entries that survived after compaction. + """ + + compaction_summary: None | str + evaluation: CompactionEvaluationModel + generated: bool + original_entries: list[str] + surviving_entries: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + compaction_summary: None | str + compaction_summary = self.compaction_summary + + evaluation = self.evaluation.to_dict() + + generated = self.generated + + original_entries = self.original_entries + + surviving_entries = self.surviving_entries + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "compaction_summary": compaction_summary, + "evaluation": evaluation, + "generated": generated, + "original_entries": original_entries, + "surviving_entries": surviving_entries, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.compaction_evaluation_model import CompactionEvaluationModel + + d = dict(src_dict) + + def _parse_compaction_summary(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + compaction_summary = _parse_compaction_summary(d.pop("compaction_summary")) + + evaluation = CompactionEvaluationModel.from_dict(d.pop("evaluation")) + + generated = d.pop("generated") + + original_entries = cast(list[str], d.pop("original_entries")) + + surviving_entries = cast(list[str], d.pop("surviving_entries")) + + compaction_test_response_model = cls( + compaction_summary=compaction_summary, + evaluation=evaluation, + generated=generated, + original_entries=original_entries, + surviving_entries=surviving_entries, + ) + + compaction_test_response_model.additional_properties = d + return compaction_test_response_model + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/compatible_run_list_response.py b/seclai/_generated/models/compatible_run_list_response.py new file mode 100644 index 0000000..9901b90 --- /dev/null +++ b/seclai/_generated/models/compatible_run_list_response.py @@ -0,0 +1,100 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.compatible_run_response import CompatibleRunResponse + + +T = TypeVar("T", bound="CompatibleRunListResponse") + + +@_attrs_define +class CompatibleRunListResponse: + """Paginated list of compatible runs. + + Attributes: + data (list[CompatibleRunResponse]): + limit (int): + page (int): + total (int): + """ + + data: list[CompatibleRunResponse] + limit: int + page: int + total: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + limit = self.limit + + page = self.page + + total = self.total + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + "limit": limit, + "page": page, + "total": total, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.compatible_run_response import CompatibleRunResponse + + d = dict(src_dict) + data = [] + _data = d.pop("data") + for data_item_data in _data: + data_item = CompatibleRunResponse.from_dict(data_item_data) + + data.append(data_item) + + limit = d.pop("limit") + + page = d.pop("page") + + total = d.pop("total") + + compatible_run_list_response = cls( + data=data, + limit=limit, + page=page, + total=total, + ) + + compatible_run_list_response.additional_properties = d + return compatible_run_list_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/compatible_run_response.py b/seclai/_generated/models/compatible_run_response.py new file mode 100644 index 0000000..5274568 --- /dev/null +++ b/seclai/_generated/models/compatible_run_response.py @@ -0,0 +1,161 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CompatibleRunResponse") + + +@_attrs_define +class CompatibleRunResponse: + """A run that has a completed step matching a criteria's step_id. + + Attributes: + agent_run_id (UUID): + agent_step_run_id (UUID): + completed_at (None | str): + output_storage_key (None | str): + input_preview (None | str | Unset): + run_status (None | str | Unset): + started_at (None | str | Unset): + """ + + agent_run_id: UUID + agent_step_run_id: UUID + completed_at: None | str + output_storage_key: None | str + input_preview: None | str | Unset = UNSET + run_status: None | str | Unset = UNSET + started_at: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + agent_run_id = str(self.agent_run_id) + + agent_step_run_id = str(self.agent_step_run_id) + + completed_at: None | str + completed_at = self.completed_at + + output_storage_key: None | str + output_storage_key = self.output_storage_key + + input_preview: None | str | Unset + if isinstance(self.input_preview, Unset): + input_preview = UNSET + else: + input_preview = self.input_preview + + run_status: None | str | Unset + if isinstance(self.run_status, Unset): + run_status = UNSET + else: + run_status = self.run_status + + started_at: None | str | Unset + if isinstance(self.started_at, Unset): + started_at = UNSET + else: + started_at = self.started_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "agent_run_id": agent_run_id, + "agent_step_run_id": agent_step_run_id, + "completed_at": completed_at, + "output_storage_key": output_storage_key, + } + ) + if input_preview is not UNSET: + field_dict["input_preview"] = input_preview + if run_status is not UNSET: + field_dict["run_status"] = run_status + if started_at is not UNSET: + field_dict["started_at"] = started_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + agent_run_id = UUID(d.pop("agent_run_id")) + + agent_step_run_id = UUID(d.pop("agent_step_run_id")) + + def _parse_completed_at(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + completed_at = _parse_completed_at(d.pop("completed_at")) + + def _parse_output_storage_key(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + output_storage_key = _parse_output_storage_key(d.pop("output_storage_key")) + + def _parse_input_preview(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + input_preview = _parse_input_preview(d.pop("input_preview", UNSET)) + + def _parse_run_status(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + run_status = _parse_run_status(d.pop("run_status", UNSET)) + + def _parse_started_at(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + started_at = _parse_started_at(d.pop("started_at", UNSET)) + + compatible_run_response = cls( + agent_run_id=agent_run_id, + agent_step_run_id=agent_step_run_id, + completed_at=completed_at, + output_storage_key=output_storage_key, + input_preview=input_preview, + run_status=run_status, + started_at=started_at, + ) + + compatible_run_response.additional_properties = d + return compatible_run_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/create_agent_request.py b/seclai/_generated/models/create_agent_request.py new file mode 100644 index 0000000..a3579fc --- /dev/null +++ b/seclai/_generated/models/create_agent_request.py @@ -0,0 +1,114 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateAgentRequest") + + +@_attrs_define +class CreateAgentRequest: + """ + Attributes: + name (str): Name for the new agent. + agent_template (None | str | Unset): Template to initialize the agent from. Values: blank, retrieval_example, + simple_qa, summarizer, json_extractor, content_change_notifier, scheduled_report, webhook_pipeline. + description (None | str | Unset): Optional description. + trigger_type (str | Unset): Trigger type: dynamic_input, template_input, schedule, new_content. Default: + 'dynamic_input'. + """ + + name: str + agent_template: None | str | Unset = UNSET + description: None | str | Unset = UNSET + trigger_type: str | Unset = "dynamic_input" + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + agent_template: None | str | Unset + if isinstance(self.agent_template, Unset): + agent_template = UNSET + else: + agent_template = self.agent_template + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + trigger_type = self.trigger_type + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + } + ) + if agent_template is not UNSET: + field_dict["agent_template"] = agent_template + if description is not UNSET: + field_dict["description"] = description + if trigger_type is not UNSET: + field_dict["trigger_type"] = trigger_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name") + + def _parse_agent_template(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + agent_template = _parse_agent_template(d.pop("agent_template", UNSET)) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + trigger_type = d.pop("trigger_type", UNSET) + + create_agent_request = cls( + name=name, + agent_template=agent_template, + description=description, + trigger_type=trigger_type, + ) + + create_agent_request.additional_properties = d + return create_agent_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/create_alert_config_api_alerts_configs_post_response_create_alert_config_api_alerts_configs_post.py b/seclai/_generated/models/create_alert_config_api_alerts_configs_post_response_create_alert_config_api_alerts_configs_post.py new file mode 100644 index 0000000..99df818 --- /dev/null +++ b/seclai/_generated/models/create_alert_config_api_alerts_configs_post_response_create_alert_config_api_alerts_configs_post.py @@ -0,0 +1,53 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar( + "T", + bound="CreateAlertConfigApiAlertsConfigsPostResponseCreateAlertConfigApiAlertsConfigsPost", +) + + +@_attrs_define +class CreateAlertConfigApiAlertsConfigsPostResponseCreateAlertConfigApiAlertsConfigsPost: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + create_alert_config_api_alerts_configs_post_response_create_alert_config_api_alerts_configs_post = ( + cls() + ) + + create_alert_config_api_alerts_configs_post_response_create_alert_config_api_alerts_configs_post.additional_properties = ( + d + ) + return create_alert_config_api_alerts_configs_post_response_create_alert_config_api_alerts_configs_post + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/create_alert_config_request.py b/seclai/_generated/models/create_alert_config_request.py new file mode 100644 index 0000000..aacc073 --- /dev/null +++ b/seclai/_generated/models/create_alert_config_request.py @@ -0,0 +1,213 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.create_alert_config_request_threshold_type_0 import ( + CreateAlertConfigRequestThresholdType0, + ) + + +T = TypeVar("T", bound="CreateAlertConfigRequest") + + +@_attrs_define +class CreateAlertConfigRequest: + """ + Attributes: + alert_type (str): Alert type + agent_id (None | str | Unset): Agent ID (for agent alerts) + cooldown_minutes (int | Unset): Cooldown period in minutes Default: 60. + distribution_type (str | Unset): Distribution type (owner, owner_admins, selected_members) Default: 'owner'. + enabled (bool | Unset): Whether the alert config is enabled Default: True. + recipient_user_ids (list[str] | None | Unset): User IDs for selected_members distribution + source_connection_id (None | str | Unset): Source connection ID (for source alerts) + threshold (CreateAlertConfigRequestThresholdType0 | None | Unset): Threshold configuration + """ + + alert_type: str + agent_id: None | str | Unset = UNSET + cooldown_minutes: int | Unset = 60 + distribution_type: str | Unset = "owner" + enabled: bool | Unset = True + recipient_user_ids: list[str] | None | Unset = UNSET + source_connection_id: None | str | Unset = UNSET + threshold: CreateAlertConfigRequestThresholdType0 | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.create_alert_config_request_threshold_type_0 import ( + CreateAlertConfigRequestThresholdType0, + ) + + alert_type = self.alert_type + + agent_id: None | str | Unset + if isinstance(self.agent_id, Unset): + agent_id = UNSET + else: + agent_id = self.agent_id + + cooldown_minutes = self.cooldown_minutes + + distribution_type = self.distribution_type + + enabled = self.enabled + + recipient_user_ids: list[str] | None | Unset + if isinstance(self.recipient_user_ids, Unset): + recipient_user_ids = UNSET + elif isinstance(self.recipient_user_ids, list): + recipient_user_ids = self.recipient_user_ids + + else: + recipient_user_ids = self.recipient_user_ids + + source_connection_id: None | str | Unset + if isinstance(self.source_connection_id, Unset): + source_connection_id = UNSET + else: + source_connection_id = self.source_connection_id + + threshold: dict[str, Any] | None | Unset + if isinstance(self.threshold, Unset): + threshold = UNSET + elif isinstance(self.threshold, CreateAlertConfigRequestThresholdType0): + threshold = self.threshold.to_dict() + else: + threshold = self.threshold + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "alert_type": alert_type, + } + ) + if agent_id is not UNSET: + field_dict["agent_id"] = agent_id + if cooldown_minutes is not UNSET: + field_dict["cooldown_minutes"] = cooldown_minutes + if distribution_type is not UNSET: + field_dict["distribution_type"] = distribution_type + if enabled is not UNSET: + field_dict["enabled"] = enabled + if recipient_user_ids is not UNSET: + field_dict["recipient_user_ids"] = recipient_user_ids + if source_connection_id is not UNSET: + field_dict["source_connection_id"] = source_connection_id + if threshold is not UNSET: + field_dict["threshold"] = threshold + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.create_alert_config_request_threshold_type_0 import ( + CreateAlertConfigRequestThresholdType0, + ) + + d = dict(src_dict) + alert_type = d.pop("alert_type") + + def _parse_agent_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + agent_id = _parse_agent_id(d.pop("agent_id", UNSET)) + + cooldown_minutes = d.pop("cooldown_minutes", UNSET) + + distribution_type = d.pop("distribution_type", UNSET) + + enabled = d.pop("enabled", UNSET) + + def _parse_recipient_user_ids(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + recipient_user_ids_type_0 = cast(list[str], data) + + return recipient_user_ids_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + recipient_user_ids = _parse_recipient_user_ids( + d.pop("recipient_user_ids", UNSET) + ) + + def _parse_source_connection_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + source_connection_id = _parse_source_connection_id( + d.pop("source_connection_id", UNSET) + ) + + def _parse_threshold( + data: object, + ) -> CreateAlertConfigRequestThresholdType0 | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + threshold_type_0 = CreateAlertConfigRequestThresholdType0.from_dict( + data + ) + + return threshold_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(CreateAlertConfigRequestThresholdType0 | None | Unset, data) + + threshold = _parse_threshold(d.pop("threshold", UNSET)) + + create_alert_config_request = cls( + alert_type=alert_type, + agent_id=agent_id, + cooldown_minutes=cooldown_minutes, + distribution_type=distribution_type, + enabled=enabled, + recipient_user_ids=recipient_user_ids, + source_connection_id=source_connection_id, + threshold=threshold, + ) + + create_alert_config_request.additional_properties = d + return create_alert_config_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/create_alert_config_request_threshold_type_0.py b/seclai/_generated/models/create_alert_config_request_threshold_type_0.py new file mode 100644 index 0000000..d0a52c2 --- /dev/null +++ b/seclai/_generated/models/create_alert_config_request_threshold_type_0.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CreateAlertConfigRequestThresholdType0") + + +@_attrs_define +class CreateAlertConfigRequestThresholdType0: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + create_alert_config_request_threshold_type_0 = cls() + + create_alert_config_request_threshold_type_0.additional_properties = d + return create_alert_config_request_threshold_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/create_evaluation_criteria_request.py b/seclai/_generated/models/create_evaluation_criteria_request.py new file mode 100644 index 0000000..110106f --- /dev/null +++ b/seclai/_generated/models/create_evaluation_criteria_request.py @@ -0,0 +1,216 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.agent_evaluation_tier import AgentEvaluationTier +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.create_evaluation_criteria_request_expectation_config_type_0 import ( + CreateEvaluationCriteriaRequestExpectationConfigType0, + ) + + +T = TypeVar("T", bound="CreateEvaluationCriteriaRequest") + + +@_attrs_define +class CreateEvaluationCriteriaRequest: + """Request body for creating an evaluation criteria. + + The evaluation mode, retry settings, and sample frequency are set at the + agent level, not per-criteria. + + Attributes: + step_id (str): + description (None | str | Unset): + enabled (bool | Unset): Default: True. + evaluation_prompt (None | str | Unset): + evaluation_tier (AgentEvaluationTier | None | Unset): + expectation_config (CreateEvaluationCriteriaRequestExpectationConfigType0 | None | Unset): + pass_threshold (float | Unset): Default: 0.5. + """ + + step_id: str + description: None | str | Unset = UNSET + enabled: bool | Unset = True + evaluation_prompt: None | str | Unset = UNSET + evaluation_tier: AgentEvaluationTier | None | Unset = UNSET + expectation_config: ( + CreateEvaluationCriteriaRequestExpectationConfigType0 | None | Unset + ) = UNSET + pass_threshold: float | Unset = 0.5 + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.create_evaluation_criteria_request_expectation_config_type_0 import ( + CreateEvaluationCriteriaRequestExpectationConfigType0, + ) + + step_id = self.step_id + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + enabled = self.enabled + + evaluation_prompt: None | str | Unset + if isinstance(self.evaluation_prompt, Unset): + evaluation_prompt = UNSET + else: + evaluation_prompt = self.evaluation_prompt + + evaluation_tier: None | str | Unset + if isinstance(self.evaluation_tier, Unset): + evaluation_tier = UNSET + elif isinstance(self.evaluation_tier, AgentEvaluationTier): + evaluation_tier = self.evaluation_tier.value + else: + evaluation_tier = self.evaluation_tier + + expectation_config: dict[str, Any] | None | Unset + if isinstance(self.expectation_config, Unset): + expectation_config = UNSET + elif isinstance( + self.expectation_config, + CreateEvaluationCriteriaRequestExpectationConfigType0, + ): + expectation_config = self.expectation_config.to_dict() + else: + expectation_config = self.expectation_config + + pass_threshold = self.pass_threshold + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "step_id": step_id, + } + ) + if description is not UNSET: + field_dict["description"] = description + if enabled is not UNSET: + field_dict["enabled"] = enabled + if evaluation_prompt is not UNSET: + field_dict["evaluation_prompt"] = evaluation_prompt + if evaluation_tier is not UNSET: + field_dict["evaluation_tier"] = evaluation_tier + if expectation_config is not UNSET: + field_dict["expectation_config"] = expectation_config + if pass_threshold is not UNSET: + field_dict["pass_threshold"] = pass_threshold + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.create_evaluation_criteria_request_expectation_config_type_0 import ( + CreateEvaluationCriteriaRequestExpectationConfigType0, + ) + + d = dict(src_dict) + step_id = d.pop("step_id") + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + enabled = d.pop("enabled", UNSET) + + def _parse_evaluation_prompt(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + evaluation_prompt = _parse_evaluation_prompt(d.pop("evaluation_prompt", UNSET)) + + def _parse_evaluation_tier(data: object) -> AgentEvaluationTier | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + evaluation_tier_type_0 = AgentEvaluationTier(data) + + return evaluation_tier_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(AgentEvaluationTier | None | Unset, data) + + evaluation_tier = _parse_evaluation_tier(d.pop("evaluation_tier", UNSET)) + + def _parse_expectation_config( + data: object, + ) -> CreateEvaluationCriteriaRequestExpectationConfigType0 | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + expectation_config_type_0 = ( + CreateEvaluationCriteriaRequestExpectationConfigType0.from_dict( + data + ) + ) + + return expectation_config_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast( + CreateEvaluationCriteriaRequestExpectationConfigType0 | None | Unset, + data, + ) + + expectation_config = _parse_expectation_config( + d.pop("expectation_config", UNSET) + ) + + pass_threshold = d.pop("pass_threshold", UNSET) + + create_evaluation_criteria_request = cls( + step_id=step_id, + description=description, + enabled=enabled, + evaluation_prompt=evaluation_prompt, + evaluation_tier=evaluation_tier, + expectation_config=expectation_config, + pass_threshold=pass_threshold, + ) + + create_evaluation_criteria_request.additional_properties = d + return create_evaluation_criteria_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/create_evaluation_criteria_request_expectation_config_type_0.py b/seclai/_generated/models/create_evaluation_criteria_request_expectation_config_type_0.py new file mode 100644 index 0000000..342c5e3 --- /dev/null +++ b/seclai/_generated/models/create_evaluation_criteria_request_expectation_config_type_0.py @@ -0,0 +1,48 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CreateEvaluationCriteriaRequestExpectationConfigType0") + + +@_attrs_define +class CreateEvaluationCriteriaRequestExpectationConfigType0: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + create_evaluation_criteria_request_expectation_config_type_0 = cls() + + create_evaluation_criteria_request_expectation_config_type_0.additional_properties = ( + d + ) + return create_evaluation_criteria_request_expectation_config_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/create_evaluation_result_request.py b/seclai/_generated/models/create_evaluation_result_request.py new file mode 100644 index 0000000..549c9ff --- /dev/null +++ b/seclai/_generated/models/create_evaluation_result_request.py @@ -0,0 +1,199 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.evaluation_status import EvaluationStatus +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.create_evaluation_result_request_details_type_0 import ( + CreateEvaluationResultRequestDetailsType0, + ) + + +T = TypeVar("T", bound="CreateEvaluationResultRequest") + + +@_attrs_define +class CreateEvaluationResultRequest: + """Request body for recording an evaluation result. + + Attributes: + agent_run_id (UUID): + status (EvaluationStatus): Result status of a single evaluation run. + agent_step_run_id (None | Unset | UUID): + details (CreateEvaluationResultRequestDetailsType0 | None | Unset): + flagged (bool | Unset): Default: False. + retry_count (int | Unset): Default: 0. + retry_triggered (bool | Unset): Default: False. + score (float | None | Unset): + """ + + agent_run_id: UUID + status: EvaluationStatus + agent_step_run_id: None | Unset | UUID = UNSET + details: CreateEvaluationResultRequestDetailsType0 | None | Unset = UNSET + flagged: bool | Unset = False + retry_count: int | Unset = 0 + retry_triggered: bool | Unset = False + score: float | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.create_evaluation_result_request_details_type_0 import ( + CreateEvaluationResultRequestDetailsType0, + ) + + agent_run_id = str(self.agent_run_id) + + status = self.status.value + + agent_step_run_id: None | str | Unset + if isinstance(self.agent_step_run_id, Unset): + agent_step_run_id = UNSET + elif isinstance(self.agent_step_run_id, UUID): + agent_step_run_id = str(self.agent_step_run_id) + else: + agent_step_run_id = self.agent_step_run_id + + details: dict[str, Any] | None | Unset + if isinstance(self.details, Unset): + details = UNSET + elif isinstance(self.details, CreateEvaluationResultRequestDetailsType0): + details = self.details.to_dict() + else: + details = self.details + + flagged = self.flagged + + retry_count = self.retry_count + + retry_triggered = self.retry_triggered + + score: float | None | Unset + if isinstance(self.score, Unset): + score = UNSET + else: + score = self.score + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "agent_run_id": agent_run_id, + "status": status, + } + ) + if agent_step_run_id is not UNSET: + field_dict["agent_step_run_id"] = agent_step_run_id + if details is not UNSET: + field_dict["details"] = details + if flagged is not UNSET: + field_dict["flagged"] = flagged + if retry_count is not UNSET: + field_dict["retry_count"] = retry_count + if retry_triggered is not UNSET: + field_dict["retry_triggered"] = retry_triggered + if score is not UNSET: + field_dict["score"] = score + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.create_evaluation_result_request_details_type_0 import ( + CreateEvaluationResultRequestDetailsType0, + ) + + d = dict(src_dict) + agent_run_id = UUID(d.pop("agent_run_id")) + + status = EvaluationStatus(d.pop("status")) + + def _parse_agent_step_run_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + agent_step_run_id_type_0 = UUID(data) + + return agent_step_run_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + agent_step_run_id = _parse_agent_step_run_id(d.pop("agent_step_run_id", UNSET)) + + def _parse_details( + data: object, + ) -> CreateEvaluationResultRequestDetailsType0 | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + details_type_0 = CreateEvaluationResultRequestDetailsType0.from_dict( + data + ) + + return details_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(CreateEvaluationResultRequestDetailsType0 | None | Unset, data) + + details = _parse_details(d.pop("details", UNSET)) + + flagged = d.pop("flagged", UNSET) + + retry_count = d.pop("retry_count", UNSET) + + retry_triggered = d.pop("retry_triggered", UNSET) + + def _parse_score(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + score = _parse_score(d.pop("score", UNSET)) + + create_evaluation_result_request = cls( + agent_run_id=agent_run_id, + status=status, + agent_step_run_id=agent_step_run_id, + details=details, + flagged=flagged, + retry_count=retry_count, + retry_triggered=retry_triggered, + score=score, + ) + + create_evaluation_result_request.additional_properties = d + return create_evaluation_result_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/create_evaluation_result_request_details_type_0.py b/seclai/_generated/models/create_evaluation_result_request_details_type_0.py new file mode 100644 index 0000000..ba4470b --- /dev/null +++ b/seclai/_generated/models/create_evaluation_result_request_details_type_0.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CreateEvaluationResultRequestDetailsType0") + + +@_attrs_define +class CreateEvaluationResultRequestDetailsType0: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + create_evaluation_result_request_details_type_0 = cls() + + create_evaluation_result_request_details_type_0.additional_properties = d + return create_evaluation_result_request_details_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/create_export_request.py b/seclai/_generated/models/create_export_request.py new file mode 100644 index 0000000..ac8b3b5 --- /dev/null +++ b/seclai/_generated/models/create_export_request.py @@ -0,0 +1,196 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.export_format import ExportFormat +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.create_export_request_metadata_filter_type_0 import ( + CreateExportRequestMetadataFilterType0, + ) + + +T = TypeVar("T", bound="CreateExportRequest") + + +@_attrs_define +class CreateExportRequest: + """Parameters for creating a new export job. + + Attributes: + format_ (ExportFormat): Supported export file formats. + date_from (datetime.datetime | None | Unset): Only include content created on or after this timestamp. + date_to (datetime.datetime | None | Unset): Only include content created on or before this timestamp. + metadata_filter (CreateExportRequestMetadataFilterType0 | None | Unset): JSONB containment filter applied to + content metadata. + query_filter (None | str | Unset): Title substring filter (case-insensitive ILIKE). + """ + + format_: ExportFormat + date_from: datetime.datetime | None | Unset = UNSET + date_to: datetime.datetime | None | Unset = UNSET + metadata_filter: CreateExportRequestMetadataFilterType0 | None | Unset = UNSET + query_filter: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.create_export_request_metadata_filter_type_0 import ( + CreateExportRequestMetadataFilterType0, + ) + + format_ = self.format_.value + + date_from: None | str | Unset + if isinstance(self.date_from, Unset): + date_from = UNSET + elif isinstance(self.date_from, datetime.datetime): + date_from = self.date_from.isoformat() + else: + date_from = self.date_from + + date_to: None | str | Unset + if isinstance(self.date_to, Unset): + date_to = UNSET + elif isinstance(self.date_to, datetime.datetime): + date_to = self.date_to.isoformat() + else: + date_to = self.date_to + + metadata_filter: dict[str, Any] | None | Unset + if isinstance(self.metadata_filter, Unset): + metadata_filter = UNSET + elif isinstance(self.metadata_filter, CreateExportRequestMetadataFilterType0): + metadata_filter = self.metadata_filter.to_dict() + else: + metadata_filter = self.metadata_filter + + query_filter: None | str | Unset + if isinstance(self.query_filter, Unset): + query_filter = UNSET + else: + query_filter = self.query_filter + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "format": format_, + } + ) + if date_from is not UNSET: + field_dict["date_from"] = date_from + if date_to is not UNSET: + field_dict["date_to"] = date_to + if metadata_filter is not UNSET: + field_dict["metadata_filter"] = metadata_filter + if query_filter is not UNSET: + field_dict["query_filter"] = query_filter + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.create_export_request_metadata_filter_type_0 import ( + CreateExportRequestMetadataFilterType0, + ) + + d = dict(src_dict) + format_ = ExportFormat(d.pop("format")) + + def _parse_date_from(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + date_from_type_0 = isoparse(data) + + return date_from_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + date_from = _parse_date_from(d.pop("date_from", UNSET)) + + def _parse_date_to(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + date_to_type_0 = isoparse(data) + + return date_to_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + date_to = _parse_date_to(d.pop("date_to", UNSET)) + + def _parse_metadata_filter( + data: object, + ) -> CreateExportRequestMetadataFilterType0 | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + metadata_filter_type_0 = ( + CreateExportRequestMetadataFilterType0.from_dict(data) + ) + + return metadata_filter_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(CreateExportRequestMetadataFilterType0 | None | Unset, data) + + metadata_filter = _parse_metadata_filter(d.pop("metadata_filter", UNSET)) + + def _parse_query_filter(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + query_filter = _parse_query_filter(d.pop("query_filter", UNSET)) + + create_export_request = cls( + format_=format_, + date_from=date_from, + date_to=date_to, + metadata_filter=metadata_filter, + query_filter=query_filter, + ) + + create_export_request.additional_properties = d + return create_export_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/create_export_request_metadata_filter_type_0.py b/seclai/_generated/models/create_export_request_metadata_filter_type_0.py new file mode 100644 index 0000000..9273162 --- /dev/null +++ b/seclai/_generated/models/create_export_request_metadata_filter_type_0.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CreateExportRequestMetadataFilterType0") + + +@_attrs_define +class CreateExportRequestMetadataFilterType0: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + create_export_request_metadata_filter_type_0 = cls() + + create_export_request_metadata_filter_type_0.additional_properties = d + return create_export_request_metadata_filter_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/create_knowledge_base_body.py b/seclai/_generated/models/create_knowledge_base_body.py new file mode 100644 index 0000000..ab3e793 --- /dev/null +++ b/seclai/_generated/models/create_knowledge_base_body.py @@ -0,0 +1,174 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateKnowledgeBaseBody") + + +@_attrs_define +class CreateKnowledgeBaseBody: + """Request body for creating a knowledge base. + + Attributes: + name (str): Knowledge base name. + source_ids (list[str]): List of source connection IDs to link. + default_score_threshold (float | None | Unset): Default minimum rerank score threshold. + default_top_k (int | None | Unset): Default results after reranking. + default_top_n (int | None | Unset): Default number of results. + description (None | str | Unset): Optional description. + reranker_model (None | str | Unset): Reranker model to use (null for no reranking). + """ + + name: str + source_ids: list[str] + default_score_threshold: float | None | Unset = UNSET + default_top_k: int | None | Unset = UNSET + default_top_n: int | None | Unset = UNSET + description: None | str | Unset = UNSET + reranker_model: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + source_ids = self.source_ids + + default_score_threshold: float | None | Unset + if isinstance(self.default_score_threshold, Unset): + default_score_threshold = UNSET + else: + default_score_threshold = self.default_score_threshold + + default_top_k: int | None | Unset + if isinstance(self.default_top_k, Unset): + default_top_k = UNSET + else: + default_top_k = self.default_top_k + + default_top_n: int | None | Unset + if isinstance(self.default_top_n, Unset): + default_top_n = UNSET + else: + default_top_n = self.default_top_n + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + reranker_model: None | str | Unset + if isinstance(self.reranker_model, Unset): + reranker_model = UNSET + else: + reranker_model = self.reranker_model + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "source_ids": source_ids, + } + ) + if default_score_threshold is not UNSET: + field_dict["default_score_threshold"] = default_score_threshold + if default_top_k is not UNSET: + field_dict["default_top_k"] = default_top_k + if default_top_n is not UNSET: + field_dict["default_top_n"] = default_top_n + if description is not UNSET: + field_dict["description"] = description + if reranker_model is not UNSET: + field_dict["reranker_model"] = reranker_model + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name") + + source_ids = cast(list[str], d.pop("source_ids")) + + def _parse_default_score_threshold(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + default_score_threshold = _parse_default_score_threshold( + d.pop("default_score_threshold", UNSET) + ) + + def _parse_default_top_k(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + default_top_k = _parse_default_top_k(d.pop("default_top_k", UNSET)) + + def _parse_default_top_n(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + default_top_n = _parse_default_top_n(d.pop("default_top_n", UNSET)) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + def _parse_reranker_model(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + reranker_model = _parse_reranker_model(d.pop("reranker_model", UNSET)) + + create_knowledge_base_body = cls( + name=name, + source_ids=source_ids, + default_score_threshold=default_score_threshold, + default_top_k=default_top_k, + default_top_n=default_top_n, + description=description, + reranker_model=reranker_model, + ) + + create_knowledge_base_body.additional_properties = d + return create_knowledge_base_body + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/create_memory_bank_body.py b/seclai/_generated/models/create_memory_bank_body.py new file mode 100644 index 0000000..9526b45 --- /dev/null +++ b/seclai/_generated/models/create_memory_bank_body.py @@ -0,0 +1,288 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateMemoryBankBody") + + +@_attrs_define +class CreateMemoryBankBody: + """Request body for creating a memory bank. + + Attributes: + name (str): Memory bank name. + chunk_overlap (int | None | Unset): Chunk overlap (custom mode only). + chunk_size (int | None | Unset): Chunk size (custom mode only). + compaction_prompt (None | str | Unset): Custom prompt used when compacting older entries. When set, entries that + exceed a threshold are summarized into a new entry before being soft-deleted. + description (None | str | Unset): Optional description of the bank's purpose. + dimensions (int | None | Unset): Embedding dimensions (custom mode only). + embedding_model (None | str | Unset): Custom embedding model (custom mode only). + max_age_days (int | None | Unset): Max entry age in days before compaction. Checked inline after each write and + by the hourly background sweep. + max_size_tokens (int | None | Unset): Max total tokens (per partition) before compaction. Checked inline after + each write and by the hourly background sweep. + max_turns (int | None | Unset): Max conversation turns (per partition) before compaction. Checked inline after + each write and by the hourly background sweep. + mode (str | Unset): Embedding quality / cost trade-off. One of: fast_and_cheap, balanced, slow_and_thorough, + custom. Default: 'fast_and_cheap'. + retention_days (int | None | Unset): Content source retention in days. Default: 30. + type_ (str | Unset): Bank type. 'conversation' for chat-turn data with conversation_key + speaker; 'general' for + flat entries with optional group_key. Default: 'conversation'. + """ + + name: str + chunk_overlap: int | None | Unset = UNSET + chunk_size: int | None | Unset = UNSET + compaction_prompt: None | str | Unset = UNSET + description: None | str | Unset = UNSET + dimensions: int | None | Unset = UNSET + embedding_model: None | str | Unset = UNSET + max_age_days: int | None | Unset = UNSET + max_size_tokens: int | None | Unset = UNSET + max_turns: int | None | Unset = UNSET + mode: str | Unset = "fast_and_cheap" + retention_days: int | None | Unset = 30 + type_: str | Unset = "conversation" + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + chunk_overlap: int | None | Unset + if isinstance(self.chunk_overlap, Unset): + chunk_overlap = UNSET + else: + chunk_overlap = self.chunk_overlap + + chunk_size: int | None | Unset + if isinstance(self.chunk_size, Unset): + chunk_size = UNSET + else: + chunk_size = self.chunk_size + + compaction_prompt: None | str | Unset + if isinstance(self.compaction_prompt, Unset): + compaction_prompt = UNSET + else: + compaction_prompt = self.compaction_prompt + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + dimensions: int | None | Unset + if isinstance(self.dimensions, Unset): + dimensions = UNSET + else: + dimensions = self.dimensions + + embedding_model: None | str | Unset + if isinstance(self.embedding_model, Unset): + embedding_model = UNSET + else: + embedding_model = self.embedding_model + + max_age_days: int | None | Unset + if isinstance(self.max_age_days, Unset): + max_age_days = UNSET + else: + max_age_days = self.max_age_days + + max_size_tokens: int | None | Unset + if isinstance(self.max_size_tokens, Unset): + max_size_tokens = UNSET + else: + max_size_tokens = self.max_size_tokens + + max_turns: int | None | Unset + if isinstance(self.max_turns, Unset): + max_turns = UNSET + else: + max_turns = self.max_turns + + mode = self.mode + + retention_days: int | None | Unset + if isinstance(self.retention_days, Unset): + retention_days = UNSET + else: + retention_days = self.retention_days + + type_ = self.type_ + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + } + ) + if chunk_overlap is not UNSET: + field_dict["chunk_overlap"] = chunk_overlap + if chunk_size is not UNSET: + field_dict["chunk_size"] = chunk_size + if compaction_prompt is not UNSET: + field_dict["compaction_prompt"] = compaction_prompt + if description is not UNSET: + field_dict["description"] = description + if dimensions is not UNSET: + field_dict["dimensions"] = dimensions + if embedding_model is not UNSET: + field_dict["embedding_model"] = embedding_model + if max_age_days is not UNSET: + field_dict["max_age_days"] = max_age_days + if max_size_tokens is not UNSET: + field_dict["max_size_tokens"] = max_size_tokens + if max_turns is not UNSET: + field_dict["max_turns"] = max_turns + if mode is not UNSET: + field_dict["mode"] = mode + if retention_days is not UNSET: + field_dict["retention_days"] = retention_days + if type_ is not UNSET: + field_dict["type"] = type_ + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name") + + def _parse_chunk_overlap(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + chunk_overlap = _parse_chunk_overlap(d.pop("chunk_overlap", UNSET)) + + def _parse_chunk_size(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + chunk_size = _parse_chunk_size(d.pop("chunk_size", UNSET)) + + def _parse_compaction_prompt(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + compaction_prompt = _parse_compaction_prompt(d.pop("compaction_prompt", UNSET)) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + def _parse_dimensions(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + dimensions = _parse_dimensions(d.pop("dimensions", UNSET)) + + def _parse_embedding_model(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + embedding_model = _parse_embedding_model(d.pop("embedding_model", UNSET)) + + def _parse_max_age_days(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + max_age_days = _parse_max_age_days(d.pop("max_age_days", UNSET)) + + def _parse_max_size_tokens(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + max_size_tokens = _parse_max_size_tokens(d.pop("max_size_tokens", UNSET)) + + def _parse_max_turns(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + max_turns = _parse_max_turns(d.pop("max_turns", UNSET)) + + mode = d.pop("mode", UNSET) + + def _parse_retention_days(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + retention_days = _parse_retention_days(d.pop("retention_days", UNSET)) + + type_ = d.pop("type", UNSET) + + create_memory_bank_body = cls( + name=name, + chunk_overlap=chunk_overlap, + chunk_size=chunk_size, + compaction_prompt=compaction_prompt, + description=description, + dimensions=dimensions, + embedding_model=embedding_model, + max_age_days=max_age_days, + max_size_tokens=max_size_tokens, + max_turns=max_turns, + mode=mode, + retention_days=retention_days, + type_=type_, + ) + + create_memory_bank_body.additional_properties = d + return create_memory_bank_body + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/create_solution_request.py b/seclai/_generated/models/create_solution_request.py new file mode 100644 index 0000000..5a6691a --- /dev/null +++ b/seclai/_generated/models/create_solution_request.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateSolutionRequest") + + +@_attrs_define +class CreateSolutionRequest: + """Request model for creating a new solution + + Attributes: + name (str): Name of the solution + description (str | Unset): Description of the solution Default: ''. + """ + + name: str + description: str | Unset = "" + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + description = self.description + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + } + ) + if description is not UNSET: + field_dict["description"] = description + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name") + + description = d.pop("description", UNSET) + + create_solution_request = cls( + name=name, + description=description, + ) + + create_solution_request.additional_properties = d + return create_solution_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/create_source_body.py b/seclai/_generated/models/create_source_body.py new file mode 100644 index 0000000..21a9479 --- /dev/null +++ b/seclai/_generated/models/create_source_body.py @@ -0,0 +1,272 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateSourceBody") + + +@_attrs_define +class CreateSourceBody: + """Request body for creating a content source. + + Attributes: + name (str): Source name. + source_type (str): Source type: rss, website, file_uploads, or custom_index. + chunk_overlap (int | None | Unset): Chunk overlap for content processing. + chunk_size (int | None | Unset): Chunk size for content processing. + content_filter (None | str | Unset): Content filter type. + dimensions (int | None | Unset): Embedding dimensions override. + embedding_model (None | str | Unset): Embedding model override. + polling (None | str | Unset): Polling interval (e.g. hourly, daily). + polling_action (None | str | Unset): Polling action. + polling_max_items (int | None | Unset): Max items per poll. + retention (int | None | Unset): Retention period in days. + url_id (None | str | Unset): URL record ID (required for rss/website sources). + """ + + name: str + source_type: str + chunk_overlap: int | None | Unset = UNSET + chunk_size: int | None | Unset = UNSET + content_filter: None | str | Unset = UNSET + dimensions: int | None | Unset = UNSET + embedding_model: None | str | Unset = UNSET + polling: None | str | Unset = UNSET + polling_action: None | str | Unset = UNSET + polling_max_items: int | None | Unset = UNSET + retention: int | None | Unset = UNSET + url_id: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + source_type = self.source_type + + chunk_overlap: int | None | Unset + if isinstance(self.chunk_overlap, Unset): + chunk_overlap = UNSET + else: + chunk_overlap = self.chunk_overlap + + chunk_size: int | None | Unset + if isinstance(self.chunk_size, Unset): + chunk_size = UNSET + else: + chunk_size = self.chunk_size + + content_filter: None | str | Unset + if isinstance(self.content_filter, Unset): + content_filter = UNSET + else: + content_filter = self.content_filter + + dimensions: int | None | Unset + if isinstance(self.dimensions, Unset): + dimensions = UNSET + else: + dimensions = self.dimensions + + embedding_model: None | str | Unset + if isinstance(self.embedding_model, Unset): + embedding_model = UNSET + else: + embedding_model = self.embedding_model + + polling: None | str | Unset + if isinstance(self.polling, Unset): + polling = UNSET + else: + polling = self.polling + + polling_action: None | str | Unset + if isinstance(self.polling_action, Unset): + polling_action = UNSET + else: + polling_action = self.polling_action + + polling_max_items: int | None | Unset + if isinstance(self.polling_max_items, Unset): + polling_max_items = UNSET + else: + polling_max_items = self.polling_max_items + + retention: int | None | Unset + if isinstance(self.retention, Unset): + retention = UNSET + else: + retention = self.retention + + url_id: None | str | Unset + if isinstance(self.url_id, Unset): + url_id = UNSET + else: + url_id = self.url_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "source_type": source_type, + } + ) + if chunk_overlap is not UNSET: + field_dict["chunk_overlap"] = chunk_overlap + if chunk_size is not UNSET: + field_dict["chunk_size"] = chunk_size + if content_filter is not UNSET: + field_dict["content_filter"] = content_filter + if dimensions is not UNSET: + field_dict["dimensions"] = dimensions + if embedding_model is not UNSET: + field_dict["embedding_model"] = embedding_model + if polling is not UNSET: + field_dict["polling"] = polling + if polling_action is not UNSET: + field_dict["polling_action"] = polling_action + if polling_max_items is not UNSET: + field_dict["polling_max_items"] = polling_max_items + if retention is not UNSET: + field_dict["retention"] = retention + if url_id is not UNSET: + field_dict["url_id"] = url_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name") + + source_type = d.pop("source_type") + + def _parse_chunk_overlap(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + chunk_overlap = _parse_chunk_overlap(d.pop("chunk_overlap", UNSET)) + + def _parse_chunk_size(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + chunk_size = _parse_chunk_size(d.pop("chunk_size", UNSET)) + + def _parse_content_filter(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + content_filter = _parse_content_filter(d.pop("content_filter", UNSET)) + + def _parse_dimensions(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + dimensions = _parse_dimensions(d.pop("dimensions", UNSET)) + + def _parse_embedding_model(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + embedding_model = _parse_embedding_model(d.pop("embedding_model", UNSET)) + + def _parse_polling(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + polling = _parse_polling(d.pop("polling", UNSET)) + + def _parse_polling_action(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + polling_action = _parse_polling_action(d.pop("polling_action", UNSET)) + + def _parse_polling_max_items(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + polling_max_items = _parse_polling_max_items(d.pop("polling_max_items", UNSET)) + + def _parse_retention(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + retention = _parse_retention(d.pop("retention", UNSET)) + + def _parse_url_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + url_id = _parse_url_id(d.pop("url_id", UNSET)) + + create_source_body = cls( + name=name, + source_type=source_type, + chunk_overlap=chunk_overlap, + chunk_size=chunk_size, + content_filter=content_filter, + dimensions=dimensions, + embedding_model=embedding_model, + polling=polling, + polling_action=polling_action, + polling_max_items=polling_max_items, + retention=retention, + url_id=url_id, + ) + + create_source_body.additional_properties = d + return create_source_body + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/estimate_export_request.py b/seclai/_generated/models/estimate_export_request.py new file mode 100644 index 0000000..0283300 --- /dev/null +++ b/seclai/_generated/models/estimate_export_request.py @@ -0,0 +1,196 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.export_format import ExportFormat +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.estimate_export_request_metadata_filter_type_0 import ( + EstimateExportRequestMetadataFilterType0, + ) + + +T = TypeVar("T", bound="EstimateExportRequest") + + +@_attrs_define +class EstimateExportRequest: + """Parameters for estimating export size. + + Attributes: + format_ (ExportFormat): Supported export file formats. + date_from (datetime.datetime | None | Unset): Only include content created on or after this timestamp. + date_to (datetime.datetime | None | Unset): Only include content created on or before this timestamp. + metadata_filter (EstimateExportRequestMetadataFilterType0 | None | Unset): JSONB containment filter applied to + content metadata. + query_filter (None | str | Unset): Title substring filter (case-insensitive ILIKE). + """ + + format_: ExportFormat + date_from: datetime.datetime | None | Unset = UNSET + date_to: datetime.datetime | None | Unset = UNSET + metadata_filter: EstimateExportRequestMetadataFilterType0 | None | Unset = UNSET + query_filter: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.estimate_export_request_metadata_filter_type_0 import ( + EstimateExportRequestMetadataFilterType0, + ) + + format_ = self.format_.value + + date_from: None | str | Unset + if isinstance(self.date_from, Unset): + date_from = UNSET + elif isinstance(self.date_from, datetime.datetime): + date_from = self.date_from.isoformat() + else: + date_from = self.date_from + + date_to: None | str | Unset + if isinstance(self.date_to, Unset): + date_to = UNSET + elif isinstance(self.date_to, datetime.datetime): + date_to = self.date_to.isoformat() + else: + date_to = self.date_to + + metadata_filter: dict[str, Any] | None | Unset + if isinstance(self.metadata_filter, Unset): + metadata_filter = UNSET + elif isinstance(self.metadata_filter, EstimateExportRequestMetadataFilterType0): + metadata_filter = self.metadata_filter.to_dict() + else: + metadata_filter = self.metadata_filter + + query_filter: None | str | Unset + if isinstance(self.query_filter, Unset): + query_filter = UNSET + else: + query_filter = self.query_filter + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "format": format_, + } + ) + if date_from is not UNSET: + field_dict["date_from"] = date_from + if date_to is not UNSET: + field_dict["date_to"] = date_to + if metadata_filter is not UNSET: + field_dict["metadata_filter"] = metadata_filter + if query_filter is not UNSET: + field_dict["query_filter"] = query_filter + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.estimate_export_request_metadata_filter_type_0 import ( + EstimateExportRequestMetadataFilterType0, + ) + + d = dict(src_dict) + format_ = ExportFormat(d.pop("format")) + + def _parse_date_from(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + date_from_type_0 = isoparse(data) + + return date_from_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + date_from = _parse_date_from(d.pop("date_from", UNSET)) + + def _parse_date_to(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + date_to_type_0 = isoparse(data) + + return date_to_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + date_to = _parse_date_to(d.pop("date_to", UNSET)) + + def _parse_metadata_filter( + data: object, + ) -> EstimateExportRequestMetadataFilterType0 | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + metadata_filter_type_0 = ( + EstimateExportRequestMetadataFilterType0.from_dict(data) + ) + + return metadata_filter_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(EstimateExportRequestMetadataFilterType0 | None | Unset, data) + + metadata_filter = _parse_metadata_filter(d.pop("metadata_filter", UNSET)) + + def _parse_query_filter(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + query_filter = _parse_query_filter(d.pop("query_filter", UNSET)) + + estimate_export_request = cls( + format_=format_, + date_from=date_from, + date_to=date_to, + metadata_filter=metadata_filter, + query_filter=query_filter, + ) + + estimate_export_request.additional_properties = d + return estimate_export_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/estimate_export_request_metadata_filter_type_0.py b/seclai/_generated/models/estimate_export_request_metadata_filter_type_0.py new file mode 100644 index 0000000..726cf8e --- /dev/null +++ b/seclai/_generated/models/estimate_export_request_metadata_filter_type_0.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EstimateExportRequestMetadataFilterType0") + + +@_attrs_define +class EstimateExportRequestMetadataFilterType0: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + estimate_export_request_metadata_filter_type_0 = cls() + + estimate_export_request_metadata_filter_type_0.additional_properties = d + return estimate_export_request_metadata_filter_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/estimate_export_response.py b/seclai/_generated/models/estimate_export_response.py new file mode 100644 index 0000000..35c199e --- /dev/null +++ b/seclai/_generated/models/estimate_export_response.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EstimateExportResponse") + + +@_attrs_define +class EstimateExportResponse: + """Rough size estimate for a potential export. + + Attributes: + estimated_size_bytes (int): Estimated export file size in bytes. + source_connection_id (str): Source connection ID. + """ + + estimated_size_bytes: int + source_connection_id: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + estimated_size_bytes = self.estimated_size_bytes + + source_connection_id = self.source_connection_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "estimated_size_bytes": estimated_size_bytes, + "source_connection_id": source_connection_id, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + estimated_size_bytes = d.pop("estimated_size_bytes") + + source_connection_id = d.pop("source_connection_id") + + estimate_export_response = cls( + estimated_size_bytes=estimated_size_bytes, + source_connection_id=source_connection_id, + ) + + estimate_export_response.additional_properties = d + return estimate_export_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/evaluation_criteria_response.py b/seclai/_generated/models/evaluation_criteria_response.py new file mode 100644 index 0000000..ca56eee --- /dev/null +++ b/seclai/_generated/models/evaluation_criteria_response.py @@ -0,0 +1,253 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.evaluation_criteria_response_expectation_config_type_0 import ( + EvaluationCriteriaResponseExpectationConfigType0, + ) + from ..models.evaluation_criteria_response_result_summary import ( + EvaluationCriteriaResponseResultSummary, + ) + + +T = TypeVar("T", bound="EvaluationCriteriaResponse") + + +@_attrs_define +class EvaluationCriteriaResponse: + """Response schema for evaluation criteria. + + Attributes: + account_id (UUID): + agent_id (UUID): + created_at (str): + description (None | str): + enabled (bool): + evaluation_mode (str): Runtime behavior mode. output_expectation (manual validation), eval_and_retry (every run + + retry), sample_and_flag (sampled monitoring). + evaluation_prompt (None | str): + evaluation_tier (None | str): + expectation_config (EvaluationCriteriaResponseExpectationConfigType0 | None): + id (UUID): + max_retries (int): + pass_threshold (float): Score cutoff for pass/fail, inclusive (0.0 to 1.0). + result_summary (EvaluationCriteriaResponseResultSummary): + retry_on_failure (bool): + step_id (None | str): + updated_at (str): + """ + + account_id: UUID + agent_id: UUID + created_at: str + description: None | str + enabled: bool + evaluation_mode: str + evaluation_prompt: None | str + evaluation_tier: None | str + expectation_config: EvaluationCriteriaResponseExpectationConfigType0 | None + id: UUID + max_retries: int + pass_threshold: float + result_summary: EvaluationCriteriaResponseResultSummary + retry_on_failure: bool + step_id: None | str + updated_at: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.evaluation_criteria_response_expectation_config_type_0 import ( + EvaluationCriteriaResponseExpectationConfigType0, + ) + + account_id = str(self.account_id) + + agent_id = str(self.agent_id) + + created_at = self.created_at + + description: None | str + description = self.description + + enabled = self.enabled + + evaluation_mode = self.evaluation_mode + + evaluation_prompt: None | str + evaluation_prompt = self.evaluation_prompt + + evaluation_tier: None | str + evaluation_tier = self.evaluation_tier + + expectation_config: dict[str, Any] | None + if isinstance( + self.expectation_config, EvaluationCriteriaResponseExpectationConfigType0 + ): + expectation_config = self.expectation_config.to_dict() + else: + expectation_config = self.expectation_config + + id = str(self.id) + + max_retries = self.max_retries + + pass_threshold = self.pass_threshold + + result_summary = self.result_summary.to_dict() + + retry_on_failure = self.retry_on_failure + + step_id: None | str + step_id = self.step_id + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "account_id": account_id, + "agent_id": agent_id, + "created_at": created_at, + "description": description, + "enabled": enabled, + "evaluation_mode": evaluation_mode, + "evaluation_prompt": evaluation_prompt, + "evaluation_tier": evaluation_tier, + "expectation_config": expectation_config, + "id": id, + "max_retries": max_retries, + "pass_threshold": pass_threshold, + "result_summary": result_summary, + "retry_on_failure": retry_on_failure, + "step_id": step_id, + "updated_at": updated_at, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.evaluation_criteria_response_expectation_config_type_0 import ( + EvaluationCriteriaResponseExpectationConfigType0, + ) + from ..models.evaluation_criteria_response_result_summary import ( + EvaluationCriteriaResponseResultSummary, + ) + + d = dict(src_dict) + account_id = UUID(d.pop("account_id")) + + agent_id = UUID(d.pop("agent_id")) + + created_at = d.pop("created_at") + + def _parse_description(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + description = _parse_description(d.pop("description")) + + enabled = d.pop("enabled") + + evaluation_mode = d.pop("evaluation_mode") + + def _parse_evaluation_prompt(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + evaluation_prompt = _parse_evaluation_prompt(d.pop("evaluation_prompt")) + + def _parse_evaluation_tier(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + evaluation_tier = _parse_evaluation_tier(d.pop("evaluation_tier")) + + def _parse_expectation_config( + data: object, + ) -> EvaluationCriteriaResponseExpectationConfigType0 | None: + if data is None: + return data + try: + if not isinstance(data, dict): + raise TypeError() + expectation_config_type_0 = ( + EvaluationCriteriaResponseExpectationConfigType0.from_dict(data) + ) + + return expectation_config_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(EvaluationCriteriaResponseExpectationConfigType0 | None, data) + + expectation_config = _parse_expectation_config(d.pop("expectation_config")) + + id = UUID(d.pop("id")) + + max_retries = d.pop("max_retries") + + pass_threshold = d.pop("pass_threshold") + + result_summary = EvaluationCriteriaResponseResultSummary.from_dict( + d.pop("result_summary") + ) + + retry_on_failure = d.pop("retry_on_failure") + + def _parse_step_id(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + step_id = _parse_step_id(d.pop("step_id")) + + updated_at = d.pop("updated_at") + + evaluation_criteria_response = cls( + account_id=account_id, + agent_id=agent_id, + created_at=created_at, + description=description, + enabled=enabled, + evaluation_mode=evaluation_mode, + evaluation_prompt=evaluation_prompt, + evaluation_tier=evaluation_tier, + expectation_config=expectation_config, + id=id, + max_retries=max_retries, + pass_threshold=pass_threshold, + result_summary=result_summary, + retry_on_failure=retry_on_failure, + step_id=step_id, + updated_at=updated_at, + ) + + evaluation_criteria_response.additional_properties = d + return evaluation_criteria_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/evaluation_criteria_response_expectation_config_type_0.py b/seclai/_generated/models/evaluation_criteria_response_expectation_config_type_0.py new file mode 100644 index 0000000..7c16940 --- /dev/null +++ b/seclai/_generated/models/evaluation_criteria_response_expectation_config_type_0.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvaluationCriteriaResponseExpectationConfigType0") + + +@_attrs_define +class EvaluationCriteriaResponseExpectationConfigType0: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + evaluation_criteria_response_expectation_config_type_0 = cls() + + evaluation_criteria_response_expectation_config_type_0.additional_properties = d + return evaluation_criteria_response_expectation_config_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/evaluation_criteria_response_result_summary.py b/seclai/_generated/models/evaluation_criteria_response_result_summary.py new file mode 100644 index 0000000..1ad881c --- /dev/null +++ b/seclai/_generated/models/evaluation_criteria_response_result_summary.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvaluationCriteriaResponseResultSummary") + + +@_attrs_define +class EvaluationCriteriaResponseResultSummary: + """ """ + + additional_properties: dict[str, int] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + evaluation_criteria_response_result_summary = cls() + + evaluation_criteria_response_result_summary.additional_properties = d + return evaluation_criteria_response_result_summary + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> int: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: int) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/evaluation_result_list_response.py b/seclai/_generated/models/evaluation_result_list_response.py new file mode 100644 index 0000000..8dff281 --- /dev/null +++ b/seclai/_generated/models/evaluation_result_list_response.py @@ -0,0 +1,100 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.evaluation_result_response import EvaluationResultResponse + + +T = TypeVar("T", bound="EvaluationResultListResponse") + + +@_attrs_define +class EvaluationResultListResponse: + """Paginated list of evaluation results. + + Attributes: + data (list[EvaluationResultResponse]): + limit (int): + page (int): + total (int): + """ + + data: list[EvaluationResultResponse] + limit: int + page: int + total: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + limit = self.limit + + page = self.page + + total = self.total + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + "limit": limit, + "page": page, + "total": total, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.evaluation_result_response import EvaluationResultResponse + + d = dict(src_dict) + data = [] + _data = d.pop("data") + for data_item_data in _data: + data_item = EvaluationResultResponse.from_dict(data_item_data) + + data.append(data_item) + + limit = d.pop("limit") + + page = d.pop("page") + + total = d.pop("total") + + evaluation_result_list_response = cls( + data=data, + limit=limit, + page=page, + total=total, + ) + + evaluation_result_list_response.additional_properties = d + return evaluation_result_list_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/evaluation_result_response.py b/seclai/_generated/models/evaluation_result_response.py new file mode 100644 index 0000000..fc9e029 --- /dev/null +++ b/seclai/_generated/models/evaluation_result_response.py @@ -0,0 +1,221 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.evaluation_result_response_details_type_0 import ( + EvaluationResultResponseDetailsType0, + ) + + +T = TypeVar("T", bound="EvaluationResultResponse") + + +@_attrs_define +class EvaluationResultResponse: + """Response schema for a single evaluation result. + + Attributes: + agent_run_id (UUID): + agent_step_run_id (None | UUID): + created_at (str): + criteria_id (UUID): + evaluated_at (str): + flagged (bool): True when the result was flagged for human review. + id (UUID): + retry_count (int): + retry_triggered (bool): + status (str): Outcome status: pending, passed, failed, skipped, or error. + details (EvaluationResultResponseDetailsType0 | None | Unset): Evaluation details including explanation and raw + LLM response. + score (float | None | Unset): LLM-assigned quality score between 0.0 (worst) and 1.0 (best). + """ + + agent_run_id: UUID + agent_step_run_id: None | UUID + created_at: str + criteria_id: UUID + evaluated_at: str + flagged: bool + id: UUID + retry_count: int + retry_triggered: bool + status: str + details: EvaluationResultResponseDetailsType0 | None | Unset = UNSET + score: float | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.evaluation_result_response_details_type_0 import ( + EvaluationResultResponseDetailsType0, + ) + + agent_run_id = str(self.agent_run_id) + + agent_step_run_id: None | str + if isinstance(self.agent_step_run_id, UUID): + agent_step_run_id = str(self.agent_step_run_id) + else: + agent_step_run_id = self.agent_step_run_id + + created_at = self.created_at + + criteria_id = str(self.criteria_id) + + evaluated_at = self.evaluated_at + + flagged = self.flagged + + id = str(self.id) + + retry_count = self.retry_count + + retry_triggered = self.retry_triggered + + status = self.status + + details: dict[str, Any] | None | Unset + if isinstance(self.details, Unset): + details = UNSET + elif isinstance(self.details, EvaluationResultResponseDetailsType0): + details = self.details.to_dict() + else: + details = self.details + + score: float | None | Unset + if isinstance(self.score, Unset): + score = UNSET + else: + score = self.score + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "agent_run_id": agent_run_id, + "agent_step_run_id": agent_step_run_id, + "created_at": created_at, + "criteria_id": criteria_id, + "evaluated_at": evaluated_at, + "flagged": flagged, + "id": id, + "retry_count": retry_count, + "retry_triggered": retry_triggered, + "status": status, + } + ) + if details is not UNSET: + field_dict["details"] = details + if score is not UNSET: + field_dict["score"] = score + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.evaluation_result_response_details_type_0 import ( + EvaluationResultResponseDetailsType0, + ) + + d = dict(src_dict) + agent_run_id = UUID(d.pop("agent_run_id")) + + def _parse_agent_step_run_id(data: object) -> None | UUID: + if data is None: + return data + try: + if not isinstance(data, str): + raise TypeError() + agent_step_run_id_type_0 = UUID(data) + + return agent_step_run_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | UUID, data) + + agent_step_run_id = _parse_agent_step_run_id(d.pop("agent_step_run_id")) + + created_at = d.pop("created_at") + + criteria_id = UUID(d.pop("criteria_id")) + + evaluated_at = d.pop("evaluated_at") + + flagged = d.pop("flagged") + + id = UUID(d.pop("id")) + + retry_count = d.pop("retry_count") + + retry_triggered = d.pop("retry_triggered") + + status = d.pop("status") + + def _parse_details( + data: object, + ) -> EvaluationResultResponseDetailsType0 | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + details_type_0 = EvaluationResultResponseDetailsType0.from_dict(data) + + return details_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(EvaluationResultResponseDetailsType0 | None | Unset, data) + + details = _parse_details(d.pop("details", UNSET)) + + def _parse_score(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + score = _parse_score(d.pop("score", UNSET)) + + evaluation_result_response = cls( + agent_run_id=agent_run_id, + agent_step_run_id=agent_step_run_id, + created_at=created_at, + criteria_id=criteria_id, + evaluated_at=evaluated_at, + flagged=flagged, + id=id, + retry_count=retry_count, + retry_triggered=retry_triggered, + status=status, + details=details, + score=score, + ) + + evaluation_result_response.additional_properties = d + return evaluation_result_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/evaluation_result_response_details_type_0.py b/seclai/_generated/models/evaluation_result_response_details_type_0.py new file mode 100644 index 0000000..b44abc0 --- /dev/null +++ b/seclai/_generated/models/evaluation_result_response_details_type_0.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvaluationResultResponseDetailsType0") + + +@_attrs_define +class EvaluationResultResponseDetailsType0: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + evaluation_result_response_details_type_0 = cls() + + evaluation_result_response_details_type_0.additional_properties = d + return evaluation_result_response_details_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/evaluation_result_summary_response.py b/seclai/_generated/models/evaluation_result_summary_response.py new file mode 100644 index 0000000..da5ef4e --- /dev/null +++ b/seclai/_generated/models/evaluation_result_summary_response.py @@ -0,0 +1,116 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="EvaluationResultSummaryResponse") + + +@_attrs_define +class EvaluationResultSummaryResponse: + """Aggregated pass/fail/error counts and average score for a criteria. + + Attributes: + error (int): + failed (int): + flagged (int): + passed (int): + total (int): + average_score (float | None | Unset): Mean score across all evaluated results, or null if none. + """ + + error: int + failed: int + flagged: int + passed: int + total: int + average_score: float | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + error = self.error + + failed = self.failed + + flagged = self.flagged + + passed = self.passed + + total = self.total + + average_score: float | None | Unset + if isinstance(self.average_score, Unset): + average_score = UNSET + else: + average_score = self.average_score + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "error": error, + "failed": failed, + "flagged": flagged, + "passed": passed, + "total": total, + } + ) + if average_score is not UNSET: + field_dict["average_score"] = average_score + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + error = d.pop("error") + + failed = d.pop("failed") + + flagged = d.pop("flagged") + + passed = d.pop("passed") + + total = d.pop("total") + + def _parse_average_score(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + average_score = _parse_average_score(d.pop("average_score", UNSET)) + + evaluation_result_summary_response = cls( + error=error, + failed=failed, + flagged=flagged, + passed=passed, + total=total, + average_score=average_score, + ) + + evaluation_result_summary_response.additional_properties = d + return evaluation_result_summary_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/evaluation_result_with_criteria_list_response.py b/seclai/_generated/models/evaluation_result_with_criteria_list_response.py new file mode 100644 index 0000000..dd9c896 --- /dev/null +++ b/seclai/_generated/models/evaluation_result_with_criteria_list_response.py @@ -0,0 +1,104 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.evaluation_result_with_criteria_response import ( + EvaluationResultWithCriteriaResponse, + ) + + +T = TypeVar("T", bound="EvaluationResultWithCriteriaListResponse") + + +@_attrs_define +class EvaluationResultWithCriteriaListResponse: + """Paginated list of evaluation results with criteria context. + + Attributes: + data (list[EvaluationResultWithCriteriaResponse]): + limit (int): + page (int): + total (int): + """ + + data: list[EvaluationResultWithCriteriaResponse] + limit: int + page: int + total: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + limit = self.limit + + page = self.page + + total = self.total + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + "limit": limit, + "page": page, + "total": total, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.evaluation_result_with_criteria_response import ( + EvaluationResultWithCriteriaResponse, + ) + + d = dict(src_dict) + data = [] + _data = d.pop("data") + for data_item_data in _data: + data_item = EvaluationResultWithCriteriaResponse.from_dict(data_item_data) + + data.append(data_item) + + limit = d.pop("limit") + + page = d.pop("page") + + total = d.pop("total") + + evaluation_result_with_criteria_list_response = cls( + data=data, + limit=limit, + page=page, + total=total, + ) + + evaluation_result_with_criteria_list_response.additional_properties = d + return evaluation_result_with_criteria_list_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/evaluation_result_with_criteria_response.py b/seclai/_generated/models/evaluation_result_with_criteria_response.py new file mode 100644 index 0000000..0f3ce13 --- /dev/null +++ b/seclai/_generated/models/evaluation_result_with_criteria_response.py @@ -0,0 +1,255 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.evaluation_result_with_criteria_response_details_type_0 import ( + EvaluationResultWithCriteriaResponseDetailsType0, + ) + + +T = TypeVar("T", bound="EvaluationResultWithCriteriaResponse") + + +@_attrs_define +class EvaluationResultWithCriteriaResponse: + """Evaluation result including criteria context for aggregated listing. + + Attributes: + agent_run_id (UUID): + agent_step_run_id (None | UUID): + created_at (str): + criteria_description (None | str): + criteria_id (UUID): + evaluated_at (str): + flagged (bool): True when the result was flagged for human review. + id (UUID): + retry_count (int): + retry_triggered (bool): + status (str): Outcome status: pending, passed, failed, skipped, or error. + step_id (None | str): + details (EvaluationResultWithCriteriaResponseDetailsType0 | None | Unset): Evaluation details including + explanation and raw LLM response. + score (float | None | Unset): LLM-assigned quality score between 0.0 (worst) and 1.0 (best). + """ + + agent_run_id: UUID + agent_step_run_id: None | UUID + created_at: str + criteria_description: None | str + criteria_id: UUID + evaluated_at: str + flagged: bool + id: UUID + retry_count: int + retry_triggered: bool + status: str + step_id: None | str + details: EvaluationResultWithCriteriaResponseDetailsType0 | None | Unset = UNSET + score: float | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.evaluation_result_with_criteria_response_details_type_0 import ( + EvaluationResultWithCriteriaResponseDetailsType0, + ) + + agent_run_id = str(self.agent_run_id) + + agent_step_run_id: None | str + if isinstance(self.agent_step_run_id, UUID): + agent_step_run_id = str(self.agent_step_run_id) + else: + agent_step_run_id = self.agent_step_run_id + + created_at = self.created_at + + criteria_description: None | str + criteria_description = self.criteria_description + + criteria_id = str(self.criteria_id) + + evaluated_at = self.evaluated_at + + flagged = self.flagged + + id = str(self.id) + + retry_count = self.retry_count + + retry_triggered = self.retry_triggered + + status = self.status + + step_id: None | str + step_id = self.step_id + + details: dict[str, Any] | None | Unset + if isinstance(self.details, Unset): + details = UNSET + elif isinstance(self.details, EvaluationResultWithCriteriaResponseDetailsType0): + details = self.details.to_dict() + else: + details = self.details + + score: float | None | Unset + if isinstance(self.score, Unset): + score = UNSET + else: + score = self.score + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "agent_run_id": agent_run_id, + "agent_step_run_id": agent_step_run_id, + "created_at": created_at, + "criteria_description": criteria_description, + "criteria_id": criteria_id, + "evaluated_at": evaluated_at, + "flagged": flagged, + "id": id, + "retry_count": retry_count, + "retry_triggered": retry_triggered, + "status": status, + "step_id": step_id, + } + ) + if details is not UNSET: + field_dict["details"] = details + if score is not UNSET: + field_dict["score"] = score + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.evaluation_result_with_criteria_response_details_type_0 import ( + EvaluationResultWithCriteriaResponseDetailsType0, + ) + + d = dict(src_dict) + agent_run_id = UUID(d.pop("agent_run_id")) + + def _parse_agent_step_run_id(data: object) -> None | UUID: + if data is None: + return data + try: + if not isinstance(data, str): + raise TypeError() + agent_step_run_id_type_0 = UUID(data) + + return agent_step_run_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | UUID, data) + + agent_step_run_id = _parse_agent_step_run_id(d.pop("agent_step_run_id")) + + created_at = d.pop("created_at") + + def _parse_criteria_description(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + criteria_description = _parse_criteria_description( + d.pop("criteria_description") + ) + + criteria_id = UUID(d.pop("criteria_id")) + + evaluated_at = d.pop("evaluated_at") + + flagged = d.pop("flagged") + + id = UUID(d.pop("id")) + + retry_count = d.pop("retry_count") + + retry_triggered = d.pop("retry_triggered") + + status = d.pop("status") + + def _parse_step_id(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + step_id = _parse_step_id(d.pop("step_id")) + + def _parse_details( + data: object, + ) -> EvaluationResultWithCriteriaResponseDetailsType0 | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + details_type_0 = ( + EvaluationResultWithCriteriaResponseDetailsType0.from_dict(data) + ) + + return details_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast( + EvaluationResultWithCriteriaResponseDetailsType0 | None | Unset, data + ) + + details = _parse_details(d.pop("details", UNSET)) + + def _parse_score(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + score = _parse_score(d.pop("score", UNSET)) + + evaluation_result_with_criteria_response = cls( + agent_run_id=agent_run_id, + agent_step_run_id=agent_step_run_id, + created_at=created_at, + criteria_description=criteria_description, + criteria_id=criteria_id, + evaluated_at=evaluated_at, + flagged=flagged, + id=id, + retry_count=retry_count, + retry_triggered=retry_triggered, + status=status, + step_id=step_id, + details=details, + score=score, + ) + + evaluation_result_with_criteria_response.additional_properties = d + return evaluation_result_with_criteria_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/evaluation_result_with_criteria_response_details_type_0.py b/seclai/_generated/models/evaluation_result_with_criteria_response_details_type_0.py new file mode 100644 index 0000000..c5a5e1c --- /dev/null +++ b/seclai/_generated/models/evaluation_result_with_criteria_response_details_type_0.py @@ -0,0 +1,48 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvaluationResultWithCriteriaResponseDetailsType0") + + +@_attrs_define +class EvaluationResultWithCriteriaResponseDetailsType0: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + evaluation_result_with_criteria_response_details_type_0 = cls() + + evaluation_result_with_criteria_response_details_type_0.additional_properties = ( + d + ) + return evaluation_result_with_criteria_response_details_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/evaluation_run_summary_list_response.py b/seclai/_generated/models/evaluation_run_summary_list_response.py new file mode 100644 index 0000000..6eef1fe --- /dev/null +++ b/seclai/_generated/models/evaluation_run_summary_list_response.py @@ -0,0 +1,102 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.evaluation_run_summary_response import EvaluationRunSummaryResponse + + +T = TypeVar("T", bound="EvaluationRunSummaryListResponse") + + +@_attrs_define +class EvaluationRunSummaryListResponse: + """Paginated list of per-run evaluation summaries. + + Attributes: + data (list[EvaluationRunSummaryResponse]): + limit (int): + page (int): + total (int): + """ + + data: list[EvaluationRunSummaryResponse] + limit: int + page: int + total: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + limit = self.limit + + page = self.page + + total = self.total + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + "limit": limit, + "page": page, + "total": total, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.evaluation_run_summary_response import ( + EvaluationRunSummaryResponse, + ) + + d = dict(src_dict) + data = [] + _data = d.pop("data") + for data_item_data in _data: + data_item = EvaluationRunSummaryResponse.from_dict(data_item_data) + + data.append(data_item) + + limit = d.pop("limit") + + page = d.pop("page") + + total = d.pop("total") + + evaluation_run_summary_list_response = cls( + data=data, + limit=limit, + page=page, + total=total, + ) + + evaluation_run_summary_list_response.additional_properties = d + return evaluation_run_summary_list_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/evaluation_run_summary_response.py b/seclai/_generated/models/evaluation_run_summary_response.py new file mode 100644 index 0000000..f8f3163 --- /dev/null +++ b/seclai/_generated/models/evaluation_run_summary_response.py @@ -0,0 +1,127 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvaluationRunSummaryResponse") + + +@_attrs_define +class EvaluationRunSummaryResponse: + """Per-run evaluation summary with pass/fail/error breakdown. + + Attributes: + agent_run_id (UUID): + error_count (int): + failed_count (int): + flagged_count (int): + passed_count (int): + run_created_at (str): + run_status (str): Status of the agent run (processing, completed, failed). + skipped_count (int): + total_evaluations (int): + """ + + agent_run_id: UUID + error_count: int + failed_count: int + flagged_count: int + passed_count: int + run_created_at: str + run_status: str + skipped_count: int + total_evaluations: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + agent_run_id = str(self.agent_run_id) + + error_count = self.error_count + + failed_count = self.failed_count + + flagged_count = self.flagged_count + + passed_count = self.passed_count + + run_created_at = self.run_created_at + + run_status = self.run_status + + skipped_count = self.skipped_count + + total_evaluations = self.total_evaluations + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "agent_run_id": agent_run_id, + "error_count": error_count, + "failed_count": failed_count, + "flagged_count": flagged_count, + "passed_count": passed_count, + "run_created_at": run_created_at, + "run_status": run_status, + "skipped_count": skipped_count, + "total_evaluations": total_evaluations, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + agent_run_id = UUID(d.pop("agent_run_id")) + + error_count = d.pop("error_count") + + failed_count = d.pop("failed_count") + + flagged_count = d.pop("flagged_count") + + passed_count = d.pop("passed_count") + + run_created_at = d.pop("run_created_at") + + run_status = d.pop("run_status") + + skipped_count = d.pop("skipped_count") + + total_evaluations = d.pop("total_evaluations") + + evaluation_run_summary_response = cls( + agent_run_id=agent_run_id, + error_count=error_count, + failed_count=failed_count, + flagged_count=flagged_count, + passed_count=passed_count, + run_created_at=run_created_at, + run_status=run_status, + skipped_count=skipped_count, + total_evaluations=total_evaluations, + ) + + evaluation_run_summary_response.additional_properties = d + return evaluation_run_summary_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/evaluation_status.py b/seclai/_generated/models/evaluation_status.py new file mode 100644 index 0000000..39a9c8c --- /dev/null +++ b/seclai/_generated/models/evaluation_status.py @@ -0,0 +1,12 @@ +from enum import Enum + + +class EvaluationStatus(str, Enum): + ERROR = "error" + FAILED = "failed" + PASSED = "passed" + PENDING = "pending" + SKIPPED = "skipped" + + def __str__(self) -> str: + return str(self.value) diff --git a/seclai/_generated/models/example_prompt.py b/seclai/_generated/models/example_prompt.py new file mode 100644 index 0000000..2923aea --- /dev/null +++ b/seclai/_generated/models/example_prompt.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ExamplePrompt") + + +@_attrs_define +class ExamplePrompt: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + example_prompt = cls() + + example_prompt.additional_properties = d + return example_prompt + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/executed_action_response.py b/seclai/_generated/models/executed_action_response.py new file mode 100644 index 0000000..7c1ba69 --- /dev/null +++ b/seclai/_generated/models/executed_action_response.py @@ -0,0 +1,141 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ExecutedActionResponse") + + +@_attrs_define +class ExecutedActionResponse: + """A single executed action result. + + Attributes: + action_type (str): Type of the executed action. + description (str): Human-readable description. + error (None | str | Unset): Error message if failed. + resource_id (None | str | Unset): ID of the affected resource. + resource_type (None | str | Unset): Type of the affected resource. + success (bool | Unset): Whether the action succeeded. Default: True. + """ + + action_type: str + description: str + error: None | str | Unset = UNSET + resource_id: None | str | Unset = UNSET + resource_type: None | str | Unset = UNSET + success: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + action_type = self.action_type + + description = self.description + + error: None | str | Unset + if isinstance(self.error, Unset): + error = UNSET + else: + error = self.error + + resource_id: None | str | Unset + if isinstance(self.resource_id, Unset): + resource_id = UNSET + else: + resource_id = self.resource_id + + resource_type: None | str | Unset + if isinstance(self.resource_type, Unset): + resource_type = UNSET + else: + resource_type = self.resource_type + + success = self.success + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "action_type": action_type, + "description": description, + } + ) + if error is not UNSET: + field_dict["error"] = error + if resource_id is not UNSET: + field_dict["resource_id"] = resource_id + if resource_type is not UNSET: + field_dict["resource_type"] = resource_type + if success is not UNSET: + field_dict["success"] = success + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + action_type = d.pop("action_type") + + description = d.pop("description") + + def _parse_error(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + error = _parse_error(d.pop("error", UNSET)) + + def _parse_resource_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + resource_id = _parse_resource_id(d.pop("resource_id", UNSET)) + + def _parse_resource_type(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + resource_type = _parse_resource_type(d.pop("resource_type", UNSET)) + + success = d.pop("success", UNSET) + + executed_action_response = cls( + action_type=action_type, + description=description, + error=error, + resource_id=resource_id, + resource_type=resource_type, + success=success, + ) + + executed_action_response.additional_properties = d + return executed_action_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/export_format.py b/seclai/_generated/models/export_format.py new file mode 100644 index 0000000..b19f1bb --- /dev/null +++ b/seclai/_generated/models/export_format.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class ExportFormat(str, Enum): + CSV = "csv" + JSONL = "jsonl" + PARQUET = "parquet" + ZIP = "zip" + + def __str__(self) -> str: + return str(self.value) diff --git a/seclai/_generated/models/export_list_response.py b/seclai/_generated/models/export_list_response.py new file mode 100644 index 0000000..d9f0788 --- /dev/null +++ b/seclai/_generated/models/export_list_response.py @@ -0,0 +1,76 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.pagination_response import PaginationResponse + + +T = TypeVar("T", bound="ExportListResponse") + + +@_attrs_define +class ExportListResponse: + """Paginated list of export jobs. + + Attributes: + data (list[Any]): + pagination (PaginationResponse): Pagination information. + """ + + data: list[Any] + pagination: PaginationResponse + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + data = self.data + + pagination = self.pagination.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + "pagination": pagination, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.pagination_response import PaginationResponse + + d = dict(src_dict) + data = cast(list[Any], d.pop("data")) + + pagination = PaginationResponse.from_dict(d.pop("pagination")) + + export_list_response = cls( + data=data, + pagination=pagination, + ) + + export_list_response.additional_properties = d + return export_list_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/export_response.py b/seclai/_generated/models/export_response.py new file mode 100644 index 0000000..fa0a4c1 --- /dev/null +++ b/seclai/_generated/models/export_response.py @@ -0,0 +1,474 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.export_response_metadata_filter_type_0 import ( + ExportResponseMetadataFilterType0, + ) + + +T = TypeVar("T", bound="ExportResponse") + + +@_attrs_define +class ExportResponse: + """Status and metadata for a content source export job. + + Attributes: + account_id (str): Owning account ID. + created_at (str): Creation time. + destination (str): Storage destination. + format_ (str): Output format. + id (str): Export job ID. + source_connection_id (str): Source connection ID. + status (str): Job status. + updated_at (str): Last update time. + completed_at (None | str | Unset): Completion time. + date_from (None | str | Unset): Date-from filter applied to this export. + date_to (None | str | Unset): Date-to filter applied to this export. + error (None | str | Unset): Error message if failed. + estimated_size_bytes (int | None | Unset): Pre-run size estimate. + expires_at (None | str | Unset): Download expiry time. + file_size_bytes (int | None | Unset): File size in bytes. + item_count (int | None | Unset): Items exported. + metadata_filter (ExportResponseMetadataFilterType0 | None | Unset): Metadata filter applied to this export. + progress_current (int | None | Unset): Items processed so far. + progress_total (int | None | Unset): Total items to process. + query_filter (None | str | Unset): Query filter applied to this export. + requested_by_user_id (None | str | Unset): ID of the user who requested this export. + requested_by_user_name (None | str | Unset): Name of the user who requested this export. + started_at (None | str | Unset): Processing start time. + storage_key (None | str | Unset): S3 key of exported file. + """ + + account_id: str + created_at: str + destination: str + format_: str + id: str + source_connection_id: str + status: str + updated_at: str + completed_at: None | str | Unset = UNSET + date_from: None | str | Unset = UNSET + date_to: None | str | Unset = UNSET + error: None | str | Unset = UNSET + estimated_size_bytes: int | None | Unset = UNSET + expires_at: None | str | Unset = UNSET + file_size_bytes: int | None | Unset = UNSET + item_count: int | None | Unset = UNSET + metadata_filter: ExportResponseMetadataFilterType0 | None | Unset = UNSET + progress_current: int | None | Unset = UNSET + progress_total: int | None | Unset = UNSET + query_filter: None | str | Unset = UNSET + requested_by_user_id: None | str | Unset = UNSET + requested_by_user_name: None | str | Unset = UNSET + started_at: None | str | Unset = UNSET + storage_key: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.export_response_metadata_filter_type_0 import ( + ExportResponseMetadataFilterType0, + ) + + account_id = self.account_id + + created_at = self.created_at + + destination = self.destination + + format_ = self.format_ + + id = self.id + + source_connection_id = self.source_connection_id + + status = self.status + + updated_at = self.updated_at + + completed_at: None | str | Unset + if isinstance(self.completed_at, Unset): + completed_at = UNSET + else: + completed_at = self.completed_at + + date_from: None | str | Unset + if isinstance(self.date_from, Unset): + date_from = UNSET + else: + date_from = self.date_from + + date_to: None | str | Unset + if isinstance(self.date_to, Unset): + date_to = UNSET + else: + date_to = self.date_to + + error: None | str | Unset + if isinstance(self.error, Unset): + error = UNSET + else: + error = self.error + + estimated_size_bytes: int | None | Unset + if isinstance(self.estimated_size_bytes, Unset): + estimated_size_bytes = UNSET + else: + estimated_size_bytes = self.estimated_size_bytes + + expires_at: None | str | Unset + if isinstance(self.expires_at, Unset): + expires_at = UNSET + else: + expires_at = self.expires_at + + file_size_bytes: int | None | Unset + if isinstance(self.file_size_bytes, Unset): + file_size_bytes = UNSET + else: + file_size_bytes = self.file_size_bytes + + item_count: int | None | Unset + if isinstance(self.item_count, Unset): + item_count = UNSET + else: + item_count = self.item_count + + metadata_filter: dict[str, Any] | None | Unset + if isinstance(self.metadata_filter, Unset): + metadata_filter = UNSET + elif isinstance(self.metadata_filter, ExportResponseMetadataFilterType0): + metadata_filter = self.metadata_filter.to_dict() + else: + metadata_filter = self.metadata_filter + + progress_current: int | None | Unset + if isinstance(self.progress_current, Unset): + progress_current = UNSET + else: + progress_current = self.progress_current + + progress_total: int | None | Unset + if isinstance(self.progress_total, Unset): + progress_total = UNSET + else: + progress_total = self.progress_total + + query_filter: None | str | Unset + if isinstance(self.query_filter, Unset): + query_filter = UNSET + else: + query_filter = self.query_filter + + requested_by_user_id: None | str | Unset + if isinstance(self.requested_by_user_id, Unset): + requested_by_user_id = UNSET + else: + requested_by_user_id = self.requested_by_user_id + + requested_by_user_name: None | str | Unset + if isinstance(self.requested_by_user_name, Unset): + requested_by_user_name = UNSET + else: + requested_by_user_name = self.requested_by_user_name + + started_at: None | str | Unset + if isinstance(self.started_at, Unset): + started_at = UNSET + else: + started_at = self.started_at + + storage_key: None | str | Unset + if isinstance(self.storage_key, Unset): + storage_key = UNSET + else: + storage_key = self.storage_key + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "account_id": account_id, + "created_at": created_at, + "destination": destination, + "format": format_, + "id": id, + "source_connection_id": source_connection_id, + "status": status, + "updated_at": updated_at, + } + ) + if completed_at is not UNSET: + field_dict["completed_at"] = completed_at + if date_from is not UNSET: + field_dict["date_from"] = date_from + if date_to is not UNSET: + field_dict["date_to"] = date_to + if error is not UNSET: + field_dict["error"] = error + if estimated_size_bytes is not UNSET: + field_dict["estimated_size_bytes"] = estimated_size_bytes + if expires_at is not UNSET: + field_dict["expires_at"] = expires_at + if file_size_bytes is not UNSET: + field_dict["file_size_bytes"] = file_size_bytes + if item_count is not UNSET: + field_dict["item_count"] = item_count + if metadata_filter is not UNSET: + field_dict["metadata_filter"] = metadata_filter + if progress_current is not UNSET: + field_dict["progress_current"] = progress_current + if progress_total is not UNSET: + field_dict["progress_total"] = progress_total + if query_filter is not UNSET: + field_dict["query_filter"] = query_filter + if requested_by_user_id is not UNSET: + field_dict["requested_by_user_id"] = requested_by_user_id + if requested_by_user_name is not UNSET: + field_dict["requested_by_user_name"] = requested_by_user_name + if started_at is not UNSET: + field_dict["started_at"] = started_at + if storage_key is not UNSET: + field_dict["storage_key"] = storage_key + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.export_response_metadata_filter_type_0 import ( + ExportResponseMetadataFilterType0, + ) + + d = dict(src_dict) + account_id = d.pop("account_id") + + created_at = d.pop("created_at") + + destination = d.pop("destination") + + format_ = d.pop("format") + + id = d.pop("id") + + source_connection_id = d.pop("source_connection_id") + + status = d.pop("status") + + updated_at = d.pop("updated_at") + + def _parse_completed_at(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + completed_at = _parse_completed_at(d.pop("completed_at", UNSET)) + + def _parse_date_from(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + date_from = _parse_date_from(d.pop("date_from", UNSET)) + + def _parse_date_to(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + date_to = _parse_date_to(d.pop("date_to", UNSET)) + + def _parse_error(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + error = _parse_error(d.pop("error", UNSET)) + + def _parse_estimated_size_bytes(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + estimated_size_bytes = _parse_estimated_size_bytes( + d.pop("estimated_size_bytes", UNSET) + ) + + def _parse_expires_at(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + expires_at = _parse_expires_at(d.pop("expires_at", UNSET)) + + def _parse_file_size_bytes(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + file_size_bytes = _parse_file_size_bytes(d.pop("file_size_bytes", UNSET)) + + def _parse_item_count(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + item_count = _parse_item_count(d.pop("item_count", UNSET)) + + def _parse_metadata_filter( + data: object, + ) -> ExportResponseMetadataFilterType0 | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + metadata_filter_type_0 = ExportResponseMetadataFilterType0.from_dict( + data + ) + + return metadata_filter_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(ExportResponseMetadataFilterType0 | None | Unset, data) + + metadata_filter = _parse_metadata_filter(d.pop("metadata_filter", UNSET)) + + def _parse_progress_current(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + progress_current = _parse_progress_current(d.pop("progress_current", UNSET)) + + def _parse_progress_total(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + progress_total = _parse_progress_total(d.pop("progress_total", UNSET)) + + def _parse_query_filter(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + query_filter = _parse_query_filter(d.pop("query_filter", UNSET)) + + def _parse_requested_by_user_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + requested_by_user_id = _parse_requested_by_user_id( + d.pop("requested_by_user_id", UNSET) + ) + + def _parse_requested_by_user_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + requested_by_user_name = _parse_requested_by_user_name( + d.pop("requested_by_user_name", UNSET) + ) + + def _parse_started_at(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + started_at = _parse_started_at(d.pop("started_at", UNSET)) + + def _parse_storage_key(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + storage_key = _parse_storage_key(d.pop("storage_key", UNSET)) + + export_response = cls( + account_id=account_id, + created_at=created_at, + destination=destination, + format_=format_, + id=id, + source_connection_id=source_connection_id, + status=status, + updated_at=updated_at, + completed_at=completed_at, + date_from=date_from, + date_to=date_to, + error=error, + estimated_size_bytes=estimated_size_bytes, + expires_at=expires_at, + file_size_bytes=file_size_bytes, + item_count=item_count, + metadata_filter=metadata_filter, + progress_current=progress_current, + progress_total=progress_total, + query_filter=query_filter, + requested_by_user_id=requested_by_user_id, + requested_by_user_name=requested_by_user_name, + started_at=started_at, + storage_key=storage_key, + ) + + export_response.additional_properties = d + return export_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/export_response_metadata_filter_type_0.py b/seclai/_generated/models/export_response_metadata_filter_type_0.py new file mode 100644 index 0000000..a12d8a7 --- /dev/null +++ b/seclai/_generated/models/export_response_metadata_filter_type_0.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ExportResponseMetadataFilterType0") + + +@_attrs_define +class ExportResponseMetadataFilterType0: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + export_response_metadata_filter_type_0 = cls() + + export_response_metadata_filter_type_0.additional_properties = d + return export_response_metadata_filter_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/generate_agent_steps_request.py b/seclai/_generated/models/generate_agent_steps_request.py new file mode 100644 index 0000000..7302739 --- /dev/null +++ b/seclai/_generated/models/generate_agent_steps_request.py @@ -0,0 +1,173 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.generate_agent_steps_request_agent_steps_type_0_item import ( + GenerateAgentStepsRequestAgentStepsType0Item, + ) + + +T = TypeVar("T", bound="GenerateAgentStepsRequest") + + +@_attrs_define +class GenerateAgentStepsRequest: + """ + Attributes: + user_input (str): Natural language description of the desired agent workflow. + agent_description (None | str | Unset): Agent description for additional AI context. + agent_steps (list[GenerateAgentStepsRequestAgentStepsType0Item] | None | Unset): Current agent step hierarchy + for context when modifying. + mode (str | Unset): 'generate_full' to create from scratch, 'modify_workflow' to refine. Default: + 'generate_full'. + trigger_type (None | str | Unset): Agent trigger type for context (e.g. 'dynamic_input', 'content_added'). + """ + + user_input: str + agent_description: None | str | Unset = UNSET + agent_steps: list[GenerateAgentStepsRequestAgentStepsType0Item] | None | Unset = ( + UNSET + ) + mode: str | Unset = "generate_full" + trigger_type: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + user_input = self.user_input + + agent_description: None | str | Unset + if isinstance(self.agent_description, Unset): + agent_description = UNSET + else: + agent_description = self.agent_description + + agent_steps: list[dict[str, Any]] | None | Unset + if isinstance(self.agent_steps, Unset): + agent_steps = UNSET + elif isinstance(self.agent_steps, list): + agent_steps = [] + for agent_steps_type_0_item_data in self.agent_steps: + agent_steps_type_0_item = agent_steps_type_0_item_data.to_dict() + agent_steps.append(agent_steps_type_0_item) + + else: + agent_steps = self.agent_steps + + mode = self.mode + + trigger_type: None | str | Unset + if isinstance(self.trigger_type, Unset): + trigger_type = UNSET + else: + trigger_type = self.trigger_type + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "user_input": user_input, + } + ) + if agent_description is not UNSET: + field_dict["agent_description"] = agent_description + if agent_steps is not UNSET: + field_dict["agent_steps"] = agent_steps + if mode is not UNSET: + field_dict["mode"] = mode + if trigger_type is not UNSET: + field_dict["trigger_type"] = trigger_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.generate_agent_steps_request_agent_steps_type_0_item import ( + GenerateAgentStepsRequestAgentStepsType0Item, + ) + + d = dict(src_dict) + user_input = d.pop("user_input") + + def _parse_agent_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + agent_description = _parse_agent_description(d.pop("agent_description", UNSET)) + + def _parse_agent_steps( + data: object, + ) -> list[GenerateAgentStepsRequestAgentStepsType0Item] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + agent_steps_type_0 = [] + _agent_steps_type_0 = data + for agent_steps_type_0_item_data in _agent_steps_type_0: + agent_steps_type_0_item = ( + GenerateAgentStepsRequestAgentStepsType0Item.from_dict( + agent_steps_type_0_item_data + ) + ) + + agent_steps_type_0.append(agent_steps_type_0_item) + + return agent_steps_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast( + list[GenerateAgentStepsRequestAgentStepsType0Item] | None | Unset, data + ) + + agent_steps = _parse_agent_steps(d.pop("agent_steps", UNSET)) + + mode = d.pop("mode", UNSET) + + def _parse_trigger_type(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + trigger_type = _parse_trigger_type(d.pop("trigger_type", UNSET)) + + generate_agent_steps_request = cls( + user_input=user_input, + agent_description=agent_description, + agent_steps=agent_steps, + mode=mode, + trigger_type=trigger_type, + ) + + generate_agent_steps_request.additional_properties = d + return generate_agent_steps_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/generate_agent_steps_request_agent_steps_type_0_item.py b/seclai/_generated/models/generate_agent_steps_request_agent_steps_type_0_item.py new file mode 100644 index 0000000..d33fe96 --- /dev/null +++ b/seclai/_generated/models/generate_agent_steps_request_agent_steps_type_0_item.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="GenerateAgentStepsRequestAgentStepsType0Item") + + +@_attrs_define +class GenerateAgentStepsRequestAgentStepsType0Item: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + generate_agent_steps_request_agent_steps_type_0_item = cls() + + generate_agent_steps_request_agent_steps_type_0_item.additional_properties = d + return generate_agent_steps_request_agent_steps_type_0_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/generate_agent_steps_response.py b/seclai/_generated/models/generate_agent_steps_response.py new file mode 100644 index 0000000..393aa54 --- /dev/null +++ b/seclai/_generated/models/generate_agent_steps_response.py @@ -0,0 +1,176 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.example_prompt import ExamplePrompt + from ..models.generate_agent_steps_response_agent_config_type_0 import ( + GenerateAgentStepsResponseAgentConfigType0, + ) + from ..models.generate_agent_steps_response_steps_item import ( + GenerateAgentStepsResponseStepsItem, + ) + + +T = TypeVar("T", bound="GenerateAgentStepsResponse") + + +@_attrs_define +class GenerateAgentStepsResponse: + """ + Attributes: + conversation_id (str): Conversation turn ID for tracking. + note (str): AI explanation of the proposed workflow. + steps (list[GenerateAgentStepsResponseStepsItem]): Generated agent steps. + success (bool): Whether steps were successfully generated. + agent_config (GenerateAgentStepsResponseAgentConfigType0 | None | Unset): Suggested agent-level configuration, + if any. + example_prompts (list[ExamplePrompt] | Unset): Example natural-language prompts that demonstrate the + capabilities of this AI assistant for the given mode. + """ + + conversation_id: str + note: str + steps: list[GenerateAgentStepsResponseStepsItem] + success: bool + agent_config: GenerateAgentStepsResponseAgentConfigType0 | None | Unset = UNSET + example_prompts: list[ExamplePrompt] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.generate_agent_steps_response_agent_config_type_0 import ( + GenerateAgentStepsResponseAgentConfigType0, + ) + + conversation_id = self.conversation_id + + note = self.note + + steps = [] + for steps_item_data in self.steps: + steps_item = steps_item_data.to_dict() + steps.append(steps_item) + + success = self.success + + agent_config: dict[str, Any] | None | Unset + if isinstance(self.agent_config, Unset): + agent_config = UNSET + elif isinstance(self.agent_config, GenerateAgentStepsResponseAgentConfigType0): + agent_config = self.agent_config.to_dict() + else: + agent_config = self.agent_config + + example_prompts: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.example_prompts, Unset): + example_prompts = [] + for example_prompts_item_data in self.example_prompts: + example_prompts_item = example_prompts_item_data.to_dict() + example_prompts.append(example_prompts_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "conversation_id": conversation_id, + "note": note, + "steps": steps, + "success": success, + } + ) + if agent_config is not UNSET: + field_dict["agent_config"] = agent_config + if example_prompts is not UNSET: + field_dict["example_prompts"] = example_prompts + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.example_prompt import ExamplePrompt + from ..models.generate_agent_steps_response_agent_config_type_0 import ( + GenerateAgentStepsResponseAgentConfigType0, + ) + from ..models.generate_agent_steps_response_steps_item import ( + GenerateAgentStepsResponseStepsItem, + ) + + d = dict(src_dict) + conversation_id = d.pop("conversation_id") + + note = d.pop("note") + + steps = [] + _steps = d.pop("steps") + for steps_item_data in _steps: + steps_item = GenerateAgentStepsResponseStepsItem.from_dict(steps_item_data) + + steps.append(steps_item) + + success = d.pop("success") + + def _parse_agent_config( + data: object, + ) -> GenerateAgentStepsResponseAgentConfigType0 | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + agent_config_type_0 = ( + GenerateAgentStepsResponseAgentConfigType0.from_dict(data) + ) + + return agent_config_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(GenerateAgentStepsResponseAgentConfigType0 | None | Unset, data) + + agent_config = _parse_agent_config(d.pop("agent_config", UNSET)) + + _example_prompts = d.pop("example_prompts", UNSET) + example_prompts: list[ExamplePrompt] | Unset = UNSET + if _example_prompts is not UNSET: + example_prompts = [] + for example_prompts_item_data in _example_prompts: + example_prompts_item = ExamplePrompt.from_dict( + example_prompts_item_data + ) + + example_prompts.append(example_prompts_item) + + generate_agent_steps_response = cls( + conversation_id=conversation_id, + note=note, + steps=steps, + success=success, + agent_config=agent_config, + example_prompts=example_prompts, + ) + + generate_agent_steps_response.additional_properties = d + return generate_agent_steps_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/generate_agent_steps_response_agent_config_type_0.py b/seclai/_generated/models/generate_agent_steps_response_agent_config_type_0.py new file mode 100644 index 0000000..bfea7a5 --- /dev/null +++ b/seclai/_generated/models/generate_agent_steps_response_agent_config_type_0.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="GenerateAgentStepsResponseAgentConfigType0") + + +@_attrs_define +class GenerateAgentStepsResponseAgentConfigType0: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + generate_agent_steps_response_agent_config_type_0 = cls() + + generate_agent_steps_response_agent_config_type_0.additional_properties = d + return generate_agent_steps_response_agent_config_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/generate_agent_steps_response_steps_item.py b/seclai/_generated/models/generate_agent_steps_response_steps_item.py new file mode 100644 index 0000000..cfcb2ae --- /dev/null +++ b/seclai/_generated/models/generate_agent_steps_response_steps_item.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="GenerateAgentStepsResponseStepsItem") + + +@_attrs_define +class GenerateAgentStepsResponseStepsItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + generate_agent_steps_response_steps_item = cls() + + generate_agent_steps_response_steps_item.additional_properties = d + return generate_agent_steps_response_steps_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/generate_step_config_request.py b/seclai/_generated/models/generate_step_config_request.py new file mode 100644 index 0000000..6807cfe --- /dev/null +++ b/seclai/_generated/models/generate_step_config_request.py @@ -0,0 +1,201 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.generate_step_config_request_agent_steps_type_0_item import ( + GenerateStepConfigRequestAgentStepsType0Item, + ) + from ..models.generate_step_config_request_current_config_type_0 import ( + GenerateStepConfigRequestCurrentConfigType0, + ) + + +T = TypeVar("T", bound="GenerateStepConfigRequest") + + +@_attrs_define +class GenerateStepConfigRequest: + """ + Attributes: + step_type (str): The step type to generate config for (e.g. 'transform', 'gate', 'text', 'prompt_call', + 'retrieval'). + user_input (str): Natural language description of what the step should do. + agent_steps (list[GenerateStepConfigRequestAgentStepsType0Item] | None | Unset): Current agent step hierarchy + for context. + current_config (GenerateStepConfigRequestCurrentConfigType0 | None | Unset): Current step configuration to + refine, if any. + step_id (None | str | Unset): ID of the specific step to refine. Omit for new steps. + """ + + step_type: str + user_input: str + agent_steps: list[GenerateStepConfigRequestAgentStepsType0Item] | None | Unset = ( + UNSET + ) + current_config: GenerateStepConfigRequestCurrentConfigType0 | None | Unset = UNSET + step_id: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.generate_step_config_request_current_config_type_0 import ( + GenerateStepConfigRequestCurrentConfigType0, + ) + + step_type = self.step_type + + user_input = self.user_input + + agent_steps: list[dict[str, Any]] | None | Unset + if isinstance(self.agent_steps, Unset): + agent_steps = UNSET + elif isinstance(self.agent_steps, list): + agent_steps = [] + for agent_steps_type_0_item_data in self.agent_steps: + agent_steps_type_0_item = agent_steps_type_0_item_data.to_dict() + agent_steps.append(agent_steps_type_0_item) + + else: + agent_steps = self.agent_steps + + current_config: dict[str, Any] | None | Unset + if isinstance(self.current_config, Unset): + current_config = UNSET + elif isinstance( + self.current_config, GenerateStepConfigRequestCurrentConfigType0 + ): + current_config = self.current_config.to_dict() + else: + current_config = self.current_config + + step_id: None | str | Unset + if isinstance(self.step_id, Unset): + step_id = UNSET + else: + step_id = self.step_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "step_type": step_type, + "user_input": user_input, + } + ) + if agent_steps is not UNSET: + field_dict["agent_steps"] = agent_steps + if current_config is not UNSET: + field_dict["current_config"] = current_config + if step_id is not UNSET: + field_dict["step_id"] = step_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.generate_step_config_request_agent_steps_type_0_item import ( + GenerateStepConfigRequestAgentStepsType0Item, + ) + from ..models.generate_step_config_request_current_config_type_0 import ( + GenerateStepConfigRequestCurrentConfigType0, + ) + + d = dict(src_dict) + step_type = d.pop("step_type") + + user_input = d.pop("user_input") + + def _parse_agent_steps( + data: object, + ) -> list[GenerateStepConfigRequestAgentStepsType0Item] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + agent_steps_type_0 = [] + _agent_steps_type_0 = data + for agent_steps_type_0_item_data in _agent_steps_type_0: + agent_steps_type_0_item = ( + GenerateStepConfigRequestAgentStepsType0Item.from_dict( + agent_steps_type_0_item_data + ) + ) + + agent_steps_type_0.append(agent_steps_type_0_item) + + return agent_steps_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast( + list[GenerateStepConfigRequestAgentStepsType0Item] | None | Unset, data + ) + + agent_steps = _parse_agent_steps(d.pop("agent_steps", UNSET)) + + def _parse_current_config( + data: object, + ) -> GenerateStepConfigRequestCurrentConfigType0 | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + current_config_type_0 = ( + GenerateStepConfigRequestCurrentConfigType0.from_dict(data) + ) + + return current_config_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast( + GenerateStepConfigRequestCurrentConfigType0 | None | Unset, data + ) + + current_config = _parse_current_config(d.pop("current_config", UNSET)) + + def _parse_step_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + step_id = _parse_step_id(d.pop("step_id", UNSET)) + + generate_step_config_request = cls( + step_type=step_type, + user_input=user_input, + agent_steps=agent_steps, + current_config=current_config, + step_id=step_id, + ) + + generate_step_config_request.additional_properties = d + return generate_step_config_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/generate_step_config_request_agent_steps_type_0_item.py b/seclai/_generated/models/generate_step_config_request_agent_steps_type_0_item.py new file mode 100644 index 0000000..e0878d6 --- /dev/null +++ b/seclai/_generated/models/generate_step_config_request_agent_steps_type_0_item.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="GenerateStepConfigRequestAgentStepsType0Item") + + +@_attrs_define +class GenerateStepConfigRequestAgentStepsType0Item: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + generate_step_config_request_agent_steps_type_0_item = cls() + + generate_step_config_request_agent_steps_type_0_item.additional_properties = d + return generate_step_config_request_agent_steps_type_0_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/generate_step_config_request_current_config_type_0.py b/seclai/_generated/models/generate_step_config_request_current_config_type_0.py new file mode 100644 index 0000000..f01a11e --- /dev/null +++ b/seclai/_generated/models/generate_step_config_request_current_config_type_0.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="GenerateStepConfigRequestCurrentConfigType0") + + +@_attrs_define +class GenerateStepConfigRequestCurrentConfigType0: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + generate_step_config_request_current_config_type_0 = cls() + + generate_step_config_request_current_config_type_0.additional_properties = d + return generate_step_config_request_current_config_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/generate_step_config_response.py b/seclai/_generated/models/generate_step_config_response.py new file mode 100644 index 0000000..8459ef5 --- /dev/null +++ b/seclai/_generated/models/generate_step_config_response.py @@ -0,0 +1,168 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.example_prompt import ExamplePrompt + from ..models.generate_step_config_response_resulting_config_type_0 import ( + GenerateStepConfigResponseResultingConfigType0, + ) + + +T = TypeVar("T", bound="GenerateStepConfigResponse") + + +@_attrs_define +class GenerateStepConfigResponse: + """ + Attributes: + conversation_id (str): Conversation turn ID for tracking. + note (str): AI explanation of the proposed configuration. + step_type (str): The step type that was generated. + success (bool): Whether a valid configuration was generated. + example_prompts (list[ExamplePrompt] | Unset): Example natural-language prompts that demonstrate the + capabilities of this AI assistant for the given step type. + resulting_config (GenerateStepConfigResponseResultingConfigType0 | None | Unset): The proposed step + configuration. + """ + + conversation_id: str + note: str + step_type: str + success: bool + example_prompts: list[ExamplePrompt] | Unset = UNSET + resulting_config: GenerateStepConfigResponseResultingConfigType0 | None | Unset = ( + UNSET + ) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.generate_step_config_response_resulting_config_type_0 import ( + GenerateStepConfigResponseResultingConfigType0, + ) + + conversation_id = self.conversation_id + + note = self.note + + step_type = self.step_type + + success = self.success + + example_prompts: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.example_prompts, Unset): + example_prompts = [] + for example_prompts_item_data in self.example_prompts: + example_prompts_item = example_prompts_item_data.to_dict() + example_prompts.append(example_prompts_item) + + resulting_config: dict[str, Any] | None | Unset + if isinstance(self.resulting_config, Unset): + resulting_config = UNSET + elif isinstance( + self.resulting_config, GenerateStepConfigResponseResultingConfigType0 + ): + resulting_config = self.resulting_config.to_dict() + else: + resulting_config = self.resulting_config + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "conversation_id": conversation_id, + "note": note, + "step_type": step_type, + "success": success, + } + ) + if example_prompts is not UNSET: + field_dict["example_prompts"] = example_prompts + if resulting_config is not UNSET: + field_dict["resulting_config"] = resulting_config + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.example_prompt import ExamplePrompt + from ..models.generate_step_config_response_resulting_config_type_0 import ( + GenerateStepConfigResponseResultingConfigType0, + ) + + d = dict(src_dict) + conversation_id = d.pop("conversation_id") + + note = d.pop("note") + + step_type = d.pop("step_type") + + success = d.pop("success") + + _example_prompts = d.pop("example_prompts", UNSET) + example_prompts: list[ExamplePrompt] | Unset = UNSET + if _example_prompts is not UNSET: + example_prompts = [] + for example_prompts_item_data in _example_prompts: + example_prompts_item = ExamplePrompt.from_dict( + example_prompts_item_data + ) + + example_prompts.append(example_prompts_item) + + def _parse_resulting_config( + data: object, + ) -> GenerateStepConfigResponseResultingConfigType0 | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + resulting_config_type_0 = ( + GenerateStepConfigResponseResultingConfigType0.from_dict(data) + ) + + return resulting_config_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast( + GenerateStepConfigResponseResultingConfigType0 | None | Unset, data + ) + + resulting_config = _parse_resulting_config(d.pop("resulting_config", UNSET)) + + generate_step_config_response = cls( + conversation_id=conversation_id, + note=note, + step_type=step_type, + success=success, + example_prompts=example_prompts, + resulting_config=resulting_config, + ) + + generate_step_config_response.additional_properties = d + return generate_step_config_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/generate_step_config_response_resulting_config_type_0.py b/seclai/_generated/models/generate_step_config_response_resulting_config_type_0.py new file mode 100644 index 0000000..20497e6 --- /dev/null +++ b/seclai/_generated/models/generate_step_config_response_resulting_config_type_0.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="GenerateStepConfigResponseResultingConfigType0") + + +@_attrs_define +class GenerateStepConfigResponseResultingConfigType0: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + generate_step_config_response_resulting_config_type_0 = cls() + + generate_step_config_response_resulting_config_type_0.additional_properties = d + return generate_step_config_response_resulting_config_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/get_agents_using_bank_api_memory_banks_memory_bank_id_agents_get_response_200_item.py b/seclai/_generated/models/get_agents_using_bank_api_memory_banks_memory_bank_id_agents_get_response_200_item.py new file mode 100644 index 0000000..380c824 --- /dev/null +++ b/seclai/_generated/models/get_agents_using_bank_api_memory_banks_memory_bank_id_agents_get_response_200_item.py @@ -0,0 +1,52 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar( + "T", bound="GetAgentsUsingBankApiMemoryBanksMemoryBankIdAgentsGetResponse200Item" +) + + +@_attrs_define +class GetAgentsUsingBankApiMemoryBanksMemoryBankIdAgentsGetResponse200Item: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + get_agents_using_bank_api_memory_banks_memory_bank_id_agents_get_response_200_item = ( + cls() + ) + + get_agents_using_bank_api_memory_banks_memory_bank_id_agents_get_response_200_item.additional_properties = ( + d + ) + return get_agents_using_bank_api_memory_banks_memory_bank_id_agents_get_response_200_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/get_alert_config_api_alerts_configs_config_id_get_response_get_alert_config_api_alerts_configs_config_id_get.py b/seclai/_generated/models/get_alert_config_api_alerts_configs_config_id_get_response_get_alert_config_api_alerts_configs_config_id_get.py new file mode 100644 index 0000000..8c0c481 --- /dev/null +++ b/seclai/_generated/models/get_alert_config_api_alerts_configs_config_id_get_response_get_alert_config_api_alerts_configs_config_id_get.py @@ -0,0 +1,53 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar( + "T", + bound="GetAlertConfigApiAlertsConfigsConfigIdGetResponseGetAlertConfigApiAlertsConfigsConfigIdGet", +) + + +@_attrs_define +class GetAlertConfigApiAlertsConfigsConfigIdGetResponseGetAlertConfigApiAlertsConfigsConfigIdGet: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + get_alert_config_api_alerts_configs_config_id_get_response_get_alert_config_api_alerts_configs_config_id_get = ( + cls() + ) + + get_alert_config_api_alerts_configs_config_id_get_response_get_alert_config_api_alerts_configs_config_id_get.additional_properties = ( + d + ) + return get_alert_config_api_alerts_configs_config_id_get_response_get_alert_config_api_alerts_configs_config_id_get + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/get_alert_detail_api_alerts_alert_id_get_response_get_alert_detail_api_alerts_alert_id_get.py b/seclai/_generated/models/get_alert_detail_api_alerts_alert_id_get_response_get_alert_detail_api_alerts_alert_id_get.py new file mode 100644 index 0000000..459db9a --- /dev/null +++ b/seclai/_generated/models/get_alert_detail_api_alerts_alert_id_get_response_get_alert_detail_api_alerts_alert_id_get.py @@ -0,0 +1,53 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar( + "T", + bound="GetAlertDetailApiAlertsAlertIdGetResponseGetAlertDetailApiAlertsAlertIdGet", +) + + +@_attrs_define +class GetAlertDetailApiAlertsAlertIdGetResponseGetAlertDetailApiAlertsAlertIdGet: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + get_alert_detail_api_alerts_alert_id_get_response_get_alert_detail_api_alerts_alert_id_get = ( + cls() + ) + + get_alert_detail_api_alerts_alert_id_get_response_get_alert_detail_api_alerts_alert_id_get.additional_properties = ( + d + ) + return get_alert_detail_api_alerts_alert_id_get_response_get_alert_detail_api_alerts_alert_id_get + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/get_alert_unread_count_api_models_alerts_unread_count_get_response_get_alert_unread_count_api_models_alerts_unread_count_get.py b/seclai/_generated/models/get_alert_unread_count_api_models_alerts_unread_count_get_response_get_alert_unread_count_api_models_alerts_unread_count_get.py new file mode 100644 index 0000000..856460c --- /dev/null +++ b/seclai/_generated/models/get_alert_unread_count_api_models_alerts_unread_count_get_response_get_alert_unread_count_api_models_alerts_unread_count_get.py @@ -0,0 +1,53 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar( + "T", + bound="GetAlertUnreadCountApiModelsAlertsUnreadCountGetResponseGetAlertUnreadCountApiModelsAlertsUnreadCountGet", +) + + +@_attrs_define +class GetAlertUnreadCountApiModelsAlertsUnreadCountGetResponseGetAlertUnreadCountApiModelsAlertsUnreadCountGet: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + get_alert_unread_count_api_models_alerts_unread_count_get_response_get_alert_unread_count_api_models_alerts_unread_count_get = ( + cls() + ) + + get_alert_unread_count_api_models_alerts_unread_count_get_response_get_alert_unread_count_api_models_alerts_unread_count_get.additional_properties = ( + d + ) + return get_alert_unread_count_api_models_alerts_unread_count_get_response_get_alert_unread_count_api_models_alerts_unread_count_get + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/get_memory_bank_entry_stats_api_memory_banks_memory_bank_id_stats_get_response_get_memory_bank_entry_stats_api_memory_banks_memory_bank_id_stats_get.py b/seclai/_generated/models/get_memory_bank_entry_stats_api_memory_banks_memory_bank_id_stats_get_response_get_memory_bank_entry_stats_api_memory_banks_memory_bank_id_stats_get.py new file mode 100644 index 0000000..ca17f73 --- /dev/null +++ b/seclai/_generated/models/get_memory_bank_entry_stats_api_memory_banks_memory_bank_id_stats_get_response_get_memory_bank_entry_stats_api_memory_banks_memory_bank_id_stats_get.py @@ -0,0 +1,53 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar( + "T", + bound="GetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGetResponseGetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGet", +) + + +@_attrs_define +class GetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGetResponseGetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGet: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + get_memory_bank_entry_stats_api_memory_banks_memory_bank_id_stats_get_response_get_memory_bank_entry_stats_api_memory_banks_memory_bank_id_stats_get = ( + cls() + ) + + get_memory_bank_entry_stats_api_memory_banks_memory_bank_id_stats_get_response_get_memory_bank_entry_stats_api_memory_banks_memory_bank_id_stats_get.additional_properties = ( + d + ) + return get_memory_bank_entry_stats_api_memory_banks_memory_bank_id_stats_get_response_get_memory_bank_entry_stats_api_memory_banks_memory_bank_id_stats_get + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/get_recommendations_api_models_model_id_recommendations_get_response_get_recommendations_api_models_model_id_recommendations_get.py b/seclai/_generated/models/get_recommendations_api_models_model_id_recommendations_get_response_get_recommendations_api_models_model_id_recommendations_get.py new file mode 100644 index 0000000..ed5a92b --- /dev/null +++ b/seclai/_generated/models/get_recommendations_api_models_model_id_recommendations_get_response_get_recommendations_api_models_model_id_recommendations_get.py @@ -0,0 +1,53 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar( + "T", + bound="GetRecommendationsApiModelsModelIdRecommendationsGetResponseGetRecommendationsApiModelsModelIdRecommendationsGet", +) + + +@_attrs_define +class GetRecommendationsApiModelsModelIdRecommendationsGetResponseGetRecommendationsApiModelsModelIdRecommendationsGet: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + get_recommendations_api_models_model_id_recommendations_get_response_get_recommendations_api_models_model_id_recommendations_get = ( + cls() + ) + + get_recommendations_api_models_model_id_recommendations_get_response_get_recommendations_api_models_model_id_recommendations_get.additional_properties = ( + d + ) + return get_recommendations_api_models_model_id_recommendations_get_response_get_recommendations_api_models_model_id_recommendations_get + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/governance_ai_accept_response.py b/seclai/_generated/models/governance_ai_accept_response.py new file mode 100644 index 0000000..19323d5 --- /dev/null +++ b/seclai/_generated/models/governance_ai_accept_response.py @@ -0,0 +1,116 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.applied_action_response import AppliedActionResponse + + +T = TypeVar("T", bound="GovernanceAiAcceptResponse") + + +@_attrs_define +class GovernanceAiAcceptResponse: + """Response from accepting a governance AI assistant plan. + + Attributes: + actions_applied (list[AppliedActionResponse]): Results of each action that was executed. + conversation_id (str): Conversation ID that was accepted. + success (bool): Whether all actions were applied successfully. + error (None | str | Unset): Overall error message if the plan failed, or null. + """ + + actions_applied: list[AppliedActionResponse] + conversation_id: str + success: bool + error: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + actions_applied = [] + for actions_applied_item_data in self.actions_applied: + actions_applied_item = actions_applied_item_data.to_dict() + actions_applied.append(actions_applied_item) + + conversation_id = self.conversation_id + + success = self.success + + error: None | str | Unset + if isinstance(self.error, Unset): + error = UNSET + else: + error = self.error + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "actions_applied": actions_applied, + "conversation_id": conversation_id, + "success": success, + } + ) + if error is not UNSET: + field_dict["error"] = error + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.applied_action_response import AppliedActionResponse + + d = dict(src_dict) + actions_applied = [] + _actions_applied = d.pop("actions_applied") + for actions_applied_item_data in _actions_applied: + actions_applied_item = AppliedActionResponse.from_dict( + actions_applied_item_data + ) + + actions_applied.append(actions_applied_item) + + conversation_id = d.pop("conversation_id") + + success = d.pop("success") + + def _parse_error(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + error = _parse_error(d.pop("error", UNSET)) + + governance_ai_accept_response = cls( + actions_applied=actions_applied, + conversation_id=conversation_id, + success=success, + error=error, + ) + + governance_ai_accept_response.additional_properties = d + return governance_ai_accept_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/governance_ai_assistant_request.py b/seclai/_generated/models/governance_ai_assistant_request.py new file mode 100644 index 0000000..89edb06 --- /dev/null +++ b/seclai/_generated/models/governance_ai_assistant_request.py @@ -0,0 +1,62 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="GovernanceAiAssistantRequest") + + +@_attrs_define +class GovernanceAiAssistantRequest: + """Request body for the governance AI assistant. + + Attributes: + user_input (str): Natural-language request for the governance AI assistant. + """ + + user_input: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + user_input = self.user_input + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "user_input": user_input, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + user_input = d.pop("user_input") + + governance_ai_assistant_request = cls( + user_input=user_input, + ) + + governance_ai_assistant_request.additional_properties = d + return governance_ai_assistant_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/governance_ai_assistant_response.py b/seclai/_generated/models/governance_ai_assistant_response.py new file mode 100644 index 0000000..6cf38d3 --- /dev/null +++ b/seclai/_generated/models/governance_ai_assistant_response.py @@ -0,0 +1,153 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.example_prompt import ExamplePrompt + from ..models.proposed_policy_action_response import ProposedPolicyActionResponse + + +T = TypeVar("T", bound="GovernanceAiAssistantResponse") + + +@_attrs_define +class GovernanceAiAssistantResponse: + """Response from the governance AI assistant generate endpoint. + + Attributes: + conversation_id (str): Conversation ID to accept or decline this plan. + note (str): AI-generated summary of the proposed changes. + proposed_actions (list[ProposedPolicyActionResponse]): Ordered list of policy actions the AI proposes to + execute. + success (bool): Whether the plan was generated successfully. + example_prompts (list[ExamplePrompt] | Unset): Example natural-language prompts that demonstrate the + capabilities of the governance AI assistant. + prompt_call_id (None | str | Unset): Prompt call ID for credit tracking, or null. + """ + + conversation_id: str + note: str + proposed_actions: list[ProposedPolicyActionResponse] + success: bool + example_prompts: list[ExamplePrompt] | Unset = UNSET + prompt_call_id: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + conversation_id = self.conversation_id + + note = self.note + + proposed_actions = [] + for proposed_actions_item_data in self.proposed_actions: + proposed_actions_item = proposed_actions_item_data.to_dict() + proposed_actions.append(proposed_actions_item) + + success = self.success + + example_prompts: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.example_prompts, Unset): + example_prompts = [] + for example_prompts_item_data in self.example_prompts: + example_prompts_item = example_prompts_item_data.to_dict() + example_prompts.append(example_prompts_item) + + prompt_call_id: None | str | Unset + if isinstance(self.prompt_call_id, Unset): + prompt_call_id = UNSET + else: + prompt_call_id = self.prompt_call_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "conversation_id": conversation_id, + "note": note, + "proposed_actions": proposed_actions, + "success": success, + } + ) + if example_prompts is not UNSET: + field_dict["example_prompts"] = example_prompts + if prompt_call_id is not UNSET: + field_dict["prompt_call_id"] = prompt_call_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.example_prompt import ExamplePrompt + from ..models.proposed_policy_action_response import ( + ProposedPolicyActionResponse, + ) + + d = dict(src_dict) + conversation_id = d.pop("conversation_id") + + note = d.pop("note") + + proposed_actions = [] + _proposed_actions = d.pop("proposed_actions") + for proposed_actions_item_data in _proposed_actions: + proposed_actions_item = ProposedPolicyActionResponse.from_dict( + proposed_actions_item_data + ) + + proposed_actions.append(proposed_actions_item) + + success = d.pop("success") + + _example_prompts = d.pop("example_prompts", UNSET) + example_prompts: list[ExamplePrompt] | Unset = UNSET + if _example_prompts is not UNSET: + example_prompts = [] + for example_prompts_item_data in _example_prompts: + example_prompts_item = ExamplePrompt.from_dict( + example_prompts_item_data + ) + + example_prompts.append(example_prompts_item) + + def _parse_prompt_call_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + prompt_call_id = _parse_prompt_call_id(d.pop("prompt_call_id", UNSET)) + + governance_ai_assistant_response = cls( + conversation_id=conversation_id, + note=note, + proposed_actions=proposed_actions, + success=success, + example_prompts=example_prompts, + prompt_call_id=prompt_call_id, + ) + + governance_ai_assistant_response.additional_properties = d + return governance_ai_assistant_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/governance_conversation_response.py b/seclai/_generated/models/governance_conversation_response.py new file mode 100644 index 0000000..818faa7 --- /dev/null +++ b/seclai/_generated/models/governance_conversation_response.py @@ -0,0 +1,152 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.governance_conversation_response_proposed_actions_type_0 import ( + GovernanceConversationResponseProposedActionsType0, + ) + + +T = TypeVar("T", bound="GovernanceConversationResponse") + + +@_attrs_define +class GovernanceConversationResponse: + """A governance AI assistant conversation entry. + + Attributes: + accepted (bool | None): True if accepted, false if declined, null if pending. + ai_response (None | str): The AI assistant's response note, or null. + created_at (str): ISO 8601 creation timestamp. + id (str): Conversation ID. + proposed_actions (GovernanceConversationResponseProposedActionsType0 | None): JSON of proposed actions, or null. + user_input (str): The original user request. + """ + + accepted: bool | None + ai_response: None | str + created_at: str + id: str + proposed_actions: GovernanceConversationResponseProposedActionsType0 | None + user_input: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.governance_conversation_response_proposed_actions_type_0 import ( + GovernanceConversationResponseProposedActionsType0, + ) + + accepted: bool | None + accepted = self.accepted + + ai_response: None | str + ai_response = self.ai_response + + created_at = self.created_at + + id = self.id + + proposed_actions: dict[str, Any] | None + if isinstance( + self.proposed_actions, GovernanceConversationResponseProposedActionsType0 + ): + proposed_actions = self.proposed_actions.to_dict() + else: + proposed_actions = self.proposed_actions + + user_input = self.user_input + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "accepted": accepted, + "ai_response": ai_response, + "created_at": created_at, + "id": id, + "proposed_actions": proposed_actions, + "user_input": user_input, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.governance_conversation_response_proposed_actions_type_0 import ( + GovernanceConversationResponseProposedActionsType0, + ) + + d = dict(src_dict) + + def _parse_accepted(data: object) -> bool | None: + if data is None: + return data + return cast(bool | None, data) + + accepted = _parse_accepted(d.pop("accepted")) + + def _parse_ai_response(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + ai_response = _parse_ai_response(d.pop("ai_response")) + + created_at = d.pop("created_at") + + id = d.pop("id") + + def _parse_proposed_actions( + data: object, + ) -> GovernanceConversationResponseProposedActionsType0 | None: + if data is None: + return data + try: + if not isinstance(data, dict): + raise TypeError() + proposed_actions_type_0 = ( + GovernanceConversationResponseProposedActionsType0.from_dict(data) + ) + + return proposed_actions_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(GovernanceConversationResponseProposedActionsType0 | None, data) + + proposed_actions = _parse_proposed_actions(d.pop("proposed_actions")) + + user_input = d.pop("user_input") + + governance_conversation_response = cls( + accepted=accepted, + ai_response=ai_response, + created_at=created_at, + id=id, + proposed_actions=proposed_actions, + user_input=user_input, + ) + + governance_conversation_response.additional_properties = d + return governance_conversation_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/governance_conversation_response_proposed_actions_type_0.py b/seclai/_generated/models/governance_conversation_response_proposed_actions_type_0.py new file mode 100644 index 0000000..b6f23c5 --- /dev/null +++ b/seclai/_generated/models/governance_conversation_response_proposed_actions_type_0.py @@ -0,0 +1,48 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="GovernanceConversationResponseProposedActionsType0") + + +@_attrs_define +class GovernanceConversationResponseProposedActionsType0: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + governance_conversation_response_proposed_actions_type_0 = cls() + + governance_conversation_response_proposed_actions_type_0.additional_properties = ( + d + ) + return governance_conversation_response_proposed_actions_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/inline_text_replace_request.py b/seclai/_generated/models/inline_text_replace_request.py new file mode 100644 index 0000000..e47e25c --- /dev/null +++ b/seclai/_generated/models/inline_text_replace_request.py @@ -0,0 +1,150 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.inline_text_replace_request_metadata_type_0 import ( + InlineTextReplaceRequestMetadataType0, + ) + + +T = TypeVar("T", bound="InlineTextReplaceRequest") + + +@_attrs_define +class InlineTextReplaceRequest: + """Request model for inline text content replacement. + + Attributes: + text (str): Text content to upload + content_type (None | str | Unset): MIME type for the text content Default: 'text/plain'. + metadata (InlineTextReplaceRequestMetadataType0 | None | Unset): Optional metadata object + title (None | str | Unset): Optional title + """ + + text: str + content_type: None | str | Unset = "text/plain" + metadata: InlineTextReplaceRequestMetadataType0 | None | Unset = UNSET + title: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.inline_text_replace_request_metadata_type_0 import ( + InlineTextReplaceRequestMetadataType0, + ) + + text = self.text + + content_type: None | str | Unset + if isinstance(self.content_type, Unset): + content_type = UNSET + else: + content_type = self.content_type + + metadata: dict[str, Any] | None | Unset + if isinstance(self.metadata, Unset): + metadata = UNSET + elif isinstance(self.metadata, InlineTextReplaceRequestMetadataType0): + metadata = self.metadata.to_dict() + else: + metadata = self.metadata + + title: None | str | Unset + if isinstance(self.title, Unset): + title = UNSET + else: + title = self.title + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "text": text, + } + ) + if content_type is not UNSET: + field_dict["content_type"] = content_type + if metadata is not UNSET: + field_dict["metadata"] = metadata + if title is not UNSET: + field_dict["title"] = title + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.inline_text_replace_request_metadata_type_0 import ( + InlineTextReplaceRequestMetadataType0, + ) + + d = dict(src_dict) + text = d.pop("text") + + def _parse_content_type(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + content_type = _parse_content_type(d.pop("content_type", UNSET)) + + def _parse_metadata( + data: object, + ) -> InlineTextReplaceRequestMetadataType0 | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + metadata_type_0 = InlineTextReplaceRequestMetadataType0.from_dict(data) + + return metadata_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(InlineTextReplaceRequestMetadataType0 | None | Unset, data) + + metadata = _parse_metadata(d.pop("metadata", UNSET)) + + def _parse_title(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + title = _parse_title(d.pop("title", UNSET)) + + inline_text_replace_request = cls( + text=text, + content_type=content_type, + metadata=metadata, + title=title, + ) + + inline_text_replace_request.additional_properties = d + return inline_text_replace_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/inline_text_replace_request_metadata_type_0.py b/seclai/_generated/models/inline_text_replace_request_metadata_type_0.py new file mode 100644 index 0000000..927d87f --- /dev/null +++ b/seclai/_generated/models/inline_text_replace_request_metadata_type_0.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="InlineTextReplaceRequestMetadataType0") + + +@_attrs_define +class InlineTextReplaceRequestMetadataType0: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + inline_text_replace_request_metadata_type_0 = cls() + + inline_text_replace_request_metadata_type_0.additional_properties = d + return inline_text_replace_request_metadata_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/inline_text_upload_request.py b/seclai/_generated/models/inline_text_upload_request.py new file mode 100644 index 0000000..64f19db --- /dev/null +++ b/seclai/_generated/models/inline_text_upload_request.py @@ -0,0 +1,150 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.inline_text_upload_request_metadata_type_0 import ( + InlineTextUploadRequestMetadataType0, + ) + + +T = TypeVar("T", bound="InlineTextUploadRequest") + + +@_attrs_define +class InlineTextUploadRequest: + """Request model for inline text uploads. + + Attributes: + text (str): Text content to upload + content_type (None | str | Unset): MIME type for the text content Default: 'text/plain'. + metadata (InlineTextUploadRequestMetadataType0 | None | Unset): Optional metadata object + title (None | str | Unset): Optional title + """ + + text: str + content_type: None | str | Unset = "text/plain" + metadata: InlineTextUploadRequestMetadataType0 | None | Unset = UNSET + title: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.inline_text_upload_request_metadata_type_0 import ( + InlineTextUploadRequestMetadataType0, + ) + + text = self.text + + content_type: None | str | Unset + if isinstance(self.content_type, Unset): + content_type = UNSET + else: + content_type = self.content_type + + metadata: dict[str, Any] | None | Unset + if isinstance(self.metadata, Unset): + metadata = UNSET + elif isinstance(self.metadata, InlineTextUploadRequestMetadataType0): + metadata = self.metadata.to_dict() + else: + metadata = self.metadata + + title: None | str | Unset + if isinstance(self.title, Unset): + title = UNSET + else: + title = self.title + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "text": text, + } + ) + if content_type is not UNSET: + field_dict["content_type"] = content_type + if metadata is not UNSET: + field_dict["metadata"] = metadata + if title is not UNSET: + field_dict["title"] = title + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.inline_text_upload_request_metadata_type_0 import ( + InlineTextUploadRequestMetadataType0, + ) + + d = dict(src_dict) + text = d.pop("text") + + def _parse_content_type(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + content_type = _parse_content_type(d.pop("content_type", UNSET)) + + def _parse_metadata( + data: object, + ) -> InlineTextUploadRequestMetadataType0 | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + metadata_type_0 = InlineTextUploadRequestMetadataType0.from_dict(data) + + return metadata_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(InlineTextUploadRequestMetadataType0 | None | Unset, data) + + metadata = _parse_metadata(d.pop("metadata", UNSET)) + + def _parse_title(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + title = _parse_title(d.pop("title", UNSET)) + + inline_text_upload_request = cls( + text=text, + content_type=content_type, + metadata=metadata, + title=title, + ) + + inline_text_upload_request.additional_properties = d + return inline_text_upload_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/inline_text_upload_request_metadata_type_0.py b/seclai/_generated/models/inline_text_upload_request_metadata_type_0.py new file mode 100644 index 0000000..1d33a4f --- /dev/null +++ b/seclai/_generated/models/inline_text_upload_request_metadata_type_0.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="InlineTextUploadRequestMetadataType0") + + +@_attrs_define +class InlineTextUploadRequestMetadataType0: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + inline_text_upload_request_metadata_type_0 = cls() + + inline_text_upload_request_metadata_type_0.additional_properties = d + return inline_text_upload_request_metadata_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/knowledge_base.py b/seclai/_generated/models/knowledge_base.py new file mode 100644 index 0000000..a2dfc00 --- /dev/null +++ b/seclai/_generated/models/knowledge_base.py @@ -0,0 +1,230 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.source_connection_response_model import SourceConnectionResponseModel + + +T = TypeVar("T", bound="KnowledgeBase") + + +@_attrs_define +class KnowledgeBase: + """Response model for a single knowledge base. + + Attributes: + created_at (str): ISO-8601 creation timestamp. + id (str): Unique knowledge base identifier. + name (str): Human-readable name. + updated_at (str): ISO-8601 last-update timestamp. + default_score_threshold (float | None | Unset): Default minimum rerank score. + default_top_k (int | None | Unset): Default results after reranking. + default_top_n (int | None | Unset): Default number of results to return. + description (None | str | Unset): Optional description. + readonly (bool | Unset): Whether the knowledge base is read-only. Default: False. + reranker_model (None | str | Unset): Reranker model in use. + sources (list[SourceConnectionResponseModel] | Unset): Linked source connections. + """ + + created_at: str + id: str + name: str + updated_at: str + default_score_threshold: float | None | Unset = UNSET + default_top_k: int | None | Unset = UNSET + default_top_n: int | None | Unset = UNSET + description: None | str | Unset = UNSET + readonly: bool | Unset = False + reranker_model: None | str | Unset = UNSET + sources: list[SourceConnectionResponseModel] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + created_at = self.created_at + + id = self.id + + name = self.name + + updated_at = self.updated_at + + default_score_threshold: float | None | Unset + if isinstance(self.default_score_threshold, Unset): + default_score_threshold = UNSET + else: + default_score_threshold = self.default_score_threshold + + default_top_k: int | None | Unset + if isinstance(self.default_top_k, Unset): + default_top_k = UNSET + else: + default_top_k = self.default_top_k + + default_top_n: int | None | Unset + if isinstance(self.default_top_n, Unset): + default_top_n = UNSET + else: + default_top_n = self.default_top_n + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + readonly = self.readonly + + reranker_model: None | str | Unset + if isinstance(self.reranker_model, Unset): + reranker_model = UNSET + else: + reranker_model = self.reranker_model + + sources: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.sources, Unset): + sources = [] + for sources_item_data in self.sources: + sources_item = sources_item_data.to_dict() + sources.append(sources_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "created_at": created_at, + "id": id, + "name": name, + "updated_at": updated_at, + } + ) + if default_score_threshold is not UNSET: + field_dict["default_score_threshold"] = default_score_threshold + if default_top_k is not UNSET: + field_dict["default_top_k"] = default_top_k + if default_top_n is not UNSET: + field_dict["default_top_n"] = default_top_n + if description is not UNSET: + field_dict["description"] = description + if readonly is not UNSET: + field_dict["readonly"] = readonly + if reranker_model is not UNSET: + field_dict["reranker_model"] = reranker_model + if sources is not UNSET: + field_dict["sources"] = sources + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.source_connection_response_model import ( + SourceConnectionResponseModel, + ) + + d = dict(src_dict) + created_at = d.pop("created_at") + + id = d.pop("id") + + name = d.pop("name") + + updated_at = d.pop("updated_at") + + def _parse_default_score_threshold(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + default_score_threshold = _parse_default_score_threshold( + d.pop("default_score_threshold", UNSET) + ) + + def _parse_default_top_k(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + default_top_k = _parse_default_top_k(d.pop("default_top_k", UNSET)) + + def _parse_default_top_n(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + default_top_n = _parse_default_top_n(d.pop("default_top_n", UNSET)) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + readonly = d.pop("readonly", UNSET) + + def _parse_reranker_model(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + reranker_model = _parse_reranker_model(d.pop("reranker_model", UNSET)) + + _sources = d.pop("sources", UNSET) + sources: list[SourceConnectionResponseModel] | Unset = UNSET + if _sources is not UNSET: + sources = [] + for sources_item_data in _sources: + sources_item = SourceConnectionResponseModel.from_dict( + sources_item_data + ) + + sources.append(sources_item) + + knowledge_base = cls( + created_at=created_at, + id=id, + name=name, + updated_at=updated_at, + default_score_threshold=default_score_threshold, + default_top_k=default_top_k, + default_top_n=default_top_n, + description=description, + readonly=readonly, + reranker_model=reranker_model, + sources=sources, + ) + + knowledge_base.additional_properties = d + return knowledge_base + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/knowledge_base_list_response_model.py b/seclai/_generated/models/knowledge_base_list_response_model.py new file mode 100644 index 0000000..b2936b5 --- /dev/null +++ b/seclai/_generated/models/knowledge_base_list_response_model.py @@ -0,0 +1,100 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.knowledge_base import KnowledgeBase + + +T = TypeVar("T", bound="KnowledgeBaseListResponseModel") + + +@_attrs_define +class KnowledgeBaseListResponseModel: + """Paginated list of knowledge bases. + + Attributes: + knowledge_bases (list[KnowledgeBase]): List of knowledge bases on this page. + limit (int): Items per page. + page (int): Current page number (1-based). + total (int): Total number of knowledge bases. + """ + + knowledge_bases: list[KnowledgeBase] + limit: int + page: int + total: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + knowledge_bases = [] + for knowledge_bases_item_data in self.knowledge_bases: + knowledge_bases_item = knowledge_bases_item_data.to_dict() + knowledge_bases.append(knowledge_bases_item) + + limit = self.limit + + page = self.page + + total = self.total + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "knowledge_bases": knowledge_bases, + "limit": limit, + "page": page, + "total": total, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.knowledge_base import KnowledgeBase + + d = dict(src_dict) + knowledge_bases = [] + _knowledge_bases = d.pop("knowledge_bases") + for knowledge_bases_item_data in _knowledge_bases: + knowledge_bases_item = KnowledgeBase.from_dict(knowledge_bases_item_data) + + knowledge_bases.append(knowledge_bases_item) + + limit = d.pop("limit") + + page = d.pop("page") + + total = d.pop("total") + + knowledge_base_list_response_model = cls( + knowledge_bases=knowledge_bases, + limit=limit, + page=page, + total=total, + ) + + knowledge_base_list_response_model.additional_properties = d + return knowledge_base_list_response_model + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/link_resources_request.py b/seclai/_generated/models/link_resources_request.py new file mode 100644 index 0000000..0b3de03 --- /dev/null +++ b/seclai/_generated/models/link_resources_request.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="LinkResourcesRequest") + + +@_attrs_define +class LinkResourcesRequest: + """ + Attributes: + ids (list[UUID]): Resource IDs to link + """ + + ids: list[UUID] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + ids = [] + for ids_item_data in self.ids: + ids_item = str(ids_item_data) + ids.append(ids_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "ids": ids, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + ids = [] + _ids = d.pop("ids") + for ids_item_data in _ids: + ids_item = UUID(ids_item_data) + + ids.append(ids_item) + + link_resources_request = cls( + ids=ids, + ) + + link_resources_request.additional_properties = d + return link_resources_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/list_alert_configs_api_alerts_configs_get_response_list_alert_configs_api_alerts_configs_get.py b/seclai/_generated/models/list_alert_configs_api_alerts_configs_get_response_list_alert_configs_api_alerts_configs_get.py new file mode 100644 index 0000000..b893f24 --- /dev/null +++ b/seclai/_generated/models/list_alert_configs_api_alerts_configs_get_response_list_alert_configs_api_alerts_configs_get.py @@ -0,0 +1,53 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar( + "T", + bound="ListAlertConfigsApiAlertsConfigsGetResponseListAlertConfigsApiAlertsConfigsGet", +) + + +@_attrs_define +class ListAlertConfigsApiAlertsConfigsGetResponseListAlertConfigsApiAlertsConfigsGet: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + list_alert_configs_api_alerts_configs_get_response_list_alert_configs_api_alerts_configs_get = ( + cls() + ) + + list_alert_configs_api_alerts_configs_get_response_list_alert_configs_api_alerts_configs_get.additional_properties = ( + d + ) + return list_alert_configs_api_alerts_configs_get_response_list_alert_configs_api_alerts_configs_get + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/list_alerts_api_alerts_get_response_list_alerts_api_alerts_get.py b/seclai/_generated/models/list_alerts_api_alerts_get_response_list_alerts_api_alerts_get.py new file mode 100644 index 0000000..6d6f55f --- /dev/null +++ b/seclai/_generated/models/list_alerts_api_alerts_get_response_list_alerts_api_alerts_get.py @@ -0,0 +1,48 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ListAlertsApiAlertsGetResponseListAlertsApiAlertsGet") + + +@_attrs_define +class ListAlertsApiAlertsGetResponseListAlertsApiAlertsGet: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + list_alerts_api_alerts_get_response_list_alerts_api_alerts_get = cls() + + list_alerts_api_alerts_get_response_list_alerts_api_alerts_get.additional_properties = ( + d + ) + return list_alerts_api_alerts_get_response_list_alerts_api_alerts_get + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/list_alerts_api_models_alerts_get_response_list_alerts_api_models_alerts_get.py b/seclai/_generated/models/list_alerts_api_models_alerts_get_response_list_alerts_api_models_alerts_get.py new file mode 100644 index 0000000..27ab008 --- /dev/null +++ b/seclai/_generated/models/list_alerts_api_models_alerts_get_response_list_alerts_api_models_alerts_get.py @@ -0,0 +1,54 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar( + "T", bound="ListAlertsApiModelsAlertsGetResponseListAlertsApiModelsAlertsGet" +) + + +@_attrs_define +class ListAlertsApiModelsAlertsGetResponseListAlertsApiModelsAlertsGet: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + list_alerts_api_models_alerts_get_response_list_alerts_api_models_alerts_get = ( + cls() + ) + + list_alerts_api_models_alerts_get_response_list_alerts_api_models_alerts_get.additional_properties = ( + d + ) + return ( + list_alerts_api_models_alerts_get_response_list_alerts_api_models_alerts_get + ) + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/list_templates_api_memory_banks_templates_get_response_200_item.py b/seclai/_generated/models/list_templates_api_memory_banks_templates_get_response_200_item.py new file mode 100644 index 0000000..c11efc8 --- /dev/null +++ b/seclai/_generated/models/list_templates_api_memory_banks_templates_get_response_200_item.py @@ -0,0 +1,48 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ListTemplatesApiMemoryBanksTemplatesGetResponse200Item") + + +@_attrs_define +class ListTemplatesApiMemoryBanksTemplatesGetResponse200Item: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + list_templates_api_memory_banks_templates_get_response_200_item = cls() + + list_templates_api_memory_banks_templates_get_response_200_item.additional_properties = ( + d + ) + return list_templates_api_memory_banks_templates_get_response_200_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/mark_ai_suggestion_api_agents_agent_id_ai_assistant_conversation_id_patch_response_mark_ai_suggestion_api_agents_agent_id_ai_assistant_conversation_id_patch.py b/seclai/_generated/models/mark_ai_suggestion_api_agents_agent_id_ai_assistant_conversation_id_patch_response_mark_ai_suggestion_api_agents_agent_id_ai_assistant_conversation_id_patch.py new file mode 100644 index 0000000..753f675 --- /dev/null +++ b/seclai/_generated/models/mark_ai_suggestion_api_agents_agent_id_ai_assistant_conversation_id_patch_response_mark_ai_suggestion_api_agents_agent_id_ai_assistant_conversation_id_patch.py @@ -0,0 +1,53 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar( + "T", + bound="MarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatchResponseMarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatch", +) + + +@_attrs_define +class MarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatchResponseMarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatch: + """ """ + + additional_properties: dict[str, bool] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + mark_ai_suggestion_api_agents_agent_id_ai_assistant_conversation_id_patch_response_mark_ai_suggestion_api_agents_agent_id_ai_assistant_conversation_id_patch = ( + cls() + ) + + mark_ai_suggestion_api_agents_agent_id_ai_assistant_conversation_id_patch_response_mark_ai_suggestion_api_agents_agent_id_ai_assistant_conversation_id_patch.additional_properties = ( + d + ) + return mark_ai_suggestion_api_agents_agent_id_ai_assistant_conversation_id_patch_response_mark_ai_suggestion_api_agents_agent_id_ai_assistant_conversation_id_patch + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> bool: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: bool) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/mark_ai_suggestion_request.py b/seclai/_generated/models/mark_ai_suggestion_request.py new file mode 100644 index 0000000..6542bd2 --- /dev/null +++ b/seclai/_generated/models/mark_ai_suggestion_request.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="MarkAiSuggestionRequest") + + +@_attrs_define +class MarkAiSuggestionRequest: + """ + Attributes: + accepted (bool): True to accept the suggestion, false to decline it. + """ + + accepted: bool + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + accepted = self.accepted + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "accepted": accepted, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + accepted = d.pop("accepted") + + mark_ai_suggestion_request = cls( + accepted=accepted, + ) + + mark_ai_suggestion_request.additional_properties = d + return mark_ai_suggestion_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/mark_conversation_turn_request.py b/seclai/_generated/models/mark_conversation_turn_request.py new file mode 100644 index 0000000..e311978 --- /dev/null +++ b/seclai/_generated/models/mark_conversation_turn_request.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="MarkConversationTurnRequest") + + +@_attrs_define +class MarkConversationTurnRequest: + """ + Attributes: + accepted (bool): Whether the suggestion was accepted + """ + + accepted: bool + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + accepted = self.accepted + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "accepted": accepted, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + accepted = d.pop("accepted") + + mark_conversation_turn_request = cls( + accepted=accepted, + ) + + mark_conversation_turn_request.additional_properties = d + return mark_conversation_turn_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/me_response.py b/seclai/_generated/models/me_response.py new file mode 100644 index 0000000..00e8caa --- /dev/null +++ b/seclai/_generated/models/me_response.py @@ -0,0 +1,86 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.organization_info_response import OrganizationInfoResponse + + +T = TypeVar("T", bound="MeResponse") + + +@_attrs_define +class MeResponse: + """ + Attributes: + account_id (UUID): + organizations (list[OrganizationInfoResponse]): + """ + + account_id: UUID + organizations: list[OrganizationInfoResponse] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + account_id = str(self.account_id) + + organizations = [] + for organizations_item_data in self.organizations: + organizations_item = organizations_item_data.to_dict() + organizations.append(organizations_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "account_id": account_id, + "organizations": organizations, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.organization_info_response import OrganizationInfoResponse + + d = dict(src_dict) + account_id = UUID(d.pop("account_id")) + + organizations = [] + _organizations = d.pop("organizations") + for organizations_item_data in _organizations: + organizations_item = OrganizationInfoResponse.from_dict( + organizations_item_data + ) + + organizations.append(organizations_item) + + me_response = cls( + account_id=account_id, + organizations=organizations, + ) + + me_response.additional_properties = d + return me_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/memory_bank.py b/seclai/_generated/models/memory_bank.py new file mode 100644 index 0000000..e420e28 --- /dev/null +++ b/seclai/_generated/models/memory_bank.py @@ -0,0 +1,330 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="MemoryBank") + + +@_attrs_define +class MemoryBank: + """Response model for a single memory bank. + + Attributes: + created_at (str): ISO-8601 creation timestamp. + id (str): Unique memory bank identifier. + mode (str): Embedding mode: fast_and_cheap, balanced, slow_and_thorough, or custom. + name (str): Human-readable name. + type_ (str): Bank type: conversation (chat-turn with speaker) or general (flat entries). + updated_at (str): ISO-8601 last-update timestamp. + chunk_overlap (int | None | Unset): Character overlap between chunks. + chunk_size (int | None | Unset): Characters per chunk. + compaction_prompt (None | str | Unset): Custom prompt used when compacting older entries. When set, entries that + exceed a threshold are summarized into a new entry before being soft-deleted. + description (None | str | Unset): Optional description of the memory bank's purpose. + dimensions (int | None | Unset): Vector embedding dimensions. + embedding_model (None | str | Unset): Embedding model identifier. + max_age_days (int | None | Unset): Max entry age in days before compaction. Checked both inline after each write + and by the hourly background sweep. + max_size_tokens (int | None | Unset): Max total tokens (per partition) before compaction. Checked both inline + after each write and by the hourly background sweep. + max_turns (int | None | Unset): Max conversation turns (per partition) before compaction. Checked both inline + after each write and by the hourly background sweep. + retention_days (int | None | Unset): Content retention period in days (null = indefinite). + source_connection_id (None | str | Unset): Linked content source ID (null if not yet provisioned). + """ + + created_at: str + id: str + mode: str + name: str + type_: str + updated_at: str + chunk_overlap: int | None | Unset = UNSET + chunk_size: int | None | Unset = UNSET + compaction_prompt: None | str | Unset = UNSET + description: None | str | Unset = UNSET + dimensions: int | None | Unset = UNSET + embedding_model: None | str | Unset = UNSET + max_age_days: int | None | Unset = UNSET + max_size_tokens: int | None | Unset = UNSET + max_turns: int | None | Unset = UNSET + retention_days: int | None | Unset = UNSET + source_connection_id: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + created_at = self.created_at + + id = self.id + + mode = self.mode + + name = self.name + + type_ = self.type_ + + updated_at = self.updated_at + + chunk_overlap: int | None | Unset + if isinstance(self.chunk_overlap, Unset): + chunk_overlap = UNSET + else: + chunk_overlap = self.chunk_overlap + + chunk_size: int | None | Unset + if isinstance(self.chunk_size, Unset): + chunk_size = UNSET + else: + chunk_size = self.chunk_size + + compaction_prompt: None | str | Unset + if isinstance(self.compaction_prompt, Unset): + compaction_prompt = UNSET + else: + compaction_prompt = self.compaction_prompt + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + dimensions: int | None | Unset + if isinstance(self.dimensions, Unset): + dimensions = UNSET + else: + dimensions = self.dimensions + + embedding_model: None | str | Unset + if isinstance(self.embedding_model, Unset): + embedding_model = UNSET + else: + embedding_model = self.embedding_model + + max_age_days: int | None | Unset + if isinstance(self.max_age_days, Unset): + max_age_days = UNSET + else: + max_age_days = self.max_age_days + + max_size_tokens: int | None | Unset + if isinstance(self.max_size_tokens, Unset): + max_size_tokens = UNSET + else: + max_size_tokens = self.max_size_tokens + + max_turns: int | None | Unset + if isinstance(self.max_turns, Unset): + max_turns = UNSET + else: + max_turns = self.max_turns + + retention_days: int | None | Unset + if isinstance(self.retention_days, Unset): + retention_days = UNSET + else: + retention_days = self.retention_days + + source_connection_id: None | str | Unset + if isinstance(self.source_connection_id, Unset): + source_connection_id = UNSET + else: + source_connection_id = self.source_connection_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "created_at": created_at, + "id": id, + "mode": mode, + "name": name, + "type": type_, + "updated_at": updated_at, + } + ) + if chunk_overlap is not UNSET: + field_dict["chunk_overlap"] = chunk_overlap + if chunk_size is not UNSET: + field_dict["chunk_size"] = chunk_size + if compaction_prompt is not UNSET: + field_dict["compaction_prompt"] = compaction_prompt + if description is not UNSET: + field_dict["description"] = description + if dimensions is not UNSET: + field_dict["dimensions"] = dimensions + if embedding_model is not UNSET: + field_dict["embedding_model"] = embedding_model + if max_age_days is not UNSET: + field_dict["max_age_days"] = max_age_days + if max_size_tokens is not UNSET: + field_dict["max_size_tokens"] = max_size_tokens + if max_turns is not UNSET: + field_dict["max_turns"] = max_turns + if retention_days is not UNSET: + field_dict["retention_days"] = retention_days + if source_connection_id is not UNSET: + field_dict["source_connection_id"] = source_connection_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + created_at = d.pop("created_at") + + id = d.pop("id") + + mode = d.pop("mode") + + name = d.pop("name") + + type_ = d.pop("type") + + updated_at = d.pop("updated_at") + + def _parse_chunk_overlap(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + chunk_overlap = _parse_chunk_overlap(d.pop("chunk_overlap", UNSET)) + + def _parse_chunk_size(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + chunk_size = _parse_chunk_size(d.pop("chunk_size", UNSET)) + + def _parse_compaction_prompt(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + compaction_prompt = _parse_compaction_prompt(d.pop("compaction_prompt", UNSET)) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + def _parse_dimensions(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + dimensions = _parse_dimensions(d.pop("dimensions", UNSET)) + + def _parse_embedding_model(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + embedding_model = _parse_embedding_model(d.pop("embedding_model", UNSET)) + + def _parse_max_age_days(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + max_age_days = _parse_max_age_days(d.pop("max_age_days", UNSET)) + + def _parse_max_size_tokens(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + max_size_tokens = _parse_max_size_tokens(d.pop("max_size_tokens", UNSET)) + + def _parse_max_turns(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + max_turns = _parse_max_turns(d.pop("max_turns", UNSET)) + + def _parse_retention_days(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + retention_days = _parse_retention_days(d.pop("retention_days", UNSET)) + + def _parse_source_connection_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + source_connection_id = _parse_source_connection_id( + d.pop("source_connection_id", UNSET) + ) + + memory_bank = cls( + created_at=created_at, + id=id, + mode=mode, + name=name, + type_=type_, + updated_at=updated_at, + chunk_overlap=chunk_overlap, + chunk_size=chunk_size, + compaction_prompt=compaction_prompt, + description=description, + dimensions=dimensions, + embedding_model=embedding_model, + max_age_days=max_age_days, + max_size_tokens=max_size_tokens, + max_turns=max_turns, + retention_days=retention_days, + source_connection_id=source_connection_id, + ) + + memory_bank.additional_properties = d + return memory_bank + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/memory_bank_accept_request.py b/seclai/_generated/models/memory_bank_accept_request.py new file mode 100644 index 0000000..30308a9 --- /dev/null +++ b/seclai/_generated/models/memory_bank_accept_request.py @@ -0,0 +1,62 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="MemoryBankAcceptRequest") + + +@_attrs_define +class MemoryBankAcceptRequest: + """Accept or decline a memory bank AI suggestion. + + Attributes: + accepted (bool): Whether the user accepted the proposed configuration. + """ + + accepted: bool + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + accepted = self.accepted + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "accepted": accepted, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + accepted = d.pop("accepted") + + memory_bank_accept_request = cls( + accepted=accepted, + ) + + memory_bank_accept_request.additional_properties = d + return memory_bank_accept_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/memory_bank_ai_accept_api_memory_banks_ai_assistant_conversation_id_patch_response_memory_bank_ai_accept_api_memory_banks_ai_assistant_conversation_id_patch.py b/seclai/_generated/models/memory_bank_ai_accept_api_memory_banks_ai_assistant_conversation_id_patch_response_memory_bank_ai_accept_api_memory_banks_ai_assistant_conversation_id_patch.py new file mode 100644 index 0000000..60b49d8 --- /dev/null +++ b/seclai/_generated/models/memory_bank_ai_accept_api_memory_banks_ai_assistant_conversation_id_patch_response_memory_bank_ai_accept_api_memory_banks_ai_assistant_conversation_id_patch.py @@ -0,0 +1,53 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar( + "T", + bound="MemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatchResponseMemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatch", +) + + +@_attrs_define +class MemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatchResponseMemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatch: + """ """ + + additional_properties: dict[str, bool] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + memory_bank_ai_accept_api_memory_banks_ai_assistant_conversation_id_patch_response_memory_bank_ai_accept_api_memory_banks_ai_assistant_conversation_id_patch = ( + cls() + ) + + memory_bank_ai_accept_api_memory_banks_ai_assistant_conversation_id_patch_response_memory_bank_ai_accept_api_memory_banks_ai_assistant_conversation_id_patch.additional_properties = ( + d + ) + return memory_bank_ai_accept_api_memory_banks_ai_assistant_conversation_id_patch_response_memory_bank_ai_accept_api_memory_banks_ai_assistant_conversation_id_patch + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> bool: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: bool) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/memory_bank_ai_assistant_request.py b/seclai/_generated/models/memory_bank_ai_assistant_request.py new file mode 100644 index 0000000..adacf0b --- /dev/null +++ b/seclai/_generated/models/memory_bank_ai_assistant_request.py @@ -0,0 +1,139 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.memory_bank_ai_assistant_request_current_config_type_0 import ( + MemoryBankAiAssistantRequestCurrentConfigType0, + ) + + +T = TypeVar("T", bound="MemoryBankAiAssistantRequest") + + +@_attrs_define +class MemoryBankAiAssistantRequest: + """Request body for the memory bank AI assistant. + + Attributes: + user_input (str): Natural-language description of the memory bank. + conversation_id (None | str | Unset): Previous conversation ID to continue. + current_config (MemoryBankAiAssistantRequestCurrentConfigType0 | None | Unset): Current configuration to refine, + if any. + """ + + user_input: str + conversation_id: None | str | Unset = UNSET + current_config: MemoryBankAiAssistantRequestCurrentConfigType0 | None | Unset = ( + UNSET + ) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.memory_bank_ai_assistant_request_current_config_type_0 import ( + MemoryBankAiAssistantRequestCurrentConfigType0, + ) + + user_input = self.user_input + + conversation_id: None | str | Unset + if isinstance(self.conversation_id, Unset): + conversation_id = UNSET + else: + conversation_id = self.conversation_id + + current_config: dict[str, Any] | None | Unset + if isinstance(self.current_config, Unset): + current_config = UNSET + elif isinstance( + self.current_config, MemoryBankAiAssistantRequestCurrentConfigType0 + ): + current_config = self.current_config.to_dict() + else: + current_config = self.current_config + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "user_input": user_input, + } + ) + if conversation_id is not UNSET: + field_dict["conversation_id"] = conversation_id + if current_config is not UNSET: + field_dict["current_config"] = current_config + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.memory_bank_ai_assistant_request_current_config_type_0 import ( + MemoryBankAiAssistantRequestCurrentConfigType0, + ) + + d = dict(src_dict) + user_input = d.pop("user_input") + + def _parse_conversation_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + conversation_id = _parse_conversation_id(d.pop("conversation_id", UNSET)) + + def _parse_current_config( + data: object, + ) -> MemoryBankAiAssistantRequestCurrentConfigType0 | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + current_config_type_0 = ( + MemoryBankAiAssistantRequestCurrentConfigType0.from_dict(data) + ) + + return current_config_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast( + MemoryBankAiAssistantRequestCurrentConfigType0 | None | Unset, data + ) + + current_config = _parse_current_config(d.pop("current_config", UNSET)) + + memory_bank_ai_assistant_request = cls( + user_input=user_input, + conversation_id=conversation_id, + current_config=current_config, + ) + + memory_bank_ai_assistant_request.additional_properties = d + return memory_bank_ai_assistant_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/memory_bank_ai_assistant_request_current_config_type_0.py b/seclai/_generated/models/memory_bank_ai_assistant_request_current_config_type_0.py new file mode 100644 index 0000000..e33ab51 --- /dev/null +++ b/seclai/_generated/models/memory_bank_ai_assistant_request_current_config_type_0.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="MemoryBankAiAssistantRequestCurrentConfigType0") + + +@_attrs_define +class MemoryBankAiAssistantRequestCurrentConfigType0: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + memory_bank_ai_assistant_request_current_config_type_0 = cls() + + memory_bank_ai_assistant_request_current_config_type_0.additional_properties = d + return memory_bank_ai_assistant_request_current_config_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/memory_bank_ai_assistant_response.py b/seclai/_generated/models/memory_bank_ai_assistant_response.py new file mode 100644 index 0000000..586f602 --- /dev/null +++ b/seclai/_generated/models/memory_bank_ai_assistant_response.py @@ -0,0 +1,165 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.example_prompt import ExamplePrompt + from ..models.memory_bank_config_response import MemoryBankConfigResponse + + +T = TypeVar("T", bound="MemoryBankAiAssistantResponse") + + +@_attrs_define +class MemoryBankAiAssistantResponse: + """Response from the memory bank AI assistant. + + Attributes: + conversation_id (str): Conversation ID for follow-up. + note (str): AI-generated explanation. + config (MemoryBankConfigResponse | None | Unset): Proposed configuration, or null. + example_prompts (list[ExamplePrompt] | Unset): Example natural-language prompts that demonstrate the + capabilities of the memory bank AI assistant. + prompt_call_id (None | str | Unset): Prompt call ID for credit tracking. + success (bool | Unset): Whether generation succeeded. Default: False. + """ + + conversation_id: str + note: str + config: MemoryBankConfigResponse | None | Unset = UNSET + example_prompts: list[ExamplePrompt] | Unset = UNSET + prompt_call_id: None | str | Unset = UNSET + success: bool | Unset = False + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.memory_bank_config_response import MemoryBankConfigResponse + + conversation_id = self.conversation_id + + note = self.note + + config: dict[str, Any] | None | Unset + if isinstance(self.config, Unset): + config = UNSET + elif isinstance(self.config, MemoryBankConfigResponse): + config = self.config.to_dict() + else: + config = self.config + + example_prompts: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.example_prompts, Unset): + example_prompts = [] + for example_prompts_item_data in self.example_prompts: + example_prompts_item = example_prompts_item_data.to_dict() + example_prompts.append(example_prompts_item) + + prompt_call_id: None | str | Unset + if isinstance(self.prompt_call_id, Unset): + prompt_call_id = UNSET + else: + prompt_call_id = self.prompt_call_id + + success = self.success + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "conversation_id": conversation_id, + "note": note, + } + ) + if config is not UNSET: + field_dict["config"] = config + if example_prompts is not UNSET: + field_dict["example_prompts"] = example_prompts + if prompt_call_id is not UNSET: + field_dict["prompt_call_id"] = prompt_call_id + if success is not UNSET: + field_dict["success"] = success + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.example_prompt import ExamplePrompt + from ..models.memory_bank_config_response import MemoryBankConfigResponse + + d = dict(src_dict) + conversation_id = d.pop("conversation_id") + + note = d.pop("note") + + def _parse_config(data: object) -> MemoryBankConfigResponse | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + config_type_0 = MemoryBankConfigResponse.from_dict(data) + + return config_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(MemoryBankConfigResponse | None | Unset, data) + + config = _parse_config(d.pop("config", UNSET)) + + _example_prompts = d.pop("example_prompts", UNSET) + example_prompts: list[ExamplePrompt] | Unset = UNSET + if _example_prompts is not UNSET: + example_prompts = [] + for example_prompts_item_data in _example_prompts: + example_prompts_item = ExamplePrompt.from_dict( + example_prompts_item_data + ) + + example_prompts.append(example_prompts_item) + + def _parse_prompt_call_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + prompt_call_id = _parse_prompt_call_id(d.pop("prompt_call_id", UNSET)) + + success = d.pop("success", UNSET) + + memory_bank_ai_assistant_response = cls( + conversation_id=conversation_id, + note=note, + config=config, + example_prompts=example_prompts, + prompt_call_id=prompt_call_id, + success=success, + ) + + memory_bank_ai_assistant_response.additional_properties = d + return memory_bank_ai_assistant_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/memory_bank_config_response.py b/seclai/_generated/models/memory_bank_config_response.py new file mode 100644 index 0000000..246cdfa --- /dev/null +++ b/seclai/_generated/models/memory_bank_config_response.py @@ -0,0 +1,200 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="MemoryBankConfigResponse") + + +@_attrs_define +class MemoryBankConfigResponse: + """Suggested memory bank configuration from the AI assistant. + + Attributes: + mode (str): Memory bank mode. + name (str): Suggested name. + type_ (str): Memory bank type: conversation or general. + compaction_prompt (None | str | Unset): Suggested compaction prompt. + description (None | str | Unset): Suggested description. + max_age_days (int | None | Unset): Max age in days. + max_size_tokens (int | None | Unset): Max size in tokens. + max_turns (int | None | Unset): Max conversation turns. + retention_days (int | None | Unset): Retention in days. + """ + + mode: str + name: str + type_: str + compaction_prompt: None | str | Unset = UNSET + description: None | str | Unset = UNSET + max_age_days: int | None | Unset = UNSET + max_size_tokens: int | None | Unset = UNSET + max_turns: int | None | Unset = UNSET + retention_days: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + mode = self.mode + + name = self.name + + type_ = self.type_ + + compaction_prompt: None | str | Unset + if isinstance(self.compaction_prompt, Unset): + compaction_prompt = UNSET + else: + compaction_prompt = self.compaction_prompt + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + max_age_days: int | None | Unset + if isinstance(self.max_age_days, Unset): + max_age_days = UNSET + else: + max_age_days = self.max_age_days + + max_size_tokens: int | None | Unset + if isinstance(self.max_size_tokens, Unset): + max_size_tokens = UNSET + else: + max_size_tokens = self.max_size_tokens + + max_turns: int | None | Unset + if isinstance(self.max_turns, Unset): + max_turns = UNSET + else: + max_turns = self.max_turns + + retention_days: int | None | Unset + if isinstance(self.retention_days, Unset): + retention_days = UNSET + else: + retention_days = self.retention_days + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "mode": mode, + "name": name, + "type": type_, + } + ) + if compaction_prompt is not UNSET: + field_dict["compaction_prompt"] = compaction_prompt + if description is not UNSET: + field_dict["description"] = description + if max_age_days is not UNSET: + field_dict["max_age_days"] = max_age_days + if max_size_tokens is not UNSET: + field_dict["max_size_tokens"] = max_size_tokens + if max_turns is not UNSET: + field_dict["max_turns"] = max_turns + if retention_days is not UNSET: + field_dict["retention_days"] = retention_days + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + mode = d.pop("mode") + + name = d.pop("name") + + type_ = d.pop("type") + + def _parse_compaction_prompt(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + compaction_prompt = _parse_compaction_prompt(d.pop("compaction_prompt", UNSET)) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + def _parse_max_age_days(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + max_age_days = _parse_max_age_days(d.pop("max_age_days", UNSET)) + + def _parse_max_size_tokens(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + max_size_tokens = _parse_max_size_tokens(d.pop("max_size_tokens", UNSET)) + + def _parse_max_turns(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + max_turns = _parse_max_turns(d.pop("max_turns", UNSET)) + + def _parse_retention_days(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + retention_days = _parse_retention_days(d.pop("retention_days", UNSET)) + + memory_bank_config_response = cls( + mode=mode, + name=name, + type_=type_, + compaction_prompt=compaction_prompt, + description=description, + max_age_days=max_age_days, + max_size_tokens=max_size_tokens, + max_turns=max_turns, + retention_days=retention_days, + ) + + memory_bank_config_response.additional_properties = d + return memory_bank_config_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/memory_bank_conversation_turn_response.py b/seclai/_generated/models/memory_bank_conversation_turn_response.py new file mode 100644 index 0000000..afb879e --- /dev/null +++ b/seclai/_generated/models/memory_bank_conversation_turn_response.py @@ -0,0 +1,171 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.memory_bank_conversation_turn_response_resulting_config_type_0 import ( + MemoryBankConversationTurnResponseResultingConfigType0, + ) + + +T = TypeVar("T", bound="MemoryBankConversationTurnResponse") + + +@_attrs_define +class MemoryBankConversationTurnResponse: + """A single turn of memory bank AI assistant conversation. + + Attributes: + conversation_id (str): Unique ID for this conversation turn. + user_input (str): User input for this turn. + accepted (bool | None | Unset): Whether the user accepted this proposal. + ai_note (None | str | Unset): AI note from this turn. + resulting_config (MemoryBankConversationTurnResponseResultingConfigType0 | None | Unset): The proposed + configuration from this turn. + """ + + conversation_id: str + user_input: str + accepted: bool | None | Unset = UNSET + ai_note: None | str | Unset = UNSET + resulting_config: ( + MemoryBankConversationTurnResponseResultingConfigType0 | None | Unset + ) = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.memory_bank_conversation_turn_response_resulting_config_type_0 import ( + MemoryBankConversationTurnResponseResultingConfigType0, + ) + + conversation_id = self.conversation_id + + user_input = self.user_input + + accepted: bool | None | Unset + if isinstance(self.accepted, Unset): + accepted = UNSET + else: + accepted = self.accepted + + ai_note: None | str | Unset + if isinstance(self.ai_note, Unset): + ai_note = UNSET + else: + ai_note = self.ai_note + + resulting_config: dict[str, Any] | None | Unset + if isinstance(self.resulting_config, Unset): + resulting_config = UNSET + elif isinstance( + self.resulting_config, + MemoryBankConversationTurnResponseResultingConfigType0, + ): + resulting_config = self.resulting_config.to_dict() + else: + resulting_config = self.resulting_config + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "conversation_id": conversation_id, + "user_input": user_input, + } + ) + if accepted is not UNSET: + field_dict["accepted"] = accepted + if ai_note is not UNSET: + field_dict["ai_note"] = ai_note + if resulting_config is not UNSET: + field_dict["resulting_config"] = resulting_config + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.memory_bank_conversation_turn_response_resulting_config_type_0 import ( + MemoryBankConversationTurnResponseResultingConfigType0, + ) + + d = dict(src_dict) + conversation_id = d.pop("conversation_id") + + user_input = d.pop("user_input") + + def _parse_accepted(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + accepted = _parse_accepted(d.pop("accepted", UNSET)) + + def _parse_ai_note(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + ai_note = _parse_ai_note(d.pop("ai_note", UNSET)) + + def _parse_resulting_config( + data: object, + ) -> MemoryBankConversationTurnResponseResultingConfigType0 | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + resulting_config_type_0 = ( + MemoryBankConversationTurnResponseResultingConfigType0.from_dict( + data + ) + ) + + return resulting_config_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast( + MemoryBankConversationTurnResponseResultingConfigType0 | None | Unset, + data, + ) + + resulting_config = _parse_resulting_config(d.pop("resulting_config", UNSET)) + + memory_bank_conversation_turn_response = cls( + conversation_id=conversation_id, + user_input=user_input, + accepted=accepted, + ai_note=ai_note, + resulting_config=resulting_config, + ) + + memory_bank_conversation_turn_response.additional_properties = d + return memory_bank_conversation_turn_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/memory_bank_conversation_turn_response_resulting_config_type_0.py b/seclai/_generated/models/memory_bank_conversation_turn_response_resulting_config_type_0.py new file mode 100644 index 0000000..fb3e5bf --- /dev/null +++ b/seclai/_generated/models/memory_bank_conversation_turn_response_resulting_config_type_0.py @@ -0,0 +1,48 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="MemoryBankConversationTurnResponseResultingConfigType0") + + +@_attrs_define +class MemoryBankConversationTurnResponseResultingConfigType0: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + memory_bank_conversation_turn_response_resulting_config_type_0 = cls() + + memory_bank_conversation_turn_response_resulting_config_type_0.additional_properties = ( + d + ) + return memory_bank_conversation_turn_response_resulting_config_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/memory_bank_last_conversation_response.py b/seclai/_generated/models/memory_bank_last_conversation_response.py new file mode 100644 index 0000000..70fbd1e --- /dev/null +++ b/seclai/_generated/models/memory_bank_last_conversation_response.py @@ -0,0 +1,156 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.memory_bank_conversation_turn_response import ( + MemoryBankConversationTurnResponse, + ) + + +T = TypeVar("T", bound="MemoryBankLastConversationResponse") + + +@_attrs_define +class MemoryBankLastConversationResponse: + """Response for fetching memory bank conversation history. + + Attributes: + accepted (bool | None | Unset): Whether the user accepted the last proposal. + ai_note (None | str | Unset): AI note from the most recent turn. + total (int | Unset): Total conversation turns. Default: 0. + turns (list[MemoryBankConversationTurnResponse] | Unset): Recent conversation turns (oldest first). + user_input (None | str | Unset): Most recent user input. + """ + + accepted: bool | None | Unset = UNSET + ai_note: None | str | Unset = UNSET + total: int | Unset = 0 + turns: list[MemoryBankConversationTurnResponse] | Unset = UNSET + user_input: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + accepted: bool | None | Unset + if isinstance(self.accepted, Unset): + accepted = UNSET + else: + accepted = self.accepted + + ai_note: None | str | Unset + if isinstance(self.ai_note, Unset): + ai_note = UNSET + else: + ai_note = self.ai_note + + total = self.total + + turns: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.turns, Unset): + turns = [] + for turns_item_data in self.turns: + turns_item = turns_item_data.to_dict() + turns.append(turns_item) + + user_input: None | str | Unset + if isinstance(self.user_input, Unset): + user_input = UNSET + else: + user_input = self.user_input + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if accepted is not UNSET: + field_dict["accepted"] = accepted + if ai_note is not UNSET: + field_dict["ai_note"] = ai_note + if total is not UNSET: + field_dict["total"] = total + if turns is not UNSET: + field_dict["turns"] = turns + if user_input is not UNSET: + field_dict["user_input"] = user_input + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.memory_bank_conversation_turn_response import ( + MemoryBankConversationTurnResponse, + ) + + d = dict(src_dict) + + def _parse_accepted(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + accepted = _parse_accepted(d.pop("accepted", UNSET)) + + def _parse_ai_note(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + ai_note = _parse_ai_note(d.pop("ai_note", UNSET)) + + total = d.pop("total", UNSET) + + _turns = d.pop("turns", UNSET) + turns: list[MemoryBankConversationTurnResponse] | Unset = UNSET + if _turns is not UNSET: + turns = [] + for turns_item_data in _turns: + turns_item = MemoryBankConversationTurnResponse.from_dict( + turns_item_data + ) + + turns.append(turns_item) + + def _parse_user_input(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + user_input = _parse_user_input(d.pop("user_input", UNSET)) + + memory_bank_last_conversation_response = cls( + accepted=accepted, + ai_note=ai_note, + total=total, + turns=turns, + user_input=user_input, + ) + + memory_bank_last_conversation_response.additional_properties = d + return memory_bank_last_conversation_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/memory_bank_list_response_model.py b/seclai/_generated/models/memory_bank_list_response_model.py new file mode 100644 index 0000000..58c9d5c --- /dev/null +++ b/seclai/_generated/models/memory_bank_list_response_model.py @@ -0,0 +1,100 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.memory_bank import MemoryBank + + +T = TypeVar("T", bound="MemoryBankListResponseModel") + + +@_attrs_define +class MemoryBankListResponseModel: + """Paginated list of memory banks. + + Attributes: + limit (int): Items per page. + memory_banks (list[MemoryBank]): List of memory banks on this page. + page (int): Current page number (1-based). + total (int): Total number of memory banks. + """ + + limit: int + memory_banks: list[MemoryBank] + page: int + total: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + limit = self.limit + + memory_banks = [] + for memory_banks_item_data in self.memory_banks: + memory_banks_item = memory_banks_item_data.to_dict() + memory_banks.append(memory_banks_item) + + page = self.page + + total = self.total + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "limit": limit, + "memory_banks": memory_banks, + "page": page, + "total": total, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.memory_bank import MemoryBank + + d = dict(src_dict) + limit = d.pop("limit") + + memory_banks = [] + _memory_banks = d.pop("memory_banks") + for memory_banks_item_data in _memory_banks: + memory_banks_item = MemoryBank.from_dict(memory_banks_item_data) + + memory_banks.append(memory_banks_item) + + page = d.pop("page") + + total = d.pop("total") + + memory_bank_list_response_model = cls( + limit=limit, + memory_banks=memory_banks, + page=page, + total=total, + ) + + memory_bank_list_response_model.additional_properties = d + return memory_bank_list_response_model + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/non_manual_evaluation_mode_stat_response.py b/seclai/_generated/models/non_manual_evaluation_mode_stat_response.py new file mode 100644 index 0000000..e811d5f --- /dev/null +++ b/seclai/_generated/models/non_manual_evaluation_mode_stat_response.py @@ -0,0 +1,110 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="NonManualEvaluationModeStatResponse") + + +@_attrs_define +class NonManualEvaluationModeStatResponse: + """Per-mode rollup for evaluation activity. + + Attributes: + failed (int): + failure_rate (float): + flagged (int): + mode (str): + pass_rate (float): + passed (int): + total (int): + """ + + failed: int + failure_rate: float + flagged: int + mode: str + pass_rate: float + passed: int + total: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + failed = self.failed + + failure_rate = self.failure_rate + + flagged = self.flagged + + mode = self.mode + + pass_rate = self.pass_rate + + passed = self.passed + + total = self.total + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "failed": failed, + "failure_rate": failure_rate, + "flagged": flagged, + "mode": mode, + "pass_rate": pass_rate, + "passed": passed, + "total": total, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + failed = d.pop("failed") + + failure_rate = d.pop("failure_rate") + + flagged = d.pop("flagged") + + mode = d.pop("mode") + + pass_rate = d.pop("pass_rate") + + passed = d.pop("passed") + + total = d.pop("total") + + non_manual_evaluation_mode_stat_response = cls( + failed=failed, + failure_rate=failure_rate, + flagged=flagged, + mode=mode, + pass_rate=pass_rate, + passed=passed, + total=total, + ) + + non_manual_evaluation_mode_stat_response.additional_properties = d + return non_manual_evaluation_mode_stat_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/non_manual_evaluation_summary_response.py b/seclai/_generated/models/non_manual_evaluation_summary_response.py new file mode 100644 index 0000000..d760e08 --- /dev/null +++ b/seclai/_generated/models/non_manual_evaluation_summary_response.py @@ -0,0 +1,130 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.non_manual_evaluation_mode_stat_response import ( + NonManualEvaluationModeStatResponse, + ) + + +T = TypeVar("T", bound="NonManualEvaluationSummaryResponse") + + +@_attrs_define +class NonManualEvaluationSummaryResponse: + """Account-level summary for evaluations. + + Attributes: + by_mode (list[NonManualEvaluationModeStatResponse]): + failed (int): + failure_rate (float): + flagged (int): + pass_rate (float): + passed (int): + total (int): + """ + + by_mode: list[NonManualEvaluationModeStatResponse] + failed: int + failure_rate: float + flagged: int + pass_rate: float + passed: int + total: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + by_mode = [] + for by_mode_item_data in self.by_mode: + by_mode_item = by_mode_item_data.to_dict() + by_mode.append(by_mode_item) + + failed = self.failed + + failure_rate = self.failure_rate + + flagged = self.flagged + + pass_rate = self.pass_rate + + passed = self.passed + + total = self.total + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "by_mode": by_mode, + "failed": failed, + "failure_rate": failure_rate, + "flagged": flagged, + "pass_rate": pass_rate, + "passed": passed, + "total": total, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.non_manual_evaluation_mode_stat_response import ( + NonManualEvaluationModeStatResponse, + ) + + d = dict(src_dict) + by_mode = [] + _by_mode = d.pop("by_mode") + for by_mode_item_data in _by_mode: + by_mode_item = NonManualEvaluationModeStatResponse.from_dict( + by_mode_item_data + ) + + by_mode.append(by_mode_item) + + failed = d.pop("failed") + + failure_rate = d.pop("failure_rate") + + flagged = d.pop("flagged") + + pass_rate = d.pop("pass_rate") + + passed = d.pop("passed") + + total = d.pop("total") + + non_manual_evaluation_summary_response = cls( + by_mode=by_mode, + failed=failed, + failure_rate=failure_rate, + flagged=flagged, + pass_rate=pass_rate, + passed=passed, + total=total, + ) + + non_manual_evaluation_summary_response.additional_properties = d + return non_manual_evaluation_summary_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/organization_alert_preference_list_response.py b/seclai/_generated/models/organization_alert_preference_list_response.py new file mode 100644 index 0000000..63a2215 --- /dev/null +++ b/seclai/_generated/models/organization_alert_preference_list_response.py @@ -0,0 +1,89 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.organization_alert_preference_response import ( + OrganizationAlertPreferenceResponse, + ) + + +T = TypeVar("T", bound="OrganizationAlertPreferenceListResponse") + + +@_attrs_define +class OrganizationAlertPreferenceListResponse: + """ + Attributes: + preferences (list[OrganizationAlertPreferenceResponse]): + total (int): + """ + + preferences: list[OrganizationAlertPreferenceResponse] + total: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + preferences = [] + for preferences_item_data in self.preferences: + preferences_item = preferences_item_data.to_dict() + preferences.append(preferences_item) + + total = self.total + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "preferences": preferences, + "total": total, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.organization_alert_preference_response import ( + OrganizationAlertPreferenceResponse, + ) + + d = dict(src_dict) + preferences = [] + _preferences = d.pop("preferences") + for preferences_item_data in _preferences: + preferences_item = OrganizationAlertPreferenceResponse.from_dict( + preferences_item_data + ) + + preferences.append(preferences_item) + + total = d.pop("total") + + organization_alert_preference_list_response = cls( + preferences=preferences, + total=total, + ) + + organization_alert_preference_list_response.additional_properties = d + return organization_alert_preference_list_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/organization_alert_preference_response.py b/seclai/_generated/models/organization_alert_preference_response.py new file mode 100644 index 0000000..1a8fdd4 --- /dev/null +++ b/seclai/_generated/models/organization_alert_preference_response.py @@ -0,0 +1,85 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="OrganizationAlertPreferenceResponse") + + +@_attrs_define +class OrganizationAlertPreferenceResponse: + """ + Attributes: + alert_type (str): + is_override (bool): + organization_id (str): + subscribed (bool): + """ + + alert_type: str + is_override: bool + organization_id: str + subscribed: bool + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + alert_type = self.alert_type + + is_override = self.is_override + + organization_id = self.organization_id + + subscribed = self.subscribed + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "alert_type": alert_type, + "is_override": is_override, + "organization_id": organization_id, + "subscribed": subscribed, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + alert_type = d.pop("alert_type") + + is_override = d.pop("is_override") + + organization_id = d.pop("organization_id") + + subscribed = d.pop("subscribed") + + organization_alert_preference_response = cls( + alert_type=alert_type, + is_override=is_override, + organization_id=organization_id, + subscribed=subscribed, + ) + + organization_alert_preference_response.additional_properties = d + return organization_alert_preference_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/organization_info_response.py b/seclai/_generated/models/organization_info_response.py new file mode 100644 index 0000000..4a8ece7 --- /dev/null +++ b/seclai/_generated/models/organization_info_response.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="OrganizationInfoResponse") + + +@_attrs_define +class OrganizationInfoResponse: + """ + Attributes: + account_id (UUID): + id (UUID): + name (str): + """ + + account_id: UUID + id: UUID + name: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + account_id = str(self.account_id) + + id = str(self.id) + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "account_id": account_id, + "id": id, + "name": name, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + account_id = UUID(d.pop("account_id")) + + id = UUID(d.pop("id")) + + name = d.pop("name") + + organization_info_response = cls( + account_id=account_id, + id=id, + name=name, + ) + + organization_info_response.additional_properties = d + return organization_info_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/prompt_model_auto_upgrade_strategy.py b/seclai/_generated/models/prompt_model_auto_upgrade_strategy.py new file mode 100644 index 0000000..24b8327 --- /dev/null +++ b/seclai/_generated/models/prompt_model_auto_upgrade_strategy.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class PromptModelAutoUpgradeStrategy(str, Enum): + CAUTIOUS_ADOPTER = "cautious_adopter" + EARLY_ADOPTER = "early_adopter" + MIDDLE_OF_ROAD = "middle_of_road" + NONE = "none" + + def __str__(self) -> str: + return str(self.value) diff --git a/seclai/_generated/models/proposed_action_response.py b/seclai/_generated/models/proposed_action_response.py new file mode 100644 index 0000000..733a169 --- /dev/null +++ b/seclai/_generated/models/proposed_action_response.py @@ -0,0 +1,97 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.proposed_action_response_params import ProposedActionResponseParams + + +T = TypeVar("T", bound="ProposedActionResponse") + + +@_attrs_define +class ProposedActionResponse: + """A single proposed action. + + Attributes: + action_type (str): Type of the proposed action. + description (str): Human-readable description of the action. + params (ProposedActionResponseParams): Parameters for the action. + is_destructive (bool | Unset): Whether the action is destructive. Default: False. + """ + + action_type: str + description: str + params: ProposedActionResponseParams + is_destructive: bool | Unset = False + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + action_type = self.action_type + + description = self.description + + params = self.params.to_dict() + + is_destructive = self.is_destructive + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "action_type": action_type, + "description": description, + "params": params, + } + ) + if is_destructive is not UNSET: + field_dict["is_destructive"] = is_destructive + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.proposed_action_response_params import ( + ProposedActionResponseParams, + ) + + d = dict(src_dict) + action_type = d.pop("action_type") + + description = d.pop("description") + + params = ProposedActionResponseParams.from_dict(d.pop("params")) + + is_destructive = d.pop("is_destructive", UNSET) + + proposed_action_response = cls( + action_type=action_type, + description=description, + params=params, + is_destructive=is_destructive, + ) + + proposed_action_response.additional_properties = d + return proposed_action_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/proposed_action_response_params.py b/seclai/_generated/models/proposed_action_response_params.py new file mode 100644 index 0000000..411d7ab --- /dev/null +++ b/seclai/_generated/models/proposed_action_response_params.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ProposedActionResponseParams") + + +@_attrs_define +class ProposedActionResponseParams: + """Parameters for the action.""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + proposed_action_response_params = cls() + + proposed_action_response_params.additional_properties = d + return proposed_action_response_params + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/proposed_policy_action_response.py b/seclai/_generated/models/proposed_policy_action_response.py new file mode 100644 index 0000000..2a67b06 --- /dev/null +++ b/seclai/_generated/models/proposed_policy_action_response.py @@ -0,0 +1,88 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.proposed_policy_action_response_params import ( + ProposedPolicyActionResponseParams, + ) + + +T = TypeVar("T", bound="ProposedPolicyActionResponse") + + +@_attrs_define +class ProposedPolicyActionResponse: + """A single proposed governance policy action. + + Attributes: + action_type (str): Type of action: create, update, delete, enable, or disable. + description (str): Human-readable description of what this action will do. + params (ProposedPolicyActionResponseParams): Parameters for the action (e.g. policy_document_id, thresholds). + """ + + action_type: str + description: str + params: ProposedPolicyActionResponseParams + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + action_type = self.action_type + + description = self.description + + params = self.params.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "action_type": action_type, + "description": description, + "params": params, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.proposed_policy_action_response_params import ( + ProposedPolicyActionResponseParams, + ) + + d = dict(src_dict) + action_type = d.pop("action_type") + + description = d.pop("description") + + params = ProposedPolicyActionResponseParams.from_dict(d.pop("params")) + + proposed_policy_action_response = cls( + action_type=action_type, + description=description, + params=params, + ) + + proposed_policy_action_response.additional_properties = d + return proposed_policy_action_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/proposed_policy_action_response_params.py b/seclai/_generated/models/proposed_policy_action_response_params.py new file mode 100644 index 0000000..182db68 --- /dev/null +++ b/seclai/_generated/models/proposed_policy_action_response_params.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ProposedPolicyActionResponseParams") + + +@_attrs_define +class ProposedPolicyActionResponseParams: + """Parameters for the action (e.g. policy_document_id, thresholds).""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + proposed_policy_action_response_params = cls() + + proposed_policy_action_response_params.additional_properties = d + return proposed_policy_action_response_params + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/search_api_search_get_response_search_api_search_get.py b/seclai/_generated/models/search_api_search_get_response_search_api_search_get.py new file mode 100644 index 0000000..225508d --- /dev/null +++ b/seclai/_generated/models/search_api_search_get_response_search_api_search_get.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SearchApiSearchGetResponseSearchApiSearchGet") + + +@_attrs_define +class SearchApiSearchGetResponseSearchApiSearchGet: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + search_api_search_get_response_search_api_search_get = cls() + + search_api_search_get_response_search_api_search_get.additional_properties = d + return search_api_search_get_response_search_api_search_get + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/solution_agent_response.py b/seclai/_generated/models/solution_agent_response.py new file mode 100644 index 0000000..f2cc973 --- /dev/null +++ b/seclai/_generated/models/solution_agent_response.py @@ -0,0 +1,93 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SolutionAgentResponse") + + +@_attrs_define +class SolutionAgentResponse: + """ + Attributes: + id (UUID): + name (str): + knowledge_base_ids (list[UUID] | Unset): Knowledge base IDs connected to this agent via triggers. + """ + + id: UUID + name: str + knowledge_base_ids: list[UUID] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = str(self.id) + + name = self.name + + knowledge_base_ids: list[str] | Unset = UNSET + if not isinstance(self.knowledge_base_ids, Unset): + knowledge_base_ids = [] + for knowledge_base_ids_item_data in self.knowledge_base_ids: + knowledge_base_ids_item = str(knowledge_base_ids_item_data) + knowledge_base_ids.append(knowledge_base_ids_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + } + ) + if knowledge_base_ids is not UNSET: + field_dict["knowledge_base_ids"] = knowledge_base_ids + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = UUID(d.pop("id")) + + name = d.pop("name") + + _knowledge_base_ids = d.pop("knowledge_base_ids", UNSET) + knowledge_base_ids: list[UUID] | Unset = UNSET + if _knowledge_base_ids is not UNSET: + knowledge_base_ids = [] + for knowledge_base_ids_item_data in _knowledge_base_ids: + knowledge_base_ids_item = UUID(knowledge_base_ids_item_data) + + knowledge_base_ids.append(knowledge_base_ids_item) + + solution_agent_response = cls( + id=id, + name=name, + knowledge_base_ids=knowledge_base_ids, + ) + + solution_agent_response.additional_properties = d + return solution_agent_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/solution_conversation_response.py b/seclai/_generated/models/solution_conversation_response.py new file mode 100644 index 0000000..f383d0b --- /dev/null +++ b/seclai/_generated/models/solution_conversation_response.py @@ -0,0 +1,153 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.solution_conversation_response_actions_taken_type_0 import ( + SolutionConversationResponseActionsTakenType0, + ) + + +T = TypeVar("T", bound="SolutionConversationResponse") + + +@_attrs_define +class SolutionConversationResponse: + """Response model for a conversation turn. + + Attributes: + accepted (bool | None): Whether the suggestion was accepted or declined. + actions_taken (None | SolutionConversationResponseActionsTakenType0): Actions taken by the AI. + ai_response (None | str): AI response text. + created_at (str): Timestamp when the conversation was created. + id (UUID): Unique identifier for the conversation turn. + user_input (str): User input text. + """ + + accepted: bool | None + actions_taken: None | SolutionConversationResponseActionsTakenType0 + ai_response: None | str + created_at: str + id: UUID + user_input: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.solution_conversation_response_actions_taken_type_0 import ( + SolutionConversationResponseActionsTakenType0, + ) + + accepted: bool | None + accepted = self.accepted + + actions_taken: dict[str, Any] | None + if isinstance( + self.actions_taken, SolutionConversationResponseActionsTakenType0 + ): + actions_taken = self.actions_taken.to_dict() + else: + actions_taken = self.actions_taken + + ai_response: None | str + ai_response = self.ai_response + + created_at = self.created_at + + id = str(self.id) + + user_input = self.user_input + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "accepted": accepted, + "actions_taken": actions_taken, + "ai_response": ai_response, + "created_at": created_at, + "id": id, + "user_input": user_input, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.solution_conversation_response_actions_taken_type_0 import ( + SolutionConversationResponseActionsTakenType0, + ) + + d = dict(src_dict) + + def _parse_accepted(data: object) -> bool | None: + if data is None: + return data + return cast(bool | None, data) + + accepted = _parse_accepted(d.pop("accepted")) + + def _parse_actions_taken( + data: object, + ) -> None | SolutionConversationResponseActionsTakenType0: + if data is None: + return data + try: + if not isinstance(data, dict): + raise TypeError() + actions_taken_type_0 = ( + SolutionConversationResponseActionsTakenType0.from_dict(data) + ) + + return actions_taken_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | SolutionConversationResponseActionsTakenType0, data) + + actions_taken = _parse_actions_taken(d.pop("actions_taken")) + + def _parse_ai_response(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + ai_response = _parse_ai_response(d.pop("ai_response")) + + created_at = d.pop("created_at") + + id = UUID(d.pop("id")) + + user_input = d.pop("user_input") + + solution_conversation_response = cls( + accepted=accepted, + actions_taken=actions_taken, + ai_response=ai_response, + created_at=created_at, + id=id, + user_input=user_input, + ) + + solution_conversation_response.additional_properties = d + return solution_conversation_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/solution_conversation_response_actions_taken_type_0.py b/seclai/_generated/models/solution_conversation_response_actions_taken_type_0.py new file mode 100644 index 0000000..dbbbb93 --- /dev/null +++ b/seclai/_generated/models/solution_conversation_response_actions_taken_type_0.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SolutionConversationResponseActionsTakenType0") + + +@_attrs_define +class SolutionConversationResponseActionsTakenType0: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + solution_conversation_response_actions_taken_type_0 = cls() + + solution_conversation_response_actions_taken_type_0.additional_properties = d + return solution_conversation_response_actions_taken_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/solution_knowledge_base_response.py b/seclai/_generated/models/solution_knowledge_base_response.py new file mode 100644 index 0000000..50c126c --- /dev/null +++ b/seclai/_generated/models/solution_knowledge_base_response.py @@ -0,0 +1,93 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SolutionKnowledgeBaseResponse") + + +@_attrs_define +class SolutionKnowledgeBaseResponse: + """ + Attributes: + id (UUID): + name (str): + source_connection_ids (list[UUID] | Unset): Source connection IDs linked to this knowledge base. + """ + + id: UUID + name: str + source_connection_ids: list[UUID] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = str(self.id) + + name = self.name + + source_connection_ids: list[str] | Unset = UNSET + if not isinstance(self.source_connection_ids, Unset): + source_connection_ids = [] + for source_connection_ids_item_data in self.source_connection_ids: + source_connection_ids_item = str(source_connection_ids_item_data) + source_connection_ids.append(source_connection_ids_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + } + ) + if source_connection_ids is not UNSET: + field_dict["source_connection_ids"] = source_connection_ids + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = UUID(d.pop("id")) + + name = d.pop("name") + + _source_connection_ids = d.pop("source_connection_ids", UNSET) + source_connection_ids: list[UUID] | Unset = UNSET + if _source_connection_ids is not UNSET: + source_connection_ids = [] + for source_connection_ids_item_data in _source_connection_ids: + source_connection_ids_item = UUID(source_connection_ids_item_data) + + source_connection_ids.append(source_connection_ids_item) + + solution_knowledge_base_response = cls( + id=id, + name=name, + source_connection_ids=source_connection_ids, + ) + + solution_knowledge_base_response.additional_properties = d + return solution_knowledge_base_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/solution_list_response.py b/seclai/_generated/models/solution_list_response.py new file mode 100644 index 0000000..a32f88b --- /dev/null +++ b/seclai/_generated/models/solution_list_response.py @@ -0,0 +1,86 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.pagination_response import PaginationResponse + from ..models.solution_summary_response import SolutionSummaryResponse + + +T = TypeVar("T", bound="SolutionListResponse") + + +@_attrs_define +class SolutionListResponse: + """Response model for paginated solution list. + + Attributes: + data (list[SolutionSummaryResponse]): + pagination (PaginationResponse): Pagination information. + """ + + data: list[SolutionSummaryResponse] + pagination: PaginationResponse + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + pagination = self.pagination.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + "pagination": pagination, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.pagination_response import PaginationResponse + from ..models.solution_summary_response import SolutionSummaryResponse + + d = dict(src_dict) + data = [] + _data = d.pop("data") + for data_item_data in _data: + data_item = SolutionSummaryResponse.from_dict(data_item_data) + + data.append(data_item) + + pagination = PaginationResponse.from_dict(d.pop("pagination")) + + solution_list_response = cls( + data=data, + pagination=pagination, + ) + + solution_list_response.additional_properties = d + return solution_list_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/solution_response.py b/seclai/_generated/models/solution_response.py new file mode 100644 index 0000000..5fba4d9 --- /dev/null +++ b/seclai/_generated/models/solution_response.py @@ -0,0 +1,163 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.solution_agent_response import SolutionAgentResponse + from ..models.solution_knowledge_base_response import SolutionKnowledgeBaseResponse + from ..models.solution_source_connection_response import ( + SolutionSourceConnectionResponse, + ) + + +T = TypeVar("T", bound="SolutionResponse") + + +@_attrs_define +class SolutionResponse: + """Response model for solution data. + + Attributes: + agents (list[SolutionAgentResponse]): Agents linked to the solution. + created_at (str): Timestamp when the solution was created. + description (str): Description of the solution. + id (UUID): Unique identifier for the solution. + knowledge_bases (list[SolutionKnowledgeBaseResponse]): Knowledge bases linked to the solution. + name (str): Name of the solution. + source_connections (list[SolutionSourceConnectionResponse]): Source connections linked to the solution. + updated_at (str): Timestamp when the solution was last updated. + """ + + agents: list[SolutionAgentResponse] + created_at: str + description: str + id: UUID + knowledge_bases: list[SolutionKnowledgeBaseResponse] + name: str + source_connections: list[SolutionSourceConnectionResponse] + updated_at: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + agents = [] + for agents_item_data in self.agents: + agents_item = agents_item_data.to_dict() + agents.append(agents_item) + + created_at = self.created_at + + description = self.description + + id = str(self.id) + + knowledge_bases = [] + for knowledge_bases_item_data in self.knowledge_bases: + knowledge_bases_item = knowledge_bases_item_data.to_dict() + knowledge_bases.append(knowledge_bases_item) + + name = self.name + + source_connections = [] + for source_connections_item_data in self.source_connections: + source_connections_item = source_connections_item_data.to_dict() + source_connections.append(source_connections_item) + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "agents": agents, + "created_at": created_at, + "description": description, + "id": id, + "knowledge_bases": knowledge_bases, + "name": name, + "source_connections": source_connections, + "updated_at": updated_at, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.solution_agent_response import SolutionAgentResponse + from ..models.solution_knowledge_base_response import ( + SolutionKnowledgeBaseResponse, + ) + from ..models.solution_source_connection_response import ( + SolutionSourceConnectionResponse, + ) + + d = dict(src_dict) + agents = [] + _agents = d.pop("agents") + for agents_item_data in _agents: + agents_item = SolutionAgentResponse.from_dict(agents_item_data) + + agents.append(agents_item) + + created_at = d.pop("created_at") + + description = d.pop("description") + + id = UUID(d.pop("id")) + + knowledge_bases = [] + _knowledge_bases = d.pop("knowledge_bases") + for knowledge_bases_item_data in _knowledge_bases: + knowledge_bases_item = SolutionKnowledgeBaseResponse.from_dict( + knowledge_bases_item_data + ) + + knowledge_bases.append(knowledge_bases_item) + + name = d.pop("name") + + source_connections = [] + _source_connections = d.pop("source_connections") + for source_connections_item_data in _source_connections: + source_connections_item = SolutionSourceConnectionResponse.from_dict( + source_connections_item_data + ) + + source_connections.append(source_connections_item) + + updated_at = d.pop("updated_at") + + solution_response = cls( + agents=agents, + created_at=created_at, + description=description, + id=id, + knowledge_bases=knowledge_bases, + name=name, + source_connections=source_connections, + updated_at=updated_at, + ) + + solution_response.additional_properties = d + return solution_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/solution_source_connection_response.py b/seclai/_generated/models/solution_source_connection_response.py new file mode 100644 index 0000000..679c190 --- /dev/null +++ b/seclai/_generated/models/solution_source_connection_response.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SolutionSourceConnectionResponse") + + +@_attrs_define +class SolutionSourceConnectionResponse: + """ + Attributes: + id (UUID): + name (str): + """ + + id: UUID + name: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = str(self.id) + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = UUID(d.pop("id")) + + name = d.pop("name") + + solution_source_connection_response = cls( + id=id, + name=name, + ) + + solution_source_connection_response.additional_properties = d + return solution_source_connection_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/solution_summary_response.py b/seclai/_generated/models/solution_summary_response.py new file mode 100644 index 0000000..4b6f326 --- /dev/null +++ b/seclai/_generated/models/solution_summary_response.py @@ -0,0 +1,127 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SolutionSummaryResponse") + + +@_attrs_define +class SolutionSummaryResponse: + """Response model for solution summary. + + Attributes: + agent_count (int): Number of linked agents. + created_at (str): Timestamp when the solution was created. + description (str): Description of the solution. + id (UUID): Unique identifier for the solution. + knowledge_base_count (int): Number of linked knowledge bases. + memory_bank_count (int): Number of linked memory banks. + name (str): Name of the solution. + source_connection_count (int): Number of linked source connections. + updated_at (str): Timestamp when the solution was last updated. + """ + + agent_count: int + created_at: str + description: str + id: UUID + knowledge_base_count: int + memory_bank_count: int + name: str + source_connection_count: int + updated_at: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + agent_count = self.agent_count + + created_at = self.created_at + + description = self.description + + id = str(self.id) + + knowledge_base_count = self.knowledge_base_count + + memory_bank_count = self.memory_bank_count + + name = self.name + + source_connection_count = self.source_connection_count + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "agent_count": agent_count, + "created_at": created_at, + "description": description, + "id": id, + "knowledge_base_count": knowledge_base_count, + "memory_bank_count": memory_bank_count, + "name": name, + "source_connection_count": source_connection_count, + "updated_at": updated_at, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + agent_count = d.pop("agent_count") + + created_at = d.pop("created_at") + + description = d.pop("description") + + id = UUID(d.pop("id")) + + knowledge_base_count = d.pop("knowledge_base_count") + + memory_bank_count = d.pop("memory_bank_count") + + name = d.pop("name") + + source_connection_count = d.pop("source_connection_count") + + updated_at = d.pop("updated_at") + + solution_summary_response = cls( + agent_count=agent_count, + created_at=created_at, + description=description, + id=id, + knowledge_base_count=knowledge_base_count, + memory_bank_count=memory_bank_count, + name=name, + source_connection_count=source_connection_count, + updated_at=updated_at, + ) + + solution_summary_response.additional_properties = d + return solution_summary_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/source_connection_response_model.py b/seclai/_generated/models/source_connection_response_model.py new file mode 100644 index 0000000..9262d23 --- /dev/null +++ b/seclai/_generated/models/source_connection_response_model.py @@ -0,0 +1,108 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SourceConnectionResponseModel") + + +@_attrs_define +class SourceConnectionResponseModel: + """Nested source connection summary within a knowledge base response. + + Attributes: + id (str): Source connection identifier. + name (str): Source connection name. + source_type (str): Type of source (rss, website, etc.). + url (str): Source URL. + polling (None | str | Unset): Polling configuration. + """ + + id: str + name: str + source_type: str + url: str + polling: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + source_type = self.source_type + + url = self.url + + polling: None | str | Unset + if isinstance(self.polling, Unset): + polling = UNSET + else: + polling = self.polling + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + "source_type": source_type, + "url": url, + } + ) + if polling is not UNSET: + field_dict["polling"] = polling + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id") + + name = d.pop("name") + + source_type = d.pop("source_type") + + url = d.pop("url") + + def _parse_polling(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + polling = _parse_polling(d.pop("polling", UNSET)) + + source_connection_response_model = cls( + id=id, + name=name, + source_type=source_type, + url=url, + polling=polling, + ) + + source_connection_response_model.additional_properties = d + return source_connection_response_model + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/source_embedding_migration_response.py b/seclai/_generated/models/source_embedding_migration_response.py new file mode 100644 index 0000000..a5a1c20 --- /dev/null +++ b/seclai/_generated/models/source_embedding_migration_response.py @@ -0,0 +1,249 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SourceEmbeddingMigrationResponse") + + +@_attrs_define +class SourceEmbeddingMigrationResponse: + """Response model for source embedding migration status. + + Attributes: + completed_at (None | str): + created_at (str): + failure_message (None | str): + id (str): + notification_recipients (list[str] | None): + phase (str): + progress_current (int): + progress_message (None | str): + progress_total (int): + source_connection_id (str): + source_id_new (str): + source_id_old (str): + started_at (None | str): + status (str): + target_dimensions (int): + target_embedding_model (str): + task_execution_id (None | str): + updated_at (str): + """ + + completed_at: None | str + created_at: str + failure_message: None | str + id: str + notification_recipients: list[str] | None + phase: str + progress_current: int + progress_message: None | str + progress_total: int + source_connection_id: str + source_id_new: str + source_id_old: str + started_at: None | str + status: str + target_dimensions: int + target_embedding_model: str + task_execution_id: None | str + updated_at: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + completed_at: None | str + completed_at = self.completed_at + + created_at = self.created_at + + failure_message: None | str + failure_message = self.failure_message + + id = self.id + + notification_recipients: list[str] | None + if isinstance(self.notification_recipients, list): + notification_recipients = self.notification_recipients + + else: + notification_recipients = self.notification_recipients + + phase = self.phase + + progress_current = self.progress_current + + progress_message: None | str + progress_message = self.progress_message + + progress_total = self.progress_total + + source_connection_id = self.source_connection_id + + source_id_new = self.source_id_new + + source_id_old = self.source_id_old + + started_at: None | str + started_at = self.started_at + + status = self.status + + target_dimensions = self.target_dimensions + + target_embedding_model = self.target_embedding_model + + task_execution_id: None | str + task_execution_id = self.task_execution_id + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "completed_at": completed_at, + "created_at": created_at, + "failure_message": failure_message, + "id": id, + "notification_recipients": notification_recipients, + "phase": phase, + "progress_current": progress_current, + "progress_message": progress_message, + "progress_total": progress_total, + "source_connection_id": source_connection_id, + "source_id_new": source_id_new, + "source_id_old": source_id_old, + "started_at": started_at, + "status": status, + "target_dimensions": target_dimensions, + "target_embedding_model": target_embedding_model, + "task_execution_id": task_execution_id, + "updated_at": updated_at, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_completed_at(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + completed_at = _parse_completed_at(d.pop("completed_at")) + + created_at = d.pop("created_at") + + def _parse_failure_message(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + failure_message = _parse_failure_message(d.pop("failure_message")) + + id = d.pop("id") + + def _parse_notification_recipients(data: object) -> list[str] | None: + if data is None: + return data + try: + if not isinstance(data, list): + raise TypeError() + notification_recipients_type_0 = cast(list[str], data) + + return notification_recipients_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None, data) + + notification_recipients = _parse_notification_recipients( + d.pop("notification_recipients") + ) + + phase = d.pop("phase") + + progress_current = d.pop("progress_current") + + def _parse_progress_message(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + progress_message = _parse_progress_message(d.pop("progress_message")) + + progress_total = d.pop("progress_total") + + source_connection_id = d.pop("source_connection_id") + + source_id_new = d.pop("source_id_new") + + source_id_old = d.pop("source_id_old") + + def _parse_started_at(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + started_at = _parse_started_at(d.pop("started_at")) + + status = d.pop("status") + + target_dimensions = d.pop("target_dimensions") + + target_embedding_model = d.pop("target_embedding_model") + + def _parse_task_execution_id(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + task_execution_id = _parse_task_execution_id(d.pop("task_execution_id")) + + updated_at = d.pop("updated_at") + + source_embedding_migration_response = cls( + completed_at=completed_at, + created_at=created_at, + failure_message=failure_message, + id=id, + notification_recipients=notification_recipients, + phase=phase, + progress_current=progress_current, + progress_message=progress_message, + progress_total=progress_total, + source_connection_id=source_connection_id, + source_id_new=source_id_new, + source_id_old=source_id_old, + started_at=started_at, + status=status, + target_dimensions=target_dimensions, + target_embedding_model=target_embedding_model, + task_execution_id=task_execution_id, + updated_at=updated_at, + ) + + source_embedding_migration_response.additional_properties = d + return source_embedding_migration_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/source_response.py b/seclai/_generated/models/source_response.py index fc9d4f9..b5c7e0b 100644 --- a/seclai/_generated/models/source_response.py +++ b/seclai/_generated/models/source_response.py @@ -42,8 +42,11 @@ class SourceResponse: dimensions (int | None | Unset): Dimensions of the embedding model. embedding_model (None | str | Unset): Embedding model used for the source connection. embedding_model_type (None | str | Unset): Type of the embedding model. + free_retention_days (int | None | Unset): Number of days content is stored for free before billing applies. has_historical_data (bool | Unset): Indicates if the source connection has historical data. Default: False. readonly (bool | Unset): Indicates if the source connection is read-only. Default: False. + system_managed (bool | Unset): Indicates if this source is automatically managed by the system (e.g., agent + traces). Default: False. """ account_id: UUID @@ -71,8 +74,10 @@ class SourceResponse: dimensions: int | None | Unset = UNSET embedding_model: None | str | Unset = UNSET embedding_model_type: None | str | Unset = UNSET + free_retention_days: int | None | Unset = UNSET has_historical_data: bool | Unset = False readonly: bool | Unset = False + system_managed: bool | Unset = False additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -173,10 +178,18 @@ def to_dict(self) -> dict[str, Any]: else: embedding_model_type = self.embedding_model_type + free_retention_days: int | None | Unset + if isinstance(self.free_retention_days, Unset): + free_retention_days = UNSET + else: + free_retention_days = self.free_retention_days + has_historical_data = self.has_historical_data readonly = self.readonly + system_managed = self.system_managed + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -219,10 +232,14 @@ def to_dict(self) -> dict[str, Any]: field_dict["embedding_model"] = embedding_model if embedding_model_type is not UNSET: field_dict["embedding_model_type"] = embedding_model_type + if free_retention_days is not UNSET: + field_dict["free_retention_days"] = free_retention_days if has_historical_data is not UNSET: field_dict["has_historical_data"] = has_historical_data if readonly is not UNSET: field_dict["readonly"] = readonly + if system_managed is not UNSET: + field_dict["system_managed"] = system_managed return field_dict @@ -392,10 +409,23 @@ def _parse_embedding_model_type(data: object) -> None | str | Unset: d.pop("embedding_model_type", UNSET) ) + def _parse_free_retention_days(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + free_retention_days = _parse_free_retention_days( + d.pop("free_retention_days", UNSET) + ) + has_historical_data = d.pop("has_historical_data", UNSET) readonly = d.pop("readonly", UNSET) + system_managed = d.pop("system_managed", UNSET) + source_response = cls( account_id=account_id, content_filter=content_filter, @@ -422,8 +452,10 @@ def _parse_embedding_model_type(data: object) -> None | str | Unset: dimensions=dimensions, embedding_model=embedding_model, embedding_model_type=embedding_model_type, + free_retention_days=free_retention_days, has_historical_data=has_historical_data, readonly=readonly, + system_managed=system_managed, ) source_response.additional_properties = d diff --git a/seclai/_generated/models/standalone_test_compaction_request.py b/seclai/_generated/models/standalone_test_compaction_request.py new file mode 100644 index 0000000..b26dad6 --- /dev/null +++ b/seclai/_generated/models/standalone_test_compaction_request.py @@ -0,0 +1,141 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="StandaloneTestCompactionRequest") + + +@_attrs_define +class StandaloneTestCompactionRequest: + """Request body for testing a compaction prompt *without* an existing bank. + + Used on the create-memory-bank page where no bank ID exists yet. + ``compaction_prompt`` is required (no bank to fall back to). + Content must come from ``sample_entries`` or ``generate_direction`` + (no existing entries to fetch). + + Attributes: + compaction_prompt (str): Compaction prompt to test. + bank_type (str | Unset): Memory bank type ('conversation' or 'general') — controls the style of generated + entries. Default: 'conversation'. + entry_count (int | Unset): Number of entries to generate when using generate_direction. Default: 5. + generate_direction (None | str | Unset): Direction for the LLM to generate sample entries. + sample_entries (list[str] | None | Unset): Explicit sample entries to compact. + """ + + compaction_prompt: str + bank_type: str | Unset = "conversation" + entry_count: int | Unset = 5 + generate_direction: None | str | Unset = UNSET + sample_entries: list[str] | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + compaction_prompt = self.compaction_prompt + + bank_type = self.bank_type + + entry_count = self.entry_count + + generate_direction: None | str | Unset + if isinstance(self.generate_direction, Unset): + generate_direction = UNSET + else: + generate_direction = self.generate_direction + + sample_entries: list[str] | None | Unset + if isinstance(self.sample_entries, Unset): + sample_entries = UNSET + elif isinstance(self.sample_entries, list): + sample_entries = self.sample_entries + + else: + sample_entries = self.sample_entries + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "compaction_prompt": compaction_prompt, + } + ) + if bank_type is not UNSET: + field_dict["bank_type"] = bank_type + if entry_count is not UNSET: + field_dict["entry_count"] = entry_count + if generate_direction is not UNSET: + field_dict["generate_direction"] = generate_direction + if sample_entries is not UNSET: + field_dict["sample_entries"] = sample_entries + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + compaction_prompt = d.pop("compaction_prompt") + + bank_type = d.pop("bank_type", UNSET) + + entry_count = d.pop("entry_count", UNSET) + + def _parse_generate_direction(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + generate_direction = _parse_generate_direction( + d.pop("generate_direction", UNSET) + ) + + def _parse_sample_entries(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + sample_entries_type_0 = cast(list[str], data) + + return sample_entries_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + sample_entries = _parse_sample_entries(d.pop("sample_entries", UNSET)) + + standalone_test_compaction_request = cls( + compaction_prompt=compaction_prompt, + bank_type=bank_type, + entry_count=entry_count, + generate_direction=generate_direction, + sample_entries=sample_entries, + ) + + standalone_test_compaction_request.additional_properties = d + return standalone_test_compaction_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/start_source_embedding_migration_request.py b/seclai/_generated/models/start_source_embedding_migration_request.py new file mode 100644 index 0000000..74eb819 --- /dev/null +++ b/seclai/_generated/models/start_source_embedding_migration_request.py @@ -0,0 +1,207 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="StartSourceEmbeddingMigrationRequest") + + +@_attrs_define +class StartSourceEmbeddingMigrationRequest: + """Request payload to start a source embedding migration. + + Attributes: + target_dimensions (int): Target embedding dimensions + target_embedding_model (str): Target embedding model enum + chunk_language (None | str | Unset): Language-specific chunking language code + chunk_overlap (int | None | Unset): Override chunk overlap (characters) + chunk_regex_separators (bool | None | Unset): Whether chunk separators are regex patterns + chunk_separators (None | str | Unset): Custom chunk separators (JSON-encoded list) + chunk_size (int | None | Unset): Override chunk size (characters per chunk) + notification_recipients (list[str] | None | Unset): Optional notification recipient emails + """ + + target_dimensions: int + target_embedding_model: str + chunk_language: None | str | Unset = UNSET + chunk_overlap: int | None | Unset = UNSET + chunk_regex_separators: bool | None | Unset = UNSET + chunk_separators: None | str | Unset = UNSET + chunk_size: int | None | Unset = UNSET + notification_recipients: list[str] | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + target_dimensions = self.target_dimensions + + target_embedding_model = self.target_embedding_model + + chunk_language: None | str | Unset + if isinstance(self.chunk_language, Unset): + chunk_language = UNSET + else: + chunk_language = self.chunk_language + + chunk_overlap: int | None | Unset + if isinstance(self.chunk_overlap, Unset): + chunk_overlap = UNSET + else: + chunk_overlap = self.chunk_overlap + + chunk_regex_separators: bool | None | Unset + if isinstance(self.chunk_regex_separators, Unset): + chunk_regex_separators = UNSET + else: + chunk_regex_separators = self.chunk_regex_separators + + chunk_separators: None | str | Unset + if isinstance(self.chunk_separators, Unset): + chunk_separators = UNSET + else: + chunk_separators = self.chunk_separators + + chunk_size: int | None | Unset + if isinstance(self.chunk_size, Unset): + chunk_size = UNSET + else: + chunk_size = self.chunk_size + + notification_recipients: list[str] | None | Unset + if isinstance(self.notification_recipients, Unset): + notification_recipients = UNSET + elif isinstance(self.notification_recipients, list): + notification_recipients = self.notification_recipients + + else: + notification_recipients = self.notification_recipients + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "target_dimensions": target_dimensions, + "target_embedding_model": target_embedding_model, + } + ) + if chunk_language is not UNSET: + field_dict["chunk_language"] = chunk_language + if chunk_overlap is not UNSET: + field_dict["chunk_overlap"] = chunk_overlap + if chunk_regex_separators is not UNSET: + field_dict["chunk_regex_separators"] = chunk_regex_separators + if chunk_separators is not UNSET: + field_dict["chunk_separators"] = chunk_separators + if chunk_size is not UNSET: + field_dict["chunk_size"] = chunk_size + if notification_recipients is not UNSET: + field_dict["notification_recipients"] = notification_recipients + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + target_dimensions = d.pop("target_dimensions") + + target_embedding_model = d.pop("target_embedding_model") + + def _parse_chunk_language(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + chunk_language = _parse_chunk_language(d.pop("chunk_language", UNSET)) + + def _parse_chunk_overlap(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + chunk_overlap = _parse_chunk_overlap(d.pop("chunk_overlap", UNSET)) + + def _parse_chunk_regex_separators(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + chunk_regex_separators = _parse_chunk_regex_separators( + d.pop("chunk_regex_separators", UNSET) + ) + + def _parse_chunk_separators(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + chunk_separators = _parse_chunk_separators(d.pop("chunk_separators", UNSET)) + + def _parse_chunk_size(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + chunk_size = _parse_chunk_size(d.pop("chunk_size", UNSET)) + + def _parse_notification_recipients(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + notification_recipients_type_0 = cast(list[str], data) + + return notification_recipients_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + notification_recipients = _parse_notification_recipients( + d.pop("notification_recipients", UNSET) + ) + + start_source_embedding_migration_request = cls( + target_dimensions=target_dimensions, + target_embedding_model=target_embedding_model, + chunk_language=chunk_language, + chunk_overlap=chunk_overlap, + chunk_regex_separators=chunk_regex_separators, + chunk_separators=chunk_separators, + chunk_size=chunk_size, + notification_recipients=notification_recipients, + ) + + start_source_embedding_migration_request.additional_properties = d + return start_source_embedding_migration_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/subscribe_to_alert_api_alerts_alert_id_subscribe_post_response_subscribe_to_alert_api_alerts_alert_id_subscribe_post.py b/seclai/_generated/models/subscribe_to_alert_api_alerts_alert_id_subscribe_post_response_subscribe_to_alert_api_alerts_alert_id_subscribe_post.py new file mode 100644 index 0000000..8ba2a2b --- /dev/null +++ b/seclai/_generated/models/subscribe_to_alert_api_alerts_alert_id_subscribe_post_response_subscribe_to_alert_api_alerts_alert_id_subscribe_post.py @@ -0,0 +1,53 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar( + "T", + bound="SubscribeToAlertApiAlertsAlertIdSubscribePostResponseSubscribeToAlertApiAlertsAlertIdSubscribePost", +) + + +@_attrs_define +class SubscribeToAlertApiAlertsAlertIdSubscribePostResponseSubscribeToAlertApiAlertsAlertIdSubscribePost: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + subscribe_to_alert_api_alerts_alert_id_subscribe_post_response_subscribe_to_alert_api_alerts_alert_id_subscribe_post = ( + cls() + ) + + subscribe_to_alert_api_alerts_alert_id_subscribe_post_response_subscribe_to_alert_api_alerts_alert_id_subscribe_post.additional_properties = ( + d + ) + return subscribe_to_alert_api_alerts_alert_id_subscribe_post_response_subscribe_to_alert_api_alerts_alert_id_subscribe_post + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/test_compaction_request.py b/seclai/_generated/models/test_compaction_request.py new file mode 100644 index 0000000..a5abfb9 --- /dev/null +++ b/seclai/_generated/models/test_compaction_request.py @@ -0,0 +1,149 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestCompactionRequest") + + +@_attrs_define +class TestCompactionRequest: + """Request body for testing a compaction prompt against an existing bank. + + The user may supply a ``compaction_prompt`` to override (or provide when + the bank has none). Content can come from three sources: + + 1. Existing entries in the bank (default when neither field is set). + 2. ``sample_entries`` – caller-provided list of strings. + 3. ``generate_direction`` – an instruction to the LLM to generate sample + memory entries. Useful for trying a prompt before any real data + exists. + + At most one of ``sample_entries`` / ``generate_direction`` may be given. + + Attributes: + compaction_prompt (None | str | Unset): Compaction prompt to test. Falls back to the bank's current prompt when + omitted. + entry_count (int | Unset): Number of entries to generate when using generate_direction. Default: 5. + generate_direction (None | str | Unset): Direction for the LLM to generate sample entries (e.g. 'Generate 5 + entries about a customer support interaction'). + sample_entries (list[str] | None | Unset): Explicit sample entries to compact. + """ + + compaction_prompt: None | str | Unset = UNSET + entry_count: int | Unset = 5 + generate_direction: None | str | Unset = UNSET + sample_entries: list[str] | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + compaction_prompt: None | str | Unset + if isinstance(self.compaction_prompt, Unset): + compaction_prompt = UNSET + else: + compaction_prompt = self.compaction_prompt + + entry_count = self.entry_count + + generate_direction: None | str | Unset + if isinstance(self.generate_direction, Unset): + generate_direction = UNSET + else: + generate_direction = self.generate_direction + + sample_entries: list[str] | None | Unset + if isinstance(self.sample_entries, Unset): + sample_entries = UNSET + elif isinstance(self.sample_entries, list): + sample_entries = self.sample_entries + + else: + sample_entries = self.sample_entries + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if compaction_prompt is not UNSET: + field_dict["compaction_prompt"] = compaction_prompt + if entry_count is not UNSET: + field_dict["entry_count"] = entry_count + if generate_direction is not UNSET: + field_dict["generate_direction"] = generate_direction + if sample_entries is not UNSET: + field_dict["sample_entries"] = sample_entries + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_compaction_prompt(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + compaction_prompt = _parse_compaction_prompt(d.pop("compaction_prompt", UNSET)) + + entry_count = d.pop("entry_count", UNSET) + + def _parse_generate_direction(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + generate_direction = _parse_generate_direction( + d.pop("generate_direction", UNSET) + ) + + def _parse_sample_entries(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + sample_entries_type_0 = cast(list[str], data) + + return sample_entries_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + sample_entries = _parse_sample_entries(d.pop("sample_entries", UNSET)) + + test_compaction_request = cls( + compaction_prompt=compaction_prompt, + entry_count=entry_count, + generate_direction=generate_direction, + sample_entries=sample_entries, + ) + + test_compaction_request.additional_properties = d + return test_compaction_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/test_draft_evaluation_request.py b/seclai/_generated/models/test_draft_evaluation_request.py new file mode 100644 index 0000000..749cc14 --- /dev/null +++ b/seclai/_generated/models/test_draft_evaluation_request.py @@ -0,0 +1,246 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.agent_evaluation_tier import AgentEvaluationTier +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.test_draft_evaluation_request_expectation_config_type_0 import ( + TestDraftEvaluationRequestExpectationConfigType0, + ) + + +T = TypeVar("T", bound="TestDraftEvaluationRequest") + + +@_attrs_define +class TestDraftEvaluationRequest: + """Request body for ephemeral (non-persisted) evaluation testing. + + Provide either ``step_output`` (raw text) **or** ``agent_step_run_id`` + (to load output from storage). Exactly one must be supplied. + + Attributes: + agent_input (None | str | Unset): The original agent run input for context. When agent_step_run_id is supplied + this is loaded automatically from the parent run if omitted. + agent_step_run_id (None | Unset | UUID): Load step output from this completed step run instead of supplying + text. + evaluation_prompt (None | str | Unset): + evaluation_tier (AgentEvaluationTier | None | Unset): + expectation_config (None | TestDraftEvaluationRequestExpectationConfigType0 | Unset): + pass_threshold (float | Unset): Default: 0.5. + step_output (None | str | Unset): The step output text to evaluate. Omit if agent_step_run_id is supplied. + """ + + agent_input: None | str | Unset = UNSET + agent_step_run_id: None | Unset | UUID = UNSET + evaluation_prompt: None | str | Unset = UNSET + evaluation_tier: AgentEvaluationTier | None | Unset = UNSET + expectation_config: ( + None | TestDraftEvaluationRequestExpectationConfigType0 | Unset + ) = UNSET + pass_threshold: float | Unset = 0.5 + step_output: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.test_draft_evaluation_request_expectation_config_type_0 import ( + TestDraftEvaluationRequestExpectationConfigType0, + ) + + agent_input: None | str | Unset + if isinstance(self.agent_input, Unset): + agent_input = UNSET + else: + agent_input = self.agent_input + + agent_step_run_id: None | str | Unset + if isinstance(self.agent_step_run_id, Unset): + agent_step_run_id = UNSET + elif isinstance(self.agent_step_run_id, UUID): + agent_step_run_id = str(self.agent_step_run_id) + else: + agent_step_run_id = self.agent_step_run_id + + evaluation_prompt: None | str | Unset + if isinstance(self.evaluation_prompt, Unset): + evaluation_prompt = UNSET + else: + evaluation_prompt = self.evaluation_prompt + + evaluation_tier: None | str | Unset + if isinstance(self.evaluation_tier, Unset): + evaluation_tier = UNSET + elif isinstance(self.evaluation_tier, AgentEvaluationTier): + evaluation_tier = self.evaluation_tier.value + else: + evaluation_tier = self.evaluation_tier + + expectation_config: dict[str, Any] | None | Unset + if isinstance(self.expectation_config, Unset): + expectation_config = UNSET + elif isinstance( + self.expectation_config, TestDraftEvaluationRequestExpectationConfigType0 + ): + expectation_config = self.expectation_config.to_dict() + else: + expectation_config = self.expectation_config + + pass_threshold = self.pass_threshold + + step_output: None | str | Unset + if isinstance(self.step_output, Unset): + step_output = UNSET + else: + step_output = self.step_output + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if agent_input is not UNSET: + field_dict["agent_input"] = agent_input + if agent_step_run_id is not UNSET: + field_dict["agent_step_run_id"] = agent_step_run_id + if evaluation_prompt is not UNSET: + field_dict["evaluation_prompt"] = evaluation_prompt + if evaluation_tier is not UNSET: + field_dict["evaluation_tier"] = evaluation_tier + if expectation_config is not UNSET: + field_dict["expectation_config"] = expectation_config + if pass_threshold is not UNSET: + field_dict["pass_threshold"] = pass_threshold + if step_output is not UNSET: + field_dict["step_output"] = step_output + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.test_draft_evaluation_request_expectation_config_type_0 import ( + TestDraftEvaluationRequestExpectationConfigType0, + ) + + d = dict(src_dict) + + def _parse_agent_input(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + agent_input = _parse_agent_input(d.pop("agent_input", UNSET)) + + def _parse_agent_step_run_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + agent_step_run_id_type_0 = UUID(data) + + return agent_step_run_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + agent_step_run_id = _parse_agent_step_run_id(d.pop("agent_step_run_id", UNSET)) + + def _parse_evaluation_prompt(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + evaluation_prompt = _parse_evaluation_prompt(d.pop("evaluation_prompt", UNSET)) + + def _parse_evaluation_tier(data: object) -> AgentEvaluationTier | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + evaluation_tier_type_0 = AgentEvaluationTier(data) + + return evaluation_tier_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(AgentEvaluationTier | None | Unset, data) + + evaluation_tier = _parse_evaluation_tier(d.pop("evaluation_tier", UNSET)) + + def _parse_expectation_config( + data: object, + ) -> None | TestDraftEvaluationRequestExpectationConfigType0 | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + expectation_config_type_0 = ( + TestDraftEvaluationRequestExpectationConfigType0.from_dict(data) + ) + + return expectation_config_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast( + None | TestDraftEvaluationRequestExpectationConfigType0 | Unset, data + ) + + expectation_config = _parse_expectation_config( + d.pop("expectation_config", UNSET) + ) + + pass_threshold = d.pop("pass_threshold", UNSET) + + def _parse_step_output(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + step_output = _parse_step_output(d.pop("step_output", UNSET)) + + test_draft_evaluation_request = cls( + agent_input=agent_input, + agent_step_run_id=agent_step_run_id, + evaluation_prompt=evaluation_prompt, + evaluation_tier=evaluation_tier, + expectation_config=expectation_config, + pass_threshold=pass_threshold, + step_output=step_output, + ) + + test_draft_evaluation_request.additional_properties = d + return test_draft_evaluation_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/test_draft_evaluation_request_expectation_config_type_0.py b/seclai/_generated/models/test_draft_evaluation_request_expectation_config_type_0.py new file mode 100644 index 0000000..0dce88e --- /dev/null +++ b/seclai/_generated/models/test_draft_evaluation_request_expectation_config_type_0.py @@ -0,0 +1,48 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TestDraftEvaluationRequestExpectationConfigType0") + + +@_attrs_define +class TestDraftEvaluationRequestExpectationConfigType0: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + test_draft_evaluation_request_expectation_config_type_0 = cls() + + test_draft_evaluation_request_expectation_config_type_0.additional_properties = ( + d + ) + return test_draft_evaluation_request_expectation_config_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/test_draft_evaluation_response.py b/seclai/_generated/models/test_draft_evaluation_response.py new file mode 100644 index 0000000..6b294fc --- /dev/null +++ b/seclai/_generated/models/test_draft_evaluation_response.py @@ -0,0 +1,85 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TestDraftEvaluationResponse") + + +@_attrs_define +class TestDraftEvaluationResponse: + """Response for an ephemeral evaluation test. + + Attributes: + explanation (None | str): + passed (bool): + score (float): + """ + + explanation: None | str + passed: bool + score: float + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + explanation: None | str + explanation = self.explanation + + passed = self.passed + + score = self.score + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "explanation": explanation, + "passed": passed, + "score": score, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_explanation(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + explanation = _parse_explanation(d.pop("explanation")) + + passed = d.pop("passed") + + score = d.pop("score") + + test_draft_evaluation_response = cls( + explanation=explanation, + passed=passed, + score=score, + ) + + test_draft_evaluation_response.additional_properties = d + return test_draft_evaluation_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/unlink_resources_request.py b/seclai/_generated/models/unlink_resources_request.py new file mode 100644 index 0000000..db6dfc2 --- /dev/null +++ b/seclai/_generated/models/unlink_resources_request.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="UnlinkResourcesRequest") + + +@_attrs_define +class UnlinkResourcesRequest: + """ + Attributes: + ids (list[UUID]): Resource IDs to unlink + """ + + ids: list[UUID] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + ids = [] + for ids_item_data in self.ids: + ids_item = str(ids_item_data) + ids.append(ids_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "ids": ids, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + ids = [] + _ids = d.pop("ids") + for ids_item_data in _ids: + ids_item = UUID(ids_item_data) + + ids.append(ids_item) + + unlink_resources_request = cls( + ids=ids, + ) + + unlink_resources_request.additional_properties = d + return unlink_resources_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/unsubscribe_from_alert_api_alerts_alert_id_unsubscribe_post_response_unsubscribe_from_alert_api_alerts_alert_id_unsubscribe_post.py b/seclai/_generated/models/unsubscribe_from_alert_api_alerts_alert_id_unsubscribe_post_response_unsubscribe_from_alert_api_alerts_alert_id_unsubscribe_post.py new file mode 100644 index 0000000..573f44a --- /dev/null +++ b/seclai/_generated/models/unsubscribe_from_alert_api_alerts_alert_id_unsubscribe_post_response_unsubscribe_from_alert_api_alerts_alert_id_unsubscribe_post.py @@ -0,0 +1,53 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar( + "T", + bound="UnsubscribeFromAlertApiAlertsAlertIdUnsubscribePostResponseUnsubscribeFromAlertApiAlertsAlertIdUnsubscribePost", +) + + +@_attrs_define +class UnsubscribeFromAlertApiAlertsAlertIdUnsubscribePostResponseUnsubscribeFromAlertApiAlertsAlertIdUnsubscribePost: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + unsubscribe_from_alert_api_alerts_alert_id_unsubscribe_post_response_unsubscribe_from_alert_api_alerts_alert_id_unsubscribe_post = ( + cls() + ) + + unsubscribe_from_alert_api_alerts_alert_id_unsubscribe_post_response_unsubscribe_from_alert_api_alerts_alert_id_unsubscribe_post.additional_properties = ( + d + ) + return unsubscribe_from_alert_api_alerts_alert_id_unsubscribe_post_response_unsubscribe_from_alert_api_alerts_alert_id_unsubscribe_post + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/update_agent_definition_request.py b/seclai/_generated/models/update_agent_definition_request.py new file mode 100644 index 0000000..b259795 --- /dev/null +++ b/seclai/_generated/models/update_agent_definition_request.py @@ -0,0 +1,84 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.update_agent_definition_request_definition import ( + UpdateAgentDefinitionRequestDefinition, + ) + + +T = TypeVar("T", bound="UpdateAgentDefinitionRequest") + + +@_attrs_define +class UpdateAgentDefinitionRequest: + """ + Attributes: + definition (UpdateAgentDefinitionRequestDefinition): The full agent definition (name, description, tags, steps). + Steps form a tree workflow. Each step has a `step_type`, `id`, `name`, and type-specific config. Content + enrichment steps (write_metadata, write_content_attachment, load_content_attachment, load_content) require + content-triggered agents. + expected_change_id (str): The change_id from the last GET, for optimistic locking. + """ + + definition: UpdateAgentDefinitionRequestDefinition + expected_change_id: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + definition = self.definition.to_dict() + + expected_change_id = self.expected_change_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "definition": definition, + "expected_change_id": expected_change_id, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.update_agent_definition_request_definition import ( + UpdateAgentDefinitionRequestDefinition, + ) + + d = dict(src_dict) + definition = UpdateAgentDefinitionRequestDefinition.from_dict( + d.pop("definition") + ) + + expected_change_id = d.pop("expected_change_id") + + update_agent_definition_request = cls( + definition=definition, + expected_change_id=expected_change_id, + ) + + update_agent_definition_request.additional_properties = d + return update_agent_definition_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/update_agent_definition_request_definition.py b/seclai/_generated/models/update_agent_definition_request_definition.py new file mode 100644 index 0000000..83e0026 --- /dev/null +++ b/seclai/_generated/models/update_agent_definition_request_definition.py @@ -0,0 +1,50 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="UpdateAgentDefinitionRequestDefinition") + + +@_attrs_define +class UpdateAgentDefinitionRequestDefinition: + """The full agent definition (name, description, tags, steps). Steps form a tree workflow. Each step has a `step_type`, + `id`, `name`, and type-specific config. Content enrichment steps (write_metadata, write_content_attachment, + load_content_attachment, load_content) require content-triggered agents. + + """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + update_agent_definition_request_definition = cls() + + update_agent_definition_request_definition.additional_properties = d + return update_agent_definition_request_definition + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/update_agent_request.py b/seclai/_generated/models/update_agent_request.py new file mode 100644 index 0000000..6fcb8e1 --- /dev/null +++ b/seclai/_generated/models/update_agent_request.py @@ -0,0 +1,378 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.prompt_model_auto_upgrade_strategy import PromptModelAutoUpgradeStrategy +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.update_agent_request_sampling_config_type_0 import ( + UpdateAgentRequestSamplingConfigType0, + ) + + +T = TypeVar("T", bound="UpdateAgentRequest") + + +@_attrs_define +class UpdateAgentRequest: + """ + Attributes: + default_evaluation_tier (None | str | Unset): Default evaluation tier: 'fast', 'balanced', or 'thorough'. + description (None | str | Unset): New description for the agent. + evaluation_mode (None | str | Unset): Evaluation mode: 'output_expectation', 'eval_and_retry', or + 'sample_and_flag'. + max_retries (int | None | Unset): Max retries for eval_and_retry mode (1-10). + name (None | str | Unset): New name for the agent. + prompt_model_auto_rollback_enabled (bool | None | Unset): Enable or disable automatic rollback for upgraded + models. + prompt_model_auto_rollback_triggers (list[str] | None | Unset): Failure signals that trigger rollback: + agent_eval_fail, governance_flag, governance_block, agent_run_failed. + prompt_model_auto_upgrade_strategy (None | PromptModelAutoUpgradeStrategy | Unset): Auto-upgrade strategy: none, + early_adopter, middle_of_road, cautious_adopter. + retry_on_failure (bool | None | Unset): Whether to retry on evaluation failure. + sampling_config (None | Unset | UpdateAgentRequestSamplingConfigType0): Sampling configuration for + sample_and_flag mode. Format: {combinator: 'and'|'or', rules: [...]}. + set_default_evaluation_tier (bool | Unset): When true and default_evaluation_tier is omitted, clears the tier to + null (system default). Default: False. + set_prompt_model_auto_rollback_triggers (bool | Unset): When true and prompt_model_auto_rollback_triggers is + omitted, clears the list to null (revert to system defaults). Default: False. + set_sampling_config (bool | Unset): When true and sampling_config is omitted, clears the config to null. + Default: False. + """ + + default_evaluation_tier: None | str | Unset = UNSET + description: None | str | Unset = UNSET + evaluation_mode: None | str | Unset = UNSET + max_retries: int | None | Unset = UNSET + name: None | str | Unset = UNSET + prompt_model_auto_rollback_enabled: bool | None | Unset = UNSET + prompt_model_auto_rollback_triggers: list[str] | None | Unset = UNSET + prompt_model_auto_upgrade_strategy: ( + None | PromptModelAutoUpgradeStrategy | Unset + ) = UNSET + retry_on_failure: bool | None | Unset = UNSET + sampling_config: None | Unset | UpdateAgentRequestSamplingConfigType0 = UNSET + set_default_evaluation_tier: bool | Unset = False + set_prompt_model_auto_rollback_triggers: bool | Unset = False + set_sampling_config: bool | Unset = False + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.update_agent_request_sampling_config_type_0 import ( + UpdateAgentRequestSamplingConfigType0, + ) + + default_evaluation_tier: None | str | Unset + if isinstance(self.default_evaluation_tier, Unset): + default_evaluation_tier = UNSET + else: + default_evaluation_tier = self.default_evaluation_tier + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + evaluation_mode: None | str | Unset + if isinstance(self.evaluation_mode, Unset): + evaluation_mode = UNSET + else: + evaluation_mode = self.evaluation_mode + + max_retries: int | None | Unset + if isinstance(self.max_retries, Unset): + max_retries = UNSET + else: + max_retries = self.max_retries + + name: None | str | Unset + if isinstance(self.name, Unset): + name = UNSET + else: + name = self.name + + prompt_model_auto_rollback_enabled: bool | None | Unset + if isinstance(self.prompt_model_auto_rollback_enabled, Unset): + prompt_model_auto_rollback_enabled = UNSET + else: + prompt_model_auto_rollback_enabled = self.prompt_model_auto_rollback_enabled + + prompt_model_auto_rollback_triggers: list[str] | None | Unset + if isinstance(self.prompt_model_auto_rollback_triggers, Unset): + prompt_model_auto_rollback_triggers = UNSET + elif isinstance(self.prompt_model_auto_rollback_triggers, list): + prompt_model_auto_rollback_triggers = ( + self.prompt_model_auto_rollback_triggers + ) + + else: + prompt_model_auto_rollback_triggers = ( + self.prompt_model_auto_rollback_triggers + ) + + prompt_model_auto_upgrade_strategy: None | str | Unset + if isinstance(self.prompt_model_auto_upgrade_strategy, Unset): + prompt_model_auto_upgrade_strategy = UNSET + elif isinstance( + self.prompt_model_auto_upgrade_strategy, PromptModelAutoUpgradeStrategy + ): + prompt_model_auto_upgrade_strategy = ( + self.prompt_model_auto_upgrade_strategy.value + ) + else: + prompt_model_auto_upgrade_strategy = self.prompt_model_auto_upgrade_strategy + + retry_on_failure: bool | None | Unset + if isinstance(self.retry_on_failure, Unset): + retry_on_failure = UNSET + else: + retry_on_failure = self.retry_on_failure + + sampling_config: dict[str, Any] | None | Unset + if isinstance(self.sampling_config, Unset): + sampling_config = UNSET + elif isinstance(self.sampling_config, UpdateAgentRequestSamplingConfigType0): + sampling_config = self.sampling_config.to_dict() + else: + sampling_config = self.sampling_config + + set_default_evaluation_tier = self.set_default_evaluation_tier + + set_prompt_model_auto_rollback_triggers = ( + self.set_prompt_model_auto_rollback_triggers + ) + + set_sampling_config = self.set_sampling_config + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if default_evaluation_tier is not UNSET: + field_dict["default_evaluation_tier"] = default_evaluation_tier + if description is not UNSET: + field_dict["description"] = description + if evaluation_mode is not UNSET: + field_dict["evaluation_mode"] = evaluation_mode + if max_retries is not UNSET: + field_dict["max_retries"] = max_retries + if name is not UNSET: + field_dict["name"] = name + if prompt_model_auto_rollback_enabled is not UNSET: + field_dict["prompt_model_auto_rollback_enabled"] = ( + prompt_model_auto_rollback_enabled + ) + if prompt_model_auto_rollback_triggers is not UNSET: + field_dict["prompt_model_auto_rollback_triggers"] = ( + prompt_model_auto_rollback_triggers + ) + if prompt_model_auto_upgrade_strategy is not UNSET: + field_dict["prompt_model_auto_upgrade_strategy"] = ( + prompt_model_auto_upgrade_strategy + ) + if retry_on_failure is not UNSET: + field_dict["retry_on_failure"] = retry_on_failure + if sampling_config is not UNSET: + field_dict["sampling_config"] = sampling_config + if set_default_evaluation_tier is not UNSET: + field_dict["set_default_evaluation_tier"] = set_default_evaluation_tier + if set_prompt_model_auto_rollback_triggers is not UNSET: + field_dict["set_prompt_model_auto_rollback_triggers"] = ( + set_prompt_model_auto_rollback_triggers + ) + if set_sampling_config is not UNSET: + field_dict["set_sampling_config"] = set_sampling_config + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.update_agent_request_sampling_config_type_0 import ( + UpdateAgentRequestSamplingConfigType0, + ) + + d = dict(src_dict) + + def _parse_default_evaluation_tier(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + default_evaluation_tier = _parse_default_evaluation_tier( + d.pop("default_evaluation_tier", UNSET) + ) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + def _parse_evaluation_mode(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + evaluation_mode = _parse_evaluation_mode(d.pop("evaluation_mode", UNSET)) + + def _parse_max_retries(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + max_retries = _parse_max_retries(d.pop("max_retries", UNSET)) + + def _parse_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + name = _parse_name(d.pop("name", UNSET)) + + def _parse_prompt_model_auto_rollback_enabled( + data: object, + ) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + prompt_model_auto_rollback_enabled = _parse_prompt_model_auto_rollback_enabled( + d.pop("prompt_model_auto_rollback_enabled", UNSET) + ) + + def _parse_prompt_model_auto_rollback_triggers( + data: object, + ) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + prompt_model_auto_rollback_triggers_type_0 = cast(list[str], data) + + return prompt_model_auto_rollback_triggers_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + prompt_model_auto_rollback_triggers = ( + _parse_prompt_model_auto_rollback_triggers( + d.pop("prompt_model_auto_rollback_triggers", UNSET) + ) + ) + + def _parse_prompt_model_auto_upgrade_strategy( + data: object, + ) -> None | PromptModelAutoUpgradeStrategy | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + prompt_model_auto_upgrade_strategy_type_0 = ( + PromptModelAutoUpgradeStrategy(data) + ) + + return prompt_model_auto_upgrade_strategy_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | PromptModelAutoUpgradeStrategy | Unset, data) + + prompt_model_auto_upgrade_strategy = _parse_prompt_model_auto_upgrade_strategy( + d.pop("prompt_model_auto_upgrade_strategy", UNSET) + ) + + def _parse_retry_on_failure(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + retry_on_failure = _parse_retry_on_failure(d.pop("retry_on_failure", UNSET)) + + def _parse_sampling_config( + data: object, + ) -> None | Unset | UpdateAgentRequestSamplingConfigType0: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + sampling_config_type_0 = ( + UpdateAgentRequestSamplingConfigType0.from_dict(data) + ) + + return sampling_config_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UpdateAgentRequestSamplingConfigType0, data) + + sampling_config = _parse_sampling_config(d.pop("sampling_config", UNSET)) + + set_default_evaluation_tier = d.pop("set_default_evaluation_tier", UNSET) + + set_prompt_model_auto_rollback_triggers = d.pop( + "set_prompt_model_auto_rollback_triggers", UNSET + ) + + set_sampling_config = d.pop("set_sampling_config", UNSET) + + update_agent_request = cls( + default_evaluation_tier=default_evaluation_tier, + description=description, + evaluation_mode=evaluation_mode, + max_retries=max_retries, + name=name, + prompt_model_auto_rollback_enabled=prompt_model_auto_rollback_enabled, + prompt_model_auto_rollback_triggers=prompt_model_auto_rollback_triggers, + prompt_model_auto_upgrade_strategy=prompt_model_auto_upgrade_strategy, + retry_on_failure=retry_on_failure, + sampling_config=sampling_config, + set_default_evaluation_tier=set_default_evaluation_tier, + set_prompt_model_auto_rollback_triggers=set_prompt_model_auto_rollback_triggers, + set_sampling_config=set_sampling_config, + ) + + update_agent_request.additional_properties = d + return update_agent_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/update_agent_request_sampling_config_type_0.py b/seclai/_generated/models/update_agent_request_sampling_config_type_0.py new file mode 100644 index 0000000..d9cced7 --- /dev/null +++ b/seclai/_generated/models/update_agent_request_sampling_config_type_0.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="UpdateAgentRequestSamplingConfigType0") + + +@_attrs_define +class UpdateAgentRequestSamplingConfigType0: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + update_agent_request_sampling_config_type_0 = cls() + + update_agent_request_sampling_config_type_0.additional_properties = d + return update_agent_request_sampling_config_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/update_alert_config_api_alerts_configs_config_id_patch_response_update_alert_config_api_alerts_configs_config_id_patch.py b/seclai/_generated/models/update_alert_config_api_alerts_configs_config_id_patch_response_update_alert_config_api_alerts_configs_config_id_patch.py new file mode 100644 index 0000000..f38a9a1 --- /dev/null +++ b/seclai/_generated/models/update_alert_config_api_alerts_configs_config_id_patch_response_update_alert_config_api_alerts_configs_config_id_patch.py @@ -0,0 +1,53 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar( + "T", + bound="UpdateAlertConfigApiAlertsConfigsConfigIdPatchResponseUpdateAlertConfigApiAlertsConfigsConfigIdPatch", +) + + +@_attrs_define +class UpdateAlertConfigApiAlertsConfigsConfigIdPatchResponseUpdateAlertConfigApiAlertsConfigsConfigIdPatch: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + update_alert_config_api_alerts_configs_config_id_patch_response_update_alert_config_api_alerts_configs_config_id_patch = ( + cls() + ) + + update_alert_config_api_alerts_configs_config_id_patch_response_update_alert_config_api_alerts_configs_config_id_patch.additional_properties = ( + d + ) + return update_alert_config_api_alerts_configs_config_id_patch_response_update_alert_config_api_alerts_configs_config_id_patch + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/update_alert_config_request.py b/seclai/_generated/models/update_alert_config_request.py new file mode 100644 index 0000000..8d610d4 --- /dev/null +++ b/seclai/_generated/models/update_alert_config_request.py @@ -0,0 +1,194 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.update_alert_config_request_threshold_type_0 import ( + UpdateAlertConfigRequestThresholdType0, + ) + + +T = TypeVar("T", bound="UpdateAlertConfigRequest") + + +@_attrs_define +class UpdateAlertConfigRequest: + """ + Attributes: + cooldown_minutes (int | None | Unset): Cooldown period in minutes + distribution_type (None | str | Unset): Distribution type + enabled (bool | None | Unset): Whether the alert config is enabled + recipient_user_ids (list[str] | None | Unset): User IDs for selected_members distribution + threshold (None | Unset | UpdateAlertConfigRequestThresholdType0): Threshold configuration + """ + + cooldown_minutes: int | None | Unset = UNSET + distribution_type: None | str | Unset = UNSET + enabled: bool | None | Unset = UNSET + recipient_user_ids: list[str] | None | Unset = UNSET + threshold: None | Unset | UpdateAlertConfigRequestThresholdType0 = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.update_alert_config_request_threshold_type_0 import ( + UpdateAlertConfigRequestThresholdType0, + ) + + cooldown_minutes: int | None | Unset + if isinstance(self.cooldown_minutes, Unset): + cooldown_minutes = UNSET + else: + cooldown_minutes = self.cooldown_minutes + + distribution_type: None | str | Unset + if isinstance(self.distribution_type, Unset): + distribution_type = UNSET + else: + distribution_type = self.distribution_type + + enabled: bool | None | Unset + if isinstance(self.enabled, Unset): + enabled = UNSET + else: + enabled = self.enabled + + recipient_user_ids: list[str] | None | Unset + if isinstance(self.recipient_user_ids, Unset): + recipient_user_ids = UNSET + elif isinstance(self.recipient_user_ids, list): + recipient_user_ids = self.recipient_user_ids + + else: + recipient_user_ids = self.recipient_user_ids + + threshold: dict[str, Any] | None | Unset + if isinstance(self.threshold, Unset): + threshold = UNSET + elif isinstance(self.threshold, UpdateAlertConfigRequestThresholdType0): + threshold = self.threshold.to_dict() + else: + threshold = self.threshold + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if cooldown_minutes is not UNSET: + field_dict["cooldown_minutes"] = cooldown_minutes + if distribution_type is not UNSET: + field_dict["distribution_type"] = distribution_type + if enabled is not UNSET: + field_dict["enabled"] = enabled + if recipient_user_ids is not UNSET: + field_dict["recipient_user_ids"] = recipient_user_ids + if threshold is not UNSET: + field_dict["threshold"] = threshold + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.update_alert_config_request_threshold_type_0 import ( + UpdateAlertConfigRequestThresholdType0, + ) + + d = dict(src_dict) + + def _parse_cooldown_minutes(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + cooldown_minutes = _parse_cooldown_minutes(d.pop("cooldown_minutes", UNSET)) + + def _parse_distribution_type(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + distribution_type = _parse_distribution_type(d.pop("distribution_type", UNSET)) + + def _parse_enabled(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + enabled = _parse_enabled(d.pop("enabled", UNSET)) + + def _parse_recipient_user_ids(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + recipient_user_ids_type_0 = cast(list[str], data) + + return recipient_user_ids_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + recipient_user_ids = _parse_recipient_user_ids( + d.pop("recipient_user_ids", UNSET) + ) + + def _parse_threshold( + data: object, + ) -> None | Unset | UpdateAlertConfigRequestThresholdType0: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + threshold_type_0 = UpdateAlertConfigRequestThresholdType0.from_dict( + data + ) + + return threshold_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UpdateAlertConfigRequestThresholdType0, data) + + threshold = _parse_threshold(d.pop("threshold", UNSET)) + + update_alert_config_request = cls( + cooldown_minutes=cooldown_minutes, + distribution_type=distribution_type, + enabled=enabled, + recipient_user_ids=recipient_user_ids, + threshold=threshold, + ) + + update_alert_config_request.additional_properties = d + return update_alert_config_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/update_alert_config_request_threshold_type_0.py b/seclai/_generated/models/update_alert_config_request_threshold_type_0.py new file mode 100644 index 0000000..ecfa59d --- /dev/null +++ b/seclai/_generated/models/update_alert_config_request_threshold_type_0.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="UpdateAlertConfigRequestThresholdType0") + + +@_attrs_define +class UpdateAlertConfigRequestThresholdType0: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + update_alert_config_request_threshold_type_0 = cls() + + update_alert_config_request_threshold_type_0.additional_properties = d + return update_alert_config_request_threshold_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/update_evaluation_criteria_request.py b/seclai/_generated/models/update_evaluation_criteria_request.py new file mode 100644 index 0000000..fa2f1c7 --- /dev/null +++ b/seclai/_generated/models/update_evaluation_criteria_request.py @@ -0,0 +1,247 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.agent_evaluation_tier import AgentEvaluationTier +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.update_evaluation_criteria_request_expectation_config_type_0 import ( + UpdateEvaluationCriteriaRequestExpectationConfigType0, + ) + + +T = TypeVar("T", bound="UpdateEvaluationCriteriaRequest") + + +@_attrs_define +class UpdateEvaluationCriteriaRequest: + """Request body for updating an evaluation criteria. + + Retry settings and sample frequency are set at the agent level. + + Attributes: + description (None | str | Unset): + enabled (bool | None | Unset): + evaluation_prompt (None | str | Unset): + evaluation_tier (AgentEvaluationTier | None | Unset): + expectation_config (None | Unset | UpdateEvaluationCriteriaRequestExpectationConfigType0): + pass_threshold (float | None | Unset): + step_id (None | str | Unset): + """ + + description: None | str | Unset = UNSET + enabled: bool | None | Unset = UNSET + evaluation_prompt: None | str | Unset = UNSET + evaluation_tier: AgentEvaluationTier | None | Unset = UNSET + expectation_config: ( + None | Unset | UpdateEvaluationCriteriaRequestExpectationConfigType0 + ) = UNSET + pass_threshold: float | None | Unset = UNSET + step_id: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.update_evaluation_criteria_request_expectation_config_type_0 import ( + UpdateEvaluationCriteriaRequestExpectationConfigType0, + ) + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + enabled: bool | None | Unset + if isinstance(self.enabled, Unset): + enabled = UNSET + else: + enabled = self.enabled + + evaluation_prompt: None | str | Unset + if isinstance(self.evaluation_prompt, Unset): + evaluation_prompt = UNSET + else: + evaluation_prompt = self.evaluation_prompt + + evaluation_tier: None | str | Unset + if isinstance(self.evaluation_tier, Unset): + evaluation_tier = UNSET + elif isinstance(self.evaluation_tier, AgentEvaluationTier): + evaluation_tier = self.evaluation_tier.value + else: + evaluation_tier = self.evaluation_tier + + expectation_config: dict[str, Any] | None | Unset + if isinstance(self.expectation_config, Unset): + expectation_config = UNSET + elif isinstance( + self.expectation_config, + UpdateEvaluationCriteriaRequestExpectationConfigType0, + ): + expectation_config = self.expectation_config.to_dict() + else: + expectation_config = self.expectation_config + + pass_threshold: float | None | Unset + if isinstance(self.pass_threshold, Unset): + pass_threshold = UNSET + else: + pass_threshold = self.pass_threshold + + step_id: None | str | Unset + if isinstance(self.step_id, Unset): + step_id = UNSET + else: + step_id = self.step_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if description is not UNSET: + field_dict["description"] = description + if enabled is not UNSET: + field_dict["enabled"] = enabled + if evaluation_prompt is not UNSET: + field_dict["evaluation_prompt"] = evaluation_prompt + if evaluation_tier is not UNSET: + field_dict["evaluation_tier"] = evaluation_tier + if expectation_config is not UNSET: + field_dict["expectation_config"] = expectation_config + if pass_threshold is not UNSET: + field_dict["pass_threshold"] = pass_threshold + if step_id is not UNSET: + field_dict["step_id"] = step_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.update_evaluation_criteria_request_expectation_config_type_0 import ( + UpdateEvaluationCriteriaRequestExpectationConfigType0, + ) + + d = dict(src_dict) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + def _parse_enabled(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + enabled = _parse_enabled(d.pop("enabled", UNSET)) + + def _parse_evaluation_prompt(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + evaluation_prompt = _parse_evaluation_prompt(d.pop("evaluation_prompt", UNSET)) + + def _parse_evaluation_tier(data: object) -> AgentEvaluationTier | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + evaluation_tier_type_0 = AgentEvaluationTier(data) + + return evaluation_tier_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(AgentEvaluationTier | None | Unset, data) + + evaluation_tier = _parse_evaluation_tier(d.pop("evaluation_tier", UNSET)) + + def _parse_expectation_config( + data: object, + ) -> None | Unset | UpdateEvaluationCriteriaRequestExpectationConfigType0: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + expectation_config_type_0 = ( + UpdateEvaluationCriteriaRequestExpectationConfigType0.from_dict( + data + ) + ) + + return expectation_config_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast( + None | Unset | UpdateEvaluationCriteriaRequestExpectationConfigType0, + data, + ) + + expectation_config = _parse_expectation_config( + d.pop("expectation_config", UNSET) + ) + + def _parse_pass_threshold(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + pass_threshold = _parse_pass_threshold(d.pop("pass_threshold", UNSET)) + + def _parse_step_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + step_id = _parse_step_id(d.pop("step_id", UNSET)) + + update_evaluation_criteria_request = cls( + description=description, + enabled=enabled, + evaluation_prompt=evaluation_prompt, + evaluation_tier=evaluation_tier, + expectation_config=expectation_config, + pass_threshold=pass_threshold, + step_id=step_id, + ) + + update_evaluation_criteria_request.additional_properties = d + return update_evaluation_criteria_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/update_evaluation_criteria_request_expectation_config_type_0.py b/seclai/_generated/models/update_evaluation_criteria_request_expectation_config_type_0.py new file mode 100644 index 0000000..ac385a4 --- /dev/null +++ b/seclai/_generated/models/update_evaluation_criteria_request_expectation_config_type_0.py @@ -0,0 +1,48 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="UpdateEvaluationCriteriaRequestExpectationConfigType0") + + +@_attrs_define +class UpdateEvaluationCriteriaRequestExpectationConfigType0: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + update_evaluation_criteria_request_expectation_config_type_0 = cls() + + update_evaluation_criteria_request_expectation_config_type_0.additional_properties = ( + d + ) + return update_evaluation_criteria_request_expectation_config_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/update_knowledge_base_body.py b/seclai/_generated/models/update_knowledge_base_body.py new file mode 100644 index 0000000..82f4048 --- /dev/null +++ b/seclai/_generated/models/update_knowledge_base_body.py @@ -0,0 +1,207 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateKnowledgeBaseBody") + + +@_attrs_define +class UpdateKnowledgeBaseBody: + """Request body for updating a knowledge base. + + Attributes: + default_score_threshold (float | None | Unset): Default score threshold (-1 to clear). + default_top_k (int | None | Unset): Default reranked results (0 to clear). + default_top_n (int | None | Unset): Default results (0 to clear). + description (None | str | Unset): New description. + name (None | str | Unset): New name. + reranker_model (None | str | Unset): Reranker model (empty string for no reranking). + source_ids (list[str] | None | Unset): New list of source connection IDs. + """ + + default_score_threshold: float | None | Unset = UNSET + default_top_k: int | None | Unset = UNSET + default_top_n: int | None | Unset = UNSET + description: None | str | Unset = UNSET + name: None | str | Unset = UNSET + reranker_model: None | str | Unset = UNSET + source_ids: list[str] | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + default_score_threshold: float | None | Unset + if isinstance(self.default_score_threshold, Unset): + default_score_threshold = UNSET + else: + default_score_threshold = self.default_score_threshold + + default_top_k: int | None | Unset + if isinstance(self.default_top_k, Unset): + default_top_k = UNSET + else: + default_top_k = self.default_top_k + + default_top_n: int | None | Unset + if isinstance(self.default_top_n, Unset): + default_top_n = UNSET + else: + default_top_n = self.default_top_n + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + name: None | str | Unset + if isinstance(self.name, Unset): + name = UNSET + else: + name = self.name + + reranker_model: None | str | Unset + if isinstance(self.reranker_model, Unset): + reranker_model = UNSET + else: + reranker_model = self.reranker_model + + source_ids: list[str] | None | Unset + if isinstance(self.source_ids, Unset): + source_ids = UNSET + elif isinstance(self.source_ids, list): + source_ids = self.source_ids + + else: + source_ids = self.source_ids + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if default_score_threshold is not UNSET: + field_dict["default_score_threshold"] = default_score_threshold + if default_top_k is not UNSET: + field_dict["default_top_k"] = default_top_k + if default_top_n is not UNSET: + field_dict["default_top_n"] = default_top_n + if description is not UNSET: + field_dict["description"] = description + if name is not UNSET: + field_dict["name"] = name + if reranker_model is not UNSET: + field_dict["reranker_model"] = reranker_model + if source_ids is not UNSET: + field_dict["source_ids"] = source_ids + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_default_score_threshold(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + default_score_threshold = _parse_default_score_threshold( + d.pop("default_score_threshold", UNSET) + ) + + def _parse_default_top_k(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + default_top_k = _parse_default_top_k(d.pop("default_top_k", UNSET)) + + def _parse_default_top_n(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + default_top_n = _parse_default_top_n(d.pop("default_top_n", UNSET)) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + def _parse_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + name = _parse_name(d.pop("name", UNSET)) + + def _parse_reranker_model(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + reranker_model = _parse_reranker_model(d.pop("reranker_model", UNSET)) + + def _parse_source_ids(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + source_ids_type_0 = cast(list[str], data) + + return source_ids_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + source_ids = _parse_source_ids(d.pop("source_ids", UNSET)) + + update_knowledge_base_body = cls( + default_score_threshold=default_score_threshold, + default_top_k=default_top_k, + default_top_n=default_top_n, + description=description, + name=name, + reranker_model=reranker_model, + source_ids=source_ids, + ) + + update_knowledge_base_body.additional_properties = d + return update_knowledge_base_body + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/update_memory_bank_body.py b/seclai/_generated/models/update_memory_bank_body.py new file mode 100644 index 0000000..30fa14d --- /dev/null +++ b/seclai/_generated/models/update_memory_bank_body.py @@ -0,0 +1,202 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateMemoryBankBody") + + +@_attrs_define +class UpdateMemoryBankBody: + """Request body for updating a memory bank. + + Omitted fields are left unchanged. To **clear** a field back to null, + send a zero-value sentinel: ``0`` for integers, ``""`` for strings. + + Attributes: + compaction_prompt (None | str | Unset): Custom prompt used when compacting older entries. When set, entries that + exceed a threshold are summarized into a new entry before being soft-deleted. Send empty string "" to clear and + disable summarisation. + description (None | str | Unset): Optional description. Send empty string "" to clear. + max_age_days (int | None | Unset): Max entry age in days before compaction. Checked inline after each write and + by the hourly background sweep. Send 0 to disable. + max_size_tokens (int | None | Unset): Max total tokens (per partition) before compaction. Checked inline after + each write and by the hourly background sweep. Send 0 to disable. + max_turns (int | None | Unset): Max conversation turns (per partition) before compaction. Checked inline after + each write and by the hourly background sweep. Send 0 to disable. + name (None | str | Unset): New name. + retention_days (int | None | Unset): Content source retention in days. Send 0 to clear (indefinite). + """ + + compaction_prompt: None | str | Unset = UNSET + description: None | str | Unset = UNSET + max_age_days: int | None | Unset = UNSET + max_size_tokens: int | None | Unset = UNSET + max_turns: int | None | Unset = UNSET + name: None | str | Unset = UNSET + retention_days: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + compaction_prompt: None | str | Unset + if isinstance(self.compaction_prompt, Unset): + compaction_prompt = UNSET + else: + compaction_prompt = self.compaction_prompt + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + max_age_days: int | None | Unset + if isinstance(self.max_age_days, Unset): + max_age_days = UNSET + else: + max_age_days = self.max_age_days + + max_size_tokens: int | None | Unset + if isinstance(self.max_size_tokens, Unset): + max_size_tokens = UNSET + else: + max_size_tokens = self.max_size_tokens + + max_turns: int | None | Unset + if isinstance(self.max_turns, Unset): + max_turns = UNSET + else: + max_turns = self.max_turns + + name: None | str | Unset + if isinstance(self.name, Unset): + name = UNSET + else: + name = self.name + + retention_days: int | None | Unset + if isinstance(self.retention_days, Unset): + retention_days = UNSET + else: + retention_days = self.retention_days + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if compaction_prompt is not UNSET: + field_dict["compaction_prompt"] = compaction_prompt + if description is not UNSET: + field_dict["description"] = description + if max_age_days is not UNSET: + field_dict["max_age_days"] = max_age_days + if max_size_tokens is not UNSET: + field_dict["max_size_tokens"] = max_size_tokens + if max_turns is not UNSET: + field_dict["max_turns"] = max_turns + if name is not UNSET: + field_dict["name"] = name + if retention_days is not UNSET: + field_dict["retention_days"] = retention_days + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_compaction_prompt(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + compaction_prompt = _parse_compaction_prompt(d.pop("compaction_prompt", UNSET)) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + def _parse_max_age_days(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + max_age_days = _parse_max_age_days(d.pop("max_age_days", UNSET)) + + def _parse_max_size_tokens(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + max_size_tokens = _parse_max_size_tokens(d.pop("max_size_tokens", UNSET)) + + def _parse_max_turns(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + max_turns = _parse_max_turns(d.pop("max_turns", UNSET)) + + def _parse_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + name = _parse_name(d.pop("name", UNSET)) + + def _parse_retention_days(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + retention_days = _parse_retention_days(d.pop("retention_days", UNSET)) + + update_memory_bank_body = cls( + compaction_prompt=compaction_prompt, + description=description, + max_age_days=max_age_days, + max_size_tokens=max_size_tokens, + max_turns=max_turns, + name=name, + retention_days=retention_days, + ) + + update_memory_bank_body.additional_properties = d + return update_memory_bank_body + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/update_organization_alert_preference_request.py b/seclai/_generated/models/update_organization_alert_preference_request.py new file mode 100644 index 0000000..fed7ef5 --- /dev/null +++ b/seclai/_generated/models/update_organization_alert_preference_request.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="UpdateOrganizationAlertPreferenceRequest") + + +@_attrs_define +class UpdateOrganizationAlertPreferenceRequest: + """ + Attributes: + subscribed (bool): Whether the user should receive this alert for the organization + """ + + subscribed: bool + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + subscribed = self.subscribed + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "subscribed": subscribed, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + subscribed = d.pop("subscribed") + + update_organization_alert_preference_request = cls( + subscribed=subscribed, + ) + + update_organization_alert_preference_request.additional_properties = d + return update_organization_alert_preference_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/update_solution_request.py b/seclai/_generated/models/update_solution_request.py new file mode 100644 index 0000000..3e0e382 --- /dev/null +++ b/seclai/_generated/models/update_solution_request.py @@ -0,0 +1,94 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateSolutionRequest") + + +@_attrs_define +class UpdateSolutionRequest: + """Request model for updating a solution + + Attributes: + description (None | str | Unset): Description of the solution + name (None | str | Unset): Name of the solution + """ + + description: None | str | Unset = UNSET + name: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + name: None | str | Unset + if isinstance(self.name, Unset): + name = UNSET + else: + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if description is not UNSET: + field_dict["description"] = description + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + def _parse_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + name = _parse_name(d.pop("name", UNSET)) + + update_solution_request = cls( + description=description, + name=name, + ) + + update_solution_request.additional_properties = d + return update_solution_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/update_source_body.py b/seclai/_generated/models/update_source_body.py new file mode 100644 index 0000000..74d630c --- /dev/null +++ b/seclai/_generated/models/update_source_body.py @@ -0,0 +1,114 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateSourceBody") + + +@_attrs_define +class UpdateSourceBody: + """Request body for updating a content source. + + Attributes: + name (None | str | Unset): New name. + polling (None | str | Unset): New polling interval. + retention_days (int | None | Unset): New retention period in days (null for unlimited). Default: -1. + """ + + name: None | str | Unset = UNSET + polling: None | str | Unset = UNSET + retention_days: int | None | Unset = -1 + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name: None | str | Unset + if isinstance(self.name, Unset): + name = UNSET + else: + name = self.name + + polling: None | str | Unset + if isinstance(self.polling, Unset): + polling = UNSET + else: + polling = self.polling + + retention_days: int | None | Unset + if isinstance(self.retention_days, Unset): + retention_days = UNSET + else: + retention_days = self.retention_days + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if name is not UNSET: + field_dict["name"] = name + if polling is not UNSET: + field_dict["polling"] = polling + if retention_days is not UNSET: + field_dict["retention_days"] = retention_days + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + name = _parse_name(d.pop("name", UNSET)) + + def _parse_polling(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + polling = _parse_polling(d.pop("polling", UNSET)) + + def _parse_retention_days(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + retention_days = _parse_retention_days(d.pop("retention_days", UNSET)) + + update_source_body = cls( + name=name, + polling=polling, + retention_days=retention_days, + ) + + update_source_body.additional_properties = d + return update_source_body + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/upload_agent_input_api_response.py b/seclai/_generated/models/upload_agent_input_api_response.py new file mode 100644 index 0000000..2ca38eb --- /dev/null +++ b/seclai/_generated/models/upload_agent_input_api_response.py @@ -0,0 +1,115 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UploadAgentInputApiResponse") + + +@_attrs_define +class UploadAgentInputApiResponse: + """ + Attributes: + content_type (str): Resolved MIME type. + file_size (int): Size in bytes. + filename (str): Original filename. + id (str): Unique identifier for the upload. + status (str): processing, ready, or failed. + error (None | str | Unset): Error message if status is failed. + """ + + content_type: str + file_size: int + filename: str + id: str + status: str + error: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + content_type = self.content_type + + file_size = self.file_size + + filename = self.filename + + id = self.id + + status = self.status + + error: None | str | Unset + if isinstance(self.error, Unset): + error = UNSET + else: + error = self.error + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "content_type": content_type, + "file_size": file_size, + "filename": filename, + "id": id, + "status": status, + } + ) + if error is not UNSET: + field_dict["error"] = error + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + content_type = d.pop("content_type") + + file_size = d.pop("file_size") + + filename = d.pop("filename") + + id = d.pop("id") + + status = d.pop("status") + + def _parse_error(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + error = _parse_error(d.pop("error", UNSET)) + + upload_agent_input_api_response = cls( + content_type=content_type, + file_size=file_size, + filename=filename, + id=id, + status=status, + error=error, + ) + + upload_agent_input_api_response.additional_properties = d + return upload_agent_input_api_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/seclai.py b/seclai/seclai.py index b218585..24c186b 100644 --- a/seclai/seclai.py +++ b/seclai/seclai.py @@ -1603,6 +1603,24 @@ def delete_agent(self, agent_id: str) -> None: """ self.request("DELETE", f"/agents/{agent_id}") + # ── Agent Export ──────────────────────────────────────────────────────────── + + def export_agent(self, agent_id: str, *, download: bool = True) -> dict[str, Any]: + """Export an agent definition as a portable JSON snapshot. + + Args: + agent_id: Agent identifier. + download: When True (default), the server sets Content-Disposition: attachment. + + Returns: + The exported agent snapshot. + """ + params = _strip_none({"download": download}) + return cast( + dict[str, Any], + self.request("GET", f"/agents/{agent_id}/export", params=params), + ) + # ── Agent Definitions ───────────────────────────────────────────────────── def get_agent_definition(self, agent_id: str) -> dict[str, Any]: @@ -4774,6 +4792,26 @@ async def delete_agent(self, agent_id: str) -> None: """ await self.request("DELETE", f"/agents/{agent_id}") + # ── Agent Export ────────────────────────────────────────────────────────── + + async def export_agent( + self, agent_id: str, *, download: bool = True + ) -> dict[str, Any]: + """Export an agent definition as a portable JSON snapshot. + + Args: + agent_id: Agent identifier. + download: When True (default), the server sets Content-Disposition: attachment. + + Returns: + The exported agent snapshot. + """ + params = _strip_none({"download": download}) + return cast( + dict[str, Any], + await self.request("GET", f"/agents/{agent_id}/export", params=params), + ) + # ── Agent Definitions ───────────────────────────────────────────────────── async def get_agent_definition(self, agent_id: str) -> dict[str, Any]: From cbd1d1a1ec90bee1ae53bfd7d1bbb4bb2628b0bd Mon Sep 17 00:00:00 2001 From: Kim Burgaard Date: Wed, 1 Apr 2026 21:56:59 -0700 Subject: [PATCH 2/7] Addressed review comments --- .github/copilot-instructions.md | 4 +++- openapi/seclai.openapi.json | 4 ++-- ...rt_agent_api_agents_agent_id_export_get.py | 20 ++++++++++++---- .../api/identity/get_me_api_me_get.py | 24 +++++++++---------- 4 files changed, 33 insertions(+), 19 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 410cba4..7bab976 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -21,7 +21,7 @@ Individual commands: - **ALL tests must pass with ZERO failures. No exceptions.** CI/CD runs the full test suite on every PR. A test failure blocks the build. - **ALL lint checks (including mypy) must pass with ZERO errors.** Run `make lint` — all files, not just ones you modified. - **Do not dismiss test or lint failures as pre-existing or unrelated.** The `main` branch CI/CD is green. Any failure on a feature branch was caused by changes on that branch. -- **CRITICAL — NEVER INVESTIGATE ERROR ORIGIN OR BLAME**: When a lint, type-check, or test error appears, **fix it immediately**. Do NOT run `git diff`, `git log`, `git show`, `git blame`, or any other command to determine whether the error is "pre-existing" or "from our changes". There is no scenario where knowing the origin of an error changes what you must do: **fix it**. +- **CRITICAL — NEVER INVESTIGATE ERROR ORIGIN OR BLAME**: When a lint, type-check, or test error appears, **fix it immediately**. Do NOT run `git blame` or use git history to argue that an error is "pre-existing" or not your responsibility. Tools like `git diff`, `git log`, and `git show` may be used to understand and review changes, but never to avoid fixing an error. There is no scenario where knowing the origin of an error changes what you must do: **fix it**. - **CRITICAL — NEVER PIPE TEST OR LINT OUTPUT**: Do not append `| tail`, `| head`, `| grep`, or any pipe to `pytest`, `make lint`, `make test`, or similar commands. Piping hides errors. Use pytest flags like `--tb=short -q` to reduce verbosity — never pipe. ## Key Rules @@ -30,6 +30,8 @@ Individual commands: - When fixing a type issue, remove the corresponding `# type: ignore` comment or mypy will error on the unused suppression. - Do NOT edit files under `seclai/_generated/` — they are auto-generated from the OpenAPI spec. - The OpenAPI spec at `openapi/seclai.openapi.json` is shared identically with `seclai-go`. Changes must be synced to both repos. +- OpenAPI specs are generated from the main `seclai` app repo. Description or endpoint changes made here must also be applied upstream, or they will be overwritten on the next generation. +- `.github/copilot-instructions.md` shares common sections (quality gates, git rules, editing rules, self-correction rules) across all SDK repos. When updating shared rules, apply the same change to all repos: `seclai-python`, `seclai-javascript`, `seclai-go`, `seclai-csharp`, `seclai-cli`, `seclai-mcp`. - Use the existing virtualenv (`poetry run ...`); do not create or reconfigure Python environments. - **CRITICAL — USE EXISTING VIRTUAL ENV**: The workspace Python virtual environment is already set up. Reuse with `poetry run ...`; do **not** create, activate, or reconfigure another environment unless the user explicitly asks. - **CRITICAL — NEVER CALL PYTHON ENVIRONMENT TOOLS**: Do not call `configure_python_environment`, `activate_python_environment_tools`, or any similar environment-management tool unless the user explicitly asks. diff --git a/openapi/seclai.openapi.json b/openapi/seclai.openapi.json index 68b3863..6e6e6f8 100644 --- a/openapi/seclai.openapi.json +++ b/openapi/seclai.openapi.json @@ -8994,7 +8994,7 @@ }, "/agents/{agent_id}/export": { "get": { - "description": "Export an agent definition as a portable JSON snapshot.\n\nThe response contains the full definition, trigger configuration with schedules, alert configs, evaluation criteria, agent-scoped governance policies, and a resolved dependency manifest that maps every referenced external entity UUID to its human-readable name.\n\nResponse shape:\n- `export_version`: schema version (currently `\"2\"`)\n- `exported_at`: ISO-8601 timestamp\n- `agent`: name, description, schema_version, definition, timestamps\n- `trigger`: trigger type, input template, schedules\n- `alert_configs`: alert type, thresholds, recipients\n- `evaluation_criteria`: evaluation settings per step\n- `governance_policies`: agent-scoped governance policies\n- `dependencies`: knowledge_bases, memory_banks, source_connections, agents, users\n\nQuery params:\n- `download` (default true): when true, sets `Content-Disposition: attachment` so clients treat the response as a file download.\n\nAuth & scoping:\n- Requires `X-API-Key`. You can only export agents belonging to your account.", + "description": "Export an agent definition as a portable JSON snapshot.\n\nThe response contains the full definition, trigger configuration with schedules, alert configs, evaluation criteria, agent-scoped governance policies, and a resolved dependency manifest that maps every referenced external entity UUID to its human-readable name.\n\nResponse shape:\n- `export_version`: schema version (currently `\"2\"`)\n- `exported_at`: ISO-8601 timestamp\n- `agent`: name, description, schema_version, definition, timestamps\n- `trigger`: trigger type, input template, schedules\n- `alert_configs`: alert type, thresholds, recipients\n- `evaluation_criteria`: evaluation settings per step\n- `governance_policies`: agent-scoped governance policies\n- `dependencies`: knowledge_bases, memory_banks, source_connections, agents, users\n\nQuery params:\n- `download` (default true): when true, sets `Content-Disposition: attachment` so clients treat the response as a file download.\n\nAuth & scoping:\n- Requires `X-API-Key` header or OAuth Bearer token.\n- When using OAuth, you may target a different organization account with `X-Account-Id`; for API keys, the key's account is always used.\n- You can only export agents belonging to the resolved account.", "operationId": "export_agent_api_agents__agent_id__export_get", "parameters": [ { @@ -11469,7 +11469,7 @@ }, "/me": { "get": { - "description": "Returns the authenticated user's personal account ID and a list of organisations they belong to. Each organisation entry includes the organisation's own id, display name, and account_id. Useful for CLI tooling that needs to let the user pick an org context.", + "description": "Returns the authenticated user's personal account ID and a list of organizations they belong to. Each organization entry includes the organization's id, name, and account_id. Useful for CLI tooling that needs to let the user pick an organization context.", "operationId": "get_me_api_me_get", "parameters": [ { diff --git a/seclai/_generated/api/agents/export_agent_api_agents_agent_id_export_get.py b/seclai/_generated/api/agents/export_agent_api_agents_agent_id_export_get.py index c9af997..8c68f02 100644 --- a/seclai/_generated/api/agents/export_agent_api_agents_agent_id_export_get.py +++ b/seclai/_generated/api/agents/export_agent_api_agents_agent_id_export_get.py @@ -100,7 +100,10 @@ def sync_detailed( response as a file download. Auth & scoping: - - Requires `X-API-Key`. You can only export agents belonging to your account. + - Requires `X-API-Key` header or OAuth Bearer token. + - When using OAuth, you may target a different organization account with `X-Account-Id`; for API + keys, the key's account is always used. + - You can only export agents belonging to the resolved account. Args: agent_id (str): @@ -158,7 +161,10 @@ def sync( response as a file download. Auth & scoping: - - Requires `X-API-Key`. You can only export agents belonging to your account. + - Requires `X-API-Key` header or OAuth Bearer token. + - When using OAuth, you may target a different organization account with `X-Account-Id`; for API + keys, the key's account is always used. + - You can only export agents belonging to the resolved account. Args: agent_id (str): @@ -211,7 +217,10 @@ async def asyncio_detailed( response as a file download. Auth & scoping: - - Requires `X-API-Key`. You can only export agents belonging to your account. + - Requires `X-API-Key` header or OAuth Bearer token. + - When using OAuth, you may target a different organization account with `X-Account-Id`; for API + keys, the key's account is always used. + - You can only export agents belonging to the resolved account. Args: agent_id (str): @@ -267,7 +276,10 @@ async def asyncio( response as a file download. Auth & scoping: - - Requires `X-API-Key`. You can only export agents belonging to your account. + - Requires `X-API-Key` header or OAuth Bearer token. + - When using OAuth, you may target a different organization account with `X-Account-Id`; for API + keys, the key's account is always used. + - You can only export agents belonging to the resolved account. Args: agent_id (str): diff --git a/seclai/_generated/api/identity/get_me_api_me_get.py b/seclai/_generated/api/identity/get_me_api_me_get.py index 4847303..0d0170f 100644 --- a/seclai/_generated/api/identity/get_me_api_me_get.py +++ b/seclai/_generated/api/identity/get_me_api_me_get.py @@ -59,9 +59,9 @@ def sync_detailed( ) -> Response[MeResponse]: """Get current user identity - Returns the authenticated user's personal account ID and a list of organisations they belong to. - Each organisation entry includes the organisation's own id, display name, and account_id. Useful - for CLI tooling that needs to let the user pick an org context. + Returns the authenticated user's personal account ID and a list of organizations they belong to. + Each organization entry includes the organization's id, name, and account_id. Useful for CLI tooling + that needs to let the user pick an organization context. Args: x_account_id (UUID | Unset): @@ -92,9 +92,9 @@ def sync( ) -> MeResponse | None: """Get current user identity - Returns the authenticated user's personal account ID and a list of organisations they belong to. - Each organisation entry includes the organisation's own id, display name, and account_id. Useful - for CLI tooling that needs to let the user pick an org context. + Returns the authenticated user's personal account ID and a list of organizations they belong to. + Each organization entry includes the organization's id, name, and account_id. Useful for CLI tooling + that needs to let the user pick an organization context. Args: x_account_id (UUID | Unset): @@ -120,9 +120,9 @@ async def asyncio_detailed( ) -> Response[MeResponse]: """Get current user identity - Returns the authenticated user's personal account ID and a list of organisations they belong to. - Each organisation entry includes the organisation's own id, display name, and account_id. Useful - for CLI tooling that needs to let the user pick an org context. + Returns the authenticated user's personal account ID and a list of organizations they belong to. + Each organization entry includes the organization's id, name, and account_id. Useful for CLI tooling + that needs to let the user pick an organization context. Args: x_account_id (UUID | Unset): @@ -151,9 +151,9 @@ async def asyncio( ) -> MeResponse | None: """Get current user identity - Returns the authenticated user's personal account ID and a list of organisations they belong to. - Each organisation entry includes the organisation's own id, display name, and account_id. Useful - for CLI tooling that needs to let the user pick an org context. + Returns the authenticated user's personal account ID and a list of organizations they belong to. + Each organization entry includes the organization's id, name, and account_id. Useful for CLI tooling + that needs to let the user pick an organization context. Args: x_account_id (UUID | Unset): From 4cfdcc4b0f9cc88b7a1495877eaabc768396bed7 Mon Sep 17 00:00:00 2001 From: Kim Burgaard Date: Wed, 1 Apr 2026 22:00:13 -0700 Subject: [PATCH 3/7] Fixed lint errors --- poetry.lock | 14 +++++++++++++- pyproject.toml | 1 + 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/poetry.lock b/poetry.lock index c392d4f..22352b0 100644 --- a/poetry.lock +++ b/poetry.lock @@ -990,6 +990,18 @@ rich = ">=10.11.0" shellingham = ">=1.3.0" typing-extensions = ">=3.7.4.3" +[[package]] +name = "types-python-dateutil" +version = "2.9.0.20260402" +description = "Typing stubs for python-dateutil" +optional = false +python-versions = ">=3.10" +groups = ["dev"] +files = [ + {file = "types_python_dateutil-2.9.0.20260402-py3-none-any.whl", hash = "sha256:7827e6a9c93587cc18e766944254d1351a2396262e4abe1510cbbd7601c5e01f"}, + {file = "types_python_dateutil-2.9.0.20260402.tar.gz", hash = "sha256:a980142b9966713acb382c467e35c5cc4208a2f91b10b8d785a0ae6765df6c0b"}, +] + [[package]] name = "typing-extensions" version = "4.15.0" @@ -1020,4 +1032,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.1" python-versions = ">=3.11,<4.0" -content-hash = "a010defeb9129616dd41f70ff275ec16b0fc60156aaef6b340bda2112ff24d2b" +content-hash = "9109c39e7824730d7072e4af4f88715b042ac3fff80bad5913f93dffe09d61a5" diff --git a/pyproject.toml b/pyproject.toml index 1a622c7..6316e44 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -109,6 +109,7 @@ mypy = ">=1,<2" black = ">=24,<26" openapi-python-client = ">=0.25,<1" pdoc = ">=14,<15" +types-python-dateutil = "^2.9.0.20260402" [tool.pytest.ini_options] addopts = [ From c32097f1e2e36c667790890ec6b29f40187cf5e6 Mon Sep 17 00:00:00 2001 From: Kim Burgaard Date: Wed, 1 Apr 2026 22:05:39 -0700 Subject: [PATCH 4/7] Addressed review comments --- openapi/seclai.openapi.json | 1 - ...gents_agent_id_evaluation_criteria_post.py | 19 +++++++++---------- ...ation_criteria_criteria_id_results_post.py | 19 +++++++++---------- ..._evaluation_criteria_criteria_id_delete.py | 19 +++++++++---------- ...nts_evaluation_criteria_criteria_id_get.py | 19 +++++++++---------- ...uation_criteria_criteria_id_summary_get.py | 19 +++++++++---------- ...aluation_results_non_manual_summary_get.py | 19 +++++++++---------- ..._agents_agent_id_evaluation_results_get.py | 19 +++++++++---------- ...riteria_criteria_id_compatible_runs_get.py | 19 +++++++++---------- ...agents_agent_id_evaluation_criteria_get.py | 19 +++++++++---------- ...uation_criteria_criteria_id_results_get.py | 19 +++++++++---------- ...api_agents_agent_id_evaluation_runs_get.py | 19 +++++++++---------- ...t_id_runs_run_id_evaluation_results_get.py | 19 +++++++++---------- ..._id_evaluation_criteria_test_draft_post.py | 19 +++++++++---------- ...s_evaluation_criteria_criteria_id_patch.py | 19 +++++++++---------- ...ts_agent_id_input_uploads_upload_id_get.py | 19 +++++++++---------- ...t_api_agents_agent_id_upload_input_post.py | 19 +++++++++---------- .../agents/create_agent_api_agents_post.py | 19 +++++++++---------- ...delete_agent_api_agents_agent_id_delete.py | 19 +++++++++---------- ...agent_run_api_agents_runs_run_id_delete.py | 19 +++++++++---------- ...rt_agent_api_agents_agent_id_export_get.py | 19 +++++++++---------- ...ent_id_ai_assistant_generate_steps_post.py | 19 +++++++++---------- ..._agent_id_ai_assistant_step_config_post.py | 19 +++++++++---------- ...tion_api_agents_agent_id_definition_get.py | 19 +++++++++---------- ..._agent_metadata_api_agents_agent_id_get.py | 19 +++++++++---------- ...et_agent_run_api_agents_runs_run_id_get.py | 19 +++++++++---------- ...agent_id_ai_assistant_conversations_get.py | 19 +++++++++---------- ...agent_runs_api_agents_agent_id_runs_get.py | 19 +++++++++---------- .../api/agents/list_agents_api_agents_get.py | 19 +++++++++---------- ...t_id_ai_assistant_conversation_id_patch.py | 19 +++++++++---------- ...run_agent_api_agents_agent_id_runs_post.py | 19 +++++++++---------- ...nt_api_agents_agent_id_runs_stream_post.py | 19 +++++++++---------- ..._agent_runs_api_agents_runs_search_post.py | 19 +++++++++---------- .../update_agent_api_agents_agent_id_put.py | 19 +++++++++---------- ...tion_api_agents_agent_id_definition_put.py | 19 +++++++++---------- ...i_assistant_conversation_id_accept_post.py | 18 +++++++++--------- ..._assistant_conversation_id_decline_post.py | 18 +++++++++--------- ...feedback_api_ai_assistant_feedback_post.py | 19 +++++++++---------- ...se_api_ai_assistant_knowledge_base_post.py | 19 +++++++++---------- ...stant_memory_bank_conversation_id_patch.py | 18 +++++++++--------- ..._bank_api_ai_assistant_memory_bank_post.py | 19 +++++++++---------- ...stant_memory_bank_last_conversation_get.py | 19 +++++++++---------- ...solution_api_ai_assistant_solution_post.py | 19 +++++++++---------- ..._ai_source_api_ai_assistant_source_post.py | 19 +++++++++---------- ...mment_api_alerts_alert_id_comments_post.py | 19 +++++++++---------- ..._status_api_alerts_alert_id_status_post.py | 19 +++++++++---------- ...te_alert_config_api_alerts_configs_post.py | 19 +++++++++---------- ...fig_api_alerts_configs_config_id_delete.py | 19 +++++++++---------- ...config_api_alerts_configs_config_id_get.py | 19 +++++++++---------- ...et_alert_detail_api_alerts_alert_id_get.py | 19 +++++++++---------- ...st_alert_configs_api_alerts_configs_get.py | 19 +++++++++---------- .../api/alerts/list_alerts_api_alerts_get.py | 19 +++++++++---------- ...lerts_organization_preferences_list_get.py | 18 +++++++++--------- ...lert_api_alerts_alert_id_subscribe_post.py | 19 +++++++++---------- ...rt_api_alerts_alert_id_unsubscribe_post.py | 19 +++++++++---------- ...nfig_api_alerts_configs_config_id_patch.py | 19 +++++++++---------- ...rences_organization_id_alert_type_patch.py | 18 +++++++++--------- ...ource_connection_content_version_delete.py | 19 +++++++++---------- ...s_source_connection_content_version_get.py | 19 +++++++++---------- ...nnection_content_version_embeddings_get.py | 19 +++++++++---------- ...s_source_connection_content_version_put.py | 19 +++++++++---------- ..._connection_content_version_upload_post.py | 19 +++++++++---------- ...i_assistant_conversation_id_accept_post.py | 18 +++++++++--------- ..._assistant_conversation_id_decline_post.py | 18 +++++++++--------- ...nerate_api_governance_ai_assistant_post.py | 19 +++++++++---------- ...vernance_ai_assistant_conversations_get.py | 19 +++++++++---------- .../api/identity/get_me_api_me_get.py | 19 +++++++++---------- ...knowledge_base_api_knowledge_bases_post.py | 19 +++++++++---------- ...nowledge_bases_knowledge_base_id_delete.py | 19 +++++++++---------- ...i_knowledge_bases_knowledge_base_id_get.py | 19 +++++++++---------- ...knowledge_bases_api_knowledge_bases_get.py | 19 +++++++++---------- ...i_knowledge_bases_knowledge_base_id_put.py | 19 +++++++++---------- ...emory_banks_memory_bank_id_compact_post.py | 19 +++++++++---------- ...reate_memory_bank_api_memory_banks_post.py | 19 +++++++++---------- ..._api_memory_banks_memory_bank_id_delete.py | 19 +++++++++---------- ...mory_banks_memory_bank_id_source_delete.py | 19 +++++++++---------- ..._memory_banks_memory_bank_id_agents_get.py | 19 +++++++++---------- ...ank_api_memory_banks_memory_bank_id_get.py | 19 +++++++++---------- ...i_memory_banks_memory_bank_id_stats_get.py | 19 +++++++++---------- .../list_memory_banks_api_memory_banks_get.py | 19 +++++++++---------- ...emplates_api_memory_banks_templates_get.py | 19 +++++++++---------- ...anks_ai_assistant_conversation_id_patch.py | 18 +++++++++--------- ...rate_api_memory_banks_ai_assistant_post.py | 19 +++++++++---------- ...anks_ai_assistant_last_conversation_get.py | 19 +++++++++---------- ...nks_memory_bank_id_test_compaction_post.py | 19 +++++++++---------- ...e_api_memory_banks_test_compaction_post.py | 19 +++++++++---------- ...ank_api_memory_banks_memory_bank_id_put.py | 19 +++++++++---------- ...ount_api_models_alerts_unread_count_get.py | 19 +++++++++---------- ...api_models_model_id_recommendations_get.py | 19 +++++++++---------- .../list_alerts_api_models_alerts_get.py | 19 +++++++++---------- ...ad_api_models_alerts_mark_all_read_post.py | 11 +++++------ ...d_api_models_alerts_alert_id_read_patch.py | 18 +++++++++--------- .../api/search/search_api_search_get.py | 19 +++++++++---------- ...olutions_solution_id_conversations_post.py | 18 +++++++++--------- ...i_assistant_conversation_id_accept_post.py | 18 +++++++++--------- ..._assistant_conversation_id_decline_post.py | 18 +++++++++--------- ..._solution_id_ai_assistant_generate_post.py | 18 +++++++++--------- ...ion_id_ai_assistant_knowledge_base_post.py | 18 +++++++++--------- ...ns_solution_id_ai_assistant_source_post.py | 18 +++++++++--------- .../create_solution_api_solutions_post.py | 19 +++++++++---------- ...lution_api_solutions_solution_id_delete.py | 18 +++++++++--------- ..._solution_api_solutions_solution_id_get.py | 18 +++++++++--------- ...s_api_solutions_solution_id_agents_post.py | 18 +++++++++--------- ...utions_solution_id_knowledge_bases_post.py | 18 +++++++++--------- ...ons_solution_id_source_connections_post.py | 18 +++++++++--------- ...solutions_solution_id_conversations_get.py | 18 +++++++++--------- .../list_solutions_api_solutions_get.py | 19 +++++++++---------- ..._id_conversations_conversation_id_patch.py | 18 +++++++++--------- ...api_solutions_solution_id_agents_delete.py | 18 +++++++++--------- ...ions_solution_id_knowledge_bases_delete.py | 18 +++++++++--------- ...s_solution_id_source_connections_delete.py | 18 +++++++++--------- ...olution_api_solutions_solution_id_patch.py | 18 +++++++++--------- ...ection_id_exports_export_id_cancel_post.py | 18 +++++++++--------- ...urces_source_connection_id_exports_post.py | 18 +++++++++--------- ..._connection_id_exports_export_id_delete.py | 18 +++++++++--------- ...ction_id_exports_export_id_download_get.py | 18 +++++++++--------- ...rce_connection_id_exports_estimate_post.py | 18 +++++++++--------- ...rce_connection_id_exports_export_id_get.py | 18 +++++++++--------- ...ources_source_connection_id_exports_get.py | 18 +++++++++--------- ...tion_id_embedding_migration_cancel_post.py | 18 +++++++++--------- .../sources/create_source_api_sources_post.py | 19 +++++++++---------- ...api_sources_source_connection_id_delete.py | 18 +++++++++--------- ...ce_api_sources_source_connection_id_get.py | 18 +++++++++--------- ...e_connection_id_embedding_migration_get.py | 18 +++++++++--------- .../sources/list_sources_api_sources_get.py | 19 +++++++++---------- ..._connection_id_embedding_migration_post.py | 18 +++++++++--------- ...ce_api_sources_source_connection_id_put.py | 18 +++++++++--------- ...ources_source_connection_id_upload_post.py | 19 +++++++++---------- ...e_api_sources_source_connection_id_post.py | 18 +++++++++--------- 129 files changed, 1148 insertions(+), 1237 deletions(-) diff --git a/openapi/seclai.openapi.json b/openapi/seclai.openapi.json index 6e6e6f8..69be258 100644 --- a/openapi/seclai.openapi.json +++ b/openapi/seclai.openapi.json @@ -7,7 +7,6 @@ "name": "X-Account-Id", "required": false, "schema": { - "format": "uuid", "type": "string" } } diff --git a/seclai/_generated/api/agent_evaluations/create_evaluation_criteria_api_agents_agent_id_evaluation_criteria_post.py b/seclai/_generated/api/agent_evaluations/create_evaluation_criteria_api_agents_agent_id_evaluation_criteria_post.py index ecb7cc2..70e2e11 100644 --- a/seclai/_generated/api/agent_evaluations/create_evaluation_criteria_api_agents_agent_id_evaluation_criteria_post.py +++ b/seclai/_generated/api/agent_evaluations/create_evaluation_criteria_api_agents_agent_id_evaluation_criteria_post.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -17,7 +16,7 @@ def _get_kwargs( agent_id: str, *, body: CreateEvaluationCriteriaRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +72,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: CreateEvaluationCriteriaRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[EvaluationCriteriaResponse | HTTPValidationError]: """Create Evaluation Criteria @@ -84,7 +83,7 @@ def sync_detailed( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (CreateEvaluationCriteriaRequest): Request body for creating an evaluation criteria. The evaluation mode, retry settings, and sample frequency are set at the @@ -116,7 +115,7 @@ def sync( *, client: AuthenticatedClient | Client, body: CreateEvaluationCriteriaRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> EvaluationCriteriaResponse | HTTPValidationError | None: """Create Evaluation Criteria @@ -127,7 +126,7 @@ def sync( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (CreateEvaluationCriteriaRequest): Request body for creating an evaluation criteria. The evaluation mode, retry settings, and sample frequency are set at the @@ -154,7 +153,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: CreateEvaluationCriteriaRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[EvaluationCriteriaResponse | HTTPValidationError]: """Create Evaluation Criteria @@ -165,7 +164,7 @@ async def asyncio_detailed( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (CreateEvaluationCriteriaRequest): Request body for creating an evaluation criteria. The evaluation mode, retry settings, and sample frequency are set at the @@ -195,7 +194,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: CreateEvaluationCriteriaRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> EvaluationCriteriaResponse | HTTPValidationError | None: """Create Evaluation Criteria @@ -206,7 +205,7 @@ async def asyncio( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (CreateEvaluationCriteriaRequest): Request body for creating an evaluation criteria. The evaluation mode, retry settings, and sample frequency are set at the diff --git a/seclai/_generated/api/agent_evaluations/create_evaluation_result_api_agents_evaluation_criteria_criteria_id_results_post.py b/seclai/_generated/api/agent_evaluations/create_evaluation_result_api_agents_evaluation_criteria_criteria_id_results_post.py index bfdbb66..b50797e 100644 --- a/seclai/_generated/api/agent_evaluations/create_evaluation_result_api_agents_evaluation_criteria_criteria_id_results_post.py +++ b/seclai/_generated/api/agent_evaluations/create_evaluation_result_api_agents_evaluation_criteria_criteria_id_results_post.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -17,7 +16,7 @@ def _get_kwargs( criteria_id: str, *, body: CreateEvaluationResultRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +72,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: CreateEvaluationResultRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[EvaluationResultResponse | HTTPValidationError]: """Create Evaluation Result @@ -85,7 +84,7 @@ def sync_detailed( Args: criteria_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (CreateEvaluationResultRequest): Request body for recording an evaluation result. Raises: @@ -114,7 +113,7 @@ def sync( *, client: AuthenticatedClient | Client, body: CreateEvaluationResultRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> EvaluationResultResponse | HTTPValidationError | None: """Create Evaluation Result @@ -126,7 +125,7 @@ def sync( Args: criteria_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (CreateEvaluationResultRequest): Request body for recording an evaluation result. Raises: @@ -150,7 +149,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: CreateEvaluationResultRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[EvaluationResultResponse | HTTPValidationError]: """Create Evaluation Result @@ -162,7 +161,7 @@ async def asyncio_detailed( Args: criteria_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (CreateEvaluationResultRequest): Request body for recording an evaluation result. Raises: @@ -189,7 +188,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: CreateEvaluationResultRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> EvaluationResultResponse | HTTPValidationError | None: """Create Evaluation Result @@ -201,7 +200,7 @@ async def asyncio( Args: criteria_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (CreateEvaluationResultRequest): Request body for recording an evaluation result. Raises: diff --git a/seclai/_generated/api/agent_evaluations/delete_evaluation_criteria_api_agents_evaluation_criteria_criteria_id_delete.py b/seclai/_generated/api/agent_evaluations/delete_evaluation_criteria_api_agents_evaluation_criteria_criteria_id_delete.py index a5c1c26..817438c 100644 --- a/seclai/_generated/api/agent_evaluations/delete_evaluation_criteria_api_agents_evaluation_criteria_criteria_id_delete.py +++ b/seclai/_generated/api/agent_evaluations/delete_evaluation_criteria_api_agents_evaluation_criteria_criteria_id_delete.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any, cast from urllib.parse import quote -from uuid import UUID import httpx @@ -14,7 +13,7 @@ def _get_kwargs( criteria_id: str, *, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -64,7 +63,7 @@ def sync_detailed( criteria_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Delete Evaluation Criteria @@ -75,7 +74,7 @@ def sync_detailed( Args: criteria_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -101,7 +100,7 @@ def sync( criteria_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Delete Evaluation Criteria @@ -112,7 +111,7 @@ def sync( Args: criteria_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -133,7 +132,7 @@ async def asyncio_detailed( criteria_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Delete Evaluation Criteria @@ -144,7 +143,7 @@ async def asyncio_detailed( Args: criteria_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -168,7 +167,7 @@ async def asyncio( criteria_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Delete Evaluation Criteria @@ -179,7 +178,7 @@ async def asyncio( Args: criteria_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/agent_evaluations/get_evaluation_criteria_api_agents_evaluation_criteria_criteria_id_get.py b/seclai/_generated/api/agent_evaluations/get_evaluation_criteria_api_agents_evaluation_criteria_criteria_id_get.py index aa062f8..3c2afa6 100644 --- a/seclai/_generated/api/agent_evaluations/get_evaluation_criteria_api_agents_evaluation_criteria_criteria_id_get.py +++ b/seclai/_generated/api/agent_evaluations/get_evaluation_criteria_api_agents_evaluation_criteria_criteria_id_get.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -15,7 +14,7 @@ def _get_kwargs( criteria_id: str, *, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -66,7 +65,7 @@ def sync_detailed( criteria_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[EvaluationCriteriaResponse | HTTPValidationError]: """Get Evaluation Criteria @@ -77,7 +76,7 @@ def sync_detailed( Args: criteria_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -103,7 +102,7 @@ def sync( criteria_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> EvaluationCriteriaResponse | HTTPValidationError | None: """Get Evaluation Criteria @@ -114,7 +113,7 @@ def sync( Args: criteria_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -135,7 +134,7 @@ async def asyncio_detailed( criteria_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[EvaluationCriteriaResponse | HTTPValidationError]: """Get Evaluation Criteria @@ -146,7 +145,7 @@ async def asyncio_detailed( Args: criteria_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -170,7 +169,7 @@ async def asyncio( criteria_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> EvaluationCriteriaResponse | HTTPValidationError | None: """Get Evaluation Criteria @@ -181,7 +180,7 @@ async def asyncio( Args: criteria_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/agent_evaluations/get_evaluation_summary_api_agents_evaluation_criteria_criteria_id_summary_get.py b/seclai/_generated/api/agent_evaluations/get_evaluation_summary_api_agents_evaluation_criteria_criteria_id_summary_get.py index 98e5f27..3d9bbf9 100644 --- a/seclai/_generated/api/agent_evaluations/get_evaluation_summary_api_agents_evaluation_criteria_criteria_id_summary_get.py +++ b/seclai/_generated/api/agent_evaluations/get_evaluation_summary_api_agents_evaluation_criteria_criteria_id_summary_get.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -15,7 +14,7 @@ def _get_kwargs( criteria_id: str, *, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -66,7 +65,7 @@ def sync_detailed( criteria_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[EvaluationResultSummaryResponse | HTTPValidationError]: """Get Evaluation Summary @@ -77,7 +76,7 @@ def sync_detailed( Args: criteria_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -103,7 +102,7 @@ def sync( criteria_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> EvaluationResultSummaryResponse | HTTPValidationError | None: """Get Evaluation Summary @@ -114,7 +113,7 @@ def sync( Args: criteria_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -135,7 +134,7 @@ async def asyncio_detailed( criteria_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[EvaluationResultSummaryResponse | HTTPValidationError]: """Get Evaluation Summary @@ -146,7 +145,7 @@ async def asyncio_detailed( Args: criteria_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -170,7 +169,7 @@ async def asyncio( criteria_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> EvaluationResultSummaryResponse | HTTPValidationError | None: """Get Evaluation Summary @@ -181,7 +180,7 @@ async def asyncio( Args: criteria_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/agent_evaluations/get_non_manual_evaluation_summary_api_agents_evaluation_results_non_manual_summary_get.py b/seclai/_generated/api/agent_evaluations/get_non_manual_evaluation_summary_api_agents_evaluation_results_non_manual_summary_get.py index 1ac2c80..31f6ef4 100644 --- a/seclai/_generated/api/agent_evaluations/get_non_manual_evaluation_summary_api_agents_evaluation_results_non_manual_summary_get.py +++ b/seclai/_generated/api/agent_evaluations/get_non_manual_evaluation_summary_api_agents_evaluation_results_non_manual_summary_get.py @@ -1,6 +1,5 @@ from http import HTTPStatus from typing import Any -from uuid import UUID import httpx @@ -18,7 +17,7 @@ def _get_kwargs( days: int | Unset = 30, start_date: None | str | Unset = UNSET, end_date: None | str | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -90,7 +89,7 @@ def sync_detailed( days: int | Unset = 30, start_date: None | str | Unset = UNSET, end_date: None | str | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | NonManualEvaluationSummaryResponse]: """Get Non Manual Evaluation Summary @@ -103,7 +102,7 @@ def sync_detailed( days (int | Unset): Default: 30. start_date (None | str | Unset): end_date (None | str | Unset): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -133,7 +132,7 @@ def sync( days: int | Unset = 30, start_date: None | str | Unset = UNSET, end_date: None | str | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | NonManualEvaluationSummaryResponse | None: """Get Non Manual Evaluation Summary @@ -146,7 +145,7 @@ def sync( days (int | Unset): Default: 30. start_date (None | str | Unset): end_date (None | str | Unset): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -171,7 +170,7 @@ async def asyncio_detailed( days: int | Unset = 30, start_date: None | str | Unset = UNSET, end_date: None | str | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | NonManualEvaluationSummaryResponse]: """Get Non Manual Evaluation Summary @@ -184,7 +183,7 @@ async def asyncio_detailed( days (int | Unset): Default: 30. start_date (None | str | Unset): end_date (None | str | Unset): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -212,7 +211,7 @@ async def asyncio( days: int | Unset = 30, start_date: None | str | Unset = UNSET, end_date: None | str | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | NonManualEvaluationSummaryResponse | None: """Get Non Manual Evaluation Summary @@ -225,7 +224,7 @@ async def asyncio( days (int | Unset): Default: 30. start_date (None | str | Unset): end_date (None | str | Unset): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/agent_evaluations/list_agent_evaluation_results_api_agents_agent_id_evaluation_results_get.py b/seclai/_generated/api/agent_evaluations/list_agent_evaluation_results_api_agents_agent_id_evaluation_results_get.py index ffdc855..194b68e 100644 --- a/seclai/_generated/api/agent_evaluations/list_agent_evaluation_results_api_agents_agent_id_evaluation_results_get.py +++ b/seclai/_generated/api/agent_evaluations/list_agent_evaluation_results_api_agents_agent_id_evaluation_results_get.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -24,7 +23,7 @@ def _get_kwargs( time_to: None | str | Unset = UNSET, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -123,7 +122,7 @@ def sync_detailed( time_to: None | str | Unset = UNSET, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[EvaluationResultWithCriteriaListResponse | HTTPValidationError]: """List Agent Evaluation Results @@ -141,7 +140,7 @@ def sync_detailed( time_to (None | str | Unset): page (int | Unset): Default: 1. limit (int | Unset): Default: 20. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -181,7 +180,7 @@ def sync( time_to: None | str | Unset = UNSET, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> EvaluationResultWithCriteriaListResponse | HTTPValidationError | None: """List Agent Evaluation Results @@ -199,7 +198,7 @@ def sync( time_to (None | str | Unset): page (int | Unset): Default: 1. limit (int | Unset): Default: 20. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -234,7 +233,7 @@ async def asyncio_detailed( time_to: None | str | Unset = UNSET, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[EvaluationResultWithCriteriaListResponse | HTTPValidationError]: """List Agent Evaluation Results @@ -252,7 +251,7 @@ async def asyncio_detailed( time_to (None | str | Unset): page (int | Unset): Default: 1. limit (int | Unset): Default: 20. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -290,7 +289,7 @@ async def asyncio( time_to: None | str | Unset = UNSET, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> EvaluationResultWithCriteriaListResponse | HTTPValidationError | None: """List Agent Evaluation Results @@ -308,7 +307,7 @@ async def asyncio( time_to (None | str | Unset): page (int | Unset): Default: 1. limit (int | Unset): Default: 20. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/agent_evaluations/list_compatible_runs_api_agents_evaluation_criteria_criteria_id_compatible_runs_get.py b/seclai/_generated/api/agent_evaluations/list_compatible_runs_api_agents_evaluation_criteria_criteria_id_compatible_runs_get.py index 8b3a9de..d66514d 100644 --- a/seclai/_generated/api/agent_evaluations/list_compatible_runs_api_agents_evaluation_criteria_criteria_id_compatible_runs_get.py +++ b/seclai/_generated/api/agent_evaluations/list_compatible_runs_api_agents_evaluation_criteria_criteria_id_compatible_runs_get.py @@ -2,7 +2,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -19,7 +18,7 @@ def _get_kwargs( page: int | Unset = 1, limit: int | Unset = 20, started_after: datetime.datetime | None | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -91,7 +90,7 @@ def sync_detailed( page: int | Unset = 1, limit: int | Unset = 20, started_after: datetime.datetime | None | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[CompatibleRunListResponse | HTTPValidationError]: """List Compatible Runs @@ -105,7 +104,7 @@ def sync_detailed( page (int | Unset): Default: 1. limit (int | Unset): Default: 20. started_after (datetime.datetime | None | Unset): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -137,7 +136,7 @@ def sync( page: int | Unset = 1, limit: int | Unset = 20, started_after: datetime.datetime | None | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> CompatibleRunListResponse | HTTPValidationError | None: """List Compatible Runs @@ -151,7 +150,7 @@ def sync( page (int | Unset): Default: 1. limit (int | Unset): Default: 20. started_after (datetime.datetime | None | Unset): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -178,7 +177,7 @@ async def asyncio_detailed( page: int | Unset = 1, limit: int | Unset = 20, started_after: datetime.datetime | None | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[CompatibleRunListResponse | HTTPValidationError]: """List Compatible Runs @@ -192,7 +191,7 @@ async def asyncio_detailed( page (int | Unset): Default: 1. limit (int | Unset): Default: 20. started_after (datetime.datetime | None | Unset): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -222,7 +221,7 @@ async def asyncio( page: int | Unset = 1, limit: int | Unset = 20, started_after: datetime.datetime | None | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> CompatibleRunListResponse | HTTPValidationError | None: """List Compatible Runs @@ -236,7 +235,7 @@ async def asyncio( page (int | Unset): Default: 1. limit (int | Unset): Default: 20. started_after (datetime.datetime | None | Unset): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/agent_evaluations/list_evaluation_criteria_api_agents_agent_id_evaluation_criteria_get.py b/seclai/_generated/api/agent_evaluations/list_evaluation_criteria_api_agents_agent_id_evaluation_criteria_get.py index 47f489d..59dda3d 100644 --- a/seclai/_generated/api/agent_evaluations/list_evaluation_criteria_api_agents_agent_id_evaluation_criteria_get.py +++ b/seclai/_generated/api/agent_evaluations/list_evaluation_criteria_api_agents_agent_id_evaluation_criteria_get.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -15,7 +14,7 @@ def _get_kwargs( agent_id: str, *, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +72,7 @@ def sync_detailed( agent_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | list[EvaluationCriteriaResponse]]: """List Evaluation Criteria @@ -85,7 +84,7 @@ def sync_detailed( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -111,7 +110,7 @@ def sync( agent_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | list[EvaluationCriteriaResponse] | None: """List Evaluation Criteria @@ -123,7 +122,7 @@ def sync( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -144,7 +143,7 @@ async def asyncio_detailed( agent_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | list[EvaluationCriteriaResponse]]: """List Evaluation Criteria @@ -156,7 +155,7 @@ async def asyncio_detailed( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -180,7 +179,7 @@ async def asyncio( agent_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | list[EvaluationCriteriaResponse] | None: """List Evaluation Criteria @@ -192,7 +191,7 @@ async def asyncio( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/agent_evaluations/list_evaluation_results_api_agents_evaluation_criteria_criteria_id_results_get.py b/seclai/_generated/api/agent_evaluations/list_evaluation_results_api_agents_evaluation_criteria_criteria_id_results_get.py index 3f7989f..80f4271 100644 --- a/seclai/_generated/api/agent_evaluations/list_evaluation_results_api_agents_evaluation_criteria_criteria_id_results_get.py +++ b/seclai/_generated/api/agent_evaluations/list_evaluation_results_api_agents_evaluation_criteria_criteria_id_results_get.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -21,7 +20,7 @@ def _get_kwargs( time_to: None | str | Unset = UNSET, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -110,7 +109,7 @@ def sync_detailed( time_to: None | str | Unset = UNSET, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[EvaluationResultListResponse | HTTPValidationError]: """List Evaluation Results @@ -128,7 +127,7 @@ def sync_detailed( time_to (None | str | Unset): page (int | Unset): Default: 1. limit (int | Unset): Default: 20. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -166,7 +165,7 @@ def sync( time_to: None | str | Unset = UNSET, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> EvaluationResultListResponse | HTTPValidationError | None: """List Evaluation Results @@ -184,7 +183,7 @@ def sync( time_to (None | str | Unset): page (int | Unset): Default: 1. limit (int | Unset): Default: 20. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -217,7 +216,7 @@ async def asyncio_detailed( time_to: None | str | Unset = UNSET, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[EvaluationResultListResponse | HTTPValidationError]: """List Evaluation Results @@ -235,7 +234,7 @@ async def asyncio_detailed( time_to (None | str | Unset): page (int | Unset): Default: 1. limit (int | Unset): Default: 20. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -271,7 +270,7 @@ async def asyncio( time_to: None | str | Unset = UNSET, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> EvaluationResultListResponse | HTTPValidationError | None: """List Evaluation Results @@ -289,7 +288,7 @@ async def asyncio( time_to (None | str | Unset): page (int | Unset): Default: 1. limit (int | Unset): Default: 20. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/agent_evaluations/list_evaluation_runs_api_agents_agent_id_evaluation_runs_get.py b/seclai/_generated/api/agent_evaluations/list_evaluation_runs_api_agents_agent_id_evaluation_runs_get.py index 27b49c7..88beaff 100644 --- a/seclai/_generated/api/agent_evaluations/list_evaluation_runs_api_agents_agent_id_evaluation_runs_get.py +++ b/seclai/_generated/api/agent_evaluations/list_evaluation_runs_api_agents_agent_id_evaluation_runs_get.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -23,7 +22,7 @@ def _get_kwargs( time_to: None | str | Unset = UNSET, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -117,7 +116,7 @@ def sync_detailed( time_to: None | str | Unset = UNSET, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[EvaluationRunSummaryListResponse | HTTPValidationError]: """List Evaluation Runs @@ -134,7 +133,7 @@ def sync_detailed( time_to (None | str | Unset): page (int | Unset): Default: 1. limit (int | Unset): Default: 20. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -172,7 +171,7 @@ def sync( time_to: None | str | Unset = UNSET, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> EvaluationRunSummaryListResponse | HTTPValidationError | None: """List Evaluation Runs @@ -189,7 +188,7 @@ def sync( time_to (None | str | Unset): page (int | Unset): Default: 1. limit (int | Unset): Default: 20. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -222,7 +221,7 @@ async def asyncio_detailed( time_to: None | str | Unset = UNSET, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[EvaluationRunSummaryListResponse | HTTPValidationError]: """List Evaluation Runs @@ -239,7 +238,7 @@ async def asyncio_detailed( time_to (None | str | Unset): page (int | Unset): Default: 1. limit (int | Unset): Default: 20. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -275,7 +274,7 @@ async def asyncio( time_to: None | str | Unset = UNSET, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> EvaluationRunSummaryListResponse | HTTPValidationError | None: """List Evaluation Runs @@ -292,7 +291,7 @@ async def asyncio( time_to (None | str | Unset): page (int | Unset): Default: 1. limit (int | Unset): Default: 20. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/agent_evaluations/list_run_evaluation_results_api_agents_agent_id_runs_run_id_evaluation_results_get.py b/seclai/_generated/api/agent_evaluations/list_run_evaluation_results_api_agents_agent_id_runs_run_id_evaluation_results_get.py index af58dc6..ba4dfb7 100644 --- a/seclai/_generated/api/agent_evaluations/list_run_evaluation_results_api_agents_agent_id_runs_run_id_evaluation_results_get.py +++ b/seclai/_generated/api/agent_evaluations/list_run_evaluation_results_api_agents_agent_id_runs_run_id_evaluation_results_get.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -18,7 +17,7 @@ def _get_kwargs( agent_id: str, run_id: str, *, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -78,7 +77,7 @@ def sync_detailed( run_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | list[EvaluationResultWithCriteriaResponse]]: """List Run Evaluation Results @@ -90,7 +89,7 @@ def sync_detailed( Args: agent_id (str): run_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -118,7 +117,7 @@ def sync( run_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | list[EvaluationResultWithCriteriaResponse] | None: """List Run Evaluation Results @@ -130,7 +129,7 @@ def sync( Args: agent_id (str): run_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -153,7 +152,7 @@ async def asyncio_detailed( run_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | list[EvaluationResultWithCriteriaResponse]]: """List Run Evaluation Results @@ -165,7 +164,7 @@ async def asyncio_detailed( Args: agent_id (str): run_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -191,7 +190,7 @@ async def asyncio( run_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | list[EvaluationResultWithCriteriaResponse] | None: """List Run Evaluation Results @@ -203,7 +202,7 @@ async def asyncio( Args: agent_id (str): run_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/agent_evaluations/test_draft_evaluation_api_agents_agent_id_evaluation_criteria_test_draft_post.py b/seclai/_generated/api/agent_evaluations/test_draft_evaluation_api_agents_agent_id_evaluation_criteria_test_draft_post.py index 0da5842..436014b 100644 --- a/seclai/_generated/api/agent_evaluations/test_draft_evaluation_api_agents_agent_id_evaluation_criteria_test_draft_post.py +++ b/seclai/_generated/api/agent_evaluations/test_draft_evaluation_api_agents_agent_id_evaluation_criteria_test_draft_post.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -17,7 +16,7 @@ def _get_kwargs( agent_id: str, *, body: TestDraftEvaluationRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +72,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: TestDraftEvaluationRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | TestDraftEvaluationResponse]: """Test Draft Evaluation @@ -85,7 +84,7 @@ def sync_detailed( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (TestDraftEvaluationRequest): Request body for ephemeral (non-persisted) evaluation testing. @@ -118,7 +117,7 @@ def sync( *, client: AuthenticatedClient | Client, body: TestDraftEvaluationRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | TestDraftEvaluationResponse | None: """Test Draft Evaluation @@ -130,7 +129,7 @@ def sync( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (TestDraftEvaluationRequest): Request body for ephemeral (non-persisted) evaluation testing. @@ -158,7 +157,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: TestDraftEvaluationRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | TestDraftEvaluationResponse]: """Test Draft Evaluation @@ -170,7 +169,7 @@ async def asyncio_detailed( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (TestDraftEvaluationRequest): Request body for ephemeral (non-persisted) evaluation testing. @@ -201,7 +200,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: TestDraftEvaluationRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | TestDraftEvaluationResponse | None: """Test Draft Evaluation @@ -213,7 +212,7 @@ async def asyncio( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (TestDraftEvaluationRequest): Request body for ephemeral (non-persisted) evaluation testing. diff --git a/seclai/_generated/api/agent_evaluations/update_evaluation_criteria_api_agents_evaluation_criteria_criteria_id_patch.py b/seclai/_generated/api/agent_evaluations/update_evaluation_criteria_api_agents_evaluation_criteria_criteria_id_patch.py index 1dd9224..466797f 100644 --- a/seclai/_generated/api/agent_evaluations/update_evaluation_criteria_api_agents_evaluation_criteria_criteria_id_patch.py +++ b/seclai/_generated/api/agent_evaluations/update_evaluation_criteria_api_agents_evaluation_criteria_criteria_id_patch.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -17,7 +16,7 @@ def _get_kwargs( criteria_id: str, *, body: UpdateEvaluationCriteriaRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +72,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: UpdateEvaluationCriteriaRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[EvaluationCriteriaResponse | HTTPValidationError]: """Update Evaluation Criteria @@ -85,7 +84,7 @@ def sync_detailed( Args: criteria_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UpdateEvaluationCriteriaRequest): Request body for updating an evaluation criteria. Retry settings and sample frequency are set at the agent level. @@ -116,7 +115,7 @@ def sync( *, client: AuthenticatedClient | Client, body: UpdateEvaluationCriteriaRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> EvaluationCriteriaResponse | HTTPValidationError | None: """Update Evaluation Criteria @@ -128,7 +127,7 @@ def sync( Args: criteria_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UpdateEvaluationCriteriaRequest): Request body for updating an evaluation criteria. Retry settings and sample frequency are set at the agent level. @@ -154,7 +153,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: UpdateEvaluationCriteriaRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[EvaluationCriteriaResponse | HTTPValidationError]: """Update Evaluation Criteria @@ -166,7 +165,7 @@ async def asyncio_detailed( Args: criteria_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UpdateEvaluationCriteriaRequest): Request body for updating an evaluation criteria. Retry settings and sample frequency are set at the agent level. @@ -195,7 +194,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: UpdateEvaluationCriteriaRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> EvaluationCriteriaResponse | HTTPValidationError | None: """Update Evaluation Criteria @@ -207,7 +206,7 @@ async def asyncio( Args: criteria_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UpdateEvaluationCriteriaRequest): Request body for updating an evaluation criteria. Retry settings and sample frequency are set at the agent level. diff --git a/seclai/_generated/api/agents/api_get_agent_input_upload_status_api_agents_agent_id_input_uploads_upload_id_get.py b/seclai/_generated/api/agents/api_get_agent_input_upload_status_api_agents_agent_id_input_uploads_upload_id_get.py index cdac5b6..5dcd3e7 100644 --- a/seclai/_generated/api/agents/api_get_agent_input_upload_status_api_agents_agent_id_input_uploads_upload_id_get.py +++ b/seclai/_generated/api/agents/api_get_agent_input_upload_status_api_agents_agent_id_input_uploads_upload_id_get.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -16,7 +15,7 @@ def _get_kwargs( agent_id: str, upload_id: str, *, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -69,7 +68,7 @@ def sync_detailed( upload_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | UploadAgentInputApiResponse]: """Get upload status @@ -84,7 +83,7 @@ def sync_detailed( Args: agent_id (str): upload_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -112,7 +111,7 @@ def sync( upload_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | UploadAgentInputApiResponse | None: """Get upload status @@ -127,7 +126,7 @@ def sync( Args: agent_id (str): upload_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -150,7 +149,7 @@ async def asyncio_detailed( upload_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | UploadAgentInputApiResponse]: """Get upload status @@ -165,7 +164,7 @@ async def asyncio_detailed( Args: agent_id (str): upload_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -191,7 +190,7 @@ async def asyncio( upload_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | UploadAgentInputApiResponse | None: """Get upload status @@ -206,7 +205,7 @@ async def asyncio( Args: agent_id (str): upload_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/agents/api_upload_agent_input_api_agents_agent_id_upload_input_post.py b/seclai/_generated/api/agents/api_upload_agent_input_api_agents_agent_id_upload_input_post.py index 862c9b3..661601e 100644 --- a/seclai/_generated/api/agents/api_upload_agent_input_api_agents_agent_id_upload_input_post.py +++ b/seclai/_generated/api/agents/api_upload_agent_input_api_agents_agent_id_upload_input_post.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -15,7 +14,7 @@ def _get_kwargs( agent_id: str, *, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -66,7 +65,7 @@ def sync_detailed( agent_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | UploadAgentInputApiResponse]: """Upload file input @@ -90,7 +89,7 @@ def sync_detailed( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -116,7 +115,7 @@ def sync( agent_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | UploadAgentInputApiResponse | None: """Upload file input @@ -140,7 +139,7 @@ def sync( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -161,7 +160,7 @@ async def asyncio_detailed( agent_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | UploadAgentInputApiResponse]: """Upload file input @@ -185,7 +184,7 @@ async def asyncio_detailed( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -209,7 +208,7 @@ async def asyncio( agent_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | UploadAgentInputApiResponse | None: """Upload file input @@ -233,7 +232,7 @@ async def asyncio( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/agents/create_agent_api_agents_post.py b/seclai/_generated/api/agents/create_agent_api_agents_post.py index cb5a220..e9f3b75 100644 --- a/seclai/_generated/api/agents/create_agent_api_agents_post.py +++ b/seclai/_generated/api/agents/create_agent_api_agents_post.py @@ -1,6 +1,5 @@ from http import HTTPStatus from typing import Any, cast -from uuid import UUID import httpx @@ -15,7 +14,7 @@ def _get_kwargs( *, body: CreateAgentRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -72,7 +71,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: CreateAgentRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[AgentSummaryResponse | Any | HTTPValidationError]: """Create an agent @@ -91,7 +90,7 @@ def sync_detailed( - Requires `X-API-Key` header or OAuth Bearer token. Agent is created in the caller's account. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (CreateAgentRequest): Raises: @@ -118,7 +117,7 @@ def sync( *, client: AuthenticatedClient | Client, body: CreateAgentRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> AgentSummaryResponse | Any | HTTPValidationError | None: """Create an agent @@ -137,7 +136,7 @@ def sync( - Requires `X-API-Key` header or OAuth Bearer token. Agent is created in the caller's account. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (CreateAgentRequest): Raises: @@ -159,7 +158,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: CreateAgentRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[AgentSummaryResponse | Any | HTTPValidationError]: """Create an agent @@ -178,7 +177,7 @@ async def asyncio_detailed( - Requires `X-API-Key` header or OAuth Bearer token. Agent is created in the caller's account. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (CreateAgentRequest): Raises: @@ -203,7 +202,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: CreateAgentRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> AgentSummaryResponse | Any | HTTPValidationError | None: """Create an agent @@ -222,7 +221,7 @@ async def asyncio( - Requires `X-API-Key` header or OAuth Bearer token. Agent is created in the caller's account. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (CreateAgentRequest): Raises: diff --git a/seclai/_generated/api/agents/delete_agent_api_agents_agent_id_delete.py b/seclai/_generated/api/agents/delete_agent_api_agents_agent_id_delete.py index 010abb5..80f597d 100644 --- a/seclai/_generated/api/agents/delete_agent_api_agents_agent_id_delete.py +++ b/seclai/_generated/api/agents/delete_agent_api_agents_agent_id_delete.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any, cast from urllib.parse import quote -from uuid import UUID import httpx @@ -14,7 +13,7 @@ def _get_kwargs( agent_id: str, *, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -64,7 +63,7 @@ def sync_detailed( agent_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Delete an agent @@ -76,7 +75,7 @@ def sync_detailed( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -102,7 +101,7 @@ def sync( agent_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Delete an agent @@ -114,7 +113,7 @@ def sync( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -135,7 +134,7 @@ async def asyncio_detailed( agent_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Delete an agent @@ -147,7 +146,7 @@ async def asyncio_detailed( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -171,7 +170,7 @@ async def asyncio( agent_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Delete an agent @@ -183,7 +182,7 @@ async def asyncio( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/agents/delete_agent_run_api_agents_runs_run_id_delete.py b/seclai/_generated/api/agents/delete_agent_run_api_agents_runs_run_id_delete.py index 3f918ae..8533bf2 100644 --- a/seclai/_generated/api/agents/delete_agent_run_api_agents_runs_run_id_delete.py +++ b/seclai/_generated/api/agents/delete_agent_run_api_agents_runs_run_id_delete.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -15,7 +14,7 @@ def _get_kwargs( run_id: str, *, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -66,7 +65,7 @@ def sync_detailed( run_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[AgentRunResponse | HTTPValidationError]: """Cancel an agent run @@ -80,7 +79,7 @@ def sync_detailed( Args: run_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -106,7 +105,7 @@ def sync( run_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> AgentRunResponse | HTTPValidationError | None: """Cancel an agent run @@ -120,7 +119,7 @@ def sync( Args: run_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -141,7 +140,7 @@ async def asyncio_detailed( run_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[AgentRunResponse | HTTPValidationError]: """Cancel an agent run @@ -155,7 +154,7 @@ async def asyncio_detailed( Args: run_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -179,7 +178,7 @@ async def asyncio( run_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> AgentRunResponse | HTTPValidationError | None: """Cancel an agent run @@ -193,7 +192,7 @@ async def asyncio( Args: run_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/agents/export_agent_api_agents_agent_id_export_get.py b/seclai/_generated/api/agents/export_agent_api_agents_agent_id_export_get.py index 8c68f02..a68ab98 100644 --- a/seclai/_generated/api/agents/export_agent_api_agents_agent_id_export_get.py +++ b/seclai/_generated/api/agents/export_agent_api_agents_agent_id_export_get.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -16,7 +15,7 @@ def _get_kwargs( agent_id: str, *, download: bool | Unset = True, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -75,7 +74,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, download: bool | Unset = True, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[AgentExportResponse | HTTPValidationError]: r"""Export agent definition @@ -108,7 +107,7 @@ def sync_detailed( Args: agent_id (str): download (bool | Unset): Return as file download Default: True. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -136,7 +135,7 @@ def sync( *, client: AuthenticatedClient | Client, download: bool | Unset = True, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> AgentExportResponse | HTTPValidationError | None: r"""Export agent definition @@ -169,7 +168,7 @@ def sync( Args: agent_id (str): download (bool | Unset): Return as file download Default: True. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -192,7 +191,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, download: bool | Unset = True, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[AgentExportResponse | HTTPValidationError]: r"""Export agent definition @@ -225,7 +224,7 @@ async def asyncio_detailed( Args: agent_id (str): download (bool | Unset): Return as file download Default: True. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -251,7 +250,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, download: bool | Unset = True, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> AgentExportResponse | HTTPValidationError | None: r"""Export agent definition @@ -284,7 +283,7 @@ async def asyncio( Args: agent_id (str): download (bool | Unset): Return as file download Default: True. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/agents/generate_agent_steps_api_agents_agent_id_ai_assistant_generate_steps_post.py b/seclai/_generated/api/agents/generate_agent_steps_api_agents_agent_id_ai_assistant_generate_steps_post.py index e0b2ea3..9d3c5ac 100644 --- a/seclai/_generated/api/agents/generate_agent_steps_api_agents_agent_id_ai_assistant_generate_steps_post.py +++ b/seclai/_generated/api/agents/generate_agent_steps_api_agents_agent_id_ai_assistant_generate_steps_post.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -17,7 +16,7 @@ def _get_kwargs( agent_id: str, *, body: GenerateAgentStepsRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +72,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: GenerateAgentStepsRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[GenerateAgentStepsResponse | HTTPValidationError]: """Generate agent workflow @@ -89,7 +88,7 @@ def sync_detailed( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (GenerateAgentStepsRequest): Raises: @@ -118,7 +117,7 @@ def sync( *, client: AuthenticatedClient | Client, body: GenerateAgentStepsRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> GenerateAgentStepsResponse | HTTPValidationError | None: """Generate agent workflow @@ -134,7 +133,7 @@ def sync( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (GenerateAgentStepsRequest): Raises: @@ -158,7 +157,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: GenerateAgentStepsRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[GenerateAgentStepsResponse | HTTPValidationError]: """Generate agent workflow @@ -174,7 +173,7 @@ async def asyncio_detailed( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (GenerateAgentStepsRequest): Raises: @@ -201,7 +200,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: GenerateAgentStepsRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> GenerateAgentStepsResponse | HTTPValidationError | None: """Generate agent workflow @@ -217,7 +216,7 @@ async def asyncio( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (GenerateAgentStepsRequest): Raises: diff --git a/seclai/_generated/api/agents/generate_step_config_api_agents_agent_id_ai_assistant_step_config_post.py b/seclai/_generated/api/agents/generate_step_config_api_agents_agent_id_ai_assistant_step_config_post.py index aa8d1ac..f63e34f 100644 --- a/seclai/_generated/api/agents/generate_step_config_api_agents_agent_id_ai_assistant_step_config_post.py +++ b/seclai/_generated/api/agents/generate_step_config_api_agents_agent_id_ai_assistant_step_config_post.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -17,7 +16,7 @@ def _get_kwargs( agent_id: str, *, body: GenerateStepConfigRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +72,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: GenerateStepConfigRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[GenerateStepConfigResponse | HTTPValidationError]: """Generate step configuration @@ -89,7 +88,7 @@ def sync_detailed( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (GenerateStepConfigRequest): Raises: @@ -118,7 +117,7 @@ def sync( *, client: AuthenticatedClient | Client, body: GenerateStepConfigRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> GenerateStepConfigResponse | HTTPValidationError | None: """Generate step configuration @@ -134,7 +133,7 @@ def sync( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (GenerateStepConfigRequest): Raises: @@ -158,7 +157,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: GenerateStepConfigRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[GenerateStepConfigResponse | HTTPValidationError]: """Generate step configuration @@ -174,7 +173,7 @@ async def asyncio_detailed( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (GenerateStepConfigRequest): Raises: @@ -201,7 +200,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: GenerateStepConfigRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> GenerateStepConfigResponse | HTTPValidationError | None: """Generate step configuration @@ -217,7 +216,7 @@ async def asyncio( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (GenerateStepConfigRequest): Raises: diff --git a/seclai/_generated/api/agents/get_agent_definition_api_agents_agent_id_definition_get.py b/seclai/_generated/api/agents/get_agent_definition_api_agents_agent_id_definition_get.py index 593bac6..b3dc7cf 100644 --- a/seclai/_generated/api/agents/get_agent_definition_api_agents_agent_id_definition_get.py +++ b/seclai/_generated/api/agents/get_agent_definition_api_agents_agent_id_definition_get.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -15,7 +14,7 @@ def _get_kwargs( agent_id: str, *, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -66,7 +65,7 @@ def sync_detailed( agent_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[AgentDefinitionResponse | HTTPValidationError]: """Get agent definition @@ -112,7 +111,7 @@ def sync_detailed( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -138,7 +137,7 @@ def sync( agent_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> AgentDefinitionResponse | HTTPValidationError | None: """Get agent definition @@ -184,7 +183,7 @@ def sync( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -205,7 +204,7 @@ async def asyncio_detailed( agent_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[AgentDefinitionResponse | HTTPValidationError]: """Get agent definition @@ -251,7 +250,7 @@ async def asyncio_detailed( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -275,7 +274,7 @@ async def asyncio( agent_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> AgentDefinitionResponse | HTTPValidationError | None: """Get agent definition @@ -321,7 +320,7 @@ async def asyncio( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/agents/get_agent_metadata_api_agents_agent_id_get.py b/seclai/_generated/api/agents/get_agent_metadata_api_agents_agent_id_get.py index 87ed5f4..058402c 100644 --- a/seclai/_generated/api/agents/get_agent_metadata_api_agents_agent_id_get.py +++ b/seclai/_generated/api/agents/get_agent_metadata_api_agents_agent_id_get.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -15,7 +14,7 @@ def _get_kwargs( agent_id: str, *, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -66,7 +65,7 @@ def sync_detailed( agent_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[AgentSummaryResponse | HTTPValidationError]: """Get an agent @@ -78,7 +77,7 @@ def sync_detailed( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -104,7 +103,7 @@ def sync( agent_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> AgentSummaryResponse | HTTPValidationError | None: """Get an agent @@ -116,7 +115,7 @@ def sync( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -137,7 +136,7 @@ async def asyncio_detailed( agent_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[AgentSummaryResponse | HTTPValidationError]: """Get an agent @@ -149,7 +148,7 @@ async def asyncio_detailed( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -173,7 +172,7 @@ async def asyncio( agent_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> AgentSummaryResponse | HTTPValidationError | None: """Get an agent @@ -185,7 +184,7 @@ async def asyncio( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/agents/get_agent_run_api_agents_runs_run_id_get.py b/seclai/_generated/api/agents/get_agent_run_api_agents_runs_run_id_get.py index 39e04c9..7c05fd8 100644 --- a/seclai/_generated/api/agents/get_agent_run_api_agents_runs_run_id_get.py +++ b/seclai/_generated/api/agents/get_agent_run_api_agents_runs_run_id_get.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -16,7 +15,7 @@ def _get_kwargs( run_id: str, *, include_step_outputs: bool | Unset = False, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -75,7 +74,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, include_step_outputs: bool | Unset = False, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[AgentRunResponse | HTTPValidationError]: """Get an agent run @@ -93,7 +92,7 @@ def sync_detailed( run_id (str): include_step_outputs (bool | Unset): If true, include per-step outputs with timing, durations, and credits. Default: False. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -121,7 +120,7 @@ def sync( *, client: AuthenticatedClient | Client, include_step_outputs: bool | Unset = False, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> AgentRunResponse | HTTPValidationError | None: """Get an agent run @@ -139,7 +138,7 @@ def sync( run_id (str): include_step_outputs (bool | Unset): If true, include per-step outputs with timing, durations, and credits. Default: False. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -162,7 +161,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, include_step_outputs: bool | Unset = False, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[AgentRunResponse | HTTPValidationError]: """Get an agent run @@ -180,7 +179,7 @@ async def asyncio_detailed( run_id (str): include_step_outputs (bool | Unset): If true, include per-step outputs with timing, durations, and credits. Default: False. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -206,7 +205,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, include_step_outputs: bool | Unset = False, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> AgentRunResponse | HTTPValidationError | None: """Get an agent run @@ -224,7 +223,7 @@ async def asyncio( run_id (str): include_step_outputs (bool | Unset): If true, include per-step outputs with timing, durations, and credits. Default: False. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/agents/get_ai_conversation_history_api_agents_agent_id_ai_assistant_conversations_get.py b/seclai/_generated/api/agents/get_ai_conversation_history_api_agents_agent_id_ai_assistant_conversations_get.py index 71ca602..0a2538e 100644 --- a/seclai/_generated/api/agents/get_ai_conversation_history_api_agents_agent_id_ai_assistant_conversations_get.py +++ b/seclai/_generated/api/agents/get_ai_conversation_history_api_agents_agent_id_ai_assistant_conversations_get.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -19,7 +18,7 @@ def _get_kwargs( step_id: None | str | Unset = UNSET, limit: int | Unset = 10, offset: int | Unset = 0, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -92,7 +91,7 @@ def sync_detailed( step_id: None | str | Unset = UNSET, limit: int | Unset = 10, offset: int | Unset = 0, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[AiConversationHistoryResponse | HTTPValidationError]: """Get AI conversation history @@ -112,7 +111,7 @@ def sync_detailed( step_id (None | str | Unset): Step ID to filter by. limit (int | Unset): Max turns to return. Default: 10. offset (int | Unset): Number of recent turns to skip. Default: 0. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -146,7 +145,7 @@ def sync( step_id: None | str | Unset = UNSET, limit: int | Unset = 10, offset: int | Unset = 0, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> AiConversationHistoryResponse | HTTPValidationError | None: """Get AI conversation history @@ -166,7 +165,7 @@ def sync( step_id (None | str | Unset): Step ID to filter by. limit (int | Unset): Max turns to return. Default: 10. offset (int | Unset): Number of recent turns to skip. Default: 0. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -195,7 +194,7 @@ async def asyncio_detailed( step_id: None | str | Unset = UNSET, limit: int | Unset = 10, offset: int | Unset = 0, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[AiConversationHistoryResponse | HTTPValidationError]: """Get AI conversation history @@ -215,7 +214,7 @@ async def asyncio_detailed( step_id (None | str | Unset): Step ID to filter by. limit (int | Unset): Max turns to return. Default: 10. offset (int | Unset): Number of recent turns to skip. Default: 0. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -247,7 +246,7 @@ async def asyncio( step_id: None | str | Unset = UNSET, limit: int | Unset = 10, offset: int | Unset = 0, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> AiConversationHistoryResponse | HTTPValidationError | None: """Get AI conversation history @@ -267,7 +266,7 @@ async def asyncio( step_id (None | str | Unset): Step ID to filter by. limit (int | Unset): Max turns to return. Default: 10. offset (int | Unset): Number of recent turns to skip. Default: 0. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/agents/list_agent_runs_api_agents_agent_id_runs_get.py b/seclai/_generated/api/agents/list_agent_runs_api_agents_agent_id_runs_get.py index d13efa7..830d623 100644 --- a/seclai/_generated/api/agents/list_agent_runs_api_agents_agent_id_runs_get.py +++ b/seclai/_generated/api/agents/list_agent_runs_api_agents_agent_id_runs_get.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -21,7 +20,7 @@ def _get_kwargs( page: int | Unset = 1, limit: int | Unset = 50, status: None | PendingProcessingCompletedFailedStatus | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -93,7 +92,7 @@ def sync_detailed( page: int | Unset = 1, limit: int | Unset = 50, status: None | PendingProcessingCompletedFailedStatus | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[AgentRunListResponse | HTTPValidationError]: """List agent runs @@ -115,7 +114,7 @@ def sync_detailed( page (int | Unset): Page number Default: 1. limit (int | Unset): Items per page Default: 50. status (None | PendingProcessingCompletedFailedStatus | Unset): Filter runs by status - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -147,7 +146,7 @@ def sync( page: int | Unset = 1, limit: int | Unset = 50, status: None | PendingProcessingCompletedFailedStatus | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> AgentRunListResponse | HTTPValidationError | None: """List agent runs @@ -169,7 +168,7 @@ def sync( page (int | Unset): Page number Default: 1. limit (int | Unset): Items per page Default: 50. status (None | PendingProcessingCompletedFailedStatus | Unset): Filter runs by status - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -196,7 +195,7 @@ async def asyncio_detailed( page: int | Unset = 1, limit: int | Unset = 50, status: None | PendingProcessingCompletedFailedStatus | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[AgentRunListResponse | HTTPValidationError]: """List agent runs @@ -218,7 +217,7 @@ async def asyncio_detailed( page (int | Unset): Page number Default: 1. limit (int | Unset): Items per page Default: 50. status (None | PendingProcessingCompletedFailedStatus | Unset): Filter runs by status - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -248,7 +247,7 @@ async def asyncio( page: int | Unset = 1, limit: int | Unset = 50, status: None | PendingProcessingCompletedFailedStatus | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> AgentRunListResponse | HTTPValidationError | None: """List agent runs @@ -270,7 +269,7 @@ async def asyncio( page (int | Unset): Page number Default: 1. limit (int | Unset): Items per page Default: 50. status (None | PendingProcessingCompletedFailedStatus | Unset): Filter runs by status - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/agents/list_agents_api_agents_get.py b/seclai/_generated/api/agents/list_agents_api_agents_get.py index 09644b0..ee37bc0 100644 --- a/seclai/_generated/api/agents/list_agents_api_agents_get.py +++ b/seclai/_generated/api/agents/list_agents_api_agents_get.py @@ -1,6 +1,5 @@ from http import HTTPStatus from typing import Any -from uuid import UUID import httpx @@ -15,7 +14,7 @@ def _get_kwargs( *, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -74,7 +73,7 @@ def sync_detailed( client: AuthenticatedClient | Client, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[AgentListResponse | HTTPValidationError]: """List agents @@ -87,7 +86,7 @@ def sync_detailed( Args: page (int | Unset): Page number Default: 1. limit (int | Unset): Items per page Default: 20. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -115,7 +114,7 @@ def sync( client: AuthenticatedClient | Client, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> AgentListResponse | HTTPValidationError | None: """List agents @@ -128,7 +127,7 @@ def sync( Args: page (int | Unset): Page number Default: 1. limit (int | Unset): Items per page Default: 20. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -151,7 +150,7 @@ async def asyncio_detailed( client: AuthenticatedClient | Client, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[AgentListResponse | HTTPValidationError]: """List agents @@ -164,7 +163,7 @@ async def asyncio_detailed( Args: page (int | Unset): Page number Default: 1. limit (int | Unset): Items per page Default: 20. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -190,7 +189,7 @@ async def asyncio( client: AuthenticatedClient | Client, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> AgentListResponse | HTTPValidationError | None: """List agents @@ -203,7 +202,7 @@ async def asyncio( Args: page (int | Unset): Page number Default: 1. limit (int | Unset): Items per page Default: 20. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/agents/mark_ai_suggestion_api_agents_agent_id_ai_assistant_conversation_id_patch.py b/seclai/_generated/api/agents/mark_ai_suggestion_api_agents_agent_id_ai_assistant_conversation_id_patch.py index 7bfcf2c..ccd61a4 100644 --- a/seclai/_generated/api/agents/mark_ai_suggestion_api_agents_agent_id_ai_assistant_conversation_id_patch.py +++ b/seclai/_generated/api/agents/mark_ai_suggestion_api_agents_agent_id_ai_assistant_conversation_id_patch.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -20,7 +19,7 @@ def _get_kwargs( conversation_id: str, *, body: MarkAiSuggestionRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -87,7 +86,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: MarkAiSuggestionRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ HTTPValidationError | MarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatchResponseMarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatch @@ -106,7 +105,7 @@ def sync_detailed( Args: agent_id (str): conversation_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (MarkAiSuggestionRequest): Raises: @@ -137,7 +136,7 @@ def sync( *, client: AuthenticatedClient | Client, body: MarkAiSuggestionRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ( HTTPValidationError | MarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatchResponseMarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatch @@ -157,7 +156,7 @@ def sync( Args: agent_id (str): conversation_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (MarkAiSuggestionRequest): Raises: @@ -183,7 +182,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: MarkAiSuggestionRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ HTTPValidationError | MarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatchResponseMarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatch @@ -202,7 +201,7 @@ async def asyncio_detailed( Args: agent_id (str): conversation_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (MarkAiSuggestionRequest): Raises: @@ -231,7 +230,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: MarkAiSuggestionRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ( HTTPValidationError | MarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatchResponseMarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatch @@ -251,7 +250,7 @@ async def asyncio( Args: agent_id (str): conversation_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (MarkAiSuggestionRequest): Raises: diff --git a/seclai/_generated/api/agents/run_agent_api_agents_agent_id_runs_post.py b/seclai/_generated/api/agents/run_agent_api_agents_agent_id_runs_post.py index e7d2f6c..bc87ede 100644 --- a/seclai/_generated/api/agents/run_agent_api_agents_agent_id_runs_post.py +++ b/seclai/_generated/api/agents/run_agent_api_agents_agent_id_runs_post.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -17,7 +16,7 @@ def _get_kwargs( agent_id: str, *, body: AgentRunRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +72,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: AgentRunRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[AgentRunResponse | HTTPValidationError]: """Run an agent @@ -104,7 +103,7 @@ def sync_detailed( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AgentRunRequest): Raises: @@ -133,7 +132,7 @@ def sync( *, client: AuthenticatedClient | Client, body: AgentRunRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> AgentRunResponse | HTTPValidationError | None: """Run an agent @@ -164,7 +163,7 @@ def sync( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AgentRunRequest): Raises: @@ -188,7 +187,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: AgentRunRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[AgentRunResponse | HTTPValidationError]: """Run an agent @@ -219,7 +218,7 @@ async def asyncio_detailed( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AgentRunRequest): Raises: @@ -246,7 +245,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: AgentRunRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> AgentRunResponse | HTTPValidationError | None: """Run an agent @@ -277,7 +276,7 @@ async def asyncio( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AgentRunRequest): Raises: diff --git a/seclai/_generated/api/agents/run_streaming_agent_api_agents_agent_id_runs_stream_post.py b/seclai/_generated/api/agents/run_streaming_agent_api_agents_agent_id_runs_stream_post.py index acb41ff..2fd0b7a 100644 --- a/seclai/_generated/api/agents/run_streaming_agent_api_agents_agent_id_runs_stream_post.py +++ b/seclai/_generated/api/agents/run_streaming_agent_api_agents_agent_id_runs_stream_post.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -16,7 +15,7 @@ def _get_kwargs( agent_id: str, *, body: AgentRunStreamRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -71,7 +70,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: AgentRunStreamRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Run an agent (stream events) @@ -101,7 +100,7 @@ def sync_detailed( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AgentRunStreamRequest): Raises: @@ -130,7 +129,7 @@ def sync( *, client: AuthenticatedClient | Client, body: AgentRunStreamRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Run an agent (stream events) @@ -160,7 +159,7 @@ def sync( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AgentRunStreamRequest): Raises: @@ -184,7 +183,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: AgentRunStreamRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Run an agent (stream events) @@ -214,7 +213,7 @@ async def asyncio_detailed( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AgentRunStreamRequest): Raises: @@ -241,7 +240,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: AgentRunStreamRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Run an agent (stream events) @@ -271,7 +270,7 @@ async def asyncio( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AgentRunStreamRequest): Raises: diff --git a/seclai/_generated/api/agents/search_agent_runs_api_agents_runs_search_post.py b/seclai/_generated/api/agents/search_agent_runs_api_agents_runs_search_post.py index 898f6a6..153199f 100644 --- a/seclai/_generated/api/agents/search_agent_runs_api_agents_runs_search_post.py +++ b/seclai/_generated/api/agents/search_agent_runs_api_agents_runs_search_post.py @@ -1,6 +1,5 @@ from http import HTTPStatus from typing import Any -from uuid import UUID import httpx @@ -15,7 +14,7 @@ def _get_kwargs( *, body: AgentTraceSearchRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -68,7 +67,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: AgentTraceSearchRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[AgentTraceSearchResponse | HTTPValidationError]: """Search agent traces @@ -84,7 +83,7 @@ def sync_detailed( - Requires `X-API-Key` header or OAuth Bearer token. Searches only within your account's traces. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AgentTraceSearchRequest): Raises: @@ -111,7 +110,7 @@ def sync( *, client: AuthenticatedClient | Client, body: AgentTraceSearchRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> AgentTraceSearchResponse | HTTPValidationError | None: """Search agent traces @@ -127,7 +126,7 @@ def sync( - Requires `X-API-Key` header or OAuth Bearer token. Searches only within your account's traces. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AgentTraceSearchRequest): Raises: @@ -149,7 +148,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: AgentTraceSearchRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[AgentTraceSearchResponse | HTTPValidationError]: """Search agent traces @@ -165,7 +164,7 @@ async def asyncio_detailed( - Requires `X-API-Key` header or OAuth Bearer token. Searches only within your account's traces. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AgentTraceSearchRequest): Raises: @@ -190,7 +189,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: AgentTraceSearchRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> AgentTraceSearchResponse | HTTPValidationError | None: """Search agent traces @@ -206,7 +205,7 @@ async def asyncio( - Requires `X-API-Key` header or OAuth Bearer token. Searches only within your account's traces. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AgentTraceSearchRequest): Raises: diff --git a/seclai/_generated/api/agents/update_agent_api_agents_agent_id_put.py b/seclai/_generated/api/agents/update_agent_api_agents_agent_id_put.py index ab510c4..e743aa0 100644 --- a/seclai/_generated/api/agents/update_agent_api_agents_agent_id_put.py +++ b/seclai/_generated/api/agents/update_agent_api_agents_agent_id_put.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -17,7 +16,7 @@ def _get_kwargs( agent_id: str, *, body: UpdateAgentRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +72,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: UpdateAgentRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[AgentSummaryResponse | HTTPValidationError]: """Update agent metadata @@ -96,7 +95,7 @@ def sync_detailed( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UpdateAgentRequest): Raises: @@ -125,7 +124,7 @@ def sync( *, client: AuthenticatedClient | Client, body: UpdateAgentRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> AgentSummaryResponse | HTTPValidationError | None: """Update agent metadata @@ -148,7 +147,7 @@ def sync( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UpdateAgentRequest): Raises: @@ -172,7 +171,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: UpdateAgentRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[AgentSummaryResponse | HTTPValidationError]: """Update agent metadata @@ -195,7 +194,7 @@ async def asyncio_detailed( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UpdateAgentRequest): Raises: @@ -222,7 +221,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: UpdateAgentRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> AgentSummaryResponse | HTTPValidationError | None: """Update agent metadata @@ -245,7 +244,7 @@ async def asyncio( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UpdateAgentRequest): Raises: diff --git a/seclai/_generated/api/agents/update_agent_definition_api_agents_agent_id_definition_put.py b/seclai/_generated/api/agents/update_agent_definition_api_agents_agent_id_definition_put.py index ce276ce..7efeb94 100644 --- a/seclai/_generated/api/agents/update_agent_definition_api_agents_agent_id_definition_put.py +++ b/seclai/_generated/api/agents/update_agent_definition_api_agents_agent_id_definition_put.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -17,7 +16,7 @@ def _get_kwargs( agent_id: str, *, body: UpdateAgentDefinitionRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +72,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: UpdateAgentDefinitionRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[AgentDefinitionResponse | HTTPValidationError]: """Update agent definition @@ -100,7 +99,7 @@ def sync_detailed( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UpdateAgentDefinitionRequest): Raises: @@ -129,7 +128,7 @@ def sync( *, client: AuthenticatedClient | Client, body: UpdateAgentDefinitionRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> AgentDefinitionResponse | HTTPValidationError | None: """Update agent definition @@ -156,7 +155,7 @@ def sync( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UpdateAgentDefinitionRequest): Raises: @@ -180,7 +179,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: UpdateAgentDefinitionRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[AgentDefinitionResponse | HTTPValidationError]: """Update agent definition @@ -207,7 +206,7 @@ async def asyncio_detailed( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UpdateAgentDefinitionRequest): Raises: @@ -234,7 +233,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: UpdateAgentDefinitionRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> AgentDefinitionResponse | HTTPValidationError | None: """Update agent definition @@ -261,7 +260,7 @@ async def asyncio( Args: agent_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UpdateAgentDefinitionRequest): Raises: diff --git a/seclai/_generated/api/ai_assistant/api_ai_accept_api_ai_assistant_conversation_id_accept_post.py b/seclai/_generated/api/ai_assistant/api_ai_accept_api_ai_assistant_conversation_id_accept_post.py index 7682d0c..346f61a 100644 --- a/seclai/_generated/api/ai_assistant/api_ai_accept_api_ai_assistant_conversation_id_accept_post.py +++ b/seclai/_generated/api/ai_assistant/api_ai_accept_api_ai_assistant_conversation_id_accept_post.py @@ -17,7 +17,7 @@ def _get_kwargs( conversation_id: UUID, *, body: AiAssistantAcceptRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +73,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: AiAssistantAcceptRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[AiAssistantAcceptResponse | HTTPValidationError]: """Accept and execute a standalone plan @@ -84,7 +84,7 @@ def sync_detailed( Args: conversation_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AiAssistantAcceptRequest): Request body for accepting a proposed plan. Raises: @@ -113,7 +113,7 @@ def sync( *, client: AuthenticatedClient | Client, body: AiAssistantAcceptRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> AiAssistantAcceptResponse | HTTPValidationError | None: """Accept and execute a standalone plan @@ -124,7 +124,7 @@ def sync( Args: conversation_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AiAssistantAcceptRequest): Request body for accepting a proposed plan. Raises: @@ -148,7 +148,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: AiAssistantAcceptRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[AiAssistantAcceptResponse | HTTPValidationError]: """Accept and execute a standalone plan @@ -159,7 +159,7 @@ async def asyncio_detailed( Args: conversation_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AiAssistantAcceptRequest): Request body for accepting a proposed plan. Raises: @@ -186,7 +186,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: AiAssistantAcceptRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> AiAssistantAcceptResponse | HTTPValidationError | None: """Accept and execute a standalone plan @@ -197,7 +197,7 @@ async def asyncio( Args: conversation_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AiAssistantAcceptRequest): Request body for accepting a proposed plan. Raises: diff --git a/seclai/_generated/api/ai_assistant/api_ai_decline_api_ai_assistant_conversation_id_decline_post.py b/seclai/_generated/api/ai_assistant/api_ai_decline_api_ai_assistant_conversation_id_decline_post.py index 1c7ec9d..5ac92c4 100644 --- a/seclai/_generated/api/ai_assistant/api_ai_decline_api_ai_assistant_conversation_id_decline_post.py +++ b/seclai/_generated/api/ai_assistant/api_ai_decline_api_ai_assistant_conversation_id_decline_post.py @@ -14,7 +14,7 @@ def _get_kwargs( conversation_id: UUID, *, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -64,7 +64,7 @@ def sync_detailed( conversation_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Decline a standalone plan @@ -75,7 +75,7 @@ def sync_detailed( Args: conversation_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -101,7 +101,7 @@ def sync( conversation_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Decline a standalone plan @@ -112,7 +112,7 @@ def sync( Args: conversation_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -133,7 +133,7 @@ async def asyncio_detailed( conversation_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Decline a standalone plan @@ -144,7 +144,7 @@ async def asyncio_detailed( Args: conversation_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -168,7 +168,7 @@ async def asyncio( conversation_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Decline a standalone plan @@ -179,7 +179,7 @@ async def asyncio( Args: conversation_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/ai_assistant/api_ai_feedback_api_ai_assistant_feedback_post.py b/seclai/_generated/api/ai_assistant/api_ai_feedback_api_ai_assistant_feedback_post.py index 7f9d224..45f222e 100644 --- a/seclai/_generated/api/ai_assistant/api_ai_feedback_api_ai_assistant_feedback_post.py +++ b/seclai/_generated/api/ai_assistant/api_ai_feedback_api_ai_assistant_feedback_post.py @@ -1,6 +1,5 @@ from http import HTTPStatus from typing import Any -from uuid import UUID import httpx @@ -15,7 +14,7 @@ def _get_kwargs( *, body: AiAssistantFeedbackRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -68,7 +67,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: AiAssistantFeedbackRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[AiAssistantFeedbackResponse | HTTPValidationError]: """Submit AI assistant feedback @@ -78,7 +77,7 @@ def sync_detailed( Auth: requires ``X-API-Key`` header or OAuth Bearer token. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AiAssistantFeedbackRequest): Request body for submitting AI assistant feedback. Raises: @@ -105,7 +104,7 @@ def sync( *, client: AuthenticatedClient | Client, body: AiAssistantFeedbackRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> AiAssistantFeedbackResponse | HTTPValidationError | None: """Submit AI assistant feedback @@ -115,7 +114,7 @@ def sync( Auth: requires ``X-API-Key`` header or OAuth Bearer token. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AiAssistantFeedbackRequest): Request body for submitting AI assistant feedback. Raises: @@ -137,7 +136,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: AiAssistantFeedbackRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[AiAssistantFeedbackResponse | HTTPValidationError]: """Submit AI assistant feedback @@ -147,7 +146,7 @@ async def asyncio_detailed( Auth: requires ``X-API-Key`` header or OAuth Bearer token. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AiAssistantFeedbackRequest): Request body for submitting AI assistant feedback. Raises: @@ -172,7 +171,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: AiAssistantFeedbackRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> AiAssistantFeedbackResponse | HTTPValidationError | None: """Submit AI assistant feedback @@ -182,7 +181,7 @@ async def asyncio( Auth: requires ``X-API-Key`` header or OAuth Bearer token. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AiAssistantFeedbackRequest): Request body for submitting AI assistant feedback. Raises: diff --git a/seclai/_generated/api/ai_assistant/api_ai_knowledge_base_api_ai_assistant_knowledge_base_post.py b/seclai/_generated/api/ai_assistant/api_ai_knowledge_base_api_ai_assistant_knowledge_base_post.py index a7fc46a..3d25770 100644 --- a/seclai/_generated/api/ai_assistant/api_ai_knowledge_base_api_ai_assistant_knowledge_base_post.py +++ b/seclai/_generated/api/ai_assistant/api_ai_knowledge_base_api_ai_assistant_knowledge_base_post.py @@ -1,6 +1,5 @@ from http import HTTPStatus from typing import Any -from uuid import UUID import httpx @@ -15,7 +14,7 @@ def _get_kwargs( *, body: AiAssistantGenerateRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -68,7 +67,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[AiAssistantGenerateResponse | HTTPValidationError]: """Generate a knowledge base plan (standalone) @@ -78,7 +77,7 @@ def sync_detailed( Auth: requires ``X-API-Key`` header or OAuth Bearer token. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: @@ -105,7 +104,7 @@ def sync( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> AiAssistantGenerateResponse | HTTPValidationError | None: """Generate a knowledge base plan (standalone) @@ -115,7 +114,7 @@ def sync( Auth: requires ``X-API-Key`` header or OAuth Bearer token. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: @@ -137,7 +136,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[AiAssistantGenerateResponse | HTTPValidationError]: """Generate a knowledge base plan (standalone) @@ -147,7 +146,7 @@ async def asyncio_detailed( Auth: requires ``X-API-Key`` header or OAuth Bearer token. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: @@ -172,7 +171,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> AiAssistantGenerateResponse | HTTPValidationError | None: """Generate a knowledge base plan (standalone) @@ -182,7 +181,7 @@ async def asyncio( Auth: requires ``X-API-Key`` header or OAuth Bearer token. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: diff --git a/seclai/_generated/api/ai_assistant/api_ai_memory_bank_accept_api_ai_assistant_memory_bank_conversation_id_patch.py b/seclai/_generated/api/ai_assistant/api_ai_memory_bank_accept_api_ai_assistant_memory_bank_conversation_id_patch.py index 9ee2f8b..feebb72 100644 --- a/seclai/_generated/api/ai_assistant/api_ai_memory_bank_accept_api_ai_assistant_memory_bank_conversation_id_patch.py +++ b/seclai/_generated/api/ai_assistant/api_ai_memory_bank_accept_api_ai_assistant_memory_bank_conversation_id_patch.py @@ -19,7 +19,7 @@ def _get_kwargs( conversation_id: UUID, *, body: MemoryBankAcceptRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -84,7 +84,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: MemoryBankAcceptRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ ApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatchResponseApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatch | HTTPValidationError @@ -99,7 +99,7 @@ def sync_detailed( Args: conversation_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (MemoryBankAcceptRequest): Accept or decline a memory bank AI suggestion. Raises: @@ -128,7 +128,7 @@ def sync( *, client: AuthenticatedClient | Client, body: MemoryBankAcceptRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ( ApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatchResponseApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatch | HTTPValidationError @@ -144,7 +144,7 @@ def sync( Args: conversation_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (MemoryBankAcceptRequest): Accept or decline a memory bank AI suggestion. Raises: @@ -168,7 +168,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: MemoryBankAcceptRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ ApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatchResponseApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatch | HTTPValidationError @@ -183,7 +183,7 @@ async def asyncio_detailed( Args: conversation_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (MemoryBankAcceptRequest): Accept or decline a memory bank AI suggestion. Raises: @@ -210,7 +210,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: MemoryBankAcceptRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ( ApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatchResponseApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatch | HTTPValidationError @@ -226,7 +226,7 @@ async def asyncio( Args: conversation_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (MemoryBankAcceptRequest): Accept or decline a memory bank AI suggestion. Raises: diff --git a/seclai/_generated/api/ai_assistant/api_ai_memory_bank_api_ai_assistant_memory_bank_post.py b/seclai/_generated/api/ai_assistant/api_ai_memory_bank_api_ai_assistant_memory_bank_post.py index 6749b12..d986a31 100644 --- a/seclai/_generated/api/ai_assistant/api_ai_memory_bank_api_ai_assistant_memory_bank_post.py +++ b/seclai/_generated/api/ai_assistant/api_ai_memory_bank_api_ai_assistant_memory_bank_post.py @@ -1,6 +1,5 @@ from http import HTTPStatus from typing import Any -from uuid import UUID import httpx @@ -15,7 +14,7 @@ def _get_kwargs( *, body: MemoryBankAiAssistantRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -68,7 +67,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: MemoryBankAiAssistantRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | MemoryBankAiAssistantResponse]: """Generate a memory bank configuration (standalone) @@ -78,7 +77,7 @@ def sync_detailed( Auth: requires ``X-API-Key`` header or OAuth Bearer token. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (MemoryBankAiAssistantRequest): Request body for the memory bank AI assistant. Raises: @@ -105,7 +104,7 @@ def sync( *, client: AuthenticatedClient | Client, body: MemoryBankAiAssistantRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | MemoryBankAiAssistantResponse | None: """Generate a memory bank configuration (standalone) @@ -115,7 +114,7 @@ def sync( Auth: requires ``X-API-Key`` header or OAuth Bearer token. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (MemoryBankAiAssistantRequest): Request body for the memory bank AI assistant. Raises: @@ -137,7 +136,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: MemoryBankAiAssistantRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | MemoryBankAiAssistantResponse]: """Generate a memory bank configuration (standalone) @@ -147,7 +146,7 @@ async def asyncio_detailed( Auth: requires ``X-API-Key`` header or OAuth Bearer token. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (MemoryBankAiAssistantRequest): Request body for the memory bank AI assistant. Raises: @@ -172,7 +171,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: MemoryBankAiAssistantRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | MemoryBankAiAssistantResponse | None: """Generate a memory bank configuration (standalone) @@ -182,7 +181,7 @@ async def asyncio( Auth: requires ``X-API-Key`` header or OAuth Bearer token. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (MemoryBankAiAssistantRequest): Request body for the memory bank AI assistant. Raises: diff --git a/seclai/_generated/api/ai_assistant/api_ai_memory_bank_history_api_ai_assistant_memory_bank_last_conversation_get.py b/seclai/_generated/api/ai_assistant/api_ai_memory_bank_history_api_ai_assistant_memory_bank_last_conversation_get.py index 8ee783e..9974d84 100644 --- a/seclai/_generated/api/ai_assistant/api_ai_memory_bank_history_api_ai_assistant_memory_bank_last_conversation_get.py +++ b/seclai/_generated/api/ai_assistant/api_ai_memory_bank_history_api_ai_assistant_memory_bank_last_conversation_get.py @@ -1,6 +1,5 @@ from http import HTTPStatus from typing import Any -from uuid import UUID import httpx @@ -17,7 +16,7 @@ def _get_kwargs( *, limit: int | Unset = 5, offset: int | Unset = 0, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -76,7 +75,7 @@ def sync_detailed( client: AuthenticatedClient | Client, limit: int | Unset = 5, offset: int | Unset = 0, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | MemoryBankLastConversationResponse]: """Fetch memory bank AI conversation history @@ -89,7 +88,7 @@ def sync_detailed( Args: limit (int | Unset): Max turns. Default: 5. offset (int | Unset): Skip count. Default: 0. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -117,7 +116,7 @@ def sync( client: AuthenticatedClient | Client, limit: int | Unset = 5, offset: int | Unset = 0, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | MemoryBankLastConversationResponse | None: """Fetch memory bank AI conversation history @@ -130,7 +129,7 @@ def sync( Args: limit (int | Unset): Max turns. Default: 5. offset (int | Unset): Skip count. Default: 0. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -153,7 +152,7 @@ async def asyncio_detailed( client: AuthenticatedClient | Client, limit: int | Unset = 5, offset: int | Unset = 0, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | MemoryBankLastConversationResponse]: """Fetch memory bank AI conversation history @@ -166,7 +165,7 @@ async def asyncio_detailed( Args: limit (int | Unset): Max turns. Default: 5. offset (int | Unset): Skip count. Default: 0. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -192,7 +191,7 @@ async def asyncio( client: AuthenticatedClient | Client, limit: int | Unset = 5, offset: int | Unset = 0, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | MemoryBankLastConversationResponse | None: """Fetch memory bank AI conversation history @@ -205,7 +204,7 @@ async def asyncio( Args: limit (int | Unset): Max turns. Default: 5. offset (int | Unset): Skip count. Default: 0. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/ai_assistant/api_ai_solution_api_ai_assistant_solution_post.py b/seclai/_generated/api/ai_assistant/api_ai_solution_api_ai_assistant_solution_post.py index ec42383..00e2da9 100644 --- a/seclai/_generated/api/ai_assistant/api_ai_solution_api_ai_assistant_solution_post.py +++ b/seclai/_generated/api/ai_assistant/api_ai_solution_api_ai_assistant_solution_post.py @@ -1,6 +1,5 @@ from http import HTTPStatus from typing import Any -from uuid import UUID import httpx @@ -15,7 +14,7 @@ def _get_kwargs( *, body: AiAssistantGenerateRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -68,7 +67,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[AiAssistantGenerateResponse | HTTPValidationError]: """Generate a solution plan (standalone) @@ -78,7 +77,7 @@ def sync_detailed( Auth: requires ``X-API-Key`` header or OAuth Bearer token. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: @@ -105,7 +104,7 @@ def sync( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> AiAssistantGenerateResponse | HTTPValidationError | None: """Generate a solution plan (standalone) @@ -115,7 +114,7 @@ def sync( Auth: requires ``X-API-Key`` header or OAuth Bearer token. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: @@ -137,7 +136,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[AiAssistantGenerateResponse | HTTPValidationError]: """Generate a solution plan (standalone) @@ -147,7 +146,7 @@ async def asyncio_detailed( Auth: requires ``X-API-Key`` header or OAuth Bearer token. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: @@ -172,7 +171,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> AiAssistantGenerateResponse | HTTPValidationError | None: """Generate a solution plan (standalone) @@ -182,7 +181,7 @@ async def asyncio( Auth: requires ``X-API-Key`` header or OAuth Bearer token. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: diff --git a/seclai/_generated/api/ai_assistant/api_ai_source_api_ai_assistant_source_post.py b/seclai/_generated/api/ai_assistant/api_ai_source_api_ai_assistant_source_post.py index 57c697b..7700f96 100644 --- a/seclai/_generated/api/ai_assistant/api_ai_source_api_ai_assistant_source_post.py +++ b/seclai/_generated/api/ai_assistant/api_ai_source_api_ai_assistant_source_post.py @@ -1,6 +1,5 @@ from http import HTTPStatus from typing import Any -from uuid import UUID import httpx @@ -15,7 +14,7 @@ def _get_kwargs( *, body: AiAssistantGenerateRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -68,7 +67,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[AiAssistantGenerateResponse | HTTPValidationError]: """Generate a source plan (standalone) @@ -78,7 +77,7 @@ def sync_detailed( Auth: requires ``X-API-Key`` header or OAuth Bearer token. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: @@ -105,7 +104,7 @@ def sync( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> AiAssistantGenerateResponse | HTTPValidationError | None: """Generate a source plan (standalone) @@ -115,7 +114,7 @@ def sync( Auth: requires ``X-API-Key`` header or OAuth Bearer token. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: @@ -137,7 +136,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[AiAssistantGenerateResponse | HTTPValidationError]: """Generate a source plan (standalone) @@ -147,7 +146,7 @@ async def asyncio_detailed( Auth: requires ``X-API-Key`` header or OAuth Bearer token. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: @@ -172,7 +171,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> AiAssistantGenerateResponse | HTTPValidationError | None: """Generate a source plan (standalone) @@ -182,7 +181,7 @@ async def asyncio( Auth: requires ``X-API-Key`` header or OAuth Bearer token. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: diff --git a/seclai/_generated/api/alerts/add_alert_comment_api_alerts_alert_id_comments_post.py b/seclai/_generated/api/alerts/add_alert_comment_api_alerts_alert_id_comments_post.py index 856a512..943d7c4 100644 --- a/seclai/_generated/api/alerts/add_alert_comment_api_alerts_alert_id_comments_post.py +++ b/seclai/_generated/api/alerts/add_alert_comment_api_alerts_alert_id_comments_post.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -19,7 +18,7 @@ def _get_kwargs( alert_id: str, *, body: AddCommentRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -84,7 +83,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: AddCommentRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ AddAlertCommentApiAlertsAlertIdCommentsPostResponseAddAlertCommentApiAlertsAlertIdCommentsPost | HTTPValidationError @@ -99,7 +98,7 @@ def sync_detailed( Args: alert_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AddCommentRequest): Raises: @@ -128,7 +127,7 @@ def sync( *, client: AuthenticatedClient | Client, body: AddCommentRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ( AddAlertCommentApiAlertsAlertIdCommentsPostResponseAddAlertCommentApiAlertsAlertIdCommentsPost | HTTPValidationError @@ -144,7 +143,7 @@ def sync( Args: alert_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AddCommentRequest): Raises: @@ -168,7 +167,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: AddCommentRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ AddAlertCommentApiAlertsAlertIdCommentsPostResponseAddAlertCommentApiAlertsAlertIdCommentsPost | HTTPValidationError @@ -183,7 +182,7 @@ async def asyncio_detailed( Args: alert_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AddCommentRequest): Raises: @@ -210,7 +209,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: AddCommentRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ( AddAlertCommentApiAlertsAlertIdCommentsPostResponseAddAlertCommentApiAlertsAlertIdCommentsPost | HTTPValidationError @@ -226,7 +225,7 @@ async def asyncio( Args: alert_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AddCommentRequest): Raises: diff --git a/seclai/_generated/api/alerts/change_alert_status_api_alerts_alert_id_status_post.py b/seclai/_generated/api/alerts/change_alert_status_api_alerts_alert_id_status_post.py index b641349..d327a1d 100644 --- a/seclai/_generated/api/alerts/change_alert_status_api_alerts_alert_id_status_post.py +++ b/seclai/_generated/api/alerts/change_alert_status_api_alerts_alert_id_status_post.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -19,7 +18,7 @@ def _get_kwargs( alert_id: str, *, body: ChangeStatusRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -84,7 +83,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: ChangeStatusRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ ChangeAlertStatusApiAlertsAlertIdStatusPostResponseChangeAlertStatusApiAlertsAlertIdStatusPost | HTTPValidationError @@ -98,7 +97,7 @@ def sync_detailed( Args: alert_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (ChangeStatusRequest): Raises: @@ -127,7 +126,7 @@ def sync( *, client: AuthenticatedClient | Client, body: ChangeStatusRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ( ChangeAlertStatusApiAlertsAlertIdStatusPostResponseChangeAlertStatusApiAlertsAlertIdStatusPost | HTTPValidationError @@ -142,7 +141,7 @@ def sync( Args: alert_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (ChangeStatusRequest): Raises: @@ -166,7 +165,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: ChangeStatusRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ ChangeAlertStatusApiAlertsAlertIdStatusPostResponseChangeAlertStatusApiAlertsAlertIdStatusPost | HTTPValidationError @@ -180,7 +179,7 @@ async def asyncio_detailed( Args: alert_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (ChangeStatusRequest): Raises: @@ -207,7 +206,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: ChangeStatusRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ( ChangeAlertStatusApiAlertsAlertIdStatusPostResponseChangeAlertStatusApiAlertsAlertIdStatusPost | HTTPValidationError @@ -222,7 +221,7 @@ async def asyncio( Args: alert_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (ChangeStatusRequest): Raises: diff --git a/seclai/_generated/api/alerts/create_alert_config_api_alerts_configs_post.py b/seclai/_generated/api/alerts/create_alert_config_api_alerts_configs_post.py index 8de8ea1..fbf4b5e 100644 --- a/seclai/_generated/api/alerts/create_alert_config_api_alerts_configs_post.py +++ b/seclai/_generated/api/alerts/create_alert_config_api_alerts_configs_post.py @@ -1,6 +1,5 @@ from http import HTTPStatus from typing import Any -from uuid import UUID import httpx @@ -17,7 +16,7 @@ def _get_kwargs( *, body: CreateAlertConfigRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -79,7 +78,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: CreateAlertConfigRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ CreateAlertConfigApiAlertsConfigsPostResponseCreateAlertConfigApiAlertsConfigsPost | HTTPValidationError @@ -101,7 +100,7 @@ def sync_detailed( - Requires `X-API-Key` header or OAuth Bearer token. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (CreateAlertConfigRequest): Raises: @@ -128,7 +127,7 @@ def sync( *, client: AuthenticatedClient | Client, body: CreateAlertConfigRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ( CreateAlertConfigApiAlertsConfigsPostResponseCreateAlertConfigApiAlertsConfigsPost | HTTPValidationError @@ -151,7 +150,7 @@ def sync( - Requires `X-API-Key` header or OAuth Bearer token. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (CreateAlertConfigRequest): Raises: @@ -173,7 +172,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: CreateAlertConfigRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ CreateAlertConfigApiAlertsConfigsPostResponseCreateAlertConfigApiAlertsConfigsPost | HTTPValidationError @@ -195,7 +194,7 @@ async def asyncio_detailed( - Requires `X-API-Key` header or OAuth Bearer token. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (CreateAlertConfigRequest): Raises: @@ -220,7 +219,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: CreateAlertConfigRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ( CreateAlertConfigApiAlertsConfigsPostResponseCreateAlertConfigApiAlertsConfigsPost | HTTPValidationError @@ -243,7 +242,7 @@ async def asyncio( - Requires `X-API-Key` header or OAuth Bearer token. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (CreateAlertConfigRequest): Raises: diff --git a/seclai/_generated/api/alerts/delete_alert_config_api_alerts_configs_config_id_delete.py b/seclai/_generated/api/alerts/delete_alert_config_api_alerts_configs_config_id_delete.py index 989c142..5a1af0e 100644 --- a/seclai/_generated/api/alerts/delete_alert_config_api_alerts_configs_config_id_delete.py +++ b/seclai/_generated/api/alerts/delete_alert_config_api_alerts_configs_config_id_delete.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any, cast from urllib.parse import quote -from uuid import UUID import httpx @@ -14,7 +13,7 @@ def _get_kwargs( config_id: str, *, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -64,7 +63,7 @@ def sync_detailed( config_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Delete alert config @@ -76,7 +75,7 @@ def sync_detailed( Args: config_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -102,7 +101,7 @@ def sync( config_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Delete alert config @@ -114,7 +113,7 @@ def sync( Args: config_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -135,7 +134,7 @@ async def asyncio_detailed( config_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Delete alert config @@ -147,7 +146,7 @@ async def asyncio_detailed( Args: config_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -171,7 +170,7 @@ async def asyncio( config_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Delete alert config @@ -183,7 +182,7 @@ async def asyncio( Args: config_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/alerts/get_alert_config_api_alerts_configs_config_id_get.py b/seclai/_generated/api/alerts/get_alert_config_api_alerts_configs_config_id_get.py index e58e6b7..58c371f 100644 --- a/seclai/_generated/api/alerts/get_alert_config_api_alerts_configs_config_id_get.py +++ b/seclai/_generated/api/alerts/get_alert_config_api_alerts_configs_config_id_get.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -17,7 +16,7 @@ def _get_kwargs( config_id: str, *, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -77,7 +76,7 @@ def sync_detailed( config_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ GetAlertConfigApiAlertsConfigsConfigIdGetResponseGetAlertConfigApiAlertsConfigsConfigIdGet | HTTPValidationError @@ -94,7 +93,7 @@ def sync_detailed( Args: config_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -120,7 +119,7 @@ def sync( config_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ( GetAlertConfigApiAlertsConfigsConfigIdGetResponseGetAlertConfigApiAlertsConfigsConfigIdGet | HTTPValidationError @@ -138,7 +137,7 @@ def sync( Args: config_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -159,7 +158,7 @@ async def asyncio_detailed( config_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ GetAlertConfigApiAlertsConfigsConfigIdGetResponseGetAlertConfigApiAlertsConfigsConfigIdGet | HTTPValidationError @@ -176,7 +175,7 @@ async def asyncio_detailed( Args: config_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -200,7 +199,7 @@ async def asyncio( config_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ( GetAlertConfigApiAlertsConfigsConfigIdGetResponseGetAlertConfigApiAlertsConfigsConfigIdGet | HTTPValidationError @@ -218,7 +217,7 @@ async def asyncio( Args: config_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/alerts/get_alert_detail_api_alerts_alert_id_get.py b/seclai/_generated/api/alerts/get_alert_detail_api_alerts_alert_id_get.py index 281e16c..6c07a35 100644 --- a/seclai/_generated/api/alerts/get_alert_detail_api_alerts_alert_id_get.py +++ b/seclai/_generated/api/alerts/get_alert_detail_api_alerts_alert_id_get.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -17,7 +16,7 @@ def _get_kwargs( alert_id: str, *, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -77,7 +76,7 @@ def sync_detailed( alert_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ GetAlertDetailApiAlertsAlertIdGetResponseGetAlertDetailApiAlertsAlertIdGet | HTTPValidationError @@ -91,7 +90,7 @@ def sync_detailed( Args: alert_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -117,7 +116,7 @@ def sync( alert_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ( GetAlertDetailApiAlertsAlertIdGetResponseGetAlertDetailApiAlertsAlertIdGet | HTTPValidationError @@ -132,7 +131,7 @@ def sync( Args: alert_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -153,7 +152,7 @@ async def asyncio_detailed( alert_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ GetAlertDetailApiAlertsAlertIdGetResponseGetAlertDetailApiAlertsAlertIdGet | HTTPValidationError @@ -167,7 +166,7 @@ async def asyncio_detailed( Args: alert_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -191,7 +190,7 @@ async def asyncio( alert_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ( GetAlertDetailApiAlertsAlertIdGetResponseGetAlertDetailApiAlertsAlertIdGet | HTTPValidationError @@ -206,7 +205,7 @@ async def asyncio( Args: alert_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/alerts/list_alert_configs_api_alerts_configs_get.py b/seclai/_generated/api/alerts/list_alert_configs_api_alerts_configs_get.py index 7bd8d04..7405dbc 100644 --- a/seclai/_generated/api/alerts/list_alert_configs_api_alerts_configs_get.py +++ b/seclai/_generated/api/alerts/list_alert_configs_api_alerts_configs_get.py @@ -1,6 +1,5 @@ from http import HTTPStatus from typing import Any -from uuid import UUID import httpx @@ -18,7 +17,7 @@ def _get_kwargs( agent_id: None | str | Unset = UNSET, source_connection_id: None | str | Unset = UNSET, scope: None | str | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -104,7 +103,7 @@ def sync_detailed( agent_id: None | str | Unset = UNSET, source_connection_id: None | str | Unset = UNSET, scope: None | str | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ HTTPValidationError | ListAlertConfigsApiAlertsConfigsGetResponseListAlertConfigsApiAlertsConfigsGet @@ -130,7 +129,7 @@ def sync_detailed( agent_id (None | str | Unset): Filter by agent ID source_connection_id (None | str | Unset): Filter by source connection ID scope (None | str | Unset): Set to 'source' to list account-level source alert configs - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -160,7 +159,7 @@ def sync( agent_id: None | str | Unset = UNSET, source_connection_id: None | str | Unset = UNSET, scope: None | str | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ( HTTPValidationError | ListAlertConfigsApiAlertsConfigsGetResponseListAlertConfigsApiAlertsConfigsGet @@ -187,7 +186,7 @@ def sync( agent_id (None | str | Unset): Filter by agent ID source_connection_id (None | str | Unset): Filter by source connection ID scope (None | str | Unset): Set to 'source' to list account-level source alert configs - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -212,7 +211,7 @@ async def asyncio_detailed( agent_id: None | str | Unset = UNSET, source_connection_id: None | str | Unset = UNSET, scope: None | str | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ HTTPValidationError | ListAlertConfigsApiAlertsConfigsGetResponseListAlertConfigsApiAlertsConfigsGet @@ -238,7 +237,7 @@ async def asyncio_detailed( agent_id (None | str | Unset): Filter by agent ID source_connection_id (None | str | Unset): Filter by source connection ID scope (None | str | Unset): Set to 'source' to list account-level source alert configs - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -266,7 +265,7 @@ async def asyncio( agent_id: None | str | Unset = UNSET, source_connection_id: None | str | Unset = UNSET, scope: None | str | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ( HTTPValidationError | ListAlertConfigsApiAlertsConfigsGetResponseListAlertConfigsApiAlertsConfigsGet @@ -293,7 +292,7 @@ async def asyncio( agent_id (None | str | Unset): Filter by agent ID source_connection_id (None | str | Unset): Filter by source connection ID scope (None | str | Unset): Set to 'source' to list account-level source alert configs - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/alerts/list_alerts_api_alerts_get.py b/seclai/_generated/api/alerts/list_alerts_api_alerts_get.py index 130a142..b32e11b 100644 --- a/seclai/_generated/api/alerts/list_alerts_api_alerts_get.py +++ b/seclai/_generated/api/alerts/list_alerts_api_alerts_get.py @@ -1,7 +1,6 @@ import datetime from http import HTTPStatus from typing import Any -from uuid import UUID import httpx @@ -23,7 +22,7 @@ def _get_kwargs( source_connection_id: None | str | Unset = UNSET, time_from: datetime.datetime | None | Unset = UNSET, time_to: datetime.datetime | None | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -130,7 +129,7 @@ def sync_detailed( source_connection_id: None | str | Unset = UNSET, time_from: datetime.datetime | None | Unset = UNSET, time_to: datetime.datetime | None | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ HTTPValidationError | ListAlertsApiAlertsGetResponseListAlertsApiAlertsGet ]: @@ -155,7 +154,7 @@ def sync_detailed( source_connection_id (None | str | Unset): Filter by source connection ID time_from (datetime.datetime | None | Unset): From (ISO 8601) time_to (datetime.datetime | None | Unset): To (ISO 8601) - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -193,7 +192,7 @@ def sync( source_connection_id: None | str | Unset = UNSET, time_from: datetime.datetime | None | Unset = UNSET, time_to: datetime.datetime | None | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | ListAlertsApiAlertsGetResponseListAlertsApiAlertsGet | None: """List alerts @@ -216,7 +215,7 @@ def sync( source_connection_id (None | str | Unset): Filter by source connection ID time_from (datetime.datetime | None | Unset): From (ISO 8601) time_to (datetime.datetime | None | Unset): To (ISO 8601) - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -249,7 +248,7 @@ async def asyncio_detailed( source_connection_id: None | str | Unset = UNSET, time_from: datetime.datetime | None | Unset = UNSET, time_to: datetime.datetime | None | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ HTTPValidationError | ListAlertsApiAlertsGetResponseListAlertsApiAlertsGet ]: @@ -274,7 +273,7 @@ async def asyncio_detailed( source_connection_id (None | str | Unset): Filter by source connection ID time_from (datetime.datetime | None | Unset): From (ISO 8601) time_to (datetime.datetime | None | Unset): To (ISO 8601) - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -310,7 +309,7 @@ async def asyncio( source_connection_id: None | str | Unset = UNSET, time_from: datetime.datetime | None | Unset = UNSET, time_to: datetime.datetime | None | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | ListAlertsApiAlertsGetResponseListAlertsApiAlertsGet | None: """List alerts @@ -333,7 +332,7 @@ async def asyncio( source_connection_id (None | str | Unset): Filter by source connection ID time_from (datetime.datetime | None | Unset): From (ISO 8601) time_to (datetime.datetime | None | Unset): To (ISO 8601) - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/alerts/list_organization_preferences_api_alerts_organization_preferences_list_get.py b/seclai/_generated/api/alerts/list_organization_preferences_api_alerts_organization_preferences_list_get.py index 0e029d5..58a43da 100644 --- a/seclai/_generated/api/alerts/list_organization_preferences_api_alerts_organization_preferences_list_get.py +++ b/seclai/_generated/api/alerts/list_organization_preferences_api_alerts_organization_preferences_list_get.py @@ -17,7 +17,7 @@ def _get_kwargs( *, organization_id: None | Unset | UUID = UNSET, include_defaults: bool | Unset = False, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -85,7 +85,7 @@ def sync_detailed( client: AuthenticatedClient | Client, organization_id: None | Unset | UUID = UNSET, include_defaults: bool | Unset = False, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | OrganizationAlertPreferenceListResponse]: """List organization alert delivery preferences @@ -102,7 +102,7 @@ def sync_detailed( organization_id (None | Unset | UUID): Optional organization filter include_defaults (bool | Unset): Include default subscribed entries for all alert types Default: False. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -130,7 +130,7 @@ def sync( client: AuthenticatedClient | Client, organization_id: None | Unset | UUID = UNSET, include_defaults: bool | Unset = False, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | OrganizationAlertPreferenceListResponse | None: """List organization alert delivery preferences @@ -147,7 +147,7 @@ def sync( organization_id (None | Unset | UUID): Optional organization filter include_defaults (bool | Unset): Include default subscribed entries for all alert types Default: False. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -170,7 +170,7 @@ async def asyncio_detailed( client: AuthenticatedClient | Client, organization_id: None | Unset | UUID = UNSET, include_defaults: bool | Unset = False, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | OrganizationAlertPreferenceListResponse]: """List organization alert delivery preferences @@ -187,7 +187,7 @@ async def asyncio_detailed( organization_id (None | Unset | UUID): Optional organization filter include_defaults (bool | Unset): Include default subscribed entries for all alert types Default: False. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -213,7 +213,7 @@ async def asyncio( client: AuthenticatedClient | Client, organization_id: None | Unset | UUID = UNSET, include_defaults: bool | Unset = False, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | OrganizationAlertPreferenceListResponse | None: """List organization alert delivery preferences @@ -230,7 +230,7 @@ async def asyncio( organization_id (None | Unset | UUID): Optional organization filter include_defaults (bool | Unset): Include default subscribed entries for all alert types Default: False. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/alerts/subscribe_to_alert_api_alerts_alert_id_subscribe_post.py b/seclai/_generated/api/alerts/subscribe_to_alert_api_alerts_alert_id_subscribe_post.py index 10f17ec..e16fcc0 100644 --- a/seclai/_generated/api/alerts/subscribe_to_alert_api_alerts_alert_id_subscribe_post.py +++ b/seclai/_generated/api/alerts/subscribe_to_alert_api_alerts_alert_id_subscribe_post.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -17,7 +16,7 @@ def _get_kwargs( alert_id: str, *, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -77,7 +76,7 @@ def sync_detailed( alert_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ HTTPValidationError | SubscribeToAlertApiAlertsAlertIdSubscribePostResponseSubscribeToAlertApiAlertsAlertIdSubscribePost @@ -92,7 +91,7 @@ def sync_detailed( Args: alert_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -118,7 +117,7 @@ def sync( alert_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ( HTTPValidationError | SubscribeToAlertApiAlertsAlertIdSubscribePostResponseSubscribeToAlertApiAlertsAlertIdSubscribePost @@ -134,7 +133,7 @@ def sync( Args: alert_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -155,7 +154,7 @@ async def asyncio_detailed( alert_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ HTTPValidationError | SubscribeToAlertApiAlertsAlertIdSubscribePostResponseSubscribeToAlertApiAlertsAlertIdSubscribePost @@ -170,7 +169,7 @@ async def asyncio_detailed( Args: alert_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -194,7 +193,7 @@ async def asyncio( alert_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ( HTTPValidationError | SubscribeToAlertApiAlertsAlertIdSubscribePostResponseSubscribeToAlertApiAlertsAlertIdSubscribePost @@ -210,7 +209,7 @@ async def asyncio( Args: alert_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/alerts/unsubscribe_from_alert_api_alerts_alert_id_unsubscribe_post.py b/seclai/_generated/api/alerts/unsubscribe_from_alert_api_alerts_alert_id_unsubscribe_post.py index b7a1026..5688f64 100644 --- a/seclai/_generated/api/alerts/unsubscribe_from_alert_api_alerts_alert_id_unsubscribe_post.py +++ b/seclai/_generated/api/alerts/unsubscribe_from_alert_api_alerts_alert_id_unsubscribe_post.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -17,7 +16,7 @@ def _get_kwargs( alert_id: str, *, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -77,7 +76,7 @@ def sync_detailed( alert_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ HTTPValidationError | UnsubscribeFromAlertApiAlertsAlertIdUnsubscribePostResponseUnsubscribeFromAlertApiAlertsAlertIdUnsubscribePost @@ -92,7 +91,7 @@ def sync_detailed( Args: alert_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -118,7 +117,7 @@ def sync( alert_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ( HTTPValidationError | UnsubscribeFromAlertApiAlertsAlertIdUnsubscribePostResponseUnsubscribeFromAlertApiAlertsAlertIdUnsubscribePost @@ -134,7 +133,7 @@ def sync( Args: alert_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -155,7 +154,7 @@ async def asyncio_detailed( alert_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ HTTPValidationError | UnsubscribeFromAlertApiAlertsAlertIdUnsubscribePostResponseUnsubscribeFromAlertApiAlertsAlertIdUnsubscribePost @@ -170,7 +169,7 @@ async def asyncio_detailed( Args: alert_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -194,7 +193,7 @@ async def asyncio( alert_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ( HTTPValidationError | UnsubscribeFromAlertApiAlertsAlertIdUnsubscribePostResponseUnsubscribeFromAlertApiAlertsAlertIdUnsubscribePost @@ -210,7 +209,7 @@ async def asyncio( Args: alert_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/alerts/update_alert_config_api_alerts_configs_config_id_patch.py b/seclai/_generated/api/alerts/update_alert_config_api_alerts_configs_config_id_patch.py index 745d665..b43c36a 100644 --- a/seclai/_generated/api/alerts/update_alert_config_api_alerts_configs_config_id_patch.py +++ b/seclai/_generated/api/alerts/update_alert_config_api_alerts_configs_config_id_patch.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -19,7 +18,7 @@ def _get_kwargs( config_id: str, *, body: UpdateAlertConfigRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -84,7 +83,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: UpdateAlertConfigRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ HTTPValidationError | UpdateAlertConfigApiAlertsConfigsConfigIdPatchResponseUpdateAlertConfigApiAlertsConfigsConfigIdPatch @@ -98,7 +97,7 @@ def sync_detailed( Args: config_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UpdateAlertConfigRequest): Raises: @@ -127,7 +126,7 @@ def sync( *, client: AuthenticatedClient | Client, body: UpdateAlertConfigRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ( HTTPValidationError | UpdateAlertConfigApiAlertsConfigsConfigIdPatchResponseUpdateAlertConfigApiAlertsConfigsConfigIdPatch @@ -142,7 +141,7 @@ def sync( Args: config_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UpdateAlertConfigRequest): Raises: @@ -166,7 +165,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: UpdateAlertConfigRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ HTTPValidationError | UpdateAlertConfigApiAlertsConfigsConfigIdPatchResponseUpdateAlertConfigApiAlertsConfigsConfigIdPatch @@ -180,7 +179,7 @@ async def asyncio_detailed( Args: config_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UpdateAlertConfigRequest): Raises: @@ -207,7 +206,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: UpdateAlertConfigRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ( HTTPValidationError | UpdateAlertConfigApiAlertsConfigsConfigIdPatchResponseUpdateAlertConfigApiAlertsConfigsConfigIdPatch @@ -222,7 +221,7 @@ async def asyncio( Args: config_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UpdateAlertConfigRequest): Raises: diff --git a/seclai/_generated/api/alerts/update_organization_preference_api_alerts_organization_preferences_organization_id_alert_type_patch.py b/seclai/_generated/api/alerts/update_organization_preference_api_alerts_organization_preferences_organization_id_alert_type_patch.py index 1a6244c..d5fd227 100644 --- a/seclai/_generated/api/alerts/update_organization_preference_api_alerts_organization_preferences_organization_id_alert_type_patch.py +++ b/seclai/_generated/api/alerts/update_organization_preference_api_alerts_organization_preferences_organization_id_alert_type_patch.py @@ -22,7 +22,7 @@ def _get_kwargs( alert_type: str, *, body: UpdateOrganizationAlertPreferenceRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -80,7 +80,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: UpdateOrganizationAlertPreferenceRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | OrganizationAlertPreferenceResponse]: """Update organization alert delivery preference @@ -96,7 +96,7 @@ def sync_detailed( Args: organization_id (UUID): alert_type (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UpdateOrganizationAlertPreferenceRequest): Raises: @@ -127,7 +127,7 @@ def sync( *, client: AuthenticatedClient | Client, body: UpdateOrganizationAlertPreferenceRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | OrganizationAlertPreferenceResponse | None: """Update organization alert delivery preference @@ -143,7 +143,7 @@ def sync( Args: organization_id (UUID): alert_type (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UpdateOrganizationAlertPreferenceRequest): Raises: @@ -169,7 +169,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: UpdateOrganizationAlertPreferenceRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | OrganizationAlertPreferenceResponse]: """Update organization alert delivery preference @@ -185,7 +185,7 @@ async def asyncio_detailed( Args: organization_id (UUID): alert_type (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UpdateOrganizationAlertPreferenceRequest): Raises: @@ -214,7 +214,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: UpdateOrganizationAlertPreferenceRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | OrganizationAlertPreferenceResponse | None: """Update organization alert delivery preference @@ -230,7 +230,7 @@ async def asyncio( Args: organization_id (UUID): alert_type (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UpdateOrganizationAlertPreferenceRequest): Raises: diff --git a/seclai/_generated/api/contents/delete_content_api_contents_source_connection_content_version_delete.py b/seclai/_generated/api/contents/delete_content_api_contents_source_connection_content_version_delete.py index 86481c3..4e8f21e 100644 --- a/seclai/_generated/api/contents/delete_content_api_contents_source_connection_content_version_delete.py +++ b/seclai/_generated/api/contents/delete_content_api_contents_source_connection_content_version_delete.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any, cast from urllib.parse import quote -from uuid import UUID import httpx @@ -14,7 +13,7 @@ def _get_kwargs( source_connection_content_version: str, *, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -66,7 +65,7 @@ def sync_detailed( source_connection_content_version: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Delete content @@ -81,7 +80,7 @@ def sync_detailed( Args: source_connection_content_version (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -107,7 +106,7 @@ def sync( source_connection_content_version: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Delete content @@ -122,7 +121,7 @@ def sync( Args: source_connection_content_version (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -143,7 +142,7 @@ async def asyncio_detailed( source_connection_content_version: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Delete content @@ -158,7 +157,7 @@ async def asyncio_detailed( Args: source_connection_content_version (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -182,7 +181,7 @@ async def asyncio( source_connection_content_version: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Delete content @@ -197,7 +196,7 @@ async def asyncio( Args: source_connection_content_version (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/contents/get_content_detail_api_contents_source_connection_content_version_get.py b/seclai/_generated/api/contents/get_content_detail_api_contents_source_connection_content_version_get.py index d2891b6..7db6e0d 100644 --- a/seclai/_generated/api/contents/get_content_detail_api_contents_source_connection_content_version_get.py +++ b/seclai/_generated/api/contents/get_content_detail_api_contents_source_connection_content_version_get.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -17,7 +16,7 @@ def _get_kwargs( *, start: int | Unset = 0, end: int | Unset = 5000, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -81,7 +80,7 @@ def sync_detailed( client: AuthenticatedClient | Client, start: int | Unset = 0, end: int | Unset = 5000, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ContentDetailResponse | HTTPValidationError]: """Get content details @@ -103,7 +102,7 @@ def sync_detailed( source_connection_content_version (str): start (int | Unset): Default: 0. end (int | Unset): Default: 5000. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -133,7 +132,7 @@ def sync( client: AuthenticatedClient | Client, start: int | Unset = 0, end: int | Unset = 5000, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ContentDetailResponse | HTTPValidationError | None: """Get content details @@ -155,7 +154,7 @@ def sync( source_connection_content_version (str): start (int | Unset): Default: 0. end (int | Unset): Default: 5000. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -180,7 +179,7 @@ async def asyncio_detailed( client: AuthenticatedClient | Client, start: int | Unset = 0, end: int | Unset = 5000, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ContentDetailResponse | HTTPValidationError]: """Get content details @@ -202,7 +201,7 @@ async def asyncio_detailed( source_connection_content_version (str): start (int | Unset): Default: 0. end (int | Unset): Default: 5000. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -230,7 +229,7 @@ async def asyncio( client: AuthenticatedClient | Client, start: int | Unset = 0, end: int | Unset = 5000, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ContentDetailResponse | HTTPValidationError | None: """Get content details @@ -252,7 +251,7 @@ async def asyncio( source_connection_content_version (str): start (int | Unset): Default: 0. end (int | Unset): Default: 5000. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/contents/list_content_embeddings_api_contents_source_connection_content_version_embeddings_get.py b/seclai/_generated/api/contents/list_content_embeddings_api_contents_source_connection_content_version_embeddings_get.py index 7b2757c..0628395 100644 --- a/seclai/_generated/api/contents/list_content_embeddings_api_contents_source_connection_content_version_embeddings_get.py +++ b/seclai/_generated/api/contents/list_content_embeddings_api_contents_source_connection_content_version_embeddings_get.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -17,7 +16,7 @@ def _get_kwargs( *, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -81,7 +80,7 @@ def sync_detailed( client: AuthenticatedClient | Client, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ContentEmbeddingsListResponse | HTTPValidationError]: """List content embeddings @@ -98,7 +97,7 @@ def sync_detailed( source_connection_content_version (str): page (int | Unset): Default: 1. limit (int | Unset): Default: 20. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -128,7 +127,7 @@ def sync( client: AuthenticatedClient | Client, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ContentEmbeddingsListResponse | HTTPValidationError | None: """List content embeddings @@ -145,7 +144,7 @@ def sync( source_connection_content_version (str): page (int | Unset): Default: 1. limit (int | Unset): Default: 20. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -170,7 +169,7 @@ async def asyncio_detailed( client: AuthenticatedClient | Client, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ContentEmbeddingsListResponse | HTTPValidationError]: """List content embeddings @@ -187,7 +186,7 @@ async def asyncio_detailed( source_connection_content_version (str): page (int | Unset): Default: 1. limit (int | Unset): Default: 20. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -215,7 +214,7 @@ async def asyncio( client: AuthenticatedClient | Client, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ContentEmbeddingsListResponse | HTTPValidationError | None: """List content embeddings @@ -232,7 +231,7 @@ async def asyncio( source_connection_content_version (str): page (int | Unset): Default: 1. limit (int | Unset): Default: 20. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/contents/replace_content_with_inline_text_api_contents_source_connection_content_version_put.py b/seclai/_generated/api/contents/replace_content_with_inline_text_api_contents_source_connection_content_version_put.py index 8844fdd..214d65c 100644 --- a/seclai/_generated/api/contents/replace_content_with_inline_text_api_contents_source_connection_content_version_put.py +++ b/seclai/_generated/api/contents/replace_content_with_inline_text_api_contents_source_connection_content_version_put.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -17,7 +16,7 @@ def _get_kwargs( source_connection_content_version: str, *, body: InlineTextReplaceRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -75,7 +74,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: InlineTextReplaceRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[FileUploadResponse | HTTPValidationError]: """Replace a content version with inline text @@ -99,7 +98,7 @@ def sync_detailed( Args: source_connection_content_version (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (InlineTextReplaceRequest): Request model for inline text content replacement. Raises: @@ -128,7 +127,7 @@ def sync( *, client: AuthenticatedClient | Client, body: InlineTextReplaceRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> FileUploadResponse | HTTPValidationError | None: """Replace a content version with inline text @@ -152,7 +151,7 @@ def sync( Args: source_connection_content_version (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (InlineTextReplaceRequest): Request model for inline text content replacement. Raises: @@ -176,7 +175,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: InlineTextReplaceRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[FileUploadResponse | HTTPValidationError]: """Replace a content version with inline text @@ -200,7 +199,7 @@ async def asyncio_detailed( Args: source_connection_content_version (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (InlineTextReplaceRequest): Request model for inline text content replacement. Raises: @@ -227,7 +226,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: InlineTextReplaceRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> FileUploadResponse | HTTPValidationError | None: """Replace a content version with inline text @@ -251,7 +250,7 @@ async def asyncio( Args: source_connection_content_version (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (InlineTextReplaceRequest): Request model for inline text content replacement. Raises: diff --git a/seclai/_generated/api/contents/upload_file_to_content_api_contents_source_connection_content_version_upload_post.py b/seclai/_generated/api/contents/upload_file_to_content_api_contents_source_connection_content_version_upload_post.py index 7eb06ed..c9d18d8 100644 --- a/seclai/_generated/api/contents/upload_file_to_content_api_contents_source_connection_content_version_upload_post.py +++ b/seclai/_generated/api/contents/upload_file_to_content_api_contents_source_connection_content_version_upload_post.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -19,7 +18,7 @@ def _get_kwargs( source_connection_content_version: str, *, body: BodyUploadFileToContentApiContentsSourceConnectionContentVersionUploadPost, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -75,7 +74,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: BodyUploadFileToContentApiContentsSourceConnectionContentVersionUploadPost, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[FileUploadResponse | HTTPValidationError]: r"""Replace a content version with a new upload @@ -136,7 +135,7 @@ def sync_detailed( Args: source_connection_content_version (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (BodyUploadFileToContentApiContentsSourceConnectionContentVersionUploadPost): Raises: @@ -165,7 +164,7 @@ def sync( *, client: AuthenticatedClient | Client, body: BodyUploadFileToContentApiContentsSourceConnectionContentVersionUploadPost, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> FileUploadResponse | HTTPValidationError | None: r"""Replace a content version with a new upload @@ -226,7 +225,7 @@ def sync( Args: source_connection_content_version (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (BodyUploadFileToContentApiContentsSourceConnectionContentVersionUploadPost): Raises: @@ -250,7 +249,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: BodyUploadFileToContentApiContentsSourceConnectionContentVersionUploadPost, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[FileUploadResponse | HTTPValidationError]: r"""Replace a content version with a new upload @@ -311,7 +310,7 @@ async def asyncio_detailed( Args: source_connection_content_version (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (BodyUploadFileToContentApiContentsSourceConnectionContentVersionUploadPost): Raises: @@ -338,7 +337,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: BodyUploadFileToContentApiContentsSourceConnectionContentVersionUploadPost, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> FileUploadResponse | HTTPValidationError | None: r"""Replace a content version with a new upload @@ -399,7 +398,7 @@ async def asyncio( Args: source_connection_content_version (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (BodyUploadFileToContentApiContentsSourceConnectionContentVersionUploadPost): Raises: diff --git a/seclai/_generated/api/governance/governance_ai_accept_api_governance_ai_assistant_conversation_id_accept_post.py b/seclai/_generated/api/governance/governance_ai_accept_api_governance_ai_assistant_conversation_id_accept_post.py index f3691e0..59948d8 100644 --- a/seclai/_generated/api/governance/governance_ai_accept_api_governance_ai_assistant_conversation_id_accept_post.py +++ b/seclai/_generated/api/governance/governance_ai_accept_api_governance_ai_assistant_conversation_id_accept_post.py @@ -15,7 +15,7 @@ def _get_kwargs( conversation_id: UUID, *, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -74,7 +74,7 @@ def sync_detailed( conversation_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | GovernanceAiAcceptResponse | HTTPValidationError]: """Accept a governance plan @@ -85,7 +85,7 @@ def sync_detailed( Args: conversation_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -111,7 +111,7 @@ def sync( conversation_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | GovernanceAiAcceptResponse | HTTPValidationError | None: """Accept a governance plan @@ -122,7 +122,7 @@ def sync( Args: conversation_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -143,7 +143,7 @@ async def asyncio_detailed( conversation_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | GovernanceAiAcceptResponse | HTTPValidationError]: """Accept a governance plan @@ -154,7 +154,7 @@ async def asyncio_detailed( Args: conversation_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -178,7 +178,7 @@ async def asyncio( conversation_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | GovernanceAiAcceptResponse | HTTPValidationError | None: """Accept a governance plan @@ -189,7 +189,7 @@ async def asyncio( Args: conversation_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/governance/governance_ai_decline_api_governance_ai_assistant_conversation_id_decline_post.py b/seclai/_generated/api/governance/governance_ai_decline_api_governance_ai_assistant_conversation_id_decline_post.py index 8c94324..cd43b86 100644 --- a/seclai/_generated/api/governance/governance_ai_decline_api_governance_ai_assistant_conversation_id_decline_post.py +++ b/seclai/_generated/api/governance/governance_ai_decline_api_governance_ai_assistant_conversation_id_decline_post.py @@ -14,7 +14,7 @@ def _get_kwargs( conversation_id: UUID, *, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -72,7 +72,7 @@ def sync_detailed( conversation_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Decline a governance plan @@ -83,7 +83,7 @@ def sync_detailed( Args: conversation_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -109,7 +109,7 @@ def sync( conversation_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Decline a governance plan @@ -120,7 +120,7 @@ def sync( Args: conversation_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -141,7 +141,7 @@ async def asyncio_detailed( conversation_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Decline a governance plan @@ -152,7 +152,7 @@ async def asyncio_detailed( Args: conversation_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -176,7 +176,7 @@ async def asyncio( conversation_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Decline a governance plan @@ -187,7 +187,7 @@ async def asyncio( Args: conversation_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/governance/governance_ai_generate_api_governance_ai_assistant_post.py b/seclai/_generated/api/governance/governance_ai_generate_api_governance_ai_assistant_post.py index 93570fa..114ab3f 100644 --- a/seclai/_generated/api/governance/governance_ai_generate_api_governance_ai_assistant_post.py +++ b/seclai/_generated/api/governance/governance_ai_generate_api_governance_ai_assistant_post.py @@ -1,6 +1,5 @@ from http import HTTPStatus from typing import Any, cast -from uuid import UUID import httpx @@ -15,7 +14,7 @@ def _get_kwargs( *, body: GovernanceAiAssistantRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -76,7 +75,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: GovernanceAiAssistantRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | GovernanceAiAssistantResponse | HTTPValidationError]: """Generate a governance plan @@ -86,7 +85,7 @@ def sync_detailed( Auth: requires `X-API-Key` header or OAuth Bearer token with governance access. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (GovernanceAiAssistantRequest): Request body for the governance AI assistant. Raises: @@ -113,7 +112,7 @@ def sync( *, client: AuthenticatedClient | Client, body: GovernanceAiAssistantRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | GovernanceAiAssistantResponse | HTTPValidationError | None: """Generate a governance plan @@ -123,7 +122,7 @@ def sync( Auth: requires `X-API-Key` header or OAuth Bearer token with governance access. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (GovernanceAiAssistantRequest): Request body for the governance AI assistant. Raises: @@ -145,7 +144,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: GovernanceAiAssistantRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | GovernanceAiAssistantResponse | HTTPValidationError]: """Generate a governance plan @@ -155,7 +154,7 @@ async def asyncio_detailed( Auth: requires `X-API-Key` header or OAuth Bearer token with governance access. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (GovernanceAiAssistantRequest): Request body for the governance AI assistant. Raises: @@ -180,7 +179,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: GovernanceAiAssistantRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | GovernanceAiAssistantResponse | HTTPValidationError | None: """Generate a governance plan @@ -190,7 +189,7 @@ async def asyncio( Auth: requires `X-API-Key` header or OAuth Bearer token with governance access. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (GovernanceAiAssistantRequest): Request body for the governance AI assistant. Raises: diff --git a/seclai/_generated/api/governance/list_governance_ai_conversations_api_governance_ai_assistant_conversations_get.py b/seclai/_generated/api/governance/list_governance_ai_conversations_api_governance_ai_assistant_conversations_get.py index cef3677..1b46f70 100644 --- a/seclai/_generated/api/governance/list_governance_ai_conversations_api_governance_ai_assistant_conversations_get.py +++ b/seclai/_generated/api/governance/list_governance_ai_conversations_api_governance_ai_assistant_conversations_get.py @@ -1,6 +1,5 @@ from http import HTTPStatus from typing import Any, cast -from uuid import UUID import httpx @@ -14,7 +13,7 @@ def _get_kwargs( *, limit: int | Unset = 20, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -81,7 +80,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, limit: int | Unset = 20, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | HTTPValidationError | list[GovernanceConversationResponse]]: """List AI assistant conversations @@ -91,7 +90,7 @@ def sync_detailed( Args: limit (int | Unset): Number of conversations. Default: 20. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -117,7 +116,7 @@ def sync( *, client: AuthenticatedClient | Client, limit: int | Unset = 20, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | HTTPValidationError | list[GovernanceConversationResponse] | None: """List AI assistant conversations @@ -127,7 +126,7 @@ def sync( Args: limit (int | Unset): Number of conversations. Default: 20. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -148,7 +147,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, limit: int | Unset = 20, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | HTTPValidationError | list[GovernanceConversationResponse]]: """List AI assistant conversations @@ -158,7 +157,7 @@ async def asyncio_detailed( Args: limit (int | Unset): Number of conversations. Default: 20. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -182,7 +181,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, limit: int | Unset = 20, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | HTTPValidationError | list[GovernanceConversationResponse] | None: """List AI assistant conversations @@ -192,7 +191,7 @@ async def asyncio( Args: limit (int | Unset): Number of conversations. Default: 20. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/identity/get_me_api_me_get.py b/seclai/_generated/api/identity/get_me_api_me_get.py index 0d0170f..da0549a 100644 --- a/seclai/_generated/api/identity/get_me_api_me_get.py +++ b/seclai/_generated/api/identity/get_me_api_me_get.py @@ -1,6 +1,5 @@ from http import HTTPStatus from typing import Any -from uuid import UUID import httpx @@ -12,7 +11,7 @@ def _get_kwargs( *, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -55,7 +54,7 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[MeResponse]: """Get current user identity @@ -64,7 +63,7 @@ def sync_detailed( that needs to let the user pick an organization context. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -88,7 +87,7 @@ def sync_detailed( def sync( *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> MeResponse | None: """Get current user identity @@ -97,7 +96,7 @@ def sync( that needs to let the user pick an organization context. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -116,7 +115,7 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[MeResponse]: """Get current user identity @@ -125,7 +124,7 @@ async def asyncio_detailed( that needs to let the user pick an organization context. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -147,7 +146,7 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> MeResponse | None: """Get current user identity @@ -156,7 +155,7 @@ async def asyncio( that needs to let the user pick an organization context. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/knowledge_bases/create_knowledge_base_api_knowledge_bases_post.py b/seclai/_generated/api/knowledge_bases/create_knowledge_base_api_knowledge_bases_post.py index 6ed772e..6393085 100644 --- a/seclai/_generated/api/knowledge_bases/create_knowledge_base_api_knowledge_bases_post.py +++ b/seclai/_generated/api/knowledge_bases/create_knowledge_base_api_knowledge_bases_post.py @@ -1,6 +1,5 @@ from http import HTTPStatus from typing import Any, cast -from uuid import UUID import httpx @@ -15,7 +14,7 @@ def _get_kwargs( *, body: CreateKnowledgeBaseBody, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -72,7 +71,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: CreateKnowledgeBaseBody, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | HTTPValidationError | KnowledgeBase]: """Create Knowledge Base @@ -81,7 +80,7 @@ def sync_detailed( At least one `source_id` is required. The source connections must belong to the same account. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (CreateKnowledgeBaseBody): Request body for creating a knowledge base. Raises: @@ -108,7 +107,7 @@ def sync( *, client: AuthenticatedClient | Client, body: CreateKnowledgeBaseBody, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | HTTPValidationError | KnowledgeBase | None: """Create Knowledge Base @@ -117,7 +116,7 @@ def sync( At least one `source_id` is required. The source connections must belong to the same account. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (CreateKnowledgeBaseBody): Request body for creating a knowledge base. Raises: @@ -139,7 +138,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: CreateKnowledgeBaseBody, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | HTTPValidationError | KnowledgeBase]: """Create Knowledge Base @@ -148,7 +147,7 @@ async def asyncio_detailed( At least one `source_id` is required. The source connections must belong to the same account. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (CreateKnowledgeBaseBody): Request body for creating a knowledge base. Raises: @@ -173,7 +172,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: CreateKnowledgeBaseBody, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | HTTPValidationError | KnowledgeBase | None: """Create Knowledge Base @@ -182,7 +181,7 @@ async def asyncio( At least one `source_id` is required. The source connections must belong to the same account. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (CreateKnowledgeBaseBody): Request body for creating a knowledge base. Raises: diff --git a/seclai/_generated/api/knowledge_bases/delete_knowledge_base_api_knowledge_bases_knowledge_base_id_delete.py b/seclai/_generated/api/knowledge_bases/delete_knowledge_base_api_knowledge_bases_knowledge_base_id_delete.py index 39702c1..67b24f2 100644 --- a/seclai/_generated/api/knowledge_bases/delete_knowledge_base_api_knowledge_bases_knowledge_base_id_delete.py +++ b/seclai/_generated/api/knowledge_bases/delete_knowledge_base_api_knowledge_bases_knowledge_base_id_delete.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any, cast from urllib.parse import quote -from uuid import UUID import httpx @@ -14,7 +13,7 @@ def _get_kwargs( knowledge_base_id: str, *, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -64,7 +63,7 @@ def sync_detailed( knowledge_base_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Delete Knowledge Base @@ -75,7 +74,7 @@ def sync_detailed( Args: knowledge_base_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -101,7 +100,7 @@ def sync( knowledge_base_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Delete Knowledge Base @@ -112,7 +111,7 @@ def sync( Args: knowledge_base_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -133,7 +132,7 @@ async def asyncio_detailed( knowledge_base_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Delete Knowledge Base @@ -144,7 +143,7 @@ async def asyncio_detailed( Args: knowledge_base_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -168,7 +167,7 @@ async def asyncio( knowledge_base_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Delete Knowledge Base @@ -179,7 +178,7 @@ async def asyncio( Args: knowledge_base_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/knowledge_bases/get_knowledge_base_api_knowledge_bases_knowledge_base_id_get.py b/seclai/_generated/api/knowledge_bases/get_knowledge_base_api_knowledge_bases_knowledge_base_id_get.py index a7f9821..ccb7aa1 100644 --- a/seclai/_generated/api/knowledge_bases/get_knowledge_base_api_knowledge_bases_knowledge_base_id_get.py +++ b/seclai/_generated/api/knowledge_bases/get_knowledge_base_api_knowledge_bases_knowledge_base_id_get.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -15,7 +14,7 @@ def _get_kwargs( knowledge_base_id: str, *, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -66,7 +65,7 @@ def sync_detailed( knowledge_base_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | KnowledgeBase]: """Get Knowledge Base @@ -78,7 +77,7 @@ def sync_detailed( Args: knowledge_base_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -104,7 +103,7 @@ def sync( knowledge_base_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | KnowledgeBase | None: """Get Knowledge Base @@ -116,7 +115,7 @@ def sync( Args: knowledge_base_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -137,7 +136,7 @@ async def asyncio_detailed( knowledge_base_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | KnowledgeBase]: """Get Knowledge Base @@ -149,7 +148,7 @@ async def asyncio_detailed( Args: knowledge_base_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -173,7 +172,7 @@ async def asyncio( knowledge_base_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | KnowledgeBase | None: """Get Knowledge Base @@ -185,7 +184,7 @@ async def asyncio( Args: knowledge_base_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/knowledge_bases/list_knowledge_bases_api_knowledge_bases_get.py b/seclai/_generated/api/knowledge_bases/list_knowledge_bases_api_knowledge_bases_get.py index 8243a6d..01c3aab 100644 --- a/seclai/_generated/api/knowledge_bases/list_knowledge_bases_api_knowledge_bases_get.py +++ b/seclai/_generated/api/knowledge_bases/list_knowledge_bases_api_knowledge_bases_get.py @@ -1,6 +1,5 @@ from http import HTTPStatus from typing import Any -from uuid import UUID import httpx @@ -17,7 +16,7 @@ def _get_kwargs( limit: int | Unset = 20, sort: str | Unset = "created_at", order: str | Unset = "desc", - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -82,7 +81,7 @@ def sync_detailed( limit: int | Unset = 20, sort: str | Unset = "created_at", order: str | Unset = "desc", - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | KnowledgeBaseListResponseModel]: """List Knowledge Bases @@ -98,7 +97,7 @@ def sync_detailed( sort (str | Unset): Sort field. One of: created_at, updated_at, name. Default: 'created_at'. order (str | Unset): Sort direction: asc or desc. Default: 'desc'. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -130,7 +129,7 @@ def sync( limit: int | Unset = 20, sort: str | Unset = "created_at", order: str | Unset = "desc", - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | KnowledgeBaseListResponseModel | None: """List Knowledge Bases @@ -146,7 +145,7 @@ def sync( sort (str | Unset): Sort field. One of: created_at, updated_at, name. Default: 'created_at'. order (str | Unset): Sort direction: asc or desc. Default: 'desc'. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -173,7 +172,7 @@ async def asyncio_detailed( limit: int | Unset = 20, sort: str | Unset = "created_at", order: str | Unset = "desc", - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | KnowledgeBaseListResponseModel]: """List Knowledge Bases @@ -189,7 +188,7 @@ async def asyncio_detailed( sort (str | Unset): Sort field. One of: created_at, updated_at, name. Default: 'created_at'. order (str | Unset): Sort direction: asc or desc. Default: 'desc'. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -219,7 +218,7 @@ async def asyncio( limit: int | Unset = 20, sort: str | Unset = "created_at", order: str | Unset = "desc", - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | KnowledgeBaseListResponseModel | None: """List Knowledge Bases @@ -235,7 +234,7 @@ async def asyncio( sort (str | Unset): Sort field. One of: created_at, updated_at, name. Default: 'created_at'. order (str | Unset): Sort direction: asc or desc. Default: 'desc'. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/knowledge_bases/update_knowledge_base_api_knowledge_bases_knowledge_base_id_put.py b/seclai/_generated/api/knowledge_bases/update_knowledge_base_api_knowledge_bases_knowledge_base_id_put.py index f8d1bca..8776170 100644 --- a/seclai/_generated/api/knowledge_bases/update_knowledge_base_api_knowledge_bases_knowledge_base_id_put.py +++ b/seclai/_generated/api/knowledge_bases/update_knowledge_base_api_knowledge_bases_knowledge_base_id_put.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -17,7 +16,7 @@ def _get_kwargs( knowledge_base_id: str, *, body: UpdateKnowledgeBaseBody, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +72,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: UpdateKnowledgeBaseBody, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | KnowledgeBase]: """Update Knowledge Base @@ -86,7 +85,7 @@ def sync_detailed( Args: knowledge_base_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UpdateKnowledgeBaseBody): Request body for updating a knowledge base. Raises: @@ -115,7 +114,7 @@ def sync( *, client: AuthenticatedClient | Client, body: UpdateKnowledgeBaseBody, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | KnowledgeBase | None: """Update Knowledge Base @@ -128,7 +127,7 @@ def sync( Args: knowledge_base_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UpdateKnowledgeBaseBody): Request body for updating a knowledge base. Raises: @@ -152,7 +151,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: UpdateKnowledgeBaseBody, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | KnowledgeBase]: """Update Knowledge Base @@ -165,7 +164,7 @@ async def asyncio_detailed( Args: knowledge_base_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UpdateKnowledgeBaseBody): Request body for updating a knowledge base. Raises: @@ -192,7 +191,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: UpdateKnowledgeBaseBody, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | KnowledgeBase | None: """Update Knowledge Base @@ -205,7 +204,7 @@ async def asyncio( Args: knowledge_base_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UpdateKnowledgeBaseBody): Request body for updating a knowledge base. Raises: diff --git a/seclai/_generated/api/memory_banks/compact_memory_bank_api_memory_banks_memory_bank_id_compact_post.py b/seclai/_generated/api/memory_banks/compact_memory_bank_api_memory_banks_memory_bank_id_compact_post.py index 5bdb43a..a708a63 100644 --- a/seclai/_generated/api/memory_banks/compact_memory_bank_api_memory_banks_memory_bank_id_compact_post.py +++ b/seclai/_generated/api/memory_banks/compact_memory_bank_api_memory_banks_memory_bank_id_compact_post.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -17,7 +16,7 @@ def _get_kwargs( memory_bank_id: str, *, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -77,7 +76,7 @@ def sync_detailed( memory_bank_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ CompactMemoryBankApiMemoryBanksMemoryBankIdCompactPostResponseCompactMemoryBankApiMemoryBanksMemoryBankIdCompactPost | HTTPValidationError @@ -91,7 +90,7 @@ def sync_detailed( Args: memory_bank_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -117,7 +116,7 @@ def sync( memory_bank_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ( CompactMemoryBankApiMemoryBanksMemoryBankIdCompactPostResponseCompactMemoryBankApiMemoryBanksMemoryBankIdCompactPost | HTTPValidationError @@ -132,7 +131,7 @@ def sync( Args: memory_bank_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -153,7 +152,7 @@ async def asyncio_detailed( memory_bank_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ CompactMemoryBankApiMemoryBanksMemoryBankIdCompactPostResponseCompactMemoryBankApiMemoryBanksMemoryBankIdCompactPost | HTTPValidationError @@ -167,7 +166,7 @@ async def asyncio_detailed( Args: memory_bank_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -191,7 +190,7 @@ async def asyncio( memory_bank_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ( CompactMemoryBankApiMemoryBanksMemoryBankIdCompactPostResponseCompactMemoryBankApiMemoryBanksMemoryBankIdCompactPost | HTTPValidationError @@ -206,7 +205,7 @@ async def asyncio( Args: memory_bank_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/memory_banks/create_memory_bank_api_memory_banks_post.py b/seclai/_generated/api/memory_banks/create_memory_bank_api_memory_banks_post.py index 486f347..a9e077b 100644 --- a/seclai/_generated/api/memory_banks/create_memory_bank_api_memory_banks_post.py +++ b/seclai/_generated/api/memory_banks/create_memory_bank_api_memory_banks_post.py @@ -1,6 +1,5 @@ from http import HTTPStatus from typing import Any -from uuid import UUID import httpx @@ -15,7 +14,7 @@ def _get_kwargs( *, body: CreateMemoryBankBody, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -68,7 +67,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: CreateMemoryBankBody, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | MemoryBank]: """Create Memory Bank @@ -78,7 +77,7 @@ def sync_detailed( (supply your own embedding params). Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (CreateMemoryBankBody): Request body for creating a memory bank. Raises: @@ -105,7 +104,7 @@ def sync( *, client: AuthenticatedClient | Client, body: CreateMemoryBankBody, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | MemoryBank | None: """Create Memory Bank @@ -115,7 +114,7 @@ def sync( (supply your own embedding params). Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (CreateMemoryBankBody): Request body for creating a memory bank. Raises: @@ -137,7 +136,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: CreateMemoryBankBody, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | MemoryBank]: """Create Memory Bank @@ -147,7 +146,7 @@ async def asyncio_detailed( (supply your own embedding params). Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (CreateMemoryBankBody): Request body for creating a memory bank. Raises: @@ -172,7 +171,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: CreateMemoryBankBody, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | MemoryBank | None: """Create Memory Bank @@ -182,7 +181,7 @@ async def asyncio( (supply your own embedding params). Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (CreateMemoryBankBody): Request body for creating a memory bank. Raises: diff --git a/seclai/_generated/api/memory_banks/delete_memory_bank_api_memory_banks_memory_bank_id_delete.py b/seclai/_generated/api/memory_banks/delete_memory_bank_api_memory_banks_memory_bank_id_delete.py index 811e36e..70f4e04 100644 --- a/seclai/_generated/api/memory_banks/delete_memory_bank_api_memory_banks_memory_bank_id_delete.py +++ b/seclai/_generated/api/memory_banks/delete_memory_bank_api_memory_banks_memory_bank_id_delete.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any, cast from urllib.parse import quote -from uuid import UUID import httpx @@ -14,7 +13,7 @@ def _get_kwargs( memory_bank_id: str, *, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -64,7 +63,7 @@ def sync_detailed( memory_bank_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Delete Memory Bank @@ -74,7 +73,7 @@ def sync_detailed( Args: memory_bank_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -100,7 +99,7 @@ def sync( memory_bank_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Delete Memory Bank @@ -110,7 +109,7 @@ def sync( Args: memory_bank_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -131,7 +130,7 @@ async def asyncio_detailed( memory_bank_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Delete Memory Bank @@ -141,7 +140,7 @@ async def asyncio_detailed( Args: memory_bank_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -165,7 +164,7 @@ async def asyncio( memory_bank_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Delete Memory Bank @@ -175,7 +174,7 @@ async def asyncio( Args: memory_bank_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/memory_banks/delete_memory_bank_source_api_memory_banks_memory_bank_id_source_delete.py b/seclai/_generated/api/memory_banks/delete_memory_bank_source_api_memory_banks_memory_bank_id_source_delete.py index d7266e8..0d110e2 100644 --- a/seclai/_generated/api/memory_banks/delete_memory_bank_source_api_memory_banks_memory_bank_id_source_delete.py +++ b/seclai/_generated/api/memory_banks/delete_memory_bank_source_api_memory_banks_memory_bank_id_source_delete.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any, cast from urllib.parse import quote -from uuid import UUID import httpx @@ -14,7 +13,7 @@ def _get_kwargs( memory_bank_id: str, *, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -64,7 +63,7 @@ def sync_detailed( memory_bank_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Delete Memory Bank Source @@ -75,7 +74,7 @@ def sync_detailed( Args: memory_bank_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -101,7 +100,7 @@ def sync( memory_bank_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Delete Memory Bank Source @@ -112,7 +111,7 @@ def sync( Args: memory_bank_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -133,7 +132,7 @@ async def asyncio_detailed( memory_bank_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Delete Memory Bank Source @@ -144,7 +143,7 @@ async def asyncio_detailed( Args: memory_bank_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -168,7 +167,7 @@ async def asyncio( memory_bank_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Delete Memory Bank Source @@ -179,7 +178,7 @@ async def asyncio( Args: memory_bank_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/memory_banks/get_agents_using_bank_api_memory_banks_memory_bank_id_agents_get.py b/seclai/_generated/api/memory_banks/get_agents_using_bank_api_memory_banks_memory_bank_id_agents_get.py index 95d39e5..b078a89 100644 --- a/seclai/_generated/api/memory_banks/get_agents_using_bank_api_memory_banks_memory_bank_id_agents_get.py +++ b/seclai/_generated/api/memory_banks/get_agents_using_bank_api_memory_banks_memory_bank_id_agents_get.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -17,7 +16,7 @@ def _get_kwargs( memory_bank_id: str, *, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -82,7 +81,7 @@ def sync_detailed( memory_bank_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ HTTPValidationError | list[GetAgentsUsingBankApiMemoryBanksMemoryBankIdAgentsGetResponse200Item] @@ -95,7 +94,7 @@ def sync_detailed( Args: memory_bank_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -121,7 +120,7 @@ def sync( memory_bank_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ( HTTPValidationError | list[GetAgentsUsingBankApiMemoryBanksMemoryBankIdAgentsGetResponse200Item] @@ -135,7 +134,7 @@ def sync( Args: memory_bank_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -156,7 +155,7 @@ async def asyncio_detailed( memory_bank_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ HTTPValidationError | list[GetAgentsUsingBankApiMemoryBanksMemoryBankIdAgentsGetResponse200Item] @@ -169,7 +168,7 @@ async def asyncio_detailed( Args: memory_bank_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -193,7 +192,7 @@ async def asyncio( memory_bank_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ( HTTPValidationError | list[GetAgentsUsingBankApiMemoryBanksMemoryBankIdAgentsGetResponse200Item] @@ -207,7 +206,7 @@ async def asyncio( Args: memory_bank_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/memory_banks/get_memory_bank_api_memory_banks_memory_bank_id_get.py b/seclai/_generated/api/memory_banks/get_memory_bank_api_memory_banks_memory_bank_id_get.py index 59ac95d..16d1b6c 100644 --- a/seclai/_generated/api/memory_banks/get_memory_bank_api_memory_banks_memory_bank_id_get.py +++ b/seclai/_generated/api/memory_banks/get_memory_bank_api_memory_banks_memory_bank_id_get.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -15,7 +14,7 @@ def _get_kwargs( memory_bank_id: str, *, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -66,7 +65,7 @@ def sync_detailed( memory_bank_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | MemoryBank]: """Get Memory Bank @@ -78,7 +77,7 @@ def sync_detailed( Args: memory_bank_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -104,7 +103,7 @@ def sync( memory_bank_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | MemoryBank | None: """Get Memory Bank @@ -116,7 +115,7 @@ def sync( Args: memory_bank_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -137,7 +136,7 @@ async def asyncio_detailed( memory_bank_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | MemoryBank]: """Get Memory Bank @@ -149,7 +148,7 @@ async def asyncio_detailed( Args: memory_bank_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -173,7 +172,7 @@ async def asyncio( memory_bank_id: str, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | MemoryBank | None: """Get Memory Bank @@ -185,7 +184,7 @@ async def asyncio( Args: memory_bank_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/memory_banks/get_memory_bank_entry_stats_api_memory_banks_memory_bank_id_stats_get.py b/seclai/_generated/api/memory_banks/get_memory_bank_entry_stats_api_memory_banks_memory_bank_id_stats_get.py index db2e9bf..756396e 100644 --- a/seclai/_generated/api/memory_banks/get_memory_bank_entry_stats_api_memory_banks_memory_bank_id_stats_get.py +++ b/seclai/_generated/api/memory_banks/get_memory_bank_entry_stats_api_memory_banks_memory_bank_id_stats_get.py @@ -2,7 +2,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -21,7 +20,7 @@ def _get_kwargs( days: int | Unset = 30, start_date: datetime.date | None | Unset = UNSET, end_date: datetime.date | None | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -109,7 +108,7 @@ def sync_detailed( days: int | Unset = 30, start_date: datetime.date | None | Unset = UNSET, end_date: datetime.date | None | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ GetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGetResponseGetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGet | HTTPValidationError @@ -125,7 +124,7 @@ def sync_detailed( days (int | Unset): Default: 30. start_date (datetime.date | None | Unset): end_date (datetime.date | None | Unset): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -157,7 +156,7 @@ def sync( days: int | Unset = 30, start_date: datetime.date | None | Unset = UNSET, end_date: datetime.date | None | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ( GetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGetResponseGetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGet | HTTPValidationError @@ -174,7 +173,7 @@ def sync( days (int | Unset): Default: 30. start_date (datetime.date | None | Unset): end_date (datetime.date | None | Unset): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -201,7 +200,7 @@ async def asyncio_detailed( days: int | Unset = 30, start_date: datetime.date | None | Unset = UNSET, end_date: datetime.date | None | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ GetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGetResponseGetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGet | HTTPValidationError @@ -217,7 +216,7 @@ async def asyncio_detailed( days (int | Unset): Default: 30. start_date (datetime.date | None | Unset): end_date (datetime.date | None | Unset): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -247,7 +246,7 @@ async def asyncio( days: int | Unset = 30, start_date: datetime.date | None | Unset = UNSET, end_date: datetime.date | None | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ( GetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGetResponseGetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGet | HTTPValidationError @@ -264,7 +263,7 @@ async def asyncio( days (int | Unset): Default: 30. start_date (datetime.date | None | Unset): end_date (datetime.date | None | Unset): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/memory_banks/list_memory_banks_api_memory_banks_get.py b/seclai/_generated/api/memory_banks/list_memory_banks_api_memory_banks_get.py index 5f2d0f7..f544c58 100644 --- a/seclai/_generated/api/memory_banks/list_memory_banks_api_memory_banks_get.py +++ b/seclai/_generated/api/memory_banks/list_memory_banks_api_memory_banks_get.py @@ -1,6 +1,5 @@ from http import HTTPStatus from typing import Any -from uuid import UUID import httpx @@ -18,7 +17,7 @@ def _get_kwargs( sort: str | Unset = "created_at", order: str | Unset = "desc", type_: None | str | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -91,7 +90,7 @@ def sync_detailed( sort: str | Unset = "created_at", order: str | Unset = "desc", type_: None | str | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | MemoryBankListResponseModel]: """List Memory Banks @@ -108,7 +107,7 @@ def sync_detailed( 'created_at'. order (str | Unset): Sort direction: asc or desc. Default: 'desc'. type_ (None | str | Unset): Filter by bank type: conversation or general. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -142,7 +141,7 @@ def sync( sort: str | Unset = "created_at", order: str | Unset = "desc", type_: None | str | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | MemoryBankListResponseModel | None: """List Memory Banks @@ -159,7 +158,7 @@ def sync( 'created_at'. order (str | Unset): Sort direction: asc or desc. Default: 'desc'. type_ (None | str | Unset): Filter by bank type: conversation or general. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -188,7 +187,7 @@ async def asyncio_detailed( sort: str | Unset = "created_at", order: str | Unset = "desc", type_: None | str | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | MemoryBankListResponseModel]: """List Memory Banks @@ -205,7 +204,7 @@ async def asyncio_detailed( 'created_at'. order (str | Unset): Sort direction: asc or desc. Default: 'desc'. type_ (None | str | Unset): Filter by bank type: conversation or general. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -237,7 +236,7 @@ async def asyncio( sort: str | Unset = "created_at", order: str | Unset = "desc", type_: None | str | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | MemoryBankListResponseModel | None: """List Memory Banks @@ -254,7 +253,7 @@ async def asyncio( 'created_at'. order (str | Unset): Sort direction: asc or desc. Default: 'desc'. type_ (None | str | Unset): Filter by bank type: conversation or general. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/memory_banks/list_templates_api_memory_banks_templates_get.py b/seclai/_generated/api/memory_banks/list_templates_api_memory_banks_templates_get.py index ae046c0..a8fcfd2 100644 --- a/seclai/_generated/api/memory_banks/list_templates_api_memory_banks_templates_get.py +++ b/seclai/_generated/api/memory_banks/list_templates_api_memory_banks_templates_get.py @@ -1,6 +1,5 @@ from http import HTTPStatus from typing import Any -from uuid import UUID import httpx @@ -14,7 +13,7 @@ def _get_kwargs( *, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -66,7 +65,7 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[list[ListTemplatesApiMemoryBanksTemplatesGetResponse200Item]]: """List Templates @@ -76,7 +75,7 @@ def sync_detailed( be used directly with the create endpoint. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -100,7 +99,7 @@ def sync_detailed( def sync( *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> list[ListTemplatesApiMemoryBanksTemplatesGetResponse200Item] | None: """List Templates @@ -110,7 +109,7 @@ def sync( be used directly with the create endpoint. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -129,7 +128,7 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[list[ListTemplatesApiMemoryBanksTemplatesGetResponse200Item]]: """List Templates @@ -139,7 +138,7 @@ async def asyncio_detailed( be used directly with the create endpoint. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -161,7 +160,7 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> list[ListTemplatesApiMemoryBanksTemplatesGetResponse200Item] | None: """List Templates @@ -171,7 +170,7 @@ async def asyncio( be used directly with the create endpoint. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/memory_banks/memory_bank_ai_accept_api_memory_banks_ai_assistant_conversation_id_patch.py b/seclai/_generated/api/memory_banks/memory_bank_ai_accept_api_memory_banks_ai_assistant_conversation_id_patch.py index a20bcc8..8c4ca8e 100644 --- a/seclai/_generated/api/memory_banks/memory_bank_ai_accept_api_memory_banks_ai_assistant_conversation_id_patch.py +++ b/seclai/_generated/api/memory_banks/memory_bank_ai_accept_api_memory_banks_ai_assistant_conversation_id_patch.py @@ -19,7 +19,7 @@ def _get_kwargs( conversation_id: UUID, *, body: MemoryBankAcceptRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -84,7 +84,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: MemoryBankAcceptRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ HTTPValidationError | MemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatchResponseMemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatch @@ -99,7 +99,7 @@ def sync_detailed( Args: conversation_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (MemoryBankAcceptRequest): Accept or decline a memory bank AI suggestion. Raises: @@ -128,7 +128,7 @@ def sync( *, client: AuthenticatedClient | Client, body: MemoryBankAcceptRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ( HTTPValidationError | MemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatchResponseMemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatch @@ -144,7 +144,7 @@ def sync( Args: conversation_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (MemoryBankAcceptRequest): Accept or decline a memory bank AI suggestion. Raises: @@ -168,7 +168,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: MemoryBankAcceptRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ HTTPValidationError | MemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatchResponseMemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatch @@ -183,7 +183,7 @@ async def asyncio_detailed( Args: conversation_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (MemoryBankAcceptRequest): Accept or decline a memory bank AI suggestion. Raises: @@ -210,7 +210,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: MemoryBankAcceptRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ( HTTPValidationError | MemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatchResponseMemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatch @@ -226,7 +226,7 @@ async def asyncio( Args: conversation_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (MemoryBankAcceptRequest): Accept or decline a memory bank AI suggestion. Raises: diff --git a/seclai/_generated/api/memory_banks/memory_bank_ai_generate_api_memory_banks_ai_assistant_post.py b/seclai/_generated/api/memory_banks/memory_bank_ai_generate_api_memory_banks_ai_assistant_post.py index 757ba72..9e3947b 100644 --- a/seclai/_generated/api/memory_banks/memory_bank_ai_generate_api_memory_banks_ai_assistant_post.py +++ b/seclai/_generated/api/memory_banks/memory_bank_ai_generate_api_memory_banks_ai_assistant_post.py @@ -1,6 +1,5 @@ from http import HTTPStatus from typing import Any, cast -from uuid import UUID import httpx @@ -15,7 +14,7 @@ def _get_kwargs( *, body: MemoryBankAiAssistantRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -72,7 +71,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: MemoryBankAiAssistantRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | HTTPValidationError | MemoryBankAiAssistantResponse]: """Generate a memory bank configuration @@ -82,7 +81,7 @@ def sync_detailed( Auth: requires `X-API-Key` header or OAuth Bearer token. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (MemoryBankAiAssistantRequest): Request body for the memory bank AI assistant. Raises: @@ -109,7 +108,7 @@ def sync( *, client: AuthenticatedClient | Client, body: MemoryBankAiAssistantRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | HTTPValidationError | MemoryBankAiAssistantResponse | None: """Generate a memory bank configuration @@ -119,7 +118,7 @@ def sync( Auth: requires `X-API-Key` header or OAuth Bearer token. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (MemoryBankAiAssistantRequest): Request body for the memory bank AI assistant. Raises: @@ -141,7 +140,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: MemoryBankAiAssistantRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | HTTPValidationError | MemoryBankAiAssistantResponse]: """Generate a memory bank configuration @@ -151,7 +150,7 @@ async def asyncio_detailed( Auth: requires `X-API-Key` header or OAuth Bearer token. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (MemoryBankAiAssistantRequest): Request body for the memory bank AI assistant. Raises: @@ -176,7 +175,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: MemoryBankAiAssistantRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | HTTPValidationError | MemoryBankAiAssistantResponse | None: """Generate a memory bank configuration @@ -186,7 +185,7 @@ async def asyncio( Auth: requires `X-API-Key` header or OAuth Bearer token. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (MemoryBankAiAssistantRequest): Request body for the memory bank AI assistant. Raises: diff --git a/seclai/_generated/api/memory_banks/memory_bank_ai_last_conversation_api_memory_banks_ai_assistant_last_conversation_get.py b/seclai/_generated/api/memory_banks/memory_bank_ai_last_conversation_api_memory_banks_ai_assistant_last_conversation_get.py index c0917d8..03feedb 100644 --- a/seclai/_generated/api/memory_banks/memory_bank_ai_last_conversation_api_memory_banks_ai_assistant_last_conversation_get.py +++ b/seclai/_generated/api/memory_banks/memory_bank_ai_last_conversation_api_memory_banks_ai_assistant_last_conversation_get.py @@ -1,6 +1,5 @@ from http import HTTPStatus from typing import Any -from uuid import UUID import httpx @@ -17,7 +16,7 @@ def _get_kwargs( *, limit: int | Unset = 5, offset: int | Unset = 0, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -76,7 +75,7 @@ def sync_detailed( client: AuthenticatedClient | Client, limit: int | Unset = 5, offset: int | Unset = 0, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | MemoryBankLastConversationResponse]: """Fetch memory bank AI conversation history @@ -88,7 +87,7 @@ def sync_detailed( Args: limit (int | Unset): Max turns to return. Default: 5. offset (int | Unset): Number of most-recent turns to skip. Default: 0. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -116,7 +115,7 @@ def sync( client: AuthenticatedClient | Client, limit: int | Unset = 5, offset: int | Unset = 0, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | MemoryBankLastConversationResponse | None: """Fetch memory bank AI conversation history @@ -128,7 +127,7 @@ def sync( Args: limit (int | Unset): Max turns to return. Default: 5. offset (int | Unset): Number of most-recent turns to skip. Default: 0. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -151,7 +150,7 @@ async def asyncio_detailed( client: AuthenticatedClient | Client, limit: int | Unset = 5, offset: int | Unset = 0, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | MemoryBankLastConversationResponse]: """Fetch memory bank AI conversation history @@ -163,7 +162,7 @@ async def asyncio_detailed( Args: limit (int | Unset): Max turns to return. Default: 5. offset (int | Unset): Number of most-recent turns to skip. Default: 0. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -189,7 +188,7 @@ async def asyncio( client: AuthenticatedClient | Client, limit: int | Unset = 5, offset: int | Unset = 0, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | MemoryBankLastConversationResponse | None: """Fetch memory bank AI conversation history @@ -201,7 +200,7 @@ async def asyncio( Args: limit (int | Unset): Max turns to return. Default: 5. offset (int | Unset): Number of most-recent turns to skip. Default: 0. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/memory_banks/test_compaction_prompt_api_memory_banks_memory_bank_id_test_compaction_post.py b/seclai/_generated/api/memory_banks/test_compaction_prompt_api_memory_banks_memory_bank_id_test_compaction_post.py index 4fdd40a..e560fed 100644 --- a/seclai/_generated/api/memory_banks/test_compaction_prompt_api_memory_banks_memory_bank_id_test_compaction_post.py +++ b/seclai/_generated/api/memory_banks/test_compaction_prompt_api_memory_banks_memory_bank_id_test_compaction_post.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -17,7 +16,7 @@ def _get_kwargs( memory_bank_id: str, *, body: TestCompactionRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +72,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: TestCompactionRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[CompactionTestResponseModel | HTTPValidationError]: """Test Compaction Prompt @@ -83,7 +82,7 @@ def sync_detailed( Args: memory_bank_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (TestCompactionRequest): Request body for testing a compaction prompt against an existing bank. @@ -124,7 +123,7 @@ def sync( *, client: AuthenticatedClient | Client, body: TestCompactionRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> CompactionTestResponseModel | HTTPValidationError | None: """Test Compaction Prompt @@ -134,7 +133,7 @@ def sync( Args: memory_bank_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (TestCompactionRequest): Request body for testing a compaction prompt against an existing bank. @@ -170,7 +169,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: TestCompactionRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[CompactionTestResponseModel | HTTPValidationError]: """Test Compaction Prompt @@ -180,7 +179,7 @@ async def asyncio_detailed( Args: memory_bank_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (TestCompactionRequest): Request body for testing a compaction prompt against an existing bank. @@ -219,7 +218,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: TestCompactionRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> CompactionTestResponseModel | HTTPValidationError | None: """Test Compaction Prompt @@ -229,7 +228,7 @@ async def asyncio( Args: memory_bank_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (TestCompactionRequest): Request body for testing a compaction prompt against an existing bank. diff --git a/seclai/_generated/api/memory_banks/test_compaction_prompt_standalone_api_memory_banks_test_compaction_post.py b/seclai/_generated/api/memory_banks/test_compaction_prompt_standalone_api_memory_banks_test_compaction_post.py index 3f3d7cd..32c5a1f 100644 --- a/seclai/_generated/api/memory_banks/test_compaction_prompt_standalone_api_memory_banks_test_compaction_post.py +++ b/seclai/_generated/api/memory_banks/test_compaction_prompt_standalone_api_memory_banks_test_compaction_post.py @@ -1,6 +1,5 @@ from http import HTTPStatus from typing import Any -from uuid import UUID import httpx @@ -15,7 +14,7 @@ def _get_kwargs( *, body: StandaloneTestCompactionRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -68,7 +67,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: StandaloneTestCompactionRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[CompactionTestResponseModel | HTTPValidationError]: """Test Compaction Prompt Standalone @@ -77,7 +76,7 @@ def sync_detailed( with verdict, score, and reasoning. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (StandaloneTestCompactionRequest): Request body for testing a compaction prompt *without* an existing bank. @@ -110,7 +109,7 @@ def sync( *, client: AuthenticatedClient | Client, body: StandaloneTestCompactionRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> CompactionTestResponseModel | HTTPValidationError | None: """Test Compaction Prompt Standalone @@ -119,7 +118,7 @@ def sync( with verdict, score, and reasoning. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (StandaloneTestCompactionRequest): Request body for testing a compaction prompt *without* an existing bank. @@ -147,7 +146,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: StandaloneTestCompactionRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[CompactionTestResponseModel | HTTPValidationError]: """Test Compaction Prompt Standalone @@ -156,7 +155,7 @@ async def asyncio_detailed( with verdict, score, and reasoning. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (StandaloneTestCompactionRequest): Request body for testing a compaction prompt *without* an existing bank. @@ -187,7 +186,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: StandaloneTestCompactionRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> CompactionTestResponseModel | HTTPValidationError | None: """Test Compaction Prompt Standalone @@ -196,7 +195,7 @@ async def asyncio( with verdict, score, and reasoning. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (StandaloneTestCompactionRequest): Request body for testing a compaction prompt *without* an existing bank. diff --git a/seclai/_generated/api/memory_banks/update_memory_bank_api_memory_banks_memory_bank_id_put.py b/seclai/_generated/api/memory_banks/update_memory_bank_api_memory_banks_memory_bank_id_put.py index ae10219..7d7e79c 100644 --- a/seclai/_generated/api/memory_banks/update_memory_bank_api_memory_banks_memory_bank_id_put.py +++ b/seclai/_generated/api/memory_banks/update_memory_bank_api_memory_banks_memory_bank_id_put.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -17,7 +16,7 @@ def _get_kwargs( memory_bank_id: str, *, body: UpdateMemoryBankBody, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +72,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: UpdateMemoryBankBody, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | MemoryBank]: """Update Memory Bank @@ -85,7 +84,7 @@ def sync_detailed( Args: memory_bank_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UpdateMemoryBankBody): Request body for updating a memory bank. Omitted fields are left unchanged. To **clear** a field back to null, @@ -117,7 +116,7 @@ def sync( *, client: AuthenticatedClient | Client, body: UpdateMemoryBankBody, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | MemoryBank | None: """Update Memory Bank @@ -129,7 +128,7 @@ def sync( Args: memory_bank_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UpdateMemoryBankBody): Request body for updating a memory bank. Omitted fields are left unchanged. To **clear** a field back to null, @@ -156,7 +155,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: UpdateMemoryBankBody, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | MemoryBank]: """Update Memory Bank @@ -168,7 +167,7 @@ async def asyncio_detailed( Args: memory_bank_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UpdateMemoryBankBody): Request body for updating a memory bank. Omitted fields are left unchanged. To **clear** a field back to null, @@ -198,7 +197,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: UpdateMemoryBankBody, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | MemoryBank | None: """Update Memory Bank @@ -210,7 +209,7 @@ async def asyncio( Args: memory_bank_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UpdateMemoryBankBody): Request body for updating a memory bank. Omitted fields are left unchanged. To **clear** a field back to null, diff --git a/seclai/_generated/api/models/get_alert_unread_count_api_models_alerts_unread_count_get.py b/seclai/_generated/api/models/get_alert_unread_count_api_models_alerts_unread_count_get.py index f5e3484..f171cfc 100644 --- a/seclai/_generated/api/models/get_alert_unread_count_api_models_alerts_unread_count_get.py +++ b/seclai/_generated/api/models/get_alert_unread_count_api_models_alerts_unread_count_get.py @@ -1,6 +1,5 @@ from http import HTTPStatus from typing import Any -from uuid import UUID import httpx @@ -14,7 +13,7 @@ def _get_kwargs( *, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -64,7 +63,7 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ GetAlertUnreadCountApiModelsAlertsUnreadCountGetResponseGetAlertUnreadCountApiModelsAlertsUnreadCountGet ]: @@ -78,7 +77,7 @@ def sync_detailed( - Requires `X-API-Key` header or OAuth Bearer token. Count is scoped to the caller's account. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -102,7 +101,7 @@ def sync_detailed( def sync( *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ( GetAlertUnreadCountApiModelsAlertsUnreadCountGetResponseGetAlertUnreadCountApiModelsAlertsUnreadCountGet | None @@ -117,7 +116,7 @@ def sync( - Requires `X-API-Key` header or OAuth Bearer token. Count is scoped to the caller's account. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -136,7 +135,7 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ GetAlertUnreadCountApiModelsAlertsUnreadCountGetResponseGetAlertUnreadCountApiModelsAlertsUnreadCountGet ]: @@ -150,7 +149,7 @@ async def asyncio_detailed( - Requires `X-API-Key` header or OAuth Bearer token. Count is scoped to the caller's account. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -172,7 +171,7 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ( GetAlertUnreadCountApiModelsAlertsUnreadCountGetResponseGetAlertUnreadCountApiModelsAlertsUnreadCountGet | None @@ -187,7 +186,7 @@ async def asyncio( - Requires `X-API-Key` header or OAuth Bearer token. Count is scoped to the caller's account. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/models/get_recommendations_api_models_model_id_recommendations_get.py b/seclai/_generated/api/models/get_recommendations_api_models_model_id_recommendations_get.py index f1181a9..8060daf 100644 --- a/seclai/_generated/api/models/get_recommendations_api_models_model_id_recommendations_get.py +++ b/seclai/_generated/api/models/get_recommendations_api_models_model_id_recommendations_get.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -22,7 +21,7 @@ def _get_kwargs( require_thinking: bool | None | Unset = UNSET, min_context_tokens: int | None | Unset = UNSET, min_output_tokens: int | None | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -127,7 +126,7 @@ def sync_detailed( require_thinking: bool | None | Unset = UNSET, min_context_tokens: int | None | Unset = UNSET, min_output_tokens: int | None | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ GetRecommendationsApiModelsModelIdRecommendationsGetResponseGetRecommendationsApiModelsModelIdRecommendationsGet | HTTPValidationError @@ -151,7 +150,7 @@ def sync_detailed( thinking/reasoning. min_context_tokens (int | None | Unset): Minimum context window size in tokens. min_output_tokens (int | None | Unset): Minimum output token limit. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -187,7 +186,7 @@ def sync( require_thinking: bool | None | Unset = UNSET, min_context_tokens: int | None | Unset = UNSET, min_output_tokens: int | None | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ( GetRecommendationsApiModelsModelIdRecommendationsGetResponseGetRecommendationsApiModelsModelIdRecommendationsGet | HTTPValidationError @@ -212,7 +211,7 @@ def sync( thinking/reasoning. min_context_tokens (int | None | Unset): Minimum context window size in tokens. min_output_tokens (int | None | Unset): Minimum output token limit. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -243,7 +242,7 @@ async def asyncio_detailed( require_thinking: bool | None | Unset = UNSET, min_context_tokens: int | None | Unset = UNSET, min_output_tokens: int | None | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ GetRecommendationsApiModelsModelIdRecommendationsGetResponseGetRecommendationsApiModelsModelIdRecommendationsGet | HTTPValidationError @@ -267,7 +266,7 @@ async def asyncio_detailed( thinking/reasoning. min_context_tokens (int | None | Unset): Minimum context window size in tokens. min_output_tokens (int | None | Unset): Minimum output token limit. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -301,7 +300,7 @@ async def asyncio( require_thinking: bool | None | Unset = UNSET, min_context_tokens: int | None | Unset = UNSET, min_output_tokens: int | None | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ( GetRecommendationsApiModelsModelIdRecommendationsGetResponseGetRecommendationsApiModelsModelIdRecommendationsGet | HTTPValidationError @@ -326,7 +325,7 @@ async def asyncio( thinking/reasoning. min_context_tokens (int | None | Unset): Minimum context window size in tokens. min_output_tokens (int | None | Unset): Minimum output token limit. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/models/list_alerts_api_models_alerts_get.py b/seclai/_generated/api/models/list_alerts_api_models_alerts_get.py index 03b28e0..aba278b 100644 --- a/seclai/_generated/api/models/list_alerts_api_models_alerts_get.py +++ b/seclai/_generated/api/models/list_alerts_api_models_alerts_get.py @@ -1,6 +1,5 @@ from http import HTTPStatus from typing import Any -from uuid import UUID import httpx @@ -19,7 +18,7 @@ def _get_kwargs( unread_only: bool | Unset = False, limit: int | Unset = 50, offset: int | Unset = 0, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -100,7 +99,7 @@ def sync_detailed( unread_only: bool | Unset = False, limit: int | Unset = 50, offset: int | Unset = 0, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ HTTPValidationError | ListAlertsApiModelsAlertsGetResponseListAlertsApiModelsAlertsGet @@ -120,7 +119,7 @@ def sync_detailed( unread_only (bool | Unset): When true, only return unread alerts. Default: False. limit (int | Unset): Maximum number of alerts to return (1-100). Default: 50. offset (int | Unset): Pagination offset. Default: 0. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -152,7 +151,7 @@ def sync( unread_only: bool | Unset = False, limit: int | Unset = 50, offset: int | Unset = 0, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ( HTTPValidationError | ListAlertsApiModelsAlertsGetResponseListAlertsApiModelsAlertsGet @@ -173,7 +172,7 @@ def sync( unread_only (bool | Unset): When true, only return unread alerts. Default: False. limit (int | Unset): Maximum number of alerts to return (1-100). Default: 50. offset (int | Unset): Pagination offset. Default: 0. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -200,7 +199,7 @@ async def asyncio_detailed( unread_only: bool | Unset = False, limit: int | Unset = 50, offset: int | Unset = 0, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ HTTPValidationError | ListAlertsApiModelsAlertsGetResponseListAlertsApiModelsAlertsGet @@ -220,7 +219,7 @@ async def asyncio_detailed( unread_only (bool | Unset): When true, only return unread alerts. Default: False. limit (int | Unset): Maximum number of alerts to return (1-100). Default: 50. offset (int | Unset): Pagination offset. Default: 0. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -250,7 +249,7 @@ async def asyncio( unread_only: bool | Unset = False, limit: int | Unset = 50, offset: int | Unset = 0, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ( HTTPValidationError | ListAlertsApiModelsAlertsGetResponseListAlertsApiModelsAlertsGet @@ -271,7 +270,7 @@ async def asyncio( unread_only (bool | Unset): When true, only return unread alerts. Default: False. limit (int | Unset): Maximum number of alerts to return (1-100). Default: 50. offset (int | Unset): Pagination offset. Default: 0. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/models/mark_all_read_api_models_alerts_mark_all_read_post.py b/seclai/_generated/api/models/mark_all_read_api_models_alerts_mark_all_read_post.py index 0fef990..fe546b3 100644 --- a/seclai/_generated/api/models/mark_all_read_api_models_alerts_mark_all_read_post.py +++ b/seclai/_generated/api/models/mark_all_read_api_models_alerts_mark_all_read_post.py @@ -1,6 +1,5 @@ from http import HTTPStatus from typing import Any -from uuid import UUID import httpx @@ -11,7 +10,7 @@ def _get_kwargs( *, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -52,7 +51,7 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any]: """Mark All Read @@ -62,7 +61,7 @@ def sync_detailed( - Requires `X-API-Key` header or OAuth Bearer token. Scoped to the caller's account. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -86,7 +85,7 @@ def sync_detailed( async def asyncio_detailed( *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any]: """Mark All Read @@ -96,7 +95,7 @@ async def asyncio_detailed( - Requires `X-API-Key` header or OAuth Bearer token. Scoped to the caller's account. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/models/mark_read_api_models_alerts_alert_id_read_patch.py b/seclai/_generated/api/models/mark_read_api_models_alerts_alert_id_read_patch.py index 7213d7d..8914566 100644 --- a/seclai/_generated/api/models/mark_read_api_models_alerts_alert_id_read_patch.py +++ b/seclai/_generated/api/models/mark_read_api_models_alerts_alert_id_read_patch.py @@ -14,7 +14,7 @@ def _get_kwargs( alert_id: UUID, *, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -64,7 +64,7 @@ def sync_detailed( alert_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Mark Read @@ -75,7 +75,7 @@ def sync_detailed( Args: alert_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -101,7 +101,7 @@ def sync( alert_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Mark Read @@ -112,7 +112,7 @@ def sync( Args: alert_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -133,7 +133,7 @@ async def asyncio_detailed( alert_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Mark Read @@ -144,7 +144,7 @@ async def asyncio_detailed( Args: alert_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -168,7 +168,7 @@ async def asyncio( alert_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Mark Read @@ -179,7 +179,7 @@ async def asyncio( Args: alert_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/search/search_api_search_get.py b/seclai/_generated/api/search/search_api_search_get.py index c5141cf..462bd65 100644 --- a/seclai/_generated/api/search/search_api_search_get.py +++ b/seclai/_generated/api/search/search_api_search_get.py @@ -1,6 +1,5 @@ from http import HTTPStatus from typing import Any -from uuid import UUID import httpx @@ -18,7 +17,7 @@ def _get_kwargs( q: str, limit: int | Unset = 10, entity_type: None | str | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -87,7 +86,7 @@ def sync_detailed( q: str, limit: int | Unset = 10, entity_type: None | str | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | SearchApiSearchGetResponseSearchApiSearchGet]: """Search resources @@ -102,7 +101,7 @@ def sync_detailed( limit (int | Unset): Maximum results Default: 10. entity_type (None | str | Unset): Optional entity type filter (e.g. 'agent', 'knowledge_base') - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -132,7 +131,7 @@ def sync( q: str, limit: int | Unset = 10, entity_type: None | str | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | SearchApiSearchGetResponseSearchApiSearchGet | None: """Search resources @@ -147,7 +146,7 @@ def sync( limit (int | Unset): Maximum results Default: 10. entity_type (None | str | Unset): Optional entity type filter (e.g. 'agent', 'knowledge_base') - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -172,7 +171,7 @@ async def asyncio_detailed( q: str, limit: int | Unset = 10, entity_type: None | str | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | SearchApiSearchGetResponseSearchApiSearchGet]: """Search resources @@ -187,7 +186,7 @@ async def asyncio_detailed( limit (int | Unset): Maximum results Default: 10. entity_type (None | str | Unset): Optional entity type filter (e.g. 'agent', 'knowledge_base') - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -215,7 +214,7 @@ async def asyncio( q: str, limit: int | Unset = 10, entity_type: None | str | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | SearchApiSearchGetResponseSearchApiSearchGet | None: """Search resources @@ -230,7 +229,7 @@ async def asyncio( limit (int | Unset): Maximum results Default: 10. entity_type (None | str | Unset): Optional entity type filter (e.g. 'agent', 'knowledge_base') - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/solutions/add_conversation_turn_api_solutions_solution_id_conversations_post.py b/seclai/_generated/api/solutions/add_conversation_turn_api_solutions_solution_id_conversations_post.py index 7a199d9..c08c183 100644 --- a/seclai/_generated/api/solutions/add_conversation_turn_api_solutions_solution_id_conversations_post.py +++ b/seclai/_generated/api/solutions/add_conversation_turn_api_solutions_solution_id_conversations_post.py @@ -17,7 +17,7 @@ def _get_kwargs( solution_id: UUID, *, body: AddConversationTurnRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +73,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: AddConversationTurnRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | SolutionConversationResponse]: """Add conversation turn @@ -84,7 +84,7 @@ def sync_detailed( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AddConversationTurnRequest): Raises: @@ -113,7 +113,7 @@ def sync( *, client: AuthenticatedClient | Client, body: AddConversationTurnRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | SolutionConversationResponse | None: """Add conversation turn @@ -124,7 +124,7 @@ def sync( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AddConversationTurnRequest): Raises: @@ -148,7 +148,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: AddConversationTurnRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | SolutionConversationResponse]: """Add conversation turn @@ -159,7 +159,7 @@ async def asyncio_detailed( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AddConversationTurnRequest): Raises: @@ -186,7 +186,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: AddConversationTurnRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | SolutionConversationResponse | None: """Add conversation turn @@ -197,7 +197,7 @@ async def asyncio( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AddConversationTurnRequest): Raises: diff --git a/seclai/_generated/api/solutions/ai_assistant_accept_api_solutions_solution_id_ai_assistant_conversation_id_accept_post.py b/seclai/_generated/api/solutions/ai_assistant_accept_api_solutions_solution_id_ai_assistant_conversation_id_accept_post.py index a363a40..45f1753 100644 --- a/seclai/_generated/api/solutions/ai_assistant_accept_api_solutions_solution_id_ai_assistant_conversation_id_accept_post.py +++ b/seclai/_generated/api/solutions/ai_assistant_accept_api_solutions_solution_id_ai_assistant_conversation_id_accept_post.py @@ -18,7 +18,7 @@ def _get_kwargs( conversation_id: UUID, *, body: AiAssistantAcceptRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -76,7 +76,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: AiAssistantAcceptRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[AiAssistantAcceptResponse | HTTPValidationError]: """Accept plan @@ -89,7 +89,7 @@ def sync_detailed( Args: solution_id (UUID): conversation_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AiAssistantAcceptRequest): Request body for accepting a proposed plan. Raises: @@ -120,7 +120,7 @@ def sync( *, client: AuthenticatedClient | Client, body: AiAssistantAcceptRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> AiAssistantAcceptResponse | HTTPValidationError | None: """Accept plan @@ -133,7 +133,7 @@ def sync( Args: solution_id (UUID): conversation_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AiAssistantAcceptRequest): Request body for accepting a proposed plan. Raises: @@ -159,7 +159,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: AiAssistantAcceptRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[AiAssistantAcceptResponse | HTTPValidationError]: """Accept plan @@ -172,7 +172,7 @@ async def asyncio_detailed( Args: solution_id (UUID): conversation_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AiAssistantAcceptRequest): Request body for accepting a proposed plan. Raises: @@ -201,7 +201,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: AiAssistantAcceptRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> AiAssistantAcceptResponse | HTTPValidationError | None: """Accept plan @@ -214,7 +214,7 @@ async def asyncio( Args: solution_id (UUID): conversation_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AiAssistantAcceptRequest): Request body for accepting a proposed plan. Raises: diff --git a/seclai/_generated/api/solutions/ai_assistant_decline_api_solutions_solution_id_ai_assistant_conversation_id_decline_post.py b/seclai/_generated/api/solutions/ai_assistant_decline_api_solutions_solution_id_ai_assistant_conversation_id_decline_post.py index 2f0824a..96ce7c5 100644 --- a/seclai/_generated/api/solutions/ai_assistant_decline_api_solutions_solution_id_ai_assistant_conversation_id_decline_post.py +++ b/seclai/_generated/api/solutions/ai_assistant_decline_api_solutions_solution_id_ai_assistant_conversation_id_decline_post.py @@ -15,7 +15,7 @@ def _get_kwargs( solution_id: UUID, conversation_id: UUID, *, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -67,7 +67,7 @@ def sync_detailed( conversation_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Decline plan @@ -79,7 +79,7 @@ def sync_detailed( Args: solution_id (UUID): conversation_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -107,7 +107,7 @@ def sync( conversation_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Decline plan @@ -119,7 +119,7 @@ def sync( Args: solution_id (UUID): conversation_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -142,7 +142,7 @@ async def asyncio_detailed( conversation_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Decline plan @@ -154,7 +154,7 @@ async def asyncio_detailed( Args: solution_id (UUID): conversation_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -180,7 +180,7 @@ async def asyncio( conversation_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Decline plan @@ -192,7 +192,7 @@ async def asyncio( Args: solution_id (UUID): conversation_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/solutions/ai_assistant_generate_api_solutions_solution_id_ai_assistant_generate_post.py b/seclai/_generated/api/solutions/ai_assistant_generate_api_solutions_solution_id_ai_assistant_generate_post.py index a62bd04..82a8c2a 100644 --- a/seclai/_generated/api/solutions/ai_assistant_generate_api_solutions_solution_id_ai_assistant_generate_post.py +++ b/seclai/_generated/api/solutions/ai_assistant_generate_api_solutions_solution_id_ai_assistant_generate_post.py @@ -17,7 +17,7 @@ def _get_kwargs( solution_id: UUID, *, body: AiAssistantGenerateRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +73,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[AiAssistantGenerateResponse | HTTPValidationError]: """Generate solution plan @@ -87,7 +87,7 @@ def sync_detailed( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: @@ -116,7 +116,7 @@ def sync( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> AiAssistantGenerateResponse | HTTPValidationError | None: """Generate solution plan @@ -130,7 +130,7 @@ def sync( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: @@ -154,7 +154,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[AiAssistantGenerateResponse | HTTPValidationError]: """Generate solution plan @@ -168,7 +168,7 @@ async def asyncio_detailed( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: @@ -195,7 +195,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> AiAssistantGenerateResponse | HTTPValidationError | None: """Generate solution plan @@ -209,7 +209,7 @@ async def asyncio( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: diff --git a/seclai/_generated/api/solutions/ai_assistant_knowledge_base_api_solutions_solution_id_ai_assistant_knowledge_base_post.py b/seclai/_generated/api/solutions/ai_assistant_knowledge_base_api_solutions_solution_id_ai_assistant_knowledge_base_post.py index 3025e81..9940f65 100644 --- a/seclai/_generated/api/solutions/ai_assistant_knowledge_base_api_solutions_solution_id_ai_assistant_knowledge_base_post.py +++ b/seclai/_generated/api/solutions/ai_assistant_knowledge_base_api_solutions_solution_id_ai_assistant_knowledge_base_post.py @@ -17,7 +17,7 @@ def _get_kwargs( solution_id: UUID, *, body: AiAssistantGenerateRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +73,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[AiAssistantGenerateResponse | HTTPValidationError]: """Generate knowledge base plan @@ -85,7 +85,7 @@ def sync_detailed( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: @@ -114,7 +114,7 @@ def sync( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> AiAssistantGenerateResponse | HTTPValidationError | None: """Generate knowledge base plan @@ -126,7 +126,7 @@ def sync( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: @@ -150,7 +150,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[AiAssistantGenerateResponse | HTTPValidationError]: """Generate knowledge base plan @@ -162,7 +162,7 @@ async def asyncio_detailed( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: @@ -189,7 +189,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> AiAssistantGenerateResponse | HTTPValidationError | None: """Generate knowledge base plan @@ -201,7 +201,7 @@ async def asyncio( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: diff --git a/seclai/_generated/api/solutions/ai_assistant_source_api_solutions_solution_id_ai_assistant_source_post.py b/seclai/_generated/api/solutions/ai_assistant_source_api_solutions_solution_id_ai_assistant_source_post.py index 44a632d..72021a8 100644 --- a/seclai/_generated/api/solutions/ai_assistant_source_api_solutions_solution_id_ai_assistant_source_post.py +++ b/seclai/_generated/api/solutions/ai_assistant_source_api_solutions_solution_id_ai_assistant_source_post.py @@ -17,7 +17,7 @@ def _get_kwargs( solution_id: UUID, *, body: AiAssistantGenerateRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +73,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[AiAssistantGenerateResponse | HTTPValidationError]: """Generate source plan @@ -85,7 +85,7 @@ def sync_detailed( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: @@ -114,7 +114,7 @@ def sync( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> AiAssistantGenerateResponse | HTTPValidationError | None: """Generate source plan @@ -126,7 +126,7 @@ def sync( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: @@ -150,7 +150,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[AiAssistantGenerateResponse | HTTPValidationError]: """Generate source plan @@ -162,7 +162,7 @@ async def asyncio_detailed( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: @@ -189,7 +189,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> AiAssistantGenerateResponse | HTTPValidationError | None: """Generate source plan @@ -201,7 +201,7 @@ async def asyncio( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: diff --git a/seclai/_generated/api/solutions/create_solution_api_solutions_post.py b/seclai/_generated/api/solutions/create_solution_api_solutions_post.py index 9eb0fd1..d8a64a5 100644 --- a/seclai/_generated/api/solutions/create_solution_api_solutions_post.py +++ b/seclai/_generated/api/solutions/create_solution_api_solutions_post.py @@ -1,6 +1,5 @@ from http import HTTPStatus from typing import Any -from uuid import UUID import httpx @@ -15,7 +14,7 @@ def _get_kwargs( *, body: CreateSolutionRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -68,7 +67,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: CreateSolutionRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | SolutionResponse]: """Create a solution @@ -78,7 +77,7 @@ def sync_detailed( `name` and optional `description` in the request body. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (CreateSolutionRequest): Request model for creating a new solution Raises: @@ -105,7 +104,7 @@ def sync( *, client: AuthenticatedClient | Client, body: CreateSolutionRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | SolutionResponse | None: """Create a solution @@ -115,7 +114,7 @@ def sync( `name` and optional `description` in the request body. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (CreateSolutionRequest): Request model for creating a new solution Raises: @@ -137,7 +136,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: CreateSolutionRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | SolutionResponse]: """Create a solution @@ -147,7 +146,7 @@ async def asyncio_detailed( `name` and optional `description` in the request body. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (CreateSolutionRequest): Request model for creating a new solution Raises: @@ -172,7 +171,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: CreateSolutionRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | SolutionResponse | None: """Create a solution @@ -182,7 +181,7 @@ async def asyncio( `name` and optional `description` in the request body. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (CreateSolutionRequest): Request model for creating a new solution Raises: diff --git a/seclai/_generated/api/solutions/delete_solution_api_solutions_solution_id_delete.py b/seclai/_generated/api/solutions/delete_solution_api_solutions_solution_id_delete.py index 8c5dd1e..b04be6e 100644 --- a/seclai/_generated/api/solutions/delete_solution_api_solutions_solution_id_delete.py +++ b/seclai/_generated/api/solutions/delete_solution_api_solutions_solution_id_delete.py @@ -14,7 +14,7 @@ def _get_kwargs( solution_id: UUID, *, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -64,7 +64,7 @@ def sync_detailed( solution_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Delete a solution @@ -75,7 +75,7 @@ def sync_detailed( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -101,7 +101,7 @@ def sync( solution_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Delete a solution @@ -112,7 +112,7 @@ def sync( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -133,7 +133,7 @@ async def asyncio_detailed( solution_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Delete a solution @@ -144,7 +144,7 @@ async def asyncio_detailed( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -168,7 +168,7 @@ async def asyncio( solution_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Delete a solution @@ -179,7 +179,7 @@ async def asyncio( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/solutions/get_solution_api_solutions_solution_id_get.py b/seclai/_generated/api/solutions/get_solution_api_solutions_solution_id_get.py index 1005901..a4ead97 100644 --- a/seclai/_generated/api/solutions/get_solution_api_solutions_solution_id_get.py +++ b/seclai/_generated/api/solutions/get_solution_api_solutions_solution_id_get.py @@ -15,7 +15,7 @@ def _get_kwargs( solution_id: UUID, *, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -66,7 +66,7 @@ def sync_detailed( solution_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | SolutionResponse]: """Get a solution @@ -76,7 +76,7 @@ def sync_detailed( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -102,7 +102,7 @@ def sync( solution_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | SolutionResponse | None: """Get a solution @@ -112,7 +112,7 @@ def sync( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -133,7 +133,7 @@ async def asyncio_detailed( solution_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | SolutionResponse]: """Get a solution @@ -143,7 +143,7 @@ async def asyncio_detailed( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -167,7 +167,7 @@ async def asyncio( solution_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | SolutionResponse | None: """Get a solution @@ -177,7 +177,7 @@ async def asyncio( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/solutions/link_agents_api_solutions_solution_id_agents_post.py b/seclai/_generated/api/solutions/link_agents_api_solutions_solution_id_agents_post.py index 01519c7..8f3f728 100644 --- a/seclai/_generated/api/solutions/link_agents_api_solutions_solution_id_agents_post.py +++ b/seclai/_generated/api/solutions/link_agents_api_solutions_solution_id_agents_post.py @@ -17,7 +17,7 @@ def _get_kwargs( solution_id: UUID, *, body: LinkResourcesRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +73,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: LinkResourcesRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | SolutionResponse]: """Link agents @@ -84,7 +84,7 @@ def sync_detailed( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (LinkResourcesRequest): Raises: @@ -113,7 +113,7 @@ def sync( *, client: AuthenticatedClient | Client, body: LinkResourcesRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | SolutionResponse | None: """Link agents @@ -124,7 +124,7 @@ def sync( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (LinkResourcesRequest): Raises: @@ -148,7 +148,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: LinkResourcesRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | SolutionResponse]: """Link agents @@ -159,7 +159,7 @@ async def asyncio_detailed( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (LinkResourcesRequest): Raises: @@ -186,7 +186,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: LinkResourcesRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | SolutionResponse | None: """Link agents @@ -197,7 +197,7 @@ async def asyncio( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (LinkResourcesRequest): Raises: diff --git a/seclai/_generated/api/solutions/link_knowledge_bases_api_solutions_solution_id_knowledge_bases_post.py b/seclai/_generated/api/solutions/link_knowledge_bases_api_solutions_solution_id_knowledge_bases_post.py index 2368faa..c4a1e8d 100644 --- a/seclai/_generated/api/solutions/link_knowledge_bases_api_solutions_solution_id_knowledge_bases_post.py +++ b/seclai/_generated/api/solutions/link_knowledge_bases_api_solutions_solution_id_knowledge_bases_post.py @@ -17,7 +17,7 @@ def _get_kwargs( solution_id: UUID, *, body: LinkResourcesRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +73,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: LinkResourcesRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | SolutionResponse]: """Link knowledge bases @@ -84,7 +84,7 @@ def sync_detailed( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (LinkResourcesRequest): Raises: @@ -113,7 +113,7 @@ def sync( *, client: AuthenticatedClient | Client, body: LinkResourcesRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | SolutionResponse | None: """Link knowledge bases @@ -124,7 +124,7 @@ def sync( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (LinkResourcesRequest): Raises: @@ -148,7 +148,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: LinkResourcesRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | SolutionResponse]: """Link knowledge bases @@ -159,7 +159,7 @@ async def asyncio_detailed( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (LinkResourcesRequest): Raises: @@ -186,7 +186,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: LinkResourcesRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | SolutionResponse | None: """Link knowledge bases @@ -197,7 +197,7 @@ async def asyncio( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (LinkResourcesRequest): Raises: diff --git a/seclai/_generated/api/solutions/link_source_connections_api_solutions_solution_id_source_connections_post.py b/seclai/_generated/api/solutions/link_source_connections_api_solutions_solution_id_source_connections_post.py index 7ca44ac..2d16047 100644 --- a/seclai/_generated/api/solutions/link_source_connections_api_solutions_solution_id_source_connections_post.py +++ b/seclai/_generated/api/solutions/link_source_connections_api_solutions_solution_id_source_connections_post.py @@ -17,7 +17,7 @@ def _get_kwargs( solution_id: UUID, *, body: LinkResourcesRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +73,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: LinkResourcesRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | SolutionResponse]: """Link source connections @@ -84,7 +84,7 @@ def sync_detailed( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (LinkResourcesRequest): Raises: @@ -113,7 +113,7 @@ def sync( *, client: AuthenticatedClient | Client, body: LinkResourcesRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | SolutionResponse | None: """Link source connections @@ -124,7 +124,7 @@ def sync( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (LinkResourcesRequest): Raises: @@ -148,7 +148,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: LinkResourcesRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | SolutionResponse]: """Link source connections @@ -159,7 +159,7 @@ async def asyncio_detailed( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (LinkResourcesRequest): Raises: @@ -186,7 +186,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: LinkResourcesRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | SolutionResponse | None: """Link source connections @@ -197,7 +197,7 @@ async def asyncio( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (LinkResourcesRequest): Raises: diff --git a/seclai/_generated/api/solutions/list_conversations_api_solutions_solution_id_conversations_get.py b/seclai/_generated/api/solutions/list_conversations_api_solutions_solution_id_conversations_get.py index b81c1ed..a9741cd 100644 --- a/seclai/_generated/api/solutions/list_conversations_api_solutions_solution_id_conversations_get.py +++ b/seclai/_generated/api/solutions/list_conversations_api_solutions_solution_id_conversations_get.py @@ -15,7 +15,7 @@ def _get_kwargs( solution_id: UUID, *, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +73,7 @@ def sync_detailed( solution_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | list[SolutionConversationResponse]]: """List conversations @@ -84,7 +84,7 @@ def sync_detailed( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -110,7 +110,7 @@ def sync( solution_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | list[SolutionConversationResponse] | None: """List conversations @@ -121,7 +121,7 @@ def sync( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -142,7 +142,7 @@ async def asyncio_detailed( solution_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | list[SolutionConversationResponse]]: """List conversations @@ -153,7 +153,7 @@ async def asyncio_detailed( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -177,7 +177,7 @@ async def asyncio( solution_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | list[SolutionConversationResponse] | None: """List conversations @@ -188,7 +188,7 @@ async def asyncio( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/solutions/list_solutions_api_solutions_get.py b/seclai/_generated/api/solutions/list_solutions_api_solutions_get.py index aca83ce..92885b6 100644 --- a/seclai/_generated/api/solutions/list_solutions_api_solutions_get.py +++ b/seclai/_generated/api/solutions/list_solutions_api_solutions_get.py @@ -1,6 +1,5 @@ from http import HTTPStatus from typing import Any -from uuid import UUID import httpx @@ -18,7 +17,7 @@ def _get_kwargs( sort: str | Unset = "created_at", order: str | Unset = "desc", search: None | str | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -91,7 +90,7 @@ def sync_detailed( sort: str | Unset = "created_at", order: str | Unset = "desc", search: None | str | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | SolutionListResponse]: """List solutions @@ -114,7 +113,7 @@ def sync_detailed( sort (str | Unset): Sort field Default: 'created_at'. order (str | Unset): Sort order Default: 'desc'. search (None | str | Unset): Filter by solution name (case-insensitive partial match) - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -148,7 +147,7 @@ def sync( sort: str | Unset = "created_at", order: str | Unset = "desc", search: None | str | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | SolutionListResponse | None: """List solutions @@ -171,7 +170,7 @@ def sync( sort (str | Unset): Sort field Default: 'created_at'. order (str | Unset): Sort order Default: 'desc'. search (None | str | Unset): Filter by solution name (case-insensitive partial match) - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -200,7 +199,7 @@ async def asyncio_detailed( sort: str | Unset = "created_at", order: str | Unset = "desc", search: None | str | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | SolutionListResponse]: """List solutions @@ -223,7 +222,7 @@ async def asyncio_detailed( sort (str | Unset): Sort field Default: 'created_at'. order (str | Unset): Sort order Default: 'desc'. search (None | str | Unset): Filter by solution name (case-insensitive partial match) - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -255,7 +254,7 @@ async def asyncio( sort: str | Unset = "created_at", order: str | Unset = "desc", search: None | str | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | SolutionListResponse | None: """List solutions @@ -278,7 +277,7 @@ async def asyncio( sort (str | Unset): Sort field Default: 'created_at'. order (str | Unset): Sort order Default: 'desc'. search (None | str | Unset): Filter by solution name (case-insensitive partial match) - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/solutions/mark_conversation_turn_api_solutions_solution_id_conversations_conversation_id_patch.py b/seclai/_generated/api/solutions/mark_conversation_turn_api_solutions_solution_id_conversations_conversation_id_patch.py index 1ea1bd7..f419c30 100644 --- a/seclai/_generated/api/solutions/mark_conversation_turn_api_solutions_solution_id_conversations_conversation_id_patch.py +++ b/seclai/_generated/api/solutions/mark_conversation_turn_api_solutions_solution_id_conversations_conversation_id_patch.py @@ -17,7 +17,7 @@ def _get_kwargs( conversation_id: UUID, *, body: MarkConversationTurnRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -74,7 +74,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: MarkConversationTurnRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Mark conversation turn @@ -86,7 +86,7 @@ def sync_detailed( Args: solution_id (UUID): conversation_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (MarkConversationTurnRequest): Raises: @@ -117,7 +117,7 @@ def sync( *, client: AuthenticatedClient | Client, body: MarkConversationTurnRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Mark conversation turn @@ -129,7 +129,7 @@ def sync( Args: solution_id (UUID): conversation_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (MarkConversationTurnRequest): Raises: @@ -155,7 +155,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: MarkConversationTurnRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Mark conversation turn @@ -167,7 +167,7 @@ async def asyncio_detailed( Args: solution_id (UUID): conversation_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (MarkConversationTurnRequest): Raises: @@ -196,7 +196,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: MarkConversationTurnRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Mark conversation turn @@ -208,7 +208,7 @@ async def asyncio( Args: solution_id (UUID): conversation_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (MarkConversationTurnRequest): Raises: diff --git a/seclai/_generated/api/solutions/unlink_agents_api_solutions_solution_id_agents_delete.py b/seclai/_generated/api/solutions/unlink_agents_api_solutions_solution_id_agents_delete.py index 7ec31d8..c9f26bf 100644 --- a/seclai/_generated/api/solutions/unlink_agents_api_solutions_solution_id_agents_delete.py +++ b/seclai/_generated/api/solutions/unlink_agents_api_solutions_solution_id_agents_delete.py @@ -17,7 +17,7 @@ def _get_kwargs( solution_id: UUID, *, body: UnlinkResourcesRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +73,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: UnlinkResourcesRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | SolutionResponse]: """Unlink agents @@ -84,7 +84,7 @@ def sync_detailed( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UnlinkResourcesRequest): Raises: @@ -113,7 +113,7 @@ def sync( *, client: AuthenticatedClient | Client, body: UnlinkResourcesRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | SolutionResponse | None: """Unlink agents @@ -124,7 +124,7 @@ def sync( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UnlinkResourcesRequest): Raises: @@ -148,7 +148,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: UnlinkResourcesRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | SolutionResponse]: """Unlink agents @@ -159,7 +159,7 @@ async def asyncio_detailed( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UnlinkResourcesRequest): Raises: @@ -186,7 +186,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: UnlinkResourcesRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | SolutionResponse | None: """Unlink agents @@ -197,7 +197,7 @@ async def asyncio( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UnlinkResourcesRequest): Raises: diff --git a/seclai/_generated/api/solutions/unlink_knowledge_bases_api_solutions_solution_id_knowledge_bases_delete.py b/seclai/_generated/api/solutions/unlink_knowledge_bases_api_solutions_solution_id_knowledge_bases_delete.py index 2604ed1..2a9e74c 100644 --- a/seclai/_generated/api/solutions/unlink_knowledge_bases_api_solutions_solution_id_knowledge_bases_delete.py +++ b/seclai/_generated/api/solutions/unlink_knowledge_bases_api_solutions_solution_id_knowledge_bases_delete.py @@ -17,7 +17,7 @@ def _get_kwargs( solution_id: UUID, *, body: UnlinkResourcesRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +73,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: UnlinkResourcesRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | SolutionResponse]: """Unlink knowledge bases @@ -84,7 +84,7 @@ def sync_detailed( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UnlinkResourcesRequest): Raises: @@ -113,7 +113,7 @@ def sync( *, client: AuthenticatedClient | Client, body: UnlinkResourcesRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | SolutionResponse | None: """Unlink knowledge bases @@ -124,7 +124,7 @@ def sync( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UnlinkResourcesRequest): Raises: @@ -148,7 +148,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: UnlinkResourcesRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | SolutionResponse]: """Unlink knowledge bases @@ -159,7 +159,7 @@ async def asyncio_detailed( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UnlinkResourcesRequest): Raises: @@ -186,7 +186,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: UnlinkResourcesRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | SolutionResponse | None: """Unlink knowledge bases @@ -197,7 +197,7 @@ async def asyncio( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UnlinkResourcesRequest): Raises: diff --git a/seclai/_generated/api/solutions/unlink_source_connections_api_solutions_solution_id_source_connections_delete.py b/seclai/_generated/api/solutions/unlink_source_connections_api_solutions_solution_id_source_connections_delete.py index 2f621fb..c92040b 100644 --- a/seclai/_generated/api/solutions/unlink_source_connections_api_solutions_solution_id_source_connections_delete.py +++ b/seclai/_generated/api/solutions/unlink_source_connections_api_solutions_solution_id_source_connections_delete.py @@ -17,7 +17,7 @@ def _get_kwargs( solution_id: UUID, *, body: UnlinkResourcesRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +73,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: UnlinkResourcesRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | SolutionResponse]: """Unlink source connections @@ -84,7 +84,7 @@ def sync_detailed( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UnlinkResourcesRequest): Raises: @@ -113,7 +113,7 @@ def sync( *, client: AuthenticatedClient | Client, body: UnlinkResourcesRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | SolutionResponse | None: """Unlink source connections @@ -124,7 +124,7 @@ def sync( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UnlinkResourcesRequest): Raises: @@ -148,7 +148,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: UnlinkResourcesRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | SolutionResponse]: """Unlink source connections @@ -159,7 +159,7 @@ async def asyncio_detailed( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UnlinkResourcesRequest): Raises: @@ -186,7 +186,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: UnlinkResourcesRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | SolutionResponse | None: """Unlink source connections @@ -197,7 +197,7 @@ async def asyncio( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UnlinkResourcesRequest): Raises: diff --git a/seclai/_generated/api/solutions/update_solution_api_solutions_solution_id_patch.py b/seclai/_generated/api/solutions/update_solution_api_solutions_solution_id_patch.py index b8f4f02..366728e 100644 --- a/seclai/_generated/api/solutions/update_solution_api_solutions_solution_id_patch.py +++ b/seclai/_generated/api/solutions/update_solution_api_solutions_solution_id_patch.py @@ -17,7 +17,7 @@ def _get_kwargs( solution_id: UUID, *, body: UpdateSolutionRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +73,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: UpdateSolutionRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | SolutionResponse]: """Update a solution @@ -83,7 +83,7 @@ def sync_detailed( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UpdateSolutionRequest): Request model for updating a solution Raises: @@ -112,7 +112,7 @@ def sync( *, client: AuthenticatedClient | Client, body: UpdateSolutionRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | SolutionResponse | None: """Update a solution @@ -122,7 +122,7 @@ def sync( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UpdateSolutionRequest): Request model for updating a solution Raises: @@ -146,7 +146,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: UpdateSolutionRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | SolutionResponse]: """Update a solution @@ -156,7 +156,7 @@ async def asyncio_detailed( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UpdateSolutionRequest): Request model for updating a solution Raises: @@ -183,7 +183,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: UpdateSolutionRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | SolutionResponse | None: """Update a solution @@ -193,7 +193,7 @@ async def asyncio( Args: solution_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UpdateSolutionRequest): Request model for updating a solution Raises: diff --git a/seclai/_generated/api/source_exports/cancel_source_export_api_sources_source_connection_id_exports_export_id_cancel_post.py b/seclai/_generated/api/source_exports/cancel_source_export_api_sources_source_connection_id_exports_export_id_cancel_post.py index 163210a..6effaab 100644 --- a/seclai/_generated/api/source_exports/cancel_source_export_api_sources_source_connection_id_exports_export_id_cancel_post.py +++ b/seclai/_generated/api/source_exports/cancel_source_export_api_sources_source_connection_id_exports_export_id_cancel_post.py @@ -16,7 +16,7 @@ def _get_kwargs( source_connection_id: UUID, export_id: UUID, *, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -69,7 +69,7 @@ def sync_detailed( export_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ExportResponse | HTTPValidationError]: """Cancel export @@ -79,7 +79,7 @@ def sync_detailed( Args: source_connection_id (UUID): export_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -107,7 +107,7 @@ def sync( export_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ExportResponse | HTTPValidationError | None: """Cancel export @@ -117,7 +117,7 @@ def sync( Args: source_connection_id (UUID): export_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -140,7 +140,7 @@ async def asyncio_detailed( export_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ExportResponse | HTTPValidationError]: """Cancel export @@ -150,7 +150,7 @@ async def asyncio_detailed( Args: source_connection_id (UUID): export_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -176,7 +176,7 @@ async def asyncio( export_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ExportResponse | HTTPValidationError | None: """Cancel export @@ -186,7 +186,7 @@ async def asyncio( Args: source_connection_id (UUID): export_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/source_exports/create_source_export_api_sources_source_connection_id_exports_post.py b/seclai/_generated/api/source_exports/create_source_export_api_sources_source_connection_id_exports_post.py index 4bfa044..22ce26f 100644 --- a/seclai/_generated/api/source_exports/create_source_export_api_sources_source_connection_id_exports_post.py +++ b/seclai/_generated/api/source_exports/create_source_export_api_sources_source_connection_id_exports_post.py @@ -17,7 +17,7 @@ def _get_kwargs( source_connection_id: UUID, *, body: CreateExportRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +73,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: CreateExportRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ExportResponse | HTTPValidationError]: """Create export @@ -82,7 +82,7 @@ def sync_detailed( Args: source_connection_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (CreateExportRequest): Parameters for creating a new export job. Raises: @@ -111,7 +111,7 @@ def sync( *, client: AuthenticatedClient | Client, body: CreateExportRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ExportResponse | HTTPValidationError | None: """Create export @@ -120,7 +120,7 @@ def sync( Args: source_connection_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (CreateExportRequest): Parameters for creating a new export job. Raises: @@ -144,7 +144,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: CreateExportRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ExportResponse | HTTPValidationError]: """Create export @@ -153,7 +153,7 @@ async def asyncio_detailed( Args: source_connection_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (CreateExportRequest): Parameters for creating a new export job. Raises: @@ -180,7 +180,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: CreateExportRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ExportResponse | HTTPValidationError | None: """Create export @@ -189,7 +189,7 @@ async def asyncio( Args: source_connection_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (CreateExportRequest): Parameters for creating a new export job. Raises: diff --git a/seclai/_generated/api/source_exports/delete_source_export_api_sources_source_connection_id_exports_export_id_delete.py b/seclai/_generated/api/source_exports/delete_source_export_api_sources_source_connection_id_exports_export_id_delete.py index 325ed17..c588362 100644 --- a/seclai/_generated/api/source_exports/delete_source_export_api_sources_source_connection_id_exports_export_id_delete.py +++ b/seclai/_generated/api/source_exports/delete_source_export_api_sources_source_connection_id_exports_export_id_delete.py @@ -15,7 +15,7 @@ def _get_kwargs( source_connection_id: UUID, export_id: UUID, *, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -67,7 +67,7 @@ def sync_detailed( export_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Delete export @@ -77,7 +77,7 @@ def sync_detailed( Args: source_connection_id (UUID): export_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -105,7 +105,7 @@ def sync( export_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Delete export @@ -115,7 +115,7 @@ def sync( Args: source_connection_id (UUID): export_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -138,7 +138,7 @@ async def asyncio_detailed( export_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Delete export @@ -148,7 +148,7 @@ async def asyncio_detailed( Args: source_connection_id (UUID): export_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -174,7 +174,7 @@ async def asyncio( export_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Delete export @@ -184,7 +184,7 @@ async def asyncio( Args: source_connection_id (UUID): export_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/source_exports/download_source_export_api_sources_source_connection_id_exports_export_id_download_get.py b/seclai/_generated/api/source_exports/download_source_export_api_sources_source_connection_id_exports_export_id_download_get.py index a19961a..c532c62 100644 --- a/seclai/_generated/api/source_exports/download_source_export_api_sources_source_connection_id_exports_export_id_download_get.py +++ b/seclai/_generated/api/source_exports/download_source_export_api_sources_source_connection_id_exports_export_id_download_get.py @@ -15,7 +15,7 @@ def _get_kwargs( source_connection_id: UUID, export_id: UUID, *, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -67,7 +67,7 @@ def sync_detailed( export_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Download export @@ -78,7 +78,7 @@ def sync_detailed( Args: source_connection_id (UUID): export_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -106,7 +106,7 @@ def sync( export_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Download export @@ -117,7 +117,7 @@ def sync( Args: source_connection_id (UUID): export_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -140,7 +140,7 @@ async def asyncio_detailed( export_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Download export @@ -151,7 +151,7 @@ async def asyncio_detailed( Args: source_connection_id (UUID): export_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -177,7 +177,7 @@ async def asyncio( export_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Download export @@ -188,7 +188,7 @@ async def asyncio( Args: source_connection_id (UUID): export_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/source_exports/estimate_source_export_api_sources_source_connection_id_exports_estimate_post.py b/seclai/_generated/api/source_exports/estimate_source_export_api_sources_source_connection_id_exports_estimate_post.py index 6484d80..f841827 100644 --- a/seclai/_generated/api/source_exports/estimate_source_export_api_sources_source_connection_id_exports_estimate_post.py +++ b/seclai/_generated/api/source_exports/estimate_source_export_api_sources_source_connection_id_exports_estimate_post.py @@ -17,7 +17,7 @@ def _get_kwargs( source_connection_id: UUID, *, body: EstimateExportRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +73,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: EstimateExportRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[EstimateExportResponse | HTTPValidationError]: """Estimate export size @@ -82,7 +82,7 @@ def sync_detailed( Args: source_connection_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (EstimateExportRequest): Parameters for estimating export size. Raises: @@ -111,7 +111,7 @@ def sync( *, client: AuthenticatedClient | Client, body: EstimateExportRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> EstimateExportResponse | HTTPValidationError | None: """Estimate export size @@ -120,7 +120,7 @@ def sync( Args: source_connection_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (EstimateExportRequest): Parameters for estimating export size. Raises: @@ -144,7 +144,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: EstimateExportRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[EstimateExportResponse | HTTPValidationError]: """Estimate export size @@ -153,7 +153,7 @@ async def asyncio_detailed( Args: source_connection_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (EstimateExportRequest): Parameters for estimating export size. Raises: @@ -180,7 +180,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: EstimateExportRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> EstimateExportResponse | HTTPValidationError | None: """Estimate export size @@ -189,7 +189,7 @@ async def asyncio( Args: source_connection_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (EstimateExportRequest): Parameters for estimating export size. Raises: diff --git a/seclai/_generated/api/source_exports/get_source_export_api_sources_source_connection_id_exports_export_id_get.py b/seclai/_generated/api/source_exports/get_source_export_api_sources_source_connection_id_exports_export_id_get.py index 5644d4d..5abfcfc 100644 --- a/seclai/_generated/api/source_exports/get_source_export_api_sources_source_connection_id_exports_export_id_get.py +++ b/seclai/_generated/api/source_exports/get_source_export_api_sources_source_connection_id_exports_export_id_get.py @@ -16,7 +16,7 @@ def _get_kwargs( source_connection_id: UUID, export_id: UUID, *, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -69,7 +69,7 @@ def sync_detailed( export_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ExportResponse | HTTPValidationError]: """Get export status @@ -79,7 +79,7 @@ def sync_detailed( Args: source_connection_id (UUID): export_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -107,7 +107,7 @@ def sync( export_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ExportResponse | HTTPValidationError | None: """Get export status @@ -117,7 +117,7 @@ def sync( Args: source_connection_id (UUID): export_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -140,7 +140,7 @@ async def asyncio_detailed( export_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ExportResponse | HTTPValidationError]: """Get export status @@ -150,7 +150,7 @@ async def asyncio_detailed( Args: source_connection_id (UUID): export_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -176,7 +176,7 @@ async def asyncio( export_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ExportResponse | HTTPValidationError | None: """Get export status @@ -186,7 +186,7 @@ async def asyncio( Args: source_connection_id (UUID): export_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/source_exports/list_source_exports_api_sources_source_connection_id_exports_get.py b/seclai/_generated/api/source_exports/list_source_exports_api_sources_source_connection_id_exports_get.py index 4df2a02..48f916a 100644 --- a/seclai/_generated/api/source_exports/list_source_exports_api_sources_source_connection_id_exports_get.py +++ b/seclai/_generated/api/source_exports/list_source_exports_api_sources_source_connection_id_exports_get.py @@ -17,7 +17,7 @@ def _get_kwargs( *, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -79,7 +79,7 @@ def sync_detailed( client: AuthenticatedClient | Client, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ExportListResponse | HTTPValidationError]: """List exports @@ -91,7 +91,7 @@ def sync_detailed( source_connection_id (UUID): page (int | Unset): Default: 1. limit (int | Unset): Default: 20. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -121,7 +121,7 @@ def sync( client: AuthenticatedClient | Client, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ExportListResponse | HTTPValidationError | None: """List exports @@ -133,7 +133,7 @@ def sync( source_connection_id (UUID): page (int | Unset): Default: 1. limit (int | Unset): Default: 20. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -158,7 +158,7 @@ async def asyncio_detailed( client: AuthenticatedClient | Client, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[ExportListResponse | HTTPValidationError]: """List exports @@ -170,7 +170,7 @@ async def asyncio_detailed( source_connection_id (UUID): page (int | Unset): Default: 1. limit (int | Unset): Default: 20. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -198,7 +198,7 @@ async def asyncio( client: AuthenticatedClient | Client, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> ExportListResponse | HTTPValidationError | None: """List exports @@ -210,7 +210,7 @@ async def asyncio( source_connection_id (UUID): page (int | Unset): Default: 1. limit (int | Unset): Default: 20. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/sources/cancel_source_embedding_migration_api_sources_source_connection_id_embedding_migration_cancel_post.py b/seclai/_generated/api/sources/cancel_source_embedding_migration_api_sources_source_connection_id_embedding_migration_cancel_post.py index 38667ae..920fbe3 100644 --- a/seclai/_generated/api/sources/cancel_source_embedding_migration_api_sources_source_connection_id_embedding_migration_cancel_post.py +++ b/seclai/_generated/api/sources/cancel_source_embedding_migration_api_sources_source_connection_id_embedding_migration_cancel_post.py @@ -17,7 +17,7 @@ def _get_kwargs( source_connection_id: UUID, *, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -68,7 +68,7 @@ def sync_detailed( source_connection_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | SourceEmbeddingMigrationResponse]: """Cancel Source Embedding Migration @@ -78,7 +78,7 @@ def sync_detailed( Args: source_connection_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -104,7 +104,7 @@ def sync( source_connection_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | SourceEmbeddingMigrationResponse | None: """Cancel Source Embedding Migration @@ -114,7 +114,7 @@ def sync( Args: source_connection_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -135,7 +135,7 @@ async def asyncio_detailed( source_connection_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | SourceEmbeddingMigrationResponse]: """Cancel Source Embedding Migration @@ -145,7 +145,7 @@ async def asyncio_detailed( Args: source_connection_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -169,7 +169,7 @@ async def asyncio( source_connection_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | SourceEmbeddingMigrationResponse | None: """Cancel Source Embedding Migration @@ -179,7 +179,7 @@ async def asyncio( Args: source_connection_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/sources/create_source_api_sources_post.py b/seclai/_generated/api/sources/create_source_api_sources_post.py index 97c39d6..2fa7cd9 100644 --- a/seclai/_generated/api/sources/create_source_api_sources_post.py +++ b/seclai/_generated/api/sources/create_source_api_sources_post.py @@ -1,6 +1,5 @@ from http import HTTPStatus from typing import Any, cast -from uuid import UUID import httpx @@ -15,7 +14,7 @@ def _get_kwargs( *, body: CreateSourceBody, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -72,7 +71,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: CreateSourceBody, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | HTTPValidationError | SourceResponse]: """Create Source @@ -84,7 +83,7 @@ def sync_detailed( created automatically. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (CreateSourceBody): Request body for creating a content source. Raises: @@ -111,7 +110,7 @@ def sync( *, client: AuthenticatedClient | Client, body: CreateSourceBody, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | HTTPValidationError | SourceResponse | None: """Create Source @@ -123,7 +122,7 @@ def sync( created automatically. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (CreateSourceBody): Request body for creating a content source. Raises: @@ -145,7 +144,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: CreateSourceBody, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | HTTPValidationError | SourceResponse]: """Create Source @@ -157,7 +156,7 @@ async def asyncio_detailed( created automatically. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (CreateSourceBody): Request body for creating a content source. Raises: @@ -182,7 +181,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: CreateSourceBody, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | HTTPValidationError | SourceResponse | None: """Create Source @@ -194,7 +193,7 @@ async def asyncio( created automatically. Args: - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (CreateSourceBody): Request body for creating a content source. Raises: diff --git a/seclai/_generated/api/sources/delete_source_api_sources_source_connection_id_delete.py b/seclai/_generated/api/sources/delete_source_api_sources_source_connection_id_delete.py index be1625f..3e19f2c 100644 --- a/seclai/_generated/api/sources/delete_source_api_sources_source_connection_id_delete.py +++ b/seclai/_generated/api/sources/delete_source_api_sources_source_connection_id_delete.py @@ -14,7 +14,7 @@ def _get_kwargs( source_connection_id: UUID, *, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -64,7 +64,7 @@ def sync_detailed( source_connection_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Delete Source @@ -75,7 +75,7 @@ def sync_detailed( Args: source_connection_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -101,7 +101,7 @@ def sync( source_connection_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Delete Source @@ -112,7 +112,7 @@ def sync( Args: source_connection_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -133,7 +133,7 @@ async def asyncio_detailed( source_connection_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Delete Source @@ -144,7 +144,7 @@ async def asyncio_detailed( Args: source_connection_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -168,7 +168,7 @@ async def asyncio( source_connection_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Delete Source @@ -179,7 +179,7 @@ async def asyncio( Args: source_connection_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/sources/get_source_api_sources_source_connection_id_get.py b/seclai/_generated/api/sources/get_source_api_sources_source_connection_id_get.py index eb971be..03b3ef7 100644 --- a/seclai/_generated/api/sources/get_source_api_sources_source_connection_id_get.py +++ b/seclai/_generated/api/sources/get_source_api_sources_source_connection_id_get.py @@ -15,7 +15,7 @@ def _get_kwargs( source_connection_id: UUID, *, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -66,7 +66,7 @@ def sync_detailed( source_connection_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | SourceResponse]: """Get Source @@ -78,7 +78,7 @@ def sync_detailed( Args: source_connection_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -104,7 +104,7 @@ def sync( source_connection_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | SourceResponse | None: """Get Source @@ -116,7 +116,7 @@ def sync( Args: source_connection_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -137,7 +137,7 @@ async def asyncio_detailed( source_connection_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | SourceResponse]: """Get Source @@ -149,7 +149,7 @@ async def asyncio_detailed( Args: source_connection_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -173,7 +173,7 @@ async def asyncio( source_connection_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | SourceResponse | None: """Get Source @@ -185,7 +185,7 @@ async def asyncio( Args: source_connection_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/sources/get_source_embedding_migration_api_sources_source_connection_id_embedding_migration_get.py b/seclai/_generated/api/sources/get_source_embedding_migration_api_sources_source_connection_id_embedding_migration_get.py index 6e36376..0e3207d 100644 --- a/seclai/_generated/api/sources/get_source_embedding_migration_api_sources_source_connection_id_embedding_migration_get.py +++ b/seclai/_generated/api/sources/get_source_embedding_migration_api_sources_source_connection_id_embedding_migration_get.py @@ -17,7 +17,7 @@ def _get_kwargs( source_connection_id: UUID, *, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -84,7 +84,7 @@ def sync_detailed( source_connection_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | None | SourceEmbeddingMigrationResponse]: """Get Source Embedding Migration @@ -94,7 +94,7 @@ def sync_detailed( Args: source_connection_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -120,7 +120,7 @@ def sync( source_connection_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | None | SourceEmbeddingMigrationResponse | None: """Get Source Embedding Migration @@ -130,7 +130,7 @@ def sync( Args: source_connection_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -151,7 +151,7 @@ async def asyncio_detailed( source_connection_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | None | SourceEmbeddingMigrationResponse]: """Get Source Embedding Migration @@ -161,7 +161,7 @@ async def asyncio_detailed( Args: source_connection_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -185,7 +185,7 @@ async def asyncio( source_connection_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | None | SourceEmbeddingMigrationResponse | None: """Get Source Embedding Migration @@ -195,7 +195,7 @@ async def asyncio( Args: source_connection_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/sources/list_sources_api_sources_get.py b/seclai/_generated/api/sources/list_sources_api_sources_get.py index 4e4e1b9..0b62cad 100644 --- a/seclai/_generated/api/sources/list_sources_api_sources_get.py +++ b/seclai/_generated/api/sources/list_sources_api_sources_get.py @@ -1,6 +1,5 @@ from http import HTTPStatus from typing import Any -from uuid import UUID import httpx @@ -18,7 +17,7 @@ def _get_kwargs( sort: str | Unset = "created_at", order: str | Unset = "desc", account_id: None | str | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -91,7 +90,7 @@ def sync_detailed( sort: str | Unset = "created_at", order: str | Unset = "desc", account_id: None | str | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | SourceListResponse]: """List sources @@ -116,7 +115,7 @@ def sync_detailed( order (str | Unset): Sort order Default: 'desc'. account_id (None | str | Unset): List sources for the given account. Defaults to the caller's account. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -150,7 +149,7 @@ def sync( sort: str | Unset = "created_at", order: str | Unset = "desc", account_id: None | str | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | SourceListResponse | None: """List sources @@ -175,7 +174,7 @@ def sync( order (str | Unset): Sort order Default: 'desc'. account_id (None | str | Unset): List sources for the given account. Defaults to the caller's account. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -204,7 +203,7 @@ async def asyncio_detailed( sort: str | Unset = "created_at", order: str | Unset = "desc", account_id: None | str | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | SourceListResponse]: """List sources @@ -229,7 +228,7 @@ async def asyncio_detailed( order (str | Unset): Sort order Default: 'desc'. account_id (None | str | Unset): List sources for the given account. Defaults to the caller's account. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -261,7 +260,7 @@ async def asyncio( sort: str | Unset = "created_at", order: str | Unset = "desc", account_id: None | str | Unset = UNSET, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | SourceListResponse | None: """List sources @@ -286,7 +285,7 @@ async def asyncio( order (str | Unset): Sort order Default: 'desc'. account_id (None | str | Unset): List sources for the given account. Defaults to the caller's account. - x_account_id (UUID | Unset): + x_account_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/sources/start_source_embedding_migration_api_sources_source_connection_id_embedding_migration_post.py b/seclai/_generated/api/sources/start_source_embedding_migration_api_sources_source_connection_id_embedding_migration_post.py index 9477289..924bd74 100644 --- a/seclai/_generated/api/sources/start_source_embedding_migration_api_sources_source_connection_id_embedding_migration_post.py +++ b/seclai/_generated/api/sources/start_source_embedding_migration_api_sources_source_connection_id_embedding_migration_post.py @@ -21,7 +21,7 @@ def _get_kwargs( source_connection_id: UUID, *, body: StartSourceEmbeddingMigrationRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -81,7 +81,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: StartSourceEmbeddingMigrationRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | HTTPValidationError | SourceEmbeddingMigrationResponse]: """Start Source Embedding Migration @@ -101,7 +101,7 @@ def sync_detailed( Args: source_connection_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (StartSourceEmbeddingMigrationRequest): Request payload to start a source embedding migration. @@ -131,7 +131,7 @@ def sync( *, client: AuthenticatedClient | Client, body: StartSourceEmbeddingMigrationRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | HTTPValidationError | SourceEmbeddingMigrationResponse | None: """Start Source Embedding Migration @@ -151,7 +151,7 @@ def sync( Args: source_connection_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (StartSourceEmbeddingMigrationRequest): Request payload to start a source embedding migration. @@ -176,7 +176,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: StartSourceEmbeddingMigrationRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[Any | HTTPValidationError | SourceEmbeddingMigrationResponse]: """Start Source Embedding Migration @@ -196,7 +196,7 @@ async def asyncio_detailed( Args: source_connection_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (StartSourceEmbeddingMigrationRequest): Request payload to start a source embedding migration. @@ -224,7 +224,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: StartSourceEmbeddingMigrationRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Any | HTTPValidationError | SourceEmbeddingMigrationResponse | None: """Start Source Embedding Migration @@ -244,7 +244,7 @@ async def asyncio( Args: source_connection_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (StartSourceEmbeddingMigrationRequest): Request payload to start a source embedding migration. diff --git a/seclai/_generated/api/sources/update_source_api_sources_source_connection_id_put.py b/seclai/_generated/api/sources/update_source_api_sources_source_connection_id_put.py index 77f5ba9..d8931d5 100644 --- a/seclai/_generated/api/sources/update_source_api_sources_source_connection_id_put.py +++ b/seclai/_generated/api/sources/update_source_api_sources_source_connection_id_put.py @@ -17,7 +17,7 @@ def _get_kwargs( source_connection_id: UUID, *, body: UpdateSourceBody, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +73,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: UpdateSourceBody, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | SourceResponse]: """Update Source @@ -84,7 +84,7 @@ def sync_detailed( Args: source_connection_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UpdateSourceBody): Request body for updating a content source. Raises: @@ -113,7 +113,7 @@ def sync( *, client: AuthenticatedClient | Client, body: UpdateSourceBody, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | SourceResponse | None: """Update Source @@ -124,7 +124,7 @@ def sync( Args: source_connection_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UpdateSourceBody): Request body for updating a content source. Raises: @@ -148,7 +148,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: UpdateSourceBody, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError | SourceResponse]: """Update Source @@ -159,7 +159,7 @@ async def asyncio_detailed( Args: source_connection_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UpdateSourceBody): Request body for updating a content source. Raises: @@ -186,7 +186,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: UpdateSourceBody, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | SourceResponse | None: """Update Source @@ -197,7 +197,7 @@ async def asyncio( Args: source_connection_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (UpdateSourceBody): Request body for updating a content source. Raises: diff --git a/seclai/_generated/api/sources/upload_file_to_source_api_sources_source_connection_id_upload_post.py b/seclai/_generated/api/sources/upload_file_to_source_api_sources_source_connection_id_upload_post.py index 5827cdf..b1f4e32 100644 --- a/seclai/_generated/api/sources/upload_file_to_source_api_sources_source_connection_id_upload_post.py +++ b/seclai/_generated/api/sources/upload_file_to_source_api_sources_source_connection_id_upload_post.py @@ -1,7 +1,6 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote -from uuid import UUID import httpx @@ -18,7 +17,7 @@ def _get_kwargs( source_connection_id: str, *, body: BodyUploadFileToSourceApiSourcesSourceConnectionIdUploadPost, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -67,7 +66,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: BodyUploadFileToSourceApiSourcesSourceConnectionIdUploadPost, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError]: r"""Upload a file to a content source @@ -125,7 +124,7 @@ def sync_detailed( Args: source_connection_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (BodyUploadFileToSourceApiSourcesSourceConnectionIdUploadPost): Raises: @@ -154,7 +153,7 @@ def sync( *, client: AuthenticatedClient | Client, body: BodyUploadFileToSourceApiSourcesSourceConnectionIdUploadPost, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | None: r"""Upload a file to a content source @@ -212,7 +211,7 @@ def sync( Args: source_connection_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (BodyUploadFileToSourceApiSourcesSourceConnectionIdUploadPost): Raises: @@ -236,7 +235,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: BodyUploadFileToSourceApiSourcesSourceConnectionIdUploadPost, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError]: r"""Upload a file to a content source @@ -294,7 +293,7 @@ async def asyncio_detailed( Args: source_connection_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (BodyUploadFileToSourceApiSourcesSourceConnectionIdUploadPost): Raises: @@ -321,7 +320,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: BodyUploadFileToSourceApiSourcesSourceConnectionIdUploadPost, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | None: r"""Upload a file to a content source @@ -379,7 +378,7 @@ async def asyncio( Args: source_connection_id (str): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (BodyUploadFileToSourceApiSourcesSourceConnectionIdUploadPost): Raises: diff --git a/seclai/_generated/api/sources/upload_inline_text_to_source_api_sources_source_connection_id_post.py b/seclai/_generated/api/sources/upload_inline_text_to_source_api_sources_source_connection_id_post.py index 1f5d697..825f51a 100644 --- a/seclai/_generated/api/sources/upload_inline_text_to_source_api_sources_source_connection_id_post.py +++ b/seclai/_generated/api/sources/upload_inline_text_to_source_api_sources_source_connection_id_post.py @@ -16,7 +16,7 @@ def _get_kwargs( source_connection_id: UUID, *, body: InlineTextUploadRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -67,7 +67,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: InlineTextUploadRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError]: """Upload inline text to a content source @@ -91,7 +91,7 @@ def sync_detailed( Args: source_connection_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (InlineTextUploadRequest): Request model for inline text uploads. Raises: @@ -120,7 +120,7 @@ def sync( *, client: AuthenticatedClient | Client, body: InlineTextUploadRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | None: """Upload inline text to a content source @@ -144,7 +144,7 @@ def sync( Args: source_connection_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (InlineTextUploadRequest): Request model for inline text uploads. Raises: @@ -168,7 +168,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: InlineTextUploadRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> Response[HTTPValidationError]: """Upload inline text to a content source @@ -192,7 +192,7 @@ async def asyncio_detailed( Args: source_connection_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (InlineTextUploadRequest): Request model for inline text uploads. Raises: @@ -219,7 +219,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: InlineTextUploadRequest, - x_account_id: UUID | Unset = UNSET, + x_account_id: str | Unset = UNSET, ) -> HTTPValidationError | None: """Upload inline text to a content source @@ -243,7 +243,7 @@ async def asyncio( Args: source_connection_id (UUID): - x_account_id (UUID | Unset): + x_account_id (str | Unset): body (InlineTextUploadRequest): Request model for inline text uploads. Raises: From 8470aef32442609c619df8d555c08f96c1dd3d9b Mon Sep 17 00:00:00 2001 From: Kim Burgaard Date: Thu, 23 Apr 2026 23:42:41 -0700 Subject: [PATCH 5/7] New step types, merged content source types, playground --- openapi/seclai.openapi.json | 1850 ++++++++++++++--- ...gents_agent_id_evaluation_criteria_post.py | 19 +- ...ation_criteria_criteria_id_results_post.py | 19 +- ..._evaluation_criteria_criteria_id_delete.py | 19 +- ...nts_evaluation_criteria_criteria_id_get.py | 19 +- ...uation_criteria_criteria_id_summary_get.py | 19 +- ...aluation_results_non_manual_summary_get.py | 19 +- ..._agents_agent_id_evaluation_results_get.py | 19 +- ...riteria_criteria_id_compatible_runs_get.py | 19 +- ...agents_agent_id_evaluation_criteria_get.py | 19 +- ...uation_criteria_criteria_id_results_get.py | 19 +- ...api_agents_agent_id_evaluation_runs_get.py | 19 +- ...t_id_runs_run_id_evaluation_results_get.py | 19 +- ..._id_evaluation_criteria_test_draft_post.py | 19 +- ...s_evaluation_criteria_criteria_id_patch.py | 19 +- ...ts_agent_id_input_uploads_upload_id_get.py | 19 +- ...t_api_agents_agent_id_upload_input_post.py | 19 +- .../agents/create_agent_api_agents_post.py | 19 +- ...delete_agent_api_agents_agent_id_delete.py | 19 +- ...agent_run_api_agents_runs_run_id_delete.py | 19 +- ...rt_agent_api_agents_agent_id_export_get.py | 39 +- ...ent_id_ai_assistant_generate_steps_post.py | 19 +- ..._agent_id_ai_assistant_step_config_post.py | 19 +- ...tion_api_agents_agent_id_definition_get.py | 35 +- ..._agent_metadata_api_agents_agent_id_get.py | 19 +- ...et_agent_run_api_agents_runs_run_id_get.py | 19 +- ...agent_id_ai_assistant_conversations_get.py | 19 +- ...agent_runs_api_agents_agent_id_runs_get.py | 19 +- .../api/agents/list_agents_api_agents_get.py | 19 +- ...t_id_ai_assistant_conversation_id_patch.py | 19 +- ...run_agent_api_agents_agent_id_runs_post.py | 61 +- ...nt_api_agents_agent_id_runs_stream_post.py | 33 +- ..._agent_runs_api_agents_runs_search_post.py | 19 +- .../update_agent_api_agents_agent_id_put.py | 19 +- ...tion_api_agents_agent_id_definition_put.py | 43 +- ...i_assistant_conversation_id_accept_post.py | 18 +- ..._assistant_conversation_id_decline_post.py | 18 +- ...feedback_api_ai_assistant_feedback_post.py | 19 +- ...se_api_ai_assistant_knowledge_base_post.py | 19 +- ...stant_memory_bank_conversation_id_patch.py | 18 +- ..._bank_api_ai_assistant_memory_bank_post.py | 19 +- ...stant_memory_bank_last_conversation_get.py | 19 +- ...solution_api_ai_assistant_solution_post.py | 19 +- ..._ai_source_api_ai_assistant_source_post.py | 19 +- ...mment_api_alerts_alert_id_comments_post.py | 19 +- ..._status_api_alerts_alert_id_status_post.py | 19 +- ...te_alert_config_api_alerts_configs_post.py | 19 +- ...fig_api_alerts_configs_config_id_delete.py | 19 +- ...config_api_alerts_configs_config_id_get.py | 19 +- ...et_alert_detail_api_alerts_alert_id_get.py | 19 +- ...st_alert_configs_api_alerts_configs_get.py | 19 +- .../api/alerts/list_alerts_api_alerts_get.py | 19 +- ...lerts_organization_preferences_list_get.py | 18 +- ...lert_api_alerts_alert_id_subscribe_post.py | 19 +- ...rt_api_alerts_alert_id_unsubscribe_post.py | 19 +- ...nfig_api_alerts_configs_config_id_patch.py | 19 +- ...rences_organization_id_alert_type_patch.py | 18 +- ...ource_connection_content_version_delete.py | 19 +- ...s_source_connection_content_version_get.py | 19 +- ...nnection_content_version_embeddings_get.py | 19 +- ...s_source_connection_content_version_put.py | 19 +- ..._connection_content_version_upload_post.py | 23 +- ...i_assistant_conversation_id_accept_post.py | 18 +- ..._assistant_conversation_id_decline_post.py | 18 +- ...nerate_api_governance_ai_assistant_post.py | 19 +- ...vernance_ai_assistant_conversations_get.py | 19 +- .../api/identity/get_me_api_me_get.py | 43 +- ...knowledge_base_api_knowledge_bases_post.py | 19 +- ...nowledge_bases_knowledge_base_id_delete.py | 19 +- ...i_knowledge_bases_knowledge_base_id_get.py | 19 +- ...knowledge_bases_api_knowledge_bases_get.py | 19 +- ...i_knowledge_bases_knowledge_base_id_put.py | 19 +- ...emory_banks_memory_bank_id_compact_post.py | 19 +- ...reate_memory_bank_api_memory_banks_post.py | 19 +- ..._api_memory_banks_memory_bank_id_delete.py | 19 +- ...mory_banks_memory_bank_id_source_delete.py | 19 +- ..._memory_banks_memory_bank_id_agents_get.py | 19 +- ...ank_api_memory_banks_memory_bank_id_get.py | 19 +- ...i_memory_banks_memory_bank_id_stats_get.py | 19 +- .../list_memory_banks_api_memory_banks_get.py | 19 +- ...emplates_api_memory_banks_templates_get.py | 19 +- ...anks_ai_assistant_conversation_id_patch.py | 18 +- ...rate_api_memory_banks_ai_assistant_post.py | 19 +- ...anks_ai_assistant_last_conversation_get.py | 19 +- ...nks_memory_bank_id_test_compaction_post.py | 19 +- ...e_api_memory_banks_test_compaction_post.py | 19 +- ...ank_api_memory_banks_memory_bank_id_put.py | 19 +- ...d_experiments_experiment_id_cancel_post.py | 237 +++ ..._api_models_playground_experiments_post.py | 239 +++ ...ount_api_models_alerts_unread_count_get.py | 19 +- ...layground_experiments_experiment_id_get.py | 241 +++ ...t_model_api_models_model_id_details_get.py | 220 ++ ...api_models_model_id_recommendations_get.py | 19 +- .../list_alerts_api_models_alerts_get.py | 19 +- ...s_api_models_playground_experiments_get.py | 312 +++ .../api/models/list_models_api_models_get.py | 286 +++ ...ad_api_models_alerts_mark_all_read_post.py | 11 +- ...d_api_models_alerts_alert_id_read_patch.py | 18 +- .../api/search/search_api_search_get.py | 19 +- ...olutions_solution_id_conversations_post.py | 18 +- ...i_assistant_conversation_id_accept_post.py | 18 +- ..._assistant_conversation_id_decline_post.py | 18 +- ..._solution_id_ai_assistant_generate_post.py | 18 +- ...ion_id_ai_assistant_knowledge_base_post.py | 18 +- ...ns_solution_id_ai_assistant_source_post.py | 18 +- .../create_solution_api_solutions_post.py | 19 +- ...lution_api_solutions_solution_id_delete.py | 18 +- ..._solution_api_solutions_solution_id_get.py | 18 +- ...s_api_solutions_solution_id_agents_post.py | 18 +- ...utions_solution_id_knowledge_bases_post.py | 18 +- ...ons_solution_id_source_connections_post.py | 18 +- ...solutions_solution_id_conversations_get.py | 18 +- .../list_solutions_api_solutions_get.py | 19 +- ..._id_conversations_conversation_id_patch.py | 18 +- ...api_solutions_solution_id_agents_delete.py | 18 +- ...ions_solution_id_knowledge_bases_delete.py | 18 +- ...s_solution_id_source_connections_delete.py | 18 +- ...olution_api_solutions_solution_id_patch.py | 18 +- ...ection_id_exports_export_id_cancel_post.py | 18 +- ...urces_source_connection_id_exports_post.py | 18 +- ..._connection_id_exports_export_id_delete.py | 18 +- ...ction_id_exports_export_id_download_get.py | 18 +- ...rce_connection_id_exports_estimate_post.py | 18 +- ...rce_connection_id_exports_export_id_get.py | 18 +- ...ources_source_connection_id_exports_get.py | 18 +- ...tion_id_embedding_migration_cancel_post.py | 18 +- .../sources/create_source_api_sources_post.py | 59 +- ...api_sources_source_connection_id_delete.py | 18 +- ...ce_api_sources_source_connection_id_get.py | 18 +- ...e_connection_id_embedding_migration_get.py | 18 +- .../sources/list_sources_api_sources_get.py | 43 +- ..._connection_id_embedding_migration_post.py | 18 +- ...ce_api_sources_source_connection_id_put.py | 18 +- ...ources_source_connection_id_upload_post.py | 23 +- ...e_api_sources_source_connection_id_post.py | 18 +- seclai/_generated/models/__init__.py | 44 + .../models/agent_definition_response.py | 4 +- .../agent_definition_response_definition.py | 5 +- ...d_experiments_experiment_id_cancel_post.py | 53 + ..._api_models_playground_experiments_post.py | 53 + .../_generated/models/create_source_body.py | 35 +- ...layground_experiments_experiment_id_get.py | 53 + ...s_api_models_playground_experiments_get.py | 53 + .../models/playground_create_request.py | 205 ++ ...nd_create_request_evaluation_complexity.py | 10 + ...ayground_create_request_evaluation_mode.py | 9 + .../models/prompt_model_response.py | 814 ++++++++ ...pt_model_response_payload_schema_type_0.py | 46 + .../_generated/models/prompt_tool_response.py | 246 +++ .../prompt_tool_response_headers_type_0.py | 46 + .../models/provider_group_response.py | 84 + seclai/_generated/models/source_index_mode.py | 11 + seclai/_generated/models/source_response.py | 32 + .../models/variant_category_response.py | 108 + .../models/variant_option_response.py | 348 ++++ seclai/seclai.py | 226 ++ 156 files changed, 6887 insertions(+), 1579 deletions(-) create mode 100644 seclai/_generated/api/models/cancel_experiment_endpoint_api_models_playground_experiments_experiment_id_cancel_post.py create mode 100644 seclai/_generated/api/models/create_experiment_api_models_playground_experiments_post.py create mode 100644 seclai/_generated/api/models/get_experiment_api_models_playground_experiments_experiment_id_get.py create mode 100644 seclai/_generated/api/models/get_model_api_models_model_id_details_get.py create mode 100644 seclai/_generated/api/models/list_experiments_api_models_playground_experiments_get.py create mode 100644 seclai/_generated/api/models/list_models_api_models_get.py create mode 100644 seclai/_generated/models/cancel_experiment_endpoint_api_models_playground_experiments_experiment_id_cancel_post_response_cancel_experiment_endpoint_api_models_playground_experiments_experiment_id_cancel_post.py create mode 100644 seclai/_generated/models/create_experiment_api_models_playground_experiments_post_response_create_experiment_api_models_playground_experiments_post.py create mode 100644 seclai/_generated/models/get_experiment_api_models_playground_experiments_experiment_id_get_response_get_experiment_api_models_playground_experiments_experiment_id_get.py create mode 100644 seclai/_generated/models/list_experiments_api_models_playground_experiments_get_response_list_experiments_api_models_playground_experiments_get.py create mode 100644 seclai/_generated/models/playground_create_request.py create mode 100644 seclai/_generated/models/playground_create_request_evaluation_complexity.py create mode 100644 seclai/_generated/models/playground_create_request_evaluation_mode.py create mode 100644 seclai/_generated/models/prompt_model_response.py create mode 100644 seclai/_generated/models/prompt_model_response_payload_schema_type_0.py create mode 100644 seclai/_generated/models/prompt_tool_response.py create mode 100644 seclai/_generated/models/prompt_tool_response_headers_type_0.py create mode 100644 seclai/_generated/models/provider_group_response.py create mode 100644 seclai/_generated/models/source_index_mode.py create mode 100644 seclai/_generated/models/variant_category_response.py create mode 100644 seclai/_generated/models/variant_option_response.py diff --git a/openapi/seclai.openapi.json b/openapi/seclai.openapi.json index 69be258..ecc90b5 100644 --- a/openapi/seclai.openapi.json +++ b/openapi/seclai.openapi.json @@ -7,6 +7,7 @@ "name": "X-Account-Id", "required": false, "schema": { + "format": "uuid", "type": "string" } } @@ -60,7 +61,7 @@ }, "definition": { "additionalProperties": true, - "description": "The agent definition containing name, description, tags, and step workflow tree. Step types include prompt_call, retrieval, transform, gate, retry, evaluate_step, insight, extract_json, send_email, webhook_call, call_agent, write_metadata, write_content_attachment, load_content_attachment, load_content, display_result, and others.", + "description": "The agent definition containing name, description, tags, and step workflow tree. Step types include prompt_call, retrieval, transform, gate, retry, evaluate_step, insight, extract_content, streaming_result, send_email, webhook_call, call_agent, write_metadata, write_content_attachment, load_content_attachment, load_content, display_result, and others.", "title": "Definition", "type": "object" }, @@ -2047,6 +2048,17 @@ "description": "Embedding model override.", "title": "Embedding Model" }, + "index_mode": { + "anyOf": [ + { + "$ref": "#/components/schemas/SourceIndexMode" + }, + { + "type": "null" + } + ], + "description": "Index mode for custom_index sources: fast_and_cheap (default), balanced, slow_and_thorough, or custom." + }, "name": { "description": "Source name.", "maxLength": 255, @@ -2105,7 +2117,7 @@ "title": "Retention" }, "source_type": { - "description": "Source type: rss, website, file_uploads, or custom_index.", + "description": "Source type: rss, website, or custom_index. The legacy value 'file_uploads' is accepted as an alias for custom_index.", "title": "Source Type", "type": "string" }, @@ -3917,6 +3929,101 @@ "title": "PendingProcessingCompletedFailedStatus", "type": "string" }, + "PlaygroundCreateRequest": { + "description": "Create a model playground experiment via the public API.", + "properties": { + "evaluation_complexity": { + "default": "medium", + "description": "simple, medium, or complex", + "enum": [ + "simple", + "medium", + "complex" + ], + "title": "Evaluation Complexity", + "type": "string" + }, + "evaluation_mode": { + "default": "manual", + "description": "manual or prompt", + "enum": [ + "manual", + "prompt" + ], + "title": "Evaluation Mode", + "type": "string" + }, + "evaluator_model_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Evaluator model ID when evaluation_mode is prompt.", + "title": "Evaluator Model Id" + }, + "include_step_output_in_evaluation": { + "default": false, + "description": "Whether to include selected step output as evaluator context.", + "title": "Include Step Output In Evaluation", + "type": "boolean" + }, + "json_template": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Optional JSON template for advanced mode.", + "title": "Json Template" + }, + "model_ids": { + "description": "Selected model IDs (1-10).", + "items": { + "type": "string" + }, + "maxItems": 10, + "minItems": 1, + "title": "Model Ids", + "type": "array" + }, + "prompt": { + "description": "Prompt text for the experiment.", + "title": "Prompt", + "type": "string" + }, + "selected_step_output": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Optional step output text for evaluator context.", + "title": "Selected Step Output" + }, + "system_prompt": { + "default": "", + "description": "Optional system prompt.", + "title": "System Prompt", + "type": "string" + } + }, + "required": [ + "model_ids", + "prompt" + ], + "title": "PlaygroundCreateRequest", + "type": "object" + }, "PromptModelAutoUpgradeStrategy": { "enum": [ "none", @@ -3927,6 +4034,110 @@ "title": "PromptModelAutoUpgradeStrategy", "type": "string" }, + "PromptToolResponse": { + "description": "Response model for a prompt tool.", + "properties": { + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "documentation_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Documentation Url" + }, + "example": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Example" + }, + "headers": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Headers" + }, + "id": { + "title": "Id", + "type": "string" + }, + "name": { + "title": "Name", + "type": "string" + }, + "notes": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Notes" + }, + "tool_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Tool Name" + }, + "tool_type": { + "title": "Tool Type", + "type": "string" + }, + "tool_type_pattern": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Tool Type Pattern" + } + }, + "required": [ + "id", + "tool_type", + "name" + ], + "title": "PromptToolResponse", + "type": "object" + }, "ProposedActionResponse": { "description": "A single proposed action.", "properties": { @@ -4261,6 +4472,17 @@ "title": "SourceEmbeddingMigrationResponse", "type": "object" }, + "SourceIndexMode": { + "description": "Embedding quality / cost trade-off preset for custom_index sources.\n\nEach preset controls the default embedding dimensions, chunk size, and\nchunk overlap. The embedding model is always the account-level default\n(currently ``AWS_BEDROCK_AMAZON_NOVA_2_MULTIMODAL``).\n\nPresets:\n FAST_AND_CHEAP: 256 dimensions, 3 000 char chunks, 500 char overlap.\n BALANCED: 384 dimensions, 1 500 char chunks, 300 char overlap.\n SLOW_AND_THOROUGH: 1 024 dimensions, 1 000 char chunks, 200 char overlap.\n CUSTOM: Caller supplies embedding model, dimensions, and chunk config.", + "enum": [ + "fast_and_cheap", + "balanced", + "slow_and_thorough", + "custom" + ], + "title": "SourceIndexMode", + "type": "string" + }, "SourceResponse": { "description": "Response model for source data.", "properties": { @@ -4429,6 +4651,17 @@ "title": "Id", "type": "string" }, + "index_mode": { + "anyOf": [ + { + "$ref": "#/components/schemas/SourceIndexMode" + }, + { + "type": "null" + } + ], + "description": "Index mode for custom_index sources: fast_and_cheap, balanced, slow_and_thorough, or custom." + }, "name": { "description": "Name of the source connection.", "title": "Name", @@ -5449,51 +5682,51 @@ "title": "ValidationError", "type": "object" }, - "routers__api__agents__AgentListResponse": { + "VariantCategoryResponse": { + "description": "Response model for a variant category", "properties": { - "data": { - "description": "List of agents.", - "items": { - "$ref": "#/components/schemas/AgentSummaryResponse" - }, - "title": "Data", - "type": "array" + "category": { + "title": "Category", + "type": "string" }, - "pagination": { - "$ref": "#/components/schemas/PaginationResponse" - } - }, - "required": [ - "data", - "pagination" - ], - "title": "AgentListResponse", - "type": "object" - }, - "routers__api__agents__AgentRunListResponse": { - "properties": { - "data": { - "description": "List of agent runs.", + "configurable": { + "title": "Configurable", + "type": "boolean" + }, + "description": { + "title": "Description", + "type": "string" + }, + "options": { "items": { - "$ref": "#/components/schemas/AgentRunResponse" + "$ref": "#/components/schemas/VariantOptionResponse" }, - "title": "Data", + "title": "Options", "type": "array" }, - "pagination": { - "$ref": "#/components/schemas/PaginationResponse" + "title": { + "title": "Title", + "type": "string" } }, "required": [ - "data", - "pagination" + "category", + "title", + "description", + "configurable", + "options" ], - "title": "AgentRunListResponse", + "title": "VariantCategoryResponse", "type": "object" }, - "routers__api__agents__AgentTraceSearchRequest": { + "VariantOptionResponse": { + "description": "Response model for a variant option", "properties": { - "agent_id": { + "default": { + "title": "Default", + "type": "boolean" + }, + "description": { "anyOf": [ { "type": "string" @@ -5502,81 +5735,252 @@ "type": "null" } ], - "description": "Filter by agent ID.", - "title": "Agent Id" - }, - "query": { - "description": "Search query text.", - "title": "Query", - "type": "string" + "title": "Description" }, - "run_status": { + "input_1h_cache_write_credits_per_1000_tokens": { "anyOf": [ { - "type": "string" + "type": "number" }, { "type": "null" } ], - "description": "Filter by run status.", - "title": "Run Status" + "title": "Input 1H Cache Write Credits Per 1000 Tokens" }, - "step_type": { + "input_5m_cache_write_credits_per_1000_tokens": { "anyOf": [ { - "type": "string" + "type": "number" }, { "type": "null" } ], - "description": "Filter by step type.", - "title": "Step Type" + "title": "Input 5M Cache Write Credits Per 1000 Tokens" }, - "top_n": { - "default": 10, - "description": "Maximum number of results.", - "maximum": 100.0, - "minimum": 1.0, - "title": "Top N", - "type": "integer" - } - }, - "required": [ - "query" - ], - "title": "AgentTraceSearchRequest", - "type": "object" - }, - "routers__api__agents__CreateAgentRequest": { - "properties": { - "agent_template": { + "input_cache_hit_credits_per_1000_tokens": { "anyOf": [ { - "type": "string" + "type": "number" }, { "type": "null" } ], - "description": "Template to initialize the agent from. Values: blank, retrieval_example, simple_qa, summarizer, json_extractor, content_change_notifier, scheduled_report, webhook_pipeline.", - "title": "Agent Template" + "title": "Input Cache Hit Credits Per 1000 Tokens" }, - "description": { + "input_credits_per_1000_tokens": { "anyOf": [ { - "type": "string" + "type": "number" }, { "type": "null" } ], - "description": "Optional description.", - "title": "Description" + "title": "Input Credits Per 1000 Tokens" }, - "name": { - "description": "Name for the new agent.", + "long_context_input_cache_hit_credits_per_1000_tokens": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Long Context Input Cache Hit Credits Per 1000 Tokens" + }, + "long_context_input_credits_per_1000_tokens": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Long Context Input Credits Per 1000 Tokens" + }, + "long_context_output_credits_per_1000_tokens": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Long Context Output Credits Per 1000 Tokens" + }, + "long_context_threshold": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Long Context Threshold" + }, + "output_credits_per_1000_tokens": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Output Credits Per 1000 Tokens" + }, + "title": { + "title": "Title", + "type": "string" + }, + "value": { + "title": "Value", + "type": "string" + } + }, + "required": [ + "value", + "title", + "default" + ], + "title": "VariantOptionResponse", + "type": "object" + }, + "routers__api__agents__AgentListResponse": { + "properties": { + "data": { + "description": "List of agents.", + "items": { + "$ref": "#/components/schemas/AgentSummaryResponse" + }, + "title": "Data", + "type": "array" + }, + "pagination": { + "$ref": "#/components/schemas/PaginationResponse" + } + }, + "required": [ + "data", + "pagination" + ], + "title": "AgentListResponse", + "type": "object" + }, + "routers__api__agents__AgentRunListResponse": { + "properties": { + "data": { + "description": "List of agent runs.", + "items": { + "$ref": "#/components/schemas/AgentRunResponse" + }, + "title": "Data", + "type": "array" + }, + "pagination": { + "$ref": "#/components/schemas/PaginationResponse" + } + }, + "required": [ + "data", + "pagination" + ], + "title": "AgentRunListResponse", + "type": "object" + }, + "routers__api__agents__AgentTraceSearchRequest": { + "properties": { + "agent_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Filter by agent ID.", + "title": "Agent Id" + }, + "query": { + "description": "Search query text.", + "title": "Query", + "type": "string" + }, + "run_status": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Filter by run status.", + "title": "Run Status" + }, + "step_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Filter by step type.", + "title": "Step Type" + }, + "top_n": { + "default": 10, + "description": "Maximum number of results.", + "maximum": 100.0, + "minimum": 1.0, + "title": "Top N", + "type": "integer" + } + }, + "required": [ + "query" + ], + "title": "AgentTraceSearchRequest", + "type": "object" + }, + "routers__api__agents__CreateAgentRequest": { + "properties": { + "agent_template": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Template to initialize the agent from. Values: blank, retrieval_example, simple_qa, summarizer, json_extractor, content_change_notifier, scheduled_report, webhook_pipeline.", + "title": "Agent Template" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Optional description.", + "title": "Description" + }, + "name": { + "description": "Name for the new agent.", "title": "Name", "type": "string" }, @@ -7129,61 +7533,429 @@ "title": "SourceListResponse", "type": "object" }, - "schemas__v1__agent_evaluations__NonManualEvaluationModeStatResponse": { - "description": "Per-mode rollup for evaluation activity.", + "schemas__model_responses__PromptModelResponse": { + "description": "Response model for prompt model data", "properties": { - "failed": { - "title": "Failed", - "type": "integer" - }, - "failure_rate": { - "title": "Failure Rate", - "type": "number" + "default": { + "title": "Default", + "type": "boolean" }, - "flagged": { - "title": "Flagged", - "type": "integer" + "deprecated_at": { + "anyOf": [ + { + "format": "date-time", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Deprecated At" }, - "mode": { - "title": "Mode", + "description": { + "title": "Description", "type": "string" }, - "pass_rate": { - "title": "Pass Rate", - "type": "number" - }, - "passed": { - "title": "Passed", - "type": "integer" + "enabled": { + "title": "Enabled", + "type": "boolean" }, - "total": { - "title": "Total", - "type": "integer" - } - }, - "required": [ - "mode", - "total", - "passed", - "failed", - "flagged", - "pass_rate", - "failure_rate" - ], - "title": "NonManualEvaluationModeStatResponse", - "type": "object" - }, - "schemas__v1__agent_evaluations__NonManualEvaluationSummaryResponse": { - "description": "Account-level summary for evaluations.", - "properties": { - "by_mode": { - "items": { - "$ref": "#/components/schemas/schemas__v1__agent_evaluations__NonManualEvaluationModeStatResponse" - }, - "title": "By Mode", - "type": "array" + "family": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Family" }, - "failed": { + "family_generation": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Family Generation" + }, + "id": { + "title": "Id", + "type": "string" + }, + "input_1h_cache_write_credits_per_1000_tokens": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Input 1H Cache Write Credits Per 1000 Tokens" + }, + "input_5m_cache_write_credits_per_1000_tokens": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Input 5M Cache Write Credits Per 1000 Tokens" + }, + "input_cache_hit_credits_per_1000_tokens": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Input Cache Hit Credits Per 1000 Tokens" + }, + "input_credits_per_1000_tokens": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Input Credits Per 1000 Tokens" + }, + "is_new": { + "default": false, + "title": "Is New", + "type": "boolean" + }, + "last_used": { + "default": false, + "title": "Last Used", + "type": "boolean" + }, + "max_context_tokens": { + "title": "Max Context Tokens", + "type": "integer" + }, + "max_conversation_length": { + "title": "Max Conversation Length", + "type": "integer" + }, + "max_output_tokens": { + "title": "Max Output Tokens", + "type": "integer" + }, + "model_id": { + "title": "Model Id", + "type": "string" + }, + "name": { + "title": "Name", + "type": "string" + }, + "output_credits_per_1000_tokens": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Output Credits Per 1000 Tokens" + }, + "payload_schema": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "description": "Model-specific JSON schema for advanced prompt_call json_template payloads.", + "title": "Payload Schema" + }, + "payload_schema_source_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Source URL used to derive payload_schema guidance for this model.", + "title": "Payload Schema Source Url" + }, + "provider": { + "title": "Provider", + "type": "string" + }, + "released_at": { + "anyOf": [ + { + "format": "date-time", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Released At" + }, + "schema_documentation_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Model documentation URL with request/response payload details.", + "title": "Schema Documentation Url" + }, + "schema_notes": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Human-readable notes about request payload compatibility.", + "title": "Schema Notes" + }, + "successor_model_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Successor Model Id" + }, + "sunset_at": { + "anyOf": [ + { + "format": "date-time", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Sunset At" + }, + "supported_input_media": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Supported Input Media" + }, + "supported_languages": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Supported Languages" + }, + "supports_openai_arguments": { + "default": false, + "title": "Supports Openai Arguments", + "type": "boolean" + }, + "supports_streaming": { + "default": false, + "title": "Supports Streaming", + "type": "boolean" + }, + "supports_structured_output": { + "default": true, + "title": "Supports Structured Output", + "type": "boolean" + }, + "supports_thinking": { + "default": false, + "title": "Supports Thinking", + "type": "boolean" + }, + "supports_tool_use": { + "default": true, + "title": "Supports Tool Use", + "type": "boolean" + }, + "tools_disabled": { + "items": { + "$ref": "#/components/schemas/PromptToolResponse" + }, + "title": "Tools Disabled", + "type": "array" + }, + "tools_enabled": { + "items": { + "$ref": "#/components/schemas/PromptToolResponse" + }, + "title": "Tools Enabled", + "type": "array" + }, + "training_cutoff_at": { + "anyOf": [ + { + "format": "date-time", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Training Cutoff At" + }, + "url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Url" + }, + "variants": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/VariantCategoryResponse" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Variants" + } + }, + "required": [ + "id", + "model_id", + "name", + "description", + "enabled", + "default", + "provider", + "max_context_tokens", + "max_output_tokens", + "max_conversation_length" + ], + "title": "PromptModelResponse", + "type": "object" + }, + "schemas__model_responses__ProviderGroupResponse": { + "description": "Response model for provider group with models", + "properties": { + "models": { + "items": { + "$ref": "#/components/schemas/schemas__model_responses__PromptModelResponse" + }, + "title": "Models", + "type": "array" + }, + "provider": { + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "models" + ], + "title": "ProviderGroupResponse", + "type": "object" + }, + "schemas__v1__agent_evaluations__NonManualEvaluationModeStatResponse": { + "description": "Per-mode rollup for evaluation activity.", + "properties": { + "failed": { + "title": "Failed", + "type": "integer" + }, + "failure_rate": { + "title": "Failure Rate", + "type": "number" + }, + "flagged": { + "title": "Flagged", + "type": "integer" + }, + "mode": { + "title": "Mode", + "type": "string" + }, + "pass_rate": { + "title": "Pass Rate", + "type": "number" + }, + "passed": { + "title": "Passed", + "type": "integer" + }, + "total": { + "title": "Total", + "type": "integer" + } + }, + "required": [ + "mode", + "total", + "passed", + "failed", + "flagged", + "pass_rate", + "failure_rate" + ], + "title": "NonManualEvaluationModeStatResponse", + "type": "object" + }, + "schemas__v1__agent_evaluations__NonManualEvaluationSummaryResponse": { + "description": "Account-level summary for evaluations.", + "properties": { + "by_mode": { + "items": { + "$ref": "#/components/schemas/schemas__v1__agent_evaluations__NonManualEvaluationModeStatResponse" + }, + "title": "By Mode", + "type": "array" + }, + "failed": { "title": "Failed", "type": "integer" }, @@ -8457,7 +9229,7 @@ }, "/agents/{agent_id}/definition": { "get": { - "description": "Fetch the current agent definition from the main branch.\n\nThe response includes `change_id` which must be provided when updating the definition (optimistic locking).\n\nThe definition contains the agent's step workflow. Available step types:\n- `prompt_call`: Call an LLM with a prompt template\n- `retrieval`: Search a knowledge base\n- `transform`: Reshape data with a Liquid template\n- `gate`: Evaluate conditions, stop or continue child execution\n- `retry`: Re-execute from a target ancestor step (for quality-control loops; pair with a `gate` step for conditional retrying. Fields: `target_step_id` (ancestor step ID), `max_retries` (1\u201310))\n- `evaluate_step`: Score a selected previous step output and emit JSON with `score`, `passed`, and `pass_threshold` (fields: `target_step_id`, `evaluation_prompt`, `pass_threshold`, optional `evaluation_tier`, optional `expectation_config`)\n- `insight`: Progressively read and analyze large input\n- `extract_json` / `extract_html` / `extract_xml`: Extract structured data\n- `send_email`: Send email with step output\n- `webhook_call`: POST data to an external URL\n- `write_aws_s3_object`: Write output to S3\n- `call_agent`: Invoke another agent\n- `write_metadata`: Write a value to content metadata (for filtering/gates; content-triggered agents only. Fields: `metadata_key`, `content`)\n- `write_content_attachment`: Write a file-backed attachment to content (optionally indexed for retrieval; content-triggered agents only. Fields: `attachment_key`, `content`, `content_type`, `indexed`)\n- `load_content_attachment`: Load a previously written attachment (content-triggered agents only. Fields: `attachment_key`)\n- `load_content`: Load the full text body of a source document (typically used with content-triggered agents; can also load by explicit `content_version_id`. Fields: `content_version_id` optional)\n- `display_result`: Show output to the user\n- `join`: Merge parallel branches\n- `combinator`: Combine multiple inputs\n- `text`: Static text literal\n\nAuth & scoping:\n- Requires `X-API-Key` header or OAuth Bearer token. You can only access agents belonging to your account.", + "description": "Fetch the current agent definition from the main branch.\n\nThe response includes `change_id` which must be provided when updating the definition (optimistic locking).\n\nThe definition contains the agent's step workflow. Available step types:\n- `prompt_call`: Call an LLM with a prompt template\n- `retrieval`: Search a knowledge base\n- `transform`: Reshape data with a Liquid template\n- `gate`: Evaluate conditions, stop or continue child execution\n- `retry`: Re-execute from a target ancestor step (for quality-control loops; pair with a `gate` step for conditional retrying. Fields: `target_step_id` (ancestor step ID), `max_retries` (1\u201310))\n- `evaluate_step`: Score a selected previous step output and emit JSON with `score`, `passed`, and `pass_threshold` (fields: `target_step_id`, `evaluation_prompt`, `pass_threshold`, optional `evaluation_tier`, optional `expectation_config`)\n- `insight`: Progressively read and analyze large input\n- `extract_content`: Extract structured data (JSON, HTML, XML)\n- `send_email`: Send email with step output\n- `webhook_call`: POST data to an external URL\n- `write_aws_s3_object`: Write output to S3\n- `call_agent`: Invoke another agent\n- `write_metadata`: Write a value to content metadata (for filtering/gates; content-triggered agents only. Fields: `metadata_key`, `content`)\n- `write_content_attachment`: Write a file-backed attachment to content (optionally indexed for retrieval; content-triggered agents only. Fields: `attachment_key`, `content`, `content_type`, `indexed`)\n- `load_content_attachment`: Load a previously written attachment (content-triggered agents only. Fields: `attachment_key`)\n- `load_content`: Load the full text body of a source document (typically used with content-triggered agents; can also load by explicit `content_version_id`. Fields: `content_version_id` optional)\n- `streaming_result`: Stream LLM tokens in real-time via SSE (must be a direct child of `prompt_call`; requires `dynamic_input` trigger; `priority: true` enables real-time streaming)\n- `display_result`: Show output to the user\n- `join`: Merge parallel branches\n- `combinator`: Combine multiple inputs\n- `text`: Static text literal\n\nAuth & scoping:\n- Requires `X-API-Key` header or OAuth Bearer token. You can only access agents belonging to your account.", "operationId": "get_agent_definition_api_agents__agent_id__definition_get", "parameters": [ { @@ -8501,7 +9273,7 @@ ] }, "put": { - "description": "Update the agent's definition on the main branch.\n\nUses **optimistic locking**: provide `expected_change_id` from the last `GET /api/agents/{agent_id}/definition`. Returns `409 Conflict` if the definition was modified since your last read.\n\nThe definition contains the agent's step workflow. Step types include `prompt_call`, `retrieval`, `transform`, `gate`, `retry`, `evaluate_step`, `insight`, `extract_json`, `extract_html`, `extract_xml`, `send_email`, `webhook_call`, `write_aws_s3_object`, `call_agent`, `write_metadata`, `write_content_attachment`, `load_content_attachment`, `load_content`, `display_result`, `join`, `combinator`, and `text`. Non-composite step types (`display_result`, `join`, `retry`, `evaluate_step`) cannot contain child steps.\n\n**Retry steps** re-execute from a target ancestor step for quality-control loops. Configure with `target_step_id` (ancestor step ID) and `max_retries` (1\u201310). Best practice: place a `gate` step before the retry to make retries conditional.\n\nAuth & scoping:\n- Requires `X-API-Key` header or OAuth Bearer token. You can only update agents belonging to your account.", + "description": "Update the agent's definition on the main branch.\n\nUses **optimistic locking**: provide `expected_change_id` from the last `GET /api/agents/{agent_id}/definition`. Returns `409 Conflict` if the definition was modified since your last read.\n\nThe definition contains the agent's step workflow. Step types include `prompt_call`, `retrieval`, `transform`, `gate`, `retry`, `evaluate_step`, `insight`, `extract_content`, `streaming_result`, `send_email`, `webhook_call`, `write_aws_s3_object`, `call_agent`, `write_metadata`, `write_content_attachment`, `load_content_attachment`, `load_content`, `display_result`, `join`, `combinator`, and `text`. Non-composite step types (`display_result`, `join`, `retry`, `evaluate_step`, `streaming_result`) cannot contain child steps.\n\n**Retry steps** re-execute from a target ancestor step for quality-control loops. Configure with `target_step_id` (ancestor step ID) and `max_retries` (1\u201310). Best practice: place a `gate` step before the retry to make retries conditional.\n\nAuth & scoping:\n- Requires `X-API-Key` header or OAuth Bearer token. You can only update agents belonging to your account.", "operationId": "update_agent_definition_api_agents__agent_id__definition_put", "parameters": [ { @@ -8993,7 +9765,7 @@ }, "/agents/{agent_id}/export": { "get": { - "description": "Export an agent definition as a portable JSON snapshot.\n\nThe response contains the full definition, trigger configuration with schedules, alert configs, evaluation criteria, agent-scoped governance policies, and a resolved dependency manifest that maps every referenced external entity UUID to its human-readable name.\n\nResponse shape:\n- `export_version`: schema version (currently `\"2\"`)\n- `exported_at`: ISO-8601 timestamp\n- `agent`: name, description, schema_version, definition, timestamps\n- `trigger`: trigger type, input template, schedules\n- `alert_configs`: alert type, thresholds, recipients\n- `evaluation_criteria`: evaluation settings per step\n- `governance_policies`: agent-scoped governance policies\n- `dependencies`: knowledge_bases, memory_banks, source_connections, agents, users\n\nQuery params:\n- `download` (default true): when true, sets `Content-Disposition: attachment` so clients treat the response as a file download.\n\nAuth & scoping:\n- Requires `X-API-Key` header or OAuth Bearer token.\n- When using OAuth, you may target a different organization account with `X-Account-Id`; for API keys, the key's account is always used.\n- You can only export agents belonging to the resolved account.", + "description": "Export an agent definition as a portable JSON snapshot.\n\nThe response contains the full definition, trigger configuration with schedules, alert configs, evaluation criteria, agent-scoped governance policies, and a resolved dependency manifest that maps every referenced external entity UUID to its human-readable name.\n\nResponse shape:\n- `export_version`: schema version (currently `\"2\"`)\n- `exported_at`: ISO-8601 timestamp\n- `agent`: name, description, schema_version, definition, timestamps\n- `trigger`: trigger type, input template, schedules\n- `alert_configs`: alert type, thresholds, recipients\n- `evaluation_criteria`: evaluation settings per step\n- `governance_policies`: agent-scoped governance policies\n- `dependencies`: knowledge_bases, memory_banks, source_connections, agents, users\n\nQuery params:\n- `download` (default true): when true, sets `Content-Disposition: attachment` so clients treat the response as a file download.\n\nAuth & scoping:\n- Requires `X-API-Key`. You can only export agents belonging to your account.", "operationId": "export_agent_api_agents__agent_id__export_get", "parameters": [ { @@ -9195,7 +9967,7 @@ ] }, "post": { - "description": "Start an agent run.\n\nAn *agent* is an automated workflow that can monitor content from your sources, process it with AI, and trigger actions. This endpoint creates a new run and returns a `run_id` you can poll to retrieve status and output.\n\nWhen to use:\n- Use this endpoint for request/response style integrations where polling is acceptable.\n- Use `POST /agents/{agent_id}/runs/stream` if you need real-time progress via SSE.\n\nKey fields:\n- `input`: text input for agents with a `dynamic_input` trigger.\n- `input_upload_id`: alternatively, reference a file previously uploaded via `POST /agents/{agent_id}/upload-input` (mutually exclusive with `input`).\n- `priority`: set true for latency-sensitive, user-facing work.\n- `metadata`: a JSON object that becomes available to agent steps for string substitution.\n\nAfter starting:\n- Poll `GET /agents/runs/{run_id}` until `status` is `completed` or `failed`.\n- Use `include_step_outputs=true` to include per-step outputs, timing, and credits.\n\nAuth & scoping:\n- Requires `X-API-Key` header or OAuth Bearer token. All resources are scoped to the caller's account.", + "description": "Start an agent run.\n\nAn *agent* is an automated workflow that can monitor content from your sources, process it with AI, and trigger actions. This endpoint creates a new run and returns a `run_id` you can poll to retrieve status and output.\n\nWhen to use:\n- Use this endpoint for request/response style integrations where polling is acceptable.\n- Use `POST /agents/{agent_id}/runs/stream` if you need real-time progress via SSE.\n\nKey fields:\n- `input`: text input for agents with a `dynamic_input` trigger.\n- `input_upload_id`: alternatively, reference a file previously uploaded via `POST /agents/{agent_id}/upload-input` (mutually exclusive with `input`).\n- `priority`: set true for latency-sensitive, user-facing work. For agents with a `streaming_result` step, set `priority=true` to enable real-time token streaming; otherwise the run still proceeds, but without live token streaming.\n- `metadata`: a JSON object that becomes available to agent steps for string substitution.\n\nAfter starting:\n- Poll `GET /agents/runs/{run_id}` until `status` is `completed` or `failed`.\n- Use `include_step_outputs=true` to include per-step outputs, timing, and credits.\n\nAuth & scoping:\n- Requires `X-API-Key` header or OAuth Bearer token. All resources are scoped to the caller's account.", "operationId": "run_agent_api_agents__agent_id__runs_post", "parameters": [ { @@ -9232,6 +10004,9 @@ }, "description": "Successful Response" }, + "402": { + "description": "Insufficient credits \u2014 the account has exhausted its credits. The response body is `{\"detail\": {\"error\": \"insufficient_credits\", \"message\": ..., \"account_id\": ...}}`." + }, "422": { "content": { "application/json": { @@ -9251,7 +10026,7 @@ }, "/agents/{agent_id}/runs/stream": { "post": { - "description": "Start a **priority** agent run and stream run events using Server-Sent Events (SSE).\n\nThis is the best option for interactive UIs where you want progress updates as the run executes.\n\nHow it works:\n- The first `init` event contains an `AgentRunResponse` snapshot, including the `run_id`.\n- Subsequent events are forwarded from the run event stream (status changes, step events, etc).\n- The final `done` event contains the terminal snapshot (including `output` and `credits` when available).\n\nInput options (for `dynamic_input` triggers):\n- `input`: text input passed directly.\n- `input_upload_id`: reference a file uploaded via `POST /agents/{agent_id}/upload-input` (mutually exclusive with `input`).\n\nClient guidance:\n- Keep the connection open and handle keepalive comments.\n- On `timeout` or `error`, the payload includes `run_id` so clients can resume by polling `GET /agents/runs/{run_id}`.\n\nAuth & scoping:\n- Requires `X-API-Key` header or OAuth Bearer token. All resources are scoped to the caller's account.", + "description": "Start a **priority** agent run and stream run events using Server-Sent Events (SSE).\n\nThis is the best option for interactive UIs where you want progress updates as the run executes.\n\nHow it works:\n- The first `init` event contains an `AgentRunResponse` snapshot, including the `run_id`.\n- Subsequent events are forwarded from the run event stream (status changes, step events, etc).\n- If the agent contains a `streaming_result` step, `stream_token` events deliver individual LLM tokens (with a `token` field) and a `stream_end` event signals completion.\n- The final `done` event contains the terminal snapshot (including `output` and `credits` when available).\n\nInput options (for `dynamic_input` triggers):\n- `input`: text input passed directly.\n- `input_upload_id`: reference a file uploaded via `POST /agents/{agent_id}/upload-input` (mutually exclusive with `input`).\n\nClient guidance:\n- Keep the connection open and handle keepalive comments.\n- On `timeout` or `error`, the payload includes `run_id` so clients can resume by polling `GET /agents/runs/{run_id}`.\n\nAuth & scoping:\n- Requires `X-API-Key` header or OAuth Bearer token. All resources are scoped to the caller's account.", "operationId": "run_streaming_agent_api_agents__agent_id__runs_stream_post", "parameters": [ { @@ -9292,6 +10067,9 @@ }, "description": "Streams agent run events via Server-Sent Events (SSE); run is always created as priority.\n\nSSE events:\n- `event: init` \u2014 `data` is an `AgentRunResponse` snapshot (includes `run_id`).\n- `event: done` \u2014 `data` is the final `AgentRunResponse` snapshot (includes `output`, `credits`, etc).\n- Other events (e.g. `status`, step events) are forwarded from the run event stream.\n- On `timeout` / `error`, the payload includes `run_id` so clients can fetch status via `GET /api/agents/runs/{run_id}`." }, + "402": { + "description": "Insufficient credits \u2014 the account has exhausted its credits. The response body is `{\"detail\": {\"error\": \"insufficient_credits\", \"message\": ..., \"account_id\": ...}}`." + }, "422": { "content": { "application/json": { @@ -10929,7 +11707,7 @@ }, "/contents/{source_connection_content_version}/upload": { "post": { - "description": "Upload a new file and replace the content backing an existing `SourceConnectionContentVersion`.\n\nThis behaves like a source file upload, but it targets an existing content version ID. This is useful when you want to correct or update an uploaded document while keeping references stable.\n\n**Maximum file size:** 209715200 bytes.\n\n**Supported MIME types:**\n- `application/epub+zip`\n- `application/json`\n- `application/msword`\n- `application/pdf`\n- `application/vnd.ms-excel`\n- `application/vnd.ms-outlook`\n- `application/vnd.ms-powerpoint`\n- `application/vnd.openxmlformats-officedocument.presentationml.presentation`\n- `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`\n- `application/vnd.openxmlformats-officedocument.wordprocessingml.document`\n- `application/xml`\n- `application/zip`\n- `audio/flac`\n- `audio/mp4`\n- `audio/mpeg`\n- `audio/ogg`\n- `audio/wav`\n- `image/bmp`\n- `image/gif`\n- `image/jpeg`\n- `image/png`\n- `image/tiff`\n- `image/webp`\n- `text/csv`\n- `text/html`\n- `text/markdown`\n- `text/plain`\n- `text/x-markdown`\n- `text/xml`\n- `video/mp4`\n- `video/quicktime`\n- `video/x-msvideo`\n\nNotes:\n- If the uploaded file's content type is `application/octet-stream`, the server attempts to infer the type from the file extension.\n- Use `metadata` to attach an arbitrary JSON object of metadata (for example `metadata={\"category\":\"docs\"}`).\n- `title` is a convenience field and is merged into the metadata as `metadata.title` (it does not override an existing `metadata.title`).\n- For backwards compatibility, you can also pass form fields named `metadata_` (for example `metadata_author=...`). These override keys from `metadata`.\n\nAuth & scoping:\n- Requires `X-API-Key` header or OAuth Bearer token. You can only replace content belonging to your account.", + "description": "Upload a new file and replace the content backing an existing `SourceConnectionContentVersion`.\n\nThis behaves like a source file upload, but it targets an existing content version ID. This is useful when you want to correct or update an uploaded document while keeping references stable.\n\n**Maximum file size:** 209715200 bytes.\n\n**Supported MIME types:**\n- `application/epub+zip`\n- `application/json`\n- `application/pdf`\n- `application/vnd.ms-excel`\n- `application/vnd.ms-outlook`\n- `application/vnd.ms-powerpoint`\n- `application/vnd.openxmlformats-officedocument.presentationml.presentation`\n- `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`\n- `application/vnd.openxmlformats-officedocument.wordprocessingml.document`\n- `application/xml`\n- `application/zip`\n- `audio/flac`\n- `audio/mp4`\n- `audio/mpeg`\n- `audio/ogg`\n- `audio/wav`\n- `image/bmp`\n- `image/gif`\n- `image/jpeg`\n- `image/png`\n- `image/tiff`\n- `image/webp`\n- `text/csv`\n- `text/html`\n- `text/markdown`\n- `text/plain`\n- `text/x-markdown`\n- `text/xml`\n- `video/mp4`\n- `video/quicktime`\n- `video/x-msvideo`\n\nNotes:\n- If the uploaded file's content type is `application/octet-stream`, the server attempts to infer the type from the file extension.\n- Use `metadata` to attach an arbitrary JSON object of metadata (for example `metadata={\"category\":\"docs\"}`).\n- `title` is a convenience field and is merged into the metadata as `metadata.title` (it does not override an existing `metadata.title`).\n- For backwards compatibility, you can also pass form fields named `metadata_` (for example `metadata_author=...`). These override keys from `metadata`.\n\nAuth & scoping:\n- Requires `X-API-Key` header or OAuth Bearer token. You can only replace content belonging to your account.", "operationId": "upload_file_to_content_api_contents__source_connection_content_version__upload_post", "parameters": [ { @@ -11468,7 +12246,7 @@ }, "/me": { "get": { - "description": "Returns the authenticated user's personal account ID and a list of organizations they belong to. Each organization entry includes the organization's id, name, and account_id. Useful for CLI tooling that needs to let the user pick an organization context.", + "description": "Returns the authenticated user's personal account ID and a list of organisations they belong to. Each organisation entry includes the organisation's own id, display name, and account_id. Useful for CLI tooling that needs to let the user pick an org context.", "operationId": "get_me_api_me_get", "parameters": [ { @@ -11898,10 +12676,248 @@ ] } }, - "/memory_banks/{memory_bank_id}": { + "/memory_banks/{memory_bank_id}": { + "delete": { + "description": "Soft-delete a memory bank. This action is permanent and cannot be undone.\n\nThe linked content source and all stored conversation memory entries will also be removed.", + "operationId": "delete_memory_bank_api_memory_banks__memory_bank_id__delete", + "parameters": [ + { + "in": "path", + "name": "memory_bank_id", + "required": true, + "schema": { + "title": "Memory Bank Id", + "type": "string" + } + }, + { + "$ref": "#/components/parameters/X-Account-Id" + } + ], + "responses": { + "204": { + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "Delete Memory Bank", + "tags": [ + "memory_banks" + ] + }, + "get": { + "description": "Fetch a memory bank by ID.\n\nAuth & scoping:\n- Requires `X-API-Key` header or OAuth Bearer token. You can only access memory banks belonging to your account.", + "operationId": "get_memory_bank_api_memory_banks__memory_bank_id__get", + "parameters": [ + { + "in": "path", + "name": "memory_bank_id", + "required": true, + "schema": { + "title": "Memory Bank Id", + "type": "string" + } + }, + { + "$ref": "#/components/parameters/X-Account-Id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MemoryBankResponseModel" + } + } + }, + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "Get Memory Bank", + "tags": [ + "memory_banks" + ] + }, + "put": { + "description": "Update a memory bank's configuration. Only provided fields are changed; omitted fields are left unchanged.\n\nNote: the embedding `mode` cannot be changed after creation because it determines the vector dimensions used to store entries.", + "operationId": "update_memory_bank_api_memory_banks__memory_bank_id__put", + "parameters": [ + { + "in": "path", + "name": "memory_bank_id", + "required": true, + "schema": { + "title": "Memory Bank Id", + "type": "string" + } + }, + { + "$ref": "#/components/parameters/X-Account-Id" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateMemoryBankBody" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MemoryBankResponseModel" + } + } + }, + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "Update Memory Bank", + "tags": [ + "memory_banks" + ] + } + }, + "/memory_banks/{memory_bank_id}/agents": { + "get": { + "description": "List agents whose current definition references this memory bank.\n\nReturns an array of `{agent_id, agent_name}` objects.", + "operationId": "get_agents_using_bank_api_memory_banks__memory_bank_id__agents_get", + "parameters": [ + { + "in": "path", + "name": "memory_bank_id", + "required": true, + "schema": { + "title": "Memory Bank Id", + "type": "string" + } + }, + { + "$ref": "#/components/parameters/X-Account-Id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "title": "Response Get Agents Using Bank Api Memory Banks Memory Bank Id Agents Get", + "type": "array" + } + } + }, + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "Get Agents Using Bank", + "tags": [ + "memory_banks" + ] + } + }, + "/memory_banks/{memory_bank_id}/compact": { + "post": { + "description": "Trigger an on-demand compaction run for a memory bank.\n\nThe bank must have at least one compaction threshold configured (max_age_days, max_turns, or max_size_tokens). Compaction runs asynchronously \u2014 the response confirms scheduling, not completion.", + "operationId": "compact_memory_bank_api_memory_banks__memory_bank_id__compact_post", + "parameters": [ + { + "in": "path", + "name": "memory_bank_id", + "required": true, + "schema": { + "title": "Memory Bank Id", + "type": "string" + } + }, + { + "$ref": "#/components/parameters/X-Account-Id" + } + ], + "responses": { + "202": { + "content": { + "application/json": { + "schema": { + "additionalProperties": true, + "title": "Response Compact Memory Bank Api Memory Banks Memory Bank Id Compact Post", + "type": "object" + } + } + }, + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "Compact Memory Bank", + "tags": [ + "memory_banks" + ] + } + }, + "/memory_banks/{memory_bank_id}/source": { "delete": { - "description": "Soft-delete a memory bank. This action is permanent and cannot be undone.\n\nThe linked content source and all stored conversation memory entries will also be removed.", - "operationId": "delete_memory_bank_api_memory_banks__memory_bank_id__delete", + "description": "Delete the content source linked to a memory bank, removing all stored memory entries.\n\nA new content source is automatically created on the next write. Use this to reset a bank's data without deleting the bank itself.", + "operationId": "delete_memory_bank_source_api_memory_banks__memory_bank_id__source_delete", "parameters": [ { "in": "path", @@ -11931,14 +12947,16 @@ "description": "Validation Error" } }, - "summary": "Delete Memory Bank", + "summary": "Delete Memory Bank Source", "tags": [ "memory_banks" ] - }, + } + }, + "/memory_banks/{memory_bank_id}/stats": { "get": { - "description": "Fetch a memory bank by ID.\n\nAuth & scoping:\n- Requires `X-API-Key` header or OAuth Bearer token. You can only access memory banks belonging to your account.", - "operationId": "get_memory_bank_api_memory_banks__memory_bank_id__get", + "description": "Return aggregated entry statistics for a memory bank, including total counts, token/age/entries-per-key distributions (avg, p95, min, max), and top conversation keys, group keys, speakers, and tags. Supports time-range filtering via `days`, `start_date`, and `end_date` query parameters.", + "operationId": "get_memory_bank_entry_stats_api_memory_banks__memory_bank_id__stats_get", "parameters": [ { "in": "path", @@ -11949,6 +12967,52 @@ "type": "string" } }, + { + "in": "query", + "name": "days", + "required": false, + "schema": { + "default": 30, + "maximum": 730, + "minimum": 1, + "title": "Days", + "type": "integer" + } + }, + { + "in": "query", + "name": "start_date", + "required": false, + "schema": { + "anyOf": [ + { + "format": "date", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Start Date" + } + }, + { + "in": "query", + "name": "end_date", + "required": false, + "schema": { + "anyOf": [ + { + "format": "date", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "End Date" + } + }, { "$ref": "#/components/parameters/X-Account-Id" } @@ -11958,7 +13022,9 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MemoryBankResponseModel" + "additionalProperties": true, + "title": "Response Get Memory Bank Entry Stats Api Memory Banks Memory Bank Id Stats Get", + "type": "object" } } }, @@ -11975,14 +13041,16 @@ "description": "Validation Error" } }, - "summary": "Get Memory Bank", + "summary": "Get Memory Bank Entry Stats", "tags": [ "memory_banks" ] - }, - "put": { - "description": "Update a memory bank's configuration. Only provided fields are changed; omitted fields are left unchanged.\n\nNote: the embedding `mode` cannot be changed after creation because it determines the vector dimensions used to store entries.", - "operationId": "update_memory_bank_api_memory_banks__memory_bank_id__put", + } + }, + "/memory_banks/{memory_bank_id}/test-compaction": { + "post": { + "description": "Test a compaction prompt by running the summarizer and evaluating the result with an LLM-as-judge. Returns original entries, compaction summary, surviving entries, and a structured quality evaluation with verdict, score, and reasoning.", + "operationId": "test_compaction_prompt_api_memory_banks__memory_bank_id__test_compaction_post", "parameters": [ { "in": "path", @@ -12001,7 +13069,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateMemoryBankBody" + "$ref": "#/components/schemas/TestCompactionRequest" } } }, @@ -12012,7 +13080,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MemoryBankResponseModel" + "$ref": "#/components/schemas/CompactionTestResponseModel" } } }, @@ -12029,24 +13097,69 @@ "description": "Validation Error" } }, - "summary": "Update Memory Bank", + "summary": "Test Compaction Prompt", "tags": [ "memory_banks" ] } }, - "/memory_banks/{memory_bank_id}/agents": { + "/models": { "get": { - "description": "List agents whose current definition references this memory bank.\n\nReturns an array of `{agent_id, agent_name}` objects.", - "operationId": "get_agents_using_bank_api_memory_banks__memory_bank_id__agents_get", + "description": "List all enabled LLM models with full details.\n\nReturns models grouped by provider, including capabilities, credit pricing, tool support, variant tiers, and lifecycle status.\n\nOptional query parameters:\n- `provider`: filter by provider (e.g. 'anthropic', 'openai')\n- `supports_tool_use`: filter to models with tool calling support\n- `supports_thinking`: filter to models with extended thinking support\n\nAuth & scoping:\n- Requires `X-API-Key` header or OAuth Bearer token.", + "operationId": "list_models_api_models_get", "parameters": [ { - "in": "path", - "name": "memory_bank_id", - "required": true, + "description": "Filter by provider name", + "in": "query", + "name": "provider", + "required": false, "schema": { - "title": "Memory Bank Id", - "type": "string" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Filter by provider name", + "title": "Provider" + } + }, + { + "description": "Filter to models that support tool use", + "in": "query", + "name": "supports_tool_use", + "required": false, + "schema": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "description": "Filter to models that support tool use", + "title": "Supports Tool Use" + } + }, + { + "description": "Filter to models that support extended thinking", + "in": "query", + "name": "supports_thinking", + "required": false, + "schema": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "description": "Filter to models that support extended thinking", + "title": "Supports Thinking" } }, { @@ -12059,94 +13172,189 @@ "application/json": { "schema": { "items": { - "additionalProperties": { - "type": "string" - }, - "type": "object" + "$ref": "#/components/schemas/schemas__model_responses__ProviderGroupResponse" }, - "title": "Response Get Agents Using Bank Api Memory Banks Memory Bank Id Agents Get", + "title": "Response List Models Api Models Get", "type": "array" } } }, "description": "Successful Response" - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - }, - "description": "Validation Error" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "List Models", + "tags": [ + "models" + ] + } + }, + "/models/alerts": { + "get": { + "description": "List model lifecycle alerts for the account.\n\nReturns in-app notifications about model deprecations, sunsets, and newer model availability. Supports filtering by agent, unread-only, and pagination.\n\nAuth & scoping:\n- Requires `X-API-Key` header or OAuth Bearer token. Alerts are scoped to the caller's account.", + "operationId": "list_alerts_api_models_alerts_get", + "parameters": [ + { + "description": "Filter alerts to a specific agent UUID.", + "in": "query", + "name": "agent_id", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Filter alerts to a specific agent UUID.", + "title": "Agent Id" + } + }, + { + "description": "When true, only return unread alerts.", + "in": "query", + "name": "unread_only", + "required": false, + "schema": { + "default": false, + "description": "When true, only return unread alerts.", + "title": "Unread Only", + "type": "boolean" + } + }, + { + "description": "Maximum number of alerts to return (1-100).", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "default": 50, + "description": "Maximum number of alerts to return (1-100).", + "maximum": 100, + "minimum": 1, + "title": "Limit", + "type": "integer" + } + }, + { + "description": "Pagination offset.", + "in": "query", + "name": "offset", + "required": false, + "schema": { + "default": 0, + "description": "Pagination offset.", + "minimum": 0, + "title": "Offset", + "type": "integer" + } + }, + { + "$ref": "#/components/parameters/X-Account-Id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "additionalProperties": true, + "title": "Response List Alerts Api Models Alerts Get", + "type": "object" + } + } + }, + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "List Alerts", + "tags": [ + "models" + ] + } + }, + "/models/alerts/mark-all-read": { + "post": { + "description": "Mark all model lifecycle alerts as read for the account.\n\nAuth & scoping:\n- Requires `X-API-Key` header or OAuth Bearer token. Scoped to the caller's account.", + "operationId": "mark_all_read_api_models_alerts_mark_all_read_post", + "parameters": [ + { + "$ref": "#/components/parameters/X-Account-Id" + } + ], + "responses": { + "204": { + "description": "Successful Response" } }, - "summary": "Get Agents Using Bank", + "summary": "Mark All Read", "tags": [ - "memory_banks" + "models" ] } }, - "/memory_banks/{memory_bank_id}/compact": { - "post": { - "description": "Trigger an on-demand compaction run for a memory bank.\n\nThe bank must have at least one compaction threshold configured (max_age_days, max_turns, or max_size_tokens). Compaction runs asynchronously \u2014 the response confirms scheduling, not completion.", - "operationId": "compact_memory_bank_api_memory_banks__memory_bank_id__compact_post", + "/models/alerts/unread-count": { + "get": { + "description": "Get the count of unread model lifecycle alerts.\n\nUseful for badge indicators in UIs and dashboards.\n\nAuth & scoping:\n- Requires `X-API-Key` header or OAuth Bearer token. Count is scoped to the caller's account.", + "operationId": "get_alert_unread_count_api_models_alerts_unread_count_get", "parameters": [ - { - "in": "path", - "name": "memory_bank_id", - "required": true, - "schema": { - "title": "Memory Bank Id", - "type": "string" - } - }, { "$ref": "#/components/parameters/X-Account-Id" } ], "responses": { - "202": { + "200": { "content": { "application/json": { "schema": { "additionalProperties": true, - "title": "Response Compact Memory Bank Api Memory Banks Memory Bank Id Compact Post", + "title": "Response Get Alert Unread Count Api Models Alerts Unread Count Get", "type": "object" } } }, "description": "Successful Response" - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - }, - "description": "Validation Error" } }, - "summary": "Compact Memory Bank", + "summary": "Get Alert Unread Count", "tags": [ - "memory_banks" + "models" ] } }, - "/memory_banks/{memory_bank_id}/source": { - "delete": { - "description": "Delete the content source linked to a memory bank, removing all stored memory entries.\n\nA new content source is automatically created on the next write. Use this to reset a bank's data without deleting the bank itself.", - "operationId": "delete_memory_bank_source_api_memory_banks__memory_bank_id__source_delete", + "/models/alerts/{alert_id}/read": { + "patch": { + "description": "Mark a single model lifecycle alert as read (dismissed).\n\nAuth & scoping:\n- Requires `X-API-Key` header or OAuth Bearer token. The alert must belong to the caller's account.", + "operationId": "mark_read_api_models_alerts__alert_id__read_patch", "parameters": [ { "in": "path", - "name": "memory_bank_id", + "name": "alert_id", "required": true, "schema": { - "title": "Memory Bank Id", + "format": "uuid", + "title": "Alert Id", "type": "string" } }, @@ -12169,32 +13377,25 @@ "description": "Validation Error" } }, - "summary": "Delete Memory Bank Source", + "summary": "Mark Read", "tags": [ - "memory_banks" + "models" ] } }, - "/memory_banks/{memory_bank_id}/stats": { + "/models/playground/experiments": { "get": { - "description": "Return aggregated entry statistics for a memory bank, including total counts, token/age/entries-per-key distributions (avg, p95, min, max), and top conversation keys, group keys, speakers, and tags. Supports time-range filtering via `days`, `start_date`, and `end_date` query parameters.", - "operationId": "get_memory_bank_entry_stats_api_memory_banks__memory_bank_id__stats_get", + "description": "List model playground experiments for the account.\n\nReturns a paginated, time-filtered list of experiments ordered by creation date descending.\n\nAuth & scoping:\n- Requires `X-API-Key` header or OAuth Bearer token. Experiments are scoped to the caller's account.", + "operationId": "list_experiments_api_models_playground_experiments_get", "parameters": [ { - "in": "path", - "name": "memory_bank_id", - "required": true, - "schema": { - "title": "Memory Bank Id", - "type": "string" - } - }, - { + "description": "Look-back window in days.", "in": "query", "name": "days", "required": false, "schema": { "default": 30, + "description": "Look-back window in days.", "maximum": 730, "minimum": 1, "title": "Days", @@ -12202,6 +13403,7 @@ } }, { + "description": "Explicit start date (overrides days).", "in": "query", "name": "start_date", "required": false, @@ -12215,10 +13417,12 @@ "type": "null" } ], + "description": "Explicit start date (overrides days).", "title": "Start Date" } }, { + "description": "Explicit end date (overrides days).", "in": "query", "name": "end_date", "required": false, @@ -12232,9 +13436,37 @@ "type": "null" } ], + "description": "Explicit end date (overrides days).", "title": "End Date" } }, + { + "description": "Page size.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "default": 20, + "description": "Page size.", + "maximum": 50, + "minimum": 1, + "title": "Limit", + "type": "integer" + } + }, + { + "description": "Pagination offset.", + "in": "query", + "name": "offset", + "required": false, + "schema": { + "default": 0, + "description": "Pagination offset.", + "minimum": 0, + "title": "Offset", + "type": "integer" + } + }, { "$ref": "#/components/parameters/X-Account-Id" } @@ -12245,7 +13477,7 @@ "application/json": { "schema": { "additionalProperties": true, - "title": "Response Get Memory Bank Entry Stats Api Memory Banks Memory Bank Id Stats Get", + "title": "Response List Experiments Api Models Playground Experiments Get", "type": "object" } } @@ -12263,26 +13495,15 @@ "description": "Validation Error" } }, - "summary": "Get Memory Bank Entry Stats", + "summary": "List Experiments", "tags": [ - "memory_banks" + "models" ] - } - }, - "/memory_banks/{memory_bank_id}/test-compaction": { + }, "post": { - "description": "Test a compaction prompt by running the summarizer and evaluating the result with an LLM-as-judge. Returns original entries, compaction summary, surviving entries, and a structured quality evaluation with verdict, score, and reasoning.", - "operationId": "test_compaction_prompt_api_memory_banks__memory_bank_id__test_compaction_post", + "description": "Create and schedule a model playground experiment.\n\nRuns the given prompt against 1-10 models in parallel and optionally evaluates the outputs with an LLM judge.\n\nAuth & scoping:\n- Requires `X-API-Key` header or OAuth Bearer token.", + "operationId": "create_experiment_api_models_playground_experiments_post", "parameters": [ - { - "in": "path", - "name": "memory_bank_id", - "required": true, - "schema": { - "title": "Memory Bank Id", - "type": "string" - } - }, { "$ref": "#/components/parameters/X-Account-Id" } @@ -12291,7 +13512,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TestCompactionRequest" + "$ref": "#/components/schemas/PlaygroundCreateRequest" } } }, @@ -12302,7 +13523,9 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CompactionTestResponseModel" + "additionalProperties": true, + "title": "Response Create Experiment Api Models Playground Experiments Post", + "type": "object" } } }, @@ -12319,72 +13542,25 @@ "description": "Validation Error" } }, - "summary": "Test Compaction Prompt", + "summary": "Create Experiment", "tags": [ - "memory_banks" + "models" ] } }, - "/models/alerts": { + "/models/playground/experiments/{experiment_id}": { "get": { - "description": "List model lifecycle alerts for the account.\n\nReturns in-app notifications about model deprecations, sunsets, and newer model availability. Supports filtering by agent, unread-only, and pagination.\n\nAuth & scoping:\n- Requires `X-API-Key` header or OAuth Bearer token. Alerts are scoped to the caller's account.", - "operationId": "list_alerts_api_models_alerts_get", + "description": "Get details and results for a specific model playground experiment.\n\nReturns the full experiment payload including prompt, model outputs, and evaluation results (if available).\n\nAuth & scoping:\n- Requires `X-API-Key` header or OAuth Bearer token. The experiment must belong to the caller's account.", + "operationId": "get_experiment_api_models_playground_experiments__experiment_id__get", "parameters": [ { - "description": "Filter alerts to a specific agent UUID.", - "in": "query", - "name": "agent_id", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "Filter alerts to a specific agent UUID.", - "title": "Agent Id" - } - }, - { - "description": "When true, only return unread alerts.", - "in": "query", - "name": "unread_only", - "required": false, - "schema": { - "default": false, - "description": "When true, only return unread alerts.", - "title": "Unread Only", - "type": "boolean" - } - }, - { - "description": "Maximum number of alerts to return (1-100).", - "in": "query", - "name": "limit", - "required": false, - "schema": { - "default": 50, - "description": "Maximum number of alerts to return (1-100).", - "maximum": 100, - "minimum": 1, - "title": "Limit", - "type": "integer" - } - }, - { - "description": "Pagination offset.", - "in": "query", - "name": "offset", - "required": false, + "in": "path", + "name": "experiment_id", + "required": true, "schema": { - "default": 0, - "description": "Pagination offset.", - "minimum": 0, - "title": "Offset", - "type": "integer" + "format": "uuid", + "title": "Experiment Id", + "type": "string" } }, { @@ -12397,7 +13573,7 @@ "application/json": { "schema": { "additionalProperties": true, - "title": "Response List Alerts Api Models Alerts Get", + "title": "Response Get Experiment Api Models Playground Experiments Experiment Id Get", "type": "object" } } @@ -12415,37 +13591,27 @@ "description": "Validation Error" } }, - "summary": "List Alerts", + "summary": "Get Experiment", "tags": [ "models" ] } }, - "/models/alerts/mark-all-read": { + "/models/playground/experiments/{experiment_id}/cancel": { "post": { - "description": "Mark all model lifecycle alerts as read for the account.\n\nAuth & scoping:\n- Requires `X-API-Key` header or OAuth Bearer token. Scoped to the caller's account.", - "operationId": "mark_all_read_api_models_alerts_mark_all_read_post", + "description": "Cancel a running or pending model playground experiment.\n\nSignals running model calls to abort and marks the experiment as canceled.\n\nAuth & scoping:\n- Requires `X-API-Key` header or OAuth Bearer token. The experiment must belong to the caller's account.", + "operationId": "cancel_experiment_endpoint_api_models_playground_experiments__experiment_id__cancel_post", "parameters": [ { - "$ref": "#/components/parameters/X-Account-Id" - } - ], - "responses": { - "204": { - "description": "Successful Response" - } - }, - "summary": "Mark All Read", - "tags": [ - "models" - ] - } - }, - "/models/alerts/unread-count": { - "get": { - "description": "Get the count of unread model lifecycle alerts.\n\nUseful for badge indicators in UIs and dashboards.\n\nAuth & scoping:\n- Requires `X-API-Key` header or OAuth Bearer token. Count is scoped to the caller's account.", - "operationId": "get_alert_unread_count_api_models_alerts_unread_count_get", - "parameters": [ + "in": "path", + "name": "experiment_id", + "required": true, + "schema": { + "format": "uuid", + "title": "Experiment Id", + "type": "string" + } + }, { "$ref": "#/components/parameters/X-Account-Id" } @@ -12456,32 +13622,41 @@ "application/json": { "schema": { "additionalProperties": true, - "title": "Response Get Alert Unread Count Api Models Alerts Unread Count Get", + "title": "Response Cancel Experiment Endpoint Api Models Playground Experiments Experiment Id Cancel Post", "type": "object" } } }, "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" } }, - "summary": "Get Alert Unread Count", + "summary": "Cancel Experiment Endpoint", "tags": [ "models" ] } }, - "/models/alerts/{alert_id}/read": { - "patch": { - "description": "Mark a single model lifecycle alert as read (dismissed).\n\nAuth & scoping:\n- Requires `X-API-Key` header or OAuth Bearer token. The alert must belong to the caller's account.", - "operationId": "mark_read_api_models_alerts__alert_id__read_patch", + "/models/{model_id}/details": { + "get": { + "description": "Get detailed information about a specific model.\n\nReturns full model details including capabilities, credit pricing, tool support, variant tiers, and lifecycle status.\n\nThe `model_id` is the model enum identifier (e.g. 'anthropic_claude_opus_4_6').\n\nAuth & scoping:\n- Requires `X-API-Key` header or OAuth Bearer token.", + "operationId": "get_model_api_models__model_id__details_get", "parameters": [ { "in": "path", - "name": "alert_id", + "name": "model_id", "required": true, "schema": { - "format": "uuid", - "title": "Alert Id", + "title": "Model Id", "type": "string" } }, @@ -12490,7 +13665,14 @@ } ], "responses": { - "204": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/schemas__model_responses__PromptModelResponse" + } + } + }, "description": "Successful Response" }, "422": { @@ -12504,7 +13686,7 @@ "description": "Validation Error" } }, - "summary": "Mark Read", + "summary": "Get Model", "tags": [ "models" ] @@ -13816,7 +14998,7 @@ }, "/sources": { "post": { - "description": "Create a new content source.\n\nSource types: `rss`, `website`, `file_uploads`, `custom_index`.\n\nFor RSS and website sources, provide the URL. For file upload and custom index sources, the URL is created automatically.", + "description": "Create a new content source.\n\nSource types: `rss`, `website`, `custom_index`.\n\nFor RSS and website sources, provide the URL. For custom index sources, the URL is created automatically.\n\nFor custom_index sources, you can optionally specify an `index_mode`: `fast_and_cheap` (default), `balanced`, `slow_and_thorough`, or `custom`. The legacy `file_uploads` source type is accepted as an alias for `custom_index` with `index_mode=fast_and_cheap`.", "operationId": "create_source_api_sources_post", "parameters": [ { @@ -13866,7 +15048,7 @@ }, "/sources/": { "get": { - "description": "List content sources for your account.\n\nA *source* is where Seclai pulls or receives content from (for example RSS feeds, websites, file uploads, or custom indexes). Sources are the inputs that power your agents and knowledge base workflows.\n\nParameters:\n- Pagination: `page` and `limit`.\n- Sorting: `sort` (created_at/updated_at/name) and `order` (asc/desc).\n\nAuth & scoping:\n- Requires `X-API-Key` header or OAuth Bearer token. Results are scoped to the caller's account.\n- The optional `account_id` query param is only allowed when it matches the caller's account.", + "description": "List content sources for your account.\n\nA *source* is where Seclai pulls or receives content from \u2014 RSS feeds, websites, or content stores (``custom_index``). Content stores support file uploads and API-driven content ingestion with configurable index modes (``fast_and_cheap``, ``balanced``, ``slow_and_thorough``, or ``custom``).\n\nParameters:\n- Pagination: `page` and `limit`.\n- Sorting: `sort` (created_at/updated_at/name) and `order` (asc/desc).\n\nAuth & scoping:\n- Requires `X-API-Key` header or OAuth Bearer token. Results are scoped to the caller's account.\n- The optional `account_id` query param is only allowed when it matches the caller's account.", "operationId": "list_sources_api_sources__get", "parameters": [ { @@ -14727,7 +15909,7 @@ }, "/sources/{source_connection_id}/upload": { "post": { - "description": "Upload a file to a content source.\n\n**Maximum file size:** 209715200 bytes.\n\n**Supported MIME types:**\n- `application/epub+zip`\n- `application/json`\n- `application/msword`\n- `application/pdf`\n- `application/vnd.ms-excel`\n- `application/vnd.ms-outlook`\n- `application/vnd.ms-powerpoint`\n- `application/vnd.openxmlformats-officedocument.presentationml.presentation`\n- `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`\n- `application/vnd.openxmlformats-officedocument.wordprocessingml.document`\n- `application/xml`\n- `application/zip`\n- `audio/flac`\n- `audio/mp4`\n- `audio/mpeg`\n- `audio/ogg`\n- `audio/wav`\n- `image/bmp`\n- `image/gif`\n- `image/jpeg`\n- `image/png`\n- `image/tiff`\n- `image/webp`\n- `text/csv`\n- `text/html`\n- `text/markdown`\n- `text/plain`\n- `text/x-markdown`\n- `text/xml`\n- `video/mp4`\n- `video/quicktime`\n- `video/x-msvideo`\n\nNotes:\n- If the uploaded file's content type is `application/octet-stream`, the server attempts to infer the type from the file extension.\n- Use `metadata` to attach an arbitrary JSON object of metadata (for example `metadata={\"author\":\"Ada\",\"category\":\"docs\"}`).\n- `title` is a convenience field and is merged into the metadata as `metadata.title` (it does not override an existing `metadata.title`).\n- For backwards compatibility, you can also pass form fields named `metadata_` (for example `metadata_author=...`). These override keys from `metadata`.\n\nResponse:\n- `status` is `uploaded` for a new upload, or `duplicate` when the same file already exists for this source.", + "description": "Upload a file to a content source.\n\n**Maximum file size:** 209715200 bytes.\n\n**Supported MIME types:**\n- `application/epub+zip`\n- `application/json`\n- `application/pdf`\n- `application/vnd.ms-excel`\n- `application/vnd.ms-outlook`\n- `application/vnd.ms-powerpoint`\n- `application/vnd.openxmlformats-officedocument.presentationml.presentation`\n- `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`\n- `application/vnd.openxmlformats-officedocument.wordprocessingml.document`\n- `application/xml`\n- `application/zip`\n- `audio/flac`\n- `audio/mp4`\n- `audio/mpeg`\n- `audio/ogg`\n- `audio/wav`\n- `image/bmp`\n- `image/gif`\n- `image/jpeg`\n- `image/png`\n- `image/tiff`\n- `image/webp`\n- `text/csv`\n- `text/html`\n- `text/markdown`\n- `text/plain`\n- `text/x-markdown`\n- `text/xml`\n- `video/mp4`\n- `video/quicktime`\n- `video/x-msvideo`\n\nNotes:\n- If the uploaded file's content type is `application/octet-stream`, the server attempts to infer the type from the file extension.\n- Use `metadata` to attach an arbitrary JSON object of metadata (for example `metadata={\"author\":\"Ada\",\"category\":\"docs\"}`).\n- `title` is a convenience field and is merged into the metadata as `metadata.title` (it does not override an existing `metadata.title`).\n- For backwards compatibility, you can also pass form fields named `metadata_` (for example `metadata_author=...`). These override keys from `metadata`.\n\nResponse:\n- `status` is `uploaded` for a new upload, or `duplicate` when the same file already exists for this source.", "operationId": "upload_file_to_source_api_sources__source_connection_id__upload_post", "parameters": [ { diff --git a/seclai/_generated/api/agent_evaluations/create_evaluation_criteria_api_agents_agent_id_evaluation_criteria_post.py b/seclai/_generated/api/agent_evaluations/create_evaluation_criteria_api_agents_agent_id_evaluation_criteria_post.py index 70e2e11..ecb7cc2 100644 --- a/seclai/_generated/api/agent_evaluations/create_evaluation_criteria_api_agents_agent_id_evaluation_criteria_post.py +++ b/seclai/_generated/api/agent_evaluations/create_evaluation_criteria_api_agents_agent_id_evaluation_criteria_post.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -16,7 +17,7 @@ def _get_kwargs( agent_id: str, *, body: CreateEvaluationCriteriaRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -72,7 +73,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: CreateEvaluationCriteriaRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[EvaluationCriteriaResponse | HTTPValidationError]: """Create Evaluation Criteria @@ -83,7 +84,7 @@ def sync_detailed( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (CreateEvaluationCriteriaRequest): Request body for creating an evaluation criteria. The evaluation mode, retry settings, and sample frequency are set at the @@ -115,7 +116,7 @@ def sync( *, client: AuthenticatedClient | Client, body: CreateEvaluationCriteriaRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> EvaluationCriteriaResponse | HTTPValidationError | None: """Create Evaluation Criteria @@ -126,7 +127,7 @@ def sync( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (CreateEvaluationCriteriaRequest): Request body for creating an evaluation criteria. The evaluation mode, retry settings, and sample frequency are set at the @@ -153,7 +154,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: CreateEvaluationCriteriaRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[EvaluationCriteriaResponse | HTTPValidationError]: """Create Evaluation Criteria @@ -164,7 +165,7 @@ async def asyncio_detailed( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (CreateEvaluationCriteriaRequest): Request body for creating an evaluation criteria. The evaluation mode, retry settings, and sample frequency are set at the @@ -194,7 +195,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: CreateEvaluationCriteriaRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> EvaluationCriteriaResponse | HTTPValidationError | None: """Create Evaluation Criteria @@ -205,7 +206,7 @@ async def asyncio( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (CreateEvaluationCriteriaRequest): Request body for creating an evaluation criteria. The evaluation mode, retry settings, and sample frequency are set at the diff --git a/seclai/_generated/api/agent_evaluations/create_evaluation_result_api_agents_evaluation_criteria_criteria_id_results_post.py b/seclai/_generated/api/agent_evaluations/create_evaluation_result_api_agents_evaluation_criteria_criteria_id_results_post.py index b50797e..bfdbb66 100644 --- a/seclai/_generated/api/agent_evaluations/create_evaluation_result_api_agents_evaluation_criteria_criteria_id_results_post.py +++ b/seclai/_generated/api/agent_evaluations/create_evaluation_result_api_agents_evaluation_criteria_criteria_id_results_post.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -16,7 +17,7 @@ def _get_kwargs( criteria_id: str, *, body: CreateEvaluationResultRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -72,7 +73,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: CreateEvaluationResultRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[EvaluationResultResponse | HTTPValidationError]: """Create Evaluation Result @@ -84,7 +85,7 @@ def sync_detailed( Args: criteria_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (CreateEvaluationResultRequest): Request body for recording an evaluation result. Raises: @@ -113,7 +114,7 @@ def sync( *, client: AuthenticatedClient | Client, body: CreateEvaluationResultRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> EvaluationResultResponse | HTTPValidationError | None: """Create Evaluation Result @@ -125,7 +126,7 @@ def sync( Args: criteria_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (CreateEvaluationResultRequest): Request body for recording an evaluation result. Raises: @@ -149,7 +150,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: CreateEvaluationResultRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[EvaluationResultResponse | HTTPValidationError]: """Create Evaluation Result @@ -161,7 +162,7 @@ async def asyncio_detailed( Args: criteria_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (CreateEvaluationResultRequest): Request body for recording an evaluation result. Raises: @@ -188,7 +189,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: CreateEvaluationResultRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> EvaluationResultResponse | HTTPValidationError | None: """Create Evaluation Result @@ -200,7 +201,7 @@ async def asyncio( Args: criteria_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (CreateEvaluationResultRequest): Request body for recording an evaluation result. Raises: diff --git a/seclai/_generated/api/agent_evaluations/delete_evaluation_criteria_api_agents_evaluation_criteria_criteria_id_delete.py b/seclai/_generated/api/agent_evaluations/delete_evaluation_criteria_api_agents_evaluation_criteria_criteria_id_delete.py index 817438c..a5c1c26 100644 --- a/seclai/_generated/api/agent_evaluations/delete_evaluation_criteria_api_agents_evaluation_criteria_criteria_id_delete.py +++ b/seclai/_generated/api/agent_evaluations/delete_evaluation_criteria_api_agents_evaluation_criteria_criteria_id_delete.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any, cast from urllib.parse import quote +from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( criteria_id: str, *, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -63,7 +64,7 @@ def sync_detailed( criteria_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Delete Evaluation Criteria @@ -74,7 +75,7 @@ def sync_detailed( Args: criteria_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -100,7 +101,7 @@ def sync( criteria_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Delete Evaluation Criteria @@ -111,7 +112,7 @@ def sync( Args: criteria_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -132,7 +133,7 @@ async def asyncio_detailed( criteria_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Delete Evaluation Criteria @@ -143,7 +144,7 @@ async def asyncio_detailed( Args: criteria_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -167,7 +168,7 @@ async def asyncio( criteria_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Delete Evaluation Criteria @@ -178,7 +179,7 @@ async def asyncio( Args: criteria_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/agent_evaluations/get_evaluation_criteria_api_agents_evaluation_criteria_criteria_id_get.py b/seclai/_generated/api/agent_evaluations/get_evaluation_criteria_api_agents_evaluation_criteria_criteria_id_get.py index 3c2afa6..aa062f8 100644 --- a/seclai/_generated/api/agent_evaluations/get_evaluation_criteria_api_agents_evaluation_criteria_criteria_id_get.py +++ b/seclai/_generated/api/agent_evaluations/get_evaluation_criteria_api_agents_evaluation_criteria_criteria_id_get.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -14,7 +15,7 @@ def _get_kwargs( criteria_id: str, *, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -65,7 +66,7 @@ def sync_detailed( criteria_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[EvaluationCriteriaResponse | HTTPValidationError]: """Get Evaluation Criteria @@ -76,7 +77,7 @@ def sync_detailed( Args: criteria_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -102,7 +103,7 @@ def sync( criteria_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> EvaluationCriteriaResponse | HTTPValidationError | None: """Get Evaluation Criteria @@ -113,7 +114,7 @@ def sync( Args: criteria_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -134,7 +135,7 @@ async def asyncio_detailed( criteria_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[EvaluationCriteriaResponse | HTTPValidationError]: """Get Evaluation Criteria @@ -145,7 +146,7 @@ async def asyncio_detailed( Args: criteria_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -169,7 +170,7 @@ async def asyncio( criteria_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> EvaluationCriteriaResponse | HTTPValidationError | None: """Get Evaluation Criteria @@ -180,7 +181,7 @@ async def asyncio( Args: criteria_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/agent_evaluations/get_evaluation_summary_api_agents_evaluation_criteria_criteria_id_summary_get.py b/seclai/_generated/api/agent_evaluations/get_evaluation_summary_api_agents_evaluation_criteria_criteria_id_summary_get.py index 3d9bbf9..98e5f27 100644 --- a/seclai/_generated/api/agent_evaluations/get_evaluation_summary_api_agents_evaluation_criteria_criteria_id_summary_get.py +++ b/seclai/_generated/api/agent_evaluations/get_evaluation_summary_api_agents_evaluation_criteria_criteria_id_summary_get.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -14,7 +15,7 @@ def _get_kwargs( criteria_id: str, *, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -65,7 +66,7 @@ def sync_detailed( criteria_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[EvaluationResultSummaryResponse | HTTPValidationError]: """Get Evaluation Summary @@ -76,7 +77,7 @@ def sync_detailed( Args: criteria_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -102,7 +103,7 @@ def sync( criteria_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> EvaluationResultSummaryResponse | HTTPValidationError | None: """Get Evaluation Summary @@ -113,7 +114,7 @@ def sync( Args: criteria_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -134,7 +135,7 @@ async def asyncio_detailed( criteria_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[EvaluationResultSummaryResponse | HTTPValidationError]: """Get Evaluation Summary @@ -145,7 +146,7 @@ async def asyncio_detailed( Args: criteria_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -169,7 +170,7 @@ async def asyncio( criteria_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> EvaluationResultSummaryResponse | HTTPValidationError | None: """Get Evaluation Summary @@ -180,7 +181,7 @@ async def asyncio( Args: criteria_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/agent_evaluations/get_non_manual_evaluation_summary_api_agents_evaluation_results_non_manual_summary_get.py b/seclai/_generated/api/agent_evaluations/get_non_manual_evaluation_summary_api_agents_evaluation_results_non_manual_summary_get.py index 31f6ef4..1ac2c80 100644 --- a/seclai/_generated/api/agent_evaluations/get_non_manual_evaluation_summary_api_agents_evaluation_results_non_manual_summary_get.py +++ b/seclai/_generated/api/agent_evaluations/get_non_manual_evaluation_summary_api_agents_evaluation_results_non_manual_summary_get.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from uuid import UUID import httpx @@ -17,7 +18,7 @@ def _get_kwargs( days: int | Unset = 30, start_date: None | str | Unset = UNSET, end_date: None | str | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -89,7 +90,7 @@ def sync_detailed( days: int | Unset = 30, start_date: None | str | Unset = UNSET, end_date: None | str | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | NonManualEvaluationSummaryResponse]: """Get Non Manual Evaluation Summary @@ -102,7 +103,7 @@ def sync_detailed( days (int | Unset): Default: 30. start_date (None | str | Unset): end_date (None | str | Unset): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -132,7 +133,7 @@ def sync( days: int | Unset = 30, start_date: None | str | Unset = UNSET, end_date: None | str | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | NonManualEvaluationSummaryResponse | None: """Get Non Manual Evaluation Summary @@ -145,7 +146,7 @@ def sync( days (int | Unset): Default: 30. start_date (None | str | Unset): end_date (None | str | Unset): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -170,7 +171,7 @@ async def asyncio_detailed( days: int | Unset = 30, start_date: None | str | Unset = UNSET, end_date: None | str | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | NonManualEvaluationSummaryResponse]: """Get Non Manual Evaluation Summary @@ -183,7 +184,7 @@ async def asyncio_detailed( days (int | Unset): Default: 30. start_date (None | str | Unset): end_date (None | str | Unset): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -211,7 +212,7 @@ async def asyncio( days: int | Unset = 30, start_date: None | str | Unset = UNSET, end_date: None | str | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | NonManualEvaluationSummaryResponse | None: """Get Non Manual Evaluation Summary @@ -224,7 +225,7 @@ async def asyncio( days (int | Unset): Default: 30. start_date (None | str | Unset): end_date (None | str | Unset): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/agent_evaluations/list_agent_evaluation_results_api_agents_agent_id_evaluation_results_get.py b/seclai/_generated/api/agent_evaluations/list_agent_evaluation_results_api_agents_agent_id_evaluation_results_get.py index 194b68e..ffdc855 100644 --- a/seclai/_generated/api/agent_evaluations/list_agent_evaluation_results_api_agents_agent_id_evaluation_results_get.py +++ b/seclai/_generated/api/agent_evaluations/list_agent_evaluation_results_api_agents_agent_id_evaluation_results_get.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -23,7 +24,7 @@ def _get_kwargs( time_to: None | str | Unset = UNSET, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -122,7 +123,7 @@ def sync_detailed( time_to: None | str | Unset = UNSET, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[EvaluationResultWithCriteriaListResponse | HTTPValidationError]: """List Agent Evaluation Results @@ -140,7 +141,7 @@ def sync_detailed( time_to (None | str | Unset): page (int | Unset): Default: 1. limit (int | Unset): Default: 20. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -180,7 +181,7 @@ def sync( time_to: None | str | Unset = UNSET, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> EvaluationResultWithCriteriaListResponse | HTTPValidationError | None: """List Agent Evaluation Results @@ -198,7 +199,7 @@ def sync( time_to (None | str | Unset): page (int | Unset): Default: 1. limit (int | Unset): Default: 20. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -233,7 +234,7 @@ async def asyncio_detailed( time_to: None | str | Unset = UNSET, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[EvaluationResultWithCriteriaListResponse | HTTPValidationError]: """List Agent Evaluation Results @@ -251,7 +252,7 @@ async def asyncio_detailed( time_to (None | str | Unset): page (int | Unset): Default: 1. limit (int | Unset): Default: 20. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -289,7 +290,7 @@ async def asyncio( time_to: None | str | Unset = UNSET, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> EvaluationResultWithCriteriaListResponse | HTTPValidationError | None: """List Agent Evaluation Results @@ -307,7 +308,7 @@ async def asyncio( time_to (None | str | Unset): page (int | Unset): Default: 1. limit (int | Unset): Default: 20. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/agent_evaluations/list_compatible_runs_api_agents_evaluation_criteria_criteria_id_compatible_runs_get.py b/seclai/_generated/api/agent_evaluations/list_compatible_runs_api_agents_evaluation_criteria_criteria_id_compatible_runs_get.py index d66514d..8b3a9de 100644 --- a/seclai/_generated/api/agent_evaluations/list_compatible_runs_api_agents_evaluation_criteria_criteria_id_compatible_runs_get.py +++ b/seclai/_generated/api/agent_evaluations/list_compatible_runs_api_agents_evaluation_criteria_criteria_id_compatible_runs_get.py @@ -2,6 +2,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -18,7 +19,7 @@ def _get_kwargs( page: int | Unset = 1, limit: int | Unset = 20, started_after: datetime.datetime | None | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -90,7 +91,7 @@ def sync_detailed( page: int | Unset = 1, limit: int | Unset = 20, started_after: datetime.datetime | None | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[CompatibleRunListResponse | HTTPValidationError]: """List Compatible Runs @@ -104,7 +105,7 @@ def sync_detailed( page (int | Unset): Default: 1. limit (int | Unset): Default: 20. started_after (datetime.datetime | None | Unset): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -136,7 +137,7 @@ def sync( page: int | Unset = 1, limit: int | Unset = 20, started_after: datetime.datetime | None | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> CompatibleRunListResponse | HTTPValidationError | None: """List Compatible Runs @@ -150,7 +151,7 @@ def sync( page (int | Unset): Default: 1. limit (int | Unset): Default: 20. started_after (datetime.datetime | None | Unset): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -177,7 +178,7 @@ async def asyncio_detailed( page: int | Unset = 1, limit: int | Unset = 20, started_after: datetime.datetime | None | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[CompatibleRunListResponse | HTTPValidationError]: """List Compatible Runs @@ -191,7 +192,7 @@ async def asyncio_detailed( page (int | Unset): Default: 1. limit (int | Unset): Default: 20. started_after (datetime.datetime | None | Unset): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -221,7 +222,7 @@ async def asyncio( page: int | Unset = 1, limit: int | Unset = 20, started_after: datetime.datetime | None | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> CompatibleRunListResponse | HTTPValidationError | None: """List Compatible Runs @@ -235,7 +236,7 @@ async def asyncio( page (int | Unset): Default: 1. limit (int | Unset): Default: 20. started_after (datetime.datetime | None | Unset): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/agent_evaluations/list_evaluation_criteria_api_agents_agent_id_evaluation_criteria_get.py b/seclai/_generated/api/agent_evaluations/list_evaluation_criteria_api_agents_agent_id_evaluation_criteria_get.py index 59dda3d..47f489d 100644 --- a/seclai/_generated/api/agent_evaluations/list_evaluation_criteria_api_agents_agent_id_evaluation_criteria_get.py +++ b/seclai/_generated/api/agent_evaluations/list_evaluation_criteria_api_agents_agent_id_evaluation_criteria_get.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -14,7 +15,7 @@ def _get_kwargs( agent_id: str, *, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -72,7 +73,7 @@ def sync_detailed( agent_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | list[EvaluationCriteriaResponse]]: """List Evaluation Criteria @@ -84,7 +85,7 @@ def sync_detailed( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -110,7 +111,7 @@ def sync( agent_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | list[EvaluationCriteriaResponse] | None: """List Evaluation Criteria @@ -122,7 +123,7 @@ def sync( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -143,7 +144,7 @@ async def asyncio_detailed( agent_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | list[EvaluationCriteriaResponse]]: """List Evaluation Criteria @@ -155,7 +156,7 @@ async def asyncio_detailed( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -179,7 +180,7 @@ async def asyncio( agent_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | list[EvaluationCriteriaResponse] | None: """List Evaluation Criteria @@ -191,7 +192,7 @@ async def asyncio( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/agent_evaluations/list_evaluation_results_api_agents_evaluation_criteria_criteria_id_results_get.py b/seclai/_generated/api/agent_evaluations/list_evaluation_results_api_agents_evaluation_criteria_criteria_id_results_get.py index 80f4271..3f7989f 100644 --- a/seclai/_generated/api/agent_evaluations/list_evaluation_results_api_agents_evaluation_criteria_criteria_id_results_get.py +++ b/seclai/_generated/api/agent_evaluations/list_evaluation_results_api_agents_evaluation_criteria_criteria_id_results_get.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -20,7 +21,7 @@ def _get_kwargs( time_to: None | str | Unset = UNSET, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -109,7 +110,7 @@ def sync_detailed( time_to: None | str | Unset = UNSET, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[EvaluationResultListResponse | HTTPValidationError]: """List Evaluation Results @@ -127,7 +128,7 @@ def sync_detailed( time_to (None | str | Unset): page (int | Unset): Default: 1. limit (int | Unset): Default: 20. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -165,7 +166,7 @@ def sync( time_to: None | str | Unset = UNSET, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> EvaluationResultListResponse | HTTPValidationError | None: """List Evaluation Results @@ -183,7 +184,7 @@ def sync( time_to (None | str | Unset): page (int | Unset): Default: 1. limit (int | Unset): Default: 20. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -216,7 +217,7 @@ async def asyncio_detailed( time_to: None | str | Unset = UNSET, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[EvaluationResultListResponse | HTTPValidationError]: """List Evaluation Results @@ -234,7 +235,7 @@ async def asyncio_detailed( time_to (None | str | Unset): page (int | Unset): Default: 1. limit (int | Unset): Default: 20. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -270,7 +271,7 @@ async def asyncio( time_to: None | str | Unset = UNSET, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> EvaluationResultListResponse | HTTPValidationError | None: """List Evaluation Results @@ -288,7 +289,7 @@ async def asyncio( time_to (None | str | Unset): page (int | Unset): Default: 1. limit (int | Unset): Default: 20. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/agent_evaluations/list_evaluation_runs_api_agents_agent_id_evaluation_runs_get.py b/seclai/_generated/api/agent_evaluations/list_evaluation_runs_api_agents_agent_id_evaluation_runs_get.py index 88beaff..27b49c7 100644 --- a/seclai/_generated/api/agent_evaluations/list_evaluation_runs_api_agents_agent_id_evaluation_runs_get.py +++ b/seclai/_generated/api/agent_evaluations/list_evaluation_runs_api_agents_agent_id_evaluation_runs_get.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -22,7 +23,7 @@ def _get_kwargs( time_to: None | str | Unset = UNSET, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -116,7 +117,7 @@ def sync_detailed( time_to: None | str | Unset = UNSET, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[EvaluationRunSummaryListResponse | HTTPValidationError]: """List Evaluation Runs @@ -133,7 +134,7 @@ def sync_detailed( time_to (None | str | Unset): page (int | Unset): Default: 1. limit (int | Unset): Default: 20. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -171,7 +172,7 @@ def sync( time_to: None | str | Unset = UNSET, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> EvaluationRunSummaryListResponse | HTTPValidationError | None: """List Evaluation Runs @@ -188,7 +189,7 @@ def sync( time_to (None | str | Unset): page (int | Unset): Default: 1. limit (int | Unset): Default: 20. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -221,7 +222,7 @@ async def asyncio_detailed( time_to: None | str | Unset = UNSET, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[EvaluationRunSummaryListResponse | HTTPValidationError]: """List Evaluation Runs @@ -238,7 +239,7 @@ async def asyncio_detailed( time_to (None | str | Unset): page (int | Unset): Default: 1. limit (int | Unset): Default: 20. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -274,7 +275,7 @@ async def asyncio( time_to: None | str | Unset = UNSET, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> EvaluationRunSummaryListResponse | HTTPValidationError | None: """List Evaluation Runs @@ -291,7 +292,7 @@ async def asyncio( time_to (None | str | Unset): page (int | Unset): Default: 1. limit (int | Unset): Default: 20. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/agent_evaluations/list_run_evaluation_results_api_agents_agent_id_runs_run_id_evaluation_results_get.py b/seclai/_generated/api/agent_evaluations/list_run_evaluation_results_api_agents_agent_id_runs_run_id_evaluation_results_get.py index ba4dfb7..af58dc6 100644 --- a/seclai/_generated/api/agent_evaluations/list_run_evaluation_results_api_agents_agent_id_runs_run_id_evaluation_results_get.py +++ b/seclai/_generated/api/agent_evaluations/list_run_evaluation_results_api_agents_agent_id_runs_run_id_evaluation_results_get.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -17,7 +18,7 @@ def _get_kwargs( agent_id: str, run_id: str, *, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -77,7 +78,7 @@ def sync_detailed( run_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | list[EvaluationResultWithCriteriaResponse]]: """List Run Evaluation Results @@ -89,7 +90,7 @@ def sync_detailed( Args: agent_id (str): run_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -117,7 +118,7 @@ def sync( run_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | list[EvaluationResultWithCriteriaResponse] | None: """List Run Evaluation Results @@ -129,7 +130,7 @@ def sync( Args: agent_id (str): run_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -152,7 +153,7 @@ async def asyncio_detailed( run_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | list[EvaluationResultWithCriteriaResponse]]: """List Run Evaluation Results @@ -164,7 +165,7 @@ async def asyncio_detailed( Args: agent_id (str): run_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -190,7 +191,7 @@ async def asyncio( run_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | list[EvaluationResultWithCriteriaResponse] | None: """List Run Evaluation Results @@ -202,7 +203,7 @@ async def asyncio( Args: agent_id (str): run_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/agent_evaluations/test_draft_evaluation_api_agents_agent_id_evaluation_criteria_test_draft_post.py b/seclai/_generated/api/agent_evaluations/test_draft_evaluation_api_agents_agent_id_evaluation_criteria_test_draft_post.py index 436014b..0da5842 100644 --- a/seclai/_generated/api/agent_evaluations/test_draft_evaluation_api_agents_agent_id_evaluation_criteria_test_draft_post.py +++ b/seclai/_generated/api/agent_evaluations/test_draft_evaluation_api_agents_agent_id_evaluation_criteria_test_draft_post.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -16,7 +17,7 @@ def _get_kwargs( agent_id: str, *, body: TestDraftEvaluationRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -72,7 +73,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: TestDraftEvaluationRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | TestDraftEvaluationResponse]: """Test Draft Evaluation @@ -84,7 +85,7 @@ def sync_detailed( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (TestDraftEvaluationRequest): Request body for ephemeral (non-persisted) evaluation testing. @@ -117,7 +118,7 @@ def sync( *, client: AuthenticatedClient | Client, body: TestDraftEvaluationRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | TestDraftEvaluationResponse | None: """Test Draft Evaluation @@ -129,7 +130,7 @@ def sync( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (TestDraftEvaluationRequest): Request body for ephemeral (non-persisted) evaluation testing. @@ -157,7 +158,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: TestDraftEvaluationRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | TestDraftEvaluationResponse]: """Test Draft Evaluation @@ -169,7 +170,7 @@ async def asyncio_detailed( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (TestDraftEvaluationRequest): Request body for ephemeral (non-persisted) evaluation testing. @@ -200,7 +201,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: TestDraftEvaluationRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | TestDraftEvaluationResponse | None: """Test Draft Evaluation @@ -212,7 +213,7 @@ async def asyncio( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (TestDraftEvaluationRequest): Request body for ephemeral (non-persisted) evaluation testing. diff --git a/seclai/_generated/api/agent_evaluations/update_evaluation_criteria_api_agents_evaluation_criteria_criteria_id_patch.py b/seclai/_generated/api/agent_evaluations/update_evaluation_criteria_api_agents_evaluation_criteria_criteria_id_patch.py index 466797f..1dd9224 100644 --- a/seclai/_generated/api/agent_evaluations/update_evaluation_criteria_api_agents_evaluation_criteria_criteria_id_patch.py +++ b/seclai/_generated/api/agent_evaluations/update_evaluation_criteria_api_agents_evaluation_criteria_criteria_id_patch.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -16,7 +17,7 @@ def _get_kwargs( criteria_id: str, *, body: UpdateEvaluationCriteriaRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -72,7 +73,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: UpdateEvaluationCriteriaRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[EvaluationCriteriaResponse | HTTPValidationError]: """Update Evaluation Criteria @@ -84,7 +85,7 @@ def sync_detailed( Args: criteria_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UpdateEvaluationCriteriaRequest): Request body for updating an evaluation criteria. Retry settings and sample frequency are set at the agent level. @@ -115,7 +116,7 @@ def sync( *, client: AuthenticatedClient | Client, body: UpdateEvaluationCriteriaRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> EvaluationCriteriaResponse | HTTPValidationError | None: """Update Evaluation Criteria @@ -127,7 +128,7 @@ def sync( Args: criteria_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UpdateEvaluationCriteriaRequest): Request body for updating an evaluation criteria. Retry settings and sample frequency are set at the agent level. @@ -153,7 +154,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: UpdateEvaluationCriteriaRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[EvaluationCriteriaResponse | HTTPValidationError]: """Update Evaluation Criteria @@ -165,7 +166,7 @@ async def asyncio_detailed( Args: criteria_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UpdateEvaluationCriteriaRequest): Request body for updating an evaluation criteria. Retry settings and sample frequency are set at the agent level. @@ -194,7 +195,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: UpdateEvaluationCriteriaRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> EvaluationCriteriaResponse | HTTPValidationError | None: """Update Evaluation Criteria @@ -206,7 +207,7 @@ async def asyncio( Args: criteria_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UpdateEvaluationCriteriaRequest): Request body for updating an evaluation criteria. Retry settings and sample frequency are set at the agent level. diff --git a/seclai/_generated/api/agents/api_get_agent_input_upload_status_api_agents_agent_id_input_uploads_upload_id_get.py b/seclai/_generated/api/agents/api_get_agent_input_upload_status_api_agents_agent_id_input_uploads_upload_id_get.py index 5dcd3e7..cdac5b6 100644 --- a/seclai/_generated/api/agents/api_get_agent_input_upload_status_api_agents_agent_id_input_uploads_upload_id_get.py +++ b/seclai/_generated/api/agents/api_get_agent_input_upload_status_api_agents_agent_id_input_uploads_upload_id_get.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -15,7 +16,7 @@ def _get_kwargs( agent_id: str, upload_id: str, *, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -68,7 +69,7 @@ def sync_detailed( upload_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | UploadAgentInputApiResponse]: """Get upload status @@ -83,7 +84,7 @@ def sync_detailed( Args: agent_id (str): upload_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -111,7 +112,7 @@ def sync( upload_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | UploadAgentInputApiResponse | None: """Get upload status @@ -126,7 +127,7 @@ def sync( Args: agent_id (str): upload_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -149,7 +150,7 @@ async def asyncio_detailed( upload_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | UploadAgentInputApiResponse]: """Get upload status @@ -164,7 +165,7 @@ async def asyncio_detailed( Args: agent_id (str): upload_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -190,7 +191,7 @@ async def asyncio( upload_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | UploadAgentInputApiResponse | None: """Get upload status @@ -205,7 +206,7 @@ async def asyncio( Args: agent_id (str): upload_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/agents/api_upload_agent_input_api_agents_agent_id_upload_input_post.py b/seclai/_generated/api/agents/api_upload_agent_input_api_agents_agent_id_upload_input_post.py index 661601e..862c9b3 100644 --- a/seclai/_generated/api/agents/api_upload_agent_input_api_agents_agent_id_upload_input_post.py +++ b/seclai/_generated/api/agents/api_upload_agent_input_api_agents_agent_id_upload_input_post.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -14,7 +15,7 @@ def _get_kwargs( agent_id: str, *, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -65,7 +66,7 @@ def sync_detailed( agent_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | UploadAgentInputApiResponse]: """Upload file input @@ -89,7 +90,7 @@ def sync_detailed( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -115,7 +116,7 @@ def sync( agent_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | UploadAgentInputApiResponse | None: """Upload file input @@ -139,7 +140,7 @@ def sync( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -160,7 +161,7 @@ async def asyncio_detailed( agent_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | UploadAgentInputApiResponse]: """Upload file input @@ -184,7 +185,7 @@ async def asyncio_detailed( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -208,7 +209,7 @@ async def asyncio( agent_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | UploadAgentInputApiResponse | None: """Upload file input @@ -232,7 +233,7 @@ async def asyncio( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/agents/create_agent_api_agents_post.py b/seclai/_generated/api/agents/create_agent_api_agents_post.py index e9f3b75..cb5a220 100644 --- a/seclai/_generated/api/agents/create_agent_api_agents_post.py +++ b/seclai/_generated/api/agents/create_agent_api_agents_post.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from uuid import UUID import httpx @@ -14,7 +15,7 @@ def _get_kwargs( *, body: CreateAgentRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -71,7 +72,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: CreateAgentRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[AgentSummaryResponse | Any | HTTPValidationError]: """Create an agent @@ -90,7 +91,7 @@ def sync_detailed( - Requires `X-API-Key` header or OAuth Bearer token. Agent is created in the caller's account. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (CreateAgentRequest): Raises: @@ -117,7 +118,7 @@ def sync( *, client: AuthenticatedClient | Client, body: CreateAgentRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> AgentSummaryResponse | Any | HTTPValidationError | None: """Create an agent @@ -136,7 +137,7 @@ def sync( - Requires `X-API-Key` header or OAuth Bearer token. Agent is created in the caller's account. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (CreateAgentRequest): Raises: @@ -158,7 +159,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: CreateAgentRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[AgentSummaryResponse | Any | HTTPValidationError]: """Create an agent @@ -177,7 +178,7 @@ async def asyncio_detailed( - Requires `X-API-Key` header or OAuth Bearer token. Agent is created in the caller's account. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (CreateAgentRequest): Raises: @@ -202,7 +203,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: CreateAgentRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> AgentSummaryResponse | Any | HTTPValidationError | None: """Create an agent @@ -221,7 +222,7 @@ async def asyncio( - Requires `X-API-Key` header or OAuth Bearer token. Agent is created in the caller's account. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (CreateAgentRequest): Raises: diff --git a/seclai/_generated/api/agents/delete_agent_api_agents_agent_id_delete.py b/seclai/_generated/api/agents/delete_agent_api_agents_agent_id_delete.py index 80f597d..010abb5 100644 --- a/seclai/_generated/api/agents/delete_agent_api_agents_agent_id_delete.py +++ b/seclai/_generated/api/agents/delete_agent_api_agents_agent_id_delete.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any, cast from urllib.parse import quote +from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( agent_id: str, *, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -63,7 +64,7 @@ def sync_detailed( agent_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Delete an agent @@ -75,7 +76,7 @@ def sync_detailed( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -101,7 +102,7 @@ def sync( agent_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Delete an agent @@ -113,7 +114,7 @@ def sync( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -134,7 +135,7 @@ async def asyncio_detailed( agent_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Delete an agent @@ -146,7 +147,7 @@ async def asyncio_detailed( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -170,7 +171,7 @@ async def asyncio( agent_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Delete an agent @@ -182,7 +183,7 @@ async def asyncio( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/agents/delete_agent_run_api_agents_runs_run_id_delete.py b/seclai/_generated/api/agents/delete_agent_run_api_agents_runs_run_id_delete.py index 8533bf2..3f918ae 100644 --- a/seclai/_generated/api/agents/delete_agent_run_api_agents_runs_run_id_delete.py +++ b/seclai/_generated/api/agents/delete_agent_run_api_agents_runs_run_id_delete.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -14,7 +15,7 @@ def _get_kwargs( run_id: str, *, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -65,7 +66,7 @@ def sync_detailed( run_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[AgentRunResponse | HTTPValidationError]: """Cancel an agent run @@ -79,7 +80,7 @@ def sync_detailed( Args: run_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -105,7 +106,7 @@ def sync( run_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> AgentRunResponse | HTTPValidationError | None: """Cancel an agent run @@ -119,7 +120,7 @@ def sync( Args: run_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -140,7 +141,7 @@ async def asyncio_detailed( run_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[AgentRunResponse | HTTPValidationError]: """Cancel an agent run @@ -154,7 +155,7 @@ async def asyncio_detailed( Args: run_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -178,7 +179,7 @@ async def asyncio( run_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> AgentRunResponse | HTTPValidationError | None: """Cancel an agent run @@ -192,7 +193,7 @@ async def asyncio( Args: run_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/agents/export_agent_api_agents_agent_id_export_get.py b/seclai/_generated/api/agents/export_agent_api_agents_agent_id_export_get.py index a68ab98..c9af997 100644 --- a/seclai/_generated/api/agents/export_agent_api_agents_agent_id_export_get.py +++ b/seclai/_generated/api/agents/export_agent_api_agents_agent_id_export_get.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -15,7 +16,7 @@ def _get_kwargs( agent_id: str, *, download: bool | Unset = True, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -74,7 +75,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, download: bool | Unset = True, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[AgentExportResponse | HTTPValidationError]: r"""Export agent definition @@ -99,15 +100,12 @@ def sync_detailed( response as a file download. Auth & scoping: - - Requires `X-API-Key` header or OAuth Bearer token. - - When using OAuth, you may target a different organization account with `X-Account-Id`; for API - keys, the key's account is always used. - - You can only export agents belonging to the resolved account. + - Requires `X-API-Key`. You can only export agents belonging to your account. Args: agent_id (str): download (bool | Unset): Return as file download Default: True. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -135,7 +133,7 @@ def sync( *, client: AuthenticatedClient | Client, download: bool | Unset = True, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> AgentExportResponse | HTTPValidationError | None: r"""Export agent definition @@ -160,15 +158,12 @@ def sync( response as a file download. Auth & scoping: - - Requires `X-API-Key` header or OAuth Bearer token. - - When using OAuth, you may target a different organization account with `X-Account-Id`; for API - keys, the key's account is always used. - - You can only export agents belonging to the resolved account. + - Requires `X-API-Key`. You can only export agents belonging to your account. Args: agent_id (str): download (bool | Unset): Return as file download Default: True. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -191,7 +186,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, download: bool | Unset = True, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[AgentExportResponse | HTTPValidationError]: r"""Export agent definition @@ -216,15 +211,12 @@ async def asyncio_detailed( response as a file download. Auth & scoping: - - Requires `X-API-Key` header or OAuth Bearer token. - - When using OAuth, you may target a different organization account with `X-Account-Id`; for API - keys, the key's account is always used. - - You can only export agents belonging to the resolved account. + - Requires `X-API-Key`. You can only export agents belonging to your account. Args: agent_id (str): download (bool | Unset): Return as file download Default: True. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -250,7 +242,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, download: bool | Unset = True, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> AgentExportResponse | HTTPValidationError | None: r"""Export agent definition @@ -275,15 +267,12 @@ async def asyncio( response as a file download. Auth & scoping: - - Requires `X-API-Key` header or OAuth Bearer token. - - When using OAuth, you may target a different organization account with `X-Account-Id`; for API - keys, the key's account is always used. - - You can only export agents belonging to the resolved account. + - Requires `X-API-Key`. You can only export agents belonging to your account. Args: agent_id (str): download (bool | Unset): Return as file download Default: True. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/agents/generate_agent_steps_api_agents_agent_id_ai_assistant_generate_steps_post.py b/seclai/_generated/api/agents/generate_agent_steps_api_agents_agent_id_ai_assistant_generate_steps_post.py index 9d3c5ac..e0b2ea3 100644 --- a/seclai/_generated/api/agents/generate_agent_steps_api_agents_agent_id_ai_assistant_generate_steps_post.py +++ b/seclai/_generated/api/agents/generate_agent_steps_api_agents_agent_id_ai_assistant_generate_steps_post.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -16,7 +17,7 @@ def _get_kwargs( agent_id: str, *, body: GenerateAgentStepsRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -72,7 +73,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: GenerateAgentStepsRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[GenerateAgentStepsResponse | HTTPValidationError]: """Generate agent workflow @@ -88,7 +89,7 @@ def sync_detailed( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (GenerateAgentStepsRequest): Raises: @@ -117,7 +118,7 @@ def sync( *, client: AuthenticatedClient | Client, body: GenerateAgentStepsRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> GenerateAgentStepsResponse | HTTPValidationError | None: """Generate agent workflow @@ -133,7 +134,7 @@ def sync( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (GenerateAgentStepsRequest): Raises: @@ -157,7 +158,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: GenerateAgentStepsRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[GenerateAgentStepsResponse | HTTPValidationError]: """Generate agent workflow @@ -173,7 +174,7 @@ async def asyncio_detailed( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (GenerateAgentStepsRequest): Raises: @@ -200,7 +201,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: GenerateAgentStepsRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> GenerateAgentStepsResponse | HTTPValidationError | None: """Generate agent workflow @@ -216,7 +217,7 @@ async def asyncio( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (GenerateAgentStepsRequest): Raises: diff --git a/seclai/_generated/api/agents/generate_step_config_api_agents_agent_id_ai_assistant_step_config_post.py b/seclai/_generated/api/agents/generate_step_config_api_agents_agent_id_ai_assistant_step_config_post.py index f63e34f..aa8d1ac 100644 --- a/seclai/_generated/api/agents/generate_step_config_api_agents_agent_id_ai_assistant_step_config_post.py +++ b/seclai/_generated/api/agents/generate_step_config_api_agents_agent_id_ai_assistant_step_config_post.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -16,7 +17,7 @@ def _get_kwargs( agent_id: str, *, body: GenerateStepConfigRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -72,7 +73,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: GenerateStepConfigRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[GenerateStepConfigResponse | HTTPValidationError]: """Generate step configuration @@ -88,7 +89,7 @@ def sync_detailed( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (GenerateStepConfigRequest): Raises: @@ -117,7 +118,7 @@ def sync( *, client: AuthenticatedClient | Client, body: GenerateStepConfigRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> GenerateStepConfigResponse | HTTPValidationError | None: """Generate step configuration @@ -133,7 +134,7 @@ def sync( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (GenerateStepConfigRequest): Raises: @@ -157,7 +158,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: GenerateStepConfigRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[GenerateStepConfigResponse | HTTPValidationError]: """Generate step configuration @@ -173,7 +174,7 @@ async def asyncio_detailed( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (GenerateStepConfigRequest): Raises: @@ -200,7 +201,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: GenerateStepConfigRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> GenerateStepConfigResponse | HTTPValidationError | None: """Generate step configuration @@ -216,7 +217,7 @@ async def asyncio( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (GenerateStepConfigRequest): Raises: diff --git a/seclai/_generated/api/agents/get_agent_definition_api_agents_agent_id_definition_get.py b/seclai/_generated/api/agents/get_agent_definition_api_agents_agent_id_definition_get.py index b3dc7cf..9eb2075 100644 --- a/seclai/_generated/api/agents/get_agent_definition_api_agents_agent_id_definition_get.py +++ b/seclai/_generated/api/agents/get_agent_definition_api_agents_agent_id_definition_get.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -14,7 +15,7 @@ def _get_kwargs( agent_id: str, *, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -65,7 +66,7 @@ def sync_detailed( agent_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[AgentDefinitionResponse | HTTPValidationError]: """Get agent definition @@ -85,7 +86,7 @@ def sync_detailed( `pass_threshold` (fields: `target_step_id`, `evaluation_prompt`, `pass_threshold`, optional `evaluation_tier`, optional `expectation_config`) - `insight`: Progressively read and analyze large input - - `extract_json` / `extract_html` / `extract_xml`: Extract structured data + - `extract_content`: Extract structured data (JSON, HTML, XML) - `send_email`: Send email with step output - `webhook_call`: POST data to an external URL - `write_aws_s3_object`: Write output to S3 @@ -100,6 +101,8 @@ def sync_detailed( - `load_content`: Load the full text body of a source document (typically used with content- triggered agents; can also load by explicit `content_version_id`. Fields: `content_version_id` optional) + - `streaming_result`: Stream LLM tokens in real-time via SSE (must be a direct child of + `prompt_call`; requires `dynamic_input` trigger; `priority: true` enables real-time streaming) - `display_result`: Show output to the user - `join`: Merge parallel branches - `combinator`: Combine multiple inputs @@ -111,7 +114,7 @@ def sync_detailed( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -137,7 +140,7 @@ def sync( agent_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> AgentDefinitionResponse | HTTPValidationError | None: """Get agent definition @@ -157,7 +160,7 @@ def sync( `pass_threshold` (fields: `target_step_id`, `evaluation_prompt`, `pass_threshold`, optional `evaluation_tier`, optional `expectation_config`) - `insight`: Progressively read and analyze large input - - `extract_json` / `extract_html` / `extract_xml`: Extract structured data + - `extract_content`: Extract structured data (JSON, HTML, XML) - `send_email`: Send email with step output - `webhook_call`: POST data to an external URL - `write_aws_s3_object`: Write output to S3 @@ -172,6 +175,8 @@ def sync( - `load_content`: Load the full text body of a source document (typically used with content- triggered agents; can also load by explicit `content_version_id`. Fields: `content_version_id` optional) + - `streaming_result`: Stream LLM tokens in real-time via SSE (must be a direct child of + `prompt_call`; requires `dynamic_input` trigger; `priority: true` enables real-time streaming) - `display_result`: Show output to the user - `join`: Merge parallel branches - `combinator`: Combine multiple inputs @@ -183,7 +188,7 @@ def sync( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -204,7 +209,7 @@ async def asyncio_detailed( agent_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[AgentDefinitionResponse | HTTPValidationError]: """Get agent definition @@ -224,7 +229,7 @@ async def asyncio_detailed( `pass_threshold` (fields: `target_step_id`, `evaluation_prompt`, `pass_threshold`, optional `evaluation_tier`, optional `expectation_config`) - `insight`: Progressively read and analyze large input - - `extract_json` / `extract_html` / `extract_xml`: Extract structured data + - `extract_content`: Extract structured data (JSON, HTML, XML) - `send_email`: Send email with step output - `webhook_call`: POST data to an external URL - `write_aws_s3_object`: Write output to S3 @@ -239,6 +244,8 @@ async def asyncio_detailed( - `load_content`: Load the full text body of a source document (typically used with content- triggered agents; can also load by explicit `content_version_id`. Fields: `content_version_id` optional) + - `streaming_result`: Stream LLM tokens in real-time via SSE (must be a direct child of + `prompt_call`; requires `dynamic_input` trigger; `priority: true` enables real-time streaming) - `display_result`: Show output to the user - `join`: Merge parallel branches - `combinator`: Combine multiple inputs @@ -250,7 +257,7 @@ async def asyncio_detailed( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -274,7 +281,7 @@ async def asyncio( agent_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> AgentDefinitionResponse | HTTPValidationError | None: """Get agent definition @@ -294,7 +301,7 @@ async def asyncio( `pass_threshold` (fields: `target_step_id`, `evaluation_prompt`, `pass_threshold`, optional `evaluation_tier`, optional `expectation_config`) - `insight`: Progressively read and analyze large input - - `extract_json` / `extract_html` / `extract_xml`: Extract structured data + - `extract_content`: Extract structured data (JSON, HTML, XML) - `send_email`: Send email with step output - `webhook_call`: POST data to an external URL - `write_aws_s3_object`: Write output to S3 @@ -309,6 +316,8 @@ async def asyncio( - `load_content`: Load the full text body of a source document (typically used with content- triggered agents; can also load by explicit `content_version_id`. Fields: `content_version_id` optional) + - `streaming_result`: Stream LLM tokens in real-time via SSE (must be a direct child of + `prompt_call`; requires `dynamic_input` trigger; `priority: true` enables real-time streaming) - `display_result`: Show output to the user - `join`: Merge parallel branches - `combinator`: Combine multiple inputs @@ -320,7 +329,7 @@ async def asyncio( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/agents/get_agent_metadata_api_agents_agent_id_get.py b/seclai/_generated/api/agents/get_agent_metadata_api_agents_agent_id_get.py index 058402c..87ed5f4 100644 --- a/seclai/_generated/api/agents/get_agent_metadata_api_agents_agent_id_get.py +++ b/seclai/_generated/api/agents/get_agent_metadata_api_agents_agent_id_get.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -14,7 +15,7 @@ def _get_kwargs( agent_id: str, *, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -65,7 +66,7 @@ def sync_detailed( agent_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[AgentSummaryResponse | HTTPValidationError]: """Get an agent @@ -77,7 +78,7 @@ def sync_detailed( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -103,7 +104,7 @@ def sync( agent_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> AgentSummaryResponse | HTTPValidationError | None: """Get an agent @@ -115,7 +116,7 @@ def sync( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -136,7 +137,7 @@ async def asyncio_detailed( agent_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[AgentSummaryResponse | HTTPValidationError]: """Get an agent @@ -148,7 +149,7 @@ async def asyncio_detailed( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -172,7 +173,7 @@ async def asyncio( agent_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> AgentSummaryResponse | HTTPValidationError | None: """Get an agent @@ -184,7 +185,7 @@ async def asyncio( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/agents/get_agent_run_api_agents_runs_run_id_get.py b/seclai/_generated/api/agents/get_agent_run_api_agents_runs_run_id_get.py index 7c05fd8..39e04c9 100644 --- a/seclai/_generated/api/agents/get_agent_run_api_agents_runs_run_id_get.py +++ b/seclai/_generated/api/agents/get_agent_run_api_agents_runs_run_id_get.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -15,7 +16,7 @@ def _get_kwargs( run_id: str, *, include_step_outputs: bool | Unset = False, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -74,7 +75,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, include_step_outputs: bool | Unset = False, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[AgentRunResponse | HTTPValidationError]: """Get an agent run @@ -92,7 +93,7 @@ def sync_detailed( run_id (str): include_step_outputs (bool | Unset): If true, include per-step outputs with timing, durations, and credits. Default: False. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -120,7 +121,7 @@ def sync( *, client: AuthenticatedClient | Client, include_step_outputs: bool | Unset = False, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> AgentRunResponse | HTTPValidationError | None: """Get an agent run @@ -138,7 +139,7 @@ def sync( run_id (str): include_step_outputs (bool | Unset): If true, include per-step outputs with timing, durations, and credits. Default: False. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -161,7 +162,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, include_step_outputs: bool | Unset = False, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[AgentRunResponse | HTTPValidationError]: """Get an agent run @@ -179,7 +180,7 @@ async def asyncio_detailed( run_id (str): include_step_outputs (bool | Unset): If true, include per-step outputs with timing, durations, and credits. Default: False. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -205,7 +206,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, include_step_outputs: bool | Unset = False, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> AgentRunResponse | HTTPValidationError | None: """Get an agent run @@ -223,7 +224,7 @@ async def asyncio( run_id (str): include_step_outputs (bool | Unset): If true, include per-step outputs with timing, durations, and credits. Default: False. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/agents/get_ai_conversation_history_api_agents_agent_id_ai_assistant_conversations_get.py b/seclai/_generated/api/agents/get_ai_conversation_history_api_agents_agent_id_ai_assistant_conversations_get.py index 0a2538e..71ca602 100644 --- a/seclai/_generated/api/agents/get_ai_conversation_history_api_agents_agent_id_ai_assistant_conversations_get.py +++ b/seclai/_generated/api/agents/get_ai_conversation_history_api_agents_agent_id_ai_assistant_conversations_get.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -18,7 +19,7 @@ def _get_kwargs( step_id: None | str | Unset = UNSET, limit: int | Unset = 10, offset: int | Unset = 0, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -91,7 +92,7 @@ def sync_detailed( step_id: None | str | Unset = UNSET, limit: int | Unset = 10, offset: int | Unset = 0, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[AiConversationHistoryResponse | HTTPValidationError]: """Get AI conversation history @@ -111,7 +112,7 @@ def sync_detailed( step_id (None | str | Unset): Step ID to filter by. limit (int | Unset): Max turns to return. Default: 10. offset (int | Unset): Number of recent turns to skip. Default: 0. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -145,7 +146,7 @@ def sync( step_id: None | str | Unset = UNSET, limit: int | Unset = 10, offset: int | Unset = 0, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> AiConversationHistoryResponse | HTTPValidationError | None: """Get AI conversation history @@ -165,7 +166,7 @@ def sync( step_id (None | str | Unset): Step ID to filter by. limit (int | Unset): Max turns to return. Default: 10. offset (int | Unset): Number of recent turns to skip. Default: 0. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -194,7 +195,7 @@ async def asyncio_detailed( step_id: None | str | Unset = UNSET, limit: int | Unset = 10, offset: int | Unset = 0, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[AiConversationHistoryResponse | HTTPValidationError]: """Get AI conversation history @@ -214,7 +215,7 @@ async def asyncio_detailed( step_id (None | str | Unset): Step ID to filter by. limit (int | Unset): Max turns to return. Default: 10. offset (int | Unset): Number of recent turns to skip. Default: 0. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -246,7 +247,7 @@ async def asyncio( step_id: None | str | Unset = UNSET, limit: int | Unset = 10, offset: int | Unset = 0, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> AiConversationHistoryResponse | HTTPValidationError | None: """Get AI conversation history @@ -266,7 +267,7 @@ async def asyncio( step_id (None | str | Unset): Step ID to filter by. limit (int | Unset): Max turns to return. Default: 10. offset (int | Unset): Number of recent turns to skip. Default: 0. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/agents/list_agent_runs_api_agents_agent_id_runs_get.py b/seclai/_generated/api/agents/list_agent_runs_api_agents_agent_id_runs_get.py index 830d623..d13efa7 100644 --- a/seclai/_generated/api/agents/list_agent_runs_api_agents_agent_id_runs_get.py +++ b/seclai/_generated/api/agents/list_agent_runs_api_agents_agent_id_runs_get.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -20,7 +21,7 @@ def _get_kwargs( page: int | Unset = 1, limit: int | Unset = 50, status: None | PendingProcessingCompletedFailedStatus | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -92,7 +93,7 @@ def sync_detailed( page: int | Unset = 1, limit: int | Unset = 50, status: None | PendingProcessingCompletedFailedStatus | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[AgentRunListResponse | HTTPValidationError]: """List agent runs @@ -114,7 +115,7 @@ def sync_detailed( page (int | Unset): Page number Default: 1. limit (int | Unset): Items per page Default: 50. status (None | PendingProcessingCompletedFailedStatus | Unset): Filter runs by status - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -146,7 +147,7 @@ def sync( page: int | Unset = 1, limit: int | Unset = 50, status: None | PendingProcessingCompletedFailedStatus | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> AgentRunListResponse | HTTPValidationError | None: """List agent runs @@ -168,7 +169,7 @@ def sync( page (int | Unset): Page number Default: 1. limit (int | Unset): Items per page Default: 50. status (None | PendingProcessingCompletedFailedStatus | Unset): Filter runs by status - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -195,7 +196,7 @@ async def asyncio_detailed( page: int | Unset = 1, limit: int | Unset = 50, status: None | PendingProcessingCompletedFailedStatus | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[AgentRunListResponse | HTTPValidationError]: """List agent runs @@ -217,7 +218,7 @@ async def asyncio_detailed( page (int | Unset): Page number Default: 1. limit (int | Unset): Items per page Default: 50. status (None | PendingProcessingCompletedFailedStatus | Unset): Filter runs by status - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -247,7 +248,7 @@ async def asyncio( page: int | Unset = 1, limit: int | Unset = 50, status: None | PendingProcessingCompletedFailedStatus | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> AgentRunListResponse | HTTPValidationError | None: """List agent runs @@ -269,7 +270,7 @@ async def asyncio( page (int | Unset): Page number Default: 1. limit (int | Unset): Items per page Default: 50. status (None | PendingProcessingCompletedFailedStatus | Unset): Filter runs by status - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/agents/list_agents_api_agents_get.py b/seclai/_generated/api/agents/list_agents_api_agents_get.py index ee37bc0..09644b0 100644 --- a/seclai/_generated/api/agents/list_agents_api_agents_get.py +++ b/seclai/_generated/api/agents/list_agents_api_agents_get.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from uuid import UUID import httpx @@ -14,7 +15,7 @@ def _get_kwargs( *, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +74,7 @@ def sync_detailed( client: AuthenticatedClient | Client, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[AgentListResponse | HTTPValidationError]: """List agents @@ -86,7 +87,7 @@ def sync_detailed( Args: page (int | Unset): Page number Default: 1. limit (int | Unset): Items per page Default: 20. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -114,7 +115,7 @@ def sync( client: AuthenticatedClient | Client, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> AgentListResponse | HTTPValidationError | None: """List agents @@ -127,7 +128,7 @@ def sync( Args: page (int | Unset): Page number Default: 1. limit (int | Unset): Items per page Default: 20. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -150,7 +151,7 @@ async def asyncio_detailed( client: AuthenticatedClient | Client, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[AgentListResponse | HTTPValidationError]: """List agents @@ -163,7 +164,7 @@ async def asyncio_detailed( Args: page (int | Unset): Page number Default: 1. limit (int | Unset): Items per page Default: 20. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -189,7 +190,7 @@ async def asyncio( client: AuthenticatedClient | Client, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> AgentListResponse | HTTPValidationError | None: """List agents @@ -202,7 +203,7 @@ async def asyncio( Args: page (int | Unset): Page number Default: 1. limit (int | Unset): Items per page Default: 20. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/agents/mark_ai_suggestion_api_agents_agent_id_ai_assistant_conversation_id_patch.py b/seclai/_generated/api/agents/mark_ai_suggestion_api_agents_agent_id_ai_assistant_conversation_id_patch.py index ccd61a4..7bfcf2c 100644 --- a/seclai/_generated/api/agents/mark_ai_suggestion_api_agents_agent_id_ai_assistant_conversation_id_patch.py +++ b/seclai/_generated/api/agents/mark_ai_suggestion_api_agents_agent_id_ai_assistant_conversation_id_patch.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -19,7 +20,7 @@ def _get_kwargs( conversation_id: str, *, body: MarkAiSuggestionRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -86,7 +87,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: MarkAiSuggestionRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ HTTPValidationError | MarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatchResponseMarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatch @@ -105,7 +106,7 @@ def sync_detailed( Args: agent_id (str): conversation_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (MarkAiSuggestionRequest): Raises: @@ -136,7 +137,7 @@ def sync( *, client: AuthenticatedClient | Client, body: MarkAiSuggestionRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ( HTTPValidationError | MarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatchResponseMarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatch @@ -156,7 +157,7 @@ def sync( Args: agent_id (str): conversation_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (MarkAiSuggestionRequest): Raises: @@ -182,7 +183,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: MarkAiSuggestionRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ HTTPValidationError | MarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatchResponseMarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatch @@ -201,7 +202,7 @@ async def asyncio_detailed( Args: agent_id (str): conversation_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (MarkAiSuggestionRequest): Raises: @@ -230,7 +231,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: MarkAiSuggestionRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ( HTTPValidationError | MarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatchResponseMarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatch @@ -250,7 +251,7 @@ async def asyncio( Args: agent_id (str): conversation_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (MarkAiSuggestionRequest): Raises: diff --git a/seclai/_generated/api/agents/run_agent_api_agents_agent_id_runs_post.py b/seclai/_generated/api/agents/run_agent_api_agents_agent_id_runs_post.py index bc87ede..168ee04 100644 --- a/seclai/_generated/api/agents/run_agent_api_agents_agent_id_runs_post.py +++ b/seclai/_generated/api/agents/run_agent_api_agents_agent_id_runs_post.py @@ -1,6 +1,7 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote +from uuid import UUID import httpx @@ -16,7 +17,7 @@ def _get_kwargs( agent_id: str, *, body: AgentRunRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -39,12 +40,16 @@ def _get_kwargs( def _parse_response( *, client: AuthenticatedClient | Client, response: httpx.Response -) -> AgentRunResponse | HTTPValidationError | None: +) -> AgentRunResponse | Any | HTTPValidationError | None: if response.status_code == 200: response_200 = AgentRunResponse.from_dict(response.json()) return response_200 + if response.status_code == 402: + response_402 = cast(Any, None) + return response_402 + if response.status_code == 422: response_422 = HTTPValidationError.from_dict(response.json()) @@ -58,7 +63,7 @@ def _parse_response( def _build_response( *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[AgentRunResponse | HTTPValidationError]: +) -> Response[AgentRunResponse | Any | HTTPValidationError]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -72,8 +77,8 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: AgentRunRequest, - x_account_id: str | Unset = UNSET, -) -> Response[AgentRunResponse | HTTPValidationError]: + x_account_id: UUID | Unset = UNSET, +) -> Response[AgentRunResponse | Any | HTTPValidationError]: """Run an agent Start an agent run. @@ -90,7 +95,9 @@ def sync_detailed( - `input`: text input for agents with a `dynamic_input` trigger. - `input_upload_id`: alternatively, reference a file previously uploaded via `POST /agents/{agent_id}/upload-input` (mutually exclusive with `input`). - - `priority`: set true for latency-sensitive, user-facing work. + - `priority`: set true for latency-sensitive, user-facing work. For agents with a `streaming_result` + step, set `priority=true` to enable real-time token streaming; otherwise the run still proceeds, but + without live token streaming. - `metadata`: a JSON object that becomes available to agent steps for string substitution. After starting: @@ -103,7 +110,7 @@ def sync_detailed( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AgentRunRequest): Raises: @@ -111,7 +118,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[AgentRunResponse | HTTPValidationError] + Response[AgentRunResponse | Any | HTTPValidationError] """ kwargs = _get_kwargs( @@ -132,8 +139,8 @@ def sync( *, client: AuthenticatedClient | Client, body: AgentRunRequest, - x_account_id: str | Unset = UNSET, -) -> AgentRunResponse | HTTPValidationError | None: + x_account_id: UUID | Unset = UNSET, +) -> AgentRunResponse | Any | HTTPValidationError | None: """Run an agent Start an agent run. @@ -150,7 +157,9 @@ def sync( - `input`: text input for agents with a `dynamic_input` trigger. - `input_upload_id`: alternatively, reference a file previously uploaded via `POST /agents/{agent_id}/upload-input` (mutually exclusive with `input`). - - `priority`: set true for latency-sensitive, user-facing work. + - `priority`: set true for latency-sensitive, user-facing work. For agents with a `streaming_result` + step, set `priority=true` to enable real-time token streaming; otherwise the run still proceeds, but + without live token streaming. - `metadata`: a JSON object that becomes available to agent steps for string substitution. After starting: @@ -163,7 +172,7 @@ def sync( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AgentRunRequest): Raises: @@ -171,7 +180,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - AgentRunResponse | HTTPValidationError + AgentRunResponse | Any | HTTPValidationError """ return sync_detailed( @@ -187,8 +196,8 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: AgentRunRequest, - x_account_id: str | Unset = UNSET, -) -> Response[AgentRunResponse | HTTPValidationError]: + x_account_id: UUID | Unset = UNSET, +) -> Response[AgentRunResponse | Any | HTTPValidationError]: """Run an agent Start an agent run. @@ -205,7 +214,9 @@ async def asyncio_detailed( - `input`: text input for agents with a `dynamic_input` trigger. - `input_upload_id`: alternatively, reference a file previously uploaded via `POST /agents/{agent_id}/upload-input` (mutually exclusive with `input`). - - `priority`: set true for latency-sensitive, user-facing work. + - `priority`: set true for latency-sensitive, user-facing work. For agents with a `streaming_result` + step, set `priority=true` to enable real-time token streaming; otherwise the run still proceeds, but + without live token streaming. - `metadata`: a JSON object that becomes available to agent steps for string substitution. After starting: @@ -218,7 +229,7 @@ async def asyncio_detailed( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AgentRunRequest): Raises: @@ -226,7 +237,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[AgentRunResponse | HTTPValidationError] + Response[AgentRunResponse | Any | HTTPValidationError] """ kwargs = _get_kwargs( @@ -245,8 +256,8 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: AgentRunRequest, - x_account_id: str | Unset = UNSET, -) -> AgentRunResponse | HTTPValidationError | None: + x_account_id: UUID | Unset = UNSET, +) -> AgentRunResponse | Any | HTTPValidationError | None: """Run an agent Start an agent run. @@ -263,7 +274,9 @@ async def asyncio( - `input`: text input for agents with a `dynamic_input` trigger. - `input_upload_id`: alternatively, reference a file previously uploaded via `POST /agents/{agent_id}/upload-input` (mutually exclusive with `input`). - - `priority`: set true for latency-sensitive, user-facing work. + - `priority`: set true for latency-sensitive, user-facing work. For agents with a `streaming_result` + step, set `priority=true` to enable real-time token streaming; otherwise the run still proceeds, but + without live token streaming. - `metadata`: a JSON object that becomes available to agent steps for string substitution. After starting: @@ -276,7 +289,7 @@ async def asyncio( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AgentRunRequest): Raises: @@ -284,7 +297,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - AgentRunResponse | HTTPValidationError + AgentRunResponse | Any | HTTPValidationError """ return ( diff --git a/seclai/_generated/api/agents/run_streaming_agent_api_agents_agent_id_runs_stream_post.py b/seclai/_generated/api/agents/run_streaming_agent_api_agents_agent_id_runs_stream_post.py index 2fd0b7a..9b12bfb 100644 --- a/seclai/_generated/api/agents/run_streaming_agent_api_agents_agent_id_runs_stream_post.py +++ b/seclai/_generated/api/agents/run_streaming_agent_api_agents_agent_id_runs_stream_post.py @@ -1,6 +1,7 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote +from uuid import UUID import httpx @@ -15,7 +16,7 @@ def _get_kwargs( agent_id: str, *, body: AgentRunStreamRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -43,6 +44,10 @@ def _parse_response( response_200 = response.json() return response_200 + if response.status_code == 402: + response_402 = cast(Any, None) + return response_402 + if response.status_code == 422: response_422 = HTTPValidationError.from_dict(response.json()) @@ -70,7 +75,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: AgentRunStreamRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Run an agent (stream events) @@ -81,6 +86,8 @@ def sync_detailed( How it works: - The first `init` event contains an `AgentRunResponse` snapshot, including the `run_id`. - Subsequent events are forwarded from the run event stream (status changes, step events, etc). + - If the agent contains a `streaming_result` step, `stream_token` events deliver individual LLM + tokens (with a `token` field) and a `stream_end` event signals completion. - The final `done` event contains the terminal snapshot (including `output` and `credits` when available). @@ -100,7 +107,7 @@ def sync_detailed( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AgentRunStreamRequest): Raises: @@ -129,7 +136,7 @@ def sync( *, client: AuthenticatedClient | Client, body: AgentRunStreamRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Run an agent (stream events) @@ -140,6 +147,8 @@ def sync( How it works: - The first `init` event contains an `AgentRunResponse` snapshot, including the `run_id`. - Subsequent events are forwarded from the run event stream (status changes, step events, etc). + - If the agent contains a `streaming_result` step, `stream_token` events deliver individual LLM + tokens (with a `token` field) and a `stream_end` event signals completion. - The final `done` event contains the terminal snapshot (including `output` and `credits` when available). @@ -159,7 +168,7 @@ def sync( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AgentRunStreamRequest): Raises: @@ -183,7 +192,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: AgentRunStreamRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Run an agent (stream events) @@ -194,6 +203,8 @@ async def asyncio_detailed( How it works: - The first `init` event contains an `AgentRunResponse` snapshot, including the `run_id`. - Subsequent events are forwarded from the run event stream (status changes, step events, etc). + - If the agent contains a `streaming_result` step, `stream_token` events deliver individual LLM + tokens (with a `token` field) and a `stream_end` event signals completion. - The final `done` event contains the terminal snapshot (including `output` and `credits` when available). @@ -213,7 +224,7 @@ async def asyncio_detailed( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AgentRunStreamRequest): Raises: @@ -240,7 +251,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: AgentRunStreamRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Run an agent (stream events) @@ -251,6 +262,8 @@ async def asyncio( How it works: - The first `init` event contains an `AgentRunResponse` snapshot, including the `run_id`. - Subsequent events are forwarded from the run event stream (status changes, step events, etc). + - If the agent contains a `streaming_result` step, `stream_token` events deliver individual LLM + tokens (with a `token` field) and a `stream_end` event signals completion. - The final `done` event contains the terminal snapshot (including `output` and `credits` when available). @@ -270,7 +283,7 @@ async def asyncio( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AgentRunStreamRequest): Raises: diff --git a/seclai/_generated/api/agents/search_agent_runs_api_agents_runs_search_post.py b/seclai/_generated/api/agents/search_agent_runs_api_agents_runs_search_post.py index 153199f..898f6a6 100644 --- a/seclai/_generated/api/agents/search_agent_runs_api_agents_runs_search_post.py +++ b/seclai/_generated/api/agents/search_agent_runs_api_agents_runs_search_post.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from uuid import UUID import httpx @@ -14,7 +15,7 @@ def _get_kwargs( *, body: AgentTraceSearchRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -67,7 +68,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: AgentTraceSearchRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[AgentTraceSearchResponse | HTTPValidationError]: """Search agent traces @@ -83,7 +84,7 @@ def sync_detailed( - Requires `X-API-Key` header or OAuth Bearer token. Searches only within your account's traces. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AgentTraceSearchRequest): Raises: @@ -110,7 +111,7 @@ def sync( *, client: AuthenticatedClient | Client, body: AgentTraceSearchRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> AgentTraceSearchResponse | HTTPValidationError | None: """Search agent traces @@ -126,7 +127,7 @@ def sync( - Requires `X-API-Key` header or OAuth Bearer token. Searches only within your account's traces. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AgentTraceSearchRequest): Raises: @@ -148,7 +149,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: AgentTraceSearchRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[AgentTraceSearchResponse | HTTPValidationError]: """Search agent traces @@ -164,7 +165,7 @@ async def asyncio_detailed( - Requires `X-API-Key` header or OAuth Bearer token. Searches only within your account's traces. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AgentTraceSearchRequest): Raises: @@ -189,7 +190,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: AgentTraceSearchRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> AgentTraceSearchResponse | HTTPValidationError | None: """Search agent traces @@ -205,7 +206,7 @@ async def asyncio( - Requires `X-API-Key` header or OAuth Bearer token. Searches only within your account's traces. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AgentTraceSearchRequest): Raises: diff --git a/seclai/_generated/api/agents/update_agent_api_agents_agent_id_put.py b/seclai/_generated/api/agents/update_agent_api_agents_agent_id_put.py index e743aa0..ab510c4 100644 --- a/seclai/_generated/api/agents/update_agent_api_agents_agent_id_put.py +++ b/seclai/_generated/api/agents/update_agent_api_agents_agent_id_put.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -16,7 +17,7 @@ def _get_kwargs( agent_id: str, *, body: UpdateAgentRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -72,7 +73,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: UpdateAgentRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[AgentSummaryResponse | HTTPValidationError]: """Update agent metadata @@ -95,7 +96,7 @@ def sync_detailed( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UpdateAgentRequest): Raises: @@ -124,7 +125,7 @@ def sync( *, client: AuthenticatedClient | Client, body: UpdateAgentRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> AgentSummaryResponse | HTTPValidationError | None: """Update agent metadata @@ -147,7 +148,7 @@ def sync( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UpdateAgentRequest): Raises: @@ -171,7 +172,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: UpdateAgentRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[AgentSummaryResponse | HTTPValidationError]: """Update agent metadata @@ -194,7 +195,7 @@ async def asyncio_detailed( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UpdateAgentRequest): Raises: @@ -221,7 +222,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: UpdateAgentRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> AgentSummaryResponse | HTTPValidationError | None: """Update agent metadata @@ -244,7 +245,7 @@ async def asyncio( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UpdateAgentRequest): Raises: diff --git a/seclai/_generated/api/agents/update_agent_definition_api_agents_agent_id_definition_put.py b/seclai/_generated/api/agents/update_agent_definition_api_agents_agent_id_definition_put.py index 7efeb94..a299b71 100644 --- a/seclai/_generated/api/agents/update_agent_definition_api_agents_agent_id_definition_put.py +++ b/seclai/_generated/api/agents/update_agent_definition_api_agents_agent_id_definition_put.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -16,7 +17,7 @@ def _get_kwargs( agent_id: str, *, body: UpdateAgentDefinitionRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -72,7 +73,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: UpdateAgentDefinitionRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[AgentDefinitionResponse | HTTPValidationError]: """Update agent definition @@ -83,11 +84,11 @@ def sync_detailed( last read. The definition contains the agent's step workflow. Step types include `prompt_call`, `retrieval`, - `transform`, `gate`, `retry`, `evaluate_step`, `insight`, `extract_json`, `extract_html`, - `extract_xml`, `send_email`, `webhook_call`, `write_aws_s3_object`, `call_agent`, `write_metadata`, + `transform`, `gate`, `retry`, `evaluate_step`, `insight`, `extract_content`, `streaming_result`, + `send_email`, `webhook_call`, `write_aws_s3_object`, `call_agent`, `write_metadata`, `write_content_attachment`, `load_content_attachment`, `load_content`, `display_result`, `join`, `combinator`, and `text`. Non-composite step types (`display_result`, `join`, `retry`, - `evaluate_step`) cannot contain child steps. + `evaluate_step`, `streaming_result`) cannot contain child steps. **Retry steps** re-execute from a target ancestor step for quality-control loops. Configure with `target_step_id` (ancestor step ID) and `max_retries` (1–10). Best practice: place a `gate` step @@ -99,7 +100,7 @@ def sync_detailed( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UpdateAgentDefinitionRequest): Raises: @@ -128,7 +129,7 @@ def sync( *, client: AuthenticatedClient | Client, body: UpdateAgentDefinitionRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> AgentDefinitionResponse | HTTPValidationError | None: """Update agent definition @@ -139,11 +140,11 @@ def sync( last read. The definition contains the agent's step workflow. Step types include `prompt_call`, `retrieval`, - `transform`, `gate`, `retry`, `evaluate_step`, `insight`, `extract_json`, `extract_html`, - `extract_xml`, `send_email`, `webhook_call`, `write_aws_s3_object`, `call_agent`, `write_metadata`, + `transform`, `gate`, `retry`, `evaluate_step`, `insight`, `extract_content`, `streaming_result`, + `send_email`, `webhook_call`, `write_aws_s3_object`, `call_agent`, `write_metadata`, `write_content_attachment`, `load_content_attachment`, `load_content`, `display_result`, `join`, `combinator`, and `text`. Non-composite step types (`display_result`, `join`, `retry`, - `evaluate_step`) cannot contain child steps. + `evaluate_step`, `streaming_result`) cannot contain child steps. **Retry steps** re-execute from a target ancestor step for quality-control loops. Configure with `target_step_id` (ancestor step ID) and `max_retries` (1–10). Best practice: place a `gate` step @@ -155,7 +156,7 @@ def sync( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UpdateAgentDefinitionRequest): Raises: @@ -179,7 +180,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: UpdateAgentDefinitionRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[AgentDefinitionResponse | HTTPValidationError]: """Update agent definition @@ -190,11 +191,11 @@ async def asyncio_detailed( last read. The definition contains the agent's step workflow. Step types include `prompt_call`, `retrieval`, - `transform`, `gate`, `retry`, `evaluate_step`, `insight`, `extract_json`, `extract_html`, - `extract_xml`, `send_email`, `webhook_call`, `write_aws_s3_object`, `call_agent`, `write_metadata`, + `transform`, `gate`, `retry`, `evaluate_step`, `insight`, `extract_content`, `streaming_result`, + `send_email`, `webhook_call`, `write_aws_s3_object`, `call_agent`, `write_metadata`, `write_content_attachment`, `load_content_attachment`, `load_content`, `display_result`, `join`, `combinator`, and `text`. Non-composite step types (`display_result`, `join`, `retry`, - `evaluate_step`) cannot contain child steps. + `evaluate_step`, `streaming_result`) cannot contain child steps. **Retry steps** re-execute from a target ancestor step for quality-control loops. Configure with `target_step_id` (ancestor step ID) and `max_retries` (1–10). Best practice: place a `gate` step @@ -206,7 +207,7 @@ async def asyncio_detailed( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UpdateAgentDefinitionRequest): Raises: @@ -233,7 +234,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: UpdateAgentDefinitionRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> AgentDefinitionResponse | HTTPValidationError | None: """Update agent definition @@ -244,11 +245,11 @@ async def asyncio( last read. The definition contains the agent's step workflow. Step types include `prompt_call`, `retrieval`, - `transform`, `gate`, `retry`, `evaluate_step`, `insight`, `extract_json`, `extract_html`, - `extract_xml`, `send_email`, `webhook_call`, `write_aws_s3_object`, `call_agent`, `write_metadata`, + `transform`, `gate`, `retry`, `evaluate_step`, `insight`, `extract_content`, `streaming_result`, + `send_email`, `webhook_call`, `write_aws_s3_object`, `call_agent`, `write_metadata`, `write_content_attachment`, `load_content_attachment`, `load_content`, `display_result`, `join`, `combinator`, and `text`. Non-composite step types (`display_result`, `join`, `retry`, - `evaluate_step`) cannot contain child steps. + `evaluate_step`, `streaming_result`) cannot contain child steps. **Retry steps** re-execute from a target ancestor step for quality-control loops. Configure with `target_step_id` (ancestor step ID) and `max_retries` (1–10). Best practice: place a `gate` step @@ -260,7 +261,7 @@ async def asyncio( Args: agent_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UpdateAgentDefinitionRequest): Raises: diff --git a/seclai/_generated/api/ai_assistant/api_ai_accept_api_ai_assistant_conversation_id_accept_post.py b/seclai/_generated/api/ai_assistant/api_ai_accept_api_ai_assistant_conversation_id_accept_post.py index 346f61a..7682d0c 100644 --- a/seclai/_generated/api/ai_assistant/api_ai_accept_api_ai_assistant_conversation_id_accept_post.py +++ b/seclai/_generated/api/ai_assistant/api_ai_accept_api_ai_assistant_conversation_id_accept_post.py @@ -17,7 +17,7 @@ def _get_kwargs( conversation_id: UUID, *, body: AiAssistantAcceptRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +73,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: AiAssistantAcceptRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[AiAssistantAcceptResponse | HTTPValidationError]: """Accept and execute a standalone plan @@ -84,7 +84,7 @@ def sync_detailed( Args: conversation_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AiAssistantAcceptRequest): Request body for accepting a proposed plan. Raises: @@ -113,7 +113,7 @@ def sync( *, client: AuthenticatedClient | Client, body: AiAssistantAcceptRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> AiAssistantAcceptResponse | HTTPValidationError | None: """Accept and execute a standalone plan @@ -124,7 +124,7 @@ def sync( Args: conversation_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AiAssistantAcceptRequest): Request body for accepting a proposed plan. Raises: @@ -148,7 +148,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: AiAssistantAcceptRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[AiAssistantAcceptResponse | HTTPValidationError]: """Accept and execute a standalone plan @@ -159,7 +159,7 @@ async def asyncio_detailed( Args: conversation_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AiAssistantAcceptRequest): Request body for accepting a proposed plan. Raises: @@ -186,7 +186,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: AiAssistantAcceptRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> AiAssistantAcceptResponse | HTTPValidationError | None: """Accept and execute a standalone plan @@ -197,7 +197,7 @@ async def asyncio( Args: conversation_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AiAssistantAcceptRequest): Request body for accepting a proposed plan. Raises: diff --git a/seclai/_generated/api/ai_assistant/api_ai_decline_api_ai_assistant_conversation_id_decline_post.py b/seclai/_generated/api/ai_assistant/api_ai_decline_api_ai_assistant_conversation_id_decline_post.py index 5ac92c4..1c7ec9d 100644 --- a/seclai/_generated/api/ai_assistant/api_ai_decline_api_ai_assistant_conversation_id_decline_post.py +++ b/seclai/_generated/api/ai_assistant/api_ai_decline_api_ai_assistant_conversation_id_decline_post.py @@ -14,7 +14,7 @@ def _get_kwargs( conversation_id: UUID, *, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -64,7 +64,7 @@ def sync_detailed( conversation_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Decline a standalone plan @@ -75,7 +75,7 @@ def sync_detailed( Args: conversation_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -101,7 +101,7 @@ def sync( conversation_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Decline a standalone plan @@ -112,7 +112,7 @@ def sync( Args: conversation_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -133,7 +133,7 @@ async def asyncio_detailed( conversation_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Decline a standalone plan @@ -144,7 +144,7 @@ async def asyncio_detailed( Args: conversation_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -168,7 +168,7 @@ async def asyncio( conversation_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Decline a standalone plan @@ -179,7 +179,7 @@ async def asyncio( Args: conversation_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/ai_assistant/api_ai_feedback_api_ai_assistant_feedback_post.py b/seclai/_generated/api/ai_assistant/api_ai_feedback_api_ai_assistant_feedback_post.py index 45f222e..7f9d224 100644 --- a/seclai/_generated/api/ai_assistant/api_ai_feedback_api_ai_assistant_feedback_post.py +++ b/seclai/_generated/api/ai_assistant/api_ai_feedback_api_ai_assistant_feedback_post.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from uuid import UUID import httpx @@ -14,7 +15,7 @@ def _get_kwargs( *, body: AiAssistantFeedbackRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -67,7 +68,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: AiAssistantFeedbackRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[AiAssistantFeedbackResponse | HTTPValidationError]: """Submit AI assistant feedback @@ -77,7 +78,7 @@ def sync_detailed( Auth: requires ``X-API-Key`` header or OAuth Bearer token. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AiAssistantFeedbackRequest): Request body for submitting AI assistant feedback. Raises: @@ -104,7 +105,7 @@ def sync( *, client: AuthenticatedClient | Client, body: AiAssistantFeedbackRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> AiAssistantFeedbackResponse | HTTPValidationError | None: """Submit AI assistant feedback @@ -114,7 +115,7 @@ def sync( Auth: requires ``X-API-Key`` header or OAuth Bearer token. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AiAssistantFeedbackRequest): Request body for submitting AI assistant feedback. Raises: @@ -136,7 +137,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: AiAssistantFeedbackRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[AiAssistantFeedbackResponse | HTTPValidationError]: """Submit AI assistant feedback @@ -146,7 +147,7 @@ async def asyncio_detailed( Auth: requires ``X-API-Key`` header or OAuth Bearer token. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AiAssistantFeedbackRequest): Request body for submitting AI assistant feedback. Raises: @@ -171,7 +172,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: AiAssistantFeedbackRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> AiAssistantFeedbackResponse | HTTPValidationError | None: """Submit AI assistant feedback @@ -181,7 +182,7 @@ async def asyncio( Auth: requires ``X-API-Key`` header or OAuth Bearer token. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AiAssistantFeedbackRequest): Request body for submitting AI assistant feedback. Raises: diff --git a/seclai/_generated/api/ai_assistant/api_ai_knowledge_base_api_ai_assistant_knowledge_base_post.py b/seclai/_generated/api/ai_assistant/api_ai_knowledge_base_api_ai_assistant_knowledge_base_post.py index 3d25770..a7fc46a 100644 --- a/seclai/_generated/api/ai_assistant/api_ai_knowledge_base_api_ai_assistant_knowledge_base_post.py +++ b/seclai/_generated/api/ai_assistant/api_ai_knowledge_base_api_ai_assistant_knowledge_base_post.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from uuid import UUID import httpx @@ -14,7 +15,7 @@ def _get_kwargs( *, body: AiAssistantGenerateRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -67,7 +68,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[AiAssistantGenerateResponse | HTTPValidationError]: """Generate a knowledge base plan (standalone) @@ -77,7 +78,7 @@ def sync_detailed( Auth: requires ``X-API-Key`` header or OAuth Bearer token. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: @@ -104,7 +105,7 @@ def sync( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> AiAssistantGenerateResponse | HTTPValidationError | None: """Generate a knowledge base plan (standalone) @@ -114,7 +115,7 @@ def sync( Auth: requires ``X-API-Key`` header or OAuth Bearer token. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: @@ -136,7 +137,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[AiAssistantGenerateResponse | HTTPValidationError]: """Generate a knowledge base plan (standalone) @@ -146,7 +147,7 @@ async def asyncio_detailed( Auth: requires ``X-API-Key`` header or OAuth Bearer token. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: @@ -171,7 +172,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> AiAssistantGenerateResponse | HTTPValidationError | None: """Generate a knowledge base plan (standalone) @@ -181,7 +182,7 @@ async def asyncio( Auth: requires ``X-API-Key`` header or OAuth Bearer token. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: diff --git a/seclai/_generated/api/ai_assistant/api_ai_memory_bank_accept_api_ai_assistant_memory_bank_conversation_id_patch.py b/seclai/_generated/api/ai_assistant/api_ai_memory_bank_accept_api_ai_assistant_memory_bank_conversation_id_patch.py index feebb72..9ee2f8b 100644 --- a/seclai/_generated/api/ai_assistant/api_ai_memory_bank_accept_api_ai_assistant_memory_bank_conversation_id_patch.py +++ b/seclai/_generated/api/ai_assistant/api_ai_memory_bank_accept_api_ai_assistant_memory_bank_conversation_id_patch.py @@ -19,7 +19,7 @@ def _get_kwargs( conversation_id: UUID, *, body: MemoryBankAcceptRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -84,7 +84,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: MemoryBankAcceptRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ ApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatchResponseApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatch | HTTPValidationError @@ -99,7 +99,7 @@ def sync_detailed( Args: conversation_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (MemoryBankAcceptRequest): Accept or decline a memory bank AI suggestion. Raises: @@ -128,7 +128,7 @@ def sync( *, client: AuthenticatedClient | Client, body: MemoryBankAcceptRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ( ApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatchResponseApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatch | HTTPValidationError @@ -144,7 +144,7 @@ def sync( Args: conversation_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (MemoryBankAcceptRequest): Accept or decline a memory bank AI suggestion. Raises: @@ -168,7 +168,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: MemoryBankAcceptRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ ApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatchResponseApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatch | HTTPValidationError @@ -183,7 +183,7 @@ async def asyncio_detailed( Args: conversation_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (MemoryBankAcceptRequest): Accept or decline a memory bank AI suggestion. Raises: @@ -210,7 +210,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: MemoryBankAcceptRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ( ApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatchResponseApiAiMemoryBankAcceptApiAiAssistantMemoryBankConversationIdPatch | HTTPValidationError @@ -226,7 +226,7 @@ async def asyncio( Args: conversation_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (MemoryBankAcceptRequest): Accept or decline a memory bank AI suggestion. Raises: diff --git a/seclai/_generated/api/ai_assistant/api_ai_memory_bank_api_ai_assistant_memory_bank_post.py b/seclai/_generated/api/ai_assistant/api_ai_memory_bank_api_ai_assistant_memory_bank_post.py index d986a31..6749b12 100644 --- a/seclai/_generated/api/ai_assistant/api_ai_memory_bank_api_ai_assistant_memory_bank_post.py +++ b/seclai/_generated/api/ai_assistant/api_ai_memory_bank_api_ai_assistant_memory_bank_post.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from uuid import UUID import httpx @@ -14,7 +15,7 @@ def _get_kwargs( *, body: MemoryBankAiAssistantRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -67,7 +68,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: MemoryBankAiAssistantRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | MemoryBankAiAssistantResponse]: """Generate a memory bank configuration (standalone) @@ -77,7 +78,7 @@ def sync_detailed( Auth: requires ``X-API-Key`` header or OAuth Bearer token. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (MemoryBankAiAssistantRequest): Request body for the memory bank AI assistant. Raises: @@ -104,7 +105,7 @@ def sync( *, client: AuthenticatedClient | Client, body: MemoryBankAiAssistantRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | MemoryBankAiAssistantResponse | None: """Generate a memory bank configuration (standalone) @@ -114,7 +115,7 @@ def sync( Auth: requires ``X-API-Key`` header or OAuth Bearer token. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (MemoryBankAiAssistantRequest): Request body for the memory bank AI assistant. Raises: @@ -136,7 +137,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: MemoryBankAiAssistantRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | MemoryBankAiAssistantResponse]: """Generate a memory bank configuration (standalone) @@ -146,7 +147,7 @@ async def asyncio_detailed( Auth: requires ``X-API-Key`` header or OAuth Bearer token. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (MemoryBankAiAssistantRequest): Request body for the memory bank AI assistant. Raises: @@ -171,7 +172,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: MemoryBankAiAssistantRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | MemoryBankAiAssistantResponse | None: """Generate a memory bank configuration (standalone) @@ -181,7 +182,7 @@ async def asyncio( Auth: requires ``X-API-Key`` header or OAuth Bearer token. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (MemoryBankAiAssistantRequest): Request body for the memory bank AI assistant. Raises: diff --git a/seclai/_generated/api/ai_assistant/api_ai_memory_bank_history_api_ai_assistant_memory_bank_last_conversation_get.py b/seclai/_generated/api/ai_assistant/api_ai_memory_bank_history_api_ai_assistant_memory_bank_last_conversation_get.py index 9974d84..8ee783e 100644 --- a/seclai/_generated/api/ai_assistant/api_ai_memory_bank_history_api_ai_assistant_memory_bank_last_conversation_get.py +++ b/seclai/_generated/api/ai_assistant/api_ai_memory_bank_history_api_ai_assistant_memory_bank_last_conversation_get.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from uuid import UUID import httpx @@ -16,7 +17,7 @@ def _get_kwargs( *, limit: int | Unset = 5, offset: int | Unset = 0, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -75,7 +76,7 @@ def sync_detailed( client: AuthenticatedClient | Client, limit: int | Unset = 5, offset: int | Unset = 0, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | MemoryBankLastConversationResponse]: """Fetch memory bank AI conversation history @@ -88,7 +89,7 @@ def sync_detailed( Args: limit (int | Unset): Max turns. Default: 5. offset (int | Unset): Skip count. Default: 0. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -116,7 +117,7 @@ def sync( client: AuthenticatedClient | Client, limit: int | Unset = 5, offset: int | Unset = 0, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | MemoryBankLastConversationResponse | None: """Fetch memory bank AI conversation history @@ -129,7 +130,7 @@ def sync( Args: limit (int | Unset): Max turns. Default: 5. offset (int | Unset): Skip count. Default: 0. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -152,7 +153,7 @@ async def asyncio_detailed( client: AuthenticatedClient | Client, limit: int | Unset = 5, offset: int | Unset = 0, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | MemoryBankLastConversationResponse]: """Fetch memory bank AI conversation history @@ -165,7 +166,7 @@ async def asyncio_detailed( Args: limit (int | Unset): Max turns. Default: 5. offset (int | Unset): Skip count. Default: 0. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -191,7 +192,7 @@ async def asyncio( client: AuthenticatedClient | Client, limit: int | Unset = 5, offset: int | Unset = 0, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | MemoryBankLastConversationResponse | None: """Fetch memory bank AI conversation history @@ -204,7 +205,7 @@ async def asyncio( Args: limit (int | Unset): Max turns. Default: 5. offset (int | Unset): Skip count. Default: 0. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/ai_assistant/api_ai_solution_api_ai_assistant_solution_post.py b/seclai/_generated/api/ai_assistant/api_ai_solution_api_ai_assistant_solution_post.py index 00e2da9..ec42383 100644 --- a/seclai/_generated/api/ai_assistant/api_ai_solution_api_ai_assistant_solution_post.py +++ b/seclai/_generated/api/ai_assistant/api_ai_solution_api_ai_assistant_solution_post.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from uuid import UUID import httpx @@ -14,7 +15,7 @@ def _get_kwargs( *, body: AiAssistantGenerateRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -67,7 +68,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[AiAssistantGenerateResponse | HTTPValidationError]: """Generate a solution plan (standalone) @@ -77,7 +78,7 @@ def sync_detailed( Auth: requires ``X-API-Key`` header or OAuth Bearer token. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: @@ -104,7 +105,7 @@ def sync( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> AiAssistantGenerateResponse | HTTPValidationError | None: """Generate a solution plan (standalone) @@ -114,7 +115,7 @@ def sync( Auth: requires ``X-API-Key`` header or OAuth Bearer token. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: @@ -136,7 +137,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[AiAssistantGenerateResponse | HTTPValidationError]: """Generate a solution plan (standalone) @@ -146,7 +147,7 @@ async def asyncio_detailed( Auth: requires ``X-API-Key`` header or OAuth Bearer token. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: @@ -171,7 +172,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> AiAssistantGenerateResponse | HTTPValidationError | None: """Generate a solution plan (standalone) @@ -181,7 +182,7 @@ async def asyncio( Auth: requires ``X-API-Key`` header or OAuth Bearer token. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: diff --git a/seclai/_generated/api/ai_assistant/api_ai_source_api_ai_assistant_source_post.py b/seclai/_generated/api/ai_assistant/api_ai_source_api_ai_assistant_source_post.py index 7700f96..57c697b 100644 --- a/seclai/_generated/api/ai_assistant/api_ai_source_api_ai_assistant_source_post.py +++ b/seclai/_generated/api/ai_assistant/api_ai_source_api_ai_assistant_source_post.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from uuid import UUID import httpx @@ -14,7 +15,7 @@ def _get_kwargs( *, body: AiAssistantGenerateRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -67,7 +68,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[AiAssistantGenerateResponse | HTTPValidationError]: """Generate a source plan (standalone) @@ -77,7 +78,7 @@ def sync_detailed( Auth: requires ``X-API-Key`` header or OAuth Bearer token. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: @@ -104,7 +105,7 @@ def sync( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> AiAssistantGenerateResponse | HTTPValidationError | None: """Generate a source plan (standalone) @@ -114,7 +115,7 @@ def sync( Auth: requires ``X-API-Key`` header or OAuth Bearer token. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: @@ -136,7 +137,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[AiAssistantGenerateResponse | HTTPValidationError]: """Generate a source plan (standalone) @@ -146,7 +147,7 @@ async def asyncio_detailed( Auth: requires ``X-API-Key`` header or OAuth Bearer token. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: @@ -171,7 +172,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> AiAssistantGenerateResponse | HTTPValidationError | None: """Generate a source plan (standalone) @@ -181,7 +182,7 @@ async def asyncio( Auth: requires ``X-API-Key`` header or OAuth Bearer token. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: diff --git a/seclai/_generated/api/alerts/add_alert_comment_api_alerts_alert_id_comments_post.py b/seclai/_generated/api/alerts/add_alert_comment_api_alerts_alert_id_comments_post.py index 943d7c4..856a512 100644 --- a/seclai/_generated/api/alerts/add_alert_comment_api_alerts_alert_id_comments_post.py +++ b/seclai/_generated/api/alerts/add_alert_comment_api_alerts_alert_id_comments_post.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -18,7 +19,7 @@ def _get_kwargs( alert_id: str, *, body: AddCommentRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -83,7 +84,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: AddCommentRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ AddAlertCommentApiAlertsAlertIdCommentsPostResponseAddAlertCommentApiAlertsAlertIdCommentsPost | HTTPValidationError @@ -98,7 +99,7 @@ def sync_detailed( Args: alert_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AddCommentRequest): Raises: @@ -127,7 +128,7 @@ def sync( *, client: AuthenticatedClient | Client, body: AddCommentRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ( AddAlertCommentApiAlertsAlertIdCommentsPostResponseAddAlertCommentApiAlertsAlertIdCommentsPost | HTTPValidationError @@ -143,7 +144,7 @@ def sync( Args: alert_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AddCommentRequest): Raises: @@ -167,7 +168,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: AddCommentRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ AddAlertCommentApiAlertsAlertIdCommentsPostResponseAddAlertCommentApiAlertsAlertIdCommentsPost | HTTPValidationError @@ -182,7 +183,7 @@ async def asyncio_detailed( Args: alert_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AddCommentRequest): Raises: @@ -209,7 +210,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: AddCommentRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ( AddAlertCommentApiAlertsAlertIdCommentsPostResponseAddAlertCommentApiAlertsAlertIdCommentsPost | HTTPValidationError @@ -225,7 +226,7 @@ async def asyncio( Args: alert_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AddCommentRequest): Raises: diff --git a/seclai/_generated/api/alerts/change_alert_status_api_alerts_alert_id_status_post.py b/seclai/_generated/api/alerts/change_alert_status_api_alerts_alert_id_status_post.py index d327a1d..b641349 100644 --- a/seclai/_generated/api/alerts/change_alert_status_api_alerts_alert_id_status_post.py +++ b/seclai/_generated/api/alerts/change_alert_status_api_alerts_alert_id_status_post.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -18,7 +19,7 @@ def _get_kwargs( alert_id: str, *, body: ChangeStatusRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -83,7 +84,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: ChangeStatusRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ ChangeAlertStatusApiAlertsAlertIdStatusPostResponseChangeAlertStatusApiAlertsAlertIdStatusPost | HTTPValidationError @@ -97,7 +98,7 @@ def sync_detailed( Args: alert_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (ChangeStatusRequest): Raises: @@ -126,7 +127,7 @@ def sync( *, client: AuthenticatedClient | Client, body: ChangeStatusRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ( ChangeAlertStatusApiAlertsAlertIdStatusPostResponseChangeAlertStatusApiAlertsAlertIdStatusPost | HTTPValidationError @@ -141,7 +142,7 @@ def sync( Args: alert_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (ChangeStatusRequest): Raises: @@ -165,7 +166,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: ChangeStatusRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ ChangeAlertStatusApiAlertsAlertIdStatusPostResponseChangeAlertStatusApiAlertsAlertIdStatusPost | HTTPValidationError @@ -179,7 +180,7 @@ async def asyncio_detailed( Args: alert_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (ChangeStatusRequest): Raises: @@ -206,7 +207,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: ChangeStatusRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ( ChangeAlertStatusApiAlertsAlertIdStatusPostResponseChangeAlertStatusApiAlertsAlertIdStatusPost | HTTPValidationError @@ -221,7 +222,7 @@ async def asyncio( Args: alert_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (ChangeStatusRequest): Raises: diff --git a/seclai/_generated/api/alerts/create_alert_config_api_alerts_configs_post.py b/seclai/_generated/api/alerts/create_alert_config_api_alerts_configs_post.py index fbf4b5e..8de8ea1 100644 --- a/seclai/_generated/api/alerts/create_alert_config_api_alerts_configs_post.py +++ b/seclai/_generated/api/alerts/create_alert_config_api_alerts_configs_post.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from uuid import UUID import httpx @@ -16,7 +17,7 @@ def _get_kwargs( *, body: CreateAlertConfigRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -78,7 +79,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: CreateAlertConfigRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ CreateAlertConfigApiAlertsConfigsPostResponseCreateAlertConfigApiAlertsConfigsPost | HTTPValidationError @@ -100,7 +101,7 @@ def sync_detailed( - Requires `X-API-Key` header or OAuth Bearer token. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (CreateAlertConfigRequest): Raises: @@ -127,7 +128,7 @@ def sync( *, client: AuthenticatedClient | Client, body: CreateAlertConfigRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ( CreateAlertConfigApiAlertsConfigsPostResponseCreateAlertConfigApiAlertsConfigsPost | HTTPValidationError @@ -150,7 +151,7 @@ def sync( - Requires `X-API-Key` header or OAuth Bearer token. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (CreateAlertConfigRequest): Raises: @@ -172,7 +173,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: CreateAlertConfigRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ CreateAlertConfigApiAlertsConfigsPostResponseCreateAlertConfigApiAlertsConfigsPost | HTTPValidationError @@ -194,7 +195,7 @@ async def asyncio_detailed( - Requires `X-API-Key` header or OAuth Bearer token. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (CreateAlertConfigRequest): Raises: @@ -219,7 +220,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: CreateAlertConfigRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ( CreateAlertConfigApiAlertsConfigsPostResponseCreateAlertConfigApiAlertsConfigsPost | HTTPValidationError @@ -242,7 +243,7 @@ async def asyncio( - Requires `X-API-Key` header or OAuth Bearer token. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (CreateAlertConfigRequest): Raises: diff --git a/seclai/_generated/api/alerts/delete_alert_config_api_alerts_configs_config_id_delete.py b/seclai/_generated/api/alerts/delete_alert_config_api_alerts_configs_config_id_delete.py index 5a1af0e..989c142 100644 --- a/seclai/_generated/api/alerts/delete_alert_config_api_alerts_configs_config_id_delete.py +++ b/seclai/_generated/api/alerts/delete_alert_config_api_alerts_configs_config_id_delete.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any, cast from urllib.parse import quote +from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( config_id: str, *, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -63,7 +64,7 @@ def sync_detailed( config_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Delete alert config @@ -75,7 +76,7 @@ def sync_detailed( Args: config_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -101,7 +102,7 @@ def sync( config_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Delete alert config @@ -113,7 +114,7 @@ def sync( Args: config_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -134,7 +135,7 @@ async def asyncio_detailed( config_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Delete alert config @@ -146,7 +147,7 @@ async def asyncio_detailed( Args: config_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -170,7 +171,7 @@ async def asyncio( config_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Delete alert config @@ -182,7 +183,7 @@ async def asyncio( Args: config_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/alerts/get_alert_config_api_alerts_configs_config_id_get.py b/seclai/_generated/api/alerts/get_alert_config_api_alerts_configs_config_id_get.py index 58c371f..e58e6b7 100644 --- a/seclai/_generated/api/alerts/get_alert_config_api_alerts_configs_config_id_get.py +++ b/seclai/_generated/api/alerts/get_alert_config_api_alerts_configs_config_id_get.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -16,7 +17,7 @@ def _get_kwargs( config_id: str, *, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -76,7 +77,7 @@ def sync_detailed( config_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ GetAlertConfigApiAlertsConfigsConfigIdGetResponseGetAlertConfigApiAlertsConfigsConfigIdGet | HTTPValidationError @@ -93,7 +94,7 @@ def sync_detailed( Args: config_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -119,7 +120,7 @@ def sync( config_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ( GetAlertConfigApiAlertsConfigsConfigIdGetResponseGetAlertConfigApiAlertsConfigsConfigIdGet | HTTPValidationError @@ -137,7 +138,7 @@ def sync( Args: config_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -158,7 +159,7 @@ async def asyncio_detailed( config_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ GetAlertConfigApiAlertsConfigsConfigIdGetResponseGetAlertConfigApiAlertsConfigsConfigIdGet | HTTPValidationError @@ -175,7 +176,7 @@ async def asyncio_detailed( Args: config_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -199,7 +200,7 @@ async def asyncio( config_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ( GetAlertConfigApiAlertsConfigsConfigIdGetResponseGetAlertConfigApiAlertsConfigsConfigIdGet | HTTPValidationError @@ -217,7 +218,7 @@ async def asyncio( Args: config_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/alerts/get_alert_detail_api_alerts_alert_id_get.py b/seclai/_generated/api/alerts/get_alert_detail_api_alerts_alert_id_get.py index 6c07a35..281e16c 100644 --- a/seclai/_generated/api/alerts/get_alert_detail_api_alerts_alert_id_get.py +++ b/seclai/_generated/api/alerts/get_alert_detail_api_alerts_alert_id_get.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -16,7 +17,7 @@ def _get_kwargs( alert_id: str, *, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -76,7 +77,7 @@ def sync_detailed( alert_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ GetAlertDetailApiAlertsAlertIdGetResponseGetAlertDetailApiAlertsAlertIdGet | HTTPValidationError @@ -90,7 +91,7 @@ def sync_detailed( Args: alert_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -116,7 +117,7 @@ def sync( alert_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ( GetAlertDetailApiAlertsAlertIdGetResponseGetAlertDetailApiAlertsAlertIdGet | HTTPValidationError @@ -131,7 +132,7 @@ def sync( Args: alert_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -152,7 +153,7 @@ async def asyncio_detailed( alert_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ GetAlertDetailApiAlertsAlertIdGetResponseGetAlertDetailApiAlertsAlertIdGet | HTTPValidationError @@ -166,7 +167,7 @@ async def asyncio_detailed( Args: alert_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -190,7 +191,7 @@ async def asyncio( alert_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ( GetAlertDetailApiAlertsAlertIdGetResponseGetAlertDetailApiAlertsAlertIdGet | HTTPValidationError @@ -205,7 +206,7 @@ async def asyncio( Args: alert_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/alerts/list_alert_configs_api_alerts_configs_get.py b/seclai/_generated/api/alerts/list_alert_configs_api_alerts_configs_get.py index 7405dbc..7bd8d04 100644 --- a/seclai/_generated/api/alerts/list_alert_configs_api_alerts_configs_get.py +++ b/seclai/_generated/api/alerts/list_alert_configs_api_alerts_configs_get.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from uuid import UUID import httpx @@ -17,7 +18,7 @@ def _get_kwargs( agent_id: None | str | Unset = UNSET, source_connection_id: None | str | Unset = UNSET, scope: None | str | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -103,7 +104,7 @@ def sync_detailed( agent_id: None | str | Unset = UNSET, source_connection_id: None | str | Unset = UNSET, scope: None | str | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ HTTPValidationError | ListAlertConfigsApiAlertsConfigsGetResponseListAlertConfigsApiAlertsConfigsGet @@ -129,7 +130,7 @@ def sync_detailed( agent_id (None | str | Unset): Filter by agent ID source_connection_id (None | str | Unset): Filter by source connection ID scope (None | str | Unset): Set to 'source' to list account-level source alert configs - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -159,7 +160,7 @@ def sync( agent_id: None | str | Unset = UNSET, source_connection_id: None | str | Unset = UNSET, scope: None | str | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ( HTTPValidationError | ListAlertConfigsApiAlertsConfigsGetResponseListAlertConfigsApiAlertsConfigsGet @@ -186,7 +187,7 @@ def sync( agent_id (None | str | Unset): Filter by agent ID source_connection_id (None | str | Unset): Filter by source connection ID scope (None | str | Unset): Set to 'source' to list account-level source alert configs - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -211,7 +212,7 @@ async def asyncio_detailed( agent_id: None | str | Unset = UNSET, source_connection_id: None | str | Unset = UNSET, scope: None | str | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ HTTPValidationError | ListAlertConfigsApiAlertsConfigsGetResponseListAlertConfigsApiAlertsConfigsGet @@ -237,7 +238,7 @@ async def asyncio_detailed( agent_id (None | str | Unset): Filter by agent ID source_connection_id (None | str | Unset): Filter by source connection ID scope (None | str | Unset): Set to 'source' to list account-level source alert configs - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -265,7 +266,7 @@ async def asyncio( agent_id: None | str | Unset = UNSET, source_connection_id: None | str | Unset = UNSET, scope: None | str | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ( HTTPValidationError | ListAlertConfigsApiAlertsConfigsGetResponseListAlertConfigsApiAlertsConfigsGet @@ -292,7 +293,7 @@ async def asyncio( agent_id (None | str | Unset): Filter by agent ID source_connection_id (None | str | Unset): Filter by source connection ID scope (None | str | Unset): Set to 'source' to list account-level source alert configs - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/alerts/list_alerts_api_alerts_get.py b/seclai/_generated/api/alerts/list_alerts_api_alerts_get.py index b32e11b..130a142 100644 --- a/seclai/_generated/api/alerts/list_alerts_api_alerts_get.py +++ b/seclai/_generated/api/alerts/list_alerts_api_alerts_get.py @@ -1,6 +1,7 @@ import datetime from http import HTTPStatus from typing import Any +from uuid import UUID import httpx @@ -22,7 +23,7 @@ def _get_kwargs( source_connection_id: None | str | Unset = UNSET, time_from: datetime.datetime | None | Unset = UNSET, time_to: datetime.datetime | None | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -129,7 +130,7 @@ def sync_detailed( source_connection_id: None | str | Unset = UNSET, time_from: datetime.datetime | None | Unset = UNSET, time_to: datetime.datetime | None | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ HTTPValidationError | ListAlertsApiAlertsGetResponseListAlertsApiAlertsGet ]: @@ -154,7 +155,7 @@ def sync_detailed( source_connection_id (None | str | Unset): Filter by source connection ID time_from (datetime.datetime | None | Unset): From (ISO 8601) time_to (datetime.datetime | None | Unset): To (ISO 8601) - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -192,7 +193,7 @@ def sync( source_connection_id: None | str | Unset = UNSET, time_from: datetime.datetime | None | Unset = UNSET, time_to: datetime.datetime | None | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | ListAlertsApiAlertsGetResponseListAlertsApiAlertsGet | None: """List alerts @@ -215,7 +216,7 @@ def sync( source_connection_id (None | str | Unset): Filter by source connection ID time_from (datetime.datetime | None | Unset): From (ISO 8601) time_to (datetime.datetime | None | Unset): To (ISO 8601) - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -248,7 +249,7 @@ async def asyncio_detailed( source_connection_id: None | str | Unset = UNSET, time_from: datetime.datetime | None | Unset = UNSET, time_to: datetime.datetime | None | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ HTTPValidationError | ListAlertsApiAlertsGetResponseListAlertsApiAlertsGet ]: @@ -273,7 +274,7 @@ async def asyncio_detailed( source_connection_id (None | str | Unset): Filter by source connection ID time_from (datetime.datetime | None | Unset): From (ISO 8601) time_to (datetime.datetime | None | Unset): To (ISO 8601) - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -309,7 +310,7 @@ async def asyncio( source_connection_id: None | str | Unset = UNSET, time_from: datetime.datetime | None | Unset = UNSET, time_to: datetime.datetime | None | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | ListAlertsApiAlertsGetResponseListAlertsApiAlertsGet | None: """List alerts @@ -332,7 +333,7 @@ async def asyncio( source_connection_id (None | str | Unset): Filter by source connection ID time_from (datetime.datetime | None | Unset): From (ISO 8601) time_to (datetime.datetime | None | Unset): To (ISO 8601) - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/alerts/list_organization_preferences_api_alerts_organization_preferences_list_get.py b/seclai/_generated/api/alerts/list_organization_preferences_api_alerts_organization_preferences_list_get.py index 58a43da..0e029d5 100644 --- a/seclai/_generated/api/alerts/list_organization_preferences_api_alerts_organization_preferences_list_get.py +++ b/seclai/_generated/api/alerts/list_organization_preferences_api_alerts_organization_preferences_list_get.py @@ -17,7 +17,7 @@ def _get_kwargs( *, organization_id: None | Unset | UUID = UNSET, include_defaults: bool | Unset = False, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -85,7 +85,7 @@ def sync_detailed( client: AuthenticatedClient | Client, organization_id: None | Unset | UUID = UNSET, include_defaults: bool | Unset = False, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | OrganizationAlertPreferenceListResponse]: """List organization alert delivery preferences @@ -102,7 +102,7 @@ def sync_detailed( organization_id (None | Unset | UUID): Optional organization filter include_defaults (bool | Unset): Include default subscribed entries for all alert types Default: False. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -130,7 +130,7 @@ def sync( client: AuthenticatedClient | Client, organization_id: None | Unset | UUID = UNSET, include_defaults: bool | Unset = False, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | OrganizationAlertPreferenceListResponse | None: """List organization alert delivery preferences @@ -147,7 +147,7 @@ def sync( organization_id (None | Unset | UUID): Optional organization filter include_defaults (bool | Unset): Include default subscribed entries for all alert types Default: False. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -170,7 +170,7 @@ async def asyncio_detailed( client: AuthenticatedClient | Client, organization_id: None | Unset | UUID = UNSET, include_defaults: bool | Unset = False, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | OrganizationAlertPreferenceListResponse]: """List organization alert delivery preferences @@ -187,7 +187,7 @@ async def asyncio_detailed( organization_id (None | Unset | UUID): Optional organization filter include_defaults (bool | Unset): Include default subscribed entries for all alert types Default: False. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -213,7 +213,7 @@ async def asyncio( client: AuthenticatedClient | Client, organization_id: None | Unset | UUID = UNSET, include_defaults: bool | Unset = False, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | OrganizationAlertPreferenceListResponse | None: """List organization alert delivery preferences @@ -230,7 +230,7 @@ async def asyncio( organization_id (None | Unset | UUID): Optional organization filter include_defaults (bool | Unset): Include default subscribed entries for all alert types Default: False. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/alerts/subscribe_to_alert_api_alerts_alert_id_subscribe_post.py b/seclai/_generated/api/alerts/subscribe_to_alert_api_alerts_alert_id_subscribe_post.py index e16fcc0..10f17ec 100644 --- a/seclai/_generated/api/alerts/subscribe_to_alert_api_alerts_alert_id_subscribe_post.py +++ b/seclai/_generated/api/alerts/subscribe_to_alert_api_alerts_alert_id_subscribe_post.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -16,7 +17,7 @@ def _get_kwargs( alert_id: str, *, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -76,7 +77,7 @@ def sync_detailed( alert_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ HTTPValidationError | SubscribeToAlertApiAlertsAlertIdSubscribePostResponseSubscribeToAlertApiAlertsAlertIdSubscribePost @@ -91,7 +92,7 @@ def sync_detailed( Args: alert_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -117,7 +118,7 @@ def sync( alert_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ( HTTPValidationError | SubscribeToAlertApiAlertsAlertIdSubscribePostResponseSubscribeToAlertApiAlertsAlertIdSubscribePost @@ -133,7 +134,7 @@ def sync( Args: alert_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -154,7 +155,7 @@ async def asyncio_detailed( alert_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ HTTPValidationError | SubscribeToAlertApiAlertsAlertIdSubscribePostResponseSubscribeToAlertApiAlertsAlertIdSubscribePost @@ -169,7 +170,7 @@ async def asyncio_detailed( Args: alert_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -193,7 +194,7 @@ async def asyncio( alert_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ( HTTPValidationError | SubscribeToAlertApiAlertsAlertIdSubscribePostResponseSubscribeToAlertApiAlertsAlertIdSubscribePost @@ -209,7 +210,7 @@ async def asyncio( Args: alert_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/alerts/unsubscribe_from_alert_api_alerts_alert_id_unsubscribe_post.py b/seclai/_generated/api/alerts/unsubscribe_from_alert_api_alerts_alert_id_unsubscribe_post.py index 5688f64..b7a1026 100644 --- a/seclai/_generated/api/alerts/unsubscribe_from_alert_api_alerts_alert_id_unsubscribe_post.py +++ b/seclai/_generated/api/alerts/unsubscribe_from_alert_api_alerts_alert_id_unsubscribe_post.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -16,7 +17,7 @@ def _get_kwargs( alert_id: str, *, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -76,7 +77,7 @@ def sync_detailed( alert_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ HTTPValidationError | UnsubscribeFromAlertApiAlertsAlertIdUnsubscribePostResponseUnsubscribeFromAlertApiAlertsAlertIdUnsubscribePost @@ -91,7 +92,7 @@ def sync_detailed( Args: alert_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -117,7 +118,7 @@ def sync( alert_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ( HTTPValidationError | UnsubscribeFromAlertApiAlertsAlertIdUnsubscribePostResponseUnsubscribeFromAlertApiAlertsAlertIdUnsubscribePost @@ -133,7 +134,7 @@ def sync( Args: alert_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -154,7 +155,7 @@ async def asyncio_detailed( alert_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ HTTPValidationError | UnsubscribeFromAlertApiAlertsAlertIdUnsubscribePostResponseUnsubscribeFromAlertApiAlertsAlertIdUnsubscribePost @@ -169,7 +170,7 @@ async def asyncio_detailed( Args: alert_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -193,7 +194,7 @@ async def asyncio( alert_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ( HTTPValidationError | UnsubscribeFromAlertApiAlertsAlertIdUnsubscribePostResponseUnsubscribeFromAlertApiAlertsAlertIdUnsubscribePost @@ -209,7 +210,7 @@ async def asyncio( Args: alert_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/alerts/update_alert_config_api_alerts_configs_config_id_patch.py b/seclai/_generated/api/alerts/update_alert_config_api_alerts_configs_config_id_patch.py index b43c36a..745d665 100644 --- a/seclai/_generated/api/alerts/update_alert_config_api_alerts_configs_config_id_patch.py +++ b/seclai/_generated/api/alerts/update_alert_config_api_alerts_configs_config_id_patch.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -18,7 +19,7 @@ def _get_kwargs( config_id: str, *, body: UpdateAlertConfigRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -83,7 +84,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: UpdateAlertConfigRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ HTTPValidationError | UpdateAlertConfigApiAlertsConfigsConfigIdPatchResponseUpdateAlertConfigApiAlertsConfigsConfigIdPatch @@ -97,7 +98,7 @@ def sync_detailed( Args: config_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UpdateAlertConfigRequest): Raises: @@ -126,7 +127,7 @@ def sync( *, client: AuthenticatedClient | Client, body: UpdateAlertConfigRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ( HTTPValidationError | UpdateAlertConfigApiAlertsConfigsConfigIdPatchResponseUpdateAlertConfigApiAlertsConfigsConfigIdPatch @@ -141,7 +142,7 @@ def sync( Args: config_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UpdateAlertConfigRequest): Raises: @@ -165,7 +166,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: UpdateAlertConfigRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ HTTPValidationError | UpdateAlertConfigApiAlertsConfigsConfigIdPatchResponseUpdateAlertConfigApiAlertsConfigsConfigIdPatch @@ -179,7 +180,7 @@ async def asyncio_detailed( Args: config_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UpdateAlertConfigRequest): Raises: @@ -206,7 +207,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: UpdateAlertConfigRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ( HTTPValidationError | UpdateAlertConfigApiAlertsConfigsConfigIdPatchResponseUpdateAlertConfigApiAlertsConfigsConfigIdPatch @@ -221,7 +222,7 @@ async def asyncio( Args: config_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UpdateAlertConfigRequest): Raises: diff --git a/seclai/_generated/api/alerts/update_organization_preference_api_alerts_organization_preferences_organization_id_alert_type_patch.py b/seclai/_generated/api/alerts/update_organization_preference_api_alerts_organization_preferences_organization_id_alert_type_patch.py index d5fd227..1a6244c 100644 --- a/seclai/_generated/api/alerts/update_organization_preference_api_alerts_organization_preferences_organization_id_alert_type_patch.py +++ b/seclai/_generated/api/alerts/update_organization_preference_api_alerts_organization_preferences_organization_id_alert_type_patch.py @@ -22,7 +22,7 @@ def _get_kwargs( alert_type: str, *, body: UpdateOrganizationAlertPreferenceRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -80,7 +80,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: UpdateOrganizationAlertPreferenceRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | OrganizationAlertPreferenceResponse]: """Update organization alert delivery preference @@ -96,7 +96,7 @@ def sync_detailed( Args: organization_id (UUID): alert_type (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UpdateOrganizationAlertPreferenceRequest): Raises: @@ -127,7 +127,7 @@ def sync( *, client: AuthenticatedClient | Client, body: UpdateOrganizationAlertPreferenceRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | OrganizationAlertPreferenceResponse | None: """Update organization alert delivery preference @@ -143,7 +143,7 @@ def sync( Args: organization_id (UUID): alert_type (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UpdateOrganizationAlertPreferenceRequest): Raises: @@ -169,7 +169,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: UpdateOrganizationAlertPreferenceRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | OrganizationAlertPreferenceResponse]: """Update organization alert delivery preference @@ -185,7 +185,7 @@ async def asyncio_detailed( Args: organization_id (UUID): alert_type (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UpdateOrganizationAlertPreferenceRequest): Raises: @@ -214,7 +214,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: UpdateOrganizationAlertPreferenceRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | OrganizationAlertPreferenceResponse | None: """Update organization alert delivery preference @@ -230,7 +230,7 @@ async def asyncio( Args: organization_id (UUID): alert_type (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UpdateOrganizationAlertPreferenceRequest): Raises: diff --git a/seclai/_generated/api/contents/delete_content_api_contents_source_connection_content_version_delete.py b/seclai/_generated/api/contents/delete_content_api_contents_source_connection_content_version_delete.py index 4e8f21e..86481c3 100644 --- a/seclai/_generated/api/contents/delete_content_api_contents_source_connection_content_version_delete.py +++ b/seclai/_generated/api/contents/delete_content_api_contents_source_connection_content_version_delete.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any, cast from urllib.parse import quote +from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( source_connection_content_version: str, *, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -65,7 +66,7 @@ def sync_detailed( source_connection_content_version: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Delete content @@ -80,7 +81,7 @@ def sync_detailed( Args: source_connection_content_version (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -106,7 +107,7 @@ def sync( source_connection_content_version: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Delete content @@ -121,7 +122,7 @@ def sync( Args: source_connection_content_version (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -142,7 +143,7 @@ async def asyncio_detailed( source_connection_content_version: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Delete content @@ -157,7 +158,7 @@ async def asyncio_detailed( Args: source_connection_content_version (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -181,7 +182,7 @@ async def asyncio( source_connection_content_version: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Delete content @@ -196,7 +197,7 @@ async def asyncio( Args: source_connection_content_version (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/contents/get_content_detail_api_contents_source_connection_content_version_get.py b/seclai/_generated/api/contents/get_content_detail_api_contents_source_connection_content_version_get.py index 7db6e0d..d2891b6 100644 --- a/seclai/_generated/api/contents/get_content_detail_api_contents_source_connection_content_version_get.py +++ b/seclai/_generated/api/contents/get_content_detail_api_contents_source_connection_content_version_get.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -16,7 +17,7 @@ def _get_kwargs( *, start: int | Unset = 0, end: int | Unset = 5000, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -80,7 +81,7 @@ def sync_detailed( client: AuthenticatedClient | Client, start: int | Unset = 0, end: int | Unset = 5000, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ContentDetailResponse | HTTPValidationError]: """Get content details @@ -102,7 +103,7 @@ def sync_detailed( source_connection_content_version (str): start (int | Unset): Default: 0. end (int | Unset): Default: 5000. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -132,7 +133,7 @@ def sync( client: AuthenticatedClient | Client, start: int | Unset = 0, end: int | Unset = 5000, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ContentDetailResponse | HTTPValidationError | None: """Get content details @@ -154,7 +155,7 @@ def sync( source_connection_content_version (str): start (int | Unset): Default: 0. end (int | Unset): Default: 5000. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -179,7 +180,7 @@ async def asyncio_detailed( client: AuthenticatedClient | Client, start: int | Unset = 0, end: int | Unset = 5000, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ContentDetailResponse | HTTPValidationError]: """Get content details @@ -201,7 +202,7 @@ async def asyncio_detailed( source_connection_content_version (str): start (int | Unset): Default: 0. end (int | Unset): Default: 5000. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -229,7 +230,7 @@ async def asyncio( client: AuthenticatedClient | Client, start: int | Unset = 0, end: int | Unset = 5000, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ContentDetailResponse | HTTPValidationError | None: """Get content details @@ -251,7 +252,7 @@ async def asyncio( source_connection_content_version (str): start (int | Unset): Default: 0. end (int | Unset): Default: 5000. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/contents/list_content_embeddings_api_contents_source_connection_content_version_embeddings_get.py b/seclai/_generated/api/contents/list_content_embeddings_api_contents_source_connection_content_version_embeddings_get.py index 0628395..7b2757c 100644 --- a/seclai/_generated/api/contents/list_content_embeddings_api_contents_source_connection_content_version_embeddings_get.py +++ b/seclai/_generated/api/contents/list_content_embeddings_api_contents_source_connection_content_version_embeddings_get.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -16,7 +17,7 @@ def _get_kwargs( *, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -80,7 +81,7 @@ def sync_detailed( client: AuthenticatedClient | Client, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ContentEmbeddingsListResponse | HTTPValidationError]: """List content embeddings @@ -97,7 +98,7 @@ def sync_detailed( source_connection_content_version (str): page (int | Unset): Default: 1. limit (int | Unset): Default: 20. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -127,7 +128,7 @@ def sync( client: AuthenticatedClient | Client, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ContentEmbeddingsListResponse | HTTPValidationError | None: """List content embeddings @@ -144,7 +145,7 @@ def sync( source_connection_content_version (str): page (int | Unset): Default: 1. limit (int | Unset): Default: 20. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -169,7 +170,7 @@ async def asyncio_detailed( client: AuthenticatedClient | Client, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ContentEmbeddingsListResponse | HTTPValidationError]: """List content embeddings @@ -186,7 +187,7 @@ async def asyncio_detailed( source_connection_content_version (str): page (int | Unset): Default: 1. limit (int | Unset): Default: 20. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -214,7 +215,7 @@ async def asyncio( client: AuthenticatedClient | Client, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ContentEmbeddingsListResponse | HTTPValidationError | None: """List content embeddings @@ -231,7 +232,7 @@ async def asyncio( source_connection_content_version (str): page (int | Unset): Default: 1. limit (int | Unset): Default: 20. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/contents/replace_content_with_inline_text_api_contents_source_connection_content_version_put.py b/seclai/_generated/api/contents/replace_content_with_inline_text_api_contents_source_connection_content_version_put.py index 214d65c..8844fdd 100644 --- a/seclai/_generated/api/contents/replace_content_with_inline_text_api_contents_source_connection_content_version_put.py +++ b/seclai/_generated/api/contents/replace_content_with_inline_text_api_contents_source_connection_content_version_put.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -16,7 +17,7 @@ def _get_kwargs( source_connection_content_version: str, *, body: InlineTextReplaceRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -74,7 +75,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: InlineTextReplaceRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[FileUploadResponse | HTTPValidationError]: """Replace a content version with inline text @@ -98,7 +99,7 @@ def sync_detailed( Args: source_connection_content_version (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (InlineTextReplaceRequest): Request model for inline text content replacement. Raises: @@ -127,7 +128,7 @@ def sync( *, client: AuthenticatedClient | Client, body: InlineTextReplaceRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> FileUploadResponse | HTTPValidationError | None: """Replace a content version with inline text @@ -151,7 +152,7 @@ def sync( Args: source_connection_content_version (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (InlineTextReplaceRequest): Request model for inline text content replacement. Raises: @@ -175,7 +176,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: InlineTextReplaceRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[FileUploadResponse | HTTPValidationError]: """Replace a content version with inline text @@ -199,7 +200,7 @@ async def asyncio_detailed( Args: source_connection_content_version (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (InlineTextReplaceRequest): Request model for inline text content replacement. Raises: @@ -226,7 +227,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: InlineTextReplaceRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> FileUploadResponse | HTTPValidationError | None: """Replace a content version with inline text @@ -250,7 +251,7 @@ async def asyncio( Args: source_connection_content_version (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (InlineTextReplaceRequest): Request model for inline text content replacement. Raises: diff --git a/seclai/_generated/api/contents/upload_file_to_content_api_contents_source_connection_content_version_upload_post.py b/seclai/_generated/api/contents/upload_file_to_content_api_contents_source_connection_content_version_upload_post.py index c9d18d8..596b7a1 100644 --- a/seclai/_generated/api/contents/upload_file_to_content_api_contents_source_connection_content_version_upload_post.py +++ b/seclai/_generated/api/contents/upload_file_to_content_api_contents_source_connection_content_version_upload_post.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -18,7 +19,7 @@ def _get_kwargs( source_connection_content_version: str, *, body: BodyUploadFileToContentApiContentsSourceConnectionContentVersionUploadPost, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -74,7 +75,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: BodyUploadFileToContentApiContentsSourceConnectionContentVersionUploadPost, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[FileUploadResponse | HTTPValidationError]: r"""Replace a content version with a new upload @@ -88,7 +89,6 @@ def sync_detailed( **Supported MIME types:** - `application/epub+zip` - `application/json` - - `application/msword` - `application/pdf` - `application/vnd.ms-excel` - `application/vnd.ms-outlook` @@ -135,7 +135,7 @@ def sync_detailed( Args: source_connection_content_version (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (BodyUploadFileToContentApiContentsSourceConnectionContentVersionUploadPost): Raises: @@ -164,7 +164,7 @@ def sync( *, client: AuthenticatedClient | Client, body: BodyUploadFileToContentApiContentsSourceConnectionContentVersionUploadPost, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> FileUploadResponse | HTTPValidationError | None: r"""Replace a content version with a new upload @@ -178,7 +178,6 @@ def sync( **Supported MIME types:** - `application/epub+zip` - `application/json` - - `application/msword` - `application/pdf` - `application/vnd.ms-excel` - `application/vnd.ms-outlook` @@ -225,7 +224,7 @@ def sync( Args: source_connection_content_version (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (BodyUploadFileToContentApiContentsSourceConnectionContentVersionUploadPost): Raises: @@ -249,7 +248,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: BodyUploadFileToContentApiContentsSourceConnectionContentVersionUploadPost, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[FileUploadResponse | HTTPValidationError]: r"""Replace a content version with a new upload @@ -263,7 +262,6 @@ async def asyncio_detailed( **Supported MIME types:** - `application/epub+zip` - `application/json` - - `application/msword` - `application/pdf` - `application/vnd.ms-excel` - `application/vnd.ms-outlook` @@ -310,7 +308,7 @@ async def asyncio_detailed( Args: source_connection_content_version (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (BodyUploadFileToContentApiContentsSourceConnectionContentVersionUploadPost): Raises: @@ -337,7 +335,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: BodyUploadFileToContentApiContentsSourceConnectionContentVersionUploadPost, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> FileUploadResponse | HTTPValidationError | None: r"""Replace a content version with a new upload @@ -351,7 +349,6 @@ async def asyncio( **Supported MIME types:** - `application/epub+zip` - `application/json` - - `application/msword` - `application/pdf` - `application/vnd.ms-excel` - `application/vnd.ms-outlook` @@ -398,7 +395,7 @@ async def asyncio( Args: source_connection_content_version (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (BodyUploadFileToContentApiContentsSourceConnectionContentVersionUploadPost): Raises: diff --git a/seclai/_generated/api/governance/governance_ai_accept_api_governance_ai_assistant_conversation_id_accept_post.py b/seclai/_generated/api/governance/governance_ai_accept_api_governance_ai_assistant_conversation_id_accept_post.py index 59948d8..f3691e0 100644 --- a/seclai/_generated/api/governance/governance_ai_accept_api_governance_ai_assistant_conversation_id_accept_post.py +++ b/seclai/_generated/api/governance/governance_ai_accept_api_governance_ai_assistant_conversation_id_accept_post.py @@ -15,7 +15,7 @@ def _get_kwargs( conversation_id: UUID, *, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -74,7 +74,7 @@ def sync_detailed( conversation_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | GovernanceAiAcceptResponse | HTTPValidationError]: """Accept a governance plan @@ -85,7 +85,7 @@ def sync_detailed( Args: conversation_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -111,7 +111,7 @@ def sync( conversation_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | GovernanceAiAcceptResponse | HTTPValidationError | None: """Accept a governance plan @@ -122,7 +122,7 @@ def sync( Args: conversation_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -143,7 +143,7 @@ async def asyncio_detailed( conversation_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | GovernanceAiAcceptResponse | HTTPValidationError]: """Accept a governance plan @@ -154,7 +154,7 @@ async def asyncio_detailed( Args: conversation_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -178,7 +178,7 @@ async def asyncio( conversation_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | GovernanceAiAcceptResponse | HTTPValidationError | None: """Accept a governance plan @@ -189,7 +189,7 @@ async def asyncio( Args: conversation_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/governance/governance_ai_decline_api_governance_ai_assistant_conversation_id_decline_post.py b/seclai/_generated/api/governance/governance_ai_decline_api_governance_ai_assistant_conversation_id_decline_post.py index cd43b86..8c94324 100644 --- a/seclai/_generated/api/governance/governance_ai_decline_api_governance_ai_assistant_conversation_id_decline_post.py +++ b/seclai/_generated/api/governance/governance_ai_decline_api_governance_ai_assistant_conversation_id_decline_post.py @@ -14,7 +14,7 @@ def _get_kwargs( conversation_id: UUID, *, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -72,7 +72,7 @@ def sync_detailed( conversation_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Decline a governance plan @@ -83,7 +83,7 @@ def sync_detailed( Args: conversation_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -109,7 +109,7 @@ def sync( conversation_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Decline a governance plan @@ -120,7 +120,7 @@ def sync( Args: conversation_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -141,7 +141,7 @@ async def asyncio_detailed( conversation_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Decline a governance plan @@ -152,7 +152,7 @@ async def asyncio_detailed( Args: conversation_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -176,7 +176,7 @@ async def asyncio( conversation_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Decline a governance plan @@ -187,7 +187,7 @@ async def asyncio( Args: conversation_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/governance/governance_ai_generate_api_governance_ai_assistant_post.py b/seclai/_generated/api/governance/governance_ai_generate_api_governance_ai_assistant_post.py index 114ab3f..93570fa 100644 --- a/seclai/_generated/api/governance/governance_ai_generate_api_governance_ai_assistant_post.py +++ b/seclai/_generated/api/governance/governance_ai_generate_api_governance_ai_assistant_post.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from uuid import UUID import httpx @@ -14,7 +15,7 @@ def _get_kwargs( *, body: GovernanceAiAssistantRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -75,7 +76,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: GovernanceAiAssistantRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | GovernanceAiAssistantResponse | HTTPValidationError]: """Generate a governance plan @@ -85,7 +86,7 @@ def sync_detailed( Auth: requires `X-API-Key` header or OAuth Bearer token with governance access. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (GovernanceAiAssistantRequest): Request body for the governance AI assistant. Raises: @@ -112,7 +113,7 @@ def sync( *, client: AuthenticatedClient | Client, body: GovernanceAiAssistantRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | GovernanceAiAssistantResponse | HTTPValidationError | None: """Generate a governance plan @@ -122,7 +123,7 @@ def sync( Auth: requires `X-API-Key` header or OAuth Bearer token with governance access. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (GovernanceAiAssistantRequest): Request body for the governance AI assistant. Raises: @@ -144,7 +145,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: GovernanceAiAssistantRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | GovernanceAiAssistantResponse | HTTPValidationError]: """Generate a governance plan @@ -154,7 +155,7 @@ async def asyncio_detailed( Auth: requires `X-API-Key` header or OAuth Bearer token with governance access. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (GovernanceAiAssistantRequest): Request body for the governance AI assistant. Raises: @@ -179,7 +180,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: GovernanceAiAssistantRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | GovernanceAiAssistantResponse | HTTPValidationError | None: """Generate a governance plan @@ -189,7 +190,7 @@ async def asyncio( Auth: requires `X-API-Key` header or OAuth Bearer token with governance access. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (GovernanceAiAssistantRequest): Request body for the governance AI assistant. Raises: diff --git a/seclai/_generated/api/governance/list_governance_ai_conversations_api_governance_ai_assistant_conversations_get.py b/seclai/_generated/api/governance/list_governance_ai_conversations_api_governance_ai_assistant_conversations_get.py index 1b46f70..cef3677 100644 --- a/seclai/_generated/api/governance/list_governance_ai_conversations_api_governance_ai_assistant_conversations_get.py +++ b/seclai/_generated/api/governance/list_governance_ai_conversations_api_governance_ai_assistant_conversations_get.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( *, limit: int | Unset = 20, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -80,7 +81,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, limit: int | Unset = 20, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError | list[GovernanceConversationResponse]]: """List AI assistant conversations @@ -90,7 +91,7 @@ def sync_detailed( Args: limit (int | Unset): Number of conversations. Default: 20. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -116,7 +117,7 @@ def sync( *, client: AuthenticatedClient | Client, limit: int | Unset = 20, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | list[GovernanceConversationResponse] | None: """List AI assistant conversations @@ -126,7 +127,7 @@ def sync( Args: limit (int | Unset): Number of conversations. Default: 20. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -147,7 +148,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, limit: int | Unset = 20, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError | list[GovernanceConversationResponse]]: """List AI assistant conversations @@ -157,7 +158,7 @@ async def asyncio_detailed( Args: limit (int | Unset): Number of conversations. Default: 20. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -181,7 +182,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, limit: int | Unset = 20, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | list[GovernanceConversationResponse] | None: """List AI assistant conversations @@ -191,7 +192,7 @@ async def asyncio( Args: limit (int | Unset): Number of conversations. Default: 20. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/identity/get_me_api_me_get.py b/seclai/_generated/api/identity/get_me_api_me_get.py index da0549a..4847303 100644 --- a/seclai/_generated/api/identity/get_me_api_me_get.py +++ b/seclai/_generated/api/identity/get_me_api_me_get.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from uuid import UUID import httpx @@ -11,7 +12,7 @@ def _get_kwargs( *, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -54,16 +55,16 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[MeResponse]: """Get current user identity - Returns the authenticated user's personal account ID and a list of organizations they belong to. - Each organization entry includes the organization's id, name, and account_id. Useful for CLI tooling - that needs to let the user pick an organization context. + Returns the authenticated user's personal account ID and a list of organisations they belong to. + Each organisation entry includes the organisation's own id, display name, and account_id. Useful + for CLI tooling that needs to let the user pick an org context. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -87,16 +88,16 @@ def sync_detailed( def sync( *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> MeResponse | None: """Get current user identity - Returns the authenticated user's personal account ID and a list of organizations they belong to. - Each organization entry includes the organization's id, name, and account_id. Useful for CLI tooling - that needs to let the user pick an organization context. + Returns the authenticated user's personal account ID and a list of organisations they belong to. + Each organisation entry includes the organisation's own id, display name, and account_id. Useful + for CLI tooling that needs to let the user pick an org context. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -115,16 +116,16 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[MeResponse]: """Get current user identity - Returns the authenticated user's personal account ID and a list of organizations they belong to. - Each organization entry includes the organization's id, name, and account_id. Useful for CLI tooling - that needs to let the user pick an organization context. + Returns the authenticated user's personal account ID and a list of organisations they belong to. + Each organisation entry includes the organisation's own id, display name, and account_id. Useful + for CLI tooling that needs to let the user pick an org context. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -146,16 +147,16 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> MeResponse | None: """Get current user identity - Returns the authenticated user's personal account ID and a list of organizations they belong to. - Each organization entry includes the organization's id, name, and account_id. Useful for CLI tooling - that needs to let the user pick an organization context. + Returns the authenticated user's personal account ID and a list of organisations they belong to. + Each organisation entry includes the organisation's own id, display name, and account_id. Useful + for CLI tooling that needs to let the user pick an org context. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/knowledge_bases/create_knowledge_base_api_knowledge_bases_post.py b/seclai/_generated/api/knowledge_bases/create_knowledge_base_api_knowledge_bases_post.py index 6393085..6ed772e 100644 --- a/seclai/_generated/api/knowledge_bases/create_knowledge_base_api_knowledge_bases_post.py +++ b/seclai/_generated/api/knowledge_bases/create_knowledge_base_api_knowledge_bases_post.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from uuid import UUID import httpx @@ -14,7 +15,7 @@ def _get_kwargs( *, body: CreateKnowledgeBaseBody, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -71,7 +72,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: CreateKnowledgeBaseBody, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError | KnowledgeBase]: """Create Knowledge Base @@ -80,7 +81,7 @@ def sync_detailed( At least one `source_id` is required. The source connections must belong to the same account. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (CreateKnowledgeBaseBody): Request body for creating a knowledge base. Raises: @@ -107,7 +108,7 @@ def sync( *, client: AuthenticatedClient | Client, body: CreateKnowledgeBaseBody, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | KnowledgeBase | None: """Create Knowledge Base @@ -116,7 +117,7 @@ def sync( At least one `source_id` is required. The source connections must belong to the same account. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (CreateKnowledgeBaseBody): Request body for creating a knowledge base. Raises: @@ -138,7 +139,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: CreateKnowledgeBaseBody, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError | KnowledgeBase]: """Create Knowledge Base @@ -147,7 +148,7 @@ async def asyncio_detailed( At least one `source_id` is required. The source connections must belong to the same account. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (CreateKnowledgeBaseBody): Request body for creating a knowledge base. Raises: @@ -172,7 +173,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: CreateKnowledgeBaseBody, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | KnowledgeBase | None: """Create Knowledge Base @@ -181,7 +182,7 @@ async def asyncio( At least one `source_id` is required. The source connections must belong to the same account. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (CreateKnowledgeBaseBody): Request body for creating a knowledge base. Raises: diff --git a/seclai/_generated/api/knowledge_bases/delete_knowledge_base_api_knowledge_bases_knowledge_base_id_delete.py b/seclai/_generated/api/knowledge_bases/delete_knowledge_base_api_knowledge_bases_knowledge_base_id_delete.py index 67b24f2..39702c1 100644 --- a/seclai/_generated/api/knowledge_bases/delete_knowledge_base_api_knowledge_bases_knowledge_base_id_delete.py +++ b/seclai/_generated/api/knowledge_bases/delete_knowledge_base_api_knowledge_bases_knowledge_base_id_delete.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any, cast from urllib.parse import quote +from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( knowledge_base_id: str, *, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -63,7 +64,7 @@ def sync_detailed( knowledge_base_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Delete Knowledge Base @@ -74,7 +75,7 @@ def sync_detailed( Args: knowledge_base_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -100,7 +101,7 @@ def sync( knowledge_base_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Delete Knowledge Base @@ -111,7 +112,7 @@ def sync( Args: knowledge_base_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -132,7 +133,7 @@ async def asyncio_detailed( knowledge_base_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Delete Knowledge Base @@ -143,7 +144,7 @@ async def asyncio_detailed( Args: knowledge_base_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -167,7 +168,7 @@ async def asyncio( knowledge_base_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Delete Knowledge Base @@ -178,7 +179,7 @@ async def asyncio( Args: knowledge_base_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/knowledge_bases/get_knowledge_base_api_knowledge_bases_knowledge_base_id_get.py b/seclai/_generated/api/knowledge_bases/get_knowledge_base_api_knowledge_bases_knowledge_base_id_get.py index ccb7aa1..a7f9821 100644 --- a/seclai/_generated/api/knowledge_bases/get_knowledge_base_api_knowledge_bases_knowledge_base_id_get.py +++ b/seclai/_generated/api/knowledge_bases/get_knowledge_base_api_knowledge_bases_knowledge_base_id_get.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -14,7 +15,7 @@ def _get_kwargs( knowledge_base_id: str, *, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -65,7 +66,7 @@ def sync_detailed( knowledge_base_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | KnowledgeBase]: """Get Knowledge Base @@ -77,7 +78,7 @@ def sync_detailed( Args: knowledge_base_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -103,7 +104,7 @@ def sync( knowledge_base_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | KnowledgeBase | None: """Get Knowledge Base @@ -115,7 +116,7 @@ def sync( Args: knowledge_base_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -136,7 +137,7 @@ async def asyncio_detailed( knowledge_base_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | KnowledgeBase]: """Get Knowledge Base @@ -148,7 +149,7 @@ async def asyncio_detailed( Args: knowledge_base_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -172,7 +173,7 @@ async def asyncio( knowledge_base_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | KnowledgeBase | None: """Get Knowledge Base @@ -184,7 +185,7 @@ async def asyncio( Args: knowledge_base_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/knowledge_bases/list_knowledge_bases_api_knowledge_bases_get.py b/seclai/_generated/api/knowledge_bases/list_knowledge_bases_api_knowledge_bases_get.py index 01c3aab..8243a6d 100644 --- a/seclai/_generated/api/knowledge_bases/list_knowledge_bases_api_knowledge_bases_get.py +++ b/seclai/_generated/api/knowledge_bases/list_knowledge_bases_api_knowledge_bases_get.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from uuid import UUID import httpx @@ -16,7 +17,7 @@ def _get_kwargs( limit: int | Unset = 20, sort: str | Unset = "created_at", order: str | Unset = "desc", - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -81,7 +82,7 @@ def sync_detailed( limit: int | Unset = 20, sort: str | Unset = "created_at", order: str | Unset = "desc", - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | KnowledgeBaseListResponseModel]: """List Knowledge Bases @@ -97,7 +98,7 @@ def sync_detailed( sort (str | Unset): Sort field. One of: created_at, updated_at, name. Default: 'created_at'. order (str | Unset): Sort direction: asc or desc. Default: 'desc'. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -129,7 +130,7 @@ def sync( limit: int | Unset = 20, sort: str | Unset = "created_at", order: str | Unset = "desc", - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | KnowledgeBaseListResponseModel | None: """List Knowledge Bases @@ -145,7 +146,7 @@ def sync( sort (str | Unset): Sort field. One of: created_at, updated_at, name. Default: 'created_at'. order (str | Unset): Sort direction: asc or desc. Default: 'desc'. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -172,7 +173,7 @@ async def asyncio_detailed( limit: int | Unset = 20, sort: str | Unset = "created_at", order: str | Unset = "desc", - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | KnowledgeBaseListResponseModel]: """List Knowledge Bases @@ -188,7 +189,7 @@ async def asyncio_detailed( sort (str | Unset): Sort field. One of: created_at, updated_at, name. Default: 'created_at'. order (str | Unset): Sort direction: asc or desc. Default: 'desc'. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -218,7 +219,7 @@ async def asyncio( limit: int | Unset = 20, sort: str | Unset = "created_at", order: str | Unset = "desc", - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | KnowledgeBaseListResponseModel | None: """List Knowledge Bases @@ -234,7 +235,7 @@ async def asyncio( sort (str | Unset): Sort field. One of: created_at, updated_at, name. Default: 'created_at'. order (str | Unset): Sort direction: asc or desc. Default: 'desc'. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/knowledge_bases/update_knowledge_base_api_knowledge_bases_knowledge_base_id_put.py b/seclai/_generated/api/knowledge_bases/update_knowledge_base_api_knowledge_bases_knowledge_base_id_put.py index 8776170..f8d1bca 100644 --- a/seclai/_generated/api/knowledge_bases/update_knowledge_base_api_knowledge_bases_knowledge_base_id_put.py +++ b/seclai/_generated/api/knowledge_bases/update_knowledge_base_api_knowledge_bases_knowledge_base_id_put.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -16,7 +17,7 @@ def _get_kwargs( knowledge_base_id: str, *, body: UpdateKnowledgeBaseBody, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -72,7 +73,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: UpdateKnowledgeBaseBody, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | KnowledgeBase]: """Update Knowledge Base @@ -85,7 +86,7 @@ def sync_detailed( Args: knowledge_base_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UpdateKnowledgeBaseBody): Request body for updating a knowledge base. Raises: @@ -114,7 +115,7 @@ def sync( *, client: AuthenticatedClient | Client, body: UpdateKnowledgeBaseBody, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | KnowledgeBase | None: """Update Knowledge Base @@ -127,7 +128,7 @@ def sync( Args: knowledge_base_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UpdateKnowledgeBaseBody): Request body for updating a knowledge base. Raises: @@ -151,7 +152,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: UpdateKnowledgeBaseBody, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | KnowledgeBase]: """Update Knowledge Base @@ -164,7 +165,7 @@ async def asyncio_detailed( Args: knowledge_base_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UpdateKnowledgeBaseBody): Request body for updating a knowledge base. Raises: @@ -191,7 +192,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: UpdateKnowledgeBaseBody, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | KnowledgeBase | None: """Update Knowledge Base @@ -204,7 +205,7 @@ async def asyncio( Args: knowledge_base_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UpdateKnowledgeBaseBody): Request body for updating a knowledge base. Raises: diff --git a/seclai/_generated/api/memory_banks/compact_memory_bank_api_memory_banks_memory_bank_id_compact_post.py b/seclai/_generated/api/memory_banks/compact_memory_bank_api_memory_banks_memory_bank_id_compact_post.py index a708a63..5bdb43a 100644 --- a/seclai/_generated/api/memory_banks/compact_memory_bank_api_memory_banks_memory_bank_id_compact_post.py +++ b/seclai/_generated/api/memory_banks/compact_memory_bank_api_memory_banks_memory_bank_id_compact_post.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -16,7 +17,7 @@ def _get_kwargs( memory_bank_id: str, *, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -76,7 +77,7 @@ def sync_detailed( memory_bank_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ CompactMemoryBankApiMemoryBanksMemoryBankIdCompactPostResponseCompactMemoryBankApiMemoryBanksMemoryBankIdCompactPost | HTTPValidationError @@ -90,7 +91,7 @@ def sync_detailed( Args: memory_bank_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -116,7 +117,7 @@ def sync( memory_bank_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ( CompactMemoryBankApiMemoryBanksMemoryBankIdCompactPostResponseCompactMemoryBankApiMemoryBanksMemoryBankIdCompactPost | HTTPValidationError @@ -131,7 +132,7 @@ def sync( Args: memory_bank_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -152,7 +153,7 @@ async def asyncio_detailed( memory_bank_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ CompactMemoryBankApiMemoryBanksMemoryBankIdCompactPostResponseCompactMemoryBankApiMemoryBanksMemoryBankIdCompactPost | HTTPValidationError @@ -166,7 +167,7 @@ async def asyncio_detailed( Args: memory_bank_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -190,7 +191,7 @@ async def asyncio( memory_bank_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ( CompactMemoryBankApiMemoryBanksMemoryBankIdCompactPostResponseCompactMemoryBankApiMemoryBanksMemoryBankIdCompactPost | HTTPValidationError @@ -205,7 +206,7 @@ async def asyncio( Args: memory_bank_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/memory_banks/create_memory_bank_api_memory_banks_post.py b/seclai/_generated/api/memory_banks/create_memory_bank_api_memory_banks_post.py index a9e077b..486f347 100644 --- a/seclai/_generated/api/memory_banks/create_memory_bank_api_memory_banks_post.py +++ b/seclai/_generated/api/memory_banks/create_memory_bank_api_memory_banks_post.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from uuid import UUID import httpx @@ -14,7 +15,7 @@ def _get_kwargs( *, body: CreateMemoryBankBody, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -67,7 +68,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: CreateMemoryBankBody, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | MemoryBank]: """Create Memory Bank @@ -77,7 +78,7 @@ def sync_detailed( (supply your own embedding params). Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (CreateMemoryBankBody): Request body for creating a memory bank. Raises: @@ -104,7 +105,7 @@ def sync( *, client: AuthenticatedClient | Client, body: CreateMemoryBankBody, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | MemoryBank | None: """Create Memory Bank @@ -114,7 +115,7 @@ def sync( (supply your own embedding params). Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (CreateMemoryBankBody): Request body for creating a memory bank. Raises: @@ -136,7 +137,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: CreateMemoryBankBody, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | MemoryBank]: """Create Memory Bank @@ -146,7 +147,7 @@ async def asyncio_detailed( (supply your own embedding params). Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (CreateMemoryBankBody): Request body for creating a memory bank. Raises: @@ -171,7 +172,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: CreateMemoryBankBody, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | MemoryBank | None: """Create Memory Bank @@ -181,7 +182,7 @@ async def asyncio( (supply your own embedding params). Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (CreateMemoryBankBody): Request body for creating a memory bank. Raises: diff --git a/seclai/_generated/api/memory_banks/delete_memory_bank_api_memory_banks_memory_bank_id_delete.py b/seclai/_generated/api/memory_banks/delete_memory_bank_api_memory_banks_memory_bank_id_delete.py index 70f4e04..811e36e 100644 --- a/seclai/_generated/api/memory_banks/delete_memory_bank_api_memory_banks_memory_bank_id_delete.py +++ b/seclai/_generated/api/memory_banks/delete_memory_bank_api_memory_banks_memory_bank_id_delete.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any, cast from urllib.parse import quote +from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( memory_bank_id: str, *, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -63,7 +64,7 @@ def sync_detailed( memory_bank_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Delete Memory Bank @@ -73,7 +74,7 @@ def sync_detailed( Args: memory_bank_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -99,7 +100,7 @@ def sync( memory_bank_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Delete Memory Bank @@ -109,7 +110,7 @@ def sync( Args: memory_bank_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -130,7 +131,7 @@ async def asyncio_detailed( memory_bank_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Delete Memory Bank @@ -140,7 +141,7 @@ async def asyncio_detailed( Args: memory_bank_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -164,7 +165,7 @@ async def asyncio( memory_bank_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Delete Memory Bank @@ -174,7 +175,7 @@ async def asyncio( Args: memory_bank_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/memory_banks/delete_memory_bank_source_api_memory_banks_memory_bank_id_source_delete.py b/seclai/_generated/api/memory_banks/delete_memory_bank_source_api_memory_banks_memory_bank_id_source_delete.py index 0d110e2..d7266e8 100644 --- a/seclai/_generated/api/memory_banks/delete_memory_bank_source_api_memory_banks_memory_bank_id_source_delete.py +++ b/seclai/_generated/api/memory_banks/delete_memory_bank_source_api_memory_banks_memory_bank_id_source_delete.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any, cast from urllib.parse import quote +from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( memory_bank_id: str, *, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -63,7 +64,7 @@ def sync_detailed( memory_bank_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Delete Memory Bank Source @@ -74,7 +75,7 @@ def sync_detailed( Args: memory_bank_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -100,7 +101,7 @@ def sync( memory_bank_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Delete Memory Bank Source @@ -111,7 +112,7 @@ def sync( Args: memory_bank_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -132,7 +133,7 @@ async def asyncio_detailed( memory_bank_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Delete Memory Bank Source @@ -143,7 +144,7 @@ async def asyncio_detailed( Args: memory_bank_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -167,7 +168,7 @@ async def asyncio( memory_bank_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Delete Memory Bank Source @@ -178,7 +179,7 @@ async def asyncio( Args: memory_bank_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/memory_banks/get_agents_using_bank_api_memory_banks_memory_bank_id_agents_get.py b/seclai/_generated/api/memory_banks/get_agents_using_bank_api_memory_banks_memory_bank_id_agents_get.py index b078a89..95d39e5 100644 --- a/seclai/_generated/api/memory_banks/get_agents_using_bank_api_memory_banks_memory_bank_id_agents_get.py +++ b/seclai/_generated/api/memory_banks/get_agents_using_bank_api_memory_banks_memory_bank_id_agents_get.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -16,7 +17,7 @@ def _get_kwargs( memory_bank_id: str, *, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -81,7 +82,7 @@ def sync_detailed( memory_bank_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ HTTPValidationError | list[GetAgentsUsingBankApiMemoryBanksMemoryBankIdAgentsGetResponse200Item] @@ -94,7 +95,7 @@ def sync_detailed( Args: memory_bank_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -120,7 +121,7 @@ def sync( memory_bank_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ( HTTPValidationError | list[GetAgentsUsingBankApiMemoryBanksMemoryBankIdAgentsGetResponse200Item] @@ -134,7 +135,7 @@ def sync( Args: memory_bank_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -155,7 +156,7 @@ async def asyncio_detailed( memory_bank_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ HTTPValidationError | list[GetAgentsUsingBankApiMemoryBanksMemoryBankIdAgentsGetResponse200Item] @@ -168,7 +169,7 @@ async def asyncio_detailed( Args: memory_bank_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -192,7 +193,7 @@ async def asyncio( memory_bank_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ( HTTPValidationError | list[GetAgentsUsingBankApiMemoryBanksMemoryBankIdAgentsGetResponse200Item] @@ -206,7 +207,7 @@ async def asyncio( Args: memory_bank_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/memory_banks/get_memory_bank_api_memory_banks_memory_bank_id_get.py b/seclai/_generated/api/memory_banks/get_memory_bank_api_memory_banks_memory_bank_id_get.py index 16d1b6c..59ac95d 100644 --- a/seclai/_generated/api/memory_banks/get_memory_bank_api_memory_banks_memory_bank_id_get.py +++ b/seclai/_generated/api/memory_banks/get_memory_bank_api_memory_banks_memory_bank_id_get.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -14,7 +15,7 @@ def _get_kwargs( memory_bank_id: str, *, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -65,7 +66,7 @@ def sync_detailed( memory_bank_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | MemoryBank]: """Get Memory Bank @@ -77,7 +78,7 @@ def sync_detailed( Args: memory_bank_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -103,7 +104,7 @@ def sync( memory_bank_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | MemoryBank | None: """Get Memory Bank @@ -115,7 +116,7 @@ def sync( Args: memory_bank_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -136,7 +137,7 @@ async def asyncio_detailed( memory_bank_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | MemoryBank]: """Get Memory Bank @@ -148,7 +149,7 @@ async def asyncio_detailed( Args: memory_bank_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -172,7 +173,7 @@ async def asyncio( memory_bank_id: str, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | MemoryBank | None: """Get Memory Bank @@ -184,7 +185,7 @@ async def asyncio( Args: memory_bank_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/memory_banks/get_memory_bank_entry_stats_api_memory_banks_memory_bank_id_stats_get.py b/seclai/_generated/api/memory_banks/get_memory_bank_entry_stats_api_memory_banks_memory_bank_id_stats_get.py index 756396e..db2e9bf 100644 --- a/seclai/_generated/api/memory_banks/get_memory_bank_entry_stats_api_memory_banks_memory_bank_id_stats_get.py +++ b/seclai/_generated/api/memory_banks/get_memory_bank_entry_stats_api_memory_banks_memory_bank_id_stats_get.py @@ -2,6 +2,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -20,7 +21,7 @@ def _get_kwargs( days: int | Unset = 30, start_date: datetime.date | None | Unset = UNSET, end_date: datetime.date | None | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -108,7 +109,7 @@ def sync_detailed( days: int | Unset = 30, start_date: datetime.date | None | Unset = UNSET, end_date: datetime.date | None | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ GetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGetResponseGetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGet | HTTPValidationError @@ -124,7 +125,7 @@ def sync_detailed( days (int | Unset): Default: 30. start_date (datetime.date | None | Unset): end_date (datetime.date | None | Unset): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -156,7 +157,7 @@ def sync( days: int | Unset = 30, start_date: datetime.date | None | Unset = UNSET, end_date: datetime.date | None | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ( GetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGetResponseGetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGet | HTTPValidationError @@ -173,7 +174,7 @@ def sync( days (int | Unset): Default: 30. start_date (datetime.date | None | Unset): end_date (datetime.date | None | Unset): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -200,7 +201,7 @@ async def asyncio_detailed( days: int | Unset = 30, start_date: datetime.date | None | Unset = UNSET, end_date: datetime.date | None | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ GetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGetResponseGetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGet | HTTPValidationError @@ -216,7 +217,7 @@ async def asyncio_detailed( days (int | Unset): Default: 30. start_date (datetime.date | None | Unset): end_date (datetime.date | None | Unset): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -246,7 +247,7 @@ async def asyncio( days: int | Unset = 30, start_date: datetime.date | None | Unset = UNSET, end_date: datetime.date | None | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ( GetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGetResponseGetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGet | HTTPValidationError @@ -263,7 +264,7 @@ async def asyncio( days (int | Unset): Default: 30. start_date (datetime.date | None | Unset): end_date (datetime.date | None | Unset): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/memory_banks/list_memory_banks_api_memory_banks_get.py b/seclai/_generated/api/memory_banks/list_memory_banks_api_memory_banks_get.py index f544c58..5f2d0f7 100644 --- a/seclai/_generated/api/memory_banks/list_memory_banks_api_memory_banks_get.py +++ b/seclai/_generated/api/memory_banks/list_memory_banks_api_memory_banks_get.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from uuid import UUID import httpx @@ -17,7 +18,7 @@ def _get_kwargs( sort: str | Unset = "created_at", order: str | Unset = "desc", type_: None | str | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -90,7 +91,7 @@ def sync_detailed( sort: str | Unset = "created_at", order: str | Unset = "desc", type_: None | str | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | MemoryBankListResponseModel]: """List Memory Banks @@ -107,7 +108,7 @@ def sync_detailed( 'created_at'. order (str | Unset): Sort direction: asc or desc. Default: 'desc'. type_ (None | str | Unset): Filter by bank type: conversation or general. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -141,7 +142,7 @@ def sync( sort: str | Unset = "created_at", order: str | Unset = "desc", type_: None | str | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | MemoryBankListResponseModel | None: """List Memory Banks @@ -158,7 +159,7 @@ def sync( 'created_at'. order (str | Unset): Sort direction: asc or desc. Default: 'desc'. type_ (None | str | Unset): Filter by bank type: conversation or general. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -187,7 +188,7 @@ async def asyncio_detailed( sort: str | Unset = "created_at", order: str | Unset = "desc", type_: None | str | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | MemoryBankListResponseModel]: """List Memory Banks @@ -204,7 +205,7 @@ async def asyncio_detailed( 'created_at'. order (str | Unset): Sort direction: asc or desc. Default: 'desc'. type_ (None | str | Unset): Filter by bank type: conversation or general. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -236,7 +237,7 @@ async def asyncio( sort: str | Unset = "created_at", order: str | Unset = "desc", type_: None | str | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | MemoryBankListResponseModel | None: """List Memory Banks @@ -253,7 +254,7 @@ async def asyncio( 'created_at'. order (str | Unset): Sort direction: asc or desc. Default: 'desc'. type_ (None | str | Unset): Filter by bank type: conversation or general. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/memory_banks/list_templates_api_memory_banks_templates_get.py b/seclai/_generated/api/memory_banks/list_templates_api_memory_banks_templates_get.py index a8fcfd2..ae046c0 100644 --- a/seclai/_generated/api/memory_banks/list_templates_api_memory_banks_templates_get.py +++ b/seclai/_generated/api/memory_banks/list_templates_api_memory_banks_templates_get.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( *, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -65,7 +66,7 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[list[ListTemplatesApiMemoryBanksTemplatesGetResponse200Item]]: """List Templates @@ -75,7 +76,7 @@ def sync_detailed( be used directly with the create endpoint. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -99,7 +100,7 @@ def sync_detailed( def sync( *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> list[ListTemplatesApiMemoryBanksTemplatesGetResponse200Item] | None: """List Templates @@ -109,7 +110,7 @@ def sync( be used directly with the create endpoint. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -128,7 +129,7 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[list[ListTemplatesApiMemoryBanksTemplatesGetResponse200Item]]: """List Templates @@ -138,7 +139,7 @@ async def asyncio_detailed( be used directly with the create endpoint. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -160,7 +161,7 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> list[ListTemplatesApiMemoryBanksTemplatesGetResponse200Item] | None: """List Templates @@ -170,7 +171,7 @@ async def asyncio( be used directly with the create endpoint. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/memory_banks/memory_bank_ai_accept_api_memory_banks_ai_assistant_conversation_id_patch.py b/seclai/_generated/api/memory_banks/memory_bank_ai_accept_api_memory_banks_ai_assistant_conversation_id_patch.py index 8c4ca8e..a20bcc8 100644 --- a/seclai/_generated/api/memory_banks/memory_bank_ai_accept_api_memory_banks_ai_assistant_conversation_id_patch.py +++ b/seclai/_generated/api/memory_banks/memory_bank_ai_accept_api_memory_banks_ai_assistant_conversation_id_patch.py @@ -19,7 +19,7 @@ def _get_kwargs( conversation_id: UUID, *, body: MemoryBankAcceptRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -84,7 +84,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: MemoryBankAcceptRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ HTTPValidationError | MemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatchResponseMemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatch @@ -99,7 +99,7 @@ def sync_detailed( Args: conversation_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (MemoryBankAcceptRequest): Accept or decline a memory bank AI suggestion. Raises: @@ -128,7 +128,7 @@ def sync( *, client: AuthenticatedClient | Client, body: MemoryBankAcceptRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ( HTTPValidationError | MemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatchResponseMemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatch @@ -144,7 +144,7 @@ def sync( Args: conversation_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (MemoryBankAcceptRequest): Accept or decline a memory bank AI suggestion. Raises: @@ -168,7 +168,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: MemoryBankAcceptRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ HTTPValidationError | MemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatchResponseMemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatch @@ -183,7 +183,7 @@ async def asyncio_detailed( Args: conversation_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (MemoryBankAcceptRequest): Accept or decline a memory bank AI suggestion. Raises: @@ -210,7 +210,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: MemoryBankAcceptRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ( HTTPValidationError | MemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatchResponseMemoryBankAiAcceptApiMemoryBanksAiAssistantConversationIdPatch @@ -226,7 +226,7 @@ async def asyncio( Args: conversation_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (MemoryBankAcceptRequest): Accept or decline a memory bank AI suggestion. Raises: diff --git a/seclai/_generated/api/memory_banks/memory_bank_ai_generate_api_memory_banks_ai_assistant_post.py b/seclai/_generated/api/memory_banks/memory_bank_ai_generate_api_memory_banks_ai_assistant_post.py index 9e3947b..757ba72 100644 --- a/seclai/_generated/api/memory_banks/memory_bank_ai_generate_api_memory_banks_ai_assistant_post.py +++ b/seclai/_generated/api/memory_banks/memory_bank_ai_generate_api_memory_banks_ai_assistant_post.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from uuid import UUID import httpx @@ -14,7 +15,7 @@ def _get_kwargs( *, body: MemoryBankAiAssistantRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -71,7 +72,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: MemoryBankAiAssistantRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError | MemoryBankAiAssistantResponse]: """Generate a memory bank configuration @@ -81,7 +82,7 @@ def sync_detailed( Auth: requires `X-API-Key` header or OAuth Bearer token. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (MemoryBankAiAssistantRequest): Request body for the memory bank AI assistant. Raises: @@ -108,7 +109,7 @@ def sync( *, client: AuthenticatedClient | Client, body: MemoryBankAiAssistantRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | MemoryBankAiAssistantResponse | None: """Generate a memory bank configuration @@ -118,7 +119,7 @@ def sync( Auth: requires `X-API-Key` header or OAuth Bearer token. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (MemoryBankAiAssistantRequest): Request body for the memory bank AI assistant. Raises: @@ -140,7 +141,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: MemoryBankAiAssistantRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError | MemoryBankAiAssistantResponse]: """Generate a memory bank configuration @@ -150,7 +151,7 @@ async def asyncio_detailed( Auth: requires `X-API-Key` header or OAuth Bearer token. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (MemoryBankAiAssistantRequest): Request body for the memory bank AI assistant. Raises: @@ -175,7 +176,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: MemoryBankAiAssistantRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | MemoryBankAiAssistantResponse | None: """Generate a memory bank configuration @@ -185,7 +186,7 @@ async def asyncio( Auth: requires `X-API-Key` header or OAuth Bearer token. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (MemoryBankAiAssistantRequest): Request body for the memory bank AI assistant. Raises: diff --git a/seclai/_generated/api/memory_banks/memory_bank_ai_last_conversation_api_memory_banks_ai_assistant_last_conversation_get.py b/seclai/_generated/api/memory_banks/memory_bank_ai_last_conversation_api_memory_banks_ai_assistant_last_conversation_get.py index 03feedb..c0917d8 100644 --- a/seclai/_generated/api/memory_banks/memory_bank_ai_last_conversation_api_memory_banks_ai_assistant_last_conversation_get.py +++ b/seclai/_generated/api/memory_banks/memory_bank_ai_last_conversation_api_memory_banks_ai_assistant_last_conversation_get.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from uuid import UUID import httpx @@ -16,7 +17,7 @@ def _get_kwargs( *, limit: int | Unset = 5, offset: int | Unset = 0, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -75,7 +76,7 @@ def sync_detailed( client: AuthenticatedClient | Client, limit: int | Unset = 5, offset: int | Unset = 0, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | MemoryBankLastConversationResponse]: """Fetch memory bank AI conversation history @@ -87,7 +88,7 @@ def sync_detailed( Args: limit (int | Unset): Max turns to return. Default: 5. offset (int | Unset): Number of most-recent turns to skip. Default: 0. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -115,7 +116,7 @@ def sync( client: AuthenticatedClient | Client, limit: int | Unset = 5, offset: int | Unset = 0, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | MemoryBankLastConversationResponse | None: """Fetch memory bank AI conversation history @@ -127,7 +128,7 @@ def sync( Args: limit (int | Unset): Max turns to return. Default: 5. offset (int | Unset): Number of most-recent turns to skip. Default: 0. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -150,7 +151,7 @@ async def asyncio_detailed( client: AuthenticatedClient | Client, limit: int | Unset = 5, offset: int | Unset = 0, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | MemoryBankLastConversationResponse]: """Fetch memory bank AI conversation history @@ -162,7 +163,7 @@ async def asyncio_detailed( Args: limit (int | Unset): Max turns to return. Default: 5. offset (int | Unset): Number of most-recent turns to skip. Default: 0. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -188,7 +189,7 @@ async def asyncio( client: AuthenticatedClient | Client, limit: int | Unset = 5, offset: int | Unset = 0, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | MemoryBankLastConversationResponse | None: """Fetch memory bank AI conversation history @@ -200,7 +201,7 @@ async def asyncio( Args: limit (int | Unset): Max turns to return. Default: 5. offset (int | Unset): Number of most-recent turns to skip. Default: 0. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/memory_banks/test_compaction_prompt_api_memory_banks_memory_bank_id_test_compaction_post.py b/seclai/_generated/api/memory_banks/test_compaction_prompt_api_memory_banks_memory_bank_id_test_compaction_post.py index e560fed..4fdd40a 100644 --- a/seclai/_generated/api/memory_banks/test_compaction_prompt_api_memory_banks_memory_bank_id_test_compaction_post.py +++ b/seclai/_generated/api/memory_banks/test_compaction_prompt_api_memory_banks_memory_bank_id_test_compaction_post.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -16,7 +17,7 @@ def _get_kwargs( memory_bank_id: str, *, body: TestCompactionRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -72,7 +73,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: TestCompactionRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[CompactionTestResponseModel | HTTPValidationError]: """Test Compaction Prompt @@ -82,7 +83,7 @@ def sync_detailed( Args: memory_bank_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (TestCompactionRequest): Request body for testing a compaction prompt against an existing bank. @@ -123,7 +124,7 @@ def sync( *, client: AuthenticatedClient | Client, body: TestCompactionRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> CompactionTestResponseModel | HTTPValidationError | None: """Test Compaction Prompt @@ -133,7 +134,7 @@ def sync( Args: memory_bank_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (TestCompactionRequest): Request body for testing a compaction prompt against an existing bank. @@ -169,7 +170,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: TestCompactionRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[CompactionTestResponseModel | HTTPValidationError]: """Test Compaction Prompt @@ -179,7 +180,7 @@ async def asyncio_detailed( Args: memory_bank_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (TestCompactionRequest): Request body for testing a compaction prompt against an existing bank. @@ -218,7 +219,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: TestCompactionRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> CompactionTestResponseModel | HTTPValidationError | None: """Test Compaction Prompt @@ -228,7 +229,7 @@ async def asyncio( Args: memory_bank_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (TestCompactionRequest): Request body for testing a compaction prompt against an existing bank. diff --git a/seclai/_generated/api/memory_banks/test_compaction_prompt_standalone_api_memory_banks_test_compaction_post.py b/seclai/_generated/api/memory_banks/test_compaction_prompt_standalone_api_memory_banks_test_compaction_post.py index 32c5a1f..3f3d7cd 100644 --- a/seclai/_generated/api/memory_banks/test_compaction_prompt_standalone_api_memory_banks_test_compaction_post.py +++ b/seclai/_generated/api/memory_banks/test_compaction_prompt_standalone_api_memory_banks_test_compaction_post.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from uuid import UUID import httpx @@ -14,7 +15,7 @@ def _get_kwargs( *, body: StandaloneTestCompactionRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -67,7 +68,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: StandaloneTestCompactionRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[CompactionTestResponseModel | HTTPValidationError]: """Test Compaction Prompt Standalone @@ -76,7 +77,7 @@ def sync_detailed( with verdict, score, and reasoning. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (StandaloneTestCompactionRequest): Request body for testing a compaction prompt *without* an existing bank. @@ -109,7 +110,7 @@ def sync( *, client: AuthenticatedClient | Client, body: StandaloneTestCompactionRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> CompactionTestResponseModel | HTTPValidationError | None: """Test Compaction Prompt Standalone @@ -118,7 +119,7 @@ def sync( with verdict, score, and reasoning. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (StandaloneTestCompactionRequest): Request body for testing a compaction prompt *without* an existing bank. @@ -146,7 +147,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: StandaloneTestCompactionRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[CompactionTestResponseModel | HTTPValidationError]: """Test Compaction Prompt Standalone @@ -155,7 +156,7 @@ async def asyncio_detailed( with verdict, score, and reasoning. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (StandaloneTestCompactionRequest): Request body for testing a compaction prompt *without* an existing bank. @@ -186,7 +187,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: StandaloneTestCompactionRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> CompactionTestResponseModel | HTTPValidationError | None: """Test Compaction Prompt Standalone @@ -195,7 +196,7 @@ async def asyncio( with verdict, score, and reasoning. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (StandaloneTestCompactionRequest): Request body for testing a compaction prompt *without* an existing bank. diff --git a/seclai/_generated/api/memory_banks/update_memory_bank_api_memory_banks_memory_bank_id_put.py b/seclai/_generated/api/memory_banks/update_memory_bank_api_memory_banks_memory_bank_id_put.py index 7d7e79c..ae10219 100644 --- a/seclai/_generated/api/memory_banks/update_memory_bank_api_memory_banks_memory_bank_id_put.py +++ b/seclai/_generated/api/memory_banks/update_memory_bank_api_memory_banks_memory_bank_id_put.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -16,7 +17,7 @@ def _get_kwargs( memory_bank_id: str, *, body: UpdateMemoryBankBody, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -72,7 +73,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: UpdateMemoryBankBody, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | MemoryBank]: """Update Memory Bank @@ -84,7 +85,7 @@ def sync_detailed( Args: memory_bank_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UpdateMemoryBankBody): Request body for updating a memory bank. Omitted fields are left unchanged. To **clear** a field back to null, @@ -116,7 +117,7 @@ def sync( *, client: AuthenticatedClient | Client, body: UpdateMemoryBankBody, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | MemoryBank | None: """Update Memory Bank @@ -128,7 +129,7 @@ def sync( Args: memory_bank_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UpdateMemoryBankBody): Request body for updating a memory bank. Omitted fields are left unchanged. To **clear** a field back to null, @@ -155,7 +156,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: UpdateMemoryBankBody, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | MemoryBank]: """Update Memory Bank @@ -167,7 +168,7 @@ async def asyncio_detailed( Args: memory_bank_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UpdateMemoryBankBody): Request body for updating a memory bank. Omitted fields are left unchanged. To **clear** a field back to null, @@ -197,7 +198,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: UpdateMemoryBankBody, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | MemoryBank | None: """Update Memory Bank @@ -209,7 +210,7 @@ async def asyncio( Args: memory_bank_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UpdateMemoryBankBody): Request body for updating a memory bank. Omitted fields are left unchanged. To **clear** a field back to null, diff --git a/seclai/_generated/api/models/cancel_experiment_endpoint_api_models_playground_experiments_experiment_id_cancel_post.py b/seclai/_generated/api/models/cancel_experiment_endpoint_api_models_playground_experiments_experiment_id_cancel_post.py new file mode 100644 index 0000000..91e6189 --- /dev/null +++ b/seclai/_generated/api/models/cancel_experiment_endpoint_api_models_playground_experiments_experiment_id_cancel_post.py @@ -0,0 +1,237 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.cancel_experiment_endpoint_api_models_playground_experiments_experiment_id_cancel_post_response_cancel_experiment_endpoint_api_models_playground_experiments_experiment_id_cancel_post import ( + CancelExperimentEndpointApiModelsPlaygroundExperimentsExperimentIdCancelPostResponseCancelExperimentEndpointApiModelsPlaygroundExperimentsExperimentIdCancelPost, +) +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + experiment_id: UUID, + *, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/models/playground/experiments/{experiment_id}/cancel".format( + experiment_id=quote(str(experiment_id), safe=""), + ), + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + CancelExperimentEndpointApiModelsPlaygroundExperimentsExperimentIdCancelPostResponseCancelExperimentEndpointApiModelsPlaygroundExperimentsExperimentIdCancelPost + | HTTPValidationError + | None +): + if response.status_code == 200: + response_200 = CancelExperimentEndpointApiModelsPlaygroundExperimentsExperimentIdCancelPostResponseCancelExperimentEndpointApiModelsPlaygroundExperimentsExperimentIdCancelPost.from_dict( + response.json() + ) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + CancelExperimentEndpointApiModelsPlaygroundExperimentsExperimentIdCancelPostResponseCancelExperimentEndpointApiModelsPlaygroundExperimentsExperimentIdCancelPost + | HTTPValidationError +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + experiment_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + CancelExperimentEndpointApiModelsPlaygroundExperimentsExperimentIdCancelPostResponseCancelExperimentEndpointApiModelsPlaygroundExperimentsExperimentIdCancelPost + | HTTPValidationError +]: + """Cancel Experiment Endpoint + + Cancel a running or pending model playground experiment. + + Signals running model calls to abort and marks the experiment as canceled. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. The experiment must belong to the caller's + account. + + Args: + experiment_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CancelExperimentEndpointApiModelsPlaygroundExperimentsExperimentIdCancelPostResponseCancelExperimentEndpointApiModelsPlaygroundExperimentsExperimentIdCancelPost | HTTPValidationError] + """ + + kwargs = _get_kwargs( + experiment_id=experiment_id, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + experiment_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> ( + CancelExperimentEndpointApiModelsPlaygroundExperimentsExperimentIdCancelPostResponseCancelExperimentEndpointApiModelsPlaygroundExperimentsExperimentIdCancelPost + | HTTPValidationError + | None +): + """Cancel Experiment Endpoint + + Cancel a running or pending model playground experiment. + + Signals running model calls to abort and marks the experiment as canceled. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. The experiment must belong to the caller's + account. + + Args: + experiment_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CancelExperimentEndpointApiModelsPlaygroundExperimentsExperimentIdCancelPostResponseCancelExperimentEndpointApiModelsPlaygroundExperimentsExperimentIdCancelPost | HTTPValidationError + """ + + return sync_detailed( + experiment_id=experiment_id, + client=client, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + experiment_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + CancelExperimentEndpointApiModelsPlaygroundExperimentsExperimentIdCancelPostResponseCancelExperimentEndpointApiModelsPlaygroundExperimentsExperimentIdCancelPost + | HTTPValidationError +]: + """Cancel Experiment Endpoint + + Cancel a running or pending model playground experiment. + + Signals running model calls to abort and marks the experiment as canceled. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. The experiment must belong to the caller's + account. + + Args: + experiment_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CancelExperimentEndpointApiModelsPlaygroundExperimentsExperimentIdCancelPostResponseCancelExperimentEndpointApiModelsPlaygroundExperimentsExperimentIdCancelPost | HTTPValidationError] + """ + + kwargs = _get_kwargs( + experiment_id=experiment_id, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + experiment_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> ( + CancelExperimentEndpointApiModelsPlaygroundExperimentsExperimentIdCancelPostResponseCancelExperimentEndpointApiModelsPlaygroundExperimentsExperimentIdCancelPost + | HTTPValidationError + | None +): + """Cancel Experiment Endpoint + + Cancel a running or pending model playground experiment. + + Signals running model calls to abort and marks the experiment as canceled. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. The experiment must belong to the caller's + account. + + Args: + experiment_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CancelExperimentEndpointApiModelsPlaygroundExperimentsExperimentIdCancelPostResponseCancelExperimentEndpointApiModelsPlaygroundExperimentsExperimentIdCancelPost | HTTPValidationError + """ + + return ( + await asyncio_detailed( + experiment_id=experiment_id, + client=client, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/models/create_experiment_api_models_playground_experiments_post.py b/seclai/_generated/api/models/create_experiment_api_models_playground_experiments_post.py new file mode 100644 index 0000000..6cbf5f3 --- /dev/null +++ b/seclai/_generated/api/models/create_experiment_api_models_playground_experiments_post.py @@ -0,0 +1,239 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.create_experiment_api_models_playground_experiments_post_response_create_experiment_api_models_playground_experiments_post import ( + CreateExperimentApiModelsPlaygroundExperimentsPostResponseCreateExperimentApiModelsPlaygroundExperimentsPost, +) +from ...models.http_validation_error import HTTPValidationError +from ...models.playground_create_request import PlaygroundCreateRequest +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + body: PlaygroundCreateRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/models/playground/experiments", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + CreateExperimentApiModelsPlaygroundExperimentsPostResponseCreateExperimentApiModelsPlaygroundExperimentsPost + | HTTPValidationError + | None +): + if response.status_code == 200: + response_200 = CreateExperimentApiModelsPlaygroundExperimentsPostResponseCreateExperimentApiModelsPlaygroundExperimentsPost.from_dict( + response.json() + ) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + CreateExperimentApiModelsPlaygroundExperimentsPostResponseCreateExperimentApiModelsPlaygroundExperimentsPost + | HTTPValidationError +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: PlaygroundCreateRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + CreateExperimentApiModelsPlaygroundExperimentsPostResponseCreateExperimentApiModelsPlaygroundExperimentsPost + | HTTPValidationError +]: + """Create Experiment + + Create and schedule a model playground experiment. + + Runs the given prompt against 1-10 models in parallel and optionally evaluates the outputs with an + LLM judge. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + x_account_id (UUID | Unset): + body (PlaygroundCreateRequest): Create a model playground experiment via the public API. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CreateExperimentApiModelsPlaygroundExperimentsPostResponseCreateExperimentApiModelsPlaygroundExperimentsPost | HTTPValidationError] + """ + + kwargs = _get_kwargs( + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: PlaygroundCreateRequest, + x_account_id: UUID | Unset = UNSET, +) -> ( + CreateExperimentApiModelsPlaygroundExperimentsPostResponseCreateExperimentApiModelsPlaygroundExperimentsPost + | HTTPValidationError + | None +): + """Create Experiment + + Create and schedule a model playground experiment. + + Runs the given prompt against 1-10 models in parallel and optionally evaluates the outputs with an + LLM judge. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + x_account_id (UUID | Unset): + body (PlaygroundCreateRequest): Create a model playground experiment via the public API. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CreateExperimentApiModelsPlaygroundExperimentsPostResponseCreateExperimentApiModelsPlaygroundExperimentsPost | HTTPValidationError + """ + + return sync_detailed( + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: PlaygroundCreateRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + CreateExperimentApiModelsPlaygroundExperimentsPostResponseCreateExperimentApiModelsPlaygroundExperimentsPost + | HTTPValidationError +]: + """Create Experiment + + Create and schedule a model playground experiment. + + Runs the given prompt against 1-10 models in parallel and optionally evaluates the outputs with an + LLM judge. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + x_account_id (UUID | Unset): + body (PlaygroundCreateRequest): Create a model playground experiment via the public API. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CreateExperimentApiModelsPlaygroundExperimentsPostResponseCreateExperimentApiModelsPlaygroundExperimentsPost | HTTPValidationError] + """ + + kwargs = _get_kwargs( + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: PlaygroundCreateRequest, + x_account_id: UUID | Unset = UNSET, +) -> ( + CreateExperimentApiModelsPlaygroundExperimentsPostResponseCreateExperimentApiModelsPlaygroundExperimentsPost + | HTTPValidationError + | None +): + """Create Experiment + + Create and schedule a model playground experiment. + + Runs the given prompt against 1-10 models in parallel and optionally evaluates the outputs with an + LLM judge. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + x_account_id (UUID | Unset): + body (PlaygroundCreateRequest): Create a model playground experiment via the public API. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CreateExperimentApiModelsPlaygroundExperimentsPostResponseCreateExperimentApiModelsPlaygroundExperimentsPost | HTTPValidationError + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/models/get_alert_unread_count_api_models_alerts_unread_count_get.py b/seclai/_generated/api/models/get_alert_unread_count_api_models_alerts_unread_count_get.py index f171cfc..f5e3484 100644 --- a/seclai/_generated/api/models/get_alert_unread_count_api_models_alerts_unread_count_get.py +++ b/seclai/_generated/api/models/get_alert_unread_count_api_models_alerts_unread_count_get.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( *, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -63,7 +64,7 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ GetAlertUnreadCountApiModelsAlertsUnreadCountGetResponseGetAlertUnreadCountApiModelsAlertsUnreadCountGet ]: @@ -77,7 +78,7 @@ def sync_detailed( - Requires `X-API-Key` header or OAuth Bearer token. Count is scoped to the caller's account. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -101,7 +102,7 @@ def sync_detailed( def sync( *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ( GetAlertUnreadCountApiModelsAlertsUnreadCountGetResponseGetAlertUnreadCountApiModelsAlertsUnreadCountGet | None @@ -116,7 +117,7 @@ def sync( - Requires `X-API-Key` header or OAuth Bearer token. Count is scoped to the caller's account. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -135,7 +136,7 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ GetAlertUnreadCountApiModelsAlertsUnreadCountGetResponseGetAlertUnreadCountApiModelsAlertsUnreadCountGet ]: @@ -149,7 +150,7 @@ async def asyncio_detailed( - Requires `X-API-Key` header or OAuth Bearer token. Count is scoped to the caller's account. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -171,7 +172,7 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ( GetAlertUnreadCountApiModelsAlertsUnreadCountGetResponseGetAlertUnreadCountApiModelsAlertsUnreadCountGet | None @@ -186,7 +187,7 @@ async def asyncio( - Requires `X-API-Key` header or OAuth Bearer token. Count is scoped to the caller's account. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/models/get_experiment_api_models_playground_experiments_experiment_id_get.py b/seclai/_generated/api/models/get_experiment_api_models_playground_experiments_experiment_id_get.py new file mode 100644 index 0000000..7070185 --- /dev/null +++ b/seclai/_generated/api/models/get_experiment_api_models_playground_experiments_experiment_id_get.py @@ -0,0 +1,241 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.get_experiment_api_models_playground_experiments_experiment_id_get_response_get_experiment_api_models_playground_experiments_experiment_id_get import ( + GetExperimentApiModelsPlaygroundExperimentsExperimentIdGetResponseGetExperimentApiModelsPlaygroundExperimentsExperimentIdGet, +) +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + experiment_id: UUID, + *, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/models/playground/experiments/{experiment_id}".format( + experiment_id=quote(str(experiment_id), safe=""), + ), + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + GetExperimentApiModelsPlaygroundExperimentsExperimentIdGetResponseGetExperimentApiModelsPlaygroundExperimentsExperimentIdGet + | HTTPValidationError + | None +): + if response.status_code == 200: + response_200 = GetExperimentApiModelsPlaygroundExperimentsExperimentIdGetResponseGetExperimentApiModelsPlaygroundExperimentsExperimentIdGet.from_dict( + response.json() + ) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + GetExperimentApiModelsPlaygroundExperimentsExperimentIdGetResponseGetExperimentApiModelsPlaygroundExperimentsExperimentIdGet + | HTTPValidationError +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + experiment_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + GetExperimentApiModelsPlaygroundExperimentsExperimentIdGetResponseGetExperimentApiModelsPlaygroundExperimentsExperimentIdGet + | HTTPValidationError +]: + """Get Experiment + + Get details and results for a specific model playground experiment. + + Returns the full experiment payload including prompt, model outputs, and evaluation results (if + available). + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. The experiment must belong to the caller's + account. + + Args: + experiment_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[GetExperimentApiModelsPlaygroundExperimentsExperimentIdGetResponseGetExperimentApiModelsPlaygroundExperimentsExperimentIdGet | HTTPValidationError] + """ + + kwargs = _get_kwargs( + experiment_id=experiment_id, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + experiment_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> ( + GetExperimentApiModelsPlaygroundExperimentsExperimentIdGetResponseGetExperimentApiModelsPlaygroundExperimentsExperimentIdGet + | HTTPValidationError + | None +): + """Get Experiment + + Get details and results for a specific model playground experiment. + + Returns the full experiment payload including prompt, model outputs, and evaluation results (if + available). + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. The experiment must belong to the caller's + account. + + Args: + experiment_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + GetExperimentApiModelsPlaygroundExperimentsExperimentIdGetResponseGetExperimentApiModelsPlaygroundExperimentsExperimentIdGet | HTTPValidationError + """ + + return sync_detailed( + experiment_id=experiment_id, + client=client, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + experiment_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + GetExperimentApiModelsPlaygroundExperimentsExperimentIdGetResponseGetExperimentApiModelsPlaygroundExperimentsExperimentIdGet + | HTTPValidationError +]: + """Get Experiment + + Get details and results for a specific model playground experiment. + + Returns the full experiment payload including prompt, model outputs, and evaluation results (if + available). + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. The experiment must belong to the caller's + account. + + Args: + experiment_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[GetExperimentApiModelsPlaygroundExperimentsExperimentIdGetResponseGetExperimentApiModelsPlaygroundExperimentsExperimentIdGet | HTTPValidationError] + """ + + kwargs = _get_kwargs( + experiment_id=experiment_id, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + experiment_id: UUID, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> ( + GetExperimentApiModelsPlaygroundExperimentsExperimentIdGetResponseGetExperimentApiModelsPlaygroundExperimentsExperimentIdGet + | HTTPValidationError + | None +): + """Get Experiment + + Get details and results for a specific model playground experiment. + + Returns the full experiment payload including prompt, model outputs, and evaluation results (if + available). + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. The experiment must belong to the caller's + account. + + Args: + experiment_id (UUID): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + GetExperimentApiModelsPlaygroundExperimentsExperimentIdGetResponseGetExperimentApiModelsPlaygroundExperimentsExperimentIdGet | HTTPValidationError + """ + + return ( + await asyncio_detailed( + experiment_id=experiment_id, + client=client, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/models/get_model_api_models_model_id_details_get.py b/seclai/_generated/api/models/get_model_api_models_model_id_details_get.py new file mode 100644 index 0000000..06ff2da --- /dev/null +++ b/seclai/_generated/api/models/get_model_api_models_model_id_details_get.py @@ -0,0 +1,220 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.prompt_model_response import PromptModelResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + model_id: str, + *, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/models/{model_id}/details".format( + model_id=quote(str(model_id), safe=""), + ), + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> HTTPValidationError | PromptModelResponse | None: + if response.status_code == 200: + response_200 = PromptModelResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[HTTPValidationError | PromptModelResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + model_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | PromptModelResponse]: + """Get Model + + Get detailed information about a specific model. + + Returns full model details including capabilities, credit pricing, tool support, variant tiers, and + lifecycle status. + + The `model_id` is the model enum identifier (e.g. 'anthropic_claude_opus_4_6'). + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + model_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PromptModelResponse] + """ + + kwargs = _get_kwargs( + model_id=model_id, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + model_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | PromptModelResponse | None: + """Get Model + + Get detailed information about a specific model. + + Returns full model details including capabilities, credit pricing, tool support, variant tiers, and + lifecycle status. + + The `model_id` is the model enum identifier (e.g. 'anthropic_claude_opus_4_6'). + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + model_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PromptModelResponse + """ + + return sync_detailed( + model_id=model_id, + client=client, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + model_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | PromptModelResponse]: + """Get Model + + Get detailed information about a specific model. + + Returns full model details including capabilities, credit pricing, tool support, variant tiers, and + lifecycle status. + + The `model_id` is the model enum identifier (e.g. 'anthropic_claude_opus_4_6'). + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + model_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PromptModelResponse] + """ + + kwargs = _get_kwargs( + model_id=model_id, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + model_id: str, + *, + client: AuthenticatedClient | Client, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | PromptModelResponse | None: + """Get Model + + Get detailed information about a specific model. + + Returns full model details including capabilities, credit pricing, tool support, variant tiers, and + lifecycle status. + + The `model_id` is the model enum identifier (e.g. 'anthropic_claude_opus_4_6'). + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + model_id (str): + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PromptModelResponse + """ + + return ( + await asyncio_detailed( + model_id=model_id, + client=client, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/models/get_recommendations_api_models_model_id_recommendations_get.py b/seclai/_generated/api/models/get_recommendations_api_models_model_id_recommendations_get.py index 8060daf..f1181a9 100644 --- a/seclai/_generated/api/models/get_recommendations_api_models_model_id_recommendations_get.py +++ b/seclai/_generated/api/models/get_recommendations_api_models_model_id_recommendations_get.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -21,7 +22,7 @@ def _get_kwargs( require_thinking: bool | None | Unset = UNSET, min_context_tokens: int | None | Unset = UNSET, min_output_tokens: int | None | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -126,7 +127,7 @@ def sync_detailed( require_thinking: bool | None | Unset = UNSET, min_context_tokens: int | None | Unset = UNSET, min_output_tokens: int | None | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ GetRecommendationsApiModelsModelIdRecommendationsGetResponseGetRecommendationsApiModelsModelIdRecommendationsGet | HTTPValidationError @@ -150,7 +151,7 @@ def sync_detailed( thinking/reasoning. min_context_tokens (int | None | Unset): Minimum context window size in tokens. min_output_tokens (int | None | Unset): Minimum output token limit. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -186,7 +187,7 @@ def sync( require_thinking: bool | None | Unset = UNSET, min_context_tokens: int | None | Unset = UNSET, min_output_tokens: int | None | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ( GetRecommendationsApiModelsModelIdRecommendationsGetResponseGetRecommendationsApiModelsModelIdRecommendationsGet | HTTPValidationError @@ -211,7 +212,7 @@ def sync( thinking/reasoning. min_context_tokens (int | None | Unset): Minimum context window size in tokens. min_output_tokens (int | None | Unset): Minimum output token limit. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -242,7 +243,7 @@ async def asyncio_detailed( require_thinking: bool | None | Unset = UNSET, min_context_tokens: int | None | Unset = UNSET, min_output_tokens: int | None | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ GetRecommendationsApiModelsModelIdRecommendationsGetResponseGetRecommendationsApiModelsModelIdRecommendationsGet | HTTPValidationError @@ -266,7 +267,7 @@ async def asyncio_detailed( thinking/reasoning. min_context_tokens (int | None | Unset): Minimum context window size in tokens. min_output_tokens (int | None | Unset): Minimum output token limit. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -300,7 +301,7 @@ async def asyncio( require_thinking: bool | None | Unset = UNSET, min_context_tokens: int | None | Unset = UNSET, min_output_tokens: int | None | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ( GetRecommendationsApiModelsModelIdRecommendationsGetResponseGetRecommendationsApiModelsModelIdRecommendationsGet | HTTPValidationError @@ -325,7 +326,7 @@ async def asyncio( thinking/reasoning. min_context_tokens (int | None | Unset): Minimum context window size in tokens. min_output_tokens (int | None | Unset): Minimum output token limit. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/models/list_alerts_api_models_alerts_get.py b/seclai/_generated/api/models/list_alerts_api_models_alerts_get.py index aba278b..03b28e0 100644 --- a/seclai/_generated/api/models/list_alerts_api_models_alerts_get.py +++ b/seclai/_generated/api/models/list_alerts_api_models_alerts_get.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from uuid import UUID import httpx @@ -18,7 +19,7 @@ def _get_kwargs( unread_only: bool | Unset = False, limit: int | Unset = 50, offset: int | Unset = 0, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -99,7 +100,7 @@ def sync_detailed( unread_only: bool | Unset = False, limit: int | Unset = 50, offset: int | Unset = 0, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ HTTPValidationError | ListAlertsApiModelsAlertsGetResponseListAlertsApiModelsAlertsGet @@ -119,7 +120,7 @@ def sync_detailed( unread_only (bool | Unset): When true, only return unread alerts. Default: False. limit (int | Unset): Maximum number of alerts to return (1-100). Default: 50. offset (int | Unset): Pagination offset. Default: 0. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -151,7 +152,7 @@ def sync( unread_only: bool | Unset = False, limit: int | Unset = 50, offset: int | Unset = 0, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ( HTTPValidationError | ListAlertsApiModelsAlertsGetResponseListAlertsApiModelsAlertsGet @@ -172,7 +173,7 @@ def sync( unread_only (bool | Unset): When true, only return unread alerts. Default: False. limit (int | Unset): Maximum number of alerts to return (1-100). Default: 50. offset (int | Unset): Pagination offset. Default: 0. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -199,7 +200,7 @@ async def asyncio_detailed( unread_only: bool | Unset = False, limit: int | Unset = 50, offset: int | Unset = 0, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ HTTPValidationError | ListAlertsApiModelsAlertsGetResponseListAlertsApiModelsAlertsGet @@ -219,7 +220,7 @@ async def asyncio_detailed( unread_only (bool | Unset): When true, only return unread alerts. Default: False. limit (int | Unset): Maximum number of alerts to return (1-100). Default: 50. offset (int | Unset): Pagination offset. Default: 0. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -249,7 +250,7 @@ async def asyncio( unread_only: bool | Unset = False, limit: int | Unset = 50, offset: int | Unset = 0, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ( HTTPValidationError | ListAlertsApiModelsAlertsGetResponseListAlertsApiModelsAlertsGet @@ -270,7 +271,7 @@ async def asyncio( unread_only (bool | Unset): When true, only return unread alerts. Default: False. limit (int | Unset): Maximum number of alerts to return (1-100). Default: 50. offset (int | Unset): Pagination offset. Default: 0. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/models/list_experiments_api_models_playground_experiments_get.py b/seclai/_generated/api/models/list_experiments_api_models_playground_experiments_get.py new file mode 100644 index 0000000..1350df8 --- /dev/null +++ b/seclai/_generated/api/models/list_experiments_api_models_playground_experiments_get.py @@ -0,0 +1,312 @@ +import datetime +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.list_experiments_api_models_playground_experiments_get_response_list_experiments_api_models_playground_experiments_get import ( + ListExperimentsApiModelsPlaygroundExperimentsGetResponseListExperimentsApiModelsPlaygroundExperimentsGet, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + days: int | Unset = 30, + start_date: datetime.date | None | Unset = UNSET, + end_date: datetime.date | None | Unset = UNSET, + limit: int | Unset = 20, + offset: int | Unset = 0, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + params: dict[str, Any] = {} + + params["days"] = days + + json_start_date: None | str | Unset + if isinstance(start_date, Unset): + json_start_date = UNSET + elif isinstance(start_date, datetime.date): + json_start_date = start_date.isoformat() + else: + json_start_date = start_date + params["start_date"] = json_start_date + + json_end_date: None | str | Unset + if isinstance(end_date, Unset): + json_end_date = UNSET + elif isinstance(end_date, datetime.date): + json_end_date = end_date.isoformat() + else: + json_end_date = end_date + params["end_date"] = json_end_date + + params["limit"] = limit + + params["offset"] = offset + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/models/playground/experiments", + "params": params, + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + HTTPValidationError + | ListExperimentsApiModelsPlaygroundExperimentsGetResponseListExperimentsApiModelsPlaygroundExperimentsGet + | None +): + if response.status_code == 200: + response_200 = ListExperimentsApiModelsPlaygroundExperimentsGetResponseListExperimentsApiModelsPlaygroundExperimentsGet.from_dict( + response.json() + ) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + HTTPValidationError + | ListExperimentsApiModelsPlaygroundExperimentsGetResponseListExperimentsApiModelsPlaygroundExperimentsGet +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + days: int | Unset = 30, + start_date: datetime.date | None | Unset = UNSET, + end_date: datetime.date | None | Unset = UNSET, + limit: int | Unset = 20, + offset: int | Unset = 0, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + HTTPValidationError + | ListExperimentsApiModelsPlaygroundExperimentsGetResponseListExperimentsApiModelsPlaygroundExperimentsGet +]: + """List Experiments + + List model playground experiments for the account. + + Returns a paginated, time-filtered list of experiments ordered by creation date descending. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. Experiments are scoped to the caller's account. + + Args: + days (int | Unset): Look-back window in days. Default: 30. + start_date (datetime.date | None | Unset): Explicit start date (overrides days). + end_date (datetime.date | None | Unset): Explicit end date (overrides days). + limit (int | Unset): Page size. Default: 20. + offset (int | Unset): Pagination offset. Default: 0. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | ListExperimentsApiModelsPlaygroundExperimentsGetResponseListExperimentsApiModelsPlaygroundExperimentsGet] + """ + + kwargs = _get_kwargs( + days=days, + start_date=start_date, + end_date=end_date, + limit=limit, + offset=offset, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + days: int | Unset = 30, + start_date: datetime.date | None | Unset = UNSET, + end_date: datetime.date | None | Unset = UNSET, + limit: int | Unset = 20, + offset: int | Unset = 0, + x_account_id: UUID | Unset = UNSET, +) -> ( + HTTPValidationError + | ListExperimentsApiModelsPlaygroundExperimentsGetResponseListExperimentsApiModelsPlaygroundExperimentsGet + | None +): + """List Experiments + + List model playground experiments for the account. + + Returns a paginated, time-filtered list of experiments ordered by creation date descending. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. Experiments are scoped to the caller's account. + + Args: + days (int | Unset): Look-back window in days. Default: 30. + start_date (datetime.date | None | Unset): Explicit start date (overrides days). + end_date (datetime.date | None | Unset): Explicit end date (overrides days). + limit (int | Unset): Page size. Default: 20. + offset (int | Unset): Pagination offset. Default: 0. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | ListExperimentsApiModelsPlaygroundExperimentsGetResponseListExperimentsApiModelsPlaygroundExperimentsGet + """ + + return sync_detailed( + client=client, + days=days, + start_date=start_date, + end_date=end_date, + limit=limit, + offset=offset, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + days: int | Unset = 30, + start_date: datetime.date | None | Unset = UNSET, + end_date: datetime.date | None | Unset = UNSET, + limit: int | Unset = 20, + offset: int | Unset = 0, + x_account_id: UUID | Unset = UNSET, +) -> Response[ + HTTPValidationError + | ListExperimentsApiModelsPlaygroundExperimentsGetResponseListExperimentsApiModelsPlaygroundExperimentsGet +]: + """List Experiments + + List model playground experiments for the account. + + Returns a paginated, time-filtered list of experiments ordered by creation date descending. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. Experiments are scoped to the caller's account. + + Args: + days (int | Unset): Look-back window in days. Default: 30. + start_date (datetime.date | None | Unset): Explicit start date (overrides days). + end_date (datetime.date | None | Unset): Explicit end date (overrides days). + limit (int | Unset): Page size. Default: 20. + offset (int | Unset): Pagination offset. Default: 0. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | ListExperimentsApiModelsPlaygroundExperimentsGetResponseListExperimentsApiModelsPlaygroundExperimentsGet] + """ + + kwargs = _get_kwargs( + days=days, + start_date=start_date, + end_date=end_date, + limit=limit, + offset=offset, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + days: int | Unset = 30, + start_date: datetime.date | None | Unset = UNSET, + end_date: datetime.date | None | Unset = UNSET, + limit: int | Unset = 20, + offset: int | Unset = 0, + x_account_id: UUID | Unset = UNSET, +) -> ( + HTTPValidationError + | ListExperimentsApiModelsPlaygroundExperimentsGetResponseListExperimentsApiModelsPlaygroundExperimentsGet + | None +): + """List Experiments + + List model playground experiments for the account. + + Returns a paginated, time-filtered list of experiments ordered by creation date descending. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. Experiments are scoped to the caller's account. + + Args: + days (int | Unset): Look-back window in days. Default: 30. + start_date (datetime.date | None | Unset): Explicit start date (overrides days). + end_date (datetime.date | None | Unset): Explicit end date (overrides days). + limit (int | Unset): Page size. Default: 20. + offset (int | Unset): Pagination offset. Default: 0. + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | ListExperimentsApiModelsPlaygroundExperimentsGetResponseListExperimentsApiModelsPlaygroundExperimentsGet + """ + + return ( + await asyncio_detailed( + client=client, + days=days, + start_date=start_date, + end_date=end_date, + limit=limit, + offset=offset, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/models/list_models_api_models_get.py b/seclai/_generated/api/models/list_models_api_models_get.py new file mode 100644 index 0000000..2d6092d --- /dev/null +++ b/seclai/_generated/api/models/list_models_api_models_get.py @@ -0,0 +1,286 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.provider_group_response import ProviderGroupResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + provider: None | str | Unset = UNSET, + supports_tool_use: bool | None | Unset = UNSET, + supports_thinking: bool | None | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + params: dict[str, Any] = {} + + json_provider: None | str | Unset + if isinstance(provider, Unset): + json_provider = UNSET + else: + json_provider = provider + params["provider"] = json_provider + + json_supports_tool_use: bool | None | Unset + if isinstance(supports_tool_use, Unset): + json_supports_tool_use = UNSET + else: + json_supports_tool_use = supports_tool_use + params["supports_tool_use"] = json_supports_tool_use + + json_supports_thinking: bool | None | Unset + if isinstance(supports_thinking, Unset): + json_supports_thinking = UNSET + else: + json_supports_thinking = supports_thinking + params["supports_thinking"] = json_supports_thinking + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/models", + "params": params, + } + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> HTTPValidationError | list[ProviderGroupResponse] | None: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = ProviderGroupResponse.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[HTTPValidationError | list[ProviderGroupResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + provider: None | str | Unset = UNSET, + supports_tool_use: bool | None | Unset = UNSET, + supports_thinking: bool | None | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | list[ProviderGroupResponse]]: + """List Models + + List all enabled LLM models with full details. + + Returns models grouped by provider, including capabilities, credit pricing, tool support, variant + tiers, and lifecycle status. + + Optional query parameters: + - `provider`: filter by provider (e.g. 'anthropic', 'openai') + - `supports_tool_use`: filter to models with tool calling support + - `supports_thinking`: filter to models with extended thinking support + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + provider (None | str | Unset): Filter by provider name + supports_tool_use (bool | None | Unset): Filter to models that support tool use + supports_thinking (bool | None | Unset): Filter to models that support extended thinking + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | list[ProviderGroupResponse]] + """ + + kwargs = _get_kwargs( + provider=provider, + supports_tool_use=supports_tool_use, + supports_thinking=supports_thinking, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + provider: None | str | Unset = UNSET, + supports_tool_use: bool | None | Unset = UNSET, + supports_thinking: bool | None | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | list[ProviderGroupResponse] | None: + """List Models + + List all enabled LLM models with full details. + + Returns models grouped by provider, including capabilities, credit pricing, tool support, variant + tiers, and lifecycle status. + + Optional query parameters: + - `provider`: filter by provider (e.g. 'anthropic', 'openai') + - `supports_tool_use`: filter to models with tool calling support + - `supports_thinking`: filter to models with extended thinking support + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + provider (None | str | Unset): Filter by provider name + supports_tool_use (bool | None | Unset): Filter to models that support tool use + supports_thinking (bool | None | Unset): Filter to models that support extended thinking + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | list[ProviderGroupResponse] + """ + + return sync_detailed( + client=client, + provider=provider, + supports_tool_use=supports_tool_use, + supports_thinking=supports_thinking, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + provider: None | str | Unset = UNSET, + supports_tool_use: bool | None | Unset = UNSET, + supports_thinking: bool | None | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> Response[HTTPValidationError | list[ProviderGroupResponse]]: + """List Models + + List all enabled LLM models with full details. + + Returns models grouped by provider, including capabilities, credit pricing, tool support, variant + tiers, and lifecycle status. + + Optional query parameters: + - `provider`: filter by provider (e.g. 'anthropic', 'openai') + - `supports_tool_use`: filter to models with tool calling support + - `supports_thinking`: filter to models with extended thinking support + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + provider (None | str | Unset): Filter by provider name + supports_tool_use (bool | None | Unset): Filter to models that support tool use + supports_thinking (bool | None | Unset): Filter to models that support extended thinking + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | list[ProviderGroupResponse]] + """ + + kwargs = _get_kwargs( + provider=provider, + supports_tool_use=supports_tool_use, + supports_thinking=supports_thinking, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + provider: None | str | Unset = UNSET, + supports_tool_use: bool | None | Unset = UNSET, + supports_thinking: bool | None | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, +) -> HTTPValidationError | list[ProviderGroupResponse] | None: + """List Models + + List all enabled LLM models with full details. + + Returns models grouped by provider, including capabilities, credit pricing, tool support, variant + tiers, and lifecycle status. + + Optional query parameters: + - `provider`: filter by provider (e.g. 'anthropic', 'openai') + - `supports_tool_use`: filter to models with tool calling support + - `supports_thinking`: filter to models with extended thinking support + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. + + Args: + provider (None | str | Unset): Filter by provider name + supports_tool_use (bool | None | Unset): Filter to models that support tool use + supports_thinking (bool | None | Unset): Filter to models that support extended thinking + x_account_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | list[ProviderGroupResponse] + """ + + return ( + await asyncio_detailed( + client=client, + provider=provider, + supports_tool_use=supports_tool_use, + supports_thinking=supports_thinking, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/models/mark_all_read_api_models_alerts_mark_all_read_post.py b/seclai/_generated/api/models/mark_all_read_api_models_alerts_mark_all_read_post.py index fe546b3..0fef990 100644 --- a/seclai/_generated/api/models/mark_all_read_api_models_alerts_mark_all_read_post.py +++ b/seclai/_generated/api/models/mark_all_read_api_models_alerts_mark_all_read_post.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from uuid import UUID import httpx @@ -10,7 +11,7 @@ def _get_kwargs( *, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -51,7 +52,7 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any]: """Mark All Read @@ -61,7 +62,7 @@ def sync_detailed( - Requires `X-API-Key` header or OAuth Bearer token. Scoped to the caller's account. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -85,7 +86,7 @@ def sync_detailed( async def asyncio_detailed( *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any]: """Mark All Read @@ -95,7 +96,7 @@ async def asyncio_detailed( - Requires `X-API-Key` header or OAuth Bearer token. Scoped to the caller's account. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/models/mark_read_api_models_alerts_alert_id_read_patch.py b/seclai/_generated/api/models/mark_read_api_models_alerts_alert_id_read_patch.py index 8914566..7213d7d 100644 --- a/seclai/_generated/api/models/mark_read_api_models_alerts_alert_id_read_patch.py +++ b/seclai/_generated/api/models/mark_read_api_models_alerts_alert_id_read_patch.py @@ -14,7 +14,7 @@ def _get_kwargs( alert_id: UUID, *, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -64,7 +64,7 @@ def sync_detailed( alert_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Mark Read @@ -75,7 +75,7 @@ def sync_detailed( Args: alert_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -101,7 +101,7 @@ def sync( alert_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Mark Read @@ -112,7 +112,7 @@ def sync( Args: alert_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -133,7 +133,7 @@ async def asyncio_detailed( alert_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Mark Read @@ -144,7 +144,7 @@ async def asyncio_detailed( Args: alert_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -168,7 +168,7 @@ async def asyncio( alert_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Mark Read @@ -179,7 +179,7 @@ async def asyncio( Args: alert_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/search/search_api_search_get.py b/seclai/_generated/api/search/search_api_search_get.py index 462bd65..c5141cf 100644 --- a/seclai/_generated/api/search/search_api_search_get.py +++ b/seclai/_generated/api/search/search_api_search_get.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from uuid import UUID import httpx @@ -17,7 +18,7 @@ def _get_kwargs( q: str, limit: int | Unset = 10, entity_type: None | str | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -86,7 +87,7 @@ def sync_detailed( q: str, limit: int | Unset = 10, entity_type: None | str | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | SearchApiSearchGetResponseSearchApiSearchGet]: """Search resources @@ -101,7 +102,7 @@ def sync_detailed( limit (int | Unset): Maximum results Default: 10. entity_type (None | str | Unset): Optional entity type filter (e.g. 'agent', 'knowledge_base') - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -131,7 +132,7 @@ def sync( q: str, limit: int | Unset = 10, entity_type: None | str | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | SearchApiSearchGetResponseSearchApiSearchGet | None: """Search resources @@ -146,7 +147,7 @@ def sync( limit (int | Unset): Maximum results Default: 10. entity_type (None | str | Unset): Optional entity type filter (e.g. 'agent', 'knowledge_base') - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -171,7 +172,7 @@ async def asyncio_detailed( q: str, limit: int | Unset = 10, entity_type: None | str | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | SearchApiSearchGetResponseSearchApiSearchGet]: """Search resources @@ -186,7 +187,7 @@ async def asyncio_detailed( limit (int | Unset): Maximum results Default: 10. entity_type (None | str | Unset): Optional entity type filter (e.g. 'agent', 'knowledge_base') - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -214,7 +215,7 @@ async def asyncio( q: str, limit: int | Unset = 10, entity_type: None | str | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | SearchApiSearchGetResponseSearchApiSearchGet | None: """Search resources @@ -229,7 +230,7 @@ async def asyncio( limit (int | Unset): Maximum results Default: 10. entity_type (None | str | Unset): Optional entity type filter (e.g. 'agent', 'knowledge_base') - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/solutions/add_conversation_turn_api_solutions_solution_id_conversations_post.py b/seclai/_generated/api/solutions/add_conversation_turn_api_solutions_solution_id_conversations_post.py index c08c183..7a199d9 100644 --- a/seclai/_generated/api/solutions/add_conversation_turn_api_solutions_solution_id_conversations_post.py +++ b/seclai/_generated/api/solutions/add_conversation_turn_api_solutions_solution_id_conversations_post.py @@ -17,7 +17,7 @@ def _get_kwargs( solution_id: UUID, *, body: AddConversationTurnRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +73,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: AddConversationTurnRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | SolutionConversationResponse]: """Add conversation turn @@ -84,7 +84,7 @@ def sync_detailed( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AddConversationTurnRequest): Raises: @@ -113,7 +113,7 @@ def sync( *, client: AuthenticatedClient | Client, body: AddConversationTurnRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | SolutionConversationResponse | None: """Add conversation turn @@ -124,7 +124,7 @@ def sync( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AddConversationTurnRequest): Raises: @@ -148,7 +148,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: AddConversationTurnRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | SolutionConversationResponse]: """Add conversation turn @@ -159,7 +159,7 @@ async def asyncio_detailed( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AddConversationTurnRequest): Raises: @@ -186,7 +186,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: AddConversationTurnRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | SolutionConversationResponse | None: """Add conversation turn @@ -197,7 +197,7 @@ async def asyncio( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AddConversationTurnRequest): Raises: diff --git a/seclai/_generated/api/solutions/ai_assistant_accept_api_solutions_solution_id_ai_assistant_conversation_id_accept_post.py b/seclai/_generated/api/solutions/ai_assistant_accept_api_solutions_solution_id_ai_assistant_conversation_id_accept_post.py index 45f1753..a363a40 100644 --- a/seclai/_generated/api/solutions/ai_assistant_accept_api_solutions_solution_id_ai_assistant_conversation_id_accept_post.py +++ b/seclai/_generated/api/solutions/ai_assistant_accept_api_solutions_solution_id_ai_assistant_conversation_id_accept_post.py @@ -18,7 +18,7 @@ def _get_kwargs( conversation_id: UUID, *, body: AiAssistantAcceptRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -76,7 +76,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: AiAssistantAcceptRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[AiAssistantAcceptResponse | HTTPValidationError]: """Accept plan @@ -89,7 +89,7 @@ def sync_detailed( Args: solution_id (UUID): conversation_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AiAssistantAcceptRequest): Request body for accepting a proposed plan. Raises: @@ -120,7 +120,7 @@ def sync( *, client: AuthenticatedClient | Client, body: AiAssistantAcceptRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> AiAssistantAcceptResponse | HTTPValidationError | None: """Accept plan @@ -133,7 +133,7 @@ def sync( Args: solution_id (UUID): conversation_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AiAssistantAcceptRequest): Request body for accepting a proposed plan. Raises: @@ -159,7 +159,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: AiAssistantAcceptRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[AiAssistantAcceptResponse | HTTPValidationError]: """Accept plan @@ -172,7 +172,7 @@ async def asyncio_detailed( Args: solution_id (UUID): conversation_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AiAssistantAcceptRequest): Request body for accepting a proposed plan. Raises: @@ -201,7 +201,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: AiAssistantAcceptRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> AiAssistantAcceptResponse | HTTPValidationError | None: """Accept plan @@ -214,7 +214,7 @@ async def asyncio( Args: solution_id (UUID): conversation_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AiAssistantAcceptRequest): Request body for accepting a proposed plan. Raises: diff --git a/seclai/_generated/api/solutions/ai_assistant_decline_api_solutions_solution_id_ai_assistant_conversation_id_decline_post.py b/seclai/_generated/api/solutions/ai_assistant_decline_api_solutions_solution_id_ai_assistant_conversation_id_decline_post.py index 96ce7c5..2f0824a 100644 --- a/seclai/_generated/api/solutions/ai_assistant_decline_api_solutions_solution_id_ai_assistant_conversation_id_decline_post.py +++ b/seclai/_generated/api/solutions/ai_assistant_decline_api_solutions_solution_id_ai_assistant_conversation_id_decline_post.py @@ -15,7 +15,7 @@ def _get_kwargs( solution_id: UUID, conversation_id: UUID, *, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -67,7 +67,7 @@ def sync_detailed( conversation_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Decline plan @@ -79,7 +79,7 @@ def sync_detailed( Args: solution_id (UUID): conversation_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -107,7 +107,7 @@ def sync( conversation_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Decline plan @@ -119,7 +119,7 @@ def sync( Args: solution_id (UUID): conversation_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -142,7 +142,7 @@ async def asyncio_detailed( conversation_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Decline plan @@ -154,7 +154,7 @@ async def asyncio_detailed( Args: solution_id (UUID): conversation_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -180,7 +180,7 @@ async def asyncio( conversation_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Decline plan @@ -192,7 +192,7 @@ async def asyncio( Args: solution_id (UUID): conversation_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/solutions/ai_assistant_generate_api_solutions_solution_id_ai_assistant_generate_post.py b/seclai/_generated/api/solutions/ai_assistant_generate_api_solutions_solution_id_ai_assistant_generate_post.py index 82a8c2a..a62bd04 100644 --- a/seclai/_generated/api/solutions/ai_assistant_generate_api_solutions_solution_id_ai_assistant_generate_post.py +++ b/seclai/_generated/api/solutions/ai_assistant_generate_api_solutions_solution_id_ai_assistant_generate_post.py @@ -17,7 +17,7 @@ def _get_kwargs( solution_id: UUID, *, body: AiAssistantGenerateRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +73,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[AiAssistantGenerateResponse | HTTPValidationError]: """Generate solution plan @@ -87,7 +87,7 @@ def sync_detailed( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: @@ -116,7 +116,7 @@ def sync( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> AiAssistantGenerateResponse | HTTPValidationError | None: """Generate solution plan @@ -130,7 +130,7 @@ def sync( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: @@ -154,7 +154,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[AiAssistantGenerateResponse | HTTPValidationError]: """Generate solution plan @@ -168,7 +168,7 @@ async def asyncio_detailed( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: @@ -195,7 +195,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> AiAssistantGenerateResponse | HTTPValidationError | None: """Generate solution plan @@ -209,7 +209,7 @@ async def asyncio( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: diff --git a/seclai/_generated/api/solutions/ai_assistant_knowledge_base_api_solutions_solution_id_ai_assistant_knowledge_base_post.py b/seclai/_generated/api/solutions/ai_assistant_knowledge_base_api_solutions_solution_id_ai_assistant_knowledge_base_post.py index 9940f65..3025e81 100644 --- a/seclai/_generated/api/solutions/ai_assistant_knowledge_base_api_solutions_solution_id_ai_assistant_knowledge_base_post.py +++ b/seclai/_generated/api/solutions/ai_assistant_knowledge_base_api_solutions_solution_id_ai_assistant_knowledge_base_post.py @@ -17,7 +17,7 @@ def _get_kwargs( solution_id: UUID, *, body: AiAssistantGenerateRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +73,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[AiAssistantGenerateResponse | HTTPValidationError]: """Generate knowledge base plan @@ -85,7 +85,7 @@ def sync_detailed( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: @@ -114,7 +114,7 @@ def sync( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> AiAssistantGenerateResponse | HTTPValidationError | None: """Generate knowledge base plan @@ -126,7 +126,7 @@ def sync( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: @@ -150,7 +150,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[AiAssistantGenerateResponse | HTTPValidationError]: """Generate knowledge base plan @@ -162,7 +162,7 @@ async def asyncio_detailed( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: @@ -189,7 +189,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> AiAssistantGenerateResponse | HTTPValidationError | None: """Generate knowledge base plan @@ -201,7 +201,7 @@ async def asyncio( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: diff --git a/seclai/_generated/api/solutions/ai_assistant_source_api_solutions_solution_id_ai_assistant_source_post.py b/seclai/_generated/api/solutions/ai_assistant_source_api_solutions_solution_id_ai_assistant_source_post.py index 72021a8..44a632d 100644 --- a/seclai/_generated/api/solutions/ai_assistant_source_api_solutions_solution_id_ai_assistant_source_post.py +++ b/seclai/_generated/api/solutions/ai_assistant_source_api_solutions_solution_id_ai_assistant_source_post.py @@ -17,7 +17,7 @@ def _get_kwargs( solution_id: UUID, *, body: AiAssistantGenerateRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +73,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[AiAssistantGenerateResponse | HTTPValidationError]: """Generate source plan @@ -85,7 +85,7 @@ def sync_detailed( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: @@ -114,7 +114,7 @@ def sync( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> AiAssistantGenerateResponse | HTTPValidationError | None: """Generate source plan @@ -126,7 +126,7 @@ def sync( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: @@ -150,7 +150,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[AiAssistantGenerateResponse | HTTPValidationError]: """Generate source plan @@ -162,7 +162,7 @@ async def asyncio_detailed( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: @@ -189,7 +189,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: AiAssistantGenerateRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> AiAssistantGenerateResponse | HTTPValidationError | None: """Generate source plan @@ -201,7 +201,7 @@ async def asyncio( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (AiAssistantGenerateRequest): Request body for AI assistant generate endpoints. Raises: diff --git a/seclai/_generated/api/solutions/create_solution_api_solutions_post.py b/seclai/_generated/api/solutions/create_solution_api_solutions_post.py index d8a64a5..9eb0fd1 100644 --- a/seclai/_generated/api/solutions/create_solution_api_solutions_post.py +++ b/seclai/_generated/api/solutions/create_solution_api_solutions_post.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from uuid import UUID import httpx @@ -14,7 +15,7 @@ def _get_kwargs( *, body: CreateSolutionRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -67,7 +68,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: CreateSolutionRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | SolutionResponse]: """Create a solution @@ -77,7 +78,7 @@ def sync_detailed( `name` and optional `description` in the request body. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (CreateSolutionRequest): Request model for creating a new solution Raises: @@ -104,7 +105,7 @@ def sync( *, client: AuthenticatedClient | Client, body: CreateSolutionRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | SolutionResponse | None: """Create a solution @@ -114,7 +115,7 @@ def sync( `name` and optional `description` in the request body. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (CreateSolutionRequest): Request model for creating a new solution Raises: @@ -136,7 +137,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: CreateSolutionRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | SolutionResponse]: """Create a solution @@ -146,7 +147,7 @@ async def asyncio_detailed( `name` and optional `description` in the request body. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (CreateSolutionRequest): Request model for creating a new solution Raises: @@ -171,7 +172,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: CreateSolutionRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | SolutionResponse | None: """Create a solution @@ -181,7 +182,7 @@ async def asyncio( `name` and optional `description` in the request body. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (CreateSolutionRequest): Request model for creating a new solution Raises: diff --git a/seclai/_generated/api/solutions/delete_solution_api_solutions_solution_id_delete.py b/seclai/_generated/api/solutions/delete_solution_api_solutions_solution_id_delete.py index b04be6e..8c5dd1e 100644 --- a/seclai/_generated/api/solutions/delete_solution_api_solutions_solution_id_delete.py +++ b/seclai/_generated/api/solutions/delete_solution_api_solutions_solution_id_delete.py @@ -14,7 +14,7 @@ def _get_kwargs( solution_id: UUID, *, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -64,7 +64,7 @@ def sync_detailed( solution_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Delete a solution @@ -75,7 +75,7 @@ def sync_detailed( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -101,7 +101,7 @@ def sync( solution_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Delete a solution @@ -112,7 +112,7 @@ def sync( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -133,7 +133,7 @@ async def asyncio_detailed( solution_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Delete a solution @@ -144,7 +144,7 @@ async def asyncio_detailed( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -168,7 +168,7 @@ async def asyncio( solution_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Delete a solution @@ -179,7 +179,7 @@ async def asyncio( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/solutions/get_solution_api_solutions_solution_id_get.py b/seclai/_generated/api/solutions/get_solution_api_solutions_solution_id_get.py index a4ead97..1005901 100644 --- a/seclai/_generated/api/solutions/get_solution_api_solutions_solution_id_get.py +++ b/seclai/_generated/api/solutions/get_solution_api_solutions_solution_id_get.py @@ -15,7 +15,7 @@ def _get_kwargs( solution_id: UUID, *, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -66,7 +66,7 @@ def sync_detailed( solution_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | SolutionResponse]: """Get a solution @@ -76,7 +76,7 @@ def sync_detailed( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -102,7 +102,7 @@ def sync( solution_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | SolutionResponse | None: """Get a solution @@ -112,7 +112,7 @@ def sync( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -133,7 +133,7 @@ async def asyncio_detailed( solution_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | SolutionResponse]: """Get a solution @@ -143,7 +143,7 @@ async def asyncio_detailed( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -167,7 +167,7 @@ async def asyncio( solution_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | SolutionResponse | None: """Get a solution @@ -177,7 +177,7 @@ async def asyncio( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/solutions/link_agents_api_solutions_solution_id_agents_post.py b/seclai/_generated/api/solutions/link_agents_api_solutions_solution_id_agents_post.py index 8f3f728..01519c7 100644 --- a/seclai/_generated/api/solutions/link_agents_api_solutions_solution_id_agents_post.py +++ b/seclai/_generated/api/solutions/link_agents_api_solutions_solution_id_agents_post.py @@ -17,7 +17,7 @@ def _get_kwargs( solution_id: UUID, *, body: LinkResourcesRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +73,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: LinkResourcesRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | SolutionResponse]: """Link agents @@ -84,7 +84,7 @@ def sync_detailed( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (LinkResourcesRequest): Raises: @@ -113,7 +113,7 @@ def sync( *, client: AuthenticatedClient | Client, body: LinkResourcesRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | SolutionResponse | None: """Link agents @@ -124,7 +124,7 @@ def sync( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (LinkResourcesRequest): Raises: @@ -148,7 +148,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: LinkResourcesRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | SolutionResponse]: """Link agents @@ -159,7 +159,7 @@ async def asyncio_detailed( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (LinkResourcesRequest): Raises: @@ -186,7 +186,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: LinkResourcesRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | SolutionResponse | None: """Link agents @@ -197,7 +197,7 @@ async def asyncio( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (LinkResourcesRequest): Raises: diff --git a/seclai/_generated/api/solutions/link_knowledge_bases_api_solutions_solution_id_knowledge_bases_post.py b/seclai/_generated/api/solutions/link_knowledge_bases_api_solutions_solution_id_knowledge_bases_post.py index c4a1e8d..2368faa 100644 --- a/seclai/_generated/api/solutions/link_knowledge_bases_api_solutions_solution_id_knowledge_bases_post.py +++ b/seclai/_generated/api/solutions/link_knowledge_bases_api_solutions_solution_id_knowledge_bases_post.py @@ -17,7 +17,7 @@ def _get_kwargs( solution_id: UUID, *, body: LinkResourcesRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +73,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: LinkResourcesRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | SolutionResponse]: """Link knowledge bases @@ -84,7 +84,7 @@ def sync_detailed( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (LinkResourcesRequest): Raises: @@ -113,7 +113,7 @@ def sync( *, client: AuthenticatedClient | Client, body: LinkResourcesRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | SolutionResponse | None: """Link knowledge bases @@ -124,7 +124,7 @@ def sync( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (LinkResourcesRequest): Raises: @@ -148,7 +148,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: LinkResourcesRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | SolutionResponse]: """Link knowledge bases @@ -159,7 +159,7 @@ async def asyncio_detailed( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (LinkResourcesRequest): Raises: @@ -186,7 +186,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: LinkResourcesRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | SolutionResponse | None: """Link knowledge bases @@ -197,7 +197,7 @@ async def asyncio( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (LinkResourcesRequest): Raises: diff --git a/seclai/_generated/api/solutions/link_source_connections_api_solutions_solution_id_source_connections_post.py b/seclai/_generated/api/solutions/link_source_connections_api_solutions_solution_id_source_connections_post.py index 2d16047..7ca44ac 100644 --- a/seclai/_generated/api/solutions/link_source_connections_api_solutions_solution_id_source_connections_post.py +++ b/seclai/_generated/api/solutions/link_source_connections_api_solutions_solution_id_source_connections_post.py @@ -17,7 +17,7 @@ def _get_kwargs( solution_id: UUID, *, body: LinkResourcesRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +73,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: LinkResourcesRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | SolutionResponse]: """Link source connections @@ -84,7 +84,7 @@ def sync_detailed( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (LinkResourcesRequest): Raises: @@ -113,7 +113,7 @@ def sync( *, client: AuthenticatedClient | Client, body: LinkResourcesRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | SolutionResponse | None: """Link source connections @@ -124,7 +124,7 @@ def sync( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (LinkResourcesRequest): Raises: @@ -148,7 +148,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: LinkResourcesRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | SolutionResponse]: """Link source connections @@ -159,7 +159,7 @@ async def asyncio_detailed( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (LinkResourcesRequest): Raises: @@ -186,7 +186,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: LinkResourcesRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | SolutionResponse | None: """Link source connections @@ -197,7 +197,7 @@ async def asyncio( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (LinkResourcesRequest): Raises: diff --git a/seclai/_generated/api/solutions/list_conversations_api_solutions_solution_id_conversations_get.py b/seclai/_generated/api/solutions/list_conversations_api_solutions_solution_id_conversations_get.py index a9741cd..b81c1ed 100644 --- a/seclai/_generated/api/solutions/list_conversations_api_solutions_solution_id_conversations_get.py +++ b/seclai/_generated/api/solutions/list_conversations_api_solutions_solution_id_conversations_get.py @@ -15,7 +15,7 @@ def _get_kwargs( solution_id: UUID, *, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +73,7 @@ def sync_detailed( solution_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | list[SolutionConversationResponse]]: """List conversations @@ -84,7 +84,7 @@ def sync_detailed( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -110,7 +110,7 @@ def sync( solution_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | list[SolutionConversationResponse] | None: """List conversations @@ -121,7 +121,7 @@ def sync( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -142,7 +142,7 @@ async def asyncio_detailed( solution_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | list[SolutionConversationResponse]]: """List conversations @@ -153,7 +153,7 @@ async def asyncio_detailed( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -177,7 +177,7 @@ async def asyncio( solution_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | list[SolutionConversationResponse] | None: """List conversations @@ -188,7 +188,7 @@ async def asyncio( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/solutions/list_solutions_api_solutions_get.py b/seclai/_generated/api/solutions/list_solutions_api_solutions_get.py index 92885b6..aca83ce 100644 --- a/seclai/_generated/api/solutions/list_solutions_api_solutions_get.py +++ b/seclai/_generated/api/solutions/list_solutions_api_solutions_get.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from uuid import UUID import httpx @@ -17,7 +18,7 @@ def _get_kwargs( sort: str | Unset = "created_at", order: str | Unset = "desc", search: None | str | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -90,7 +91,7 @@ def sync_detailed( sort: str | Unset = "created_at", order: str | Unset = "desc", search: None | str | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | SolutionListResponse]: """List solutions @@ -113,7 +114,7 @@ def sync_detailed( sort (str | Unset): Sort field Default: 'created_at'. order (str | Unset): Sort order Default: 'desc'. search (None | str | Unset): Filter by solution name (case-insensitive partial match) - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -147,7 +148,7 @@ def sync( sort: str | Unset = "created_at", order: str | Unset = "desc", search: None | str | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | SolutionListResponse | None: """List solutions @@ -170,7 +171,7 @@ def sync( sort (str | Unset): Sort field Default: 'created_at'. order (str | Unset): Sort order Default: 'desc'. search (None | str | Unset): Filter by solution name (case-insensitive partial match) - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -199,7 +200,7 @@ async def asyncio_detailed( sort: str | Unset = "created_at", order: str | Unset = "desc", search: None | str | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | SolutionListResponse]: """List solutions @@ -222,7 +223,7 @@ async def asyncio_detailed( sort (str | Unset): Sort field Default: 'created_at'. order (str | Unset): Sort order Default: 'desc'. search (None | str | Unset): Filter by solution name (case-insensitive partial match) - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -254,7 +255,7 @@ async def asyncio( sort: str | Unset = "created_at", order: str | Unset = "desc", search: None | str | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | SolutionListResponse | None: """List solutions @@ -277,7 +278,7 @@ async def asyncio( sort (str | Unset): Sort field Default: 'created_at'. order (str | Unset): Sort order Default: 'desc'. search (None | str | Unset): Filter by solution name (case-insensitive partial match) - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/solutions/mark_conversation_turn_api_solutions_solution_id_conversations_conversation_id_patch.py b/seclai/_generated/api/solutions/mark_conversation_turn_api_solutions_solution_id_conversations_conversation_id_patch.py index f419c30..1ea1bd7 100644 --- a/seclai/_generated/api/solutions/mark_conversation_turn_api_solutions_solution_id_conversations_conversation_id_patch.py +++ b/seclai/_generated/api/solutions/mark_conversation_turn_api_solutions_solution_id_conversations_conversation_id_patch.py @@ -17,7 +17,7 @@ def _get_kwargs( conversation_id: UUID, *, body: MarkConversationTurnRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -74,7 +74,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: MarkConversationTurnRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Mark conversation turn @@ -86,7 +86,7 @@ def sync_detailed( Args: solution_id (UUID): conversation_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (MarkConversationTurnRequest): Raises: @@ -117,7 +117,7 @@ def sync( *, client: AuthenticatedClient | Client, body: MarkConversationTurnRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Mark conversation turn @@ -129,7 +129,7 @@ def sync( Args: solution_id (UUID): conversation_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (MarkConversationTurnRequest): Raises: @@ -155,7 +155,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: MarkConversationTurnRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Mark conversation turn @@ -167,7 +167,7 @@ async def asyncio_detailed( Args: solution_id (UUID): conversation_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (MarkConversationTurnRequest): Raises: @@ -196,7 +196,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: MarkConversationTurnRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Mark conversation turn @@ -208,7 +208,7 @@ async def asyncio( Args: solution_id (UUID): conversation_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (MarkConversationTurnRequest): Raises: diff --git a/seclai/_generated/api/solutions/unlink_agents_api_solutions_solution_id_agents_delete.py b/seclai/_generated/api/solutions/unlink_agents_api_solutions_solution_id_agents_delete.py index c9f26bf..7ec31d8 100644 --- a/seclai/_generated/api/solutions/unlink_agents_api_solutions_solution_id_agents_delete.py +++ b/seclai/_generated/api/solutions/unlink_agents_api_solutions_solution_id_agents_delete.py @@ -17,7 +17,7 @@ def _get_kwargs( solution_id: UUID, *, body: UnlinkResourcesRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +73,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: UnlinkResourcesRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | SolutionResponse]: """Unlink agents @@ -84,7 +84,7 @@ def sync_detailed( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UnlinkResourcesRequest): Raises: @@ -113,7 +113,7 @@ def sync( *, client: AuthenticatedClient | Client, body: UnlinkResourcesRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | SolutionResponse | None: """Unlink agents @@ -124,7 +124,7 @@ def sync( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UnlinkResourcesRequest): Raises: @@ -148,7 +148,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: UnlinkResourcesRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | SolutionResponse]: """Unlink agents @@ -159,7 +159,7 @@ async def asyncio_detailed( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UnlinkResourcesRequest): Raises: @@ -186,7 +186,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: UnlinkResourcesRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | SolutionResponse | None: """Unlink agents @@ -197,7 +197,7 @@ async def asyncio( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UnlinkResourcesRequest): Raises: diff --git a/seclai/_generated/api/solutions/unlink_knowledge_bases_api_solutions_solution_id_knowledge_bases_delete.py b/seclai/_generated/api/solutions/unlink_knowledge_bases_api_solutions_solution_id_knowledge_bases_delete.py index 2a9e74c..2604ed1 100644 --- a/seclai/_generated/api/solutions/unlink_knowledge_bases_api_solutions_solution_id_knowledge_bases_delete.py +++ b/seclai/_generated/api/solutions/unlink_knowledge_bases_api_solutions_solution_id_knowledge_bases_delete.py @@ -17,7 +17,7 @@ def _get_kwargs( solution_id: UUID, *, body: UnlinkResourcesRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +73,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: UnlinkResourcesRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | SolutionResponse]: """Unlink knowledge bases @@ -84,7 +84,7 @@ def sync_detailed( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UnlinkResourcesRequest): Raises: @@ -113,7 +113,7 @@ def sync( *, client: AuthenticatedClient | Client, body: UnlinkResourcesRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | SolutionResponse | None: """Unlink knowledge bases @@ -124,7 +124,7 @@ def sync( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UnlinkResourcesRequest): Raises: @@ -148,7 +148,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: UnlinkResourcesRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | SolutionResponse]: """Unlink knowledge bases @@ -159,7 +159,7 @@ async def asyncio_detailed( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UnlinkResourcesRequest): Raises: @@ -186,7 +186,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: UnlinkResourcesRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | SolutionResponse | None: """Unlink knowledge bases @@ -197,7 +197,7 @@ async def asyncio( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UnlinkResourcesRequest): Raises: diff --git a/seclai/_generated/api/solutions/unlink_source_connections_api_solutions_solution_id_source_connections_delete.py b/seclai/_generated/api/solutions/unlink_source_connections_api_solutions_solution_id_source_connections_delete.py index c92040b..2f621fb 100644 --- a/seclai/_generated/api/solutions/unlink_source_connections_api_solutions_solution_id_source_connections_delete.py +++ b/seclai/_generated/api/solutions/unlink_source_connections_api_solutions_solution_id_source_connections_delete.py @@ -17,7 +17,7 @@ def _get_kwargs( solution_id: UUID, *, body: UnlinkResourcesRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +73,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: UnlinkResourcesRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | SolutionResponse]: """Unlink source connections @@ -84,7 +84,7 @@ def sync_detailed( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UnlinkResourcesRequest): Raises: @@ -113,7 +113,7 @@ def sync( *, client: AuthenticatedClient | Client, body: UnlinkResourcesRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | SolutionResponse | None: """Unlink source connections @@ -124,7 +124,7 @@ def sync( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UnlinkResourcesRequest): Raises: @@ -148,7 +148,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: UnlinkResourcesRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | SolutionResponse]: """Unlink source connections @@ -159,7 +159,7 @@ async def asyncio_detailed( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UnlinkResourcesRequest): Raises: @@ -186,7 +186,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: UnlinkResourcesRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | SolutionResponse | None: """Unlink source connections @@ -197,7 +197,7 @@ async def asyncio( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UnlinkResourcesRequest): Raises: diff --git a/seclai/_generated/api/solutions/update_solution_api_solutions_solution_id_patch.py b/seclai/_generated/api/solutions/update_solution_api_solutions_solution_id_patch.py index 366728e..b8f4f02 100644 --- a/seclai/_generated/api/solutions/update_solution_api_solutions_solution_id_patch.py +++ b/seclai/_generated/api/solutions/update_solution_api_solutions_solution_id_patch.py @@ -17,7 +17,7 @@ def _get_kwargs( solution_id: UUID, *, body: UpdateSolutionRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +73,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: UpdateSolutionRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | SolutionResponse]: """Update a solution @@ -83,7 +83,7 @@ def sync_detailed( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UpdateSolutionRequest): Request model for updating a solution Raises: @@ -112,7 +112,7 @@ def sync( *, client: AuthenticatedClient | Client, body: UpdateSolutionRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | SolutionResponse | None: """Update a solution @@ -122,7 +122,7 @@ def sync( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UpdateSolutionRequest): Request model for updating a solution Raises: @@ -146,7 +146,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: UpdateSolutionRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | SolutionResponse]: """Update a solution @@ -156,7 +156,7 @@ async def asyncio_detailed( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UpdateSolutionRequest): Request model for updating a solution Raises: @@ -183,7 +183,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: UpdateSolutionRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | SolutionResponse | None: """Update a solution @@ -193,7 +193,7 @@ async def asyncio( Args: solution_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UpdateSolutionRequest): Request model for updating a solution Raises: diff --git a/seclai/_generated/api/source_exports/cancel_source_export_api_sources_source_connection_id_exports_export_id_cancel_post.py b/seclai/_generated/api/source_exports/cancel_source_export_api_sources_source_connection_id_exports_export_id_cancel_post.py index 6effaab..163210a 100644 --- a/seclai/_generated/api/source_exports/cancel_source_export_api_sources_source_connection_id_exports_export_id_cancel_post.py +++ b/seclai/_generated/api/source_exports/cancel_source_export_api_sources_source_connection_id_exports_export_id_cancel_post.py @@ -16,7 +16,7 @@ def _get_kwargs( source_connection_id: UUID, export_id: UUID, *, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -69,7 +69,7 @@ def sync_detailed( export_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ExportResponse | HTTPValidationError]: """Cancel export @@ -79,7 +79,7 @@ def sync_detailed( Args: source_connection_id (UUID): export_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -107,7 +107,7 @@ def sync( export_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ExportResponse | HTTPValidationError | None: """Cancel export @@ -117,7 +117,7 @@ def sync( Args: source_connection_id (UUID): export_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -140,7 +140,7 @@ async def asyncio_detailed( export_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ExportResponse | HTTPValidationError]: """Cancel export @@ -150,7 +150,7 @@ async def asyncio_detailed( Args: source_connection_id (UUID): export_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -176,7 +176,7 @@ async def asyncio( export_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ExportResponse | HTTPValidationError | None: """Cancel export @@ -186,7 +186,7 @@ async def asyncio( Args: source_connection_id (UUID): export_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/source_exports/create_source_export_api_sources_source_connection_id_exports_post.py b/seclai/_generated/api/source_exports/create_source_export_api_sources_source_connection_id_exports_post.py index 22ce26f..4bfa044 100644 --- a/seclai/_generated/api/source_exports/create_source_export_api_sources_source_connection_id_exports_post.py +++ b/seclai/_generated/api/source_exports/create_source_export_api_sources_source_connection_id_exports_post.py @@ -17,7 +17,7 @@ def _get_kwargs( source_connection_id: UUID, *, body: CreateExportRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +73,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: CreateExportRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ExportResponse | HTTPValidationError]: """Create export @@ -82,7 +82,7 @@ def sync_detailed( Args: source_connection_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (CreateExportRequest): Parameters for creating a new export job. Raises: @@ -111,7 +111,7 @@ def sync( *, client: AuthenticatedClient | Client, body: CreateExportRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ExportResponse | HTTPValidationError | None: """Create export @@ -120,7 +120,7 @@ def sync( Args: source_connection_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (CreateExportRequest): Parameters for creating a new export job. Raises: @@ -144,7 +144,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: CreateExportRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ExportResponse | HTTPValidationError]: """Create export @@ -153,7 +153,7 @@ async def asyncio_detailed( Args: source_connection_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (CreateExportRequest): Parameters for creating a new export job. Raises: @@ -180,7 +180,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: CreateExportRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ExportResponse | HTTPValidationError | None: """Create export @@ -189,7 +189,7 @@ async def asyncio( Args: source_connection_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (CreateExportRequest): Parameters for creating a new export job. Raises: diff --git a/seclai/_generated/api/source_exports/delete_source_export_api_sources_source_connection_id_exports_export_id_delete.py b/seclai/_generated/api/source_exports/delete_source_export_api_sources_source_connection_id_exports_export_id_delete.py index c588362..325ed17 100644 --- a/seclai/_generated/api/source_exports/delete_source_export_api_sources_source_connection_id_exports_export_id_delete.py +++ b/seclai/_generated/api/source_exports/delete_source_export_api_sources_source_connection_id_exports_export_id_delete.py @@ -15,7 +15,7 @@ def _get_kwargs( source_connection_id: UUID, export_id: UUID, *, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -67,7 +67,7 @@ def sync_detailed( export_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Delete export @@ -77,7 +77,7 @@ def sync_detailed( Args: source_connection_id (UUID): export_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -105,7 +105,7 @@ def sync( export_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Delete export @@ -115,7 +115,7 @@ def sync( Args: source_connection_id (UUID): export_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -138,7 +138,7 @@ async def asyncio_detailed( export_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Delete export @@ -148,7 +148,7 @@ async def asyncio_detailed( Args: source_connection_id (UUID): export_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -174,7 +174,7 @@ async def asyncio( export_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Delete export @@ -184,7 +184,7 @@ async def asyncio( Args: source_connection_id (UUID): export_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/source_exports/download_source_export_api_sources_source_connection_id_exports_export_id_download_get.py b/seclai/_generated/api/source_exports/download_source_export_api_sources_source_connection_id_exports_export_id_download_get.py index c532c62..a19961a 100644 --- a/seclai/_generated/api/source_exports/download_source_export_api_sources_source_connection_id_exports_export_id_download_get.py +++ b/seclai/_generated/api/source_exports/download_source_export_api_sources_source_connection_id_exports_export_id_download_get.py @@ -15,7 +15,7 @@ def _get_kwargs( source_connection_id: UUID, export_id: UUID, *, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -67,7 +67,7 @@ def sync_detailed( export_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Download export @@ -78,7 +78,7 @@ def sync_detailed( Args: source_connection_id (UUID): export_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -106,7 +106,7 @@ def sync( export_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Download export @@ -117,7 +117,7 @@ def sync( Args: source_connection_id (UUID): export_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -140,7 +140,7 @@ async def asyncio_detailed( export_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Download export @@ -151,7 +151,7 @@ async def asyncio_detailed( Args: source_connection_id (UUID): export_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -177,7 +177,7 @@ async def asyncio( export_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Download export @@ -188,7 +188,7 @@ async def asyncio( Args: source_connection_id (UUID): export_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/source_exports/estimate_source_export_api_sources_source_connection_id_exports_estimate_post.py b/seclai/_generated/api/source_exports/estimate_source_export_api_sources_source_connection_id_exports_estimate_post.py index f841827..6484d80 100644 --- a/seclai/_generated/api/source_exports/estimate_source_export_api_sources_source_connection_id_exports_estimate_post.py +++ b/seclai/_generated/api/source_exports/estimate_source_export_api_sources_source_connection_id_exports_estimate_post.py @@ -17,7 +17,7 @@ def _get_kwargs( source_connection_id: UUID, *, body: EstimateExportRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +73,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: EstimateExportRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[EstimateExportResponse | HTTPValidationError]: """Estimate export size @@ -82,7 +82,7 @@ def sync_detailed( Args: source_connection_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (EstimateExportRequest): Parameters for estimating export size. Raises: @@ -111,7 +111,7 @@ def sync( *, client: AuthenticatedClient | Client, body: EstimateExportRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> EstimateExportResponse | HTTPValidationError | None: """Estimate export size @@ -120,7 +120,7 @@ def sync( Args: source_connection_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (EstimateExportRequest): Parameters for estimating export size. Raises: @@ -144,7 +144,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: EstimateExportRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[EstimateExportResponse | HTTPValidationError]: """Estimate export size @@ -153,7 +153,7 @@ async def asyncio_detailed( Args: source_connection_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (EstimateExportRequest): Parameters for estimating export size. Raises: @@ -180,7 +180,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: EstimateExportRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> EstimateExportResponse | HTTPValidationError | None: """Estimate export size @@ -189,7 +189,7 @@ async def asyncio( Args: source_connection_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (EstimateExportRequest): Parameters for estimating export size. Raises: diff --git a/seclai/_generated/api/source_exports/get_source_export_api_sources_source_connection_id_exports_export_id_get.py b/seclai/_generated/api/source_exports/get_source_export_api_sources_source_connection_id_exports_export_id_get.py index 5abfcfc..5644d4d 100644 --- a/seclai/_generated/api/source_exports/get_source_export_api_sources_source_connection_id_exports_export_id_get.py +++ b/seclai/_generated/api/source_exports/get_source_export_api_sources_source_connection_id_exports_export_id_get.py @@ -16,7 +16,7 @@ def _get_kwargs( source_connection_id: UUID, export_id: UUID, *, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -69,7 +69,7 @@ def sync_detailed( export_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ExportResponse | HTTPValidationError]: """Get export status @@ -79,7 +79,7 @@ def sync_detailed( Args: source_connection_id (UUID): export_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -107,7 +107,7 @@ def sync( export_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ExportResponse | HTTPValidationError | None: """Get export status @@ -117,7 +117,7 @@ def sync( Args: source_connection_id (UUID): export_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -140,7 +140,7 @@ async def asyncio_detailed( export_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ExportResponse | HTTPValidationError]: """Get export status @@ -150,7 +150,7 @@ async def asyncio_detailed( Args: source_connection_id (UUID): export_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -176,7 +176,7 @@ async def asyncio( export_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ExportResponse | HTTPValidationError | None: """Get export status @@ -186,7 +186,7 @@ async def asyncio( Args: source_connection_id (UUID): export_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/source_exports/list_source_exports_api_sources_source_connection_id_exports_get.py b/seclai/_generated/api/source_exports/list_source_exports_api_sources_source_connection_id_exports_get.py index 48f916a..4df2a02 100644 --- a/seclai/_generated/api/source_exports/list_source_exports_api_sources_source_connection_id_exports_get.py +++ b/seclai/_generated/api/source_exports/list_source_exports_api_sources_source_connection_id_exports_get.py @@ -17,7 +17,7 @@ def _get_kwargs( *, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -79,7 +79,7 @@ def sync_detailed( client: AuthenticatedClient | Client, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ExportListResponse | HTTPValidationError]: """List exports @@ -91,7 +91,7 @@ def sync_detailed( source_connection_id (UUID): page (int | Unset): Default: 1. limit (int | Unset): Default: 20. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -121,7 +121,7 @@ def sync( client: AuthenticatedClient | Client, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ExportListResponse | HTTPValidationError | None: """List exports @@ -133,7 +133,7 @@ def sync( source_connection_id (UUID): page (int | Unset): Default: 1. limit (int | Unset): Default: 20. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -158,7 +158,7 @@ async def asyncio_detailed( client: AuthenticatedClient | Client, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[ExportListResponse | HTTPValidationError]: """List exports @@ -170,7 +170,7 @@ async def asyncio_detailed( source_connection_id (UUID): page (int | Unset): Default: 1. limit (int | Unset): Default: 20. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -198,7 +198,7 @@ async def asyncio( client: AuthenticatedClient | Client, page: int | Unset = 1, limit: int | Unset = 20, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> ExportListResponse | HTTPValidationError | None: """List exports @@ -210,7 +210,7 @@ async def asyncio( source_connection_id (UUID): page (int | Unset): Default: 1. limit (int | Unset): Default: 20. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/sources/cancel_source_embedding_migration_api_sources_source_connection_id_embedding_migration_cancel_post.py b/seclai/_generated/api/sources/cancel_source_embedding_migration_api_sources_source_connection_id_embedding_migration_cancel_post.py index 920fbe3..38667ae 100644 --- a/seclai/_generated/api/sources/cancel_source_embedding_migration_api_sources_source_connection_id_embedding_migration_cancel_post.py +++ b/seclai/_generated/api/sources/cancel_source_embedding_migration_api_sources_source_connection_id_embedding_migration_cancel_post.py @@ -17,7 +17,7 @@ def _get_kwargs( source_connection_id: UUID, *, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -68,7 +68,7 @@ def sync_detailed( source_connection_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | SourceEmbeddingMigrationResponse]: """Cancel Source Embedding Migration @@ -78,7 +78,7 @@ def sync_detailed( Args: source_connection_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -104,7 +104,7 @@ def sync( source_connection_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | SourceEmbeddingMigrationResponse | None: """Cancel Source Embedding Migration @@ -114,7 +114,7 @@ def sync( Args: source_connection_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -135,7 +135,7 @@ async def asyncio_detailed( source_connection_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | SourceEmbeddingMigrationResponse]: """Cancel Source Embedding Migration @@ -145,7 +145,7 @@ async def asyncio_detailed( Args: source_connection_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -169,7 +169,7 @@ async def asyncio( source_connection_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | SourceEmbeddingMigrationResponse | None: """Cancel Source Embedding Migration @@ -179,7 +179,7 @@ async def asyncio( Args: source_connection_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/sources/create_source_api_sources_post.py b/seclai/_generated/api/sources/create_source_api_sources_post.py index 2fa7cd9..2a54360 100644 --- a/seclai/_generated/api/sources/create_source_api_sources_post.py +++ b/seclai/_generated/api/sources/create_source_api_sources_post.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from uuid import UUID import httpx @@ -14,7 +15,7 @@ def _get_kwargs( *, body: CreateSourceBody, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -71,19 +72,23 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: CreateSourceBody, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError | SourceResponse]: """Create Source Create a new content source. - Source types: `rss`, `website`, `file_uploads`, `custom_index`. + Source types: `rss`, `website`, `custom_index`. - For RSS and website sources, provide the URL. For file upload and custom index sources, the URL is - created automatically. + For RSS and website sources, provide the URL. For custom index sources, the URL is created + automatically. + + For custom_index sources, you can optionally specify an `index_mode`: `fast_and_cheap` (default), + `balanced`, `slow_and_thorough`, or `custom`. The legacy `file_uploads` source type is accepted as + an alias for `custom_index` with `index_mode=fast_and_cheap`. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (CreateSourceBody): Request body for creating a content source. Raises: @@ -110,19 +115,23 @@ def sync( *, client: AuthenticatedClient | Client, body: CreateSourceBody, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | SourceResponse | None: """Create Source Create a new content source. - Source types: `rss`, `website`, `file_uploads`, `custom_index`. + Source types: `rss`, `website`, `custom_index`. + + For RSS and website sources, provide the URL. For custom index sources, the URL is created + automatically. - For RSS and website sources, provide the URL. For file upload and custom index sources, the URL is - created automatically. + For custom_index sources, you can optionally specify an `index_mode`: `fast_and_cheap` (default), + `balanced`, `slow_and_thorough`, or `custom`. The legacy `file_uploads` source type is accepted as + an alias for `custom_index` with `index_mode=fast_and_cheap`. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (CreateSourceBody): Request body for creating a content source. Raises: @@ -144,19 +153,23 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: CreateSourceBody, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError | SourceResponse]: """Create Source Create a new content source. - Source types: `rss`, `website`, `file_uploads`, `custom_index`. + Source types: `rss`, `website`, `custom_index`. - For RSS and website sources, provide the URL. For file upload and custom index sources, the URL is - created automatically. + For RSS and website sources, provide the URL. For custom index sources, the URL is created + automatically. + + For custom_index sources, you can optionally specify an `index_mode`: `fast_and_cheap` (default), + `balanced`, `slow_and_thorough`, or `custom`. The legacy `file_uploads` source type is accepted as + an alias for `custom_index` with `index_mode=fast_and_cheap`. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (CreateSourceBody): Request body for creating a content source. Raises: @@ -181,19 +194,23 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: CreateSourceBody, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | SourceResponse | None: """Create Source Create a new content source. - Source types: `rss`, `website`, `file_uploads`, `custom_index`. + Source types: `rss`, `website`, `custom_index`. + + For RSS and website sources, provide the URL. For custom index sources, the URL is created + automatically. - For RSS and website sources, provide the URL. For file upload and custom index sources, the URL is - created automatically. + For custom_index sources, you can optionally specify an `index_mode`: `fast_and_cheap` (default), + `balanced`, `slow_and_thorough`, or `custom`. The legacy `file_uploads` source type is accepted as + an alias for `custom_index` with `index_mode=fast_and_cheap`. Args: - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (CreateSourceBody): Request body for creating a content source. Raises: diff --git a/seclai/_generated/api/sources/delete_source_api_sources_source_connection_id_delete.py b/seclai/_generated/api/sources/delete_source_api_sources_source_connection_id_delete.py index 3e19f2c..be1625f 100644 --- a/seclai/_generated/api/sources/delete_source_api_sources_source_connection_id_delete.py +++ b/seclai/_generated/api/sources/delete_source_api_sources_source_connection_id_delete.py @@ -14,7 +14,7 @@ def _get_kwargs( source_connection_id: UUID, *, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -64,7 +64,7 @@ def sync_detailed( source_connection_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Delete Source @@ -75,7 +75,7 @@ def sync_detailed( Args: source_connection_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -101,7 +101,7 @@ def sync( source_connection_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Delete Source @@ -112,7 +112,7 @@ def sync( Args: source_connection_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -133,7 +133,7 @@ async def asyncio_detailed( source_connection_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError]: """Delete Source @@ -144,7 +144,7 @@ async def asyncio_detailed( Args: source_connection_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -168,7 +168,7 @@ async def asyncio( source_connection_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | None: """Delete Source @@ -179,7 +179,7 @@ async def asyncio( Args: source_connection_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/sources/get_source_api_sources_source_connection_id_get.py b/seclai/_generated/api/sources/get_source_api_sources_source_connection_id_get.py index 03b3ef7..eb971be 100644 --- a/seclai/_generated/api/sources/get_source_api_sources_source_connection_id_get.py +++ b/seclai/_generated/api/sources/get_source_api_sources_source_connection_id_get.py @@ -15,7 +15,7 @@ def _get_kwargs( source_connection_id: UUID, *, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -66,7 +66,7 @@ def sync_detailed( source_connection_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | SourceResponse]: """Get Source @@ -78,7 +78,7 @@ def sync_detailed( Args: source_connection_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -104,7 +104,7 @@ def sync( source_connection_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | SourceResponse | None: """Get Source @@ -116,7 +116,7 @@ def sync( Args: source_connection_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -137,7 +137,7 @@ async def asyncio_detailed( source_connection_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | SourceResponse]: """Get Source @@ -149,7 +149,7 @@ async def asyncio_detailed( Args: source_connection_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -173,7 +173,7 @@ async def asyncio( source_connection_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | SourceResponse | None: """Get Source @@ -185,7 +185,7 @@ async def asyncio( Args: source_connection_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/sources/get_source_embedding_migration_api_sources_source_connection_id_embedding_migration_get.py b/seclai/_generated/api/sources/get_source_embedding_migration_api_sources_source_connection_id_embedding_migration_get.py index 0e3207d..6e36376 100644 --- a/seclai/_generated/api/sources/get_source_embedding_migration_api_sources_source_connection_id_embedding_migration_get.py +++ b/seclai/_generated/api/sources/get_source_embedding_migration_api_sources_source_connection_id_embedding_migration_get.py @@ -17,7 +17,7 @@ def _get_kwargs( source_connection_id: UUID, *, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -84,7 +84,7 @@ def sync_detailed( source_connection_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | None | SourceEmbeddingMigrationResponse]: """Get Source Embedding Migration @@ -94,7 +94,7 @@ def sync_detailed( Args: source_connection_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -120,7 +120,7 @@ def sync( source_connection_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | None | SourceEmbeddingMigrationResponse | None: """Get Source Embedding Migration @@ -130,7 +130,7 @@ def sync( Args: source_connection_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -151,7 +151,7 @@ async def asyncio_detailed( source_connection_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | None | SourceEmbeddingMigrationResponse]: """Get Source Embedding Migration @@ -161,7 +161,7 @@ async def asyncio_detailed( Args: source_connection_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -185,7 +185,7 @@ async def asyncio( source_connection_id: UUID, *, client: AuthenticatedClient | Client, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | None | SourceEmbeddingMigrationResponse | None: """Get Source Embedding Migration @@ -195,7 +195,7 @@ async def asyncio( Args: source_connection_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/sources/list_sources_api_sources_get.py b/seclai/_generated/api/sources/list_sources_api_sources_get.py index 0b62cad..989e651 100644 --- a/seclai/_generated/api/sources/list_sources_api_sources_get.py +++ b/seclai/_generated/api/sources/list_sources_api_sources_get.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from uuid import UUID import httpx @@ -17,7 +18,7 @@ def _get_kwargs( sort: str | Unset = "created_at", order: str | Unset = "desc", account_id: None | str | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -90,15 +91,15 @@ def sync_detailed( sort: str | Unset = "created_at", order: str | Unset = "desc", account_id: None | str | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | SourceListResponse]: """List sources List content sources for your account. - A *source* is where Seclai pulls or receives content from (for example RSS feeds, websites, file - uploads, or custom indexes). Sources are the inputs that power your agents and knowledge base - workflows. + A *source* is where Seclai pulls or receives content from — RSS feeds, websites, or content stores + (``custom_index``). Content stores support file uploads and API-driven content ingestion with + configurable index modes (``fast_and_cheap``, ``balanced``, ``slow_and_thorough``, or ``custom``). Parameters: - Pagination: `page` and `limit`. @@ -115,7 +116,7 @@ def sync_detailed( order (str | Unset): Sort order Default: 'desc'. account_id (None | str | Unset): List sources for the given account. Defaults to the caller's account. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -149,15 +150,15 @@ def sync( sort: str | Unset = "created_at", order: str | Unset = "desc", account_id: None | str | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | SourceListResponse | None: """List sources List content sources for your account. - A *source* is where Seclai pulls or receives content from (for example RSS feeds, websites, file - uploads, or custom indexes). Sources are the inputs that power your agents and knowledge base - workflows. + A *source* is where Seclai pulls or receives content from — RSS feeds, websites, or content stores + (``custom_index``). Content stores support file uploads and API-driven content ingestion with + configurable index modes (``fast_and_cheap``, ``balanced``, ``slow_and_thorough``, or ``custom``). Parameters: - Pagination: `page` and `limit`. @@ -174,7 +175,7 @@ def sync( order (str | Unset): Sort order Default: 'desc'. account_id (None | str | Unset): List sources for the given account. Defaults to the caller's account. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -203,15 +204,15 @@ async def asyncio_detailed( sort: str | Unset = "created_at", order: str | Unset = "desc", account_id: None | str | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | SourceListResponse]: """List sources List content sources for your account. - A *source* is where Seclai pulls or receives content from (for example RSS feeds, websites, file - uploads, or custom indexes). Sources are the inputs that power your agents and knowledge base - workflows. + A *source* is where Seclai pulls or receives content from — RSS feeds, websites, or content stores + (``custom_index``). Content stores support file uploads and API-driven content ingestion with + configurable index modes (``fast_and_cheap``, ``balanced``, ``slow_and_thorough``, or ``custom``). Parameters: - Pagination: `page` and `limit`. @@ -228,7 +229,7 @@ async def asyncio_detailed( order (str | Unset): Sort order Default: 'desc'. account_id (None | str | Unset): List sources for the given account. Defaults to the caller's account. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -260,15 +261,15 @@ async def asyncio( sort: str | Unset = "created_at", order: str | Unset = "desc", account_id: None | str | Unset = UNSET, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | SourceListResponse | None: """List sources List content sources for your account. - A *source* is where Seclai pulls or receives content from (for example RSS feeds, websites, file - uploads, or custom indexes). Sources are the inputs that power your agents and knowledge base - workflows. + A *source* is where Seclai pulls or receives content from — RSS feeds, websites, or content stores + (``custom_index``). Content stores support file uploads and API-driven content ingestion with + configurable index modes (``fast_and_cheap``, ``balanced``, ``slow_and_thorough``, or ``custom``). Parameters: - Pagination: `page` and `limit`. @@ -285,7 +286,7 @@ async def asyncio( order (str | Unset): Sort order Default: 'desc'. account_id (None | str | Unset): List sources for the given account. Defaults to the caller's account. - x_account_id (str | Unset): + x_account_id (UUID | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/seclai/_generated/api/sources/start_source_embedding_migration_api_sources_source_connection_id_embedding_migration_post.py b/seclai/_generated/api/sources/start_source_embedding_migration_api_sources_source_connection_id_embedding_migration_post.py index 924bd74..9477289 100644 --- a/seclai/_generated/api/sources/start_source_embedding_migration_api_sources_source_connection_id_embedding_migration_post.py +++ b/seclai/_generated/api/sources/start_source_embedding_migration_api_sources_source_connection_id_embedding_migration_post.py @@ -21,7 +21,7 @@ def _get_kwargs( source_connection_id: UUID, *, body: StartSourceEmbeddingMigrationRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -81,7 +81,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: StartSourceEmbeddingMigrationRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError | SourceEmbeddingMigrationResponse]: """Start Source Embedding Migration @@ -101,7 +101,7 @@ def sync_detailed( Args: source_connection_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (StartSourceEmbeddingMigrationRequest): Request payload to start a source embedding migration. @@ -131,7 +131,7 @@ def sync( *, client: AuthenticatedClient | Client, body: StartSourceEmbeddingMigrationRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | SourceEmbeddingMigrationResponse | None: """Start Source Embedding Migration @@ -151,7 +151,7 @@ def sync( Args: source_connection_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (StartSourceEmbeddingMigrationRequest): Request payload to start a source embedding migration. @@ -176,7 +176,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: StartSourceEmbeddingMigrationRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[Any | HTTPValidationError | SourceEmbeddingMigrationResponse]: """Start Source Embedding Migration @@ -196,7 +196,7 @@ async def asyncio_detailed( Args: source_connection_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (StartSourceEmbeddingMigrationRequest): Request payload to start a source embedding migration. @@ -224,7 +224,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: StartSourceEmbeddingMigrationRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Any | HTTPValidationError | SourceEmbeddingMigrationResponse | None: """Start Source Embedding Migration @@ -244,7 +244,7 @@ async def asyncio( Args: source_connection_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (StartSourceEmbeddingMigrationRequest): Request payload to start a source embedding migration. diff --git a/seclai/_generated/api/sources/update_source_api_sources_source_connection_id_put.py b/seclai/_generated/api/sources/update_source_api_sources_source_connection_id_put.py index d8931d5..77f5ba9 100644 --- a/seclai/_generated/api/sources/update_source_api_sources_source_connection_id_put.py +++ b/seclai/_generated/api/sources/update_source_api_sources_source_connection_id_put.py @@ -17,7 +17,7 @@ def _get_kwargs( source_connection_id: UUID, *, body: UpdateSourceBody, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -73,7 +73,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: UpdateSourceBody, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | SourceResponse]: """Update Source @@ -84,7 +84,7 @@ def sync_detailed( Args: source_connection_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UpdateSourceBody): Request body for updating a content source. Raises: @@ -113,7 +113,7 @@ def sync( *, client: AuthenticatedClient | Client, body: UpdateSourceBody, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | SourceResponse | None: """Update Source @@ -124,7 +124,7 @@ def sync( Args: source_connection_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UpdateSourceBody): Request body for updating a content source. Raises: @@ -148,7 +148,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: UpdateSourceBody, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError | SourceResponse]: """Update Source @@ -159,7 +159,7 @@ async def asyncio_detailed( Args: source_connection_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UpdateSourceBody): Request body for updating a content source. Raises: @@ -186,7 +186,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: UpdateSourceBody, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | SourceResponse | None: """Update Source @@ -197,7 +197,7 @@ async def asyncio( Args: source_connection_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (UpdateSourceBody): Request body for updating a content source. Raises: diff --git a/seclai/_generated/api/sources/upload_file_to_source_api_sources_source_connection_id_upload_post.py b/seclai/_generated/api/sources/upload_file_to_source_api_sources_source_connection_id_upload_post.py index b1f4e32..56b7c9e 100644 --- a/seclai/_generated/api/sources/upload_file_to_source_api_sources_source_connection_id_upload_post.py +++ b/seclai/_generated/api/sources/upload_file_to_source_api_sources_source_connection_id_upload_post.py @@ -1,6 +1,7 @@ from http import HTTPStatus from typing import Any from urllib.parse import quote +from uuid import UUID import httpx @@ -17,7 +18,7 @@ def _get_kwargs( source_connection_id: str, *, body: BodyUploadFileToSourceApiSourcesSourceConnectionIdUploadPost, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -66,7 +67,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: BodyUploadFileToSourceApiSourcesSourceConnectionIdUploadPost, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError]: r"""Upload a file to a content source @@ -77,7 +78,6 @@ def sync_detailed( **Supported MIME types:** - `application/epub+zip` - `application/json` - - `application/msword` - `application/pdf` - `application/vnd.ms-excel` - `application/vnd.ms-outlook` @@ -124,7 +124,7 @@ def sync_detailed( Args: source_connection_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (BodyUploadFileToSourceApiSourcesSourceConnectionIdUploadPost): Raises: @@ -153,7 +153,7 @@ def sync( *, client: AuthenticatedClient | Client, body: BodyUploadFileToSourceApiSourcesSourceConnectionIdUploadPost, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | None: r"""Upload a file to a content source @@ -164,7 +164,6 @@ def sync( **Supported MIME types:** - `application/epub+zip` - `application/json` - - `application/msword` - `application/pdf` - `application/vnd.ms-excel` - `application/vnd.ms-outlook` @@ -211,7 +210,7 @@ def sync( Args: source_connection_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (BodyUploadFileToSourceApiSourcesSourceConnectionIdUploadPost): Raises: @@ -235,7 +234,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: BodyUploadFileToSourceApiSourcesSourceConnectionIdUploadPost, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError]: r"""Upload a file to a content source @@ -246,7 +245,6 @@ async def asyncio_detailed( **Supported MIME types:** - `application/epub+zip` - `application/json` - - `application/msword` - `application/pdf` - `application/vnd.ms-excel` - `application/vnd.ms-outlook` @@ -293,7 +291,7 @@ async def asyncio_detailed( Args: source_connection_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (BodyUploadFileToSourceApiSourcesSourceConnectionIdUploadPost): Raises: @@ -320,7 +318,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: BodyUploadFileToSourceApiSourcesSourceConnectionIdUploadPost, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | None: r"""Upload a file to a content source @@ -331,7 +329,6 @@ async def asyncio( **Supported MIME types:** - `application/epub+zip` - `application/json` - - `application/msword` - `application/pdf` - `application/vnd.ms-excel` - `application/vnd.ms-outlook` @@ -378,7 +375,7 @@ async def asyncio( Args: source_connection_id (str): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (BodyUploadFileToSourceApiSourcesSourceConnectionIdUploadPost): Raises: diff --git a/seclai/_generated/api/sources/upload_inline_text_to_source_api_sources_source_connection_id_post.py b/seclai/_generated/api/sources/upload_inline_text_to_source_api_sources_source_connection_id_post.py index 825f51a..1f5d697 100644 --- a/seclai/_generated/api/sources/upload_inline_text_to_source_api_sources_source_connection_id_post.py +++ b/seclai/_generated/api/sources/upload_inline_text_to_source_api_sources_source_connection_id_post.py @@ -16,7 +16,7 @@ def _get_kwargs( source_connection_id: UUID, *, body: InlineTextUploadRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_account_id, Unset): @@ -67,7 +67,7 @@ def sync_detailed( *, client: AuthenticatedClient | Client, body: InlineTextUploadRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError]: """Upload inline text to a content source @@ -91,7 +91,7 @@ def sync_detailed( Args: source_connection_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (InlineTextUploadRequest): Request model for inline text uploads. Raises: @@ -120,7 +120,7 @@ def sync( *, client: AuthenticatedClient | Client, body: InlineTextUploadRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | None: """Upload inline text to a content source @@ -144,7 +144,7 @@ def sync( Args: source_connection_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (InlineTextUploadRequest): Request model for inline text uploads. Raises: @@ -168,7 +168,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient | Client, body: InlineTextUploadRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> Response[HTTPValidationError]: """Upload inline text to a content source @@ -192,7 +192,7 @@ async def asyncio_detailed( Args: source_connection_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (InlineTextUploadRequest): Request model for inline text uploads. Raises: @@ -219,7 +219,7 @@ async def asyncio( *, client: AuthenticatedClient | Client, body: InlineTextUploadRequest, - x_account_id: str | Unset = UNSET, + x_account_id: UUID | Unset = UNSET, ) -> HTTPValidationError | None: """Upload inline text to a content source @@ -243,7 +243,7 @@ async def asyncio( Args: source_connection_id (UUID): - x_account_id (str | Unset): + x_account_id (UUID | Unset): body (InlineTextUploadRequest): Request model for inline text uploads. Raises: diff --git a/seclai/_generated/models/__init__.py b/seclai/_generated/models/__init__.py index 79fb21f..ffc2995 100644 --- a/seclai/_generated/models/__init__.py +++ b/seclai/_generated/models/__init__.py @@ -69,6 +69,9 @@ from .body_upload_file_to_source_api_sources_source_connection_id_upload_post import ( BodyUploadFileToSourceApiSourcesSourceConnectionIdUploadPost, ) +from .cancel_experiment_endpoint_api_models_playground_experiments_experiment_id_cancel_post_response_cancel_experiment_endpoint_api_models_playground_experiments_experiment_id_cancel_post import ( + CancelExperimentEndpointApiModelsPlaygroundExperimentsExperimentIdCancelPostResponseCancelExperimentEndpointApiModelsPlaygroundExperimentsExperimentIdCancelPost, +) from .change_alert_status_api_alerts_alert_id_status_post_response_change_alert_status_api_alerts_alert_id_status_post import ( ChangeAlertStatusApiAlertsAlertIdStatusPostResponseChangeAlertStatusApiAlertsAlertIdStatusPost, ) @@ -102,6 +105,9 @@ from .create_evaluation_result_request_details_type_0 import ( CreateEvaluationResultRequestDetailsType0, ) +from .create_experiment_api_models_playground_experiments_post_response_create_experiment_api_models_playground_experiments_post import ( + CreateExperimentApiModelsPlaygroundExperimentsPostResponseCreateExperimentApiModelsPlaygroundExperimentsPost, +) from .create_export_request import CreateExportRequest from .create_export_request_metadata_filter_type_0 import ( CreateExportRequestMetadataFilterType0, @@ -181,6 +187,9 @@ from .get_alert_unread_count_api_models_alerts_unread_count_get_response_get_alert_unread_count_api_models_alerts_unread_count_get import ( GetAlertUnreadCountApiModelsAlertsUnreadCountGetResponseGetAlertUnreadCountApiModelsAlertsUnreadCountGet, ) +from .get_experiment_api_models_playground_experiments_experiment_id_get_response_get_experiment_api_models_playground_experiments_experiment_id_get import ( + GetExperimentApiModelsPlaygroundExperimentsExperimentIdGetResponseGetExperimentApiModelsPlaygroundExperimentsExperimentIdGet, +) from .get_memory_bank_entry_stats_api_memory_banks_memory_bank_id_stats_get_response_get_memory_bank_entry_stats_api_memory_banks_memory_bank_id_stats_get import ( GetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGetResponseGetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGet, ) @@ -215,6 +224,9 @@ from .list_alerts_api_models_alerts_get_response_list_alerts_api_models_alerts_get import ( ListAlertsApiModelsAlertsGetResponseListAlertsApiModelsAlertsGet, ) +from .list_experiments_api_models_playground_experiments_get_response_list_experiments_api_models_playground_experiments_get import ( + ListExperimentsApiModelsPlaygroundExperimentsGetResponseListExperimentsApiModelsPlaygroundExperimentsGet, +) from .list_templates_api_memory_banks_templates_get_response_200_item import ( ListTemplatesApiMemoryBanksTemplatesGetResponse200Item, ) @@ -254,11 +266,25 @@ from .pending_processing_completed_failed_status import ( PendingProcessingCompletedFailedStatus, ) +from .playground_create_request import PlaygroundCreateRequest +from .playground_create_request_evaluation_complexity import ( + PlaygroundCreateRequestEvaluationComplexity, +) +from .playground_create_request_evaluation_mode import ( + PlaygroundCreateRequestEvaluationMode, +) from .prompt_model_auto_upgrade_strategy import PromptModelAutoUpgradeStrategy +from .prompt_model_response import PromptModelResponse +from .prompt_model_response_payload_schema_type_0 import ( + PromptModelResponsePayloadSchemaType0, +) +from .prompt_tool_response import PromptToolResponse +from .prompt_tool_response_headers_type_0 import PromptToolResponseHeadersType0 from .proposed_action_response import ProposedActionResponse from .proposed_action_response_params import ProposedActionResponseParams from .proposed_policy_action_response import ProposedPolicyActionResponse from .proposed_policy_action_response_params import ProposedPolicyActionResponseParams +from .provider_group_response import ProviderGroupResponse from .search_api_search_get_response_search_api_search_get import ( SearchApiSearchGetResponseSearchApiSearchGet, ) @@ -274,6 +300,7 @@ from .solution_summary_response import SolutionSummaryResponse from .source_connection_response_model import SourceConnectionResponseModel from .source_embedding_migration_response import SourceEmbeddingMigrationResponse +from .source_index_mode import SourceIndexMode from .source_list_response import SourceListResponse from .source_response import SourceResponse from .standalone_test_compaction_request import StandaloneTestCompactionRequest @@ -321,6 +348,8 @@ from .update_source_body import UpdateSourceBody from .upload_agent_input_api_response import UploadAgentInputApiResponse from .validation_error import ValidationError +from .variant_category_response import VariantCategoryResponse +from .variant_option_response import VariantOptionResponse __all__ = ( "AddAlertCommentApiAlertsAlertIdCommentsPostResponseAddAlertCommentApiAlertsAlertIdCommentsPost", @@ -366,6 +395,7 @@ "AppliedActionResponse", "BodyUploadFileToContentApiContentsSourceConnectionContentVersionUploadPost", "BodyUploadFileToSourceApiSourcesSourceConnectionIdUploadPost", + "CancelExperimentEndpointApiModelsPlaygroundExperimentsExperimentIdCancelPostResponseCancelExperimentEndpointApiModelsPlaygroundExperimentsExperimentIdCancelPost", "ChangeAlertStatusApiAlertsAlertIdStatusPostResponseChangeAlertStatusApiAlertsAlertIdStatusPost", "ChangeStatusRequest", "CompactionEvaluationModel", @@ -385,6 +415,7 @@ "CreateEvaluationCriteriaRequestExpectationConfigType0", "CreateEvaluationResultRequest", "CreateEvaluationResultRequestDetailsType0", + "CreateExperimentApiModelsPlaygroundExperimentsPostResponseCreateExperimentApiModelsPlaygroundExperimentsPost", "CreateExportRequest", "CreateExportRequestMetadataFilterType0", "CreateKnowledgeBaseBody", @@ -428,6 +459,7 @@ "GetAlertConfigApiAlertsConfigsConfigIdGetResponseGetAlertConfigApiAlertsConfigsConfigIdGet", "GetAlertDetailApiAlertsAlertIdGetResponseGetAlertDetailApiAlertsAlertIdGet", "GetAlertUnreadCountApiModelsAlertsUnreadCountGetResponseGetAlertUnreadCountApiModelsAlertsUnreadCountGet", + "GetExperimentApiModelsPlaygroundExperimentsExperimentIdGetResponseGetExperimentApiModelsPlaygroundExperimentsExperimentIdGet", "GetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGetResponseGetMemoryBankEntryStatsApiMemoryBanksMemoryBankIdStatsGet", "GetRecommendationsApiModelsModelIdRecommendationsGetResponseGetRecommendationsApiModelsModelIdRecommendationsGet", "GovernanceAiAcceptResponse", @@ -446,6 +478,7 @@ "ListAlertConfigsApiAlertsConfigsGetResponseListAlertConfigsApiAlertsConfigsGet", "ListAlertsApiAlertsGetResponseListAlertsApiAlertsGet", "ListAlertsApiModelsAlertsGetResponseListAlertsApiModelsAlertsGet", + "ListExperimentsApiModelsPlaygroundExperimentsGetResponseListExperimentsApiModelsPlaygroundExperimentsGet", "ListTemplatesApiMemoryBanksTemplatesGetResponse200Item", "MarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatchResponseMarkAiSuggestionApiAgentsAgentIdAiAssistantConversationIdPatch", "MarkAiSuggestionRequest", @@ -469,11 +502,19 @@ "OrganizationInfoResponse", "PaginationResponse", "PendingProcessingCompletedFailedStatus", + "PlaygroundCreateRequest", + "PlaygroundCreateRequestEvaluationComplexity", + "PlaygroundCreateRequestEvaluationMode", "PromptModelAutoUpgradeStrategy", + "PromptModelResponse", + "PromptModelResponsePayloadSchemaType0", + "PromptToolResponse", + "PromptToolResponseHeadersType0", "ProposedActionResponse", "ProposedActionResponseParams", "ProposedPolicyActionResponse", "ProposedPolicyActionResponseParams", + "ProviderGroupResponse", "SearchApiSearchGetResponseSearchApiSearchGet", "SolutionAgentResponse", "SolutionConversationResponse", @@ -485,6 +526,7 @@ "SolutionSummaryResponse", "SourceConnectionResponseModel", "SourceEmbeddingMigrationResponse", + "SourceIndexMode", "SourceListResponse", "SourceResponse", "StandaloneTestCompactionRequest", @@ -512,4 +554,6 @@ "UpdateSourceBody", "UploadAgentInputApiResponse", "ValidationError", + "VariantCategoryResponse", + "VariantOptionResponse", ) diff --git a/seclai/_generated/models/agent_definition_response.py b/seclai/_generated/models/agent_definition_response.py index 507c360..f094be4 100644 --- a/seclai/_generated/models/agent_definition_response.py +++ b/seclai/_generated/models/agent_definition_response.py @@ -27,8 +27,8 @@ class AgentDefinitionResponse: change_id (str): Current change ID (use as expected_change_id when updating). definition (AgentDefinitionResponseDefinition): The agent definition containing name, description, tags, and step workflow tree. Step types include prompt_call, retrieval, transform, gate, retry, evaluate_step, insight, - extract_json, send_email, webhook_call, call_agent, write_metadata, write_content_attachment, - load_content_attachment, load_content, display_result, and others. + extract_content, streaming_result, send_email, webhook_call, call_agent, write_metadata, + write_content_attachment, load_content_attachment, load_content, display_result, and others. schema_version (str): Agent schema version. warnings (list[AgentDefinitionResponseWarningsType0Item] | None | Unset): Validation warnings, if any. """ diff --git a/seclai/_generated/models/agent_definition_response_definition.py b/seclai/_generated/models/agent_definition_response_definition.py index ce24474..c84c270 100644 --- a/seclai/_generated/models/agent_definition_response_definition.py +++ b/seclai/_generated/models/agent_definition_response_definition.py @@ -12,8 +12,9 @@ @_attrs_define class AgentDefinitionResponseDefinition: """The agent definition containing name, description, tags, and step workflow tree. Step types include prompt_call, - retrieval, transform, gate, retry, evaluate_step, insight, extract_json, send_email, webhook_call, call_agent, - write_metadata, write_content_attachment, load_content_attachment, load_content, display_result, and others. + retrieval, transform, gate, retry, evaluate_step, insight, extract_content, streaming_result, send_email, + webhook_call, call_agent, write_metadata, write_content_attachment, load_content_attachment, load_content, + display_result, and others. """ diff --git a/seclai/_generated/models/cancel_experiment_endpoint_api_models_playground_experiments_experiment_id_cancel_post_response_cancel_experiment_endpoint_api_models_playground_experiments_experiment_id_cancel_post.py b/seclai/_generated/models/cancel_experiment_endpoint_api_models_playground_experiments_experiment_id_cancel_post_response_cancel_experiment_endpoint_api_models_playground_experiments_experiment_id_cancel_post.py new file mode 100644 index 0000000..6ae941f --- /dev/null +++ b/seclai/_generated/models/cancel_experiment_endpoint_api_models_playground_experiments_experiment_id_cancel_post_response_cancel_experiment_endpoint_api_models_playground_experiments_experiment_id_cancel_post.py @@ -0,0 +1,53 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar( + "T", + bound="CancelExperimentEndpointApiModelsPlaygroundExperimentsExperimentIdCancelPostResponseCancelExperimentEndpointApiModelsPlaygroundExperimentsExperimentIdCancelPost", +) + + +@_attrs_define +class CancelExperimentEndpointApiModelsPlaygroundExperimentsExperimentIdCancelPostResponseCancelExperimentEndpointApiModelsPlaygroundExperimentsExperimentIdCancelPost: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + cancel_experiment_endpoint_api_models_playground_experiments_experiment_id_cancel_post_response_cancel_experiment_endpoint_api_models_playground_experiments_experiment_id_cancel_post = ( + cls() + ) + + cancel_experiment_endpoint_api_models_playground_experiments_experiment_id_cancel_post_response_cancel_experiment_endpoint_api_models_playground_experiments_experiment_id_cancel_post.additional_properties = ( + d + ) + return cancel_experiment_endpoint_api_models_playground_experiments_experiment_id_cancel_post_response_cancel_experiment_endpoint_api_models_playground_experiments_experiment_id_cancel_post + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/create_experiment_api_models_playground_experiments_post_response_create_experiment_api_models_playground_experiments_post.py b/seclai/_generated/models/create_experiment_api_models_playground_experiments_post_response_create_experiment_api_models_playground_experiments_post.py new file mode 100644 index 0000000..8e7ec3a --- /dev/null +++ b/seclai/_generated/models/create_experiment_api_models_playground_experiments_post_response_create_experiment_api_models_playground_experiments_post.py @@ -0,0 +1,53 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar( + "T", + bound="CreateExperimentApiModelsPlaygroundExperimentsPostResponseCreateExperimentApiModelsPlaygroundExperimentsPost", +) + + +@_attrs_define +class CreateExperimentApiModelsPlaygroundExperimentsPostResponseCreateExperimentApiModelsPlaygroundExperimentsPost: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + create_experiment_api_models_playground_experiments_post_response_create_experiment_api_models_playground_experiments_post = ( + cls() + ) + + create_experiment_api_models_playground_experiments_post_response_create_experiment_api_models_playground_experiments_post.additional_properties = ( + d + ) + return create_experiment_api_models_playground_experiments_post_response_create_experiment_api_models_playground_experiments_post + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/create_source_body.py b/seclai/_generated/models/create_source_body.py index 21a9479..04164f5 100644 --- a/seclai/_generated/models/create_source_body.py +++ b/seclai/_generated/models/create_source_body.py @@ -6,6 +6,7 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.source_index_mode import SourceIndexMode from ..types import UNSET, Unset T = TypeVar("T", bound="CreateSourceBody") @@ -17,12 +18,15 @@ class CreateSourceBody: Attributes: name (str): Source name. - source_type (str): Source type: rss, website, file_uploads, or custom_index. + source_type (str): Source type: rss, website, or custom_index. The legacy value 'file_uploads' is accepted as an + alias for custom_index. chunk_overlap (int | None | Unset): Chunk overlap for content processing. chunk_size (int | None | Unset): Chunk size for content processing. content_filter (None | str | Unset): Content filter type. dimensions (int | None | Unset): Embedding dimensions override. embedding_model (None | str | Unset): Embedding model override. + index_mode (None | SourceIndexMode | Unset): Index mode for custom_index sources: fast_and_cheap (default), + balanced, slow_and_thorough, or custom. polling (None | str | Unset): Polling interval (e.g. hourly, daily). polling_action (None | str | Unset): Polling action. polling_max_items (int | None | Unset): Max items per poll. @@ -37,6 +41,7 @@ class CreateSourceBody: content_filter: None | str | Unset = UNSET dimensions: int | None | Unset = UNSET embedding_model: None | str | Unset = UNSET + index_mode: None | SourceIndexMode | Unset = UNSET polling: None | str | Unset = UNSET polling_action: None | str | Unset = UNSET polling_max_items: int | None | Unset = UNSET @@ -79,6 +84,14 @@ def to_dict(self) -> dict[str, Any]: else: embedding_model = self.embedding_model + index_mode: None | str | Unset + if isinstance(self.index_mode, Unset): + index_mode = UNSET + elif isinstance(self.index_mode, SourceIndexMode): + index_mode = self.index_mode.value + else: + index_mode = self.index_mode + polling: None | str | Unset if isinstance(self.polling, Unset): polling = UNSET @@ -127,6 +140,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["dimensions"] = dimensions if embedding_model is not UNSET: field_dict["embedding_model"] = embedding_model + if index_mode is not UNSET: + field_dict["index_mode"] = index_mode if polling is not UNSET: field_dict["polling"] = polling if polling_action is not UNSET: @@ -192,6 +207,23 @@ def _parse_embedding_model(data: object) -> None | str | Unset: embedding_model = _parse_embedding_model(d.pop("embedding_model", UNSET)) + def _parse_index_mode(data: object) -> None | SourceIndexMode | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + index_mode_type_0 = SourceIndexMode(data) + + return index_mode_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | SourceIndexMode | Unset, data) + + index_mode = _parse_index_mode(d.pop("index_mode", UNSET)) + def _parse_polling(data: object) -> None | str | Unset: if data is None: return data @@ -245,6 +277,7 @@ def _parse_url_id(data: object) -> None | str | Unset: content_filter=content_filter, dimensions=dimensions, embedding_model=embedding_model, + index_mode=index_mode, polling=polling, polling_action=polling_action, polling_max_items=polling_max_items, diff --git a/seclai/_generated/models/get_experiment_api_models_playground_experiments_experiment_id_get_response_get_experiment_api_models_playground_experiments_experiment_id_get.py b/seclai/_generated/models/get_experiment_api_models_playground_experiments_experiment_id_get_response_get_experiment_api_models_playground_experiments_experiment_id_get.py new file mode 100644 index 0000000..11d74b2 --- /dev/null +++ b/seclai/_generated/models/get_experiment_api_models_playground_experiments_experiment_id_get_response_get_experiment_api_models_playground_experiments_experiment_id_get.py @@ -0,0 +1,53 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar( + "T", + bound="GetExperimentApiModelsPlaygroundExperimentsExperimentIdGetResponseGetExperimentApiModelsPlaygroundExperimentsExperimentIdGet", +) + + +@_attrs_define +class GetExperimentApiModelsPlaygroundExperimentsExperimentIdGetResponseGetExperimentApiModelsPlaygroundExperimentsExperimentIdGet: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + get_experiment_api_models_playground_experiments_experiment_id_get_response_get_experiment_api_models_playground_experiments_experiment_id_get = ( + cls() + ) + + get_experiment_api_models_playground_experiments_experiment_id_get_response_get_experiment_api_models_playground_experiments_experiment_id_get.additional_properties = ( + d + ) + return get_experiment_api_models_playground_experiments_experiment_id_get_response_get_experiment_api_models_playground_experiments_experiment_id_get + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/list_experiments_api_models_playground_experiments_get_response_list_experiments_api_models_playground_experiments_get.py b/seclai/_generated/models/list_experiments_api_models_playground_experiments_get_response_list_experiments_api_models_playground_experiments_get.py new file mode 100644 index 0000000..5aad479 --- /dev/null +++ b/seclai/_generated/models/list_experiments_api_models_playground_experiments_get_response_list_experiments_api_models_playground_experiments_get.py @@ -0,0 +1,53 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar( + "T", + bound="ListExperimentsApiModelsPlaygroundExperimentsGetResponseListExperimentsApiModelsPlaygroundExperimentsGet", +) + + +@_attrs_define +class ListExperimentsApiModelsPlaygroundExperimentsGetResponseListExperimentsApiModelsPlaygroundExperimentsGet: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + list_experiments_api_models_playground_experiments_get_response_list_experiments_api_models_playground_experiments_get = ( + cls() + ) + + list_experiments_api_models_playground_experiments_get_response_list_experiments_api_models_playground_experiments_get.additional_properties = ( + d + ) + return list_experiments_api_models_playground_experiments_get_response_list_experiments_api_models_playground_experiments_get + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/playground_create_request.py b/seclai/_generated/models/playground_create_request.py new file mode 100644 index 0000000..f94c14e --- /dev/null +++ b/seclai/_generated/models/playground_create_request.py @@ -0,0 +1,205 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.playground_create_request_evaluation_complexity import ( + PlaygroundCreateRequestEvaluationComplexity, +) +from ..models.playground_create_request_evaluation_mode import ( + PlaygroundCreateRequestEvaluationMode, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PlaygroundCreateRequest") + + +@_attrs_define +class PlaygroundCreateRequest: + """Create a model playground experiment via the public API. + + Attributes: + model_ids (list[str]): Selected model IDs (1-10). + prompt (str): Prompt text for the experiment. + evaluation_complexity (PlaygroundCreateRequestEvaluationComplexity | Unset): simple, medium, or complex Default: + PlaygroundCreateRequestEvaluationComplexity.MEDIUM. + evaluation_mode (PlaygroundCreateRequestEvaluationMode | Unset): manual or prompt Default: + PlaygroundCreateRequestEvaluationMode.MANUAL. + evaluator_model_id (None | str | Unset): Evaluator model ID when evaluation_mode is prompt. + include_step_output_in_evaluation (bool | Unset): Whether to include selected step output as evaluator context. + Default: False. + json_template (None | str | Unset): Optional JSON template for advanced mode. + selected_step_output (None | str | Unset): Optional step output text for evaluator context. + system_prompt (str | Unset): Optional system prompt. Default: ''. + """ + + model_ids: list[str] + prompt: str + evaluation_complexity: PlaygroundCreateRequestEvaluationComplexity | Unset = ( + PlaygroundCreateRequestEvaluationComplexity.MEDIUM + ) + evaluation_mode: PlaygroundCreateRequestEvaluationMode | Unset = ( + PlaygroundCreateRequestEvaluationMode.MANUAL + ) + evaluator_model_id: None | str | Unset = UNSET + include_step_output_in_evaluation: bool | Unset = False + json_template: None | str | Unset = UNSET + selected_step_output: None | str | Unset = UNSET + system_prompt: str | Unset = "" + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + model_ids = self.model_ids + + prompt = self.prompt + + evaluation_complexity: str | Unset = UNSET + if not isinstance(self.evaluation_complexity, Unset): + evaluation_complexity = self.evaluation_complexity.value + + evaluation_mode: str | Unset = UNSET + if not isinstance(self.evaluation_mode, Unset): + evaluation_mode = self.evaluation_mode.value + + evaluator_model_id: None | str | Unset + if isinstance(self.evaluator_model_id, Unset): + evaluator_model_id = UNSET + else: + evaluator_model_id = self.evaluator_model_id + + include_step_output_in_evaluation = self.include_step_output_in_evaluation + + json_template: None | str | Unset + if isinstance(self.json_template, Unset): + json_template = UNSET + else: + json_template = self.json_template + + selected_step_output: None | str | Unset + if isinstance(self.selected_step_output, Unset): + selected_step_output = UNSET + else: + selected_step_output = self.selected_step_output + + system_prompt = self.system_prompt + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "model_ids": model_ids, + "prompt": prompt, + } + ) + if evaluation_complexity is not UNSET: + field_dict["evaluation_complexity"] = evaluation_complexity + if evaluation_mode is not UNSET: + field_dict["evaluation_mode"] = evaluation_mode + if evaluator_model_id is not UNSET: + field_dict["evaluator_model_id"] = evaluator_model_id + if include_step_output_in_evaluation is not UNSET: + field_dict["include_step_output_in_evaluation"] = ( + include_step_output_in_evaluation + ) + if json_template is not UNSET: + field_dict["json_template"] = json_template + if selected_step_output is not UNSET: + field_dict["selected_step_output"] = selected_step_output + if system_prompt is not UNSET: + field_dict["system_prompt"] = system_prompt + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + model_ids = cast(list[str], d.pop("model_ids")) + + prompt = d.pop("prompt") + + _evaluation_complexity = d.pop("evaluation_complexity", UNSET) + evaluation_complexity: PlaygroundCreateRequestEvaluationComplexity | Unset + if isinstance(_evaluation_complexity, Unset): + evaluation_complexity = UNSET + else: + evaluation_complexity = PlaygroundCreateRequestEvaluationComplexity( + _evaluation_complexity + ) + + _evaluation_mode = d.pop("evaluation_mode", UNSET) + evaluation_mode: PlaygroundCreateRequestEvaluationMode | Unset + if isinstance(_evaluation_mode, Unset): + evaluation_mode = UNSET + else: + evaluation_mode = PlaygroundCreateRequestEvaluationMode(_evaluation_mode) + + def _parse_evaluator_model_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + evaluator_model_id = _parse_evaluator_model_id( + d.pop("evaluator_model_id", UNSET) + ) + + include_step_output_in_evaluation = d.pop( + "include_step_output_in_evaluation", UNSET + ) + + def _parse_json_template(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + json_template = _parse_json_template(d.pop("json_template", UNSET)) + + def _parse_selected_step_output(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + selected_step_output = _parse_selected_step_output( + d.pop("selected_step_output", UNSET) + ) + + system_prompt = d.pop("system_prompt", UNSET) + + playground_create_request = cls( + model_ids=model_ids, + prompt=prompt, + evaluation_complexity=evaluation_complexity, + evaluation_mode=evaluation_mode, + evaluator_model_id=evaluator_model_id, + include_step_output_in_evaluation=include_step_output_in_evaluation, + json_template=json_template, + selected_step_output=selected_step_output, + system_prompt=system_prompt, + ) + + playground_create_request.additional_properties = d + return playground_create_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/playground_create_request_evaluation_complexity.py b/seclai/_generated/models/playground_create_request_evaluation_complexity.py new file mode 100644 index 0000000..6d02650 --- /dev/null +++ b/seclai/_generated/models/playground_create_request_evaluation_complexity.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class PlaygroundCreateRequestEvaluationComplexity(str, Enum): + COMPLEX = "complex" + MEDIUM = "medium" + SIMPLE = "simple" + + def __str__(self) -> str: + return str(self.value) diff --git a/seclai/_generated/models/playground_create_request_evaluation_mode.py b/seclai/_generated/models/playground_create_request_evaluation_mode.py new file mode 100644 index 0000000..dd698fb --- /dev/null +++ b/seclai/_generated/models/playground_create_request_evaluation_mode.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class PlaygroundCreateRequestEvaluationMode(str, Enum): + MANUAL = "manual" + PROMPT = "prompt" + + def __str__(self) -> str: + return str(self.value) diff --git a/seclai/_generated/models/prompt_model_response.py b/seclai/_generated/models/prompt_model_response.py new file mode 100644 index 0000000..111d80f --- /dev/null +++ b/seclai/_generated/models/prompt_model_response.py @@ -0,0 +1,814 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.prompt_model_response_payload_schema_type_0 import ( + PromptModelResponsePayloadSchemaType0, + ) + from ..models.prompt_tool_response import PromptToolResponse + from ..models.variant_category_response import VariantCategoryResponse + + +T = TypeVar("T", bound="PromptModelResponse") + + +@_attrs_define +class PromptModelResponse: + """Response model for prompt model data + + Attributes: + default (bool): + description (str): + enabled (bool): + id (str): + max_context_tokens (int): + max_conversation_length (int): + max_output_tokens (int): + model_id (str): + name (str): + provider (str): + deprecated_at (datetime.datetime | None | Unset): + family (None | str | Unset): + family_generation (float | None | Unset): + input_1h_cache_write_credits_per_1000_tokens (float | None | Unset): + input_5m_cache_write_credits_per_1000_tokens (float | None | Unset): + input_cache_hit_credits_per_1000_tokens (float | None | Unset): + input_credits_per_1000_tokens (float | None | Unset): + is_new (bool | Unset): Default: False. + last_used (bool | Unset): Default: False. + output_credits_per_1000_tokens (float | None | Unset): + payload_schema (None | PromptModelResponsePayloadSchemaType0 | Unset): Model-specific JSON schema for advanced + prompt_call json_template payloads. + payload_schema_source_url (None | str | Unset): Source URL used to derive payload_schema guidance for this + model. + released_at (datetime.datetime | None | Unset): + schema_documentation_url (None | str | Unset): Model documentation URL with request/response payload details. + schema_notes (None | str | Unset): Human-readable notes about request payload compatibility. + successor_model_id (None | str | Unset): + sunset_at (datetime.datetime | None | Unset): + supported_input_media (list[str] | None | Unset): + supported_languages (list[str] | None | Unset): + supports_openai_arguments (bool | Unset): Default: False. + supports_streaming (bool | Unset): Default: False. + supports_structured_output (bool | Unset): Default: True. + supports_thinking (bool | Unset): Default: False. + supports_tool_use (bool | Unset): Default: True. + tools_disabled (list[PromptToolResponse] | Unset): + tools_enabled (list[PromptToolResponse] | Unset): + training_cutoff_at (datetime.datetime | None | Unset): + url (None | str | Unset): + variants (list[VariantCategoryResponse] | None | Unset): + """ + + default: bool + description: str + enabled: bool + id: str + max_context_tokens: int + max_conversation_length: int + max_output_tokens: int + model_id: str + name: str + provider: str + deprecated_at: datetime.datetime | None | Unset = UNSET + family: None | str | Unset = UNSET + family_generation: float | None | Unset = UNSET + input_1h_cache_write_credits_per_1000_tokens: float | None | Unset = UNSET + input_5m_cache_write_credits_per_1000_tokens: float | None | Unset = UNSET + input_cache_hit_credits_per_1000_tokens: float | None | Unset = UNSET + input_credits_per_1000_tokens: float | None | Unset = UNSET + is_new: bool | Unset = False + last_used: bool | Unset = False + output_credits_per_1000_tokens: float | None | Unset = UNSET + payload_schema: None | PromptModelResponsePayloadSchemaType0 | Unset = UNSET + payload_schema_source_url: None | str | Unset = UNSET + released_at: datetime.datetime | None | Unset = UNSET + schema_documentation_url: None | str | Unset = UNSET + schema_notes: None | str | Unset = UNSET + successor_model_id: None | str | Unset = UNSET + sunset_at: datetime.datetime | None | Unset = UNSET + supported_input_media: list[str] | None | Unset = UNSET + supported_languages: list[str] | None | Unset = UNSET + supports_openai_arguments: bool | Unset = False + supports_streaming: bool | Unset = False + supports_structured_output: bool | Unset = True + supports_thinking: bool | Unset = False + supports_tool_use: bool | Unset = True + tools_disabled: list[PromptToolResponse] | Unset = UNSET + tools_enabled: list[PromptToolResponse] | Unset = UNSET + training_cutoff_at: datetime.datetime | None | Unset = UNSET + url: None | str | Unset = UNSET + variants: list[VariantCategoryResponse] | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.prompt_model_response_payload_schema_type_0 import ( + PromptModelResponsePayloadSchemaType0, + ) + + default = self.default + + description = self.description + + enabled = self.enabled + + id = self.id + + max_context_tokens = self.max_context_tokens + + max_conversation_length = self.max_conversation_length + + max_output_tokens = self.max_output_tokens + + model_id = self.model_id + + name = self.name + + provider = self.provider + + deprecated_at: None | str | Unset + if isinstance(self.deprecated_at, Unset): + deprecated_at = UNSET + elif isinstance(self.deprecated_at, datetime.datetime): + deprecated_at = self.deprecated_at.isoformat() + else: + deprecated_at = self.deprecated_at + + family: None | str | Unset + if isinstance(self.family, Unset): + family = UNSET + else: + family = self.family + + family_generation: float | None | Unset + if isinstance(self.family_generation, Unset): + family_generation = UNSET + else: + family_generation = self.family_generation + + input_1h_cache_write_credits_per_1000_tokens: float | None | Unset + if isinstance(self.input_1h_cache_write_credits_per_1000_tokens, Unset): + input_1h_cache_write_credits_per_1000_tokens = UNSET + else: + input_1h_cache_write_credits_per_1000_tokens = ( + self.input_1h_cache_write_credits_per_1000_tokens + ) + + input_5m_cache_write_credits_per_1000_tokens: float | None | Unset + if isinstance(self.input_5m_cache_write_credits_per_1000_tokens, Unset): + input_5m_cache_write_credits_per_1000_tokens = UNSET + else: + input_5m_cache_write_credits_per_1000_tokens = ( + self.input_5m_cache_write_credits_per_1000_tokens + ) + + input_cache_hit_credits_per_1000_tokens: float | None | Unset + if isinstance(self.input_cache_hit_credits_per_1000_tokens, Unset): + input_cache_hit_credits_per_1000_tokens = UNSET + else: + input_cache_hit_credits_per_1000_tokens = ( + self.input_cache_hit_credits_per_1000_tokens + ) + + input_credits_per_1000_tokens: float | None | Unset + if isinstance(self.input_credits_per_1000_tokens, Unset): + input_credits_per_1000_tokens = UNSET + else: + input_credits_per_1000_tokens = self.input_credits_per_1000_tokens + + is_new = self.is_new + + last_used = self.last_used + + output_credits_per_1000_tokens: float | None | Unset + if isinstance(self.output_credits_per_1000_tokens, Unset): + output_credits_per_1000_tokens = UNSET + else: + output_credits_per_1000_tokens = self.output_credits_per_1000_tokens + + payload_schema: dict[str, Any] | None | Unset + if isinstance(self.payload_schema, Unset): + payload_schema = UNSET + elif isinstance(self.payload_schema, PromptModelResponsePayloadSchemaType0): + payload_schema = self.payload_schema.to_dict() + else: + payload_schema = self.payload_schema + + payload_schema_source_url: None | str | Unset + if isinstance(self.payload_schema_source_url, Unset): + payload_schema_source_url = UNSET + else: + payload_schema_source_url = self.payload_schema_source_url + + released_at: None | str | Unset + if isinstance(self.released_at, Unset): + released_at = UNSET + elif isinstance(self.released_at, datetime.datetime): + released_at = self.released_at.isoformat() + else: + released_at = self.released_at + + schema_documentation_url: None | str | Unset + if isinstance(self.schema_documentation_url, Unset): + schema_documentation_url = UNSET + else: + schema_documentation_url = self.schema_documentation_url + + schema_notes: None | str | Unset + if isinstance(self.schema_notes, Unset): + schema_notes = UNSET + else: + schema_notes = self.schema_notes + + successor_model_id: None | str | Unset + if isinstance(self.successor_model_id, Unset): + successor_model_id = UNSET + else: + successor_model_id = self.successor_model_id + + sunset_at: None | str | Unset + if isinstance(self.sunset_at, Unset): + sunset_at = UNSET + elif isinstance(self.sunset_at, datetime.datetime): + sunset_at = self.sunset_at.isoformat() + else: + sunset_at = self.sunset_at + + supported_input_media: list[str] | None | Unset + if isinstance(self.supported_input_media, Unset): + supported_input_media = UNSET + elif isinstance(self.supported_input_media, list): + supported_input_media = self.supported_input_media + + else: + supported_input_media = self.supported_input_media + + supported_languages: list[str] | None | Unset + if isinstance(self.supported_languages, Unset): + supported_languages = UNSET + elif isinstance(self.supported_languages, list): + supported_languages = self.supported_languages + + else: + supported_languages = self.supported_languages + + supports_openai_arguments = self.supports_openai_arguments + + supports_streaming = self.supports_streaming + + supports_structured_output = self.supports_structured_output + + supports_thinking = self.supports_thinking + + supports_tool_use = self.supports_tool_use + + tools_disabled: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.tools_disabled, Unset): + tools_disabled = [] + for tools_disabled_item_data in self.tools_disabled: + tools_disabled_item = tools_disabled_item_data.to_dict() + tools_disabled.append(tools_disabled_item) + + tools_enabled: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.tools_enabled, Unset): + tools_enabled = [] + for tools_enabled_item_data in self.tools_enabled: + tools_enabled_item = tools_enabled_item_data.to_dict() + tools_enabled.append(tools_enabled_item) + + training_cutoff_at: None | str | Unset + if isinstance(self.training_cutoff_at, Unset): + training_cutoff_at = UNSET + elif isinstance(self.training_cutoff_at, datetime.datetime): + training_cutoff_at = self.training_cutoff_at.isoformat() + else: + training_cutoff_at = self.training_cutoff_at + + url: None | str | Unset + if isinstance(self.url, Unset): + url = UNSET + else: + url = self.url + + variants: list[dict[str, Any]] | None | Unset + if isinstance(self.variants, Unset): + variants = UNSET + elif isinstance(self.variants, list): + variants = [] + for variants_type_0_item_data in self.variants: + variants_type_0_item = variants_type_0_item_data.to_dict() + variants.append(variants_type_0_item) + + else: + variants = self.variants + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "default": default, + "description": description, + "enabled": enabled, + "id": id, + "max_context_tokens": max_context_tokens, + "max_conversation_length": max_conversation_length, + "max_output_tokens": max_output_tokens, + "model_id": model_id, + "name": name, + "provider": provider, + } + ) + if deprecated_at is not UNSET: + field_dict["deprecated_at"] = deprecated_at + if family is not UNSET: + field_dict["family"] = family + if family_generation is not UNSET: + field_dict["family_generation"] = family_generation + if input_1h_cache_write_credits_per_1000_tokens is not UNSET: + field_dict["input_1h_cache_write_credits_per_1000_tokens"] = ( + input_1h_cache_write_credits_per_1000_tokens + ) + if input_5m_cache_write_credits_per_1000_tokens is not UNSET: + field_dict["input_5m_cache_write_credits_per_1000_tokens"] = ( + input_5m_cache_write_credits_per_1000_tokens + ) + if input_cache_hit_credits_per_1000_tokens is not UNSET: + field_dict["input_cache_hit_credits_per_1000_tokens"] = ( + input_cache_hit_credits_per_1000_tokens + ) + if input_credits_per_1000_tokens is not UNSET: + field_dict["input_credits_per_1000_tokens"] = input_credits_per_1000_tokens + if is_new is not UNSET: + field_dict["is_new"] = is_new + if last_used is not UNSET: + field_dict["last_used"] = last_used + if output_credits_per_1000_tokens is not UNSET: + field_dict["output_credits_per_1000_tokens"] = ( + output_credits_per_1000_tokens + ) + if payload_schema is not UNSET: + field_dict["payload_schema"] = payload_schema + if payload_schema_source_url is not UNSET: + field_dict["payload_schema_source_url"] = payload_schema_source_url + if released_at is not UNSET: + field_dict["released_at"] = released_at + if schema_documentation_url is not UNSET: + field_dict["schema_documentation_url"] = schema_documentation_url + if schema_notes is not UNSET: + field_dict["schema_notes"] = schema_notes + if successor_model_id is not UNSET: + field_dict["successor_model_id"] = successor_model_id + if sunset_at is not UNSET: + field_dict["sunset_at"] = sunset_at + if supported_input_media is not UNSET: + field_dict["supported_input_media"] = supported_input_media + if supported_languages is not UNSET: + field_dict["supported_languages"] = supported_languages + if supports_openai_arguments is not UNSET: + field_dict["supports_openai_arguments"] = supports_openai_arguments + if supports_streaming is not UNSET: + field_dict["supports_streaming"] = supports_streaming + if supports_structured_output is not UNSET: + field_dict["supports_structured_output"] = supports_structured_output + if supports_thinking is not UNSET: + field_dict["supports_thinking"] = supports_thinking + if supports_tool_use is not UNSET: + field_dict["supports_tool_use"] = supports_tool_use + if tools_disabled is not UNSET: + field_dict["tools_disabled"] = tools_disabled + if tools_enabled is not UNSET: + field_dict["tools_enabled"] = tools_enabled + if training_cutoff_at is not UNSET: + field_dict["training_cutoff_at"] = training_cutoff_at + if url is not UNSET: + field_dict["url"] = url + if variants is not UNSET: + field_dict["variants"] = variants + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.prompt_model_response_payload_schema_type_0 import ( + PromptModelResponsePayloadSchemaType0, + ) + from ..models.prompt_tool_response import PromptToolResponse + from ..models.variant_category_response import VariantCategoryResponse + + d = dict(src_dict) + default = d.pop("default") + + description = d.pop("description") + + enabled = d.pop("enabled") + + id = d.pop("id") + + max_context_tokens = d.pop("max_context_tokens") + + max_conversation_length = d.pop("max_conversation_length") + + max_output_tokens = d.pop("max_output_tokens") + + model_id = d.pop("model_id") + + name = d.pop("name") + + provider = d.pop("provider") + + def _parse_deprecated_at(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + deprecated_at_type_0 = isoparse(data) + + return deprecated_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + deprecated_at = _parse_deprecated_at(d.pop("deprecated_at", UNSET)) + + def _parse_family(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + family = _parse_family(d.pop("family", UNSET)) + + def _parse_family_generation(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + family_generation = _parse_family_generation(d.pop("family_generation", UNSET)) + + def _parse_input_1h_cache_write_credits_per_1000_tokens( + data: object, + ) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + input_1h_cache_write_credits_per_1000_tokens = ( + _parse_input_1h_cache_write_credits_per_1000_tokens( + d.pop("input_1h_cache_write_credits_per_1000_tokens", UNSET) + ) + ) + + def _parse_input_5m_cache_write_credits_per_1000_tokens( + data: object, + ) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + input_5m_cache_write_credits_per_1000_tokens = ( + _parse_input_5m_cache_write_credits_per_1000_tokens( + d.pop("input_5m_cache_write_credits_per_1000_tokens", UNSET) + ) + ) + + def _parse_input_cache_hit_credits_per_1000_tokens( + data: object, + ) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + input_cache_hit_credits_per_1000_tokens = ( + _parse_input_cache_hit_credits_per_1000_tokens( + d.pop("input_cache_hit_credits_per_1000_tokens", UNSET) + ) + ) + + def _parse_input_credits_per_1000_tokens(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + input_credits_per_1000_tokens = _parse_input_credits_per_1000_tokens( + d.pop("input_credits_per_1000_tokens", UNSET) + ) + + is_new = d.pop("is_new", UNSET) + + last_used = d.pop("last_used", UNSET) + + def _parse_output_credits_per_1000_tokens(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + output_credits_per_1000_tokens = _parse_output_credits_per_1000_tokens( + d.pop("output_credits_per_1000_tokens", UNSET) + ) + + def _parse_payload_schema( + data: object, + ) -> None | PromptModelResponsePayloadSchemaType0 | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + payload_schema_type_0 = PromptModelResponsePayloadSchemaType0.from_dict( + data + ) + + return payload_schema_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | PromptModelResponsePayloadSchemaType0 | Unset, data) + + payload_schema = _parse_payload_schema(d.pop("payload_schema", UNSET)) + + def _parse_payload_schema_source_url(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + payload_schema_source_url = _parse_payload_schema_source_url( + d.pop("payload_schema_source_url", UNSET) + ) + + def _parse_released_at(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + released_at_type_0 = isoparse(data) + + return released_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + released_at = _parse_released_at(d.pop("released_at", UNSET)) + + def _parse_schema_documentation_url(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + schema_documentation_url = _parse_schema_documentation_url( + d.pop("schema_documentation_url", UNSET) + ) + + def _parse_schema_notes(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + schema_notes = _parse_schema_notes(d.pop("schema_notes", UNSET)) + + def _parse_successor_model_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + successor_model_id = _parse_successor_model_id( + d.pop("successor_model_id", UNSET) + ) + + def _parse_sunset_at(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + sunset_at_type_0 = isoparse(data) + + return sunset_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + sunset_at = _parse_sunset_at(d.pop("sunset_at", UNSET)) + + def _parse_supported_input_media(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + supported_input_media_type_0 = cast(list[str], data) + + return supported_input_media_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + supported_input_media = _parse_supported_input_media( + d.pop("supported_input_media", UNSET) + ) + + def _parse_supported_languages(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + supported_languages_type_0 = cast(list[str], data) + + return supported_languages_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + supported_languages = _parse_supported_languages( + d.pop("supported_languages", UNSET) + ) + + supports_openai_arguments = d.pop("supports_openai_arguments", UNSET) + + supports_streaming = d.pop("supports_streaming", UNSET) + + supports_structured_output = d.pop("supports_structured_output", UNSET) + + supports_thinking = d.pop("supports_thinking", UNSET) + + supports_tool_use = d.pop("supports_tool_use", UNSET) + + _tools_disabled = d.pop("tools_disabled", UNSET) + tools_disabled: list[PromptToolResponse] | Unset = UNSET + if _tools_disabled is not UNSET: + tools_disabled = [] + for tools_disabled_item_data in _tools_disabled: + tools_disabled_item = PromptToolResponse.from_dict( + tools_disabled_item_data + ) + + tools_disabled.append(tools_disabled_item) + + _tools_enabled = d.pop("tools_enabled", UNSET) + tools_enabled: list[PromptToolResponse] | Unset = UNSET + if _tools_enabled is not UNSET: + tools_enabled = [] + for tools_enabled_item_data in _tools_enabled: + tools_enabled_item = PromptToolResponse.from_dict( + tools_enabled_item_data + ) + + tools_enabled.append(tools_enabled_item) + + def _parse_training_cutoff_at(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + training_cutoff_at_type_0 = isoparse(data) + + return training_cutoff_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + training_cutoff_at = _parse_training_cutoff_at( + d.pop("training_cutoff_at", UNSET) + ) + + def _parse_url(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + url = _parse_url(d.pop("url", UNSET)) + + def _parse_variants( + data: object, + ) -> list[VariantCategoryResponse] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + variants_type_0 = [] + _variants_type_0 = data + for variants_type_0_item_data in _variants_type_0: + variants_type_0_item = VariantCategoryResponse.from_dict( + variants_type_0_item_data + ) + + variants_type_0.append(variants_type_0_item) + + return variants_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[VariantCategoryResponse] | None | Unset, data) + + variants = _parse_variants(d.pop("variants", UNSET)) + + prompt_model_response = cls( + default=default, + description=description, + enabled=enabled, + id=id, + max_context_tokens=max_context_tokens, + max_conversation_length=max_conversation_length, + max_output_tokens=max_output_tokens, + model_id=model_id, + name=name, + provider=provider, + deprecated_at=deprecated_at, + family=family, + family_generation=family_generation, + input_1h_cache_write_credits_per_1000_tokens=input_1h_cache_write_credits_per_1000_tokens, + input_5m_cache_write_credits_per_1000_tokens=input_5m_cache_write_credits_per_1000_tokens, + input_cache_hit_credits_per_1000_tokens=input_cache_hit_credits_per_1000_tokens, + input_credits_per_1000_tokens=input_credits_per_1000_tokens, + is_new=is_new, + last_used=last_used, + output_credits_per_1000_tokens=output_credits_per_1000_tokens, + payload_schema=payload_schema, + payload_schema_source_url=payload_schema_source_url, + released_at=released_at, + schema_documentation_url=schema_documentation_url, + schema_notes=schema_notes, + successor_model_id=successor_model_id, + sunset_at=sunset_at, + supported_input_media=supported_input_media, + supported_languages=supported_languages, + supports_openai_arguments=supports_openai_arguments, + supports_streaming=supports_streaming, + supports_structured_output=supports_structured_output, + supports_thinking=supports_thinking, + supports_tool_use=supports_tool_use, + tools_disabled=tools_disabled, + tools_enabled=tools_enabled, + training_cutoff_at=training_cutoff_at, + url=url, + variants=variants, + ) + + prompt_model_response.additional_properties = d + return prompt_model_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/prompt_model_response_payload_schema_type_0.py b/seclai/_generated/models/prompt_model_response_payload_schema_type_0.py new file mode 100644 index 0000000..5a6c534 --- /dev/null +++ b/seclai/_generated/models/prompt_model_response_payload_schema_type_0.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PromptModelResponsePayloadSchemaType0") + + +@_attrs_define +class PromptModelResponsePayloadSchemaType0: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + prompt_model_response_payload_schema_type_0 = cls() + + prompt_model_response_payload_schema_type_0.additional_properties = d + return prompt_model_response_payload_schema_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/prompt_tool_response.py b/seclai/_generated/models/prompt_tool_response.py new file mode 100644 index 0000000..15858b3 --- /dev/null +++ b/seclai/_generated/models/prompt_tool_response.py @@ -0,0 +1,246 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.prompt_tool_response_headers_type_0 import ( + PromptToolResponseHeadersType0, + ) + + +T = TypeVar("T", bound="PromptToolResponse") + + +@_attrs_define +class PromptToolResponse: + """Response model for a prompt tool. + + Attributes: + id (str): + name (str): + tool_type (str): + description (None | str | Unset): + documentation_url (None | str | Unset): + example (None | str | Unset): + headers (None | PromptToolResponseHeadersType0 | Unset): + notes (None | str | Unset): + tool_name (None | str | Unset): + tool_type_pattern (None | str | Unset): + """ + + id: str + name: str + tool_type: str + description: None | str | Unset = UNSET + documentation_url: None | str | Unset = UNSET + example: None | str | Unset = UNSET + headers: None | PromptToolResponseHeadersType0 | Unset = UNSET + notes: None | str | Unset = UNSET + tool_name: None | str | Unset = UNSET + tool_type_pattern: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.prompt_tool_response_headers_type_0 import ( + PromptToolResponseHeadersType0, + ) + + id = self.id + + name = self.name + + tool_type = self.tool_type + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + documentation_url: None | str | Unset + if isinstance(self.documentation_url, Unset): + documentation_url = UNSET + else: + documentation_url = self.documentation_url + + example: None | str | Unset + if isinstance(self.example, Unset): + example = UNSET + else: + example = self.example + + headers: dict[str, Any] | None | Unset + if isinstance(self.headers, Unset): + headers = UNSET + elif isinstance(self.headers, PromptToolResponseHeadersType0): + headers = self.headers.to_dict() + else: + headers = self.headers + + notes: None | str | Unset + if isinstance(self.notes, Unset): + notes = UNSET + else: + notes = self.notes + + tool_name: None | str | Unset + if isinstance(self.tool_name, Unset): + tool_name = UNSET + else: + tool_name = self.tool_name + + tool_type_pattern: None | str | Unset + if isinstance(self.tool_type_pattern, Unset): + tool_type_pattern = UNSET + else: + tool_type_pattern = self.tool_type_pattern + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + "tool_type": tool_type, + } + ) + if description is not UNSET: + field_dict["description"] = description + if documentation_url is not UNSET: + field_dict["documentation_url"] = documentation_url + if example is not UNSET: + field_dict["example"] = example + if headers is not UNSET: + field_dict["headers"] = headers + if notes is not UNSET: + field_dict["notes"] = notes + if tool_name is not UNSET: + field_dict["tool_name"] = tool_name + if tool_type_pattern is not UNSET: + field_dict["tool_type_pattern"] = tool_type_pattern + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.prompt_tool_response_headers_type_0 import ( + PromptToolResponseHeadersType0, + ) + + d = dict(src_dict) + id = d.pop("id") + + name = d.pop("name") + + tool_type = d.pop("tool_type") + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + def _parse_documentation_url(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + documentation_url = _parse_documentation_url(d.pop("documentation_url", UNSET)) + + def _parse_example(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + example = _parse_example(d.pop("example", UNSET)) + + def _parse_headers( + data: object, + ) -> None | PromptToolResponseHeadersType0 | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + headers_type_0 = PromptToolResponseHeadersType0.from_dict(data) + + return headers_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | PromptToolResponseHeadersType0 | Unset, data) + + headers = _parse_headers(d.pop("headers", UNSET)) + + def _parse_notes(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + notes = _parse_notes(d.pop("notes", UNSET)) + + def _parse_tool_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + tool_name = _parse_tool_name(d.pop("tool_name", UNSET)) + + def _parse_tool_type_pattern(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + tool_type_pattern = _parse_tool_type_pattern(d.pop("tool_type_pattern", UNSET)) + + prompt_tool_response = cls( + id=id, + name=name, + tool_type=tool_type, + description=description, + documentation_url=documentation_url, + example=example, + headers=headers, + notes=notes, + tool_name=tool_name, + tool_type_pattern=tool_type_pattern, + ) + + prompt_tool_response.additional_properties = d + return prompt_tool_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/prompt_tool_response_headers_type_0.py b/seclai/_generated/models/prompt_tool_response_headers_type_0.py new file mode 100644 index 0000000..fa0dd1f --- /dev/null +++ b/seclai/_generated/models/prompt_tool_response_headers_type_0.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PromptToolResponseHeadersType0") + + +@_attrs_define +class PromptToolResponseHeadersType0: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + prompt_tool_response_headers_type_0 = cls() + + prompt_tool_response_headers_type_0.additional_properties = d + return prompt_tool_response_headers_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/provider_group_response.py b/seclai/_generated/models/provider_group_response.py new file mode 100644 index 0000000..c9c19e3 --- /dev/null +++ b/seclai/_generated/models/provider_group_response.py @@ -0,0 +1,84 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.prompt_model_response import PromptModelResponse + + +T = TypeVar("T", bound="ProviderGroupResponse") + + +@_attrs_define +class ProviderGroupResponse: + """Response model for provider group with models + + Attributes: + models (list[PromptModelResponse]): + provider (str): + """ + + models: list[PromptModelResponse] + provider: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + models = [] + for models_item_data in self.models: + models_item = models_item_data.to_dict() + models.append(models_item) + + provider = self.provider + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "models": models, + "provider": provider, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.prompt_model_response import PromptModelResponse + + d = dict(src_dict) + models = [] + _models = d.pop("models") + for models_item_data in _models: + models_item = PromptModelResponse.from_dict(models_item_data) + + models.append(models_item) + + provider = d.pop("provider") + + provider_group_response = cls( + models=models, + provider=provider, + ) + + provider_group_response.additional_properties = d + return provider_group_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/source_index_mode.py b/seclai/_generated/models/source_index_mode.py new file mode 100644 index 0000000..bcb534c --- /dev/null +++ b/seclai/_generated/models/source_index_mode.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class SourceIndexMode(str, Enum): + BALANCED = "balanced" + CUSTOM = "custom" + FAST_AND_CHEAP = "fast_and_cheap" + SLOW_AND_THOROUGH = "slow_and_thorough" + + def __str__(self) -> str: + return str(self.value) diff --git a/seclai/_generated/models/source_response.py b/seclai/_generated/models/source_response.py index b5c7e0b..0aaa0c2 100644 --- a/seclai/_generated/models/source_response.py +++ b/seclai/_generated/models/source_response.py @@ -7,6 +7,7 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.source_index_mode import SourceIndexMode from ..types import UNSET, Unset T = TypeVar("T", bound="SourceResponse") @@ -44,6 +45,8 @@ class SourceResponse: embedding_model_type (None | str | Unset): Type of the embedding model. free_retention_days (int | None | Unset): Number of days content is stored for free before billing applies. has_historical_data (bool | Unset): Indicates if the source connection has historical data. Default: False. + index_mode (None | SourceIndexMode | Unset): Index mode for custom_index sources: fast_and_cheap, balanced, + slow_and_thorough, or custom. readonly (bool | Unset): Indicates if the source connection is read-only. Default: False. system_managed (bool | Unset): Indicates if this source is automatically managed by the system (e.g., agent traces). Default: False. @@ -76,6 +79,7 @@ class SourceResponse: embedding_model_type: None | str | Unset = UNSET free_retention_days: int | None | Unset = UNSET has_historical_data: bool | Unset = False + index_mode: None | SourceIndexMode | Unset = UNSET readonly: bool | Unset = False system_managed: bool | Unset = False additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -186,6 +190,14 @@ def to_dict(self) -> dict[str, Any]: has_historical_data = self.has_historical_data + index_mode: None | str | Unset + if isinstance(self.index_mode, Unset): + index_mode = UNSET + elif isinstance(self.index_mode, SourceIndexMode): + index_mode = self.index_mode.value + else: + index_mode = self.index_mode + readonly = self.readonly system_managed = self.system_managed @@ -236,6 +248,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["free_retention_days"] = free_retention_days if has_historical_data is not UNSET: field_dict["has_historical_data"] = has_historical_data + if index_mode is not UNSET: + field_dict["index_mode"] = index_mode if readonly is not UNSET: field_dict["readonly"] = readonly if system_managed is not UNSET: @@ -422,6 +436,23 @@ def _parse_free_retention_days(data: object) -> int | None | Unset: has_historical_data = d.pop("has_historical_data", UNSET) + def _parse_index_mode(data: object) -> None | SourceIndexMode | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + index_mode_type_0 = SourceIndexMode(data) + + return index_mode_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | SourceIndexMode | Unset, data) + + index_mode = _parse_index_mode(d.pop("index_mode", UNSET)) + readonly = d.pop("readonly", UNSET) system_managed = d.pop("system_managed", UNSET) @@ -454,6 +485,7 @@ def _parse_free_retention_days(data: object) -> int | None | Unset: embedding_model_type=embedding_model_type, free_retention_days=free_retention_days, has_historical_data=has_historical_data, + index_mode=index_mode, readonly=readonly, system_managed=system_managed, ) diff --git a/seclai/_generated/models/variant_category_response.py b/seclai/_generated/models/variant_category_response.py new file mode 100644 index 0000000..f739bab --- /dev/null +++ b/seclai/_generated/models/variant_category_response.py @@ -0,0 +1,108 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.variant_option_response import VariantOptionResponse + + +T = TypeVar("T", bound="VariantCategoryResponse") + + +@_attrs_define +class VariantCategoryResponse: + """Response model for a variant category + + Attributes: + category (str): + configurable (bool): + description (str): + options (list[VariantOptionResponse]): + title (str): + """ + + category: str + configurable: bool + description: str + options: list[VariantOptionResponse] + title: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + category = self.category + + configurable = self.configurable + + description = self.description + + options = [] + for options_item_data in self.options: + options_item = options_item_data.to_dict() + options.append(options_item) + + title = self.title + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "category": category, + "configurable": configurable, + "description": description, + "options": options, + "title": title, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.variant_option_response import VariantOptionResponse + + d = dict(src_dict) + category = d.pop("category") + + configurable = d.pop("configurable") + + description = d.pop("description") + + options = [] + _options = d.pop("options") + for options_item_data in _options: + options_item = VariantOptionResponse.from_dict(options_item_data) + + options.append(options_item) + + title = d.pop("title") + + variant_category_response = cls( + category=category, + configurable=configurable, + description=description, + options=options, + title=title, + ) + + variant_category_response.additional_properties = d + return variant_category_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/variant_option_response.py b/seclai/_generated/models/variant_option_response.py new file mode 100644 index 0000000..4c86dec --- /dev/null +++ b/seclai/_generated/models/variant_option_response.py @@ -0,0 +1,348 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="VariantOptionResponse") + + +@_attrs_define +class VariantOptionResponse: + """Response model for a variant option + + Attributes: + default (bool): + title (str): + value (str): + description (None | str | Unset): + input_1h_cache_write_credits_per_1000_tokens (float | None | Unset): + input_5m_cache_write_credits_per_1000_tokens (float | None | Unset): + input_cache_hit_credits_per_1000_tokens (float | None | Unset): + input_credits_per_1000_tokens (float | None | Unset): + long_context_input_cache_hit_credits_per_1000_tokens (float | None | Unset): + long_context_input_credits_per_1000_tokens (float | None | Unset): + long_context_output_credits_per_1000_tokens (float | None | Unset): + long_context_threshold (int | None | Unset): + output_credits_per_1000_tokens (float | None | Unset): + """ + + default: bool + title: str + value: str + description: None | str | Unset = UNSET + input_1h_cache_write_credits_per_1000_tokens: float | None | Unset = UNSET + input_5m_cache_write_credits_per_1000_tokens: float | None | Unset = UNSET + input_cache_hit_credits_per_1000_tokens: float | None | Unset = UNSET + input_credits_per_1000_tokens: float | None | Unset = UNSET + long_context_input_cache_hit_credits_per_1000_tokens: float | None | Unset = UNSET + long_context_input_credits_per_1000_tokens: float | None | Unset = UNSET + long_context_output_credits_per_1000_tokens: float | None | Unset = UNSET + long_context_threshold: int | None | Unset = UNSET + output_credits_per_1000_tokens: float | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + default = self.default + + title = self.title + + value = self.value + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + input_1h_cache_write_credits_per_1000_tokens: float | None | Unset + if isinstance(self.input_1h_cache_write_credits_per_1000_tokens, Unset): + input_1h_cache_write_credits_per_1000_tokens = UNSET + else: + input_1h_cache_write_credits_per_1000_tokens = ( + self.input_1h_cache_write_credits_per_1000_tokens + ) + + input_5m_cache_write_credits_per_1000_tokens: float | None | Unset + if isinstance(self.input_5m_cache_write_credits_per_1000_tokens, Unset): + input_5m_cache_write_credits_per_1000_tokens = UNSET + else: + input_5m_cache_write_credits_per_1000_tokens = ( + self.input_5m_cache_write_credits_per_1000_tokens + ) + + input_cache_hit_credits_per_1000_tokens: float | None | Unset + if isinstance(self.input_cache_hit_credits_per_1000_tokens, Unset): + input_cache_hit_credits_per_1000_tokens = UNSET + else: + input_cache_hit_credits_per_1000_tokens = ( + self.input_cache_hit_credits_per_1000_tokens + ) + + input_credits_per_1000_tokens: float | None | Unset + if isinstance(self.input_credits_per_1000_tokens, Unset): + input_credits_per_1000_tokens = UNSET + else: + input_credits_per_1000_tokens = self.input_credits_per_1000_tokens + + long_context_input_cache_hit_credits_per_1000_tokens: float | None | Unset + if isinstance(self.long_context_input_cache_hit_credits_per_1000_tokens, Unset): + long_context_input_cache_hit_credits_per_1000_tokens = UNSET + else: + long_context_input_cache_hit_credits_per_1000_tokens = ( + self.long_context_input_cache_hit_credits_per_1000_tokens + ) + + long_context_input_credits_per_1000_tokens: float | None | Unset + if isinstance(self.long_context_input_credits_per_1000_tokens, Unset): + long_context_input_credits_per_1000_tokens = UNSET + else: + long_context_input_credits_per_1000_tokens = ( + self.long_context_input_credits_per_1000_tokens + ) + + long_context_output_credits_per_1000_tokens: float | None | Unset + if isinstance(self.long_context_output_credits_per_1000_tokens, Unset): + long_context_output_credits_per_1000_tokens = UNSET + else: + long_context_output_credits_per_1000_tokens = ( + self.long_context_output_credits_per_1000_tokens + ) + + long_context_threshold: int | None | Unset + if isinstance(self.long_context_threshold, Unset): + long_context_threshold = UNSET + else: + long_context_threshold = self.long_context_threshold + + output_credits_per_1000_tokens: float | None | Unset + if isinstance(self.output_credits_per_1000_tokens, Unset): + output_credits_per_1000_tokens = UNSET + else: + output_credits_per_1000_tokens = self.output_credits_per_1000_tokens + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "default": default, + "title": title, + "value": value, + } + ) + if description is not UNSET: + field_dict["description"] = description + if input_1h_cache_write_credits_per_1000_tokens is not UNSET: + field_dict["input_1h_cache_write_credits_per_1000_tokens"] = ( + input_1h_cache_write_credits_per_1000_tokens + ) + if input_5m_cache_write_credits_per_1000_tokens is not UNSET: + field_dict["input_5m_cache_write_credits_per_1000_tokens"] = ( + input_5m_cache_write_credits_per_1000_tokens + ) + if input_cache_hit_credits_per_1000_tokens is not UNSET: + field_dict["input_cache_hit_credits_per_1000_tokens"] = ( + input_cache_hit_credits_per_1000_tokens + ) + if input_credits_per_1000_tokens is not UNSET: + field_dict["input_credits_per_1000_tokens"] = input_credits_per_1000_tokens + if long_context_input_cache_hit_credits_per_1000_tokens is not UNSET: + field_dict["long_context_input_cache_hit_credits_per_1000_tokens"] = ( + long_context_input_cache_hit_credits_per_1000_tokens + ) + if long_context_input_credits_per_1000_tokens is not UNSET: + field_dict["long_context_input_credits_per_1000_tokens"] = ( + long_context_input_credits_per_1000_tokens + ) + if long_context_output_credits_per_1000_tokens is not UNSET: + field_dict["long_context_output_credits_per_1000_tokens"] = ( + long_context_output_credits_per_1000_tokens + ) + if long_context_threshold is not UNSET: + field_dict["long_context_threshold"] = long_context_threshold + if output_credits_per_1000_tokens is not UNSET: + field_dict["output_credits_per_1000_tokens"] = ( + output_credits_per_1000_tokens + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + default = d.pop("default") + + title = d.pop("title") + + value = d.pop("value") + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + def _parse_input_1h_cache_write_credits_per_1000_tokens( + data: object, + ) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + input_1h_cache_write_credits_per_1000_tokens = ( + _parse_input_1h_cache_write_credits_per_1000_tokens( + d.pop("input_1h_cache_write_credits_per_1000_tokens", UNSET) + ) + ) + + def _parse_input_5m_cache_write_credits_per_1000_tokens( + data: object, + ) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + input_5m_cache_write_credits_per_1000_tokens = ( + _parse_input_5m_cache_write_credits_per_1000_tokens( + d.pop("input_5m_cache_write_credits_per_1000_tokens", UNSET) + ) + ) + + def _parse_input_cache_hit_credits_per_1000_tokens( + data: object, + ) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + input_cache_hit_credits_per_1000_tokens = ( + _parse_input_cache_hit_credits_per_1000_tokens( + d.pop("input_cache_hit_credits_per_1000_tokens", UNSET) + ) + ) + + def _parse_input_credits_per_1000_tokens(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + input_credits_per_1000_tokens = _parse_input_credits_per_1000_tokens( + d.pop("input_credits_per_1000_tokens", UNSET) + ) + + def _parse_long_context_input_cache_hit_credits_per_1000_tokens( + data: object, + ) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + long_context_input_cache_hit_credits_per_1000_tokens = ( + _parse_long_context_input_cache_hit_credits_per_1000_tokens( + d.pop("long_context_input_cache_hit_credits_per_1000_tokens", UNSET) + ) + ) + + def _parse_long_context_input_credits_per_1000_tokens( + data: object, + ) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + long_context_input_credits_per_1000_tokens = ( + _parse_long_context_input_credits_per_1000_tokens( + d.pop("long_context_input_credits_per_1000_tokens", UNSET) + ) + ) + + def _parse_long_context_output_credits_per_1000_tokens( + data: object, + ) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + long_context_output_credits_per_1000_tokens = ( + _parse_long_context_output_credits_per_1000_tokens( + d.pop("long_context_output_credits_per_1000_tokens", UNSET) + ) + ) + + def _parse_long_context_threshold(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + long_context_threshold = _parse_long_context_threshold( + d.pop("long_context_threshold", UNSET) + ) + + def _parse_output_credits_per_1000_tokens(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + output_credits_per_1000_tokens = _parse_output_credits_per_1000_tokens( + d.pop("output_credits_per_1000_tokens", UNSET) + ) + + variant_option_response = cls( + default=default, + title=title, + value=value, + description=description, + input_1h_cache_write_credits_per_1000_tokens=input_1h_cache_write_credits_per_1000_tokens, + input_5m_cache_write_credits_per_1000_tokens=input_5m_cache_write_credits_per_1000_tokens, + input_cache_hit_credits_per_1000_tokens=input_cache_hit_credits_per_1000_tokens, + input_credits_per_1000_tokens=input_credits_per_1000_tokens, + long_context_input_cache_hit_credits_per_1000_tokens=long_context_input_cache_hit_credits_per_1000_tokens, + long_context_input_credits_per_1000_tokens=long_context_input_credits_per_1000_tokens, + long_context_output_credits_per_1000_tokens=long_context_output_credits_per_1000_tokens, + long_context_threshold=long_context_threshold, + output_credits_per_1000_tokens=output_credits_per_1000_tokens, + ) + + variant_option_response.additional_properties = d + return variant_option_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/seclai.py b/seclai/seclai.py index 24c186b..41a90e8 100644 --- a/seclai/seclai.py +++ b/seclai/seclai.py @@ -3352,6 +3352,118 @@ def get_model_recommendations(self, model_id: str) -> JSONValue: """ return self.request("GET", f"/models/{model_id}/recommendations") + def list_models( + self, + *, + provider: str | None = None, + supports_tool_use: bool | None = None, + supports_thinking: bool | None = None, + ) -> JSONValue: + """List all enabled LLM models grouped by provider. + + Args: + provider: Filter by provider name. + supports_tool_use: Filter to models that support tool use. + supports_thinking: Filter to models that support extended thinking. + + Returns: + List of provider groups with their models. + """ + return self.request( + "GET", + "/models", + params=_strip_none( + { + "provider": provider, + "supports_tool_use": supports_tool_use, + "supports_thinking": supports_thinking, + } + ), + ) + + def get_model(self, model_id: str) -> JSONValue: + """Get full details for a specific model. + + Args: + model_id: Model identifier. + + Returns: + Model details including capabilities, pricing, and lifecycle status. + """ + return self.request("GET", f"/models/{model_id}/details") + + # ── Model Playground Experiments ────────────────────────────────────────── + + def list_experiments( + self, + *, + days: int | None = None, + start_date: str | None = None, + end_date: str | None = None, + limit: int | None = None, + offset: int | None = None, + ) -> JSONValue: + """List model playground experiments. + + Args: + days: Look-back window in days (1-730, default 30). + start_date: Start date filter (YYYY-MM-DD). + end_date: End date filter (YYYY-MM-DD). + limit: Maximum number of results. + offset: Pagination offset. + + Returns: + Paginated list of experiments. + """ + return self.request( + "GET", + "/models/playground/experiments", + params=_strip_none( + { + "days": days, + "start_date": start_date, + "end_date": end_date, + "limit": limit, + "offset": offset, + } + ), + ) + + def create_experiment(self, body: dict[str, Any]) -> JSONValue: + """Create a model playground experiment. + + Args: + body: Experiment configuration including prompt, model_ids, etc. + + Returns: + Created experiment details. + """ + return self.request("POST", "/models/playground/experiments", json=body) + + def get_experiment(self, experiment_id: str) -> JSONValue: + """Get a model playground experiment by ID. + + Args: + experiment_id: Experiment identifier. + + Returns: + Experiment details. + """ + return self.request("GET", f"/models/playground/experiments/{experiment_id}") + + def cancel_experiment(self, experiment_id: str) -> JSONValue: + """Cancel a running model playground experiment. + + Args: + experiment_id: Experiment identifier. + + Returns: + Cancellation confirmation. + """ + return self.request( + "POST", f"/models/playground/experiments/{experiment_id}/cancel" + ) + # ── Search ──────────────────────────────────────────────────────────────── def search( @@ -6575,6 +6687,120 @@ async def get_model_recommendations(self, model_id: str) -> JSONValue: """ return await self.request("GET", f"/models/{model_id}/recommendations") + async def list_models( + self, + *, + provider: str | None = None, + supports_tool_use: bool | None = None, + supports_thinking: bool | None = None, + ) -> JSONValue: + """List all enabled LLM models grouped by provider. + + Args: + provider: Filter by provider name. + supports_tool_use: Filter to models that support tool use. + supports_thinking: Filter to models that support extended thinking. + + Returns: + List of provider groups with their models. + """ + return await self.request( + "GET", + "/models", + params=_strip_none( + { + "provider": provider, + "supports_tool_use": supports_tool_use, + "supports_thinking": supports_thinking, + } + ), + ) + + async def get_model(self, model_id: str) -> JSONValue: + """Get full details for a specific model. + + Args: + model_id: Model identifier. + + Returns: + Model details including capabilities, pricing, and lifecycle status. + """ + return await self.request("GET", f"/models/{model_id}/details") + + # ── Model Playground Experiments ────────────────────────────────────────── + + async def list_experiments( + self, + *, + days: int | None = None, + start_date: str | None = None, + end_date: str | None = None, + limit: int | None = None, + offset: int | None = None, + ) -> JSONValue: + """List model playground experiments. + + Args: + days: Look-back window in days (1-730, default 30). + start_date: Start date filter (YYYY-MM-DD). + end_date: End date filter (YYYY-MM-DD). + limit: Maximum number of results. + offset: Pagination offset. + + Returns: + Paginated list of experiments. + """ + return await self.request( + "GET", + "/models/playground/experiments", + params=_strip_none( + { + "days": days, + "start_date": start_date, + "end_date": end_date, + "limit": limit, + "offset": offset, + } + ), + ) + + async def create_experiment(self, body: dict[str, Any]) -> JSONValue: + """Create a model playground experiment. + + Args: + body: Experiment configuration including prompt, model_ids, etc. + + Returns: + Created experiment details. + """ + return await self.request("POST", "/models/playground/experiments", json=body) + + async def get_experiment(self, experiment_id: str) -> JSONValue: + """Get a model playground experiment by ID. + + Args: + experiment_id: Experiment identifier. + + Returns: + Experiment details. + """ + return await self.request( + "GET", f"/models/playground/experiments/{experiment_id}" + ) + + async def cancel_experiment(self, experiment_id: str) -> JSONValue: + """Cancel a running model playground experiment. + + Args: + experiment_id: Experiment identifier. + + Returns: + Cancellation confirmation. + """ + return await self.request( + "POST", f"/models/playground/experiments/{experiment_id}/cancel" + ) + # ── Search ──────────────────────────────────────────────────────────────── async def search( From 01aa4df188a2e6494a6f23cb8c1994a8e2196f5f Mon Sep 17 00:00:00 2001 From: Kim Burgaard Date: Fri, 22 May 2026 11:16:43 -0700 Subject: [PATCH 6/7] Updated the SDK #minor --- README.md | 18 + openapi/seclai.openapi.json | 455 +++++++++++++++++- .../agents/create_agent_api_agents_post.py | 58 ++- ...tion_api_agents_agent_id_definition_get.py | 56 ++- ...rt_agent_api_agents_preview_import_post.py | 224 +++++++++ .../update_agent_api_agents_agent_id_put.py | 58 ++- ...tion_api_agents_agent_id_definition_put.py | 44 +- seclai/_generated/models/__init__.py | 36 ++ .../agent_definition_import_error_response.py | 105 ++++ .../models/agent_definition_response.py | 7 +- .../agent_definition_response_definition.py | 7 +- .../models/agent_import_preview_request.py | 75 +++ ...import_preview_request_agent_definition.py | 46 ++ .../models/agent_import_preview_response.py | 222 +++++++++ ...t_preview_response_unresolved_refs_item.py | 46 ++ .../_generated/models/agent_run_response.py | 136 ++++++ .../models/agent_summary_response.py | 47 ++ .../_generated/models/create_agent_request.py | 97 +++- ...e_agent_request_agent_definition_type_0.py | 46 ++ ...reate_agent_request_entity_remap_type_0.py | 46 ++ .../models/generate_step_config_request.py | 2 +- .../models/governance_policy_ref_response.py | 85 ++++ .../models/import_field_error_model.py | 86 ++++ .../_generated/models/import_skip_response.py | 105 ++++ .../models/import_skip_response_details.py | 49 ++ .../models/proposed_action_response.py | 50 +- ...proposed_action_response_preview_type_0.py | 46 ++ .../_generated/models/update_agent_request.py | 89 ++++ ...e_agent_request_agent_definition_type_0.py | 46 ++ ...pdate_agent_request_entity_remap_type_0.py | 46 ++ seclai/seclai.py | 54 +++ tests/test_new_methods.py | 47 ++ 32 files changed, 2455 insertions(+), 79 deletions(-) create mode 100644 seclai/_generated/api/agents/preview_import_agent_api_agents_preview_import_post.py create mode 100644 seclai/_generated/models/agent_definition_import_error_response.py create mode 100644 seclai/_generated/models/agent_import_preview_request.py create mode 100644 seclai/_generated/models/agent_import_preview_request_agent_definition.py create mode 100644 seclai/_generated/models/agent_import_preview_response.py create mode 100644 seclai/_generated/models/agent_import_preview_response_unresolved_refs_item.py create mode 100644 seclai/_generated/models/create_agent_request_agent_definition_type_0.py create mode 100644 seclai/_generated/models/create_agent_request_entity_remap_type_0.py create mode 100644 seclai/_generated/models/governance_policy_ref_response.py create mode 100644 seclai/_generated/models/import_field_error_model.py create mode 100644 seclai/_generated/models/import_skip_response.py create mode 100644 seclai/_generated/models/import_skip_response_details.py create mode 100644 seclai/_generated/models/proposed_action_response_preview_type_0.py create mode 100644 seclai/_generated/models/update_agent_request_agent_definition_type_0.py create mode 100644 seclai/_generated/models/update_agent_request_entity_remap_type_0.py diff --git a/README.md b/README.md index 4b3ecd7..6b0b9d2 100644 --- a/README.md +++ b/README.md @@ -167,6 +167,24 @@ client.update_agent_definition("agent_id", { "change_id": definition["change_id"], "steps": [{"type": "llm", "config": {}}], }) + +# Export / import an agent +exported = client.export_agent("agent_id") + +# Validate the payload first to surface unresolved entity refs in this account +preview = client.preview_import_agent({"agent_definition": exported}) +entity_remap = { + ref["ref_id"]: "" # pick a target uuid from ref["alternatives"] + for ref in preview.get("unresolved_refs", []) +} + +# Commit — `entity_remap` substitutes workflow refs before save +imported = client.create_agent({ + "name": "Imported", + "agent_definition": exported, + "entity_remap": entity_remap, +}) +# `imported["import_warnings"]` lists any items that couldn't be applied. ``` ### Agent runs diff --git a/openapi/seclai.openapi.json b/openapi/seclai.openapi.json index ecc90b5..16b3434 100644 --- a/openapi/seclai.openapi.json +++ b/openapi/seclai.openapi.json @@ -52,6 +52,39 @@ "title": "AddConversationTurnRequest", "type": "object" }, + "AgentDefinitionImportErrorResponse": { + "description": "422 body for invalid `agent_definition` payloads.\n\nMirrors :py:meth:`AgentDefinitionImportError.to_response_dict`.", + "properties": { + "error": { + "default": "invalid_agent_definition", + "title": "Error", + "type": "string" + }, + "errors": { + "items": { + "$ref": "#/components/schemas/ImportFieldErrorModel" + }, + "title": "Errors", + "type": "array" + }, + "message": { + "title": "Message", + "type": "string" + }, + "source": { + "description": "Canonical pretty-printed echo of the supplied payload \u2014 error line/column refer to this string.", + "title": "Source", + "type": "string" + } + }, + "required": [ + "message", + "errors", + "source" + ], + "title": "AgentDefinitionImportErrorResponse", + "type": "object" + }, "AgentDefinitionResponse": { "properties": { "change_id": { @@ -61,7 +94,7 @@ }, "definition": { "additionalProperties": true, - "description": "The agent definition containing name, description, tags, and step workflow tree. Step types include prompt_call, retrieval, transform, gate, retry, evaluate_step, insight, extract_content, streaming_result, send_email, webhook_call, call_agent, write_metadata, write_content_attachment, load_content_attachment, load_content, display_result, and others.", + "description": "The agent definition containing name, description, tags, and step workflow tree. Step types include prompt_call, retrieval, regex_replace, gate, retry, evaluate_step, extract_data, extract_content, add_chat_turn, load_chat_history, add_memory, search_memory, load_memory, streaming_result, send_email, webhook_call, call_agent, write_metadata, write_content_attachment, load_content_attachment, load_content, display_result, merge, for_each, and others.", "title": "Definition", "type": "object" }, @@ -342,6 +375,14 @@ "title": "Attempts", "type": "array" }, + "blocked_policies": { + "description": "Governance policies that produced at least one BLOCK verdict during this run. Deduplicated by policy id.", + "items": { + "$ref": "#/components/schemas/routers__api__agents__GovernancePolicyRefResponse" + }, + "title": "Blocked Policies", + "type": "array" + }, "credits": { "anyOf": [ { @@ -359,6 +400,38 @@ "title": "Error Count", "type": "integer" }, + "flagged_policies": { + "description": "Governance policies that produced at least one FLAG verdict during this run. Deduplicated by policy id.", + "items": { + "$ref": "#/components/schemas/routers__api__agents__GovernancePolicyRefResponse" + }, + "title": "Flagged Policies", + "type": "array" + }, + "governance_input_status": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Result of the governance input evaluation: safe, blocked, skipped, or timed_out.", + "title": "Governance Input Status" + }, + "governance_input_wait_ms": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Milliseconds spent waiting for governance input evaluation.", + "title": "Governance Input Wait Ms" + }, "input": { "anyOf": [ { @@ -371,6 +444,18 @@ "description": "Input provided to the agent for this run.", "title": "Input" }, + "input_scan_status": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Result of the prompt injection scan: safe, unsafe, skipped, timed_out, or error.", + "title": "Input Scan Status" + }, "output": { "anyOf": [ { @@ -393,6 +478,18 @@ "title": "Run Id", "type": "string" }, + "scan_wait_ms": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Milliseconds spent waiting for prompt injection scan.", + "title": "Scan Wait Ms" + }, "status": { "$ref": "#/components/schemas/PendingProcessingCompletedFailedStatus", "description": "Current status of the agent run." @@ -623,6 +720,21 @@ "title": "Id", "type": "string" }, + "import_warnings": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/ImportSkipResponse" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "One entry per item dropped or substituted during import. Present only on endpoints that accept agent_definition; null on non-import calls; [] when the import had no skips.", + "title": "Import Warnings" + }, "max_retries": { "default": 3, "description": "Max retries for eval_and_retry mode.", @@ -2964,7 +3076,7 @@ "title": "Step Id" }, "step_type": { - "description": "The step type to generate config for (e.g. 'transform', 'gate', 'text', 'prompt_call', 'retrieval').", + "description": "The step type to generate config for (e.g. 'regex_replace', 'gate', 'text', 'prompt_call', 'retrieval').", "title": "Step Type", "type": "string" }, @@ -3145,6 +3257,66 @@ "title": "HTTPValidationError", "type": "object" }, + "ImportFieldErrorModel": { + "description": "Single agent_definition validation error with source position.", + "properties": { + "column": { + "description": "1-indexed column in `source`.", + "title": "Column", + "type": "integer" + }, + "line": { + "description": "1-indexed line in `source`.", + "title": "Line", + "type": "integer" + }, + "message": { + "description": "Human-readable description of the problem.", + "title": "Message", + "type": "string" + }, + "path": { + "description": "Dotted path of the offending field, e.g. `agent.definition.child_steps[0].step_type`.", + "title": "Path", + "type": "string" + } + }, + "required": [ + "line", + "column", + "path", + "message" + ], + "title": "ImportFieldErrorModel", + "type": "object" + }, + "ImportSkipResponse": { + "description": "One item that was not applied during an agent import.\n\nUsed as the element type for ``import_warnings`` on every\nresponse model that accepts an ``agent_definition`` payload.\nSee :py:class:`services.agent_definition_import.AgentImportSkip`\nfor the full category list.\n\nLives here (not on each router) so the authenticated and public\nAPI responses share one definition \u2014 keeping the shape that\nclients (UI modal, MCP, OpenAPI consumers) depend on aligned.", + "properties": { + "category": { + "description": "The kind of item that was skipped or substituted: 'schedule', 'evaluation_criteria', 'alert_config', 'alert_recipient', 'governance_policy', 'governance_kb_link', 'solution_link'.", + "title": "Category", + "type": "string" + }, + "details": { + "additionalProperties": true, + "description": "Category-specific identifiers for the skipped item (step_id, alert_type, kb_name, etc.). Stable keys per category; absent keys are simply not applicable.", + "title": "Details", + "type": "object" + }, + "message": { + "description": "Human-readable explanation of what was skipped and why.", + "title": "Message", + "type": "string" + } + }, + "required": [ + "category", + "message" + ], + "title": "ImportSkipResponse", + "type": "object" + }, "InlineTextReplaceRequest": { "description": "Request model for inline text content replacement.", "properties": { @@ -4162,6 +4334,19 @@ "description": "Parameters for the action.", "title": "Params", "type": "object" + }, + "preview": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "description": "Planning-time dry-run preview attached by the solution AI assistant for create_agent / update_agent actions. Contains ``steps`` (the generated step tree), ``step_count``, ``warnings`` (a mix of heuristic structural issues \u2014 e.g. brittle JSONPath, pass-through ``regex_replace``, ``prompt_call`` missing a model \u2014 and deterministic resource-usage issues: every pre-bound knowledge base / memory bank must be referenced by at least one step, and no step may reference an unknown id), and ``skipped`` / ``skipped_reason`` when preview couldn't run (e.g. the action depends on resources created earlier in the same plan). ``None`` for non-agent actions or when generation failed.", + "title": "Preview" } }, "required": [ @@ -5853,6 +6038,126 @@ "title": "VariantOptionResponse", "type": "object" }, + "routers__api__agents__AgentImportPreviewRequest": { + "description": "Dry-run import request \u2014 same payload shape as the export endpoint.", + "properties": { + "agent_definition": { + "additionalProperties": true, + "description": "Payload in the same shape as GET /api/agents/{agent_id}/export.", + "title": "Agent Definition", + "type": "object" + } + }, + "required": [ + "agent_definition" + ], + "title": "AgentImportPreviewRequest", + "type": "object" + }, + "routers__api__agents__AgentImportPreviewResponse": { + "description": "Summary of a successfully validated import payload (no DB writes).\n\nCounts are derived from the validated payload as supplied \u2014 they\nreflect what was requested, not what would eventually be persisted\n(cross-account skips for recipients and KB names happen later, only\non commit).", + "properties": { + "agent_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Imported agent name, if any.", + "title": "Agent Name" + }, + "alert_configs": { + "description": "Number of alert configs in the payload.", + "title": "Alert Configs", + "type": "integer" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Imported agent description, if any.", + "title": "Description" + }, + "evaluation_criteria": { + "description": "Number of evaluation criteria in the payload.", + "title": "Evaluation Criteria", + "type": "integer" + }, + "governance_policies": { + "description": "Number of agent-scoped governance policies in the payload.", + "title": "Governance Policies", + "type": "integer" + }, + "ok": { + "description": "Always true on a 200 response; failures use HTTP 422.", + "title": "Ok", + "type": "boolean" + }, + "payload_export_version": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Export-format version the payload claims (or ``null`` for legacy payloads). When this differs from ``supported_export_version``, fields may have been silently dropped or defaulted on import.", + "title": "Payload Export Version" + }, + "schedules": { + "description": "Number of trigger schedules in the payload.", + "title": "Schedules", + "type": "integer" + }, + "solutions": { + "default": 0, + "description": "Number of solutions the source agent belonged to. On import these are matched by name in the target account; unmatched names are silently skipped.", + "title": "Solutions", + "type": "integer" + }, + "step_count": { + "description": "Total number of steps in the workflow tree (recursive).", + "title": "Step Count", + "type": "integer" + }, + "supported_export_version": { + "default": "2", + "description": "Export-format version this server understands. Compare against ``payload_export_version`` to detect cross-version imports.", + "title": "Supported Export Version", + "type": "string" + }, + "unresolved_refs": { + "description": "Entity references in the imported workflow that don't exist in the target account. Each entry: {category, ref_id, ref_name?, locations:[step:], alternatives:[{id, name, description?}]}. Pass {source_uuid: target_uuid} as ``entity_remap`` on the create/update call to substitute these references before save.", + "items": { + "additionalProperties": true, + "type": "object" + }, + "title": "Unresolved Refs", + "type": "array" + } + }, + "required": [ + "ok", + "agent_name", + "description", + "step_count", + "schedules", + "alert_configs", + "evaluation_criteria", + "governance_policies" + ], + "title": "AgentImportPreviewResponse", + "type": "object" + }, "routers__api__agents__AgentListResponse": { "properties": { "data": { @@ -5955,6 +6260,19 @@ }, "routers__api__agents__CreateAgentRequest": { "properties": { + "agent_definition": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "description": "Optional payload in the same format produced by GET /agents/{id}/export. When provided, replaces any template-derived workflow and pre-fills metadata/trigger fields the request does not specify explicitly. Validation errors include line/column references against a canonical pretty-printed echo of the supplied payload.", + "title": "Agent Definition" + }, "agent_template": { "anyOf": [ { @@ -5979,6 +6297,21 @@ "description": "Optional description.", "title": "Description" }, + "entity_remap": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "description": "Optional UUID-substitution map applied to the imported workflow before save. Each key is a source-account UUID (as returned by /agents/preview-import's ``unresolved_refs``); each value is the target-account UUID to substitute. Used to relink knowledge bases, memory banks, source connections, and sub-agents on cross-account imports.", + "title": "Entity Remap" + }, "name": { "description": "Name for the new agent.", "title": "Name", @@ -5997,8 +6330,48 @@ "title": "CreateAgentRequest", "type": "object" }, + "routers__api__agents__GovernancePolicyRefResponse": { + "description": "Reference to a governance policy by id and name.", + "properties": { + "policy_id": { + "description": "Governance policy identifier.", + "title": "Policy Id", + "type": "string" + }, + "policy_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Display name of the policy at evaluation time. May be null when the policy has been deleted.", + "title": "Policy Name" + } + }, + "required": [ + "policy_id" + ], + "title": "GovernancePolicyRefResponse", + "type": "object" + }, "routers__api__agents__UpdateAgentRequest": { "properties": { + "agent_definition": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "description": "Optional payload in the same format produced by GET /agents/{id}/export. When provided, agent metadata fields the request does not set explicitly are taken from the payload, and the agent's workflow is replaced from `agent.definition`. The previous version is preserved in history. Validation errors include line/column references against a canonical pretty-printed echo of the supplied payload.", + "title": "Agent Definition" + }, "default_evaluation_tier": { "anyOf": [ { @@ -6023,6 +6396,21 @@ "description": "New description for the agent.", "title": "Description" }, + "entity_remap": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "description": "Optional UUID-substitution map applied to the imported workflow before save (same shape as on POST /agents).", + "title": "Entity Remap" + }, "evaluation_mode": { "anyOf": [ { @@ -8079,7 +8467,7 @@ ] }, "post": { - "description": "Create a new agent.\n\nTrigger types:\n- `dynamic_input`: triggered via API with user-provided input\n- `template_input`: triggered via API with a predefined template\n- `schedule`: triggered on a schedule\n- `new_content`: triggered when new content arrives\n\nTemplates: `blank`, `retrieval_example`, `simple_qa`, `summarizer`, `json_extractor`, `content_change_notifier`, `scheduled_report`, `webhook_pipeline`\n\nAuth & scoping:\n- Requires `X-API-Key` header or OAuth Bearer token. Agent is created in the caller's account.", + "description": "Create a new agent.\n\nTrigger types:\n- `dynamic_input`: triggered via API with user-provided input\n- `template_input`: triggered via API with a predefined template\n- `schedule`: triggered on a schedule\n- `new_content`: triggered when new content arrives\n\nTemplates: `blank`, `retrieval_example`, `simple_qa`, `summarizer`, `json_extractor`, `content_change_notifier`, `scheduled_report`, `webhook_pipeline`\n\nImporting an existing agent:\n- Pass `agent_definition` with the JSON shape produced by `GET /agents/{id}/export`. The full extras suite (alert_configs, evaluation_criteria, governance_policies, schedules, solutions) is applied; items that don't resolve in this account are reported in the response's `import_warnings` array.\n- Use `POST /agents/preview-import` first to surface `unresolved_refs` (workflow refs to KBs, memory banks, source connections, sub-agents that don't exist here). Then pass `entity_remap: {source_uuid: target_uuid}` on this call to substitute them before save.\n\nAuth & scoping:\n- Requires `X-API-Key` header or OAuth Bearer token. Agent is created in the caller's account.", "operationId": "create_agent_api_agents_post", "parameters": [ { @@ -8114,11 +8502,11 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/HTTPValidationError" + "$ref": "#/components/schemas/AgentDefinitionImportErrorResponse" } } }, - "description": "Validation Error" + "description": "The supplied `agent_definition` payload failed validation. The body lists each error with a 1-indexed line/column pointing into the canonical pretty-printed echo of the payload (also returned in `source`)." } }, "summary": "Create an agent", @@ -8658,6 +9046,53 @@ ] } }, + "/agents/preview-import": { + "post": { + "description": "Validate an `agent_definition` payload (the same shape produced by `GET /api/agents/{agent_id}/export`) without creating or modifying any agent. On success returns a summary the client can show before commit (counts of steps, schedules, alert configs, evaluation criteria, governance policies). On failure returns the same 422 body shape used by `POST /api/agents` and `PUT /api/agents/{id}` so callers can render line/column-anchored errors.\n\nAuth & scoping:\n- Requires `X-API-Key` header or OAuth Bearer token. No DB writes.", + "operationId": "preview_import_agent_api_agents_preview_import_post", + "parameters": [ + { + "$ref": "#/components/parameters/X-Account-Id" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/routers__api__agents__AgentImportPreviewRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/routers__api__agents__AgentImportPreviewResponse" + } + } + }, + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentDefinitionImportErrorResponse" + } + } + }, + "description": "The supplied `agent_definition` payload failed validation. The body lists each error with a 1-indexed line/column pointing into the canonical pretty-printed echo of the payload (also returned in `source`)." + } + }, + "summary": "Preview an agent_definition import", + "tags": [ + "agents" + ] + } + }, "/agents/runs/search": { "post": { "description": "Search agent traces using semantic similarity.\n\nFinds step-run outputs that are most semantically similar to the query.\nResults include the matching text, agent/step metadata, and a similarity score.\n\nAgent traces are automatically indexed when runs complete. The first 7 days of storage are free; extended retention is billed.\n\nAuth & scoping:\n- Requires `X-API-Key` header or OAuth Bearer token. Searches only within your account's traces.", @@ -8890,7 +9325,7 @@ ] }, "put": { - "description": "Update an agent's name, description, evaluation settings, and model lifecycle settings.\n\nEvaluation settings: `evaluation_mode` ('output_expectation', 'eval_and_retry', 'sample_and_flag'), `default_evaluation_tier` ('fast', 'balanced', 'thorough'), `max_retries`, `retry_on_failure`, `sampling_config`.\n\nModel lifecycle settings: `prompt_model_auto_upgrade_strategy` ('none', 'early_adopter', 'middle_of_road', 'cautious_adopter'), `prompt_model_auto_rollback_enabled`, `prompt_model_auto_rollback_triggers` (list of 'agent_eval_fail', 'governance_flag', 'governance_block', 'agent_run_failed').\n\nAt least one field must be provided.\n\nAuth & scoping:\n- Requires `X-API-Key` header or OAuth Bearer token. You can only update agents belonging to your account.", + "description": "Update an agent's name, description, evaluation settings, and model lifecycle settings.\n\nEvaluation settings: `evaluation_mode` ('output_expectation', 'eval_and_retry', 'sample_and_flag'), `default_evaluation_tier` ('fast', 'balanced', 'thorough'), `max_retries`, `retry_on_failure`, `sampling_config`.\n\nModel lifecycle settings: `prompt_model_auto_upgrade_strategy` ('none', 'early_adopter', 'middle_of_road', 'cautious_adopter'), `prompt_model_auto_rollback_enabled`, `prompt_model_auto_rollback_triggers` (list of 'agent_eval_fail', 'governance_flag', 'governance_block', 'agent_run_failed').\n\nReplacing the workflow from an export:\n- Pass `agent_definition` with the JSON shape produced by `GET /agents/{id}/export`. Update only touches the workflow + agent metadata \u2014 alert_configs, evaluation_criteria, governance_policies, schedules, and solution links from the imported file are NOT applied (use the dedicated endpoints for those, or `POST /agents` to import as a new agent).\n- `entity_remap: {source_uuid: target_uuid}` substitutes workflow entity refs before save (same shape as `POST /agents`).\n\nAt least one field must be provided.\n\nAuth & scoping:\n- Requires `X-API-Key` header or OAuth Bearer token. You can only update agents belonging to your account.", "operationId": "update_agent_api_agents__agent_id__put", "parameters": [ { @@ -8931,11 +9366,11 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/HTTPValidationError" + "$ref": "#/components/schemas/AgentDefinitionImportErrorResponse" } } }, - "description": "Validation Error" + "description": "The supplied `agent_definition` payload failed validation. The body lists each error with a 1-indexed line/column pointing into the canonical pretty-printed echo of the payload (also returned in `source`)." } }, "summary": "Update agent metadata", @@ -9229,7 +9664,7 @@ }, "/agents/{agent_id}/definition": { "get": { - "description": "Fetch the current agent definition from the main branch.\n\nThe response includes `change_id` which must be provided when updating the definition (optimistic locking).\n\nThe definition contains the agent's step workflow. Available step types:\n- `prompt_call`: Call an LLM with a prompt template\n- `retrieval`: Search a knowledge base\n- `transform`: Reshape data with a Liquid template\n- `gate`: Evaluate conditions, stop or continue child execution\n- `retry`: Re-execute from a target ancestor step (for quality-control loops; pair with a `gate` step for conditional retrying. Fields: `target_step_id` (ancestor step ID), `max_retries` (1\u201310))\n- `evaluate_step`: Score a selected previous step output and emit JSON with `score`, `passed`, and `pass_threshold` (fields: `target_step_id`, `evaluation_prompt`, `pass_threshold`, optional `evaluation_tier`, optional `expectation_config`)\n- `insight`: Progressively read and analyze large input\n- `extract_content`: Extract structured data (JSON, HTML, XML)\n- `send_email`: Send email with step output\n- `webhook_call`: POST data to an external URL\n- `write_aws_s3_object`: Write output to S3\n- `call_agent`: Invoke another agent\n- `write_metadata`: Write a value to content metadata (for filtering/gates; content-triggered agents only. Fields: `metadata_key`, `content`)\n- `write_content_attachment`: Write a file-backed attachment to content (optionally indexed for retrieval; content-triggered agents only. Fields: `attachment_key`, `content`, `content_type`, `indexed`)\n- `load_content_attachment`: Load a previously written attachment (content-triggered agents only. Fields: `attachment_key`)\n- `load_content`: Load the full text body of a source document (typically used with content-triggered agents; can also load by explicit `content_version_id`. Fields: `content_version_id` optional)\n- `streaming_result`: Stream LLM tokens in real-time via SSE (must be a direct child of `prompt_call`; requires `dynamic_input` trigger; `priority: true` enables real-time streaming)\n- `display_result`: Show output to the user\n- `join`: Merge parallel branches\n- `combinator`: Combine multiple inputs\n- `text`: Static text literal\n\nAuth & scoping:\n- Requires `X-API-Key` header or OAuth Bearer token. You can only access agents belonging to your account.", + "description": "Fetch the current agent definition from the main branch.\n\nThe response includes `change_id` which must be provided when updating the definition (optimistic locking).\n\nThe definition contains the agent's step workflow. Available step types:\n- `prompt_call`: Call an LLM with a prompt template\n- `retrieval`: Search a knowledge base\n- `regex_replace`: Reshape text via ordered regex find/replace rules\n- `gate`: Evaluate conditions, stop or continue child execution\n- `retry`: Re-execute from a target ancestor step (for quality-control loops; pair with a `gate` step for conditional retrying. Fields: `target_step_id` (ancestor step ID), `max_retries` (1\u201310))\n- `evaluate_step`: Score a selected previous step output and emit JSON with `score`, `passed`, and `pass_threshold` (fields: `target_step_id`, `evaluation_prompt`, `pass_threshold`, optional `evaluation_tier`, optional `expectation_config`)\n- `extract_data`: Progressively read and analyze large input\n- `extract_content`: Extract structured data (JSON, HTML, XML)\n- `add_chat_turn` / `load_chat_history`: Record a turn or load running history from a conversation memory bank\n- `add_memory` / `search_memory` / `load_memory`: Write, semantic-search, or load entries on a general memory bank\n- `send_email`: Send email with step output\n- `webhook_call`: POST data to an external URL\n- `write_aws_s3_object`: Write output to S3\n- `call_agent`: Invoke another agent\n- `write_metadata`: Write a value to content metadata (for filtering/gates; content-triggered agents only. Fields: `metadata_key`, `content`)\n- `write_content_attachment`: Write a file-backed attachment to content (optionally indexed for retrieval; content-triggered agents only. Fields: `attachment_key`, `content`, `content_type`, `indexed`)\n- `load_content_attachment`: Load a previously written attachment (content-triggered agents only. Fields: `attachment_key`)\n- `load_content`: Load the full text body of a source document (typically used with content-triggered agents; can also load by explicit `content_version_id`. Fields: `content_version_id` optional)\n- `streaming_result`: Stream LLM tokens in real-time via SSE (must be a direct child of `prompt_call`; requires `dynamic_input` or `template_input` trigger; `priority: true` enables real-time streaming)\n- `display_result`: Show output to the user\n- `join`: Merge parallel branches\n- `merge`: Combine multiple inputs into a single templated output\n- `text`: Static text literal\n- `for_each`: Iterate a body over a list of items (body lives in `body[]`)\n\nAuth & scoping:\n- Requires `X-API-Key` header or OAuth Bearer token. You can only access agents belonging to your account.", "operationId": "get_agent_definition_api_agents__agent_id__definition_get", "parameters": [ { @@ -9273,7 +9708,7 @@ ] }, "put": { - "description": "Update the agent's definition on the main branch.\n\nUses **optimistic locking**: provide `expected_change_id` from the last `GET /api/agents/{agent_id}/definition`. Returns `409 Conflict` if the definition was modified since your last read.\n\nThe definition contains the agent's step workflow. Step types include `prompt_call`, `retrieval`, `transform`, `gate`, `retry`, `evaluate_step`, `insight`, `extract_content`, `streaming_result`, `send_email`, `webhook_call`, `write_aws_s3_object`, `call_agent`, `write_metadata`, `write_content_attachment`, `load_content_attachment`, `load_content`, `display_result`, `join`, `combinator`, and `text`. Non-composite step types (`display_result`, `join`, `retry`, `evaluate_step`, `streaming_result`) cannot contain child steps.\n\n**Retry steps** re-execute from a target ancestor step for quality-control loops. Configure with `target_step_id` (ancestor step ID) and `max_retries` (1\u201310). Best practice: place a `gate` step before the retry to make retries conditional.\n\nAuth & scoping:\n- Requires `X-API-Key` header or OAuth Bearer token. You can only update agents belonging to your account.", + "description": "Update the agent's definition on the main branch.\n\nUses **optimistic locking**: provide `expected_change_id` from the last `GET /api/agents/{agent_id}/definition`. Returns `409 Conflict` if the definition was modified since your last read.\n\nThe definition contains the agent's step workflow. Step types include `prompt_call`, `retrieval`, `regex_replace`, `gate`, `retry`, `evaluate_step`, `extract_data`, `extract_content`, `add_chat_turn`, `load_chat_history`, `add_memory`, `search_memory`, `load_memory`, `streaming_result`, `send_email`, `webhook_call`, `write_aws_s3_object`, `call_agent`, `write_metadata`, `write_content_attachment`, `load_content_attachment`, `load_content`, `display_result`, `join`, `merge`, `text`, and `for_each`. Non-composite step types (`display_result`, `join`, `retry`, `streaming_result`) cannot contain child steps.\n\n**Retry steps** re-execute from a target ancestor step for quality-control loops. Configure with `target_step_id` (ancestor step ID) and `max_retries` (1\u201310). Best practice: place a `gate` step before the retry to make retries conditional.\n\nAuth & scoping:\n- Requires `X-API-Key` header or OAuth Bearer token. You can only update agents belonging to your account.", "operationId": "update_agent_definition_api_agents__agent_id__definition_put", "parameters": [ { diff --git a/seclai/_generated/api/agents/create_agent_api_agents_post.py b/seclai/_generated/api/agents/create_agent_api_agents_post.py index cb5a220..8d83197 100644 --- a/seclai/_generated/api/agents/create_agent_api_agents_post.py +++ b/seclai/_generated/api/agents/create_agent_api_agents_post.py @@ -6,9 +6,11 @@ from ... import errors from ...client import AuthenticatedClient, Client +from ...models.agent_definition_import_error_response import ( + AgentDefinitionImportErrorResponse, +) from ...models.agent_summary_response import AgentSummaryResponse from ...models.create_agent_request import CreateAgentRequest -from ...models.http_validation_error import HTTPValidationError from ...types import UNSET, Response, Unset @@ -36,7 +38,7 @@ def _get_kwargs( def _parse_response( *, client: AuthenticatedClient | Client, response: httpx.Response -) -> AgentSummaryResponse | Any | HTTPValidationError | None: +) -> AgentDefinitionImportErrorResponse | AgentSummaryResponse | Any | None: if response.status_code == 201: response_201 = AgentSummaryResponse.from_dict(response.json()) @@ -47,7 +49,7 @@ def _parse_response( return response_402 if response.status_code == 422: - response_422 = HTTPValidationError.from_dict(response.json()) + response_422 = AgentDefinitionImportErrorResponse.from_dict(response.json()) return response_422 @@ -59,7 +61,7 @@ def _parse_response( def _build_response( *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[AgentSummaryResponse | Any | HTTPValidationError]: +) -> Response[AgentDefinitionImportErrorResponse | AgentSummaryResponse | Any]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -73,7 +75,7 @@ def sync_detailed( client: AuthenticatedClient | Client, body: CreateAgentRequest, x_account_id: UUID | Unset = UNSET, -) -> Response[AgentSummaryResponse | Any | HTTPValidationError]: +) -> Response[AgentDefinitionImportErrorResponse | AgentSummaryResponse | Any]: """Create an agent Create a new agent. @@ -87,6 +89,14 @@ def sync_detailed( Templates: `blank`, `retrieval_example`, `simple_qa`, `summarizer`, `json_extractor`, `content_change_notifier`, `scheduled_report`, `webhook_pipeline` + Importing an existing agent: + - Pass `agent_definition` with the JSON shape produced by `GET /agents/{id}/export`. The full extras + suite (alert_configs, evaluation_criteria, governance_policies, schedules, solutions) is applied; + items that don't resolve in this account are reported in the response's `import_warnings` array. + - Use `POST /agents/preview-import` first to surface `unresolved_refs` (workflow refs to KBs, memory + banks, source connections, sub-agents that don't exist here). Then pass `entity_remap: {source_uuid: + target_uuid}` on this call to substitute them before save. + Auth & scoping: - Requires `X-API-Key` header or OAuth Bearer token. Agent is created in the caller's account. @@ -99,7 +109,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[AgentSummaryResponse | Any | HTTPValidationError] + Response[AgentDefinitionImportErrorResponse | AgentSummaryResponse | Any] """ kwargs = _get_kwargs( @@ -119,7 +129,7 @@ def sync( client: AuthenticatedClient | Client, body: CreateAgentRequest, x_account_id: UUID | Unset = UNSET, -) -> AgentSummaryResponse | Any | HTTPValidationError | None: +) -> AgentDefinitionImportErrorResponse | AgentSummaryResponse | Any | None: """Create an agent Create a new agent. @@ -133,6 +143,14 @@ def sync( Templates: `blank`, `retrieval_example`, `simple_qa`, `summarizer`, `json_extractor`, `content_change_notifier`, `scheduled_report`, `webhook_pipeline` + Importing an existing agent: + - Pass `agent_definition` with the JSON shape produced by `GET /agents/{id}/export`. The full extras + suite (alert_configs, evaluation_criteria, governance_policies, schedules, solutions) is applied; + items that don't resolve in this account are reported in the response's `import_warnings` array. + - Use `POST /agents/preview-import` first to surface `unresolved_refs` (workflow refs to KBs, memory + banks, source connections, sub-agents that don't exist here). Then pass `entity_remap: {source_uuid: + target_uuid}` on this call to substitute them before save. + Auth & scoping: - Requires `X-API-Key` header or OAuth Bearer token. Agent is created in the caller's account. @@ -145,7 +163,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - AgentSummaryResponse | Any | HTTPValidationError + AgentDefinitionImportErrorResponse | AgentSummaryResponse | Any """ return sync_detailed( @@ -160,7 +178,7 @@ async def asyncio_detailed( client: AuthenticatedClient | Client, body: CreateAgentRequest, x_account_id: UUID | Unset = UNSET, -) -> Response[AgentSummaryResponse | Any | HTTPValidationError]: +) -> Response[AgentDefinitionImportErrorResponse | AgentSummaryResponse | Any]: """Create an agent Create a new agent. @@ -174,6 +192,14 @@ async def asyncio_detailed( Templates: `blank`, `retrieval_example`, `simple_qa`, `summarizer`, `json_extractor`, `content_change_notifier`, `scheduled_report`, `webhook_pipeline` + Importing an existing agent: + - Pass `agent_definition` with the JSON shape produced by `GET /agents/{id}/export`. The full extras + suite (alert_configs, evaluation_criteria, governance_policies, schedules, solutions) is applied; + items that don't resolve in this account are reported in the response's `import_warnings` array. + - Use `POST /agents/preview-import` first to surface `unresolved_refs` (workflow refs to KBs, memory + banks, source connections, sub-agents that don't exist here). Then pass `entity_remap: {source_uuid: + target_uuid}` on this call to substitute them before save. + Auth & scoping: - Requires `X-API-Key` header or OAuth Bearer token. Agent is created in the caller's account. @@ -186,7 +212,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[AgentSummaryResponse | Any | HTTPValidationError] + Response[AgentDefinitionImportErrorResponse | AgentSummaryResponse | Any] """ kwargs = _get_kwargs( @@ -204,7 +230,7 @@ async def asyncio( client: AuthenticatedClient | Client, body: CreateAgentRequest, x_account_id: UUID | Unset = UNSET, -) -> AgentSummaryResponse | Any | HTTPValidationError | None: +) -> AgentDefinitionImportErrorResponse | AgentSummaryResponse | Any | None: """Create an agent Create a new agent. @@ -218,6 +244,14 @@ async def asyncio( Templates: `blank`, `retrieval_example`, `simple_qa`, `summarizer`, `json_extractor`, `content_change_notifier`, `scheduled_report`, `webhook_pipeline` + Importing an existing agent: + - Pass `agent_definition` with the JSON shape produced by `GET /agents/{id}/export`. The full extras + suite (alert_configs, evaluation_criteria, governance_policies, schedules, solutions) is applied; + items that don't resolve in this account are reported in the response's `import_warnings` array. + - Use `POST /agents/preview-import` first to surface `unresolved_refs` (workflow refs to KBs, memory + banks, source connections, sub-agents that don't exist here). Then pass `entity_remap: {source_uuid: + target_uuid}` on this call to substitute them before save. + Auth & scoping: - Requires `X-API-Key` header or OAuth Bearer token. Agent is created in the caller's account. @@ -230,7 +264,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - AgentSummaryResponse | Any | HTTPValidationError + AgentDefinitionImportErrorResponse | AgentSummaryResponse | Any """ return ( diff --git a/seclai/_generated/api/agents/get_agent_definition_api_agents_agent_id_definition_get.py b/seclai/_generated/api/agents/get_agent_definition_api_agents_agent_id_definition_get.py index 9eb2075..3220c16 100644 --- a/seclai/_generated/api/agents/get_agent_definition_api_agents_agent_id_definition_get.py +++ b/seclai/_generated/api/agents/get_agent_definition_api_agents_agent_id_definition_get.py @@ -78,15 +78,19 @@ def sync_detailed( The definition contains the agent's step workflow. Available step types: - `prompt_call`: Call an LLM with a prompt template - `retrieval`: Search a knowledge base - - `transform`: Reshape data with a Liquid template + - `regex_replace`: Reshape text via ordered regex find/replace rules - `gate`: Evaluate conditions, stop or continue child execution - `retry`: Re-execute from a target ancestor step (for quality-control loops; pair with a `gate` step for conditional retrying. Fields: `target_step_id` (ancestor step ID), `max_retries` (1–10)) - `evaluate_step`: Score a selected previous step output and emit JSON with `score`, `passed`, and `pass_threshold` (fields: `target_step_id`, `evaluation_prompt`, `pass_threshold`, optional `evaluation_tier`, optional `expectation_config`) - - `insight`: Progressively read and analyze large input + - `extract_data`: Progressively read and analyze large input - `extract_content`: Extract structured data (JSON, HTML, XML) + - `add_chat_turn` / `load_chat_history`: Record a turn or load running history from a conversation + memory bank + - `add_memory` / `search_memory` / `load_memory`: Write, semantic-search, or load entries on a + general memory bank - `send_email`: Send email with step output - `webhook_call`: POST data to an external URL - `write_aws_s3_object`: Write output to S3 @@ -102,11 +106,13 @@ def sync_detailed( triggered agents; can also load by explicit `content_version_id`. Fields: `content_version_id` optional) - `streaming_result`: Stream LLM tokens in real-time via SSE (must be a direct child of - `prompt_call`; requires `dynamic_input` trigger; `priority: true` enables real-time streaming) + `prompt_call`; requires `dynamic_input` or `template_input` trigger; `priority: true` enables real- + time streaming) - `display_result`: Show output to the user - `join`: Merge parallel branches - - `combinator`: Combine multiple inputs + - `merge`: Combine multiple inputs into a single templated output - `text`: Static text literal + - `for_each`: Iterate a body over a list of items (body lives in `body[]`) Auth & scoping: - Requires `X-API-Key` header or OAuth Bearer token. You can only access agents belonging to your @@ -152,15 +158,19 @@ def sync( The definition contains the agent's step workflow. Available step types: - `prompt_call`: Call an LLM with a prompt template - `retrieval`: Search a knowledge base - - `transform`: Reshape data with a Liquid template + - `regex_replace`: Reshape text via ordered regex find/replace rules - `gate`: Evaluate conditions, stop or continue child execution - `retry`: Re-execute from a target ancestor step (for quality-control loops; pair with a `gate` step for conditional retrying. Fields: `target_step_id` (ancestor step ID), `max_retries` (1–10)) - `evaluate_step`: Score a selected previous step output and emit JSON with `score`, `passed`, and `pass_threshold` (fields: `target_step_id`, `evaluation_prompt`, `pass_threshold`, optional `evaluation_tier`, optional `expectation_config`) - - `insight`: Progressively read and analyze large input + - `extract_data`: Progressively read and analyze large input - `extract_content`: Extract structured data (JSON, HTML, XML) + - `add_chat_turn` / `load_chat_history`: Record a turn or load running history from a conversation + memory bank + - `add_memory` / `search_memory` / `load_memory`: Write, semantic-search, or load entries on a + general memory bank - `send_email`: Send email with step output - `webhook_call`: POST data to an external URL - `write_aws_s3_object`: Write output to S3 @@ -176,11 +186,13 @@ def sync( triggered agents; can also load by explicit `content_version_id`. Fields: `content_version_id` optional) - `streaming_result`: Stream LLM tokens in real-time via SSE (must be a direct child of - `prompt_call`; requires `dynamic_input` trigger; `priority: true` enables real-time streaming) + `prompt_call`; requires `dynamic_input` or `template_input` trigger; `priority: true` enables real- + time streaming) - `display_result`: Show output to the user - `join`: Merge parallel branches - - `combinator`: Combine multiple inputs + - `merge`: Combine multiple inputs into a single templated output - `text`: Static text literal + - `for_each`: Iterate a body over a list of items (body lives in `body[]`) Auth & scoping: - Requires `X-API-Key` header or OAuth Bearer token. You can only access agents belonging to your @@ -221,15 +233,19 @@ async def asyncio_detailed( The definition contains the agent's step workflow. Available step types: - `prompt_call`: Call an LLM with a prompt template - `retrieval`: Search a knowledge base - - `transform`: Reshape data with a Liquid template + - `regex_replace`: Reshape text via ordered regex find/replace rules - `gate`: Evaluate conditions, stop or continue child execution - `retry`: Re-execute from a target ancestor step (for quality-control loops; pair with a `gate` step for conditional retrying. Fields: `target_step_id` (ancestor step ID), `max_retries` (1–10)) - `evaluate_step`: Score a selected previous step output and emit JSON with `score`, `passed`, and `pass_threshold` (fields: `target_step_id`, `evaluation_prompt`, `pass_threshold`, optional `evaluation_tier`, optional `expectation_config`) - - `insight`: Progressively read and analyze large input + - `extract_data`: Progressively read and analyze large input - `extract_content`: Extract structured data (JSON, HTML, XML) + - `add_chat_turn` / `load_chat_history`: Record a turn or load running history from a conversation + memory bank + - `add_memory` / `search_memory` / `load_memory`: Write, semantic-search, or load entries on a + general memory bank - `send_email`: Send email with step output - `webhook_call`: POST data to an external URL - `write_aws_s3_object`: Write output to S3 @@ -245,11 +261,13 @@ async def asyncio_detailed( triggered agents; can also load by explicit `content_version_id`. Fields: `content_version_id` optional) - `streaming_result`: Stream LLM tokens in real-time via SSE (must be a direct child of - `prompt_call`; requires `dynamic_input` trigger; `priority: true` enables real-time streaming) + `prompt_call`; requires `dynamic_input` or `template_input` trigger; `priority: true` enables real- + time streaming) - `display_result`: Show output to the user - `join`: Merge parallel branches - - `combinator`: Combine multiple inputs + - `merge`: Combine multiple inputs into a single templated output - `text`: Static text literal + - `for_each`: Iterate a body over a list of items (body lives in `body[]`) Auth & scoping: - Requires `X-API-Key` header or OAuth Bearer token. You can only access agents belonging to your @@ -293,15 +311,19 @@ async def asyncio( The definition contains the agent's step workflow. Available step types: - `prompt_call`: Call an LLM with a prompt template - `retrieval`: Search a knowledge base - - `transform`: Reshape data with a Liquid template + - `regex_replace`: Reshape text via ordered regex find/replace rules - `gate`: Evaluate conditions, stop or continue child execution - `retry`: Re-execute from a target ancestor step (for quality-control loops; pair with a `gate` step for conditional retrying. Fields: `target_step_id` (ancestor step ID), `max_retries` (1–10)) - `evaluate_step`: Score a selected previous step output and emit JSON with `score`, `passed`, and `pass_threshold` (fields: `target_step_id`, `evaluation_prompt`, `pass_threshold`, optional `evaluation_tier`, optional `expectation_config`) - - `insight`: Progressively read and analyze large input + - `extract_data`: Progressively read and analyze large input - `extract_content`: Extract structured data (JSON, HTML, XML) + - `add_chat_turn` / `load_chat_history`: Record a turn or load running history from a conversation + memory bank + - `add_memory` / `search_memory` / `load_memory`: Write, semantic-search, or load entries on a + general memory bank - `send_email`: Send email with step output - `webhook_call`: POST data to an external URL - `write_aws_s3_object`: Write output to S3 @@ -317,11 +339,13 @@ async def asyncio( triggered agents; can also load by explicit `content_version_id`. Fields: `content_version_id` optional) - `streaming_result`: Stream LLM tokens in real-time via SSE (must be a direct child of - `prompt_call`; requires `dynamic_input` trigger; `priority: true` enables real-time streaming) + `prompt_call`; requires `dynamic_input` or `template_input` trigger; `priority: true` enables real- + time streaming) - `display_result`: Show output to the user - `join`: Merge parallel branches - - `combinator`: Combine multiple inputs + - `merge`: Combine multiple inputs into a single templated output - `text`: Static text literal + - `for_each`: Iterate a body over a list of items (body lives in `body[]`) Auth & scoping: - Requires `X-API-Key` header or OAuth Bearer token. You can only access agents belonging to your diff --git a/seclai/_generated/api/agents/preview_import_agent_api_agents_preview_import_post.py b/seclai/_generated/api/agents/preview_import_agent_api_agents_preview_import_post.py new file mode 100644 index 0000000..e819d56 --- /dev/null +++ b/seclai/_generated/api/agents/preview_import_agent_api_agents_preview_import_post.py @@ -0,0 +1,224 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.agent_definition_import_error_response import ( + AgentDefinitionImportErrorResponse, +) +from ...models.agent_import_preview_request import AgentImportPreviewRequest +from ...models.agent_import_preview_response import AgentImportPreviewResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + body: AgentImportPreviewRequest, + x_account_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + if not isinstance(x_account_id, Unset): + headers["X-Account-Id"] = x_account_id + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/agents/preview-import", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AgentDefinitionImportErrorResponse | AgentImportPreviewResponse | None: + if response.status_code == 200: + response_200 = AgentImportPreviewResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = AgentDefinitionImportErrorResponse.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AgentDefinitionImportErrorResponse | AgentImportPreviewResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: AgentImportPreviewRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[AgentDefinitionImportErrorResponse | AgentImportPreviewResponse]: + """Preview an agent_definition import + + Validate an `agent_definition` payload (the same shape produced by `GET + /api/agents/{agent_id}/export`) without creating or modifying any agent. On success returns a + summary the client can show before commit (counts of steps, schedules, alert configs, evaluation + criteria, governance policies). On failure returns the same 422 body shape used by `POST + /api/agents` and `PUT /api/agents/{id}` so callers can render line/column-anchored errors. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. No DB writes. + + Args: + x_account_id (UUID | Unset): + body (AgentImportPreviewRequest): Dry-run import request — same payload shape as the + export endpoint. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AgentDefinitionImportErrorResponse | AgentImportPreviewResponse] + """ + + kwargs = _get_kwargs( + body=body, + x_account_id=x_account_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: AgentImportPreviewRequest, + x_account_id: UUID | Unset = UNSET, +) -> AgentDefinitionImportErrorResponse | AgentImportPreviewResponse | None: + """Preview an agent_definition import + + Validate an `agent_definition` payload (the same shape produced by `GET + /api/agents/{agent_id}/export`) without creating or modifying any agent. On success returns a + summary the client can show before commit (counts of steps, schedules, alert configs, evaluation + criteria, governance policies). On failure returns the same 422 body shape used by `POST + /api/agents` and `PUT /api/agents/{id}` so callers can render line/column-anchored errors. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. No DB writes. + + Args: + x_account_id (UUID | Unset): + body (AgentImportPreviewRequest): Dry-run import request — same payload shape as the + export endpoint. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AgentDefinitionImportErrorResponse | AgentImportPreviewResponse + """ + + return sync_detailed( + client=client, + body=body, + x_account_id=x_account_id, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: AgentImportPreviewRequest, + x_account_id: UUID | Unset = UNSET, +) -> Response[AgentDefinitionImportErrorResponse | AgentImportPreviewResponse]: + """Preview an agent_definition import + + Validate an `agent_definition` payload (the same shape produced by `GET + /api/agents/{agent_id}/export`) without creating or modifying any agent. On success returns a + summary the client can show before commit (counts of steps, schedules, alert configs, evaluation + criteria, governance policies). On failure returns the same 422 body shape used by `POST + /api/agents` and `PUT /api/agents/{id}` so callers can render line/column-anchored errors. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. No DB writes. + + Args: + x_account_id (UUID | Unset): + body (AgentImportPreviewRequest): Dry-run import request — same payload shape as the + export endpoint. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AgentDefinitionImportErrorResponse | AgentImportPreviewResponse] + """ + + kwargs = _get_kwargs( + body=body, + x_account_id=x_account_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: AgentImportPreviewRequest, + x_account_id: UUID | Unset = UNSET, +) -> AgentDefinitionImportErrorResponse | AgentImportPreviewResponse | None: + """Preview an agent_definition import + + Validate an `agent_definition` payload (the same shape produced by `GET + /api/agents/{agent_id}/export`) without creating or modifying any agent. On success returns a + summary the client can show before commit (counts of steps, schedules, alert configs, evaluation + criteria, governance policies). On failure returns the same 422 body shape used by `POST + /api/agents` and `PUT /api/agents/{id}` so callers can render line/column-anchored errors. + + Auth & scoping: + - Requires `X-API-Key` header or OAuth Bearer token. No DB writes. + + Args: + x_account_id (UUID | Unset): + body (AgentImportPreviewRequest): Dry-run import request — same payload shape as the + export endpoint. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AgentDefinitionImportErrorResponse | AgentImportPreviewResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + x_account_id=x_account_id, + ) + ).parsed diff --git a/seclai/_generated/api/agents/update_agent_api_agents_agent_id_put.py b/seclai/_generated/api/agents/update_agent_api_agents_agent_id_put.py index ab510c4..dbfea14 100644 --- a/seclai/_generated/api/agents/update_agent_api_agents_agent_id_put.py +++ b/seclai/_generated/api/agents/update_agent_api_agents_agent_id_put.py @@ -7,8 +7,10 @@ from ... import errors from ...client import AuthenticatedClient, Client +from ...models.agent_definition_import_error_response import ( + AgentDefinitionImportErrorResponse, +) from ...models.agent_summary_response import AgentSummaryResponse -from ...models.http_validation_error import HTTPValidationError from ...models.update_agent_request import UpdateAgentRequest from ...types import UNSET, Response, Unset @@ -40,14 +42,14 @@ def _get_kwargs( def _parse_response( *, client: AuthenticatedClient | Client, response: httpx.Response -) -> AgentSummaryResponse | HTTPValidationError | None: +) -> AgentDefinitionImportErrorResponse | AgentSummaryResponse | None: if response.status_code == 200: response_200 = AgentSummaryResponse.from_dict(response.json()) return response_200 if response.status_code == 422: - response_422 = HTTPValidationError.from_dict(response.json()) + response_422 = AgentDefinitionImportErrorResponse.from_dict(response.json()) return response_422 @@ -59,7 +61,7 @@ def _parse_response( def _build_response( *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[AgentSummaryResponse | HTTPValidationError]: +) -> Response[AgentDefinitionImportErrorResponse | AgentSummaryResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,7 +76,7 @@ def sync_detailed( client: AuthenticatedClient | Client, body: UpdateAgentRequest, x_account_id: UUID | Unset = UNSET, -) -> Response[AgentSummaryResponse | HTTPValidationError]: +) -> Response[AgentDefinitionImportErrorResponse | AgentSummaryResponse]: """Update agent metadata Update an agent's name, description, evaluation settings, and model lifecycle settings. @@ -88,6 +90,14 @@ def sync_detailed( `prompt_model_auto_rollback_triggers` (list of 'agent_eval_fail', 'governance_flag', 'governance_block', 'agent_run_failed'). + Replacing the workflow from an export: + - Pass `agent_definition` with the JSON shape produced by `GET /agents/{id}/export`. Update only + touches the workflow + agent metadata — alert_configs, evaluation_criteria, governance_policies, + schedules, and solution links from the imported file are NOT applied (use the dedicated endpoints + for those, or `POST /agents` to import as a new agent). + - `entity_remap: {source_uuid: target_uuid}` substitutes workflow entity refs before save (same + shape as `POST /agents`). + At least one field must be provided. Auth & scoping: @@ -104,7 +114,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[AgentSummaryResponse | HTTPValidationError] + Response[AgentDefinitionImportErrorResponse | AgentSummaryResponse] """ kwargs = _get_kwargs( @@ -126,7 +136,7 @@ def sync( client: AuthenticatedClient | Client, body: UpdateAgentRequest, x_account_id: UUID | Unset = UNSET, -) -> AgentSummaryResponse | HTTPValidationError | None: +) -> AgentDefinitionImportErrorResponse | AgentSummaryResponse | None: """Update agent metadata Update an agent's name, description, evaluation settings, and model lifecycle settings. @@ -140,6 +150,14 @@ def sync( `prompt_model_auto_rollback_triggers` (list of 'agent_eval_fail', 'governance_flag', 'governance_block', 'agent_run_failed'). + Replacing the workflow from an export: + - Pass `agent_definition` with the JSON shape produced by `GET /agents/{id}/export`. Update only + touches the workflow + agent metadata — alert_configs, evaluation_criteria, governance_policies, + schedules, and solution links from the imported file are NOT applied (use the dedicated endpoints + for those, or `POST /agents` to import as a new agent). + - `entity_remap: {source_uuid: target_uuid}` substitutes workflow entity refs before save (same + shape as `POST /agents`). + At least one field must be provided. Auth & scoping: @@ -156,7 +174,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - AgentSummaryResponse | HTTPValidationError + AgentDefinitionImportErrorResponse | AgentSummaryResponse """ return sync_detailed( @@ -173,7 +191,7 @@ async def asyncio_detailed( client: AuthenticatedClient | Client, body: UpdateAgentRequest, x_account_id: UUID | Unset = UNSET, -) -> Response[AgentSummaryResponse | HTTPValidationError]: +) -> Response[AgentDefinitionImportErrorResponse | AgentSummaryResponse]: """Update agent metadata Update an agent's name, description, evaluation settings, and model lifecycle settings. @@ -187,6 +205,14 @@ async def asyncio_detailed( `prompt_model_auto_rollback_triggers` (list of 'agent_eval_fail', 'governance_flag', 'governance_block', 'agent_run_failed'). + Replacing the workflow from an export: + - Pass `agent_definition` with the JSON shape produced by `GET /agents/{id}/export`. Update only + touches the workflow + agent metadata — alert_configs, evaluation_criteria, governance_policies, + schedules, and solution links from the imported file are NOT applied (use the dedicated endpoints + for those, or `POST /agents` to import as a new agent). + - `entity_remap: {source_uuid: target_uuid}` substitutes workflow entity refs before save (same + shape as `POST /agents`). + At least one field must be provided. Auth & scoping: @@ -203,7 +229,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[AgentSummaryResponse | HTTPValidationError] + Response[AgentDefinitionImportErrorResponse | AgentSummaryResponse] """ kwargs = _get_kwargs( @@ -223,7 +249,7 @@ async def asyncio( client: AuthenticatedClient | Client, body: UpdateAgentRequest, x_account_id: UUID | Unset = UNSET, -) -> AgentSummaryResponse | HTTPValidationError | None: +) -> AgentDefinitionImportErrorResponse | AgentSummaryResponse | None: """Update agent metadata Update an agent's name, description, evaluation settings, and model lifecycle settings. @@ -237,6 +263,14 @@ async def asyncio( `prompt_model_auto_rollback_triggers` (list of 'agent_eval_fail', 'governance_flag', 'governance_block', 'agent_run_failed'). + Replacing the workflow from an export: + - Pass `agent_definition` with the JSON shape produced by `GET /agents/{id}/export`. Update only + touches the workflow + agent metadata — alert_configs, evaluation_criteria, governance_policies, + schedules, and solution links from the imported file are NOT applied (use the dedicated endpoints + for those, or `POST /agents` to import as a new agent). + - `entity_remap: {source_uuid: target_uuid}` substitutes workflow entity refs before save (same + shape as `POST /agents`). + At least one field must be provided. Auth & scoping: @@ -253,7 +287,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - AgentSummaryResponse | HTTPValidationError + AgentDefinitionImportErrorResponse | AgentSummaryResponse """ return ( diff --git a/seclai/_generated/api/agents/update_agent_definition_api_agents_agent_id_definition_put.py b/seclai/_generated/api/agents/update_agent_definition_api_agents_agent_id_definition_put.py index a299b71..b678663 100644 --- a/seclai/_generated/api/agents/update_agent_definition_api_agents_agent_id_definition_put.py +++ b/seclai/_generated/api/agents/update_agent_definition_api_agents_agent_id_definition_put.py @@ -84,11 +84,12 @@ def sync_detailed( last read. The definition contains the agent's step workflow. Step types include `prompt_call`, `retrieval`, - `transform`, `gate`, `retry`, `evaluate_step`, `insight`, `extract_content`, `streaming_result`, - `send_email`, `webhook_call`, `write_aws_s3_object`, `call_agent`, `write_metadata`, - `write_content_attachment`, `load_content_attachment`, `load_content`, `display_result`, `join`, - `combinator`, and `text`. Non-composite step types (`display_result`, `join`, `retry`, - `evaluate_step`, `streaming_result`) cannot contain child steps. + `regex_replace`, `gate`, `retry`, `evaluate_step`, `extract_data`, `extract_content`, + `add_chat_turn`, `load_chat_history`, `add_memory`, `search_memory`, `load_memory`, + `streaming_result`, `send_email`, `webhook_call`, `write_aws_s3_object`, `call_agent`, + `write_metadata`, `write_content_attachment`, `load_content_attachment`, `load_content`, + `display_result`, `join`, `merge`, `text`, and `for_each`. Non-composite step types + (`display_result`, `join`, `retry`, `streaming_result`) cannot contain child steps. **Retry steps** re-execute from a target ancestor step for quality-control loops. Configure with `target_step_id` (ancestor step ID) and `max_retries` (1–10). Best practice: place a `gate` step @@ -140,11 +141,12 @@ def sync( last read. The definition contains the agent's step workflow. Step types include `prompt_call`, `retrieval`, - `transform`, `gate`, `retry`, `evaluate_step`, `insight`, `extract_content`, `streaming_result`, - `send_email`, `webhook_call`, `write_aws_s3_object`, `call_agent`, `write_metadata`, - `write_content_attachment`, `load_content_attachment`, `load_content`, `display_result`, `join`, - `combinator`, and `text`. Non-composite step types (`display_result`, `join`, `retry`, - `evaluate_step`, `streaming_result`) cannot contain child steps. + `regex_replace`, `gate`, `retry`, `evaluate_step`, `extract_data`, `extract_content`, + `add_chat_turn`, `load_chat_history`, `add_memory`, `search_memory`, `load_memory`, + `streaming_result`, `send_email`, `webhook_call`, `write_aws_s3_object`, `call_agent`, + `write_metadata`, `write_content_attachment`, `load_content_attachment`, `load_content`, + `display_result`, `join`, `merge`, `text`, and `for_each`. Non-composite step types + (`display_result`, `join`, `retry`, `streaming_result`) cannot contain child steps. **Retry steps** re-execute from a target ancestor step for quality-control loops. Configure with `target_step_id` (ancestor step ID) and `max_retries` (1–10). Best practice: place a `gate` step @@ -191,11 +193,12 @@ async def asyncio_detailed( last read. The definition contains the agent's step workflow. Step types include `prompt_call`, `retrieval`, - `transform`, `gate`, `retry`, `evaluate_step`, `insight`, `extract_content`, `streaming_result`, - `send_email`, `webhook_call`, `write_aws_s3_object`, `call_agent`, `write_metadata`, - `write_content_attachment`, `load_content_attachment`, `load_content`, `display_result`, `join`, - `combinator`, and `text`. Non-composite step types (`display_result`, `join`, `retry`, - `evaluate_step`, `streaming_result`) cannot contain child steps. + `regex_replace`, `gate`, `retry`, `evaluate_step`, `extract_data`, `extract_content`, + `add_chat_turn`, `load_chat_history`, `add_memory`, `search_memory`, `load_memory`, + `streaming_result`, `send_email`, `webhook_call`, `write_aws_s3_object`, `call_agent`, + `write_metadata`, `write_content_attachment`, `load_content_attachment`, `load_content`, + `display_result`, `join`, `merge`, `text`, and `for_each`. Non-composite step types + (`display_result`, `join`, `retry`, `streaming_result`) cannot contain child steps. **Retry steps** re-execute from a target ancestor step for quality-control loops. Configure with `target_step_id` (ancestor step ID) and `max_retries` (1–10). Best practice: place a `gate` step @@ -245,11 +248,12 @@ async def asyncio( last read. The definition contains the agent's step workflow. Step types include `prompt_call`, `retrieval`, - `transform`, `gate`, `retry`, `evaluate_step`, `insight`, `extract_content`, `streaming_result`, - `send_email`, `webhook_call`, `write_aws_s3_object`, `call_agent`, `write_metadata`, - `write_content_attachment`, `load_content_attachment`, `load_content`, `display_result`, `join`, - `combinator`, and `text`. Non-composite step types (`display_result`, `join`, `retry`, - `evaluate_step`, `streaming_result`) cannot contain child steps. + `regex_replace`, `gate`, `retry`, `evaluate_step`, `extract_data`, `extract_content`, + `add_chat_turn`, `load_chat_history`, `add_memory`, `search_memory`, `load_memory`, + `streaming_result`, `send_email`, `webhook_call`, `write_aws_s3_object`, `call_agent`, + `write_metadata`, `write_content_attachment`, `load_content_attachment`, `load_content`, + `display_result`, `join`, `merge`, `text`, and `for_each`. Non-composite step types + (`display_result`, `join`, `retry`, `streaming_result`) cannot contain child steps. **Retry steps** re-execute from a target ancestor step for quality-control loops. Configure with `target_step_id` (ancestor step ID) and `max_retries` (1–10). Best practice: place a `gate` step diff --git a/seclai/_generated/models/__init__.py b/seclai/_generated/models/__init__.py index ffc2995..0a1b7a4 100644 --- a/seclai/_generated/models/__init__.py +++ b/seclai/_generated/models/__init__.py @@ -8,6 +8,7 @@ from .add_conversation_turn_request_actions_taken_type_0 import ( AddConversationTurnRequestActionsTakenType0, ) +from .agent_definition_import_error_response import AgentDefinitionImportErrorResponse from .agent_definition_response import AgentDefinitionResponse from .agent_definition_response_definition import AgentDefinitionResponseDefinition from .agent_definition_response_warnings_type_0_item import ( @@ -29,6 +30,14 @@ AgentExportResponseGovernancePoliciesType0Item, ) from .agent_export_response_trigger_type_0 import AgentExportResponseTriggerType0 +from .agent_import_preview_request import AgentImportPreviewRequest +from .agent_import_preview_request_agent_definition import ( + AgentImportPreviewRequestAgentDefinition, +) +from .agent_import_preview_response import AgentImportPreviewResponse +from .agent_import_preview_response_unresolved_refs_item import ( + AgentImportPreviewResponseUnresolvedRefsItem, +) from .agent_list_response import AgentListResponse from .agent_run_attempt_response import AgentRunAttemptResponse from .agent_run_list_response import AgentRunListResponse @@ -90,6 +99,10 @@ from .content_embedding_response import ContentEmbeddingResponse from .content_embeddings_list_response import ContentEmbeddingsListResponse from .create_agent_request import CreateAgentRequest +from .create_agent_request_agent_definition_type_0 import ( + CreateAgentRequestAgentDefinitionType0, +) +from .create_agent_request_entity_remap_type_0 import CreateAgentRequestEntityRemapType0 from .create_alert_config_api_alerts_configs_post_response_create_alert_config_api_alerts_configs_post import ( CreateAlertConfigApiAlertsConfigsPostResponseCreateAlertConfigApiAlertsConfigsPost, ) @@ -203,7 +216,11 @@ from .governance_conversation_response_proposed_actions_type_0 import ( GovernanceConversationResponseProposedActionsType0, ) +from .governance_policy_ref_response import GovernancePolicyRefResponse from .http_validation_error import HTTPValidationError +from .import_field_error_model import ImportFieldErrorModel +from .import_skip_response import ImportSkipResponse +from .import_skip_response_details import ImportSkipResponseDetails from .inline_text_replace_request import InlineTextReplaceRequest from .inline_text_replace_request_metadata_type_0 import ( InlineTextReplaceRequestMetadataType0, @@ -282,6 +299,7 @@ from .prompt_tool_response_headers_type_0 import PromptToolResponseHeadersType0 from .proposed_action_response import ProposedActionResponse from .proposed_action_response_params import ProposedActionResponseParams +from .proposed_action_response_preview_type_0 import ProposedActionResponsePreviewType0 from .proposed_policy_action_response import ProposedPolicyActionResponse from .proposed_policy_action_response_params import ProposedPolicyActionResponseParams from .provider_group_response import ProviderGroupResponse @@ -325,6 +343,10 @@ UpdateAgentDefinitionRequestDefinition, ) from .update_agent_request import UpdateAgentRequest +from .update_agent_request_agent_definition_type_0 import ( + UpdateAgentRequestAgentDefinitionType0, +) +from .update_agent_request_entity_remap_type_0 import UpdateAgentRequestEntityRemapType0 from .update_agent_request_sampling_config_type_0 import ( UpdateAgentRequestSamplingConfigType0, ) @@ -356,6 +378,7 @@ "AddCommentRequest", "AddConversationTurnRequest", "AddConversationTurnRequestActionsTakenType0", + "AgentDefinitionImportErrorResponse", "AgentDefinitionResponse", "AgentDefinitionResponseDefinition", "AgentDefinitionResponseWarningsType0Item", @@ -367,6 +390,10 @@ "AgentExportResponseEvaluationCriteriaType0Item", "AgentExportResponseGovernancePoliciesType0Item", "AgentExportResponseTriggerType0", + "AgentImportPreviewRequest", + "AgentImportPreviewRequestAgentDefinition", + "AgentImportPreviewResponse", + "AgentImportPreviewResponseUnresolvedRefsItem", "AgentListResponse", "AgentRunAttemptResponse", "AgentRunListResponse", @@ -408,6 +435,8 @@ "ContentEmbeddingResponse", "ContentEmbeddingsListResponse", "CreateAgentRequest", + "CreateAgentRequestAgentDefinitionType0", + "CreateAgentRequestEntityRemapType0", "CreateAlertConfigApiAlertsConfigsPostResponseCreateAlertConfigApiAlertsConfigsPost", "CreateAlertConfigRequest", "CreateAlertConfigRequestThresholdType0", @@ -467,7 +496,11 @@ "GovernanceAiAssistantResponse", "GovernanceConversationResponse", "GovernanceConversationResponseProposedActionsType0", + "GovernancePolicyRefResponse", "HTTPValidationError", + "ImportFieldErrorModel", + "ImportSkipResponse", + "ImportSkipResponseDetails", "InlineTextReplaceRequest", "InlineTextReplaceRequestMetadataType0", "InlineTextUploadRequest", @@ -512,6 +545,7 @@ "PromptToolResponseHeadersType0", "ProposedActionResponse", "ProposedActionResponseParams", + "ProposedActionResponsePreviewType0", "ProposedPolicyActionResponse", "ProposedPolicyActionResponseParams", "ProviderGroupResponse", @@ -541,6 +575,8 @@ "UpdateAgentDefinitionRequest", "UpdateAgentDefinitionRequestDefinition", "UpdateAgentRequest", + "UpdateAgentRequestAgentDefinitionType0", + "UpdateAgentRequestEntityRemapType0", "UpdateAgentRequestSamplingConfigType0", "UpdateAlertConfigApiAlertsConfigsConfigIdPatchResponseUpdateAlertConfigApiAlertsConfigsConfigIdPatch", "UpdateAlertConfigRequest", diff --git a/seclai/_generated/models/agent_definition_import_error_response.py b/seclai/_generated/models/agent_definition_import_error_response.py new file mode 100644 index 0000000..366a772 --- /dev/null +++ b/seclai/_generated/models/agent_definition_import_error_response.py @@ -0,0 +1,105 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.import_field_error_model import ImportFieldErrorModel + + +T = TypeVar("T", bound="AgentDefinitionImportErrorResponse") + + +@_attrs_define +class AgentDefinitionImportErrorResponse: + """422 body for invalid `agent_definition` payloads. + + Mirrors :py:meth:`AgentDefinitionImportError.to_response_dict`. + + Attributes: + errors (list[ImportFieldErrorModel]): + message (str): + source (str): Canonical pretty-printed echo of the supplied payload — error line/column refer to this string. + error (str | Unset): Default: 'invalid_agent_definition'. + """ + + errors: list[ImportFieldErrorModel] + message: str + source: str + error: str | Unset = "invalid_agent_definition" + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + errors = [] + for errors_item_data in self.errors: + errors_item = errors_item_data.to_dict() + errors.append(errors_item) + + message = self.message + + source = self.source + + error = self.error + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "errors": errors, + "message": message, + "source": source, + } + ) + if error is not UNSET: + field_dict["error"] = error + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.import_field_error_model import ImportFieldErrorModel + + d = dict(src_dict) + errors = [] + _errors = d.pop("errors") + for errors_item_data in _errors: + errors_item = ImportFieldErrorModel.from_dict(errors_item_data) + + errors.append(errors_item) + + message = d.pop("message") + + source = d.pop("source") + + error = d.pop("error", UNSET) + + agent_definition_import_error_response = cls( + errors=errors, + message=message, + source=source, + error=error, + ) + + agent_definition_import_error_response.additional_properties = d + return agent_definition_import_error_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/agent_definition_response.py b/seclai/_generated/models/agent_definition_response.py index f094be4..702b8b3 100644 --- a/seclai/_generated/models/agent_definition_response.py +++ b/seclai/_generated/models/agent_definition_response.py @@ -26,9 +26,10 @@ class AgentDefinitionResponse: Attributes: change_id (str): Current change ID (use as expected_change_id when updating). definition (AgentDefinitionResponseDefinition): The agent definition containing name, description, tags, and - step workflow tree. Step types include prompt_call, retrieval, transform, gate, retry, evaluate_step, insight, - extract_content, streaming_result, send_email, webhook_call, call_agent, write_metadata, - write_content_attachment, load_content_attachment, load_content, display_result, and others. + step workflow tree. Step types include prompt_call, retrieval, regex_replace, gate, retry, evaluate_step, + extract_data, extract_content, add_chat_turn, load_chat_history, add_memory, search_memory, load_memory, + streaming_result, send_email, webhook_call, call_agent, write_metadata, write_content_attachment, + load_content_attachment, load_content, display_result, merge, for_each, and others. schema_version (str): Agent schema version. warnings (list[AgentDefinitionResponseWarningsType0Item] | None | Unset): Validation warnings, if any. """ diff --git a/seclai/_generated/models/agent_definition_response_definition.py b/seclai/_generated/models/agent_definition_response_definition.py index c84c270..4036221 100644 --- a/seclai/_generated/models/agent_definition_response_definition.py +++ b/seclai/_generated/models/agent_definition_response_definition.py @@ -12,9 +12,10 @@ @_attrs_define class AgentDefinitionResponseDefinition: """The agent definition containing name, description, tags, and step workflow tree. Step types include prompt_call, - retrieval, transform, gate, retry, evaluate_step, insight, extract_content, streaming_result, send_email, - webhook_call, call_agent, write_metadata, write_content_attachment, load_content_attachment, load_content, - display_result, and others. + retrieval, regex_replace, gate, retry, evaluate_step, extract_data, extract_content, add_chat_turn, + load_chat_history, add_memory, search_memory, load_memory, streaming_result, send_email, webhook_call, call_agent, + write_metadata, write_content_attachment, load_content_attachment, load_content, display_result, merge, for_each, + and others. """ diff --git a/seclai/_generated/models/agent_import_preview_request.py b/seclai/_generated/models/agent_import_preview_request.py new file mode 100644 index 0000000..41945dd --- /dev/null +++ b/seclai/_generated/models/agent_import_preview_request.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.agent_import_preview_request_agent_definition import ( + AgentImportPreviewRequestAgentDefinition, + ) + + +T = TypeVar("T", bound="AgentImportPreviewRequest") + + +@_attrs_define +class AgentImportPreviewRequest: + """Dry-run import request — same payload shape as the export endpoint. + + Attributes: + agent_definition (AgentImportPreviewRequestAgentDefinition): Payload in the same shape as GET + /api/agents/{agent_id}/export. + """ + + agent_definition: AgentImportPreviewRequestAgentDefinition + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + agent_definition = self.agent_definition.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "agent_definition": agent_definition, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.agent_import_preview_request_agent_definition import ( + AgentImportPreviewRequestAgentDefinition, + ) + + d = dict(src_dict) + agent_definition = AgentImportPreviewRequestAgentDefinition.from_dict( + d.pop("agent_definition") + ) + + agent_import_preview_request = cls( + agent_definition=agent_definition, + ) + + agent_import_preview_request.additional_properties = d + return agent_import_preview_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/agent_import_preview_request_agent_definition.py b/seclai/_generated/models/agent_import_preview_request_agent_definition.py new file mode 100644 index 0000000..b813672 --- /dev/null +++ b/seclai/_generated/models/agent_import_preview_request_agent_definition.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AgentImportPreviewRequestAgentDefinition") + + +@_attrs_define +class AgentImportPreviewRequestAgentDefinition: + """Payload in the same shape as GET /api/agents/{agent_id}/export.""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + agent_import_preview_request_agent_definition = cls() + + agent_import_preview_request_agent_definition.additional_properties = d + return agent_import_preview_request_agent_definition + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/agent_import_preview_response.py b/seclai/_generated/models/agent_import_preview_response.py new file mode 100644 index 0000000..4437f28 --- /dev/null +++ b/seclai/_generated/models/agent_import_preview_response.py @@ -0,0 +1,222 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.agent_import_preview_response_unresolved_refs_item import ( + AgentImportPreviewResponseUnresolvedRefsItem, + ) + + +T = TypeVar("T", bound="AgentImportPreviewResponse") + + +@_attrs_define +class AgentImportPreviewResponse: + """Summary of a successfully validated import payload (no DB writes). + + Counts are derived from the validated payload as supplied — they + reflect what was requested, not what would eventually be persisted + (cross-account skips for recipients and KB names happen later, only + on commit). + + Attributes: + agent_name (None | str): Imported agent name, if any. + alert_configs (int): Number of alert configs in the payload. + description (None | str): Imported agent description, if any. + evaluation_criteria (int): Number of evaluation criteria in the payload. + governance_policies (int): Number of agent-scoped governance policies in the payload. + ok (bool): Always true on a 200 response; failures use HTTP 422. + schedules (int): Number of trigger schedules in the payload. + step_count (int): Total number of steps in the workflow tree (recursive). + payload_export_version (None | str | Unset): Export-format version the payload claims (or ``null`` for legacy + payloads). When this differs from ``supported_export_version``, fields may have been silently dropped or + defaulted on import. + solutions (int | Unset): Number of solutions the source agent belonged to. On import these are matched by name + in the target account; unmatched names are silently skipped. Default: 0. + supported_export_version (str | Unset): Export-format version this server understands. Compare against + ``payload_export_version`` to detect cross-version imports. Default: '2'. + unresolved_refs (list[AgentImportPreviewResponseUnresolvedRefsItem] | Unset): Entity references in the imported + workflow that don't exist in the target account. Each entry: {category, ref_id, ref_name?, + locations:[step:], alternatives:[{id, name, description?}]}. Pass {source_uuid: target_uuid} as + ``entity_remap`` on the create/update call to substitute these references before save. + """ + + agent_name: None | str + alert_configs: int + description: None | str + evaluation_criteria: int + governance_policies: int + ok: bool + schedules: int + step_count: int + payload_export_version: None | str | Unset = UNSET + solutions: int | Unset = 0 + supported_export_version: str | Unset = "2" + unresolved_refs: list[AgentImportPreviewResponseUnresolvedRefsItem] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + agent_name: None | str + agent_name = self.agent_name + + alert_configs = self.alert_configs + + description: None | str + description = self.description + + evaluation_criteria = self.evaluation_criteria + + governance_policies = self.governance_policies + + ok = self.ok + + schedules = self.schedules + + step_count = self.step_count + + payload_export_version: None | str | Unset + if isinstance(self.payload_export_version, Unset): + payload_export_version = UNSET + else: + payload_export_version = self.payload_export_version + + solutions = self.solutions + + supported_export_version = self.supported_export_version + + unresolved_refs: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.unresolved_refs, Unset): + unresolved_refs = [] + for unresolved_refs_item_data in self.unresolved_refs: + unresolved_refs_item = unresolved_refs_item_data.to_dict() + unresolved_refs.append(unresolved_refs_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "agent_name": agent_name, + "alert_configs": alert_configs, + "description": description, + "evaluation_criteria": evaluation_criteria, + "governance_policies": governance_policies, + "ok": ok, + "schedules": schedules, + "step_count": step_count, + } + ) + if payload_export_version is not UNSET: + field_dict["payload_export_version"] = payload_export_version + if solutions is not UNSET: + field_dict["solutions"] = solutions + if supported_export_version is not UNSET: + field_dict["supported_export_version"] = supported_export_version + if unresolved_refs is not UNSET: + field_dict["unresolved_refs"] = unresolved_refs + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.agent_import_preview_response_unresolved_refs_item import ( + AgentImportPreviewResponseUnresolvedRefsItem, + ) + + d = dict(src_dict) + + def _parse_agent_name(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + agent_name = _parse_agent_name(d.pop("agent_name")) + + alert_configs = d.pop("alert_configs") + + def _parse_description(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + description = _parse_description(d.pop("description")) + + evaluation_criteria = d.pop("evaluation_criteria") + + governance_policies = d.pop("governance_policies") + + ok = d.pop("ok") + + schedules = d.pop("schedules") + + step_count = d.pop("step_count") + + def _parse_payload_export_version(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + payload_export_version = _parse_payload_export_version( + d.pop("payload_export_version", UNSET) + ) + + solutions = d.pop("solutions", UNSET) + + supported_export_version = d.pop("supported_export_version", UNSET) + + _unresolved_refs = d.pop("unresolved_refs", UNSET) + unresolved_refs: list[AgentImportPreviewResponseUnresolvedRefsItem] | Unset = ( + UNSET + ) + if _unresolved_refs is not UNSET: + unresolved_refs = [] + for unresolved_refs_item_data in _unresolved_refs: + unresolved_refs_item = ( + AgentImportPreviewResponseUnresolvedRefsItem.from_dict( + unresolved_refs_item_data + ) + ) + + unresolved_refs.append(unresolved_refs_item) + + agent_import_preview_response = cls( + agent_name=agent_name, + alert_configs=alert_configs, + description=description, + evaluation_criteria=evaluation_criteria, + governance_policies=governance_policies, + ok=ok, + schedules=schedules, + step_count=step_count, + payload_export_version=payload_export_version, + solutions=solutions, + supported_export_version=supported_export_version, + unresolved_refs=unresolved_refs, + ) + + agent_import_preview_response.additional_properties = d + return agent_import_preview_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/agent_import_preview_response_unresolved_refs_item.py b/seclai/_generated/models/agent_import_preview_response_unresolved_refs_item.py new file mode 100644 index 0000000..bb355d8 --- /dev/null +++ b/seclai/_generated/models/agent_import_preview_response_unresolved_refs_item.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AgentImportPreviewResponseUnresolvedRefsItem") + + +@_attrs_define +class AgentImportPreviewResponseUnresolvedRefsItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + agent_import_preview_response_unresolved_refs_item = cls() + + agent_import_preview_response_unresolved_refs_item.additional_properties = d + return agent_import_preview_response_unresolved_refs_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/agent_run_response.py b/seclai/_generated/models/agent_run_response.py index d7dc09c..264c2c9 100644 --- a/seclai/_generated/models/agent_run_response.py +++ b/seclai/_generated/models/agent_run_response.py @@ -14,6 +14,7 @@ if TYPE_CHECKING: from ..models.agent_run_attempt_response import AgentRunAttemptResponse from ..models.agent_run_step_response import AgentRunStepResponse + from ..models.governance_policy_ref_response import GovernancePolicyRefResponse T = TypeVar("T", bound="AgentRunResponse") @@ -31,6 +32,16 @@ class AgentRunResponse: priority (bool): Indicates if the run was treated as a priority execution. run_id (str): Unique identifier for the agent run. status (PendingProcessingCompletedFailedStatus): + blocked_policies (list[GovernancePolicyRefResponse] | Unset): Governance policies that produced at least one + BLOCK verdict during this run. Deduplicated by policy id. + flagged_policies (list[GovernancePolicyRefResponse] | Unset): Governance policies that produced at least one + FLAG verdict during this run. Deduplicated by policy id. + governance_input_status (None | str | Unset): Result of the governance input evaluation: safe, blocked, skipped, + or timed_out. + governance_input_wait_ms (int | None | Unset): Milliseconds spent waiting for governance input evaluation. + input_scan_status (None | str | Unset): Result of the prompt injection scan: safe, unsafe, skipped, timed_out, + or error. + scan_wait_ms (int | None | Unset): Milliseconds spent waiting for prompt injection scan. steps (list[AgentRunStepResponse] | None | Unset): Step outputs and per-step timing/credits. Only included when requested. """ @@ -43,6 +54,12 @@ class AgentRunResponse: priority: bool run_id: str status: PendingProcessingCompletedFailedStatus + blocked_policies: list[GovernancePolicyRefResponse] | Unset = UNSET + flagged_policies: list[GovernancePolicyRefResponse] | Unset = UNSET + governance_input_status: None | str | Unset = UNSET + governance_input_wait_ms: int | None | Unset = UNSET + input_scan_status: None | str | Unset = UNSET + scan_wait_ms: int | None | Unset = UNSET steps: list[AgentRunStepResponse] | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -69,6 +86,44 @@ def to_dict(self) -> dict[str, Any]: status = self.status.value + blocked_policies: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.blocked_policies, Unset): + blocked_policies = [] + for blocked_policies_item_data in self.blocked_policies: + blocked_policies_item = blocked_policies_item_data.to_dict() + blocked_policies.append(blocked_policies_item) + + flagged_policies: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.flagged_policies, Unset): + flagged_policies = [] + for flagged_policies_item_data in self.flagged_policies: + flagged_policies_item = flagged_policies_item_data.to_dict() + flagged_policies.append(flagged_policies_item) + + governance_input_status: None | str | Unset + if isinstance(self.governance_input_status, Unset): + governance_input_status = UNSET + else: + governance_input_status = self.governance_input_status + + governance_input_wait_ms: int | None | Unset + if isinstance(self.governance_input_wait_ms, Unset): + governance_input_wait_ms = UNSET + else: + governance_input_wait_ms = self.governance_input_wait_ms + + input_scan_status: None | str | Unset + if isinstance(self.input_scan_status, Unset): + input_scan_status = UNSET + else: + input_scan_status = self.input_scan_status + + scan_wait_ms: int | None | Unset + if isinstance(self.scan_wait_ms, Unset): + scan_wait_ms = UNSET + else: + scan_wait_ms = self.scan_wait_ms + steps: list[dict[str, Any]] | None | Unset if isinstance(self.steps, Unset): steps = UNSET @@ -95,6 +150,18 @@ def to_dict(self) -> dict[str, Any]: "status": status, } ) + if blocked_policies is not UNSET: + field_dict["blocked_policies"] = blocked_policies + if flagged_policies is not UNSET: + field_dict["flagged_policies"] = flagged_policies + if governance_input_status is not UNSET: + field_dict["governance_input_status"] = governance_input_status + if governance_input_wait_ms is not UNSET: + field_dict["governance_input_wait_ms"] = governance_input_wait_ms + if input_scan_status is not UNSET: + field_dict["input_scan_status"] = input_scan_status + if scan_wait_ms is not UNSET: + field_dict["scan_wait_ms"] = scan_wait_ms if steps is not UNSET: field_dict["steps"] = steps @@ -104,6 +171,7 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.agent_run_attempt_response import AgentRunAttemptResponse from ..models.agent_run_step_response import AgentRunStepResponse + from ..models.governance_policy_ref_response import GovernancePolicyRefResponse d = dict(src_dict) attempts = [] @@ -142,6 +210,68 @@ def _parse_output(data: object) -> None | str: status = PendingProcessingCompletedFailedStatus(d.pop("status")) + _blocked_policies = d.pop("blocked_policies", UNSET) + blocked_policies: list[GovernancePolicyRefResponse] | Unset = UNSET + if _blocked_policies is not UNSET: + blocked_policies = [] + for blocked_policies_item_data in _blocked_policies: + blocked_policies_item = GovernancePolicyRefResponse.from_dict( + blocked_policies_item_data + ) + + blocked_policies.append(blocked_policies_item) + + _flagged_policies = d.pop("flagged_policies", UNSET) + flagged_policies: list[GovernancePolicyRefResponse] | Unset = UNSET + if _flagged_policies is not UNSET: + flagged_policies = [] + for flagged_policies_item_data in _flagged_policies: + flagged_policies_item = GovernancePolicyRefResponse.from_dict( + flagged_policies_item_data + ) + + flagged_policies.append(flagged_policies_item) + + def _parse_governance_input_status(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + governance_input_status = _parse_governance_input_status( + d.pop("governance_input_status", UNSET) + ) + + def _parse_governance_input_wait_ms(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + governance_input_wait_ms = _parse_governance_input_wait_ms( + d.pop("governance_input_wait_ms", UNSET) + ) + + def _parse_input_scan_status(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + input_scan_status = _parse_input_scan_status(d.pop("input_scan_status", UNSET)) + + def _parse_scan_wait_ms(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + scan_wait_ms = _parse_scan_wait_ms(d.pop("scan_wait_ms", UNSET)) + def _parse_steps(data: object) -> list[AgentRunStepResponse] | None | Unset: if data is None: return data @@ -175,6 +305,12 @@ def _parse_steps(data: object) -> list[AgentRunStepResponse] | None | Unset: priority=priority, run_id=run_id, status=status, + blocked_policies=blocked_policies, + flagged_policies=flagged_policies, + governance_input_status=governance_input_status, + governance_input_wait_ms=governance_input_wait_ms, + input_scan_status=input_scan_status, + scan_wait_ms=scan_wait_ms, steps=steps, ) diff --git a/seclai/_generated/models/agent_summary_response.py b/seclai/_generated/models/agent_summary_response.py index 6ac329c..d4be5d8 100644 --- a/seclai/_generated/models/agent_summary_response.py +++ b/seclai/_generated/models/agent_summary_response.py @@ -12,6 +12,7 @@ from ..models.agent_summary_response_sampling_config_type_0 import ( AgentSummaryResponseSamplingConfigType0, ) + from ..models.import_skip_response import ImportSkipResponse T = TypeVar("T", bound="AgentSummaryResponse") @@ -30,6 +31,9 @@ class AgentSummaryResponse: default_evaluation_tier (None | str | Unset): Default evaluation tier: fast, balanced, or thorough. evaluation_mode (str | Unset): Evaluation mode: output_expectation, eval_and_retry, or sample_and_flag. Default: 'eval_and_retry'. + import_warnings (list[ImportSkipResponse] | None | Unset): One entry per item dropped or substituted during + import. Present only on endpoints that accept agent_definition; null on non-import calls; [] when the import had + no skips. max_retries (int | Unset): Max retries for eval_and_retry mode. Default: 3. prompt_model_auto_rollback_enabled (bool | Unset): Whether automatic rollback is enabled for upgraded models. Default: False. @@ -50,6 +54,7 @@ class AgentSummaryResponse: updated_at: str default_evaluation_tier: None | str | Unset = UNSET evaluation_mode: str | Unset = "eval_and_retry" + import_warnings: list[ImportSkipResponse] | None | Unset = UNSET max_retries: int | Unset = 3 prompt_model_auto_rollback_enabled: bool | Unset = False prompt_model_auto_rollback_triggers: list[str] | None | Unset = UNSET @@ -85,6 +90,18 @@ def to_dict(self) -> dict[str, Any]: evaluation_mode = self.evaluation_mode + import_warnings: list[dict[str, Any]] | None | Unset + if isinstance(self.import_warnings, Unset): + import_warnings = UNSET + elif isinstance(self.import_warnings, list): + import_warnings = [] + for import_warnings_type_0_item_data in self.import_warnings: + import_warnings_type_0_item = import_warnings_type_0_item_data.to_dict() + import_warnings.append(import_warnings_type_0_item) + + else: + import_warnings = self.import_warnings + max_retries = self.max_retries prompt_model_auto_rollback_enabled = self.prompt_model_auto_rollback_enabled @@ -130,6 +147,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["default_evaluation_tier"] = default_evaluation_tier if evaluation_mode is not UNSET: field_dict["evaluation_mode"] = evaluation_mode + if import_warnings is not UNSET: + field_dict["import_warnings"] = import_warnings if max_retries is not UNSET: field_dict["max_retries"] = max_retries if prompt_model_auto_rollback_enabled is not UNSET: @@ -156,6 +175,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.agent_summary_response_sampling_config_type_0 import ( AgentSummaryResponseSamplingConfigType0, ) + from ..models.import_skip_response import ImportSkipResponse d = dict(src_dict) created_at = d.pop("created_at") @@ -193,6 +213,32 @@ def _parse_default_evaluation_tier(data: object) -> None | str | Unset: evaluation_mode = d.pop("evaluation_mode", UNSET) + def _parse_import_warnings( + data: object, + ) -> list[ImportSkipResponse] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + import_warnings_type_0 = [] + _import_warnings_type_0 = data + for import_warnings_type_0_item_data in _import_warnings_type_0: + import_warnings_type_0_item = ImportSkipResponse.from_dict( + import_warnings_type_0_item_data + ) + + import_warnings_type_0.append(import_warnings_type_0_item) + + return import_warnings_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[ImportSkipResponse] | None | Unset, data) + + import_warnings = _parse_import_warnings(d.pop("import_warnings", UNSET)) + max_retries = d.pop("max_retries", UNSET) prompt_model_auto_rollback_enabled = d.pop( @@ -258,6 +304,7 @@ def _parse_sampling_config( updated_at=updated_at, default_evaluation_tier=default_evaluation_tier, evaluation_mode=evaluation_mode, + import_warnings=import_warnings, max_retries=max_retries, prompt_model_auto_rollback_enabled=prompt_model_auto_rollback_enabled, prompt_model_auto_rollback_triggers=prompt_model_auto_rollback_triggers, diff --git a/seclai/_generated/models/create_agent_request.py b/seclai/_generated/models/create_agent_request.py index a3579fc..ac3f9d7 100644 --- a/seclai/_generated/models/create_agent_request.py +++ b/seclai/_generated/models/create_agent_request.py @@ -1,13 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +if TYPE_CHECKING: + from ..models.create_agent_request_agent_definition_type_0 import ( + CreateAgentRequestAgentDefinitionType0, + ) + from ..models.create_agent_request_entity_remap_type_0 import ( + CreateAgentRequestEntityRemapType0, + ) + + T = TypeVar("T", bound="CreateAgentRequest") @@ -16,22 +25,47 @@ class CreateAgentRequest: """ Attributes: name (str): Name for the new agent. + agent_definition (CreateAgentRequestAgentDefinitionType0 | None | Unset): Optional payload in the same format + produced by GET /agents/{id}/export. When provided, replaces any template-derived workflow and pre-fills + metadata/trigger fields the request does not specify explicitly. Validation errors include line/column + references against a canonical pretty-printed echo of the supplied payload. agent_template (None | str | Unset): Template to initialize the agent from. Values: blank, retrieval_example, simple_qa, summarizer, json_extractor, content_change_notifier, scheduled_report, webhook_pipeline. description (None | str | Unset): Optional description. + entity_remap (CreateAgentRequestEntityRemapType0 | None | Unset): Optional UUID-substitution map applied to the + imported workflow before save. Each key is a source-account UUID (as returned by /agents/preview-import's + ``unresolved_refs``); each value is the target-account UUID to substitute. Used to relink knowledge bases, + memory banks, source connections, and sub-agents on cross-account imports. trigger_type (str | Unset): Trigger type: dynamic_input, template_input, schedule, new_content. Default: 'dynamic_input'. """ name: str + agent_definition: CreateAgentRequestAgentDefinitionType0 | None | Unset = UNSET agent_template: None | str | Unset = UNSET description: None | str | Unset = UNSET + entity_remap: CreateAgentRequestEntityRemapType0 | None | Unset = UNSET trigger_type: str | Unset = "dynamic_input" additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.create_agent_request_agent_definition_type_0 import ( + CreateAgentRequestAgentDefinitionType0, + ) + from ..models.create_agent_request_entity_remap_type_0 import ( + CreateAgentRequestEntityRemapType0, + ) + name = self.name + agent_definition: dict[str, Any] | None | Unset + if isinstance(self.agent_definition, Unset): + agent_definition = UNSET + elif isinstance(self.agent_definition, CreateAgentRequestAgentDefinitionType0): + agent_definition = self.agent_definition.to_dict() + else: + agent_definition = self.agent_definition + agent_template: None | str | Unset if isinstance(self.agent_template, Unset): agent_template = UNSET @@ -44,6 +78,14 @@ def to_dict(self) -> dict[str, Any]: else: description = self.description + entity_remap: dict[str, Any] | None | Unset + if isinstance(self.entity_remap, Unset): + entity_remap = UNSET + elif isinstance(self.entity_remap, CreateAgentRequestEntityRemapType0): + entity_remap = self.entity_remap.to_dict() + else: + entity_remap = self.entity_remap + trigger_type = self.trigger_type field_dict: dict[str, Any] = {} @@ -53,10 +95,14 @@ def to_dict(self) -> dict[str, Any]: "name": name, } ) + if agent_definition is not UNSET: + field_dict["agent_definition"] = agent_definition if agent_template is not UNSET: field_dict["agent_template"] = agent_template if description is not UNSET: field_dict["description"] = description + if entity_remap is not UNSET: + field_dict["entity_remap"] = entity_remap if trigger_type is not UNSET: field_dict["trigger_type"] = trigger_type @@ -64,9 +110,37 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.create_agent_request_agent_definition_type_0 import ( + CreateAgentRequestAgentDefinitionType0, + ) + from ..models.create_agent_request_entity_remap_type_0 import ( + CreateAgentRequestEntityRemapType0, + ) + d = dict(src_dict) name = d.pop("name") + def _parse_agent_definition( + data: object, + ) -> CreateAgentRequestAgentDefinitionType0 | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + agent_definition_type_0 = ( + CreateAgentRequestAgentDefinitionType0.from_dict(data) + ) + + return agent_definition_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(CreateAgentRequestAgentDefinitionType0 | None | Unset, data) + + agent_definition = _parse_agent_definition(d.pop("agent_definition", UNSET)) + def _parse_agent_template(data: object) -> None | str | Unset: if data is None: return data @@ -85,12 +159,33 @@ def _parse_description(data: object) -> None | str | Unset: description = _parse_description(d.pop("description", UNSET)) + def _parse_entity_remap( + data: object, + ) -> CreateAgentRequestEntityRemapType0 | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + entity_remap_type_0 = CreateAgentRequestEntityRemapType0.from_dict(data) + + return entity_remap_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(CreateAgentRequestEntityRemapType0 | None | Unset, data) + + entity_remap = _parse_entity_remap(d.pop("entity_remap", UNSET)) + trigger_type = d.pop("trigger_type", UNSET) create_agent_request = cls( name=name, + agent_definition=agent_definition, agent_template=agent_template, description=description, + entity_remap=entity_remap, trigger_type=trigger_type, ) diff --git a/seclai/_generated/models/create_agent_request_agent_definition_type_0.py b/seclai/_generated/models/create_agent_request_agent_definition_type_0.py new file mode 100644 index 0000000..97dd852 --- /dev/null +++ b/seclai/_generated/models/create_agent_request_agent_definition_type_0.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CreateAgentRequestAgentDefinitionType0") + + +@_attrs_define +class CreateAgentRequestAgentDefinitionType0: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + create_agent_request_agent_definition_type_0 = cls() + + create_agent_request_agent_definition_type_0.additional_properties = d + return create_agent_request_agent_definition_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/create_agent_request_entity_remap_type_0.py b/seclai/_generated/models/create_agent_request_entity_remap_type_0.py new file mode 100644 index 0000000..ff7ec40 --- /dev/null +++ b/seclai/_generated/models/create_agent_request_entity_remap_type_0.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CreateAgentRequestEntityRemapType0") + + +@_attrs_define +class CreateAgentRequestEntityRemapType0: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + create_agent_request_entity_remap_type_0 = cls() + + create_agent_request_entity_remap_type_0.additional_properties = d + return create_agent_request_entity_remap_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/generate_step_config_request.py b/seclai/_generated/models/generate_step_config_request.py index 6807cfe..fed5801 100644 --- a/seclai/_generated/models/generate_step_config_request.py +++ b/seclai/_generated/models/generate_step_config_request.py @@ -24,7 +24,7 @@ class GenerateStepConfigRequest: """ Attributes: - step_type (str): The step type to generate config for (e.g. 'transform', 'gate', 'text', 'prompt_call', + step_type (str): The step type to generate config for (e.g. 'regex_replace', 'gate', 'text', 'prompt_call', 'retrieval'). user_input (str): Natural language description of what the step should do. agent_steps (list[GenerateStepConfigRequestAgentStepsType0Item] | None | Unset): Current agent step hierarchy diff --git a/seclai/_generated/models/governance_policy_ref_response.py b/seclai/_generated/models/governance_policy_ref_response.py new file mode 100644 index 0000000..6877f33 --- /dev/null +++ b/seclai/_generated/models/governance_policy_ref_response.py @@ -0,0 +1,85 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GovernancePolicyRefResponse") + + +@_attrs_define +class GovernancePolicyRefResponse: + """Reference to a governance policy by id and name. + + Attributes: + policy_id (str): Governance policy identifier. + policy_name (None | str | Unset): Display name of the policy at evaluation time. May be null when the policy has + been deleted. + """ + + policy_id: str + policy_name: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + policy_id = self.policy_id + + policy_name: None | str | Unset + if isinstance(self.policy_name, Unset): + policy_name = UNSET + else: + policy_name = self.policy_name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "policy_id": policy_id, + } + ) + if policy_name is not UNSET: + field_dict["policy_name"] = policy_name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + policy_id = d.pop("policy_id") + + def _parse_policy_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + policy_name = _parse_policy_name(d.pop("policy_name", UNSET)) + + governance_policy_ref_response = cls( + policy_id=policy_id, + policy_name=policy_name, + ) + + governance_policy_ref_response.additional_properties = d + return governance_policy_ref_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/import_field_error_model.py b/seclai/_generated/models/import_field_error_model.py new file mode 100644 index 0000000..4b184a0 --- /dev/null +++ b/seclai/_generated/models/import_field_error_model.py @@ -0,0 +1,86 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ImportFieldErrorModel") + + +@_attrs_define +class ImportFieldErrorModel: + """Single agent_definition validation error with source position. + + Attributes: + column (int): 1-indexed column in `source`. + line (int): 1-indexed line in `source`. + message (str): Human-readable description of the problem. + path (str): Dotted path of the offending field, e.g. `agent.definition.child_steps[0].step_type`. + """ + + column: int + line: int + message: str + path: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + column = self.column + + line = self.line + + message = self.message + + path = self.path + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "column": column, + "line": line, + "message": message, + "path": path, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + column = d.pop("column") + + line = d.pop("line") + + message = d.pop("message") + + path = d.pop("path") + + import_field_error_model = cls( + column=column, + line=line, + message=message, + path=path, + ) + + import_field_error_model.additional_properties = d + return import_field_error_model + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/import_skip_response.py b/seclai/_generated/models/import_skip_response.py new file mode 100644 index 0000000..5e91c2e --- /dev/null +++ b/seclai/_generated/models/import_skip_response.py @@ -0,0 +1,105 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.import_skip_response_details import ImportSkipResponseDetails + + +T = TypeVar("T", bound="ImportSkipResponse") + + +@_attrs_define +class ImportSkipResponse: + """One item that was not applied during an agent import. + + Used as the element type for ``import_warnings`` on every + response model that accepts an ``agent_definition`` payload. + See :py:class:`services.agent_definition_import.AgentImportSkip` + for the full category list. + + Lives here (not on each router) so the authenticated and public + API responses share one definition — keeping the shape that + clients (UI modal, MCP, OpenAPI consumers) depend on aligned. + + Attributes: + category (str): The kind of item that was skipped or substituted: 'schedule', 'evaluation_criteria', + 'alert_config', 'alert_recipient', 'governance_policy', 'governance_kb_link', 'solution_link'. + message (str): Human-readable explanation of what was skipped and why. + details (ImportSkipResponseDetails | Unset): Category-specific identifiers for the skipped item (step_id, + alert_type, kb_name, etc.). Stable keys per category; absent keys are simply not applicable. + """ + + category: str + message: str + details: ImportSkipResponseDetails | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + category = self.category + + message = self.message + + details: dict[str, Any] | Unset = UNSET + if not isinstance(self.details, Unset): + details = self.details.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "category": category, + "message": message, + } + ) + if details is not UNSET: + field_dict["details"] = details + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.import_skip_response_details import ImportSkipResponseDetails + + d = dict(src_dict) + category = d.pop("category") + + message = d.pop("message") + + _details = d.pop("details", UNSET) + details: ImportSkipResponseDetails | Unset + if isinstance(_details, Unset): + details = UNSET + else: + details = ImportSkipResponseDetails.from_dict(_details) + + import_skip_response = cls( + category=category, + message=message, + details=details, + ) + + import_skip_response.additional_properties = d + return import_skip_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/import_skip_response_details.py b/seclai/_generated/models/import_skip_response_details.py new file mode 100644 index 0000000..364cd8b --- /dev/null +++ b/seclai/_generated/models/import_skip_response_details.py @@ -0,0 +1,49 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ImportSkipResponseDetails") + + +@_attrs_define +class ImportSkipResponseDetails: + """Category-specific identifiers for the skipped item (step_id, alert_type, kb_name, etc.). Stable keys per category; + absent keys are simply not applicable. + + """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + import_skip_response_details = cls() + + import_skip_response_details.additional_properties = d + return import_skip_response_details + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/proposed_action_response.py b/seclai/_generated/models/proposed_action_response.py index 733a169..651d102 100644 --- a/seclai/_generated/models/proposed_action_response.py +++ b/seclai/_generated/models/proposed_action_response.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,6 +10,9 @@ if TYPE_CHECKING: from ..models.proposed_action_response_params import ProposedActionResponseParams + from ..models.proposed_action_response_preview_type_0 import ( + ProposedActionResponsePreviewType0, + ) T = TypeVar("T", bound="ProposedActionResponse") @@ -24,15 +27,27 @@ class ProposedActionResponse: description (str): Human-readable description of the action. params (ProposedActionResponseParams): Parameters for the action. is_destructive (bool | Unset): Whether the action is destructive. Default: False. + preview (None | ProposedActionResponsePreviewType0 | Unset): Planning-time dry-run preview attached by the + solution AI assistant for create_agent / update_agent actions. Contains ``steps`` (the generated step tree), + ``step_count``, ``warnings`` (a mix of heuristic structural issues — e.g. brittle JSONPath, pass-through + ``regex_replace``, ``prompt_call`` missing a model — and deterministic resource-usage issues: every pre-bound + knowledge base / memory bank must be referenced by at least one step, and no step may reference an unknown id), + and ``skipped`` / ``skipped_reason`` when preview couldn't run (e.g. the action depends on resources created + earlier in the same plan). ``None`` for non-agent actions or when generation failed. """ action_type: str description: str params: ProposedActionResponseParams is_destructive: bool | Unset = False + preview: None | ProposedActionResponsePreviewType0 | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.proposed_action_response_preview_type_0 import ( + ProposedActionResponsePreviewType0, + ) + action_type = self.action_type description = self.description @@ -41,6 +56,14 @@ def to_dict(self) -> dict[str, Any]: is_destructive = self.is_destructive + preview: dict[str, Any] | None | Unset + if isinstance(self.preview, Unset): + preview = UNSET + elif isinstance(self.preview, ProposedActionResponsePreviewType0): + preview = self.preview.to_dict() + else: + preview = self.preview + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -52,6 +75,8 @@ def to_dict(self) -> dict[str, Any]: ) if is_destructive is not UNSET: field_dict["is_destructive"] = is_destructive + if preview is not UNSET: + field_dict["preview"] = preview return field_dict @@ -60,6 +85,9 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.proposed_action_response_params import ( ProposedActionResponseParams, ) + from ..models.proposed_action_response_preview_type_0 import ( + ProposedActionResponsePreviewType0, + ) d = dict(src_dict) action_type = d.pop("action_type") @@ -70,11 +98,31 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: is_destructive = d.pop("is_destructive", UNSET) + def _parse_preview( + data: object, + ) -> None | ProposedActionResponsePreviewType0 | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + preview_type_0 = ProposedActionResponsePreviewType0.from_dict(data) + + return preview_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | ProposedActionResponsePreviewType0 | Unset, data) + + preview = _parse_preview(d.pop("preview", UNSET)) + proposed_action_response = cls( action_type=action_type, description=description, params=params, is_destructive=is_destructive, + preview=preview, ) proposed_action_response.additional_properties = d diff --git a/seclai/_generated/models/proposed_action_response_preview_type_0.py b/seclai/_generated/models/proposed_action_response_preview_type_0.py new file mode 100644 index 0000000..cf8e37a --- /dev/null +++ b/seclai/_generated/models/proposed_action_response_preview_type_0.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ProposedActionResponsePreviewType0") + + +@_attrs_define +class ProposedActionResponsePreviewType0: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + proposed_action_response_preview_type_0 = cls() + + proposed_action_response_preview_type_0.additional_properties = d + return proposed_action_response_preview_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/update_agent_request.py b/seclai/_generated/models/update_agent_request.py index 6fcb8e1..ae34ee8 100644 --- a/seclai/_generated/models/update_agent_request.py +++ b/seclai/_generated/models/update_agent_request.py @@ -10,6 +10,12 @@ from ..types import UNSET, Unset if TYPE_CHECKING: + from ..models.update_agent_request_agent_definition_type_0 import ( + UpdateAgentRequestAgentDefinitionType0, + ) + from ..models.update_agent_request_entity_remap_type_0 import ( + UpdateAgentRequestEntityRemapType0, + ) from ..models.update_agent_request_sampling_config_type_0 import ( UpdateAgentRequestSamplingConfigType0, ) @@ -22,8 +28,15 @@ class UpdateAgentRequest: """ Attributes: + agent_definition (None | Unset | UpdateAgentRequestAgentDefinitionType0): Optional payload in the same format + produced by GET /agents/{id}/export. When provided, agent metadata fields the request does not set explicitly + are taken from the payload, and the agent's workflow is replaced from `agent.definition`. The previous version + is preserved in history. Validation errors include line/column references against a canonical pretty-printed + echo of the supplied payload. default_evaluation_tier (None | str | Unset): Default evaluation tier: 'fast', 'balanced', or 'thorough'. description (None | str | Unset): New description for the agent. + entity_remap (None | Unset | UpdateAgentRequestEntityRemapType0): Optional UUID-substitution map applied to the + imported workflow before save (same shape as on POST /agents). evaluation_mode (None | str | Unset): Evaluation mode: 'output_expectation', 'eval_and_retry', or 'sample_and_flag'. max_retries (int | None | Unset): Max retries for eval_and_retry mode (1-10). @@ -45,8 +58,10 @@ class UpdateAgentRequest: Default: False. """ + agent_definition: None | Unset | UpdateAgentRequestAgentDefinitionType0 = UNSET default_evaluation_tier: None | str | Unset = UNSET description: None | str | Unset = UNSET + entity_remap: None | Unset | UpdateAgentRequestEntityRemapType0 = UNSET evaluation_mode: None | str | Unset = UNSET max_retries: int | None | Unset = UNSET name: None | str | Unset = UNSET @@ -63,10 +78,24 @@ class UpdateAgentRequest: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_agent_request_agent_definition_type_0 import ( + UpdateAgentRequestAgentDefinitionType0, + ) + from ..models.update_agent_request_entity_remap_type_0 import ( + UpdateAgentRequestEntityRemapType0, + ) from ..models.update_agent_request_sampling_config_type_0 import ( UpdateAgentRequestSamplingConfigType0, ) + agent_definition: dict[str, Any] | None | Unset + if isinstance(self.agent_definition, Unset): + agent_definition = UNSET + elif isinstance(self.agent_definition, UpdateAgentRequestAgentDefinitionType0): + agent_definition = self.agent_definition.to_dict() + else: + agent_definition = self.agent_definition + default_evaluation_tier: None | str | Unset if isinstance(self.default_evaluation_tier, Unset): default_evaluation_tier = UNSET @@ -79,6 +108,14 @@ def to_dict(self) -> dict[str, Any]: else: description = self.description + entity_remap: dict[str, Any] | None | Unset + if isinstance(self.entity_remap, Unset): + entity_remap = UNSET + elif isinstance(self.entity_remap, UpdateAgentRequestEntityRemapType0): + entity_remap = self.entity_remap.to_dict() + else: + entity_remap = self.entity_remap + evaluation_mode: None | str | Unset if isinstance(self.evaluation_mode, Unset): evaluation_mode = UNSET @@ -153,10 +190,14 @@ def to_dict(self) -> dict[str, Any]: field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) + if agent_definition is not UNSET: + field_dict["agent_definition"] = agent_definition if default_evaluation_tier is not UNSET: field_dict["default_evaluation_tier"] = default_evaluation_tier if description is not UNSET: field_dict["description"] = description + if entity_remap is not UNSET: + field_dict["entity_remap"] = entity_remap if evaluation_mode is not UNSET: field_dict["evaluation_mode"] = evaluation_mode if max_retries is not UNSET: @@ -192,12 +233,39 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.update_agent_request_agent_definition_type_0 import ( + UpdateAgentRequestAgentDefinitionType0, + ) + from ..models.update_agent_request_entity_remap_type_0 import ( + UpdateAgentRequestEntityRemapType0, + ) from ..models.update_agent_request_sampling_config_type_0 import ( UpdateAgentRequestSamplingConfigType0, ) d = dict(src_dict) + def _parse_agent_definition( + data: object, + ) -> None | Unset | UpdateAgentRequestAgentDefinitionType0: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + agent_definition_type_0 = ( + UpdateAgentRequestAgentDefinitionType0.from_dict(data) + ) + + return agent_definition_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UpdateAgentRequestAgentDefinitionType0, data) + + agent_definition = _parse_agent_definition(d.pop("agent_definition", UNSET)) + def _parse_default_evaluation_tier(data: object) -> None | str | Unset: if data is None: return data @@ -218,6 +286,25 @@ def _parse_description(data: object) -> None | str | Unset: description = _parse_description(d.pop("description", UNSET)) + def _parse_entity_remap( + data: object, + ) -> None | Unset | UpdateAgentRequestEntityRemapType0: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + entity_remap_type_0 = UpdateAgentRequestEntityRemapType0.from_dict(data) + + return entity_remap_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UpdateAgentRequestEntityRemapType0, data) + + entity_remap = _parse_entity_remap(d.pop("entity_remap", UNSET)) + def _parse_evaluation_mode(data: object) -> None | str | Unset: if data is None: return data @@ -343,8 +430,10 @@ def _parse_sampling_config( set_sampling_config = d.pop("set_sampling_config", UNSET) update_agent_request = cls( + agent_definition=agent_definition, default_evaluation_tier=default_evaluation_tier, description=description, + entity_remap=entity_remap, evaluation_mode=evaluation_mode, max_retries=max_retries, name=name, diff --git a/seclai/_generated/models/update_agent_request_agent_definition_type_0.py b/seclai/_generated/models/update_agent_request_agent_definition_type_0.py new file mode 100644 index 0000000..e90a89b --- /dev/null +++ b/seclai/_generated/models/update_agent_request_agent_definition_type_0.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="UpdateAgentRequestAgentDefinitionType0") + + +@_attrs_define +class UpdateAgentRequestAgentDefinitionType0: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + update_agent_request_agent_definition_type_0 = cls() + + update_agent_request_agent_definition_type_0.additional_properties = d + return update_agent_request_agent_definition_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/_generated/models/update_agent_request_entity_remap_type_0.py b/seclai/_generated/models/update_agent_request_entity_remap_type_0.py new file mode 100644 index 0000000..17eb665 --- /dev/null +++ b/seclai/_generated/models/update_agent_request_entity_remap_type_0.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="UpdateAgentRequestEntityRemapType0") + + +@_attrs_define +class UpdateAgentRequestEntityRemapType0: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + update_agent_request_entity_remap_type_0 = cls() + + update_agent_request_entity_remap_type_0.additional_properties = d + return update_agent_request_entity_remap_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/seclai/seclai.py b/seclai/seclai.py index 41a90e8..b7b080b 100644 --- a/seclai/seclai.py +++ b/seclai/seclai.py @@ -1621,6 +1621,33 @@ def export_agent(self, agent_id: str, *, download: bool = True) -> dict[str, Any self.request("GET", f"/agents/{agent_id}/export", params=params), ) + def preview_import_agent(self, body: dict[str, Any]) -> dict[str, Any]: + """Validate an ``agent_definition`` payload without creating an agent. + + Use before :meth:`create_agent` or :meth:`update_agent` with an + ``agent_definition`` to surface ``unresolved_refs`` — workflow + references to knowledge bases, memory banks, source connections, or + sub-agents that don't exist in the target account. Pass the returned + ids back in ``entity_remap`` on the commit call to substitute them. + + Args: + body: ``{"agent_definition": ...}`` — same shape produced by + :meth:`export_agent`. + + Returns: + Summary with step/schedule/alert/criteria/policy counts and any + ``unresolved_refs``. + + Raises: + SeclaiAPIValidationError: HTTP 422 — body lists each field error + with a 1-indexed line/column anchored to the canonical + ``source`` echo. + """ + return cast( + dict[str, Any], + self.request("POST", "/agents/preview-import", json=body), + ) + # ── Agent Definitions ───────────────────────────────────────────────────── def get_agent_definition(self, agent_id: str) -> dict[str, Any]: @@ -4924,6 +4951,33 @@ async def export_agent( await self.request("GET", f"/agents/{agent_id}/export", params=params), ) + async def preview_import_agent(self, body: dict[str, Any]) -> dict[str, Any]: + """Validate an ``agent_definition`` payload without creating an agent. + + Use before :meth:`create_agent` or :meth:`update_agent` with an + ``agent_definition`` to surface ``unresolved_refs`` — workflow + references to knowledge bases, memory banks, source connections, or + sub-agents that don't exist in the target account. Pass the returned + ids back in ``entity_remap`` on the commit call to substitute them. + + Args: + body: ``{"agent_definition": ...}`` — same shape produced by + :meth:`export_agent`. + + Returns: + Summary with step/schedule/alert/criteria/policy counts and any + ``unresolved_refs``. + + Raises: + SeclaiAPIValidationError: HTTP 422 — body lists each field error + with a 1-indexed line/column anchored to the canonical + ``source`` echo. + """ + return cast( + dict[str, Any], + await self.request("POST", "/agents/preview-import", json=body), + ) + # ── Agent Definitions ───────────────────────────────────────────────────── async def get_agent_definition(self, agent_id: str) -> dict[str, Any]: diff --git a/tests/test_new_methods.py b/tests/test_new_methods.py index bb98490..be8b08f 100644 --- a/tests/test_new_methods.py +++ b/tests/test_new_methods.py @@ -120,6 +120,35 @@ def handler(req: httpx.Request) -> httpx.Response: client.delete_agent("a1") assert seen == {"method": "DELETE", "path": "/agents/a1"} + def test_preview_import_agent(self) -> None: + seen: dict[str, Any] = {} + + def handler(req: httpx.Request) -> httpx.Response: + seen["method"] = req.method + seen["path"] = req.url.path + seen["body"] = json.loads(req.content) + return _json_response( + { + "ok": True, + "agent_name": "n", + "description": None, + "step_count": 0, + "schedules": 0, + "alert_configs": 0, + "evaluation_criteria": 0, + "governance_policies": 0, + } + ) + + client = _sync_client(handler) + result = client.preview_import_agent( + {"agent_definition": {"agent": {"name": "n"}}} + ) + assert seen["method"] == "POST" + assert seen["path"] == "/agents/preview-import" + assert seen["body"] == {"agent_definition": {"agent": {"name": "n"}}} + assert result["ok"] is True + # --------------------------------------------------------------------------- # Agent Definitions @@ -1468,6 +1497,24 @@ async def handler(req: httpx.Request) -> httpx.Response: assert seen == {"method": "POST", "path": "/agents"} assert result["id"] == "a1" + @pytest.mark.asyncio + async def test_async_preview_import_agent(self) -> None: + seen: dict[str, Any] = {} + + async def handler(req: httpx.Request) -> httpx.Response: + seen["method"] = req.method + seen["path"] = req.url.path + seen["body"] = json.loads(req.content) + return _json_response({"ok": True}) + + client = _async_client(handler) + await client.preview_import_agent( + {"agent_definition": {"agent": {"name": "n"}}} + ) + assert seen["method"] == "POST" + assert seen["path"] == "/agents/preview-import" + assert seen["body"] == {"agent_definition": {"agent": {"name": "n"}}} + @pytest.mark.asyncio async def test_async_delete_agent(self) -> None: seen: dict[str, Any] = {} From 753ca898c6b427d6369499372630f36baaf83d1d Mon Sep 17 00:00:00 2001 From: Kim Burgaard Date: Fri, 22 May 2026 12:24:32 -0700 Subject: [PATCH 7/7] Addressed review comments --- seclai/seclai.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/seclai/seclai.py b/seclai/seclai.py index b7b080b..36e01bc 100644 --- a/seclai/seclai.py +++ b/seclai/seclai.py @@ -1639,8 +1639,12 @@ def preview_import_agent(self, body: dict[str, Any]) -> dict[str, Any]: ``unresolved_refs``. Raises: - SeclaiAPIValidationError: HTTP 422 — body lists each field error - with a 1-indexed line/column anchored to the canonical + SeclaiAPIStatusError: For any non-success response, including + HTTP 422 when the ``agent_definition`` fails validation. + On 422 the response body (available as + ``SeclaiAPIStatusError.response_text``) is an + ``AgentDefinitionImportErrorResponse`` listing each field + error with a 1-indexed line/column anchored to the canonical ``source`` echo. """ return cast( @@ -4969,8 +4973,12 @@ async def preview_import_agent(self, body: dict[str, Any]) -> dict[str, Any]: ``unresolved_refs``. Raises: - SeclaiAPIValidationError: HTTP 422 — body lists each field error - with a 1-indexed line/column anchored to the canonical + SeclaiAPIStatusError: For any non-success response, including + HTTP 422 when the ``agent_definition`` fails validation. + On 422 the response body (available as + ``SeclaiAPIStatusError.response_text``) is an + ``AgentDefinitionImportErrorResponse`` listing each field + error with a 1-indexed line/column anchored to the canonical ``source`` echo. """ return cast(