import { EventEmitter } from 'events'; import { ServiceHandler } from './ServiceHandler'; import { AuthParams, ClientOptions, ClientEventTypes, PingResponse, ServiceHandlerOptions } from './types'; import TaskEvent from './models/TaskEvent'; import TaskCommand from './models/TaskCommand'; export * from './types'; export { TaskEvent, TaskCommand, ServiceHandler }; export declare class Client { private readonly _authParams; private readonly _ddpClient; private readonly _eventEmitter; private _isInitialized; private _isLoggedIn; private _isConnected; private _serviceHandlers; readonly apiVersion = 1; readonly clientVersion = "0.4.2"; get isLoggedIn(): boolean; get isConnected(): boolean; get emitter(): EventEmitter; constructor(authParams: AuthParams, options?: ClientOptions); private init; callMethod: (method: string, ...args: T) => Promise; /** * Pings the server which will return 'pong' */ ping(): Promise; /** * Returns the latency in milliseconds */ getLatency(): Promise; /** * Returns an array of available tenant IDs that the client can access */ getAvailableTenantIds(): Promise; /** * Adds a service handler for the specified tenant ID * Service handlers are used to interact with the API for a specific tenant */ addServiceHandler({ tenantId }: ServiceHandlerOptions): Promise; getServiceHandlers(): ServiceHandler[]; }