Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Eventhooks

Central management of eventhooks.

Hierarchy

  • Eventhooks

Index

Properties

listeners

listeners: any[] = []

Holds a copy of all registered eventhook listeners.

Accessors

Static Export assignment Instance

Methods

init

  • init(): Promise<void>
  • Init the eventhooks handler by loading them from settings.

    Returns Promise<void>

load

  • load(): void

matchEventData

  • matchEventData(eventhook: any, data: any): boolean
  • Check if the event data passes the specified eventhook filters.

    Parameters

    • eventhook: any

      The eventhook definition.

    • data: any

      A data passed by the event.

    Returns boolean

parseActionOptions

  • parseActionOptions(actionOptions: any, data: any): any
  • Parse the action options, by replacing properties with data from the event when necessary.

    Parameters

    • actionOptions: any
    • data: any

    Returns any

processEvent

  • Process an event. Check if it matches the specified conditions, and if so, execute the defined actions.

    Parameters

    • eventhook: EventhookOptions

      The eventhook definition.

    • args: any

      Arguments containing data passed with the event.

    Returns Promise<void>

validateSpecs

  • validateSpecs(moduleId: string, eventName: string, specs: EventhookOptions): string
  • Check if the passed eventhook specs is valid. Returns a string if failed, or null if no issues were found.

    Parameters

    • moduleId: string

      Name of the module (without .ts or .js)

    • eventName: string

      The name of the event being triggered

    • specs: EventhookOptions

      The eventhook sepcs

    Returns string

Object literals

actions

actions: object

balanceTransfer

email

payment

push

url

  • url(options: any): Promise<void>

Generated using TypeDoc