]>
Commit | Line | Data |
---|---|---|
1 | import { PluginSettingsManager } from '../../../shared/models/plugins/plugin-settings-manager.model' | |
2 | import { PluginStorageManager } from '../../../shared/models/plugins/plugin-storage-manager.model' | |
3 | import { RegisterServerHookOptions } from '../../../shared/models/plugins/register-server-hook.model' | |
4 | import { RegisterServerSettingOptions } from '../../../shared/models/plugins/register-server-setting.model' | |
5 | import { PluginVideoCategoryManager } from '../../../shared/models/plugins/plugin-video-category-manager.model' | |
6 | import { PluginVideoLanguageManager } from '../../../shared/models/plugins/plugin-video-language-manager.model' | |
7 | import { PluginVideoLicenceManager } from '../../../shared/models/plugins/plugin-video-licence-manager.model' | |
8 | import { Logger } from 'winston' | |
9 | import { Router } from 'express' | |
10 | import { PluginVideoPrivacyManager } from '@shared/models/plugins/plugin-video-privacy-manager.model' | |
11 | import { PluginPlaylistPrivacyManager } from '@shared/models/plugins/plugin-playlist-privacy-manager.model' | |
12 | ||
13 | export type PeerTubeHelpers = { | |
14 | logger: Logger | |
15 | ||
16 | database: { | |
17 | query: Function | |
18 | } | |
19 | ||
20 | videos: { | |
21 | removeVideo: (videoId: number) => Promise<void> | |
22 | } | |
23 | } | |
24 | ||
25 | export type RegisterServerOptions = { | |
26 | registerHook: (options: RegisterServerHookOptions) => void | |
27 | ||
28 | registerSetting: (options: RegisterServerSettingOptions) => void | |
29 | ||
30 | settingsManager: PluginSettingsManager | |
31 | ||
32 | storageManager: PluginStorageManager | |
33 | ||
34 | videoCategoryManager: PluginVideoCategoryManager | |
35 | videoLanguageManager: PluginVideoLanguageManager | |
36 | videoLicenceManager: PluginVideoLicenceManager | |
37 | ||
38 | videoPrivacyManager: PluginVideoPrivacyManager | |
39 | playlistPrivacyManager: PluginPlaylistPrivacyManager | |
40 | ||
41 | // Get plugin router to create custom routes | |
42 | // Base routes of this router are | |
43 | // * /plugins/:pluginName/:pluginVersion/router/... | |
44 | // * /plugins/:pluginName/router/... | |
45 | getRouter(): Router | |
46 | ||
47 | peertubeHelpers: PeerTubeHelpers | |
48 | } |