UNPKG

anchorbrowser

Version:

The official TypeScript library for the Anchorbrowser API

38 lines 1.34 kB
"use strict"; // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. Object.defineProperty(exports, "__esModule", { value: true }); exports.Keyboard = void 0; const resource_1 = require("../../core/resource.js"); const path_1 = require("../../internal/utils/path.js"); class Keyboard extends resource_1.APIResource { /** * Performs a keyboard shortcut using the specified keys * * @example * ```ts * const response = await client.sessions.keyboard.shortcut( * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', * { keys: ['Ctrl', 'a'] }, * ); * ``` */ shortcut(sessionID, body, options) { return this._client.post((0, path_1.path) `/v1/sessions/${sessionID}/keyboard/shortcut`, { body, ...options }); } /** * Types the specified text with optional delay between keystrokes * * @example * ```ts * const response = await client.sessions.keyboard.type( * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', * { text: 'Hello from Session Manager VNC API test!' }, * ); * ``` */ type(sessionID, body, options) { return this._client.post((0, path_1.path) `/v1/sessions/${sessionID}/keyboard/type`, { body, ...options }); } } exports.Keyboard = Keyboard; //# sourceMappingURL=keyboard.js.map