Agent
Represents a CCAI Agent instance.
Constructors
constructor
Parameters
agentId:
string
region:
string
Optional
Methods
addEventListener
addEventListener(event: , callback: Function
): void
Adds a handler for the specified CCAI.Events.Agent event. Use only functions as handlers; anything except a function leads to an error and scenario termination when a handler is called.
Parameters
event:
Event class (i.e., CCAI.Events.Agent.Started)
callback:
Function
Handler function. A single parameter is passed - object with event information
Returns
type:
void
destroy
destroy(): void
Destroys a CCAI Agent instance.
Returns
type:
void
getConversationProfile
getConversationProfile(request: Object
): Promise<GetConversationProfileResult>
Gets the Dialogflow conversation profile.
Parameters
request:
Object
Dialogflow get conversation profile request data
Returns
type:
Promise<GetConversationProfileResult>
getProfilesList
getProfilesList(): Promise<GetProfilesListResult>
Gets the list of a Dialogflow conversation profiles.
Returns
type:
Promise<GetProfilesListResult>
removeEventListener
removeEventListener(event: , callback: Function
): void
Removes a handler for the specified CCAI.Events.Agent event.
Parameters
event:
Event class (i.e., CCAI.Events.Agent.Started)
callback:
Function
OptionalOptional. Handler function. If not specified, all handler functions are removed
Returns
type:
void
updateConversationProfile
updateConversationProfile(request: Object
): Promise<UpdateConversationProfileResult>
Updates the Dialogflow conversation profile.
Parameters
request:
Object
Dialogflow update conversation profile request data
Returns
type:
Promise<UpdateConversationProfileResult>