Troupeby AliveDocsSign in

Reference

Shared schemas

The named types that procedure inputs and outputs use, in TypeScript notation, as the descriptors define them. A name ending in Out is the lenient output form of the strict input type without it. Index.

A11yNode · ActionResult · AppFormat · AppFormatOut · AppInfo · AppSource · AppStateOut · Appearance · AppearanceOut · Arch · ArchOut · ArtifactId · BundleId · ButtonName · ButtonNameOut · Bytes · CodecOut · ContractInfo · CrashId · CrashSummary · Cursor · DeviceId · DeviceSpec · DeviceSpecOut · DeviceType · DoctorCheck · DurationMs · ElementRef · ErrorBody · ErrorCodeOut · FileId · FileRef · FormFactorOut · Frame · HolderKind · HolderKindOut · HostInfo · InstalledApp · JsRuntime · JsonObject · Label · LeakItem · Locator · LocatorOut · LocatorRoot · LocatorRootOut · LocatorStep · LocatorStepOut · LogEvent · LogGap · LogLevel · LogLevelOut · LogLine · LogSource · LogSourceOut · MediaType · NativeInfo · NonNegativeInt · Orientation · OrientationOut · OsVersion · Pairing · PairingId · Permission · PermissionOut · PlatformCapabilities · PlatformId · PlatformIdOut · Point · PointOut · ReactAtPoint · RecordingId · ReporterEnvelope · ReporterEnvelopeOut · ReporterMethod · ReporterMethodOut · ResolvedDeviceSpec · Role · RoleOut · RunDetail · RunId · RunStats · RunStatus · RunStatusOut · RunSummary · RuntimeInstanceId · RuntimeScope · RuntimeScopeOut · RuntimeStatus · ScreenSize · Seq · Session · SessionCreateHolder · SessionEvent · SessionId · SessionReasonOut · SessionScreen · SessionStatusOut · Sha256Hex · Shard · SnapshotId · StreamCap · StreamCapabilities · Target · TestAnnotation · TestCaseSummary · TestLocation · TestOutcomeOut · TestResultSummary · TestStatusOut · TextMatch · TextMatchOut · TimeoutMs · Timestamp · TraceCapture · TraceChunkId

A11yNode

TypeScript
type A11yNode = {
  ref: string
  role: RoleOut
  name: string
  label?: string
  text?: string
  value?: string
  placeholder?: string
  testId?: string
  frame: Frame
  enabled: boolean
  selected: boolean
  focused: boolean
  visible: boolean
  checked?: boolean | 'mixed'
  expanded?: boolean
  pressed?: boolean
  level?: integer
  scrollable?: boolean
  hittable?: boolean
  native: NativeInfo
  children?: A11yNode[]
}

Named types: Frame, NativeInfo, RoleOut.

ActionResult

TypeScript
type ActionResult = { callId: string; durationMs: number; target?: { node: A11yNode; point: PointOut } }

Named types: A11yNode, PointOut.

AppFormat

TypeScript
type AppFormat = 'iosApp' | 'iosAppArchive' | 'apk' | 'expoProject' | 'catalystApp'

AppFormatOut

TypeScript
type AppFormatOut = 'iosApp' | 'iosAppArchive' | 'apk' | 'expoProject' | 'catalystApp' | …

AppInfo

TypeScript
type AppInfo = {
  bundleId: string
  name?: string
  version?: string
  build?: string
  state: AppStateOut
  pid?: integer
  installedBy: 'troupe' | 'preinstalled' | 'other' | …
}

Named types: AppStateOut.

AppSource

TypeScript
type AppSource =
  | {
      path: string  // 2–4096 chars
    }
  | {
      url: string  // ≤ 8192 chars; url
      sha256: Sha256Hex
    }
  | { artifactId: ArtifactId }

Named types: ArtifactId, Sha256Hex.

AppStateOut

TypeScript
type AppStateOut = 'notRunning' | 'background' | 'suspended' | 'foreground' | …

Appearance

TypeScript
type Appearance = 'light' | 'dark'

AppearanceOut

TypeScript
type AppearanceOut = 'light' | 'dark' | …

Arch

TypeScript
type Arch = 'arm64' | 'x86_64'

ArchOut

TypeScript
type ArchOut = 'arm64' | 'x86_64' | …

ArtifactId

TypeScript
type ArtifactId = string

BundleId

TypeScript
type BundleId = string

ButtonName

TypeScript
type ButtonName = 'home' | 'back' | 'appSwitch' | 'power' | 'volumeUp' | 'volumeDown'

ButtonNameOut

TypeScript
type ButtonNameOut = 'home' | 'back' | 'appSwitch' | 'power' | 'volumeUp' | 'volumeDown' | …

Bytes

TypeScript
type Bytes = integer

CodecOut

TypeScript
type CodecOut = 'h264' | 'jpeg' | …

ContractInfo

TypeScript
type ContractInfo = { version: string; majors: integer[] }

CrashId

TypeScript
type CrashId = string

CrashSummary

TypeScript
type CrashSummary = {
  crashId: CrashId
  bundleId?: string
  process: string
  pid?: integer
  at: string
  kind: 'crash' | 'anr' | 'jetsam' | 'watchdog' | 'sceneManifestMissing' | 'other' | …
  signal?: string
  exceptionType?: string
  reason?: string
  report: { status: 'pending' | 'attached' | 'unavailable' | …; file?: FileRef }
}

Named types: CrashId, FileRef.

Cursor

TypeScript
type Cursor = string

DeviceId

TypeScript
type DeviceId = string

DeviceSpec

TypeScript
type DeviceSpec = {
  platform: PlatformId
  deviceType?: string  // 1–128 chars
  os?: string  // 1–32 chars
  arch?: Arch
  variant?: string  // 1–64 chars
  locale?: string  // ≤ 35 chars; /^[A-Za-z]{2,8}(-[A-Za-z0-9]{1,8})*$/
  timeZone?: string  // 1–64 chars
  orientation?: Orientation
  appearance?: Appearance
  labels?: Record<string, string>
}

Named types: Appearance, Arch, Orientation, PlatformId.

DeviceSpecOut

TypeScript
type DeviceSpecOut = {
  platform: PlatformIdOut
  deviceType?: string
  os?: string
  arch?: ArchOut
  variant?: string
  locale?: string
  timeZone?: string
  orientation?: OrientationOut
  appearance?: AppearanceOut
  labels?: Record<string, string>
}

Named types: AppearanceOut, ArchOut, OrientationOut, PlatformIdOut.

DeviceType

TypeScript
type DeviceType = {
  platform: PlatformIdOut
  id: string
  name: string
  formFactor: FormFactorOut
  screen: ScreenSize
  minOs?: string
  maxOs?: string
  default: boolean
}

Named types: FormFactorOut, PlatformIdOut, ScreenSize.

DoctorCheck

TypeScript
type DoctorCheck = {
  id: 'host.platform' | 'disk.free' | 'ports.range' | 'gui.session' | 'xcode.selected' | 'xcode.license' | 'xcode.firstLaunch' | 'ios.runtimes' | 'ios.runner' | 'ios.deviceHub' | 'ios.home' | 'android.sdk' | 'android.emulator' | 'android.images' | 'android.adb' | 'android.driver' | 'catalyst.toolchain' | …
  platform?: PlatformIdOut
  status: 'pass' | 'warn' | 'fail' | 'skip' | …
  message: string
  error?: { code: string; data: { fix: string } }
}

Named types: PlatformIdOut.

DurationMs

TypeScript
type DurationMs = integer

ElementRef

TypeScript
type ElementRef = string

ErrorBody

TypeScript
type ErrorBody = {
  code: ErrorCodeOut
  message: string
  data: JsonObject
  retryable: boolean
  requestId: string
}

Named types: ErrorCodeOut, JsonObject.

ErrorCodeOut

TypeScript
type ErrorCodeOut = 'VALIDATION' | 'CONTRACT_UNSUPPORTED' | 'UNAUTHENTICATED' | 'FORBIDDEN' | 'NOT_FOUND' | 'CONFLICT' | 'TIMEOUT' | 'RATE_LIMITED' | 'INTERNAL' | 'CAPABILITY_UNSUPPORTED' | 'CAPACITY_UNAVAILABLE' | 'HOST_LOST' | 'SESSION_NOT_READY' | 'SESSION_ENDED' | 'SESSION_BUSY' | 'DEVICE_SPEC_INVALID' | 'DEVICE_BOOT_FAILED' | 'DEVICE_LOST' | 'DEVICE_DRIVER_FAILED' | 'DEVICE_MEDIA_FAILED' | 'DEVICE_INPUT_UNAVAILABLE' | 'APP_NOT_INSTALLED' | 'APP_NOT_RUNNING' | 'APP_INSTALL_FAILED' | 'APP_LAUNCH_FAILED' | 'APP_CRASHED' | 'LOCATOR_NOT_FOUND' | 'LOCATOR_NOT_ACTIONABLE' | 'LOCATOR_STRICT_VIOLATION' | 'LOCATOR_REF_STALE' | 'SECRET_UNAVAILABLE' | 'JS_RUNTIME_UNAVAILABLE' | 'QUOTA_EXCEEDED' | 'ORG_SUSPENDED' | 'PROJECT_SUSPENDED' | 'SERVICE_SUSPENDED' | 'PROJECT_REQUIRED' | 'PLACEMENT_MISMATCH' | 'ENVIRONMENT_HOST_UNSUPPORTED' | 'ENVIRONMENT_XCODE_MISSING' | 'ENVIRONMENT_XCODE_SETUP_INCOMPLETE' | 'ENVIRONMENT_IOS_RUNTIME_MISSING' | 'ENVIRONMENT_ANDROID_SDK_MISSING' | 'ENVIRONMENT_ANDROID_IMAGE_MISSING' | 'ENVIRONMENT_ADB_UNAVAILABLE' | 'ENVIRONMENT_DRIVER_NOT_INSTALLED' | 'ENVIRONMENT_TOOL_MISSING' | 'ENVIRONMENT_UNVERIFIED' | 'ENVIRONMENT_DEVICE_HUB_ACTIVE' | 'ENVIRONMENT_GUI_SESSION_MISSING' | 'ENVIRONMENT_PORTS_UNAVAILABLE' | 'ENVIRONMENT_RESERVED_RESOURCE' | 'ENVIRONMENT_DISK_LOW' | 'ENVIRONMENT_PLATFORM_DISABLED' | …

FileId

TypeScript
type FileId = string

FileRef

TypeScript
type FileRef = {
  fileId: FileId
  name: string
  contentType: MediaType
  bytes: Bytes
  sha256: string
  expiresAt: string
}

Named types: Bytes, FileId, MediaType.

FormFactorOut

TypeScript
type FormFactorOut = 'phone' | 'tablet' | 'desktop' | 'tv' | 'watch' | 'foldable' | …

Frame

TypeScript
type Frame = { x: number; y: number; width: number; height: number }

HolderKind

TypeScript
type HolderKind = 'test-worker' | 'client' | 'mcp' | 'api'

HolderKindOut

TypeScript
type HolderKindOut = 'test-worker' | 'client' | 'mcp' | 'api' | …

HostInfo

TypeScript
type HostInfo = {
  os: 'darwin' | 'linux' | 'win32' | …
  osVersion: string
  arch: ArchOut
  cpuCount: integer
  memoryBytes: Bytes
  freeDiskBytes: Bytes
  guiSession: boolean
  profile: 'developer' | 'shared' | …
  troupeHome: string
  toolchains: {
    xcode?: { path: string; version: string; build: string }
    androidSdk?: { root: string; emulatorVersion?: string; platformToolsVersion?: string }
  }
  limits: {
    platform: PlatformIdOut
    maxDevices: integer
    memoryBudgetBytes: Bytes
    deviceMemoryBytes?: Bytes
  }[]
}

Named types: ArchOut, Bytes, PlatformIdOut.

InstalledApp

TypeScript
type InstalledApp = {
  bundleId: string
  name?: string
  version?: string
  build?: string
  format: AppFormatOut
  sha256?: string
  urlSchemes: string[]
  installedAt: string
}

Named types: AppFormatOut.

JsRuntime

TypeScript
type JsRuntime = {
  state: 'connecting' | 'connected' | 'disconnected' | 'replaced' | …
  bundleId: string
  devServerUrl: string
  deviceName?: string
  title?: string
  multipleDebuggers?: boolean
  connectedAt?: string
  reconnects: integer
}

JsonObject

TypeScript
type JsonObject = Record<string, unknown>

Label

TypeScript
type Label = string

LeakItem

TypeScript
type LeakItem = {
  kind: 'device' | 'avd' | 'process' | 'port' | …
  id: string
  owned: boolean
  action: 'report' | 'remove' | …
}

Locator

TypeScript
type Locator = {
  v: 1
  root?: LocatorRoot
  bundleId?: BundleId
  description?: string  // ≤ 200 chars
  steps: [LocatorStep, ...LocatorStep[]]
}

Named types: BundleId, LocatorRoot, LocatorStep.

LocatorOut

TypeScript
type LocatorOut = {
  v: 1
  root?: LocatorRootOut
  bundleId?: string
  description?: string
  steps: [LocatorStepOut, ...LocatorStepOut[]]
}

Named types: LocatorRootOut, LocatorStepOut.

LocatorRoot

TypeScript
type LocatorRoot = 'app' | 'system' | 'all'

LocatorRootOut

TypeScript
type LocatorRootOut = 'app' | 'system' | 'all' | …

LocatorStep

TypeScript
type LocatorStep =
  | {
      by: 'role'
      role: Role
      name?: TextMatch
      checked?: boolean | 'mixed'
      disabled?: boolean
      expanded?: boolean
      selected?: boolean
      pressed?: boolean
      level?: integer  // 1–9
      includeHidden?: boolean
    }
  | { by: 'text'; match: TextMatch }
  | { by: 'label'; match: TextMatch }
  | { by: 'placeholder'; match: TextMatch }
  | { by: 'testId'; match: TextMatch }
  | {
      by: 'filter'
      hasText?: TextMatch
      hasNotText?: TextMatch
      has?: Locator
      hasNot?: Locator
      visible?: boolean
    }
  | {
      by: 'nth'
      index: integer  // -10000–10000
    }
  | { by: 'and'; locator: Locator }
  | { by: 'or'; locator: Locator }

Named types: Locator, Role, TextMatch.

LocatorStepOut

TypeScript
type LocatorStepOut =
  | {
      by: 'role'
      role: RoleOut
      name?: TextMatchOut
      checked?: boolean | 'mixed'
      disabled?: boolean
      expanded?: boolean
      selected?: boolean
      pressed?: boolean
      level?: integer
      includeHidden?: boolean
    }
  | { by: 'text'; match: TextMatchOut }
  | { by: 'label'; match: TextMatchOut }
  | { by: 'placeholder'; match: TextMatchOut }
  | { by: 'testId'; match: TextMatchOut }
  | {
      by: 'filter'
      hasText?: TextMatchOut
      hasNotText?: TextMatchOut
      has?: LocatorOut
      hasNot?: LocatorOut
      visible?: boolean
    }
  | { by: 'nth'; index: integer }
  | { by: 'and'; locator: LocatorOut }
  | { by: 'or'; locator: LocatorOut }

Named types: LocatorOut, RoleOut, TextMatchOut.

LogEvent

TypeScript
type LogEvent =
  | {
      type: 'log'
      seq: Seq
      at: string
      source: LogSourceOut
      level: LogLevelOut
      bundleId?: string
      pid?: integer
      tag?: string
      message: string
    }
  | {
      type: 'gap'
      fromSeq: Seq
      toSeq: Seq
      dropped: integer  // ≥ 0
    }

Named types: LogLevelOut, LogSourceOut, Seq.

LogGap

TypeScript
type LogGap = {
  fromSeq: Seq
  toSeq: Seq
  dropped: integer  // ≥ 0
}

Named types: Seq.

LogLevel

TypeScript
type LogLevel = 'debug' | 'info' | 'notice' | 'warn' | 'error' | 'fault'

LogLevelOut

TypeScript
type LogLevelOut = 'debug' | 'info' | 'notice' | 'warn' | 'error' | 'fault' | …

LogLine

TypeScript
type LogLine = {
  seq: Seq
  at: string
  source: LogSourceOut
  level: LogLevelOut
  bundleId?: string
  pid?: integer
  tag?: string
  message: string
}

Named types: LogLevelOut, LogSourceOut, Seq.

LogSource

TypeScript
type LogSource = 'system' | 'app' | 'driver' | 'engine' | 'runtime' | 'js'

LogSourceOut

TypeScript
type LogSourceOut = 'system' | 'app' | 'driver' | 'engine' | 'runtime' | 'js' | …

MediaType

TypeScript
type MediaType = string

NativeInfo

TypeScript
type NativeInfo = { type: string; bundleId?: string; windowId?: string }

NonNegativeInt

TypeScript
type NonNegativeInt = integer

Orientation

TypeScript
type Orientation = 'portrait' | 'portraitUpsideDown' | 'landscapeLeft' | 'landscapeRight'

OrientationOut

TypeScript
type OrientationOut = 'portrait' | 'portraitUpsideDown' | 'landscapeLeft' | 'landscapeRight' | …

OsVersion

TypeScript
type OsVersion = {
  platform: PlatformIdOut
  version: string
  build?: string
  id: string
  arch: string
  installed: boolean
  default: boolean
  installCommand?: string
}

Named types: PlatformIdOut.

Pairing

TypeScript
type Pairing = {
  pairingId: PairingId
  origin: string
  scopes: RuntimeScopeOut[]
  createdAt: string
  expiresAt: string
  lastUsedAt?: string
}

Named types: PairingId, RuntimeScopeOut.

PairingId

TypeScript
type PairingId = string

Permission

TypeScript
type Permission = 'calendar' | 'camera' | 'contacts' | 'location' | 'locationAlways' | 'microphone' | 'motion' | 'notifications' | 'photos' | 'reminders'

PermissionOut

TypeScript
type PermissionOut = 'calendar' | 'camera' | 'contacts' | 'location' | 'locationAlways' | 'microphone' | 'motion' | 'notifications' | 'photos' | 'reminders' | …

PlatformCapabilities

TypeScript
type PlatformCapabilities = {
  platform: PlatformIdOut
  deviceClass: 'virtual' | 'physical' | …
  os: {
    family: 'ios' | 'android' | 'macos' | …
    source: 'runtime' | 'systemImage' | 'host' | …
    selectable: boolean
  }
  install: { from: AppFormatOut[] }
  apps: {
    launchArgs: boolean
    launchEnv: boolean
    clearData: boolean
    openUrl: boolean
    permissions: PermissionOut[]
  }
  ui: {
    tree: boolean
    locators: ('role' | 'text' | 'label' | 'placeholder' | 'testId' | …)[]
    regex: boolean
    describeAt: boolean
    systemScope: boolean
    testIdAttributes: string[]
  }
  input: {
    touch: boolean
    semantic: boolean
    maxContacts: integer  // ≥ 0
    keyboard: 'none' | 'text' | 'keys' | …
    buttons: ButtonNameOut[]
    rotate: boolean
    hideKeyboard: boolean
  }
  media: { screenshot: boolean; recording: boolean; stream: StreamCapabilities | null }
  logs: { system: boolean; app: boolean; crashes: boolean }
  system: { location: boolean; appearance: boolean; clipboard: boolean; statusBar?: boolean }
}

Named types: AppFormatOut, ButtonNameOut, PermissionOut, PlatformIdOut, StreamCapabilities.

PlatformId

TypeScript
type PlatformId = string

PlatformIdOut

TypeScript
type PlatformIdOut = 'ios-simulator' | 'android-emulator' | 'catalyst' | 'ios-device' | 'android-device' | …

Point

TypeScript
type Point = { x: number; y: number }

PointOut

TypeScript
type PointOut = { x: number; y: number }

ReactAtPoint

TypeScript
type ReactAtPoint = {
  components: { name: string; source?: { file: string; line: integer; column?: integer } }[]
  note?: string
}

RecordingId

TypeScript
type RecordingId = string

ReporterEnvelope

TypeScript
type ReporterEnvelope = { v: 1; runId: RunId; seq: Seq; at: Timestamp; method: ReporterMethod; params: JsonObject }

Named types: JsonObject, ReporterMethod, RunId, Seq, Timestamp.

ReporterEnvelopeOut

TypeScript
type ReporterEnvelopeOut = { v: 1; runId: RunId; seq: Seq; at: string; method: ReporterMethodOut; params: JsonObject }

Named types: JsonObject, ReporterMethodOut, RunId, Seq.

ReporterMethod

TypeScript
type ReporterMethod = 'onBegin' | 'onTestBegin' | 'onStepBegin' | 'onStepEnd' | 'onStdOut' | 'onStdErr' | 'onError' | 'onTestEnd' | 'onEnd'

ReporterMethodOut

TypeScript
type ReporterMethodOut = 'onBegin' | 'onTestBegin' | 'onStepBegin' | 'onStepEnd' | 'onStdOut' | 'onStdErr' | 'onError' | 'onTestEnd' | 'onEnd' | …

ResolvedDeviceSpec

TypeScript
type ResolvedDeviceSpec = {
  platform: PlatformIdOut
  deviceType: string
  deviceTypeName: string
  os: string
  osBuild?: string
  arch: ArchOut
  variant?: string
  locale: string
  timeZone: string
  orientation: OrientationOut
  appearance: AppearanceOut
}

Named types: AppearanceOut, ArchOut, OrientationOut, PlatformIdOut.

Role

TypeScript
type Role = 'alertdialog' | 'alert' | 'application' | 'button' | 'checkbox' | 'combobox' | 'dialog' | 'document' | 'generic' | 'group' | 'heading' | 'img' | 'keyboard' | 'link' | 'list' | 'listitem' | 'menu' | 'menuitem' | 'progressbar' | 'radio' | 'radiogroup' | 'searchbox' | 'slider' | 'spinbutton' | 'status' | 'switch' | 'tab' | 'tablist' | 'text' | 'textbox' | 'toolbar'

RoleOut

TypeScript
type RoleOut = 'alertdialog' | 'alert' | 'application' | 'button' | 'checkbox' | 'combobox' | 'dialog' | 'document' | 'generic' | 'group' | 'heading' | 'img' | 'keyboard' | 'link' | 'list' | 'listitem' | 'menu' | 'menuitem' | 'progressbar' | 'radio' | 'radiogroup' | 'searchbox' | 'slider' | 'spinbutton' | 'status' | 'switch' | 'tab' | 'tablist' | 'text' | 'textbox' | 'toolbar' | …

RunDetail

TypeScript
type RunDetail = RunSummary & { tests: (TestCaseSummary & { results: TestResultSummary[]; outcome?: TestOutcomeOut })[] }

Named types: RunSummary, TestCaseSummary, TestOutcomeOut, TestResultSummary.

RunId

TypeScript
type RunId = string

RunStats

TypeScript
type RunStats = {
  expected: integer
  unexpected: integer
  flaky: integer
  skipped: integer
  errored: integer
}

RunStatus

TypeScript
type RunStatus = 'queued' | 'running' | 'passed' | 'failed' | 'errored' | 'timedOut' | 'canceled'

RunStatusOut

TypeScript
type RunStatusOut = 'queued' | 'running' | 'passed' | 'failed' | 'errored' | 'timedOut' | 'canceled' | …

RunSummary

TypeScript
type RunSummary = {
  runId: RunId
  status: RunStatusOut
  title?: string
  origin: 'local' | 'cloud' | …
  startedAt: string
  endedAt?: string
  projects: string[]
  shard?: Shard
  stats: RunStats
}

Named types: RunId, RunStats, RunStatusOut, Shard.

RuntimeInstanceId

TypeScript
type RuntimeInstanceId = string

RuntimeScope

TypeScript
type RuntimeScope = 'runtime:read' | 'runtime:admin' | 'devices:read' | 'devices:acquire' | 'devices:drive' | 'apps:install' | 'apps:debug' | 'logs:read' | 'runs:read' | 'runs:report'

RuntimeScopeOut

TypeScript
type RuntimeScopeOut = 'runtime:read' | 'runtime:admin' | 'devices:read' | 'devices:acquire' | 'devices:drive' | 'apps:install' | 'apps:debug' | 'logs:read' | 'runs:read' | 'runs:report' | …

RuntimeStatus

TypeScript
type RuntimeStatus = {
  instanceId: RuntimeInstanceId
  version: string
  startedAt: string
  sessions: { live: NonNegativeInt; byHolderKind: Record<string, integer> }
  devices: {
    deviceId: DeviceId
    platform: PlatformIdOut
    name: string
    state: string
    sessionId?: SessionId
  }[]
  supervisors: {
    kind: 'driver' | 'engine' | 'emulator' | …
    deviceId: DeviceId
    state: string
    restarts: NonNegativeInt
    lastError?: string
  }[]
  governor: { level: 'normal' | 'warn' | 'critical' | …; availableBytes: Bytes; reserveBytes: Bytes }
  leaks: { unregisteredDevices: NonNegativeInt; strayProcesses: NonNegativeInt }
}

Named types: Bytes, DeviceId, NonNegativeInt, PlatformIdOut, RuntimeInstanceId, SessionId.

ScreenSize

TypeScript
type ScreenSize = { width: number; height: number; scale: number }

Seq

TypeScript
type Seq = integer

Session

TypeScript
type Session = {
  sessionId: SessionId
  status: SessionStatusOut
  reason?: SessionReasonOut
  error?: ErrorBody
  statusDetail?: string
  holder: { kind: HolderKindOut; label?: string }
  key?: string
  platform: PlatformIdOut
  spec: DeviceSpecOut
  resolved?: ResolvedDeviceSpec
  screen?: SessionScreen
  deviceId?: DeviceId
  attempt: integer  // ≥ 1
  createdAt: string
  readyAt?: string
  streamReadyAt?: string
  endedAt?: string
  expiresAt?: string
  maxEndsAt?: string
  installed?: InstalledApp[]
}

Named types: DeviceId, DeviceSpecOut, ErrorBody, HolderKindOut, InstalledApp, PlatformIdOut, ResolvedDeviceSpec, SessionId, SessionReasonOut, SessionScreen, SessionStatusOut.

SessionCreateHolder

TypeScript
type SessionCreateHolder = { kind?: HolderKind; label?: Label }

Named types: HolderKind, Label.

SessionEvent

TypeScript
type SessionEvent =
  | {
      seq: Seq
      at: string
      sessionId: SessionId
      type: 'status'
      status: SessionStatusOut
      previous?: SessionStatusOut
      reason?: SessionReasonOut
      error?: ErrorBody
    }
  | {
      seq: Seq
      at: string
      sessionId: SessionId
      type: 'appState'
      bundleId: string
      state: AppStateOut
      pid?: integer
    }
  | { seq: Seq; at: string; sessionId: SessionId; type: 'crash'; crash: CrashSummary }
  | {
      seq: Seq
      at: string
      sessionId: SessionId
      type: 'inputState'
      available: boolean
      reason?: string
    }
  | { seq: Seq; at: string; sessionId: SessionId; type: 'streamReady' }
  | { seq: Seq; at: string; sessionId?: SessionId; type: 'gap'; fromSeq: Seq; toSeq: Seq }

Named types: AppStateOut, CrashSummary, ErrorBody, Seq, SessionId, SessionReasonOut, SessionStatusOut.

SessionId

TypeScript
type SessionId = string

SessionReasonOut

TypeScript
type SessionReasonOut = 'released' | 'queue-timeout' | 'app-install-failed' | 'boot-failed' | 'driver-failed' | 'environment' | 'host-lost' | 'start-timeout' | 'idle-timeout' | 'heartbeat-timeout' | 'max-duration' | 'runtime-shutdown' | 'device-lost' | 'host-pressure' | …

SessionScreen

TypeScript
type SessionScreen = { width: number; height: number; scale: number; orientation: OrientationOut }

Named types: OrientationOut.

SessionStatusOut

TypeScript
type SessionStatusOut = 'queued' | 'starting' | 'ready' | 'ended' | 'failed' | 'errored' | 'canceled' | …

Sha256Hex

TypeScript
type Sha256Hex = string

Shard

TypeScript
type Shard = { current: integer; total: integer }

SnapshotId

TypeScript
type SnapshotId = string

StreamCap

TypeScript
type StreamCap = 'watch' | 'drive'

StreamCapabilities

TypeScript
type StreamCapabilities = {
  codecs: CodecOut[]
  liveSettings: boolean
  keyframesShared: boolean
  touchTimestamps: boolean
}

Named types: CodecOut.

Target

TypeScript
type Target = { locator: Locator } | { ref: ElementRef; snapshotId?: SnapshotId } | { point: Point }

Named types: ElementRef, Locator, Point, SnapshotId.

TestAnnotation

TypeScript
type TestAnnotation = { type: string; description?: string }

TestCaseSummary

TypeScript
type TestCaseSummary = {
  testId: string
  projectName: string
  title: string
  titlePath: string[]
  location: TestLocation
  tags: string[]
  annotations: TestAnnotation[]
  expectedStatus: TestStatusOut
  retries: integer
  timeoutMs: integer
}

Named types: TestAnnotation, TestLocation, TestStatusOut.

TestLocation

TypeScript
type TestLocation = { file: string; line: integer; column: integer }

TestOutcomeOut

TypeScript
type TestOutcomeOut = 'expected' | 'unexpected' | 'flaky' | 'skipped' | …

TestResultSummary

TypeScript
type TestResultSummary = {
  resultId: string
  status: TestStatusOut
  durationMs: number
  retry: integer
  sessionId?: SessionId
}

Named types: SessionId, TestStatusOut.

TestStatusOut

TypeScript
type TestStatusOut = 'passed' | 'failed' | 'timedOut' | 'skipped' | 'errored' | 'canceled' | …

TextMatch

TypeScript
type TextMatch =
  | {
      text: string  // ≤ 4096 chars
      exact?: boolean
    }
  | {
      regex: string  // ≤ 1024 chars
      flags?: string  // /^[ims]{0,3}$/
    }

TextMatchOut

TypeScript
type TextMatchOut = { text: string; exact?: boolean } | { regex: string; flags?: string }

TimeoutMs

TypeScript
type TimeoutMs = integer

Timestamp

TypeScript
type Timestamp = string

TraceCapture

TypeScript
type TraceCapture = {
  screenshots?: 'off' | 'after' | 'beforeAfter'
  a11y?: 'off' | 'onFailure' | 'always'
  video?: boolean
  logs?: boolean
}

TraceChunkId

TypeScript
type TraceChunkId = string
esc

    Type to search every page, the protocol reference and the cloud API.