My agentic slop goes here. Not intended for anyone else!
README.md

JMAP Test Data Files#

This directory contains comprehensive JSON test files for the JMAP protocol (RFC 8620 Core + RFC 8621 Mail).

Directory Structure#

test/data/
├── core/          # RFC 8620 Core Protocol test files (22 files)
└── mail/          # RFC 8621 Mail Protocol test files (28 files)

Core Protocol Files (22 files)#

Basic Methods#

  1. request_echo.json - Core/echo request with arbitrary test data
  2. response_echo.json - Core/echo response echoing the request

Foo/get Method#

  1. request_get.json - Generic Foo/get request with properties filter
  2. response_get.json - Foo/get response with objects and notFound

Foo/changes Method#

  1. request_changes.json - Foo/changes request with sinceState
  2. response_changes.json - Foo/changes response with created/updated/destroyed

Foo/set Method (Create)#

  1. request_set_create.json - Foo/set with create operations
  2. response_set_create.json - Foo/set response with created objects

Foo/set Method (Update)#

  1. request_set_update.json - Foo/set with update (PatchObject) operations
  2. response_set_update.json - Foo/set response with updated objects

Foo/set Method (Destroy)#

  1. request_set_destroy.json - Foo/set with destroy operations
  2. response_set_destroy.json - Foo/set response with destroyed ids

Foo/copy Method#

  1. request_copy.json - Foo/copy request between accounts
  2. response_copy.json - Foo/copy response with created objects

Foo/query Method#

  1. request_query.json - Foo/query with complex filters and sort
  2. response_query.json - Foo/query response with ids and total

Foo/queryChanges Method#

  1. request_query_changes.json - Foo/queryChanges with sinceQueryState
  2. response_query_changes.json - Foo/queryChanges response with added/removed

Error Handling#

  1. error_method.json - Method-level error response (unknownMethod)

Session & Push#

  1. session.json - Complete Session object with capabilities and accounts
  2. push_state_change.json - StateChange push notification
  3. push_subscription.json - PushSubscription object

Mail Protocol Files (28 files)#

Mailbox Methods#

  1. mailbox_get_request.json - Mailbox/get request
  2. mailbox_get_response.json - Mailbox/get response with mailboxes (INBOX, Sent, Drafts, Trash, custom)
  3. mailbox_query_request.json - Mailbox/query with filters
  4. mailbox_query_response.json - Mailbox/query response
  5. mailbox_set_request.json - Mailbox/set with create/update/destroy
  6. mailbox_set_response.json - Mailbox/set response

Thread Methods#

  1. thread_get_request.json - Thread/get request
  2. thread_get_response.json - Thread/get response with emailIds

Email Methods (Basic)#

  1. email_get_request.json - Email/get with minimal properties
  2. email_get_response.json - Email/get response with basic email metadata

Email Methods (Full)#

  1. email_get_full_request.json - Email/get with all body properties
  2. email_get_full_response.json - Email/get response with full bodyStructure, attachments, bodyValues

Email Query#

  1. email_query_request.json - Email/query with complex filters (mailbox, sender, keywords, date)
  2. email_query_response.json - Email/query response

Email Set#

  1. email_set_request.json - Email/set creating drafts and updating emails
  2. email_set_response.json - Email/set response

Email Import#

  1. email_import_request.json - Email/import request with blobIds
  2. email_import_response.json - Email/import response

Email Parse#

  1. email_parse_request.json - Email/parse request for blob parsing
  2. email_parse_response.json - Email/parse response with parsed email

Search Snippet#

  1. search_snippet_request.json - SearchSnippet/get request
  2. search_snippet_response.json - SearchSnippet/get response with highlighted matches

Identity#

  1. identity_get_request.json - Identity/get request
  2. identity_get_response.json - Identity/get response with identities and signatures

Email Submission#

  1. email_submission_get_request.json - EmailSubmission/get request
  2. email_submission_get_response.json - EmailSubmission/get response with delivery status

Vacation Response#

  1. vacation_response_get_request.json - VacationResponse/get request
  2. vacation_response_get_response.json - VacationResponse/get response with out-of-office settings

Features Demonstrated#

Core Protocol Features#

  • Invocations: All requests/responses use proper 3-tuple invocation format
  • Request/Response Objects: Proper using, methodCalls, sessionState
  • Standard Methods: Get, Changes, Set (create/update/destroy), Copy, Query, QueryChanges
  • Filters: Complex nested FilterOperator with AND/OR/NOT
  • Sorting: Comparator with collation support
  • PatchObject: JSON Pointer path updates in Set/update
  • Error Handling: Method-level errors with proper error types
  • Session Object: Complete capabilities, accounts, primaryAccounts
  • Push Notifications: StateChange and PushSubscription

Mail Protocol Features#

  • Mailbox: All roles (inbox, sent, drafts, trash), myRights, counters
  • Thread: Email grouping with thread IDs
  • Email Metadata: All header fields, keywords, mailboxIds
  • Email Body: Full bodyStructure with multipart/mixed, multipart/alternative
  • Attachments: Proper MIME part representation
  • Body Values: Text and HTML body content with encoding flags
  • Query Filters: Mail-specific filters (inMailbox, from, subject, keywords, date ranges)
  • Import: Importing RFC 5322 messages from blobs
  • Parse: Parsing RFC 5322 messages without importing
  • Search Snippets: Highlighted search results with tags
  • Identity: Sender identities with text/HTML signatures
  • Email Submission: SMTP envelope, delivery status, DSN/MDN
  • Vacation Response: Out-of-office auto-reply configuration

Data Characteristics#

All JSON files include:

  • ✓ Valid, well-formed JSON
  • ✓ Proper JMAP data types (UTCDate in RFC 3339 format with Z timezone)
  • ✓ Realistic sample data (not just placeholders)
  • ✓ All REQUIRED fields per specification
  • ✓ Key OPTIONAL fields demonstrated
  • ✓ Proper Id format (strings, min 1, max 255 chars)
  • ✓ State strings for synchronization
  • ✓ Consistent accountId usage across related calls

Usage#

These files can be used for:

  1. Parser Testing: Validate JMAP parser implementations
  2. Type Checking: Verify type definitions match spec
  3. Integration Testing: Test JMAP client/server interactions
  4. Documentation: Reference examples for JMAP implementation
  5. Validation: Compare against RFC 8620 and RFC 8621 specifications

Validation#

All JSON files have been validated for:

  • JSON syntax correctness
  • Well-formed structure
  • Proper UTF-8 encoding

To validate:

python3 -m json.tool file.json

References#

  • RFC 8620: The JSON Meta Application Protocol (JMAP) Core
  • RFC 8621: The JSON Meta Application Protocol (JMAP) for Mail
  • /workspace/stack/jmap/JMAP_RFC8620_MESSAGE_TYPES_ANALYSIS.md