Skip to main content

VendureEntityEvent

VendureEntityEvent

The base class for all entity events used by the EventBus system.

  • For event type 'deleted' the input will most likely be an id: ID
Signature
class VendureEntityEvent<Entity, Input = any> extends VendureEvent {
public readonly entity: Entity;
public readonly type: 'created' | 'updated' | 'deleted';
public readonly ctx: RequestContext;
public readonly input?: Input;
constructor(entity: Entity, type: 'created' | 'updated' | 'deleted', ctx: RequestContext, input?: Input)
}

entity

property
Entity

type

property
'created' | 'updated' | 'deleted'

ctx

input

property
Input

constructor

method
(entity: Entity, type: 'created' | 'updated' | 'deleted', ctx: RequestContext, input?: Input) => VendureEntityEvent