PeerTube/shared/models/server/custom-config.model.ts

225 lines
3.2 KiB
TypeScript
Raw Normal View History

import { NSFWPolicyType } from '../videos/nsfw-policy.type'
2020-05-28 04:15:38 -05:00
import { BroadcastMessageLevel } from './broadcast-message-level.type'
export type ConfigResolutions = {
'144p': boolean
'240p': boolean
'360p': boolean
'480p': boolean
'720p': boolean
'1080p': boolean
'1440p': boolean
'2160p': boolean
}
export interface CustomConfig {
instance: {
name: string
2018-03-15 08:31:08 -05:00
shortDescription: string
description: string
terms: string
2019-08-23 08:23:27 -05:00
codeOfConduct: string
2019-09-03 02:49:04 -05:00
creationReason: string
2019-08-23 08:23:27 -05:00
moderationInformation: string
administrator: string
maintenanceLifetime: string
businessModel: string
hardwareInformation: string
2019-08-23 08:23:27 -05:00
languages: string[]
categories: number[]
2019-02-20 08:36:43 -06:00
isNSFW: boolean
defaultNSFWPolicy: NSFWPolicyType
defaultClientRoute: string
customizations: {
javascript?: string
css?: string
}
}
2019-07-09 04:45:19 -05:00
theme: {
default: string
}
services: {
twitter: {
username: string
whitelisted: boolean
}
}
client: {
videos: {
miniature: {
preferAuthorDisplayName: boolean
}
}
menu: {
login: {
redirectOnSingleExternalAuth: boolean
}
}
}
cache: {
previews: {
size: number
}
2018-07-12 12:02:00 -05:00
captions: {
size: number
}
torrents: {
size: number
}
}
signup: {
enabled: boolean
limit: number
requiresEmailVerification: boolean
minimumAge: number
}
admin: {
email: string
}
2019-01-09 08:14:29 -06:00
contactForm: {
enabled: boolean
}
user: {
videoQuota: number
videoQuotaDaily: number
}
videoChannels: {
maxPerUser: number
}
transcoding: {
enabled: boolean
2018-12-11 07:52:50 -06:00
allowAdditionalExtensions: boolean
2019-05-16 09:55:34 -05:00
allowAudioFiles: boolean
threads: number
concurrency: number
profile: string
resolutions: ConfigResolutions & { '0p': boolean }
webtorrent: {
enabled: boolean
}
2019-01-29 01:37:25 -06:00
hls: {
enabled: boolean
}
}
2018-08-03 04:10:31 -05:00
live: {
enabled: boolean
2020-09-25 09:19:35 -05:00
allowReplay: boolean
2020-10-28 09:24:40 -05:00
2022-03-04 06:40:02 -06:00
latencySetting: {
enabled: boolean
}
2020-09-25 09:19:35 -05:00
maxDuration: number
2020-10-28 09:24:40 -05:00
maxInstanceLives: number
maxUserLives: number
2020-09-25 09:19:35 -05:00
transcoding: {
enabled: boolean
threads: number
profile: string
resolutions: ConfigResolutions
}
}
2022-02-11 03:51:33 -06:00
videoEditor: {
enabled: boolean
}
2018-08-03 04:10:31 -05:00
import: {
videos: {
concurrency: number
2018-08-03 04:10:31 -05:00
http: {
enabled: boolean
2020-01-31 09:56:52 -06:00
}
2018-08-07 03:07:53 -05:00
torrent: {
enabled: boolean
2018-08-03 04:10:31 -05:00
}
}
}
2021-01-27 10:15:21 -06:00
trending: {
videos: {
algorithms: {
enabled: string[]
default: string
}
}
}
autoBlacklist: {
videos: {
ofUsers: {
enabled: boolean
}
}
}
2019-04-08 07:04:57 -05:00
followers: {
instance: {
2020-01-31 09:56:52 -06:00
enabled: boolean
manualApproval: boolean
2019-04-08 07:04:57 -05:00
}
}
followings: {
instance: {
autoFollowBack: {
enabled: boolean
}
autoFollowIndex: {
enabled: boolean
indexUrl: string
}
}
}
2020-05-28 04:15:38 -05:00
broadcastMessage: {
enabled: boolean
message: string
level: BroadcastMessageLevel
dismissable: boolean
}
2020-05-29 09:16:24 -05:00
search: {
remoteUri: {
users: boolean
anonymous: boolean
}
searchIndex: {
enabled: boolean
url: string
disableLocalSearch: boolean
isDefaultSearch: boolean
}
}
}