@nest-boot/mailer 7.0.2 → 7.1.0

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.
@@ -3,4 +3,5 @@ import type SendmailTransport from "nodemailer/lib/sendmail-transport";
3
3
  import type SESTransport from "nodemailer/lib/ses-transport";
4
4
  import type SMTPTransport from "nodemailer/lib/smtp-transport";
5
5
  import type StreamTransport from "nodemailer/lib/stream-transport";
6
+ /** Configuration options for the mailer module (nodemailer transport options). */
6
7
  export type MailerModuleOptions = JSONTransport.Options | SESTransport.Options | SMTPTransport.Options | SendmailTransport.Options | StreamTransport.Options;
@@ -1,3 +1,23 @@
1
- import { ConfigurableModuleClass } from "./mailer.module-definition";
1
+ import { type DynamicModule } from "@nestjs/common";
2
+ import { ASYNC_OPTIONS_TYPE, ConfigurableModuleClass, OPTIONS_TYPE } from "./mailer.module-definition";
3
+ /**
4
+ * Email sending module powered by Nodemailer.
5
+ *
6
+ * @remarks
7
+ * Provides a configured Nodemailer transport instance for sending emails.
8
+ * Accepts standard Nodemailer transport options for SMTP configuration.
9
+ */
2
10
  export declare class MailerModule extends ConfigurableModuleClass {
11
+ /**
12
+ * Registers the MailerModule with the given options.
13
+ * @param options - Nodemailer transport configuration options
14
+ * @returns Dynamic module configuration
15
+ */
16
+ static register(options: typeof OPTIONS_TYPE): DynamicModule;
17
+ /**
18
+ * Registers the MailerModule asynchronously with factory functions.
19
+ * @param options - Async configuration options
20
+ * @returns Dynamic module configuration
21
+ */
22
+ static registerAsync(options: typeof ASYNC_OPTIONS_TYPE): DynamicModule;
3
23
  }
@@ -19,7 +19,30 @@ const mailerProvider = {
19
19
  inject: [mailer_module_definition_1.MODULE_OPTIONS_TOKEN],
20
20
  useFactory: (options) => (0, nodemailer_1.createTransport)(options),
21
21
  };
22
+ /**
23
+ * Email sending module powered by Nodemailer.
24
+ *
25
+ * @remarks
26
+ * Provides a configured Nodemailer transport instance for sending emails.
27
+ * Accepts standard Nodemailer transport options for SMTP configuration.
28
+ */
22
29
  let MailerModule = class MailerModule extends mailer_module_definition_1.ConfigurableModuleClass {
30
+ /**
31
+ * Registers the MailerModule with the given options.
32
+ * @param options - Nodemailer transport configuration options
33
+ * @returns Dynamic module configuration
34
+ */
35
+ static register(options) {
36
+ return super.register(options);
37
+ }
38
+ /**
39
+ * Registers the MailerModule asynchronously with factory functions.
40
+ * @param options - Async configuration options
41
+ * @returns Dynamic module configuration
42
+ */
43
+ static registerAsync(options) {
44
+ return super.registerAsync(options);
45
+ }
23
46
  };
24
47
  exports.MailerModule = MailerModule;
25
48
  exports.MailerModule = MailerModule = __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"mailer.module.js","sourceRoot":"","sources":["../src/mailer.module.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAuD;AACvD,2CAA6C;AAC7C,mEAA2C;AAE3C,yEAGoC;AAGpC,MAAM,cAAc,GAAqB;IACvC,OAAO,EAAE,gBAAM;IACf,MAAM,EAAE,CAAC,+CAAoB,CAAC;IAC9B,UAAU,EAAE,CAAC,OAA4B,EAAE,EAAE,CAAC,IAAA,4BAAe,EAAC,OAAO,CAAC;CACvE,CAAC;AAGK,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,kDAAuB;CAAG,CAAA;AAA/C,oCAAY;uBAAZ,YAAY;IADxB,IAAA,eAAM,EAAC,EAAE,SAAS,EAAE,CAAC,cAAc,CAAC,EAAE,OAAO,EAAE,CAAC,cAAc,CAAC,EAAE,CAAC;GACtD,YAAY,CAAmC"}
1
+ {"version":3,"file":"mailer.module.js","sourceRoot":"","sources":["../src/mailer.module.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA2E;AAC3E,2CAA6C;AAC7C,mEAA2C;AAE3C,yEAKoC;AAGpC,MAAM,cAAc,GAAqB;IACvC,OAAO,EAAE,gBAAM;IACf,MAAM,EAAE,CAAC,+CAAoB,CAAC;IAC9B,UAAU,EAAE,CAAC,OAA4B,EAAE,E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