Function: rmEventById()
rmEventById(
directory): (id,version?,persistFiles?) =>Promise<void>
Defined in: events.ts:208
Delete an event by it's id.
Optionally specify a version to delete a specific version of the event.
Parameters
| Parameter | Type |
|---|---|
directory | string |
Returns
Function
Parameters
| Parameter | Type |
|---|---|
id | string |
version? | string |
persistFiles? | boolean |
Returns
Promise<void>
Example
import utils from '@eventcatalog/utils';
const { rmEventById } = utils('/path/to/eventcatalog');
// deletes the latest InventoryAdjusted event
await rmEventById('InventoryAdjusted');
// deletes a specific version of the InventoryAdjusted event
await rmEventById('InventoryAdjusted', '0.0.1');