Documentation
    Preparing search index...

    Module @quatrain/messaging

    @quatrain/messaging

    The unified messaging and notification abstraction for the Quatrain framework. This package provides an interface for sending transactional emails, SMS, push notifications, and in-app messages.

    Modern applications need to reach users across various channels. The @quatrain/messaging package abstracts away the specific provider logic (Firebase Cloud Messaging, SendGrid, Twilio, etc.) behind a clean, unified API, allowing you to easily swap providers without rewriting your business logic.

    • Messaging: The static registry where you configure messaging adapters.
    • AbstractMessagingAdapter: The base class for defining channel-specific messaging implementations.
    npm install @quatrain/messaging
    # You will also need an adapter, e.g.:
    npm install @quatrain/messaging-firebase

    Just like other Quatrain abstractions, you register adapters for different messaging channels (e.g., 'email', 'push', 'sms') to the central registry.

    For concrete examples and usage guides, please refer to the How-To Guide.

    AGPL-3.0-only

    Classes

    AbstractMessagingAdapter
    MessageFormatter
    Messaging

    Interfaces

    EmailCapableAdapter
    MessageType
    MessagingParameters
    NotificationCapableAdapter
    NotificationMessage
    TextCapableAdapter

    Type Aliases

    MessagingRecipient