**What** Update the `MedusaService` class, factory and types to remove the concept of main modules. The idea being that all method will be explicitly named and suffixes to represent the object you are trying to manipulate. This pr also includes various fixes in different modules Co-authored-by: Stevche Radevski <4820812+sradevski@users.noreply.github.com> Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
28 lines
605 B
TypeScript
28 lines
605 B
TypeScript
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 listWorkflowExecutionss(query?: Record<string, any>) {
|
|
return getRequest<WorkflowExecutionListRes>(
|
|
`/admin/workflows-executions`,
|
|
query
|
|
)
|
|
}
|
|
|
|
export const workflowExecutions = {
|
|
retrieve: retrieveWorkflowExecution,
|
|
list: listWorkflowExecutionss,
|
|
}
|