File
Blob: src/worker/dav/prop-renderer.ts
| 1 | import type { PropfindRequest } from "@/worker/xml/dav-request"; |
| 2 | import type { QName } from "@/worker/xml/namespaces"; |
| 3 | import type { Propstat, PropValue } from "@/worker/dav/multistatus"; |
| 4 | |
| 5 | export 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 | |
| 11 | export type PropstatsRenderer<TResource> = (resource: TResource) => Propstat[]; |