UBER-845: Add NotificationPresenter to send rich text notifications (#3729)

Signed-off-by: Maxim Karmatskikh <mkarmatskih@gmail.com>
This commit is contained in:
Maksim Karmatskikh
2023-09-28 12:08:00 +07:00
committed by GitHub
parent a3fd97e3b4
commit 1ca9de297a
21 changed files with 368 additions and 47 deletions
+3 -1
View File
@@ -76,6 +76,8 @@
"LastMessage": "Last message",
"You": "You",
"YouHaveJoinedTheConversation": "You have joined the conversation",
"NoMessages": "There are no messages yet"
"NoMessages": "There are no messages yet",
"DirectNotificationTitle": "{senderName}",
"DirectNotificationBody": "{message}"
}
}
+3 -1
View File
@@ -76,6 +76,8 @@
"LastMessage": "Последнее сообщение",
"You": "Вы",
"YouHaveJoinedTheConversation": "Вы присоединились к диалогу",
"NoMessages": "Сообщений пока нет"
"NoMessages": "Сообщений пока нет",
"DirectNotificationTitle": "{senderName}",
"DirectNotificationBody": "{message}"
}
}
+3 -1
View File
@@ -182,7 +182,9 @@ export default plugin(chunterId, {
Message: '' as IntlString,
MessageOn: '' as IntlString,
UnarchiveConfirm: '' as IntlString,
ConvertToPrivate: '' as IntlString
ConvertToPrivate: '' as IntlString,
DirectNotificationTitle: '' as IntlString,
DirectNotificationBody: '' as IntlString
},
resolver: {
Location: '' as Resource<(loc: Location) => Promise<ResolvedLocation | undefined>>
+3 -1
View File
@@ -25,6 +25,8 @@
"People": "People",
"All": "All",
"Read": "Read",
"Unread": "Unread"
"Unread": "Unread",
"CommonNotificationTitle": "{title}",
"CommonNotificationBody": "Updated by {senderName}"
}
}
+3 -1
View File
@@ -25,6 +25,8 @@
"People": "Люди",
"All": "Все",
"Read": "Прочитанное",
"Unread": "Не прочитанное"
"Unread": "Не прочитанное",
"CommonNotificationTitle": "{title}",
"CommonNotificationBody": "Обновление от {senderName}"
}
}
+17 -1
View File
@@ -95,6 +95,16 @@ export interface NotificationTemplate {
subjectTemplate: string
}
/**
* @public
*/
export interface NotificationContent {
title: IntlString
body: IntlString
intlParams: Record<string, string | number>
intlParamsNotLocalized?: Record<string, IntlString>
}
/**
* @public
*/
@@ -171,6 +181,10 @@ export interface DocUpdateTx {
modifiedBy: Ref<Account>
modifiedOn: Timestamp
isNew: boolean
title?: IntlString
body?: IntlString
intlParams?: Record<string, string | number>
intlParamsNotLocalized?: Record<string, IntlString>
}
/**
@@ -263,7 +277,9 @@ const notification = plugin(notificationId, {
Notification: '' as IntlString,
Notifications: '' as IntlString,
DontTrack: '' as IntlString,
Inbox: '' as IntlString
Inbox: '' as IntlString,
CommonNotificationTitle: '' as IntlString,
CommonNotificationBody: '' as IntlString
},
function: {
GetNotificationClient: '' as Resource<NotificationClientFactoy>
+7 -1
View File
@@ -274,7 +274,13 @@
"UnsetParent": "Parent issue will be unset",
"Unarchive": "Unarchive",
"UnarchiveConfirm": "Do you want to unarchive project?",
"AllProjects": "All projects"
"AllProjects": "All projects",
"IssueNotificationTitle": "{issueTitle}",
"IssueNotificationBody": "Updated by {senderName}",
"IssueNotificationChanged": "{senderName} changed {property}",
"IssueNotificationChangedProperty": "{senderName} changed {property} to \"{newValue}\"",
"IssueNotificationMessage": "{senderName}: {message}",
"IssueAssigneedToYou": "Assigned to you"
},
"status": {}
}
+7 -1
View File
@@ -274,7 +274,13 @@
"UnsetParent": "Родительская задача будет убрана",
"Unarchive": "Разархивировать",
"UnarchiveConfirm": "Вы действительно хотите разархивировать?",
"AllProjects": "All projects"
"AllProjects": "All projects",
"IssueNotificationTitle": "{issueTitle}",
"IssueNotificationBody": "Обновлено {senderName}",
"IssueNotificationChanged": "{senderName} изменил {property}",
"IssueNotificationChangedProperty": "{senderName} изменил {property} на \"{newValue}\"",
"IssueNotificationMessage": "{senderName}: {message}",
"IssueAssigneedToYou": "Назначено вам"
},
"status": {}
}
+7 -1
View File
@@ -481,7 +481,13 @@ export default plugin(trackerId, {
},
string: {
ConfigLabel: '' as IntlString,
NewRelatedIssue: '' as IntlString
NewRelatedIssue: '' as IntlString,
IssueNotificationTitle: '' as IntlString,
IssueNotificationBody: '' as IntlString,
IssueNotificationChanged: '' as IntlString,
IssueNotificationChangedProperty: '' as IntlString,
IssueNotificationMessage: '' as IntlString,
IssueAssigneedToYou: '' as IntlString
},
mixin: {
ProjectIssueTargetOptions: '' as Ref<Mixin<ProjectIssueTargetOptions>>