|
9 | 9 |
|
10 | 10 |
|
11 | 11 | # Type definitions for better type safety and documentation |
12 | | -class ConnectorOptions(TypedDict, total=False): |
13 | | - """Options for connector operations.""" |
14 | | - |
15 | | - connectorid: Optional[Union[str, int]] |
16 | | - connectorname: Optional[str] |
17 | | - connectortype: Optional[str] |
18 | | - apikey: Optional[str] |
19 | | - username: Optional[str] |
20 | | - connectordesc: Optional[str] |
21 | | - dbhost: Optional[str] |
22 | | - dbport: Optional[int] |
23 | | - dbname: Optional[str] |
24 | | - tablename: Optional[str] |
25 | | - status: Optional[str] |
26 | | - |
27 | | - |
28 | 12 | class UserOptions(TypedDict, total=False): |
29 | 13 | """Options for user operations.""" |
30 | 14 |
|
@@ -960,169 +944,6 @@ def unlink_processing_activity_from_legal_basis( |
960 | 944 | "ProcessingActivityUnlinkLegalBasis", data, request_metadata |
961 | 945 | ) |
962 | 946 |
|
963 | | - # Connector Management |
964 | | - def list_supported_connectors( |
965 | | - self, request_metadata: Optional[Dict[str, Any]] = None |
966 | | - ) -> Dict[str, Any]: |
967 | | - """List all supported connector types.""" |
968 | | - return self._make_request( |
969 | | - "ConnectorListSupportedConnectors", None, request_metadata |
970 | | - ) |
971 | | - |
972 | | - def list_connectors( |
973 | | - self, |
974 | | - offset: int = 0, |
975 | | - limit: int = 10, |
976 | | - request_metadata: Optional[Dict[str, Any]] = None, |
977 | | - ) -> Dict[str, Any]: |
978 | | - """List connectors with pagination.""" |
979 | | - data = {"offset": offset, "limit": limit} |
980 | | - return self._make_request("ConnectorListConnectors", data, request_metadata) |
981 | | - |
982 | | - def create_connector( |
983 | | - self, |
984 | | - options: ConnectorOptions, |
985 | | - request_metadata: Optional[Dict[str, Any]] = None, |
986 | | - ) -> Dict[str, Any]: |
987 | | - """Creates a new database connector with the specified configuration.""" |
988 | | - data = { |
989 | | - "connectorname": options.get("connectorname"), |
990 | | - "connectortype": options.get("connectortype"), |
991 | | - "connectordesc": options.get("connectordesc"), |
992 | | - "username": options.get("username"), |
993 | | - "apikey": options.get("apikey"), |
994 | | - "dbhost": options.get("dbhost"), |
995 | | - "dbport": options.get("dbport"), |
996 | | - "dbname": options.get("dbname"), |
997 | | - "tablename": options.get("tablename"), |
998 | | - "status": options.get("status"), |
999 | | - } |
1000 | | - return self._make_request("ConnectorCreate", data, request_metadata) |
1001 | | - |
1002 | | - def update_connector( |
1003 | | - self, |
1004 | | - connector_ref: Union[str, int], |
1005 | | - options: ConnectorOptions, |
1006 | | - request_metadata: Optional[Dict[str, Any]] = None, |
1007 | | - ) -> Dict[str, Any]: |
1008 | | - """Update an existing connector.""" |
1009 | | - data = {**options} |
1010 | | - if isinstance(connector_ref, int) or str(connector_ref).isdigit(): |
1011 | | - data["connectorid"] = int(connector_ref) |
1012 | | - else: |
1013 | | - data["connectorname"] = str(connector_ref) |
1014 | | - return self._make_request("ConnectorUpdate", data, request_metadata) |
1015 | | - |
1016 | | - def validate_connector_connectivity( |
1017 | | - self, |
1018 | | - connector_ref: Union[str, int], |
1019 | | - options: ConnectorOptions, |
1020 | | - request_metadata: Optional[Dict[str, Any]] = None, |
1021 | | - ) -> Dict[str, Any]: |
1022 | | - """Validate connector connectivity.""" |
1023 | | - data = { |
1024 | | - "connectortype": options.get("connectortype"), |
1025 | | - "connectordesc": options.get("connectordesc"), |
1026 | | - "username": options.get("username"), |
1027 | | - "apikey": options.get("apikey"), |
1028 | | - "dbhost": options.get("dbhost"), |
1029 | | - "dbport": options.get("dbport"), |
1030 | | - "dbname": options.get("dbname"), |
1031 | | - "tablename": options.get("tablename"), |
1032 | | - "status": options.get("status"), |
1033 | | - } |
1034 | | - if isinstance(connector_ref, int) or str(connector_ref).isdigit(): |
1035 | | - data["connectorid"] = int(connector_ref) |
1036 | | - data["connectorname"] = options.get("connectorname") |
1037 | | - else: |
1038 | | - data["connectorname"] = str(connector_ref) |
1039 | | - return self._make_request( |
1040 | | - "ConnectorValidateConnectivity", data, request_metadata |
1041 | | - ) |
1042 | | - |
1043 | | - def delete_connector( |
1044 | | - self, |
1045 | | - connector_ref: Union[str, int], |
1046 | | - request_metadata: Optional[Dict[str, Any]] = None, |
1047 | | - ) -> Dict[str, Any]: |
1048 | | - """Delete a connector.""" |
1049 | | - data: Dict[str, Any] = {} |
1050 | | - if isinstance(connector_ref, int) or str(connector_ref).isdigit(): |
1051 | | - data["connectorid"] = int(connector_ref) |
1052 | | - else: |
1053 | | - data["connectorname"] = str(connector_ref) |
1054 | | - return self._make_request("ConnectorDelete", data, request_metadata) |
1055 | | - |
1056 | | - def get_table_metadata( |
1057 | | - self, |
1058 | | - connector_ref: Union[str, int], |
1059 | | - options: ConnectorOptions, |
1060 | | - request_metadata: Optional[Dict[str, Any]] = None, |
1061 | | - ) -> Dict[str, Any]: |
1062 | | - """Get table metadata for a connector.""" |
1063 | | - data = { |
1064 | | - "connectortype": options.get("connectortype"), |
1065 | | - "connectordesc": options.get("connectordesc"), |
1066 | | - "username": options.get("username"), |
1067 | | - "apikey": options.get("apikey"), |
1068 | | - "dbhost": options.get("dbhost"), |
1069 | | - "dbport": options.get("dbport"), |
1070 | | - "dbname": options.get("dbname"), |
1071 | | - "tablename": options.get("tablename"), |
1072 | | - "status": options.get("status"), |
1073 | | - } |
1074 | | - if isinstance(connector_ref, int) or str(connector_ref).isdigit(): |
1075 | | - data["connectorid"] = int(connector_ref) |
1076 | | - data["connectorname"] = options.get("connectorname") |
1077 | | - else: |
1078 | | - data["connectorname"] = str(connector_ref) |
1079 | | - return self._make_request("ConnectorGetTableMetaData", data, request_metadata) |
1080 | | - |
1081 | | - def connector_get_user_data( |
1082 | | - self, |
1083 | | - mode: str, |
1084 | | - identity: str, |
1085 | | - connector_ref: Union[str, int], |
1086 | | - request_metadata: Optional[Dict[str, Any]] = None, |
1087 | | - ) -> Dict[str, Any]: |
1088 | | - """Get user data from a connector.""" |
1089 | | - data: Dict[str, Any] = {"mode": mode, "identity": identity} |
1090 | | - if isinstance(connector_ref, int) or str(connector_ref).isdigit(): |
1091 | | - data["connectorid"] = int(connector_ref) |
1092 | | - else: |
1093 | | - data["connectorname"] = str(connector_ref) |
1094 | | - return self._make_request("ConnectorGetUserData", data, request_metadata) |
1095 | | - |
1096 | | - def connector_get_user_extra_data( |
1097 | | - self, |
1098 | | - mode: str, |
1099 | | - identity: str, |
1100 | | - connector_ref: Union[str, int], |
1101 | | - request_metadata: Optional[Dict[str, Any]] = None, |
1102 | | - ) -> Dict[str, Any]: |
1103 | | - """Get user extra data from a connector.""" |
1104 | | - data: Dict[str, Any] = {"mode": mode, "identity": identity} |
1105 | | - if isinstance(connector_ref, int) or str(connector_ref).isdigit(): |
1106 | | - data["connectorid"] = int(connector_ref) |
1107 | | - else: |
1108 | | - data["connectorname"] = str(connector_ref) |
1109 | | - return self._make_request("ConnectorGetUserExtraData", data, request_metadata) |
1110 | | - |
1111 | | - def connector_delete_user( |
1112 | | - self, |
1113 | | - mode: str, |
1114 | | - identity: str, |
1115 | | - connector_ref: Union[str, int], |
1116 | | - request_metadata: Optional[Dict[str, Any]] = None, |
1117 | | - ) -> Dict[str, Any]: |
1118 | | - """Delete user data from a connector.""" |
1119 | | - data: Dict[str, Any] = {"mode": mode, "identity": identity} |
1120 | | - if isinstance(connector_ref, int) or str(connector_ref).isdigit(): |
1121 | | - data["connectorid"] = int(connector_ref) |
1122 | | - else: |
1123 | | - data["connectorname"] = str(connector_ref) |
1124 | | - return self._make_request("ConnectorDeleteUser", data, request_metadata) |
1125 | | - |
1126 | 947 | # Group Management |
1127 | 948 | def create_group( |
1128 | 949 | self, |
|
0 commit comments