-
Notifications
You must be signed in to change notification settings - Fork 4k
fix(api-service): move workflow dto from shared to api #8009
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
base: next
Are you sure you want to change the base?
Conversation
commit: |
227fbd3
to
19f82c4
Compare
4ce2174
to
3080a38
Compare
👷 Deploy Preview for dashboard-v2-novu-staging processing.
|
3080a38
to
1b85ee4
Compare
1b85ee4
to
345883d
Compare
308b23b
to
3531159
Compare
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.
This is an initial high level review. We are in the right direction and I am noting down the next actions in order to wrap this effort up:
- We need to do another pass around the Preference and Workflow V2 DTOs. There still a lot of duplication between these DTOs for request and responses.
- We need to solve the dual export issue for the internal SDK generated by speakeasy.
apps/api/src/app/bridge/usecases/preview-step/preview-step.usecase.ts
Outdated
Show resolved
Hide resolved
@@ -54,7 +54,7 @@ export class ConstructFrameworkWorkflow { | |||
dbWorkflow.triggers[0].identifier, | |||
async ({ step, payload, subscriber }) => { | |||
const fullPayloadForRender: FullPayloadForRender = { payload, subscriber, steps: {} }; | |||
for await (const staticStep of dbWorkflow.steps) { | |||
for (const staticStep of dbWorkflow.steps) { |
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.
@tatarco, why did we remove the await here? The dynamic workflow generation should be an async iterator.
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.
it doesn't make any sense, it's an object not a promise, why async iterator?
@@ -82,3 +118,32 @@ export async function expectSdkValidationExceptionGeneric<U>( | |||
return { error: handleValidationErrorDto(e) }; | |||
} | |||
} | |||
export class CustomHeaderHTTPClient extends HTTPClient { |
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 really need to extend the Speakeasy client at this point? Doesn't it allow us to override its headers on the spot?
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.
it allows us to do it only at the calls signature, I want to have it injected in all calls done with the instance, hence the requirement for this change.
@@ -0,0 +1,22 @@ | |||
import { ApiProperty } from '@nestjs/swagger'; | |||
|
|||
export class SubscriberPreferenceTemplateResponseDto { |
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.
Template is the internal modelling of workflows. Some preference DTOs use the term workflow, others the term template. We should stick to workflow.
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.
I really don't want to make any additional changes besides whats a must in this huge PR, the purpose here is to document the existing state, lets move this to a seperate task
54d62b9
to
6bafc02
Compare
fixed wierd msg test fix test rebase fixes fixed wierd msg test remove bail fix excpetion mapper topics fixed. topics fixed. Revert "test skips" This reverts commit f9d2c46. test skips fix failing test on usage reports fix failing test on usage reports fix failing test on usage reports Refactor WorkflowController to use internal SDK
7585932
to
f999fc0
Compare
Resolve Workflow DTO Issues
What changed? Why was the change needed?
DTO Migration and Enhancements
unknown
had to be added in the framework to minimize scope.Screenshots
Expand for optional sections
Related enterprise PR
Special notes for your reviewer