Files
jmap-webmail/lib/template-types.ts
T
Matthieu MALVACHE 7da9fa61e2 feat(templates): add email templates with placeholder variables and composer integration
Local-storage templates with dynamic {{variable}} placeholders that auto-fill
from composer context (recipient, sender, date/time). Includes template manager,
category filtering, quick picker in composer toolbar, and settings tab.
48 tests covering placeholder extraction, filling, and variable suggestions.
2026-02-17 01:34:13 +01:00

32 lines
573 B
TypeScript

export interface EmailTemplate {
id: string;
name: string;
subject: string;
body: string;
category: string;
defaultRecipients?: {
to?: string[];
cc?: string[];
bcc?: string[];
};
identityId?: string;
isFavorite: boolean;
createdAt: string;
updatedAt: string;
}
export interface PlaceholderVariable {
name: string;
value: string;
}
export const BUILT_IN_PLACEHOLDERS = [
'recipient_name',
'company',
'date',
'day_of_week',
'sender_name',
] as const;
export type BuiltInPlaceholder = (typeof BUILT_IN_PLACEHOLDERS)[number];