> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qawolf.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Top-Level

> Reference notes for the top-level @qawolf/flows entry point.

The top-level `@qawolf/flows` entry point exposes cross-platform helpers and types.

## Primary exports

* `platform.target`
* `configureTarget(...)`
* `getCurrentScope()`
* `resetTarget()`
* `FailWithoutRetryError`

It also re-exports:

* `type Target`
* `type TargetScope`

## Target literals

The target string must exactly match one of the supported values or your flow will fail to initialize.

```ts theme={null}
type Target =
  | "Basic"
  | "Web - Chrome"
  | "Web - Chrome (GPU)"
  | "Web - Firefox"
  | "Web - Firefox (GPU)"
  | "Web - Safari"
  | "Web - Safari (GPU)"
  | "Android - Pixel"
  | "Android - Pixel 2 (Android 14)"
  | "Android - Pixel 9"
  | "Android - Pixel 9 (Android 14)"
  | "Android - Pixel 9 (Android 15)"
  | "Android - Pixel 9 (Android 16)"
  | "Android - Pixel Tablet (Android 14)"
  | "Android - Tablet"
  | "iOS - Allowlisted iPhone"
  | "iOS - iPad"
  | "iOS - iPad 11 (iOS 18)"
  | "iOS - iPad 11 (iOS 26)"
  | "iOS - iPhone 15 (iOS 17)"
  | "iOS - iPhone 15 (iOS 18)"
  | "iOS - iPhone 15 (iOS 26)"
  | "iOS - iPhone 15 (iOS 26) (allowlisted)"
  | "iOS - iPhone 15 (iOS 26) (private)"
  | "iOS - iPhone 17 (iOS 26)"
  | "iOS 26 - Any iPad"
  | "iOS 26 - Any iPhone"
  | "Latest iOS (iPad)"
  | "Latest iOS (iPhone)";
```

See [iOS Device Pools](/libraries/flows/api-reference/ios-device-pools) for when to use the iOS allowlisted/private targets above and how to set them up — Android has no equivalent.

Example:

```ts theme={null}
import {
  FailWithoutRetryError,
  configureTarget,
  getCurrentScope,
  platform,
  resetTarget,
} from "@qawolf/flows";
import type { Target } from "@qawolf/flows";

declare const target: Target;

configureTarget({ target });

const currentTarget = platform.target;
const currentScope = getCurrentScope();

if (!currentScope) {
  throw new FailWithoutRetryError();
}

resetTarget();
```

## `platform.target`

`platform.target` is a getter on a frozen object. Every access reads the currently configured target.

```ts theme={null}
import { platform } from "@qawolf/flows";

const target = platform.target;
```

Example with setup:

```ts theme={null}
import { configureTarget, platform } from "@qawolf/flows";
import type { Target } from "@qawolf/flows";

declare const target: Target;

configureTarget({ target });

console.log(platform.target);
```

It throws if no target has been configured. It always reflects the latest value set through `configureTarget(...)`.

## `configureTarget(...)`

Use this to set the active target in local execution or tests.

```ts theme={null}
import { configureTarget } from "@qawolf/flows";
import type { Target } from "@qawolf/flows";

declare const target: Target;

configureTarget({ target });
```

The input shape is:

```ts theme={null}
type TargetScope = {
  target: Target;
};
```

## `getCurrentScope()`

Returns the current configured target scope, or `undefined` when no target has been configured yet.

Example:

```ts theme={null}
import { getCurrentScope } from "@qawolf/flows";

const scope = getCurrentScope();

if (scope) {
  console.log(scope.target);
}
```

## `resetTarget()`

Clears the configured target scope.

Use this in tests to avoid leaking target state across cases.

Example:

```ts theme={null}
import { configureTarget, getCurrentScope, resetTarget } from "@qawolf/flows";
import type { Target } from "@qawolf/flows";

declare const target: Target;

configureTarget({ target });
resetTarget();

console.log(getCurrentScope()); // undefined
```

## `FailWithoutRetryError`

This is a dedicated error class whose message is `"failWithoutRetry"`.

Use it when flow execution should fail immediately rather than being treated as retryable by the surrounding runtime.

Example:

```ts theme={null}
import { FailWithoutRetryError } from "@qawolf/flows";

throw new FailWithoutRetryError();
```
