2022-02-07 09:03:14 +00:00
|
|
|
//
|
2022-06-19 16:28:31 +00:00
|
|
|
// Copyright © 2022 Hardcore Engineering Inc.
|
2022-02-07 09:03:14 +00:00
|
|
|
//
|
|
|
|
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License. You may
|
|
|
|
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
//
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
//
|
|
|
|
|
2024-02-14 16:42:16 +00:00
|
|
|
import { ActivityMessage } from '@hcengineering/activity'
|
2023-04-25 08:34:38 +00:00
|
|
|
import {
|
|
|
|
Account,
|
|
|
|
AnyAttribute,
|
|
|
|
AttachedDoc,
|
|
|
|
Class,
|
|
|
|
Doc,
|
2023-06-01 05:48:36 +00:00
|
|
|
DocumentQuery,
|
2023-04-25 08:34:38 +00:00
|
|
|
Mixin,
|
|
|
|
Ref,
|
|
|
|
Space,
|
|
|
|
Timestamp,
|
|
|
|
Tx,
|
2024-02-14 16:42:16 +00:00
|
|
|
TxCUD,
|
|
|
|
TxOperations
|
2023-04-25 08:34:38 +00:00
|
|
|
} from '@hcengineering/core'
|
2022-09-21 08:08:25 +00:00
|
|
|
import type { Asset, IntlString, Plugin, Resource } from '@hcengineering/platform'
|
|
|
|
import { plugin } from '@hcengineering/platform'
|
2024-02-14 16:42:16 +00:00
|
|
|
import { Preference } from '@hcengineering/preference'
|
2023-03-29 09:18:59 +00:00
|
|
|
import { IntegrationType } from '@hcengineering/setting'
|
2023-12-11 11:54:36 +00:00
|
|
|
import { AnyComponent, Location, ResolvedLocation } from '@hcengineering/ui'
|
2024-01-18 05:44:05 +00:00
|
|
|
import { Action, Viewlet, ViewletDescriptor } from '@hcengineering/view'
|
2024-02-14 16:42:16 +00:00
|
|
|
import { Readable, Writable } from './types'
|
2023-12-13 15:59:11 +00:00
|
|
|
|
2022-09-21 08:08:25 +00:00
|
|
|
export * from './types'
|
2022-02-07 09:03:14 +00:00
|
|
|
|
2022-02-11 09:18:55 +00:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
export interface Notification extends AttachedDoc {
|
|
|
|
tx: Ref<TxCUD<Doc>>
|
|
|
|
status: NotificationStatus
|
2022-06-30 11:24:19 +00:00
|
|
|
text: string
|
|
|
|
type: Ref<NotificationType>
|
2022-02-11 09:18:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
export enum NotificationStatus {
|
|
|
|
New,
|
2022-09-20 06:42:24 +00:00
|
|
|
Notified,
|
2022-02-11 09:18:55 +00:00
|
|
|
Read
|
|
|
|
}
|
|
|
|
|
2022-02-22 09:09:13 +00:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
2023-04-25 08:34:38 +00:00
|
|
|
export interface NotificationGroup extends Doc {
|
2022-02-22 09:09:13 +00:00
|
|
|
label: IntlString
|
2023-04-25 08:34:38 +00:00
|
|
|
icon: Asset
|
|
|
|
// using for autogenerated settings
|
|
|
|
objectClass?: Ref<Class<Doc>>
|
|
|
|
}
|
|
|
|
|
2023-09-05 05:31:09 +00:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
export interface NotificationPreferencesGroup extends Doc {
|
|
|
|
label: IntlString
|
|
|
|
icon: Asset
|
|
|
|
presenter: AnyComponent
|
|
|
|
}
|
|
|
|
|
2023-04-25 08:34:38 +00:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
export interface NotificationTemplate {
|
2022-10-26 10:24:39 +00:00
|
|
|
textTemplate: string
|
|
|
|
htmlTemplate: string
|
|
|
|
subjectTemplate: string
|
2022-02-22 09:09:13 +00:00
|
|
|
}
|
|
|
|
|
2023-09-28 05:08:00 +00:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
export interface NotificationContent {
|
|
|
|
title: IntlString
|
|
|
|
body: IntlString
|
|
|
|
intlParams: Record<string, string | number>
|
|
|
|
intlParamsNotLocalized?: Record<string, IntlString>
|
|
|
|
}
|
|
|
|
|
2023-04-25 08:34:38 +00:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
export interface NotificationType extends Doc {
|
|
|
|
// 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>>
|
2023-09-22 06:10:35 +00:00
|
|
|
// not allowed to parent doc
|
|
|
|
onlyOwn?: boolean
|
2023-04-25 08:34:38 +00:00
|
|
|
// check parent doc class
|
|
|
|
attachedToClass?: Ref<Class<Doc>>
|
|
|
|
// use for update/mixin txes
|
|
|
|
field?: string
|
2023-06-01 05:48:36 +00:00
|
|
|
txMatch?: DocumentQuery<Tx>
|
2023-04-28 08:22:39 +00:00
|
|
|
// use for space collaborators, not object
|
|
|
|
spaceSubscribe?: boolean
|
2023-04-25 08:34:38 +00:00
|
|
|
// allowed providers and default value for it
|
|
|
|
providers: Record<Ref<NotificationProvider>, boolean>
|
|
|
|
// templates for email (and browser/push?)
|
|
|
|
templates?: NotificationTemplate
|
2023-05-05 09:37:01 +00:00
|
|
|
// when true notification will be created for user which trigger it (default - false)
|
|
|
|
allowedForAuthor?: boolean
|
2023-04-25 08:34:38 +00:00
|
|
|
}
|
|
|
|
|
2022-02-22 09:09:13 +00:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
export interface NotificationProvider extends Doc {
|
|
|
|
label: IntlString
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
2023-04-25 08:34:38 +00:00
|
|
|
export interface NotificationSetting extends Preference {
|
|
|
|
attachedTo: Ref<NotificationProvider>
|
2022-02-22 09:09:13 +00:00
|
|
|
type: Ref<NotificationType>
|
|
|
|
enabled: boolean
|
|
|
|
}
|
|
|
|
|
2023-03-29 09:18:59 +00:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
export interface ClassCollaborators extends Class<Doc> {
|
|
|
|
fields: string[] // Ref<Account> | Ref<Employee> | Ref<Account>[] | Ref<Employee>[]
|
|
|
|
}
|
2022-06-10 17:59:09 +00:00
|
|
|
|
2023-04-05 07:12:06 +00:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
export interface NotificationObjectPresenter extends Class<Doc> {
|
|
|
|
presenter: AnyComponent
|
|
|
|
}
|
|
|
|
|
2023-03-29 09:18:59 +00:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
export interface Collaborators extends Doc {
|
|
|
|
collaborators: Ref<Account>[]
|
2022-06-10 17:59:09 +00:00
|
|
|
}
|
|
|
|
|
2023-05-24 06:35:48 +00:00
|
|
|
/**
|
|
|
|
* @public
|
2024-01-11 14:46:11 +00:00
|
|
|
* @deprecated
|
2023-05-24 06:35:48 +00:00
|
|
|
*/
|
|
|
|
export interface DocUpdateTx {
|
|
|
|
_id: Ref<TxCUD<Doc>>
|
|
|
|
modifiedBy: Ref<Account>
|
|
|
|
modifiedOn: Timestamp
|
|
|
|
isNew: boolean
|
2023-09-28 05:08:00 +00:00
|
|
|
title?: IntlString
|
|
|
|
body?: IntlString
|
|
|
|
intlParams?: Record<string, string | number>
|
|
|
|
intlParamsNotLocalized?: Record<string, IntlString>
|
2023-05-24 06:35:48 +00:00
|
|
|
}
|
|
|
|
|
2023-04-05 07:12:06 +00:00
|
|
|
/**
|
|
|
|
* @public
|
2024-01-11 14:46:11 +00:00
|
|
|
* @deprecated
|
2023-04-05 07:12:06 +00:00
|
|
|
*/
|
|
|
|
export interface DocUpdates extends Doc {
|
|
|
|
user: Ref<Account>
|
|
|
|
attachedTo: Ref<Doc>
|
|
|
|
attachedToClass: Ref<Class<Doc>>
|
2023-04-06 14:25:58 +00:00
|
|
|
hidden: boolean
|
2023-04-29 15:46:13 +00:00
|
|
|
lastTxTime?: Timestamp
|
2023-05-24 06:35:48 +00:00
|
|
|
txes: DocUpdateTx[]
|
2023-04-05 07:12:06 +00:00
|
|
|
}
|
|
|
|
|
2022-02-07 09:03:14 +00:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
export const notificationId = 'notification' as Plugin
|
|
|
|
|
2023-12-11 11:54:36 +00:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
export const inboxId = 'inbox' as Plugin
|
|
|
|
|
2023-08-22 04:52:10 +00:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
export interface NotificationPreview extends Class<Doc> {
|
|
|
|
presenter: AnyComponent
|
|
|
|
}
|
|
|
|
|
2024-01-18 05:44:05 +00:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
export interface NotificationContextPresenter extends Class<Doc> {
|
|
|
|
labelPresenter?: AnyComponent
|
|
|
|
}
|
|
|
|
|
2023-12-11 11:54:36 +00:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
export interface InboxNotification extends Doc {
|
|
|
|
user: Ref<Account>
|
|
|
|
isViewed: boolean
|
|
|
|
|
2024-01-11 14:46:11 +00:00
|
|
|
docNotifyContext: Ref<DocNotifyContext>
|
|
|
|
|
|
|
|
// For browser notifications
|
|
|
|
title?: IntlString
|
|
|
|
body?: IntlString
|
|
|
|
intlParams?: Record<string, string | number>
|
|
|
|
intlParamsNotLocalized?: Record<string, IntlString>
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ActivityInboxNotification extends InboxNotification {
|
2023-12-11 11:54:36 +00:00
|
|
|
attachedTo: Ref<ActivityMessage>
|
|
|
|
attachedToClass: Ref<Class<ActivityMessage>>
|
2024-01-11 14:46:11 +00:00
|
|
|
}
|
2023-12-11 11:54:36 +00:00
|
|
|
|
2024-01-11 14:46:11 +00:00
|
|
|
export interface CommonInboxNotification extends InboxNotification {
|
2024-01-12 16:47:59 +00:00
|
|
|
header?: IntlString
|
2024-01-11 14:46:11 +00:00
|
|
|
message: IntlString
|
|
|
|
props?: Record<string, any>
|
|
|
|
icon?: Asset
|
|
|
|
iconProps?: Record<string, any>
|
2023-12-11 11:54:36 +00:00
|
|
|
}
|
|
|
|
|
2024-01-11 14:46:11 +00:00
|
|
|
export interface DisplayActivityInboxNotification extends ActivityInboxNotification {
|
|
|
|
combinedIds: Ref<ActivityInboxNotification>[]
|
|
|
|
}
|
|
|
|
|
|
|
|
export type DisplayInboxNotification = DisplayActivityInboxNotification | InboxNotification
|
|
|
|
|
2023-12-11 11:54:36 +00:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
export interface DocNotifyContext extends Doc {
|
|
|
|
user: Ref<Account>
|
|
|
|
|
|
|
|
// Context
|
|
|
|
attachedTo: Ref<Doc>
|
|
|
|
attachedToClass: Ref<Class<Doc>>
|
|
|
|
|
|
|
|
hidden: boolean
|
2024-01-11 14:46:11 +00:00
|
|
|
isPinned?: boolean
|
2023-12-11 11:54:36 +00:00
|
|
|
lastViewedTimestamp?: Timestamp
|
|
|
|
lastUpdateTimestamp?: Timestamp
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
export interface InboxNotificationsClient {
|
|
|
|
docNotifyContextByDoc: Writable<Map<Ref<Doc>, DocNotifyContext>>
|
|
|
|
docNotifyContexts: Writable<DocNotifyContext[]>
|
2024-01-18 15:45:14 +00:00
|
|
|
inboxNotifications: Readable<InboxNotification[]>
|
|
|
|
activityInboxNotifications: Writable<ActivityInboxNotification[]>
|
2024-01-11 14:46:11 +00:00
|
|
|
inboxNotificationsByContext: Readable<Map<Ref<DocNotifyContext>, InboxNotification[]>>
|
2024-02-14 16:42:16 +00:00
|
|
|
readDoc: (client: TxOperations, _id: Ref<Doc>) => Promise<void>
|
|
|
|
forceReadDoc: (client: TxOperations, _id: Ref<Doc>, _class: Ref<Class<Doc>>) => Promise<void>
|
|
|
|
readMessages: (client: TxOperations, ids: Ref<ActivityMessage>[]) => Promise<void>
|
|
|
|
readNotifications: (client: TxOperations, ids: Array<Ref<InboxNotification>>) => Promise<void>
|
|
|
|
unreadNotifications: (client: TxOperations, ids: Array<Ref<InboxNotification>>) => Promise<void>
|
|
|
|
deleteNotifications: (client: TxOperations, ids: Array<Ref<InboxNotification>>) => Promise<void>
|
2024-03-04 19:31:45 +00:00
|
|
|
deleteAllNotifications: () => Promise<void>
|
2023-12-11 11:54:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
export type InboxNotificationsClientFactory = () => InboxNotificationsClient
|
|
|
|
|
2024-01-18 05:44:05 +00:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
export interface ActivityNotificationViewlet extends Doc {
|
|
|
|
messageMatch: DocumentQuery<Doc>
|
|
|
|
presenter: AnyComponent
|
|
|
|
}
|
|
|
|
|
2022-02-07 09:03:14 +00:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
const notification = plugin(notificationId, {
|
2022-04-06 05:35:52 +00:00
|
|
|
mixin: {
|
2023-03-29 09:18:59 +00:00
|
|
|
ClassCollaborators: '' as Ref<Mixin<ClassCollaborators>>,
|
|
|
|
Collaborators: '' as Ref<Mixin<Collaborators>>,
|
2023-08-22 04:52:10 +00:00
|
|
|
NotificationObjectPresenter: '' as Ref<Mixin<NotificationObjectPresenter>>,
|
2024-01-18 05:44:05 +00:00
|
|
|
NotificationPreview: '' as Ref<Mixin<NotificationPreview>>,
|
|
|
|
NotificationContextPresenter: '' as Ref<Mixin<NotificationContextPresenter>>
|
2022-04-06 05:35:52 +00:00
|
|
|
},
|
2022-02-07 09:03:14 +00:00
|
|
|
class: {
|
2022-02-22 09:09:13 +00:00
|
|
|
Notification: '' as Ref<Class<Notification>>,
|
|
|
|
NotificationType: '' as Ref<Class<NotificationType>>,
|
|
|
|
NotificationProvider: '' as Ref<Class<NotificationProvider>>,
|
2023-04-05 07:12:06 +00:00
|
|
|
NotificationSetting: '' as Ref<Class<NotificationSetting>>,
|
2023-04-25 08:34:38 +00:00
|
|
|
DocUpdates: '' as Ref<Class<DocUpdates>>,
|
2023-09-05 05:31:09 +00:00
|
|
|
NotificationGroup: '' as Ref<Class<NotificationGroup>>,
|
2023-12-11 11:54:36 +00:00
|
|
|
NotificationPreferencesGroup: '' as Ref<Class<NotificationPreferencesGroup>>,
|
|
|
|
DocNotifyContext: '' as Ref<Class<DocNotifyContext>>,
|
2024-01-11 14:46:11 +00:00
|
|
|
InboxNotification: '' as Ref<Class<InboxNotification>>,
|
|
|
|
ActivityInboxNotification: '' as Ref<Class<ActivityInboxNotification>>,
|
2024-01-18 05:44:05 +00:00
|
|
|
CommonInboxNotification: '' as Ref<Class<CommonInboxNotification>>,
|
|
|
|
ActivityNotificationViewlet: '' as Ref<Class<ActivityNotificationViewlet>>
|
2022-02-22 09:09:13 +00:00
|
|
|
},
|
|
|
|
ids: {
|
2023-05-17 05:18:05 +00:00
|
|
|
NotificationSettings: '' as Ref<Doc>,
|
|
|
|
NotificationGroup: '' as Ref<NotificationGroup>,
|
|
|
|
CollaboratoAddNotification: '' as Ref<NotificationType>
|
2023-04-25 08:34:38 +00:00
|
|
|
},
|
|
|
|
providers: {
|
2022-02-22 09:09:13 +00:00
|
|
|
PlatformNotification: '' as Ref<NotificationProvider>,
|
2022-06-30 11:24:19 +00:00
|
|
|
BrowserNotification: '' as Ref<NotificationProvider>,
|
2023-04-25 08:34:38 +00:00
|
|
|
EmailNotification: '' as Ref<NotificationProvider>
|
2022-02-11 09:18:55 +00:00
|
|
|
},
|
2022-10-26 10:25:04 +00:00
|
|
|
integrationType: {
|
|
|
|
MobileApp: '' as Ref<IntegrationType>
|
|
|
|
},
|
2022-02-11 09:18:55 +00:00
|
|
|
component: {
|
2023-04-05 07:12:06 +00:00
|
|
|
Inbox: '' as AnyComponent,
|
2023-12-11 11:54:36 +00:00
|
|
|
NotificationPresenter: '' as AnyComponent,
|
2024-01-11 14:46:11 +00:00
|
|
|
NotificationCollaboratorsChanged: '' as AnyComponent,
|
2024-01-18 05:44:05 +00:00
|
|
|
DocNotifyContextPresenter: '' as AnyComponent,
|
|
|
|
InboxFlatListView: '' as AnyComponent,
|
|
|
|
InboxGroupedListView: '' as AnyComponent
|
2023-12-11 11:54:36 +00:00
|
|
|
},
|
|
|
|
activity: {
|
|
|
|
TxCollaboratorsChange: '' as AnyComponent
|
|
|
|
},
|
2024-01-18 05:44:05 +00:00
|
|
|
viewlet: {
|
|
|
|
FlatList: '' as Ref<ViewletDescriptor>,
|
|
|
|
InboxFlatList: '' as Ref<Viewlet>,
|
|
|
|
GroupedList: '' as Ref<ViewletDescriptor>,
|
|
|
|
InboxGroupedList: '' as Ref<Viewlet>
|
|
|
|
},
|
2023-12-11 11:54:36 +00:00
|
|
|
action: {
|
|
|
|
MarkAsUnreadInboxNotification: '' as Ref<Action>,
|
|
|
|
MarkAsReadInboxNotification: '' as Ref<Action>,
|
2024-01-11 14:46:11 +00:00
|
|
|
DeleteInboxNotification: '' as Ref<Action>,
|
|
|
|
PinDocNotifyContext: '' as Ref<Action>,
|
|
|
|
UnpinDocNotifyContext: '' as Ref<Action>,
|
|
|
|
HideDocNotifyContext: '' as Ref<Action>,
|
2024-01-18 05:44:05 +00:00
|
|
|
UnHideDocNotifyContext: '' as Ref<Action>,
|
|
|
|
UnReadNotifyContext: '' as Ref<Action>,
|
|
|
|
ReadNotifyContext: '' as Ref<Action>,
|
|
|
|
DeleteContextNotifications: '' as Ref<Action>
|
2022-02-11 09:18:55 +00:00
|
|
|
},
|
|
|
|
icon: {
|
2022-02-25 09:04:57 +00:00
|
|
|
Notifications: '' as Asset,
|
2023-05-22 03:50:44 +00:00
|
|
|
Inbox: '' as Asset,
|
2022-02-25 09:04:57 +00:00
|
|
|
Track: '' as Asset,
|
2023-04-06 14:25:58 +00:00
|
|
|
DontTrack: '' as Asset,
|
2023-12-13 15:59:11 +00:00
|
|
|
Hide: '' as Asset
|
2022-02-07 09:03:14 +00:00
|
|
|
},
|
|
|
|
space: {
|
|
|
|
Notifications: '' as Ref<Space>
|
2022-02-11 09:18:55 +00:00
|
|
|
},
|
|
|
|
string: {
|
|
|
|
Notification: '' as IntlString,
|
2023-04-05 07:12:06 +00:00
|
|
|
Notifications: '' as IntlString,
|
2023-04-06 14:25:58 +00:00
|
|
|
DontTrack: '' as IntlString,
|
2023-09-28 05:08:00 +00:00
|
|
|
Inbox: '' as IntlString,
|
|
|
|
CommonNotificationTitle: '' as IntlString,
|
2023-12-11 11:54:36 +00:00
|
|
|
CommonNotificationBody: '' as IntlString,
|
|
|
|
ChangedCollaborators: '' as IntlString,
|
|
|
|
NewCollaborators: '' as IntlString,
|
|
|
|
RemovedCollaborators: '' as IntlString,
|
2024-01-11 14:46:11 +00:00
|
|
|
Edited: '' as IntlString,
|
2024-01-18 05:44:05 +00:00
|
|
|
Pinned: '' as IntlString,
|
|
|
|
FlatList: '' as IntlString,
|
|
|
|
GroupedList: '' as IntlString,
|
2024-03-04 19:31:45 +00:00
|
|
|
All: '' as IntlString,
|
|
|
|
ArchiveAll: '' as IntlString
|
2022-02-28 03:42:06 +00:00
|
|
|
},
|
|
|
|
function: {
|
2024-01-11 14:46:11 +00:00
|
|
|
GetInboxNotificationsClient: '' as Resource<InboxNotificationsClientFactory>,
|
|
|
|
HasHiddenDocNotifyContext: '' as Resource<(doc: Doc[]) => Promise<boolean>>,
|
|
|
|
IsDocNotifyContextHidden: '' as Resource<(doc?: Doc | Doc[]) => Promise<boolean>>,
|
2024-01-18 15:45:14 +00:00
|
|
|
IsDocNotifyContextTracked: '' as Resource<(doc?: Doc | Doc[]) => Promise<boolean>>,
|
|
|
|
HasInboxNotifications: '' as Resource<
|
|
|
|
(notificationsByContext: Map<Ref<DocNotifyContext>, InboxNotification[]>) => Promise<boolean>
|
|
|
|
>
|
2023-12-11 11:54:36 +00:00
|
|
|
},
|
|
|
|
resolver: {
|
|
|
|
Location: '' as Resource<(loc: Location) => Promise<ResolvedLocation | undefined>>
|
2022-02-07 09:03:14 +00:00
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
export default notification
|