@onereach/step-voice 6.0.17 → 6.0.19

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
@@ -129,7 +129,8 @@ class Choice extends voice_1.default {
129
129
  noReplyDelay,
130
130
  speechSections,
131
131
  textType,
132
- ttsSettings
132
+ ttsSettings,
133
+ sensitiveData
133
134
  });
134
135
  return this.exitFlow();
135
136
  }
@@ -183,7 +184,8 @@ class Choice extends voice_1.default {
183
184
  noReplyDelay,
184
185
  speechSections,
185
186
  textType,
186
- ttsSettings
187
+ ttsSettings,
188
+ sensitiveData
187
189
  });
188
190
  return this.exitFlow();
189
191
  }
@@ -213,7 +215,8 @@ class Choice extends voice_1.default {
213
215
  noReplyDelay,
214
216
  speechSections,
215
217
  textType,
216
- ttsSettings
218
+ ttsSettings,
219
+ sensitiveData
217
220
  });
218
221
  return this.exitFlow();
219
222
  }
@@ -131,7 +131,8 @@ class CustomVoiceInput extends voice_1.default {
131
131
  noReplyDelay,
132
132
  speechSections,
133
133
  textType,
134
- ttsSettings
134
+ ttsSettings,
135
+ sensitiveData
135
136
  });
136
137
  return this.exitFlow();
137
138
  }
@@ -161,7 +162,8 @@ class CustomVoiceInput extends voice_1.default {
161
162
  noReplyDelay,
162
163
  speechSections,
163
164
  textType,
164
- ttsSettings
165
+ ttsSettings,
166
+ sensitiveData
165
167
  });
166
168
  return this.exitFlow();
167
169
  }
@@ -102,7 +102,8 @@ class KeypadInput extends voice_1.default {
102
102
  noReplyDelay,
103
103
  speechSections,
104
104
  textType,
105
- ttsSettings
105
+ ttsSettings,
106
+ sensitiveData
106
107
  });
107
108
  return this.exitFlow();
108
109
  }
@@ -131,7 +132,8 @@ class KeypadInput extends voice_1.default {
131
132
  noReplyDelay,
132
133
  speechSections,
133
134
  textType,
134
- ttsSettings
135
+ ttsSettings,
136
+ sensitiveData
135
137
  });
136
138
  return this.exitFlow();
137
139
  }
package/dst/voice.d.ts CHANGED
@@ -75,7 +75,7 @@ export default class VoiceStep<TIn = unknown, TOut = unknown, TParams extends Vo
75
75
  buildChoices({ choices }: TODO): TODO;
76
76
  buildChoice(choice: TODO): TODO;
77
77
  exitChoiceData(type: string, params?: TODO): TODO;
78
- rptsSend(call: IVoiceCall, { command, reporting, repromptsList, noReplyDelay, speechSections, textType, ttsSettings }: TODO): Promise<void>;
78
+ rptsSend(call: IVoiceCall, { command, reporting, repromptsList, noReplyDelay, speechSections, textType, ttsSettings, sensitiveData }: TODO): Promise<void>;
79
79
  rptsTimeout({ noReplyDelay, repromptsList }: TODO): number;
80
80
  rptsRestart(): void;
81
81
  rptsHasMore({ repromptsList }: TODO): boolean;
package/dst/voice.js CHANGED
@@ -171,20 +171,19 @@ class VoiceStep extends step_1.default {
171
171
  }
172
172
  async pauseRecording(call, command, sensitiveData) {
173
173
  const commands = [command];
174
- if (call.recordCall && sensitiveData?.muteStep) {
175
- if (call.vv >= 2) {
176
- // newer voicer version automaically should stop/resume session recording
177
- command.params.sensitiveData = sensitiveData;
178
- }
179
- else {
180
- commands.unshift({
181
- name: 'stop-record-session',
182
- params: {
183
- muteUser: sensitiveData.muteUser,
184
- muteBot: sensitiveData.muteBot
185
- }
186
- });
187
- }
174
+ const stopRecording = (call.recordCall && sensitiveData?.muteStep);
175
+ if (call.vv >= 2) {
176
+ // newer voicer version automaically should stop/resume session recording
177
+ command.params.sensitiveData = stopRecording ? sensitiveData : {};
178
+ }
179
+ else if (stopRecording) {
180
+ commands.unshift({
181
+ name: 'stop-record-session',
182
+ params: {
183
+ muteUser: sensitiveData.muteUser,
184
+ muteBot: sensitiveData.muteBot
185
+ }
186
+ });
188
187
  }
189
188
  await this.sendCommands(call, commands);
190
189
  }
@@ -336,7 +335,7 @@ class VoiceStep extends step_1.default {
336
335
  return data;
337
336
  }
338
337
  ;
339
- async rptsSend(call, { command, reporting, repromptsList, noReplyDelay, speechSections, textType, ttsSettings }) {
338
+ async rptsSend(call, { command, reporting, repromptsList, noReplyDelay, speechSections, textType, ttsSettings, sensitiveData }) {
340
339
  const index = this.rptsIndex;
341
340
  const current = repromptsList[index];
342
341
  const params = command.params;
@@ -372,7 +371,10 @@ class VoiceStep extends step_1.default {
372
371
  lodash_1.default.assign(reportingObject, reporting);
373
372
  }
374
373
  await this.transcript(call, reportingObject);
375
- await this.sendCommands(call, [command]);
374
+ if (call.vv >= 2)
375
+ await this.pauseRecording(call, command, sensitiveData);
376
+ else
377
+ await this.sendCommands(call, [command]);
376
378
  }
377
379
  rptsTimeout({ noReplyDelay, repromptsList }) {
378
380
  const current = repromptsList[this.rptsIndex];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/step-voice",
3
- "version": "6.0.17",
3
+ "version": "6.0.19",
4
4
  "author": "Roman Zolotarov <roman.zolotarov@onereach.com>",
5
5
  "contributors": [
6
6
  "Roman Zolotarov",