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