appium-lg-webos-driver
Version:
LG WebOS support for Appium
84 lines • 3.18 kB
TypeScript
export namespace WsEvent {
const CONNECT: "connect";
const CLOSE: "close";
const ERROR: "error";
const OPEN: "open";
const MESSAGE: "message";
}
export class LGWSClient {
/**
*
* @param {any} msg
* @returns {msg is import('../types').RegisteredMsg}
*/
static isRegisteredMsg(msg: any): msg is import("../types").RegisteredMsg;
/**
*
* @param {any} msg
* @returns {msg is import('../types').PromptMsg}
*/
static isPromptMsg(msg: any): msg is import("../types").PromptMsg;
/**
*
* @param {import('../types').LGSocketClientOpts} opts
*/
constructor({ url, urlSecure, useSecureWebsocket, valueBox, deviceName, log, saveClientKey, remoteKeyCooldown, }: import('../types').LGSocketClientOpts);
/**
* @returns {Promise<void>}
*/
connect(): Promise<void>;
/**
* @returns {Promise<void>}
*/
disconnect(): Promise<void>;
/**
*
* @returns {Promise<string>}
*/
authenticate(): Promise<string>;
/**
*
* @returns {Promise<string>}
*/
initialize(): Promise<string>;
/**
* @template {import('./constants').MessageType} T
* @template {SerializableObject|void} [P=void]
* @template {SerializableObject} [R=any]
* @param {T} type
* @param {string} [uri]
* @param {T extends 'register' ? AuthPayload : P} [payload]
* @returns {Promise<InboundMsg<R>>}
*/
command<T extends import("./constants").MessageType, P extends void | import("../types").SerializableObject = void, R extends import("../types").SerializableObject = any>(type: T, uri?: string | undefined, payload?: (T extends "register" ? import("./constants").AuthPayload : P) | undefined): Promise<import("../types").InboundMsg<R>>;
/**
* @template {SerializableObject|void} [P=void]
* @template {SerializableObject} [R=any]
* @param {string} uri
* @param {P} [payload]
* @returns {Promise<R|undefined>}
*/
request<P_1 extends void | import("../types").SerializableObject = void, R_1 extends import("../types").SerializableObject = any>(uri: string, payload?: P_1 | undefined): Promise<R_1 | undefined>;
getListApps(): Promise<any>;
getForegroundAppInfo(): Promise<any>;
getRemoteClient(): Promise<LGRemoteClient>;
getServiceList(): Promise<any>;
getVolume(): Promise<any>;
volumeUp(): Promise<any>;
volumeDown(): Promise<any>;
mute(): Promise<any>;
unmute(): Promise<any>;
play(): Promise<any>;
stop(): Promise<any>;
rewind(): Promise<any>;
fastForward(): Promise<any>;
channelDown(): Promise<any>;
channelUp(): Promise<any>;
#private;
}
export type AuthPayload = import('./constants').AuthPayload;
export type SerializableObject = import('../types').SerializableObject;
export type InboundMsg<P extends import("../types").SerializableObject = any> = import('../types').InboundMsg<P>;
export type OutboundMsg<P extends void | import("../types").SerializableObject = void> = import('../types').OutboundMsg<P>;
import { LGRemoteClient } from "./lg-remote-client";
//# sourceMappingURL=lg-socket-client.d.ts.map