/** * WebDAV type definitions */ export type TWebDAVMethod = | 'OPTIONS' | 'GET' | 'HEAD' | 'PUT' | 'DELETE' | 'PROPFIND' | 'PROPPATCH' | 'MKCOL' | 'COPY' | 'MOVE' | 'LOCK' | 'UNLOCK'; export type TWebDAVDepth = '0' | '1' | 'infinity'; export interface IWebDAVProperty { namespace: string; name: string; value?: string; } export interface IWebDAVResource { href: string; isCollection: boolean; properties: IWebDAVProperty[]; displayName?: string; contentType?: string; contentLength?: number; lastModified?: Date; creationDate?: Date; etag?: string; } export interface IWebDAVLock { token: string; owner: string; depth: TWebDAVDepth; timeout: number; scope: 'exclusive' | 'shared'; type: 'write'; path: string; created: Date; } export interface IWebDAVContext { method: TWebDAVMethod; depth: TWebDAVDepth; lockToken?: string; destination?: string; overwrite: boolean; timeout?: number; } // Standard WebDAV properties (DAV: namespace) export const DAV_NAMESPACE = 'DAV:'; export const DAV_PROPERTIES = { // Required properties creationdate: 'creationdate', displayname: 'displayname', getcontentlanguage: 'getcontentlanguage', getcontentlength: 'getcontentlength', getcontenttype: 'getcontenttype', getetag: 'getetag', getlastmodified: 'getlastmodified', lockdiscovery: 'lockdiscovery', resourcetype: 'resourcetype', supportedlock: 'supportedlock', } as const;