anchorbrowser
Version:
The official TypeScript library for the Anchorbrowser API
59 lines • 1.91 kB
text/typescript
import { APIResource } from "../../core/resource.mjs";
import { APIPromise } from "../../core/api-promise.mjs";
import { RequestOptions } from "../../internal/request-options.mjs";
export declare 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: string, body: KeyboardShortcutParams, options?: RequestOptions): APIPromise<KeyboardShortcutResponse>;
/**
* 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: string, body: KeyboardTypeParams, options?: RequestOptions): APIPromise<KeyboardTypeResponse>;
}
export interface KeyboardShortcutResponse {
status?: string;
}
export interface KeyboardTypeResponse {
status?: string;
}
export interface KeyboardShortcutParams {
/**
* Array of keys to press simultaneously
*/
keys: Array<string>;
/**
* Time to hold the keys down in milliseconds
*/
holdTime?: number;
}
export interface KeyboardTypeParams {
/**
* Text to type
*/
text: string;
/**
* Delay between keystrokes in milliseconds
*/
delay?: number;
}
export declare namespace Keyboard {
export { type KeyboardShortcutResponse as KeyboardShortcutResponse, type KeyboardTypeResponse as KeyboardTypeResponse, type KeyboardShortcutParams as KeyboardShortcutParams, type KeyboardTypeParams as KeyboardTypeParams, };
}
//# sourceMappingURL=keyboard.d.mts.map