/**
 * 核心类型定义
 */

export enum BrowserProviderType {
  ADSPOWER = 'adspower',
  PLAYWRIGHT_STEALTH = 'playwright-stealth',
  PUPPETEER_STEALTH = 'puppeteer-stealth'
}

export interface IBrowserCapabilities {
  stealth: boolean;
  fingerprint: boolean;
  proxy: boolean;
  incognito: boolean;
  profiles: boolean;
  cloudflareBypass: boolean;
  stripeCompatible: boolean;
}

export interface ILaunchOptions {
  headless?: boolean;
  viewport?: {
    width: number;
    height: number;
  };
  userAgent?: string;
}

export interface IProviderMetadata {
  name: string;
  version: string;
  free: boolean;
  capabilities: IBrowserCapabilities;
}

export interface ILaunchResult {
  browser: any;
  page: any;
  wsEndpoint?: string;
}

export interface IActionConfig {
  name?: string;
  timeout?: number;
  optional?: boolean;
  retryCount?: number;
  [key: string]: any;
}

export interface IActionResult {
  success: boolean;
  data?: any;
  error?: Error;
  duration?: number;
}
