@digipair/skill-chatbot 0.31.1 → 0.31.2

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/index.cjs.js CHANGED
@@ -45,6 +45,7 @@ let ChatbotService = class ChatbotService {
45
45
  return result;
46
46
  }
47
47
  async boostBySteps(params, _pinsSettingsList, context) {
48
+ var _steps_step;
48
49
  if (context.request.method !== 'POST') {
49
50
  return {
50
51
  error: 'Method not allowed'
@@ -52,7 +53,7 @@ let ChatbotService = class ChatbotService {
52
53
  }
53
54
  const { steps } = params;
54
55
  const step = context.request.body.step ? steps.findIndex(({ name })=>name === context.request.body.step) : 0;
55
- const execute = steps[step];
56
+ const execute = ((_steps_step = steps[step]) == null ? void 0 : _steps_step.execute) || [];
56
57
  const result = await engine.executePinsList(execute, _extends({}, context, {
57
58
  boost: {
58
59
  steps
package/index.esm.js CHANGED
@@ -41,6 +41,7 @@ let ChatbotService = class ChatbotService {
41
41
  return result;
42
42
  }
43
43
  async boostBySteps(params, _pinsSettingsList, context) {
44
+ var _steps_step;
44
45
  if (context.request.method !== 'POST') {
45
46
  return {
46
47
  error: 'Method not allowed'
@@ -48,7 +49,7 @@ let ChatbotService = class ChatbotService {
48
49
  }
49
50
  const { steps } = params;
50
51
  const step = context.request.body.step ? steps.findIndex(({ name })=>name === context.request.body.step) : 0;
51
- const execute = steps[step];
52
+ const execute = ((_steps_step = steps[step]) == null ? void 0 : _steps_step.execute) || [];
52
53
  const result = await executePinsList(execute, _extends({}, context, {
53
54
  boost: {
54
55
  steps
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digipair/skill-chatbot",
3
- "version": "0.31.1",
3
+ "version": "0.31.2",
4
4
  "dependencies": {},
5
5
  "typings": "./index.d.ts",
6
6
  "main": "./index.cjs.js",