]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - shared/models/users/user-notification.model.ts
Add auto follow back support for instances
[github/Chocobozzz/PeerTube.git] / shared / models / users / user-notification.model.ts
CommitLineData
883993c8
C
1import { FollowState } from '../actors'
2
cef534ed
C
3export enum UserNotificationType {
4 NEW_VIDEO_FROM_SUBSCRIPTION = 1,
5 NEW_COMMENT_ON_MY_VIDEO = 2,
6 NEW_VIDEO_ABUSE_FOR_MODERATORS = 3,
2f1548fd 7
cef534ed 8 BLACKLIST_ON_MY_VIDEO = 4,
dc133480 9 UNBLACKLIST_ON_MY_VIDEO = 5,
2f1548fd 10
dc133480 11 MY_VIDEO_PUBLISHED = 6,
2f1548fd 12
dc133480 13 MY_VIDEO_IMPORT_SUCCESS = 7,
f7cc67b4 14 MY_VIDEO_IMPORT_ERROR = 8,
2f1548fd 15
f7cc67b4
C
16 NEW_USER_REGISTRATION = 9,
17 NEW_FOLLOW = 10,
7ccddd7b
JM
18 COMMENT_MENTION = 11,
19
883993c8
C
20 VIDEO_AUTO_BLACKLIST_FOR_MODERATORS = 12,
21
8424c402
C
22 NEW_INSTANCE_FOLLOWER = 13,
23
24 AUTO_INSTANCE_FOLLOWING = 14
cef534ed
C
25}
26
dc133480 27export interface VideoInfo {
cef534ed
C
28 id: number
29 uuid: string
30 name: string
31}
32
457bb213
C
33export interface ActorInfo {
34 id: number
35 displayName: string
36 name: string
38967f7b 37 host: string
457bb213
C
38 avatar?: {
39 path: string
40 }
41}
42
cef534ed
C
43export interface UserNotification {
44 id: number
45 type: UserNotificationType
46 read: boolean
47
48 video?: VideoInfo & {
457bb213 49 channel: ActorInfo
cef534ed
C
50 }
51
dc133480
C
52 videoImport?: {
53 id: number
54 video?: VideoInfo
55 torrentName?: string
56 magnetUri?: string
57 targetUrl?: string
58 }
59
cef534ed
C
60 comment?: {
61 id: number
dc133480 62 threadId: number
457bb213 63 account: ActorInfo
dc133480 64 video: VideoInfo
cef534ed
C
65 }
66
67 videoAbuse?: {
68 id: number
69 video: VideoInfo
70 }
71
72 videoBlacklist?: {
73 id: number
74 video: VideoInfo
75 }
76
457bb213 77 account?: ActorInfo
f7cc67b4
C
78
79 actorFollow?: {
80 id: number
457bb213 81 follower: ActorInfo
883993c8 82 state: FollowState
8424c402 83
f7cc67b4 84 following: {
8424c402 85 type: 'account' | 'channel' | 'instance'
f7cc67b4
C
86 name: string
87 displayName: string
8424c402 88 host: string
f7cc67b4
C
89 }
90 }
91
cef534ed
C
92 createdAt: string
93 updatedAt: string
94}