This commit is contained in:
2025-12-09 22:45:03 +01:00
parent 3adf2e5e94
commit 3659d25e52
20 changed files with 2537 additions and 85 deletions

View File

@@ -21,6 +21,17 @@ export interface SendNotificationCommand {
body: string;
data?: NotificationData;
actionUrl?: string;
/** How urgently to display this notification (default: 'silent') */
urgency?: 'silent' | 'toast' | 'modal';
/** Whether this notification requires a response before dismissal */
requiresResponse?: boolean;
/** Action buttons for modal notifications */
actions?: Array<{
label: string;
type: 'primary' | 'secondary' | 'danger';
href?: string;
actionId?: string;
}>;
/** Override channels (skip preference check) */
forceChannels?: NotificationChannel[];
}
@@ -91,8 +102,11 @@ export class SendNotificationUseCase {
title: command.title,
body: command.body,
channel,
urgency: command.urgency,
data: command.data,
actionUrl: command.actionUrl,
actions: command.actions,
requiresResponse: command.requiresResponse,
});
// Save to repository (in_app channel) or attempt delivery (external channels)