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