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.
Properties
Section titled “Properties”becomes?
Section titled “becomes?”
optionalbecomes?: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.
changed?
Section titled “changed?”
optionalchanged?:string[]
Defined in: packages/schema/src/model.ts:146
Fields of which at least one must change.
optionalfrom?:string
Defined in: packages/schema/src/model.ts:142
A filter the record before the change must pass.
match?
Section titled “match?”
optionalmatch?: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
Section titled “operations”operations:
EventOperation[]
Defined in: packages/schema/src/model.ts:138
The operations it fires for.
optionalwhen?:string
Defined in: packages/schema/src/model.ts:140
A filter the record after the change must pass.