]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - shared/models/server/emailer.model.ts
Remove comments, rates and views from stats
[github/Chocobozzz/PeerTube.git] / shared / models / server / emailer.model.ts
1 type From = string | { name?: string, address: string }
2
3 interface Base extends Partial<SendEmailDefaultMessageOptions> {
4 to: string[] | string
5 }
6
7 interface MailTemplate extends Base {
8 template: string
9 locals?: { [key: string]: any }
10 text?: undefined
11 }
12
13 interface MailText extends Base {
14 text: string
15
16 locals?: Partial<SendEmailDefaultLocalsOptions> & {
17 title?: string
18 action?: {
19 url: string
20 text: string
21 }
22 }
23 }
24
25 interface SendEmailDefaultLocalsOptions {
26 instanceName: string
27 text: string
28 subject: string
29 }
30
31 interface SendEmailDefaultMessageOptions {
32 to: string[] | string
33 from: From
34 subject: string
35 replyTo: string
36 }
37
38 export type SendEmailDefaultOptions = {
39 template: 'common'
40
41 message: SendEmailDefaultMessageOptions
42
43 locals: SendEmailDefaultLocalsOptions & {
44 WEBSERVER: any
45 EMAIL: any
46 }
47 }
48
49 export type SendEmailOptions = MailTemplate | MailText