UNPKG

ithit.webdav.server

Version:

With IT Hit WebDAV Server Engine for Node.js you can create your own WebDAV server, add WebDAV support to your existing Node.js project or DAV-enable your CMS/DMS/CRM.

27 lines (26 loc) 1.06 kB
import { DavContextBase } from "../DavContextBase"; import { IHierarchyItem } from "../IHierarchyItem"; /** * @copyright Copyright (c) 2017 IT Hit. All rights reserved. */ /** * Provides point of extension to REPORT requests. * @remarks If you need to implement your own report, * implement this interface and register it with {@link DavEngine.registerReportHandler} method. * Engine will call this handler when it needs to execute a report. */ export interface IReportHandler { /** * Determines whether this report can be executed for an item. * @param item Item to determine whether the report applies to it. * @returns true if the report applies to the item. */ appliesTo(item: IHierarchyItem): boolean; /** * Generates report response. * @param context Context. * @param item Item for which request is sent. * @param reportElement Root request XML element. */ handleReport(context: DavContextBase, item: IHierarchyItem, reportElement: HTMLElement): Promise<void>; }