Skip to main content

ActionEvent

The ActionEvent class is the superclass for all events within actions. This can be used to emit log events within actions.

@group

Events/Action

@returns

The Event instance.

Hierarchy

  • Event<{ message: string; metadata: Record<string, unknown> }>
    • ActionEvent

Index

Constructors

Properties

Methods

Constructors

constructor

  • ActionEvent(name?: string, payload?: { message: string; metadata: Record<string, unknown> }): ActionEvent
  • Parameters

    • optionalname: string
    • optionalpayload: { message: string; metadata: Record<string, unknown> }
      • message: string
      • metadata: Record<string, unknown>

    Returns ActionEvent

Properties

readonlyinheritedheader

header: { timestamp: number }

Type declaration

  • timestamp: number

readonlyinheritedname

name: string

readonlyinheritedpayload

payload: { message: string; metadata: Record<string, unknown> }

Type declaration

  • message: string
  • metadata: Record<string, unknown>

Methods

staticinheritedregistrar

  • registrar(...args: [EventService, PropertyDescriptor]): void
  • The registrar() method is explicitly called by the EventSource decorator for a method to enhance that method to auto-emit events.


    Parameters

    • rest...args: [EventService, PropertyDescriptor]

      Arguments are spread out using the array spread operator.

    Returns void