docs: fix imports from dist (#9401)

This commit is contained in:
Shahed Nasser
2024-10-01 12:49:37 +03:00
committed by GitHub
parent 9bd99df545
commit 1ad7e7583f
5 changed files with 9 additions and 9 deletions

View File

@@ -49,7 +49,7 @@ For example, create the file `src/api/middlewares.ts` with the following content
import { defineMiddlewares } from "@medusajs/medusa"
import {
validateAndTransformBody,
} from "@medusajs/medusa/dist/api/utils/validate-body"
} from "@medusajs/medusa/api/utils/validate-body"
import { PostStoreCustomSchema } from "./custom/validators"
export default defineMiddlewares({

View File

@@ -667,7 +667,7 @@ The route handler imports a validation schema from a `validation-schema` file. S
```ts title="src/api/validation-schemas.ts"
import {
AdminCreateProduct,
} from "@medusajs/medusa/dist/api/admin/products/validators"
} from "@medusajs/medusa/api/admin/products/validators"
import { z } from "zod"
import { MediaType } from "../modules/digital-product/types"
@@ -690,7 +690,7 @@ Finally, create the file `src/api/middlewares.ts` with the following content:
import { defineMiddlewares } from "@medusajs/medusa"
import {
validateAndTransformBody,
} from "@medusajs/medusa/dist/api/utils/validate-body"
} from "@medusajs/medusa/api/utils/validate-body"
import { createDigitalProductsSchema } from "./validation-schemas"
export default defineMiddlewares({
@@ -2312,7 +2312,7 @@ In this section, youll customize the [Next.js Starter storefront](../../../..
In `src/types/global.ts`, add the following types that youll use in your customizations:
```ts title="src/types/global.ts"
import { BaseProductVariant } from "@medusajs/framework/types/dist/http/product/common"
import { BaseProductVariant } from "@medusajs/framework/types/http/product/common"
// ...

View File

@@ -1314,7 +1314,7 @@ Create the file `src/api/restaurants/[id]/products/route.ts` with the following
import { MedusaRequest, MedusaResponse } from "@medusajs/medusa"
import {
AdminCreateProduct,
} from "@medusajs/medusa/dist/api/admin/products/validators"
} from "@medusajs/medusa/api/admin/products/validators"
import { z } from "zod"
import {
createRestaurantProductsWorkflow,

View File

@@ -712,10 +712,10 @@ import {
} from "@medusajs/medusa"
import {
validateAndTransformBody,
} from "@medusajs/medusa/dist/api/utils/validate-body"
} from "@medusajs/medusa/api/utils/validate-body"
import {
AdminCreateProduct,
} from "@medusajs/medusa/dist/api/admin/products/validators"
} from "@medusajs/medusa/api/admin/products/validators"
export default defineMiddlewares({
routes: [

View File

@@ -1765,10 +1765,10 @@ import {
} from "../../modules/subscription/types"
import {
authorizePaymentSessionStep,
} from "@medusajs/medusa/core-flows/dist/payment/steps/authorize-payment-session"
} from "@medusajs/medusa/core-flows"
import {
createPaymentCollectionsStep,
} from "@medusajs/medusa/core-flows/dist/cart/steps/create-payment-collection"
} from "@medusajs/medusa/core-flows"
import createSubscriptionOrderStep from "./steps/create-subscription-order"
import updateSubscriptionStep from "./steps/update-subscription"