Details
-
Sub-task
-
Status: Closed
-
Major
-
Resolution: Done
-
None
-
None
-
None
Description
Objective
Allow submitting modifications to the VacationResponse object using VacationResponse/set method.
Example
{ "using": [ "urn:ietf:params:jmap:core", "urn:ietf:params:jmap:mail", "urn:ietf:params:jmap:vacationresponse" ], "methodCalls": [[ "VacationResponse/set", { "accountId": "u123456", "update": { "singleton": { "id":"singleton", "isEnabled": "true", "fromDate": "2014-10-30T14:12:00+08:00", "toDate": "2014-18-30T14:12:00+08:00", "subject": I am in vacation"", "textBody": "I'm currently enjoying life. Please distrub me later", "htmlBody": "I'm currently enjoying <b>life</b>. <br/>Please distrub me later" } } }, "0" ]] } Would return { "sessionState": "75128aab4b1b", "methodResponses": [ ["VacationResponse/set", { "accountId": "29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6", "newState": "000001", "updated": { "singleton": {} } }, "c1"]] }
Corner cases
- Omitting the capability urn:ietf:params:jmap:vacationresponse should fail (the method does not exist)
- Modifications to another vacation than "singleton" should be rejected
- creation and deletion should be rejected as there must always be exactly one vacation response
- from date needs to be before to date
- Manage serialization errors correctly - invalid vacation response must not lead to a method level error