2.0.0 • Published 10 months ago
@novu/nest v2.0.0
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'
});
}
}
2.0.0
10 months ago
2.0.0-canary.0
1 year ago
0.24.2
1 year ago
0.24.1
1 year ago
0.24.0
1 year ago
0.23.1
1 year ago
0.23.0
1 year ago
0.22.0
2 years ago
0.21.0
2 years ago
0.20.0
2 years ago
0.19.0
2 years ago
0.16.3
2 years ago
0.16.4
2 years ago
0.20.0-alpha.1
2 years ago
0.17.0
2 years ago
0.18.0
2 years ago
0.17.1
2 years ago
0.16.2
2 years ago
0.15.0
2 years ago
0.16.0
2 years ago
0.16.1
2 years ago
0.13.0
2 years ago
0.14.0
2 years ago
0.11.0
2 years ago
0.12.0
2 years ago
0.10.0
3 years ago
0.10.0-alpha.0
3 years ago
0.10.1
3 years ago
0.10.2
2 years ago
0.9.0
3 years ago
0.7.2
3 years ago
0.8.0
3 years ago
0.7.0
3 years ago
0.5.0
3 years ago
0.6.0
3 years ago
0.5.1
3 years ago
0.4.1-alpha.0
3 years ago
0.4.1
3 years ago
0.4.0
3 years ago
0.4.0-alpha.8
3 years ago
0.4.0-alpha.5
3 years ago
0.4.0-alpha.4
3 years ago
0.4.0-alpha.2
3 years ago
0.4.0-alpha.1
3 years ago
0.4.0-alpha.0
3 years ago