bryntum / support

An issues-only repository for the Bryntum project management component suite which includes powerful Grid, Scheduler, Calendar, Kanban Task Board and Gantt chart components all built in pure JS / CSS / TypeScript
https://www.bryntum.com
53 stars 6 forks source link

Docs for `CalendarModel` sync response/requests format #9849

Open chuckn0rris opened 1 month ago

chuckn0rris commented 1 month ago

Forum post

Hello, when we add intervals (e.g exceptions ) to a calendar using calendar edit the below is an example of the sync request. What is the expected sync response knowing that intervals are nested under a calendar.

// sync Request
{
    "type": "sync",
    "requestId": 17238950041361,
    "calendars": {
        "updated": [
            {
                "version": 3,
                "intervals": {
                    "added": [
                        {
                            "name": "Default week",
                            "recurrentStartDate": "on Sat",
                            "recurrentEndDate": "on Mon",
                            "isWorking": false,
                            "type": "Week",
                            "availability": null,
                            "compositeCode": "63989b25-cda5-4c91-911a-d2d509a23e2c",
                            "$PhantomId": "_generatedModelClass_7e7bc668-bd18-45f1-9261-d93722ebe14f"
                        },
                        {
                            "name": "Christmas",
                            "startDate": "2024-12-25T00:00:00+12:00",
                            "endDate": "2024-12-25T00:00:00+12:00",
                            "recurrentStartDate": null,
                            "recurrentEndDate": null,
                            "isWorking": false,
                            "type": "Exception",
                            "availability": null,
                            "compositeCode": "60cd5dc7-9fbd-4e66-b6fe-4facadcbe874",
                            "$PhantomId": "_generatedModelClass_499e213d-38b1-4bbb-b071-b686f6dad788"
                        }
                    ]
                },
                "id": "general"
            }
        ]
    }
}