-
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 trigger capability to defined workflows #5877
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-design failed. Why did it fail? →
|
|
||
const cancel = async () => { | ||
return apiClient.delete<CancelEventTriggerResponse>(`/events/trigger/${result.transactionId}`); | ||
}; |
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.
Adding cancel for a complete E2E story on the trigger
.
I'm thinking I'll replace all the api HTTP client with Where should the instantiated |
See #5880 |
* fix(web): local to dev sync modal improvement (#5912) * fix: wip * fix: update copy * fix: remove not reccomended * feat: manual sync * fix(api): Nv 4021 syncing to production environment fails for new org (#5916) * fix(web): set cookie as secure * fix(web): set cookie as secure * fix(api): create notification group for both envs * refactor(root): Rename from `web.novu.co` to `dashboard.novu.co` (#5876) * refactor(env): update URLs to use dashboard subdomain * chore(netlify): reorder redirects in netlify.toml * refactor(onboarding): remove unused imports * fix(novu): Apply the correct authorization type * feat(framework): Add trigger capability to defined workflows (#5877) * test(env.utils): add tests for env utility functions * refactor(client): Update workflow and error handling * docs(env.utils): Add comments for getBridgeUrl environments * refactor: Remove generic type from Workflow definition * test(env.utils): update bridge URL in development env * fix(env.utils): correct URL construction in dev environment * test(workflow): add payload schema to test workflow * refactor(types): define specific types for event params * refactor(event.types): update import to use type keyword * refactor(types): update Workflow and EventTriggerParams * refactor: rename novu sh tunnel domain * fix(api): Ensure both web and dashboard subdomains work in parallel (#5919) * fix(api): Ensure both web and dashboard subdomains work in parallel This is required for a smooth migration process and to avoid signing out existing users. * fixup! fix(api): Ensure both web and dashboard subdomains work in parallel * fixup! fixup! fix(api): Ensure both web and dashboard subdomains work in parallel * fixup! fixup! fixup! fix(api): Ensure both web and dashboard subdomains work in parallel * fix(worker): store null in cache after stateless trigger (#5922) * ci: Remove redundant checkout step in deploy job (#5924) * refactor(cli): update tunnel URL and submodule commit (#5920) * feat: add tracking event for sync button clicked (#5925) * chore(root): Update .source --------- Co-authored-by: Dima Grossman <dima@grossman.io> Co-authored-by: Gali Ainouz Baum <ainouzgali@gmail.com> Co-authored-by: Richard Fontein <32132657+rifont@users.noreply.github.com> Co-authored-by: Sokratis Vidros <sokratis.vidros@gmail.com> Co-authored-by: Sokratis Vidros <SokratisVidros@users.noreply.github.com> Co-authored-by: George Djabarov <39195835+djabarovgeorge@users.noreply.github.com> Co-authored-by: David Söderberg <2233092+davidsoderberg@users.noreply.github.com>
What changed? Why was the change needed?
workflow.trigger(...)
capability for triggering defined workflows(await workflow.trigger(...)).cancel()
capability for cancelling trigger of defined workflowsgetBridgeUrl
util to resolve correct bridge URL in framework agnostic wayNB: See this stacked follow up PR (#5880) which replaces use of the internal HTTP client with
@novu/api
bindingsScreenshots
Tested working in the AI Digest Repo
rifont/novu-ai-digest#1
workflow.trigger()
intellisense with strongly typedpayload
(await workflow.trigger()).cancel()
available after using the trigger (no need to passtransactionId
)Expand for optional sections
Related enterprise PR
Special notes for your reviewer