declare namespace puppeteer { interface Page { mainFrame(): any; } } declare namespace playwright { interface Page { context(): any; } } declare namespace seleniumWebdriver { interface WebDriver { getSession(): Promise; createCDPConnection(domain: string): Promise; } } import type * as Airtop from '../api'; import { type Windows, Windows as WindowsClass, type Windows as WindowsNamespace } from '../api/resources/windows/client/Client'; import * as core from '../core'; import type { AirtopClient } from './AirtopClient'; type UploadAndFillFileInputConfiguration = Airtop.SessionFileInputHandlerRequestBody & { uploadFilePath: string; }; export declare class AirtopWindows extends WindowsClass { readonly _client: AirtopClient; readonly _options: WindowsNamespace.Options; private apiKeySupplier; private readonly mainClient; constructor(_client: AirtopClient, _options: WindowsNamespace.Options, apiKeySupplier: core.Supplier); /** * @param {string} sessionId - The session id for the window. * @param {string} windowId - The Airtop window id of the browser window to target with an Airtop AI prompt. * @param {Airtop.SessionContentPromptHandlerRequestBody} request * @param {Windows.RequestOptions} requestOptions - Request-specific configuration. * * @deprecated Use pageQuery instead * @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: Omit & { configuration?: Omit & { outputSchema?: string | object; }; }, requestOptions?: WindowsNamespace.RequestOptions): Promise; /** * @param {string} sessionId - The session id for the window. * @param {string} windowId - The Airtop window id of the browser window to target with an Airtop AI prompt. * @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: Omit & { configuration?: Omit & { outputSchema?: string | object; }; }, requestOptions?: WindowsNamespace.RequestOptions): Promise; /** * @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?: WindowsNamespace.RequestOptions): Promise; /** * @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?: Omit & { configuration?: Omit & { outputSchema?: string | object; }; }, requestOptions?: WindowsNamespace.RequestOptions): Promise; getWindowInfoForPuppeteerPage(session: Airtop.ExternalSessionWithConnectionInfo, page: puppeteer.Page, request?: Airtop.GetWindowInfoRequest, requestOptions?: WindowsNamespace.RequestOptions): Promise; getWindowInfoForPlaywrightPage(session: Airtop.ExternalSessionWithConnectionInfo, page: playwright.Page, request?: Airtop.GetWindowInfoRequest, requestOptions?: WindowsNamespace.RequestOptions): Promise; /** * @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?: WindowsNamespace.RequestOptions): Promise; /** * @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") */ hover(sessionId: string, windowId: string, request: Airtop.SessionHoverHandlerRequestBody, requestOptions?: WindowsNamespace.RequestOptions): Promise; /** * @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?: WindowsNamespace.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") */ paginatedExtraction(sessionId: string, windowId: string, request: Airtop.SessionPaginatedExtractionHandlerRequestBody, requestOptions?: WindowsNamespace.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; /** * 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; /** * 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; /** * @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") */ monitor(sessionId: string, windowId: string, request: Airtop.SessionMonitorHandlerRequestBody, requestOptions?: Windows.RequestOptions): Promise; private executeSeleniumCDPCommand; getWindowInfoForSeleniumDriver(session: Airtop.ExternalSessionWithConnectionInfo, driver: seleniumWebdriver.WebDriver, request?: Airtop.GetWindowInfoRequest, requestOptions?: WindowsNamespace.RequestOptions): Promise; /** * Upload a file, push the file to a session, and fill a file input field in a window. * After this operation, the file input will be ready to be submitted. * * @param sessionId - The session id for the window. * @param windowId - The window id of the browser window. * @param {UploadAndFillFileInputConfiguration} configuration * @param configuration.uploadFilePath - The path to the local file to upload. * @param configuration.elementDescription - A natural language description of the file input to * interact with (e.g. 'the file input', 'file upload selection box'). The interaction will be * aborted if the target element cannot be found. * @see Airtop.SessionFileInputHandlerRequestBody - For additional micro-interaction configuration options. * @returns The file id and the ai response. */ uploadFileAndSelectInput(sessionId: string, windowId: string, configuration: UploadAndFillFileInputConfiguration): Promise<{ fileId: string; aiResponse: Airtop.AiPromptResponse; }>; } export {};