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

rmDomainById

Callable

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

  • Delete a domain by it's id.

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

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

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

    // deletes the latest Payment event
    await rmDomainById('Payment');

    // deletes a specific version of the Payment event
    await rmDomainById('Payment', '0.0.1');