-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.ts
38 lines (29 loc) · 807 Bytes
/
types.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
export type Client = 'sendgrid' | 'gmail';
export type Type = 'json' | 'html' | 'text';
export type Options = {
key?: string;
type?: Type;
client?: Client;
sandbox?: boolean;
};
export type SendData = {
text?: string;
html?: string;
attachments?: Record<string, string>;
name: string; // email from name
subject: string; // email subject
from: string; // email from address
// reply: string; // email reply to address
to: string | Array<string>; // email to address
cc?: Array<string>;
bcc?: Array<string>;
};
export type TemplateContent = {
[name: string]: string | number | boolean;
};
export type TemplateData = {
link: string; // link
title: string; // title
provider: string; // provider
content: TemplateContent;
};