@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 CHANGED
@@ -17,6 +17,12 @@ available on:
17
17
  - Added flowError on JSONCondition when result = null
18
18
  - Added fix on Filler -->
19
19
 
20
+ # v0.2.106 -> production
21
+ - clean logs
22
+
23
+ # v0.2.105 -> production
24
+ - clean logs
25
+
20
26
  # v0.2.104 -> production
21
27
  - isValid fixed
22
28
 
@@ -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);
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiledesk/tiledesk-tybot-connector",
3
- "version": "0.2.104",
3
+ "version": "0.2.106",
4
4
  "description": "Tiledesk Tybot connector",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -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");
@@ -38,7 +38,6 @@ class DirIfOpenHours {
38
38
  // }
39
39
  // );
40
40
  //this.log = context.log;
41
- this.log = true;
42
41
  }
43
42
 
44
43
  execute(directive, callback) {
@@ -78,7 +78,7 @@ class DirIntent {
78
78
  // intent_command = "/#" + intentId;
79
79
  // }
80
80
  else {
81
- console.error("(DirIntent) No intent name found in action");
81
+ // console.error("(DirIntent) No intent name found in action");
82
82
  callback();
83
83
  return;
84
84
  }
@@ -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
  }