@onereach/step-voice 5.0.9-fixsubflow.12 → 5.0.9-fixsubflow.13
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/Choice.js +1 -1
- package/dst/Custom Voice Input.js +1 -1
- package/dst/Global Command.js +1 -2
- package/dst/Hangup.js +1 -1
- package/dst/Keypad Input.js +1 -1
- package/dst/Say Message.js +1 -1
- package/dst/voice.d.ts +1 -0
- package/dst/voice.js +6 -0
- package/package.json +1 -1
package/dst/Choice.js
CHANGED
|
@@ -232,7 +232,7 @@ class Choice extends voice_1.default {
|
|
|
232
232
|
return await this.waitConvEnd();
|
|
233
233
|
}
|
|
234
234
|
case 'cancel': {
|
|
235
|
-
return this.
|
|
235
|
+
return this.handleCancel();
|
|
236
236
|
}
|
|
237
237
|
case 'error':
|
|
238
238
|
return this.throwError(event.params.error);
|
|
@@ -178,7 +178,7 @@ class CustomVoiceInput extends voice_1.default {
|
|
|
178
178
|
return await this.waitConvEnd();
|
|
179
179
|
}
|
|
180
180
|
case 'cancel': {
|
|
181
|
-
return this.
|
|
181
|
+
return this.handleCancel();
|
|
182
182
|
}
|
|
183
183
|
case 'error':
|
|
184
184
|
return this.throwError(event.params.error);
|
package/dst/Global Command.js
CHANGED
package/dst/Hangup.js
CHANGED
|
@@ -13,7 +13,7 @@ class Hangup extends voice_1.default {
|
|
|
13
13
|
case 'error':
|
|
14
14
|
return this.throwError(event.params.error);
|
|
15
15
|
case 'cancel': {
|
|
16
|
-
return this.
|
|
16
|
+
return this.handleCancel();
|
|
17
17
|
}
|
|
18
18
|
default:
|
|
19
19
|
return this.exitFlow();
|
package/dst/Keypad Input.js
CHANGED
|
@@ -149,7 +149,7 @@ class KeypadInput extends voice_1.default {
|
|
|
149
149
|
return await this.waitConvEnd();
|
|
150
150
|
}
|
|
151
151
|
case 'cancel': {
|
|
152
|
-
return this.
|
|
152
|
+
return this.handleCancel();
|
|
153
153
|
}
|
|
154
154
|
case 'error':
|
|
155
155
|
return this.throwError(event.params.error);
|
package/dst/Say Message.js
CHANGED
|
@@ -19,7 +19,7 @@ class SayMessage extends voice_1.default {
|
|
|
19
19
|
case 'error':
|
|
20
20
|
return this.throwError(event.params.error);
|
|
21
21
|
case 'cancel': {
|
|
22
|
-
return this.
|
|
22
|
+
return this.handleCancel();
|
|
23
23
|
}
|
|
24
24
|
default:
|
|
25
25
|
return this.exitFlow();
|
package/dst/voice.d.ts
CHANGED
|
@@ -47,6 +47,7 @@ export default class VoiceStep<TIn = unknown, TOut = unknown, TParams extends Vo
|
|
|
47
47
|
runBefore(): Promise<void>;
|
|
48
48
|
sendCommands({ id, type, callback }: IVoiceCall, commands: TODO[]): Promise<void>;
|
|
49
49
|
handleHeartbeat(call: IVoiceCall): Promise<void>;
|
|
50
|
+
handleCancel(): void;
|
|
50
51
|
extractSectionMessages(sections: IPromtpSection[]): string;
|
|
51
52
|
extractSectionFiles(sections: IPromtpSection[]): Array<{
|
|
52
53
|
fileUrl: string;
|
package/dst/voice.js
CHANGED
|
@@ -65,6 +65,12 @@ class VoiceStep extends step_1.default {
|
|
|
65
65
|
await this.updateData();
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
+
handleCancel() {
|
|
69
|
+
if (this.data.handleCancel === true)
|
|
70
|
+
this.exitStep('cancel');
|
|
71
|
+
else
|
|
72
|
+
this.end();
|
|
73
|
+
}
|
|
68
74
|
extractSectionMessages(sections) {
|
|
69
75
|
return lodash_1.default.chain(sections)
|
|
70
76
|
.filter(s => Boolean(s.text))
|