import type { EventsService } from '@omnitron-dev/titan-events'; import type { NotificationPayload, NotificationRecipient, SendResult, BroadcastResult } from './notifications.types.js'; export declare const NOTIFICATIONS_EVENTS: { readonly NOTIFICATION_SENDING: "notifications.notification.sending"; readonly NOTIFICATION_SENT: "notifications.notification.sent"; readonly NOTIFICATION_FAILED: "notifications.notification.failed"; readonly BROADCAST_STARTING: "notifications.broadcast.starting"; readonly BROADCAST_COMPLETED: "notifications.broadcast.completed"; readonly BROADCAST_FAILED: "notifications.broadcast.failed"; readonly NOTIFICATION_SCHEDULED: "notifications.notification.scheduled"; readonly NOTIFICATION_CANCELLED: "notifications.notification.cancelled"; readonly CHANNEL_DELIVERY_SUCCESS: "notifications.channel.delivery.success"; readonly CHANNEL_DELIVERY_FAILED: "notifications.channel.delivery.failed"; readonly DLQ_MESSAGE_ADDED: "notifications.dlq.message.added"; readonly DLQ_MESSAGE_REQUEUED: "notifications.dlq.message.requeued"; readonly INAPP_NOTIFICATION_READ: "notifications.inapp.notification.read"; readonly INAPP_NOTIFICATION_DISMISSED: "notifications.inapp.notification.dismissed"; }; export type NotificationsEventName = (typeof NOTIFICATIONS_EVENTS)[keyof typeof NOTIFICATIONS_EVENTS]; export interface NotificationSendingEvent { recipient: NotificationRecipient; payload: NotificationPayload; channels?: string[]; timestamp: number; } export interface NotificationSentEvent { result: SendResult; recipient: NotificationRecipient; payload: NotificationPayload; channels?: string[]; timestamp: number; durationMs: number; } export interface NotificationFailedEvent { error: string; recipient: NotificationRecipient; payload: NotificationPayload; channels?: string[]; timestamp: number; } export interface BroadcastStartingEvent { recipients: NotificationRecipient[]; payload: NotificationPayload; options?: Record; timestamp: number; } export interface BroadcastCompletedEvent { result: BroadcastResult; payload: NotificationPayload; timestamp: number; durationMs: number; } export interface ChannelDeliveryEvent { channel: string; recipient: NotificationRecipient; notificationId: string; success: boolean; error?: string; messageId?: string; timestamp: number; } export interface InAppNotificationEvent { recipientId: string; notificationId: string; action: 'read' | 'dismissed'; timestamp: number; } export declare class NotificationsEventEmitter { private readonly events?; constructor(events?: EventsService | undefined); get isAvailable(): boolean; emitSending(data: Omit): Promise; emitSent(data: Omit): Promise; emitFailed(data: Omit): Promise; emitBroadcastStarting(data: Omit): Promise; emitBroadcastCompleted(data: Omit): Promise; emitChannelDelivery(data: Omit): Promise; emitInAppAction(data: Omit): Promise; emitScheduled(notificationId: string, scheduledAt: number): Promise; emitDLQAdded(notificationId: string, channel: string, error: string): Promise; private emit; } //# sourceMappingURL=notifications.events.d.ts.map