Skip to main content

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

ParameterType
directorystring

Returns

Function

Parameters

ParameterType
idstring
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');