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:
+6
-4
@@ -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,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user