]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - shared/models/users/user-notification.model.ts
ee9ac275abb9b4c617bae5f10df7f2c60ad338ae
[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 }
11
12 export interface VideoInfo {
13 id: number
14 uuid: string
15 name: string
16 }
17
18 export interface UserNotification {
19 id: number
20 type: UserNotificationType
21 read: boolean
22
23 video?: VideoInfo & {
24 channel: {
25 id: number
26 displayName: string
27 }
28 }
29
30 videoImport?: {
31 id: number
32 video?: VideoInfo
33 torrentName?: string
34 magnetUri?: string
35 targetUrl?: string
36 }
37
38 comment?: {
39 id: number
40 threadId: number
41 account: {
42 id: number
43 displayName: string
44 }
45 video: VideoInfo
46 }
47
48 videoAbuse?: {
49 id: number
50 video: VideoInfo
51 }
52
53 videoBlacklist?: {
54 id: number
55 video: VideoInfo
56 }
57
58 createdAt: string
59 updatedAt: string
60 }