@onereach/step-voice 6.0.7 → 6.0.8

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.
@@ -37,7 +37,6 @@ export default class GlobalCommand extends VoiceStep<Partial<INPUT>, OUTPUT, EVE
37
37
  exitThread(event: ITypedEvent<EVENT>, type: string, stepExit: string): Promise<void>;
38
38
  exitToThread(): void;
39
39
  buildGrammar(call: IVoiceCall, choices: TODO[]): Promise<any>;
40
- exitFlow(): unknown;
41
40
  sleepUntilHangup(): void;
42
41
  }
43
42
  export {};
@@ -90,7 +90,6 @@ class GlobalCommand extends voice_1.default {
90
90
  this.end();
91
91
  });
92
92
  this.triggers.local(`in/voice/${call.id}`, async (event) => {
93
- event.processed = undefined;
94
93
  switch (event.params.type) {
95
94
  case 'hangup': {
96
95
  await this.hangup(call);
@@ -153,15 +152,12 @@ class GlobalCommand extends voice_1.default {
153
152
  this.log.error('gc.error', event.params.error);
154
153
  // TODO throw it?
155
154
  }
156
- this.event.processed = true;
157
155
  break;
158
156
  }
159
157
  case 'cancel': {
160
- this.event.processed = true;
161
158
  return this.handleCancel();
162
159
  }
163
160
  case 'background': {
164
- this.event.processed = true;
165
161
  this.thread.background = event.params.background ?? false;
166
162
  await this.handleHeartbeat(call);
167
163
  break;
@@ -241,7 +237,6 @@ class GlobalCommand extends voice_1.default {
241
237
  step: this.currentStepId
242
238
  }
243
239
  });
244
- event.processed = true;
245
240
  }
246
241
  exitToThread() {
247
242
  this.thread.exitStep(this.state.exitStep, this.state.result);
@@ -254,10 +249,6 @@ class GlobalCommand extends voice_1.default {
254
249
  asr: asr.getSettings(call.asr)
255
250
  };
256
251
  }
257
- exitFlow() {
258
- this.event.processed = false;
259
- return super.exitFlow();
260
- }
261
252
  sleepUntilHangup() {
262
253
  this.triggers.local(LocalEvents.hangup, () => {
263
254
  this.end();
package/dst/step.js CHANGED
@@ -157,10 +157,7 @@ class ConvStep extends step_1.default {
157
157
  async startConversation(data, { thread: _thread } = {}) {
158
158
  this.convDataCache = {
159
159
  ...data,
160
- _conv: data._conv ?? {
161
- glb: [],
162
- lcl: []
163
- }
160
+ _conv: data._conv ?? {}
164
161
  };
165
162
  await this.updateData();
166
163
  // this.state.thread = this.dataThreadId
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/step-voice",
3
- "version": "6.0.7",
3
+ "version": "6.0.8",
4
4
  "author": "Roman Zolotarov <roman.zolotarov@onereach.com>",
5
5
  "contributors": [
6
6
  "Roman Zolotarov",