@dbs-portal/module-notification
v1.0.0
Published
Real-time notification system with WebSocket support, notification center UI, and multi-channel delivery
Downloads
5
Readme
@dbs-portal/module-notification
Real-time notification system with WebSocket support, notification center UI, and multi-channel delivery
Installation
yarn add @dbs-portal/module-notificationUsage
import { Notification, createNotification } from '@dbs-portal/module-notification'
// Use the default instance
const result = await defaultNotification.process(data)
// Or create a custom instance
const customNotification = createNotification({
enabled: true,
debug: true,
})
const customResult = await customNotification.process(data)API Reference
Classes
Notification
Main class for @dbs-portal/module-notification functionality.
Constructor:
new Notification(config?: NotificationConfig)
Methods:
getConfig(): NotificationConfig- Get current configurationprocess<T>(data: T): Promise<NotificationResult<T>>- Process data
Functions
createNotification(config?)
Factory function to create a new Notification instance.
Development
# Build the package
yarn build
# Run tests
yarn test
# Type checking
yarn type-check
# Linting
yarn lint