LogoRobo.js
Packages@robojs/mock

ActionRecorder

Class: ActionRecorder

ActionRecorder manages recorded actions for a session with memory management. Uses LRU-style eviction to prevent unbounded memory growth.

Implements

  • IActionRecorder

Constructors

new ActionRecorder()

new ActionRecorder(maxActions): ActionRecorder

Parameters

ParameterTypeDefault value
maxActionsnumberDEFAULT_MAX_ACTIONS

Returns

ActionRecorder

Accessors

length

Get Signature

get length(): number

Get the number of recorded actions

Returns

number

Implementation of

IActionRecorder.length

maxLength

Get Signature

get maxLength(): number

Get the maximum number of actions before eviction

Returns

number

Implementation of

IActionRecorder.maxLength

Methods

clear()

clear(): void

Clear all recorded actions

Returns

void

Implementation of

IActionRecorder.clear

getActivityActions()

getActivityActions(): RecordedAction[]

Get all Activity-related actions

Returns

RecordedAction[]


getAll()

getAll(): RecordedAction[]

Get all recorded actions

Returns

RecordedAction[]

Implementation of

IActionRecorder.getAll

getByType()

getByType(type): RecordedAction[]

Get actions by type

Parameters

ParameterType
typeActionType

Returns

RecordedAction[]

Implementation of

IActionRecorder.getByType

getByTypes()

getByTypes(types): RecordedAction[]

Get actions by multiple types

Parameters

ParameterType
typesActionType[]

Returns

RecordedAction[]

Implementation of

IActionRecorder.getByTypes

getDispatches()

getDispatches(): RecordedAction[]

Get dispatch events (server → client)

Returns

RecordedAction[]

Implementation of

IActionRecorder.getDispatches

getForInteraction()

getForInteraction(interactionId): RecordedAction[]

Get actions for a specific interaction

Parameters

ParameterType
interactionIdstring

Returns

RecordedAction[]

Implementation of

IActionRecorder.getForInteraction

getGatewayMessages()

getGatewayMessages(): RecordedAction[]

Get all Gateway WebSocket message actions (client → server)

Returns

RecordedAction[]

Implementation of

IActionRecorder.getGatewayMessages

getInteractionResponses()

getInteractionResponses(): RecordedAction[]

Get all interaction response actions

Returns

RecordedAction[]

Implementation of

IActionRecorder.getInteractionResponses

getMessagesDeleted()

getMessagesDeleted(): RecordedAction[]

Get message_deleted actions

Returns

RecordedAction[]

Implementation of

IActionRecorder.getMessagesDeleted

getMessagesEdited()

getMessagesEdited(): RecordedAction[]

Get message_edited actions

Returns

RecordedAction[]

Implementation of

IActionRecorder.getMessagesEdited

getMessagesSent()

getMessagesSent(): RecordedAction[]

Get message_sent actions

Returns

RecordedAction[]

Implementation of

IActionRecorder.getMessagesSent

getRestRequests()

getRestRequests(): RecordedAction[]

Get all REST request actions

Returns

RecordedAction[]

Implementation of

IActionRecorder.getRestRequests

getSince()

getSince(timestamp): RecordedAction[]

Get actions since a specific timestamp

Parameters

ParameterType
timestampnumber

Returns

RecordedAction[]

Implementation of

IActionRecorder.getSince

getTriggeredBy()

getTriggeredBy(eventId): RecordedAction[]

Get actions triggered by a specific event

Parameters

ParameterType
eventIdstring

Returns

RecordedAction[]

Implementation of

IActionRecorder.getTriggeredBy

record()

record(
   type, 
   data, 
   options?): RecordedAction

Record a new action

Parameters

ParameterType
typeActionType
dataunknown
options?RecordActionOptions

Returns

RecordedAction

Implementation of

IActionRecorder.record

On this page