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