1
1
export type Settings = {
2
+ logging : Logging ,
3
+ website : Website ,
4
+ tracker : Tracker ,
5
+ net : Network ,
6
+ auth : Auth ,
7
+ database : Database ,
8
+ mail : Mail ,
9
+ image_cache : ImageCache ,
10
+ api : Api ,
11
+ tracker_statistics_importer : TrackerStatisticsImporter
12
+ }
13
+
14
+ export type Logging = {
2
15
log_level : LogLevel ,
3
- website : {
4
- name : string
5
- } ,
6
- tracker : {
7
- url : string
8
- mode : TrackerMode
9
- api_url : string
10
- token : string
11
- token_valid_seconds : number
12
- } ,
13
- net : {
14
- port : number
15
- base_url : string | null
16
- } ,
17
- auth : {
18
- email_on_signup : EmailOnSignup
19
- min_password_length : number
20
- max_password_length : number
21
- secret_key : string
22
- } ,
23
- database : {
24
- connect_url : string
25
- } ,
26
- mail : {
27
- email_verification_enabled : boolean
28
- from : string
29
- reply_to : string
30
- username : string
31
- password : string
32
- server : string
33
- port : number
34
- } ,
35
- image_cache : {
36
- max_request_timeout_ms : number
37
- capacity : number
38
- entry_size_limit : number
39
- user_quota_period_seconds : number
40
- user_quota_bytes : number
41
- } ,
42
- api : {
43
- default_torrent_page_size : number
44
- max_torrent_page_size : number
45
- } ,
46
- tracker_statistics_importer : {
47
- torrent_info_update_interval : number
48
- }
16
+ }
17
+
18
+ export type Website = {
19
+ name : string
20
+ }
21
+
22
+ export type Tracker = {
23
+ api_url : string
24
+ mode : TrackerMode
25
+ token : string
26
+ token_valid_seconds : number
27
+ url : string
28
+ }
29
+
30
+ export type Network = {
31
+ base_url : string | null
32
+ bind_address : string
33
+ tsl : Tsl | null
34
+ }
35
+
36
+ export type Auth = {
37
+ email_on_signup : EmailOnSignup
38
+ secret_key : string
39
+ password_constraints : PasswordConstraints
40
+ }
41
+
42
+ export type Database = {
43
+ connect_url : string
44
+ }
45
+
46
+ export type Mail = {
47
+ email_verification_enabled : boolean
48
+ from : string
49
+ reply_to : string
50
+ smtp : Smtp
51
+ }
52
+
53
+ export type ImageCache = {
54
+ capacity : number
55
+ entry_size_limit : number
56
+ max_request_timeout_ms : number
57
+ user_quota_bytes : number
58
+ user_quota_period_seconds : number
59
+ }
60
+
61
+ export type Api = {
62
+ default_torrent_page_size : number
63
+ max_torrent_page_size : number
64
+ }
65
+
66
+ export type TrackerStatisticsImporter = {
67
+ port : number
68
+ torrent_info_update_interval : number
49
69
}
50
70
51
71
export type PublicSettings = {
@@ -55,24 +75,45 @@ export type PublicSettings = {
55
75
email_on_signup : EmailOnSignup
56
76
}
57
77
78
+ export type Tsl = {
79
+ ssl_cert_path : string | null
80
+ ssl_key_path : string | null
81
+ }
82
+
83
+ export type PasswordConstraints = {
84
+ max_password_length : number
85
+ min_password_length : number
86
+ }
87
+
88
+ export type Smtp = {
89
+ port : number
90
+ server : string
91
+ credentials : Credentials
92
+ }
93
+
94
+ export type Credentials = {
95
+ password : string
96
+ username : string
97
+ }
98
+
58
99
export enum TrackerMode {
59
- Public ,
60
- Private ,
61
- Whitelisted ,
62
- PrivateWhitelisted
100
+ Public = "public" ,
101
+ Listed = "listed" ,
102
+ Private = "private" ,
103
+ PrivateListed = "private_listed"
63
104
}
64
105
65
106
export enum EmailOnSignup {
66
- Required ,
67
- Optional ,
68
- None
107
+ Required = "required" ,
108
+ Optional = "optional" ,
109
+ Ignored = "ignored"
69
110
}
70
111
71
112
export enum LogLevel {
72
- Off ,
73
- Error ,
74
- Warn ,
75
- Info ,
76
- Debug ,
77
- Trace
113
+ Off = "off" ,
114
+ Error = "error" ,
115
+ Warn = "warn" ,
116
+ Info = "info" ,
117
+ Debug = "debug" ,
118
+ Trace = "trace" ,
78
119
}
0 commit comments