anchorbrowser
Version:
The official TypeScript library for the Anchorbrowser API
34 lines • 1.18 kB
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../core/resource.mjs";
import { path } from "../../internal/utils/path.mjs";
export class Keyboard extends 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(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(path `/v1/sessions/${sessionID}/keyboard/type`, { body, ...options });
}
}
//# sourceMappingURL=keyboard.mjs.map