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