/** * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ export type DavProperty = { [key: string]: string; }; export declare const defaultDavProperties: string[]; export declare const defaultDavNamespaces: { d: string; nc: string; oc: string; ocs: string; }; /** * Register custom DAV properties * * Can be used if your app introduces custom DAV properties, so e.g. the files app can make use of it. * * @param prop The property * @param namespace The namespace of the property */ export declare function registerDavProperty(prop: string, namespace?: DavProperty): boolean; /** * Get the registered dav properties */ export declare function getDavProperties(): string; /** * Get the registered dav namespaces */ export declare function getDavNameSpaces(): string; /** * Get the default PROPFIND request body */ export declare function getDefaultPropfind(): string; /** * Get the REPORT body to filter for favorite nodes */ export declare function getFavoritesReport(): string; /** * Get the SEARCH body to search for recently modified/uploaded files * * @param timestamp Oldest timestamp to include (Unix timestamp) * @param limit Maximum number of items to return * @example * ```ts * // SEARCH for recent files need a different DAV endpoint * const client = davGetClient(generateRemoteUrl('dav')) * // Timestamp of last week * const lastWeek = Math.round(Date.now() / 1000) - (60 * 60 * 24 * 7) * const contentsResponse = await client.getDirectoryContents(path, { * details: true, * data: davGetRecentSearch(lastWeek), * headers: { * method: 'SEARCH', * 'Content-Type': 'application/xml; charset=utf-8', * }, * deep: true, * }) as ResponseDataDetailed * ``` */ export declare function getRecentSearch(timestamp: number, limit?: number): string;