690503:0135 Update workflow #01
This commit is contained in:
@@ -178,6 +178,23 @@ export const workflowEngineService = {
|
||||
return response.data?.data || response.data;
|
||||
},
|
||||
|
||||
/**
|
||||
* FR-025: ตรวจสอบ DSL โดยไม่บันทึก
|
||||
* POST /workflow-engine/definitions/validate
|
||||
*/
|
||||
validateDsl: async (
|
||||
dsl: Record<string, unknown>
|
||||
): Promise<
|
||||
| { valid: true }
|
||||
| { valid: false; errors: { path: string; message: string }[] }
|
||||
> => {
|
||||
const response = await apiClient.post(
|
||||
'/workflow-engine/definitions/validate',
|
||||
{ dsl }
|
||||
);
|
||||
return (response.data as { data?: unknown })?.data ?? response.data;
|
||||
},
|
||||
|
||||
/**
|
||||
* ลบ Workflow Definition
|
||||
* DELETE /workflow-engine/definitions/:id
|
||||
|
||||
Reference in New Issue
Block a user