@aglyn/aglyn 1.0.0-beta.143
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 +201 -0
- package/README.md +11 -0
- package/package.json +66 -0
- package/src/index.d.ts +25 -0
- package/src/index.js +26 -0
- package/src/index.js.map +1 -0
- package/src/lib/aglyn.d.ts +31 -0
- package/src/lib/aglyn.js +114 -0
- package/src/lib/aglyn.js.map +1 -0
- package/src/lib/app-utils/abuse-report.d.ts +193 -0
- package/src/lib/app-utils/abuse-report.js +321 -0
- package/src/lib/app-utils/abuse-report.js.map +1 -0
- package/src/lib/app-utils/accept-negotiation.d.ts +129 -0
- package/src/lib/app-utils/accept-negotiation.js +266 -0
- package/src/lib/app-utils/accept-negotiation.js.map +1 -0
- package/src/lib/app-utils/account-emails.d.ts +263 -0
- package/src/lib/app-utils/account-emails.js +264 -0
- package/src/lib/app-utils/account-emails.js.map +1 -0
- package/src/lib/app-utils/actions.d.ts +717 -0
- package/src/lib/app-utils/actions.js +1031 -0
- package/src/lib/app-utils/actions.js.map +1 -0
- package/src/lib/app-utils/activity-presenter.d.ts +152 -0
- package/src/lib/app-utils/activity-presenter.js +326 -0
- package/src/lib/app-utils/activity-presenter.js.map +1 -0
- package/src/lib/app-utils/advertising-tag-mounts.d.ts +133 -0
- package/src/lib/app-utils/advertising-tag-mounts.js +118 -0
- package/src/lib/app-utils/advertising-tag-mounts.js.map +1 -0
- package/src/lib/app-utils/advertising-tags.d.ts +307 -0
- package/src/lib/app-utils/advertising-tags.js +525 -0
- package/src/lib/app-utils/advertising-tags.js.map +1 -0
- package/src/lib/app-utils/agent-api-catalog.d.ts +94 -0
- package/src/lib/app-utils/agent-api-catalog.js +106 -0
- package/src/lib/app-utils/agent-api-catalog.js.map +1 -0
- package/src/lib/app-utils/agent-openapi.d.ts +103 -0
- package/src/lib/app-utils/agent-openapi.js +1128 -0
- package/src/lib/app-utils/agent-openapi.js.map +1 -0
- package/src/lib/app-utils/analytics-beacon.d.ts +154 -0
- package/src/lib/app-utils/analytics-beacon.js +152 -0
- package/src/lib/app-utils/analytics-beacon.js.map +1 -0
- package/src/lib/app-utils/analytics-environment.d.ts +133 -0
- package/src/lib/app-utils/analytics-environment.js +152 -0
- package/src/lib/app-utils/analytics-environment.js.map +1 -0
- package/src/lib/app-utils/analytics-events.d.ts +744 -0
- package/src/lib/app-utils/analytics-events.js +650 -0
- package/src/lib/app-utils/analytics-events.js.map +1 -0
- package/src/lib/app-utils/analytics-link-clicks.d.ts +102 -0
- package/src/lib/app-utils/analytics-link-clicks.js +267 -0
- package/src/lib/app-utils/analytics-link-clicks.js.map +1 -0
- package/src/lib/app-utils/analytics-path-key.d.ts +46 -0
- package/src/lib/app-utils/analytics-path-key.js +46 -0
- package/src/lib/app-utils/analytics-path-key.js.map +1 -0
- package/src/lib/app-utils/api-adapter.d.ts +47 -0
- package/src/lib/app-utils/api-adapter.js +367 -0
- package/src/lib/app-utils/api-adapter.js.map +1 -0
- package/src/lib/app-utils/api-idempotency.d.ts +169 -0
- package/src/lib/app-utils/api-idempotency.js +213 -0
- package/src/lib/app-utils/api-idempotency.js.map +1 -0
- package/src/lib/app-utils/api-plugins.d.ts +210 -0
- package/src/lib/app-utils/api-plugins.js +221 -0
- package/src/lib/app-utils/api-plugins.js.map +1 -0
- package/src/lib/app-utils/assist-credits.d.ts +482 -0
- package/src/lib/app-utils/assist-credits.js +509 -0
- package/src/lib/app-utils/assist-credits.js.map +1 -0
- package/src/lib/app-utils/attribution-attribute.d.ts +34 -0
- package/src/lib/app-utils/attribution-attribute.js +34 -0
- package/src/lib/app-utils/attribution-attribute.js.map +1 -0
- package/src/lib/app-utils/attribution-guard.d.ts +130 -0
- package/src/lib/app-utils/attribution-guard.js +410 -0
- package/src/lib/app-utils/attribution-guard.js.map +1 -0
- package/src/lib/app-utils/author-css.d.ts +123 -0
- package/src/lib/app-utils/author-css.js +275 -0
- package/src/lib/app-utils/author-css.js.map +1 -0
- package/src/lib/app-utils/author-html-markdown.d.ts +31 -0
- package/src/lib/app-utils/author-html-markdown.js +497 -0
- package/src/lib/app-utils/author-html-markdown.js.map +1 -0
- package/src/lib/app-utils/author-html.d.ts +135 -0
- package/src/lib/app-utils/author-html.js +1037 -0
- package/src/lib/app-utils/author-html.js.map +1 -0
- package/src/lib/app-utils/automation-placeholders.d.ts +72 -0
- package/src/lib/app-utils/automation-placeholders.js +207 -0
- package/src/lib/app-utils/automation-placeholders.js.map +1 -0
- package/src/lib/app-utils/bandwidth-cap.d.ts +183 -0
- package/src/lib/app-utils/bandwidth-cap.js +193 -0
- package/src/lib/app-utils/bandwidth-cap.js.map +1 -0
- package/src/lib/app-utils/binding-token-catalog.d.ts +82 -0
- package/src/lib/app-utils/binding-token-catalog.js +293 -0
- package/src/lib/app-utils/binding-token-catalog.js.map +1 -0
- package/src/lib/app-utils/binding-tokens.d.ts +157 -0
- package/src/lib/app-utils/binding-tokens.js +251 -0
- package/src/lib/app-utils/binding-tokens.js.map +1 -0
- package/src/lib/app-utils/breadcrumb-json-ld.d.ts +57 -0
- package/src/lib/app-utils/breadcrumb-json-ld.js +67 -0
- package/src/lib/app-utils/breadcrumb-json-ld.js.map +1 -0
- package/src/lib/app-utils/campaign-attribution.d.ts +117 -0
- package/src/lib/app-utils/campaign-attribution.js +162 -0
- package/src/lib/app-utils/campaign-attribution.js.map +1 -0
- package/src/lib/app-utils/campaign-forwarding.d.ts +220 -0
- package/src/lib/app-utils/campaign-forwarding.js +332 -0
- package/src/lib/app-utils/campaign-forwarding.js.map +1 -0
- package/src/lib/app-utils/campaign-membership.d.ts +109 -0
- package/src/lib/app-utils/campaign-membership.js +176 -0
- package/src/lib/app-utils/campaign-membership.js.map +1 -0
- package/src/lib/app-utils/campaign-touch.d.ts +206 -0
- package/src/lib/app-utils/campaign-touch.js +326 -0
- package/src/lib/app-utils/campaign-touch.js.map +1 -0
- package/src/lib/app-utils/child-contract-compose.d.ts +28 -0
- package/src/lib/app-utils/child-contract-compose.js +140 -0
- package/src/lib/app-utils/child-contract-compose.js.map +1 -0
- package/src/lib/app-utils/child-contract.d.ts +129 -0
- package/src/lib/app-utils/child-contract.js +153 -0
- package/src/lib/app-utils/child-contract.js.map +1 -0
- package/src/lib/app-utils/collection-delete.d.ts +113 -0
- package/src/lib/app-utils/collection-delete.js +120 -0
- package/src/lib/app-utils/collection-delete.js.map +1 -0
- package/src/lib/app-utils/collection-entries.d.ts +833 -0
- package/src/lib/app-utils/collection-entries.js +1285 -0
- package/src/lib/app-utils/collection-entries.js.map +1 -0
- package/src/lib/app-utils/collection-entry-date.d.ts +129 -0
- package/src/lib/app-utils/collection-entry-date.js +183 -0
- package/src/lib/app-utils/collection-entry-date.js.map +1 -0
- package/src/lib/app-utils/collection-kind.d.ts +55 -0
- package/src/lib/app-utils/collection-kind.js +69 -0
- package/src/lib/app-utils/collection-kind.js.map +1 -0
- package/src/lib/app-utils/collection-slug.d.ts +79 -0
- package/src/lib/app-utils/collection-slug.js +70 -0
- package/src/lib/app-utils/collection-slug.js.map +1 -0
- package/src/lib/app-utils/compose-layout-nodes.d.ts +147 -0
- package/src/lib/app-utils/compose-layout-nodes.js +261 -0
- package/src/lib/app-utils/compose-layout-nodes.js.map +1 -0
- package/src/lib/app-utils/compose-layout-props.d.ts +71 -0
- package/src/lib/app-utils/compose-layout-props.js +61 -0
- package/src/lib/app-utils/compose-layout-props.js.map +1 -0
- package/src/lib/app-utils/compose-reusable-components.d.ts +504 -0
- package/src/lib/app-utils/compose-reusable-components.js +1366 -0
- package/src/lib/app-utils/compose-reusable-components.js.map +1 -0
- package/src/lib/app-utils/compress.d.ts +35 -0
- package/src/lib/app-utils/compress.js +38 -0
- package/src/lib/app-utils/compress.js.map +1 -0
- package/src/lib/app-utils/consent-banner-ui.d.ts +226 -0
- package/src/lib/app-utils/consent-banner-ui.js +583 -0
- package/src/lib/app-utils/consent-banner-ui.js.map +1 -0
- package/src/lib/app-utils/consent-groups.d.ts +189 -0
- package/src/lib/app-utils/consent-groups.js +219 -0
- package/src/lib/app-utils/consent-groups.js.map +1 -0
- package/src/lib/app-utils/consent-preferences-dialog.d.ts +58 -0
- package/src/lib/app-utils/consent-preferences-dialog.js +106 -0
- package/src/lib/app-utils/consent-preferences-dialog.js.map +1 -0
- package/src/lib/app-utils/console-record-links.d.ts +163 -0
- package/src/lib/app-utils/console-record-links.js +178 -0
- package/src/lib/app-utils/console-record-links.js.map +1 -0
- package/src/lib/app-utils/console-routes.d.ts +658 -0
- package/src/lib/app-utils/console-routes.js +489 -0
- package/src/lib/app-utils/console-routes.js.map +1 -0
- package/src/lib/app-utils/console-widget-slot-context.d.ts +46 -0
- package/src/lib/app-utils/console-widget-slot-context.js +23 -0
- package/src/lib/app-utils/console-widget-slot-context.js.map +1 -0
- package/src/lib/app-utils/contact-custom-fields.d.ts +191 -0
- package/src/lib/app-utils/contact-custom-fields.js +349 -0
- package/src/lib/app-utils/contact-custom-fields.js.map +1 -0
- package/src/lib/app-utils/contact-holder.d.ts +52 -0
- package/src/lib/app-utils/contact-holder.js +98 -0
- package/src/lib/app-utils/contact-holder.js.map +1 -0
- package/src/lib/app-utils/contact-merge.d.ts +136 -0
- package/src/lib/app-utils/contact-merge.js +379 -0
- package/src/lib/app-utils/contact-merge.js.map +1 -0
- package/src/lib/app-utils/contacts.d.ts +554 -0
- package/src/lib/app-utils/contacts.js +401 -0
- package/src/lib/app-utils/contacts.js.map +1 -0
- package/src/lib/app-utils/content-author-profile.d.ts +68 -0
- package/src/lib/app-utils/content-author-profile.js +118 -0
- package/src/lib/app-utils/content-author-profile.js.map +1 -0
- package/src/lib/app-utils/content-authors.d.ts +662 -0
- package/src/lib/app-utils/content-authors.js +771 -0
- package/src/lib/app-utils/content-authors.js.map +1 -0
- package/src/lib/app-utils/content-schema-type.d.ts +81 -0
- package/src/lib/app-utils/content-schema-type.js +87 -0
- package/src/lib/app-utils/content-schema-type.js.map +1 -0
- package/src/lib/app-utils/contexts.d.ts +35 -0
- package/src/lib/app-utils/contexts.js +35 -0
- package/src/lib/app-utils/contexts.js.map +1 -0
- package/src/lib/app-utils/create-resource-uid.d.ts +18 -0
- package/src/lib/app-utils/create-resource-uid.js +23 -0
- package/src/lib/app-utils/create-resource-uid.js.map +1 -0
- package/src/lib/app-utils/crm-booking.d.ts +75 -0
- package/src/lib/app-utils/crm-booking.js +133 -0
- package/src/lib/app-utils/crm-booking.js.map +1 -0
- package/src/lib/app-utils/crm-csv.d.ts +232 -0
- package/src/lib/app-utils/crm-csv.js +432 -0
- package/src/lib/app-utils/crm-csv.js.map +1 -0
- package/src/lib/app-utils/crm-digest.d.ts +179 -0
- package/src/lib/app-utils/crm-digest.js +271 -0
- package/src/lib/app-utils/crm-digest.js.map +1 -0
- package/src/lib/app-utils/crm-email-templates.d.ts +172 -0
- package/src/lib/app-utils/crm-email-templates.js +382 -0
- package/src/lib/app-utils/crm-email-templates.js.map +1 -0
- package/src/lib/app-utils/crm-inbound.d.ts +245 -0
- package/src/lib/app-utils/crm-inbound.js +407 -0
- package/src/lib/app-utils/crm-inbound.js.map +1 -0
- package/src/lib/app-utils/crm-kinds.d.ts +73 -0
- package/src/lib/app-utils/crm-kinds.js +92 -0
- package/src/lib/app-utils/crm-kinds.js.map +1 -0
- package/src/lib/app-utils/crm-next-activity.d.ts +107 -0
- package/src/lib/app-utils/crm-next-activity.js +140 -0
- package/src/lib/app-utils/crm-next-activity.js.map +1 -0
- package/src/lib/app-utils/crm-reports.d.ts +479 -0
- package/src/lib/app-utils/crm-reports.js +680 -0
- package/src/lib/app-utils/crm-reports.js.map +1 -0
- package/src/lib/app-utils/crm-task-reminders.d.ts +129 -0
- package/src/lib/app-utils/crm-task-reminders.js +139 -0
- package/src/lib/app-utils/crm-task-reminders.js.map +1 -0
- package/src/lib/app-utils/crm.d.ts +1546 -0
- package/src/lib/app-utils/crm.js +1814 -0
- package/src/lib/app-utils/crm.js.map +1 -0
- package/src/lib/app-utils/csp-report.d.ts +84 -0
- package/src/lib/app-utils/csp-report.js +177 -0
- package/src/lib/app-utils/csp-report.js.map +1 -0
- package/src/lib/app-utils/csv-import.d.ts +192 -0
- package/src/lib/app-utils/csv-import.js +279 -0
- package/src/lib/app-utils/csv-import.js.map +1 -0
- package/src/lib/app-utils/dataset-csv.d.ts +109 -0
- package/src/lib/app-utils/dataset-csv.js +235 -0
- package/src/lib/app-utils/dataset-csv.js.map +1 -0
- package/src/lib/app-utils/dataset-models.d.ts +194 -0
- package/src/lib/app-utils/dataset-models.js +409 -0
- package/src/lib/app-utils/dataset-models.js.map +1 -0
- package/src/lib/app-utils/dataset-query.d.ts +57 -0
- package/src/lib/app-utils/dataset-query.js +126 -0
- package/src/lib/app-utils/dataset-query.js.map +1 -0
- package/src/lib/app-utils/datasets.d.ts +136 -0
- package/src/lib/app-utils/datasets.js +177 -0
- package/src/lib/app-utils/datasets.js.map +1 -0
- package/src/lib/app-utils/decompress.d.ts +36 -0
- package/src/lib/app-utils/decompress.js +32 -0
- package/src/lib/app-utils/decompress.js.map +1 -0
- package/src/lib/app-utils/dedicated-sending-domain.d.ts +47 -0
- package/src/lib/app-utils/dedicated-sending-domain.js +114 -0
- package/src/lib/app-utils/dedicated-sending-domain.js.map +1 -0
- package/src/lib/app-utils/deferred-image.d.ts +86 -0
- package/src/lib/app-utils/deferred-image.js +83 -0
- package/src/lib/app-utils/deferred-image.js.map +1 -0
- package/src/lib/app-utils/definition-canvas-tree.d.ts +61 -0
- package/src/lib/app-utils/definition-canvas-tree.js +126 -0
- package/src/lib/app-utils/definition-canvas-tree.js.map +1 -0
- package/src/lib/app-utils/deployment-shape.d.ts +167 -0
- package/src/lib/app-utils/deployment-shape.js +238 -0
- package/src/lib/app-utils/deployment-shape.js.map +1 -0
- package/src/lib/app-utils/detect-template-placeholders.d.ts +30 -0
- package/src/lib/app-utils/detect-template-placeholders.js +53 -0
- package/src/lib/app-utils/detect-template-placeholders.js.map +1 -0
- package/src/lib/app-utils/dmca-counter-notice.d.ts +185 -0
- package/src/lib/app-utils/dmca-counter-notice.js +277 -0
- package/src/lib/app-utils/dmca-counter-notice.js.map +1 -0
- package/src/lib/app-utils/docs-deflection.d.ts +156 -0
- package/src/lib/app-utils/docs-deflection.js +547 -0
- package/src/lib/app-utils/docs-deflection.js.map +1 -0
- package/src/lib/app-utils/docs-help.d.ts +57 -0
- package/src/lib/app-utils/docs-help.generated.d.ts +303 -0
- package/src/lib/app-utils/docs-help.generated.js +867 -0
- package/src/lib/app-utils/docs-help.generated.js.map +1 -0
- package/src/lib/app-utils/docs-help.js +46 -0
- package/src/lib/app-utils/docs-help.js.map +1 -0
- package/src/lib/app-utils/docs-index.generated.d.ts +29 -0
- package/src/lib/app-utils/docs-index.generated.js +8388 -0
- package/src/lib/app-utils/docs-index.generated.js.map +1 -0
- package/src/lib/app-utils/docs-retrieval.d.ts +67 -0
- package/src/lib/app-utils/docs-retrieval.js +188 -0
- package/src/lib/app-utils/docs-retrieval.js.map +1 -0
- package/src/lib/app-utils/document-landmark.d.ts +50 -0
- package/src/lib/app-utils/document-landmark.js +100 -0
- package/src/lib/app-utils/document-landmark.js.map +1 -0
- package/src/lib/app-utils/duplicate-resource.d.ts +101 -0
- package/src/lib/app-utils/duplicate-resource.js +206 -0
- package/src/lib/app-utils/duplicate-resource.js.map +1 -0
- package/src/lib/app-utils/dynamic-list-rule.d.ts +471 -0
- package/src/lib/app-utils/dynamic-list-rule.js +914 -0
- package/src/lib/app-utils/dynamic-list-rule.js.map +1 -0
- package/src/lib/app-utils/element-animation.d.ts +200 -0
- package/src/lib/app-utils/element-animation.js +233 -0
- package/src/lib/app-utils/element-animation.js.map +1 -0
- package/src/lib/app-utils/element-hidden-style.d.ts +46 -0
- package/src/lib/app-utils/element-hidden-style.js +48 -0
- package/src/lib/app-utils/element-hidden-style.js.map +1 -0
- package/src/lib/app-utils/element-ui.d.ts +243 -0
- package/src/lib/app-utils/element-ui.js +459 -0
- package/src/lib/app-utils/element-ui.js.map +1 -0
- package/src/lib/app-utils/email-starter-policy.d.ts +160 -0
- package/src/lib/app-utils/email-starter-policy.js +327 -0
- package/src/lib/app-utils/email-starter-policy.js.map +1 -0
- package/src/lib/app-utils/email-topics.d.ts +310 -0
- package/src/lib/app-utils/email-topics.js +336 -0
- package/src/lib/app-utils/email-topics.js.map +1 -0
- package/src/lib/app-utils/enabled-plugins-context.d.ts +100 -0
- package/src/lib/app-utils/enabled-plugins-context.js +113 -0
- package/src/lib/app-utils/enabled-plugins-context.js.map +1 -0
- package/src/lib/app-utils/ensure-canvas-root.d.ts +38 -0
- package/src/lib/app-utils/ensure-canvas-root.js +61 -0
- package/src/lib/app-utils/ensure-canvas-root.js.map +1 -0
- package/src/lib/app-utils/entity-picker-context.d.ts +199 -0
- package/src/lib/app-utils/entity-picker-context.js +93 -0
- package/src/lib/app-utils/entity-picker-context.js.map +1 -0
- package/src/lib/app-utils/error-beacon.d.ts +107 -0
- package/src/lib/app-utils/error-beacon.js +296 -0
- package/src/lib/app-utils/error-beacon.js.map +1 -0
- package/src/lib/app-utils/expand-repeatables.d.ts +172 -0
- package/src/lib/app-utils/expand-repeatables.js +299 -0
- package/src/lib/app-utils/expand-repeatables.js.map +1 -0
- package/src/lib/app-utils/foreign-script.d.ts +82 -0
- package/src/lib/app-utils/foreign-script.js +102 -0
- package/src/lib/app-utils/foreign-script.js.map +1 -0
- package/src/lib/app-utils/form-abuse-ceiling.d.ts +146 -0
- package/src/lib/app-utils/form-abuse-ceiling.js +158 -0
- package/src/lib/app-utils/form-abuse-ceiling.js.map +1 -0
- package/src/lib/app-utils/form-contract.d.ts +198 -0
- package/src/lib/app-utils/form-contract.js +282 -0
- package/src/lib/app-utils/form-contract.js.map +1 -0
- package/src/lib/app-utils/form-dataset-binding.d.ts +50 -0
- package/src/lib/app-utils/form-dataset-binding.js +74 -0
- package/src/lib/app-utils/form-dataset-binding.js.map +1 -0
- package/src/lib/app-utils/forms.d.ts +727 -0
- package/src/lib/app-utils/forms.js +777 -0
- package/src/lib/app-utils/forms.js.map +1 -0
- package/src/lib/app-utils/functions.d.ts +188 -0
- package/src/lib/app-utils/functions.js +529 -0
- package/src/lib/app-utils/functions.js.map +1 -0
- package/src/lib/app-utils/guarded-version-save.d.ts +91 -0
- package/src/lib/app-utils/guarded-version-save.js +131 -0
- package/src/lib/app-utils/guarded-version-save.js.map +1 -0
- package/src/lib/app-utils/health-report.d.ts +1766 -0
- package/src/lib/app-utils/health-report.js +2072 -0
- package/src/lib/app-utils/health-report.js.map +1 -0
- package/src/lib/app-utils/host-naming.d.ts +135 -0
- package/src/lib/app-utils/host-naming.js +188 -0
- package/src/lib/app-utils/host-naming.js.map +1 -0
- package/src/lib/app-utils/host-permissions.d.ts +76 -0
- package/src/lib/app-utils/host-permissions.js +119 -0
- package/src/lib/app-utils/host-permissions.js.map +1 -0
- package/src/lib/app-utils/host-tokens.d.ts +228 -0
- package/src/lib/app-utils/host-tokens.js +304 -0
- package/src/lib/app-utils/host-tokens.js.map +1 -0
- package/src/lib/app-utils/idp-profile.d.ts +83 -0
- package/src/lib/app-utils/idp-profile.js +268 -0
- package/src/lib/app-utils/idp-profile.js.map +1 -0
- package/src/lib/app-utils/image-upload-types.d.ts +49 -0
- package/src/lib/app-utils/image-upload-types.js +86 -0
- package/src/lib/app-utils/image-upload-types.js.map +1 -0
- package/src/lib/app-utils/index.d.ts +18 -0
- package/src/lib/app-utils/index.js +23 -0
- package/src/lib/app-utils/index.js.map +1 -0
- package/src/lib/app-utils/internal-traffic.d.ts +197 -0
- package/src/lib/app-utils/internal-traffic.js +288 -0
- package/src/lib/app-utils/internal-traffic.js.map +1 -0
- package/src/lib/app-utils/lineal-order.d.ts +62 -0
- package/src/lib/app-utils/lineal-order.js +65 -0
- package/src/lib/app-utils/lineal-order.js.map +1 -0
- package/src/lib/app-utils/link-references.d.ts +36 -0
- package/src/lib/app-utils/link-references.js +89 -0
- package/src/lib/app-utils/link-references.js.map +1 -0
- package/src/lib/app-utils/link-target-search-context.d.ts +123 -0
- package/src/lib/app-utils/link-target-search-context.js +221 -0
- package/src/lib/app-utils/link-target-search-context.js.map +1 -0
- package/src/lib/app-utils/list-assignment-policy.d.ts +169 -0
- package/src/lib/app-utils/list-assignment-policy.js +170 -0
- package/src/lib/app-utils/list-assignment-policy.js.map +1 -0
- package/src/lib/app-utils/list-import.d.ts +158 -0
- package/src/lib/app-utils/list-import.js +332 -0
- package/src/lib/app-utils/list-import.js.map +1 -0
- package/src/lib/app-utils/llms-txt.d.ts +104 -0
- package/src/lib/app-utils/llms-txt.js +144 -0
- package/src/lib/app-utils/llms-txt.js.map +1 -0
- package/src/lib/app-utils/local-storage-budget.d.ts +75 -0
- package/src/lib/app-utils/local-storage-budget.js +153 -0
- package/src/lib/app-utils/local-storage-budget.js.map +1 -0
- package/src/lib/app-utils/lockdown.d.ts +698 -0
- package/src/lib/app-utils/lockdown.js +929 -0
- package/src/lib/app-utils/lockdown.js.map +1 -0
- package/src/lib/app-utils/margin-utilization.d.ts +267 -0
- package/src/lib/app-utils/margin-utilization.js +351 -0
- package/src/lib/app-utils/margin-utilization.js.map +1 -0
- package/src/lib/app-utils/markdown-lite.d.ts +297 -0
- package/src/lib/app-utils/markdown-lite.js +705 -0
- package/src/lib/app-utils/markdown-lite.js.map +1 -0
- package/src/lib/app-utils/marketing-consent.d.ts +704 -0
- package/src/lib/app-utils/marketing-consent.js +783 -0
- package/src/lib/app-utils/marketing-consent.js.map +1 -0
- package/src/lib/app-utils/marketplace-listing-visibility.d.ts +120 -0
- package/src/lib/app-utils/marketplace-listing-visibility.js +139 -0
- package/src/lib/app-utils/marketplace-listing-visibility.js.map +1 -0
- package/src/lib/app-utils/marketplace-overrides.d.ts +271 -0
- package/src/lib/app-utils/marketplace-overrides.js +462 -0
- package/src/lib/app-utils/marketplace-overrides.js.map +1 -0
- package/src/lib/app-utils/marketplace-provenance.d.ts +150 -0
- package/src/lib/app-utils/marketplace-provenance.js +136 -0
- package/src/lib/app-utils/marketplace-provenance.js.map +1 -0
- package/src/lib/app-utils/marketplace-theme.d.ts +237 -0
- package/src/lib/app-utils/marketplace-theme.js +525 -0
- package/src/lib/app-utils/marketplace-theme.js.map +1 -0
- package/src/lib/app-utils/marketplace-update-state.d.ts +119 -0
- package/src/lib/app-utils/marketplace-update-state.js +132 -0
- package/src/lib/app-utils/marketplace-update-state.js.map +1 -0
- package/src/lib/app-utils/marketplace-verification.d.ts +95 -0
- package/src/lib/app-utils/marketplace-verification.js +81 -0
- package/src/lib/app-utils/marketplace-verification.js.map +1 -0
- package/src/lib/app-utils/measure-node-map.d.ts +76 -0
- package/src/lib/app-utils/measure-node-map.js +111 -0
- package/src/lib/app-utils/measure-node-map.js.map +1 -0
- package/src/lib/app-utils/media-alt.d.ts +55 -0
- package/src/lib/app-utils/media-alt.js +58 -0
- package/src/lib/app-utils/media-alt.js.map +1 -0
- package/src/lib/app-utils/media-asset-facts.d.ts +125 -0
- package/src/lib/app-utils/media-asset-facts.js +467 -0
- package/src/lib/app-utils/media-asset-facts.js.map +1 -0
- package/src/lib/app-utils/media-cdn-scope.d.ts +65 -0
- package/src/lib/app-utils/media-cdn-scope.js +75 -0
- package/src/lib/app-utils/media-cdn-scope.js.map +1 -0
- package/src/lib/app-utils/media-folders.d.ts +161 -0
- package/src/lib/app-utils/media-folders.js +230 -0
- package/src/lib/app-utils/media-folders.js.map +1 -0
- package/src/lib/app-utils/media-metadata.d.ts +277 -0
- package/src/lib/app-utils/media-metadata.js +388 -0
- package/src/lib/app-utils/media-metadata.js.map +1 -0
- package/src/lib/app-utils/media-picker-context.d.ts +93 -0
- package/src/lib/app-utils/media-picker-context.js +26 -0
- package/src/lib/app-utils/media-picker-context.js.map +1 -0
- package/src/lib/app-utils/media-quarantine.d.ts +247 -0
- package/src/lib/app-utils/media-quarantine.js +323 -0
- package/src/lib/app-utils/media-quarantine.js.map +1 -0
- package/src/lib/app-utils/media-ref.d.ts +661 -0
- package/src/lib/app-utils/media-ref.js +1055 -0
- package/src/lib/app-utils/media-ref.js.map +1 -0
- package/src/lib/app-utils/media-takedown-reach.d.ts +126 -0
- package/src/lib/app-utils/media-takedown-reach.js +143 -0
- package/src/lib/app-utils/media-takedown-reach.js.map +1 -0
- package/src/lib/app-utils/member-email-aliases.d.ts +180 -0
- package/src/lib/app-utils/member-email-aliases.js +217 -0
- package/src/lib/app-utils/member-email-aliases.js.map +1 -0
- package/src/lib/app-utils/merge-node-sx.d.ts +47 -0
- package/src/lib/app-utils/merge-node-sx.js +123 -0
- package/src/lib/app-utils/merge-node-sx.js.map +1 -0
- package/src/lib/app-utils/name-match.d.ts +155 -0
- package/src/lib/app-utils/name-match.js +175 -0
- package/src/lib/app-utils/name-match.js.map +1 -0
- package/src/lib/app-utils/name-search.d.ts +117 -0
- package/src/lib/app-utils/name-search.js +145 -0
- package/src/lib/app-utils/name-search.js.map +1 -0
- package/src/lib/app-utils/node-capabilities.d.ts +85 -0
- package/src/lib/app-utils/node-capabilities.js +88 -0
- package/src/lib/app-utils/node-capabilities.js.map +1 -0
- package/src/lib/app-utils/node-definition-sanitizer.d.ts +164 -0
- package/src/lib/app-utils/node-definition-sanitizer.js +402 -0
- package/src/lib/app-utils/node-definition-sanitizer.js.map +1 -0
- package/src/lib/app-utils/node-identity.d.ts +47 -0
- package/src/lib/app-utils/node-identity.js +50 -0
- package/src/lib/app-utils/node-identity.js.map +1 -0
- package/src/lib/app-utils/node-interactions.d.ts +102 -0
- package/src/lib/app-utils/node-interactions.js +192 -0
- package/src/lib/app-utils/node-interactions.js.map +1 -0
- package/src/lib/app-utils/node-url-policy.d.ts +54 -0
- package/src/lib/app-utils/node-url-policy.js +72 -0
- package/src/lib/app-utils/node-url-policy.js.map +1 -0
- package/src/lib/app-utils/notifications.d.ts +71 -0
- package/src/lib/app-utils/notifications.js +101 -0
- package/src/lib/app-utils/notifications.js.map +1 -0
- package/src/lib/app-utils/onboarding-deep-link.d.ts +120 -0
- package/src/lib/app-utils/onboarding-deep-link.js +142 -0
- package/src/lib/app-utils/onboarding-deep-link.js.map +1 -0
- package/src/lib/app-utils/operator-identity.d.ts +207 -0
- package/src/lib/app-utils/operator-identity.js +186 -0
- package/src/lib/app-utils/operator-identity.js.map +1 -0
- package/src/lib/app-utils/org-billing-doc.d.ts +231 -0
- package/src/lib/app-utils/org-billing-doc.js +238 -0
- package/src/lib/app-utils/org-billing-doc.js.map +1 -0
- package/src/lib/app-utils/org-override-reason.d.ts +100 -0
- package/src/lib/app-utils/org-override-reason.js +116 -0
- package/src/lib/app-utils/org-override-reason.js.map +1 -0
- package/src/lib/app-utils/org-permissions.d.ts +194 -0
- package/src/lib/app-utils/org-permissions.js +357 -0
- package/src/lib/app-utils/org-permissions.js.map +1 -0
- package/src/lib/app-utils/org-roles.d.ts +72 -0
- package/src/lib/app-utils/org-roles.js +131 -0
- package/src/lib/app-utils/org-roles.js.map +1 -0
- package/src/lib/app-utils/organizations.d.ts +407 -0
- package/src/lib/app-utils/organizations.js +511 -0
- package/src/lib/app-utils/organizations.js.map +1 -0
- package/src/lib/app-utils/page-header-actions-context.d.ts +83 -0
- package/src/lib/app-utils/page-header-actions-context.js +58 -0
- package/src/lib/app-utils/page-header-actions-context.js.map +1 -0
- package/src/lib/app-utils/page-header-record-context.d.ts +80 -0
- package/src/lib/app-utils/page-header-record-context.js +64 -0
- package/src/lib/app-utils/page-header-record-context.js.map +1 -0
- package/src/lib/app-utils/page-markdown.d.ts +103 -0
- package/src/lib/app-utils/page-markdown.js +385 -0
- package/src/lib/app-utils/page-markdown.js.map +1 -0
- package/src/lib/app-utils/paid-media-source.d.ts +90 -0
- package/src/lib/app-utils/paid-media-source.js +184 -0
- package/src/lib/app-utils/paid-media-source.js.map +1 -0
- package/src/lib/app-utils/palette-sx.d.ts +34 -0
- package/src/lib/app-utils/palette-sx.js +150 -0
- package/src/lib/app-utils/palette-sx.js.map +1 -0
- package/src/lib/app-utils/password-policy.d.ts +47 -0
- package/src/lib/app-utils/password-policy.js +46 -0
- package/src/lib/app-utils/password-policy.js.map +1 -0
- package/src/lib/app-utils/payments-configured.d.ts +84 -0
- package/src/lib/app-utils/payments-configured.js +88 -0
- package/src/lib/app-utils/payments-configured.js.map +1 -0
- package/src/lib/app-utils/person-erasure.d.ts +126 -0
- package/src/lib/app-utils/person-erasure.js +121 -0
- package/src/lib/app-utils/person-erasure.js.map +1 -0
- package/src/lib/app-utils/person-key.d.ts +32 -0
- package/src/lib/app-utils/person-key.js +62 -0
- package/src/lib/app-utils/person-key.js.map +1 -0
- package/src/lib/app-utils/plan-entitlements.d.ts +2756 -0
- package/src/lib/app-utils/plan-entitlements.js +4085 -0
- package/src/lib/app-utils/plan-entitlements.js.map +1 -0
- package/src/lib/app-utils/platform-ad-conversions.d.ts +122 -0
- package/src/lib/app-utils/platform-ad-conversions.js +174 -0
- package/src/lib/app-utils/platform-ad-conversions.js.map +1 -0
- package/src/lib/app-utils/platform-advertising-tags.d.ts +139 -0
- package/src/lib/app-utils/platform-advertising-tags.js +203 -0
- package/src/lib/app-utils/platform-advertising-tags.js.map +1 -0
- package/src/lib/app-utils/platform-brand.d.ts +151 -0
- package/src/lib/app-utils/platform-brand.js +175 -0
- package/src/lib/app-utils/platform-brand.js.map +1 -0
- package/src/lib/app-utils/platform-consent-default.d.ts +142 -0
- package/src/lib/app-utils/platform-consent-default.js +295 -0
- package/src/lib/app-utils/platform-consent-default.js.map +1 -0
- package/src/lib/app-utils/platform-marketing-consent.d.ts +151 -0
- package/src/lib/app-utils/platform-marketing-consent.js +182 -0
- package/src/lib/app-utils/platform-marketing-consent.js.map +1 -0
- package/src/lib/app-utils/platform-marketing-host.d.ts +33 -0
- package/src/lib/app-utils/platform-marketing-host.js +97 -0
- package/src/lib/app-utils/platform-marketing-host.js.map +1 -0
- package/src/lib/app-utils/platform-visitor-consent.d.ts +252 -0
- package/src/lib/app-utils/platform-visitor-consent.js +533 -0
- package/src/lib/app-utils/platform-visitor-consent.js.map +1 -0
- package/src/lib/app-utils/plugin-api-cross-origin.d.ts +61 -0
- package/src/lib/app-utils/plugin-api-cross-origin.js +202 -0
- package/src/lib/app-utils/plugin-api-cross-origin.js.map +1 -0
- package/src/lib/app-utils/plugin-api-rate-limit.d.ts +192 -0
- package/src/lib/app-utils/plugin-api-rate-limit.js +270 -0
- package/src/lib/app-utils/plugin-api-rate-limit.js.map +1 -0
- package/src/lib/app-utils/plugin-artifact-path.d.ts +32 -0
- package/src/lib/app-utils/plugin-artifact-path.js +33 -0
- package/src/lib/app-utils/plugin-artifact-path.js.map +1 -0
- package/src/lib/app-utils/plugin-bundle-checks.d.ts +148 -0
- package/src/lib/app-utils/plugin-bundle-checks.js +989 -0
- package/src/lib/app-utils/plugin-bundle-checks.js.map +1 -0
- package/src/lib/app-utils/plugin-manifest.d.ts +516 -0
- package/src/lib/app-utils/plugin-manifest.js +687 -0
- package/src/lib/app-utils/plugin-manifest.js.map +1 -0
- package/src/lib/app-utils/published-legal-pages.d.ts +71 -0
- package/src/lib/app-utils/published-legal-pages.js +90 -0
- package/src/lib/app-utils/published-legal-pages.js.map +1 -0
- package/src/lib/app-utils/publisher-agreement.d.ts +254 -0
- package/src/lib/app-utils/publisher-agreement.js +274 -0
- package/src/lib/app-utils/publisher-agreement.js.map +1 -0
- package/src/lib/app-utils/publisher-attestation.d.ts +99 -0
- package/src/lib/app-utils/publisher-attestation.js +158 -0
- package/src/lib/app-utils/publisher-attestation.js.map +1 -0
- package/src/lib/app-utils/recipient-email-render.d.ts +216 -0
- package/src/lib/app-utils/recipient-email-render.js +221 -0
- package/src/lib/app-utils/recipient-email-render.js.map +1 -0
- package/src/lib/app-utils/redispatch-caught-error.d.ts +38 -0
- package/src/lib/app-utils/redispatch-caught-error.js +46 -0
- package/src/lib/app-utils/redispatch-caught-error.js.map +1 -0
- package/src/lib/app-utils/registering-plugin.d.ts +19 -0
- package/src/lib/app-utils/registering-plugin.js +38 -0
- package/src/lib/app-utils/registering-plugin.js.map +1 -0
- package/src/lib/app-utils/release-flags.d.ts +283 -0
- package/src/lib/app-utils/release-flags.js +518 -0
- package/src/lib/app-utils/release-flags.js.map +1 -0
- package/src/lib/app-utils/repair-canvas-nodes.d.ts +130 -0
- package/src/lib/app-utils/repair-canvas-nodes.js +298 -0
- package/src/lib/app-utils/repair-canvas-nodes.js.map +1 -0
- package/src/lib/app-utils/repeat-infringer.d.ts +166 -0
- package/src/lib/app-utils/repeat-infringer.js +188 -0
- package/src/lib/app-utils/repeat-infringer.js.map +1 -0
- package/src/lib/app-utils/repeat-sources.d.ts +115 -0
- package/src/lib/app-utils/repeat-sources.js +86 -0
- package/src/lib/app-utils/repeat-sources.js.map +1 -0
- package/src/lib/app-utils/request-geo.d.ts +114 -0
- package/src/lib/app-utils/request-geo.js +247 -0
- package/src/lib/app-utils/request-geo.js.map +1 -0
- package/src/lib/app-utils/request-ip.d.ts +213 -0
- package/src/lib/app-utils/request-ip.js +344 -0
- package/src/lib/app-utils/request-ip.js.map +1 -0
- package/src/lib/app-utils/resolve-named-tokens.d.ts +26 -0
- package/src/lib/app-utils/resolve-named-tokens.js +59 -0
- package/src/lib/app-utils/resolve-named-tokens.js.map +1 -0
- package/src/lib/app-utils/responsive-typography-sx.d.ts +77 -0
- package/src/lib/app-utils/responsive-typography-sx.js +122 -0
- package/src/lib/app-utils/responsive-typography-sx.js.map +1 -0
- package/src/lib/app-utils/reusable-component-keys.d.ts +135 -0
- package/src/lib/app-utils/reusable-component-keys.js +140 -0
- package/src/lib/app-utils/reusable-component-keys.js.map +1 -0
- package/src/lib/app-utils/reusable-prop-values.d.ts +199 -0
- package/src/lib/app-utils/reusable-prop-values.js +494 -0
- package/src/lib/app-utils/reusable-prop-values.js.map +1 -0
- package/src/lib/app-utils/safe-json-ld.d.ts +29 -0
- package/src/lib/app-utils/safe-json-ld.js +37 -0
- package/src/lib/app-utils/safe-json-ld.js.map +1 -0
- package/src/lib/app-utils/sanitize-svg.d.ts +55 -0
- package/src/lib/app-utils/sanitize-svg.js +460 -0
- package/src/lib/app-utils/sanitize-svg.js.map +1 -0
- package/src/lib/app-utils/scheme-sx.d.ts +84 -0
- package/src/lib/app-utils/scheme-sx.js +148 -0
- package/src/lib/app-utils/scheme-sx.js.map +1 -0
- package/src/lib/app-utils/scope-tokens.d.ts +249 -0
- package/src/lib/app-utils/scope-tokens.js +331 -0
- package/src/lib/app-utils/scope-tokens.js.map +1 -0
- package/src/lib/app-utils/screen-link-context-value.d.ts +57 -0
- package/src/lib/app-utils/screen-link-context-value.js +43 -0
- package/src/lib/app-utils/screen-link-context-value.js.map +1 -0
- package/src/lib/app-utils/screen-link-context.d.ts +185 -0
- package/src/lib/app-utils/screen-link-context.js +304 -0
- package/src/lib/app-utils/screen-link-context.js.map +1 -0
- package/src/lib/app-utils/screen-link-value.d.ts +269 -0
- package/src/lib/app-utils/screen-link-value.js +384 -0
- package/src/lib/app-utils/screen-link-value.js.map +1 -0
- package/src/lib/app-utils/screen-route.d.ts +669 -0
- package/src/lib/app-utils/screen-route.js +751 -0
- package/src/lib/app-utils/screen-route.js.map +1 -0
- package/src/lib/app-utils/screen-seo-fields.d.ts +37 -0
- package/src/lib/app-utils/screen-seo-fields.js +42 -0
- package/src/lib/app-utils/screen-seo-fields.js.map +1 -0
- package/src/lib/app-utils/search-indexing.d.ts +162 -0
- package/src/lib/app-utils/search-indexing.js +207 -0
- package/src/lib/app-utils/search-indexing.js.map +1 -0
- package/src/lib/app-utils/seo-listing-fields.d.ts +70 -0
- package/src/lib/app-utils/seo-listing-fields.js +75 -0
- package/src/lib/app-utils/seo-listing-fields.js.map +1 -0
- package/src/lib/app-utils/seo-locale.d.ts +119 -0
- package/src/lib/app-utils/seo-locale.js +133 -0
- package/src/lib/app-utils/seo-locale.js.map +1 -0
- package/src/lib/app-utils/seo-title-variables.d.ts +149 -0
- package/src/lib/app-utils/seo-title-variables.js +190 -0
- package/src/lib/app-utils/seo-title-variables.js.map +1 -0
- package/src/lib/app-utils/seo-title.d.ts +70 -0
- package/src/lib/app-utils/seo-title.js +117 -0
- package/src/lib/app-utils/seo-title.js.map +1 -0
- package/src/lib/app-utils/server.d.ts +174 -0
- package/src/lib/app-utils/server.js +314 -0
- package/src/lib/app-utils/server.js.map +1 -0
- package/src/lib/app-utils/site-context.d.ts +106 -0
- package/src/lib/app-utils/site-context.js +100 -0
- package/src/lib/app-utils/site-context.js.map +1 -0
- package/src/lib/app-utils/sitemap.d.ts +117 -0
- package/src/lib/app-utils/sitemap.js +183 -0
- package/src/lib/app-utils/sitemap.js.map +1 -0
- package/src/lib/app-utils/social-image.d.ts +112 -0
- package/src/lib/app-utils/social-image.js +191 -0
- package/src/lib/app-utils/social-image.js.map +1 -0
- package/src/lib/app-utils/starter-templates.d.ts +99 -0
- package/src/lib/app-utils/starter-templates.js +579 -0
- package/src/lib/app-utils/starter-templates.js.map +1 -0
- package/src/lib/app-utils/stored-nodes.d.ts +120 -0
- package/src/lib/app-utils/stored-nodes.js +174 -0
- package/src/lib/app-utils/stored-nodes.js.map +1 -0
- package/src/lib/app-utils/strip-undefined.d.ts +59 -0
- package/src/lib/app-utils/strip-undefined.js +95 -0
- package/src/lib/app-utils/strip-undefined.js.map +1 -0
- package/src/lib/app-utils/stripe-deployment-mode.d.ts +47 -0
- package/src/lib/app-utils/stripe-deployment-mode.js +70 -0
- package/src/lib/app-utils/stripe-deployment-mode.js.map +1 -0
- package/src/lib/app-utils/support-tiers.d.ts +108 -0
- package/src/lib/app-utils/support-tiers.js +201 -0
- package/src/lib/app-utils/support-tiers.js.map +1 -0
- package/src/lib/app-utils/timezone-geo-hint.d.ts +36 -0
- package/src/lib/app-utils/timezone-geo-hint.js +180 -0
- package/src/lib/app-utils/timezone-geo-hint.js.map +1 -0
- package/src/lib/app-utils/upload-cors.d.ts +155 -0
- package/src/lib/app-utils/upload-cors.js +254 -0
- package/src/lib/app-utils/upload-cors.js.map +1 -0
- package/src/lib/app-utils/upload-inspection.d.ts +159 -0
- package/src/lib/app-utils/upload-inspection.js +539 -0
- package/src/lib/app-utils/upload-inspection.js.map +1 -0
- package/src/lib/app-utils/url-slug.d.ts +40 -0
- package/src/lib/app-utils/url-slug.js +42 -0
- package/src/lib/app-utils/url-slug.js.map +1 -0
- package/src/lib/app-utils/usage-budget.d.ts +429 -0
- package/src/lib/app-utils/usage-budget.js +421 -0
- package/src/lib/app-utils/usage-budget.js.map +1 -0
- package/src/lib/app-utils/variables.d.ts +96 -0
- package/src/lib/app-utils/variables.js +233 -0
- package/src/lib/app-utils/variables.js.map +1 -0
- package/src/lib/app-utils/video-asset-facts.d.ts +61 -0
- package/src/lib/app-utils/video-asset-facts.js +70 -0
- package/src/lib/app-utils/video-asset-facts.js.map +1 -0
- package/src/lib/app-utils/video-object.d.ts +89 -0
- package/src/lib/app-utils/video-object.js +245 -0
- package/src/lib/app-utils/video-object.js.map +1 -0
- package/src/lib/app-utils/visitor-consent.d.ts +757 -0
- package/src/lib/app-utils/visitor-consent.js +981 -0
- package/src/lib/app-utils/visitor-consent.js.map +1 -0
- package/src/lib/app-utils/visitor-record-ceiling.d.ts +223 -0
- package/src/lib/app-utils/visitor-record-ceiling.js +215 -0
- package/src/lib/app-utils/visitor-record-ceiling.js.map +1 -0
- package/src/lib/app-utils/web-vitals-rum.d.ts +53 -0
- package/src/lib/app-utils/web-vitals-rum.js +278 -0
- package/src/lib/app-utils/web-vitals-rum.js.map +1 -0
- package/src/lib/app-utils/webhook-delivery.d.ts +324 -0
- package/src/lib/app-utils/webhook-delivery.js +413 -0
- package/src/lib/app-utils/webhook-delivery.js.map +1 -0
- package/src/lib/app-utils/where-used.d.ts +57 -0
- package/src/lib/app-utils/where-used.js +59 -0
- package/src/lib/app-utils/where-used.js.map +1 -0
- package/src/lib/app-utils/wistia-embed.d.ts +86 -0
- package/src/lib/app-utils/wistia-embed.js +119 -0
- package/src/lib/app-utils/wistia-embed.js.map +1 -0
- package/src/lib/app-utils/workflows.d.ts +136 -0
- package/src/lib/app-utils/workflows.js +346 -0
- package/src/lib/app-utils/workflows.js.map +1 -0
- package/src/lib/canvas-manager/canvas-manager-tree.d.ts +109 -0
- package/src/lib/canvas-manager/canvas-manager-tree.js +139 -0
- package/src/lib/canvas-manager/canvas-manager-tree.js.map +1 -0
- package/src/lib/canvas-manager/canvas-manager.d.ts +549 -0
- package/src/lib/canvas-manager/canvas-manager.js +1311 -0
- package/src/lib/canvas-manager/canvas-manager.js.map +1 -0
- package/src/lib/canvas-manager/index.d.ts +20 -0
- package/src/lib/canvas-manager/index.js +21 -0
- package/src/lib/canvas-manager/index.js.map +1 -0
- package/src/lib/canvas-manager/stores/index.d.ts +17 -0
- package/src/lib/canvas-manager/stores/index.js +18 -0
- package/src/lib/canvas-manager/stores/index.js.map +1 -0
- package/src/lib/canvas-manager/stores/node.store.d.ts +30 -0
- package/src/lib/canvas-manager/stores/node.store.js +45 -0
- package/src/lib/canvas-manager/stores/node.store.js.map +1 -0
- package/src/lib/components-manager/components-manager.d.ts +56 -0
- package/src/lib/components-manager/components-manager.js +191 -0
- package/src/lib/components-manager/components-manager.js.map +1 -0
- package/src/lib/components-manager/index.d.ts +18 -0
- package/src/lib/components-manager/index.js +19 -0
- package/src/lib/components-manager/index.js.map +1 -0
- package/src/lib/emit-manager/emit-manager.d.ts +56 -0
- package/src/lib/emit-manager/emit-manager.js +60 -0
- package/src/lib/emit-manager/emit-manager.js.map +1 -0
- package/src/lib/emit-manager/index.d.ts +18 -0
- package/src/lib/emit-manager/index.js +19 -0
- package/src/lib/emit-manager/index.js.map +1 -0
- package/src/lib/foundation/constants/_internal.d.ts +18 -0
- package/src/lib/foundation/constants/_internal.js +62 -0
- package/src/lib/foundation/constants/_internal.js.map +1 -0
- package/src/lib/foundation/constants/app.d.ts +23 -0
- package/src/lib/foundation/constants/app.js +25 -0
- package/src/lib/foundation/constants/app.js.map +1 -0
- package/src/lib/foundation/constants/canvas.d.ts +18 -0
- package/src/lib/foundation/constants/canvas.js +18 -0
- package/src/lib/foundation/constants/canvas.js.map +1 -0
- package/src/lib/foundation/constants/components.d.ts +54 -0
- package/src/lib/foundation/constants/components.js +61 -0
- package/src/lib/foundation/constants/components.js.map +1 -0
- package/src/lib/foundation/constants/shared.d.ts +50 -0
- package/src/lib/foundation/constants/shared.js +49 -0
- package/src/lib/foundation/constants/shared.js.map +1 -0
- package/src/lib/foundation/constants/symbol.d.ts +63 -0
- package/src/lib/foundation/constants/symbol.js +75 -0
- package/src/lib/foundation/constants/symbol.js.map +1 -0
- package/src/lib/foundation/definitions/components.types.d.ts +372 -0
- package/src/lib/foundation/definitions/components.types.js +180 -0
- package/src/lib/foundation/definitions/components.types.js.map +1 -0
- package/src/lib/foundation/definitions/contact.types.d.ts +73 -0
- package/src/lib/foundation/definitions/contact.types.js +107 -0
- package/src/lib/foundation/definitions/contact.types.js.map +1 -0
- package/src/lib/foundation/definitions/host-content-collections.d.ts +137 -0
- package/src/lib/foundation/definitions/host-content-collections.js +219 -0
- package/src/lib/foundation/definitions/host-content-collections.js.map +1 -0
- package/src/lib/foundation/definitions/org-billing.types.d.ts +1361 -0
- package/src/lib/foundation/definitions/org-billing.types.js +77 -0
- package/src/lib/foundation/definitions/org-billing.types.js.map +1 -0
- package/src/lib/foundation/definitions/organization.types.d.ts +307 -0
- package/src/lib/foundation/definitions/organization.types.js +42 -0
- package/src/lib/foundation/definitions/organization.types.js.map +1 -0
- package/src/lib/foundation/definitions/platform.types.d.ts +1326 -0
- package/src/lib/foundation/definitions/platform.types.js +124 -0
- package/src/lib/foundation/definitions/platform.types.js.map +1 -0
- package/src/lib/foundation/definitions/property-kinds.d.ts +189 -0
- package/src/lib/foundation/definitions/property-kinds.js +565 -0
- package/src/lib/foundation/definitions/property-kinds.js.map +1 -0
- package/src/lib/foundation/definitions/shared.d.ts +23 -0
- package/src/lib/foundation/definitions/shared.js +18 -0
- package/src/lib/foundation/definitions/shared.js.map +1 -0
- package/src/lib/foundation/definitions/write-deny-coverage.util.d.ts +249 -0
- package/src/lib/foundation/definitions/write-deny-coverage.util.js +499 -0
- package/src/lib/foundation/definitions/write-deny-coverage.util.js.map +1 -0
- package/src/lib/foundation/index.d.ts +32 -0
- package/src/lib/foundation/index.js +67 -0
- package/src/lib/foundation/index.js.map +1 -0
- package/src/lib/lifecycle.d.ts +24 -0
- package/src/lib/lifecycle.js +39 -0
- package/src/lib/lifecycle.js.map +1 -0
- package/src/lib/mst/common.d.ts +17 -0
- package/src/lib/mst/common.js +23 -0
- package/src/lib/mst/common.js.map +1 -0
- package/src/lib/mst/index.d.ts +19 -0
- package/src/lib/mst/index.js +20 -0
- package/src/lib/mst/index.js.map +1 -0
- package/src/lib/mst/json.d.ts +22 -0
- package/src/lib/mst/json.js +23 -0
- package/src/lib/mst/json.js.map +1 -0
- package/src/lib/mst/types.d.ts +20 -0
- package/src/lib/mst/types.js +18 -0
- package/src/lib/mst/types.js.map +1 -0
- package/src/lib/plugin-manager/billing-webhook-hooks.d.ts +77 -0
- package/src/lib/plugin-manager/billing-webhook-hooks.js +55 -0
- package/src/lib/plugin-manager/billing-webhook-hooks.js.map +1 -0
- package/src/lib/plugin-manager/commerce-zone-props.d.ts +172 -0
- package/src/lib/plugin-manager/commerce-zone-props.js +31 -0
- package/src/lib/plugin-manager/commerce-zone-props.js.map +1 -0
- package/src/lib/plugin-manager/custom-fields.d.ts +60 -0
- package/src/lib/plugin-manager/custom-fields.js +39 -0
- package/src/lib/plugin-manager/custom-fields.js.map +1 -0
- package/src/lib/plugin-manager/editor-sessions.d.ts +109 -0
- package/src/lib/plugin-manager/editor-sessions.js +137 -0
- package/src/lib/plugin-manager/editor-sessions.js.map +1 -0
- package/src/lib/plugin-manager/enabled-plugins.d.ts +438 -0
- package/src/lib/plugin-manager/enabled-plugins.js +403 -0
- package/src/lib/plugin-manager/enabled-plugins.js.map +1 -0
- package/src/lib/plugin-manager/feature-plugins.d.ts +1314 -0
- package/src/lib/plugin-manager/feature-plugins.js +609 -0
- package/src/lib/plugin-manager/feature-plugins.js.map +1 -0
- package/src/lib/plugin-manager/first-party-plugins.generated.d.ts +11 -0
- package/src/lib/plugin-manager/first-party-plugins.generated.js +149 -0
- package/src/lib/plugin-manager/first-party-plugins.generated.js.map +1 -0
- package/src/lib/plugin-manager/index.d.ts +42 -0
- package/src/lib/plugin-manager/index.js +46 -0
- package/src/lib/plugin-manager/index.js.map +1 -0
- package/src/lib/plugin-manager/install-presets.d.ts +93 -0
- package/src/lib/plugin-manager/install-presets.js +86 -0
- package/src/lib/plugin-manager/install-presets.js.map +1 -0
- package/src/lib/plugin-manager/media-delivery-provider.d.ts +124 -0
- package/src/lib/plugin-manager/media-delivery-provider.js +53 -0
- package/src/lib/plugin-manager/media-delivery-provider.js.map +1 -0
- package/src/lib/plugin-manager/order-fulfilment.d.ts +142 -0
- package/src/lib/plugin-manager/order-fulfilment.js +104 -0
- package/src/lib/plugin-manager/order-fulfilment.js.map +1 -0
- package/src/lib/plugin-manager/plugin-activity-actions.d.ts +122 -0
- package/src/lib/plugin-manager/plugin-activity-actions.js +140 -0
- package/src/lib/plugin-manager/plugin-activity-actions.js.map +1 -0
- package/src/lib/plugin-manager/plugin-bridge.d.ts +98 -0
- package/src/lib/plugin-manager/plugin-bridge.js +154 -0
- package/src/lib/plugin-manager/plugin-bridge.js.map +1 -0
- package/src/lib/plugin-manager/plugin-config.d.ts +148 -0
- package/src/lib/plugin-manager/plugin-config.js +228 -0
- package/src/lib/plugin-manager/plugin-config.js.map +1 -0
- package/src/lib/plugin-manager/plugin-console-crons.d.ts +139 -0
- package/src/lib/plugin-manager/plugin-console-crons.js +177 -0
- package/src/lib/plugin-manager/plugin-console-crons.js.map +1 -0
- package/src/lib/plugin-manager/plugin-contact-capture.d.ts +220 -0
- package/src/lib/plugin-manager/plugin-contact-capture.js +89 -0
- package/src/lib/plugin-manager/plugin-contact-capture.js.map +1 -0
- package/src/lib/plugin-manager/plugin-contributions.d.ts +244 -0
- package/src/lib/plugin-manager/plugin-contributions.js +283 -0
- package/src/lib/plugin-manager/plugin-contributions.js.map +1 -0
- package/src/lib/plugin-manager/plugin-entitlement-keys.d.ts +169 -0
- package/src/lib/plugin-manager/plugin-entitlement-keys.js +84 -0
- package/src/lib/plugin-manager/plugin-entitlement-keys.js.map +1 -0
- package/src/lib/plugin-manager/plugin-entitlements.d.ts +181 -0
- package/src/lib/plugin-manager/plugin-entitlements.js +188 -0
- package/src/lib/plugin-manager/plugin-entitlements.js.map +1 -0
- package/src/lib/plugin-manager/plugin-events.d.ts +145 -0
- package/src/lib/plugin-manager/plugin-events.js +79 -0
- package/src/lib/plugin-manager/plugin-events.js.map +1 -0
- package/src/lib/plugin-manager/plugin-figures.d.ts +251 -0
- package/src/lib/plugin-manager/plugin-figures.js +252 -0
- package/src/lib/plugin-manager/plugin-figures.js.map +1 -0
- package/src/lib/plugin-manager/plugin-host-collections.d.ts +146 -0
- package/src/lib/plugin-manager/plugin-host-collections.js +116 -0
- package/src/lib/plugin-manager/plugin-host-collections.js.map +1 -0
- package/src/lib/plugin-manager/plugin-jobs.d.ts +130 -0
- package/src/lib/plugin-manager/plugin-jobs.js +182 -0
- package/src/lib/plugin-manager/plugin-jobs.js.map +1 -0
- package/src/lib/plugin-manager/plugin-loader.d.ts +86 -0
- package/src/lib/plugin-manager/plugin-loader.js +223 -0
- package/src/lib/plugin-manager/plugin-loader.js.map +1 -0
- package/src/lib/plugin-manager/plugin-manager.d.ts +95 -0
- package/src/lib/plugin-manager/plugin-manager.js +343 -0
- package/src/lib/plugin-manager/plugin-manager.js.map +1 -0
- package/src/lib/plugin-manager/plugin-metered-lines.d.ts +97 -0
- package/src/lib/plugin-manager/plugin-metered-lines.js +123 -0
- package/src/lib/plugin-manager/plugin-metered-lines.js.map +1 -0
- package/src/lib/plugin-manager/plugin-org-erasure.d.ts +52 -0
- package/src/lib/plugin-manager/plugin-org-erasure.js +100 -0
- package/src/lib/plugin-manager/plugin-org-erasure.js.map +1 -0
- package/src/lib/plugin-manager/plugin-permissions.d.ts +69 -0
- package/src/lib/plugin-manager/plugin-permissions.js +77 -0
- package/src/lib/plugin-manager/plugin-permissions.js.map +1 -0
- package/src/lib/plugin-manager/plugin-person-erasure.d.ts +58 -0
- package/src/lib/plugin-manager/plugin-person-erasure.js +109 -0
- package/src/lib/plugin-manager/plugin-person-erasure.js.map +1 -0
- package/src/lib/plugin-manager/plugin-record-cards.d.ts +99 -0
- package/src/lib/plugin-manager/plugin-record-cards.js +59 -0
- package/src/lib/plugin-manager/plugin-record-cards.js.map +1 -0
- package/src/lib/plugin-manager/plugin-record-facts.d.ts +111 -0
- package/src/lib/plugin-manager/plugin-record-facts.js +51 -0
- package/src/lib/plugin-manager/plugin-record-facts.js.map +1 -0
- package/src/lib/plugin-manager/plugin-record-routes.d.ts +129 -0
- package/src/lib/plugin-manager/plugin-record-routes.js +93 -0
- package/src/lib/plugin-manager/plugin-record-routes.js.map +1 -0
- package/src/lib/plugin-manager/plugin-record-timeline.d.ts +147 -0
- package/src/lib/plugin-manager/plugin-record-timeline.js +39 -0
- package/src/lib/plugin-manager/plugin-record-timeline.js.map +1 -0
- package/src/lib/plugin-manager/plugin-resource-drafts.d.ts +137 -0
- package/src/lib/plugin-manager/plugin-resource-drafts.js +51 -0
- package/src/lib/plugin-manager/plugin-resource-drafts.js.map +1 -0
- package/src/lib/plugin-manager/plugin-services.d.ts +94 -0
- package/src/lib/plugin-manager/plugin-services.js +153 -0
- package/src/lib/plugin-manager/plugin-services.js.map +1 -0
- package/src/lib/plugin-manager/plugin-styles-ui.d.ts +71 -0
- package/src/lib/plugin-manager/plugin-styles-ui.js +80 -0
- package/src/lib/plugin-manager/plugin-styles-ui.js.map +1 -0
- package/src/lib/plugin-manager/plugin-styles.d.ts +176 -0
- package/src/lib/plugin-manager/plugin-styles.js +186 -0
- package/src/lib/plugin-manager/plugin-styles.js.map +1 -0
- package/src/lib/plugin-manager/plugin-subprocessors.d.ts +135 -0
- package/src/lib/plugin-manager/plugin-subprocessors.js +129 -0
- package/src/lib/plugin-manager/plugin-subprocessors.js.map +1 -0
- package/src/lib/plugin-manager/plugin-tax-profile.d.ts +84 -0
- package/src/lib/plugin-manager/plugin-tax-profile.js +39 -0
- package/src/lib/plugin-manager/plugin-tax-profile.js.map +1 -0
- package/src/lib/plugin-manager/plugin-user-erasure.d.ts +53 -0
- package/src/lib/plugin-manager/plugin-user-erasure.js +84 -0
- package/src/lib/plugin-manager/plugin-user-erasure.js.map +1 -0
- package/src/lib/plugin-manager/plugin-zones.d.ts +121 -0
- package/src/lib/plugin-manager/plugin-zones.js +74 -0
- package/src/lib/plugin-manager/plugin-zones.js.map +1 -0
- package/src/lib/plugin-manager/realm-plugins.d.ts +112 -0
- package/src/lib/plugin-manager/realm-plugins.js +196 -0
- package/src/lib/plugin-manager/realm-plugins.js.map +1 -0
- package/src/lib/plugin-manager/realm-server.d.ts +54 -0
- package/src/lib/plugin-manager/realm-server.js +88 -0
- package/src/lib/plugin-manager/realm-server.js.map +1 -0
- package/src/lib/plugin-manager/record-zone-props.d.ts +126 -0
- package/src/lib/plugin-manager/record-zone-props.js +31 -0
- package/src/lib/plugin-manager/record-zone-props.js.map +1 -0
- package/src/lib/plugin-manager/site-page-hooks.d.ts +102 -0
- package/src/lib/plugin-manager/site-page-hooks.js +114 -0
- package/src/lib/plugin-manager/site-page-hooks.js.map +1 -0
- package/src/lib/plugin-manager/site-runtime.d.ts +57 -0
- package/src/lib/plugin-manager/site-runtime.js +25 -0
- package/src/lib/plugin-manager/site-runtime.js.map +1 -0
- package/src/lib/plugin-manager/usage-alert-contributors.d.ts +115 -0
- package/src/lib/plugin-manager/usage-alert-contributors.js +106 -0
- package/src/lib/plugin-manager/usage-alert-contributors.js.map +1 -0
- package/src/lib/types/ast.d.ts +199 -0
- package/src/lib/types/ast.js +20 -0
- package/src/lib/types/ast.js.map +1 -0
- package/src/lib/types/index.d.ts +20 -0
- package/src/lib/types/index.js +21 -0
- package/src/lib/types/index.js.map +1 -0
- package/src/lib/types/nodes.d.ts +608 -0
- package/src/lib/types/nodes.js +28 -0
- package/src/lib/types/nodes.js.map +1 -0
- package/src/lib/types/routing.d.ts +17 -0
- package/src/lib/types/routing.js +18 -0
- package/src/lib/types/routing.js.map +1 -0
- package/src/lib/types/screen.d.ts +23 -0
- package/src/lib/types/screen.js +18 -0
- package/src/lib/types/screen.js.map +1 -0
- package/src/lib/utils.d.ts +25 -0
- package/src/lib/utils.js +42 -0
- package/src/lib/utils.js.map +1 -0
- package/src/server.d.ts +37 -0
- package/src/server.js +55 -0
- package/src/server.js.map +1 -0
|
@@ -0,0 +1,914 @@
|
|
|
1
|
+
import { _ as _extends } from "@swc/helpers/_/_extends";
|
|
2
|
+
import { _ as _object_without_properties_loose } from "@swc/helpers/_/_object_without_properties_loose";
|
|
3
|
+
/**
|
|
4
|
+
* @license
|
|
5
|
+
* Copyright 2026 Aglyn LLC
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
* you may not use this file except in compliance with the License.
|
|
9
|
+
* You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/ /**
|
|
19
|
+
* The rule behind a dynamic list (`docs/specs/email-overhaul.md` §3b/§3c).
|
|
20
|
+
*
|
|
21
|
+
* A list has held manually enrolled members only. A dynamic one stores this
|
|
22
|
+
* rule instead and materializes into the same `members` subcollection, so the
|
|
23
|
+
* send path keeps reading one deterministic collection rather than running an
|
|
24
|
+
* unbounded scan per campaign.
|
|
25
|
+
*
|
|
26
|
+
* ## It extends the segment vocabulary rather than inventing one
|
|
27
|
+
*
|
|
28
|
+
* `tags` and `captureSources` mean exactly what they mean in
|
|
29
|
+
* `contactMatchesSegment`, which this module reuses rather than restating:
|
|
30
|
+
* two filter languages over the same contact document would drift, and the
|
|
31
|
+
* one that drifts is whichever the merchant is not looking at. What is new is
|
|
32
|
+
* a SOURCE dimension, because a list must be able to draw from silos that are
|
|
33
|
+
* not `contacts` at all.
|
|
34
|
+
*
|
|
35
|
+
* ## Every field reads a value that is already written
|
|
36
|
+
*
|
|
37
|
+
* Nothing here collects anything new. `tags`, `captureSources` and the
|
|
38
|
+
* `behavior` figures are contact fields; `formNames` is the `formName` a
|
|
39
|
+
* submission already stores; `createdAfterMs`/`createdBeforeMs` read the
|
|
40
|
+
* `createdAt` all three person silos already stamp; `campaignIds` reads the
|
|
41
|
+
* membership `campaign-membership.ts` defines, which the forms console writes
|
|
42
|
+
* and the submit route propagates.
|
|
43
|
+
*
|
|
44
|
+
* ⚠️ A rule selects an AUDIENCE. It does not grant consent — a person matched
|
|
45
|
+
* by "submitted a form" has not opted in by submitting it. Membership and
|
|
46
|
+
* basis are separate joins and `marketing-consent.ts` owns the second one.
|
|
47
|
+
*/ import { normalizeCampaignIds } from "./campaign-membership.js";
|
|
48
|
+
import { CONTACT_SOURCE_LABELS, contactMatchesSegment } from "./contacts.js";
|
|
49
|
+
import { isContactLifecycleStage, normalizeContactFieldKey, CRM_CONTACT_VIEW_FIELDS, crmContactCustomKey } from "./crm.js";
|
|
50
|
+
/**
|
|
51
|
+
* The silos whose rows can be filed under a campaign.
|
|
52
|
+
*
|
|
53
|
+
* A contact carries the membership inside the holder's own facet and a form
|
|
54
|
+
* submission carries the membership its form had when it arrived. A lead and a
|
|
55
|
+
* site member carry none — nothing writes one — so the campaign dimension is
|
|
56
|
+
* SKIPPED for them rather than failed, which is the same discipline every
|
|
57
|
+
* silo-specific dimension here follows.
|
|
58
|
+
*
|
|
59
|
+
* Stated as a value because both the matcher and the materializer's enrichment
|
|
60
|
+
* decide off it, and two lists would drift into a rule that selects a silo the
|
|
61
|
+
* scan never reads the field for.
|
|
62
|
+
*/ export const CAMPAIGN_MEMBER_SILOS = [
|
|
63
|
+
'contacts',
|
|
64
|
+
'formSubmissions'
|
|
65
|
+
];
|
|
66
|
+
/**
|
|
67
|
+
* How a custom-field clause compares the stored value to the one it names.
|
|
68
|
+
*
|
|
69
|
+
* Seven operators and no more, because each one has to be readable back as
|
|
70
|
+
* a sentence and each one has to state what it does with a BLANK value —
|
|
71
|
+
* see {@link customValueMatches} for the lean every operator takes.
|
|
72
|
+
*/ export const DYNAMIC_LIST_CUSTOM_OPS = [
|
|
73
|
+
'eq',
|
|
74
|
+
'neq',
|
|
75
|
+
'contains',
|
|
76
|
+
'gt',
|
|
77
|
+
'lt',
|
|
78
|
+
'set',
|
|
79
|
+
'unset'
|
|
80
|
+
];
|
|
81
|
+
/** The operators that compare against a value the clause carries. */ const VALUED_CUSTOM_OPS = new Set([
|
|
82
|
+
'eq',
|
|
83
|
+
'neq',
|
|
84
|
+
'contains',
|
|
85
|
+
'gt',
|
|
86
|
+
'lt'
|
|
87
|
+
]);
|
|
88
|
+
/**
|
|
89
|
+
* The most custom-field clauses one block may carry.
|
|
90
|
+
*
|
|
91
|
+
* A bound on the predicate rather than on the audience — every clause is
|
|
92
|
+
* evaluated in memory against a candidate already read — kept small for the
|
|
93
|
+
* reason the branch cap is: the rule is merchant-authored and a stored array
|
|
94
|
+
* has no natural end.
|
|
95
|
+
*/ export const DYNAMIC_LIST_MAX_CUSTOM_CLAUSES = 20;
|
|
96
|
+
const asStringArray = (value)=>Array.isArray(value) ? value.map((entry)=>String(entry != null ? entry : '').trim()).filter((entry)=>entry.length > 0 && entry.length <= 120).slice(0, 50) : [];
|
|
97
|
+
const asPositiveNumber = (value)=>{
|
|
98
|
+
const parsed = Number(value);
|
|
99
|
+
return Number.isFinite(parsed) && parsed >= 0 ? parsed : undefined;
|
|
100
|
+
};
|
|
101
|
+
const DYNAMIC_LIST_SOURCES = [
|
|
102
|
+
'contacts',
|
|
103
|
+
'leads',
|
|
104
|
+
'siteMembers',
|
|
105
|
+
'formSubmissions'
|
|
106
|
+
];
|
|
107
|
+
/**
|
|
108
|
+
* Coerces a stored rule to the shape the matcher expects.
|
|
109
|
+
*
|
|
110
|
+
* The rule is merchant-authored through the console and read back on a
|
|
111
|
+
* scheduled sweep, so it arrives as whatever Firestore held. Unknown source
|
|
112
|
+
* names are dropped rather than tolerated: a typo that fell through would
|
|
113
|
+
* read as a silo the materializer never scans, and the list would quietly
|
|
114
|
+
* materialize a smaller set than the rule appears to describe.
|
|
115
|
+
*/ /**
|
|
116
|
+
* The most OR branches one rule may carry.
|
|
117
|
+
*
|
|
118
|
+
* A bound on the PREDICATE, not on the audience — every branch is evaluated
|
|
119
|
+
* in memory against a candidate the sweep has already read, so this costs no
|
|
120
|
+
* Firestore work. It exists because the rule is merchant-authored and a
|
|
121
|
+
* stored array has no natural end: a thousand branches would be a thousand
|
|
122
|
+
* evaluations per candidate per sweep.
|
|
123
|
+
*
|
|
124
|
+
* ⚠️ Set ABOVE what the console form can produce, and that is a correctness
|
|
125
|
+
* requirement rather than headroom. The form's "any of these filters" mode
|
|
126
|
+
* puts each control in a branch of its own, so a reader who fills in every
|
|
127
|
+
* box authors nineteen, plus one branch per custom-field condition up to
|
|
128
|
+
* {@link DYNAMIC_LIST_MAX_CUSTOM_CLAUSES} — and dropping a branch NARROWS an
|
|
129
|
+
* OR, so a cap the form could reach would silently select fewer people than
|
|
130
|
+
* the sentences above the controls say. The rule editor's spec holds the sum
|
|
131
|
+
* under this number.
|
|
132
|
+
*/ export const DYNAMIC_LIST_MAX_GROUPS = 40;
|
|
133
|
+
/**
|
|
134
|
+
* The most lists one dimension may name.
|
|
135
|
+
*
|
|
136
|
+
* This one DOES cost reads — a named list is a keyed lookup per candidate per
|
|
137
|
+
* page — so it is deliberately small, and it is the same number on both arms
|
|
138
|
+
* so that "in these" and "not in those" cannot be combined into a larger
|
|
139
|
+
* fan-out than either alone.
|
|
140
|
+
*/ export const DYNAMIC_LIST_MAX_LIST_REFERENCES = 5;
|
|
141
|
+
/**
|
|
142
|
+
* Coerces a stored custom-field clause, or drops it.
|
|
143
|
+
*
|
|
144
|
+
* Dropped rather than tolerated for the reason a typo'd silo is: a clause
|
|
145
|
+
* with a key no definition uses, an operator the matcher does not know, or a
|
|
146
|
+
* missing value where one is compared against, is a filter no contact can
|
|
147
|
+
* satisfy — and a rule that quietly matches nobody reads exactly like a rule
|
|
148
|
+
* that has not run yet. The key goes through the definition's own normalizer
|
|
149
|
+
* so a clause written against a label (`Plan Name`) still reaches the stored
|
|
150
|
+
* key (`plan_name`), and a value is kept only as a scalar because that is all
|
|
151
|
+
* a custom field may hold.
|
|
152
|
+
*/ function normalizeCustomClause(raw) {
|
|
153
|
+
const entry = raw != null ? raw : {};
|
|
154
|
+
const key = normalizeContactFieldKey(entry['key']);
|
|
155
|
+
const op = entry['op'];
|
|
156
|
+
if (!key || typeof op !== 'string' || !DYNAMIC_LIST_CUSTOM_OPS.includes(op)) {
|
|
157
|
+
return null;
|
|
158
|
+
}
|
|
159
|
+
const operator = op;
|
|
160
|
+
if (!VALUED_CUSTOM_OPS.has(operator)) return {
|
|
161
|
+
key,
|
|
162
|
+
op: operator
|
|
163
|
+
};
|
|
164
|
+
const value = entry['value'];
|
|
165
|
+
if (typeof value === 'string') {
|
|
166
|
+
const trimmed = value.trim().slice(0, 500);
|
|
167
|
+
return trimmed ? {
|
|
168
|
+
key,
|
|
169
|
+
op: operator,
|
|
170
|
+
value: trimmed
|
|
171
|
+
} : null;
|
|
172
|
+
}
|
|
173
|
+
if (typeof value === 'number') {
|
|
174
|
+
return Number.isFinite(value) ? {
|
|
175
|
+
key,
|
|
176
|
+
op: operator,
|
|
177
|
+
value
|
|
178
|
+
} : null;
|
|
179
|
+
}
|
|
180
|
+
if (typeof value === 'boolean') return {
|
|
181
|
+
key,
|
|
182
|
+
op: operator,
|
|
183
|
+
value
|
|
184
|
+
};
|
|
185
|
+
return null;
|
|
186
|
+
}
|
|
187
|
+
/** Coerces the dimensions shared by the rule and each of its OR branches. */ function normalizeDimensions(value) {
|
|
188
|
+
var _value_behavior, _value_engagement;
|
|
189
|
+
const behavior = (_value_behavior = value['behavior']) != null ? _value_behavior : {};
|
|
190
|
+
const normalizedBehavior = _extends({}, asPositiveNumber(behavior['ordersCountAtLeast']) !== undefined ? {
|
|
191
|
+
ordersCountAtLeast: asPositiveNumber(behavior['ordersCountAtLeast'])
|
|
192
|
+
} : {}, asPositiveNumber(behavior['ltvCentsAtLeast']) !== undefined ? {
|
|
193
|
+
ltvCentsAtLeast: asPositiveNumber(behavior['ltvCentsAtLeast'])
|
|
194
|
+
} : {}, asPositiveNumber(behavior['lastPurchaseWithinDays']) !== undefined ? {
|
|
195
|
+
lastPurchaseWithinDays: asPositiveNumber(behavior['lastPurchaseWithinDays'])
|
|
196
|
+
} : {}, asPositiveNumber(behavior['noPurchaseForDays']) !== undefined ? {
|
|
197
|
+
noPurchaseForDays: asPositiveNumber(behavior['noPurchaseForDays'])
|
|
198
|
+
} : {});
|
|
199
|
+
const engagement = (_value_engagement = value['engagement']) != null ? _value_engagement : {};
|
|
200
|
+
const normalizedEngagement = _extends({}, asPositiveNumber(engagement['openedWithinDays']) !== undefined ? {
|
|
201
|
+
openedWithinDays: asPositiveNumber(engagement['openedWithinDays'])
|
|
202
|
+
} : {}, asPositiveNumber(engagement['clickedWithinDays']) !== undefined ? {
|
|
203
|
+
clickedWithinDays: asPositiveNumber(engagement['clickedWithinDays'])
|
|
204
|
+
} : {}, asPositiveNumber(engagement['notOpenedForDays']) !== undefined ? {
|
|
205
|
+
notOpenedForDays: asPositiveNumber(engagement['notOpenedForDays'])
|
|
206
|
+
} : {}, asPositiveNumber(engagement['notClickedForDays']) !== undefined ? {
|
|
207
|
+
notClickedForDays: asPositiveNumber(engagement['notClickedForDays'])
|
|
208
|
+
} : {});
|
|
209
|
+
const tags = asStringArray(value['tags']);
|
|
210
|
+
const captureSources = asStringArray(value['captureSources']);
|
|
211
|
+
const formNames = asStringArray(value['formNames']);
|
|
212
|
+
// Through the campaign field's own normalizer rather than the local string
|
|
213
|
+
// coercion: the cap, the dedupe and the trim are properties of the stored
|
|
214
|
+
// membership, and a second reading of them here would let a rule name more
|
|
215
|
+
// campaigns than any record is allowed to be filed under.
|
|
216
|
+
const campaignIds = normalizeCampaignIds(value['campaignIds']);
|
|
217
|
+
const createdAfterMs = asPositiveNumber(value['createdAfterMs']);
|
|
218
|
+
const createdBeforeMs = asPositiveNumber(value['createdBeforeMs']);
|
|
219
|
+
const inListIds = asStringArray(value['inListIds']).slice(0, DYNAMIC_LIST_MAX_LIST_REFERENCES);
|
|
220
|
+
const notInListIds = asStringArray(value['notInListIds']).slice(0, DYNAMIC_LIST_MAX_LIST_REFERENCES);
|
|
221
|
+
const ownerUids = asStringArray(value['ownerUids']);
|
|
222
|
+
// A stage the model does not name is dropped, not kept: kept, it would be
|
|
223
|
+
// a filter no contact can satisfy, and the rule would read as the stages
|
|
224
|
+
// it does name while selecting nobody.
|
|
225
|
+
const lifecycleStages = asStringArray(value['lifecycleStages']).filter(isContactLifecycleStage);
|
|
226
|
+
const companyIds = asStringArray(value['companyIds']);
|
|
227
|
+
const custom = (Array.isArray(value['custom']) ? value['custom'] : []).slice(0, DYNAMIC_LIST_MAX_CUSTOM_CLAUSES).map(normalizeCustomClause).filter((clause)=>clause !== null);
|
|
228
|
+
const engagedWithinDays = asPositiveNumber(value['engagedWithinDays']);
|
|
229
|
+
return _extends({}, tags.length ? {
|
|
230
|
+
tags
|
|
231
|
+
} : {}, captureSources.length ? {
|
|
232
|
+
captureSources
|
|
233
|
+
} : {}, formNames.length ? {
|
|
234
|
+
formNames
|
|
235
|
+
} : {}, campaignIds.length ? {
|
|
236
|
+
campaignIds
|
|
237
|
+
} : {}, createdAfterMs !== undefined ? {
|
|
238
|
+
createdAfterMs
|
|
239
|
+
} : {}, createdBeforeMs !== undefined ? {
|
|
240
|
+
createdBeforeMs
|
|
241
|
+
} : {}, Object.keys(normalizedBehavior).length ? {
|
|
242
|
+
behavior: normalizedBehavior
|
|
243
|
+
} : {}, Object.keys(normalizedEngagement).length ? {
|
|
244
|
+
engagement: normalizedEngagement
|
|
245
|
+
} : {}, inListIds.length ? {
|
|
246
|
+
inListIds
|
|
247
|
+
} : {}, notInListIds.length ? {
|
|
248
|
+
notInListIds
|
|
249
|
+
} : {}, ownerUids.length ? {
|
|
250
|
+
ownerUids
|
|
251
|
+
} : {}, lifecycleStages.length ? {
|
|
252
|
+
lifecycleStages
|
|
253
|
+
} : {}, companyIds.length ? {
|
|
254
|
+
companyIds
|
|
255
|
+
} : {}, custom.length ? {
|
|
256
|
+
custom
|
|
257
|
+
} : {}, engagedWithinDays !== undefined ? {
|
|
258
|
+
engagedWithinDays
|
|
259
|
+
} : {});
|
|
260
|
+
}
|
|
261
|
+
/** True when a branch constrains nothing, so keeping it would widen the rule. */ function dimensionsAreEmpty(dimensions) {
|
|
262
|
+
return Object.keys(dimensions).length === 0;
|
|
263
|
+
}
|
|
264
|
+
export function normalizeDynamicListRule(stored) {
|
|
265
|
+
var _value_segmentId, _value_viewId;
|
|
266
|
+
const value = stored != null ? stored : {};
|
|
267
|
+
const sources = asStringArray(value['sources']).filter((source)=>DYNAMIC_LIST_SOURCES.includes(source));
|
|
268
|
+
const segmentId = String((_value_segmentId = value['segmentId']) != null ? _value_segmentId : '').trim();
|
|
269
|
+
const viewId = String((_value_viewId = value['viewId']) != null ? _value_viewId : '').trim();
|
|
270
|
+
/*
|
|
271
|
+
* An empty OR branch is DROPPED rather than kept.
|
|
272
|
+
*
|
|
273
|
+
* A branch with no dimensions matches everybody, and `any` is satisfied by
|
|
274
|
+
* one branch — so a single empty one would silently disable every other
|
|
275
|
+
* branch beside it. Dropping it is the same decision the source filter
|
|
276
|
+
* makes about a typo'd silo name, for the same reason: a rule must not
|
|
277
|
+
* quietly select a different population than the one it reads as.
|
|
278
|
+
*/ const groups = (Array.isArray(value['any']) ? value['any'] : []).slice(0, DYNAMIC_LIST_MAX_GROUPS).map((raw)=>{
|
|
279
|
+
const entry = raw != null ? raw : {};
|
|
280
|
+
const dimensions = normalizeDimensions(entry);
|
|
281
|
+
return _extends({}, dimensions, entry['negate'] === true ? {
|
|
282
|
+
negate: true
|
|
283
|
+
} : {});
|
|
284
|
+
}).filter((group)=>!dimensionsAreEmpty(stripNegate(group)));
|
|
285
|
+
return _extends({
|
|
286
|
+
sources
|
|
287
|
+
}, segmentId ? {
|
|
288
|
+
segmentId
|
|
289
|
+
} : {}, viewId ? {
|
|
290
|
+
viewId
|
|
291
|
+
} : {}, value['negate'] === true ? {
|
|
292
|
+
negate: true
|
|
293
|
+
} : {}, normalizeDimensions(value), groups.length ? {
|
|
294
|
+
any: groups
|
|
295
|
+
} : {});
|
|
296
|
+
}
|
|
297
|
+
/** A branch without its flag, so emptiness is decided on its filters alone. */ function stripNegate(group) {
|
|
298
|
+
const { negate } = group, dimensions = _object_without_properties_loose(group, [
|
|
299
|
+
"negate"
|
|
300
|
+
]);
|
|
301
|
+
void negate;
|
|
302
|
+
return dimensions;
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* True when a rule can select nobody no matter what the data holds.
|
|
306
|
+
*
|
|
307
|
+
* Worth its own answer because the failure it prevents is silent: an empty
|
|
308
|
+
* `sources` materializes an empty list, and an empty list reads in the
|
|
309
|
+
* composer exactly like a rule that simply has not run yet.
|
|
310
|
+
*/ export function dynamicListRuleIsEmpty(rule) {
|
|
311
|
+
return rule.sources.length === 0;
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Does this person match the rule?
|
|
315
|
+
*
|
|
316
|
+
* AND across dimensions, OR within one — the same shape `contactMatchesSegment`
|
|
317
|
+
* uses, so a merchant who has built a segment already knows how this reads.
|
|
318
|
+
*
|
|
319
|
+
* On top of that flat block sit two operators, and the whole verdict is:
|
|
320
|
+
*
|
|
321
|
+
* ```
|
|
322
|
+
* silo is in sources
|
|
323
|
+
* AND (negate ? NOT top-level block : top-level block)
|
|
324
|
+
* AND (any branches ? at least one branch, each with its own negate : true)
|
|
325
|
+
* ```
|
|
326
|
+
*
|
|
327
|
+
* Which is nested AND/OR with negation, arranged so that the only part the
|
|
328
|
+
* materializer's scan plan depends on — `sources` — sits outside both
|
|
329
|
+
* operators and cannot be touched by either.
|
|
330
|
+
*
|
|
331
|
+
* Dimensions that do not apply to a candidate's silo are SKIPPED rather than
|
|
332
|
+
* failed. A rule of `sources: ['contacts','siteMembers'], tags: ['vip']` means
|
|
333
|
+
* "VIP contacts, and site members" — reading `tags` against a member document
|
|
334
|
+
* that cannot carry tags would make the second source contribute nobody, and
|
|
335
|
+
* a source that silently contributes nobody is the same defect as a dropped
|
|
336
|
+
* typo above.
|
|
337
|
+
*
|
|
338
|
+
* @param segment filters resolved from `rule.segmentId`, when it names one.
|
|
339
|
+
* @param view the dimensions resolved from `rule.viewId`, when it names
|
|
340
|
+
* one — see {@link dynamicListDimensionsForCrmView}.
|
|
341
|
+
* @param nowMs evaluation instant, injected so a sweep is reproducible.
|
|
342
|
+
*/ export function candidateMatchesDynamicListRule(candidate, rule, options) {
|
|
343
|
+
var _options_segment, _rule_any;
|
|
344
|
+
/*
|
|
345
|
+
* The source filter, first and outside everything else. It is the one
|
|
346
|
+
* dimension that is neither negatable nor groupable, because it is the scan
|
|
347
|
+
* plan rather than a filter over what the scan found.
|
|
348
|
+
*/ if (!rule.sources.includes(candidate.silo)) return false;
|
|
349
|
+
/*
|
|
350
|
+
* A resolved VIEW is its own AND-block beside the rule's, inside the
|
|
351
|
+
* negatable top level with the segment — the view always applies, and a
|
|
352
|
+
* rule that inverts its block inverts the view with it, which is what
|
|
353
|
+
* "nobody matching all of these" reads as when a view is one of them.
|
|
354
|
+
* Beside rather than merged INTO the rule's dimensions: the lists within
|
|
355
|
+
* a dimension are OR, so merging a view's owners with the rule's would
|
|
356
|
+
* widen both.
|
|
357
|
+
*/ const top = matchesDimensions(candidate, rule, {
|
|
358
|
+
segment: (_options_segment = options.segment) != null ? _options_segment : null,
|
|
359
|
+
nowMs: options.nowMs
|
|
360
|
+
}) && (!options.view || matchesDimensions(candidate, options.view, {
|
|
361
|
+
segment: null,
|
|
362
|
+
nowMs: options.nowMs
|
|
363
|
+
}));
|
|
364
|
+
if ((rule.negate === true ? !top : top) === false) return false;
|
|
365
|
+
/*
|
|
366
|
+
* The OR branches, ANDed with the block above. Absent or empty is no
|
|
367
|
+
* constraint — `Array.prototype.some` on an empty array is `false`, which
|
|
368
|
+
* would turn a rule that named no branches into one nobody satisfies.
|
|
369
|
+
*/ const groups = (_rule_any = rule.any) != null ? _rule_any : [];
|
|
370
|
+
if (!groups.length) return true;
|
|
371
|
+
return groups.some((group)=>{
|
|
372
|
+
const matched = matchesDimensions(candidate, group, {
|
|
373
|
+
// A saved segment belongs to the rule, not to a branch: it is resolved
|
|
374
|
+
// once by the caller from the rule's own `segmentId`, and folding it
|
|
375
|
+
// into every branch would make each branch narrower than it reads.
|
|
376
|
+
segment: null,
|
|
377
|
+
nowMs: options.nowMs
|
|
378
|
+
});
|
|
379
|
+
return group.negate === true ? !matched : matched;
|
|
380
|
+
});
|
|
381
|
+
}
|
|
382
|
+
/**
|
|
383
|
+
* One AND-block of dimensions against one candidate.
|
|
384
|
+
*
|
|
385
|
+
* Extracted so the top-level block and every OR branch are decided by the
|
|
386
|
+
* same code. Two implementations of "does this person match these filters"
|
|
387
|
+
* would drift, and the half that drifts is whichever the merchant is not
|
|
388
|
+
* looking at — the same reason `contactMatchesSegment` is reused here rather
|
|
389
|
+
* than restated.
|
|
390
|
+
*/ function matchesDimensions(candidate, rule, options) {
|
|
391
|
+
var _candidate_listIds;
|
|
392
|
+
var _rule_formNames, _rule_campaignIds, _rule_inListIds, _rule_notInListIds;
|
|
393
|
+
const day = 86400000;
|
|
394
|
+
if (rule.createdAfterMs !== undefined) {
|
|
395
|
+
// A record with no creation stamp cannot satisfy an age window, and
|
|
396
|
+
// admitting it would put people INTO an audience the merchant bounded on
|
|
397
|
+
// purpose. This is the opposite lean from the consent module's unknown
|
|
398
|
+
// handling, and deliberately so: there, the unknown keeps somebody
|
|
399
|
+
// reachable; here, it would add somebody the rule excluded.
|
|
400
|
+
if (candidate.createdAtMs == null) return false;
|
|
401
|
+
if (candidate.createdAtMs < rule.createdAfterMs) return false;
|
|
402
|
+
}
|
|
403
|
+
if (rule.createdBeforeMs !== undefined) {
|
|
404
|
+
if (candidate.createdAtMs == null) return false;
|
|
405
|
+
if (candidate.createdAtMs >= rule.createdBeforeMs) return false;
|
|
406
|
+
}
|
|
407
|
+
if (candidate.silo === 'formSubmissions' && ((_rule_formNames = rule.formNames) == null ? void 0 : _rule_formNames.length)) {
|
|
408
|
+
var _candidate_formName;
|
|
409
|
+
const wanted = new Set(rule.formNames.map((name)=>name.toLowerCase()));
|
|
410
|
+
if (!wanted.has(String((_candidate_formName = candidate.formName) != null ? _candidate_formName : '').trim().toLowerCase())) {
|
|
411
|
+
return false;
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
/*
|
|
415
|
+
* FILED UNDER A CAMPAIGN — the two silos that can be, and only those.
|
|
416
|
+
*
|
|
417
|
+
* OR within the dimension, like every other list here: a merchant naming
|
|
418
|
+
* three campaigns means anyone in any of them, not the handful of people
|
|
419
|
+
* filed under all three at once.
|
|
420
|
+
*
|
|
421
|
+
* A row in a silo that carries no membership is SKIPPED rather than failed,
|
|
422
|
+
* so "people in the spring push, and every site member" contributes members
|
|
423
|
+
* — the same reading `tags` gets for a lead. ⚠️ Which also means a NEGATED
|
|
424
|
+
* branch whose only filter is this one excludes those silos entirely; that
|
|
425
|
+
* is the honest consequence of the skip rule, stated on the branch flag
|
|
426
|
+
* itself.
|
|
427
|
+
*/ if (((_rule_campaignIds = rule.campaignIds) == null ? void 0 : _rule_campaignIds.length) && CAMPAIGN_MEMBER_SILOS.includes(candidate.silo)) {
|
|
428
|
+
var _candidate_campaignIds;
|
|
429
|
+
// An absent field reads as "filed under nothing", which is what a row
|
|
430
|
+
// written before the form named a campaign actually says.
|
|
431
|
+
const filed = new Set((_candidate_campaignIds = candidate.campaignIds) != null ? _candidate_campaignIds : []);
|
|
432
|
+
if (!rule.campaignIds.some((campaignId)=>filed.has(campaignId))) {
|
|
433
|
+
return false;
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
if (candidate.silo === 'contacts') {
|
|
437
|
+
var _ref, _rule_tags, _ref1, _rule_captureSources, _candidate_tags, _candidate_sources, _rule_custom;
|
|
438
|
+
var _options_segment, _options_segment1, _rule_ownerUids, _rule_lifecycleStages, _rule_companyIds;
|
|
439
|
+
const segmentFilters = {
|
|
440
|
+
tags: [
|
|
441
|
+
...(_ref = (_options_segment = options.segment) == null ? void 0 : _options_segment.tags) != null ? _ref : [],
|
|
442
|
+
...(_rule_tags = rule.tags) != null ? _rule_tags : []
|
|
443
|
+
],
|
|
444
|
+
sources: [
|
|
445
|
+
...(_ref1 = (_options_segment1 = options.segment) == null ? void 0 : _options_segment1.sources) != null ? _ref1 : [],
|
|
446
|
+
...(_rule_captureSources = rule.captureSources) != null ? _rule_captureSources : []
|
|
447
|
+
]
|
|
448
|
+
};
|
|
449
|
+
if (!contactMatchesSegment({
|
|
450
|
+
tags: (_candidate_tags = candidate.tags) != null ? _candidate_tags : [],
|
|
451
|
+
sources: (_candidate_sources = candidate.sources) != null ? _candidate_sources : {}
|
|
452
|
+
}, segmentFilters)) {
|
|
453
|
+
return false;
|
|
454
|
+
}
|
|
455
|
+
const behavior = rule.behavior;
|
|
456
|
+
if (behavior) {
|
|
457
|
+
var _candidate_ordersCount, _candidate_ltvCents;
|
|
458
|
+
if (behavior.ordersCountAtLeast !== undefined && ((_candidate_ordersCount = candidate.ordersCount) != null ? _candidate_ordersCount : 0) < behavior.ordersCountAtLeast) {
|
|
459
|
+
return false;
|
|
460
|
+
}
|
|
461
|
+
if (behavior.ltvCentsAtLeast !== undefined && ((_candidate_ltvCents = candidate.ltvCents) != null ? _candidate_ltvCents : 0) < behavior.ltvCentsAtLeast) {
|
|
462
|
+
return false;
|
|
463
|
+
}
|
|
464
|
+
if (behavior.lastPurchaseWithinDays !== undefined) {
|
|
465
|
+
var _candidate_lastPurchaseAtMs;
|
|
466
|
+
const last = (_candidate_lastPurchaseAtMs = candidate.lastPurchaseAtMs) != null ? _candidate_lastPurchaseAtMs : null;
|
|
467
|
+
if (last === null) return false;
|
|
468
|
+
if (last < options.nowMs - behavior.lastPurchaseWithinDays * day) {
|
|
469
|
+
return false;
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
if (behavior.noPurchaseForDays !== undefined) {
|
|
473
|
+
var _candidate_lastPurchaseAtMs1;
|
|
474
|
+
const last = (_candidate_lastPurchaseAtMs1 = candidate.lastPurchaseAtMs) != null ? _candidate_lastPurchaseAtMs1 : null;
|
|
475
|
+
// Never purchased is not lapsed — see DynamicListBehavior.
|
|
476
|
+
if (last === null) return false;
|
|
477
|
+
if (last > options.nowMs - behavior.noPurchaseForDays * day) {
|
|
478
|
+
return false;
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
/*
|
|
483
|
+
* THE CRM DIMENSIONS — OR within each, AND across them, like the tags.
|
|
484
|
+
*
|
|
485
|
+
* An absent value matches none of the first three. "Owned by A or B" is
|
|
486
|
+
* a positive claim about the relationship, and a contact nobody owns is
|
|
487
|
+
* not a contact A owns; the same for a stage never set and a company
|
|
488
|
+
* never linked. The lean is the dated-window one rather than the
|
|
489
|
+
* consent module's: admitting the unknown here would put people INTO an
|
|
490
|
+
* audience the merchant bounded on purpose.
|
|
491
|
+
*/ if ((_rule_ownerUids = rule.ownerUids) == null ? void 0 : _rule_ownerUids.length) {
|
|
492
|
+
if (!candidate.ownerUid || !rule.ownerUids.includes(candidate.ownerUid)) {
|
|
493
|
+
return false;
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
if ((_rule_lifecycleStages = rule.lifecycleStages) == null ? void 0 : _rule_lifecycleStages.length) {
|
|
497
|
+
if (!candidate.lifecycleStage || !rule.lifecycleStages.includes(candidate.lifecycleStage)) {
|
|
498
|
+
return false;
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
if ((_rule_companyIds = rule.companyIds) == null ? void 0 : _rule_companyIds.length) {
|
|
502
|
+
if (!candidate.companyId || !rule.companyIds.includes(candidate.companyId)) {
|
|
503
|
+
return false;
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
// Every clause must hold. A merchant adding a second condition on a
|
|
507
|
+
// custom field is narrowing, which is what a second box on a form means
|
|
508
|
+
// everywhere else in it — the OR is the `any` branches, not this list.
|
|
509
|
+
for (const clause of (_rule_custom = rule.custom) != null ? _rule_custom : []){
|
|
510
|
+
var _candidate_custom;
|
|
511
|
+
if (!customValueMatches((_candidate_custom = candidate.custom) == null ? void 0 : _candidate_custom[clause.key], clause)) {
|
|
512
|
+
return false;
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
/*
|
|
516
|
+
* ENGAGED WITH OUR CAMPAIGNS — the facet stamp, on the same lean as
|
|
517
|
+
* `lastPurchaseWithinDays`: no stamp is no match. This is the one
|
|
518
|
+
* engagement figure that is about THIS holder's mail; the address-level
|
|
519
|
+
* arms further down are about the address.
|
|
520
|
+
*/ if (rule.engagedWithinDays !== undefined) {
|
|
521
|
+
var _candidate_lastEmailEngagementAtMs;
|
|
522
|
+
const last = (_candidate_lastEmailEngagementAtMs = candidate.lastEmailEngagementAtMs) != null ? _candidate_lastEmailEngagementAtMs : null;
|
|
523
|
+
if (last === null) return false;
|
|
524
|
+
if (last < options.nowMs - rule.engagedWithinDays * day) return false;
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
/*
|
|
528
|
+
* ENGAGEMENT — every silo, not contacts only.
|
|
529
|
+
*
|
|
530
|
+
* The rollup keys on the ADDRESS, and a lead, a site member and a form
|
|
531
|
+
* submission all have one. Restricting this to contacts the way `behavior`
|
|
532
|
+
* is restricted would be restricting it to the silo that happens to store
|
|
533
|
+
* the OTHER figures, which is not a fact about engagement.
|
|
534
|
+
*/ const engagement = rule.engagement;
|
|
535
|
+
if (engagement) {
|
|
536
|
+
var _candidate_lastOpenedAtMs, _candidate_lastClickedAtMs;
|
|
537
|
+
const opened = (_candidate_lastOpenedAtMs = candidate.lastOpenedAtMs) != null ? _candidate_lastOpenedAtMs : null;
|
|
538
|
+
const clicked = (_candidate_lastClickedAtMs = candidate.lastClickedAtMs) != null ? _candidate_lastClickedAtMs : null;
|
|
539
|
+
if (engagement.openedWithinDays !== undefined) {
|
|
540
|
+
if (opened === null) return false;
|
|
541
|
+
if (opened < options.nowMs - engagement.openedWithinDays * day) {
|
|
542
|
+
return false;
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
if (engagement.clickedWithinDays !== undefined) {
|
|
546
|
+
if (clicked === null) return false;
|
|
547
|
+
if (clicked < options.nowMs - engagement.clickedWithinDays * day) {
|
|
548
|
+
return false;
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
// No record MATCHES the quiet arms — see DynamicListEngagement for why
|
|
552
|
+
// this leans the opposite way from `noPurchaseForDays` above it.
|
|
553
|
+
if (engagement.notOpenedForDays !== undefined && opened !== null) {
|
|
554
|
+
if (opened > options.nowMs - engagement.notOpenedForDays * day) {
|
|
555
|
+
return false;
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
if (engagement.notClickedForDays !== undefined && clicked !== null) {
|
|
559
|
+
if (clicked > options.nowMs - engagement.notClickedForDays * day) {
|
|
560
|
+
return false;
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
/*
|
|
565
|
+
* LIST MEMBERSHIP — "and not the people already on my customers list".
|
|
566
|
+
*
|
|
567
|
+
* An absent `listIds` reads as "on no list", and that is the reading a
|
|
568
|
+
* failed or skipped lookup gets too. The direction is chosen rather than
|
|
569
|
+
* defaulted: an unenriched candidate failing `inListIds` keeps them OUT of
|
|
570
|
+
* an audience, where an unenriched candidate passing `notInListIds` would
|
|
571
|
+
* let a lookup failure quietly re-admit the people a merchant excluded. The
|
|
572
|
+
* materializer runs the enrichment whenever a rule names a list, so the
|
|
573
|
+
* absent case is a lookup that failed rather than an ordinary one — and
|
|
574
|
+
* these two readings are what it costs when one does.
|
|
575
|
+
*/ const memberOf = new Set((_candidate_listIds = candidate.listIds) != null ? _candidate_listIds : []);
|
|
576
|
+
if ((_rule_inListIds = rule.inListIds) == null ? void 0 : _rule_inListIds.length) {
|
|
577
|
+
if (!rule.inListIds.every((listId)=>memberOf.has(listId))) return false;
|
|
578
|
+
}
|
|
579
|
+
if ((_rule_notInListIds = rule.notInListIds) == null ? void 0 : _rule_notInListIds.length) {
|
|
580
|
+
if (rule.notInListIds.some((listId)=>memberOf.has(listId))) return false;
|
|
581
|
+
}
|
|
582
|
+
return true;
|
|
583
|
+
}
|
|
584
|
+
/** A value that is on the record: not absent, not `null`, not blank text. */ const customValueIsSet = (value)=>value !== undefined && value !== null && !(typeof value === 'string' && value.trim() === '');
|
|
585
|
+
/** A value as text, for the comparisons that read it that way. */ const customValueText = (value)=>String(value).trim().toLowerCase();
|
|
586
|
+
/**
|
|
587
|
+
* Does one stored custom value satisfy one clause?
|
|
588
|
+
*
|
|
589
|
+
* Exported because the comparison is the whole meaning of the dimension and
|
|
590
|
+
* a surface that previews a value against a clause must not carry a second
|
|
591
|
+
* copy of it. The leans, per operator, because each has to be readable back
|
|
592
|
+
* as a sentence the merchant can check against their intent:
|
|
593
|
+
*
|
|
594
|
+
* - `eq` — the same value. Text compares case-insensitively and trimmed,
|
|
595
|
+
* because a `select` option typed as `Enterprise` and stored as
|
|
596
|
+
* `enterprise` is one option; a number and a boolean compare as
|
|
597
|
+
* themselves, and a number stored as text still equals the number.
|
|
598
|
+
* - `neq` — a value that is set AND differs. A blank does NOT count: a
|
|
599
|
+
* merchant excluding one plan is not asking for everyone whose plan was
|
|
600
|
+
* never recorded, and `unset` exists for that question.
|
|
601
|
+
* - `contains` — text containment, case-insensitive; a blank contains
|
|
602
|
+
* nothing.
|
|
603
|
+
* - `gt` / `lt` — numeric when both sides parse as numbers, text otherwise.
|
|
604
|
+
* Text ordering is what a `date` field stores (ISO dates order as text),
|
|
605
|
+
* and a blank is neither greater nor less than anything.
|
|
606
|
+
* - `set` / `unset` — presence. `false` and `0` are set; `null`, absent and
|
|
607
|
+
* blank text are not.
|
|
608
|
+
*/ export function customValueMatches(value, clause) {
|
|
609
|
+
const present = customValueIsSet(value);
|
|
610
|
+
switch(clause.op){
|
|
611
|
+
case 'set':
|
|
612
|
+
return present;
|
|
613
|
+
case 'unset':
|
|
614
|
+
return !present;
|
|
615
|
+
default:
|
|
616
|
+
break;
|
|
617
|
+
}
|
|
618
|
+
if (!present || clause.value === undefined) return false;
|
|
619
|
+
const stored = value;
|
|
620
|
+
const wanted = clause.value;
|
|
621
|
+
switch(clause.op){
|
|
622
|
+
case 'eq':
|
|
623
|
+
return customValueText(stored) === customValueText(wanted);
|
|
624
|
+
case 'neq':
|
|
625
|
+
return customValueText(stored) !== customValueText(wanted);
|
|
626
|
+
case 'contains':
|
|
627
|
+
return customValueText(stored).includes(customValueText(wanted));
|
|
628
|
+
case 'gt':
|
|
629
|
+
case 'lt':
|
|
630
|
+
{
|
|
631
|
+
const left = Number(stored);
|
|
632
|
+
const right = Number(wanted);
|
|
633
|
+
const numeric = typeof stored !== 'boolean' && typeof wanted !== 'boolean' && String(stored).trim() !== '' && String(wanted).trim() !== '' && Number.isFinite(left) && Number.isFinite(right);
|
|
634
|
+
if (numeric) return clause.op === 'gt' ? left > right : left < right;
|
|
635
|
+
const a = customValueText(stored);
|
|
636
|
+
const b = customValueText(wanted);
|
|
637
|
+
return clause.op === 'gt' ? a > b : a < b;
|
|
638
|
+
}
|
|
639
|
+
default:
|
|
640
|
+
return false;
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
/** Every dimension block a rule carries: its own, then each OR branch. */ function allDimensions(rule) {
|
|
644
|
+
var _rule_any;
|
|
645
|
+
return [
|
|
646
|
+
rule,
|
|
647
|
+
...(_rule_any = rule.any) != null ? _rule_any : []
|
|
648
|
+
];
|
|
649
|
+
}
|
|
650
|
+
/**
|
|
651
|
+
* Does evaluating this rule need the sweeping holder's contact FACET?
|
|
652
|
+
*
|
|
653
|
+
* The campaign membership and the four CRM fields all live inside the facet,
|
|
654
|
+
* which is keyed by the consent group the materializer has to resolve with
|
|
655
|
+
* one org read. A rule that names none of them pays nothing — the same
|
|
656
|
+
* opt-in cost `dynamicListRuleNeedsCampaigns` already describes, widened to
|
|
657
|
+
* every dimension the facet holds so the materializer asks one question
|
|
658
|
+
* rather than five.
|
|
659
|
+
*/ export function dynamicListRuleNeedsContactFacet(rule) {
|
|
660
|
+
return allDimensions(rule).some((dimensions)=>{
|
|
661
|
+
var _ref, _ref1, _ref2, _ref3, _ref4;
|
|
662
|
+
var _dimensions_campaignIds, _dimensions_ownerUids, _dimensions_lifecycleStages, _dimensions_companyIds, _dimensions_custom;
|
|
663
|
+
return ((_ref = (_dimensions_campaignIds = dimensions.campaignIds) == null ? void 0 : _dimensions_campaignIds.length) != null ? _ref : 0) > 0 || ((_ref1 = (_dimensions_ownerUids = dimensions.ownerUids) == null ? void 0 : _dimensions_ownerUids.length) != null ? _ref1 : 0) > 0 || ((_ref2 = (_dimensions_lifecycleStages = dimensions.lifecycleStages) == null ? void 0 : _dimensions_lifecycleStages.length) != null ? _ref2 : 0) > 0 || ((_ref3 = (_dimensions_companyIds = dimensions.companyIds) == null ? void 0 : _dimensions_companyIds.length) != null ? _ref3 : 0) > 0 || ((_ref4 = (_dimensions_custom = dimensions.custom) == null ? void 0 : _dimensions_custom.length) != null ? _ref4 : 0) > 0 || dimensions.engagedWithinDays !== undefined;
|
|
664
|
+
});
|
|
665
|
+
}
|
|
666
|
+
/**
|
|
667
|
+
* Does evaluating this rule need the per-person engagement rollup?
|
|
668
|
+
*
|
|
669
|
+
* Asked by the materializer before it spends a keyed read per candidate. A
|
|
670
|
+
* rule with no engagement clause anywhere pays nothing, which is what keeps
|
|
671
|
+
* the lookup an opt-in cost rather than a tax on every sweep.
|
|
672
|
+
*/ export function dynamicListRuleNeedsEngagement(rule) {
|
|
673
|
+
return allDimensions(rule).some((dimensions)=>dimensions.engagement !== undefined && Object.keys(dimensions.engagement).length > 0);
|
|
674
|
+
}
|
|
675
|
+
/**
|
|
676
|
+
* Does evaluating this rule need a contact's campaign membership?
|
|
677
|
+
*
|
|
678
|
+
* Asked by the materializer before it resolves the consent group the facet is
|
|
679
|
+
* keyed by — one org read, and only for a rule that names a campaign. A
|
|
680
|
+
* submission's membership is on the row the sweep already paged and costs
|
|
681
|
+
* nothing either way, so this answers about the CONTACTS silo's extra work.
|
|
682
|
+
*/ export function dynamicListRuleNeedsCampaigns(rule) {
|
|
683
|
+
return allDimensions(rule).some((dimensions)=>{
|
|
684
|
+
var _ref;
|
|
685
|
+
var _dimensions_campaignIds;
|
|
686
|
+
return ((_ref = (_dimensions_campaignIds = dimensions.campaignIds) == null ? void 0 : _dimensions_campaignIds.length) != null ? _ref : 0) > 0;
|
|
687
|
+
});
|
|
688
|
+
}
|
|
689
|
+
/**
|
|
690
|
+
* The rule with one list id removed from both membership arms.
|
|
691
|
+
*
|
|
692
|
+
* ⛔ A dynamic list whose rule referred to ITSELF would oscillate, and the
|
|
693
|
+
* oscillation removes people. `notInListIds: [self]` matches everybody on the
|
|
694
|
+
* first sweep, which enrolls them; on the second sweep they are all members,
|
|
695
|
+
* so nobody matches, and reconciliation deletes every row the rule created.
|
|
696
|
+
* The third sweep enrolls them again. Membership would flip on every beat of
|
|
697
|
+
* the materializing sweep forever, and half of those beats are deletions.
|
|
698
|
+
*
|
|
699
|
+
* A self-reference also cannot mean anything useful — the answer depends on
|
|
700
|
+
* whether the sweep has run yet — so it is dropped rather than refused: a
|
|
701
|
+
* merchant who picks their own audience gets the rule without that clause,
|
|
702
|
+
* which is what it would have meant if it meant anything.
|
|
703
|
+
*/ export function dynamicListRuleWithoutListReference(rule, listId) {
|
|
704
|
+
var _rule_any;
|
|
705
|
+
if (!listId) return rule;
|
|
706
|
+
const strip = (dimensions)=>{
|
|
707
|
+
var _dimensions_inListIds, _dimensions_notInListIds;
|
|
708
|
+
const inListIds = ((_dimensions_inListIds = dimensions.inListIds) != null ? _dimensions_inListIds : []).filter((id)=>id !== listId);
|
|
709
|
+
const notInListIds = ((_dimensions_notInListIds = dimensions.notInListIds) != null ? _dimensions_notInListIds : []).filter((id)=>id !== listId);
|
|
710
|
+
const next = _extends({}, dimensions);
|
|
711
|
+
if (dimensions.inListIds) {
|
|
712
|
+
if (inListIds.length) next.inListIds = inListIds;
|
|
713
|
+
else delete next.inListIds;
|
|
714
|
+
}
|
|
715
|
+
if (dimensions.notInListIds) {
|
|
716
|
+
if (notInListIds.length) next.notInListIds = notInListIds;
|
|
717
|
+
else delete next.notInListIds;
|
|
718
|
+
}
|
|
719
|
+
return next;
|
|
720
|
+
};
|
|
721
|
+
const stripped = strip(rule);
|
|
722
|
+
/*
|
|
723
|
+
* A branch whose ONLY filter was the self-reference is dropped, not kept
|
|
724
|
+
* empty: an empty branch matches everybody, and one satisfied branch
|
|
725
|
+
* satisfies `any`, so keeping it would silently disable every branch
|
|
726
|
+
* beside it. Same reasoning as the normalizer's own empty-branch drop.
|
|
727
|
+
*/ const groups = ((_rule_any = rule.any) != null ? _rule_any : []).map((group)=>strip(group)).filter((group)=>Object.keys(stripNegate(group)).length > 0);
|
|
728
|
+
if (groups.length) stripped.any = groups;
|
|
729
|
+
else delete stripped.any;
|
|
730
|
+
return stripped;
|
|
731
|
+
}
|
|
732
|
+
/** Every list id this rule refers to, in either direction, de-duplicated. */ export function dynamicListRuleListIds(rule) {
|
|
733
|
+
const ids = new Set();
|
|
734
|
+
for (const dimensions of allDimensions(rule)){
|
|
735
|
+
var _dimensions_inListIds, _dimensions_notInListIds;
|
|
736
|
+
for (const listId of (_dimensions_inListIds = dimensions.inListIds) != null ? _dimensions_inListIds : [])ids.add(listId);
|
|
737
|
+
for (const listId of (_dimensions_notInListIds = dimensions.notInListIds) != null ? _dimensions_notInListIds : [])ids.add(listId);
|
|
738
|
+
}
|
|
739
|
+
return [
|
|
740
|
+
...ids
|
|
741
|
+
];
|
|
742
|
+
}
|
|
743
|
+
const DAY_MS = 86400000;
|
|
744
|
+
/** The values an `isAnyOf` carries, or the one an equality does; `null` for any other operator. */ const viewClauseValues = (clause)=>{
|
|
745
|
+
const value = clause.value.trim();
|
|
746
|
+
if (clause.op === 'isAnyOf') {
|
|
747
|
+
return value.split(',').map((entry)=>entry.trim()).filter(Boolean);
|
|
748
|
+
}
|
|
749
|
+
if (clause.op === 'equals' || clause.op === 'is' || clause.op === 'contains') {
|
|
750
|
+
return value ? [
|
|
751
|
+
value
|
|
752
|
+
] : [];
|
|
753
|
+
}
|
|
754
|
+
return null;
|
|
755
|
+
};
|
|
756
|
+
const CUSTOM_VIEW_OPS = {
|
|
757
|
+
equals: 'eq',
|
|
758
|
+
is: 'eq',
|
|
759
|
+
'=': 'eq',
|
|
760
|
+
doesNotEqual: 'neq',
|
|
761
|
+
'!=': 'neq',
|
|
762
|
+
contains: 'contains',
|
|
763
|
+
'>': 'gt',
|
|
764
|
+
'<': 'lt',
|
|
765
|
+
isNotEmpty: 'set',
|
|
766
|
+
isEmpty: 'unset'
|
|
767
|
+
};
|
|
768
|
+
/**
|
|
769
|
+
* A view's filters as the dimensions of one AND-block, and the clauses
|
|
770
|
+
* that could not be.
|
|
771
|
+
*
|
|
772
|
+
* Every list operator keeps its own meaning across the translation:
|
|
773
|
+
* `isAnyOf` is the OR the dimension lists already are, an equality is a
|
|
774
|
+
* list of one, a `contains` on the tag array is one tag matched whole. The
|
|
775
|
+
* dates read the clause's value as an instant — a day, as the filter bar
|
|
776
|
+
* writes one — with `after` and `onOrBefore` stepping a day past it the
|
|
777
|
+
* way the list's own matcher does. A purchase threshold has a floor here
|
|
778
|
+
* and no ceiling, so `at least` and `over` carry and `under` cannot.
|
|
779
|
+
*/ export function dynamicListDimensionsForCrmView(filters) {
|
|
780
|
+
const fields = CRM_CONTACT_VIEW_FIELDS;
|
|
781
|
+
const dimensions = {};
|
|
782
|
+
const unsupported = [];
|
|
783
|
+
const behavior = {};
|
|
784
|
+
const custom = [];
|
|
785
|
+
const extend = (key, values)=>{
|
|
786
|
+
var _dimensions_key;
|
|
787
|
+
dimensions[key] = [
|
|
788
|
+
...(_dimensions_key = dimensions[key]) != null ? _dimensions_key : [],
|
|
789
|
+
...values
|
|
790
|
+
];
|
|
791
|
+
};
|
|
792
|
+
for (const clause of filters){
|
|
793
|
+
const values = viewClauseValues(clause);
|
|
794
|
+
const value = clause.value.trim();
|
|
795
|
+
const customKey = crmContactCustomKey(clause.field);
|
|
796
|
+
if (customKey !== null) {
|
|
797
|
+
const key = normalizeContactFieldKey(customKey);
|
|
798
|
+
const op = CUSTOM_VIEW_OPS[clause.op];
|
|
799
|
+
if (key && op) {
|
|
800
|
+
custom.push(op === 'set' || op === 'unset' ? {
|
|
801
|
+
key,
|
|
802
|
+
op
|
|
803
|
+
} : {
|
|
804
|
+
key,
|
|
805
|
+
op,
|
|
806
|
+
value
|
|
807
|
+
});
|
|
808
|
+
continue;
|
|
809
|
+
}
|
|
810
|
+
unsupported.push(clause);
|
|
811
|
+
continue;
|
|
812
|
+
}
|
|
813
|
+
switch(clause.field){
|
|
814
|
+
case fields.tags:
|
|
815
|
+
if (values == null ? void 0 : values.length) {
|
|
816
|
+
extend('tags', values.map((tag)=>tag.toLowerCase()));
|
|
817
|
+
continue;
|
|
818
|
+
}
|
|
819
|
+
break;
|
|
820
|
+
case fields.source:
|
|
821
|
+
if (values == null ? void 0 : values.length) {
|
|
822
|
+
const sources = values.filter((source)=>source in CONTACT_SOURCE_LABELS);
|
|
823
|
+
if (sources.length === values.length) {
|
|
824
|
+
var _dimensions_captureSources;
|
|
825
|
+
dimensions.captureSources = [
|
|
826
|
+
...(_dimensions_captureSources = dimensions.captureSources) != null ? _dimensions_captureSources : [],
|
|
827
|
+
...sources
|
|
828
|
+
];
|
|
829
|
+
continue;
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
break;
|
|
833
|
+
case fields.owner:
|
|
834
|
+
if (values == null ? void 0 : values.length) {
|
|
835
|
+
extend('ownerUids', values);
|
|
836
|
+
continue;
|
|
837
|
+
}
|
|
838
|
+
break;
|
|
839
|
+
case fields.stage:
|
|
840
|
+
if ((values == null ? void 0 : values.length) && values.every(isContactLifecycleStage)) {
|
|
841
|
+
var _dimensions_lifecycleStages;
|
|
842
|
+
dimensions.lifecycleStages = [
|
|
843
|
+
...(_dimensions_lifecycleStages = dimensions.lifecycleStages) != null ? _dimensions_lifecycleStages : [],
|
|
844
|
+
...values
|
|
845
|
+
];
|
|
846
|
+
continue;
|
|
847
|
+
}
|
|
848
|
+
break;
|
|
849
|
+
case fields.company:
|
|
850
|
+
if (values == null ? void 0 : values.length) {
|
|
851
|
+
extend('companyIds', values);
|
|
852
|
+
continue;
|
|
853
|
+
}
|
|
854
|
+
break;
|
|
855
|
+
case fields.createdAt:
|
|
856
|
+
{
|
|
857
|
+
const at = Date.parse(value);
|
|
858
|
+
if (Number.isFinite(at)) {
|
|
859
|
+
if (clause.op === 'after') dimensions.createdAfterMs = at + DAY_MS;
|
|
860
|
+
else if (clause.op === 'onOrAfter') dimensions.createdAfterMs = at;
|
|
861
|
+
else if (clause.op === 'before') dimensions.createdBeforeMs = at;
|
|
862
|
+
else if (clause.op === 'onOrBefore') {
|
|
863
|
+
dimensions.createdBeforeMs = at + DAY_MS;
|
|
864
|
+
} else if (clause.op === 'is') {
|
|
865
|
+
dimensions.createdAfterMs = at;
|
|
866
|
+
dimensions.createdBeforeMs = at + DAY_MS;
|
|
867
|
+
} else break;
|
|
868
|
+
continue;
|
|
869
|
+
}
|
|
870
|
+
break;
|
|
871
|
+
}
|
|
872
|
+
case fields.orders:
|
|
873
|
+
case fields.ltv:
|
|
874
|
+
{
|
|
875
|
+
const amount = Number(value);
|
|
876
|
+
if (Number.isFinite(amount) && (clause.op === '>=' || clause.op === '>')) {
|
|
877
|
+
const floor = clause.op === '>' ? amount + 1 : amount;
|
|
878
|
+
if (clause.field === fields.orders) behavior.ordersCountAtLeast = floor;
|
|
879
|
+
else behavior.ltvCentsAtLeast = floor;
|
|
880
|
+
continue;
|
|
881
|
+
}
|
|
882
|
+
break;
|
|
883
|
+
}
|
|
884
|
+
default:
|
|
885
|
+
break;
|
|
886
|
+
}
|
|
887
|
+
unsupported.push(clause);
|
|
888
|
+
}
|
|
889
|
+
if (Object.keys(behavior).length) dimensions.behavior = behavior;
|
|
890
|
+
if (custom.length) dimensions.custom = custom;
|
|
891
|
+
return {
|
|
892
|
+
dimensions,
|
|
893
|
+
unsupported
|
|
894
|
+
};
|
|
895
|
+
}
|
|
896
|
+
/**
|
|
897
|
+
* The rule the sweep PLANS with once a view is resolved: the rule itself
|
|
898
|
+
* with the view's block beside its branches, so the planners that read
|
|
899
|
+
* every block — does this need the contact facet, an engagement lookup, a
|
|
900
|
+
* list membership — see the view's dimensions too. For planning only; the
|
|
901
|
+
* matcher takes the view as its own option, because a branch is OR and a
|
|
902
|
+
* view is AND.
|
|
903
|
+
*/ export function dynamicListPlanningRule(rule, view) {
|
|
904
|
+
var _rule_any;
|
|
905
|
+
if (!view || Object.keys(view).length === 0) return rule;
|
|
906
|
+
return _extends({}, rule, {
|
|
907
|
+
any: [
|
|
908
|
+
...(_rule_any = rule.any) != null ? _rule_any : [],
|
|
909
|
+
view
|
|
910
|
+
]
|
|
911
|
+
});
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
//# sourceMappingURL=dynamic-list-rule.js.map
|