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

rmServiceById

Callable

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

  • Delete a service by it's id.

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

    @example
    import utils from '@eventcatalog/utils';

    const { rmServiceById } = utils('/path/to/eventcatalog');

    // deletes the latest InventoryService event
    await rmServiceById('InventoryService');

    // deletes a specific version of the InventoryService event
    await rmServiceById('InventoryService', '0.0.1');