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 .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
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/json
Content-Type: application/json
Content-Length: length
{"sessionId":"String","flowId":"String","nodeId":"String","clientId":"String","conversationId":"String","aiMinutes":0,"from":"String","to":"String","transcript":[{"date":"\/Date(-62135596800000-0000)\/","role":"String","senderName":"String","targetName":"String","functionName":"String","functionArgs":"String","content":"String"}],"startDate":"\/Date(-62135596800000-0000)\/","endDate":"\/Date(-62135596800000-0000)\/","attachments":[{"fileName":"String","contentType":"String","uri":"String","data":"String"}]}