@types/nodemailer
Advanced tools
Comparing version 6.2.0 to 6.2.1
@@ -7,3 +7,3 @@ // Type definitions for Nodemailer 6.2 | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
// TypeScript Version: 2.3 | ||
// TypeScript Version: 3.3 | ||
@@ -10,0 +10,0 @@ /// <reference types="node" /> |
@@ -25,4 +25,10 @@ /// <reference types="node" /> | ||
interface AuthenticationTypeCustom extends Credentials { | ||
/** indicates the authetication type, defaults to ‘login’, other option is ‘oauth2’ or ‘custom’ */ | ||
type: 'custom' | 'Custom' | 'CUSTOM'; | ||
method: string; | ||
} | ||
interface AuthenticationTypeLogin extends Credentials { | ||
/** indicates the authetication type, defaults to ‘login’, other option is ‘oauth2’ */ | ||
/** indicates the authetication type, defaults to ‘login’, other option is ‘oauth2’ or ‘custom’ */ | ||
type?: 'login' | 'Login' | 'LOGIN'; | ||
@@ -32,7 +38,7 @@ } | ||
interface AuthenticationTypeOAuth2 extends OAuth2 { | ||
/** indicates the authetication type, defaults to ‘login’, other option is ‘oauth2’ */ | ||
/** indicates the authetication type, defaults to ‘login’, other option is ‘oauth2’ or ‘custom’ */ | ||
type?: 'oauth2' | 'OAuth2' | 'OAUTH2'; | ||
} | ||
type AuthenticationType = AuthenticationTypeLogin | AuthenticationTypeOAuth2; | ||
type AuthenticationType = AuthenticationTypeCustom | AuthenticationTypeLogin | AuthenticationTypeOAuth2; | ||
@@ -49,2 +55,26 @@ interface AuthenticationCredentials { | ||
interface CustomAuthenticationResponse { | ||
command: string; | ||
response: string; | ||
status: number; | ||
text: string; | ||
code?: number; | ||
} | ||
interface CustomAuthenticationContext { | ||
auth: AuthenticationCredentials; | ||
authMethod: string; | ||
extensions: string[]; | ||
authMethods: string[]; | ||
maxAllowedSize: number | false; | ||
sendCommand(cmd: string): Promise<CustomAuthenticationResponse>; | ||
sendCommand(cmd: string, done: (err: Error | null, data: CustomAuthenticationResponse) => void): void; | ||
resolve(): unknown; | ||
reject(err: Error | string): unknown; | ||
} | ||
interface CustomAuthenticationHandlers { | ||
[method: string]: (ctx: CustomAuthenticationContext) => Promise<boolean> | unknown; | ||
} | ||
type DSNOption = 'NEVER' | 'SUCCESS' | 'FAILURE' | 'DELAY'; | ||
@@ -143,2 +173,3 @@ | ||
connection?: net.Socket; | ||
customAuth?: CustomAuthenticationHandlers; | ||
} | ||
@@ -145,0 +176,0 @@ } |
@@ -16,2 +16,7 @@ /// <reference types="node" /> | ||
declare namespace SMTPTransport { | ||
interface AuthenticationTypeCustom extends SMTPConnection.Credentials { | ||
type: 'CUSTOM'; | ||
method: string; | ||
} | ||
interface AuthenticationTypeLogin { | ||
@@ -18,0 +23,0 @@ type: 'LOGIN'; |
@@ -33,2 +33,3 @@ /// <reference types="node" /> | ||
provisionCallback?(user: string, renew: boolean, callback: (err: Error | null, accessToken: string, expires: number) => void): void; | ||
serviceClient?: string; | ||
} | ||
@@ -53,3 +54,3 @@ | ||
constructor(options: XOAuth2.Options, logger: shared.Logger); | ||
constructor(options?: XOAuth2.Options, logger?: shared.Logger); | ||
@@ -76,3 +77,8 @@ /** Returns or generates (if previous has expired) a XOAuth2 token */ | ||
*/ | ||
postRequest(url: string, payload: string | Buffer | Readable | { [key: string]: string }, params: XOAuth2.RequestParams, callback: (err: Error | null, buf: Buffer) => void): void; | ||
postRequest( | ||
url: string, | ||
payload: string | Buffer | Readable | { [key: string]: string }, | ||
params: XOAuth2.RequestParams, | ||
callback: (err: Error | null, buf: Buffer) => void | ||
): void; | ||
@@ -79,0 +85,0 @@ /** Encodes a buffer or a string into Base64url format */ |
{ | ||
"name": "@types/nodemailer", | ||
"version": "6.2.0", | ||
"version": "6.2.1", | ||
"description": "TypeScript definitions for Nodemailer", | ||
@@ -34,4 +34,4 @@ "license": "MIT", | ||
}, | ||
"typesPublisherContentHash": "0648aac352504e8512afafcdcce4bdfd03471f676c75b28cd987be6980d0691c", | ||
"typeScriptVersion": "2.3" | ||
"typesPublisherContentHash": "3e7e2627b45c024826aa16aeec391007c7598fdfc1652ecc1fb4f9e7bb1445ca", | ||
"typeScriptVersion": "3.3" | ||
} |
@@ -5,3 +5,3 @@ # Installation | ||
# Summary | ||
This package contains type definitions for Nodemailer ( https://github.com/nodemailer/nodemailer ). | ||
This package contains type definitions for Nodemailer (https://github.com/nodemailer/nodemailer). | ||
@@ -12,3 +12,3 @@ # Details | ||
Additional Details | ||
* Last updated: Tue, 28 May 2019 19:24:38 GMT | ||
* Last updated: Mon, 22 Jul 2019 19:52:31 GMT | ||
* Dependencies: @types/node | ||
@@ -18,2 +18,2 @@ * Global values: none | ||
# Credits | ||
These definitions were written by Rogier Schouten <https://github.com/rogierschouten>, Piotr Roszatycki <https://github.com/dex4er>, Daniel Chao <https://github.com/bioball>. | ||
These definitions were written by Rogier Schouten <https://github.com/rogierschouten>, Piotr Roszatycki <https://github.com/dex4er>, and Daniel Chao <https://github.com/bioball>. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
78035
1500