@erxes/api-shared 3.3.2 → 3.3.3-next.1

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.
Files changed (25) hide show
  1. package/core-modules/dist/erxes-api-shared-core-modules.cjs.dev.js +5 -1
  2. package/core-modules/dist/erxes-api-shared-core-modules.cjs.prod.js +5 -1
  3. package/core-modules/dist/erxes-api-shared-core-modules.esm.js +2 -2
  4. package/dist/declarations/src/core-modules/automations/constants.d.ts +6 -0
  5. package/dist/declarations/src/core-modules/automations/constants.d.ts.map +1 -1
  6. package/dist/declarations/src/core-modules/automations/outputResolvers.d.ts +29 -0
  7. package/dist/declarations/src/core-modules/automations/outputResolvers.d.ts.map +1 -1
  8. package/dist/declarations/src/core-modules/automations/types.d.ts +40 -1
  9. package/dist/declarations/src/core-modules/automations/types.d.ts.map +1 -1
  10. package/dist/declarations/src/core-modules/automations/utils.d.ts +2 -1
  11. package/dist/declarations/src/core-modules/automations/utils.d.ts.map +1 -1
  12. package/dist/declarations/src/core-modules/notifications/definitions/emailAddresses.d.ts +6 -0
  13. package/dist/declarations/src/core-modules/notifications/definitions/emailAddresses.d.ts.map +1 -1
  14. package/dist/{start-plugin-6687b329.cjs.dev.js → start-plugin-2944ceaa.cjs.dev.js} +287 -222
  15. package/dist/{start-plugin-46baacee.cjs.prod.js → start-plugin-7ebe8e9b.cjs.prod.js} +287 -222
  16. package/dist/{start-plugin-2b3e89f5.esm.js → start-plugin-b4d9fece.esm.js} +284 -223
  17. package/package.json +1 -1
  18. package/src/core-modules/automations/constants.ts +26 -0
  19. package/src/core-modules/automations/outputResolvers.ts +8 -0
  20. package/src/core-modules/automations/types.ts +54 -1
  21. package/src/core-modules/automations/utils.ts +31 -2
  22. package/src/core-modules/notifications/definitions/emailAddresses.ts +15 -0
  23. package/utils/dist/erxes-api-shared-utils.cjs.dev.js +1 -1
  24. package/utils/dist/erxes-api-shared-utils.cjs.prod.js +1 -1
  25. package/utils/dist/erxes-api-shared-utils.esm.js +2 -2
@@ -5273,6 +5273,67 @@ var parsePropertyColumnKey = function parsePropertyColumnKey(columnKey) {
5273
5273
  };
5274
5274
  };
5275
5275
 
5276
+ /**
5277
+ * A value an action reads from whatever started the run. The action names
5278
+ * what it needs; it never learns which record supplied it.
5279
+ */
5280
+
5281
+ /**
5282
+ * Per action type, which of the trigger's own output keys fills each of that
5283
+ * action's inputs. Declared by the trigger's plugin, so no one maps by hand.
5284
+ */
5285
+
5286
+ // Set by the action author, not the end user: 'ignore' lets the flow continue
5287
+ // while the work is queued, 'standby' pauses until the result is back.
5288
+
5289
+ // Returned by the owning plugin instead of a result: it queued the work and
5290
+ // tells the engine whether the flow may carry on without it.
5291
+
5292
+ var AUTOMATION_ACTION_CONTRIBUTIONS = {
5293
+ // Acts on a record a sibling branch remembered: the agent picks which one.
5294
+ REMEMBERED_RECORD_CHOICE: 'rememberedRecordChoice'
5295
+ };
5296
+
5297
+ /**
5298
+ * A step of a built-in template.
5299
+ *
5300
+ * Addressed by `order` rather than by id: ids are generated per automation, so
5301
+ * a template that hardcoded them could never be installed twice. Installing
5302
+ * maps every order to a fresh id and rewrites the connections with it.
5303
+ */
5304
+
5305
+ /**
5306
+ * Something the tenant must already have before a template can work — a bot, a
5307
+ * pipeline stage, an integration. The value is chosen once, while installing,
5308
+ * by a component the owning plugin provides: only that plugin knows what
5309
+ * counts as a valid candidate and how to list them.
5310
+ */
5311
+
5312
+ var EXECUTE_WAIT_TYPES = /*#__PURE__*/function (EXECUTE_WAIT_TYPES) {
5313
+ EXECUTE_WAIT_TYPES["DELAY"] = "delay";
5314
+ EXECUTE_WAIT_TYPES["IS_IN_SEGMENT"] = "isInSegment";
5315
+ EXECUTE_WAIT_TYPES["CHECK_OBJECT"] = "checkObject";
5316
+ EXECUTE_WAIT_TYPES["WEBHOOK"] = "webhook";
5317
+ return EXECUTE_WAIT_TYPES;
5318
+ }({});
5319
+ var TAutomationProducers = /*#__PURE__*/function (TAutomationProducers) {
5320
+ TAutomationProducers["RECEIVE_ACTIONS"] = "receiveActions";
5321
+ TAutomationProducers["RESOLVE_OUTPUT_PATHS"] = "resolveOutputPaths";
5322
+ TAutomationProducers["CHECK_CUSTOM_TRIGGER"] = "checkCustomTrigger";
5323
+ TAutomationProducers["FIND_OBJECT"] = "findObject";
5324
+ TAutomationProducers["SET_PROPERTIES"] = "setProperties";
5325
+ TAutomationProducers["GENERATE_AI_CONTEXT"] = "generateAiContext";
5326
+ TAutomationProducers["LOAD_AI_KNOWLEDGE_DOCUMENT_BATCH"] = "loadAiKnowledgeDocumentBatch";
5327
+ TAutomationProducers["LOOKUP_AI_TOOL"] = "lookupAiTool";
5328
+ return TAutomationProducers;
5329
+ }({});
5330
+ var TAutomationActionFolks = /*#__PURE__*/function (TAutomationActionFolks) {
5331
+ TAutomationActionFolks["DEFAULT"] = "default";
5332
+ TAutomationActionFolks["SUCCESS"] = "success";
5333
+ TAutomationActionFolks["ERROR"] = "error";
5334
+ return TAutomationActionFolks;
5335
+ }({});
5336
+
5276
5337
  var AUTOMATION_PROPERTY_OPERATORS = {
5277
5338
  SET: 'set',
5278
5339
  CLEAR: 'clear',
@@ -5377,6 +5438,19 @@ var AUTOMATION_CORE_ACTION_DEFERRED = _defineProperty({}, AUTOMATION_CORE_ACTION
5377
5438
  mode: 'standby',
5378
5439
  timeoutMinutes: 3
5379
5440
  });
5441
+
5442
+ /**
5443
+ * Core actions have no plugin constants either, so how they combine with the
5444
+ * actions around them is declared here.
5445
+ */
5446
+ var AUTOMATION_CORE_ACTION_PLACEMENTS = _defineProperty(_defineProperty({}, AUTOMATION_CORE_ACTIONS.AI_AGENT, {
5447
+ accepts: [AUTOMATION_ACTION_CONTRIBUTIONS.REMEMBERED_RECORD_CHOICE]
5448
+ }), AUTOMATION_CORE_ACTIONS.SET_PROPERTY, {
5449
+ addsToPrevious: [{
5450
+ actionType: AUTOMATION_CORE_ACTIONS.AI_AGENT,
5451
+ kind: AUTOMATION_ACTION_CONTRIBUTIONS.REMEMBERED_RECORD_CHOICE
5452
+ }]
5453
+ });
5380
5454
  var AUTOMATION_DEFERRED_TIMEOUT = {
5381
5455
  DEFAULT_MINUTES: 10,
5382
5456
  MAX_MINUTES: 60
@@ -6316,62 +6390,6 @@ var resolveRecordReferenceValue = /*#__PURE__*/function () {
6316
6390
  };
6317
6391
  }();
6318
6392
 
6319
- /**
6320
- * A value an action reads from whatever started the run. The action names
6321
- * what it needs; it never learns which record supplied it.
6322
- */
6323
-
6324
- /**
6325
- * Per action type, which of the trigger's own output keys fills each of that
6326
- * action's inputs. Declared by the trigger's plugin, so no one maps by hand.
6327
- */
6328
-
6329
- // Set by the action author, not the end user: 'ignore' lets the flow continue
6330
- // while the work is queued, 'standby' pauses until the result is back.
6331
-
6332
- // Returned by the owning plugin instead of a result: it queued the work and
6333
- // tells the engine whether the flow may carry on without it.
6334
-
6335
- /**
6336
- * A step of a built-in template.
6337
- *
6338
- * Addressed by `order` rather than by id: ids are generated per automation, so
6339
- * a template that hardcoded them could never be installed twice. Installing
6340
- * maps every order to a fresh id and rewrites the connections with it.
6341
- */
6342
-
6343
- /**
6344
- * Something the tenant must already have before a template can work — a bot, a
6345
- * pipeline stage, an integration. The value is chosen once, while installing,
6346
- * by a component the owning plugin provides: only that plugin knows what
6347
- * counts as a valid candidate and how to list them.
6348
- */
6349
-
6350
- var EXECUTE_WAIT_TYPES = /*#__PURE__*/function (EXECUTE_WAIT_TYPES) {
6351
- EXECUTE_WAIT_TYPES["DELAY"] = "delay";
6352
- EXECUTE_WAIT_TYPES["IS_IN_SEGMENT"] = "isInSegment";
6353
- EXECUTE_WAIT_TYPES["CHECK_OBJECT"] = "checkObject";
6354
- EXECUTE_WAIT_TYPES["WEBHOOK"] = "webhook";
6355
- return EXECUTE_WAIT_TYPES;
6356
- }({});
6357
- var TAutomationProducers = /*#__PURE__*/function (TAutomationProducers) {
6358
- TAutomationProducers["RECEIVE_ACTIONS"] = "receiveActions";
6359
- TAutomationProducers["RESOLVE_OUTPUT_PATHS"] = "resolveOutputPaths";
6360
- TAutomationProducers["CHECK_CUSTOM_TRIGGER"] = "checkCustomTrigger";
6361
- TAutomationProducers["FIND_OBJECT"] = "findObject";
6362
- TAutomationProducers["SET_PROPERTIES"] = "setProperties";
6363
- TAutomationProducers["GENERATE_AI_CONTEXT"] = "generateAiContext";
6364
- TAutomationProducers["LOAD_AI_KNOWLEDGE_DOCUMENT_BATCH"] = "loadAiKnowledgeDocumentBatch";
6365
- TAutomationProducers["LOOKUP_AI_TOOL"] = "lookupAiTool";
6366
- return TAutomationProducers;
6367
- }({});
6368
- var TAutomationActionFolks = /*#__PURE__*/function (TAutomationActionFolks) {
6369
- TAutomationActionFolks["DEFAULT"] = "default";
6370
- TAutomationActionFolks["SUCCESS"] = "success";
6371
- TAutomationActionFolks["ERROR"] = "error";
6372
- return TAutomationActionFolks;
6373
- }({});
6374
-
6375
6393
  var splitType = function splitType(type) {
6376
6394
  return type.replace(/\./g, ':').split(':');
6377
6395
  };
@@ -7201,91 +7219,70 @@ var findAutomationNodeConstant = /*#__PURE__*/function () {
7201
7219
  return _ref15.apply(this, arguments);
7202
7220
  };
7203
7221
  }();
7204
- var getAutomationOutputDefinition = /*#__PURE__*/function () {
7205
- var _ref16 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(nodeType) {
7206
- var _yield$findAutomation;
7222
+
7223
+ /** The action's own declaration from its plugin, e.g. isTargetSource. */
7224
+ var getAutomationActionConstant = /*#__PURE__*/function () {
7225
+ var _ref16 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(actionType) {
7207
7226
  return _regeneratorRuntime().wrap(function _callee8$(_context9) {
7208
7227
  while (1) switch (_context9.prev = _context9.next) {
7209
7228
  case 0:
7210
7229
  _context9.next = 2;
7211
- return findAutomationNodeConstant(nodeType, ['triggers', 'actions', 'findObjectTargets']);
7230
+ return findAutomationNodeConstant(actionType, ['actions']);
7212
7231
  case 2:
7213
- _context9.t1 = _yield$findAutomation = _context9.sent;
7214
- _context9.t0 = _context9.t1 === null;
7215
- if (_context9.t0) {
7216
- _context9.next = 6;
7217
- break;
7218
- }
7219
- _context9.t0 = _yield$findAutomation === void 0;
7220
- case 6:
7221
- if (!_context9.t0) {
7222
- _context9.next = 10;
7223
- break;
7224
- }
7225
- _context9.t2 = void 0;
7226
- _context9.next = 11;
7227
- break;
7228
- case 10:
7229
- _context9.t2 = _yield$findAutomation.output;
7230
- case 11:
7231
- return _context9.abrupt("return", _context9.t2);
7232
- case 12:
7232
+ return _context9.abrupt("return", _context9.sent);
7233
+ case 3:
7233
7234
  case "end":
7234
7235
  return _context9.stop();
7235
7236
  }
7236
7237
  }, _callee8);
7237
7238
  }));
7238
- return function getAutomationOutputDefinition(_x0) {
7239
+ return function getAutomationActionConstant(_x0) {
7239
7240
  return _ref16.apply(this, arguments);
7240
7241
  };
7241
7242
  }();
7242
-
7243
- /** Whether the trigger's own plugin lets an automation re-run on every event. */
7244
- var isReEnrollableTrigger = /*#__PURE__*/function () {
7245
- var _ref17 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9(triggerType) {
7246
- var _yield$findAutomation2;
7243
+ var getAutomationOutputDefinition = /*#__PURE__*/function () {
7244
+ var _ref17 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9(nodeType) {
7245
+ var _yield$findAutomation;
7247
7246
  return _regeneratorRuntime().wrap(function _callee9$(_context0) {
7248
7247
  while (1) switch (_context0.prev = _context0.next) {
7249
7248
  case 0:
7250
- _context0.t0 = Boolean;
7251
- _context0.next = 3;
7252
- return findAutomationNodeConstant(triggerType, ['triggers']);
7253
- case 3:
7254
- _context0.t2 = _yield$findAutomation2 = _context0.sent;
7255
- _context0.t1 = _context0.t2 === null;
7256
- if (_context0.t1) {
7257
- _context0.next = 7;
7249
+ _context0.next = 2;
7250
+ return findAutomationNodeConstant(nodeType, ['triggers', 'actions', 'findObjectTargets']);
7251
+ case 2:
7252
+ _context0.t1 = _yield$findAutomation = _context0.sent;
7253
+ _context0.t0 = _context0.t1 === null;
7254
+ if (_context0.t0) {
7255
+ _context0.next = 6;
7258
7256
  break;
7259
7257
  }
7260
- _context0.t1 = _yield$findAutomation2 === void 0;
7261
- case 7:
7262
- if (!_context0.t1) {
7263
- _context0.next = 11;
7258
+ _context0.t0 = _yield$findAutomation === void 0;
7259
+ case 6:
7260
+ if (!_context0.t0) {
7261
+ _context0.next = 10;
7264
7262
  break;
7265
7263
  }
7266
- _context0.t3 = void 0;
7267
- _context0.next = 12;
7264
+ _context0.t2 = void 0;
7265
+ _context0.next = 11;
7268
7266
  break;
7267
+ case 10:
7268
+ _context0.t2 = _yield$findAutomation.output;
7269
7269
  case 11:
7270
- _context0.t3 = _yield$findAutomation2.reEnrollable;
7270
+ return _context0.abrupt("return", _context0.t2);
7271
7271
  case 12:
7272
- _context0.t4 = _context0.t3;
7273
- return _context0.abrupt("return", (0, _context0.t0)(_context0.t4));
7274
- case 14:
7275
7272
  case "end":
7276
7273
  return _context0.stop();
7277
7274
  }
7278
7275
  }, _callee9);
7279
7276
  }));
7280
- return function isReEnrollableTrigger(_x1) {
7277
+ return function getAutomationOutputDefinition(_x1) {
7281
7278
  return _ref17.apply(this, arguments);
7282
7279
  };
7283
7280
  }();
7284
7281
 
7285
- /** Whether the trigger's own plugin declared every event a new run. */
7286
- var isReEnrollingTrigger = /*#__PURE__*/function () {
7282
+ /** Whether the trigger's own plugin lets an automation re-run on every event. */
7283
+ var isReEnrollableTrigger = /*#__PURE__*/function () {
7287
7284
  var _ref18 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee0(triggerType) {
7288
- var _yield$findAutomation3;
7285
+ var _yield$findAutomation2;
7289
7286
  return _regeneratorRuntime().wrap(function _callee0$(_context1) {
7290
7287
  while (1) switch (_context1.prev = _context1.next) {
7291
7288
  case 0:
@@ -7293,13 +7290,13 @@ var isReEnrollingTrigger = /*#__PURE__*/function () {
7293
7290
  _context1.next = 3;
7294
7291
  return findAutomationNodeConstant(triggerType, ['triggers']);
7295
7292
  case 3:
7296
- _context1.t2 = _yield$findAutomation3 = _context1.sent;
7293
+ _context1.t2 = _yield$findAutomation2 = _context1.sent;
7297
7294
  _context1.t1 = _context1.t2 === null;
7298
7295
  if (_context1.t1) {
7299
7296
  _context1.next = 7;
7300
7297
  break;
7301
7298
  }
7302
- _context1.t1 = _yield$findAutomation3 === void 0;
7299
+ _context1.t1 = _yield$findAutomation2 === void 0;
7303
7300
  case 7:
7304
7301
  if (!_context1.t1) {
7305
7302
  _context1.next = 11;
@@ -7309,7 +7306,7 @@ var isReEnrollingTrigger = /*#__PURE__*/function () {
7309
7306
  _context1.next = 12;
7310
7307
  break;
7311
7308
  case 11:
7312
- _context1.t3 = _yield$findAutomation3.reEnrollment;
7309
+ _context1.t3 = _yield$findAutomation2.reEnrollable;
7313
7310
  case 12:
7314
7311
  _context1.t4 = _context1.t3;
7315
7312
  return _context1.abrupt("return", (0, _context1.t0)(_context1.t4));
@@ -7319,36 +7316,78 @@ var isReEnrollingTrigger = /*#__PURE__*/function () {
7319
7316
  }
7320
7317
  }, _callee0);
7321
7318
  }));
7322
- return function isReEnrollingTrigger(_x10) {
7319
+ return function isReEnrollableTrigger(_x10) {
7323
7320
  return _ref18.apply(this, arguments);
7324
7321
  };
7325
7322
  }();
7326
7323
 
7324
+ /** Whether the trigger's own plugin declared every event a new run. */
7325
+ var isReEnrollingTrigger = /*#__PURE__*/function () {
7326
+ var _ref19 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee1(triggerType) {
7327
+ var _yield$findAutomation3;
7328
+ return _regeneratorRuntime().wrap(function _callee1$(_context10) {
7329
+ while (1) switch (_context10.prev = _context10.next) {
7330
+ case 0:
7331
+ _context10.t0 = Boolean;
7332
+ _context10.next = 3;
7333
+ return findAutomationNodeConstant(triggerType, ['triggers']);
7334
+ case 3:
7335
+ _context10.t2 = _yield$findAutomation3 = _context10.sent;
7336
+ _context10.t1 = _context10.t2 === null;
7337
+ if (_context10.t1) {
7338
+ _context10.next = 7;
7339
+ break;
7340
+ }
7341
+ _context10.t1 = _yield$findAutomation3 === void 0;
7342
+ case 7:
7343
+ if (!_context10.t1) {
7344
+ _context10.next = 11;
7345
+ break;
7346
+ }
7347
+ _context10.t3 = void 0;
7348
+ _context10.next = 12;
7349
+ break;
7350
+ case 11:
7351
+ _context10.t3 = _yield$findAutomation3.reEnrollment;
7352
+ case 12:
7353
+ _context10.t4 = _context10.t3;
7354
+ return _context10.abrupt("return", (0, _context10.t0)(_context10.t4));
7355
+ case 14:
7356
+ case "end":
7357
+ return _context10.stop();
7358
+ }
7359
+ }, _callee1);
7360
+ }));
7361
+ return function isReEnrollingTrigger(_x11) {
7362
+ return _ref19.apply(this, arguments);
7363
+ };
7364
+ }();
7365
+
7327
7366
  /**
7328
7367
  * Fills an action's inputs from the trigger that started the run, through the
7329
7368
  * mapping the trigger's own plugin declared. Nothing is returned when the
7330
7369
  * trigger declares no mapping for that action.
7331
7370
  */
7332
7371
  var resolveAutomationActionInputs = /*#__PURE__*/function () {
7333
- var _ref20 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee1(_ref19) {
7372
+ var _ref21 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee10(_ref20) {
7334
7373
  var _trigger$actionInputs;
7335
7374
  var subdomain, triggerType, actionType, target, trigger, mapping, resolved;
7336
- return _regeneratorRuntime().wrap(function _callee1$(_context10) {
7337
- while (1) switch (_context10.prev = _context10.next) {
7375
+ return _regeneratorRuntime().wrap(function _callee10$(_context11) {
7376
+ while (1) switch (_context11.prev = _context11.next) {
7338
7377
  case 0:
7339
- subdomain = _ref19.subdomain, triggerType = _ref19.triggerType, actionType = _ref19.actionType, target = _ref19.target;
7340
- _context10.next = 3;
7378
+ subdomain = _ref20.subdomain, triggerType = _ref20.triggerType, actionType = _ref20.actionType, target = _ref20.target;
7379
+ _context11.next = 3;
7341
7380
  return findAutomationNodeConstant(triggerType, ['triggers']);
7342
7381
  case 3:
7343
- trigger = _context10.sent;
7382
+ trigger = _context11.sent;
7344
7383
  mapping = trigger === null || trigger === void 0 || (_trigger$actionInputs = trigger.actionInputs) === null || _trigger$actionInputs === void 0 ? void 0 : _trigger$actionInputs[actionType];
7345
7384
  if (!(!mapping || !Object.keys(mapping).length)) {
7346
- _context10.next = 7;
7385
+ _context11.next = 7;
7347
7386
  break;
7348
7387
  }
7349
- return _context10.abrupt("return", undefined);
7388
+ return _context11.abrupt("return", undefined);
7350
7389
  case 7:
7351
- _context10.next = 9;
7390
+ _context11.next = 9;
7352
7391
  return resolveOutputPathsByNodeType({
7353
7392
  subdomain: subdomain,
7354
7393
  nodeType: triggerType,
@@ -7356,21 +7395,21 @@ var resolveAutomationActionInputs = /*#__PURE__*/function () {
7356
7395
  paths: _toConsumableArray(new Set(Object.values(mapping)))
7357
7396
  });
7358
7397
  case 9:
7359
- resolved = _context10.sent;
7360
- return _context10.abrupt("return", Object.fromEntries(Object.entries(mapping).map(function (_ref21) {
7361
- var _ref22 = _slicedToArray(_ref21, 2),
7362
- inputKey = _ref22[0],
7363
- outputKey = _ref22[1];
7398
+ resolved = _context11.sent;
7399
+ return _context11.abrupt("return", Object.fromEntries(Object.entries(mapping).map(function (_ref22) {
7400
+ var _ref23 = _slicedToArray(_ref22, 2),
7401
+ inputKey = _ref23[0],
7402
+ outputKey = _ref23[1];
7364
7403
  return [inputKey, resolved === null || resolved === void 0 ? void 0 : resolved[outputKey]];
7365
7404
  })));
7366
7405
  case 11:
7367
7406
  case "end":
7368
- return _context10.stop();
7407
+ return _context11.stop();
7369
7408
  }
7370
- }, _callee1);
7409
+ }, _callee10);
7371
7410
  }));
7372
- return function resolveAutomationActionInputs(_x11) {
7373
- return _ref20.apply(this, arguments);
7411
+ return function resolveAutomationActionInputs(_x12) {
7412
+ return _ref21.apply(this, arguments);
7374
7413
  };
7375
7414
  }();
7376
7415
  var hasMatchingResolverKey = function hasMatchingResolverKey(definition, paths) {
@@ -7382,36 +7421,36 @@ var hasMatchingResolverKey = function hasMatchingResolverKey(definition, paths)
7382
7421
  });
7383
7422
  };
7384
7423
  var resolveOutputPathsByNodeType = /*#__PURE__*/function () {
7385
- var _ref24 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee10(_ref23) {
7424
+ var _ref25 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee11(_ref24) {
7386
7425
  var subdomain, nodeType, source, paths, defaultValue, runtimeOutputs, _splitType3, _splitType4, pluginName, runtimeDefinition, definition;
7387
- return _regeneratorRuntime().wrap(function _callee10$(_context11) {
7388
- while (1) switch (_context11.prev = _context11.next) {
7426
+ return _regeneratorRuntime().wrap(function _callee11$(_context12) {
7427
+ while (1) switch (_context12.prev = _context12.next) {
7389
7428
  case 0:
7390
- subdomain = _ref23.subdomain, nodeType = _ref23.nodeType, source = _ref23.source, paths = _ref23.paths, defaultValue = _ref23.defaultValue, runtimeOutputs = _ref23.runtimeOutputs;
7429
+ subdomain = _ref24.subdomain, nodeType = _ref24.nodeType, source = _ref24.source, paths = _ref24.paths, defaultValue = _ref24.defaultValue, runtimeOutputs = _ref24.runtimeOutputs;
7391
7430
  _splitType3 = splitType(nodeType || ''), _splitType4 = _slicedToArray(_splitType3, 1), pluginName = _splitType4[0];
7392
7431
  runtimeDefinition = runtimeOutputs === null || runtimeOutputs === void 0 ? void 0 : runtimeOutputs[nodeType];
7393
- _context11.t0 = runtimeDefinition;
7394
- if (_context11.t0) {
7395
- _context11.next = 8;
7432
+ _context12.t0 = runtimeDefinition;
7433
+ if (_context12.t0) {
7434
+ _context12.next = 8;
7396
7435
  break;
7397
7436
  }
7398
- _context11.next = 7;
7437
+ _context12.next = 7;
7399
7438
  return getAutomationOutputDefinition(nodeType);
7400
7439
  case 7:
7401
- _context11.t0 = _context11.sent;
7440
+ _context12.t0 = _context12.sent;
7402
7441
  case 8:
7403
- definition = _context11.t0;
7442
+ definition = _context12.t0;
7404
7443
  if (definition) {
7405
- _context11.next = 11;
7444
+ _context12.next = 11;
7406
7445
  break;
7407
7446
  }
7408
- return _context11.abrupt("return", resolveDirectOutputValues(source, paths, defaultValue));
7447
+ return _context12.abrupt("return", resolveDirectOutputValues(source, paths, defaultValue));
7409
7448
  case 11:
7410
7449
  if (!runtimeDefinition) {
7411
- _context11.next = 13;
7450
+ _context12.next = 13;
7412
7451
  break;
7413
7452
  }
7414
- return _context11.abrupt("return", resolveOutputPathsFromDefinition({
7453
+ return _context12.abrupt("return", resolveOutputPathsFromDefinition({
7415
7454
  definition: runtimeDefinition,
7416
7455
  subdomain: subdomain,
7417
7456
  source: source,
@@ -7420,10 +7459,10 @@ var resolveOutputPathsByNodeType = /*#__PURE__*/function () {
7420
7459
  }));
7421
7460
  case 13:
7422
7461
  if (!(pluginName && hasMatchingResolverKey(definition, paths))) {
7423
- _context11.next = 15;
7462
+ _context12.next = 15;
7424
7463
  break;
7425
7464
  }
7426
- return _context11.abrupt("return", sendCoreModuleProducer({
7465
+ return _context12.abrupt("return", sendCoreModuleProducer({
7427
7466
  subdomain: subdomain,
7428
7467
  moduleName: 'automations',
7429
7468
  pluginName: pluginName,
@@ -7437,7 +7476,7 @@ var resolveOutputPathsByNodeType = /*#__PURE__*/function () {
7437
7476
  defaultValue: resolveDirectOutputValues(source, paths, defaultValue)
7438
7477
  }));
7439
7478
  case 15:
7440
- return _context11.abrupt("return", resolveOutputPathsFromDefinition({
7479
+ return _context12.abrupt("return", resolveOutputPathsFromDefinition({
7441
7480
  definition: definition,
7442
7481
  subdomain: subdomain,
7443
7482
  source: source,
@@ -7446,32 +7485,32 @@ var resolveOutputPathsByNodeType = /*#__PURE__*/function () {
7446
7485
  }));
7447
7486
  case 16:
7448
7487
  case "end":
7449
- return _context11.stop();
7488
+ return _context12.stop();
7450
7489
  }
7451
- }, _callee10);
7490
+ }, _callee11);
7452
7491
  }));
7453
- return function resolveOutputPathsByNodeType(_x12) {
7454
- return _ref24.apply(this, arguments);
7492
+ return function resolveOutputPathsByNodeType(_x13) {
7493
+ return _ref25.apply(this, arguments);
7455
7494
  };
7456
7495
  }();
7457
7496
  var resolveOutputGroups = /*#__PURE__*/function () {
7458
- var _ref26 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee11(_ref25) {
7497
+ var _ref27 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee12(_ref26) {
7459
7498
  var subdomain, groups, defaultValue, runtimeOutputs, resolvedByToken, _iterator5, _step5, group, resolvedValues, _i5, _Object$entries2, _Object$entries2$_i, path, value;
7460
- return _regeneratorRuntime().wrap(function _callee11$(_context12) {
7461
- while (1) switch (_context12.prev = _context12.next) {
7499
+ return _regeneratorRuntime().wrap(function _callee12$(_context13) {
7500
+ while (1) switch (_context13.prev = _context13.next) {
7462
7501
  case 0:
7463
- subdomain = _ref25.subdomain, groups = _ref25.groups, defaultValue = _ref25.defaultValue, runtimeOutputs = _ref25.runtimeOutputs;
7502
+ subdomain = _ref26.subdomain, groups = _ref26.groups, defaultValue = _ref26.defaultValue, runtimeOutputs = _ref26.runtimeOutputs;
7464
7503
  resolvedByToken = {};
7465
7504
  _iterator5 = _createForOfIteratorHelper(groups);
7466
- _context12.prev = 3;
7505
+ _context13.prev = 3;
7467
7506
  _iterator5.s();
7468
7507
  case 5:
7469
7508
  if ((_step5 = _iterator5.n()).done) {
7470
- _context12.next = 13;
7509
+ _context13.next = 13;
7471
7510
  break;
7472
7511
  }
7473
7512
  group = _step5.value;
7474
- _context12.next = 9;
7513
+ _context13.next = 9;
7475
7514
  return resolveOutputPathsByNodeType({
7476
7515
  subdomain: subdomain,
7477
7516
  nodeType: group.nodeType,
@@ -7481,44 +7520,44 @@ var resolveOutputGroups = /*#__PURE__*/function () {
7481
7520
  runtimeOutputs: runtimeOutputs
7482
7521
  });
7483
7522
  case 9:
7484
- resolvedValues = _context12.sent;
7523
+ resolvedValues = _context13.sent;
7485
7524
  for (_i5 = 0, _Object$entries2 = Object.entries(resolvedValues || {}); _i5 < _Object$entries2.length; _i5++) {
7486
7525
  _Object$entries2$_i = _slicedToArray(_Object$entries2[_i5], 2), path = _Object$entries2$_i[0], value = _Object$entries2$_i[1];
7487
7526
  resolvedByToken["".concat(group.groupKey, ".").concat(path)] = value;
7488
7527
  }
7489
7528
  case 11:
7490
- _context12.next = 5;
7529
+ _context13.next = 5;
7491
7530
  break;
7492
7531
  case 13:
7493
- _context12.next = 18;
7532
+ _context13.next = 18;
7494
7533
  break;
7495
7534
  case 15:
7496
- _context12.prev = 15;
7497
- _context12.t0 = _context12["catch"](3);
7498
- _iterator5.e(_context12.t0);
7535
+ _context13.prev = 15;
7536
+ _context13.t0 = _context13["catch"](3);
7537
+ _iterator5.e(_context13.t0);
7499
7538
  case 18:
7500
- _context12.prev = 18;
7539
+ _context13.prev = 18;
7501
7540
  _iterator5.f();
7502
- return _context12.finish(18);
7541
+ return _context13.finish(18);
7503
7542
  case 21:
7504
- return _context12.abrupt("return", resolvedByToken);
7543
+ return _context13.abrupt("return", resolvedByToken);
7505
7544
  case 22:
7506
7545
  case "end":
7507
- return _context12.stop();
7546
+ return _context13.stop();
7508
7547
  }
7509
- }, _callee11, null, [[3, 15, 18, 21]]);
7548
+ }, _callee12, null, [[3, 15, 18, 21]]);
7510
7549
  }));
7511
- return function resolveOutputGroups(_x13) {
7512
- return _ref26.apply(this, arguments);
7550
+ return function resolveOutputGroups(_x14) {
7551
+ return _ref27.apply(this, arguments);
7513
7552
  };
7514
7553
  }();
7515
7554
 
7516
7555
  // {{ token }} -> resolved raw value (object/number/string), or undefined
7517
7556
  var resolveCurlyPlaceholderToken = function resolveCurlyPlaceholderToken(token, resolvedByToken) {
7518
- var _ref27;
7557
+ var _ref28;
7519
7558
  var trimmedToken = token.trim();
7520
7559
  var staticValue = resolveStaticOutputPlaceholder(trimmedToken);
7521
- return (_ref27 = staticValue !== null && staticValue !== void 0 ? staticValue : resolvedByToken[trimmedToken]) !== null && _ref27 !== void 0 ? _ref27 : resolvedByToken["trigger.".concat(trimmedToken)];
7560
+ return (_ref28 = staticValue !== null && staticValue !== void 0 ? staticValue : resolvedByToken[trimmedToken]) !== null && _ref28 !== void 0 ? _ref28 : resolvedByToken["trigger.".concat(trimmedToken)];
7522
7561
  };
7523
7562
 
7524
7563
  // Replace all {{ }} placeholders in a string.
@@ -7566,28 +7605,28 @@ var _replaceOutputPlaceholdersInValue = function replaceOutputPlaceholdersInValu
7566
7605
  });
7567
7606
  }
7568
7607
  if (value && _typeof(value) === 'object') {
7569
- return Object.fromEntries(Object.entries(value).map(function (_ref28) {
7570
- var _ref29 = _slicedToArray(_ref28, 2),
7571
- key = _ref29[0],
7572
- item = _ref29[1];
7608
+ return Object.fromEntries(Object.entries(value).map(function (_ref29) {
7609
+ var _ref30 = _slicedToArray(_ref29, 2),
7610
+ key = _ref30[0],
7611
+ item = _ref30[1];
7573
7612
  return [key, _replaceOutputPlaceholdersInValue(item, resolvedByToken, defaultValue, keepUnresolvedPlaceholders)];
7574
7613
  }));
7575
7614
  }
7576
7615
  return value;
7577
7616
  };
7578
7617
  var replaceOutputPlaceholders = /*#__PURE__*/function () {
7579
- var _ref31 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee12(_ref30) {
7580
- var subdomain, execution, values, defaultValue, runtimeOutputs, _ref30$keepUnresolved, keepUnresolvedPlaceholders, tokensByValueKey, resolvedByToken;
7581
- return _regeneratorRuntime().wrap(function _callee12$(_context13) {
7582
- while (1) switch (_context13.prev = _context13.next) {
7618
+ var _ref32 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee13(_ref31) {
7619
+ var subdomain, execution, values, defaultValue, runtimeOutputs, _ref31$keepUnresolved, keepUnresolvedPlaceholders, tokensByValueKey, resolvedByToken;
7620
+ return _regeneratorRuntime().wrap(function _callee13$(_context14) {
7621
+ while (1) switch (_context14.prev = _context14.next) {
7583
7622
  case 0:
7584
- subdomain = _ref30.subdomain, execution = _ref30.execution, values = _ref30.values, defaultValue = _ref30.defaultValue, runtimeOutputs = _ref30.runtimeOutputs, _ref30$keepUnresolved = _ref30.keepUnresolvedPlaceholders, keepUnresolvedPlaceholders = _ref30$keepUnresolved === void 0 ? true : _ref30$keepUnresolved;
7623
+ subdomain = _ref31.subdomain, execution = _ref31.execution, values = _ref31.values, defaultValue = _ref31.defaultValue, runtimeOutputs = _ref31.runtimeOutputs, _ref31$keepUnresolved = _ref31.keepUnresolvedPlaceholders, keepUnresolvedPlaceholders = _ref31$keepUnresolved === void 0 ? true : _ref31$keepUnresolved;
7585
7624
  tokensByValueKey = getOutputPlaceholderTokensByValueKey(values);
7586
7625
  if (!Object.keys(tokensByValueKey).length) {
7587
- _context13.next = 8;
7626
+ _context14.next = 8;
7588
7627
  break;
7589
7628
  }
7590
- _context13.next = 5;
7629
+ _context14.next = 5;
7591
7630
  return resolveOutputGroups({
7592
7631
  subdomain: subdomain,
7593
7632
  groups: buildOutputResolveGroups({
@@ -7598,34 +7637,34 @@ var replaceOutputPlaceholders = /*#__PURE__*/function () {
7598
7637
  runtimeOutputs: runtimeOutputs
7599
7638
  });
7600
7639
  case 5:
7601
- _context13.t0 = _context13.sent;
7602
- _context13.next = 9;
7640
+ _context14.t0 = _context14.sent;
7641
+ _context14.next = 9;
7603
7642
  break;
7604
7643
  case 8:
7605
- _context13.t0 = {};
7644
+ _context14.t0 = {};
7606
7645
  case 9:
7607
- resolvedByToken = _context13.t0;
7608
- return _context13.abrupt("return", Object.entries(values).reduce(function (acc, _ref32) {
7609
- var _ref33 = _slicedToArray(_ref32, 2),
7610
- key = _ref33[0],
7611
- value = _ref33[1];
7646
+ resolvedByToken = _context14.t0;
7647
+ return _context14.abrupt("return", Object.entries(values).reduce(function (acc, _ref33) {
7648
+ var _ref34 = _slicedToArray(_ref33, 2),
7649
+ key = _ref34[0],
7650
+ value = _ref34[1];
7612
7651
  acc[key] = _replaceOutputPlaceholdersInValue(value, resolvedByToken, defaultValue, keepUnresolvedPlaceholders);
7613
7652
  return acc;
7614
7653
  }, {}));
7615
7654
  case 11:
7616
7655
  case "end":
7617
- return _context13.stop();
7656
+ return _context14.stop();
7618
7657
  }
7619
- }, _callee12);
7658
+ }, _callee13);
7620
7659
  }));
7621
- return function replaceOutputPlaceholders(_x14) {
7622
- return _ref31.apply(this, arguments);
7660
+ return function replaceOutputPlaceholders(_x15) {
7661
+ return _ref32.apply(this, arguments);
7623
7662
  };
7624
7663
  }();
7625
- var getAutomationNodeType = function getAutomationNodeType(_ref34) {
7626
- var pluginName = _ref34.pluginName,
7627
- node = _ref34.node,
7628
- kind = _ref34.kind;
7664
+ var getAutomationNodeType = function getAutomationNodeType(_ref35) {
7665
+ var pluginName = _ref35.pluginName,
7666
+ node = _ref35.node,
7667
+ kind = _ref35.kind;
7629
7668
  if (node.type) {
7630
7669
  return node.type;
7631
7670
  }
@@ -8660,17 +8699,34 @@ var getAutomationBaseType = function getAutomationBaseType(type) {
8660
8699
  var normalizedCollectionName = collectionName && collectionName.endsWith('s') ? collectionName : pluralFormation(collectionName || '');
8661
8700
  return collectionName ? "".concat(pluginName, ":").concat(moduleName, ".").concat(normalizedCollectionName) : "".concat(pluginName, ":").concat(moduleName);
8662
8701
  };
8702
+
8703
+ // The record an earlier action produced or found: Create returns targetId,
8704
+ // Find object returns objectId and the object itself.
8705
+ var getTargetActionRecord = function getTargetActionRecord(execution, targetActionId) {
8706
+ var _find, _ref23, _result$objectId;
8707
+ var result = (_find = (execution.actions || []).find(function (_ref22) {
8708
+ var actionId = _ref22.actionId;
8709
+ return actionId === targetActionId;
8710
+ })) === null || _find === void 0 ? void 0 : _find.result;
8711
+ var object = result !== null && result !== void 0 && result.object && _typeof(result.object) === 'object' ? result.object : {};
8712
+ var id = (_ref23 = (_result$objectId = result === null || result === void 0 ? void 0 : result.objectId) !== null && _result$objectId !== void 0 ? _result$objectId : result === null || result === void 0 ? void 0 : result.targetId) !== null && _ref23 !== void 0 ? _ref23 : object._id;
8713
+ return {
8714
+ id: id == null ? '' : String(id),
8715
+ object: object
8716
+ };
8717
+ };
8663
8718
  var getSetPropertySelector = /*#__PURE__*/function () {
8664
- var _ref23 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee0(_ref22) {
8665
- var subdomain, module, execution, targetType, relation, targetPath, target, targetId, _getValueByPath, found, value, rawValue, ids, _ref24, contentType, relatedContentType, relationIds;
8719
+ var _ref25 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee0(_ref24) {
8720
+ var subdomain, module, execution, targetType, relation, targetPath, targetActionId, actionRecord, target, targetId, _getValueByPath, found, value, rawValue, ids, _ref26, contentType, relatedContentType, relationIds;
8666
8721
  return _regeneratorRuntime().wrap(function _callee0$(_context0) {
8667
8722
  while (1) switch (_context0.prev = _context0.next) {
8668
8723
  case 0:
8669
- subdomain = _ref22.subdomain, module = _ref22.module, execution = _ref22.execution, targetType = _ref22.targetType, relation = _ref22.relation, targetPath = _ref22.targetPath;
8670
- target = execution.target || {};
8671
- targetId = String(execution.targetId || target._id || '');
8724
+ subdomain = _ref24.subdomain, module = _ref24.module, execution = _ref24.execution, targetType = _ref24.targetType, relation = _ref24.relation, targetPath = _ref24.targetPath, targetActionId = _ref24.targetActionId;
8725
+ actionRecord = targetActionId ? getTargetActionRecord(execution, targetActionId) : undefined;
8726
+ target = actionRecord ? actionRecord.object : execution.target || {};
8727
+ targetId = actionRecord ? actionRecord.id : String(execution.targetId || target._id || '');
8672
8728
  if (!targetPath) {
8673
- _context0.next = 8;
8729
+ _context0.next = 9;
8674
8730
  break;
8675
8731
  }
8676
8732
  _getValueByPath = getValueByPath(target, targetPath), found = _getValueByPath.found, value = _getValueByPath.value;
@@ -8683,9 +8739,9 @@ var getSetPropertySelector = /*#__PURE__*/function () {
8683
8739
  $in: Array.from(new Set(ids))
8684
8740
  }
8685
8741
  });
8686
- case 8:
8742
+ case 9:
8687
8743
  if (targetId) {
8688
- _context0.next = 10;
8744
+ _context0.next = 11;
8689
8745
  break;
8690
8746
  }
8691
8747
  return _context0.abrupt("return", {
@@ -8693,18 +8749,18 @@ var getSetPropertySelector = /*#__PURE__*/function () {
8693
8749
  $in: []
8694
8750
  }
8695
8751
  });
8696
- case 10:
8752
+ case 11:
8697
8753
  if (!(!relation && getAutomationBaseType(module) === getAutomationBaseType(targetType))) {
8698
- _context0.next = 12;
8754
+ _context0.next = 13;
8699
8755
  break;
8700
8756
  }
8701
8757
  return _context0.abrupt("return", {
8702
8758
  _id: targetId
8703
8759
  });
8704
- case 12:
8705
- _ref24 = relation || {}, contentType = _ref24.contentType, relatedContentType = _ref24.relatedContentType;
8760
+ case 13:
8761
+ _ref26 = relation || {}, contentType = _ref26.contentType, relatedContentType = _ref26.relatedContentType;
8706
8762
  if (!(!contentType || !relatedContentType)) {
8707
- _context0.next = 15;
8763
+ _context0.next = 16;
8708
8764
  break;
8709
8765
  }
8710
8766
  return _context0.abrupt("return", {
@@ -8712,8 +8768,8 @@ var getSetPropertySelector = /*#__PURE__*/function () {
8712
8768
  $in: []
8713
8769
  }
8714
8770
  });
8715
- case 15:
8716
- _context0.next = 17;
8771
+ case 16:
8772
+ _context0.next = 18;
8717
8773
  return sendTRPCMessage({
8718
8774
  subdomain: subdomain,
8719
8775
  pluginName: 'core',
@@ -8726,30 +8782,30 @@ var getSetPropertySelector = /*#__PURE__*/function () {
8726
8782
  },
8727
8783
  defaultValue: []
8728
8784
  });
8729
- case 17:
8785
+ case 18:
8730
8786
  relationIds = _context0.sent;
8731
8787
  return _context0.abrupt("return", {
8732
8788
  _id: {
8733
8789
  $in: Array.from(new Set((relationIds || []).filter(Boolean)))
8734
8790
  }
8735
8791
  });
8736
- case 19:
8792
+ case 20:
8737
8793
  case "end":
8738
8794
  return _context0.stop();
8739
8795
  }
8740
8796
  }, _callee0);
8741
8797
  }));
8742
8798
  return function getSetPropertySelector(_x0) {
8743
- return _ref23.apply(this, arguments);
8799
+ return _ref25.apply(this, arguments);
8744
8800
  };
8745
8801
  }();
8746
8802
  var setProperty = /*#__PURE__*/function () {
8747
- var _ref26 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee1(_ref25) {
8748
- var subdomain, module, rules, execution, setPropertyTarget, _ref25$relatedItems, relatedItems, selector, fetchItems, update, updateRecord, needsCurrentValue, baseSelector, _yield$buildSetProper, modifier, _changes, updateResult, count, items, _yield$buildSetProper2, _changes2, updatedCount, changes, _iterator4, _step4, relatedItem, ruleUpdate, _modifier, itemSelector, _updateResult, itemCount;
8803
+ var _ref28 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee1(_ref27) {
8804
+ var subdomain, module, rules, execution, setPropertyTarget, _ref27$relatedItems, relatedItems, selector, fetchItems, update, updateRecord, needsCurrentValue, baseSelector, _yield$buildSetProper, modifier, _changes, updateResult, count, items, _yield$buildSetProper2, _changes2, updatedCount, changes, _iterator4, _step4, relatedItem, ruleUpdate, _modifier, itemSelector, _updateResult, itemCount;
8749
8805
  return _regeneratorRuntime().wrap(function _callee1$(_context1) {
8750
8806
  while (1) switch (_context1.prev = _context1.next) {
8751
8807
  case 0:
8752
- subdomain = _ref25.subdomain, module = _ref25.module, rules = _ref25.rules, execution = _ref25.execution, setPropertyTarget = _ref25.setPropertyTarget, _ref25$relatedItems = _ref25.relatedItems, relatedItems = _ref25$relatedItems === void 0 ? [] : _ref25$relatedItems, selector = _ref25.selector, fetchItems = _ref25.fetchItems, update = _ref25.update;
8808
+ subdomain = _ref27.subdomain, module = _ref27.module, rules = _ref27.rules, execution = _ref27.execution, setPropertyTarget = _ref27.setPropertyTarget, _ref27$relatedItems = _ref27.relatedItems, relatedItems = _ref27$relatedItems === void 0 ? [] : _ref27$relatedItems, selector = _ref27.selector, fetchItems = _ref27.fetchItems, update = _ref27.update;
8753
8809
  updateRecord = getSetPropertyUpdate({
8754
8810
  subdomain: subdomain,
8755
8811
  module: module,
@@ -8918,7 +8974,7 @@ var setProperty = /*#__PURE__*/function () {
8918
8974
  }, _callee1, null, [[12, 20], [40, 69, 72, 75], [52, 61]]);
8919
8975
  }));
8920
8976
  return function setProperty(_x1) {
8921
- return _ref26.apply(this, arguments);
8977
+ return _ref28.apply(this, arguments);
8922
8978
  };
8923
8979
  }();
8924
8980
  var getContentType = function getContentType(type) {
@@ -11157,6 +11213,7 @@ var segmentJoinChanges = /*#__PURE__*/function () {
11157
11213
  };
11158
11214
  }();
11159
11215
 
11216
+ var EMAIL_SCREEN_REASONS = ['syntax', 'no_mx', 'disposable', 'random'];
11160
11217
  var EMAIL_LANES = ['proven', 'unknown', 'suppressed'];
11161
11218
  var emailAddressSchema = new mongoose.Schema({
11162
11219
  email: {
@@ -11188,6 +11245,10 @@ var emailAddressSchema = new mongoose.Schema({
11188
11245
  type: String,
11189
11246
  "enum": ['hard_bounce', 'complaint', 'unsubscribe', 'screened', 'manual']
11190
11247
  },
11248
+ screenReason: {
11249
+ type: String,
11250
+ "enum": EMAIL_SCREEN_REASONS
11251
+ },
11191
11252
  suppressedBy: {
11192
11253
  type: String
11193
11254
  },
@@ -23135,8 +23196,10 @@ exports.APPROVAL_NOTIFICATION_ACTIONS = APPROVAL_NOTIFICATION_ACTIONS;
23135
23196
  exports.APPROVAL_NOTIFICATION_CONTENT_TYPE = APPROVAL_NOTIFICATION_CONTENT_TYPE;
23136
23197
  exports.APPROVAL_REQUEST_KINDS = APPROVAL_REQUEST_KINDS;
23137
23198
  exports.APPROVAL_REQUEST_STATUSES = APPROVAL_REQUEST_STATUSES;
23199
+ exports.AUTOMATION_ACTION_CONTRIBUTIONS = AUTOMATION_ACTION_CONTRIBUTIONS;
23138
23200
  exports.AUTOMATION_CORE_ACTIONS = AUTOMATION_CORE_ACTIONS;
23139
23201
  exports.AUTOMATION_CORE_ACTION_DEFERRED = AUTOMATION_CORE_ACTION_DEFERRED;
23202
+ exports.AUTOMATION_CORE_ACTION_PLACEMENTS = AUTOMATION_CORE_ACTION_PLACEMENTS;
23140
23203
  exports.AUTOMATION_CORE_TRIGGER_TYPES = AUTOMATION_CORE_TRIGGER_TYPES;
23141
23204
  exports.AUTOMATION_DEFERRED_TIMEOUT = AUTOMATION_DEFERRED_TIMEOUT;
23142
23205
  exports.AUTOMATION_EMAIL_RECIPIENTS_TYPES = AUTOMATION_EMAIL_RECIPIENTS_TYPES;
@@ -23170,6 +23233,7 @@ exports.DEFAULT_SEX_CHOICES = DEFAULT_SEX_CHOICES;
23170
23233
  exports.DEFAULT_SOCIAL_LINKS = DEFAULT_SOCIAL_LINKS;
23171
23234
  exports.EMAIL_LANES = EMAIL_LANES;
23172
23235
  exports.EMAIL_RAMP_ID = EMAIL_RAMP_ID;
23236
+ exports.EMAIL_SCREEN_REASONS = EMAIL_SCREEN_REASONS;
23173
23237
  exports.EXECUTE_WAIT_TYPES = EXECUTE_WAIT_TYPES;
23174
23238
  exports.EXPECTED_ERROR_NAME = EXPECTED_ERROR_NAME;
23175
23239
  exports.EvaluateFieldsInput = EvaluateFieldsInput;
@@ -23360,6 +23424,7 @@ exports.generateEventHandlersFromRequest = generateEventHandlersFromRequest;
23360
23424
  exports.generateRequestProcess = generateRequestProcess;
23361
23425
  exports.getActivePlugins = getActivePlugins;
23362
23426
  exports.getAgentToolMaxResponseBytes = getAgentToolMaxResponseBytes;
23427
+ exports.getAutomationActionConstant = getAutomationActionConstant;
23363
23428
  exports.getAutomationNodeType = getAutomationNodeType;
23364
23429
  exports.getAvailablePlugins = getAvailablePlugins;
23365
23430
  exports.getContentType = getContentType;