MCPcopy Create free account
hub / github.com/bewcloud/bewcloud / syncCollection

Function syncCollection

lib/models/dav.js:9384–9406  ·  view source on GitHub ↗
(params)

Source from the content-addressed store, hash-verified

9382 * This is for webdav sync-collection only
9383 */
9384const syncCollection = (params) => {
9385 const { url, props, headers, syncLevel, syncToken, headersToExclude } = params;
9386 return davRequest({
9387 url,
9388 init: {
9389 method: 'REPORT',
9390 namespace: DAVNamespaceShort.DAV,
9391 headers: excludeHeaders({ ...headers }, headersToExclude),
9392 body: {
9393 'sync-collection': {
9394 _attributes: getDAVAttribute([
9395 DAVNamespace.CALDAV,
9396 DAVNamespace.CARDDAV,
9397 DAVNamespace.DAV,
9398 ]),
9399 'sync-level': syncLevel,
9400 'sync-token': syncToken,
9401 [`${DAVNamespaceShort.DAV}:prop`]: props,
9402 },
9403 },
9404 },
9405 });
9406};
9407/** remote collection to local */
9408const smartCollectionSync = async (params) => {
9409 var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;

Callers 1

smartCollectionSyncFunction · 0.85

Calls 3

davRequestFunction · 0.85
excludeHeadersFunction · 0.85
getDAVAttributeFunction · 0.85

Tested by

no test coverage detected