AccountEventEmitter

Builds and queues account/diagnostic events for the backend's merchant dashboard.

There is no integrator-facing emit API — every call site is SDK-owned instrumentation of a moment the SDK already knows about.

Properties

Link copied to clipboard

The queue events are enqueued onto. Overridable so tests can inject a queue with a recording flush handler.

Functions

Link copied to clipboard
suspend fun clearPendingForTesting(): <Error class: unknown class>

Test-only reset so buffer state doesn't leak between tests sharing this singleton.

Link copied to clipboard
fun emit(name: AccountEventName, screen: AccountEventScreen, detail: String? = null)

Queues an event for the account this app run belongs to.

Link copied to clipboard
fun onAccountIdResolved(accountId: String)

Flushes events buffered before accountId resolved, preserving each one's original occurredAt.

Link copied to clipboard

Test-only inspection of what is currently buffered, without triggering a flush.