aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-05-11 12:04:47 +0200
committerChocobozzz <me@florianbigard.com>2021-05-11 13:33:11 +0200
commit428ccb8b7a44ce60cabb7401a5464cf5fcbd4dba (patch)
treeb75329b64f5e201abdfb39961f2db09a08292b77 /shared/models
parent2b02c520e66ea452687cab39401b371711caa9ed (diff)
downloadPeerTube-428ccb8b7a44ce60cabb7401a5464cf5fcbd4dba.tar.gz
PeerTube-428ccb8b7a44ce60cabb7401a5464cf5fcbd4dba.tar.zst
PeerTube-428ccb8b7a44ce60cabb7401a5464cf5fcbd4dba.zip
Reorganize plugin models
Diffstat (limited to 'shared/models')
-rw-r--r--shared/models/plugins/client/client-hook.model.ts (renamed from shared/models/plugins/client-hook.model.ts)0
-rw-r--r--shared/models/plugins/client/index.ts6
-rw-r--r--shared/models/plugins/client/plugin-client-scope.type.ts (renamed from shared/models/plugins/plugin-client-scope.type.ts)0
-rw-r--r--shared/models/plugins/client/plugin-element-placeholder.type.ts (renamed from shared/models/plugins/plugin-element-placeholder.type.ts)0
-rw-r--r--shared/models/plugins/client/register-client-form-field.model.ts (renamed from shared/models/plugins/register-client-form-field.model.ts)0
-rw-r--r--shared/models/plugins/client/register-client-hook.model.ts (renamed from shared/models/plugins/register-client-hook.model.ts)0
-rw-r--r--shared/models/plugins/client/register-client-settings-script.model.ts (renamed from shared/models/plugins/register-client-settings-script.model.ts)2
-rw-r--r--shared/models/plugins/index.ts28
-rw-r--r--shared/models/plugins/plugin-index/index.ts3
-rw-r--r--shared/models/plugins/plugin-index/peertube-plugin-index-list.model.ts (renamed from shared/models/plugins/peertube-plugin-index-list.model.ts)2
-rw-r--r--shared/models/plugins/plugin-index/peertube-plugin-index.model.ts (renamed from shared/models/plugins/peertube-plugin-index.model.ts)0
-rw-r--r--shared/models/plugins/plugin-index/peertube-plugin-latest-version.model.ts (renamed from shared/models/plugins/peertube-plugin-latest-version.model.ts)0
-rw-r--r--shared/models/plugins/plugin-package-json.model.ts2
-rw-r--r--shared/models/plugins/server/api/index.ts3
-rw-r--r--shared/models/plugins/server/api/install-plugin.model.ts (renamed from shared/models/plugins/install-plugin.model.ts)0
-rw-r--r--shared/models/plugins/server/api/manage-plugin.model.ts (renamed from shared/models/plugins/manage-plugin.model.ts)0
-rw-r--r--shared/models/plugins/server/api/peertube-plugin.model.ts (renamed from shared/models/plugins/peertube-plugin.model.ts)2
-rw-r--r--shared/models/plugins/server/index.ts6
-rw-r--r--shared/models/plugins/server/managers/index.ts9
-rw-r--r--shared/models/plugins/server/managers/plugin-playlist-privacy-manager.model.ts (renamed from shared/models/plugins/plugin-playlist-privacy-manager.model.ts)2
-rw-r--r--shared/models/plugins/server/managers/plugin-settings-manager.model.ts (renamed from shared/models/plugins/plugin-settings-manager.model.ts)0
-rw-r--r--shared/models/plugins/server/managers/plugin-storage-manager.model.ts (renamed from shared/models/plugins/plugin-storage-manager.model.ts)0
-rw-r--r--shared/models/plugins/server/managers/plugin-transcoding-manager.model.ts (renamed from shared/models/plugins/plugin-transcoding-manager.model.ts)2
-rw-r--r--shared/models/plugins/server/managers/plugin-video-category-manager.model.ts (renamed from shared/models/plugins/plugin-video-category-manager.model.ts)0
-rw-r--r--shared/models/plugins/server/managers/plugin-video-language-manager.model.ts (renamed from shared/models/plugins/plugin-video-language-manager.model.ts)0
-rw-r--r--shared/models/plugins/server/managers/plugin-video-licence-manager.model.ts (renamed from shared/models/plugins/plugin-video-licence-manager.model.ts)0
-rw-r--r--shared/models/plugins/server/managers/plugin-video-privacy-manager.model.ts (renamed from shared/models/plugins/plugin-video-privacy-manager.model.ts)2
-rw-r--r--shared/models/plugins/server/plugin-translation.model.ts (renamed from shared/models/plugins/plugin-translation.model.ts)0
-rw-r--r--shared/models/plugins/server/register-server-hook.model.ts (renamed from shared/models/plugins/register-server-hook.model.ts)0
-rw-r--r--shared/models/plugins/server/server-hook.model.ts (renamed from shared/models/plugins/server-hook.model.ts)0
-rw-r--r--shared/models/plugins/server/settings/index.ts2
-rw-r--r--shared/models/plugins/server/settings/public-server.setting.ts (renamed from shared/models/plugins/public-server.setting.ts)0
-rw-r--r--shared/models/plugins/server/settings/register-server-setting.model.ts (renamed from shared/models/plugins/register-server-setting.model.ts)2
33 files changed, 40 insertions, 33 deletions
diff --git a/shared/models/plugins/client-hook.model.ts b/shared/models/plugins/client/client-hook.model.ts
index 620651051..620651051 100644
--- a/shared/models/plugins/client-hook.model.ts
+++ b/shared/models/plugins/client/client-hook.model.ts
diff --git a/shared/models/plugins/client/index.ts b/shared/models/plugins/client/index.ts
new file mode 100644
index 000000000..6dfc6351f
--- /dev/null
+++ b/shared/models/plugins/client/index.ts
@@ -0,0 +1,6 @@
1export * from './client-hook.model'
2export * from './plugin-client-scope.type'
3export * from './plugin-element-placeholder.type'
4export * from './register-client-form-field.model'
5export * from './register-client-hook.model'
6export * from './register-client-settings-script.model'
diff --git a/shared/models/plugins/plugin-client-scope.type.ts b/shared/models/plugins/client/plugin-client-scope.type.ts
index 8cc234ff2..8cc234ff2 100644
--- a/shared/models/plugins/plugin-client-scope.type.ts
+++ b/shared/models/plugins/client/plugin-client-scope.type.ts
diff --git a/shared/models/plugins/plugin-element-placeholder.type.ts b/shared/models/plugins/client/plugin-element-placeholder.type.ts
index 129099c62..129099c62 100644
--- a/shared/models/plugins/plugin-element-placeholder.type.ts
+++ b/shared/models/plugins/client/plugin-element-placeholder.type.ts
diff --git a/shared/models/plugins/register-client-form-field.model.ts b/shared/models/plugins/client/register-client-form-field.model.ts
index 2df071337..2df071337 100644
--- a/shared/models/plugins/register-client-form-field.model.ts
+++ b/shared/models/plugins/client/register-client-form-field.model.ts
diff --git a/shared/models/plugins/register-client-hook.model.ts b/shared/models/plugins/client/register-client-hook.model.ts
index 81047b21d..81047b21d 100644
--- a/shared/models/plugins/register-client-hook.model.ts
+++ b/shared/models/plugins/client/register-client-hook.model.ts
diff --git a/shared/models/plugins/register-client-settings-script.model.ts b/shared/models/plugins/client/register-client-settings-script.model.ts
index ac16af366..481ceef96 100644
--- a/shared/models/plugins/register-client-settings-script.model.ts
+++ b/shared/models/plugins/client/register-client-settings-script.model.ts
@@ -1,4 +1,4 @@
1import { RegisterServerSettingOptions } from "./register-server-setting.model" 1import { RegisterServerSettingOptions } from '../server'
2 2
3export interface RegisterClientSettingsScript { 3export interface RegisterClientSettingsScript {
4 isSettingHidden (options: { 4 isSettingHidden (options: {
diff --git a/shared/models/plugins/index.ts b/shared/models/plugins/index.ts
index 03b27f907..cbbe4916e 100644
--- a/shared/models/plugins/index.ts
+++ b/shared/models/plugins/index.ts
@@ -1,28 +1,6 @@
1export * from './client-hook.model' 1export * from './client'
2export * from './plugin-index'
3export * from './server'
2export * from './hook-type.enum' 4export * from './hook-type.enum'
3export * from './install-plugin.model'
4export * from './manage-plugin.model'
5export * from './peertube-plugin-index-list.model'
6export * from './peertube-plugin-index.model'
7export * from './peertube-plugin-latest-version.model'
8export * from './peertube-plugin.model'
9export * from './plugin-client-scope.type'
10export * from './plugin-element-placeholder.type'
11export * from './plugin-package-json.model' 5export * from './plugin-package-json.model'
12export * from './plugin-playlist-privacy-manager.model'
13export * from './plugin-settings-manager.model'
14export * from './plugin-storage-manager.model'
15export * from './plugin-transcoding-manager.model'
16export * from './plugin-translation.model'
17export * from './plugin-video-category-manager.model'
18export * from './plugin-video-language-manager.model'
19export * from './plugin-video-licence-manager.model'
20export * from './plugin-video-privacy-manager.model'
21export * from './plugin.type' 6export * from './plugin.type'
22export * from './public-server.setting'
23export * from './register-client-hook.model'
24export * from './register-client-settings-script.model'
25export * from './register-client-form-field.model'
26export * from './register-server-hook.model'
27export * from './register-server-setting.model'
28export * from './server-hook.model'
diff --git a/shared/models/plugins/plugin-index/index.ts b/shared/models/plugins/plugin-index/index.ts
new file mode 100644
index 000000000..913846638
--- /dev/null
+++ b/shared/models/plugins/plugin-index/index.ts
@@ -0,0 +1,3 @@
1export * from './peertube-plugin-index-list.model'
2export * from './peertube-plugin-index.model'
3export * from './peertube-plugin-latest-version.model'
diff --git a/shared/models/plugins/peertube-plugin-index-list.model.ts b/shared/models/plugins/plugin-index/peertube-plugin-index-list.model.ts
index 817bac31e..ecb46482e 100644
--- a/shared/models/plugins/peertube-plugin-index-list.model.ts
+++ b/shared/models/plugins/plugin-index/peertube-plugin-index-list.model.ts
@@ -1,4 +1,4 @@
1import { PluginType } from './plugin.type' 1import { PluginType } from '../plugin.type'
2 2
3export interface PeertubePluginIndexList { 3export interface PeertubePluginIndexList {
4 start: number 4 start: number
diff --git a/shared/models/plugins/peertube-plugin-index.model.ts b/shared/models/plugins/plugin-index/peertube-plugin-index.model.ts
index e91c8b4dc..e91c8b4dc 100644
--- a/shared/models/plugins/peertube-plugin-index.model.ts
+++ b/shared/models/plugins/plugin-index/peertube-plugin-index.model.ts
diff --git a/shared/models/plugins/peertube-plugin-latest-version.model.ts b/shared/models/plugins/plugin-index/peertube-plugin-latest-version.model.ts
index 811a64429..811a64429 100644
--- a/shared/models/plugins/peertube-plugin-latest-version.model.ts
+++ b/shared/models/plugins/plugin-index/peertube-plugin-latest-version.model.ts
diff --git a/shared/models/plugins/plugin-package-json.model.ts b/shared/models/plugins/plugin-package-json.model.ts
index c26e9ae5b..b2f92af80 100644
--- a/shared/models/plugins/plugin-package-json.model.ts
+++ b/shared/models/plugins/plugin-package-json.model.ts
@@ -1,4 +1,4 @@
1import { PluginClientScope } from './plugin-client-scope.type' 1import { PluginClientScope } from './client/plugin-client-scope.type'
2 2
3export type PluginTranslationPaths = { 3export type PluginTranslationPaths = {
4 [ locale: string ]: string 4 [ locale: string ]: string
diff --git a/shared/models/plugins/server/api/index.ts b/shared/models/plugins/server/api/index.ts
new file mode 100644
index 000000000..eb59a03f0
--- /dev/null
+++ b/shared/models/plugins/server/api/index.ts
@@ -0,0 +1,3 @@
1export * from './install-plugin.model'
2export * from './manage-plugin.model'
3export * from './peertube-plugin.model'
diff --git a/shared/models/plugins/install-plugin.model.ts b/shared/models/plugins/server/api/install-plugin.model.ts
index 5a268ebe1..5a268ebe1 100644
--- a/shared/models/plugins/install-plugin.model.ts
+++ b/shared/models/plugins/server/api/install-plugin.model.ts
diff --git a/shared/models/plugins/manage-plugin.model.ts b/shared/models/plugins/server/api/manage-plugin.model.ts
index 612b3056c..612b3056c 100644
--- a/shared/models/plugins/manage-plugin.model.ts
+++ b/shared/models/plugins/server/api/manage-plugin.model.ts
diff --git a/shared/models/plugins/peertube-plugin.model.ts b/shared/models/plugins/server/api/peertube-plugin.model.ts
index 2b0bb8cfa..54c383f57 100644
--- a/shared/models/plugins/peertube-plugin.model.ts
+++ b/shared/models/plugins/server/api/peertube-plugin.model.ts
@@ -1,4 +1,4 @@
1import { PluginType } from './plugin.type' 1import { PluginType } from '../../plugin.type'
2 2
3export interface PeerTubePlugin { 3export interface PeerTubePlugin {
4 name: string 4 name: string
diff --git a/shared/models/plugins/server/index.ts b/shared/models/plugins/server/index.ts
new file mode 100644
index 000000000..d3ff49d3b
--- /dev/null
+++ b/shared/models/plugins/server/index.ts
@@ -0,0 +1,6 @@
1export * from './api'
2export * from './managers'
3export * from './settings'
4export * from './plugin-translation.model'
5export * from './register-server-hook.model'
6export * from './server-hook.model'
diff --git a/shared/models/plugins/server/managers/index.ts b/shared/models/plugins/server/managers/index.ts
new file mode 100644
index 000000000..49365a854
--- /dev/null
+++ b/shared/models/plugins/server/managers/index.ts
@@ -0,0 +1,9 @@
1
2export * from './plugin-playlist-privacy-manager.model'
3export * from './plugin-settings-manager.model'
4export * from './plugin-storage-manager.model'
5export * from './plugin-transcoding-manager.model'
6export * from './plugin-video-category-manager.model'
7export * from './plugin-video-language-manager.model'
8export * from './plugin-video-licence-manager.model'
9export * from './plugin-video-privacy-manager.model'
diff --git a/shared/models/plugins/plugin-playlist-privacy-manager.model.ts b/shared/models/plugins/server/managers/plugin-playlist-privacy-manager.model.ts
index d1823ef4e..4703c0a8b 100644
--- a/shared/models/plugins/plugin-playlist-privacy-manager.model.ts
+++ b/shared/models/plugins/server/managers/plugin-playlist-privacy-manager.model.ts
@@ -1,4 +1,4 @@
1import { VideoPlaylistPrivacy } from '../videos/playlist/video-playlist-privacy.model' 1import { VideoPlaylistPrivacy } from '../../../videos/playlist/video-playlist-privacy.model'
2 2
3export interface PluginPlaylistPrivacyManager { 3export interface PluginPlaylistPrivacyManager {
4 // PUBLIC = 1, 4 // PUBLIC = 1,
diff --git a/shared/models/plugins/plugin-settings-manager.model.ts b/shared/models/plugins/server/managers/plugin-settings-manager.model.ts
index 3c28c0565..3c28c0565 100644
--- a/shared/models/plugins/plugin-settings-manager.model.ts
+++ b/shared/models/plugins/server/managers/plugin-settings-manager.model.ts
diff --git a/shared/models/plugins/plugin-storage-manager.model.ts b/shared/models/plugins/server/managers/plugin-storage-manager.model.ts
index 51567044a..51567044a 100644
--- a/shared/models/plugins/plugin-storage-manager.model.ts
+++ b/shared/models/plugins/server/managers/plugin-storage-manager.model.ts
diff --git a/shared/models/plugins/plugin-transcoding-manager.model.ts b/shared/models/plugins/server/managers/plugin-transcoding-manager.model.ts
index 8babccd4e..a0422a460 100644
--- a/shared/models/plugins/plugin-transcoding-manager.model.ts
+++ b/shared/models/plugins/server/managers/plugin-transcoding-manager.model.ts
@@ -1,4 +1,4 @@
1import { EncoderOptionsBuilder } from '../videos/video-transcoding.model' 1import { EncoderOptionsBuilder } from '../../../videos/video-transcoding.model'
2 2
3export interface PluginTranscodingManager { 3export interface PluginTranscodingManager {
4 addLiveProfile (encoder: string, profile: string, builder: EncoderOptionsBuilder): boolean 4 addLiveProfile (encoder: string, profile: string, builder: EncoderOptionsBuilder): boolean
diff --git a/shared/models/plugins/plugin-video-category-manager.model.ts b/shared/models/plugins/server/managers/plugin-video-category-manager.model.ts
index 201bfa979..201bfa979 100644
--- a/shared/models/plugins/plugin-video-category-manager.model.ts
+++ b/shared/models/plugins/server/managers/plugin-video-category-manager.model.ts
diff --git a/shared/models/plugins/plugin-video-language-manager.model.ts b/shared/models/plugins/server/managers/plugin-video-language-manager.model.ts
index 3fd577a79..3fd577a79 100644
--- a/shared/models/plugins/plugin-video-language-manager.model.ts
+++ b/shared/models/plugins/server/managers/plugin-video-language-manager.model.ts
diff --git a/shared/models/plugins/plugin-video-licence-manager.model.ts b/shared/models/plugins/server/managers/plugin-video-licence-manager.model.ts
index 82a634d3a..82a634d3a 100644
--- a/shared/models/plugins/plugin-video-licence-manager.model.ts
+++ b/shared/models/plugins/server/managers/plugin-video-licence-manager.model.ts
diff --git a/shared/models/plugins/plugin-video-privacy-manager.model.ts b/shared/models/plugins/server/managers/plugin-video-privacy-manager.model.ts
index 3ada99608..7717115e3 100644
--- a/shared/models/plugins/plugin-video-privacy-manager.model.ts
+++ b/shared/models/plugins/server/managers/plugin-video-privacy-manager.model.ts
@@ -1,4 +1,4 @@
1import { VideoPrivacy } from '../videos/video-privacy.enum' 1import { VideoPrivacy } from '../../../videos/video-privacy.enum'
2 2
3export interface PluginVideoPrivacyManager { 3export interface PluginVideoPrivacyManager {
4 // PUBLIC = 1 4 // PUBLIC = 1
diff --git a/shared/models/plugins/plugin-translation.model.ts b/shared/models/plugins/server/plugin-translation.model.ts
index a2dd8e560..a2dd8e560 100644
--- a/shared/models/plugins/plugin-translation.model.ts
+++ b/shared/models/plugins/server/plugin-translation.model.ts
diff --git a/shared/models/plugins/register-server-hook.model.ts b/shared/models/plugins/server/register-server-hook.model.ts
index 746fdc329..746fdc329 100644
--- a/shared/models/plugins/register-server-hook.model.ts
+++ b/shared/models/plugins/server/register-server-hook.model.ts
diff --git a/shared/models/plugins/server-hook.model.ts b/shared/models/plugins/server/server-hook.model.ts
index 88277af5a..88277af5a 100644
--- a/shared/models/plugins/server-hook.model.ts
+++ b/shared/models/plugins/server/server-hook.model.ts
diff --git a/shared/models/plugins/server/settings/index.ts b/shared/models/plugins/server/settings/index.ts
new file mode 100644
index 000000000..b456de019
--- /dev/null
+++ b/shared/models/plugins/server/settings/index.ts
@@ -0,0 +1,2 @@
1export * from './public-server.setting'
2export * from './register-server-setting.model'
diff --git a/shared/models/plugins/public-server.setting.ts b/shared/models/plugins/server/settings/public-server.setting.ts
index 9802c4d7d..9802c4d7d 100644
--- a/shared/models/plugins/public-server.setting.ts
+++ b/shared/models/plugins/server/settings/public-server.setting.ts
diff --git a/shared/models/plugins/register-server-setting.model.ts b/shared/models/plugins/server/settings/register-server-setting.model.ts
index 9f45c3c37..d9a798cac 100644
--- a/shared/models/plugins/register-server-setting.model.ts
+++ b/shared/models/plugins/server/settings/register-server-setting.model.ts
@@ -1,4 +1,4 @@
1import { RegisterClientFormFieldOptions } from './register-client-form-field.model' 1import { RegisterClientFormFieldOptions } from '../../client'
2 2
3export type RegisterServerSettingOptions = RegisterClientFormFieldOptions & { 3export type RegisterServerSettingOptions = RegisterClientFormFieldOptions & {
4 // If the setting is not private, anyone can view its value (client code included) 4 // If the setting is not private, anyone can view its value (client code included)