docs-util: fix parsing when function if it has three parameters (#10878)

* docs-util: fix parsing when step when it has three parameters

* fix condition
This commit is contained in:
Shahed Nasser authored and GitHub committed 2025-01-08 16:48:20 +02:00
1 parent a0e944a7a8
commit 46f987e351
6 files changed
+106960 -106544

No files matched your search

+2 -2
View File
@@ -251,7 +251,7 @@ export const generatedEditDates = {
"references/auth/IAuthModuleService/methods/auth.IAuthModuleService.listAuthIdentities/page.mdx": "2024-12-09T13:21:36.253Z",
"references/auth/interfaces/auth.FilterableAuthIdentityProps/page.mdx": "2024-12-23T13:57:04.094Z",
"references/auth/interfaces/auth.IAuthModuleService/page.mdx": "2024-11-25T17:49:28.823Z",
"references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.completeCartWorkflow/page.mdx": "2024-12-25T08:43:13.426Z",
"references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.completeCartWorkflow/page.mdx": "2025-01-08T14:15:11.676Z",
"references/core_flows/Cart/core_flows.Cart.Workflows_Cart/page.mdx": "2024-12-23T12:30:23.632Z",
"references/core_flows/Common/Steps_Common/functions/core_flows.Common.Steps_Common.createRemoteLinkStep/page.mdx": "2025-01-07T12:54:14.097Z",
"references/core_flows/Common/Steps_Common/functions/core_flows.Common.Steps_Common.dismissRemoteLinkStep/page.mdx": "2025-01-07T12:54:14.100Z",
@@ -658,7 +658,7 @@ export const generatedEditDates = {
"references/types/types/types.UpdatePromotionRulesWorkflowDTO/page.mdx": "2024-12-09T13:21:35.497Z",
"references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.setTaxLinesForItemsStep/page.mdx": "2024-12-25T08:43:13.394Z",
"references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.updateCartsStep/page.mdx": "2024-12-25T08:43:13.401Z",
"references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.validateCartPaymentsStep/page.mdx": "2024-12-10T14:54:58.011Z",
"references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.validateCartPaymentsStep/page.mdx": "2025-01-08T14:15:11.661Z",
"references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.addToCartWorkflow/page.mdx": "2024-12-25T08:43:13.424Z",
"references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.confirmVariantInventoryWorkflow/page.mdx": "2024-12-25T08:43:13.429Z",
"references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.createCartWorkflow/page.mdx": "2025-01-07T12:54:14.019Z",
@@ -1,6 +1,8 @@
---
slug: /references/medusa-workflows/steps/validateCartPaymentsStep
sidebar_label: validateCartPaymentsStep
tags:
- step
---
import { TypeList, WorkflowDiagram } from "docs-ui"
@@ -3,6 +3,15 @@ slug: /references/medusa-workflows/completeCartWorkflow
sidebar_label: completeCartWorkflow
tags:
- query
- remote query
- logger
- payment
- order
- link
- cart
- inventory
- locking
- event bus
- workflow
---
@@ -16,7 +25,7 @@ This workflow completes a cart.
## Steps
<WorkflowDiagram workflow={{"name":"completeCartWorkflow","steps":[{"type":"step","name":"useQueryGraphStep","description":"This step fetches data across modules using the Query.\n\nLearn more in the [Query documentation](https://docs.medusajs.com/learn/fundamentals/module-links/query).\n\n","link":"../../../../Common/Steps_Common/functions/core_flows.Common.Steps_Common.useQueryGraphStep/page.mdx","depth":1}]}} />
<WorkflowDiagram workflow={{"name":"completeCartWorkflow","steps":[{"type":"step","name":"useQueryGraphStep","description":"This step fetches data across modules using the Query.\n\nLearn more in the [Query documentation](https://docs.medusajs.com/learn/fundamentals/module-links/query).\n\n","link":"../../../../Common/Steps_Common/functions/core_flows.Common.Steps_Common.useQueryGraphStep/page.mdx","depth":1},{"type":"when","condition":"{\n return !orderId\n }","depth":"2","steps":[{"type":"step","name":"useRemoteQueryStep","description":"This step fetches data across modules using the remote query.\n\nLearn more in the [Remote Query documentation](https://docs.medusajs.com/learn/fundamentals/module-links/query).\n\n:::note\n\nThis step is deprecated. Use [useQueryGraphStep](../../../../Common/Steps_Common/functions/core_flows.Common.Steps_Common.useQueryGraphStep/page.mdx) instead.\n\n:::\n\n","link":"../../../../Common/Steps_Common/functions/core_flows.Common.Steps_Common.useRemoteQueryStep/page.mdx","depth":2},{"type":"step","name":"validateCartPaymentsStep","description":"This step validates a cart's payment sessions. Their status must\nbe `pending` or `requires_more`.\n\n","link":"../../../Steps_Cart/functions/core_flows.Cart.Steps_Cart.validateCartPaymentsStep/page.mdx","depth":2},{"type":"step","name":"authorizePaymentSessionStep","description":"This step authorizes a payment session.\n\n","link":"../../../../Payment/Steps_Payment/functions/core_flows.Payment.Steps_Payment.authorizePaymentSessionStep/page.mdx","depth":2},{"type":"step","name":"createOrdersStep","description":"This step creates one or more orders.\n\n","link":"../../../../Order/Steps_Order/functions/core_flows.Order.Steps_Order.createOrdersStep/page.mdx","depth":2},{"type":"step","name":"createRemoteLinkStep","description":"This step creates remote links between two records of linked data models.\n\nLearn more in the [Remote Link documentation.](https://docs.medusajs.com/learn/fundamentals/module-links/remote-link#create-link).\n\n","link":"../../../../Common/Steps_Common/functions/core_flows.Common.Steps_Common.createRemoteLinkStep/page.mdx","depth":2},{"type":"step","name":"updateCartsStep","description":"This step updates a cart.\n\n","link":"../../../Steps_Cart/functions/core_flows.Cart.Steps_Cart.updateCartsStep/page.mdx","depth":2},{"type":"step","name":"reserveInventoryStep","description":"This step reserves the quantity of line items from the associated\nvariant's inventory.\n\n","link":"../../../Steps_Cart/functions/core_flows.Cart.Steps_Cart.reserveInventoryStep/page.mdx","depth":2},{"type":"step","name":"emitEventStep","description":"Emit an event.\n\n","link":"../../../../Common/Steps_Common/functions/core_flows.Common.Steps_Common.emitEventStep/page.mdx","depth":2}]}]}} />
## Input