Skip to main content

Interface: INotificationService

notification.types.INotificationService

Methods

broadcastNotification

Private broadcastNotification(notification): void

When incoming notification arrive, lookup matching subscriptions and call necessary callbacks on subscription.

Parameters

NameTypeDescription
notificationINotificationof INotification objects to broadcast.

Returns

void


deleteNotifications

Private deleteNotifications(notifications): void

Delete a notification as part of a purge.

Parameters

NameTypeDescription
notificationsINotification[]The notifications to delete

Returns

void


getMuteFilters

Private getMuteFilters(): IMuteFilter[]

Fetches the current mute filters for Notification sources in Finsemble.

Returns

IMuteFilter[]

an arrray with all the mute filters.


getSources

Private getSources(): string[]

Fetches the current Notification sources in Finsemble.

Returns

string[]

an arrray with all the unique existing sources.


notify

notify(notifications): void

Creates or updates notifications in Finsemble.

Parameters

NameTypeDescription
notificationsINotification[]from external source to be created or updated in Finsemble.

Returns

void


performAction

Private performAction(notifications, action): void

Called in response to a user action VIA a NotificationClient router transmit.

Parameters

NameType
notificationsINotification[]
actionIAction

Returns

void


saveLastIssuedAt

Private saveLastIssuedAt(source, issuedAt): void

Stores the time when a notification arrived from a specific source in finsemble.

Parameters

NameTypeDescription
sourcestringa notification that was updated. This notification can then be matched on using a filter to find out when different notifications were last updated.
issuedAtstringISO8601 format string. When a notification was last delivered to Finsemble.

Returns

void


subscribe

subscribe(subscription): Object

Parameters

NameType
subscriptionISubscription

Returns

Object

a router channel on which notifications for this subscription will be sent.