Classes

c
EmailChannel(
name: string,
mailer: IMailer
)

EmailChannel dispatches notifications through the resolved IMailer.

c
FcmProvider(options: FcmProviderOptions)

FcmProvider implements PushTransport via the FCM HTTP v1 API.

c
NotificationService(channels: Map<string, NotificationChannel>)

NotificationService implements INotifier, fanning out a single NotificationMessage across all requested channels in parallel via Promise.allSettled. If any channel fails, it throws an AggregateError whose members each name their channel (X8-12).

c
PushChannel(
name: string,
transport: PushTransport
)

PushChannel dispatches notifications through a PushTransport (e.g. FcmProvider).

c
SlackChannel(
name: string,
transport: SlackTransport
)

SlackChannel dispatches notifications through a SlackTransport (e.g. SlackProvider).

c
SlackProvider(options: SlackProviderOptions)

SlackProvider implements SlackTransport via a Slack incoming webhook URL.

c
SmsChannel(
name: string,
transport: SmsTransport
)

SmsChannel dispatches notifications through an SmsTransport (e.g. TwilioProvider).

c
TwilioProvider(options: TwilioProviderOptions)

TwilioProvider implements SmsTransport via the Twilio Accounts SID / Messages endpoint.

Functions

Interfaces

I
FcmProviderOptions

Options for FcmProvider.

  • clientEmail: string

    Service-account email that signs the OAuth2 assertion. Required unless tokenSource is supplied.

  • http: INotificationHttp
  • privateKey: string

    PEM PKCS#8 private key for the service account. Required unless tokenSource is supplied.

  • projectId: string

    Firebase project id; addressed by the v1 messages:send URL.

  • runtime: IRuntimeServices

    Runtime services providing Web Crypto and the wall clock, used to sign the assertion and expire cached tokens. Required unless tokenSource is supplied; the plugin passes this automatically.

  • tokenSource: FcmTokenSource

    Overrides how access tokens are acquired — e.g. from a GCP metadata server instead of a locally held key. When set, the three credential fields above are unused.

I
FcmTokenSource

Supplies OAuth2 access tokens for FCM HTTP v1.

I
INotificationHttp

Injectable HTTP seam for notification providers.

I
INotifier

Multi-channel notification dispatcher.

I
MailChannelConfig

Email channel configuration.

I
NotificationMessage

A notification dispatched across one or more channels.

I
NotificationPluginOptions

Options for NotificationPlugin.

I
PushMessage

An outgoing push-notification message shaped by PushTransport.

I
PushTransport

Push-notification transport port implemented by FcmProvider.

I
I
SlackTransport

Slack transport port implemented by SlackProvider.

I
SmsMessage

An outgoing SMS message shaped by SmsTransport.

I
SmsTransport

SMS transport port implemented by TwilioProvider.

Type Aliases

T
NotificationTransport = IMailer | SmsTransport | PushTransport | SlackTransport

Union of every transport a channel can be built on, as returned by createProvider.

T
ProviderType = ChannelConfig["provider"]

Provider type selector — the ChannelConfig discriminant.

Usage

import * as Multi_channel_notification_plugin__email__SMS__push__Slack___Provides__NotificationPlugin___factory____NotificationService___the__INotifier__implementation___channel_factories___createChannel____provider_factories___createProvider____four_channel_classes___EmailChannel____SmsChannel____PushChannel____SlackChannel____three_HTTP_providers___TwilioProvider____FcmProvider____SlackProvider____the_shared__INotificationHttp__seam_plus_its_fetch_backed_default___createDefaultNotificationHttp____and_all_option_type_shapes___The_plugin_registers_an__INotifier__under__CAPABILITIES_NOTIFICATION___ from "notification-plugin/src/index.ts";