aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models/plugins/server-hook.model.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-07-18 14:28:37 +0200
committerChocobozzz <chocobozzz@cpy.re>2019-07-24 10:58:16 +0200
commitb4055e1c23eeefb0c8a85a77f312b2827d98f483 (patch)
tree51b6b04c1ad10897047817d2eaaa037d1331fa6a /shared/models/plugins/server-hook.model.ts
parent66e001c848c009412c65cbce41be344d8985fd83 (diff)
downloadPeerTube-b4055e1c23eeefb0c8a85a77f312b2827d98f483.tar.gz
PeerTube-b4055e1c23eeefb0c8a85a77f312b2827d98f483.tar.zst
PeerTube-b4055e1c23eeefb0c8a85a77f312b2827d98f483.zip
Add server hooks
Diffstat (limited to 'shared/models/plugins/server-hook.model.ts')
-rw-r--r--shared/models/plugins/server-hook.model.ts34
1 files changed, 34 insertions, 0 deletions
diff --git a/shared/models/plugins/server-hook.model.ts b/shared/models/plugins/server-hook.model.ts
new file mode 100644
index 000000000..30469856c
--- /dev/null
+++ b/shared/models/plugins/server-hook.model.ts
@@ -0,0 +1,34 @@
1export type ServerFilterHookName =
2 'filter:api.videos.list.params' |
3 'filter:api.videos.list.result' |
4 'filter:api.video.get.result' |
5
6 'filter:api.video.upload.accept.result' |
7 'filter:api.video-thread.create.accept.result' |
8 'filter:api.video-comment-reply.create.accept.result' |
9
10 'filter:api.video-thread-comments.list.params' |
11 'filter:api.video-thread-comments.list.result' |
12
13 'filter:api.video-threads.list.params' |
14 'filter:api.video-threads.list.result' |
15
16 'filter:video.auto-blacklist.result'
17
18export type ServerActionHookName =
19 'action:application.listening' |
20
21 'action:api.video.updated' |
22 'action:api.video.deleted' |
23 'action:api.video.uploaded' |
24 'action:api.video.viewed' |
25
26 'action:api.video-thread.created' |
27 'action:api.video-comment-reply.created' |
28 'action:api.video-comment.deleted'
29
30export type ServerHookName = ServerFilterHookName | ServerActionHookName
31
32export interface ServerHook {
33 runHook (hookName: ServerHookName, params?: any)
34}