feat: Extend step serializers to include execution steps
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import executionStepSerializer from './execution-step.js';
|
||||
|
||||
const stepSerializer = (step) => {
|
||||
return {
|
||||
let stepData = {
|
||||
id: step.id,
|
||||
type: step.type,
|
||||
key: step.key,
|
||||
@@ -10,6 +12,14 @@ const stepSerializer = (step) => {
|
||||
position: step.position,
|
||||
parameters: step.parameters,
|
||||
};
|
||||
|
||||
if (step.executionSteps?.length > 0) {
|
||||
stepData.executionSteps = step.executionSteps.map((executionStep) =>
|
||||
executionStepSerializer(executionStep)
|
||||
);
|
||||
}
|
||||
|
||||
return stepData;
|
||||
};
|
||||
|
||||
export default stepSerializer;
|
||||
|
Reference in New Issue
Block a user