]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - shared/models/users/user-notification.model.ts
Remove old migration files
[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
36 export interface VideoInfo {
37 id: number
38 uuid: string
39 shortUUID: string
40 name: string
41 }
42
43 export interface AvatarInfo {
44 width: number
45 path: string
46 }
47
48 export interface ActorInfo {
49 id: number
50 displayName: string
51 name: string
52 host: string
53
54 avatars: AvatarInfo[]
55 avatar: AvatarInfo
56 }
57
58 export interface UserNotification {
59 id: number
60 type: UserNotificationType
61 read: boolean
62
63 video?: VideoInfo & {
64 channel: ActorInfo
65 }
66
67 videoImport?: {
68 id: number
69 video?: VideoInfo
70 torrentName?: string
71 magnetUri?: string
72 targetUrl?: string
73 }
74
75 comment?: {
76 id: number
77 threadId: number
78 account: ActorInfo
79 video: VideoInfo
80 }
81
82 abuse?: {
83 id: number
84 state: AbuseState
85
86 video?: VideoInfo
87
88 comment?: {
89 threadId: number
90
91 video: VideoInfo
92 }
93
94 account?: ActorInfo
95 }
96
97 videoBlacklist?: {
98 id: number
99 video: VideoInfo
100 }
101
102 account?: ActorInfo
103
104 actorFollow?: {
105 id: number
106 follower: ActorInfo
107 state: FollowState
108
109 following: {
110 type: 'account' | 'channel' | 'instance'
111 name: string
112 displayName: string
113 host: string
114 }
115 }
116
117 plugin?: {
118 name: string
119 type: PluginType
120 latestVersion: string
121 }
122
123 peertube?: {
124 latestVersion: string
125 }
126
127 createdAt: string
128 updatedAt: string
129 }