@hyperbrowser/sdk 0.71.0 → 0.72.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -14,4 +14,5 @@ export declare class ComputerActionService extends BaseService {
|
|
|
14
14
|
mouseDown(session: SessionDetail | string, button?: ComputerActionMouseButton, returnScreenshot?: boolean): Promise<ComputerActionResponse>;
|
|
15
15
|
mouseUp(session: SessionDetail | string, button?: ComputerActionMouseButton, returnScreenshot?: boolean): Promise<ComputerActionResponse>;
|
|
16
16
|
getClipboardText(session: SessionDetail | string, returnScreenshot?: boolean): Promise<ComputerActionResponse>;
|
|
17
|
+
putSelectionText(session: SessionDetail | string, text: string, returnScreenshot?: boolean): Promise<ComputerActionResponse>;
|
|
17
18
|
}
|
|
@@ -111,5 +111,12 @@ class ComputerActionService extends base_1.BaseService {
|
|
|
111
111
|
returnScreenshot,
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
|
+
async putSelectionText(session, text, returnScreenshot = false) {
|
|
115
|
+
return this.executeRequest(session, {
|
|
116
|
+
action: computer_action_1.ComputerAction.PUT_SELECTION_TEXT,
|
|
117
|
+
text,
|
|
118
|
+
returnScreenshot,
|
|
119
|
+
});
|
|
120
|
+
}
|
|
114
121
|
}
|
|
115
122
|
exports.ComputerActionService = ComputerActionService;
|
|
@@ -12,7 +12,8 @@ export declare enum ComputerAction {
|
|
|
12
12
|
SCREENSHOT = "screenshot",
|
|
13
13
|
SCROLL = "scroll",
|
|
14
14
|
TYPE_TEXT = "type_text",
|
|
15
|
-
GET_CLIPBOARD_TEXT = "get_clipboard_text"
|
|
15
|
+
GET_CLIPBOARD_TEXT = "get_clipboard_text",
|
|
16
|
+
PUT_SELECTION_TEXT = "put_selection_text"
|
|
16
17
|
}
|
|
17
18
|
export type ComputerActionMouseButton = "left" | "right" | "middle" | "back" | "forward" | "wheel";
|
|
18
19
|
/**
|
|
@@ -112,10 +113,15 @@ export interface GetClipboardTextActionParams {
|
|
|
112
113
|
action: ComputerAction.GET_CLIPBOARD_TEXT;
|
|
113
114
|
returnScreenshot?: boolean;
|
|
114
115
|
}
|
|
116
|
+
export interface PutSelectionTextActionParams {
|
|
117
|
+
action: ComputerAction.PUT_SELECTION_TEXT;
|
|
118
|
+
text: string;
|
|
119
|
+
returnScreenshot?: boolean;
|
|
120
|
+
}
|
|
115
121
|
/**
|
|
116
122
|
* Union type for all computer action parameters
|
|
117
123
|
*/
|
|
118
|
-
export type ComputerActionParams = ClickActionParams | DragActionParams | PressKeysActionParams | MoveMouseActionParams | ScreenshotActionParams | ScrollActionParams | TypeTextActionParams | HoldKeyActionParams | MouseDownActionParams | MouseUpActionParams | GetClipboardTextActionParams;
|
|
124
|
+
export type ComputerActionParams = ClickActionParams | DragActionParams | PressKeysActionParams | MoveMouseActionParams | ScreenshotActionParams | ScrollActionParams | TypeTextActionParams | HoldKeyActionParams | MouseDownActionParams | MouseUpActionParams | GetClipboardTextActionParams | PutSelectionTextActionParams;
|
|
119
125
|
export interface ComputerActionResponseDataClipboardText {
|
|
120
126
|
clipboardText?: string;
|
|
121
127
|
}
|
|
@@ -17,4 +17,5 @@ var ComputerAction;
|
|
|
17
17
|
ComputerAction["SCROLL"] = "scroll";
|
|
18
18
|
ComputerAction["TYPE_TEXT"] = "type_text";
|
|
19
19
|
ComputerAction["GET_CLIPBOARD_TEXT"] = "get_clipboard_text";
|
|
20
|
+
ComputerAction["PUT_SELECTION_TEXT"] = "put_selection_text";
|
|
20
21
|
})(ComputerAction || (exports.ComputerAction = ComputerAction = {}));
|
package/dist/types/index.d.ts
CHANGED
|
@@ -12,4 +12,4 @@ export { CreateProfileParams, ProfileResponse, CreateProfileResponse, ProfileLis
|
|
|
12
12
|
export { CreateExtensionParams, CreateExtensionResponse, ListExtensionsResponse, } from "./extension";
|
|
13
13
|
export { ExtractJobStatus, BrowserUseTaskStatus, BrowserUseLlm, ClaudeComputerUseLlm, GeminiComputerUseLlm, ScrapeScreenshotFormat, ScrapeJobStatus, CrawlJobStatus, Country, State, ISO639_1, OperatingSystem, Platform, ScrapeFormat, ScrapeWaitUntil, ScrapePageStatus, CrawlPageStatus, RecordingStatus, DownloadsStatus, HyperAgentLlm, HyperAgentTaskStatus, ClaudeComputerUseTaskStatus, CuaTaskStatus, GeminiComputerUseTaskStatus, SessionEventLogType, SessionRegion, BrowserUseVersion, } from "./constants";
|
|
14
14
|
export { TeamCreditInfo } from "./team";
|
|
15
|
-
export { ComputerAction, Coordinate, ClickActionParams, DragActionParams, PressKeysActionParams, MoveMouseActionParams, ScreenshotActionParams, ScrollActionParams, TypeTextActionParams, ComputerActionParams, ComputerActionResponse, ComputerActionMouseButton, ComputerActionResponseData, HoldKeyActionParams, MouseDownActionParams, MouseUpActionParams, GetClipboardTextActionParams, ComputerActionResponseDataClipboardText, } from "./computer-action";
|
|
15
|
+
export { ComputerAction, Coordinate, ClickActionParams, DragActionParams, PressKeysActionParams, MoveMouseActionParams, ScreenshotActionParams, ScrollActionParams, TypeTextActionParams, ComputerActionParams, ComputerActionResponse, ComputerActionMouseButton, ComputerActionResponseData, HoldKeyActionParams, MouseDownActionParams, MouseUpActionParams, GetClipboardTextActionParams, PutSelectionTextActionParams, ComputerActionResponseDataClipboardText, } from "./computer-action";
|