UNPKG

atozas-push-notification

Version:

Real-time push notifications across platforms using socket.io

69 lines 1.78 kB
import { NotificationData, NotificationOptions, ClientConfig, NotificationPermission } from './types'; export declare class NotificationDisplayManager { private config; private permissionStatus; private customContainer; private activeNotifications; constructor(config: ClientConfig); /** * Initialize notification system */ private init; /** * Request notification permission */ requestPermission(): Promise<NotificationPermission>; /** * Display notification */ displayNotification(notification: NotificationData, options?: NotificationOptions): Promise<void>; /** * Check if browser notifications can be used */ private canUseBrowserNotifications; /** * Show browser notification */ private showBrowserNotification; /** * Show custom UI notification */ private showCustomNotification; /** * Close custom notification */ private closeCustomNotification; /** * Handle notification click */ private handleNotificationClick; /** * Play notification sound */ private playNotificationSound; /** * Create custom UI container */ private createCustomUIContainer; /** * Inject notification styles */ private injectNotificationStyles; /** * Escape HTML to prevent XSS */ private escapeHtml; /** * Close all notifications */ closeAllNotifications(): void; /** * Get permission status */ getPermissionStatus(): NotificationPermission; /** * Set notification click handler */ onNotificationClick(callback: (notification: NotificationData) => void): void; } //# sourceMappingURL=notification-display.d.ts.map