import { Notification } from './event'; import { Options as RequestOptions, Signer } from './request'; import { WSConversation } from './ws/cli'; export interface Descriptors { type: 'service' | 'event'; methods: string[]; events: string[]; } export interface Options extends RequestOptions { sender?: string; } export interface Methods { [method: string]: (args?: any, opts?: Options) => Promise; } export declare class WrapClient extends Notification { private m_desc; protected m_name: string; private m_host; private m_cli; private m_methods; constructor(host: APIStore, name: string, cli: any, desc: Descriptors); get methods(): Methods; getNoticer(name: string): import("./event").EventNoticer>; protected _call(name: string, full_name: string, ...args: any[]): Promise; call(name: string, data?: any, opts?: Options): Promise; trigger(name: string, data: any): void; } /** * @class APIStore */ export default class APIStore extends Notification { private m_name; private m_conv; private m_req; private m_descriptors; private m_timeoutid; private m_signer; private m_request_headers; private m_port; private m_ssl; private m_host; private m_prefix; private m_core; private m_isLoaded; get name(): string; get descriptors(): Dict; get core(): Dict; constructor(name?: string); get conv(): WSConversation | null; private _getWssocketConv; destroy(): void; get isLoaded(): boolean; get requestHeaders(): Dict; setRequestHeaders(headers: Dict): void; setSigner(signer: Signer): void; initialize({ host, port, ssl, prefix, descriptors, }: { host?: string; port?: string; ssl?: boolean; prefix?: string; descriptors?: Dict; }): Promise; trigger(name: string, data: any): void; }