qanswer-sdk 0.1.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 +1256 -0
- qanswer_sdk/api/__init__.py +63 -0
- qanswer_sdk/api/admin_api.py +7893 -0
- qanswer_sdk/api/ai_assistant_access_rights_api.py +5881 -0
- qanswer_sdk/api/ai_assistant_api.py +11047 -0
- qanswer_sdk/api/anthropic_compatible_api.py +311 -0
- qanswer_sdk/api/auto_complete_api.py +612 -0
- qanswer_sdk/api/bot_slack_api.py +1015 -0
- qanswer_sdk/api/branding_api.py +5733 -0
- qanswer_sdk/api/bulk_reindex_api.py +2029 -0
- qanswer_sdk/api/chatbot_api.py +1102 -0
- qanswer_sdk/api/connector_audio_api.py +3469 -0
- qanswer_sdk/api/connector_document_api.py +2685 -0
- qanswer_sdk/api/connector_e_consilium_api.py +333 -0
- qanswer_sdk/api/connector_e_consilium_search_index_api_api.py +1231 -0
- qanswer_sdk/api/connector_google_drive_api.py +2175 -0
- qanswer_sdk/api/connector_imapapi_api.py +1866 -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 +1454 -0
- qanswer_sdk/api/connector_rdf_api.py +5090 -0
- qanswer_sdk/api/connector_sharepoint_api.py +3926 -0
- qanswer_sdk/api/connector_websearch_api.py +332 -0
- qanswer_sdk/api/connector_website_api.py +3108 -0
- qanswer_sdk/api/connector_x_wiki_api_api.py +1278 -0
- qanswer_sdk/api/connectors_api.py +6946 -0
- qanswer_sdk/api/connectors_data_api.py +5903 -0
- qanswer_sdk/api/conversation_logs_api.py +14228 -0
- qanswer_sdk/api/dataset_config_api.py +4016 -0
- qanswer_sdk/api/debug_api.py +278 -0
- qanswer_sdk/api/default_api.py +763 -0
- qanswer_sdk/api/frontend_config_api.py +270 -0
- qanswer_sdk/api/health_check_api_api.py +278 -0
- qanswer_sdk/api/mcp_api.py +10758 -0
- qanswer_sdk/api/metadata_api.py +1309 -0
- qanswer_sdk/api/notifications_api.py +1842 -0
- qanswer_sdk/api/o_auth2_api.py +648 -0
- qanswer_sdk/api/open_ai_compatible_api.py +1093 -0
- qanswer_sdk/api/payment_api.py +1854 -0
- qanswer_sdk/api/retention_policy_api.py +4404 -0
- qanswer_sdk/api/socket_api.py +4706 -0
- qanswer_sdk/api/speech_to_text_api.py +968 -0
- qanswer_sdk/api/task_ai_excel_api.py +3749 -0
- qanswer_sdk/api/task_chat_api.py +2079 -0
- qanswer_sdk/api/task_entity_linking_api.py +315 -0
- qanswer_sdk/api/task_rdf_linker_api.py +4407 -0
- qanswer_sdk/api/task_rdf_sparql_endpoint_api.py +3355 -0
- qanswer_sdk/api/task_rdf_text_linker_api.py +1513 -0
- qanswer_sdk/api/task_report_copilot_api.py +7355 -0
- qanswer_sdk/api/task_search_api.py +2142 -0
- qanswer_sdk/api/task_text2sparql_api.py +947 -0
- qanswer_sdk/api/task_text_classification_api.py +592 -0
- qanswer_sdk/api/tasks_api.py +26394 -0
- qanswer_sdk/api/tool_embedder_api.py +5532 -0
- qanswer_sdk/api/tool_llm_api.py +6364 -0
- qanswer_sdk/api/unit_organizations_api.py +8600 -0
- qanswer_sdk/api/unit_teams_api.py +4492 -0
- qanswer_sdk/api/unit_user_api.py +12759 -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 +562 -0
- qanswer_sdk/models/access_audio_spans_response_model.py +91 -0
- qanswer_sdk/models/access_pdf_payload_model.py +102 -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 +110 -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 +113 -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 +95 -0
- qanswer_sdk/models/ai_excel_entity_result.py +97 -0
- qanswer_sdk/models/ai_excel_entity_search_payload.py +95 -0
- qanswer_sdk/models/ai_excel_entity_search_response.py +103 -0
- qanswer_sdk/models/ai_excel_global_settings.py +95 -0
- qanswer_sdk/models/ai_excel_global_settings_request.py +95 -0
- qanswer_sdk/models/ai_excel_task_settings.py +119 -0
- qanswer_sdk/models/ai_excel_task_update.py +119 -0
- qanswer_sdk/models/ai_excel_template_create.py +119 -0
- qanswer_sdk/models/ai_excel_template_read.py +121 -0
- qanswer_sdk/models/ai_excel_template_settings_request.py +91 -0
- qanswer_sdk/models/ai_excel_template_update.py +125 -0
- qanswer_sdk/models/ai_excel_templates_search_request.py +104 -0
- qanswer_sdk/models/ai_excel_templates_search_response.py +101 -0
- qanswer_sdk/models/allowed_extension.py +53 -0
- qanswer_sdk/models/allowed_file_extensions.py +88 -0
- qanswer_sdk/models/api_key_header_type.py +39 -0
- qanswer_sdk/models/api_key_mcp_authentication_config.py +98 -0
- qanswer_sdk/models/applied_filter_type.py +37 -0
- qanswer_sdk/models/applied_metadata_filter.py +97 -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_retention_response.py +97 -0
- qanswer_sdk/models/assistant_task.py +43 -0
- qanswer_sdk/models/assistant_template_with_tools_selection_dto.py +123 -0
- qanswer_sdk/models/audio_allowed_file_extensions.py +87 -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_transcription_status.py +39 -0
- qanswer_sdk/models/audio_upload_response.py +91 -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 +92 -0
- qanswer_sdk/models/available_connectors_response.py +92 -0
- qanswer_sdk/models/available_logs_visibility_policy.py +91 -0
- qanswer_sdk/models/available_space_quota_for_dataset.py +95 -0
- qanswer_sdk/models/available_storage_preference.py +91 -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_reindex_counts_by_type.py +89 -0
- qanswer_sdk/models/bulk_reindex_item_status.py +41 -0
- qanswer_sdk/models/bulk_reindex_job_detail_dto.py +103 -0
- qanswer_sdk/models/bulk_reindex_job_dto.py +125 -0
- qanswer_sdk/models/bulk_reindex_job_item_dto.py +113 -0
- qanswer_sdk/models/bulk_reindex_job_item_sort_by.py +40 -0
- qanswer_sdk/models/bulk_reindex_job_status.py +41 -0
- qanswer_sdk/models/bulk_reindex_jobs_list_response.py +97 -0
- qanswer_sdk/models/bulk_reindex_preview_counts.py +99 -0
- qanswer_sdk/models/bulk_reindex_preview_request.py +91 -0
- qanswer_sdk/models/bulk_reindex_preview_response.py +102 -0
- qanswer_sdk/models/bulk_reindex_skip_reason.py +40 -0
- qanswer_sdk/models/bulk_reindex_sort_order.py +37 -0
- qanswer_sdk/models/bulk_reindex_submit_request.py +94 -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 +90 -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 +150 -0
- qanswer_sdk/models/chatbot_default_settings_response.py +95 -0
- qanswer_sdk/models/chatbot_llm_dto.py +120 -0
- qanswer_sdk/models/chatbot_response.py +143 -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/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 +96 -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 +114 -0
- qanswer_sdk/models/connector_type.py +51 -0
- qanswer_sdk/models/connector_type_dto.py +92 -0
- qanswer_sdk/models/connector_type_list_dto.py +95 -0
- qanswer_sdk/models/content_item.py +106 -0
- qanswer_sdk/models/content_item_type.py +39 -0
- qanswer_sdk/models/conversation_aggregations_request.py +107 -0
- qanswer_sdk/models/conversation_message.py +230 -0
- qanswer_sdk/models/conversation_message_error_key.py +52 -0
- qanswer_sdk/models/conversation_message_search_result.py +112 -0
- qanswer_sdk/models/conversation_model.py +144 -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_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/create_x_wiki_connector_request.py +103 -0
- qanswer_sdk/models/credits_info_dto.py +95 -0
- qanswer_sdk/models/credits_info_global_dto.py +97 -0
- qanswer_sdk/models/currency.py +38 -0
- qanswer_sdk/models/data.py +211 -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 +129 -0
- qanswer_sdk/models/dataset_detail.py +128 -0
- qanswer_sdk/models/dataset_detail_kg.py +88 -0
- qanswer_sdk/models/dataset_schema.py +193 -0
- qanswer_sdk/models/dataset_type.py +38 -0
- qanswer_sdk/models/dataset_update_object.py +185 -0
- qanswer_sdk/models/dataset_users_response.py +87 -0
- qanswer_sdk/models/default_prompt.py +100 -0
- qanswer_sdk/models/delete_connector_model.py +90 -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/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_parsing_task_settings.py +124 -0
- qanswer_sdk/models/document_parsing_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/document_parsing_task_update.py +121 -0
- qanswer_sdk/models/document_status_group.py +39 -0
- qanswer_sdk/models/document_status_response.py +89 -0
- qanswer_sdk/models/dummy_error.py +89 -0
- qanswer_sdk/models/duplicate_ai_excel_template_request.py +97 -0
- qanswer_sdk/models/duplicate_ai_excel_template_response.py +87 -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/effective_retention_dto.py +95 -0
- qanswer_sdk/models/email_folder.py +91 -0
- qanswer_sdk/models/email_request.py +87 -0
- qanswer_sdk/models/embedder_cost_filter.py +112 -0
- qanswer_sdk/models/embedder_cost_list.py +101 -0
- qanswer_sdk/models/embedder_create_dto.py +143 -0
- qanswer_sdk/models/embedder_detailed_dto.py +163 -0
- qanswer_sdk/models/embedder_dto.py +103 -0
- qanswer_sdk/models/embedder_list_dto.py +101 -0
- qanswer_sdk/models/embedder_ref.py +95 -0
- qanswer_sdk/models/embedder_update_dto.py +135 -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_validation_response.py +90 -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_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 +92 -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/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/extraction_strategy.py +38 -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 +132 -0
- qanswer_sdk/models/feedback_response.py +95 -0
- qanswer_sdk/models/feedback_update.py +105 -0
- qanswer_sdk/models/file_acl_principal.py +99 -0
- qanswer_sdk/models/file_acl_response.py +101 -0
- qanswer_sdk/models/file_es_meta_data.py +116 -0
- qanswer_sdk/models/file_failure_reason.py +49 -0
- qanswer_sdk/models/file_folder_model.py +117 -0
- qanswer_sdk/models/file_model.py +124 -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/g_drive_refresh_request.py +91 -0
- qanswer_sdk/models/generation_params.py +89 -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 +155 -0
- qanswer_sdk/models/google_drive_connector_config.py +110 -0
- qanswer_sdk/models/guardrail_endpoint.py +112 -0
- qanswer_sdk/models/guardrail_mode.py +38 -0
- qanswer_sdk/models/highlight_audio_payload_model.py +100 -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 +108 -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 +47 -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 +38 -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.py +95 -0
- qanswer_sdk/models/links.py +99 -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_socket_events.py +88 -0
- qanswer_sdk/models/list_synonyms_model.py +95 -0
- qanswer_sdk/models/llm_context_ranges.py +93 -0
- qanswer_sdk/models/llm_cost_filter.py +112 -0
- qanswer_sdk/models/llm_cost_list.py +101 -0
- qanswer_sdk/models/llm_create_dto.py +177 -0
- qanswer_sdk/models/llm_detailed_dto.py +198 -0
- qanswer_sdk/models/llm_dto.py +120 -0
- qanswer_sdk/models/llm_endpoint.py +179 -0
- qanswer_sdk/models/llm_endpoint_default_prompts.py +93 -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_modality.py +37 -0
- qanswer_sdk/models/llm_endpoint_provider.py +44 -0
- qanswer_sdk/models/llm_endpoint_read.py +179 -0
- qanswer_sdk/models/llm_endpoint_validation_response.py +90 -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 +174 -0
- qanswer_sdk/models/location_details.py +97 -0
- qanswer_sdk/models/log_stats_request.py +100 -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 +92 -0
- qanswer_sdk/models/logs_visibility_policy_response.py +92 -0
- qanswer_sdk/models/mcp_auth_field_definition.py +98 -0
- qanswer_sdk/models/mcp_auth_field_type.py +37 -0
- qanswer_sdk/models/mcp_authentication_type.py +39 -0
- qanswer_sdk/models/mcp_connection.py +108 -0
- qanswer_sdk/models/mcp_connection_create.py +100 -0
- qanswer_sdk/models/mcp_server.py +146 -0
- qanswer_sdk/models/mcp_server_create.py +116 -0
- qanswer_sdk/models/mcp_server_type.py +37 -0
- qanswer_sdk/models/mcp_server_update.py +114 -0
- qanswer_sdk/models/mcp_tool_dto.py +131 -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_sync_action.py +39 -0
- qanswer_sdk/models/mcp_tool_sync_diff.py +94 -0
- qanswer_sdk/models/mcp_tool_sync_preview.py +95 -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_authorize_body.py +105 -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 +98 -0
- qanswer_sdk/models/modify_file_display_name_request.py +97 -0
- qanswer_sdk/models/notification_dto.py +114 -0
- qanswer_sdk/models/notification_filter.py +107 -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 +100 -0
- qanswer_sdk/models/notification_payload_conversation_shared_dto.py +96 -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/org_llm_features_dto.py +89 -0
- qanswer_sdk/models/org_role.py +37 -0
- qanswer_sdk/models/org_user_profile_dto.py +210 -0
- qanswer_sdk/models/org_user_profile_list_dto.py +101 -0
- qanswer_sdk/models/organization_admin_dto.py +97 -0
- qanswer_sdk/models/organization_creation_dto.py +91 -0
- qanswer_sdk/models/organization_dto.py +93 -0
- qanswer_sdk/models/organization_list_dto.py +101 -0
- qanswer_sdk/models/organization_user_dto.py +101 -0
- qanswer_sdk/models/organization_user_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 +108 -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 +49 -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 +112 -0
- qanswer_sdk/models/publication_search_index_search_response.py +113 -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 +106 -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/rag_payload.py +185 -0
- qanswer_sdk/models/rag_response.py +147 -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_links_payload.py +96 -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 +121 -0
- qanswer_sdk/models/report_copilot_slot_task_settings_update.py +121 -0
- qanswer_sdk/models/report_copilot_task_settings.py +119 -0
- qanswer_sdk/models/report_copilot_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/report_copilot_task_update.py +119 -0
- qanswer_sdk/models/report_template.py +155 -0
- qanswer_sdk/models/report_template_create_payload.py +132 -0
- qanswer_sdk/models/report_template_image_upload_response.py +87 -0
- qanswer_sdk/models/report_template_simplified.py +116 -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 +136 -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_api_connectors_config_dummy_models_union_get.py +228 -0
- qanswer_sdk/models/retention_policy_dto.py +106 -0
- qanswer_sdk/models/retention_policy_update.py +101 -0
- qanswer_sdk/models/retention_preview_response.py +92 -0
- qanswer_sdk/models/retention_run_progress_event.py +98 -0
- qanswer_sdk/models/retention_run_status_response.py +91 -0
- qanswer_sdk/models/retention_scope_type.py +38 -0
- qanswer_sdk/models/retention_sweep_result.py +89 -0
- qanswer_sdk/models/retention_unit.py +38 -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 +90 -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 +107 -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 +150 -0
- qanswer_sdk/models/search_response.py +120 -0
- qanswer_sdk/models/search_synonyms_resp.py +91 -0
- qanswer_sdk/models/search_task_settings.py +135 -0
- qanswer_sdk/models/search_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/search_task_update.py +133 -0
- qanswer_sdk/models/sender_type.py +38 -0
- qanswer_sdk/models/serve_pdf200_response.py +87 -0
- qanswer_sdk/models/share_point_connector_settings.py +99 -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_dto.py +116 -0
- qanswer_sdk/models/shared_team_access_dto.py +116 -0
- qanswer_sdk/models/shared_user.py +90 -0
- qanswer_sdk/models/sign_out_request.py +87 -0
- qanswer_sdk/models/sign_up_request.py +99 -0
- qanswer_sdk/models/slot.py +153 -0
- qanswer_sdk/models/slot_history_entry.py +119 -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 +133 -0
- qanswer_sdk/models/socker_join_user.py +91 -0
- qanswer_sdk/models/socket_audio_transcription_status.py +102 -0
- qanswer_sdk/models/socket_conversation_message.py +245 -0
- qanswer_sdk/models/socket_dataset_reindexing_status.py +97 -0
- qanswer_sdk/models/socket_events_q_answer.py +55 -0
- qanswer_sdk/models/socket_feedback_evaluation_progress.py +108 -0
- qanswer_sdk/models/socket_file_metadata.py +194 -0
- qanswer_sdk/models/socket_file_status_batch.py +103 -0
- qanswer_sdk/models/socket_file_status_item.py +99 -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 +109 -0
- qanswer_sdk/models/socket_report_continuation_response.py +100 -0
- qanswer_sdk/models/socket_report_copilot_generation_from_slots_response.py +116 -0
- qanswer_sdk/models/socket_report_copilot_generation_from_template_response.py +116 -0
- qanswer_sdk/models/socket_report_copilot_refinement_response.py +102 -0
- qanswer_sdk/models/socket_speech2_text_response.py +122 -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 +110 -0
- qanswer_sdk/models/stat_per_date.py +89 -0
- qanswer_sdk/models/status_response.py +89 -0
- qanswer_sdk/models/storage_active_status.py +37 -0
- qanswer_sdk/models/subscription_response.py +92 -0
- qanswer_sdk/models/subscription_status.py +39 -0
- qanswer_sdk/models/suggested_replies.py +87 -0
- qanswer_sdk/models/suggestion_list_response.py +87 -0
- qanswer_sdk/models/summa_server.py +101 -0
- qanswer_sdk/models/task_category.py +61 -0
- qanswer_sdk/models/task_name.py +43 -0
- qanswer_sdk/models/team_admin_dto.py +95 -0
- qanswer_sdk/models/team_creation_dto.py +89 -0
- qanswer_sdk/models/team_dto.py +93 -0
- qanswer_sdk/models/team_list_dto.py +101 -0
- qanswer_sdk/models/team_list_dto_teams_inner.py +149 -0
- qanswer_sdk/models/team_role.py +37 -0
- qanswer_sdk/models/team_with_count_dto.py +95 -0
- qanswer_sdk/models/teams_bot_auth_type.py +38 -0
- qanswer_sdk/models/teams_bot_registration_dto.py +107 -0
- qanswer_sdk/models/teams_bot_registration_upsert_dto.py +105 -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 +107 -0
- qanswer_sdk/models/test_imap_connection_payload.py +95 -0
- qanswer_sdk/models/text2_sparql_payload.py +187 -0
- qanswer_sdk/models/text2_sparql_task_settings.py +119 -0
- qanswer_sdk/models/text2_sparql_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/text2_sparql_task_update.py +119 -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_file_es_meta_data.py +116 -0
- qanswer_sdk/models/update_metadata_model.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/upload_metadata.py +115 -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_dto.py +120 -0
- qanswer_sdk/models/user_dataset_mcp_tool_selection_dto.py +100 -0
- qanswer_sdk/models/user_dto.py +91 -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_dto.py +102 -0
- qanswer_sdk/models/user_logs_list_dto.py +97 -0
- qanswer_sdk/models/user_mcp_tool_selection_dto.py +107 -0
- qanswer_sdk/models/user_oauth_token_dto.py +96 -0
- qanswer_sdk/models/user_profile_dto.py +199 -0
- qanswer_sdk/models/user_profile_list_dto.py +101 -0
- qanswer_sdk/models/user_team_dto.py +94 -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 +123 -0
- qanswer_sdk/models/widget_configs.py +109 -0
- qanswer_sdk/models/x_wiki_add_request.py +97 -0
- qanswer_sdk/models/x_wiki_download_by_ids.py +89 -0
- qanswer_sdk/py.typed +0 -0
- qanswer_sdk/rest.py +258 -0
- qanswer_sdk-0.1.0.dev0.dist-info/METADATA +252 -0
- qanswer_sdk-0.1.0.dev0.dist-info/RECORD +618 -0
- qanswer_sdk-0.1.0.dev0.dist-info/WHEEL +5 -0
- qanswer_sdk-0.1.0.dev0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,3926 @@
|
|
|
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, StrictBytes, StrictInt, StrictStr
|
|
20
|
+
from typing import Any, Optional, Tuple, Union
|
|
21
|
+
from typing_extensions import Annotated
|
|
22
|
+
from qanswer_sdk.models.auth_link_response import AuthLinkResponse
|
|
23
|
+
from qanswer_sdk.models.create_connector_response import CreateConnectorResponse
|
|
24
|
+
from qanswer_sdk.models.create_sharepoint_connector_from_certificate_request import CreateSharepointConnectorFromCertificateRequest
|
|
25
|
+
from qanswer_sdk.models.create_sharepoint_connector_request import CreateSharepointConnectorRequest
|
|
26
|
+
from qanswer_sdk.models.list_files_connector_response import ListFilesConnectorResponse
|
|
27
|
+
from qanswer_sdk.models.share_point_connector_settings import SharePointConnectorSettings
|
|
28
|
+
from qanswer_sdk.models.share_point_download_request import SharePointDownloadRequest
|
|
29
|
+
from qanswer_sdk.models.status_response import StatusResponse
|
|
30
|
+
|
|
31
|
+
from qanswer_sdk.api_client import ApiClient, RequestSerialized
|
|
32
|
+
from qanswer_sdk.api_response import ApiResponse
|
|
33
|
+
from qanswer_sdk.rest import RESTResponseType
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class ConnectorSharepointApi:
|
|
37
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
38
|
+
Ref: https://openapi-generator.tech
|
|
39
|
+
|
|
40
|
+
Do not edit the class manually.
|
|
41
|
+
"""
|
|
42
|
+
|
|
43
|
+
def __init__(self, api_client=None) -> None:
|
|
44
|
+
if api_client is None:
|
|
45
|
+
api_client = ApiClient.get_default()
|
|
46
|
+
self.api_client = api_client
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
@validate_call
|
|
50
|
+
def create_sharepoint_connector(
|
|
51
|
+
self,
|
|
52
|
+
create_sharepoint_connector_request: CreateSharepointConnectorRequest,
|
|
53
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
54
|
+
_request_timeout: Union[
|
|
55
|
+
None,
|
|
56
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
57
|
+
Tuple[
|
|
58
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
59
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
60
|
+
]
|
|
61
|
+
] = None,
|
|
62
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
63
|
+
_content_type: Optional[StrictStr] = None,
|
|
64
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
65
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
66
|
+
) -> CreateConnectorResponse:
|
|
67
|
+
"""Create Sharepoint Connector
|
|
68
|
+
|
|
69
|
+
Create SharePoint Connector
|
|
70
|
+
|
|
71
|
+
:param create_sharepoint_connector_request: (required)
|
|
72
|
+
:type create_sharepoint_connector_request: CreateSharepointConnectorRequest
|
|
73
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
74
|
+
:type q_answer_api_key: str
|
|
75
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
76
|
+
number provided, it will be total request
|
|
77
|
+
timeout. It can also be a pair (tuple) of
|
|
78
|
+
(connection, read) timeouts.
|
|
79
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
80
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
81
|
+
request; this effectively ignores the
|
|
82
|
+
authentication in the spec for a single request.
|
|
83
|
+
:type _request_auth: dict, optional
|
|
84
|
+
:param _content_type: force content-type for the request.
|
|
85
|
+
:type _content_type: str, Optional
|
|
86
|
+
:param _headers: set to override the headers for a single
|
|
87
|
+
request; this effectively ignores the headers
|
|
88
|
+
in the spec for a single request.
|
|
89
|
+
:type _headers: dict, optional
|
|
90
|
+
:param _host_index: set to override the host_index for a single
|
|
91
|
+
request; this effectively ignores the host_index
|
|
92
|
+
in the spec for a single request.
|
|
93
|
+
:type _host_index: int, optional
|
|
94
|
+
:return: Returns the result object.
|
|
95
|
+
""" # noqa: E501
|
|
96
|
+
|
|
97
|
+
_param = self._create_sharepoint_connector_serialize(
|
|
98
|
+
create_sharepoint_connector_request=create_sharepoint_connector_request,
|
|
99
|
+
q_answer_api_key=q_answer_api_key,
|
|
100
|
+
_request_auth=_request_auth,
|
|
101
|
+
_content_type=_content_type,
|
|
102
|
+
_headers=_headers,
|
|
103
|
+
_host_index=_host_index
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
107
|
+
'200': "CreateConnectorResponse",
|
|
108
|
+
'422': "HTTPValidationError",
|
|
109
|
+
}
|
|
110
|
+
response_data = self.api_client.call_api(
|
|
111
|
+
*_param,
|
|
112
|
+
_request_timeout=_request_timeout
|
|
113
|
+
)
|
|
114
|
+
response_data.read()
|
|
115
|
+
return self.api_client.response_deserialize(
|
|
116
|
+
response_data=response_data,
|
|
117
|
+
response_types_map=_response_types_map,
|
|
118
|
+
).data
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
@validate_call
|
|
122
|
+
def create_sharepoint_connector_with_http_info(
|
|
123
|
+
self,
|
|
124
|
+
create_sharepoint_connector_request: CreateSharepointConnectorRequest,
|
|
125
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
126
|
+
_request_timeout: Union[
|
|
127
|
+
None,
|
|
128
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
129
|
+
Tuple[
|
|
130
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
131
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
132
|
+
]
|
|
133
|
+
] = None,
|
|
134
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
135
|
+
_content_type: Optional[StrictStr] = None,
|
|
136
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
137
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
138
|
+
) -> ApiResponse[CreateConnectorResponse]:
|
|
139
|
+
"""Create Sharepoint Connector
|
|
140
|
+
|
|
141
|
+
Create SharePoint Connector
|
|
142
|
+
|
|
143
|
+
:param create_sharepoint_connector_request: (required)
|
|
144
|
+
:type create_sharepoint_connector_request: CreateSharepointConnectorRequest
|
|
145
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
146
|
+
:type q_answer_api_key: str
|
|
147
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
148
|
+
number provided, it will be total request
|
|
149
|
+
timeout. It can also be a pair (tuple) of
|
|
150
|
+
(connection, read) timeouts.
|
|
151
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
152
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
153
|
+
request; this effectively ignores the
|
|
154
|
+
authentication in the spec for a single request.
|
|
155
|
+
:type _request_auth: dict, optional
|
|
156
|
+
:param _content_type: force content-type for the request.
|
|
157
|
+
:type _content_type: str, Optional
|
|
158
|
+
:param _headers: set to override the headers for a single
|
|
159
|
+
request; this effectively ignores the headers
|
|
160
|
+
in the spec for a single request.
|
|
161
|
+
:type _headers: dict, optional
|
|
162
|
+
:param _host_index: set to override the host_index for a single
|
|
163
|
+
request; this effectively ignores the host_index
|
|
164
|
+
in the spec for a single request.
|
|
165
|
+
:type _host_index: int, optional
|
|
166
|
+
:return: Returns the result object.
|
|
167
|
+
""" # noqa: E501
|
|
168
|
+
|
|
169
|
+
_param = self._create_sharepoint_connector_serialize(
|
|
170
|
+
create_sharepoint_connector_request=create_sharepoint_connector_request,
|
|
171
|
+
q_answer_api_key=q_answer_api_key,
|
|
172
|
+
_request_auth=_request_auth,
|
|
173
|
+
_content_type=_content_type,
|
|
174
|
+
_headers=_headers,
|
|
175
|
+
_host_index=_host_index
|
|
176
|
+
)
|
|
177
|
+
|
|
178
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
179
|
+
'200': "CreateConnectorResponse",
|
|
180
|
+
'422': "HTTPValidationError",
|
|
181
|
+
}
|
|
182
|
+
response_data = self.api_client.call_api(
|
|
183
|
+
*_param,
|
|
184
|
+
_request_timeout=_request_timeout
|
|
185
|
+
)
|
|
186
|
+
response_data.read()
|
|
187
|
+
return self.api_client.response_deserialize(
|
|
188
|
+
response_data=response_data,
|
|
189
|
+
response_types_map=_response_types_map,
|
|
190
|
+
)
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
@validate_call
|
|
194
|
+
def create_sharepoint_connector_without_preload_content(
|
|
195
|
+
self,
|
|
196
|
+
create_sharepoint_connector_request: CreateSharepointConnectorRequest,
|
|
197
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
198
|
+
_request_timeout: Union[
|
|
199
|
+
None,
|
|
200
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
201
|
+
Tuple[
|
|
202
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
203
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
204
|
+
]
|
|
205
|
+
] = None,
|
|
206
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
207
|
+
_content_type: Optional[StrictStr] = None,
|
|
208
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
209
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
210
|
+
) -> RESTResponseType:
|
|
211
|
+
"""Create Sharepoint Connector
|
|
212
|
+
|
|
213
|
+
Create SharePoint Connector
|
|
214
|
+
|
|
215
|
+
:param create_sharepoint_connector_request: (required)
|
|
216
|
+
:type create_sharepoint_connector_request: CreateSharepointConnectorRequest
|
|
217
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
218
|
+
:type q_answer_api_key: str
|
|
219
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
220
|
+
number provided, it will be total request
|
|
221
|
+
timeout. It can also be a pair (tuple) of
|
|
222
|
+
(connection, read) timeouts.
|
|
223
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
224
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
225
|
+
request; this effectively ignores the
|
|
226
|
+
authentication in the spec for a single request.
|
|
227
|
+
:type _request_auth: dict, optional
|
|
228
|
+
:param _content_type: force content-type for the request.
|
|
229
|
+
:type _content_type: str, Optional
|
|
230
|
+
:param _headers: set to override the headers for a single
|
|
231
|
+
request; this effectively ignores the headers
|
|
232
|
+
in the spec for a single request.
|
|
233
|
+
:type _headers: dict, optional
|
|
234
|
+
:param _host_index: set to override the host_index for a single
|
|
235
|
+
request; this effectively ignores the host_index
|
|
236
|
+
in the spec for a single request.
|
|
237
|
+
:type _host_index: int, optional
|
|
238
|
+
:return: Returns the result object.
|
|
239
|
+
""" # noqa: E501
|
|
240
|
+
|
|
241
|
+
_param = self._create_sharepoint_connector_serialize(
|
|
242
|
+
create_sharepoint_connector_request=create_sharepoint_connector_request,
|
|
243
|
+
q_answer_api_key=q_answer_api_key,
|
|
244
|
+
_request_auth=_request_auth,
|
|
245
|
+
_content_type=_content_type,
|
|
246
|
+
_headers=_headers,
|
|
247
|
+
_host_index=_host_index
|
|
248
|
+
)
|
|
249
|
+
|
|
250
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
251
|
+
'200': "CreateConnectorResponse",
|
|
252
|
+
'422': "HTTPValidationError",
|
|
253
|
+
}
|
|
254
|
+
response_data = self.api_client.call_api(
|
|
255
|
+
*_param,
|
|
256
|
+
_request_timeout=_request_timeout
|
|
257
|
+
)
|
|
258
|
+
return response_data.response
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
def _create_sharepoint_connector_serialize(
|
|
262
|
+
self,
|
|
263
|
+
create_sharepoint_connector_request,
|
|
264
|
+
q_answer_api_key,
|
|
265
|
+
_request_auth,
|
|
266
|
+
_content_type,
|
|
267
|
+
_headers,
|
|
268
|
+
_host_index,
|
|
269
|
+
) -> RequestSerialized:
|
|
270
|
+
|
|
271
|
+
_host = None
|
|
272
|
+
|
|
273
|
+
_collection_formats: Dict[str, str] = {
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
_path_params: Dict[str, str] = {}
|
|
277
|
+
_query_params: List[Tuple[str, str]] = []
|
|
278
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
279
|
+
_form_params: List[Tuple[str, str]] = []
|
|
280
|
+
_files: Dict[
|
|
281
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
282
|
+
] = {}
|
|
283
|
+
_body_params: Optional[bytes] = None
|
|
284
|
+
|
|
285
|
+
# process the path parameters
|
|
286
|
+
# process the query parameters
|
|
287
|
+
# process the header parameters
|
|
288
|
+
if q_answer_api_key is not None:
|
|
289
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
|
290
|
+
# process the form parameters
|
|
291
|
+
# process the body parameter
|
|
292
|
+
if create_sharepoint_connector_request is not None:
|
|
293
|
+
_body_params = create_sharepoint_connector_request
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
# set the HTTP header `Accept`
|
|
297
|
+
if 'Accept' not in _header_params:
|
|
298
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
299
|
+
[
|
|
300
|
+
'application/json'
|
|
301
|
+
]
|
|
302
|
+
)
|
|
303
|
+
|
|
304
|
+
# set the HTTP header `Content-Type`
|
|
305
|
+
if _content_type:
|
|
306
|
+
_header_params['Content-Type'] = _content_type
|
|
307
|
+
else:
|
|
308
|
+
_default_content_type = (
|
|
309
|
+
self.api_client.select_header_content_type(
|
|
310
|
+
[
|
|
311
|
+
'application/json'
|
|
312
|
+
]
|
|
313
|
+
)
|
|
314
|
+
)
|
|
315
|
+
if _default_content_type is not None:
|
|
316
|
+
_header_params['Content-Type'] = _default_content_type
|
|
317
|
+
|
|
318
|
+
# authentication setting
|
|
319
|
+
_auth_settings: List[str] = [
|
|
320
|
+
'QAnswer-Api-Key',
|
|
321
|
+
'Bearer token'
|
|
322
|
+
]
|
|
323
|
+
|
|
324
|
+
return self.api_client.param_serialize(
|
|
325
|
+
method='POST',
|
|
326
|
+
resource_path='/api/connectors/sharepoint/create',
|
|
327
|
+
path_params=_path_params,
|
|
328
|
+
query_params=_query_params,
|
|
329
|
+
header_params=_header_params,
|
|
330
|
+
body=_body_params,
|
|
331
|
+
post_params=_form_params,
|
|
332
|
+
files=_files,
|
|
333
|
+
auth_settings=_auth_settings,
|
|
334
|
+
collection_formats=_collection_formats,
|
|
335
|
+
_host=_host,
|
|
336
|
+
_request_auth=_request_auth
|
|
337
|
+
)
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
@validate_call
|
|
343
|
+
def create_sharepoint_connector_with_certificate(
|
|
344
|
+
self,
|
|
345
|
+
data: CreateSharepointConnectorFromCertificateRequest,
|
|
346
|
+
certificate: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
|
|
347
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
348
|
+
_request_timeout: Union[
|
|
349
|
+
None,
|
|
350
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
351
|
+
Tuple[
|
|
352
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
353
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
354
|
+
]
|
|
355
|
+
] = None,
|
|
356
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
357
|
+
_content_type: Optional[StrictStr] = None,
|
|
358
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
359
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
360
|
+
) -> CreateConnectorResponse:
|
|
361
|
+
"""Create Sharepoint Connector With Certificate
|
|
362
|
+
|
|
363
|
+
Create SharePoint Connector with Certificate Authentication
|
|
364
|
+
|
|
365
|
+
:param data: (required)
|
|
366
|
+
:type data: CreateSharepointConnectorFromCertificateRequest
|
|
367
|
+
:param certificate: (required)
|
|
368
|
+
:type certificate: bytearray
|
|
369
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
370
|
+
:type q_answer_api_key: str
|
|
371
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
372
|
+
number provided, it will be total request
|
|
373
|
+
timeout. It can also be a pair (tuple) of
|
|
374
|
+
(connection, read) timeouts.
|
|
375
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
376
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
377
|
+
request; this effectively ignores the
|
|
378
|
+
authentication in the spec for a single request.
|
|
379
|
+
:type _request_auth: dict, optional
|
|
380
|
+
:param _content_type: force content-type for the request.
|
|
381
|
+
:type _content_type: str, Optional
|
|
382
|
+
:param _headers: set to override the headers for a single
|
|
383
|
+
request; this effectively ignores the headers
|
|
384
|
+
in the spec for a single request.
|
|
385
|
+
:type _headers: dict, optional
|
|
386
|
+
:param _host_index: set to override the host_index for a single
|
|
387
|
+
request; this effectively ignores the host_index
|
|
388
|
+
in the spec for a single request.
|
|
389
|
+
:type _host_index: int, optional
|
|
390
|
+
:return: Returns the result object.
|
|
391
|
+
""" # noqa: E501
|
|
392
|
+
|
|
393
|
+
_param = self._create_sharepoint_connector_with_certificate_serialize(
|
|
394
|
+
data=data,
|
|
395
|
+
certificate=certificate,
|
|
396
|
+
q_answer_api_key=q_answer_api_key,
|
|
397
|
+
_request_auth=_request_auth,
|
|
398
|
+
_content_type=_content_type,
|
|
399
|
+
_headers=_headers,
|
|
400
|
+
_host_index=_host_index
|
|
401
|
+
)
|
|
402
|
+
|
|
403
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
404
|
+
'200': "CreateConnectorResponse",
|
|
405
|
+
'422': "HTTPValidationError",
|
|
406
|
+
}
|
|
407
|
+
response_data = self.api_client.call_api(
|
|
408
|
+
*_param,
|
|
409
|
+
_request_timeout=_request_timeout
|
|
410
|
+
)
|
|
411
|
+
response_data.read()
|
|
412
|
+
return self.api_client.response_deserialize(
|
|
413
|
+
response_data=response_data,
|
|
414
|
+
response_types_map=_response_types_map,
|
|
415
|
+
).data
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
@validate_call
|
|
419
|
+
def create_sharepoint_connector_with_certificate_with_http_info(
|
|
420
|
+
self,
|
|
421
|
+
data: CreateSharepointConnectorFromCertificateRequest,
|
|
422
|
+
certificate: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
|
|
423
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
424
|
+
_request_timeout: Union[
|
|
425
|
+
None,
|
|
426
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
427
|
+
Tuple[
|
|
428
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
429
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
430
|
+
]
|
|
431
|
+
] = None,
|
|
432
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
433
|
+
_content_type: Optional[StrictStr] = None,
|
|
434
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
435
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
436
|
+
) -> ApiResponse[CreateConnectorResponse]:
|
|
437
|
+
"""Create Sharepoint Connector With Certificate
|
|
438
|
+
|
|
439
|
+
Create SharePoint Connector with Certificate Authentication
|
|
440
|
+
|
|
441
|
+
:param data: (required)
|
|
442
|
+
:type data: CreateSharepointConnectorFromCertificateRequest
|
|
443
|
+
:param certificate: (required)
|
|
444
|
+
:type certificate: bytearray
|
|
445
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
446
|
+
:type q_answer_api_key: str
|
|
447
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
448
|
+
number provided, it will be total request
|
|
449
|
+
timeout. It can also be a pair (tuple) of
|
|
450
|
+
(connection, read) timeouts.
|
|
451
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
452
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
453
|
+
request; this effectively ignores the
|
|
454
|
+
authentication in the spec for a single request.
|
|
455
|
+
:type _request_auth: dict, optional
|
|
456
|
+
:param _content_type: force content-type for the request.
|
|
457
|
+
:type _content_type: str, Optional
|
|
458
|
+
:param _headers: set to override the headers for a single
|
|
459
|
+
request; this effectively ignores the headers
|
|
460
|
+
in the spec for a single request.
|
|
461
|
+
:type _headers: dict, optional
|
|
462
|
+
:param _host_index: set to override the host_index for a single
|
|
463
|
+
request; this effectively ignores the host_index
|
|
464
|
+
in the spec for a single request.
|
|
465
|
+
:type _host_index: int, optional
|
|
466
|
+
:return: Returns the result object.
|
|
467
|
+
""" # noqa: E501
|
|
468
|
+
|
|
469
|
+
_param = self._create_sharepoint_connector_with_certificate_serialize(
|
|
470
|
+
data=data,
|
|
471
|
+
certificate=certificate,
|
|
472
|
+
q_answer_api_key=q_answer_api_key,
|
|
473
|
+
_request_auth=_request_auth,
|
|
474
|
+
_content_type=_content_type,
|
|
475
|
+
_headers=_headers,
|
|
476
|
+
_host_index=_host_index
|
|
477
|
+
)
|
|
478
|
+
|
|
479
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
480
|
+
'200': "CreateConnectorResponse",
|
|
481
|
+
'422': "HTTPValidationError",
|
|
482
|
+
}
|
|
483
|
+
response_data = self.api_client.call_api(
|
|
484
|
+
*_param,
|
|
485
|
+
_request_timeout=_request_timeout
|
|
486
|
+
)
|
|
487
|
+
response_data.read()
|
|
488
|
+
return self.api_client.response_deserialize(
|
|
489
|
+
response_data=response_data,
|
|
490
|
+
response_types_map=_response_types_map,
|
|
491
|
+
)
|
|
492
|
+
|
|
493
|
+
|
|
494
|
+
@validate_call
|
|
495
|
+
def create_sharepoint_connector_with_certificate_without_preload_content(
|
|
496
|
+
self,
|
|
497
|
+
data: CreateSharepointConnectorFromCertificateRequest,
|
|
498
|
+
certificate: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
|
|
499
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
500
|
+
_request_timeout: Union[
|
|
501
|
+
None,
|
|
502
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
503
|
+
Tuple[
|
|
504
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
505
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
506
|
+
]
|
|
507
|
+
] = None,
|
|
508
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
509
|
+
_content_type: Optional[StrictStr] = None,
|
|
510
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
511
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
512
|
+
) -> RESTResponseType:
|
|
513
|
+
"""Create Sharepoint Connector With Certificate
|
|
514
|
+
|
|
515
|
+
Create SharePoint Connector with Certificate Authentication
|
|
516
|
+
|
|
517
|
+
:param data: (required)
|
|
518
|
+
:type data: CreateSharepointConnectorFromCertificateRequest
|
|
519
|
+
:param certificate: (required)
|
|
520
|
+
:type certificate: bytearray
|
|
521
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
522
|
+
:type q_answer_api_key: str
|
|
523
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
524
|
+
number provided, it will be total request
|
|
525
|
+
timeout. It can also be a pair (tuple) of
|
|
526
|
+
(connection, read) timeouts.
|
|
527
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
528
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
529
|
+
request; this effectively ignores the
|
|
530
|
+
authentication in the spec for a single request.
|
|
531
|
+
:type _request_auth: dict, optional
|
|
532
|
+
:param _content_type: force content-type for the request.
|
|
533
|
+
:type _content_type: str, Optional
|
|
534
|
+
:param _headers: set to override the headers for a single
|
|
535
|
+
request; this effectively ignores the headers
|
|
536
|
+
in the spec for a single request.
|
|
537
|
+
:type _headers: dict, optional
|
|
538
|
+
:param _host_index: set to override the host_index for a single
|
|
539
|
+
request; this effectively ignores the host_index
|
|
540
|
+
in the spec for a single request.
|
|
541
|
+
:type _host_index: int, optional
|
|
542
|
+
:return: Returns the result object.
|
|
543
|
+
""" # noqa: E501
|
|
544
|
+
|
|
545
|
+
_param = self._create_sharepoint_connector_with_certificate_serialize(
|
|
546
|
+
data=data,
|
|
547
|
+
certificate=certificate,
|
|
548
|
+
q_answer_api_key=q_answer_api_key,
|
|
549
|
+
_request_auth=_request_auth,
|
|
550
|
+
_content_type=_content_type,
|
|
551
|
+
_headers=_headers,
|
|
552
|
+
_host_index=_host_index
|
|
553
|
+
)
|
|
554
|
+
|
|
555
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
556
|
+
'200': "CreateConnectorResponse",
|
|
557
|
+
'422': "HTTPValidationError",
|
|
558
|
+
}
|
|
559
|
+
response_data = self.api_client.call_api(
|
|
560
|
+
*_param,
|
|
561
|
+
_request_timeout=_request_timeout
|
|
562
|
+
)
|
|
563
|
+
return response_data.response
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
def _create_sharepoint_connector_with_certificate_serialize(
|
|
567
|
+
self,
|
|
568
|
+
data,
|
|
569
|
+
certificate,
|
|
570
|
+
q_answer_api_key,
|
|
571
|
+
_request_auth,
|
|
572
|
+
_content_type,
|
|
573
|
+
_headers,
|
|
574
|
+
_host_index,
|
|
575
|
+
) -> RequestSerialized:
|
|
576
|
+
|
|
577
|
+
_host = None
|
|
578
|
+
|
|
579
|
+
_collection_formats: Dict[str, str] = {
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
_path_params: Dict[str, str] = {}
|
|
583
|
+
_query_params: List[Tuple[str, str]] = []
|
|
584
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
585
|
+
_form_params: List[Tuple[str, str]] = []
|
|
586
|
+
_files: Dict[
|
|
587
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
588
|
+
] = {}
|
|
589
|
+
_body_params: Optional[bytes] = None
|
|
590
|
+
|
|
591
|
+
# process the path parameters
|
|
592
|
+
# process the query parameters
|
|
593
|
+
# process the header parameters
|
|
594
|
+
if q_answer_api_key is not None:
|
|
595
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
|
596
|
+
# process the form parameters
|
|
597
|
+
if data is not None:
|
|
598
|
+
_form_params.append(('data', data))
|
|
599
|
+
if certificate is not None:
|
|
600
|
+
_files['certificate'] = certificate
|
|
601
|
+
# process the body parameter
|
|
602
|
+
|
|
603
|
+
|
|
604
|
+
# set the HTTP header `Accept`
|
|
605
|
+
if 'Accept' not in _header_params:
|
|
606
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
607
|
+
[
|
|
608
|
+
'application/json'
|
|
609
|
+
]
|
|
610
|
+
)
|
|
611
|
+
|
|
612
|
+
# set the HTTP header `Content-Type`
|
|
613
|
+
if _content_type:
|
|
614
|
+
_header_params['Content-Type'] = _content_type
|
|
615
|
+
else:
|
|
616
|
+
_default_content_type = (
|
|
617
|
+
self.api_client.select_header_content_type(
|
|
618
|
+
[
|
|
619
|
+
'multipart/form-data'
|
|
620
|
+
]
|
|
621
|
+
)
|
|
622
|
+
)
|
|
623
|
+
if _default_content_type is not None:
|
|
624
|
+
_header_params['Content-Type'] = _default_content_type
|
|
625
|
+
|
|
626
|
+
# authentication setting
|
|
627
|
+
_auth_settings: List[str] = [
|
|
628
|
+
'QAnswer-Api-Key',
|
|
629
|
+
'Bearer token'
|
|
630
|
+
]
|
|
631
|
+
|
|
632
|
+
return self.api_client.param_serialize(
|
|
633
|
+
method='POST',
|
|
634
|
+
resource_path='/api/connectors/sharepoint/create-with-certificate',
|
|
635
|
+
path_params=_path_params,
|
|
636
|
+
query_params=_query_params,
|
|
637
|
+
header_params=_header_params,
|
|
638
|
+
body=_body_params,
|
|
639
|
+
post_params=_form_params,
|
|
640
|
+
files=_files,
|
|
641
|
+
auth_settings=_auth_settings,
|
|
642
|
+
collection_formats=_collection_formats,
|
|
643
|
+
_host=_host,
|
|
644
|
+
_request_auth=_request_auth
|
|
645
|
+
)
|
|
646
|
+
|
|
647
|
+
|
|
648
|
+
|
|
649
|
+
|
|
650
|
+
@validate_call
|
|
651
|
+
def download_sharepoint_files(
|
|
652
|
+
self,
|
|
653
|
+
share_point_download_request: SharePointDownloadRequest,
|
|
654
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
655
|
+
_request_timeout: Union[
|
|
656
|
+
None,
|
|
657
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
658
|
+
Tuple[
|
|
659
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
660
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
661
|
+
]
|
|
662
|
+
] = None,
|
|
663
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
664
|
+
_content_type: Optional[StrictStr] = None,
|
|
665
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
666
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
667
|
+
) -> StatusResponse:
|
|
668
|
+
"""Download Sharepoint Files
|
|
669
|
+
|
|
670
|
+
Download SharePoint files
|
|
671
|
+
|
|
672
|
+
:param share_point_download_request: (required)
|
|
673
|
+
:type share_point_download_request: SharePointDownloadRequest
|
|
674
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
675
|
+
:type q_answer_api_key: str
|
|
676
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
677
|
+
number provided, it will be total request
|
|
678
|
+
timeout. It can also be a pair (tuple) of
|
|
679
|
+
(connection, read) timeouts.
|
|
680
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
681
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
682
|
+
request; this effectively ignores the
|
|
683
|
+
authentication in the spec for a single request.
|
|
684
|
+
:type _request_auth: dict, optional
|
|
685
|
+
:param _content_type: force content-type for the request.
|
|
686
|
+
:type _content_type: str, Optional
|
|
687
|
+
:param _headers: set to override the headers for a single
|
|
688
|
+
request; this effectively ignores the headers
|
|
689
|
+
in the spec for a single request.
|
|
690
|
+
:type _headers: dict, optional
|
|
691
|
+
:param _host_index: set to override the host_index for a single
|
|
692
|
+
request; this effectively ignores the host_index
|
|
693
|
+
in the spec for a single request.
|
|
694
|
+
:type _host_index: int, optional
|
|
695
|
+
:return: Returns the result object.
|
|
696
|
+
""" # noqa: E501
|
|
697
|
+
|
|
698
|
+
_param = self._download_sharepoint_files_serialize(
|
|
699
|
+
share_point_download_request=share_point_download_request,
|
|
700
|
+
q_answer_api_key=q_answer_api_key,
|
|
701
|
+
_request_auth=_request_auth,
|
|
702
|
+
_content_type=_content_type,
|
|
703
|
+
_headers=_headers,
|
|
704
|
+
_host_index=_host_index
|
|
705
|
+
)
|
|
706
|
+
|
|
707
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
708
|
+
'200': "StatusResponse",
|
|
709
|
+
'422': "HTTPValidationError",
|
|
710
|
+
}
|
|
711
|
+
response_data = self.api_client.call_api(
|
|
712
|
+
*_param,
|
|
713
|
+
_request_timeout=_request_timeout
|
|
714
|
+
)
|
|
715
|
+
response_data.read()
|
|
716
|
+
return self.api_client.response_deserialize(
|
|
717
|
+
response_data=response_data,
|
|
718
|
+
response_types_map=_response_types_map,
|
|
719
|
+
).data
|
|
720
|
+
|
|
721
|
+
|
|
722
|
+
@validate_call
|
|
723
|
+
def download_sharepoint_files_with_http_info(
|
|
724
|
+
self,
|
|
725
|
+
share_point_download_request: SharePointDownloadRequest,
|
|
726
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
727
|
+
_request_timeout: Union[
|
|
728
|
+
None,
|
|
729
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
730
|
+
Tuple[
|
|
731
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
732
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
733
|
+
]
|
|
734
|
+
] = None,
|
|
735
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
736
|
+
_content_type: Optional[StrictStr] = None,
|
|
737
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
738
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
739
|
+
) -> ApiResponse[StatusResponse]:
|
|
740
|
+
"""Download Sharepoint Files
|
|
741
|
+
|
|
742
|
+
Download SharePoint files
|
|
743
|
+
|
|
744
|
+
:param share_point_download_request: (required)
|
|
745
|
+
:type share_point_download_request: SharePointDownloadRequest
|
|
746
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
747
|
+
:type q_answer_api_key: str
|
|
748
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
749
|
+
number provided, it will be total request
|
|
750
|
+
timeout. It can also be a pair (tuple) of
|
|
751
|
+
(connection, read) timeouts.
|
|
752
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
753
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
754
|
+
request; this effectively ignores the
|
|
755
|
+
authentication in the spec for a single request.
|
|
756
|
+
:type _request_auth: dict, optional
|
|
757
|
+
:param _content_type: force content-type for the request.
|
|
758
|
+
:type _content_type: str, Optional
|
|
759
|
+
:param _headers: set to override the headers for a single
|
|
760
|
+
request; this effectively ignores the headers
|
|
761
|
+
in the spec for a single request.
|
|
762
|
+
:type _headers: dict, optional
|
|
763
|
+
:param _host_index: set to override the host_index for a single
|
|
764
|
+
request; this effectively ignores the host_index
|
|
765
|
+
in the spec for a single request.
|
|
766
|
+
:type _host_index: int, optional
|
|
767
|
+
:return: Returns the result object.
|
|
768
|
+
""" # noqa: E501
|
|
769
|
+
|
|
770
|
+
_param = self._download_sharepoint_files_serialize(
|
|
771
|
+
share_point_download_request=share_point_download_request,
|
|
772
|
+
q_answer_api_key=q_answer_api_key,
|
|
773
|
+
_request_auth=_request_auth,
|
|
774
|
+
_content_type=_content_type,
|
|
775
|
+
_headers=_headers,
|
|
776
|
+
_host_index=_host_index
|
|
777
|
+
)
|
|
778
|
+
|
|
779
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
780
|
+
'200': "StatusResponse",
|
|
781
|
+
'422': "HTTPValidationError",
|
|
782
|
+
}
|
|
783
|
+
response_data = self.api_client.call_api(
|
|
784
|
+
*_param,
|
|
785
|
+
_request_timeout=_request_timeout
|
|
786
|
+
)
|
|
787
|
+
response_data.read()
|
|
788
|
+
return self.api_client.response_deserialize(
|
|
789
|
+
response_data=response_data,
|
|
790
|
+
response_types_map=_response_types_map,
|
|
791
|
+
)
|
|
792
|
+
|
|
793
|
+
|
|
794
|
+
@validate_call
|
|
795
|
+
def download_sharepoint_files_without_preload_content(
|
|
796
|
+
self,
|
|
797
|
+
share_point_download_request: SharePointDownloadRequest,
|
|
798
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
799
|
+
_request_timeout: Union[
|
|
800
|
+
None,
|
|
801
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
802
|
+
Tuple[
|
|
803
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
804
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
805
|
+
]
|
|
806
|
+
] = None,
|
|
807
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
808
|
+
_content_type: Optional[StrictStr] = None,
|
|
809
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
810
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
811
|
+
) -> RESTResponseType:
|
|
812
|
+
"""Download Sharepoint Files
|
|
813
|
+
|
|
814
|
+
Download SharePoint files
|
|
815
|
+
|
|
816
|
+
:param share_point_download_request: (required)
|
|
817
|
+
:type share_point_download_request: SharePointDownloadRequest
|
|
818
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
819
|
+
:type q_answer_api_key: str
|
|
820
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
821
|
+
number provided, it will be total request
|
|
822
|
+
timeout. It can also be a pair (tuple) of
|
|
823
|
+
(connection, read) timeouts.
|
|
824
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
825
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
826
|
+
request; this effectively ignores the
|
|
827
|
+
authentication in the spec for a single request.
|
|
828
|
+
:type _request_auth: dict, optional
|
|
829
|
+
:param _content_type: force content-type for the request.
|
|
830
|
+
:type _content_type: str, Optional
|
|
831
|
+
:param _headers: set to override the headers for a single
|
|
832
|
+
request; this effectively ignores the headers
|
|
833
|
+
in the spec for a single request.
|
|
834
|
+
:type _headers: dict, optional
|
|
835
|
+
:param _host_index: set to override the host_index for a single
|
|
836
|
+
request; this effectively ignores the host_index
|
|
837
|
+
in the spec for a single request.
|
|
838
|
+
:type _host_index: int, optional
|
|
839
|
+
:return: Returns the result object.
|
|
840
|
+
""" # noqa: E501
|
|
841
|
+
|
|
842
|
+
_param = self._download_sharepoint_files_serialize(
|
|
843
|
+
share_point_download_request=share_point_download_request,
|
|
844
|
+
q_answer_api_key=q_answer_api_key,
|
|
845
|
+
_request_auth=_request_auth,
|
|
846
|
+
_content_type=_content_type,
|
|
847
|
+
_headers=_headers,
|
|
848
|
+
_host_index=_host_index
|
|
849
|
+
)
|
|
850
|
+
|
|
851
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
852
|
+
'200': "StatusResponse",
|
|
853
|
+
'422': "HTTPValidationError",
|
|
854
|
+
}
|
|
855
|
+
response_data = self.api_client.call_api(
|
|
856
|
+
*_param,
|
|
857
|
+
_request_timeout=_request_timeout
|
|
858
|
+
)
|
|
859
|
+
return response_data.response
|
|
860
|
+
|
|
861
|
+
|
|
862
|
+
def _download_sharepoint_files_serialize(
|
|
863
|
+
self,
|
|
864
|
+
share_point_download_request,
|
|
865
|
+
q_answer_api_key,
|
|
866
|
+
_request_auth,
|
|
867
|
+
_content_type,
|
|
868
|
+
_headers,
|
|
869
|
+
_host_index,
|
|
870
|
+
) -> RequestSerialized:
|
|
871
|
+
|
|
872
|
+
_host = None
|
|
873
|
+
|
|
874
|
+
_collection_formats: Dict[str, str] = {
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
_path_params: Dict[str, str] = {}
|
|
878
|
+
_query_params: List[Tuple[str, str]] = []
|
|
879
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
880
|
+
_form_params: List[Tuple[str, str]] = []
|
|
881
|
+
_files: Dict[
|
|
882
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
883
|
+
] = {}
|
|
884
|
+
_body_params: Optional[bytes] = None
|
|
885
|
+
|
|
886
|
+
# process the path parameters
|
|
887
|
+
# process the query parameters
|
|
888
|
+
# process the header parameters
|
|
889
|
+
if q_answer_api_key is not None:
|
|
890
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
|
891
|
+
# process the form parameters
|
|
892
|
+
# process the body parameter
|
|
893
|
+
if share_point_download_request is not None:
|
|
894
|
+
_body_params = share_point_download_request
|
|
895
|
+
|
|
896
|
+
|
|
897
|
+
# set the HTTP header `Accept`
|
|
898
|
+
if 'Accept' not in _header_params:
|
|
899
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
900
|
+
[
|
|
901
|
+
'application/json'
|
|
902
|
+
]
|
|
903
|
+
)
|
|
904
|
+
|
|
905
|
+
# set the HTTP header `Content-Type`
|
|
906
|
+
if _content_type:
|
|
907
|
+
_header_params['Content-Type'] = _content_type
|
|
908
|
+
else:
|
|
909
|
+
_default_content_type = (
|
|
910
|
+
self.api_client.select_header_content_type(
|
|
911
|
+
[
|
|
912
|
+
'application/json'
|
|
913
|
+
]
|
|
914
|
+
)
|
|
915
|
+
)
|
|
916
|
+
if _default_content_type is not None:
|
|
917
|
+
_header_params['Content-Type'] = _default_content_type
|
|
918
|
+
|
|
919
|
+
# authentication setting
|
|
920
|
+
_auth_settings: List[str] = [
|
|
921
|
+
'QAnswer-Api-Key',
|
|
922
|
+
'Bearer token'
|
|
923
|
+
]
|
|
924
|
+
|
|
925
|
+
return self.api_client.param_serialize(
|
|
926
|
+
method='POST',
|
|
927
|
+
resource_path='/api/connectors/sharepoint/add',
|
|
928
|
+
path_params=_path_params,
|
|
929
|
+
query_params=_query_params,
|
|
930
|
+
header_params=_header_params,
|
|
931
|
+
body=_body_params,
|
|
932
|
+
post_params=_form_params,
|
|
933
|
+
files=_files,
|
|
934
|
+
auth_settings=_auth_settings,
|
|
935
|
+
collection_formats=_collection_formats,
|
|
936
|
+
_host=_host,
|
|
937
|
+
_request_auth=_request_auth
|
|
938
|
+
)
|
|
939
|
+
|
|
940
|
+
|
|
941
|
+
|
|
942
|
+
|
|
943
|
+
@validate_call
|
|
944
|
+
def get_sharepoint_auth_link(
|
|
945
|
+
self,
|
|
946
|
+
username: StrictStr,
|
|
947
|
+
dataset: StrictStr,
|
|
948
|
+
connector_id: Optional[StrictInt] = None,
|
|
949
|
+
chatting_origin: Optional[StrictStr] = None,
|
|
950
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
951
|
+
_request_timeout: Union[
|
|
952
|
+
None,
|
|
953
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
954
|
+
Tuple[
|
|
955
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
956
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
957
|
+
]
|
|
958
|
+
] = None,
|
|
959
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
960
|
+
_content_type: Optional[StrictStr] = None,
|
|
961
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
962
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
963
|
+
) -> AuthLinkResponse:
|
|
964
|
+
"""Get Sharepoint Auth Link
|
|
965
|
+
|
|
966
|
+
Get authentication link for SharePoint Connector
|
|
967
|
+
|
|
968
|
+
:param username: (required)
|
|
969
|
+
:type username: str
|
|
970
|
+
:param dataset: (required)
|
|
971
|
+
:type dataset: str
|
|
972
|
+
:param connector_id:
|
|
973
|
+
:type connector_id: int
|
|
974
|
+
:param chatting_origin:
|
|
975
|
+
:type chatting_origin: str
|
|
976
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
977
|
+
:type q_answer_api_key: str
|
|
978
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
979
|
+
number provided, it will be total request
|
|
980
|
+
timeout. It can also be a pair (tuple) of
|
|
981
|
+
(connection, read) timeouts.
|
|
982
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
983
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
984
|
+
request; this effectively ignores the
|
|
985
|
+
authentication in the spec for a single request.
|
|
986
|
+
:type _request_auth: dict, optional
|
|
987
|
+
:param _content_type: force content-type for the request.
|
|
988
|
+
:type _content_type: str, Optional
|
|
989
|
+
:param _headers: set to override the headers for a single
|
|
990
|
+
request; this effectively ignores the headers
|
|
991
|
+
in the spec for a single request.
|
|
992
|
+
:type _headers: dict, optional
|
|
993
|
+
:param _host_index: set to override the host_index for a single
|
|
994
|
+
request; this effectively ignores the host_index
|
|
995
|
+
in the spec for a single request.
|
|
996
|
+
:type _host_index: int, optional
|
|
997
|
+
:return: Returns the result object.
|
|
998
|
+
""" # noqa: E501
|
|
999
|
+
|
|
1000
|
+
_param = self._get_sharepoint_auth_link_serialize(
|
|
1001
|
+
username=username,
|
|
1002
|
+
dataset=dataset,
|
|
1003
|
+
connector_id=connector_id,
|
|
1004
|
+
chatting_origin=chatting_origin,
|
|
1005
|
+
q_answer_api_key=q_answer_api_key,
|
|
1006
|
+
_request_auth=_request_auth,
|
|
1007
|
+
_content_type=_content_type,
|
|
1008
|
+
_headers=_headers,
|
|
1009
|
+
_host_index=_host_index
|
|
1010
|
+
)
|
|
1011
|
+
|
|
1012
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1013
|
+
'200': "AuthLinkResponse",
|
|
1014
|
+
'422': "HTTPValidationError",
|
|
1015
|
+
}
|
|
1016
|
+
response_data = self.api_client.call_api(
|
|
1017
|
+
*_param,
|
|
1018
|
+
_request_timeout=_request_timeout
|
|
1019
|
+
)
|
|
1020
|
+
response_data.read()
|
|
1021
|
+
return self.api_client.response_deserialize(
|
|
1022
|
+
response_data=response_data,
|
|
1023
|
+
response_types_map=_response_types_map,
|
|
1024
|
+
).data
|
|
1025
|
+
|
|
1026
|
+
|
|
1027
|
+
@validate_call
|
|
1028
|
+
def get_sharepoint_auth_link_with_http_info(
|
|
1029
|
+
self,
|
|
1030
|
+
username: StrictStr,
|
|
1031
|
+
dataset: StrictStr,
|
|
1032
|
+
connector_id: Optional[StrictInt] = None,
|
|
1033
|
+
chatting_origin: Optional[StrictStr] = None,
|
|
1034
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
1035
|
+
_request_timeout: Union[
|
|
1036
|
+
None,
|
|
1037
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1038
|
+
Tuple[
|
|
1039
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1040
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1041
|
+
]
|
|
1042
|
+
] = None,
|
|
1043
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1044
|
+
_content_type: Optional[StrictStr] = None,
|
|
1045
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1046
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1047
|
+
) -> ApiResponse[AuthLinkResponse]:
|
|
1048
|
+
"""Get Sharepoint Auth Link
|
|
1049
|
+
|
|
1050
|
+
Get authentication link for SharePoint Connector
|
|
1051
|
+
|
|
1052
|
+
:param username: (required)
|
|
1053
|
+
:type username: str
|
|
1054
|
+
:param dataset: (required)
|
|
1055
|
+
:type dataset: str
|
|
1056
|
+
:param connector_id:
|
|
1057
|
+
:type connector_id: int
|
|
1058
|
+
:param chatting_origin:
|
|
1059
|
+
:type chatting_origin: str
|
|
1060
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
1061
|
+
:type q_answer_api_key: str
|
|
1062
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1063
|
+
number provided, it will be total request
|
|
1064
|
+
timeout. It can also be a pair (tuple) of
|
|
1065
|
+
(connection, read) timeouts.
|
|
1066
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1067
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1068
|
+
request; this effectively ignores the
|
|
1069
|
+
authentication in the spec for a single request.
|
|
1070
|
+
:type _request_auth: dict, optional
|
|
1071
|
+
:param _content_type: force content-type for the request.
|
|
1072
|
+
:type _content_type: str, Optional
|
|
1073
|
+
:param _headers: set to override the headers for a single
|
|
1074
|
+
request; this effectively ignores the headers
|
|
1075
|
+
in the spec for a single request.
|
|
1076
|
+
:type _headers: dict, optional
|
|
1077
|
+
:param _host_index: set to override the host_index for a single
|
|
1078
|
+
request; this effectively ignores the host_index
|
|
1079
|
+
in the spec for a single request.
|
|
1080
|
+
:type _host_index: int, optional
|
|
1081
|
+
:return: Returns the result object.
|
|
1082
|
+
""" # noqa: E501
|
|
1083
|
+
|
|
1084
|
+
_param = self._get_sharepoint_auth_link_serialize(
|
|
1085
|
+
username=username,
|
|
1086
|
+
dataset=dataset,
|
|
1087
|
+
connector_id=connector_id,
|
|
1088
|
+
chatting_origin=chatting_origin,
|
|
1089
|
+
q_answer_api_key=q_answer_api_key,
|
|
1090
|
+
_request_auth=_request_auth,
|
|
1091
|
+
_content_type=_content_type,
|
|
1092
|
+
_headers=_headers,
|
|
1093
|
+
_host_index=_host_index
|
|
1094
|
+
)
|
|
1095
|
+
|
|
1096
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1097
|
+
'200': "AuthLinkResponse",
|
|
1098
|
+
'422': "HTTPValidationError",
|
|
1099
|
+
}
|
|
1100
|
+
response_data = self.api_client.call_api(
|
|
1101
|
+
*_param,
|
|
1102
|
+
_request_timeout=_request_timeout
|
|
1103
|
+
)
|
|
1104
|
+
response_data.read()
|
|
1105
|
+
return self.api_client.response_deserialize(
|
|
1106
|
+
response_data=response_data,
|
|
1107
|
+
response_types_map=_response_types_map,
|
|
1108
|
+
)
|
|
1109
|
+
|
|
1110
|
+
|
|
1111
|
+
@validate_call
|
|
1112
|
+
def get_sharepoint_auth_link_without_preload_content(
|
|
1113
|
+
self,
|
|
1114
|
+
username: StrictStr,
|
|
1115
|
+
dataset: StrictStr,
|
|
1116
|
+
connector_id: Optional[StrictInt] = None,
|
|
1117
|
+
chatting_origin: Optional[StrictStr] = None,
|
|
1118
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
1119
|
+
_request_timeout: Union[
|
|
1120
|
+
None,
|
|
1121
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1122
|
+
Tuple[
|
|
1123
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1124
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1125
|
+
]
|
|
1126
|
+
] = None,
|
|
1127
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1128
|
+
_content_type: Optional[StrictStr] = None,
|
|
1129
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1130
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1131
|
+
) -> RESTResponseType:
|
|
1132
|
+
"""Get Sharepoint Auth Link
|
|
1133
|
+
|
|
1134
|
+
Get authentication link for SharePoint Connector
|
|
1135
|
+
|
|
1136
|
+
:param username: (required)
|
|
1137
|
+
:type username: str
|
|
1138
|
+
:param dataset: (required)
|
|
1139
|
+
:type dataset: str
|
|
1140
|
+
:param connector_id:
|
|
1141
|
+
:type connector_id: int
|
|
1142
|
+
:param chatting_origin:
|
|
1143
|
+
:type chatting_origin: str
|
|
1144
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
1145
|
+
:type q_answer_api_key: str
|
|
1146
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1147
|
+
number provided, it will be total request
|
|
1148
|
+
timeout. It can also be a pair (tuple) of
|
|
1149
|
+
(connection, read) timeouts.
|
|
1150
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1151
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1152
|
+
request; this effectively ignores the
|
|
1153
|
+
authentication in the spec for a single request.
|
|
1154
|
+
:type _request_auth: dict, optional
|
|
1155
|
+
:param _content_type: force content-type for the request.
|
|
1156
|
+
:type _content_type: str, Optional
|
|
1157
|
+
:param _headers: set to override the headers for a single
|
|
1158
|
+
request; this effectively ignores the headers
|
|
1159
|
+
in the spec for a single request.
|
|
1160
|
+
:type _headers: dict, optional
|
|
1161
|
+
:param _host_index: set to override the host_index for a single
|
|
1162
|
+
request; this effectively ignores the host_index
|
|
1163
|
+
in the spec for a single request.
|
|
1164
|
+
:type _host_index: int, optional
|
|
1165
|
+
:return: Returns the result object.
|
|
1166
|
+
""" # noqa: E501
|
|
1167
|
+
|
|
1168
|
+
_param = self._get_sharepoint_auth_link_serialize(
|
|
1169
|
+
username=username,
|
|
1170
|
+
dataset=dataset,
|
|
1171
|
+
connector_id=connector_id,
|
|
1172
|
+
chatting_origin=chatting_origin,
|
|
1173
|
+
q_answer_api_key=q_answer_api_key,
|
|
1174
|
+
_request_auth=_request_auth,
|
|
1175
|
+
_content_type=_content_type,
|
|
1176
|
+
_headers=_headers,
|
|
1177
|
+
_host_index=_host_index
|
|
1178
|
+
)
|
|
1179
|
+
|
|
1180
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1181
|
+
'200': "AuthLinkResponse",
|
|
1182
|
+
'422': "HTTPValidationError",
|
|
1183
|
+
}
|
|
1184
|
+
response_data = self.api_client.call_api(
|
|
1185
|
+
*_param,
|
|
1186
|
+
_request_timeout=_request_timeout
|
|
1187
|
+
)
|
|
1188
|
+
return response_data.response
|
|
1189
|
+
|
|
1190
|
+
|
|
1191
|
+
def _get_sharepoint_auth_link_serialize(
|
|
1192
|
+
self,
|
|
1193
|
+
username,
|
|
1194
|
+
dataset,
|
|
1195
|
+
connector_id,
|
|
1196
|
+
chatting_origin,
|
|
1197
|
+
q_answer_api_key,
|
|
1198
|
+
_request_auth,
|
|
1199
|
+
_content_type,
|
|
1200
|
+
_headers,
|
|
1201
|
+
_host_index,
|
|
1202
|
+
) -> RequestSerialized:
|
|
1203
|
+
|
|
1204
|
+
_host = None
|
|
1205
|
+
|
|
1206
|
+
_collection_formats: Dict[str, str] = {
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
_path_params: Dict[str, str] = {}
|
|
1210
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1211
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1212
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1213
|
+
_files: Dict[
|
|
1214
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1215
|
+
] = {}
|
|
1216
|
+
_body_params: Optional[bytes] = None
|
|
1217
|
+
|
|
1218
|
+
# process the path parameters
|
|
1219
|
+
# process the query parameters
|
|
1220
|
+
if username is not None:
|
|
1221
|
+
|
|
1222
|
+
_query_params.append(('username', username))
|
|
1223
|
+
|
|
1224
|
+
if dataset is not None:
|
|
1225
|
+
|
|
1226
|
+
_query_params.append(('dataset', dataset))
|
|
1227
|
+
|
|
1228
|
+
if connector_id is not None:
|
|
1229
|
+
|
|
1230
|
+
_query_params.append(('connectorId', connector_id))
|
|
1231
|
+
|
|
1232
|
+
if chatting_origin is not None:
|
|
1233
|
+
|
|
1234
|
+
_query_params.append(('chattingOrigin', chatting_origin))
|
|
1235
|
+
|
|
1236
|
+
# process the header parameters
|
|
1237
|
+
if q_answer_api_key is not None:
|
|
1238
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
|
1239
|
+
# process the form parameters
|
|
1240
|
+
# process the body parameter
|
|
1241
|
+
|
|
1242
|
+
|
|
1243
|
+
# set the HTTP header `Accept`
|
|
1244
|
+
if 'Accept' not in _header_params:
|
|
1245
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1246
|
+
[
|
|
1247
|
+
'application/json'
|
|
1248
|
+
]
|
|
1249
|
+
)
|
|
1250
|
+
|
|
1251
|
+
|
|
1252
|
+
# authentication setting
|
|
1253
|
+
_auth_settings: List[str] = [
|
|
1254
|
+
'QAnswer-Api-Key',
|
|
1255
|
+
'Bearer token'
|
|
1256
|
+
]
|
|
1257
|
+
|
|
1258
|
+
return self.api_client.param_serialize(
|
|
1259
|
+
method='GET',
|
|
1260
|
+
resource_path='/api/connectors/sharepoint/authorisation-link',
|
|
1261
|
+
path_params=_path_params,
|
|
1262
|
+
query_params=_query_params,
|
|
1263
|
+
header_params=_header_params,
|
|
1264
|
+
body=_body_params,
|
|
1265
|
+
post_params=_form_params,
|
|
1266
|
+
files=_files,
|
|
1267
|
+
auth_settings=_auth_settings,
|
|
1268
|
+
collection_formats=_collection_formats,
|
|
1269
|
+
_host=_host,
|
|
1270
|
+
_request_auth=_request_auth
|
|
1271
|
+
)
|
|
1272
|
+
|
|
1273
|
+
|
|
1274
|
+
|
|
1275
|
+
|
|
1276
|
+
@validate_call
|
|
1277
|
+
def get_sharepoint_connector_info(
|
|
1278
|
+
self,
|
|
1279
|
+
username: StrictStr,
|
|
1280
|
+
dataset: StrictStr,
|
|
1281
|
+
connector_id: Optional[StrictInt] = None,
|
|
1282
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
1283
|
+
_request_timeout: Union[
|
|
1284
|
+
None,
|
|
1285
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1286
|
+
Tuple[
|
|
1287
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1288
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1289
|
+
]
|
|
1290
|
+
] = None,
|
|
1291
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1292
|
+
_content_type: Optional[StrictStr] = None,
|
|
1293
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1294
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1295
|
+
) -> object:
|
|
1296
|
+
"""Get Sharepoint Connector Info
|
|
1297
|
+
|
|
1298
|
+
|
|
1299
|
+
:param username: (required)
|
|
1300
|
+
:type username: str
|
|
1301
|
+
:param dataset: (required)
|
|
1302
|
+
:type dataset: str
|
|
1303
|
+
:param connector_id:
|
|
1304
|
+
:type connector_id: int
|
|
1305
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
1306
|
+
:type q_answer_api_key: str
|
|
1307
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1308
|
+
number provided, it will be total request
|
|
1309
|
+
timeout. It can also be a pair (tuple) of
|
|
1310
|
+
(connection, read) timeouts.
|
|
1311
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1312
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1313
|
+
request; this effectively ignores the
|
|
1314
|
+
authentication in the spec for a single request.
|
|
1315
|
+
:type _request_auth: dict, optional
|
|
1316
|
+
:param _content_type: force content-type for the request.
|
|
1317
|
+
:type _content_type: str, Optional
|
|
1318
|
+
:param _headers: set to override the headers for a single
|
|
1319
|
+
request; this effectively ignores the headers
|
|
1320
|
+
in the spec for a single request.
|
|
1321
|
+
:type _headers: dict, optional
|
|
1322
|
+
:param _host_index: set to override the host_index for a single
|
|
1323
|
+
request; this effectively ignores the host_index
|
|
1324
|
+
in the spec for a single request.
|
|
1325
|
+
:type _host_index: int, optional
|
|
1326
|
+
:return: Returns the result object.
|
|
1327
|
+
""" # noqa: E501
|
|
1328
|
+
|
|
1329
|
+
_param = self._get_sharepoint_connector_info_serialize(
|
|
1330
|
+
username=username,
|
|
1331
|
+
dataset=dataset,
|
|
1332
|
+
connector_id=connector_id,
|
|
1333
|
+
q_answer_api_key=q_answer_api_key,
|
|
1334
|
+
_request_auth=_request_auth,
|
|
1335
|
+
_content_type=_content_type,
|
|
1336
|
+
_headers=_headers,
|
|
1337
|
+
_host_index=_host_index
|
|
1338
|
+
)
|
|
1339
|
+
|
|
1340
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1341
|
+
'200': "object",
|
|
1342
|
+
'422': "HTTPValidationError",
|
|
1343
|
+
}
|
|
1344
|
+
response_data = self.api_client.call_api(
|
|
1345
|
+
*_param,
|
|
1346
|
+
_request_timeout=_request_timeout
|
|
1347
|
+
)
|
|
1348
|
+
response_data.read()
|
|
1349
|
+
return self.api_client.response_deserialize(
|
|
1350
|
+
response_data=response_data,
|
|
1351
|
+
response_types_map=_response_types_map,
|
|
1352
|
+
).data
|
|
1353
|
+
|
|
1354
|
+
|
|
1355
|
+
@validate_call
|
|
1356
|
+
def get_sharepoint_connector_info_with_http_info(
|
|
1357
|
+
self,
|
|
1358
|
+
username: StrictStr,
|
|
1359
|
+
dataset: StrictStr,
|
|
1360
|
+
connector_id: Optional[StrictInt] = None,
|
|
1361
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
1362
|
+
_request_timeout: Union[
|
|
1363
|
+
None,
|
|
1364
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1365
|
+
Tuple[
|
|
1366
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1367
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1368
|
+
]
|
|
1369
|
+
] = None,
|
|
1370
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1371
|
+
_content_type: Optional[StrictStr] = None,
|
|
1372
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1373
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1374
|
+
) -> ApiResponse[object]:
|
|
1375
|
+
"""Get Sharepoint Connector Info
|
|
1376
|
+
|
|
1377
|
+
|
|
1378
|
+
:param username: (required)
|
|
1379
|
+
:type username: str
|
|
1380
|
+
:param dataset: (required)
|
|
1381
|
+
:type dataset: str
|
|
1382
|
+
:param connector_id:
|
|
1383
|
+
:type connector_id: int
|
|
1384
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
1385
|
+
:type q_answer_api_key: str
|
|
1386
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1387
|
+
number provided, it will be total request
|
|
1388
|
+
timeout. It can also be a pair (tuple) of
|
|
1389
|
+
(connection, read) timeouts.
|
|
1390
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1391
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1392
|
+
request; this effectively ignores the
|
|
1393
|
+
authentication in the spec for a single request.
|
|
1394
|
+
:type _request_auth: dict, optional
|
|
1395
|
+
:param _content_type: force content-type for the request.
|
|
1396
|
+
:type _content_type: str, Optional
|
|
1397
|
+
:param _headers: set to override the headers for a single
|
|
1398
|
+
request; this effectively ignores the headers
|
|
1399
|
+
in the spec for a single request.
|
|
1400
|
+
:type _headers: dict, optional
|
|
1401
|
+
:param _host_index: set to override the host_index for a single
|
|
1402
|
+
request; this effectively ignores the host_index
|
|
1403
|
+
in the spec for a single request.
|
|
1404
|
+
:type _host_index: int, optional
|
|
1405
|
+
:return: Returns the result object.
|
|
1406
|
+
""" # noqa: E501
|
|
1407
|
+
|
|
1408
|
+
_param = self._get_sharepoint_connector_info_serialize(
|
|
1409
|
+
username=username,
|
|
1410
|
+
dataset=dataset,
|
|
1411
|
+
connector_id=connector_id,
|
|
1412
|
+
q_answer_api_key=q_answer_api_key,
|
|
1413
|
+
_request_auth=_request_auth,
|
|
1414
|
+
_content_type=_content_type,
|
|
1415
|
+
_headers=_headers,
|
|
1416
|
+
_host_index=_host_index
|
|
1417
|
+
)
|
|
1418
|
+
|
|
1419
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1420
|
+
'200': "object",
|
|
1421
|
+
'422': "HTTPValidationError",
|
|
1422
|
+
}
|
|
1423
|
+
response_data = self.api_client.call_api(
|
|
1424
|
+
*_param,
|
|
1425
|
+
_request_timeout=_request_timeout
|
|
1426
|
+
)
|
|
1427
|
+
response_data.read()
|
|
1428
|
+
return self.api_client.response_deserialize(
|
|
1429
|
+
response_data=response_data,
|
|
1430
|
+
response_types_map=_response_types_map,
|
|
1431
|
+
)
|
|
1432
|
+
|
|
1433
|
+
|
|
1434
|
+
@validate_call
|
|
1435
|
+
def get_sharepoint_connector_info_without_preload_content(
|
|
1436
|
+
self,
|
|
1437
|
+
username: StrictStr,
|
|
1438
|
+
dataset: StrictStr,
|
|
1439
|
+
connector_id: Optional[StrictInt] = None,
|
|
1440
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
1441
|
+
_request_timeout: Union[
|
|
1442
|
+
None,
|
|
1443
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1444
|
+
Tuple[
|
|
1445
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1446
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1447
|
+
]
|
|
1448
|
+
] = None,
|
|
1449
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1450
|
+
_content_type: Optional[StrictStr] = None,
|
|
1451
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1452
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1453
|
+
) -> RESTResponseType:
|
|
1454
|
+
"""Get Sharepoint Connector Info
|
|
1455
|
+
|
|
1456
|
+
|
|
1457
|
+
:param username: (required)
|
|
1458
|
+
:type username: str
|
|
1459
|
+
:param dataset: (required)
|
|
1460
|
+
:type dataset: str
|
|
1461
|
+
:param connector_id:
|
|
1462
|
+
:type connector_id: int
|
|
1463
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
1464
|
+
:type q_answer_api_key: str
|
|
1465
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1466
|
+
number provided, it will be total request
|
|
1467
|
+
timeout. It can also be a pair (tuple) of
|
|
1468
|
+
(connection, read) timeouts.
|
|
1469
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1470
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1471
|
+
request; this effectively ignores the
|
|
1472
|
+
authentication in the spec for a single request.
|
|
1473
|
+
:type _request_auth: dict, optional
|
|
1474
|
+
:param _content_type: force content-type for the request.
|
|
1475
|
+
:type _content_type: str, Optional
|
|
1476
|
+
:param _headers: set to override the headers for a single
|
|
1477
|
+
request; this effectively ignores the headers
|
|
1478
|
+
in the spec for a single request.
|
|
1479
|
+
:type _headers: dict, optional
|
|
1480
|
+
:param _host_index: set to override the host_index for a single
|
|
1481
|
+
request; this effectively ignores the host_index
|
|
1482
|
+
in the spec for a single request.
|
|
1483
|
+
:type _host_index: int, optional
|
|
1484
|
+
:return: Returns the result object.
|
|
1485
|
+
""" # noqa: E501
|
|
1486
|
+
|
|
1487
|
+
_param = self._get_sharepoint_connector_info_serialize(
|
|
1488
|
+
username=username,
|
|
1489
|
+
dataset=dataset,
|
|
1490
|
+
connector_id=connector_id,
|
|
1491
|
+
q_answer_api_key=q_answer_api_key,
|
|
1492
|
+
_request_auth=_request_auth,
|
|
1493
|
+
_content_type=_content_type,
|
|
1494
|
+
_headers=_headers,
|
|
1495
|
+
_host_index=_host_index
|
|
1496
|
+
)
|
|
1497
|
+
|
|
1498
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1499
|
+
'200': "object",
|
|
1500
|
+
'422': "HTTPValidationError",
|
|
1501
|
+
}
|
|
1502
|
+
response_data = self.api_client.call_api(
|
|
1503
|
+
*_param,
|
|
1504
|
+
_request_timeout=_request_timeout
|
|
1505
|
+
)
|
|
1506
|
+
return response_data.response
|
|
1507
|
+
|
|
1508
|
+
|
|
1509
|
+
def _get_sharepoint_connector_info_serialize(
|
|
1510
|
+
self,
|
|
1511
|
+
username,
|
|
1512
|
+
dataset,
|
|
1513
|
+
connector_id,
|
|
1514
|
+
q_answer_api_key,
|
|
1515
|
+
_request_auth,
|
|
1516
|
+
_content_type,
|
|
1517
|
+
_headers,
|
|
1518
|
+
_host_index,
|
|
1519
|
+
) -> RequestSerialized:
|
|
1520
|
+
|
|
1521
|
+
_host = None
|
|
1522
|
+
|
|
1523
|
+
_collection_formats: Dict[str, str] = {
|
|
1524
|
+
}
|
|
1525
|
+
|
|
1526
|
+
_path_params: Dict[str, str] = {}
|
|
1527
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1528
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1529
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1530
|
+
_files: Dict[
|
|
1531
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1532
|
+
] = {}
|
|
1533
|
+
_body_params: Optional[bytes] = None
|
|
1534
|
+
|
|
1535
|
+
# process the path parameters
|
|
1536
|
+
# process the query parameters
|
|
1537
|
+
if username is not None:
|
|
1538
|
+
|
|
1539
|
+
_query_params.append(('username', username))
|
|
1540
|
+
|
|
1541
|
+
if dataset is not None:
|
|
1542
|
+
|
|
1543
|
+
_query_params.append(('dataset', dataset))
|
|
1544
|
+
|
|
1545
|
+
if connector_id is not None:
|
|
1546
|
+
|
|
1547
|
+
_query_params.append(('connectorId', connector_id))
|
|
1548
|
+
|
|
1549
|
+
# process the header parameters
|
|
1550
|
+
if q_answer_api_key is not None:
|
|
1551
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
|
1552
|
+
# process the form parameters
|
|
1553
|
+
# process the body parameter
|
|
1554
|
+
|
|
1555
|
+
|
|
1556
|
+
# set the HTTP header `Accept`
|
|
1557
|
+
if 'Accept' not in _header_params:
|
|
1558
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1559
|
+
[
|
|
1560
|
+
'application/json'
|
|
1561
|
+
]
|
|
1562
|
+
)
|
|
1563
|
+
|
|
1564
|
+
|
|
1565
|
+
# authentication setting
|
|
1566
|
+
_auth_settings: List[str] = [
|
|
1567
|
+
'QAnswer-Api-Key',
|
|
1568
|
+
'Bearer token'
|
|
1569
|
+
]
|
|
1570
|
+
|
|
1571
|
+
return self.api_client.param_serialize(
|
|
1572
|
+
method='GET',
|
|
1573
|
+
resource_path='/api/connectors/sharepoint/info',
|
|
1574
|
+
path_params=_path_params,
|
|
1575
|
+
query_params=_query_params,
|
|
1576
|
+
header_params=_header_params,
|
|
1577
|
+
body=_body_params,
|
|
1578
|
+
post_params=_form_params,
|
|
1579
|
+
files=_files,
|
|
1580
|
+
auth_settings=_auth_settings,
|
|
1581
|
+
collection_formats=_collection_formats,
|
|
1582
|
+
_host=_host,
|
|
1583
|
+
_request_auth=_request_auth
|
|
1584
|
+
)
|
|
1585
|
+
|
|
1586
|
+
|
|
1587
|
+
|
|
1588
|
+
|
|
1589
|
+
@validate_call
|
|
1590
|
+
def get_sharepoint_settings(
|
|
1591
|
+
self,
|
|
1592
|
+
username: Annotated[str, Field(min_length=1, strict=True)],
|
|
1593
|
+
dataset: Annotated[str, Field(min_length=1, strict=True)],
|
|
1594
|
+
connector_id: Optional[Annotated[int, Field(strict=True, ge=1)]] = None,
|
|
1595
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
1596
|
+
_request_timeout: Union[
|
|
1597
|
+
None,
|
|
1598
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1599
|
+
Tuple[
|
|
1600
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1601
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1602
|
+
]
|
|
1603
|
+
] = None,
|
|
1604
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1605
|
+
_content_type: Optional[StrictStr] = None,
|
|
1606
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1607
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1608
|
+
) -> SharePointConnectorSettings:
|
|
1609
|
+
"""Get Sharepoint Settings
|
|
1610
|
+
|
|
1611
|
+
Retrieve SharePoint connector settings.
|
|
1612
|
+
|
|
1613
|
+
:param username: (required)
|
|
1614
|
+
:type username: str
|
|
1615
|
+
:param dataset: (required)
|
|
1616
|
+
:type dataset: str
|
|
1617
|
+
:param connector_id:
|
|
1618
|
+
:type connector_id: int
|
|
1619
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
1620
|
+
:type q_answer_api_key: str
|
|
1621
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1622
|
+
number provided, it will be total request
|
|
1623
|
+
timeout. It can also be a pair (tuple) of
|
|
1624
|
+
(connection, read) timeouts.
|
|
1625
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1626
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1627
|
+
request; this effectively ignores the
|
|
1628
|
+
authentication in the spec for a single request.
|
|
1629
|
+
:type _request_auth: dict, optional
|
|
1630
|
+
:param _content_type: force content-type for the request.
|
|
1631
|
+
:type _content_type: str, Optional
|
|
1632
|
+
:param _headers: set to override the headers for a single
|
|
1633
|
+
request; this effectively ignores the headers
|
|
1634
|
+
in the spec for a single request.
|
|
1635
|
+
:type _headers: dict, optional
|
|
1636
|
+
:param _host_index: set to override the host_index for a single
|
|
1637
|
+
request; this effectively ignores the host_index
|
|
1638
|
+
in the spec for a single request.
|
|
1639
|
+
:type _host_index: int, optional
|
|
1640
|
+
:return: Returns the result object.
|
|
1641
|
+
""" # noqa: E501
|
|
1642
|
+
|
|
1643
|
+
_param = self._get_sharepoint_settings_serialize(
|
|
1644
|
+
username=username,
|
|
1645
|
+
dataset=dataset,
|
|
1646
|
+
connector_id=connector_id,
|
|
1647
|
+
q_answer_api_key=q_answer_api_key,
|
|
1648
|
+
_request_auth=_request_auth,
|
|
1649
|
+
_content_type=_content_type,
|
|
1650
|
+
_headers=_headers,
|
|
1651
|
+
_host_index=_host_index
|
|
1652
|
+
)
|
|
1653
|
+
|
|
1654
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1655
|
+
'200': "SharePointConnectorSettings",
|
|
1656
|
+
'422': "HTTPValidationError",
|
|
1657
|
+
}
|
|
1658
|
+
response_data = self.api_client.call_api(
|
|
1659
|
+
*_param,
|
|
1660
|
+
_request_timeout=_request_timeout
|
|
1661
|
+
)
|
|
1662
|
+
response_data.read()
|
|
1663
|
+
return self.api_client.response_deserialize(
|
|
1664
|
+
response_data=response_data,
|
|
1665
|
+
response_types_map=_response_types_map,
|
|
1666
|
+
).data
|
|
1667
|
+
|
|
1668
|
+
|
|
1669
|
+
@validate_call
|
|
1670
|
+
def get_sharepoint_settings_with_http_info(
|
|
1671
|
+
self,
|
|
1672
|
+
username: Annotated[str, Field(min_length=1, strict=True)],
|
|
1673
|
+
dataset: Annotated[str, Field(min_length=1, strict=True)],
|
|
1674
|
+
connector_id: Optional[Annotated[int, Field(strict=True, ge=1)]] = None,
|
|
1675
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
1676
|
+
_request_timeout: Union[
|
|
1677
|
+
None,
|
|
1678
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1679
|
+
Tuple[
|
|
1680
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1681
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1682
|
+
]
|
|
1683
|
+
] = None,
|
|
1684
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1685
|
+
_content_type: Optional[StrictStr] = None,
|
|
1686
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1687
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1688
|
+
) -> ApiResponse[SharePointConnectorSettings]:
|
|
1689
|
+
"""Get Sharepoint Settings
|
|
1690
|
+
|
|
1691
|
+
Retrieve SharePoint connector settings.
|
|
1692
|
+
|
|
1693
|
+
:param username: (required)
|
|
1694
|
+
:type username: str
|
|
1695
|
+
:param dataset: (required)
|
|
1696
|
+
:type dataset: str
|
|
1697
|
+
:param connector_id:
|
|
1698
|
+
:type connector_id: int
|
|
1699
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
1700
|
+
:type q_answer_api_key: str
|
|
1701
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1702
|
+
number provided, it will be total request
|
|
1703
|
+
timeout. It can also be a pair (tuple) of
|
|
1704
|
+
(connection, read) timeouts.
|
|
1705
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1706
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1707
|
+
request; this effectively ignores the
|
|
1708
|
+
authentication in the spec for a single request.
|
|
1709
|
+
:type _request_auth: dict, optional
|
|
1710
|
+
:param _content_type: force content-type for the request.
|
|
1711
|
+
:type _content_type: str, Optional
|
|
1712
|
+
:param _headers: set to override the headers for a single
|
|
1713
|
+
request; this effectively ignores the headers
|
|
1714
|
+
in the spec for a single request.
|
|
1715
|
+
:type _headers: dict, optional
|
|
1716
|
+
:param _host_index: set to override the host_index for a single
|
|
1717
|
+
request; this effectively ignores the host_index
|
|
1718
|
+
in the spec for a single request.
|
|
1719
|
+
:type _host_index: int, optional
|
|
1720
|
+
:return: Returns the result object.
|
|
1721
|
+
""" # noqa: E501
|
|
1722
|
+
|
|
1723
|
+
_param = self._get_sharepoint_settings_serialize(
|
|
1724
|
+
username=username,
|
|
1725
|
+
dataset=dataset,
|
|
1726
|
+
connector_id=connector_id,
|
|
1727
|
+
q_answer_api_key=q_answer_api_key,
|
|
1728
|
+
_request_auth=_request_auth,
|
|
1729
|
+
_content_type=_content_type,
|
|
1730
|
+
_headers=_headers,
|
|
1731
|
+
_host_index=_host_index
|
|
1732
|
+
)
|
|
1733
|
+
|
|
1734
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1735
|
+
'200': "SharePointConnectorSettings",
|
|
1736
|
+
'422': "HTTPValidationError",
|
|
1737
|
+
}
|
|
1738
|
+
response_data = self.api_client.call_api(
|
|
1739
|
+
*_param,
|
|
1740
|
+
_request_timeout=_request_timeout
|
|
1741
|
+
)
|
|
1742
|
+
response_data.read()
|
|
1743
|
+
return self.api_client.response_deserialize(
|
|
1744
|
+
response_data=response_data,
|
|
1745
|
+
response_types_map=_response_types_map,
|
|
1746
|
+
)
|
|
1747
|
+
|
|
1748
|
+
|
|
1749
|
+
@validate_call
|
|
1750
|
+
def get_sharepoint_settings_without_preload_content(
|
|
1751
|
+
self,
|
|
1752
|
+
username: Annotated[str, Field(min_length=1, strict=True)],
|
|
1753
|
+
dataset: Annotated[str, Field(min_length=1, strict=True)],
|
|
1754
|
+
connector_id: Optional[Annotated[int, Field(strict=True, ge=1)]] = None,
|
|
1755
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
1756
|
+
_request_timeout: Union[
|
|
1757
|
+
None,
|
|
1758
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1759
|
+
Tuple[
|
|
1760
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1761
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1762
|
+
]
|
|
1763
|
+
] = None,
|
|
1764
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1765
|
+
_content_type: Optional[StrictStr] = None,
|
|
1766
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1767
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1768
|
+
) -> RESTResponseType:
|
|
1769
|
+
"""Get Sharepoint Settings
|
|
1770
|
+
|
|
1771
|
+
Retrieve SharePoint connector settings.
|
|
1772
|
+
|
|
1773
|
+
:param username: (required)
|
|
1774
|
+
:type username: str
|
|
1775
|
+
:param dataset: (required)
|
|
1776
|
+
:type dataset: str
|
|
1777
|
+
:param connector_id:
|
|
1778
|
+
:type connector_id: int
|
|
1779
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
1780
|
+
:type q_answer_api_key: str
|
|
1781
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1782
|
+
number provided, it will be total request
|
|
1783
|
+
timeout. It can also be a pair (tuple) of
|
|
1784
|
+
(connection, read) timeouts.
|
|
1785
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1786
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1787
|
+
request; this effectively ignores the
|
|
1788
|
+
authentication in the spec for a single request.
|
|
1789
|
+
:type _request_auth: dict, optional
|
|
1790
|
+
:param _content_type: force content-type for the request.
|
|
1791
|
+
:type _content_type: str, Optional
|
|
1792
|
+
:param _headers: set to override the headers for a single
|
|
1793
|
+
request; this effectively ignores the headers
|
|
1794
|
+
in the spec for a single request.
|
|
1795
|
+
:type _headers: dict, optional
|
|
1796
|
+
:param _host_index: set to override the host_index for a single
|
|
1797
|
+
request; this effectively ignores the host_index
|
|
1798
|
+
in the spec for a single request.
|
|
1799
|
+
:type _host_index: int, optional
|
|
1800
|
+
:return: Returns the result object.
|
|
1801
|
+
""" # noqa: E501
|
|
1802
|
+
|
|
1803
|
+
_param = self._get_sharepoint_settings_serialize(
|
|
1804
|
+
username=username,
|
|
1805
|
+
dataset=dataset,
|
|
1806
|
+
connector_id=connector_id,
|
|
1807
|
+
q_answer_api_key=q_answer_api_key,
|
|
1808
|
+
_request_auth=_request_auth,
|
|
1809
|
+
_content_type=_content_type,
|
|
1810
|
+
_headers=_headers,
|
|
1811
|
+
_host_index=_host_index
|
|
1812
|
+
)
|
|
1813
|
+
|
|
1814
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1815
|
+
'200': "SharePointConnectorSettings",
|
|
1816
|
+
'422': "HTTPValidationError",
|
|
1817
|
+
}
|
|
1818
|
+
response_data = self.api_client.call_api(
|
|
1819
|
+
*_param,
|
|
1820
|
+
_request_timeout=_request_timeout
|
|
1821
|
+
)
|
|
1822
|
+
return response_data.response
|
|
1823
|
+
|
|
1824
|
+
|
|
1825
|
+
def _get_sharepoint_settings_serialize(
|
|
1826
|
+
self,
|
|
1827
|
+
username,
|
|
1828
|
+
dataset,
|
|
1829
|
+
connector_id,
|
|
1830
|
+
q_answer_api_key,
|
|
1831
|
+
_request_auth,
|
|
1832
|
+
_content_type,
|
|
1833
|
+
_headers,
|
|
1834
|
+
_host_index,
|
|
1835
|
+
) -> RequestSerialized:
|
|
1836
|
+
|
|
1837
|
+
_host = None
|
|
1838
|
+
|
|
1839
|
+
_collection_formats: Dict[str, str] = {
|
|
1840
|
+
}
|
|
1841
|
+
|
|
1842
|
+
_path_params: Dict[str, str] = {}
|
|
1843
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1844
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1845
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1846
|
+
_files: Dict[
|
|
1847
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1848
|
+
] = {}
|
|
1849
|
+
_body_params: Optional[bytes] = None
|
|
1850
|
+
|
|
1851
|
+
# process the path parameters
|
|
1852
|
+
# process the query parameters
|
|
1853
|
+
if username is not None:
|
|
1854
|
+
|
|
1855
|
+
_query_params.append(('username', username))
|
|
1856
|
+
|
|
1857
|
+
if dataset is not None:
|
|
1858
|
+
|
|
1859
|
+
_query_params.append(('dataset', dataset))
|
|
1860
|
+
|
|
1861
|
+
if connector_id is not None:
|
|
1862
|
+
|
|
1863
|
+
_query_params.append(('connectorId', connector_id))
|
|
1864
|
+
|
|
1865
|
+
# process the header parameters
|
|
1866
|
+
if q_answer_api_key is not None:
|
|
1867
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
|
1868
|
+
# process the form parameters
|
|
1869
|
+
# process the body parameter
|
|
1870
|
+
|
|
1871
|
+
|
|
1872
|
+
# set the HTTP header `Accept`
|
|
1873
|
+
if 'Accept' not in _header_params:
|
|
1874
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1875
|
+
[
|
|
1876
|
+
'application/json'
|
|
1877
|
+
]
|
|
1878
|
+
)
|
|
1879
|
+
|
|
1880
|
+
|
|
1881
|
+
# authentication setting
|
|
1882
|
+
_auth_settings: List[str] = [
|
|
1883
|
+
'QAnswer-Api-Key',
|
|
1884
|
+
'Bearer token'
|
|
1885
|
+
]
|
|
1886
|
+
|
|
1887
|
+
return self.api_client.param_serialize(
|
|
1888
|
+
method='GET',
|
|
1889
|
+
resource_path='/api/connectors/sharepoint/settings',
|
|
1890
|
+
path_params=_path_params,
|
|
1891
|
+
query_params=_query_params,
|
|
1892
|
+
header_params=_header_params,
|
|
1893
|
+
body=_body_params,
|
|
1894
|
+
post_params=_form_params,
|
|
1895
|
+
files=_files,
|
|
1896
|
+
auth_settings=_auth_settings,
|
|
1897
|
+
collection_formats=_collection_formats,
|
|
1898
|
+
_host=_host,
|
|
1899
|
+
_request_auth=_request_auth
|
|
1900
|
+
)
|
|
1901
|
+
|
|
1902
|
+
|
|
1903
|
+
|
|
1904
|
+
|
|
1905
|
+
@validate_call
|
|
1906
|
+
def list_sharepoint_sites(
|
|
1907
|
+
self,
|
|
1908
|
+
username: StrictStr,
|
|
1909
|
+
dataset: StrictStr,
|
|
1910
|
+
connector_id: Optional[StrictInt] = None,
|
|
1911
|
+
site_id: Optional[StrictStr] = None,
|
|
1912
|
+
drive_id: Optional[StrictStr] = None,
|
|
1913
|
+
folder_id: Optional[StrictStr] = None,
|
|
1914
|
+
notebook_id: Optional[StrictStr] = None,
|
|
1915
|
+
page_size: Optional[Annotated[int, Field(le=999, strict=True, ge=1)]] = None,
|
|
1916
|
+
cursor: Optional[StrictStr] = None,
|
|
1917
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
1918
|
+
_request_timeout: Union[
|
|
1919
|
+
None,
|
|
1920
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1921
|
+
Tuple[
|
|
1922
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1923
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1924
|
+
]
|
|
1925
|
+
] = None,
|
|
1926
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1927
|
+
_content_type: Optional[StrictStr] = None,
|
|
1928
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1929
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1930
|
+
) -> ListFilesConnectorResponse:
|
|
1931
|
+
"""List Sharepoint Sites
|
|
1932
|
+
|
|
1933
|
+
List SharePoint Sites
|
|
1934
|
+
|
|
1935
|
+
:param username: (required)
|
|
1936
|
+
:type username: str
|
|
1937
|
+
:param dataset: (required)
|
|
1938
|
+
:type dataset: str
|
|
1939
|
+
:param connector_id:
|
|
1940
|
+
:type connector_id: int
|
|
1941
|
+
:param site_id:
|
|
1942
|
+
:type site_id: str
|
|
1943
|
+
:param drive_id:
|
|
1944
|
+
:type drive_id: str
|
|
1945
|
+
:param folder_id:
|
|
1946
|
+
:type folder_id: str
|
|
1947
|
+
:param notebook_id:
|
|
1948
|
+
:type notebook_id: str
|
|
1949
|
+
:param page_size:
|
|
1950
|
+
:type page_size: int
|
|
1951
|
+
:param cursor:
|
|
1952
|
+
:type cursor: str
|
|
1953
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
1954
|
+
:type q_answer_api_key: str
|
|
1955
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1956
|
+
number provided, it will be total request
|
|
1957
|
+
timeout. It can also be a pair (tuple) of
|
|
1958
|
+
(connection, read) timeouts.
|
|
1959
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1960
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1961
|
+
request; this effectively ignores the
|
|
1962
|
+
authentication in the spec for a single request.
|
|
1963
|
+
:type _request_auth: dict, optional
|
|
1964
|
+
:param _content_type: force content-type for the request.
|
|
1965
|
+
:type _content_type: str, Optional
|
|
1966
|
+
:param _headers: set to override the headers for a single
|
|
1967
|
+
request; this effectively ignores the headers
|
|
1968
|
+
in the spec for a single request.
|
|
1969
|
+
:type _headers: dict, optional
|
|
1970
|
+
:param _host_index: set to override the host_index for a single
|
|
1971
|
+
request; this effectively ignores the host_index
|
|
1972
|
+
in the spec for a single request.
|
|
1973
|
+
:type _host_index: int, optional
|
|
1974
|
+
:return: Returns the result object.
|
|
1975
|
+
""" # noqa: E501
|
|
1976
|
+
|
|
1977
|
+
_param = self._list_sharepoint_sites_serialize(
|
|
1978
|
+
username=username,
|
|
1979
|
+
dataset=dataset,
|
|
1980
|
+
connector_id=connector_id,
|
|
1981
|
+
site_id=site_id,
|
|
1982
|
+
drive_id=drive_id,
|
|
1983
|
+
folder_id=folder_id,
|
|
1984
|
+
notebook_id=notebook_id,
|
|
1985
|
+
page_size=page_size,
|
|
1986
|
+
cursor=cursor,
|
|
1987
|
+
q_answer_api_key=q_answer_api_key,
|
|
1988
|
+
_request_auth=_request_auth,
|
|
1989
|
+
_content_type=_content_type,
|
|
1990
|
+
_headers=_headers,
|
|
1991
|
+
_host_index=_host_index
|
|
1992
|
+
)
|
|
1993
|
+
|
|
1994
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1995
|
+
'200': "ListFilesConnectorResponse",
|
|
1996
|
+
'422': "HTTPValidationError",
|
|
1997
|
+
}
|
|
1998
|
+
response_data = self.api_client.call_api(
|
|
1999
|
+
*_param,
|
|
2000
|
+
_request_timeout=_request_timeout
|
|
2001
|
+
)
|
|
2002
|
+
response_data.read()
|
|
2003
|
+
return self.api_client.response_deserialize(
|
|
2004
|
+
response_data=response_data,
|
|
2005
|
+
response_types_map=_response_types_map,
|
|
2006
|
+
).data
|
|
2007
|
+
|
|
2008
|
+
|
|
2009
|
+
@validate_call
|
|
2010
|
+
def list_sharepoint_sites_with_http_info(
|
|
2011
|
+
self,
|
|
2012
|
+
username: StrictStr,
|
|
2013
|
+
dataset: StrictStr,
|
|
2014
|
+
connector_id: Optional[StrictInt] = None,
|
|
2015
|
+
site_id: Optional[StrictStr] = None,
|
|
2016
|
+
drive_id: Optional[StrictStr] = None,
|
|
2017
|
+
folder_id: Optional[StrictStr] = None,
|
|
2018
|
+
notebook_id: Optional[StrictStr] = None,
|
|
2019
|
+
page_size: Optional[Annotated[int, Field(le=999, strict=True, ge=1)]] = None,
|
|
2020
|
+
cursor: Optional[StrictStr] = None,
|
|
2021
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
2022
|
+
_request_timeout: Union[
|
|
2023
|
+
None,
|
|
2024
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2025
|
+
Tuple[
|
|
2026
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2027
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2028
|
+
]
|
|
2029
|
+
] = None,
|
|
2030
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2031
|
+
_content_type: Optional[StrictStr] = None,
|
|
2032
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2033
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2034
|
+
) -> ApiResponse[ListFilesConnectorResponse]:
|
|
2035
|
+
"""List Sharepoint Sites
|
|
2036
|
+
|
|
2037
|
+
List SharePoint Sites
|
|
2038
|
+
|
|
2039
|
+
:param username: (required)
|
|
2040
|
+
:type username: str
|
|
2041
|
+
:param dataset: (required)
|
|
2042
|
+
:type dataset: str
|
|
2043
|
+
:param connector_id:
|
|
2044
|
+
:type connector_id: int
|
|
2045
|
+
:param site_id:
|
|
2046
|
+
:type site_id: str
|
|
2047
|
+
:param drive_id:
|
|
2048
|
+
:type drive_id: str
|
|
2049
|
+
:param folder_id:
|
|
2050
|
+
:type folder_id: str
|
|
2051
|
+
:param notebook_id:
|
|
2052
|
+
:type notebook_id: str
|
|
2053
|
+
:param page_size:
|
|
2054
|
+
:type page_size: int
|
|
2055
|
+
:param cursor:
|
|
2056
|
+
:type cursor: str
|
|
2057
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
2058
|
+
:type q_answer_api_key: str
|
|
2059
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2060
|
+
number provided, it will be total request
|
|
2061
|
+
timeout. It can also be a pair (tuple) of
|
|
2062
|
+
(connection, read) timeouts.
|
|
2063
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2064
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2065
|
+
request; this effectively ignores the
|
|
2066
|
+
authentication in the spec for a single request.
|
|
2067
|
+
:type _request_auth: dict, optional
|
|
2068
|
+
:param _content_type: force content-type for the request.
|
|
2069
|
+
:type _content_type: str, Optional
|
|
2070
|
+
:param _headers: set to override the headers for a single
|
|
2071
|
+
request; this effectively ignores the headers
|
|
2072
|
+
in the spec for a single request.
|
|
2073
|
+
:type _headers: dict, optional
|
|
2074
|
+
:param _host_index: set to override the host_index for a single
|
|
2075
|
+
request; this effectively ignores the host_index
|
|
2076
|
+
in the spec for a single request.
|
|
2077
|
+
:type _host_index: int, optional
|
|
2078
|
+
:return: Returns the result object.
|
|
2079
|
+
""" # noqa: E501
|
|
2080
|
+
|
|
2081
|
+
_param = self._list_sharepoint_sites_serialize(
|
|
2082
|
+
username=username,
|
|
2083
|
+
dataset=dataset,
|
|
2084
|
+
connector_id=connector_id,
|
|
2085
|
+
site_id=site_id,
|
|
2086
|
+
drive_id=drive_id,
|
|
2087
|
+
folder_id=folder_id,
|
|
2088
|
+
notebook_id=notebook_id,
|
|
2089
|
+
page_size=page_size,
|
|
2090
|
+
cursor=cursor,
|
|
2091
|
+
q_answer_api_key=q_answer_api_key,
|
|
2092
|
+
_request_auth=_request_auth,
|
|
2093
|
+
_content_type=_content_type,
|
|
2094
|
+
_headers=_headers,
|
|
2095
|
+
_host_index=_host_index
|
|
2096
|
+
)
|
|
2097
|
+
|
|
2098
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2099
|
+
'200': "ListFilesConnectorResponse",
|
|
2100
|
+
'422': "HTTPValidationError",
|
|
2101
|
+
}
|
|
2102
|
+
response_data = self.api_client.call_api(
|
|
2103
|
+
*_param,
|
|
2104
|
+
_request_timeout=_request_timeout
|
|
2105
|
+
)
|
|
2106
|
+
response_data.read()
|
|
2107
|
+
return self.api_client.response_deserialize(
|
|
2108
|
+
response_data=response_data,
|
|
2109
|
+
response_types_map=_response_types_map,
|
|
2110
|
+
)
|
|
2111
|
+
|
|
2112
|
+
|
|
2113
|
+
@validate_call
|
|
2114
|
+
def list_sharepoint_sites_without_preload_content(
|
|
2115
|
+
self,
|
|
2116
|
+
username: StrictStr,
|
|
2117
|
+
dataset: StrictStr,
|
|
2118
|
+
connector_id: Optional[StrictInt] = None,
|
|
2119
|
+
site_id: Optional[StrictStr] = None,
|
|
2120
|
+
drive_id: Optional[StrictStr] = None,
|
|
2121
|
+
folder_id: Optional[StrictStr] = None,
|
|
2122
|
+
notebook_id: Optional[StrictStr] = None,
|
|
2123
|
+
page_size: Optional[Annotated[int, Field(le=999, strict=True, ge=1)]] = None,
|
|
2124
|
+
cursor: Optional[StrictStr] = None,
|
|
2125
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
2126
|
+
_request_timeout: Union[
|
|
2127
|
+
None,
|
|
2128
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2129
|
+
Tuple[
|
|
2130
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2131
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2132
|
+
]
|
|
2133
|
+
] = None,
|
|
2134
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2135
|
+
_content_type: Optional[StrictStr] = None,
|
|
2136
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2137
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2138
|
+
) -> RESTResponseType:
|
|
2139
|
+
"""List Sharepoint Sites
|
|
2140
|
+
|
|
2141
|
+
List SharePoint Sites
|
|
2142
|
+
|
|
2143
|
+
:param username: (required)
|
|
2144
|
+
:type username: str
|
|
2145
|
+
:param dataset: (required)
|
|
2146
|
+
:type dataset: str
|
|
2147
|
+
:param connector_id:
|
|
2148
|
+
:type connector_id: int
|
|
2149
|
+
:param site_id:
|
|
2150
|
+
:type site_id: str
|
|
2151
|
+
:param drive_id:
|
|
2152
|
+
:type drive_id: str
|
|
2153
|
+
:param folder_id:
|
|
2154
|
+
:type folder_id: str
|
|
2155
|
+
:param notebook_id:
|
|
2156
|
+
:type notebook_id: str
|
|
2157
|
+
:param page_size:
|
|
2158
|
+
:type page_size: int
|
|
2159
|
+
:param cursor:
|
|
2160
|
+
:type cursor: str
|
|
2161
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
2162
|
+
:type q_answer_api_key: str
|
|
2163
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2164
|
+
number provided, it will be total request
|
|
2165
|
+
timeout. It can also be a pair (tuple) of
|
|
2166
|
+
(connection, read) timeouts.
|
|
2167
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2168
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2169
|
+
request; this effectively ignores the
|
|
2170
|
+
authentication in the spec for a single request.
|
|
2171
|
+
:type _request_auth: dict, optional
|
|
2172
|
+
:param _content_type: force content-type for the request.
|
|
2173
|
+
:type _content_type: str, Optional
|
|
2174
|
+
:param _headers: set to override the headers for a single
|
|
2175
|
+
request; this effectively ignores the headers
|
|
2176
|
+
in the spec for a single request.
|
|
2177
|
+
:type _headers: dict, optional
|
|
2178
|
+
:param _host_index: set to override the host_index for a single
|
|
2179
|
+
request; this effectively ignores the host_index
|
|
2180
|
+
in the spec for a single request.
|
|
2181
|
+
:type _host_index: int, optional
|
|
2182
|
+
:return: Returns the result object.
|
|
2183
|
+
""" # noqa: E501
|
|
2184
|
+
|
|
2185
|
+
_param = self._list_sharepoint_sites_serialize(
|
|
2186
|
+
username=username,
|
|
2187
|
+
dataset=dataset,
|
|
2188
|
+
connector_id=connector_id,
|
|
2189
|
+
site_id=site_id,
|
|
2190
|
+
drive_id=drive_id,
|
|
2191
|
+
folder_id=folder_id,
|
|
2192
|
+
notebook_id=notebook_id,
|
|
2193
|
+
page_size=page_size,
|
|
2194
|
+
cursor=cursor,
|
|
2195
|
+
q_answer_api_key=q_answer_api_key,
|
|
2196
|
+
_request_auth=_request_auth,
|
|
2197
|
+
_content_type=_content_type,
|
|
2198
|
+
_headers=_headers,
|
|
2199
|
+
_host_index=_host_index
|
|
2200
|
+
)
|
|
2201
|
+
|
|
2202
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2203
|
+
'200': "ListFilesConnectorResponse",
|
|
2204
|
+
'422': "HTTPValidationError",
|
|
2205
|
+
}
|
|
2206
|
+
response_data = self.api_client.call_api(
|
|
2207
|
+
*_param,
|
|
2208
|
+
_request_timeout=_request_timeout
|
|
2209
|
+
)
|
|
2210
|
+
return response_data.response
|
|
2211
|
+
|
|
2212
|
+
|
|
2213
|
+
def _list_sharepoint_sites_serialize(
|
|
2214
|
+
self,
|
|
2215
|
+
username,
|
|
2216
|
+
dataset,
|
|
2217
|
+
connector_id,
|
|
2218
|
+
site_id,
|
|
2219
|
+
drive_id,
|
|
2220
|
+
folder_id,
|
|
2221
|
+
notebook_id,
|
|
2222
|
+
page_size,
|
|
2223
|
+
cursor,
|
|
2224
|
+
q_answer_api_key,
|
|
2225
|
+
_request_auth,
|
|
2226
|
+
_content_type,
|
|
2227
|
+
_headers,
|
|
2228
|
+
_host_index,
|
|
2229
|
+
) -> RequestSerialized:
|
|
2230
|
+
|
|
2231
|
+
_host = None
|
|
2232
|
+
|
|
2233
|
+
_collection_formats: Dict[str, str] = {
|
|
2234
|
+
}
|
|
2235
|
+
|
|
2236
|
+
_path_params: Dict[str, str] = {}
|
|
2237
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2238
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2239
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2240
|
+
_files: Dict[
|
|
2241
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2242
|
+
] = {}
|
|
2243
|
+
_body_params: Optional[bytes] = None
|
|
2244
|
+
|
|
2245
|
+
# process the path parameters
|
|
2246
|
+
# process the query parameters
|
|
2247
|
+
if username is not None:
|
|
2248
|
+
|
|
2249
|
+
_query_params.append(('username', username))
|
|
2250
|
+
|
|
2251
|
+
if dataset is not None:
|
|
2252
|
+
|
|
2253
|
+
_query_params.append(('dataset', dataset))
|
|
2254
|
+
|
|
2255
|
+
if connector_id is not None:
|
|
2256
|
+
|
|
2257
|
+
_query_params.append(('connectorId', connector_id))
|
|
2258
|
+
|
|
2259
|
+
if site_id is not None:
|
|
2260
|
+
|
|
2261
|
+
_query_params.append(('siteId', site_id))
|
|
2262
|
+
|
|
2263
|
+
if drive_id is not None:
|
|
2264
|
+
|
|
2265
|
+
_query_params.append(('driveId', drive_id))
|
|
2266
|
+
|
|
2267
|
+
if folder_id is not None:
|
|
2268
|
+
|
|
2269
|
+
_query_params.append(('folderId', folder_id))
|
|
2270
|
+
|
|
2271
|
+
if notebook_id is not None:
|
|
2272
|
+
|
|
2273
|
+
_query_params.append(('notebookId', notebook_id))
|
|
2274
|
+
|
|
2275
|
+
if page_size is not None:
|
|
2276
|
+
|
|
2277
|
+
_query_params.append(('pageSize', page_size))
|
|
2278
|
+
|
|
2279
|
+
if cursor is not None:
|
|
2280
|
+
|
|
2281
|
+
_query_params.append(('cursor', cursor))
|
|
2282
|
+
|
|
2283
|
+
# process the header parameters
|
|
2284
|
+
if q_answer_api_key is not None:
|
|
2285
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
|
2286
|
+
# process the form parameters
|
|
2287
|
+
# process the body parameter
|
|
2288
|
+
|
|
2289
|
+
|
|
2290
|
+
# set the HTTP header `Accept`
|
|
2291
|
+
if 'Accept' not in _header_params:
|
|
2292
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2293
|
+
[
|
|
2294
|
+
'application/json'
|
|
2295
|
+
]
|
|
2296
|
+
)
|
|
2297
|
+
|
|
2298
|
+
|
|
2299
|
+
# authentication setting
|
|
2300
|
+
_auth_settings: List[str] = [
|
|
2301
|
+
'QAnswer-Api-Key',
|
|
2302
|
+
'Bearer token'
|
|
2303
|
+
]
|
|
2304
|
+
|
|
2305
|
+
return self.api_client.param_serialize(
|
|
2306
|
+
method='GET',
|
|
2307
|
+
resource_path='/api/connectors/sharepoint/list',
|
|
2308
|
+
path_params=_path_params,
|
|
2309
|
+
query_params=_query_params,
|
|
2310
|
+
header_params=_header_params,
|
|
2311
|
+
body=_body_params,
|
|
2312
|
+
post_params=_form_params,
|
|
2313
|
+
files=_files,
|
|
2314
|
+
auth_settings=_auth_settings,
|
|
2315
|
+
collection_formats=_collection_formats,
|
|
2316
|
+
_host=_host,
|
|
2317
|
+
_request_auth=_request_auth
|
|
2318
|
+
)
|
|
2319
|
+
|
|
2320
|
+
|
|
2321
|
+
|
|
2322
|
+
|
|
2323
|
+
@validate_call
|
|
2324
|
+
def refresh_sharepoint_files(
|
|
2325
|
+
self,
|
|
2326
|
+
username: StrictStr,
|
|
2327
|
+
dataset: StrictStr,
|
|
2328
|
+
connector_id: Optional[StrictInt] = None,
|
|
2329
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
2330
|
+
_request_timeout: Union[
|
|
2331
|
+
None,
|
|
2332
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2333
|
+
Tuple[
|
|
2334
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2335
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2336
|
+
]
|
|
2337
|
+
] = None,
|
|
2338
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2339
|
+
_content_type: Optional[StrictStr] = None,
|
|
2340
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2341
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2342
|
+
) -> StatusResponse:
|
|
2343
|
+
"""Refresh Sharepoint Files
|
|
2344
|
+
|
|
2345
|
+
Refresh SharePoint files
|
|
2346
|
+
|
|
2347
|
+
:param username: (required)
|
|
2348
|
+
:type username: str
|
|
2349
|
+
:param dataset: (required)
|
|
2350
|
+
:type dataset: str
|
|
2351
|
+
:param connector_id:
|
|
2352
|
+
:type connector_id: int
|
|
2353
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
2354
|
+
:type q_answer_api_key: str
|
|
2355
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2356
|
+
number provided, it will be total request
|
|
2357
|
+
timeout. It can also be a pair (tuple) of
|
|
2358
|
+
(connection, read) timeouts.
|
|
2359
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2360
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2361
|
+
request; this effectively ignores the
|
|
2362
|
+
authentication in the spec for a single request.
|
|
2363
|
+
:type _request_auth: dict, optional
|
|
2364
|
+
:param _content_type: force content-type for the request.
|
|
2365
|
+
:type _content_type: str, Optional
|
|
2366
|
+
:param _headers: set to override the headers for a single
|
|
2367
|
+
request; this effectively ignores the headers
|
|
2368
|
+
in the spec for a single request.
|
|
2369
|
+
:type _headers: dict, optional
|
|
2370
|
+
:param _host_index: set to override the host_index for a single
|
|
2371
|
+
request; this effectively ignores the host_index
|
|
2372
|
+
in the spec for a single request.
|
|
2373
|
+
:type _host_index: int, optional
|
|
2374
|
+
:return: Returns the result object.
|
|
2375
|
+
""" # noqa: E501
|
|
2376
|
+
|
|
2377
|
+
_param = self._refresh_sharepoint_files_serialize(
|
|
2378
|
+
username=username,
|
|
2379
|
+
dataset=dataset,
|
|
2380
|
+
connector_id=connector_id,
|
|
2381
|
+
q_answer_api_key=q_answer_api_key,
|
|
2382
|
+
_request_auth=_request_auth,
|
|
2383
|
+
_content_type=_content_type,
|
|
2384
|
+
_headers=_headers,
|
|
2385
|
+
_host_index=_host_index
|
|
2386
|
+
)
|
|
2387
|
+
|
|
2388
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2389
|
+
'200': "StatusResponse",
|
|
2390
|
+
'422': "HTTPValidationError",
|
|
2391
|
+
}
|
|
2392
|
+
response_data = self.api_client.call_api(
|
|
2393
|
+
*_param,
|
|
2394
|
+
_request_timeout=_request_timeout
|
|
2395
|
+
)
|
|
2396
|
+
response_data.read()
|
|
2397
|
+
return self.api_client.response_deserialize(
|
|
2398
|
+
response_data=response_data,
|
|
2399
|
+
response_types_map=_response_types_map,
|
|
2400
|
+
).data
|
|
2401
|
+
|
|
2402
|
+
|
|
2403
|
+
@validate_call
|
|
2404
|
+
def refresh_sharepoint_files_with_http_info(
|
|
2405
|
+
self,
|
|
2406
|
+
username: StrictStr,
|
|
2407
|
+
dataset: StrictStr,
|
|
2408
|
+
connector_id: Optional[StrictInt] = None,
|
|
2409
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
2410
|
+
_request_timeout: Union[
|
|
2411
|
+
None,
|
|
2412
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2413
|
+
Tuple[
|
|
2414
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2415
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2416
|
+
]
|
|
2417
|
+
] = None,
|
|
2418
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2419
|
+
_content_type: Optional[StrictStr] = None,
|
|
2420
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2421
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2422
|
+
) -> ApiResponse[StatusResponse]:
|
|
2423
|
+
"""Refresh Sharepoint Files
|
|
2424
|
+
|
|
2425
|
+
Refresh SharePoint files
|
|
2426
|
+
|
|
2427
|
+
:param username: (required)
|
|
2428
|
+
:type username: str
|
|
2429
|
+
:param dataset: (required)
|
|
2430
|
+
:type dataset: str
|
|
2431
|
+
:param connector_id:
|
|
2432
|
+
:type connector_id: int
|
|
2433
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
2434
|
+
:type q_answer_api_key: str
|
|
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._refresh_sharepoint_files_serialize(
|
|
2458
|
+
username=username,
|
|
2459
|
+
dataset=dataset,
|
|
2460
|
+
connector_id=connector_id,
|
|
2461
|
+
q_answer_api_key=q_answer_api_key,
|
|
2462
|
+
_request_auth=_request_auth,
|
|
2463
|
+
_content_type=_content_type,
|
|
2464
|
+
_headers=_headers,
|
|
2465
|
+
_host_index=_host_index
|
|
2466
|
+
)
|
|
2467
|
+
|
|
2468
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2469
|
+
'200': "StatusResponse",
|
|
2470
|
+
'422': "HTTPValidationError",
|
|
2471
|
+
}
|
|
2472
|
+
response_data = self.api_client.call_api(
|
|
2473
|
+
*_param,
|
|
2474
|
+
_request_timeout=_request_timeout
|
|
2475
|
+
)
|
|
2476
|
+
response_data.read()
|
|
2477
|
+
return self.api_client.response_deserialize(
|
|
2478
|
+
response_data=response_data,
|
|
2479
|
+
response_types_map=_response_types_map,
|
|
2480
|
+
)
|
|
2481
|
+
|
|
2482
|
+
|
|
2483
|
+
@validate_call
|
|
2484
|
+
def refresh_sharepoint_files_without_preload_content(
|
|
2485
|
+
self,
|
|
2486
|
+
username: StrictStr,
|
|
2487
|
+
dataset: StrictStr,
|
|
2488
|
+
connector_id: Optional[StrictInt] = None,
|
|
2489
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
2490
|
+
_request_timeout: Union[
|
|
2491
|
+
None,
|
|
2492
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2493
|
+
Tuple[
|
|
2494
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2495
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2496
|
+
]
|
|
2497
|
+
] = None,
|
|
2498
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2499
|
+
_content_type: Optional[StrictStr] = None,
|
|
2500
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2501
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2502
|
+
) -> RESTResponseType:
|
|
2503
|
+
"""Refresh Sharepoint Files
|
|
2504
|
+
|
|
2505
|
+
Refresh SharePoint files
|
|
2506
|
+
|
|
2507
|
+
:param username: (required)
|
|
2508
|
+
:type username: str
|
|
2509
|
+
:param dataset: (required)
|
|
2510
|
+
:type dataset: str
|
|
2511
|
+
:param connector_id:
|
|
2512
|
+
:type connector_id: int
|
|
2513
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
2514
|
+
:type q_answer_api_key: str
|
|
2515
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2516
|
+
number provided, it will be total request
|
|
2517
|
+
timeout. It can also be a pair (tuple) of
|
|
2518
|
+
(connection, read) timeouts.
|
|
2519
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2520
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2521
|
+
request; this effectively ignores the
|
|
2522
|
+
authentication in the spec for a single request.
|
|
2523
|
+
:type _request_auth: dict, optional
|
|
2524
|
+
:param _content_type: force content-type for the request.
|
|
2525
|
+
:type _content_type: str, Optional
|
|
2526
|
+
:param _headers: set to override the headers for a single
|
|
2527
|
+
request; this effectively ignores the headers
|
|
2528
|
+
in the spec for a single request.
|
|
2529
|
+
:type _headers: dict, optional
|
|
2530
|
+
:param _host_index: set to override the host_index for a single
|
|
2531
|
+
request; this effectively ignores the host_index
|
|
2532
|
+
in the spec for a single request.
|
|
2533
|
+
:type _host_index: int, optional
|
|
2534
|
+
:return: Returns the result object.
|
|
2535
|
+
""" # noqa: E501
|
|
2536
|
+
|
|
2537
|
+
_param = self._refresh_sharepoint_files_serialize(
|
|
2538
|
+
username=username,
|
|
2539
|
+
dataset=dataset,
|
|
2540
|
+
connector_id=connector_id,
|
|
2541
|
+
q_answer_api_key=q_answer_api_key,
|
|
2542
|
+
_request_auth=_request_auth,
|
|
2543
|
+
_content_type=_content_type,
|
|
2544
|
+
_headers=_headers,
|
|
2545
|
+
_host_index=_host_index
|
|
2546
|
+
)
|
|
2547
|
+
|
|
2548
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2549
|
+
'200': "StatusResponse",
|
|
2550
|
+
'422': "HTTPValidationError",
|
|
2551
|
+
}
|
|
2552
|
+
response_data = self.api_client.call_api(
|
|
2553
|
+
*_param,
|
|
2554
|
+
_request_timeout=_request_timeout
|
|
2555
|
+
)
|
|
2556
|
+
return response_data.response
|
|
2557
|
+
|
|
2558
|
+
|
|
2559
|
+
def _refresh_sharepoint_files_serialize(
|
|
2560
|
+
self,
|
|
2561
|
+
username,
|
|
2562
|
+
dataset,
|
|
2563
|
+
connector_id,
|
|
2564
|
+
q_answer_api_key,
|
|
2565
|
+
_request_auth,
|
|
2566
|
+
_content_type,
|
|
2567
|
+
_headers,
|
|
2568
|
+
_host_index,
|
|
2569
|
+
) -> RequestSerialized:
|
|
2570
|
+
|
|
2571
|
+
_host = None
|
|
2572
|
+
|
|
2573
|
+
_collection_formats: Dict[str, str] = {
|
|
2574
|
+
}
|
|
2575
|
+
|
|
2576
|
+
_path_params: Dict[str, str] = {}
|
|
2577
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2578
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2579
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2580
|
+
_files: Dict[
|
|
2581
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2582
|
+
] = {}
|
|
2583
|
+
_body_params: Optional[bytes] = None
|
|
2584
|
+
|
|
2585
|
+
# process the path parameters
|
|
2586
|
+
# process the query parameters
|
|
2587
|
+
if username is not None:
|
|
2588
|
+
|
|
2589
|
+
_query_params.append(('username', username))
|
|
2590
|
+
|
|
2591
|
+
if dataset is not None:
|
|
2592
|
+
|
|
2593
|
+
_query_params.append(('dataset', dataset))
|
|
2594
|
+
|
|
2595
|
+
if connector_id is not None:
|
|
2596
|
+
|
|
2597
|
+
_query_params.append(('connectorId', connector_id))
|
|
2598
|
+
|
|
2599
|
+
# process the header parameters
|
|
2600
|
+
if q_answer_api_key is not None:
|
|
2601
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
|
2602
|
+
# process the form parameters
|
|
2603
|
+
# process the body parameter
|
|
2604
|
+
|
|
2605
|
+
|
|
2606
|
+
# set the HTTP header `Accept`
|
|
2607
|
+
if 'Accept' not in _header_params:
|
|
2608
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2609
|
+
[
|
|
2610
|
+
'application/json'
|
|
2611
|
+
]
|
|
2612
|
+
)
|
|
2613
|
+
|
|
2614
|
+
|
|
2615
|
+
# authentication setting
|
|
2616
|
+
_auth_settings: List[str] = [
|
|
2617
|
+
'QAnswer-Api-Key',
|
|
2618
|
+
'Bearer token'
|
|
2619
|
+
]
|
|
2620
|
+
|
|
2621
|
+
return self.api_client.param_serialize(
|
|
2622
|
+
method='POST',
|
|
2623
|
+
resource_path='/api/connectors/sharepoint/refresh',
|
|
2624
|
+
path_params=_path_params,
|
|
2625
|
+
query_params=_query_params,
|
|
2626
|
+
header_params=_header_params,
|
|
2627
|
+
body=_body_params,
|
|
2628
|
+
post_params=_form_params,
|
|
2629
|
+
files=_files,
|
|
2630
|
+
auth_settings=_auth_settings,
|
|
2631
|
+
collection_formats=_collection_formats,
|
|
2632
|
+
_host=_host,
|
|
2633
|
+
_request_auth=_request_auth
|
|
2634
|
+
)
|
|
2635
|
+
|
|
2636
|
+
|
|
2637
|
+
|
|
2638
|
+
|
|
2639
|
+
@validate_call
|
|
2640
|
+
def resync_sharepoint_permissions(
|
|
2641
|
+
self,
|
|
2642
|
+
username: Annotated[StrictStr, Field(description="Owner username of the dataset")],
|
|
2643
|
+
dataset: Annotated[StrictStr, Field(description="Dataset name")],
|
|
2644
|
+
connector_id: Annotated[int, Field(strict=True, ge=1, description="SharePoint connector id")],
|
|
2645
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
2646
|
+
_request_timeout: Union[
|
|
2647
|
+
None,
|
|
2648
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2649
|
+
Tuple[
|
|
2650
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2651
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2652
|
+
]
|
|
2653
|
+
] = None,
|
|
2654
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2655
|
+
_content_type: Optional[StrictStr] = None,
|
|
2656
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2657
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2658
|
+
) -> StatusResponse:
|
|
2659
|
+
"""Resync Sharepoint Permissions
|
|
2660
|
+
|
|
2661
|
+
Re-fetch SharePoint document permissions for an indexed connector. Updates each indexed document's ACL metadata in place (no content re-ingest) so access changes made in SharePoint take effect. Runs in the background.
|
|
2662
|
+
|
|
2663
|
+
:param username: Owner username of the dataset (required)
|
|
2664
|
+
:type username: str
|
|
2665
|
+
:param dataset: Dataset name (required)
|
|
2666
|
+
:type dataset: str
|
|
2667
|
+
:param connector_id: SharePoint connector id (required)
|
|
2668
|
+
:type connector_id: int
|
|
2669
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
2670
|
+
:type q_answer_api_key: str
|
|
2671
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2672
|
+
number provided, it will be total request
|
|
2673
|
+
timeout. It can also be a pair (tuple) of
|
|
2674
|
+
(connection, read) timeouts.
|
|
2675
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2676
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2677
|
+
request; this effectively ignores the
|
|
2678
|
+
authentication in the spec for a single request.
|
|
2679
|
+
:type _request_auth: dict, optional
|
|
2680
|
+
:param _content_type: force content-type for the request.
|
|
2681
|
+
:type _content_type: str, Optional
|
|
2682
|
+
:param _headers: set to override the headers for a single
|
|
2683
|
+
request; this effectively ignores the headers
|
|
2684
|
+
in the spec for a single request.
|
|
2685
|
+
:type _headers: dict, optional
|
|
2686
|
+
:param _host_index: set to override the host_index for a single
|
|
2687
|
+
request; this effectively ignores the host_index
|
|
2688
|
+
in the spec for a single request.
|
|
2689
|
+
:type _host_index: int, optional
|
|
2690
|
+
:return: Returns the result object.
|
|
2691
|
+
""" # noqa: E501
|
|
2692
|
+
|
|
2693
|
+
_param = self._resync_sharepoint_permissions_serialize(
|
|
2694
|
+
username=username,
|
|
2695
|
+
dataset=dataset,
|
|
2696
|
+
connector_id=connector_id,
|
|
2697
|
+
q_answer_api_key=q_answer_api_key,
|
|
2698
|
+
_request_auth=_request_auth,
|
|
2699
|
+
_content_type=_content_type,
|
|
2700
|
+
_headers=_headers,
|
|
2701
|
+
_host_index=_host_index
|
|
2702
|
+
)
|
|
2703
|
+
|
|
2704
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2705
|
+
'200': "StatusResponse",
|
|
2706
|
+
'422': "HTTPValidationError",
|
|
2707
|
+
}
|
|
2708
|
+
response_data = self.api_client.call_api(
|
|
2709
|
+
*_param,
|
|
2710
|
+
_request_timeout=_request_timeout
|
|
2711
|
+
)
|
|
2712
|
+
response_data.read()
|
|
2713
|
+
return self.api_client.response_deserialize(
|
|
2714
|
+
response_data=response_data,
|
|
2715
|
+
response_types_map=_response_types_map,
|
|
2716
|
+
).data
|
|
2717
|
+
|
|
2718
|
+
|
|
2719
|
+
@validate_call
|
|
2720
|
+
def resync_sharepoint_permissions_with_http_info(
|
|
2721
|
+
self,
|
|
2722
|
+
username: Annotated[StrictStr, Field(description="Owner username of the dataset")],
|
|
2723
|
+
dataset: Annotated[StrictStr, Field(description="Dataset name")],
|
|
2724
|
+
connector_id: Annotated[int, Field(strict=True, ge=1, description="SharePoint connector id")],
|
|
2725
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
2726
|
+
_request_timeout: Union[
|
|
2727
|
+
None,
|
|
2728
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2729
|
+
Tuple[
|
|
2730
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2731
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2732
|
+
]
|
|
2733
|
+
] = None,
|
|
2734
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2735
|
+
_content_type: Optional[StrictStr] = None,
|
|
2736
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2737
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2738
|
+
) -> ApiResponse[StatusResponse]:
|
|
2739
|
+
"""Resync Sharepoint Permissions
|
|
2740
|
+
|
|
2741
|
+
Re-fetch SharePoint document permissions for an indexed connector. Updates each indexed document's ACL metadata in place (no content re-ingest) so access changes made in SharePoint take effect. Runs in the background.
|
|
2742
|
+
|
|
2743
|
+
:param username: Owner username of the dataset (required)
|
|
2744
|
+
:type username: str
|
|
2745
|
+
:param dataset: Dataset name (required)
|
|
2746
|
+
:type dataset: str
|
|
2747
|
+
:param connector_id: SharePoint connector id (required)
|
|
2748
|
+
:type connector_id: int
|
|
2749
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
2750
|
+
:type q_answer_api_key: str
|
|
2751
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2752
|
+
number provided, it will be total request
|
|
2753
|
+
timeout. It can also be a pair (tuple) of
|
|
2754
|
+
(connection, read) timeouts.
|
|
2755
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2756
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2757
|
+
request; this effectively ignores the
|
|
2758
|
+
authentication in the spec for a single request.
|
|
2759
|
+
:type _request_auth: dict, optional
|
|
2760
|
+
:param _content_type: force content-type for the request.
|
|
2761
|
+
:type _content_type: str, Optional
|
|
2762
|
+
:param _headers: set to override the headers for a single
|
|
2763
|
+
request; this effectively ignores the headers
|
|
2764
|
+
in the spec for a single request.
|
|
2765
|
+
:type _headers: dict, optional
|
|
2766
|
+
:param _host_index: set to override the host_index for a single
|
|
2767
|
+
request; this effectively ignores the host_index
|
|
2768
|
+
in the spec for a single request.
|
|
2769
|
+
:type _host_index: int, optional
|
|
2770
|
+
:return: Returns the result object.
|
|
2771
|
+
""" # noqa: E501
|
|
2772
|
+
|
|
2773
|
+
_param = self._resync_sharepoint_permissions_serialize(
|
|
2774
|
+
username=username,
|
|
2775
|
+
dataset=dataset,
|
|
2776
|
+
connector_id=connector_id,
|
|
2777
|
+
q_answer_api_key=q_answer_api_key,
|
|
2778
|
+
_request_auth=_request_auth,
|
|
2779
|
+
_content_type=_content_type,
|
|
2780
|
+
_headers=_headers,
|
|
2781
|
+
_host_index=_host_index
|
|
2782
|
+
)
|
|
2783
|
+
|
|
2784
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2785
|
+
'200': "StatusResponse",
|
|
2786
|
+
'422': "HTTPValidationError",
|
|
2787
|
+
}
|
|
2788
|
+
response_data = self.api_client.call_api(
|
|
2789
|
+
*_param,
|
|
2790
|
+
_request_timeout=_request_timeout
|
|
2791
|
+
)
|
|
2792
|
+
response_data.read()
|
|
2793
|
+
return self.api_client.response_deserialize(
|
|
2794
|
+
response_data=response_data,
|
|
2795
|
+
response_types_map=_response_types_map,
|
|
2796
|
+
)
|
|
2797
|
+
|
|
2798
|
+
|
|
2799
|
+
@validate_call
|
|
2800
|
+
def resync_sharepoint_permissions_without_preload_content(
|
|
2801
|
+
self,
|
|
2802
|
+
username: Annotated[StrictStr, Field(description="Owner username of the dataset")],
|
|
2803
|
+
dataset: Annotated[StrictStr, Field(description="Dataset name")],
|
|
2804
|
+
connector_id: Annotated[int, Field(strict=True, ge=1, description="SharePoint connector id")],
|
|
2805
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
2806
|
+
_request_timeout: Union[
|
|
2807
|
+
None,
|
|
2808
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2809
|
+
Tuple[
|
|
2810
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2811
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2812
|
+
]
|
|
2813
|
+
] = None,
|
|
2814
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2815
|
+
_content_type: Optional[StrictStr] = None,
|
|
2816
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2817
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2818
|
+
) -> RESTResponseType:
|
|
2819
|
+
"""Resync Sharepoint Permissions
|
|
2820
|
+
|
|
2821
|
+
Re-fetch SharePoint document permissions for an indexed connector. Updates each indexed document's ACL metadata in place (no content re-ingest) so access changes made in SharePoint take effect. Runs in the background.
|
|
2822
|
+
|
|
2823
|
+
:param username: Owner username of the dataset (required)
|
|
2824
|
+
:type username: str
|
|
2825
|
+
:param dataset: Dataset name (required)
|
|
2826
|
+
:type dataset: str
|
|
2827
|
+
:param connector_id: SharePoint connector id (required)
|
|
2828
|
+
:type connector_id: int
|
|
2829
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
2830
|
+
:type q_answer_api_key: str
|
|
2831
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2832
|
+
number provided, it will be total request
|
|
2833
|
+
timeout. It can also be a pair (tuple) of
|
|
2834
|
+
(connection, read) timeouts.
|
|
2835
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2836
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2837
|
+
request; this effectively ignores the
|
|
2838
|
+
authentication in the spec for a single request.
|
|
2839
|
+
:type _request_auth: dict, optional
|
|
2840
|
+
:param _content_type: force content-type for the request.
|
|
2841
|
+
:type _content_type: str, Optional
|
|
2842
|
+
:param _headers: set to override the headers for a single
|
|
2843
|
+
request; this effectively ignores the headers
|
|
2844
|
+
in the spec for a single request.
|
|
2845
|
+
:type _headers: dict, optional
|
|
2846
|
+
:param _host_index: set to override the host_index for a single
|
|
2847
|
+
request; this effectively ignores the host_index
|
|
2848
|
+
in the spec for a single request.
|
|
2849
|
+
:type _host_index: int, optional
|
|
2850
|
+
:return: Returns the result object.
|
|
2851
|
+
""" # noqa: E501
|
|
2852
|
+
|
|
2853
|
+
_param = self._resync_sharepoint_permissions_serialize(
|
|
2854
|
+
username=username,
|
|
2855
|
+
dataset=dataset,
|
|
2856
|
+
connector_id=connector_id,
|
|
2857
|
+
q_answer_api_key=q_answer_api_key,
|
|
2858
|
+
_request_auth=_request_auth,
|
|
2859
|
+
_content_type=_content_type,
|
|
2860
|
+
_headers=_headers,
|
|
2861
|
+
_host_index=_host_index
|
|
2862
|
+
)
|
|
2863
|
+
|
|
2864
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2865
|
+
'200': "StatusResponse",
|
|
2866
|
+
'422': "HTTPValidationError",
|
|
2867
|
+
}
|
|
2868
|
+
response_data = self.api_client.call_api(
|
|
2869
|
+
*_param,
|
|
2870
|
+
_request_timeout=_request_timeout
|
|
2871
|
+
)
|
|
2872
|
+
return response_data.response
|
|
2873
|
+
|
|
2874
|
+
|
|
2875
|
+
def _resync_sharepoint_permissions_serialize(
|
|
2876
|
+
self,
|
|
2877
|
+
username,
|
|
2878
|
+
dataset,
|
|
2879
|
+
connector_id,
|
|
2880
|
+
q_answer_api_key,
|
|
2881
|
+
_request_auth,
|
|
2882
|
+
_content_type,
|
|
2883
|
+
_headers,
|
|
2884
|
+
_host_index,
|
|
2885
|
+
) -> RequestSerialized:
|
|
2886
|
+
|
|
2887
|
+
_host = None
|
|
2888
|
+
|
|
2889
|
+
_collection_formats: Dict[str, str] = {
|
|
2890
|
+
}
|
|
2891
|
+
|
|
2892
|
+
_path_params: Dict[str, str] = {}
|
|
2893
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2894
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2895
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2896
|
+
_files: Dict[
|
|
2897
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2898
|
+
] = {}
|
|
2899
|
+
_body_params: Optional[bytes] = None
|
|
2900
|
+
|
|
2901
|
+
# process the path parameters
|
|
2902
|
+
# process the query parameters
|
|
2903
|
+
if username is not None:
|
|
2904
|
+
|
|
2905
|
+
_query_params.append(('username', username))
|
|
2906
|
+
|
|
2907
|
+
if dataset is not None:
|
|
2908
|
+
|
|
2909
|
+
_query_params.append(('dataset', dataset))
|
|
2910
|
+
|
|
2911
|
+
if connector_id is not None:
|
|
2912
|
+
|
|
2913
|
+
_query_params.append(('connectorId', connector_id))
|
|
2914
|
+
|
|
2915
|
+
# process the header parameters
|
|
2916
|
+
if q_answer_api_key is not None:
|
|
2917
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
|
2918
|
+
# process the form parameters
|
|
2919
|
+
# process the body parameter
|
|
2920
|
+
|
|
2921
|
+
|
|
2922
|
+
# set the HTTP header `Accept`
|
|
2923
|
+
if 'Accept' not in _header_params:
|
|
2924
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2925
|
+
[
|
|
2926
|
+
'application/json'
|
|
2927
|
+
]
|
|
2928
|
+
)
|
|
2929
|
+
|
|
2930
|
+
|
|
2931
|
+
# authentication setting
|
|
2932
|
+
_auth_settings: List[str] = [
|
|
2933
|
+
'QAnswer-Api-Key',
|
|
2934
|
+
'Bearer token'
|
|
2935
|
+
]
|
|
2936
|
+
|
|
2937
|
+
return self.api_client.param_serialize(
|
|
2938
|
+
method='POST',
|
|
2939
|
+
resource_path='/api/connectors/sharepoint/permissions/resync',
|
|
2940
|
+
path_params=_path_params,
|
|
2941
|
+
query_params=_query_params,
|
|
2942
|
+
header_params=_header_params,
|
|
2943
|
+
body=_body_params,
|
|
2944
|
+
post_params=_form_params,
|
|
2945
|
+
files=_files,
|
|
2946
|
+
auth_settings=_auth_settings,
|
|
2947
|
+
collection_formats=_collection_formats,
|
|
2948
|
+
_host=_host,
|
|
2949
|
+
_request_auth=_request_auth
|
|
2950
|
+
)
|
|
2951
|
+
|
|
2952
|
+
|
|
2953
|
+
|
|
2954
|
+
|
|
2955
|
+
@validate_call
|
|
2956
|
+
def search_sharepoint_files(
|
|
2957
|
+
self,
|
|
2958
|
+
username: StrictStr,
|
|
2959
|
+
dataset: StrictStr,
|
|
2960
|
+
query: StrictStr,
|
|
2961
|
+
connector_id: Optional[StrictInt] = None,
|
|
2962
|
+
site_id: Optional[StrictStr] = None,
|
|
2963
|
+
item_type: Optional[StrictStr] = None,
|
|
2964
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
2965
|
+
_request_timeout: Union[
|
|
2966
|
+
None,
|
|
2967
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2968
|
+
Tuple[
|
|
2969
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2970
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2971
|
+
]
|
|
2972
|
+
] = None,
|
|
2973
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2974
|
+
_content_type: Optional[StrictStr] = None,
|
|
2975
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2976
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2977
|
+
) -> ListFilesConnectorResponse:
|
|
2978
|
+
"""Search Sharepoint Files
|
|
2979
|
+
|
|
2980
|
+
Search SharePoint files
|
|
2981
|
+
|
|
2982
|
+
:param username: (required)
|
|
2983
|
+
:type username: str
|
|
2984
|
+
:param dataset: (required)
|
|
2985
|
+
:type dataset: str
|
|
2986
|
+
:param query: (required)
|
|
2987
|
+
:type query: str
|
|
2988
|
+
:param connector_id:
|
|
2989
|
+
:type connector_id: int
|
|
2990
|
+
:param site_id:
|
|
2991
|
+
:type site_id: str
|
|
2992
|
+
:param item_type:
|
|
2993
|
+
:type item_type: str
|
|
2994
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
2995
|
+
:type q_answer_api_key: str
|
|
2996
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2997
|
+
number provided, it will be total request
|
|
2998
|
+
timeout. It can also be a pair (tuple) of
|
|
2999
|
+
(connection, read) timeouts.
|
|
3000
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3001
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3002
|
+
request; this effectively ignores the
|
|
3003
|
+
authentication in the spec for a single request.
|
|
3004
|
+
:type _request_auth: dict, optional
|
|
3005
|
+
:param _content_type: force content-type for the request.
|
|
3006
|
+
:type _content_type: str, Optional
|
|
3007
|
+
:param _headers: set to override the headers for a single
|
|
3008
|
+
request; this effectively ignores the headers
|
|
3009
|
+
in the spec for a single request.
|
|
3010
|
+
:type _headers: dict, optional
|
|
3011
|
+
:param _host_index: set to override the host_index for a single
|
|
3012
|
+
request; this effectively ignores the host_index
|
|
3013
|
+
in the spec for a single request.
|
|
3014
|
+
:type _host_index: int, optional
|
|
3015
|
+
:return: Returns the result object.
|
|
3016
|
+
""" # noqa: E501
|
|
3017
|
+
|
|
3018
|
+
_param = self._search_sharepoint_files_serialize(
|
|
3019
|
+
username=username,
|
|
3020
|
+
dataset=dataset,
|
|
3021
|
+
query=query,
|
|
3022
|
+
connector_id=connector_id,
|
|
3023
|
+
site_id=site_id,
|
|
3024
|
+
item_type=item_type,
|
|
3025
|
+
q_answer_api_key=q_answer_api_key,
|
|
3026
|
+
_request_auth=_request_auth,
|
|
3027
|
+
_content_type=_content_type,
|
|
3028
|
+
_headers=_headers,
|
|
3029
|
+
_host_index=_host_index
|
|
3030
|
+
)
|
|
3031
|
+
|
|
3032
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3033
|
+
'200': "ListFilesConnectorResponse",
|
|
3034
|
+
'422': "HTTPValidationError",
|
|
3035
|
+
}
|
|
3036
|
+
response_data = self.api_client.call_api(
|
|
3037
|
+
*_param,
|
|
3038
|
+
_request_timeout=_request_timeout
|
|
3039
|
+
)
|
|
3040
|
+
response_data.read()
|
|
3041
|
+
return self.api_client.response_deserialize(
|
|
3042
|
+
response_data=response_data,
|
|
3043
|
+
response_types_map=_response_types_map,
|
|
3044
|
+
).data
|
|
3045
|
+
|
|
3046
|
+
|
|
3047
|
+
@validate_call
|
|
3048
|
+
def search_sharepoint_files_with_http_info(
|
|
3049
|
+
self,
|
|
3050
|
+
username: StrictStr,
|
|
3051
|
+
dataset: StrictStr,
|
|
3052
|
+
query: StrictStr,
|
|
3053
|
+
connector_id: Optional[StrictInt] = None,
|
|
3054
|
+
site_id: Optional[StrictStr] = None,
|
|
3055
|
+
item_type: Optional[StrictStr] = None,
|
|
3056
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
3057
|
+
_request_timeout: Union[
|
|
3058
|
+
None,
|
|
3059
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3060
|
+
Tuple[
|
|
3061
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3062
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3063
|
+
]
|
|
3064
|
+
] = None,
|
|
3065
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3066
|
+
_content_type: Optional[StrictStr] = None,
|
|
3067
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3068
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3069
|
+
) -> ApiResponse[ListFilesConnectorResponse]:
|
|
3070
|
+
"""Search Sharepoint Files
|
|
3071
|
+
|
|
3072
|
+
Search SharePoint files
|
|
3073
|
+
|
|
3074
|
+
:param username: (required)
|
|
3075
|
+
:type username: str
|
|
3076
|
+
:param dataset: (required)
|
|
3077
|
+
:type dataset: str
|
|
3078
|
+
:param query: (required)
|
|
3079
|
+
:type query: str
|
|
3080
|
+
:param connector_id:
|
|
3081
|
+
:type connector_id: int
|
|
3082
|
+
:param site_id:
|
|
3083
|
+
:type site_id: str
|
|
3084
|
+
:param item_type:
|
|
3085
|
+
:type item_type: str
|
|
3086
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
3087
|
+
:type q_answer_api_key: str
|
|
3088
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3089
|
+
number provided, it will be total request
|
|
3090
|
+
timeout. It can also be a pair (tuple) of
|
|
3091
|
+
(connection, read) timeouts.
|
|
3092
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3093
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3094
|
+
request; this effectively ignores the
|
|
3095
|
+
authentication in the spec for a single request.
|
|
3096
|
+
:type _request_auth: dict, optional
|
|
3097
|
+
:param _content_type: force content-type for the request.
|
|
3098
|
+
:type _content_type: str, Optional
|
|
3099
|
+
:param _headers: set to override the headers for a single
|
|
3100
|
+
request; this effectively ignores the headers
|
|
3101
|
+
in the spec for a single request.
|
|
3102
|
+
:type _headers: dict, optional
|
|
3103
|
+
:param _host_index: set to override the host_index for a single
|
|
3104
|
+
request; this effectively ignores the host_index
|
|
3105
|
+
in the spec for a single request.
|
|
3106
|
+
:type _host_index: int, optional
|
|
3107
|
+
:return: Returns the result object.
|
|
3108
|
+
""" # noqa: E501
|
|
3109
|
+
|
|
3110
|
+
_param = self._search_sharepoint_files_serialize(
|
|
3111
|
+
username=username,
|
|
3112
|
+
dataset=dataset,
|
|
3113
|
+
query=query,
|
|
3114
|
+
connector_id=connector_id,
|
|
3115
|
+
site_id=site_id,
|
|
3116
|
+
item_type=item_type,
|
|
3117
|
+
q_answer_api_key=q_answer_api_key,
|
|
3118
|
+
_request_auth=_request_auth,
|
|
3119
|
+
_content_type=_content_type,
|
|
3120
|
+
_headers=_headers,
|
|
3121
|
+
_host_index=_host_index
|
|
3122
|
+
)
|
|
3123
|
+
|
|
3124
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3125
|
+
'200': "ListFilesConnectorResponse",
|
|
3126
|
+
'422': "HTTPValidationError",
|
|
3127
|
+
}
|
|
3128
|
+
response_data = self.api_client.call_api(
|
|
3129
|
+
*_param,
|
|
3130
|
+
_request_timeout=_request_timeout
|
|
3131
|
+
)
|
|
3132
|
+
response_data.read()
|
|
3133
|
+
return self.api_client.response_deserialize(
|
|
3134
|
+
response_data=response_data,
|
|
3135
|
+
response_types_map=_response_types_map,
|
|
3136
|
+
)
|
|
3137
|
+
|
|
3138
|
+
|
|
3139
|
+
@validate_call
|
|
3140
|
+
def search_sharepoint_files_without_preload_content(
|
|
3141
|
+
self,
|
|
3142
|
+
username: StrictStr,
|
|
3143
|
+
dataset: StrictStr,
|
|
3144
|
+
query: StrictStr,
|
|
3145
|
+
connector_id: Optional[StrictInt] = None,
|
|
3146
|
+
site_id: Optional[StrictStr] = None,
|
|
3147
|
+
item_type: Optional[StrictStr] = None,
|
|
3148
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
3149
|
+
_request_timeout: Union[
|
|
3150
|
+
None,
|
|
3151
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3152
|
+
Tuple[
|
|
3153
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3154
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3155
|
+
]
|
|
3156
|
+
] = None,
|
|
3157
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3158
|
+
_content_type: Optional[StrictStr] = None,
|
|
3159
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3160
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3161
|
+
) -> RESTResponseType:
|
|
3162
|
+
"""Search Sharepoint Files
|
|
3163
|
+
|
|
3164
|
+
Search SharePoint files
|
|
3165
|
+
|
|
3166
|
+
:param username: (required)
|
|
3167
|
+
:type username: str
|
|
3168
|
+
:param dataset: (required)
|
|
3169
|
+
:type dataset: str
|
|
3170
|
+
:param query: (required)
|
|
3171
|
+
:type query: str
|
|
3172
|
+
:param connector_id:
|
|
3173
|
+
:type connector_id: int
|
|
3174
|
+
:param site_id:
|
|
3175
|
+
:type site_id: str
|
|
3176
|
+
:param item_type:
|
|
3177
|
+
:type item_type: str
|
|
3178
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
3179
|
+
:type q_answer_api_key: str
|
|
3180
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3181
|
+
number provided, it will be total request
|
|
3182
|
+
timeout. It can also be a pair (tuple) of
|
|
3183
|
+
(connection, read) timeouts.
|
|
3184
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3185
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3186
|
+
request; this effectively ignores the
|
|
3187
|
+
authentication in the spec for a single request.
|
|
3188
|
+
:type _request_auth: dict, optional
|
|
3189
|
+
:param _content_type: force content-type for the request.
|
|
3190
|
+
:type _content_type: str, Optional
|
|
3191
|
+
:param _headers: set to override the headers for a single
|
|
3192
|
+
request; this effectively ignores the headers
|
|
3193
|
+
in the spec for a single request.
|
|
3194
|
+
:type _headers: dict, optional
|
|
3195
|
+
:param _host_index: set to override the host_index for a single
|
|
3196
|
+
request; this effectively ignores the host_index
|
|
3197
|
+
in the spec for a single request.
|
|
3198
|
+
:type _host_index: int, optional
|
|
3199
|
+
:return: Returns the result object.
|
|
3200
|
+
""" # noqa: E501
|
|
3201
|
+
|
|
3202
|
+
_param = self._search_sharepoint_files_serialize(
|
|
3203
|
+
username=username,
|
|
3204
|
+
dataset=dataset,
|
|
3205
|
+
query=query,
|
|
3206
|
+
connector_id=connector_id,
|
|
3207
|
+
site_id=site_id,
|
|
3208
|
+
item_type=item_type,
|
|
3209
|
+
q_answer_api_key=q_answer_api_key,
|
|
3210
|
+
_request_auth=_request_auth,
|
|
3211
|
+
_content_type=_content_type,
|
|
3212
|
+
_headers=_headers,
|
|
3213
|
+
_host_index=_host_index
|
|
3214
|
+
)
|
|
3215
|
+
|
|
3216
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3217
|
+
'200': "ListFilesConnectorResponse",
|
|
3218
|
+
'422': "HTTPValidationError",
|
|
3219
|
+
}
|
|
3220
|
+
response_data = self.api_client.call_api(
|
|
3221
|
+
*_param,
|
|
3222
|
+
_request_timeout=_request_timeout
|
|
3223
|
+
)
|
|
3224
|
+
return response_data.response
|
|
3225
|
+
|
|
3226
|
+
|
|
3227
|
+
def _search_sharepoint_files_serialize(
|
|
3228
|
+
self,
|
|
3229
|
+
username,
|
|
3230
|
+
dataset,
|
|
3231
|
+
query,
|
|
3232
|
+
connector_id,
|
|
3233
|
+
site_id,
|
|
3234
|
+
item_type,
|
|
3235
|
+
q_answer_api_key,
|
|
3236
|
+
_request_auth,
|
|
3237
|
+
_content_type,
|
|
3238
|
+
_headers,
|
|
3239
|
+
_host_index,
|
|
3240
|
+
) -> RequestSerialized:
|
|
3241
|
+
|
|
3242
|
+
_host = None
|
|
3243
|
+
|
|
3244
|
+
_collection_formats: Dict[str, str] = {
|
|
3245
|
+
}
|
|
3246
|
+
|
|
3247
|
+
_path_params: Dict[str, str] = {}
|
|
3248
|
+
_query_params: List[Tuple[str, str]] = []
|
|
3249
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
3250
|
+
_form_params: List[Tuple[str, str]] = []
|
|
3251
|
+
_files: Dict[
|
|
3252
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
3253
|
+
] = {}
|
|
3254
|
+
_body_params: Optional[bytes] = None
|
|
3255
|
+
|
|
3256
|
+
# process the path parameters
|
|
3257
|
+
# process the query parameters
|
|
3258
|
+
if username is not None:
|
|
3259
|
+
|
|
3260
|
+
_query_params.append(('username', username))
|
|
3261
|
+
|
|
3262
|
+
if dataset is not None:
|
|
3263
|
+
|
|
3264
|
+
_query_params.append(('dataset', dataset))
|
|
3265
|
+
|
|
3266
|
+
if connector_id is not None:
|
|
3267
|
+
|
|
3268
|
+
_query_params.append(('connectorId', connector_id))
|
|
3269
|
+
|
|
3270
|
+
if query is not None:
|
|
3271
|
+
|
|
3272
|
+
_query_params.append(('query', query))
|
|
3273
|
+
|
|
3274
|
+
if site_id is not None:
|
|
3275
|
+
|
|
3276
|
+
_query_params.append(('siteId', site_id))
|
|
3277
|
+
|
|
3278
|
+
if item_type is not None:
|
|
3279
|
+
|
|
3280
|
+
_query_params.append(('itemType', item_type))
|
|
3281
|
+
|
|
3282
|
+
# process the header parameters
|
|
3283
|
+
if q_answer_api_key is not None:
|
|
3284
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
|
3285
|
+
# process the form parameters
|
|
3286
|
+
# process the body parameter
|
|
3287
|
+
|
|
3288
|
+
|
|
3289
|
+
# set the HTTP header `Accept`
|
|
3290
|
+
if 'Accept' not in _header_params:
|
|
3291
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
3292
|
+
[
|
|
3293
|
+
'application/json'
|
|
3294
|
+
]
|
|
3295
|
+
)
|
|
3296
|
+
|
|
3297
|
+
|
|
3298
|
+
# authentication setting
|
|
3299
|
+
_auth_settings: List[str] = [
|
|
3300
|
+
'QAnswer-Api-Key',
|
|
3301
|
+
'Bearer token'
|
|
3302
|
+
]
|
|
3303
|
+
|
|
3304
|
+
return self.api_client.param_serialize(
|
|
3305
|
+
method='GET',
|
|
3306
|
+
resource_path='/api/connectors/sharepoint/search',
|
|
3307
|
+
path_params=_path_params,
|
|
3308
|
+
query_params=_query_params,
|
|
3309
|
+
header_params=_header_params,
|
|
3310
|
+
body=_body_params,
|
|
3311
|
+
post_params=_form_params,
|
|
3312
|
+
files=_files,
|
|
3313
|
+
auth_settings=_auth_settings,
|
|
3314
|
+
collection_formats=_collection_formats,
|
|
3315
|
+
_host=_host,
|
|
3316
|
+
_request_auth=_request_auth
|
|
3317
|
+
)
|
|
3318
|
+
|
|
3319
|
+
|
|
3320
|
+
|
|
3321
|
+
|
|
3322
|
+
@validate_call
|
|
3323
|
+
def sharepoint_callback(
|
|
3324
|
+
self,
|
|
3325
|
+
code: Optional[StrictStr] = None,
|
|
3326
|
+
state: Optional[StrictStr] = None,
|
|
3327
|
+
error: Optional[StrictStr] = None,
|
|
3328
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
3329
|
+
_request_timeout: Union[
|
|
3330
|
+
None,
|
|
3331
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3332
|
+
Tuple[
|
|
3333
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3334
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3335
|
+
]
|
|
3336
|
+
] = None,
|
|
3337
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3338
|
+
_content_type: Optional[StrictStr] = None,
|
|
3339
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3340
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3341
|
+
) -> object:
|
|
3342
|
+
"""Sharepoint Callback
|
|
3343
|
+
|
|
3344
|
+
Callback for SharePoint Connector
|
|
3345
|
+
|
|
3346
|
+
:param code:
|
|
3347
|
+
:type code: str
|
|
3348
|
+
:param state:
|
|
3349
|
+
:type state: str
|
|
3350
|
+
:param error:
|
|
3351
|
+
:type error: str
|
|
3352
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
3353
|
+
:type q_answer_api_key: str
|
|
3354
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3355
|
+
number provided, it will be total request
|
|
3356
|
+
timeout. It can also be a pair (tuple) of
|
|
3357
|
+
(connection, read) timeouts.
|
|
3358
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3359
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3360
|
+
request; this effectively ignores the
|
|
3361
|
+
authentication in the spec for a single request.
|
|
3362
|
+
:type _request_auth: dict, optional
|
|
3363
|
+
:param _content_type: force content-type for the request.
|
|
3364
|
+
:type _content_type: str, Optional
|
|
3365
|
+
:param _headers: set to override the headers for a single
|
|
3366
|
+
request; this effectively ignores the headers
|
|
3367
|
+
in the spec for a single request.
|
|
3368
|
+
:type _headers: dict, optional
|
|
3369
|
+
:param _host_index: set to override the host_index for a single
|
|
3370
|
+
request; this effectively ignores the host_index
|
|
3371
|
+
in the spec for a single request.
|
|
3372
|
+
:type _host_index: int, optional
|
|
3373
|
+
:return: Returns the result object.
|
|
3374
|
+
""" # noqa: E501
|
|
3375
|
+
|
|
3376
|
+
_param = self._sharepoint_callback_serialize(
|
|
3377
|
+
code=code,
|
|
3378
|
+
state=state,
|
|
3379
|
+
error=error,
|
|
3380
|
+
q_answer_api_key=q_answer_api_key,
|
|
3381
|
+
_request_auth=_request_auth,
|
|
3382
|
+
_content_type=_content_type,
|
|
3383
|
+
_headers=_headers,
|
|
3384
|
+
_host_index=_host_index
|
|
3385
|
+
)
|
|
3386
|
+
|
|
3387
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3388
|
+
'200': "object",
|
|
3389
|
+
'422': "HTTPValidationError",
|
|
3390
|
+
}
|
|
3391
|
+
response_data = self.api_client.call_api(
|
|
3392
|
+
*_param,
|
|
3393
|
+
_request_timeout=_request_timeout
|
|
3394
|
+
)
|
|
3395
|
+
response_data.read()
|
|
3396
|
+
return self.api_client.response_deserialize(
|
|
3397
|
+
response_data=response_data,
|
|
3398
|
+
response_types_map=_response_types_map,
|
|
3399
|
+
).data
|
|
3400
|
+
|
|
3401
|
+
|
|
3402
|
+
@validate_call
|
|
3403
|
+
def sharepoint_callback_with_http_info(
|
|
3404
|
+
self,
|
|
3405
|
+
code: Optional[StrictStr] = None,
|
|
3406
|
+
state: Optional[StrictStr] = None,
|
|
3407
|
+
error: Optional[StrictStr] = None,
|
|
3408
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
3409
|
+
_request_timeout: Union[
|
|
3410
|
+
None,
|
|
3411
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3412
|
+
Tuple[
|
|
3413
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3414
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3415
|
+
]
|
|
3416
|
+
] = None,
|
|
3417
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3418
|
+
_content_type: Optional[StrictStr] = None,
|
|
3419
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3420
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3421
|
+
) -> ApiResponse[object]:
|
|
3422
|
+
"""Sharepoint Callback
|
|
3423
|
+
|
|
3424
|
+
Callback for SharePoint Connector
|
|
3425
|
+
|
|
3426
|
+
:param code:
|
|
3427
|
+
:type code: str
|
|
3428
|
+
:param state:
|
|
3429
|
+
:type state: str
|
|
3430
|
+
:param error:
|
|
3431
|
+
:type error: str
|
|
3432
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
3433
|
+
:type q_answer_api_key: str
|
|
3434
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3435
|
+
number provided, it will be total request
|
|
3436
|
+
timeout. It can also be a pair (tuple) of
|
|
3437
|
+
(connection, read) timeouts.
|
|
3438
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3439
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3440
|
+
request; this effectively ignores the
|
|
3441
|
+
authentication in the spec for a single request.
|
|
3442
|
+
:type _request_auth: dict, optional
|
|
3443
|
+
:param _content_type: force content-type for the request.
|
|
3444
|
+
:type _content_type: str, Optional
|
|
3445
|
+
:param _headers: set to override the headers for a single
|
|
3446
|
+
request; this effectively ignores the headers
|
|
3447
|
+
in the spec for a single request.
|
|
3448
|
+
:type _headers: dict, optional
|
|
3449
|
+
:param _host_index: set to override the host_index for a single
|
|
3450
|
+
request; this effectively ignores the host_index
|
|
3451
|
+
in the spec for a single request.
|
|
3452
|
+
:type _host_index: int, optional
|
|
3453
|
+
:return: Returns the result object.
|
|
3454
|
+
""" # noqa: E501
|
|
3455
|
+
|
|
3456
|
+
_param = self._sharepoint_callback_serialize(
|
|
3457
|
+
code=code,
|
|
3458
|
+
state=state,
|
|
3459
|
+
error=error,
|
|
3460
|
+
q_answer_api_key=q_answer_api_key,
|
|
3461
|
+
_request_auth=_request_auth,
|
|
3462
|
+
_content_type=_content_type,
|
|
3463
|
+
_headers=_headers,
|
|
3464
|
+
_host_index=_host_index
|
|
3465
|
+
)
|
|
3466
|
+
|
|
3467
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3468
|
+
'200': "object",
|
|
3469
|
+
'422': "HTTPValidationError",
|
|
3470
|
+
}
|
|
3471
|
+
response_data = self.api_client.call_api(
|
|
3472
|
+
*_param,
|
|
3473
|
+
_request_timeout=_request_timeout
|
|
3474
|
+
)
|
|
3475
|
+
response_data.read()
|
|
3476
|
+
return self.api_client.response_deserialize(
|
|
3477
|
+
response_data=response_data,
|
|
3478
|
+
response_types_map=_response_types_map,
|
|
3479
|
+
)
|
|
3480
|
+
|
|
3481
|
+
|
|
3482
|
+
@validate_call
|
|
3483
|
+
def sharepoint_callback_without_preload_content(
|
|
3484
|
+
self,
|
|
3485
|
+
code: Optional[StrictStr] = None,
|
|
3486
|
+
state: Optional[StrictStr] = None,
|
|
3487
|
+
error: Optional[StrictStr] = None,
|
|
3488
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
3489
|
+
_request_timeout: Union[
|
|
3490
|
+
None,
|
|
3491
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3492
|
+
Tuple[
|
|
3493
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3494
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3495
|
+
]
|
|
3496
|
+
] = None,
|
|
3497
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3498
|
+
_content_type: Optional[StrictStr] = None,
|
|
3499
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3500
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3501
|
+
) -> RESTResponseType:
|
|
3502
|
+
"""Sharepoint Callback
|
|
3503
|
+
|
|
3504
|
+
Callback for SharePoint Connector
|
|
3505
|
+
|
|
3506
|
+
:param code:
|
|
3507
|
+
:type code: str
|
|
3508
|
+
:param state:
|
|
3509
|
+
:type state: str
|
|
3510
|
+
:param error:
|
|
3511
|
+
:type error: str
|
|
3512
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
3513
|
+
:type q_answer_api_key: str
|
|
3514
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3515
|
+
number provided, it will be total request
|
|
3516
|
+
timeout. It can also be a pair (tuple) of
|
|
3517
|
+
(connection, read) timeouts.
|
|
3518
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3519
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3520
|
+
request; this effectively ignores the
|
|
3521
|
+
authentication in the spec for a single request.
|
|
3522
|
+
:type _request_auth: dict, optional
|
|
3523
|
+
:param _content_type: force content-type for the request.
|
|
3524
|
+
:type _content_type: str, Optional
|
|
3525
|
+
:param _headers: set to override the headers for a single
|
|
3526
|
+
request; this effectively ignores the headers
|
|
3527
|
+
in the spec for a single request.
|
|
3528
|
+
:type _headers: dict, optional
|
|
3529
|
+
:param _host_index: set to override the host_index for a single
|
|
3530
|
+
request; this effectively ignores the host_index
|
|
3531
|
+
in the spec for a single request.
|
|
3532
|
+
:type _host_index: int, optional
|
|
3533
|
+
:return: Returns the result object.
|
|
3534
|
+
""" # noqa: E501
|
|
3535
|
+
|
|
3536
|
+
_param = self._sharepoint_callback_serialize(
|
|
3537
|
+
code=code,
|
|
3538
|
+
state=state,
|
|
3539
|
+
error=error,
|
|
3540
|
+
q_answer_api_key=q_answer_api_key,
|
|
3541
|
+
_request_auth=_request_auth,
|
|
3542
|
+
_content_type=_content_type,
|
|
3543
|
+
_headers=_headers,
|
|
3544
|
+
_host_index=_host_index
|
|
3545
|
+
)
|
|
3546
|
+
|
|
3547
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3548
|
+
'200': "object",
|
|
3549
|
+
'422': "HTTPValidationError",
|
|
3550
|
+
}
|
|
3551
|
+
response_data = self.api_client.call_api(
|
|
3552
|
+
*_param,
|
|
3553
|
+
_request_timeout=_request_timeout
|
|
3554
|
+
)
|
|
3555
|
+
return response_data.response
|
|
3556
|
+
|
|
3557
|
+
|
|
3558
|
+
def _sharepoint_callback_serialize(
|
|
3559
|
+
self,
|
|
3560
|
+
code,
|
|
3561
|
+
state,
|
|
3562
|
+
error,
|
|
3563
|
+
q_answer_api_key,
|
|
3564
|
+
_request_auth,
|
|
3565
|
+
_content_type,
|
|
3566
|
+
_headers,
|
|
3567
|
+
_host_index,
|
|
3568
|
+
) -> RequestSerialized:
|
|
3569
|
+
|
|
3570
|
+
_host = None
|
|
3571
|
+
|
|
3572
|
+
_collection_formats: Dict[str, str] = {
|
|
3573
|
+
}
|
|
3574
|
+
|
|
3575
|
+
_path_params: Dict[str, str] = {}
|
|
3576
|
+
_query_params: List[Tuple[str, str]] = []
|
|
3577
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
3578
|
+
_form_params: List[Tuple[str, str]] = []
|
|
3579
|
+
_files: Dict[
|
|
3580
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
3581
|
+
] = {}
|
|
3582
|
+
_body_params: Optional[bytes] = None
|
|
3583
|
+
|
|
3584
|
+
# process the path parameters
|
|
3585
|
+
# process the query parameters
|
|
3586
|
+
if code is not None:
|
|
3587
|
+
|
|
3588
|
+
_query_params.append(('code', code))
|
|
3589
|
+
|
|
3590
|
+
if state is not None:
|
|
3591
|
+
|
|
3592
|
+
_query_params.append(('state', state))
|
|
3593
|
+
|
|
3594
|
+
if error is not None:
|
|
3595
|
+
|
|
3596
|
+
_query_params.append(('error', error))
|
|
3597
|
+
|
|
3598
|
+
# process the header parameters
|
|
3599
|
+
if q_answer_api_key is not None:
|
|
3600
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
|
3601
|
+
# process the form parameters
|
|
3602
|
+
# process the body parameter
|
|
3603
|
+
|
|
3604
|
+
|
|
3605
|
+
# set the HTTP header `Accept`
|
|
3606
|
+
if 'Accept' not in _header_params:
|
|
3607
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
3608
|
+
[
|
|
3609
|
+
'application/json'
|
|
3610
|
+
]
|
|
3611
|
+
)
|
|
3612
|
+
|
|
3613
|
+
|
|
3614
|
+
# authentication setting
|
|
3615
|
+
_auth_settings: List[str] = [
|
|
3616
|
+
]
|
|
3617
|
+
|
|
3618
|
+
return self.api_client.param_serialize(
|
|
3619
|
+
method='GET',
|
|
3620
|
+
resource_path='/api/connectors/sharepoint/callback',
|
|
3621
|
+
path_params=_path_params,
|
|
3622
|
+
query_params=_query_params,
|
|
3623
|
+
header_params=_header_params,
|
|
3624
|
+
body=_body_params,
|
|
3625
|
+
post_params=_form_params,
|
|
3626
|
+
files=_files,
|
|
3627
|
+
auth_settings=_auth_settings,
|
|
3628
|
+
collection_formats=_collection_formats,
|
|
3629
|
+
_host=_host,
|
|
3630
|
+
_request_auth=_request_auth
|
|
3631
|
+
)
|
|
3632
|
+
|
|
3633
|
+
|
|
3634
|
+
|
|
3635
|
+
|
|
3636
|
+
@validate_call
|
|
3637
|
+
def update_sharepoint_settings(
|
|
3638
|
+
self,
|
|
3639
|
+
share_point_connector_settings: SharePointConnectorSettings,
|
|
3640
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
3641
|
+
_request_timeout: Union[
|
|
3642
|
+
None,
|
|
3643
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3644
|
+
Tuple[
|
|
3645
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3646
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3647
|
+
]
|
|
3648
|
+
] = None,
|
|
3649
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3650
|
+
_content_type: Optional[StrictStr] = None,
|
|
3651
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3652
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3653
|
+
) -> SharePointConnectorSettings:
|
|
3654
|
+
"""Update Sharepoint Settings
|
|
3655
|
+
|
|
3656
|
+
Update SharePoint connector settings.
|
|
3657
|
+
|
|
3658
|
+
:param share_point_connector_settings: (required)
|
|
3659
|
+
:type share_point_connector_settings: SharePointConnectorSettings
|
|
3660
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
3661
|
+
:type q_answer_api_key: str
|
|
3662
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3663
|
+
number provided, it will be total request
|
|
3664
|
+
timeout. It can also be a pair (tuple) of
|
|
3665
|
+
(connection, read) timeouts.
|
|
3666
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3667
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3668
|
+
request; this effectively ignores the
|
|
3669
|
+
authentication in the spec for a single request.
|
|
3670
|
+
:type _request_auth: dict, optional
|
|
3671
|
+
:param _content_type: force content-type for the request.
|
|
3672
|
+
:type _content_type: str, Optional
|
|
3673
|
+
:param _headers: set to override the headers for a single
|
|
3674
|
+
request; this effectively ignores the headers
|
|
3675
|
+
in the spec for a single request.
|
|
3676
|
+
:type _headers: dict, optional
|
|
3677
|
+
:param _host_index: set to override the host_index for a single
|
|
3678
|
+
request; this effectively ignores the host_index
|
|
3679
|
+
in the spec for a single request.
|
|
3680
|
+
:type _host_index: int, optional
|
|
3681
|
+
:return: Returns the result object.
|
|
3682
|
+
""" # noqa: E501
|
|
3683
|
+
|
|
3684
|
+
_param = self._update_sharepoint_settings_serialize(
|
|
3685
|
+
share_point_connector_settings=share_point_connector_settings,
|
|
3686
|
+
q_answer_api_key=q_answer_api_key,
|
|
3687
|
+
_request_auth=_request_auth,
|
|
3688
|
+
_content_type=_content_type,
|
|
3689
|
+
_headers=_headers,
|
|
3690
|
+
_host_index=_host_index
|
|
3691
|
+
)
|
|
3692
|
+
|
|
3693
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3694
|
+
'200': "SharePointConnectorSettings",
|
|
3695
|
+
'422': "HTTPValidationError",
|
|
3696
|
+
}
|
|
3697
|
+
response_data = self.api_client.call_api(
|
|
3698
|
+
*_param,
|
|
3699
|
+
_request_timeout=_request_timeout
|
|
3700
|
+
)
|
|
3701
|
+
response_data.read()
|
|
3702
|
+
return self.api_client.response_deserialize(
|
|
3703
|
+
response_data=response_data,
|
|
3704
|
+
response_types_map=_response_types_map,
|
|
3705
|
+
).data
|
|
3706
|
+
|
|
3707
|
+
|
|
3708
|
+
@validate_call
|
|
3709
|
+
def update_sharepoint_settings_with_http_info(
|
|
3710
|
+
self,
|
|
3711
|
+
share_point_connector_settings: SharePointConnectorSettings,
|
|
3712
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
3713
|
+
_request_timeout: Union[
|
|
3714
|
+
None,
|
|
3715
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3716
|
+
Tuple[
|
|
3717
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3718
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3719
|
+
]
|
|
3720
|
+
] = None,
|
|
3721
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3722
|
+
_content_type: Optional[StrictStr] = None,
|
|
3723
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3724
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3725
|
+
) -> ApiResponse[SharePointConnectorSettings]:
|
|
3726
|
+
"""Update Sharepoint Settings
|
|
3727
|
+
|
|
3728
|
+
Update SharePoint connector settings.
|
|
3729
|
+
|
|
3730
|
+
:param share_point_connector_settings: (required)
|
|
3731
|
+
:type share_point_connector_settings: SharePointConnectorSettings
|
|
3732
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
3733
|
+
:type q_answer_api_key: str
|
|
3734
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3735
|
+
number provided, it will be total request
|
|
3736
|
+
timeout. It can also be a pair (tuple) of
|
|
3737
|
+
(connection, read) timeouts.
|
|
3738
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3739
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3740
|
+
request; this effectively ignores the
|
|
3741
|
+
authentication in the spec for a single request.
|
|
3742
|
+
:type _request_auth: dict, optional
|
|
3743
|
+
:param _content_type: force content-type for the request.
|
|
3744
|
+
:type _content_type: str, Optional
|
|
3745
|
+
:param _headers: set to override the headers for a single
|
|
3746
|
+
request; this effectively ignores the headers
|
|
3747
|
+
in the spec for a single request.
|
|
3748
|
+
:type _headers: dict, optional
|
|
3749
|
+
:param _host_index: set to override the host_index for a single
|
|
3750
|
+
request; this effectively ignores the host_index
|
|
3751
|
+
in the spec for a single request.
|
|
3752
|
+
:type _host_index: int, optional
|
|
3753
|
+
:return: Returns the result object.
|
|
3754
|
+
""" # noqa: E501
|
|
3755
|
+
|
|
3756
|
+
_param = self._update_sharepoint_settings_serialize(
|
|
3757
|
+
share_point_connector_settings=share_point_connector_settings,
|
|
3758
|
+
q_answer_api_key=q_answer_api_key,
|
|
3759
|
+
_request_auth=_request_auth,
|
|
3760
|
+
_content_type=_content_type,
|
|
3761
|
+
_headers=_headers,
|
|
3762
|
+
_host_index=_host_index
|
|
3763
|
+
)
|
|
3764
|
+
|
|
3765
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3766
|
+
'200': "SharePointConnectorSettings",
|
|
3767
|
+
'422': "HTTPValidationError",
|
|
3768
|
+
}
|
|
3769
|
+
response_data = self.api_client.call_api(
|
|
3770
|
+
*_param,
|
|
3771
|
+
_request_timeout=_request_timeout
|
|
3772
|
+
)
|
|
3773
|
+
response_data.read()
|
|
3774
|
+
return self.api_client.response_deserialize(
|
|
3775
|
+
response_data=response_data,
|
|
3776
|
+
response_types_map=_response_types_map,
|
|
3777
|
+
)
|
|
3778
|
+
|
|
3779
|
+
|
|
3780
|
+
@validate_call
|
|
3781
|
+
def update_sharepoint_settings_without_preload_content(
|
|
3782
|
+
self,
|
|
3783
|
+
share_point_connector_settings: SharePointConnectorSettings,
|
|
3784
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
3785
|
+
_request_timeout: Union[
|
|
3786
|
+
None,
|
|
3787
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3788
|
+
Tuple[
|
|
3789
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3790
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3791
|
+
]
|
|
3792
|
+
] = None,
|
|
3793
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3794
|
+
_content_type: Optional[StrictStr] = None,
|
|
3795
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3796
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3797
|
+
) -> RESTResponseType:
|
|
3798
|
+
"""Update Sharepoint Settings
|
|
3799
|
+
|
|
3800
|
+
Update SharePoint connector settings.
|
|
3801
|
+
|
|
3802
|
+
:param share_point_connector_settings: (required)
|
|
3803
|
+
:type share_point_connector_settings: SharePointConnectorSettings
|
|
3804
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
3805
|
+
:type q_answer_api_key: str
|
|
3806
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3807
|
+
number provided, it will be total request
|
|
3808
|
+
timeout. It can also be a pair (tuple) of
|
|
3809
|
+
(connection, read) timeouts.
|
|
3810
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3811
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3812
|
+
request; this effectively ignores the
|
|
3813
|
+
authentication in the spec for a single request.
|
|
3814
|
+
:type _request_auth: dict, optional
|
|
3815
|
+
:param _content_type: force content-type for the request.
|
|
3816
|
+
:type _content_type: str, Optional
|
|
3817
|
+
:param _headers: set to override the headers for a single
|
|
3818
|
+
request; this effectively ignores the headers
|
|
3819
|
+
in the spec for a single request.
|
|
3820
|
+
:type _headers: dict, optional
|
|
3821
|
+
:param _host_index: set to override the host_index for a single
|
|
3822
|
+
request; this effectively ignores the host_index
|
|
3823
|
+
in the spec for a single request.
|
|
3824
|
+
:type _host_index: int, optional
|
|
3825
|
+
:return: Returns the result object.
|
|
3826
|
+
""" # noqa: E501
|
|
3827
|
+
|
|
3828
|
+
_param = self._update_sharepoint_settings_serialize(
|
|
3829
|
+
share_point_connector_settings=share_point_connector_settings,
|
|
3830
|
+
q_answer_api_key=q_answer_api_key,
|
|
3831
|
+
_request_auth=_request_auth,
|
|
3832
|
+
_content_type=_content_type,
|
|
3833
|
+
_headers=_headers,
|
|
3834
|
+
_host_index=_host_index
|
|
3835
|
+
)
|
|
3836
|
+
|
|
3837
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3838
|
+
'200': "SharePointConnectorSettings",
|
|
3839
|
+
'422': "HTTPValidationError",
|
|
3840
|
+
}
|
|
3841
|
+
response_data = self.api_client.call_api(
|
|
3842
|
+
*_param,
|
|
3843
|
+
_request_timeout=_request_timeout
|
|
3844
|
+
)
|
|
3845
|
+
return response_data.response
|
|
3846
|
+
|
|
3847
|
+
|
|
3848
|
+
def _update_sharepoint_settings_serialize(
|
|
3849
|
+
self,
|
|
3850
|
+
share_point_connector_settings,
|
|
3851
|
+
q_answer_api_key,
|
|
3852
|
+
_request_auth,
|
|
3853
|
+
_content_type,
|
|
3854
|
+
_headers,
|
|
3855
|
+
_host_index,
|
|
3856
|
+
) -> RequestSerialized:
|
|
3857
|
+
|
|
3858
|
+
_host = None
|
|
3859
|
+
|
|
3860
|
+
_collection_formats: Dict[str, str] = {
|
|
3861
|
+
}
|
|
3862
|
+
|
|
3863
|
+
_path_params: Dict[str, str] = {}
|
|
3864
|
+
_query_params: List[Tuple[str, str]] = []
|
|
3865
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
3866
|
+
_form_params: List[Tuple[str, str]] = []
|
|
3867
|
+
_files: Dict[
|
|
3868
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
3869
|
+
] = {}
|
|
3870
|
+
_body_params: Optional[bytes] = None
|
|
3871
|
+
|
|
3872
|
+
# process the path parameters
|
|
3873
|
+
# process the query parameters
|
|
3874
|
+
# process the header parameters
|
|
3875
|
+
if q_answer_api_key is not None:
|
|
3876
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
|
3877
|
+
# process the form parameters
|
|
3878
|
+
# process the body parameter
|
|
3879
|
+
if share_point_connector_settings is not None:
|
|
3880
|
+
_body_params = share_point_connector_settings
|
|
3881
|
+
|
|
3882
|
+
|
|
3883
|
+
# set the HTTP header `Accept`
|
|
3884
|
+
if 'Accept' not in _header_params:
|
|
3885
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
3886
|
+
[
|
|
3887
|
+
'application/json'
|
|
3888
|
+
]
|
|
3889
|
+
)
|
|
3890
|
+
|
|
3891
|
+
# set the HTTP header `Content-Type`
|
|
3892
|
+
if _content_type:
|
|
3893
|
+
_header_params['Content-Type'] = _content_type
|
|
3894
|
+
else:
|
|
3895
|
+
_default_content_type = (
|
|
3896
|
+
self.api_client.select_header_content_type(
|
|
3897
|
+
[
|
|
3898
|
+
'application/json'
|
|
3899
|
+
]
|
|
3900
|
+
)
|
|
3901
|
+
)
|
|
3902
|
+
if _default_content_type is not None:
|
|
3903
|
+
_header_params['Content-Type'] = _default_content_type
|
|
3904
|
+
|
|
3905
|
+
# authentication setting
|
|
3906
|
+
_auth_settings: List[str] = [
|
|
3907
|
+
'QAnswer-Api-Key',
|
|
3908
|
+
'Bearer token'
|
|
3909
|
+
]
|
|
3910
|
+
|
|
3911
|
+
return self.api_client.param_serialize(
|
|
3912
|
+
method='POST',
|
|
3913
|
+
resource_path='/api/connectors/sharepoint/settings',
|
|
3914
|
+
path_params=_path_params,
|
|
3915
|
+
query_params=_query_params,
|
|
3916
|
+
header_params=_header_params,
|
|
3917
|
+
body=_body_params,
|
|
3918
|
+
post_params=_form_params,
|
|
3919
|
+
files=_files,
|
|
3920
|
+
auth_settings=_auth_settings,
|
|
3921
|
+
collection_formats=_collection_formats,
|
|
3922
|
+
_host=_host,
|
|
3923
|
+
_request_auth=_request_auth
|
|
3924
|
+
)
|
|
3925
|
+
|
|
3926
|
+
|