@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,18 @@
|
|
|
1
|
+
import { ParsedPropertyColumnKey } from "./keys.js";
|
|
2
|
+
type TPropertyData = Record<string, unknown>;
|
|
3
|
+
export declare const readPropertyDataColumn: (propertiesData: TPropertyData | undefined, column: ParsedPropertyColumnKey) => unknown;
|
|
4
|
+
export declare const buildPropertyDataColumns: (propertiesData: TPropertyData, formatValue: (value: unknown) => string) => Record<string, string>;
|
|
5
|
+
/** Reassembles numbered columns into rows. Consumes the columns it reads. */
|
|
6
|
+
export declare const collectPropertyDataFromColumns: (doc: Record<string, unknown>) => TPropertyData;
|
|
7
|
+
/**
|
|
8
|
+
* Fold imported properties onto the ones a record already carries.
|
|
9
|
+
*
|
|
10
|
+
* An import row only holds the columns that particular file happened to
|
|
11
|
+
* include, so writing `propertiesData` wholesale would erase every property
|
|
12
|
+
* the file left out. Repeating groups merge position by position for the same
|
|
13
|
+
* reason: a file that fills row 2 must not blank out row 2's other fields, and
|
|
14
|
+
* rows the file never reached are kept as they were.
|
|
15
|
+
*/
|
|
16
|
+
export declare const mergePropertyData: (existing: TPropertyData | undefined, incoming: TPropertyData) => TPropertyData;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=importExport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"importExport.d.ts","sourceRoot":"../../../../../src/core-modules/properties","sources":["importExport.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,uBAAuB,EAKxB,kBAAe;AAEhB,KAAK,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE7C,eAAO,MAAM,sBAAsB,GACjC,gBAAgB,aAAa,GAAG,SAAS,EACzC,QAAQ,uBAAuB,KAC9B,OAcF,CAAC;AAEF,eAAO,MAAM,wBAAwB,GACnC,gBAAgB,aAAa,EAC7B,aAAa,CAAC,KAAK,EAAE,OAAO,KAAK,MAAM,KACtC,MAAM,CAAC,MAAM,EAAE,MAAM,CA8BvB,CAAC;AAEF,6EAA6E;AAC7E,eAAO,MAAM,8BAA8B,GACzC,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC3B,aA6CF,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,GAC5B,UAAU,aAAa,GAAG,SAAS,EACnC,UAAU,aAAa,KACtB,aA8BF,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from "./filter.js";
|
|
2
|
+
export * from "./importExport.js";
|
|
3
|
+
export * from "./keys.js";
|
|
4
|
+
export * from "./mergeRows.js";
|
|
5
|
+
export * from "./operators.js";
|
|
6
|
+
export * from "./options.js";
|
|
7
|
+
export * from "./setupPropertyProducers.js";
|
|
8
|
+
export * from "./types.js";
|
|
9
|
+
export * from "./valueUsage.js";
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"../../../../../src/core-modules/properties","sources":["index.ts"],"names":[],"mappings":"AAAA,4BAAyB;AACzB,kCAA+B;AAC/B,0BAAuB;AACvB,+BAA4B;AAC5B,+BAA4B;AAC5B,6BAA0B;AAC1B,4CAAyC;AACzC,2BAAwB;AACxB,gCAA6B"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export declare const PROPERTIES_DATA = "propertiesData";
|
|
2
|
+
export declare const PROPERTY_GROUP_KEY_PREFIX = "g:";
|
|
3
|
+
export declare const PROPERTY_ROW_KEY_SEP = "/";
|
|
4
|
+
export declare const PROPERTY_ANY_ROW_KEY_SEP = "~";
|
|
5
|
+
export declare const toPropertyGroupKey: (groupId: string) => string;
|
|
6
|
+
export declare const isPropertyGroupKey: (key: string) => boolean;
|
|
7
|
+
export declare const propertyGroupIdFromKey: (key: string) => string;
|
|
8
|
+
export declare const propertyDataPath: (key: string, prefix?: string) => string;
|
|
9
|
+
export declare const toPropertyRowKey: (groupId: string, fieldId: string, anyRow?: boolean) => string;
|
|
10
|
+
export type ParsedPropertyDataKey = {
|
|
11
|
+
kind: 'field';
|
|
12
|
+
fieldId: string;
|
|
13
|
+
} | {
|
|
14
|
+
kind: 'row';
|
|
15
|
+
groupId: string;
|
|
16
|
+
fieldId: string;
|
|
17
|
+
anyRow: boolean;
|
|
18
|
+
};
|
|
19
|
+
export declare const parsePropertyDataKey: (key: string) => ParsedPropertyDataKey;
|
|
20
|
+
export declare const isPropertyDataPath: (field: string, prefix?: string) => boolean;
|
|
21
|
+
export declare const fieldIdFromPropertyDataPath: (field: string, prefix?: string) => string;
|
|
22
|
+
export declare const propertyDataExistsFilter: (fieldIds: string[], prefix?: string) => {
|
|
23
|
+
$or: {
|
|
24
|
+
[x: string]: {
|
|
25
|
+
$exists: boolean;
|
|
26
|
+
};
|
|
27
|
+
}[];
|
|
28
|
+
};
|
|
29
|
+
export declare const propertyDataRegexFilter: (fieldId: string, regex: RegExp, prefix?: string) => {
|
|
30
|
+
[x: string]: {
|
|
31
|
+
$regex: RegExp;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export declare const PROPERTY_ROW_INDEX_SEP = "#";
|
|
35
|
+
export declare const toPropertyRowColumnKey: (groupId: string, fieldId: string, index: number) => string;
|
|
36
|
+
export type ParsedPropertyColumnKey = {
|
|
37
|
+
kind: 'field';
|
|
38
|
+
fieldId: string;
|
|
39
|
+
} | {
|
|
40
|
+
kind: 'row';
|
|
41
|
+
groupId: string;
|
|
42
|
+
fieldId: string;
|
|
43
|
+
index: number;
|
|
44
|
+
};
|
|
45
|
+
export declare const parsePropertyColumnKey: (columnKey: string) => ParsedPropertyColumnKey | null;
|
|
46
|
+
//# sourceMappingURL=keys.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keys.d.ts","sourceRoot":"../../../../../src/core-modules/properties","sources":["keys.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,mBAAmB,CAAC;AAEhD,eAAO,MAAM,yBAAyB,OAAO,CAAC;AAE9C,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAIxC,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAE5C,eAAO,MAAM,kBAAkB,GAAI,SAAS,MAAM,WACR,CAAC;AAE3C,eAAO,MAAM,kBAAkB,GAAI,KAAK,MAAM,YACH,CAAC;AAE5C,eAAO,MAAM,sBAAsB,GAAI,KAAK,MAAM,WACL,CAAC;AAE9C,eAAO,MAAM,gBAAgB,GAAI,KAAK,MAAM,EAAE,eAAwB,WAClD,CAAC;AAErB,eAAO,MAAM,gBAAgB,GAC3B,SAAS,MAAM,EACf,SAAS,MAAM,EACf,gBAAc,WAIF,CAAC;AAEf,MAAM,MAAM,qBAAqB,GAC7B;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAClC;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,CAAC;AAEvE,eAAO,MAAM,oBAAoB,GAAI,KAAK,MAAM,KAAG,qBAwBlD,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,OAAO,MAAM,EAAE,eAAwB,YAC5C,CAAC;AAE/B,eAAO,MAAM,2BAA2B,GACtC,OAAO,MAAM,EACb,eAAwB,WACU,CAAC;AAErC,eAAO,MAAM,wBAAwB,GACnC,UAAU,MAAM,EAAE,EAClB,eAAwB;;;;;;CAKxB,CAAC;AAEH,eAAO,MAAM,uBAAuB,GAClC,SAAS,MAAM,EACf,OAAO,MAAM,EACb,eAAwB;;;;CACuC,CAAC;AAGlE,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAE1C,eAAO,MAAM,sBAAsB,GACjC,SAAS,MAAM,EACf,SAAS,MAAM,EACf,OAAO,MAAM,WAIuB,CAAC;AAEvC,MAAM,MAAM,uBAAuB,GAC/B;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAClC;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAErE,eAAO,MAAM,sBAAsB,GACjC,WAAW,MAAM,KAChB,uBAAuB,GAAG,IAuB5B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PropertyFilterQuery } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Folds same-group conditions into one `$elemMatch`, so they hold for the same
|
|
4
|
+
* entry rather than for any two. Only safe for conditions joined by AND;
|
|
5
|
+
* `canMerge` opts a condition out and leaves it on its own entry.
|
|
6
|
+
*/
|
|
7
|
+
export declare const mergePropertyRowConditions: <T extends PropertyFilterQuery>(conditions: T[], canMerge?: (condition: T) => boolean) => T[];
|
|
8
|
+
//# sourceMappingURL=mergeRows.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mergeRows.d.ts","sourceRoot":"../../../../../src/core-modules/properties","sources":["mergeRows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,mBAAgB;AA0D9C;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,GAAI,CAAC,SAAS,mBAAmB,EACtE,YAAY,CAAC,EAAE,EACf,WAAU,CAAC,SAAS,EAAE,CAAC,KAAK,OAAoB,KAC/C,CAAC,EA0BH,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PropertyFilterQuery, PropertyFilterOperator } from "./types.js";
|
|
2
|
+
export declare const PROPERTY_FILTER_OPERATORS: Record<PropertyFilterOperator, (path: string, value: unknown) => PropertyFilterQuery | null>;
|
|
3
|
+
export declare const PROPERTY_FILTER_OPERATOR_BY_TYPE: Record<string, PropertyFilterOperator>;
|
|
4
|
+
export declare const isPropertyFilterOperator: (operator: string) => operator is PropertyFilterOperator;
|
|
5
|
+
export declare const MULTI_VALUE_PROPERTY_OPERATORS: PropertyFilterOperator[];
|
|
6
|
+
//# sourceMappingURL=operators.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operators.d.ts","sourceRoot":"../../../../../src/core-modules/properties","sources":["operators.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,mBAAgB;AAgCtE,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAC5C,sBAAsB,EACtB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,mBAAmB,GAAG,IAAI,CAkC7D,CAAC;AAEF,eAAO,MAAM,gCAAgC,EAAE,MAAM,CACnD,MAAM,EACN,sBAAsB,CAOvB,CAAC;AAEF,eAAO,MAAM,wBAAwB,GACnC,UAAU,MAAM,KACf,QAAQ,IAAI,sBAA+D,CAAC;AAE/E,eAAO,MAAM,8BAA8B,EAAE,sBAAsB,EAIlE,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SegmentNode } from "../segments/nodes.js";
|
|
2
|
+
import { IPropertyValueCounts } from "./valueUsage.js";
|
|
3
|
+
type TOption = {
|
|
4
|
+
value: string;
|
|
5
|
+
deprecated?: boolean | null;
|
|
6
|
+
};
|
|
7
|
+
export declare const reconcilePropertyOptions: <T extends TOption>(stored: T[] | undefined, incoming: T[] | undefined, byOption: IPropertyValueCounts["byOption"]) => T[];
|
|
8
|
+
export declare const segmentFiltersByOption: (root: SegmentNode | null | undefined, fieldId: string, value: string) => boolean;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"../../../../../src/core-modules/properties","sources":["options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,6BAA0B;AAGhD,OAAO,EAAE,oBAAoB,EAAE,wBAAqB;AAEpD,KAAK,OAAO,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;CAAE,CAAC;AAG9D,eAAO,MAAM,wBAAwB,GAAI,CAAC,SAAS,OAAO,EACxD,QAAQ,CAAC,EAAE,YAAK,EAChB,UAAU,CAAC,EAAE,YAAK,EAElB,UAAU,oBAAoB,CAAC,UAAU,CAAC,KACzC,CAAC,EAYH,CAAC;AAMF,eAAO,MAAM,sBAAsB,GACjC,MAAM,WAAW,GAAG,IAAI,GAAG,SAAS,EACpC,SAAS,MAAM,EACf,OAAO,MAAM,YAoBd,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setupPropertyProducers.d.ts","sourceRoot":"../../../../../src/core-modules/properties","sources":["setupPropertyProducers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAGlC,OAAO,EAGL,0BAA0B,EAC3B,wBAAqB;AAGtB,eAAO,MAAM,qBAAqB,GAChC,KAAK,OAAO,EACZ,YAAY,0BAA0B,SAiBvC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type PropertyFilterOperator = 'eq' | 'ne' | 'contains' | 'doesNotContain' | 'gt' | 'gte' | 'lt' | 'lte' | 'isTrue' | 'isFalse' | 'in' | 'notIn' | 'isSet' | 'isNotSet' | 'fileType';
|
|
2
|
+
export interface IPropertyFilterCondition {
|
|
3
|
+
/** Either `<fieldId>` or `g:<groupId>/<fieldId>` for a repeating group. */
|
|
4
|
+
fieldId: string;
|
|
5
|
+
type?: string;
|
|
6
|
+
operator?: PropertyFilterOperator;
|
|
7
|
+
value?: unknown;
|
|
8
|
+
}
|
|
9
|
+
export interface IPropertyFilterOptions {
|
|
10
|
+
/** Defaults to `propertiesData`. */
|
|
11
|
+
prefix?: string;
|
|
12
|
+
}
|
|
13
|
+
export type PropertyFilterQuery = Record<string, unknown>;
|
|
14
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"../../../../../src/core-modules/properties","sources":["types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,sBAAsB,GAC9B,IAAI,GACJ,IAAI,GACJ,UAAU,GACV,gBAAgB,GAChB,IAAI,GACJ,KAAK,GACL,IAAI,GACJ,KAAK,GACL,QAAQ,GACR,SAAS,GACT,IAAI,GACJ,OAAO,GACP,OAAO,GACP,UAAU,GACV,UAAU,CAAC;AAEf,MAAM,WAAW,wBAAwB;IACvC,2EAA2E;IAC3E,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,sBAAsB,CAAC;IAClC,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,sBAAsB;IACrC,oCAAoC;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Collection } from 'mongoose';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export declare enum TPropertyProducers {
|
|
4
|
+
VALUE_USAGE = "valueUsage"
|
|
5
|
+
}
|
|
6
|
+
export declare const PropertyValueUsageInput: z.ZodObject<{
|
|
7
|
+
contentType: z.ZodString;
|
|
8
|
+
path: z.ZodString;
|
|
9
|
+
part: z.ZodEnum<["samples", "counts"]>;
|
|
10
|
+
optionValues: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
11
|
+
value: z.ZodOptional<z.ZodString>;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
path: string;
|
|
14
|
+
contentType: string;
|
|
15
|
+
part: "samples" | "counts";
|
|
16
|
+
value?: string | undefined;
|
|
17
|
+
optionValues?: string[] | undefined;
|
|
18
|
+
}, {
|
|
19
|
+
path: string;
|
|
20
|
+
contentType: string;
|
|
21
|
+
part: "samples" | "counts";
|
|
22
|
+
value?: string | undefined;
|
|
23
|
+
optionValues?: string[] | undefined;
|
|
24
|
+
}>;
|
|
25
|
+
export type TPropertyValueUsageInput = z.infer<typeof PropertyValueUsageInput>;
|
|
26
|
+
export type TPropertyProducersInput = {
|
|
27
|
+
[TPropertyProducers.VALUE_USAGE]: TPropertyValueUsageInput;
|
|
28
|
+
};
|
|
29
|
+
export interface IPropertyValueSamples {
|
|
30
|
+
known: boolean;
|
|
31
|
+
samples: {
|
|
32
|
+
_id: string;
|
|
33
|
+
label: string;
|
|
34
|
+
}[];
|
|
35
|
+
}
|
|
36
|
+
export interface IPropertyValueCounts {
|
|
37
|
+
known: boolean;
|
|
38
|
+
count: number;
|
|
39
|
+
capped: boolean;
|
|
40
|
+
byOption: {
|
|
41
|
+
value: string;
|
|
42
|
+
count: number;
|
|
43
|
+
}[] | null;
|
|
44
|
+
}
|
|
45
|
+
export type TPropertyValueUsage = IPropertyValueSamples | IPropertyValueCounts;
|
|
46
|
+
export type TPropertyValueUsageHandler = (args: {
|
|
47
|
+
subdomain: string;
|
|
48
|
+
data: TPropertyValueUsageInput;
|
|
49
|
+
}) => Promise<TPropertyValueUsage>;
|
|
50
|
+
export declare const UNKNOWN_VALUE_SAMPLES: IPropertyValueSamples;
|
|
51
|
+
export declare const UNKNOWN_VALUE_COUNTS: IPropertyValueCounts;
|
|
52
|
+
export declare const unknownValueUsage: (part: TPropertyValueUsageInput["part"]) => TPropertyValueUsage;
|
|
53
|
+
export declare const measurePropertyValueSamples: (collection: Collection, input: TPropertyValueUsageInput, toLabel: (doc: Record<string, unknown>) => string) => Promise<IPropertyValueSamples>;
|
|
54
|
+
export declare const measurePropertyValueCounts: (collection: Collection, input: TPropertyValueUsageInput) => Promise<IPropertyValueCounts>;
|
|
55
|
+
export declare const measurePropertyValueUsage: (collection: Collection, input: TPropertyValueUsageInput, toLabel: (doc: Record<string, unknown>) => string) => Promise<TPropertyValueUsage>;
|
|
56
|
+
//# sourceMappingURL=valueUsage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"valueUsage.d.ts","sourceRoot":"../../../../../src/core-modules/properties","sources":["valueUsage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,oBAAY,kBAAkB;IAC5B,WAAW,eAAe;CAC3B;AAED,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;EAUlC,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE/E,MAAM,MAAM,uBAAuB,GAAG;IACpC,CAAC,kBAAkB,CAAC,WAAW,CAAC,EAAE,wBAAwB,CAAC;CAC5D,CAAC;AAEF,MAAM,WAAW,qBAAqB;IAEpC,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC3C;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAEhB,QAAQ,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,GAAG,IAAI,CAAC;CACrD;AAED,MAAM,MAAM,mBAAmB,GAAG,qBAAqB,GAAG,oBAAoB,CAAC;AAE/E,MAAM,MAAM,0BAA0B,GAAG,CAAC,IAAI,EAAE;IAC9C,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,wBAAwB,CAAC;CAChC,KAAK,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAEnC,eAAO,MAAM,qBAAqB,EAAE,qBAGnC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,oBAKlC,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC5B,MAAM,wBAAwB,CAAC,MAAM,CAAC,KACrC,mBACgE,CAAC;AAWpE,eAAO,MAAM,2BAA2B,GACtC,YAAY,UAAU,EACtB,OAAO,wBAAwB,EAC/B,SAAS,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,KAChD,OAAO,CAAC,qBAAqB,CAgB/B,CAAC;AA6BF,eAAO,MAAM,0BAA0B,GACrC,YAAY,UAAU,EACtB,OAAO,wBAAwB,KAC9B,OAAO,CAAC,oBAAoB,CAkB9B,CAAC;AAGF,eAAO,MAAM,yBAAyB,GACpC,YAAY,UAAU,EACtB,OAAO,wBAAwB,EAC/B,SAAS,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,KAChD,OAAO,CAAC,mBAAmB,CAGqB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SegmentRelationMeta } from "./relationRegistry.js";
|
|
2
|
+
import { SegmentNode } from "./nodes.js";
|
|
3
|
+
export declare const segmentDependencyKey: (segmentId: string) => string;
|
|
4
|
+
export declare const segmentDependencies: (contentType: string, root: SegmentNode, relations?: ReadonlyMap<string, SegmentRelationMeta>, fieldSources?: ReadonlyMap<string, string[]>) => string[];
|
|
5
|
+
export declare const segmentDependsOnClock: (root: SegmentNode) => boolean;
|
|
6
|
+
//# sourceMappingURL=dependencies.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dependencies.d.ts","sourceRoot":"../../../../../src/core-modules/segments","sources":["dependencies.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,8BAA2B;AAGzD,OAAO,EAAE,WAAW,EAAE,mBAAgB;AAEtC,eAAO,MAAM,oBAAoB,GAAI,WAAW,MAAM,KAAG,MACjC,CAAC;AAEzB,eAAO,MAAM,mBAAmB,GAC9B,aAAa,MAAM,EACnB,MAAM,WAAW,EACjB,YAAY,WAAW,CAAC,MAAM,EAAE,mBAAmB,CAAC,EACpD,eAAe,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,KAC3C,MAAM,EA2BR,CAAC;AAeF,eAAO,MAAM,qBAAqB,GAAI,MAAM,WAAW,KAAG,OAazD,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SegmentNode } from "./nodes.js";
|
|
2
|
+
export type SegmentEvaluationState = 'matched' | 'notMatched' | 'unknown';
|
|
3
|
+
export type SegmentDecideContext = {
|
|
4
|
+
subjectType?: string;
|
|
5
|
+
values: ReadonlyMap<string, unknown>;
|
|
6
|
+
unavailable?: ReadonlySet<string>;
|
|
7
|
+
now?: Date;
|
|
8
|
+
timeZone?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const decideSegmentNode: (node: SegmentNode, context: SegmentDecideContext) => SegmentEvaluationState;
|
|
11
|
+
//# sourceMappingURL=evaluate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evaluate.d.ts","sourceRoot":"../../../../../src/core-modules/segments","sources":["evaluate.ts"],"names":[],"mappings":"AAWA,OAAO,EAAoB,WAAW,EAAgB,mBAAgB;AAStE,MAAM,MAAM,sBAAsB,GAAG,SAAS,GAAG,YAAY,GAAG,SAAS,CAAC;AAE1E,MAAM,MAAM,oBAAoB,GAAG;IACjC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,WAAW,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAClC,GAAG,CAAC,EAAE,IAAI,CAAC;IACX,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AA4RF,eAAO,MAAM,iBAAiB,GAC5B,MAAM,WAAW,EACjB,SAAS,oBAAoB,KAC5B,sBAwEF,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { SegmentNode } from "./nodes.js";
|
|
2
|
+
import { SegmentValueRequest } from "./plan.js";
|
|
3
|
+
import { SegmentRelationDirectory } from "./relationRegistry.js";
|
|
4
|
+
import { SegmentEvaluateFieldsResult } from "./types.js";
|
|
5
|
+
export type SegmentEvaluationGateway = {
|
|
6
|
+
relationsFor: (subjectType: string) => Promise<SegmentRelationDirectory>;
|
|
7
|
+
timeZone?: () => Promise<string>;
|
|
8
|
+
resolveFields: (pluginName: string, input: {
|
|
9
|
+
subjectType: string;
|
|
10
|
+
subjectIds: string[];
|
|
11
|
+
requests: SegmentValueRequest[];
|
|
12
|
+
timeZone?: string;
|
|
13
|
+
}) => Promise<SegmentEvaluateFieldsResult>;
|
|
14
|
+
resolveEdges: (args: {
|
|
15
|
+
subjectRecordType: string;
|
|
16
|
+
relatedRecordType: string;
|
|
17
|
+
subjectIds: string[];
|
|
18
|
+
}) => Promise<Record<string, string[]>>;
|
|
19
|
+
};
|
|
20
|
+
export type SegmentBatchResult = {
|
|
21
|
+
matched: string[];
|
|
22
|
+
notMatched: string[];
|
|
23
|
+
undecided: string[];
|
|
24
|
+
};
|
|
25
|
+
export declare const evaluateSegmentBatch: (gateway: SegmentEvaluationGateway, segment: {
|
|
26
|
+
_id: string;
|
|
27
|
+
contentType: string;
|
|
28
|
+
root: SegmentNode;
|
|
29
|
+
}, subjectIds: string[]) => Promise<SegmentBatchResult>;
|
|
30
|
+
export declare const segmentNodeAt: (root: SegmentNode, path: string) => SegmentNode | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* What a segment's relation conditions measure for one subject (a sum of
|
|
33
|
+
* deals, a count), keyed by each condition's place in the tree. A trigger's
|
|
34
|
+
* re-enrollment watches these: the subject's own fields do not change when
|
|
35
|
+
* its deals do.
|
|
36
|
+
*/
|
|
37
|
+
export declare const measureSegmentSubject: (gateway: SegmentEvaluationGateway, segment: {
|
|
38
|
+
_id: string;
|
|
39
|
+
contentType: string;
|
|
40
|
+
root: SegmentNode;
|
|
41
|
+
}, subjectId: string, paths: string[]) => Promise<Record<string, unknown>>;
|
|
42
|
+
//# sourceMappingURL=evaluateBatch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evaluateBatch.d.ts","sourceRoot":"../../../../../src/core-modules/segments","sources":["evaluateBatch.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,mBAAgB;AACtC,OAAO,EAGL,mBAAmB,EACpB,kBAAe;AAChB,OAAO,EAAE,wBAAwB,EAAE,8BAA2B;AAC9D,OAAO,EAAE,2BAA2B,EAAE,mBAAgB;AAGtD,MAAM,MAAM,wBAAwB,GAAG;IACrC,YAAY,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC,wBAAwB,CAAC,CAAC;IAEzE,QAAQ,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;IAEjC,aAAa,EAAE,CACb,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE;QACL,WAAW,EAAE,MAAM,CAAC;QACpB,UAAU,EAAE,MAAM,EAAE,CAAC;QACrB,QAAQ,EAAE,mBAAmB,EAAE,CAAC;QAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,KACE,OAAO,CAAC,2BAA2B,CAAC,CAAC;IAE1C,YAAY,EAAE,CAAC,IAAI,EAAE;QACnB,iBAAiB,EAAE,MAAM,CAAC;QAC1B,iBAAiB,EAAE,MAAM,CAAC;QAC1B,UAAU,EAAE,MAAM,EAAE,CAAC;KACtB,KAAK,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;CACzC,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAiHF,eAAO,MAAM,oBAAoB,GAC/B,SAAS,wBAAwB,EACjC,SAAS;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,WAAW,CAAA;CAAE,EAChE,YAAY,MAAM,EAAE,KACnB,OAAO,CAAC,kBAAkB,CAiD5B,CAAC;AAGF,eAAO,MAAM,aAAa,GACxB,MAAM,WAAW,EACjB,MAAM,MAAM,KACX,WAAW,GAAG,SAUe,CAAC;AAEjC;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,GAChC,SAAS,wBAAwB,EACjC,SAAS;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,WAAW,CAAA;CAAE,EAChE,WAAW,MAAM,EACjB,OAAO,MAAM,EAAE,KACd,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA2BjC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { SegmentRelationMeta } from "./relationRegistry.js";
|
|
2
|
+
import { SegmentFieldMeta } from "./fieldMeta.js";
|
|
3
|
+
import { SegmentValueRequest } from "./plan.js";
|
|
4
|
+
import { ISegmentContentType, SegmentEvaluateFieldsResult } from "./types.js";
|
|
5
|
+
export declare const segmentModuleForContentType: <TModule extends {
|
|
6
|
+
contentTypes?: ISegmentContentType[];
|
|
7
|
+
}>(modules: Record<string, TModule>, contentType: string) => TModule | undefined;
|
|
8
|
+
type SegmentEvaluableModule<TModels> = {
|
|
9
|
+
segmentFields?: Record<string, SegmentFieldMeta[]>;
|
|
10
|
+
segmentRelations?: SegmentRelationMeta[];
|
|
11
|
+
evaluateFields: (data: SegmentEvaluateFieldsData, context: {
|
|
12
|
+
models: TModels;
|
|
13
|
+
subdomain: string;
|
|
14
|
+
}) => Promise<SegmentEvaluateFieldsResult>;
|
|
15
|
+
};
|
|
16
|
+
type SegmentEvaluateFieldsData = {
|
|
17
|
+
subjectType: string;
|
|
18
|
+
subjectIds: string[];
|
|
19
|
+
requests: SegmentValueRequest[];
|
|
20
|
+
};
|
|
21
|
+
export declare const createSegmentEvaluateFieldsHandler: <TModels>({ modules, generateModels, }: {
|
|
22
|
+
modules: Record<string, SegmentEvaluableModule<TModels>>;
|
|
23
|
+
generateModels: (subdomain: string) => Promise<TModels>;
|
|
24
|
+
}) => ({ subdomain, data, }: {
|
|
25
|
+
subdomain: string;
|
|
26
|
+
data: SegmentEvaluateFieldsData;
|
|
27
|
+
}) => Promise<SegmentEvaluateFieldsResult>;
|
|
28
|
+
export {};
|
|
29
|
+
//# sourceMappingURL=evaluateFieldsRouter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evaluateFieldsRouter.d.ts","sourceRoot":"../../../../../src/core-modules/segments","sources":["evaluateFieldsRouter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,8BAA2B;AACzD,OAAO,EAAE,gBAAgB,EAAE,uBAAoB;AAC/C,OAAO,EAAE,mBAAmB,EAAE,kBAAe;AAC7C,OAAO,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,mBAAgB;AAE3E,eAAO,MAAM,2BAA2B,GACtC,OAAO,SAAS;IAAE,YAAY,CAAC,EAAE,mBAAmB,EAAE,CAAA;CAAE,EAExD,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,aAAa,MAAM,KAClB,OAAO,GAAG,SAKV,CAAC;AAEJ,KAAK,sBAAsB,CAAC,OAAO,IAAI;IACrC,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,EAAE,CAAC,CAAC;IACnD,gBAAgB,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACzC,cAAc,EAAE,CACd,IAAI,EAAE,yBAAyB,EAC/B,OAAO,EAAE;QAAE,MAAM,EAAE,OAAO,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,KAC5C,OAAO,CAAC,2BAA2B,CAAC,CAAC;CAC3C,CAAC;AAEF,KAAK,yBAAyB,GAAG;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,QAAQ,EAAE,mBAAmB,EAAE,CAAC;CACjC,CAAC;AAEF,eAAO,MAAM,kCAAkC,GAC5C,OAAO,EAAE,8BAGP;IACD,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC,OAAO,CAAC,CAAC,CAAC;IACzD,cAAc,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CACzD,MACM,sBAGJ;IACD,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,yBAAyB,CAAC;CACjC,KAAG,OAAO,CAAC,2BAA2B,CA+CtC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { SegmentRelationMeta } from "./relationRegistry.js";
|
|
2
|
+
import { SegmentFieldMeta } from "./fieldMeta.js";
|
|
3
|
+
import { SegmentFieldNamespace } from "./fieldMeta.js";
|
|
4
|
+
import { SegmentDerivedRequest } from "./fieldRequests.js";
|
|
5
|
+
import { SegmentNode } from "./nodes.js";
|
|
6
|
+
import { SegmentSourceResolver } from "./ownedSource.js";
|
|
7
|
+
import { SegmentValueRequest } from "./plan.js";
|
|
8
|
+
import { SegmentEvaluateFieldsResult } from "./types.js";
|
|
9
|
+
export type SegmentOwnerContract = {
|
|
10
|
+
sourceFor: SegmentSourceResolver;
|
|
11
|
+
fields: Record<string, SegmentFieldMeta[]>;
|
|
12
|
+
namespaces?: Record<string, SegmentFieldNamespace[]>;
|
|
13
|
+
relations?: SegmentRelationMeta[];
|
|
14
|
+
resolveDerived?: (input: {
|
|
15
|
+
subjectType: string;
|
|
16
|
+
subjectIds: string[];
|
|
17
|
+
requests: SegmentDerivedRequest[];
|
|
18
|
+
}) => Promise<Record<string, Record<string, unknown>>>;
|
|
19
|
+
rewritePredicate?: (node: SegmentNode) => Promise<SegmentNode>;
|
|
20
|
+
};
|
|
21
|
+
export declare const evaluateOwnedSegmentFields: (contract: SegmentOwnerContract, { subjectType, subjectIds, requests, timeZone, }: {
|
|
22
|
+
subjectType: string;
|
|
23
|
+
subjectIds: string[];
|
|
24
|
+
requests: SegmentValueRequest[];
|
|
25
|
+
timeZone?: string;
|
|
26
|
+
}) => Promise<SegmentEvaluateFieldsResult>;
|
|
27
|
+
//# sourceMappingURL=evaluateOwned.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evaluateOwned.d.ts","sourceRoot":"../../../../../src/core-modules/segments","sources":["evaluateOwned.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,8BAA2B;AACzD,OAAO,EAAE,gBAAgB,EAAE,uBAAoB;AAC/C,OAAO,EAAE,qBAAqB,EAAE,uBAAoB;AACpD,OAAO,EAKL,qBAAqB,EAEtB,2BAAwB;AAEzB,OAAO,EAAE,WAAW,EAAE,mBAAgB;AACtC,OAAO,EAAE,qBAAqB,EAAE,yBAAsB;AACtD,OAAO,EAAE,mBAAmB,EAAE,kBAAe;AAC7C,OAAO,EAAE,2BAA2B,EAAE,mBAAgB;AAEtD,MAAM,MAAM,oBAAoB,GAAG;IACjC,SAAS,EAAE,qBAAqB,CAAC;IACjC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,EAAE,CAAC,CAAC;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,EAAE,CAAC,CAAC;IACrD,SAAS,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAClC,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE;QACvB,WAAW,EAAE,MAAM,CAAC;QACpB,UAAU,EAAE,MAAM,EAAE,CAAC;QACrB,QAAQ,EAAE,qBAAqB,EAAE,CAAC;KACnC,KAAK,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IACvD,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC;CAChE,CAAC;AAiBF,eAAO,MAAM,0BAA0B,GACrC,UAAU,oBAAoB,EAC9B,kDAKG;IACD,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,QAAQ,EAAE,mBAAmB,EAAE,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,KACA,OAAO,CAAC,2BAA2B,CAuGrC,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export declare const SEGMENT_QUEUES: {
|
|
2
|
+
readonly service: "logs";
|
|
3
|
+
readonly changed: "segment-changed";
|
|
4
|
+
readonly forget: "segment-forget";
|
|
5
|
+
readonly rebuild: "segment-rebuild";
|
|
6
|
+
readonly reconcile: "segment-reconcile";
|
|
7
|
+
};
|
|
8
|
+
export type SegmentQueueName = (typeof SEGMENT_QUEUES)[Exclude<keyof typeof SEGMENT_QUEUES, 'service'>];
|
|
9
|
+
export declare const segmentQueueFor: (job: SegmentJob) => SegmentQueueName;
|
|
10
|
+
export type SegmentChangedEvent = {
|
|
11
|
+
kind?: 'changed';
|
|
12
|
+
subdomain: string;
|
|
13
|
+
contentType: string;
|
|
14
|
+
docIds: string[];
|
|
15
|
+
segmentIds?: string[];
|
|
16
|
+
changed?: Record<string, {
|
|
17
|
+
prev?: unknown;
|
|
18
|
+
next?: unknown;
|
|
19
|
+
}>;
|
|
20
|
+
};
|
|
21
|
+
export type SegmentRebuildEvent = {
|
|
22
|
+
kind: 'rebuild';
|
|
23
|
+
subdomain: string;
|
|
24
|
+
segmentId: string;
|
|
25
|
+
source?: 'reconcile';
|
|
26
|
+
};
|
|
27
|
+
export type SegmentReconcileEvent = {
|
|
28
|
+
kind: 'reconcile';
|
|
29
|
+
subdomain: string;
|
|
30
|
+
before?: string;
|
|
31
|
+
step?: number;
|
|
32
|
+
};
|
|
33
|
+
export type SegmentForgetEvent = {
|
|
34
|
+
kind: 'forget';
|
|
35
|
+
subdomain: string;
|
|
36
|
+
contentType: string;
|
|
37
|
+
segmentIds: string[];
|
|
38
|
+
};
|
|
39
|
+
export type SegmentJob = SegmentChangedEvent | SegmentRebuildEvent | SegmentForgetEvent | SegmentReconcileEvent;
|
|
40
|
+
export declare const scheduleSegmentReconcile: (subdomain: string) => void;
|
|
41
|
+
export declare const sendSegmentChanged: (event: Omit<SegmentChangedEvent, "kind">) => void;
|
|
42
|
+
export declare const sendSegmentReconcile: (event: Omit<SegmentReconcileEvent, "kind">) => void;
|
|
43
|
+
export declare const sendSegmentRebuild: (event: Omit<SegmentRebuildEvent, "kind">) => void;
|
|
44
|
+
export declare const sendSegmentForget: (event: Omit<SegmentForgetEvent, "kind">) => void;
|
|
45
|
+
//# sourceMappingURL=events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"../../../../../src/core-modules/segments","sources":["events.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc;;;;;;CAMjB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,OAAO,CAC5D,MAAM,OAAO,cAAc,EAC3B,SAAS,CACV,CAAC,CAAC;AAEH,eAAO,MAAM,eAAe,GAAI,KAAK,UAAU,KAAG,gBACX,CAAC;AAExC,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,IAAI,CAAC,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;CAC9D,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,SAAS,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAGlB,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,WAAW,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,UAAU,GAClB,mBAAmB,GACnB,mBAAmB,GACnB,kBAAkB,GAClB,qBAAqB,CAAC;AAO1B,eAAO,MAAM,wBAAwB,GAAI,WAAW,MAAM,KAAG,IA4B5D,CAAC;AA0BF,eAAO,MAAM,kBAAkB,GAC7B,OAAO,IAAI,CAAC,mBAAmB,EAAE,MAAM,CAAC,KACvC,IAMF,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,OAAO,IAAI,CAAC,qBAAqB,EAAE,MAAM,CAAC,KACzC,IAAgD,CAAC;AAEpD,eAAO,MAAM,kBAAkB,GAC7B,OAAO,IAAI,CAAC,mBAAmB,EAAE,MAAM,CAAC,KACvC,IAA8C,CAAC;AAElD,eAAO,MAAM,iBAAiB,GAC5B,OAAO,IAAI,CAAC,kBAAkB,EAAE,MAAM,CAAC,KACtC,IAMF,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { SegmentOperator } from "./operators.js";
|
|
2
|
+
import { SegmentFieldMeta, SegmentFieldOption, SegmentFieldQuery } from "./fieldMeta.js";
|
|
3
|
+
export declare const SEGMENT_TEXT_OPERATORS: SegmentOperator[];
|
|
4
|
+
export declare const SEGMENT_ID_OPERATORS: SegmentOperator[];
|
|
5
|
+
export declare const SEGMENT_NUMBER_OPERATORS: SegmentOperator[];
|
|
6
|
+
export declare const SEGMENT_DATE_OPERATORS: SegmentOperator[];
|
|
7
|
+
export declare const SEGMENT_BOOLEAN_OPERATORS: SegmentOperator[];
|
|
8
|
+
type Base = {
|
|
9
|
+
key: string;
|
|
10
|
+
label: string;
|
|
11
|
+
path?: string;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Builders for a content type's filterable fields.
|
|
15
|
+
*
|
|
16
|
+
* Namespaced because every call site is a list of one-liners, where a bare
|
|
17
|
+
* `textField(...)` says nothing about what it is building.
|
|
18
|
+
*/
|
|
19
|
+
export declare const SegmentField: {
|
|
20
|
+
readonly text: ({ key, label, path }: Base) => SegmentFieldMeta;
|
|
21
|
+
readonly number: ({ key, label, path }: Base) => SegmentFieldMeta;
|
|
22
|
+
readonly date: ({ key, label, path }: Base) => SegmentFieldMeta;
|
|
23
|
+
readonly boolean: ({ key, label, path }: Base) => SegmentFieldMeta;
|
|
24
|
+
readonly static: ({ key, label, path, options, }: Base & {
|
|
25
|
+
options: readonly string[] | SegmentFieldOption[];
|
|
26
|
+
}) => SegmentFieldMeta;
|
|
27
|
+
readonly lookup: ({ key, label, path, query, }: Base & {
|
|
28
|
+
query: SegmentFieldQuery;
|
|
29
|
+
}) => SegmentFieldMeta;
|
|
30
|
+
readonly component: ({ key, label, path, component, }: Base & {
|
|
31
|
+
component: string;
|
|
32
|
+
}) => SegmentFieldMeta;
|
|
33
|
+
};
|
|
34
|
+
export {};
|
|
35
|
+
//# sourceMappingURL=fieldBuilders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fieldBuilders.d.ts","sourceRoot":"../../../../../src/core-modules/segments","sources":["fieldBuilders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,uBAAoB;AAC9C,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EAClB,uBAAoB;AAErB,eAAO,MAAM,sBAAsB,mBAKlC,CAAC;AAEF,eAAO,MAAM,oBAAoB,mBAGhC,CAAC;AAEF,eAAO,MAAM,wBAAwB,mBAIpC,CAAC;AAEF,eAAO,MAAM,sBAAsB,mBAWlC,CAAC;AAEF,eAAO,MAAM,yBAAyB,mBAGrC,CAAC;AAEF,KAAK,IAAI,GAAG;IACV,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AA0FF;;;;;GAKG;AACH,eAAO,MAAM,YAAY;0CA9FW,IAAI,KAAG,gBAAgB;4CASrB,IAAI,KAAG,gBAAgB;0CASzB,IAAI,KAAG,gBAAgB;6CASpB,IAAI,KAAG,gBAAgB;sDAc3D,IAAI,GAAG;QACR,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,kBAAkB,EAAE,CAAC;KACnD,KAAG,gBAAgB;oDAkBjB,IAAI,GAAG;QAAE,KAAK,EAAE,iBAAiB,CAAA;KAAE,KAAG,gBAAgB;2DAgBtD,IAAI,GAAG;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,KAAG,gBAAgB;CAyBxC,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { SegmentOperator, SegmentOperatorSpec } from "./operators.js";
|
|
2
|
+
export type SegmentFieldOption = {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
};
|
|
6
|
+
export type SegmentFieldQuery = {
|
|
7
|
+
name: string;
|
|
8
|
+
labelField: string;
|
|
9
|
+
valueField?: string;
|
|
10
|
+
variables?: Record<string, string | boolean>;
|
|
11
|
+
};
|
|
12
|
+
export declare const DEFAULT_SEGMENT_VALUE_FIELD = "_id";
|
|
13
|
+
export type SegmentFieldDependency = {
|
|
14
|
+
contentType?: string;
|
|
15
|
+
fields: string[];
|
|
16
|
+
via?: string;
|
|
17
|
+
};
|
|
18
|
+
type SegmentFieldSource = {
|
|
19
|
+
kind: 'projected';
|
|
20
|
+
path: string;
|
|
21
|
+
dependsOn?: SegmentFieldDependency[];
|
|
22
|
+
} | {
|
|
23
|
+
kind: 'derived';
|
|
24
|
+
dependsOn: SegmentFieldDependency[];
|
|
25
|
+
};
|
|
26
|
+
type SegmentFieldIdentity = {
|
|
27
|
+
key: string;
|
|
28
|
+
label: string;
|
|
29
|
+
operators: SegmentOperator[];
|
|
30
|
+
};
|
|
31
|
+
type SegmentFieldPresentation = {
|
|
32
|
+
input: 'text' | 'number' | 'date' | 'boolean';
|
|
33
|
+
} | {
|
|
34
|
+
input: 'select';
|
|
35
|
+
source: 'static';
|
|
36
|
+
options: SegmentFieldOption[];
|
|
37
|
+
} | {
|
|
38
|
+
input: 'select';
|
|
39
|
+
source: 'query';
|
|
40
|
+
query: SegmentFieldQuery;
|
|
41
|
+
} | {
|
|
42
|
+
input: 'select';
|
|
43
|
+
source: 'component';
|
|
44
|
+
component: string;
|
|
45
|
+
};
|
|
46
|
+
export type SegmentFieldMeta = SegmentFieldIdentity & SegmentFieldSource & SegmentFieldPresentation;
|
|
47
|
+
/**
|
|
48
|
+
* A group of fields nobody can enumerate at build time - a tenant's own
|
|
49
|
+
* custom properties. The values live in one object on the record, keyed by
|
|
50
|
+
* field id, so `prefix.<id>` reads and filters as the dotted path it is.
|
|
51
|
+
*/
|
|
52
|
+
export type SegmentFieldNamespace = {
|
|
53
|
+
prefix: string;
|
|
54
|
+
label: string;
|
|
55
|
+
path: string;
|
|
56
|
+
propertyType?: string;
|
|
57
|
+
};
|
|
58
|
+
export declare const resolveSegmentFieldOperators: (field: SegmentFieldMeta) => SegmentOperatorSpec[];
|
|
59
|
+
export declare const resolveSegmentFieldDependencies: (field: SegmentFieldMeta) => SegmentFieldDependency[];
|
|
60
|
+
export declare const resolveSegmentValueField: (query: SegmentFieldQuery) => string;
|
|
61
|
+
export {};
|
|
62
|
+
//# sourceMappingURL=fieldMeta.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fieldMeta.d.ts","sourceRoot":"../../../../../src/core-modules/segments","sources":["fieldMeta.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,mBAAmB,EAGpB,uBAAoB;AAErB,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC;CAC9C,CAAC;AAEF,eAAO,MAAM,2BAA2B,QAAQ,CAAC;AAEjD,MAAM,MAAM,sBAAsB,GAAG;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,KAAK,kBAAkB,GACnB;IACE,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,sBAAsB,EAAE,CAAC;CACtC,GACD;IACE,IAAI,EAAE,SAAS,CAAC;IAChB,SAAS,EAAE,sBAAsB,EAAE,CAAC;CACrC,CAAC;AAEN,KAAK,oBAAoB,GAAG;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,eAAe,EAAE,CAAC;CAC9B,CAAC;AAEF,KAAK,wBAAwB,GACzB;IAAE,KAAK,EAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAA;CAAE,GACjD;IAAE,KAAK,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE,kBAAkB,EAAE,CAAA;CAAE,GACpE;IAAE,KAAK,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,iBAAiB,CAAA;CAAE,GAC9D;IAAE,KAAK,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,WAAW,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhE,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GACjD,kBAAkB,GAClB,wBAAwB,CAAC;AAE3B;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IAEb,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,4BAA4B,GACvC,OAAO,gBAAgB,KACtB,mBAAmB,EAYrB,CAAC;AAEF,eAAO,MAAM,+BAA+B,GAC1C,OAAO,gBAAgB,KACtB,sBAAsB,EAMxB,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,OAAO,iBAAiB,KAAG,MACnB,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { SegmentFieldMeta, SegmentFieldNamespace } from "./fieldMeta.js";
|
|
2
|
+
import { SegmentRelationRequest, SegmentValueRequest } from "./plan.js";
|
|
3
|
+
export type SegmentProjectedRequest = {
|
|
4
|
+
ref: string;
|
|
5
|
+
contentType: string;
|
|
6
|
+
fieldKey: string;
|
|
7
|
+
path: string;
|
|
8
|
+
};
|
|
9
|
+
export type SegmentDerivedRequest = {
|
|
10
|
+
ref: string;
|
|
11
|
+
contentType: string;
|
|
12
|
+
fieldKey: string;
|
|
13
|
+
};
|
|
14
|
+
export type SegmentNamespacedRequest = {
|
|
15
|
+
ref: string;
|
|
16
|
+
contentType: string;
|
|
17
|
+
fieldKey: string;
|
|
18
|
+
namespace: SegmentFieldNamespace;
|
|
19
|
+
entryKey: string;
|
|
20
|
+
};
|
|
21
|
+
export type SegmentRequestSplit = {
|
|
22
|
+
projected: SegmentProjectedRequest[];
|
|
23
|
+
derived: SegmentDerivedRequest[];
|
|
24
|
+
namespaced: SegmentNamespacedRequest[];
|
|
25
|
+
relations: SegmentRelationRequest[];
|
|
26
|
+
undeclared: string[];
|
|
27
|
+
};
|
|
28
|
+
export declare const splitSegmentFieldRequests: (requests: SegmentValueRequest[], segmentFields?: Record<string, SegmentFieldMeta[]>, segmentFieldNamespaces?: Record<string, SegmentFieldNamespace[]>) => SegmentRequestSplit;
|
|
29
|
+
export declare const readSegmentPath: (source: unknown, path: string) => unknown;
|
|
30
|
+
export declare const projectionForRequests: (projected: SegmentProjectedRequest[]) => Record<string, 1>;
|
|
31
|
+
export declare const readNamespacedValue: (document: Record<string, unknown>, request: SegmentNamespacedRequest) => unknown;
|
|
32
|
+
export declare const namespacePaths: (namespaced: SegmentNamespacedRequest[]) => string[];
|
|
33
|
+
//# sourceMappingURL=fieldRequests.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fieldRequests.d.ts","sourceRoot":"../../../../../src/core-modules/segments","sources":["fieldRequests.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,uBAAoB;AAEtE,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,kBAAe;AAErE,MAAM,MAAM,uBAAuB,GAAG;IACpC,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,qBAAqB,CAAC;IACjC,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,SAAS,EAAE,uBAAuB,EAAE,CAAC;IACrC,OAAO,EAAE,qBAAqB,EAAE,CAAC;IACjC,UAAU,EAAE,wBAAwB,EAAE,CAAC;IACvC,SAAS,EAAE,sBAAsB,EAAE,CAAC;IACpC,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,yBAAyB,GACpC,UAAU,mBAAmB,EAAE,EAC/B,gBAAe,MAAM,CAAC,MAAM,EAAE,gBAAgB,EAAE,CAAM,EACtD,yBAAwB,MAAM,CAAC,MAAM,EAAE,qBAAqB,EAAE,CAAM,KACnE,mBAoEF,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,QAAQ,OAAO,EAAE,MAAM,MAAM,KAAG,OAepD,CAAC;AAEb,eAAO,MAAM,qBAAqB,GAChC,WAAW,uBAAuB,EAAE,KACnC,MAAM,CAAC,MAAM,EAAE,CAAC,CAOhB,CAAC;AAEJ,eAAO,MAAM,mBAAmB,GAC9B,UAAU,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjC,SAAS,wBAAwB,KAChC,OA0BF,CAAC;AAEF,eAAO,MAAM,cAAc,GACzB,YAAY,wBAAwB,EAAE,KACrC,MAAM,EAER,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SegmentNode } from "./nodes.js";
|
|
2
|
+
export declare const canonicalSegmentNode: (node: SegmentNode) => SegmentNode;
|
|
3
|
+
export declare const canonicalSegmentText: (contentType: string, root: SegmentNode) => string;
|
|
4
|
+
export declare const segmentFingerprint: (contentType: string, root: SegmentNode) => string;
|
|
5
|
+
export declare const sameSegmentDefinition: (contentType: string, left: SegmentNode, right: SegmentNode) => boolean;
|
|
6
|
+
//# sourceMappingURL=fingerprint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fingerprint.d.ts","sourceRoot":"../../../../../src/core-modules/segments","sources":["fingerprint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,mBAAgB;AAoBtC,eAAO,MAAM,oBAAoB,GAAI,MAAM,WAAW,KAAG,WAqBxD,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,aAAa,MAAM,EACnB,MAAM,WAAW,KAChB,MAAgE,CAAC;AAEpE,eAAO,MAAM,kBAAkB,GAC7B,aAAa,MAAM,EACnB,MAAM,WAAW,KAChB,MAUF,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAChC,aAAa,MAAM,EACnB,MAAM,WAAW,EACjB,OAAO,WAAW,KACjB,OAEuC,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export * from "./memberQuery.js";
|
|
2
|
+
export * from "./membership.js";
|
|
3
|
+
export * from "./mongoFilter.js";
|
|
4
|
+
export * from "./fieldBuilders.js";
|
|
5
|
+
export * from "./fieldRequests.js";
|
|
6
|
+
export * from "./plan.js";
|
|
7
|
+
export * from "./dependencies.js";
|
|
8
|
+
export * from "./evaluate.js";
|
|
9
|
+
export * from "./fingerprint.js";
|
|
10
|
+
export * from "./evaluateBatch.js";
|
|
11
|
+
export * from "./events.js";
|
|
12
|
+
export * from "./materialized.js";
|
|
13
|
+
export * from "./evaluateFieldsRouter.js";
|
|
14
|
+
export * from "./evaluateOwned.js";
|
|
15
|
+
export * from "./joinChanges.js";
|
|
16
|
+
export * from "./measureRelations.js";
|
|
17
|
+
export * from "./ownedSource.js";
|
|
18
|
+
export * from "./relationRegistry.js";
|
|
19
|
+
export * from "./timeZone.js";
|
|
20
|
+
export * from "./zonedTime.js";
|
|
21
|
+
export * from "./nodes.js";
|
|
22
|
+
export * from "./nodeRefs.js";
|
|
23
|
+
export * from "./walkNodes.js";
|
|
24
|
+
export * from "./fieldMeta.js";
|
|
25
|
+
export * from "./operators.js";
|
|
26
|
+
export * from "./setupSegmentProducers.js";
|
|
27
|
+
export * from "./subjectsReachedBy.js";
|
|
28
|
+
export * from "./types.js";
|
|
29
|
+
export * from "./utils.js";
|
|
30
|
+
export * from "./zodSchemas.js";
|
|
31
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"../../../../../src/core-modules/segments","sources":["index.ts"],"names":[],"mappings":"AAAA,iCAA8B;AAC9B,gCAA6B;AAC7B,iCAA8B;AAC9B,mCAAgC;AAChC,mCAAgC;AAChC,0BAAuB;AACvB,kCAA+B;AAC/B,8BAA2B;AAC3B,iCAA8B;AAC9B,mCAAgC;AAChC,4BAAyB;AACzB,kCAA+B;AAC/B,0CAAuC;AACvC,mCAAgC;AAChC,iCAA8B;AAC9B,sCAAmC;AACnC,iCAA8B;AAC9B,sCAAmC;AACnC,8BAA2B;AAC3B,+BAA4B;AAC5B,2BAAwB;AACxB,8BAA2B;AAC3B,+BAA4B;AAC5B,+BAA4B;AAC5B,+BAA4B;AAC5B,2CAAwC;AACxC,uCAAoC;AACpC,2BAAwB;AACxB,2BAAwB;AACxB,gCAA6B"}
|