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
| Name | Type | Description |
|---|---|---|
notification | INotification | of INotification objects to broadcast. |
Returns
void
deleteNotifications
▸ Private deleteNotifications(notifications): void
Delete a notification as part of a purge.
Parameters
| Name | Type | Description |
|---|---|---|
notifications | INotification[] | The notifications to delete |
Returns
void
getMuteFilters
▸ Private getMuteFilters(): IMuteFilter[]
Fetches the current mute filters for Notification sources in Finsemble.
Returns
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
| Name | Type | Description |
|---|---|---|
notifications | INotification[] | 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
| Name | Type |
|---|---|
notifications | INotification[] |
action | IAction |
Returns
void
saveLastIssuedAt
▸ Private saveLastIssuedAt(source, issuedAt): void
Stores the time when a notification arrived from a specific source in finsemble.
Parameters
| Name | Type | Description |
|---|---|---|
source | string | a notification that was updated. This notification can then be matched on using a filter to find out when different notifications were last updated. |
issuedAt | string | ISO8601 format string. When a notification was last delivered to Finsemble. |
Returns
void
subscribe
▸ subscribe(subscription): Object
Parameters
| Name | Type |
|---|---|
subscription | ISubscription |
Returns
Object
a router channel on which notifications for this subscription will be sent.