=> {
deleteManagerStep(input)
- const authIdentities = useRemoteQueryStep({
- entry_point: "auth_identity",
+ const { data: authIdentities } = useQueryGraphStep({
+ entity: "auth_identity",
fields: ["id"],
- variables: {
- filters: {
- app_metadata: {
- // the ID is of the format `{actor_type}_id`.
- manager_id: input.id,
- },
- },
- },
+ filters: {
+ app_metadata: {
+ // the ID is of the format `{actor_type}_id`.
+ manager_id: input.id,
+ }
+ }
})
const authIdentity = transform(
diff --git a/www/apps/resources/app/commerce-modules/cart/extend/page.mdx b/www/apps/resources/app/commerce-modules/cart/extend/page.mdx
index 61875693c96ff..9fd7028e23e08 100644
--- a/www/apps/resources/app/commerce-modules/cart/extend/page.mdx
+++ b/www/apps/resources/app/commerce-modules/cart/extend/page.mdx
@@ -492,7 +492,7 @@ Finally, you'll create the workflow. Create the file `src/workflows/update-custo
```ts title="src/workflows/update-custom-from-cart/index.ts" collapsibleLines="1-9" expandButtonLabel="Show Imports"
import { CartDTO } from "@medusajs/framework/types"
import { createWorkflow, when, WorkflowResponse } from "@medusajs/framework/workflows-sdk"
-import { createRemoteLinkStep, dismissRemoteLinkStep, useRemoteQueryStep } from "@medusajs/medusa/core-flows"
+import { createRemoteLinkStep, dismissRemoteLinkStep, useQueryGraphStep } from "@medusajs/medusa/core-flows"
import { createCustomStep } from "../create-custom-from-cart/steps/create-custom"
import { Modules } from "@medusajs/framework/utils"
import { HELLO_MODULE } from "../../modules/hello"
@@ -509,15 +509,12 @@ export type UpdateCustomFromCartStepInput = {
export const updateCustomFromCartWorkflow = createWorkflow(
"update-custom-from-cart",
(input: UpdateCustomFromCartStepInput) => {
- const cartData = useRemoteQueryStep({
- entry_point: "cart",
+ const { data: carts } = useQueryGraphStep({
+ entity: "cart",
fields: ["custom.*"],
- variables: {
- filters: {
- id: input.cart.id,
- },
- },
- list: false,
+ filters: {
+ id: input.cart.id
+ }
})
// TODO create, update, or delete Custom record
@@ -534,9 +531,9 @@ Next, replace the `TODO` with the following:
```ts title="src/workflows/update-custom-from-cart/index.ts"
const created = when({
input,
- cartData,
+ carts,
}, (data) =>
- !data.cartData.custom &&
+ !data.carts[0].custom &&
data.input.additional_data?.custom_name?.length > 0
)
.then(() => {
@@ -568,25 +565,25 @@ Next, replace the new `TODO` with the following:
```ts title="src/workflows/update-custom-from-cart/index.ts"
const deleted = when({
input,
- cartData,
+ carts,
}, (data) =>
- data.cartData.custom && (
+ data.carts[0].custom && (
data.input.additional_data?.custom_name === null ||
data.input.additional_data?.custom_name.length === 0
)
)
.then(() => {
deleteCustomStep({
- custom: cartData.custom,
+ custom: carts[0].custom,
})
dismissRemoteLinkStep({
[HELLO_MODULE]: {
- custom_id: cartData.custom.id,
+ custom_id: carts[0].custom.id,
},
})
- return cartData.custom.id
+ return carts[0].custom.id
})
// TODO delete Custom record
@@ -599,11 +596,11 @@ Finally, replace the new `TODO` with the following:
```ts title="src/workflows/update-custom-from-cart/index.ts"
const updated = when({
input,
- cartData,
-}, (data) => data.cartData.custom && data.input.additional_data?.custom_name?.length > 0)
+ carts,
+}, (data) => data.carts[0].custom && data.input.additional_data?.custom_name?.length > 0)
.then(() => {
const custom = updateCustomStep({
- id: cartData.custom.id,
+ id: carts[0].custom.id,
custom_name: input.additional_data.custom_name,
})
diff --git a/www/apps/resources/app/commerce-modules/customer/extend/page.mdx b/www/apps/resources/app/commerce-modules/customer/extend/page.mdx
index a89437efa78a2..dbcc3b5c09c1c 100644
--- a/www/apps/resources/app/commerce-modules/customer/extend/page.mdx
+++ b/www/apps/resources/app/commerce-modules/customer/extend/page.mdx
@@ -504,7 +504,7 @@ Finally, you'll create the workflow. Create the file `src/workflows/update-custo
```ts title="src/workflows/update-custom-from-customer/index.ts" collapsibleLines="1-9" expandButtonLabel="Show Imports"
import { CustomerDTO } from "@medusajs/framework/types"
import { createWorkflow, when, WorkflowResponse } from "@medusajs/framework/workflows-sdk"
-import { createRemoteLinkStep, dismissRemoteLinkStep, useRemoteQueryStep } from "@medusajs/medusa/core-flows"
+import { createRemoteLinkStep, dismissRemoteLinkStep, useQueryGraphStep } from "@medusajs/medusa/core-flows"
import { createCustomStep } from "../create-custom-from-customer/steps/create-custom"
import { Modules } from "@medusajs/framework/utils"
import { HELLO_MODULE } from "../../modules/hello"
@@ -521,15 +521,12 @@ export type UpdateCustomFromCustomerStepInput = {
export const updateCustomFromCustomerWorkflow = createWorkflow(
"update-custom-from-customer",
(input: UpdateCustomFromCustomerStepInput) => {
- const customerData = useRemoteQueryStep({
- entry_point: "customer",
+ const { data: customers } = useQueryGraphStep({
+ entity: "customer",
fields: ["custom.*"],
- variables: {
- filters: {
- id: input.customer.id,
- },
- },
- list: false,
+ filters: {
+ id: input.customer.id,
+ }
})
// TODO create, update, or delete Custom record
@@ -546,9 +543,9 @@ Next, replace the `TODO` with the following:
```ts title="src/workflows/update-custom-from-customer/index.ts"
const created = when({
input,
- customerData,
+ customers,
}, (data) =>
- !data.customerData.custom &&
+ !data.customers[0].custom &&
data.input.additional_data?.custom_name?.length > 0
)
.then(() => {
@@ -580,25 +577,25 @@ Next, replace the new `TODO` with the following:
```ts title="src/workflows/update-custom-from-customer/index.ts"
const deleted = when({
input,
- customerData,
+ customers,
}, (data) =>
- data.customerData.custom && (
+ data.customers[0].custom && (
data.input.additional_data?.custom_name === null ||
data.input.additional_data?.custom_name.length === 0
)
)
.then(() => {
deleteCustomStep({
- custom: customerData.custom,
+ custom: customers[0].custom,
})
dismissRemoteLinkStep({
[HELLO_MODULE]: {
- custom_id: customerData.custom.id,
+ custom_id: customers[0].custom.id,
},
})
- return customerData.custom.id
+ return customers[0].custom.id
})
// TODO delete Custom record
@@ -611,11 +608,11 @@ Finally, replace the new `TODO` with the following:
```ts title="src/workflows/update-custom-from-customer/index.ts"
const updated = when({
input,
- customerData,
-}, (data) => data.customerData.custom && data.input.additional_data?.custom_name?.length > 0)
+ customers,
+}, (data) => data.customers[0].custom && data.input.additional_data?.custom_name?.length > 0)
.then(() => {
const custom = updateCustomStep({
- id: customerData.custom.id,
+ id: customers[0].custom.id,
custom_name: input.additional_data.custom_name,
})
diff --git a/www/apps/resources/app/commerce-modules/product/extend/page.mdx b/www/apps/resources/app/commerce-modules/product/extend/page.mdx
index 53da450d2fd66..8980bda480ca1 100644
--- a/www/apps/resources/app/commerce-modules/product/extend/page.mdx
+++ b/www/apps/resources/app/commerce-modules/product/extend/page.mdx
@@ -510,7 +510,7 @@ Finally, you'll create the workflow. Create the file `src/workflows/update-custo
```ts title="src/workflows/update-custom-from-product/index.ts" collapsibleLines="1-9" expandButtonLabel="Show Imports"
import { ProductDTO } from "@medusajs/framework/types"
import { createWorkflow, when, WorkflowResponse } from "@medusajs/framework/workflows-sdk"
-import { createRemoteLinkStep, dismissRemoteLinkStep, useRemoteQueryStep } from "@medusajs/medusa/core-flows"
+import { createRemoteLinkStep, dismissRemoteLinkStep, useQueryGraphStep } from "@medusajs/medusa/core-flows"
import { createCustomStep } from "../create-custom-from-cart/steps/create-custom"
import { Modules } from "@medusajs/framework/utils"
import { HELLO_MODULE } from "../../modules/hello"
@@ -527,15 +527,12 @@ export type UpdateCustomFromProductStepInput = {
export const updateCustomFromProductWorkflow = createWorkflow(
"update-custom-from-product",
(input: UpdateCustomFromProductStepInput) => {
- const productData = useRemoteQueryStep({
- entry_point: "product",
+ const { data: products } = useQueryGraphStep({
+ entity: "product",
fields: ["custom.*"],
- variables: {
- filters: {
- id: input.product.id
- }
- },
- list: false
+ filters: {
+ id: input.product.id,
+ }
})
// TODO create, update, or delete Custom record
@@ -552,9 +549,9 @@ Next, replace the `TODO` with the following:
```ts title="src/workflows/update-custom-from-product/index.ts"
const created = when({
input,
- productData
+ products
}, (data) =>
- !data.productData.custom &&
+ !data.products[0].custom &&
data.input.additional_data?.custom_name?.length > 0
)
.then(() => {
@@ -586,25 +583,25 @@ Next, replace the new `TODO` with the following:
```ts title="src/workflows/update-custom-from-product/index.ts"
const deleted = when({
input,
- productData
+ products
}, (data) =>
- data.productData.custom && (
+ data.products[0].custom && (
data.input.additional_data?.custom_name === null ||
data.input.additional_data?.custom_name.length === 0
)
)
.then(() => {
deleteCustomStep({
- custom: productData.custom
+ custom: products[0].custom
})
dismissRemoteLinkStep({
[HELLO_MODULE]: {
- custom_id: productData.custom.id
+ custom_id: products[0].custom.id
}
})
- return productData.custom.id
+ return products[0].custom.id
})
// TODO delete Custom record
@@ -617,11 +614,11 @@ Finally, replace the new `TODO` with the following:
```ts title="src/workflows/update-custom-from-product/index.ts"
const updated = when({
input,
- productData
-}, (data) => data.productData.custom && data.input.additional_data?.custom_name?.length > 0)
+ products
+}, (data) => data.products[0].custom && data.input.additional_data?.custom_name?.length > 0)
.then(() => {
const custom = updateCustomStep({
- id: productData.custom.id,
+ id: products[0].custom.id,
custom_name: input.additional_data.custom_name
})
diff --git a/www/apps/resources/app/commerce-modules/promotion/extend/page.mdx b/www/apps/resources/app/commerce-modules/promotion/extend/page.mdx
index 85a81136e3839..488c9b66913fe 100644
--- a/www/apps/resources/app/commerce-modules/promotion/extend/page.mdx
+++ b/www/apps/resources/app/commerce-modules/promotion/extend/page.mdx
@@ -516,7 +516,7 @@ Finally, you'll create the workflow. Create the file `src/workflows/update-custo
```ts title="src/workflows/update-custom-from-promotion/index.ts" collapsibleLines="1-9" expandButtonLabel="Show Imports"
import { PromotionDTO } from "@medusajs/framework/types"
import { createWorkflow, when, WorkflowResponse } from "@medusajs/framework/workflows-sdk"
-import { createRemoteLinkStep, dismissRemoteLinkStep, useRemoteQueryStep } from "@medusajs/medusa/core-flows"
+import { createRemoteLinkStep, dismissRemoteLinkStep, useQueryGraphStep } from "@medusajs/medusa/core-flows"
import { createCustomStep } from "../create-custom-from-cart/steps/create-custom"
import { Modules } from "@medusajs/framework/utils"
import { HELLO_MODULE } from "../../modules/hello"
@@ -533,15 +533,12 @@ export type UpdateCustomFromPromotionStepInput = {
export const updateCustomFromPromotionWorkflow = createWorkflow(
"update-custom-from-promotion",
(input: UpdateCustomFromPromotionStepInput) => {
- const promotionData = useRemoteQueryStep({
- entry_point: "promotion",
+ const { data: promotions } = useQueryGraphStep({
+ entity: "promotion",
fields: ["custom.*"],
- variables: {
- filters: {
- id: input.promotion.id
- }
- },
- list: false
+ filters: {
+ id: input.promotion.id,
+ }
})
// TODO create, update, or delete Custom record
@@ -558,9 +555,9 @@ Next, replace the `TODO` with the following:
```ts title="src/workflows/update-custom-from-promotion/index.ts"
const created = when({
input,
- promotionData
+ promotions
}, (data) =>
- !data.promotionData.custom &&
+ !data.promotions[0].custom &&
data.input.additional_data?.custom_name?.length > 0
)
.then(() => {
@@ -592,25 +589,25 @@ Next, replace the new `TODO` with the following:
```ts title="src/workflows/update-custom-from-promotion/index.ts"
const deleted = when({
input,
- promotionData
+ promotions
}, (data) =>
- data.promotionData.custom && (
+ data.promotions[0].custom && (
data.input.additional_data?.custom_name === null ||
data.input.additional_data?.custom_name.length === 0
)
)
.then(() => {
deleteCustomStep({
- custom: promotionData.custom
+ custom: promotions[0].custom
})
dismissRemoteLinkStep({
[HELLO_MODULE]: {
- custom_id: promotionData.custom.id
+ custom_id: promotions[0].custom.id
}
})
- return promotionData.custom.id
+ return promotions[0].custom.id
})
// TODO delete Custom record
@@ -623,11 +620,11 @@ Finally, replace the new `TODO` with the following:
```ts title="src/workflows/update-custom-from-promotion/index.ts"
const updated = when({
input,
- promotionData
-}, (data) => data.promotionData.custom && data.input.additional_data?.custom_name?.length > 0)
+ promotions
+}, (data) => data.promotions[0].custom && data.input.additional_data?.custom_name?.length > 0)
.then(() => {
const custom = updateCustomStep({
- id: promotionData.custom.id,
+ id: promotions[0].custom.id,
custom_name: input.additional_data.custom_name
})
diff --git a/www/apps/resources/app/deployment/medusa-application/railway/page.mdx b/www/apps/resources/app/deployment/medusa-application/railway/page.mdx
index 744c29ec8b5e0..b587e81124274 100644
--- a/www/apps/resources/app/deployment/medusa-application/railway/page.mdx
+++ b/www/apps/resources/app/deployment/medusa-application/railway/page.mdx
@@ -2,7 +2,7 @@
sidebar_label: "Railway"
---
-import { Prerequisites, DetailsList } from "docs-ui"
+import { Prerequisites } from "docs-ui"
export const metadata = {
title: `Deploy Medusa Application to Railway`,
@@ -82,6 +82,14 @@ Later, you’ll set different values of the `DISABLE_MEDUSA_ADMIN` environment v
### Configure Redis URL
+The `redisUrl` configuration specifies the connection URL to Redis to store the Medusa server's session.
+
+
+
+Learn more in the [Medusa Configuration documentation](/references/medusa-config#redisurl).
+
+
+
Add the following configuration in `medusa-config.ts` :
```ts title="medusa-config.ts"
diff --git a/www/apps/resources/app/deployment/storefront/vercel/page.mdx b/www/apps/resources/app/deployment/storefront/vercel/page.mdx
index 790310b438532..43304af4f31b0 100644
--- a/www/apps/resources/app/deployment/storefront/vercel/page.mdx
+++ b/www/apps/resources/app/deployment/storefront/vercel/page.mdx
@@ -5,7 +5,7 @@ sidebar_label: "Vercel"
import { Prerequisites } from "docs-ui"
export const metadata = {
- title: `Deploy Medusa Admin to Vercel`,
+ title: `Deploy Medusa Next.js to Vercel`,
}
# {metadata.title}
diff --git a/www/apps/resources/app/medusa-cli/commands/build/page.mdx b/www/apps/resources/app/medusa-cli/commands/build/page.mdx
index 14848f481d551..b82b60ad393e7 100644
--- a/www/apps/resources/app/medusa-cli/commands/build/page.mdx
+++ b/www/apps/resources/app/medusa-cli/commands/build/page.mdx
@@ -66,7 +66,13 @@ cd .medusa/server && npm install
- When running the application locally, make sure to copy the `.env` file from the root project's directory. In production, use system environment variables instead.
```bash npm2yarn
-cp .env .medusa/server
+cp .env .medusa/server/.env.production
+```
+
+- In the system environment variables, set `NODE_ENV` to `production`:
+
+```bash
+NODE_ENV=production
```
- Use the `start` command to run the application:
diff --git a/www/apps/resources/app/recipes/digital-products/examples/standard/page.mdx b/www/apps/resources/app/recipes/digital-products/examples/standard/page.mdx
index 9daf3d52c349a..920809d7587f9 100644
--- a/www/apps/resources/app/recipes/digital-products/examples/standard/page.mdx
+++ b/www/apps/resources/app/recipes/digital-products/examples/standard/page.mdx
@@ -1567,8 +1567,8 @@ To customize the cart completion flow, you’ll create a workflow and then use t
```mermaid
graph TD
- completeCartWorkflow["completeCartWorkflow (Medusa)"] --> useRemoteQueryStep["useRemoteQueryStep (Medusa)"]
- useRemoteQueryStep --> when{order has digital products?}
+ completeCartWorkflow["completeCartWorkflow (Medusa)"] --> useQueryGraphStep["useQueryGraphStep (Medusa)"]
+ useQueryGraphStep --> when{order has digital products?}
when -->|Yes| createDigitalProductOrderStep
createDigitalProductOrderStep --> createRemoteLinkStep["createRemoteLinkStep (Medusa)"]
createRemoteLinkStep --> createOrderFulfillmentWorkflow["createOrderFulfillmentWorkflow (Medusa)"]
@@ -1580,7 +1580,7 @@ graph TD
The workflow has the following steps:
1. `completeCartWorkflow` to create a Medusa order from the cart. Medusa provides this workflow through the `@medusajs/medusa/core-flows` package and you can use it as a step.
-2. `useRemoteQueryStep` to retrieve the order’s items with the digital products associated with the purchased product variants. Medusa provides this step through the `@medusajs/medusa/core-flows` package.
+2. `useQueryGraphStep` to retrieve the order’s items with the digital products associated with the purchased product variants. Medusa provides this step through the `@medusajs/medusa/core-flows` package.
3. If the order has digital products, you:
1. create the digital product order.
2. link the digital product order with the Medusa order. Medusa provides a `createRemoteLinkStep` in the `@medusajs/medusa/core-flows` package that can be used here.
@@ -1665,14 +1665,14 @@ In the compensation function, you delete the digital product order.
Create the file `src/workflows/create-digital-product-order/index.ts` with the following content:
export const createDpoWorkflowHighlights = [
- ["25", "completeCartWorkflow", "Create an order for the cart."],
- ["31", "useRemoteQueryStep", "Retrieve the order's items and their associated variants and linked digital products."],
- ["56", "when", "Check whether the order has any digital products."],
- ["61", "then", "Perform the callback function if an order has digital products."],
- ["64", "createDigitalProductOrderStep", "Create the digital product order."],
- ["66", "createRemoteLinkStep", "Link the digital product order to the Medusa order."],
- ["75", "createOrderFulfillmentWorkflow", "Create a fulfillment for the digital products in the order."],
- ["89", "emitEventStep", "Emit the `digital_product_order.created` event."]
+ ["27", "completeCartWorkflow", "Create an order for the cart."],
+ ["33", "useQueryGraphStep", "Retrieve the order's items and their associated variants and linked digital products."],
+ ["57", "when", "Check whether the order has any digital products."],
+ ["60", "then", "Perform the callback function if an order has digital products."],
+ ["63", "createDigitalProductOrderStep", "Create the digital product order."],
+ ["67", "createRemoteLinkStep", "Link the digital product order to the Medusa order."],
+ ["76", "createOrderFulfillmentWorkflow", "Create a fulfillment for the digital products in the order."],
+ ["90", "emitEventStep", "Emit the `digital_product_order.created` event."]
]
```ts title="src/workflows/create-digital-product-order/index.ts" highlights={createDpoWorkflowHighlights} collapsibleLines="1-17" expandMoreLabel="Show Imports"
@@ -1680,16 +1680,18 @@ import {
createWorkflow,
transform,
when,
- WorkflowResponse,
+ WorkflowResponse
} from "@medusajs/framework/workflows-sdk"
import {
completeCartWorkflow,
- useRemoteQueryStep,
+ useQueryGraphStep,
createRemoteLinkStep,
createOrderFulfillmentWorkflow,
- emitEventStep,
+ emitEventStep
} from "@medusajs/medusa/core-flows"
-import { Modules } from "@medusajs/framework/utils"
+import {
+ Modules
+} from "@medusajs/framework/utils"
import createDigitalProductOrderStep from "./steps/create-digital-product-order"
import { DIGITAL_PRODUCT_MODULE } from "../../modules/digital-product"
@@ -1700,35 +1702,34 @@ type WorkflowInput = {
const createDigitalProductOrderWorkflow = createWorkflow(
"create-digital-product-order",
(input: WorkflowInput) => {
- const order = completeCartWorkflow.runAsStep({
+ const { id } = completeCartWorkflow.runAsStep({
input: {
- id: input.cart_id,
- },
+ id: input.cart_id
+ }
})
- const { items } = useRemoteQueryStep({
- entry_point: "order",
+ const { data: orders } = useQueryGraphStep({
+ entity: "order",
fields: [
"*",
"items.*",
"items.variant.*",
- "items.variant.digital_product.*",
+ "items.variant.digital_product.*"
],
- variables: {
- filters: {
- id: order.id,
- },
+ filters: {
+ id
},
- throw_if_key_not_found: true,
- list: false,
+ options: {
+ throwIfKeyNotFound: true
+ }
})
const itemsWithDigitalProducts = transform({
- items,
+ orders
},
(data) => {
- return data.items.filter((item) => item.variant.digital_product !== undefined)
- }
+ return data.orders[0].items.filter((item) => item.variant.digital_product !== undefined)
+ }
)
const digital_product_order = when(itemsWithDigitalProducts, (itemsWithDigitalProducts) => {
@@ -1737,44 +1738,46 @@ const createDigitalProductOrderWorkflow = createWorkflow(
.then(() => {
const {
digital_product_order,
- } = createDigitalProductOrderStep({ items })
+ } = createDigitalProductOrderStep({
+ items: orders[0].items
+ })
createRemoteLinkStep([{
[DIGITAL_PRODUCT_MODULE]: {
- digital_product_order_id: digital_product_order.id,
+ digital_product_order_id: digital_product_order.id
},
[Modules.ORDER]: {
- order_id: order.id,
- },
+ order_id: id
+ }
}])
createOrderFulfillmentWorkflow.runAsStep({
input: {
- order_id: order.id,
+ order_id: id,
items: transform({
- itemsWithDigitalProducts,
+ itemsWithDigitalProducts
}, (data) => {
return data.itemsWithDigitalProducts.map((item) => ({
id: item.id,
- quantity: item.quantity,
+ quantity: item.quantity
}))
- }),
- },
+ })
+ }
})
emitEventStep({
eventName: "digital_product_order.created",
data: {
- id: digital_product_order.id,
- },
+ id: digital_product_order.id
+ }
})
return digital_product_order
})
return new WorkflowResponse({
- order,
- digital_product_order,
+ order: orders[0],
+ digital_product_order
})
}
)
@@ -1785,7 +1788,7 @@ export default createDigitalProductOrderWorkflow
This creates the workflow `createDigitalProductOrderWorkflow`. It runs the following steps:
1. `completeCartWorkflow` as a step to create the Medusa order.
-2. `useRemoteQueryStep` to retrieve the order’s items with their associated variants and linked digital products.
+2. `useQueryGraphStep` to retrieve the order’s items with their associated variants and linked digital products.
3. Use `when` to check whether the order has digital products. If so:
1. Use the `createDigitalProductOrderStep` to create the digital product order.
2. Use the `createRemoteLinkStep` to link the digital product order to the Medusa order.
@@ -1842,7 +1845,7 @@ In this step, you'll create a workflow that fulfills a digital order by sending
The workflow has the following steps:
-1. Retrieve the digital product order's details. For this, you'll use the `useRemoteQueryStep` imported from `@medusajs/medusa/core-flows`.
+1. Retrieve the digital product order's details. For this, you'll use the `useQueryGraphStep` imported from `@medusajs/medusa/core-flows`.
2. Send a notification to the customer with the digital products to download.
So, you only need to implement the second step.
@@ -1959,17 +1962,17 @@ You use the `createNotifications` method of the Notification Module's main servi
Create the workflow in the file `src/workflows/fulfill-digital-order/index.ts`:
export const fulfillWorkflowHighlights = [
- ["17", "useRemoteQueryStep", "Retrieve the digital product order's details."],
+ ["17", "useQueryGraphStep", "Retrieve the digital product order's details."],
["33", "sendDigitalOrderNotificationStep", "Send a notification to the customer."]
]
```ts title="src/workflows/fulfill-digital-order/index.ts" highlights={fulfillWorkflowHighlights} collapsibleLines="1-10" expandMoreLabel="Show Imports"
import {
createWorkflow,
- WorkflowResponse,
+ WorkflowResponse
} from "@medusajs/framework/workflows-sdk"
import {
- useRemoteQueryStep,
+ useQueryGraphStep,
} from "@medusajs/medusa/core-flows"
import { sendDigitalOrderNotificationStep } from "./steps/send-digital-order-notification"
@@ -1980,29 +1983,28 @@ type FulfillDigitalOrderWorkflowInput = {
export const fulfillDigitalOrderWorkflow = createWorkflow(
"fulfill-digital-order",
({ id }: FulfillDigitalOrderWorkflowInput) => {
- const digitalProductOrder = useRemoteQueryStep({
- entry_point: "digital_product_order",
+ const { data: digitalProductOrders } = useQueryGraphStep({
+ entity: "digital_product_order",
fields: [
"*",
"products.*",
"products.medias.*",
- "order.*",
+ "order.*"
],
- variables: {
- filters: {
- id,
- },
+ filters: {
+ id,
},
- list: false,
- throw_if_key_not_found: true,
+ options: {
+ throwIfKeyNotFound: true
+ }
})
sendDigitalOrderNotificationStep({
- digital_product_order: digitalProductOrder,
+ digital_product_order: digitalProductOrders[0]
})
return new WorkflowResponse(
- digitalProductOrder
+ digitalProductOrders[0]
)
}
)
@@ -2010,7 +2012,7 @@ export const fulfillDigitalOrderWorkflow = createWorkflow(
In the workflow, you:
-1. Retrieve the digital product order's details using the `useRemoteQueryStep` imported from `@medusajs/medusa/core-flows`.
+1. Retrieve the digital product order's details using the `useQueryGraphStep` imported from `@medusajs/medusa/core-flows`.
2. Send a notification to the customer with the digital product download links using the `sendDigitalOrderNotificationStep`.
### Configure Notification Module Provider
diff --git a/www/apps/resources/app/recipes/marketplace/examples/restaurant-delivery/page.mdx b/www/apps/resources/app/recipes/marketplace/examples/restaurant-delivery/page.mdx
index 4964ce3332477..b9c952c4145d3 100644
--- a/www/apps/resources/app/recipes/marketplace/examples/restaurant-delivery/page.mdx
+++ b/www/apps/resources/app/recipes/marketplace/examples/restaurant-delivery/page.mdx
@@ -1119,7 +1119,7 @@ import {
} from "@medusajs/framework/workflows-sdk"
import {
setAuthAppMetadataStep,
- useRemoteQueryStep,
+ useQueryGraphStep,
} from "@medusajs/medusa/core-flows"
import { deleteRestaurantAdminStep } from "../steps/delete-restaurant-admin"
@@ -1144,14 +1144,12 @@ So far, you only use the `deleteRestaurantAdminStep` in the workflow, which dele
Replace the `TODO` with the following:
```ts title="restaurant-marketplace/src/workflows/restaurant/workflows/delete-restaurant-admin.ts"
-const authIdentities = useRemoteQueryStep({
- entry_point: "auth_identity",
+const { data: authIdentities } = useQueryGraphStep({
+ entity: "auth_identity",
fields: ["id"],
- variables: {
- filters: {
- app_metadata: {
- restaurant_id: input.id,
- },
+ filters: {
+ app_metadata: {
+ restaurant_id: input.id,
},
},
})
diff --git a/www/apps/resources/app/recipes/marketplace/examples/vendors/page.mdx b/www/apps/resources/app/recipes/marketplace/examples/vendors/page.mdx
index 748bfc935afa8..26d6b0e158764 100644
--- a/www/apps/resources/app/recipes/marketplace/examples/vendors/page.mdx
+++ b/www/apps/resources/app/recipes/marketplace/examples/vendors/page.mdx
@@ -803,14 +803,14 @@ In this step, you’ll create a workflow that’s executed when the customer pla
```mermaid
graph TD
- retrieveCartStep["Retrieve Cart (useRemoteQueryStep from Medusa)"] --> completeCartWorkflow["completeCartWorkflow (Medusa)"]
+ retrieveCartStep["Retrieve Cart (useQueryGraphStep from Medusa)"] --> completeCartWorkflow["completeCartWorkflow (Medusa)"]
completeCartWorkflow["completeCartWorkflow (Medusa)"] --> groupVendorItemsStep
groupVendorItemsStep --> getOrderDetailWorkflow
getOrderDetailWorkflow --> createVendorOrdersStep
createVendorOrdersStep --> createRemoteLinkStep["Create Links (createRemoteLinkStep from Medusa)"]
```
-1. Retrieve the cart using its ID. Medusa provides a `useRemoteQueryStep` in the `@medusajs/medusa/core-flows` package that you can use.
+1. Retrieve the cart using its ID. Medusa provides a `useQueryGraphStep` in the `@medusajs/medusa/core-flows` package that you can use.
2. Create a parent order for the cart and its items. Medusa also has a `completeCartWorkflow` in the `@medusajs/medusa/core-flows` package that you can use as a step.
3. Group the cart items by their product’s associated vendor.
4. Retrieve the order's details using Medusa's `getOrderDetailWorkflow` exported by the `@medusajs/medusa/core-flows` package.
@@ -1135,25 +1135,24 @@ The compensation function cancels all child orders received from the step. It us
Finally, create the workflow at the file `src/workflows/marketplace/create-vendor-orders/index.ts`:
export const createVendorOrdersWorkflowHighlights = [
- ["21", "useRemoteQueryStep", "Retrieve the cart's details."],
- ["29", "completeCartWorkflow", "Create the parent order from the cart."],
- ["35", "groupVendorItemsStep", "Group the items by their vendor."],
- ["42", "createVendorOrdersStep", "Create child orders for each vendor"],
- ["47", "createRemoteLinkStep", "Create the links returned by the previous step."]
+ ["21", "useQueryGraphStep", "Retrieve the cart's details."],
+ ["30", "completeCartWorkflow", "Create the parent order from the cart."],
+ ["36", "groupVendorItemsStep", "Group the items by their vendor."],
+ ["59", "createVendorOrdersStep", "Create child orders for each vendor"],
+ ["64", "createRemoteLinkStep", "Create the links returned by the previous step."]
]
```ts title="src/workflows/marketplace/create-vendor-orders/index.ts" collapsibleLines="1-13" expandMoreLabel="Show Imports"
import {
createWorkflow,
- WorkflowResponse,
+ WorkflowResponse
} from "@medusajs/framework/workflows-sdk"
import {
- useRemoteQueryStep,
+ useQueryGraphStep,
createRemoteLinkStep,
completeCartWorkflow,
getOrderDetailWorkflow
} from "@medusajs/medusa/core-flows"
-import { CartDTO } from "@medusajs/framework/types"
import groupVendorItemsStep from "./steps/group-vendor-items"
import createVendorOrdersStep from "./steps/create-vendor-orders"
@@ -1164,24 +1163,25 @@ type WorkflowInput = {
const createVendorOrdersWorkflow = createWorkflow(
"create-vendor-order",
(input: WorkflowInput) => {
- const cart = useRemoteQueryStep({
- entry_point: "cart",
- fields: ["items.*"],
- variables: { id: input.cart_id },
- list: false,
- throw_if_key_not_found: true,
- }) as CartDTO
+ const { data: carts } = useQueryGraphStep({
+ entity: "cart",
+ fields: ['items.*'],
+ filters: { id: input.cart_id },
+ options: {
+ throwIfKeyNotFound: true
+ }
+ })
const { id: orderId } = completeCartWorkflow.runAsStep({
input: {
- id: cart.id
+ id: carts[0].id
}
})
const { vendorsItems } = groupVendorItemsStep({
- cart,
+ cart: carts[0].id
})
-
+
const order = getOrderDetailWorkflow.runAsStep({
input: {
order_id: orderId,
@@ -1200,17 +1200,17 @@ const createVendorOrdersWorkflow = createWorkflow(
const {
orders: vendorOrders,
- linkDefs,
+ linkDefs
} = createVendorOrdersStep({
parentOrder: order,
- vendorsItems,
+ vendorsItems
})
createRemoteLinkStep(linkDefs)
return new WorkflowResponse({
parent_order: order,
- vendor_orders: vendorOrders,
+ vendor_orders: vendorOrders
})
}
)
@@ -1220,11 +1220,12 @@ export default createVendorOrdersWorkflow
In the workflow, you run the following steps:
-1. `useRemoteQueryStep` to retrieve the cart's details.
+1. `useQueryGraphStep` to retrieve the cart's details.
2. `completeCartWorkflow` to complete the cart and create a parent order.
3. `groupVendorItemsStep` to group the order's items by their vendor.
-4. `createVendorOrdersStep` to create child orders for each vendor's items.
-5. `createRemoteLinkStep` to create the links returned by the previous step.
+4. `getOrderDetailWorkflow` to retrieve an order's details.
+5. `createVendorOrdersStep` to create child orders for each vendor's items.
+6. `createRemoteLinkStep` to create the links returned by the previous step.
You return the parent and vendor orders.
diff --git a/www/apps/resources/app/recipes/subscriptions/examples/standard/page.mdx b/www/apps/resources/app/recipes/subscriptions/examples/standard/page.mdx
index 84f42e854346b..f3a35c6a9b066 100644
--- a/www/apps/resources/app/recipes/subscriptions/examples/standard/page.mdx
+++ b/www/apps/resources/app/recipes/subscriptions/examples/standard/page.mdx
@@ -592,23 +592,23 @@ Create the file `src/workflows/create-subscription/index.ts` with the following
export const createSubscriptionWorkflowHighlights = [
["26", "completeCartWorkflow", "Complete the cart and create the order."],
- ["32", "useRemoteQueryStep", "Retrieve the order's details."],
- ["44", "createSubscriptionStep", "Create the subscription."],
- ["51", "createRemoteLinkStep", "Create the links returned by the previous step."]
+ ["32", "useQueryGraphStep", "Retrieve the order's details."],
+ ["43", "createSubscriptionStep", "Create the subscription."],
+ ["50", "createRemoteLinkStep", "Create the links returned by the previous step."]
]
```ts title="src/workflows/create-subscription/index.ts" highlights={createSubscriptionWorkflowHighlights} collapsibleLines="1-13" expandMoreLabel="Show Imports"
import {
createWorkflow,
- WorkflowResponse,
+ WorkflowResponse
} from "@medusajs/framework/workflows-sdk"
import {
createRemoteLinkStep,
completeCartWorkflow,
- useRemoteQueryStep
+ useQueryGraphStep
} from "@medusajs/medusa/core-flows"
import {
- SubscriptionInterval,
+ SubscriptionInterval
} from "../../modules/subscription/types"
import createSubscriptionStep from "./steps/create-subscription"
@@ -629,30 +629,29 @@ const createSubscriptionWorkflow = createWorkflow(
}
})
- const order = useRemoteQueryStep({
- entry_point: "order",
+ const { data: orders } = useQueryGraphStep({
+ entity: "order",
fields: ["*", "id", "customer_id"],
- variables: {
- filters: {
- id
- }
+ filters: {
+ id
},
- list: false,
- throw_if_key_not_found: true
+ options: {
+ throwIfKeyNotFound: true
+ }
})
const { subscription, linkDefs } = createSubscriptionStep({
cart_id: input.cart_id,
- order_id: order.id,
- customer_id: order.customer_id,
- subscription_data: input.subscription_data,
+ order_id: orders[0].id,
+ customer_id: orders[0].customer_id,
+ subscription_data: input.subscription_data
})
createRemoteLinkStep(linkDefs)
return new WorkflowResponse({
subscription: subscription,
- order: order,
+ order: orders[0]
})
}
)
@@ -663,7 +662,7 @@ export default createSubscriptionWorkflow
This workflow accepts the cart’s ID, along with the subscription details. It executes the following steps:
1. `completeCartWorkflow` from `@medusajs/medusa/core-flows` that completes a cart and creates an order.
-2. `useRemoteQueryStep` from `@medusajs/medusa/core-flows` to retrieve the order's details.
+2. `useQueryGraphStep` from `@medusajs/medusa/core-flows` to retrieve the order's details.
3. `createSubscriptionStep`, which is the step you created previously.
4. `createRemoteLinkStep` from `@medusajs/medusa/core-flows`, which accepts links to create. These links are in the `linkDefs` array returned by the previous step.
@@ -1478,7 +1477,7 @@ The workflow has eight steps:
```mermaid
graph TD
- useRemoteQueryStep["Retrieve Cart (useRemoteQueryStep by Medusa)"] --> createPaymentCollectionStep["createPaymentCollectionStep (Medusa)"]
+ useQueryGraphStep["Retrieve Cart (useQueryGraphStep by Medusa)"] --> createPaymentCollectionStep["createPaymentCollectionStep (Medusa)"]
createPaymentCollectionStep["createPaymentCollectionStep (Medusa)"] --> createPaymentSessionsWorkflow["createPaymentSessionsWorkflow (Medusa)"]
createPaymentSessionsWorkflow["createPaymentSessionsWorkflow (Medusa)"] --> authorizePaymentSessionStep["authorizePaymentSessionStep (Medusa)"]
authorizePaymentSessionStep["authorizePaymentSessionStep (Medusa)"] --> createSubscriptionOrderStep
@@ -1487,7 +1486,7 @@ graph TD
capturePaymentStep["capturePaymentStep (Medusa)"] --> updateSubscriptionStep
```
-1. Retrieve the subscription’s linked cart. Medusa provides a `useRemoteQueryStep` in the `@medusajs/medusa/core-flows` package that can be used as a step.
+1. Retrieve the subscription’s linked cart. Medusa provides a `useQueryGraphStep` in the `@medusajs/medusa/core-flows` package that can be used as a step.
2. Create a payment collection for the new order. Medusa provides a `createPaymentCollectionsStep` in the `@medusajs/medusa/core-flows` package that you can use.
3. Create payment sessions in the payment collection. Medusa provides a `createPaymentSessionsWorkflow` in the `@medusajs/medusa/core-flows` package that can be used as a step.
4. Authorize the payment session. Medusa also provides the `authorizePaymentSessionStep` in the `@medusajs/medusa/core-flows` package, which can be used.
@@ -1771,38 +1770,30 @@ This updates the subscription’s `last_order_date` and `next_order_date` proper
Finally, create the file `src/workflows/create-subscription-order/index.ts` with the following content:
export const createSubscriptionOrderWorkflowHighlights = [
- ["33", "useRemoteQueryStep", "Retrieve the cart linked to the subscription."],
- ["60", "createPaymentCollectionsStep", "Create a payment collection using the same information in the cart."],
- ["67", "createPaymentSessionsWorkflow", "Create a payment session in the payment collection from the previous step."],
- ["76", "authorizePaymentSessionStep", "Authorize the payment session created from the first step."],
- ["81", "createSubscriptionOrderStep", "Create the new order for the subscription."],
- ["87", "createRemoteLinkStep", "Create links returned by the previous step."],
- ["89", "capturePaymentStep", "Capture the order’s payment."],
- ["94", "updateSubscriptionStep", "Update the subscription’s `last_order_date` and `next_order_date`."]
+ ["25", "useQueryGraphStep", "Retrieve the cart linked to the subscription."],
+ ["49", "createPaymentCollectionsStep", "Create a payment collection using the same information in the cart."],
+ ["56", "createPaymentSessionsWorkflow", "Create a payment session in the payment collection from the previous step."],
+ ["65", "authorizePaymentSessionStep", "Authorize the payment session created from the first step."],
+ ["70", "createSubscriptionOrderStep", "Create the new order for the subscription."],
+ ["76", "createRemoteLinkStep", "Create links returned by the previous step."],
+ ["78", "capturePaymentStep", "Capture the order’s payment."],
+ ["83", "updateSubscriptionStep", "Update the subscription’s `last_order_date` and `next_order_date`."]
]
```ts title="src/workflows/create-subscription-order/index.ts" highlights={createSubscriptionOrderWorkflowHighlights} collapsibleLines="1-25" expandMoreLabel="Show Imports"
+import { createWorkflow, WorkflowResponse } from "@medusajs/framework/workflows-sdk"
import {
- createWorkflow,
- WorkflowResponse,
-} from "@medusajs/framework/workflows-sdk"
-import {
- useRemoteQueryStep,
+ useQueryGraphStep,
createPaymentSessionsWorkflow,
createRemoteLinkStep,
- capturePaymentStep,
+ capturePaymentStep
} from "@medusajs/medusa/core-flows"
import {
- CartWorkflowDTO,
-} from "@medusajs/framework/types"
-import {
- SubscriptionData,
+ SubscriptionData
} from "../../modules/subscription/types"
import {
authorizePaymentSessionStep,
-} from "@medusajs/medusa/core-flows"
-import {
- createPaymentCollectionsStep,
+ createPaymentCollectionsStep
} from "@medusajs/medusa/core-flows"
import createSubscriptionOrderStep from "./steps/create-subscription-order"
import updateSubscriptionStep from "./steps/update-subscription"
@@ -1814,8 +1805,8 @@ type WorkflowInput = {
const createSubscriptionOrderWorkflow = createWorkflow(
"create-subscription-order",
(input: WorkflowInput) => {
- const { cart } = useRemoteQueryStep({
- entry_point: "subscription",
+ const { data: carts } = useQueryGraphStep({
+ entity: "subscription",
fields: [
"*",
"cart.*",
@@ -1828,59 +1819,56 @@ const createSubscriptionOrderWorkflow = createWorkflow(
"cart.shipping_methods.tax_lines.*",
"cart.shipping_methods.adjustments.*",
"cart.payment_collection.*",
- "cart.payment_collection.payment_sessions.*",
+ "cart.payment_collection.payment_sessions.*"
],
- variables: {
- filters: {
- id: [input.subscription.id],
- },
+ filters: {
+ id: [input.subscription.id]
},
- list: false,
- throw_if_key_not_found: true,
- }) as {
- cart: CartWorkflowDTO
- }
+ options: {
+ throwIfKeyNotFound: true
+ }
+ })
const payment_collection = createPaymentCollectionsStep([{
- region_id: cart.region_id,
- currency_code: cart.currency_code,
- amount: cart.payment_collection.amount,
- metadata: cart.payment_collection.metadata,
+ region_id: carts[0].region_id,
+ currency_code: carts[0].currency_code,
+ amount: carts[0].payment_collection.amount,
+ metadata: carts[0].payment_collection.metadata
}])[0]
const paymentSession = createPaymentSessionsWorkflow.runAsStep({
input: {
payment_collection_id: payment_collection.id,
- provider_id: cart.payment_collection.payment_sessions[0].provider_id,
- data: cart.payment_collection.payment_sessions[0].data,
- context: cart.payment_collection.payment_sessions[0].context,
- },
+ provider_id: carts[0].payment_collection.payment_sessions[0].provider_id,
+ data: carts[0].payment_collection.payment_sessions[0].data,
+ context: carts[0].payment_collection.payment_sessions[0].context
+ }
})
const payment = authorizePaymentSessionStep({
id: paymentSession.id,
- context: paymentSession.context,
+ context: paymentSession.context
})
const { order, linkDefs } = createSubscriptionOrderStep({
subscription: input.subscription,
- cart,
- payment_collection,
+ cart: carts[0],
+ payment_collection
})
createRemoteLinkStep(linkDefs)
capturePaymentStep({
payment_id: payment.id,
- amount: payment.amount,
+ amount: payment.amount
})
updateSubscriptionStep({
- subscription_id: input.subscription.id,
+ subscription_id: input.subscription.id
})
return new WorkflowResponse({
- order,
+ order
})
}
)
@@ -1890,7 +1878,7 @@ export default createSubscriptionOrderWorkflow
The workflow runs the following steps:
-1. `useRemoteQueryStep` to retrieve the details of the cart linked to the subscription.
+1. `useQueryGraphStep` to retrieve the details of the cart linked to the subscription.
2. `createPaymentCollectionsStep` to create a payment collection using the same information in the cart.
3. `createPaymentSessionsWorkflow` to create a payment session in the payment collection from the previous step.
4. `authorizePaymentSessionStep` to authorize the payment session created from the first step.
diff --git a/www/apps/resources/generated/edit-dates.mjs b/www/apps/resources/generated/edit-dates.mjs
index 1b90ee3bf3e8e..f87fcc1468389 100644
--- a/www/apps/resources/generated/edit-dates.mjs
+++ b/www/apps/resources/generated/edit-dates.mjs
@@ -117,7 +117,7 @@ export const generatedEditDates = {
"app/contribution-guidelines/docs/page.mdx": "2024-10-16T15:48:04.071Z",
"app/create-medusa-app/page.mdx": "2024-08-05T11:10:55+03:00",
"app/deployment/admin/vercel/page.mdx": "2024-10-16T08:10:29.377Z",
- "app/deployment/medusa-application/railway/page.mdx": "2024-10-22T11:02:09.029Z",
+ "app/deployment/medusa-application/railway/page.mdx": "2024-11-11T11:50:10.517Z",
"app/deployment/storefront/vercel/page.mdx": "2024-07-26T07:21:31+00:00",
"app/deployment/page.mdx": "2024-07-25T09:55:22+03:00",
"app/integrations/page.mdx": "2024-10-15T12:26:39.839Z",
@@ -236,7 +236,7 @@ export const generatedEditDates = {
"app/architectural-modules/cache/create/page.mdx": "2024-10-16T08:51:35.074Z",
"app/admin-widget-injection-zones/page.mdx": "2024-09-30T08:43:53.147Z",
"app/architectural-modules/notification/page.mdx": "2024-10-15T12:51:28.735Z",
- "app/architectural-modules/event/create/page.mdx": "2024-10-16T08:51:41.334Z",
+ "app/architectural-modules/event/create/page.mdx": "2024-11-12T11:54:51.583Z",
"references/core_flows/Order/functions/core_flows.Order.orderEditUpdateItemQuantityValidationStep/page.mdx": "2024-08-20T00:10:58.913Z",
"references/core_flows/Order/functions/core_flows.Order.orderEditUpdateItemQuantityWorkflow/page.mdx": "2024-08-20T00:10:58.949Z",
"references/core_flows/Order/functions/core_flows.Order.updateOrderEditItemQuantityValidationStep/page.mdx": "2024-08-20T00:10:59.121Z",
@@ -447,9 +447,9 @@ export const generatedEditDates = {
"references/fulfillment_models/classes/fulfillment_models.ShippingOptionRule/page.mdx": "2024-10-03T00:12:15.551Z",
"references/fulfillment_models/classes/fulfillment_models.ShippingOptionType/page.mdx": "2024-10-03T00:12:15.557Z",
"references/fulfillment_models/classes/fulfillment_models.ShippingProfile/page.mdx": "2024-10-03T00:12:15.581Z",
- "references/helper_steps/functions/helper_steps.createRemoteLinkStep/page.mdx": "2024-10-03T00:12:16.458Z",
- "references/helper_steps/functions/helper_steps.dismissRemoteLinkStep/page.mdx": "2024-10-03T00:12:16.461Z",
- "references/helper_steps/functions/helper_steps.emitEventStep/page.mdx": "2024-10-03T00:12:16.464Z",
+ "references/helper_steps/functions/helper_steps.createRemoteLinkStep/page.mdx": "2024-11-12T16:19:00.137Z",
+ "references/helper_steps/functions/helper_steps.dismissRemoteLinkStep/page.mdx": "2024-11-12T16:19:00.139Z",
+ "references/helper_steps/functions/helper_steps.emitEventStep/page.mdx": "2024-11-12T16:19:00.140Z",
"references/helper_steps/functions/helper_steps.updateRemoteLinksStep/page.mdx": "2024-10-02T00:12:16.726Z",
"references/helper_steps/types/helper_steps.DismissRemoteLinksStepInput/page.mdx": "2024-08-28T00:11:31.042Z",
"references/medusa_config/interfaces/medusa_config.AdminOptions/page.mdx": "2024-11-06T21:09:09.666Z",
@@ -737,7 +737,7 @@ export const generatedEditDates = {
"references/core_flows/types/core_flows.OrderEditRequestWorkflowInput/page.mdx": "2024-10-23T07:15:51.428Z",
"references/core_flows/types/core_flows.UpdateOrderTaxLinesWorkflowInput/page.mdx": "2024-10-23T07:15:51.436Z",
"references/core_flows/types/core_flows.UpdateTaxLinesWorkflowInput/page.mdx": "2024-11-06T21:09:04.554Z",
- "references/helper_steps/functions/helper_steps.useRemoteQueryStep/page.mdx": "2024-10-03T00:12:16.474Z",
+ "references/helper_steps/functions/helper_steps.useRemoteQueryStep/page.mdx": "2024-11-12T16:19:00.148Z",
"references/modules/types/page.mdx": "2024-11-12T09:36:21.248Z",
"references/order/IOrderModuleService/methods/order.IOrderModuleService.cancelReturn/page.mdx": "2024-11-06T21:09:11.354Z",
"references/order/interfaces/order.CancelOrderClaimDTO/page.mdx": "2024-10-03T00:12:17.706Z",
@@ -1776,7 +1776,7 @@ export const generatedEditDates = {
"references/dml/Property_Types/methods/dml.Property_Types.json/page.mdx": "2024-10-03T00:12:15.464Z",
"references/dml/Property_Types/methods/dml.Property_Types.number/page.mdx": "2024-10-03T00:12:15.459Z",
"references/dml/Property_Types/methods/dml.Property_Types.text/page.mdx": "2024-10-03T00:12:15.457Z",
- "references/helper_steps/functions/helper_steps.removeRemoteLinkStep/page.mdx": "2024-10-03T00:12:16.466Z",
+ "references/helper_steps/functions/helper_steps.removeRemoteLinkStep/page.mdx": "2024-11-12T16:19:00.142Z",
"references/modules/workflows/page.mdx": "2024-09-30T08:43:53.315Z",
"references/search/classes/search.AbstractSearchService/page.mdx": "2024-10-14T09:11:45.913Z",
"references/workflows/StepResponse/methods/workflows.StepResponse.permanentFailure/page.mdx": "2024-10-02T00:12:20.683Z",
@@ -2276,7 +2276,7 @@ export const generatedEditDates = {
"app/commerce-modules/stock-location/links-to-other-modules/page.mdx": "2024-10-15T14:33:11.483Z",
"app/commerce-modules/store/links-to-other-modules/page.mdx": "2024-06-26T07:19:49.931Z",
"app/examples/page.mdx": "2024-10-16T15:47:38.345Z",
- "app/medusa-cli/commands/build/page.mdx": "2024-10-16T08:16:27.618Z",
+ "app/medusa-cli/commands/build/page.mdx": "2024-11-11T11:00:49.665Z",
"app/js-sdk/page.mdx": "2024-10-16T12:12:34.512Z",
"references/js_sdk/admin/Admin/properties/js_sdk.admin.Admin.apiKey/page.mdx": "2024-10-25T15:35:28.397Z",
"references/js_sdk/admin/Admin/properties/js_sdk.admin.Admin.campaign/page.mdx": "2024-10-25T15:35:28.465Z",
@@ -2716,17 +2716,17 @@ export const generatedEditDates = {
"references/js_sdk/auth/Auth/methods/js_sdk.auth.Auth.updateProvider/page.mdx": "2024-10-24T13:48:31.024Z",
"references/js_sdk/auth/classes/js_sdk.auth.Auth/page.mdx": "2024-10-22T15:09:53.780Z",
"references/js_sdk/modules/js_sdk.admin/page.mdx": "2024-10-22T15:09:52.264Z",
- "references/js_sdk/store/Store/properties/js_sdk.store.Store.category/page.mdx": "2024-11-11T10:32:09.787Z",
+ "references/js_sdk/store/Store/properties/js_sdk.store.Store.category/page.mdx": "2024-11-12T16:19:01.705Z",
"references/js_sdk/modules/js_sdk.store/page.mdx": "2024-10-22T15:09:53.787Z",
"references/js_sdk/modules/js_sdk.auth/page.mdx": "2024-10-22T15:09:53.779Z",
- "references/js_sdk/store/Store/properties/js_sdk.store.Store.collection/page.mdx": "2024-10-25T15:35:30.345Z",
- "references/js_sdk/store/Store/properties/js_sdk.store.Store.cart/page.mdx": "2024-11-11T10:32:09.851Z",
- "references/js_sdk/store/Store/properties/js_sdk.store.Store.customer/page.mdx": "2024-11-11T10:32:09.935Z",
- "references/js_sdk/store/Store/properties/js_sdk.store.Store.fulfillment/page.mdx": "2024-10-25T15:35:30.425Z",
- "references/js_sdk/store/Store/properties/js_sdk.store.Store.order/page.mdx": "2024-11-11T10:32:09.891Z",
- "references/js_sdk/store/Store/properties/js_sdk.store.Store.payment/page.mdx": "2024-11-11T10:32:09.875Z",
- "references/js_sdk/store/Store/properties/js_sdk.store.Store.product/page.mdx": "2024-11-11T10:32:09.803Z",
- "references/js_sdk/store/Store/properties/js_sdk.store.Store.region/page.mdx": "2024-11-11T10:32:09.763Z",
+ "references/js_sdk/store/Store/properties/js_sdk.store.Store.collection/page.mdx": "2024-11-12T16:19:01.699Z",
+ "references/js_sdk/store/Store/properties/js_sdk.store.Store.cart/page.mdx": "2024-11-12T16:19:01.735Z",
+ "references/js_sdk/store/Store/properties/js_sdk.store.Store.customer/page.mdx": "2024-11-12T16:19:01.773Z",
+ "references/js_sdk/store/Store/properties/js_sdk.store.Store.fulfillment/page.mdx": "2024-11-12T16:19:01.739Z",
+ "references/js_sdk/store/Store/properties/js_sdk.store.Store.order/page.mdx": "2024-11-12T16:19:01.753Z",
+ "references/js_sdk/store/Store/properties/js_sdk.store.Store.payment/page.mdx": "2024-11-12T16:19:01.748Z",
+ "references/js_sdk/store/Store/properties/js_sdk.store.Store.product/page.mdx": "2024-11-12T16:19:01.712Z",
+ "references/js_sdk/store/Store/properties/js_sdk.store.Store.region/page.mdx": "2024-11-12T16:19:01.693Z",
"references/js_sdk/store/classes/js_sdk.store.Store/page.mdx": "2024-10-22T15:09:53.788Z",
"references/modules/js_sdk/page.mdx": "2024-10-22T15:09:52.263Z",
"references/core_flows/Inventory/Steps_Inventory/functions/core_flows.Inventory.Steps_Inventory.validateInventoryDeleteStep/page.mdx": "2024-10-23T07:15:37.028Z",
diff --git a/www/apps/resources/generated/sidebar.mjs b/www/apps/resources/generated/sidebar.mjs
index 14b1f29357705..39f95c46ad034 100644
--- a/www/apps/resources/generated/sidebar.mjs
+++ b/www/apps/resources/generated/sidebar.mjs
@@ -8616,7 +8616,7 @@ export const generatedSidebar = [
"loaded": true,
"isPathHref": true,
"type": "link",
- "path": "/references/js-sdk/admin/cart",
+ "path": "/references/js-sdk/store/cart",
"title": "cart",
"children": []
},
@@ -8624,7 +8624,7 @@ export const generatedSidebar = [
"loaded": true,
"isPathHref": true,
"type": "link",
- "path": "/references/js-sdk/admin/category",
+ "path": "/references/js-sdk/store/category",
"title": "category",
"children": []
},
@@ -8632,7 +8632,7 @@ export const generatedSidebar = [
"loaded": true,
"isPathHref": true,
"type": "link",
- "path": "/references/js-sdk/admin/collection",
+ "path": "/references/js-sdk/store/collection",
"title": "collection",
"children": []
},
@@ -8640,7 +8640,7 @@ export const generatedSidebar = [
"loaded": true,
"isPathHref": true,
"type": "link",
- "path": "/references/js-sdk/admin/customer",
+ "path": "/references/js-sdk/store/customer",
"title": "customer",
"children": []
},
@@ -8648,7 +8648,7 @@ export const generatedSidebar = [
"loaded": true,
"isPathHref": true,
"type": "link",
- "path": "/references/js-sdk/admin/fulfillment",
+ "path": "/references/js-sdk/store/fulfillment",
"title": "fulfillment",
"children": []
},
@@ -8656,7 +8656,7 @@ export const generatedSidebar = [
"loaded": true,
"isPathHref": true,
"type": "link",
- "path": "/references/js-sdk/admin/order",
+ "path": "/references/js-sdk/store/order",
"title": "order",
"children": []
},
@@ -8664,7 +8664,7 @@ export const generatedSidebar = [
"loaded": true,
"isPathHref": true,
"type": "link",
- "path": "/references/js-sdk/admin/payment",
+ "path": "/references/js-sdk/store/payment",
"title": "payment",
"children": []
},
@@ -8672,7 +8672,7 @@ export const generatedSidebar = [
"loaded": true,
"isPathHref": true,
"type": "link",
- "path": "/references/js-sdk/admin/product",
+ "path": "/references/js-sdk/store/product",
"title": "product",
"children": []
},
@@ -8680,7 +8680,7 @@ export const generatedSidebar = [
"loaded": true,
"isPathHref": true,
"type": "link",
- "path": "/references/js-sdk/admin/region",
+ "path": "/references/js-sdk/store/region",
"title": "region",
"children": []
}
@@ -9066,8 +9066,15 @@ export const generatedSidebar = [
"isPathHref": true,
"type": "category",
"title": "Medusa Application",
- "autogenerate_path": "/deployment/medusa-application",
"children": [
+ {
+ "loaded": true,
+ "isPathHref": true,
+ "type": "link",
+ "path": "https://docs.medusajs.com/learn/deployment/general",
+ "title": "General",
+ "children": []
+ },
{
"loaded": true,
"isPathHref": true,
diff --git a/www/apps/resources/generated/slug-changes.mjs b/www/apps/resources/generated/slug-changes.mjs
index 8bd3e8cd1e77f..8aa276b041602 100644
--- a/www/apps/resources/generated/slug-changes.mjs
+++ b/www/apps/resources/generated/slug-changes.mjs
@@ -4336,47 +4336,47 @@ export const slugChanges = [
},
{
"origSlug": "/references/js_sdk/store/Store/properties/js_sdk.store.Store.cart",
- "newSlug": "/references/js-sdk/admin/cart",
+ "newSlug": "/references/js-sdk/store/cart",
"filePath": "/www/apps/resources/references/js_sdk/store/Store/properties/js_sdk.store.Store.cart/page.mdx"
},
{
"origSlug": "/references/js_sdk/store/Store/properties/js_sdk.store.Store.category",
- "newSlug": "/references/js-sdk/admin/category",
+ "newSlug": "/references/js-sdk/store/category",
"filePath": "/www/apps/resources/references/js_sdk/store/Store/properties/js_sdk.store.Store.category/page.mdx"
},
{
"origSlug": "/references/js_sdk/store/Store/properties/js_sdk.store.Store.collection",
- "newSlug": "/references/js-sdk/admin/collection",
+ "newSlug": "/references/js-sdk/store/collection",
"filePath": "/www/apps/resources/references/js_sdk/store/Store/properties/js_sdk.store.Store.collection/page.mdx"
},
{
"origSlug": "/references/js_sdk/store/Store/properties/js_sdk.store.Store.customer",
- "newSlug": "/references/js-sdk/admin/customer",
+ "newSlug": "/references/js-sdk/store/customer",
"filePath": "/www/apps/resources/references/js_sdk/store/Store/properties/js_sdk.store.Store.customer/page.mdx"
},
{
"origSlug": "/references/js_sdk/store/Store/properties/js_sdk.store.Store.fulfillment",
- "newSlug": "/references/js-sdk/admin/fulfillment",
+ "newSlug": "/references/js-sdk/store/fulfillment",
"filePath": "/www/apps/resources/references/js_sdk/store/Store/properties/js_sdk.store.Store.fulfillment/page.mdx"
},
{
"origSlug": "/references/js_sdk/store/Store/properties/js_sdk.store.Store.order",
- "newSlug": "/references/js-sdk/admin/order",
+ "newSlug": "/references/js-sdk/store/order",
"filePath": "/www/apps/resources/references/js_sdk/store/Store/properties/js_sdk.store.Store.order/page.mdx"
},
{
"origSlug": "/references/js_sdk/store/Store/properties/js_sdk.store.Store.payment",
- "newSlug": "/references/js-sdk/admin/payment",
+ "newSlug": "/references/js-sdk/store/payment",
"filePath": "/www/apps/resources/references/js_sdk/store/Store/properties/js_sdk.store.Store.payment/page.mdx"
},
{
"origSlug": "/references/js_sdk/store/Store/properties/js_sdk.store.Store.product",
- "newSlug": "/references/js-sdk/admin/product",
+ "newSlug": "/references/js-sdk/store/product",
"filePath": "/www/apps/resources/references/js_sdk/store/Store/properties/js_sdk.store.Store.product/page.mdx"
},
{
"origSlug": "/references/js_sdk/store/Store/properties/js_sdk.store.Store.region",
- "newSlug": "/references/js-sdk/admin/region",
+ "newSlug": "/references/js-sdk/store/region",
"filePath": "/www/apps/resources/references/js_sdk/store/Store/properties/js_sdk.store.Store.region/page.mdx"
},
{
diff --git a/www/apps/resources/references/helper_steps/functions/helper_steps.createRemoteLinkStep/page.mdx b/www/apps/resources/references/helper_steps/functions/helper_steps.createRemoteLinkStep/page.mdx
index 465f9c0334f05..5560f0ca1237c 100644
--- a/www/apps/resources/references/helper_steps/functions/helper_steps.createRemoteLinkStep/page.mdx
+++ b/www/apps/resources/references/helper_steps/functions/helper_steps.createRemoteLinkStep/page.mdx
@@ -9,6 +9,10 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `createRemoteLinkStep` step. It belongs to the `@medusajs/medusa/core-flows` package.
+This step creates remote links between two records of linked data models.
+
+Learn more in the [Remote Link documentation.](https://docs.medusajs.com/advanced-development/modules/remote-link#create-link).
+
## Example
```ts
diff --git a/www/apps/resources/references/helper_steps/functions/helper_steps.dismissRemoteLinkStep/page.mdx b/www/apps/resources/references/helper_steps/functions/helper_steps.dismissRemoteLinkStep/page.mdx
index 6203d92aa1dfa..15cd626a6bc15 100644
--- a/www/apps/resources/references/helper_steps/functions/helper_steps.dismissRemoteLinkStep/page.mdx
+++ b/www/apps/resources/references/helper_steps/functions/helper_steps.dismissRemoteLinkStep/page.mdx
@@ -9,6 +9,10 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `dismissRemoteLinkStep` step. It belongs to the `@medusajs/medusa/core-flows` package.
+This step removes remote links between two records of linked data models.
+
+Learn more in the [Remote Link documentation.](https://docs.medusajs.com/advanced-development/modules/remote-link#dismiss-link).
+
## Example
```ts
diff --git a/www/apps/resources/references/helper_steps/functions/helper_steps.emitEventStep/page.mdx b/www/apps/resources/references/helper_steps/functions/helper_steps.emitEventStep/page.mdx
index 9c0b0b6f41387..b775b8710acab 100644
--- a/www/apps/resources/references/helper_steps/functions/helper_steps.emitEventStep/page.mdx
+++ b/www/apps/resources/references/helper_steps/functions/helper_steps.emitEventStep/page.mdx
@@ -9,6 +9,8 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `emitEventStep` step. It belongs to the `@medusajs/medusa/core-flows` package.
+Emit an event.
+
## Example
```ts
diff --git a/www/apps/resources/references/helper_steps/functions/helper_steps.removeRemoteLinkStep/page.mdx b/www/apps/resources/references/helper_steps/functions/helper_steps.removeRemoteLinkStep/page.mdx
index 4d1322ccb6d49..b385a7a745598 100644
--- a/www/apps/resources/references/helper_steps/functions/helper_steps.removeRemoteLinkStep/page.mdx
+++ b/www/apps/resources/references/helper_steps/functions/helper_steps.removeRemoteLinkStep/page.mdx
@@ -9,6 +9,10 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `removeRemoteLinkStep` step. It belongs to the `@medusajs/medusa/core-flows` package.
+This step deletes linked records of a record.
+
+Learn more in the [Remote Link documentation](https://docs.medusajs.com/advanced-development/modules/remote-link#cascade-delete-linked-records)
+
## Example
```ts
diff --git a/www/apps/resources/references/helper_steps/functions/helper_steps.useRemoteQueryStep/page.mdx b/www/apps/resources/references/helper_steps/functions/helper_steps.useRemoteQueryStep/page.mdx
index af4277af7aae0..e540a8fbd0abb 100644
--- a/www/apps/resources/references/helper_steps/functions/helper_steps.useRemoteQueryStep/page.mdx
+++ b/www/apps/resources/references/helper_steps/functions/helper_steps.useRemoteQueryStep/page.mdx
@@ -9,6 +9,10 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `useRemoteQueryStep` step. It belongs to the `@medusajs/medusa/core-flows` package.
+This step fetches data across modules using the remote query.
+
+Learn more in the [Remote Query documentation](https://docs.medusajs.com/advanced-development/modules/remote-query).
+
## Example
To retrieve a list of records of a data model:
diff --git a/www/apps/resources/references/js_sdk/store/Store/properties/js_sdk.store.Store.cart/page.mdx b/www/apps/resources/references/js_sdk/store/Store/properties/js_sdk.store.Store.cart/page.mdx
index 6b29b7b90a750..1880edf2df14f 100644
--- a/www/apps/resources/references/js_sdk/store/Store/properties/js_sdk.store.Store.cart/page.mdx
+++ b/www/apps/resources/references/js_sdk/store/Store/properties/js_sdk.store.Store.cart/page.mdx
@@ -1,5 +1,5 @@
---
-slug: /references/js-sdk/admin/cart
+slug: /references/js-sdk/store/cart
sidebar_label: cart
---
diff --git a/www/apps/resources/references/js_sdk/store/Store/properties/js_sdk.store.Store.category/page.mdx b/www/apps/resources/references/js_sdk/store/Store/properties/js_sdk.store.Store.category/page.mdx
index 6dc2b9c991783..d9352bb8227c4 100644
--- a/www/apps/resources/references/js_sdk/store/Store/properties/js_sdk.store.Store.category/page.mdx
+++ b/www/apps/resources/references/js_sdk/store/Store/properties/js_sdk.store.Store.category/page.mdx
@@ -1,5 +1,5 @@
---
-slug: /references/js-sdk/admin/category
+slug: /references/js-sdk/store/category
sidebar_label: category
---
diff --git a/www/apps/resources/references/js_sdk/store/Store/properties/js_sdk.store.Store.collection/page.mdx b/www/apps/resources/references/js_sdk/store/Store/properties/js_sdk.store.Store.collection/page.mdx
index 0019fcc3a8af4..330404669f22c 100644
--- a/www/apps/resources/references/js_sdk/store/Store/properties/js_sdk.store.Store.collection/page.mdx
+++ b/www/apps/resources/references/js_sdk/store/Store/properties/js_sdk.store.Store.collection/page.mdx
@@ -1,5 +1,5 @@
---
-slug: /references/js-sdk/admin/collection
+slug: /references/js-sdk/store/collection
sidebar_label: collection
---
diff --git a/www/apps/resources/references/js_sdk/store/Store/properties/js_sdk.store.Store.customer/page.mdx b/www/apps/resources/references/js_sdk/store/Store/properties/js_sdk.store.Store.customer/page.mdx
index 1940cc0a0d02f..3f0cceac12413 100644
--- a/www/apps/resources/references/js_sdk/store/Store/properties/js_sdk.store.Store.customer/page.mdx
+++ b/www/apps/resources/references/js_sdk/store/Store/properties/js_sdk.store.Store.customer/page.mdx
@@ -1,5 +1,5 @@
---
-slug: /references/js-sdk/admin/customer
+slug: /references/js-sdk/store/customer
sidebar_label: customer
---
diff --git a/www/apps/resources/references/js_sdk/store/Store/properties/js_sdk.store.Store.fulfillment/page.mdx b/www/apps/resources/references/js_sdk/store/Store/properties/js_sdk.store.Store.fulfillment/page.mdx
index 8942eed630d18..a88a99d0cab5c 100644
--- a/www/apps/resources/references/js_sdk/store/Store/properties/js_sdk.store.Store.fulfillment/page.mdx
+++ b/www/apps/resources/references/js_sdk/store/Store/properties/js_sdk.store.Store.fulfillment/page.mdx
@@ -1,5 +1,5 @@
---
-slug: /references/js-sdk/admin/fulfillment
+slug: /references/js-sdk/store/fulfillment
sidebar_label: fulfillment
---
diff --git a/www/apps/resources/references/js_sdk/store/Store/properties/js_sdk.store.Store.order/page.mdx b/www/apps/resources/references/js_sdk/store/Store/properties/js_sdk.store.Store.order/page.mdx
index ab006d5407b45..da592e42e4a40 100644
--- a/www/apps/resources/references/js_sdk/store/Store/properties/js_sdk.store.Store.order/page.mdx
+++ b/www/apps/resources/references/js_sdk/store/Store/properties/js_sdk.store.Store.order/page.mdx
@@ -1,5 +1,5 @@
---
-slug: /references/js-sdk/admin/order
+slug: /references/js-sdk/store/order
sidebar_label: order
---
diff --git a/www/apps/resources/references/js_sdk/store/Store/properties/js_sdk.store.Store.payment/page.mdx b/www/apps/resources/references/js_sdk/store/Store/properties/js_sdk.store.Store.payment/page.mdx
index d8afe90fc23a4..1ec13b86a9cd0 100644
--- a/www/apps/resources/references/js_sdk/store/Store/properties/js_sdk.store.Store.payment/page.mdx
+++ b/www/apps/resources/references/js_sdk/store/Store/properties/js_sdk.store.Store.payment/page.mdx
@@ -1,5 +1,5 @@
---
-slug: /references/js-sdk/admin/payment
+slug: /references/js-sdk/store/payment
sidebar_label: payment
---
diff --git a/www/apps/resources/references/js_sdk/store/Store/properties/js_sdk.store.Store.product/page.mdx b/www/apps/resources/references/js_sdk/store/Store/properties/js_sdk.store.Store.product/page.mdx
index d5ab9232eeb0e..7e40f55b59e1f 100644
--- a/www/apps/resources/references/js_sdk/store/Store/properties/js_sdk.store.Store.product/page.mdx
+++ b/www/apps/resources/references/js_sdk/store/Store/properties/js_sdk.store.Store.product/page.mdx
@@ -1,5 +1,5 @@
---
-slug: /references/js-sdk/admin/product
+slug: /references/js-sdk/store/product
sidebar_label: product
---
diff --git a/www/apps/resources/references/js_sdk/store/Store/properties/js_sdk.store.Store.region/page.mdx b/www/apps/resources/references/js_sdk/store/Store/properties/js_sdk.store.Store.region/page.mdx
index 3d3e1c0ac7f5d..843ff83b57c09 100644
--- a/www/apps/resources/references/js_sdk/store/Store/properties/js_sdk.store.Store.region/page.mdx
+++ b/www/apps/resources/references/js_sdk/store/Store/properties/js_sdk.store.Store.region/page.mdx
@@ -1,5 +1,5 @@
---
-slug: /references/js-sdk/admin/region
+slug: /references/js-sdk/store/region
sidebar_label: region
---
diff --git a/www/apps/resources/sidebar.mjs b/www/apps/resources/sidebar.mjs
index 6b0fdac0e4385..f5b8ade77214d 100644
--- a/www/apps/resources/sidebar.mjs
+++ b/www/apps/resources/sidebar.mjs
@@ -2100,7 +2100,18 @@ export const sidebar = sidebarAttachHrefCommonOptions([
{
type: "category",
title: "Medusa Application",
- autogenerate_path: "/deployment/medusa-application",
+ children: [
+ {
+ type: "link",
+ path: "https://docs.medusajs.com/learn/deployment/general",
+ title: "General"
+ },
+ {
+ type: "link",
+ path: "/deployment/medusa-application/railway",
+ title: "Railway"
+ },
+ ],
},
{
type: "category",
diff --git a/www/packages/docs-ui/src/components/CodeBlock/Header/index.tsx b/www/packages/docs-ui/src/components/CodeBlock/Header/index.tsx
index b6be62c9d8511..1121c46c1e8a7 100644
--- a/www/packages/docs-ui/src/components/CodeBlock/Header/index.tsx
+++ b/www/packages/docs-ui/src/components/CodeBlock/Header/index.tsx
@@ -17,6 +17,7 @@ type CodeBlockHeaderProps = {
title?: string
blockStyle?: CodeBlockStyle
actionsProps: CodeBlockActionsProps
+ hideActions?: boolean
} & CodeBlockHeaderMeta
export const CodeBlockHeader = ({
@@ -25,6 +26,7 @@ export const CodeBlockHeader = ({
badgeLabel,
actionsProps,
badgeColor,
+ hideActions = false
}: CodeBlockHeaderProps) => {
const { colorMode } = useColorMode()
@@ -54,7 +56,7 @@ export const CodeBlockHeader = ({
)}
-
+ {!hideActions && }
)
}
diff --git a/www/packages/docs-ui/src/components/CodeBlock/index.tsx b/www/packages/docs-ui/src/components/CodeBlock/index.tsx
index 8d8befeab7698..eefce95c1d914 100644
--- a/www/packages/docs-ui/src/components/CodeBlock/index.tsx
+++ b/www/packages/docs-ui/src/components/CodeBlock/index.tsx
@@ -363,6 +363,7 @@ export const CodeBlock = ({
...actionsProps,
inHeader: true,
}}
+ hideActions={hasTabs}
/>
)}
comment}}
+{{{signatureComment}}}
{{/if}}
diff --git a/www/utils/packages/utils/src/step-utils.ts b/www/utils/packages/utils/src/step-utils.ts
index 38a0ac31b77cc..eda89c6159465 100644
--- a/www/utils/packages/utils/src/step-utils.ts
+++ b/www/utils/packages/utils/src/step-utils.ts
@@ -3,9 +3,16 @@ import { ArrayType, SignatureReflection, SomeType, UnionType } from "typedoc"
const disallowedIntrinsicTypeNames = ["unknown", "void", "any", "never"]
export function isWorkflowStep(reflection: SignatureReflection): boolean {
- return (
- reflection.parent?.children?.some((child) => child.name === "__step__") ||
- false
+ if (reflection.parent?.children?.some((child) => child.name === "__step__")) {
+ return true
+ }
+ if (reflection.type?.type !== "intersection") {
+ return false
+ }
+ return reflection.type.types.some(
+ (refType) =>
+ refType.type === "reference" &&
+ refType.name === "StepFunctionReturnConfig"
)
}