@types/nodemailer 7.0.8 → 7.0.10
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 +2 -2
- nodemailer/lib/ses-transport/index.d.ts +47 -7
- nodemailer/package.json +3 -4
nodemailer/README.md
CHANGED
|
@@ -8,8 +8,8 @@ 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:
|
|
12
|
-
* Dependencies: [@
|
|
11
|
+
* Last updated: Sun, 15 Feb 2026 16:42:50 GMT
|
|
12
|
+
* Dependencies: [@types/node](https://npmjs.com/package/@types/node)
|
|
13
13
|
|
|
14
14
|
# Credits
|
|
15
15
|
These definitions were written by [Rogier Schouten](https://github.com/rogierschouten), [Piotr Roszatycki](https://github.com/dex4er), and [Daniel Chao](https://github.com/bioball).
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
|
|
3
|
-
import * as aws from "@aws-sdk/client-sesv2";
|
|
4
3
|
import { EventEmitter } from "node:events";
|
|
5
4
|
|
|
6
5
|
import { Transport, TransportOptions } from "../..";
|
|
@@ -12,25 +11,66 @@ import MailMessage = require("../mailer/mail-message");
|
|
|
12
11
|
import MimeNode = require("../mime-node");
|
|
13
12
|
|
|
14
13
|
declare namespace SESTransport {
|
|
14
|
+
/**
|
|
15
|
+
* Minimal structural shape of SESv2 SendEmail input.
|
|
16
|
+
* This is intentionally structural so @types/nodemailer does not require
|
|
17
|
+
* installing @aws-sdk/client-sesv2.
|
|
18
|
+
*
|
|
19
|
+
* If you want the full, exact type, install @aws-sdk/client-sesv2 in your
|
|
20
|
+
* app and use its types directly in your own code.
|
|
21
|
+
*/
|
|
22
|
+
interface SendEmailRequestLike {
|
|
23
|
+
FromEmailAddress?: string;
|
|
24
|
+
Destination?: {
|
|
25
|
+
ToAddresses?: string[];
|
|
26
|
+
CcAddresses?: string[];
|
|
27
|
+
BccAddresses?: string[];
|
|
28
|
+
};
|
|
29
|
+
ReplyToAddresses?: string[];
|
|
30
|
+
Content?: unknown;
|
|
31
|
+
EmailTags?: Array<{ Name?: string; Value?: string }>;
|
|
32
|
+
ConfigurationSetName?: string;
|
|
33
|
+
ListManagementOptions?: unknown;
|
|
34
|
+
FeedbackForwardingEmailAddress?: string;
|
|
35
|
+
// Allow extra fields without forcing the SDK type package
|
|
36
|
+
[key: string]: unknown;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** Structural type matching SESv2Client from @aws-sdk/client-sesv2 */
|
|
40
|
+
interface SESv2ClientLike {
|
|
41
|
+
send(command: unknown, options?: unknown): Promise<{ MessageId?: string }>;
|
|
42
|
+
config?: {
|
|
43
|
+
region?: string | (() => Promise<string>);
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Constructor type for SendEmailCommand from @aws-sdk/client-sesv2.
|
|
49
|
+
* The real type is: new(input: SendEmailCommandInput) => SendEmailCommand
|
|
50
|
+
* Contravariance prevents typing this more strictly without pulling in aws-sdk as a dependency.
|
|
51
|
+
*/
|
|
52
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
53
|
+
type SendEmailCommandConstructorLike = new(input: any) => unknown;
|
|
54
|
+
|
|
15
55
|
interface MailOptions extends Mail.Options {
|
|
16
|
-
/**
|
|
56
|
+
/** Options passed to AWS SESv2 SendEmailCommand */
|
|
17
57
|
ses?: MailSesOptions | undefined;
|
|
18
58
|
}
|
|
19
59
|
|
|
20
60
|
// Keep it as an interface for backward-compatibility
|
|
21
61
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
22
|
-
interface MailSesOptions extends Partial<
|
|
62
|
+
interface MailSesOptions extends Partial<SendEmailRequestLike> {}
|
|
23
63
|
|
|
24
64
|
interface Options extends MailOptions, TransportOptions {
|
|
25
|
-
/**
|
|
65
|
+
/** An object containing an instantiated SESv2Client and the SendEmailCommand class */
|
|
26
66
|
SES: {
|
|
27
|
-
sesClient:
|
|
28
|
-
SendEmailCommand:
|
|
67
|
+
sesClient: SESv2ClientLike;
|
|
68
|
+
SendEmailCommand: SendEmailCommandConstructorLike;
|
|
29
69
|
};
|
|
30
70
|
}
|
|
31
71
|
|
|
32
72
|
interface SentMessageInfo {
|
|
33
|
-
/** an envelope object {from
|
|
73
|
+
/** an envelope object {from:'address', to:['address']} */
|
|
34
74
|
envelope: MimeNode.Envelope;
|
|
35
75
|
/** the Message-ID header value. This value is derived from the response of SES API, so it differs from the Message-ID values used in logging. */
|
|
36
76
|
messageId: string;
|
nodemailer/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/nodemailer",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.10",
|
|
4
4
|
"description": "TypeScript definitions for nodemailer",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/nodemailer",
|
|
6
6
|
"license": "MIT",
|
|
@@ -30,10 +30,9 @@
|
|
|
30
30
|
},
|
|
31
31
|
"scripts": {},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@aws-sdk/client-sesv2": "^3.839.0",
|
|
34
33
|
"@types/node": "*"
|
|
35
34
|
},
|
|
36
35
|
"peerDependencies": {},
|
|
37
|
-
"typesPublisherContentHash": "
|
|
36
|
+
"typesPublisherContentHash": "19b14ca870ebbbf3a3912db11e1498a184e120b170a622e049cb43531ca7af6a",
|
|
38
37
|
"typeScriptVersion": "5.2"
|
|
39
|
-
}
|
|
38
|
+
}
|