Skip to content

Conversation

@i11v
Copy link
Owner

@i11v i11v commented Feb 11, 2026

Summary

Implements the JMAP Identity service according to RFC 8621 Section 6, enabling clients to manage email identities (sender addresses, signatures, reply-to addresses, etc.).

Key Changes

  • New Identity Schema (src/identity/schema.ts): Comprehensive schema definitions for all Identity operations including:

    • IdentityObject: Core identity data structure with email, name, signatures, reply-to, and bcc fields
    • IdentityMutable: Creatable/updatable identity properties
    • Request/response schemas for Identity/get, Identity/set, and Identity/changes methods
    • Helper functions for checking identity capabilities (canDelete, hasReplyTo, hasBcc, hasSignatures)
  • New Identity Service (src/identity/service.ts): Effect-based service implementation providing:

    • get(): Retrieve identities by ID
    • set(): Create, update, or destroy identities
    • changes(): Track identity changes since a state
    • getAll(): Convenience method to fetch all identities for an account
    • getDefault(): Convenience method to get the first/default identity
    • Full error handling with proper error types (JMAPMethodError, NetworkError, AuthenticationError, SessionError)
  • Client Integration (src/client/wrapper.ts): Added IdentityNamespace to the promise-based wrapper with all service methods exposed as async functions

  • Layer Configuration (src/layers.ts): Integrated IdentityServiceLive into the dependency injection layer

  • Public API (src/identity/index.ts, src/index.ts): Exported all Identity types and service interfaces

  • Test Configuration (tests/config/capabilities.ts): Enabled Identity capability flags for testing

Implementation Details

  • Follows the same architectural pattern as existing services (Mailbox, Email, EmailSubmission)
  • Properly handles nullable fields per RFC 8621 (replyTo, bcc, and response fields)
  • Uses Effect for composable, type-safe async operations
  • Integrates with existing JMAP client infrastructure (batch requests, capability checking, response extraction)
  • Includes comprehensive JSDoc comments referencing RFC 8621 specifications

https://claude.ai/code/session_01EHPdDuJwHEyaghPQ4KwBYE

…ges)

Implement RFC 8621 Section 6 Identity methods with schema validation,
service layer, and Promise-based wrapper, enabling downstream consumers
to use client.identity instead of low-level client.batch calls.

https://claude.ai/code/session_01EHPdDuJwHEyaghPQ4KwBYE
@github-actions
Copy link

JMAP Spec Coverage

effect-jmap@0.9.0 coverage:spec /home/runner/work/effect-jmap/effect-jmap
tsx scripts/spec-coverage.ts --markdown

Overall: 18/31 methods (58.1%)

Blob (0/4)

Method Status
copy
get
lookup
upload

Core (0/1)

Method Status
echo

Email (6/8)

Method Status
get
set
query
queryChanges
changes
copy
import
parse

EmailSubmission (5/5)

Method Status
get
set
query
queryChanges
changes

Identity (3/3)

Method Status
get
set
changes

Mailbox (4/5)

Method Status
get
set
query
queryChanges
changes

SearchSnippet (0/1)

Method Status
get

Thread (0/2)

Method Status
get
changes

VacationResponse (0/2)

Method Status
get
set

@github-actions
Copy link

Preview Package Published

pnpm add effect-jmap@0.0.0-pr.20.e2cf253
# or
pnpm add effect-jmap@pr-20

Published from commit e2cf253

@i11v i11v merged commit 8fe2ca5 into main Feb 11, 2026
9 checks passed
@i11v i11v deleted the claude/add-identity-methods-v5Bj3 branch February 11, 2026 21:35
effect-jmap-release bot pushed a commit that referenced this pull request Feb 11, 2026
# [0.10.0](v0.9.0...v0.10.0) (2026-02-11)

### Features

* Add Identity service (Identity/get, Identity/set, Identity/changes) ([#20](#20)) ([8fe2ca5](8fe2ca5))
@effect-jmap-release
Copy link

🎉 This PR is included in version 0.10.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants