@onereach/step-voice 4.0.1 → 4.0.4

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/voice.js CHANGED
@@ -17,7 +17,9 @@ class VoiceStep extends step_1.default {
17
17
  }
18
18
  async onCancel() {
19
19
  await super.onCancel();
20
- this.exitStep('cancel');
20
+ if (this.data.handleCancel === true) {
21
+ this.exitStep('cancel');
22
+ }
21
23
  }
22
24
  async sendCommands({ id, type, callback }, commands) {
23
25
  if (lodash_1.default.isEmpty(commands))
@@ -105,7 +107,7 @@ class VoiceStep extends step_1.default {
105
107
  await this.updateData();
106
108
  return eventId;
107
109
  }
108
- throwError(error) {
110
+ throwError(error = new Error('unknown')) {
109
111
  throw new VoiceStepError(error.message, null, { name: error.name });
110
112
  }
111
113
  async handleHangup(channel) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/step-voice",
3
- "version": "4.0.1",
3
+ "version": "4.0.4",
4
4
  "author": "Roman Zolotarov <roman.zolotarov@onereach.com>",
5
5
  "contributors": [
6
6
  "Roman Zolotarov",
@@ -13,19 +13,20 @@
13
13
  "npm": ">= 6.0.0"
14
14
  },
15
15
  "dependencies": {
16
- "@onereach/step-conversation": "^1.0.31",
16
+ "@onereach/step-conversation": "^1.0.32",
17
17
  "lodash": "^4.17.21",
18
18
  "uuid": "^8.3.2"
19
19
  },
20
20
  "devDependencies": {
21
- "@onereach/flow-sdk": "^3.0.5",
21
+ "@onereach/flow-sdk": "^3.0.12",
22
22
  "@swc/cli": "^0.1.57",
23
23
  "@swc/core": "^1.2.196",
24
24
  "@swc/jest": "^0.2.21",
25
25
  "@types/jest": "^28.1.0",
26
26
  "@types/lodash": "^4.14.182",
27
+ "@types/timestring": "^6.0.2",
27
28
  "@types/uuid": "^8.3.4",
28
- "aws-sdk": "^2.1147.0",
29
+ "aws-sdk": "^2.1148.0",
29
30
  "babel-runtime": "^6.26.0",
30
31
  "docdash": "^1.2.0",
31
32
  "husky": "^8.0.1",