]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - shared/models/server/server-config.model.ts
c259a849a4b6e82e2b9f084d6c8665cd0f80afed
[github/Chocobozzz/PeerTube.git] / shared / models / server / server-config.model.ts
1 import { NSFWPolicyType } from '../videos/nsfw-policy.type'
2 import { ClientScript } from '../plugins/plugin-package-json.model'
3
4 export type ServerConfigPlugin = {
5 name: string
6 version: string
7 description: string
8 clientScripts: { [name: string]: ClientScript }
9 }
10
11 export interface ServerConfig {
12 serverVersion: string
13 serverCommit?: string
14
15 instance: {
16 name: string
17 shortDescription: string
18 defaultClientRoute: string
19 isNSFW: boolean
20 defaultNSFWPolicy: NSFWPolicyType
21 customizations: {
22 javascript: string
23 css: string
24 }
25 }
26
27 plugins: ServerConfigPlugin[]
28
29 email: {
30 enabled: boolean
31 }
32
33 contactForm: {
34 enabled: boolean
35 }
36
37 signup: {
38 allowed: boolean,
39 allowedForCurrentIP: boolean
40 requiresEmailVerification: boolean
41 }
42
43 transcoding: {
44 hls: {
45 enabled: boolean
46 }
47
48 enabledResolutions: number[]
49 }
50
51 import: {
52 videos: {
53 http: {
54 enabled: boolean
55 }
56 torrent: {
57 enabled: boolean
58 }
59 }
60 }
61
62 autoBlacklist: {
63 videos: {
64 ofUsers: {
65 enabled: boolean
66 }
67 }
68 }
69
70 avatar: {
71 file: {
72 size: {
73 max: number
74 }
75 extensions: string[]
76 }
77 }
78
79 video: {
80 image: {
81 size: {
82 max: number
83 }
84 extensions: string[]
85 },
86 file: {
87 extensions: string[]
88 }
89 }
90
91 videoCaption: {
92 file: {
93 size: {
94 max: number
95 },
96 extensions: string[]
97 }
98 }
99
100 user: {
101 videoQuota: number
102 videoQuotaDaily: number
103 }
104
105 trending: {
106 videos: {
107 intervalDays: number
108 }
109 }
110
111 tracker: {
112 enabled: boolean
113 }
114 }