Add an event/command/query to a channel by it's id.
Optionally specify a version to add the message to a specific version of the service.
@example
import utils from'@eventcatalog/utils'; // Adds an event to the service or command to the service const{ addEventToChannel, addCommandToChannel, addQueryToChannel }=utils('/path/to/eventcatalog'); // Adds a new event (InventoryUpdatedEvent) that the InventoryService will send awaitaddEventToChannel('InventoryService','sends',{ event:'InventoryUpdatedEvent', version:'2.0.0'}); *// Adds a new event (OrderComplete) that the InventoryService will receive awaitaddEventToChannel('InventoryService','receives',{ event:'OrderComplete', version:'1.0.0'}); // Adds a new command (UpdateInventoryCommand) that the InventoryService will send awaitaddCommandToChannel('InventoryService','sends',{ command:'UpdateInventoryCommand', version:'2.0.0'}); // Adds a new command (VerifyInventory) that the InventoryService will receive awaitaddCommandToChannel('InventoryService','receives',{ command:'VerifyInventory', version:'1.0.0'}); // Adds a new query (GetInventoryQuery) that the InventoryService will send awaitaddQueryToChannel('InventoryService','sends',{ query:'GetInventoryQuery', version:'2.0.0'}); // Adds a new query (GetOrder) that the InventoryService will receive awaitaddQueryToChannel('InventoryService','receives',{ query:'GetOrder', version:'1.0.0'});
Add an event/command/query to a channel by it's id.
Optionally specify a version to add the message to a specific version of the service.