interface NotificationMessage
Since 0.1.0

A notification dispatched across one or more channels.

Properties

readonly
channels: readonly string[]

Channel names to dispatch on (e.g. ['email', 'sms']).

readonly
to: Readonly<Record<string, string>>

Recipient addresses keyed by channel (e.g. { email: '…', phone: '…' }).

readonly
optional
subject: string

Subject/title, for channels that support one.

readonly
body: string

Notification body.

readonly
optional
metadata: Readonly<Record<string, unknown>>

Channel-specific extras.

The four built-in channels (email, sms, push, slack) accept these but do not read them; they exist for custom channel implementations registered alongside the built-ins.

Usage

import { type NotificationMessage } from "notification-plugin/src/index.ts";