///
import { AuthOption, SocketOption } from '../types';
import { RoutePath } from './route';
import { Server } from 'http';
interface AppUser extends Express.User {
id?: number;
roles?: string[];
}
export interface RouteRequest {
uri: string | RoutePath;
roles?: string[];
}
interface ExecuteArgs {
path?: {
[key: string]: unknown;
};
body?: {
[key: string]: unknown;
};
user?: AppUser;
}
declare type ExecuteFunction = ((args: ExecuteArgs) => Promise | unknown) & ((req: any, res: any, next: any) => Promise | unknown | void);
export declare const createSocket: (request: RouteRequest, execute: ExecuteFunction) => any;
export declare const socketInit: (server: Server, options: SocketOption, authOption?: AuthOption | undefined) => any;
export declare const getSocketIO: () => any | undefined;
export declare const socketSendTo: (to: string, event: string, data: any) => any;
export declare const socketSendAll: (event: string, data: any) => any;
export {};