Refactor server side notifications (#2327)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov
2022-10-26 17:24:39 +07:00
committed by GitHub
parent 70e00dbb5f
commit 3a8d1e2bcb
58 changed files with 539 additions and 400 deletions
+13 -5
View File
@@ -29,6 +29,15 @@ export interface LastView extends AttachedDoc {
user: Ref<Account>
}
/**
* @public
*/
export interface NotificationAction {
component: AnyComponent
objectId: Ref<Doc>
objectClass: Ref<Class<Doc>>
}
/**
* @public
*/
@@ -39,11 +48,7 @@ export interface Notification extends AttachedDoc {
type: Ref<NotificationType>
// Defined to open particular item if required.
action?: {
component: AnyComponent
objectId: Ref<Doc>
objectClass: Ref<Class<Doc>>
}
action?: NotificationAction
}
/**
@@ -72,6 +77,9 @@ export enum NotificationStatus {
*/
export interface NotificationType extends Doc {
label: IntlString
textTemplate: string
htmlTemplate: string
subjectTemplate: string
}
/**