import EventEmitter from 'node:events'; import type { ServerOptions } from '../types.js'; import type { DataStore, CancellationContext } from '@tus/utils'; import { type Upload } from '@tus/utils'; export declare class BaseHandler extends EventEmitter { options: ServerOptions; store: DataStore; constructor(store: DataStore, options: ServerOptions); write(status: number, headers?: {}, body?: string): import("undici-types").Response; generateUrl(req: Request, id: string): string; getFileIdFromRequest(req: Request): string | undefined; static extractHostAndProto(headers: Headers, respectForwardedHeaders?: boolean): { host: string; proto: string; }; protected getLocker(req: Request): Promise; protected acquireLock(req: Request, id: string, context: CancellationContext): Promise; protected writeToStore(webStream: ReadableStream | null, upload: Upload, maxFileSize: number, context: CancellationContext): Promise; getConfiguredMaxSize(req: Request, id: string | null): number | Promise; /** * Calculates the maximum allowed size for the body of an upload request. * This function considers both the server's configured maximum size and * the specifics of the upload, such as whether the size is deferred or fixed. */ calculateMaxBodySize(req: Request, file: Upload, configuredMaxSize?: number): Promise; } //# sourceMappingURL=BaseHandler.d.ts.map