docs: add note to tutorials related to types (#13720)
This commit is contained in:
@@ -419,6 +419,12 @@ In the second step of the workflow, you create or update indexes in Algolia for
|
||||
|
||||
To create the step, create the file `src/workflows/steps/sync-products.ts` with the following content:
|
||||
|
||||
<Note>
|
||||
|
||||
If you get a type error on resolving the Algolia Module, run the Medusa application once with the `npm run dev` or `yarn dev` command to generate the necessary type definitions, as explained in the [Automatically Generated Types guide](!docs!/learn/fundamentals/generated-types).
|
||||
|
||||
</Note>
|
||||
|
||||
```ts title="src/workflows/steps/sync-products.ts"
|
||||
import { ProductDTO } from "@medusajs/framework/types"
|
||||
import { createStep, StepResponse } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
@@ -1297,6 +1297,12 @@ In the second step, you create the retrieved products in Contentful.
|
||||
|
||||
To create the step, create the file `src/workflows/steps/create-products-contentful.ts` with the following content:
|
||||
|
||||
<Note>
|
||||
|
||||
If you get a type error on resolving the Contentful Module, run the Medusa application once with the `npm run dev` or `yarn dev` command to generate the necessary type definitions, as explained in the [Automatically Generated Types guide](!docs!/learn/fundamentals/generated-types).
|
||||
|
||||
</Note>
|
||||
|
||||
export const createProductsContentfulStepHighlights = [
|
||||
["12", `"create-products-contentful-step"`, "The step's unique name."],
|
||||
["13", "input", "The step's input."],
|
||||
|
||||
@@ -735,6 +735,12 @@ The first step of the workflow retrieves and returns the products from Magento.
|
||||
|
||||
In your plugin, create the file `src/workflows/steps/get-magento-products.ts` with the following content:
|
||||
|
||||
<Note>
|
||||
|
||||
If you get a type error on resolving the Magento Module, run the Medusa application once with the `npm run dev` or `yarn dev` command to generate the necessary type definitions, as explained in the [Automatically Generated Types guide](!docs!/learn/fundamentals/generated-types).
|
||||
|
||||
</Note>
|
||||
|
||||

|
||||
|
||||
```ts title="src/workflows/steps/get-magento-products.ts"
|
||||
|
||||
@@ -396,6 +396,12 @@ In the second step of the workflow, you create or update indexes in Meilisearch
|
||||
|
||||
To create the step, create the file `src/workflows/steps/sync-products.ts` with the following content:
|
||||
|
||||
<Note>
|
||||
|
||||
If you get a type error on resolving the Meilisearch Module, run the Medusa application once with the `npm run dev` or `yarn dev` command to generate the necessary type definitions, as explained in the [Automatically Generated Types guide](!docs!/learn/fundamentals/generated-types).
|
||||
|
||||
</Note>
|
||||
|
||||
```ts title="src/workflows/steps/sync-products.ts"
|
||||
import { ProductDTO } from "@medusajs/framework/types"
|
||||
import { createStep, StepResponse } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
@@ -1462,6 +1462,12 @@ The `createPayloadItemsStep` will create an item in a Payload collection, such a
|
||||
|
||||
To create the step, create the file `src/workflows/steps/create-payload-items.ts` with the following content:
|
||||
|
||||
<Note>
|
||||
|
||||
If you get a type error on resolving the Payload Module, run the Medusa application once with the `npm run dev` or `yarn dev` command to generate the necessary type definitions, as explained in the [Automatically Generated Types guide](!docs!/learn/fundamentals/generated-types).
|
||||
|
||||
</Note>
|
||||
|
||||
export const createPayloadItemsStepHighlights = [
|
||||
["13", "payloadModuleService", "Resolve the Payload Module's service from the Medusa container."],
|
||||
["15", "createdItems", "Create items in Payload."],
|
||||
|
||||
@@ -674,6 +674,12 @@ The syncing workflow will have a single step that syncs products provided as an
|
||||
|
||||
So, to implement that step, create the file `src/workflows/sanity-sync-products/steps/sync.ts` with the following content:
|
||||
|
||||
<Note>
|
||||
|
||||
If you get a type error on resolving the Sanity Module, run the Medusa application once with the `npm run dev` or `yarn dev` command to generate the necessary type definitions, as explained in the [Automatically Generated Types guide](!docs!/learn/fundamentals/generated-types).
|
||||
|
||||
</Note>
|
||||
|
||||
export const syncStepHighlights = [
|
||||
["13", "createStep", "Create a step."],
|
||||
["15", "container", "The Medusa container to resolve resources."],
|
||||
|
||||
Reference in New Issue
Block a user