@tiledesk/tiledesk-tybot-connector 0.2.104 → 0.2.106
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/models/TiledeskChatbotUtil.js +2 -16
- package/models/faqKbService.js +1 -1
- package/package.json +1 -1
- package/tiledeskChatbotPlugs/directives/DirAskGPTV2.js +1 -1
- package/tiledeskChatbotPlugs/directives/DirIfOnlineAgentsV2.js +1 -1
- package/tiledeskChatbotPlugs/directives/DirIfOpenHours.js +0 -1
- package/tiledeskChatbotPlugs/directives/DirIntent.js +1 -1
- package/tiledeskChatbotPlugs/directives/DirWait.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -158,22 +158,6 @@ class TiledeskChatbotUtil {
|
|
|
158
158
|
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
-
// static errorMessage(message) {
|
|
162
|
-
// return {
|
|
163
|
-
// name: "message",
|
|
164
|
-
// action: {
|
|
165
|
-
// "_tdThenStop": true,
|
|
166
|
-
// text: message,
|
|
167
|
-
// attributes: {
|
|
168
|
-
// runtimeError: {
|
|
169
|
-
// message: message
|
|
170
|
-
// }
|
|
171
|
-
// }
|
|
172
|
-
// }
|
|
173
|
-
// }
|
|
174
|
-
// }
|
|
175
|
-
|
|
176
|
-
//static filterOnVariables(commands, variables) {
|
|
177
161
|
static filterOnVariables(message, variables) {
|
|
178
162
|
if (!variables) {
|
|
179
163
|
return;
|
|
@@ -588,6 +572,7 @@ class TiledeskChatbotUtil {
|
|
|
588
572
|
// "uid": "lo68oz8i"
|
|
589
573
|
// }
|
|
590
574
|
if (message.metadata.src) {
|
|
575
|
+
|
|
591
576
|
await chatbot.addParameter("lastUserDocumentURL", message.metadata.src); // legacy. will be deprecated
|
|
592
577
|
const url_as_attachment = message.metadata.src;
|
|
593
578
|
await chatbot.addParameter("lastUserDocumentAsAttachmentURL", url_as_attachment);
|
|
@@ -733,6 +718,7 @@ class TiledeskChatbotUtil {
|
|
|
733
718
|
}
|
|
734
719
|
}
|
|
735
720
|
|
|
721
|
+
// TODO - REMOVE - THEY ARE IN ATTRIBUTES.PAYLOAD
|
|
736
722
|
// voice-vxml attributes
|
|
737
723
|
if (message.attributes.dnis) {
|
|
738
724
|
await chatbot.addParameter("dnis", message.attributes.dnis);
|
package/models/faqKbService.js
CHANGED
|
@@ -13,7 +13,7 @@ class FaqKbService {
|
|
|
13
13
|
}
|
|
14
14
|
var sortQuery = {};
|
|
15
15
|
sortQuery["score"] = -1;
|
|
16
|
-
console.log("(Service) GET ALL FAQ_KBs");
|
|
16
|
+
// console.log("(Service) GET ALL FAQ_KBs");
|
|
17
17
|
return new Promise((resolve, reject) => {
|
|
18
18
|
// let query = {public: options.public, certified: options.certified};
|
|
19
19
|
Faq_kb.find(query).sort(sortQuery).lean().exec( (err, bots) => {
|
package/package.json
CHANGED
|
@@ -513,7 +513,7 @@ class DirAskGPTV2 {
|
|
|
513
513
|
console.error("(httprequest) DirAskGPT Increment tokens quote err: ", err);
|
|
514
514
|
rejects(false)
|
|
515
515
|
} else {
|
|
516
|
-
console.log("(httprequest) DirAskGPT Increment token quote resbody: ", resbody);
|
|
516
|
+
// console.log("(httprequest) DirAskGPT Increment token quote resbody: ", resbody);
|
|
517
517
|
resolve(true);
|
|
518
518
|
}
|
|
519
519
|
}
|
|
@@ -33,7 +33,7 @@ class DirIfOnlineAgentsV2 {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
async go(action, callback) {
|
|
36
|
-
console.log("(DirIfOnlineAgents) action:", action);
|
|
36
|
+
// console.log("(DirIfOnlineAgents) action:", action);
|
|
37
37
|
if (!action.trueIntent && !action.falseIntent) {
|
|
38
38
|
if (this.log) {
|
|
39
39
|
console.log("Error DirIfOnlineAgents: missing both action.trueIntent & action.falseIntent");
|
|
@@ -55,7 +55,7 @@ class DirWait {
|
|
|
55
55
|
// console.log("step_key:", step_key);
|
|
56
56
|
if (action && action.millis >= 1000) {//2000 * 60) { // at list 2 minutes waiting time to reset the steps counter
|
|
57
57
|
// await this.tdcache.set(step_key, 0);
|
|
58
|
-
console.log("resetting steps counter");
|
|
58
|
+
// console.log("resetting steps counter");
|
|
59
59
|
await TiledeskChatbot.resetStep(this.tdcache, this.requestId);
|
|
60
60
|
// console.log("step_key after:", await this.tdcache.get( step_key ));
|
|
61
61
|
}
|