@medusajs/types
Documentation | Website
Building blocks for digital commerce
@medusajs/types contains the shared TypeScript type definitions for Medusa: module service interfaces (for example, ICartModuleService), DTOs, data model and DAL types, workflow types, and the HttpTypes namespace for API request and response shapes. Applications, plugins, and modules should import it through @medusajs/framework/types, which re-exports this package; import @medusajs/types directly only when you can't depend on @medusajs/framework.
At a glance
| Package | @medusajs/types |
| Type | Core library |
| Import from | @medusajs/framework/types |
Features
- Module service interfaces and DTOs for every commerce and infrastructure module.
HttpTypesnamespace with Store and Admin API request and response types, also used by@medusajs/js-sdk.- Namespaced groups such as
CartTypes,ProductTypes,OrderTypes,DAL, andWorkflowTypes. MedusaContainer,ConfigModule, and other framework-level types.
Usage
import type { HttpTypes, ICartModuleService } from "@medusajs/framework/types"