Listen for Conversation Events
The Conversation provider allows you to listen for and filter Conversation API events. If the events parameter is left null, you will receive callbacks for all event types.
Method Signature
Copy
onConversationEvent(callback: string, events?: string[])
Listening for Conversation Events
Incoming events matching your filter will call the onConversationEvent route.
Copy
const session = vcr.createSession();
const conversation = new Conversation(session);
await conversation.onConversationEvent("onEvent");
Copy
session = vcr.createSession()
conversation = Conversation(session)
await conversation.onConversationEvent('onEvent')