]>
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 | ||
8424c402 C |
22 | NEW_INSTANCE_FOLLOWER = 13, |
23 | ||
24 | AUTO_INSTANCE_FOLLOWING = 14 | |
cef534ed C |
25 | } |
26 | ||
dc133480 | 27 | export interface VideoInfo { |
cef534ed C |
28 | id: number |
29 | uuid: string | |
30 | name: string | |
31 | } | |
32 | ||
457bb213 C |
33 | export 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 |
43 | export 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 | ||
d95d1559 | 67 | abuse?: { |
cef534ed | 68 | id: number |
d95d1559 C |
69 | |
70 | video?: VideoInfo | |
71 | ||
72 | comment?: { | |
73 | threadId: number | |
74 | ||
75 | video: { | |
76 | uuid: string | |
77 | } | |
78 | } | |
79 | ||
80 | account?: ActorInfo | |
cef534ed C |
81 | } |
82 | ||
83 | videoBlacklist?: { | |
84 | id: number | |
85 | video: VideoInfo | |
86 | } | |
87 | ||
457bb213 | 88 | account?: ActorInfo |
f7cc67b4 C |
89 | |
90 | actorFollow?: { | |
91 | id: number | |
457bb213 | 92 | follower: ActorInfo |
883993c8 | 93 | state: FollowState |
8424c402 | 94 | |
f7cc67b4 | 95 | following: { |
8424c402 | 96 | type: 'account' | 'channel' | 'instance' |
f7cc67b4 C |
97 | name: string |
98 | displayName: string | |
8424c402 | 99 | host: string |
f7cc67b4 C |
100 | } |
101 | } | |
102 | ||
cef534ed C |
103 | createdAt: string |
104 | updatedAt: string | |
105 | } |