mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-26 03:25:01 +02:00
Refactor server side notifications (#2327)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -306,20 +306,6 @@ export interface IgnoreActions extends Class<Doc> {
|
||||
actions: Ref<Action>[]
|
||||
}
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export interface HTMLPresenter extends Class<Doc> {
|
||||
presenter: Resource<(doc: Doc) => string>
|
||||
}
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export interface TextPresenter extends Class<Doc> {
|
||||
presenter: Resource<(doc: Doc) => string>
|
||||
}
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
@@ -420,8 +406,6 @@ const view = plugin(viewId, {
|
||||
SpaceHeader: '' as Ref<Mixin<SpaceHeader>>,
|
||||
SpaceName: '' as Ref<Mixin<SpaceName>>,
|
||||
IgnoreActions: '' as Ref<Mixin<IgnoreActions>>,
|
||||
HTMLPresenter: '' as Ref<Mixin<HTMLPresenter>>,
|
||||
TextPresenter: '' as Ref<Mixin<TextPresenter>>,
|
||||
PreviewPresenter: '' as Ref<Mixin<PreviewPresenter>>
|
||||
},
|
||||
class: {
|
||||
|
||||
Reference in New Issue
Block a user