All Verbs | /nodes/live-answer/callback |
---|
"use strict";
export class LiveAnswerCallbackTranscriptMessage {
/** @param {{date?:string,role?:string,senderName?:string,targetName?:string,functionName?:string,functionArgs?:string,content?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
date;
/** @type {string} */
role;
/** @type {string} */
senderName;
/** @type {string} */
targetName;
/** @type {string} */
functionName;
/** @type {string} */
functionArgs;
/** @type {string} */
content;
}
export class LiveAnswerCallbackAttachment {
/** @param {{fileName?:string,contentType?:string,uri?:string,data?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
fileName;
/** @type {string} */
contentType;
/** @type {string} */
uri;
/** @type {string} */
data;
}
export class LiveAnswerCallback {
/** @param {{sessionId?:string,flowId?:string,nodeId?:string,clientId?:string,conversationId?:string,aiMinutes?:number,from?:string,to?:string,transcript?:LiveAnswerCallbackTranscriptMessage[],startDate?:string,endDate?:string,attachments?:LiveAnswerCallbackAttachment[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
sessionId;
/** @type {string} */
flowId;
/** @type {string} */
nodeId;
/** @type {string} */
clientId;
/** @type {string} */
conversationId;
/** @type {number} */
aiMinutes;
/** @type {string} */
from;
/** @type {string} */
to;
/** @type {LiveAnswerCallbackTranscriptMessage[]} */
transcript;
/** @type {string} */
startDate;
/** @type {string} */
endDate;
/** @type {LiveAnswerCallbackAttachment[]} */
attachments;
}
JavaScript LiveAnswerCallback DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /nodes/live-answer/callback HTTP/1.1
Host: team.evovoice.io
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<LiveAnswerCallback xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Voice.Api.Nodes.AI">
<AIMinutes>0</AIMinutes>
<Attachments>
<LiveAnswerCallbackAttachment>
<ContentType>String</ContentType>
<Data>String</Data>
<FileName>String</FileName>
<Uri>String</Uri>
</LiveAnswerCallbackAttachment>
</Attachments>
<ClientId>String</ClientId>
<ConversationId>String</ConversationId>
<EndDate>0001-01-01T00:00:00</EndDate>
<FlowId>String</FlowId>
<From>String</From>
<NodeId>String</NodeId>
<SessionId>String</SessionId>
<StartDate>0001-01-01T00:00:00</StartDate>
<To>String</To>
<Transcript>
<LiveAnswerCallbackTranscriptMessage>
<Content>String</Content>
<Date>0001-01-01T00:00:00</Date>
<FunctionArgs>String</FunctionArgs>
<FunctionName>String</FunctionName>
<Role>String</Role>
<SenderName>String</SenderName>
<TargetName>String</TargetName>
</LiveAnswerCallbackTranscriptMessage>
</Transcript>
</LiveAnswerCallback>