Files
task-stream/libs/api/tracker/application/src/lib/ports/notification-mailer.ts
Josep Piguillem efa06a0723 feat: notifications in the app and, optionally, by e-mail
Derived from events and kept per person: whoever a ticket is assigned to,
whoever reports or works on it when it moves, fails QA or gets a comment,
and whoever joins a project. Never about what you did yourself, once per
event. They arrive live through a subscription to a bell in the header,
and are copied by e-mail to whoever turns it on when SMTP_URL is set.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 09:19:59 +02:00

17 lines
467 B
TypeScript

import { NotificationReadModel } from '@task-stream/api/tracker/domain';
export interface MailRecipient {
name: string;
email: string;
}
/** E-mail copies of notifications, for whoever asked for them. */
export abstract class NotificationMailer {
/** False when no mail server is configured: nobody is offered e-mail. */
abstract get enabled(): boolean;
abstract send(
to: MailRecipient,
notification: NotificationReadModel,
): Promise<void>;
}