notification
This commit is contained in:
1 parent
382cafa152
commit
60391ee123
26 files changed
+1077
-14
No files matched your search
@@ -0,0 +1,11 @@
|
||||
import type { NotificationDeviceToken } from '../../../../generated/prisma/client.js';
|
||||
|
||||
/** DI-токен, т.к. интерфейсы стираются при компиляции TS */
|
||||
export const DEVICE_TOKEN_REPOSITORY = Symbol('DEVICE_TOKEN_REPOSITORY');
|
||||
|
||||
export interface IDeviceTokenRepository {
|
||||
/** Регистрирует токен устройства, обновляет запись при повторной регистрации того же токена */
|
||||
upsert(userId: string, token: string, platform: string): Promise<void>;
|
||||
remove(userId: string, token: string): Promise<void>;
|
||||
findByUserId(userId: string): Promise<NotificationDeviceToken[]>;
|
||||
}
|
||||
Reference in new issue
Block a user