]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - shared/models/users/user-notification.model.ts
Add notifications in the client
[github/Chocobozzz/PeerTube.git] / shared / models / users / user-notification.model.ts
1 export enum UserNotificationType {
2 NEW_VIDEO_FROM_SUBSCRIPTION = 1,
3 NEW_COMMENT_ON_MY_VIDEO = 2,
4 NEW_VIDEO_ABUSE_FOR_MODERATORS = 3,
5
6 BLACKLIST_ON_MY_VIDEO = 4,
7 UNBLACKLIST_ON_MY_VIDEO = 5,
8
9 MY_VIDEO_PUBLISHED = 6,
10
11 MY_VIDEO_IMPORT_SUCCESS = 7,
12 MY_VIDEO_IMPORT_ERROR = 8,
13
14 NEW_USER_REGISTRATION = 9,
15 NEW_FOLLOW = 10,
16 COMMENT_MENTION = 11
17 }
18
19 export interface VideoInfo {
20 id: number
21 uuid: string
22 name: string
23 }
24
25 export interface UserNotification {
26 id: number
27 type: UserNotificationType
28 read: boolean
29
30 video?: VideoInfo & {
31 channel: {
32 id: number
33 displayName: string
34 }
35 }
36
37 videoImport?: {
38 id: number
39 video?: VideoInfo
40 torrentName?: string
41 magnetUri?: string
42 targetUrl?: string
43 }
44
45 comment?: {
46 id: number
47 threadId: number
48 account: {
49 id: number
50 displayName: string
51 }
52 video: VideoInfo
53 }
54
55 videoAbuse?: {
56 id: number
57 video: VideoInfo
58 }
59
60 videoBlacklist?: {
61 id: number
62 video: VideoInfo
63 }
64
65 account?: {
66 id: number
67 displayName: string
68 name: string
69 }
70
71 actorFollow?: {
72 id: number
73 follower: {
74 name: string
75 displayName: string
76 }
77 following: {
78 type: 'account' | 'channel'
79 name: string
80 displayName: string
81 }
82 }
83
84 createdAt: string
85 updatedAt: string
86 }