@types/nodemailer 6.4.15 → 6.4.17
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 +4 -2
- nodemailer/lib/mime-node/index.d.ts +88 -1
- nodemailer/package.json +4 -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:
|
|
11
|
+
* Last updated: Tue, 19 Nov 2024 17:02:32 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
|
@@ -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;
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import { Readable, ReadableOptions, Transform } from "stream";
|
|
4
4
|
|
|
5
5
|
import Mail = require("../mailer");
|
|
6
|
-
import SMTPConnection = require("../smtp-connection");
|
|
7
6
|
|
|
8
7
|
declare namespace MimeNode {
|
|
9
8
|
interface Addresses {
|
|
@@ -25,18 +24,43 @@ declare namespace MimeNode {
|
|
|
25
24
|
interface Options {
|
|
26
25
|
/** root node for this tree */
|
|
27
26
|
rootNode?: MimeNode | undefined;
|
|
27
|
+
|
|
28
28
|
/** immediate parent for this node */
|
|
29
29
|
parentNode?: MimeNode | undefined;
|
|
30
|
+
|
|
30
31
|
/** filename for an attachment node */
|
|
31
32
|
filename?: string | undefined;
|
|
33
|
+
|
|
34
|
+
/** Hostname for default message-id values */
|
|
35
|
+
hostname?: string | undefined;
|
|
36
|
+
|
|
32
37
|
/** shared part of the unique multipart boundary */
|
|
33
38
|
baseBoundary?: string | undefined;
|
|
39
|
+
|
|
34
40
|
/** If true, do not exclude Bcc from the generated headers */
|
|
35
41
|
keepBcc?: boolean | undefined;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* If set to 'win' then uses \r\n,
|
|
45
|
+
* if 'linux' then \n.
|
|
46
|
+
* If not set (or `raw` is used) then newlines are kept as is.
|
|
47
|
+
*/
|
|
48
|
+
newline?: string | undefined;
|
|
49
|
+
|
|
36
50
|
/** either 'Q' (the default) or 'B' */
|
|
37
51
|
textEncoding?: "B" | "Q" | undefined;
|
|
52
|
+
|
|
38
53
|
/** method to normalize header keys for custom caseing */
|
|
39
54
|
normalizeHeaderKey?(key: string): string;
|
|
55
|
+
|
|
56
|
+
/** undocumented */
|
|
57
|
+
boundaryPrefix?: string | undefined;
|
|
58
|
+
|
|
59
|
+
/** Undocumented */
|
|
60
|
+
disableFileAccess?: boolean | undefined;
|
|
61
|
+
|
|
62
|
+
/** Undocumented */
|
|
63
|
+
disableUrlAccess?: boolean | undefined;
|
|
40
64
|
}
|
|
41
65
|
}
|
|
42
66
|
|
|
@@ -132,6 +156,69 @@ declare class MimeNode {
|
|
|
132
156
|
|
|
133
157
|
/** Sets pregenerated content that will be used as the output of this node */
|
|
134
158
|
setRaw(raw: string | Buffer | Readable): this;
|
|
159
|
+
|
|
160
|
+
/** shared part of the unique multipart boundary */
|
|
161
|
+
baseBoundary: string;
|
|
162
|
+
|
|
163
|
+
/** a multipart boundary value */
|
|
164
|
+
boundary?: string | false | undefined;
|
|
165
|
+
|
|
166
|
+
/** Undocumented */
|
|
167
|
+
boundaryPrefix: string;
|
|
168
|
+
|
|
169
|
+
/* An array for possible child nodes */
|
|
170
|
+
childNodes: MimeNode[];
|
|
171
|
+
|
|
172
|
+
/** body content for current node */
|
|
173
|
+
content?: string | Buffer | Readable | undefined;
|
|
174
|
+
|
|
175
|
+
/** Undocumented */
|
|
176
|
+
contentType?: string | undefined;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* If date headers is missing and current node is the root, this value is used instead
|
|
180
|
+
*/
|
|
181
|
+
date: Date;
|
|
182
|
+
|
|
183
|
+
/** Undocumented */
|
|
184
|
+
disableFileAccess: boolean;
|
|
185
|
+
|
|
186
|
+
/** Undocumented */
|
|
187
|
+
disableUrlAccess: boolean;
|
|
188
|
+
|
|
189
|
+
/** filename for an attachment node */
|
|
190
|
+
filename?: string | undefined;
|
|
191
|
+
|
|
192
|
+
/** Hostname for default message-id values */
|
|
193
|
+
hostname?: string | undefined;
|
|
194
|
+
|
|
195
|
+
/** If true, do not exclude Bcc from the generated headers */
|
|
196
|
+
keepBcc: boolean;
|
|
197
|
+
|
|
198
|
+
/** Undocumented */
|
|
199
|
+
multipart?: boolean | undefined;
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* If set to 'win' then uses \r\n,
|
|
203
|
+
* if 'linux' then \n.
|
|
204
|
+
* If not set (or `raw` is used) then newlines are kept as is.
|
|
205
|
+
*/
|
|
206
|
+
newline?: string | undefined;
|
|
207
|
+
|
|
208
|
+
/** Undocumented */
|
|
209
|
+
nodeCounter: number;
|
|
210
|
+
|
|
211
|
+
/** method to normalize header keys for custom caseing */
|
|
212
|
+
normalizeHeaderKey?: ((key: string) => string) | undefined;
|
|
213
|
+
|
|
214
|
+
/* Immediate parent for this node (or undefined if not set) */
|
|
215
|
+
parentNode?: MimeNode | undefined;
|
|
216
|
+
|
|
217
|
+
/** root node for this tree */
|
|
218
|
+
rootNode: MimeNode;
|
|
219
|
+
|
|
220
|
+
/** either 'Q' (the default) or 'B' */
|
|
221
|
+
textEncoding: "B" | "Q" | "";
|
|
135
222
|
}
|
|
136
223
|
|
|
137
224
|
export = MimeNode;
|
nodemailer/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/nodemailer",
|
|
3
|
-
"version": "6.4.
|
|
3
|
+
"version": "6.4.17",
|
|
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,7 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@types/node": "*"
|
|
34
34
|
},
|
|
35
|
-
"
|
|
36
|
-
"
|
|
35
|
+
"peerDependencies": {},
|
|
36
|
+
"typesPublisherContentHash": "c93eda36deb49e226aaabb03b3ab999056957e2220b681e070d58074dc0a53a4",
|
|
37
|
+
"typeScriptVersion": "4.9"
|
|
37
38
|
}
|