@onereach/step-voice 1.2202.21 → 1.2202.23
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 +9 -5
- package/dst/Say Message.js +0 -1
- package/dst/Wait For Call.js +3 -3
- package/dst/voice.js +1 -0
- package/package.json +9 -8
package/dst/Global Command.js
CHANGED
|
@@ -41,8 +41,11 @@ class GlobalCommand extends voice_1.default {
|
|
|
41
41
|
}
|
|
42
42
|
]);
|
|
43
43
|
await this.updateData();
|
|
44
|
-
this.process.runThread({
|
|
44
|
+
await this.process.runThread({
|
|
45
45
|
id: `G:${this.dataThreadId}`,
|
|
46
|
+
local: {
|
|
47
|
+
background: true
|
|
48
|
+
},
|
|
46
49
|
state: {
|
|
47
50
|
name: 'globThread',
|
|
48
51
|
step: this.step.id,
|
|
@@ -58,10 +61,10 @@ class GlobalCommand extends voice_1.default {
|
|
|
58
61
|
return _.some(choices, (choice) => choice.exitId === exitId);
|
|
59
62
|
};
|
|
60
63
|
this.triggers.once(`in/voice/${channel.id}/event`, async (event) => {
|
|
64
|
+
event.processed = undefined;
|
|
61
65
|
switch (event.params.type) {
|
|
62
66
|
case 'hangup': {
|
|
63
67
|
await this.hangup(channel, event);
|
|
64
|
-
this.event.processed = undefined;
|
|
65
68
|
return this.end();
|
|
66
69
|
}
|
|
67
70
|
case 'avm-detected':
|
|
@@ -82,7 +85,7 @@ class GlobalCommand extends voice_1.default {
|
|
|
82
85
|
});
|
|
83
86
|
return this.exitThread(event, 'digit', params.exitId);
|
|
84
87
|
}
|
|
85
|
-
return
|
|
88
|
+
return {};
|
|
86
89
|
}
|
|
87
90
|
case 'recognition': {
|
|
88
91
|
const params = event.params;
|
|
@@ -102,12 +105,12 @@ class GlobalCommand extends voice_1.default {
|
|
|
102
105
|
});
|
|
103
106
|
return this.exitThread(event, 'voice', params.exitId);
|
|
104
107
|
}
|
|
105
|
-
return
|
|
108
|
+
return {};
|
|
106
109
|
}
|
|
107
110
|
case 'error':
|
|
108
111
|
return this.throwError(event.params.error);
|
|
109
112
|
default:
|
|
110
|
-
return
|
|
113
|
+
return {};
|
|
111
114
|
}
|
|
112
115
|
});
|
|
113
116
|
}
|
|
@@ -183,6 +186,7 @@ class GlobalCommand extends voice_1.default {
|
|
|
183
186
|
step: this.currentStepId
|
|
184
187
|
}
|
|
185
188
|
});
|
|
189
|
+
event.processed = true;
|
|
186
190
|
// this is required to mark event as handled
|
|
187
191
|
// this.gotoState(this.state, { name: 'exiting' })
|
|
188
192
|
}
|
package/dst/Say Message.js
CHANGED
package/dst/Wait For Call.js
CHANGED
|
@@ -35,14 +35,14 @@ class WaitForCall extends voice_1.default {
|
|
|
35
35
|
sessionType: 'Phone'
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
|
+
await this.startConversation(channel, {
|
|
39
|
+
events: { [`in/voice/${channel.id}/event`]: {} }
|
|
40
|
+
});
|
|
38
41
|
await this.transcript(channel, {
|
|
39
42
|
action: 'Call Start',
|
|
40
43
|
reportingSettingsKey: 'transcript',
|
|
41
44
|
actionFromBot: false
|
|
42
45
|
});
|
|
43
|
-
await this.startConversation(channel, {
|
|
44
|
-
events: { [`in/voice/${channel.id}/event`]: {} }
|
|
45
|
-
});
|
|
46
46
|
return this.exitStep('trigger');
|
|
47
47
|
}
|
|
48
48
|
}
|
package/dst/voice.js
CHANGED
|
@@ -93,6 +93,7 @@ class VoiceStep extends step_1.default {
|
|
|
93
93
|
reportingObject.voiceProcessResult = voiceProcessResult;
|
|
94
94
|
await this.reporter.reportTranscriptEvent(reportingObject);
|
|
95
95
|
channel.lastTranscriptId = eventId;
|
|
96
|
+
await this.updateData();
|
|
96
97
|
return eventId;
|
|
97
98
|
}
|
|
98
99
|
throwError(error) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onereach/step-voice",
|
|
3
|
-
"version": "1.2202.
|
|
3
|
+
"version": "1.2202.23",
|
|
4
4
|
"author": "Roman Zolotarov <roman.zolotarov@onereach.com>",
|
|
5
5
|
"contributors": [
|
|
6
6
|
"Roman Zolotarov",
|
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
"uuid": "^8.3.2"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@onereach/flow-sdk": "^2.7.
|
|
21
|
+
"@onereach/flow-sdk": "^2.7.84",
|
|
22
22
|
"@swc/cli": "^0.1.55",
|
|
23
|
-
"@swc/core": "^1.2.
|
|
24
|
-
"@swc/jest": "^0.2.
|
|
25
|
-
"@types/jest": "^27.4.
|
|
26
|
-
"@types/lodash": "^4.14.
|
|
23
|
+
"@swc/core": "^1.2.146",
|
|
24
|
+
"@swc/jest": "^0.2.20",
|
|
25
|
+
"@types/jest": "^27.4.1",
|
|
26
|
+
"@types/lodash": "^4.14.179",
|
|
27
27
|
"@types/uuid": "^8.3.4",
|
|
28
|
-
"aws-sdk": "^2.
|
|
28
|
+
"aws-sdk": "^2.1082.0",
|
|
29
29
|
"babel-runtime": "^6.26.0",
|
|
30
30
|
"docdash": "^1.2.0",
|
|
31
31
|
"husky": "^7.0.4",
|
|
@@ -45,7 +45,8 @@
|
|
|
45
45
|
"download-prod": "sh scripts/download.sh prod",
|
|
46
46
|
"download-dev": "sh scripts/download.sh dev",
|
|
47
47
|
"upload-prod": "sh scripts/upload.sh prod",
|
|
48
|
-
"upload-dev": "sh scripts/upload.sh dev"
|
|
48
|
+
"upload-dev": "sh scripts/upload.sh dev",
|
|
49
|
+
"test": "jest"
|
|
49
50
|
},
|
|
50
51
|
"repository": {
|
|
51
52
|
"type": "git",
|