import { SubscriptionResponse, SuccessResponse, ErrorResponse } from "./Types"; declare type rpcType = 'hook' | 'unhook' | 'call'; declare type visibility = 'public' | 'private'; export declare type Outcome = "Success" | "Error"; export declare type UnhookFunction = (uid: string) => Promise; export declare type callbackFunction = (...args: any[]) => Promise; export declare type AsyncFunction = (...args: any[]) => Promise; declare type baseRPC = { type: rpcType; name: string; visibility: visibility; }; declare type hookRPC = baseRPC & { type: 'hook'; func: callbackFunction; unhook: UnhookFunction; }; declare type unhookRPC = baseRPC & { type: 'unhook'; func: UnhookFunction; }; declare type callRPC = baseRPC & { type: 'call'; func: (...args: any[]) => Promise; }; export declare type socketioRPC = callRPC | unhookRPC | hookRPC; export declare type baseInfo = { owner: string; argNames: string[]; }; declare type HookInfo = baseRPC & baseInfo & { type: 'hook'; generator: (socket: any) => callbackFunction; unhook: UnhookFunction; }; declare type UnhookInfo = baseRPC & baseInfo & { type: 'unhook'; func: UnhookFunction; }; declare type CallInfo = baseRPC & baseInfo & { type: 'call'; func: AsyncFunction; }; declare type RpcInfo = HookInfo | UnhookInfo | CallInfo; export declare type ExtendedRpcInfo = RpcInfo & { uniqueName: string; }; export declare const rpcToRpcinfo: (rpc: socketioRPC, owner: string) => RpcInfo; export declare const rpcHooker: (socket: any, owner: string, RPCs: socketioRPC[], makeUnique?: boolean) => ExtendedRpcInfo[]; export {};