]>
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 | import { | |
13 | RegisterServerAuthExternalOptions, | |
14 | RegisterServerAuthExternalResult, | |
15 | RegisterServerAuthPassOptions | |
16 | } from '@shared/models/plugins/register-server-auth.model' | |
17 | ||
18 | export type PeerTubeHelpers = { | |
19 | logger: Logger | |
20 | ||
21 | database: { | |
22 | query: Function | |
23 | } | |
24 | ||
25 | videos: { | |
26 | removeVideo: (videoId: number) => Promise<void> | |
27 | } | |
28 | ||
29 | config: { | |
30 | getWebserverUrl: () => string | |
31 | } | |
32 | } | |
33 | ||
34 | export type RegisterServerOptions = { | |
35 | registerHook: (options: RegisterServerHookOptions) => void | |
36 | ||
37 | registerSetting: (options: RegisterServerSettingOptions) => void | |
38 | ||
39 | settingsManager: PluginSettingsManager | |
40 | ||
41 | storageManager: PluginStorageManager | |
42 | ||
43 | videoCategoryManager: PluginVideoCategoryManager | |
44 | videoLanguageManager: PluginVideoLanguageManager | |
45 | videoLicenceManager: PluginVideoLicenceManager | |
46 | ||
47 | videoPrivacyManager: PluginVideoPrivacyManager | |
48 | playlistPrivacyManager: PluginPlaylistPrivacyManager | |
49 | ||
50 | registerIdAndPassAuth: (options: RegisterServerAuthPassOptions) => void | |
51 | registerExternalAuth: (options: RegisterServerAuthExternalOptions) => RegisterServerAuthExternalResult | |
52 | unregisterIdAndPassAuth: (authName: string) => void | |
53 | unregisterExternalAuth: (authName: string) => void | |
54 | ||
55 | // Get plugin router to create custom routes | |
56 | // Base routes of this router are | |
57 | // * /plugins/:pluginName/:pluginVersion/router/... | |
58 | // * /plugins/:pluginName/router/... | |
59 | getRouter(): Router | |
60 | ||
61 | peertubeHelpers: PeerTubeHelpers | |
62 | } |