# GDrive Connector Specifications

## Overview
The GDrive Connector is responsible for syncing folders, files, and metadata from GDrive.

## Responsibilities
- Sync folders and files.
- Sync metadata for files and folders.
- Sync shared members and their roles.

## Technical Specifications

### Data Synced
- **Folders**: Metadata and hierarchy.
- **Files**: Supported file types include documents, markdown files, Excel sheets, PDFs, and tables.
- **Metadata**: File size, creation date, last modified date, and owner.
- **Shared Members**: Users with access to the files and their roles.

### Sync Process
- Periodic syncs fetch new and updated data since the last sync.
- Data is stored in the `drive_folders` and `drive_files` tables.

## Implementation Details

### OAuth Integration
- Uses OAuth to authenticate and access GDrive data.
- Tokens are refreshed automatically to maintain access.

### Error Handling
- Retries failed syncs with exponential backoff.
- Logs errors for observability and debugging.

## User Roles and Permissions

### Administrators
- Configure sync settings for GDrive.
- Monitor sync logs and performance.

### Regular Users
- Access synced drive data based on their roles and permissions.