aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/typings
diff options
context:
space:
mode:
Diffstat (limited to 'server/typings')
-rw-r--r--server/typings/plugins/index.d.ts2
-rw-r--r--server/typings/plugins/plugin-library.model.ts7
-rw-r--r--server/typings/plugins/register-options.model.ts19
3 files changed, 28 insertions, 0 deletions
diff --git a/server/typings/plugins/index.d.ts b/server/typings/plugins/index.d.ts
new file mode 100644
index 000000000..bddb3089e
--- /dev/null
+++ b/server/typings/plugins/index.d.ts
@@ -0,0 +1,2 @@
1export * from './register-options.model'
2export * from './plugin-library.model'
diff --git a/server/typings/plugins/plugin-library.model.ts b/server/typings/plugins/plugin-library.model.ts
new file mode 100644
index 000000000..fd90a3b46
--- /dev/null
+++ b/server/typings/plugins/plugin-library.model.ts
@@ -0,0 +1,7 @@
1import { RegisterOptions } from './register-options.model'
2
3export interface PluginLibrary {
4 register: (options: RegisterOptions) => Promise<any>
5
6 unregister: () => Promise<any>
7}
diff --git a/server/typings/plugins/register-options.model.ts b/server/typings/plugins/register-options.model.ts
new file mode 100644
index 000000000..007ef5e1b
--- /dev/null
+++ b/server/typings/plugins/register-options.model.ts
@@ -0,0 +1,19 @@
1import { logger } from '../../helpers/logger'
2import { RegisterHookOptions } from '../../../shared/models/plugins/register-hook.model'
3import { RegisterSettingOptions } from '../../../shared/models/plugins/register-setting.model'
4import { PluginSettingsManager } from '../../../shared/models/plugins/plugin-settings-manager.model'
5import { PluginStorageManager } from '../../../shared/models/plugins/plugin-storage-manager.model'
6
7export type RegisterOptions = {
8 registerHook: (options: RegisterHookOptions) => void
9
10 registerSetting: (options: RegisterSettingOptions) => void
11
12 settingsManager: PluginSettingsManager
13
14 storageManager: PluginStorageManager
15
16 peertubeHelpers: {
17 logger: typeof logger
18 }
19}