Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Drive Connectors - Fix #66

Merged
merged 4 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions aryaxai/common/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
14 changes: 11 additions & 3 deletions aryaxai/core/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down