Expand description
RFC 8620 §5 generic method-response shapes shared by all JMAP method types.
These wire types are normative — every JMAP /get, /set, /changes,
/query, and /queryChanges method (across mail, calendars, contacts,
chat, etc.) returns one of these shapes. Centralising them here avoids
drift between the seven jmap-*-client crates that previously each
defined their own copies. Server crates may still hand-build wire JSON
for their /set responses (so they can use the typed
SetErrorType enum at construction time); this crate’s
SetError is the deserialization target on the client side.
All types use camelCase JSON via #[serde(rename_all = "camelCase")] and
are marked #[non_exhaustive] so future RFC errata or extensions can add
fields without a SemVer break.
§Spec references
| Type | Spec |
|---|---|
GetResponse | RFC 8620 §5.1 |
ChangesResponse | RFC 8620 §5.2 |
SetResponse, SetError | RFC 8620 §5.3 |
QueryResponse | RFC 8620 §5.5 |
QueryChangesResponse, AddedItem | RFC 8620 §5.6 |
Structs§
- Added
Item - A single item added to a query result set (RFC 8620 §5.6).
- Changes
Response - RFC 8620 §5.2 —
Foo/changesresponse shape. - GetResponse
- RFC 8620 §5.1 —
Foo/getresponse shape. - Query
Changes Response - RFC 8620 §5.6 —
Foo/queryChangesresponse shape. - Query
Response - RFC 8620 §5.5 —
Foo/queryresponse shape. - SetError
- A per-item failure in a
/setresponse (RFC 8620 §5.3). - SetResponse
- RFC 8620 §5.3 —
Foo/setresponse shape.