You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "Benoit Tellier (Jira)" <se...@james.apache.org> on 2020/08/17 09:54:00 UTC

[jira] [Updated] (JAMES-3359) Mailbox/set update: name implementation

     [ https://issues.apache.org/jira/browse/JAMES-3359?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benoit Tellier updated JAMES-3359:
----------------------------------
    Fix Version/s: 3.6.0

> Mailbox/set update: name implementation
> ---------------------------------------
>
>                 Key: JAMES-3359
>                 URL: https://issues.apache.org/jira/browse/JAMES-3359
>             Project: James Server
>          Issue Type: Improvement
>            Reporter: Benoit Tellier
>            Priority: Major
>             Fix For: 3.6.0
>
>
> This is a first simple implementation of the update part of Mailbox/set. It should follow the JMAP core specification section /set https://jmap.io/spec-core.html#set
> For this time, we just focus here on being able to update the name of a mailbox. The rest will follow up in other tickets.
> **JSON request**
> You will need to add to the existing `Mailbox/set` request the following property:
> * **update**: `Id[PatchObject]|null` A map of an id to a Patch object to apply to the current Foo object with that id, or null if no objects are to be updated.
> For now, only the `name` property is allowed to be updated.
> {code:json}
> {
>    "using": [ "urn:ietf:params:jmap:core", "urn:ietf:params:jmap:mail" ],
>    "methodCalls": [
>        [
>            "Mailbox/set", 
>            {
>                 "accountId": "JMAP-ID",
>                 "ifInState": "123",
>                 "create": null,
>                 "update": {
>                     "001": {
>                         "name": "new mailbox"
>                     }
>                 },
>                 "destroy": null
>            }
>        ]
>    ]
> }
> {code}
> **JSON response**
> The existing response should add the following property:
> * **updated**: `Id[Mailbox|null]|null` The keys in this map are the ids of all Mailboxes that were successfully updated.
> The value for each id is a Mailbox object containing any property that changed in a way not explicitly requested by the PatchObject sent to the server, or null if none. This lets the client know of any changes to server-set or computed properties.
> This argument is null if no Mailbox objects were successfully updated.
> {code:json}
> {
>    "methodResponses": [
>        [
>            "Mailbox/set", 
>            {
>                 "accountId": "JMAP-ID", // the requested accountId
>                 "oldState": "123",
>                 "newState": "124",
>                 "created": null,
>                 "updated": {
>                    "001": null
>                 }
>                 "destroyed": null
>            }
>        ]
>    ], 
>    "sessionState": "abc"
> }
> {code}
> Notes:
> * `notUpdated` and errors will be handled in #1747 
> **DoD**: unit and integration tests (memory and distributed james)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org