chore: Workflow execution JS-SDK (#8851)
This commit is contained in:
@@ -2,7 +2,6 @@ import Medusa from "@medusajs/js-sdk"
|
||||
import { campaigns } from "./campaigns"
|
||||
import { categories } from "./categories"
|
||||
import { promotions } from "./promotions"
|
||||
import { workflowExecutions } from "./workflow-executions"
|
||||
|
||||
export const backendUrl = __BACKEND_URL__ ?? "http://localhost:9000"
|
||||
|
||||
@@ -10,7 +9,6 @@ export const client = {
|
||||
campaigns: campaigns,
|
||||
categories: categories,
|
||||
promotions: promotions,
|
||||
workflowExecutions: workflowExecutions,
|
||||
}
|
||||
|
||||
export const sdk = new Medusa({
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
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,
|
||||
}
|
||||
Reference in New Issue
Block a user