import utils from'@eventcatalog/utils'; const{ writeEvent }=utils('/path/to/eventcatalog'); // Write an event to the catalog // Event would be written to events/InventoryAdjusted awaitwriteEvent({ id:'InventoryAdjusted', name:'Inventory Adjusted', version:'0.0.1', summary:'This is a summary', markdown:'# Hello world', }); // Write an event to the catalog but override the path // Event would be written to events/Inventory/InventoryAdjusted awaitwriteEvent({ id:'InventoryAdjusted', name:'Inventory Adjusted', version:'0.0.1', summary:'This is a summary', markdown:'# Hello world', },{ path:"/Inventory/InventoryAdjusted"});
Write an event to EventCatalog.
You can optionally overide the path of the event.