Class

VerificationEventEmitter

VerificationEventEmitter()

Centralized Event Emitter for porkate-valid8 Provides comprehensive event logging for monitoring and analytics

Constructor

# new VerificationEventEmitter()

View Source core/events/event-emitter.ts, line 7

Classes

VerificationEventEmitter

Methods

# addToHistory()

Add event to history

View Source core/events/event-emitter.ts, line 150

# clearHistory(eventTypeopt) → {void}

Clear event history

Parameters:
Name Type Attributes Description
eventType VerificationEventType <optional>

View Source core/events/event-emitter.ts, line 248

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)

View Source core/events/event-emitter.ts, line 184

void

# enrichEventData()

Enrich event data with base properties

View Source core/events/event-emitter.ts, line 140

# generateEventId()

Generate unique event ID

View Source core/events/event-emitter.ts, line 164

# getHistory(eventTypeopt) → {Array}

Get event history for a specific event type

Parameters:
Name Type Attributes Description
eventType VerificationEventType <optional>

View Source core/events/event-emitter.ts, line 241

Array

# getStatistics() → {object}

Get statistics for events

View Source core/events/event-emitter.ts, line 254

object

# listenerCount(eventType) → {number}

Get the number of listeners for an event

Parameters:
Name Type Description
eventType VerificationEventType

View Source core/events/event-emitter.ts, line 222

number

# off(eventType, listener) → {void}

Unsubscribe from an event

Parameters:
Name Type Description
eventType VerificationEventType | '*'
listener EventListener.<T>

View Source core/events/event-emitter.ts, line 208

void

# on(eventType, listener) → {EventSubscription}

Subscribe to a specific event

Parameters:
Name Type Description
eventType VerificationEventType | '*'
listener EventListener.<T>

View Source core/events/event-emitter.ts, line 192

EventSubscription

# once(eventType, listener) → {EventSubscription}

Subscribe to an event once

Parameters:
Name Type Description
eventType VerificationEventType
listener EventListener.<T>

View Source core/events/event-emitter.ts, line 200

EventSubscription

# removeAllListeners(eventTypeopt) → {void}

Remove all listeners for an event

Parameters:
Name Type Attributes Description
eventType VerificationEventType <optional>

View Source core/events/event-emitter.ts, line 215

void

# startRecording() → {void}

Enable event history recording

View Source core/events/event-emitter.ts, line 228

void

# stopRecording() → {void}

Disable event history recording

View Source core/events/event-emitter.ts, line 234

void