EventContext
EventContext<
R> =object
Defined in: packages/schema/src/events/event-helpers.ts:16
One record’s change in one transaction, as an event’s match sees it. Records use field names and leave out
sensitive fields, whose names changed still lists.
Type Parameters
Section titled “Type Parameters”R = Record<string, unknown>
Properties
Section titled “Properties”actor:
EventActor|null
Defined in: packages/schema/src/events/event-helpers.ts:26
null for a write made outside the API (psql, another service, a database trigger).
after?
Section titled “after?”
optionalafter?:Partial<R>
Defined in: packages/schema/src/events/event-helpers.ts:22
The record after the change, as it is at commit; none for a delete.
before?
Section titled “before?”
optionalbefore?:Partial<R>
Defined in: packages/schema/src/events/event-helpers.ts:20
The record before the change, as it was at the start of the transaction; none for a create.
changed
Section titled “changed”changed:
string[]
Defined in: packages/schema/src/events/event-helpers.ts:24
The names of the fields that changed, sensitive ones included.
operation
Section titled “operation”operation:
EventOperation
Defined in: packages/schema/src/events/event-helpers.ts:18
What happened to the record.
source
Section titled “source”source:
"api"|"database"
Defined in: packages/schema/src/events/event-helpers.ts:28
api for a write through the API, database for any other.
tenant?
Section titled “tenant?”
optionaltenant?:string|number
Defined in: packages/schema/src/events/event-helpers.ts:30
The record’s tenant, when the resource has one.
transaction
Section titled “transaction”transaction:
string
Defined in: packages/schema/src/events/event-helpers.ts:32
The writing transaction’s id.