mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-12 20:57:45 +02:00
Implement @everyone/@here (#8890)
Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
@@ -124,7 +124,10 @@ export interface NotificationContent {
|
||||
intlParamsNotLocalized?: Record<string, IntlString>
|
||||
}
|
||||
|
||||
export interface BaseNotificationType extends Doc {
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export interface NotificationType extends Doc {
|
||||
label: IntlString
|
||||
// Is autogenerated
|
||||
generated: boolean
|
||||
@@ -134,11 +137,6 @@ export interface BaseNotificationType extends Doc {
|
||||
defaultEnabled: boolean
|
||||
// templates for email (and browser/push?)
|
||||
templates?: NotificationTemplate
|
||||
}
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export interface NotificationType extends BaseNotificationType {
|
||||
// For show/hide with attributes
|
||||
attribute?: Ref<AnyAttribute>
|
||||
txClasses: Ref<Class<Tx>>[]
|
||||
@@ -156,8 +154,6 @@ export interface NotificationType extends BaseNotificationType {
|
||||
allowedForAuthor?: boolean
|
||||
}
|
||||
|
||||
export interface CommonNotificationType extends BaseNotificationType {}
|
||||
|
||||
export interface NotificationProvider extends Doc {
|
||||
label: IntlString
|
||||
description: IntlString
|
||||
@@ -173,9 +169,9 @@ export interface NotificationProvider extends Doc {
|
||||
|
||||
export interface NotificationProviderDefaults extends Doc {
|
||||
provider: Ref<NotificationProvider>
|
||||
excludeIgnore?: Ref<BaseNotificationType>[]
|
||||
ignoredTypes: Ref<BaseNotificationType>[]
|
||||
enabledTypes: Ref<BaseNotificationType>[]
|
||||
excludeIgnore?: Ref<NotificationType>[]
|
||||
ignoredTypes: Ref<NotificationType>[]
|
||||
enabledTypes: Ref<NotificationType>[]
|
||||
}
|
||||
|
||||
export interface NotificationProviderSetting extends Preference {
|
||||
@@ -185,7 +181,7 @@ export interface NotificationProviderSetting extends Preference {
|
||||
|
||||
export interface NotificationTypeSetting extends Preference {
|
||||
attachedTo: Ref<NotificationProvider>
|
||||
type: Ref<BaseNotificationType>
|
||||
type: Ref<NotificationType>
|
||||
enabled: boolean
|
||||
}
|
||||
|
||||
@@ -239,6 +235,7 @@ export interface InboxNotification extends Doc<PersonSpace> {
|
||||
docNotifyContext: Ref<DocNotifyContext>
|
||||
objectId: Ref<Doc>
|
||||
objectClass: Ref<Class<Doc>>
|
||||
types?: Ref<NotificationType>[]
|
||||
|
||||
// For browser notifications
|
||||
title?: IntlString
|
||||
@@ -351,9 +348,7 @@ const notification = plugin(notificationId, {
|
||||
class: {
|
||||
BrowserNotification: '' as Ref<Class<BrowserNotification>>,
|
||||
PushSubscription: '' as Ref<Class<PushSubscription>>,
|
||||
BaseNotificationType: '' as Ref<Class<BaseNotificationType>>,
|
||||
NotificationType: '' as Ref<Class<NotificationType>>,
|
||||
CommonNotificationType: '' as Ref<Class<CommonNotificationType>>,
|
||||
NotificationGroup: '' as Ref<Class<NotificationGroup>>,
|
||||
NotificationPreferencesGroup: '' as Ref<Class<NotificationPreferencesGroup>>,
|
||||
DocNotifyContext: '' as Ref<Class<DocNotifyContext>>,
|
||||
@@ -371,7 +366,7 @@ const notification = plugin(notificationId, {
|
||||
NotificationSettings: '' as Ref<Doc>,
|
||||
NotificationGroup: '' as Ref<NotificationGroup>,
|
||||
CollaboratoAddNotification: '' as Ref<NotificationType>,
|
||||
MentionCommonNotificationType: '' as Ref<CommonNotificationType>
|
||||
MentionNotificationType: '' as Ref<NotificationType>
|
||||
},
|
||||
metadata: {
|
||||
PushPublicKey: '' as Metadata<string>
|
||||
@@ -449,9 +444,7 @@ const notification = plugin(notificationId, {
|
||||
HasInboxNotifications: '' as Resource<
|
||||
(notificationsByContext: Map<Ref<DocNotifyContext>, InboxNotification[]>) => Promise<boolean>
|
||||
>,
|
||||
IsNotificationAllowed: '' as Resource<
|
||||
(type: BaseNotificationType, providerId: Ref<NotificationProvider>) => boolean
|
||||
>
|
||||
IsNotificationAllowed: '' as Resource<(type: NotificationType, providerId: Ref<NotificationProvider>) => boolean>
|
||||
},
|
||||
resolver: {
|
||||
Location: '' as Resource<(loc: Location) => Promise<ResolvedLocation | undefined>>
|
||||
|
||||
Reference in New Issue
Block a user