UNPKG

xoh-xapi

Version:
25 lines (24 loc) 774 B
import WebSocketNoBrowser from 'ws'; export declare function createCustomTag(): string; export interface ACCOUNT { accountId: string; password: string; type?: string; broker?: string; } export interface REQUEST_BODY { command: string; arguments?: {}; customTag?: string; } export declare class SocketManager { static send: (webSocket: WebSocket | WebSocketNoBrowser, body: string, customTag: string) => Promise<unknown>; } export declare class Request { protected webSocket: WebSocket | WebSocketNoBrowser; protected body: REQUEST_BODY; protected customTag: string; constructor(webSocket: WebSocket | WebSocketNoBrowser, body: REQUEST_BODY); isValid(): boolean; send: () => Promise<unknown>; }