- Adjust AppendReplyToDraft request payload:
* `mailbox` is only required for IMAP accounts; Graph API ignores it
* Remove `draft_folder_path`; IMAP automatically uses `mailbox` attribute to filter
- API now returns `ReplyDraft` containing:
* `id` of the created draft
* mailbox name of the draft
- Add `folder_limit` field to account model
- Support limiting sync per folder/label for both IMAP and Gmail API accounts
- Ensures each folder/label syncs at most `folder_limit` messages
- Changed `list-messages` API from page/page_size to cursor/next_page_token
- Aligns pagination approach with Gmail API for easier integration
- Frontend updates to handle cursor-based navigation
- Add `ExternalOAuth2Request` validation to ensure mutual dependency between
`oauth2_id` and `refresh_token`.
- Upsert external OAuth2 tokens for an account:
- If only `access_token` is provided, RustMailer stores it directly.
- If both `oauth2_id` and `refresh_token` are provided, RustMailer can refresh
the access token using stored client credentials.
- Update REST API endpoint to `configure_external_oauth2` with proper OpenAPI docs.
- Add gRPC `ExternalOAuth2Request` message and corresponding `UpsertExternalOAuth2Token` RPC.
- Added REST endpoint `POST /append-reply-to-draft/:account_id` that creates a reply draft linked to the original email thread with appropriate headers (`References`, `In-Reply-To`).
- Added equivalent gRPC method for creating and appending reply drafts.
- Add two new APIs to list email threads and fetch all messages within a thread
- Create a new email thread table to store thread information
- Implement method to extract thread_id from emails to support thread association queries
- Added unified search interface to query messages by email address
- Implemented both OpenAPI and gRPC endpoints
- Introduced new index table to optimize email-based lookups