Returns the sequence number of the most recent event on the axon,
or undefined if the axon has no events.
Calls GET /v1/axons/{id}/events?limit=1&include_total_count=true
directly because @runloop/api-client does not yet expose a typed
listEvents or getHead method on the Axon resource. The private
client field is accessed via cast — fragile but functional.
Axon sequences are 1-based and monotonically increasing, so
total_count equals the highest sequence number.
Parameters
axon: Axon
Returns Promise<number|undefined>
Todo
Replace with a proper SDK method once @runloop/api-client
adds Axon.listEvents() or equivalent (tracked upstream).
Returns the sequence number of the most recent event on the axon, or
undefinedif the axon has no events.Calls
GET /v1/axons/{id}/events?limit=1&include_total_count=truedirectly because@runloop/api-clientdoes not yet expose a typedlistEventsorgetHeadmethod on theAxonresource. The privateclientfield is accessed via cast — fragile but functional.Axon sequences are 1-based and monotonically increasing, so
total_countequals the highest sequence number.