Add transport class.

This commit is contained in:
Vincent Bortone
2013-02-03 10:42:12 -05:00
parent 71fb1d4a12
commit d3d7c7b4ab
+20 -1
View File
@@ -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 {