qanswer-sdk 0.46.0.dev0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- qanswer_sdk/__init__.py +1268 -0
- qanswer_sdk/api/__init__.py +64 -0
- qanswer_sdk/api/admin_api.py +7383 -0
- qanswer_sdk/api/ai_assistant_access_rights_api.py +5879 -0
- qanswer_sdk/api/ai_assistant_api.py +8960 -0
- qanswer_sdk/api/auto_complete_api.py +612 -0
- qanswer_sdk/api/bot_slack_api.py +1069 -0
- qanswer_sdk/api/branding_api.py +5723 -0
- qanswer_sdk/api/chatbot_api.py +1102 -0
- qanswer_sdk/api/connector_audio_api.py +3264 -0
- qanswer_sdk/api/connector_document_api.py +1990 -0
- qanswer_sdk/api/connector_e_consilium_api.py +313 -0
- qanswer_sdk/api/connector_e_consilium_search_index_api_api.py +1164 -0
- qanswer_sdk/api/connector_google_drive_api.py +1896 -0
- qanswer_sdk/api/connector_imapapi_api.py +1775 -0
- qanswer_sdk/api/connector_one_drive_api.py +1579 -0
- qanswer_sdk/api/connector_onenote_api.py +1596 -0
- qanswer_sdk/api/connector_pinecone_api.py +893 -0
- qanswer_sdk/api/connector_publication_office_api_api.py +1230 -0
- qanswer_sdk/api/connector_qn_a_api.py +1521 -0
- qanswer_sdk/api/connector_rdf_answer_api.py +1393 -0
- qanswer_sdk/api/connector_rdf_api.py +5093 -0
- qanswer_sdk/api/connector_sharepoint_api.py +3445 -0
- qanswer_sdk/api/connector_websearch_api.py +332 -0
- qanswer_sdk/api/connector_website_api.py +2829 -0
- qanswer_sdk/api/connectors_api.py +6824 -0
- qanswer_sdk/api/connectors_data_api.py +5415 -0
- qanswer_sdk/api/conversation_logs_api.py +13159 -0
- qanswer_sdk/api/dataset_api.py +6487 -0
- qanswer_sdk/api/dataset_config_api.py +4643 -0
- qanswer_sdk/api/debug_api.py +278 -0
- qanswer_sdk/api/default_api.py +763 -0
- qanswer_sdk/api/embedder_endpoint_api.py +3330 -0
- qanswer_sdk/api/frontend_config_api.py +270 -0
- qanswer_sdk/api/health_check_api_api.py +278 -0
- qanswer_sdk/api/llm_endpoint_api.py +4660 -0
- qanswer_sdk/api/mcp_api.py +11201 -0
- qanswer_sdk/api/metadata_api.py +2070 -0
- qanswer_sdk/api/notifications_api.py +1841 -0
- qanswer_sdk/api/o_auth2_api.py +648 -0
- qanswer_sdk/api/payment_api.py +1852 -0
- qanswer_sdk/api/socket_api.py +4220 -0
- qanswer_sdk/api/speech_to_text_api.py +919 -0
- qanswer_sdk/api/task_ai_excel_api.py +7541 -0
- qanswer_sdk/api/task_chat_api.py +2598 -0
- qanswer_sdk/api/task_document_parsing_api.py +619 -0
- qanswer_sdk/api/task_entity_linking_api.py +315 -0
- qanswer_sdk/api/task_rdf_linker_api.py +4408 -0
- qanswer_sdk/api/task_rdf_sparql_endpoint_api.py +3189 -0
- qanswer_sdk/api/task_rdf_text_linker_api.py +1452 -0
- qanswer_sdk/api/task_report_copilot_api.py +7010 -0
- qanswer_sdk/api/task_search_api.py +2012 -0
- qanswer_sdk/api/task_text2sparql_api.py +902 -0
- qanswer_sdk/api/task_text_classification_api.py +592 -0
- qanswer_sdk/api/tasks_api.py +318 -0
- qanswer_sdk/api/tool_embedder_api.py +5208 -0
- qanswer_sdk/api/tool_llm_api.py +6518 -0
- qanswer_sdk/api/unit_organizations_api.py +7086 -0
- qanswer_sdk/api/unit_teams_api.py +4255 -0
- qanswer_sdk/api/unit_user_api.py +11948 -0
- qanswer_sdk/api/v1_chat_completion_api.py +330 -0
- qanswer_sdk/api/v1_embeddings_api.py +297 -0
- qanswer_sdk/api_client.py +804 -0
- qanswer_sdk/api_response.py +21 -0
- qanswer_sdk/configuration.py +614 -0
- qanswer_sdk/exceptions.py +216 -0
- qanswer_sdk/models/__init__.py +567 -0
- qanswer_sdk/models/access_audio_spans_response_model.py +91 -0
- qanswer_sdk/models/access_pdf_payload_model.py +111 -0
- qanswer_sdk/models/access_type.py +42 -0
- qanswer_sdk/models/access_type_shared.py +38 -0
- qanswer_sdk/models/add_qn_a_request.py +103 -0
- qanswer_sdk/models/add_synonyms.py +93 -0
- qanswer_sdk/models/add_synonyms_resp.py +89 -0
- qanswer_sdk/models/admin_overall_stats_response.py +105 -0
- qanswer_sdk/models/admin_user_overall_stats.py +99 -0
- qanswer_sdk/models/advanced_o_auth2_mcp_authentication_config.py +95 -0
- qanswer_sdk/models/aggregate.py +93 -0
- qanswer_sdk/models/aggregation.py +116 -0
- qanswer_sdk/models/aggregation_type.py +41 -0
- qanswer_sdk/models/aggregations_group.py +102 -0
- qanswer_sdk/models/ai_assistant_clone_response.py +91 -0
- qanswer_sdk/models/ai_assistant_dto.py +122 -0
- qanswer_sdk/models/ai_assistant_filter_dto.py +113 -0
- qanswer_sdk/models/ai_assistant_list.py +101 -0
- qanswer_sdk/models/ai_assistant_share_response.py +93 -0
- qanswer_sdk/models/ai_assistant_shared_access.py +113 -0
- qanswer_sdk/models/ai_excel_task_settings.py +125 -0
- qanswer_sdk/models/ai_excel_task_update.py +125 -0
- qanswer_sdk/models/ai_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/ai_template_base_with_id.py +95 -0
- qanswer_sdk/models/ai_template_cell.py +113 -0
- qanswer_sdk/models/ai_template_cell_base.py +87 -0
- qanswer_sdk/models/ai_template_cell_update_payload.py +95 -0
- qanswer_sdk/models/ai_template_column.py +99 -0
- qanswer_sdk/models/ai_template_column_base.py +93 -0
- qanswer_sdk/models/ai_template_column_update_payload.py +109 -0
- qanswer_sdk/models/ai_template_column_with_cells.py +109 -0
- qanswer_sdk/models/ai_template_create_payload.py +128 -0
- qanswer_sdk/models/ai_template_row.py +93 -0
- qanswer_sdk/models/ai_template_row_base.py +87 -0
- qanswer_sdk/models/ai_template_row_update_payload.py +103 -0
- qanswer_sdk/models/ai_template_row_with_cells.py +103 -0
- qanswer_sdk/models/ai_template_with_cells.py +134 -0
- qanswer_sdk/models/ai_template_with_cells_new_column_id.py +136 -0
- qanswer_sdk/models/allowed_extension.py +53 -0
- qanswer_sdk/models/allowed_file_extensions.py +98 -0
- qanswer_sdk/models/api_key_header_type.py +38 -0
- qanswer_sdk/models/api_key_mcp_authentication_config.py +94 -0
- qanswer_sdk/models/applied_filter_type.py +37 -0
- qanswer_sdk/models/applied_metadata_filter.py +103 -0
- qanswer_sdk/models/apply_template_task_settings_to_slots_response.py +89 -0
- qanswer_sdk/models/assistant_category_color_definition.py +89 -0
- qanswer_sdk/models/assistant_category_color_item.py +89 -0
- qanswer_sdk/models/assistant_category_colors_update_payload.py +95 -0
- qanswer_sdk/models/assistant_category_count.py +91 -0
- qanswer_sdk/models/assistant_message_stop.py +93 -0
- qanswer_sdk/models/assistant_task.py +43 -0
- qanswer_sdk/models/assistant_template.py +111 -0
- qanswer_sdk/models/assistant_template_filter_dto.py +120 -0
- qanswer_sdk/models/assistant_template_with_tools_selection_dto.py +121 -0
- qanswer_sdk/models/audio_allowed_file_extensions.py +87 -0
- qanswer_sdk/models/audio_file_upload_payload.py +107 -0
- qanswer_sdk/models/audio_format.py +37 -0
- qanswer_sdk/models/audio_segment.py +95 -0
- qanswer_sdk/models/audio_segment_update_payload.py +97 -0
- qanswer_sdk/models/audio_segment_update_response.py +91 -0
- qanswer_sdk/models/audio_speaker_update_payload.py +99 -0
- qanswer_sdk/models/audio_speaker_update_response.py +91 -0
- qanswer_sdk/models/audio_transcription_list_response.py +101 -0
- qanswer_sdk/models/audio_transcription_mode.py +37 -0
- qanswer_sdk/models/audio_transcription_record.py +101 -0
- qanswer_sdk/models/audio_upload_response.py +99 -0
- qanswer_sdk/models/audio_upload_transcription.py +99 -0
- qanswer_sdk/models/audio_word_segment.py +93 -0
- qanswer_sdk/models/audio_word_span_change.py +94 -0
- qanswer_sdk/models/audio_word_span_update_payload.py +104 -0
- qanswer_sdk/models/audio_word_span_update_response.py +91 -0
- qanswer_sdk/models/audio_word_update_payload.py +100 -0
- qanswer_sdk/models/audio_word_update_response.py +91 -0
- qanswer_sdk/models/auth_link_response.py +91 -0
- qanswer_sdk/models/auto_bot_description_request.py +89 -0
- qanswer_sdk/models/auto_bot_description_response.py +87 -0
- qanswer_sdk/models/available_aggregation.py +98 -0
- qanswer_sdk/models/available_connectors_response.py +99 -0
- qanswer_sdk/models/available_embedding_models_response.py +95 -0
- qanswer_sdk/models/available_endpoints_response.py +95 -0
- qanswer_sdk/models/available_logs_visibility_policy.py +103 -0
- qanswer_sdk/models/available_space_quota_for_dataset.py +95 -0
- qanswer_sdk/models/available_storage_preference.py +103 -0
- qanswer_sdk/models/base_connectors_response.py +89 -0
- qanswer_sdk/models/base_conversation_response.py +89 -0
- qanswer_sdk/models/base_feedback_response.py +89 -0
- qanswer_sdk/models/bot_answer_length.py +38 -0
- qanswer_sdk/models/branding_app_title.py +87 -0
- qanswer_sdk/models/branding_system_message.py +87 -0
- qanswer_sdk/models/bulk_update_tool_selections_request.py +87 -0
- qanswer_sdk/models/capability_type.py +37 -0
- qanswer_sdk/models/cell.py +89 -0
- qanswer_sdk/models/change_password.py +89 -0
- qanswer_sdk/models/change_password_admin.py +89 -0
- qanswer_sdk/models/change_role.py +96 -0
- qanswer_sdk/models/chat_task_settings.py +141 -0
- qanswer_sdk/models/chat_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/chat_task_update.py +139 -0
- qanswer_sdk/models/chatbot_chat_payload.py +148 -0
- qanswer_sdk/models/chatbot_default_settings_response.py +95 -0
- qanswer_sdk/models/chatbot_llm_dto.py +147 -0
- qanswer_sdk/models/chatbot_response.py +151 -0
- qanswer_sdk/models/chatbot_setting_dto.py +99 -0
- qanswer_sdk/models/chatbot_setting_request.py +91 -0
- qanswer_sdk/models/class_info.py +89 -0
- qanswer_sdk/models/clone_dataset_request.py +104 -0
- qanswer_sdk/models/clone_dataset_response.py +91 -0
- qanswer_sdk/models/config.py +228 -0
- qanswer_sdk/models/config1.py +138 -0
- qanswer_sdk/models/connector_config_list_response.py +99 -0
- qanswer_sdk/models/connector_config_model.py +102 -0
- qanswer_sdk/models/connector_config_patch_payload.py +93 -0
- qanswer_sdk/models/connector_config_response.py +95 -0
- qanswer_sdk/models/connector_config_sync_response.py +93 -0
- qanswer_sdk/models/connector_config_type.py +37 -0
- qanswer_sdk/models/connector_model.py +118 -0
- qanswer_sdk/models/connector_type.py +50 -0
- qanswer_sdk/models/connector_type_dto.py +98 -0
- qanswer_sdk/models/connector_type_list_dto.py +95 -0
- qanswer_sdk/models/content_item.py +130 -0
- qanswer_sdk/models/content_item_type.py +39 -0
- qanswer_sdk/models/conversation_message.py +259 -0
- qanswer_sdk/models/conversation_message_error_key.py +52 -0
- qanswer_sdk/models/conversation_message_search_result.py +121 -0
- qanswer_sdk/models/conversation_model.py +169 -0
- qanswer_sdk/models/conversation_overall_stats.py +97 -0
- qanswer_sdk/models/conversation_overall_stats_response.py +95 -0
- qanswer_sdk/models/conversation_retention_response.py +91 -0
- qanswer_sdk/models/conversation_statistics.py +95 -0
- qanswer_sdk/models/conversation_update.py +93 -0
- qanswer_sdk/models/conversation_users_stats.py +99 -0
- qanswer_sdk/models/conversation_users_stats_response.py +99 -0
- qanswer_sdk/models/coordinates.py +89 -0
- qanswer_sdk/models/cost_summary_dto.py +99 -0
- qanswer_sdk/models/create_connector_request.py +95 -0
- qanswer_sdk/models/create_connector_response.py +95 -0
- qanswer_sdk/models/create_dataset_request.py +145 -0
- qanswer_sdk/models/create_imap_connector_request.py +105 -0
- qanswer_sdk/models/create_pinecone_connector_request.py +97 -0
- qanswer_sdk/models/create_sharepoint_connector_from_certificate_request.py +105 -0
- qanswer_sdk/models/create_sharepoint_connector_request.py +103 -0
- qanswer_sdk/models/credits_info_global_dto.py +97 -0
- qanswer_sdk/models/credits_info_organization_dto.py +95 -0
- qanswer_sdk/models/currency.py +38 -0
- qanswer_sdk/models/data_filling_mode.py +39 -0
- qanswer_sdk/models/data_storage_preference.py +38 -0
- qanswer_sdk/models/dataset_config_request.py +138 -0
- qanswer_sdk/models/dataset_default_values_model.py +138 -0
- qanswer_sdk/models/dataset_detail.py +137 -0
- qanswer_sdk/models/dataset_detail_kg.py +97 -0
- qanswer_sdk/models/dataset_schema.py +242 -0
- qanswer_sdk/models/dataset_size_response.py +91 -0
- qanswer_sdk/models/dataset_type.py +38 -0
- qanswer_sdk/models/dataset_update_object.py +216 -0
- qanswer_sdk/models/dataset_users_response.py +87 -0
- qanswer_sdk/models/default_prompt.py +106 -0
- qanswer_sdk/models/delete_connector_model.py +96 -0
- qanswer_sdk/models/delete_connector_request.py +99 -0
- qanswer_sdk/models/delete_connectors_response.py +89 -0
- qanswer_sdk/models/delete_files_status_response.py +91 -0
- qanswer_sdk/models/delete_index.py +91 -0
- qanswer_sdk/models/delete_index_resp.py +89 -0
- qanswer_sdk/models/delete_qn_a_pair_request.py +95 -0
- qanswer_sdk/models/delete_qn_a_pair_response.py +89 -0
- qanswer_sdk/models/delete_synonym.py +93 -0
- qanswer_sdk/models/delete_synonym_resp.py +89 -0
- qanswer_sdk/models/delete_synonyms.py +91 -0
- qanswer_sdk/models/delete_user_response.py +89 -0
- qanswer_sdk/models/diarization_queue_status.py +99 -0
- qanswer_sdk/models/document_content_response.py +91 -0
- qanswer_sdk/models/document_content_update_model.py +99 -0
- qanswer_sdk/models/document_file_delete_by_connector_model.py +101 -0
- qanswer_sdk/models/document_file_delete_by_id_model.py +91 -0
- qanswer_sdk/models/document_metadata.py +173 -0
- qanswer_sdk/models/document_metadata_list_wrapper.py +100 -0
- qanswer_sdk/models/document_parsing_task_settings.py +130 -0
- qanswer_sdk/models/document_parsing_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/document_parsing_task_update.py +127 -0
- qanswer_sdk/models/document_status_response.py +89 -0
- qanswer_sdk/models/dummy_error.py +89 -0
- qanswer_sdk/models/duplicate_report_template_payload.py +97 -0
- qanswer_sdk/models/duplicate_report_template_response.py +87 -0
- qanswer_sdk/models/e_consilium_connector_config.py +108 -0
- qanswer_sdk/models/e_consilium_search_index_search_response.py +113 -0
- qanswer_sdk/models/econsilium_file_metadata.py +105 -0
- qanswer_sdk/models/econsilium_search_index_add_payload.py +107 -0
- qanswer_sdk/models/econsilium_search_index_additional_fields.py +103 -0
- qanswer_sdk/models/email_folder.py +91 -0
- qanswer_sdk/models/email_request.py +87 -0
- qanswer_sdk/models/embedder_cost_entry.py +91 -0
- qanswer_sdk/models/embedder_cost_filter.py +112 -0
- qanswer_sdk/models/embedder_cost_list.py +111 -0
- qanswer_sdk/models/embedder_create_dto.py +149 -0
- qanswer_sdk/models/embedder_detailed_dto.py +171 -0
- qanswer_sdk/models/embedder_dto.py +101 -0
- qanswer_sdk/models/embedder_list_dto.py +101 -0
- qanswer_sdk/models/embedder_update_dto.py +143 -0
- qanswer_sdk/models/embedding_endpoint.py +149 -0
- qanswer_sdk/models/embedding_endpoint_create.py +147 -0
- qanswer_sdk/models/embedding_endpoint_export_payload.py +87 -0
- qanswer_sdk/models/embedding_endpoint_import_failure.py +89 -0
- qanswer_sdk/models/embedding_endpoint_import_response.py +99 -0
- qanswer_sdk/models/embedding_endpoint_modality.py +37 -0
- qanswer_sdk/models/embedding_endpoint_names_validation_payload.py +87 -0
- qanswer_sdk/models/embedding_endpoint_update.py +141 -0
- qanswer_sdk/models/embedding_endpoint_validation_response.py +96 -0
- qanswer_sdk/models/embedding_model.py +96 -0
- qanswer_sdk/models/embedding_provider.py +44 -0
- qanswer_sdk/models/enable_enhanced_context_payload.py +91 -0
- qanswer_sdk/models/enable_enhanced_context_response.py +87 -0
- qanswer_sdk/models/endpoint_status.py +38 -0
- qanswer_sdk/models/entity_description.py +93 -0
- qanswer_sdk/models/entity_description_dto.py +93 -0
- qanswer_sdk/models/entity_linking_payload.py +97 -0
- qanswer_sdk/models/entity_linking_response.py +97 -0
- qanswer_sdk/models/entity_model_in_linking.py +95 -0
- qanswer_sdk/models/es_meta_data.py +98 -0
- qanswer_sdk/models/es_meta_data_value.py +87 -0
- qanswer_sdk/models/evaluate_feedback_response.py +109 -0
- qanswer_sdk/models/evaluate_single_feedback_response.py +97 -0
- qanswer_sdk/models/external_sources_quota_request.py +91 -0
- qanswer_sdk/models/external_sources_quota_response.py +89 -0
- qanswer_sdk/models/extra_body.py +91 -0
- qanswer_sdk/models/extract_hyper_links_payload.py +100 -0
- qanswer_sdk/models/extract_robot_links_payload.py +88 -0
- qanswer_sdk/models/extract_robot_links_response.py +88 -0
- qanswer_sdk/models/fact.py +96 -0
- qanswer_sdk/models/feedback_evaluation_history_entries_response.py +101 -0
- qanswer_sdk/models/feedback_evaluation_history_entry_model.py +105 -0
- qanswer_sdk/models/feedback_model.py +141 -0
- qanswer_sdk/models/feedback_response.py +95 -0
- qanswer_sdk/models/feedback_update.py +105 -0
- qanswer_sdk/models/file_es_meta_data.py +116 -0
- qanswer_sdk/models/file_failure_reason.py +48 -0
- qanswer_sdk/models/file_folder_model.py +115 -0
- qanswer_sdk/models/file_model.py +130 -0
- qanswer_sdk/models/file_status.py +43 -0
- qanswer_sdk/models/file_type.py +37 -0
- qanswer_sdk/models/file_upload_payload.py +107 -0
- qanswer_sdk/models/files_by_connector_model.py +89 -0
- qanswer_sdk/models/g_drive_connector_info.py +96 -0
- qanswer_sdk/models/g_drive_download_by_ids.py +89 -0
- qanswer_sdk/models/g_drive_download_request.py +103 -0
- qanswer_sdk/models/generate_ai_cells_by_dimension_payload.py +91 -0
- qanswer_sdk/models/generate_ai_cells_payload.py +95 -0
- qanswer_sdk/models/generation_params.py +89 -0
- qanswer_sdk/models/get_aggregations_payload.py +104 -0
- qanswer_sdk/models/get_connector_by_id_response.py +91 -0
- qanswer_sdk/models/get_conversation_response.py +95 -0
- qanswer_sdk/models/global_config_dto.py +135 -0
- qanswer_sdk/models/google_drive_connector_config.py +110 -0
- qanswer_sdk/models/guardrail_endpoint.py +121 -0
- qanswer_sdk/models/guardrail_mode.py +38 -0
- qanswer_sdk/models/highlight_audio_payload_model.py +109 -0
- qanswer_sdk/models/http_validation_error.py +95 -0
- qanswer_sdk/models/iframe_strategy.py +38 -0
- qanswer_sdk/models/image_url_detail.py +38 -0
- qanswer_sdk/models/imap_add_payload.py +105 -0
- qanswer_sdk/models/imap_additional_fields.py +101 -0
- qanswer_sdk/models/imap_file_metadata.py +114 -0
- qanswer_sdk/models/imap_search_response.py +113 -0
- qanswer_sdk/models/index_config.py +89 -0
- qanswer_sdk/models/install_response.py +89 -0
- qanswer_sdk/models/interface_origin.py +48 -0
- qanswer_sdk/models/ip2_geo_response.py +91 -0
- qanswer_sdk/models/is_enabled_response.py +87 -0
- qanswer_sdk/models/jwt_authentication_response.py +93 -0
- qanswer_sdk/models/label.py +89 -0
- qanswer_sdk/models/labeled_node.py +89 -0
- qanswer_sdk/models/language.py +42 -0
- qanswer_sdk/models/last_updated_template_conversation_id_response.py +87 -0
- qanswer_sdk/models/link.py +99 -0
- qanswer_sdk/models/link_extraction_response.py +97 -0
- qanswer_sdk/models/link_result_paginated.py +97 -0
- qanswer_sdk/models/linked_entity_model_in_linking.py +99 -0
- qanswer_sdk/models/linker.py +103 -0
- qanswer_sdk/models/linking_result_input.py +95 -0
- qanswer_sdk/models/linking_result_output.py +95 -0
- qanswer_sdk/models/links.py +99 -0
- qanswer_sdk/models/list_ai_templates_response.py +101 -0
- qanswer_sdk/models/list_connectors_response.py +95 -0
- qanswer_sdk/models/list_conversation_response.py +105 -0
- qanswer_sdk/models/list_feedback_response.py +105 -0
- qanswer_sdk/models/list_files_connector_response.py +107 -0
- qanswer_sdk/models/list_published_assistants_payload.py +115 -0
- qanswer_sdk/models/list_socket_events.py +95 -0
- qanswer_sdk/models/list_synonyms_model.py +95 -0
- qanswer_sdk/models/llm_context_ranges.py +93 -0
- qanswer_sdk/models/llm_context_ranges_response.py +93 -0
- qanswer_sdk/models/llm_cost_entry.py +97 -0
- qanswer_sdk/models/llm_cost_filter.py +112 -0
- qanswer_sdk/models/llm_cost_list.py +111 -0
- qanswer_sdk/models/llm_create_dto.py +208 -0
- qanswer_sdk/models/llm_detailed_dto.py +231 -0
- qanswer_sdk/models/llm_details.py +123 -0
- qanswer_sdk/models/llm_dto.py +147 -0
- qanswer_sdk/models/llm_endpoint.py +212 -0
- qanswer_sdk/models/llm_endpoint_create.py +204 -0
- qanswer_sdk/models/llm_endpoint_default_prompts.py +93 -0
- qanswer_sdk/models/llm_endpoint_export_payload.py +87 -0
- qanswer_sdk/models/llm_endpoint_import_failure.py +89 -0
- qanswer_sdk/models/llm_endpoint_import_response.py +99 -0
- qanswer_sdk/models/llm_endpoint_input.py +212 -0
- qanswer_sdk/models/llm_endpoint_modality.py +37 -0
- qanswer_sdk/models/llm_endpoint_names_validation_payload.py +87 -0
- qanswer_sdk/models/llm_endpoint_provider.py +44 -0
- qanswer_sdk/models/llm_endpoint_read_input.py +212 -0
- qanswer_sdk/models/llm_endpoint_read_output.py +212 -0
- qanswer_sdk/models/llm_endpoint_update.py +204 -0
- qanswer_sdk/models/llm_endpoint_usage_migration_response.py +93 -0
- qanswer_sdk/models/llm_endpoint_validation_response.py +96 -0
- qanswer_sdk/models/llm_filter_dto.py +111 -0
- qanswer_sdk/models/llm_health_response.py +89 -0
- qanswer_sdk/models/llm_list_detailed_dto.py +101 -0
- qanswer_sdk/models/llm_list_dto.py +101 -0
- qanswer_sdk/models/llm_update_dto.py +208 -0
- qanswer_sdk/models/llm_usage_origin.py +63 -0
- qanswer_sdk/models/location_details.py +97 -0
- qanswer_sdk/models/log_request.py +125 -0
- qanswer_sdk/models/login_request.py +89 -0
- qanswer_sdk/models/logs_visibility_policy.py +38 -0
- qanswer_sdk/models/logs_visibility_policy_payload.py +98 -0
- qanswer_sdk/models/logs_visibility_policy_response.py +98 -0
- qanswer_sdk/models/mcp_authentication_type.py +39 -0
- qanswer_sdk/models/mcp_connection.py +105 -0
- qanswer_sdk/models/mcp_connection_create.py +98 -0
- qanswer_sdk/models/mcp_server.py +167 -0
- qanswer_sdk/models/mcp_server0.py +167 -0
- qanswer_sdk/models/mcp_server_create.py +133 -0
- qanswer_sdk/models/mcp_server_dto.py +167 -0
- qanswer_sdk/models/mcp_server_type.py +37 -0
- qanswer_sdk/models/mcp_server_update.py +131 -0
- qanswer_sdk/models/mcp_tool_dto.py +141 -0
- qanswer_sdk/models/mcp_tool_info.py +95 -0
- qanswer_sdk/models/mcp_tool_selection_source.py +37 -0
- qanswer_sdk/models/mcp_tool_update.py +91 -0
- qanswer_sdk/models/mcp_transport.py +37 -0
- qanswer_sdk/models/mcp_visibility.py +38 -0
- qanswer_sdk/models/mcpo_auth2_initiating_origin.py +42 -0
- qanswer_sdk/models/message_role.py +38 -0
- qanswer_sdk/models/messages_stats_per_day_response.py +99 -0
- qanswer_sdk/models/microsoft_connector_config.py +110 -0
- qanswer_sdk/models/modify_connector_request.py +107 -0
- qanswer_sdk/models/modify_file_display_name_request.py +97 -0
- qanswer_sdk/models/notification_dto.py +137 -0
- qanswer_sdk/models/notification_filter.py +116 -0
- qanswer_sdk/models/notification_list_dto.py +101 -0
- qanswer_sdk/models/notification_payload_add_to_org_dto.py +87 -0
- qanswer_sdk/models/notification_payload_add_to_team_dto.py +89 -0
- qanswer_sdk/models/notification_payload_ai_assistant_shared_dto.py +109 -0
- qanswer_sdk/models/notification_payload_conversation_shared_dto.py +105 -0
- qanswer_sdk/models/notification_payload_dto.py +193 -0
- qanswer_sdk/models/notification_payload_human_takeover_requested_dto.py +89 -0
- qanswer_sdk/models/notification_payload_quota_reaching_dto.py +91 -0
- qanswer_sdk/models/notification_read_dto.py +89 -0
- qanswer_sdk/models/notification_type.py +44 -0
- qanswer_sdk/models/o_auth_redirect_response.py +89 -0
- qanswer_sdk/models/o_auth_service_dto.py +89 -0
- qanswer_sdk/models/one_drive_download_by_ids.py +89 -0
- qanswer_sdk/models/one_drive_download_request.py +103 -0
- qanswer_sdk/models/one_note_download_by_ids.py +91 -0
- qanswer_sdk/models/one_note_download_request.py +103 -0
- qanswer_sdk/models/org_llm_detailed_dto.py +105 -0
- qanswer_sdk/models/organization.py +93 -0
- qanswer_sdk/models/organization_creation.py +91 -0
- qanswer_sdk/models/organization_dto.py +93 -0
- qanswer_sdk/models/organization_filter_dto.py +134 -0
- qanswer_sdk/models/organization_list_dto.py +101 -0
- qanswer_sdk/models/paginated_report_templates.py +101 -0
- qanswer_sdk/models/password.py +89 -0
- qanswer_sdk/models/pinecone_index_model.py +91 -0
- qanswer_sdk/models/plan_dto.py +132 -0
- qanswer_sdk/models/predicted_class.py +89 -0
- qanswer_sdk/models/prepare_synonyms_upload_resp.py +99 -0
- qanswer_sdk/models/prepared_synonym_group.py +87 -0
- qanswer_sdk/models/pricing_plan.py +51 -0
- qanswer_sdk/models/pricing_type.py +38 -0
- qanswer_sdk/models/prompt_type.py +51 -0
- qanswer_sdk/models/provider.py +87 -0
- qanswer_sdk/models/publication_add_payload.py +105 -0
- qanswer_sdk/models/publication_file_metadata.py +105 -0
- qanswer_sdk/models/publication_office_additional_fields.py +111 -0
- qanswer_sdk/models/publication_office_connector_config.py +110 -0
- qanswer_sdk/models/publication_search_index_search_response.py +113 -0
- qanswer_sdk/models/published_assistant_from_java.py +94 -0
- qanswer_sdk/models/put_cell_payload.py +89 -0
- qanswer_sdk/models/qa_context.py +129 -0
- qanswer_sdk/models/qa_context_display_type.py +44 -0
- qanswer_sdk/models/qa_contexts.py +116 -0
- qanswer_sdk/models/qa_table.py +100 -0
- qanswer_sdk/models/qn_a_pair_model.py +103 -0
- qanswer_sdk/models/qn_a_pair_response.py +95 -0
- qanswer_sdk/models/question_suggestion_response.py +87 -0
- qanswer_sdk/models/rag_params.py +89 -0
- qanswer_sdk/models/rag_payload.py +186 -0
- qanswer_sdk/models/rag_response.py +155 -0
- qanswer_sdk/models/rdf_entity_linker_response.py +99 -0
- qanswer_sdk/models/rdf_linked_entity.py +97 -0
- qanswer_sdk/models/reasoning_effort.py +39 -0
- qanswer_sdk/models/reference_model.py +99 -0
- qanswer_sdk/models/refresh_frequency.py +39 -0
- qanswer_sdk/models/refresh_token_request.py +87 -0
- qanswer_sdk/models/refresh_website_connector_payload.py +94 -0
- qanswer_sdk/models/register_pinecone_connector_request.py +95 -0
- qanswer_sdk/models/report_copilot_generation_from_slots_ack.py +91 -0
- qanswer_sdk/models/report_copilot_generation_from_slots_payload.py +95 -0
- qanswer_sdk/models/report_copilot_refinement_payload.py +106 -0
- qanswer_sdk/models/report_copilot_refinement_response.py +87 -0
- qanswer_sdk/models/report_copilot_slot_feedback_update.py +95 -0
- qanswer_sdk/models/report_copilot_slot_feedback_update_response.py +95 -0
- qanswer_sdk/models/report_copilot_slot_task_settings.py +127 -0
- qanswer_sdk/models/report_copilot_slot_task_settings_update.py +127 -0
- qanswer_sdk/models/report_copilot_task_settings.py +125 -0
- qanswer_sdk/models/report_copilot_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/report_copilot_task_update.py +125 -0
- qanswer_sdk/models/report_template.py +139 -0
- qanswer_sdk/models/report_template_create_payload.py +117 -0
- qanswer_sdk/models/report_template_image_upload_response.py +87 -0
- qanswer_sdk/models/report_template_simplified.py +115 -0
- qanswer_sdk/models/report_template_simplified_payload.py +91 -0
- qanswer_sdk/models/report_template_task_settings_update_payload.py +91 -0
- qanswer_sdk/models/report_template_update_payload.py +121 -0
- qanswer_sdk/models/report_templates_search_payload.py +106 -0
- qanswer_sdk/models/reset_password.py +87 -0
- qanswer_sdk/models/response_audit_model.py +99 -0
- qanswer_sdk/models/response_audit_stats_response.py +101 -0
- qanswer_sdk/models/response_get_dummy_union_connector_config_model_backend_api_connectors_config_dummy_models_union_get.py +228 -0
- qanswer_sdk/models/retreive_all_synonyms_resp.py +99 -0
- qanswer_sdk/models/retry_params.py +89 -0
- qanswer_sdk/models/return_type.py +38 -0
- qanswer_sdk/models/role.py +99 -0
- qanswer_sdk/models/role_name.py +37 -0
- qanswer_sdk/models/scrolling_strategy.py +37 -0
- qanswer_sdk/models/search_conversation_messages_response.py +105 -0
- qanswer_sdk/models/search_document_response.py +105 -0
- qanswer_sdk/models/search_index_payload.py +114 -0
- qanswer_sdk/models/search_metadata_filter.py +94 -0
- qanswer_sdk/models/search_payload.py +146 -0
- qanswer_sdk/models/search_response.py +125 -0
- qanswer_sdk/models/search_synonyms_resp.py +91 -0
- qanswer_sdk/models/search_task_settings.py +139 -0
- qanswer_sdk/models/search_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/search_task_update.py +137 -0
- qanswer_sdk/models/sender_type.py +38 -0
- qanswer_sdk/models/share_point_connector_settings.py +94 -0
- qanswer_sdk/models/share_point_download_by_ids.py +99 -0
- qanswer_sdk/models/share_point_download_request.py +103 -0
- qanswer_sdk/models/shared_by.py +38 -0
- qanswer_sdk/models/shared_entity_type.py +38 -0
- qanswer_sdk/models/shared_organization_access.py +125 -0
- qanswer_sdk/models/shared_organization_access_dto.py +125 -0
- qanswer_sdk/models/shared_team_access.py +125 -0
- qanswer_sdk/models/shared_team_access_dto.py +125 -0
- qanswer_sdk/models/shared_user.py +99 -0
- qanswer_sdk/models/sign_up_request.py +108 -0
- qanswer_sdk/models/signout_request.py +87 -0
- qanswer_sdk/models/slot.py +162 -0
- qanswer_sdk/models/slot_history_entry.py +127 -0
- qanswer_sdk/models/slot_in_prompt.py +91 -0
- qanswer_sdk/models/slot_info_with_latest_version.py +95 -0
- qanswer_sdk/models/slot_update.py +142 -0
- qanswer_sdk/models/socker_join_user.py +91 -0
- qanswer_sdk/models/socket_ai_cell_generation.py +99 -0
- qanswer_sdk/models/socket_conversation_message.py +280 -0
- qanswer_sdk/models/socket_events_q_answer.py +51 -0
- qanswer_sdk/models/socket_feedback_evaluation_progress.py +114 -0
- qanswer_sdk/models/socket_file_metadata.py +207 -0
- qanswer_sdk/models/socket_join_conversation.py +97 -0
- qanswer_sdk/models/socket_join_dataset.py +93 -0
- qanswer_sdk/models/socket_message_status.py +40 -0
- qanswer_sdk/models/socket_notification.py +127 -0
- qanswer_sdk/models/socket_report_continuation_response.py +106 -0
- qanswer_sdk/models/socket_report_copilot_generation_from_slots_response.py +122 -0
- qanswer_sdk/models/socket_report_copilot_generation_from_template_response.py +122 -0
- qanswer_sdk/models/socket_report_copilot_refinement_response.py +108 -0
- qanswer_sdk/models/socket_speech2_text_response.py +131 -0
- qanswer_sdk/models/socket_stop_conversation.py +97 -0
- qanswer_sdk/models/source.py +125 -0
- qanswer_sdk/models/source_metadata.py +109 -0
- qanswer_sdk/models/speech2_text_response.py +119 -0
- qanswer_sdk/models/stat_per_date.py +89 -0
- qanswer_sdk/models/status_response.py +89 -0
- qanswer_sdk/models/stop_template_generation_payload.py +91 -0
- qanswer_sdk/models/storage_active_status.py +37 -0
- qanswer_sdk/models/subscription_response.py +101 -0
- qanswer_sdk/models/subscription_status.py +39 -0
- qanswer_sdk/models/suggestion_list_response.py +87 -0
- qanswer_sdk/models/summa_server.py +101 -0
- qanswer_sdk/models/task_category.py +58 -0
- qanswer_sdk/models/task_name.py +43 -0
- qanswer_sdk/models/team.py +93 -0
- qanswer_sdk/models/team_creation.py +89 -0
- qanswer_sdk/models/team_creation_dto.py +89 -0
- qanswer_sdk/models/team_dto.py +93 -0
- qanswer_sdk/models/team_filter_dto.py +141 -0
- qanswer_sdk/models/team_list_dto.py +101 -0
- qanswer_sdk/models/template_clip_structure.py +114 -0
- qanswer_sdk/models/template_toggle_request.py +93 -0
- qanswer_sdk/models/terms_bucket.py +94 -0
- qanswer_sdk/models/test_imap_connection_payload.py +95 -0
- qanswer_sdk/models/text2_sparql_payload.py +188 -0
- qanswer_sdk/models/text2_sparql_task_settings.py +125 -0
- qanswer_sdk/models/text2_sparql_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/text2_sparql_task_update.py +125 -0
- qanswer_sdk/models/text_classification_payload.py +99 -0
- qanswer_sdk/models/text_classification_response.py +87 -0
- qanswer_sdk/models/text_classification_v2_payload.py +99 -0
- qanswer_sdk/models/text_classification_v2_response.py +95 -0
- qanswer_sdk/models/thinking_block.py +91 -0
- qanswer_sdk/models/tool_selection.py +89 -0
- qanswer_sdk/models/total_stat.py +96 -0
- qanswer_sdk/models/ui_mappings.py +141 -0
- qanswer_sdk/models/update_cells_payload.py +93 -0
- qanswer_sdk/models/update_file_es_meta_data.py +116 -0
- qanswer_sdk/models/update_metadata_model_input.py +97 -0
- qanswer_sdk/models/update_metadata_model_output.py +97 -0
- qanswer_sdk/models/update_qn_a_pair_request.py +101 -0
- qanswer_sdk/models/update_qn_a_pair_response.py +89 -0
- qanswer_sdk/models/update_synonyms.py +95 -0
- qanswer_sdk/models/update_synonyms_resp.py +89 -0
- qanswer_sdk/models/update_template_cells_payload.py +101 -0
- qanswer_sdk/models/upload_metadata.py +115 -0
- qanswer_sdk/models/user.py +91 -0
- qanswer_sdk/models/user_credits_config_dto.py +99 -0
- qanswer_sdk/models/user_credits_dto.py +106 -0
- qanswer_sdk/models/user_dataset_api_key.py +120 -0
- qanswer_sdk/models/user_dataset_api_key_dto.py +120 -0
- qanswer_sdk/models/user_dataset_mcp_tool_selection_dto.py +102 -0
- qanswer_sdk/models/user_dto.py +91 -0
- qanswer_sdk/models/user_filter_dto.py +155 -0
- qanswer_sdk/models/user_identity_availability.py +87 -0
- qanswer_sdk/models/user_info_dto.py +95 -0
- qanswer_sdk/models/user_list_dto.py +101 -0
- qanswer_sdk/models/user_log.py +102 -0
- qanswer_sdk/models/user_log_dto.py +102 -0
- qanswer_sdk/models/user_logs_list_dto.py +97 -0
- qanswer_sdk/models/user_mcp_tool_selection_dto.py +118 -0
- qanswer_sdk/models/user_oauth_token.py +96 -0
- qanswer_sdk/models/user_oauth_token_dto.py +96 -0
- qanswer_sdk/models/user_profile_dto.py +200 -0
- qanswer_sdk/models/user_profile_list_dto.py +101 -0
- qanswer_sdk/models/user_stat_per_date.py +90 -0
- qanswer_sdk/models/validation_error.py +108 -0
- qanswer_sdk/models/validation_error_loc_inner.py +138 -0
- qanswer_sdk/models/warn_visibility.py +40 -0
- qanswer_sdk/models/websearch_connector_config.py +102 -0
- qanswer_sdk/models/websearch_scraping_site.py +91 -0
- qanswer_sdk/models/website_add_payload.py +102 -0
- qanswer_sdk/models/website_connector_config.py +102 -0
- qanswer_sdk/models/website_connector_settings.py +160 -0
- qanswer_sdk/models/widget_configs.py +109 -0
- qanswer_sdk/py.typed +0 -0
- qanswer_sdk/rest.py +258 -0
- qanswer_sdk-0.46.0.dev0.dist-info/METADATA +252 -0
- qanswer_sdk-0.46.0.dev0.dist-info/RECORD +624 -0
- qanswer_sdk-0.46.0.dev0.dist-info/WHEEL +5 -0
- qanswer_sdk-0.46.0.dev0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,2829 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
free-text-client
|
|
5
|
+
|
|
6
|
+
QAnswer 2.0 API
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 2.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
import warnings
|
|
15
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
16
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
|
+
from typing_extensions import Annotated
|
|
18
|
+
|
|
19
|
+
from pydantic import Field
|
|
20
|
+
from typing import Optional
|
|
21
|
+
from typing_extensions import Annotated
|
|
22
|
+
from qanswer_sdk.models.create_connector_request import CreateConnectorRequest
|
|
23
|
+
from qanswer_sdk.models.create_connector_response import CreateConnectorResponse
|
|
24
|
+
from qanswer_sdk.models.extract_hyper_links_payload import ExtractHyperLinksPayload
|
|
25
|
+
from qanswer_sdk.models.extract_robot_links_payload import ExtractRobotLinksPayload
|
|
26
|
+
from qanswer_sdk.models.extract_robot_links_response import ExtractRobotLinksResponse
|
|
27
|
+
from qanswer_sdk.models.link_extraction_response import LinkExtractionResponse
|
|
28
|
+
from qanswer_sdk.models.refresh_website_connector_payload import RefreshWebsiteConnectorPayload
|
|
29
|
+
from qanswer_sdk.models.status_response import StatusResponse
|
|
30
|
+
from qanswer_sdk.models.website_add_payload import WebsiteAddPayload
|
|
31
|
+
from qanswer_sdk.models.website_connector_settings import WebsiteConnectorSettings
|
|
32
|
+
|
|
33
|
+
from qanswer_sdk.api_client import ApiClient, RequestSerialized
|
|
34
|
+
from qanswer_sdk.api_response import ApiResponse
|
|
35
|
+
from qanswer_sdk.rest import RESTResponseType
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class ConnectorWebsiteApi:
|
|
39
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
40
|
+
Ref: https://openapi-generator.tech
|
|
41
|
+
|
|
42
|
+
Do not edit the class manually.
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
def __init__(self, api_client=None) -> None:
|
|
46
|
+
if api_client is None:
|
|
47
|
+
api_client = ApiClient.get_default()
|
|
48
|
+
self.api_client = api_client
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
@validate_call
|
|
52
|
+
def add_websites_sync(
|
|
53
|
+
self,
|
|
54
|
+
website_add_payload: WebsiteAddPayload,
|
|
55
|
+
_request_timeout: Union[
|
|
56
|
+
None,
|
|
57
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
58
|
+
Tuple[
|
|
59
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
60
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
61
|
+
]
|
|
62
|
+
] = None,
|
|
63
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
64
|
+
_content_type: Optional[StrictStr] = None,
|
|
65
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
66
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
67
|
+
) -> StatusResponse:
|
|
68
|
+
"""Add Websites Sync
|
|
69
|
+
|
|
70
|
+
Add Websites to a Website Connector Synchronously
|
|
71
|
+
|
|
72
|
+
:param website_add_payload: (required)
|
|
73
|
+
:type website_add_payload: WebsiteAddPayload
|
|
74
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
75
|
+
number provided, it will be total request
|
|
76
|
+
timeout. It can also be a pair (tuple) of
|
|
77
|
+
(connection, read) timeouts.
|
|
78
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
79
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
80
|
+
request; this effectively ignores the
|
|
81
|
+
authentication in the spec for a single request.
|
|
82
|
+
:type _request_auth: dict, optional
|
|
83
|
+
:param _content_type: force content-type for the request.
|
|
84
|
+
:type _content_type: str, Optional
|
|
85
|
+
:param _headers: set to override the headers for a single
|
|
86
|
+
request; this effectively ignores the headers
|
|
87
|
+
in the spec for a single request.
|
|
88
|
+
:type _headers: dict, optional
|
|
89
|
+
:param _host_index: set to override the host_index for a single
|
|
90
|
+
request; this effectively ignores the host_index
|
|
91
|
+
in the spec for a single request.
|
|
92
|
+
:type _host_index: int, optional
|
|
93
|
+
:return: Returns the result object.
|
|
94
|
+
""" # noqa: E501
|
|
95
|
+
|
|
96
|
+
_param = self._add_websites_sync_serialize(
|
|
97
|
+
website_add_payload=website_add_payload,
|
|
98
|
+
_request_auth=_request_auth,
|
|
99
|
+
_content_type=_content_type,
|
|
100
|
+
_headers=_headers,
|
|
101
|
+
_host_index=_host_index
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
105
|
+
'200': "StatusResponse",
|
|
106
|
+
'422': "HTTPValidationError",
|
|
107
|
+
}
|
|
108
|
+
response_data = self.api_client.call_api(
|
|
109
|
+
*_param,
|
|
110
|
+
_request_timeout=_request_timeout
|
|
111
|
+
)
|
|
112
|
+
response_data.read()
|
|
113
|
+
return self.api_client.response_deserialize(
|
|
114
|
+
response_data=response_data,
|
|
115
|
+
response_types_map=_response_types_map,
|
|
116
|
+
).data
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
@validate_call
|
|
120
|
+
def add_websites_sync_with_http_info(
|
|
121
|
+
self,
|
|
122
|
+
website_add_payload: WebsiteAddPayload,
|
|
123
|
+
_request_timeout: Union[
|
|
124
|
+
None,
|
|
125
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
126
|
+
Tuple[
|
|
127
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
128
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
129
|
+
]
|
|
130
|
+
] = None,
|
|
131
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
132
|
+
_content_type: Optional[StrictStr] = None,
|
|
133
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
134
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
135
|
+
) -> ApiResponse[StatusResponse]:
|
|
136
|
+
"""Add Websites Sync
|
|
137
|
+
|
|
138
|
+
Add Websites to a Website Connector Synchronously
|
|
139
|
+
|
|
140
|
+
:param website_add_payload: (required)
|
|
141
|
+
:type website_add_payload: WebsiteAddPayload
|
|
142
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
143
|
+
number provided, it will be total request
|
|
144
|
+
timeout. It can also be a pair (tuple) of
|
|
145
|
+
(connection, read) timeouts.
|
|
146
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
147
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
148
|
+
request; this effectively ignores the
|
|
149
|
+
authentication in the spec for a single request.
|
|
150
|
+
:type _request_auth: dict, optional
|
|
151
|
+
:param _content_type: force content-type for the request.
|
|
152
|
+
:type _content_type: str, Optional
|
|
153
|
+
:param _headers: set to override the headers for a single
|
|
154
|
+
request; this effectively ignores the headers
|
|
155
|
+
in the spec for a single request.
|
|
156
|
+
:type _headers: dict, optional
|
|
157
|
+
:param _host_index: set to override the host_index for a single
|
|
158
|
+
request; this effectively ignores the host_index
|
|
159
|
+
in the spec for a single request.
|
|
160
|
+
:type _host_index: int, optional
|
|
161
|
+
:return: Returns the result object.
|
|
162
|
+
""" # noqa: E501
|
|
163
|
+
|
|
164
|
+
_param = self._add_websites_sync_serialize(
|
|
165
|
+
website_add_payload=website_add_payload,
|
|
166
|
+
_request_auth=_request_auth,
|
|
167
|
+
_content_type=_content_type,
|
|
168
|
+
_headers=_headers,
|
|
169
|
+
_host_index=_host_index
|
|
170
|
+
)
|
|
171
|
+
|
|
172
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
173
|
+
'200': "StatusResponse",
|
|
174
|
+
'422': "HTTPValidationError",
|
|
175
|
+
}
|
|
176
|
+
response_data = self.api_client.call_api(
|
|
177
|
+
*_param,
|
|
178
|
+
_request_timeout=_request_timeout
|
|
179
|
+
)
|
|
180
|
+
response_data.read()
|
|
181
|
+
return self.api_client.response_deserialize(
|
|
182
|
+
response_data=response_data,
|
|
183
|
+
response_types_map=_response_types_map,
|
|
184
|
+
)
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
@validate_call
|
|
188
|
+
def add_websites_sync_without_preload_content(
|
|
189
|
+
self,
|
|
190
|
+
website_add_payload: WebsiteAddPayload,
|
|
191
|
+
_request_timeout: Union[
|
|
192
|
+
None,
|
|
193
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
194
|
+
Tuple[
|
|
195
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
196
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
197
|
+
]
|
|
198
|
+
] = None,
|
|
199
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
200
|
+
_content_type: Optional[StrictStr] = None,
|
|
201
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
202
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
203
|
+
) -> RESTResponseType:
|
|
204
|
+
"""Add Websites Sync
|
|
205
|
+
|
|
206
|
+
Add Websites to a Website Connector Synchronously
|
|
207
|
+
|
|
208
|
+
:param website_add_payload: (required)
|
|
209
|
+
:type website_add_payload: WebsiteAddPayload
|
|
210
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
211
|
+
number provided, it will be total request
|
|
212
|
+
timeout. It can also be a pair (tuple) of
|
|
213
|
+
(connection, read) timeouts.
|
|
214
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
215
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
216
|
+
request; this effectively ignores the
|
|
217
|
+
authentication in the spec for a single request.
|
|
218
|
+
:type _request_auth: dict, optional
|
|
219
|
+
:param _content_type: force content-type for the request.
|
|
220
|
+
:type _content_type: str, Optional
|
|
221
|
+
:param _headers: set to override the headers for a single
|
|
222
|
+
request; this effectively ignores the headers
|
|
223
|
+
in the spec for a single request.
|
|
224
|
+
:type _headers: dict, optional
|
|
225
|
+
:param _host_index: set to override the host_index for a single
|
|
226
|
+
request; this effectively ignores the host_index
|
|
227
|
+
in the spec for a single request.
|
|
228
|
+
:type _host_index: int, optional
|
|
229
|
+
:return: Returns the result object.
|
|
230
|
+
""" # noqa: E501
|
|
231
|
+
|
|
232
|
+
_param = self._add_websites_sync_serialize(
|
|
233
|
+
website_add_payload=website_add_payload,
|
|
234
|
+
_request_auth=_request_auth,
|
|
235
|
+
_content_type=_content_type,
|
|
236
|
+
_headers=_headers,
|
|
237
|
+
_host_index=_host_index
|
|
238
|
+
)
|
|
239
|
+
|
|
240
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
241
|
+
'200': "StatusResponse",
|
|
242
|
+
'422': "HTTPValidationError",
|
|
243
|
+
}
|
|
244
|
+
response_data = self.api_client.call_api(
|
|
245
|
+
*_param,
|
|
246
|
+
_request_timeout=_request_timeout
|
|
247
|
+
)
|
|
248
|
+
return response_data.response
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
def _add_websites_sync_serialize(
|
|
252
|
+
self,
|
|
253
|
+
website_add_payload,
|
|
254
|
+
_request_auth,
|
|
255
|
+
_content_type,
|
|
256
|
+
_headers,
|
|
257
|
+
_host_index,
|
|
258
|
+
) -> RequestSerialized:
|
|
259
|
+
|
|
260
|
+
_host = None
|
|
261
|
+
|
|
262
|
+
_collection_formats: Dict[str, str] = {
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
_path_params: Dict[str, str] = {}
|
|
266
|
+
_query_params: List[Tuple[str, str]] = []
|
|
267
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
268
|
+
_form_params: List[Tuple[str, str]] = []
|
|
269
|
+
_files: Dict[
|
|
270
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
271
|
+
] = {}
|
|
272
|
+
_body_params: Optional[bytes] = None
|
|
273
|
+
|
|
274
|
+
# process the path parameters
|
|
275
|
+
# process the query parameters
|
|
276
|
+
# process the header parameters
|
|
277
|
+
# process the form parameters
|
|
278
|
+
# process the body parameter
|
|
279
|
+
if website_add_payload is not None:
|
|
280
|
+
_body_params = website_add_payload
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
# set the HTTP header `Accept`
|
|
284
|
+
if 'Accept' not in _header_params:
|
|
285
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
286
|
+
[
|
|
287
|
+
'application/json'
|
|
288
|
+
]
|
|
289
|
+
)
|
|
290
|
+
|
|
291
|
+
# set the HTTP header `Content-Type`
|
|
292
|
+
if _content_type:
|
|
293
|
+
_header_params['Content-Type'] = _content_type
|
|
294
|
+
else:
|
|
295
|
+
_default_content_type = (
|
|
296
|
+
self.api_client.select_header_content_type(
|
|
297
|
+
[
|
|
298
|
+
'application/json'
|
|
299
|
+
]
|
|
300
|
+
)
|
|
301
|
+
)
|
|
302
|
+
if _default_content_type is not None:
|
|
303
|
+
_header_params['Content-Type'] = _default_content_type
|
|
304
|
+
|
|
305
|
+
# authentication setting
|
|
306
|
+
_auth_settings: List[str] = [
|
|
307
|
+
'QAnswer-Api-Key',
|
|
308
|
+
'Bearer token'
|
|
309
|
+
]
|
|
310
|
+
|
|
311
|
+
return self.api_client.param_serialize(
|
|
312
|
+
method='POST',
|
|
313
|
+
resource_path='/backend/api/connectors/website/add-sync',
|
|
314
|
+
path_params=_path_params,
|
|
315
|
+
query_params=_query_params,
|
|
316
|
+
header_params=_header_params,
|
|
317
|
+
body=_body_params,
|
|
318
|
+
post_params=_form_params,
|
|
319
|
+
files=_files,
|
|
320
|
+
auth_settings=_auth_settings,
|
|
321
|
+
collection_formats=_collection_formats,
|
|
322
|
+
_host=_host,
|
|
323
|
+
_request_auth=_request_auth
|
|
324
|
+
)
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
@validate_call
|
|
330
|
+
def retry_failed_websites(
|
|
331
|
+
self,
|
|
332
|
+
refresh_website_connector_payload: RefreshWebsiteConnectorPayload,
|
|
333
|
+
_request_timeout: Union[
|
|
334
|
+
None,
|
|
335
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
336
|
+
Tuple[
|
|
337
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
338
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
339
|
+
]
|
|
340
|
+
] = None,
|
|
341
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
342
|
+
_content_type: Optional[StrictStr] = None,
|
|
343
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
344
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
345
|
+
) -> StatusResponse:
|
|
346
|
+
"""Retry Failed Websites
|
|
347
|
+
|
|
348
|
+
Retry all failed websites in a connector.
|
|
349
|
+
|
|
350
|
+
:param refresh_website_connector_payload: (required)
|
|
351
|
+
:type refresh_website_connector_payload: RefreshWebsiteConnectorPayload
|
|
352
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
353
|
+
number provided, it will be total request
|
|
354
|
+
timeout. It can also be a pair (tuple) of
|
|
355
|
+
(connection, read) timeouts.
|
|
356
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
357
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
358
|
+
request; this effectively ignores the
|
|
359
|
+
authentication in the spec for a single request.
|
|
360
|
+
:type _request_auth: dict, optional
|
|
361
|
+
:param _content_type: force content-type for the request.
|
|
362
|
+
:type _content_type: str, Optional
|
|
363
|
+
:param _headers: set to override the headers for a single
|
|
364
|
+
request; this effectively ignores the headers
|
|
365
|
+
in the spec for a single request.
|
|
366
|
+
:type _headers: dict, optional
|
|
367
|
+
:param _host_index: set to override the host_index for a single
|
|
368
|
+
request; this effectively ignores the host_index
|
|
369
|
+
in the spec for a single request.
|
|
370
|
+
:type _host_index: int, optional
|
|
371
|
+
:return: Returns the result object.
|
|
372
|
+
""" # noqa: E501
|
|
373
|
+
|
|
374
|
+
_param = self._retry_failed_websites_serialize(
|
|
375
|
+
refresh_website_connector_payload=refresh_website_connector_payload,
|
|
376
|
+
_request_auth=_request_auth,
|
|
377
|
+
_content_type=_content_type,
|
|
378
|
+
_headers=_headers,
|
|
379
|
+
_host_index=_host_index
|
|
380
|
+
)
|
|
381
|
+
|
|
382
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
383
|
+
'200': "StatusResponse",
|
|
384
|
+
'422': "HTTPValidationError",
|
|
385
|
+
}
|
|
386
|
+
response_data = self.api_client.call_api(
|
|
387
|
+
*_param,
|
|
388
|
+
_request_timeout=_request_timeout
|
|
389
|
+
)
|
|
390
|
+
response_data.read()
|
|
391
|
+
return self.api_client.response_deserialize(
|
|
392
|
+
response_data=response_data,
|
|
393
|
+
response_types_map=_response_types_map,
|
|
394
|
+
).data
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
@validate_call
|
|
398
|
+
def retry_failed_websites_with_http_info(
|
|
399
|
+
self,
|
|
400
|
+
refresh_website_connector_payload: RefreshWebsiteConnectorPayload,
|
|
401
|
+
_request_timeout: Union[
|
|
402
|
+
None,
|
|
403
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
404
|
+
Tuple[
|
|
405
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
406
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
407
|
+
]
|
|
408
|
+
] = None,
|
|
409
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
410
|
+
_content_type: Optional[StrictStr] = None,
|
|
411
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
412
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
413
|
+
) -> ApiResponse[StatusResponse]:
|
|
414
|
+
"""Retry Failed Websites
|
|
415
|
+
|
|
416
|
+
Retry all failed websites in a connector.
|
|
417
|
+
|
|
418
|
+
:param refresh_website_connector_payload: (required)
|
|
419
|
+
:type refresh_website_connector_payload: RefreshWebsiteConnectorPayload
|
|
420
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
421
|
+
number provided, it will be total request
|
|
422
|
+
timeout. It can also be a pair (tuple) of
|
|
423
|
+
(connection, read) timeouts.
|
|
424
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
425
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
426
|
+
request; this effectively ignores the
|
|
427
|
+
authentication in the spec for a single request.
|
|
428
|
+
:type _request_auth: dict, optional
|
|
429
|
+
:param _content_type: force content-type for the request.
|
|
430
|
+
:type _content_type: str, Optional
|
|
431
|
+
:param _headers: set to override the headers for a single
|
|
432
|
+
request; this effectively ignores the headers
|
|
433
|
+
in the spec for a single request.
|
|
434
|
+
:type _headers: dict, optional
|
|
435
|
+
:param _host_index: set to override the host_index for a single
|
|
436
|
+
request; this effectively ignores the host_index
|
|
437
|
+
in the spec for a single request.
|
|
438
|
+
:type _host_index: int, optional
|
|
439
|
+
:return: Returns the result object.
|
|
440
|
+
""" # noqa: E501
|
|
441
|
+
|
|
442
|
+
_param = self._retry_failed_websites_serialize(
|
|
443
|
+
refresh_website_connector_payload=refresh_website_connector_payload,
|
|
444
|
+
_request_auth=_request_auth,
|
|
445
|
+
_content_type=_content_type,
|
|
446
|
+
_headers=_headers,
|
|
447
|
+
_host_index=_host_index
|
|
448
|
+
)
|
|
449
|
+
|
|
450
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
451
|
+
'200': "StatusResponse",
|
|
452
|
+
'422': "HTTPValidationError",
|
|
453
|
+
}
|
|
454
|
+
response_data = self.api_client.call_api(
|
|
455
|
+
*_param,
|
|
456
|
+
_request_timeout=_request_timeout
|
|
457
|
+
)
|
|
458
|
+
response_data.read()
|
|
459
|
+
return self.api_client.response_deserialize(
|
|
460
|
+
response_data=response_data,
|
|
461
|
+
response_types_map=_response_types_map,
|
|
462
|
+
)
|
|
463
|
+
|
|
464
|
+
|
|
465
|
+
@validate_call
|
|
466
|
+
def retry_failed_websites_without_preload_content(
|
|
467
|
+
self,
|
|
468
|
+
refresh_website_connector_payload: RefreshWebsiteConnectorPayload,
|
|
469
|
+
_request_timeout: Union[
|
|
470
|
+
None,
|
|
471
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
472
|
+
Tuple[
|
|
473
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
474
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
475
|
+
]
|
|
476
|
+
] = None,
|
|
477
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
478
|
+
_content_type: Optional[StrictStr] = None,
|
|
479
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
480
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
481
|
+
) -> RESTResponseType:
|
|
482
|
+
"""Retry Failed Websites
|
|
483
|
+
|
|
484
|
+
Retry all failed websites in a connector.
|
|
485
|
+
|
|
486
|
+
:param refresh_website_connector_payload: (required)
|
|
487
|
+
:type refresh_website_connector_payload: RefreshWebsiteConnectorPayload
|
|
488
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
489
|
+
number provided, it will be total request
|
|
490
|
+
timeout. It can also be a pair (tuple) of
|
|
491
|
+
(connection, read) timeouts.
|
|
492
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
493
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
494
|
+
request; this effectively ignores the
|
|
495
|
+
authentication in the spec for a single request.
|
|
496
|
+
:type _request_auth: dict, optional
|
|
497
|
+
:param _content_type: force content-type for the request.
|
|
498
|
+
:type _content_type: str, Optional
|
|
499
|
+
:param _headers: set to override the headers for a single
|
|
500
|
+
request; this effectively ignores the headers
|
|
501
|
+
in the spec for a single request.
|
|
502
|
+
:type _headers: dict, optional
|
|
503
|
+
:param _host_index: set to override the host_index for a single
|
|
504
|
+
request; this effectively ignores the host_index
|
|
505
|
+
in the spec for a single request.
|
|
506
|
+
:type _host_index: int, optional
|
|
507
|
+
:return: Returns the result object.
|
|
508
|
+
""" # noqa: E501
|
|
509
|
+
|
|
510
|
+
_param = self._retry_failed_websites_serialize(
|
|
511
|
+
refresh_website_connector_payload=refresh_website_connector_payload,
|
|
512
|
+
_request_auth=_request_auth,
|
|
513
|
+
_content_type=_content_type,
|
|
514
|
+
_headers=_headers,
|
|
515
|
+
_host_index=_host_index
|
|
516
|
+
)
|
|
517
|
+
|
|
518
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
519
|
+
'200': "StatusResponse",
|
|
520
|
+
'422': "HTTPValidationError",
|
|
521
|
+
}
|
|
522
|
+
response_data = self.api_client.call_api(
|
|
523
|
+
*_param,
|
|
524
|
+
_request_timeout=_request_timeout
|
|
525
|
+
)
|
|
526
|
+
return response_data.response
|
|
527
|
+
|
|
528
|
+
|
|
529
|
+
def _retry_failed_websites_serialize(
|
|
530
|
+
self,
|
|
531
|
+
refresh_website_connector_payload,
|
|
532
|
+
_request_auth,
|
|
533
|
+
_content_type,
|
|
534
|
+
_headers,
|
|
535
|
+
_host_index,
|
|
536
|
+
) -> RequestSerialized:
|
|
537
|
+
|
|
538
|
+
_host = None
|
|
539
|
+
|
|
540
|
+
_collection_formats: Dict[str, str] = {
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
_path_params: Dict[str, str] = {}
|
|
544
|
+
_query_params: List[Tuple[str, str]] = []
|
|
545
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
546
|
+
_form_params: List[Tuple[str, str]] = []
|
|
547
|
+
_files: Dict[
|
|
548
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
549
|
+
] = {}
|
|
550
|
+
_body_params: Optional[bytes] = None
|
|
551
|
+
|
|
552
|
+
# process the path parameters
|
|
553
|
+
# process the query parameters
|
|
554
|
+
# process the header parameters
|
|
555
|
+
# process the form parameters
|
|
556
|
+
# process the body parameter
|
|
557
|
+
if refresh_website_connector_payload is not None:
|
|
558
|
+
_body_params = refresh_website_connector_payload
|
|
559
|
+
|
|
560
|
+
|
|
561
|
+
# set the HTTP header `Accept`
|
|
562
|
+
if 'Accept' not in _header_params:
|
|
563
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
564
|
+
[
|
|
565
|
+
'application/json'
|
|
566
|
+
]
|
|
567
|
+
)
|
|
568
|
+
|
|
569
|
+
# set the HTTP header `Content-Type`
|
|
570
|
+
if _content_type:
|
|
571
|
+
_header_params['Content-Type'] = _content_type
|
|
572
|
+
else:
|
|
573
|
+
_default_content_type = (
|
|
574
|
+
self.api_client.select_header_content_type(
|
|
575
|
+
[
|
|
576
|
+
'application/json'
|
|
577
|
+
]
|
|
578
|
+
)
|
|
579
|
+
)
|
|
580
|
+
if _default_content_type is not None:
|
|
581
|
+
_header_params['Content-Type'] = _default_content_type
|
|
582
|
+
|
|
583
|
+
# authentication setting
|
|
584
|
+
_auth_settings: List[str] = [
|
|
585
|
+
'QAnswer-Api-Key',
|
|
586
|
+
'Bearer token'
|
|
587
|
+
]
|
|
588
|
+
|
|
589
|
+
return self.api_client.param_serialize(
|
|
590
|
+
method='POST',
|
|
591
|
+
resource_path='/backend/api/connectors/website/retry-failed',
|
|
592
|
+
path_params=_path_params,
|
|
593
|
+
query_params=_query_params,
|
|
594
|
+
header_params=_header_params,
|
|
595
|
+
body=_body_params,
|
|
596
|
+
post_params=_form_params,
|
|
597
|
+
files=_files,
|
|
598
|
+
auth_settings=_auth_settings,
|
|
599
|
+
collection_formats=_collection_formats,
|
|
600
|
+
_host=_host,
|
|
601
|
+
_request_auth=_request_auth
|
|
602
|
+
)
|
|
603
|
+
|
|
604
|
+
|
|
605
|
+
|
|
606
|
+
|
|
607
|
+
@validate_call
|
|
608
|
+
def stress_test_website_connector(
|
|
609
|
+
self,
|
|
610
|
+
website_add_payload: WebsiteAddPayload,
|
|
611
|
+
_request_timeout: Union[
|
|
612
|
+
None,
|
|
613
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
614
|
+
Tuple[
|
|
615
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
616
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
617
|
+
]
|
|
618
|
+
] = None,
|
|
619
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
620
|
+
_content_type: Optional[StrictStr] = None,
|
|
621
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
622
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
623
|
+
) -> StatusResponse:
|
|
624
|
+
"""Stress Test Website Connector
|
|
625
|
+
|
|
626
|
+
|
|
627
|
+
:param website_add_payload: (required)
|
|
628
|
+
:type website_add_payload: WebsiteAddPayload
|
|
629
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
630
|
+
number provided, it will be total request
|
|
631
|
+
timeout. It can also be a pair (tuple) of
|
|
632
|
+
(connection, read) timeouts.
|
|
633
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
634
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
635
|
+
request; this effectively ignores the
|
|
636
|
+
authentication in the spec for a single request.
|
|
637
|
+
:type _request_auth: dict, optional
|
|
638
|
+
:param _content_type: force content-type for the request.
|
|
639
|
+
:type _content_type: str, Optional
|
|
640
|
+
:param _headers: set to override the headers for a single
|
|
641
|
+
request; this effectively ignores the headers
|
|
642
|
+
in the spec for a single request.
|
|
643
|
+
:type _headers: dict, optional
|
|
644
|
+
:param _host_index: set to override the host_index for a single
|
|
645
|
+
request; this effectively ignores the host_index
|
|
646
|
+
in the spec for a single request.
|
|
647
|
+
:type _host_index: int, optional
|
|
648
|
+
:return: Returns the result object.
|
|
649
|
+
""" # noqa: E501
|
|
650
|
+
|
|
651
|
+
_param = self._stress_test_website_connector_serialize(
|
|
652
|
+
website_add_payload=website_add_payload,
|
|
653
|
+
_request_auth=_request_auth,
|
|
654
|
+
_content_type=_content_type,
|
|
655
|
+
_headers=_headers,
|
|
656
|
+
_host_index=_host_index
|
|
657
|
+
)
|
|
658
|
+
|
|
659
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
660
|
+
'200': "StatusResponse",
|
|
661
|
+
'422': "HTTPValidationError",
|
|
662
|
+
}
|
|
663
|
+
response_data = self.api_client.call_api(
|
|
664
|
+
*_param,
|
|
665
|
+
_request_timeout=_request_timeout
|
|
666
|
+
)
|
|
667
|
+
response_data.read()
|
|
668
|
+
return self.api_client.response_deserialize(
|
|
669
|
+
response_data=response_data,
|
|
670
|
+
response_types_map=_response_types_map,
|
|
671
|
+
).data
|
|
672
|
+
|
|
673
|
+
|
|
674
|
+
@validate_call
|
|
675
|
+
def stress_test_website_connector_with_http_info(
|
|
676
|
+
self,
|
|
677
|
+
website_add_payload: WebsiteAddPayload,
|
|
678
|
+
_request_timeout: Union[
|
|
679
|
+
None,
|
|
680
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
681
|
+
Tuple[
|
|
682
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
683
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
684
|
+
]
|
|
685
|
+
] = None,
|
|
686
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
687
|
+
_content_type: Optional[StrictStr] = None,
|
|
688
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
689
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
690
|
+
) -> ApiResponse[StatusResponse]:
|
|
691
|
+
"""Stress Test Website Connector
|
|
692
|
+
|
|
693
|
+
|
|
694
|
+
:param website_add_payload: (required)
|
|
695
|
+
:type website_add_payload: WebsiteAddPayload
|
|
696
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
697
|
+
number provided, it will be total request
|
|
698
|
+
timeout. It can also be a pair (tuple) of
|
|
699
|
+
(connection, read) timeouts.
|
|
700
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
701
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
702
|
+
request; this effectively ignores the
|
|
703
|
+
authentication in the spec for a single request.
|
|
704
|
+
:type _request_auth: dict, optional
|
|
705
|
+
:param _content_type: force content-type for the request.
|
|
706
|
+
:type _content_type: str, Optional
|
|
707
|
+
:param _headers: set to override the headers for a single
|
|
708
|
+
request; this effectively ignores the headers
|
|
709
|
+
in the spec for a single request.
|
|
710
|
+
:type _headers: dict, optional
|
|
711
|
+
:param _host_index: set to override the host_index for a single
|
|
712
|
+
request; this effectively ignores the host_index
|
|
713
|
+
in the spec for a single request.
|
|
714
|
+
:type _host_index: int, optional
|
|
715
|
+
:return: Returns the result object.
|
|
716
|
+
""" # noqa: E501
|
|
717
|
+
|
|
718
|
+
_param = self._stress_test_website_connector_serialize(
|
|
719
|
+
website_add_payload=website_add_payload,
|
|
720
|
+
_request_auth=_request_auth,
|
|
721
|
+
_content_type=_content_type,
|
|
722
|
+
_headers=_headers,
|
|
723
|
+
_host_index=_host_index
|
|
724
|
+
)
|
|
725
|
+
|
|
726
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
727
|
+
'200': "StatusResponse",
|
|
728
|
+
'422': "HTTPValidationError",
|
|
729
|
+
}
|
|
730
|
+
response_data = self.api_client.call_api(
|
|
731
|
+
*_param,
|
|
732
|
+
_request_timeout=_request_timeout
|
|
733
|
+
)
|
|
734
|
+
response_data.read()
|
|
735
|
+
return self.api_client.response_deserialize(
|
|
736
|
+
response_data=response_data,
|
|
737
|
+
response_types_map=_response_types_map,
|
|
738
|
+
)
|
|
739
|
+
|
|
740
|
+
|
|
741
|
+
@validate_call
|
|
742
|
+
def stress_test_website_connector_without_preload_content(
|
|
743
|
+
self,
|
|
744
|
+
website_add_payload: WebsiteAddPayload,
|
|
745
|
+
_request_timeout: Union[
|
|
746
|
+
None,
|
|
747
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
748
|
+
Tuple[
|
|
749
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
750
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
751
|
+
]
|
|
752
|
+
] = None,
|
|
753
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
754
|
+
_content_type: Optional[StrictStr] = None,
|
|
755
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
756
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
757
|
+
) -> RESTResponseType:
|
|
758
|
+
"""Stress Test Website Connector
|
|
759
|
+
|
|
760
|
+
|
|
761
|
+
:param website_add_payload: (required)
|
|
762
|
+
:type website_add_payload: WebsiteAddPayload
|
|
763
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
764
|
+
number provided, it will be total request
|
|
765
|
+
timeout. It can also be a pair (tuple) of
|
|
766
|
+
(connection, read) timeouts.
|
|
767
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
768
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
769
|
+
request; this effectively ignores the
|
|
770
|
+
authentication in the spec for a single request.
|
|
771
|
+
:type _request_auth: dict, optional
|
|
772
|
+
:param _content_type: force content-type for the request.
|
|
773
|
+
:type _content_type: str, Optional
|
|
774
|
+
:param _headers: set to override the headers for a single
|
|
775
|
+
request; this effectively ignores the headers
|
|
776
|
+
in the spec for a single request.
|
|
777
|
+
:type _headers: dict, optional
|
|
778
|
+
:param _host_index: set to override the host_index for a single
|
|
779
|
+
request; this effectively ignores the host_index
|
|
780
|
+
in the spec for a single request.
|
|
781
|
+
:type _host_index: int, optional
|
|
782
|
+
:return: Returns the result object.
|
|
783
|
+
""" # noqa: E501
|
|
784
|
+
|
|
785
|
+
_param = self._stress_test_website_connector_serialize(
|
|
786
|
+
website_add_payload=website_add_payload,
|
|
787
|
+
_request_auth=_request_auth,
|
|
788
|
+
_content_type=_content_type,
|
|
789
|
+
_headers=_headers,
|
|
790
|
+
_host_index=_host_index
|
|
791
|
+
)
|
|
792
|
+
|
|
793
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
794
|
+
'200': "StatusResponse",
|
|
795
|
+
'422': "HTTPValidationError",
|
|
796
|
+
}
|
|
797
|
+
response_data = self.api_client.call_api(
|
|
798
|
+
*_param,
|
|
799
|
+
_request_timeout=_request_timeout
|
|
800
|
+
)
|
|
801
|
+
return response_data.response
|
|
802
|
+
|
|
803
|
+
|
|
804
|
+
def _stress_test_website_connector_serialize(
|
|
805
|
+
self,
|
|
806
|
+
website_add_payload,
|
|
807
|
+
_request_auth,
|
|
808
|
+
_content_type,
|
|
809
|
+
_headers,
|
|
810
|
+
_host_index,
|
|
811
|
+
) -> RequestSerialized:
|
|
812
|
+
|
|
813
|
+
_host = None
|
|
814
|
+
|
|
815
|
+
_collection_formats: Dict[str, str] = {
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
_path_params: Dict[str, str] = {}
|
|
819
|
+
_query_params: List[Tuple[str, str]] = []
|
|
820
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
821
|
+
_form_params: List[Tuple[str, str]] = []
|
|
822
|
+
_files: Dict[
|
|
823
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
824
|
+
] = {}
|
|
825
|
+
_body_params: Optional[bytes] = None
|
|
826
|
+
|
|
827
|
+
# process the path parameters
|
|
828
|
+
# process the query parameters
|
|
829
|
+
# process the header parameters
|
|
830
|
+
# process the form parameters
|
|
831
|
+
# process the body parameter
|
|
832
|
+
if website_add_payload is not None:
|
|
833
|
+
_body_params = website_add_payload
|
|
834
|
+
|
|
835
|
+
|
|
836
|
+
# set the HTTP header `Accept`
|
|
837
|
+
if 'Accept' not in _header_params:
|
|
838
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
839
|
+
[
|
|
840
|
+
'application/json'
|
|
841
|
+
]
|
|
842
|
+
)
|
|
843
|
+
|
|
844
|
+
# set the HTTP header `Content-Type`
|
|
845
|
+
if _content_type:
|
|
846
|
+
_header_params['Content-Type'] = _content_type
|
|
847
|
+
else:
|
|
848
|
+
_default_content_type = (
|
|
849
|
+
self.api_client.select_header_content_type(
|
|
850
|
+
[
|
|
851
|
+
'application/json'
|
|
852
|
+
]
|
|
853
|
+
)
|
|
854
|
+
)
|
|
855
|
+
if _default_content_type is not None:
|
|
856
|
+
_header_params['Content-Type'] = _default_content_type
|
|
857
|
+
|
|
858
|
+
# authentication setting
|
|
859
|
+
_auth_settings: List[str] = [
|
|
860
|
+
'QAnswer-Api-Key',
|
|
861
|
+
'Bearer token'
|
|
862
|
+
]
|
|
863
|
+
|
|
864
|
+
return self.api_client.param_serialize(
|
|
865
|
+
method='POST',
|
|
866
|
+
resource_path='/backend/api/connectors/website/stress-test',
|
|
867
|
+
path_params=_path_params,
|
|
868
|
+
query_params=_query_params,
|
|
869
|
+
header_params=_header_params,
|
|
870
|
+
body=_body_params,
|
|
871
|
+
post_params=_form_params,
|
|
872
|
+
files=_files,
|
|
873
|
+
auth_settings=_auth_settings,
|
|
874
|
+
collection_formats=_collection_formats,
|
|
875
|
+
_host=_host,
|
|
876
|
+
_request_auth=_request_auth
|
|
877
|
+
)
|
|
878
|
+
|
|
879
|
+
|
|
880
|
+
|
|
881
|
+
|
|
882
|
+
@validate_call
|
|
883
|
+
def website_connector_create_connector(
|
|
884
|
+
self,
|
|
885
|
+
create_connector_request: CreateConnectorRequest,
|
|
886
|
+
_request_timeout: Union[
|
|
887
|
+
None,
|
|
888
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
889
|
+
Tuple[
|
|
890
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
891
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
892
|
+
]
|
|
893
|
+
] = None,
|
|
894
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
895
|
+
_content_type: Optional[StrictStr] = None,
|
|
896
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
897
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
898
|
+
) -> CreateConnectorResponse:
|
|
899
|
+
"""Create Website Connector
|
|
900
|
+
|
|
901
|
+
Create Website Connector
|
|
902
|
+
|
|
903
|
+
:param create_connector_request: (required)
|
|
904
|
+
:type create_connector_request: CreateConnectorRequest
|
|
905
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
906
|
+
number provided, it will be total request
|
|
907
|
+
timeout. It can also be a pair (tuple) of
|
|
908
|
+
(connection, read) timeouts.
|
|
909
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
910
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
911
|
+
request; this effectively ignores the
|
|
912
|
+
authentication in the spec for a single request.
|
|
913
|
+
:type _request_auth: dict, optional
|
|
914
|
+
:param _content_type: force content-type for the request.
|
|
915
|
+
:type _content_type: str, Optional
|
|
916
|
+
:param _headers: set to override the headers for a single
|
|
917
|
+
request; this effectively ignores the headers
|
|
918
|
+
in the spec for a single request.
|
|
919
|
+
:type _headers: dict, optional
|
|
920
|
+
:param _host_index: set to override the host_index for a single
|
|
921
|
+
request; this effectively ignores the host_index
|
|
922
|
+
in the spec for a single request.
|
|
923
|
+
:type _host_index: int, optional
|
|
924
|
+
:return: Returns the result object.
|
|
925
|
+
""" # noqa: E501
|
|
926
|
+
|
|
927
|
+
_param = self._website_connector_create_connector_serialize(
|
|
928
|
+
create_connector_request=create_connector_request,
|
|
929
|
+
_request_auth=_request_auth,
|
|
930
|
+
_content_type=_content_type,
|
|
931
|
+
_headers=_headers,
|
|
932
|
+
_host_index=_host_index
|
|
933
|
+
)
|
|
934
|
+
|
|
935
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
936
|
+
'200': "CreateConnectorResponse",
|
|
937
|
+
'422': "HTTPValidationError",
|
|
938
|
+
}
|
|
939
|
+
response_data = self.api_client.call_api(
|
|
940
|
+
*_param,
|
|
941
|
+
_request_timeout=_request_timeout
|
|
942
|
+
)
|
|
943
|
+
response_data.read()
|
|
944
|
+
return self.api_client.response_deserialize(
|
|
945
|
+
response_data=response_data,
|
|
946
|
+
response_types_map=_response_types_map,
|
|
947
|
+
).data
|
|
948
|
+
|
|
949
|
+
|
|
950
|
+
@validate_call
|
|
951
|
+
def website_connector_create_connector_with_http_info(
|
|
952
|
+
self,
|
|
953
|
+
create_connector_request: CreateConnectorRequest,
|
|
954
|
+
_request_timeout: Union[
|
|
955
|
+
None,
|
|
956
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
957
|
+
Tuple[
|
|
958
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
959
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
960
|
+
]
|
|
961
|
+
] = None,
|
|
962
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
963
|
+
_content_type: Optional[StrictStr] = None,
|
|
964
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
965
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
966
|
+
) -> ApiResponse[CreateConnectorResponse]:
|
|
967
|
+
"""Create Website Connector
|
|
968
|
+
|
|
969
|
+
Create Website Connector
|
|
970
|
+
|
|
971
|
+
:param create_connector_request: (required)
|
|
972
|
+
:type create_connector_request: CreateConnectorRequest
|
|
973
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
974
|
+
number provided, it will be total request
|
|
975
|
+
timeout. It can also be a pair (tuple) of
|
|
976
|
+
(connection, read) timeouts.
|
|
977
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
978
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
979
|
+
request; this effectively ignores the
|
|
980
|
+
authentication in the spec for a single request.
|
|
981
|
+
:type _request_auth: dict, optional
|
|
982
|
+
:param _content_type: force content-type for the request.
|
|
983
|
+
:type _content_type: str, Optional
|
|
984
|
+
:param _headers: set to override the headers for a single
|
|
985
|
+
request; this effectively ignores the headers
|
|
986
|
+
in the spec for a single request.
|
|
987
|
+
:type _headers: dict, optional
|
|
988
|
+
:param _host_index: set to override the host_index for a single
|
|
989
|
+
request; this effectively ignores the host_index
|
|
990
|
+
in the spec for a single request.
|
|
991
|
+
:type _host_index: int, optional
|
|
992
|
+
:return: Returns the result object.
|
|
993
|
+
""" # noqa: E501
|
|
994
|
+
|
|
995
|
+
_param = self._website_connector_create_connector_serialize(
|
|
996
|
+
create_connector_request=create_connector_request,
|
|
997
|
+
_request_auth=_request_auth,
|
|
998
|
+
_content_type=_content_type,
|
|
999
|
+
_headers=_headers,
|
|
1000
|
+
_host_index=_host_index
|
|
1001
|
+
)
|
|
1002
|
+
|
|
1003
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1004
|
+
'200': "CreateConnectorResponse",
|
|
1005
|
+
'422': "HTTPValidationError",
|
|
1006
|
+
}
|
|
1007
|
+
response_data = self.api_client.call_api(
|
|
1008
|
+
*_param,
|
|
1009
|
+
_request_timeout=_request_timeout
|
|
1010
|
+
)
|
|
1011
|
+
response_data.read()
|
|
1012
|
+
return self.api_client.response_deserialize(
|
|
1013
|
+
response_data=response_data,
|
|
1014
|
+
response_types_map=_response_types_map,
|
|
1015
|
+
)
|
|
1016
|
+
|
|
1017
|
+
|
|
1018
|
+
@validate_call
|
|
1019
|
+
def website_connector_create_connector_without_preload_content(
|
|
1020
|
+
self,
|
|
1021
|
+
create_connector_request: CreateConnectorRequest,
|
|
1022
|
+
_request_timeout: Union[
|
|
1023
|
+
None,
|
|
1024
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1025
|
+
Tuple[
|
|
1026
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1027
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1028
|
+
]
|
|
1029
|
+
] = None,
|
|
1030
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1031
|
+
_content_type: Optional[StrictStr] = None,
|
|
1032
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1033
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1034
|
+
) -> RESTResponseType:
|
|
1035
|
+
"""Create Website Connector
|
|
1036
|
+
|
|
1037
|
+
Create Website Connector
|
|
1038
|
+
|
|
1039
|
+
:param create_connector_request: (required)
|
|
1040
|
+
:type create_connector_request: CreateConnectorRequest
|
|
1041
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1042
|
+
number provided, it will be total request
|
|
1043
|
+
timeout. It can also be a pair (tuple) of
|
|
1044
|
+
(connection, read) timeouts.
|
|
1045
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1046
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1047
|
+
request; this effectively ignores the
|
|
1048
|
+
authentication in the spec for a single request.
|
|
1049
|
+
:type _request_auth: dict, optional
|
|
1050
|
+
:param _content_type: force content-type for the request.
|
|
1051
|
+
:type _content_type: str, Optional
|
|
1052
|
+
:param _headers: set to override the headers for a single
|
|
1053
|
+
request; this effectively ignores the headers
|
|
1054
|
+
in the spec for a single request.
|
|
1055
|
+
:type _headers: dict, optional
|
|
1056
|
+
:param _host_index: set to override the host_index for a single
|
|
1057
|
+
request; this effectively ignores the host_index
|
|
1058
|
+
in the spec for a single request.
|
|
1059
|
+
:type _host_index: int, optional
|
|
1060
|
+
:return: Returns the result object.
|
|
1061
|
+
""" # noqa: E501
|
|
1062
|
+
|
|
1063
|
+
_param = self._website_connector_create_connector_serialize(
|
|
1064
|
+
create_connector_request=create_connector_request,
|
|
1065
|
+
_request_auth=_request_auth,
|
|
1066
|
+
_content_type=_content_type,
|
|
1067
|
+
_headers=_headers,
|
|
1068
|
+
_host_index=_host_index
|
|
1069
|
+
)
|
|
1070
|
+
|
|
1071
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1072
|
+
'200': "CreateConnectorResponse",
|
|
1073
|
+
'422': "HTTPValidationError",
|
|
1074
|
+
}
|
|
1075
|
+
response_data = self.api_client.call_api(
|
|
1076
|
+
*_param,
|
|
1077
|
+
_request_timeout=_request_timeout
|
|
1078
|
+
)
|
|
1079
|
+
return response_data.response
|
|
1080
|
+
|
|
1081
|
+
|
|
1082
|
+
def _website_connector_create_connector_serialize(
|
|
1083
|
+
self,
|
|
1084
|
+
create_connector_request,
|
|
1085
|
+
_request_auth,
|
|
1086
|
+
_content_type,
|
|
1087
|
+
_headers,
|
|
1088
|
+
_host_index,
|
|
1089
|
+
) -> RequestSerialized:
|
|
1090
|
+
|
|
1091
|
+
_host = None
|
|
1092
|
+
|
|
1093
|
+
_collection_formats: Dict[str, str] = {
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
_path_params: Dict[str, str] = {}
|
|
1097
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1098
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1099
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1100
|
+
_files: Dict[
|
|
1101
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1102
|
+
] = {}
|
|
1103
|
+
_body_params: Optional[bytes] = None
|
|
1104
|
+
|
|
1105
|
+
# process the path parameters
|
|
1106
|
+
# process the query parameters
|
|
1107
|
+
# process the header parameters
|
|
1108
|
+
# process the form parameters
|
|
1109
|
+
# process the body parameter
|
|
1110
|
+
if create_connector_request is not None:
|
|
1111
|
+
_body_params = create_connector_request
|
|
1112
|
+
|
|
1113
|
+
|
|
1114
|
+
# set the HTTP header `Accept`
|
|
1115
|
+
if 'Accept' not in _header_params:
|
|
1116
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1117
|
+
[
|
|
1118
|
+
'application/json'
|
|
1119
|
+
]
|
|
1120
|
+
)
|
|
1121
|
+
|
|
1122
|
+
# set the HTTP header `Content-Type`
|
|
1123
|
+
if _content_type:
|
|
1124
|
+
_header_params['Content-Type'] = _content_type
|
|
1125
|
+
else:
|
|
1126
|
+
_default_content_type = (
|
|
1127
|
+
self.api_client.select_header_content_type(
|
|
1128
|
+
[
|
|
1129
|
+
'application/json'
|
|
1130
|
+
]
|
|
1131
|
+
)
|
|
1132
|
+
)
|
|
1133
|
+
if _default_content_type is not None:
|
|
1134
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1135
|
+
|
|
1136
|
+
# authentication setting
|
|
1137
|
+
_auth_settings: List[str] = [
|
|
1138
|
+
'QAnswer-Api-Key',
|
|
1139
|
+
'Bearer token'
|
|
1140
|
+
]
|
|
1141
|
+
|
|
1142
|
+
return self.api_client.param_serialize(
|
|
1143
|
+
method='POST',
|
|
1144
|
+
resource_path='/backend/api/connectors/website/create',
|
|
1145
|
+
path_params=_path_params,
|
|
1146
|
+
query_params=_query_params,
|
|
1147
|
+
header_params=_header_params,
|
|
1148
|
+
body=_body_params,
|
|
1149
|
+
post_params=_form_params,
|
|
1150
|
+
files=_files,
|
|
1151
|
+
auth_settings=_auth_settings,
|
|
1152
|
+
collection_formats=_collection_formats,
|
|
1153
|
+
_host=_host,
|
|
1154
|
+
_request_auth=_request_auth
|
|
1155
|
+
)
|
|
1156
|
+
|
|
1157
|
+
|
|
1158
|
+
|
|
1159
|
+
|
|
1160
|
+
@validate_call
|
|
1161
|
+
def website_connector_list(
|
|
1162
|
+
self,
|
|
1163
|
+
extract_hyper_links_payload: ExtractHyperLinksPayload,
|
|
1164
|
+
_request_timeout: Union[
|
|
1165
|
+
None,
|
|
1166
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1167
|
+
Tuple[
|
|
1168
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1169
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1170
|
+
]
|
|
1171
|
+
] = None,
|
|
1172
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1173
|
+
_content_type: Optional[StrictStr] = None,
|
|
1174
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1175
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1176
|
+
) -> LinkExtractionResponse:
|
|
1177
|
+
"""List Hyperlinks
|
|
1178
|
+
|
|
1179
|
+
|
|
1180
|
+
:param extract_hyper_links_payload: (required)
|
|
1181
|
+
:type extract_hyper_links_payload: ExtractHyperLinksPayload
|
|
1182
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1183
|
+
number provided, it will be total request
|
|
1184
|
+
timeout. It can also be a pair (tuple) of
|
|
1185
|
+
(connection, read) timeouts.
|
|
1186
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1187
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1188
|
+
request; this effectively ignores the
|
|
1189
|
+
authentication in the spec for a single request.
|
|
1190
|
+
:type _request_auth: dict, optional
|
|
1191
|
+
:param _content_type: force content-type for the request.
|
|
1192
|
+
:type _content_type: str, Optional
|
|
1193
|
+
:param _headers: set to override the headers for a single
|
|
1194
|
+
request; this effectively ignores the headers
|
|
1195
|
+
in the spec for a single request.
|
|
1196
|
+
:type _headers: dict, optional
|
|
1197
|
+
:param _host_index: set to override the host_index for a single
|
|
1198
|
+
request; this effectively ignores the host_index
|
|
1199
|
+
in the spec for a single request.
|
|
1200
|
+
:type _host_index: int, optional
|
|
1201
|
+
:return: Returns the result object.
|
|
1202
|
+
""" # noqa: E501
|
|
1203
|
+
|
|
1204
|
+
_param = self._website_connector_list_serialize(
|
|
1205
|
+
extract_hyper_links_payload=extract_hyper_links_payload,
|
|
1206
|
+
_request_auth=_request_auth,
|
|
1207
|
+
_content_type=_content_type,
|
|
1208
|
+
_headers=_headers,
|
|
1209
|
+
_host_index=_host_index
|
|
1210
|
+
)
|
|
1211
|
+
|
|
1212
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1213
|
+
'200': "LinkExtractionResponse",
|
|
1214
|
+
'422': "HTTPValidationError",
|
|
1215
|
+
}
|
|
1216
|
+
response_data = self.api_client.call_api(
|
|
1217
|
+
*_param,
|
|
1218
|
+
_request_timeout=_request_timeout
|
|
1219
|
+
)
|
|
1220
|
+
response_data.read()
|
|
1221
|
+
return self.api_client.response_deserialize(
|
|
1222
|
+
response_data=response_data,
|
|
1223
|
+
response_types_map=_response_types_map,
|
|
1224
|
+
).data
|
|
1225
|
+
|
|
1226
|
+
|
|
1227
|
+
@validate_call
|
|
1228
|
+
def website_connector_list_with_http_info(
|
|
1229
|
+
self,
|
|
1230
|
+
extract_hyper_links_payload: ExtractHyperLinksPayload,
|
|
1231
|
+
_request_timeout: Union[
|
|
1232
|
+
None,
|
|
1233
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1234
|
+
Tuple[
|
|
1235
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1236
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1237
|
+
]
|
|
1238
|
+
] = None,
|
|
1239
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1240
|
+
_content_type: Optional[StrictStr] = None,
|
|
1241
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1242
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1243
|
+
) -> ApiResponse[LinkExtractionResponse]:
|
|
1244
|
+
"""List Hyperlinks
|
|
1245
|
+
|
|
1246
|
+
|
|
1247
|
+
:param extract_hyper_links_payload: (required)
|
|
1248
|
+
:type extract_hyper_links_payload: ExtractHyperLinksPayload
|
|
1249
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1250
|
+
number provided, it will be total request
|
|
1251
|
+
timeout. It can also be a pair (tuple) of
|
|
1252
|
+
(connection, read) timeouts.
|
|
1253
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1254
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1255
|
+
request; this effectively ignores the
|
|
1256
|
+
authentication in the spec for a single request.
|
|
1257
|
+
:type _request_auth: dict, optional
|
|
1258
|
+
:param _content_type: force content-type for the request.
|
|
1259
|
+
:type _content_type: str, Optional
|
|
1260
|
+
:param _headers: set to override the headers for a single
|
|
1261
|
+
request; this effectively ignores the headers
|
|
1262
|
+
in the spec for a single request.
|
|
1263
|
+
:type _headers: dict, optional
|
|
1264
|
+
:param _host_index: set to override the host_index for a single
|
|
1265
|
+
request; this effectively ignores the host_index
|
|
1266
|
+
in the spec for a single request.
|
|
1267
|
+
:type _host_index: int, optional
|
|
1268
|
+
:return: Returns the result object.
|
|
1269
|
+
""" # noqa: E501
|
|
1270
|
+
|
|
1271
|
+
_param = self._website_connector_list_serialize(
|
|
1272
|
+
extract_hyper_links_payload=extract_hyper_links_payload,
|
|
1273
|
+
_request_auth=_request_auth,
|
|
1274
|
+
_content_type=_content_type,
|
|
1275
|
+
_headers=_headers,
|
|
1276
|
+
_host_index=_host_index
|
|
1277
|
+
)
|
|
1278
|
+
|
|
1279
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1280
|
+
'200': "LinkExtractionResponse",
|
|
1281
|
+
'422': "HTTPValidationError",
|
|
1282
|
+
}
|
|
1283
|
+
response_data = self.api_client.call_api(
|
|
1284
|
+
*_param,
|
|
1285
|
+
_request_timeout=_request_timeout
|
|
1286
|
+
)
|
|
1287
|
+
response_data.read()
|
|
1288
|
+
return self.api_client.response_deserialize(
|
|
1289
|
+
response_data=response_data,
|
|
1290
|
+
response_types_map=_response_types_map,
|
|
1291
|
+
)
|
|
1292
|
+
|
|
1293
|
+
|
|
1294
|
+
@validate_call
|
|
1295
|
+
def website_connector_list_without_preload_content(
|
|
1296
|
+
self,
|
|
1297
|
+
extract_hyper_links_payload: ExtractHyperLinksPayload,
|
|
1298
|
+
_request_timeout: Union[
|
|
1299
|
+
None,
|
|
1300
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1301
|
+
Tuple[
|
|
1302
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1303
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1304
|
+
]
|
|
1305
|
+
] = None,
|
|
1306
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1307
|
+
_content_type: Optional[StrictStr] = None,
|
|
1308
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1309
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1310
|
+
) -> RESTResponseType:
|
|
1311
|
+
"""List Hyperlinks
|
|
1312
|
+
|
|
1313
|
+
|
|
1314
|
+
:param extract_hyper_links_payload: (required)
|
|
1315
|
+
:type extract_hyper_links_payload: ExtractHyperLinksPayload
|
|
1316
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1317
|
+
number provided, it will be total request
|
|
1318
|
+
timeout. It can also be a pair (tuple) of
|
|
1319
|
+
(connection, read) timeouts.
|
|
1320
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1321
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1322
|
+
request; this effectively ignores the
|
|
1323
|
+
authentication in the spec for a single request.
|
|
1324
|
+
:type _request_auth: dict, optional
|
|
1325
|
+
:param _content_type: force content-type for the request.
|
|
1326
|
+
:type _content_type: str, Optional
|
|
1327
|
+
:param _headers: set to override the headers for a single
|
|
1328
|
+
request; this effectively ignores the headers
|
|
1329
|
+
in the spec for a single request.
|
|
1330
|
+
:type _headers: dict, optional
|
|
1331
|
+
:param _host_index: set to override the host_index for a single
|
|
1332
|
+
request; this effectively ignores the host_index
|
|
1333
|
+
in the spec for a single request.
|
|
1334
|
+
:type _host_index: int, optional
|
|
1335
|
+
:return: Returns the result object.
|
|
1336
|
+
""" # noqa: E501
|
|
1337
|
+
|
|
1338
|
+
_param = self._website_connector_list_serialize(
|
|
1339
|
+
extract_hyper_links_payload=extract_hyper_links_payload,
|
|
1340
|
+
_request_auth=_request_auth,
|
|
1341
|
+
_content_type=_content_type,
|
|
1342
|
+
_headers=_headers,
|
|
1343
|
+
_host_index=_host_index
|
|
1344
|
+
)
|
|
1345
|
+
|
|
1346
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1347
|
+
'200': "LinkExtractionResponse",
|
|
1348
|
+
'422': "HTTPValidationError",
|
|
1349
|
+
}
|
|
1350
|
+
response_data = self.api_client.call_api(
|
|
1351
|
+
*_param,
|
|
1352
|
+
_request_timeout=_request_timeout
|
|
1353
|
+
)
|
|
1354
|
+
return response_data.response
|
|
1355
|
+
|
|
1356
|
+
|
|
1357
|
+
def _website_connector_list_serialize(
|
|
1358
|
+
self,
|
|
1359
|
+
extract_hyper_links_payload,
|
|
1360
|
+
_request_auth,
|
|
1361
|
+
_content_type,
|
|
1362
|
+
_headers,
|
|
1363
|
+
_host_index,
|
|
1364
|
+
) -> RequestSerialized:
|
|
1365
|
+
|
|
1366
|
+
_host = None
|
|
1367
|
+
|
|
1368
|
+
_collection_formats: Dict[str, str] = {
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
_path_params: Dict[str, str] = {}
|
|
1372
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1373
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1374
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1375
|
+
_files: Dict[
|
|
1376
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1377
|
+
] = {}
|
|
1378
|
+
_body_params: Optional[bytes] = None
|
|
1379
|
+
|
|
1380
|
+
# process the path parameters
|
|
1381
|
+
# process the query parameters
|
|
1382
|
+
# process the header parameters
|
|
1383
|
+
# process the form parameters
|
|
1384
|
+
# process the body parameter
|
|
1385
|
+
if extract_hyper_links_payload is not None:
|
|
1386
|
+
_body_params = extract_hyper_links_payload
|
|
1387
|
+
|
|
1388
|
+
|
|
1389
|
+
# set the HTTP header `Accept`
|
|
1390
|
+
if 'Accept' not in _header_params:
|
|
1391
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1392
|
+
[
|
|
1393
|
+
'application/json'
|
|
1394
|
+
]
|
|
1395
|
+
)
|
|
1396
|
+
|
|
1397
|
+
# set the HTTP header `Content-Type`
|
|
1398
|
+
if _content_type:
|
|
1399
|
+
_header_params['Content-Type'] = _content_type
|
|
1400
|
+
else:
|
|
1401
|
+
_default_content_type = (
|
|
1402
|
+
self.api_client.select_header_content_type(
|
|
1403
|
+
[
|
|
1404
|
+
'application/json'
|
|
1405
|
+
]
|
|
1406
|
+
)
|
|
1407
|
+
)
|
|
1408
|
+
if _default_content_type is not None:
|
|
1409
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1410
|
+
|
|
1411
|
+
# authentication setting
|
|
1412
|
+
_auth_settings: List[str] = [
|
|
1413
|
+
]
|
|
1414
|
+
|
|
1415
|
+
return self.api_client.param_serialize(
|
|
1416
|
+
method='POST',
|
|
1417
|
+
resource_path='/backend/api/connectors/website/list',
|
|
1418
|
+
path_params=_path_params,
|
|
1419
|
+
query_params=_query_params,
|
|
1420
|
+
header_params=_header_params,
|
|
1421
|
+
body=_body_params,
|
|
1422
|
+
post_params=_form_params,
|
|
1423
|
+
files=_files,
|
|
1424
|
+
auth_settings=_auth_settings,
|
|
1425
|
+
collection_formats=_collection_formats,
|
|
1426
|
+
_host=_host,
|
|
1427
|
+
_request_auth=_request_auth
|
|
1428
|
+
)
|
|
1429
|
+
|
|
1430
|
+
|
|
1431
|
+
|
|
1432
|
+
|
|
1433
|
+
@validate_call
|
|
1434
|
+
def website_connector_refresh(
|
|
1435
|
+
self,
|
|
1436
|
+
refresh_website_connector_payload: RefreshWebsiteConnectorPayload,
|
|
1437
|
+
_request_timeout: Union[
|
|
1438
|
+
None,
|
|
1439
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1440
|
+
Tuple[
|
|
1441
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1442
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1443
|
+
]
|
|
1444
|
+
] = None,
|
|
1445
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1446
|
+
_content_type: Optional[StrictStr] = None,
|
|
1447
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1448
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1449
|
+
) -> StatusResponse:
|
|
1450
|
+
"""Refresh Websites
|
|
1451
|
+
|
|
1452
|
+
|
|
1453
|
+
:param refresh_website_connector_payload: (required)
|
|
1454
|
+
:type refresh_website_connector_payload: RefreshWebsiteConnectorPayload
|
|
1455
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1456
|
+
number provided, it will be total request
|
|
1457
|
+
timeout. It can also be a pair (tuple) of
|
|
1458
|
+
(connection, read) timeouts.
|
|
1459
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1460
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1461
|
+
request; this effectively ignores the
|
|
1462
|
+
authentication in the spec for a single request.
|
|
1463
|
+
:type _request_auth: dict, optional
|
|
1464
|
+
:param _content_type: force content-type for the request.
|
|
1465
|
+
:type _content_type: str, Optional
|
|
1466
|
+
:param _headers: set to override the headers for a single
|
|
1467
|
+
request; this effectively ignores the headers
|
|
1468
|
+
in the spec for a single request.
|
|
1469
|
+
:type _headers: dict, optional
|
|
1470
|
+
:param _host_index: set to override the host_index for a single
|
|
1471
|
+
request; this effectively ignores the host_index
|
|
1472
|
+
in the spec for a single request.
|
|
1473
|
+
:type _host_index: int, optional
|
|
1474
|
+
:return: Returns the result object.
|
|
1475
|
+
""" # noqa: E501
|
|
1476
|
+
|
|
1477
|
+
_param = self._website_connector_refresh_serialize(
|
|
1478
|
+
refresh_website_connector_payload=refresh_website_connector_payload,
|
|
1479
|
+
_request_auth=_request_auth,
|
|
1480
|
+
_content_type=_content_type,
|
|
1481
|
+
_headers=_headers,
|
|
1482
|
+
_host_index=_host_index
|
|
1483
|
+
)
|
|
1484
|
+
|
|
1485
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1486
|
+
'200': "StatusResponse",
|
|
1487
|
+
'422': "HTTPValidationError",
|
|
1488
|
+
}
|
|
1489
|
+
response_data = self.api_client.call_api(
|
|
1490
|
+
*_param,
|
|
1491
|
+
_request_timeout=_request_timeout
|
|
1492
|
+
)
|
|
1493
|
+
response_data.read()
|
|
1494
|
+
return self.api_client.response_deserialize(
|
|
1495
|
+
response_data=response_data,
|
|
1496
|
+
response_types_map=_response_types_map,
|
|
1497
|
+
).data
|
|
1498
|
+
|
|
1499
|
+
|
|
1500
|
+
@validate_call
|
|
1501
|
+
def website_connector_refresh_with_http_info(
|
|
1502
|
+
self,
|
|
1503
|
+
refresh_website_connector_payload: RefreshWebsiteConnectorPayload,
|
|
1504
|
+
_request_timeout: Union[
|
|
1505
|
+
None,
|
|
1506
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1507
|
+
Tuple[
|
|
1508
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1509
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1510
|
+
]
|
|
1511
|
+
] = None,
|
|
1512
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1513
|
+
_content_type: Optional[StrictStr] = None,
|
|
1514
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1515
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1516
|
+
) -> ApiResponse[StatusResponse]:
|
|
1517
|
+
"""Refresh Websites
|
|
1518
|
+
|
|
1519
|
+
|
|
1520
|
+
:param refresh_website_connector_payload: (required)
|
|
1521
|
+
:type refresh_website_connector_payload: RefreshWebsiteConnectorPayload
|
|
1522
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1523
|
+
number provided, it will be total request
|
|
1524
|
+
timeout. It can also be a pair (tuple) of
|
|
1525
|
+
(connection, read) timeouts.
|
|
1526
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1527
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1528
|
+
request; this effectively ignores the
|
|
1529
|
+
authentication in the spec for a single request.
|
|
1530
|
+
:type _request_auth: dict, optional
|
|
1531
|
+
:param _content_type: force content-type for the request.
|
|
1532
|
+
:type _content_type: str, Optional
|
|
1533
|
+
:param _headers: set to override the headers for a single
|
|
1534
|
+
request; this effectively ignores the headers
|
|
1535
|
+
in the spec for a single request.
|
|
1536
|
+
:type _headers: dict, optional
|
|
1537
|
+
:param _host_index: set to override the host_index for a single
|
|
1538
|
+
request; this effectively ignores the host_index
|
|
1539
|
+
in the spec for a single request.
|
|
1540
|
+
:type _host_index: int, optional
|
|
1541
|
+
:return: Returns the result object.
|
|
1542
|
+
""" # noqa: E501
|
|
1543
|
+
|
|
1544
|
+
_param = self._website_connector_refresh_serialize(
|
|
1545
|
+
refresh_website_connector_payload=refresh_website_connector_payload,
|
|
1546
|
+
_request_auth=_request_auth,
|
|
1547
|
+
_content_type=_content_type,
|
|
1548
|
+
_headers=_headers,
|
|
1549
|
+
_host_index=_host_index
|
|
1550
|
+
)
|
|
1551
|
+
|
|
1552
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1553
|
+
'200': "StatusResponse",
|
|
1554
|
+
'422': "HTTPValidationError",
|
|
1555
|
+
}
|
|
1556
|
+
response_data = self.api_client.call_api(
|
|
1557
|
+
*_param,
|
|
1558
|
+
_request_timeout=_request_timeout
|
|
1559
|
+
)
|
|
1560
|
+
response_data.read()
|
|
1561
|
+
return self.api_client.response_deserialize(
|
|
1562
|
+
response_data=response_data,
|
|
1563
|
+
response_types_map=_response_types_map,
|
|
1564
|
+
)
|
|
1565
|
+
|
|
1566
|
+
|
|
1567
|
+
@validate_call
|
|
1568
|
+
def website_connector_refresh_without_preload_content(
|
|
1569
|
+
self,
|
|
1570
|
+
refresh_website_connector_payload: RefreshWebsiteConnectorPayload,
|
|
1571
|
+
_request_timeout: Union[
|
|
1572
|
+
None,
|
|
1573
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1574
|
+
Tuple[
|
|
1575
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1576
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1577
|
+
]
|
|
1578
|
+
] = None,
|
|
1579
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1580
|
+
_content_type: Optional[StrictStr] = None,
|
|
1581
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1582
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1583
|
+
) -> RESTResponseType:
|
|
1584
|
+
"""Refresh Websites
|
|
1585
|
+
|
|
1586
|
+
|
|
1587
|
+
:param refresh_website_connector_payload: (required)
|
|
1588
|
+
:type refresh_website_connector_payload: RefreshWebsiteConnectorPayload
|
|
1589
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1590
|
+
number provided, it will be total request
|
|
1591
|
+
timeout. It can also be a pair (tuple) of
|
|
1592
|
+
(connection, read) timeouts.
|
|
1593
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1594
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1595
|
+
request; this effectively ignores the
|
|
1596
|
+
authentication in the spec for a single request.
|
|
1597
|
+
:type _request_auth: dict, optional
|
|
1598
|
+
:param _content_type: force content-type for the request.
|
|
1599
|
+
:type _content_type: str, Optional
|
|
1600
|
+
:param _headers: set to override the headers for a single
|
|
1601
|
+
request; this effectively ignores the headers
|
|
1602
|
+
in the spec for a single request.
|
|
1603
|
+
:type _headers: dict, optional
|
|
1604
|
+
:param _host_index: set to override the host_index for a single
|
|
1605
|
+
request; this effectively ignores the host_index
|
|
1606
|
+
in the spec for a single request.
|
|
1607
|
+
:type _host_index: int, optional
|
|
1608
|
+
:return: Returns the result object.
|
|
1609
|
+
""" # noqa: E501
|
|
1610
|
+
|
|
1611
|
+
_param = self._website_connector_refresh_serialize(
|
|
1612
|
+
refresh_website_connector_payload=refresh_website_connector_payload,
|
|
1613
|
+
_request_auth=_request_auth,
|
|
1614
|
+
_content_type=_content_type,
|
|
1615
|
+
_headers=_headers,
|
|
1616
|
+
_host_index=_host_index
|
|
1617
|
+
)
|
|
1618
|
+
|
|
1619
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1620
|
+
'200': "StatusResponse",
|
|
1621
|
+
'422': "HTTPValidationError",
|
|
1622
|
+
}
|
|
1623
|
+
response_data = self.api_client.call_api(
|
|
1624
|
+
*_param,
|
|
1625
|
+
_request_timeout=_request_timeout
|
|
1626
|
+
)
|
|
1627
|
+
return response_data.response
|
|
1628
|
+
|
|
1629
|
+
|
|
1630
|
+
def _website_connector_refresh_serialize(
|
|
1631
|
+
self,
|
|
1632
|
+
refresh_website_connector_payload,
|
|
1633
|
+
_request_auth,
|
|
1634
|
+
_content_type,
|
|
1635
|
+
_headers,
|
|
1636
|
+
_host_index,
|
|
1637
|
+
) -> RequestSerialized:
|
|
1638
|
+
|
|
1639
|
+
_host = None
|
|
1640
|
+
|
|
1641
|
+
_collection_formats: Dict[str, str] = {
|
|
1642
|
+
}
|
|
1643
|
+
|
|
1644
|
+
_path_params: Dict[str, str] = {}
|
|
1645
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1646
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1647
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1648
|
+
_files: Dict[
|
|
1649
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1650
|
+
] = {}
|
|
1651
|
+
_body_params: Optional[bytes] = None
|
|
1652
|
+
|
|
1653
|
+
# process the path parameters
|
|
1654
|
+
# process the query parameters
|
|
1655
|
+
# process the header parameters
|
|
1656
|
+
# process the form parameters
|
|
1657
|
+
# process the body parameter
|
|
1658
|
+
if refresh_website_connector_payload is not None:
|
|
1659
|
+
_body_params = refresh_website_connector_payload
|
|
1660
|
+
|
|
1661
|
+
|
|
1662
|
+
# set the HTTP header `Accept`
|
|
1663
|
+
if 'Accept' not in _header_params:
|
|
1664
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1665
|
+
[
|
|
1666
|
+
'application/json'
|
|
1667
|
+
]
|
|
1668
|
+
)
|
|
1669
|
+
|
|
1670
|
+
# set the HTTP header `Content-Type`
|
|
1671
|
+
if _content_type:
|
|
1672
|
+
_header_params['Content-Type'] = _content_type
|
|
1673
|
+
else:
|
|
1674
|
+
_default_content_type = (
|
|
1675
|
+
self.api_client.select_header_content_type(
|
|
1676
|
+
[
|
|
1677
|
+
'application/json'
|
|
1678
|
+
]
|
|
1679
|
+
)
|
|
1680
|
+
)
|
|
1681
|
+
if _default_content_type is not None:
|
|
1682
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1683
|
+
|
|
1684
|
+
# authentication setting
|
|
1685
|
+
_auth_settings: List[str] = [
|
|
1686
|
+
'QAnswer-Api-Key',
|
|
1687
|
+
'Bearer token'
|
|
1688
|
+
]
|
|
1689
|
+
|
|
1690
|
+
return self.api_client.param_serialize(
|
|
1691
|
+
method='POST',
|
|
1692
|
+
resource_path='/backend/api/connectors/website/refresh',
|
|
1693
|
+
path_params=_path_params,
|
|
1694
|
+
query_params=_query_params,
|
|
1695
|
+
header_params=_header_params,
|
|
1696
|
+
body=_body_params,
|
|
1697
|
+
post_params=_form_params,
|
|
1698
|
+
files=_files,
|
|
1699
|
+
auth_settings=_auth_settings,
|
|
1700
|
+
collection_formats=_collection_formats,
|
|
1701
|
+
_host=_host,
|
|
1702
|
+
_request_auth=_request_auth
|
|
1703
|
+
)
|
|
1704
|
+
|
|
1705
|
+
|
|
1706
|
+
|
|
1707
|
+
|
|
1708
|
+
@validate_call
|
|
1709
|
+
def website_connector_robots(
|
|
1710
|
+
self,
|
|
1711
|
+
extract_robot_links_payload: ExtractRobotLinksPayload,
|
|
1712
|
+
_request_timeout: Union[
|
|
1713
|
+
None,
|
|
1714
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1715
|
+
Tuple[
|
|
1716
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1717
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1718
|
+
]
|
|
1719
|
+
] = None,
|
|
1720
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1721
|
+
_content_type: Optional[StrictStr] = None,
|
|
1722
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1723
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1724
|
+
) -> ExtractRobotLinksResponse:
|
|
1725
|
+
"""Extract Robot Links
|
|
1726
|
+
|
|
1727
|
+
|
|
1728
|
+
:param extract_robot_links_payload: (required)
|
|
1729
|
+
:type extract_robot_links_payload: ExtractRobotLinksPayload
|
|
1730
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1731
|
+
number provided, it will be total request
|
|
1732
|
+
timeout. It can also be a pair (tuple) of
|
|
1733
|
+
(connection, read) timeouts.
|
|
1734
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1735
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1736
|
+
request; this effectively ignores the
|
|
1737
|
+
authentication in the spec for a single request.
|
|
1738
|
+
:type _request_auth: dict, optional
|
|
1739
|
+
:param _content_type: force content-type for the request.
|
|
1740
|
+
:type _content_type: str, Optional
|
|
1741
|
+
:param _headers: set to override the headers for a single
|
|
1742
|
+
request; this effectively ignores the headers
|
|
1743
|
+
in the spec for a single request.
|
|
1744
|
+
:type _headers: dict, optional
|
|
1745
|
+
:param _host_index: set to override the host_index for a single
|
|
1746
|
+
request; this effectively ignores the host_index
|
|
1747
|
+
in the spec for a single request.
|
|
1748
|
+
:type _host_index: int, optional
|
|
1749
|
+
:return: Returns the result object.
|
|
1750
|
+
""" # noqa: E501
|
|
1751
|
+
|
|
1752
|
+
_param = self._website_connector_robots_serialize(
|
|
1753
|
+
extract_robot_links_payload=extract_robot_links_payload,
|
|
1754
|
+
_request_auth=_request_auth,
|
|
1755
|
+
_content_type=_content_type,
|
|
1756
|
+
_headers=_headers,
|
|
1757
|
+
_host_index=_host_index
|
|
1758
|
+
)
|
|
1759
|
+
|
|
1760
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1761
|
+
'200': "ExtractRobotLinksResponse",
|
|
1762
|
+
'422': "HTTPValidationError",
|
|
1763
|
+
}
|
|
1764
|
+
response_data = self.api_client.call_api(
|
|
1765
|
+
*_param,
|
|
1766
|
+
_request_timeout=_request_timeout
|
|
1767
|
+
)
|
|
1768
|
+
response_data.read()
|
|
1769
|
+
return self.api_client.response_deserialize(
|
|
1770
|
+
response_data=response_data,
|
|
1771
|
+
response_types_map=_response_types_map,
|
|
1772
|
+
).data
|
|
1773
|
+
|
|
1774
|
+
|
|
1775
|
+
@validate_call
|
|
1776
|
+
def website_connector_robots_with_http_info(
|
|
1777
|
+
self,
|
|
1778
|
+
extract_robot_links_payload: ExtractRobotLinksPayload,
|
|
1779
|
+
_request_timeout: Union[
|
|
1780
|
+
None,
|
|
1781
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1782
|
+
Tuple[
|
|
1783
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1784
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1785
|
+
]
|
|
1786
|
+
] = None,
|
|
1787
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1788
|
+
_content_type: Optional[StrictStr] = None,
|
|
1789
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1790
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1791
|
+
) -> ApiResponse[ExtractRobotLinksResponse]:
|
|
1792
|
+
"""Extract Robot Links
|
|
1793
|
+
|
|
1794
|
+
|
|
1795
|
+
:param extract_robot_links_payload: (required)
|
|
1796
|
+
:type extract_robot_links_payload: ExtractRobotLinksPayload
|
|
1797
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1798
|
+
number provided, it will be total request
|
|
1799
|
+
timeout. It can also be a pair (tuple) of
|
|
1800
|
+
(connection, read) timeouts.
|
|
1801
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1802
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1803
|
+
request; this effectively ignores the
|
|
1804
|
+
authentication in the spec for a single request.
|
|
1805
|
+
:type _request_auth: dict, optional
|
|
1806
|
+
:param _content_type: force content-type for the request.
|
|
1807
|
+
:type _content_type: str, Optional
|
|
1808
|
+
:param _headers: set to override the headers for a single
|
|
1809
|
+
request; this effectively ignores the headers
|
|
1810
|
+
in the spec for a single request.
|
|
1811
|
+
:type _headers: dict, optional
|
|
1812
|
+
:param _host_index: set to override the host_index for a single
|
|
1813
|
+
request; this effectively ignores the host_index
|
|
1814
|
+
in the spec for a single request.
|
|
1815
|
+
:type _host_index: int, optional
|
|
1816
|
+
:return: Returns the result object.
|
|
1817
|
+
""" # noqa: E501
|
|
1818
|
+
|
|
1819
|
+
_param = self._website_connector_robots_serialize(
|
|
1820
|
+
extract_robot_links_payload=extract_robot_links_payload,
|
|
1821
|
+
_request_auth=_request_auth,
|
|
1822
|
+
_content_type=_content_type,
|
|
1823
|
+
_headers=_headers,
|
|
1824
|
+
_host_index=_host_index
|
|
1825
|
+
)
|
|
1826
|
+
|
|
1827
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1828
|
+
'200': "ExtractRobotLinksResponse",
|
|
1829
|
+
'422': "HTTPValidationError",
|
|
1830
|
+
}
|
|
1831
|
+
response_data = self.api_client.call_api(
|
|
1832
|
+
*_param,
|
|
1833
|
+
_request_timeout=_request_timeout
|
|
1834
|
+
)
|
|
1835
|
+
response_data.read()
|
|
1836
|
+
return self.api_client.response_deserialize(
|
|
1837
|
+
response_data=response_data,
|
|
1838
|
+
response_types_map=_response_types_map,
|
|
1839
|
+
)
|
|
1840
|
+
|
|
1841
|
+
|
|
1842
|
+
@validate_call
|
|
1843
|
+
def website_connector_robots_without_preload_content(
|
|
1844
|
+
self,
|
|
1845
|
+
extract_robot_links_payload: ExtractRobotLinksPayload,
|
|
1846
|
+
_request_timeout: Union[
|
|
1847
|
+
None,
|
|
1848
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1849
|
+
Tuple[
|
|
1850
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1851
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1852
|
+
]
|
|
1853
|
+
] = None,
|
|
1854
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1855
|
+
_content_type: Optional[StrictStr] = None,
|
|
1856
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1857
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1858
|
+
) -> RESTResponseType:
|
|
1859
|
+
"""Extract Robot Links
|
|
1860
|
+
|
|
1861
|
+
|
|
1862
|
+
:param extract_robot_links_payload: (required)
|
|
1863
|
+
:type extract_robot_links_payload: ExtractRobotLinksPayload
|
|
1864
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1865
|
+
number provided, it will be total request
|
|
1866
|
+
timeout. It can also be a pair (tuple) of
|
|
1867
|
+
(connection, read) timeouts.
|
|
1868
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1869
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1870
|
+
request; this effectively ignores the
|
|
1871
|
+
authentication in the spec for a single request.
|
|
1872
|
+
:type _request_auth: dict, optional
|
|
1873
|
+
:param _content_type: force content-type for the request.
|
|
1874
|
+
:type _content_type: str, Optional
|
|
1875
|
+
:param _headers: set to override the headers for a single
|
|
1876
|
+
request; this effectively ignores the headers
|
|
1877
|
+
in the spec for a single request.
|
|
1878
|
+
:type _headers: dict, optional
|
|
1879
|
+
:param _host_index: set to override the host_index for a single
|
|
1880
|
+
request; this effectively ignores the host_index
|
|
1881
|
+
in the spec for a single request.
|
|
1882
|
+
:type _host_index: int, optional
|
|
1883
|
+
:return: Returns the result object.
|
|
1884
|
+
""" # noqa: E501
|
|
1885
|
+
|
|
1886
|
+
_param = self._website_connector_robots_serialize(
|
|
1887
|
+
extract_robot_links_payload=extract_robot_links_payload,
|
|
1888
|
+
_request_auth=_request_auth,
|
|
1889
|
+
_content_type=_content_type,
|
|
1890
|
+
_headers=_headers,
|
|
1891
|
+
_host_index=_host_index
|
|
1892
|
+
)
|
|
1893
|
+
|
|
1894
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1895
|
+
'200': "ExtractRobotLinksResponse",
|
|
1896
|
+
'422': "HTTPValidationError",
|
|
1897
|
+
}
|
|
1898
|
+
response_data = self.api_client.call_api(
|
|
1899
|
+
*_param,
|
|
1900
|
+
_request_timeout=_request_timeout
|
|
1901
|
+
)
|
|
1902
|
+
return response_data.response
|
|
1903
|
+
|
|
1904
|
+
|
|
1905
|
+
def _website_connector_robots_serialize(
|
|
1906
|
+
self,
|
|
1907
|
+
extract_robot_links_payload,
|
|
1908
|
+
_request_auth,
|
|
1909
|
+
_content_type,
|
|
1910
|
+
_headers,
|
|
1911
|
+
_host_index,
|
|
1912
|
+
) -> RequestSerialized:
|
|
1913
|
+
|
|
1914
|
+
_host = None
|
|
1915
|
+
|
|
1916
|
+
_collection_formats: Dict[str, str] = {
|
|
1917
|
+
}
|
|
1918
|
+
|
|
1919
|
+
_path_params: Dict[str, str] = {}
|
|
1920
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1921
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1922
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1923
|
+
_files: Dict[
|
|
1924
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1925
|
+
] = {}
|
|
1926
|
+
_body_params: Optional[bytes] = None
|
|
1927
|
+
|
|
1928
|
+
# process the path parameters
|
|
1929
|
+
# process the query parameters
|
|
1930
|
+
# process the header parameters
|
|
1931
|
+
# process the form parameters
|
|
1932
|
+
# process the body parameter
|
|
1933
|
+
if extract_robot_links_payload is not None:
|
|
1934
|
+
_body_params = extract_robot_links_payload
|
|
1935
|
+
|
|
1936
|
+
|
|
1937
|
+
# set the HTTP header `Accept`
|
|
1938
|
+
if 'Accept' not in _header_params:
|
|
1939
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1940
|
+
[
|
|
1941
|
+
'application/json'
|
|
1942
|
+
]
|
|
1943
|
+
)
|
|
1944
|
+
|
|
1945
|
+
# set the HTTP header `Content-Type`
|
|
1946
|
+
if _content_type:
|
|
1947
|
+
_header_params['Content-Type'] = _content_type
|
|
1948
|
+
else:
|
|
1949
|
+
_default_content_type = (
|
|
1950
|
+
self.api_client.select_header_content_type(
|
|
1951
|
+
[
|
|
1952
|
+
'application/json'
|
|
1953
|
+
]
|
|
1954
|
+
)
|
|
1955
|
+
)
|
|
1956
|
+
if _default_content_type is not None:
|
|
1957
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1958
|
+
|
|
1959
|
+
# authentication setting
|
|
1960
|
+
_auth_settings: List[str] = [
|
|
1961
|
+
]
|
|
1962
|
+
|
|
1963
|
+
return self.api_client.param_serialize(
|
|
1964
|
+
method='GET',
|
|
1965
|
+
resource_path='/backend/api/connectors/website/robots',
|
|
1966
|
+
path_params=_path_params,
|
|
1967
|
+
query_params=_query_params,
|
|
1968
|
+
header_params=_header_params,
|
|
1969
|
+
body=_body_params,
|
|
1970
|
+
post_params=_form_params,
|
|
1971
|
+
files=_files,
|
|
1972
|
+
auth_settings=_auth_settings,
|
|
1973
|
+
collection_formats=_collection_formats,
|
|
1974
|
+
_host=_host,
|
|
1975
|
+
_request_auth=_request_auth
|
|
1976
|
+
)
|
|
1977
|
+
|
|
1978
|
+
|
|
1979
|
+
|
|
1980
|
+
|
|
1981
|
+
@validate_call
|
|
1982
|
+
def website_connector_settings(
|
|
1983
|
+
self,
|
|
1984
|
+
username: Annotated[str, Field(min_length=1, strict=True)],
|
|
1985
|
+
dataset: Annotated[str, Field(min_length=1, strict=True)],
|
|
1986
|
+
connector_id: Optional[Annotated[int, Field(strict=True, ge=1)]] = None,
|
|
1987
|
+
_request_timeout: Union[
|
|
1988
|
+
None,
|
|
1989
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1990
|
+
Tuple[
|
|
1991
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1992
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1993
|
+
]
|
|
1994
|
+
] = None,
|
|
1995
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1996
|
+
_content_type: Optional[StrictStr] = None,
|
|
1997
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1998
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1999
|
+
) -> WebsiteConnectorSettings:
|
|
2000
|
+
"""Get Connector Settings
|
|
2001
|
+
|
|
2002
|
+
|
|
2003
|
+
:param username: (required)
|
|
2004
|
+
:type username: str
|
|
2005
|
+
:param dataset: (required)
|
|
2006
|
+
:type dataset: str
|
|
2007
|
+
:param connector_id:
|
|
2008
|
+
:type connector_id: int
|
|
2009
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2010
|
+
number provided, it will be total request
|
|
2011
|
+
timeout. It can also be a pair (tuple) of
|
|
2012
|
+
(connection, read) timeouts.
|
|
2013
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2014
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2015
|
+
request; this effectively ignores the
|
|
2016
|
+
authentication in the spec for a single request.
|
|
2017
|
+
:type _request_auth: dict, optional
|
|
2018
|
+
:param _content_type: force content-type for the request.
|
|
2019
|
+
:type _content_type: str, Optional
|
|
2020
|
+
:param _headers: set to override the headers for a single
|
|
2021
|
+
request; this effectively ignores the headers
|
|
2022
|
+
in the spec for a single request.
|
|
2023
|
+
:type _headers: dict, optional
|
|
2024
|
+
:param _host_index: set to override the host_index for a single
|
|
2025
|
+
request; this effectively ignores the host_index
|
|
2026
|
+
in the spec for a single request.
|
|
2027
|
+
:type _host_index: int, optional
|
|
2028
|
+
:return: Returns the result object.
|
|
2029
|
+
""" # noqa: E501
|
|
2030
|
+
|
|
2031
|
+
_param = self._website_connector_settings_serialize(
|
|
2032
|
+
username=username,
|
|
2033
|
+
dataset=dataset,
|
|
2034
|
+
connector_id=connector_id,
|
|
2035
|
+
_request_auth=_request_auth,
|
|
2036
|
+
_content_type=_content_type,
|
|
2037
|
+
_headers=_headers,
|
|
2038
|
+
_host_index=_host_index
|
|
2039
|
+
)
|
|
2040
|
+
|
|
2041
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2042
|
+
'200': "WebsiteConnectorSettings",
|
|
2043
|
+
'422': "HTTPValidationError",
|
|
2044
|
+
}
|
|
2045
|
+
response_data = self.api_client.call_api(
|
|
2046
|
+
*_param,
|
|
2047
|
+
_request_timeout=_request_timeout
|
|
2048
|
+
)
|
|
2049
|
+
response_data.read()
|
|
2050
|
+
return self.api_client.response_deserialize(
|
|
2051
|
+
response_data=response_data,
|
|
2052
|
+
response_types_map=_response_types_map,
|
|
2053
|
+
).data
|
|
2054
|
+
|
|
2055
|
+
|
|
2056
|
+
@validate_call
|
|
2057
|
+
def website_connector_settings_with_http_info(
|
|
2058
|
+
self,
|
|
2059
|
+
username: Annotated[str, Field(min_length=1, strict=True)],
|
|
2060
|
+
dataset: Annotated[str, Field(min_length=1, strict=True)],
|
|
2061
|
+
connector_id: Optional[Annotated[int, Field(strict=True, ge=1)]] = None,
|
|
2062
|
+
_request_timeout: Union[
|
|
2063
|
+
None,
|
|
2064
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2065
|
+
Tuple[
|
|
2066
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2067
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2068
|
+
]
|
|
2069
|
+
] = None,
|
|
2070
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2071
|
+
_content_type: Optional[StrictStr] = None,
|
|
2072
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2073
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2074
|
+
) -> ApiResponse[WebsiteConnectorSettings]:
|
|
2075
|
+
"""Get Connector Settings
|
|
2076
|
+
|
|
2077
|
+
|
|
2078
|
+
:param username: (required)
|
|
2079
|
+
:type username: str
|
|
2080
|
+
:param dataset: (required)
|
|
2081
|
+
:type dataset: str
|
|
2082
|
+
:param connector_id:
|
|
2083
|
+
:type connector_id: int
|
|
2084
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2085
|
+
number provided, it will be total request
|
|
2086
|
+
timeout. It can also be a pair (tuple) of
|
|
2087
|
+
(connection, read) timeouts.
|
|
2088
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2089
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2090
|
+
request; this effectively ignores the
|
|
2091
|
+
authentication in the spec for a single request.
|
|
2092
|
+
:type _request_auth: dict, optional
|
|
2093
|
+
:param _content_type: force content-type for the request.
|
|
2094
|
+
:type _content_type: str, Optional
|
|
2095
|
+
:param _headers: set to override the headers for a single
|
|
2096
|
+
request; this effectively ignores the headers
|
|
2097
|
+
in the spec for a single request.
|
|
2098
|
+
:type _headers: dict, optional
|
|
2099
|
+
:param _host_index: set to override the host_index for a single
|
|
2100
|
+
request; this effectively ignores the host_index
|
|
2101
|
+
in the spec for a single request.
|
|
2102
|
+
:type _host_index: int, optional
|
|
2103
|
+
:return: Returns the result object.
|
|
2104
|
+
""" # noqa: E501
|
|
2105
|
+
|
|
2106
|
+
_param = self._website_connector_settings_serialize(
|
|
2107
|
+
username=username,
|
|
2108
|
+
dataset=dataset,
|
|
2109
|
+
connector_id=connector_id,
|
|
2110
|
+
_request_auth=_request_auth,
|
|
2111
|
+
_content_type=_content_type,
|
|
2112
|
+
_headers=_headers,
|
|
2113
|
+
_host_index=_host_index
|
|
2114
|
+
)
|
|
2115
|
+
|
|
2116
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2117
|
+
'200': "WebsiteConnectorSettings",
|
|
2118
|
+
'422': "HTTPValidationError",
|
|
2119
|
+
}
|
|
2120
|
+
response_data = self.api_client.call_api(
|
|
2121
|
+
*_param,
|
|
2122
|
+
_request_timeout=_request_timeout
|
|
2123
|
+
)
|
|
2124
|
+
response_data.read()
|
|
2125
|
+
return self.api_client.response_deserialize(
|
|
2126
|
+
response_data=response_data,
|
|
2127
|
+
response_types_map=_response_types_map,
|
|
2128
|
+
)
|
|
2129
|
+
|
|
2130
|
+
|
|
2131
|
+
@validate_call
|
|
2132
|
+
def website_connector_settings_without_preload_content(
|
|
2133
|
+
self,
|
|
2134
|
+
username: Annotated[str, Field(min_length=1, strict=True)],
|
|
2135
|
+
dataset: Annotated[str, Field(min_length=1, strict=True)],
|
|
2136
|
+
connector_id: Optional[Annotated[int, Field(strict=True, ge=1)]] = None,
|
|
2137
|
+
_request_timeout: Union[
|
|
2138
|
+
None,
|
|
2139
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2140
|
+
Tuple[
|
|
2141
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2142
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2143
|
+
]
|
|
2144
|
+
] = None,
|
|
2145
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2146
|
+
_content_type: Optional[StrictStr] = None,
|
|
2147
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2148
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2149
|
+
) -> RESTResponseType:
|
|
2150
|
+
"""Get Connector Settings
|
|
2151
|
+
|
|
2152
|
+
|
|
2153
|
+
:param username: (required)
|
|
2154
|
+
:type username: str
|
|
2155
|
+
:param dataset: (required)
|
|
2156
|
+
:type dataset: str
|
|
2157
|
+
:param connector_id:
|
|
2158
|
+
:type connector_id: int
|
|
2159
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2160
|
+
number provided, it will be total request
|
|
2161
|
+
timeout. It can also be a pair (tuple) of
|
|
2162
|
+
(connection, read) timeouts.
|
|
2163
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2164
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2165
|
+
request; this effectively ignores the
|
|
2166
|
+
authentication in the spec for a single request.
|
|
2167
|
+
:type _request_auth: dict, optional
|
|
2168
|
+
:param _content_type: force content-type for the request.
|
|
2169
|
+
:type _content_type: str, Optional
|
|
2170
|
+
:param _headers: set to override the headers for a single
|
|
2171
|
+
request; this effectively ignores the headers
|
|
2172
|
+
in the spec for a single request.
|
|
2173
|
+
:type _headers: dict, optional
|
|
2174
|
+
:param _host_index: set to override the host_index for a single
|
|
2175
|
+
request; this effectively ignores the host_index
|
|
2176
|
+
in the spec for a single request.
|
|
2177
|
+
:type _host_index: int, optional
|
|
2178
|
+
:return: Returns the result object.
|
|
2179
|
+
""" # noqa: E501
|
|
2180
|
+
|
|
2181
|
+
_param = self._website_connector_settings_serialize(
|
|
2182
|
+
username=username,
|
|
2183
|
+
dataset=dataset,
|
|
2184
|
+
connector_id=connector_id,
|
|
2185
|
+
_request_auth=_request_auth,
|
|
2186
|
+
_content_type=_content_type,
|
|
2187
|
+
_headers=_headers,
|
|
2188
|
+
_host_index=_host_index
|
|
2189
|
+
)
|
|
2190
|
+
|
|
2191
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2192
|
+
'200': "WebsiteConnectorSettings",
|
|
2193
|
+
'422': "HTTPValidationError",
|
|
2194
|
+
}
|
|
2195
|
+
response_data = self.api_client.call_api(
|
|
2196
|
+
*_param,
|
|
2197
|
+
_request_timeout=_request_timeout
|
|
2198
|
+
)
|
|
2199
|
+
return response_data.response
|
|
2200
|
+
|
|
2201
|
+
|
|
2202
|
+
def _website_connector_settings_serialize(
|
|
2203
|
+
self,
|
|
2204
|
+
username,
|
|
2205
|
+
dataset,
|
|
2206
|
+
connector_id,
|
|
2207
|
+
_request_auth,
|
|
2208
|
+
_content_type,
|
|
2209
|
+
_headers,
|
|
2210
|
+
_host_index,
|
|
2211
|
+
) -> RequestSerialized:
|
|
2212
|
+
|
|
2213
|
+
_host = None
|
|
2214
|
+
|
|
2215
|
+
_collection_formats: Dict[str, str] = {
|
|
2216
|
+
}
|
|
2217
|
+
|
|
2218
|
+
_path_params: Dict[str, str] = {}
|
|
2219
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2220
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2221
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2222
|
+
_files: Dict[
|
|
2223
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2224
|
+
] = {}
|
|
2225
|
+
_body_params: Optional[bytes] = None
|
|
2226
|
+
|
|
2227
|
+
# process the path parameters
|
|
2228
|
+
# process the query parameters
|
|
2229
|
+
if username is not None:
|
|
2230
|
+
|
|
2231
|
+
_query_params.append(('username', username))
|
|
2232
|
+
|
|
2233
|
+
if dataset is not None:
|
|
2234
|
+
|
|
2235
|
+
_query_params.append(('dataset', dataset))
|
|
2236
|
+
|
|
2237
|
+
if connector_id is not None:
|
|
2238
|
+
|
|
2239
|
+
_query_params.append(('connectorId', connector_id))
|
|
2240
|
+
|
|
2241
|
+
# process the header parameters
|
|
2242
|
+
# process the form parameters
|
|
2243
|
+
# process the body parameter
|
|
2244
|
+
|
|
2245
|
+
|
|
2246
|
+
# set the HTTP header `Accept`
|
|
2247
|
+
if 'Accept' not in _header_params:
|
|
2248
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2249
|
+
[
|
|
2250
|
+
'application/json'
|
|
2251
|
+
]
|
|
2252
|
+
)
|
|
2253
|
+
|
|
2254
|
+
|
|
2255
|
+
# authentication setting
|
|
2256
|
+
_auth_settings: List[str] = [
|
|
2257
|
+
'QAnswer-Api-Key',
|
|
2258
|
+
'Bearer token'
|
|
2259
|
+
]
|
|
2260
|
+
|
|
2261
|
+
return self.api_client.param_serialize(
|
|
2262
|
+
method='GET',
|
|
2263
|
+
resource_path='/backend/api/connectors/website/settings',
|
|
2264
|
+
path_params=_path_params,
|
|
2265
|
+
query_params=_query_params,
|
|
2266
|
+
header_params=_header_params,
|
|
2267
|
+
body=_body_params,
|
|
2268
|
+
post_params=_form_params,
|
|
2269
|
+
files=_files,
|
|
2270
|
+
auth_settings=_auth_settings,
|
|
2271
|
+
collection_formats=_collection_formats,
|
|
2272
|
+
_host=_host,
|
|
2273
|
+
_request_auth=_request_auth
|
|
2274
|
+
)
|
|
2275
|
+
|
|
2276
|
+
|
|
2277
|
+
|
|
2278
|
+
|
|
2279
|
+
@validate_call
|
|
2280
|
+
def website_connector_settings_update(
|
|
2281
|
+
self,
|
|
2282
|
+
website_connector_settings: WebsiteConnectorSettings,
|
|
2283
|
+
_request_timeout: Union[
|
|
2284
|
+
None,
|
|
2285
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2286
|
+
Tuple[
|
|
2287
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2288
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2289
|
+
]
|
|
2290
|
+
] = None,
|
|
2291
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2292
|
+
_content_type: Optional[StrictStr] = None,
|
|
2293
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2294
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2295
|
+
) -> WebsiteConnectorSettings:
|
|
2296
|
+
"""Update Connector Settings
|
|
2297
|
+
|
|
2298
|
+
|
|
2299
|
+
:param website_connector_settings: (required)
|
|
2300
|
+
:type website_connector_settings: WebsiteConnectorSettings
|
|
2301
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2302
|
+
number provided, it will be total request
|
|
2303
|
+
timeout. It can also be a pair (tuple) of
|
|
2304
|
+
(connection, read) timeouts.
|
|
2305
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2306
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2307
|
+
request; this effectively ignores the
|
|
2308
|
+
authentication in the spec for a single request.
|
|
2309
|
+
:type _request_auth: dict, optional
|
|
2310
|
+
:param _content_type: force content-type for the request.
|
|
2311
|
+
:type _content_type: str, Optional
|
|
2312
|
+
:param _headers: set to override the headers for a single
|
|
2313
|
+
request; this effectively ignores the headers
|
|
2314
|
+
in the spec for a single request.
|
|
2315
|
+
:type _headers: dict, optional
|
|
2316
|
+
:param _host_index: set to override the host_index for a single
|
|
2317
|
+
request; this effectively ignores the host_index
|
|
2318
|
+
in the spec for a single request.
|
|
2319
|
+
:type _host_index: int, optional
|
|
2320
|
+
:return: Returns the result object.
|
|
2321
|
+
""" # noqa: E501
|
|
2322
|
+
|
|
2323
|
+
_param = self._website_connector_settings_update_serialize(
|
|
2324
|
+
website_connector_settings=website_connector_settings,
|
|
2325
|
+
_request_auth=_request_auth,
|
|
2326
|
+
_content_type=_content_type,
|
|
2327
|
+
_headers=_headers,
|
|
2328
|
+
_host_index=_host_index
|
|
2329
|
+
)
|
|
2330
|
+
|
|
2331
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2332
|
+
'200': "WebsiteConnectorSettings",
|
|
2333
|
+
'422': "HTTPValidationError",
|
|
2334
|
+
}
|
|
2335
|
+
response_data = self.api_client.call_api(
|
|
2336
|
+
*_param,
|
|
2337
|
+
_request_timeout=_request_timeout
|
|
2338
|
+
)
|
|
2339
|
+
response_data.read()
|
|
2340
|
+
return self.api_client.response_deserialize(
|
|
2341
|
+
response_data=response_data,
|
|
2342
|
+
response_types_map=_response_types_map,
|
|
2343
|
+
).data
|
|
2344
|
+
|
|
2345
|
+
|
|
2346
|
+
@validate_call
|
|
2347
|
+
def website_connector_settings_update_with_http_info(
|
|
2348
|
+
self,
|
|
2349
|
+
website_connector_settings: WebsiteConnectorSettings,
|
|
2350
|
+
_request_timeout: Union[
|
|
2351
|
+
None,
|
|
2352
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2353
|
+
Tuple[
|
|
2354
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2355
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2356
|
+
]
|
|
2357
|
+
] = None,
|
|
2358
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2359
|
+
_content_type: Optional[StrictStr] = None,
|
|
2360
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2361
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2362
|
+
) -> ApiResponse[WebsiteConnectorSettings]:
|
|
2363
|
+
"""Update Connector Settings
|
|
2364
|
+
|
|
2365
|
+
|
|
2366
|
+
:param website_connector_settings: (required)
|
|
2367
|
+
:type website_connector_settings: WebsiteConnectorSettings
|
|
2368
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2369
|
+
number provided, it will be total request
|
|
2370
|
+
timeout. It can also be a pair (tuple) of
|
|
2371
|
+
(connection, read) timeouts.
|
|
2372
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2373
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2374
|
+
request; this effectively ignores the
|
|
2375
|
+
authentication in the spec for a single request.
|
|
2376
|
+
:type _request_auth: dict, optional
|
|
2377
|
+
:param _content_type: force content-type for the request.
|
|
2378
|
+
:type _content_type: str, Optional
|
|
2379
|
+
:param _headers: set to override the headers for a single
|
|
2380
|
+
request; this effectively ignores the headers
|
|
2381
|
+
in the spec for a single request.
|
|
2382
|
+
:type _headers: dict, optional
|
|
2383
|
+
:param _host_index: set to override the host_index for a single
|
|
2384
|
+
request; this effectively ignores the host_index
|
|
2385
|
+
in the spec for a single request.
|
|
2386
|
+
:type _host_index: int, optional
|
|
2387
|
+
:return: Returns the result object.
|
|
2388
|
+
""" # noqa: E501
|
|
2389
|
+
|
|
2390
|
+
_param = self._website_connector_settings_update_serialize(
|
|
2391
|
+
website_connector_settings=website_connector_settings,
|
|
2392
|
+
_request_auth=_request_auth,
|
|
2393
|
+
_content_type=_content_type,
|
|
2394
|
+
_headers=_headers,
|
|
2395
|
+
_host_index=_host_index
|
|
2396
|
+
)
|
|
2397
|
+
|
|
2398
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2399
|
+
'200': "WebsiteConnectorSettings",
|
|
2400
|
+
'422': "HTTPValidationError",
|
|
2401
|
+
}
|
|
2402
|
+
response_data = self.api_client.call_api(
|
|
2403
|
+
*_param,
|
|
2404
|
+
_request_timeout=_request_timeout
|
|
2405
|
+
)
|
|
2406
|
+
response_data.read()
|
|
2407
|
+
return self.api_client.response_deserialize(
|
|
2408
|
+
response_data=response_data,
|
|
2409
|
+
response_types_map=_response_types_map,
|
|
2410
|
+
)
|
|
2411
|
+
|
|
2412
|
+
|
|
2413
|
+
@validate_call
|
|
2414
|
+
def website_connector_settings_update_without_preload_content(
|
|
2415
|
+
self,
|
|
2416
|
+
website_connector_settings: WebsiteConnectorSettings,
|
|
2417
|
+
_request_timeout: Union[
|
|
2418
|
+
None,
|
|
2419
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2420
|
+
Tuple[
|
|
2421
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2422
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2423
|
+
]
|
|
2424
|
+
] = None,
|
|
2425
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2426
|
+
_content_type: Optional[StrictStr] = None,
|
|
2427
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2428
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2429
|
+
) -> RESTResponseType:
|
|
2430
|
+
"""Update Connector Settings
|
|
2431
|
+
|
|
2432
|
+
|
|
2433
|
+
:param website_connector_settings: (required)
|
|
2434
|
+
:type website_connector_settings: WebsiteConnectorSettings
|
|
2435
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2436
|
+
number provided, it will be total request
|
|
2437
|
+
timeout. It can also be a pair (tuple) of
|
|
2438
|
+
(connection, read) timeouts.
|
|
2439
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2440
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2441
|
+
request; this effectively ignores the
|
|
2442
|
+
authentication in the spec for a single request.
|
|
2443
|
+
:type _request_auth: dict, optional
|
|
2444
|
+
:param _content_type: force content-type for the request.
|
|
2445
|
+
:type _content_type: str, Optional
|
|
2446
|
+
:param _headers: set to override the headers for a single
|
|
2447
|
+
request; this effectively ignores the headers
|
|
2448
|
+
in the spec for a single request.
|
|
2449
|
+
:type _headers: dict, optional
|
|
2450
|
+
:param _host_index: set to override the host_index for a single
|
|
2451
|
+
request; this effectively ignores the host_index
|
|
2452
|
+
in the spec for a single request.
|
|
2453
|
+
:type _host_index: int, optional
|
|
2454
|
+
:return: Returns the result object.
|
|
2455
|
+
""" # noqa: E501
|
|
2456
|
+
|
|
2457
|
+
_param = self._website_connector_settings_update_serialize(
|
|
2458
|
+
website_connector_settings=website_connector_settings,
|
|
2459
|
+
_request_auth=_request_auth,
|
|
2460
|
+
_content_type=_content_type,
|
|
2461
|
+
_headers=_headers,
|
|
2462
|
+
_host_index=_host_index
|
|
2463
|
+
)
|
|
2464
|
+
|
|
2465
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2466
|
+
'200': "WebsiteConnectorSettings",
|
|
2467
|
+
'422': "HTTPValidationError",
|
|
2468
|
+
}
|
|
2469
|
+
response_data = self.api_client.call_api(
|
|
2470
|
+
*_param,
|
|
2471
|
+
_request_timeout=_request_timeout
|
|
2472
|
+
)
|
|
2473
|
+
return response_data.response
|
|
2474
|
+
|
|
2475
|
+
|
|
2476
|
+
def _website_connector_settings_update_serialize(
|
|
2477
|
+
self,
|
|
2478
|
+
website_connector_settings,
|
|
2479
|
+
_request_auth,
|
|
2480
|
+
_content_type,
|
|
2481
|
+
_headers,
|
|
2482
|
+
_host_index,
|
|
2483
|
+
) -> RequestSerialized:
|
|
2484
|
+
|
|
2485
|
+
_host = None
|
|
2486
|
+
|
|
2487
|
+
_collection_formats: Dict[str, str] = {
|
|
2488
|
+
}
|
|
2489
|
+
|
|
2490
|
+
_path_params: Dict[str, str] = {}
|
|
2491
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2492
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2493
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2494
|
+
_files: Dict[
|
|
2495
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2496
|
+
] = {}
|
|
2497
|
+
_body_params: Optional[bytes] = None
|
|
2498
|
+
|
|
2499
|
+
# process the path parameters
|
|
2500
|
+
# process the query parameters
|
|
2501
|
+
# process the header parameters
|
|
2502
|
+
# process the form parameters
|
|
2503
|
+
# process the body parameter
|
|
2504
|
+
if website_connector_settings is not None:
|
|
2505
|
+
_body_params = website_connector_settings
|
|
2506
|
+
|
|
2507
|
+
|
|
2508
|
+
# set the HTTP header `Accept`
|
|
2509
|
+
if 'Accept' not in _header_params:
|
|
2510
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2511
|
+
[
|
|
2512
|
+
'application/json'
|
|
2513
|
+
]
|
|
2514
|
+
)
|
|
2515
|
+
|
|
2516
|
+
# set the HTTP header `Content-Type`
|
|
2517
|
+
if _content_type:
|
|
2518
|
+
_header_params['Content-Type'] = _content_type
|
|
2519
|
+
else:
|
|
2520
|
+
_default_content_type = (
|
|
2521
|
+
self.api_client.select_header_content_type(
|
|
2522
|
+
[
|
|
2523
|
+
'application/json'
|
|
2524
|
+
]
|
|
2525
|
+
)
|
|
2526
|
+
)
|
|
2527
|
+
if _default_content_type is not None:
|
|
2528
|
+
_header_params['Content-Type'] = _default_content_type
|
|
2529
|
+
|
|
2530
|
+
# authentication setting
|
|
2531
|
+
_auth_settings: List[str] = [
|
|
2532
|
+
'QAnswer-Api-Key',
|
|
2533
|
+
'Bearer token'
|
|
2534
|
+
]
|
|
2535
|
+
|
|
2536
|
+
return self.api_client.param_serialize(
|
|
2537
|
+
method='POST',
|
|
2538
|
+
resource_path='/backend/api/connectors/website/settings',
|
|
2539
|
+
path_params=_path_params,
|
|
2540
|
+
query_params=_query_params,
|
|
2541
|
+
header_params=_header_params,
|
|
2542
|
+
body=_body_params,
|
|
2543
|
+
post_params=_form_params,
|
|
2544
|
+
files=_files,
|
|
2545
|
+
auth_settings=_auth_settings,
|
|
2546
|
+
collection_formats=_collection_formats,
|
|
2547
|
+
_host=_host,
|
|
2548
|
+
_request_auth=_request_auth
|
|
2549
|
+
)
|
|
2550
|
+
|
|
2551
|
+
|
|
2552
|
+
|
|
2553
|
+
|
|
2554
|
+
@validate_call
|
|
2555
|
+
def website_connector_upload(
|
|
2556
|
+
self,
|
|
2557
|
+
website_add_payload: WebsiteAddPayload,
|
|
2558
|
+
_request_timeout: Union[
|
|
2559
|
+
None,
|
|
2560
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2561
|
+
Tuple[
|
|
2562
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2563
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2564
|
+
]
|
|
2565
|
+
] = None,
|
|
2566
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2567
|
+
_content_type: Optional[StrictStr] = None,
|
|
2568
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2569
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2570
|
+
) -> StatusResponse:
|
|
2571
|
+
"""Add Websites
|
|
2572
|
+
|
|
2573
|
+
Add Websites to a Website Connector
|
|
2574
|
+
|
|
2575
|
+
:param website_add_payload: (required)
|
|
2576
|
+
:type website_add_payload: WebsiteAddPayload
|
|
2577
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2578
|
+
number provided, it will be total request
|
|
2579
|
+
timeout. It can also be a pair (tuple) of
|
|
2580
|
+
(connection, read) timeouts.
|
|
2581
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2582
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2583
|
+
request; this effectively ignores the
|
|
2584
|
+
authentication in the spec for a single request.
|
|
2585
|
+
:type _request_auth: dict, optional
|
|
2586
|
+
:param _content_type: force content-type for the request.
|
|
2587
|
+
:type _content_type: str, Optional
|
|
2588
|
+
:param _headers: set to override the headers for a single
|
|
2589
|
+
request; this effectively ignores the headers
|
|
2590
|
+
in the spec for a single request.
|
|
2591
|
+
:type _headers: dict, optional
|
|
2592
|
+
:param _host_index: set to override the host_index for a single
|
|
2593
|
+
request; this effectively ignores the host_index
|
|
2594
|
+
in the spec for a single request.
|
|
2595
|
+
:type _host_index: int, optional
|
|
2596
|
+
:return: Returns the result object.
|
|
2597
|
+
""" # noqa: E501
|
|
2598
|
+
|
|
2599
|
+
_param = self._website_connector_upload_serialize(
|
|
2600
|
+
website_add_payload=website_add_payload,
|
|
2601
|
+
_request_auth=_request_auth,
|
|
2602
|
+
_content_type=_content_type,
|
|
2603
|
+
_headers=_headers,
|
|
2604
|
+
_host_index=_host_index
|
|
2605
|
+
)
|
|
2606
|
+
|
|
2607
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2608
|
+
'200': "StatusResponse",
|
|
2609
|
+
'422': "HTTPValidationError",
|
|
2610
|
+
}
|
|
2611
|
+
response_data = self.api_client.call_api(
|
|
2612
|
+
*_param,
|
|
2613
|
+
_request_timeout=_request_timeout
|
|
2614
|
+
)
|
|
2615
|
+
response_data.read()
|
|
2616
|
+
return self.api_client.response_deserialize(
|
|
2617
|
+
response_data=response_data,
|
|
2618
|
+
response_types_map=_response_types_map,
|
|
2619
|
+
).data
|
|
2620
|
+
|
|
2621
|
+
|
|
2622
|
+
@validate_call
|
|
2623
|
+
def website_connector_upload_with_http_info(
|
|
2624
|
+
self,
|
|
2625
|
+
website_add_payload: WebsiteAddPayload,
|
|
2626
|
+
_request_timeout: Union[
|
|
2627
|
+
None,
|
|
2628
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2629
|
+
Tuple[
|
|
2630
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2631
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2632
|
+
]
|
|
2633
|
+
] = None,
|
|
2634
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2635
|
+
_content_type: Optional[StrictStr] = None,
|
|
2636
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2637
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2638
|
+
) -> ApiResponse[StatusResponse]:
|
|
2639
|
+
"""Add Websites
|
|
2640
|
+
|
|
2641
|
+
Add Websites to a Website Connector
|
|
2642
|
+
|
|
2643
|
+
:param website_add_payload: (required)
|
|
2644
|
+
:type website_add_payload: WebsiteAddPayload
|
|
2645
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2646
|
+
number provided, it will be total request
|
|
2647
|
+
timeout. It can also be a pair (tuple) of
|
|
2648
|
+
(connection, read) timeouts.
|
|
2649
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2650
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2651
|
+
request; this effectively ignores the
|
|
2652
|
+
authentication in the spec for a single request.
|
|
2653
|
+
:type _request_auth: dict, optional
|
|
2654
|
+
:param _content_type: force content-type for the request.
|
|
2655
|
+
:type _content_type: str, Optional
|
|
2656
|
+
:param _headers: set to override the headers for a single
|
|
2657
|
+
request; this effectively ignores the headers
|
|
2658
|
+
in the spec for a single request.
|
|
2659
|
+
:type _headers: dict, optional
|
|
2660
|
+
:param _host_index: set to override the host_index for a single
|
|
2661
|
+
request; this effectively ignores the host_index
|
|
2662
|
+
in the spec for a single request.
|
|
2663
|
+
:type _host_index: int, optional
|
|
2664
|
+
:return: Returns the result object.
|
|
2665
|
+
""" # noqa: E501
|
|
2666
|
+
|
|
2667
|
+
_param = self._website_connector_upload_serialize(
|
|
2668
|
+
website_add_payload=website_add_payload,
|
|
2669
|
+
_request_auth=_request_auth,
|
|
2670
|
+
_content_type=_content_type,
|
|
2671
|
+
_headers=_headers,
|
|
2672
|
+
_host_index=_host_index
|
|
2673
|
+
)
|
|
2674
|
+
|
|
2675
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2676
|
+
'200': "StatusResponse",
|
|
2677
|
+
'422': "HTTPValidationError",
|
|
2678
|
+
}
|
|
2679
|
+
response_data = self.api_client.call_api(
|
|
2680
|
+
*_param,
|
|
2681
|
+
_request_timeout=_request_timeout
|
|
2682
|
+
)
|
|
2683
|
+
response_data.read()
|
|
2684
|
+
return self.api_client.response_deserialize(
|
|
2685
|
+
response_data=response_data,
|
|
2686
|
+
response_types_map=_response_types_map,
|
|
2687
|
+
)
|
|
2688
|
+
|
|
2689
|
+
|
|
2690
|
+
@validate_call
|
|
2691
|
+
def website_connector_upload_without_preload_content(
|
|
2692
|
+
self,
|
|
2693
|
+
website_add_payload: WebsiteAddPayload,
|
|
2694
|
+
_request_timeout: Union[
|
|
2695
|
+
None,
|
|
2696
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2697
|
+
Tuple[
|
|
2698
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2699
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2700
|
+
]
|
|
2701
|
+
] = None,
|
|
2702
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2703
|
+
_content_type: Optional[StrictStr] = None,
|
|
2704
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2705
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2706
|
+
) -> RESTResponseType:
|
|
2707
|
+
"""Add Websites
|
|
2708
|
+
|
|
2709
|
+
Add Websites to a Website Connector
|
|
2710
|
+
|
|
2711
|
+
:param website_add_payload: (required)
|
|
2712
|
+
:type website_add_payload: WebsiteAddPayload
|
|
2713
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2714
|
+
number provided, it will be total request
|
|
2715
|
+
timeout. It can also be a pair (tuple) of
|
|
2716
|
+
(connection, read) timeouts.
|
|
2717
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2718
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2719
|
+
request; this effectively ignores the
|
|
2720
|
+
authentication in the spec for a single request.
|
|
2721
|
+
:type _request_auth: dict, optional
|
|
2722
|
+
:param _content_type: force content-type for the request.
|
|
2723
|
+
:type _content_type: str, Optional
|
|
2724
|
+
:param _headers: set to override the headers for a single
|
|
2725
|
+
request; this effectively ignores the headers
|
|
2726
|
+
in the spec for a single request.
|
|
2727
|
+
:type _headers: dict, optional
|
|
2728
|
+
:param _host_index: set to override the host_index for a single
|
|
2729
|
+
request; this effectively ignores the host_index
|
|
2730
|
+
in the spec for a single request.
|
|
2731
|
+
:type _host_index: int, optional
|
|
2732
|
+
:return: Returns the result object.
|
|
2733
|
+
""" # noqa: E501
|
|
2734
|
+
|
|
2735
|
+
_param = self._website_connector_upload_serialize(
|
|
2736
|
+
website_add_payload=website_add_payload,
|
|
2737
|
+
_request_auth=_request_auth,
|
|
2738
|
+
_content_type=_content_type,
|
|
2739
|
+
_headers=_headers,
|
|
2740
|
+
_host_index=_host_index
|
|
2741
|
+
)
|
|
2742
|
+
|
|
2743
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2744
|
+
'200': "StatusResponse",
|
|
2745
|
+
'422': "HTTPValidationError",
|
|
2746
|
+
}
|
|
2747
|
+
response_data = self.api_client.call_api(
|
|
2748
|
+
*_param,
|
|
2749
|
+
_request_timeout=_request_timeout
|
|
2750
|
+
)
|
|
2751
|
+
return response_data.response
|
|
2752
|
+
|
|
2753
|
+
|
|
2754
|
+
def _website_connector_upload_serialize(
|
|
2755
|
+
self,
|
|
2756
|
+
website_add_payload,
|
|
2757
|
+
_request_auth,
|
|
2758
|
+
_content_type,
|
|
2759
|
+
_headers,
|
|
2760
|
+
_host_index,
|
|
2761
|
+
) -> RequestSerialized:
|
|
2762
|
+
|
|
2763
|
+
_host = None
|
|
2764
|
+
|
|
2765
|
+
_collection_formats: Dict[str, str] = {
|
|
2766
|
+
}
|
|
2767
|
+
|
|
2768
|
+
_path_params: Dict[str, str] = {}
|
|
2769
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2770
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2771
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2772
|
+
_files: Dict[
|
|
2773
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2774
|
+
] = {}
|
|
2775
|
+
_body_params: Optional[bytes] = None
|
|
2776
|
+
|
|
2777
|
+
# process the path parameters
|
|
2778
|
+
# process the query parameters
|
|
2779
|
+
# process the header parameters
|
|
2780
|
+
# process the form parameters
|
|
2781
|
+
# process the body parameter
|
|
2782
|
+
if website_add_payload is not None:
|
|
2783
|
+
_body_params = website_add_payload
|
|
2784
|
+
|
|
2785
|
+
|
|
2786
|
+
# set the HTTP header `Accept`
|
|
2787
|
+
if 'Accept' not in _header_params:
|
|
2788
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2789
|
+
[
|
|
2790
|
+
'application/json'
|
|
2791
|
+
]
|
|
2792
|
+
)
|
|
2793
|
+
|
|
2794
|
+
# set the HTTP header `Content-Type`
|
|
2795
|
+
if _content_type:
|
|
2796
|
+
_header_params['Content-Type'] = _content_type
|
|
2797
|
+
else:
|
|
2798
|
+
_default_content_type = (
|
|
2799
|
+
self.api_client.select_header_content_type(
|
|
2800
|
+
[
|
|
2801
|
+
'application/json'
|
|
2802
|
+
]
|
|
2803
|
+
)
|
|
2804
|
+
)
|
|
2805
|
+
if _default_content_type is not None:
|
|
2806
|
+
_header_params['Content-Type'] = _default_content_type
|
|
2807
|
+
|
|
2808
|
+
# authentication setting
|
|
2809
|
+
_auth_settings: List[str] = [
|
|
2810
|
+
'QAnswer-Api-Key',
|
|
2811
|
+
'Bearer token'
|
|
2812
|
+
]
|
|
2813
|
+
|
|
2814
|
+
return self.api_client.param_serialize(
|
|
2815
|
+
method='POST',
|
|
2816
|
+
resource_path='/backend/api/connectors/website/add',
|
|
2817
|
+
path_params=_path_params,
|
|
2818
|
+
query_params=_query_params,
|
|
2819
|
+
header_params=_header_params,
|
|
2820
|
+
body=_body_params,
|
|
2821
|
+
post_params=_form_params,
|
|
2822
|
+
files=_files,
|
|
2823
|
+
auth_settings=_auth_settings,
|
|
2824
|
+
collection_formats=_collection_formats,
|
|
2825
|
+
_host=_host,
|
|
2826
|
+
_request_auth=_request_auth
|
|
2827
|
+
)
|
|
2828
|
+
|
|
2829
|
+
|