Merge pull request #90 from christianlouis/copilot/add-google-import-labels

Add configurable Gmail import labels with opinionated defaults
This commit is contained in:
Christian Krakau-Louis
2026-03-26 19:36:57 +01:00
committed by GitHub
12 changed files with 401 additions and 12 deletions
+10
View File
@@ -199,6 +199,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;
@@ -438,6 +440,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 ─────────────────────────────────────────────────────