# @medusajs/types

> Medusa Types definition

Latest version **2.22.7** (published 2026-11-13) · SEE LICENSE IN LICENSE license · 0 weekly downloads

## Install

```sh
npm install @medusajs/types
pnpm add @medusajs/types
yarn add @medusajs/types
bun add @medusajs/types
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score; popular repo.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 2.22.7 |
| Published | 2026-11-13 |
| First published | 2023-03-15 |
| Weekly downloads | 0 |
| License | SEE LICENSE IN LICENSE |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=22.22.0 |
| Dependencies | 1 |
| Unpacked size | 3.7 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 36517 |
| Author | Medusa |
| Maintainers | sebrindom, nicolas-gorga, sradevski, olijuhl, shahednasser |

## Links

- npm: https://www.npmjs.com/package/@medusajs/types
- Repository: https://github.com/medusajs/medusa
- Homepage: https://github.com/medusajs/medusa#readme
- Issues: https://github.com/medusajs/medusa/issues
- npm.io page: https://npm.io/package/@medusajs/types

## Dependencies (1)

- [bignumber.js](https://npm.io/package/bignumber.js.md) ^11.1.5

## Recent versions

- 2.22.7 (latest) — 2026-11-13
- 2.22.7-preview-20261113113415 (preview) — 2026-11-13
- 2.22.7-snapshot-20261113105900 (snapshot) — 2026-11-13
- 2.16.0-options-preview-20260605124754 (options-preview) — 2026-06-05
- 2.0.0-rc-20241022183311 (rc) — 2024-10-22
- 1.11.17-next-20240505114610 (next) — 2024-05-05
- 1.10.1-canary-20230806135701 (canary) — 2023-08-06
- 1.8.10-beta-20230705211101 (beta) — 2023-07-05
- 1.8.5-nextjs-commerce-20230515081748 (nextjs-commerce) — 2023-05-15
- 1.8.5-nextjs-20230507103235 (nextjs) — 2023-05-07
- 2.22.7-preview-20261113102906 — 2026-11-13
- 2.22.7-snapshot-20261113095001 — 2026-11-13
- 2.22.7-preview-20261113085903 — 2026-11-13
- 2.22.7-preview-20261113084204 — 2026-11-13
- 2.22.7-snapshot-20261112111749 — 2026-11-12
- … 401 more at https://npm.io/package/@medusajs/types/versions

## README

<p align="center">
  <a href="https://www.medusajs.com">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/59018053/229103275-b5e482bb-4601-46e6-8142-244f531cebdb.svg">
    <source media="(prefers-color-scheme: light)" srcset="https://user-images.githubusercontent.com/59018053/229103726-e5b529a3-9b3f-4970-8a1f-c6af37f087bf.svg">
    <img alt="Medusa logo" src="https://user-images.githubusercontent.com/59018053/229103726-e5b529a3-9b3f-4970-8a1f-c6af37f087bf.svg">
    </picture>
  </a>
</p>
<h1 align="center">
  @medusajs/types
</h1>

<h4 align="center">
  <a href="https://docs.medusajs.com">Documentation</a> |
  <a href="https://www.medusajs.com">Website</a>
</h4>

<p align="center">
  Building blocks for digital commerce
</p>
<p align="center">
  <a href="https://github.com/medusajs/medusa/blob/develop/LICENSE">
    <img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="Medusa is released under the MIT license." />
  </a>
  <a href="https://github.com/medusajs/medusa/blob/develop/CONTRIBUTING.md">
    <img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat" alt="PRs welcome!" />
  </a>
  <a href="https://discord.gg/xpCwq3Kfn8">
    <img src="https://img.shields.io/badge/chat-on%20discord-7289DA.svg" alt="Discord Chat" />
  </a>
  <a href="https://twitter.com/intent/follow?screen_name=medusajs">
    <img src="https://img.shields.io/twitter/follow/medusajs.svg?label=Follow%20@medusajs" alt="Follow @medusajs" />
  </a>
</p>

`@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

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

## Resources

- [Service factory reference](https://docs.medusajs.com/resources/service-factory-reference)
- [Commerce Modules](https://docs.medusajs.com/resources/commerce-modules)

---
_Source: https://npm.io/package/@medusajs/types · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
