Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "onEvent"

Index

Classes

Type aliases

Functions

Type aliases

OnEvent

OnEvent<T, P>: (e: EventFired<T>, ctx: HandlerContext, params: P) => Promise<HandlerResult>

Handle the given event.

param

event we're matching on

param

context from which GraphQL client can be obtained if it's necessary to run further queries.

param

secrets and mapped parameters are available through this

returns

result containing status and any command-specific data

Type parameters

  • T = any

  • P = any

Type declaration

Functions

eventHandlerFrom

  • Create a HandleEvent instance with the appropriate metadata wrapping the given function

    Type parameters

    • T

    • P

    Parameters

    • h: OnEvent<T, P>
    • factory: Maker<P>
    • subscription: string
    • Default value name: string = h.name || `Event${generateHash(h.toString())}`
    • Default value description: string = name
    • Default value tags: string | string[] = []

    Returns HandleEvent<T, P> & EventHandlerMetadata

Generated using TypeDoc