diff --git a/aryaxai/common/types.py b/aryaxai/common/types.py index b07cb76..8bac317 100644 --- a/aryaxai/common/types.py +++ b/aryaxai/common/types.py @@ -63,5 +63,11 @@ class S3Config(TypedDict): secret_key: str class GDriveConfig(TypedDict): - gdrive_file_id: str - gdrive_file_name: str + project_id: str + type: str + private_key_id: str + private_key: str + client_email: str + client_id: str + auth_uri: str + token_uri: str diff --git a/aryaxai/core/project.py b/aryaxai/core/project.py index e30c1a8..6383488 100755 --- a/aryaxai/core/project.py +++ b/aryaxai/core/project.py @@ -2636,14 +2636,22 @@ def create_data_connectors( Validate.value_against_list( "gdrive config", list(gdrive_config.keys()), - ["gdrive_file_id", "gdrive_file_name"] + ["project_id", "type", "private_key_id", "private_key", "client_email", "client_id", "auth_uri", "token_uri"] ) payload = payload = { "link_service": { "service_name": data_connector_name, - "gdrive_file_id": gdrive_config.get("gdrive_file_id"), - "gdrive_file_name": gdrive_config.get("gdrive_file_name") + "service_account_json": { + "type": gdrive_config.get("type"), + "project_id": gdrive_config.get("project_id"), + "private_key_id": gdrive_config.get("private_key_id"), + "private_key": gdrive_config.get("private_key"), + "client_email": gdrive_config.get("client_email"), + "client_id": gdrive_config.get("client_id"), + "auth_uri": gdrive_config.get("auth_uri"), + "token_uri": gdrive_config.get("token_uri") + } }, "link_service_type": data_connector_type }