VendureEntityEvent
VendureEntityEvent
The base class for all entity events used by the EventBus system.
- For event type
'updated'
the entity is the one before applying the patch (if not documented otherwise). - For event type
'deleted'
the input will most likely be anid: ID
Signature
class VendureEntityEvent<Entity, Input = any> extends VendureEvent {
public readonly public readonly entity: Entity;
public readonly public readonly type: 'created' | 'updated' | 'deleted';
public readonly public readonly ctx: RequestContext;
public readonly public readonly input?: Input;
constructor(entity: Entity, type: 'created' | 'updated' | 'deleted', ctx: RequestContext, input?: Input)
}
Extends
Members
entity
property
type:
Entity
type
property
type:
'created' | 'updated' | 'deleted'
ctx
property
type:
RequestContext
input
property
type:
Input
constructor
method
type:
(entity: Entity, type: 'created' | 'updated' | 'deleted', ctx: RequestContext, input?: Input) => VendureEntityEvent