Skip to content

Event

5 types. Import any of them from opencode.types.

EventID module-attribute

EventID: TypeAlias = str

EventLogSynced

Marker emitted once when a log read reaches its captured watermark. The reader holds every event committed at or below seq.

type class-attribute instance-attribute

type: Literal['log.synced'] = 'log.synced'

aggregate_id class-attribute instance-attribute

aggregate_id: str = Field(
    validation_alias="aggregateID",
    serialization_alias="aggregateID",
)

seq class-attribute instance-attribute

seq: EventSeq | None = Field(
    default=None, exclude_if=is_none
)

EventSeq module-attribute

EventSeq: TypeAlias = int

EventVersion module-attribute

EventVersion: TypeAlias = Literal[1]

EventVersion10 module-attribute

EventVersion10: TypeAlias = Literal[2]