# inkdrop-model

> Data model for Inkdrop

Latest version **2.13.1** (published 2026-08-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install inkdrop-model
pnpm add inkdrop-model
yarn add inkdrop-model
bun add inkdrop-model
```

## Health

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

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.13.1 |
| Published | 2026-08-17 |
| First published | 2017-12-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 180 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 13 |
| Author | Takuya Matsuyama |
| Maintainers | craftzdog |
| Keywords | json-schema |

## Links

- npm: https://www.npmjs.com/package/inkdrop-model
- Repository: https://github.com/inkdropapp/inkdrop-model
- Homepage: https://github.com/inkdropapp/inkdrop-model#readme
- Issues: https://github.com/inkdropapp/inkdrop-model/issues
- npm.io page: https://npm.io/package/inkdrop-model

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 2.13.1 (latest) — 2026-08-17
- 2.13.0 — 2026-07-15
- 2.12.0 — 2026-07-14
- 2.11.6 — 2026-06-25
- 2.11.5 — 2026-03-06
- 2.11.4 — 2026-02-23
- 2.11.3 — 2026-02-23
- 2.11.2 — 2026-02-23
- 2.11.1 — 2026-02-03
- 2.11.0 — 2026-02-03
- 2.10.1 — 2026-01-20
- 2.10.0 — 2026-01-20
- 2.9.1 — 2025-08-01
- 2.9.0 — 2025-08-01
- 2.8.0 — 2024-10-23
- … 23 more at https://npm.io/package/inkdrop-model/versions

## README

# Inkdrop Model

Inkdrop data model definitions in json-schema and TypeScript

## Documentations

Human readable definitions are [here](https://github.com/inkdropapp/inkdrop-model/tree/master/docs/schema.md).

## Install

```sh
npm install inkdrop-model
```

## Models

- **Note** - A markdown document with title, body, status, tags, and visibility settings
- **Book** - A notebook for organizing notes, with support for nesting and custom icons
- **Tag** - A label for categorizing notes, with customizable colors
- **File** - An image attachment that can be embedded in notes

## Usage

### TypeScript

```typescript
import type { Note, Book, Tag, File } from 'inkdrop-model'
```

### Json Schema

```javascript
import { NoteSchema, BookSchema, TagSchema, FileSchema } from 'inkdrop-model'
```

You can validate data with json schemas.
Below example uses [ajv](https://github.com/epoberezkin/ajv) as a validator:

```javascript
import { NoteSchema } from 'inkdrop-model'
import Ajv from 'ajv'
const ajv = new Ajv()
const validate = ajv.compile(NoteSchema)

const data = {
  _id: 'note:BkgOZZUJzf',
  title: 'link',
  doctype: 'markdown',
  updatedAt: 1513330812556,
  createdAt: 1513214207639,
  tags: [],
  status: 'none',
  share: 'private',
  body: 'markdown note body',
  bookId: 'book:first',
  _rev: '38-636e505958d24f9c21614d95ea03b5a1'
}
const valid = validate(data)
console.log(valid) // => true
```

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