v0.20.0
版本发布时间: 2023-10-24 16:53:32
novuhq/novu最新发布版本:v0.24.0(2024-03-18 17:44:43)
What’s new in Novu 0.20?
TL;DR: All you need to know about the latest Novu 0.20.0 release. Global User Preferences, Integrations conditions, Digest and delay filters and more!
0.20 Release Updates
We're thrilled to announce the newest features in our most recent release. Let's get started and explore what's waiting for you!
Global Channel Preferences for Subscribers API
It's now possible to set subscriber preferences globally for either a particular channel or all channels via API.
I'm really stoked about this because before now it was only available per workflow, /:subscriberId/preferences/:templateId
With these API URLs, you can fetch and update global subscriber preferences.
-
/subscribers/:subscriberid/preference
- Update a subscriber preference globally. -
/subscribers/:subscriberid/preferences/global
- Fetch a subscriber preference globally.
Note: These methods are also available in the NodeJS SDK. They will be available in other language SDKs very soon.
If you're using the Headless service and Notification Center Widgets, you can set or fetch via the following APIs:
-
widgets/preferences
- PATCH : Update subscriber preferences globally
{
"enabled": true,
"preferences": [
{
"type": "in_app",
"enabled": true
},
{
"type": "email",
"enabled": false
}
]
}
-
widgets/preferences/global
- GET : Fetch subscriber preferences globally.
The exposed methods from the widgets are:
-
fetchUserGlobalPrereferences
-
updateUserGlobalPreferences
Note: If a workflow is marked as critical, the subscriber global preferences will be ignored, and notifications will be sent.
Filters Usage in Digest and Delay Nodes
Users can now add filters to the digest and delay nodes inside the workflow editor to dynamically control if a digest should be used or not.
Digest Node: Adding filter
Delay Node: Adding filter
Improved Error Messages In The Workflow Editor
We have improved the error icons and states for each node in the workflow, when no provider is connected or not configured.
SMS & Email Custom Data Overrides
We now support adding custom data in email overrides as shown below:
import { Novu } from '@novu/node';
const novu = new Novu('<NOVU_API_KEY>');
await novu.subscribers.trigger("workflowIdentifier", {
to: "subscriberId",
payload: {
customKey: "customValue",
},
overrides: {
email: {
from: "support@novu.co",
// customData will work only for sendgrid
customData: {
"customKey": "customValue"
}
}
}
}
Email Custom Data overrides
Note: This works for Sendgrid only at the moment.
You can override sms values via the code below.
...
...
await novu.subscribers.trigger("workflowIdentifier", {
to: "subscriberId",
payload: {
customKey: "customValue",
},
overrides: {
sms: {
to: "<insert-phone-number>",
content: "<insert-content>"
}
}
}
SMS Overrides
Enabling The Addition of Conditions to Integrations
Users can now create conditions for the channel integrations to be executed for specific tenants only.
In the image above, you can add the condition (to an integration) to state that the integration should be used if the tenant identifier used in trigger matches the tenant identifier set here.
Note: The integrations are the provider instances on the Integration store dashboard.
When Novu runs a trigger code with a tenant Identifier attached to it like so:
import { Novu } from '@novu/node';
const novu = new Novu(process.env.NOVU_API_KEY);
await novu.trigger('<WORKFLOW_TRIGGER_ID>',
{
to: {
subscriberId: '<UNIQUE_SUBSCRIBER_IDENTIFIER>',
email: 'john@doemail.com',
},
tenant: "tenantIdentifier"
}
);
..Novu runs checks on the integrations in the Integration store to determine which integration matches to be used to send the notification based on any condition that has been set. If nothing was set, it defaults to the primary provider set for the channel used in the workflow.
Mailtrap Email Provider Integration
Now, you can use the Mailtrap Email provider on Novu.
Clicksend SMS Provider Integration
Now, you can use the Clicksend SMS provider on Novu.
All Changes
- refactor: replace node-apns library with parse implementation by @scopsy in https://github.com/novuhq/novu/pull/4085
- chore: upgrade mongoose version to 7 by @scopsy in https://github.com/novuhq/novu/pull/4106
- feat: init git submodule by @djabarovgeorge in https://github.com/novuhq/novu/pull/4049
- Nv 2781 move auth logic to application generic by @djabarovgeorge in https://github.com/novuhq/novu/pull/4064
- feat: add external oauth module by @djabarovgeorge in https://github.com/novuhq/novu/pull/4067
- chore: fix typo in spf.py by @eltociear in https://github.com/novuhq/novu/pull/4083
- Docs overhaul by @sumitsaurabh927 in https://github.com/novuhq/novu/pull/3835
- fix: unseen count default by @djabarovgeorge in https://github.com/novuhq/novu/pull/4082
- Fix unseen count by @djabarovgeorge in https://github.com/novuhq/novu/pull/4084
- Fix plunk missing square logo by @michaldziuba03 in https://github.com/novuhq/novu/pull/4087
- fix: unread request by @djabarovgeorge in https://github.com/novuhq/novu/pull/4088
- chore: fix typos by @omahs in https://github.com/novuhq/novu/pull/4089
- fix: so closing x is in the right place by @davidsoderberg in https://github.com/novuhq/novu/pull/4092
- Nv 2679 reusable conditions component by @ainouzgali in https://github.com/novuhq/novu/pull/4095
- chore: upgrade vite by @scopsy in https://github.com/novuhq/novu/pull/4090
- NV-2765 - 🐛 Bug Report: delay icon is not aligned with other steps icon by @gitstart in https://github.com/novuhq/novu/pull/4068
- Nv 2764 e2e tests by @djabarovgeorge in https://github.com/novuhq/novu/pull/4094
- fix: missing data prop in the compile payload by @ainouzgali in https://github.com/novuhq/novu/pull/4114
- Add ES i18n translations by @luisdoniad in https://github.com/novuhq/novu/pull/4110
- fix: select integration with condtions by @davidsoderberg in https://github.com/novuhq/novu/pull/4115
- refactor: conditions component by @ainouzgali in https://github.com/novuhq/novu/pull/4105
- feat: add nodejs sdk methods in readme by @jainpawan21 in https://github.com/novuhq/novu/pull/4047
- fix(ci): inbound mail pipeline indent by @p-fernandez in https://github.com/novuhq/novu/pull/4122
- Add Staging Web Pipeline by @Cliftonz in https://github.com/novuhq/novu/pull/4108
- Build submodule package by branch by @djabarovgeorge in https://github.com/novuhq/novu/pull/4121
- fix: angular version by @sr-26 in https://github.com/novuhq/novu/pull/4134
- add volume claim to mongodb deployment by @ahmadzana in https://github.com/novuhq/novu/pull/4135
- feat: add missing endpoints by @BiswaViraj in https://github.com/novuhq/novu/pull/4103
- fix: run rename by @djabarovgeorge in https://github.com/novuhq/novu/pull/4139
- Fix Inbound Mail Deployment by @djabarovgeorge in https://github.com/novuhq/novu/pull/4143
- Nv 2826 investigate failing digest tests by @davidsoderberg in https://github.com/novuhq/novu/pull/4140
- fix(app-generic): remove in-memory stranded log by @p-fernandez in https://github.com/novuhq/novu/pull/4124
- feat: add custom data in email overrides by @jainpawan21 in https://github.com/novuhq/novu/pull/4147
- chore(web): eslint react hooks part 3 by @LetItRock in https://github.com/novuhq/novu/pull/4037
- chore(deps): bump word-wrap from 1.2.3 to 1.2.5 by @dependabot in https://github.com/novuhq/novu/pull/4104
- chore: upgrade storybook by @scopsy in https://github.com/novuhq/novu/pull/4166
- Catch unexpected error while trigger event by @djabarovgeorge in https://github.com/novuhq/novu/pull/4169
- Throw exception on subscriber id as array by @djabarovgeorge in https://github.com/novuhq/novu/pull/4170
- fix: feed duplication by @sr-26 in https://github.com/novuhq/novu/pull/4130
- Correct Env Variable for Completed Cron Id health check by @Cliftonz in https://github.com/novuhq/novu/pull/4179
- Change Completed Metric Job to only run once a minute by @Cliftonz in https://github.com/novuhq/novu/pull/4182
- docs: fix link to docs by @sumitsaurabh927 in https://github.com/novuhq/novu/pull/4189
- fix: bad request for credentials by @sr-26 in https://github.com/novuhq/novu/pull/4131
- fix(web): product lead by @LetItRock in https://github.com/novuhq/novu/pull/4161
- fix: change docs url by @jainpawan21 in https://github.com/novuhq/novu/pull/4199
- Remove duplicate mention of SNS in SMS providers by @Parvezkhan0 in https://github.com/novuhq/novu/pull/4197
- feat(worker): refactor get digest events flow by @p-fernandez in https://github.com/novuhq/novu/pull/4200
- feat(api): create trigger event status enum by @p-fernandez in https://github.com/novuhq/novu/pull/4202
- fix(web): add missing injected web env vars by @xarlybovi in https://github.com/novuhq/novu/pull/4162
- fix(app-generic): proper naming for the standard worker and worker svc by @p-fernandez in https://github.com/novuhq/novu/pull/4212
- chore: remove unsued agenda package by @scopsy in https://github.com/novuhq/novu/pull/4213
- chore: remove unused docs project by @scopsy in https://github.com/novuhq/novu/pull/4215
- feat(worker): add trigger-handler queue worker for old instance redis by @p-fernandez in https://github.com/novuhq/novu/pull/4214
- fix(worker): addded some logs by @p-fernandez in https://github.com/novuhq/novu/pull/4216
- Improve Docs for Hacktoberfest by @unicodeveloper in https://github.com/novuhq/novu/pull/4217
- NV-2473 - data field is not added in case of inline of trigger by @gitstart in https://github.com/novuhq/novu/pull/3987
- feat: allow variables in sender name field of email editor by @mahendraHegde in https://github.com/novuhq/novu/pull/4184
- chore: Replace deprecated command with environment file by @jongwooo in https://github.com/novuhq/novu/pull/4208
- chore: remove unused graphql by @scopsy in https://github.com/novuhq/novu/pull/4220
- chore: remove unused testing lib by @scopsy in https://github.com/novuhq/novu/pull/4222
- chore: remove unused packages by @scopsy in https://github.com/novuhq/novu/pull/4226
- Add context to inbound email parse logger by @djabarovgeorge in https://github.com/novuhq/novu/pull/4145
- refactor: replace cp-cli with ncp by @scopsy in https://github.com/novuhq/novu/pull/4230
- feat: add support for sms overrides by @mahendraHegde in https://github.com/novuhq/novu/pull/4168
- Add markNotificationsAs by @dimooooon322 in https://github.com/novuhq/novu/pull/4228
- feat: add templateid support for sendgrid by @jainpawan21 in https://github.com/novuhq/novu/pull/4209
- Display Novu Version to the WEB UI for self-hosted users by @pedrobruneli in https://github.com/novuhq/novu/pull/4241
- fix(api): malformed filters in messages throw errors by @p-fernandez in https://github.com/novuhq/novu/pull/4308
- docs: Updated node version in CONTRIBUTING.md by @Kise07 in https://github.com/novuhq/novu/pull/4310
- add "name" property in nodemailer smtpTransportOptions to support hos… by @mainadennis in https://github.com/novuhq/novu/pull/4316
- chore(widget): use react-app-rewired instead of craco by @LetItRock in https://github.com/novuhq/novu/pull/4318
- FIX Typos and spelling corrections by @brianteeman in https://github.com/novuhq/novu/pull/4353
- docs: Fixed-hyperlink-for-deploying-to-kubernetes by @Shiva1406 in https://github.com/novuhq/novu/pull/4273
- Feature/implement hidden button by @pedrobruneli in https://github.com/novuhq/novu/pull/4265
- chore: add Elixir SDK to hacktoberfest list by @btkostner in https://github.com/novuhq/novu/pull/4360
- Update CONTRIBUTING.md by @gitgoap in https://github.com/novuhq/novu/pull/4312
- fix: fixed react flow link by @govardhanshah456 in https://github.com/novuhq/novu/pull/4302
- fix: add missing nodemailer types by @scopsy in https://github.com/novuhq/novu/pull/4393
- fix/docs: Add missing provider links in README by @nick-w-nick in https://github.com/novuhq/novu/pull/4390
- feat: add newrelic custom attributes by @scopsy in https://github.com/novuhq/novu/pull/4300
- feat: added RustSDK to README.md file by @deanurag in https://github.com/novuhq/novu/pull/4405
- fix: Fixed switching the organization the branding information is refetched by @vishalkhoje in https://github.com/novuhq/novu/pull/4297
- Allow fetching of no level preferences by @BiswaViraj in https://github.com/novuhq/novu/pull/4420
- chore: upgrade zod version to latest by @scopsy in https://github.com/novuhq/novu/pull/4423
- fix(button-variables): button link variables not showing to user in email message editor by @rockingrohit9639 in https://github.com/novuhq/novu/pull/4433
- FIX updated 'Run Novu Locally' link in README.md file by @bibaswan7 in https://github.com/novuhq/novu/pull/4355
- chore: fix typo in active-jobs-metric.service.ts by @eltociear in https://github.com/novuhq/novu/pull/4324
- @novu/node: Add transaction id to broadcast payload options by @RtiM0 in https://github.com/novuhq/novu/pull/3464
- fix(web): add missing square logo for sendchamp by @michaldziuba03 in https://github.com/novuhq/novu/pull/4456
- Fix send message uuuid by @scopsy in https://github.com/novuhq/novu/pull/4459
- refactor: map subscribers in worker part by @djabarovgeorge in https://github.com/novuhq/novu/pull/4205
- fix: tenant fetch by id by @djabarovgeorge in https://github.com/novuhq/novu/pull/4282
- feat: fan-out subscriber processing by @djabarovgeorge in https://github.com/novuhq/novu/pull/4225
- feat: export types/interfaces from headless servive by @BiswaViraj in https://github.com/novuhq/novu/pull/4441
- feat(api): Add Access-Control-Max-Age response header by @rifont in https://github.com/novuhq/novu/pull/4429
- feat(dal): Configure minimum connection pool size by env var by @dmgarland in https://github.com/novuhq/novu/pull/4073
- 0.20 patch - fix bulk options by @djabarovgeorge in https://github.com/novuhq/novu/pull/4477
- refactor: refactored add digest job usecase by @scopsy in https://github.com/novuhq/novu/pull/4158
- fix: cors issue for iframe by @davidsoderberg in https://github.com/novuhq/novu/pull/4482
- added API reference docs by @krishvsoni in https://github.com/novuhq/novu/pull/4486
- feat(provider): clicksend sms provider addition by @parveshsaini in https://github.com/novuhq/novu/pull/4473
- feat(worker): handle different push flows with better exec details by @p-fernandez in https://github.com/novuhq/novu/pull/4495
- feat(providers): improve expo response management and multi device token by @p-fernandez in https://github.com/novuhq/novu/pull/4508
New Contributors
- @omahs made their first contribution in https://github.com/novuhq/novu/pull/4089
- @luisdoniad made their first contribution in https://github.com/novuhq/novu/pull/4110
- @sr-26 made their first contribution in https://github.com/novuhq/novu/pull/4134
- @ahmadzana made their first contribution in https://github.com/novuhq/novu/pull/4135
- @Parvezkhan0 made their first contribution in https://github.com/novuhq/novu/pull/4197
- @xarlybovi made their first contribution in https://github.com/novuhq/novu/pull/4162
- @jongwooo made their first contribution in https://github.com/novuhq/novu/pull/4208
- @dimooooon322 made their first contribution in https://github.com/novuhq/novu/pull/4228
- @pedrobruneli made their first contribution in https://github.com/novuhq/novu/pull/4241
- @Kise07 made their first contribution in https://github.com/novuhq/novu/pull/4310
- @mainadennis made their first contribution in https://github.com/novuhq/novu/pull/4316
- @brianteeman made their first contribution in https://github.com/novuhq/novu/pull/4353
- @Shiva1406 made their first contribution in https://github.com/novuhq/novu/pull/4273
- @btkostner made their first contribution in https://github.com/novuhq/novu/pull/4360
- @gitgoap made their first contribution in https://github.com/novuhq/novu/pull/4312
- @govardhanshah456 made their first contribution in https://github.com/novuhq/novu/pull/4302
- @deanurag made their first contribution in https://github.com/novuhq/novu/pull/4405
- @vishalkhoje made their first contribution in https://github.com/novuhq/novu/pull/4297
- @piyushgarg-dev made their first contribution in https://github.com/novuhq/novu/pull/4237
- @bibaswan7 made their first contribution in https://github.com/novuhq/novu/pull/4355
- @rifont made their first contribution in https://github.com/novuhq/novu/pull/4429
- @dmgarland made their first contribution in https://github.com/novuhq/novu/pull/4073
- @parveshsaini made their first contribution in https://github.com/novuhq/novu/pull/4473
Full Changelog: https://github.com/novuhq/novu/compare/v0.19.0...v0.20.0