@onereach/step-voice 4.0.46 → 4.0.47
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/dst/Global Command.js +3 -2
- package/dst/Wait For Call.js +3 -3
- package/dst/step.js +1 -1
- package/package.json +2 -1
package/dst/Global Command.js
CHANGED
|
@@ -7,12 +7,13 @@ const nanoid_1 = require("nanoid");
|
|
|
7
7
|
const voice_1 = tslib_1.__importDefault(require("./voice"));
|
|
8
8
|
class GlobalCommand extends voice_1.default {
|
|
9
9
|
get isGlobal() {
|
|
10
|
-
return
|
|
10
|
+
return this.thread.id === `G:${this.dataThreadId}`;
|
|
11
11
|
}
|
|
12
12
|
async runStep() {
|
|
13
|
+
const gcThreadId = `G:${this.dataThreadId}`;
|
|
13
14
|
this._clearCache();
|
|
14
15
|
await this.process.runThread({
|
|
15
|
-
id:
|
|
16
|
+
id: gcThreadId,
|
|
16
17
|
state: {
|
|
17
18
|
name: 'initThread',
|
|
18
19
|
step: this.step.id,
|
package/dst/Wait For Call.js
CHANGED
|
@@ -25,13 +25,13 @@ class WaitForCall extends voice_1.default {
|
|
|
25
25
|
const { asr, tts, endOfInputTimeout } = this.data;
|
|
26
26
|
const channel = {
|
|
27
27
|
headers: event.params.headers,
|
|
28
|
-
// @ts-
|
|
28
|
+
// @ts-expect-error
|
|
29
29
|
botNumber: event.params.channel.to ?? 'unknown',
|
|
30
|
-
// @ts-
|
|
30
|
+
// @ts-expect-error
|
|
31
31
|
endUserNumber: event.params.channel?.from ?? 'unknown',
|
|
32
32
|
...event.params.channel,
|
|
33
33
|
asr: asr.getSettings(),
|
|
34
|
-
tts: tts.getVoice()
|
|
34
|
+
tts: tts.getVoice()
|
|
35
35
|
};
|
|
36
36
|
delete channel.from;
|
|
37
37
|
delete channel.to;
|
package/dst/step.js
CHANGED
|
@@ -230,7 +230,7 @@ class ConvStep extends step_1.default {
|
|
|
230
230
|
const que = this.isGlobal ? conv.glb : conv.lcl;
|
|
231
231
|
const queIndex = que.findIndex(stp => stp.key === sessionKey && this.thread.id === stp.thread);
|
|
232
232
|
if (queIndex < 0) {
|
|
233
|
-
await this.sendEventToStep({ toGlobal:
|
|
233
|
+
await this.sendEventToStep({ toGlobal: this.isGlobal, event: { name: '_conv', action: 'onPause', params: { byStep: this.step.label } } });
|
|
234
234
|
que.push({ key: sessionKey, thread: this.thread.id, name: this.constructor.name, label: this.label, step: this.id });
|
|
235
235
|
await this.updateData();
|
|
236
236
|
return true;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onereach/step-voice",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.47",
|
|
4
4
|
"author": "Roman Zolotarov <roman.zolotarov@onereach.com>",
|
|
5
5
|
"contributors": [
|
|
6
6
|
"Roman Zolotarov",
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@onereach/step-conversation": "^1.0.40",
|
|
17
|
+
"cd": "^0.3.3",
|
|
17
18
|
"lodash": "^4.17.21",
|
|
18
19
|
"uuid": "^8.3.2"
|
|
19
20
|
},
|