aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models/plugins/client-hook.model.ts
diff options
context:
space:
mode:
Diffstat (limited to 'shared/models/plugins/client-hook.model.ts')
-rw-r--r--shared/models/plugins/client-hook.model.ts39
1 files changed, 39 insertions, 0 deletions
diff --git a/shared/models/plugins/client-hook.model.ts b/shared/models/plugins/client-hook.model.ts
new file mode 100644
index 000000000..89400003e
--- /dev/null
+++ b/shared/models/plugins/client-hook.model.ts
@@ -0,0 +1,39 @@
1export type ClientFilterHookName =
2 'filter:api.videos.list.trending.params' |
3 'filter:api.videos.list.trending.result' |
4
5 'filter:api.videos.list.local.params' |
6 'filter:api.videos.list.local.result' |
7
8 'filter:api.videos.list.recently-added.params' |
9 'filter:api.videos.list.recently-added.result' |
10
11 'filter:api.videos.list.user-subscriptions.params' |
12 'filter:api.videos.list.user-subscriptions.result' |
13
14 'filter:api.video-watch.video.get.params' |
15 'filter:api.video-watch.video.get.result' |
16
17 'filter:api.video-watch.video-threads.list.params' |
18 'filter:api.video-watch.video-threads.list.result' |
19
20 'filter:api.video-watch.video-thread-replies.list.params' |
21 'filter:api.video-watch.video-thread-replies.list.result' |
22
23 'filter:api.search.videos.list.params' |
24 'filter:api.search.videos.list.result' |
25 'filter:api.search.video-channels.list.params' |
26 'filter:api.search.video-channels.list.result'
27
28export type ClientActionHookName =
29 'action:application.init' |
30
31 'action:video-watch.init' |
32
33 'action:video-watch.video.loaded'
34
35export type ClientHookName = ClientActionHookName | ClientFilterHookName
36
37export interface ClientHook {
38 runHook <T> (hookName: ClientHookName, result?: T, params?: any): Promise<T>
39}