Template
An event or events to be sent.
Optional
sessionOrCallback: ClientSession | SaveWithEventCallbackAn existing session
with which the event(s) should be saved
or {SaveWithEventCallback} to persist additional data within the callback's session instead.
If not provided, then the event(s) will be persisted with a new session.
Event Type of an event that can be published, e.g type Event = AssignTask | CompleteTask | CreateTask | ...
.
An empty promise.
Function to publish an event or events.