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
| Parameter | Type |
|---|---|
directory | string |
Returns
Function
Parameters
| Parameter | Type |
|---|---|
id | string |
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');