-
Notifications
You must be signed in to change notification settings - Fork 73
/
Copy pathIConfig.ts
112 lines (88 loc) · 2.57 KB
/
IConfig.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
/*
Copyright 2019 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// This should follow the format in slack-config-schema.yaml
import { ProvisionerConfig } from "./provisioning/Provisioner";
type LogEnum = "error"|"warn"| "info"|"debug"|"off";
import { WebClientOptions } from "@slack/web-api";
import { ITeamSyncConfig } from "./TeamSyncer";
import { AllowDenyConfig } from "./AllowDenyList";
export const CACHING_DEFAULTS = {
ghostUserCache: 100,
matrixUserCache: 100,
};
export interface IConfig {
inbound_uri_prefix?: string;
username_prefix: string;
matrix_admin_room?: string;
rmau_limit?: number;
user_activity?: {
min_user_active_days?: number;
inactive_after_days?: number;
};
homeserver: {
url: string;
server_name: string;
media_url?: string;
max_upload_size?: number;
appservice_port?: number;
appservice_host?: string;
};
encryption?: {
enabled: boolean;
pantalaimon_url: string;
};
tls?: {
key_file: string;
crt_file: string;
};
bot_profile?: {
displayname?: string;
avatar_url?: string;
}
caching?: {
ghostUserCache: number,
matrixUserCache: number,
};
logging: {
console: LogEnum;
fileDatePattern?: string;
timestampFormat?: string;
files?: {[filename: string]: LogEnum}
};
oauth2?: {
client_id: string;
client_secret: string;
redirect_prefix?: string;
html_template?: string;
};
rtm?: {
enable: boolean;
log_level?: string;
};
slack_hook_port?: number;
slack_client_opts?: WebClientOptions;
slack_proxy?: string;
enable_metrics: boolean;
db?: {
engine: "postgres"|"nedb";
connectionString: string;
};
team_sync?: {[teamId: string]: ITeamSyncConfig};
dbdir: string;
provisioning?: ProvisionerConfig;
puppeting?: {
enabled: boolean;
onboard_users?: boolean;
direct_messages?: AllowDenyConfig;
}
}