-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathmessages.ts
More file actions
83 lines (74 loc) · 1.47 KB
/
messages.ts
File metadata and controls
83 lines (74 loc) · 1.47 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
export type SmtpInformationData = {
mail_from_addr: string;
client_ip: string;
};
export type Message = {
id: number;
inbox_id: number;
subject: string;
sent_at: string;
from_email: string;
from_name: string;
to_email: string;
to_name: string;
email_size: number;
is_read: boolean;
created_at: string;
updated_at: string;
html_body_size: number;
text_body_size: number;
human_size: string;
html_path: string;
txt_path: string;
raw_path: string;
download_path: string;
html_source_path: string;
blacklists_report_info: boolean;
smtp_information: {
ok: boolean;
data?: SmtpInformationData;
};
};
type ReportError = {
status: "error";
msg: string;
};
type ReportSuccess = {
status: "success";
errors: string[];
};
export type Report = ReportError | ReportSuccess;
export type EmailHeaders = {
headers: {
date: string;
from: string;
to: string;
subject: string;
mime_version: string;
content_type: string;
content_transfer_encoding: string;
bcc?: string;
};
};
type SpamReportDetail = {
Pts: string;
RuleName: string;
Description: string;
};
export type SpamReport = {
ResponseCode: number;
ResponseMessage: string;
ResponseVersion: string;
Score: number;
Spam: boolean;
Threshold: number;
Details: SpamReportDetail[];
};
export type MessageUpdateParams = {
isRead: boolean;
};
export type MessageListOptions = {
last_id?: number;
page?: number;
search?: string;
};