@tiledesk/tiledesk-tybot-connector 0.2.60 → 0.2.61
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
|
@@ -5,11 +5,18 @@
|
|
|
5
5
|
available on:
|
|
6
6
|
▶️ https://www.npmjs.com/package/@tiledesk/tiledesk-tybot-connector
|
|
7
7
|
|
|
8
|
+
|
|
9
|
+
# v0.2.61
|
|
10
|
+
- fixed WebRequestv2 timeout
|
|
11
|
+
|
|
12
|
+
# v0.2.61-rc1
|
|
13
|
+
- Added VXML actions (dmtf_menu, dtmf_form, blind_transfer)
|
|
14
|
+
|
|
8
15
|
# v0.2.60
|
|
9
16
|
- added flow attributes:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
17
|
+
- lastUserDocumentAsAttachmentURL: Document as a downloadable on click
|
|
18
|
+
- lastUserDocumentAsInlineURL: Document as "view inline" on click
|
|
19
|
+
- flow attribute "strongAuthentication" renamed in "strongAuthenticated"
|
|
13
20
|
|
|
14
21
|
# v0.2.59
|
|
15
22
|
- added flow attribute "strongAuthentication" mapped on request.requester.isAuthenticated (true|false)
|
package/package.json
CHANGED
|
@@ -291,6 +291,27 @@ class DirectivesChatbotPlug {
|
|
|
291
291
|
this.process(next_dir);
|
|
292
292
|
});
|
|
293
293
|
}
|
|
294
|
+
else if (directive_name === Directives.DTMF_FORM) {
|
|
295
|
+
// console.log("...DirReply");
|
|
296
|
+
new DirReply(context).execute(directive, async () => {
|
|
297
|
+
let next_dir = await this.nextDirective(this.directives);
|
|
298
|
+
this.process(next_dir);
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
else if (directive_name === Directives.DTMF_MENU) {
|
|
302
|
+
// console.log("...DirReply");
|
|
303
|
+
new DirReply(context).execute(directive, async () => {
|
|
304
|
+
let next_dir = await this.nextDirective(this.directives);
|
|
305
|
+
this.process(next_dir);
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
else if (directive_name === Directives.BLIND_TRANSFER) {
|
|
309
|
+
// console.log("...DirReply");
|
|
310
|
+
new DirReply(context).execute(directive, async () => {
|
|
311
|
+
let next_dir = await this.nextDirective(this.directives);
|
|
312
|
+
this.process(next_dir);
|
|
313
|
+
});
|
|
314
|
+
}
|
|
294
315
|
else if (directive_name === Directives.RANDOM_REPLY) {
|
|
295
316
|
// console.log("...DirRandomReply");
|
|
296
317
|
new DirRandomReply(context).execute(directive, async () => {
|
|
@@ -81,7 +81,7 @@ class DirWebRequestV2 {
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
let timeout = this.#webrequest_timeout(action, 20000, 1, 300000);
|
|
84
|
-
|
|
84
|
+
console.log("final timeout", timeout);
|
|
85
85
|
if (this.log) {console.log("webRequest URL", url);}
|
|
86
86
|
const HTTPREQUEST = {
|
|
87
87
|
url: url,
|
|
@@ -212,7 +212,7 @@ class DirWebRequestV2 {
|
|
|
212
212
|
method: options.method,
|
|
213
213
|
params: options.params,
|
|
214
214
|
headers: options.headers,
|
|
215
|
-
timeout:
|
|
215
|
+
timeout: options.timeout
|
|
216
216
|
}
|
|
217
217
|
if (options.json !== null) {
|
|
218
218
|
axios_options.data = options.json
|
|
@@ -309,11 +309,23 @@ class DirWebRequestV2 {
|
|
|
309
309
|
|
|
310
310
|
#webrequest_timeout(action, default_timeout, min, max) {
|
|
311
311
|
let timeout = default_timeout;
|
|
312
|
-
if (action.settings
|
|
313
|
-
|
|
314
|
-
|
|
312
|
+
if (!action.settings) {
|
|
313
|
+
return timeout;
|
|
314
|
+
}
|
|
315
|
+
// console.log("default timeout:", timeout);
|
|
316
|
+
// console.log("action.settings:", action.settings);
|
|
317
|
+
// console.log("action.settings.timeout:", action.settings.timeout);
|
|
318
|
+
// console.log("typeof action.settings.timeout:", typeof action.settings.timeout);
|
|
319
|
+
// console.log("action.settings.timeout > min", action.settings.timeout > min)
|
|
320
|
+
// console.log("action.settings.timeout < max", action.settings.timeout < max)
|
|
321
|
+
|
|
322
|
+
if (action.settings.timeout) {
|
|
323
|
+
if ((typeof action.settings.timeout === "number") && action.settings.timeout > min && action.settings.timeout < max) {
|
|
324
|
+
timeout = Math.round(action.settings.timeout)
|
|
325
|
+
// console.log("new timeout:", timeout);
|
|
315
326
|
}
|
|
316
327
|
}
|
|
328
|
+
// console.log("returning timeout:", timeout);
|
|
317
329
|
return timeout
|
|
318
330
|
}
|
|
319
331
|
|
|
@@ -27,16 +27,22 @@ class Directives {
|
|
|
27
27
|
static RANDOM_REPLY = 'randomreply';
|
|
28
28
|
static CODE = 'code';
|
|
29
29
|
static WHATSAPP_ATTRIBUTE = 'whatsapp_attribute';
|
|
30
|
+
static FORM = "form";
|
|
31
|
+
static CAPTURE_USER_REPLY = "capture_user_reply";
|
|
32
|
+
static REPLACE_BOT_V2 = "replacebotv2";
|
|
33
|
+
/**** AI ****/
|
|
30
34
|
static ASK_GPT = "askgpt";
|
|
31
35
|
static ASK_GPT_V2 = "askgptv2";
|
|
32
36
|
static GPT_TASK = "gpt_task";
|
|
33
|
-
|
|
34
|
-
static CAPTURE_USER_REPLY = "capture_user_reply";
|
|
37
|
+
/**** INTEGRATIONS ****/
|
|
35
38
|
static QAPLA = 'qapla';
|
|
36
39
|
static MAKE = 'make';
|
|
37
|
-
static REPLACE_BOT_V2 = "replacebotv2";
|
|
38
40
|
static HUBSPOT = 'hubspot';
|
|
39
41
|
static CUSTOMERIO = 'customerio';
|
|
42
|
+
/**** VOICE CHANNEL ****/
|
|
43
|
+
static DTMF_FORM = 'dtmf_form';
|
|
44
|
+
static DTMF_MENU = 'dtmf_menu';
|
|
45
|
+
static BLIND_TRANSFER = 'blind_transfer';
|
|
40
46
|
|
|
41
47
|
// static WHEN_ONLINE_MOVE_TO_AGENT = "whenonlinemovetoagent"; // DEPRECATED?
|
|
42
48
|
// static WHEN_OFFLINE_HOURS = "whenofflinehours"; // DEPRECATED // adds a message on top of the original message when offline hours opts: --replace
|