Skip to main content
New project sponsor 🪝Hookdeck: Serverless infrastructure for event-driven architecture. Learn more.

rmEventById

Callable

  • rmEventById(directory: string): (id: string, version?: string) => Promise<void>

  • Delete an event by it's id.

    Optionally specify a version to delete a specific version of the event.

    @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');