aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'shared/models/plugins')
-rw-r--r--shared/models/plugins/server/managers/plugin-playlist-privacy-manager.model.ts12
-rw-r--r--shared/models/plugins/server/managers/plugin-video-category-manager.model.ts10
-rw-r--r--shared/models/plugins/server/managers/plugin-video-language-manager.model.ts10
-rw-r--r--shared/models/plugins/server/managers/plugin-video-licence-manager.model.ts10
-rw-r--r--shared/models/plugins/server/managers/plugin-video-privacy-manager.model.ts14
-rw-r--r--shared/models/plugins/server/plugin-constant-manager.model.ts7
-rw-r--r--shared/models/plugins/server/server-hook.model.ts4
7 files changed, 55 insertions, 12 deletions
diff --git a/shared/models/plugins/server/managers/plugin-playlist-privacy-manager.model.ts b/shared/models/plugins/server/managers/plugin-playlist-privacy-manager.model.ts
index 4703c0a8b..35247c1e3 100644
--- a/shared/models/plugins/server/managers/plugin-playlist-privacy-manager.model.ts
+++ b/shared/models/plugins/server/managers/plugin-playlist-privacy-manager.model.ts
@@ -1,8 +1,12 @@
1import { VideoPlaylistPrivacy } from '../../../videos/playlist/video-playlist-privacy.model' 1import { VideoPlaylistPrivacy } from '../../../videos/playlist/video-playlist-privacy.model'
2import { ConstantManager } from '../plugin-constant-manager.model'
2 3
3export interface PluginPlaylistPrivacyManager { 4export interface PluginPlaylistPrivacyManager extends ConstantManager<VideoPlaylistPrivacy> {
4 // PUBLIC = 1, 5 /**
5 // UNLISTED = 2, 6 * PUBLIC = 1,
6 // PRIVATE = 3 7 * UNLISTED = 2,
8 * PRIVATE = 3
9 * @deprecated use `deleteConstant` instead
10 */
7 deletePlaylistPrivacy: (privacyKey: VideoPlaylistPrivacy) => boolean 11 deletePlaylistPrivacy: (privacyKey: VideoPlaylistPrivacy) => boolean
8} 12}
diff --git a/shared/models/plugins/server/managers/plugin-video-category-manager.model.ts b/shared/models/plugins/server/managers/plugin-video-category-manager.model.ts
index 201bfa979..cf3d828fe 100644
--- a/shared/models/plugins/server/managers/plugin-video-category-manager.model.ts
+++ b/shared/models/plugins/server/managers/plugin-video-category-manager.model.ts
@@ -1,5 +1,13 @@
1export interface PluginVideoCategoryManager { 1import { ConstantManager } from '../plugin-constant-manager.model'
2
3export interface PluginVideoCategoryManager extends ConstantManager<number> {
4 /**
5 * @deprecated use `addConstant` instead
6 */
2 addCategory: (categoryKey: number, categoryLabel: string) => boolean 7 addCategory: (categoryKey: number, categoryLabel: string) => boolean
3 8
9 /**
10 * @deprecated use `deleteConstant` instead
11 */
4 deleteCategory: (categoryKey: number) => boolean 12 deleteCategory: (categoryKey: number) => boolean
5} 13}
diff --git a/shared/models/plugins/server/managers/plugin-video-language-manager.model.ts b/shared/models/plugins/server/managers/plugin-video-language-manager.model.ts
index 3fd577a79..69fc8e503 100644
--- a/shared/models/plugins/server/managers/plugin-video-language-manager.model.ts
+++ b/shared/models/plugins/server/managers/plugin-video-language-manager.model.ts
@@ -1,5 +1,13 @@
1export interface PluginVideoLanguageManager { 1import { ConstantManager } from '../plugin-constant-manager.model'
2
3export interface PluginVideoLanguageManager extends ConstantManager<string> {
4 /**
5 * @deprecated use `addConstant` instead
6 */
2 addLanguage: (languageKey: string, languageLabel: string) => boolean 7 addLanguage: (languageKey: string, languageLabel: string) => boolean
3 8
9 /**
10 * @deprecated use `deleteConstant` instead
11 */
4 deleteLanguage: (languageKey: string) => boolean 12 deleteLanguage: (languageKey: string) => boolean
5} 13}
diff --git a/shared/models/plugins/server/managers/plugin-video-licence-manager.model.ts b/shared/models/plugins/server/managers/plugin-video-licence-manager.model.ts
index 82a634d3a..6efeadd7d 100644
--- a/shared/models/plugins/server/managers/plugin-video-licence-manager.model.ts
+++ b/shared/models/plugins/server/managers/plugin-video-licence-manager.model.ts
@@ -1,5 +1,13 @@
1export interface PluginVideoLicenceManager { 1import { ConstantManager } from '../plugin-constant-manager.model'
2
3export interface PluginVideoLicenceManager extends ConstantManager<number> {
4 /**
5 * @deprecated use `addLicence` instead
6 */
2 addLicence: (licenceKey: number, licenceLabel: string) => boolean 7 addLicence: (licenceKey: number, licenceLabel: string) => boolean
3 8
9 /**
10 * @deprecated use `deleteLicence` instead
11 */
4 deleteLicence: (licenceKey: number) => boolean 12 deleteLicence: (licenceKey: number) => boolean
5} 13}
diff --git a/shared/models/plugins/server/managers/plugin-video-privacy-manager.model.ts b/shared/models/plugins/server/managers/plugin-video-privacy-manager.model.ts
index 7717115e3..a237037db 100644
--- a/shared/models/plugins/server/managers/plugin-video-privacy-manager.model.ts
+++ b/shared/models/plugins/server/managers/plugin-video-privacy-manager.model.ts
@@ -1,9 +1,13 @@
1import { VideoPrivacy } from '../../../videos/video-privacy.enum' 1import { VideoPrivacy } from '../../../videos/video-privacy.enum'
2import { ConstantManager } from '../plugin-constant-manager.model'
2 3
3export interface PluginVideoPrivacyManager { 4export interface PluginVideoPrivacyManager extends ConstantManager<VideoPrivacy> {
4 // PUBLIC = 1 5 /**
5 // UNLISTED = 2 6 * PUBLIC = 1,
6 // PRIVATE = 3 7 * UNLISTED = 2,
7 // INTERNAL = 4 8 * PRIVATE = 3
9 * INTERNAL = 4
10 * @deprecated use `deleteConstant` instead
11 */
8 deletePrivacy: (privacyKey: VideoPrivacy) => boolean 12 deletePrivacy: (privacyKey: VideoPrivacy) => boolean
9} 13}
diff --git a/shared/models/plugins/server/plugin-constant-manager.model.ts b/shared/models/plugins/server/plugin-constant-manager.model.ts
new file mode 100644
index 000000000..4de3ce38f
--- /dev/null
+++ b/shared/models/plugins/server/plugin-constant-manager.model.ts
@@ -0,0 +1,7 @@
1export interface ConstantManager <K extends string | number> {
2 addConstant: (key: K, label: string) => boolean
3 deleteConstant: (key: K) => boolean
4 getConstantValue: (key: K) => string
5 getConstants: () => Record<K, string>
6 resetConstants: () => void
7}
diff --git a/shared/models/plugins/server/server-hook.model.ts b/shared/models/plugins/server/server-hook.model.ts
index 5f29534b5..562c6eb12 100644
--- a/shared/models/plugins/server/server-hook.model.ts
+++ b/shared/models/plugins/server/server-hook.model.ts
@@ -18,6 +18,10 @@ export const serverFilterHookObject = {
18 'filter:api.user.me.videos.list.params': true, 18 'filter:api.user.me.videos.list.params': true,
19 'filter:api.user.me.videos.list.result': true, 19 'filter:api.user.me.videos.list.result': true,
20 20
21 // Filter params/result used to list overview videos for the REST API
22 'filter:api.overviews.videos.list.params': true,
23 'filter:api.overviews.videos.list.result': true,
24
21 // Filter params/results to search videos/channels in the DB or on the remote index 25 // Filter params/results to search videos/channels in the DB or on the remote index
22 'filter:api.search.videos.local.list.params': true, 26 'filter:api.search.videos.local.list.params': true,
23 'filter:api.search.videos.local.list.result': true, 27 'filter:api.search.videos.local.list.result': true,