forked from MateMalice/mail-listener2
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.d.ts
55 lines (52 loc) · 1.32 KB
/
index.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
51
52
53
54
55
import { EventEmitter } from 'events';
import { ConnectionOptions } from 'tls';
export { _MailListener as MailListener };
declare const _MailListener: typeof MailListener;
declare class MailListener extends EventEmitter {
constructor(options: IOptions);
markSeen: boolean;
mailbox: any;
searchFilter: any;
fetchUnreadOnStart: boolean;
mailParserOptions: any;
attachmentOptions: any;
attachments: any;
imap: any;
start(): void;
stop(): void;
imapReady(): void;
imapClose(): void;
imapError(error: any): void;
imapMail(): void;
parseUnread(): void;
}
export interface IOptions {
username: string;
password: string;
xoauth2?: string;
host?: string;
port?: number;
tls?: boolean;
autotls?: string;
connTimeout?: number;
authTimeout?: number;
socketTimeout?: number;
debug?: (info: string) => void;
tlsOptions?: ConnectionOptions;
mailbox?: string;
searchFilter?: string[];
markSeen?: boolean;
fetchUnreadOnStart: boolean;
mailParserOptions?: { streamAttachments: boolean };
attachments: boolean;
attachmentOptions?: {
saveAttachments: boolean;
directory: string;
stream: boolean;
};
keepalive?: {
interval: number,
idleInterval: number,
forceNoop: boolean,
}
}