The CloudEvent to be processed.
Optional
data?: Record<string, any>An object containing the type of the event, and optionally, additional data. The type ideally must be the topic of the event e.g. cmd.books.fetch, evt.books.fetch.success, notif.orch.done
// Example middleware function for processing CloudEvents.
const onOrchestrationEvent: OnOrchestrationEvent = (event) => {
return {
type: 'cmd.books.fetch',
data: { bookId: event.data.bookId },
};
};
Generated using TypeDoc
Middleware function type for processing CloudEvents. This function takes a CloudEvent and returns an object containing the event's type, and optionally, additional event-specific data.