UNPKG

anchorbrowser

Version:

The official TypeScript library for the Anchorbrowser API

80 lines 2.54 kB
"use strict"; // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. Object.defineProperty(exports, "__esModule", { value: true }); exports.Mouse = void 0; const resource_1 = require("../../core/resource.js"); const path_1 = require("../../internal/utils/path.js"); class Mouse extends resource_1.APIResource { /** * Performs a mouse click at the specified coordinates * * @example * ```ts * const response = await client.sessions.mouse.click( * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', * { x: 0, y: 0 }, * ); * ``` */ click(sessionID, body, options) { return this._client.post((0, path_1.path) `/v1/sessions/${sessionID}/mouse/click`, { body, ...options }); } /** * Performs a double click at the specified coordinates * * @example * ```ts * const response = await client.sessions.mouse.doubleClick( * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', * { x: 0, y: 0 }, * ); * ``` */ doubleClick(sessionID, body, options) { return this._client.post((0, path_1.path) `/v1/sessions/${sessionID}/mouse/doubleClick`, { body, ...options }); } /** * Performs a mouse button down action at the specified coordinates * * @example * ```ts * const response = await client.sessions.mouse.down( * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', * { x: 0, y: 0 }, * ); * ``` */ down(sessionID, body, options) { return this._client.post((0, path_1.path) `/v1/sessions/${sessionID}/mouse/down`, { body, ...options }); } /** * Moves the mouse cursor to the specified coordinates * * @example * ```ts * const response = await client.sessions.mouse.move( * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', * { x: 0, y: 0 }, * ); * ``` */ move(sessionID, body, options) { return this._client.post((0, path_1.path) `/v1/sessions/${sessionID}/mouse/move`, { body, ...options }); } /** * Performs a mouse button up action at the specified coordinates * * @example * ```ts * const response = await client.sessions.mouse.up( * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', * { x: 0, y: 0 }, * ); * ``` */ up(sessionID, body, options) { return this._client.post((0, path_1.path) `/v1/sessions/${sessionID}/mouse/up`, { body, ...options }); } } exports.Mouse = Mouse; //# sourceMappingURL=mouse.js.map