Member Junction
    Preparing search index...

    Multi-provider note: callers under a non-default provider should set service.Provider = component.ProviderToUse before invoking any methods.

    Index

    Constructors

    Properties

    ShouldSuppressToast?: (statusObj: Record<string, unknown>) => boolean

    Optional callback that consuming apps can set to suppress toast notifications for specific events (e.g., when the user is actively viewing the conversation that triggered the notification). Return true to suppress the toast. The notification DB record is still created and the badge count still updates.

    tabChange$: Observable<unknown> = ...
    Notifications$: Observable<MJUserNotificationEntity[]> = ...

    Observable stream of the current user's notifications, derived from UserInfoEngine.UserNotifications$. Emits immediately on subscribe (shareReplay buffers the latest value) and re-emits whenever the engine's notifications cache is mutated — by save, delete, remote-invalidate, or refresh. Each emission re-runs the engine's per-user filter+sort.

    UnreadCount$: Observable<number> = ...

    Observable stream of the current user's unread notification count, derived from Notifications$. Same emission lifecycle as Notifications$.

    Accessors

    • get unreadCount$(): Observable<number>

      Instance method to access UnreadCount$ observable

      Returns Observable<number>

    • get UnreadUserNotificationCount(): number

      The current user's unread notification count, delegated to UserInfoEngine.

      Returns number

    Methods

    • Creates a user notification in the database and refreshes the UI. Returns the notification object.

      Parameters

      • title: string
      • message: string
      • resourceTypeId: string | null
      • resourceRecordId: string | null
      • resourceConfiguration: any

        Any object, it is converted to a string by JSON.stringify and stored in the database

      • displayToUser: boolean = true

      Returns Promise<MJUserNotificationEntity>

    • Creates a message that is not saved to the User Notifications table, but is displayed to the user. Uses a lightweight DOM-based toast notification.

      Parameters

      • message: string

        text to display

      • style: "error" | "none" | "success" | "warning" | "info" = "success"

        display styling

      • OptionalhideAfter: number

        option to auto hide after the specified delay in milliseconds

      Returns void

    • Refresh user notifications from the server. Delegates to UserInfoEngine.RefreshItem, whose successful reload mutates the engine's notifications cache and triggers an emission on Notifications$/UnreadCount$ via the BaseEngine observable plumbing — subscribers are updated automatically with no manual re-emit required here.

      Uses RefreshItem() rather than relying solely on the global CACHE_INVALIDATION listener: when this method is called in response to a PushStatusUpdates message, the cache-invalidation event may not have arrived yet (separate WebSocket message, potential race). RefreshItem() eliminates that race by doing a targeted RunView for just notifications.

      Returns Promise<void>

    • Returns void

      Kept as a no-op for backward compatibility. Observable emissions are now driven by UserInfoEngine.UserNotifications$, which auto-emits on save/delete/ remote-invalidate/refresh. External callers no longer need to manually push updates.