]>
Commit | Line | Data |
---|---|---|
883993c8 C |
1 | import { FollowState } from '../actors' |
2 | ||
cef534ed C |
3 | export 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 | ||
22 | NEW_INSTANCE_FOLLOWER = 13 | |
cef534ed C |
23 | } |
24 | ||
dc133480 | 25 | export interface VideoInfo { |
cef534ed C |
26 | id: number |
27 | uuid: string | |
28 | name: string | |
29 | } | |
30 | ||
457bb213 C |
31 | export interface ActorInfo { |
32 | id: number | |
33 | displayName: string | |
34 | name: string | |
38967f7b | 35 | host: string |
457bb213 C |
36 | avatar?: { |
37 | path: string | |
38 | } | |
39 | } | |
40 | ||
cef534ed C |
41 | export interface UserNotification { |
42 | id: number | |
43 | type: UserNotificationType | |
44 | read: boolean | |
45 | ||
46 | video?: VideoInfo & { | |
457bb213 | 47 | channel: ActorInfo |
cef534ed C |
48 | } |
49 | ||
dc133480 C |
50 | videoImport?: { |
51 | id: number | |
52 | video?: VideoInfo | |
53 | torrentName?: string | |
54 | magnetUri?: string | |
55 | targetUrl?: string | |
56 | } | |
57 | ||
cef534ed C |
58 | comment?: { |
59 | id: number | |
dc133480 | 60 | threadId: number |
457bb213 | 61 | account: ActorInfo |
dc133480 | 62 | video: VideoInfo |
cef534ed C |
63 | } |
64 | ||
65 | videoAbuse?: { | |
66 | id: number | |
67 | video: VideoInfo | |
68 | } | |
69 | ||
70 | videoBlacklist?: { | |
71 | id: number | |
72 | video: VideoInfo | |
73 | } | |
74 | ||
457bb213 | 75 | account?: ActorInfo |
f7cc67b4 C |
76 | |
77 | actorFollow?: { | |
78 | id: number | |
457bb213 | 79 | follower: ActorInfo |
883993c8 | 80 | state: FollowState |
f7cc67b4 C |
81 | following: { |
82 | type: 'account' | 'channel' | |
83 | name: string | |
84 | displayName: string | |
85 | } | |
86 | } | |
87 | ||
cef534ed C |
88 | createdAt: string |
89 | updatedAt: string | |
90 | } |