-
Notifications
You must be signed in to change notification settings - Fork 530
Description
The current version of the API returns translated messages that are used in email notifications. We need to update the API (either by adding new properties or creating a new endpoint) that will support the SPA Account:Notifications UI, and other client apps.
To support the SPA, the API would return a key to the message, which will be used to translate in the client side. Also needed are dynamic properties to embed in the translated message.
For example, if a user has been granted a role in a collection, the API response would be:
{
"id": "1",
"messageKey": "assignedCollectionRole",
"properties": [
{
"key": "role",
"value": "Admin"
},
{
"key": "collectionName",
"value": "Scientific Research"
},
{
"key": "collectionId",
"value": "1234"
}
],
"displayAsRead": true,
"sentTimestamp": "2025-07-17T13:27:33Z"
}
And then in the SPA, the translation file would be:
"notifications.assignedCollectionRole"="You have been granted the role of {{role}} in <1>{{collectionName}}</1>."
It would be the responsibility of the client app to use the id to generate the url.
This is keeping the key value pairs generic, to avoid having to defining class types for the different types of notifications, and make it easier to add new messages.
This is just a proposal, open to different ideas on how to implement this.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status