0.24.1 • Published 1 month ago
@novu/nest v0.24.1
NestJS Module Wrapper
A NestJS module wrapper for @novu/node
Usage
Initializing module with templates and providers:
import { NovuModule } from "@novu/nest";
@Module({
imports: [
NovuModule.forRoot({
providers: [
new SendgridEmailProvider({
apiKey: process.env.SENDGRID_API_KEY,
from: 'sender@mail.com',
}),
],
templates: [
{
id: 'password-reset',
messages: [
{
subject: 'Your password reset request',
channel: ChannelTypeEnum.EMAIL,
template: `
Hi {{firstName}}!
To reset your password click <a href="{{resetLink}}">here.</a>
`,
},
],
},
],
}),
],
})
Using novu's singleton service in other services and modules:
import { Injectable, Inject } from '@nestjs/common';
import { NovuService } from '@novu/nest';
@Injectable()
export class UserService {
constructor(private readonly novu: NovuService) {}
async triggerEvent() {
await this.novu.trigger('password-reset', {
$email: 'receiver@mail.com',
$user_id: 'id'
});
}
}
0.24.1
1 month ago
0.24.0
2 months ago
0.23.1
3 months ago
0.23.0
3 months ago
0.22.0
5 months ago
0.21.0
7 months ago
0.20.0
7 months ago
0.19.0
8 months ago
0.16.3
10 months ago
0.16.4
10 months ago
0.20.0-alpha.1
7 months ago
0.17.0
10 months ago
0.18.0
9 months ago
0.17.1
10 months ago
0.16.2
11 months ago
0.15.0
12 months ago
0.16.0
11 months ago
0.16.1
11 months ago
0.13.0
1 year ago
0.14.0
1 year ago
0.11.0
1 year ago
0.12.0
1 year ago
0.10.0
1 year ago
0.10.0-alpha.0
1 year ago
0.10.1
1 year ago
0.10.2
1 year ago
0.9.0
2 years ago
0.7.2
2 years ago
0.8.0
2 years ago
0.7.0
2 years ago
0.5.0
2 years ago
0.6.0
2 years ago
0.5.1
2 years ago
0.4.1-alpha.0
2 years ago
0.4.1
2 years ago
0.4.0
2 years ago
0.4.0-alpha.8
2 years ago
0.4.0-alpha.5
2 years ago
0.4.0-alpha.4
2 years ago
0.4.0-alpha.2
2 years ago
0.4.0-alpha.1
2 years ago
0.4.0-alpha.0
2 years ago