custom-config.model.ts 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. import { NSFWPolicyType } from '../videos/nsfw-policy.type'
  2. import { BroadcastMessageLevel } from './broadcast-message-level.type'
  3. export type ConfigResolutions = {
  4. '144p': boolean
  5. '240p': boolean
  6. '360p': boolean
  7. '480p': boolean
  8. '720p': boolean
  9. '1080p': boolean
  10. '1440p': boolean
  11. '2160p': boolean
  12. }
  13. export interface CustomConfig {
  14. instance: {
  15. name: string
  16. shortDescription: string
  17. description: string
  18. terms: string
  19. codeOfConduct: string
  20. creationReason: string
  21. moderationInformation: string
  22. administrator: string
  23. maintenanceLifetime: string
  24. businessModel: string
  25. hardwareInformation: string
  26. languages: string[]
  27. categories: number[]
  28. isNSFW: boolean
  29. defaultNSFWPolicy: NSFWPolicyType
  30. defaultClientRoute: string
  31. customizations: {
  32. javascript?: string
  33. css?: string
  34. }
  35. }
  36. theme: {
  37. default: string
  38. }
  39. services: {
  40. twitter: {
  41. username: string
  42. whitelisted: boolean
  43. }
  44. }
  45. client: {
  46. videos: {
  47. miniature: {
  48. preferAuthorDisplayName: boolean
  49. }
  50. }
  51. menu: {
  52. login: {
  53. redirectOnSingleExternalAuth: boolean
  54. }
  55. }
  56. }
  57. cache: {
  58. previews: {
  59. size: number
  60. }
  61. captions: {
  62. size: number
  63. }
  64. torrents: {
  65. size: number
  66. }
  67. }
  68. signup: {
  69. enabled: boolean
  70. limit: number
  71. requiresEmailVerification: boolean
  72. minimumAge: number
  73. }
  74. admin: {
  75. email: string
  76. }
  77. contactForm: {
  78. enabled: boolean
  79. }
  80. user: {
  81. videoQuota: number
  82. videoQuotaDaily: number
  83. }
  84. videoChannels: {
  85. maxPerUser: number
  86. }
  87. transcoding: {
  88. enabled: boolean
  89. allowAdditionalExtensions: boolean
  90. allowAudioFiles: boolean
  91. threads: number
  92. concurrency: number
  93. profile: string
  94. resolutions: ConfigResolutions & { '0p': boolean }
  95. alwaysTranscodeOriginalResolution: boolean
  96. webtorrent: {
  97. enabled: boolean
  98. }
  99. hls: {
  100. enabled: boolean
  101. }
  102. }
  103. live: {
  104. enabled: boolean
  105. allowReplay: boolean
  106. latencySetting: {
  107. enabled: boolean
  108. }
  109. maxDuration: number
  110. maxInstanceLives: number
  111. maxUserLives: number
  112. transcoding: {
  113. enabled: boolean
  114. threads: number
  115. profile: string
  116. resolutions: ConfigResolutions
  117. alwaysTranscodeOriginalResolution: boolean
  118. }
  119. }
  120. videoStudio: {
  121. enabled: boolean
  122. }
  123. import: {
  124. videos: {
  125. concurrency: number
  126. http: {
  127. enabled: boolean
  128. }
  129. torrent: {
  130. enabled: boolean
  131. }
  132. }
  133. videoChannelSynchronization: {
  134. enabled: boolean
  135. maxPerUser: number
  136. }
  137. }
  138. trending: {
  139. videos: {
  140. algorithms: {
  141. enabled: string[]
  142. default: string
  143. }
  144. }
  145. }
  146. autoBlacklist: {
  147. videos: {
  148. ofUsers: {
  149. enabled: boolean
  150. }
  151. }
  152. }
  153. followers: {
  154. instance: {
  155. enabled: boolean
  156. manualApproval: boolean
  157. }
  158. }
  159. followings: {
  160. instance: {
  161. autoFollowBack: {
  162. enabled: boolean
  163. }
  164. autoFollowIndex: {
  165. enabled: boolean
  166. indexUrl: string
  167. }
  168. }
  169. }
  170. broadcastMessage: {
  171. enabled: boolean
  172. message: string
  173. level: BroadcastMessageLevel
  174. dismissable: boolean
  175. }
  176. search: {
  177. remoteUri: {
  178. users: boolean
  179. anonymous: boolean
  180. }
  181. searchIndex: {
  182. enabled: boolean
  183. url: string
  184. disableLocalSearch: boolean
  185. isDefaultSearch: boolean
  186. }
  187. }
  188. }