feat: Add product export endpoint and a dummy workflow (#8178)
This commit is contained in:
1 parent
1a472733ae
commit
8d083d6d0f
11 files changed
+469
-457
No files matched your search
@@ -0,0 +1,18 @@
|
||||
import { WorkflowData, createWorkflow } from "@medusajs/workflows-sdk"
|
||||
import { useRemoteQueryStep } from "../../common"
|
||||
import { WorkflowTypes } from "@medusajs/types"
|
||||
|
||||
export const exportProductsWorkflowId = "export-products"
|
||||
export const exportProductsWorkflow = createWorkflow(
|
||||
exportProductsWorkflowId,
|
||||
(
|
||||
input: WorkflowData<WorkflowTypes.ProductWorkflow.ExportProductsDTO>
|
||||
): WorkflowData<void> => {
|
||||
const products = useRemoteQueryStep({
|
||||
entry_point: "product",
|
||||
fields: input.select,
|
||||
variables: input.filter,
|
||||
list: true,
|
||||
})
|
||||
}
|
||||
)
|
||||
@@ -20,3 +20,4 @@ export * from "./update-product-types"
|
||||
export * from "./update-product-tags"
|
||||
export * from "./update-product-variants"
|
||||
export * from "./update-products"
|
||||
export * from "./export-products"
|
||||
Reference in new issue
Block a user