Skip to content
File

Blob: src/worker/dav/prop-renderer.ts

typescript12 lines
1import type { PropfindRequest } from "@/worker/xml/dav-request";
2import type { QName } from "@/worker/xml/namespaces";
3import type { Propstat, PropValue } from "@/worker/dav/multistatus";
4 
5export interface DavPropRenderer<TResource, TContext> {
6 supportedProps(context: TContext): QName[];
7 propValue(resource: TResource, prop: QName, context: TContext): PropValue | null;
8 propstats(resource: TResource, request: PropfindRequest, context: TContext): Propstat[];
9}
10 
11export type PropstatsRenderer<TResource> = (resource: TResource) => Propstat[];