@erxes/api-shared 3.2.21-1 → 3.2.22-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.
- package/core-modules/dist/erxes-api-shared-core-modules.cjs.dev.js +512 -8
- package/core-modules/dist/erxes-api-shared-core-modules.cjs.prod.js +512 -8
- package/core-modules/dist/erxes-api-shared-core-modules.esm.js +507 -10
- package/dist/declarations/src/core-modules/automations/conditionals.d.ts +59 -0
- package/dist/declarations/src/core-modules/automations/conditionals.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/automations/definitions/executions.d.ts +10 -0
- package/dist/declarations/src/core-modules/automations/definitions/executions.d.ts.map +1 -1
- package/dist/declarations/src/core-modules/automations/index.d.ts +1 -0
- package/dist/declarations/src/core-modules/automations/index.d.ts.map +1 -1
- package/dist/declarations/src/core-modules/automations/zodTypes.d.ts +40 -0
- package/dist/declarations/src/core-modules/automations/zodTypes.d.ts.map +1 -1
- package/dist/declarations/src/core-modules/common/eventHandlers/createEventHandlers.d.ts.map +1 -1
- package/dist/declarations/src/core-modules/segments/joinChanges.d.ts +5 -1
- package/dist/declarations/src/core-modules/segments/joinChanges.d.ts.map +1 -1
- package/dist/{start-plugin-a2f6eca9.esm.js → start-plugin-2b3e89f5.esm.js} +73 -59
- package/dist/{start-plugin-b095acca.cjs.prod.js → start-plugin-46baacee.cjs.prod.js} +73 -58
- package/dist/{start-plugin-7dc096bc.cjs.dev.js → start-plugin-6687b329.cjs.dev.js} +73 -58
- package/package.json +1 -1
- package/src/core-modules/automations/conditionals.test.ts +302 -0
- package/src/core-modules/automations/conditionals.ts +403 -0
- package/src/core-modules/automations/definitions/executions.ts +3 -0
- package/src/core-modules/automations/index.ts +1 -0
- package/src/core-modules/automations/zodTypes.ts +1 -0
- package/src/core-modules/common/eventHandlers/createEventHandlers.ts +20 -2
- package/src/core-modules/segments/joinChanges.test.ts +62 -0
- package/src/core-modules/segments/joinChanges.ts +26 -11
- package/utils/dist/erxes-api-shared-utils.cjs.dev.js +1 -1
- package/utils/dist/erxes-api-shared-utils.cjs.prod.js +1 -1
- package/utils/dist/erxes-api-shared-utils.esm.js +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as _asyncToGenerator, a as _regeneratorRuntime, x as _toConsumableArray, c9 as isSameRecordReferenceType, i as _objectSpread2, k as _createForOfIteratorHelper, ca as normalizeRecordReferenceTypes, cb as normalizeRecordReferenceExtensions, b6 as getPlugin, b1 as getPlugins, cc as propertyDataPath, cd as toPropertyRowKey, ce as getLocalRecordReferenceType, cf as getRecordReferencePluginName, cg as _typeof, h as _slicedToArray, ch as resolveRecordReferenceValue, ci as _toArray, cj as AUTOMATION_ERROR_CODES, s as sendWorkerQueue, ap as redis, p as sendTRPCMessage,
|
|
2
|
-
export {
|
|
1
|
+
import { _ as _asyncToGenerator, a as _regeneratorRuntime, x as _toConsumableArray, c9 as isSameRecordReferenceType, i as _objectSpread2, k as _createForOfIteratorHelper, ca as normalizeRecordReferenceTypes, cb as normalizeRecordReferenceExtensions, b6 as getPlugin, b1 as getPlugins, cc as propertyDataPath, cd as toPropertyRowKey, ce as getLocalRecordReferenceType, cf as getRecordReferencePluginName, cg as _typeof, h as _slicedToArray, ch as resolveRecordReferenceValue, ci as _toArray, cj as AUTOMATION_ERROR_CODES, s as sendWorkerQueue, ck as _objectWithoutProperties, cl as _toPropertyKey, cm as replaceOutputPlaceholders, ap as redis, p as sendTRPCMessage, cn as SEGMENT_MEMBERSHIP_FIELD, co as parsePropertyDataKey, cp as toPropertyGroupKey, cq as walkSegmentNodes, cr as segmentFieldRef, cs as segmentReferenceRef, ct as segmentRelationRef, cu as DEFAULT_SEGMENT_TIME_ZONE, cv as normalizeSegmentOperator, cw as SegmentOperator, cx as PERIOD_OPERATORS, cy as zonedPeriodRange, cz as shiftZonedDays, cA as zonedDate, cB as isAnniversary, w as _defineProperty, cC as compileSegmentMongoFilter, g as getEnv, cD as gatherSegmentRelations, bu as escapeRegExp, cE as mergePropertyRowConditions, cF as parsePropertyColumnKey, cG as isPropertyGroupKey, cH as propertyGroupIdFromKey, cI as toPropertyRowColumnKey, cJ as PROPERTIES_DATA, cK as logActivityLogError, cL as matchesFieldPattern$1, cM as findResolver, cN as getSnapshot, cO as detectAssignmentDelta, c2 as ExpectedError, m as _createClass, n as _classCallCheck } from '../../dist/start-plugin-2b3e89f5.esm.js';
|
|
2
|
+
export { fE as APPROVAL_APPROVER_SCOPES, fI as APPROVAL_DECISIONS, fD as APPROVAL_LOCK_STATUSES, fF as APPROVAL_MODES, fK as APPROVAL_NOTIFICATION_ACTIONS, fJ as APPROVAL_NOTIFICATION_CONTENT_TYPE, fH as APPROVAL_REQUEST_KINDS, fG as APPROVAL_REQUEST_STATUSES, dD as AUTOMATION_CORE_ACTIONS, dI as AUTOMATION_CORE_ACTION_DEFERRED, dE as AUTOMATION_CORE_TRIGGER_TYPES, dJ as AUTOMATION_DEFERRED_TIMEOUT, dG as AUTOMATION_EMAIL_RECIPIENTS_TYPES, cj as AUTOMATION_ERROR_CODES, dR as AUTOMATION_EXECUTION_STATUS, dH as AUTOMATION_NON_DEFERRABLE_CORE_ACTIONS, dX as AUTOMATION_OUTPUT_ITEM_COUNT, dA as AUTOMATION_PROPERTY_OPERATORS, dC as AUTOMATION_STATUSES, ge as AUTO_MATCH_CONFIDENCE, f3 as ApplyMembershipInput, e7 as AutomationActionInput, e4 as AutomationBaseInput, e5 as AutomationExecActionInput, e6 as AutomationExecutionInput, dL as BROADCAST_TARGET_TYPE, dK as BROADCAST_TRIGGER_TYPE, g5 as BatchSkipRowInput, d3 as COMPANY_BUSINESS_TYPES, d5 as COMPANY_INDUSTRY_TYPES, df as CUSTOMER_SELECT_OPTIONS, eh as CheckCustomTriggerInput, ea as CheckCustomTriggerInputData, f2 as CountSegmentMembersInput, d4 as DEFAULT_COMPANY_INDUSTRY_TYPES, da as DEFAULT_CONSTANT_VALUES, cu as DEFAULT_SEGMENT_TIME_ZONE, eS as DEFAULT_SEGMENT_VALUE_FIELD, d8 as DEFAULT_SEX_CHOICES, d6 as DEFAULT_SOCIAL_LINKS, fn as EMAIL_LANES, fq as EMAIL_RAMP_ID, dN as EXECUTE_WAIT_TYPES, f0 as EvaluateFieldsInput, ei as FindObjectInput, eb as FindObjectInputData, el as GenerateAiContextInput, ee as GenerateAiContextInputData, g6 as GetExportDataInput, g4 as GetExportHeadersInput, g8 as GetImportHeadersInput, g9 as GetImportHeadersOutput, di as INPUT_TYPE, g3 as InsertImportRowsInput, g0 as InsertImportRowsInputSchema, g7 as InsertImportRowsOutput, f1 as ListSegmentMembersInput, em as LoadAiKnowledgeDocumentBatchInput, ef as LoadAiKnowledgeDocumentBatchInputData, en as LookupAiToolInput, eg as LookupAiToolInputData, cx as PERIOD_OPERATORS, cJ as PROPERTIES_DATA, f6 as PROPERTY_ANY_ROW_KEY_SEP, f4 as PROPERTY_GROUP_KEY_PREFIX, fb as PROPERTY_ROW_INDEX_SEP, f5 as PROPERTY_ROW_KEY_SEP, fe as PropertyValueUsageInput, e9 as ReceiveActionsInput, e8 as ReceiveActionsInputData, ej as ResolveOutputPathsInput, ec as ResolveOutputPathsInputData, ev as SEGMENT_BOOLEAN_OPERATORS, eu as SEGMENT_DATE_OPERATORS, es as SEGMENT_ID_OPERATORS, eX as SEGMENT_IMPLICIT_OPERATORS, cn as SEGMENT_MEMBERSHIP_FIELD, et as SEGMENT_NUMBER_OPERATORS, eW as SEGMENT_OPERATOR_SPECS, eA as SEGMENT_QUEUES, er as SEGMENT_TEXT_OPERATORS, d9 as SEX_OPTIONS, d7 as SOCIAL_LINKS, dB as STATIC_PLACEHOLDER, d2 as STATUSES, dd as STRUCTURE_STATUSES, gf as SUGGEST_CONFIDENCE, e$ as SegmentBaseInput, ew as SegmentField, e_ as SegmentNodeSchema, cw as SegmentOperator, ek as SetPropertiesInput, ed as SetPropertiesInputData, fL as TApprovalChangeProducers, dP as TAutomationActionFolks, dF as TAutomationFindObjectType, dO as TAutomationProducers, g1 as TImportExportProducers, fd as TPropertyProducers, eZ as TSegmentProducers, fg as UNKNOWN_VALUE_COUNTS, ff as UNKNOWN_VALUE_SAMPLES, dh as USER_EXPORT_EXTENDED_FIELDS, dg as USER_EXTENDED_FIELDS, de as USER_MOVEMENT_STATUSES, dc as USER_PROPERTIES_INFO, db as USER_ROLES, fZ as USER_TYPES, fm as activityLogsSchema, dT as aiAgentSchema, eO as anniversaryRanges, dr as appSchema, fQ as approvalChangeApplyInputSchema, fy as approvalChangePluginName, fM as approvalLockCheckInputSchema, fO as approvalLockCreateInputSchema, fN as approvalLockStatesInputSchema, fP as approvalRequestCreateInputSchema, dl as attachmentSchema, dS as automationExecutionSchema, dQ as automationSchema, e3 as buildRuntimeOutputsIndex, ds as buildSetPropertyModifier, cX as canGroup, cT as checkLogin, c_ as checkPermissionGroup, cW as clearGroupActionsCache, fR as clientPortalSchema, eQ as collectSegmentReferences, eP as collectSegmentValueRefs, f_ as commentSchema, cC as compileSegmentMongoFilter, gj as countCsvDataRows, fS as cpNotificationConfigUserSchema, f$ as cpNotificationSchema, fU as cpNotificationSettingsSchema, fT as cpTwoFactor, fY as cpUserSchema, dn as createEventHandlers, f as createScopedEventHandlers, dj as customFieldSchema, cO as detectAssignmentDelta, fo as emailAddressSchema, fp as emailDeliverySchema, fr as emailRampSchema, fs as emailSenderSchema, fX as fcmDeviceSchema, f8 as fieldIdFromPropertyDataPath, cM as findResolver, eI as gatherSegmentEventTypes, eK as gatherSegmentFieldSources, eL as gatherSegmentJoinPaths, eJ as gatherSegmentRecordTypes, cD as gatherSegmentRelations, dq as generateEventHandlersFromRequest, e0 as getAutomationNodeType, dv as getContentType, cV as getGroupActionsMap, ga as getImportExportJobOptions, dw as getModuleName, dx as getPluginName, dt as getSetPropertySelector, cN as getSnapshot, dM as getTriggerTargetType, dW as getValueByPath, cY as hasDeclaredOAuthScopes, eR as hasSegmentReferenceInRelation, fC as initApproval, fc as initPropertyProducers, dm as initRecordReferences, eY as initSegmentProducers, cB as isAnniversary, eN as isLeapYear, f7 as isPropertyDataPath, cG as isPropertyGroupKey, dY as isReEnrollableTrigger, dZ as isReEnrollingTrigger, fA as localApprovalChangeType, cK as logActivityLogError, gc as logImportExportEvent, fl as logsSchema, dV as matchAutomationResolverKey, gh as matchImportHeaders, cL as matchesFieldPattern, fj as measurePropertyValueCounts, fi as measurePropertyValueSamples, fk as measurePropertyValueUsage, cE as mergePropertyRowConditions, fz as normalizeApprovalChangeType, fB as normalizeApprovalConfig, e2 as normalizeAutomationConstantsForTransport, gg as normalizeHeader, cv as normalizeSegmentOperator, ft as notificationSchema, fu as notificationSettingsSchema, fv as notificationZTypeSchema, cF as parsePropertyColumnKey, co as parsePropertyDataKey, cP as permissionGroupSchema, cR as permissionSchema, gi as processCSVStream, f9 as propertyDataExistsFilter, cc as propertyDataPath, fa as propertyDataRegexFilter, cH as propertyGroupIdFromKey, fV as refreshTokenSchema, cm as replaceOutputPlaceholders, cZ as resolveActionOAuthScopes, d_ as resolveAutomationActionInputs, dU as resolveFromSourceField, d$ as resolveOutputPathsByNodeType, ch as resolveRecordReferenceValue, eU as resolveSegmentFieldDependencies, eT as resolveSegmentFieldOperators, eV as resolveSegmentValueField, cS as roleSchema, dk as ruleSchema, gd as safeCleanup, eC as scheduleSegmentReconcile, ey as segmentDependencies, ex as segmentDependencyKey, ez as segmentDependsOnClock, cr as segmentFieldRef, eH as segmentJoinChanges, eB as segmentQueueFor, cs as segmentReferenceRef, ct as segmentRelationRef, eq as sendAutomationDeferredCompletion, ep as sendAutomationRun, eo as sendAutomationTrigger, fw as sendNotification, fx as sendNotificationChannels, eD as sendSegmentChanged, eG as sendSegmentForget, eF as sendSegmentRebuild, eE as sendSegmentReconcile, dp as setEventHandlerRuntimeContext, du as setProperty, cz as shiftZonedDays, fW as socialAuthProviderSchema, dy as splitType, dz as startAutomations, g2 as startImportExportWorker, cp as toPropertyGroupKey, cI as toPropertyRowColumnKey, cd as toPropertyRowKey, gb as toTerminalImportExportError, e1 as toTransportOutput, fh as unknownValueUsage, cQ as userGroupSchema, d1 as userMovemmentSchema, d0 as userSchema, cq as walkSegmentNodes, cU as wrapPermission, c$ as wrapPublicResolver, cA as zonedDate, eM as zonedDayStart, cy as zonedPeriodRange } from '../../dist/start-plugin-2b3e89f5.esm.js';
|
|
3
3
|
import dayjs from 'dayjs';
|
|
4
4
|
import 'node-fetch';
|
|
5
5
|
import { nanoid } from 'nanoid';
|
|
@@ -516,7 +516,7 @@ var AUTOMATION_RETRY_LIMITS = {
|
|
|
516
516
|
MIN_DELAY_SECONDS: 5,
|
|
517
517
|
MAX_DELAY_SECONDS: 3600
|
|
518
518
|
};
|
|
519
|
-
var isRecord$
|
|
519
|
+
var isRecord$2 = function isRecord(value) {
|
|
520
520
|
return _typeof(value) === 'object' && value !== null;
|
|
521
521
|
};
|
|
522
522
|
var asActionId = function asActionId(value) {
|
|
@@ -539,8 +539,8 @@ var isBackoff = function isBackoff(value) {
|
|
|
539
539
|
* never park an execution for longer than the ceiling allows.
|
|
540
540
|
*/
|
|
541
541
|
var resolveActionErrorPolicy = function resolveActionErrorPolicy(config) {
|
|
542
|
-
var policy = isRecord$
|
|
543
|
-
var retry = isRecord$
|
|
542
|
+
var policy = isRecord$2(config) && isRecord$2(config.errorPolicy) ? config.errorPolicy : {};
|
|
543
|
+
var retry = isRecord$2(policy.retry) ? policy.retry : {};
|
|
544
544
|
var MAX_ATTEMPTS = AUTOMATION_RETRY_LIMITS.MAX_ATTEMPTS,
|
|
545
545
|
DEFAULT_DELAY_SECONDS = AUTOMATION_RETRY_LIMITS.DEFAULT_DELAY_SECONDS,
|
|
546
546
|
MIN_DELAY_SECONDS = AUTOMATION_RETRY_LIMITS.MIN_DELAY_SECONDS,
|
|
@@ -558,7 +558,7 @@ var resolveActionErrorPolicy = function resolveActionErrorPolicy(config) {
|
|
|
558
558
|
* the plain `nextActionId` is only read while the policy is off.
|
|
559
559
|
*/
|
|
560
560
|
var resolveActionBranchTarget = function resolveActionBranchTarget(action, outcome) {
|
|
561
|
-
var config = isRecord$
|
|
561
|
+
var config = isRecord$2(action === null || action === void 0 ? void 0 : action.config) ? action.config : {};
|
|
562
562
|
var branching = resolveActionErrorPolicy(config).onError === AUTOMATION_ERROR_BEHAVIOURS.BRANCH;
|
|
563
563
|
if (!branching) {
|
|
564
564
|
return outcome === 'success' ? action === null || action === void 0 ? void 0 : action.nextActionId : undefined;
|
|
@@ -610,7 +610,7 @@ var buildFailedAction = function buildFailedAction(message, code, result) {
|
|
|
610
610
|
result: result
|
|
611
611
|
};
|
|
612
612
|
};
|
|
613
|
-
var isRecord = function isRecord(value) {
|
|
613
|
+
var isRecord$1 = function isRecord(value) {
|
|
614
614
|
return _typeof(value) === 'object' && value !== null;
|
|
615
615
|
};
|
|
616
616
|
var isDeclaredStatus = function isDeclaredStatus(value) {
|
|
@@ -619,7 +619,7 @@ var isDeclaredStatus = function isDeclaredStatus(value) {
|
|
|
619
619
|
|
|
620
620
|
/** For callers that forward an action's answer without reading it. */
|
|
621
621
|
var isActionOutcomeEnvelope = function isActionOutcomeEnvelope(value) {
|
|
622
|
-
return isRecord(value) && isRecord(value.outcome) && isDeclaredStatus(value.outcome.status);
|
|
622
|
+
return isRecord$1(value) && isRecord$1(value.outcome) && isDeclaredStatus(value.outcome.status);
|
|
623
623
|
};
|
|
624
624
|
var asString = function asString(value) {
|
|
625
625
|
return typeof value === 'string' && value.trim() ? value.trim() : undefined;
|
|
@@ -634,7 +634,7 @@ var resolveActionOutcome = function resolveActionOutcome(actionResponse) {
|
|
|
634
634
|
status: AUTOMATION_ACTION_OUTCOMES.SUCCESS,
|
|
635
635
|
result: actionResponse
|
|
636
636
|
};
|
|
637
|
-
if (!isRecord(actionResponse) || !isRecord(actionResponse.outcome)) {
|
|
637
|
+
if (!isRecord$1(actionResponse) || !isRecord$1(actionResponse.outcome)) {
|
|
638
638
|
return asSuccess;
|
|
639
639
|
}
|
|
640
640
|
var outcome = actionResponse.outcome,
|
|
@@ -756,6 +756,503 @@ var reEnrollmentRelationPaths = function reEnrollmentRelationPaths() {
|
|
|
756
756
|
});
|
|
757
757
|
};
|
|
758
758
|
|
|
759
|
+
/**
|
|
760
|
+
* A field whose value depends on the run holds a token instead of a value;
|
|
761
|
+
* the rules behind it live in the action config under this key. The engine
|
|
762
|
+
* swaps tokens for the first matching row before the action ever sees its
|
|
763
|
+
* config, so no action has to know conditionals exist.
|
|
764
|
+
*/
|
|
765
|
+
var AUTOMATION_CONDITIONALS_KEY = '_conditionals';
|
|
766
|
+
var CONDITIONAL_TOKEN_REGEX = /^<<\s*cond:([A-Za-z0-9_-]+)\s*>>$/;
|
|
767
|
+
var formatConditionalToken = function formatConditionalToken(id) {
|
|
768
|
+
return "<< cond:".concat(id, " >>");
|
|
769
|
+
};
|
|
770
|
+
|
|
771
|
+
// The whole value must be the token, so text that merely mentions one is left alone
|
|
772
|
+
var parseConditionalToken = function parseConditionalToken(value) {
|
|
773
|
+
if (typeof value !== 'string') {
|
|
774
|
+
return null;
|
|
775
|
+
}
|
|
776
|
+
var match = value.match(CONDITIONAL_TOKEN_REGEX);
|
|
777
|
+
return match ? match[1] : null;
|
|
778
|
+
};
|
|
779
|
+
// Operators that test presence or truth and take no right-hand value
|
|
780
|
+
var AUTOMATION_UNARY_OPERATORS = ['is', 'ins', 'dateis', 'dateins', 'it', 'if'];
|
|
781
|
+
var isEmptyValue = function isEmptyValue(value) {
|
|
782
|
+
return value === undefined || value === null || value === '' || Array.isArray(value) && !value.length;
|
|
783
|
+
};
|
|
784
|
+
var normalizeDate = function normalizeDate(value) {
|
|
785
|
+
var date = value instanceof Date ? value : new Date(value);
|
|
786
|
+
return Number.isNaN(date.getTime()) ? null : date.getTime();
|
|
787
|
+
};
|
|
788
|
+
var compareDates = function compareDates(actual, expected, compare) {
|
|
789
|
+
var actualDate = normalizeDate(actual);
|
|
790
|
+
var expectedDate = normalizeDate(expected);
|
|
791
|
+
return actualDate !== null && expectedDate !== null ? compare(actualDate, expectedDate) : false;
|
|
792
|
+
};
|
|
793
|
+
|
|
794
|
+
/** Split and conditional values share one meaning per operator. */
|
|
795
|
+
var isAutomationConditionMatched = function isAutomationConditionMatched(actualValue, operator, expectedValue) {
|
|
796
|
+
switch (operator) {
|
|
797
|
+
case 'e':
|
|
798
|
+
return actualValue === expectedValue;
|
|
799
|
+
case 'numbere':
|
|
800
|
+
return Number(actualValue) === Number(expectedValue);
|
|
801
|
+
case 'dne':
|
|
802
|
+
return actualValue !== expectedValue;
|
|
803
|
+
case 'numberdne':
|
|
804
|
+
return Number(actualValue) !== Number(expectedValue);
|
|
805
|
+
case 'c':
|
|
806
|
+
return String(actualValue || '').toLowerCase().includes(String(expectedValue || '').toLowerCase());
|
|
807
|
+
case 'dnc':
|
|
808
|
+
return !String(actualValue || '').toLowerCase().includes(String(expectedValue || '').toLowerCase());
|
|
809
|
+
case 'it':
|
|
810
|
+
return actualValue === true;
|
|
811
|
+
case 'if':
|
|
812
|
+
return actualValue === false;
|
|
813
|
+
case 'is':
|
|
814
|
+
case 'dateis':
|
|
815
|
+
return !isEmptyValue(actualValue);
|
|
816
|
+
case 'ins':
|
|
817
|
+
case 'dateins':
|
|
818
|
+
return isEmptyValue(actualValue);
|
|
819
|
+
case 'numberigt':
|
|
820
|
+
return Number(actualValue) >= Number(expectedValue);
|
|
821
|
+
case 'numberilt':
|
|
822
|
+
return Number(actualValue) <= Number(expectedValue);
|
|
823
|
+
case 'dateigt':
|
|
824
|
+
return compareDates(actualValue, expectedValue, function (a, b) {
|
|
825
|
+
return a >= b;
|
|
826
|
+
});
|
|
827
|
+
case 'dateilt':
|
|
828
|
+
return compareDates(actualValue, expectedValue, function (a, b) {
|
|
829
|
+
return a <= b;
|
|
830
|
+
});
|
|
831
|
+
default:
|
|
832
|
+
return false;
|
|
833
|
+
}
|
|
834
|
+
};
|
|
835
|
+
|
|
836
|
+
/** Problems that keep a conditional from running; empty when it can. */
|
|
837
|
+
var validateAutomationConditional = function validateAutomationConditional(conditional) {
|
|
838
|
+
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
839
|
+
_ref$requiredKeys = _ref.requiredKeys,
|
|
840
|
+
requiredKeys = _ref$requiredKeys === void 0 ? [] : _ref$requiredKeys;
|
|
841
|
+
var errors = [];
|
|
842
|
+
if (!conditional.rows.length) {
|
|
843
|
+
errors.push('Add at least one condition row');
|
|
844
|
+
}
|
|
845
|
+
conditional.rows.forEach(function (row, rowIndex) {
|
|
846
|
+
var at = "Row ".concat(rowIndex + 1);
|
|
847
|
+
if (!row.conditions.length) {
|
|
848
|
+
errors.push("".concat(at, ": add at least one condition"));
|
|
849
|
+
}
|
|
850
|
+
row.conditions.forEach(function (condition, conditionIndex) {
|
|
851
|
+
var _condition$left;
|
|
852
|
+
var where = "".concat(at, ", condition ").concat(conditionIndex + 1);
|
|
853
|
+
if (condition.kind === 'segment') {
|
|
854
|
+
if (!condition.segmentId) {
|
|
855
|
+
errors.push("".concat(where, ": pick a segment"));
|
|
856
|
+
}
|
|
857
|
+
return;
|
|
858
|
+
}
|
|
859
|
+
if (!((_condition$left = condition.left) !== null && _condition$left !== void 0 && _condition$left.trim())) {
|
|
860
|
+
errors.push("".concat(where, ": pick a value to check"));
|
|
861
|
+
}
|
|
862
|
+
if (!condition.operator) {
|
|
863
|
+
errors.push("".concat(where, ": pick an operator"));
|
|
864
|
+
} else if (!AUTOMATION_UNARY_OPERATORS.includes(condition.operator) && isEmptyValue(condition.right)) {
|
|
865
|
+
errors.push("".concat(where, ": enter a value to compare with"));
|
|
866
|
+
}
|
|
867
|
+
});
|
|
868
|
+
var _iterator = _createForOfIteratorHelper(conditional.keys),
|
|
869
|
+
_step;
|
|
870
|
+
try {
|
|
871
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
872
|
+
var _row$values;
|
|
873
|
+
var key = _step.value;
|
|
874
|
+
if (isEmptyValue((_row$values = row.values) === null || _row$values === void 0 ? void 0 : _row$values[key])) {
|
|
875
|
+
errors.push("".concat(at, ": set a value"));
|
|
876
|
+
break;
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
} catch (err) {
|
|
880
|
+
_iterator.e(err);
|
|
881
|
+
} finally {
|
|
882
|
+
_iterator.f();
|
|
883
|
+
}
|
|
884
|
+
});
|
|
885
|
+
var _iterator2 = _createForOfIteratorHelper(requiredKeys),
|
|
886
|
+
_step2;
|
|
887
|
+
try {
|
|
888
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
889
|
+
var _conditional$otherwis;
|
|
890
|
+
var key = _step2.value;
|
|
891
|
+
if (isEmptyValue((_conditional$otherwis = conditional.otherwise) === null || _conditional$otherwis === void 0 ? void 0 : _conditional$otherwis[key])) {
|
|
892
|
+
errors.push('Otherwise: set a value');
|
|
893
|
+
break;
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
} catch (err) {
|
|
897
|
+
_iterator2.e(err);
|
|
898
|
+
} finally {
|
|
899
|
+
_iterator2.f();
|
|
900
|
+
}
|
|
901
|
+
return errors;
|
|
902
|
+
};
|
|
903
|
+
var conditionCacheKey = function conditionCacheKey(condition) {
|
|
904
|
+
var _condition$right;
|
|
905
|
+
return condition.kind === 'segment' ? "segment|".concat(condition.segmentId) : "value|".concat(condition.left, "|").concat(condition.operator, "|").concat((_condition$right = condition.right) !== null && _condition$right !== void 0 ? _condition$right : '');
|
|
906
|
+
};
|
|
907
|
+
// One answer per distinct condition for the whole action, however many
|
|
908
|
+
// fields repeat it
|
|
909
|
+
var createConditionEvaluator = function createConditionEvaluator(_ref2) {
|
|
910
|
+
var subdomain = _ref2.subdomain,
|
|
911
|
+
execution = _ref2.execution,
|
|
912
|
+
isInSegment = _ref2.isInSegment;
|
|
913
|
+
var answers = new Map();
|
|
914
|
+
var evaluate = /*#__PURE__*/function () {
|
|
915
|
+
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(condition) {
|
|
916
|
+
var _condition$right2;
|
|
917
|
+
var resolved;
|
|
918
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
919
|
+
while (1) switch (_context.prev = _context.next) {
|
|
920
|
+
case 0:
|
|
921
|
+
if (!(condition.kind === 'segment')) {
|
|
922
|
+
_context.next = 2;
|
|
923
|
+
break;
|
|
924
|
+
}
|
|
925
|
+
return _context.abrupt("return", isInSegment(condition.segmentId));
|
|
926
|
+
case 2:
|
|
927
|
+
_context.next = 4;
|
|
928
|
+
return replaceOutputPlaceholders({
|
|
929
|
+
subdomain: subdomain,
|
|
930
|
+
execution: execution,
|
|
931
|
+
values: {
|
|
932
|
+
left: condition.left,
|
|
933
|
+
right: (_condition$right2 = condition.right) !== null && _condition$right2 !== void 0 ? _condition$right2 : ''
|
|
934
|
+
},
|
|
935
|
+
defaultValue: '',
|
|
936
|
+
keepUnresolvedPlaceholders: false
|
|
937
|
+
});
|
|
938
|
+
case 4:
|
|
939
|
+
resolved = _context.sent;
|
|
940
|
+
return _context.abrupt("return", isAutomationConditionMatched(resolved.left, condition.operator, resolved.right));
|
|
941
|
+
case 6:
|
|
942
|
+
case "end":
|
|
943
|
+
return _context.stop();
|
|
944
|
+
}
|
|
945
|
+
}, _callee);
|
|
946
|
+
}));
|
|
947
|
+
return function evaluate(_x) {
|
|
948
|
+
return _ref3.apply(this, arguments);
|
|
949
|
+
};
|
|
950
|
+
}();
|
|
951
|
+
return function (condition) {
|
|
952
|
+
var key = conditionCacheKey(condition);
|
|
953
|
+
if (!answers.has(key)) {
|
|
954
|
+
answers.set(key, evaluate(condition));
|
|
955
|
+
}
|
|
956
|
+
return answers.get(key);
|
|
957
|
+
};
|
|
958
|
+
};
|
|
959
|
+
var isRowMatched = /*#__PURE__*/function () {
|
|
960
|
+
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(row, evaluate) {
|
|
961
|
+
var _iterator3, _step3, _condition, _iterator4, _step4, _condition2;
|
|
962
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
963
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
964
|
+
case 0:
|
|
965
|
+
if (row.conditions.length) {
|
|
966
|
+
_context2.next = 2;
|
|
967
|
+
break;
|
|
968
|
+
}
|
|
969
|
+
return _context2.abrupt("return", false);
|
|
970
|
+
case 2:
|
|
971
|
+
if (!(row.conjunction === 'or')) {
|
|
972
|
+
_context2.next = 23;
|
|
973
|
+
break;
|
|
974
|
+
}
|
|
975
|
+
_iterator3 = _createForOfIteratorHelper(row.conditions);
|
|
976
|
+
_context2.prev = 4;
|
|
977
|
+
_iterator3.s();
|
|
978
|
+
case 6:
|
|
979
|
+
if ((_step3 = _iterator3.n()).done) {
|
|
980
|
+
_context2.next = 14;
|
|
981
|
+
break;
|
|
982
|
+
}
|
|
983
|
+
_condition = _step3.value;
|
|
984
|
+
_context2.next = 10;
|
|
985
|
+
return evaluate(_condition);
|
|
986
|
+
case 10:
|
|
987
|
+
if (!_context2.sent) {
|
|
988
|
+
_context2.next = 12;
|
|
989
|
+
break;
|
|
990
|
+
}
|
|
991
|
+
return _context2.abrupt("return", true);
|
|
992
|
+
case 12:
|
|
993
|
+
_context2.next = 6;
|
|
994
|
+
break;
|
|
995
|
+
case 14:
|
|
996
|
+
_context2.next = 19;
|
|
997
|
+
break;
|
|
998
|
+
case 16:
|
|
999
|
+
_context2.prev = 16;
|
|
1000
|
+
_context2.t0 = _context2["catch"](4);
|
|
1001
|
+
_iterator3.e(_context2.t0);
|
|
1002
|
+
case 19:
|
|
1003
|
+
_context2.prev = 19;
|
|
1004
|
+
_iterator3.f();
|
|
1005
|
+
return _context2.finish(19);
|
|
1006
|
+
case 22:
|
|
1007
|
+
return _context2.abrupt("return", false);
|
|
1008
|
+
case 23:
|
|
1009
|
+
_iterator4 = _createForOfIteratorHelper(row.conditions);
|
|
1010
|
+
_context2.prev = 24;
|
|
1011
|
+
_iterator4.s();
|
|
1012
|
+
case 26:
|
|
1013
|
+
if ((_step4 = _iterator4.n()).done) {
|
|
1014
|
+
_context2.next = 34;
|
|
1015
|
+
break;
|
|
1016
|
+
}
|
|
1017
|
+
_condition2 = _step4.value;
|
|
1018
|
+
_context2.next = 30;
|
|
1019
|
+
return evaluate(_condition2);
|
|
1020
|
+
case 30:
|
|
1021
|
+
if (_context2.sent) {
|
|
1022
|
+
_context2.next = 32;
|
|
1023
|
+
break;
|
|
1024
|
+
}
|
|
1025
|
+
return _context2.abrupt("return", false);
|
|
1026
|
+
case 32:
|
|
1027
|
+
_context2.next = 26;
|
|
1028
|
+
break;
|
|
1029
|
+
case 34:
|
|
1030
|
+
_context2.next = 39;
|
|
1031
|
+
break;
|
|
1032
|
+
case 36:
|
|
1033
|
+
_context2.prev = 36;
|
|
1034
|
+
_context2.t1 = _context2["catch"](24);
|
|
1035
|
+
_iterator4.e(_context2.t1);
|
|
1036
|
+
case 39:
|
|
1037
|
+
_context2.prev = 39;
|
|
1038
|
+
_iterator4.f();
|
|
1039
|
+
return _context2.finish(39);
|
|
1040
|
+
case 42:
|
|
1041
|
+
return _context2.abrupt("return", true);
|
|
1042
|
+
case 43:
|
|
1043
|
+
case "end":
|
|
1044
|
+
return _context2.stop();
|
|
1045
|
+
}
|
|
1046
|
+
}, _callee2, null, [[4, 16, 19, 22], [24, 36, 39, 42]]);
|
|
1047
|
+
}));
|
|
1048
|
+
return function isRowMatched(_x2, _x3) {
|
|
1049
|
+
return _ref4.apply(this, arguments);
|
|
1050
|
+
};
|
|
1051
|
+
}();
|
|
1052
|
+
var isRecord = function isRecord(value) {
|
|
1053
|
+
return _typeof(value) === 'object' && value !== null && !Array.isArray(value);
|
|
1054
|
+
};
|
|
1055
|
+
|
|
1056
|
+
/**
|
|
1057
|
+
* Returns the config the action should run with: every token replaced by its
|
|
1058
|
+
* first matching row (or otherwise), the conditionals key removed, and which
|
|
1059
|
+
* row each conditional used. Tokens without a conditional are reported, never
|
|
1060
|
+
* passed through as text.
|
|
1061
|
+
*/
|
|
1062
|
+
var applyAutomationConditionals = /*#__PURE__*/function () {
|
|
1063
|
+
var _ref6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(_ref5) {
|
|
1064
|
+
var subdomain, execution, config, isInSegment, _ref7, rawConditionals, rest, conditionals, evaluate, matches, missing, chosenById, choose, _walk;
|
|
1065
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context6) {
|
|
1066
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
1067
|
+
case 0:
|
|
1068
|
+
subdomain = _ref5.subdomain, execution = _ref5.execution, config = _ref5.config, isInSegment = _ref5.isInSegment;
|
|
1069
|
+
_ref7 = config || {}, rawConditionals = _ref7[AUTOMATION_CONDITIONALS_KEY], rest = _objectWithoutProperties(_ref7, [AUTOMATION_CONDITIONALS_KEY].map(_toPropertyKey));
|
|
1070
|
+
conditionals = isRecord(rawConditionals) ? rawConditionals : {};
|
|
1071
|
+
evaluate = createConditionEvaluator({
|
|
1072
|
+
subdomain: subdomain,
|
|
1073
|
+
execution: execution,
|
|
1074
|
+
isInSegment: isInSegment
|
|
1075
|
+
});
|
|
1076
|
+
matches = {};
|
|
1077
|
+
missing = [];
|
|
1078
|
+
chosenById = new Map();
|
|
1079
|
+
choose = /*#__PURE__*/function () {
|
|
1080
|
+
var _ref8 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(id, conditional) {
|
|
1081
|
+
var chosen, _iterator5, _step5, row;
|
|
1082
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
1083
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
1084
|
+
case 0:
|
|
1085
|
+
if (chosenById.has(id)) {
|
|
1086
|
+
_context3.next = 24;
|
|
1087
|
+
break;
|
|
1088
|
+
}
|
|
1089
|
+
chosen = {
|
|
1090
|
+
rowId: 'otherwise',
|
|
1091
|
+
values: conditional.otherwise || {}
|
|
1092
|
+
};
|
|
1093
|
+
_iterator5 = _createForOfIteratorHelper(conditional.rows || []);
|
|
1094
|
+
_context3.prev = 3;
|
|
1095
|
+
_iterator5.s();
|
|
1096
|
+
case 5:
|
|
1097
|
+
if ((_step5 = _iterator5.n()).done) {
|
|
1098
|
+
_context3.next = 14;
|
|
1099
|
+
break;
|
|
1100
|
+
}
|
|
1101
|
+
row = _step5.value;
|
|
1102
|
+
_context3.next = 9;
|
|
1103
|
+
return isRowMatched(row, evaluate);
|
|
1104
|
+
case 9:
|
|
1105
|
+
if (!_context3.sent) {
|
|
1106
|
+
_context3.next = 12;
|
|
1107
|
+
break;
|
|
1108
|
+
}
|
|
1109
|
+
chosen = {
|
|
1110
|
+
rowId: row.id,
|
|
1111
|
+
values: row.values || {}
|
|
1112
|
+
};
|
|
1113
|
+
return _context3.abrupt("break", 14);
|
|
1114
|
+
case 12:
|
|
1115
|
+
_context3.next = 5;
|
|
1116
|
+
break;
|
|
1117
|
+
case 14:
|
|
1118
|
+
_context3.next = 19;
|
|
1119
|
+
break;
|
|
1120
|
+
case 16:
|
|
1121
|
+
_context3.prev = 16;
|
|
1122
|
+
_context3.t0 = _context3["catch"](3);
|
|
1123
|
+
_iterator5.e(_context3.t0);
|
|
1124
|
+
case 19:
|
|
1125
|
+
_context3.prev = 19;
|
|
1126
|
+
_iterator5.f();
|
|
1127
|
+
return _context3.finish(19);
|
|
1128
|
+
case 22:
|
|
1129
|
+
matches[id] = chosen.rowId;
|
|
1130
|
+
chosenById.set(id, _objectSpread2(_objectSpread2({}, conditional.otherwise || {}), chosen.values));
|
|
1131
|
+
case 24:
|
|
1132
|
+
return _context3.abrupt("return", chosenById.get(id));
|
|
1133
|
+
case 25:
|
|
1134
|
+
case "end":
|
|
1135
|
+
return _context3.stop();
|
|
1136
|
+
}
|
|
1137
|
+
}, _callee3, null, [[3, 16, 19, 22]]);
|
|
1138
|
+
}));
|
|
1139
|
+
return function choose(_x5, _x6) {
|
|
1140
|
+
return _ref8.apply(this, arguments);
|
|
1141
|
+
};
|
|
1142
|
+
}();
|
|
1143
|
+
_walk = /*#__PURE__*/function () {
|
|
1144
|
+
var _ref9 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(node) {
|
|
1145
|
+
var next, patches, _loop, _ret, _i, _Object$entries;
|
|
1146
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context5) {
|
|
1147
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
1148
|
+
case 0:
|
|
1149
|
+
if (!Array.isArray(node)) {
|
|
1150
|
+
_context5.next = 2;
|
|
1151
|
+
break;
|
|
1152
|
+
}
|
|
1153
|
+
return _context5.abrupt("return", Promise.all(node.map(_walk)));
|
|
1154
|
+
case 2:
|
|
1155
|
+
if (isRecord(node)) {
|
|
1156
|
+
_context5.next = 4;
|
|
1157
|
+
break;
|
|
1158
|
+
}
|
|
1159
|
+
return _context5.abrupt("return", node);
|
|
1160
|
+
case 4:
|
|
1161
|
+
next = {};
|
|
1162
|
+
patches = [];
|
|
1163
|
+
_loop = /*#__PURE__*/_regeneratorRuntime().mark(function _loop() {
|
|
1164
|
+
var _conditional$keys;
|
|
1165
|
+
var _Object$entries$_i, key, value, id, conditional, chosen, keys;
|
|
1166
|
+
return _regeneratorRuntime().wrap(function _loop$(_context4) {
|
|
1167
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
1168
|
+
case 0:
|
|
1169
|
+
_Object$entries$_i = _slicedToArray(_Object$entries[_i], 2), key = _Object$entries$_i[0], value = _Object$entries$_i[1];
|
|
1170
|
+
id = parseConditionalToken(value);
|
|
1171
|
+
if (id) {
|
|
1172
|
+
_context4.next = 7;
|
|
1173
|
+
break;
|
|
1174
|
+
}
|
|
1175
|
+
_context4.next = 5;
|
|
1176
|
+
return _walk(value);
|
|
1177
|
+
case 5:
|
|
1178
|
+
next[key] = _context4.sent;
|
|
1179
|
+
return _context4.abrupt("return", 0);
|
|
1180
|
+
case 7:
|
|
1181
|
+
conditional = conditionals[id];
|
|
1182
|
+
if (conditional) {
|
|
1183
|
+
_context4.next = 12;
|
|
1184
|
+
break;
|
|
1185
|
+
}
|
|
1186
|
+
missing.push(id);
|
|
1187
|
+
next[key] = '';
|
|
1188
|
+
return _context4.abrupt("return", 0);
|
|
1189
|
+
case 12:
|
|
1190
|
+
_context4.next = 14;
|
|
1191
|
+
return choose(id, conditional);
|
|
1192
|
+
case 14:
|
|
1193
|
+
chosen = _context4.sent;
|
|
1194
|
+
keys = (_conditional$keys = conditional.keys) !== null && _conditional$keys !== void 0 && _conditional$keys.length ? conditional.keys : [key];
|
|
1195
|
+
patches.push(Object.fromEntries(keys.map(function (patchKey) {
|
|
1196
|
+
return [patchKey, chosen[patchKey]];
|
|
1197
|
+
})));
|
|
1198
|
+
case 17:
|
|
1199
|
+
case "end":
|
|
1200
|
+
return _context4.stop();
|
|
1201
|
+
}
|
|
1202
|
+
}, _loop);
|
|
1203
|
+
});
|
|
1204
|
+
_i = 0, _Object$entries = Object.entries(node);
|
|
1205
|
+
case 8:
|
|
1206
|
+
if (!(_i < _Object$entries.length)) {
|
|
1207
|
+
_context5.next = 16;
|
|
1208
|
+
break;
|
|
1209
|
+
}
|
|
1210
|
+
return _context5.delegateYield(_loop(), "t0", 10);
|
|
1211
|
+
case 10:
|
|
1212
|
+
_ret = _context5.t0;
|
|
1213
|
+
if (!(_ret === 0)) {
|
|
1214
|
+
_context5.next = 13;
|
|
1215
|
+
break;
|
|
1216
|
+
}
|
|
1217
|
+
return _context5.abrupt("continue", 13);
|
|
1218
|
+
case 13:
|
|
1219
|
+
_i++;
|
|
1220
|
+
_context5.next = 8;
|
|
1221
|
+
break;
|
|
1222
|
+
case 16:
|
|
1223
|
+
return _context5.abrupt("return", Object.assign.apply(Object, [next].concat(patches)));
|
|
1224
|
+
case 17:
|
|
1225
|
+
case "end":
|
|
1226
|
+
return _context5.stop();
|
|
1227
|
+
}
|
|
1228
|
+
}, _callee4);
|
|
1229
|
+
}));
|
|
1230
|
+
return function walk(_x7) {
|
|
1231
|
+
return _ref9.apply(this, arguments);
|
|
1232
|
+
};
|
|
1233
|
+
}();
|
|
1234
|
+
_context6.next = 11;
|
|
1235
|
+
return _walk(rest);
|
|
1236
|
+
case 11:
|
|
1237
|
+
_context6.t0 = _context6.sent;
|
|
1238
|
+
_context6.t1 = matches;
|
|
1239
|
+
_context6.t2 = missing;
|
|
1240
|
+
return _context6.abrupt("return", {
|
|
1241
|
+
config: _context6.t0,
|
|
1242
|
+
matches: _context6.t1,
|
|
1243
|
+
missing: _context6.t2
|
|
1244
|
+
});
|
|
1245
|
+
case 15:
|
|
1246
|
+
case "end":
|
|
1247
|
+
return _context6.stop();
|
|
1248
|
+
}
|
|
1249
|
+
}, _callee5);
|
|
1250
|
+
}));
|
|
1251
|
+
return function applyAutomationConditionals(_x4) {
|
|
1252
|
+
return _ref6.apply(this, arguments);
|
|
1253
|
+
};
|
|
1254
|
+
}();
|
|
1255
|
+
|
|
759
1256
|
var userActionsMap = /*#__PURE__*/function () {
|
|
760
1257
|
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(userPermissions, groupPermissions, user) {
|
|
761
1258
|
var totalPermissions, allowedActions, check, _iterator, _step, _step$value, requiredActions, allowed, action, _iterator2, _step2, actionName;
|
|
@@ -6295,4 +6792,4 @@ var TemplateManager = /*#__PURE__*/function () {
|
|
|
6295
6792
|
}]);
|
|
6296
6793
|
}();
|
|
6297
6794
|
|
|
6298
|
-
export { AUTOMATION_ACTION_OUTCOMES, AUTOMATION_BRANCH_KEYS, AUTOMATION_ERROR_BEHAVIOURS, AUTOMATION_RETRY_BACKOFFS, AUTOMATION_RETRY_LIMITS, AUTOMATION_RE_ENROLL_EVERY_TIME, AUTOMATION_RE_ENROLL_RELATION_PREFIX, AUTOMATION_SEGMENT_MEMBERSHIP_EVENT, AUTOMATION_SEGMENT_MEMBERSHIP_FOLKS, COLORS_DEFAULT, DEFAULT_SEGMENT_PAGE_SIZE, EMAIL_CONTENT_FORMATS, MAX_SEGMENT_PAGE_SIZE, MULTI_VALUE_PROPERTY_OPERATORS, PROPERTY_FILTER_OPERATORS, PROPERTY_FILTER_OPERATOR_BY_TYPE, TAfterProcessProducers, TemplateManager, actionRetryDelayMs, activityBuilder, appendUnsubscribeFooter, applySegmentMembership, assignmentRule, blocksToHtml, buildActivities, buildBranchAssignmentActivity, buildBulkActivities, buildDepartmentAssignmentActivity, buildExportCursorQuery, buildFailedAction, buildPermissionGroupAssignmentActivity, buildPositionAssignmentActivity, buildPropertyDataColumns, buildPropertyFilter, buildPropertyFilterConditions, buildSegmentEvaluationPlan, buildSkippedAction, _canonicalSegmentNode as canonicalSegmentNode, canonicalSegmentText, checkApprovalLock, collectPlaceholderPaths, collectPropertyDataFromColumns, createCoreModuleProducerHandler, createSegmentEvaluateFieldsHandler, _decideSegmentNode as decideSegmentNode, describeUnresolvedPlaceholders, documentPlaceholderResolver, emailHtmlWrapper, escapeHtml, evaluateOwnedSegmentFields, evaluateSegmentBatch, expandRepeatRows, featuredFieldCode, fieldChangeRule, findUnresolvedPlaceholders, gatherAssociatedTypes, gatherDependentServicesType, generateFieldsFromSchema, getRecordReferenceFields, getUserActionsMap, isActionOutcomeEnvelope, isPropertyFilterOperator, isSegmentMembershipTrigger, measureSegmentRelations, measureSegmentSubject, mergePropertyData, namespacePaths, normalizeDiffs, normalizeExportLimit, parsePropertyFilterConditions, planValueRefs, projectionForRequests, reEnrollmentRelationPaths, reEnrollsEveryTime, readNamespacedValue, readPropertyDataColumn, readSegmentPath, reconcilePropertyOptions, recordPlaceholderResolver, renderEmailBody, renderEmailContent, replacePlaceholders, resolveActionBranchTarget, resolveActionErrorPolicy, resolveActionOutcome, resolveEmailContentFormat, _resolveRecordReferencePlaceholders as resolveRecordReferencePlaceholders, sameSegmentDefinition, segmentFiltersByOption, segmentFingerprint, segmentMembershipRunsEveryTime, segmentModuleForContentType, segmentNodeAt, segmentPage, segmentPageFilter, segmentPageSize, segmentSubjectsReachedBy, segmentTimeZone, sendSegmentMaterialized, sendSegmentMembershipToAutomations, splitSegmentFieldRequests, userActionsMap, validateWorkflowBindings };
|
|
6795
|
+
export { AUTOMATION_ACTION_OUTCOMES, AUTOMATION_BRANCH_KEYS, AUTOMATION_CONDITIONALS_KEY, AUTOMATION_ERROR_BEHAVIOURS, AUTOMATION_RETRY_BACKOFFS, AUTOMATION_RETRY_LIMITS, AUTOMATION_RE_ENROLL_EVERY_TIME, AUTOMATION_RE_ENROLL_RELATION_PREFIX, AUTOMATION_SEGMENT_MEMBERSHIP_EVENT, AUTOMATION_SEGMENT_MEMBERSHIP_FOLKS, AUTOMATION_UNARY_OPERATORS, COLORS_DEFAULT, DEFAULT_SEGMENT_PAGE_SIZE, EMAIL_CONTENT_FORMATS, MAX_SEGMENT_PAGE_SIZE, MULTI_VALUE_PROPERTY_OPERATORS, PROPERTY_FILTER_OPERATORS, PROPERTY_FILTER_OPERATOR_BY_TYPE, TAfterProcessProducers, TemplateManager, actionRetryDelayMs, activityBuilder, appendUnsubscribeFooter, applyAutomationConditionals, applySegmentMembership, assignmentRule, blocksToHtml, buildActivities, buildBranchAssignmentActivity, buildBulkActivities, buildDepartmentAssignmentActivity, buildExportCursorQuery, buildFailedAction, buildPermissionGroupAssignmentActivity, buildPositionAssignmentActivity, buildPropertyDataColumns, buildPropertyFilter, buildPropertyFilterConditions, buildSegmentEvaluationPlan, buildSkippedAction, _canonicalSegmentNode as canonicalSegmentNode, canonicalSegmentText, checkApprovalLock, collectPlaceholderPaths, collectPropertyDataFromColumns, createCoreModuleProducerHandler, createSegmentEvaluateFieldsHandler, _decideSegmentNode as decideSegmentNode, describeUnresolvedPlaceholders, documentPlaceholderResolver, emailHtmlWrapper, escapeHtml, evaluateOwnedSegmentFields, evaluateSegmentBatch, expandRepeatRows, featuredFieldCode, fieldChangeRule, findUnresolvedPlaceholders, formatConditionalToken, gatherAssociatedTypes, gatherDependentServicesType, generateFieldsFromSchema, getRecordReferenceFields, getUserActionsMap, isActionOutcomeEnvelope, isAutomationConditionMatched, isPropertyFilterOperator, isSegmentMembershipTrigger, measureSegmentRelations, measureSegmentSubject, mergePropertyData, namespacePaths, normalizeDiffs, normalizeExportLimit, parseConditionalToken, parsePropertyFilterConditions, planValueRefs, projectionForRequests, reEnrollmentRelationPaths, reEnrollsEveryTime, readNamespacedValue, readPropertyDataColumn, readSegmentPath, reconcilePropertyOptions, recordPlaceholderResolver, renderEmailBody, renderEmailContent, replacePlaceholders, resolveActionBranchTarget, resolveActionErrorPolicy, resolveActionOutcome, resolveEmailContentFormat, _resolveRecordReferencePlaceholders as resolveRecordReferencePlaceholders, sameSegmentDefinition, segmentFiltersByOption, segmentFingerprint, segmentMembershipRunsEveryTime, segmentModuleForContentType, segmentNodeAt, segmentPage, segmentPageFilter, segmentPageSize, segmentSubjectsReachedBy, segmentTimeZone, sendSegmentMaterialized, sendSegmentMembershipToAutomations, splitSegmentFieldRequests, userActionsMap, validateAutomationConditional, validateWorkflowBindings };
|