@digipair/skill-chatbot 0.31.1 → 0.31.3
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 +3 -2
- package/index.esm.js +3 -2
- package/package.json +1 -1
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
|
@@ -66,7 +67,7 @@ const answer = (params, pinsSettingsList, context)=>new ChatbotService().answer(
|
|
66
67
|
const execute = (params, pinsSettingsList, context)=>new ChatbotService().execute(params, pinsSettingsList, context);
|
67
68
|
// SCENES
|
68
69
|
const boost = (params, pinsSettingsList, context)=>new ChatbotService().boost(params, pinsSettingsList, context);
|
69
|
-
const boostBySteps = (params, pinsSettingsList, context)=>new ChatbotService().
|
70
|
+
const boostBySteps = (params, pinsSettingsList, context)=>new ChatbotService().boostBySteps(params, pinsSettingsList, context);
|
70
71
|
|
71
72
|
exports.answer = answer;
|
72
73
|
exports.boost = boost;
|
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
|
@@ -62,6 +63,6 @@ const answer = (params, pinsSettingsList, context)=>new ChatbotService().answer(
|
|
62
63
|
const execute = (params, pinsSettingsList, context)=>new ChatbotService().execute(params, pinsSettingsList, context);
|
63
64
|
// SCENES
|
64
65
|
const boost = (params, pinsSettingsList, context)=>new ChatbotService().boost(params, pinsSettingsList, context);
|
65
|
-
const boostBySteps = (params, pinsSettingsList, context)=>new ChatbotService().
|
66
|
+
const boostBySteps = (params, pinsSettingsList, context)=>new ChatbotService().boostBySteps(params, pinsSettingsList, context);
|
66
67
|
|
67
68
|
export { answer, boost, boostBySteps, execute };
|