@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
@@ -5230,6 +5230,67 @@ var parsePropertyColumnKey = function parsePropertyColumnKey(columnKey) {
5230
5230
  };
5231
5231
  };
5232
5232
 
5233
+ /**
5234
+ * A value an action reads from whatever started the run. The action names
5235
+ * what it needs; it never learns which record supplied it.
5236
+ */
5237
+
5238
+ /**
5239
+ * Per action type, which of the trigger's own output keys fills each of that
5240
+ * action's inputs. Declared by the trigger's plugin, so no one maps by hand.
5241
+ */
5242
+
5243
+ // Set by the action author, not the end user: 'ignore' lets the flow continue
5244
+ // while the work is queued, 'standby' pauses until the result is back.
5245
+
5246
+ // Returned by the owning plugin instead of a result: it queued the work and
5247
+ // tells the engine whether the flow may carry on without it.
5248
+
5249
+ var AUTOMATION_ACTION_CONTRIBUTIONS = {
5250
+ // Acts on a record a sibling branch remembered: the agent picks which one.
5251
+ REMEMBERED_RECORD_CHOICE: 'rememberedRecordChoice'
5252
+ };
5253
+
5254
+ /**
5255
+ * A step of a built-in template.
5256
+ *
5257
+ * Addressed by `order` rather than by id: ids are generated per automation, so
5258
+ * a template that hardcoded them could never be installed twice. Installing
5259
+ * maps every order to a fresh id and rewrites the connections with it.
5260
+ */
5261
+
5262
+ /**
5263
+ * Something the tenant must already have before a template can work — a bot, a
5264
+ * pipeline stage, an integration. The value is chosen once, while installing,
5265
+ * by a component the owning plugin provides: only that plugin knows what
5266
+ * counts as a valid candidate and how to list them.
5267
+ */
5268
+
5269
+ var EXECUTE_WAIT_TYPES = /*#__PURE__*/function (EXECUTE_WAIT_TYPES) {
5270
+ EXECUTE_WAIT_TYPES["DELAY"] = "delay";
5271
+ EXECUTE_WAIT_TYPES["IS_IN_SEGMENT"] = "isInSegment";
5272
+ EXECUTE_WAIT_TYPES["CHECK_OBJECT"] = "checkObject";
5273
+ EXECUTE_WAIT_TYPES["WEBHOOK"] = "webhook";
5274
+ return EXECUTE_WAIT_TYPES;
5275
+ }({});
5276
+ var TAutomationProducers = /*#__PURE__*/function (TAutomationProducers) {
5277
+ TAutomationProducers["RECEIVE_ACTIONS"] = "receiveActions";
5278
+ TAutomationProducers["RESOLVE_OUTPUT_PATHS"] = "resolveOutputPaths";
5279
+ TAutomationProducers["CHECK_CUSTOM_TRIGGER"] = "checkCustomTrigger";
5280
+ TAutomationProducers["FIND_OBJECT"] = "findObject";
5281
+ TAutomationProducers["SET_PROPERTIES"] = "setProperties";
5282
+ TAutomationProducers["GENERATE_AI_CONTEXT"] = "generateAiContext";
5283
+ TAutomationProducers["LOAD_AI_KNOWLEDGE_DOCUMENT_BATCH"] = "loadAiKnowledgeDocumentBatch";
5284
+ TAutomationProducers["LOOKUP_AI_TOOL"] = "lookupAiTool";
5285
+ return TAutomationProducers;
5286
+ }({});
5287
+ var TAutomationActionFolks = /*#__PURE__*/function (TAutomationActionFolks) {
5288
+ TAutomationActionFolks["DEFAULT"] = "default";
5289
+ TAutomationActionFolks["SUCCESS"] = "success";
5290
+ TAutomationActionFolks["ERROR"] = "error";
5291
+ return TAutomationActionFolks;
5292
+ }({});
5293
+
5233
5294
  var AUTOMATION_PROPERTY_OPERATORS = {
5234
5295
  SET: 'set',
5235
5296
  CLEAR: 'clear',
@@ -5334,6 +5395,19 @@ var AUTOMATION_CORE_ACTION_DEFERRED = _defineProperty({}, AUTOMATION_CORE_ACTION
5334
5395
  mode: 'standby',
5335
5396
  timeoutMinutes: 3
5336
5397
  });
5398
+
5399
+ /**
5400
+ * Core actions have no plugin constants either, so how they combine with the
5401
+ * actions around them is declared here.
5402
+ */
5403
+ var AUTOMATION_CORE_ACTION_PLACEMENTS = _defineProperty(_defineProperty({}, AUTOMATION_CORE_ACTIONS.AI_AGENT, {
5404
+ accepts: [AUTOMATION_ACTION_CONTRIBUTIONS.REMEMBERED_RECORD_CHOICE]
5405
+ }), AUTOMATION_CORE_ACTIONS.SET_PROPERTY, {
5406
+ addsToPrevious: [{
5407
+ actionType: AUTOMATION_CORE_ACTIONS.AI_AGENT,
5408
+ kind: AUTOMATION_ACTION_CONTRIBUTIONS.REMEMBERED_RECORD_CHOICE
5409
+ }]
5410
+ });
5337
5411
  var AUTOMATION_DEFERRED_TIMEOUT = {
5338
5412
  DEFAULT_MINUTES: 10,
5339
5413
  MAX_MINUTES: 60
@@ -6273,62 +6347,6 @@ var resolveRecordReferenceValue = /*#__PURE__*/function () {
6273
6347
  };
6274
6348
  }();
6275
6349
 
6276
- /**
6277
- * A value an action reads from whatever started the run. The action names
6278
- * what it needs; it never learns which record supplied it.
6279
- */
6280
-
6281
- /**
6282
- * Per action type, which of the trigger's own output keys fills each of that
6283
- * action's inputs. Declared by the trigger's plugin, so no one maps by hand.
6284
- */
6285
-
6286
- // Set by the action author, not the end user: 'ignore' lets the flow continue
6287
- // while the work is queued, 'standby' pauses until the result is back.
6288
-
6289
- // Returned by the owning plugin instead of a result: it queued the work and
6290
- // tells the engine whether the flow may carry on without it.
6291
-
6292
- /**
6293
- * A step of a built-in template.
6294
- *
6295
- * Addressed by `order` rather than by id: ids are generated per automation, so
6296
- * a template that hardcoded them could never be installed twice. Installing
6297
- * maps every order to a fresh id and rewrites the connections with it.
6298
- */
6299
-
6300
- /**
6301
- * Something the tenant must already have before a template can work — a bot, a
6302
- * pipeline stage, an integration. The value is chosen once, while installing,
6303
- * by a component the owning plugin provides: only that plugin knows what
6304
- * counts as a valid candidate and how to list them.
6305
- */
6306
-
6307
- var EXECUTE_WAIT_TYPES = /*#__PURE__*/function (EXECUTE_WAIT_TYPES) {
6308
- EXECUTE_WAIT_TYPES["DELAY"] = "delay";
6309
- EXECUTE_WAIT_TYPES["IS_IN_SEGMENT"] = "isInSegment";
6310
- EXECUTE_WAIT_TYPES["CHECK_OBJECT"] = "checkObject";
6311
- EXECUTE_WAIT_TYPES["WEBHOOK"] = "webhook";
6312
- return EXECUTE_WAIT_TYPES;
6313
- }({});
6314
- var TAutomationProducers = /*#__PURE__*/function (TAutomationProducers) {
6315
- TAutomationProducers["RECEIVE_ACTIONS"] = "receiveActions";
6316
- TAutomationProducers["RESOLVE_OUTPUT_PATHS"] = "resolveOutputPaths";
6317
- TAutomationProducers["CHECK_CUSTOM_TRIGGER"] = "checkCustomTrigger";
6318
- TAutomationProducers["FIND_OBJECT"] = "findObject";
6319
- TAutomationProducers["SET_PROPERTIES"] = "setProperties";
6320
- TAutomationProducers["GENERATE_AI_CONTEXT"] = "generateAiContext";
6321
- TAutomationProducers["LOAD_AI_KNOWLEDGE_DOCUMENT_BATCH"] = "loadAiKnowledgeDocumentBatch";
6322
- TAutomationProducers["LOOKUP_AI_TOOL"] = "lookupAiTool";
6323
- return TAutomationProducers;
6324
- }({});
6325
- var TAutomationActionFolks = /*#__PURE__*/function (TAutomationActionFolks) {
6326
- TAutomationActionFolks["DEFAULT"] = "default";
6327
- TAutomationActionFolks["SUCCESS"] = "success";
6328
- TAutomationActionFolks["ERROR"] = "error";
6329
- return TAutomationActionFolks;
6330
- }({});
6331
-
6332
6350
  var splitType = function splitType(type) {
6333
6351
  return type.replace(/\./g, ':').split(':');
6334
6352
  };
@@ -7158,91 +7176,70 @@ var findAutomationNodeConstant = /*#__PURE__*/function () {
7158
7176
  return _ref15.apply(this, arguments);
7159
7177
  };
7160
7178
  }();
7161
- var getAutomationOutputDefinition = /*#__PURE__*/function () {
7162
- var _ref16 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(nodeType) {
7163
- var _yield$findAutomation;
7179
+
7180
+ /** The action's own declaration from its plugin, e.g. isTargetSource. */
7181
+ var getAutomationActionConstant = /*#__PURE__*/function () {
7182
+ var _ref16 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(actionType) {
7164
7183
  return _regeneratorRuntime().wrap(function _callee8$(_context9) {
7165
7184
  while (1) switch (_context9.prev = _context9.next) {
7166
7185
  case 0:
7167
7186
  _context9.next = 2;
7168
- return findAutomationNodeConstant(nodeType, ['triggers', 'actions', 'findObjectTargets']);
7187
+ return findAutomationNodeConstant(actionType, ['actions']);
7169
7188
  case 2:
7170
- _context9.t1 = _yield$findAutomation = _context9.sent;
7171
- _context9.t0 = _context9.t1 === null;
7172
- if (_context9.t0) {
7173
- _context9.next = 6;
7174
- break;
7175
- }
7176
- _context9.t0 = _yield$findAutomation === void 0;
7177
- case 6:
7178
- if (!_context9.t0) {
7179
- _context9.next = 10;
7180
- break;
7181
- }
7182
- _context9.t2 = void 0;
7183
- _context9.next = 11;
7184
- break;
7185
- case 10:
7186
- _context9.t2 = _yield$findAutomation.output;
7187
- case 11:
7188
- return _context9.abrupt("return", _context9.t2);
7189
- case 12:
7189
+ return _context9.abrupt("return", _context9.sent);
7190
+ case 3:
7190
7191
  case "end":
7191
7192
  return _context9.stop();
7192
7193
  }
7193
7194
  }, _callee8);
7194
7195
  }));
7195
- return function getAutomationOutputDefinition(_x0) {
7196
+ return function getAutomationActionConstant(_x0) {
7196
7197
  return _ref16.apply(this, arguments);
7197
7198
  };
7198
7199
  }();
7199
-
7200
- /** Whether the trigger's own plugin lets an automation re-run on every event. */
7201
- var isReEnrollableTrigger = /*#__PURE__*/function () {
7202
- var _ref17 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9(triggerType) {
7203
- var _yield$findAutomation2;
7200
+ var getAutomationOutputDefinition = /*#__PURE__*/function () {
7201
+ var _ref17 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9(nodeType) {
7202
+ var _yield$findAutomation;
7204
7203
  return _regeneratorRuntime().wrap(function _callee9$(_context0) {
7205
7204
  while (1) switch (_context0.prev = _context0.next) {
7206
7205
  case 0:
7207
- _context0.t0 = Boolean;
7208
- _context0.next = 3;
7209
- return findAutomationNodeConstant(triggerType, ['triggers']);
7210
- case 3:
7211
- _context0.t2 = _yield$findAutomation2 = _context0.sent;
7212
- _context0.t1 = _context0.t2 === null;
7213
- if (_context0.t1) {
7214
- _context0.next = 7;
7206
+ _context0.next = 2;
7207
+ return findAutomationNodeConstant(nodeType, ['triggers', 'actions', 'findObjectTargets']);
7208
+ case 2:
7209
+ _context0.t1 = _yield$findAutomation = _context0.sent;
7210
+ _context0.t0 = _context0.t1 === null;
7211
+ if (_context0.t0) {
7212
+ _context0.next = 6;
7215
7213
  break;
7216
7214
  }
7217
- _context0.t1 = _yield$findAutomation2 === void 0;
7218
- case 7:
7219
- if (!_context0.t1) {
7220
- _context0.next = 11;
7215
+ _context0.t0 = _yield$findAutomation === void 0;
7216
+ case 6:
7217
+ if (!_context0.t0) {
7218
+ _context0.next = 10;
7221
7219
  break;
7222
7220
  }
7223
- _context0.t3 = void 0;
7224
- _context0.next = 12;
7221
+ _context0.t2 = void 0;
7222
+ _context0.next = 11;
7225
7223
  break;
7224
+ case 10:
7225
+ _context0.t2 = _yield$findAutomation.output;
7226
7226
  case 11:
7227
- _context0.t3 = _yield$findAutomation2.reEnrollable;
7227
+ return _context0.abrupt("return", _context0.t2);
7228
7228
  case 12:
7229
- _context0.t4 = _context0.t3;
7230
- return _context0.abrupt("return", (0, _context0.t0)(_context0.t4));
7231
- case 14:
7232
7229
  case "end":
7233
7230
  return _context0.stop();
7234
7231
  }
7235
7232
  }, _callee9);
7236
7233
  }));
7237
- return function isReEnrollableTrigger(_x1) {
7234
+ return function getAutomationOutputDefinition(_x1) {
7238
7235
  return _ref17.apply(this, arguments);
7239
7236
  };
7240
7237
  }();
7241
7238
 
7242
- /** Whether the trigger's own plugin declared every event a new run. */
7243
- var isReEnrollingTrigger = /*#__PURE__*/function () {
7239
+ /** Whether the trigger's own plugin lets an automation re-run on every event. */
7240
+ var isReEnrollableTrigger = /*#__PURE__*/function () {
7244
7241
  var _ref18 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee0(triggerType) {
7245
- var _yield$findAutomation3;
7242
+ var _yield$findAutomation2;
7246
7243
  return _regeneratorRuntime().wrap(function _callee0$(_context1) {
7247
7244
  while (1) switch (_context1.prev = _context1.next) {
7248
7245
  case 0:
@@ -7250,13 +7247,13 @@ var isReEnrollingTrigger = /*#__PURE__*/function () {
7250
7247
  _context1.next = 3;
7251
7248
  return findAutomationNodeConstant(triggerType, ['triggers']);
7252
7249
  case 3:
7253
- _context1.t2 = _yield$findAutomation3 = _context1.sent;
7250
+ _context1.t2 = _yield$findAutomation2 = _context1.sent;
7254
7251
  _context1.t1 = _context1.t2 === null;
7255
7252
  if (_context1.t1) {
7256
7253
  _context1.next = 7;
7257
7254
  break;
7258
7255
  }
7259
- _context1.t1 = _yield$findAutomation3 === void 0;
7256
+ _context1.t1 = _yield$findAutomation2 === void 0;
7260
7257
  case 7:
7261
7258
  if (!_context1.t1) {
7262
7259
  _context1.next = 11;
@@ -7266,7 +7263,7 @@ var isReEnrollingTrigger = /*#__PURE__*/function () {
7266
7263
  _context1.next = 12;
7267
7264
  break;
7268
7265
  case 11:
7269
- _context1.t3 = _yield$findAutomation3.reEnrollment;
7266
+ _context1.t3 = _yield$findAutomation2.reEnrollable;
7270
7267
  case 12:
7271
7268
  _context1.t4 = _context1.t3;
7272
7269
  return _context1.abrupt("return", (0, _context1.t0)(_context1.t4));
@@ -7276,36 +7273,78 @@ var isReEnrollingTrigger = /*#__PURE__*/function () {
7276
7273
  }
7277
7274
  }, _callee0);
7278
7275
  }));
7279
- return function isReEnrollingTrigger(_x10) {
7276
+ return function isReEnrollableTrigger(_x10) {
7280
7277
  return _ref18.apply(this, arguments);
7281
7278
  };
7282
7279
  }();
7283
7280
 
7281
+ /** Whether the trigger's own plugin declared every event a new run. */
7282
+ var isReEnrollingTrigger = /*#__PURE__*/function () {
7283
+ var _ref19 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee1(triggerType) {
7284
+ var _yield$findAutomation3;
7285
+ return _regeneratorRuntime().wrap(function _callee1$(_context10) {
7286
+ while (1) switch (_context10.prev = _context10.next) {
7287
+ case 0:
7288
+ _context10.t0 = Boolean;
7289
+ _context10.next = 3;
7290
+ return findAutomationNodeConstant(triggerType, ['triggers']);
7291
+ case 3:
7292
+ _context10.t2 = _yield$findAutomation3 = _context10.sent;
7293
+ _context10.t1 = _context10.t2 === null;
7294
+ if (_context10.t1) {
7295
+ _context10.next = 7;
7296
+ break;
7297
+ }
7298
+ _context10.t1 = _yield$findAutomation3 === void 0;
7299
+ case 7:
7300
+ if (!_context10.t1) {
7301
+ _context10.next = 11;
7302
+ break;
7303
+ }
7304
+ _context10.t3 = void 0;
7305
+ _context10.next = 12;
7306
+ break;
7307
+ case 11:
7308
+ _context10.t3 = _yield$findAutomation3.reEnrollment;
7309
+ case 12:
7310
+ _context10.t4 = _context10.t3;
7311
+ return _context10.abrupt("return", (0, _context10.t0)(_context10.t4));
7312
+ case 14:
7313
+ case "end":
7314
+ return _context10.stop();
7315
+ }
7316
+ }, _callee1);
7317
+ }));
7318
+ return function isReEnrollingTrigger(_x11) {
7319
+ return _ref19.apply(this, arguments);
7320
+ };
7321
+ }();
7322
+
7284
7323
  /**
7285
7324
  * Fills an action's inputs from the trigger that started the run, through the
7286
7325
  * mapping the trigger's own plugin declared. Nothing is returned when the
7287
7326
  * trigger declares no mapping for that action.
7288
7327
  */
7289
7328
  var resolveAutomationActionInputs = /*#__PURE__*/function () {
7290
- var _ref20 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee1(_ref19) {
7329
+ var _ref21 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee10(_ref20) {
7291
7330
  var _trigger$actionInputs;
7292
7331
  var subdomain, triggerType, actionType, target, trigger, mapping, resolved;
7293
- return _regeneratorRuntime().wrap(function _callee1$(_context10) {
7294
- while (1) switch (_context10.prev = _context10.next) {
7332
+ return _regeneratorRuntime().wrap(function _callee10$(_context11) {
7333
+ while (1) switch (_context11.prev = _context11.next) {
7295
7334
  case 0:
7296
- subdomain = _ref19.subdomain, triggerType = _ref19.triggerType, actionType = _ref19.actionType, target = _ref19.target;
7297
- _context10.next = 3;
7335
+ subdomain = _ref20.subdomain, triggerType = _ref20.triggerType, actionType = _ref20.actionType, target = _ref20.target;
7336
+ _context11.next = 3;
7298
7337
  return findAutomationNodeConstant(triggerType, ['triggers']);
7299
7338
  case 3:
7300
- trigger = _context10.sent;
7339
+ trigger = _context11.sent;
7301
7340
  mapping = trigger === null || trigger === void 0 || (_trigger$actionInputs = trigger.actionInputs) === null || _trigger$actionInputs === void 0 ? void 0 : _trigger$actionInputs[actionType];
7302
7341
  if (!(!mapping || !Object.keys(mapping).length)) {
7303
- _context10.next = 7;
7342
+ _context11.next = 7;
7304
7343
  break;
7305
7344
  }
7306
- return _context10.abrupt("return", undefined);
7345
+ return _context11.abrupt("return", undefined);
7307
7346
  case 7:
7308
- _context10.next = 9;
7347
+ _context11.next = 9;
7309
7348
  return resolveOutputPathsByNodeType({
7310
7349
  subdomain: subdomain,
7311
7350
  nodeType: triggerType,
@@ -7313,21 +7352,21 @@ var resolveAutomationActionInputs = /*#__PURE__*/function () {
7313
7352
  paths: _toConsumableArray(new Set(Object.values(mapping)))
7314
7353
  });
7315
7354
  case 9:
7316
- resolved = _context10.sent;
7317
- return _context10.abrupt("return", Object.fromEntries(Object.entries(mapping).map(function (_ref21) {
7318
- var _ref22 = _slicedToArray(_ref21, 2),
7319
- inputKey = _ref22[0],
7320
- outputKey = _ref22[1];
7355
+ resolved = _context11.sent;
7356
+ return _context11.abrupt("return", Object.fromEntries(Object.entries(mapping).map(function (_ref22) {
7357
+ var _ref23 = _slicedToArray(_ref22, 2),
7358
+ inputKey = _ref23[0],
7359
+ outputKey = _ref23[1];
7321
7360
  return [inputKey, resolved === null || resolved === void 0 ? void 0 : resolved[outputKey]];
7322
7361
  })));
7323
7362
  case 11:
7324
7363
  case "end":
7325
- return _context10.stop();
7364
+ return _context11.stop();
7326
7365
  }
7327
- }, _callee1);
7366
+ }, _callee10);
7328
7367
  }));
7329
- return function resolveAutomationActionInputs(_x11) {
7330
- return _ref20.apply(this, arguments);
7368
+ return function resolveAutomationActionInputs(_x12) {
7369
+ return _ref21.apply(this, arguments);
7331
7370
  };
7332
7371
  }();
7333
7372
  var hasMatchingResolverKey = function hasMatchingResolverKey(definition, paths) {
@@ -7339,36 +7378,36 @@ var hasMatchingResolverKey = function hasMatchingResolverKey(definition, paths)
7339
7378
  });
7340
7379
  };
7341
7380
  var resolveOutputPathsByNodeType = /*#__PURE__*/function () {
7342
- var _ref24 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee10(_ref23) {
7381
+ var _ref25 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee11(_ref24) {
7343
7382
  var subdomain, nodeType, source, paths, defaultValue, runtimeOutputs, _splitType3, _splitType4, pluginName, runtimeDefinition, definition;
7344
- return _regeneratorRuntime().wrap(function _callee10$(_context11) {
7345
- while (1) switch (_context11.prev = _context11.next) {
7383
+ return _regeneratorRuntime().wrap(function _callee11$(_context12) {
7384
+ while (1) switch (_context12.prev = _context12.next) {
7346
7385
  case 0:
7347
- subdomain = _ref23.subdomain, nodeType = _ref23.nodeType, source = _ref23.source, paths = _ref23.paths, defaultValue = _ref23.defaultValue, runtimeOutputs = _ref23.runtimeOutputs;
7386
+ subdomain = _ref24.subdomain, nodeType = _ref24.nodeType, source = _ref24.source, paths = _ref24.paths, defaultValue = _ref24.defaultValue, runtimeOutputs = _ref24.runtimeOutputs;
7348
7387
  _splitType3 = splitType(nodeType || ''), _splitType4 = _slicedToArray(_splitType3, 1), pluginName = _splitType4[0];
7349
7388
  runtimeDefinition = runtimeOutputs === null || runtimeOutputs === void 0 ? void 0 : runtimeOutputs[nodeType];
7350
- _context11.t0 = runtimeDefinition;
7351
- if (_context11.t0) {
7352
- _context11.next = 8;
7389
+ _context12.t0 = runtimeDefinition;
7390
+ if (_context12.t0) {
7391
+ _context12.next = 8;
7353
7392
  break;
7354
7393
  }
7355
- _context11.next = 7;
7394
+ _context12.next = 7;
7356
7395
  return getAutomationOutputDefinition(nodeType);
7357
7396
  case 7:
7358
- _context11.t0 = _context11.sent;
7397
+ _context12.t0 = _context12.sent;
7359
7398
  case 8:
7360
- definition = _context11.t0;
7399
+ definition = _context12.t0;
7361
7400
  if (definition) {
7362
- _context11.next = 11;
7401
+ _context12.next = 11;
7363
7402
  break;
7364
7403
  }
7365
- return _context11.abrupt("return", resolveDirectOutputValues(source, paths, defaultValue));
7404
+ return _context12.abrupt("return", resolveDirectOutputValues(source, paths, defaultValue));
7366
7405
  case 11:
7367
7406
  if (!runtimeDefinition) {
7368
- _context11.next = 13;
7407
+ _context12.next = 13;
7369
7408
  break;
7370
7409
  }
7371
- return _context11.abrupt("return", resolveOutputPathsFromDefinition({
7410
+ return _context12.abrupt("return", resolveOutputPathsFromDefinition({
7372
7411
  definition: runtimeDefinition,
7373
7412
  subdomain: subdomain,
7374
7413
  source: source,
@@ -7377,10 +7416,10 @@ var resolveOutputPathsByNodeType = /*#__PURE__*/function () {
7377
7416
  }));
7378
7417
  case 13:
7379
7418
  if (!(pluginName && hasMatchingResolverKey(definition, paths))) {
7380
- _context11.next = 15;
7419
+ _context12.next = 15;
7381
7420
  break;
7382
7421
  }
7383
- return _context11.abrupt("return", sendCoreModuleProducer({
7422
+ return _context12.abrupt("return", sendCoreModuleProducer({
7384
7423
  subdomain: subdomain,
7385
7424
  moduleName: 'automations',
7386
7425
  pluginName: pluginName,
@@ -7394,7 +7433,7 @@ var resolveOutputPathsByNodeType = /*#__PURE__*/function () {
7394
7433
  defaultValue: resolveDirectOutputValues(source, paths, defaultValue)
7395
7434
  }));
7396
7435
  case 15:
7397
- return _context11.abrupt("return", resolveOutputPathsFromDefinition({
7436
+ return _context12.abrupt("return", resolveOutputPathsFromDefinition({
7398
7437
  definition: definition,
7399
7438
  subdomain: subdomain,
7400
7439
  source: source,
@@ -7403,32 +7442,32 @@ var resolveOutputPathsByNodeType = /*#__PURE__*/function () {
7403
7442
  }));
7404
7443
  case 16:
7405
7444
  case "end":
7406
- return _context11.stop();
7445
+ return _context12.stop();
7407
7446
  }
7408
- }, _callee10);
7447
+ }, _callee11);
7409
7448
  }));
7410
- return function resolveOutputPathsByNodeType(_x12) {
7411
- return _ref24.apply(this, arguments);
7449
+ return function resolveOutputPathsByNodeType(_x13) {
7450
+ return _ref25.apply(this, arguments);
7412
7451
  };
7413
7452
  }();
7414
7453
  var resolveOutputGroups = /*#__PURE__*/function () {
7415
- var _ref26 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee11(_ref25) {
7454
+ var _ref27 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee12(_ref26) {
7416
7455
  var subdomain, groups, defaultValue, runtimeOutputs, resolvedByToken, _iterator5, _step5, group, resolvedValues, _i5, _Object$entries2, _Object$entries2$_i, path, value;
7417
- return _regeneratorRuntime().wrap(function _callee11$(_context12) {
7418
- while (1) switch (_context12.prev = _context12.next) {
7456
+ return _regeneratorRuntime().wrap(function _callee12$(_context13) {
7457
+ while (1) switch (_context13.prev = _context13.next) {
7419
7458
  case 0:
7420
- subdomain = _ref25.subdomain, groups = _ref25.groups, defaultValue = _ref25.defaultValue, runtimeOutputs = _ref25.runtimeOutputs;
7459
+ subdomain = _ref26.subdomain, groups = _ref26.groups, defaultValue = _ref26.defaultValue, runtimeOutputs = _ref26.runtimeOutputs;
7421
7460
  resolvedByToken = {};
7422
7461
  _iterator5 = _createForOfIteratorHelper(groups);
7423
- _context12.prev = 3;
7462
+ _context13.prev = 3;
7424
7463
  _iterator5.s();
7425
7464
  case 5:
7426
7465
  if ((_step5 = _iterator5.n()).done) {
7427
- _context12.next = 13;
7466
+ _context13.next = 13;
7428
7467
  break;
7429
7468
  }
7430
7469
  group = _step5.value;
7431
- _context12.next = 9;
7470
+ _context13.next = 9;
7432
7471
  return resolveOutputPathsByNodeType({
7433
7472
  subdomain: subdomain,
7434
7473
  nodeType: group.nodeType,
@@ -7438,44 +7477,44 @@ var resolveOutputGroups = /*#__PURE__*/function () {
7438
7477
  runtimeOutputs: runtimeOutputs
7439
7478
  });
7440
7479
  case 9:
7441
- resolvedValues = _context12.sent;
7480
+ resolvedValues = _context13.sent;
7442
7481
  for (_i5 = 0, _Object$entries2 = Object.entries(resolvedValues || {}); _i5 < _Object$entries2.length; _i5++) {
7443
7482
  _Object$entries2$_i = _slicedToArray(_Object$entries2[_i5], 2), path = _Object$entries2$_i[0], value = _Object$entries2$_i[1];
7444
7483
  resolvedByToken["".concat(group.groupKey, ".").concat(path)] = value;
7445
7484
  }
7446
7485
  case 11:
7447
- _context12.next = 5;
7486
+ _context13.next = 5;
7448
7487
  break;
7449
7488
  case 13:
7450
- _context12.next = 18;
7489
+ _context13.next = 18;
7451
7490
  break;
7452
7491
  case 15:
7453
- _context12.prev = 15;
7454
- _context12.t0 = _context12["catch"](3);
7455
- _iterator5.e(_context12.t0);
7492
+ _context13.prev = 15;
7493
+ _context13.t0 = _context13["catch"](3);
7494
+ _iterator5.e(_context13.t0);
7456
7495
  case 18:
7457
- _context12.prev = 18;
7496
+ _context13.prev = 18;
7458
7497
  _iterator5.f();
7459
- return _context12.finish(18);
7498
+ return _context13.finish(18);
7460
7499
  case 21:
7461
- return _context12.abrupt("return", resolvedByToken);
7500
+ return _context13.abrupt("return", resolvedByToken);
7462
7501
  case 22:
7463
7502
  case "end":
7464
- return _context12.stop();
7503
+ return _context13.stop();
7465
7504
  }
7466
- }, _callee11, null, [[3, 15, 18, 21]]);
7505
+ }, _callee12, null, [[3, 15, 18, 21]]);
7467
7506
  }));
7468
- return function resolveOutputGroups(_x13) {
7469
- return _ref26.apply(this, arguments);
7507
+ return function resolveOutputGroups(_x14) {
7508
+ return _ref27.apply(this, arguments);
7470
7509
  };
7471
7510
  }();
7472
7511
 
7473
7512
  // {{ token }} -> resolved raw value (object/number/string), or undefined
7474
7513
  var resolveCurlyPlaceholderToken = function resolveCurlyPlaceholderToken(token, resolvedByToken) {
7475
- var _ref27;
7514
+ var _ref28;
7476
7515
  var trimmedToken = token.trim();
7477
7516
  var staticValue = resolveStaticOutputPlaceholder(trimmedToken);
7478
- return (_ref27 = staticValue !== null && staticValue !== void 0 ? staticValue : resolvedByToken[trimmedToken]) !== null && _ref27 !== void 0 ? _ref27 : resolvedByToken["trigger.".concat(trimmedToken)];
7517
+ return (_ref28 = staticValue !== null && staticValue !== void 0 ? staticValue : resolvedByToken[trimmedToken]) !== null && _ref28 !== void 0 ? _ref28 : resolvedByToken["trigger.".concat(trimmedToken)];
7479
7518
  };
7480
7519
 
7481
7520
  // Replace all {{ }} placeholders in a string.
@@ -7523,28 +7562,28 @@ var _replaceOutputPlaceholdersInValue = function replaceOutputPlaceholdersInValu
7523
7562
  });
7524
7563
  }
7525
7564
  if (value && _typeof(value) === 'object') {
7526
- return Object.fromEntries(Object.entries(value).map(function (_ref28) {
7527
- var _ref29 = _slicedToArray(_ref28, 2),
7528
- key = _ref29[0],
7529
- item = _ref29[1];
7565
+ return Object.fromEntries(Object.entries(value).map(function (_ref29) {
7566
+ var _ref30 = _slicedToArray(_ref29, 2),
7567
+ key = _ref30[0],
7568
+ item = _ref30[1];
7530
7569
  return [key, _replaceOutputPlaceholdersInValue(item, resolvedByToken, defaultValue, keepUnresolvedPlaceholders)];
7531
7570
  }));
7532
7571
  }
7533
7572
  return value;
7534
7573
  };
7535
7574
  var replaceOutputPlaceholders = /*#__PURE__*/function () {
7536
- var _ref31 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee12(_ref30) {
7537
- var subdomain, execution, values, defaultValue, runtimeOutputs, _ref30$keepUnresolved, keepUnresolvedPlaceholders, tokensByValueKey, resolvedByToken;
7538
- return _regeneratorRuntime().wrap(function _callee12$(_context13) {
7539
- while (1) switch (_context13.prev = _context13.next) {
7575
+ var _ref32 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee13(_ref31) {
7576
+ var subdomain, execution, values, defaultValue, runtimeOutputs, _ref31$keepUnresolved, keepUnresolvedPlaceholders, tokensByValueKey, resolvedByToken;
7577
+ return _regeneratorRuntime().wrap(function _callee13$(_context14) {
7578
+ while (1) switch (_context14.prev = _context14.next) {
7540
7579
  case 0:
7541
- 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;
7580
+ 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;
7542
7581
  tokensByValueKey = getOutputPlaceholderTokensByValueKey(values);
7543
7582
  if (!Object.keys(tokensByValueKey).length) {
7544
- _context13.next = 8;
7583
+ _context14.next = 8;
7545
7584
  break;
7546
7585
  }
7547
- _context13.next = 5;
7586
+ _context14.next = 5;
7548
7587
  return resolveOutputGroups({
7549
7588
  subdomain: subdomain,
7550
7589
  groups: buildOutputResolveGroups({
@@ -7555,34 +7594,34 @@ var replaceOutputPlaceholders = /*#__PURE__*/function () {
7555
7594
  runtimeOutputs: runtimeOutputs
7556
7595
  });
7557
7596
  case 5:
7558
- _context13.t0 = _context13.sent;
7559
- _context13.next = 9;
7597
+ _context14.t0 = _context14.sent;
7598
+ _context14.next = 9;
7560
7599
  break;
7561
7600
  case 8:
7562
- _context13.t0 = {};
7601
+ _context14.t0 = {};
7563
7602
  case 9:
7564
- resolvedByToken = _context13.t0;
7565
- return _context13.abrupt("return", Object.entries(values).reduce(function (acc, _ref32) {
7566
- var _ref33 = _slicedToArray(_ref32, 2),
7567
- key = _ref33[0],
7568
- value = _ref33[1];
7603
+ resolvedByToken = _context14.t0;
7604
+ return _context14.abrupt("return", Object.entries(values).reduce(function (acc, _ref33) {
7605
+ var _ref34 = _slicedToArray(_ref33, 2),
7606
+ key = _ref34[0],
7607
+ value = _ref34[1];
7569
7608
  acc[key] = _replaceOutputPlaceholdersInValue(value, resolvedByToken, defaultValue, keepUnresolvedPlaceholders);
7570
7609
  return acc;
7571
7610
  }, {}));
7572
7611
  case 11:
7573
7612
  case "end":
7574
- return _context13.stop();
7613
+ return _context14.stop();
7575
7614
  }
7576
- }, _callee12);
7615
+ }, _callee13);
7577
7616
  }));
7578
- return function replaceOutputPlaceholders(_x14) {
7579
- return _ref31.apply(this, arguments);
7617
+ return function replaceOutputPlaceholders(_x15) {
7618
+ return _ref32.apply(this, arguments);
7580
7619
  };
7581
7620
  }();
7582
- var getAutomationNodeType = function getAutomationNodeType(_ref34) {
7583
- var pluginName = _ref34.pluginName,
7584
- node = _ref34.node,
7585
- kind = _ref34.kind;
7621
+ var getAutomationNodeType = function getAutomationNodeType(_ref35) {
7622
+ var pluginName = _ref35.pluginName,
7623
+ node = _ref35.node,
7624
+ kind = _ref35.kind;
7586
7625
  if (node.type) {
7587
7626
  return node.type;
7588
7627
  }
@@ -8617,17 +8656,34 @@ var getAutomationBaseType = function getAutomationBaseType(type) {
8617
8656
  var normalizedCollectionName = collectionName && collectionName.endsWith('s') ? collectionName : pluralFormation(collectionName || '');
8618
8657
  return collectionName ? "".concat(pluginName, ":").concat(moduleName, ".").concat(normalizedCollectionName) : "".concat(pluginName, ":").concat(moduleName);
8619
8658
  };
8659
+
8660
+ // The record an earlier action produced or found: Create returns targetId,
8661
+ // Find object returns objectId and the object itself.
8662
+ var getTargetActionRecord = function getTargetActionRecord(execution, targetActionId) {
8663
+ var _find, _ref23, _result$objectId;
8664
+ var result = (_find = (execution.actions || []).find(function (_ref22) {
8665
+ var actionId = _ref22.actionId;
8666
+ return actionId === targetActionId;
8667
+ })) === null || _find === void 0 ? void 0 : _find.result;
8668
+ var object = result !== null && result !== void 0 && result.object && _typeof(result.object) === 'object' ? result.object : {};
8669
+ 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;
8670
+ return {
8671
+ id: id == null ? '' : String(id),
8672
+ object: object
8673
+ };
8674
+ };
8620
8675
  var getSetPropertySelector = /*#__PURE__*/function () {
8621
- var _ref23 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee0(_ref22) {
8622
- var subdomain, module, execution, targetType, relation, targetPath, target, targetId, _getValueByPath, found, value, rawValue, ids, _ref24, contentType, relatedContentType, relationIds;
8676
+ var _ref25 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee0(_ref24) {
8677
+ var subdomain, module, execution, targetType, relation, targetPath, targetActionId, actionRecord, target, targetId, _getValueByPath, found, value, rawValue, ids, _ref26, contentType, relatedContentType, relationIds;
8623
8678
  return _regeneratorRuntime().wrap(function _callee0$(_context0) {
8624
8679
  while (1) switch (_context0.prev = _context0.next) {
8625
8680
  case 0:
8626
- subdomain = _ref22.subdomain, module = _ref22.module, execution = _ref22.execution, targetType = _ref22.targetType, relation = _ref22.relation, targetPath = _ref22.targetPath;
8627
- target = execution.target || {};
8628
- targetId = String(execution.targetId || target._id || '');
8681
+ subdomain = _ref24.subdomain, module = _ref24.module, execution = _ref24.execution, targetType = _ref24.targetType, relation = _ref24.relation, targetPath = _ref24.targetPath, targetActionId = _ref24.targetActionId;
8682
+ actionRecord = targetActionId ? getTargetActionRecord(execution, targetActionId) : undefined;
8683
+ target = actionRecord ? actionRecord.object : execution.target || {};
8684
+ targetId = actionRecord ? actionRecord.id : String(execution.targetId || target._id || '');
8629
8685
  if (!targetPath) {
8630
- _context0.next = 8;
8686
+ _context0.next = 9;
8631
8687
  break;
8632
8688
  }
8633
8689
  _getValueByPath = getValueByPath(target, targetPath), found = _getValueByPath.found, value = _getValueByPath.value;
@@ -8640,9 +8696,9 @@ var getSetPropertySelector = /*#__PURE__*/function () {
8640
8696
  $in: Array.from(new Set(ids))
8641
8697
  }
8642
8698
  });
8643
- case 8:
8699
+ case 9:
8644
8700
  if (targetId) {
8645
- _context0.next = 10;
8701
+ _context0.next = 11;
8646
8702
  break;
8647
8703
  }
8648
8704
  return _context0.abrupt("return", {
@@ -8650,18 +8706,18 @@ var getSetPropertySelector = /*#__PURE__*/function () {
8650
8706
  $in: []
8651
8707
  }
8652
8708
  });
8653
- case 10:
8709
+ case 11:
8654
8710
  if (!(!relation && getAutomationBaseType(module) === getAutomationBaseType(targetType))) {
8655
- _context0.next = 12;
8711
+ _context0.next = 13;
8656
8712
  break;
8657
8713
  }
8658
8714
  return _context0.abrupt("return", {
8659
8715
  _id: targetId
8660
8716
  });
8661
- case 12:
8662
- _ref24 = relation || {}, contentType = _ref24.contentType, relatedContentType = _ref24.relatedContentType;
8717
+ case 13:
8718
+ _ref26 = relation || {}, contentType = _ref26.contentType, relatedContentType = _ref26.relatedContentType;
8663
8719
  if (!(!contentType || !relatedContentType)) {
8664
- _context0.next = 15;
8720
+ _context0.next = 16;
8665
8721
  break;
8666
8722
  }
8667
8723
  return _context0.abrupt("return", {
@@ -8669,8 +8725,8 @@ var getSetPropertySelector = /*#__PURE__*/function () {
8669
8725
  $in: []
8670
8726
  }
8671
8727
  });
8672
- case 15:
8673
- _context0.next = 17;
8728
+ case 16:
8729
+ _context0.next = 18;
8674
8730
  return sendTRPCMessage({
8675
8731
  subdomain: subdomain,
8676
8732
  pluginName: 'core',
@@ -8683,30 +8739,30 @@ var getSetPropertySelector = /*#__PURE__*/function () {
8683
8739
  },
8684
8740
  defaultValue: []
8685
8741
  });
8686
- case 17:
8742
+ case 18:
8687
8743
  relationIds = _context0.sent;
8688
8744
  return _context0.abrupt("return", {
8689
8745
  _id: {
8690
8746
  $in: Array.from(new Set((relationIds || []).filter(Boolean)))
8691
8747
  }
8692
8748
  });
8693
- case 19:
8749
+ case 20:
8694
8750
  case "end":
8695
8751
  return _context0.stop();
8696
8752
  }
8697
8753
  }, _callee0);
8698
8754
  }));
8699
8755
  return function getSetPropertySelector(_x0) {
8700
- return _ref23.apply(this, arguments);
8756
+ return _ref25.apply(this, arguments);
8701
8757
  };
8702
8758
  }();
8703
8759
  var setProperty = /*#__PURE__*/function () {
8704
- var _ref26 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee1(_ref25) {
8705
- 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;
8760
+ var _ref28 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee1(_ref27) {
8761
+ 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;
8706
8762
  return _regeneratorRuntime().wrap(function _callee1$(_context1) {
8707
8763
  while (1) switch (_context1.prev = _context1.next) {
8708
8764
  case 0:
8709
- 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;
8765
+ 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;
8710
8766
  updateRecord = getSetPropertyUpdate({
8711
8767
  subdomain: subdomain,
8712
8768
  module: module,
@@ -8875,7 +8931,7 @@ var setProperty = /*#__PURE__*/function () {
8875
8931
  }, _callee1, null, [[12, 20], [40, 69, 72, 75], [52, 61]]);
8876
8932
  }));
8877
8933
  return function setProperty(_x1) {
8878
- return _ref26.apply(this, arguments);
8934
+ return _ref28.apply(this, arguments);
8879
8935
  };
8880
8936
  }();
8881
8937
  var getContentType = function getContentType(type) {
@@ -11114,6 +11170,7 @@ var segmentJoinChanges = /*#__PURE__*/function () {
11114
11170
  };
11115
11171
  }();
11116
11172
 
11173
+ var EMAIL_SCREEN_REASONS = ['syntax', 'no_mx', 'disposable', 'random'];
11117
11174
  var EMAIL_LANES = ['proven', 'unknown', 'suppressed'];
11118
11175
  var emailAddressSchema = new Schema({
11119
11176
  email: {
@@ -11145,6 +11202,10 @@ var emailAddressSchema = new Schema({
11145
11202
  type: String,
11146
11203
  "enum": ['hard_bounce', 'complaint', 'unsubscribe', 'screened', 'manual']
11147
11204
  },
11205
+ screenReason: {
11206
+ type: String,
11207
+ "enum": EMAIL_SCREEN_REASONS
11208
+ },
11148
11209
  suppressedBy: {
11149
11210
  type: String
11150
11211
  },
@@ -23083,4 +23144,4 @@ function _startPlugin() {
23083
23144
  return _startPlugin.apply(this, arguments);
23084
23145
  }
23085
23146
 
23086
- export { setClientPortalHeader as $, wrapApolloResolvers as A, markResolvers as B, startBeforeResolvers as C, checkBeforeResolvers as D, expectedErrorPlugin as E, agentToolsAuthHeaderName as F, encodeAgentToolsAuthHeader as G, decodeAgentToolsAuthHeader as H, buildAgentToolManifest as I, mountAgentTools as J, AGENT_TOOL_DEFAULT_MAX_RESPONSE_BYTES as K, getAgentToolMaxResponseBytes as L, oversizedAgentToolResultBytes as M, agentToolResponseTooLargeError as N, graphqlPubsub as O, clientPortalHeaderName as P, cpUserHeaderName as Q, extractUserFromHeader as R, extractCPUserFromHeader as S, TBeforeResolversProducers as T, extractClientPortalFromHeader as U, USER_HEADER_OMITTED_FIELDS as V, HEADER_SIZE_WARN_BYTES as W, compactUserForHeader as X, setUserHeader as Y, setCPUserHeader as Z, _asyncToGenerator as _, _regeneratorRuntime as a, isDev as a$, startAfterProcess as a0, mongooseStringRandomId as a1, mongooseStringNonBlank as a2, mongoStringRequired as a3, mongooseStringRequiredNonBlank as a4, mongooseField as a5, updateMongoDocumentOrder as a6, defaultPaginate as a7, cursorPaginate as a8, cursorPaginateAggregation as a9, ORGANIZATION_ID_MAPPING as aA, getSaasOrganizationIdBySubdomain as aB, getSaasOrgsCache as aC, getSaasOrganizations as aD, getSaasOrganizationsByFilter as aE, updateSaasOrganization as aF, helpCenterDomainsOf as aG, getSaasOrganizationByHelpCenterDomain as aH, getSaasOrganizationHelpCenterDomains as aI, getSaasOrganizationsWithPendingHelpCenterDomain as aJ, saveSaasOrganizationHelpCenterDomain as aK, removeSaasOrganizationHelpCenterDomain as aL, getSaasOrganizationDetail as aM, getSaasOrganizationPlanHistories as aN, getSaasOrganizationActiveAddons as aO, removeOrgsCache as aP, getSaasPlugins as aQ, getSaasPlugin as aR, getSaasPromoCodes as aS, getSaasOrgPromoCodes as aT, GP_STATUS as aU, isGlobalProfileV2 as aV, pluginsOfStripeItem as aW, pluginsFromStripe as aX, getGlobalProfileV2Plugins as aY, sanitizeFilename as aZ, sanitizeKey as a_, checkCollectionCodeDuplication as aa, schemaWrapper as ab, mongooseConnectionOptions as ac, closeMongooose as ad, splitSearchWords as ae, generateConfiguredSearchTokens as af, buildSearchTokenFilter as ag, configureSchemaSearchTokens as ah, getSchemaSearchTokenConfig as ai, toSerializablePayload as aj, DEFAULT_JOB_OPTIONS as ak, createMQWorkerWithListeners as al, sendWorkerMessage as am, randomAlphanumeric as an, randomLowercase as ao, redis as ap, resetConfigsCache as aq, coreModelAddons as ar, coreModelBundles as as, coreModelInstallations as at, coreModelUsers as au, coreModelEndpoints as av, coreModelPromoCodes as aw, coreModelPlugins as ax, coreModelExperiences as ay, coreModelOrganizationPlanHistories as az, coreModelOrganizations as b, cleanHtml as b$, keyForConfig as b0, getPlugins as b1, setActivePlugins as b2, getActivePlugins as b3, getAvailablePlugins as b4, clearServiceDiscoveryCache as b5, getPlugin as b6, joinErxesGateway as b7, leaveErxesGateway as b8, isEnabled as b9, getDate as bA, getToday as bB, getFullDate as bC, getPureDate as bD, getTomorrow as bE, getNextMonth as bF, fixNum as bG, dateToShortStr as bH, shortStrToDate as bI, isImage as bJ, isVideo as bK, createHealthRoute as bL, checkServiceRunning as bM, generateRequestProcess as bN, getDiffObjects as bO, flattenObject as bP, readFileUrl as bQ, readFileFromStorage as bR, readFileStreamFromStorage as bS, uploadFileToStorage as bT, encodeCursor as bU, decodeCursor as bV, buildCursorQuery as bW, stripAnsi as bX, removeLastTrailingSlash as bY, removeExtraSpaces as bZ, splitStr as b_, getPluginAddress as ba, initializePluginConfig as bb, MAX_HEADER_BYTES as bc, startPlugin as bd, trpcContextHeaderName as be, encodeTRPCContextHeader as bf, decodeTRPCContextHeader as bg, createPluginTRPCContext as bh, createTRPCContext as bi, ok as bj, err as bk, sendCoreModuleProducer as bl, getTrustProxySetting as bm, applyTrustProxy as bn, connectionOptions as bo, authCookieOptions as bp, paginate as bq, validSearchText as br, regexSearchText as bs, getCoreDomain as bt, escapeRegExp as bu, updateOrder as bv, pluralFormation as bw, fixDate as bx, checkUserIds as by, getUniqueValue as bz, connect as c, wrapPublicResolver as c$, random as c0, EXPECTED_ERROR_NAME as c1, ExpectedError as c2, createExpectedError as c3, classifyError as c4, isExpectedError as c5, extractMessage as c6, sentryExpectedErrorFilter as c7, initErxesSentry as c8, isSameRecordReferenceType as c9, zonedDate as cA, isAnniversary as cB, compileSegmentMongoFilter as cC, gatherSegmentRelations as cD, mergePropertyRowConditions as cE, parsePropertyColumnKey as cF, isPropertyGroupKey as cG, propertyGroupIdFromKey as cH, toPropertyRowColumnKey as cI, PROPERTIES_DATA as cJ, logActivityLogError as cK, matchesFieldPattern as cL, findResolver as cM, getSnapshot as cN, detectAssignmentDelta as cO, permissionGroupSchema as cP, userGroupSchema as cQ, permissionSchema as cR, roleSchema as cS, checkLogin as cT, wrapPermission as cU, getGroupActionsMap as cV, clearGroupActionsCache as cW, canGroup as cX, hasDeclaredOAuthScopes as cY, resolveActionOAuthScopes as cZ, checkPermissionGroup as c_, normalizeRecordReferenceTypes as ca, normalizeRecordReferenceExtensions as cb, propertyDataPath as cc, toPropertyRowKey as cd, getLocalRecordReferenceType as ce, getRecordReferencePluginName as cf, _typeof as cg, resolveRecordReferenceValue as ch, _toArray as ci, AUTOMATION_ERROR_CODES as cj, _objectWithoutProperties as ck, _toPropertyKey as cl, replaceOutputPlaceholders as cm, SEGMENT_MEMBERSHIP_FIELD as cn, parsePropertyDataKey as co, toPropertyGroupKey as cp, walkSegmentNodes as cq, segmentFieldRef as cr, segmentReferenceRef as cs, segmentRelationRef as ct, DEFAULT_SEGMENT_TIME_ZONE as cu, normalizeSegmentOperator as cv, SegmentOperator as cw, PERIOD_OPERATORS as cx, zonedPeriodRange as cy, shiftZonedDays as cz, getSubdomain as d, resolveOutputPathsByNodeType as d$, userSchema as d0, userMovemmentSchema as d1, STATUSES as d2, COMPANY_BUSINESS_TYPES as d3, DEFAULT_COMPANY_INDUSTRY_TYPES as d4, COMPANY_INDUSTRY_TYPES as d5, DEFAULT_SOCIAL_LINKS as d6, SOCIAL_LINKS as d7, DEFAULT_SEX_CHOICES as d8, SEX_OPTIONS as d9, AUTOMATION_PROPERTY_OPERATORS as dA, STATIC_PLACEHOLDER as dB, AUTOMATION_STATUSES as dC, AUTOMATION_CORE_ACTIONS as dD, AUTOMATION_CORE_TRIGGER_TYPES as dE, TAutomationFindObjectType as dF, AUTOMATION_EMAIL_RECIPIENTS_TYPES as dG, AUTOMATION_NON_DEFERRABLE_CORE_ACTIONS as dH, AUTOMATION_CORE_ACTION_DEFERRED as dI, AUTOMATION_DEFERRED_TIMEOUT as dJ, BROADCAST_TRIGGER_TYPE as dK, BROADCAST_TARGET_TYPE as dL, getTriggerTargetType as dM, EXECUTE_WAIT_TYPES as dN, TAutomationProducers as dO, TAutomationActionFolks as dP, automationSchema as dQ, AUTOMATION_EXECUTION_STATUS as dR, automationExecutionSchema as dS, aiAgentSchema as dT, resolveFromSourceField as dU, matchAutomationResolverKey as dV, getValueByPath as dW, AUTOMATION_OUTPUT_ITEM_COUNT as dX, isReEnrollableTrigger as dY, isReEnrollingTrigger as dZ, resolveAutomationActionInputs as d_, DEFAULT_CONSTANT_VALUES as da, USER_ROLES as db, USER_PROPERTIES_INFO as dc, STRUCTURE_STATUSES as dd, USER_MOVEMENT_STATUSES as de, CUSTOMER_SELECT_OPTIONS as df, USER_EXTENDED_FIELDS as dg, USER_EXPORT_EXTENDED_FIELDS as dh, INPUT_TYPE as di, customFieldSchema as dj, ruleSchema as dk, attachmentSchema as dl, initRecordReferences as dm, createEventHandlers as dn, setEventHandlerRuntimeContext as dp, generateEventHandlersFromRequest as dq, appSchema as dr, buildSetPropertyModifier as ds, getSetPropertySelector as dt, setProperty as du, getContentType as dv, getModuleName as dw, getPluginName as dx, splitType as dy, startAutomations as dz, getSaasCoreConnection as e, SegmentBaseInput as e$, getAutomationNodeType as e0, toTransportOutput as e1, normalizeAutomationConstantsForTransport as e2, buildRuntimeOutputsIndex as e3, AutomationBaseInput as e4, AutomationExecActionInput as e5, AutomationExecutionInput as e6, AutomationActionInput as e7, ReceiveActionsInputData as e8, ReceiveActionsInput as e9, SEGMENT_QUEUES as eA, segmentQueueFor as eB, scheduleSegmentReconcile as eC, sendSegmentChanged as eD, sendSegmentReconcile as eE, sendSegmentRebuild as eF, sendSegmentForget as eG, segmentJoinChanges as eH, gatherSegmentEventTypes as eI, gatherSegmentRecordTypes as eJ, gatherSegmentFieldSources as eK, gatherSegmentJoinPaths as eL, zonedDayStart as eM, isLeapYear as eN, anniversaryRanges as eO, collectSegmentValueRefs as eP, collectSegmentReferences as eQ, hasSegmentReferenceInRelation as eR, DEFAULT_SEGMENT_VALUE_FIELD as eS, resolveSegmentFieldOperators as eT, resolveSegmentFieldDependencies as eU, resolveSegmentValueField as eV, SEGMENT_OPERATOR_SPECS as eW, SEGMENT_IMPLICIT_OPERATORS as eX, initSegmentProducers as eY, TSegmentProducers as eZ, SegmentNodeSchema as e_, CheckCustomTriggerInputData as ea, FindObjectInputData as eb, ResolveOutputPathsInputData as ec, SetPropertiesInputData as ed, GenerateAiContextInputData as ee, LoadAiKnowledgeDocumentBatchInputData as ef, LookupAiToolInputData as eg, CheckCustomTriggerInput as eh, FindObjectInput as ei, ResolveOutputPathsInput as ej, SetPropertiesInput as ek, GenerateAiContextInput as el, LoadAiKnowledgeDocumentBatchInput as em, LookupAiToolInput as en, sendAutomationTrigger as eo, sendAutomationRun as ep, sendAutomationDeferredCompletion as eq, SEGMENT_TEXT_OPERATORS as er, SEGMENT_ID_OPERATORS as es, SEGMENT_NUMBER_OPERATORS as et, SEGMENT_DATE_OPERATORS as eu, SEGMENT_BOOLEAN_OPERATORS as ev, SegmentField as ew, segmentDependencyKey as ex, segmentDependencies as ey, segmentDependsOnClock as ez, createScopedEventHandlers as f, cpNotificationSchema as f$, EvaluateFieldsInput as f0, ListSegmentMembersInput as f1, CountSegmentMembersInput as f2, ApplyMembershipInput as f3, PROPERTY_GROUP_KEY_PREFIX as f4, PROPERTY_ROW_KEY_SEP as f5, PROPERTY_ANY_ROW_KEY_SEP as f6, isPropertyDataPath as f7, fieldIdFromPropertyDataPath as f8, propertyDataExistsFilter as f9, localApprovalChangeType as fA, normalizeApprovalConfig as fB, initApproval as fC, APPROVAL_LOCK_STATUSES as fD, APPROVAL_APPROVER_SCOPES as fE, APPROVAL_MODES as fF, APPROVAL_REQUEST_STATUSES as fG, APPROVAL_REQUEST_KINDS as fH, APPROVAL_DECISIONS as fI, APPROVAL_NOTIFICATION_CONTENT_TYPE as fJ, APPROVAL_NOTIFICATION_ACTIONS as fK, TApprovalChangeProducers as fL, approvalLockCheckInputSchema as fM, approvalLockStatesInputSchema as fN, approvalLockCreateInputSchema as fO, approvalRequestCreateInputSchema as fP, approvalChangeApplyInputSchema as fQ, clientPortalSchema as fR, cpNotificationConfigUserSchema as fS, cpTwoFactor as fT, cpNotificationSettingsSchema as fU, refreshTokenSchema as fV, socialAuthProviderSchema as fW, fcmDeviceSchema as fX, cpUserSchema as fY, USER_TYPES as fZ, commentSchema as f_, propertyDataRegexFilter as fa, PROPERTY_ROW_INDEX_SEP as fb, initPropertyProducers as fc, TPropertyProducers as fd, PropertyValueUsageInput as fe, UNKNOWN_VALUE_SAMPLES as ff, UNKNOWN_VALUE_COUNTS as fg, unknownValueUsage as fh, measurePropertyValueSamples as fi, measurePropertyValueCounts as fj, measurePropertyValueUsage as fk, logsSchema as fl, activityLogsSchema as fm, EMAIL_LANES as fn, emailAddressSchema as fo, emailDeliverySchema as fp, EMAIL_RAMP_ID as fq, emailRampSchema as fr, emailSenderSchema as fs, notificationSchema as ft, notificationSettingsSchema as fu, notificationZTypeSchema as fv, sendNotification as fw, sendNotificationChannels as fx, approvalChangePluginName as fy, normalizeApprovalChangeType as fz, getEnv as g, InsertImportRowsInputSchema as g0, TImportExportProducers as g1, startImportExportWorker as g2, InsertImportRowsInput as g3, GetExportHeadersInput as g4, BatchSkipRowInput as g5, GetExportDataInput as g6, InsertImportRowsOutput as g7, GetImportHeadersInput as g8, GetImportHeadersOutput as g9, getImportExportJobOptions as ga, toTerminalImportExportError as gb, logImportExportEvent as gc, safeCleanup as gd, AUTO_MATCH_CONFIDENCE as ge, SUGGEST_CONFIDENCE as gf, normalizeHeader as gg, matchImportHeaders as gh, processCSVStream as gi, countCsvDataRows as gj, _slicedToArray as h, _objectSpread2 as i, chunkArray as j, _createForOfIteratorHelper as k, logHandler as l, _createClass as m, _classCallCheck as n, isValidURL as o, sendTRPCMessage as p, _inherits as q, runBeforeResolvers as r, sendWorkerQueue as s, _wrapNativeSuper as t, userHeaderName as u, _callSuper as v, _defineProperty as w, _toConsumableArray as x, apolloCustomScalars as y, generateApolloContext as z };
23147
+ export { setClientPortalHeader as $, wrapApolloResolvers as A, markResolvers as B, startBeforeResolvers as C, checkBeforeResolvers as D, expectedErrorPlugin as E, agentToolsAuthHeaderName as F, encodeAgentToolsAuthHeader as G, decodeAgentToolsAuthHeader as H, buildAgentToolManifest as I, mountAgentTools as J, AGENT_TOOL_DEFAULT_MAX_RESPONSE_BYTES as K, getAgentToolMaxResponseBytes as L, oversizedAgentToolResultBytes as M, agentToolResponseTooLargeError as N, graphqlPubsub as O, clientPortalHeaderName as P, cpUserHeaderName as Q, extractUserFromHeader as R, extractCPUserFromHeader as S, TBeforeResolversProducers as T, extractClientPortalFromHeader as U, USER_HEADER_OMITTED_FIELDS as V, HEADER_SIZE_WARN_BYTES as W, compactUserForHeader as X, setUserHeader as Y, setCPUserHeader as Z, _asyncToGenerator as _, _regeneratorRuntime as a, isDev as a$, startAfterProcess as a0, mongooseStringRandomId as a1, mongooseStringNonBlank as a2, mongoStringRequired as a3, mongooseStringRequiredNonBlank as a4, mongooseField as a5, updateMongoDocumentOrder as a6, defaultPaginate as a7, cursorPaginate as a8, cursorPaginateAggregation as a9, ORGANIZATION_ID_MAPPING as aA, getSaasOrganizationIdBySubdomain as aB, getSaasOrgsCache as aC, getSaasOrganizations as aD, getSaasOrganizationsByFilter as aE, updateSaasOrganization as aF, helpCenterDomainsOf as aG, getSaasOrganizationByHelpCenterDomain as aH, getSaasOrganizationHelpCenterDomains as aI, getSaasOrganizationsWithPendingHelpCenterDomain as aJ, saveSaasOrganizationHelpCenterDomain as aK, removeSaasOrganizationHelpCenterDomain as aL, getSaasOrganizationDetail as aM, getSaasOrganizationPlanHistories as aN, getSaasOrganizationActiveAddons as aO, removeOrgsCache as aP, getSaasPlugins as aQ, getSaasPlugin as aR, getSaasPromoCodes as aS, getSaasOrgPromoCodes as aT, GP_STATUS as aU, isGlobalProfileV2 as aV, pluginsOfStripeItem as aW, pluginsFromStripe as aX, getGlobalProfileV2Plugins as aY, sanitizeFilename as aZ, sanitizeKey as a_, checkCollectionCodeDuplication as aa, schemaWrapper as ab, mongooseConnectionOptions as ac, closeMongooose as ad, splitSearchWords as ae, generateConfiguredSearchTokens as af, buildSearchTokenFilter as ag, configureSchemaSearchTokens as ah, getSchemaSearchTokenConfig as ai, toSerializablePayload as aj, DEFAULT_JOB_OPTIONS as ak, createMQWorkerWithListeners as al, sendWorkerMessage as am, randomAlphanumeric as an, randomLowercase as ao, redis as ap, resetConfigsCache as aq, coreModelAddons as ar, coreModelBundles as as, coreModelInstallations as at, coreModelUsers as au, coreModelEndpoints as av, coreModelPromoCodes as aw, coreModelPlugins as ax, coreModelExperiences as ay, coreModelOrganizationPlanHistories as az, coreModelOrganizations as b, cleanHtml as b$, keyForConfig as b0, getPlugins as b1, setActivePlugins as b2, getActivePlugins as b3, getAvailablePlugins as b4, clearServiceDiscoveryCache as b5, getPlugin as b6, joinErxesGateway as b7, leaveErxesGateway as b8, isEnabled as b9, getDate as bA, getToday as bB, getFullDate as bC, getPureDate as bD, getTomorrow as bE, getNextMonth as bF, fixNum as bG, dateToShortStr as bH, shortStrToDate as bI, isImage as bJ, isVideo as bK, createHealthRoute as bL, checkServiceRunning as bM, generateRequestProcess as bN, getDiffObjects as bO, flattenObject as bP, readFileUrl as bQ, readFileFromStorage as bR, readFileStreamFromStorage as bS, uploadFileToStorage as bT, encodeCursor as bU, decodeCursor as bV, buildCursorQuery as bW, stripAnsi as bX, removeLastTrailingSlash as bY, removeExtraSpaces as bZ, splitStr as b_, getPluginAddress as ba, initializePluginConfig as bb, MAX_HEADER_BYTES as bc, startPlugin as bd, trpcContextHeaderName as be, encodeTRPCContextHeader as bf, decodeTRPCContextHeader as bg, createPluginTRPCContext as bh, createTRPCContext as bi, ok as bj, err as bk, sendCoreModuleProducer as bl, getTrustProxySetting as bm, applyTrustProxy as bn, connectionOptions as bo, authCookieOptions as bp, paginate as bq, validSearchText as br, regexSearchText as bs, getCoreDomain as bt, escapeRegExp as bu, updateOrder as bv, pluralFormation as bw, fixDate as bx, checkUserIds as by, getUniqueValue as bz, connect as c, wrapPublicResolver as c$, random as c0, EXPECTED_ERROR_NAME as c1, ExpectedError as c2, createExpectedError as c3, classifyError as c4, isExpectedError as c5, extractMessage as c6, sentryExpectedErrorFilter as c7, initErxesSentry as c8, isSameRecordReferenceType as c9, zonedDate as cA, isAnniversary as cB, compileSegmentMongoFilter as cC, gatherSegmentRelations as cD, mergePropertyRowConditions as cE, parsePropertyColumnKey as cF, isPropertyGroupKey as cG, propertyGroupIdFromKey as cH, toPropertyRowColumnKey as cI, PROPERTIES_DATA as cJ, logActivityLogError as cK, matchesFieldPattern as cL, findResolver as cM, getSnapshot as cN, detectAssignmentDelta as cO, permissionGroupSchema as cP, userGroupSchema as cQ, permissionSchema as cR, roleSchema as cS, checkLogin as cT, wrapPermission as cU, getGroupActionsMap as cV, clearGroupActionsCache as cW, canGroup as cX, hasDeclaredOAuthScopes as cY, resolveActionOAuthScopes as cZ, checkPermissionGroup as c_, normalizeRecordReferenceTypes as ca, normalizeRecordReferenceExtensions as cb, propertyDataPath as cc, toPropertyRowKey as cd, getLocalRecordReferenceType as ce, getRecordReferencePluginName as cf, _typeof as cg, resolveRecordReferenceValue as ch, _toArray as ci, AUTOMATION_ERROR_CODES as cj, _objectWithoutProperties as ck, _toPropertyKey as cl, replaceOutputPlaceholders as cm, SEGMENT_MEMBERSHIP_FIELD as cn, parsePropertyDataKey as co, toPropertyGroupKey as cp, walkSegmentNodes as cq, segmentFieldRef as cr, segmentReferenceRef as cs, segmentRelationRef as ct, DEFAULT_SEGMENT_TIME_ZONE as cu, normalizeSegmentOperator as cv, SegmentOperator as cw, PERIOD_OPERATORS as cx, zonedPeriodRange as cy, shiftZonedDays as cz, getSubdomain as d, isReEnrollableTrigger as d$, userSchema as d0, userMovemmentSchema as d1, STATUSES as d2, COMPANY_BUSINESS_TYPES as d3, DEFAULT_COMPANY_INDUSTRY_TYPES as d4, COMPANY_INDUSTRY_TYPES as d5, DEFAULT_SOCIAL_LINKS as d6, SOCIAL_LINKS as d7, DEFAULT_SEX_CHOICES as d8, SEX_OPTIONS as d9, AUTOMATION_PROPERTY_OPERATORS as dA, STATIC_PLACEHOLDER as dB, AUTOMATION_STATUSES as dC, AUTOMATION_CORE_ACTIONS as dD, AUTOMATION_CORE_TRIGGER_TYPES as dE, TAutomationFindObjectType as dF, AUTOMATION_EMAIL_RECIPIENTS_TYPES as dG, AUTOMATION_NON_DEFERRABLE_CORE_ACTIONS as dH, AUTOMATION_CORE_ACTION_DEFERRED as dI, AUTOMATION_CORE_ACTION_PLACEMENTS as dJ, AUTOMATION_DEFERRED_TIMEOUT as dK, BROADCAST_TRIGGER_TYPE as dL, BROADCAST_TARGET_TYPE as dM, getTriggerTargetType as dN, AUTOMATION_ACTION_CONTRIBUTIONS as dO, EXECUTE_WAIT_TYPES as dP, TAutomationProducers as dQ, TAutomationActionFolks as dR, automationSchema as dS, AUTOMATION_EXECUTION_STATUS as dT, automationExecutionSchema as dU, aiAgentSchema as dV, resolveFromSourceField as dW, matchAutomationResolverKey as dX, getValueByPath as dY, AUTOMATION_OUTPUT_ITEM_COUNT as dZ, getAutomationActionConstant as d_, DEFAULT_CONSTANT_VALUES as da, USER_ROLES as db, USER_PROPERTIES_INFO as dc, STRUCTURE_STATUSES as dd, USER_MOVEMENT_STATUSES as de, CUSTOMER_SELECT_OPTIONS as df, USER_EXTENDED_FIELDS as dg, USER_EXPORT_EXTENDED_FIELDS as dh, INPUT_TYPE as di, customFieldSchema as dj, ruleSchema as dk, attachmentSchema as dl, initRecordReferences as dm, createEventHandlers as dn, setEventHandlerRuntimeContext as dp, generateEventHandlersFromRequest as dq, appSchema as dr, buildSetPropertyModifier as ds, getSetPropertySelector as dt, setProperty as du, getContentType as dv, getModuleName as dw, getPluginName as dx, splitType as dy, startAutomations as dz, getSaasCoreConnection as e, initSegmentProducers as e$, isReEnrollingTrigger as e0, resolveAutomationActionInputs as e1, resolveOutputPathsByNodeType as e2, getAutomationNodeType as e3, toTransportOutput as e4, normalizeAutomationConstantsForTransport as e5, buildRuntimeOutputsIndex as e6, AutomationBaseInput as e7, AutomationExecActionInput as e8, AutomationExecutionInput as e9, segmentDependencyKey as eA, segmentDependencies as eB, segmentDependsOnClock as eC, SEGMENT_QUEUES as eD, segmentQueueFor as eE, scheduleSegmentReconcile as eF, sendSegmentChanged as eG, sendSegmentReconcile as eH, sendSegmentRebuild as eI, sendSegmentForget as eJ, segmentJoinChanges as eK, gatherSegmentEventTypes as eL, gatherSegmentRecordTypes as eM, gatherSegmentFieldSources as eN, gatherSegmentJoinPaths as eO, zonedDayStart as eP, isLeapYear as eQ, anniversaryRanges as eR, collectSegmentValueRefs as eS, collectSegmentReferences as eT, hasSegmentReferenceInRelation as eU, DEFAULT_SEGMENT_VALUE_FIELD as eV, resolveSegmentFieldOperators as eW, resolveSegmentFieldDependencies as eX, resolveSegmentValueField as eY, SEGMENT_OPERATOR_SPECS as eZ, SEGMENT_IMPLICIT_OPERATORS as e_, AutomationActionInput as ea, ReceiveActionsInputData as eb, ReceiveActionsInput as ec, CheckCustomTriggerInputData as ed, FindObjectInputData as ee, ResolveOutputPathsInputData as ef, SetPropertiesInputData as eg, GenerateAiContextInputData as eh, LoadAiKnowledgeDocumentBatchInputData as ei, LookupAiToolInputData as ej, CheckCustomTriggerInput as ek, FindObjectInput as el, ResolveOutputPathsInput as em, SetPropertiesInput as en, GenerateAiContextInput as eo, LoadAiKnowledgeDocumentBatchInput as ep, LookupAiToolInput as eq, sendAutomationTrigger as er, sendAutomationRun as es, sendAutomationDeferredCompletion as et, SEGMENT_TEXT_OPERATORS as eu, SEGMENT_ID_OPERATORS as ev, SEGMENT_NUMBER_OPERATORS as ew, SEGMENT_DATE_OPERATORS as ex, SEGMENT_BOOLEAN_OPERATORS as ey, SegmentField as ez, createScopedEventHandlers as f, fcmDeviceSchema as f$, TSegmentProducers as f0, SegmentNodeSchema as f1, SegmentBaseInput as f2, EvaluateFieldsInput as f3, ListSegmentMembersInput as f4, CountSegmentMembersInput as f5, ApplyMembershipInput as f6, PROPERTY_GROUP_KEY_PREFIX as f7, PROPERTY_ROW_KEY_SEP as f8, PROPERTY_ANY_ROW_KEY_SEP as f9, sendNotification as fA, sendNotificationChannels as fB, approvalChangePluginName as fC, normalizeApprovalChangeType as fD, localApprovalChangeType as fE, normalizeApprovalConfig as fF, initApproval as fG, APPROVAL_LOCK_STATUSES as fH, APPROVAL_APPROVER_SCOPES as fI, APPROVAL_MODES as fJ, APPROVAL_REQUEST_STATUSES as fK, APPROVAL_REQUEST_KINDS as fL, APPROVAL_DECISIONS as fM, APPROVAL_NOTIFICATION_CONTENT_TYPE as fN, APPROVAL_NOTIFICATION_ACTIONS as fO, TApprovalChangeProducers as fP, approvalLockCheckInputSchema as fQ, approvalLockStatesInputSchema as fR, approvalLockCreateInputSchema as fS, approvalRequestCreateInputSchema as fT, approvalChangeApplyInputSchema as fU, clientPortalSchema as fV, cpNotificationConfigUserSchema as fW, cpTwoFactor as fX, cpNotificationSettingsSchema as fY, refreshTokenSchema as fZ, socialAuthProviderSchema as f_, isPropertyDataPath as fa, fieldIdFromPropertyDataPath as fb, propertyDataExistsFilter as fc, propertyDataRegexFilter as fd, PROPERTY_ROW_INDEX_SEP as fe, initPropertyProducers as ff, TPropertyProducers as fg, PropertyValueUsageInput as fh, UNKNOWN_VALUE_SAMPLES as fi, UNKNOWN_VALUE_COUNTS as fj, unknownValueUsage as fk, measurePropertyValueSamples as fl, measurePropertyValueCounts as fm, measurePropertyValueUsage as fn, logsSchema as fo, activityLogsSchema as fp, EMAIL_SCREEN_REASONS as fq, EMAIL_LANES as fr, emailAddressSchema as fs, emailDeliverySchema as ft, EMAIL_RAMP_ID as fu, emailRampSchema as fv, emailSenderSchema as fw, notificationSchema as fx, notificationSettingsSchema as fy, notificationZTypeSchema as fz, getEnv as g, cpUserSchema as g0, USER_TYPES as g1, commentSchema as g2, cpNotificationSchema as g3, InsertImportRowsInputSchema as g4, TImportExportProducers as g5, startImportExportWorker as g6, InsertImportRowsInput as g7, GetExportHeadersInput as g8, BatchSkipRowInput as g9, GetExportDataInput as ga, InsertImportRowsOutput as gb, GetImportHeadersInput as gc, GetImportHeadersOutput as gd, getImportExportJobOptions as ge, toTerminalImportExportError as gf, logImportExportEvent as gg, safeCleanup as gh, AUTO_MATCH_CONFIDENCE as gi, SUGGEST_CONFIDENCE as gj, normalizeHeader as gk, matchImportHeaders as gl, processCSVStream as gm, countCsvDataRows as gn, _slicedToArray as h, _objectSpread2 as i, chunkArray as j, _createForOfIteratorHelper as k, logHandler as l, _createClass as m, _classCallCheck as n, isValidURL as o, sendTRPCMessage as p, _inherits as q, runBeforeResolvers as r, sendWorkerQueue as s, _wrapNativeSuper as t, userHeaderName as u, _callSuper as v, _defineProperty as w, _toConsumableArray as x, apolloCustomScalars as y, generateApolloContext as z };