/** * This file was auto-generated by Fern from our API Definition. */ import * as environments from "../../../../environments"; import * as core from "../../../../core"; import * as Airtop from "../../../index"; export declare namespace Windows { interface Options { environment?: core.Supplier; /** Specify a custom URL to connect the client to. */ baseUrl?: core.Supplier; apiKey: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Additional headers to include in the request. */ headers?: Record; } } export declare class Windows { protected readonly _options: Windows.Options; constructor(_options: Windows.Options); /** * Create an automation of a browser window asynchronously * * @param {string} sessionId - The session id for the window. * @param {string} windowId - The Airtop window id of the browser window. * @param {Airtop.AsyncCreateAutomationRequest} request * @param {Windows.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.windows.asyncCreateAutomation("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430") */ asyncCreateAutomation(sessionId: string, windowId: string, request?: Airtop.AsyncCreateAutomationRequest, requestOptions?: Windows.RequestOptions): Promise; /** * Create a form filler automation asynchronously * * @param {string} sessionId - The session id for the window. * @param {string} windowId - The Airtop window id of the browser window. * @param {Airtop.AsyncCreateFormFillerRequest} request * @param {Windows.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.windows.asyncCreateFormFiller("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430") */ asyncCreateFormFiller(sessionId: string, windowId: string, request?: Airtop.AsyncCreateFormFillerRequest, requestOptions?: Windows.RequestOptions): Promise; /** * Execute an automation of a browser window asynchronously * * @param {string} sessionId - The session id for the window. * @param {string} windowId - The Airtop window id of the browser window. * @param {Airtop.AsyncExecuteAutomationRequest} request * @param {Windows.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.windows.asyncExecuteAutomation("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", { * automationId: "automationId" * }) */ asyncExecuteAutomation(sessionId: string, windowId: string, request: Airtop.AsyncExecuteAutomationRequest, requestOptions?: Windows.RequestOptions): Promise; /** * Fill a form of a browser window asynchronously using a form-filler automation * * @param {string} sessionId - The session id for the window. * @param {string} windowId - The Airtop window id of the browser window. * @param {Airtop.AsyncFillFormRequest} request * @param {Windows.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.windows.asyncFillForm("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", { * automationId: "automationId" * }) */ asyncFillForm(sessionId: string, windowId: string, request: Airtop.AsyncFillFormRequest, requestOptions?: Windows.RequestOptions): Promise; /** * Lists all browser windows in a session. * * @param {string} sessionId - ID of the session to list windows for. * @param {Windows.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.windows.list("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b") */ list(sessionId: string, requestOptions?: Windows.RequestOptions): Promise; /** * Creates a new browser window in a session. Optionally, you can specify a url to load on the window upon creation. * * @param {string} sessionId - ID of the session that owns the window. * @param {Airtop.CreateWindowInputV1Body} request * @param {Windows.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.windows.create("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b") */ create(sessionId: string, request?: Airtop.CreateWindowInputV1Body, requestOptions?: Windows.RequestOptions): Promise; /** * Get information about a browser window in a session, including the live view url. * * @param {string} sessionId - ID of the session that owns the window. * @param {string} windowId - ID of the browser window, which can either be a normal AirTop windowId or a [CDP TargetId](https://chromedevtools.github.io/devtools-protocol/tot/Target/#type-TargetID) from a browser automation library like Puppeteer (typically associated with the page or main frame). Our SDKs will handle retrieving a TargetId for you from various popular browser automation libraries, but we also have details in our guides on how to do it manually. * @param {Airtop.GetWindowInfoRequest} request * @param {Windows.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.windows.getWindowInfo("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "7334da2a-91b0-42c5-6156-76a5eba87430", { * screenResolution: "1280x720" * }) */ getWindowInfo(sessionId: string, windowId: string, request?: Airtop.GetWindowInfoRequest, requestOptions?: Windows.RequestOptions): Promise; /** * Loads a specified url on a given window * * @param {string} sessionId - ID of the session that owns the window. * @param {string} windowId - Airtop window ID of the browser window. * @param {Airtop.WindowLoadUrlV1Body} request * @param {Windows.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.windows.loadUrl("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "7334da2a-91b0-42c5-6156-76a5eba87430", { * url: "https://www.airtop.ai" * }) */ loadUrl(sessionId: string, windowId: string, request: Airtop.WindowLoadUrlV1Body, requestOptions?: Windows.RequestOptions): Promise; /** * Closes a browser window in a session * * @param {string} sessionId - ID of the session that owns the window. * @param {string} windowId - Airtop window ID of the browser window. * @param {Windows.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.windows.close("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "7334da2a-91b0-42c5-6156-76a5eba87430") */ close(sessionId: string, windowId: string, requestOptions?: Windows.RequestOptions): Promise; /** * Execute a click interaction in a specific browser window * * @param {string} sessionId - The session id for the window. * @param {string} windowId - The Airtop window id of the browser window. * @param {Airtop.SessionClickHandlerRequestBody} request * @param {Windows.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.windows.click("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", { * elementDescription: "The login button" * }) */ click(sessionId: string, windowId: string, request: Airtop.SessionClickHandlerRequestBody, requestOptions?: Windows.RequestOptions): Promise; /** * Create a form-filler automation synchronously for the form loaded in the browser window * * @param {string} sessionId - The session id for the window. * @param {string} windowId - The Airtop window id of the browser window. * @param {Airtop.CreateFormFillerRequest} request * @param {Windows.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.windows.createFormFiller("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430") */ createFormFiller(sessionId: string, windowId: string, request?: Airtop.CreateFormFillerRequest, requestOptions?: Windows.RequestOptions): Promise; /** * Execute a file input interaction in a specific browser window. * includeHiddenElements defaults to true and considers hidden file input elements. * If there is only one file input element, it will be used directly. * If there are multiple file input elements, the elementDescription will be used by AI to * select among them. * If no file input elements are found by inspecting the page structure, elementDescription * will be used by AI to try to find a match visually. * * @param {string} sessionId - The session id for the window. * @param {string} windowId - The Airtop window id of the browser window. * @param {Airtop.SessionFileInputHandlerRequestBody} request * @param {Windows.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.windows.fileInput("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430") */ fileInput(sessionId: string, windowId: string, request?: Airtop.SessionFileInputHandlerRequestBody, requestOptions?: Windows.RequestOptions): Promise; /** * Fill a form of a browser window synchronously using a form-filler automation * * @param {string} sessionId - The session id for the window. * @param {string} windowId - The Airtop window id of the browser window. * @param {Airtop.FillFormRequest} request * @param {Windows.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.windows.fillForm("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", { * automationId: "automationId" * }) */ fillForm(sessionId: string, windowId: string, request: Airtop.FillFormRequest, requestOptions?: Windows.RequestOptions): Promise; /** * Execute a hover interaction in a specific browser window * * @param {string} sessionId - The session id for the window. * @param {string} windowId - The Airtop window id of the browser window. * @param {Airtop.SessionHoverHandlerRequestBody} request * @param {Windows.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.windows.hover("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", { * elementDescription: "The search box input in the top right corner" * }) */ hover(sessionId: string, windowId: string, request: Airtop.SessionHoverHandlerRequestBody, requestOptions?: Windows.RequestOptions): Promise; /** * @param {string} sessionId - The session id for the window. * @param {string} windowId - The Airtop window id of the browser window. * @param {Airtop.SessionMonitorHandlerRequestBody} request * @param {Windows.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.windows.monitor("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", { * condition: "Determine if the user appears to be signed in to the website" * }) */ monitor(sessionId: string, windowId: string, request: Airtop.SessionMonitorHandlerRequestBody, requestOptions?: Windows.RequestOptions): Promise; /** * Submit a prompt that queries the content of a specific browser window. You may extract content from the page, or ask a question about the page and allow the AI to answer it (ex. Is the user logged in?). * * @param {string} sessionId - The session id for the window. * @param {string} windowId - The Airtop window id of the browser window. * @param {Airtop.SessionPageQueryHandlerRequestBody} request * @param {Windows.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.windows.pageQuery("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", { * prompt: "What is the main idea of this page?" * }) */ pageQuery(sessionId: string, windowId: string, request: Airtop.SessionPageQueryHandlerRequestBody, requestOptions?: Windows.RequestOptions): Promise; /** * Submit a prompt that queries the content of a specific browser window and paginates through pages to return a list of results. * * @param {string} sessionId - The session id for the window. * @param {string} windowId - The Airtop window id of the browser window. * @param {Airtop.SessionPaginatedExtractionHandlerRequestBody} request * @param {Windows.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.windows.paginatedExtraction("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", { * prompt: "This site contains a list of results about . Navigate through 3 pages of results and return the title and about each result in this list." * }) */ paginatedExtraction(sessionId: string, windowId: string, request: Airtop.SessionPaginatedExtractionHandlerRequestBody, requestOptions?: Windows.RequestOptions): Promise; /** * This endpoint is deprecated. Please use the `pageQuery` endpoint instead. * * @param {string} sessionId - The session id for the window. * @param {string} windowId - The Airtop window id of the browser window. * @param {Airtop.SessionPageQueryHandlerRequestBody} request * @param {Windows.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.windows.promptContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", { * prompt: "What is the main idea of this page?" * }) */ promptContent(sessionId: string, windowId: string, request: Airtop.SessionPageQueryHandlerRequestBody, requestOptions?: Windows.RequestOptions): Promise; /** * Scrape a window and return the content as markdown * * @param {string} sessionId - The session id for the window. * @param {string} windowId - The Airtop window id of the browser window to scrape. * @param {Airtop.ScrapeContentRequest} request * @param {Windows.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.windows.scrapeContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430") */ scrapeContent(sessionId: string, windowId: string, request?: Airtop.ScrapeContentRequest, requestOptions?: Windows.RequestOptions): Promise; /** * Take a screenshot of a browser window * * @param {string} sessionId - The session id for the window. * @param {string} windowId - The Airtop window id of the browser window. * @param {Airtop.SessionScreenshotHandlerRequestBody} request * @param {Windows.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.windows.screenshot("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430") */ screenshot(sessionId: string, windowId: string, request?: Airtop.SessionScreenshotHandlerRequestBody, requestOptions?: Windows.RequestOptions): Promise; /** * Execute a scroll interaction in a specific browser window * * @param {string} sessionId - The session id for the window. * @param {string} windowId - The Airtop window id of the browser window. * @param {Airtop.SessionScrollHandlerRequestBody} request * @param {Windows.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.windows.scroll("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430") */ scroll(sessionId: string, windowId: string, request?: Airtop.SessionScrollHandlerRequestBody, requestOptions?: Windows.RequestOptions): Promise; /** * This endpoint is deprecated. Please use the `pageQuery` endpoint and ask for a summary in the prompt instead. * * @param {string} sessionId - The session id for the window. * @param {string} windowId - The Airtop window id of the browser window to summarize. * @param {Airtop.SessionSummaryHandlerRequestBody} request * @param {Windows.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.windows.summarizeContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430") */ summarizeContent(sessionId: string, windowId: string, request?: Airtop.SessionSummaryHandlerRequestBody, requestOptions?: Windows.RequestOptions): Promise; /** * Execute a type interaction in a specific browser window * * @param {string} sessionId - The session id for the window. * @param {string} windowId - The Airtop window id of the browser window. * @param {Airtop.SessionTypeHandlerRequestBody} request * @param {Windows.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.windows.type("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", { * text: "Example text" * }) */ type(sessionId: string, windowId: string, request: Airtop.SessionTypeHandlerRequestBody, requestOptions?: Windows.RequestOptions): Promise; protected _getAuthorizationHeader(): Promise; }