@tiledesk/tiledesk-tybot-connector 0.3.5-rc2 → 0.3.5-rc4
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/package.json +1 -1
- package/tiledeskChatbotPlugs/DirectivesChatbotPlug.js +14 -0
- package/tiledeskChatbotPlugs/directives/DirConnectBlock.js +1 -1
- package/tiledeskChatbotPlugs/directives/DirWebRequestV2.js +2 -0
- package/tiledeskChatbotPlugs/directives/Directives.js +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,12 @@
|
|
|
5
5
|
available on:
|
|
6
6
|
▶️ https://www.npmjs.com/package/@tiledesk/tiledesk-tybot-connector
|
|
7
7
|
|
|
8
|
+
# v0.3.5-rc4
|
|
9
|
+
- added: webhook action (same as intent one)
|
|
10
|
+
|
|
11
|
+
# v0.3.5-rc3
|
|
12
|
+
- bug-fixed: jsonBody parse error in web-request-v2
|
|
13
|
+
|
|
8
14
|
# v0.3.5-rc2
|
|
9
15
|
- bug-fixed: cannot set status of undefined reading res.status in DirAssistant
|
|
10
16
|
|
package/package.json
CHANGED
|
@@ -55,6 +55,7 @@ const { DirAddTags } = require('./directives/DirAddTags');
|
|
|
55
55
|
const { DirSendWhatsapp } = require('./directives/DirSendWhatsapp');
|
|
56
56
|
const { DirReplaceBotV3 } = require('./directives/DirReplaceBotV3');
|
|
57
57
|
const { DirAiTask, DirAiPrompt } = require('./directives/DirAiPrompt');
|
|
58
|
+
const { DirConnectBlock } = require('./directives/DirConnectBlock');
|
|
58
59
|
const { DirWebResponse } = require('./directives/DirWebResponse');
|
|
59
60
|
|
|
60
61
|
class DirectivesChatbotPlug {
|
|
@@ -773,6 +774,19 @@ class DirectivesChatbotPlug {
|
|
|
773
774
|
}
|
|
774
775
|
});
|
|
775
776
|
}
|
|
777
|
+
else if (directive_name === Directives.WEBHOOK) {
|
|
778
|
+
// console.log(".....DirIntent")
|
|
779
|
+
new DirIntent(context).execute(directive, async (stop) => {
|
|
780
|
+
if (stop) {
|
|
781
|
+
if (context.log) { console.log("Stopping Actions on:", JSON.stringify(directive));}
|
|
782
|
+
this.theend();
|
|
783
|
+
}
|
|
784
|
+
else {
|
|
785
|
+
let next_dir = await this.nextDirective(this.directives);
|
|
786
|
+
this.process(next_dir);
|
|
787
|
+
}
|
|
788
|
+
});
|
|
789
|
+
}
|
|
776
790
|
else if (directive_name === Directives.WEB_RESPONSE) {
|
|
777
791
|
new DirWebResponse(context).execute(directive, async () => {
|
|
778
792
|
let next_dir = await this.nextDirective(this.directives);
|
|
@@ -58,6 +58,7 @@ class Directives {
|
|
|
58
58
|
static MOVE_TO_UNASSIGNED = "move_to_unassigned";
|
|
59
59
|
static CONNECT_BLOCK = "connect_block";
|
|
60
60
|
static ADD_TAGS = 'add_tags'
|
|
61
|
+
static WEBHOOK = 'webhook';
|
|
61
62
|
static WEB_RESPONSE = "web_response";
|
|
62
63
|
|
|
63
64
|
// static WHEN_ONLINE_MOVE_TO_AGENT = "whenonlinemovetoagent"; // DEPRECATED?
|