linagora / tmail-backend

GNU Affero General Public License v3.0
30 stars 17 forks source link

JMAP specs for JMAP TeamMembers extension #1085

Closed quantranhong1999 closed 3 weeks ago

quantranhong1999 commented 4 weeks ago

Why

We need to document the specs for the new JMAP extension being used to allow users to manage team-mailbox's members (view, add, remove).

How

The proposed sample so far:

[
    "Members/get",
    {
        "accountId": "xyz",
        "ids": ["name-of-team-mailbox"]
    },
    "#0
]    

=> 
[
    "Members/get",
    {
        "list": [{
            "id": "name-of-team-mailbox",
            "members": {
                "bob@domain.tld": {"role":"manager"},
                "alice@domain.tld": {"role":"member"}
             }
         }]
    },
    "#0
}
[
    "Members/set",
    {
        "accountId": "xyz",
        "update": {
            "name-of-team-mailbox"; {
                "member/cedric@domain.tld": {"role":"member"},
                "member/alice@domain.tld": null
            }
        }
    }
    "#0
]    

=> 

[
    "Members/set",
    {
        "updated": {
            "name-of-team-mailbox": null
        }
    },
    "#0
}

DoD

Team consensus.

quantranhong1999 commented 3 weeks ago

https://github.com/linagora/tmail-backend/pull/1097