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