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

Function collectionQuery

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

Source from the content-addressed store, hash-verified

9309
9310const debug$4 = getLogger('tsdav:collection');
9311const collectionQuery = async (params) => {
9312 const { url, body, depth, defaultNamespace = DAVNamespaceShort.DAV, headers, headersToExclude, } = params;
9313 const queryResults = await davRequest({
9314 url,
9315 init: {
9316 method: 'REPORT',
9317 headers: excludeHeaders(cleanupFalsy({ depth, ...headers }), headersToExclude),
9318 namespace: defaultNamespace,
9319 body,
9320 },
9321 });
9322 // empty query result
9323 if (queryResults.length === 1 && !queryResults[0].raw) {
9324 return [];
9325 }
9326 return queryResults;
9327};
9328const makeCollection = async (params) => {
9329 const { url, props, depth, headers, headersToExclude } = params;
9330 return davRequest({

Callers 5

addressBookQueryFunction · 0.85
addressBookMultiGetFunction · 0.85
calendarQueryFunction · 0.85
calendarMultiGetFunction · 0.85
freeBusyQueryFunction · 0.85

Calls 3

davRequestFunction · 0.85
excludeHeadersFunction · 0.85
cleanupFalsyFunction · 0.85

Tested by

no test coverage detected