@erxes/api-shared 0.0.0-stage → 3.2.19-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shape this renderer reads off a block. Structural on purpose: the
|
|
3
|
+
* editor's own types live in a frontend package, and nothing here needs them.
|
|
4
|
+
*/
|
|
5
|
+
export type TEmailBlock = {
|
|
6
|
+
id?: string;
|
|
7
|
+
type?: string;
|
|
8
|
+
props?: Record<string, any>;
|
|
9
|
+
content?: any;
|
|
10
|
+
children?: TEmailBlock[];
|
|
11
|
+
};
|
|
12
|
+
export declare const COLORS_DEFAULT: {
|
|
13
|
+
readonly gray: {
|
|
14
|
+
readonly text: "#9b9a97";
|
|
15
|
+
readonly background: "#ebeced";
|
|
16
|
+
};
|
|
17
|
+
readonly brown: {
|
|
18
|
+
readonly text: "#64473a";
|
|
19
|
+
readonly background: "#e9e5e3";
|
|
20
|
+
};
|
|
21
|
+
readonly red: {
|
|
22
|
+
readonly text: "#e03e3e";
|
|
23
|
+
readonly background: "#fbe4e4";
|
|
24
|
+
};
|
|
25
|
+
readonly orange: {
|
|
26
|
+
readonly text: "#d9730d";
|
|
27
|
+
readonly background: "#f6e9d9";
|
|
28
|
+
};
|
|
29
|
+
readonly yellow: {
|
|
30
|
+
readonly text: "#dfab01";
|
|
31
|
+
readonly background: "#fbf3db";
|
|
32
|
+
};
|
|
33
|
+
readonly green: {
|
|
34
|
+
readonly text: "#4d6461";
|
|
35
|
+
readonly background: "#ddedea";
|
|
36
|
+
};
|
|
37
|
+
readonly blue: {
|
|
38
|
+
readonly text: "#0b6e99";
|
|
39
|
+
readonly background: "#ddebf1";
|
|
40
|
+
};
|
|
41
|
+
readonly purple: {
|
|
42
|
+
readonly text: "#6940a5";
|
|
43
|
+
readonly background: "#eae4f2";
|
|
44
|
+
};
|
|
45
|
+
readonly pink: {
|
|
46
|
+
readonly text: "#ad1a72";
|
|
47
|
+
readonly background: "#f4dfeb";
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
type ColorConfig = Record<string, {
|
|
51
|
+
text: string;
|
|
52
|
+
background: string;
|
|
53
|
+
}>;
|
|
54
|
+
export interface TBlocksToHtmlConfig {
|
|
55
|
+
colors?: ColorConfig;
|
|
56
|
+
baseFont?: string;
|
|
57
|
+
baseFontSize?: string;
|
|
58
|
+
baseLineHeight?: string;
|
|
59
|
+
baseColor?: string;
|
|
60
|
+
maxWidth?: number;
|
|
61
|
+
resolveImageUrl?: (url: string) => string;
|
|
62
|
+
wrapper?: {
|
|
63
|
+
email?: boolean;
|
|
64
|
+
unsubscribeUrl?: string;
|
|
65
|
+
postalAddress?: string;
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
export declare const escapeHtml: (text: string) => string;
|
|
69
|
+
export declare const blocksToHtml: (blocks: TEmailBlock[] | string, config?: TBlocksToHtmlConfig) => string;
|
|
70
|
+
export declare const emailHtmlWrapper: (html: string, config?: TBlocksToHtmlConfig) => string;
|
|
71
|
+
export {};
|
|
72
|
+
//# sourceMappingURL=blocksToHtml.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blocksToHtml.d.ts","sourceRoot":"../../../../../src/core-modules/email-content","sources":["blocksToHtml.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUjB,CAAC;AAEX,KAAK,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAExE,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;IAC1C,OAAO,CAAC,EAAE;QACR,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB,CAAC;CACH;AA2BD,eAAO,MAAM,UAAU,GAAI,MAAM,MAAM,KAAG,MAOzC,CAAC;AAmZF,eAAO,MAAM,YAAY,GACvB,QAAQ,WAAW,EAAE,GAAG,MAAM,EAC9B,SAAS,mBAAmB,KAC3B,MAoBF,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,MAAM,MAAM,EAAE,SAAS,mBAAmB,WAiD1E,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"../../../../../src/core-modules/email-content","sources":["constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB;;;CAGxB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emailFooter.d.ts","sourceRoot":"../../../../../src/core-modules/email-content","sources":["emailFooter.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,GAClC,MAAM,MAAM,EACZ,oCAGG;IAAE,cAAc,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,CAAA;CAAE,KACpD,MAUF,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** How many items a list holds, asked as `list.$count`. */
|
|
2
|
+
export type TRepeatCounter = (listPath: string) => Promise<number>;
|
|
3
|
+
/**
|
|
4
|
+
* A row whose cells read `{{ list.$.field }}` is written once per item of the
|
|
5
|
+
* list, `$` becoming the item's index, so the usual placeholder pass fills
|
|
6
|
+
* each copy from its own item. An empty list leaves no row.
|
|
7
|
+
*/
|
|
8
|
+
export declare const expandRepeatRows: (html: string | undefined, countOf: TRepeatCounter) => Promise<string>;
|
|
9
|
+
//# sourceMappingURL=expandRepeatRows.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expandRepeatRows.d.ts","sourceRoot":"../../../../../src/core-modules/email-content","sources":["expandRepeatRows.ts"],"names":[],"mappings":"AAMA,2DAA2D;AAC3D,MAAM,MAAM,cAAc,GAAG,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;AAcnE;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAC3B,MAAM,MAAM,GAAG,SAAS,EACxB,SAAS,cAAc,KACtB,OAAO,CAAC,MAAM,CA6BhB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./blocksToHtml.js";
|
|
2
|
+
export * from "./constants.js";
|
|
3
|
+
export * from "./emailFooter.js";
|
|
4
|
+
export * from "./expandRepeatRows.js";
|
|
5
|
+
export * from "./renderEmailContent.js";
|
|
6
|
+
export * from "./replacePlaceholders.js";
|
|
7
|
+
export * from "./types.js";
|
|
8
|
+
export * from "./unresolvedPlaceholders.js";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"../../../../../src/core-modules/email-content","sources":["index.ts"],"names":[],"mappings":"AAAA,kCAA+B;AAC/B,+BAA4B;AAC5B,iCAA8B;AAC9B,sCAAmC;AACnC,wCAAqC;AACrC,yCAAsC;AACtC,2BAAwB;AACxB,4CAAyC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { TEmailContent, TEmailContentFormat, TRenderEmailContentOptions } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* What an email body was written in. Content saved before the format was
|
|
4
|
+
* recorded carries no marker, and block content is what that used to mean —
|
|
5
|
+
* so nothing has to be migrated for this to be right.
|
|
6
|
+
*/
|
|
7
|
+
export declare const resolveEmailContentFormat: (email?: TEmailContent) => TEmailContentFormat;
|
|
8
|
+
/**
|
|
9
|
+
* The body as html with its placeholders still in, a row reading
|
|
10
|
+
* `{{ list.$.field }}` already written once per item. A sender that resolves
|
|
11
|
+
* placeholders in one batch reads them from this.
|
|
12
|
+
*/
|
|
13
|
+
export declare const renderEmailBody: (email: TEmailContent, options?: TRenderEmailContentOptions) => Promise<string>;
|
|
14
|
+
/**
|
|
15
|
+
* The one place an email body becomes the html a recipient gets, whichever
|
|
16
|
+
* editor wrote it and whichever service is sending it.
|
|
17
|
+
*/
|
|
18
|
+
export declare const renderEmailContent: (email: TEmailContent, options?: TRenderEmailContentOptions) => Promise<string>;
|
|
19
|
+
//# sourceMappingURL=renderEmailContent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderEmailContent.d.ts","sourceRoot":"../../../../../src/core-modules/email-content","sources":["renderEmailContent.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,0BAA0B,EAC3B,mBAAgB;AAEjB;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,GACpC,QAAQ,aAAa,KACpB,mBAQF,CAAC;AA+BF;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAC1B,OAAO,aAAa,EACpB,UAAS,0BAA+B,KACvC,OAAO,CAAC,MAAM,CAMhB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,GAC7B,OAAO,aAAa,EACpB,UAAS,0BAA+B,KACvC,OAAO,CAAC,MAAM,CAOhB,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { TEmailFieldOutcome } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* What a source has for a placeholder: its value; `null` when the field is
|
|
4
|
+
* this source's but the record has nothing for it; `undefined` when the
|
|
5
|
+
* placeholder is not this source's at all, so the next source is asked.
|
|
6
|
+
*/
|
|
7
|
+
export type TPlaceholderValue = string | null | undefined;
|
|
8
|
+
export type TPlaceholderResolver = (path: string) => Promise<TPlaceholderValue> | TPlaceholderValue;
|
|
9
|
+
export type TReplacePlaceholdersOptions = {
|
|
10
|
+
/** Told once which fields had a value and which did not. */
|
|
11
|
+
onFields?: (fields: TEmailFieldOutcome[]) => void;
|
|
12
|
+
/**
|
|
13
|
+
* Preview only. An empty field without a default shows its own name, since
|
|
14
|
+
* a gap rendered silently cannot be told apart from a preview that works.
|
|
15
|
+
*/
|
|
16
|
+
markMissing?: boolean;
|
|
17
|
+
};
|
|
18
|
+
export declare const collectPlaceholderPaths: (html?: string) => string[];
|
|
19
|
+
/**
|
|
20
|
+
* The one pass that fills an email's placeholders. Sources are asked in
|
|
21
|
+
* order; a placeholder no source owns is left in place, which is what marks
|
|
22
|
+
* it as never wired up.
|
|
23
|
+
*/
|
|
24
|
+
export declare const replacePlaceholders: (html: string, resolvers: TPlaceholderResolver[], { onFields, markMissing }?: TReplacePlaceholdersOptions) => Promise<string>;
|
|
25
|
+
/** Owns every placeholder: a field of the record the email is written to. */
|
|
26
|
+
export declare const recordPlaceholderResolver: (record?: object) => TPlaceholderResolver;
|
|
27
|
+
/**
|
|
28
|
+
* Owns `document.<id>`: the document rendered for the record the email is
|
|
29
|
+
* written to. Each service reaches documents its own way, so it supplies both
|
|
30
|
+
* the per-record print and the raw content used when printing gives nothing.
|
|
31
|
+
*/
|
|
32
|
+
export declare const documentPlaceholderResolver: ({ print, findContent, }: {
|
|
33
|
+
print: (documentId: string) => Promise<string | undefined | null>;
|
|
34
|
+
findContent: (documentId: string) => Promise<string | undefined | null>;
|
|
35
|
+
}) => TPlaceholderResolver;
|
|
36
|
+
//# sourceMappingURL=replacePlaceholders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"replacePlaceholders.d.ts","sourceRoot":"../../../../../src/core-modules/email-content","sources":["replacePlaceholders.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,mBAAgB;AAK7C;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;AAE1D,MAAM,MAAM,oBAAoB,GAAG,CACjC,IAAI,EAAE,MAAM,KACT,OAAO,CAAC,iBAAiB,CAAC,GAAG,iBAAiB,CAAC;AAEpD,MAAM,MAAM,2BAA2B,GAAG;IACxC,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,kBAAkB,EAAE,KAAK,IAAI,CAAC;IAClD;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,OAAO,MAAM,KAAG,MAAM,EACqB,CAAC;AAEpF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAC9B,MAAM,MAAM,EACZ,WAAW,oBAAoB,EAAE,EACjC,4BAA2B,2BAAgC,KAC1D,OAAO,CAAC,MAAM,CA4ChB,CAAC;AAEF,6EAA6E;AAC7E,eAAO,MAAM,yBAAyB,GACnC,SAAQ,MAAW,KAAG,oBAatB,CAAC;AAOJ;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,GACrC,yBAGE;IACD,KAAK,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC,CAAC;IAClE,WAAW,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC,CAAC;CACzE,KAAG,oBAqBH,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { EMAIL_CONTENT_FORMATS } from "./constants.js";
|
|
2
|
+
import type { TBlocksToHtmlConfig } from "./blocksToHtml.js";
|
|
3
|
+
import type { TRepeatCounter } from "./expandRepeatRows.js";
|
|
4
|
+
import type { TPlaceholderResolver } from "./replacePlaceholders.js";
|
|
5
|
+
export type TEmailContentFormat = (typeof EMAIL_CONTENT_FORMATS)[keyof typeof EMAIL_CONTENT_FORMATS];
|
|
6
|
+
/**
|
|
7
|
+
* An email body as it is sent. `blocks` content is a serialized block
|
|
8
|
+
* document; `maily` content is the html the email editor rendered, with its
|
|
9
|
+
* fields left as `{{ … }}` placeholders. Which one it is is said outright
|
|
10
|
+
* rather than guessed from which field happens to be set.
|
|
11
|
+
*/
|
|
12
|
+
export type TEmailContent = {
|
|
13
|
+
content?: string;
|
|
14
|
+
contentJson?: Record<string, unknown>;
|
|
15
|
+
contentFormat?: TEmailContentFormat;
|
|
16
|
+
};
|
|
17
|
+
/** Whether the record being rendered for had something for this field. */
|
|
18
|
+
export type TEmailFieldOutcome = {
|
|
19
|
+
id: string;
|
|
20
|
+
filled: boolean;
|
|
21
|
+
};
|
|
22
|
+
export type TRenderEmailContentOptions = {
|
|
23
|
+
/** Where each placeholder's value comes from, asked in order. */
|
|
24
|
+
resolvers?: TPlaceholderResolver[];
|
|
25
|
+
/**
|
|
26
|
+
* Block content keeps its placeholders as nodes of its own document format,
|
|
27
|
+
* so the module that owns that format substitutes them before rendering.
|
|
28
|
+
*/
|
|
29
|
+
replaceBlocks?: (content: string) => Promise<string> | string;
|
|
30
|
+
/** Footer the recipient is owed, in whichever shape the format needs. */
|
|
31
|
+
unsubscribeUrl?: string;
|
|
32
|
+
postalAddress?: string;
|
|
33
|
+
blocksConfig?: TBlocksToHtmlConfig;
|
|
34
|
+
/**
|
|
35
|
+
* Told once per render which fields the record answered and which it did
|
|
36
|
+
* not — the only moment both are known together.
|
|
37
|
+
*/
|
|
38
|
+
onFields?: (fields: TEmailFieldOutcome[]) => void;
|
|
39
|
+
/**
|
|
40
|
+
* Preview only. A field the record has nothing for is rendered as its own
|
|
41
|
+
* name instead of as nothing, because a preview that shows a gap silently
|
|
42
|
+
* cannot be told apart from one that is working.
|
|
43
|
+
*/
|
|
44
|
+
markMissing?: boolean;
|
|
45
|
+
/** How many items a list holds, for rows written once per item. */
|
|
46
|
+
countItems?: TRepeatCounter;
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"../../../../../src/core-modules/email-content","sources":["types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,uBAAoB;AACpD,OAAO,KAAK,EAAE,mBAAmB,EAAE,0BAAuB;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,8BAA2B;AACzD,OAAO,KAAK,EAAE,oBAAoB,EAAE,iCAA8B;AAElE,MAAM,MAAM,mBAAmB,GAC7B,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,OAAO,qBAAqB,CAAC,CAAC;AAErE;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,aAAa,CAAC,EAAE,mBAAmB,CAAC;CACrC,CAAC;AAEF,0EAA0E;AAC1E,MAAM,MAAM,kBAAkB,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,CAAC;AAEjE,MAAM,MAAM,0BAA0B,GAAG;IACvC,iEAAiE;IACjE,SAAS,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACnC;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;IAC9D,yEAAyE;IACzE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,mBAAmB,CAAC;IACnC;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,kBAAkB,EAAE,KAAK,IAAI,CAAC;IAClD;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,mEAAmE;IACnE,UAAU,CAAC,EAAE,cAAc,CAAC;CAC7B,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const findUnresolvedPlaceholders: (html?: string) => string[];
|
|
2
|
+
/** What to put in front of someone reading a failure. */
|
|
3
|
+
export declare const describeUnresolvedPlaceholders: (placeholders: string[]) => string;
|
|
4
|
+
//# sourceMappingURL=unresolvedPlaceholders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unresolvedPlaceholders.d.ts","sourceRoot":"../../../../../src/core-modules/email-content","sources":["unresolvedPlaceholders.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,0BAA0B,GAAI,OAAO,MAAM,KAAG,MAAM,EAQhE,CAAC;AAEF,yDAAyD;AACzD,eAAO,MAAM,8BAA8B,GAAI,cAAc,MAAM,EAAE,WAGpD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"../../../../../src/core-modules/forms","sources":["index.ts"],"names":[],"mappings":"AAAA,2BAAwB;AACxB,2BAAwB"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { TPropertyValueUsageHandler } from "../properties/valueUsage.js";
|
|
2
|
+
export type PropertySystemFieldType = 'text' | 'textarea' | 'number' | 'boolean' | 'date' | 'select' | 'multiSelect' | 'relation' | 'file' | 'phone';
|
|
3
|
+
export interface IPropertySystemField {
|
|
4
|
+
code: string;
|
|
5
|
+
name: string;
|
|
6
|
+
type: PropertySystemFieldType;
|
|
7
|
+
requiredGroup?: string;
|
|
8
|
+
alwaysFilled?: boolean;
|
|
9
|
+
visibleToCreateByDefault?: boolean;
|
|
10
|
+
hiddenByDefault?: boolean;
|
|
11
|
+
notOnCreate?: boolean;
|
|
12
|
+
outsideLayout?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export type FeaturedFieldType = 'text' | 'number' | 'boolean' | 'date' | 'select' | 'multiSelect';
|
|
15
|
+
export interface IFeaturedFieldOwner {
|
|
16
|
+
plugin: string;
|
|
17
|
+
module: string;
|
|
18
|
+
refId?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface IFeaturedFieldDefinition {
|
|
21
|
+
key: string;
|
|
22
|
+
name: string;
|
|
23
|
+
type: FeaturedFieldType;
|
|
24
|
+
options?: {
|
|
25
|
+
label: string;
|
|
26
|
+
value: string;
|
|
27
|
+
}[];
|
|
28
|
+
index?: {
|
|
29
|
+
unique?: boolean;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export interface IFeaturedFieldGroup {
|
|
33
|
+
key: string;
|
|
34
|
+
name: string;
|
|
35
|
+
}
|
|
36
|
+
export interface IPropertyFeaturedFields {
|
|
37
|
+
contentType: string;
|
|
38
|
+
module: string;
|
|
39
|
+
group: IFeaturedFieldGroup;
|
|
40
|
+
fields: IFeaturedFieldDefinition[];
|
|
41
|
+
}
|
|
42
|
+
export interface IPropertyType {
|
|
43
|
+
type: string;
|
|
44
|
+
description: string;
|
|
45
|
+
systemFields?: IPropertySystemField[];
|
|
46
|
+
systemFieldsLayout?: {
|
|
47
|
+
defaultLayout: string[][];
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
export interface IPropertyMeta {
|
|
51
|
+
types: IPropertyType[];
|
|
52
|
+
featuredFields?: IPropertyFeaturedFields[];
|
|
53
|
+
valueUsage?: TPropertyValueUsageHandler;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"../../../../../src/core-modules/forms","sources":["types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,oCAAiC;AAE3E,MAAM,MAAM,uBAAuB,GAC/B,MAAM,GACN,UAAU,GACV,QAAQ,GACR,SAAS,GACT,MAAM,GACN,QAAQ,GACR,aAAa,GACb,UAAU,GACV,MAAM,GACN,OAAO,CAAC;AAEZ,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,uBAAuB,CAAC;IAE9B,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IAEnC,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAID,MAAM,MAAM,iBAAiB,GACzB,MAAM,GACN,QAAQ,GACR,SAAS,GACT,MAAM,GACN,QAAQ,GACR,aAAa,CAAC;AAElB,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IAGf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,wBAAwB;IACvC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,iBAAiB,CAAC;IACxB,OAAO,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC7C,KAAK,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;CAC9B;AAED,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd;AAGD,MAAM,WAAW,uBAAuB;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,mBAAmB,CAAC;IAC3B,MAAM,EAAE,wBAAwB,EAAE,CAAC;CACpC;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,oBAAoB,EAAE,CAAC;IAGtC,kBAAkB,CAAC,EAAE;QAAE,aAAa,EAAE,MAAM,EAAE,EAAE,CAAA;KAAE,CAAC;CACpD;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,cAAc,CAAC,EAAE,uBAAuB,EAAE,CAAC;IAE3C,UAAU,CAAC,EAAE,0BAA0B,CAAC;CACzC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IFeaturedFieldOwner } from "./types.js";
|
|
2
|
+
export declare const featuredFieldCode: (owner: IFeaturedFieldOwner, key: string) => string;
|
|
3
|
+
export declare const generateFieldsFromSchema: (queSchema: any, namePrefix: string) => Promise<any>;
|
|
4
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"../../../../../src/core-modules/forms","sources":["utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,mBAAgB;AAG9C,eAAO,MAAM,iBAAiB,GAAI,OAAO,mBAAmB,EAAE,KAAK,MAAM,WACC,CAAC;AAE3E,eAAO,MAAM,wBAAwB,GACnC,WAAW,GAAG,EACd,YAAY,MAAM,iBAyBnB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from "./types.js";
|
|
2
|
+
export * from "./worker.js";
|
|
3
|
+
export * from "./zodSchemas.js";
|
|
4
|
+
export * from "./utils/exportCursor.js";
|
|
5
|
+
export * from "./utils/importExportRuntime.js";
|
|
6
|
+
export * from "./utils/headerMatcher.js";
|
|
7
|
+
export * from "./utils/importUtils.js";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"../../../../../src/core-modules/import-export","sources":["index.ts"],"names":[],"mappings":"AAAA,2BAAwB;AACxB,4BAAyB;AACzB,gCAA6B;AAC7B,wCAAqC;AACrC,+CAA4C;AAC5C,yCAAsC;AACtC,uCAAoC"}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export interface IImportExportContext<TModels = any> {
|
|
3
|
+
subdomain: string;
|
|
4
|
+
processId: string;
|
|
5
|
+
models?: TModels;
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
}
|
|
8
|
+
export type ImportHeaderDataType = 'text' | 'number' | 'date' | 'boolean' | 'select' | 'multiSelect';
|
|
9
|
+
export interface ImportHeaderDefinition {
|
|
10
|
+
label: string;
|
|
11
|
+
key: string;
|
|
12
|
+
aliases?: string[];
|
|
13
|
+
isDefault?: boolean;
|
|
14
|
+
type?: 'system' | 'customProperty';
|
|
15
|
+
/** Custom property code, unqualified by row. */
|
|
16
|
+
code?: string;
|
|
17
|
+
/** 1-based row of a repeating property group. */
|
|
18
|
+
rowIndex?: number;
|
|
19
|
+
dataType?: ImportHeaderDataType;
|
|
20
|
+
options?: string[];
|
|
21
|
+
/** Human-readable shape of an accepted value, e.g. `YYYY-MM-DD`. */
|
|
22
|
+
example?: string;
|
|
23
|
+
required?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface ImportColumnMapping {
|
|
26
|
+
index: number;
|
|
27
|
+
header: string;
|
|
28
|
+
key: string;
|
|
29
|
+
}
|
|
30
|
+
export interface ImportExportTypeDefinition {
|
|
31
|
+
label: string;
|
|
32
|
+
contentType: string;
|
|
33
|
+
permissions?: string[];
|
|
34
|
+
}
|
|
35
|
+
export interface InsertImportRowsInputData {
|
|
36
|
+
moduleName: string;
|
|
37
|
+
collectionName: string;
|
|
38
|
+
rows: any[];
|
|
39
|
+
userId: string;
|
|
40
|
+
}
|
|
41
|
+
export interface BatchSkipRowInputData {
|
|
42
|
+
moduleName: string;
|
|
43
|
+
collectionName: string;
|
|
44
|
+
rowData: any;
|
|
45
|
+
}
|
|
46
|
+
export interface BatchSkipRowArgs {
|
|
47
|
+
subdomain: string;
|
|
48
|
+
data: BatchSkipRowInputData;
|
|
49
|
+
}
|
|
50
|
+
export interface InsertImportRowsArgs {
|
|
51
|
+
subdomain: string;
|
|
52
|
+
data: InsertImportRowsInputData;
|
|
53
|
+
}
|
|
54
|
+
export interface InsertImportRowsResult {
|
|
55
|
+
successRows: any[];
|
|
56
|
+
errorRows: Array<Record<string, any> & {
|
|
57
|
+
error?: string;
|
|
58
|
+
}>;
|
|
59
|
+
}
|
|
60
|
+
export interface TImportHandlers {
|
|
61
|
+
insertImportRows: (args: InsertImportRowsArgs, ctx: IImportExportContext) => Promise<InsertImportRowsResult>;
|
|
62
|
+
getImportHeaders: (args: {
|
|
63
|
+
subdomain: string;
|
|
64
|
+
data: {
|
|
65
|
+
moduleName: string;
|
|
66
|
+
collectionName: string;
|
|
67
|
+
};
|
|
68
|
+
}, ctx: IImportExportContext) => Promise<ImportHeaderDefinition[]>;
|
|
69
|
+
whenReady?: () => void;
|
|
70
|
+
batchSkipRow?: (args: BatchSkipRowArgs, ctx: IImportExportContext) => Promise<boolean>;
|
|
71
|
+
}
|
|
72
|
+
export interface ImportConfig extends TImportHandlers {
|
|
73
|
+
types?: ImportExportTypeDefinition[];
|
|
74
|
+
}
|
|
75
|
+
export type GetExportData = {
|
|
76
|
+
moduleName: string;
|
|
77
|
+
collectionName: string;
|
|
78
|
+
cursor?: string;
|
|
79
|
+
limit: number;
|
|
80
|
+
filters?: Record<string, unknown>;
|
|
81
|
+
ids?: string[];
|
|
82
|
+
selectedFields?: string[];
|
|
83
|
+
};
|
|
84
|
+
export interface GetExportDataArgs {
|
|
85
|
+
subdomain: string;
|
|
86
|
+
data: GetExportData;
|
|
87
|
+
}
|
|
88
|
+
export interface TExportHandlers {
|
|
89
|
+
getExportHeaders: (args: {
|
|
90
|
+
subdomain: string;
|
|
91
|
+
data: {
|
|
92
|
+
moduleName: string;
|
|
93
|
+
collectionName: string;
|
|
94
|
+
filters?: Record<string, unknown>;
|
|
95
|
+
};
|
|
96
|
+
}, ctx: IImportExportContext) => Promise<ImportHeaderDefinition[]>;
|
|
97
|
+
getExportData: (args: GetExportDataArgs, ctx: IImportExportContext) => Promise<Record<string, any>[]>;
|
|
98
|
+
whenReady?: () => void;
|
|
99
|
+
}
|
|
100
|
+
export interface ExportConfig extends TExportHandlers {
|
|
101
|
+
types?: ImportExportTypeDefinition[];
|
|
102
|
+
}
|
|
103
|
+
export interface ImportExportImportMeta {
|
|
104
|
+
configured: boolean;
|
|
105
|
+
hasGetImportHeaders?: boolean;
|
|
106
|
+
hasInsertImportRows?: boolean;
|
|
107
|
+
types?: ImportExportTypeDefinition[];
|
|
108
|
+
}
|
|
109
|
+
export interface ImportExportExportMeta {
|
|
110
|
+
configured: boolean;
|
|
111
|
+
hasGetExportHeaders?: boolean;
|
|
112
|
+
hasGetExportData?: boolean;
|
|
113
|
+
hasUploadFile?: boolean;
|
|
114
|
+
types?: ImportExportTypeDefinition[];
|
|
115
|
+
}
|
|
116
|
+
export interface ImportExportMeta {
|
|
117
|
+
import?: ImportExportImportMeta;
|
|
118
|
+
export?: ImportExportExportMeta;
|
|
119
|
+
}
|
|
120
|
+
export interface ImportExportConfigs {
|
|
121
|
+
createContext?: (subdomain: string, context: IImportExportContext) => Promise<IImportExportContext>;
|
|
122
|
+
import?: ImportConfig;
|
|
123
|
+
export?: ExportConfig;
|
|
124
|
+
}
|
|
125
|
+
export interface ImportJobData {
|
|
126
|
+
subdomain: string;
|
|
127
|
+
data: {
|
|
128
|
+
importId: string;
|
|
129
|
+
entityType: string;
|
|
130
|
+
fileKey: string;
|
|
131
|
+
userId: string;
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
export interface ExportJobData {
|
|
135
|
+
subdomain: string;
|
|
136
|
+
data: {
|
|
137
|
+
exportId: string;
|
|
138
|
+
entityType: string;
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
export type TGetImportHeadersOutput = ImportHeaderDefinition[];
|
|
142
|
+
export type TInsertImportRowsInput = InsertImportRowsInputData;
|
|
143
|
+
export type TBatchSkipRowInput = BatchSkipRowInputData;
|
|
144
|
+
export declare const InsertImportRowsInputSchema: z.ZodObject<{
|
|
145
|
+
subdomain: z.ZodString;
|
|
146
|
+
data: z.ZodObject<{
|
|
147
|
+
moduleName: z.ZodString;
|
|
148
|
+
collectionName: z.ZodString;
|
|
149
|
+
rows: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">;
|
|
150
|
+
}, "strip", z.ZodTypeAny, {
|
|
151
|
+
moduleName: string;
|
|
152
|
+
collectionName: string;
|
|
153
|
+
rows: Record<string, any>[];
|
|
154
|
+
}, {
|
|
155
|
+
moduleName: string;
|
|
156
|
+
collectionName: string;
|
|
157
|
+
rows: Record<string, any>[];
|
|
158
|
+
}>;
|
|
159
|
+
}, "strip", z.ZodTypeAny, {
|
|
160
|
+
data: {
|
|
161
|
+
moduleName: string;
|
|
162
|
+
collectionName: string;
|
|
163
|
+
rows: Record<string, any>[];
|
|
164
|
+
};
|
|
165
|
+
subdomain: string;
|
|
166
|
+
}, {
|
|
167
|
+
data: {
|
|
168
|
+
moduleName: string;
|
|
169
|
+
collectionName: string;
|
|
170
|
+
rows: Record<string, any>[];
|
|
171
|
+
};
|
|
172
|
+
subdomain: string;
|
|
173
|
+
}>;
|
|
174
|
+
export declare enum TImportExportProducers {
|
|
175
|
+
INSERT_IMPORT_ROWS = "insertImportRows",
|
|
176
|
+
GET_IMPORT_HEADERS = "getImportHeaders",
|
|
177
|
+
BATCH_SKIP_ROW = "batchSkipRow",
|
|
178
|
+
GET_EXPORT_HEADERS = "getExportHeaders",
|
|
179
|
+
GET_EXPORT_DATA = "getExportData"
|
|
180
|
+
}
|
|
181
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"../../../../../src/core-modules/import-export","sources":["types.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
type BuildExportCursorQueryArgs = {
|
|
2
|
+
baseQuery?: Record<string, any>;
|
|
3
|
+
cursor?: string;
|
|
4
|
+
ids?: string[];
|
|
5
|
+
limit?: number;
|
|
6
|
+
};
|
|
7
|
+
type BuildExportCursorQueryResult = {
|
|
8
|
+
query: Record<string, any>;
|
|
9
|
+
isIdsMode: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare const normalizeExportLimit: (limit?: number, fallback?: number) => number;
|
|
12
|
+
export declare const buildExportCursorQuery: ({ baseQuery, cursor, ids, limit, }: BuildExportCursorQueryArgs) => BuildExportCursorQueryResult;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=exportCursor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exportCursor.d.ts","sourceRoot":"../../../../../../src/core-modules/import-export/utils","sources":["exportCursor.ts"],"names":[],"mappings":"AAAA,KAAK,0BAA0B,GAAG;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,KAAK,4BAA4B,GAAG;IAClC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3B,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,QAAQ,MAAM,EACd,iBAAc,KACb,MAEF,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,oCAKpC,0BAA0B,KAAG,4BAsB/B,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ImportHeaderDefinition } from "../types.js";
|
|
2
|
+
export type ImportColumnMatchStatus = 'matched' | 'suggested' | 'unmatched';
|
|
3
|
+
export interface ImportColumnMatch {
|
|
4
|
+
index: number;
|
|
5
|
+
header: string;
|
|
6
|
+
key?: string;
|
|
7
|
+
confidence: number;
|
|
8
|
+
status: ImportColumnMatchStatus;
|
|
9
|
+
}
|
|
10
|
+
/** At or above this score a column is wired up without asking. */
|
|
11
|
+
export declare const AUTO_MATCH_CONFIDENCE = 0.8;
|
|
12
|
+
/** Below this score the guess is too weak to show at all. */
|
|
13
|
+
export declare const SUGGEST_CONFIDENCE = 0.55;
|
|
14
|
+
/**
|
|
15
|
+
* Fold a header down to the letters and digits it carries.
|
|
16
|
+
*
|
|
17
|
+
* Case, spacing, punctuation and bracketed codes are all noise when a
|
|
18
|
+
* spreadsheet is edited by hand. The rule is deliberately language-agnostic:
|
|
19
|
+
* it strips anything that is not a letter or a number in any script, so it
|
|
20
|
+
* behaves the same for `First Name`, `first_name` and `Нэр Овог`.
|
|
21
|
+
*/
|
|
22
|
+
export declare const normalizeHeader: (value: string) => string;
|
|
23
|
+
/**
|
|
24
|
+
* Resolve a file's header row against a module's import fields.
|
|
25
|
+
*
|
|
26
|
+
* Every column comes back, including the ones nothing matched — the caller
|
|
27
|
+
* shows them so a mismatch is visible instead of silently dropping data. A
|
|
28
|
+
* target field is claimed at most once; the weaker duplicate is reported
|
|
29
|
+
* unmatched rather than overwriting its sibling.
|
|
30
|
+
*/
|
|
31
|
+
export declare const matchImportHeaders: (fileHeaders: string[], definitions: ImportHeaderDefinition[]) => ImportColumnMatch[];
|
|
32
|
+
//# sourceMappingURL=headerMatcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"headerMatcher.d.ts","sourceRoot":"../../../../../../src/core-modules/import-export/utils","sources":["headerMatcher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,oBAAiB;AAElD,MAAM,MAAM,uBAAuB,GAAG,SAAS,GAAG,WAAW,GAAG,WAAW,CAAC;AAE5E,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,uBAAuB,CAAC;CACjC;AAED,kEAAkE;AAClE,eAAO,MAAM,qBAAqB,MAAM,CAAC;AAEzC,6DAA6D;AAC7D,eAAO,MAAM,kBAAkB,OAAO,CAAC;AAIvC;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,GAAI,OAAO,MAAM,KAAG,MAMrC,CAAC;AAkHZ;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,GAC7B,aAAa,MAAM,EAAE,EACrB,aAAa,sBAAsB,EAAE,KACpC,iBAAiB,EAqEnB,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export declare const getImportExportJobOptions: ({ attempts, backoffDelay, }: {
|
|
2
|
+
attempts?: number;
|
|
3
|
+
backoffDelay?: number;
|
|
4
|
+
}) => {
|
|
5
|
+
attempts: number;
|
|
6
|
+
backoff: {
|
|
7
|
+
type: "exponential";
|
|
8
|
+
delay: number;
|
|
9
|
+
};
|
|
10
|
+
removeOnComplete: number;
|
|
11
|
+
removeOnFail: number;
|
|
12
|
+
};
|
|
13
|
+
export declare const toTerminalImportExportError: (error: unknown) => {
|
|
14
|
+
code: string;
|
|
15
|
+
stage: string;
|
|
16
|
+
retryable: boolean;
|
|
17
|
+
message: string;
|
|
18
|
+
};
|
|
19
|
+
export declare const logImportExportEvent: ({ level, entity, id, subdomain, stage, event, extra, }: {
|
|
20
|
+
level?: "info" | "warn" | "error";
|
|
21
|
+
entity: "import" | "export";
|
|
22
|
+
id: string;
|
|
23
|
+
subdomain: string;
|
|
24
|
+
stage: string;
|
|
25
|
+
event: string;
|
|
26
|
+
extra?: Record<string, unknown>;
|
|
27
|
+
}) => void;
|
|
28
|
+
export declare const safeCleanup: ({ label, run, }: {
|
|
29
|
+
label: string;
|
|
30
|
+
run: () => Promise<void>;
|
|
31
|
+
}) => Promise<void>;
|
|
32
|
+
//# sourceMappingURL=importExportRuntime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"importExportRuntime.d.ts","sourceRoot":"../../../../../../src/core-modules/import-export/utils","sources":["importExportRuntime.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,yBAAyB,GAAI,6BAGvC;IACD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;;;;;;;;CAUA,CAAC;AAEF,eAAO,MAAM,2BAA2B,GAAI,OAAO,OAAO;;;;;CAiBzD,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,wDAQlC;IACD,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IAClC,MAAM,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC,SAsBA,CAAC;AAEF,eAAO,MAAM,WAAW,GAAU,iBAG/B;IACD,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1B,kBAUA,CAAC"}
|