-import { Router } from 'express'
+import { Router, Response } from 'express'
import { Logger } from 'winston'
import { ActorModel } from '@server/models/activitypub/actor'
import {
PluginVideoPrivacyManager,
RegisterServerHookOptions,
RegisterServerSettingOptions,
+ ServerConfig,
+ UserRole,
VideoBlacklistCreate
} from '@shared/models'
import { MVideoThumbnail } from '../models'
config: {
getWebserverUrl: () => string
+
+ getServerConfig: () => Promise<ServerConfig>
}
moderation: {
server: {
getServerActor: () => Promise<ActorModel>
}
+
+ plugin: {
+ // PeerTube >= 3.2
+ getBaseStaticRoute: () => string
+
+ // PeerTube >= 3.2
+ getBaseRouterRoute: () => string
+
+ // PeerTube >= 3.2
+ getDataDirectoryPath: () => string
+ }
+
+ user: {
+ // PeerTube >= 3.2
+ getAuthUser: (response: Response) => Promise<{
+ id?: string
+ username: string
+ email: string
+ blocked: boolean
+ role: UserRole
+ } | undefined>
+ }
}
export type RegisterServerOptions = {