@scout9/app 1.0.0-alpha.0.4.4 → 1.0.0-alpha.0.4.5

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.
@@ -35049,7 +35049,7 @@ function _loadUserPackageJson() {
35049
35049
  targetPkgUrl = isTest ? packageTestJsonUrl : packageJsonUrl;
35050
35050
  _context2.t0 = JSON;
35051
35051
  _context2.next = 10;
35052
- 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-bee5e8fd.js', document.baseURI).href))), 'utf-8');
35052
+ 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-c50734b5.js', document.baseURI).href))), 'utf-8');
35053
35053
  case 10:
35054
35054
  _context2.t1 = _context2.sent;
35055
35055
  pkg = _context2.t0.parse.call(_context2.t0, _context2.t1);
@@ -35906,6 +35906,9 @@ var _excluded$1 = ["success"];
35906
35906
  * @property {function(Record<string, any>): EventMacros} upsert
35907
35907
  * @property {function(string, (Date | string | OptionsFollowup)): EventMacros} followup
35908
35908
  * @property {AnticipateFunction} anticipate
35909
+ * @property {function(): EventMacros} resetIntent
35910
+ * @property {function(string | string[], boolean?): EventMacros} instructRemove
35911
+ * @property {function(string, (OptionsInstruct & OptionsForward & {stagnationLimit?: number})?): EventMacros} instructSafe
35909
35912
  * @property {function(string, OptionsInstruct?): EventMacros} instruct
35910
35913
  * @property {function(string, OptionsReply?): EventMacros} reply
35911
35914
  * @property {function(string?, OptionsForward?): EventMacros} forward
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var spirits = require("./spirits-5c9243a1.cjs");
4
- var dev = require("./dev-bee5e8fd.cjs");
4
+ var dev = require("./dev-c50734b5.cjs");
5
5
  var macros = require("./macros-e4105c56.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-f2044b7e.cjs"); });
29486
+ } = await Promise.resolve().then(function () { return require("./multipart-parser-cb97a19f.cjs"); });
29487
29487
  return toFormData(this.body, ct);
29488
29488
  }
29489
29489
 
@@ -41884,7 +41884,7 @@ function _loadUserPackageJson() {
41884
41884
  targetPkgUrl = isTest ? packageTestJsonUrl : packageJsonUrl;
41885
41885
  _context.t0 = JSON;
41886
41886
  _context.next = 10;
41887
- 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-d96ba879.js', document.baseURI).href))), 'utf-8');
41887
+ 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-e34c4224.js', document.baseURI).href))), 'utf-8');
41888
41888
  case 10:
41889
41889
  _context.t1 = _context.sent;
41890
41890
  pkg = _context.t0.parse.call(_context.t0, _context.t1);
@@ -43157,7 +43157,7 @@ var ProjectFiles = /*#__PURE__*/function () {
43157
43157
  return ProjectFiles;
43158
43158
  }();
43159
43159
 
43160
- 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-d96ba879.js', document.baseURI).href)));
43160
+ 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-e34c4224.js', document.baseURI).href)));
43161
43161
  var __dirname$1 = path__default["default"].dirname(__filename$1);
43162
43162
  function zipDirectory(source, out) {
43163
43163
  var archive = archiver$1('tar', {
@@ -43372,7 +43372,7 @@ function _buildApp() {
43372
43372
  case 11:
43373
43373
  _context4.t0 = JSON;
43374
43374
  _context4.next = 14;
43375
- 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-d96ba879.js', document.baseURI).href))), 'utf-8');
43375
+ 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-e34c4224.js', document.baseURI).href))), 'utf-8');
43376
43376
  case 14:
43377
43377
  _context4.t1 = _context4.sent;
43378
43378
  packageTemplate = _context4.t0.parse.call(_context4.t0, _context4.t1);
package/dist/index.cjs CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var index = require("./index-d96ba879.cjs");
6
- var dev = require("./dev-bee5e8fd.cjs");
5
+ var index = require("./index-e34c4224.cjs");
6
+ var dev = require("./dev-c50734b5.cjs");
7
7
  require("./spirits-5c9243a1.cjs");
8
8
  require("./macros-e4105c56.cjs");
9
9
  require('fs');
@@ -2,9 +2,9 @@
2
2
 
3
3
  require('node:fs');
4
4
  require('node:path');
5
- var index = require("./index-d96ba879.cjs");
5
+ var index = require("./index-e34c4224.cjs");
6
6
  require("./spirits-5c9243a1.cjs");
7
- require("./dev-bee5e8fd.cjs");
7
+ require("./dev-c50734b5.cjs");
8
8
  require('util');
9
9
  require('stream');
10
10
  require('path');
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var dev = require("./dev-bee5e8fd.cjs");
5
+ var dev = require("./dev-c50734b5.cjs");
6
6
  require("./spirits-5c9243a1.cjs");
7
7
  require('util');
8
8
  require('stream');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scout9/app",
3
- "version": "1.0.0-alpha.0.4.4",
3
+ "version": "1.0.0-alpha.0.4.5",
4
4
  "description": "Build and deploy your Scout9 app for SMS auto replies",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -80,13 +80,15 @@ import MacroGlobals from './globals.js';
80
80
  // };
81
81
 
82
82
 
83
-
84
83
  /**
85
84
  * Event macros to be used inside your scout9 auto reply workflows
86
85
  * @typedef {Object} EventMacros
87
86
  * @property {function(Record<string, any>): EventMacros} upsert
88
87
  * @property {function(string, (Date | string | OptionsFollowup)): EventMacros} followup
89
88
  * @property {AnticipateFunction} anticipate
89
+ * @property {function(): EventMacros} resetIntent
90
+ * @property {function(string | string[], boolean?): EventMacros} instructRemove
91
+ * @property {function(string, (OptionsInstruct & OptionsForward & {stagnationLimit?: number})?): EventMacros} instructSafe
90
92
  * @property {function(string, OptionsInstruct?): EventMacros} instruct
91
93
  * @property {function(string, OptionsReply?): EventMacros} reply
92
94
  * @property {function(string?, OptionsForward?): EventMacros} forward
@@ -264,7 +266,7 @@ function EventMacrosFactory() {
264
266
  ids.forEach((id) => {
265
267
  const message = event.messages.find(m => m.id === id);
266
268
  if (!message) {
267
- const msg = `Cannot remove "${id}", no instruction found`
269
+ const msg = `Cannot remove "${id}", no instruction found`;
268
270
  if (strict) {
269
271
  throw new Error(msg);
270
272
  } else {
@@ -298,7 +300,6 @@ function EventMacrosFactory() {
298
300
  },
299
301
 
300
302
 
301
-
302
303
  /**
303
304
  * Return instructions to guide next auto reply response
304
305
  * @param {string} instruction
@@ -328,6 +329,7 @@ function EventMacrosFactory() {
328
329
  }
329
330
  return this;
330
331
  },
332
+
331
333
  /**
332
334
  * If a manual message must be sent, you can use the `reply` macro
333
335
  * @param {string} message - the message to manually send to the user
@@ -357,6 +359,7 @@ function EventMacrosFactory() {
357
359
  }
358
360
  return this;
359
361
  },
362
+
360
363
  /**
361
364
  * This macro ends the conversation and forwards it the owner of the persona to manually handle the flow. If your app returns undefined or no event, then a default forward is generated.
362
365
  * @param {string} [message] - the message to forward to owner of persona
@@ -392,6 +395,7 @@ function EventMacrosFactory() {
392
395
  }
393
396
  return this;
394
397
  },
398
+
395
399
  /**
396
400
  * Returns event payload
397
401
  * @param {boolean} flush - if true, will reset the data payload