Skip to main content

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

ParameterType
directorystring

Returns

Function

Parameters

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