aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models/plugins/client-hook.model.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-07-24 10:21:22 +0200
committerChocobozzz <chocobozzz@cpy.re>2019-07-24 10:58:16 +0200
commit5f189c9c85449951254646ddf6cd6c84bc4c06ff (patch)
tree15a1abee0594be92cc08c86edc544da132ba27d8 /shared/models/plugins/client-hook.model.ts
parent51326912d61b05a33dd9cf3ca9befa6e2715b346 (diff)
downloadPeerTube-5f189c9c85449951254646ddf6cd6c84bc4c06ff.tar.gz
PeerTube-5f189c9c85449951254646ddf6cd6c84bc4c06ff.tar.zst
PeerTube-5f189c9c85449951254646ddf6cd6c84bc4c06ff.zip
Add hooks documentation
Diffstat (limited to 'shared/models/plugins/client-hook.model.ts')
-rw-r--r--shared/models/plugins/client-hook.model.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/shared/models/plugins/client-hook.model.ts b/shared/models/plugins/client-hook.model.ts
index bf444fe5a..87e8092c0 100644
--- a/shared/models/plugins/client-hook.model.ts
+++ b/shared/models/plugins/client-hook.model.ts
@@ -1,29 +1,38 @@
1// Data from API hooks: {hookType}:api.{location}.{elementType}.{actionType}.{target} 1// Data from API hooks: {hookType}:api.{location}.{elementType}.{actionType}.{target}
2 2
3export const clientFilterHookObject = { 3export const clientFilterHookObject = {
4 // Filter params/result of the function that fetch videos of the trending page
4 'filter:api.trending-videos.videos.list.params': true, 5 'filter:api.trending-videos.videos.list.params': true,
5 'filter:api.trending-videos.videos.list.result': true, 6 'filter:api.trending-videos.videos.list.result': true,
6 7
8 // Filter params/result of the function that fetch videos of the local page
7 'filter:api.local-videos.videos.list.params': true, 9 'filter:api.local-videos.videos.list.params': true,
8 'filter:api.local-videos.videos.list.result': true, 10 'filter:api.local-videos.videos.list.result': true,
9 11
12 // Filter params/result of the function that fetch videos of the recently-added page
10 'filter:api.recently-added-videos.videos.list.params': true, 13 'filter:api.recently-added-videos.videos.list.params': true,
11 'filter:api.recently-added-videos.videos.list.result': true, 14 'filter:api.recently-added-videos.videos.list.result': true,
12 15
16 // Filter params/result of the function that fetch videos of the user subscription page
13 'filter:api.user-subscriptions-videos.videos.list.params': true, 17 'filter:api.user-subscriptions-videos.videos.list.params': true,
14 'filter:api.user-subscriptions-videos.videos.list.result': true, 18 'filter:api.user-subscriptions-videos.videos.list.result': true,
15 19
20 // Filter params/result of the function that fetch the video of the video-watch page
16 'filter:api.video-watch.video.get.params': true, 21 'filter:api.video-watch.video.get.params': true,
17 'filter:api.video-watch.video.get.result': true, 22 'filter:api.video-watch.video.get.result': true,
18 23
24 // Filter params/result of the function that fetch the threads of the video-watch page
19 'filter:api.video-watch.video-threads.list.params': true, 25 'filter:api.video-watch.video-threads.list.params': true,
20 'filter:api.video-watch.video-threads.list.result': true, 26 'filter:api.video-watch.video-threads.list.result': true,
21 27
28 // Filter params/result of the function that fetch the replies of a thread in the video-watch page
22 'filter:api.video-watch.video-thread-replies.list.params': true, 29 'filter:api.video-watch.video-thread-replies.list.params': true,
23 'filter:api.video-watch.video-thread-replies.list.result': true, 30 'filter:api.video-watch.video-thread-replies.list.result': true,
24 31
32 // Filter params/result of the function that fetch videos according to the user search
25 'filter:api.search.videos.list.params': true, 33 'filter:api.search.videos.list.params': true,
26 'filter:api.search.videos.list.result': true, 34 'filter:api.search.videos.list.result': true,
35 // Filter params/result of the function that fetch video-channels according to the user search
27 'filter:api.search.video-channels.list.params': true, 36 'filter:api.search.video-channels.list.params': true,
28 'filter:api.search.video-channels.list.result': true 37 'filter:api.search.video-channels.list.result': true
29} 38}
@@ -31,11 +40,15 @@ export const clientFilterHookObject = {
31export type ClientFilterHookName = keyof typeof clientFilterHookObject 40export type ClientFilterHookName = keyof typeof clientFilterHookObject
32 41
33export const clientActionHookObject = { 42export const clientActionHookObject = {
43 // Fired when the application is being initialized
34 'action:application.init': true, 44 'action:application.init': true,
35 45
46 // Fired when the video watch page is being initialized
36 'action:video-watch.init': true, 47 'action:video-watch.init': true,
48 // Fired when the video watch page loaded the video
37 'action:video-watch.video.loaded': true, 49 'action:video-watch.video.loaded': true,
38 50
51 // Fired when the search page is being initialized
39 'action:search.init': true 52 'action:search.init': true
40} 53}
41 54