linagora / tmail-backend

GNU Affero General Public License v3.0
41 stars 22 forks source link

JMAP CalendarEvent/parse for start, end, duration, timeZone, location #570

Closed quantranhong1999 closed 1 year ago

quantranhong1999 commented 1 year ago

Similar as https://github.com/linagora/tmail-backend/issues/565 but for start, end, duration, timeZone, location fields

JMAP request:

{
    "using": [
        "urn:ietf:params:jmap:core",
        "com:linagora:params:calendar:event"
    ],
    "methodCalls": [
        [
            "CalendarEvent/parse",
            {
                "accountId": "29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6",
                "blobIds": ["blobIdParsable", "blobIdNotParsable", "blobIdNotFound"]
            },
            "c1"
        ]
    ]
}

Response:

{
    "sessionState": "2c9f1b12-b35a-43e6-9af2-0106fb53a943",
    "methodResponses": [
        [
            "CalendarEvent/parse",
            {
                "accountId": "29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6",
                "notFound": ["blobIdNotFound"],
                "notParsable": ["blobIdNotParsable"],
                "parsed": {
                    "blobIdParsable": {
                        "start": "2023-02-09T10:00:00",
                        "duration": "PT2H0M0S",
                        "end": "2023-02-09T12:00:00",
                        "timeZone": "Asia/Ho_Chi_Minh",
                        "location": "5 Dien Bien Phu, Ha Noi"
                    }
                }
            },
            "c1"
        ]
    ]
}
chibenwa commented 1 year ago

Provide expected jmap request + response?

vttranlina commented 1 year ago

pr https://github.com/linagora/tmail-backend/pull/587