-
-
Notifications
You must be signed in to change notification settings - Fork 38
/
global.d.ts
71 lines (63 loc) · 1.63 KB
/
global.d.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
/* eslint-disable import/unambiguous */
type EmailTransport = 'smtp' | 'sendmail';
type KresusProcess = {
user: {
id: number;
login: string;
};
dataDir: string,
providedUserId: number,
port: number,
host: string,
pythonExec: string,
urlPrefix: string,
salt: string | null,
forceDemoMode: boolean,
woobDir: string | null,
woobSourcesList: string | null,
emailTransport: EmailTransport | null,
emailSendmailBin: string | null,
emailFrom: string | null,
smtpHost: string | null,
smtpPort: number | null,
smtpUser: string | null,
smtpPassword: string | null,
smtpForceTLS: boolean,
smtpRejectUnauthorizedTLS: boolean,
appriseApiBaseUrl: string | null,
basicAuth: { [username: string]: string },
logFilePath: string,
dbType: string,
dbLog: ("error")[] | boolean,
sqlitePath: string | null,
dbHost: string | null,
dbPort: number | null,
dbUsername: string | null,
dbPassword: string | null,
dbName: string,
};
declare namespace NodeJS {
interface Process {
kresus: KresusProcess
}
}
// Extend express Request interface to allow a "user" variable for preloads.
declare namespace Express {
export interface Request {
user?: {
id?: number;
};
}
}
declare module 'ospath' {
export function home(): string;
}
declare module 'ofx-js' {
type RecursiveData = {
[key: string]: RecursiveData
} | number | string;
export function parse(content: string): Promise<RecursiveData>;
}
declare module 'regex-escape' {
export default function(_: string): string;
}