jmap-kit
    Preparing search index...

    Examples

    Runnable examples from the jmap-kit repository demonstrating library features. Each example is self-contained with its own README explaining what it does and how to run it.

    Most examples require a JMAP server and a bearer token. Create a .env file in the repo root:

    JMAP_BEARER_TOKEN=your-token
    JMAP_HOSTNAME=api.fastmail.com
    JMAP_LOG_LEVEL=info
    1. Basic — Connect to a JMAP server and send Core/echo invocations
    2. Capability Registration — Register additional capabilities (e.g. FastMail Masked Email)
    3. Invocations — Create and inspect invocations without a server connection
    4. Request Builder — Build multi-method requests with result references
    5. Response Dispatch — Handle responses by ID, method name, data type, or default handler
    6. Email Operations — List mailboxes, find the inbox, query emails
    7. Blob Operations — Upload and download files via the JMAP blob API
    8. Custom Capability — Write a complete custom capability from scratch
    9. Validation Plugins — Write and register custom validation plugins

    The utils/ directory contains shared code used across examples:

    • env.ts — Environment variable validation with Zod
    • fetch-transport.ts — A fetch-based Transport implementation
    • logger.ts — A coloured console logger with configurable log levels