Introduce infrastructure for Notification Profiles

This commit is contained in:
Scott Nonnenberg
2025-05-06 00:39:04 +10:00
committed by GitHub
parent 80872ef15c
commit 98270316c5
35 changed files with 2917 additions and 38 deletions

View File

@@ -45,6 +45,7 @@ import type {
import type { SyncTaskType } from '../util/syncTasks';
import type { AttachmentBackupJobType } from '../types/AttachmentBackup';
import type { GifType } from '../components/fun/panels/FunPanelGifs';
import type { NotificationProfileType } from '../types/NotificationProfile';
export type ReadableDB = Database & { __readable_db: never };
export type WritableDB = ReadableDB & { __writable_db: never };
@@ -726,6 +727,9 @@ type ReadableInterface = {
}): Array<StoryReadType>;
countStoryReadsByConversation(conversationId: string): number;
getAllNotificationProfiles(): Array<NotificationProfileType>;
getNotificationProfileById(id: string): NotificationProfileType | undefined;
getMessagesNeedingUpgrade: (
limit: number,
options: { maxVersion: number }
@@ -1020,6 +1024,12 @@ type WritableInterface = {
_deleteAllStoryReads(): void;
addNewStoryRead(read: StoryReadType): void;
_deleteAllNotificationProfiles(): void;
deleteNotificationProfileById(id: string): void;
markNotificationProfileDeleted(id: string): number | undefined;
createNotificationProfile(profile: NotificationProfileType): void;
updateNotificationProfile(profile: NotificationProfileType): void;
removeAll: () => void;
removeAllConfiguration: () => void;
eraseStorageServiceState: () => void;