-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtypes.ts
57 lines (47 loc) · 1.17 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
export type Region = "us" | "eu";
export interface Config {
key: string;
domain: string;
region?: Region;
}
export interface Message {
// Recipients
to: string[] | string;
cc?: string[] | string;
bcc?: string[] | string;
reply?: string;
// Sender and Subject
from: string;
subject: string;
// Content
text?: string;
html?: string;
"amp-html"?: string;
// Attachments
attachment?: File[] | File;
inline?: File[] | File;
// Template
template?: string;
"t:version"?: string;
"t:text"?: boolean;
"t:variables"?: Record<string, unknown>;
// Testing
testing?: boolean;
// Options
"o:tag"?: string;
"o:dkim"?: boolean;
"o:deliverytime"?: string;
"o:deliverytime-optimize-period"?: string;
"o:time-zone-localize"?: string;
"o:testmode"?: boolean;
"o:tracking"?: boolean;
"o:tracking-clicks"?: boolean | "htmlonly";
"o:tracking-opens"?: boolean;
"o:require-tls"?: boolean;
"o:skip-verification"?: boolean;
// Custom Headers and Variables
[header: `h:${string}`]: string;
[variable: `v:${string}`]: Record<string, unknown>;
// Recipient Variables
"recipient-variables"?: Record<string, Record<string, unknown>>;
}