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