import type { Handler, MiddlewareHandler } from 'hono';
import type { IPicGo, IServerManager, PluginRouterSetup } from '../../types';
declare class ServerManager implements IServerManager {
private app;
private readonly ctx;
private server?;
private listeningPort?;
private listeningHost?;
private authSecret?;
private warnedQuerySecret;
private staticRoutePrefixes;
constructor(ctx: IPicGo);
registerGet
(path: P, handler: Handler, isInternal?: boolean): void;
registerPost(path: P, handler: Handler, isInternal?: boolean): void;
registerPut(path: P, handler: Handler, isInternal?: boolean): void;
registerDelete(path: P, handler: Handler, isInternal?: boolean): void;
registerMiddleware(path: P, handler: MiddlewareHandler): void;
registerStatic(path: string, root: string): void;
private handleRegister;
mount(path: string, setup: PluginRouterSetup): void;
getServerInfo(): string;
isListening(): boolean;
private initMiddleware;
private initCoreRoutes;
private t;
private getRequestPath;
private isStaticPath;
private shouldSkipAuth;
private extractAuthToken;
private warnQuerySecretOnce;
private getClientIp;
private logUnauthorized;
private handleAuth;
private startServer;
private isExistingPicGoServer;
listen(port?: number, host?: string, ignoreExistingExternalServer?: boolean, secret?: string): Promise;
shutdown(): void;
}
export { ServerManager };