forked from levz0r/gmail-tester
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gmail-tester.d.ts
50 lines (45 loc) · 1013 Bytes
/
gmail-tester.d.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
declare module "gmail-tester" {
export interface Email {
from: string;
receiver: string;
subject: string;
date: Date;
body?: {
html: string;
text: string;
};
}
export interface CheckInboxOptions {
include_body?: boolean;
from?: string;
to?: string;
subject?: string;
before?: Date;
after?: Date;
wait_time_sec?: number;
max_wait_time_sec?: number;
label?: string;
}
export interface GetMessagesOptions {
include_body?: boolean;
from?: string;
to?: string;
subject?: string;
before?: Date;
after?: Date;
}
export function check_inbox(
credentials_json: string,
token_path: string,
options: CheckInboxOptions
): Promise<Email[]>;
export function get_messages(
credentials_json: string,
token_path: string,
options: GetMessagesOptions
): Promise<Email[]>;
export function refresh_access_token(
credentials_json: string,
token_path: string
): Promise<void>;
}