2019-07-18 10:43:41 -04:00
|
|
|
import { PluginSettingsManager } from '../../../shared/models/plugins/plugin-settings-manager.model'
|
|
|
|
import { PluginStorageManager } from '../../../shared/models/plugins/plugin-storage-manager.model'
|
2019-07-24 05:17:42 -04:00
|
|
|
import { RegisterServerHookOptions } from '../../../shared/models/plugins/register-server-hook.model'
|
|
|
|
import { RegisterServerSettingOptions } from '../../../shared/models/plugins/register-server-setting.model'
|
2019-07-26 07:13:39 -04:00
|
|
|
import { PluginVideoCategoryManager } from '../../../shared/models/plugins/plugin-video-category-manager.model'
|
|
|
|
import { PluginVideoLanguageManager } from '../../../shared/models/plugins/plugin-video-language-manager.model'
|
|
|
|
import { PluginVideoLicenceManager } from '../../../shared/models/plugins/plugin-video-licence-manager.model'
|
2020-04-09 03:57:32 -04:00
|
|
|
import { Logger } from 'winston'
|
2020-04-10 09:07:54 -04:00
|
|
|
import { Router } from 'express'
|
2020-04-09 03:57:32 -04:00
|
|
|
|
|
|
|
export type PeerTubeHelpers = {
|
|
|
|
logger: Logger
|
2020-04-09 05:00:30 -04:00
|
|
|
|
|
|
|
database: {
|
|
|
|
query: Function
|
|
|
|
}
|
2020-04-09 05:35:29 -04:00
|
|
|
|
|
|
|
videos: {
|
|
|
|
removeVideo: (videoId: number) => Promise<void>
|
|
|
|
}
|
2020-04-09 03:57:32 -04:00
|
|
|
}
|
2019-07-18 10:43:41 -04:00
|
|
|
|
2019-07-24 05:17:42 -04:00
|
|
|
export type RegisterServerOptions = {
|
|
|
|
registerHook: (options: RegisterServerHookOptions) => void
|
2019-07-18 10:43:41 -04:00
|
|
|
|
2019-07-24 05:17:42 -04:00
|
|
|
registerSetting: (options: RegisterServerSettingOptions) => void
|
2019-07-18 10:43:41 -04:00
|
|
|
|
|
|
|
settingsManager: PluginSettingsManager
|
|
|
|
|
|
|
|
storageManager: PluginStorageManager
|
|
|
|
|
2019-07-26 07:13:39 -04:00
|
|
|
videoCategoryManager: PluginVideoCategoryManager
|
|
|
|
videoLanguageManager: PluginVideoLanguageManager
|
|
|
|
videoLicenceManager: PluginVideoLicenceManager
|
|
|
|
|
2020-04-10 09:07:54 -04:00
|
|
|
// Get plugin router to create custom routes
|
|
|
|
// Base routes of this router are
|
|
|
|
// * /plugins/:pluginName/:pluginVersion/router/...
|
|
|
|
// * /plugins/:pluginName/router/...
|
|
|
|
getRouter(): Router
|
|
|
|
|
2020-04-09 03:57:32 -04:00
|
|
|
peertubeHelpers: PeerTubeHelpers
|
2019-07-18 10:43:41 -04:00
|
|
|
}
|