@onereach/step-voice 1.2202.13 → 1.2202.17

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.
@@ -42,10 +42,11 @@ class GlobalCommand extends voice_1.default {
42
42
  ]);
43
43
  await this.updateData();
44
44
  this.process.runThread({
45
+ id: `G:${this.dataThreadId}`,
45
46
  state: {
46
47
  name: 'globThread',
47
48
  step: this.step.id,
48
- thread: this.conversationThread.id
49
+ thread: this.dataThreadId
49
50
  },
50
51
  local: {
51
52
  background: true
@@ -179,7 +180,7 @@ class GlobalCommand extends voice_1.default {
179
180
  name: 'exitToThread',
180
181
  result: {
181
182
  conversation: this.conversation,
182
- conversationThreadId: this.conversationThread.id
183
+ conversationThreadId: this.dataThreadId
183
184
  },
184
185
  exitStep: this.getExitStepId(stepExit),
185
186
  step: this.currentStepId
@@ -120,7 +120,7 @@ class InitiateCall extends voice_1.default {
120
120
  actionFromBot: true
121
121
  });
122
122
  await this.startConversation(channel, {
123
- events: [`in/voice/${channel.id}/event`]
123
+ events: { [`in/voice/${channel.id}/event`]: {} }
124
124
  });
125
125
  await this.sendCommands(channel, [
126
126
  ...isAMD
@@ -41,7 +41,7 @@ class WaitForCall extends voice_1.default {
41
41
  actionFromBot: false
42
42
  });
43
43
  await this.startConversation(channel, {
44
- events: [`in/voice/${channel.id}/event`]
44
+ events: { [`in/voice/${channel.id}/event`]: {} }
45
45
  });
46
46
  return this.exitStep('trigger');
47
47
  }
package/dst/voice.js CHANGED
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.VoiceStepError = void 0;
5
5
  const tslib_1 = require("tslib");
6
6
  const lodash_1 = (0, tslib_1.__importDefault)(require("lodash"));
7
- const types_1 = require("@onereach/flow-sdk/dst/types");
8
7
  const uuid_1 = require("uuid");
9
8
  const step_1 = (0, tslib_1.__importDefault)(require("@onereach/step-conversation/dst/step"));
10
9
  const base_1 = (0, tslib_1.__importDefault)(require("@onereach/flow-sdk/dst/errors/base"));
@@ -15,7 +14,7 @@ class VoiceStep extends step_1.default {
15
14
  async sendCommands({ id, type, callback }, commands) {
16
15
  if (lodash_1.default.isEmpty(commands))
17
16
  return;
18
- return this.thread.eventManager.emit({
17
+ return await this.thread.eventManager.emit({
19
18
  target: 'provider',
20
19
  name: `out/voice/${type}`,
21
20
  params: {
@@ -25,7 +24,7 @@ class VoiceStep extends step_1.default {
25
24
  reporting: this.session.getSessionRef()
26
25
  }, {
27
26
  target: callback,
28
- invocationType: types_1.INVOCATION_TYPE.ASYNC,
27
+ invocationType: 'async',
29
28
  timeout: 5000
30
29
  });
31
30
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/step-voice",
3
- "version": "1.2202.13",
3
+ "version": "1.2202.17",
4
4
  "author": "Roman Zolotarov <roman.zolotarov@onereach.com>",
5
5
  "contributors": [
6
6
  "Roman Zolotarov",
@@ -13,19 +13,19 @@
13
13
  "npm": ">= 6.0.0"
14
14
  },
15
15
  "dependencies": {
16
- "@onereach/step-conversation": "^1.0.12",
16
+ "@onereach/step-conversation": "^1.0.15",
17
17
  "lodash": "^4.17.21",
18
18
  "uuid": "^8.3.2"
19
19
  },
20
20
  "devDependencies": {
21
- "@onereach/flow-sdk": "^2.7.73",
21
+ "@onereach/flow-sdk": "^2.7.79",
22
22
  "@swc/cli": "^0.1.55",
23
- "@swc/core": "^1.2.141",
23
+ "@swc/core": "^1.2.143",
24
24
  "@swc/jest": "^0.2.17",
25
25
  "@types/jest": "^27.4.0",
26
26
  "@types/lodash": "^4.14.178",
27
27
  "@types/uuid": "^8.3.4",
28
- "aws-sdk": "^2.1076.0",
28
+ "aws-sdk": "^2.1078.0",
29
29
  "babel-runtime": "^6.26.0",
30
30
  "docdash": "^1.2.0",
31
31
  "husky": "^7.0.4",