-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(framework): Add NestJS serve
handler
#6654
feat(framework): Add NestJS serve
handler
#6654
Conversation
…ssh://github.com/novuhq/novu into nv-4183-introduce-nestjs-handler-for-novuframework
import { ConfigurableModuleBuilder } from '@nestjs/common'; | ||
import { NovuModuleOptions } from './nest.interface'; | ||
|
||
// use ConfigurableModuleBuilder, because building dynamic modules from scratch is painful |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Following best practices to use ConfigurableModuleBuilder per Dynamic Modules docs
novu
@novu/client
@novu/framework
@novu/headless
@novu/js
@novu/nest
@novu/notification-center
@novu/node
@novu/providers
@novu/react
@novu/react-native
@novu/shared
@novu/stateless
commit: |
✅ Deploy Preview for novu-stg-vite-dashboard-poc ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@@ -13,6 +13,7 @@ | |||
"sourceMap": true, | |||
"rootDir": ".", | |||
"outDir": "./dist", | |||
"experimentalDecorators": true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Necessary to use NestJS decorators.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😍
While using the existing SDK without the distinct novu nestjs integration, we have leveraged the batch endpoint quite often to reduce the amount of outgoing requests. Therefore it would be awesome to have like Workflow Types which can be eigher reused within a batch function or a typesafe implementation choosing the right types based on the workflow name within the batch fn. Besides this, this is a great feature and implementation, thanks for the work❤️ |
Thanks for sharing the use-case. We'll consider bulk type-safe triggering separately from the NestJS Framework handler, we will likely export a utility helper from
I'm raising this for consideration in our backlog 🙏 |
Thanks for the clarification. Great progress. |
What changed? Why was the change needed?
serve
handler using NestJS modules and controllerscloses #6552
Screenshots
Basic DX (without NestJS dependency injection, only basic content Workflows using
NovuModule.register
):Advanced DX (with NestJS dependency injection inside workflows using
NovuModule.registerAsync
):Expand for optional sections
Related enterprise PR
Special notes for your reviewer