@tiledesk/tiledesk-tybot-connector 2.0.17 → 2.0.19

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.
Files changed (49) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/Logger.js +11 -4
  3. package/logs/app.log +6791 -44726
  4. package/logs/app4.log +46163 -0
  5. package/logs/app5.log +39983 -0
  6. package/logs/app6.log +50376 -0
  7. package/logs/app7.log +43568 -0
  8. package/logs/app8.log +4779 -0
  9. package/package.json +2 -2
  10. package/tiledeskChatbotPlugs/directives/DirAddKbContent.js +20 -21
  11. package/tiledeskChatbotPlugs/directives/DirAddTags.js +5 -6
  12. package/tiledeskChatbotPlugs/directives/DirAiPrompt.js +7 -8
  13. package/tiledeskChatbotPlugs/directives/DirAskGPTV2.js +50 -21
  14. package/tiledeskChatbotPlugs/directives/DirAssistant.js +1 -2
  15. package/tiledeskChatbotPlugs/directives/DirBrevo.js +1 -2
  16. package/tiledeskChatbotPlugs/directives/DirCaptureUserReply.js +4 -5
  17. package/tiledeskChatbotPlugs/directives/DirClearTranscript.js +1 -2
  18. package/tiledeskChatbotPlugs/directives/DirClose.js +2 -3
  19. package/tiledeskChatbotPlugs/directives/DirCode.js +1 -2
  20. package/tiledeskChatbotPlugs/directives/DirCondition.js +3 -4
  21. package/tiledeskChatbotPlugs/directives/DirContactUpdate.js +1 -2
  22. package/tiledeskChatbotPlugs/directives/DirCustomerio.js +1 -2
  23. package/tiledeskChatbotPlugs/directives/DirDeleteVariable.js +1 -2
  24. package/tiledeskChatbotPlugs/directives/DirDepartment.js +3 -4
  25. package/tiledeskChatbotPlugs/directives/DirFlowLog.js +5 -5
  26. package/tiledeskChatbotPlugs/directives/DirGptTask.js +4 -5
  27. package/tiledeskChatbotPlugs/directives/DirHubspot.js +1 -2
  28. package/tiledeskChatbotPlugs/directives/DirIfOnlineAgentsV2.js +1 -2
  29. package/tiledeskChatbotPlugs/directives/DirIfOpenHours.js +3 -4
  30. package/tiledeskChatbotPlugs/directives/DirIntent.js +3 -1
  31. package/tiledeskChatbotPlugs/directives/DirJSONCondition.js +4 -5
  32. package/tiledeskChatbotPlugs/directives/DirMake.js +1 -2
  33. package/tiledeskChatbotPlugs/directives/DirMoveToAgent.js +1 -2
  34. package/tiledeskChatbotPlugs/directives/DirMoveToUnassigned.js +1 -2
  35. package/tiledeskChatbotPlugs/directives/DirQapla.js +1 -2
  36. package/tiledeskChatbotPlugs/directives/DirRandomReply.js +1 -2
  37. package/tiledeskChatbotPlugs/directives/DirReplaceBot.js +1 -2
  38. package/tiledeskChatbotPlugs/directives/DirReplaceBotV2.js +1 -2
  39. package/tiledeskChatbotPlugs/directives/DirReplaceBotV3.js +1 -2
  40. package/tiledeskChatbotPlugs/directives/DirReply.js +4 -5
  41. package/tiledeskChatbotPlugs/directives/DirReplyV2.js +1 -2
  42. package/tiledeskChatbotPlugs/directives/DirSendEmail.js +1 -2
  43. package/tiledeskChatbotPlugs/directives/DirSendWhatsapp.js +1 -2
  44. package/tiledeskChatbotPlugs/directives/DirSetAttributeV2.js +1 -2
  45. package/tiledeskChatbotPlugs/directives/DirWait.js +2 -3
  46. package/tiledeskChatbotPlugs/directives/DirWebRequestV2.js +7 -8
  47. package/tiledeskChatbotPlugs/directives/DirWebResponse.js +2 -3
  48. package/tiledeskChatbotPlugs/directives/DirWhatsappByAttribute.js +1 -2
  49. package/logs/app1.log +0 -16653
@@ -18,7 +18,6 @@ class DirDepartment {
18
18
  }
19
19
 
20
20
  execute(directive, callback) {
21
- this.logger.info("[Change Department] Executing action");
22
21
  winston.verbose("Execute Department directive");
23
22
  let action;
24
23
  if (directive.action) {
@@ -34,7 +33,7 @@ class DirDepartment {
34
33
  }
35
34
  }
36
35
  this.go(action, () => {
37
- this.logger.info("[Change Department] Action executed");
36
+ this.logger.native("[Change Department] Action executed");
38
37
  callback();
39
38
  });
40
39
 
@@ -96,7 +95,7 @@ class DirDepartment {
96
95
  this.logger.error("[Change Department] Unable to trigger bot");
97
96
  winston.error("(DirDepartment) Error sending hidden message: " + err.message)
98
97
  } else {
99
- this.logger.debug("[Change Department] Bot triggered");
98
+ this.logger.native("[Change Department] Bot triggered");
100
99
  winston.debug("(DirDepartment) Hidden message sent.");
101
100
 
102
101
  }
@@ -105,7 +104,7 @@ class DirDepartment {
105
104
  }
106
105
  }
107
106
  else {
108
- this.logger.debug("[Change Department] No triggering bot");
107
+ this.logger.native("[Change Department] No triggering bot");
109
108
  winston.debug("(DirDepartment) No action.triggerBot");
110
109
  callback();
111
110
  }
@@ -62,22 +62,22 @@ class DirFlowLog {
62
62
 
63
63
  const filler = new Filler();
64
64
  const filled_log = filler.fill(action.log, requestVariables);
65
- winston.debug("(DirFlowLog) fille log: ", filled_log);
65
+ winston.debug("(DirFlowLog) filled log: ", filled_log);
66
66
 
67
67
  if (level === 'error') {
68
- winston.info("Adding log '" + filled_log + "' with level " + level);
68
+ winston.verbose("Adding log '" + filled_log + "' with level " + level);
69
69
  this.logger.error(filled_log);
70
70
  }
71
71
  else if (level === 'warn') {
72
- winston.info("Adding log '" + filled_log + "' with level " + level);
72
+ winston.verbose("Adding log '" + filled_log + "' with level " + level);
73
73
  this.logger.warn(filled_log);
74
74
  }
75
75
  else if (level === 'info') {
76
- winston.info("Adding log '" + filled_log + "' with level " + level);
76
+ winston.verbose("Adding log '" + filled_log + "' with level " + level);
77
77
  this.logger.info(filled_log);
78
78
  }
79
79
  else if (level === 'debug') {
80
- winston.info("Adding log '" + filled_log + "' with level " + level);
80
+ winston.verbose("Adding log '" + filled_log + "' with level " + level);
81
81
  this.logger.debug(filled_log);
82
82
  }
83
83
 
@@ -30,7 +30,6 @@ class DirGptTask {
30
30
  }
31
31
 
32
32
  execute(directive, callback) {
33
- this.logger.info("[ChatGPT Task] Executing action");
34
33
  winston.verbose("Execute GptTask directive");
35
34
  let action;
36
35
  if (directive.action) {
@@ -43,7 +42,7 @@ class DirGptTask {
43
42
  return;
44
43
  }
45
44
  this.go(action, (stop) => {
46
- this.logger.info("[ChatGPT Task] Action completed");
45
+ this.logger.native("[ChatGPT Task] Executed");
47
46
  callback(stop);
48
47
  })
49
48
  }
@@ -125,13 +124,13 @@ class DirGptTask {
125
124
 
126
125
  let key = await integrationService.getKeyFromIntegrations(this.projectId, 'openai', this.token);
127
126
  if (!key) {
128
- this.logger.debug("[ChatGPT Task] Key not found in Integrations.");
127
+ this.logger.native("[ChatGPT Task] Key not found in Integrations.");
129
128
  winston.debug("(DirGptTask) - Key not found in Integrations. Searching in kb settings...");
130
129
  key = await this.getKeyFromKbSettings();
131
130
  }
132
131
 
133
132
  if (!key) {
134
- this.logger.debug("[ChatGPT Task] Retrieve shared gptkey.");
133
+ this.logger.native("[ChatGPT Task] Retrieve shared gptkey.");
135
134
  winston.debug("(DirGptTask) - Retrieve public gptkey")
136
135
  key = process.env.GPTKEY;
137
136
  publicKey = true;
@@ -229,7 +228,7 @@ class DirGptTask {
229
228
  answer = await this.convertToJson(answer);
230
229
  }
231
230
 
232
- this.logger.debug("[ChatGPT Task] Completions answer: ", answer);
231
+ this.logger.native("[ChatGPT Task] Completions answer: ", answer);
233
232
 
234
233
  await this.#assignAttributes(action, answer);
235
234
 
@@ -26,7 +26,6 @@ class DirHubspot {
26
26
  }
27
27
 
28
28
  execute(directive, callback) {
29
- this.logger.info("[Hubspot] Executing action");
30
29
  winston.verbose("Execute Hubspot directive");
31
30
  let action;
32
31
  if (directive.action) {
@@ -39,7 +38,7 @@ class DirHubspot {
39
38
  return;
40
39
  }
41
40
  this.go(action, (stop) => {
42
- this.logger.info("[Hubspot] Action completed");
41
+ this.logger.native("[Hubspot] Executed");
43
42
  callback(stop);
44
43
  })
45
44
  }
@@ -25,7 +25,6 @@ class DirIfOnlineAgentsV2 {
25
25
  }
26
26
 
27
27
  execute(directive, callback) {
28
- this.logger.info("[If Online Agents] Executing action");
29
28
  winston.verbose("Execute IfOnlineAgentsV2 directive");
30
29
  let action;
31
30
  if (directive.action) {
@@ -38,7 +37,7 @@ class DirIfOnlineAgentsV2 {
38
37
  return;
39
38
  }
40
39
  this.go(action, (stop) => {
41
- this.logger.info("[If Online Agents] Action completed");
40
+ this.logger.native("[If Online Agents] Executed");
42
41
  callback(stop);
43
42
  });
44
43
  }
@@ -22,7 +22,6 @@ class DirIfOpenHours {
22
22
  }
23
23
 
24
24
  execute(directive, callback) {
25
- this.logger.info("[If Operating Hours] Executing action");
26
25
  winston.verbose("Execute IfOpenHours directive");
27
26
  let action;
28
27
  if (directive.action) {
@@ -48,7 +47,7 @@ class DirIfOpenHours {
48
47
  return;
49
48
  }
50
49
  this.go(action, (stop) => {
51
- this.logger.info("[If Operating Hours] Action complteted");
50
+ this.logger.native("[If Operating Hours] Action complteted");
52
51
  callback(stop);
53
52
  });
54
53
  }
@@ -115,7 +114,7 @@ class DirIfOpenHours {
115
114
  }
116
115
  } else {
117
116
  if (resbody.isopen && resbody.isopen === true) {
118
- this.logger.debug("[If Operating Hours] is open: true")
117
+ this.logger.native("[If Operating Hours] is open: true")
119
118
  if (trueIntent) {
120
119
  let intentDirective = DirIntent.intentDirectiveFor(trueIntent);
121
120
  winston.debug("(DirIfOpenHours) agents (openHours) => trueIntent");
@@ -126,7 +125,7 @@ class DirIfOpenHours {
126
125
  callback();
127
126
  return;
128
127
  } else {
129
- this.logger.debug("[If Operating Hours] is open: false")
128
+ this.logger.native("[If Operating Hours] is open: false")
130
129
  if (falseIntent) {
131
130
  let intentDirective = DirIntent.intentDirectiveFor(falseIntent);
132
131
  winston.debug("(DirIfOpenHours) !agents (openHours) => falseIntent", falseIntent);
@@ -42,6 +42,7 @@ class DirIntent {
42
42
  const intentName = action.intentName;
43
43
  const projectId = this.supportRequest.id_project;
44
44
  const requestId = this.supportRequest.request_id;
45
+ const draft = this.supportRequest.draft;
45
46
  const botId = this.supportRequest.bot_id;
46
47
  let intent_command;
47
48
  if (intentName) {
@@ -63,7 +64,8 @@ class DirIntent {
63
64
  "id_project": projectId,
64
65
  "request": {
65
66
  "request_id": requestId,
66
- "id_project": projectId
67
+ "id_project": projectId,
68
+ "draft": draft
67
69
  }
68
70
  },
69
71
  "token": this.token
@@ -19,7 +19,6 @@ class DirJSONCondition {
19
19
  }
20
20
 
21
21
  execute(directive, callback) {
22
- this.logger.info("[Condition] Executing action");
23
22
  winston.verbose("Execute JSONCondition directive");
24
23
  let action;
25
24
  if (directive.action) {
@@ -32,7 +31,7 @@ class DirJSONCondition {
32
31
  return;
33
32
  }
34
33
  this.go(action, (stop) => {
35
- this.logger.info("[Condition] Action completed");
34
+ this.logger.native("[Condition] Executed");
36
35
  callback(stop);
37
36
  });
38
37
 
@@ -88,7 +87,7 @@ class DirJSONCondition {
88
87
  // const result = await this.evaluateCondition(scriptCondition, variables);
89
88
  let result;
90
89
  const expression = TiledeskExpression.JSONGroupsToExpression(groups, variables);
91
- this.logger.debug("[Condition] Evaluating expression: ", expression);
90
+ this.logger.native("[Condition] Evaluating expression: ", expression);
92
91
  result = new TiledeskExpression().evaluateStaticExpression(expression, variables);
93
92
  winston.debug("(DirJSONCondition) Evaluation result: ", result);
94
93
  if (result === true) {
@@ -98,7 +97,7 @@ class DirJSONCondition {
98
97
  });
99
98
  }
100
99
  else {
101
- this.logger.debug("[Condition] No trueIntentDirective specified");
100
+ this.logger.native("[Condition] No trueIntentDirective specified");
102
101
  winston.debug("(DirJSONCondition) No trueIntentDirective specified");
103
102
  callback();
104
103
  return;
@@ -115,7 +114,7 @@ class DirJSONCondition {
115
114
  });
116
115
  }
117
116
  else {
118
- this.logger.debug("[Condition] No falseIntentDirective specified");
117
+ this.logger.native("[Condition] No falseIntentDirective specified");
119
118
  winston.debug("(DirJSONCondition) No falseIntentDirective specified");
120
119
  callback();
121
120
  return;
@@ -22,7 +22,6 @@ class DirMake {
22
22
  }
23
23
 
24
24
  execute(directive, callback) {
25
- this.logger.info("[Make] Executing action");
26
25
  winston.verbose("Execute Make directive");
27
26
  let action;
28
27
  if (directive.action) {
@@ -35,7 +34,7 @@ class DirMake {
35
34
  return;
36
35
  }
37
36
  this.go(action, (stop) => {
38
- this.logger.info("[Make] Action completed");
37
+ this.logger.native("[Make] Executed");
39
38
  callback(stop);
40
39
  })
41
40
  }
@@ -21,11 +21,10 @@ class DirMoveToAgent {
21
21
  }
22
22
 
23
23
  execute(directive, callback) {
24
- this.logger.info("[Transfer to a Human] Executing action");
25
24
  winston.verbose("Execute MoveToAgent directive");
26
25
  directive.action = {};
27
26
  this.go(directive.action, () => {
28
- this.logger.info("[Transfer to a Human] Action completed");
27
+ this.logger.native("[Transfer to a Human] Executed");
29
28
  callback();
30
29
  });
31
30
  }
@@ -20,11 +20,10 @@ class DirMoveToUnassigned {
20
20
  }
21
21
 
22
22
  execute(directive, callback) {
23
- this.logger.info("[Move to Unassigned] Executing action");
24
23
  winston.verbose("Execute MoveToUnassigned directive");
25
24
  directive.action = {};
26
25
  this.go(directive.action, () => {
27
- this.logger.info("[Move to Unassigned] Action completed");
26
+ this.logger.native("[Move to Unassigned] Executed");
28
27
  callback();
29
28
  });
30
29
  }
@@ -27,7 +27,6 @@ class DirQapla {
27
27
  }
28
28
 
29
29
  execute(directive, callback) {
30
- this.logger.info("[Qapla] Executing action");
31
30
  let action;
32
31
  if (directive.action) {
33
32
  action = directive.action;
@@ -39,7 +38,7 @@ class DirQapla {
39
38
  return;
40
39
  }
41
40
  this.go(action, (stop) => {
42
- this.logger.info("[Qapla] Action completed");
41
+ this.logger.native("[Qapla] Executed");
43
42
  callback(stop);
44
43
  })
45
44
  }
@@ -23,7 +23,6 @@ class DirRandomReply {
23
23
  }
24
24
 
25
25
  execute(directive, callback) {
26
- this.logger.info("[Random Reply] Executing action");
27
26
  winston.verbose("Execute RandomReply directive");
28
27
  let action;
29
28
  if (directive.action) {
@@ -40,7 +39,7 @@ class DirRandomReply {
40
39
  return;
41
40
  }
42
41
  this.go(action, () => {
43
- this.logger.info("[Random Reply] Action completed");
42
+ this.logger.native("[Random Reply] Executed");
44
43
  callback();
45
44
  });
46
45
  }
@@ -19,7 +19,6 @@ class DirReplaceBot {
19
19
  }
20
20
 
21
21
  execute(directive, callback) {
22
- this.logger.info("[Replace Bot] Executing action");
23
22
  winston.verbose("Execute ReplaceBot directive");
24
23
  let action;
25
24
  if (directive.action) {
@@ -37,7 +36,7 @@ class DirReplaceBot {
37
36
  callback();
38
37
  }
39
38
  this.go(action, () => {
40
- this.logger.info("[Replace Bot] Action completed");
39
+ this.logger.native("[Replace Bot] Executed");
41
40
  callback();
42
41
  })
43
42
  }
@@ -23,7 +23,6 @@ class DirReplaceBotV2 {
23
23
  }
24
24
 
25
25
  execute(directive, callback) {
26
- this.logger.info("[Replace Bot] Executing action");
27
26
  winston.verbose("Execute ReplaceBotV2 directive");
28
27
  let action;
29
28
  if (directive.action) {
@@ -41,7 +40,7 @@ class DirReplaceBotV2 {
41
40
  callback();
42
41
  }
43
42
  this.go(action, () => {
44
- this.logger.info("[Replace Bot] Action completed");
43
+ this.logger.native("[Replace Bot] Executed");
45
44
  callback();
46
45
  })
47
46
  }
@@ -23,7 +23,6 @@ class DirReplaceBotV3 {
23
23
  }
24
24
 
25
25
  execute(directive, callback) {
26
- this.logger.info("[Replace Bot] Executing action");
27
26
  winston.verbose("Execute ReplaceBotV3 directive");
28
27
  let action;
29
28
  if (directive.action) {
@@ -36,7 +35,7 @@ class DirReplaceBotV3 {
36
35
  return;
37
36
  }
38
37
  this.go(action, () => {
39
- this.logger.info("[Replace Bot] Action completed");
38
+ this.logger.native("[Replace Bot] Executed");
40
39
  callback();
41
40
  })
42
41
  }
@@ -25,7 +25,6 @@ class DirReply {
25
25
  }
26
26
 
27
27
  execute(directive, callback) {
28
- this.logger.info("[Reply] Executing action");
29
28
  let action;
30
29
  if (directive.action) {
31
30
  action = directive.action;
@@ -42,7 +41,7 @@ class DirReply {
42
41
  }
43
42
 
44
43
  this.go(action, () => {
45
- this.logger.info("[Reply] Action completed");
44
+ this.logger.native("[Reply] Executed");
46
45
  callback();
47
46
  });
48
47
  }
@@ -63,17 +62,17 @@ class DirReply {
63
62
  const filler = new Filler();
64
63
  // fill text attribute
65
64
  message.text = filler.fill(message.text, requestAttributes);
66
- this.logger.debug("[Reply] Reply with: " + message.text);
65
+ this.logger.native("[Reply] Reply with: " + message.text);
67
66
 
68
67
  if (message.metadata) {
69
68
  winston.debug("DirReply filling message 'metadata':", message.metadata);
70
69
  if (message.metadata.src) {
71
70
  message.metadata.src = filler.fill(message.metadata.src, requestAttributes);
72
- this.logger.debug("Filled metadata.src with ", message.metadata.src);
71
+ this.logger.native("Filled metadata.src with ", message.metadata.src);
73
72
  }
74
73
  if (message.metadata.name) {
75
74
  message.metadata.name = filler.fill(message.metadata.name, requestAttributes);
76
- this.logger.debug("Filled metadata.name with ", message.metadata.name);
75
+ this.logger.native("Filled metadata.name with ", message.metadata.name);
77
76
  }
78
77
  }
79
78
  winston.debug("DirReply filling commands'. Message:", message);
@@ -32,7 +32,6 @@ class DirReplyV2 {
32
32
  }
33
33
 
34
34
  execute(directive, callback) {
35
- this.logger.info("[Advanced Reply] Executing action");
36
35
  winston.verbose("Execute ReplyV2 directive");
37
36
  let action;
38
37
  if (directive.action) {
@@ -49,7 +48,7 @@ class DirReplyV2 {
49
48
  return;
50
49
  }
51
50
  this.go(action, (stop) => {
52
- this.logger.info("[Advanced Reply] Action completed");
51
+ this.logger.native("[Advanced Reply] Executed");
53
52
  callback(stop);
54
53
  });
55
54
  }
@@ -23,7 +23,6 @@ class DirSendEmail {
23
23
  }
24
24
 
25
25
  execute(directive, callback) {
26
- this.logger.info("[Send Email] Executing action");
27
26
  winston.verbose("Execute SendEmail directive");
28
27
  let action;
29
28
  if (directive.action) {
@@ -44,7 +43,7 @@ class DirSendEmail {
44
43
  return;
45
44
  }
46
45
  this.go(action, () => {
47
- this.logger.info("[Send Email] Action completed");
46
+ this.logger.native("[Send Email] Executed");
48
47
  callback();
49
48
  });
50
49
  }
@@ -25,7 +25,6 @@ class DirSendWhatsapp {
25
25
  }
26
26
 
27
27
  execute(directive, callback) {
28
- this.logger.info("[Send Whatsapp] Executing action");
29
28
  winston.verbose("Execute SendWhatsapp directive");
30
29
  let action;
31
30
  if (directive.action) {
@@ -38,7 +37,7 @@ class DirSendWhatsapp {
38
37
  return;
39
38
  }
40
39
  this.go(action, (stop) => {
41
- this.logger.info("[Send Whatsapp] Action completed");
40
+ this.logger.native("[Send Whatsapp] Executed");
42
41
  callback(stop);
43
42
  })
44
43
  }
@@ -86,7 +86,6 @@ class DirSetAttributeV2 {
86
86
  }
87
87
 
88
88
  execute(directive, callback) {
89
- this.logger.info("[Set Attribute] Executing action");
90
89
  winston.verbose("Execute SetAttributeV2 directive");
91
90
  let action;
92
91
  if (directive.action) {
@@ -99,7 +98,7 @@ class DirSetAttributeV2 {
99
98
  return;
100
99
  }
101
100
  this.go(action, () => {
102
- this.logger.info("[Set Attribute] Action completed");
101
+ this.logger.native("[Set Attribute] Executed");
103
102
  callback();
104
103
  });
105
104
  }
@@ -19,7 +19,6 @@ class DirWait {
19
19
 
20
20
  execute(directive, callback) {
21
21
  // 500ms < wait-time < 10.000ms
22
- this.logger.info("[Wait] Executing action");
23
22
  winston.verbose("Execute Wait directive");
24
23
  let action;
25
24
  if (directive.action) {
@@ -48,7 +47,7 @@ class DirWait {
48
47
  }
49
48
 
50
49
  this.go(action, () => {
51
- this.logger.info("[Wait] Action completed");
50
+ this.logger.native("[Wait] Executed");
52
51
  callback();
53
52
  })
54
53
  }
@@ -61,7 +60,7 @@ class DirWait {
61
60
  // await this.tdcache.set(step_key, 0);
62
61
  await TiledeskChatbot.resetStep(this.tdcache, this.requestId);
63
62
  }
64
- this.logger.info("[Wait] Waiting for ", action.millis, "[ms]")
63
+ this.logger.native("[Wait] Waiting for ", action.millis, "[ms]")
65
64
  setTimeout(() => {
66
65
  callback();
67
66
  }, action.millis);
@@ -23,7 +23,6 @@ class DirWebRequestV2 {
23
23
  }
24
24
 
25
25
  execute(directive, callback) {
26
- this.logger.info("[Web Request] Executing action");
27
26
  winston.verbose("Execute WebRequestV2 directive");
28
27
  let action;
29
28
  if (directive.action) {
@@ -35,9 +34,9 @@ class DirWebRequestV2 {
35
34
  callback();
36
35
  return;
37
36
  }
38
- this.logger.info("Executing WebRequest action ", directive.action)
37
+ this.logger.native("Executing WebRequest action ", directive.action)
39
38
  this.go(action, (stop) => {
40
- this.logger.info("[Web Request] Action completed");
39
+ this.logger.native("[Web Request] Executed");
41
40
  callback(stop);
42
41
  }).catch((err) => {
43
42
  // do not nothing
@@ -116,7 +115,7 @@ class DirWebRequestV2 {
116
115
  let error = res.error;
117
116
  await this.#assignAttributes(action, resbody, status, error)
118
117
  winston.debug("DirWebRequestV2 resbody:", resbody);
119
- this.logger.debug("[Web Request] resbody: ", resbody);
118
+ this.logger.native("[Web Request] resbody: ", resbody);
120
119
 
121
120
  if (err) {
122
121
  this.logger.error("WebRequest error: ", err);
@@ -241,7 +240,7 @@ class DirWebRequestV2 {
241
240
  }
242
241
  if (result === true) {
243
242
  if (trueIntentDirective) {
244
- this.logger.info("WebRequest: executing true condition");
243
+ this.logger.native("WebRequest: executing true condition");
245
244
  this.intentDir.execute(trueIntentDirective, () => {
246
245
  if (callback) {
247
246
  callback();
@@ -249,7 +248,7 @@ class DirWebRequestV2 {
249
248
  });
250
249
  }
251
250
  else {
252
- this.logger.info("WebRequest: no block connected to true condition");
251
+ this.logger.native("WebRequest: no block connected to true condition");
253
252
  winston.debug("DirWebRequestV2 No trueIntentDirective specified");
254
253
  if (callback) {
255
254
  callback();
@@ -258,7 +257,7 @@ class DirWebRequestV2 {
258
257
  }
259
258
  else {
260
259
  if (falseIntentDirective) {
261
- this.logger.info("WebRequest: executing false condition");
260
+ this.logger.native("WebRequest: executing false condition");
262
261
  this.intentDir.execute(falseIntentDirective, () => {
263
262
  if (callback) {
264
263
  callback();
@@ -266,7 +265,7 @@ class DirWebRequestV2 {
266
265
  });
267
266
  }
268
267
  else {
269
- this.logger.info("WebRequest: no block connected to false condition");
268
+ this.logger.native("WebRequest: no block connected to false condition");
270
269
  winston.debug("DirWebRequestV2 No falseIntentDirective specified");
271
270
  if (callback) {
272
271
  callback();
@@ -21,7 +21,6 @@ class DirWebResponse {
21
21
  }
22
22
 
23
23
  execute(directive, callback) {
24
- this.logger.info("[Web Response] Executing action");
25
24
  winston.debug("Execute WebResponse directive: ", directive);
26
25
  let action;
27
26
  if (directive.action) {
@@ -34,7 +33,7 @@ class DirWebResponse {
34
33
  return;
35
34
  }
36
35
  this.go(action, () => {
37
- this.logger.info("[Web Response] Action completed");
36
+ this.logger.native("[Web Response] Executed");
38
37
  callback();
39
38
  });
40
39
  }
@@ -63,7 +62,7 @@ class DirWebResponse {
63
62
  payload: json
64
63
  }
65
64
 
66
- this.logger.debug("[Web Response] payload: ", webResponse);
65
+ this.logger.native("[Web Response] payload: ", webResponse);
67
66
 
68
67
  const topic = `/webhooks/${this.requestId}`;
69
68
 
@@ -20,7 +20,6 @@ class DirWhatsappByAttribute {
20
20
  }
21
21
 
22
22
  execute(directive, callback) {
23
- this.logger.info("[Whatsapp by Attribute] Executing action");
24
23
  winston.verbose("Execute WhatsappByAttribute directive");
25
24
  let action;
26
25
  if (directive.action) {
@@ -33,7 +32,7 @@ class DirWhatsappByAttribute {
33
32
  return;
34
33
  }
35
34
  this.go(action, () => {
36
- this.logger.info("[Whatsapp by Attribute] Action completed");
35
+ this.logger.native("[Whatsapp by Attribute] Executed");
37
36
  callback();
38
37
  })
39
38
  }