@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,25 @@
|
|
|
1
|
+
import { Readable } from 'stream';
|
|
2
|
+
/**
|
|
3
|
+
* Stream a CSV file row by row.
|
|
4
|
+
*
|
|
5
|
+
* Memory usage is O(1 row) instead of O(file size): bytes flow from the
|
|
6
|
+
* source stream (e.g. an S3 GetObject stream) through csv-parse, and each
|
|
7
|
+
* row is yielded as soon as it is parsed.
|
|
8
|
+
*
|
|
9
|
+
* Error propagation: if the source stream errors mid-download (e.g. S3
|
|
10
|
+
* connection drop) we destroy the csv-parse transform with the same error,
|
|
11
|
+
* which causes the outer `for await` in the worker to throw. The import
|
|
12
|
+
* job then correctly transitions to `failed` instead of silently finishing
|
|
13
|
+
* with partial data or crashing the worker process.
|
|
14
|
+
*/
|
|
15
|
+
export declare function processCSVStream(input: Readable): AsyncGenerator<string[], void, unknown>;
|
|
16
|
+
/**
|
|
17
|
+
* Count the data rows of a CSV file (header excluded).
|
|
18
|
+
*
|
|
19
|
+
* The worker needs a real denominator before it starts: without it,
|
|
20
|
+
* progress is computed against "rows read so far", which makes the bar
|
|
21
|
+
* jump backwards on every batch and pins the ETA near zero. Counting is a
|
|
22
|
+
* separate streaming pass — it never holds more than one row in memory.
|
|
23
|
+
*/
|
|
24
|
+
export declare function countCsvDataRows(input: Readable): Promise<number>;
|
|
25
|
+
//# sourceMappingURL=importUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"importUtils.d.ts","sourceRoot":"../../../../../../src/core-modules/import-export/utils","sources":["importUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAGlC;;;;;;;;;;;;GAYG;AACH,wBAAuB,gBAAgB,CACrC,KAAK,EAAE,QAAQ,GACd,cAAc,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,CAqBzC;AAED;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CAAC,KAAK,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CASvE"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Express } from 'express';
|
|
2
|
+
import { ImportExportConfigs } from "./types.js";
|
|
3
|
+
export declare const startImportExportWorker: ({ pluginName, config, app, }: {
|
|
4
|
+
pluginName: string;
|
|
5
|
+
config: ImportExportConfigs;
|
|
6
|
+
app: Express;
|
|
7
|
+
}) => void;
|
|
8
|
+
//# sourceMappingURL=worker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worker.d.ts","sourceRoot":"../../../../../src/core-modules/import-export","sources":["worker.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAUlC,OAAO,EAAmB,mBAAmB,EAAmB,mBAAgB;AAoIhF,eAAO,MAAM,uBAAuB,GAAI,8BAIrC;IACD,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,mBAAmB,CAAC;IAC5B,GAAG,EAAE,OAAO,CAAC;CACd,SA8DA,CAAC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { TImportExportProducers } from "./types.js";
|
|
3
|
+
export declare const InsertImportRowsInput: z.ZodObject<{
|
|
4
|
+
moduleName: z.ZodString;
|
|
5
|
+
collectionName: z.ZodString;
|
|
6
|
+
rows: z.ZodArray<z.ZodAny, "many">;
|
|
7
|
+
userId: z.ZodString;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
moduleName: string;
|
|
10
|
+
userId: string;
|
|
11
|
+
collectionName: string;
|
|
12
|
+
rows: any[];
|
|
13
|
+
}, {
|
|
14
|
+
moduleName: string;
|
|
15
|
+
userId: string;
|
|
16
|
+
collectionName: string;
|
|
17
|
+
rows: any[];
|
|
18
|
+
}>;
|
|
19
|
+
export declare const GetExportHeadersInput: z.ZodObject<{
|
|
20
|
+
moduleName: z.ZodString;
|
|
21
|
+
collectionName: z.ZodString;
|
|
22
|
+
filters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
23
|
+
}, "strip", z.ZodTypeAny, {
|
|
24
|
+
moduleName: string;
|
|
25
|
+
collectionName: string;
|
|
26
|
+
filters?: Record<string, unknown> | undefined;
|
|
27
|
+
}, {
|
|
28
|
+
moduleName: string;
|
|
29
|
+
collectionName: string;
|
|
30
|
+
filters?: Record<string, unknown> | undefined;
|
|
31
|
+
}>;
|
|
32
|
+
export declare const BatchSkipRowInput: z.ZodObject<{
|
|
33
|
+
moduleName: z.ZodString;
|
|
34
|
+
collectionName: z.ZodString;
|
|
35
|
+
rowData: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
36
|
+
}, "strip", z.ZodTypeAny, {
|
|
37
|
+
moduleName: string;
|
|
38
|
+
collectionName: string;
|
|
39
|
+
rowData: Record<string, any>;
|
|
40
|
+
}, {
|
|
41
|
+
moduleName: string;
|
|
42
|
+
collectionName: string;
|
|
43
|
+
rowData: Record<string, any>;
|
|
44
|
+
}>;
|
|
45
|
+
export type TGetExportHeadersInput = z.infer<typeof GetExportHeadersInput>;
|
|
46
|
+
export declare const GetExportDataInput: z.ZodObject<{
|
|
47
|
+
moduleName: z.ZodString;
|
|
48
|
+
collectionName: z.ZodString;
|
|
49
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
50
|
+
limit: z.ZodNumber;
|
|
51
|
+
filters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
52
|
+
ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
53
|
+
}, "strip", z.ZodTypeAny, {
|
|
54
|
+
limit: number;
|
|
55
|
+
moduleName: string;
|
|
56
|
+
collectionName: string;
|
|
57
|
+
ids?: string[] | undefined;
|
|
58
|
+
cursor?: string | undefined;
|
|
59
|
+
filters?: Record<string, unknown> | undefined;
|
|
60
|
+
}, {
|
|
61
|
+
limit: number;
|
|
62
|
+
moduleName: string;
|
|
63
|
+
collectionName: string;
|
|
64
|
+
ids?: string[] | undefined;
|
|
65
|
+
cursor?: string | undefined;
|
|
66
|
+
filters?: Record<string, unknown> | undefined;
|
|
67
|
+
}>;
|
|
68
|
+
export type TGetExportDataInput = z.infer<typeof GetExportDataInput>;
|
|
69
|
+
type TInsertImportRowsInput = z.infer<typeof InsertImportRowsInput>;
|
|
70
|
+
export type TBatchSkipRowProducerInput = z.infer<typeof BatchSkipRowInput>;
|
|
71
|
+
export declare const InsertImportRowsOutput: z.ZodObject<{
|
|
72
|
+
successRows: z.ZodArray<z.ZodAny, "many">;
|
|
73
|
+
errorRows: z.ZodArray<z.ZodAny, "many">;
|
|
74
|
+
}, "strip", z.ZodTypeAny, {
|
|
75
|
+
successRows: any[];
|
|
76
|
+
errorRows: any[];
|
|
77
|
+
}, {
|
|
78
|
+
successRows: any[];
|
|
79
|
+
errorRows: any[];
|
|
80
|
+
}>;
|
|
81
|
+
export declare const GetImportHeadersInput: z.ZodObject<{
|
|
82
|
+
moduleName: z.ZodString;
|
|
83
|
+
collectionName: z.ZodString;
|
|
84
|
+
}, "strip", z.ZodTypeAny, {
|
|
85
|
+
moduleName: string;
|
|
86
|
+
collectionName: string;
|
|
87
|
+
}, {
|
|
88
|
+
moduleName: string;
|
|
89
|
+
collectionName: string;
|
|
90
|
+
}>;
|
|
91
|
+
export type TGetImportHeadersInput = z.infer<typeof GetImportHeadersInput>;
|
|
92
|
+
export declare const GetImportHeadersOutput: z.ZodArray<z.ZodObject<{
|
|
93
|
+
label: z.ZodString;
|
|
94
|
+
key: z.ZodString;
|
|
95
|
+
}, "strip", z.ZodTypeAny, {
|
|
96
|
+
key: string;
|
|
97
|
+
label: string;
|
|
98
|
+
}, {
|
|
99
|
+
key: string;
|
|
100
|
+
label: string;
|
|
101
|
+
}>, "many">;
|
|
102
|
+
export type TInsertImportRowsOutput = z.infer<typeof InsertImportRowsOutput>;
|
|
103
|
+
export type TImportExportProducersInput = {
|
|
104
|
+
[TImportExportProducers.INSERT_IMPORT_ROWS]: TInsertImportRowsInput;
|
|
105
|
+
[TImportExportProducers.GET_IMPORT_HEADERS]: TGetImportHeadersInput;
|
|
106
|
+
[TImportExportProducers.BATCH_SKIP_ROW]: TBatchSkipRowProducerInput;
|
|
107
|
+
[TImportExportProducers.GET_EXPORT_HEADERS]: TGetExportHeadersInput;
|
|
108
|
+
[TImportExportProducers.GET_EXPORT_DATA]: TGetExportDataInput;
|
|
109
|
+
};
|
|
110
|
+
export {};
|
|
111
|
+
//# sourceMappingURL=zodSchemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zodSchemas.d.ts","sourceRoot":"../../../../../src/core-modules/import-export","sources":["zodSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,mBAAgB;AAEjD,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;EAKhC,CAAC;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;EAIhC,CAAC;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;EAI5B,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE3E,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;EAO7B,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AACrE,KAAK,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE3E,eAAO,MAAM,sBAAsB;;;;;;;;;EAGjC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;EAGhC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE3E,eAAO,MAAM,sBAAsB;;;;;;;;;WAKlC,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE7E,MAAM,MAAM,2BAA2B,GAAG;IACxC,CAAC,sBAAsB,CAAC,kBAAkB,CAAC,EAAE,sBAAsB,CAAC;IACpE,CAAC,sBAAsB,CAAC,kBAAkB,CAAC,EAAE,sBAAsB,CAAC;IACpE,CAAC,sBAAsB,CAAC,cAAc,CAAC,EAAE,0BAA0B,CAAC;IACpE,CAAC,sBAAsB,CAAC,kBAAkB,CAAC,EAAE,sBAAsB,CAAC;IACpE,CAAC,sBAAsB,CAAC,eAAe,CAAC,EAAE,mBAAmB,CAAC;CAC/D,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export * from "./permissions/index.js";
|
|
2
|
+
export * from "./users/index.js";
|
|
3
|
+
export * from "./common/index.js";
|
|
4
|
+
export * from "./apps/index.js";
|
|
5
|
+
export * from "./automations/index.js";
|
|
6
|
+
export * from "./segments/index.js";
|
|
7
|
+
export * from "./forms/index.js";
|
|
8
|
+
export * from "./properties/index.js";
|
|
9
|
+
export * from "./logs/index.js";
|
|
10
|
+
export * from "./notifications/index.js";
|
|
11
|
+
export * from "./approval/index.js";
|
|
12
|
+
export * from "./email-content/index.js";
|
|
13
|
+
export * from "./client-portals/index.js";
|
|
14
|
+
export * from "./import-export/index.js";
|
|
15
|
+
export * from "./templates/index.js";
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"../../../../src/core-modules","sources":["index.ts"],"names":[],"mappings":"AAAA,uCAA8B;AAC9B,iCAAwB;AACxB,kCAAyB;AACzB,gCAAuB;AACvB,uCAA8B;AAC9B,oCAA2B;AAC3B,iCAAwB;AACxB,sCAA6B;AAC7B,gCAAuB;AACvB,yCAAgC;AAChC,oCAA2B;AAC3B,yCAAgC;AAChC,0CAAiC;AACjC,yCAAgC;AAChC,qCAA4B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builder.d.ts","sourceRoot":"../../../../../../src/core-modules/logs/activityLog","sources":["builder.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,mBAAgB;AAyIjC,wBAAsB,eAAe,CAAC,OAAO,GAAG,GAAG,EACjD,YAAY,EAAE,GAAG,EACjB,eAAe,EAAE,GAAG,EACpB,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC,EACvB,GAAG,EAAE,GAAG,GACP,OAAO,CAAC,OAAO,EAAE,CAAC,CAuFpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"../../../../../../src/core-modules/logs/activityLog","sources":["index.ts"],"names":[],"mappings":"AAAA,2BAAwB;AACxB,2BAAwB;AACxB,6BAA0B;AAC1B,oCAAiC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ActivityLogInput } from "../../common/eventHandlers/index.js";
|
|
2
|
+
type AssignmentActivityType = 'branch.assigned' | 'branch.unassigned' | 'department.assigned' | 'department.unassigned' | 'position.assigned' | 'position.unassigned' | 'permission_group.assigned' | 'permission_group.unassigned';
|
|
3
|
+
type BuildEntityAssignmentActivityParams = {
|
|
4
|
+
activityType: AssignmentActivityType;
|
|
5
|
+
target: any;
|
|
6
|
+
context?: any;
|
|
7
|
+
ids: string[];
|
|
8
|
+
labels: string[];
|
|
9
|
+
entityLabel: string;
|
|
10
|
+
field: string;
|
|
11
|
+
metadata?: Record<string, any>;
|
|
12
|
+
};
|
|
13
|
+
export declare const buildBranchAssignmentActivity: (params: Omit<BuildEntityAssignmentActivityParams, "entityLabel" | "field">) => ActivityLogInput;
|
|
14
|
+
export declare const buildDepartmentAssignmentActivity: (params: Omit<BuildEntityAssignmentActivityParams, "entityLabel" | "field">) => ActivityLogInput;
|
|
15
|
+
export declare const buildPositionAssignmentActivity: (params: Omit<BuildEntityAssignmentActivityParams, "entityLabel" | "field">) => ActivityLogInput;
|
|
16
|
+
export declare const buildPermissionGroupAssignmentActivity: (params: Omit<BuildEntityAssignmentActivityParams, "entityLabel" | "field">) => ActivityLogInput;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=sharedBuilders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sharedBuilders.d.ts","sourceRoot":"../../../../../../src/core-modules/logs/activityLog","sources":["sharedBuilders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,4CAAmC;AAE9D,KAAK,sBAAsB,GACvB,iBAAiB,GACjB,mBAAmB,GACnB,qBAAqB,GACrB,uBAAuB,GACvB,mBAAmB,GACnB,qBAAqB,GACrB,2BAA2B,GAC3B,6BAA6B,CAAC;AAElC,KAAK,mCAAmC,GAAG;IACzC,YAAY,EAAE,sBAAsB,CAAC;IACrC,MAAM,EAAE,GAAG,CAAC;IACZ,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,GAAG,EAAE,MAAM,EAAE,CAAC;IACd,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAChC,CAAC;AAuCF,eAAO,MAAM,6BAA6B,GACxC,QAAQ,IAAI,CAAC,mCAAmC,EAAE,aAAa,GAAG,OAAO,CAAC,qBAMxE,CAAC;AAEL,eAAO,MAAM,iCAAiC,GAC5C,QAAQ,IAAI,CAAC,mCAAmC,EAAE,aAAa,GAAG,OAAO,CAAC,qBAMxE,CAAC;AAEL,eAAO,MAAM,+BAA+B,GAC1C,QAAQ,IAAI,CAAC,mCAAmC,EAAE,aAAa,GAAG,OAAO,CAAC,qBAMxE,CAAC;AAEL,eAAO,MAAM,sCAAsC,GACjD,QAAQ,IAAI,CAAC,mCAAmC,EAAE,aAAa,GAAG,OAAO,CAAC,qBAMxE,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type Change = {
|
|
2
|
+
field: string;
|
|
3
|
+
prev: unknown;
|
|
4
|
+
current: unknown;
|
|
5
|
+
kind?: 'array' | 'value' | 'set' | 'unset' | 'update';
|
|
6
|
+
};
|
|
7
|
+
export type ResolverParams = {
|
|
8
|
+
field: string;
|
|
9
|
+
prev?: unknown;
|
|
10
|
+
current?: unknown;
|
|
11
|
+
added?: string[];
|
|
12
|
+
removed?: string[];
|
|
13
|
+
};
|
|
14
|
+
export type Resolver<TResult = any> = (params: ResolverParams, ctx: any) => TResult[] | void | Promise<TResult[] | void>;
|
|
15
|
+
export type Config<TResult = any> = {
|
|
16
|
+
assignmentFields?: string[];
|
|
17
|
+
commonFields: string[];
|
|
18
|
+
resolvers: Record<string, Resolver<TResult>>;
|
|
19
|
+
buildTarget?: (document: any, ctx: any) => any;
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"../../../../../../src/core-modules/logs/activityLog","sources":["types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,MAAM,GAAG;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAC;CACvD,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,QAAQ,CAAC,OAAO,GAAG,GAAG,IAAI,CACpC,MAAM,EAAE,cAAc,EACtB,GAAG,EAAE,GAAG,KACL,OAAO,EAAE,GAAG,IAAI,GAAG,OAAO,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;AAElD,MAAM,MAAM,MAAM,CAAC,OAAO,GAAG,GAAG,IAAI;IAClC,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;IAC7C,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,KAAK,GAAG,CAAC;CAChD,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Resolver } from "./types.js";
|
|
2
|
+
export declare function logActivityLogError(scope: string, error: unknown, metadata?: Record<string, unknown>): void;
|
|
3
|
+
export declare function matchesFieldPattern(pattern: string, field: string): boolean;
|
|
4
|
+
export declare function findResolver<TResult = any>(field: string, resolvers: Record<string, Resolver<TResult>>): Resolver<TResult> | undefined;
|
|
5
|
+
export declare function detectAssignmentDelta(prev: unknown, current: unknown): {
|
|
6
|
+
added: string[];
|
|
7
|
+
removed: string[];
|
|
8
|
+
};
|
|
9
|
+
export declare function getSnapshot(doc: any): any;
|
|
10
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"../../../../../../src/core-modules/logs/activityLog","sources":["utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,mBAAgB;AAEnC,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,OAAO,EACd,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,QAQnC;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,WAWjE;AAED,wBAAgB,YAAY,CAAC,OAAO,GAAG,GAAG,EACxC,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,GAC3C,QAAQ,CAAC,OAAO,CAAC,GAAG,SAAS,CAY/B;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO;;;EAWpE;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,GAAG,OAEnC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { Document } from 'mongoose';
|
|
2
|
+
import { ActivityLogInput } from "../index.js";
|
|
3
|
+
export interface NormalizedChange {
|
|
4
|
+
field: string;
|
|
5
|
+
prev: any;
|
|
6
|
+
current: any;
|
|
7
|
+
kind: 'set' | 'update' | 'array' | 'unset';
|
|
8
|
+
}
|
|
9
|
+
interface ActivityLogPayload {
|
|
10
|
+
activityType: string;
|
|
11
|
+
action: {
|
|
12
|
+
type: string;
|
|
13
|
+
description: string;
|
|
14
|
+
};
|
|
15
|
+
context?: {
|
|
16
|
+
text?: string;
|
|
17
|
+
data?: any;
|
|
18
|
+
};
|
|
19
|
+
metadata?: Record<string, any>;
|
|
20
|
+
changes: {
|
|
21
|
+
prev?: any;
|
|
22
|
+
current?: any;
|
|
23
|
+
added?: any;
|
|
24
|
+
removed?: any;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export declare function normalizeDiffs(prevDoc: any, currentDoc: any): NormalizedChange[];
|
|
28
|
+
export interface ActivityRule {
|
|
29
|
+
match: (change: NormalizedChange) => boolean;
|
|
30
|
+
build: (change: NormalizedChange) => Promise<ActivityLogPayload[]>;
|
|
31
|
+
}
|
|
32
|
+
export declare const fieldChangeRule: (fields: string[], action: string, getFieldLabel: (field: string, { current, prev }: {
|
|
33
|
+
current: any;
|
|
34
|
+
prev: any;
|
|
35
|
+
}) => string | Promise<string>, getValueLabel?: (value: any) => string | Promise<string>) => ActivityRule;
|
|
36
|
+
export declare const assignmentRule: (field: string, getContextNames: (ids: string[]) => Promise<string | string[]>, actionMap?: {
|
|
37
|
+
added: string;
|
|
38
|
+
removed: string;
|
|
39
|
+
}) => ActivityRule;
|
|
40
|
+
export interface BulkActivityConfig {
|
|
41
|
+
field: string;
|
|
42
|
+
getFieldLabel?: (field: string, { current, prev }: {
|
|
43
|
+
current: any;
|
|
44
|
+
prev: any;
|
|
45
|
+
}) => string | Promise<string>;
|
|
46
|
+
getContextNames?: (ids: string[]) => Promise<string | string[]>;
|
|
47
|
+
activityTypeMap?: {
|
|
48
|
+
array?: string;
|
|
49
|
+
fieldChange?: string;
|
|
50
|
+
};
|
|
51
|
+
actionTypeMap?: {
|
|
52
|
+
added?: string;
|
|
53
|
+
removed?: string;
|
|
54
|
+
update?: string;
|
|
55
|
+
};
|
|
56
|
+
getActivityType?: (field: string, isArray: boolean) => string | Promise<string>;
|
|
57
|
+
getActionType?: (field: string, kind: 'added' | 'removed' | 'update') => string | Promise<string>;
|
|
58
|
+
}
|
|
59
|
+
export interface BulkActivityTarget {
|
|
60
|
+
_id: string;
|
|
61
|
+
[key: string]: any;
|
|
62
|
+
}
|
|
63
|
+
export interface BulkActivityResult extends ActivityLogPayload {
|
|
64
|
+
target: {
|
|
65
|
+
_id: string;
|
|
66
|
+
[key: string]: any;
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
export declare function buildBulkActivities(prevTargets: BulkActivityTarget[], changes: Record<string, any>, config: BulkActivityConfig, createActivityLog: (activities: ActivityLogInput | ActivityLogInput[]) => void, commonActivityData: Record<string, any>): Promise<BulkActivityResult[]>;
|
|
70
|
+
export declare function buildActivities(prevDoc: any | Document<any>, currentDoc: any | Document<any>, activityRegistry: ActivityRule[]): Promise<ActivityLogPayload[]>;
|
|
71
|
+
export {};
|
|
72
|
+
//# sourceMappingURL=activityLogUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activityLogUtils.d.ts","sourceRoot":"../../../../../src/core-modules/logs","sources":["activityLogUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,oBAAW;AAGtC,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,GAAG,CAAC;IACV,OAAO,EAAE,GAAG,CAAC;IACb,IAAI,EAAE,KAAK,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAC;CAC5C;AAED,UAAU,kBAAkB;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,OAAO,CAAC,EAAE;QACR,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,GAAG,CAAC;KACZ,CAAC;IACF,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC/B,OAAO,EAAE;QACP,IAAI,CAAC,EAAE,GAAG,CAAC;QACX,OAAO,CAAC,EAAE,GAAG,CAAC;QACd,KAAK,CAAC,EAAE,GAAG,CAAC;QACZ,OAAO,CAAC,EAAE,GAAG,CAAC;KACf,CAAC;CACH;AAED,wBAAgB,cAAc,CAC5B,OAAO,EAAE,GAAG,EACZ,UAAU,EAAE,GAAG,GACd,gBAAgB,EAAE,CA0KpB;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,OAAO,CAAC;IAC7C,KAAK,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC;CACpE;AAuBD,eAAO,MAAM,eAAe,GAC1B,QAAQ,MAAM,EAAE,EAChB,QAAQ,MAAM,EACd,eAAe,CACb,KAAK,EAAE,MAAM,EACb,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IAAE,OAAO,EAAE,GAAG,CAAC;IAAC,IAAI,EAAE,GAAG,CAAA;CAAE,KAC3C,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,EAC7B,gBAAgB,CAAC,KAAK,EAAE,GAAG,KAAK,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,KACvD,YAiED,CAAC;AAEH,eAAO,MAAM,cAAc,GACzB,OAAO,MAAM,EACb,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,MAAM,GAAG,MAAM,EAAE,CAAC,EAC9D,YAAY;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,KAC7C,YAsED,CAAC;AAEH,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,CACd,KAAK,EAAE,MAAM,EACb,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;QAAE,OAAO,EAAE,GAAG,CAAC;QAAC,IAAI,EAAE,GAAG,CAAA;KAAE,KAC3C,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC9B,eAAe,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;IAChE,eAAe,CAAC,EAAE;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,aAAa,CAAC,EAAE;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,eAAe,CAAC,EAAE,CAChB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,OAAO,KACb,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC9B,aAAa,CAAC,EAAE,CACd,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,OAAO,GAAG,SAAS,GAAG,QAAQ,KACjC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC/B;AAED,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,MAAM,WAAW,kBAAmB,SAAQ,kBAAkB;IAC5D,MAAM,EAAE;QACN,GAAG,EAAE,MAAM,CAAC;QACZ,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,CAAC;CACH;AAED,wBAAsB,mBAAmB,CACvC,WAAW,EAAE,kBAAkB,EAAE,EACjC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC5B,MAAM,EAAE,kBAAkB,EAC1B,iBAAiB,EAAE,CACjB,UAAU,EAAE,gBAAgB,GAAG,gBAAgB,EAAE,KAC9C,IAAI,EACT,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACtC,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAqM/B;AAED,wBAAsB,eAAe,CACnC,OAAO,EAAE,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,EAC5B,UAAU,EAAE,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,EAC/B,gBAAgB,EAAE,YAAY,EAAE,iCA8CjC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { Document, Schema } from 'mongoose';
|
|
2
|
+
export interface TActivityEntity<TData = any> {
|
|
3
|
+
moduleName: string;
|
|
4
|
+
collectionName: string;
|
|
5
|
+
text?: string;
|
|
6
|
+
data?: TData;
|
|
7
|
+
}
|
|
8
|
+
export type TActivityLog<TTarget = any, TContext = TActivityEntity, TActor = any> = {
|
|
9
|
+
createdAt: Date;
|
|
10
|
+
activityType: string;
|
|
11
|
+
sourcePlugin?: string;
|
|
12
|
+
actorType: string;
|
|
13
|
+
actor: TActor;
|
|
14
|
+
targetType: string;
|
|
15
|
+
target: TTarget;
|
|
16
|
+
contextType: string;
|
|
17
|
+
context: TContext;
|
|
18
|
+
action: {
|
|
19
|
+
type: string;
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
changes: any;
|
|
23
|
+
metadata?: any;
|
|
24
|
+
};
|
|
25
|
+
export type IActivityLogDocument = TActivityLog & {
|
|
26
|
+
_id: string;
|
|
27
|
+
} & Document;
|
|
28
|
+
export declare const activityLogsSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, {
|
|
29
|
+
createdAt: NativeDate;
|
|
30
|
+
action: {
|
|
31
|
+
type: string;
|
|
32
|
+
description: string;
|
|
33
|
+
};
|
|
34
|
+
target: any;
|
|
35
|
+
targetId: string;
|
|
36
|
+
targetType: string;
|
|
37
|
+
changes: any;
|
|
38
|
+
activityType: string;
|
|
39
|
+
actorType: string;
|
|
40
|
+
actor: any;
|
|
41
|
+
context?: any;
|
|
42
|
+
metadata?: any;
|
|
43
|
+
sourcePlugin?: string | null | undefined;
|
|
44
|
+
contextType?: string | null | undefined;
|
|
45
|
+
}, Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
46
|
+
createdAt: NativeDate;
|
|
47
|
+
action: {
|
|
48
|
+
type: string;
|
|
49
|
+
description: string;
|
|
50
|
+
};
|
|
51
|
+
target: any;
|
|
52
|
+
targetId: string;
|
|
53
|
+
targetType: string;
|
|
54
|
+
changes: any;
|
|
55
|
+
activityType: string;
|
|
56
|
+
actorType: string;
|
|
57
|
+
actor: any;
|
|
58
|
+
context?: any;
|
|
59
|
+
metadata?: any;
|
|
60
|
+
sourcePlugin?: string | null | undefined;
|
|
61
|
+
contextType?: string | null | undefined;
|
|
62
|
+
}>> & import("mongoose").FlatRecord<{
|
|
63
|
+
createdAt: NativeDate;
|
|
64
|
+
action: {
|
|
65
|
+
type: string;
|
|
66
|
+
description: string;
|
|
67
|
+
};
|
|
68
|
+
target: any;
|
|
69
|
+
targetId: string;
|
|
70
|
+
targetType: string;
|
|
71
|
+
changes: any;
|
|
72
|
+
activityType: string;
|
|
73
|
+
actorType: string;
|
|
74
|
+
actor: any;
|
|
75
|
+
context?: any;
|
|
76
|
+
metadata?: any;
|
|
77
|
+
sourcePlugin?: string | null | undefined;
|
|
78
|
+
contextType?: string | null | undefined;
|
|
79
|
+
}> & {
|
|
80
|
+
_id: import("mongoose").Types.ObjectId;
|
|
81
|
+
} & {
|
|
82
|
+
__v: number;
|
|
83
|
+
}>;
|
|
84
|
+
//# sourceMappingURL=activityLog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activityLog.d.ts","sourceRoot":"../../../../../../src/core-modules/logs/definitions","sources":["activityLog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAE5C,MAAM,WAAW,eAAe,CAAC,KAAK,GAAG,GAAG;IAC1C,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,KAAK,CAAC;CACd;AAED,MAAM,MAAM,YAAY,CACtB,OAAO,GAAG,GAAG,EACb,QAAQ,GAAG,eAAe,EAC1B,MAAM,GAAG,GAAG,IACV;IACF,SAAS,EAAE,IAAI,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,QAAQ,CAAC;IAClB,MAAM,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,OAAO,EAAE,GAAG,CAAC;IACb,QAAQ,CAAC,EAAE,GAAG,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,YAAY,GAAG;IAChD,GAAG,EAAE,MAAM,CAAC;CACb,GAAG,QAAQ,CAAC;AAoBb,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiB7B,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Schema } from 'mongoose';
|
|
2
|
+
export declare const logsSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
3
|
+
minimize: true;
|
|
4
|
+
}, {
|
|
5
|
+
createdAt: NativeDate;
|
|
6
|
+
status: "failed" | "success";
|
|
7
|
+
processId?: string | null | undefined;
|
|
8
|
+
source?: string | null | undefined;
|
|
9
|
+
userId?: string | null | undefined;
|
|
10
|
+
action?: string | null | undefined;
|
|
11
|
+
contentType?: string | null | undefined;
|
|
12
|
+
payload?: any;
|
|
13
|
+
docId?: string | null | undefined;
|
|
14
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
15
|
+
createdAt: NativeDate;
|
|
16
|
+
status: "failed" | "success";
|
|
17
|
+
processId?: string | null | undefined;
|
|
18
|
+
source?: string | null | undefined;
|
|
19
|
+
userId?: string | null | undefined;
|
|
20
|
+
action?: string | null | undefined;
|
|
21
|
+
contentType?: string | null | undefined;
|
|
22
|
+
payload?: any;
|
|
23
|
+
docId?: string | null | undefined;
|
|
24
|
+
}>> & import("mongoose").FlatRecord<{
|
|
25
|
+
createdAt: NativeDate;
|
|
26
|
+
status: "failed" | "success";
|
|
27
|
+
processId?: string | null | undefined;
|
|
28
|
+
source?: string | null | undefined;
|
|
29
|
+
userId?: string | null | undefined;
|
|
30
|
+
action?: string | null | undefined;
|
|
31
|
+
contentType?: string | null | undefined;
|
|
32
|
+
payload?: any;
|
|
33
|
+
docId?: string | null | undefined;
|
|
34
|
+
}> & {
|
|
35
|
+
_id: import("mongoose").Types.ObjectId;
|
|
36
|
+
} & {
|
|
37
|
+
__v: number;
|
|
38
|
+
}>;
|
|
39
|
+
//# sourceMappingURL=logs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logs.d.ts","sourceRoot":"../../../../../../src/core-modules/logs/definitions","sources":["logs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAIlC,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoBtB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"../../../../../src/core-modules/logs","sources":["index.ts"],"names":[],"mappings":"AAAA,sCAAmC;AACnC,6CAA0C;AAC1C,2BAAwB;AACxB,sCAAmC;AACnC,uCAA8B"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare enum TAfterProcessProducers {
|
|
2
|
+
AFTER_MUTATION = "afterMutation",
|
|
3
|
+
AFTER_AUTH = "afterAuth",
|
|
4
|
+
AFTER_API_REQUEST = "afterApiRequest",
|
|
5
|
+
AFTER_DOCUMENT_UPDATED = "afterDocumentUpdated",
|
|
6
|
+
AFTER_DOCUMENT_CREATED = "afterDocumentCreated"
|
|
7
|
+
}
|
|
8
|
+
export interface ILogContentTypeConfig {
|
|
9
|
+
moduleName: string;
|
|
10
|
+
collectionName: string;
|
|
11
|
+
}
|
|
12
|
+
export interface LogsConfigs {
|
|
13
|
+
contentTypes: ILogContentTypeConfig[];
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"../../../../../src/core-modules/logs","sources":["types.ts"],"names":[],"mappings":"AAAA,oBAAY,sBAAsB;IAChC,cAAc,kBAAkB;IAChC,UAAU,cAAc;IACxB,iBAAiB,oBAAoB;IACrC,sBAAsB,yBAAyB;IAC/C,sBAAsB,yBAAyB;CAChD;AAED,MAAM,WAAW,qBAAqB;IACpC,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,WAAW;IAC1B,YAAY,EAAE,qBAAqB,EAAE,CAAC;CACvC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { Document, Schema } from 'mongoose';
|
|
2
|
+
export type TEmailSuppressionReason = 'hard_bounce' | 'complaint' | 'unsubscribe' | 'screened' | 'manual';
|
|
3
|
+
export type TEmailLane = 'proven' | 'unknown' | 'suppressed';
|
|
4
|
+
export declare const EMAIL_LANES: TEmailLane[];
|
|
5
|
+
export type TMailKind = 'marketing' | 'transactional';
|
|
6
|
+
export interface IEmailAddressDocument extends Document {
|
|
7
|
+
_id: string;
|
|
8
|
+
email: string;
|
|
9
|
+
lastSentAt?: Date;
|
|
10
|
+
lastDeliveredAt?: Date;
|
|
11
|
+
deliveredCount: number;
|
|
12
|
+
softBounceCount: number;
|
|
13
|
+
lastSoftBounceAt?: Date;
|
|
14
|
+
suppressedAt?: Date;
|
|
15
|
+
suppressionReason?: TEmailSuppressionReason;
|
|
16
|
+
suppressedBy?: string;
|
|
17
|
+
releasedAt?: Date;
|
|
18
|
+
releasedBy?: string;
|
|
19
|
+
releaseNote?: string;
|
|
20
|
+
createdAt: Date;
|
|
21
|
+
updatedAt: Date;
|
|
22
|
+
}
|
|
23
|
+
export declare const emailAddressSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, {
|
|
24
|
+
updatedAt: NativeDate;
|
|
25
|
+
createdAt: NativeDate;
|
|
26
|
+
email: string;
|
|
27
|
+
deliveredCount: number;
|
|
28
|
+
softBounceCount: number;
|
|
29
|
+
lastSentAt?: NativeDate | null | undefined;
|
|
30
|
+
lastDeliveredAt?: NativeDate | null | undefined;
|
|
31
|
+
lastSoftBounceAt?: NativeDate | null | undefined;
|
|
32
|
+
suppressedAt?: NativeDate | null | undefined;
|
|
33
|
+
suppressionReason?: "hard_bounce" | "complaint" | "unsubscribe" | "screened" | "manual" | null | undefined;
|
|
34
|
+
suppressedBy?: string | null | undefined;
|
|
35
|
+
releasedAt?: NativeDate | null | undefined;
|
|
36
|
+
releasedBy?: string | null | undefined;
|
|
37
|
+
releaseNote?: string | null | undefined;
|
|
38
|
+
}, Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
39
|
+
updatedAt: NativeDate;
|
|
40
|
+
createdAt: NativeDate;
|
|
41
|
+
email: string;
|
|
42
|
+
deliveredCount: number;
|
|
43
|
+
softBounceCount: number;
|
|
44
|
+
lastSentAt?: NativeDate | null | undefined;
|
|
45
|
+
lastDeliveredAt?: NativeDate | null | undefined;
|
|
46
|
+
lastSoftBounceAt?: NativeDate | null | undefined;
|
|
47
|
+
suppressedAt?: NativeDate | null | undefined;
|
|
48
|
+
suppressionReason?: "hard_bounce" | "complaint" | "unsubscribe" | "screened" | "manual" | null | undefined;
|
|
49
|
+
suppressedBy?: string | null | undefined;
|
|
50
|
+
releasedAt?: NativeDate | null | undefined;
|
|
51
|
+
releasedBy?: string | null | undefined;
|
|
52
|
+
releaseNote?: string | null | undefined;
|
|
53
|
+
}>> & import("mongoose").FlatRecord<{
|
|
54
|
+
updatedAt: NativeDate;
|
|
55
|
+
createdAt: NativeDate;
|
|
56
|
+
email: string;
|
|
57
|
+
deliveredCount: number;
|
|
58
|
+
softBounceCount: number;
|
|
59
|
+
lastSentAt?: NativeDate | null | undefined;
|
|
60
|
+
lastDeliveredAt?: NativeDate | null | undefined;
|
|
61
|
+
lastSoftBounceAt?: NativeDate | null | undefined;
|
|
62
|
+
suppressedAt?: NativeDate | null | undefined;
|
|
63
|
+
suppressionReason?: "hard_bounce" | "complaint" | "unsubscribe" | "screened" | "manual" | null | undefined;
|
|
64
|
+
suppressedBy?: string | null | undefined;
|
|
65
|
+
releasedAt?: NativeDate | null | undefined;
|
|
66
|
+
releasedBy?: string | null | undefined;
|
|
67
|
+
releaseNote?: string | null | undefined;
|
|
68
|
+
}> & {
|
|
69
|
+
_id: import("mongoose").Types.ObjectId;
|
|
70
|
+
} & {
|
|
71
|
+
__v: number;
|
|
72
|
+
}>;
|
|
73
|
+
//# sourceMappingURL=emailAddresses.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emailAddresses.d.ts","sourceRoot":"../../../../../../src/core-modules/notifications/definitions","sources":["emailAddresses.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAE5C,MAAM,MAAM,uBAAuB,GAC/B,aAAa,GACb,WAAW,GACX,aAAa,GACb,UAAU,GACV,QAAQ,CAAC;AAEb,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,SAAS,GAAG,YAAY,CAAC;AAE7D,eAAO,MAAM,WAAW,EAAE,UAAU,EAAwC,CAAC;AAE7E,MAAM,MAAM,SAAS,GAAG,WAAW,GAAG,eAAe,CAAC;AAEtD,MAAM,WAAW,qBAAsB,SAAQ,QAAQ;IACrD,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IAEd,UAAU,CAAC,EAAE,IAAI,CAAC;IAClB,eAAe,CAAC,EAAE,IAAI,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IAEvB,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,IAAI,CAAC;IAExB,YAAY,CAAC,EAAE,IAAI,CAAC;IACpB,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;IAC5C,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,UAAU,CAAC,EAAE,IAAI,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+D7B,CAAC"}
|