-
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
refactor(api): generate payload in runtime #7192
Conversation
✅ Deploy Preview for dev-web-novu ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for novu-stg-vite-dashboard-poc ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for dashboard-v2-novu-staging ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
apps/api/src/app/workflows-v2/usecases/build-test-data/build-workflow-test-data.usecase.ts
Outdated
Show resolved
Hide resolved
apps/api/src/app/workflows-v2/usecases/generate-preview/generate-preview.usecase.ts
Show resolved
Hide resolved
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.
Nicely done @djabarovgeorge. I added some nitty gritty comments that should be easily addressed but overall the flow is crystal clear.
apps/api/src/app/workflows-v2/usecases/build-payload-schema/build-payload-schema.usecase.ts
Outdated
Show resolved
Hide resolved
apps/api/src/app/workflows-v2/usecases/build-payload-schema/build-payload-schema.usecase.ts
Show resolved
Hide resolved
apps/api/src/app/workflows-v2/usecases/build-payload-schema/build-payload-schema.usecase.ts
Outdated
Show resolved
Hide resolved
apps/api/src/app/workflows-v2/usecases/build-payload-schema/build-payload-schema.usecase.ts
Outdated
Show resolved
Hide resolved
apps/api/src/app/workflows-v2/usecases/build-payload-schema/build-payload-schema.usecase.ts
Outdated
Show resolved
Hide resolved
* { | ||
* validVariables: ['user.name'], | ||
* invalidVariables: [{ | ||
* context: '>> 1| {{invalid..syntax}}\n ^', |
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.
Do we need the context
key in invalidVariables?
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.
In my opinion, we could benefit from it. this is how the CLI presents the issues.
Let me provide an example or given example:
context: '>> 1| {{invalid..syntax}}\n ^',
the client will have the exact place where the issue is if it is render/split by a new line
>> 1| {{invalid..syntax}}
^
this is an indication that Liquid JS sees an error
https://linear.app/novu/issue/NV-4938/calculate-payload-schema-for-the-dashboard-preview-and-trigger-pages
Screenshots
Expand for optional sections
Related enterprise PR
Special notes for your reviewer