feat(dashboard): Migrate to new hooks and API client (#6963)

This commit is contained in:
Kasper Fabricius Kristensen
2024-04-05 18:27:08 +02:00
committed by GitHub
parent 5ba74ec5fc
commit 8a5c6928f7
195 changed files with 3919 additions and 6028 deletions

View File

@@ -0,0 +1,27 @@
import {
WorkflowExecutionListRes,
WorkflowExecutionRes,
} from "../../types/api-responses"
import { getRequest } from "./common"
async function retrieveWorkflowExecution(
id: string,
query?: Record<string, any>
) {
return getRequest<WorkflowExecutionRes>(
`/admin/workflows-executions/${id}`,
query
)
}
async function listWorkflowExecutions(query?: Record<string, any>) {
return getRequest<WorkflowExecutionListRes>(
`/admin/workflows-executions`,
query
)
}
export const workflowExecutions = {
retrieve: retrieveWorkflowExecution,
list: listWorkflowExecutions,
}