Backstage
    Preparing search index...

    Notification processors are used to modify the notification parameters or sending the notifications to external systems.

    Notification modules should utilize the notificationsProcessingExtensionPoint to add new processors to the system.

    Notification processing flow:

    1. New notification send request is received
    2. For all notification processors registered, processOptions function is called to process the notification options
    3. Notification recipients are resolved from the options
    4. For each recipient, preProcess function is called to pre-process the notification
    5. Notification is saved to the database and sent to the Backstage UI
    6. For each recipient, postProcess function is called to post-process the notification
    interface NotificationProcessor {
        getName(): string;
        getNotificationFilters?(): NotificationProcessorFilters;
        postProcess?(
            notification: Notification,
            options: NotificationSendOptions,
        ): Promise<void>;
        preProcess?(
            notification: Notification,
            options: NotificationSendOptions,
        ): Promise<Notification>;
        processOptions?(
            options: NotificationSendOptions,
        ): Promise<NotificationSendOptions>;
    }
    Index

    Methods

    • Post process notification after sending it to Backstage UI.

      Can be used to send the notification to external services.

      postProcess functions are called for each notification recipient individually or once for broadcast notification AFTER the notification has been sent to the Backstage UI.

      Parameters

      Returns Promise<void>

    • Pre-process notification before sending it to Backstage UI.

      Can be used to send the notification to external services or to decorate the notification with additional information. The notification is saved to database and sent to Backstage UI after all pre-process functions have run. The notification options passed here are already processed by processOptions functionality.

      preProcess functions are called for each notification recipient individually or once for broadcast notification BEFORE the notification has been sent to the Backstage UI.

      Parameters

      Returns Promise<Notification>

      The same notification or a modified version of it