Function: rmChannelById()
rmChannelById(
directory): (id,version?,persistFiles?) =>Promise<void>
Defined in: channels.ts:159
Delete a channel by it's id.
Optionally specify a version to delete a specific version of the channel.
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 { rmChannelById } = utils('/path/to/eventcatalog');
// deletes the latest InventoryChannel channel
await rmChannelById('inventory.{env}.events');
// deletes a specific version of the InventoryChannel channel
await rmChannelById('inventory.{env}.events', '0.0.1');