docs: update imports and package names across docs (#9375)

* docs: update imports and package names across docs
+ reference configs

* generate files

* fix import

* change preview to rc
This commit is contained in:
Shahed Nasser
2024-10-01 11:03:42 +02:00
committed by GitHub
parent c726ed54f5
commit 2e16949979
196 changed files with 1379 additions and 1491 deletions
@@ -29,11 +29,11 @@ export const stepHighlights = [
import {
createStep,
StepResponse,
} from "@medusajs/workflows-sdk"
} from "@medusajs/framework/workflows-sdk"
import {
Modules,
ContainerRegistrationKeys,
} from "@medusajs/utils"
} from "@medusajs/framework/utils"
import { BRAND_MODULE } from "../../modules/brand"
type LinkProductToBrandStepInput = {
@@ -71,7 +71,7 @@ The `create` method accepts as a parameter an object whose properties are the na
<Note title="Tip">
Use the `Modules` enum imported from `@medusajs/utils` to for the commerce module's names.
Use the `Modules` enum imported from `@medusajs/framework/utils` to for the commerce module's names.
</Note>
@@ -23,7 +23,7 @@ This chapter covers how to define a link between the `Brand` and `Product`data m
]}
/>
Links are defined in a TypeScript or JavaScript file under the `src/links` directory. The file defines and exports the link using the `defineLink` function imported from `@medusajs/utils`.
Links are defined in a TypeScript or JavaScript file under the `src/links` directory. The file defines and exports the link using the `defineLink` function imported from `@medusajs/framework/utils`.
So, create the file `src/links/product-brand.ts` with the following content:
@@ -34,8 +34,8 @@ export const highlights = [
```ts title="src/links/product-brand.ts" highlights={highlights}
import BrandModule from "../modules/brand"
import ProductModule from "@medusajs/product"
import { defineLink } from "@medusajs/utils"
import ProductModule from "@medusajs/medusa/product"
import { defineLink } from "@medusajs/framework/utils"
export default defineLink(
{
@@ -86,9 +86,9 @@ export const hookHighlights = [
]
```ts title="src/workflows/hooks/created-product.ts" highlights={hookHighlights}
import { createProductsWorkflow } from "@medusajs/core-flows"
import { StepResponse } from "@medusajs/workflows-sdk"
import { Modules, ContainerRegistrationKeys } from "@medusajs/utils"
import { createProductsWorkflow } from "@medusajs/medusa/core-flows"
import { StepResponse } from "@medusajs/framework/workflows-sdk"
import { Modules, ContainerRegistrationKeys } from "@medusajs/framework/utils"
import { BRAND_MODULE } from "../../modules/brand"
import BrandModuleService from "../../modules/brand/service"
@@ -52,7 +52,7 @@ import {
} from "@medusajs/medusa"
import {
ContainerRegistrationKeys,
} from "@medusajs/utils"
} from "@medusajs/framework/utils"
export const GET = async (
req: MedusaRequest,