UNPKG

atozas-push-notification

Version:

Real-time push notifications across platforms using socket.io

30 lines 1.49 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.VERSION = exports.createNotification = exports.generateNotificationId = exports.NotificationDisplayManager = exports.AtozasPushNotificationServer = exports.AtozasPushNotificationClient = void 0; // Main exports var client_1 = require("./client"); Object.defineProperty(exports, "AtozasPushNotificationClient", { enumerable: true, get: function () { return client_1.AtozasPushNotificationClient; } }); var server_1 = require("./server"); Object.defineProperty(exports, "AtozasPushNotificationServer", { enumerable: true, get: function () { return server_1.AtozasPushNotificationServer; } }); var notification_display_1 = require("./notification-display"); Object.defineProperty(exports, "NotificationDisplayManager", { enumerable: true, get: function () { return notification_display_1.NotificationDisplayManager; } }); // Utility functions const generateNotificationId = () => { return `notification_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`; }; exports.generateNotificationId = generateNotificationId; const createNotification = (title, message, data, options) => { return { id: (0, exports.generateNotificationId)(), title, message, timestamp: Date.now(), data, priority: 'normal', ...options }; }; exports.createNotification = createNotification; // Version exports.VERSION = '1.1.0'; //# sourceMappingURL=index.js.map