import { apiRequest } from "./client"; export async function getWorkflow(workflowId) { return apiRequest(`/workflows/${workflowId}`); } export async function listWorkflows(workspaceId, status = null) { let url = `/workflows?workspace_id=${encodeURIComponent(workspaceId)}`; if (status) url += `&status=${encodeURIComponent(status)}`; return apiRequest(url); } export async function getWorkflowByDocumentVersion(documentVersionId) { return apiRequest(`/workflows/by-document-version/${documentVersionId}`); }