Skip to main content
The Figranium Swift SDK uses strongly typed structs and enums for all API payloads. This page documents the public model layer: the JSONValue enum, the Task struct (which shadows Swift’s concurrency Task), execution types, and supporting configuration structs.

JSONValue

JSONValue is a Codable, Sendable, Equatable enum that represents any JSON value the API may return or accept. It is the primary currency for unstructured and semi-structured data.
The SDK also provides two type aliases for convenience:
Use JSONValue when you need to accept or return arbitrary JSON shapes, such as task results, settings payloads, or proxy rotation configurations.

Task

Task defines a browser automation workflow. It is Codable, Sendable, Equatable, and Identifiable.
The SDK’s Task type shadows Swift’s concurrency Task. Disambiguate with Swift.Task or Figranium.Task when needed.
The designated initializer requires name, url, and mode. All other fields are optional.

Action

Action is the atomic unit of a task. It is Codable, Sendable, Equatable, and Identifiable.
The designated initializer requires type. All other fields are optional.

TaskVariable

TaskVariable declares a typed variable on a task.

ExecuteTaskOptions

ExecuteTaskOptions is passed to runTask and other execution methods to override variables and configure the run.

ExecutionResult

ExecutionResult is the generic return type for task executions. Value must be Codable & Sendable.

Execution

Execution represents a single recorded run.

StreamEvent

StreamEvent wraps a Server-Sent Events payload. Value must be Sendable.
The SDK uses StreamEvent<JSONValue> for execution and selector streams.

Supporting structs

StealthConfig

TaskTranslation

TaskOutput

Schedule

Other types

Actions

Build action lists with typed helpers.

Variables

Declare and reference task variables.

Tasks resource

Save, version, and execute tasks.

Execution resource

Run scrape, agent, and headful executions.