Skip to content

EventModel

EventModel = object

Defined in: packages/schema/src/model.ts:134

An event a resource declares. It fires for a change whose operation is listed and that passes every condition: when on the record after the change, from on the record before it, becomes turning true (false or no record before, true after), one of the changed fields changing, and a code predicate when match is set. See Declaring events.

optional becomes?: string

Defined in: packages/schema/src/model.ts:144

A filter that must turn true with the change: false or no record before, true after.


optional changed?: string[]

Defined in: packages/schema/src/model.ts:146

Fields of which at least one must change.


optional from?: string

Defined in: packages/schema/src/model.ts:142

A filter the record before the change must pass.


optional match?: true

Defined in: packages/schema/src/model.ts:148

A code predicate decides too; it stays in the config.


name: string

Defined in: packages/schema/src/model.ts:136

<resource>.<name>, such as orders.created.


operations: EventOperation[]

Defined in: packages/schema/src/model.ts:138

The operations it fires for.


optional when?: string

Defined in: packages/schema/src/model.ts:140

A filter the record after the change must pass.