qanswer_sdk 3.1509.0__py3-none-any.whl → 3.1510.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.
- qanswer_sdk/__init__.py +31 -24
- qanswer_sdk/api/__init__.py +0 -1
- qanswer_sdk/api/admin_api.py +914 -142
- qanswer_sdk/api/ai_assistant_access_rights_api.py +883 -280
- qanswer_sdk/api/ai_assistant_api.py +289 -61
- qanswer_sdk/api/branding_api.py +6 -6
- qanswer_sdk/api/connector_website_api.py +287 -0
- qanswer_sdk/api/connectors_api.py +863 -11
- qanswer_sdk/api/connectors_data_api.py +28 -27
- qanswer_sdk/api/mcp_api.py +1103 -469
- qanswer_sdk/api/payment_api.py +3 -3
- qanswer_sdk/api/socket_api.py +0 -245
- qanswer_sdk/api/task_ai_excel_api.py +288 -0
- qanswer_sdk/api/task_report_copilot_api.py +49 -122
- qanswer_sdk/api/tool_embedder_api.py +552 -1
- qanswer_sdk/api/tool_llm_api.py +1059 -10
- qanswer_sdk/api/unit_organizations_api.py +1240 -165
- qanswer_sdk/api/unit_user_api.py +506 -0
- qanswer_sdk/api_client.py +1 -1
- qanswer_sdk/configuration.py +1 -1
- qanswer_sdk/models/__init__.py +30 -22
- qanswer_sdk/models/access_pdf_payload_model.py +6 -4
- qanswer_sdk/models/add_qn_a_request.py +5 -3
- qanswer_sdk/models/{assistant_template.py → ai_assistant_clone_response.py} +9 -19
- qanswer_sdk/models/ai_assistant_dto.py +4 -2
- qanswer_sdk/models/ai_assistant_filter_dto.py +3 -1
- qanswer_sdk/models/{user_dataset_access_control_origin_header.py → ai_assistant_restricted_domain.py} +8 -8
- qanswer_sdk/models/ai_assistant_share_response.py +93 -0
- qanswer_sdk/models/api_key_mcp_authentication_config.py +2 -2
- qanswer_sdk/models/assistant_template_filter_dto.py +93 -0
- qanswer_sdk/models/{relation_extraction_schema.py → assistant_template_with_tools_selection_dto.py} +26 -24
- qanswer_sdk/models/audio_file_upload_payload.py +4 -2
- qanswer_sdk/models/auto_bot_description_request.py +5 -3
- qanswer_sdk/models/chatbot_chat_payload.py +6 -2
- qanswer_sdk/models/connector_type_dto.py +101 -0
- qanswer_sdk/models/{relation_extraction_data_input.py → connector_type_list_dto.py} +14 -14
- qanswer_sdk/models/conversation_message.py +37 -7
- qanswer_sdk/models/conversation_model.py +8 -2
- qanswer_sdk/models/credits_info_global_dto.py +95 -0
- qanswer_sdk/models/credits_info_organization_dto.py +93 -0
- qanswer_sdk/models/dataset_detail_kg.py +30 -10
- qanswer_sdk/models/dataset_schema.py +5 -1
- qanswer_sdk/models/dataset_update_object.py +8 -2
- qanswer_sdk/models/document_content_update_model.py +4 -2
- qanswer_sdk/models/econsilium_search_index_add_payload.py +3 -1
- qanswer_sdk/models/embedder_create_dto.py +9 -3
- qanswer_sdk/models/embedder_detailed_dto.py +9 -3
- qanswer_sdk/models/embedder_update_dto.py +9 -3
- qanswer_sdk/models/{relation_model.py → embedding_endpoint_import_failure.py} +8 -10
- qanswer_sdk/models/embedding_endpoint_import_response.py +99 -0
- qanswer_sdk/models/es_meta_data.py +98 -0
- qanswer_sdk/models/{get_file_es_meta_data_response.py → es_meta_data_value.py} +7 -11
- qanswer_sdk/models/feedback_update.py +4 -2
- qanswer_sdk/models/file_es_meta_data.py +31 -4
- qanswer_sdk/models/g_drive_download_request.py +3 -1
- qanswer_sdk/models/generate_ai_cells_payload.py +5 -3
- qanswer_sdk/models/highlight_audio_payload_model.py +6 -4
- qanswer_sdk/models/imap_add_payload.py +4 -2
- qanswer_sdk/models/list_socket_events.py +2 -2
- qanswer_sdk/models/llm_consumption.py +2 -2
- qanswer_sdk/models/llm_create_dto.py +25 -3
- qanswer_sdk/models/llm_detailed_dto.py +30 -4
- qanswer_sdk/models/llm_dto.py +18 -2
- qanswer_sdk/models/llm_endpoint.py +25 -3
- qanswer_sdk/models/llm_endpoint_import_failure.py +89 -0
- qanswer_sdk/models/{relation_extraction_data_output.py → llm_endpoint_import_response.py} +20 -16
- qanswer_sdk/models/llm_endpoint_read_input.py +25 -3
- qanswer_sdk/models/llm_endpoint_read_output.py +25 -3
- qanswer_sdk/models/llm_update_dto.py +25 -3
- qanswer_sdk/models/mcp_server.py +153 -0
- qanswer_sdk/models/mcp_server_create.py +4 -2
- qanswer_sdk/models/mcp_server_dto.py +6 -2
- qanswer_sdk/models/mcp_server_update.py +4 -2
- qanswer_sdk/models/mcp_tool.py +124 -0
- qanswer_sdk/models/mcp_tool_description_update.py +6 -4
- qanswer_sdk/models/mcp_tool_dto.py +3 -1
- qanswer_sdk/models/one_drive_download_request.py +3 -1
- qanswer_sdk/models/one_note_download_request.py +3 -1
- qanswer_sdk/models/organization_admin.py +4 -2
- qanswer_sdk/models/organization_filter_dto.py +4 -2
- qanswer_sdk/models/{relation_value_input.py → organization_mcp_server_setting.py} +29 -24
- qanswer_sdk/models/plan_dto.py +16 -4
- qanswer_sdk/models/publication_add_payload.py +4 -2
- qanswer_sdk/models/rag_payload.py +6 -2
- qanswer_sdk/models/report_copilot_generation_from_slots_payload.py +5 -3
- qanswer_sdk/models/report_copilot_refinement_payload.py +5 -3
- qanswer_sdk/models/report_copilot_slot_feedback_update.py +4 -2
- qanswer_sdk/models/report_template.py +3 -1
- qanswer_sdk/models/report_template_create_payload.py +4 -2
- qanswer_sdk/models/report_template_simplified.py +4 -2
- qanswer_sdk/models/report_template_update_payload.py +4 -2
- qanswer_sdk/models/report_templates_search_payload.py +104 -0
- qanswer_sdk/models/search_payload.py +6 -2
- qanswer_sdk/models/share_point_download_request.py +3 -1
- qanswer_sdk/models/socket_conversation_message.py +37 -7
- qanswer_sdk/models/template_toggle_request.py +5 -5
- qanswer_sdk/models/text2_sparql_payload.py +5 -1
- qanswer_sdk/models/thinking_block.py +91 -0
- qanswer_sdk/models/{subject_model.py → update_cells_payload.py} +10 -10
- qanswer_sdk/models/{relation_extraction_configuration.py → update_file_es_meta_data.py} +37 -26
- qanswer_sdk/models/{update_metadata_model.py → update_metadata_model_input.py} +7 -7
- qanswer_sdk/models/{relation_extraction_task_settings_update_payload.py → update_metadata_model_output.py} +14 -12
- qanswer_sdk/models/update_qn_a_pair_request.py +4 -2
- qanswer_sdk/models/{relation_extraction_template_payload.py → update_template_cells_payload.py} +19 -15
- qanswer_sdk/models/user.py +10 -5
- qanswer_sdk/models/user_credits_config_dto.py +95 -0
- qanswer_sdk/models/user_credits_dto.py +104 -0
- qanswer_sdk/models/user_dataset.py +31 -11
- qanswer_sdk/models/{relation_extraction_row_output.py → user_dataset_mcp_tool_selection.py} +33 -26
- qanswer_sdk/models/user_dataset_mcp_tool_selection_dto.py +3 -1
- qanswer_sdk/models/user_filter_dto.py +4 -2
- qanswer_sdk/models/{relation_extraction_row_input.py → user_mcp_tool_selection.py} +31 -26
- qanswer_sdk/models/user_mcp_tool_selection_dto.py +3 -1
- qanswer_sdk/models/user_profile_dto.py +16 -4
- qanswer_sdk/models/{value_model.py → websearch_scraping_site.py} +11 -17
- qanswer_sdk/models/website_add_payload.py +4 -2
- {qanswer_sdk-3.1509.0.dist-info → qanswer_sdk-3.1510.0.dist-info}/METADATA +2 -2
- {qanswer_sdk-3.1509.0.dist-info → qanswer_sdk-3.1510.0.dist-info}/RECORD +119 -112
- qanswer_sdk/api/task_relation_extraction_api.py +0 -3636
- qanswer_sdk/models/export_relation_extraction_table_request.py +0 -97
- qanswer_sdk/models/relation_extraction_payload.py +0 -117
- qanswer_sdk/models/relation_extraction_task_settings.py +0 -125
- qanswer_sdk/models/relation_extraction_task_update.py +0 -125
- qanswer_sdk/models/relation_value_output.py +0 -103
- qanswer_sdk/models/socket_data_extraction.py +0 -109
- {qanswer_sdk-3.1509.0.dist-info → qanswer_sdk-3.1510.0.dist-info}/WHEEL +0 -0
|
@@ -16,10 +16,11 @@ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
|
16
16
|
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
17
|
from typing_extensions import Annotated
|
|
18
18
|
|
|
19
|
-
from pydantic import StrictInt, StrictStr
|
|
19
|
+
from pydantic import StrictBool, StrictInt, StrictStr
|
|
20
20
|
from typing import Optional
|
|
21
21
|
from qanswer_sdk.models.available_connectors_response import AvailableConnectorsResponse
|
|
22
22
|
from qanswer_sdk.models.base_connectors_response import BaseConnectorsResponse
|
|
23
|
+
from qanswer_sdk.models.connector_type_list_dto import ConnectorTypeListDto
|
|
23
24
|
from qanswer_sdk.models.delete_connector_request import DeleteConnectorRequest
|
|
24
25
|
from qanswer_sdk.models.delete_connectors_response import DeleteConnectorsResponse
|
|
25
26
|
from qanswer_sdk.models.get_connector_by_id_response import GetConnectorByIdResponse
|
|
@@ -332,7 +333,7 @@ class ConnectorsApi:
|
|
|
332
333
|
|
|
333
334
|
|
|
334
335
|
@validate_call
|
|
335
|
-
def
|
|
336
|
+
def get_available_connector_types(
|
|
336
337
|
self,
|
|
337
338
|
_request_timeout: Union[
|
|
338
339
|
None,
|
|
@@ -347,7 +348,7 @@ class ConnectorsApi:
|
|
|
347
348
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
348
349
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
349
350
|
) -> AvailableConnectorsResponse:
|
|
350
|
-
"""
|
|
351
|
+
"""get the available connector types
|
|
351
352
|
|
|
352
353
|
|
|
353
354
|
:param _request_timeout: timeout setting for this request. If one
|
|
@@ -372,7 +373,7 @@ class ConnectorsApi:
|
|
|
372
373
|
:return: Returns the result object.
|
|
373
374
|
""" # noqa: E501
|
|
374
375
|
|
|
375
|
-
_param = self.
|
|
376
|
+
_param = self._get_available_connector_types_serialize(
|
|
376
377
|
_request_auth=_request_auth,
|
|
377
378
|
_content_type=_content_type,
|
|
378
379
|
_headers=_headers,
|
|
@@ -394,7 +395,7 @@ class ConnectorsApi:
|
|
|
394
395
|
|
|
395
396
|
|
|
396
397
|
@validate_call
|
|
397
|
-
def
|
|
398
|
+
def get_available_connector_types_with_http_info(
|
|
398
399
|
self,
|
|
399
400
|
_request_timeout: Union[
|
|
400
401
|
None,
|
|
@@ -409,7 +410,7 @@ class ConnectorsApi:
|
|
|
409
410
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
410
411
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
411
412
|
) -> ApiResponse[AvailableConnectorsResponse]:
|
|
412
|
-
"""
|
|
413
|
+
"""get the available connector types
|
|
413
414
|
|
|
414
415
|
|
|
415
416
|
:param _request_timeout: timeout setting for this request. If one
|
|
@@ -434,7 +435,7 @@ class ConnectorsApi:
|
|
|
434
435
|
:return: Returns the result object.
|
|
435
436
|
""" # noqa: E501
|
|
436
437
|
|
|
437
|
-
_param = self.
|
|
438
|
+
_param = self._get_available_connector_types_serialize(
|
|
438
439
|
_request_auth=_request_auth,
|
|
439
440
|
_content_type=_content_type,
|
|
440
441
|
_headers=_headers,
|
|
@@ -456,7 +457,7 @@ class ConnectorsApi:
|
|
|
456
457
|
|
|
457
458
|
|
|
458
459
|
@validate_call
|
|
459
|
-
def
|
|
460
|
+
def get_available_connector_types_without_preload_content(
|
|
460
461
|
self,
|
|
461
462
|
_request_timeout: Union[
|
|
462
463
|
None,
|
|
@@ -471,7 +472,7 @@ class ConnectorsApi:
|
|
|
471
472
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
472
473
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
473
474
|
) -> RESTResponseType:
|
|
474
|
-
"""
|
|
475
|
+
"""get the available connector types
|
|
475
476
|
|
|
476
477
|
|
|
477
478
|
:param _request_timeout: timeout setting for this request. If one
|
|
@@ -496,7 +497,7 @@ class ConnectorsApi:
|
|
|
496
497
|
:return: Returns the result object.
|
|
497
498
|
""" # noqa: E501
|
|
498
499
|
|
|
499
|
-
_param = self.
|
|
500
|
+
_param = self._get_available_connector_types_serialize(
|
|
500
501
|
_request_auth=_request_auth,
|
|
501
502
|
_content_type=_content_type,
|
|
502
503
|
_headers=_headers,
|
|
@@ -513,7 +514,7 @@ class ConnectorsApi:
|
|
|
513
514
|
return response_data.response
|
|
514
515
|
|
|
515
516
|
|
|
516
|
-
def
|
|
517
|
+
def _get_available_connector_types_serialize(
|
|
517
518
|
self,
|
|
518
519
|
_request_auth,
|
|
519
520
|
_content_type,
|
|
@@ -883,6 +884,284 @@ class ConnectorsApi:
|
|
|
883
884
|
|
|
884
885
|
|
|
885
886
|
|
|
887
|
+
@validate_call
|
|
888
|
+
def get_connector_types_list(
|
|
889
|
+
self,
|
|
890
|
+
org_id: Optional[StrictInt] = None,
|
|
891
|
+
show_restricted: Optional[StrictBool] = None,
|
|
892
|
+
_request_timeout: Union[
|
|
893
|
+
None,
|
|
894
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
895
|
+
Tuple[
|
|
896
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
897
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
898
|
+
]
|
|
899
|
+
] = None,
|
|
900
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
901
|
+
_content_type: Optional[StrictStr] = None,
|
|
902
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
903
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
904
|
+
) -> ConnectorTypeListDto:
|
|
905
|
+
"""get the connector types list
|
|
906
|
+
|
|
907
|
+
|
|
908
|
+
:param org_id:
|
|
909
|
+
:type org_id: int
|
|
910
|
+
:param show_restricted:
|
|
911
|
+
:type show_restricted: bool
|
|
912
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
913
|
+
number provided, it will be total request
|
|
914
|
+
timeout. It can also be a pair (tuple) of
|
|
915
|
+
(connection, read) timeouts.
|
|
916
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
917
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
918
|
+
request; this effectively ignores the
|
|
919
|
+
authentication in the spec for a single request.
|
|
920
|
+
:type _request_auth: dict, optional
|
|
921
|
+
:param _content_type: force content-type for the request.
|
|
922
|
+
:type _content_type: str, Optional
|
|
923
|
+
:param _headers: set to override the headers for a single
|
|
924
|
+
request; this effectively ignores the headers
|
|
925
|
+
in the spec for a single request.
|
|
926
|
+
:type _headers: dict, optional
|
|
927
|
+
:param _host_index: set to override the host_index for a single
|
|
928
|
+
request; this effectively ignores the host_index
|
|
929
|
+
in the spec for a single request.
|
|
930
|
+
:type _host_index: int, optional
|
|
931
|
+
:return: Returns the result object.
|
|
932
|
+
""" # noqa: E501
|
|
933
|
+
|
|
934
|
+
_param = self._get_connector_types_list_serialize(
|
|
935
|
+
org_id=org_id,
|
|
936
|
+
show_restricted=show_restricted,
|
|
937
|
+
_request_auth=_request_auth,
|
|
938
|
+
_content_type=_content_type,
|
|
939
|
+
_headers=_headers,
|
|
940
|
+
_host_index=_host_index
|
|
941
|
+
)
|
|
942
|
+
|
|
943
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
944
|
+
'200': "ConnectorTypeListDto",
|
|
945
|
+
}
|
|
946
|
+
response_data = self.api_client.call_api(
|
|
947
|
+
*_param,
|
|
948
|
+
_request_timeout=_request_timeout
|
|
949
|
+
)
|
|
950
|
+
response_data.read()
|
|
951
|
+
return self.api_client.response_deserialize(
|
|
952
|
+
response_data=response_data,
|
|
953
|
+
response_types_map=_response_types_map,
|
|
954
|
+
).data
|
|
955
|
+
|
|
956
|
+
|
|
957
|
+
@validate_call
|
|
958
|
+
def get_connector_types_list_with_http_info(
|
|
959
|
+
self,
|
|
960
|
+
org_id: Optional[StrictInt] = None,
|
|
961
|
+
show_restricted: Optional[StrictBool] = None,
|
|
962
|
+
_request_timeout: Union[
|
|
963
|
+
None,
|
|
964
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
965
|
+
Tuple[
|
|
966
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
967
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
968
|
+
]
|
|
969
|
+
] = None,
|
|
970
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
971
|
+
_content_type: Optional[StrictStr] = None,
|
|
972
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
973
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
974
|
+
) -> ApiResponse[ConnectorTypeListDto]:
|
|
975
|
+
"""get the connector types list
|
|
976
|
+
|
|
977
|
+
|
|
978
|
+
:param org_id:
|
|
979
|
+
:type org_id: int
|
|
980
|
+
:param show_restricted:
|
|
981
|
+
:type show_restricted: bool
|
|
982
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
983
|
+
number provided, it will be total request
|
|
984
|
+
timeout. It can also be a pair (tuple) of
|
|
985
|
+
(connection, read) timeouts.
|
|
986
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
987
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
988
|
+
request; this effectively ignores the
|
|
989
|
+
authentication in the spec for a single request.
|
|
990
|
+
:type _request_auth: dict, optional
|
|
991
|
+
:param _content_type: force content-type for the request.
|
|
992
|
+
:type _content_type: str, Optional
|
|
993
|
+
:param _headers: set to override the headers for a single
|
|
994
|
+
request; this effectively ignores the headers
|
|
995
|
+
in the spec for a single request.
|
|
996
|
+
:type _headers: dict, optional
|
|
997
|
+
:param _host_index: set to override the host_index for a single
|
|
998
|
+
request; this effectively ignores the host_index
|
|
999
|
+
in the spec for a single request.
|
|
1000
|
+
:type _host_index: int, optional
|
|
1001
|
+
:return: Returns the result object.
|
|
1002
|
+
""" # noqa: E501
|
|
1003
|
+
|
|
1004
|
+
_param = self._get_connector_types_list_serialize(
|
|
1005
|
+
org_id=org_id,
|
|
1006
|
+
show_restricted=show_restricted,
|
|
1007
|
+
_request_auth=_request_auth,
|
|
1008
|
+
_content_type=_content_type,
|
|
1009
|
+
_headers=_headers,
|
|
1010
|
+
_host_index=_host_index
|
|
1011
|
+
)
|
|
1012
|
+
|
|
1013
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1014
|
+
'200': "ConnectorTypeListDto",
|
|
1015
|
+
}
|
|
1016
|
+
response_data = self.api_client.call_api(
|
|
1017
|
+
*_param,
|
|
1018
|
+
_request_timeout=_request_timeout
|
|
1019
|
+
)
|
|
1020
|
+
response_data.read()
|
|
1021
|
+
return self.api_client.response_deserialize(
|
|
1022
|
+
response_data=response_data,
|
|
1023
|
+
response_types_map=_response_types_map,
|
|
1024
|
+
)
|
|
1025
|
+
|
|
1026
|
+
|
|
1027
|
+
@validate_call
|
|
1028
|
+
def get_connector_types_list_without_preload_content(
|
|
1029
|
+
self,
|
|
1030
|
+
org_id: Optional[StrictInt] = None,
|
|
1031
|
+
show_restricted: Optional[StrictBool] = None,
|
|
1032
|
+
_request_timeout: Union[
|
|
1033
|
+
None,
|
|
1034
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1035
|
+
Tuple[
|
|
1036
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1037
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1038
|
+
]
|
|
1039
|
+
] = None,
|
|
1040
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1041
|
+
_content_type: Optional[StrictStr] = None,
|
|
1042
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1043
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1044
|
+
) -> RESTResponseType:
|
|
1045
|
+
"""get the connector types list
|
|
1046
|
+
|
|
1047
|
+
|
|
1048
|
+
:param org_id:
|
|
1049
|
+
:type org_id: int
|
|
1050
|
+
:param show_restricted:
|
|
1051
|
+
:type show_restricted: bool
|
|
1052
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1053
|
+
number provided, it will be total request
|
|
1054
|
+
timeout. It can also be a pair (tuple) of
|
|
1055
|
+
(connection, read) timeouts.
|
|
1056
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1057
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1058
|
+
request; this effectively ignores the
|
|
1059
|
+
authentication in the spec for a single request.
|
|
1060
|
+
:type _request_auth: dict, optional
|
|
1061
|
+
:param _content_type: force content-type for the request.
|
|
1062
|
+
:type _content_type: str, Optional
|
|
1063
|
+
:param _headers: set to override the headers for a single
|
|
1064
|
+
request; this effectively ignores the headers
|
|
1065
|
+
in the spec for a single request.
|
|
1066
|
+
:type _headers: dict, optional
|
|
1067
|
+
:param _host_index: set to override the host_index for a single
|
|
1068
|
+
request; this effectively ignores the host_index
|
|
1069
|
+
in the spec for a single request.
|
|
1070
|
+
:type _host_index: int, optional
|
|
1071
|
+
:return: Returns the result object.
|
|
1072
|
+
""" # noqa: E501
|
|
1073
|
+
|
|
1074
|
+
_param = self._get_connector_types_list_serialize(
|
|
1075
|
+
org_id=org_id,
|
|
1076
|
+
show_restricted=show_restricted,
|
|
1077
|
+
_request_auth=_request_auth,
|
|
1078
|
+
_content_type=_content_type,
|
|
1079
|
+
_headers=_headers,
|
|
1080
|
+
_host_index=_host_index
|
|
1081
|
+
)
|
|
1082
|
+
|
|
1083
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1084
|
+
'200': "ConnectorTypeListDto",
|
|
1085
|
+
}
|
|
1086
|
+
response_data = self.api_client.call_api(
|
|
1087
|
+
*_param,
|
|
1088
|
+
_request_timeout=_request_timeout
|
|
1089
|
+
)
|
|
1090
|
+
return response_data.response
|
|
1091
|
+
|
|
1092
|
+
|
|
1093
|
+
def _get_connector_types_list_serialize(
|
|
1094
|
+
self,
|
|
1095
|
+
org_id,
|
|
1096
|
+
show_restricted,
|
|
1097
|
+
_request_auth,
|
|
1098
|
+
_content_type,
|
|
1099
|
+
_headers,
|
|
1100
|
+
_host_index,
|
|
1101
|
+
) -> RequestSerialized:
|
|
1102
|
+
|
|
1103
|
+
_host = None
|
|
1104
|
+
|
|
1105
|
+
_collection_formats: Dict[str, str] = {
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
_path_params: Dict[str, str] = {}
|
|
1109
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1110
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1111
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1112
|
+
_files: Dict[
|
|
1113
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1114
|
+
] = {}
|
|
1115
|
+
_body_params: Optional[bytes] = None
|
|
1116
|
+
|
|
1117
|
+
# process the path parameters
|
|
1118
|
+
# process the query parameters
|
|
1119
|
+
if org_id is not None:
|
|
1120
|
+
|
|
1121
|
+
_query_params.append(('orgId', org_id))
|
|
1122
|
+
|
|
1123
|
+
if show_restricted is not None:
|
|
1124
|
+
|
|
1125
|
+
_query_params.append(('showRestricted', show_restricted))
|
|
1126
|
+
|
|
1127
|
+
# process the header parameters
|
|
1128
|
+
# process the form parameters
|
|
1129
|
+
# process the body parameter
|
|
1130
|
+
|
|
1131
|
+
|
|
1132
|
+
# set the HTTP header `Accept`
|
|
1133
|
+
if 'Accept' not in _header_params:
|
|
1134
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1135
|
+
[
|
|
1136
|
+
'*/*'
|
|
1137
|
+
]
|
|
1138
|
+
)
|
|
1139
|
+
|
|
1140
|
+
|
|
1141
|
+
# authentication setting
|
|
1142
|
+
_auth_settings: List[str] = [
|
|
1143
|
+
'QAnswer-Api-Key',
|
|
1144
|
+
'Bearer'
|
|
1145
|
+
]
|
|
1146
|
+
|
|
1147
|
+
return self.api_client.param_serialize(
|
|
1148
|
+
method='GET',
|
|
1149
|
+
resource_path='/api/connectors/types-list',
|
|
1150
|
+
path_params=_path_params,
|
|
1151
|
+
query_params=_query_params,
|
|
1152
|
+
header_params=_header_params,
|
|
1153
|
+
body=_body_params,
|
|
1154
|
+
post_params=_form_params,
|
|
1155
|
+
files=_files,
|
|
1156
|
+
auth_settings=_auth_settings,
|
|
1157
|
+
collection_formats=_collection_formats,
|
|
1158
|
+
_host=_host,
|
|
1159
|
+
_request_auth=_request_auth
|
|
1160
|
+
)
|
|
1161
|
+
|
|
1162
|
+
|
|
1163
|
+
|
|
1164
|
+
|
|
886
1165
|
@validate_call
|
|
887
1166
|
def lisr_connectors(
|
|
888
1167
|
self,
|
|
@@ -1512,3 +1791,576 @@ class ConnectorsApi:
|
|
|
1512
1791
|
)
|
|
1513
1792
|
|
|
1514
1793
|
|
|
1794
|
+
|
|
1795
|
+
|
|
1796
|
+
@validate_call
|
|
1797
|
+
def set_connector_organization_restriction(
|
|
1798
|
+
self,
|
|
1799
|
+
type: StrictStr,
|
|
1800
|
+
org_id: StrictInt,
|
|
1801
|
+
restricted: StrictBool,
|
|
1802
|
+
_request_timeout: Union[
|
|
1803
|
+
None,
|
|
1804
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1805
|
+
Tuple[
|
|
1806
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1807
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1808
|
+
]
|
|
1809
|
+
] = None,
|
|
1810
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1811
|
+
_content_type: Optional[StrictStr] = None,
|
|
1812
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1813
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1814
|
+
) -> str:
|
|
1815
|
+
"""set a connector type organization restriction
|
|
1816
|
+
|
|
1817
|
+
|
|
1818
|
+
:param type: (required)
|
|
1819
|
+
:type type: str
|
|
1820
|
+
:param org_id: (required)
|
|
1821
|
+
:type org_id: int
|
|
1822
|
+
:param restricted: (required)
|
|
1823
|
+
:type restricted: bool
|
|
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._set_connector_organization_restriction_serialize(
|
|
1847
|
+
type=type,
|
|
1848
|
+
org_id=org_id,
|
|
1849
|
+
restricted=restricted,
|
|
1850
|
+
_request_auth=_request_auth,
|
|
1851
|
+
_content_type=_content_type,
|
|
1852
|
+
_headers=_headers,
|
|
1853
|
+
_host_index=_host_index
|
|
1854
|
+
)
|
|
1855
|
+
|
|
1856
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1857
|
+
'200': "str",
|
|
1858
|
+
}
|
|
1859
|
+
response_data = self.api_client.call_api(
|
|
1860
|
+
*_param,
|
|
1861
|
+
_request_timeout=_request_timeout
|
|
1862
|
+
)
|
|
1863
|
+
response_data.read()
|
|
1864
|
+
return self.api_client.response_deserialize(
|
|
1865
|
+
response_data=response_data,
|
|
1866
|
+
response_types_map=_response_types_map,
|
|
1867
|
+
).data
|
|
1868
|
+
|
|
1869
|
+
|
|
1870
|
+
@validate_call
|
|
1871
|
+
def set_connector_organization_restriction_with_http_info(
|
|
1872
|
+
self,
|
|
1873
|
+
type: StrictStr,
|
|
1874
|
+
org_id: StrictInt,
|
|
1875
|
+
restricted: StrictBool,
|
|
1876
|
+
_request_timeout: Union[
|
|
1877
|
+
None,
|
|
1878
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1879
|
+
Tuple[
|
|
1880
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1881
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1882
|
+
]
|
|
1883
|
+
] = None,
|
|
1884
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1885
|
+
_content_type: Optional[StrictStr] = None,
|
|
1886
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1887
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1888
|
+
) -> ApiResponse[str]:
|
|
1889
|
+
"""set a connector type organization restriction
|
|
1890
|
+
|
|
1891
|
+
|
|
1892
|
+
:param type: (required)
|
|
1893
|
+
:type type: str
|
|
1894
|
+
:param org_id: (required)
|
|
1895
|
+
:type org_id: int
|
|
1896
|
+
:param restricted: (required)
|
|
1897
|
+
:type restricted: bool
|
|
1898
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1899
|
+
number provided, it will be total request
|
|
1900
|
+
timeout. It can also be a pair (tuple) of
|
|
1901
|
+
(connection, read) timeouts.
|
|
1902
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1903
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1904
|
+
request; this effectively ignores the
|
|
1905
|
+
authentication in the spec for a single request.
|
|
1906
|
+
:type _request_auth: dict, optional
|
|
1907
|
+
:param _content_type: force content-type for the request.
|
|
1908
|
+
:type _content_type: str, Optional
|
|
1909
|
+
:param _headers: set to override the headers for a single
|
|
1910
|
+
request; this effectively ignores the headers
|
|
1911
|
+
in the spec for a single request.
|
|
1912
|
+
:type _headers: dict, optional
|
|
1913
|
+
:param _host_index: set to override the host_index for a single
|
|
1914
|
+
request; this effectively ignores the host_index
|
|
1915
|
+
in the spec for a single request.
|
|
1916
|
+
:type _host_index: int, optional
|
|
1917
|
+
:return: Returns the result object.
|
|
1918
|
+
""" # noqa: E501
|
|
1919
|
+
|
|
1920
|
+
_param = self._set_connector_organization_restriction_serialize(
|
|
1921
|
+
type=type,
|
|
1922
|
+
org_id=org_id,
|
|
1923
|
+
restricted=restricted,
|
|
1924
|
+
_request_auth=_request_auth,
|
|
1925
|
+
_content_type=_content_type,
|
|
1926
|
+
_headers=_headers,
|
|
1927
|
+
_host_index=_host_index
|
|
1928
|
+
)
|
|
1929
|
+
|
|
1930
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1931
|
+
'200': "str",
|
|
1932
|
+
}
|
|
1933
|
+
response_data = self.api_client.call_api(
|
|
1934
|
+
*_param,
|
|
1935
|
+
_request_timeout=_request_timeout
|
|
1936
|
+
)
|
|
1937
|
+
response_data.read()
|
|
1938
|
+
return self.api_client.response_deserialize(
|
|
1939
|
+
response_data=response_data,
|
|
1940
|
+
response_types_map=_response_types_map,
|
|
1941
|
+
)
|
|
1942
|
+
|
|
1943
|
+
|
|
1944
|
+
@validate_call
|
|
1945
|
+
def set_connector_organization_restriction_without_preload_content(
|
|
1946
|
+
self,
|
|
1947
|
+
type: StrictStr,
|
|
1948
|
+
org_id: StrictInt,
|
|
1949
|
+
restricted: StrictBool,
|
|
1950
|
+
_request_timeout: Union[
|
|
1951
|
+
None,
|
|
1952
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1953
|
+
Tuple[
|
|
1954
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1955
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1956
|
+
]
|
|
1957
|
+
] = None,
|
|
1958
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1959
|
+
_content_type: Optional[StrictStr] = None,
|
|
1960
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1961
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1962
|
+
) -> RESTResponseType:
|
|
1963
|
+
"""set a connector type organization restriction
|
|
1964
|
+
|
|
1965
|
+
|
|
1966
|
+
:param type: (required)
|
|
1967
|
+
:type type: str
|
|
1968
|
+
:param org_id: (required)
|
|
1969
|
+
:type org_id: int
|
|
1970
|
+
:param restricted: (required)
|
|
1971
|
+
:type restricted: bool
|
|
1972
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1973
|
+
number provided, it will be total request
|
|
1974
|
+
timeout. It can also be a pair (tuple) of
|
|
1975
|
+
(connection, read) timeouts.
|
|
1976
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1977
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1978
|
+
request; this effectively ignores the
|
|
1979
|
+
authentication in the spec for a single request.
|
|
1980
|
+
:type _request_auth: dict, optional
|
|
1981
|
+
:param _content_type: force content-type for the request.
|
|
1982
|
+
:type _content_type: str, Optional
|
|
1983
|
+
:param _headers: set to override the headers for a single
|
|
1984
|
+
request; this effectively ignores the headers
|
|
1985
|
+
in the spec for a single request.
|
|
1986
|
+
:type _headers: dict, optional
|
|
1987
|
+
:param _host_index: set to override the host_index for a single
|
|
1988
|
+
request; this effectively ignores the host_index
|
|
1989
|
+
in the spec for a single request.
|
|
1990
|
+
:type _host_index: int, optional
|
|
1991
|
+
:return: Returns the result object.
|
|
1992
|
+
""" # noqa: E501
|
|
1993
|
+
|
|
1994
|
+
_param = self._set_connector_organization_restriction_serialize(
|
|
1995
|
+
type=type,
|
|
1996
|
+
org_id=org_id,
|
|
1997
|
+
restricted=restricted,
|
|
1998
|
+
_request_auth=_request_auth,
|
|
1999
|
+
_content_type=_content_type,
|
|
2000
|
+
_headers=_headers,
|
|
2001
|
+
_host_index=_host_index
|
|
2002
|
+
)
|
|
2003
|
+
|
|
2004
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2005
|
+
'200': "str",
|
|
2006
|
+
}
|
|
2007
|
+
response_data = self.api_client.call_api(
|
|
2008
|
+
*_param,
|
|
2009
|
+
_request_timeout=_request_timeout
|
|
2010
|
+
)
|
|
2011
|
+
return response_data.response
|
|
2012
|
+
|
|
2013
|
+
|
|
2014
|
+
def _set_connector_organization_restriction_serialize(
|
|
2015
|
+
self,
|
|
2016
|
+
type,
|
|
2017
|
+
org_id,
|
|
2018
|
+
restricted,
|
|
2019
|
+
_request_auth,
|
|
2020
|
+
_content_type,
|
|
2021
|
+
_headers,
|
|
2022
|
+
_host_index,
|
|
2023
|
+
) -> RequestSerialized:
|
|
2024
|
+
|
|
2025
|
+
_host = None
|
|
2026
|
+
|
|
2027
|
+
_collection_formats: Dict[str, str] = {
|
|
2028
|
+
}
|
|
2029
|
+
|
|
2030
|
+
_path_params: Dict[str, str] = {}
|
|
2031
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2032
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2033
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2034
|
+
_files: Dict[
|
|
2035
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2036
|
+
] = {}
|
|
2037
|
+
_body_params: Optional[bytes] = None
|
|
2038
|
+
|
|
2039
|
+
# process the path parameters
|
|
2040
|
+
# process the query parameters
|
|
2041
|
+
if type is not None:
|
|
2042
|
+
|
|
2043
|
+
_query_params.append(('type', type))
|
|
2044
|
+
|
|
2045
|
+
if org_id is not None:
|
|
2046
|
+
|
|
2047
|
+
_query_params.append(('orgId', org_id))
|
|
2048
|
+
|
|
2049
|
+
if restricted is not None:
|
|
2050
|
+
|
|
2051
|
+
_query_params.append(('restricted', restricted))
|
|
2052
|
+
|
|
2053
|
+
# process the header parameters
|
|
2054
|
+
# process the form parameters
|
|
2055
|
+
# process the body parameter
|
|
2056
|
+
|
|
2057
|
+
|
|
2058
|
+
# set the HTTP header `Accept`
|
|
2059
|
+
if 'Accept' not in _header_params:
|
|
2060
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2061
|
+
[
|
|
2062
|
+
'*/*'
|
|
2063
|
+
]
|
|
2064
|
+
)
|
|
2065
|
+
|
|
2066
|
+
|
|
2067
|
+
# authentication setting
|
|
2068
|
+
_auth_settings: List[str] = [
|
|
2069
|
+
'QAnswer-Api-Key',
|
|
2070
|
+
'Bearer'
|
|
2071
|
+
]
|
|
2072
|
+
|
|
2073
|
+
return self.api_client.param_serialize(
|
|
2074
|
+
method='PUT',
|
|
2075
|
+
resource_path='/api/connectors/set-org-restriction',
|
|
2076
|
+
path_params=_path_params,
|
|
2077
|
+
query_params=_query_params,
|
|
2078
|
+
header_params=_header_params,
|
|
2079
|
+
body=_body_params,
|
|
2080
|
+
post_params=_form_params,
|
|
2081
|
+
files=_files,
|
|
2082
|
+
auth_settings=_auth_settings,
|
|
2083
|
+
collection_formats=_collection_formats,
|
|
2084
|
+
_host=_host,
|
|
2085
|
+
_request_auth=_request_auth
|
|
2086
|
+
)
|
|
2087
|
+
|
|
2088
|
+
|
|
2089
|
+
|
|
2090
|
+
|
|
2091
|
+
@validate_call
|
|
2092
|
+
def set_connector_restriction(
|
|
2093
|
+
self,
|
|
2094
|
+
type: StrictStr,
|
|
2095
|
+
restricted: StrictBool,
|
|
2096
|
+
_request_timeout: Union[
|
|
2097
|
+
None,
|
|
2098
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2099
|
+
Tuple[
|
|
2100
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2101
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2102
|
+
]
|
|
2103
|
+
] = None,
|
|
2104
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2105
|
+
_content_type: Optional[StrictStr] = None,
|
|
2106
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2107
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2108
|
+
) -> str:
|
|
2109
|
+
"""set connector type global restriction
|
|
2110
|
+
|
|
2111
|
+
|
|
2112
|
+
:param type: (required)
|
|
2113
|
+
:type type: str
|
|
2114
|
+
:param restricted: (required)
|
|
2115
|
+
:type restricted: bool
|
|
2116
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2117
|
+
number provided, it will be total request
|
|
2118
|
+
timeout. It can also be a pair (tuple) of
|
|
2119
|
+
(connection, read) timeouts.
|
|
2120
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2121
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2122
|
+
request; this effectively ignores the
|
|
2123
|
+
authentication in the spec for a single request.
|
|
2124
|
+
:type _request_auth: dict, optional
|
|
2125
|
+
:param _content_type: force content-type for the request.
|
|
2126
|
+
:type _content_type: str, Optional
|
|
2127
|
+
:param _headers: set to override the headers for a single
|
|
2128
|
+
request; this effectively ignores the headers
|
|
2129
|
+
in the spec for a single request.
|
|
2130
|
+
:type _headers: dict, optional
|
|
2131
|
+
:param _host_index: set to override the host_index for a single
|
|
2132
|
+
request; this effectively ignores the host_index
|
|
2133
|
+
in the spec for a single request.
|
|
2134
|
+
:type _host_index: int, optional
|
|
2135
|
+
:return: Returns the result object.
|
|
2136
|
+
""" # noqa: E501
|
|
2137
|
+
|
|
2138
|
+
_param = self._set_connector_restriction_serialize(
|
|
2139
|
+
type=type,
|
|
2140
|
+
restricted=restricted,
|
|
2141
|
+
_request_auth=_request_auth,
|
|
2142
|
+
_content_type=_content_type,
|
|
2143
|
+
_headers=_headers,
|
|
2144
|
+
_host_index=_host_index
|
|
2145
|
+
)
|
|
2146
|
+
|
|
2147
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2148
|
+
'200': "str",
|
|
2149
|
+
}
|
|
2150
|
+
response_data = self.api_client.call_api(
|
|
2151
|
+
*_param,
|
|
2152
|
+
_request_timeout=_request_timeout
|
|
2153
|
+
)
|
|
2154
|
+
response_data.read()
|
|
2155
|
+
return self.api_client.response_deserialize(
|
|
2156
|
+
response_data=response_data,
|
|
2157
|
+
response_types_map=_response_types_map,
|
|
2158
|
+
).data
|
|
2159
|
+
|
|
2160
|
+
|
|
2161
|
+
@validate_call
|
|
2162
|
+
def set_connector_restriction_with_http_info(
|
|
2163
|
+
self,
|
|
2164
|
+
type: StrictStr,
|
|
2165
|
+
restricted: StrictBool,
|
|
2166
|
+
_request_timeout: Union[
|
|
2167
|
+
None,
|
|
2168
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2169
|
+
Tuple[
|
|
2170
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2171
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2172
|
+
]
|
|
2173
|
+
] = None,
|
|
2174
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2175
|
+
_content_type: Optional[StrictStr] = None,
|
|
2176
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2177
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2178
|
+
) -> ApiResponse[str]:
|
|
2179
|
+
"""set connector type global restriction
|
|
2180
|
+
|
|
2181
|
+
|
|
2182
|
+
:param type: (required)
|
|
2183
|
+
:type type: str
|
|
2184
|
+
:param restricted: (required)
|
|
2185
|
+
:type restricted: bool
|
|
2186
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2187
|
+
number provided, it will be total request
|
|
2188
|
+
timeout. It can also be a pair (tuple) of
|
|
2189
|
+
(connection, read) timeouts.
|
|
2190
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2191
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2192
|
+
request; this effectively ignores the
|
|
2193
|
+
authentication in the spec for a single request.
|
|
2194
|
+
:type _request_auth: dict, optional
|
|
2195
|
+
:param _content_type: force content-type for the request.
|
|
2196
|
+
:type _content_type: str, Optional
|
|
2197
|
+
:param _headers: set to override the headers for a single
|
|
2198
|
+
request; this effectively ignores the headers
|
|
2199
|
+
in the spec for a single request.
|
|
2200
|
+
:type _headers: dict, optional
|
|
2201
|
+
:param _host_index: set to override the host_index for a single
|
|
2202
|
+
request; this effectively ignores the host_index
|
|
2203
|
+
in the spec for a single request.
|
|
2204
|
+
:type _host_index: int, optional
|
|
2205
|
+
:return: Returns the result object.
|
|
2206
|
+
""" # noqa: E501
|
|
2207
|
+
|
|
2208
|
+
_param = self._set_connector_restriction_serialize(
|
|
2209
|
+
type=type,
|
|
2210
|
+
restricted=restricted,
|
|
2211
|
+
_request_auth=_request_auth,
|
|
2212
|
+
_content_type=_content_type,
|
|
2213
|
+
_headers=_headers,
|
|
2214
|
+
_host_index=_host_index
|
|
2215
|
+
)
|
|
2216
|
+
|
|
2217
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2218
|
+
'200': "str",
|
|
2219
|
+
}
|
|
2220
|
+
response_data = self.api_client.call_api(
|
|
2221
|
+
*_param,
|
|
2222
|
+
_request_timeout=_request_timeout
|
|
2223
|
+
)
|
|
2224
|
+
response_data.read()
|
|
2225
|
+
return self.api_client.response_deserialize(
|
|
2226
|
+
response_data=response_data,
|
|
2227
|
+
response_types_map=_response_types_map,
|
|
2228
|
+
)
|
|
2229
|
+
|
|
2230
|
+
|
|
2231
|
+
@validate_call
|
|
2232
|
+
def set_connector_restriction_without_preload_content(
|
|
2233
|
+
self,
|
|
2234
|
+
type: StrictStr,
|
|
2235
|
+
restricted: StrictBool,
|
|
2236
|
+
_request_timeout: Union[
|
|
2237
|
+
None,
|
|
2238
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2239
|
+
Tuple[
|
|
2240
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2241
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2242
|
+
]
|
|
2243
|
+
] = None,
|
|
2244
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2245
|
+
_content_type: Optional[StrictStr] = None,
|
|
2246
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2247
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2248
|
+
) -> RESTResponseType:
|
|
2249
|
+
"""set connector type global restriction
|
|
2250
|
+
|
|
2251
|
+
|
|
2252
|
+
:param type: (required)
|
|
2253
|
+
:type type: str
|
|
2254
|
+
:param restricted: (required)
|
|
2255
|
+
:type restricted: bool
|
|
2256
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2257
|
+
number provided, it will be total request
|
|
2258
|
+
timeout. It can also be a pair (tuple) of
|
|
2259
|
+
(connection, read) timeouts.
|
|
2260
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2261
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2262
|
+
request; this effectively ignores the
|
|
2263
|
+
authentication in the spec for a single request.
|
|
2264
|
+
:type _request_auth: dict, optional
|
|
2265
|
+
:param _content_type: force content-type for the request.
|
|
2266
|
+
:type _content_type: str, Optional
|
|
2267
|
+
:param _headers: set to override the headers for a single
|
|
2268
|
+
request; this effectively ignores the headers
|
|
2269
|
+
in the spec for a single request.
|
|
2270
|
+
:type _headers: dict, optional
|
|
2271
|
+
:param _host_index: set to override the host_index for a single
|
|
2272
|
+
request; this effectively ignores the host_index
|
|
2273
|
+
in the spec for a single request.
|
|
2274
|
+
:type _host_index: int, optional
|
|
2275
|
+
:return: Returns the result object.
|
|
2276
|
+
""" # noqa: E501
|
|
2277
|
+
|
|
2278
|
+
_param = self._set_connector_restriction_serialize(
|
|
2279
|
+
type=type,
|
|
2280
|
+
restricted=restricted,
|
|
2281
|
+
_request_auth=_request_auth,
|
|
2282
|
+
_content_type=_content_type,
|
|
2283
|
+
_headers=_headers,
|
|
2284
|
+
_host_index=_host_index
|
|
2285
|
+
)
|
|
2286
|
+
|
|
2287
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2288
|
+
'200': "str",
|
|
2289
|
+
}
|
|
2290
|
+
response_data = self.api_client.call_api(
|
|
2291
|
+
*_param,
|
|
2292
|
+
_request_timeout=_request_timeout
|
|
2293
|
+
)
|
|
2294
|
+
return response_data.response
|
|
2295
|
+
|
|
2296
|
+
|
|
2297
|
+
def _set_connector_restriction_serialize(
|
|
2298
|
+
self,
|
|
2299
|
+
type,
|
|
2300
|
+
restricted,
|
|
2301
|
+
_request_auth,
|
|
2302
|
+
_content_type,
|
|
2303
|
+
_headers,
|
|
2304
|
+
_host_index,
|
|
2305
|
+
) -> RequestSerialized:
|
|
2306
|
+
|
|
2307
|
+
_host = None
|
|
2308
|
+
|
|
2309
|
+
_collection_formats: Dict[str, str] = {
|
|
2310
|
+
}
|
|
2311
|
+
|
|
2312
|
+
_path_params: Dict[str, str] = {}
|
|
2313
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2314
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2315
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2316
|
+
_files: Dict[
|
|
2317
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2318
|
+
] = {}
|
|
2319
|
+
_body_params: Optional[bytes] = None
|
|
2320
|
+
|
|
2321
|
+
# process the path parameters
|
|
2322
|
+
# process the query parameters
|
|
2323
|
+
if type is not None:
|
|
2324
|
+
|
|
2325
|
+
_query_params.append(('type', type))
|
|
2326
|
+
|
|
2327
|
+
if restricted is not None:
|
|
2328
|
+
|
|
2329
|
+
_query_params.append(('restricted', restricted))
|
|
2330
|
+
|
|
2331
|
+
# process the header parameters
|
|
2332
|
+
# process the form parameters
|
|
2333
|
+
# process the body parameter
|
|
2334
|
+
|
|
2335
|
+
|
|
2336
|
+
# set the HTTP header `Accept`
|
|
2337
|
+
if 'Accept' not in _header_params:
|
|
2338
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2339
|
+
[
|
|
2340
|
+
'*/*'
|
|
2341
|
+
]
|
|
2342
|
+
)
|
|
2343
|
+
|
|
2344
|
+
|
|
2345
|
+
# authentication setting
|
|
2346
|
+
_auth_settings: List[str] = [
|
|
2347
|
+
'QAnswer-Api-Key',
|
|
2348
|
+
'Bearer'
|
|
2349
|
+
]
|
|
2350
|
+
|
|
2351
|
+
return self.api_client.param_serialize(
|
|
2352
|
+
method='PUT',
|
|
2353
|
+
resource_path='/api/connectors/set-global-restriction',
|
|
2354
|
+
path_params=_path_params,
|
|
2355
|
+
query_params=_query_params,
|
|
2356
|
+
header_params=_header_params,
|
|
2357
|
+
body=_body_params,
|
|
2358
|
+
post_params=_form_params,
|
|
2359
|
+
files=_files,
|
|
2360
|
+
auth_settings=_auth_settings,
|
|
2361
|
+
collection_formats=_collection_formats,
|
|
2362
|
+
_host=_host,
|
|
2363
|
+
_request_auth=_request_auth
|
|
2364
|
+
)
|
|
2365
|
+
|
|
2366
|
+
|