See the jmap-kit GitHub repo https://github.com/lachlanhunt/jmap-kit
Full documentation including development guide and API reference. https://lachlanhunt.github.io/jmap-kit/
JMAP (JSON Meta Application Protocol) is a modern protocol designed to replace IMAP and related protocols using JSON and HTTP for email, calendar, contacts, and more. It’s already used in production by providers like Fastmail, planned for Mozilla’s upcoming Thundermail service, and supported by several open-source mail servers.
The library, built entirely in TypeScript, provides a type-safe API for building JMAP-compliant requests and dispatching responses. It is fully extensible, with a plugin architecture that allows additional capabilities (both standardised and vendor extensions), and can be adapted to work with any HTTP library (fetch, axios, etc.). It is framework-agnostic and can be used on both the frontend and backend.