docs: added workflow hooks docs + changed workflow response (#8364)

* docs: added workflow hooks docs + changed workflow response

* Update page.mdx
This commit is contained in:
Shahed Nasser
2024-07-31 17:01:33 +03:00
committed by GitHub
parent 27837b8833
commit 6f973d9f2b
29 changed files with 321 additions and 167 deletions
@@ -54,10 +54,11 @@ const step2 = createStep(
2. Use the steps in a workflow. For example:
```ts title="src/workflows/hello-world.ts" collapsibleLines="1-7" expandButtonLabel="Show Imports"
```ts title="src/workflows/hello-world.ts" collapsibleLines="1-8" expandButtonLabel="Show Imports"
import {
// other imports...
createWorkflow,
WorkflowResponse,
} from "@medusajs/workflows-sdk"
// ...
@@ -68,9 +69,9 @@ const myWorkflow = createWorkflow(
const str1 = step1()
step2()
return {
return new WorkflowResponse({
message: str1,
}
})
})
export default myWorkflow