0.24.1 • Published 1 month ago
@novu/stateless v0.24.1
📦 Install
npm install @novu/stateless
yarn add @novu/stateless
🔨 Usage
import { NovuStateless, ChannelTypeEnum } from '@novu/stateless';
import { SendgridEmailProvider } from '@novu/sendgrid';
const novu = new NovuStateless();
await novu.registerProvider(
new SendgridEmailProvider({
apiKey: process.env.SENDGRID_API_KEY,
from: 'sender@mail.com',
})
);
const passwordResetTemplate = await novu.registerTemplate({
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>
{{#if organization}}
<img src="{{organization.logo}}" />
{{/if}}
`,
},
],
});
await novu.trigger('<REPLACE_WITH_EVENT_NAME>', {
$user_id: '<USER IDENTIFIER>',
$email: 'test@email.com',
firstName: 'John',
lastName: 'Doe',
organization: {
logo: 'https://evilcorp.com/logo.png',
},
});
Providers
Novu provides a single API to manage providers across multiple channels with a simple-to-use interface.
📞 SMS
📱 Push
👇 Chat
📱 In-App
- Novu
- MagicBell
Other (Coming Soon...)
- PagerDuty
🔗 Links
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.7
2 years ago
0.4.0-alpha.5
2 years ago
0.4.0-alpha.4
2 years ago