diff options
Diffstat (limited to 'server/typings/plugins')
-rw-r--r-- | server/typings/plugins/index.d.ts | 2 | ||||
-rw-r--r-- | server/typings/plugins/plugin-library.model.ts | 7 | ||||
-rw-r--r-- | server/typings/plugins/register-options.model.ts | 19 |
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 @@ | |||
1 | export * from './register-options.model' | ||
2 | export * 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 @@ | |||
1 | import { RegisterOptions } from './register-options.model' | ||
2 | |||
3 | export 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 @@ | |||
1 | import { logger } from '../../helpers/logger' | ||
2 | import { RegisterHookOptions } from '../../../shared/models/plugins/register-hook.model' | ||
3 | import { RegisterSettingOptions } from '../../../shared/models/plugins/register-setting.model' | ||
4 | import { PluginSettingsManager } from '../../../shared/models/plugins/plugin-settings-manager.model' | ||
5 | import { PluginStorageManager } from '../../../shared/models/plugins/plugin-storage-manager.model' | ||
6 | |||
7 | export 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 | } | ||