Skip to content

EventBuilder

Defined in: builder/event.ts:11

readonly children: EventBuilder[]

Defined in: builder/event.ts:13


readonly input: InputBuilder

Defined in: builder/event.ts:14


readonly key: string

Defined in: builder/event.ts:12


readonly prn: string

Defined in: builder/index.ts:32

BaseBuilder.prn

addArray(key): ArrayInputBuilder

Defined in: builder/input.ts:22

string

ArrayInputBuilder

InputBuilder.addArray


addChildEvent(event): this

Defined in: builder/event.ts:23

Adds an event that handlers of this event are allowed to publish.

Circuits (loops) in event handlers are detected at both build and runtime. If a loop is detected, an ERROR-011 is generated: https://www.notion.so/pynhq/No-Circular-Event-Dependencies-4788d49bd5dd49c4a760f8e841e3680b?pvs=4

EventBuilder

this


addJson(key, parser): JsonInputBuilder

Defined in: builder/input.ts:30

string

ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>> | JsonParse<any>

JsonInputBuilder

InputBuilder.addJson


addListener(key, handler): EventListenerBuilder

Defined in: builder/event.ts:42

Adds a listener that will be called in response to publications of this event.

string

EventListener

EventListenerBuilder


addObject(key): ObjectInputBuilder

Defined in: builder/input.ts:23

string

ObjectInputBuilder

InputBuilder.addObject


addProperty(key, type): DataTypeInputBuilder

Defined in: builder/input.ts:24

string

PrimitiveDataType | TemporalDataType

DataTypeInputBuilder

InputBuilder.addProperty

addProperty(key, type): SelectInputBuilder

Defined in: builder/input.ts:25

string

SelectDataType

SelectInputBuilder

InputBuilder.addProperty

addProperty(key, type): JsonInputBuilder

Defined in: builder/input.ts:26

string

ZodType

JsonInputBuilder

InputBuilder.addProperty

addProperty(key, type): JsonInputBuilder

Defined in: builder/input.ts:28

string

PrimitiveDataType | TemporalDataType | SelectDataType | ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>

JsonInputBuilder

InputBuilder.addProperty


addSchedule(key, crontab): EventSchedulerBuilder

Defined in: builder/event.ts:36

Schedules this event with the provided crontab; which is in Unix “Vixie” format. This function should not be used for strict timing guarantees; it’s intended to run with “best effort” on the supplied schedule. Specifically:

  • Precise timing is not guaranteed
  • For frequent (e.g. every minute) schedules, some may be skipped

string

string

EventSchedulerBuilder


setDescription(description): this

Defined in: builder/index.ts:33

string

this

BaseBuilder.setDescription


toDefinition(): EventDefinition

Defined in: builder/event.ts:47

Returns the definition structure of this event.

EventDefinition