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:
@@ -15,8 +15,8 @@ In this document, you’ll find common examples of how you can use the Inventory
|
||||
|
||||
```ts
|
||||
import { MedusaRequest, MedusaResponse } from "@medusajs/medusa"
|
||||
import { IInventoryService } from "@medusajs/types"
|
||||
import { Modules } from "@medusajs/utils"
|
||||
import { IInventoryService } from "@medusajs/framework/types"
|
||||
import { Modules } from "@medusajs/framework/utils"
|
||||
|
||||
export async function POST(
|
||||
request: MedusaRequest,
|
||||
@@ -42,7 +42,7 @@ export async function POST(
|
||||
```ts
|
||||
import { NextResponse } from "next/server"
|
||||
|
||||
import { initialize as initializeInventoryModule } from "@medusajs/inventory-next"
|
||||
import { initialize as initializeInventoryModule } from "@medusajs/medusa/inventory-next"
|
||||
|
||||
export async function POST(request: Request) {
|
||||
const inventoryModuleService = await initializeInventoryModule({})
|
||||
@@ -70,8 +70,8 @@ export async function POST(request: Request) {
|
||||
|
||||
```ts
|
||||
import { MedusaRequest, MedusaResponse } from "@medusajs/medusa"
|
||||
import { IInventoryService } from "@medusajs/types"
|
||||
import { Modules } from "@medusajs/utils"
|
||||
import { IInventoryService } from "@medusajs/framework/types"
|
||||
import { Modules } from "@medusajs/framework/utils"
|
||||
|
||||
export async function GET(
|
||||
request: MedusaRequest,
|
||||
@@ -93,7 +93,7 @@ export async function GET(
|
||||
```ts
|
||||
import { NextResponse } from "next/server"
|
||||
|
||||
import { initialize as initializeInventoryModule } from "@medusajs/inventory-next"
|
||||
import { initialize as initializeInventoryModule } from "@medusajs/medusa/inventory-next"
|
||||
|
||||
export async function GET(request: Request) {
|
||||
const inventoryModuleService = await initializeInventoryModule({})
|
||||
@@ -116,8 +116,8 @@ export async function GET(request: Request) {
|
||||
|
||||
```ts
|
||||
import { MedusaRequest, MedusaResponse } from "@medusajs/medusa"
|
||||
import { IInventoryService } from "@medusajs/types"
|
||||
import { Modules } from "@medusajs/utils"
|
||||
import { IInventoryService } from "@medusajs/framework/types"
|
||||
import { Modules } from "@medusajs/framework/utils"
|
||||
|
||||
export async function GET(
|
||||
request: MedusaRequest,
|
||||
@@ -141,7 +141,7 @@ export async function GET(
|
||||
```ts
|
||||
import { NextResponse } from "next/server"
|
||||
|
||||
import { initialize as initializeInventoryModule } from "@medusajs/inventory-next"
|
||||
import { initialize as initializeInventoryModule } from "@medusajs/medusa/inventory-next"
|
||||
|
||||
type ContextType = {
|
||||
params: {
|
||||
@@ -172,8 +172,8 @@ export async function GET(request: Request, { params }: ContextType) {
|
||||
|
||||
```ts
|
||||
import { MedusaRequest, MedusaResponse } from "@medusajs/medusa"
|
||||
import { IInventoryService } from "@medusajs/types"
|
||||
import { Modules } from "@medusajs/utils"
|
||||
import { IInventoryService } from "@medusajs/framework/types"
|
||||
import { Modules } from "@medusajs/framework/utils"
|
||||
|
||||
export async function POST(
|
||||
request: MedusaRequest,
|
||||
@@ -199,7 +199,7 @@ export async function POST(
|
||||
```ts
|
||||
import { NextResponse } from "next/server"
|
||||
|
||||
import { initialize as initializeInventoryModule } from "@medusajs/inventory-next"
|
||||
import { initialize as initializeInventoryModule } from "@medusajs/medusa/inventory-next"
|
||||
|
||||
export async function POST(request: Request) {
|
||||
const inventoryModuleService = await initializeInventoryModule({})
|
||||
@@ -227,8 +227,8 @@ export async function POST(request: Request) {
|
||||
|
||||
```ts
|
||||
import { MedusaRequest, MedusaResponse } from "@medusajs/medusa"
|
||||
import { IInventoryService } from "@medusajs/types"
|
||||
import { Modules } from "@medusajs/utils"
|
||||
import { IInventoryService } from "@medusajs/framework/types"
|
||||
import { Modules } from "@medusajs/framework/utils"
|
||||
|
||||
export async function POST(
|
||||
request: MedusaRequest,
|
||||
@@ -254,7 +254,7 @@ export async function POST(
|
||||
```ts
|
||||
import { NextResponse } from "next/server"
|
||||
|
||||
import { initialize as initializeInventoryModule } from "@medusajs/inventory-next"
|
||||
import { initialize as initializeInventoryModule } from "@medusajs/medusa/inventory-next"
|
||||
|
||||
export async function POST(request: Request) {
|
||||
const inventoryModuleService = await initializeInventoryModule({})
|
||||
@@ -282,8 +282,8 @@ export async function POST(request: Request) {
|
||||
|
||||
```ts
|
||||
import { MedusaRequest, MedusaResponse } from "@medusajs/medusa"
|
||||
import { IInventoryService } from "@medusajs/types"
|
||||
import { Modules } from "@medusajs/utils"
|
||||
import { IInventoryService } from "@medusajs/framework/types"
|
||||
import { Modules } from "@medusajs/framework/utils"
|
||||
|
||||
export async function POST(
|
||||
request: MedusaRequest,
|
||||
@@ -309,7 +309,7 @@ export async function POST(
|
||||
```ts
|
||||
import { NextResponse } from "next/server"
|
||||
|
||||
import { initialize as initializeInventoryModule } from "@medusajs/inventory-next"
|
||||
import { initialize as initializeInventoryModule } from "@medusajs/medusa/inventory-next"
|
||||
|
||||
export async function POST(request: Request) {
|
||||
const inventoryModuleService = await initializeInventoryModule({})
|
||||
@@ -337,8 +337,8 @@ export async function POST(request: Request) {
|
||||
|
||||
```ts
|
||||
import { MedusaRequest, MedusaResponse } from "@medusajs/medusa"
|
||||
import { IInventoryService } from "@medusajs/types"
|
||||
import { Modules } from "@medusajs/utils"
|
||||
import { IInventoryService } from "@medusajs/framework/types"
|
||||
import { Modules } from "@medusajs/framework/utils"
|
||||
|
||||
export async function POST(
|
||||
request: MedusaRequest,
|
||||
@@ -364,7 +364,7 @@ export async function POST(
|
||||
```ts
|
||||
import { NextResponse } from "next/server"
|
||||
|
||||
import { initialize as initializeInventoryModule } from "@medusajs/inventory-next"
|
||||
import { initialize as initializeInventoryModule } from "@medusajs/medusa/inventory-next"
|
||||
|
||||
export async function POST(request: Request) {
|
||||
const inventoryModuleService = await initializeInventoryModule({})
|
||||
@@ -394,8 +394,8 @@ export async function POST(request: Request) {
|
||||
|
||||
```ts
|
||||
import { MedusaRequest, MedusaResponse } from "@medusajs/medusa"
|
||||
import { IInventoryService } from "@medusajs/types"
|
||||
import { Modules } from "@medusajs/utils"
|
||||
import { IInventoryService } from "@medusajs/framework/types"
|
||||
import { Modules } from "@medusajs/framework/utils"
|
||||
|
||||
export async function GET(
|
||||
request: MedusaRequest,
|
||||
@@ -434,7 +434,7 @@ export async function GET(
|
||||
```ts
|
||||
import { NextResponse } from "next/server"
|
||||
|
||||
import { initialize as initializeInventoryModule } from "@medusajs/inventory-next"
|
||||
import { initialize as initializeInventoryModule } from "@medusajs/medusa/inventory-next"
|
||||
|
||||
type ContextType = {
|
||||
params: {
|
||||
@@ -481,8 +481,8 @@ export async function POST(request: Request, { params }: ContextType) {
|
||||
|
||||
```ts
|
||||
import { MedusaRequest, MedusaResponse } from "@medusajs/medusa"
|
||||
import { IInventoryService } from "@medusajs/types"
|
||||
import { Modules } from "@medusajs/utils"
|
||||
import { IInventoryService } from "@medusajs/framework/types"
|
||||
import { Modules } from "@medusajs/framework/utils"
|
||||
|
||||
export async function DELETE(
|
||||
request: MedusaRequest,
|
||||
@@ -504,7 +504,7 @@ export async function DELETE(
|
||||
<CodeTab label="Next.js App Router" value="nextjs">
|
||||
|
||||
```ts
|
||||
import { initialize as initializeInventoryModule } from "@medusajs/inventory-next"
|
||||
import { initialize as initializeInventoryModule } from "@medusajs/medusa/inventory-next"
|
||||
|
||||
type ContextType = {
|
||||
params: {
|
||||
|
||||
Reference in New Issue
Block a user