Classes
Methods
# clearHistory(eventTypeopt) → {void}
Clear event history
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
eventType |
VerificationEventType
|
<optional> |
void
# emit(eventType, data) → {void}
Emit an event with enriched data
Parameters:
| Name | Type | Description |
|---|---|---|
eventType |
string
|
The type of verification event |
data |
Object
|
Event data (timestamp and correlationId added automatically) |
void
# enrichEventData()
Enrich event data with base properties
# getHistory(eventTypeopt) → {Array}
Get event history for a specific event type
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
eventType |
VerificationEventType
|
<optional> |
Array
# listenerCount(eventType) → {number}
Get the number of listeners for an event
Parameters:
| Name | Type | Description |
|---|---|---|
eventType |
VerificationEventType
|
number
# off(eventType, listener) → {void}
Unsubscribe from an event
Parameters:
| Name | Type | Description |
|---|---|---|
eventType |
VerificationEventType
|
'*'
|
|
listener |
EventListener.<T>
|
void
# on(eventType, listener) → {EventSubscription}
Subscribe to a specific event
Parameters:
| Name | Type | Description |
|---|---|---|
eventType |
VerificationEventType
|
'*'
|
|
listener |
EventListener.<T>
|
EventSubscription
# once(eventType, listener) → {EventSubscription}
Subscribe to an event once
Parameters:
| Name | Type | Description |
|---|---|---|
eventType |
VerificationEventType
|
|
listener |
EventListener.<T>
|
EventSubscription
# removeAllListeners(eventTypeopt) → {void}
Remove all listeners for an event
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
eventType |
VerificationEventType
|
<optional> |
void