Rework types for logic function (#18074)

## Summary

- **Consolidate logic function services**: Remove
`LogicFunctionMetadataService` and consolidate all logic function CRUD
operations into `LogicFunctionFromSourceService`, with a new
`LogicFunctionFromSourceHelperService` for shared validation/migration
logic
- **Introduce typed conversion utils following the skill pattern**: Add
`fromCreateLogicFunctionFromSourceInputToUniversalFlatLogicFunctionToCreate`
and `fromUpdateLogicFunctionFromSourceInputToFlatLogicFunctionToUpdate`
that convert DTO inputs directly to flat entities
(`UniversalFlatLogicFunction` / `FlatLogicFunction`), replacing the
previous intermediate `UpdateLogicFunctionMetadataParams` indirection
- **Simplify `CodeStepBuildService`**: Remove ~100 lines of manual
duplication logic by delegating to
`LogicFunctionFromSourceService.duplicateOneWithSource`
- **Remove completed 1-17 migration**: Delete
`MigrateWorkflowCodeStepsCommand` and associated utils that migrated
workflow code steps from serverless functions to logic functions
This commit is contained in:
Charles Bochet
2026-02-19 17:25:08 +01:00
committed by GitHub
parent 0e25aeb5be
commit 10bd005021
22 changed files with 654 additions and 1343 deletions
@@ -50,10 +50,12 @@ To find the logicFunctionId, look at the code step's settings.input.logicFunctio
const { logicFunctionId, code } = parameters;
const { workspaceId } = context;
await deps.logicFunctionFromSourceService.updateOne({
id: logicFunctionId,
update: {
sourceHandlerCode: code,
await deps.logicFunctionFromSourceService.updateOneFromSource({
updateLogicFunctionFromSourceInput: {
id: logicFunctionId,
update: {
sourceHandlerCode: code,
},
},
workspaceId,
});