feat: add configurable gmail import labels

Agent-Logs-Url: https://github.com/christianlouis/InboxConverge/sessions/4d504045-2740-4bab-b51e-960fe4dafe4b

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-03-26 18:20:09 +00:00
parent 5bf4cbc2e9
commit 5711a56569
12 changed files with 405 additions and 12 deletions
+10
View File
@@ -141,6 +141,8 @@ export interface GmailCredential {
user_id: number;
gmail_email: string;
is_valid: boolean;
import_label_templates: string[];
default_import_label_templates: string[];
last_verified_at?: string | null;
created_at: string;
updated_at: string;
@@ -336,6 +338,14 @@ export const gmailApi = {
const response = await api.post<GmailDebugEmailResponse>('/providers/gmail/debug-email');
return response.data;
},
/** Update the labels applied to imported Gmail messages. */
async updateImportLabels(importLabelTemplates: string[]): Promise<GmailCredential> {
const response = await api.put<GmailCredential>('/providers/gmail-credential/labels', {
import_label_templates: importLabelTemplates,
});
return response.data;
},
};
// ── SMTP Config API ─────────────────────────────────────────────────────