feat: add JmapClient session client (Step 3)

Parses the JMAP Session object (RFC 8620 §2): fetches GET {jmapUrl},
extracts apiUrl and primary accountId, and wraps API calls via
call(methodCalls) which POSTs to apiUrl with Basic Auth.

Handles relative apiUrl, primaryAccounts fallback, and top-level
JMAP error responses. Covered by unit tests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Thomas Güttler
2026-04-19 16:11:32 +02:00
co-authored by Claude Sonnet 4.6
parent c6fb5154fb
commit 0054322068
3 changed files with 315 additions and 1 deletions
+1 -1
View File
@@ -67,7 +67,7 @@ pending_changes (
)
```
### Step 3 — JMAP session client `[ ]`
### Step 3 — JMAP session client `[x]`
Implement `JmapSession`: parse the JMAP Session object from `GET {jmapUrl}`,
extract `apiUrl`, primary `accountId`, and capabilities. Store nothing extra in the