File size: 531 Bytes
fcacf10 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 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}`);
}
|