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