feat: Add procedure and function management in flow controller

- Introduced new endpoints in FlowController for listing procedures and retrieving procedure parameters, enhancing the flow management capabilities.
- Updated FlowDataMoveService to support procedure calls during data movement, ensuring seamless integration with external and internal databases.
- Enhanced NodeFlowExecutionService to execute procedure call actions, allowing for dynamic execution of stored procedures within flow nodes.
- Updated frontend components to support procedure selection and parameter management, improving user experience in configuring flow steps.
- Added necessary types and API functions for handling procedure-related data, ensuring type safety and clarity in implementation.
This commit is contained in:
kjs
2026-03-03 14:33:17 +09:00
parent fd5c61b12a
commit f697e1e897
21 changed files with 2303 additions and 41 deletions

View File

@@ -561,3 +561,61 @@ export async function updateFlowStepData(
};
}
}
// ============================================
// 프로시저/함수 API
// ============================================
import type { ProcedureListItem, ProcedureParameterInfo } from "@/types/flowExternalDb";
/**
* 프로시저/함수 목록 조회
*/
export async function getFlowProcedures(
dbSource: "internal" | "external",
connectionId?: number,
schema?: string,
): Promise<ApiResponse<ProcedureListItem[]>> {
try {
const params = new URLSearchParams({ dbSource });
if (connectionId) params.set("connectionId", String(connectionId));
if (schema) params.set("schema", schema);
const response = await fetch(`${API_BASE}/flow/procedures?${params.toString()}`, {
headers: getAuthHeaders(),
credentials: "include",
});
return await response.json();
} catch (error: any) {
return { success: false, error: error.message };
}
}
/**
* 프로시저/함수 파라미터 조회
*/
export async function getFlowProcedureParameters(
name: string,
dbSource: "internal" | "external",
connectionId?: number,
schema?: string,
): Promise<ApiResponse<ProcedureParameterInfo[]>> {
try {
const params = new URLSearchParams({ dbSource });
if (connectionId) params.set("connectionId", String(connectionId));
if (schema) params.set("schema", schema);
const response = await fetch(
`${API_BASE}/flow/procedures/${encodeURIComponent(name)}/parameters?${params.toString()}`,
{
headers: getAuthHeaders(),
credentials: "include",
},
);
return await response.json();
} catch (error: any) {
return { success: false, error: error.message };
}
}