mirror of
https://github.com/hcengineering/platform.git
synced 2026-10-01 05:55:09 +02:00
UBERF-5811: rework backlinks (#4887)
Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
@@ -96,18 +96,24 @@ export interface NotificationContent {
|
||||
intlParamsNotLocalized?: Record<string, IntlString>
|
||||
}
|
||||
|
||||
export interface BaseNotificationType extends Doc {
|
||||
label: IntlString
|
||||
// Is autogenerated
|
||||
generated: boolean
|
||||
// allowed to change setting (probably we should show it, but disable toggle??)
|
||||
hidden: boolean
|
||||
group: Ref<NotificationGroup>
|
||||
// allowed providers and default value for it
|
||||
providers: Record<Ref<NotificationProvider>, boolean>
|
||||
// templates for email (and browser/push?)
|
||||
templates?: NotificationTemplate
|
||||
}
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export interface NotificationType extends Doc {
|
||||
export interface NotificationType extends BaseNotificationType {
|
||||
// For show/hide with attributes
|
||||
attribute?: Ref<AnyAttribute>
|
||||
// Is autogenerated
|
||||
generated: boolean
|
||||
// allowed to to change setting (probably we should show it, but disable toggle??)
|
||||
hidden: boolean
|
||||
label: IntlString
|
||||
group: Ref<NotificationGroup>
|
||||
txClasses: Ref<Class<Tx>>[]
|
||||
objectClass: Ref<Class<Doc>>
|
||||
// not allowed to parent doc
|
||||
@@ -119,14 +125,12 @@ export interface NotificationType extends Doc {
|
||||
txMatch?: DocumentQuery<Tx>
|
||||
// use for space collaborators, not object
|
||||
spaceSubscribe?: boolean
|
||||
// allowed providers and default value for it
|
||||
providers: Record<Ref<NotificationProvider>, boolean>
|
||||
// templates for email (and browser/push?)
|
||||
templates?: NotificationTemplate
|
||||
// when true notification will be created for user which trigger it (default - false)
|
||||
allowedForAuthor?: boolean
|
||||
}
|
||||
|
||||
export interface CommonNotificationType extends BaseNotificationType {}
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
@@ -139,7 +143,7 @@ export interface NotificationProvider extends Doc {
|
||||
*/
|
||||
export interface NotificationSetting extends Preference {
|
||||
attachedTo: Ref<NotificationProvider>
|
||||
type: Ref<NotificationType>
|
||||
type: Ref<BaseNotificationType>
|
||||
enabled: boolean
|
||||
}
|
||||
|
||||
@@ -239,7 +243,8 @@ export interface ActivityInboxNotification extends InboxNotification {
|
||||
|
||||
export interface CommonInboxNotification extends InboxNotification {
|
||||
header?: IntlString
|
||||
message: IntlString
|
||||
message?: IntlString
|
||||
messageHtml?: string
|
||||
props?: Record<string, any>
|
||||
icon?: Asset
|
||||
iconProps?: Record<string, any>
|
||||
@@ -312,7 +317,9 @@ const notification = plugin(notificationId, {
|
||||
},
|
||||
class: {
|
||||
Notification: '' as Ref<Class<Notification>>,
|
||||
BaseNotificationType: '' as Ref<Class<BaseNotificationType>>,
|
||||
NotificationType: '' as Ref<Class<NotificationType>>,
|
||||
CommonNotificationType: '' as Ref<Class<CommonNotificationType>>,
|
||||
NotificationProvider: '' as Ref<Class<NotificationProvider>>,
|
||||
NotificationSetting: '' as Ref<Class<NotificationSetting>>,
|
||||
DocUpdates: '' as Ref<Class<DocUpdates>>,
|
||||
@@ -327,7 +334,8 @@ const notification = plugin(notificationId, {
|
||||
ids: {
|
||||
NotificationSettings: '' as Ref<Doc>,
|
||||
NotificationGroup: '' as Ref<NotificationGroup>,
|
||||
CollaboratoAddNotification: '' as Ref<NotificationType>
|
||||
CollaboratoAddNotification: '' as Ref<NotificationType>,
|
||||
MentionCommonNotificationType: '' as Ref<CommonNotificationType>
|
||||
},
|
||||
providers: {
|
||||
PlatformNotification: '' as Ref<NotificationProvider>,
|
||||
|
||||
Reference in New Issue
Block a user