@scout9/app 1.0.0-alpha.0.3.2 → 1.0.0-alpha.0.3.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/dist/{dev-b57781e5.cjs → dev-f7215614.cjs} +33 -20
- package/dist/{index-6b64a6ac.cjs → index-c6c0a761.cjs} +6 -6
- package/dist/index.cjs +3 -3
- package/dist/{multipart-parser-77660bcb.cjs → multipart-parser-734db7f7.cjs} +3 -3
- package/dist/{spirits-d3dafe71.cjs → spirits-bf93b875.cjs} +11 -1
- package/dist/spirits.cjs +1 -1
- package/dist/testing-tools.cjs +2 -2
- package/package.json +1 -1
- package/src/core/templates/app.js +2 -2
- package/src/public.d.ts +1 -1
- package/src/testing-tools/dev.js +19 -5
- package/src/testing-tools/spirits.js +13 -2
- package/types/index.d.ts +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var spirits = require("./spirits-
|
|
3
|
+
var spirits = require("./spirits-bf93b875.cjs");
|
|
4
4
|
var require$$0$4 = require('util');
|
|
5
5
|
var require$$0$3 = require('stream');
|
|
6
6
|
var require$$1 = require('path');
|
|
@@ -26507,13 +26507,13 @@ common.createRequestFunction = createRequestFunction;
|
|
|
26507
26507
|
/**
|
|
26508
26508
|
*
|
|
26509
26509
|
* @summary Gets a customer
|
|
26510
|
-
* @param {string}
|
|
26510
|
+
* @param {string} idOrEmailOrPhone Either customers id, phone number or email
|
|
26511
26511
|
* @param {*} [options] Override http request option.
|
|
26512
26512
|
* @throws {RequiredError}
|
|
26513
26513
|
*/
|
|
26514
|
-
customer: async (
|
|
26515
|
-
// verify required parameter '
|
|
26516
|
-
(0, common_1.assertParamExists)('customer', '
|
|
26514
|
+
customer: async (idOrEmailOrPhone, options = {}) => {
|
|
26515
|
+
// verify required parameter 'idOrEmailOrPhone' is not null or undefined
|
|
26516
|
+
(0, common_1.assertParamExists)('customer', 'idOrEmailOrPhone', idOrEmailOrPhone);
|
|
26517
26517
|
const localVarPath = `/v1-customer`;
|
|
26518
26518
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
26519
26519
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -26528,8 +26528,8 @@ common.createRequestFunction = createRequestFunction;
|
|
|
26528
26528
|
};
|
|
26529
26529
|
const localVarHeaderParameter = {};
|
|
26530
26530
|
const localVarQueryParameter = {};
|
|
26531
|
-
if (
|
|
26532
|
-
localVarQueryParameter['
|
|
26531
|
+
if (idOrEmailOrPhone !== undefined) {
|
|
26532
|
+
localVarQueryParameter['idOrEmailOrPhone'] = idOrEmailOrPhone;
|
|
26533
26533
|
}
|
|
26534
26534
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
26535
26535
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
@@ -28198,12 +28198,12 @@ common.createRequestFunction = createRequestFunction;
|
|
|
28198
28198
|
/**
|
|
28199
28199
|
*
|
|
28200
28200
|
* @summary Gets a customer
|
|
28201
|
-
* @param {string}
|
|
28201
|
+
* @param {string} idOrEmailOrPhone Either customers id, phone number or email
|
|
28202
28202
|
* @param {*} [options] Override http request option.
|
|
28203
28203
|
* @throws {RequiredError}
|
|
28204
28204
|
*/
|
|
28205
|
-
async customer(
|
|
28206
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.customer(
|
|
28205
|
+
async customer(idOrEmailOrPhone, options) {
|
|
28206
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.customer(idOrEmailOrPhone, options);
|
|
28207
28207
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1$1.default, base_1.BASE_PATH, configuration);
|
|
28208
28208
|
},
|
|
28209
28209
|
/**
|
|
@@ -28817,12 +28817,12 @@ common.createRequestFunction = createRequestFunction;
|
|
|
28817
28817
|
/**
|
|
28818
28818
|
*
|
|
28819
28819
|
* @summary Gets a customer
|
|
28820
|
-
* @param {string}
|
|
28820
|
+
* @param {string} idOrEmailOrPhone Either customers id, phone number or email
|
|
28821
28821
|
* @param {*} [options] Override http request option.
|
|
28822
28822
|
* @throws {RequiredError}
|
|
28823
28823
|
*/
|
|
28824
|
-
customer(
|
|
28825
|
-
return localVarFp.customer(
|
|
28824
|
+
customer(idOrEmailOrPhone, options) {
|
|
28825
|
+
return localVarFp.customer(idOrEmailOrPhone, options).then(request => request(axios, basePath));
|
|
28826
28826
|
},
|
|
28827
28827
|
/**
|
|
28828
28828
|
*
|
|
@@ -29417,13 +29417,13 @@ common.createRequestFunction = createRequestFunction;
|
|
|
29417
29417
|
/**
|
|
29418
29418
|
*
|
|
29419
29419
|
* @summary Gets a customer
|
|
29420
|
-
* @param {string}
|
|
29420
|
+
* @param {string} idOrEmailOrPhone Either customers id, phone number or email
|
|
29421
29421
|
* @param {*} [options] Override http request option.
|
|
29422
29422
|
* @throws {RequiredError}
|
|
29423
29423
|
* @memberof Scout9Api
|
|
29424
29424
|
*/
|
|
29425
|
-
customer(
|
|
29426
|
-
return (0, exports.Scout9ApiFp)(this.configuration).customer(
|
|
29425
|
+
customer(idOrEmailOrPhone, options) {
|
|
29426
|
+
return (0, exports.Scout9ApiFp)(this.configuration).customer(idOrEmailOrPhone, options).then(request => request(this.axios, this.basePath));
|
|
29427
29427
|
}
|
|
29428
29428
|
/**
|
|
29429
29429
|
*
|
|
@@ -29993,7 +29993,7 @@ common.createRequestFunction = createRequestFunction;
|
|
|
29993
29993
|
var configuration = {};
|
|
29994
29994
|
|
|
29995
29995
|
var name$1 = "@scout9/admin";
|
|
29996
|
-
var version$2 = "1.0.0-alpha.0.0.
|
|
29996
|
+
var version$2 = "1.0.0-alpha.0.0.49";
|
|
29997
29997
|
var description$1 = "";
|
|
29998
29998
|
var main$2 = "./build/index.js";
|
|
29999
29999
|
var types$1 = "./build/index.d.ts";
|
|
@@ -35019,7 +35019,7 @@ function _loadUserPackageJson() {
|
|
|
35019
35019
|
targetPkgUrl = isTest ? packageTestJsonUrl : packageJsonUrl;
|
|
35020
35020
|
_context2.t0 = JSON;
|
|
35021
35021
|
_context2.next = 10;
|
|
35022
|
-
return fs__default["default"].readFile(new URL(targetPkgUrl, (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('dev-
|
|
35022
|
+
return fs__default["default"].readFile(new URL(targetPkgUrl, (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('dev-f7215614.js', document.baseURI).href))), 'utf-8');
|
|
35023
35023
|
case 10:
|
|
35024
35024
|
_context2.t1 = _context2.sent;
|
|
35025
35025
|
pkg = _context2.t0.parse.call(_context2.t0, _context2.t1);
|
|
@@ -42221,7 +42221,7 @@ var Scout9Test = /*#__PURE__*/function () {
|
|
|
42221
42221
|
*/
|
|
42222
42222
|
spirits._defineProperty(this, "messages", void 0);
|
|
42223
42223
|
/**
|
|
42224
|
-
* @type {
|
|
42224
|
+
* @type {import('@scout9/app').ConversationContext}
|
|
42225
42225
|
*/
|
|
42226
42226
|
spirits._defineProperty(this, "context", void 0);
|
|
42227
42227
|
/**
|
|
@@ -42426,6 +42426,10 @@ var Scout9Test = /*#__PURE__*/function () {
|
|
|
42426
42426
|
progressInput = function progressInput() {}; // use no-op
|
|
42427
42427
|
}
|
|
42428
42428
|
}
|
|
42429
|
+
|
|
42430
|
+
/**
|
|
42431
|
+
* @type {import('@scout9/app').Message}
|
|
42432
|
+
*/
|
|
42429
42433
|
_message = {
|
|
42430
42434
|
id: 'user_mock_' + Math.random().toString(36).slice(2, 11),
|
|
42431
42435
|
role: 'customer',
|
|
@@ -42683,9 +42687,18 @@ var Scout9Test = /*#__PURE__*/function () {
|
|
|
42683
42687
|
return generate;
|
|
42684
42688
|
}()
|
|
42685
42689
|
/**
|
|
42686
|
-
* @
|
|
42690
|
+
* @param {Partial<import('@scout9/app').ConversationContext>} ctx
|
|
42687
42691
|
*/
|
|
42688
42692
|
)
|
|
42693
|
+
}, {
|
|
42694
|
+
key: "context",
|
|
42695
|
+
set: function set(ctx) {
|
|
42696
|
+
this.context = spirits._objectSpread2(spirits._objectSpread2({}, this.context), ctx);
|
|
42697
|
+
}
|
|
42698
|
+
|
|
42699
|
+
/**
|
|
42700
|
+
* @private
|
|
42701
|
+
*/
|
|
42689
42702
|
}, {
|
|
42690
42703
|
key: "_loadApp",
|
|
42691
42704
|
value: (function () {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var spirits = require("./spirits-
|
|
4
|
-
var dev = require("./dev-
|
|
3
|
+
var spirits = require("./spirits-bf93b875.cjs");
|
|
4
|
+
var dev = require("./dev-f7215614.cjs");
|
|
5
5
|
var macros = require("./macros-5be965e9.cjs");
|
|
6
6
|
var require$$0 = require('fs');
|
|
7
7
|
var require$$2$1 = require('events');
|
|
@@ -29483,7 +29483,7 @@ class Body {
|
|
|
29483
29483
|
}
|
|
29484
29484
|
const {
|
|
29485
29485
|
toFormData
|
|
29486
|
-
} = await Promise.resolve().then(function () { return require("./multipart-parser-
|
|
29486
|
+
} = await Promise.resolve().then(function () { return require("./multipart-parser-734db7f7.cjs"); });
|
|
29487
29487
|
return toFormData(this.body, ct);
|
|
29488
29488
|
}
|
|
29489
29489
|
|
|
@@ -41892,7 +41892,7 @@ function _loadUserPackageJson() {
|
|
|
41892
41892
|
targetPkgUrl = isTest ? packageTestJsonUrl : packageJsonUrl;
|
|
41893
41893
|
_context.t0 = JSON;
|
|
41894
41894
|
_context.next = 10;
|
|
41895
|
-
return fs__default["default"].readFile(new URL(targetPkgUrl, (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('index-
|
|
41895
|
+
return fs__default["default"].readFile(new URL(targetPkgUrl, (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('index-c6c0a761.js', document.baseURI).href))), 'utf-8');
|
|
41896
41896
|
case 10:
|
|
41897
41897
|
_context.t1 = _context.sent;
|
|
41898
41898
|
pkg = _context.t0.parse.call(_context.t0, _context.t1);
|
|
@@ -43098,7 +43098,7 @@ var ProjectFiles = /*#__PURE__*/function () {
|
|
|
43098
43098
|
return ProjectFiles;
|
|
43099
43099
|
}();
|
|
43100
43100
|
|
|
43101
|
-
var __filename$1 = node_url.fileURLToPath((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('index-
|
|
43101
|
+
var __filename$1 = node_url.fileURLToPath((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('index-c6c0a761.js', document.baseURI).href)));
|
|
43102
43102
|
var __dirname$1 = path__default["default"].dirname(__filename$1);
|
|
43103
43103
|
function zipDirectory(source, out) {
|
|
43104
43104
|
var archive = archiver$1('tar', {
|
|
@@ -43313,7 +43313,7 @@ function _buildApp() {
|
|
|
43313
43313
|
case 11:
|
|
43314
43314
|
_context4.t0 = JSON;
|
|
43315
43315
|
_context4.next = 14;
|
|
43316
|
-
return fs__default["default"].readFile(new URL(templatePackagePath, (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('index-
|
|
43316
|
+
return fs__default["default"].readFile(new URL(templatePackagePath, (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('index-c6c0a761.js', document.baseURI).href))), 'utf-8');
|
|
43317
43317
|
case 14:
|
|
43318
43318
|
_context4.t1 = _context4.sent;
|
|
43319
43319
|
packageTemplate = _context4.t0.parse.call(_context4.t0, _context4.t1);
|
package/dist/index.cjs
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var index = require("./index-
|
|
6
|
-
var dev = require("./dev-
|
|
7
|
-
require("./spirits-
|
|
5
|
+
var index = require("./index-c6c0a761.cjs");
|
|
6
|
+
var dev = require("./dev-f7215614.cjs");
|
|
7
|
+
require("./spirits-bf93b875.cjs");
|
|
8
8
|
require("./macros-5be965e9.cjs");
|
|
9
9
|
require('fs');
|
|
10
10
|
require('events');
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
require('node:fs');
|
|
4
4
|
require('node:path');
|
|
5
|
-
var index = require("./index-
|
|
6
|
-
require("./spirits-
|
|
7
|
-
require("./dev-
|
|
5
|
+
var index = require("./index-c6c0a761.cjs");
|
|
6
|
+
require("./spirits-bf93b875.cjs");
|
|
7
|
+
require("./dev-f7215614.cjs");
|
|
8
8
|
require('util');
|
|
9
9
|
require('stream');
|
|
10
10
|
require('path');
|
|
@@ -914,11 +914,21 @@ var Spirits = {
|
|
|
914
914
|
stagnationCount: conversation.lockAttempts || 0
|
|
915
915
|
}).then(function (res) {
|
|
916
916
|
return Array.isArray(res) ? res : [res];
|
|
917
|
+
}).then(function (slots) {
|
|
918
|
+
return slots.reduce(function (accumulator, slot) {
|
|
919
|
+
if ('toJSON' in slot) {
|
|
920
|
+
var slotJson = slot.toJSON();
|
|
921
|
+
accumulator.push.apply(accumulator, _toConsumableArray(Array.isArray(slotJson) ? slotJson : [slotJson]));
|
|
922
|
+
} else {
|
|
923
|
+
accumulator.push(slot);
|
|
924
|
+
}
|
|
925
|
+
return accumulator;
|
|
926
|
+
}, []);
|
|
917
927
|
});
|
|
918
928
|
case 43:
|
|
919
929
|
slots = _context2.sent;
|
|
920
930
|
hasNoInstructions = slots.every(function (s) {
|
|
921
|
-
return !s.instructions || Array.isArray(s) && s.instructions.length === 0;
|
|
931
|
+
return !s.instructions || Array.isArray(s.instructions) && s.instructions.length === 0;
|
|
922
932
|
});
|
|
923
933
|
hasNoCustomMessage = slots.every(function (s) {
|
|
924
934
|
return !s.message;
|
package/dist/spirits.cjs
CHANGED
package/dist/testing-tools.cjs
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var dev = require("./dev-
|
|
6
|
-
require("./spirits-
|
|
5
|
+
var dev = require("./dev-f7215614.cjs");
|
|
6
|
+
require("./spirits-bf93b875.cjs");
|
|
7
7
|
require('util');
|
|
8
8
|
require('stream');
|
|
9
9
|
require('path');
|
package/package.json
CHANGED
|
@@ -363,13 +363,13 @@ async function runEntityApi(req, res) {
|
|
|
363
363
|
const response = await api({
|
|
364
364
|
params,
|
|
365
365
|
searchParams: req?.query || {}, body: req?.body || undefined,
|
|
366
|
-
id: params
|
|
366
|
+
id: params?.id
|
|
367
367
|
});
|
|
368
368
|
if (response instanceof EventResponse || !!response.body) {
|
|
369
369
|
const data = response.body ?? response.data();
|
|
370
370
|
res.writeHead(response.status || 200, {'Content-Type': 'application/json'});
|
|
371
371
|
res.end(JSON.stringify(data));
|
|
372
|
-
console.log(`${req.method} EntityApi.${
|
|
372
|
+
console.log(`${req.method} EntityApi.${lastSegment}:`);
|
|
373
373
|
console.log(colors.grey(JSON.stringify(data)));
|
|
374
374
|
} else {
|
|
375
375
|
throw new Error(`Invalid response: not an EventResponse`);
|
package/src/public.d.ts
CHANGED
|
@@ -588,7 +588,7 @@ export type WorkflowResponseSlot = WorkflowResponseSlotBase & {
|
|
|
588
588
|
anticipate?: Anticipate | undefined;
|
|
589
589
|
};
|
|
590
590
|
|
|
591
|
-
export type WorkflowResponse = WorkflowResponseSlot | WorkflowResponseSlot[];
|
|
591
|
+
export type WorkflowResponse = EventMacros | WorkflowResponseSlot | (WorkflowResponseSlot | EventMacros)[];
|
|
592
592
|
|
|
593
593
|
export type WorkflowFunction = (event: WorkflowEvent) => WorkflowResponse | Promise<WorkflowResponse>;
|
|
594
594
|
|
package/src/testing-tools/dev.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Configuration, Scout9Api } from '@scout9/admin';
|
|
2
|
-
import {grey, italic, bgWhite, black} from 'kleur/colors';
|
|
2
|
+
import { grey, italic, bgWhite, black } from 'kleur/colors';
|
|
3
3
|
import { createMockConversation, createMockWorkflowEvent } from './mocks.js';
|
|
4
4
|
import { loadConfig } from '../core/config/index.js';
|
|
5
5
|
import { requireProjectFile } from '../utils/index.js';
|
|
@@ -33,7 +33,7 @@ export class Scout9Test {
|
|
|
33
33
|
messages;
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
|
-
* @type {
|
|
36
|
+
* @type {import('@scout9/app').ConversationContext}
|
|
37
37
|
*/
|
|
38
38
|
context;
|
|
39
39
|
|
|
@@ -158,7 +158,7 @@ export class Scout9Test {
|
|
|
158
158
|
|
|
159
159
|
// Load app configuration (if not already loaded or override true)
|
|
160
160
|
if (override || !this._project) {
|
|
161
|
-
this._project = await loadConfig({cwd: this._cwd, src: this._src, mode: this._mode})
|
|
161
|
+
this._project = await loadConfig({cwd: this._cwd, src: this._src, mode: this._mode});
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
if (override || !this._api) {
|
|
@@ -205,7 +205,7 @@ export class Scout9Test {
|
|
|
205
205
|
const typeStdout = type ? italic(bgWhite(' ' + black(type) + ' ')) : '';
|
|
206
206
|
const messageStdout = grey(message);
|
|
207
207
|
(console.hasOwnProperty(level) ? console[level] : console.log)(`\t${typeStdout ? typeStdout + ' ' : ''}${messageStdout}`);
|
|
208
|
-
}
|
|
208
|
+
};
|
|
209
209
|
|
|
210
210
|
// If custom logger provided, use it, otherwise use default logger
|
|
211
211
|
let progressInput = typeof progress === 'function' ? progress : defaultProgressLogger;
|
|
@@ -215,10 +215,14 @@ export class Scout9Test {
|
|
|
215
215
|
if (!!progress) {
|
|
216
216
|
progressInput = defaultProgressLogger; // use default logger
|
|
217
217
|
} else {
|
|
218
|
-
progressInput = () => {
|
|
218
|
+
progressInput = () => {
|
|
219
|
+
}; // use no-op
|
|
219
220
|
}
|
|
220
221
|
}
|
|
221
222
|
|
|
223
|
+
/**
|
|
224
|
+
* @type {import('@scout9/app').Message}
|
|
225
|
+
*/
|
|
222
226
|
const _message = {
|
|
223
227
|
id: 'user_mock_' + Math.random().toString(36).slice(2, 11),
|
|
224
228
|
role: 'customer',
|
|
@@ -353,6 +357,16 @@ export class Scout9Test {
|
|
|
353
357
|
}).then((_res => _res.data));
|
|
354
358
|
}
|
|
355
359
|
|
|
360
|
+
/**
|
|
361
|
+
* @param {Partial<import('@scout9/app').ConversationContext>} ctx
|
|
362
|
+
*/
|
|
363
|
+
set context(ctx) {
|
|
364
|
+
this.context = {
|
|
365
|
+
...this.context,
|
|
366
|
+
...ctx
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
|
|
356
370
|
/**
|
|
357
371
|
* @private
|
|
358
372
|
*/
|
|
@@ -322,6 +322,7 @@ export const Spirits = {
|
|
|
322
322
|
|
|
323
323
|
// 3. Run the workflow
|
|
324
324
|
progress('Running workflow', 'info', 'SET_PROCESSING', 'system');
|
|
325
|
+
|
|
325
326
|
const slots = await workflow({
|
|
326
327
|
messages,
|
|
327
328
|
conversation,
|
|
@@ -335,8 +336,18 @@ export const Spirits = {
|
|
|
335
336
|
initial: conversation.intent || null
|
|
336
337
|
},
|
|
337
338
|
stagnationCount: conversation.lockAttempts || 0
|
|
338
|
-
})
|
|
339
|
-
|
|
339
|
+
})
|
|
340
|
+
.then((res) => Array.isArray(res) ? res : [res])
|
|
341
|
+
.then((slots) => slots.reduce((accumulator, slot) => {
|
|
342
|
+
if ('toJSON' in slot) {
|
|
343
|
+
const slotJson = slot.toJSON();
|
|
344
|
+
accumulator.push(...(Array.isArray(slotJson) ? slotJson : [slotJson]));
|
|
345
|
+
} else {
|
|
346
|
+
accumulator.push(slot);
|
|
347
|
+
}
|
|
348
|
+
return accumulator;
|
|
349
|
+
}, []));
|
|
350
|
+
const hasNoInstructions = slots.every(s => !s.instructions || (Array.isArray(s.instructions) && s.instructions.length === 0));
|
|
340
351
|
const hasNoCustomMessage = slots.every(s => !s.message);
|
|
341
352
|
const previousLockAttempt = conversation.lockAttempts || 0; // Used to track
|
|
342
353
|
|
package/types/index.d.ts
CHANGED
|
@@ -551,7 +551,7 @@ declare module '@scout9/app' {
|
|
|
551
551
|
anticipate?: Anticipate | undefined;
|
|
552
552
|
};
|
|
553
553
|
|
|
554
|
-
export type WorkflowResponse = WorkflowResponseSlot | WorkflowResponseSlot[];
|
|
554
|
+
export type WorkflowResponse = EventMacros | WorkflowResponseSlot | (WorkflowResponseSlot | EventMacros)[];
|
|
555
555
|
|
|
556
556
|
export type WorkflowFunction = (event: WorkflowEvent) => WorkflowResponse | Promise<WorkflowResponse>;
|
|
557
557
|
|