mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Add transport class.
This commit is contained in:
Vendored
+20
-1
@@ -4,10 +4,26 @@
|
||||
// Definitions by: Vincent Bortone <https://github.com/vbortone/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
interface Transport {}
|
||||
class Transport {
|
||||
static transports: {
|
||||
SMTP: SMTPTransport,
|
||||
SES: SESTransport,
|
||||
SENDMAIL: SendmailTransport,
|
||||
STUB: StubTransport
|
||||
};
|
||||
|
||||
constructor(type: string, options?: Object);
|
||||
options: Object;
|
||||
transportType: strng;
|
||||
sendMailWithTransport(emailMessage: MailComposer, callback?: (err: Error) => any): any;
|
||||
useDKIM(dkim: DKIMOptions);
|
||||
close(callback?: (err: Error) => any));
|
||||
}
|
||||
|
||||
interface MailComposer {}
|
||||
|
||||
interface DKIMOptions{}
|
||||
|
||||
interface XOAuthGenerator {}
|
||||
|
||||
interface NodemailerTransportOptions {
|
||||
@@ -17,12 +33,15 @@ interface NodemailerTransportOptions {
|
||||
|
||||
interface NodeMailerMessageOptions {}
|
||||
|
||||
// Module level exports
|
||||
interface NodemailerStatic {
|
||||
X_MAILER_NAME: string;
|
||||
X_MAILER_HOMEPAGE: string;
|
||||
createXOAuthGenerator(options: Object): XOAuthGenerator;
|
||||
createTransport(type: string, options: NodeMailerTransportOptions): Transport;
|
||||
sendMail(options: NodeMailerMessageOptions, callback?: (err: Error) => any): any;
|
||||
send_mail(options: NodeMailerMessageOptions, callback?: (err: Error) => any): any;
|
||||
stripHTML(str: string): string;
|
||||
}
|
||||
|
||||
interface Nodemailer {
|
||||
|
||||
Reference in New Issue
Block a user