@types/nodemailer 6.4.14 → 6.4.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- nodemailer/README.md +1 -1
- nodemailer/index.d.ts +14 -13
- nodemailer/lib/mailer/index.d.ts +5 -3
- nodemailer/package.json +3 -3
nodemailer/README.md
CHANGED
|
@@ -8,7 +8,7 @@ This package contains type definitions for nodemailer (https://github.com/nodema
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/nodemailer.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated: Tue,
|
|
11
|
+
* Last updated: Tue, 17 Sep 2024 18:39:47 GMT
|
|
12
12
|
* Dependencies: [@types/node](https://npmjs.com/package/@types/node)
|
|
13
13
|
|
|
14
14
|
# Credits
|
nodemailer/index.d.ts
CHANGED
|
@@ -11,12 +11,12 @@ import StreamTransport = require("./lib/stream-transport");
|
|
|
11
11
|
|
|
12
12
|
export type SendMailOptions = Mail.Options;
|
|
13
13
|
|
|
14
|
-
export type Transporter<T = any> = Mail<T>;
|
|
14
|
+
export type Transporter<T = any, D extends TransportOptions = TransportOptions> = Mail<T, D>;
|
|
15
15
|
|
|
16
16
|
export type SentMessageInfo = any;
|
|
17
17
|
|
|
18
|
-
export interface Transport<T = any> {
|
|
19
|
-
mailer?: Transporter<T> | undefined;
|
|
18
|
+
export interface Transport<T = any, D extends TransportOptions = TransportOptions> {
|
|
19
|
+
mailer?: Transporter<T, D> | undefined;
|
|
20
20
|
|
|
21
21
|
name: string;
|
|
22
22
|
version: string;
|
|
@@ -42,34 +42,35 @@ export interface TestAccount {
|
|
|
42
42
|
web: string;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
export function createTransport(
|
|
46
|
-
transport?: SMTPTransport | SMTPTransport.Options | string,
|
|
47
|
-
defaults?: SMTPTransport.Options,
|
|
48
|
-
): Transporter<SMTPTransport.SentMessageInfo>;
|
|
49
45
|
export function createTransport(
|
|
50
46
|
transport: SMTPPool | SMTPPool.Options,
|
|
51
47
|
defaults?: SMTPPool.Options,
|
|
52
|
-
): Transporter<SMTPPool.SentMessageInfo>;
|
|
48
|
+
): Transporter<SMTPPool.SentMessageInfo, SMTPPool.Options>;
|
|
53
49
|
export function createTransport(
|
|
54
50
|
transport: SendmailTransport | SendmailTransport.Options,
|
|
55
51
|
defaults?: SendmailTransport.Options,
|
|
56
|
-
): Transporter<SendmailTransport.SentMessageInfo>;
|
|
52
|
+
): Transporter<SendmailTransport.SentMessageInfo, SendmailTransport.Options>;
|
|
57
53
|
export function createTransport(
|
|
58
54
|
transport: StreamTransport | StreamTransport.Options,
|
|
59
55
|
defaults?: StreamTransport.Options,
|
|
60
|
-
): Transporter<StreamTransport.SentMessageInfo>;
|
|
56
|
+
): Transporter<StreamTransport.SentMessageInfo, StreamTransport.Options>;
|
|
61
57
|
export function createTransport(
|
|
62
58
|
transport: JSONTransport | JSONTransport.Options,
|
|
63
59
|
defaults?: JSONTransport.Options,
|
|
64
|
-
): Transporter<JSONTransport.SentMessageInfo>;
|
|
60
|
+
): Transporter<JSONTransport.SentMessageInfo, JSONTransport.Options>;
|
|
65
61
|
export function createTransport(
|
|
66
62
|
transport: SESTransport | SESTransport.Options,
|
|
67
63
|
defaults?: SESTransport.Options,
|
|
68
|
-
): Transporter<SESTransport.SentMessageInfo>;
|
|
64
|
+
): Transporter<SESTransport.SentMessageInfo, SESTransport.Options>;
|
|
65
|
+
export function createTransport(
|
|
66
|
+
transport?: SMTPTransport | SMTPTransport.Options | string,
|
|
67
|
+
defaults?: SMTPTransport.Options,
|
|
68
|
+
): Transporter<SMTPTransport.SentMessageInfo, SMTPTransport.Options>;
|
|
69
|
+
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
|
|
69
70
|
export function createTransport<T>(
|
|
70
71
|
transport: Transport<T> | TransportOptions,
|
|
71
72
|
defaults?: TransportOptions,
|
|
72
|
-
): Transporter<
|
|
73
|
+
): Transporter<SMTPTransport.SentMessageInfo, SMTPTransport.Options>;
|
|
73
74
|
|
|
74
75
|
export function createTestAccount(
|
|
75
76
|
apiUrl: string,
|
nodemailer/lib/mailer/index.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ declare namespace Mail {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
interface AttachmentLike {
|
|
36
|
-
/** String, Buffer or a Stream contents for the
|
|
36
|
+
/** String, Buffer or a Stream contents for the attachment */
|
|
37
37
|
content?: string | Buffer | Readable | undefined;
|
|
38
38
|
/** path to a file or an URL (data uris are allowed as well) if you want to stream the file instead of including it (better for larger attachments) */
|
|
39
39
|
path?: string | Url | undefined;
|
|
@@ -161,7 +161,7 @@ declare namespace Mail {
|
|
|
161
161
|
}
|
|
162
162
|
|
|
163
163
|
/** Creates an object for exposing the Mail API */
|
|
164
|
-
declare class Mail<T = any> extends EventEmitter {
|
|
164
|
+
declare class Mail<T = any, DefaultTransportOptions = TransportOptions> extends EventEmitter {
|
|
165
165
|
options: Mail.Options;
|
|
166
166
|
meta: Map<string, any>;
|
|
167
167
|
dkim: DKIM;
|
|
@@ -171,7 +171,9 @@ declare class Mail<T = any> extends EventEmitter {
|
|
|
171
171
|
/** Usage: typeof transporter.MailMessage */
|
|
172
172
|
MailMessage: MailMessage<T>;
|
|
173
173
|
|
|
174
|
-
|
|
174
|
+
_defaults: DefaultTransportOptions;
|
|
175
|
+
|
|
176
|
+
constructor(transporter: Transport<T>, options?: TransportOptions, defaults?: DefaultTransportOptions);
|
|
175
177
|
|
|
176
178
|
/** Closes all connections in the pool. If there is a message being sent, the connection is closed later */
|
|
177
179
|
close(): void;
|
nodemailer/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/nodemailer",
|
|
3
|
-
"version": "6.4.
|
|
3
|
+
"version": "6.4.16",
|
|
4
4
|
"description": "TypeScript definitions for nodemailer",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/nodemailer",
|
|
6
6
|
"license": "MIT",
|
|
@@ -32,6 +32,6 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@types/node": "*"
|
|
34
34
|
},
|
|
35
|
-
"typesPublisherContentHash": "
|
|
36
|
-
"typeScriptVersion": "4.
|
|
35
|
+
"typesPublisherContentHash": "d8ad4aeb68e8113bda781422f410a6a0c85bb2ec2e9d683ba52a9b4f6da7018e",
|
|
36
|
+
"typeScriptVersion": "4.8"
|
|
37
37
|
}
|