diff options
Diffstat (limited to 'shared/models/users/user-notification.model.ts')
-rw-r--r-- | shared/models/users/user-notification.model.ts | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/shared/models/users/user-notification.model.ts b/shared/models/users/user-notification.model.ts new file mode 100644 index 000000000..186b62612 --- /dev/null +++ b/shared/models/users/user-notification.model.ts | |||
@@ -0,0 +1,83 @@ | |||
1 | export enum UserNotificationType { | ||
2 | NEW_VIDEO_FROM_SUBSCRIPTION = 1, | ||
3 | NEW_COMMENT_ON_MY_VIDEO = 2, | ||
4 | NEW_VIDEO_ABUSE_FOR_MODERATORS = 3, | ||
5 | |||
6 | BLACKLIST_ON_MY_VIDEO = 4, | ||
7 | UNBLACKLIST_ON_MY_VIDEO = 5, | ||
8 | |||
9 | MY_VIDEO_PUBLISHED = 6, | ||
10 | |||
11 | MY_VIDEO_IMPORT_SUCCESS = 7, | ||
12 | MY_VIDEO_IMPORT_ERROR = 8, | ||
13 | |||
14 | NEW_USER_REGISTRATION = 9, | ||
15 | NEW_FOLLOW = 10, | ||
16 | COMMENT_MENTION = 11 | ||
17 | } | ||
18 | |||
19 | export interface VideoInfo { | ||
20 | id: number | ||
21 | uuid: string | ||
22 | name: string | ||
23 | } | ||
24 | |||
25 | export interface ActorInfo { | ||
26 | id: number | ||
27 | displayName: string | ||
28 | name: string | ||
29 | host: string | ||
30 | avatar?: { | ||
31 | path: string | ||
32 | } | ||
33 | } | ||
34 | |||
35 | export interface UserNotification { | ||
36 | id: number | ||
37 | type: UserNotificationType | ||
38 | read: boolean | ||
39 | |||
40 | video?: VideoInfo & { | ||
41 | channel: ActorInfo | ||
42 | } | ||
43 | |||
44 | videoImport?: { | ||
45 | id: number | ||
46 | video?: VideoInfo | ||
47 | torrentName?: string | ||
48 | magnetUri?: string | ||
49 | targetUrl?: string | ||
50 | } | ||
51 | |||
52 | comment?: { | ||
53 | id: number | ||
54 | threadId: number | ||
55 | account: ActorInfo | ||
56 | video: VideoInfo | ||
57 | } | ||
58 | |||
59 | videoAbuse?: { | ||
60 | id: number | ||
61 | video: VideoInfo | ||
62 | } | ||
63 | |||
64 | videoBlacklist?: { | ||
65 | id: number | ||
66 | video: VideoInfo | ||
67 | } | ||
68 | |||
69 | account?: ActorInfo | ||
70 | |||
71 | actorFollow?: { | ||
72 | id: number | ||
73 | follower: ActorInfo | ||
74 | following: { | ||
75 | type: 'account' | 'channel' | ||
76 | name: string | ||
77 | displayName: string | ||
78 | } | ||
79 | } | ||
80 | |||
81 | createdAt: string | ||
82 | updatedAt: string | ||
83 | } | ||