TaskEvent

sealed interface TaskEvent

Base interface for all task events.

Inheritors

Properties

Link copied to clipboard
abstract val createdAt: String

ISO 8601 timestamp when the event was created on the server.

Link copied to clipboard
abstract val eventId: String

Unique identifier of this specific event for deduplication and replay.

Link copied to clipboard
abstract val payload: JsonObject

Raw JSON data associated with the event.

Link copied to clipboard
abstract val taskId: String

Unique identifier of the task this event belongs to.

Link copied to clipboard
abstract val wireType: String

The string representation of the event type as received over the wire.

Functions

Link copied to clipboard

Tries to parse the payload as TaskFailedPayload if the event type matches.

Link copied to clipboard

Tries to parse the payload as TaskProgressPayload if the event type matches.

Link copied to clipboard

Returns true if this event indicates the final state of the task.