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