nuxt-mail 8.0.1 → 8.0.2

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.
@@ -1,6 +1,6 @@
1
1
  import type { MailOptionsInput } from './types';
2
2
  declare const _default: (options: MailOptionsInput) => {
3
3
  message: import("./types").Message[];
4
- smtp: import("nodemailer").TransportOptions;
4
+ smtp: SMTPTransport.Options;
5
5
  };
6
6
  export default _default;
package/dist/types.d.ts CHANGED
@@ -1,23 +1,26 @@
1
- import type { SendMailOptions, TransportOptions } from 'nodemailer';
1
+ import type { SendMailOptions } from 'nodemailer';
2
+ import type SMTPTransport from 'nodemailer/lib/smtp-transport';
3
+ import type { RequireAtLeastOne } from 'type-fest';
4
+
5
+ export type Message = RequireAtLeastOne<
6
+ SendMailOptions,
7
+ 'to' | 'cc' | 'bcc'
8
+ > & { name?: string };
2
9
 
3
10
  export interface MailOptions {
4
11
  message: Message[];
5
- smtp: TransportOptions | null;
6
- }
7
-
8
- export interface Message extends Omit<SendMailOptions, 'to' | 'cc' | 'bcc'> {
9
- to: SendMailOptions['to'];
10
- cc: SendMailOptions['cc'];
11
- bcc: SendMailOptions['bcc'];
12
- name?: string;
12
+ smtp: SMTPTransport.Options | null;
13
13
  }
14
14
 
15
15
  export interface MailOptionsInput extends Omit<MailOptions, 'message'> {
16
16
  message: MailOptions['message'] | Message;
17
- smtp: TransportOptions;
17
+ smtp: SMTPTransport.Options;
18
18
  }
19
19
 
20
- export interface MessageWithConfig extends Message {
20
+ export interface MessageWithConfig extends Omit<
21
+ SendMailOptions,
22
+ 'to' | 'cc' | 'bcc'
23
+ > {
21
24
  config: number;
22
25
  }
23
26
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-mail",
3
- "version": "8.0.1",
3
+ "version": "8.0.2",
4
4
  "description": "Adds email sending capability to a Nuxt.js app. Adds a server route, an injected variable, and uses nodemailer to send emails.",
5
5
  "keywords": [
6
6
  "email",
@@ -52,7 +52,8 @@
52
52
  "@types/nodemailer": "^7.0.4",
53
53
  "defu": "^6.1.4",
54
54
  "lodash-es": "^4.17.22",
55
- "nodemailer": "^7.0.12"
55
+ "nodemailer": "^7.0.12",
56
+ "type-fest": "^5.3.1"
56
57
  },
57
58
  "devDependencies": {
58
59
  "@dword-design/base": "^16.1.6",