UNPKG

browser-use-typescript

Version:

A TypeScript-based browser automation framework

164 lines (163 loc) 4.11 kB
import { z } from "zod"; export declare const SearchGoogleActionSchema: z.ZodObject<{ query: z.ZodString; }, "strip", z.ZodTypeAny, { query: string; }, { query: string; }>; export declare const ClickElementBySelectorActionSchema: z.ZodObject<{ css_selector: z.ZodString; }, "strip", z.ZodTypeAny, { css_selector: string; }, { css_selector: string; }>; export declare const ClickElementByTextActionSchema: z.ZodObject<{ text: z.ZodString; nth: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { text: string; nth?: number | undefined; }, { text: string; nth?: number | undefined; }>; export declare const GroupTabsActionSchema: z.ZodObject<{ tab_ids: z.ZodArray<z.ZodNumber, "many">; title: z.ZodString; color: z.ZodOptional<z.ZodObject<{ color: z.ZodDefault<z.ZodString>; description: z.ZodString; }, "strip", z.ZodTypeAny, { color: string; description: string; }, { description: string; color?: string | undefined; }>>; }, "strip", z.ZodTypeAny, { title: string; tab_ids: number[]; color?: { color: string; description: string; } | undefined; }, { title: string; tab_ids: number[]; color?: { description: string; color?: string | undefined; } | undefined; }>; export declare const UngroupTabsActionSchema: z.ZodObject<{ tab_ids: z.ZodArray<z.ZodNumber, "many">; }, "strip", z.ZodTypeAny, { tab_ids: number[]; }, { tab_ids: number[]; }>; export declare const ClickElementByXpathActionSchema: z.ZodObject<{ xpath: z.ZodString; }, "strip", z.ZodTypeAny, { xpath: string; }, { xpath: string; }>; export declare const GoToUrlActionSchema: z.ZodObject<{ url: z.ZodString; }, "strip", z.ZodTypeAny, { url: string; }, { url: string; }>; export declare const ScrolltoTextActionSchema: z.ZodObject<{ text: z.ZodString; }, "strip", z.ZodTypeAny, { text: string; }, { text: string; }>; export declare const ClickElementActionSchema: z.ZodObject<{ index: z.ZodNumber; xpath: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { index: number; xpath?: string | undefined; }, { index: number; xpath?: string | undefined; }>; export declare const InputTextActionSchema: z.ZodObject<{ index: z.ZodNumber; text: z.ZodString; xpath: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { text: string; index: number; xpath?: string | undefined; }, { text: string; index: number; xpath?: string | undefined; }>; export declare const DoneActionSchema: z.ZodObject<{ text: z.ZodString; success: z.ZodBoolean; }, "strip", z.ZodTypeAny, { text: string; success: boolean; }, { text: string; success: boolean; }>; export declare const SwitchTabActionSchema: z.ZodObject<{ page_id: z.ZodNumber; }, "strip", z.ZodTypeAny, { page_id: number; }, { page_id: number; }>; export declare const OpenTabActionSchema: z.ZodObject<{ url: z.ZodString; }, "strip", z.ZodTypeAny, { url: string; }, { url: string; }>; export declare const ScrollActionSchema: z.ZodObject<{ amount: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { amount?: number | undefined; }, { amount?: number | undefined; }>; export declare const SendKeysActionSchema: z.ZodObject<{ keys: z.ZodString; }, "strip", z.ZodTypeAny, { keys: string; }, { keys: string; }>; export declare const ExtractPageContentActionSchema: z.ZodObject<{ value: z.ZodString; }, "strip", z.ZodTypeAny, { value: string; }, { value: string; }>; export declare const NoParamsActionSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>; export declare enum ActionType { SEARCH_GOOGLE = "SEARCH_GOOGLE", GO_TO_URL = "GO_TO_URL", CLICK_ELEMENT = "CLICK_ELEMENT", INPUT_TEXT = "INPUT_TEXT", DONE = "DONE", SWITCH_TAB = "SWITCH_TAB", OPEN_TAB = "OPEN_TAB", SCROLL = "SCROLL", SEND_KEYS = "SEND_KEYS", EXTRACT_PAGE_CONTENT = "EXTRACT_PAGE_CONTENT", NO_PARAMS = "NO_PARAMS" }