]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - shared/models/users/user-notification.model.ts
Remove comments, rates and views from stats
[github/Chocobozzz/PeerTube.git] / shared / models / users / user-notification.model.ts
1 import { FollowState } from '../actors'
2 import { AbuseState } from '../moderation'
3 import { PluginType } from '../plugins'
4
5 export const enum UserNotificationType {
6 NEW_VIDEO_FROM_SUBSCRIPTION = 1,
7 NEW_COMMENT_ON_MY_VIDEO = 2,
8 NEW_ABUSE_FOR_MODERATORS = 3,
9
10 BLACKLIST_ON_MY_VIDEO = 4,
11 UNBLACKLIST_ON_MY_VIDEO = 5,
12
13 MY_VIDEO_PUBLISHED = 6,
14
15 MY_VIDEO_IMPORT_SUCCESS = 7,
16 MY_VIDEO_IMPORT_ERROR = 8,
17
18 NEW_USER_REGISTRATION = 9,
19 NEW_FOLLOW = 10,
20 COMMENT_MENTION = 11,
21
22 VIDEO_AUTO_BLACKLIST_FOR_MODERATORS = 12,
23
24 NEW_INSTANCE_FOLLOWER = 13,
25
26 AUTO_INSTANCE_FOLLOWING = 14,
27
28 ABUSE_STATE_CHANGE = 15,
29
30 ABUSE_NEW_MESSAGE = 16,
31
32 NEW_PLUGIN_VERSION = 17,
33 NEW_PEERTUBE_VERSION = 18,
34
35 MY_VIDEO_STUDIO_EDITION_FINISHED = 19
36 }
37
38 export interface VideoInfo {
39 id: number
40 uuid: string
41 shortUUID: string
42 name: string
43 }
44
45 export interface AvatarInfo {
46 width: number
47 path: string
48 }
49
50 export interface ActorInfo {
51 id: number
52 displayName: string
53 name: string
54 host: string
55
56 avatars: AvatarInfo[]
57 avatar: AvatarInfo
58 }
59
60 export interface UserNotification {
61 id: number
62 type: UserNotificationType
63 read: boolean
64
65 video?: VideoInfo & {
66 channel: ActorInfo
67 }
68
69 videoImport?: {
70 id: number
71 video?: VideoInfo
72 torrentName?: string
73 magnetUri?: string
74 targetUrl?: string
75 }
76
77 comment?: {
78 id: number
79 threadId: number
80 account: ActorInfo
81 video: VideoInfo
82 }
83
84 abuse?: {
85 id: number
86 state: AbuseState
87
88 video?: VideoInfo
89
90 comment?: {
91 threadId: number
92
93 video: VideoInfo
94 }
95
96 account?: ActorInfo
97 }
98
99 videoBlacklist?: {
100 id: number
101 video: VideoInfo
102 }
103
104 account?: ActorInfo
105
106 actorFollow?: {
107 id: number
108 follower: ActorInfo
109 state: FollowState
110
111 following: {
112 type: 'account' | 'channel' | 'instance'
113 name: string
114 displayName: string
115 host: string
116 }
117 }
118
119 plugin?: {
120 name: string
121 type: PluginType
122 latestVersion: string
123 }
124
125 peertube?: {
126 latestVersion: string
127 }
128
129 createdAt: string
130 updatedAt: string
131 }