Skip to main content

Function: rmDomainById()

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

Defined in: domains.ts:198

Delete a domain by it's id.

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

Parameters​

ParameterType
directorystring

Returns​

Function

Parameters​

ParameterType
idstring
version?string
persistFiles?boolean

Returns​

Promise<void>

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