DocWeave / frontend /src /api /workflows.js
shak3008's picture
feat: complete end-to-end platform with all standout behaviors
fcacf10
Raw
History Blame Contribute Delete
531 Bytes
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}`);
}