@types/nodemailer 7.0.6 → 7.0.8

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 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: Mon, 26 Jan 2026 19:37:03 GMT
12
- * Dependencies: [@types/node](https://npmjs.com/package/@types/node)
11
+ * Last updated: Sat, 10 Jan 2026 10:36:49 GMT
12
+ * Dependencies: [@aws-sdk/client-sesv2](https://npmjs.com/package/@aws-sdk/client-sesv2), [@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,5 +1,6 @@
1
1
  /// <reference types="node" />
2
2
 
3
+ import * as aws from "@aws-sdk/client-sesv2";
3
4
  import { EventEmitter } from "node:events";
4
5
 
5
6
  import { Transport, TransportOptions } from "../..";
@@ -11,66 +12,25 @@ import MailMessage = require("../mailer/mail-message");
11
12
  import MimeNode = require("../mime-node");
12
13
 
13
14
  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
-
55
15
  interface MailOptions extends Mail.Options {
56
- /** Options passed to AWS SESv2 SendEmailCommand */
16
+ /** list of keys that SendRawEmail method can take */
57
17
  ses?: MailSesOptions | undefined;
58
18
  }
59
19
 
60
20
  // Keep it as an interface for backward-compatibility
61
21
  // eslint-disable-next-line @typescript-eslint/no-empty-interface
62
- interface MailSesOptions extends Partial<SendEmailRequestLike> {}
22
+ interface MailSesOptions extends Partial<aws.SendEmailRequest> {}
63
23
 
64
24
  interface Options extends MailOptions, TransportOptions {
65
- /** An object containing an instantiated SESv2Client and the SendEmailCommand class */
25
+ /** is an option that expects an instantiated aws.SES object */
66
26
  SES: {
67
- sesClient: SESv2ClientLike;
68
- SendEmailCommand: SendEmailCommandConstructorLike;
27
+ sesClient: aws.SESv2Client;
28
+ SendEmailCommand: typeof aws.SendEmailCommand;
69
29
  };
70
30
  }
71
31
 
72
32
  interface SentMessageInfo {
73
- /** an envelope object {from:'address', to:['address']} */
33
+ /** an envelope object {from:‘address’, to:[address]} */
74
34
  envelope: MimeNode.Envelope;
75
35
  /** 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. */
76
36
  messageId: string;
nodemailer/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/nodemailer",
3
- "version": "7.0.6",
3
+ "version": "7.0.8",
4
4
  "description": "TypeScript definitions for nodemailer",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/nodemailer",
6
6
  "license": "MIT",
@@ -30,9 +30,10 @@
30
30
  },
31
31
  "scripts": {},
32
32
  "dependencies": {
33
+ "@aws-sdk/client-sesv2": "^3.839.0",
33
34
  "@types/node": "*"
34
35
  },
35
36
  "peerDependencies": {},
36
- "typesPublisherContentHash": "0c7c516d1e728b705f6215c22ebfa7c5610b559d79ce013534dc3ef127071c6d",
37
+ "typesPublisherContentHash": "dd5813a6744e65d6be765df0b25470c4d5bbc9b2278b6a3e9fdd968767074de5",
37
38
  "typeScriptVersion": "5.2"
38
- }
39
+ }