NotificationPlugin(options: NotificationPluginOptions): IPlugin
Creates the plugin factory.
Registers an INotifier under CAPABILITIES.NOTIFICATION backed by the
configured channels and providers.
Example 1
Example 1
import { NotificationPlugin } from '@setu-ts/notification-plugin'; app.register(NotificationPlugin({ channels: { email: { provider: 'mail' }, sms: { provider: 'twilio', options: { accountSid: '…', authToken: '…', from: '+1234' }, }, slack: { provider: 'slack', options: { webhookUrl: 'https://hooks.slack.com/…' } }, }, }));
options: NotificationPluginOptions
Plugin configuration