@erxes/api-shared 0.0.0-stage → 3.2.19-2
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/LICENSE.md +672 -0
- package/core-modules/dist/erxes-api-shared-core-modules.cjs.d.ts +2 -0
- package/core-modules/dist/erxes-api-shared-core-modules.cjs.dev.js +6685 -0
- package/core-modules/dist/erxes-api-shared-core-modules.cjs.js +7 -0
- package/core-modules/dist/erxes-api-shared-core-modules.cjs.prod.js +6685 -0
- package/core-modules/dist/erxes-api-shared-core-modules.esm.js +6298 -0
- package/core-modules/package.json +5 -0
- package/core-types/dist/erxes-api-shared-core-types.cjs.d.ts +2 -0
- package/core-types/dist/erxes-api-shared-core-types.cjs.dev.js +12 -0
- package/core-types/dist/erxes-api-shared-core-types.cjs.js +7 -0
- package/core-types/dist/erxes-api-shared-core-types.cjs.prod.js +12 -0
- package/core-types/dist/erxes-api-shared-core-types.esm.js +8 -0
- package/core-types/package.json +5 -0
- package/dist/declarations/src/core-modules/approval/approvalChangeTypes.d.ts +15 -0
- package/dist/declarations/src/core-modules/approval/approvalChangeTypes.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/approval/checkApprovalLock.d.ts +7 -0
- package/dist/declarations/src/core-modules/approval/checkApprovalLock.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/approval/constants.d.ts +37 -0
- package/dist/declarations/src/core-modules/approval/constants.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/approval/index.d.ts +7 -0
- package/dist/declarations/src/core-modules/approval/index.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/approval/initApproval.d.ts +9 -0
- package/dist/declarations/src/core-modules/approval/initApproval.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/approval/types.d.ts +164 -0
- package/dist/declarations/src/core-modules/approval/types.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/approval/zodSchemas.d.ts +125 -0
- package/dist/declarations/src/core-modules/approval/zodSchemas.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/apps/@types/app.d.ts +15 -0
- package/dist/declarations/src/core-modules/apps/@types/app.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/apps/db/definitions/apps.d.ts +13 -0
- package/dist/declarations/src/core-modules/apps/db/definitions/apps.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/apps/index.d.ts +3 -0
- package/dist/declarations/src/core-modules/apps/index.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/automations/actionErrorPolicy.d.ts +68 -0
- package/dist/declarations/src/core-modules/automations/actionErrorPolicy.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/automations/actionOutcome.d.ts +51 -0
- package/dist/declarations/src/core-modules/automations/actionOutcome.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/automations/constants.d.ts +101 -0
- package/dist/declarations/src/core-modules/automations/constants.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/automations/definitions/aiAgents.d.ts +141 -0
- package/dist/declarations/src/core-modules/automations/definitions/aiAgents.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/automations/definitions/automations.d.ts +868 -0
- package/dist/declarations/src/core-modules/automations/definitions/automations.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/automations/definitions/executions.d.ts +316 -0
- package/dist/declarations/src/core-modules/automations/definitions/executions.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/automations/definitions/index.d.ts +4 -0
- package/dist/declarations/src/core-modules/automations/definitions/index.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/automations/index.d.ts +14 -0
- package/dist/declarations/src/core-modules/automations/index.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/automations/outputResolvers.d.ts +67 -0
- package/dist/declarations/src/core-modules/automations/outputResolvers.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/automations/reEnrollment.d.ts +23 -0
- package/dist/declarations/src/core-modules/automations/reEnrollment.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/automations/segmentMembership.d.ts +19 -0
- package/dist/declarations/src/core-modules/automations/segmentMembership.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/automations/sendAutomationMessage.d.ts +51 -0
- package/dist/declarations/src/core-modules/automations/sendAutomationMessage.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/automations/setupAutomationProducers.d.ts +4 -0
- package/dist/declarations/src/core-modules/automations/setupAutomationProducers.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/automations/typeUtils.d.ts +2 -0
- package/dist/declarations/src/core-modules/automations/typeUtils.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/automations/types.d.ts +474 -0
- package/dist/declarations/src/core-modules/automations/types.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/automations/utils.d.ts +38 -0
- package/dist/declarations/src/core-modules/automations/utils.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/automations/workflowValidation.d.ts +3 -0
- package/dist/declarations/src/core-modules/automations/workflowValidation.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/automations/zodTypes.d.ts +2366 -0
- package/dist/declarations/src/core-modules/automations/zodTypes.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/client-portals/definitions/clientPortal.d.ts +375 -0
- package/dist/declarations/src/core-modules/client-portals/definitions/clientPortal.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/client-portals/definitions/comment.d.ts +53 -0
- package/dist/declarations/src/core-modules/client-portals/definitions/comment.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/client-portals/definitions/cpNotification.d.ts +110 -0
- package/dist/declarations/src/core-modules/client-portals/definitions/cpNotification.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/client-portals/definitions/cpUser.d.ts +828 -0
- package/dist/declarations/src/core-modules/client-portals/definitions/cpUser.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/client-portals/index.d.ts +5 -0
- package/dist/declarations/src/core-modules/client-portals/index.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/common/db/definitions/common.d.ts +77 -0
- package/dist/declarations/src/core-modules/common/db/definitions/common.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/common/eventHandlers/createEventHandlers.d.ts +8 -0
- package/dist/declarations/src/core-modules/common/eventHandlers/createEventHandlers.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/common/eventHandlers/generateEventHandlers.d.ts +4 -0
- package/dist/declarations/src/core-modules/common/eventHandlers/generateEventHandlers.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/common/eventHandlers/index.d.ts +5 -0
- package/dist/declarations/src/core-modules/common/eventHandlers/index.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/common/eventHandlers/runtimeContext.d.ts +9 -0
- package/dist/declarations/src/core-modules/common/eventHandlers/runtimeContext.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/common/eventHandlers/schemas.d.ts +82 -0
- package/dist/declarations/src/core-modules/common/eventHandlers/schemas.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/common/eventHandlers/types.d.ts +87 -0
- package/dist/declarations/src/core-modules/common/eventHandlers/types.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/common/index.d.ts +5 -0
- package/dist/declarations/src/core-modules/common/index.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/common/references/getRecordReferenceFields.d.ts +57 -0
- package/dist/declarations/src/core-modules/common/references/getRecordReferenceFields.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/common/references/index.d.ts +6 -0
- package/dist/declarations/src/core-modules/common/references/index.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/common/references/initRecordReferences.d.ts +4 -0
- package/dist/declarations/src/core-modules/common/references/initRecordReferences.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/common/references/resolveRecordReferencePlaceholders.d.ts +12 -0
- package/dist/declarations/src/core-modules/common/references/resolveRecordReferencePlaceholders.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/common/references/resolveRecordReferenceValue.d.ts +6 -0
- package/dist/declarations/src/core-modules/common/references/resolveRecordReferenceValue.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/common/references/types.d.ts +63 -0
- package/dist/declarations/src/core-modules/common/references/types.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/common/routeToModuleProducer.d.ts +55 -0
- package/dist/declarations/src/core-modules/common/routeToModuleProducer.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/email-content/blocksToHtml.d.ts +72 -0
- package/dist/declarations/src/core-modules/email-content/blocksToHtml.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/email-content/constants.d.ts +5 -0
- package/dist/declarations/src/core-modules/email-content/constants.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/email-content/emailFooter.d.ts +5 -0
- package/dist/declarations/src/core-modules/email-content/emailFooter.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/email-content/expandRepeatRows.d.ts +9 -0
- package/dist/declarations/src/core-modules/email-content/expandRepeatRows.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/email-content/index.d.ts +9 -0
- package/dist/declarations/src/core-modules/email-content/index.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/email-content/renderEmailContent.d.ts +19 -0
- package/dist/declarations/src/core-modules/email-content/renderEmailContent.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/email-content/replacePlaceholders.d.ts +36 -0
- package/dist/declarations/src/core-modules/email-content/replacePlaceholders.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/email-content/types.d.ts +48 -0
- package/dist/declarations/src/core-modules/email-content/types.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/email-content/unresolvedPlaceholders.d.ts +4 -0
- package/dist/declarations/src/core-modules/email-content/unresolvedPlaceholders.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/forms/index.d.ts +3 -0
- package/dist/declarations/src/core-modules/forms/index.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/forms/types.d.ts +55 -0
- package/dist/declarations/src/core-modules/forms/types.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/forms/utils.d.ts +4 -0
- package/dist/declarations/src/core-modules/forms/utils.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/import-export/index.d.ts +8 -0
- package/dist/declarations/src/core-modules/import-export/index.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/import-export/types.d.ts +181 -0
- package/dist/declarations/src/core-modules/import-export/types.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/import-export/utils/exportCursor.d.ts +14 -0
- package/dist/declarations/src/core-modules/import-export/utils/exportCursor.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/import-export/utils/headerMatcher.d.ts +32 -0
- package/dist/declarations/src/core-modules/import-export/utils/headerMatcher.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/import-export/utils/importExportRuntime.d.ts +32 -0
- package/dist/declarations/src/core-modules/import-export/utils/importExportRuntime.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/import-export/utils/importUtils.d.ts +25 -0
- package/dist/declarations/src/core-modules/import-export/utils/importUtils.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/import-export/worker.d.ts +8 -0
- package/dist/declarations/src/core-modules/import-export/worker.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/import-export/zodSchemas.d.ts +111 -0
- package/dist/declarations/src/core-modules/import-export/zodSchemas.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/index.d.ts +16 -0
- package/dist/declarations/src/core-modules/index.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/logs/activityLog/builder.d.ts +3 -0
- package/dist/declarations/src/core-modules/logs/activityLog/builder.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/logs/activityLog/index.d.ts +5 -0
- package/dist/declarations/src/core-modules/logs/activityLog/index.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/logs/activityLog/sharedBuilders.d.ts +18 -0
- package/dist/declarations/src/core-modules/logs/activityLog/sharedBuilders.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/logs/activityLog/types.d.ts +21 -0
- package/dist/declarations/src/core-modules/logs/activityLog/types.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/logs/activityLog/utils.d.ts +10 -0
- package/dist/declarations/src/core-modules/logs/activityLog/utils.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/logs/activityLogUtils.d.ts +72 -0
- package/dist/declarations/src/core-modules/logs/activityLogUtils.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/logs/definitions/activityLog.d.ts +84 -0
- package/dist/declarations/src/core-modules/logs/definitions/activityLog.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/logs/definitions/logs.d.ts +39 -0
- package/dist/declarations/src/core-modules/logs/definitions/logs.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/logs/index.d.ts +6 -0
- package/dist/declarations/src/core-modules/logs/index.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/logs/types.d.ts +15 -0
- package/dist/declarations/src/core-modules/logs/types.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/notifications/definitions/emailAddresses.d.ts +73 -0
- package/dist/declarations/src/core-modules/notifications/definitions/emailAddresses.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/notifications/definitions/emailDeliveries.d.ts +115 -0
- package/dist/declarations/src/core-modules/notifications/definitions/emailDeliveries.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/notifications/definitions/emailRamp.d.ts +65 -0
- package/dist/declarations/src/core-modules/notifications/definitions/emailRamp.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/notifications/definitions/emailSenders.d.ts +58 -0
- package/dist/declarations/src/core-modules/notifications/definitions/emailSenders.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/notifications/definitions/notificationSettings.d.ts +66 -0
- package/dist/declarations/src/core-modules/notifications/definitions/notificationSettings.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/notifications/definitions/notifications.d.ts +89 -0
- package/dist/declarations/src/core-modules/notifications/definitions/notifications.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/notifications/index.d.ts +8 -0
- package/dist/declarations/src/core-modules/notifications/index.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/notifications/utils.d.ts +85 -0
- package/dist/declarations/src/core-modules/notifications/utils.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/permissions/db/definitions/permissions.d.ts +60 -0
- package/dist/declarations/src/core-modules/permissions/db/definitions/permissions.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/permissions/index.d.ts +4 -0
- package/dist/declarations/src/core-modules/permissions/index.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/permissions/user-actions-map.d.ts +4 -0
- package/dist/declarations/src/core-modules/permissions/user-actions-map.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/permissions/utils.d.ts +22 -0
- package/dist/declarations/src/core-modules/permissions/utils.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/properties/filter.d.ts +5 -0
- package/dist/declarations/src/core-modules/properties/filter.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/properties/importExport.d.ts +18 -0
- package/dist/declarations/src/core-modules/properties/importExport.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/properties/index.d.ts +10 -0
- package/dist/declarations/src/core-modules/properties/index.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/properties/keys.d.ts +46 -0
- package/dist/declarations/src/core-modules/properties/keys.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/properties/mergeRows.d.ts +8 -0
- package/dist/declarations/src/core-modules/properties/mergeRows.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/properties/operators.d.ts +6 -0
- package/dist/declarations/src/core-modules/properties/operators.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/properties/options.d.ts +10 -0
- package/dist/declarations/src/core-modules/properties/options.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/properties/setupPropertyProducers.d.ts +4 -0
- package/dist/declarations/src/core-modules/properties/setupPropertyProducers.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/properties/types.d.ts +14 -0
- package/dist/declarations/src/core-modules/properties/types.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/properties/valueUsage.d.ts +56 -0
- package/dist/declarations/src/core-modules/properties/valueUsage.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/segments/dependencies.d.ts +6 -0
- package/dist/declarations/src/core-modules/segments/dependencies.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/segments/evaluate.d.ts +11 -0
- package/dist/declarations/src/core-modules/segments/evaluate.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/segments/evaluateBatch.d.ts +42 -0
- package/dist/declarations/src/core-modules/segments/evaluateBatch.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/segments/evaluateFieldsRouter.d.ts +29 -0
- package/dist/declarations/src/core-modules/segments/evaluateFieldsRouter.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/segments/evaluateOwned.d.ts +27 -0
- package/dist/declarations/src/core-modules/segments/evaluateOwned.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/segments/events.d.ts +45 -0
- package/dist/declarations/src/core-modules/segments/events.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/segments/fieldBuilders.d.ts +35 -0
- package/dist/declarations/src/core-modules/segments/fieldBuilders.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/segments/fieldMeta.d.ts +62 -0
- package/dist/declarations/src/core-modules/segments/fieldMeta.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/segments/fieldRequests.d.ts +33 -0
- package/dist/declarations/src/core-modules/segments/fieldRequests.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/segments/fingerprint.d.ts +6 -0
- package/dist/declarations/src/core-modules/segments/fingerprint.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/segments/index.d.ts +31 -0
- package/dist/declarations/src/core-modules/segments/index.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/segments/joinChanges.d.ts +11 -0
- package/dist/declarations/src/core-modules/segments/joinChanges.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/segments/materialized.d.ts +9 -0
- package/dist/declarations/src/core-modules/segments/materialized.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/segments/measureRelations.d.ts +18 -0
- package/dist/declarations/src/core-modules/segments/measureRelations.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/segments/memberQuery.d.ts +13 -0
- package/dist/declarations/src/core-modules/segments/memberQuery.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/segments/membership.d.ts +24 -0
- package/dist/declarations/src/core-modules/segments/membership.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/segments/mongoFilter.d.ts +15 -0
- package/dist/declarations/src/core-modules/segments/mongoFilter.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/segments/nodeRefs.d.ts +5 -0
- package/dist/declarations/src/core-modules/segments/nodeRefs.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/segments/nodes.d.ts +42 -0
- package/dist/declarations/src/core-modules/segments/nodes.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/segments/operators.d.ts +46 -0
- package/dist/declarations/src/core-modules/segments/operators.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/segments/ownedSource.d.ts +7 -0
- package/dist/declarations/src/core-modules/segments/ownedSource.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/segments/plan.d.ts +35 -0
- package/dist/declarations/src/core-modules/segments/plan.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/segments/relationRegistry.d.ts +33 -0
- package/dist/declarations/src/core-modules/segments/relationRegistry.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/segments/setupSegmentProducers.d.ts +4 -0
- package/dist/declarations/src/core-modules/segments/setupSegmentProducers.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/segments/subjectsReachedBy.d.ts +11 -0
- package/dist/declarations/src/core-modules/segments/subjectsReachedBy.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/segments/timeZone.d.ts +2 -0
- package/dist/declarations/src/core-modules/segments/timeZone.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/segments/types.d.ts +67 -0
- package/dist/declarations/src/core-modules/segments/types.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/segments/utils.d.ts +4 -0
- package/dist/declarations/src/core-modules/segments/utils.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/segments/walkNodes.d.ts +9 -0
- package/dist/declarations/src/core-modules/segments/walkNodes.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/segments/zodSchemas.d.ts +532 -0
- package/dist/declarations/src/core-modules/segments/zodSchemas.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/segments/zonedTime.d.ts +25 -0
- package/dist/declarations/src/core-modules/segments/zonedTime.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/templates/index.d.ts +2 -0
- package/dist/declarations/src/core-modules/templates/index.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/templates/utils.d.ts +11 -0
- package/dist/declarations/src/core-modules/templates/utils.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/users/constants.d.ts +114 -0
- package/dist/declarations/src/core-modules/users/constants.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/users/db/definitions/users.d.ts +24 -0
- package/dist/declarations/src/core-modules/users/db/definitions/users.d.ts.map +1 -0
- package/dist/declarations/src/core-modules/users/index.d.ts +3 -0
- package/dist/declarations/src/core-modules/users/index.d.ts.map +1 -0
- package/dist/declarations/src/core-types/common.d.ts +149 -0
- package/dist/declarations/src/core-types/common.d.ts.map +1 -0
- package/dist/declarations/src/core-types/index.d.ts +20 -0
- package/dist/declarations/src/core-types/index.d.ts.map +1 -0
- package/dist/declarations/src/core-types/modules/app/app.d.ts +12 -0
- package/dist/declarations/src/core-types/modules/app/app.d.ts.map +1 -0
- package/dist/declarations/src/core-types/modules/automations/automations.d.ts +19 -0
- package/dist/declarations/src/core-types/modules/automations/automations.d.ts.map +1 -0
- package/dist/declarations/src/core-types/modules/contacts/company.d.ts +53 -0
- package/dist/declarations/src/core-types/modules/contacts/company.d.ts.map +1 -0
- package/dist/declarations/src/core-types/modules/contacts/contacts-common.d.ts +32 -0
- package/dist/declarations/src/core-types/modules/contacts/contacts-common.d.ts.map +1 -0
- package/dist/declarations/src/core-types/modules/contacts/customer.d.ts +74 -0
- package/dist/declarations/src/core-types/modules/contacts/customer.d.ts.map +1 -0
- package/dist/declarations/src/core-types/modules/emailTemplates/emailTemplate.d.ts +18 -0
- package/dist/declarations/src/core-types/modules/emailTemplates/emailTemplate.d.ts.map +1 -0
- package/dist/declarations/src/core-types/modules/logs/logs.d.ts +28 -0
- package/dist/declarations/src/core-types/modules/logs/logs.d.ts.map +1 -0
- package/dist/declarations/src/core-types/modules/permissions/permission.d.ts +56 -0
- package/dist/declarations/src/core-types/modules/permissions/permission.d.ts.map +1 -0
- package/dist/declarations/src/core-types/modules/permissions/role.d.ts +21 -0
- package/dist/declarations/src/core-types/modules/permissions/role.d.ts.map +1 -0
- package/dist/declarations/src/core-types/modules/products/product.d.ts +76 -0
- package/dist/declarations/src/core-types/modules/products/product.d.ts.map +1 -0
- package/dist/declarations/src/core-types/modules/products/productCategory.d.ts +26 -0
- package/dist/declarations/src/core-types/modules/products/productCategory.d.ts.map +1 -0
- package/dist/declarations/src/core-types/modules/products/productConfig.d.ts +9 -0
- package/dist/declarations/src/core-types/modules/products/productConfig.d.ts.map +1 -0
- package/dist/declarations/src/core-types/modules/products/uom.d.ts +11 -0
- package/dist/declarations/src/core-types/modules/products/uom.d.ts.map +1 -0
- package/dist/declarations/src/core-types/modules/relations/relations.d.ts +13 -0
- package/dist/declarations/src/core-types/modules/relations/relations.d.ts.map +1 -0
- package/dist/declarations/src/core-types/modules/saas/organization.d.ts +8 -0
- package/dist/declarations/src/core-types/modules/saas/organization.d.ts.map +1 -0
- package/dist/declarations/src/core-types/modules/tags/tag.d.ts +16 -0
- package/dist/declarations/src/core-types/modules/tags/tag.d.ts.map +1 -0
- package/dist/declarations/src/core-types/modules/team-member/structure.d.ts +19 -0
- package/dist/declarations/src/core-types/modules/team-member/structure.d.ts.map +1 -0
- package/dist/declarations/src/core-types/modules/team-member/user.d.ts +90 -0
- package/dist/declarations/src/core-types/modules/team-member/user.d.ts.map +1 -0
- package/dist/declarations/src/index.d.ts +3 -0
- package/dist/declarations/src/index.d.ts.map +1 -0
- package/dist/declarations/src/utils/agent-tools/auth.d.ts +18 -0
- package/dist/declarations/src/utils/agent-tools/auth.d.ts.map +1 -0
- package/dist/declarations/src/utils/agent-tools/endpoints.d.ts +16 -0
- package/dist/declarations/src/utils/agent-tools/endpoints.d.ts.map +1 -0
- package/dist/declarations/src/utils/agent-tools/index.d.ts +6 -0
- package/dist/declarations/src/utils/agent-tools/index.d.ts.map +1 -0
- package/dist/declarations/src/utils/agent-tools/manifest.d.ts +11 -0
- package/dist/declarations/src/utils/agent-tools/manifest.d.ts.map +1 -0
- package/dist/declarations/src/utils/agent-tools/responseLimit.d.ts +26 -0
- package/dist/declarations/src/utils/agent-tools/responseLimit.d.ts.map +1 -0
- package/dist/declarations/src/utils/agent-tools/types.d.ts +48 -0
- package/dist/declarations/src/utils/agent-tools/types.d.ts.map +1 -0
- package/dist/declarations/src/utils/apollo/beforeResolvers.d.ts +41 -0
- package/dist/declarations/src/utils/apollo/beforeResolvers.d.ts.map +1 -0
- package/dist/declarations/src/utils/apollo/commonTypeDefs.d.ts +7 -0
- package/dist/declarations/src/utils/apollo/commonTypeDefs.d.ts.map +1 -0
- package/dist/declarations/src/utils/apollo/constants.d.ts +3 -0
- package/dist/declarations/src/utils/apollo/constants.d.ts.map +1 -0
- package/dist/declarations/src/utils/apollo/customScalars.d.ts +6 -0
- package/dist/declarations/src/utils/apollo/customScalars.d.ts.map +1 -0
- package/dist/declarations/src/utils/apollo/expectedErrorPlugin.d.ts +11 -0
- package/dist/declarations/src/utils/apollo/expectedErrorPlugin.d.ts.map +1 -0
- package/dist/declarations/src/utils/apollo/index.d.ts +10 -0
- package/dist/declarations/src/utils/apollo/index.d.ts.map +1 -0
- package/dist/declarations/src/utils/apollo/runBeforeResolvers.d.ts +27 -0
- package/dist/declarations/src/utils/apollo/runBeforeResolvers.d.ts.map +1 -0
- package/dist/declarations/src/utils/apollo/utils.d.ts +5 -0
- package/dist/declarations/src/utils/apollo/utils.d.ts.map +1 -0
- package/dist/declarations/src/utils/apollo/wrapperMutations.d.ts +8 -0
- package/dist/declarations/src/utils/apollo/wrapperMutations.d.ts.map +1 -0
- package/dist/declarations/src/utils/apollo/wrapperResolvers.d.ts +8 -0
- package/dist/declarations/src/utils/apollo/wrapperResolvers.d.ts.map +1 -0
- package/dist/declarations/src/utils/bulkUtils.d.ts +7 -0
- package/dist/declarations/src/utils/bulkUtils.d.ts.map +1 -0
- package/dist/declarations/src/utils/constants.d.ts +40 -0
- package/dist/declarations/src/utils/constants.d.ts.map +1 -0
- package/dist/declarations/src/utils/editor.d.ts +45 -0
- package/dist/declarations/src/utils/editor.d.ts.map +1 -0
- package/dist/declarations/src/utils/email/address.d.ts +10 -0
- package/dist/declarations/src/utils/email/address.d.ts.map +1 -0
- package/dist/declarations/src/utils/email/attachments.d.ts +12 -0
- package/dist/declarations/src/utils/email/attachments.d.ts.map +1 -0
- package/dist/declarations/src/utils/email/config.d.ts +10 -0
- package/dist/declarations/src/utils/email/config.d.ts.map +1 -0
- package/dist/declarations/src/utils/email/constants.d.ts +6 -0
- package/dist/declarations/src/utils/email/constants.d.ts.map +1 -0
- package/dist/declarations/src/utils/email/index.d.ts +12 -0
- package/dist/declarations/src/utils/email/index.d.ts.map +1 -0
- package/dist/declarations/src/utils/email/providers/sendgrid.d.ts +17 -0
- package/dist/declarations/src/utils/email/providers/sendgrid.d.ts.map +1 -0
- package/dist/declarations/src/utils/email/providers/sendgridEvents.d.ts +18 -0
- package/dist/declarations/src/utils/email/providers/sendgridEvents.d.ts.map +1 -0
- package/dist/declarations/src/utils/email/providers/ses.d.ts +19 -0
- package/dist/declarations/src/utils/email/providers/ses.d.ts.map +1 -0
- package/dist/declarations/src/utils/email/providers/smtp.d.ts +14 -0
- package/dist/declarations/src/utils/email/providers/smtp.d.ts.map +1 -0
- package/dist/declarations/src/utils/email/resolveProvider.d.ts +6 -0
- package/dist/declarations/src/utils/email/resolveProvider.d.ts.map +1 -0
- package/dist/declarations/src/utils/email/service.d.ts +50 -0
- package/dist/declarations/src/utils/email/service.d.ts.map +1 -0
- package/dist/declarations/src/utils/email/types.d.ts +87 -0
- package/dist/declarations/src/utils/email/types.d.ts.map +1 -0
- package/dist/declarations/src/utils/errorClassifier.d.ts +56 -0
- package/dist/declarations/src/utils/errorClassifier.d.ts.map +1 -0
- package/dist/declarations/src/utils/file/read.d.ts +14 -0
- package/dist/declarations/src/utils/file/read.d.ts.map +1 -0
- package/dist/declarations/src/utils/file/upload.d.ts +10 -0
- package/dist/declarations/src/utils/file/upload.d.ts.map +1 -0
- package/dist/declarations/src/utils/graphqlPubSub.d.ts +3 -0
- package/dist/declarations/src/utils/graphqlPubSub.d.ts.map +1 -0
- package/dist/declarations/src/utils/headers/get-hostname.d.ts +5 -0
- package/dist/declarations/src/utils/headers/get-hostname.d.ts.map +1 -0
- package/dist/declarations/src/utils/headers/index.d.ts +5 -0
- package/dist/declarations/src/utils/headers/index.d.ts.map +1 -0
- package/dist/declarations/src/utils/headers/sanitize.d.ts +3 -0
- package/dist/declarations/src/utils/headers/sanitize.d.ts.map +1 -0
- package/dist/declarations/src/utils/headers/subdomain.d.ts +4 -0
- package/dist/declarations/src/utils/headers/subdomain.d.ts.map +1 -0
- package/dist/declarations/src/utils/headers/user.d.ts +14 -0
- package/dist/declarations/src/utils/headers/user.d.ts.map +1 -0
- package/dist/declarations/src/utils/index.d.ts +28 -0
- package/dist/declarations/src/utils/index.d.ts.map +1 -0
- package/dist/declarations/src/utils/knowledge.d.ts +50 -0
- package/dist/declarations/src/utils/knowledge.d.ts.map +1 -0
- package/dist/declarations/src/utils/logs/index.d.ts +103 -0
- package/dist/declarations/src/utils/logs/index.d.ts.map +1 -0
- package/dist/declarations/src/utils/mongo/cursor-util.d.ts +41 -0
- package/dist/declarations/src/utils/mongo/cursor-util.d.ts.map +1 -0
- package/dist/declarations/src/utils/mongo/generate-models.d.ts +4 -0
- package/dist/declarations/src/utils/mongo/generate-models.d.ts.map +1 -0
- package/dist/declarations/src/utils/mongo/index.d.ts +6 -0
- package/dist/declarations/src/utils/mongo/index.d.ts.map +1 -0
- package/dist/declarations/src/utils/mongo/mongo-connection.d.ts +5 -0
- package/dist/declarations/src/utils/mongo/mongo-connection.d.ts.map +1 -0
- package/dist/declarations/src/utils/mongo/mongoose-types.d.ts +22 -0
- package/dist/declarations/src/utils/mongo/mongoose-types.d.ts.map +1 -0
- package/dist/declarations/src/utils/mongo/mongoose-utils.d.ts +30 -0
- package/dist/declarations/src/utils/mongo/mongoose-utils.d.ts.map +1 -0
- package/dist/declarations/src/utils/mongo/search-tokens.d.ts +21 -0
- package/dist/declarations/src/utils/mongo/search-tokens.d.ts.map +1 -0
- package/dist/declarations/src/utils/mq-worker.d.ts +19 -0
- package/dist/declarations/src/utils/mq-worker.d.ts.map +1 -0
- package/dist/declarations/src/utils/random.d.ts +3 -0
- package/dist/declarations/src/utils/random.d.ts.map +1 -0
- package/dist/declarations/src/utils/redis.d.ts +4 -0
- package/dist/declarations/src/utils/redis.d.ts.map +1 -0
- package/dist/declarations/src/utils/saas/index.d.ts +3 -0
- package/dist/declarations/src/utils/saas/index.d.ts.map +1 -0
- package/dist/declarations/src/utils/saas/saas-mongo-connection.d.ts +59 -0
- package/dist/declarations/src/utils/saas/saas-mongo-connection.d.ts.map +1 -0
- package/dist/declarations/src/utils/saas/types.d.ts +96 -0
- package/dist/declarations/src/utils/saas/types.d.ts.map +1 -0
- package/dist/declarations/src/utils/sanitize.d.ts +3 -0
- package/dist/declarations/src/utils/sanitize.d.ts.map +1 -0
- package/dist/declarations/src/utils/sentry-init.d.ts +15 -0
- package/dist/declarations/src/utils/sentry-init.d.ts.map +1 -0
- package/dist/declarations/src/utils/sentry-instrument.d.ts +2 -0
- package/dist/declarations/src/utils/sentry-instrument.d.ts.map +1 -0
- package/dist/declarations/src/utils/serializablePayload.d.ts +11 -0
- package/dist/declarations/src/utils/serializablePayload.d.ts.map +1 -0
- package/dist/declarations/src/utils/service-discovery.d.ts +25 -0
- package/dist/declarations/src/utils/service-discovery.d.ts.map +1 -0
- package/dist/declarations/src/utils/start-plugin.d.ts +85 -0
- package/dist/declarations/src/utils/start-plugin.d.ts.map +1 -0
- package/dist/declarations/src/utils/string.d.ts +82 -0
- package/dist/declarations/src/utils/string.d.ts.map +1 -0
- package/dist/declarations/src/utils/trpc/index.d.ts +79 -0
- package/dist/declarations/src/utils/trpc/index.d.ts.map +1 -0
- package/dist/declarations/src/utils/trpc/sendCoreModuleProducer.d.ts +53 -0
- package/dist/declarations/src/utils/trpc/sendCoreModuleProducer.d.ts.map +1 -0
- package/dist/declarations/src/utils/utils.d.ts +69 -0
- package/dist/declarations/src/utils/utils.d.ts.map +1 -0
- package/dist/erxes-api-shared.cjs.d.ts +3 -0
- package/dist/erxes-api-shared.cjs.dev.js +7 -0
- package/dist/erxes-api-shared.cjs.js +7 -0
- package/dist/erxes-api-shared.cjs.prod.js +7 -0
- package/dist/erxes-api-shared.esm.js +3 -0
- package/dist/start-plugin-576e707d.cjs.prod.js +23223 -0
- package/dist/start-plugin-6e76556c.esm.js +22742 -0
- package/dist/start-plugin-89fa2bd2.cjs.dev.js +23225 -0
- package/package.json +105 -4
- package/src/common-modules/payment/worker.ts +53 -0
- package/src/core-modules/approval/approvalChangeTypes.ts +31 -0
- package/src/core-modules/approval/checkApprovalLock.ts +85 -0
- package/src/core-modules/approval/constants.ts +45 -0
- package/src/core-modules/approval/index.ts +6 -0
- package/src/core-modules/approval/initApproval.ts +59 -0
- package/src/core-modules/approval/types.ts +206 -0
- package/src/core-modules/approval/zodSchemas.ts +55 -0
- package/src/core-modules/apps/@types/app.ts +15 -0
- package/src/core-modules/apps/db/definitions/apps.ts +30 -0
- package/src/core-modules/apps/index.ts +2 -0
- package/src/core-modules/automations/actionErrorPolicy.test.ts +125 -0
- package/src/core-modules/automations/actionErrorPolicy.ts +162 -0
- package/src/core-modules/automations/actionInputs.test.ts +70 -0
- package/src/core-modules/automations/actionOutcome.test.ts +87 -0
- package/src/core-modules/automations/actionOutcome.ts +128 -0
- package/src/core-modules/automations/constants.ts +181 -0
- package/src/core-modules/automations/definitions/aiAgents.ts +343 -0
- package/src/core-modules/automations/definitions/automations.ts +207 -0
- package/src/core-modules/automations/definitions/executions.ts +190 -0
- package/src/core-modules/automations/definitions/index.ts +3 -0
- package/src/core-modules/automations/getValueByPath.test.ts +49 -0
- package/src/core-modules/automations/index.ts +13 -0
- package/src/core-modules/automations/outputResolvers.test.ts +97 -0
- package/src/core-modules/automations/outputResolvers.ts +1238 -0
- package/src/core-modules/automations/reEnrollment.ts +34 -0
- package/src/core-modules/automations/segmentMembership.ts +34 -0
- package/src/core-modules/automations/sendAutomationMessage.ts +219 -0
- package/src/core-modules/automations/setPropertyOutcome.test.ts +105 -0
- package/src/core-modules/automations/setPropertyRows.test.ts +61 -0
- package/src/core-modules/automations/setupAutomationProducers.ts +187 -0
- package/src/core-modules/automations/typeUtils.ts +3 -0
- package/src/core-modules/automations/types.ts +577 -0
- package/src/core-modules/automations/utils.ts +1128 -0
- package/src/core-modules/automations/workflowValidation.ts +32 -0
- package/src/core-modules/automations/zodTypes.ts +221 -0
- package/src/core-modules/client-portals/definitions/clientPortal.ts +230 -0
- package/src/core-modules/client-portals/definitions/comment.ts +26 -0
- package/src/core-modules/client-portals/definitions/cpNotification.ts +112 -0
- package/src/core-modules/client-portals/definitions/cpUser.ts +236 -0
- package/src/core-modules/client-portals/index.ts +4 -0
- package/src/core-modules/common/db/definitions/common.ts +43 -0
- package/src/core-modules/common/eventHandlers/createEventHandlers.ts +236 -0
- package/src/core-modules/common/eventHandlers/generateEventHandlers.ts +37 -0
- package/src/core-modules/common/eventHandlers/index.ts +11 -0
- package/src/core-modules/common/eventHandlers/runtimeContext.ts +36 -0
- package/src/core-modules/common/eventHandlers/schemas.ts +53 -0
- package/src/core-modules/common/eventHandlers/types.ts +97 -0
- package/src/core-modules/common/eventHandlers/utils.ts +113 -0
- package/src/core-modules/common/index.ts +4 -0
- package/src/core-modules/common/references/fetchRecordReferenceTargets.ts +43 -0
- package/src/core-modules/common/references/getRecordReferenceFields.ts +243 -0
- package/src/core-modules/common/references/index.ts +9 -0
- package/src/core-modules/common/references/initRecordReferences.ts +84 -0
- package/src/core-modules/common/references/normalizeRecordReferenceConfig.ts +59 -0
- package/src/core-modules/common/references/resolveRecordReferencePath.ts +473 -0
- package/src/core-modules/common/references/resolveRecordReferencePlaceholders.ts +173 -0
- package/src/core-modules/common/references/resolveRecordReferenceValue.ts +41 -0
- package/src/core-modules/common/references/resolveRecordRelationIds.ts +57 -0
- package/src/core-modules/common/references/types.ts +78 -0
- package/src/core-modules/common/references/utils.ts +60 -0
- package/src/core-modules/common/references/zodInputs.ts +13 -0
- package/src/core-modules/common/routeToModuleProducer.ts +118 -0
- package/src/core-modules/email-content/blocksToHtml.ts +551 -0
- package/src/core-modules/email-content/constants.ts +4 -0
- package/src/core-modules/email-content/emailFooter.ts +17 -0
- package/src/core-modules/email-content/expandRepeatRows.test.ts +36 -0
- package/src/core-modules/email-content/expandRepeatRows.ts +59 -0
- package/src/core-modules/email-content/index.ts +8 -0
- package/src/core-modules/email-content/renderEmailContent.ts +88 -0
- package/src/core-modules/email-content/replacePlaceholders.ts +143 -0
- package/src/core-modules/email-content/types.ts +49 -0
- package/src/core-modules/email-content/unresolvedPlaceholders.ts +27 -0
- package/src/core-modules/forms/index.ts +2 -0
- package/src/core-modules/forms/types.ts +86 -0
- package/src/core-modules/forms/utils.ts +34 -0
- package/src/core-modules/import-export/index.ts +7 -0
- package/src/core-modules/import-export/types.ts +204 -0
- package/src/core-modules/import-export/utils/createCoreImportClient.ts +131 -0
- package/src/core-modules/import-export/utils/exportBatchProcess.ts +560 -0
- package/src/core-modules/import-export/utils/exportCursor.ts +47 -0
- package/src/core-modules/import-export/utils/headerMatcher.test.ts +90 -0
- package/src/core-modules/import-export/utils/headerMatcher.ts +229 -0
- package/src/core-modules/import-export/utils/importBatchProcess.ts +780 -0
- package/src/core-modules/import-export/utils/importExportError.ts +71 -0
- package/src/core-modules/import-export/utils/importExportRuntime.ts +96 -0
- package/src/core-modules/import-export/utils/importUtils.ts +59 -0
- package/src/core-modules/import-export/utils/progressUpdate.ts +25 -0
- package/src/core-modules/import-export/utils/tempWorkspace.ts +34 -0
- package/src/core-modules/import-export/worker.ts +215 -0
- package/src/core-modules/import-export/zodSchemas.ts +63 -0
- package/src/core-modules/index.ts +15 -0
- package/src/core-modules/logs/activityLog/builder.ts +232 -0
- package/src/core-modules/logs/activityLog/index.ts +4 -0
- package/src/core-modules/logs/activityLog/sharedBuilders.ts +95 -0
- package/src/core-modules/logs/activityLog/types.ts +26 -0
- package/src/core-modules/logs/activityLog/utils.ts +61 -0
- package/src/core-modules/logs/activityLogUtils.ts +677 -0
- package/src/core-modules/logs/definitions/activityLog.ts +71 -0
- package/src/core-modules/logs/definitions/logs.ts +49 -0
- package/src/core-modules/logs/index.ts +5 -0
- package/src/core-modules/logs/types.ts +16 -0
- package/src/core-modules/notifications/definitions/emailAddresses.ts +105 -0
- package/src/core-modules/notifications/definitions/emailDeliveries.ts +188 -0
- package/src/core-modules/notifications/definitions/emailRamp.ts +83 -0
- package/src/core-modules/notifications/definitions/emailSenders.ts +84 -0
- package/src/core-modules/notifications/definitions/notificationConfigs.ts +110 -0
- package/src/core-modules/notifications/definitions/notificationSettings.ts +67 -0
- package/src/core-modules/notifications/definitions/notifications.ts +130 -0
- package/src/core-modules/notifications/emailUtils.ts +88 -0
- package/src/core-modules/notifications/index.ts +7 -0
- package/src/core-modules/notifications/utils.ts +143 -0
- package/src/core-modules/permissions/db/definitions/permissions.ts +82 -0
- package/src/core-modules/permissions/index.ts +3 -0
- package/src/core-modules/permissions/oauth-scopes.test.ts +102 -0
- package/src/core-modules/permissions/user-actions-map.ts +170 -0
- package/src/core-modules/permissions/utils.ts +317 -0
- package/src/core-modules/properties/README.md +161 -0
- package/src/core-modules/properties/filter.test.ts +74 -0
- package/src/core-modules/properties/filter.ts +156 -0
- package/src/core-modules/properties/importExport.ts +159 -0
- package/src/core-modules/properties/index.ts +9 -0
- package/src/core-modules/properties/keys.test.ts +71 -0
- package/src/core-modules/properties/keys.ts +128 -0
- package/src/core-modules/properties/mergePropertyData.test.ts +65 -0
- package/src/core-modules/properties/mergeRows.ts +93 -0
- package/src/core-modules/properties/operators.ts +91 -0
- package/src/core-modules/properties/options.test.ts +119 -0
- package/src/core-modules/properties/options.ts +55 -0
- package/src/core-modules/properties/setupPropertyProducers.ts +32 -0
- package/src/core-modules/properties/types.ts +31 -0
- package/src/core-modules/properties/valueUsage.test.ts +158 -0
- package/src/core-modules/properties/valueUsage.ts +153 -0
- package/src/core-modules/segments/anniversary.test.ts +122 -0
- package/src/core-modules/segments/dependencies.test.ts +173 -0
- package/src/core-modules/segments/dependencies.ts +70 -0
- package/src/core-modules/segments/evaluate.test.ts +339 -0
- package/src/core-modules/segments/evaluate.ts +388 -0
- package/src/core-modules/segments/evaluateBatch.test.ts +233 -0
- package/src/core-modules/segments/evaluateBatch.ts +263 -0
- package/src/core-modules/segments/evaluateFieldsRouter.test.ts +148 -0
- package/src/core-modules/segments/evaluateFieldsRouter.ts +94 -0
- package/src/core-modules/segments/evaluateOwned.ts +162 -0
- package/src/core-modules/segments/events.ts +142 -0
- package/src/core-modules/segments/fieldBuilders.ts +152 -0
- package/src/core-modules/segments/fieldMeta.ts +96 -0
- package/src/core-modules/segments/fieldRequests.test.ts +302 -0
- package/src/core-modules/segments/fieldRequests.ts +172 -0
- package/src/core-modules/segments/fieldSources.test.ts +99 -0
- package/src/core-modules/segments/fingerprint.test.ts +111 -0
- package/src/core-modules/segments/fingerprint.ts +70 -0
- package/src/core-modules/segments/index.ts +30 -0
- package/src/core-modules/segments/joinChanges.test.ts +96 -0
- package/src/core-modules/segments/joinChanges.ts +67 -0
- package/src/core-modules/segments/materialized.ts +23 -0
- package/src/core-modules/segments/measureRelations.test.ts +222 -0
- package/src/core-modules/segments/measureRelations.ts +322 -0
- package/src/core-modules/segments/memberQuery.test.ts +60 -0
- package/src/core-modules/segments/memberQuery.ts +45 -0
- package/src/core-modules/segments/membership.ts +170 -0
- package/src/core-modules/segments/mongoFilter.test.ts +326 -0
- package/src/core-modules/segments/mongoFilter.ts +355 -0
- package/src/core-modules/segments/nodeRefs.ts +29 -0
- package/src/core-modules/segments/nodes.ts +48 -0
- package/src/core-modules/segments/operators.ts +243 -0
- package/src/core-modules/segments/ownedSource.ts +16 -0
- package/src/core-modules/segments/plan.test.ts +172 -0
- package/src/core-modules/segments/plan.ts +155 -0
- package/src/core-modules/segments/relationRegistry.test.ts +64 -0
- package/src/core-modules/segments/relationRegistry.ts +198 -0
- package/src/core-modules/segments/segmentReference.test.ts +142 -0
- package/src/core-modules/segments/setupSegmentProducers.ts +77 -0
- package/src/core-modules/segments/subjectsReachedBy.ts +70 -0
- package/src/core-modules/segments/timeZone.ts +56 -0
- package/src/core-modules/segments/types.ts +97 -0
- package/src/core-modules/segments/utils.ts +122 -0
- package/src/core-modules/segments/walkNodes.ts +76 -0
- package/src/core-modules/segments/zodSchemas.ts +130 -0
- package/src/core-modules/segments/zonedTime.test.ts +163 -0
- package/src/core-modules/segments/zonedTime.ts +198 -0
- package/src/core-modules/templates/index.ts +1 -0
- package/src/core-modules/templates/utils.ts +91 -0
- package/src/core-modules/users/constants.ts +318 -0
- package/src/core-modules/users/db/definitions/users.ts +226 -0
- package/src/core-modules/users/index.ts +2 -0
- package/src/core-types/common.ts +183 -0
- package/src/core-types/index.ts +19 -0
- package/src/core-types/modules/app/app.ts +13 -0
- package/src/core-types/modules/automations/automations.ts +23 -0
- package/src/core-types/modules/contacts/company.ts +70 -0
- package/src/core-types/modules/contacts/contacts-common.ts +32 -0
- package/src/core-types/modules/contacts/customer.ts +94 -0
- package/src/core-types/modules/emailTemplates/emailTemplate.ts +19 -0
- package/src/core-types/modules/emailTemplates/index.ts +1 -0
- package/src/core-types/modules/logs/logs.ts +30 -0
- package/src/core-types/modules/permissions/permission.ts +63 -0
- package/src/core-types/modules/permissions/role.ts +24 -0
- package/src/core-types/modules/products/product.ts +100 -0
- package/src/core-types/modules/products/productCategory.ts +27 -0
- package/src/core-types/modules/products/productConfig.ts +10 -0
- package/src/core-types/modules/products/uom.ts +12 -0
- package/src/core-types/modules/relations/relations.ts +14 -0
- package/src/core-types/modules/saas/organization.ts +7 -0
- package/src/core-types/modules/structure/structure.ts +29 -0
- package/src/core-types/modules/tags/tag.ts +17 -0
- package/src/core-types/modules/team-member/structure.ts +23 -0
- package/src/core-types/modules/team-member/user.ts +93 -0
- package/src/index.ts +1 -0
- package/src/utils/agent-tools/auth.ts +129 -0
- package/src/utils/agent-tools/endpoints.ts +274 -0
- package/src/utils/agent-tools/index.ts +5 -0
- package/src/utils/agent-tools/manifest.ts +152 -0
- package/src/utils/agent-tools/responseLimit.test.ts +99 -0
- package/src/utils/agent-tools/responseLimit.ts +66 -0
- package/src/utils/agent-tools/types.ts +52 -0
- package/src/utils/apollo/beforeResolvers.ts +117 -0
- package/src/utils/apollo/commonTypeDefs.ts +78 -0
- package/src/utils/apollo/constants.ts +16 -0
- package/src/utils/apollo/customScalars.ts +69 -0
- package/src/utils/apollo/expectedErrorPlugin.ts +83 -0
- package/src/utils/apollo/index.ts +10 -0
- package/src/utils/apollo/runBeforeResolvers.ts +214 -0
- package/src/utils/apollo/utils.ts +80 -0
- package/src/utils/apollo/wrapperMutations.ts +75 -0
- package/src/utils/apollo/wrapperResolvers.ts +182 -0
- package/src/utils/bulkUtils.ts +62 -0
- package/src/utils/constants.ts +99 -0
- package/src/utils/editor.ts +412 -0
- package/src/utils/email/address.ts +42 -0
- package/src/utils/email/attachments.ts +74 -0
- package/src/utils/email/config.ts +46 -0
- package/src/utils/email/constants.ts +25 -0
- package/src/utils/email/index.ts +11 -0
- package/src/utils/email/providers/sendgrid.ts +280 -0
- package/src/utils/email/providers/sendgridEvents.ts +48 -0
- package/src/utils/email/providers/ses.ts +250 -0
- package/src/utils/email/providers/smtp.ts +99 -0
- package/src/utils/email/resolveProvider.ts +75 -0
- package/src/utils/email/service.ts +192 -0
- package/src/utils/email/types.ts +127 -0
- package/src/utils/errorClassifier.test.ts +231 -0
- package/src/utils/errorClassifier.ts +458 -0
- package/src/utils/file/read.ts +464 -0
- package/src/utils/file/upload.ts +531 -0
- package/src/utils/graphqlPubSub.ts +28 -0
- package/src/utils/headers/get-hostname.ts +18 -0
- package/src/utils/headers/index.ts +4 -0
- package/src/utils/headers/sanitize.ts +9 -0
- package/src/utils/headers/subdomain.ts +13 -0
- package/src/utils/headers/user.test.ts +76 -0
- package/src/utils/headers/user.ts +113 -0
- package/src/utils/index.ts +27 -0
- package/src/utils/knowledge.ts +107 -0
- package/src/utils/logs/index.ts +247 -0
- package/src/utils/mongo/cursor-util.ts +153 -0
- package/src/utils/mongo/generate-models.ts +97 -0
- package/src/utils/mongo/index.ts +5 -0
- package/src/utils/mongo/mongo-connection.ts +42 -0
- package/src/utils/mongo/mongoose-types.ts +26 -0
- package/src/utils/mongo/mongoose-utils.ts +329 -0
- package/src/utils/mongo/search-tokens.ts +193 -0
- package/src/utils/mq-worker.ts +150 -0
- package/src/utils/random.ts +6 -0
- package/src/utils/redis.ts +23 -0
- package/src/utils/saas/constants.ts +32 -0
- package/src/utils/saas/definition.ts +318 -0
- package/src/utils/saas/index.ts +2 -0
- package/src/utils/saas/saas-mongo-connection.ts +595 -0
- package/src/utils/saas/types.ts +107 -0
- package/src/utils/sanitize.ts +73 -0
- package/src/utils/sentry-init.ts +128 -0
- package/src/utils/sentry-instrument.ts +5 -0
- package/src/utils/serializablePayload.test.ts +65 -0
- package/src/utils/serializablePayload.ts +44 -0
- package/src/utils/service-discovery.ts +256 -0
- package/src/utils/start-plugin.ts +482 -0
- package/src/utils/string.ts +159 -0
- package/src/utils/trpc/index.ts +278 -0
- package/src/utils/trpc/sendCoreModuleProducer.ts +146 -0
- package/src/utils/trpc/trpc-setup.ts +91 -0
- package/src/utils/utils.ts +669 -0
- package/utils/dist/erxes-api-shared-utils.cjs.d.ts +2 -0
- package/utils/dist/erxes-api-shared-utils.cjs.dev.js +3066 -0
- package/utils/dist/erxes-api-shared-utils.cjs.js +7 -0
- package/utils/dist/erxes-api-shared-utils.cjs.prod.js +3066 -0
- package/utils/dist/erxes-api-shared-utils.esm.js +2776 -0
- package/utils/package.json +5 -0
- package/README.md +0 -3
|
@@ -0,0 +1,474 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { CheckCustomTriggerInput, FindObjectInput, LoadAiKnowledgeDocumentBatchInput, LookupAiToolInput, ReceiveActionsInput, ResolveOutputPathsInput, SetPropertiesInput } from "./zodTypes.js";
|
|
3
|
+
import { IAutomationExecution } from "./definitions/index.js";
|
|
4
|
+
import type { TKnowledgeDocument } from "../../utils/knowledge.js";
|
|
5
|
+
export type IAutomationContext = {
|
|
6
|
+
subdomain: string;
|
|
7
|
+
processId?: string;
|
|
8
|
+
};
|
|
9
|
+
export type TAutomationOutputVariable = {
|
|
10
|
+
key: string;
|
|
11
|
+
label: string;
|
|
12
|
+
exposure?: 'placeholder' | 'reference';
|
|
13
|
+
isLink?: boolean;
|
|
14
|
+
field?: string;
|
|
15
|
+
/** Plain sub-fields of an array/object value, resolved from the source itself (no reference lookup). */
|
|
16
|
+
fields?: TAutomationOutputVariable[];
|
|
17
|
+
referenceFields?: TAutomationOutputVariable[];
|
|
18
|
+
referenceType?: string;
|
|
19
|
+
sourceType?: string;
|
|
20
|
+
type?: string;
|
|
21
|
+
};
|
|
22
|
+
export type TAutomationOutputPropertySource = {
|
|
23
|
+
key: string;
|
|
24
|
+
label: string;
|
|
25
|
+
propertyType: string;
|
|
26
|
+
};
|
|
27
|
+
export type TAutomationOutputDefinition = {
|
|
28
|
+
variables: TAutomationOutputVariable[];
|
|
29
|
+
propertySource?: TAutomationOutputPropertySource;
|
|
30
|
+
resolverKeys?: string[];
|
|
31
|
+
};
|
|
32
|
+
export type TAutomationSetPropertyTarget = {
|
|
33
|
+
label: string;
|
|
34
|
+
description?: string;
|
|
35
|
+
type: string;
|
|
36
|
+
source: 'target' | 'relation' | 'resolver' | 'targetField';
|
|
37
|
+
cardinality: 'one' | 'many';
|
|
38
|
+
sourceType?: string;
|
|
39
|
+
relation?: {
|
|
40
|
+
contentType: string;
|
|
41
|
+
relatedContentType: string;
|
|
42
|
+
};
|
|
43
|
+
resolverKey?: string;
|
|
44
|
+
targetPath?: string;
|
|
45
|
+
};
|
|
46
|
+
export type TAutomationRuntimeOutputResolver<TTarget = Record<string, any>> = (args: {
|
|
47
|
+
subdomain: string;
|
|
48
|
+
source: TTarget;
|
|
49
|
+
path: string;
|
|
50
|
+
defaultValue?: any;
|
|
51
|
+
}) => any | Promise<any>;
|
|
52
|
+
export type TAutomationRuntimeOutputDefinition<TTarget = any> = TAutomationOutputDefinition & {
|
|
53
|
+
resolvers?: Record<string, TAutomationRuntimeOutputResolver<TTarget>>;
|
|
54
|
+
};
|
|
55
|
+
export type TAutomationFindObjectLookupFieldDefinition = {
|
|
56
|
+
value: string;
|
|
57
|
+
label: string;
|
|
58
|
+
};
|
|
59
|
+
export type TAutomationFindObjectTargetDefinition = {
|
|
60
|
+
value: string;
|
|
61
|
+
label: string;
|
|
62
|
+
lookupFields: TAutomationFindObjectLookupFieldDefinition[];
|
|
63
|
+
output?: TAutomationRuntimeOutputDefinition;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* A value an action reads from whatever started the run. The action names
|
|
67
|
+
* what it needs; it never learns which record supplied it.
|
|
68
|
+
*/
|
|
69
|
+
export type TAutomationActionInput = {
|
|
70
|
+
key: string;
|
|
71
|
+
label: string;
|
|
72
|
+
type: 'number' | 'string' | 'array' | 'object';
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Per action type, which of the trigger's own output keys fills each of that
|
|
76
|
+
* action's inputs. Declared by the trigger's plugin, so no one maps by hand.
|
|
77
|
+
*/
|
|
78
|
+
export type TAutomationTriggerActionInputs = Record<string, Record<string, string>>;
|
|
79
|
+
export type IAutomationsTriggerConfig = {
|
|
80
|
+
type?: string;
|
|
81
|
+
moduleName?: string;
|
|
82
|
+
collectionName?: string;
|
|
83
|
+
relationType?: string;
|
|
84
|
+
icon: string;
|
|
85
|
+
label: string;
|
|
86
|
+
description: string;
|
|
87
|
+
isCustom?: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* An event trigger: every event starts a run, even for a record that
|
|
90
|
+
* already went through this automation (a tier reached again). Without it a
|
|
91
|
+
* record enrolls once unless the automation sets its own re-enrollment.
|
|
92
|
+
*/
|
|
93
|
+
reEnrollment?: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Each event is its own occurrence (a deal reaching a stage), so the
|
|
96
|
+
* automation may offer "every time it happens" as a re-enrollment rule.
|
|
97
|
+
*/
|
|
98
|
+
reEnrollable?: boolean;
|
|
99
|
+
output?: TAutomationRuntimeOutputDefinition;
|
|
100
|
+
actionInputs?: TAutomationTriggerActionInputs;
|
|
101
|
+
conditions?: {
|
|
102
|
+
type: string;
|
|
103
|
+
icon: string;
|
|
104
|
+
label: string;
|
|
105
|
+
description: string;
|
|
106
|
+
}[];
|
|
107
|
+
setPropertyTargets?: TAutomationSetPropertyTarget[];
|
|
108
|
+
};
|
|
109
|
+
export type IAutomationsActionConfigFolkConfig = {
|
|
110
|
+
key: string;
|
|
111
|
+
label: string;
|
|
112
|
+
type: TAutomationActionFolks;
|
|
113
|
+
};
|
|
114
|
+
export type TDeferredMode = 'standby' | 'ignore';
|
|
115
|
+
export type IAutomationsDeferredConfig = {
|
|
116
|
+
enable: boolean;
|
|
117
|
+
mode: TDeferredMode;
|
|
118
|
+
timeoutMinutes?: number;
|
|
119
|
+
};
|
|
120
|
+
export type IAutomationDeferredMarker = {
|
|
121
|
+
jobId: string;
|
|
122
|
+
mode: TDeferredMode;
|
|
123
|
+
timeoutMinutes?: number;
|
|
124
|
+
};
|
|
125
|
+
export type IAutomationsActionConfig = {
|
|
126
|
+
type?: string;
|
|
127
|
+
moduleName?: string;
|
|
128
|
+
collectionName?: string;
|
|
129
|
+
method?: 'create';
|
|
130
|
+
icon: string;
|
|
131
|
+
label: string;
|
|
132
|
+
description: string;
|
|
133
|
+
group?: string;
|
|
134
|
+
isAvailableOptionalConnect?: boolean;
|
|
135
|
+
emailRecipientsConst?: any;
|
|
136
|
+
isTargetSource?: boolean;
|
|
137
|
+
targetSourceType?: string;
|
|
138
|
+
allowTargetFromActions?: boolean;
|
|
139
|
+
allowedMultiTriggerTypes?: string[];
|
|
140
|
+
/**
|
|
141
|
+
* Target record types this action can operate on, named with the same
|
|
142
|
+
* identifiers as trigger types. Declaring nothing means the action is
|
|
143
|
+
* target-agnostic and any caller may use it.
|
|
144
|
+
*
|
|
145
|
+
* Callers that supply their own target (a broadcast enrolling customers, an
|
|
146
|
+
* AI agent, a manual run) check what they supply against this, so an action
|
|
147
|
+
* never needs a per-caller flag.
|
|
148
|
+
*/
|
|
149
|
+
requiresTargetTypes?: string[];
|
|
150
|
+
folks?: IAutomationsActionConfigFolkConfig[];
|
|
151
|
+
output?: TAutomationRuntimeOutputDefinition;
|
|
152
|
+
inputs?: TAutomationActionInput[];
|
|
153
|
+
setPropertyTargets?: TAutomationSetPropertyTarget[];
|
|
154
|
+
deferred?: IAutomationsDeferredConfig;
|
|
155
|
+
/**
|
|
156
|
+
* Whether the action can carry a retry / error-branch policy. Declaring
|
|
157
|
+
* nothing means it can, unless the action defers its work — a deferred
|
|
158
|
+
* failure is reported long after the flow moved on, so the policy would
|
|
159
|
+
* have nothing left to act on.
|
|
160
|
+
*/
|
|
161
|
+
errorPolicy?: {
|
|
162
|
+
supported: boolean;
|
|
163
|
+
};
|
|
164
|
+
/**
|
|
165
|
+
* The action creates records that belong to someone, so the run needs a
|
|
166
|
+
* person to act for — the automation's owner. Declaring nothing means the
|
|
167
|
+
* action owns nothing and never asks who it is acting as.
|
|
168
|
+
*/
|
|
169
|
+
requiresActor?: boolean;
|
|
170
|
+
};
|
|
171
|
+
export type IAutomationsBotsConfig = {
|
|
172
|
+
moduleName: string;
|
|
173
|
+
name: string;
|
|
174
|
+
label: string;
|
|
175
|
+
description: string;
|
|
176
|
+
logo: string;
|
|
177
|
+
totalCountQueryName: string;
|
|
178
|
+
};
|
|
179
|
+
export type TAiKnowledgeSourceConfig = {
|
|
180
|
+
key: string;
|
|
181
|
+
label: string;
|
|
182
|
+
moduleName: string;
|
|
183
|
+
sourceSelector: 'remote-module' | 'local';
|
|
184
|
+
supportsFullScope?: boolean;
|
|
185
|
+
};
|
|
186
|
+
export type TAiToolConfig = {
|
|
187
|
+
key: string;
|
|
188
|
+
label: string;
|
|
189
|
+
moduleName: string;
|
|
190
|
+
input: string;
|
|
191
|
+
output: string;
|
|
192
|
+
};
|
|
193
|
+
export type TAutomationAiConfig = {
|
|
194
|
+
knowledgeSources?: TAiKnowledgeSourceConfig[];
|
|
195
|
+
tools?: TAiToolConfig[];
|
|
196
|
+
};
|
|
197
|
+
export type TAiToolLookupResult = {
|
|
198
|
+
toolKey: string;
|
|
199
|
+
title: string;
|
|
200
|
+
items: Record<string, unknown>[];
|
|
201
|
+
summary?: string;
|
|
202
|
+
};
|
|
203
|
+
export type TAiKnowledgeDocumentBatchResult = {
|
|
204
|
+
documents: TKnowledgeDocument[];
|
|
205
|
+
totalCount: number;
|
|
206
|
+
nextCursor?: string;
|
|
207
|
+
hasMore: boolean;
|
|
208
|
+
};
|
|
209
|
+
export type TAiContextHistoryItem = {
|
|
210
|
+
type?: string;
|
|
211
|
+
role?: 'customer' | 'agent' | 'bot' | 'system' | 'user' | 'assistant';
|
|
212
|
+
text?: string;
|
|
213
|
+
createdAt?: string;
|
|
214
|
+
meta?: Record<string, unknown>;
|
|
215
|
+
};
|
|
216
|
+
export type TAiContext = {
|
|
217
|
+
version: 1;
|
|
218
|
+
input?: {
|
|
219
|
+
text?: string;
|
|
220
|
+
id?: string;
|
|
221
|
+
createdAt?: string;
|
|
222
|
+
};
|
|
223
|
+
history?: TAiContextHistoryItem[];
|
|
224
|
+
facts?: Record<string, unknown>;
|
|
225
|
+
memory?: {
|
|
226
|
+
scopeKey?: string;
|
|
227
|
+
};
|
|
228
|
+
};
|
|
229
|
+
type IAutomationTriggersActionsConfig = {
|
|
230
|
+
triggers: IAutomationsTriggerConfig[];
|
|
231
|
+
actions?: IAutomationsActionConfig[];
|
|
232
|
+
} | {
|
|
233
|
+
triggers?: IAutomationsTriggerConfig[];
|
|
234
|
+
actions: IAutomationsActionConfig[];
|
|
235
|
+
};
|
|
236
|
+
export type AutomationConstants = IAutomationTriggersActionsConfig & {
|
|
237
|
+
bots?: IAutomationsBotsConfig[];
|
|
238
|
+
findObjectTargets?: TAutomationFindObjectTargetDefinition[];
|
|
239
|
+
setPropertyTargets?: TAutomationSetPropertyTarget[];
|
|
240
|
+
ai?: TAutomationAiConfig;
|
|
241
|
+
/**
|
|
242
|
+
* Flows shipped with the code, not created by a tenant. They exist from the
|
|
243
|
+
* moment the plugin is deployed and are never written to a tenant database:
|
|
244
|
+
* a copy is only materialized when someone installs one.
|
|
245
|
+
*/
|
|
246
|
+
workflowTemplates?: TAutomationBuiltInTemplate[];
|
|
247
|
+
};
|
|
248
|
+
/**
|
|
249
|
+
* A step of a built-in template.
|
|
250
|
+
*
|
|
251
|
+
* Addressed by `order` rather than by id: ids are generated per automation, so
|
|
252
|
+
* a template that hardcoded them could never be installed twice. Installing
|
|
253
|
+
* maps every order to a fresh id and rewrites the connections with it.
|
|
254
|
+
*/
|
|
255
|
+
export type TAutomationBuiltInTemplateStep = {
|
|
256
|
+
order: number;
|
|
257
|
+
type: string;
|
|
258
|
+
label?: string;
|
|
259
|
+
description?: string;
|
|
260
|
+
icon?: string;
|
|
261
|
+
config?: Record<string, any>;
|
|
262
|
+
/**
|
|
263
|
+
* What runs after this step: a plain chain (`2`), or the branch handles of a
|
|
264
|
+
* step that has more than one output (`{ yes: 2, no: 3 }` for `if`,
|
|
265
|
+
* `{ isExists: 2, notExists: 3 }` for `findObject`).
|
|
266
|
+
*/
|
|
267
|
+
next?: number | Record<string, number>;
|
|
268
|
+
};
|
|
269
|
+
/**
|
|
270
|
+
* Something the tenant must already have before a template can work — a bot, a
|
|
271
|
+
* pipeline stage, an integration. The value is chosen once, while installing,
|
|
272
|
+
* by a component the owning plugin provides: only that plugin knows what
|
|
273
|
+
* counts as a valid candidate and how to list them.
|
|
274
|
+
*/
|
|
275
|
+
export type TAutomationBuiltInTemplateRequirement = {
|
|
276
|
+
/** Unique within the template; how `dependsOn` refers to another one. */
|
|
277
|
+
key: string;
|
|
278
|
+
/** Resolved by the owning plugin's `templateRequirement` component. */
|
|
279
|
+
kind: string;
|
|
280
|
+
label: string;
|
|
281
|
+
description?: string;
|
|
282
|
+
/**
|
|
283
|
+
* Where the chosen value lands in the flow. Omitted for a requirement that
|
|
284
|
+
* only gates — something that must exist but fills nothing in.
|
|
285
|
+
*
|
|
286
|
+
* `from` names a field of the answer when the component reports an object
|
|
287
|
+
* rather than a scalar, so one choice can settle everything it implies — an
|
|
288
|
+
* address and the name that goes with it, a pipeline and its label.
|
|
289
|
+
*/
|
|
290
|
+
fills?: {
|
|
291
|
+
order: number;
|
|
292
|
+
path: string;
|
|
293
|
+
from?: string;
|
|
294
|
+
}[];
|
|
295
|
+
/** Stays unanswerable until that requirement has a value (stage needs its pipeline). */
|
|
296
|
+
dependsOn?: string;
|
|
297
|
+
};
|
|
298
|
+
export type TAutomationBuiltInTemplate = {
|
|
299
|
+
/** Stable across deploys; how an installed copy still names its origin. */
|
|
300
|
+
id: string;
|
|
301
|
+
name: string;
|
|
302
|
+
description?: string;
|
|
303
|
+
flow: TAutomationBuiltInTemplateStep[];
|
|
304
|
+
requirements?: TAutomationBuiltInTemplateRequirement[];
|
|
305
|
+
/**
|
|
306
|
+
* Fields the template deliberately leaves empty because only the
|
|
307
|
+
* organization can write them — its own name in a signature, the wording of
|
|
308
|
+
* an offer. Unlike a requirement these never block installing; they are
|
|
309
|
+
* listed so the flow is not installed and then quietly left unfinished.
|
|
310
|
+
*/
|
|
311
|
+
mustConfigure?: {
|
|
312
|
+
order: number;
|
|
313
|
+
label: string;
|
|
314
|
+
}[];
|
|
315
|
+
};
|
|
316
|
+
export type TAutomationFindObjectResult = {
|
|
317
|
+
found: boolean;
|
|
318
|
+
objectType: string;
|
|
319
|
+
objectId?: string;
|
|
320
|
+
object: Record<string, any> | null;
|
|
321
|
+
matchedBy: {
|
|
322
|
+
field: string;
|
|
323
|
+
value: string;
|
|
324
|
+
};
|
|
325
|
+
};
|
|
326
|
+
export interface AutomationProducers {
|
|
327
|
+
receiveActions?: (args: z.infer<typeof ReceiveActionsInput>, context: IAutomationContext) => Promise<{
|
|
328
|
+
result: any;
|
|
329
|
+
waitCondition?: {
|
|
330
|
+
shouldCheckOptionalConnect: any[];
|
|
331
|
+
targetId?: string;
|
|
332
|
+
expectedState: Record<string, any>;
|
|
333
|
+
propertyName: string;
|
|
334
|
+
expectedStateConjunction: 'every' | 'some';
|
|
335
|
+
};
|
|
336
|
+
}>;
|
|
337
|
+
generateAiContext?: (args: {
|
|
338
|
+
subdomain: string;
|
|
339
|
+
data: {
|
|
340
|
+
moduleName: string;
|
|
341
|
+
collectionType?: string;
|
|
342
|
+
triggerType: string;
|
|
343
|
+
target: Record<string, any>;
|
|
344
|
+
};
|
|
345
|
+
}, context: IAutomationContext) => Promise<TAiContext | null>;
|
|
346
|
+
loadAiKnowledgeDocumentBatch?: (args: z.infer<typeof LoadAiKnowledgeDocumentBatchInput>, context: IAutomationContext) => Promise<TAiKnowledgeDocumentBatchResult>;
|
|
347
|
+
lookupAiTool?: (args: z.infer<typeof LookupAiToolInput>, context: IAutomationContext) => Promise<TAiToolLookupResult>;
|
|
348
|
+
resolveOutputPaths?: (args: z.infer<typeof ResolveOutputPathsInput>, context: IAutomationContext) => Promise<Record<string, any>>;
|
|
349
|
+
checkCustomTrigger?: (args: z.infer<typeof CheckCustomTriggerInput>, context: IAutomationContext) => Promise<boolean>;
|
|
350
|
+
findObject?: (args: z.infer<typeof FindObjectInput>, context: IAutomationContext) => Promise<TAutomationFindObjectResult>;
|
|
351
|
+
setProperties?: (args: z.infer<typeof SetPropertiesInput>, context: IAutomationContext) => Promise<TAutomationSetPropertyResult>;
|
|
352
|
+
}
|
|
353
|
+
export interface AutomationConfigs extends AutomationProducers {
|
|
354
|
+
constants?: AutomationConstants;
|
|
355
|
+
}
|
|
356
|
+
export interface IPerValueProps<TModels> {
|
|
357
|
+
models: TModels;
|
|
358
|
+
subdomain: string;
|
|
359
|
+
relatedItem: Record<string, unknown>;
|
|
360
|
+
rule: TAutomationSetPropertyRule;
|
|
361
|
+
target: Record<string, unknown>;
|
|
362
|
+
triggerType?: string;
|
|
363
|
+
targetType?: string;
|
|
364
|
+
serviceName?: string;
|
|
365
|
+
execution: Record<string, unknown>;
|
|
366
|
+
}
|
|
367
|
+
export type TAutomationSetPropertyRule = {
|
|
368
|
+
field: string;
|
|
369
|
+
fieldLabel?: string;
|
|
370
|
+
operator: string;
|
|
371
|
+
value?: unknown;
|
|
372
|
+
fallbackValue?: unknown;
|
|
373
|
+
forwardTo?: unknown;
|
|
374
|
+
isExpression?: boolean;
|
|
375
|
+
};
|
|
376
|
+
export type TAutomationSetPropertyChange = {
|
|
377
|
+
field: string;
|
|
378
|
+
fieldLabel: string;
|
|
379
|
+
operator: string;
|
|
380
|
+
placeholder?: string;
|
|
381
|
+
value?: unknown;
|
|
382
|
+
status: 'updated' | 'cleared' | 'skipped' | 'failed';
|
|
383
|
+
};
|
|
384
|
+
export type TAutomationSetPropertyResult = {
|
|
385
|
+
target: {
|
|
386
|
+
label: string;
|
|
387
|
+
type: string;
|
|
388
|
+
count: number;
|
|
389
|
+
};
|
|
390
|
+
changes: TAutomationSetPropertyChange[];
|
|
391
|
+
summary: string;
|
|
392
|
+
};
|
|
393
|
+
export type TAutomationSetPropertyModifier = {
|
|
394
|
+
$set?: Record<string, unknown>;
|
|
395
|
+
$unset?: Record<string, unknown>;
|
|
396
|
+
$push?: Record<string, unknown>;
|
|
397
|
+
$addToSet?: Record<string, unknown>;
|
|
398
|
+
$pull?: Record<string, unknown>;
|
|
399
|
+
};
|
|
400
|
+
export type TAutomationSetPropertyUpdateArgs = {
|
|
401
|
+
selector: Record<string, unknown>;
|
|
402
|
+
modifier: TAutomationSetPropertyModifier;
|
|
403
|
+
item?: Record<string, unknown>;
|
|
404
|
+
};
|
|
405
|
+
export interface IPropertyProps<TModels> {
|
|
406
|
+
models: TModels;
|
|
407
|
+
subdomain: string;
|
|
408
|
+
module: string;
|
|
409
|
+
rules: TAutomationSetPropertyRule[];
|
|
410
|
+
execution: IAutomationExecution;
|
|
411
|
+
setPropertyTarget?: TAutomationSetPropertyTarget;
|
|
412
|
+
relatedItems?: Record<string, unknown>[];
|
|
413
|
+
selector?: Record<string, unknown>;
|
|
414
|
+
fetchItems?: (selector: Record<string, unknown>) => Promise<Record<string, unknown>[]>;
|
|
415
|
+
update?: (args: TAutomationSetPropertyUpdateArgs) => Promise<unknown>;
|
|
416
|
+
triggerType?: string;
|
|
417
|
+
targetType?: string;
|
|
418
|
+
}
|
|
419
|
+
export declare enum EXECUTE_WAIT_TYPES {
|
|
420
|
+
DELAY = "delay",
|
|
421
|
+
IS_IN_SEGMENT = "isInSegment",
|
|
422
|
+
CHECK_OBJECT = "checkObject",
|
|
423
|
+
WEBHOOK = "webhook"
|
|
424
|
+
}
|
|
425
|
+
export type TAutomationExecutionDelay = {
|
|
426
|
+
subdomain: string;
|
|
427
|
+
waitFor: number;
|
|
428
|
+
timeUnit: 'minute' | 'hour' | 'day' | 'month' | 'year';
|
|
429
|
+
startWaitingDate?: Date;
|
|
430
|
+
};
|
|
431
|
+
export type TAutomationExecutionCheckObject = {
|
|
432
|
+
contentType?: string;
|
|
433
|
+
shouldCheckOptionalConnect?: boolean;
|
|
434
|
+
targetId?: string;
|
|
435
|
+
expectedState: Record<string, any>;
|
|
436
|
+
propertyName: string;
|
|
437
|
+
expectedStateConjunction?: 'every' | 'some';
|
|
438
|
+
timeout?: Date;
|
|
439
|
+
};
|
|
440
|
+
export type TAutomationExecutionIsInSegment = {
|
|
441
|
+
targetId: string;
|
|
442
|
+
segmentId: string;
|
|
443
|
+
};
|
|
444
|
+
export type TAutomationExecutionWebhook = {
|
|
445
|
+
endpoint: string;
|
|
446
|
+
secret?: string;
|
|
447
|
+
schema: any;
|
|
448
|
+
};
|
|
449
|
+
export type AutomationExecutionSetWaitCondition = ({
|
|
450
|
+
type: EXECUTE_WAIT_TYPES.DELAY;
|
|
451
|
+
} & TAutomationExecutionDelay) | ({
|
|
452
|
+
type: EXECUTE_WAIT_TYPES.CHECK_OBJECT;
|
|
453
|
+
} & TAutomationExecutionCheckObject) | ({
|
|
454
|
+
type: EXECUTE_WAIT_TYPES.IS_IN_SEGMENT;
|
|
455
|
+
} & TAutomationExecutionIsInSegment) | ({
|
|
456
|
+
type: EXECUTE_WAIT_TYPES.WEBHOOK;
|
|
457
|
+
} & TAutomationExecutionWebhook);
|
|
458
|
+
export declare enum TAutomationProducers {
|
|
459
|
+
RECEIVE_ACTIONS = "receiveActions",
|
|
460
|
+
RESOLVE_OUTPUT_PATHS = "resolveOutputPaths",
|
|
461
|
+
CHECK_CUSTOM_TRIGGER = "checkCustomTrigger",
|
|
462
|
+
FIND_OBJECT = "findObject",
|
|
463
|
+
SET_PROPERTIES = "setProperties",
|
|
464
|
+
GENERATE_AI_CONTEXT = "generateAiContext",
|
|
465
|
+
LOAD_AI_KNOWLEDGE_DOCUMENT_BATCH = "loadAiKnowledgeDocumentBatch",
|
|
466
|
+
LOOKUP_AI_TOOL = "lookupAiTool"
|
|
467
|
+
}
|
|
468
|
+
export declare enum TAutomationActionFolks {
|
|
469
|
+
DEFAULT = "default",
|
|
470
|
+
SUCCESS = "success",
|
|
471
|
+
ERROR = "error"
|
|
472
|
+
}
|
|
473
|
+
export {};
|
|
474
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"../../../../../src/core-modules/automations","sources":["types.ts"],"names":[],"mapp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CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC5C,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,GAAG,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,mCAAmC,GAC3C,CAAC;IACC,IAAI,EAAE,kBAAkB,CAAC,KAAK,CAAC;CAChC,GAAG,yBAAyB,CAAC,GAC9B,CAAC;IACC,IAAI,EAAE,kBAAkB,CAAC,YAAY,CAAC;CACvC,GAAG,+BAA+B,CAAC,GACpC,CAAC;IACC,IAAI,EAAE,kBAAkB,CAAC,aAAa,CAAC;CACxC,GAAG,+BAA+B,CAAC,GACpC,CAAC;IACC,IAAI,EAAE,kBAAkB,CAAC,OAAO,CAAC;CAClC,GAAG,2BAA2B,CAAC,CAAC;AAErC,oBAAY,oBAAoB;IAC9B,eAAe,mBAAmB;IAClC,oBAAoB,uBAAuB;IAC3C,oBAAoB,uBAAuB;IAC3C,WAAW,eAAe;IAC1B,cAAc,kBAAkB;IAChC,mBAAmB,sBAAsB;IACzC,gCAAgC,iCAAiC;IACjE,cAAc,iBAAiB;CAChC;AAED,oBAAY,sBAAsB;IAChC,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,KAAK,UAAU;CAChB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { IPropertyProps, TAutomationSetPropertyChange, TAutomationSetPropertyModifier, TAutomationSetPropertyRule } from "./types.js";
|
|
2
|
+
export { splitType } from "./typeUtils.js";
|
|
3
|
+
export declare const buildSetPropertyModifier: ({ subdomain, rules, execution, relatedItem, }: {
|
|
4
|
+
subdomain: string;
|
|
5
|
+
rules: TAutomationSetPropertyRule[];
|
|
6
|
+
execution: IPropertyProps<unknown>["execution"];
|
|
7
|
+
relatedItem?: Record<string, unknown>;
|
|
8
|
+
}) => Promise<TAutomationSetPropertyModifier>;
|
|
9
|
+
export declare const getSetPropertySelector: ({ subdomain, module, execution, targetType, relation, targetPath, }: {
|
|
10
|
+
subdomain: string;
|
|
11
|
+
module: string;
|
|
12
|
+
execution: IPropertyProps<unknown>["execution"];
|
|
13
|
+
targetType: string;
|
|
14
|
+
relation?: {
|
|
15
|
+
contentType: string;
|
|
16
|
+
relatedContentType: string;
|
|
17
|
+
};
|
|
18
|
+
targetPath?: string;
|
|
19
|
+
}) => Promise<{
|
|
20
|
+
_id: string;
|
|
21
|
+
} | {
|
|
22
|
+
_id: {
|
|
23
|
+
$in: unknown[];
|
|
24
|
+
};
|
|
25
|
+
}>;
|
|
26
|
+
export declare const setProperty: <TModels>({ subdomain, module, rules, execution, setPropertyTarget, relatedItems, selector, fetchItems, update, }: IPropertyProps<TModels>) => Promise<{
|
|
27
|
+
target: {
|
|
28
|
+
label: string;
|
|
29
|
+
type: string;
|
|
30
|
+
count: number;
|
|
31
|
+
};
|
|
32
|
+
changes: TAutomationSetPropertyChange[];
|
|
33
|
+
summary: string;
|
|
34
|
+
}>;
|
|
35
|
+
export declare const getContentType: (type: string) => string;
|
|
36
|
+
export declare const getModuleName: (type: string) => string;
|
|
37
|
+
export declare const getPluginName: (type: string) => string;
|
|
38
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"../../../../../src/core-modules/automations","sources":["utils.ts"],"names":[],"mappings":"AASA,OAAO,EACL,cAAc,EACd,4BAA4B,EAC5B,8BAA8B,EAC9B,0BAA0B,EAE3B,mBAAgB;AAIjB,OAAO,EAAE,SAAS,EAAE,uBAAoB;AAyexC,eAAO,MAAM,wBAAwB,GAAU,+CAK5C;IACD,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,0BAA0B,EAAE,CAAC;IACpC,SAAS,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,CAAC;IAChD,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACvC,4CASA,CAAC;AAkZF,eAAO,MAAM,sBAAsB,GAAU,qEAO1C;IACD,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,CAAC;IAChD,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE;QACT,WAAW,EAAE,MAAM,CAAC;QACpB,kBAAkB,EAAE,MAAM,CAAC;KAC5B,CAAC;IACF,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;;;;;;EAiDA,CAAC;AAEF,eAAO,MAAM,WAAW,GAAU,OAAO,EAAE,yGAUxC,cAAc,CAAC,OAAO,CAAC;;;;;;;;EAoHzB,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,MAAM,MAAM,WAAuB,CAAC;AACnE,eAAO,MAAM,aAAa,GAAI,MAAM,MAAM,WAAuB,CAAC;AAClE,eAAO,MAAM,aAAa,GAAI,MAAM,MAAM,WAAuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflowValidation.d.ts","sourceRoot":"../../../../../src/core-modules/automations","sources":["workflowValidation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACpB,qCAAkC;AAMnC,eAAO,MAAM,wBAAwB,GACnC,YAAW,mBAAmB,EAAO,EACrC,UAAS,iBAAiB,EAAO,aAoBlC,CAAC"}
|