import { IConnection } from '../connection/IConnection'; export declare type BaseCloudOptions = { host?: string; port?: string | number; ssl?: boolean; onOffline?: () => void; onConnected?: () => void; onDisconnect?: (message?: any) => void; useCloudProtocolV2?: boolean; }; export declare type BrowserOptions = { token: string; }; export declare type APIOptions = { apiUrl?: string; clientId: string; audience?: string; clientSecret: string; }; export declare type CloudOptions = (BrowserOptions | APIOptions) & BaseCloudOptions; export declare function isBrowserOptions(options: CloudOptions): options is BrowserOptions; export declare type CloudMessageValue = string | number | boolean | object; export declare type OnMessageCallback = (message: T) => void; export interface ICloudClient { connect(options: CloudOptions): Promise; reconnect(): Promise; disconnect(): Promise; getToken(): string; updateToken(newToken: string): Promise; sendMessage(topic: string, message: string): Promise; sendMessage(topic: string, message: ArrayBuffer): Promise; sendProperty(thingId: string, name: string, value: T, timestamp?: number): Promise; onPropertyValue(thingId: string, name: string, cb: OnMessageCallback): Promise; }