wip
This commit is contained in:
@@ -14,7 +14,14 @@ export * from './use-cases/NotificationPreferencesUseCases';
|
||||
export * from './ports/INotificationGateway';
|
||||
|
||||
// Re-export domain types for convenience
|
||||
export type { Notification, NotificationProps, NotificationStatus, NotificationData } from '../domain/entities/Notification';
|
||||
export type {
|
||||
Notification,
|
||||
NotificationProps,
|
||||
NotificationStatus,
|
||||
NotificationData,
|
||||
NotificationUrgency,
|
||||
NotificationAction,
|
||||
} from '../domain/entities/Notification';
|
||||
export type { NotificationPreference, NotificationPreferenceProps, ChannelPreference, TypePreference } from '../domain/entities/NotificationPreference';
|
||||
export type { NotificationType } from '../domain/value-objects/NotificationType';
|
||||
export type { NotificationChannel } from '../domain/value-objects/NotificationChannel';
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user