@onereach/step-voice 6.1.11-repromptsimprovements.0 → 6.1.11

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 CHANGED
@@ -169,9 +169,9 @@ class Choice extends voice_1.default {
169
169
  // There might be hooks after this step which we will try to avoid
170
170
  return this.exitStep(exitId, this.exitChoiceData('voice', params), longRecognition);
171
171
  }
172
- else if ((lodash_1.default.isUndefined(usePromptsForUnrecognized) || usePromptsForUnrecognized) &&
173
- this.rptsHasMore({ repromptsList }) &&
174
- (usePromptsTriggers ? isRepromptTrigger(phrases, this.data.promptsTriggers) : true)) {
172
+ else if (((lodash_1.default.isUndefined(usePromptsForUnrecognized) || usePromptsForUnrecognized) ||
173
+ (usePromptsTriggers ? isRepromptTrigger(phrases, this.data.promptsTriggers) : true)) &&
174
+ this.rptsHasMore({ repromptsList })) {
175
175
  await this.transcript(call, {
176
176
  message: 'Unrecognized',
177
177
  voiceProcessResult,
@@ -6,7 +6,6 @@ interface INPUT {
6
6
  audio: TODO[];
7
7
  choices: TODO[];
8
8
  prompts: TODO[];
9
- usePromptsForUnrecognized?: boolean;
10
9
  sensitiveData: SensitiveData;
11
10
  noReplyDelay: number;
12
11
  promptsTriggers: TODO[];
@@ -55,7 +55,7 @@ const alterRecognitionPhrases = (phrases, interpretation) => {
55
55
  class CustomVoiceInput extends voice_1.default {
56
56
  async runStep() {
57
57
  const call = await this.fetchData();
58
- const { textType, tts, sensitiveData, noReplyDelay, usePromptsTriggers, recognitionModel, phraseList, usePromptsForUnrecognized } = this.data;
58
+ const { textType, tts, sensitiveData, noReplyDelay, usePromptsTriggers, recognitionModel, phraseList } = this.data;
59
59
  const exitExists = (exitId) => {
60
60
  return lodash_1.default.some(choices, (choice) => choice.exitId === exitId);
61
61
  };
@@ -116,8 +116,7 @@ class CustomVoiceInput extends voice_1.default {
116
116
  // There might be hooks after this step which we will try to avoid
117
117
  return this.exitStep(exitId, this.exitChoiceData('voice', params));
118
118
  }
119
- else if ((lodash_1.default.isUndefined(usePromptsForUnrecognized) || usePromptsForUnrecognized) &&
120
- this.rptsHasMore({ repromptsList }) &&
119
+ else if (this.rptsHasMore({ repromptsList }) &&
121
120
  (usePromptsTriggers ? isRepromptTrigger(phrases, this.data.promptsTriggers) : true)) {
122
121
  await this.transcript(call, {
123
122
  message: 'Unrecognized',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/step-voice",
3
- "version": "6.1.11-repromptsimprovements.0",
3
+ "version": "6.1.11",
4
4
  "author": "Roman Zolotarov <roman.zolotarov@onereach.com>",
5
5
  "contributors": [
6
6
  "Roman Zolotarov",