Contributing
First you need to clone the repo and
Build
or
Test
to run tests locally, you need to setup environnement variables using .env file from .env.example
and fill in the missing values
If you didn't add any new api, you should set MOCK_FETCH="true".
If you added new api and need to test against cloud providers, you should set
MOCK_FETCH="false" and RECORD_NETWORK_REQUESTS="true" to updated network request mock data.
WEBDAV quick guide
WEBDAV uses xml for all its data when communicating, the basic element is object, multiple objects can form a collection, webdav server have accounts and an account have a principal resource (i.e the default, main resource) and under that principal resource we have home set of the said resource where your actual resources are.
syncToken and ctag are basically like hash of the object/collection, if anything in it changes, this token will change.
For caldav, the calendar data in caldav are in rfc5545 ical format, there's iCal2Js and js2iCal function with my other project pretty-jcal to help your convert them from/to js objects.
Here's cheat sheet on webdav operations compared with rest:
| Operation | Webdav | REST | 
|---|
| Create collection | predefined id: MKCOL /entities/$predefined_idno predefined id: not possiblecan set attributes right away with extended-mkcol extensionStatus: 201 Created
 | POST /entitieswith JSON body with attributes, response contains new idStatus: 200 with new id and optionally the whole object
 | 
| Create entity | predefined id: PUT /entities/$predefined_idwith body, empty responseno predefined id: POST /entities, receive id as part of Content-Location headercan't set attributes right away, need subsequent PROPPATCHStatus: 201 Created
 | 
| Update entity body | PUT /entities/$predefined_idwith new body (no attributes)Status: 204 No Content
 | Full: PUT /entities/$idwith full JSON body with attributesStatus 200, receive full object backPartial: PATCH /entities/$idwith partial JSON containing only attributes to update.Status 200, full/partial object returned
 | 
| Update entity attributes | PROPPATCH /entities/$idwith XML body of attributes to changeStatus: 207, XML body with accepted attributes
 | 
| Delete entity | DELETE /entities/$idSattus: 204 no content
 | 
| List entities | PROPFIND /entitieswith XML body of attributes to fetchStatus 207 multi-status XML response with multiple entities and their respective attributes
 | GET /entitiesStatus: 200 OK, receive JSON response array with JSON body of entity attributes
 | 
| Get entity | GET /entities/$idStatus: 200 OK with entitiy body
 | GET /entities/$idStatus 200 OK, receive JSON body of entity attributes
 | 
| Get entity attributes | PROPFIND /entities/$idwith XML body of attributes to fetchStatus 207 multi-status XML response with entity attributes
 | 
| Notes | cannot always set attributes right away at creation time, need subsequent PROPPATCH
 | no concept of body vs attributesentity can be either collection or model (for collection /entities/$collectionId/$itemId)
 |