forked from finos/FDC3
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Actionable Notifications via Intent & Context #17
Labels
enhancement
New feature or request
Comments
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This issue is a proposal to resolve:
via Intents and contexts, rather than proliferating new API calls within the Desktop Agent scope. This approach has the advantage that it might be implemented by a desktop agent (with optional rules in its resolver to router the intents to its internal handling) or by another app in the desktop (e.g. a custom Notification center implementation) at the discretion of the DesktopAgent provider / assembler.
The proposal draws inspiration from the Notifications Web API (see MDN and the Notification API Spec), but deviates from it in a few key areas. The notifications Web API allows for actionable notifications but they are performed by the application that generated the notification, which will use the
data
element and the action name to determine what action to take.Whereas in FDC3 we are focused on application interoperability and our primary use case is to allow actions to be performed by other apps, through intents and contexts. Hence, the actions array is specified via the
fdc3.action
type (currently proposed in PR finos#779) which encapsulates an FDC3 context and an optional intent - allowing a range of actions with associated data to be specified, which can then be performed by other applications when sent to them viaraiseIntent
orraiseIntentForContext
. This obviates the need for adata
element in the notification.Enhancement Request
Allow notifications to be raised via a standardized intent and context.
Use Case:
Actionable notifications are a common part of a suite of desktop applications. They are tied to application interop by the fact that they may be generated by one application or system but could or should be actioned via one or more other applications.
For example:
For example, An order management system (or a service monitoring one) might raise notifications for new orders, and offer you actions to ViewChart, ViewRisk or ViewHoldings via other applications.
Intents
There are several possible Intents that could be associated with notifications. The primary need for one is to create a notification, but you might also want to dismiss it (if actioned independently in the source app), subscribe to updates
as it changes state or subscribe to a (filtered) stream of notifications.
CreateNotification
Create a new notification using the supplied notification context.
UpdateNotification
Update or dismiss a particular notification, by passing an updated notification context with the id set.
GetNotifications
Retrieve or subscribe to a stream of notifications or updates about a particular notification.
Would require a context type describing a filter for notifications.
Contexts
fdc3.notification
To define the content of a notification and any options relating to how it should be handled or displayed.
May include actions that would be performed via FDC3 APIs (primarily raiseIntent, but could also be used
to broadcast context on a channel.
Draws inspiration from the Notification web API:
Details
type
'fdc3.notification'
id.notificationId
'unique-value-123'
title
'Notification title displayed at top'
options
options.body
"Text content of the notification displayed in its body"
options.icon
https://www.example.com/example.png
options.image
https://www.example.com/example.png
options.notificationType
warning
options.actions
options.notificationAlertSound
https://www.example.com/example.mp3
metadata
metadata.issuedAt
"2022-03-30T15:44:44Z"
metadata.receivedAt
"2022-03-30T15:44:44Z"
metadata.source
{ appId: "ABC", instanceId: "ABC123" }
metadata.timeout
600000
metadata.isRead
false
metadata.isMuted
false
metadata.isSnoozed
false
metadata.isDeleted
false
Examples
}
The text was updated successfully, but these errors were encountered: