npm.io
2.22.7 • Published 4d ago

@medusajs/types

Licence
SEE LICENSE IN LICENSE
Version
2.22.7
Deps
1
Size
3.7 MB
Vulns
0
Weekly
0
Stars
36.5K

Medusa logo

@medusajs/types

Documentation | Website

Building blocks for digital commerce

Medusa is released under the MIT license. PRs welcome! Discord Chat Follow @medusajs

@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.
  • HttpTypes namespace with Store and Admin API request and response types, also used by @medusajs/js-sdk.
  • Namespaced groups such as CartTypes, ProductTypes, OrderTypes, DAL, and WorkflowTypes.
  • MedusaContainer, ConfigModule, and other framework-level types.

Usage

import type { HttpTypes, ICartModuleService } from "@medusajs/framework/types"

Resources