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,4492 @@
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 StrictBytes, StrictInt, StrictStr
20
+ from typing import Any, List, Optional, Tuple, Union
21
+ from qanswer_sdk.models.team_creation_dto import TeamCreationDto
22
+ from qanswer_sdk.models.team_dto import TeamDto
23
+ from qanswer_sdk.models.team_list_dto import TeamListDto
24
+ from qanswer_sdk.models.user_dto import UserDto
25
+
26
+ from qanswer_sdk.api_client import ApiClient, RequestSerialized
27
+ from qanswer_sdk.api_response import ApiResponse
28
+ from qanswer_sdk.rest import RESTResponseType
29
+
30
+
31
+ class UnitTeamsApi:
32
+ """NOTE: This class is auto generated by OpenAPI Generator
33
+ Ref: https://openapi-generator.tech
34
+
35
+ Do not edit the class manually.
36
+ """
37
+
38
+ def __init__(self, api_client=None) -> None:
39
+ if api_client is None:
40
+ api_client = ApiClient.get_default()
41
+ self.api_client = api_client
42
+
43
+
44
+ @validate_call
45
+ def add_team_admin(
46
+ self,
47
+ organization_id: StrictInt,
48
+ team_id: StrictInt,
49
+ user_id: StrictInt,
50
+ _request_timeout: Union[
51
+ None,
52
+ Annotated[StrictFloat, Field(gt=0)],
53
+ Tuple[
54
+ Annotated[StrictFloat, Field(gt=0)],
55
+ Annotated[StrictFloat, Field(gt=0)]
56
+ ]
57
+ ] = None,
58
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
59
+ _content_type: Optional[StrictStr] = None,
60
+ _headers: Optional[Dict[StrictStr, Any]] = None,
61
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
62
+ ) -> object:
63
+ """Add an admin to a team
64
+
65
+
66
+ :param organization_id: (required)
67
+ :type organization_id: int
68
+ :param team_id: (required)
69
+ :type team_id: int
70
+ :param user_id: (required)
71
+ :type user_id: int
72
+ :param _request_timeout: timeout setting for this request. If one
73
+ number provided, it will be total request
74
+ timeout. It can also be a pair (tuple) of
75
+ (connection, read) timeouts.
76
+ :type _request_timeout: int, tuple(int, int), optional
77
+ :param _request_auth: set to override the auth_settings for an a single
78
+ request; this effectively ignores the
79
+ authentication in the spec for a single request.
80
+ :type _request_auth: dict, optional
81
+ :param _content_type: force content-type for the request.
82
+ :type _content_type: str, Optional
83
+ :param _headers: set to override the headers for a single
84
+ request; this effectively ignores the headers
85
+ in the spec for a single request.
86
+ :type _headers: dict, optional
87
+ :param _host_index: set to override the host_index for a single
88
+ request; this effectively ignores the host_index
89
+ in the spec for a single request.
90
+ :type _host_index: int, optional
91
+ :return: Returns the result object.
92
+ """ # noqa: E501
93
+
94
+ _param = self._add_team_admin_serialize(
95
+ organization_id=organization_id,
96
+ team_id=team_id,
97
+ user_id=user_id,
98
+ _request_auth=_request_auth,
99
+ _content_type=_content_type,
100
+ _headers=_headers,
101
+ _host_index=_host_index
102
+ )
103
+
104
+ _response_types_map: Dict[str, Optional[str]] = {
105
+ '200': "object",
106
+ '422': "HTTPValidationError",
107
+ }
108
+ response_data = self.api_client.call_api(
109
+ *_param,
110
+ _request_timeout=_request_timeout
111
+ )
112
+ response_data.read()
113
+ return self.api_client.response_deserialize(
114
+ response_data=response_data,
115
+ response_types_map=_response_types_map,
116
+ ).data
117
+
118
+
119
+ @validate_call
120
+ def add_team_admin_with_http_info(
121
+ self,
122
+ organization_id: StrictInt,
123
+ team_id: StrictInt,
124
+ user_id: StrictInt,
125
+ _request_timeout: Union[
126
+ None,
127
+ Annotated[StrictFloat, Field(gt=0)],
128
+ Tuple[
129
+ Annotated[StrictFloat, Field(gt=0)],
130
+ Annotated[StrictFloat, Field(gt=0)]
131
+ ]
132
+ ] = None,
133
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
134
+ _content_type: Optional[StrictStr] = None,
135
+ _headers: Optional[Dict[StrictStr, Any]] = None,
136
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
137
+ ) -> ApiResponse[object]:
138
+ """Add an admin to a team
139
+
140
+
141
+ :param organization_id: (required)
142
+ :type organization_id: int
143
+ :param team_id: (required)
144
+ :type team_id: int
145
+ :param user_id: (required)
146
+ :type user_id: int
147
+ :param _request_timeout: timeout setting for this request. If one
148
+ number provided, it will be total request
149
+ timeout. It can also be a pair (tuple) of
150
+ (connection, read) timeouts.
151
+ :type _request_timeout: int, tuple(int, int), optional
152
+ :param _request_auth: set to override the auth_settings for an a single
153
+ request; this effectively ignores the
154
+ authentication in the spec for a single request.
155
+ :type _request_auth: dict, optional
156
+ :param _content_type: force content-type for the request.
157
+ :type _content_type: str, Optional
158
+ :param _headers: set to override the headers for a single
159
+ request; this effectively ignores the headers
160
+ in the spec for a single request.
161
+ :type _headers: dict, optional
162
+ :param _host_index: set to override the host_index for a single
163
+ request; this effectively ignores the host_index
164
+ in the spec for a single request.
165
+ :type _host_index: int, optional
166
+ :return: Returns the result object.
167
+ """ # noqa: E501
168
+
169
+ _param = self._add_team_admin_serialize(
170
+ organization_id=organization_id,
171
+ team_id=team_id,
172
+ user_id=user_id,
173
+ _request_auth=_request_auth,
174
+ _content_type=_content_type,
175
+ _headers=_headers,
176
+ _host_index=_host_index
177
+ )
178
+
179
+ _response_types_map: Dict[str, Optional[str]] = {
180
+ '200': "object",
181
+ '422': "HTTPValidationError",
182
+ }
183
+ response_data = self.api_client.call_api(
184
+ *_param,
185
+ _request_timeout=_request_timeout
186
+ )
187
+ response_data.read()
188
+ return self.api_client.response_deserialize(
189
+ response_data=response_data,
190
+ response_types_map=_response_types_map,
191
+ )
192
+
193
+
194
+ @validate_call
195
+ def add_team_admin_without_preload_content(
196
+ self,
197
+ organization_id: StrictInt,
198
+ team_id: StrictInt,
199
+ user_id: StrictInt,
200
+ _request_timeout: Union[
201
+ None,
202
+ Annotated[StrictFloat, Field(gt=0)],
203
+ Tuple[
204
+ Annotated[StrictFloat, Field(gt=0)],
205
+ Annotated[StrictFloat, Field(gt=0)]
206
+ ]
207
+ ] = None,
208
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
209
+ _content_type: Optional[StrictStr] = None,
210
+ _headers: Optional[Dict[StrictStr, Any]] = None,
211
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
212
+ ) -> RESTResponseType:
213
+ """Add an admin to a team
214
+
215
+
216
+ :param organization_id: (required)
217
+ :type organization_id: int
218
+ :param team_id: (required)
219
+ :type team_id: int
220
+ :param user_id: (required)
221
+ :type user_id: int
222
+ :param _request_timeout: timeout setting for this request. If one
223
+ number provided, it will be total request
224
+ timeout. It can also be a pair (tuple) of
225
+ (connection, read) timeouts.
226
+ :type _request_timeout: int, tuple(int, int), optional
227
+ :param _request_auth: set to override the auth_settings for an a single
228
+ request; this effectively ignores the
229
+ authentication in the spec for a single request.
230
+ :type _request_auth: dict, optional
231
+ :param _content_type: force content-type for the request.
232
+ :type _content_type: str, Optional
233
+ :param _headers: set to override the headers for a single
234
+ request; this effectively ignores the headers
235
+ in the spec for a single request.
236
+ :type _headers: dict, optional
237
+ :param _host_index: set to override the host_index for a single
238
+ request; this effectively ignores the host_index
239
+ in the spec for a single request.
240
+ :type _host_index: int, optional
241
+ :return: Returns the result object.
242
+ """ # noqa: E501
243
+
244
+ _param = self._add_team_admin_serialize(
245
+ organization_id=organization_id,
246
+ team_id=team_id,
247
+ user_id=user_id,
248
+ _request_auth=_request_auth,
249
+ _content_type=_content_type,
250
+ _headers=_headers,
251
+ _host_index=_host_index
252
+ )
253
+
254
+ _response_types_map: Dict[str, Optional[str]] = {
255
+ '200': "object",
256
+ '422': "HTTPValidationError",
257
+ }
258
+ response_data = self.api_client.call_api(
259
+ *_param,
260
+ _request_timeout=_request_timeout
261
+ )
262
+ return response_data.response
263
+
264
+
265
+ def _add_team_admin_serialize(
266
+ self,
267
+ organization_id,
268
+ team_id,
269
+ user_id,
270
+ _request_auth,
271
+ _content_type,
272
+ _headers,
273
+ _host_index,
274
+ ) -> RequestSerialized:
275
+
276
+ _host = None
277
+
278
+ _collection_formats: Dict[str, str] = {
279
+ }
280
+
281
+ _path_params: Dict[str, str] = {}
282
+ _query_params: List[Tuple[str, str]] = []
283
+ _header_params: Dict[str, Optional[str]] = _headers or {}
284
+ _form_params: List[Tuple[str, str]] = []
285
+ _files: Dict[
286
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
287
+ ] = {}
288
+ _body_params: Optional[bytes] = None
289
+
290
+ # process the path parameters
291
+ if organization_id is not None:
292
+ _path_params['organization_id'] = organization_id
293
+ if team_id is not None:
294
+ _path_params['team_id'] = team_id
295
+ if user_id is not None:
296
+ _path_params['user_id'] = user_id
297
+ # process the query parameters
298
+ # process the header parameters
299
+ # process the form parameters
300
+ # process the body parameter
301
+
302
+
303
+ # set the HTTP header `Accept`
304
+ if 'Accept' not in _header_params:
305
+ _header_params['Accept'] = self.api_client.select_header_accept(
306
+ [
307
+ 'application/json'
308
+ ]
309
+ )
310
+
311
+
312
+ # authentication setting
313
+ _auth_settings: List[str] = [
314
+ 'QAnswer-Api-Key',
315
+ 'Bearer token'
316
+ ]
317
+
318
+ return self.api_client.param_serialize(
319
+ method='POST',
320
+ resource_path='/api/team/{organization_id}/{team_id}/admin/{user_id}',
321
+ path_params=_path_params,
322
+ query_params=_query_params,
323
+ header_params=_header_params,
324
+ body=_body_params,
325
+ post_params=_form_params,
326
+ files=_files,
327
+ auth_settings=_auth_settings,
328
+ collection_formats=_collection_formats,
329
+ _host=_host,
330
+ _request_auth=_request_auth
331
+ )
332
+
333
+
334
+
335
+
336
+ @validate_call
337
+ def add_user_to_team(
338
+ self,
339
+ organization_id: StrictInt,
340
+ team_id: StrictInt,
341
+ user_id: StrictInt,
342
+ _request_timeout: Union[
343
+ None,
344
+ Annotated[StrictFloat, Field(gt=0)],
345
+ Tuple[
346
+ Annotated[StrictFloat, Field(gt=0)],
347
+ Annotated[StrictFloat, Field(gt=0)]
348
+ ]
349
+ ] = None,
350
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
351
+ _content_type: Optional[StrictStr] = None,
352
+ _headers: Optional[Dict[StrictStr, Any]] = None,
353
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
354
+ ) -> object:
355
+ """Add a user to a team
356
+
357
+
358
+ :param organization_id: (required)
359
+ :type organization_id: int
360
+ :param team_id: (required)
361
+ :type team_id: int
362
+ :param user_id: (required)
363
+ :type user_id: int
364
+ :param _request_timeout: timeout setting for this request. If one
365
+ number provided, it will be total request
366
+ timeout. It can also be a pair (tuple) of
367
+ (connection, read) timeouts.
368
+ :type _request_timeout: int, tuple(int, int), optional
369
+ :param _request_auth: set to override the auth_settings for an a single
370
+ request; this effectively ignores the
371
+ authentication in the spec for a single request.
372
+ :type _request_auth: dict, optional
373
+ :param _content_type: force content-type for the request.
374
+ :type _content_type: str, Optional
375
+ :param _headers: set to override the headers for a single
376
+ request; this effectively ignores the headers
377
+ in the spec for a single request.
378
+ :type _headers: dict, optional
379
+ :param _host_index: set to override the host_index for a single
380
+ request; this effectively ignores the host_index
381
+ in the spec for a single request.
382
+ :type _host_index: int, optional
383
+ :return: Returns the result object.
384
+ """ # noqa: E501
385
+
386
+ _param = self._add_user_to_team_serialize(
387
+ organization_id=organization_id,
388
+ team_id=team_id,
389
+ user_id=user_id,
390
+ _request_auth=_request_auth,
391
+ _content_type=_content_type,
392
+ _headers=_headers,
393
+ _host_index=_host_index
394
+ )
395
+
396
+ _response_types_map: Dict[str, Optional[str]] = {
397
+ '200': "object",
398
+ '422': "HTTPValidationError",
399
+ }
400
+ response_data = self.api_client.call_api(
401
+ *_param,
402
+ _request_timeout=_request_timeout
403
+ )
404
+ response_data.read()
405
+ return self.api_client.response_deserialize(
406
+ response_data=response_data,
407
+ response_types_map=_response_types_map,
408
+ ).data
409
+
410
+
411
+ @validate_call
412
+ def add_user_to_team_with_http_info(
413
+ self,
414
+ organization_id: StrictInt,
415
+ team_id: StrictInt,
416
+ user_id: StrictInt,
417
+ _request_timeout: Union[
418
+ None,
419
+ Annotated[StrictFloat, Field(gt=0)],
420
+ Tuple[
421
+ Annotated[StrictFloat, Field(gt=0)],
422
+ Annotated[StrictFloat, Field(gt=0)]
423
+ ]
424
+ ] = None,
425
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
426
+ _content_type: Optional[StrictStr] = None,
427
+ _headers: Optional[Dict[StrictStr, Any]] = None,
428
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
429
+ ) -> ApiResponse[object]:
430
+ """Add a user to a team
431
+
432
+
433
+ :param organization_id: (required)
434
+ :type organization_id: int
435
+ :param team_id: (required)
436
+ :type team_id: int
437
+ :param user_id: (required)
438
+ :type user_id: int
439
+ :param _request_timeout: timeout setting for this request. If one
440
+ number provided, it will be total request
441
+ timeout. It can also be a pair (tuple) of
442
+ (connection, read) timeouts.
443
+ :type _request_timeout: int, tuple(int, int), optional
444
+ :param _request_auth: set to override the auth_settings for an a single
445
+ request; this effectively ignores the
446
+ authentication in the spec for a single request.
447
+ :type _request_auth: dict, optional
448
+ :param _content_type: force content-type for the request.
449
+ :type _content_type: str, Optional
450
+ :param _headers: set to override the headers for a single
451
+ request; this effectively ignores the headers
452
+ in the spec for a single request.
453
+ :type _headers: dict, optional
454
+ :param _host_index: set to override the host_index for a single
455
+ request; this effectively ignores the host_index
456
+ in the spec for a single request.
457
+ :type _host_index: int, optional
458
+ :return: Returns the result object.
459
+ """ # noqa: E501
460
+
461
+ _param = self._add_user_to_team_serialize(
462
+ organization_id=organization_id,
463
+ team_id=team_id,
464
+ user_id=user_id,
465
+ _request_auth=_request_auth,
466
+ _content_type=_content_type,
467
+ _headers=_headers,
468
+ _host_index=_host_index
469
+ )
470
+
471
+ _response_types_map: Dict[str, Optional[str]] = {
472
+ '200': "object",
473
+ '422': "HTTPValidationError",
474
+ }
475
+ response_data = self.api_client.call_api(
476
+ *_param,
477
+ _request_timeout=_request_timeout
478
+ )
479
+ response_data.read()
480
+ return self.api_client.response_deserialize(
481
+ response_data=response_data,
482
+ response_types_map=_response_types_map,
483
+ )
484
+
485
+
486
+ @validate_call
487
+ def add_user_to_team_without_preload_content(
488
+ self,
489
+ organization_id: StrictInt,
490
+ team_id: StrictInt,
491
+ user_id: StrictInt,
492
+ _request_timeout: Union[
493
+ None,
494
+ Annotated[StrictFloat, Field(gt=0)],
495
+ Tuple[
496
+ Annotated[StrictFloat, Field(gt=0)],
497
+ Annotated[StrictFloat, Field(gt=0)]
498
+ ]
499
+ ] = None,
500
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
501
+ _content_type: Optional[StrictStr] = None,
502
+ _headers: Optional[Dict[StrictStr, Any]] = None,
503
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
504
+ ) -> RESTResponseType:
505
+ """Add a user to a team
506
+
507
+
508
+ :param organization_id: (required)
509
+ :type organization_id: int
510
+ :param team_id: (required)
511
+ :type team_id: int
512
+ :param user_id: (required)
513
+ :type user_id: int
514
+ :param _request_timeout: timeout setting for this request. If one
515
+ number provided, it will be total request
516
+ timeout. It can also be a pair (tuple) of
517
+ (connection, read) timeouts.
518
+ :type _request_timeout: int, tuple(int, int), optional
519
+ :param _request_auth: set to override the auth_settings for an a single
520
+ request; this effectively ignores the
521
+ authentication in the spec for a single request.
522
+ :type _request_auth: dict, optional
523
+ :param _content_type: force content-type for the request.
524
+ :type _content_type: str, Optional
525
+ :param _headers: set to override the headers for a single
526
+ request; this effectively ignores the headers
527
+ in the spec for a single request.
528
+ :type _headers: dict, optional
529
+ :param _host_index: set to override the host_index for a single
530
+ request; this effectively ignores the host_index
531
+ in the spec for a single request.
532
+ :type _host_index: int, optional
533
+ :return: Returns the result object.
534
+ """ # noqa: E501
535
+
536
+ _param = self._add_user_to_team_serialize(
537
+ organization_id=organization_id,
538
+ team_id=team_id,
539
+ user_id=user_id,
540
+ _request_auth=_request_auth,
541
+ _content_type=_content_type,
542
+ _headers=_headers,
543
+ _host_index=_host_index
544
+ )
545
+
546
+ _response_types_map: Dict[str, Optional[str]] = {
547
+ '200': "object",
548
+ '422': "HTTPValidationError",
549
+ }
550
+ response_data = self.api_client.call_api(
551
+ *_param,
552
+ _request_timeout=_request_timeout
553
+ )
554
+ return response_data.response
555
+
556
+
557
+ def _add_user_to_team_serialize(
558
+ self,
559
+ organization_id,
560
+ team_id,
561
+ user_id,
562
+ _request_auth,
563
+ _content_type,
564
+ _headers,
565
+ _host_index,
566
+ ) -> RequestSerialized:
567
+
568
+ _host = None
569
+
570
+ _collection_formats: Dict[str, str] = {
571
+ }
572
+
573
+ _path_params: Dict[str, str] = {}
574
+ _query_params: List[Tuple[str, str]] = []
575
+ _header_params: Dict[str, Optional[str]] = _headers or {}
576
+ _form_params: List[Tuple[str, str]] = []
577
+ _files: Dict[
578
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
579
+ ] = {}
580
+ _body_params: Optional[bytes] = None
581
+
582
+ # process the path parameters
583
+ if organization_id is not None:
584
+ _path_params['organization_id'] = organization_id
585
+ if team_id is not None:
586
+ _path_params['team_id'] = team_id
587
+ if user_id is not None:
588
+ _path_params['user_id'] = user_id
589
+ # process the query parameters
590
+ # process the header parameters
591
+ # process the form parameters
592
+ # process the body parameter
593
+
594
+
595
+ # set the HTTP header `Accept`
596
+ if 'Accept' not in _header_params:
597
+ _header_params['Accept'] = self.api_client.select_header_accept(
598
+ [
599
+ 'application/json'
600
+ ]
601
+ )
602
+
603
+
604
+ # authentication setting
605
+ _auth_settings: List[str] = [
606
+ 'QAnswer-Api-Key',
607
+ 'Bearer token'
608
+ ]
609
+
610
+ return self.api_client.param_serialize(
611
+ method='POST',
612
+ resource_path='/api/team/{organization_id}/{team_id}/user/{user_id}',
613
+ path_params=_path_params,
614
+ query_params=_query_params,
615
+ header_params=_header_params,
616
+ body=_body_params,
617
+ post_params=_form_params,
618
+ files=_files,
619
+ auth_settings=_auth_settings,
620
+ collection_formats=_collection_formats,
621
+ _host=_host,
622
+ _request_auth=_request_auth
623
+ )
624
+
625
+
626
+
627
+
628
+ @validate_call
629
+ def create_team(
630
+ self,
631
+ organization_id: StrictInt,
632
+ team_creation_dto: TeamCreationDto,
633
+ _request_timeout: Union[
634
+ None,
635
+ Annotated[StrictFloat, Field(gt=0)],
636
+ Tuple[
637
+ Annotated[StrictFloat, Field(gt=0)],
638
+ Annotated[StrictFloat, Field(gt=0)]
639
+ ]
640
+ ] = None,
641
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
642
+ _content_type: Optional[StrictStr] = None,
643
+ _headers: Optional[Dict[StrictStr, Any]] = None,
644
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
645
+ ) -> TeamDto:
646
+ """Create a new team
647
+
648
+
649
+ :param organization_id: (required)
650
+ :type organization_id: int
651
+ :param team_creation_dto: (required)
652
+ :type team_creation_dto: TeamCreationDto
653
+ :param _request_timeout: timeout setting for this request. If one
654
+ number provided, it will be total request
655
+ timeout. It can also be a pair (tuple) of
656
+ (connection, read) timeouts.
657
+ :type _request_timeout: int, tuple(int, int), optional
658
+ :param _request_auth: set to override the auth_settings for an a single
659
+ request; this effectively ignores the
660
+ authentication in the spec for a single request.
661
+ :type _request_auth: dict, optional
662
+ :param _content_type: force content-type for the request.
663
+ :type _content_type: str, Optional
664
+ :param _headers: set to override the headers for a single
665
+ request; this effectively ignores the headers
666
+ in the spec for a single request.
667
+ :type _headers: dict, optional
668
+ :param _host_index: set to override the host_index for a single
669
+ request; this effectively ignores the host_index
670
+ in the spec for a single request.
671
+ :type _host_index: int, optional
672
+ :return: Returns the result object.
673
+ """ # noqa: E501
674
+
675
+ _param = self._create_team_serialize(
676
+ organization_id=organization_id,
677
+ team_creation_dto=team_creation_dto,
678
+ _request_auth=_request_auth,
679
+ _content_type=_content_type,
680
+ _headers=_headers,
681
+ _host_index=_host_index
682
+ )
683
+
684
+ _response_types_map: Dict[str, Optional[str]] = {
685
+ '200': "TeamDto",
686
+ '422': "HTTPValidationError",
687
+ }
688
+ response_data = self.api_client.call_api(
689
+ *_param,
690
+ _request_timeout=_request_timeout
691
+ )
692
+ response_data.read()
693
+ return self.api_client.response_deserialize(
694
+ response_data=response_data,
695
+ response_types_map=_response_types_map,
696
+ ).data
697
+
698
+
699
+ @validate_call
700
+ def create_team_with_http_info(
701
+ self,
702
+ organization_id: StrictInt,
703
+ team_creation_dto: TeamCreationDto,
704
+ _request_timeout: Union[
705
+ None,
706
+ Annotated[StrictFloat, Field(gt=0)],
707
+ Tuple[
708
+ Annotated[StrictFloat, Field(gt=0)],
709
+ Annotated[StrictFloat, Field(gt=0)]
710
+ ]
711
+ ] = None,
712
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
713
+ _content_type: Optional[StrictStr] = None,
714
+ _headers: Optional[Dict[StrictStr, Any]] = None,
715
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
716
+ ) -> ApiResponse[TeamDto]:
717
+ """Create a new team
718
+
719
+
720
+ :param organization_id: (required)
721
+ :type organization_id: int
722
+ :param team_creation_dto: (required)
723
+ :type team_creation_dto: TeamCreationDto
724
+ :param _request_timeout: timeout setting for this request. If one
725
+ number provided, it will be total request
726
+ timeout. It can also be a pair (tuple) of
727
+ (connection, read) timeouts.
728
+ :type _request_timeout: int, tuple(int, int), optional
729
+ :param _request_auth: set to override the auth_settings for an a single
730
+ request; this effectively ignores the
731
+ authentication in the spec for a single request.
732
+ :type _request_auth: dict, optional
733
+ :param _content_type: force content-type for the request.
734
+ :type _content_type: str, Optional
735
+ :param _headers: set to override the headers for a single
736
+ request; this effectively ignores the headers
737
+ in the spec for a single request.
738
+ :type _headers: dict, optional
739
+ :param _host_index: set to override the host_index for a single
740
+ request; this effectively ignores the host_index
741
+ in the spec for a single request.
742
+ :type _host_index: int, optional
743
+ :return: Returns the result object.
744
+ """ # noqa: E501
745
+
746
+ _param = self._create_team_serialize(
747
+ organization_id=organization_id,
748
+ team_creation_dto=team_creation_dto,
749
+ _request_auth=_request_auth,
750
+ _content_type=_content_type,
751
+ _headers=_headers,
752
+ _host_index=_host_index
753
+ )
754
+
755
+ _response_types_map: Dict[str, Optional[str]] = {
756
+ '200': "TeamDto",
757
+ '422': "HTTPValidationError",
758
+ }
759
+ response_data = self.api_client.call_api(
760
+ *_param,
761
+ _request_timeout=_request_timeout
762
+ )
763
+ response_data.read()
764
+ return self.api_client.response_deserialize(
765
+ response_data=response_data,
766
+ response_types_map=_response_types_map,
767
+ )
768
+
769
+
770
+ @validate_call
771
+ def create_team_without_preload_content(
772
+ self,
773
+ organization_id: StrictInt,
774
+ team_creation_dto: TeamCreationDto,
775
+ _request_timeout: Union[
776
+ None,
777
+ Annotated[StrictFloat, Field(gt=0)],
778
+ Tuple[
779
+ Annotated[StrictFloat, Field(gt=0)],
780
+ Annotated[StrictFloat, Field(gt=0)]
781
+ ]
782
+ ] = None,
783
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
784
+ _content_type: Optional[StrictStr] = None,
785
+ _headers: Optional[Dict[StrictStr, Any]] = None,
786
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
787
+ ) -> RESTResponseType:
788
+ """Create a new team
789
+
790
+
791
+ :param organization_id: (required)
792
+ :type organization_id: int
793
+ :param team_creation_dto: (required)
794
+ :type team_creation_dto: TeamCreationDto
795
+ :param _request_timeout: timeout setting for this request. If one
796
+ number provided, it will be total request
797
+ timeout. It can also be a pair (tuple) of
798
+ (connection, read) timeouts.
799
+ :type _request_timeout: int, tuple(int, int), optional
800
+ :param _request_auth: set to override the auth_settings for an a single
801
+ request; this effectively ignores the
802
+ authentication in the spec for a single request.
803
+ :type _request_auth: dict, optional
804
+ :param _content_type: force content-type for the request.
805
+ :type _content_type: str, Optional
806
+ :param _headers: set to override the headers for a single
807
+ request; this effectively ignores the headers
808
+ in the spec for a single request.
809
+ :type _headers: dict, optional
810
+ :param _host_index: set to override the host_index for a single
811
+ request; this effectively ignores the host_index
812
+ in the spec for a single request.
813
+ :type _host_index: int, optional
814
+ :return: Returns the result object.
815
+ """ # noqa: E501
816
+
817
+ _param = self._create_team_serialize(
818
+ organization_id=organization_id,
819
+ team_creation_dto=team_creation_dto,
820
+ _request_auth=_request_auth,
821
+ _content_type=_content_type,
822
+ _headers=_headers,
823
+ _host_index=_host_index
824
+ )
825
+
826
+ _response_types_map: Dict[str, Optional[str]] = {
827
+ '200': "TeamDto",
828
+ '422': "HTTPValidationError",
829
+ }
830
+ response_data = self.api_client.call_api(
831
+ *_param,
832
+ _request_timeout=_request_timeout
833
+ )
834
+ return response_data.response
835
+
836
+
837
+ def _create_team_serialize(
838
+ self,
839
+ organization_id,
840
+ team_creation_dto,
841
+ _request_auth,
842
+ _content_type,
843
+ _headers,
844
+ _host_index,
845
+ ) -> RequestSerialized:
846
+
847
+ _host = None
848
+
849
+ _collection_formats: Dict[str, str] = {
850
+ }
851
+
852
+ _path_params: Dict[str, str] = {}
853
+ _query_params: List[Tuple[str, str]] = []
854
+ _header_params: Dict[str, Optional[str]] = _headers or {}
855
+ _form_params: List[Tuple[str, str]] = []
856
+ _files: Dict[
857
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
858
+ ] = {}
859
+ _body_params: Optional[bytes] = None
860
+
861
+ # process the path parameters
862
+ if organization_id is not None:
863
+ _path_params['organization_id'] = organization_id
864
+ # process the query parameters
865
+ # process the header parameters
866
+ # process the form parameters
867
+ # process the body parameter
868
+ if team_creation_dto is not None:
869
+ _body_params = team_creation_dto
870
+
871
+
872
+ # set the HTTP header `Accept`
873
+ if 'Accept' not in _header_params:
874
+ _header_params['Accept'] = self.api_client.select_header_accept(
875
+ [
876
+ 'application/json'
877
+ ]
878
+ )
879
+
880
+ # set the HTTP header `Content-Type`
881
+ if _content_type:
882
+ _header_params['Content-Type'] = _content_type
883
+ else:
884
+ _default_content_type = (
885
+ self.api_client.select_header_content_type(
886
+ [
887
+ 'application/json'
888
+ ]
889
+ )
890
+ )
891
+ if _default_content_type is not None:
892
+ _header_params['Content-Type'] = _default_content_type
893
+
894
+ # authentication setting
895
+ _auth_settings: List[str] = [
896
+ 'QAnswer-Api-Key',
897
+ 'Bearer token'
898
+ ]
899
+
900
+ return self.api_client.param_serialize(
901
+ method='POST',
902
+ resource_path='/api/team/{organization_id}',
903
+ path_params=_path_params,
904
+ query_params=_query_params,
905
+ header_params=_header_params,
906
+ body=_body_params,
907
+ post_params=_form_params,
908
+ files=_files,
909
+ auth_settings=_auth_settings,
910
+ collection_formats=_collection_formats,
911
+ _host=_host,
912
+ _request_auth=_request_auth
913
+ )
914
+
915
+
916
+
917
+
918
+ @validate_call
919
+ def delete_team(
920
+ self,
921
+ organization_id: StrictInt,
922
+ team_id: StrictInt,
923
+ _request_timeout: Union[
924
+ None,
925
+ Annotated[StrictFloat, Field(gt=0)],
926
+ Tuple[
927
+ Annotated[StrictFloat, Field(gt=0)],
928
+ Annotated[StrictFloat, Field(gt=0)]
929
+ ]
930
+ ] = None,
931
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
932
+ _content_type: Optional[StrictStr] = None,
933
+ _headers: Optional[Dict[StrictStr, Any]] = None,
934
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
935
+ ) -> object:
936
+ """Delete a team
937
+
938
+
939
+ :param organization_id: (required)
940
+ :type organization_id: int
941
+ :param team_id: (required)
942
+ :type team_id: int
943
+ :param _request_timeout: timeout setting for this request. If one
944
+ number provided, it will be total request
945
+ timeout. It can also be a pair (tuple) of
946
+ (connection, read) timeouts.
947
+ :type _request_timeout: int, tuple(int, int), optional
948
+ :param _request_auth: set to override the auth_settings for an a single
949
+ request; this effectively ignores the
950
+ authentication in the spec for a single request.
951
+ :type _request_auth: dict, optional
952
+ :param _content_type: force content-type for the request.
953
+ :type _content_type: str, Optional
954
+ :param _headers: set to override the headers for a single
955
+ request; this effectively ignores the headers
956
+ in the spec for a single request.
957
+ :type _headers: dict, optional
958
+ :param _host_index: set to override the host_index for a single
959
+ request; this effectively ignores the host_index
960
+ in the spec for a single request.
961
+ :type _host_index: int, optional
962
+ :return: Returns the result object.
963
+ """ # noqa: E501
964
+
965
+ _param = self._delete_team_serialize(
966
+ organization_id=organization_id,
967
+ team_id=team_id,
968
+ _request_auth=_request_auth,
969
+ _content_type=_content_type,
970
+ _headers=_headers,
971
+ _host_index=_host_index
972
+ )
973
+
974
+ _response_types_map: Dict[str, Optional[str]] = {
975
+ '200': "object",
976
+ '422': "HTTPValidationError",
977
+ }
978
+ response_data = self.api_client.call_api(
979
+ *_param,
980
+ _request_timeout=_request_timeout
981
+ )
982
+ response_data.read()
983
+ return self.api_client.response_deserialize(
984
+ response_data=response_data,
985
+ response_types_map=_response_types_map,
986
+ ).data
987
+
988
+
989
+ @validate_call
990
+ def delete_team_with_http_info(
991
+ self,
992
+ organization_id: StrictInt,
993
+ team_id: StrictInt,
994
+ _request_timeout: Union[
995
+ None,
996
+ Annotated[StrictFloat, Field(gt=0)],
997
+ Tuple[
998
+ Annotated[StrictFloat, Field(gt=0)],
999
+ Annotated[StrictFloat, Field(gt=0)]
1000
+ ]
1001
+ ] = None,
1002
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1003
+ _content_type: Optional[StrictStr] = None,
1004
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1005
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1006
+ ) -> ApiResponse[object]:
1007
+ """Delete a team
1008
+
1009
+
1010
+ :param organization_id: (required)
1011
+ :type organization_id: int
1012
+ :param team_id: (required)
1013
+ :type team_id: int
1014
+ :param _request_timeout: timeout setting for this request. If one
1015
+ number provided, it will be total request
1016
+ timeout. It can also be a pair (tuple) of
1017
+ (connection, read) timeouts.
1018
+ :type _request_timeout: int, tuple(int, int), optional
1019
+ :param _request_auth: set to override the auth_settings for an a single
1020
+ request; this effectively ignores the
1021
+ authentication in the spec for a single request.
1022
+ :type _request_auth: dict, optional
1023
+ :param _content_type: force content-type for the request.
1024
+ :type _content_type: str, Optional
1025
+ :param _headers: set to override the headers for a single
1026
+ request; this effectively ignores the headers
1027
+ in the spec for a single request.
1028
+ :type _headers: dict, optional
1029
+ :param _host_index: set to override the host_index for a single
1030
+ request; this effectively ignores the host_index
1031
+ in the spec for a single request.
1032
+ :type _host_index: int, optional
1033
+ :return: Returns the result object.
1034
+ """ # noqa: E501
1035
+
1036
+ _param = self._delete_team_serialize(
1037
+ organization_id=organization_id,
1038
+ team_id=team_id,
1039
+ _request_auth=_request_auth,
1040
+ _content_type=_content_type,
1041
+ _headers=_headers,
1042
+ _host_index=_host_index
1043
+ )
1044
+
1045
+ _response_types_map: Dict[str, Optional[str]] = {
1046
+ '200': "object",
1047
+ '422': "HTTPValidationError",
1048
+ }
1049
+ response_data = self.api_client.call_api(
1050
+ *_param,
1051
+ _request_timeout=_request_timeout
1052
+ )
1053
+ response_data.read()
1054
+ return self.api_client.response_deserialize(
1055
+ response_data=response_data,
1056
+ response_types_map=_response_types_map,
1057
+ )
1058
+
1059
+
1060
+ @validate_call
1061
+ def delete_team_without_preload_content(
1062
+ self,
1063
+ organization_id: StrictInt,
1064
+ team_id: StrictInt,
1065
+ _request_timeout: Union[
1066
+ None,
1067
+ Annotated[StrictFloat, Field(gt=0)],
1068
+ Tuple[
1069
+ Annotated[StrictFloat, Field(gt=0)],
1070
+ Annotated[StrictFloat, Field(gt=0)]
1071
+ ]
1072
+ ] = None,
1073
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1074
+ _content_type: Optional[StrictStr] = None,
1075
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1076
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1077
+ ) -> RESTResponseType:
1078
+ """Delete a team
1079
+
1080
+
1081
+ :param organization_id: (required)
1082
+ :type organization_id: int
1083
+ :param team_id: (required)
1084
+ :type team_id: int
1085
+ :param _request_timeout: timeout setting for this request. If one
1086
+ number provided, it will be total request
1087
+ timeout. It can also be a pair (tuple) of
1088
+ (connection, read) timeouts.
1089
+ :type _request_timeout: int, tuple(int, int), optional
1090
+ :param _request_auth: set to override the auth_settings for an a single
1091
+ request; this effectively ignores the
1092
+ authentication in the spec for a single request.
1093
+ :type _request_auth: dict, optional
1094
+ :param _content_type: force content-type for the request.
1095
+ :type _content_type: str, Optional
1096
+ :param _headers: set to override the headers for a single
1097
+ request; this effectively ignores the headers
1098
+ in the spec for a single request.
1099
+ :type _headers: dict, optional
1100
+ :param _host_index: set to override the host_index for a single
1101
+ request; this effectively ignores the host_index
1102
+ in the spec for a single request.
1103
+ :type _host_index: int, optional
1104
+ :return: Returns the result object.
1105
+ """ # noqa: E501
1106
+
1107
+ _param = self._delete_team_serialize(
1108
+ organization_id=organization_id,
1109
+ team_id=team_id,
1110
+ _request_auth=_request_auth,
1111
+ _content_type=_content_type,
1112
+ _headers=_headers,
1113
+ _host_index=_host_index
1114
+ )
1115
+
1116
+ _response_types_map: Dict[str, Optional[str]] = {
1117
+ '200': "object",
1118
+ '422': "HTTPValidationError",
1119
+ }
1120
+ response_data = self.api_client.call_api(
1121
+ *_param,
1122
+ _request_timeout=_request_timeout
1123
+ )
1124
+ return response_data.response
1125
+
1126
+
1127
+ def _delete_team_serialize(
1128
+ self,
1129
+ organization_id,
1130
+ team_id,
1131
+ _request_auth,
1132
+ _content_type,
1133
+ _headers,
1134
+ _host_index,
1135
+ ) -> RequestSerialized:
1136
+
1137
+ _host = None
1138
+
1139
+ _collection_formats: Dict[str, str] = {
1140
+ }
1141
+
1142
+ _path_params: Dict[str, str] = {}
1143
+ _query_params: List[Tuple[str, str]] = []
1144
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1145
+ _form_params: List[Tuple[str, str]] = []
1146
+ _files: Dict[
1147
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1148
+ ] = {}
1149
+ _body_params: Optional[bytes] = None
1150
+
1151
+ # process the path parameters
1152
+ if organization_id is not None:
1153
+ _path_params['organization_id'] = organization_id
1154
+ if team_id is not None:
1155
+ _path_params['team_id'] = team_id
1156
+ # process the query parameters
1157
+ # process the header parameters
1158
+ # process the form parameters
1159
+ # process the body parameter
1160
+
1161
+
1162
+ # set the HTTP header `Accept`
1163
+ if 'Accept' not in _header_params:
1164
+ _header_params['Accept'] = self.api_client.select_header_accept(
1165
+ [
1166
+ 'application/json'
1167
+ ]
1168
+ )
1169
+
1170
+
1171
+ # authentication setting
1172
+ _auth_settings: List[str] = [
1173
+ 'QAnswer-Api-Key',
1174
+ 'Bearer token'
1175
+ ]
1176
+
1177
+ return self.api_client.param_serialize(
1178
+ method='DELETE',
1179
+ resource_path='/api/team/{organization_id}/{team_id}',
1180
+ path_params=_path_params,
1181
+ query_params=_query_params,
1182
+ header_params=_header_params,
1183
+ body=_body_params,
1184
+ post_params=_form_params,
1185
+ files=_files,
1186
+ auth_settings=_auth_settings,
1187
+ collection_formats=_collection_formats,
1188
+ _host=_host,
1189
+ _request_auth=_request_auth
1190
+ )
1191
+
1192
+
1193
+
1194
+
1195
+ @validate_call
1196
+ def delete_team_admin(
1197
+ self,
1198
+ organization_id: StrictInt,
1199
+ team_id: StrictInt,
1200
+ user_id: StrictInt,
1201
+ _request_timeout: Union[
1202
+ None,
1203
+ Annotated[StrictFloat, Field(gt=0)],
1204
+ Tuple[
1205
+ Annotated[StrictFloat, Field(gt=0)],
1206
+ Annotated[StrictFloat, Field(gt=0)]
1207
+ ]
1208
+ ] = None,
1209
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1210
+ _content_type: Optional[StrictStr] = None,
1211
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1212
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1213
+ ) -> object:
1214
+ """Remove an admin from a team
1215
+
1216
+
1217
+ :param organization_id: (required)
1218
+ :type organization_id: int
1219
+ :param team_id: (required)
1220
+ :type team_id: int
1221
+ :param user_id: (required)
1222
+ :type user_id: int
1223
+ :param _request_timeout: timeout setting for this request. If one
1224
+ number provided, it will be total request
1225
+ timeout. It can also be a pair (tuple) of
1226
+ (connection, read) timeouts.
1227
+ :type _request_timeout: int, tuple(int, int), optional
1228
+ :param _request_auth: set to override the auth_settings for an a single
1229
+ request; this effectively ignores the
1230
+ authentication in the spec for a single request.
1231
+ :type _request_auth: dict, optional
1232
+ :param _content_type: force content-type for the request.
1233
+ :type _content_type: str, Optional
1234
+ :param _headers: set to override the headers for a single
1235
+ request; this effectively ignores the headers
1236
+ in the spec for a single request.
1237
+ :type _headers: dict, optional
1238
+ :param _host_index: set to override the host_index for a single
1239
+ request; this effectively ignores the host_index
1240
+ in the spec for a single request.
1241
+ :type _host_index: int, optional
1242
+ :return: Returns the result object.
1243
+ """ # noqa: E501
1244
+
1245
+ _param = self._delete_team_admin_serialize(
1246
+ organization_id=organization_id,
1247
+ team_id=team_id,
1248
+ user_id=user_id,
1249
+ _request_auth=_request_auth,
1250
+ _content_type=_content_type,
1251
+ _headers=_headers,
1252
+ _host_index=_host_index
1253
+ )
1254
+
1255
+ _response_types_map: Dict[str, Optional[str]] = {
1256
+ '200': "object",
1257
+ '422': "HTTPValidationError",
1258
+ }
1259
+ response_data = self.api_client.call_api(
1260
+ *_param,
1261
+ _request_timeout=_request_timeout
1262
+ )
1263
+ response_data.read()
1264
+ return self.api_client.response_deserialize(
1265
+ response_data=response_data,
1266
+ response_types_map=_response_types_map,
1267
+ ).data
1268
+
1269
+
1270
+ @validate_call
1271
+ def delete_team_admin_with_http_info(
1272
+ self,
1273
+ organization_id: StrictInt,
1274
+ team_id: StrictInt,
1275
+ user_id: StrictInt,
1276
+ _request_timeout: Union[
1277
+ None,
1278
+ Annotated[StrictFloat, Field(gt=0)],
1279
+ Tuple[
1280
+ Annotated[StrictFloat, Field(gt=0)],
1281
+ Annotated[StrictFloat, Field(gt=0)]
1282
+ ]
1283
+ ] = None,
1284
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1285
+ _content_type: Optional[StrictStr] = None,
1286
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1287
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1288
+ ) -> ApiResponse[object]:
1289
+ """Remove an admin from a team
1290
+
1291
+
1292
+ :param organization_id: (required)
1293
+ :type organization_id: int
1294
+ :param team_id: (required)
1295
+ :type team_id: int
1296
+ :param user_id: (required)
1297
+ :type user_id: int
1298
+ :param _request_timeout: timeout setting for this request. If one
1299
+ number provided, it will be total request
1300
+ timeout. It can also be a pair (tuple) of
1301
+ (connection, read) timeouts.
1302
+ :type _request_timeout: int, tuple(int, int), optional
1303
+ :param _request_auth: set to override the auth_settings for an a single
1304
+ request; this effectively ignores the
1305
+ authentication in the spec for a single request.
1306
+ :type _request_auth: dict, optional
1307
+ :param _content_type: force content-type for the request.
1308
+ :type _content_type: str, Optional
1309
+ :param _headers: set to override the headers for a single
1310
+ request; this effectively ignores the headers
1311
+ in the spec for a single request.
1312
+ :type _headers: dict, optional
1313
+ :param _host_index: set to override the host_index for a single
1314
+ request; this effectively ignores the host_index
1315
+ in the spec for a single request.
1316
+ :type _host_index: int, optional
1317
+ :return: Returns the result object.
1318
+ """ # noqa: E501
1319
+
1320
+ _param = self._delete_team_admin_serialize(
1321
+ organization_id=organization_id,
1322
+ team_id=team_id,
1323
+ user_id=user_id,
1324
+ _request_auth=_request_auth,
1325
+ _content_type=_content_type,
1326
+ _headers=_headers,
1327
+ _host_index=_host_index
1328
+ )
1329
+
1330
+ _response_types_map: Dict[str, Optional[str]] = {
1331
+ '200': "object",
1332
+ '422': "HTTPValidationError",
1333
+ }
1334
+ response_data = self.api_client.call_api(
1335
+ *_param,
1336
+ _request_timeout=_request_timeout
1337
+ )
1338
+ response_data.read()
1339
+ return self.api_client.response_deserialize(
1340
+ response_data=response_data,
1341
+ response_types_map=_response_types_map,
1342
+ )
1343
+
1344
+
1345
+ @validate_call
1346
+ def delete_team_admin_without_preload_content(
1347
+ self,
1348
+ organization_id: StrictInt,
1349
+ team_id: StrictInt,
1350
+ user_id: StrictInt,
1351
+ _request_timeout: Union[
1352
+ None,
1353
+ Annotated[StrictFloat, Field(gt=0)],
1354
+ Tuple[
1355
+ Annotated[StrictFloat, Field(gt=0)],
1356
+ Annotated[StrictFloat, Field(gt=0)]
1357
+ ]
1358
+ ] = None,
1359
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1360
+ _content_type: Optional[StrictStr] = None,
1361
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1362
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1363
+ ) -> RESTResponseType:
1364
+ """Remove an admin from a team
1365
+
1366
+
1367
+ :param organization_id: (required)
1368
+ :type organization_id: int
1369
+ :param team_id: (required)
1370
+ :type team_id: int
1371
+ :param user_id: (required)
1372
+ :type user_id: int
1373
+ :param _request_timeout: timeout setting for this request. If one
1374
+ number provided, it will be total request
1375
+ timeout. It can also be a pair (tuple) of
1376
+ (connection, read) timeouts.
1377
+ :type _request_timeout: int, tuple(int, int), optional
1378
+ :param _request_auth: set to override the auth_settings for an a single
1379
+ request; this effectively ignores the
1380
+ authentication in the spec for a single request.
1381
+ :type _request_auth: dict, optional
1382
+ :param _content_type: force content-type for the request.
1383
+ :type _content_type: str, Optional
1384
+ :param _headers: set to override the headers for a single
1385
+ request; this effectively ignores the headers
1386
+ in the spec for a single request.
1387
+ :type _headers: dict, optional
1388
+ :param _host_index: set to override the host_index for a single
1389
+ request; this effectively ignores the host_index
1390
+ in the spec for a single request.
1391
+ :type _host_index: int, optional
1392
+ :return: Returns the result object.
1393
+ """ # noqa: E501
1394
+
1395
+ _param = self._delete_team_admin_serialize(
1396
+ organization_id=organization_id,
1397
+ team_id=team_id,
1398
+ user_id=user_id,
1399
+ _request_auth=_request_auth,
1400
+ _content_type=_content_type,
1401
+ _headers=_headers,
1402
+ _host_index=_host_index
1403
+ )
1404
+
1405
+ _response_types_map: Dict[str, Optional[str]] = {
1406
+ '200': "object",
1407
+ '422': "HTTPValidationError",
1408
+ }
1409
+ response_data = self.api_client.call_api(
1410
+ *_param,
1411
+ _request_timeout=_request_timeout
1412
+ )
1413
+ return response_data.response
1414
+
1415
+
1416
+ def _delete_team_admin_serialize(
1417
+ self,
1418
+ organization_id,
1419
+ team_id,
1420
+ user_id,
1421
+ _request_auth,
1422
+ _content_type,
1423
+ _headers,
1424
+ _host_index,
1425
+ ) -> RequestSerialized:
1426
+
1427
+ _host = None
1428
+
1429
+ _collection_formats: Dict[str, str] = {
1430
+ }
1431
+
1432
+ _path_params: Dict[str, str] = {}
1433
+ _query_params: List[Tuple[str, str]] = []
1434
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1435
+ _form_params: List[Tuple[str, str]] = []
1436
+ _files: Dict[
1437
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1438
+ ] = {}
1439
+ _body_params: Optional[bytes] = None
1440
+
1441
+ # process the path parameters
1442
+ if organization_id is not None:
1443
+ _path_params['organization_id'] = organization_id
1444
+ if team_id is not None:
1445
+ _path_params['team_id'] = team_id
1446
+ if user_id is not None:
1447
+ _path_params['user_id'] = user_id
1448
+ # process the query parameters
1449
+ # process the header parameters
1450
+ # process the form parameters
1451
+ # process the body parameter
1452
+
1453
+
1454
+ # set the HTTP header `Accept`
1455
+ if 'Accept' not in _header_params:
1456
+ _header_params['Accept'] = self.api_client.select_header_accept(
1457
+ [
1458
+ 'application/json'
1459
+ ]
1460
+ )
1461
+
1462
+
1463
+ # authentication setting
1464
+ _auth_settings: List[str] = [
1465
+ 'QAnswer-Api-Key',
1466
+ 'Bearer token'
1467
+ ]
1468
+
1469
+ return self.api_client.param_serialize(
1470
+ method='DELETE',
1471
+ resource_path='/api/team/{organization_id}/{team_id}/admin/{user_id}',
1472
+ path_params=_path_params,
1473
+ query_params=_query_params,
1474
+ header_params=_header_params,
1475
+ body=_body_params,
1476
+ post_params=_form_params,
1477
+ files=_files,
1478
+ auth_settings=_auth_settings,
1479
+ collection_formats=_collection_formats,
1480
+ _host=_host,
1481
+ _request_auth=_request_auth
1482
+ )
1483
+
1484
+
1485
+
1486
+
1487
+ @validate_call
1488
+ def delete_user_from_team(
1489
+ self,
1490
+ organization_id: StrictInt,
1491
+ team_id: StrictInt,
1492
+ user_id: StrictInt,
1493
+ _request_timeout: Union[
1494
+ None,
1495
+ Annotated[StrictFloat, Field(gt=0)],
1496
+ Tuple[
1497
+ Annotated[StrictFloat, Field(gt=0)],
1498
+ Annotated[StrictFloat, Field(gt=0)]
1499
+ ]
1500
+ ] = None,
1501
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1502
+ _content_type: Optional[StrictStr] = None,
1503
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1504
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1505
+ ) -> object:
1506
+ """Remove a user from a team
1507
+
1508
+
1509
+ :param organization_id: (required)
1510
+ :type organization_id: int
1511
+ :param team_id: (required)
1512
+ :type team_id: int
1513
+ :param user_id: (required)
1514
+ :type user_id: int
1515
+ :param _request_timeout: timeout setting for this request. If one
1516
+ number provided, it will be total request
1517
+ timeout. It can also be a pair (tuple) of
1518
+ (connection, read) timeouts.
1519
+ :type _request_timeout: int, tuple(int, int), optional
1520
+ :param _request_auth: set to override the auth_settings for an a single
1521
+ request; this effectively ignores the
1522
+ authentication in the spec for a single request.
1523
+ :type _request_auth: dict, optional
1524
+ :param _content_type: force content-type for the request.
1525
+ :type _content_type: str, Optional
1526
+ :param _headers: set to override the headers for a single
1527
+ request; this effectively ignores the headers
1528
+ in the spec for a single request.
1529
+ :type _headers: dict, optional
1530
+ :param _host_index: set to override the host_index for a single
1531
+ request; this effectively ignores the host_index
1532
+ in the spec for a single request.
1533
+ :type _host_index: int, optional
1534
+ :return: Returns the result object.
1535
+ """ # noqa: E501
1536
+
1537
+ _param = self._delete_user_from_team_serialize(
1538
+ organization_id=organization_id,
1539
+ team_id=team_id,
1540
+ user_id=user_id,
1541
+ _request_auth=_request_auth,
1542
+ _content_type=_content_type,
1543
+ _headers=_headers,
1544
+ _host_index=_host_index
1545
+ )
1546
+
1547
+ _response_types_map: Dict[str, Optional[str]] = {
1548
+ '200': "object",
1549
+ '422': "HTTPValidationError",
1550
+ }
1551
+ response_data = self.api_client.call_api(
1552
+ *_param,
1553
+ _request_timeout=_request_timeout
1554
+ )
1555
+ response_data.read()
1556
+ return self.api_client.response_deserialize(
1557
+ response_data=response_data,
1558
+ response_types_map=_response_types_map,
1559
+ ).data
1560
+
1561
+
1562
+ @validate_call
1563
+ def delete_user_from_team_with_http_info(
1564
+ self,
1565
+ organization_id: StrictInt,
1566
+ team_id: StrictInt,
1567
+ user_id: StrictInt,
1568
+ _request_timeout: Union[
1569
+ None,
1570
+ Annotated[StrictFloat, Field(gt=0)],
1571
+ Tuple[
1572
+ Annotated[StrictFloat, Field(gt=0)],
1573
+ Annotated[StrictFloat, Field(gt=0)]
1574
+ ]
1575
+ ] = None,
1576
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1577
+ _content_type: Optional[StrictStr] = None,
1578
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1579
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1580
+ ) -> ApiResponse[object]:
1581
+ """Remove a user from a team
1582
+
1583
+
1584
+ :param organization_id: (required)
1585
+ :type organization_id: int
1586
+ :param team_id: (required)
1587
+ :type team_id: int
1588
+ :param user_id: (required)
1589
+ :type user_id: int
1590
+ :param _request_timeout: timeout setting for this request. If one
1591
+ number provided, it will be total request
1592
+ timeout. It can also be a pair (tuple) of
1593
+ (connection, read) timeouts.
1594
+ :type _request_timeout: int, tuple(int, int), optional
1595
+ :param _request_auth: set to override the auth_settings for an a single
1596
+ request; this effectively ignores the
1597
+ authentication in the spec for a single request.
1598
+ :type _request_auth: dict, optional
1599
+ :param _content_type: force content-type for the request.
1600
+ :type _content_type: str, Optional
1601
+ :param _headers: set to override the headers for a single
1602
+ request; this effectively ignores the headers
1603
+ in the spec for a single request.
1604
+ :type _headers: dict, optional
1605
+ :param _host_index: set to override the host_index for a single
1606
+ request; this effectively ignores the host_index
1607
+ in the spec for a single request.
1608
+ :type _host_index: int, optional
1609
+ :return: Returns the result object.
1610
+ """ # noqa: E501
1611
+
1612
+ _param = self._delete_user_from_team_serialize(
1613
+ organization_id=organization_id,
1614
+ team_id=team_id,
1615
+ user_id=user_id,
1616
+ _request_auth=_request_auth,
1617
+ _content_type=_content_type,
1618
+ _headers=_headers,
1619
+ _host_index=_host_index
1620
+ )
1621
+
1622
+ _response_types_map: Dict[str, Optional[str]] = {
1623
+ '200': "object",
1624
+ '422': "HTTPValidationError",
1625
+ }
1626
+ response_data = self.api_client.call_api(
1627
+ *_param,
1628
+ _request_timeout=_request_timeout
1629
+ )
1630
+ response_data.read()
1631
+ return self.api_client.response_deserialize(
1632
+ response_data=response_data,
1633
+ response_types_map=_response_types_map,
1634
+ )
1635
+
1636
+
1637
+ @validate_call
1638
+ def delete_user_from_team_without_preload_content(
1639
+ self,
1640
+ organization_id: StrictInt,
1641
+ team_id: StrictInt,
1642
+ user_id: StrictInt,
1643
+ _request_timeout: Union[
1644
+ None,
1645
+ Annotated[StrictFloat, Field(gt=0)],
1646
+ Tuple[
1647
+ Annotated[StrictFloat, Field(gt=0)],
1648
+ Annotated[StrictFloat, Field(gt=0)]
1649
+ ]
1650
+ ] = None,
1651
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1652
+ _content_type: Optional[StrictStr] = None,
1653
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1654
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1655
+ ) -> RESTResponseType:
1656
+ """Remove a user from a team
1657
+
1658
+
1659
+ :param organization_id: (required)
1660
+ :type organization_id: int
1661
+ :param team_id: (required)
1662
+ :type team_id: int
1663
+ :param user_id: (required)
1664
+ :type user_id: int
1665
+ :param _request_timeout: timeout setting for this request. If one
1666
+ number provided, it will be total request
1667
+ timeout. It can also be a pair (tuple) of
1668
+ (connection, read) timeouts.
1669
+ :type _request_timeout: int, tuple(int, int), optional
1670
+ :param _request_auth: set to override the auth_settings for an a single
1671
+ request; this effectively ignores the
1672
+ authentication in the spec for a single request.
1673
+ :type _request_auth: dict, optional
1674
+ :param _content_type: force content-type for the request.
1675
+ :type _content_type: str, Optional
1676
+ :param _headers: set to override the headers for a single
1677
+ request; this effectively ignores the headers
1678
+ in the spec for a single request.
1679
+ :type _headers: dict, optional
1680
+ :param _host_index: set to override the host_index for a single
1681
+ request; this effectively ignores the host_index
1682
+ in the spec for a single request.
1683
+ :type _host_index: int, optional
1684
+ :return: Returns the result object.
1685
+ """ # noqa: E501
1686
+
1687
+ _param = self._delete_user_from_team_serialize(
1688
+ organization_id=organization_id,
1689
+ team_id=team_id,
1690
+ user_id=user_id,
1691
+ _request_auth=_request_auth,
1692
+ _content_type=_content_type,
1693
+ _headers=_headers,
1694
+ _host_index=_host_index
1695
+ )
1696
+
1697
+ _response_types_map: Dict[str, Optional[str]] = {
1698
+ '200': "object",
1699
+ '422': "HTTPValidationError",
1700
+ }
1701
+ response_data = self.api_client.call_api(
1702
+ *_param,
1703
+ _request_timeout=_request_timeout
1704
+ )
1705
+ return response_data.response
1706
+
1707
+
1708
+ def _delete_user_from_team_serialize(
1709
+ self,
1710
+ organization_id,
1711
+ team_id,
1712
+ user_id,
1713
+ _request_auth,
1714
+ _content_type,
1715
+ _headers,
1716
+ _host_index,
1717
+ ) -> RequestSerialized:
1718
+
1719
+ _host = None
1720
+
1721
+ _collection_formats: Dict[str, str] = {
1722
+ }
1723
+
1724
+ _path_params: Dict[str, str] = {}
1725
+ _query_params: List[Tuple[str, str]] = []
1726
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1727
+ _form_params: List[Tuple[str, str]] = []
1728
+ _files: Dict[
1729
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1730
+ ] = {}
1731
+ _body_params: Optional[bytes] = None
1732
+
1733
+ # process the path parameters
1734
+ if organization_id is not None:
1735
+ _path_params['organization_id'] = organization_id
1736
+ if team_id is not None:
1737
+ _path_params['team_id'] = team_id
1738
+ if user_id is not None:
1739
+ _path_params['user_id'] = user_id
1740
+ # process the query parameters
1741
+ # process the header parameters
1742
+ # process the form parameters
1743
+ # process the body parameter
1744
+
1745
+
1746
+ # set the HTTP header `Accept`
1747
+ if 'Accept' not in _header_params:
1748
+ _header_params['Accept'] = self.api_client.select_header_accept(
1749
+ [
1750
+ 'application/json'
1751
+ ]
1752
+ )
1753
+
1754
+
1755
+ # authentication setting
1756
+ _auth_settings: List[str] = [
1757
+ 'QAnswer-Api-Key',
1758
+ 'Bearer token'
1759
+ ]
1760
+
1761
+ return self.api_client.param_serialize(
1762
+ method='DELETE',
1763
+ resource_path='/api/team/{organization_id}/{team_id}/user/{user_id}',
1764
+ path_params=_path_params,
1765
+ query_params=_query_params,
1766
+ header_params=_header_params,
1767
+ body=_body_params,
1768
+ post_params=_form_params,
1769
+ files=_files,
1770
+ auth_settings=_auth_settings,
1771
+ collection_formats=_collection_formats,
1772
+ _host=_host,
1773
+ _request_auth=_request_auth
1774
+ )
1775
+
1776
+
1777
+
1778
+
1779
+ @validate_call
1780
+ def download_teams(
1781
+ self,
1782
+ search: Optional[StrictStr] = None,
1783
+ organization_id: Optional[StrictInt] = None,
1784
+ team_id: Optional[StrictInt] = None,
1785
+ user_id: Optional[StrictInt] = None,
1786
+ page: Optional[StrictInt] = None,
1787
+ size: Optional[StrictInt] = None,
1788
+ sort_by: Optional[StrictStr] = None,
1789
+ sort_dir: Optional[StrictStr] = None,
1790
+ _request_timeout: Union[
1791
+ None,
1792
+ Annotated[StrictFloat, Field(gt=0)],
1793
+ Tuple[
1794
+ Annotated[StrictFloat, Field(gt=0)],
1795
+ Annotated[StrictFloat, Field(gt=0)]
1796
+ ]
1797
+ ] = None,
1798
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1799
+ _content_type: Optional[StrictStr] = None,
1800
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1801
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1802
+ ) -> object:
1803
+ """Download teams
1804
+
1805
+
1806
+ :param search:
1807
+ :type search: str
1808
+ :param organization_id:
1809
+ :type organization_id: int
1810
+ :param team_id:
1811
+ :type team_id: int
1812
+ :param user_id:
1813
+ :type user_id: int
1814
+ :param page:
1815
+ :type page: int
1816
+ :param size:
1817
+ :type size: int
1818
+ :param sort_by:
1819
+ :type sort_by: str
1820
+ :param sort_dir:
1821
+ :type sort_dir: str
1822
+ :param _request_timeout: timeout setting for this request. If one
1823
+ number provided, it will be total request
1824
+ timeout. It can also be a pair (tuple) of
1825
+ (connection, read) timeouts.
1826
+ :type _request_timeout: int, tuple(int, int), optional
1827
+ :param _request_auth: set to override the auth_settings for an a single
1828
+ request; this effectively ignores the
1829
+ authentication in the spec for a single request.
1830
+ :type _request_auth: dict, optional
1831
+ :param _content_type: force content-type for the request.
1832
+ :type _content_type: str, Optional
1833
+ :param _headers: set to override the headers for a single
1834
+ request; this effectively ignores the headers
1835
+ in the spec for a single request.
1836
+ :type _headers: dict, optional
1837
+ :param _host_index: set to override the host_index for a single
1838
+ request; this effectively ignores the host_index
1839
+ in the spec for a single request.
1840
+ :type _host_index: int, optional
1841
+ :return: Returns the result object.
1842
+ """ # noqa: E501
1843
+
1844
+ _param = self._download_teams_serialize(
1845
+ search=search,
1846
+ organization_id=organization_id,
1847
+ team_id=team_id,
1848
+ user_id=user_id,
1849
+ page=page,
1850
+ size=size,
1851
+ sort_by=sort_by,
1852
+ sort_dir=sort_dir,
1853
+ _request_auth=_request_auth,
1854
+ _content_type=_content_type,
1855
+ _headers=_headers,
1856
+ _host_index=_host_index
1857
+ )
1858
+
1859
+ _response_types_map: Dict[str, Optional[str]] = {
1860
+ '200': "object",
1861
+ '422': "HTTPValidationError",
1862
+ }
1863
+ response_data = self.api_client.call_api(
1864
+ *_param,
1865
+ _request_timeout=_request_timeout
1866
+ )
1867
+ response_data.read()
1868
+ return self.api_client.response_deserialize(
1869
+ response_data=response_data,
1870
+ response_types_map=_response_types_map,
1871
+ ).data
1872
+
1873
+
1874
+ @validate_call
1875
+ def download_teams_with_http_info(
1876
+ self,
1877
+ search: Optional[StrictStr] = None,
1878
+ organization_id: Optional[StrictInt] = None,
1879
+ team_id: Optional[StrictInt] = None,
1880
+ user_id: Optional[StrictInt] = None,
1881
+ page: Optional[StrictInt] = None,
1882
+ size: Optional[StrictInt] = None,
1883
+ sort_by: Optional[StrictStr] = None,
1884
+ sort_dir: Optional[StrictStr] = None,
1885
+ _request_timeout: Union[
1886
+ None,
1887
+ Annotated[StrictFloat, Field(gt=0)],
1888
+ Tuple[
1889
+ Annotated[StrictFloat, Field(gt=0)],
1890
+ Annotated[StrictFloat, Field(gt=0)]
1891
+ ]
1892
+ ] = None,
1893
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1894
+ _content_type: Optional[StrictStr] = None,
1895
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1896
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1897
+ ) -> ApiResponse[object]:
1898
+ """Download teams
1899
+
1900
+
1901
+ :param search:
1902
+ :type search: str
1903
+ :param organization_id:
1904
+ :type organization_id: int
1905
+ :param team_id:
1906
+ :type team_id: int
1907
+ :param user_id:
1908
+ :type user_id: int
1909
+ :param page:
1910
+ :type page: int
1911
+ :param size:
1912
+ :type size: int
1913
+ :param sort_by:
1914
+ :type sort_by: str
1915
+ :param sort_dir:
1916
+ :type sort_dir: str
1917
+ :param _request_timeout: timeout setting for this request. If one
1918
+ number provided, it will be total request
1919
+ timeout. It can also be a pair (tuple) of
1920
+ (connection, read) timeouts.
1921
+ :type _request_timeout: int, tuple(int, int), optional
1922
+ :param _request_auth: set to override the auth_settings for an a single
1923
+ request; this effectively ignores the
1924
+ authentication in the spec for a single request.
1925
+ :type _request_auth: dict, optional
1926
+ :param _content_type: force content-type for the request.
1927
+ :type _content_type: str, Optional
1928
+ :param _headers: set to override the headers for a single
1929
+ request; this effectively ignores the headers
1930
+ in the spec for a single request.
1931
+ :type _headers: dict, optional
1932
+ :param _host_index: set to override the host_index for a single
1933
+ request; this effectively ignores the host_index
1934
+ in the spec for a single request.
1935
+ :type _host_index: int, optional
1936
+ :return: Returns the result object.
1937
+ """ # noqa: E501
1938
+
1939
+ _param = self._download_teams_serialize(
1940
+ search=search,
1941
+ organization_id=organization_id,
1942
+ team_id=team_id,
1943
+ user_id=user_id,
1944
+ page=page,
1945
+ size=size,
1946
+ sort_by=sort_by,
1947
+ sort_dir=sort_dir,
1948
+ _request_auth=_request_auth,
1949
+ _content_type=_content_type,
1950
+ _headers=_headers,
1951
+ _host_index=_host_index
1952
+ )
1953
+
1954
+ _response_types_map: Dict[str, Optional[str]] = {
1955
+ '200': "object",
1956
+ '422': "HTTPValidationError",
1957
+ }
1958
+ response_data = self.api_client.call_api(
1959
+ *_param,
1960
+ _request_timeout=_request_timeout
1961
+ )
1962
+ response_data.read()
1963
+ return self.api_client.response_deserialize(
1964
+ response_data=response_data,
1965
+ response_types_map=_response_types_map,
1966
+ )
1967
+
1968
+
1969
+ @validate_call
1970
+ def download_teams_without_preload_content(
1971
+ self,
1972
+ search: Optional[StrictStr] = None,
1973
+ organization_id: Optional[StrictInt] = None,
1974
+ team_id: Optional[StrictInt] = None,
1975
+ user_id: Optional[StrictInt] = None,
1976
+ page: Optional[StrictInt] = None,
1977
+ size: Optional[StrictInt] = None,
1978
+ sort_by: Optional[StrictStr] = None,
1979
+ sort_dir: Optional[StrictStr] = None,
1980
+ _request_timeout: Union[
1981
+ None,
1982
+ Annotated[StrictFloat, Field(gt=0)],
1983
+ Tuple[
1984
+ Annotated[StrictFloat, Field(gt=0)],
1985
+ Annotated[StrictFloat, Field(gt=0)]
1986
+ ]
1987
+ ] = None,
1988
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1989
+ _content_type: Optional[StrictStr] = None,
1990
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1991
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1992
+ ) -> RESTResponseType:
1993
+ """Download teams
1994
+
1995
+
1996
+ :param search:
1997
+ :type search: str
1998
+ :param organization_id:
1999
+ :type organization_id: int
2000
+ :param team_id:
2001
+ :type team_id: int
2002
+ :param user_id:
2003
+ :type user_id: int
2004
+ :param page:
2005
+ :type page: int
2006
+ :param size:
2007
+ :type size: int
2008
+ :param sort_by:
2009
+ :type sort_by: str
2010
+ :param sort_dir:
2011
+ :type sort_dir: str
2012
+ :param _request_timeout: timeout setting for this request. If one
2013
+ number provided, it will be total request
2014
+ timeout. It can also be a pair (tuple) of
2015
+ (connection, read) timeouts.
2016
+ :type _request_timeout: int, tuple(int, int), optional
2017
+ :param _request_auth: set to override the auth_settings for an a single
2018
+ request; this effectively ignores the
2019
+ authentication in the spec for a single request.
2020
+ :type _request_auth: dict, optional
2021
+ :param _content_type: force content-type for the request.
2022
+ :type _content_type: str, Optional
2023
+ :param _headers: set to override the headers for a single
2024
+ request; this effectively ignores the headers
2025
+ in the spec for a single request.
2026
+ :type _headers: dict, optional
2027
+ :param _host_index: set to override the host_index for a single
2028
+ request; this effectively ignores the host_index
2029
+ in the spec for a single request.
2030
+ :type _host_index: int, optional
2031
+ :return: Returns the result object.
2032
+ """ # noqa: E501
2033
+
2034
+ _param = self._download_teams_serialize(
2035
+ search=search,
2036
+ organization_id=organization_id,
2037
+ team_id=team_id,
2038
+ user_id=user_id,
2039
+ page=page,
2040
+ size=size,
2041
+ sort_by=sort_by,
2042
+ sort_dir=sort_dir,
2043
+ _request_auth=_request_auth,
2044
+ _content_type=_content_type,
2045
+ _headers=_headers,
2046
+ _host_index=_host_index
2047
+ )
2048
+
2049
+ _response_types_map: Dict[str, Optional[str]] = {
2050
+ '200': "object",
2051
+ '422': "HTTPValidationError",
2052
+ }
2053
+ response_data = self.api_client.call_api(
2054
+ *_param,
2055
+ _request_timeout=_request_timeout
2056
+ )
2057
+ return response_data.response
2058
+
2059
+
2060
+ def _download_teams_serialize(
2061
+ self,
2062
+ search,
2063
+ organization_id,
2064
+ team_id,
2065
+ user_id,
2066
+ page,
2067
+ size,
2068
+ sort_by,
2069
+ sort_dir,
2070
+ _request_auth,
2071
+ _content_type,
2072
+ _headers,
2073
+ _host_index,
2074
+ ) -> RequestSerialized:
2075
+
2076
+ _host = None
2077
+
2078
+ _collection_formats: Dict[str, str] = {
2079
+ }
2080
+
2081
+ _path_params: Dict[str, str] = {}
2082
+ _query_params: List[Tuple[str, str]] = []
2083
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2084
+ _form_params: List[Tuple[str, str]] = []
2085
+ _files: Dict[
2086
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2087
+ ] = {}
2088
+ _body_params: Optional[bytes] = None
2089
+
2090
+ # process the path parameters
2091
+ # process the query parameters
2092
+ if search is not None:
2093
+
2094
+ _query_params.append(('search', search))
2095
+
2096
+ if organization_id is not None:
2097
+
2098
+ _query_params.append(('organizationId', organization_id))
2099
+
2100
+ if team_id is not None:
2101
+
2102
+ _query_params.append(('teamId', team_id))
2103
+
2104
+ if user_id is not None:
2105
+
2106
+ _query_params.append(('userId', user_id))
2107
+
2108
+ if page is not None:
2109
+
2110
+ _query_params.append(('page', page))
2111
+
2112
+ if size is not None:
2113
+
2114
+ _query_params.append(('size', size))
2115
+
2116
+ if sort_by is not None:
2117
+
2118
+ _query_params.append(('sortBy', sort_by))
2119
+
2120
+ if sort_dir is not None:
2121
+
2122
+ _query_params.append(('sortDir', sort_dir))
2123
+
2124
+ # process the header parameters
2125
+ # process the form parameters
2126
+ # process the body parameter
2127
+
2128
+
2129
+ # set the HTTP header `Accept`
2130
+ if 'Accept' not in _header_params:
2131
+ _header_params['Accept'] = self.api_client.select_header_accept(
2132
+ [
2133
+ 'application/json'
2134
+ ]
2135
+ )
2136
+
2137
+
2138
+ # authentication setting
2139
+ _auth_settings: List[str] = [
2140
+ 'QAnswer-Api-Key',
2141
+ 'Bearer token'
2142
+ ]
2143
+
2144
+ return self.api_client.param_serialize(
2145
+ method='GET',
2146
+ resource_path='/api/team/download',
2147
+ path_params=_path_params,
2148
+ query_params=_query_params,
2149
+ header_params=_header_params,
2150
+ body=_body_params,
2151
+ post_params=_form_params,
2152
+ files=_files,
2153
+ auth_settings=_auth_settings,
2154
+ collection_formats=_collection_formats,
2155
+ _host=_host,
2156
+ _request_auth=_request_auth
2157
+ )
2158
+
2159
+
2160
+
2161
+
2162
+ @validate_call
2163
+ def get_team_by_id(
2164
+ self,
2165
+ organization_id: StrictInt,
2166
+ team_id: StrictInt,
2167
+ _request_timeout: Union[
2168
+ None,
2169
+ Annotated[StrictFloat, Field(gt=0)],
2170
+ Tuple[
2171
+ Annotated[StrictFloat, Field(gt=0)],
2172
+ Annotated[StrictFloat, Field(gt=0)]
2173
+ ]
2174
+ ] = None,
2175
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2176
+ _content_type: Optional[StrictStr] = None,
2177
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2178
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2179
+ ) -> TeamDto:
2180
+ """Get a team by id
2181
+
2182
+
2183
+ :param organization_id: (required)
2184
+ :type organization_id: int
2185
+ :param team_id: (required)
2186
+ :type team_id: int
2187
+ :param _request_timeout: timeout setting for this request. If one
2188
+ number provided, it will be total request
2189
+ timeout. It can also be a pair (tuple) of
2190
+ (connection, read) timeouts.
2191
+ :type _request_timeout: int, tuple(int, int), optional
2192
+ :param _request_auth: set to override the auth_settings for an a single
2193
+ request; this effectively ignores the
2194
+ authentication in the spec for a single request.
2195
+ :type _request_auth: dict, optional
2196
+ :param _content_type: force content-type for the request.
2197
+ :type _content_type: str, Optional
2198
+ :param _headers: set to override the headers for a single
2199
+ request; this effectively ignores the headers
2200
+ in the spec for a single request.
2201
+ :type _headers: dict, optional
2202
+ :param _host_index: set to override the host_index for a single
2203
+ request; this effectively ignores the host_index
2204
+ in the spec for a single request.
2205
+ :type _host_index: int, optional
2206
+ :return: Returns the result object.
2207
+ """ # noqa: E501
2208
+
2209
+ _param = self._get_team_by_id_serialize(
2210
+ organization_id=organization_id,
2211
+ team_id=team_id,
2212
+ _request_auth=_request_auth,
2213
+ _content_type=_content_type,
2214
+ _headers=_headers,
2215
+ _host_index=_host_index
2216
+ )
2217
+
2218
+ _response_types_map: Dict[str, Optional[str]] = {
2219
+ '200': "TeamDto",
2220
+ '422': "HTTPValidationError",
2221
+ }
2222
+ response_data = self.api_client.call_api(
2223
+ *_param,
2224
+ _request_timeout=_request_timeout
2225
+ )
2226
+ response_data.read()
2227
+ return self.api_client.response_deserialize(
2228
+ response_data=response_data,
2229
+ response_types_map=_response_types_map,
2230
+ ).data
2231
+
2232
+
2233
+ @validate_call
2234
+ def get_team_by_id_with_http_info(
2235
+ self,
2236
+ organization_id: StrictInt,
2237
+ team_id: StrictInt,
2238
+ _request_timeout: Union[
2239
+ None,
2240
+ Annotated[StrictFloat, Field(gt=0)],
2241
+ Tuple[
2242
+ Annotated[StrictFloat, Field(gt=0)],
2243
+ Annotated[StrictFloat, Field(gt=0)]
2244
+ ]
2245
+ ] = None,
2246
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2247
+ _content_type: Optional[StrictStr] = None,
2248
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2249
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2250
+ ) -> ApiResponse[TeamDto]:
2251
+ """Get a team by id
2252
+
2253
+
2254
+ :param organization_id: (required)
2255
+ :type organization_id: int
2256
+ :param team_id: (required)
2257
+ :type team_id: int
2258
+ :param _request_timeout: timeout setting for this request. If one
2259
+ number provided, it will be total request
2260
+ timeout. It can also be a pair (tuple) of
2261
+ (connection, read) timeouts.
2262
+ :type _request_timeout: int, tuple(int, int), optional
2263
+ :param _request_auth: set to override the auth_settings for an a single
2264
+ request; this effectively ignores the
2265
+ authentication in the spec for a single request.
2266
+ :type _request_auth: dict, optional
2267
+ :param _content_type: force content-type for the request.
2268
+ :type _content_type: str, Optional
2269
+ :param _headers: set to override the headers for a single
2270
+ request; this effectively ignores the headers
2271
+ in the spec for a single request.
2272
+ :type _headers: dict, optional
2273
+ :param _host_index: set to override the host_index for a single
2274
+ request; this effectively ignores the host_index
2275
+ in the spec for a single request.
2276
+ :type _host_index: int, optional
2277
+ :return: Returns the result object.
2278
+ """ # noqa: E501
2279
+
2280
+ _param = self._get_team_by_id_serialize(
2281
+ organization_id=organization_id,
2282
+ team_id=team_id,
2283
+ _request_auth=_request_auth,
2284
+ _content_type=_content_type,
2285
+ _headers=_headers,
2286
+ _host_index=_host_index
2287
+ )
2288
+
2289
+ _response_types_map: Dict[str, Optional[str]] = {
2290
+ '200': "TeamDto",
2291
+ '422': "HTTPValidationError",
2292
+ }
2293
+ response_data = self.api_client.call_api(
2294
+ *_param,
2295
+ _request_timeout=_request_timeout
2296
+ )
2297
+ response_data.read()
2298
+ return self.api_client.response_deserialize(
2299
+ response_data=response_data,
2300
+ response_types_map=_response_types_map,
2301
+ )
2302
+
2303
+
2304
+ @validate_call
2305
+ def get_team_by_id_without_preload_content(
2306
+ self,
2307
+ organization_id: StrictInt,
2308
+ team_id: StrictInt,
2309
+ _request_timeout: Union[
2310
+ None,
2311
+ Annotated[StrictFloat, Field(gt=0)],
2312
+ Tuple[
2313
+ Annotated[StrictFloat, Field(gt=0)],
2314
+ Annotated[StrictFloat, Field(gt=0)]
2315
+ ]
2316
+ ] = None,
2317
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2318
+ _content_type: Optional[StrictStr] = None,
2319
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2320
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2321
+ ) -> RESTResponseType:
2322
+ """Get a team by id
2323
+
2324
+
2325
+ :param organization_id: (required)
2326
+ :type organization_id: int
2327
+ :param team_id: (required)
2328
+ :type team_id: int
2329
+ :param _request_timeout: timeout setting for this request. If one
2330
+ number provided, it will be total request
2331
+ timeout. It can also be a pair (tuple) of
2332
+ (connection, read) timeouts.
2333
+ :type _request_timeout: int, tuple(int, int), optional
2334
+ :param _request_auth: set to override the auth_settings for an a single
2335
+ request; this effectively ignores the
2336
+ authentication in the spec for a single request.
2337
+ :type _request_auth: dict, optional
2338
+ :param _content_type: force content-type for the request.
2339
+ :type _content_type: str, Optional
2340
+ :param _headers: set to override the headers for a single
2341
+ request; this effectively ignores the headers
2342
+ in the spec for a single request.
2343
+ :type _headers: dict, optional
2344
+ :param _host_index: set to override the host_index for a single
2345
+ request; this effectively ignores the host_index
2346
+ in the spec for a single request.
2347
+ :type _host_index: int, optional
2348
+ :return: Returns the result object.
2349
+ """ # noqa: E501
2350
+
2351
+ _param = self._get_team_by_id_serialize(
2352
+ organization_id=organization_id,
2353
+ team_id=team_id,
2354
+ _request_auth=_request_auth,
2355
+ _content_type=_content_type,
2356
+ _headers=_headers,
2357
+ _host_index=_host_index
2358
+ )
2359
+
2360
+ _response_types_map: Dict[str, Optional[str]] = {
2361
+ '200': "TeamDto",
2362
+ '422': "HTTPValidationError",
2363
+ }
2364
+ response_data = self.api_client.call_api(
2365
+ *_param,
2366
+ _request_timeout=_request_timeout
2367
+ )
2368
+ return response_data.response
2369
+
2370
+
2371
+ def _get_team_by_id_serialize(
2372
+ self,
2373
+ organization_id,
2374
+ team_id,
2375
+ _request_auth,
2376
+ _content_type,
2377
+ _headers,
2378
+ _host_index,
2379
+ ) -> RequestSerialized:
2380
+
2381
+ _host = None
2382
+
2383
+ _collection_formats: Dict[str, str] = {
2384
+ }
2385
+
2386
+ _path_params: Dict[str, str] = {}
2387
+ _query_params: List[Tuple[str, str]] = []
2388
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2389
+ _form_params: List[Tuple[str, str]] = []
2390
+ _files: Dict[
2391
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2392
+ ] = {}
2393
+ _body_params: Optional[bytes] = None
2394
+
2395
+ # process the path parameters
2396
+ if organization_id is not None:
2397
+ _path_params['organization_id'] = organization_id
2398
+ if team_id is not None:
2399
+ _path_params['team_id'] = team_id
2400
+ # process the query parameters
2401
+ # process the header parameters
2402
+ # process the form parameters
2403
+ # process the body parameter
2404
+
2405
+
2406
+ # set the HTTP header `Accept`
2407
+ if 'Accept' not in _header_params:
2408
+ _header_params['Accept'] = self.api_client.select_header_accept(
2409
+ [
2410
+ 'application/json'
2411
+ ]
2412
+ )
2413
+
2414
+
2415
+ # authentication setting
2416
+ _auth_settings: List[str] = [
2417
+ 'QAnswer-Api-Key',
2418
+ 'Bearer token'
2419
+ ]
2420
+
2421
+ return self.api_client.param_serialize(
2422
+ method='GET',
2423
+ resource_path='/api/team/{organization_id}/{team_id}',
2424
+ path_params=_path_params,
2425
+ query_params=_query_params,
2426
+ header_params=_header_params,
2427
+ body=_body_params,
2428
+ post_params=_form_params,
2429
+ files=_files,
2430
+ auth_settings=_auth_settings,
2431
+ collection_formats=_collection_formats,
2432
+ _host=_host,
2433
+ _request_auth=_request_auth
2434
+ )
2435
+
2436
+
2437
+
2438
+
2439
+ @validate_call
2440
+ def get_team_logo(
2441
+ self,
2442
+ team_id: StrictInt,
2443
+ _request_timeout: Union[
2444
+ None,
2445
+ Annotated[StrictFloat, Field(gt=0)],
2446
+ Tuple[
2447
+ Annotated[StrictFloat, Field(gt=0)],
2448
+ Annotated[StrictFloat, Field(gt=0)]
2449
+ ]
2450
+ ] = None,
2451
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2452
+ _content_type: Optional[StrictStr] = None,
2453
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2454
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2455
+ ) -> object:
2456
+ """Returns the logo of a team
2457
+
2458
+
2459
+ :param team_id: (required)
2460
+ :type team_id: int
2461
+ :param _request_timeout: timeout setting for this request. If one
2462
+ number provided, it will be total request
2463
+ timeout. It can also be a pair (tuple) of
2464
+ (connection, read) timeouts.
2465
+ :type _request_timeout: int, tuple(int, int), optional
2466
+ :param _request_auth: set to override the auth_settings for an a single
2467
+ request; this effectively ignores the
2468
+ authentication in the spec for a single request.
2469
+ :type _request_auth: dict, optional
2470
+ :param _content_type: force content-type for the request.
2471
+ :type _content_type: str, Optional
2472
+ :param _headers: set to override the headers for a single
2473
+ request; this effectively ignores the headers
2474
+ in the spec for a single request.
2475
+ :type _headers: dict, optional
2476
+ :param _host_index: set to override the host_index for a single
2477
+ request; this effectively ignores the host_index
2478
+ in the spec for a single request.
2479
+ :type _host_index: int, optional
2480
+ :return: Returns the result object.
2481
+ """ # noqa: E501
2482
+
2483
+ _param = self._get_team_logo_serialize(
2484
+ team_id=team_id,
2485
+ _request_auth=_request_auth,
2486
+ _content_type=_content_type,
2487
+ _headers=_headers,
2488
+ _host_index=_host_index
2489
+ )
2490
+
2491
+ _response_types_map: Dict[str, Optional[str]] = {
2492
+ '200': "object",
2493
+ '422': "HTTPValidationError",
2494
+ }
2495
+ response_data = self.api_client.call_api(
2496
+ *_param,
2497
+ _request_timeout=_request_timeout
2498
+ )
2499
+ response_data.read()
2500
+ return self.api_client.response_deserialize(
2501
+ response_data=response_data,
2502
+ response_types_map=_response_types_map,
2503
+ ).data
2504
+
2505
+
2506
+ @validate_call
2507
+ def get_team_logo_with_http_info(
2508
+ self,
2509
+ team_id: StrictInt,
2510
+ _request_timeout: Union[
2511
+ None,
2512
+ Annotated[StrictFloat, Field(gt=0)],
2513
+ Tuple[
2514
+ Annotated[StrictFloat, Field(gt=0)],
2515
+ Annotated[StrictFloat, Field(gt=0)]
2516
+ ]
2517
+ ] = None,
2518
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2519
+ _content_type: Optional[StrictStr] = None,
2520
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2521
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2522
+ ) -> ApiResponse[object]:
2523
+ """Returns the logo of a team
2524
+
2525
+
2526
+ :param team_id: (required)
2527
+ :type team_id: int
2528
+ :param _request_timeout: timeout setting for this request. If one
2529
+ number provided, it will be total request
2530
+ timeout. It can also be a pair (tuple) of
2531
+ (connection, read) timeouts.
2532
+ :type _request_timeout: int, tuple(int, int), optional
2533
+ :param _request_auth: set to override the auth_settings for an a single
2534
+ request; this effectively ignores the
2535
+ authentication in the spec for a single request.
2536
+ :type _request_auth: dict, optional
2537
+ :param _content_type: force content-type for the request.
2538
+ :type _content_type: str, Optional
2539
+ :param _headers: set to override the headers for a single
2540
+ request; this effectively ignores the headers
2541
+ in the spec for a single request.
2542
+ :type _headers: dict, optional
2543
+ :param _host_index: set to override the host_index for a single
2544
+ request; this effectively ignores the host_index
2545
+ in the spec for a single request.
2546
+ :type _host_index: int, optional
2547
+ :return: Returns the result object.
2548
+ """ # noqa: E501
2549
+
2550
+ _param = self._get_team_logo_serialize(
2551
+ team_id=team_id,
2552
+ _request_auth=_request_auth,
2553
+ _content_type=_content_type,
2554
+ _headers=_headers,
2555
+ _host_index=_host_index
2556
+ )
2557
+
2558
+ _response_types_map: Dict[str, Optional[str]] = {
2559
+ '200': "object",
2560
+ '422': "HTTPValidationError",
2561
+ }
2562
+ response_data = self.api_client.call_api(
2563
+ *_param,
2564
+ _request_timeout=_request_timeout
2565
+ )
2566
+ response_data.read()
2567
+ return self.api_client.response_deserialize(
2568
+ response_data=response_data,
2569
+ response_types_map=_response_types_map,
2570
+ )
2571
+
2572
+
2573
+ @validate_call
2574
+ def get_team_logo_without_preload_content(
2575
+ self,
2576
+ team_id: StrictInt,
2577
+ _request_timeout: Union[
2578
+ None,
2579
+ Annotated[StrictFloat, Field(gt=0)],
2580
+ Tuple[
2581
+ Annotated[StrictFloat, Field(gt=0)],
2582
+ Annotated[StrictFloat, Field(gt=0)]
2583
+ ]
2584
+ ] = None,
2585
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2586
+ _content_type: Optional[StrictStr] = None,
2587
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2588
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2589
+ ) -> RESTResponseType:
2590
+ """Returns the logo of a team
2591
+
2592
+
2593
+ :param team_id: (required)
2594
+ :type team_id: int
2595
+ :param _request_timeout: timeout setting for this request. If one
2596
+ number provided, it will be total request
2597
+ timeout. It can also be a pair (tuple) of
2598
+ (connection, read) timeouts.
2599
+ :type _request_timeout: int, tuple(int, int), optional
2600
+ :param _request_auth: set to override the auth_settings for an a single
2601
+ request; this effectively ignores the
2602
+ authentication in the spec for a single request.
2603
+ :type _request_auth: dict, optional
2604
+ :param _content_type: force content-type for the request.
2605
+ :type _content_type: str, Optional
2606
+ :param _headers: set to override the headers for a single
2607
+ request; this effectively ignores the headers
2608
+ in the spec for a single request.
2609
+ :type _headers: dict, optional
2610
+ :param _host_index: set to override the host_index for a single
2611
+ request; this effectively ignores the host_index
2612
+ in the spec for a single request.
2613
+ :type _host_index: int, optional
2614
+ :return: Returns the result object.
2615
+ """ # noqa: E501
2616
+
2617
+ _param = self._get_team_logo_serialize(
2618
+ team_id=team_id,
2619
+ _request_auth=_request_auth,
2620
+ _content_type=_content_type,
2621
+ _headers=_headers,
2622
+ _host_index=_host_index
2623
+ )
2624
+
2625
+ _response_types_map: Dict[str, Optional[str]] = {
2626
+ '200': "object",
2627
+ '422': "HTTPValidationError",
2628
+ }
2629
+ response_data = self.api_client.call_api(
2630
+ *_param,
2631
+ _request_timeout=_request_timeout
2632
+ )
2633
+ return response_data.response
2634
+
2635
+
2636
+ def _get_team_logo_serialize(
2637
+ self,
2638
+ team_id,
2639
+ _request_auth,
2640
+ _content_type,
2641
+ _headers,
2642
+ _host_index,
2643
+ ) -> RequestSerialized:
2644
+
2645
+ _host = None
2646
+
2647
+ _collection_formats: Dict[str, str] = {
2648
+ }
2649
+
2650
+ _path_params: Dict[str, str] = {}
2651
+ _query_params: List[Tuple[str, str]] = []
2652
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2653
+ _form_params: List[Tuple[str, str]] = []
2654
+ _files: Dict[
2655
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2656
+ ] = {}
2657
+ _body_params: Optional[bytes] = None
2658
+
2659
+ # process the path parameters
2660
+ if team_id is not None:
2661
+ _path_params['team_id'] = team_id
2662
+ # process the query parameters
2663
+ # process the header parameters
2664
+ # process the form parameters
2665
+ # process the body parameter
2666
+
2667
+
2668
+ # set the HTTP header `Accept`
2669
+ if 'Accept' not in _header_params:
2670
+ _header_params['Accept'] = self.api_client.select_header_accept(
2671
+ [
2672
+ 'application/json'
2673
+ ]
2674
+ )
2675
+
2676
+
2677
+ # authentication setting
2678
+ _auth_settings: List[str] = [
2679
+ 'QAnswer-Api-Key',
2680
+ 'Bearer token'
2681
+ ]
2682
+
2683
+ return self.api_client.param_serialize(
2684
+ method='GET',
2685
+ resource_path='/api/team/{team_id}/logo',
2686
+ path_params=_path_params,
2687
+ query_params=_query_params,
2688
+ header_params=_header_params,
2689
+ body=_body_params,
2690
+ post_params=_form_params,
2691
+ files=_files,
2692
+ auth_settings=_auth_settings,
2693
+ collection_formats=_collection_formats,
2694
+ _host=_host,
2695
+ _request_auth=_request_auth
2696
+ )
2697
+
2698
+
2699
+
2700
+
2701
+ @validate_call
2702
+ def list_team_admins(
2703
+ self,
2704
+ organization_id: StrictInt,
2705
+ team_id: StrictInt,
2706
+ _request_timeout: Union[
2707
+ None,
2708
+ Annotated[StrictFloat, Field(gt=0)],
2709
+ Tuple[
2710
+ Annotated[StrictFloat, Field(gt=0)],
2711
+ Annotated[StrictFloat, Field(gt=0)]
2712
+ ]
2713
+ ] = None,
2714
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2715
+ _content_type: Optional[StrictStr] = None,
2716
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2717
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2718
+ ) -> List[UserDto]:
2719
+ """Get all admins of a team
2720
+
2721
+
2722
+ :param organization_id: (required)
2723
+ :type organization_id: int
2724
+ :param team_id: (required)
2725
+ :type team_id: int
2726
+ :param _request_timeout: timeout setting for this request. If one
2727
+ number provided, it will be total request
2728
+ timeout. It can also be a pair (tuple) of
2729
+ (connection, read) timeouts.
2730
+ :type _request_timeout: int, tuple(int, int), optional
2731
+ :param _request_auth: set to override the auth_settings for an a single
2732
+ request; this effectively ignores the
2733
+ authentication in the spec for a single request.
2734
+ :type _request_auth: dict, optional
2735
+ :param _content_type: force content-type for the request.
2736
+ :type _content_type: str, Optional
2737
+ :param _headers: set to override the headers for a single
2738
+ request; this effectively ignores the headers
2739
+ in the spec for a single request.
2740
+ :type _headers: dict, optional
2741
+ :param _host_index: set to override the host_index for a single
2742
+ request; this effectively ignores the host_index
2743
+ in the spec for a single request.
2744
+ :type _host_index: int, optional
2745
+ :return: Returns the result object.
2746
+ """ # noqa: E501
2747
+
2748
+ _param = self._list_team_admins_serialize(
2749
+ organization_id=organization_id,
2750
+ team_id=team_id,
2751
+ _request_auth=_request_auth,
2752
+ _content_type=_content_type,
2753
+ _headers=_headers,
2754
+ _host_index=_host_index
2755
+ )
2756
+
2757
+ _response_types_map: Dict[str, Optional[str]] = {
2758
+ '200': "List[UserDto]",
2759
+ '422': "HTTPValidationError",
2760
+ }
2761
+ response_data = self.api_client.call_api(
2762
+ *_param,
2763
+ _request_timeout=_request_timeout
2764
+ )
2765
+ response_data.read()
2766
+ return self.api_client.response_deserialize(
2767
+ response_data=response_data,
2768
+ response_types_map=_response_types_map,
2769
+ ).data
2770
+
2771
+
2772
+ @validate_call
2773
+ def list_team_admins_with_http_info(
2774
+ self,
2775
+ organization_id: StrictInt,
2776
+ team_id: StrictInt,
2777
+ _request_timeout: Union[
2778
+ None,
2779
+ Annotated[StrictFloat, Field(gt=0)],
2780
+ Tuple[
2781
+ Annotated[StrictFloat, Field(gt=0)],
2782
+ Annotated[StrictFloat, Field(gt=0)]
2783
+ ]
2784
+ ] = None,
2785
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2786
+ _content_type: Optional[StrictStr] = None,
2787
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2788
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2789
+ ) -> ApiResponse[List[UserDto]]:
2790
+ """Get all admins of a team
2791
+
2792
+
2793
+ :param organization_id: (required)
2794
+ :type organization_id: int
2795
+ :param team_id: (required)
2796
+ :type team_id: int
2797
+ :param _request_timeout: timeout setting for this request. If one
2798
+ number provided, it will be total request
2799
+ timeout. It can also be a pair (tuple) of
2800
+ (connection, read) timeouts.
2801
+ :type _request_timeout: int, tuple(int, int), optional
2802
+ :param _request_auth: set to override the auth_settings for an a single
2803
+ request; this effectively ignores the
2804
+ authentication in the spec for a single request.
2805
+ :type _request_auth: dict, optional
2806
+ :param _content_type: force content-type for the request.
2807
+ :type _content_type: str, Optional
2808
+ :param _headers: set to override the headers for a single
2809
+ request; this effectively ignores the headers
2810
+ in the spec for a single request.
2811
+ :type _headers: dict, optional
2812
+ :param _host_index: set to override the host_index for a single
2813
+ request; this effectively ignores the host_index
2814
+ in the spec for a single request.
2815
+ :type _host_index: int, optional
2816
+ :return: Returns the result object.
2817
+ """ # noqa: E501
2818
+
2819
+ _param = self._list_team_admins_serialize(
2820
+ organization_id=organization_id,
2821
+ team_id=team_id,
2822
+ _request_auth=_request_auth,
2823
+ _content_type=_content_type,
2824
+ _headers=_headers,
2825
+ _host_index=_host_index
2826
+ )
2827
+
2828
+ _response_types_map: Dict[str, Optional[str]] = {
2829
+ '200': "List[UserDto]",
2830
+ '422': "HTTPValidationError",
2831
+ }
2832
+ response_data = self.api_client.call_api(
2833
+ *_param,
2834
+ _request_timeout=_request_timeout
2835
+ )
2836
+ response_data.read()
2837
+ return self.api_client.response_deserialize(
2838
+ response_data=response_data,
2839
+ response_types_map=_response_types_map,
2840
+ )
2841
+
2842
+
2843
+ @validate_call
2844
+ def list_team_admins_without_preload_content(
2845
+ self,
2846
+ organization_id: StrictInt,
2847
+ team_id: StrictInt,
2848
+ _request_timeout: Union[
2849
+ None,
2850
+ Annotated[StrictFloat, Field(gt=0)],
2851
+ Tuple[
2852
+ Annotated[StrictFloat, Field(gt=0)],
2853
+ Annotated[StrictFloat, Field(gt=0)]
2854
+ ]
2855
+ ] = None,
2856
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2857
+ _content_type: Optional[StrictStr] = None,
2858
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2859
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2860
+ ) -> RESTResponseType:
2861
+ """Get all admins of a team
2862
+
2863
+
2864
+ :param organization_id: (required)
2865
+ :type organization_id: int
2866
+ :param team_id: (required)
2867
+ :type team_id: int
2868
+ :param _request_timeout: timeout setting for this request. If one
2869
+ number provided, it will be total request
2870
+ timeout. It can also be a pair (tuple) of
2871
+ (connection, read) timeouts.
2872
+ :type _request_timeout: int, tuple(int, int), optional
2873
+ :param _request_auth: set to override the auth_settings for an a single
2874
+ request; this effectively ignores the
2875
+ authentication in the spec for a single request.
2876
+ :type _request_auth: dict, optional
2877
+ :param _content_type: force content-type for the request.
2878
+ :type _content_type: str, Optional
2879
+ :param _headers: set to override the headers for a single
2880
+ request; this effectively ignores the headers
2881
+ in the spec for a single request.
2882
+ :type _headers: dict, optional
2883
+ :param _host_index: set to override the host_index for a single
2884
+ request; this effectively ignores the host_index
2885
+ in the spec for a single request.
2886
+ :type _host_index: int, optional
2887
+ :return: Returns the result object.
2888
+ """ # noqa: E501
2889
+
2890
+ _param = self._list_team_admins_serialize(
2891
+ organization_id=organization_id,
2892
+ team_id=team_id,
2893
+ _request_auth=_request_auth,
2894
+ _content_type=_content_type,
2895
+ _headers=_headers,
2896
+ _host_index=_host_index
2897
+ )
2898
+
2899
+ _response_types_map: Dict[str, Optional[str]] = {
2900
+ '200': "List[UserDto]",
2901
+ '422': "HTTPValidationError",
2902
+ }
2903
+ response_data = self.api_client.call_api(
2904
+ *_param,
2905
+ _request_timeout=_request_timeout
2906
+ )
2907
+ return response_data.response
2908
+
2909
+
2910
+ def _list_team_admins_serialize(
2911
+ self,
2912
+ organization_id,
2913
+ team_id,
2914
+ _request_auth,
2915
+ _content_type,
2916
+ _headers,
2917
+ _host_index,
2918
+ ) -> RequestSerialized:
2919
+
2920
+ _host = None
2921
+
2922
+ _collection_formats: Dict[str, str] = {
2923
+ }
2924
+
2925
+ _path_params: Dict[str, str] = {}
2926
+ _query_params: List[Tuple[str, str]] = []
2927
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2928
+ _form_params: List[Tuple[str, str]] = []
2929
+ _files: Dict[
2930
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2931
+ ] = {}
2932
+ _body_params: Optional[bytes] = None
2933
+
2934
+ # process the path parameters
2935
+ if organization_id is not None:
2936
+ _path_params['organization_id'] = organization_id
2937
+ if team_id is not None:
2938
+ _path_params['team_id'] = team_id
2939
+ # process the query parameters
2940
+ # process the header parameters
2941
+ # process the form parameters
2942
+ # process the body parameter
2943
+
2944
+
2945
+ # set the HTTP header `Accept`
2946
+ if 'Accept' not in _header_params:
2947
+ _header_params['Accept'] = self.api_client.select_header_accept(
2948
+ [
2949
+ 'application/json'
2950
+ ]
2951
+ )
2952
+
2953
+
2954
+ # authentication setting
2955
+ _auth_settings: List[str] = [
2956
+ 'QAnswer-Api-Key',
2957
+ 'Bearer token'
2958
+ ]
2959
+
2960
+ return self.api_client.param_serialize(
2961
+ method='GET',
2962
+ resource_path='/api/team/{organization_id}/{team_id}/admin',
2963
+ path_params=_path_params,
2964
+ query_params=_query_params,
2965
+ header_params=_header_params,
2966
+ body=_body_params,
2967
+ post_params=_form_params,
2968
+ files=_files,
2969
+ auth_settings=_auth_settings,
2970
+ collection_formats=_collection_formats,
2971
+ _host=_host,
2972
+ _request_auth=_request_auth
2973
+ )
2974
+
2975
+
2976
+
2977
+
2978
+ @validate_call
2979
+ def list_users_of_team(
2980
+ self,
2981
+ organization_id: StrictInt,
2982
+ team_id: StrictInt,
2983
+ _request_timeout: Union[
2984
+ None,
2985
+ Annotated[StrictFloat, Field(gt=0)],
2986
+ Tuple[
2987
+ Annotated[StrictFloat, Field(gt=0)],
2988
+ Annotated[StrictFloat, Field(gt=0)]
2989
+ ]
2990
+ ] = None,
2991
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2992
+ _content_type: Optional[StrictStr] = None,
2993
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2994
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2995
+ ) -> List[UserDto]:
2996
+ """Get all users of a team
2997
+
2998
+
2999
+ :param organization_id: (required)
3000
+ :type organization_id: int
3001
+ :param team_id: (required)
3002
+ :type team_id: int
3003
+ :param _request_timeout: timeout setting for this request. If one
3004
+ number provided, it will be total request
3005
+ timeout. It can also be a pair (tuple) of
3006
+ (connection, read) timeouts.
3007
+ :type _request_timeout: int, tuple(int, int), optional
3008
+ :param _request_auth: set to override the auth_settings for an a single
3009
+ request; this effectively ignores the
3010
+ authentication in the spec for a single request.
3011
+ :type _request_auth: dict, optional
3012
+ :param _content_type: force content-type for the request.
3013
+ :type _content_type: str, Optional
3014
+ :param _headers: set to override the headers for a single
3015
+ request; this effectively ignores the headers
3016
+ in the spec for a single request.
3017
+ :type _headers: dict, optional
3018
+ :param _host_index: set to override the host_index for a single
3019
+ request; this effectively ignores the host_index
3020
+ in the spec for a single request.
3021
+ :type _host_index: int, optional
3022
+ :return: Returns the result object.
3023
+ """ # noqa: E501
3024
+
3025
+ _param = self._list_users_of_team_serialize(
3026
+ organization_id=organization_id,
3027
+ team_id=team_id,
3028
+ _request_auth=_request_auth,
3029
+ _content_type=_content_type,
3030
+ _headers=_headers,
3031
+ _host_index=_host_index
3032
+ )
3033
+
3034
+ _response_types_map: Dict[str, Optional[str]] = {
3035
+ '200': "List[UserDto]",
3036
+ '422': "HTTPValidationError",
3037
+ }
3038
+ response_data = self.api_client.call_api(
3039
+ *_param,
3040
+ _request_timeout=_request_timeout
3041
+ )
3042
+ response_data.read()
3043
+ return self.api_client.response_deserialize(
3044
+ response_data=response_data,
3045
+ response_types_map=_response_types_map,
3046
+ ).data
3047
+
3048
+
3049
+ @validate_call
3050
+ def list_users_of_team_with_http_info(
3051
+ self,
3052
+ organization_id: StrictInt,
3053
+ team_id: StrictInt,
3054
+ _request_timeout: Union[
3055
+ None,
3056
+ Annotated[StrictFloat, Field(gt=0)],
3057
+ Tuple[
3058
+ Annotated[StrictFloat, Field(gt=0)],
3059
+ Annotated[StrictFloat, Field(gt=0)]
3060
+ ]
3061
+ ] = None,
3062
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3063
+ _content_type: Optional[StrictStr] = None,
3064
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3065
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3066
+ ) -> ApiResponse[List[UserDto]]:
3067
+ """Get all users of a team
3068
+
3069
+
3070
+ :param organization_id: (required)
3071
+ :type organization_id: int
3072
+ :param team_id: (required)
3073
+ :type team_id: int
3074
+ :param _request_timeout: timeout setting for this request. If one
3075
+ number provided, it will be total request
3076
+ timeout. It can also be a pair (tuple) of
3077
+ (connection, read) timeouts.
3078
+ :type _request_timeout: int, tuple(int, int), optional
3079
+ :param _request_auth: set to override the auth_settings for an a single
3080
+ request; this effectively ignores the
3081
+ authentication in the spec for a single request.
3082
+ :type _request_auth: dict, optional
3083
+ :param _content_type: force content-type for the request.
3084
+ :type _content_type: str, Optional
3085
+ :param _headers: set to override the headers for a single
3086
+ request; this effectively ignores the headers
3087
+ in the spec for a single request.
3088
+ :type _headers: dict, optional
3089
+ :param _host_index: set to override the host_index for a single
3090
+ request; this effectively ignores the host_index
3091
+ in the spec for a single request.
3092
+ :type _host_index: int, optional
3093
+ :return: Returns the result object.
3094
+ """ # noqa: E501
3095
+
3096
+ _param = self._list_users_of_team_serialize(
3097
+ organization_id=organization_id,
3098
+ team_id=team_id,
3099
+ _request_auth=_request_auth,
3100
+ _content_type=_content_type,
3101
+ _headers=_headers,
3102
+ _host_index=_host_index
3103
+ )
3104
+
3105
+ _response_types_map: Dict[str, Optional[str]] = {
3106
+ '200': "List[UserDto]",
3107
+ '422': "HTTPValidationError",
3108
+ }
3109
+ response_data = self.api_client.call_api(
3110
+ *_param,
3111
+ _request_timeout=_request_timeout
3112
+ )
3113
+ response_data.read()
3114
+ return self.api_client.response_deserialize(
3115
+ response_data=response_data,
3116
+ response_types_map=_response_types_map,
3117
+ )
3118
+
3119
+
3120
+ @validate_call
3121
+ def list_users_of_team_without_preload_content(
3122
+ self,
3123
+ organization_id: StrictInt,
3124
+ team_id: StrictInt,
3125
+ _request_timeout: Union[
3126
+ None,
3127
+ Annotated[StrictFloat, Field(gt=0)],
3128
+ Tuple[
3129
+ Annotated[StrictFloat, Field(gt=0)],
3130
+ Annotated[StrictFloat, Field(gt=0)]
3131
+ ]
3132
+ ] = None,
3133
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3134
+ _content_type: Optional[StrictStr] = None,
3135
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3136
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3137
+ ) -> RESTResponseType:
3138
+ """Get all users of a team
3139
+
3140
+
3141
+ :param organization_id: (required)
3142
+ :type organization_id: int
3143
+ :param team_id: (required)
3144
+ :type team_id: int
3145
+ :param _request_timeout: timeout setting for this request. If one
3146
+ number provided, it will be total request
3147
+ timeout. It can also be a pair (tuple) of
3148
+ (connection, read) timeouts.
3149
+ :type _request_timeout: int, tuple(int, int), optional
3150
+ :param _request_auth: set to override the auth_settings for an a single
3151
+ request; this effectively ignores the
3152
+ authentication in the spec for a single request.
3153
+ :type _request_auth: dict, optional
3154
+ :param _content_type: force content-type for the request.
3155
+ :type _content_type: str, Optional
3156
+ :param _headers: set to override the headers for a single
3157
+ request; this effectively ignores the headers
3158
+ in the spec for a single request.
3159
+ :type _headers: dict, optional
3160
+ :param _host_index: set to override the host_index for a single
3161
+ request; this effectively ignores the host_index
3162
+ in the spec for a single request.
3163
+ :type _host_index: int, optional
3164
+ :return: Returns the result object.
3165
+ """ # noqa: E501
3166
+
3167
+ _param = self._list_users_of_team_serialize(
3168
+ organization_id=organization_id,
3169
+ team_id=team_id,
3170
+ _request_auth=_request_auth,
3171
+ _content_type=_content_type,
3172
+ _headers=_headers,
3173
+ _host_index=_host_index
3174
+ )
3175
+
3176
+ _response_types_map: Dict[str, Optional[str]] = {
3177
+ '200': "List[UserDto]",
3178
+ '422': "HTTPValidationError",
3179
+ }
3180
+ response_data = self.api_client.call_api(
3181
+ *_param,
3182
+ _request_timeout=_request_timeout
3183
+ )
3184
+ return response_data.response
3185
+
3186
+
3187
+ def _list_users_of_team_serialize(
3188
+ self,
3189
+ organization_id,
3190
+ team_id,
3191
+ _request_auth,
3192
+ _content_type,
3193
+ _headers,
3194
+ _host_index,
3195
+ ) -> RequestSerialized:
3196
+
3197
+ _host = None
3198
+
3199
+ _collection_formats: Dict[str, str] = {
3200
+ }
3201
+
3202
+ _path_params: Dict[str, str] = {}
3203
+ _query_params: List[Tuple[str, str]] = []
3204
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3205
+ _form_params: List[Tuple[str, str]] = []
3206
+ _files: Dict[
3207
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3208
+ ] = {}
3209
+ _body_params: Optional[bytes] = None
3210
+
3211
+ # process the path parameters
3212
+ if organization_id is not None:
3213
+ _path_params['organization_id'] = organization_id
3214
+ if team_id is not None:
3215
+ _path_params['team_id'] = team_id
3216
+ # process the query parameters
3217
+ # process the header parameters
3218
+ # process the form parameters
3219
+ # process the body parameter
3220
+
3221
+
3222
+ # set the HTTP header `Accept`
3223
+ if 'Accept' not in _header_params:
3224
+ _header_params['Accept'] = self.api_client.select_header_accept(
3225
+ [
3226
+ 'application/json'
3227
+ ]
3228
+ )
3229
+
3230
+
3231
+ # authentication setting
3232
+ _auth_settings: List[str] = [
3233
+ 'QAnswer-Api-Key',
3234
+ 'Bearer token'
3235
+ ]
3236
+
3237
+ return self.api_client.param_serialize(
3238
+ method='GET',
3239
+ resource_path='/api/team/{organization_id}/{team_id}/users',
3240
+ path_params=_path_params,
3241
+ query_params=_query_params,
3242
+ header_params=_header_params,
3243
+ body=_body_params,
3244
+ post_params=_form_params,
3245
+ files=_files,
3246
+ auth_settings=_auth_settings,
3247
+ collection_formats=_collection_formats,
3248
+ _host=_host,
3249
+ _request_auth=_request_auth
3250
+ )
3251
+
3252
+
3253
+
3254
+
3255
+ @validate_call
3256
+ def reset_team_logo(
3257
+ self,
3258
+ team_id: StrictInt,
3259
+ _request_timeout: Union[
3260
+ None,
3261
+ Annotated[StrictFloat, Field(gt=0)],
3262
+ Tuple[
3263
+ Annotated[StrictFloat, Field(gt=0)],
3264
+ Annotated[StrictFloat, Field(gt=0)]
3265
+ ]
3266
+ ] = None,
3267
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3268
+ _content_type: Optional[StrictStr] = None,
3269
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3270
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3271
+ ) -> object:
3272
+ """Resets the logo of a team
3273
+
3274
+
3275
+ :param team_id: (required)
3276
+ :type team_id: int
3277
+ :param _request_timeout: timeout setting for this request. If one
3278
+ number provided, it will be total request
3279
+ timeout. It can also be a pair (tuple) of
3280
+ (connection, read) timeouts.
3281
+ :type _request_timeout: int, tuple(int, int), optional
3282
+ :param _request_auth: set to override the auth_settings for an a single
3283
+ request; this effectively ignores the
3284
+ authentication in the spec for a single request.
3285
+ :type _request_auth: dict, optional
3286
+ :param _content_type: force content-type for the request.
3287
+ :type _content_type: str, Optional
3288
+ :param _headers: set to override the headers for a single
3289
+ request; this effectively ignores the headers
3290
+ in the spec for a single request.
3291
+ :type _headers: dict, optional
3292
+ :param _host_index: set to override the host_index for a single
3293
+ request; this effectively ignores the host_index
3294
+ in the spec for a single request.
3295
+ :type _host_index: int, optional
3296
+ :return: Returns the result object.
3297
+ """ # noqa: E501
3298
+
3299
+ _param = self._reset_team_logo_serialize(
3300
+ team_id=team_id,
3301
+ _request_auth=_request_auth,
3302
+ _content_type=_content_type,
3303
+ _headers=_headers,
3304
+ _host_index=_host_index
3305
+ )
3306
+
3307
+ _response_types_map: Dict[str, Optional[str]] = {
3308
+ '200': "object",
3309
+ '422': "HTTPValidationError",
3310
+ }
3311
+ response_data = self.api_client.call_api(
3312
+ *_param,
3313
+ _request_timeout=_request_timeout
3314
+ )
3315
+ response_data.read()
3316
+ return self.api_client.response_deserialize(
3317
+ response_data=response_data,
3318
+ response_types_map=_response_types_map,
3319
+ ).data
3320
+
3321
+
3322
+ @validate_call
3323
+ def reset_team_logo_with_http_info(
3324
+ self,
3325
+ team_id: StrictInt,
3326
+ _request_timeout: Union[
3327
+ None,
3328
+ Annotated[StrictFloat, Field(gt=0)],
3329
+ Tuple[
3330
+ Annotated[StrictFloat, Field(gt=0)],
3331
+ Annotated[StrictFloat, Field(gt=0)]
3332
+ ]
3333
+ ] = None,
3334
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3335
+ _content_type: Optional[StrictStr] = None,
3336
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3337
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3338
+ ) -> ApiResponse[object]:
3339
+ """Resets the logo of a team
3340
+
3341
+
3342
+ :param team_id: (required)
3343
+ :type team_id: int
3344
+ :param _request_timeout: timeout setting for this request. If one
3345
+ number provided, it will be total request
3346
+ timeout. It can also be a pair (tuple) of
3347
+ (connection, read) timeouts.
3348
+ :type _request_timeout: int, tuple(int, int), optional
3349
+ :param _request_auth: set to override the auth_settings for an a single
3350
+ request; this effectively ignores the
3351
+ authentication in the spec for a single request.
3352
+ :type _request_auth: dict, optional
3353
+ :param _content_type: force content-type for the request.
3354
+ :type _content_type: str, Optional
3355
+ :param _headers: set to override the headers for a single
3356
+ request; this effectively ignores the headers
3357
+ in the spec for a single request.
3358
+ :type _headers: dict, optional
3359
+ :param _host_index: set to override the host_index for a single
3360
+ request; this effectively ignores the host_index
3361
+ in the spec for a single request.
3362
+ :type _host_index: int, optional
3363
+ :return: Returns the result object.
3364
+ """ # noqa: E501
3365
+
3366
+ _param = self._reset_team_logo_serialize(
3367
+ team_id=team_id,
3368
+ _request_auth=_request_auth,
3369
+ _content_type=_content_type,
3370
+ _headers=_headers,
3371
+ _host_index=_host_index
3372
+ )
3373
+
3374
+ _response_types_map: Dict[str, Optional[str]] = {
3375
+ '200': "object",
3376
+ '422': "HTTPValidationError",
3377
+ }
3378
+ response_data = self.api_client.call_api(
3379
+ *_param,
3380
+ _request_timeout=_request_timeout
3381
+ )
3382
+ response_data.read()
3383
+ return self.api_client.response_deserialize(
3384
+ response_data=response_data,
3385
+ response_types_map=_response_types_map,
3386
+ )
3387
+
3388
+
3389
+ @validate_call
3390
+ def reset_team_logo_without_preload_content(
3391
+ self,
3392
+ team_id: StrictInt,
3393
+ _request_timeout: Union[
3394
+ None,
3395
+ Annotated[StrictFloat, Field(gt=0)],
3396
+ Tuple[
3397
+ Annotated[StrictFloat, Field(gt=0)],
3398
+ Annotated[StrictFloat, Field(gt=0)]
3399
+ ]
3400
+ ] = None,
3401
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3402
+ _content_type: Optional[StrictStr] = None,
3403
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3404
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3405
+ ) -> RESTResponseType:
3406
+ """Resets the logo of a team
3407
+
3408
+
3409
+ :param team_id: (required)
3410
+ :type team_id: int
3411
+ :param _request_timeout: timeout setting for this request. If one
3412
+ number provided, it will be total request
3413
+ timeout. It can also be a pair (tuple) of
3414
+ (connection, read) timeouts.
3415
+ :type _request_timeout: int, tuple(int, int), optional
3416
+ :param _request_auth: set to override the auth_settings for an a single
3417
+ request; this effectively ignores the
3418
+ authentication in the spec for a single request.
3419
+ :type _request_auth: dict, optional
3420
+ :param _content_type: force content-type for the request.
3421
+ :type _content_type: str, Optional
3422
+ :param _headers: set to override the headers for a single
3423
+ request; this effectively ignores the headers
3424
+ in the spec for a single request.
3425
+ :type _headers: dict, optional
3426
+ :param _host_index: set to override the host_index for a single
3427
+ request; this effectively ignores the host_index
3428
+ in the spec for a single request.
3429
+ :type _host_index: int, optional
3430
+ :return: Returns the result object.
3431
+ """ # noqa: E501
3432
+
3433
+ _param = self._reset_team_logo_serialize(
3434
+ team_id=team_id,
3435
+ _request_auth=_request_auth,
3436
+ _content_type=_content_type,
3437
+ _headers=_headers,
3438
+ _host_index=_host_index
3439
+ )
3440
+
3441
+ _response_types_map: Dict[str, Optional[str]] = {
3442
+ '200': "object",
3443
+ '422': "HTTPValidationError",
3444
+ }
3445
+ response_data = self.api_client.call_api(
3446
+ *_param,
3447
+ _request_timeout=_request_timeout
3448
+ )
3449
+ return response_data.response
3450
+
3451
+
3452
+ def _reset_team_logo_serialize(
3453
+ self,
3454
+ team_id,
3455
+ _request_auth,
3456
+ _content_type,
3457
+ _headers,
3458
+ _host_index,
3459
+ ) -> RequestSerialized:
3460
+
3461
+ _host = None
3462
+
3463
+ _collection_formats: Dict[str, str] = {
3464
+ }
3465
+
3466
+ _path_params: Dict[str, str] = {}
3467
+ _query_params: List[Tuple[str, str]] = []
3468
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3469
+ _form_params: List[Tuple[str, str]] = []
3470
+ _files: Dict[
3471
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3472
+ ] = {}
3473
+ _body_params: Optional[bytes] = None
3474
+
3475
+ # process the path parameters
3476
+ if team_id is not None:
3477
+ _path_params['team_id'] = team_id
3478
+ # process the query parameters
3479
+ # process the header parameters
3480
+ # process the form parameters
3481
+ # process the body parameter
3482
+
3483
+
3484
+ # set the HTTP header `Accept`
3485
+ if 'Accept' not in _header_params:
3486
+ _header_params['Accept'] = self.api_client.select_header_accept(
3487
+ [
3488
+ 'application/json'
3489
+ ]
3490
+ )
3491
+
3492
+
3493
+ # authentication setting
3494
+ _auth_settings: List[str] = [
3495
+ 'QAnswer-Api-Key',
3496
+ 'Bearer token'
3497
+ ]
3498
+
3499
+ return self.api_client.param_serialize(
3500
+ method='POST',
3501
+ resource_path='/api/team/{team_id}/logo/reset',
3502
+ path_params=_path_params,
3503
+ query_params=_query_params,
3504
+ header_params=_header_params,
3505
+ body=_body_params,
3506
+ post_params=_form_params,
3507
+ files=_files,
3508
+ auth_settings=_auth_settings,
3509
+ collection_formats=_collection_formats,
3510
+ _host=_host,
3511
+ _request_auth=_request_auth
3512
+ )
3513
+
3514
+
3515
+
3516
+
3517
+ @validate_call
3518
+ def search_teams(
3519
+ self,
3520
+ search: Optional[StrictStr] = None,
3521
+ organization_id: Optional[StrictInt] = None,
3522
+ team_id: Optional[StrictInt] = None,
3523
+ user_id: Optional[StrictInt] = None,
3524
+ page: Optional[StrictInt] = None,
3525
+ size: Optional[StrictInt] = None,
3526
+ sort_by: Optional[StrictStr] = None,
3527
+ sort_dir: Optional[StrictStr] = None,
3528
+ _request_timeout: Union[
3529
+ None,
3530
+ Annotated[StrictFloat, Field(gt=0)],
3531
+ Tuple[
3532
+ Annotated[StrictFloat, Field(gt=0)],
3533
+ Annotated[StrictFloat, Field(gt=0)]
3534
+ ]
3535
+ ] = None,
3536
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3537
+ _content_type: Optional[StrictStr] = None,
3538
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3539
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3540
+ ) -> TeamListDto:
3541
+ """Search teams
3542
+
3543
+
3544
+ :param search:
3545
+ :type search: str
3546
+ :param organization_id:
3547
+ :type organization_id: int
3548
+ :param team_id:
3549
+ :type team_id: int
3550
+ :param user_id:
3551
+ :type user_id: int
3552
+ :param page:
3553
+ :type page: int
3554
+ :param size:
3555
+ :type size: int
3556
+ :param sort_by:
3557
+ :type sort_by: str
3558
+ :param sort_dir:
3559
+ :type sort_dir: str
3560
+ :param _request_timeout: timeout setting for this request. If one
3561
+ number provided, it will be total request
3562
+ timeout. It can also be a pair (tuple) of
3563
+ (connection, read) timeouts.
3564
+ :type _request_timeout: int, tuple(int, int), optional
3565
+ :param _request_auth: set to override the auth_settings for an a single
3566
+ request; this effectively ignores the
3567
+ authentication in the spec for a single request.
3568
+ :type _request_auth: dict, optional
3569
+ :param _content_type: force content-type for the request.
3570
+ :type _content_type: str, Optional
3571
+ :param _headers: set to override the headers for a single
3572
+ request; this effectively ignores the headers
3573
+ in the spec for a single request.
3574
+ :type _headers: dict, optional
3575
+ :param _host_index: set to override the host_index for a single
3576
+ request; this effectively ignores the host_index
3577
+ in the spec for a single request.
3578
+ :type _host_index: int, optional
3579
+ :return: Returns the result object.
3580
+ """ # noqa: E501
3581
+
3582
+ _param = self._search_teams_serialize(
3583
+ search=search,
3584
+ organization_id=organization_id,
3585
+ team_id=team_id,
3586
+ user_id=user_id,
3587
+ page=page,
3588
+ size=size,
3589
+ sort_by=sort_by,
3590
+ sort_dir=sort_dir,
3591
+ _request_auth=_request_auth,
3592
+ _content_type=_content_type,
3593
+ _headers=_headers,
3594
+ _host_index=_host_index
3595
+ )
3596
+
3597
+ _response_types_map: Dict[str, Optional[str]] = {
3598
+ '200': "TeamListDto",
3599
+ '422': "HTTPValidationError",
3600
+ }
3601
+ response_data = self.api_client.call_api(
3602
+ *_param,
3603
+ _request_timeout=_request_timeout
3604
+ )
3605
+ response_data.read()
3606
+ return self.api_client.response_deserialize(
3607
+ response_data=response_data,
3608
+ response_types_map=_response_types_map,
3609
+ ).data
3610
+
3611
+
3612
+ @validate_call
3613
+ def search_teams_with_http_info(
3614
+ self,
3615
+ search: Optional[StrictStr] = None,
3616
+ organization_id: Optional[StrictInt] = None,
3617
+ team_id: Optional[StrictInt] = None,
3618
+ user_id: Optional[StrictInt] = None,
3619
+ page: Optional[StrictInt] = None,
3620
+ size: Optional[StrictInt] = None,
3621
+ sort_by: Optional[StrictStr] = None,
3622
+ sort_dir: Optional[StrictStr] = None,
3623
+ _request_timeout: Union[
3624
+ None,
3625
+ Annotated[StrictFloat, Field(gt=0)],
3626
+ Tuple[
3627
+ Annotated[StrictFloat, Field(gt=0)],
3628
+ Annotated[StrictFloat, Field(gt=0)]
3629
+ ]
3630
+ ] = None,
3631
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3632
+ _content_type: Optional[StrictStr] = None,
3633
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3634
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3635
+ ) -> ApiResponse[TeamListDto]:
3636
+ """Search teams
3637
+
3638
+
3639
+ :param search:
3640
+ :type search: str
3641
+ :param organization_id:
3642
+ :type organization_id: int
3643
+ :param team_id:
3644
+ :type team_id: int
3645
+ :param user_id:
3646
+ :type user_id: int
3647
+ :param page:
3648
+ :type page: int
3649
+ :param size:
3650
+ :type size: int
3651
+ :param sort_by:
3652
+ :type sort_by: str
3653
+ :param sort_dir:
3654
+ :type sort_dir: str
3655
+ :param _request_timeout: timeout setting for this request. If one
3656
+ number provided, it will be total request
3657
+ timeout. It can also be a pair (tuple) of
3658
+ (connection, read) timeouts.
3659
+ :type _request_timeout: int, tuple(int, int), optional
3660
+ :param _request_auth: set to override the auth_settings for an a single
3661
+ request; this effectively ignores the
3662
+ authentication in the spec for a single request.
3663
+ :type _request_auth: dict, optional
3664
+ :param _content_type: force content-type for the request.
3665
+ :type _content_type: str, Optional
3666
+ :param _headers: set to override the headers for a single
3667
+ request; this effectively ignores the headers
3668
+ in the spec for a single request.
3669
+ :type _headers: dict, optional
3670
+ :param _host_index: set to override the host_index for a single
3671
+ request; this effectively ignores the host_index
3672
+ in the spec for a single request.
3673
+ :type _host_index: int, optional
3674
+ :return: Returns the result object.
3675
+ """ # noqa: E501
3676
+
3677
+ _param = self._search_teams_serialize(
3678
+ search=search,
3679
+ organization_id=organization_id,
3680
+ team_id=team_id,
3681
+ user_id=user_id,
3682
+ page=page,
3683
+ size=size,
3684
+ sort_by=sort_by,
3685
+ sort_dir=sort_dir,
3686
+ _request_auth=_request_auth,
3687
+ _content_type=_content_type,
3688
+ _headers=_headers,
3689
+ _host_index=_host_index
3690
+ )
3691
+
3692
+ _response_types_map: Dict[str, Optional[str]] = {
3693
+ '200': "TeamListDto",
3694
+ '422': "HTTPValidationError",
3695
+ }
3696
+ response_data = self.api_client.call_api(
3697
+ *_param,
3698
+ _request_timeout=_request_timeout
3699
+ )
3700
+ response_data.read()
3701
+ return self.api_client.response_deserialize(
3702
+ response_data=response_data,
3703
+ response_types_map=_response_types_map,
3704
+ )
3705
+
3706
+
3707
+ @validate_call
3708
+ def search_teams_without_preload_content(
3709
+ self,
3710
+ search: Optional[StrictStr] = None,
3711
+ organization_id: Optional[StrictInt] = None,
3712
+ team_id: Optional[StrictInt] = None,
3713
+ user_id: Optional[StrictInt] = None,
3714
+ page: Optional[StrictInt] = None,
3715
+ size: Optional[StrictInt] = None,
3716
+ sort_by: Optional[StrictStr] = None,
3717
+ sort_dir: Optional[StrictStr] = None,
3718
+ _request_timeout: Union[
3719
+ None,
3720
+ Annotated[StrictFloat, Field(gt=0)],
3721
+ Tuple[
3722
+ Annotated[StrictFloat, Field(gt=0)],
3723
+ Annotated[StrictFloat, Field(gt=0)]
3724
+ ]
3725
+ ] = None,
3726
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3727
+ _content_type: Optional[StrictStr] = None,
3728
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3729
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3730
+ ) -> RESTResponseType:
3731
+ """Search teams
3732
+
3733
+
3734
+ :param search:
3735
+ :type search: str
3736
+ :param organization_id:
3737
+ :type organization_id: int
3738
+ :param team_id:
3739
+ :type team_id: int
3740
+ :param user_id:
3741
+ :type user_id: int
3742
+ :param page:
3743
+ :type page: int
3744
+ :param size:
3745
+ :type size: int
3746
+ :param sort_by:
3747
+ :type sort_by: str
3748
+ :param sort_dir:
3749
+ :type sort_dir: str
3750
+ :param _request_timeout: timeout setting for this request. If one
3751
+ number provided, it will be total request
3752
+ timeout. It can also be a pair (tuple) of
3753
+ (connection, read) timeouts.
3754
+ :type _request_timeout: int, tuple(int, int), optional
3755
+ :param _request_auth: set to override the auth_settings for an a single
3756
+ request; this effectively ignores the
3757
+ authentication in the spec for a single request.
3758
+ :type _request_auth: dict, optional
3759
+ :param _content_type: force content-type for the request.
3760
+ :type _content_type: str, Optional
3761
+ :param _headers: set to override the headers for a single
3762
+ request; this effectively ignores the headers
3763
+ in the spec for a single request.
3764
+ :type _headers: dict, optional
3765
+ :param _host_index: set to override the host_index for a single
3766
+ request; this effectively ignores the host_index
3767
+ in the spec for a single request.
3768
+ :type _host_index: int, optional
3769
+ :return: Returns the result object.
3770
+ """ # noqa: E501
3771
+
3772
+ _param = self._search_teams_serialize(
3773
+ search=search,
3774
+ organization_id=organization_id,
3775
+ team_id=team_id,
3776
+ user_id=user_id,
3777
+ page=page,
3778
+ size=size,
3779
+ sort_by=sort_by,
3780
+ sort_dir=sort_dir,
3781
+ _request_auth=_request_auth,
3782
+ _content_type=_content_type,
3783
+ _headers=_headers,
3784
+ _host_index=_host_index
3785
+ )
3786
+
3787
+ _response_types_map: Dict[str, Optional[str]] = {
3788
+ '200': "TeamListDto",
3789
+ '422': "HTTPValidationError",
3790
+ }
3791
+ response_data = self.api_client.call_api(
3792
+ *_param,
3793
+ _request_timeout=_request_timeout
3794
+ )
3795
+ return response_data.response
3796
+
3797
+
3798
+ def _search_teams_serialize(
3799
+ self,
3800
+ search,
3801
+ organization_id,
3802
+ team_id,
3803
+ user_id,
3804
+ page,
3805
+ size,
3806
+ sort_by,
3807
+ sort_dir,
3808
+ _request_auth,
3809
+ _content_type,
3810
+ _headers,
3811
+ _host_index,
3812
+ ) -> RequestSerialized:
3813
+
3814
+ _host = None
3815
+
3816
+ _collection_formats: Dict[str, str] = {
3817
+ }
3818
+
3819
+ _path_params: Dict[str, str] = {}
3820
+ _query_params: List[Tuple[str, str]] = []
3821
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3822
+ _form_params: List[Tuple[str, str]] = []
3823
+ _files: Dict[
3824
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3825
+ ] = {}
3826
+ _body_params: Optional[bytes] = None
3827
+
3828
+ # process the path parameters
3829
+ # process the query parameters
3830
+ if search is not None:
3831
+
3832
+ _query_params.append(('search', search))
3833
+
3834
+ if organization_id is not None:
3835
+
3836
+ _query_params.append(('organizationId', organization_id))
3837
+
3838
+ if team_id is not None:
3839
+
3840
+ _query_params.append(('teamId', team_id))
3841
+
3842
+ if user_id is not None:
3843
+
3844
+ _query_params.append(('userId', user_id))
3845
+
3846
+ if page is not None:
3847
+
3848
+ _query_params.append(('page', page))
3849
+
3850
+ if size is not None:
3851
+
3852
+ _query_params.append(('size', size))
3853
+
3854
+ if sort_by is not None:
3855
+
3856
+ _query_params.append(('sortBy', sort_by))
3857
+
3858
+ if sort_dir is not None:
3859
+
3860
+ _query_params.append(('sortDir', sort_dir))
3861
+
3862
+ # process the header parameters
3863
+ # process the form parameters
3864
+ # process the body parameter
3865
+
3866
+
3867
+ # set the HTTP header `Accept`
3868
+ if 'Accept' not in _header_params:
3869
+ _header_params['Accept'] = self.api_client.select_header_accept(
3870
+ [
3871
+ 'application/json'
3872
+ ]
3873
+ )
3874
+
3875
+
3876
+ # authentication setting
3877
+ _auth_settings: List[str] = [
3878
+ 'QAnswer-Api-Key',
3879
+ 'Bearer token'
3880
+ ]
3881
+
3882
+ return self.api_client.param_serialize(
3883
+ method='GET',
3884
+ resource_path='/api/team/search',
3885
+ path_params=_path_params,
3886
+ query_params=_query_params,
3887
+ header_params=_header_params,
3888
+ body=_body_params,
3889
+ post_params=_form_params,
3890
+ files=_files,
3891
+ auth_settings=_auth_settings,
3892
+ collection_formats=_collection_formats,
3893
+ _host=_host,
3894
+ _request_auth=_request_auth
3895
+ )
3896
+
3897
+
3898
+
3899
+
3900
+ @validate_call
3901
+ def set_team_logo(
3902
+ self,
3903
+ team_id: StrictInt,
3904
+ file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
3905
+ _request_timeout: Union[
3906
+ None,
3907
+ Annotated[StrictFloat, Field(gt=0)],
3908
+ Tuple[
3909
+ Annotated[StrictFloat, Field(gt=0)],
3910
+ Annotated[StrictFloat, Field(gt=0)]
3911
+ ]
3912
+ ] = None,
3913
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3914
+ _content_type: Optional[StrictStr] = None,
3915
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3916
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3917
+ ) -> object:
3918
+ """Set the logo of a team
3919
+
3920
+
3921
+ :param team_id: (required)
3922
+ :type team_id: int
3923
+ :param file: (required)
3924
+ :type file: bytearray
3925
+ :param _request_timeout: timeout setting for this request. If one
3926
+ number provided, it will be total request
3927
+ timeout. It can also be a pair (tuple) of
3928
+ (connection, read) timeouts.
3929
+ :type _request_timeout: int, tuple(int, int), optional
3930
+ :param _request_auth: set to override the auth_settings for an a single
3931
+ request; this effectively ignores the
3932
+ authentication in the spec for a single request.
3933
+ :type _request_auth: dict, optional
3934
+ :param _content_type: force content-type for the request.
3935
+ :type _content_type: str, Optional
3936
+ :param _headers: set to override the headers for a single
3937
+ request; this effectively ignores the headers
3938
+ in the spec for a single request.
3939
+ :type _headers: dict, optional
3940
+ :param _host_index: set to override the host_index for a single
3941
+ request; this effectively ignores the host_index
3942
+ in the spec for a single request.
3943
+ :type _host_index: int, optional
3944
+ :return: Returns the result object.
3945
+ """ # noqa: E501
3946
+
3947
+ _param = self._set_team_logo_serialize(
3948
+ team_id=team_id,
3949
+ file=file,
3950
+ _request_auth=_request_auth,
3951
+ _content_type=_content_type,
3952
+ _headers=_headers,
3953
+ _host_index=_host_index
3954
+ )
3955
+
3956
+ _response_types_map: Dict[str, Optional[str]] = {
3957
+ '200': "object",
3958
+ '422': "HTTPValidationError",
3959
+ }
3960
+ response_data = self.api_client.call_api(
3961
+ *_param,
3962
+ _request_timeout=_request_timeout
3963
+ )
3964
+ response_data.read()
3965
+ return self.api_client.response_deserialize(
3966
+ response_data=response_data,
3967
+ response_types_map=_response_types_map,
3968
+ ).data
3969
+
3970
+
3971
+ @validate_call
3972
+ def set_team_logo_with_http_info(
3973
+ self,
3974
+ team_id: StrictInt,
3975
+ file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
3976
+ _request_timeout: Union[
3977
+ None,
3978
+ Annotated[StrictFloat, Field(gt=0)],
3979
+ Tuple[
3980
+ Annotated[StrictFloat, Field(gt=0)],
3981
+ Annotated[StrictFloat, Field(gt=0)]
3982
+ ]
3983
+ ] = None,
3984
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3985
+ _content_type: Optional[StrictStr] = None,
3986
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3987
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3988
+ ) -> ApiResponse[object]:
3989
+ """Set the logo of a team
3990
+
3991
+
3992
+ :param team_id: (required)
3993
+ :type team_id: int
3994
+ :param file: (required)
3995
+ :type file: bytearray
3996
+ :param _request_timeout: timeout setting for this request. If one
3997
+ number provided, it will be total request
3998
+ timeout. It can also be a pair (tuple) of
3999
+ (connection, read) timeouts.
4000
+ :type _request_timeout: int, tuple(int, int), optional
4001
+ :param _request_auth: set to override the auth_settings for an a single
4002
+ request; this effectively ignores the
4003
+ authentication in the spec for a single request.
4004
+ :type _request_auth: dict, optional
4005
+ :param _content_type: force content-type for the request.
4006
+ :type _content_type: str, Optional
4007
+ :param _headers: set to override the headers for a single
4008
+ request; this effectively ignores the headers
4009
+ in the spec for a single request.
4010
+ :type _headers: dict, optional
4011
+ :param _host_index: set to override the host_index for a single
4012
+ request; this effectively ignores the host_index
4013
+ in the spec for a single request.
4014
+ :type _host_index: int, optional
4015
+ :return: Returns the result object.
4016
+ """ # noqa: E501
4017
+
4018
+ _param = self._set_team_logo_serialize(
4019
+ team_id=team_id,
4020
+ file=file,
4021
+ _request_auth=_request_auth,
4022
+ _content_type=_content_type,
4023
+ _headers=_headers,
4024
+ _host_index=_host_index
4025
+ )
4026
+
4027
+ _response_types_map: Dict[str, Optional[str]] = {
4028
+ '200': "object",
4029
+ '422': "HTTPValidationError",
4030
+ }
4031
+ response_data = self.api_client.call_api(
4032
+ *_param,
4033
+ _request_timeout=_request_timeout
4034
+ )
4035
+ response_data.read()
4036
+ return self.api_client.response_deserialize(
4037
+ response_data=response_data,
4038
+ response_types_map=_response_types_map,
4039
+ )
4040
+
4041
+
4042
+ @validate_call
4043
+ def set_team_logo_without_preload_content(
4044
+ self,
4045
+ team_id: StrictInt,
4046
+ file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
4047
+ _request_timeout: Union[
4048
+ None,
4049
+ Annotated[StrictFloat, Field(gt=0)],
4050
+ Tuple[
4051
+ Annotated[StrictFloat, Field(gt=0)],
4052
+ Annotated[StrictFloat, Field(gt=0)]
4053
+ ]
4054
+ ] = None,
4055
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
4056
+ _content_type: Optional[StrictStr] = None,
4057
+ _headers: Optional[Dict[StrictStr, Any]] = None,
4058
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4059
+ ) -> RESTResponseType:
4060
+ """Set the logo of a team
4061
+
4062
+
4063
+ :param team_id: (required)
4064
+ :type team_id: int
4065
+ :param file: (required)
4066
+ :type file: bytearray
4067
+ :param _request_timeout: timeout setting for this request. If one
4068
+ number provided, it will be total request
4069
+ timeout. It can also be a pair (tuple) of
4070
+ (connection, read) timeouts.
4071
+ :type _request_timeout: int, tuple(int, int), optional
4072
+ :param _request_auth: set to override the auth_settings for an a single
4073
+ request; this effectively ignores the
4074
+ authentication in the spec for a single request.
4075
+ :type _request_auth: dict, optional
4076
+ :param _content_type: force content-type for the request.
4077
+ :type _content_type: str, Optional
4078
+ :param _headers: set to override the headers for a single
4079
+ request; this effectively ignores the headers
4080
+ in the spec for a single request.
4081
+ :type _headers: dict, optional
4082
+ :param _host_index: set to override the host_index for a single
4083
+ request; this effectively ignores the host_index
4084
+ in the spec for a single request.
4085
+ :type _host_index: int, optional
4086
+ :return: Returns the result object.
4087
+ """ # noqa: E501
4088
+
4089
+ _param = self._set_team_logo_serialize(
4090
+ team_id=team_id,
4091
+ file=file,
4092
+ _request_auth=_request_auth,
4093
+ _content_type=_content_type,
4094
+ _headers=_headers,
4095
+ _host_index=_host_index
4096
+ )
4097
+
4098
+ _response_types_map: Dict[str, Optional[str]] = {
4099
+ '200': "object",
4100
+ '422': "HTTPValidationError",
4101
+ }
4102
+ response_data = self.api_client.call_api(
4103
+ *_param,
4104
+ _request_timeout=_request_timeout
4105
+ )
4106
+ return response_data.response
4107
+
4108
+
4109
+ def _set_team_logo_serialize(
4110
+ self,
4111
+ team_id,
4112
+ file,
4113
+ _request_auth,
4114
+ _content_type,
4115
+ _headers,
4116
+ _host_index,
4117
+ ) -> RequestSerialized:
4118
+
4119
+ _host = None
4120
+
4121
+ _collection_formats: Dict[str, str] = {
4122
+ }
4123
+
4124
+ _path_params: Dict[str, str] = {}
4125
+ _query_params: List[Tuple[str, str]] = []
4126
+ _header_params: Dict[str, Optional[str]] = _headers or {}
4127
+ _form_params: List[Tuple[str, str]] = []
4128
+ _files: Dict[
4129
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
4130
+ ] = {}
4131
+ _body_params: Optional[bytes] = None
4132
+
4133
+ # process the path parameters
4134
+ if team_id is not None:
4135
+ _path_params['team_id'] = team_id
4136
+ # process the query parameters
4137
+ # process the header parameters
4138
+ # process the form parameters
4139
+ if file is not None:
4140
+ _files['file'] = file
4141
+ # process the body parameter
4142
+
4143
+
4144
+ # set the HTTP header `Accept`
4145
+ if 'Accept' not in _header_params:
4146
+ _header_params['Accept'] = self.api_client.select_header_accept(
4147
+ [
4148
+ 'application/json'
4149
+ ]
4150
+ )
4151
+
4152
+ # set the HTTP header `Content-Type`
4153
+ if _content_type:
4154
+ _header_params['Content-Type'] = _content_type
4155
+ else:
4156
+ _default_content_type = (
4157
+ self.api_client.select_header_content_type(
4158
+ [
4159
+ 'multipart/form-data'
4160
+ ]
4161
+ )
4162
+ )
4163
+ if _default_content_type is not None:
4164
+ _header_params['Content-Type'] = _default_content_type
4165
+
4166
+ # authentication setting
4167
+ _auth_settings: List[str] = [
4168
+ 'QAnswer-Api-Key',
4169
+ 'Bearer token'
4170
+ ]
4171
+
4172
+ return self.api_client.param_serialize(
4173
+ method='POST',
4174
+ resource_path='/api/team/{team_id}/logo',
4175
+ path_params=_path_params,
4176
+ query_params=_query_params,
4177
+ header_params=_header_params,
4178
+ body=_body_params,
4179
+ post_params=_form_params,
4180
+ files=_files,
4181
+ auth_settings=_auth_settings,
4182
+ collection_formats=_collection_formats,
4183
+ _host=_host,
4184
+ _request_auth=_request_auth
4185
+ )
4186
+
4187
+
4188
+
4189
+
4190
+ @validate_call
4191
+ def update_team(
4192
+ self,
4193
+ organization_id: StrictInt,
4194
+ team_id: StrictInt,
4195
+ team_creation_dto: TeamCreationDto,
4196
+ _request_timeout: Union[
4197
+ None,
4198
+ Annotated[StrictFloat, Field(gt=0)],
4199
+ Tuple[
4200
+ Annotated[StrictFloat, Field(gt=0)],
4201
+ Annotated[StrictFloat, Field(gt=0)]
4202
+ ]
4203
+ ] = None,
4204
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
4205
+ _content_type: Optional[StrictStr] = None,
4206
+ _headers: Optional[Dict[StrictStr, Any]] = None,
4207
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4208
+ ) -> TeamDto:
4209
+ """Update a team
4210
+
4211
+
4212
+ :param organization_id: (required)
4213
+ :type organization_id: int
4214
+ :param team_id: (required)
4215
+ :type team_id: int
4216
+ :param team_creation_dto: (required)
4217
+ :type team_creation_dto: TeamCreationDto
4218
+ :param _request_timeout: timeout setting for this request. If one
4219
+ number provided, it will be total request
4220
+ timeout. It can also be a pair (tuple) of
4221
+ (connection, read) timeouts.
4222
+ :type _request_timeout: int, tuple(int, int), optional
4223
+ :param _request_auth: set to override the auth_settings for an a single
4224
+ request; this effectively ignores the
4225
+ authentication in the spec for a single request.
4226
+ :type _request_auth: dict, optional
4227
+ :param _content_type: force content-type for the request.
4228
+ :type _content_type: str, Optional
4229
+ :param _headers: set to override the headers for a single
4230
+ request; this effectively ignores the headers
4231
+ in the spec for a single request.
4232
+ :type _headers: dict, optional
4233
+ :param _host_index: set to override the host_index for a single
4234
+ request; this effectively ignores the host_index
4235
+ in the spec for a single request.
4236
+ :type _host_index: int, optional
4237
+ :return: Returns the result object.
4238
+ """ # noqa: E501
4239
+
4240
+ _param = self._update_team_serialize(
4241
+ organization_id=organization_id,
4242
+ team_id=team_id,
4243
+ team_creation_dto=team_creation_dto,
4244
+ _request_auth=_request_auth,
4245
+ _content_type=_content_type,
4246
+ _headers=_headers,
4247
+ _host_index=_host_index
4248
+ )
4249
+
4250
+ _response_types_map: Dict[str, Optional[str]] = {
4251
+ '200': "TeamDto",
4252
+ '422': "HTTPValidationError",
4253
+ }
4254
+ response_data = self.api_client.call_api(
4255
+ *_param,
4256
+ _request_timeout=_request_timeout
4257
+ )
4258
+ response_data.read()
4259
+ return self.api_client.response_deserialize(
4260
+ response_data=response_data,
4261
+ response_types_map=_response_types_map,
4262
+ ).data
4263
+
4264
+
4265
+ @validate_call
4266
+ def update_team_with_http_info(
4267
+ self,
4268
+ organization_id: StrictInt,
4269
+ team_id: StrictInt,
4270
+ team_creation_dto: TeamCreationDto,
4271
+ _request_timeout: Union[
4272
+ None,
4273
+ Annotated[StrictFloat, Field(gt=0)],
4274
+ Tuple[
4275
+ Annotated[StrictFloat, Field(gt=0)],
4276
+ Annotated[StrictFloat, Field(gt=0)]
4277
+ ]
4278
+ ] = None,
4279
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
4280
+ _content_type: Optional[StrictStr] = None,
4281
+ _headers: Optional[Dict[StrictStr, Any]] = None,
4282
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4283
+ ) -> ApiResponse[TeamDto]:
4284
+ """Update a team
4285
+
4286
+
4287
+ :param organization_id: (required)
4288
+ :type organization_id: int
4289
+ :param team_id: (required)
4290
+ :type team_id: int
4291
+ :param team_creation_dto: (required)
4292
+ :type team_creation_dto: TeamCreationDto
4293
+ :param _request_timeout: timeout setting for this request. If one
4294
+ number provided, it will be total request
4295
+ timeout. It can also be a pair (tuple) of
4296
+ (connection, read) timeouts.
4297
+ :type _request_timeout: int, tuple(int, int), optional
4298
+ :param _request_auth: set to override the auth_settings for an a single
4299
+ request; this effectively ignores the
4300
+ authentication in the spec for a single request.
4301
+ :type _request_auth: dict, optional
4302
+ :param _content_type: force content-type for the request.
4303
+ :type _content_type: str, Optional
4304
+ :param _headers: set to override the headers for a single
4305
+ request; this effectively ignores the headers
4306
+ in the spec for a single request.
4307
+ :type _headers: dict, optional
4308
+ :param _host_index: set to override the host_index for a single
4309
+ request; this effectively ignores the host_index
4310
+ in the spec for a single request.
4311
+ :type _host_index: int, optional
4312
+ :return: Returns the result object.
4313
+ """ # noqa: E501
4314
+
4315
+ _param = self._update_team_serialize(
4316
+ organization_id=organization_id,
4317
+ team_id=team_id,
4318
+ team_creation_dto=team_creation_dto,
4319
+ _request_auth=_request_auth,
4320
+ _content_type=_content_type,
4321
+ _headers=_headers,
4322
+ _host_index=_host_index
4323
+ )
4324
+
4325
+ _response_types_map: Dict[str, Optional[str]] = {
4326
+ '200': "TeamDto",
4327
+ '422': "HTTPValidationError",
4328
+ }
4329
+ response_data = self.api_client.call_api(
4330
+ *_param,
4331
+ _request_timeout=_request_timeout
4332
+ )
4333
+ response_data.read()
4334
+ return self.api_client.response_deserialize(
4335
+ response_data=response_data,
4336
+ response_types_map=_response_types_map,
4337
+ )
4338
+
4339
+
4340
+ @validate_call
4341
+ def update_team_without_preload_content(
4342
+ self,
4343
+ organization_id: StrictInt,
4344
+ team_id: StrictInt,
4345
+ team_creation_dto: TeamCreationDto,
4346
+ _request_timeout: Union[
4347
+ None,
4348
+ Annotated[StrictFloat, Field(gt=0)],
4349
+ Tuple[
4350
+ Annotated[StrictFloat, Field(gt=0)],
4351
+ Annotated[StrictFloat, Field(gt=0)]
4352
+ ]
4353
+ ] = None,
4354
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
4355
+ _content_type: Optional[StrictStr] = None,
4356
+ _headers: Optional[Dict[StrictStr, Any]] = None,
4357
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4358
+ ) -> RESTResponseType:
4359
+ """Update a team
4360
+
4361
+
4362
+ :param organization_id: (required)
4363
+ :type organization_id: int
4364
+ :param team_id: (required)
4365
+ :type team_id: int
4366
+ :param team_creation_dto: (required)
4367
+ :type team_creation_dto: TeamCreationDto
4368
+ :param _request_timeout: timeout setting for this request. If one
4369
+ number provided, it will be total request
4370
+ timeout. It can also be a pair (tuple) of
4371
+ (connection, read) timeouts.
4372
+ :type _request_timeout: int, tuple(int, int), optional
4373
+ :param _request_auth: set to override the auth_settings for an a single
4374
+ request; this effectively ignores the
4375
+ authentication in the spec for a single request.
4376
+ :type _request_auth: dict, optional
4377
+ :param _content_type: force content-type for the request.
4378
+ :type _content_type: str, Optional
4379
+ :param _headers: set to override the headers for a single
4380
+ request; this effectively ignores the headers
4381
+ in the spec for a single request.
4382
+ :type _headers: dict, optional
4383
+ :param _host_index: set to override the host_index for a single
4384
+ request; this effectively ignores the host_index
4385
+ in the spec for a single request.
4386
+ :type _host_index: int, optional
4387
+ :return: Returns the result object.
4388
+ """ # noqa: E501
4389
+
4390
+ _param = self._update_team_serialize(
4391
+ organization_id=organization_id,
4392
+ team_id=team_id,
4393
+ team_creation_dto=team_creation_dto,
4394
+ _request_auth=_request_auth,
4395
+ _content_type=_content_type,
4396
+ _headers=_headers,
4397
+ _host_index=_host_index
4398
+ )
4399
+
4400
+ _response_types_map: Dict[str, Optional[str]] = {
4401
+ '200': "TeamDto",
4402
+ '422': "HTTPValidationError",
4403
+ }
4404
+ response_data = self.api_client.call_api(
4405
+ *_param,
4406
+ _request_timeout=_request_timeout
4407
+ )
4408
+ return response_data.response
4409
+
4410
+
4411
+ def _update_team_serialize(
4412
+ self,
4413
+ organization_id,
4414
+ team_id,
4415
+ team_creation_dto,
4416
+ _request_auth,
4417
+ _content_type,
4418
+ _headers,
4419
+ _host_index,
4420
+ ) -> RequestSerialized:
4421
+
4422
+ _host = None
4423
+
4424
+ _collection_formats: Dict[str, str] = {
4425
+ }
4426
+
4427
+ _path_params: Dict[str, str] = {}
4428
+ _query_params: List[Tuple[str, str]] = []
4429
+ _header_params: Dict[str, Optional[str]] = _headers or {}
4430
+ _form_params: List[Tuple[str, str]] = []
4431
+ _files: Dict[
4432
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
4433
+ ] = {}
4434
+ _body_params: Optional[bytes] = None
4435
+
4436
+ # process the path parameters
4437
+ if organization_id is not None:
4438
+ _path_params['organization_id'] = organization_id
4439
+ if team_id is not None:
4440
+ _path_params['team_id'] = team_id
4441
+ # process the query parameters
4442
+ # process the header parameters
4443
+ # process the form parameters
4444
+ # process the body parameter
4445
+ if team_creation_dto is not None:
4446
+ _body_params = team_creation_dto
4447
+
4448
+
4449
+ # set the HTTP header `Accept`
4450
+ if 'Accept' not in _header_params:
4451
+ _header_params['Accept'] = self.api_client.select_header_accept(
4452
+ [
4453
+ 'application/json'
4454
+ ]
4455
+ )
4456
+
4457
+ # set the HTTP header `Content-Type`
4458
+ if _content_type:
4459
+ _header_params['Content-Type'] = _content_type
4460
+ else:
4461
+ _default_content_type = (
4462
+ self.api_client.select_header_content_type(
4463
+ [
4464
+ 'application/json'
4465
+ ]
4466
+ )
4467
+ )
4468
+ if _default_content_type is not None:
4469
+ _header_params['Content-Type'] = _default_content_type
4470
+
4471
+ # authentication setting
4472
+ _auth_settings: List[str] = [
4473
+ 'QAnswer-Api-Key',
4474
+ 'Bearer token'
4475
+ ]
4476
+
4477
+ return self.api_client.param_serialize(
4478
+ method='PUT',
4479
+ resource_path='/api/team/{organization_id}/{team_id}',
4480
+ path_params=_path_params,
4481
+ query_params=_query_params,
4482
+ header_params=_header_params,
4483
+ body=_body_params,
4484
+ post_params=_form_params,
4485
+ files=_files,
4486
+ auth_settings=_auth_settings,
4487
+ collection_formats=_collection_formats,
4488
+ _host=_host,
4489
+ _request_auth=_request_auth
4490
+ )
4491
+
4492
+