import type { AllocatedDevice, AllocationCriteria, AppInfo, ConnectionConfig, DeviceInfo, GestureSequence, HardwareButton, LaunchOptions, ListDevicesOptions, MobilewrightSession, DeviceAllocator, Orientation, RecordingOptions, RecordingResult, ScreenSize, ScreenshotOptions, Session, SwipeDirection, SwipeOptions, TestObserver, ViewNode } from '@mobilewright/protocol'; import { type DeviceFilter } from './fleet-api.js'; import { type MobileNextTestResultConfig } from './observer.js'; export declare const DEFAULT_URL = "wss://api.mobilenext.ai/ws"; export interface MobileNextDriverOptions { apiKey?: string; /** Fleet API base URL override. Mainly for testing. */ apiUrl?: string; /** Timeout waiting for a cloud device to be allocated from the pool, in ms. Default: 300000 (5 min). */ allocationTimeout?: number; /** Controls automatic test-result upload to mobilenext after each run. Omit to upload on every run. */ testResult?: MobileNextTestResultConfig; /** Timeout for the entire report-upload operation, in ms. */ uploadTimeout?: number; } export declare function buildFilters(criteria: AllocationCriteria): DeviceFilter[]; export declare class MobileNextDriver implements MobilewrightSession, DeviceAllocator { private session; private readonly options; private readonly fleetClient; private fleetSessionPromise; private readonly fleetSessionBySerial; /** Test-lifecycle observer that uploads results to mobilenext; undefined when uploading is disabled. */ readonly observer: TestObserver | undefined; constructor(options?: MobileNextDriverOptions); connect(config: ConnectionConfig): Promise; disconnect(): Promise; getViewHierarchy(): Promise; tap(x: number, y: number): Promise; doubleTap(x: number, y: number): Promise; longPress(x: number, y: number, duration?: number): Promise; typeText(text: string): Promise; pressKeys(keys: string[]): Promise; clearText(): Promise; swipe(direction: SwipeDirection, opts?: SwipeOptions): Promise; gesture(gestures: GestureSequence): Promise; pressButton(button: HardwareButton): Promise; screenshot(opts?: ScreenshotOptions): Promise; getScreenSize(): Promise; getOrientation(): Promise; setOrientation(orientation: Orientation): Promise; startRecording(opts: RecordingOptions): Promise; stopRecording(): Promise; launchApp(bundleId: string, opts?: LaunchOptions): Promise; terminateApp(bundleId: string): Promise; listApps(): Promise; getForegroundApp(): Promise; installApp(filePath: string): Promise; uninstallApp(bundleId: string): Promise; listDevices(opts?: ListDevicesOptions): Promise; openUrl(url: string): Promise; allocate(criteria: AllocationCriteria, _takenDeviceIds: ReadonlySet, signal?: AbortSignal): Promise; release(deviceId: string): Promise; private getFleetSession; private call; private requireSession; } //# sourceMappingURL=driver.d.ts.map