Stone.js API
    Preparing search index...

    Options for the in-app channel.

    interface InAppChannelConfig {
        channelFor?: (recipient: Recipient) => string;
        driver?: NotificationDriver;
        event?: string;
        factory?: NotificationChannelFactory;
        module?: unknown;
        name: string;
        [key: string]: unknown;
    }

    Hierarchy (View Summary)

    Indexable

    • [key: string]: unknown

      Anything the driver needs.

    Index
    channelFor?: (recipient: Recipient) => string

    The channel to broadcast on. Defaults to user.{id}.notifications.

    Which driver builds it. Defaults to log, and ignored when factory is given.

    event?: string

    The event name clients listen for. Defaults to notification.

    Build the channel yourself, instead of naming a driver this package ships.

    This is how an application reaches a provider nobody here has heard of, and how sms and push are done: they are named in the types and not implemented, because a channel that picked a vendor would be wrong for everyone who chose a different one.

    It is declared here, with the other channels, rather than registered on the manager from a provider: the container is rebuilt for every event, so anything registered imperatively during one event is gone for the next.

    module?: unknown

    A class the container builds into a channel.

    What @NotificationChannel('sms') declares. Built through the container, so the channel's constructor is auto-wired like any other service and can ask for whatever it needs.

    name: string

    The name it is resolved under.