import { IO } from "../common"; import { AnyHandler } from "../http/types"; import { MiddlewareFunction } from "../common/middleware.types"; import { AbstractSocket } from "./types"; export interface SocketHandlerOptions { middlewares?: { pre?: MiddlewareFunction[]; post?: MiddlewareFunction[]; }; auth?: { required?: boolean; roles?: string[]; }; rateLimit?: { maxRequests: number; windowMs: number; }; validation?: { schema?: any; }; [key: string]: any; } export declare class SocketHandler { readonly event: string | string[]; readonly handler: AnyHandler; readonly options?: SocketHandlerOptions; readonly io?: IO; constructor(event: string | string[], handler: AnyHandler, options?: SocketHandlerOptions, io?: IO); execute(socket: AbstractSocket, data: any, eventName: string): Promise; private executeMiddleware; matches(eventName: string): boolean; getEvents(): string[]; }