nephele
Version:
Highly customizable and extensible WebDAV server for Node.js and Express.
16 lines (15 loc) • 866 B
TypeScript
import type { Request } from 'express';
import type { Method } from '../index.js';
import type { AuthResponse } from './Authenticator.js';
import type { Resource } from './Resource.js';
import type { User } from './User.js';
export interface Adapter {
getComplianceClasses(url: URL, request: Request, response: AuthResponse): Promise<string[]>;
getAllowedMethods(url: URL, request: Request, response: AuthResponse): Promise<string[]>;
getOptionsResponseCacheControl(url: URL, request: Request, response: AuthResponse): Promise<string>;
isAuthorized(url: URL, method: string, baseUrl: URL, user: User): Promise<boolean>;
getResource(url: URL, baseUrl: URL): Promise<Resource>;
newResource(url: URL, baseUrl: URL): Promise<Resource>;
newCollection(url: URL, baseUrl: URL): Promise<Resource>;
getMethod(method: string): typeof Method;
}