Setu-TS
    Preparing search index...

    Function NotificationPlugin

    NotificationPlugin factory — registers an INotifier under CAPABILITIES.NOTIFICATION.

    import { NotificationPlugin } from '@setu-ts/notification-plugin';

    app.register(NotificationPlugin({
    channels: {
    email: { provider: 'mail' },
    sms: { provider: 'twilio', options: { accountSid: '…', authToken: '…', from: '+1234' } },
    },
    }));

    0.1.0

    • Creates the plugin factory.

      Registers an INotifier under CAPABILITIES.NOTIFICATION backed by the configured channels and providers.

      Parameters

      Returns IPlugin

      The plugin instance

      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/…' } },
      },
      }));

      0.1.0